From: Brian Gerst <bgerst@didntduck.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] trivial highpte patch
Date: Sat, 01 Jun 2002 10:02:31 -0400 [thread overview]
Message-ID: <3CF8D3F7.8060300@didntduck.org> (raw)
[-- 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 */
reply other threads:[~2002-06-01 14:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3CF8D3F7.8060300@didntduck.org \
--to=bgerst@didntduck.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox