* [PATCH] trivial highpte patch
@ 2002-06-01 14:02 Brian Gerst
0 siblings, 0 replies; only message in thread
From: Brian Gerst @ 2002-06-01 14:02 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Linux-Kernel
[-- Attachment #1: Type: text/plain, Size: 87 bytes --]
Create a common GFP_USERPTE and change x86 and ppc code to use it.
--
Brian Gerst
[-- Attachment #2: highpte-1 --]
[-- Type: text/plain, Size: 1607 bytes --]
diff -urN linux-bk/arch/i386/mm/init.c linux/arch/i386/mm/init.c
--- linux-bk/arch/i386/mm/init.c Wed May 29 15:06:00 2002
+++ linux/arch/i386/mm/init.c Fri May 31 11:01:06 2002
@@ -634,11 +634,7 @@
struct page *pte;
do {
-#if CONFIG_HIGHPTE
- pte = alloc_pages(GFP_KERNEL | __GFP_HIGHMEM, 0);
-#else
- pte = alloc_pages(GFP_KERNEL, 0);
-#endif
+ pte = alloc_pages(GFP_USERPTE, 0);
if (pte)
clear_highpage(pte);
else {
diff -urN linux-bk/arch/ppc/mm/pgtable.c linux/arch/ppc/mm/pgtable.c
--- linux-bk/arch/ppc/mm/pgtable.c Wed May 15 10:27:26 2002
+++ linux/arch/ppc/mm/pgtable.c Fri May 31 11:01:17 2002
@@ -95,13 +95,8 @@
{
struct page *pte;
int timeout = 0;
-#ifdef CONFIG_HIGHPTE
- int flags = GFP_KERNEL | __GFP_HIGHMEM;
-#else
- int flags = GFP_KERNEL;
-#endif
- while ((pte = alloc_pages(flags, 0)) == NULL) {
+ while ((pte = alloc_pages(GFP_USERPTE, 0)) == NULL) {
if (++timeout >= 10)
return NULL;
set_current_state(TASK_UNINTERRUPTIBLE);
diff -urN linux-bk/include/linux/gfp.h linux/include/linux/gfp.h
--- linux-bk/include/linux/gfp.h Thu May 30 09:51:37 2002
+++ linux/include/linux/gfp.h Fri May 31 11:01:43 2002
@@ -28,6 +28,12 @@
#define GFP_NFS (__GFP_HIGH | __GFP_WAIT | __GFP_IO | __GFP_HIGHIO | __GFP_FS)
#define GFP_KSWAPD ( __GFP_WAIT | __GFP_IO | __GFP_HIGHIO | __GFP_FS)
+#ifdef CONFIG_HIGHPTE
+#define GFP_USERPTE (GFP_KERNEL | __GFP_HIGHMEM)
+#else
+#define GFP_USERPTE (GFP_KERNEL)
+#endif
+
/* Flag - indicates that the buffer will be suitable for DMA. Ignored on some
platforms, used as appropriate on others */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-06-01 14:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-01 14:02 [PATCH] trivial highpte patch Brian Gerst
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox