linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hiroyuki KAMEZAWA <kamezawa.hiroyu@jp.fujitsu.com>
To: LinuxIA64 <linux-ia64@vger.kernel.org>
Cc: linux-mm <linux-mm@kvack.org>
Subject: [RFC/PATCH] pfn_valid more generic : ia64 part [2/2]
Date: Wed, 06 Oct 2004 15:43:19 +0900	[thread overview]
Message-ID: <41639407.9050504@jp.fujitsu.com> (raw)

This is ia64 + generic_arch/CONFIG_DISCONTIG part.
This patch doesn't cover all ia64 configration.

BTW, my previous e-mail was named "arch independent part [0/2]"....
it should be [1/2] , sorry.

Kame <kamezawa.hiroyu@jp.fujitsu.com>

---

 test-pfn-valid-kamezawa/arch/ia64/mm/discontig.c |    2 ++
 test-pfn-valid-kamezawa/arch/ia64/mm/init.c      |   12 ------------
 test-pfn-valid-kamezawa/include/asm-ia64/page.h  |    4 +++-
 3 files changed, 5 insertions(+), 13 deletions(-)

diff -puN include/asm-ia64/page.h~ia64_careful_pfn_valid include/asm-ia64/page.h
--- test-pfn-valid/include/asm-ia64/page.h~ia64_careful_pfn_valid	2004-10-05 15:22:23.000000000 +0900
+++ test-pfn-valid-kamezawa/include/asm-ia64/page.h	2004-10-05 15:22:23.000000000 +0900
@@ -78,7 +78,9 @@ do {						\
 #define virt_addr_valid(kaddr)	pfn_valid(__pa(kaddr) >> PAGE_SHIFT)

 #ifdef CONFIG_VIRTUAL_MEM_MAP
-extern int ia64_pfn_valid (unsigned long pfn);
+#define CAREFUL_PFN_VALID 1
+#define  ia64_pfn_valid(x)	careful_pfn_valid(x)
 #else
 # define ia64_pfn_valid(pfn) 1
 #endif
diff -puN arch/ia64/mm/discontig.c~ia64_careful_pfn_valid arch/ia64/mm/discontig.c
--- test-pfn-valid/arch/ia64/mm/discontig.c~ia64_careful_pfn_valid	2004-10-05 15:22:23.000000000 +0900
+++ test-pfn-valid-kamezawa/arch/ia64/mm/discontig.c	2004-10-05 15:22:23.000000000 +0900
@@ -475,6 +475,7 @@ void __init find_memory(void)
 	max_pfn = max_low_pfn;

 	find_initrd();
+	pfn_valid_init();
 }

 /**
@@ -692,4 +693,5 @@ void paging_init(void)
 	}

 	zero_page_memmap_ptr = virt_to_page(ia64_imva(empty_zero_page));
+	pfn_valid_setup();
 }
diff -puN arch/ia64/mm/init.c~ia64_careful_pfn_valid arch/ia64/mm/init.c
--- test-pfn-valid/arch/ia64/mm/init.c~ia64_careful_pfn_valid	2004-10-05 15:22:23.000000000 +0900
+++ test-pfn-valid-kamezawa/arch/ia64/mm/init.c	2004-10-05 15:22:23.000000000 +0900
@@ -455,18 +455,6 @@ memmap_init (unsigned long size, int nid
 }

 int
-ia64_pfn_valid (unsigned long pfn)
-{
-	char byte;
-	struct page *pg = pfn_to_page(pfn);
-
-	return     (__get_user(byte, (char *) pg) == 0)
-		&& ((((u64)pg & PAGE_MASK) == (((u64)(pg + 1) - 1) & PAGE_MASK))
-			|| (__get_user(byte, (char *) (pg + 1) - 1) == 0));
-}
-EXPORT_SYMBOL(ia64_pfn_valid);
-
-int
 find_largest_hole (u64 start, u64 end, void *arg)
 {
 	u64 *max_gap = arg;

_



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

                 reply	other threads:[~2004-10-06  6:37 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=41639407.9050504@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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