diff options
| author | Grant Likely <grant.likely@secretlab.ca> | 2012-01-05 13:05:51 -0500 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2012-01-05 13:05:51 -0500 |
| commit | fda87903f4e9caf87e02d52768c2611e417b7efb (patch) | |
| tree | bd2f84361699651cce5661bcfe60e3fe5ee91517 /include/linux | |
| parent | 1a0703ede4493bd74f9c6b53f782b749e175a88e (diff) | |
| parent | 2de0dbc5f6830e7659083d1929f57cb88b16a3b6 (diff) | |
Merge branch 'gpio-for-grant' of git://sources.calxeda.com/kernel/linux into gpio/next
Conflicts:
drivers/gpio/gpio-pl061.c
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/amba/pl061.h | 2 | ||||
| -rw-r--r-- | include/linux/blkdev.h | 3 | ||||
| -rw-r--r-- | include/linux/clocksource.h | 11 | ||||
| -rw-r--r-- | include/linux/dma_remapping.h | 2 | ||||
| -rw-r--r-- | include/linux/lglock.h | 36 | ||||
| -rw-r--r-- | include/linux/log2.h | 1 | ||||
| -rw-r--r-- | include/linux/mmc/card.h | 6 |
7 files changed, 49 insertions, 12 deletions
diff --git a/include/linux/amba/pl061.h b/include/linux/amba/pl061.h index 2412af944f1f..fb83c0453489 100644 --- a/include/linux/amba/pl061.h +++ b/include/linux/amba/pl061.h | |||
| @@ -7,7 +7,7 @@ struct pl061_platform_data { | |||
| 7 | unsigned gpio_base; | 7 | unsigned gpio_base; |
| 8 | 8 | ||
| 9 | /* number of the first IRQ. | 9 | /* number of the first IRQ. |
| 10 | * If the IRQ functionality in not desired this must be set to NO_IRQ. | 10 | * If the IRQ functionality in not desired this must be set to 0. |
| 11 | */ | 11 | */ |
| 12 | unsigned irq_base; | 12 | unsigned irq_base; |
| 13 | 13 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index c7a6d3b5bc7b..94acd8172b5b 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -805,9 +805,6 @@ extern void blk_unprep_request(struct request *); | |||
| 805 | */ | 805 | */ |
| 806 | extern struct request_queue *blk_init_queue_node(request_fn_proc *rfn, | 806 | extern struct request_queue *blk_init_queue_node(request_fn_proc *rfn, |
| 807 | spinlock_t *lock, int node_id); | 807 | spinlock_t *lock, int node_id); |
| 808 | extern struct request_queue *blk_init_allocated_queue_node(struct request_queue *, | ||
| 809 | request_fn_proc *, | ||
| 810 | spinlock_t *, int node_id); | ||
| 811 | extern struct request_queue *blk_init_queue(request_fn_proc *, spinlock_t *); | 808 | extern struct request_queue *blk_init_queue(request_fn_proc *, spinlock_t *); |
| 812 | extern struct request_queue *blk_init_allocated_queue(struct request_queue *, | 809 | extern struct request_queue *blk_init_allocated_queue(struct request_queue *, |
| 813 | request_fn_proc *, spinlock_t *); | 810 | request_fn_proc *, spinlock_t *); |
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index c86c940d1de3..081147da0564 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
| @@ -71,7 +71,7 @@ struct timecounter { | |||
| 71 | 71 | ||
| 72 | /** | 72 | /** |
| 73 | * cyclecounter_cyc2ns - converts cycle counter cycles to nanoseconds | 73 | * cyclecounter_cyc2ns - converts cycle counter cycles to nanoseconds |
| 74 | * @tc: Pointer to cycle counter. | 74 | * @cc: Pointer to cycle counter. |
| 75 | * @cycles: Cycles | 75 | * @cycles: Cycles |
| 76 | * | 76 | * |
| 77 | * XXX - This could use some mult_lxl_ll() asm optimization. Same code | 77 | * XXX - This could use some mult_lxl_ll() asm optimization. Same code |
| @@ -114,7 +114,7 @@ extern u64 timecounter_read(struct timecounter *tc); | |||
| 114 | * time base as values returned by | 114 | * time base as values returned by |
| 115 | * timecounter_read() | 115 | * timecounter_read() |
| 116 | * @tc: Pointer to time counter. | 116 | * @tc: Pointer to time counter. |
| 117 | * @cycle: a value returned by tc->cc->read() | 117 | * @cycle_tstamp: a value returned by tc->cc->read() |
| 118 | * | 118 | * |
| 119 | * Cycle counts that are converted correctly as long as they | 119 | * Cycle counts that are converted correctly as long as they |
| 120 | * fall into the interval [-1/2 max cycle count, +1/2 max cycle count], | 120 | * fall into the interval [-1/2 max cycle count, +1/2 max cycle count], |
| @@ -156,11 +156,12 @@ extern u64 timecounter_cyc2time(struct timecounter *tc, | |||
| 156 | * @mult: cycle to nanosecond multiplier | 156 | * @mult: cycle to nanosecond multiplier |
| 157 | * @shift: cycle to nanosecond divisor (power of two) | 157 | * @shift: cycle to nanosecond divisor (power of two) |
| 158 | * @max_idle_ns: max idle time permitted by the clocksource (nsecs) | 158 | * @max_idle_ns: max idle time permitted by the clocksource (nsecs) |
| 159 | * @maxadj maximum adjustment value to mult (~11%) | 159 | * @maxadj: maximum adjustment value to mult (~11%) |
| 160 | * @flags: flags describing special properties | 160 | * @flags: flags describing special properties |
| 161 | * @archdata: arch-specific data | 161 | * @archdata: arch-specific data |
| 162 | * @suspend: suspend function for the clocksource, if necessary | 162 | * @suspend: suspend function for the clocksource, if necessary |
| 163 | * @resume: resume function for the clocksource, if necessary | 163 | * @resume: resume function for the clocksource, if necessary |
| 164 | * @cycle_last: most recent cycle counter value seen by ::read() | ||
| 164 | */ | 165 | */ |
| 165 | struct clocksource { | 166 | struct clocksource { |
| 166 | /* | 167 | /* |
| @@ -187,6 +188,7 @@ struct clocksource { | |||
| 187 | void (*suspend)(struct clocksource *cs); | 188 | void (*suspend)(struct clocksource *cs); |
| 188 | void (*resume)(struct clocksource *cs); | 189 | void (*resume)(struct clocksource *cs); |
| 189 | 190 | ||
| 191 | /* private: */ | ||
| 190 | #ifdef CONFIG_CLOCKSOURCE_WATCHDOG | 192 | #ifdef CONFIG_CLOCKSOURCE_WATCHDOG |
| 191 | /* Watchdog related data, used by the framework */ | 193 | /* Watchdog related data, used by the framework */ |
| 192 | struct list_head wd_list; | 194 | struct list_head wd_list; |
| @@ -261,6 +263,9 @@ static inline u32 clocksource_hz2mult(u32 hz, u32 shift_constant) | |||
| 261 | 263 | ||
| 262 | /** | 264 | /** |
| 263 | * clocksource_cyc2ns - converts clocksource cycles to nanoseconds | 265 | * clocksource_cyc2ns - converts clocksource cycles to nanoseconds |
| 266 | * @cycles: cycles | ||
| 267 | * @mult: cycle to nanosecond multiplier | ||
| 268 | * @shift: cycle to nanosecond divisor (power of two) | ||
| 264 | * | 269 | * |
| 265 | * Converts cycles to nanoseconds, using the given mult and shift. | 270 | * Converts cycles to nanoseconds, using the given mult and shift. |
| 266 | * | 271 | * |
diff --git a/include/linux/dma_remapping.h b/include/linux/dma_remapping.h index ef90cbd8e173..57c9a8ae4f2d 100644 --- a/include/linux/dma_remapping.h +++ b/include/linux/dma_remapping.h | |||
| @@ -31,6 +31,7 @@ extern void free_dmar_iommu(struct intel_iommu *iommu); | |||
| 31 | extern int iommu_calculate_agaw(struct intel_iommu *iommu); | 31 | extern int iommu_calculate_agaw(struct intel_iommu *iommu); |
| 32 | extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu); | 32 | extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu); |
| 33 | extern int dmar_disabled; | 33 | extern int dmar_disabled; |
| 34 | extern int intel_iommu_enabled; | ||
| 34 | #else | 35 | #else |
| 35 | static inline int iommu_calculate_agaw(struct intel_iommu *iommu) | 36 | static inline int iommu_calculate_agaw(struct intel_iommu *iommu) |
| 36 | { | 37 | { |
| @@ -44,6 +45,7 @@ static inline void free_dmar_iommu(struct intel_iommu *iommu) | |||
| 44 | { | 45 | { |
| 45 | } | 46 | } |
| 46 | #define dmar_disabled (1) | 47 | #define dmar_disabled (1) |
| 48 | #define intel_iommu_enabled (0) | ||
| 47 | #endif | 49 | #endif |
| 48 | 50 | ||
| 49 | 51 | ||
diff --git a/include/linux/lglock.h b/include/linux/lglock.h index f549056fb20b..87f402ccec55 100644 --- a/include/linux/lglock.h +++ b/include/linux/lglock.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
| 23 | #include <linux/lockdep.h> | 23 | #include <linux/lockdep.h> |
| 24 | #include <linux/percpu.h> | 24 | #include <linux/percpu.h> |
| 25 | #include <linux/cpu.h> | ||
| 25 | 26 | ||
| 26 | /* can make br locks by using local lock for read side, global lock for write */ | 27 | /* can make br locks by using local lock for read side, global lock for write */ |
| 27 | #define br_lock_init(name) name##_lock_init() | 28 | #define br_lock_init(name) name##_lock_init() |
| @@ -72,9 +73,31 @@ | |||
| 72 | 73 | ||
| 73 | #define DEFINE_LGLOCK(name) \ | 74 | #define DEFINE_LGLOCK(name) \ |
| 74 | \ | 75 | \ |
| 76 | DEFINE_SPINLOCK(name##_cpu_lock); \ | ||
| 77 | cpumask_t name##_cpus __read_mostly; \ | ||
| 75 | DEFINE_PER_CPU(arch_spinlock_t, name##_lock); \ | 78 | DEFINE_PER_CPU(arch_spinlock_t, name##_lock); \ |
| 76 | DEFINE_LGLOCK_LOCKDEP(name); \ | 79 | DEFINE_LGLOCK_LOCKDEP(name); \ |
| 77 | \ | 80 | \ |
| 81 | static int \ | ||
| 82 | name##_lg_cpu_callback(struct notifier_block *nb, \ | ||
| 83 | unsigned long action, void *hcpu) \ | ||
| 84 | { \ | ||
| 85 | switch (action & ~CPU_TASKS_FROZEN) { \ | ||
| 86 | case CPU_UP_PREPARE: \ | ||
| 87 | spin_lock(&name##_cpu_lock); \ | ||
| 88 | cpu_set((unsigned long)hcpu, name##_cpus); \ | ||
| 89 | spin_unlock(&name##_cpu_lock); \ | ||
| 90 | break; \ | ||
| 91 | case CPU_UP_CANCELED: case CPU_DEAD: \ | ||
| 92 | spin_lock(&name##_cpu_lock); \ | ||
| 93 | cpu_clear((unsigned long)hcpu, name##_cpus); \ | ||
| 94 | spin_unlock(&name##_cpu_lock); \ | ||
| 95 | } \ | ||
| 96 | return NOTIFY_OK; \ | ||
| 97 | } \ | ||
| 98 | static struct notifier_block name##_lg_cpu_notifier = { \ | ||
| 99 | .notifier_call = name##_lg_cpu_callback, \ | ||
| 100 | }; \ | ||
| 78 | void name##_lock_init(void) { \ | 101 | void name##_lock_init(void) { \ |
| 79 | int i; \ | 102 | int i; \ |
| 80 | LOCKDEP_INIT_MAP(&name##_lock_dep_map, #name, &name##_lock_key, 0); \ | 103 | LOCKDEP_INIT_MAP(&name##_lock_dep_map, #name, &name##_lock_key, 0); \ |
| @@ -83,6 +106,11 @@ | |||
| 83 | lock = &per_cpu(name##_lock, i); \ | 106 | lock = &per_cpu(name##_lock, i); \ |
| 84 | *lock = (arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED; \ | 107 | *lock = (arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED; \ |
| 85 | } \ | 108 | } \ |
| 109 | register_hotcpu_notifier(&name##_lg_cpu_notifier); \ | ||
| 110 | get_online_cpus(); \ | ||
| 111 | for_each_online_cpu(i) \ | ||
| 112 | cpu_set(i, name##_cpus); \ | ||
| 113 | put_online_cpus(); \ | ||
| 86 | } \ | 114 | } \ |
| 87 | EXPORT_SYMBOL(name##_lock_init); \ | 115 | EXPORT_SYMBOL(name##_lock_init); \ |
| 88 | \ | 116 | \ |
| @@ -124,9 +152,9 @@ | |||
| 124 | \ | 152 | \ |
| 125 | void name##_global_lock_online(void) { \ | 153 | void name##_global_lock_online(void) { \ |
| 126 | int i; \ | 154 | int i; \ |
| 127 | preempt_disable(); \ | 155 | spin_lock(&name##_cpu_lock); \ |
| 128 | rwlock_acquire(&name##_lock_dep_map, 0, 0, _RET_IP_); \ | 156 | rwlock_acquire(&name##_lock_dep_map, 0, 0, _RET_IP_); \ |
| 129 | for_each_online_cpu(i) { \ | 157 | for_each_cpu(i, &name##_cpus) { \ |
| 130 | arch_spinlock_t *lock; \ | 158 | arch_spinlock_t *lock; \ |
| 131 | lock = &per_cpu(name##_lock, i); \ | 159 | lock = &per_cpu(name##_lock, i); \ |
| 132 | arch_spin_lock(lock); \ | 160 | arch_spin_lock(lock); \ |
| @@ -137,12 +165,12 @@ | |||
| 137 | void name##_global_unlock_online(void) { \ | 165 | void name##_global_unlock_online(void) { \ |
| 138 | int i; \ | 166 | int i; \ |
| 139 | rwlock_release(&name##_lock_dep_map, 1, _RET_IP_); \ | 167 | rwlock_release(&name##_lock_dep_map, 1, _RET_IP_); \ |
| 140 | for_each_online_cpu(i) { \ | 168 | for_each_cpu(i, &name##_cpus) { \ |
| 141 | arch_spinlock_t *lock; \ | 169 | arch_spinlock_t *lock; \ |
| 142 | lock = &per_cpu(name##_lock, i); \ | 170 | lock = &per_cpu(name##_lock, i); \ |
| 143 | arch_spin_unlock(lock); \ | 171 | arch_spin_unlock(lock); \ |
| 144 | } \ | 172 | } \ |
| 145 | preempt_enable(); \ | 173 | spin_unlock(&name##_cpu_lock); \ |
| 146 | } \ | 174 | } \ |
| 147 | EXPORT_SYMBOL(name##_global_unlock_online); \ | 175 | EXPORT_SYMBOL(name##_global_unlock_online); \ |
| 148 | \ | 176 | \ |
diff --git a/include/linux/log2.h b/include/linux/log2.h index 25b808631cd9..fd7ff3d91e6a 100644 --- a/include/linux/log2.h +++ b/include/linux/log2.h | |||
| @@ -185,7 +185,6 @@ unsigned long __rounddown_pow_of_two(unsigned long n) | |||
| 185 | #define rounddown_pow_of_two(n) \ | 185 | #define rounddown_pow_of_two(n) \ |
| 186 | ( \ | 186 | ( \ |
| 187 | __builtin_constant_p(n) ? ( \ | 187 | __builtin_constant_p(n) ? ( \ |
| 188 | (n == 1) ? 0 : \ | ||
| 189 | (1UL << ilog2(n))) : \ | 188 | (1UL << ilog2(n))) : \ |
| 190 | __rounddown_pow_of_two(n) \ | 189 | __rounddown_pow_of_two(n) \ |
| 191 | ) | 190 | ) |
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 415f2db414e1..c8ef9bc54d50 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
| @@ -218,6 +218,7 @@ struct mmc_card { | |||
| 218 | #define MMC_QUIRK_INAND_CMD38 (1<<6) /* iNAND devices have broken CMD38 */ | 218 | #define MMC_QUIRK_INAND_CMD38 (1<<6) /* iNAND devices have broken CMD38 */ |
| 219 | #define MMC_QUIRK_BLK_NO_CMD23 (1<<7) /* Avoid CMD23 for regular multiblock */ | 219 | #define MMC_QUIRK_BLK_NO_CMD23 (1<<7) /* Avoid CMD23 for regular multiblock */ |
| 220 | #define MMC_QUIRK_BROKEN_BYTE_MODE_512 (1<<8) /* Avoid sending 512 bytes in */ | 220 | #define MMC_QUIRK_BROKEN_BYTE_MODE_512 (1<<8) /* Avoid sending 512 bytes in */ |
| 221 | #define MMC_QUIRK_LONG_READ_TIME (1<<9) /* Data read time > CSD says */ | ||
| 221 | /* byte mode */ | 222 | /* byte mode */ |
| 222 | unsigned int poweroff_notify_state; /* eMMC4.5 notify feature */ | 223 | unsigned int poweroff_notify_state; /* eMMC4.5 notify feature */ |
| 223 | #define MMC_NO_POWER_NOTIFICATION 0 | 224 | #define MMC_NO_POWER_NOTIFICATION 0 |
| @@ -433,6 +434,11 @@ static inline int mmc_card_broken_byte_mode_512(const struct mmc_card *c) | |||
| 433 | return c->quirks & MMC_QUIRK_BROKEN_BYTE_MODE_512; | 434 | return c->quirks & MMC_QUIRK_BROKEN_BYTE_MODE_512; |
| 434 | } | 435 | } |
| 435 | 436 | ||
| 437 | static inline int mmc_card_long_read_time(const struct mmc_card *c) | ||
| 438 | { | ||
| 439 | return c->quirks & MMC_QUIRK_LONG_READ_TIME; | ||
| 440 | } | ||
| 441 | |||
| 436 | #define mmc_card_name(c) ((c)->cid.prod_name) | 442 | #define mmc_card_name(c) ((c)->cid.prod_name) |
| 437 | #define mmc_card_id(c) (dev_name(&(c)->dev)) | 443 | #define mmc_card_id(c) (dev_name(&(c)->dev)) |
| 438 | 444 | ||
