linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 10/15] powerpc: Remove unused __page_aligned macro.
       [not found]                 ` <1240938062-3264-10-git-send-email-tabbott@mit.edu>
@ 2009-04-28 17:00                   ` Tim Abbott
  2009-04-28 17:00                     ` [PATCH v2 11/15] powerpc: share .data output section definition between 32 and 64 bits Tim Abbott
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Abbott @ 2009-04-28 17:00 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Denys Vlasenko, Jeff Arnold, Linux kernel mailing list,
	Anders Kaseorg, linuxppc-dev, Paul Mundt, Paul Mackerras,
	Tim Abbott, Linus Torvalds, Waseem Daher

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
---
 arch/powerpc/include/asm/page_64.h |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/include/asm/page_64.h b/arch/powerpc/include/asm/page_64.h
index 043bfdf..20f9c74 100644
--- a/arch/powerpc/include/asm/page_64.h
+++ b/arch/powerpc/include/asm/page_64.h
@@ -152,14 +152,6 @@ do {						\
 
 #endif /* !CONFIG_HUGETLB_PAGE */
 
-#ifdef MODULE
-#define __page_aligned __attribute__((__aligned__(PAGE_SIZE)))
-#else
-#define __page_aligned \
-	__attribute__((__aligned__(PAGE_SIZE), \
-		__section__(".data.page_aligned")))
-#endif
-
 #define VM_DATA_DEFAULT_FLAGS \
 	(test_thread_flag(TIF_32BIT) ? \
 	 VM_DATA_DEFAULT_FLAGS32 : VM_DATA_DEFAULT_FLAGS64)
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 11/15] powerpc: share .data output section definition between 32 and 64 bits.
  2009-04-28 17:00                   ` [PATCH v2 10/15] powerpc: Remove unused __page_aligned macro Tim Abbott
@ 2009-04-28 17:00                     ` Tim Abbott
  2009-04-28 17:00                       ` [PATCH v2 12/15] powerpc: Use macros for .data.page_aligned section Tim Abbott
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Abbott @ 2009-04-28 17:00 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Denys Vlasenko, Jeff Arnold, Linux kernel mailing list,
	Anders Kaseorg, linuxppc-dev, Paul Mundt, Paul Mackerras,
	Tim Abbott, Linus Torvalds, Waseem Daher

Since upcoming changes will add several more common pieces of code
between the 32-bit and 64-bit powerpc architectures, it seems best to
unify these two blocks.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
---
 arch/powerpc/kernel/vmlinux.lds.S |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index a047a6c..47899b0 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -220,20 +220,19 @@ SECTIONS
 	. = ALIGN(PAGE_SIZE);
 	_sdata = .;
 
-#ifdef CONFIG_PPC32
 	.data : AT(ADDR(.data) - LOAD_OFFSET) {
 		DATA_DATA
+#ifdef CONFIG_PPC32
 		*(.sdata)
 		*(.got.plt) *(.got)
-	}
 #else
-	.data : AT(ADDR(.data) - LOAD_OFFSET) {
-		DATA_DATA
 		*(.data.rel*)
 		*(.toc1)
 		*(.branch_lt)
+#endif
 	}
 
