[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070821201507.36641d76.kamezawa.hiroyu@jp.fujitsu.com>
Date: Tue, 21 Aug 2007 20:15:07 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: LKML <linux-kernel@...r.kernel.org>
Cc: "tony.luck@...el.com" <tony.luck@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"linux-ia64@...r.kernel.org" <linux-ia64@...r.kernel.org>
Subject: [PATCH][2.6.23-rc2-mm2] small fix for ia64 icache sync patch
Fixing 2 small issues pointed by Tony Luck.
* removing redundant BUG_ON in __ia64_sync_icache_dcache().
* check pte_present() first.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
---
arch/ia64/mm/init.c | 2 --
include/asm-ia64/pgtable.h | 4 ++--
2 files changed, 2 insertions(+), 4 deletions(-)
Index: linux-2.6.23-rc2-mm2/include/asm-ia64/pgtable.h
===================================================================
--- linux-2.6.23-rc2-mm2.orig/include/asm-ia64/pgtable.h
+++ linux-2.6.23-rc2-mm2/include/asm-ia64/pgtable.h
@@ -327,8 +327,8 @@ ia64_phys_addr_valid (unsigned long addr
extern void __ia64_sync_icache_dcache(pte_t pteval);
static inline void set_pte(pte_t *ptep, pte_t pteval)
{
- if (pte_exec(pteval) && // flush only new executable page.
- pte_present(pteval) && // swap out ?
+ if (pte_present(pteval) &&// swap out ?
+ pte_exec(pteval) && // flush only new executable page.
pte_user(pteval) && // ignore kernel page
(!pte_present(*ptep) ||// do_no_page or swap in, migration,
pte_pfn(*ptep) != pte_pfn(pteval))) // do_wp_page(), page copy
Index: linux-2.6.23-rc2-mm2/arch/ia64/mm/init.c
===================================================================
--- linux-2.6.23-rc2-mm2.orig/arch/ia64/mm/init.c
+++ linux-2.6.23-rc2-mm2/arch/ia64/mm/init.c
@@ -60,8 +60,6 @@ __ia64_sync_icache_dcache (pte_t pte)
struct page *page;
unsigned long order;
- BUG_ON(!pte_exec(pte));
-
page = pte_page(pte);
addr = (unsigned long) page_address(page);
-
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