On Mar 10, 2009, at 10:53 PM, Benjamin Herrenschmidt wrote:
+
+/* Conversion functions: convert a page and protection to a page
entry,
+ * and a page entry and page directory to the page they refer to.
+ *
+ * Even if PTEs can be unsigned long long, a PFN is always an
unsigned
+ * long for now.
+ */
+static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot) {
+ return __pte((pfn << PTE_RPN_SHIFT) | pgprot_val(pgprot)); }
This needs to be:
return __pte(((pte_basic_t)(pfn) << PTE_RPN_SHIFT) |
pgprot_val(pgprot)); }
Otherwise on ppc32 w/36-bit physical we lose the upper bits of the pfn.
- k
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev