OSDN Git Service

[MIPS] Fix marking buddy of pte global for MIPS32 w/36-bit physical address
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Sun, 16 Apr 2006 19:27:21 +0000 (23:27 +0400)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 31 May 2006 23:28:30 +0000 (00:28 +0100)
commit6e9538917c5f62c1a1598da9b898702800801b98
tree03ee3776796394870e60f74773f6b23b090dad83
parent343fdc39713d9c2fe836523e8f2dfc6a3ac39122
[MIPS] Fix marking buddy of pte global for MIPS32 w/36-bit physical address

In case of CONFIG_64BIT_PHYS_ADDR, set_pte() and pte_clear() functions
only set _PAGE_GLOBAL bit in the pte_low field of the buddy PTEs,
forgetting to propagate ito to pte_high. Thus, the both pages might not
really be made global for the CPU (since it AND's the G-bit of the
odd / even PTEs together to decide whether they're global or not). Thus,
if only a single page is allocated via vmalloc() or ioremap(), it's not
really global for CPU (and it must be, since this is kernel mapping),
and thus its ASID is compared against the current process' one -- so,
we'll get into trouble sooner or later...  Also, pte_none() will fail
on global pages because _PAGE_GLOBAL bit is set in both pte_low and
pte_high, and pte_val() will return u64 value consisting of those fields
concateneted.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
include/asm-mips/pgtable.h