Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=69d48b409cac747cc0707b05b769e38488a6ad35
Commit:     69d48b409cac747cc0707b05b769e38488a6ad35
Parent:     57d7909e0d2dd54567ae775e22b14076b777042a
Author:     David Gibson <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 30 15:37:06 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Wed May 2 20:04:30 2007 +1000

    [POWERPC] Fix STRICT_MM_TYPECHECKS
    
    Since we don't have it active by default, the STRICT_MM_TYPECHECKS
    option has bitrotted again.  This patch fixes a couple of simple build
    fixes if the option is selected.  First, pud_t mustn't be defined in
    page.h on 32-bit systems, because it conflicts with the version in the
    generic pud-folding code.  Second, pci_32.c is missing a __pgprot()
    wrapper call.  Third, a couple of PS3 files use constants of type
    pgprot_t when they need the raw values, we add pgprot_val() calls to
    fix this.
    
    Signed-off-by: David Gibson <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/kernel/pci_32.c      |    2 +-
 arch/powerpc/platforms/ps3/htab.c |    3 ++-
 arch/powerpc/platforms/ps3/spu.c  |    2 +-
 include/asm-powerpc/page.h        |    2 +-
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index f022862..e66064b 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -1658,7 +1658,7 @@ pgprot_t pci_phys_mem_access_prot(struct file *file,
        int i;
 
        if (page_is_ram(pfn))
-               return prot;
+               return __pgprot(prot);
 
        prot |= _PAGE_NO_CACHE | _PAGE_GUARDED;
 
diff --git a/arch/powerpc/platforms/ps3/htab.c 
b/arch/powerpc/platforms/ps3/htab.c
index ea60c45..a1409e4 100644
--- a/arch/powerpc/platforms/ps3/htab.c
+++ b/arch/powerpc/platforms/ps3/htab.c
@@ -273,7 +273,8 @@ void __init ps3_map_htab(void)
 
        result = lv1_map_htab(0, &htab_addr);
 
-       htab = (hpte_t *)__ioremap(htab_addr, htab_size, PAGE_READONLY_X);
+       htab = (hpte_t *)__ioremap(htab_addr, htab_size,
+                                  pgprot_val(PAGE_READONLY_X));
 
        DBG("%s:%d: lpar %016lxh, virt %016lxh\n", __func__, __LINE__,
                htab_addr, (unsigned long)htab);
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c
index a397e4e..af8efe3 100644
--- a/arch/powerpc/platforms/ps3/spu.c
+++ b/arch/powerpc/platforms/ps3/spu.c
@@ -184,7 +184,7 @@ static int __init setup_areas(struct spu *spu)
 
        spu_pdata(spu)->shadow = __ioremap(
                spu_pdata(spu)->shadow_addr, sizeof(struct spe_shadow),
-               PAGE_READONLY | _PAGE_NO_CACHE | _PAGE_GUARDED);
+               pgprot_val(PAGE_READONLY) | _PAGE_NO_CACHE | _PAGE_GUARDED);
        if (!spu_pdata(spu)->shadow) {
                pr_debug("%s:%d: ioremap shadow failed\n", __func__, __LINE__);
                goto fail_ioremap;
diff --git a/include/asm-powerpc/page.h b/include/asm-powerpc/page.h
index b4d38b0..f37bff0 100644
--- a/include/asm-powerpc/page.h
+++ b/include/asm-powerpc/page.h
@@ -126,7 +126,7 @@ typedef struct { unsigned long pmd; } pmd_t;
 #define __pmd(x)       ((pmd_t) { (x) })
 
 /* PUD level exusts only on 4k pages */
-#ifndef CONFIG_PPC_64K_PAGES
+#if defined(CONFIG_PPC64) && !defined(CONFIG_PPC_64K_PAGES)
 typedef struct { unsigned long pud; } pud_t;
 #define pud_val(x)     ((x).pud)
 #define __pud(x)       ((pud_t) { (x) })
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to