~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to include/linux/ktime.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
/* Convert ktime_t to nanoseconds - NOP in the scalar storage format: */
131
131
#define ktime_to_ns(kt)                 ((kt).tv64)
132
132
 
133
 
#else
 
133
#else   /* !((BITS_PER_LONG == 64) || defined(CONFIG_KTIME_SCALAR)) */
134
134
 
135
135
/*
136
136
 * Helper macros/inlines to get the ktime_t math right in the timespec
275
275
        return (s64) kt.tv.sec * NSEC_PER_SEC + kt.tv.nsec;
276
276
}
277
277
 
278
 
#endif
 
278
#endif  /* !((BITS_PER_LONG == 64) || defined(CONFIG_KTIME_SCALAR)) */
279
279
 
280
280
/**
281
281
 * ktime_equal - Compares two ktime_t variables to see if they are equal
295
295
        return (s64) tv.tv_sec * USEC_PER_SEC + tv.tv_usec;
296
296
}
297
297
 
 
298
static inline s64 ktime_to_ms(const ktime_t kt)
 
299
{
 
300
        struct timeval tv = ktime_to_timeval(kt);
 
301
        return (s64) tv.tv_sec * MSEC_PER_SEC + tv.tv_usec / USEC_PER_MSEC;
 
302
}
 
303
 
298
304
static inline s64 ktime_us_delta(const ktime_t later, const ktime_t earlier)
299
305
{
300
306
       return ktime_to_us(ktime_sub(later, earlier));