android_kernel_xiaomi_sm8350/include
Peter Zijlstra 3cb4f9fa0c lib: percpu_counter_sub
Hugh spotted that some code does:
  percpu_counter_add(&counter, -unsignedlong)

which, when the amount argument is of type s32, sort-of works thanks to
two's-complement. However when we'd change the type to s64 this breaks on 32bit
machines, because the promotion rules zero extend the unsigned number.

Provide percpu_counter_sub() to hide the s64 cast. That is:
  percpu_counter_sub(&counter, foo)
is equal to:
  percpu_counter_add(&counter, -(s64)foo);

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-17 08:42:44 -07:00
..
acpi
asm-alpha alpha: beautify vmlinux.lds 2007-10-16 09:43:03 -07:00
asm-arm imxfb: fast read flag and nonstandard field configurable 2007-10-16 09:43:21 -07:00
asm-avr32 kprobes: support kretprobe blacklist 2007-10-16 09:43:10 -07:00
asm-blackfin bf54x-lq043fb: framebuffer driver for Blackfin BF54x framebuffer device driver 2007-10-16 09:43:20 -07:00
asm-cris
asm-frv include/asm-frv/thread_info.h: kmalloc + memset conversion to kzalloc 2007-10-16 09:43:03 -07:00
asm-generic flush icache before set_pte() on ia64: flush icache at set_pte 2007-10-16 09:42:59 -07:00
asm-h8300
asm-ia64 Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block 2007-10-16 10:09:16 -07:00
asm-m32r m32r: convert to generic sys_ptrace 2007-10-16 09:43:04 -07:00
asm-m68k
asm-m68knommu M68KNOMMU: remove unused config symbol CONFIG_DISKtel 2007-10-16 09:43:03 -07:00
asm-mips Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2007-10-16 10:44:35 -07:00
asm-parisc
asm-powerpc powerpc: add Altivec/VMX state to coredumps 2007-10-17 08:42:44 -07:00
asm-ppc
asm-s390 kprobes: support kretprobe blacklist 2007-10-16 09:43:10 -07:00
asm-sh x86: optimize page faults like all other achitectures and kill notifier cruft 2007-10-16 09:42:50 -07:00
asm-sh64
asm-sparc SPARC: sg chaining support 2007-10-16 11:27:32 +02:00
asm-sparc64 Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block 2007-10-16 10:09:16 -07:00
asm-um uml: style fixes in FP code 2007-10-16 09:43:07 -07:00
asm-v850
asm-x86 x86: replace NT_PRXFPREG with ELF_CORE_XFPREG_TYPE #define 2007-10-17 08:42:44 -07:00
asm-xtensa
crypto
keys
linux lib: percpu_counter_sub 2007-10-17 08:42:44 -07:00
math-emu
media
mtd
net [IPV6]: Replace sk_buff ** with sk_buff * in input handlers 2007-10-15 12:50:28 -07:00
pcmcia pcmcia: use DMA_MASK_NONE for the default for all pcmcia devices 2007-10-16 09:42:50 -07:00
rdma
rxrpc
scsi remove sglist_len 2007-10-16 11:24:44 +02:00
sound [ALSA] version 1.0.15 2007-10-16 16:57:46 +02:00
video pm2fb: hardware cursor support for the Permedia2 2007-10-16 09:43:18 -07:00
xen
Kbuild