Pageflags: Standardize comment inclusion in asm-offsets.h and fix MIPS

Previous thread: [2.6 patch] char/n_hdlc.c: don't use 0 as NULL pointer by Adrian Bunk on Monday, April 14, 2008 - 11:41 am. (1 message)

Next thread: [2.6 patch] make dm_set_device_limits() static by Adrian Bunk on Monday, April 14, 2008 - 11:41 am. (1 message)
From: Christoph Lameter
Date: Monday, April 14, 2008 - 11:43 am

Add the ability to pass comments into asm-offsets.h by generating asm
output like

-># comment line

Mips needs this feature to preserve the comments that are in asm-mips/asm-offsets.h
right now.

Then remove the special handling for mips from Kbuild and convert mips to use
the new string to include the comments.

Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Christoph Lameter <clameter@sgi.com>

---
 Kbuild                         |    6 
 arch/mips/kernel/asm-offsets.c |  416 ++++++++++++++++++++---------------------
 2 files changed, 211 insertions(+), 211 deletions(-)

Index: linux-2.6.25-rc8-mm2/Kbuild
===================================================================
--- linux-2.6.25-rc8-mm2.orig/Kbuild	2008-04-12 17:15:40.348425313 -0700
+++ linux-2.6.25-rc8-mm2/Kbuild	2008-04-12 18:37:06.707178187 -0700
@@ -52,10 +52,10 @@ targets += arch/$(SRCARCH)/kernel/asm-of
 
 # Default sed regexp - multiline due to syntax constraints
 define sed-y
-	"/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"
+	"/^->/{s:->#\(.*\):/* \1 */:; \
+	s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
+	s:->::; p;}"
 endef
-# Override default regexp for specific architectures
-sed-$(CONFIG_MIPS) := "/^@@@/{s/^@@@//; s/ \#.*\$$//; p;}"
 
 quiet_cmd_offsets = GEN     $@
 define cmd_offsets
Index: linux-2.6.25-rc8-mm2/arch/mips/kernel/asm-offsets.c
===================================================================
--- linux-2.6.25-rc8-mm2.orig/arch/mips/kernel/asm-offsets.c	2008-04-12 17:15:40.358425147 -0700
+++ linux-2.6.25-rc8-mm2/arch/mips/kernel/asm-offsets.c	2008-04-12 18:35:42.347183915 -0700
@@ -17,252 +17,252 @@
 #include <asm/ptrace.h>
 #include <asm/processor.h>
 
-#define text(t) __asm__("\n@@@" t)
+#define text(t) __asm__("\n->#" t)
 #define _offset(type, member) (&(((type *)NULL)->member))
 #define offset(string, ptr, member) \
-	__asm__("\n@@@" string "%0" : : "i" (_offset(ptr, member)))
+	__asm__("\n->" ...
From: Andrew Morton
Date: Monday, April 14, 2008 - 1:32 pm

On Mon, 14 Apr 2008 11:43:08 -0700 (PDT)

OK, let's try that.  Ralf, could you please review it?


afaict this change is not dependent upon the other page-flags changes and
can and should be merged ahead of the page-flags patches to preserve mips
bisectability, yes?

Mips and sparc64 are hopefully now mended.  powerpc allmodconfig is still
unwell:

  CC      arch/powerpc/kernel/asm-offsets.s
In file included from include/linux/gfp.h:4,
                 from include/linux/slab.h:14,
                 from include/linux/percpu.h:5,
                 from include/asm/time.h:18,
                 from include/asm/cputime.h:26,
                 from include/linux/sched.h:67,
                 from arch/powerpc/kernel/asm-offsets.c:17:
include/linux/mmzone.h:830:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE

--

From: Christoph Lameter
Date: Monday, April 14, 2008 - 2:58 pm

It could be merged before yes. There may be a conflict with the earlier 

Cannot figure out what this has to do with page flags. AFACIT the powerpc 
config is borked because section size is set too low for 64K pages.



--

From: Andrew Morton
Date: Monday, April 14, 2008 - 4:29 pm

On Mon, 14 Apr 2008 14:58:14 -0700 (PDT)


Yes, the above allmodconfig error was caused by git-powerpc.
--

From: Stephen Rothwell
Date: Monday, April 14, 2008 - 5:40 pm

Hi Andrew,


I posted a fix the other day ...

http://patchwork.ozlabs.org/linuxppc/patch?id=3D17819

--=20
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
From: Sam Ravnborg
Date: Monday, April 14, 2008 - 10:38 pm

Please apply this. I am buried in day-time job atm so my
kbuild maintainer job is kept on loow priority.

	Sam
--

From: Sam Ravnborg
Date: Monday, April 14, 2008 - 1:58 pm

My sedfu is not enough to properly review this.
And I am not yet able to test it.

But the general principle is good and I really like to see mips
aligned with the rest!

	Sam
--

Previous thread: [2.6 patch] char/n_hdlc.c: don't use 0 as NULL pointer by Adrian Bunk on Monday, April 14, 2008 - 11:41 am. (1 message)

Next thread: [2.6 patch] make dm_set_device_limits() static by Adrian Bunk on Monday, April 14, 2008 - 11:41 am. (1 message)