Re: 2.6.4-mm1

From: William Lee Irwin III
Date: Thu Mar 11 2004 - 10:56:17 EST


On Thu, Mar 11, 2004 at 07:23:46AM -0800, William Lee Irwin III wrote:
> +#define pgoff_prot_to_pte(off, prot) \
> + (__pte(((off) << (PAGE_SHIFT+2)) | _PAGE_FILE | ((prot >> 8) & 0x3UL)))
> +#define PTE_FILE_MAX_BITS (64UL - PAGE_SHIFT - 3UL)

Good thing for me it's rarely exercised. Incremental (one-liner):


--- mm1-2.6.4-3/include/asm-sparc64/pgtable.h 2004-03-11 06:27:40.704004000 -0800
+++ mm1-2.6.4-4/include/asm-sparc64/pgtable.h 2004-03-11 07:35:09.766453000 -0800
@@ -330,7 +330,7 @@
(pte_file(pte) ? __file_pte_to_pgprot(pte) : __pte_to_pgprot(pte))
#define pte_to_pgoff(pte) (pte_val(pte) >> (PAGE_SHIFT+2))
#define pgoff_prot_to_pte(off, prot) \
- (__pte(((off) << (PAGE_SHIFT+2)) | _PAGE_FILE | ((prot >> 8) & 0x3UL)))
+ ((__pte(((off) | ((pgprot_val(prot) >> 8) & 0x3UL)))) << (PAGE_SHIFT+2) | _PAGE_FILE)
#define PTE_FILE_MAX_BITS (64UL - PAGE_SHIFT - 3UL)

extern unsigned long prom_virt_to_phys(unsigned long, int *);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/