lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 2 Feb 2010 01:01:34 GMT
From:	tip-bot for Wu Fengguang <fengguang.wu@...el.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	yinghai@...nel.org, andi@...stfloor.org, akpm@...ux-foundation.org,
	tglx@...utronix.de, fengguang.wu@...el.com,
	kamezawa.hiroyu@...fujitsu.com
Subject: [tip:x86/mm] x86: Use the generic page_is_ram()

Commit-ID:  13ca0fcaa33f6b1984c4111b6ec5df42689fea6f
Gitweb:     http://git.kernel.org/tip/13ca0fcaa33f6b1984c4111b6ec5df42689fea6f
Author:     Wu Fengguang <fengguang.wu@...el.com>
AuthorDate: Fri, 22 Jan 2010 11:21:05 +0800
Committer:  H. Peter Anvin <hpa@...or.com>
CommitDate: Mon, 1 Feb 2010 16:58:17 -0800

x86: Use the generic page_is_ram()

The generic resource based page_is_ram() works better with memory
hotplug/hotremove. So switch the x86 e820map based code to it.

CC: Andi Kleen <andi@...stfloor.org>
CC: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
CC: Yinghai Lu <yinghai@...nel.org>
Signed-off-by: Wu Fengguang <fengguang.wu@...el.com>
LKML-Reference: <20100122033004.470767217@...el.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@...or.com>
---
 arch/x86/include/asm/page_types.h |    1 -
 arch/x86/mm/ioremap.c             |   21 ---------------------
 2 files changed, 0 insertions(+), 22 deletions(-)

diff --git a/arch/x86/include/asm/page_types.h b/arch/x86/include/asm/page_types.h
index 642fe34..a667f24 100644
--- a/arch/x86/include/asm/page_types.h
+++ b/arch/x86/include/asm/page_types.h
@@ -40,7 +40,6 @@
 
 #ifndef __ASSEMBLY__
 
-extern int page_is_ram(unsigned long pagenr);
 extern int devmem_is_allowed(unsigned long pagenr);
 
 extern unsigned long max_low_pfn_mapped;
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 30e068d..1bf9e08 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -24,27 +24,6 @@
 
 #include "physaddr.h"
 
-int page_is_ram(unsigned long pagenr)
-{
-	resource_size_t addr, end;
-	int i;
-
-	for (i = 0; i < e820.nr_map; i++) {
-		/*
-		 * Not usable memory:
-		 */
-		if (e820.map[i].type != E820_RAM)
-			continue;
-		addr = (e820.map[i].addr + PAGE_SIZE-1) >> PAGE_SHIFT;
-		end = (e820.map[i].addr + e820.map[i].size) >> PAGE_SHIFT;
-
-
-		if ((pagenr >= addr) && (pagenr < end))
-			return 1;
-	}
-	return 0;
-}
-
 /*
  * Fix up the linear direct mapping of the kernel to avoid cache attribute
  * conflicts.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