diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/clockchips.h | 19 | ||||
| -rw-r--r-- | include/linux/clocksource.h | 18 | ||||
| -rw-r--r-- | include/linux/crypto.h | 27 | ||||
| -rw-r--r-- | include/linux/dmar.h | 10 | ||||
| -rw-r--r-- | include/linux/hpet.h | 2 | ||||
| -rw-r--r-- | include/linux/hrtimer.h | 4 | ||||
| -rw-r--r-- | include/linux/hw_random.h | 7 | ||||
| -rw-r--r-- | include/linux/input/sh_keysc.h | 14 | ||||
| -rw-r--r-- | include/linux/mfd/sh_mobile_sdhi.h | 8 | ||||
| -rw-r--r-- | include/linux/reiserfs_fs.h | 71 | ||||
| -rw-r--r-- | include/linux/reiserfs_fs_sb.h | 20 | ||||
| -rw-r--r-- | include/linux/sh_intc.h | 7 | ||||
| -rw-r--r-- | include/linux/sh_pfc.h | 96 | ||||
| -rw-r--r-- | include/linux/tick.h | 5 | ||||
| -rw-r--r-- | include/linux/time.h | 1 | ||||
| -rw-r--r-- | include/linux/timex.h | 9 |
16 files changed, 261 insertions, 57 deletions
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 3a1dbba4d3ae..0cf725bdd2a1 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
| @@ -77,10 +77,10 @@ enum clock_event_nofitiers { | |||
| 77 | struct clock_event_device { | 77 | struct clock_event_device { |
| 78 | const char *name; | 78 | const char *name; |
| 79 | unsigned int features; | 79 | unsigned int features; |
| 80 | unsigned long max_delta_ns; | 80 | u64 max_delta_ns; |
| 81 | unsigned long min_delta_ns; | 81 | u64 min_delta_ns; |
| 82 | unsigned long mult; | 82 | u32 mult; |
| 83 | int shift; | 83 | u32 shift; |
| 84 | int rating; | 84 | int rating; |
| 85 | int irq; | 85 | int irq; |
| 86 | const struct cpumask *cpumask; | 86 | const struct cpumask *cpumask; |
| @@ -116,8 +116,8 @@ static inline unsigned long div_sc(unsigned long ticks, unsigned long nsec, | |||
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | /* Clock event layer functions */ | 118 | /* Clock event layer functions */ |
| 119 | extern unsigned long clockevent_delta2ns(unsigned long latch, | 119 | extern u64 clockevent_delta2ns(unsigned long latch, |
| 120 | struct clock_event_device *evt); | 120 | struct clock_event_device *evt); |
| 121 | extern void clockevents_register_device(struct clock_event_device *dev); | 121 | extern void clockevents_register_device(struct clock_event_device *dev); |
| 122 | 122 | ||
| 123 | extern void clockevents_exchange_device(struct clock_event_device *old, | 123 | extern void clockevents_exchange_device(struct clock_event_device *old, |
| @@ -130,6 +130,13 @@ extern int clockevents_program_event(struct clock_event_device *dev, | |||
| 130 | 130 | ||
| 131 | extern void clockevents_handle_noop(struct clock_event_device *dev); | 131 | extern void clockevents_handle_noop(struct clock_event_device *dev); |
| 132 | 132 | ||
| 133 | static inline void | ||
| 134 | clockevents_calc_mult_shift(struct clock_event_device *ce, u32 freq, u32 minsec) | ||
| 135 | { | ||
| 136 | return clocks_calc_mult_shift(&ce->mult, &ce->shift, NSEC_PER_SEC, | ||
| 137 | freq, minsec); | ||
| 138 | } | ||
| 139 | |||
| 133 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | 140 | #ifdef CONFIG_GENERIC_CLOCKEVENTS |
| 134 | extern void clockevents_notify(unsigned long reason, void *arg); | 141 | extern void clockevents_notify(unsigned long reason, void *arg); |
| 135 | #else | 142 | #else |
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 83d2fbd81b93..8a4a130cc196 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
| @@ -151,6 +151,7 @@ extern u64 timecounter_cyc2time(struct timecounter *tc, | |||
| 151 | * subtraction of non 64 bit counters | 151 | * subtraction of non 64 bit counters |
| 152 | * @mult: cycle to nanosecond multiplier | 152 | * @mult: cycle to nanosecond multiplier |
| 153 | * @shift: cycle to nanosecond divisor (power of two) | 153 | * @shift: cycle to nanosecond divisor (power of two) |
| 154 | * @max_idle_ns: max idle time permitted by the clocksource (nsecs) | ||
| 154 | * @flags: flags describing special properties | 155 | * @flags: flags describing special properties |
| 155 | * @vread: vsyscall based read | 156 | * @vread: vsyscall based read |
| 156 | * @resume: resume function for the clocksource, if necessary | 157 | * @resume: resume function for the clocksource, if necessary |
| @@ -168,6 +169,7 @@ struct clocksource { | |||
| 168 | cycle_t mask; | 169 | cycle_t mask; |
| 169 | u32 mult; | 170 | u32 mult; |
| 170 | u32 shift; | 171 | u32 shift; |
| 172 | u64 max_idle_ns; | ||
| 171 | unsigned long flags; | 173 | unsigned long flags; |
| 172 | cycle_t (*vread)(void); | 174 | cycle_t (*vread)(void); |
| 173 | void (*resume)(void); | 175 | void (*resume)(void); |
| @@ -279,11 +281,23 @@ extern void clocksource_resume(void); | |||
| 279 | extern struct clocksource * __init __weak clocksource_default_clock(void); | 281 | extern struct clocksource * __init __weak clocksource_default_clock(void); |
| 280 | extern void clocksource_mark_unstable(struct clocksource *cs); | 282 | extern void clocksource_mark_unstable(struct clocksource *cs); |
| 281 | 283 | ||
| 284 | extern void | ||
| 285 | clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec); | ||
| 286 | |||
| 287 | static inline void | ||
| 288 | clocksource_calc_mult_shift(struct clocksource *cs, u32 freq, u32 minsec) | ||
| 289 | { | ||
| 290 | return clocks_calc_mult_shift(&cs->mult, &cs->shift, freq, | ||
| 291 | NSEC_PER_SEC, minsec); | ||
| 292 | } | ||
| 293 | |||
| 282 | #ifdef CONFIG_GENERIC_TIME_VSYSCALL | 294 | #ifdef CONFIG_GENERIC_TIME_VSYSCALL |
| 283 | extern void update_vsyscall(struct timespec *ts, struct clocksource *c); | 295 | extern void |
| 296 | update_vsyscall(struct timespec *ts, struct clocksource *c, u32 mult); | ||
| 284 | extern void update_vsyscall_tz(void); | 297 | extern void update_vsyscall_tz(void); |
| 285 | #else | 298 | #else |
| 286 | static inline void update_vsyscall(struct timespec *ts, struct clocksource *c) | 299 | static inline void |
| 300 | update_vsyscall(struct timespec *ts, struct clocksource *c, u32 mult) | ||
| 287 | { | 301 | { |
| 288 | } | 302 | } |
| 289 | 303 | ||
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index fd929889e8dc..24d2e30f1b46 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
| @@ -250,29 +250,6 @@ struct cipher_alg { | |||
| 250 | void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); | 250 | void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); |
| 251 | }; | 251 | }; |
| 252 | 252 | ||
| 253 | struct digest_alg { | ||
| 254 | unsigned int dia_digestsize; | ||
| 255 | void (*dia_init)(struct crypto_tfm *tfm); | ||
| 256 | void (*dia_update)(struct crypto_tfm *tfm, const u8 *data, | ||
| 257 | unsigned int len); | ||
| 258 | void (*dia_final)(struct crypto_tfm *tfm, u8 *out); | ||
| 259 | int (*dia_setkey)(struct crypto_tfm *tfm, const u8 *key, | ||
| 260 | unsigned int keylen); | ||
| 261 | }; | ||
| 262 | |||
| 263 | struct hash_alg { | ||
| 264 | int (*init)(struct hash_desc *desc); | ||
| 265 | int (*update)(struct hash_desc *desc, struct scatterlist *sg, | ||
| 266 | unsigned int nbytes); | ||
| 267 | int (*final)(struct hash_desc *desc, u8 *out); | ||
| 268 | int (*digest)(struct hash_desc *desc, struct scatterlist *sg, | ||
| 269 | unsigned int nbytes, u8 *out); | ||
| 270 | int (*setkey)(struct crypto_hash *tfm, const u8 *key, | ||
| 271 | unsigned int keylen); | ||
| 272 | |||
| 273 | unsigned int digestsize; | ||
| 274 | }; | ||
| 275 | |||
| 276 | struct compress_alg { | 253 | struct compress_alg { |
| 277 | int (*coa_compress)(struct crypto_tfm *tfm, const u8 *src, | 254 | int (*coa_compress)(struct crypto_tfm *tfm, const u8 *src, |
| 278 | unsigned int slen, u8 *dst, unsigned int *dlen); | 255 | unsigned int slen, u8 *dst, unsigned int *dlen); |
| @@ -293,8 +270,6 @@ struct rng_alg { | |||
| 293 | #define cra_aead cra_u.aead | 270 | #define cra_aead cra_u.aead |
| 294 | #define cra_blkcipher cra_u.blkcipher | 271 | #define cra_blkcipher cra_u.blkcipher |
| 295 | #define cra_cipher cra_u.cipher | 272 | #define cra_cipher cra_u.cipher |
| 296 | #define cra_digest cra_u.digest | ||
| 297 | #define cra_hash cra_u.hash | ||
| 298 | #define cra_compress cra_u.compress | 273 | #define cra_compress cra_u.compress |
| 299 | #define cra_rng cra_u.rng | 274 | #define cra_rng cra_u.rng |
| 300 | 275 | ||
| @@ -320,8 +295,6 @@ struct crypto_alg { | |||
| 320 | struct aead_alg aead; | 295 | struct aead_alg aead; |
| 321 | struct blkcipher_alg blkcipher; | 296 | struct blkcipher_alg blkcipher; |
| 322 | struct cipher_alg cipher; | 297 | struct cipher_alg cipher; |
| 323 | struct digest_alg digest; | ||
| 324 | struct hash_alg hash; | ||
| 325 | struct compress_alg compress; | 298 | struct compress_alg compress; |
| 326 | struct rng_alg rng; | 299 | struct rng_alg rng; |
| 327 | } cra_u; | 300 | } cra_u; |
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index 5de4c9e5856d..d7cecc90ed34 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
| @@ -126,7 +126,9 @@ extern int free_irte(int irq); | |||
| 126 | extern int irq_remapped(int irq); | 126 | extern int irq_remapped(int irq); |
| 127 | extern struct intel_iommu *map_dev_to_ir(struct pci_dev *dev); | 127 | extern struct intel_iommu *map_dev_to_ir(struct pci_dev *dev); |
| 128 | extern struct intel_iommu *map_ioapic_to_ir(int apic); | 128 | extern struct intel_iommu *map_ioapic_to_ir(int apic); |
| 129 | extern struct intel_iommu *map_hpet_to_ir(u8 id); | ||
| 129 | extern int set_ioapic_sid(struct irte *irte, int apic); | 130 | extern int set_ioapic_sid(struct irte *irte, int apic); |
| 131 | extern int set_hpet_sid(struct irte *irte, u8 id); | ||
| 130 | extern int set_msi_sid(struct irte *irte, struct pci_dev *dev); | 132 | extern int set_msi_sid(struct irte *irte, struct pci_dev *dev); |
| 131 | #else | 133 | #else |
| 132 | static inline int alloc_irte(struct intel_iommu *iommu, int irq, u16 count) | 134 | static inline int alloc_irte(struct intel_iommu *iommu, int irq, u16 count) |
| @@ -158,10 +160,18 @@ static inline struct intel_iommu *map_ioapic_to_ir(int apic) | |||
| 158 | { | 160 | { |
| 159 | return NULL; | 161 | return NULL; |
| 160 | } | 162 | } |
| 163 | static inline struct intel_iommu *map_hpet_to_ir(unsigned int hpet_id) | ||
| 164 | { | ||
| 165 | return NULL; | ||
| 166 | } | ||
| 161 | static inline int set_ioapic_sid(struct irte *irte, int apic) | 167 | static inline int set_ioapic_sid(struct irte *irte, int apic) |
| 162 | { | 168 | { |
| 163 | return 0; | 169 | return 0; |
| 164 | } | 170 | } |
| 171 | static inline int set_hpet_sid(struct irte *irte, u8 id) | ||
| 172 | { | ||
| 173 | return -1; | ||
| 174 | } | ||
| 165 | static inline int set_msi_sid(struct irte *irte, struct pci_dev *dev) | 175 | static inline int set_msi_sid(struct irte *irte, struct pci_dev *dev) |
| 166 | { | 176 | { |
| 167 | return 0; | 177 | return 0; |
diff --git a/include/linux/hpet.h b/include/linux/hpet.h index 79f63a27bcef..219ca4f6bea6 100644 --- a/include/linux/hpet.h +++ b/include/linux/hpet.h | |||
| @@ -126,4 +126,6 @@ struct hpet_info { | |||
| 126 | #define HPET_DPI _IO('h', 0x05) /* disable periodic */ | 126 | #define HPET_DPI _IO('h', 0x05) /* disable periodic */ |
| 127 | #define HPET_IRQFREQ _IOW('h', 0x6, unsigned long) /* IRQFREQ usec */ | 127 | #define HPET_IRQFREQ _IOW('h', 0x6, unsigned long) /* IRQFREQ usec */ |
| 128 | 128 | ||
| 129 | #define MAX_HPET_TBS 8 /* maximum hpet timer blocks */ | ||
| 130 | |||
| 129 | #endif /* !__HPET__ */ | 131 | #endif /* !__HPET__ */ |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index ff037f0b1b4e..9bace4b9f4fe 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
| @@ -446,7 +446,7 @@ extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | |||
| 446 | 446 | ||
| 447 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | 447 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) |
| 448 | { | 448 | { |
| 449 | if (likely(!timer->start_site)) | 449 | if (likely(!timer_stats_active)) |
| 450 | return; | 450 | return; |
| 451 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | 451 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, |
| 452 | timer->function, timer->start_comm, 0); | 452 | timer->function, timer->start_comm, 0); |
| @@ -457,8 +457,6 @@ extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, | |||
| 457 | 457 | ||
| 458 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) | 458 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) |
| 459 | { | 459 | { |
| 460 | if (likely(!timer_stats_active)) | ||
| 461 | return; | ||
| 462 | __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); | 460 | __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); |
| 463 | } | 461 | } |
| 464 | 462 | ||
diff --git a/include/linux/hw_random.h b/include/linux/hw_random.h index 7244456e7e65..9bede7633f74 100644 --- a/include/linux/hw_random.h +++ b/include/linux/hw_random.h | |||
| @@ -22,10 +22,12 @@ | |||
| 22 | * @cleanup: Cleanup callback (can be NULL). | 22 | * @cleanup: Cleanup callback (can be NULL). |
| 23 | * @data_present: Callback to determine if data is available | 23 | * @data_present: Callback to determine if data is available |
| 24 | * on the RNG. If NULL, it is assumed that | 24 | * on the RNG. If NULL, it is assumed that |
| 25 | * there is always data available. | 25 | * there is always data available. *OBSOLETE* |
| 26 | * @data_read: Read data from the RNG device. | 26 | * @data_read: Read data from the RNG device. |
| 27 | * Returns the number of lower random bytes in "data". | 27 | * Returns the number of lower random bytes in "data". |
| 28 | * Must not be NULL. | 28 | * Must not be NULL. *OSOLETE* |
| 29 | * @read: New API. drivers can fill up to max bytes of data | ||
| 30 | * into the buffer. The buffer is aligned for any type. | ||
| 29 | * @priv: Private data, for use by the RNG driver. | 31 | * @priv: Private data, for use by the RNG driver. |
| 30 | */ | 32 | */ |
| 31 | struct hwrng { | 33 | struct hwrng { |
| @@ -34,6 +36,7 @@ struct hwrng { | |||
| 34 | void (*cleanup)(struct hwrng *rng); | 36 | void (*cleanup)(struct hwrng *rng); |
| 35 | int (*data_present)(struct hwrng *rng, int wait); | 37 | int (*data_present)(struct hwrng *rng, int wait); |
| 36 | int (*data_read)(struct hwrng *rng, u32 *data); | 38 | int (*data_read)(struct hwrng *rng, u32 *data); |
| 39 | int (*read)(struct hwrng *rng, void *data, size_t max, bool wait); | ||
| 37 | unsigned long priv; | 40 | unsigned long priv; |
| 38 | 41 | ||
| 39 | /* internal. */ | 42 | /* internal. */ |
diff --git a/include/linux/input/sh_keysc.h b/include/linux/input/sh_keysc.h new file mode 100644 index 000000000000..c211b5cf08e6 --- /dev/null +++ b/include/linux/input/sh_keysc.h | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | #ifndef __SH_KEYSC_H__ | ||
| 2 | #define __SH_KEYSC_H__ | ||
| 3 | |||
| 4 | #define SH_KEYSC_MAXKEYS 30 | ||
| 5 | |||
| 6 | struct sh_keysc_info { | ||
| 7 | enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3 } mode; | ||
| 8 | int scan_timing; /* 0 -> 7, see KYCR1, SCN[2:0] */ | ||
| 9 | int delay; | ||
| 10 | int kycr2_delay; | ||
| 11 | int keycodes[SH_KEYSC_MAXKEYS]; | ||
| 12 | }; | ||
| 13 | |||
| 14 | #endif /* __SH_KEYSC_H__ */ | ||
diff --git a/include/linux/mfd/sh_mobile_sdhi.h b/include/linux/mfd/sh_mobile_sdhi.h new file mode 100644 index 000000000000..3bcd7163485c --- /dev/null +++ b/include/linux/mfd/sh_mobile_sdhi.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #ifndef __SH_MOBILE_SDHI_H__ | ||
| 2 | #define __SH_MOBILE_SDHI_H__ | ||
| 3 | |||
| 4 | struct sh_mobile_sdhi_info { | ||
| 5 | void (*set_pwr)(struct platform_device *pdev, int state); | ||
| 6 | }; | ||
| 7 | |||
| 8 | #endif /* __SH_MOBILE_SDHI_H__ */ | ||
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index dd31e7bae35c..a05b4a20768d 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
| @@ -52,11 +52,63 @@ | |||
| 52 | #define REISERFS_IOC32_GETVERSION FS_IOC32_GETVERSION | 52 | #define REISERFS_IOC32_GETVERSION FS_IOC32_GETVERSION |
| 53 | #define REISERFS_IOC32_SETVERSION FS_IOC32_SETVERSION | 53 | #define REISERFS_IOC32_SETVERSION FS_IOC32_SETVERSION |
| 54 | 54 | ||
| 55 | /* Locking primitives */ | 55 | /* |
| 56 | /* Right now we are still falling back to (un)lock_kernel, but eventually that | 56 | * Locking primitives. The write lock is a per superblock |
| 57 | would evolve into real per-fs locks */ | 57 | * special mutex that has properties close to the Big Kernel Lock |
| 58 | #define reiserfs_write_lock( sb ) lock_kernel() | 58 | * which was used in the previous locking scheme. |
| 59 | #define reiserfs_write_unlock( sb ) unlock_kernel() | 59 | */ |
| 60 | void reiserfs_write_lock(struct super_block *s); | ||
| 61 | void reiserfs_write_unlock(struct super_block *s); | ||
| 62 | int reiserfs_write_lock_once(struct super_block *s); | ||
| 63 | void reiserfs_write_unlock_once(struct super_block *s, int lock_depth); | ||
| 64 | |||
| 65 | /* | ||
| 66 | * Several mutexes depend on the write lock. | ||
| 67 | * However sometimes we want to relax the write lock while we hold | ||
| 68 | * these mutexes, according to the release/reacquire on schedule() | ||
| 69 | * properties of the Bkl that were used. | ||
| 70 | * Reiserfs performances and locking were based on this scheme. | ||
| 71 | * Now that the write lock is a mutex and not the bkl anymore, doing so | ||
| 72 | * may result in a deadlock: | ||
| 73 | * | ||
| 74 | * A acquire write_lock | ||
| 75 | * A acquire j_commit_mutex | ||
| 76 | * A release write_lock and wait for something | ||
| 77 | * B acquire write_lock | ||
| 78 | * B can't acquire j_commit_mutex and sleep | ||
| 79 | * A can't acquire write lock anymore | ||
| 80 | * deadlock | ||
| 81 | * | ||
| 82 | * What we do here is avoiding such deadlock by playing the same game | ||
| 83 | * than the Bkl: if we can't acquire a mutex that depends on the write lock, | ||
| 84 | * we release the write lock, wait a bit and then retry. | ||
| 85 | * | ||
| 86 | * The mutexes concerned by this hack are: | ||
| 87 | * - The commit mutex of a journal list | ||
| 88 | * - The flush mutex | ||
| 89 | * - The journal lock | ||
| 90 | * - The inode mutex | ||
| 91 | */ | ||
| 92 | static inline void reiserfs_mutex_lock_safe(struct mutex *m, | ||
| 93 | struct super_block *s) | ||
| 94 | { | ||
| 95 | reiserfs_write_unlock(s); | ||
| 96 | mutex_lock(m); | ||
| 97 | reiserfs_write_lock(s); | ||
| 98 | } | ||
| 99 | |||
| 100 | /* | ||
| 101 | * When we schedule, we usually want to also release the write lock, | ||
| 102 | * according to the previous bkl based locking scheme of reiserfs. | ||
| 103 | */ | ||
| 104 | static inline void reiserfs_cond_resched(struct super_block *s) | ||
| 105 | { | ||
| 106 | if (need_resched()) { | ||
| 107 | reiserfs_write_unlock(s); | ||
| 108 | schedule(); | ||
| 109 | reiserfs_write_lock(s); | ||
| 110 | } | ||
| 111 | } | ||
| 60 | 112 | ||
| 61 | struct fid; | 113 | struct fid; |
| 62 | 114 | ||
| @@ -1329,7 +1381,11 @@ static inline loff_t max_reiserfs_offset(struct inode *inode) | |||
| 1329 | #define get_generation(s) atomic_read (&fs_generation(s)) | 1381 | #define get_generation(s) atomic_read (&fs_generation(s)) |
| 1330 | #define FILESYSTEM_CHANGED_TB(tb) (get_generation((tb)->tb_sb) != (tb)->fs_gen) | 1382 | #define FILESYSTEM_CHANGED_TB(tb) (get_generation((tb)->tb_sb) != (tb)->fs_gen) |
| 1331 | #define __fs_changed(gen,s) (gen != get_generation (s)) | 1383 | #define __fs_changed(gen,s) (gen != get_generation (s)) |
| 1332 | #define fs_changed(gen,s) ({cond_resched(); __fs_changed(gen, s);}) | 1384 | #define fs_changed(gen,s) \ |
| 1385 | ({ \ | ||
| 1386 | reiserfs_cond_resched(s); \ | ||
| 1387 | __fs_changed(gen, s); \ | ||
| 1388 | }) | ||
| 1333 | 1389 | ||
| 1334 | /***************************************************************************/ | 1390 | /***************************************************************************/ |
| 1335 | /* FIXATE NODES */ | 1391 | /* FIXATE NODES */ |
| @@ -2258,8 +2314,7 @@ __u32 r5_hash(const signed char *msg, int len); | |||
| 2258 | #define SPARE_SPACE 500 | 2314 | #define SPARE_SPACE 500 |
| 2259 | 2315 | ||
| 2260 | /* prototypes from ioctl.c */ | 2316 | /* prototypes from ioctl.c */ |
| 2261 | int reiserfs_ioctl(struct inode *inode, struct file *filp, | 2317 | long reiserfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); |
| 2262 | unsigned int cmd, unsigned long arg); | ||
| 2263 | long reiserfs_compat_ioctl(struct file *filp, | 2318 | long reiserfs_compat_ioctl(struct file *filp, |
| 2264 | unsigned int cmd, unsigned long arg); | 2319 | unsigned int cmd, unsigned long arg); |
| 2265 | int reiserfs_unpack(struct inode *inode, struct file *filp); | 2320 | int reiserfs_unpack(struct inode *inode, struct file *filp); |
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index dab68bbed675..52c83b6a758a 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h | |||
| @@ -7,6 +7,8 @@ | |||
| 7 | #ifdef __KERNEL__ | 7 | #ifdef __KERNEL__ |
| 8 | #include <linux/workqueue.h> | 8 | #include <linux/workqueue.h> |
| 9 | #include <linux/rwsem.h> | 9 | #include <linux/rwsem.h> |
| 10 | #include <linux/mutex.h> | ||
| 11 | #include <linux/sched.h> | ||
| 10 | #endif | 12 | #endif |
| 11 | 13 | ||
| 12 | typedef enum { | 14 | typedef enum { |
| @@ -355,6 +357,13 @@ struct reiserfs_sb_info { | |||
| 355 | struct reiserfs_journal *s_journal; /* pointer to journal information */ | 357 | struct reiserfs_journal *s_journal; /* pointer to journal information */ |
| 356 | unsigned short s_mount_state; /* reiserfs state (valid, invalid) */ | 358 | unsigned short s_mount_state; /* reiserfs state (valid, invalid) */ |
| 357 | 359 | ||
| 360 | /* Serialize writers access, replace the old bkl */ | ||
| 361 | struct mutex lock; | ||
| 362 | /* Owner of the lock (can be recursive) */ | ||
| 363 | struct task_struct *lock_owner; | ||
| 364 | /* Depth of the lock, start from -1 like the bkl */ | ||
| 365 | int lock_depth; | ||
| 366 | |||
| 358 | /* Comment? -Hans */ | 367 | /* Comment? -Hans */ |
| 359 | void (*end_io_handler) (struct buffer_head *, int); | 368 | void (*end_io_handler) (struct buffer_head *, int); |
| 360 | hashf_t s_hash_function; /* pointer to function which is used | 369 | hashf_t s_hash_function; /* pointer to function which is used |
| @@ -408,6 +417,17 @@ struct reiserfs_sb_info { | |||
| 408 | char *s_qf_names[MAXQUOTAS]; | 417 | char *s_qf_names[MAXQUOTAS]; |
| 409 | int s_jquota_fmt; | 418 | int s_jquota_fmt; |
| 410 | #endif | 419 | #endif |
| 420 | #ifdef CONFIG_REISERFS_CHECK | ||
| 421 | |||
| 422 | struct tree_balance *cur_tb; /* | ||
| 423 | * Detects whether more than one | ||
| 424 | * copy of tb exists per superblock | ||
| 425 | * as a means of checking whether | ||
| 426 | * do_balance is executing concurrently | ||
| 427 | * against another tree reader/writer | ||
| 428 | * on a same mount point. | ||
| 429 | */ | ||
| 430 | #endif | ||
| 411 | }; | 431 | }; |
| 412 | 432 | ||
| 413 | /* Definitions of reiserfs on-disk properties: */ | 433 | /* Definitions of reiserfs on-disk properties: */ |
diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h index 68e212ff9dde..4ef246f14654 100644 --- a/include/linux/sh_intc.h +++ b/include/linux/sh_intc.h | |||
| @@ -57,10 +57,8 @@ struct intc_desc { | |||
| 57 | struct intc_sense_reg *sense_regs; | 57 | struct intc_sense_reg *sense_regs; |
| 58 | unsigned int nr_sense_regs; | 58 | unsigned int nr_sense_regs; |
| 59 | char *name; | 59 | char *name; |
| 60 | #if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A) | ||
| 61 | struct intc_mask_reg *ack_regs; | 60 | struct intc_mask_reg *ack_regs; |
| 62 | unsigned int nr_ack_regs; | 61 | unsigned int nr_ack_regs; |
| 63 | #endif | ||
| 64 | }; | 62 | }; |
| 65 | 63 | ||
| 66 | #define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a) | 64 | #define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a) |
| @@ -73,7 +71,6 @@ struct intc_desc symbol __initdata = { \ | |||
| 73 | chipname, \ | 71 | chipname, \ |
| 74 | } | 72 | } |
| 75 | 73 | ||
| 76 | #if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A) | ||
| 77 | #define DECLARE_INTC_DESC_ACK(symbol, chipname, vectors, groups, \ | 74 | #define DECLARE_INTC_DESC_ACK(symbol, chipname, vectors, groups, \ |
| 78 | mask_regs, prio_regs, sense_regs, ack_regs) \ | 75 | mask_regs, prio_regs, sense_regs, ack_regs) \ |
| 79 | struct intc_desc symbol __initdata = { \ | 76 | struct intc_desc symbol __initdata = { \ |
| @@ -83,9 +80,11 @@ struct intc_desc symbol __initdata = { \ | |||
| 83 | chipname, \ | 80 | chipname, \ |
| 84 | _INTC_ARRAY(ack_regs), \ | 81 | _INTC_ARRAY(ack_regs), \ |
| 85 | } | 82 | } |
| 86 | #endif | ||
| 87 | 83 | ||
| 88 | void __init register_intc_controller(struct intc_desc *desc); | 84 | void __init register_intc_controller(struct intc_desc *desc); |
| 89 | int intc_set_priority(unsigned int irq, unsigned int prio); | 85 | int intc_set_priority(unsigned int irq, unsigned int prio); |
| 90 | 86 | ||
| 87 | int reserve_irq_vector(unsigned int irq); | ||
| 88 | void reserve_irq_legacy(void); | ||
| 89 | |||
| 91 | #endif /* __SH_INTC_H */ | 90 | #endif /* __SH_INTC_H */ |
diff --git a/include/linux/sh_pfc.h b/include/linux/sh_pfc.h new file mode 100644 index 000000000000..07c08af9f8f6 --- /dev/null +++ b/include/linux/sh_pfc.h | |||
| @@ -0,0 +1,96 @@ | |||
| 1 | /* | ||
| 2 | * SuperH Pin Function Controller Support | ||
| 3 | * | ||
| 4 | * Copyright (c) 2008 Magnus Damm | ||
| 5 | * | ||
| 6 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 7 | * License. See the file "COPYING" in the main directory of this archive | ||
| 8 | * for more details. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __SH_PFC_H | ||
| 12 | #define __SH_PFC_H | ||
| 13 | |||
| 14 | #include <asm-generic/gpio.h> | ||
| 15 | |||
| 16 | typedef unsigned short pinmux_enum_t; | ||
| 17 | typedef unsigned short pinmux_flag_t; | ||
| 18 | |||
| 19 | #define PINMUX_TYPE_NONE 0 | ||
| 20 | #define PINMUX_TYPE_FUNCTION 1 | ||
| 21 | #define PINMUX_TYPE_GPIO 2 | ||
| 22 | #define PINMUX_TYPE_OUTPUT 3 | ||
| 23 | #define PINMUX_TYPE_INPUT 4 | ||
| 24 | #define PINMUX_TYPE_INPUT_PULLUP 5 | ||
| 25 | #define PINMUX_TYPE_INPUT_PULLDOWN 6 | ||
| 26 | |||
| 27 | #define PINMUX_FLAG_TYPE (0x7) | ||
| 28 | #define PINMUX_FLAG_WANT_PULLUP (1 << 3) | ||
| 29 | #define PINMUX_FLAG_WANT_PULLDOWN (1 << 4) | ||
| 30 | |||
| 31 | #define PINMUX_FLAG_DBIT_SHIFT 5 | ||
| 32 | #define PINMUX_FLAG_DBIT (0x1f << PINMUX_FLAG_DBIT_SHIFT) | ||
| 33 | #define PINMUX_FLAG_DREG_SHIFT 10 | ||
| 34 | #define PINMUX_FLAG_DREG (0x3f << PINMUX_FLAG_DREG_SHIFT) | ||
| 35 | |||
| 36 | struct pinmux_gpio { | ||
| 37 | pinmux_enum_t enum_id; | ||
| 38 | pinmux_flag_t flags; | ||
| 39 | }; | ||
| 40 | |||
| 41 | #define PINMUX_GPIO(gpio, data_or_mark) [gpio] = { data_or_mark } | ||
| 42 | #define PINMUX_DATA(data_or_mark, ids...) data_or_mark, ids, 0 | ||
| 43 | |||
| 44 | struct pinmux_cfg_reg { | ||
| 45 | unsigned long reg, reg_width, field_width; | ||
| 46 | unsigned long *cnt; | ||
| 47 | pinmux_enum_t *enum_ids; | ||
| 48 | }; | ||
| 49 | |||
| 50 | #define PINMUX_CFG_REG(name, r, r_width, f_width) \ | ||
| 51 | .reg = r, .reg_width = r_width, .field_width = f_width, \ | ||
| 52 | .cnt = (unsigned long [r_width / f_width]) {}, \ | ||
| 53 | .enum_ids = (pinmux_enum_t [(r_width / f_width) * (1 << f_width)]) \ | ||
| 54 | |||
| 55 | struct pinmux_data_reg { | ||
| 56 | unsigned long reg, reg_width, reg_shadow; | ||
| 57 | pinmux_enum_t *enum_ids; | ||
| 58 | }; | ||
| 59 | |||
| 60 | #define PINMUX_DATA_REG(name, r, r_width) \ | ||
| 61 | .reg = r, .reg_width = r_width, \ | ||
| 62 | .enum_ids = (pinmux_enum_t [r_width]) \ | ||
| 63 | |||
| 64 | struct pinmux_range { | ||
| 65 | pinmux_enum_t begin; | ||
| 66 | pinmux_enum_t end; | ||
| 67 | pinmux_enum_t force; | ||
| 68 | }; | ||
| 69 | |||
| 70 | struct pinmux_info { | ||
| 71 | char *name; | ||
| 72 | pinmux_enum_t reserved_id; | ||
| 73 | struct pinmux_range data; | ||
| 74 | struct pinmux_range input; | ||
| 75 | struct pinmux_range input_pd; | ||
| 76 | struct pinmux_range input_pu; | ||
| 77 | struct pinmux_range output; | ||
| 78 | struct pinmux_range mark; | ||
| 79 | struct pinmux_range function; | ||
| 80 | |||
| 81 | unsigned first_gpio, last_gpio; | ||
| 82 | |||
| 83 | struct pinmux_gpio *gpios; | ||
| 84 | struct pinmux_cfg_reg *cfg_regs; | ||
| 85 | struct pinmux_data_reg *data_regs; | ||
| 86 | |||
| 87 | pinmux_enum_t *gpio_data; | ||
| 88 | unsigned int gpio_data_size; | ||
| 89 | |||
| 90 | unsigned long *gpio_in_use; | ||
| 91 | struct gpio_chip chip; | ||
| 92 | }; | ||
| 93 | |||
| 94 | int register_pinmux(struct pinmux_info *pip); | ||
| 95 | |||
| 96 | #endif /* __SH_PFC_H */ | ||
diff --git a/include/linux/tick.h b/include/linux/tick.h index 0482229c07db..d2ae79e21be3 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h | |||
| @@ -43,6 +43,7 @@ enum tick_nohz_mode { | |||
| 43 | * @idle_exittime: Time when the idle state was left | 43 | * @idle_exittime: Time when the idle state was left |
| 44 | * @idle_sleeptime: Sum of the time slept in idle with sched tick stopped | 44 | * @idle_sleeptime: Sum of the time slept in idle with sched tick stopped |
| 45 | * @sleep_length: Duration of the current idle sleep | 45 | * @sleep_length: Duration of the current idle sleep |
| 46 | * @do_timer_lst: CPU was the last one doing do_timer before going idle | ||
| 46 | */ | 47 | */ |
| 47 | struct tick_sched { | 48 | struct tick_sched { |
| 48 | struct hrtimer sched_timer; | 49 | struct hrtimer sched_timer; |
| @@ -64,6 +65,7 @@ struct tick_sched { | |||
| 64 | unsigned long last_jiffies; | 65 | unsigned long last_jiffies; |
| 65 | unsigned long next_jiffies; | 66 | unsigned long next_jiffies; |
| 66 | ktime_t idle_expires; | 67 | ktime_t idle_expires; |
| 68 | int do_timer_last; | ||
| 67 | }; | 69 | }; |
| 68 | 70 | ||
| 69 | extern void __init tick_init(void); | 71 | extern void __init tick_init(void); |
| @@ -98,6 +100,9 @@ extern int tick_check_oneshot_change(int allow_nohz); | |||
| 98 | extern struct tick_sched *tick_get_tick_sched(int cpu); | 100 | extern struct tick_sched *tick_get_tick_sched(int cpu); |
| 99 | extern void tick_check_idle(int cpu); | 101 | extern void tick_check_idle(int cpu); |
| 100 | extern int tick_oneshot_mode_active(void); | 102 | extern int tick_oneshot_mode_active(void); |
| 103 | # ifndef arch_needs_cpu | ||
| 104 | # define arch_needs_cpu(cpu) (0) | ||
| 105 | # endif | ||
| 101 | # else | 106 | # else |
| 102 | static inline void tick_clock_notify(void) { } | 107 | static inline void tick_clock_notify(void) { } |
| 103 | static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } | 108 | static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } |
diff --git a/include/linux/time.h b/include/linux/time.h index fe04e5ef6a59..6e026e45a179 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
| @@ -148,6 +148,7 @@ extern void monotonic_to_bootbased(struct timespec *ts); | |||
| 148 | 148 | ||
| 149 | extern struct timespec timespec_trunc(struct timespec t, unsigned gran); | 149 | extern struct timespec timespec_trunc(struct timespec t, unsigned gran); |
| 150 | extern int timekeeping_valid_for_hres(void); | 150 | extern int timekeeping_valid_for_hres(void); |
| 151 | extern u64 timekeeping_max_deferment(void); | ||
| 151 | extern void update_wall_time(void); | 152 | extern void update_wall_time(void); |
| 152 | extern void update_xtime_cache(u64 nsec); | 153 | extern void update_xtime_cache(u64 nsec); |
| 153 | extern void timekeeping_leap_insert(int leapsecond); | 154 | extern void timekeeping_leap_insert(int leapsecond); |
diff --git a/include/linux/timex.h b/include/linux/timex.h index e6967d10d9e5..94f8faecdcbc 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
| @@ -115,13 +115,16 @@ struct timex { | |||
| 115 | #define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */ | 115 | #define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */ |
| 116 | #endif | 116 | #endif |
| 117 | 117 | ||
| 118 | /* xntp 3.4 compatibility names */ | 118 | /* NTP userland likes the MOD_ prefix better */ |
| 119 | #define MOD_OFFSET ADJ_OFFSET | 119 | #define MOD_OFFSET ADJ_OFFSET |
| 120 | #define MOD_FREQUENCY ADJ_FREQUENCY | 120 | #define MOD_FREQUENCY ADJ_FREQUENCY |
| 121 | #define MOD_MAXERROR ADJ_MAXERROR | 121 | #define MOD_MAXERROR ADJ_MAXERROR |
| 122 | #define MOD_ESTERROR ADJ_ESTERROR | 122 | #define MOD_ESTERROR ADJ_ESTERROR |
| 123 | #define MOD_STATUS ADJ_STATUS | 123 | #define MOD_STATUS ADJ_STATUS |
| 124 | #define MOD_TIMECONST ADJ_TIMECONST | 124 | #define MOD_TIMECONST ADJ_TIMECONST |
| 125 | #define MOD_TAI ADJ_TAI | ||
| 126 | #define MOD_MICRO ADJ_MICRO | ||
| 127 | #define MOD_NANO ADJ_NANO | ||
| 125 | 128 | ||
| 126 | 129 | ||
| 127 | /* | 130 | /* |
| @@ -261,11 +264,7 @@ static inline int ntp_synced(void) | |||
| 261 | 264 | ||
| 262 | #define NTP_SCALE_SHIFT 32 | 265 | #define NTP_SCALE_SHIFT 32 |
| 263 | 266 | ||
| 264 | #ifdef CONFIG_NO_HZ | ||
| 265 | #define NTP_INTERVAL_FREQ (2) | ||
| 266 | #else | ||
| 267 | #define NTP_INTERVAL_FREQ (HZ) | 267 | #define NTP_INTERVAL_FREQ (HZ) |
| 268 | #endif | ||
| 269 | #define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ) | 268 | #define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ) |
| 270 | 269 | ||
| 271 | /* Returns how long ticks are at present, in ns / 2^NTP_SCALE_SHIFT. */ | 270 | /* Returns how long ticks are at present, in ns / 2^NTP_SCALE_SHIFT. */ |
