linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Further compile fixup for STRICT_MM_TYPECHECKS
@ 2008-10-21  3:55 David Gibson
  0 siblings, 0 replies; only message in thread
From: David Gibson @ 2008-10-21  3:55 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras; +Cc: linuxppc-dev

A patch of mine was recently committed to fix up STRICT_MM_TYPECHECKS
behaviour on powerpc (f5ea64dcbad89875d130596df14c9b25d994a737).
However, something which breaks it again seems to have slipped in
afterwards.  So, here's another small fix.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

Index: working-2.6/arch/powerpc/kernel/pci-common.c
===================================================================
--- working-2.6.orig/arch/powerpc/kernel/pci-common.c	2008-10-21 13:53:29.000000000 +1100
+++ working-2.6/arch/powerpc/kernel/pci-common.c	2008-10-21 13:53:52.000000000 +1100
@@ -610,7 +610,8 @@ int pci_mmap_legacy_page_range(struct pc
 	pr_debug(" -> mapping phys %llx\n", (unsigned long long)offset);
 
 	vma->vm_pgoff = offset >> PAGE_SHIFT;
-	vma->vm_page_prot |= _PAGE_NO_CACHE | _PAGE_GUARDED;
+	vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
+				     | _PAGE_NO_CACHE | _PAGE_GUARDED);
 	return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
 			       vma->vm_end - vma->vm_start,
 			       vma->vm_page_prot);

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-21  3:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-21  3:55 Further compile fixup for STRICT_MM_TYPECHECKS David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).