Index: linux-2.6.16-rc5-mm3/include/asm-ia64/pgtable.h =================================================================== --- linux-2.6.16-rc5-mm3.orig/include/asm-ia64/pgtable.h 2006-03-07 09:17:25.000000000 -0800 +++ linux-2.6.16-rc5-mm3/include/asm-ia64/pgtable.h 2006-03-07 17:19:24.000000000 -0800 @@ -460,22 +460,29 @@ extern void paging_init (void); * enforce that, but we can't easily include here. * (Of course, better still would be to define MAX_SWAPFILES_SHIFT here...). * + * Note: The accessed and dirty bit handlers are racy and may set both bits in + * swap ptes. Those bits cannot overlap with any of the bits used for + * file and swap ptes. + * + * These definitions use the ppn field for the offset and the ig field for the + * type in order to allow potential use of the other fields. + * * Format of swap pte: * bit 0 : present bit (must be zero) * bit 1 : _PAGE_FILE (must be zero) - * bits 2- 8: swap-type - * bits 9-62: swap offset + * bits 12-49: swap offset + * bits 53-62: swap-type * bit 63 : _PAGE_PROTNONE bit * * Format of file pte: * bit 0 : present bit (must be zero) * bit 1 : _PAGE_FILE (must be one) - * bits 2-62: file_offset/PAGE_SIZE + * bits 12-49: file_offset/PAGE_SIZE * bit 63 : _PAGE_PROTNONE bit */ -#define __swp_type(entry) (((entry).val >> 2) & 0x7f) -#define __swp_offset(entry) (((entry).val << 1) >> 10) -#define __swp_entry(type,offset) ((swp_entry_t) { ((type) << 2) | ((long) (offset) << 9) }) +#define __swp_type(entry) (((entry).val >> 53) & 0x3f) +#define __swp_offset(entry) (((entry).val >> 12) & 0xffffffffffffffffL) +#define __swp_entry(type,offset) ((swp_entry_t) { ((type) << 53) | ((long) (offset) << 12) }) #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) #define __swp_entry_to_pte(x) ((pte_t) { (x).val })