Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: rcu: fix rcutorture bug rcu: eliminate synchronize_rcu_xxx macro rcu: make treercu safe for suspend and resume rcu: fix rcutree grace-period-latency bug on small systems futex: catch certain assymetric (get|put)_futex_key calls futex: make futex_(get|put)_key() calls symmetric locking, percpu counters: introduce separate lock classes swiotlb: clean up EXPORT_SYMBOL usage swiotlb: remove unnecessary declaration swiotlb: replace architecture-specific swiotlb.h with linux/swiotlb.h swiotlb: add support for systems with highmem swiotlb: store phys address in io_tlb_orig_addr array swiotlb: add hwdev to swiotlb_phys_to_bus() / swiotlb_sg_to_bus()
This commit is contained in:
@ -66,11 +66,11 @@ s64 __percpu_counter_sum(struct percpu_counter *fbc)
|
||||
}
|
||||
EXPORT_SYMBOL(__percpu_counter_sum);
|
||||
|
||||
static struct lock_class_key percpu_counter_irqsafe;
|
||||
|
||||
int percpu_counter_init(struct percpu_counter *fbc, s64 amount)
|
||||
int __percpu_counter_init(struct percpu_counter *fbc, s64 amount,
|
||||
struct lock_class_key *key)
|
||||
{
|
||||
spin_lock_init(&fbc->lock);
|
||||
lockdep_set_class(&fbc->lock, key);
|
||||
fbc->count = amount;
|
||||
fbc->counters = alloc_percpu(s32);
|
||||
if (!fbc->counters)
|
||||
@ -82,17 +82,7 @@ int percpu_counter_init(struct percpu_counter *fbc, s64 amount)
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(percpu_counter_init);
|
||||
|
||||
int percpu_counter_init_irq(struct percpu_counter *fbc, s64 amount)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = percpu_counter_init(fbc, amount);
|
||||
if (!err)
|
||||
lockdep_set_class(&fbc->lock, &percpu_counter_irqsafe);
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(__percpu_counter_init);
|
||||
|
||||
void percpu_counter_destroy(struct percpu_counter *fbc)
|
||||
{
|
||||
|
Reference in New Issue
Block a user