android_kernel_xiaomi_sm8350/arch/x86/include/asm
David Howells 9b8de7479d FRV: Fix the section attribute on UP DECLARE_PER_CPU()
In non-SMP mode, the variable section attribute specified by DECLARE_PER_CPU()
does not agree with that specified by DEFINE_PER_CPU().  This means that
architectures that have a small data section references relative to a base
register may throw up linkage errors due to too great a displacement between
where the base register points and the per-CPU variable.

On FRV, the .h declaration says that the variable is in the .sdata section, but
the .c definition says it's actually in the .data section.  The linker throws
up the following errors:

kernel/built-in.o: In function `release_task':
kernel/exit.c:78: relocation truncated to fit: R_FRV_GPREL12 against symbol `per_cpu__process_counts' defined in .data section in kernel/built-in.o
kernel/exit.c:78: relocation truncated to fit: R_FRV_GPREL12 against symbol `per_cpu__process_counts' defined in .data section in kernel/built-in.o

To fix this, DECLARE_PER_CPU() should simply apply the same section attribute
as does DEFINE_PER_CPU().  However, this is made slightly more complex by
virtue of the fact that there are several variants on DEFINE, so these need to
be matched by variants on DECLARE.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-21 19:39:59 -07:00
..
uv x86: UV BAU messaging timeouts 2009-04-03 18:25:27 +02:00
visws
xen Xen: Add virt_to_pfn helper function 2009-04-08 11:51:46 -07:00
a.out-core.h
a.out.h
acpi.h
aes.h
agp.h
alternative-asm.h
alternative.h
amd_iommu_types.h
amd_iommu.h
apic.h x2apic/intr-remap: decouple interrupt remapping from x2apic 2009-04-04 10:42:28 +01:00
apicdef.h
apicnum.h
apm.h
asm.h
atomic_32.h
atomic_64.h
atomic.h
auxvec.h
bios_ebda.h
bitops.h
boot.h
bootparam.h
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h Merge branch 'tracing/core-v2' into tracing-for-linus 2009-04-02 00:49:02 +02:00
calgary.h
calling.h
checksum_32.h
checksum_64.h
checksum.h
cmpxchg_32.h
cmpxchg_64.h
cmpxchg.h
compat.h
cpu_debug.h x86: cpu_debug remove execute permission 2009-04-09 06:34:02 +02:00
cpu.h
cpufeature.h x86 ACPI: Add support for Always Running APIC timer 2009-04-07 18:17:51 -04:00
cpumask.h
cputime.h
current.h
debugreg.h
delay.h
desc_defs.h
desc.h FRV: Fix the section attribute on UP DECLARE_PER_CPU() 2009-04-21 19:39:59 -07:00
device.h
div64.h
dma-mapping.h dma-mapping: replace all DMA_24BIT_MASK macro with DMA_BIT_MASK(24) 2009-04-07 08:31:12 -07:00
dma.h
dmi.h
do_timer.h
ds.h
dwarf2.h
e820.h
edac.h
efi.h
elf.h
emergency-restart.h
entry_arch.h
errno.h
fb.h
fcntl.h
fixmap.h x86: fix set_fixmap to use phys_addr_t 2009-04-10 20:27:13 +02:00
floppy.h
frame.h
ftrace.h
futex.h
gart.h
genapic.h
geode.h
gpio.h
hardirq.h FRV: Fix the section attribute on UP DECLARE_PER_CPU() 2009-04-21 19:39:59 -07:00
highmem.h
hpet.h
hugetlb.h
hw_irq.h
hypertransport.h
hypervisor.h
i387.h
i8253.h
i8259.h
ia32_unistd.h
ia32.h
idle.h
init.h
intel_arch_perfmon.h
io_32.h
io_64.h
io_apic.h Intel IOMMU Suspend/Resume Support - Interrupt Remapping 2009-04-03 21:45:59 +01:00
io.h x86: fix set_fixmap to use phys_addr_t 2009-04-10 20:27:13 +02:00
ioctl.h
ioctls.h
iomap.h
iommu.h
ipcbuf.h
ipi.h
irq_regs.h
irq_remapping.h
irq_vectors.h
irq.h
irqflags.h
ist.h
k8.h
Kbuild
kdebug.h
kexec.h
kgdb.h
kmap_types.h
kprobes.h
kvm_host.h
kvm_para.h
kvm_x86_emulate.h
kvm.h
ldt.h
lguest_hcall.h lguest: fix guest crash on non-linear addresses in gdt pvops 2009-04-19 23:14:01 +09:30
lguest.h
linkage.h
local.h
mach_timer.h
mach_traps.h
math_emu.h
mc146818rtc.h
mca_dma.h
mca.h
mce.h
microcode.h
mman.h
mmconfig.h
mmu_context.h
mmu.h
mmx.h
mmzone_32.h
mmzone_64.h
mmzone.h
module.h
mpspec_def.h
mpspec.h
msgbuf.h
msidef.h
msr-index.h
msr.h
mtrr.h
mutex_32.h
mutex_64.h
mutex.h
nmi.h
nops.h
numa_32.h
numa_64.h
numa.h
numaq.h
olpc.h
page_32_types.h
page_32.h
page_64_types.h
page_64.h
page_types.h
page.h
param.h
paravirt.h x86: fix set_fixmap to use phys_addr_t 2009-04-10 20:27:13 +02:00
parport.h
pat.h x86, PAT: Remove duplicate memtype reserve in devmem mmap 2009-04-10 13:55:48 +02:00
pci_64.h x86/dma: unify definition of pci_unmap_addr* and pci_unmap_len macros 2009-04-03 13:13:45 +02:00
pci_x86.h
pci-direct.h
pci-functions.h
pci.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask 2009-04-05 10:33:07 -07:00
percpu.h
pgalloc.h
pgtable_32_types.h
pgtable_32.h
pgtable_64_types.h
pgtable_64.h
pgtable_types.h
pgtable-2level_types.h
pgtable-2level.h
pgtable-3level_types.h
pgtable-3level.h
pgtable.h
poll.h
posix_types_32.h
posix_types_64.h
posix_types.h
prctl.h
processor-cyrix.h
processor-flags.h
processor.h FRV: Fix the section attribute on UP DECLARE_PER_CPU() 2009-04-21 19:39:59 -07:00
proto.h
ptrace-abi.h
ptrace.h
pvclock-abi.h
pvclock.h
rdc321x_defs.h
reboot_fixups.h
reboot.h
required-features.h x86-64: remove PGE from must-have feature list 2009-04-08 11:51:46 -07:00
resource.h
resume-trace.h
rio.h
rtc.h
rwlock.h
rwsem.h
scatterlist.h
seccomp_32.h
seccomp_64.h
seccomp.h
sections.h
segment.h
sembuf.h
serial.h
setup_arch.h
setup.h
shmbuf.h
shmparam.h
sigcontext32.h
sigcontext.h x86: add linux kernel support for YMM state 2009-04-12 13:08:56 +02:00
sigframe.h
siginfo.h
signal.h
smp.h
smpboot_hooks.h
socket.h
sockios.h
sparsemem.h
spinlock_types.h
spinlock.h Allow rwlocks to re-enable interrupts 2009-04-02 19:05:11 -07:00
srat.h
stackprotector.h
stacktrace.h
stat.h
statfs.h
string_32.h
string_64.h
string.h
suspend_32.h pm: cleanup includes 2009-04-01 08:59:16 -07:00
suspend_64.h
suspend.h
svm.h
swab.h
swiotlb.h
sync_bitops.h
sys_ia32.h
syscall.h
syscalls.h
system_64.h
system.h
tce.h
termbits.h
termios.h
therm_throt.h
thread_info.h
time.h
timer.h
timex.h
tlb.h
tlbflush.h FRV: Fix the section attribute on UP DECLARE_PER_CPU() 2009-04-21 19:39:59 -07:00
topology.h Merge branch 'cpumask-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-03-31 13:33:50 +10:30
trampoline.h
traps.h
tsc.h
types.h
uaccess_32.h
uaccess_64.h
uaccess.h
ucontext.h
unaligned.h
unistd_32.h preadv/pwritev: Add preadv and pwritev system calls. 2009-04-02 19:05:08 -07:00
unistd_64.h preadv/pwritev: Add preadv and pwritev system calls. 2009-04-02 19:05:08 -07:00
unistd.h
user32.h
user_32.h
user_64.h
user.h
vdso.h
vga.h
vgtod.h
virtext.h
vm86.h
vmi_time.h
vmi.h
vmware.h
vmx.h
vsyscall.h
xcr.h
xor_32.h
xor_64.h
xor.h
xsave.h x86: add linux kernel support for YMM state 2009-04-12 13:08:56 +02:00