* [PATCH 0/5] section name cleanup for parisc @ 2009-04-30 23:55 Tim Abbott 2009-04-30 23:55 ` [PATCH 1/5] parisc: use NOSAVE_DATA macro for .data.nosave section Tim Abbott 2009-05-02 14:19 ` [PATCH 0/5] section name cleanup for parisc Kyle McMartin 0 siblings, 2 replies; 15+ messages in thread From: Tim Abbott @ 2009-04-30 23:55 UTC (permalink / raw) To: Sam Ravnborg Cc: Linux kernel mailing list, Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold, Kyle McMartin, Helge Deller, linux-parisc, Tim Abbott This patch series cleans up the section names on the parisc architecture. It requires the architecture-independent macro definitions from this patch series: <http://www.spinics.net/lists/mips/msg33499.html> The long-term goal here is to add support for building the kernel with -ffunction-sections -fdata-sections. This requires renaming all the magic section names in the kernel of the form .text.foo, .data.foo, .bss.foo, and .rodata.foo to not have collisions with sections generated for code like: static int nosave = 0; /* -fdata-sections places in .data.nosave */ static void head(); /* -ffunction-sections places in .text.head */ Note that these patches have not been boot-tested (aside from testing the analogous changes on x86), since I don't have access to the appropriate hardware. -Tim Abbott Tim Abbott (5): parisc: use NOSAVE_DATA macro for .data.nosave section. parisc: use new macro for .data.cacheline_aligned section. parisc: use new macros for .data.init_task. parisc: use new macro for .data.read_mostly section. parisc: convert to new generic read_mostly support. arch/parisc/Kconfig | 3 +++ arch/parisc/include/asm/cache.h | 2 -- arch/parisc/kernel/head.S | 3 ++- arch/parisc/kernel/init_task.c | 2 +- arch/parisc/kernel/vmlinux.lds.S | 36 +++++------------------------------- 5 files changed, 11 insertions(+), 35 deletions(-) ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/5] parisc: use NOSAVE_DATA macro for .data.nosave section. 2009-04-30 23:55 [PATCH 0/5] section name cleanup for parisc Tim Abbott @ 2009-04-30 23:55 ` Tim Abbott 2009-04-30 23:55 ` [PATCH 2/5] parisc: use new macro for .data.cacheline_aligned section Tim Abbott 2009-05-02 14:19 ` [PATCH 0/5] section name cleanup for parisc Kyle McMartin 1 sibling, 1 reply; 15+ messages in thread From: Tim Abbott @ 2009-04-30 23:55 UTC (permalink / raw) To: Sam Ravnborg Cc: Linux kernel mailing list, Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold, Kyle McMartin, Helge Deller, linux-parisc, Tim Abbott .data.nosave should not need a separate output section; this change moves it into the .data section. Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Helge Deller <deller@gmx.de> Cc: linux-parisc@vger.kernel.org --- arch/parisc/kernel/vmlinux.lds.S | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S index fd2cc4f..0cc9658 100644 --- a/arch/parisc/kernel/vmlinux.lds.S +++ b/arch/parisc/kernel/vmlinux.lds.S @@ -103,6 +103,7 @@ SECTIONS . = ALIGN(L1_CACHE_BYTES); /* Data */ .data : { + NOSAVE_DATA DATA_DATA CONSTRUCTORS } @@ -118,17 +119,6 @@ SECTIONS *(.data.lock_aligned) } - /* nosave data is really only used for software suspend...it's here - * just in case we ever implement it - */ - . = ALIGN(PAGE_SIZE); - __nosave_begin = .; - .data_nosave : { - *(.data.nosave) - } - . = ALIGN(PAGE_SIZE); - __nosave_end = .; - /* End of data section */ _edata = .; -- 1.6.2.1 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/5] parisc: use new macro for .data.cacheline_aligned section. 2009-04-30 23:55 ` [PATCH 1/5] parisc: use NOSAVE_DATA macro for .data.nosave section Tim Abbott @ 2009-04-30 23:55 ` Tim Abbott 2009-04-30 23:55 ` [PATCH 3/5] parisc: use new macros for .data.init_task Tim Abbott 0 siblings, 1 reply; 15+ messages in thread From: Tim Abbott @ 2009-04-30 23:55 UTC (permalink / raw) To: Sam Ravnborg Cc: Linux kernel mailing list, Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold, Kyle McMartin, Helge Deller, linux-parisc, Tim Abbott .data.cacheline_aligned should not need a separate output section; this change moves it into the .data section. Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Helge Deller <deller@gmx.de> Cc: linux-parisc@vger.kernel.org --- arch/parisc/kernel/vmlinux.lds.S | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S index 0cc9658..b5936c9 100644 --- a/arch/parisc/kernel/vmlinux.lds.S +++ b/arch/parisc/kernel/vmlinux.lds.S @@ -104,15 +104,11 @@ SECTIONS /* Data */ .data : { NOSAVE_DATA + CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES) DATA_DATA CONSTRUCTORS } - . = ALIGN(L1_CACHE_BYTES); - .data.cacheline_aligned : { - *(.data.cacheline_aligned) - } - /* PA-RISC locks requires 16-byte alignment */ . = ALIGN(16); .data.lock_aligned : { -- 1.6.2.1 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/5] parisc: use new macros for .data.init_task. 2009-04-30 23:55 ` [PATCH 2/5] parisc: use new macro for .data.cacheline_aligned section Tim Abbott @ 2009-04-30 23:55 ` Tim Abbott 2009-04-30 23:55 ` [PATCH 4/5] parisc: use new macro for .data.read_mostly section Tim Abbott 2009-05-02 5:13 ` [PATCH 3/5] parisc: use new macros for .data.init_task Helge Deller 0 siblings, 2 replies; 15+ messages in thread From: Tim Abbott @ 2009-04-30 23:55 UTC (permalink / raw) To: Sam Ravnborg Cc: Linux kernel mailing list, Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold, Kyle McMartin, Helge Deller, linux-parisc, Tim Abbott .data.init_task should not need a separate output section; this change moves it into the .data section. Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Helge Deller <deller@gmx.de> Cc: linux-parisc@vger.kernel.org --- arch/parisc/kernel/init_task.c | 2 +- arch/parisc/kernel/vmlinux.lds.S | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/arch/parisc/kernel/init_task.c b/arch/parisc/kernel/init_task.c index 1e25a45..8ee17ea 100644 --- a/arch/parisc/kernel/init_task.c +++ b/arch/parisc/kernel/init_task.c @@ -48,7 +48,7 @@ EXPORT_SYMBOL(init_mm); * "init_task" linker map entry.. */ union thread_union init_thread_union - __attribute__((aligned(128))) __attribute__((__section__(".data.init_task"))) = + __attribute__((aligned(128))) __init_task_data = { INIT_THREAD_INFO(init_task) }; #if PT_NLEVELS == 3 diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S index b5936c9..c8a528d 100644 --- a/arch/parisc/kernel/vmlinux.lds.S +++ b/arch/parisc/kernel/vmlinux.lds.S @@ -103,6 +103,8 @@ SECTIONS . = ALIGN(L1_CACHE_BYTES); /* Data */ .data : { + /* assembler code expects init_task to be 16k aligned */ + INIT_TASK_DATA(16384) NOSAVE_DATA CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES) DATA_DATA @@ -133,14 +135,6 @@ SECTIONS } __bss_stop = .; - - /* assembler code expects init_task to be 16k aligned */ - . = ALIGN(16384); - /* init_task */ - .data.init_task : { - *(.data.init_task) - } - #ifdef CONFIG_64BIT . = ALIGN(16); /* Linkage tables */ -- 1.6.2.1 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 4/5] parisc: use new macro for .data.read_mostly section. 2009-04-30 23:55 ` [PATCH 3/5] parisc: use new macros for .data.init_task Tim Abbott @ 2009-04-30 23:55 ` Tim Abbott 2009-04-30 23:55 ` [PATCH 5/5] parisc: convert to new generic read_mostly support Tim Abbott 2009-05-02 5:13 ` [PATCH 3/5] parisc: use new macros for .data.init_task Helge Deller 1 sibling, 1 reply; 15+ messages in thread From: Tim Abbott @ 2009-04-30 23:55 UTC (permalink / raw) To: Sam Ravnborg Cc: Linux kernel mailing list, Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold, Kyle McMartin, Helge Deller, linux-parisc, Tim Abbott .data.read_mostly should not need a separate output section; this change moves it into the .data section. I used alignment L1_CACHE_BYTES instead of 16 since the whole point is for read-mostly data to have different cache lines than other stuff. Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Helge Deller <deller@gmx.de> Cc: linux-parisc@vger.kernel.org --- arch/parisc/kernel/vmlinux.lds.S | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S index c8a528d..3176407 100644 --- a/arch/parisc/kernel/vmlinux.lds.S +++ b/arch/parisc/kernel/vmlinux.lds.S @@ -94,19 +94,13 @@ SECTIONS __stop___unwind = .; } - /* rarely changed data like cpu maps */ - . = ALIGN(16); - .data.read_mostly : { - *(.data.read_mostly) - } - - . = ALIGN(L1_CACHE_BYTES); /* Data */ .data : { /* assembler code expects init_task to be 16k aligned */ INIT_TASK_DATA(16384) NOSAVE_DATA CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES) + READ_MOSTLY_DATA(L1_CACHE_BYTES) DATA_DATA CONSTRUCTORS } -- 1.6.2.1 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 5/5] parisc: convert to new generic read_mostly support. 2009-04-30 23:55 ` [PATCH 4/5] parisc: use new macro for .data.read_mostly section Tim Abbott @ 2009-04-30 23:55 ` Tim Abbott 0 siblings, 0 replies; 15+ messages in thread From: Tim Abbott @ 2009-04-30 23:55 UTC (permalink / raw) To: Sam Ravnborg Cc: Linux kernel mailing list, Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold, Kyle McMartin, Helge Deller, linux-parisc, Tim Abbott Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Helge Deller <deller@gmx.de> Cc: linux-parisc@vger.kernel.org --- arch/parisc/Kconfig | 3 +++ arch/parisc/include/asm/cache.h | 2 -- arch/parisc/kernel/head.S | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 9038f39..cc113d0 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -101,6 +101,9 @@ config ARCH_MAY_HAVE_PC_FDC depends on BROKEN default y +config HAVE_READ_MOSTLY_DATA + def_bool y + source "init/Kconfig" source "kernel/Kconfig.freezer" diff --git a/arch/parisc/include/asm/cache.h b/arch/parisc/include/asm/cache.h index 32c2cca..21e0865 100644 --- a/arch/parisc/include/asm/cache.h +++ b/arch/parisc/include/asm/cache.h @@ -28,8 +28,6 @@ #define SMP_CACHE_BYTES L1_CACHE_BYTES -#define __read_mostly __attribute__((__section__(".data.read_mostly"))) - void parisc_cache_init(void); /* initializes cache-flushing */ void disable_sr_hashing_asm(int); /* low level support for above */ void disable_sr_hashing(void); /* turns off space register hashing */ diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S index 0e3d9f9..712d29d 100644 --- a/arch/parisc/kernel/head.S +++ b/arch/parisc/kernel/head.S @@ -19,6 +19,7 @@ #include <asm/assembly.h> #include <asm/pgtable.h> +#include <linux/cache.h> #include <linux/linkage.h> #include <linux/init.h> @@ -345,7 +346,7 @@ smp_slave_stext: ENDPROC(stext) #ifndef CONFIG_64BIT - .section .data.read_mostly + __READ_MOSTLY .align 4 .export $global$,data -- 1.6.2.1 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 3/5] parisc: use new macros for .data.init_task. 2009-04-30 23:55 ` [PATCH 3/5] parisc: use new macros for .data.init_task Tim Abbott 2009-04-30 23:55 ` [PATCH 4/5] parisc: use new macro for .data.read_mostly section Tim Abbott @ 2009-05-02 5:13 ` Helge Deller 2009-05-02 14:04 ` John David Anglin ` (2 more replies) 1 sibling, 3 replies; 15+ messages in thread From: Helge Deller @ 2009-05-02 5:13 UTC (permalink / raw) To: Tim Abbott Cc: Sam Ravnborg, Linux kernel mailing list, Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold, Kyle McMartin, linux-parisc Tim Abbott wrote: > .data.init_task should not need a separate output section; this change > moves it into the .data section. > > Signed-off-by: Tim Abbott <tabbott@mit.edu> > Cc: Kyle McMartin <kyle@mcmartin.ca> > Cc: Helge Deller <deller@gmx.de> > Cc: linux-parisc@vger.kernel.org I think this patch is wrong, although it is theoretically correct. IIRC, gcc on hppa is not able to provide an alignment >= 8k, which is why we have done the 16k alignment inside the linker script. So, I think this change will prevent the parisc kernel to boot up. Needs testing. Helge > --- > arch/parisc/kernel/init_task.c | 2 +- > arch/parisc/kernel/vmlinux.lds.S | 10 ++-------- > 2 files changed, 3 insertions(+), 9 deletions(-) > > diff --git a/arch/parisc/kernel/init_task.c b/arch/parisc/kernel/init_task.c > index 1e25a45..8ee17ea 100644 > --- a/arch/parisc/kernel/init_task.c > +++ b/arch/parisc/kernel/init_task.c > @@ -48,7 +48,7 @@ EXPORT_SYMBOL(init_mm); > * "init_task" linker map entry.. > */ > union thread_union init_thread_union > - __attribute__((aligned(128))) __attribute__((__section__(".data.init_task"))) = > + __attribute__((aligned(128))) __init_task_data = > { INIT_THREAD_INFO(init_task) }; > > #if PT_NLEVELS == 3 > diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S > index b5936c9..c8a528d 100644 > --- a/arch/parisc/kernel/vmlinux.lds.S > +++ b/arch/parisc/kernel/vmlinux.lds.S > @@ -103,6 +103,8 @@ SECTIONS > . = ALIGN(L1_CACHE_BYTES); > /* Data */ > .data : { > + /* assembler code expects init_task to be 16k aligned */ > + INIT_TASK_DATA(16384) > NOSAVE_DATA > CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES) > DATA_DATA > @@ -133,14 +135,6 @@ SECTIONS > } > __bss_stop = .; > > - > - /* assembler code expects init_task to be 16k aligned */ > - . = ALIGN(16384); > - /* init_task */ > - .data.init_task : { > - *(.data.init_task) > - } > - > #ifdef CONFIG_64BIT > . = ALIGN(16); > /* Linkage tables */ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/5] parisc: use new macros for .data.init_task. 2009-05-02 5:13 ` [PATCH 3/5] parisc: use new macros for .data.init_task Helge Deller @ 2009-05-02 14:04 ` John David Anglin 2009-05-02 14:13 ` Kyle McMartin 2009-05-02 22:10 ` Sam Ravnborg 2 siblings, 0 replies; 15+ messages in thread From: John David Anglin @ 2009-05-02 14:04 UTC (permalink / raw) To: Helge Deller Cc: tabbott, sam, linux-kernel, andersk, wdaher, vda.linux, jbarnold, kyle, linux-parisc > IIRC, gcc on hppa is not able to provide an alignment >= 8k, which is > why we have done the 16k alignment inside the linker script. How does this arise? We have the following define for MAX_OFILE_ALIGNMENT in elfos.h: #define MAX_OFILE_ALIGNMENT (((unsigned int) 1 << 28) * 8) If you are correct, MAX_OFILE_ALIGNMENT should be changed. Dave -- J. David Anglin dave.anglin@nrc-cnrc.gc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6602) ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/5] parisc: use new macros for .data.init_task. 2009-05-02 5:13 ` [PATCH 3/5] parisc: use new macros for .data.init_task Helge Deller 2009-05-02 14:04 ` John David Anglin @ 2009-05-02 14:13 ` Kyle McMartin 2009-05-02 16:16 ` Helge Deller 2009-05-02 22:10 ` Sam Ravnborg 2 siblings, 1 reply; 15+ messages in thread From: Kyle McMartin @ 2009-05-02 14:13 UTC (permalink / raw) To: Helge Deller Cc: Tim Abbott, Sam Ravnborg, Linux kernel mailing list, Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold, Kyle McMartin, linux-parisc On Sat, May 02, 2009 at 07:13:37AM +0200, Helge Deller wrote: > I think this patch is wrong, although it is theoretically correct. > > IIRC, gcc on hppa is not able to provide an alignment >= 8k, which is > why we have done the 16k alignment inside the linker script. > So, I think this change will prevent the parisc kernel to boot up. > Needs testing. > I think you're confusing this with the 8-byte maximum alignment from kmalloc and on-stack that prevents us from just using a 16-byte aligned word as a lock on pa1.1? The patch I trimmed from this mail looks correct to me. regards, Kyle ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/5] parisc: use new macros for .data.init_task. 2009-05-02 14:13 ` Kyle McMartin @ 2009-05-02 16:16 ` Helge Deller 2009-05-02 16:52 ` John David Anglin 0 siblings, 1 reply; 15+ messages in thread From: Helge Deller @ 2009-05-02 16:16 UTC (permalink / raw) To: Kyle McMartin Cc: Tim Abbott, Sam Ravnborg, Linux kernel mailing list, Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold, linux-parisc Kyle McMartin wrote: > On Sat, May 02, 2009 at 07:13:37AM +0200, Helge Deller wrote: >> I think this patch is wrong, although it is theoretically correct. >> >> IIRC, gcc on hppa is not able to provide an alignment >= 8k, which is >> why we have done the 16k alignment inside the linker script. >> So, I think this change will prevent the parisc kernel to boot up. >> Needs testing. >> > > I think you're confusing this with the 8-byte maximum alignment from > kmalloc and on-stack that prevents us from just using a 16-byte aligned > word as a lock on pa1.1? No, I was not confusing it with the 8byte-alignment. I really meant that a > 8k alignment was not possible. I tried exactly the same stuff once and failed. I think the restriction came from hpux compatibility or some old gas... Anyway, I just tried some assembly and it seems to work. > The patch I trimmed from this mail looks correct to me. If you apply it and it boots OK for you, I'm fine. Helge ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/5] parisc: use new macros for .data.init_task. 2009-05-02 16:16 ` Helge Deller @ 2009-05-02 16:52 ` John David Anglin 0 siblings, 0 replies; 15+ messages in thread From: John David Anglin @ 2009-05-02 16:52 UTC (permalink / raw) To: Helge Deller Cc: kyle, tabbott, sam, linux-kernel, andersk, wdaher, vda.linux, jbarnold, linux-parisc > I really meant that a > 8k alignment was not possible. > I tried exactly the same stuff once and failed. > I think the restriction came from hpux compatibility or some old gas... The maximum alignment on hpux is 4k bytes. This was implemented in 2004 in the PA backend for hpux. Prior to that, the default for MAX_OFILE_ALIGNMENT (BIGGEST_ALIGNMENT) was in effect for all PA targets. It looks like Carlos added the define to elfos.h in November 2006. So unless this was back ported, 4.2.0 would be the first gcc release to support large alignments on linux. Dave -- J. David Anglin dave.anglin@nrc-cnrc.gc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6602) ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/5] parisc: use new macros for .data.init_task. 2009-05-02 5:13 ` [PATCH 3/5] parisc: use new macros for .data.init_task Helge Deller 2009-05-02 14:04 ` John David Anglin 2009-05-02 14:13 ` Kyle McMartin @ 2009-05-02 22:10 ` Sam Ravnborg 2009-05-03 19:37 ` Helge Deller 2 siblings, 1 reply; 15+ messages in thread From: Sam Ravnborg @ 2009-05-02 22:10 UTC (permalink / raw) To: Helge Deller Cc: Tim Abbott, Linux kernel mailing list, Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold, Kyle McMartin, linux-parisc On Sat, May 02, 2009 at 07:13:37AM +0200, Helge Deller wrote: > Tim Abbott wrote: > > .data.init_task should not need a separate output section; this change > > moves it into the .data section. > > > > Signed-off-by: Tim Abbott <tabbott@mit.edu> > > Cc: Kyle McMartin <kyle@mcmartin.ca> > > Cc: Helge Deller <deller@gmx.de> > > Cc: linux-parisc@vger.kernel.org > > > I think this patch is wrong, although it is theoretically correct. > > IIRC, gcc on hppa is not able to provide an alignment >= 8k, which is > why we have done the 16k alignment inside the linker script. > So, I think this change will prevent the parisc kernel to boot up. > Needs testing. The patch does not do much... > > Helge > > > --- > > arch/parisc/kernel/init_task.c | 2 +- > > arch/parisc/kernel/vmlinux.lds.S | 10 ++-------- > > 2 files changed, 3 insertions(+), 9 deletions(-) > > > > diff --git a/arch/parisc/kernel/init_task.c b/arch/parisc/kernel/init_task.c > > index 1e25a45..8ee17ea 100644 > > --- a/arch/parisc/kernel/init_task.c > > +++ b/arch/parisc/kernel/init_task.c > > @@ -48,7 +48,7 @@ EXPORT_SYMBOL(init_mm); > > * "init_task" linker map entry.. > > */ > > union thread_union init_thread_union > > - __attribute__((aligned(128))) __attribute__((__section__(".data.init_task"))) = > > + __attribute__((aligned(128))) __init_task_data = > > { INIT_THREAD_INFO(init_task) }; This is a simple replacement with a nicer way to say "this belongs to the .data.init_task section - no functional difference. > > > > #if PT_NLEVELS == 3 > > diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S > > index b5936c9..c8a528d 100644 > > --- a/arch/parisc/kernel/vmlinux.lds.S > > +++ b/arch/parisc/kernel/vmlinux.lds.S > > @@ -103,6 +103,8 @@ SECTIONS > > . = ALIGN(L1_CACHE_BYTES); > > /* Data */ > > .data : { > > + /* assembler code expects init_task to be 16k aligned */ > > + INIT_TASK_DATA(16384) > > NOSAVE_DATA > > CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES) > > DATA_DATA > > @@ -133,14 +135,6 @@ SECTIONS > > } > > __bss_stop = .; > > > > - > > - /* assembler code expects init_task to be 16k aligned */ > > - . = ALIGN(16384); > > - /* init_task */ > > - .data.init_task : { > > - *(.data.init_task) > > - } > > - This part moves away from a specific output section to including this in the .data output section - with the _same_ alignmnet. So the only issue here is that we move init_task before NOSAVE_DATA etc. I do not see why you think this changes alignmnet? Sam ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/5] parisc: use new macros for .data.init_task. 2009-05-02 22:10 ` Sam Ravnborg @ 2009-05-03 19:37 ` Helge Deller 0 siblings, 0 replies; 15+ messages in thread From: Helge Deller @ 2009-05-03 19:37 UTC (permalink / raw) To: Sam Ravnborg Cc: Tim Abbott, Linux kernel mailing list, Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold, Kyle McMartin, linux-parisc Sam Ravnborg wrote: > On Sat, May 02, 2009 at 07:13:37AM +0200, Helge Deller wrote: >> Tim Abbott wrote: >>> .data.init_task should not need a separate output section; this change >>> moves it into the .data section. >>> >>> Signed-off-by: Tim Abbott <tabbott@mit.edu> >>> Cc: Kyle McMartin <kyle@mcmartin.ca> >>> Cc: Helge Deller <deller@gmx.de> >>> Cc: linux-parisc@vger.kernel.org >> >> I think this patch is wrong, although it is theoretically correct. >> >> IIRC, gcc on hppa is not able to provide an alignment >= 8k, which is >> why we have done the 16k alignment inside the linker script. >> So, I think this change will prevent the parisc kernel to boot up. >> Needs testing. > > The patch does not do much... > >> Helge >> >>> --- >>> arch/parisc/kernel/init_task.c | 2 +- >>> arch/parisc/kernel/vmlinux.lds.S | 10 ++-------- >>> 2 files changed, 3 insertions(+), 9 deletions(-) >>> >>> diff --git a/arch/parisc/kernel/init_task.c b/arch/parisc/kernel/init_task.c >>> index 1e25a45..8ee17ea 100644 >>> --- a/arch/parisc/kernel/init_task.c >>> +++ b/arch/parisc/kernel/init_task.c >>> @@ -48,7 +48,7 @@ EXPORT_SYMBOL(init_mm); >>> * "init_task" linker map entry.. >>> */ >>> union thread_union init_thread_union >>> - __attribute__((aligned(128))) __attribute__((__section__(".data.init_task"))) = >>> + __attribute__((aligned(128))) __init_task_data = >>> { INIT_THREAD_INFO(init_task) }; > This is a simple replacement with a nicer way to say "this belongs to > the .data.init_task section - no functional difference. > > >>> >>> #if PT_NLEVELS == 3 >>> diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S >>> index b5936c9..c8a528d 100644 >>> --- a/arch/parisc/kernel/vmlinux.lds.S >>> +++ b/arch/parisc/kernel/vmlinux.lds.S >>> @@ -103,6 +103,8 @@ SECTIONS >>> . = ALIGN(L1_CACHE_BYTES); >>> /* Data */ >>> .data : { >>> + /* assembler code expects init_task to be 16k aligned */ >>> + INIT_TASK_DATA(16384) >>> NOSAVE_DATA >>> CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES) >>> DATA_DATA >>> @@ -133,14 +135,6 @@ SECTIONS >>> } >>> __bss_stop = .; >>> >>> - >>> - /* assembler code expects init_task to be 16k aligned */ >>> - . = ALIGN(16384); >>> - /* init_task */ >>> - .data.init_task : { >>> - *(.data.init_task) >>> - } >>> - > This part moves away from a specific output section to including this in the > .data output section - with the _same_ alignmnet. > So the only issue here is that we move init_task before NOSAVE_DATA etc. > > I do not see why you think this changes alignmnet? Ugh. Of course you are correct. It doesn't change anything. Patch is OK for me. I missed the 16384 in INIT_TASK_DATA(16384). Thanks, Helge ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 0/5] section name cleanup for parisc 2009-04-30 23:55 [PATCH 0/5] section name cleanup for parisc Tim Abbott 2009-04-30 23:55 ` [PATCH 1/5] parisc: use NOSAVE_DATA macro for .data.nosave section Tim Abbott @ 2009-05-02 14:19 ` Kyle McMartin 2009-05-02 16:32 ` Sam Ravnborg 1 sibling, 1 reply; 15+ messages in thread From: Kyle McMartin @ 2009-05-02 14:19 UTC (permalink / raw) To: Tim Abbott Cc: Sam Ravnborg, Linux kernel mailing list, Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold, Kyle McMartin, Helge Deller, linux-parisc On Thu, Apr 30, 2009 at 07:55:14PM -0400, Tim Abbott wrote: > This patch series cleans up the section names on the parisc > architecture. It requires the architecture-independent macro > definitions from this patch series: > > <http://www.spinics.net/lists/mips/msg33499.html> > > The long-term goal here is to add support for building the kernel with > -ffunction-sections -fdata-sections. This requires renaming all the > magic section names in the kernel of the form .text.foo, .data.foo, > .bss.foo, and .rodata.foo to not have collisions with sections > generated for code like: > > static int nosave = 0; /* -fdata-sections places in .data.nosave */ > static void head(); /* -ffunction-sections places in .text.head */ > > Note that these patches have not been boot-tested (aside from testing > the analogous changes on x86), since I don't have access to the > appropriate hardware. > > -Tim Abbott > > > Tim Abbott (5): > parisc: use NOSAVE_DATA macro for .data.nosave section. > parisc: use new macro for .data.cacheline_aligned section. > parisc: use new macros for .data.init_task. > parisc: use new macro for .data.read_mostly section. > parisc: convert to new generic read_mostly support. > Not sure what the easiest way to merge these will be... I'll apply them to a section-cleanup branch in the parisc git tree until the architecture independent portions are upstream. regards, Kyle ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 0/5] section name cleanup for parisc 2009-05-02 14:19 ` [PATCH 0/5] section name cleanup for parisc Kyle McMartin @ 2009-05-02 16:32 ` Sam Ravnborg 0 siblings, 0 replies; 15+ messages in thread From: Sam Ravnborg @ 2009-05-02 16:32 UTC (permalink / raw) To: Kyle McMartin Cc: Tim Abbott, Linux kernel mailing list, Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold, Helge Deller, linux-parisc On Sat, May 02, 2009 at 10:19:53AM -0400, Kyle McMartin wrote: > On Thu, Apr 30, 2009 at 07:55:14PM -0400, Tim Abbott wrote: > > This patch series cleans up the section names on the parisc > > architecture. It requires the architecture-independent macro > > definitions from this patch series: > > > > <http://www.spinics.net/lists/mips/msg33499.html> > > > > The long-term goal here is to add support for building the kernel with > > -ffunction-sections -fdata-sections. This requires renaming all the > > magic section names in the kernel of the form .text.foo, .data.foo, > > .bss.foo, and .rodata.foo to not have collisions with sections > > generated for code like: > > > > static int nosave = 0; /* -fdata-sections places in .data.nosave */ > > static void head(); /* -ffunction-sections places in .text.head */ > > > > Note that these patches have not been boot-tested (aside from testing > > the analogous changes on x86), since I don't have access to the > > appropriate hardware. > > > > -Tim Abbott > > > > > > Tim Abbott (5): > > parisc: use NOSAVE_DATA macro for .data.nosave section. > > parisc: use new macro for .data.cacheline_aligned section. > > parisc: use new macros for .data.init_task. > > parisc: use new macro for .data.read_mostly section. > > parisc: convert to new generic read_mostly support. > > > > Not sure what the easiest way to merge these will be... I'll apply them > to a section-cleanup branch in the parisc git tree until the > architecture independent portions are upstream. I expect the parisc stuff to be redone. I'm working at the arch independent stuff atm and will post a new patch later this weekend. That will make the current patch obsolete. Sam ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2009-05-03 19:37 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-04-30 23:55 [PATCH 0/5] section name cleanup for parisc Tim Abbott 2009-04-30 23:55 ` [PATCH 1/5] parisc: use NOSAVE_DATA macro for .data.nosave section Tim Abbott 2009-04-30 23:55 ` [PATCH 2/5] parisc: use new macro for .data.cacheline_aligned section Tim Abbott 2009-04-30 23:55 ` [PATCH 3/5] parisc: use new macros for .data.init_task Tim Abbott 2009-04-30 23:55 ` [PATCH 4/5] parisc: use new macro for .data.read_mostly section Tim Abbott 2009-04-30 23:55 ` [PATCH 5/5] parisc: convert to new generic read_mostly support Tim Abbott 2009-05-02 5:13 ` [PATCH 3/5] parisc: use new macros for .data.init_task Helge Deller 2009-05-02 14:04 ` John David Anglin 2009-05-02 14:13 ` Kyle McMartin 2009-05-02 16:16 ` Helge Deller 2009-05-02 16:52 ` John David Anglin 2009-05-02 22:10 ` Sam Ravnborg 2009-05-03 19:37 ` Helge Deller 2009-05-02 14:19 ` [PATCH 0/5] section name cleanup for parisc Kyle McMartin 2009-05-02 16:32 ` Sam Ravnborg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox