* Can't build current snapshot @ 2003-07-16 4:05 Peter Chubb 2003-07-16 4:30 ` David Mosberger 2003-07-16 6:04 ` David Mosberger 0 siblings, 2 replies; 3+ messages in thread From: Peter Chubb @ 2003-07-16 4:05 UTC (permalink / raw) To: linux-ia64 From David's BK tree as of this morning, when building for the simulator: ... LD .tmp_vmlinux1 arch/ia64/kernel/built-in.o(.text+0x962): In function `efi_init': arch/ia64/kernel/efi.c:468: relocation truncated to fit: IMM22 per_cpu__ia64_phys_stacked_size_p8 arch/ia64/kernel/built-in.o(.text+0xbe2):arch/ia64/kernel/efi.c:482: relocation truncated to fit: IMM22 per_cpu__ia64_phys_stacked_size_p8 arch/ia64/kernel/built-in.o(.text+0x3302): In function fsys_gettimeofday': : relocation truncated to fit: IMM22 per_cpu__cpu_info This is with the current cvs snapshot binutils, gcc 3.2.3 20030221 (Debian prerelease) CONFIG_SMP is *not* set, CONFIG_VIRTUAL_MEM_MAP is *not* set. -- Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au You are lost in a maze of BitKeeper repositories, all slightly different. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can't build current snapshot 2003-07-16 4:05 Can't build current snapshot Peter Chubb @ 2003-07-16 4:30 ` David Mosberger 2003-07-16 6:04 ` David Mosberger 1 sibling, 0 replies; 3+ messages in thread From: David Mosberger @ 2003-07-16 4:30 UTC (permalink / raw) To: linux-ia64 >>>>> On Wed, 16 Jul 2003 14:05:16 +1000, Peter Chubb <peter@chubb.wattle.id.au> said: >> From David's BK tree as of this morning, when building for the >> simulator: Peter> ... LD .tmp_vmlinux1 Peter> arch/ia64/kernel/built-in.o(.text+0x962): In function Peter> `efi_init': arch/ia64/kernel/efi.c:468: relocation truncated Peter> to fit: IMM22 per_cpu__ia64_phys_stacked_size_p8 Peter> arch/ia64/kernel/built-in.o(.text+0xbe2):arch/ia64/kernel/efi.c:482: Peter> relocation truncated to fit: IMM22 Peter> per_cpu__ia64_phys_stacked_size_p8 Peter> arch/ia64/kernel/built-in.o(.text+0x3302): In function Peter> fsys_gettimeofday': : relocation truncated to fit: IMM22 Peter> per_cpu__cpu_info Peter> This is with the current cvs snapshot binutils, gcc 3.2.3 Peter> 20030221 (Debian prerelease) Peter> CONFIG_SMP is *not* set, CONFIG_VIRTUAL_MEM_MAP is *not* set. You'd get this if the per-cpu area is not linked at -PER_CPU_PAGE_SIZE. Did you start with a clean tree (make mrproper)? --david ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can't build current snapshot 2003-07-16 4:05 Can't build current snapshot Peter Chubb 2003-07-16 4:30 ` David Mosberger @ 2003-07-16 6:04 ` David Mosberger 1 sibling, 0 replies; 3+ messages in thread From: David Mosberger @ 2003-07-16 6:04 UTC (permalink / raw) To: linux-ia64 >>>>> On Wed, 16 Jul 2003 15:35:20 +1000, Peter Chubb <peter@chubb.wattle.id.au> said: Peter> I've just cleared out ccache and done a make mrproper; make Peter> config; make. The same relocation errors appear. OK. Peter> There's something funny going on here, because the offending symbol is Peter> defined and used in setup.c (and entry.S), not efi.c Peter> It's put in the data section. Peter> $ nm arch/ia64/kernel/setup.o|grep ia64_phys_ Peter> 0000000000000028 G per_cpu__ia64_phys_stacked_size_p8 Peter> I'm a little suprised that it isn't in the BSS. Peter> There is no per-cpu area as such. Peter> CONFIG_SMP is not defined, so DEFINE_PER_CPU Peter> doesn't put the per_cpu variables into a separate segment Peter> From asm-ia64/percpu.h: Peter> #define DEFINE_PER_CPU(type, name) __typeof__(type) per_cpu__##name Oh, it all makes sense now. Yes, on UP we failed to put per-CPU stuff in a special section. We have to do that now, so that the variables remain "addl"-addressable. The patch below should fix the problem. Thanks for tracking this down. --david === include/asm-ia64/percpu.h 1.9 vs edited ==--- 1.9/include/asm-ia64/percpu.h Tue Jul 15 14:39:31 2003 +++ edited/include/asm-ia64/percpu.h Tue Jul 15 22:49:34 2003 @@ -18,6 +18,10 @@ #define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name +/* Separate out the type, so (int[3], foo) works. */ +#define DEFINE_PER_CPU(type, name) \ + __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name + /* * Pretty much a literal copy of asm-generic/percpu.h, except that percpu_modcopy() is an * external routine, to avoid include-hell. @@ -29,10 +33,6 @@ /* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */ DECLARE_PER_CPU(unsigned long, local_per_cpu_offset); -/* Separate out the type, so (int[3], foo) works. */ -#define DEFINE_PER_CPU(type, name) \ - __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name - #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu])) #define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __ia64_per_cpu_var(local_per_cpu_offset))) @@ -40,7 +40,6 @@ #else /* ! SMP */ -#define DEFINE_PER_CPU(type, name) __typeof__(type) per_cpu__##name #define per_cpu(var, cpu) ((void)cpu, per_cpu__##var) #define __get_cpu_var(var) per_cpu__##var ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-07-16 6:04 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2003-07-16 4:05 Can't build current snapshot Peter Chubb 2003-07-16 4:30 ` David Mosberger 2003-07-16 6:04 ` David Mosberger
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.