]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
powerpc: Remove unnecessary condition when sanity-checking WIMG bits
authorDave Kleikamp <shaggy@linux.vnet.ibm.com>
Wed, 9 Jul 2008 15:28:07 +0000 (01:28 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 15 Jul 2008 02:24:59 +0000 (12:24 +1000)
It is okay for both _PAGE_GUARDED and _PAGE_COHERENT (G and M) to be set
in the same pte.  In fact, even if that were not the case, there doesn't
seem to be any place where G is set without also setting I (_PAGE_NO_CACHE),
so the test for I is sufficient as a condition to clear _PAGE_COHERENT
when filling the hash table.

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/cell/beat_htab.c
arch/powerpc/platforms/pseries/lpar.c

index 81467ff055c8313152862f02eb8d828d3f349951..2e67bd840e011f6b10a284441c83ea2ac467dde7 100644 (file)
@@ -112,7 +112,7 @@ static long beat_lpar_hpte_insert(unsigned long hpte_group,
        if (!(vflags & HPTE_V_BOLTED))
                DBG_LOW(" hpte_v=%016lx, hpte_r=%016lx\n", hpte_v, hpte_r);
 
-       if (rflags & (_PAGE_GUARDED|_PAGE_NO_CACHE))
+       if (rflags & _PAGE_NO_CACHE)
                hpte_r &= ~_PAGE_COHERENT;
 
        spin_lock(&beat_htab_lock);
@@ -334,7 +334,7 @@ static long beat_lpar_hpte_insert_v3(unsigned long hpte_group,
        if (!(vflags & HPTE_V_BOLTED))
                DBG_LOW(" hpte_v=%016lx, hpte_r=%016lx\n", hpte_v, hpte_r);
 
-       if (rflags & (_PAGE_GUARDED|_PAGE_NO_CACHE))
+       if (rflags & _PAGE_NO_CACHE)
                hpte_r &= ~_PAGE_COHERENT;
 
        /* insert into not-volted entry */
index 38b5927b3629f6c49bed8a84d6d0b439523da2f5..52a80e5840e87ee51c6ff33eea5fbdc83d9c7205 100644 (file)
@@ -305,8 +305,7 @@ static long pSeries_lpar_hpte_insert(unsigned long hpte_group,
        flags = 0;
 
        /* Make pHyp happy */
-       if ((rflags & _PAGE_GUARDED) ||
-           ((rflags & _PAGE_NO_CACHE) & !(rflags & _PAGE_WRITETHRU)))
+       if ((rflags & _PAGE_NO_CACHE) & !(rflags & _PAGE_WRITETHRU))
                hpte_r &= ~_PAGE_COHERENT;
 
        lpar_rc = plpar_pte_enter(flags, hpte_group, hpte_v, hpte_r, &slot);