android_kernel_xiaomi_sm8350/net/rds
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
..
af_rds.c
bind.c
cong.c
connection.c
ib_cm.c RDS: Use spinlock to protect 64b value update on 32b archs 2009-04-02 00:52:22 -07:00
ib_rdma.c RDS: Rewrite connection cleanup, fixing oops on rmmod 2009-04-02 00:52:22 -07:00
ib_recv.c RDS: Use spinlock to protect 64b value update on 32b archs 2009-04-02 00:52:22 -07:00
ib_ring.c
ib_send.c
ib_stats.c
ib_sysctl.c
ib.c RDS: Rewrite connection cleanup, fixing oops on rmmod 2009-04-02 00:52:22 -07:00
ib.h RDS: Use spinlock to protect 64b value update on 32b archs 2009-04-02 00:52:22 -07:00
info.c
info.h
iw_cm.c RDS: Use spinlock to protect 64b value update on 32b archs 2009-04-02 00:52:22 -07:00
iw_rdma.c RDS: Rewrite connection cleanup, fixing oops on rmmod 2009-04-02 00:52:22 -07:00
iw_recv.c RDS: Use spinlock to protect 64b value update on 32b archs 2009-04-02 00:52:22 -07:00
iw_ring.c
iw_send.c
iw_stats.c
iw_sysctl.c
iw.c RDS: Rewrite connection cleanup, fixing oops on rmmod 2009-04-02 00:52:22 -07:00
iw.h RDS: Use spinlock to protect 64b value update on 32b archs 2009-04-02 00:52:22 -07:00
Kconfig
loop.c
loop.h
Makefile
message.c
page.c
rdma_transport.c
rdma_transport.h
rdma.c
rdma.h
rds.h FRV: Fix the section attribute on UP DECLARE_PER_CPU() 2009-04-21 19:39:59 -07:00
recv.c
send.c
stats.c
sysctl.c
threads.c
transport.c