patch-2.4.5 linux/include/asm-alpha/page.h
Next file: linux/include/asm-alpha/pci.h
Previous file: linux/include/asm-alpha/mmzone.h
Back to the patch index
Back to the overall index
- Lines: 42
- Date:
Thu May 24 15:20:18 2001
- Orig file:
v2.4.4/linux/include/asm-alpha/page.h
- Orig date:
Thu Feb 8 12:56:29 2001
diff -u --recursive --new-file v2.4.4/linux/include/asm-alpha/page.h linux/include/asm-alpha/page.h
@@ -1,6 +1,8 @@
#ifndef _ALPHA_PAGE_H
#define _ALPHA_PAGE_H
+#include <asm/pal.h>
+
/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 13
#define PAGE_SIZE (1UL << PAGE_SHIFT)
@@ -33,6 +35,7 @@
#define pgprot_val(x) ((x).pgprot)
#define __pte(x) ((pte_t) { (x) } )
+#define __pmd(x) ((pmd_t) { (x) } )
#define __pgd(x) ((pgd_t) { (x) } )
#define __pgprot(x) ((pgprot_t) { (x) } )
@@ -56,7 +59,11 @@
#endif /* STRICT_MM_TYPECHECKS */
-#define BUG() __asm__ __volatile__("call_pal 129 # bugchk")
+#define BUG() \
+do { \
+ printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
+ __asm__ __volatile__("call_pal %0 # bugchk" : : "i" (PAL_bugchk)); \
+} while (0)
#define PAGE_BUG(page) BUG()
/* Pure 2^n version of get_order */
@@ -86,8 +93,10 @@
#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
+#ifndef CONFIG_DISCONTIGMEM
#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT))
-#define VALID_PAGE(page) ((page - mem_map) < max_mapnr)
+#define VALID_PAGE(page) (((page) - mem_map) < max_mapnr)
+#endif /* CONFIG_DISCONTIGMEM */
#endif /* __KERNEL__ */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)