patch-2.3.26 linux/include/asm-ppc/pgtable.h
Next file: linux/include/asm-ppc/processor.h
Previous file: linux/include/asm-ppc/amigaints.h
Back to the patch index
Back to the overall index
- Lines: 16
- Date:
Fri Nov 5 15:53:26 1999
- Orig file:
v2.3.25/linux/include/asm-ppc/pgtable.h
- Orig date:
Wed Oct 27 16:34:12 1999
diff -u --recursive --new-file v2.3.25/linux/include/asm-ppc/pgtable.h linux/include/asm-ppc/pgtable.h
@@ -629,9 +629,12 @@
extern void flush_hash_page(unsigned context, unsigned long va);
-#define SWP_TYPE(entry) (((pte_val(entry)) >> 1) & 0x7f)
-#define SWP_OFFSET(entry) ((pte_val(entry)) >> 8)
-#define SWP_ENTRY(type,offset) __pte(((type) << 1) | ((offset) << 8))
+/* Encode and de-code a swap entry */
+#define SWP_TYPE(entry) (((entry).val >> 1) & 0x3f)
+#define SWP_OFFSET(entry) ((entry).val >> 8)
+#define SWP_ENTRY(type,offset) ((swp_entry_t) { (((type) << 1) | ((offset) << 8)) })
+#define pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
+#define swp_entry_to_pte(x) ((pte_t) { (x).val })
#define module_map vmalloc
#define module_unmap vfree
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)