diff options
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/emergency-restart.h | 9 | ||||
-rw-r--r-- | include/asm-generic/page.h | 26 | ||||
-rw-r--r-- | include/asm-generic/pci.h | 8 | ||||
-rw-r--r-- | include/asm-generic/pgtable.h | 16 | ||||
-rw-r--r-- | include/asm-generic/sections.h | 1 |
5 files changed, 60 insertions, 0 deletions
diff --git a/include/asm-generic/emergency-restart.h b/include/asm-generic/emergency-restart.h new file mode 100644 index 000000000000..0d68a1eae985 --- /dev/null +++ b/include/asm-generic/emergency-restart.h | |||
@@ -0,0 +1,9 @@ | |||
1 | #ifndef _ASM_GENERIC_EMERGENCY_RESTART_H | ||
2 | #define _ASM_GENERIC_EMERGENCY_RESTART_H | ||
3 | |||
4 | static inline void machine_emergency_restart(void) | ||
5 | { | ||
6 | machine_restart(NULL); | ||
7 | } | ||
8 | |||
9 | #endif /* _ASM_GENERIC_EMERGENCY_RESTART_H */ | ||
diff --git a/include/asm-generic/page.h b/include/asm-generic/page.h new file mode 100644 index 000000000000..a96b5d986b6e --- /dev/null +++ b/include/asm-generic/page.h | |||
@@ -0,0 +1,26 @@ | |||
1 | #ifndef _ASM_GENERIC_PAGE_H | ||
2 | #define _ASM_GENERIC_PAGE_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | #ifndef __ASSEMBLY__ | ||
6 | |||
7 | #include <linux/compiler.h> | ||
8 | |||
9 | /* Pure 2^n version of get_order */ | ||
10 | static __inline__ __attribute_const__ int get_order(unsigned long size) | ||
11 | { | ||
12 | int order; | ||
13 | |||
14 | size = (size - 1) >> (PAGE_SHIFT - 1); | ||
15 | order = -1; | ||
16 | do { | ||
17 | size >>= 1; | ||
18 | order++; | ||
19 | } while (size); | ||
20 | return order; | ||
21 | } | ||
22 | |||
23 | #endif /* __ASSEMBLY__ */ | ||
24 | #endif /* __KERNEL__ */ | ||
25 | |||
26 | #endif /* _ASM_GENERIC_PAGE_H */ | ||
diff --git a/include/asm-generic/pci.h b/include/asm-generic/pci.h index 9d4cc47bde39..ee1d8b5d8168 100644 --- a/include/asm-generic/pci.h +++ b/include/asm-generic/pci.h | |||
@@ -22,6 +22,14 @@ pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, | |||
22 | region->end = res->end; | 22 | region->end = res->end; |
23 | } | 23 | } |
24 | 24 | ||
25 | static inline void | ||
26 | pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | ||
27 | struct pci_bus_region *region) | ||
28 | { | ||
29 | res->start = region->start; | ||
30 | res->end = region->end; | ||
31 | } | ||
32 | |||
25 | #define pcibios_scan_all_fns(a, b) 0 | 33 | #define pcibios_scan_all_fns(a, b) 0 |
26 | 34 | ||
27 | #ifndef HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ | 35 | #ifndef HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ |
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index f40593565173..f86c1e549466 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -101,6 +101,22 @@ do { \ | |||
101 | }) | 101 | }) |
102 | #endif | 102 | #endif |
103 | 103 | ||
104 | #ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL | ||
105 | #define ptep_get_and_clear_full(__mm, __address, __ptep, __full) \ | ||
106 | ({ \ | ||
107 | pte_t __pte; \ | ||
108 | __pte = ptep_get_and_clear((__mm), (__address), (__ptep)); \ | ||
109 | __pte; \ | ||
110 | }) | ||
111 | #endif | ||
112 | |||
113 | #ifndef __HAVE_ARCH_PTE_CLEAR_FULL | ||
114 | #define pte_clear_full(__mm, __address, __ptep, __full) \ | ||
115 | do { \ | ||
116 | pte_clear((__mm), (__address), (__ptep)); \ | ||
117 | } while (0) | ||
118 | #endif | ||
119 | |||
104 | #ifndef __HAVE_ARCH_PTEP_CLEAR_FLUSH | 120 | #ifndef __HAVE_ARCH_PTEP_CLEAR_FLUSH |
105 | #define ptep_clear_flush(__vma, __address, __ptep) \ | 121 | #define ptep_clear_flush(__vma, __address, __ptep) \ |
106 | ({ \ | 122 | ({ \ |
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index 195ccdc069e6..450eae22c39a 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h | |||
@@ -11,5 +11,6 @@ extern char _sinittext[], _einittext[]; | |||
11 | extern char _sextratext[] __attribute__((weak)); | 11 | extern char _sextratext[] __attribute__((weak)); |
12 | extern char _eextratext[] __attribute__((weak)); | 12 | extern char _eextratext[] __attribute__((weak)); |
13 | extern char _end[]; | 13 | extern char _end[]; |
14 | extern char __per_cpu_start[], __per_cpu_end[]; | ||
14 | 15 | ||
15 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ | 16 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ |