* [patch 1/4] AVR32: cleanup - use _AC macro to define PAGE_SIZE
[not found] <20080203112217.126814108@gmail.com>
@ 2008-02-03 11:22 ` Cyrill Gorcunov
2008-02-03 13:25 ` Haavard Skinnemoen
2008-02-03 11:22 ` [patch 2/4] BLACKFIN: " Cyrill Gorcunov
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Cyrill Gorcunov @ 2008-02-03 11:22 UTC (permalink / raw)
To: linux-kernel, davem, bryan.wu, hskinnemoen, dhowells; +Cc: Cyrill Gorcunov
[-- Attachment #1: avr32-page.diff --]
[-- Type: text/plain, Size: 774 bytes --]
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
page.h | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
Index: linux-2.6.git/include/asm-avr32/page.h
===================================================================
--- linux-2.6.git.orig/include/asm-avr32/page.h 2008-01-21 19:35:27.000000000 +0300
+++ linux-2.6.git/include/asm-avr32/page.h 2008-02-03 12:42:51.000000000 +0300
@@ -10,13 +10,11 @@
#ifdef __KERNEL__
+#include <linux/const.h>
+
/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 12
-#ifdef __ASSEMBLY__
-#define PAGE_SIZE (1 << PAGE_SHIFT)
-#else
-#define PAGE_SIZE (1UL << PAGE_SHIFT)
-#endif
+#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
#define PTE_MASK PAGE_MASK
--
^ permalink raw reply [flat|nested] 6+ messages in thread
* [patch 2/4] BLACKFIN: cleanup - use _AC macro to define PAGE_SIZE
[not found] <20080203112217.126814108@gmail.com>
2008-02-03 11:22 ` [patch 1/4] AVR32: cleanup - use _AC macro to define PAGE_SIZE Cyrill Gorcunov
@ 2008-02-03 11:22 ` Cyrill Gorcunov
2008-02-03 11:22 ` [patch 3/4] FRV: " Cyrill Gorcunov
2008-02-03 11:22 ` [patch 4/4] SPARC: " Cyrill Gorcunov
3 siblings, 0 replies; 6+ messages in thread
From: Cyrill Gorcunov @ 2008-02-03 11:22 UTC (permalink / raw)
To: linux-kernel, davem, bryan.wu, hskinnemoen, dhowells; +Cc: Cyrill Gorcunov
[-- Attachment #1: blackfin-page.diff --]
[-- Type: text/plain, Size: 805 bytes --]
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
page.h | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
Index: linux-2.6.git/include/asm-blackfin/page.h
===================================================================
--- linux-2.6.git.orig/include/asm-blackfin/page.h 2008-02-03 13:39:38.000000000 +0300
+++ linux-2.6.git/include/asm-blackfin/page.h 2008-02-03 13:42:10.000000000 +0300
@@ -1,14 +1,12 @@
#ifndef _BLACKFIN_PAGE_H
#define _BLACKFIN_PAGE_H
+#include <linux/const.h>
+
/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 12
-#ifdef __ASSEMBLY__
-#define PAGE_SIZE (1 << PAGE_SHIFT)
-#else
-#define PAGE_SIZE (1UL << PAGE_SHIFT)
-#endif
+#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
#ifdef __KERNEL__
--
^ permalink raw reply [flat|nested] 6+ messages in thread
* [patch 3/4] FRV: cleanup - use _AC macro to define PAGE_SIZE
[not found] <20080203112217.126814108@gmail.com>
2008-02-03 11:22 ` [patch 1/4] AVR32: cleanup - use _AC macro to define PAGE_SIZE Cyrill Gorcunov
2008-02-03 11:22 ` [patch 2/4] BLACKFIN: " Cyrill Gorcunov
@ 2008-02-03 11:22 ` Cyrill Gorcunov
2008-02-03 11:22 ` [patch 4/4] SPARC: " Cyrill Gorcunov
3 siblings, 0 replies; 6+ messages in thread
From: Cyrill Gorcunov @ 2008-02-03 11:22 UTC (permalink / raw)
To: linux-kernel, davem, bryan.wu, hskinnemoen, dhowells; +Cc: Cyrill Gorcunov
[-- Attachment #1: asm-frv.diff --]
[-- Type: text/plain, Size: 982 bytes --]
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
mem-layout.h | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
Index: linux-2.6.git/include/asm-frv/mem-layout.h
===================================================================
--- linux-2.6.git.orig/include/asm-frv/mem-layout.h 2008-01-21 19:35:27.000000000 +0300
+++ linux-2.6.git/include/asm-frv/mem-layout.h 2008-02-03 13:45:25.000000000 +0300
@@ -12,6 +12,8 @@
#ifndef _ASM_MEM_LAYOUT_H
#define _ASM_MEM_LAYOUT_H
+#include <linux/const.h>
+
#ifndef __ASSEMBLY__
#define __UL(X) ((unsigned long) (X))
#else
@@ -22,13 +24,7 @@
* PAGE_SHIFT determines the page size
*/
#define PAGE_SHIFT 14
-
-#ifndef __ASSEMBLY__
-#define PAGE_SIZE (1UL << PAGE_SHIFT)
-#else
-#define PAGE_SIZE (1 << PAGE_SHIFT)
-#endif
-
+#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
/*****************************************************************************/
--
^ permalink raw reply [flat|nested] 6+ messages in thread
* [patch 4/4] SPARC: cleanup - use _AC macro to define PAGE_SIZE
[not found] <20080203112217.126814108@gmail.com>
` (2 preceding siblings ...)
2008-02-03 11:22 ` [patch 3/4] FRV: " Cyrill Gorcunov
@ 2008-02-03 11:22 ` Cyrill Gorcunov
3 siblings, 0 replies; 6+ messages in thread
From: Cyrill Gorcunov @ 2008-02-03 11:22 UTC (permalink / raw)
To: linux-kernel, davem, bryan.wu, hskinnemoen, dhowells; +Cc: Cyrill Gorcunov
[-- Attachment #1: asm-sparc.diff --]
[-- Type: text/plain, Size: 880 bytes --]
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
page.h | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
Index: linux-2.6.git/include/asm-sparc/page.h
===================================================================
--- linux-2.6.git.orig/include/asm-sparc/page.h 2008-01-21 19:35:29.000000000 +0300
+++ linux-2.6.git/include/asm-sparc/page.h 2008-02-03 14:02:48.000000000 +0300
@@ -10,18 +10,15 @@
#ifdef __KERNEL__
+#include <linux/const.h>
+
#ifdef CONFIG_SUN4
#define PAGE_SHIFT 13
#else
#define PAGE_SHIFT 12
#endif
-#ifndef __ASSEMBLY__
-/* I have my suspicions... -DaveM */
-#define PAGE_SIZE (1UL << PAGE_SHIFT)
-#else
-#define PAGE_SIZE (1 << PAGE_SHIFT)
-#endif
-#define PAGE_MASK (~(PAGE_SIZE-1))
+#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
+#define PAGE_MASK (~(PAGE_SIZE-1))
#include <asm/btfixup.h>
--
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch 1/4] AVR32: cleanup - use _AC macro to define PAGE_SIZE
2008-02-03 11:22 ` [patch 1/4] AVR32: cleanup - use _AC macro to define PAGE_SIZE Cyrill Gorcunov
@ 2008-02-03 13:25 ` Haavard Skinnemoen
2008-02-03 14:04 ` Cyrill Gorcunov
0 siblings, 1 reply; 6+ messages in thread
From: Haavard Skinnemoen @ 2008-02-03 13:25 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: linux-kernel, davem, bryan.wu, dhowells, Cyrill Gorcunov
[removed bogus @atmel.co address from Cc]
On Sun, 03 Feb 2008 14:22:18 +0300
Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Applied, thanks.
I found myself having to grep through include/linux to figure out what
this _AC macro was really all about, so I added this to the description:
PAGE_SIZE is used both from assembly and C code. We want to have type
specifiers when using it from C, but this will make the assembler
confused, so we need to make it conditional.
This is exactly what the _AC macro is for, so using it allows us to
get rid of a few lines of cpp noise.
My first thought was "Autoconf", and it sent shivers down my spine ;-)
Haavard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch 1/4] AVR32: cleanup - use _AC macro to define PAGE_SIZE
2008-02-03 13:25 ` Haavard Skinnemoen
@ 2008-02-03 14:04 ` Cyrill Gorcunov
0 siblings, 0 replies; 6+ messages in thread
From: Cyrill Gorcunov @ 2008-02-03 14:04 UTC (permalink / raw)
To: Haavard Skinnemoen; +Cc: linux-kernel, davem, bryan.wu, dhowells
[Haavard Skinnemoen - Sun, Feb 03, 2008 at 02:25:06PM +0100]
| [removed bogus @atmel.co address from Cc]
|
| On Sun, 03 Feb 2008 14:22:18 +0300
| Cyrill Gorcunov <gorcunov@gmail.com> wrote:
|
| > Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
| Applied, thanks.
|
| I found myself having to grep through include/linux to figure out what
| this _AC macro was really all about, so I added this to the description:
|
| PAGE_SIZE is used both from assembly and C code. We want to have type
| specifiers when using it from C, but this will make the assembler
| confused, so we need to make it conditional.
|
| This is exactly what the _AC macro is for, so using it allows us to
| get rid of a few lines of cpp noise.
|
| My first thought was "Autoconf", and it sent shivers down my spine ;-)
|
| Haavard
|
Thanks, Haavard. (btw, really good joke about Autoconf ;-)
- Cyrill -
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-02-03 14:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20080203112217.126814108@gmail.com>
2008-02-03 11:22 ` [patch 1/4] AVR32: cleanup - use _AC macro to define PAGE_SIZE Cyrill Gorcunov
2008-02-03 13:25 ` Haavard Skinnemoen
2008-02-03 14:04 ` Cyrill Gorcunov
2008-02-03 11:22 ` [patch 2/4] BLACKFIN: " Cyrill Gorcunov
2008-02-03 11:22 ` [patch 3/4] FRV: " Cyrill Gorcunov
2008-02-03 11:22 ` [patch 4/4] SPARC: " Cyrill Gorcunov
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).