lkml.org 
[lkml]   [2007]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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@jp.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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-08-21 13:15    [W:0.054 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site