* [PATCH] remove availability for PAGE_SIZE and friends (i386)
@ 2007-03-06 16:31 David Brown
2007-03-06 17:03 ` David M. Lloyd
0 siblings, 1 reply; 3+ messages in thread
From: David Brown @ 2007-03-06 16:31 UTC (permalink / raw)
To: Linux Kernel Mailing List
After a bit of discussion I found out that PAGE_SIZE really shouldn't
be available for use at all by userspace. So here's a patch to move
the __KERNEL__ define to include PAGE_SIZE and friends for i386.
Thanks,
- David Brown
diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h
index 7b19f45..2f686d5 100644
--- a/include/asm-i386/page.h
+++ b/include/asm-i386/page.h
@@ -1,6 +1,8 @@
#ifndef _I386_PAGE_H
#define _I386_PAGE_H
+#define __KERNEL__
+
/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 12
#define PAGE_SIZE (1UL << PAGE_SHIFT)
@@ -9,7 +11,6 @@
#define LARGE_PAGE_MASK (~(LARGE_PAGE_SIZE-1))
#define LARGE_PAGE_SIZE (1UL << PMD_SHIFT)
-#ifdef __KERNEL__
#ifndef __ASSEMBLY__
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] remove availability for PAGE_SIZE and friends (i386)
2007-03-06 16:31 [PATCH] remove availability for PAGE_SIZE and friends (i386) David Brown
@ 2007-03-06 17:03 ` David M. Lloyd
2007-03-06 17:58 ` David Brown
0 siblings, 1 reply; 3+ messages in thread
From: David M. Lloyd @ 2007-03-06 17:03 UTC (permalink / raw)
To: David Brown; +Cc: Linux Kernel Mailing List
On Tue, 2007-03-06 at 08:31 -0800, David Brown wrote:
> +#define __KERNEL__
That's a #define, not an #ifdef...
- DML
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] remove availability for PAGE_SIZE and friends (i386)
2007-03-06 17:03 ` David M. Lloyd
@ 2007-03-06 17:58 ` David Brown
0 siblings, 0 replies; 3+ messages in thread
From: David Brown @ 2007-03-06 17:58 UTC (permalink / raw)
To: David M. Lloyd; +Cc: Linux Kernel Mailing List
Pfft, did I seriously screw that up... (/me failed)
On 3/6/07, David M. Lloyd <dmlloyd@flurg.com> wrote:
> On Tue, 2007-03-06 at 08:31 -0800, David Brown wrote:
> > +#define __KERNEL__
>
> That's a #define, not an #ifdef...
>
> - DML
>
>
diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h
index 7b19f45..a9eedd0 100644
--- a/include/asm-i386/page.h
+++ b/include/asm-i386/page.h
@@ -1,6 +1,8 @@
#ifndef _I386_PAGE_H
#define _I386_PAGE_H
+#ifdef __KERNEL__
+
/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 12
#define PAGE_SIZE (1UL << PAGE_SHIFT)
@@ -9,7 +11,6 @@
#define LARGE_PAGE_MASK (~(LARGE_PAGE_SIZE-1))
#define LARGE_PAGE_SIZE (1UL << PMD_SHIFT)
-#ifdef __KERNEL__
#ifndef __ASSEMBLY__
Revised patch.
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-03-06 17:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-06 16:31 [PATCH] remove availability for PAGE_SIZE and friends (i386) David Brown
2007-03-06 17:03 ` David M. Lloyd
2007-03-06 17:58 ` David Brown
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.