+#ifndef CONFIG_PPC32
 	.opd : AT(ADDR(.opd) - LOAD_OFFSET) {
 		*(.opd)
 	}
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 12/15] powerpc: Use macros for .data.page_aligned section.
  2009-04-28 17:00                     ` [PATCH v2 11/15] powerpc: share .data output section definition between 32 and 64 bits Tim Abbott
@ 2009-04-28 17:00                       ` Tim Abbott
  2009-04-28 22:52                         ` Paul Mackerras
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Abbott @ 2009-04-28 17:00 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Denys Vlasenko, Jeff Arnold, Linux kernel mailing list,
	Anders Kaseorg, linuxppc-dev, Paul Mundt, Paul Mackerras,
	Tim Abbott, Linus Torvalds, Waseem Daher

.data.page_aligned should not need a separate output section, so as
part of this cleanup I moved into the .data output section in the
linker scripts in order to eliminate unnecessary references to the
section name.

Note that this change moves the page-aligned data inside _edata.
Since it _is_ data, I suspect having page-aligned data outside _edata
was a bug.  Please comment if it is not.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
---
 arch/powerpc/kernel/vdso.c                  |    2 +-
 arch/powerpc/kernel/vdso32/vdso32_wrapper.S |    3 ++-
 arch/powerpc/kernel/vdso64/vdso64_wrapper.S |    3 ++-
 arch/powerpc/kernel/vmlinux.lds.S           |    6 +-----
 4 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index ad06d5c..841910a 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -74,7 +74,7 @@ static int vdso_ready;
 static union {
 	struct vdso_data	data;
 	u8			page[PAGE_SIZE];
-} vdso_data_store __attribute__((__section__(".data.page_aligned")));
+} vdso_data_store __page_aligned_data
 struct vdso_data *vdso_data = &vdso_data_store.data;
 
 /* Format of the patch table */
diff --git a/arch/powerpc/kernel/vdso32/vdso32_wrapper.S b/arch/powerpc/kernel/vdso32/vdso32_wrapper.S
index 556f0ca..6e8f507 100644
--- a/arch/powerpc/kernel/vdso32/vdso32_wrapper.S
+++ b/arch/powerpc/kernel/vdso32/vdso32_wrapper.S
@@ -1,7 +1,8 @@
 #include <linux/init.h>
+#include <linux/linkage.h>
 #include <asm/page.h>
 
-	.section ".data.page_aligned"
+	__PAGE_ALIGNED_DATA
 
 	.globl vdso32_start, vdso32_end
 	.balign PAGE_SIZE
diff --git a/arch/powerpc/kernel/vdso64/vdso64_wrapper.S b/arch/powerpc/kernel/vdso64/vdso64_wrapper.S
index 0529cb9..b8553d6 100644
--- a/arch/powerpc/kernel/vdso64/vdso64_wrapper.S
+++ b/arch/powerpc/kernel/vdso64/vdso64_wrapper.S
@@ -1,7 +1,8 @@
 #include <linux/init.h>
+#include <linux/linkage.h>
 #include <asm/page.h>
 
-	.section ".data.page_aligned"
+	__PAGE_ALIGNED_DATA
 
 	.globl vdso64_start, vdso64_end
 	.balign PAGE_SIZE
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 47899b0..d3dcea0 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -221,6 +221,7 @@ SECTIONS
 	_sdata = .;
 
 	.data : AT(ADDR(.data) - LOAD_OFFSET) {
+		PAGE_ALIGNED_DATA
 		DATA_DATA
 #ifdef CONFIG_PPC32
 		*(.sdata)
@@ -258,11 +259,6 @@ SECTIONS
 		*(.data.init_task)
 	}
 
-	. = ALIGN(PAGE_SIZE);
-	.data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
-		*(.data.page_aligned)
-	}
-
 	.data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
 		*(.data.cacheline_aligned)
 	}
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 12/15] powerpc: Use macros for .data.page_aligned section.
  2009-04-28 17:00                       ` [PATCH v2 12/15] powerpc: Use macros for .data.page_aligned section Tim Abbott
@ 2009-04-28 22:52                         ` Paul Mackerras
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Mackerras @ 2009-04-28 22:52 UTC (permalink / raw)
  To: Tim Abbott
  Cc: Denys Vlasenko, Sam Ravnborg, Jeff Arnold,
	Linux kernel mailing list, Anders Kaseorg, linuxppc-dev,
	Paul Mundt, Linus Torvalds, Waseem Daher

Tim Abbott writes:

> diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
> index ad06d5c..841910a 100644
> --- a/arch/powerpc/kernel/vdso.c
> +++ b/arch/powerpc/kernel/vdso.c
> @@ -74,7 +74,7 @@ static int vdso_ready;
>  static union {
>  	struct vdso_data	data;
>  	u8			page[PAGE_SIZE];
> -} vdso_data_store __attribute__((__section__(".data.page_aligned")));
> +} vdso_data_store __page_aligned_data
                                        ^
Surely we need a semicolon here? -------|

Paul.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-28 22:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1240938062-3264-1-git-send-email-tabbott@mit.edu>
     [not found] ` <1240938062-3264-2-git-send-email-tabbott@mit.edu>
     [not found]   ` <1240938062-3264-3-git-send-email-tabbott@mit.edu>
     [not found]     ` <1240938062-3264-4-git-send-email-tabbott@mit.edu>
     [not found]       ` <1240938062-3264-5-git-send-email-tabbott@mit.edu>
     [not found]         ` <1240938062-3264-6-git-send-email-tabbott@mit.edu>
     [not found]           ` <1240938062-3264-7-git-send-email-tabbott@mit.edu>
     [not found]             ` <1240938062-3264-8-git-send-email-tabbott@mit.edu>
     [not found]               ` <1240938062-3264-9-git-send-email-tabbott@mit.edu>
     [not found]                 ` <1240938062-3264-10-git-send-email-tabbott@mit.edu>
2009-04-28 17:00                   ` [PATCH v2 10/15] powerpc: Remove unused __page_aligned macro Tim Abbott
2009-04-28 17:00                     ` [PATCH v2 11/15] powerpc: share .data output section definition between 32 and 64 bits Tim Abbott
2009-04-28 17:00                       ` [PATCH v2 12/15] powerpc: Use macros for .data.page_aligned section Tim Abbott
2009-04-28 22:52                         ` Paul Mackerras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).