diff options
Diffstat (limited to 'arch/x86/include/asm/setup.h')
-rw-r--r-- | arch/x86/include/asm/setup.h | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h index 05c6f6b11fd5..bdc2ada05ae0 100644 --- a/arch/x86/include/asm/setup.h +++ b/arch/x86/include/asm/setup.h | |||
@@ -64,7 +64,7 @@ extern void x86_quirk_time_init(void); | |||
64 | #include <asm/bootparam.h> | 64 | #include <asm/bootparam.h> |
65 | 65 | ||
66 | /* Interrupt control for vSMPowered x86_64 systems */ | 66 | /* Interrupt control for vSMPowered x86_64 systems */ |
67 | #ifdef CONFIG_X86_VSMP | 67 | #ifdef CONFIG_X86_64 |
68 | void vsmp_init(void); | 68 | void vsmp_init(void); |
69 | #else | 69 | #else |
70 | static inline void vsmp_init(void) { } | 70 | static inline void vsmp_init(void) { } |
@@ -100,20 +100,51 @@ extern struct boot_params boot_params; | |||
100 | */ | 100 | */ |
101 | #define LOWMEMSIZE() (0x9f000) | 101 | #define LOWMEMSIZE() (0x9f000) |
102 | 102 | ||
103 | /* exceedingly early brk-like allocator */ | ||
104 | extern unsigned long _brk_end; | ||
105 | void *extend_brk(size_t size, size_t align); | ||
106 | |||
107 | /* | ||
108 | * Reserve space in the brk section. The name must be unique within | ||
109 | * the file, and somewhat descriptive. The size is in bytes. Must be | ||
110 | * used at file scope. | ||
111 | * | ||
112 | * (This uses a temp function to wrap the asm so we can pass it the | ||
113 | * size parameter; otherwise we wouldn't be able to. We can't use a | ||
114 | * "section" attribute on a normal variable because it always ends up | ||
115 | * being @progbits, which ends up allocating space in the vmlinux | ||
116 | * executable.) | ||
117 | */ | ||
118 | #define RESERVE_BRK(name,sz) \ | ||
119 | static void __section(.discard) __used \ | ||
120 | __brk_reservation_fn_##name##__(void) { \ | ||
121 | asm volatile ( \ | ||
122 | ".pushsection .brk_reservation,\"aw\",@nobits;" \ | ||
123 | ".brk." #name ":" \ | ||
124 | " 1:.skip %c0;" \ | ||
125 | " .size .brk." #name ", . - 1b;" \ | ||
126 | " .popsection" \ | ||
127 | : : "i" (sz)); \ | ||
128 | } | ||
129 | |||
103 | #ifdef __i386__ | 130 | #ifdef __i386__ |
104 | 131 | ||
105 | void __init i386_start_kernel(void); | 132 | void __init i386_start_kernel(void); |
106 | extern void probe_roms(void); | 133 | extern void probe_roms(void); |
107 | 134 | ||
108 | extern unsigned long init_pg_tables_start; | ||
109 | extern unsigned long init_pg_tables_end; | ||
110 | |||
111 | #else | 135 | #else |
112 | void __init x86_64_start_kernel(char *real_mode); | 136 | void __init x86_64_start_kernel(char *real_mode); |
113 | void __init x86_64_start_reservations(char *real_mode_data); | 137 | void __init x86_64_start_reservations(char *real_mode_data); |
114 | 138 | ||
115 | #endif /* __i386__ */ | 139 | #endif /* __i386__ */ |
116 | #endif /* _SETUP */ | 140 | #endif /* _SETUP */ |
141 | #else | ||
142 | #define RESERVE_BRK(name,sz) \ | ||
143 | .pushsection .brk_reservation,"aw",@nobits; \ | ||
144 | .brk.name: \ | ||
145 | 1: .skip sz; \ | ||
146 | .size .brk.name,.-1b; \ | ||
147 | .popsection | ||
117 | #endif /* __ASSEMBLY__ */ | 148 | #endif /* __ASSEMBLY__ */ |
118 | #endif /* __KERNEL__ */ | 149 | #endif /* __KERNEL__ */ |
119 | 150 | ||