diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-04-23 05:10:28 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-04-23 05:10:30 -0400 |
commit | 70bce3ba77540ebe77b8c0e1ac38d281a23fbb5e (patch) | |
tree | 34b09a49228f0949ff49dce66a433b0dfd83a2dc /arch | |
parent | 6eca8cc35b50af1037bc919106dd6dd332c959c2 (diff) | |
parent | d5a30458a90597915977f06e79406b664a41b8ac (diff) |
Merge branch 'linus' into perf/core
Merge reason: merge the latest fixes, update to latest -rc.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
133 files changed, 2233 insertions, 1063 deletions
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 0f23009170a1..6ab6b337a913 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -172,7 +172,7 @@ not_angel: | |||
172 | adr r0, LC0 | 172 | adr r0, LC0 |
173 | ARM( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip, sp}) | 173 | ARM( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip, sp}) |
174 | THUMB( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip} ) | 174 | THUMB( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip} ) |
175 | THUMB( ldr sp, [r0, #28] ) | 175 | THUMB( ldr sp, [r0, #32] ) |
176 | subs r0, r0, r1 @ calculate the delta offset | 176 | subs r0, r0, r1 @ calculate the delta offset |
177 | 177 | ||
178 | @ if delta is zero, we are | 178 | @ if delta is zero, we are |
diff --git a/arch/arm/include/asm/highmem.h b/arch/arm/include/asm/highmem.h index 7f36d00600b4..feb988a7ec37 100644 --- a/arch/arm/include/asm/highmem.h +++ b/arch/arm/include/asm/highmem.h | |||
@@ -11,7 +11,11 @@ | |||
11 | 11 | ||
12 | #define kmap_prot PAGE_KERNEL | 12 | #define kmap_prot PAGE_KERNEL |
13 | 13 | ||
14 | #define flush_cache_kmaps() flush_cache_all() | 14 | #define flush_cache_kmaps() \ |
15 | do { \ | ||
16 | if (cache_is_vivt()) \ | ||
17 | flush_cache_all(); \ | ||
18 | } while (0) | ||
15 | 19 | ||
16 | extern pte_t *pkmap_page_table; | 20 | extern pte_t *pkmap_page_table; |
17 | 21 | ||
@@ -21,11 +25,20 @@ extern void *kmap_high(struct page *page); | |||
21 | extern void *kmap_high_get(struct page *page); | 25 | extern void *kmap_high_get(struct page *page); |
22 | extern void kunmap_high(struct page *page); | 26 | extern void kunmap_high(struct page *page); |
23 | 27 | ||
28 | extern void *kmap_high_l1_vipt(struct page *page, pte_t *saved_pte); | ||
29 | extern void kunmap_high_l1_vipt(struct page *page, pte_t saved_pte); | ||
30 | |||
31 | /* | ||
32 | * The following functions are already defined by <linux/highmem.h> | ||
33 | * when CONFIG_HIGHMEM is not set. | ||
34 | */ | ||
35 | #ifdef CONFIG_HIGHMEM | ||
24 | extern void *kmap(struct page *page); | 36 | extern void *kmap(struct page *page); |
25 | extern void kunmap(struct page *page); | 37 | extern void kunmap(struct page *page); |
26 | extern void *kmap_atomic(struct page *page, enum km_type type); | 38 | extern void *kmap_atomic(struct page *page, enum km_type type); |
27 | extern void kunmap_atomic(void *kvaddr, enum km_type type); | 39 | extern void kunmap_atomic(void *kvaddr, enum km_type type); |
28 | extern void *kmap_atomic_pfn(unsigned long pfn, enum km_type type); | 40 | extern void *kmap_atomic_pfn(unsigned long pfn, enum km_type type); |
29 | extern struct page *kmap_atomic_to_page(const void *ptr); | 41 | extern struct page *kmap_atomic_to_page(const void *ptr); |
42 | #endif | ||
30 | 43 | ||
31 | #endif | 44 | #endif |
diff --git a/arch/arm/include/asm/kmap_types.h b/arch/arm/include/asm/kmap_types.h index c019949a5189..c4b2ea3fbe42 100644 --- a/arch/arm/include/asm/kmap_types.h +++ b/arch/arm/include/asm/kmap_types.h | |||
@@ -18,6 +18,7 @@ enum km_type { | |||
18 | KM_IRQ1, | 18 | KM_IRQ1, |
19 | KM_SOFTIRQ0, | 19 | KM_SOFTIRQ0, |
20 | KM_SOFTIRQ1, | 20 | KM_SOFTIRQ1, |
21 | KM_L1_CACHE, | ||
21 | KM_L2_CACHE, | 22 | KM_L2_CACHE, |
22 | KM_TYPE_NR | 23 | KM_TYPE_NR |
23 | }; | 24 | }; |
diff --git a/arch/arm/include/asm/ucontext.h b/arch/arm/include/asm/ucontext.h index bf65e9f4525d..47f023aa8495 100644 --- a/arch/arm/include/asm/ucontext.h +++ b/arch/arm/include/asm/ucontext.h | |||
@@ -59,23 +59,22 @@ struct iwmmxt_sigframe { | |||
59 | #endif /* CONFIG_IWMMXT */ | 59 | #endif /* CONFIG_IWMMXT */ |
60 | 60 | ||
61 | #ifdef CONFIG_VFP | 61 | #ifdef CONFIG_VFP |
62 | #if __LINUX_ARM_ARCH__ < 6 | ||
63 | /* For ARM pre-v6, we use fstmiax and fldmiax. This adds one extra | ||
64 | * word after the registers, and a word of padding at the end for | ||
65 | * alignment. */ | ||
66 | #define VFP_MAGIC 0x56465001 | 62 | #define VFP_MAGIC 0x56465001 |
67 | #define VFP_STORAGE_SIZE 152 | ||
68 | #else | ||
69 | #define VFP_MAGIC 0x56465002 | ||
70 | #define VFP_STORAGE_SIZE 144 | ||
71 | #endif | ||
72 | 63 | ||
73 | struct vfp_sigframe | 64 | struct vfp_sigframe |
74 | { | 65 | { |
75 | unsigned long magic; | 66 | unsigned long magic; |
76 | unsigned long size; | 67 | unsigned long size; |
77 | union vfp_state storage; | 68 | struct user_vfp ufp; |
78 | }; | 69 | struct user_vfp_exc ufp_exc; |
70 | } __attribute__((__aligned__(8))); | ||
71 | |||
72 | /* | ||
73 | * 8 byte for magic and size, 264 byte for ufp, 12 bytes for ufp_exc, | ||
74 | * 4 bytes padding. | ||
75 | */ | ||
76 | #define VFP_STORAGE_SIZE sizeof(struct vfp_sigframe) | ||
77 | |||
79 | #endif /* CONFIG_VFP */ | 78 | #endif /* CONFIG_VFP */ |
80 | 79 | ||
81 | /* | 80 | /* |
@@ -91,7 +90,7 @@ struct aux_sigframe { | |||
91 | #ifdef CONFIG_IWMMXT | 90 | #ifdef CONFIG_IWMMXT |
92 | struct iwmmxt_sigframe iwmmxt; | 91 | struct iwmmxt_sigframe iwmmxt; |
93 | #endif | 92 | #endif |
94 | #if 0 && defined CONFIG_VFP /* Not yet saved. */ | 93 | #ifdef CONFIG_VFP |
95 | struct vfp_sigframe vfp; | 94 | struct vfp_sigframe vfp; |
96 | #endif | 95 | #endif |
97 | /* Something that isn't a valid magic number for any coprocessor. */ | 96 | /* Something that isn't a valid magic number for any coprocessor. */ |
diff --git a/arch/arm/include/asm/user.h b/arch/arm/include/asm/user.h index df95e050f9dd..05ac4b06876a 100644 --- a/arch/arm/include/asm/user.h +++ b/arch/arm/include/asm/user.h | |||
@@ -83,11 +83,21 @@ struct user{ | |||
83 | 83 | ||
84 | /* | 84 | /* |
85 | * User specific VFP registers. If only VFPv2 is present, registers 16 to 31 | 85 | * User specific VFP registers. If only VFPv2 is present, registers 16 to 31 |
86 | * are ignored by the ptrace system call. | 86 | * are ignored by the ptrace system call and the signal handler. |
87 | */ | 87 | */ |
88 | struct user_vfp { | 88 | struct user_vfp { |
89 | unsigned long long fpregs[32]; | 89 | unsigned long long fpregs[32]; |
90 | unsigned long fpscr; | 90 | unsigned long fpscr; |
91 | }; | 91 | }; |
92 | 92 | ||
93 | /* | ||
94 | * VFP exception registers exposed to user space during signal delivery. | ||
95 | * Fields not relavant to the current VFP architecture are ignored. | ||
96 | */ | ||
97 | struct user_vfp_exc { | ||
98 | unsigned long fpexc; | ||
99 | unsigned long fpinst; | ||
100 | unsigned long fpinst2; | ||
101 | }; | ||
102 | |||
93 | #endif /* _ARM_USER_H */ | 103 | #endif /* _ARM_USER_H */ |
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index e7714f367eb8..907d5a620bca 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/cacheflush.h> | 18 | #include <asm/cacheflush.h> |
19 | #include <asm/ucontext.h> | 19 | #include <asm/ucontext.h> |
20 | #include <asm/unistd.h> | 20 | #include <asm/unistd.h> |
21 | #include <asm/vfp.h> | ||
21 | 22 | ||
22 | #include "ptrace.h" | 23 | #include "ptrace.h" |
23 | #include "signal.h" | 24 | #include "signal.h" |
@@ -175,6 +176,90 @@ static int restore_iwmmxt_context(struct iwmmxt_sigframe *frame) | |||
175 | 176 | ||
176 | #endif | 177 | #endif |
177 | 178 | ||
179 | #ifdef CONFIG_VFP | ||
180 | |||
181 | static int preserve_vfp_context(struct vfp_sigframe __user *frame) | ||
182 | { | ||
183 | struct thread_info *thread = current_thread_info(); | ||
184 | struct vfp_hard_struct *h = &thread->vfpstate.hard; | ||
185 | const unsigned long magic = VFP_MAGIC; | ||
186 | const unsigned long size = VFP_STORAGE_SIZE; | ||
187 | int err = 0; | ||
188 | |||
189 | vfp_sync_hwstate(thread); | ||
190 | __put_user_error(magic, &frame->magic, err); | ||
191 | __put_user_error(size, &frame->size, err); | ||
192 | |||
193 | /* | ||
194 | * Copy the floating point registers. There can be unused | ||
195 | * registers see asm/hwcap.h for details. | ||
196 | */ | ||
197 | err |= __copy_to_user(&frame->ufp.fpregs, &h->fpregs, | ||
198 | sizeof(h->fpregs)); | ||
199 | /* | ||
200 | * Copy the status and control register. | ||
201 | */ | ||
202 | __put_user_error(h->fpscr, &frame->ufp.fpscr, err); | ||
203 | |||
204 | /* | ||
205 | * Copy the exception registers. | ||
206 | */ | ||
207 | __put_user_error(h->fpexc, &frame->ufp_exc.fpexc, err); | ||
208 | __put_user_error(h->fpinst, &frame->ufp_exc.fpinst, err); | ||
209 | __put_user_error(h->fpinst2, &frame->ufp_exc.fpinst2, err); | ||
210 | |||
211 | return err ? -EFAULT : 0; | ||
212 | } | ||
213 | |||
214 | static int restore_vfp_context(struct vfp_sigframe __user *frame) | ||
215 | { | ||
216 | struct thread_info *thread = current_thread_info(); | ||
217 | struct vfp_hard_struct *h = &thread->vfpstate.hard; | ||
218 | unsigned long magic; | ||
219 | unsigned long size; | ||
220 | unsigned long fpexc; | ||
221 | int err = 0; | ||
222 | |||
223 | __get_user_error(magic, &frame->magic, err); | ||
224 | __get_user_error(size, &frame->size, err); | ||
225 | |||
226 | if (err) | ||
227 | return -EFAULT; | ||
228 | if (magic != VFP_MAGIC || size != VFP_STORAGE_SIZE) | ||
229 | return -EINVAL; | ||
230 | |||
231 | /* | ||
232 | * Copy the floating point registers. There can be unused | ||
233 | * registers see asm/hwcap.h for details. | ||
234 | */ | ||
235 | err |= __copy_from_user(&h->fpregs, &frame->ufp.fpregs, | ||
236 | sizeof(h->fpregs)); | ||
237 | /* | ||
238 | * Copy the status and control register. | ||
239 | */ | ||
240 | __get_user_error(h->fpscr, &frame->ufp.fpscr, err); | ||
241 | |||
242 | /* | ||
243 | * Sanitise and restore the exception registers. | ||
244 | */ | ||
245 | __get_user_error(fpexc, &frame->ufp_exc.fpexc, err); | ||
246 | /* Ensure the VFP is enabled. */ | ||
247 | fpexc |= FPEXC_EN; | ||
248 | /* Ensure FPINST2 is invalid and the exception flag is cleared. */ | ||
249 | fpexc &= ~(FPEXC_EX | FPEXC_FP2V); | ||
250 | h->fpexc = fpexc; | ||
251 | |||
252 | __get_user_error(h->fpinst, &frame->ufp_exc.fpinst, err); | ||
253 | __get_user_error(h->fpinst2, &frame->ufp_exc.fpinst2, err); | ||
254 | |||
255 | if (!err) | ||
256 | vfp_flush_hwstate(thread); | ||
257 | |||
258 | return err ? -EFAULT : 0; | ||
259 | } | ||
260 | |||
261 | #endif | ||
262 | |||
178 | /* | 263 | /* |
179 | * Do a signal return; undo the signal stack. These are aligned to 64-bit. | 264 | * Do a signal return; undo the signal stack. These are aligned to 64-bit. |
180 | */ | 265 | */ |
@@ -233,8 +318,8 @@ static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf) | |||
233 | err |= restore_iwmmxt_context(&aux->iwmmxt); | 318 | err |= restore_iwmmxt_context(&aux->iwmmxt); |
234 | #endif | 319 | #endif |
235 | #ifdef CONFIG_VFP | 320 | #ifdef CONFIG_VFP |
236 | // if (err == 0) | 321 | if (err == 0) |
237 | // err |= vfp_restore_state(&sf->aux.vfp); | 322 | err |= restore_vfp_context(&aux->vfp); |
238 | #endif | 323 | #endif |
239 | 324 | ||
240 | return err; | 325 | return err; |
@@ -348,8 +433,8 @@ setup_sigframe(struct sigframe __user *sf, struct pt_regs *regs, sigset_t *set) | |||
348 | err |= preserve_iwmmxt_context(&aux->iwmmxt); | 433 | err |= preserve_iwmmxt_context(&aux->iwmmxt); |
349 | #endif | 434 | #endif |
350 | #ifdef CONFIG_VFP | 435 | #ifdef CONFIG_VFP |
351 | // if (err == 0) | 436 | if (err == 0) |
352 | // err |= vfp_save_state(&sf->aux.vfp); | 437 | err |= preserve_vfp_context(&aux->vfp); |
353 | #endif | 438 | #endif |
354 | __put_user_error(0, &aux->end_magic, err); | 439 | __put_user_error(0, &aux->end_magic, err); |
355 | 440 | ||
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index 027dd570dcc3..d4004557532a 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile | |||
@@ -16,8 +16,8 @@ obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_d | |||
16 | obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o | 16 | obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o |
17 | obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o sam9_smc.o | 17 | obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o sam9_smc.o |
18 | obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o sam9_smc.o | 18 | obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o sam9_smc.o |
19 | obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o | 19 | obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o |
20 | obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o | 20 | obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o |
21 | obj-$(CONFIG_ARCH_AT91CAP9) += at91cap9.o at91sam926x_time.o at91cap9_devices.o sam9_smc.o | 21 | obj-$(CONFIG_ARCH_AT91CAP9) += at91cap9.o at91sam926x_time.o at91cap9_devices.o sam9_smc.o |
22 | obj-$(CONFIG_ARCH_AT572D940HF) += at572d940hf.o at91sam926x_time.o at572d940hf_devices.o sam9_smc.o | 22 | obj-$(CONFIG_ARCH_AT572D940HF) += at572d940hf.o at91sam926x_time.o at572d940hf_devices.o sam9_smc.o |
23 | obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o | 23 | obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o |
diff --git a/arch/arm/mach-at91/pm_slowclock.S b/arch/arm/mach-at91/pm_slowclock.S index 987fab3d846a..9c5b48e68a71 100644 --- a/arch/arm/mach-at91/pm_slowclock.S +++ b/arch/arm/mach-at91/pm_slowclock.S | |||
@@ -175,8 +175,6 @@ ENTRY(at91_slow_clock) | |||
175 | orr r3, r3, #(1 << 29) /* bit 29 always set */ | 175 | orr r3, r3, #(1 << 29) /* bit 29 always set */ |
176 | str r3, [r1, #(AT91_CKGR_PLLAR - AT91_PMC)] | 176 | str r3, [r1, #(AT91_CKGR_PLLAR - AT91_PMC)] |
177 | 177 | ||
178 | wait_pllalock | ||
179 | |||
180 | /* Save PLLB setting and disable it */ | 178 | /* Save PLLB setting and disable it */ |
181 | ldr r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)] | 179 | ldr r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)] |
182 | str r3, .saved_pllbr | 180 | str r3, .saved_pllbr |
@@ -184,8 +182,6 @@ ENTRY(at91_slow_clock) | |||
184 | mov r3, #AT91_PMC_PLLCOUNT | 182 | mov r3, #AT91_PMC_PLLCOUNT |
185 | str r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)] | 183 | str r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)] |
186 | 184 | ||
187 | wait_pllblock | ||
188 | |||
189 | /* Turn off the main oscillator */ | 185 | /* Turn off the main oscillator */ |
190 | ldr r3, [r1, #(AT91_CKGR_MOR - AT91_PMC)] | 186 | ldr r3, [r1, #(AT91_CKGR_MOR - AT91_PMC)] |
191 | bic r3, r3, #AT91_PMC_MOSCEN | 187 | bic r3, r3, #AT91_PMC_MOSCEN |
@@ -205,13 +201,25 @@ ENTRY(at91_slow_clock) | |||
205 | ldr r3, .saved_pllbr | 201 | ldr r3, .saved_pllbr |
206 | str r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)] | 202 | str r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)] |
207 | 203 | ||
204 | tst r3, #(AT91_PMC_MUL & 0xff0000) | ||
205 | bne 1f | ||
206 | tst r3, #(AT91_PMC_MUL & ~0xff0000) | ||
207 | beq 2f | ||
208 | 1: | ||
208 | wait_pllblock | 209 | wait_pllblock |
210 | 2: | ||
209 | 211 | ||
210 | /* Restore PLLA setting */ | 212 | /* Restore PLLA setting */ |
211 | ldr r3, .saved_pllar | 213 | ldr r3, .saved_pllar |
212 | str r3, [r1, #(AT91_CKGR_PLLAR - AT91_PMC)] | 214 | str r3, [r1, #(AT91_CKGR_PLLAR - AT91_PMC)] |
213 | 215 | ||
216 | tst r3, #(AT91_PMC_MUL & 0xff0000) | ||
217 | bne 3f | ||
218 | tst r3, #(AT91_PMC_MUL & ~0xff0000) | ||
219 | beq 4f | ||
220 | 3: | ||
214 | wait_pllalock | 221 | wait_pllalock |
222 | 4: | ||
215 | 223 | ||
216 | #ifdef SLOWDOWN_MASTER_CLOCK | 224 | #ifdef SLOWDOWN_MASTER_CLOCK |
217 | /* | 225 | /* |
diff --git a/arch/arm/mach-bcmring/dma.c b/arch/arm/mach-bcmring/dma.c index 2ccf670ce1ac..29c0a911df26 100644 --- a/arch/arm/mach-bcmring/dma.c +++ b/arch/arm/mach-bcmring/dma.c | |||
@@ -2221,11 +2221,15 @@ EXPORT_SYMBOL(dma_map_create_descriptor_ring); | |||
2221 | int dma_unmap(DMA_MemMap_t *memMap, /* Stores state information about the map */ | 2221 | int dma_unmap(DMA_MemMap_t *memMap, /* Stores state information about the map */ |
2222 | int dirtied /* non-zero if any of the pages were modified */ | 2222 | int dirtied /* non-zero if any of the pages were modified */ |
2223 | ) { | 2223 | ) { |
2224 | |||
2225 | int rc = 0; | ||
2224 | int regionIdx; | 2226 | int regionIdx; |
2225 | int segmentIdx; | 2227 | int segmentIdx; |
2226 | DMA_Region_t *region; | 2228 | DMA_Region_t *region; |
2227 | DMA_Segment_t *segment; | 2229 | DMA_Segment_t *segment; |
2228 | 2230 | ||
2231 | down(&memMap->lock); | ||
2232 | |||
2229 | for (regionIdx = 0; regionIdx < memMap->numRegionsUsed; regionIdx++) { | 2233 | for (regionIdx = 0; regionIdx < memMap->numRegionsUsed; regionIdx++) { |
2230 | region = &memMap->region[regionIdx]; | 2234 | region = &memMap->region[regionIdx]; |
2231 | 2235 | ||
@@ -2239,7 +2243,8 @@ int dma_unmap(DMA_MemMap_t *memMap, /* Stores state information about the map */ | |||
2239 | printk(KERN_ERR | 2243 | printk(KERN_ERR |
2240 | "%s: vmalloc'd pages are not yet supported\n", | 2244 | "%s: vmalloc'd pages are not yet supported\n", |
2241 | __func__); | 2245 | __func__); |
2242 | return -EINVAL; | 2246 | rc = -EINVAL; |
2247 | goto out; | ||
2243 | } | 2248 | } |
2244 | 2249 | ||
2245 | case DMA_MEM_TYPE_KMALLOC: | 2250 | case DMA_MEM_TYPE_KMALLOC: |
@@ -2276,7 +2281,8 @@ int dma_unmap(DMA_MemMap_t *memMap, /* Stores state information about the map */ | |||
2276 | printk(KERN_ERR | 2281 | printk(KERN_ERR |
2277 | "%s: Unsupported memory type: %d\n", | 2282 | "%s: Unsupported memory type: %d\n", |
2278 | __func__, region->memType); | 2283 | __func__, region->memType); |
2279 | return -EINVAL; | 2284 | rc = -EINVAL; |
2285 | goto out; | ||
2280 | } | 2286 | } |
2281 | } | 2287 | } |
2282 | 2288 | ||
@@ -2314,9 +2320,10 @@ int dma_unmap(DMA_MemMap_t *memMap, /* Stores state information about the map */ | |||
2314 | memMap->numRegionsUsed = 0; | 2320 | memMap->numRegionsUsed = 0; |
2315 | memMap->inUse = 0; | 2321 | memMap->inUse = 0; |
2316 | 2322 | ||
2323 | out: | ||
2317 | up(&memMap->lock); | 2324 | up(&memMap->lock); |
2318 | 2325 | ||
2319 | return 0; | 2326 | return rc; |
2320 | } | 2327 | } |
2321 | 2328 | ||
2322 | EXPORT_SYMBOL(dma_unmap); | 2329 | EXPORT_SYMBOL(dma_unmap); |
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c index cc377ae8c428..cf547ad7ebd4 100644 --- a/arch/arm/mach-ep93xx/gpio.c +++ b/arch/arm/mach-ep93xx/gpio.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
26 | 26 | ||
27 | /************************************************************************* | 27 | /************************************************************************* |
28 | * GPIO handling for EP93xx | 28 | * Interrupt handling for EP93xx on-chip GPIOs |
29 | *************************************************************************/ | 29 | *************************************************************************/ |
30 | static unsigned char gpio_int_unmasked[3]; | 30 | static unsigned char gpio_int_unmasked[3]; |
31 | static unsigned char gpio_int_enabled[3]; | 31 | static unsigned char gpio_int_enabled[3]; |
@@ -40,7 +40,7 @@ static const u8 eoi_register_offset[3] = { 0x98, 0xb4, 0x54 }; | |||
40 | static const u8 int_en_register_offset[3] = { 0x9c, 0xb8, 0x58 }; | 40 | static const u8 int_en_register_offset[3] = { 0x9c, 0xb8, 0x58 }; |
41 | static const u8 int_debounce_register_offset[3] = { 0xa8, 0xc4, 0x64 }; | 41 | static const u8 int_debounce_register_offset[3] = { 0xa8, 0xc4, 0x64 }; |
42 | 42 | ||
43 | void ep93xx_gpio_update_int_params(unsigned port) | 43 | static void ep93xx_gpio_update_int_params(unsigned port) |
44 | { | 44 | { |
45 | BUG_ON(port > 2); | 45 | BUG_ON(port > 2); |
46 | 46 | ||
@@ -56,7 +56,7 @@ void ep93xx_gpio_update_int_params(unsigned port) | |||
56 | EP93XX_GPIO_REG(int_en_register_offset[port])); | 56 | EP93XX_GPIO_REG(int_en_register_offset[port])); |
57 | } | 57 | } |
58 | 58 | ||
59 | void ep93xx_gpio_int_mask(unsigned line) | 59 | static inline void ep93xx_gpio_int_mask(unsigned line) |
60 | { | 60 | { |
61 | gpio_int_unmasked[line >> 3] &= ~(1 << (line & 7)); | 61 | gpio_int_unmasked[line >> 3] &= ~(1 << (line & 7)); |
62 | } | 62 | } |
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig index 3872af1cf2c3..170f68e46dd5 100644 --- a/arch/arm/mach-mx3/Kconfig +++ b/arch/arm/mach-mx3/Kconfig | |||
@@ -62,6 +62,15 @@ config MACH_MX31_3DS | |||
62 | Include support for MX31PDK (3DS) platform. This includes specific | 62 | Include support for MX31PDK (3DS) platform. This includes specific |
63 | configurations for the board and its peripherals. | 63 | configurations for the board and its peripherals. |
64 | 64 | ||
65 | config MACH_MX31_3DS_MXC_NAND_USE_BBT | ||
66 | bool "Make the MXC NAND driver use the in flash Bad Block Table" | ||
67 | depends on MACH_MX31_3DS | ||
68 | depends on MTD_NAND_MXC | ||
69 | help | ||
70 | Enable this if you want that the MXC NAND driver uses the in flash | ||
71 | Bad Block Table to know what blocks are bad instead of scanning the | ||
72 | entire flash looking for bad block markers. | ||
73 | |||
65 | config MACH_MX31MOBOARD | 74 | config MACH_MX31MOBOARD |
66 | bool "Support mx31moboard platforms (EPFL Mobots group)" | 75 | bool "Support mx31moboard platforms (EPFL Mobots group)" |
67 | select ARCH_MX31 | 76 | select ARCH_MX31 |
@@ -95,6 +104,7 @@ config MACH_PCM043 | |||
95 | config MACH_ARMADILLO5X0 | 104 | config MACH_ARMADILLO5X0 |
96 | bool "Support Atmark Armadillo-500 Development Base Board" | 105 | bool "Support Atmark Armadillo-500 Development Base Board" |
97 | select ARCH_MX31 | 106 | select ARCH_MX31 |
107 | select MXC_ULPI if USB_ULPI | ||
98 | help | 108 | help |
99 | Include support for Atmark Armadillo-500 platform. This includes | 109 | Include support for Atmark Armadillo-500 platform. This includes |
100 | specific configurations for the board and its peripherals. | 110 | specific configurations for the board and its peripherals. |
diff --git a/arch/arm/mach-mx3/clock-imx31.c b/arch/arm/mach-mx3/clock-imx31.c index 80dba9966b5e..9a9eb6de6127 100644 --- a/arch/arm/mach-mx3/clock-imx31.c +++ b/arch/arm/mach-mx3/clock-imx31.c | |||
@@ -468,6 +468,7 @@ static struct clk ahb_clk = { | |||
468 | } | 468 | } |
469 | 469 | ||
470 | DEFINE_CLOCK(perclk_clk, 0, NULL, 0, NULL, NULL, &ipg_clk); | 470 | DEFINE_CLOCK(perclk_clk, 0, NULL, 0, NULL, NULL, &ipg_clk); |
471 | DEFINE_CLOCK(ckil_clk, 0, NULL, 0, clk_ckil_get_rate, NULL, NULL); | ||
471 | 472 | ||
472 | DEFINE_CLOCK(sdhc1_clk, 0, MXC_CCM_CGR0, 0, NULL, NULL, &perclk_clk); | 473 | DEFINE_CLOCK(sdhc1_clk, 0, MXC_CCM_CGR0, 0, NULL, NULL, &perclk_clk); |
473 | DEFINE_CLOCK(sdhc2_clk, 1, MXC_CCM_CGR0, 2, NULL, NULL, &perclk_clk); | 474 | DEFINE_CLOCK(sdhc2_clk, 1, MXC_CCM_CGR0, 2, NULL, NULL, &perclk_clk); |
@@ -490,7 +491,7 @@ DEFINE_CLOCK(mpeg4_clk, 0, MXC_CCM_CGR1, 0, NULL, NULL, &ahb_clk); | |||
490 | DEFINE_CLOCK(mstick1_clk, 0, MXC_CCM_CGR1, 2, mstick1_get_rate, NULL, &usb_pll_clk); | 491 | DEFINE_CLOCK(mstick1_clk, 0, MXC_CCM_CGR1, 2, mstick1_get_rate, NULL, &usb_pll_clk); |
491 | DEFINE_CLOCK(mstick2_clk, 1, MXC_CCM_CGR1, 4, mstick2_get_rate, NULL, &usb_pll_clk); | 492 | DEFINE_CLOCK(mstick2_clk, 1, MXC_CCM_CGR1, 4, mstick2_get_rate, NULL, &usb_pll_clk); |
492 | DEFINE_CLOCK1(csi_clk, 0, MXC_CCM_CGR1, 6, csi, NULL, &serial_pll_clk); | 493 | DEFINE_CLOCK1(csi_clk, 0, MXC_CCM_CGR1, 6, csi, NULL, &serial_pll_clk); |
493 | DEFINE_CLOCK(rtc_clk, 0, MXC_CCM_CGR1, 8, NULL, NULL, &ipg_clk); | 494 | DEFINE_CLOCK(rtc_clk, 0, MXC_CCM_CGR1, 8, NULL, NULL, &ckil_clk); |
494 | DEFINE_CLOCK(wdog_clk, 0, MXC_CCM_CGR1, 10, NULL, NULL, &ipg_clk); | 495 | DEFINE_CLOCK(wdog_clk, 0, MXC_CCM_CGR1, 10, NULL, NULL, &ipg_clk); |
495 | DEFINE_CLOCK(pwm_clk, 0, MXC_CCM_CGR1, 12, NULL, NULL, &perclk_clk); | 496 | DEFINE_CLOCK(pwm_clk, 0, MXC_CCM_CGR1, 12, NULL, NULL, &perclk_clk); |
496 | DEFINE_CLOCK(usb_clk2, 0, MXC_CCM_CGR1, 18, usb_get_rate, NULL, &ahb_clk); | 497 | DEFINE_CLOCK(usb_clk2, 0, MXC_CCM_CGR1, 18, usb_get_rate, NULL, &ahb_clk); |
@@ -514,7 +515,6 @@ DEFINE_CLOCK(usb_clk1, 0, NULL, 0, usb_get_rate, NULL, &usb_pll_clk) | |||
514 | DEFINE_CLOCK(nfc_clk, 0, NULL, 0, nfc_get_rate, NULL, &ahb_clk); | 515 | DEFINE_CLOCK(nfc_clk, 0, NULL, 0, nfc_get_rate, NULL, &ahb_clk); |
515 | DEFINE_CLOCK(scc_clk, 0, NULL, 0, NULL, NULL, &ipg_clk); | 516 | DEFINE_CLOCK(scc_clk, 0, NULL, 0, NULL, NULL, &ipg_clk); |
516 | DEFINE_CLOCK(ipg_clk, 0, NULL, 0, ipg_get_rate, NULL, &ahb_clk); | 517 | DEFINE_CLOCK(ipg_clk, 0, NULL, 0, ipg_get_rate, NULL, &ahb_clk); |
517 | DEFINE_CLOCK(ckil_clk, 0, NULL, 0, clk_ckil_get_rate, NULL, NULL); | ||
518 | 518 | ||
519 | #define _REGISTER_CLOCK(d, n, c) \ | 519 | #define _REGISTER_CLOCK(d, n, c) \ |
520 | { \ | 520 | { \ |
@@ -572,7 +572,6 @@ static struct clk_lookup lookups[] = { | |||
572 | _REGISTER_CLOCK(NULL, "iim", iim_clk) | 572 | _REGISTER_CLOCK(NULL, "iim", iim_clk) |
573 | _REGISTER_CLOCK(NULL, "mpeg4", mpeg4_clk) | 573 | _REGISTER_CLOCK(NULL, "mpeg4", mpeg4_clk) |
574 | _REGISTER_CLOCK(NULL, "mbx", mbx_clk) | 574 | _REGISTER_CLOCK(NULL, "mbx", mbx_clk) |
575 | _REGISTER_CLOCK("mxc_rtc", NULL, ckil_clk) | ||
576 | }; | 575 | }; |
577 | 576 | ||
578 | int __init mx31_clocks_init(unsigned long fref) | 577 | int __init mx31_clocks_init(unsigned long fref) |
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index 6adb586515ea..f8911154a9fa 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c | |||
@@ -575,11 +575,26 @@ struct platform_device imx_ssi_device1 = { | |||
575 | .resource = imx_ssi_resources1, | 575 | .resource = imx_ssi_resources1, |
576 | }; | 576 | }; |
577 | 577 | ||
578 | static int mx3_devices_init(void) | 578 | static struct resource imx_wdt_resources[] = { |
579 | { | ||
580 | .flags = IORESOURCE_MEM, | ||
581 | }, | ||
582 | }; | ||
583 | |||
584 | struct platform_device imx_wdt_device0 = { | ||
585 | .name = "imx-wdt", | ||
586 | .id = 0, | ||
587 | .num_resources = ARRAY_SIZE(imx_wdt_resources), | ||
588 | .resource = imx_wdt_resources, | ||
589 | }; | ||
590 | |||
591 | static int __init mx3_devices_init(void) | ||
579 | { | 592 | { |
580 | if (cpu_is_mx31()) { | 593 | if (cpu_is_mx31()) { |
581 | mxc_nand_resources[0].start = MX31_NFC_BASE_ADDR; | 594 | mxc_nand_resources[0].start = MX31_NFC_BASE_ADDR; |
582 | mxc_nand_resources[0].end = MX31_NFC_BASE_ADDR + 0xfff; | 595 | mxc_nand_resources[0].end = MX31_NFC_BASE_ADDR + 0xfff; |
596 | imx_wdt_resources[0].start = MX31_WDOG_BASE_ADDR; | ||
597 | imx_wdt_resources[0].end = MX31_WDOG_BASE_ADDR + 0x3fff; | ||
583 | mxc_register_device(&mxc_rnga_device, NULL); | 598 | mxc_register_device(&mxc_rnga_device, NULL); |
584 | } | 599 | } |
585 | if (cpu_is_mx35()) { | 600 | if (cpu_is_mx35()) { |
@@ -597,6 +612,8 @@ static int mx3_devices_init(void) | |||
597 | imx_ssi_resources0[1].end = MX35_INT_SSI1; | 612 | imx_ssi_resources0[1].end = MX35_INT_SSI1; |
598 | imx_ssi_resources1[1].start = MX35_INT_SSI2; | 613 | imx_ssi_resources1[1].start = MX35_INT_SSI2; |
599 | imx_ssi_resources1[1].end = MX35_INT_SSI2; | 614 | imx_ssi_resources1[1].end = MX35_INT_SSI2; |
615 | imx_wdt_resources[0].start = MX35_WDOG_BASE_ADDR; | ||
616 | imx_wdt_resources[0].end = MX35_WDOG_BASE_ADDR + 0x3fff; | ||
600 | } | 617 | } |
601 | 618 | ||
602 | return 0; | 619 | return 0; |
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h index 42cf175eac6b..4f77eb501274 100644 --- a/arch/arm/mach-mx3/devices.h +++ b/arch/arm/mach-mx3/devices.h | |||
@@ -25,4 +25,5 @@ extern struct platform_device mxc_spi_device1; | |||
25 | extern struct platform_device mxc_spi_device2; | 25 | extern struct platform_device mxc_spi_device2; |
26 | extern struct platform_device imx_ssi_device0; | 26 | extern struct platform_device imx_ssi_device0; |
27 | extern struct platform_device imx_ssi_device1; | 27 | extern struct platform_device imx_ssi_device1; |
28 | 28 | extern struct platform_device imx_ssi_device1; | |
29 | extern struct platform_device imx_wdt_device0; | ||
diff --git a/arch/arm/mach-mx3/mach-armadillo5x0.c b/arch/arm/mach-mx3/mach-armadillo5x0.c index 3d72b0b89705..5f72ec91af2d 100644 --- a/arch/arm/mach-mx3/mach-armadillo5x0.c +++ b/arch/arm/mach-mx3/mach-armadillo5x0.c | |||
@@ -36,6 +36,9 @@ | |||
36 | #include <linux/input.h> | 36 | #include <linux/input.h> |
37 | #include <linux/gpio_keys.h> | 37 | #include <linux/gpio_keys.h> |
38 | #include <linux/i2c.h> | 38 | #include <linux/i2c.h> |
39 | #include <linux/usb/otg.h> | ||
40 | #include <linux/usb/ulpi.h> | ||
41 | #include <linux/delay.h> | ||
39 | 42 | ||
40 | #include <mach/hardware.h> | 43 | #include <mach/hardware.h> |
41 | #include <asm/mach-types.h> | 44 | #include <asm/mach-types.h> |
@@ -52,6 +55,8 @@ | |||
52 | #include <mach/ipu.h> | 55 | #include <mach/ipu.h> |
53 | #include <mach/mx3fb.h> | 56 | #include <mach/mx3fb.h> |
54 | #include <mach/mxc_nand.h> | 57 | #include <mach/mxc_nand.h> |
58 | #include <mach/mxc_ehci.h> | ||
59 | #include <mach/ulpi.h> | ||
55 | 60 | ||
56 | #include "devices.h" | 61 | #include "devices.h" |
57 | #include "crm_regs.h" | 62 | #include "crm_regs.h" |
@@ -103,8 +108,158 @@ static int armadillo5x0_pins[] = { | |||
103 | /* I2C2 */ | 108 | /* I2C2 */ |
104 | MX31_PIN_CSPI2_MOSI__SCL, | 109 | MX31_PIN_CSPI2_MOSI__SCL, |
105 | MX31_PIN_CSPI2_MISO__SDA, | 110 | MX31_PIN_CSPI2_MISO__SDA, |
111 | /* OTG */ | ||
112 | MX31_PIN_USBOTG_DATA0__USBOTG_DATA0, | ||
113 | MX31_PIN_USBOTG_DATA1__USBOTG_DATA1, | ||
114 | MX31_PIN_USBOTG_DATA2__USBOTG_DATA2, | ||
115 | MX31_PIN_USBOTG_DATA3__USBOTG_DATA3, | ||
116 | MX31_PIN_USBOTG_DATA4__USBOTG_DATA4, | ||
117 | MX31_PIN_USBOTG_DATA5__USBOTG_DATA5, | ||
118 | MX31_PIN_USBOTG_DATA6__USBOTG_DATA6, | ||
119 | MX31_PIN_USBOTG_DATA7__USBOTG_DATA7, | ||
120 | MX31_PIN_USBOTG_CLK__USBOTG_CLK, | ||
121 | MX31_PIN_USBOTG_DIR__USBOTG_DIR, | ||
122 | MX31_PIN_USBOTG_NXT__USBOTG_NXT, | ||
123 | MX31_PIN_USBOTG_STP__USBOTG_STP, | ||
124 | /* USB host 2 */ | ||
125 | IOMUX_MODE(MX31_PIN_USBH2_CLK, IOMUX_CONFIG_FUNC), | ||
126 | IOMUX_MODE(MX31_PIN_USBH2_DIR, IOMUX_CONFIG_FUNC), | ||
127 | IOMUX_MODE(MX31_PIN_USBH2_NXT, IOMUX_CONFIG_FUNC), | ||
128 | IOMUX_MODE(MX31_PIN_USBH2_STP, IOMUX_CONFIG_FUNC), | ||
129 | IOMUX_MODE(MX31_PIN_USBH2_DATA0, IOMUX_CONFIG_FUNC), | ||
130 | IOMUX_MODE(MX31_PIN_USBH2_DATA1, IOMUX_CONFIG_FUNC), | ||
131 | IOMUX_MODE(MX31_PIN_STXD3, IOMUX_CONFIG_FUNC), | ||
132 | IOMUX_MODE(MX31_PIN_SRXD3, IOMUX_CONFIG_FUNC), | ||
133 | IOMUX_MODE(MX31_PIN_SCK3, IOMUX_CONFIG_FUNC), | ||
134 | IOMUX_MODE(MX31_PIN_SFS3, IOMUX_CONFIG_FUNC), | ||
135 | IOMUX_MODE(MX31_PIN_STXD6, IOMUX_CONFIG_FUNC), | ||
136 | IOMUX_MODE(MX31_PIN_SRXD6, IOMUX_CONFIG_FUNC), | ||
106 | }; | 137 | }; |
107 | 138 | ||
139 | /* USB */ | ||
140 | #if defined(CONFIG_USB_ULPI) | ||
141 | |||
142 | #define OTG_RESET IOMUX_TO_GPIO(MX31_PIN_STXD4) | ||
143 | #define USBH2_RESET IOMUX_TO_GPIO(MX31_PIN_SCK6) | ||
144 | #define USBH2_CS IOMUX_TO_GPIO(MX31_PIN_GPIO1_3) | ||
145 | |||
146 | #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ | ||
147 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) | ||
148 | |||
149 | static int usbotg_init(struct platform_device *pdev) | ||
150 | { | ||
151 | int err; | ||
152 | |||
153 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA0, USB_PAD_CFG); | ||
154 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA1, USB_PAD_CFG); | ||
155 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA2, USB_PAD_CFG); | ||
156 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA3, USB_PAD_CFG); | ||
157 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA4, USB_PAD_CFG); | ||
158 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA5, USB_PAD_CFG); | ||
159 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA6, USB_PAD_CFG); | ||
160 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA7, USB_PAD_CFG); | ||
161 | mxc_iomux_set_pad(MX31_PIN_USBOTG_CLK, USB_PAD_CFG); | ||
162 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DIR, USB_PAD_CFG); | ||
163 | mxc_iomux_set_pad(MX31_PIN_USBOTG_NXT, USB_PAD_CFG); | ||
164 | mxc_iomux_set_pad(MX31_PIN_USBOTG_STP, USB_PAD_CFG); | ||
165 | |||
166 | /* Chip already enabled by hardware */ | ||
167 | /* OTG phy reset*/ | ||
168 | err = gpio_request(OTG_RESET, "USB-OTG-RESET"); | ||
169 | if (err) { | ||
170 | pr_err("Failed to request the usb otg reset gpio\n"); | ||
171 | return err; | ||
172 | } | ||
173 | |||
174 | err = gpio_direction_output(OTG_RESET, 1/*HIGH*/); | ||
175 | if (err) { | ||
176 | pr_err("Failed to reset the usb otg phy\n"); | ||
177 | goto otg_free_reset; | ||
178 | } | ||
179 | |||
180 | gpio_set_value(OTG_RESET, 0/*LOW*/); | ||
181 | mdelay(5); | ||
182 | gpio_set_value(OTG_RESET, 1/*HIGH*/); | ||
183 | |||
184 | return 0; | ||
185 | |||
186 | otg_free_reset: | ||
187 | gpio_free(OTG_RESET); | ||
188 | return err; | ||
189 | } | ||
190 | |||
191 | static int usbh2_init(struct platform_device *pdev) | ||
192 | { | ||
193 | int err; | ||
194 | |||
195 | mxc_iomux_set_pad(MX31_PIN_USBH2_CLK, USB_PAD_CFG); | ||
196 | mxc_iomux_set_pad(MX31_PIN_USBH2_DIR, USB_PAD_CFG); | ||
197 | mxc_iomux_set_pad(MX31_PIN_USBH2_NXT, USB_PAD_CFG); | ||
198 | mxc_iomux_set_pad(MX31_PIN_USBH2_STP, USB_PAD_CFG); | ||
199 | mxc_iomux_set_pad(MX31_PIN_USBH2_DATA0, USB_PAD_CFG); | ||
200 | mxc_iomux_set_pad(MX31_PIN_USBH2_DATA1, USB_PAD_CFG); | ||
201 | mxc_iomux_set_pad(MX31_PIN_SRXD6, USB_PAD_CFG); | ||
202 | mxc_iomux_set_pad(MX31_PIN_STXD6, USB_PAD_CFG); | ||
203 | mxc_iomux_set_pad(MX31_PIN_SFS3, USB_PAD_CFG); | ||
204 | mxc_iomux_set_pad(MX31_PIN_SCK3, USB_PAD_CFG); | ||
205 | mxc_iomux_set_pad(MX31_PIN_SRXD3, USB_PAD_CFG); | ||
206 | mxc_iomux_set_pad(MX31_PIN_STXD3, USB_PAD_CFG); | ||
207 | |||
208 | mxc_iomux_set_gpr(MUX_PGP_UH2, true); | ||
209 | |||
210 | |||
211 | /* Enable the chip */ | ||
212 | err = gpio_request(USBH2_CS, "USB-H2-CS"); | ||
213 | if (err) { | ||
214 | pr_err("Failed to request the usb host 2 CS gpio\n"); | ||
215 | return err; | ||
216 | } | ||
217 | |||
218 | err = gpio_direction_output(USBH2_CS, 0/*Enabled*/); | ||
219 | if (err) { | ||
220 | pr_err("Failed to drive the usb host 2 CS gpio\n"); | ||
221 | goto h2_free_cs; | ||
222 | } | ||
223 | |||
224 | /* H2 phy reset*/ | ||
225 | err = gpio_request(USBH2_RESET, "USB-H2-RESET"); | ||
226 | if (err) { | ||
227 | pr_err("Failed to request the usb host 2 reset gpio\n"); | ||
228 | goto h2_free_cs; | ||
229 | } | ||
230 | |||
231 | err = gpio_direction_output(USBH2_RESET, 1/*HIGH*/); | ||
232 | if (err) { | ||
233 | pr_err("Failed to reset the usb host 2 phy\n"); | ||
234 | goto h2_free_reset; | ||
235 | } | ||
236 | |||
237 | gpio_set_value(USBH2_RESET, 0/*LOW*/); | ||
238 | mdelay(5); | ||
239 | gpio_set_value(USBH2_RESET, 1/*HIGH*/); | ||
240 | |||
241 | return 0; | ||
242 | |||
243 | h2_free_reset: | ||
244 | gpio_free(USBH2_RESET); | ||
245 | h2_free_cs: | ||
246 | gpio_free(USBH2_CS); | ||
247 | return err; | ||
248 | } | ||
249 | |||
250 | static struct mxc_usbh_platform_data usbotg_pdata = { | ||
251 | .init = usbotg_init, | ||
252 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, | ||
253 | .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI, | ||
254 | }; | ||
255 | |||
256 | static struct mxc_usbh_platform_data usbh2_pdata = { | ||
257 | .init = usbh2_init, | ||
258 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, | ||
259 | .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI, | ||
260 | }; | ||
261 | #endif /* CONFIG_USB_ULPI */ | ||
262 | |||
108 | /* RTC over I2C*/ | 263 | /* RTC over I2C*/ |
109 | #define ARMADILLO5X0_RTC_GPIO IOMUX_TO_GPIO(MX31_PIN_SRXD4) | 264 | #define ARMADILLO5X0_RTC_GPIO IOMUX_TO_GPIO(MX31_PIN_SRXD4) |
110 | 265 | ||
@@ -393,6 +548,17 @@ static void __init armadillo5x0_init(void) | |||
393 | if (armadillo5x0_i2c_rtc.irq == 0) | 548 | if (armadillo5x0_i2c_rtc.irq == 0) |
394 | pr_warning("armadillo5x0_init: failed to get RTC IRQ\n"); | 549 | pr_warning("armadillo5x0_init: failed to get RTC IRQ\n"); |
395 | i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1); | 550 | i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1); |
551 | |||
552 | /* USB */ | ||
553 | #if defined(CONFIG_USB_ULPI) | ||
554 | usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
555 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
556 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
557 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
558 | |||
559 | mxc_register_device(&mxc_otg_host, &usbotg_pdata); | ||
560 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); | ||
561 | #endif | ||
396 | } | 562 | } |
397 | 563 | ||
398 | static void __init armadillo5x0_timer_init(void) | 564 | static void __init armadillo5x0_timer_init(void) |
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c index b88c18ad7698..f54af1e29ca4 100644 --- a/arch/arm/mach-mx3/mach-mx31_3ds.c +++ b/arch/arm/mach-mx3/mach-mx31_3ds.c | |||
@@ -23,6 +23,9 @@ | |||
23 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
24 | #include <linux/smsc911x.h> | 24 | #include <linux/smsc911x.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/mfd/mc13783.h> | ||
27 | #include <linux/spi/spi.h> | ||
28 | #include <linux/regulator/machine.h> | ||
26 | 29 | ||
27 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
28 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
@@ -31,26 +34,96 @@ | |||
31 | #include <asm/memory.h> | 34 | #include <asm/memory.h> |
32 | #include <asm/mach/map.h> | 35 | #include <asm/mach/map.h> |
33 | #include <mach/common.h> | 36 | #include <mach/common.h> |
34 | #include <mach/board-mx31pdk.h> | 37 | #include <mach/board-mx31_3ds.h> |
35 | #include <mach/imx-uart.h> | 38 | #include <mach/imx-uart.h> |
36 | #include <mach/iomux-mx3.h> | 39 | #include <mach/iomux-mx3.h> |
40 | #include <mach/mxc_nand.h> | ||
41 | #include <mach/spi.h> | ||
37 | #include "devices.h" | 42 | #include "devices.h" |
38 | 43 | ||
39 | /*! | 44 | /*! |
40 | * @file mx31pdk.c | 45 | * @file mx31_3ds.c |
41 | * | 46 | * |
42 | * @brief This file contains the board-specific initialization routines. | 47 | * @brief This file contains the board-specific initialization routines. |
43 | * | 48 | * |
44 | * @ingroup System | 49 | * @ingroup System |
45 | */ | 50 | */ |
46 | 51 | ||
47 | static int mx31pdk_pins[] = { | 52 | static int mx31_3ds_pins[] = { |
48 | /* UART1 */ | 53 | /* UART1 */ |
49 | MX31_PIN_CTS1__CTS1, | 54 | MX31_PIN_CTS1__CTS1, |
50 | MX31_PIN_RTS1__RTS1, | 55 | MX31_PIN_RTS1__RTS1, |
51 | MX31_PIN_TXD1__TXD1, | 56 | MX31_PIN_TXD1__TXD1, |
52 | MX31_PIN_RXD1__RXD1, | 57 | MX31_PIN_RXD1__RXD1, |
53 | IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO), | 58 | IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO), |
59 | /* SPI 1 */ | ||
60 | MX31_PIN_CSPI2_SCLK__SCLK, | ||
61 | MX31_PIN_CSPI2_MOSI__MOSI, | ||
62 | MX31_PIN_CSPI2_MISO__MISO, | ||
63 | MX31_PIN_CSPI2_SPI_RDY__SPI_RDY, | ||
64 | MX31_PIN_CSPI2_SS0__SS0, | ||
65 | MX31_PIN_CSPI2_SS2__SS2, /*CS for MC13783 */ | ||
66 | /* MC13783 IRQ */ | ||
67 | IOMUX_MODE(MX31_PIN_GPIO1_3, IOMUX_CONFIG_GPIO), | ||
68 | }; | ||
69 | |||
70 | /* Regulators */ | ||
71 | static struct regulator_init_data pwgtx_init = { | ||
72 | .constraints = { | ||
73 | .boot_on = 1, | ||
74 | .always_on = 1, | ||
75 | }, | ||
76 | }; | ||
77 | |||
78 | static struct mc13783_regulator_init_data mx31_3ds_regulators[] = { | ||
79 | { | ||
80 | .id = MC13783_REGU_PWGT1SPI, /* Power Gate for ARM core. */ | ||
81 | .init_data = &pwgtx_init, | ||
82 | }, { | ||
83 | .id = MC13783_REGU_PWGT2SPI, /* Power Gate for L2 Cache. */ | ||
84 | .init_data = &pwgtx_init, | ||
85 | }, | ||
86 | }; | ||
87 | |||
88 | /* MC13783 */ | ||
89 | static struct mc13783_platform_data mc13783_pdata __initdata = { | ||
90 | .regulators = mx31_3ds_regulators, | ||
91 | .num_regulators = ARRAY_SIZE(mx31_3ds_regulators), | ||
92 | .flags = MC13783_USE_REGULATOR, | ||
93 | }; | ||
94 | |||
95 | /* SPI */ | ||
96 | static int spi1_internal_chipselect[] = { | ||
97 | MXC_SPI_CS(0), | ||
98 | MXC_SPI_CS(2), | ||
99 | }; | ||
100 | |||
101 | static struct spi_imx_master spi1_pdata = { | ||
102 | .chipselect = spi1_internal_chipselect, | ||
103 | .num_chipselect = ARRAY_SIZE(spi1_internal_chipselect), | ||
104 | }; | ||
105 | |||
106 | static struct spi_board_info mx31_3ds_spi_devs[] __initdata = { | ||
107 | { | ||
108 | .modalias = "mc13783", | ||
109 | .max_speed_hz = 1000000, | ||
110 | .bus_num = 1, | ||
111 | .chip_select = 1, /* SS2 */ | ||
112 | .platform_data = &mc13783_pdata, | ||
113 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3), | ||
114 | .mode = SPI_CS_HIGH, | ||
115 | }, | ||
116 | }; | ||
117 | |||
118 | /* | ||
119 | * NAND Flash | ||
120 | */ | ||
121 | static struct mxc_nand_platform_data imx31_3ds_nand_flash_pdata = { | ||
122 | .width = 1, | ||
123 | .hw_ecc = 1, | ||
124 | #ifdef MACH_MX31_3DS_MXC_NAND_USE_BBT | ||
125 | .flash_bbt = 1, | ||
126 | #endif | ||
54 | }; | 127 | }; |
55 | 128 | ||
56 | static struct imxuart_platform_data uart_pdata = { | 129 | static struct imxuart_platform_data uart_pdata = { |
@@ -95,7 +168,7 @@ static struct platform_device smsc911x_device = { | |||
95 | * LEDs, switches, interrupts for Ethernet. | 168 | * LEDs, switches, interrupts for Ethernet. |
96 | */ | 169 | */ |
97 | 170 | ||
98 | static void mx31pdk_expio_irq_handler(uint32_t irq, struct irq_desc *desc) | 171 | static void mx31_3ds_expio_irq_handler(uint32_t irq, struct irq_desc *desc) |
99 | { | 172 | { |
100 | uint32_t imr_val; | 173 | uint32_t imr_val; |
101 | uint32_t int_valid; | 174 | uint32_t int_valid; |
@@ -163,7 +236,7 @@ static struct irq_chip expio_irq_chip = { | |||
163 | .unmask = expio_unmask_irq, | 236 | .unmask = expio_unmask_irq, |
164 | }; | 237 | }; |
165 | 238 | ||
166 | static int __init mx31pdk_init_expio(void) | 239 | static int __init mx31_3ds_init_expio(void) |
167 | { | 240 | { |
168 | int i; | 241 | int i; |
169 | int ret; | 242 | int ret; |
@@ -176,7 +249,7 @@ static int __init mx31pdk_init_expio(void) | |||
176 | return -ENODEV; | 249 | return -ENODEV; |
177 | } | 250 | } |
178 | 251 | ||
179 | pr_info("i.MX31PDK Debug board detected, rev = 0x%04X\n", | 252 | pr_info("i.MX31 3DS Debug board detected, rev = 0x%04X\n", |
180 | __raw_readw(CPLD_CODE_VER_REG)); | 253 | __raw_readw(CPLD_CODE_VER_REG)); |
181 | 254 | ||
182 | /* | 255 | /* |
@@ -201,7 +274,7 @@ static int __init mx31pdk_init_expio(void) | |||
201 | set_irq_flags(i, IRQF_VALID); | 274 | set_irq_flags(i, IRQF_VALID); |
202 | } | 275 | } |
203 | set_irq_type(EXPIO_PARENT_INT, IRQ_TYPE_LEVEL_LOW); | 276 | set_irq_type(EXPIO_PARENT_INT, IRQ_TYPE_LEVEL_LOW); |
204 | set_irq_chained_handler(EXPIO_PARENT_INT, mx31pdk_expio_irq_handler); | 277 | set_irq_chained_handler(EXPIO_PARENT_INT, mx31_3ds_expio_irq_handler); |
205 | 278 | ||
206 | return 0; | 279 | return 0; |
207 | } | 280 | } |
@@ -209,7 +282,7 @@ static int __init mx31pdk_init_expio(void) | |||
209 | /* | 282 | /* |
210 | * This structure defines the MX31 memory map. | 283 | * This structure defines the MX31 memory map. |
211 | */ | 284 | */ |
212 | static struct map_desc mx31pdk_io_desc[] __initdata = { | 285 | static struct map_desc mx31_3ds_io_desc[] __initdata = { |
213 | { | 286 | { |
214 | .virtual = MX31_CS5_BASE_ADDR_VIRT, | 287 | .virtual = MX31_CS5_BASE_ADDR_VIRT, |
215 | .pfn = __phys_to_pfn(MX31_CS5_BASE_ADDR), | 288 | .pfn = __phys_to_pfn(MX31_CS5_BASE_ADDR), |
@@ -221,10 +294,10 @@ static struct map_desc mx31pdk_io_desc[] __initdata = { | |||
221 | /* | 294 | /* |
222 | * Set up static virtual mappings. | 295 | * Set up static virtual mappings. |
223 | */ | 296 | */ |
224 | static void __init mx31pdk_map_io(void) | 297 | static void __init mx31_3ds_map_io(void) |
225 | { | 298 | { |
226 | mx31_map_io(); | 299 | mx31_map_io(); |
227 | iotable_init(mx31pdk_io_desc, ARRAY_SIZE(mx31pdk_io_desc)); | 300 | iotable_init(mx31_3ds_io_desc, ARRAY_SIZE(mx31_3ds_io_desc)); |
228 | } | 301 | } |
229 | 302 | ||
230 | /*! | 303 | /*! |
@@ -232,35 +305,40 @@ static void __init mx31pdk_map_io(void) | |||
232 | */ | 305 | */ |
233 | static void __init mxc_board_init(void) | 306 | static void __init mxc_board_init(void) |
234 | { | 307 | { |
235 | mxc_iomux_setup_multiple_pins(mx31pdk_pins, ARRAY_SIZE(mx31pdk_pins), | 308 | mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins), |
236 | "mx31pdk"); | 309 | "mx31_3ds"); |
237 | 310 | ||
238 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 311 | mxc_register_device(&mxc_uart_device0, &uart_pdata); |
312 | mxc_register_device(&mxc_nand_device, &imx31_3ds_nand_flash_pdata); | ||
313 | |||
314 | mxc_register_device(&mxc_spi_device1, &spi1_pdata); | ||
315 | spi_register_board_info(mx31_3ds_spi_devs, | ||
316 | ARRAY_SIZE(mx31_3ds_spi_devs)); | ||
239 | 317 | ||
240 | if (!mx31pdk_init_expio()) | 318 | if (!mx31_3ds_init_expio()) |
241 | platform_device_register(&smsc911x_device); | 319 | platform_device_register(&smsc911x_device); |
242 | } | 320 | } |
243 | 321 | ||
244 | static void __init mx31pdk_timer_init(void) | 322 | static void __init mx31_3ds_timer_init(void) |
245 | { | 323 | { |
246 | mx31_clocks_init(26000000); | 324 | mx31_clocks_init(26000000); |
247 | } | 325 | } |
248 | 326 | ||
249 | static struct sys_timer mx31pdk_timer = { | 327 | static struct sys_timer mx31_3ds_timer = { |
250 | .init = mx31pdk_timer_init, | 328 | .init = mx31_3ds_timer_init, |
251 | }; | 329 | }; |
252 | 330 | ||
253 | /* | 331 | /* |
254 | * The following uses standard kernel macros defined in arch.h in order to | 332 | * The following uses standard kernel macros defined in arch.h in order to |
255 | * initialize __mach_desc_MX31PDK data structure. | 333 | * initialize __mach_desc_MX31_3DS data structure. |
256 | */ | 334 | */ |
257 | MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") | 335 | MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") |
258 | /* Maintainer: Freescale Semiconductor, Inc. */ | 336 | /* Maintainer: Freescale Semiconductor, Inc. */ |
259 | .phys_io = MX31_AIPS1_BASE_ADDR, | 337 | .phys_io = MX31_AIPS1_BASE_ADDR, |
260 | .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc, | 338 | .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc, |
261 | .boot_params = MX3x_PHYS_OFFSET + 0x100, | 339 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
262 | .map_io = mx31pdk_map_io, | 340 | .map_io = mx31_3ds_map_io, |
263 | .init_irq = mx31_init_irq, | 341 | .init_irq = mx31_init_irq, |
264 | .init_machine = mxc_board_init, | 342 | .init_machine = mxc_board_init, |
265 | .timer = &mx31pdk_timer, | 343 | .timer = &mx31_3ds_timer, |
266 | MACHINE_END | 344 | MACHINE_END |
diff --git a/arch/arm/mach-mx3/mach-pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c index 034ec8190065..2df1ec55a97e 100644 --- a/arch/arm/mach-mx3/mach-pcm037.c +++ b/arch/arm/mach-mx3/mach-pcm037.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/can/platform/sja1000.h> | 35 | #include <linux/can/platform/sja1000.h> |
36 | #include <linux/usb/otg.h> | 36 | #include <linux/usb/otg.h> |
37 | #include <linux/usb/ulpi.h> | 37 | #include <linux/usb/ulpi.h> |
38 | #include <linux/fsl_devices.h> | ||
39 | #include <linux/gfp.h> | 38 | #include <linux/gfp.h> |
40 | 39 | ||
41 | #include <media/soc_camera.h> | 40 | #include <media/soc_camera.h> |
diff --git a/arch/arm/mach-mx3/mx31lite-db.c b/arch/arm/mach-mx3/mx31lite-db.c index ccd874225c3b..093c595ca581 100644 --- a/arch/arm/mach-mx3/mx31lite-db.c +++ b/arch/arm/mach-mx3/mx31lite-db.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/gpio.h> | 30 | #include <linux/gpio.h> |
31 | #include <linux/platform_device.h> | ||
32 | #include <linux/leds.h> | 31 | #include <linux/leds.h> |
33 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
34 | 33 | ||
@@ -206,5 +205,6 @@ void __init mx31lite_db_init(void) | |||
206 | mxc_register_device(&mxcsdhc_device0, &mmc_pdata); | 205 | mxc_register_device(&mxcsdhc_device0, &mmc_pdata); |
207 | mxc_register_device(&mxc_spi_device0, &spi0_pdata); | 206 | mxc_register_device(&mxc_spi_device0, &spi0_pdata); |
208 | platform_device_register(&litekit_led_device); | 207 | platform_device_register(&litekit_led_device); |
208 | mxc_register_device(&imx_wdt_device0, NULL); | ||
209 | } | 209 | } |
210 | 210 | ||
diff --git a/arch/arm/mach-mx5/clock-mx51.c b/arch/arm/mach-mx5/clock-mx51.c index be90c03101cd..8f85f73b83a8 100644 --- a/arch/arm/mach-mx5/clock-mx51.c +++ b/arch/arm/mach-mx5/clock-mx51.c | |||
@@ -757,7 +757,7 @@ DEFINE_CLOCK(uart3_ipg_clk, 2, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG7_OFFSET, | |||
757 | 757 | ||
758 | /* GPT */ | 758 | /* GPT */ |
759 | DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG9_OFFSET, | 759 | DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG9_OFFSET, |
760 | NULL, NULL, &ipg_perclk, NULL); | 760 | NULL, NULL, &ipg_clk, NULL); |
761 | DEFINE_CLOCK(gpt_ipg_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG10_OFFSET, | 761 | DEFINE_CLOCK(gpt_ipg_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG10_OFFSET, |
762 | NULL, NULL, &ipg_clk, NULL); | 762 | NULL, NULL, &ipg_clk, NULL); |
763 | 763 | ||
diff --git a/arch/arm/mach-mx5/cpu.c b/arch/arm/mach-mx5/cpu.c index 41c769f08c4d..2d37785e3857 100644 --- a/arch/arm/mach-mx5/cpu.c +++ b/arch/arm/mach-mx5/cpu.c | |||
@@ -14,9 +14,62 @@ | |||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/module.h> | ||
17 | #include <mach/hardware.h> | 18 | #include <mach/hardware.h> |
18 | #include <asm/io.h> | 19 | #include <asm/io.h> |
19 | 20 | ||
21 | static int cpu_silicon_rev = -1; | ||
22 | |||
23 | #define SI_REV 0x48 | ||
24 | |||
25 | static void query_silicon_parameter(void) | ||
26 | { | ||
27 | void __iomem *rom = ioremap(MX51_IROM_BASE_ADDR, MX51_IROM_SIZE); | ||
28 | u32 rev; | ||
29 | |||
30 | if (!rom) { | ||
31 | cpu_silicon_rev = -EINVAL; | ||
32 | return; | ||
33 | } | ||
34 | |||
35 | rev = readl(rom + SI_REV); | ||
36 | switch (rev) { | ||
37 | case 0x1: | ||
38 | cpu_silicon_rev = MX51_CHIP_REV_1_0; | ||
39 | break; | ||
40 | case 0x2: | ||
41 | cpu_silicon_rev = MX51_CHIP_REV_1_1; | ||
42 | break; | ||
43 | case 0x10: | ||
44 | cpu_silicon_rev = MX51_CHIP_REV_2_0; | ||
45 | break; | ||
46 | case 0x20: | ||
47 | cpu_silicon_rev = MX51_CHIP_REV_3_0; | ||
48 | break; | ||
49 | default: | ||
50 | cpu_silicon_rev = 0; | ||
51 | } | ||
52 | |||
53 | iounmap(rom); | ||
54 | } | ||
55 | |||
56 | /* | ||
57 | * Returns: | ||
58 | * the silicon revision of the cpu | ||
59 | * -EINVAL - not a mx51 | ||
60 | */ | ||
61 | int mx51_revision(void) | ||
62 | { | ||
63 | if (!cpu_is_mx51()) | ||
64 | return -EINVAL; | ||
65 | |||
66 | if (cpu_silicon_rev == -1) | ||
67 | query_silicon_parameter(); | ||
68 | |||
69 | return cpu_silicon_rev; | ||
70 | } | ||
71 | EXPORT_SYMBOL(mx51_revision); | ||
72 | |||
20 | static int __init post_cpu_init(void) | 73 | static int __init post_cpu_init(void) |
21 | { | 74 | { |
22 | unsigned int reg; | 75 | unsigned int reg; |
diff --git a/arch/arm/mach-mx5/mm.c b/arch/arm/mach-mx5/mm.c index c21e18be7af8..b7677ef80cc4 100644 --- a/arch/arm/mach-mx5/mm.c +++ b/arch/arm/mach-mx5/mm.c | |||
@@ -35,11 +35,6 @@ static struct map_desc mxc_io_desc[] __initdata = { | |||
35 | .length = MX51_DEBUG_SIZE, | 35 | .length = MX51_DEBUG_SIZE, |
36 | .type = MT_DEVICE | 36 | .type = MT_DEVICE |
37 | }, { | 37 | }, { |
38 | .virtual = MX51_TZIC_BASE_ADDR_VIRT, | ||
39 | .pfn = __phys_to_pfn(MX51_TZIC_BASE_ADDR), | ||
40 | .length = MX51_TZIC_SIZE, | ||
41 | .type = MT_DEVICE | ||
42 | }, { | ||
43 | .virtual = MX51_AIPS1_BASE_ADDR_VIRT, | 38 | .virtual = MX51_AIPS1_BASE_ADDR_VIRT, |
44 | .pfn = __phys_to_pfn(MX51_AIPS1_BASE_ADDR), | 39 | .pfn = __phys_to_pfn(MX51_AIPS1_BASE_ADDR), |
45 | .length = MX51_AIPS1_SIZE, | 40 | .length = MX51_AIPS1_SIZE, |
@@ -54,11 +49,6 @@ static struct map_desc mxc_io_desc[] __initdata = { | |||
54 | .pfn = __phys_to_pfn(MX51_AIPS2_BASE_ADDR), | 49 | .pfn = __phys_to_pfn(MX51_AIPS2_BASE_ADDR), |
55 | .length = MX51_AIPS2_SIZE, | 50 | .length = MX51_AIPS2_SIZE, |
56 | .type = MT_DEVICE | 51 | .type = MT_DEVICE |
57 | }, { | ||
58 | .virtual = MX51_NFC_AXI_BASE_ADDR_VIRT, | ||
59 | .pfn = __phys_to_pfn(MX51_NFC_AXI_BASE_ADDR), | ||
60 | .length = MX51_NFC_AXI_SIZE, | ||
61 | .type = MT_DEVICE | ||
62 | }, | 52 | }, |
63 | }; | 53 | }; |
64 | 54 | ||
@@ -69,14 +59,6 @@ static struct map_desc mxc_io_desc[] __initdata = { | |||
69 | */ | 59 | */ |
70 | void __init mx51_map_io(void) | 60 | void __init mx51_map_io(void) |
71 | { | 61 | { |
72 | u32 tzic_addr; | ||
73 | |||
74 | if (mx51_revision() < MX51_CHIP_REV_2_0) | ||
75 | tzic_addr = 0x8FFFC000; | ||
76 | else | ||
77 | tzic_addr = 0xE0003000; | ||
78 | mxc_io_desc[2].pfn = __phys_to_pfn(tzic_addr); | ||
79 | |||
80 | mxc_set_cpu_type(MXC_CPU_MX51); | 62 | mxc_set_cpu_type(MXC_CPU_MX51); |
81 | mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); | 63 | mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); |
82 | mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG_BASE_ADDR)); | 64 | mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG_BASE_ADDR)); |
@@ -85,5 +67,17 @@ void __init mx51_map_io(void) | |||
85 | 67 | ||
86 | void __init mx51_init_irq(void) | 68 | void __init mx51_init_irq(void) |
87 | { | 69 | { |
88 | tzic_init_irq(MX51_IO_ADDRESS(MX51_TZIC_BASE_ADDR)); | 70 | unsigned long tzic_addr; |
71 | void __iomem *tzic_virt; | ||
72 | |||
73 | if (mx51_revision() < MX51_CHIP_REV_2_0) | ||
74 | tzic_addr = MX51_TZIC_BASE_ADDR_TO1; | ||
75 | else | ||
76 | tzic_addr = MX51_TZIC_BASE_ADDR; | ||
77 | |||
78 | tzic_virt = ioremap(tzic_addr, SZ_16K); | ||
79 | if (!tzic_virt) | ||
80 | panic("unable to map TZIC interrupt controller\n"); | ||
81 | |||
82 | tzic_init_irq(tzic_virt); | ||
89 | } | 83 | } |
diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c index 8bca4dea6dfa..f55fa1044f72 100644 --- a/arch/arm/mm/copypage-v6.c +++ b/arch/arm/mm/copypage-v6.c | |||
@@ -41,14 +41,7 @@ static void v6_copy_user_highpage_nonaliasing(struct page *to, | |||
41 | kfrom = kmap_atomic(from, KM_USER0); | 41 | kfrom = kmap_atomic(from, KM_USER0); |
42 | kto = kmap_atomic(to, KM_USER1); | 42 | kto = kmap_atomic(to, KM_USER1); |
43 | copy_page(kto, kfrom); | 43 | copy_page(kto, kfrom); |
44 | #ifdef CONFIG_HIGHMEM | 44 | __cpuc_flush_dcache_area(kto, PAGE_SIZE); |
45 | /* | ||
46 | * kmap_atomic() doesn't set the page virtual address, and | ||
47 | * kunmap_atomic() takes care of cache flushing already. | ||
48 | */ | ||
49 | if (page_address(to) != NULL) | ||
50 | #endif | ||
51 | __cpuc_flush_dcache_area(kto, PAGE_SIZE); | ||
52 | kunmap_atomic(kto, KM_USER1); | 45 | kunmap_atomic(kto, KM_USER1); |
53 | kunmap_atomic(kfrom, KM_USER0); | 46 | kunmap_atomic(kfrom, KM_USER0); |
54 | } | 47 | } |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 1351edc0b26f..13fa536d82e6 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -464,6 +464,11 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset, | |||
464 | vaddr += offset; | 464 | vaddr += offset; |
465 | op(vaddr, len, dir); | 465 | op(vaddr, len, dir); |
466 | kunmap_high(page); | 466 | kunmap_high(page); |
467 | } else if (cache_is_vipt()) { | ||
468 | pte_t saved_pte; | ||
469 | vaddr = kmap_high_l1_vipt(page, &saved_pte); | ||
470 | op(vaddr + offset, len, dir); | ||
471 | kunmap_high_l1_vipt(page, saved_pte); | ||
467 | } | 472 | } |
468 | } else { | 473 | } else { |
469 | vaddr = page_address(page) + offset; | 474 | vaddr = page_address(page) + offset; |
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index e34f095e2090..c6844cb9b508 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <asm/cacheflush.h> | 14 | #include <asm/cacheflush.h> |
15 | #include <asm/cachetype.h> | 15 | #include <asm/cachetype.h> |
16 | #include <asm/highmem.h> | ||
16 | #include <asm/smp_plat.h> | 17 | #include <asm/smp_plat.h> |
17 | #include <asm/system.h> | 18 | #include <asm/system.h> |
18 | #include <asm/tlbflush.h> | 19 | #include <asm/tlbflush.h> |
@@ -152,21 +153,25 @@ void copy_to_user_page(struct vm_area_struct *vma, struct page *page, | |||
152 | 153 | ||
153 | void __flush_dcache_page(struct address_space *mapping, struct page *page) | 154 | void __flush_dcache_page(struct address_space *mapping, struct page *page) |
154 | { | 155 | { |
155 | void *addr = page_address(page); | ||
156 | |||
157 | /* | 156 | /* |
158 | * Writeback any data associated with the kernel mapping of this | 157 | * Writeback any data associated with the kernel mapping of this |
159 | * page. This ensures that data in the physical page is mutually | 158 | * page. This ensures that data in the physical page is mutually |
160 | * coherent with the kernels mapping. | 159 | * coherent with the kernels mapping. |
161 | */ | 160 | */ |
162 | #ifdef CONFIG_HIGHMEM | 161 | if (!PageHighMem(page)) { |
163 | /* | 162 | __cpuc_flush_dcache_area(page_address(page), PAGE_SIZE); |
164 | * kmap_atomic() doesn't set the page virtual address, and | 163 | } else { |
165 | * kunmap_atomic() takes care of cache flushing already. | 164 | void *addr = kmap_high_get(page); |
166 | */ | 165 | if (addr) { |
167 | if (addr) | 166 | __cpuc_flush_dcache_area(addr, PAGE_SIZE); |
168 | #endif | 167 | kunmap_high(page); |
169 | __cpuc_flush_dcache_area(addr, PAGE_SIZE); | 168 | } else if (cache_is_vipt()) { |
169 | pte_t saved_pte; | ||
170 | addr = kmap_high_l1_vipt(page, &saved_pte); | ||
171 | __cpuc_flush_dcache_area(addr, PAGE_SIZE); | ||
172 | kunmap_high_l1_vipt(page, saved_pte); | ||
173 | } | ||
174 | } | ||
170 | 175 | ||
171 | /* | 176 | /* |
172 | * If this is a page cache page, and we have an aliasing VIPT cache, | 177 | * If this is a page cache page, and we have an aliasing VIPT cache, |
diff --git a/arch/arm/mm/highmem.c b/arch/arm/mm/highmem.c index 2be1ec7c1b41..77b030f5ec09 100644 --- a/arch/arm/mm/highmem.c +++ b/arch/arm/mm/highmem.c | |||
@@ -79,7 +79,8 @@ void kunmap_atomic(void *kvaddr, enum km_type type) | |||
79 | unsigned int idx = type + KM_TYPE_NR * smp_processor_id(); | 79 | unsigned int idx = type + KM_TYPE_NR * smp_processor_id(); |
80 | 80 | ||
81 | if (kvaddr >= (void *)FIXADDR_START) { | 81 | if (kvaddr >= (void *)FIXADDR_START) { |
82 | __cpuc_flush_dcache_area((void *)vaddr, PAGE_SIZE); | 82 | if (cache_is_vivt()) |
83 | __cpuc_flush_dcache_area((void *)vaddr, PAGE_SIZE); | ||
83 | #ifdef CONFIG_DEBUG_HIGHMEM | 84 | #ifdef CONFIG_DEBUG_HIGHMEM |
84 | BUG_ON(vaddr != __fix_to_virt(FIX_KMAP_BEGIN + idx)); | 85 | BUG_ON(vaddr != __fix_to_virt(FIX_KMAP_BEGIN + idx)); |
85 | set_pte_ext(TOP_PTE(vaddr), __pte(0), 0); | 86 | set_pte_ext(TOP_PTE(vaddr), __pte(0), 0); |
@@ -124,3 +125,87 @@ struct page *kmap_atomic_to_page(const void *ptr) | |||
124 | pte = TOP_PTE(vaddr); | 125 | pte = TOP_PTE(vaddr); |
125 | return pte_page(*pte); | 126 | return pte_page(*pte); |
126 | } | 127 | } |
128 | |||
129 | #ifdef CONFIG_CPU_CACHE_VIPT | ||
130 | |||
131 | #include <linux/percpu.h> | ||
132 | |||
133 | /* | ||
134 | * The VIVT cache of a highmem page is always flushed before the page | ||
135 | * is unmapped. Hence unmapped highmem pages need no cache maintenance | ||
136 | * in that case. | ||
137 | * | ||
138 | * However unmapped pages may still be cached with a VIPT cache, and | ||
139 | * it is not possible to perform cache maintenance on them using physical | ||
140 | * addresses unfortunately. So we have no choice but to set up a temporary | ||
141 | * virtual mapping for that purpose. | ||
142 | * | ||
143 | * Yet this VIPT cache maintenance may be triggered from DMA support | ||
144 | * functions which are possibly called from interrupt context. As we don't | ||
145 | * want to keep interrupt disabled all the time when such maintenance is | ||
146 | * taking place, we therefore allow for some reentrancy by preserving and | ||
147 | * restoring the previous fixmap entry before the interrupted context is | ||
148 | * resumed. If the reentrancy depth is 0 then there is no need to restore | ||
149 | * the previous fixmap, and leaving the current one in place allow it to | ||
150 | * be reused the next time without a TLB flush (common with DMA). | ||
151 | */ | ||
152 | |||
153 | static DEFINE_PER_CPU(int, kmap_high_l1_vipt_depth); | ||
154 | |||
155 | void *kmap_high_l1_vipt(struct page *page, pte_t *saved_pte) | ||
156 | { | ||
157 | unsigned int idx, cpu = smp_processor_id(); | ||
158 | int *depth = &per_cpu(kmap_high_l1_vipt_depth, cpu); | ||
159 | unsigned long vaddr, flags; | ||
160 | pte_t pte, *ptep; | ||
161 | |||
162 | idx = KM_L1_CACHE + KM_TYPE_NR * cpu; | ||
163 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); | ||
164 | ptep = TOP_PTE(vaddr); | ||
165 | pte = mk_pte(page, kmap_prot); | ||
166 | |||
167 | if (!in_interrupt()) | ||
168 | preempt_disable(); | ||
169 | |||
170 | raw_local_irq_save(flags); | ||
171 | (*depth)++; | ||
172 | if (pte_val(*ptep) == pte_val(pte)) { | ||
173 | *saved_pte = pte; | ||
174 | } else { | ||
175 | *saved_pte = *ptep; | ||
176 | set_pte_ext(ptep, pte, 0); | ||
177 | local_flush_tlb_kernel_page(vaddr); | ||
178 | } | ||
179 | raw_local_irq_restore(flags); | ||
180 | |||
181 | return (void *)vaddr; | ||
182 | } | ||
183 | |||
184 | void kunmap_high_l1_vipt(struct page *page, pte_t saved_pte) | ||
185 | { | ||
186 | unsigned int idx, cpu = smp_processor_id(); | ||
187 | int *depth = &per_cpu(kmap_high_l1_vipt_depth, cpu); | ||
188 | unsigned long vaddr, flags; | ||
189 | pte_t pte, *ptep; | ||
190 | |||
191 | idx = KM_L1_CACHE + KM_TYPE_NR * cpu; | ||
192 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); | ||
193 | ptep = TOP_PTE(vaddr); | ||
194 | pte = mk_pte(page, kmap_prot); | ||
195 | |||
196 | BUG_ON(pte_val(*ptep) != pte_val(pte)); | ||
197 | BUG_ON(*depth <= 0); | ||
198 | |||
199 | raw_local_irq_save(flags); | ||
200 | (*depth)--; | ||
201 | if (*depth != 0 && pte_val(pte) != pte_val(saved_pte)) { | ||
202 | set_pte_ext(ptep, saved_pte, 0); | ||
203 | local_flush_tlb_kernel_page(vaddr); | ||
204 | } | ||
205 | raw_local_irq_restore(flags); | ||
206 | |||
207 | if (!in_interrupt()) | ||
208 | preempt_enable(); | ||
209 | } | ||
210 | |||
211 | #endif /* CONFIG_CPU_CACHE_VIPT */ | ||
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 9d4da6ac28eb..241c24a1c18f 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -420,6 +420,10 @@ static void __init build_mem_type_table(void) | |||
420 | user_pgprot |= L_PTE_SHARED; | 420 | user_pgprot |= L_PTE_SHARED; |
421 | kern_pgprot |= L_PTE_SHARED; | 421 | kern_pgprot |= L_PTE_SHARED; |
422 | vecs_pgprot |= L_PTE_SHARED; | 422 | vecs_pgprot |= L_PTE_SHARED; |
423 | mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_S; | ||
424 | mem_types[MT_DEVICE_WC].prot_pte |= L_PTE_SHARED; | ||
425 | mem_types[MT_DEVICE_CACHED].prot_sect |= PMD_SECT_S; | ||
426 | mem_types[MT_DEVICE_CACHED].prot_pte |= L_PTE_SHARED; | ||
423 | mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S; | 427 | mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S; |
424 | mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_S; | 428 | mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_S; |
425 | #endif | 429 | #endif |
@@ -1050,10 +1054,12 @@ void setup_mm_for_reboot(char mode) | |||
1050 | pgd_t *pgd; | 1054 | pgd_t *pgd; |
1051 | int i; | 1055 | int i; |
1052 | 1056 | ||
1053 | if (current->mm && current->mm->pgd) | 1057 | /* |
1054 | pgd = current->mm->pgd; | 1058 | * We need to access to user-mode page tables here. For kernel threads |
1055 | else | 1059 | * we don't have any user-mode mappings so we use the context that we |
1056 | pgd = init_mm.pgd; | 1060 | * "borrowed". |
1061 | */ | ||
1062 | pgd = current->active_mm->pgd; | ||
1057 | 1063 | ||
1058 | base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT; | 1064 | base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT; |
1059 | if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) | 1065 | if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) |
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31pdk.h b/arch/arm/plat-mxc/include/mach/board-mx31_3ds.h index 2bbd6ed17f50..da92933a233b 100644 --- a/arch/arm/plat-mxc/include/mach/board-mx31pdk.h +++ b/arch/arm/plat-mxc/include/mach/board-mx31_3ds.h | |||
@@ -8,8 +8,8 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef __ASM_ARCH_MXC_BOARD_MX31PDK_H__ | 11 | #ifndef __ASM_ARCH_MXC_BOARD_MX31_3DS_H__ |
12 | #define __ASM_ARCH_MXC_BOARD_MX31PDK_H__ | 12 | #define __ASM_ARCH_MXC_BOARD_MX31_3DS_H__ |
13 | 13 | ||
14 | /* Definitions for components on the Debug board */ | 14 | /* Definitions for components on the Debug board */ |
15 | 15 | ||
@@ -56,4 +56,4 @@ | |||
56 | 56 | ||
57 | #define MXC_MAX_EXP_IO_LINES 16 | 57 | #define MXC_MAX_EXP_IO_LINES 16 |
58 | 58 | ||
59 | #endif /* __ASM_ARCH_MXC_BOARD_MX31PDK_H__ */ | 59 | #endif /* __ASM_ARCH_MXC_BOARD_MX31_3DS_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/mx51.h b/arch/arm/plat-mxc/include/mach/mx51.h index 771532b6b4a6..5aad344d5651 100644 --- a/arch/arm/plat-mxc/include/mach/mx51.h +++ b/arch/arm/plat-mxc/include/mach/mx51.h | |||
@@ -14,7 +14,7 @@ | |||
14 | * FB100000 70000000 1M SPBA 0 | 14 | * FB100000 70000000 1M SPBA 0 |
15 | * FB000000 73F00000 1M AIPS 1 | 15 | * FB000000 73F00000 1M AIPS 1 |
16 | * FB200000 83F00000 1M AIPS 2 | 16 | * FB200000 83F00000 1M AIPS 2 |
17 | * FA100000 8FFFC000 16K TZIC (interrupt controller) | 17 | * 8FFFC000 16K TZIC (interrupt controller) |
18 | * 90000000 256M CSD0 SDRAM/DDR | 18 | * 90000000 256M CSD0 SDRAM/DDR |
19 | * A0000000 256M CSD1 SDRAM/DDR | 19 | * A0000000 256M CSD1 SDRAM/DDR |
20 | * B0000000 128M CS0 Flash | 20 | * B0000000 128M CS0 Flash |
@@ -23,11 +23,17 @@ | |||
23 | * C8000000 64M CS3 Flash | 23 | * C8000000 64M CS3 Flash |
24 | * CC000000 32M CS4 SRAM | 24 | * CC000000 32M CS4 SRAM |
25 | * CE000000 32M CS5 SRAM | 25 | * CE000000 32M CS5 SRAM |
26 | * F9000000 CFFF0000 64K NFC (NAND Flash AXI) | 26 | * CFFF0000 64K NFC (NAND Flash AXI) |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * IROM | ||
32 | */ | ||
33 | #define MX51_IROM_BASE_ADDR 0x0 | ||
34 | #define MX51_IROM_SIZE SZ_64K | ||
35 | |||
36 | /* | ||
31 | * IRAM | 37 | * IRAM |
32 | */ | 38 | */ |
33 | #define MX51_IRAM_BASE_ADDR 0x1FFE0000 /* internal ram */ | 39 | #define MX51_IRAM_BASE_ADDR 0x1FFE0000 /* internal ram */ |
@@ -40,7 +46,6 @@ | |||
40 | * NFC | 46 | * NFC |
41 | */ | 47 | */ |
42 | #define MX51_NFC_AXI_BASE_ADDR 0xCFFF0000 /* NAND flash AXI */ | 48 | #define MX51_NFC_AXI_BASE_ADDR 0xCFFF0000 /* NAND flash AXI */ |
43 | #define MX51_NFC_AXI_BASE_ADDR_VIRT 0xF9000000 | ||
44 | #define MX51_NFC_AXI_SIZE SZ_64K | 49 | #define MX51_NFC_AXI_SIZE SZ_64K |
45 | 50 | ||
46 | /* | 51 | /* |
@@ -49,9 +54,8 @@ | |||
49 | #define MX51_GPU_BASE_ADDR 0x20000000 | 54 | #define MX51_GPU_BASE_ADDR 0x20000000 |
50 | #define MX51_GPU2D_BASE_ADDR 0xD0000000 | 55 | #define MX51_GPU2D_BASE_ADDR 0xD0000000 |
51 | 56 | ||
52 | #define MX51_TZIC_BASE_ADDR 0x8FFFC000 | 57 | #define MX51_TZIC_BASE_ADDR_TO1 0x8FFFC000 |
53 | #define MX51_TZIC_BASE_ADDR_VIRT 0xFA100000 | 58 | #define MX51_TZIC_BASE_ADDR 0xE0000000 |
54 | #define MX51_TZIC_SIZE SZ_16K | ||
55 | 59 | ||
56 | #define MX51_DEBUG_BASE_ADDR 0x60000000 | 60 | #define MX51_DEBUG_BASE_ADDR 0x60000000 |
57 | #define MX51_DEBUG_BASE_ADDR_VIRT 0xFA200000 | 61 | #define MX51_DEBUG_BASE_ADDR_VIRT 0xFA200000 |
@@ -232,12 +236,10 @@ | |||
232 | #define MX51_IO_ADDRESS(x) \ | 236 | #define MX51_IO_ADDRESS(x) \ |
233 | (void __iomem *) \ | 237 | (void __iomem *) \ |
234 | (MX51_IS_MODULE(x, IRAM) ? MX51_IRAM_IO_ADDRESS(x) : \ | 238 | (MX51_IS_MODULE(x, IRAM) ? MX51_IRAM_IO_ADDRESS(x) : \ |
235 | MX51_IS_MODULE(x, TZIC) ? MX51_TZIC_IO_ADDRESS(x) : \ | ||
236 | MX51_IS_MODULE(x, DEBUG) ? MX51_DEBUG_IO_ADDRESS(x) : \ | 239 | MX51_IS_MODULE(x, DEBUG) ? MX51_DEBUG_IO_ADDRESS(x) : \ |
237 | MX51_IS_MODULE(x, SPBA0) ? MX51_SPBA0_IO_ADDRESS(x) : \ | 240 | MX51_IS_MODULE(x, SPBA0) ? MX51_SPBA0_IO_ADDRESS(x) : \ |
238 | MX51_IS_MODULE(x, AIPS1) ? MX51_AIPS1_IO_ADDRESS(x) : \ | 241 | MX51_IS_MODULE(x, AIPS1) ? MX51_AIPS1_IO_ADDRESS(x) : \ |
239 | MX51_IS_MODULE(x, AIPS2) ? MX51_AIPS2_IO_ADDRESS(x) : \ | 242 | MX51_IS_MODULE(x, AIPS2) ? MX51_AIPS2_IO_ADDRESS(x) : \ |
240 | MX51_IS_MODULE(x, NFC_AXI) ? MX51_NFC_AXI_IO_ADDRESS(x) : \ | ||
241 | 0xDEADBEEF) | 243 | 0xDEADBEEF) |
242 | 244 | ||
243 | /* | 245 | /* |
@@ -246,9 +248,6 @@ | |||
246 | #define MX51_IRAM_IO_ADDRESS(x) \ | 248 | #define MX51_IRAM_IO_ADDRESS(x) \ |
247 | (((x) - MX51_IRAM_BASE_ADDR) + MX51_IRAM_BASE_ADDR_VIRT) | 249 | (((x) - MX51_IRAM_BASE_ADDR) + MX51_IRAM_BASE_ADDR_VIRT) |
248 | 250 | ||
249 | #define MX51_TZIC_IO_ADDRESS(x) \ | ||
250 | (((x) - MX51_TZIC_BASE_ADDR) + MX51_TZIC_BASE_ADDR_VIRT) | ||
251 | |||
252 | #define MX51_DEBUG_IO_ADDRESS(x) \ | 251 | #define MX51_DEBUG_IO_ADDRESS(x) \ |
253 | (((x) - MX51_DEBUG_BASE_ADDR) + MX51_DEBUG_BASE_ADDR_VIRT) | 252 | (((x) - MX51_DEBUG_BASE_ADDR) + MX51_DEBUG_BASE_ADDR_VIRT) |
254 | 253 | ||
@@ -261,9 +260,6 @@ | |||
261 | #define MX51_AIPS2_IO_ADDRESS(x) \ | 260 | #define MX51_AIPS2_IO_ADDRESS(x) \ |
262 | (((x) - MX51_AIPS2_BASE_ADDR) + MX51_AIPS2_BASE_ADDR_VIRT) | 261 | (((x) - MX51_AIPS2_BASE_ADDR) + MX51_AIPS2_BASE_ADDR_VIRT) |
263 | 262 | ||
264 | #define MX51_NFC_AXI_IO_ADDRESS(x) \ | ||
265 | (((x) - MX51_NFC_AXI_BASE_ADDR) + MX51_NFC_AXI_BASE_ADDR_VIRT) | ||
266 | |||
267 | #define MX51_IS_MEM_DEVICE_NONSHARED(x) 0 | 263 | #define MX51_IS_MEM_DEVICE_NONSHARED(x) 0 |
268 | 264 | ||
269 | /* | 265 | /* |
@@ -443,12 +439,7 @@ | |||
443 | 439 | ||
444 | #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) | 440 | #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) |
445 | 441 | ||
446 | extern unsigned int system_rev; | 442 | extern int mx51_revision(void); |
447 | |||
448 | static inline unsigned int mx51_revision(void) | ||
449 | { | ||
450 | return system_rev; | ||
451 | } | ||
452 | #endif | 443 | #endif |
453 | 444 | ||
454 | #endif /* __ASM_ARCH_MXC_MX51_H__ */ | 445 | #endif /* __ASM_ARCH_MXC_MX51_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h index 52e476a150ca..b6d3d0fddc48 100644 --- a/arch/arm/plat-mxc/include/mach/uncompress.h +++ b/arch/arm/plat-mxc/include/mach/uncompress.h | |||
@@ -66,6 +66,7 @@ static inline void flush(void) | |||
66 | #define MX2X_UART1_BASE_ADDR 0x1000a000 | 66 | #define MX2X_UART1_BASE_ADDR 0x1000a000 |
67 | #define MX3X_UART1_BASE_ADDR 0x43F90000 | 67 | #define MX3X_UART1_BASE_ADDR 0x43F90000 |
68 | #define MX3X_UART2_BASE_ADDR 0x43F94000 | 68 | #define MX3X_UART2_BASE_ADDR 0x43F94000 |
69 | #define MX51_UART1_BASE_ADDR 0x73fbc000 | ||
69 | 70 | ||
70 | static __inline__ void __arch_decomp_setup(unsigned long arch_id) | 71 | static __inline__ void __arch_decomp_setup(unsigned long arch_id) |
71 | { | 72 | { |
@@ -101,6 +102,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id) | |||
101 | case MACH_TYPE_MAGX_ZN5: | 102 | case MACH_TYPE_MAGX_ZN5: |
102 | uart_base = MX3X_UART2_BASE_ADDR; | 103 | uart_base = MX3X_UART2_BASE_ADDR; |
103 | break; | 104 | break; |
105 | case MACH_TYPE_MX51_BABBAGE: | ||
106 | uart_base = MX51_UART1_BASE_ADDR; | ||
107 | break; | ||
104 | default: | 108 | default: |
105 | break; | 109 | break; |
106 | } | 110 | } |
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index a420cb949328..315a540c7ce5 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -428,26 +428,6 @@ static void vfp_pm_init(void) | |||
428 | static inline void vfp_pm_init(void) { } | 428 | static inline void vfp_pm_init(void) { } |
429 | #endif /* CONFIG_PM */ | 429 | #endif /* CONFIG_PM */ |
430 | 430 | ||
431 | /* | ||
432 | * Synchronise the hardware VFP state of a thread other than current with the | ||
433 | * saved one. This function is used by the ptrace mechanism. | ||
434 | */ | ||
435 | #ifdef CONFIG_SMP | ||
436 | void vfp_sync_hwstate(struct thread_info *thread) | ||
437 | { | ||
438 | } | ||
439 | |||
440 | void vfp_flush_hwstate(struct thread_info *thread) | ||
441 | { | ||
442 | /* | ||
443 | * On SMP systems, the VFP state is automatically saved at every | ||
444 | * context switch. We mark the thread VFP state as belonging to a | ||
445 | * non-existent CPU so that the saved one will be reloaded when | ||
446 | * needed. | ||
447 | */ | ||
448 | thread->vfpstate.hard.cpu = NR_CPUS; | ||
449 | } | ||
450 | #else | ||
451 | void vfp_sync_hwstate(struct thread_info *thread) | 431 | void vfp_sync_hwstate(struct thread_info *thread) |
452 | { | 432 | { |
453 | unsigned int cpu = get_cpu(); | 433 | unsigned int cpu = get_cpu(); |
@@ -490,9 +470,18 @@ void vfp_flush_hwstate(struct thread_info *thread) | |||
490 | last_VFP_context[cpu] = NULL; | 470 | last_VFP_context[cpu] = NULL; |
491 | } | 471 | } |
492 | 472 | ||
473 | #ifdef CONFIG_SMP | ||
474 | /* | ||
475 | * For SMP we still have to take care of the case where the thread | ||
476 | * migrates to another CPU and then back to the original CPU on which | ||
477 | * the last VFP user is still the same thread. Mark the thread VFP | ||
478 | * state as belonging to a non-existent CPU so that the saved one will | ||
479 | * be reloaded in the above case. | ||
480 | */ | ||
481 | thread->vfpstate.hard.cpu = NR_CPUS; | ||
482 | #endif | ||
493 | put_cpu(); | 483 | put_cpu(); |
494 | } | 484 | } |
495 | #endif | ||
496 | 485 | ||
497 | #include <linux/smp.h> | 486 | #include <linux/smp.h> |
498 | 487 | ||
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index 73c5c2b05f64..7f3c0a2e60cd 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c | |||
@@ -1802,7 +1802,8 @@ static int kvm_ia64_sync_dirty_log(struct kvm *kvm, | |||
1802 | { | 1802 | { |
1803 | struct kvm_memory_slot *memslot; | 1803 | struct kvm_memory_slot *memslot; |
1804 | int r, i; | 1804 | int r, i; |
1805 | long n, base; | 1805 | long base; |
1806 | unsigned long n; | ||
1806 | unsigned long *dirty_bitmap = (unsigned long *)(kvm->arch.vm_base + | 1807 | unsigned long *dirty_bitmap = (unsigned long *)(kvm->arch.vm_base + |
1807 | offsetof(struct kvm_vm_data, kvm_mem_dirty_log)); | 1808 | offsetof(struct kvm_vm_data, kvm_mem_dirty_log)); |
1808 | 1809 | ||
@@ -1815,7 +1816,7 @@ static int kvm_ia64_sync_dirty_log(struct kvm *kvm, | |||
1815 | if (!memslot->dirty_bitmap) | 1816 | if (!memslot->dirty_bitmap) |
1816 | goto out; | 1817 | goto out; |
1817 | 1818 | ||
1818 | n = ALIGN(memslot->npages, BITS_PER_LONG) / 8; | 1819 | n = kvm_dirty_bitmap_bytes(memslot); |
1819 | base = memslot->base_gfn / BITS_PER_LONG; | 1820 | base = memslot->base_gfn / BITS_PER_LONG; |
1820 | 1821 | ||
1821 | for (i = 0; i < n/sizeof(long); ++i) { | 1822 | for (i = 0; i < n/sizeof(long); ++i) { |
@@ -1831,7 +1832,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, | |||
1831 | struct kvm_dirty_log *log) | 1832 | struct kvm_dirty_log *log) |
1832 | { | 1833 | { |
1833 | int r; | 1834 | int r; |
1834 | int n; | 1835 | unsigned long n; |
1835 | struct kvm_memory_slot *memslot; | 1836 | struct kvm_memory_slot *memslot; |
1836 | int is_dirty = 0; | 1837 | int is_dirty = 0; |
1837 | 1838 | ||
@@ -1850,7 +1851,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, | |||
1850 | if (is_dirty) { | 1851 | if (is_dirty) { |
1851 | kvm_flush_remote_tlbs(kvm); | 1852 | kvm_flush_remote_tlbs(kvm); |
1852 | memslot = &kvm->memslots->memslots[log->slot]; | 1853 | memslot = &kvm->memslots->memslots[log->slot]; |
1853 | n = ALIGN(memslot->npages, BITS_PER_LONG) / 8; | 1854 | n = kvm_dirty_bitmap_bytes(memslot); |
1854 | memset(memslot->dirty_bitmap, 0, n); | 1855 | memset(memslot->dirty_bitmap, 0, n); |
1855 | } | 1856 | } |
1856 | r = 0; | 1857 | r = 0; |
diff --git a/arch/m68k/include/asm/atomic_mm.h b/arch/m68k/include/asm/atomic_mm.h index 88b7af20a996..d9d2ed647435 100644 --- a/arch/m68k/include/asm/atomic_mm.h +++ b/arch/m68k/include/asm/atomic_mm.h | |||
@@ -148,14 +148,18 @@ static inline int atomic_xchg(atomic_t *v, int new) | |||
148 | static inline int atomic_sub_and_test(int i, atomic_t *v) | 148 | static inline int atomic_sub_and_test(int i, atomic_t *v) |
149 | { | 149 | { |
150 | char c; | 150 | char c; |
151 | __asm__ __volatile__("subl %2,%1; seq %0" : "=d" (c), "+m" (*v): "g" (i)); | 151 | __asm__ __volatile__("subl %2,%1; seq %0" |
152 | : "=d" (c), "+m" (*v) | ||
153 | : "id" (i)); | ||
152 | return c != 0; | 154 | return c != 0; |
153 | } | 155 | } |
154 | 156 | ||
155 | static inline int atomic_add_negative(int i, atomic_t *v) | 157 | static inline int atomic_add_negative(int i, atomic_t *v) |
156 | { | 158 | { |
157 | char c; | 159 | char c; |
158 | __asm__ __volatile__("addl %2,%1; smi %0" : "=d" (c), "+m" (*v): "g" (i)); | 160 | __asm__ __volatile__("addl %2,%1; smi %0" |
161 | : "=d" (c), "+m" (*v) | ||
162 | : "id" (i)); | ||
159 | return c != 0; | 163 | return c != 0; |
160 | } | 164 | } |
161 | 165 | ||
diff --git a/arch/m68k/include/asm/mcfuart.h b/arch/m68k/include/asm/mcfuart.h index ef2293873612..01a8716c5fc5 100644 --- a/arch/m68k/include/asm/mcfuart.h +++ b/arch/m68k/include/asm/mcfuart.h | |||
@@ -212,5 +212,10 @@ struct mcf_platform_uart { | |||
212 | #define MCFUART_URF_RXS 0xc0 /* Receiver status */ | 212 | #define MCFUART_URF_RXS 0xc0 /* Receiver status */ |
213 | #endif | 213 | #endif |
214 | 214 | ||
215 | #if defined(CONFIG_M5272) | ||
216 | #define MCFUART_TXFIFOSIZE 25 | ||
217 | #else | ||
218 | #define MCFUART_TXFIFOSIZE 1 | ||
219 | #endif | ||
215 | /****************************************************************************/ | 220 | /****************************************************************************/ |
216 | #endif /* mcfuart_h */ | 221 | #endif /* mcfuart_h */ |
diff --git a/arch/m68k/include/asm/sigcontext.h b/arch/m68k/include/asm/sigcontext.h index 1320eaa4cc2a..a29dd74a17cb 100644 --- a/arch/m68k/include/asm/sigcontext.h +++ b/arch/m68k/include/asm/sigcontext.h | |||
@@ -17,13 +17,11 @@ struct sigcontext { | |||
17 | #ifndef __uClinux__ | 17 | #ifndef __uClinux__ |
18 | # ifdef __mcoldfire__ | 18 | # ifdef __mcoldfire__ |
19 | unsigned long sc_fpregs[2][2]; /* room for two fp registers */ | 19 | unsigned long sc_fpregs[2][2]; /* room for two fp registers */ |
20 | unsigned long sc_fpcntl[3]; | ||
21 | unsigned char sc_fpstate[16+6*8]; | ||
22 | # else | 20 | # else |
23 | unsigned long sc_fpregs[2*3]; /* room for two fp registers */ | 21 | unsigned long sc_fpregs[2*3]; /* room for two fp registers */ |
22 | # endif | ||
24 | unsigned long sc_fpcntl[3]; | 23 | unsigned long sc_fpcntl[3]; |
25 | unsigned char sc_fpstate[216]; | 24 | unsigned char sc_fpstate[216]; |
26 | # endif | ||
27 | #endif | 25 | #endif |
28 | }; | 26 | }; |
29 | 27 | ||
diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile index ce404bc9ccbd..14042574ac21 100644 --- a/arch/m68knommu/Makefile +++ b/arch/m68knommu/Makefile | |||
@@ -94,7 +94,7 @@ cflags-$(CONFIG_M520x) := $(call cc-option,-mcpu=5208,-m5200) | |||
94 | cflags-$(CONFIG_M523x) := $(call cc-option,-mcpu=523x,-m5307) | 94 | cflags-$(CONFIG_M523x) := $(call cc-option,-mcpu=523x,-m5307) |
95 | cflags-$(CONFIG_M5249) := $(call cc-option,-mcpu=5249,-m5200) | 95 | cflags-$(CONFIG_M5249) := $(call cc-option,-mcpu=5249,-m5200) |
96 | cflags-$(CONFIG_M5271) := $(call cc-option,-mcpu=5271,-m5307) | 96 | cflags-$(CONFIG_M5271) := $(call cc-option,-mcpu=5271,-m5307) |
97 | cflags-$(CONFIG_M5272) := $(call cc-option,-mcpu=5271,-m5200) | 97 | cflags-$(CONFIG_M5272) := $(call cc-option,-mcpu=5272,-m5307) |
98 | cflags-$(CONFIG_M5275) := $(call cc-option,-mcpu=5275,-m5307) | 98 | cflags-$(CONFIG_M5275) := $(call cc-option,-mcpu=5275,-m5307) |
99 | cflags-$(CONFIG_M528x) := $(call cc-option,-m528x,-m5307) | 99 | cflags-$(CONFIG_M528x) := $(call cc-option,-m528x,-m5307) |
100 | cflags-$(CONFIG_M5307) := $(call cc-option,-m5307,-m5200) | 100 | cflags-$(CONFIG_M5307) := $(call cc-option,-m5307,-m5200) |
diff --git a/arch/m68knommu/kernel/entry.S b/arch/m68knommu/kernel/entry.S index 56043ade3941..aff6f57ef8b5 100644 --- a/arch/m68knommu/kernel/entry.S +++ b/arch/m68knommu/kernel/entry.S | |||
@@ -145,6 +145,6 @@ ENTRY(ret_from_user_signal) | |||
145 | trap #0 | 145 | trap #0 |
146 | 146 | ||
147 | ENTRY(ret_from_user_rt_signal) | 147 | ENTRY(ret_from_user_rt_signal) |
148 | move #__NR_rt_sigreturn,%d0 | 148 | movel #__NR_rt_sigreturn,%d0 |
149 | trap #0 | 149 | trap #0 |
150 | 150 | ||
diff --git a/arch/m68knommu/platform/68360/ints.c b/arch/m68knommu/platform/68360/ints.c index 1143f77caca4..6f22970d8c20 100644 --- a/arch/m68knommu/platform/68360/ints.c +++ b/arch/m68knommu/platform/68360/ints.c | |||
@@ -107,7 +107,6 @@ void init_IRQ(void) | |||
107 | _ramvec[vba+CPMVEC_PIO_PC7] = inthandler; /* pio - pc7 */ | 107 | _ramvec[vba+CPMVEC_PIO_PC7] = inthandler; /* pio - pc7 */ |
108 | _ramvec[vba+CPMVEC_PIO_PC6] = inthandler; /* pio - pc6 */ | 108 | _ramvec[vba+CPMVEC_PIO_PC6] = inthandler; /* pio - pc6 */ |
109 | _ramvec[vba+CPMVEC_TIMER3] = inthandler; /* timer 3 */ | 109 | _ramvec[vba+CPMVEC_TIMER3] = inthandler; /* timer 3 */ |
110 | _ramvec[vba+CPMVEC_RISCTIMER] = inthandler; /* reserved */ | ||
111 | _ramvec[vba+CPMVEC_PIO_PC5] = inthandler; /* pio - pc5 */ | 110 | _ramvec[vba+CPMVEC_PIO_PC5] = inthandler; /* pio - pc5 */ |
112 | _ramvec[vba+CPMVEC_PIO_PC4] = inthandler; /* pio - pc4 */ | 111 | _ramvec[vba+CPMVEC_PIO_PC4] = inthandler; /* pio - pc4 */ |
113 | _ramvec[vba+CPMVEC_RESERVED2] = inthandler; /* reserved */ | 112 | _ramvec[vba+CPMVEC_RESERVED2] = inthandler; /* reserved */ |
diff --git a/arch/mips/alchemy/devboards/db1200/setup.c b/arch/mips/alchemy/devboards/db1200/setup.c index 379536e3abd1..be7e92ea01f3 100644 --- a/arch/mips/alchemy/devboards/db1200/setup.c +++ b/arch/mips/alchemy/devboards/db1200/setup.c | |||
@@ -60,43 +60,6 @@ void __init board_setup(void) | |||
60 | wmb(); | 60 | wmb(); |
61 | } | 61 | } |
62 | 62 | ||
63 | /* use the hexleds to count the number of times the cpu has entered | ||
64 | * wait, the dots to indicate whether the CPU is currently idle or | ||
65 | * active (dots off = sleeping, dots on = working) for cases where | ||
66 | * the number doesn't change for a long(er) period of time. | ||
67 | */ | ||
68 | static void db1200_wait(void) | ||
69 | { | ||
70 | __asm__(" .set push \n" | ||
71 | " .set mips3 \n" | ||
72 | " .set noreorder \n" | ||
73 | " cache 0x14, 0(%0) \n" | ||
74 | " cache 0x14, 32(%0) \n" | ||
75 | " cache 0x14, 64(%0) \n" | ||
76 | /* dots off: we're about to call wait */ | ||
77 | " lui $26, 0xb980 \n" | ||
78 | " ori $27, $0, 3 \n" | ||
79 | " sb $27, 0x18($26) \n" | ||
80 | " sync \n" | ||
81 | " nop \n" | ||
82 | " wait \n" | ||
83 | " nop \n" | ||
84 | " nop \n" | ||
85 | " nop \n" | ||
86 | " nop \n" | ||
87 | " nop \n" | ||
88 | /* dots on: there's work to do, increment cntr */ | ||
89 | " lui $26, 0xb980 \n" | ||
90 | " sb $0, 0x18($26) \n" | ||
91 | " lui $26, 0xb9c0 \n" | ||
92 | " lb $27, 0($26) \n" | ||
93 | " addiu $27, $27, 1 \n" | ||
94 | " sb $27, 0($26) \n" | ||
95 | " sync \n" | ||
96 | " .set pop \n" | ||
97 | : : "r" (db1200_wait)); | ||
98 | } | ||
99 | |||
100 | static int __init db1200_arch_init(void) | 63 | static int __init db1200_arch_init(void) |
101 | { | 64 | { |
102 | /* GPIO7 is low-level triggered CPLD cascade */ | 65 | /* GPIO7 is low-level triggered CPLD cascade */ |
@@ -110,9 +73,6 @@ static int __init db1200_arch_init(void) | |||
110 | irq_to_desc(DB1200_SD0_INSERT_INT)->status |= IRQ_NOAUTOEN; | 73 | irq_to_desc(DB1200_SD0_INSERT_INT)->status |= IRQ_NOAUTOEN; |
111 | irq_to_desc(DB1200_SD0_EJECT_INT)->status |= IRQ_NOAUTOEN; | 74 | irq_to_desc(DB1200_SD0_EJECT_INT)->status |= IRQ_NOAUTOEN; |
112 | 75 | ||
113 | if (cpu_wait) | ||
114 | cpu_wait = db1200_wait; | ||
115 | |||
116 | return 0; | 76 | return 0; |
117 | } | 77 | } |
118 | arch_initcall(db1200_arch_init); | 78 | arch_initcall(db1200_arch_init); |
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c index 246df7aca2e7..2fafc78e5ce1 100644 --- a/arch/mips/ar7/platform.c +++ b/arch/mips/ar7/platform.c | |||
@@ -168,7 +168,7 @@ static struct plat_vlynq_data vlynq_high_data = { | |||
168 | .on = vlynq_on, | 168 | .on = vlynq_on, |
169 | .off = vlynq_off, | 169 | .off = vlynq_off, |
170 | }, | 170 | }, |
171 | .reset_bit = 26, | 171 | .reset_bit = 16, |
172 | .gpio_bit = 19, | 172 | .gpio_bit = 19, |
173 | }; | 173 | }; |
174 | 174 | ||
@@ -600,6 +600,7 @@ static int __init ar7_register_devices(void) | |||
600 | } | 600 | } |
601 | 601 | ||
602 | if (ar7_has_high_cpmac()) { | 602 | if (ar7_has_high_cpmac()) { |
603 | res = fixed_phy_add(PHY_POLL, cpmac_high.id, &fixed_phy_status); | ||
603 | if (!res) { | 604 | if (!res) { |
604 | cpmac_get_mac(1, cpmac_high_data.dev_addr); | 605 | cpmac_get_mac(1, cpmac_high_data.dev_addr); |
605 | 606 | ||
diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c index ea17941168ca..8dba8cfb752f 100644 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/addrspace.h> | 18 | #include <asm/addrspace.h> |
19 | #include <bcm63xx_board.h> | 19 | #include <bcm63xx_board.h> |
20 | #include <bcm63xx_cpu.h> | 20 | #include <bcm63xx_cpu.h> |
21 | #include <bcm63xx_dev_uart.h> | ||
21 | #include <bcm63xx_regs.h> | 22 | #include <bcm63xx_regs.h> |
22 | #include <bcm63xx_io.h> | 23 | #include <bcm63xx_io.h> |
23 | #include <bcm63xx_dev_pci.h> | 24 | #include <bcm63xx_dev_pci.h> |
@@ -40,6 +41,7 @@ static struct board_info __initdata board_96338gw = { | |||
40 | .name = "96338GW", | 41 | .name = "96338GW", |
41 | .expected_cpu_id = 0x6338, | 42 | .expected_cpu_id = 0x6338, |
42 | 43 | ||
44 | .has_uart0 = 1, | ||
43 | .has_enet0 = 1, | 45 | .has_enet0 = 1, |
44 | .enet0 = { | 46 | .enet0 = { |
45 | .force_speed_100 = 1, | 47 | .force_speed_100 = 1, |
@@ -82,6 +84,7 @@ static struct board_info __initdata board_96338w = { | |||
82 | .name = "96338W", | 84 | .name = "96338W", |
83 | .expected_cpu_id = 0x6338, | 85 | .expected_cpu_id = 0x6338, |
84 | 86 | ||
87 | .has_uart0 = 1, | ||
85 | .has_enet0 = 1, | 88 | .has_enet0 = 1, |
86 | .enet0 = { | 89 | .enet0 = { |
87 | .force_speed_100 = 1, | 90 | .force_speed_100 = 1, |
@@ -126,6 +129,8 @@ static struct board_info __initdata board_96338w = { | |||
126 | static struct board_info __initdata board_96345gw2 = { | 129 | static struct board_info __initdata board_96345gw2 = { |
127 | .name = "96345GW2", | 130 | .name = "96345GW2", |
128 | .expected_cpu_id = 0x6345, | 131 | .expected_cpu_id = 0x6345, |
132 | |||
133 | .has_uart0 = 1, | ||
129 | }; | 134 | }; |
130 | #endif | 135 | #endif |
131 | 136 | ||
@@ -137,6 +142,7 @@ static struct board_info __initdata board_96348r = { | |||
137 | .name = "96348R", | 142 | .name = "96348R", |
138 | .expected_cpu_id = 0x6348, | 143 | .expected_cpu_id = 0x6348, |
139 | 144 | ||
145 | .has_uart0 = 1, | ||
140 | .has_enet0 = 1, | 146 | .has_enet0 = 1, |
141 | .has_pci = 1, | 147 | .has_pci = 1, |
142 | 148 | ||
@@ -180,6 +186,7 @@ static struct board_info __initdata board_96348gw_10 = { | |||
180 | .name = "96348GW-10", | 186 | .name = "96348GW-10", |
181 | .expected_cpu_id = 0x6348, | 187 | .expected_cpu_id = 0x6348, |
182 | 188 | ||
189 | .has_uart0 = 1, | ||
183 | .has_enet0 = 1, | 190 | .has_enet0 = 1, |
184 | .has_enet1 = 1, | 191 | .has_enet1 = 1, |
185 | .has_pci = 1, | 192 | .has_pci = 1, |
@@ -239,6 +246,7 @@ static struct board_info __initdata board_96348gw_11 = { | |||
239 | .name = "96348GW-11", | 246 | .name = "96348GW-11", |
240 | .expected_cpu_id = 0x6348, | 247 | .expected_cpu_id = 0x6348, |
241 | 248 | ||
249 | .has_uart0 = 1, | ||
242 | .has_enet0 = 1, | 250 | .has_enet0 = 1, |
243 | .has_enet1 = 1, | 251 | .has_enet1 = 1, |
244 | .has_pci = 1, | 252 | .has_pci = 1, |
@@ -292,6 +300,7 @@ static struct board_info __initdata board_96348gw = { | |||
292 | .name = "96348GW", | 300 | .name = "96348GW", |
293 | .expected_cpu_id = 0x6348, | 301 | .expected_cpu_id = 0x6348, |
294 | 302 | ||
303 | .has_uart0 = 1, | ||
295 | .has_enet0 = 1, | 304 | .has_enet0 = 1, |
296 | .has_enet1 = 1, | 305 | .has_enet1 = 1, |
297 | .has_pci = 1, | 306 | .has_pci = 1, |
@@ -349,9 +358,10 @@ static struct board_info __initdata board_FAST2404 = { | |||
349 | .name = "F@ST2404", | 358 | .name = "F@ST2404", |
350 | .expected_cpu_id = 0x6348, | 359 | .expected_cpu_id = 0x6348, |
351 | 360 | ||
352 | .has_enet0 = 1, | 361 | .has_uart0 = 1, |
353 | .has_enet1 = 1, | 362 | .has_enet0 = 1, |
354 | .has_pci = 1, | 363 | .has_enet1 = 1, |
364 | .has_pci = 1, | ||
355 | 365 | ||
356 | .enet0 = { | 366 | .enet0 = { |
357 | .has_phy = 1, | 367 | .has_phy = 1, |
@@ -368,10 +378,30 @@ static struct board_info __initdata board_FAST2404 = { | |||
368 | .has_ehci0 = 1, | 378 | .has_ehci0 = 1, |
369 | }; | 379 | }; |
370 | 380 | ||
381 | static struct board_info __initdata board_rta1025w_16 = { | ||
382 | .name = "RTA1025W_16", | ||
383 | .expected_cpu_id = 0x6348, | ||
384 | |||
385 | .has_enet0 = 1, | ||
386 | .has_enet1 = 1, | ||
387 | .has_pci = 1, | ||
388 | |||
389 | .enet0 = { | ||
390 | .has_phy = 1, | ||
391 | .use_internal_phy = 1, | ||
392 | }, | ||
393 | .enet1 = { | ||
394 | .force_speed_100 = 1, | ||
395 | .force_duplex_full = 1, | ||
396 | }, | ||
397 | }; | ||
398 | |||
399 | |||
371 | static struct board_info __initdata board_DV201AMR = { | 400 | static struct board_info __initdata board_DV201AMR = { |
372 | .name = "DV201AMR", | 401 | .name = "DV201AMR", |
373 | .expected_cpu_id = 0x6348, | 402 | .expected_cpu_id = 0x6348, |
374 | 403 | ||
404 | .has_uart0 = 1, | ||
375 | .has_pci = 1, | 405 | .has_pci = 1, |
376 | .has_ohci0 = 1, | 406 | .has_ohci0 = 1, |
377 | 407 | ||
@@ -391,6 +421,7 @@ static struct board_info __initdata board_96348gw_a = { | |||
391 | .name = "96348GW-A", | 421 | .name = "96348GW-A", |
392 | .expected_cpu_id = 0x6348, | 422 | .expected_cpu_id = 0x6348, |
393 | 423 | ||
424 | .has_uart0 = 1, | ||
394 | .has_enet0 = 1, | 425 | .has_enet0 = 1, |
395 | .has_enet1 = 1, | 426 | .has_enet1 = 1, |
396 | .has_pci = 1, | 427 | .has_pci = 1, |
@@ -416,6 +447,7 @@ static struct board_info __initdata board_96358vw = { | |||
416 | .name = "96358VW", | 447 | .name = "96358VW", |
417 | .expected_cpu_id = 0x6358, | 448 | .expected_cpu_id = 0x6358, |
418 | 449 | ||
450 | .has_uart0 = 1, | ||
419 | .has_enet0 = 1, | 451 | .has_enet0 = 1, |
420 | .has_enet1 = 1, | 452 | .has_enet1 = 1, |
421 | .has_pci = 1, | 453 | .has_pci = 1, |
@@ -467,6 +499,7 @@ static struct board_info __initdata board_96358vw2 = { | |||
467 | .name = "96358VW2", | 499 | .name = "96358VW2", |
468 | .expected_cpu_id = 0x6358, | 500 | .expected_cpu_id = 0x6358, |
469 | 501 | ||
502 | .has_uart0 = 1, | ||
470 | .has_enet0 = 1, | 503 | .has_enet0 = 1, |
471 | .has_enet1 = 1, | 504 | .has_enet1 = 1, |
472 | .has_pci = 1, | 505 | .has_pci = 1, |
@@ -514,6 +547,7 @@ static struct board_info __initdata board_AGPFS0 = { | |||
514 | .name = "AGPF-S0", | 547 | .name = "AGPF-S0", |
515 | .expected_cpu_id = 0x6358, | 548 | .expected_cpu_id = 0x6358, |
516 | 549 | ||
550 | .has_uart0 = 1, | ||
517 | .has_enet0 = 1, | 551 | .has_enet0 = 1, |
518 | .has_enet1 = 1, | 552 | .has_enet1 = 1, |
519 | .has_pci = 1, | 553 | .has_pci = 1, |
@@ -531,6 +565,27 @@ static struct board_info __initdata board_AGPFS0 = { | |||
531 | .has_ohci0 = 1, | 565 | .has_ohci0 = 1, |
532 | .has_ehci0 = 1, | 566 | .has_ehci0 = 1, |
533 | }; | 567 | }; |
568 | |||
569 | static struct board_info __initdata board_DWVS0 = { | ||
570 | .name = "DWV-S0", | ||
571 | .expected_cpu_id = 0x6358, | ||
572 | |||
573 | .has_enet0 = 1, | ||
574 | .has_enet1 = 1, | ||
575 | .has_pci = 1, | ||
576 | |||
577 | .enet0 = { | ||
578 | .has_phy = 1, | ||
579 | .use_internal_phy = 1, | ||
580 | }, | ||
581 | |||
582 | .enet1 = { | ||
583 | .force_speed_100 = 1, | ||
584 | .force_duplex_full = 1, | ||
585 | }, | ||
586 | |||
587 | .has_ohci0 = 1, | ||
588 | }; | ||
534 | #endif | 589 | #endif |
535 | 590 | ||
536 | /* | 591 | /* |
@@ -552,16 +607,88 @@ static const struct board_info __initdata *bcm963xx_boards[] = { | |||
552 | &board_FAST2404, | 607 | &board_FAST2404, |
553 | &board_DV201AMR, | 608 | &board_DV201AMR, |
554 | &board_96348gw_a, | 609 | &board_96348gw_a, |
610 | &board_rta1025w_16, | ||
555 | #endif | 611 | #endif |
556 | 612 | ||
557 | #ifdef CONFIG_BCM63XX_CPU_6358 | 613 | #ifdef CONFIG_BCM63XX_CPU_6358 |
558 | &board_96358vw, | 614 | &board_96358vw, |
559 | &board_96358vw2, | 615 | &board_96358vw2, |
560 | &board_AGPFS0, | 616 | &board_AGPFS0, |
617 | &board_DWVS0, | ||
561 | #endif | 618 | #endif |
562 | }; | 619 | }; |
563 | 620 | ||
564 | /* | 621 | /* |
622 | * Register a sane SPROMv2 to make the on-board | ||
623 | * bcm4318 WLAN work | ||
624 | */ | ||
625 | #ifdef CONFIG_SSB_PCIHOST | ||
626 | static struct ssb_sprom bcm63xx_sprom = { | ||
627 | .revision = 0x02, | ||
628 | .board_rev = 0x17, | ||
629 | .country_code = 0x0, | ||
630 | .ant_available_bg = 0x3, | ||
631 | .pa0b0 = 0x15ae, | ||
632 | .pa0b1 = 0xfa85, | ||
633 | .pa0b2 = 0xfe8d, | ||
634 | .pa1b0 = 0xffff, | ||
635 | .pa1b1 = 0xffff, | ||
636 | .pa1b2 = 0xffff, | ||
637 | .gpio0 = 0xff, | ||
638 | .gpio1 = 0xff, | ||
639 | .gpio2 = 0xff, | ||
640 | .gpio3 = 0xff, | ||
641 | .maxpwr_bg = 0x004c, | ||
642 | .itssi_bg = 0x00, | ||
643 | .boardflags_lo = 0x2848, | ||
644 | .boardflags_hi = 0x0000, | ||
645 | }; | ||
646 | #endif | ||
647 | |||
648 | /* | ||
649 | * return board name for /proc/cpuinfo | ||
650 | */ | ||
651 | const char *board_get_name(void) | ||
652 | { | ||
653 | return board.name; | ||
654 | } | ||
655 | |||
656 | /* | ||
657 | * register & return a new board mac address | ||
658 | */ | ||
659 | static int board_get_mac_address(u8 *mac) | ||
660 | { | ||
661 | u8 *p; | ||
662 | int count; | ||
663 | |||
664 | if (mac_addr_used >= nvram.mac_addr_count) { | ||
665 | printk(KERN_ERR PFX "not enough mac address\n"); | ||
666 | return -ENODEV; | ||
667 | } | ||
668 | |||
669 | memcpy(mac, nvram.mac_addr_base, ETH_ALEN); | ||
670 | p = mac + ETH_ALEN - 1; | ||
671 | count = mac_addr_used; | ||
672 | |||
673 | while (count--) { | ||
674 | do { | ||
675 | (*p)++; | ||
676 | if (*p != 0) | ||
677 | break; | ||
678 | p--; | ||
679 | } while (p != mac); | ||
680 | } | ||
681 | |||
682 | if (p == mac) { | ||
683 | printk(KERN_ERR PFX "unable to fetch mac address\n"); | ||
684 | return -ENODEV; | ||
685 | } | ||
686 | |||
687 | mac_addr_used++; | ||
688 | return 0; | ||
689 | } | ||
690 | |||
691 | /* | ||
565 | * early init callback, read nvram data from flash and checksum it | 692 | * early init callback, read nvram data from flash and checksum it |
566 | */ | 693 | */ |
567 | void __init board_prom_init(void) | 694 | void __init board_prom_init(void) |
@@ -659,6 +786,17 @@ void __init board_prom_init(void) | |||
659 | } | 786 | } |
660 | 787 | ||
661 | bcm_gpio_writel(val, GPIO_MODE_REG); | 788 | bcm_gpio_writel(val, GPIO_MODE_REG); |
789 | |||
790 | /* Generate MAC address for WLAN and | ||
791 | * register our SPROM */ | ||
792 | #ifdef CONFIG_SSB_PCIHOST | ||
793 | if (!board_get_mac_address(bcm63xx_sprom.il0mac)) { | ||
794 | memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN); | ||
795 | memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN); | ||
796 | if (ssb_arch_set_fallback_sprom(&bcm63xx_sprom) < 0) | ||
797 | printk(KERN_ERR "failed to register fallback SPROM\n"); | ||
798 | } | ||
799 | #endif | ||
662 | } | 800 | } |
663 | 801 | ||
664 | /* | 802 | /* |
@@ -676,49 +814,6 @@ void __init board_setup(void) | |||
676 | panic("unexpected CPU for bcm963xx board"); | 814 | panic("unexpected CPU for bcm963xx board"); |
677 | } | 815 | } |
678 | 816 | ||
679 | /* | ||
680 | * return board name for /proc/cpuinfo | ||
681 | */ | ||
682 | const char *board_get_name(void) | ||
683 | { | ||
684 | return board.name; | ||
685 | } | ||
686 | |||
687 | /* | ||
688 | * register & return a new board mac address | ||
689 | */ | ||
690 | static int board_get_mac_address(u8 *mac) | ||
691 | { | ||
692 | u8 *p; | ||
693 | int count; | ||
694 | |||
695 | if (mac_addr_used >= nvram.mac_addr_count) { | ||
696 | printk(KERN_ERR PFX "not enough mac address\n"); | ||
697 | return -ENODEV; | ||
698 | } | ||
699 | |||
700 | memcpy(mac, nvram.mac_addr_base, ETH_ALEN); | ||
701 | p = mac + ETH_ALEN - 1; | ||
702 | count = mac_addr_used; | ||
703 | |||
704 | while (count--) { | ||
705 | do { | ||
706 | (*p)++; | ||
707 | if (*p != 0) | ||
708 | break; | ||
709 | p--; | ||
710 | } while (p != mac); | ||
711 | } | ||
712 | |||
713 | if (p == mac) { | ||
714 | printk(KERN_ERR PFX "unable to fetch mac address\n"); | ||
715 | return -ENODEV; | ||
716 | } | ||
717 | |||
718 | mac_addr_used++; | ||
719 | return 0; | ||
720 | } | ||
721 | |||
722 | static struct mtd_partition mtd_partitions[] = { | 817 | static struct mtd_partition mtd_partitions[] = { |
723 | { | 818 | { |
724 | .name = "cfe", | 819 | .name = "cfe", |
@@ -750,33 +845,6 @@ static struct platform_device mtd_dev = { | |||
750 | }, | 845 | }, |
751 | }; | 846 | }; |
752 | 847 | ||
753 | /* | ||
754 | * Register a sane SPROMv2 to make the on-board | ||
755 | * bcm4318 WLAN work | ||
756 | */ | ||
757 | #ifdef CONFIG_SSB_PCIHOST | ||
758 | static struct ssb_sprom bcm63xx_sprom = { | ||
759 | .revision = 0x02, | ||
760 | .board_rev = 0x17, | ||
761 | .country_code = 0x0, | ||
762 | .ant_available_bg = 0x3, | ||
763 | .pa0b0 = 0x15ae, | ||
764 | .pa0b1 = 0xfa85, | ||
765 | .pa0b2 = 0xfe8d, | ||
766 | .pa1b0 = 0xffff, | ||
767 | .pa1b1 = 0xffff, | ||
768 | .pa1b2 = 0xffff, | ||
769 | .gpio0 = 0xff, | ||
770 | .gpio1 = 0xff, | ||
771 | .gpio2 = 0xff, | ||
772 | .gpio3 = 0xff, | ||
773 | .maxpwr_bg = 0x004c, | ||
774 | .itssi_bg = 0x00, | ||
775 | .boardflags_lo = 0x2848, | ||
776 | .boardflags_hi = 0x0000, | ||
777 | }; | ||
778 | #endif | ||
779 | |||
780 | static struct gpio_led_platform_data bcm63xx_led_data; | 848 | static struct gpio_led_platform_data bcm63xx_led_data; |
781 | 849 | ||
782 | static struct platform_device bcm63xx_gpio_leds = { | 850 | static struct platform_device bcm63xx_gpio_leds = { |
@@ -792,6 +860,12 @@ int __init board_register_devices(void) | |||
792 | { | 860 | { |
793 | u32 val; | 861 | u32 val; |
794 | 862 | ||
863 | if (board.has_uart0) | ||
864 | bcm63xx_uart_register(0); | ||
865 | |||
866 | if (board.has_uart1) | ||
867 | bcm63xx_uart_register(1); | ||
868 | |||
795 | if (board.has_pccard) | 869 | if (board.has_pccard) |
796 | bcm63xx_pcmcia_register(); | 870 | bcm63xx_pcmcia_register(); |
797 | 871 | ||
@@ -806,17 +880,6 @@ int __init board_register_devices(void) | |||
806 | if (board.has_dsp) | 880 | if (board.has_dsp) |
807 | bcm63xx_dsp_register(&board.dsp); | 881 | bcm63xx_dsp_register(&board.dsp); |
808 | 882 | ||
809 | /* Generate MAC address for WLAN and | ||
810 | * register our SPROM */ | ||
811 | #ifdef CONFIG_SSB_PCIHOST | ||
812 | if (!board_get_mac_address(bcm63xx_sprom.il0mac)) { | ||
813 | memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN); | ||
814 | memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN); | ||
815 | if (ssb_arch_set_fallback_sprom(&bcm63xx_sprom) < 0) | ||
816 | printk(KERN_ERR "failed to register fallback SPROM\n"); | ||
817 | } | ||
818 | #endif | ||
819 | |||
820 | /* read base address of boot chip select (0) */ | 883 | /* read base address of boot chip select (0) */ |
821 | if (BCMCPU_IS_6345()) | 884 | if (BCMCPU_IS_6345()) |
822 | val = 0x1fc00000; | 885 | val = 0x1fc00000; |
diff --git a/arch/mips/bcm63xx/cpu.c b/arch/mips/bcm63xx/cpu.c index 70378bb5e3f9..cbb7caf86d77 100644 --- a/arch/mips/bcm63xx/cpu.c +++ b/arch/mips/bcm63xx/cpu.c | |||
@@ -36,6 +36,7 @@ static const unsigned long bcm96338_regs_base[] = { | |||
36 | [RSET_TIMER] = BCM_6338_TIMER_BASE, | 36 | [RSET_TIMER] = BCM_6338_TIMER_BASE, |
37 | [RSET_WDT] = BCM_6338_WDT_BASE, | 37 | [RSET_WDT] = BCM_6338_WDT_BASE, |
38 | [RSET_UART0] = BCM_6338_UART0_BASE, | 38 | [RSET_UART0] = BCM_6338_UART0_BASE, |
39 | [RSET_UART1] = BCM_6338_UART1_BASE, | ||
39 | [RSET_GPIO] = BCM_6338_GPIO_BASE, | 40 | [RSET_GPIO] = BCM_6338_GPIO_BASE, |
40 | [RSET_SPI] = BCM_6338_SPI_BASE, | 41 | [RSET_SPI] = BCM_6338_SPI_BASE, |
41 | [RSET_OHCI0] = BCM_6338_OHCI0_BASE, | 42 | [RSET_OHCI0] = BCM_6338_OHCI0_BASE, |
@@ -72,6 +73,7 @@ static const unsigned long bcm96345_regs_base[] = { | |||
72 | [RSET_TIMER] = BCM_6345_TIMER_BASE, | 73 | [RSET_TIMER] = BCM_6345_TIMER_BASE, |
73 | [RSET_WDT] = BCM_6345_WDT_BASE, | 74 | [RSET_WDT] = BCM_6345_WDT_BASE, |
74 | [RSET_UART0] = BCM_6345_UART0_BASE, | 75 | [RSET_UART0] = BCM_6345_UART0_BASE, |
76 | [RSET_UART1] = BCM_6345_UART1_BASE, | ||
75 | [RSET_GPIO] = BCM_6345_GPIO_BASE, | 77 | [RSET_GPIO] = BCM_6345_GPIO_BASE, |
76 | [RSET_SPI] = BCM_6345_SPI_BASE, | 78 | [RSET_SPI] = BCM_6345_SPI_BASE, |
77 | [RSET_UDC0] = BCM_6345_UDC0_BASE, | 79 | [RSET_UDC0] = BCM_6345_UDC0_BASE, |
@@ -109,6 +111,7 @@ static const unsigned long bcm96348_regs_base[] = { | |||
109 | [RSET_TIMER] = BCM_6348_TIMER_BASE, | 111 | [RSET_TIMER] = BCM_6348_TIMER_BASE, |
110 | [RSET_WDT] = BCM_6348_WDT_BASE, | 112 | [RSET_WDT] = BCM_6348_WDT_BASE, |
111 | [RSET_UART0] = BCM_6348_UART0_BASE, | 113 | [RSET_UART0] = BCM_6348_UART0_BASE, |
114 | [RSET_UART1] = BCM_6348_UART1_BASE, | ||
112 | [RSET_GPIO] = BCM_6348_GPIO_BASE, | 115 | [RSET_GPIO] = BCM_6348_GPIO_BASE, |
113 | [RSET_SPI] = BCM_6348_SPI_BASE, | 116 | [RSET_SPI] = BCM_6348_SPI_BASE, |
114 | [RSET_OHCI0] = BCM_6348_OHCI0_BASE, | 117 | [RSET_OHCI0] = BCM_6348_OHCI0_BASE, |
@@ -150,6 +153,7 @@ static const unsigned long bcm96358_regs_base[] = { | |||
150 | [RSET_TIMER] = BCM_6358_TIMER_BASE, | 153 | [RSET_TIMER] = BCM_6358_TIMER_BASE, |
151 | [RSET_WDT] = BCM_6358_WDT_BASE, | 154 | [RSET_WDT] = BCM_6358_WDT_BASE, |
152 | [RSET_UART0] = BCM_6358_UART0_BASE, | 155 | [RSET_UART0] = BCM_6358_UART0_BASE, |
156 | [RSET_UART1] = BCM_6358_UART1_BASE, | ||
153 | [RSET_GPIO] = BCM_6358_GPIO_BASE, | 157 | [RSET_GPIO] = BCM_6358_GPIO_BASE, |
154 | [RSET_SPI] = BCM_6358_SPI_BASE, | 158 | [RSET_SPI] = BCM_6358_SPI_BASE, |
155 | [RSET_OHCI0] = BCM_6358_OHCI0_BASE, | 159 | [RSET_OHCI0] = BCM_6358_OHCI0_BASE, |
@@ -170,6 +174,7 @@ static const unsigned long bcm96358_regs_base[] = { | |||
170 | static const int bcm96358_irqs[] = { | 174 | static const int bcm96358_irqs[] = { |
171 | [IRQ_TIMER] = BCM_6358_TIMER_IRQ, | 175 | [IRQ_TIMER] = BCM_6358_TIMER_IRQ, |
172 | [IRQ_UART0] = BCM_6358_UART0_IRQ, | 176 | [IRQ_UART0] = BCM_6358_UART0_IRQ, |
177 | [IRQ_UART1] = BCM_6358_UART1_IRQ, | ||
173 | [IRQ_DSL] = BCM_6358_DSL_IRQ, | 178 | [IRQ_DSL] = BCM_6358_DSL_IRQ, |
174 | [IRQ_ENET0] = BCM_6358_ENET0_IRQ, | 179 | [IRQ_ENET0] = BCM_6358_ENET0_IRQ, |
175 | [IRQ_ENET1] = BCM_6358_ENET1_IRQ, | 180 | [IRQ_ENET1] = BCM_6358_ENET1_IRQ, |
diff --git a/arch/mips/bcm63xx/dev-uart.c b/arch/mips/bcm63xx/dev-uart.c index b0519461ad9b..c2963da0253e 100644 --- a/arch/mips/bcm63xx/dev-uart.c +++ b/arch/mips/bcm63xx/dev-uart.c | |||
@@ -11,31 +11,65 @@ | |||
11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
12 | #include <bcm63xx_cpu.h> | 12 | #include <bcm63xx_cpu.h> |
13 | 13 | ||
14 | static struct resource uart_resources[] = { | 14 | static struct resource uart0_resources[] = { |
15 | { | 15 | { |
16 | .start = -1, /* filled at runtime */ | 16 | /* start & end filled at runtime */ |
17 | .end = -1, /* filled at runtime */ | ||
18 | .flags = IORESOURCE_MEM, | 17 | .flags = IORESOURCE_MEM, |
19 | }, | 18 | }, |
20 | { | 19 | { |
21 | .start = -1, /* filled at runtime */ | 20 | /* start filled at runtime */ |
22 | .flags = IORESOURCE_IRQ, | 21 | .flags = IORESOURCE_IRQ, |
23 | }, | 22 | }, |
24 | }; | 23 | }; |
25 | 24 | ||
26 | static struct platform_device bcm63xx_uart_device = { | 25 | static struct resource uart1_resources[] = { |
27 | .name = "bcm63xx_uart", | 26 | { |
28 | .id = 0, | 27 | /* start & end filled at runtime */ |
29 | .num_resources = ARRAY_SIZE(uart_resources), | 28 | .flags = IORESOURCE_MEM, |
30 | .resource = uart_resources, | 29 | }, |
30 | { | ||
31 | /* start filled at runtime */ | ||
32 | .flags = IORESOURCE_IRQ, | ||
33 | }, | ||
34 | }; | ||
35 | |||
36 | static struct platform_device bcm63xx_uart_devices[] = { | ||
37 | { | ||
38 | .name = "bcm63xx_uart", | ||
39 | .id = 0, | ||
40 | .num_resources = ARRAY_SIZE(uart0_resources), | ||
41 | .resource = uart0_resources, | ||
42 | }, | ||
43 | |||
44 | { | ||
45 | .name = "bcm63xx_uart", | ||
46 | .id = 1, | ||
47 | .num_resources = ARRAY_SIZE(uart1_resources), | ||
48 | .resource = uart1_resources, | ||
49 | } | ||
31 | }; | 50 | }; |
32 | 51 | ||
33 | int __init bcm63xx_uart_register(void) | 52 | int __init bcm63xx_uart_register(unsigned int id) |
34 | { | 53 | { |
35 | uart_resources[0].start = bcm63xx_regset_address(RSET_UART0); | 54 | if (id >= ARRAY_SIZE(bcm63xx_uart_devices)) |
36 | uart_resources[0].end = uart_resources[0].start; | 55 | return -ENODEV; |
37 | uart_resources[0].end += RSET_UART_SIZE - 1; | 56 | |
38 | uart_resources[1].start = bcm63xx_get_irq_number(IRQ_UART0); | 57 | if (id == 1 && !BCMCPU_IS_6358()) |
39 | return platform_device_register(&bcm63xx_uart_device); | 58 | return -ENODEV; |
59 | |||
60 | if (id == 0) { | ||
61 | uart0_resources[0].start = bcm63xx_regset_address(RSET_UART0); | ||
62 | uart0_resources[0].end = uart0_resources[0].start + | ||
63 | RSET_UART_SIZE - 1; | ||
64 | uart0_resources[1].start = bcm63xx_get_irq_number(IRQ_UART0); | ||
65 | } | ||
66 | |||
67 | if (id == 1) { | ||
68 | uart1_resources[0].start = bcm63xx_regset_address(RSET_UART1); | ||
69 | uart1_resources[0].end = uart1_resources[0].start + | ||
70 | RSET_UART_SIZE - 1; | ||
71 | uart1_resources[1].start = bcm63xx_get_irq_number(IRQ_UART1); | ||
72 | } | ||
73 | |||
74 | return platform_device_register(&bcm63xx_uart_devices[id]); | ||
40 | } | 75 | } |
41 | arch_initcall(bcm63xx_uart_register); | ||
diff --git a/arch/mips/bcm63xx/gpio.c b/arch/mips/bcm63xx/gpio.c index 87ca39046334..315bc7f79ce1 100644 --- a/arch/mips/bcm63xx/gpio.c +++ b/arch/mips/bcm63xx/gpio.c | |||
@@ -125,10 +125,10 @@ static struct gpio_chip bcm63xx_gpio_chip = { | |||
125 | 125 | ||
126 | int __init bcm63xx_gpio_init(void) | 126 | int __init bcm63xx_gpio_init(void) |
127 | { | 127 | { |
128 | gpio_out_low = bcm_gpio_readl(GPIO_DATA_LO_REG); | ||
129 | gpio_out_high = bcm_gpio_readl(GPIO_DATA_HI_REG); | ||
128 | bcm63xx_gpio_chip.ngpio = bcm63xx_gpio_count(); | 130 | bcm63xx_gpio_chip.ngpio = bcm63xx_gpio_count(); |
129 | pr_info("registering %d GPIOs\n", bcm63xx_gpio_chip.ngpio); | 131 | pr_info("registering %d GPIOs\n", bcm63xx_gpio_chip.ngpio); |
130 | 132 | ||
131 | return gpiochip_add(&bcm63xx_gpio_chip); | 133 | return gpiochip_add(&bcm63xx_gpio_chip); |
132 | } | 134 | } |
133 | |||
134 | arch_initcall(bcm63xx_gpio_init); | ||
diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c index b321d3b16877..9a06fa9f9f0c 100644 --- a/arch/mips/cavium-octeon/setup.c +++ b/arch/mips/cavium-octeon/setup.c | |||
@@ -45,9 +45,6 @@ extern struct plat_smp_ops octeon_smp_ops; | |||
45 | extern void pci_console_init(const char *arg); | 45 | extern void pci_console_init(const char *arg); |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #ifdef CONFIG_CAVIUM_RESERVE32 | ||
49 | extern uint64_t octeon_reserve32_memory; | ||
50 | #endif | ||
51 | static unsigned long long MAX_MEMORY = 512ull << 20; | 48 | static unsigned long long MAX_MEMORY = 512ull << 20; |
52 | 49 | ||
53 | struct octeon_boot_descriptor *octeon_boot_desc_ptr; | 50 | struct octeon_boot_descriptor *octeon_boot_desc_ptr; |
@@ -186,54 +183,6 @@ void octeon_check_cpu_bist(void) | |||
186 | write_octeon_c0_dcacheerr(0); | 183 | write_octeon_c0_dcacheerr(0); |
187 | } | 184 | } |
188 | 185 | ||
189 | #ifdef CONFIG_CAVIUM_RESERVE32_USE_WIRED_TLB | ||
190 | /** | ||
191 | * Called on every core to setup the wired tlb entry needed | ||
192 | * if CONFIG_CAVIUM_RESERVE32_USE_WIRED_TLB is set. | ||
193 | * | ||
194 | */ | ||
195 | static void octeon_hal_setup_per_cpu_reserved32(void *unused) | ||
196 | { | ||
197 | /* | ||
198 | * The config has selected to wire the reserve32 memory for all | ||
199 | * userspace applications. We need to put a wired TLB entry in for each | ||
200 | * 512MB of reserve32 memory. We only handle double 256MB pages here, | ||
201 | * so reserve32 must be multiple of 512MB. | ||
202 | */ | ||
203 | uint32_t size = CONFIG_CAVIUM_RESERVE32; | ||
204 | uint32_t entrylo0 = | ||
205 | 0x7 | ((octeon_reserve32_memory & ((1ul << 40) - 1)) >> 6); | ||
206 | uint32_t entrylo1 = entrylo0 + (256 << 14); | ||
207 | uint32_t entryhi = (0x80000000UL - (CONFIG_CAVIUM_RESERVE32 << 20)); | ||
208 | while (size >= 512) { | ||
209 | #if 0 | ||
210 | pr_info("CPU%d: Adding double wired TLB entry for 0x%lx\n", | ||
211 | smp_processor_id(), entryhi); | ||
212 | #endif | ||
213 | add_wired_entry(entrylo0, entrylo1, entryhi, PM_256M); | ||
214 | entrylo0 += 512 << 14; | ||
215 | entrylo1 += 512 << 14; | ||
216 | entryhi += 512 << 20; | ||
217 | size -= 512; | ||
218 | } | ||
219 | } | ||
220 | #endif /* CONFIG_CAVIUM_RESERVE32_USE_WIRED_TLB */ | ||
221 | |||
222 | /** | ||
223 | * Called to release the named block which was used to made sure | ||
224 | * that nobody used the memory for something else during | ||
225 | * init. Now we'll free it so userspace apps can use this | ||
226 | * memory region with bootmem_alloc. | ||
227 | * | ||
228 | * This function is called only once from prom_free_prom_memory(). | ||
229 | */ | ||
230 | void octeon_hal_setup_reserved32(void) | ||
231 | { | ||
232 | #ifdef CONFIG_CAVIUM_RESERVE32_USE_WIRED_TLB | ||
233 | on_each_cpu(octeon_hal_setup_per_cpu_reserved32, NULL, 0, 1); | ||
234 | #endif | ||
235 | } | ||
236 | |||
237 | /** | 186 | /** |
238 | * Reboot Octeon | 187 | * Reboot Octeon |
239 | * | 188 | * |
@@ -294,18 +243,6 @@ static void octeon_halt(void) | |||
294 | octeon_kill_core(NULL); | 243 | octeon_kill_core(NULL); |
295 | } | 244 | } |
296 | 245 | ||
297 | #if 0 | ||
298 | /** | ||
299 | * Platform time init specifics. | ||
300 | * Returns | ||
301 | */ | ||
302 | void __init plat_time_init(void) | ||
303 | { | ||
304 | /* Nothing special here, but we are required to have one */ | ||
305 | } | ||
306 | |||
307 | #endif | ||
308 | |||
309 | /** | 246 | /** |
310 | * Handle all the error condition interrupts that might occur. | 247 | * Handle all the error condition interrupts that might occur. |
311 | * | 248 | * |
@@ -502,25 +439,13 @@ void __init prom_init(void) | |||
502 | * memory when it is getting memory from the | 439 | * memory when it is getting memory from the |
503 | * bootloader. Later, after the memory allocations are | 440 | * bootloader. Later, after the memory allocations are |
504 | * complete, the reserve32 will be freed. | 441 | * complete, the reserve32 will be freed. |
505 | */ | 442 | * |
506 | #ifdef CONFIG_CAVIUM_RESERVE32_USE_WIRED_TLB | ||
507 | if (CONFIG_CAVIUM_RESERVE32 & 0x1ff) | ||
508 | pr_err("CAVIUM_RESERVE32 isn't a multiple of 512MB. " | ||
509 | "This is required if CAVIUM_RESERVE32_USE_WIRED_TLB " | ||
510 | "is set\n"); | ||
511 | else | ||
512 | addr = cvmx_bootmem_phy_named_block_alloc(CONFIG_CAVIUM_RESERVE32 << 20, | ||
513 | 0, 0, 512 << 20, | ||
514 | "CAVIUM_RESERVE32", 0); | ||
515 | #else | ||
516 | /* | ||
517 | * Allocate memory for RESERVED32 aligned on 2MB boundary. This | 443 | * Allocate memory for RESERVED32 aligned on 2MB boundary. This |
518 | * is in case we later use hugetlb entries with it. | 444 | * is in case we later use hugetlb entries with it. |
519 | */ | 445 | */ |
520 | addr = cvmx_bootmem_phy_named_block_alloc(CONFIG_CAVIUM_RESERVE32 << 20, | 446 | addr = cvmx_bootmem_phy_named_block_alloc(CONFIG_CAVIUM_RESERVE32 << 20, |
521 | 0, 0, 2 << 20, | 447 | 0, 0, 2 << 20, |
522 | "CAVIUM_RESERVE32", 0); | 448 | "CAVIUM_RESERVE32", 0); |
523 | #endif | ||
524 | if (addr < 0) | 449 | if (addr < 0) |
525 | pr_err("Failed to allocate CAVIUM_RESERVE32 memory area\n"); | 450 | pr_err("Failed to allocate CAVIUM_RESERVE32 memory area\n"); |
526 | else | 451 | else |
@@ -817,9 +742,4 @@ void prom_free_prom_memory(void) | |||
817 | panic("Unable to request_irq(OCTEON_IRQ_RML)\n"); | 742 | panic("Unable to request_irq(OCTEON_IRQ_RML)\n"); |
818 | } | 743 | } |
819 | #endif | 744 | #endif |
820 | |||
821 | /* This call is here so that it is performed after any TLB | ||
822 | initializations. It needs to be after these in case the | ||
823 | CONFIG_CAVIUM_RESERVE32_USE_WIRED_TLB option is set */ | ||
824 | octeon_hal_setup_reserved32(); | ||
825 | } | 745 | } |
diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c index 51e980290ce1..6d99b9d8887d 100644 --- a/arch/mips/cavium-octeon/smp.c +++ b/arch/mips/cavium-octeon/smp.c | |||
@@ -279,14 +279,6 @@ static void octeon_cpu_die(unsigned int cpu) | |||
279 | uint32_t avail_coremask; | 279 | uint32_t avail_coremask; |
280 | struct cvmx_bootmem_named_block_desc *block_desc; | 280 | struct cvmx_bootmem_named_block_desc *block_desc; |
281 | 281 | ||
282 | #ifdef CONFIG_CAVIUM_OCTEON_WATCHDOG | ||
283 | /* Disable the watchdog */ | ||
284 | cvmx_ciu_wdogx_t ciu_wdog; | ||
285 | ciu_wdog.u64 = cvmx_read_csr(CVMX_CIU_WDOGX(cpu)); | ||
286 | ciu_wdog.s.mode = 0; | ||
287 | cvmx_write_csr(CVMX_CIU_WDOGX(cpu), ciu_wdog.u64); | ||
288 | #endif | ||
289 | |||
290 | while (per_cpu(cpu_state, cpu) != CPU_DEAD) | 282 | while (per_cpu(cpu_state, cpu) != CPU_DEAD) |
291 | cpu_relax(); | 283 | cpu_relax(); |
292 | 284 | ||
diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_defconfig index c2f06e38c854..0583bb29150f 100644 --- a/arch/mips/configs/bigsur_defconfig +++ b/arch/mips/configs/bigsur_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.26-rc8 | 3 | # Linux kernel version: 2.6.34-rc3 |
4 | # Wed Jul 2 17:02:55 2008 | 4 | # Sat Apr 3 16:32:11 2010 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | 7 | ||
@@ -9,20 +9,25 @@ CONFIG_MIPS=y | |||
9 | # Machine selection | 9 | # Machine selection |
10 | # | 10 | # |
11 | # CONFIG_MACH_ALCHEMY is not set | 11 | # CONFIG_MACH_ALCHEMY is not set |
12 | # CONFIG_AR7 is not set | ||
12 | # CONFIG_BCM47XX is not set | 13 | # CONFIG_BCM47XX is not set |
14 | # CONFIG_BCM63XX is not set | ||
13 | # CONFIG_MIPS_COBALT is not set | 15 | # CONFIG_MIPS_COBALT is not set |
14 | # CONFIG_MACH_DECSTATION is not set | 16 | # CONFIG_MACH_DECSTATION is not set |
15 | # CONFIG_MACH_JAZZ is not set | 17 | # CONFIG_MACH_JAZZ is not set |
16 | # CONFIG_LASAT is not set | 18 | # CONFIG_LASAT is not set |
17 | # CONFIG_LEMOTE_FULONG is not set | 19 | # CONFIG_MACH_LOONGSON is not set |
18 | # CONFIG_MIPS_MALTA is not set | 20 | # CONFIG_MIPS_MALTA is not set |
19 | # CONFIG_MIPS_SIM is not set | 21 | # CONFIG_MIPS_SIM is not set |
20 | # CONFIG_MARKEINS is not set | 22 | # CONFIG_NEC_MARKEINS is not set |
21 | # CONFIG_MACH_VR41XX is not set | 23 | # CONFIG_MACH_VR41XX is not set |
24 | # CONFIG_NXP_STB220 is not set | ||
25 | # CONFIG_NXP_STB225 is not set | ||
22 | # CONFIG_PNX8550_JBS is not set | 26 | # CONFIG_PNX8550_JBS is not set |
23 | # CONFIG_PNX8550_STB810 is not set | 27 | # CONFIG_PNX8550_STB810 is not set |
24 | # CONFIG_PMC_MSP is not set | 28 | # CONFIG_PMC_MSP is not set |
25 | # CONFIG_PMC_YOSEMITE is not set | 29 | # CONFIG_PMC_YOSEMITE is not set |
30 | # CONFIG_POWERTV is not set | ||
26 | # CONFIG_SGI_IP22 is not set | 31 | # CONFIG_SGI_IP22 is not set |
27 | # CONFIG_SGI_IP27 is not set | 32 | # CONFIG_SGI_IP27 is not set |
28 | # CONFIG_SGI_IP28 is not set | 33 | # CONFIG_SGI_IP28 is not set |
@@ -36,10 +41,13 @@ CONFIG_MIPS=y | |||
36 | # CONFIG_SIBYTE_SENTOSA is not set | 41 | # CONFIG_SIBYTE_SENTOSA is not set |
37 | CONFIG_SIBYTE_BIGSUR=y | 42 | CONFIG_SIBYTE_BIGSUR=y |
38 | # CONFIG_SNI_RM is not set | 43 | # CONFIG_SNI_RM is not set |
39 | # CONFIG_TOSHIBA_JMR3927 is not set | 44 | # CONFIG_MACH_TX39XX is not set |
40 | # CONFIG_TOSHIBA_RBTX4927 is not set | 45 | # CONFIG_MACH_TX49XX is not set |
41 | # CONFIG_TOSHIBA_RBTX4938 is not set | 46 | # CONFIG_MIKROTIK_RB532 is not set |
42 | # CONFIG_WR_PPMC is not set | 47 | # CONFIG_WR_PPMC is not set |
48 | # CONFIG_CAVIUM_OCTEON_SIMULATOR is not set | ||
49 | # CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set | ||
50 | # CONFIG_ALCHEMY_GPIO_INDIRECT is not set | ||
43 | CONFIG_SIBYTE_BCM1x80=y | 51 | CONFIG_SIBYTE_BCM1x80=y |
44 | CONFIG_SIBYTE_SB1xxx_SOC=y | 52 | CONFIG_SIBYTE_SB1xxx_SOC=y |
45 | # CONFIG_CPU_SB1_PASS_1 is not set | 53 | # CONFIG_CPU_SB1_PASS_1 is not set |
@@ -48,14 +56,13 @@ CONFIG_SIBYTE_SB1xxx_SOC=y | |||
48 | # CONFIG_CPU_SB1_PASS_4 is not set | 56 | # CONFIG_CPU_SB1_PASS_4 is not set |
49 | # CONFIG_CPU_SB1_PASS_2_112x is not set | 57 | # CONFIG_CPU_SB1_PASS_2_112x is not set |
50 | # CONFIG_CPU_SB1_PASS_3 is not set | 58 | # CONFIG_CPU_SB1_PASS_3 is not set |
51 | # CONFIG_SIMULATION is not set | ||
52 | # CONFIG_SB1_CEX_ALWAYS_FATAL is not set | 59 | # CONFIG_SB1_CEX_ALWAYS_FATAL is not set |
53 | # CONFIG_SB1_CERR_STALL is not set | 60 | # CONFIG_SB1_CERR_STALL is not set |
54 | CONFIG_SIBYTE_CFE=y | ||
55 | # CONFIG_SIBYTE_CFE_CONSOLE is not set | 61 | # CONFIG_SIBYTE_CFE_CONSOLE is not set |
56 | # CONFIG_SIBYTE_BUS_WATCHER is not set | 62 | # CONFIG_SIBYTE_BUS_WATCHER is not set |
57 | # CONFIG_SIBYTE_TBPROF is not set | 63 | # CONFIG_SIBYTE_TBPROF is not set |
58 | CONFIG_SIBYTE_HAS_ZBUS_PROFILING=y | 64 | CONFIG_SIBYTE_HAS_ZBUS_PROFILING=y |
65 | CONFIG_LOONGSON_UART_BASE=y | ||
59 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 66 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
60 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | 67 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set |
61 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 68 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
@@ -66,15 +73,13 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y | |||
66 | CONFIG_GENERIC_CLOCKEVENTS=y | 73 | CONFIG_GENERIC_CLOCKEVENTS=y |
67 | CONFIG_GENERIC_TIME=y | 74 | CONFIG_GENERIC_TIME=y |
68 | CONFIG_GENERIC_CMOS_UPDATE=y | 75 | CONFIG_GENERIC_CMOS_UPDATE=y |
69 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | 76 | CONFIG_SCHED_OMIT_FRAME_POINTER=y |
70 | # CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set | 77 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y |
71 | CONFIG_CEVT_BCM1480=y | 78 | CONFIG_CEVT_BCM1480=y |
72 | CONFIG_CSRC_BCM1480=y | 79 | CONFIG_CSRC_BCM1480=y |
73 | CONFIG_CFE=y | 80 | CONFIG_CFE=y |
74 | CONFIG_DMA_COHERENT=y | 81 | CONFIG_DMA_COHERENT=y |
75 | CONFIG_EARLY_PRINTK=y | ||
76 | CONFIG_SYS_HAS_EARLY_PRINTK=y | 82 | CONFIG_SYS_HAS_EARLY_PRINTK=y |
77 | # CONFIG_HOTPLUG_CPU is not set | ||
78 | # CONFIG_NO_IOPORT is not set | 83 | # CONFIG_NO_IOPORT is not set |
79 | CONFIG_CPU_BIG_ENDIAN=y | 84 | CONFIG_CPU_BIG_ENDIAN=y |
80 | # CONFIG_CPU_LITTLE_ENDIAN is not set | 85 | # CONFIG_CPU_LITTLE_ENDIAN is not set |
@@ -88,7 +93,8 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5 | |||
88 | # | 93 | # |
89 | # CPU selection | 94 | # CPU selection |
90 | # | 95 | # |
91 | # CONFIG_CPU_LOONGSON2 is not set | 96 | # CONFIG_CPU_LOONGSON2E is not set |
97 | # CONFIG_CPU_LOONGSON2F is not set | ||
92 | # CONFIG_CPU_MIPS32_R1 is not set | 98 | # CONFIG_CPU_MIPS32_R1 is not set |
93 | # CONFIG_CPU_MIPS32_R2 is not set | 99 | # CONFIG_CPU_MIPS32_R2 is not set |
94 | # CONFIG_CPU_MIPS64_R1 is not set | 100 | # CONFIG_CPU_MIPS64_R1 is not set |
@@ -101,6 +107,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5 | |||
101 | # CONFIG_CPU_TX49XX is not set | 107 | # CONFIG_CPU_TX49XX is not set |
102 | # CONFIG_CPU_R5000 is not set | 108 | # CONFIG_CPU_R5000 is not set |
103 | # CONFIG_CPU_R5432 is not set | 109 | # CONFIG_CPU_R5432 is not set |
110 | # CONFIG_CPU_R5500 is not set | ||
104 | # CONFIG_CPU_R6000 is not set | 111 | # CONFIG_CPU_R6000 is not set |
105 | # CONFIG_CPU_NEVADA is not set | 112 | # CONFIG_CPU_NEVADA is not set |
106 | # CONFIG_CPU_R8000 is not set | 113 | # CONFIG_CPU_R8000 is not set |
@@ -108,6 +115,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5 | |||
108 | # CONFIG_CPU_RM7000 is not set | 115 | # CONFIG_CPU_RM7000 is not set |
109 | # CONFIG_CPU_RM9000 is not set | 116 | # CONFIG_CPU_RM9000 is not set |
110 | CONFIG_CPU_SB1=y | 117 | CONFIG_CPU_SB1=y |
118 | # CONFIG_CPU_CAVIUM_OCTEON is not set | ||
111 | CONFIG_SYS_HAS_CPU_SB1=y | 119 | CONFIG_SYS_HAS_CPU_SB1=y |
112 | CONFIG_WEAK_ORDERING=y | 120 | CONFIG_WEAK_ORDERING=y |
113 | CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y | 121 | CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y |
@@ -123,11 +131,13 @@ CONFIG_64BIT=y | |||
123 | CONFIG_PAGE_SIZE_4KB=y | 131 | CONFIG_PAGE_SIZE_4KB=y |
124 | # CONFIG_PAGE_SIZE_8KB is not set | 132 | # CONFIG_PAGE_SIZE_8KB is not set |
125 | # CONFIG_PAGE_SIZE_16KB is not set | 133 | # CONFIG_PAGE_SIZE_16KB is not set |
134 | # CONFIG_PAGE_SIZE_32KB is not set | ||
126 | # CONFIG_PAGE_SIZE_64KB is not set | 135 | # CONFIG_PAGE_SIZE_64KB is not set |
127 | # CONFIG_SIBYTE_DMA_PAGEOPS is not set | 136 | # CONFIG_SIBYTE_DMA_PAGEOPS is not set |
128 | CONFIG_MIPS_MT_DISABLED=y | 137 | CONFIG_MIPS_MT_DISABLED=y |
129 | # CONFIG_MIPS_MT_SMP is not set | 138 | # CONFIG_MIPS_MT_SMP is not set |
130 | # CONFIG_MIPS_MT_SMTC is not set | 139 | # CONFIG_MIPS_MT_SMTC is not set |
140 | # CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set | ||
131 | CONFIG_CPU_HAS_SYNC=y | 141 | CONFIG_CPU_HAS_SYNC=y |
132 | CONFIG_GENERIC_HARDIRQS=y | 142 | CONFIG_GENERIC_HARDIRQS=y |
133 | CONFIG_GENERIC_IRQ_PROBE=y | 143 | CONFIG_GENERIC_IRQ_PROBE=y |
@@ -142,18 +152,17 @@ CONFIG_FLATMEM_MANUAL=y | |||
142 | # CONFIG_SPARSEMEM_MANUAL is not set | 152 | # CONFIG_SPARSEMEM_MANUAL is not set |
143 | CONFIG_FLATMEM=y | 153 | CONFIG_FLATMEM=y |
144 | CONFIG_FLAT_NODE_MEM_MAP=y | 154 | CONFIG_FLAT_NODE_MEM_MAP=y |
145 | # CONFIG_SPARSEMEM_STATIC is not set | ||
146 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
147 | CONFIG_PAGEFLAGS_EXTENDED=y | 155 | CONFIG_PAGEFLAGS_EXTENDED=y |
148 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 156 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
149 | CONFIG_RESOURCES_64BIT=y | 157 | CONFIG_PHYS_ADDR_T_64BIT=y |
150 | CONFIG_ZONE_DMA_FLAG=0 | 158 | CONFIG_ZONE_DMA_FLAG=0 |
151 | CONFIG_VIRT_TO_BUS=y | 159 | CONFIG_VIRT_TO_BUS=y |
160 | # CONFIG_KSM is not set | ||
161 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | ||
152 | CONFIG_SMP=y | 162 | CONFIG_SMP=y |
153 | CONFIG_SYS_SUPPORTS_SMP=y | 163 | CONFIG_SYS_SUPPORTS_SMP=y |
154 | CONFIG_NR_CPUS_DEFAULT_4=y | 164 | CONFIG_NR_CPUS_DEFAULT_4=y |
155 | CONFIG_NR_CPUS=4 | 165 | CONFIG_NR_CPUS=4 |
156 | # CONFIG_MIPS_CMP is not set | ||
157 | CONFIG_TICK_ONESHOT=y | 166 | CONFIG_TICK_ONESHOT=y |
158 | CONFIG_NO_HZ=y | 167 | CONFIG_NO_HZ=y |
159 | CONFIG_HIGH_RES_TIMERS=y | 168 | CONFIG_HIGH_RES_TIMERS=y |
@@ -175,6 +184,7 @@ CONFIG_SECCOMP=y | |||
175 | CONFIG_LOCKDEP_SUPPORT=y | 184 | CONFIG_LOCKDEP_SUPPORT=y |
176 | CONFIG_STACKTRACE_SUPPORT=y | 185 | CONFIG_STACKTRACE_SUPPORT=y |
177 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 186 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
187 | CONFIG_CONSTRUCTORS=y | ||
178 | 188 | ||
179 | # | 189 | # |
180 | # General setup | 190 | # General setup |
@@ -188,6 +198,7 @@ CONFIG_SWAP=y | |||
188 | CONFIG_SYSVIPC=y | 198 | CONFIG_SYSVIPC=y |
189 | CONFIG_SYSVIPC_SYSCTL=y | 199 | CONFIG_SYSVIPC_SYSCTL=y |
190 | CONFIG_POSIX_MQUEUE=y | 200 | CONFIG_POSIX_MQUEUE=y |
201 | CONFIG_POSIX_MQUEUE_SYSCTL=y | ||
191 | CONFIG_BSD_PROCESS_ACCT=y | 202 | CONFIG_BSD_PROCESS_ACCT=y |
192 | CONFIG_BSD_PROCESS_ACCT_V3=y | 203 | CONFIG_BSD_PROCESS_ACCT_V3=y |
193 | CONFIG_TASKSTATS=y | 204 | CONFIG_TASKSTATS=y |
@@ -195,23 +206,39 @@ CONFIG_TASK_DELAY_ACCT=y | |||
195 | CONFIG_TASK_XACCT=y | 206 | CONFIG_TASK_XACCT=y |
196 | CONFIG_TASK_IO_ACCOUNTING=y | 207 | CONFIG_TASK_IO_ACCOUNTING=y |
197 | CONFIG_AUDIT=y | 208 | CONFIG_AUDIT=y |
209 | |||
210 | # | ||
211 | # RCU Subsystem | ||
212 | # | ||
213 | CONFIG_TREE_RCU=y | ||
214 | # CONFIG_TREE_PREEMPT_RCU is not set | ||
215 | # CONFIG_TINY_RCU is not set | ||
216 | # CONFIG_RCU_TRACE is not set | ||
217 | CONFIG_RCU_FANOUT=64 | ||
218 | # CONFIG_RCU_FANOUT_EXACT is not set | ||
219 | # CONFIG_RCU_FAST_NO_HZ is not set | ||
220 | # CONFIG_TREE_RCU_TRACE is not set | ||
198 | CONFIG_IKCONFIG=y | 221 | CONFIG_IKCONFIG=y |
199 | CONFIG_IKCONFIG_PROC=y | 222 | CONFIG_IKCONFIG_PROC=y |
200 | CONFIG_LOG_BUF_SHIFT=16 | 223 | CONFIG_LOG_BUF_SHIFT=16 |
201 | # CONFIG_CGROUPS is not set | 224 | # CONFIG_CGROUPS is not set |
202 | CONFIG_GROUP_SCHED=y | 225 | # CONFIG_SYSFS_DEPRECATED_V2 is not set |
203 | CONFIG_FAIR_GROUP_SCHED=y | ||
204 | # CONFIG_RT_GROUP_SCHED is not set | ||
205 | CONFIG_USER_SCHED=y | ||
206 | # CONFIG_CGROUP_SCHED is not set | ||
207 | CONFIG_SYSFS_DEPRECATED=y | ||
208 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
209 | CONFIG_RELAY=y | 226 | CONFIG_RELAY=y |
210 | # CONFIG_NAMESPACES is not set | 227 | CONFIG_NAMESPACES=y |
228 | CONFIG_UTS_NS=y | ||
229 | CONFIG_IPC_NS=y | ||
230 | CONFIG_USER_NS=y | ||
231 | CONFIG_PID_NS=y | ||
232 | CONFIG_NET_NS=y | ||
211 | CONFIG_BLK_DEV_INITRD=y | 233 | CONFIG_BLK_DEV_INITRD=y |
212 | CONFIG_INITRAMFS_SOURCE="" | 234 | CONFIG_INITRAMFS_SOURCE="" |
235 | CONFIG_RD_GZIP=y | ||
236 | # CONFIG_RD_BZIP2 is not set | ||
237 | # CONFIG_RD_LZMA is not set | ||
238 | # CONFIG_RD_LZO is not set | ||
213 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 239 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
214 | CONFIG_SYSCTL=y | 240 | CONFIG_SYSCTL=y |
241 | CONFIG_ANON_INODES=y | ||
215 | CONFIG_EMBEDDED=y | 242 | CONFIG_EMBEDDED=y |
216 | # CONFIG_SYSCTL_SYSCALL is not set | 243 | # CONFIG_SYSCTL_SYSCALL is not set |
217 | CONFIG_KALLSYMS=y | 244 | CONFIG_KALLSYMS=y |
@@ -222,29 +249,36 @@ CONFIG_PRINTK=y | |||
222 | CONFIG_BUG=y | 249 | CONFIG_BUG=y |
223 | CONFIG_ELF_CORE=y | 250 | CONFIG_ELF_CORE=y |
224 | # CONFIG_PCSPKR_PLATFORM is not set | 251 | # CONFIG_PCSPKR_PLATFORM is not set |
225 | CONFIG_COMPAT_BRK=y | ||
226 | CONFIG_BASE_FULL=y | 252 | CONFIG_BASE_FULL=y |
227 | CONFIG_FUTEX=y | 253 | CONFIG_FUTEX=y |
228 | CONFIG_ANON_INODES=y | ||
229 | CONFIG_EPOLL=y | 254 | CONFIG_EPOLL=y |
230 | CONFIG_SIGNALFD=y | 255 | CONFIG_SIGNALFD=y |
231 | CONFIG_TIMERFD=y | 256 | CONFIG_TIMERFD=y |
232 | CONFIG_EVENTFD=y | 257 | CONFIG_EVENTFD=y |
233 | CONFIG_SHMEM=y | 258 | CONFIG_SHMEM=y |
259 | CONFIG_AIO=y | ||
260 | |||
261 | # | ||
262 | # Kernel Performance Events And Counters | ||
263 | # | ||
234 | CONFIG_VM_EVENT_COUNTERS=y | 264 | CONFIG_VM_EVENT_COUNTERS=y |
265 | CONFIG_PCI_QUIRKS=y | ||
266 | CONFIG_COMPAT_BRK=y | ||
235 | CONFIG_SLAB=y | 267 | CONFIG_SLAB=y |
236 | # CONFIG_SLUB is not set | 268 | # CONFIG_SLUB is not set |
237 | # CONFIG_SLOB is not set | 269 | # CONFIG_SLOB is not set |
238 | # CONFIG_PROFILING is not set | 270 | # CONFIG_PROFILING is not set |
239 | # CONFIG_MARKERS is not set | ||
240 | CONFIG_HAVE_OPROFILE=y | 271 | CONFIG_HAVE_OPROFILE=y |
241 | # CONFIG_HAVE_KPROBES is not set | 272 | CONFIG_HAVE_SYSCALL_WRAPPERS=y |
242 | # CONFIG_HAVE_KRETPROBES is not set | 273 | CONFIG_USE_GENERIC_SMP_HELPERS=y |
243 | # CONFIG_HAVE_DMA_ATTRS is not set | 274 | |
244 | CONFIG_PROC_PAGE_MONITOR=y | 275 | # |
276 | # GCOV-based kernel profiling | ||
277 | # | ||
278 | # CONFIG_SLOW_WORK is not set | ||
279 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
245 | CONFIG_SLABINFO=y | 280 | CONFIG_SLABINFO=y |
246 | CONFIG_RT_MUTEXES=y | 281 | CONFIG_RT_MUTEXES=y |
247 | # CONFIG_TINY_SHMEM is not set | ||
248 | CONFIG_BASE_SMALL=0 | 282 | CONFIG_BASE_SMALL=0 |
249 | CONFIG_MODULES=y | 283 | CONFIG_MODULES=y |
250 | # CONFIG_MODULE_FORCE_LOAD is not set | 284 | # CONFIG_MODULE_FORCE_LOAD is not set |
@@ -252,26 +286,52 @@ CONFIG_MODULE_UNLOAD=y | |||
252 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 286 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
253 | CONFIG_MODVERSIONS=y | 287 | CONFIG_MODVERSIONS=y |
254 | CONFIG_MODULE_SRCVERSION_ALL=y | 288 | CONFIG_MODULE_SRCVERSION_ALL=y |
255 | CONFIG_KMOD=y | ||
256 | CONFIG_STOP_MACHINE=y | 289 | CONFIG_STOP_MACHINE=y |
257 | CONFIG_BLOCK=y | 290 | CONFIG_BLOCK=y |
258 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
259 | # CONFIG_BLK_DEV_BSG is not set | 291 | # CONFIG_BLK_DEV_BSG is not set |
292 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
260 | CONFIG_BLOCK_COMPAT=y | 293 | CONFIG_BLOCK_COMPAT=y |
261 | 294 | ||
262 | # | 295 | # |
263 | # IO Schedulers | 296 | # IO Schedulers |
264 | # | 297 | # |
265 | CONFIG_IOSCHED_NOOP=y | 298 | CONFIG_IOSCHED_NOOP=y |
266 | CONFIG_IOSCHED_AS=y | ||
267 | CONFIG_IOSCHED_DEADLINE=y | 299 | CONFIG_IOSCHED_DEADLINE=y |
268 | CONFIG_IOSCHED_CFQ=y | 300 | CONFIG_IOSCHED_CFQ=y |
269 | CONFIG_DEFAULT_AS=y | ||
270 | # CONFIG_DEFAULT_DEADLINE is not set | 301 | # CONFIG_DEFAULT_DEADLINE is not set |
271 | # CONFIG_DEFAULT_CFQ is not set | 302 | CONFIG_DEFAULT_CFQ=y |
272 | # CONFIG_DEFAULT_NOOP is not set | 303 | # CONFIG_DEFAULT_NOOP is not set |
273 | CONFIG_DEFAULT_IOSCHED="anticipatory" | 304 | CONFIG_DEFAULT_IOSCHED="cfq" |
274 | CONFIG_CLASSIC_RCU=y | 305 | # CONFIG_INLINE_SPIN_TRYLOCK is not set |
306 | # CONFIG_INLINE_SPIN_TRYLOCK_BH is not set | ||
307 | # CONFIG_INLINE_SPIN_LOCK is not set | ||
308 | # CONFIG_INLINE_SPIN_LOCK_BH is not set | ||
309 | # CONFIG_INLINE_SPIN_LOCK_IRQ is not set | ||
310 | # CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set | ||
311 | CONFIG_INLINE_SPIN_UNLOCK=y | ||
312 | # CONFIG_INLINE_SPIN_UNLOCK_BH is not set | ||
313 | CONFIG_INLINE_SPIN_UNLOCK_IRQ=y | ||
314 | # CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set | ||
315 | # CONFIG_INLINE_READ_TRYLOCK is not set | ||
316 | # CONFIG_INLINE_READ_LOCK is not set | ||
317 | # CONFIG_INLINE_READ_LOCK_BH is not set | ||
318 | # CONFIG_INLINE_READ_LOCK_IRQ is not set | ||
319 | # CONFIG_INLINE_READ_LOCK_IRQSAVE is not set | ||
320 | CONFIG_INLINE_READ_UNLOCK=y | ||
321 | # CONFIG_INLINE_READ_UNLOCK_BH is not set | ||
322 | CONFIG_INLINE_READ_UNLOCK_IRQ=y | ||
323 | # CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set | ||
324 | # CONFIG_INLINE_WRITE_TRYLOCK is not set | ||
325 | # CONFIG_INLINE_WRITE_LOCK is not set | ||
326 | # CONFIG_INLINE_WRITE_LOCK_BH is not set | ||
327 | # CONFIG_INLINE_WRITE_LOCK_IRQ is not set | ||
328 | # CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set | ||
329 | CONFIG_INLINE_WRITE_UNLOCK=y | ||
330 | # CONFIG_INLINE_WRITE_UNLOCK_BH is not set | ||
331 | CONFIG_INLINE_WRITE_UNLOCK_IRQ=y | ||
332 | # CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set | ||
333 | CONFIG_MUTEX_SPIN_ON_OWNER=y | ||
334 | # CONFIG_FREEZER is not set | ||
275 | 335 | ||
276 | # | 336 | # |
277 | # Bus options (PCI, PCMCIA, EISA, ISA, TC) | 337 | # Bus options (PCI, PCMCIA, EISA, ISA, TC) |
@@ -280,8 +340,9 @@ CONFIG_HW_HAS_PCI=y | |||
280 | CONFIG_PCI=y | 340 | CONFIG_PCI=y |
281 | CONFIG_PCI_DOMAINS=y | 341 | CONFIG_PCI_DOMAINS=y |
282 | # CONFIG_ARCH_SUPPORTS_MSI is not set | 342 | # CONFIG_ARCH_SUPPORTS_MSI is not set |
283 | CONFIG_PCI_LEGACY=y | ||
284 | CONFIG_PCI_DEBUG=y | 343 | CONFIG_PCI_DEBUG=y |
344 | # CONFIG_PCI_STUB is not set | ||
345 | # CONFIG_PCI_IOV is not set | ||
285 | CONFIG_MMU=y | 346 | CONFIG_MMU=y |
286 | CONFIG_ZONE_DMA32=y | 347 | CONFIG_ZONE_DMA32=y |
287 | # CONFIG_PCCARD is not set | 348 | # CONFIG_PCCARD is not set |
@@ -291,6 +352,8 @@ CONFIG_ZONE_DMA32=y | |||
291 | # Executable file formats | 352 | # Executable file formats |
292 | # | 353 | # |
293 | CONFIG_BINFMT_ELF=y | 354 | CONFIG_BINFMT_ELF=y |
355 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
356 | # CONFIG_HAVE_AOUT is not set | ||
294 | # CONFIG_BINFMT_MISC is not set | 357 | # CONFIG_BINFMT_MISC is not set |
295 | CONFIG_MIPS32_COMPAT=y | 358 | CONFIG_MIPS32_COMPAT=y |
296 | CONFIG_COMPAT=y | 359 | CONFIG_COMPAT=y |
@@ -304,23 +367,20 @@ CONFIG_BINFMT_ELF32=y | |||
304 | # | 367 | # |
305 | CONFIG_PM=y | 368 | CONFIG_PM=y |
306 | # CONFIG_PM_DEBUG is not set | 369 | # CONFIG_PM_DEBUG is not set |
307 | 370 | # CONFIG_PM_RUNTIME is not set | |
308 | # | ||
309 | # Networking | ||
310 | # | ||
311 | CONFIG_NET=y | 371 | CONFIG_NET=y |
312 | 372 | ||
313 | # | 373 | # |
314 | # Networking options | 374 | # Networking options |
315 | # | 375 | # |
316 | CONFIG_PACKET=y | 376 | CONFIG_PACKET=y |
317 | CONFIG_PACKET_MMAP=y | ||
318 | CONFIG_UNIX=y | 377 | CONFIG_UNIX=y |
319 | CONFIG_XFRM=y | 378 | CONFIG_XFRM=y |
320 | CONFIG_XFRM_USER=m | 379 | CONFIG_XFRM_USER=m |
321 | # CONFIG_XFRM_SUB_POLICY is not set | 380 | # CONFIG_XFRM_SUB_POLICY is not set |
322 | CONFIG_XFRM_MIGRATE=y | 381 | CONFIG_XFRM_MIGRATE=y |
323 | # CONFIG_XFRM_STATISTICS is not set | 382 | # CONFIG_XFRM_STATISTICS is not set |
383 | CONFIG_XFRM_IPCOMP=m | ||
324 | CONFIG_NET_KEY=y | 384 | CONFIG_NET_KEY=y |
325 | CONFIG_NET_KEY_MIGRATE=y | 385 | CONFIG_NET_KEY_MIGRATE=y |
326 | CONFIG_INET=y | 386 | CONFIG_INET=y |
@@ -353,36 +413,6 @@ CONFIG_INET_TCP_DIAG=y | |||
353 | CONFIG_TCP_CONG_CUBIC=y | 413 | CONFIG_TCP_CONG_CUBIC=y |
354 | CONFIG_DEFAULT_TCP_CONG="cubic" | 414 | CONFIG_DEFAULT_TCP_CONG="cubic" |
355 | CONFIG_TCP_MD5SIG=y | 415 | CONFIG_TCP_MD5SIG=y |
356 | CONFIG_IP_VS=m | ||
357 | # CONFIG_IP_VS_DEBUG is not set | ||
358 | CONFIG_IP_VS_TAB_BITS=12 | ||
359 | |||
360 | # | ||
361 | # IPVS transport protocol load balancing support | ||
362 | # | ||
363 | CONFIG_IP_VS_PROTO_TCP=y | ||
364 | CONFIG_IP_VS_PROTO_UDP=y | ||
365 | CONFIG_IP_VS_PROTO_ESP=y | ||
366 | CONFIG_IP_VS_PROTO_AH=y | ||
367 | |||
368 | # | ||
369 | # IPVS scheduler | ||
370 | # | ||
371 | CONFIG_IP_VS_RR=m | ||
372 | CONFIG_IP_VS_WRR=m | ||
373 | CONFIG_IP_VS_LC=m | ||
374 | CONFIG_IP_VS_WLC=m | ||
375 | CONFIG_IP_VS_LBLC=m | ||
376 | CONFIG_IP_VS_LBLCR=m | ||
377 | CONFIG_IP_VS_DH=m | ||
378 | CONFIG_IP_VS_SH=m | ||
379 | CONFIG_IP_VS_SED=m | ||
380 | CONFIG_IP_VS_NQ=m | ||
381 | |||
382 | # | ||
383 | # IPVS application helper | ||
384 | # | ||
385 | CONFIG_IP_VS_FTP=m | ||
386 | CONFIG_IPV6=m | 416 | CONFIG_IPV6=m |
387 | CONFIG_IPV6_PRIVACY=y | 417 | CONFIG_IPV6_PRIVACY=y |
388 | CONFIG_IPV6_ROUTER_PREF=y | 418 | CONFIG_IPV6_ROUTER_PREF=y |
@@ -399,11 +429,13 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m | |||
399 | CONFIG_INET6_XFRM_MODE_BEET=m | 429 | CONFIG_INET6_XFRM_MODE_BEET=m |
400 | CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m | 430 | CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m |
401 | CONFIG_IPV6_SIT=m | 431 | CONFIG_IPV6_SIT=m |
432 | CONFIG_IPV6_SIT_6RD=y | ||
402 | CONFIG_IPV6_NDISC_NODETYPE=y | 433 | CONFIG_IPV6_NDISC_NODETYPE=y |
403 | CONFIG_IPV6_TUNNEL=m | 434 | CONFIG_IPV6_TUNNEL=m |
404 | CONFIG_IPV6_MULTIPLE_TABLES=y | 435 | CONFIG_IPV6_MULTIPLE_TABLES=y |
405 | CONFIG_IPV6_SUBTREES=y | 436 | CONFIG_IPV6_SUBTREES=y |
406 | # CONFIG_IPV6_MROUTE is not set | 437 | # CONFIG_IPV6_MROUTE is not set |
438 | CONFIG_NETLABEL=y | ||
407 | CONFIG_NETWORK_SECMARK=y | 439 | CONFIG_NETWORK_SECMARK=y |
408 | CONFIG_NETFILTER=y | 440 | CONFIG_NETFILTER=y |
409 | # CONFIG_NETFILTER_DEBUG is not set | 441 | # CONFIG_NETFILTER_DEBUG is not set |
@@ -421,19 +453,53 @@ CONFIG_NF_CONNTRACK_IRC=m | |||
421 | CONFIG_NF_CONNTRACK_SIP=m | 453 | CONFIG_NF_CONNTRACK_SIP=m |
422 | CONFIG_NF_CT_NETLINK=m | 454 | CONFIG_NF_CT_NETLINK=m |
423 | CONFIG_NETFILTER_XTABLES=m | 455 | CONFIG_NETFILTER_XTABLES=m |
456 | CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m | ||
424 | CONFIG_NETFILTER_XT_TARGET_MARK=m | 457 | CONFIG_NETFILTER_XT_TARGET_MARK=m |
425 | CONFIG_NETFILTER_XT_TARGET_NFLOG=m | 458 | CONFIG_NETFILTER_XT_TARGET_NFLOG=m |
426 | CONFIG_NETFILTER_XT_TARGET_SECMARK=m | 459 | CONFIG_NETFILTER_XT_TARGET_SECMARK=m |
427 | CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m | ||
428 | CONFIG_NETFILTER_XT_TARGET_TCPMSS=m | 460 | CONFIG_NETFILTER_XT_TARGET_TCPMSS=m |
429 | CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m | 461 | CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m |
430 | CONFIG_NETFILTER_XT_MATCH_MARK=m | 462 | CONFIG_NETFILTER_XT_MATCH_MARK=m |
431 | CONFIG_NETFILTER_XT_MATCH_POLICY=m | 463 | CONFIG_NETFILTER_XT_MATCH_POLICY=m |
432 | CONFIG_NETFILTER_XT_MATCH_STATE=m | 464 | CONFIG_NETFILTER_XT_MATCH_STATE=m |
465 | CONFIG_IP_VS=m | ||
466 | CONFIG_IP_VS_IPV6=y | ||
467 | # CONFIG_IP_VS_DEBUG is not set | ||
468 | CONFIG_IP_VS_TAB_BITS=12 | ||
469 | |||
470 | # | ||
471 | # IPVS transport protocol load balancing support | ||
472 | # | ||
473 | CONFIG_IP_VS_PROTO_TCP=y | ||
474 | CONFIG_IP_VS_PROTO_UDP=y | ||
475 | CONFIG_IP_VS_PROTO_AH_ESP=y | ||
476 | CONFIG_IP_VS_PROTO_ESP=y | ||
477 | CONFIG_IP_VS_PROTO_AH=y | ||
478 | CONFIG_IP_VS_PROTO_SCTP=y | ||
479 | |||
480 | # | ||
481 | # IPVS scheduler | ||
482 | # | ||
483 | CONFIG_IP_VS_RR=m | ||
484 | CONFIG_IP_VS_WRR=m | ||
485 | CONFIG_IP_VS_LC=m | ||
486 | CONFIG_IP_VS_WLC=m | ||
487 | CONFIG_IP_VS_LBLC=m | ||
488 | CONFIG_IP_VS_LBLCR=m | ||
489 | CONFIG_IP_VS_DH=m | ||
490 | CONFIG_IP_VS_SH=m | ||
491 | CONFIG_IP_VS_SED=m | ||
492 | CONFIG_IP_VS_NQ=m | ||
493 | |||
494 | # | ||
495 | # IPVS application helper | ||
496 | # | ||
497 | CONFIG_IP_VS_FTP=m | ||
433 | 498 | ||
434 | # | 499 | # |
435 | # IP: Netfilter Configuration | 500 | # IP: Netfilter Configuration |
436 | # | 501 | # |
502 | CONFIG_NF_DEFRAG_IPV4=m | ||
437 | CONFIG_NF_CONNTRACK_IPV4=m | 503 | CONFIG_NF_CONNTRACK_IPV4=m |
438 | CONFIG_NF_CONNTRACK_PROC_COMPAT=y | 504 | CONFIG_NF_CONNTRACK_PROC_COMPAT=y |
439 | CONFIG_IP_NF_IPTABLES=m | 505 | CONFIG_IP_NF_IPTABLES=m |
@@ -459,22 +525,44 @@ CONFIG_IP_NF_MANGLE=m | |||
459 | CONFIG_NF_CONNTRACK_IPV6=m | 525 | CONFIG_NF_CONNTRACK_IPV6=m |
460 | CONFIG_IP6_NF_IPTABLES=m | 526 | CONFIG_IP6_NF_IPTABLES=m |
461 | CONFIG_IP6_NF_MATCH_IPV6HEADER=m | 527 | CONFIG_IP6_NF_MATCH_IPV6HEADER=m |
462 | CONFIG_IP6_NF_FILTER=m | ||
463 | CONFIG_IP6_NF_TARGET_LOG=m | 528 | CONFIG_IP6_NF_TARGET_LOG=m |
529 | CONFIG_IP6_NF_FILTER=m | ||
464 | CONFIG_IP6_NF_TARGET_REJECT=m | 530 | CONFIG_IP6_NF_TARGET_REJECT=m |
465 | CONFIG_IP6_NF_MANGLE=m | 531 | CONFIG_IP6_NF_MANGLE=m |
466 | # CONFIG_IP_DCCP is not set | 532 | CONFIG_IP_DCCP=m |
533 | CONFIG_INET_DCCP_DIAG=m | ||
534 | |||
535 | # | ||
536 | # DCCP CCIDs Configuration (EXPERIMENTAL) | ||
537 | # | ||
538 | # CONFIG_IP_DCCP_CCID2_DEBUG is not set | ||
539 | CONFIG_IP_DCCP_CCID3=y | ||
540 | # CONFIG_IP_DCCP_CCID3_DEBUG is not set | ||
541 | CONFIG_IP_DCCP_CCID3_RTO=100 | ||
542 | CONFIG_IP_DCCP_TFRC_LIB=y | ||
543 | |||
544 | # | ||
545 | # DCCP Kernel Hacking | ||
546 | # | ||
547 | # CONFIG_IP_DCCP_DEBUG is not set | ||
467 | CONFIG_IP_SCTP=m | 548 | CONFIG_IP_SCTP=m |
468 | # CONFIG_SCTP_DBG_MSG is not set | 549 | # CONFIG_SCTP_DBG_MSG is not set |
469 | # CONFIG_SCTP_DBG_OBJCNT is not set | 550 | # CONFIG_SCTP_DBG_OBJCNT is not set |
470 | # CONFIG_SCTP_HMAC_NONE is not set | 551 | # CONFIG_SCTP_HMAC_NONE is not set |
471 | # CONFIG_SCTP_HMAC_SHA1 is not set | 552 | CONFIG_SCTP_HMAC_SHA1=y |
472 | CONFIG_SCTP_HMAC_MD5=y | 553 | # CONFIG_SCTP_HMAC_MD5 is not set |
554 | # CONFIG_RDS is not set | ||
473 | # CONFIG_TIPC is not set | 555 | # CONFIG_TIPC is not set |
474 | # CONFIG_ATM is not set | 556 | # CONFIG_ATM is not set |
475 | # CONFIG_BRIDGE is not set | 557 | CONFIG_STP=m |
476 | # CONFIG_VLAN_8021Q is not set | 558 | CONFIG_GARP=m |
559 | CONFIG_BRIDGE=m | ||
560 | CONFIG_BRIDGE_IGMP_SNOOPING=y | ||
561 | # CONFIG_NET_DSA is not set | ||
562 | CONFIG_VLAN_8021Q=m | ||
563 | CONFIG_VLAN_8021Q_GVRP=y | ||
477 | # CONFIG_DECNET is not set | 564 | # CONFIG_DECNET is not set |
565 | CONFIG_LLC=m | ||
478 | # CONFIG_LLC2 is not set | 566 | # CONFIG_LLC2 is not set |
479 | # CONFIG_IPX is not set | 567 | # CONFIG_IPX is not set |
480 | # CONFIG_ATALK is not set | 568 | # CONFIG_ATALK is not set |
@@ -482,26 +570,47 @@ CONFIG_SCTP_HMAC_MD5=y | |||
482 | # CONFIG_LAPB is not set | 570 | # CONFIG_LAPB is not set |
483 | # CONFIG_ECONET is not set | 571 | # CONFIG_ECONET is not set |
484 | # CONFIG_WAN_ROUTER is not set | 572 | # CONFIG_WAN_ROUTER is not set |
573 | # CONFIG_PHONET is not set | ||
574 | # CONFIG_IEEE802154 is not set | ||
485 | # CONFIG_NET_SCHED is not set | 575 | # CONFIG_NET_SCHED is not set |
576 | # CONFIG_DCB is not set | ||
486 | 577 | ||
487 | # | 578 | # |
488 | # Network testing | 579 | # Network testing |
489 | # | 580 | # |
490 | # CONFIG_NET_PKTGEN is not set | 581 | # CONFIG_NET_PKTGEN is not set |
491 | # CONFIG_HAMRADIO is not set | 582 | CONFIG_HAMRADIO=y |
583 | |||
584 | # | ||
585 | # Packet Radio protocols | ||
586 | # | ||
587 | CONFIG_AX25=m | ||
588 | CONFIG_AX25_DAMA_SLAVE=y | ||
589 | CONFIG_NETROM=m | ||
590 | CONFIG_ROSE=m | ||
591 | |||
592 | # | ||
593 | # AX.25 network device drivers | ||
594 | # | ||
595 | CONFIG_MKISS=m | ||
596 | CONFIG_6PACK=m | ||
597 | CONFIG_BPQETHER=m | ||
598 | CONFIG_BAYCOM_SER_FDX=m | ||
599 | CONFIG_BAYCOM_SER_HDX=m | ||
600 | CONFIG_YAM=m | ||
492 | # CONFIG_CAN is not set | 601 | # CONFIG_CAN is not set |
493 | # CONFIG_IRDA is not set | 602 | # CONFIG_IRDA is not set |
494 | # CONFIG_BT is not set | 603 | # CONFIG_BT is not set |
495 | # CONFIG_AF_RXRPC is not set | 604 | # CONFIG_AF_RXRPC is not set |
496 | CONFIG_FIB_RULES=y | 605 | CONFIG_FIB_RULES=y |
606 | CONFIG_WIRELESS=y | ||
607 | # CONFIG_CFG80211 is not set | ||
608 | # CONFIG_LIB80211 is not set | ||
497 | 609 | ||
498 | # | 610 | # |
499 | # Wireless | 611 | # CFG80211 needs to be enabled for MAC80211 |
500 | # | 612 | # |
501 | # CONFIG_CFG80211 is not set | 613 | # CONFIG_WIMAX is not set |
502 | # CONFIG_WIRELESS_EXT is not set | ||
503 | # CONFIG_MAC80211 is not set | ||
504 | # CONFIG_IEEE80211 is not set | ||
505 | # CONFIG_RFKILL is not set | 614 | # CONFIG_RFKILL is not set |
506 | # CONFIG_NET_9P is not set | 615 | # CONFIG_NET_9P is not set |
507 | 616 | ||
@@ -513,9 +622,12 @@ CONFIG_FIB_RULES=y | |||
513 | # Generic Driver Options | 622 | # Generic Driver Options |
514 | # | 623 | # |
515 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 624 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
625 | # CONFIG_DEVTMPFS is not set | ||
516 | CONFIG_STANDALONE=y | 626 | CONFIG_STANDALONE=y |
517 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 627 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
518 | CONFIG_FW_LOADER=m | 628 | CONFIG_FW_LOADER=m |
629 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
630 | CONFIG_EXTRA_FIRMWARE="" | ||
519 | # CONFIG_DEBUG_DRIVER is not set | 631 | # CONFIG_DEBUG_DRIVER is not set |
520 | # CONFIG_DEBUG_DEVRES is not set | 632 | # CONFIG_DEBUG_DEVRES is not set |
521 | # CONFIG_SYS_HYPERVISOR is not set | 633 | # CONFIG_SYS_HYPERVISOR is not set |
@@ -530,33 +642,53 @@ CONFIG_BLK_DEV=y | |||
530 | # CONFIG_BLK_DEV_COW_COMMON is not set | 642 | # CONFIG_BLK_DEV_COW_COMMON is not set |
531 | CONFIG_BLK_DEV_LOOP=m | 643 | CONFIG_BLK_DEV_LOOP=m |
532 | CONFIG_BLK_DEV_CRYPTOLOOP=m | 644 | CONFIG_BLK_DEV_CRYPTOLOOP=m |
645 | |||
646 | # | ||
647 | # DRBD disabled because PROC_FS, INET or CONNECTOR not selected | ||
648 | # | ||
533 | CONFIG_BLK_DEV_NBD=m | 649 | CONFIG_BLK_DEV_NBD=m |
534 | # CONFIG_BLK_DEV_SX8 is not set | 650 | # CONFIG_BLK_DEV_SX8 is not set |
535 | # CONFIG_BLK_DEV_RAM is not set | 651 | # CONFIG_BLK_DEV_RAM is not set |
536 | # CONFIG_CDROM_PKTCDVD is not set | 652 | # CONFIG_CDROM_PKTCDVD is not set |
537 | # CONFIG_ATA_OVER_ETH is not set | 653 | # CONFIG_ATA_OVER_ETH is not set |
654 | # CONFIG_BLK_DEV_HD is not set | ||
538 | CONFIG_MISC_DEVICES=y | 655 | CONFIG_MISC_DEVICES=y |
656 | # CONFIG_AD525X_DPOT is not set | ||
539 | # CONFIG_PHANTOM is not set | 657 | # CONFIG_PHANTOM is not set |
540 | # CONFIG_EEPROM_93CX6 is not set | ||
541 | CONFIG_SGI_IOC4=m | 658 | CONFIG_SGI_IOC4=m |
542 | # CONFIG_TIFM_CORE is not set | 659 | # CONFIG_TIFM_CORE is not set |
660 | # CONFIG_ICS932S401 is not set | ||
543 | # CONFIG_ENCLOSURE_SERVICES is not set | 661 | # CONFIG_ENCLOSURE_SERVICES is not set |
662 | # CONFIG_HP_ILO is not set | ||
663 | # CONFIG_ISL29003 is not set | ||
664 | # CONFIG_SENSORS_TSL2550 is not set | ||
665 | # CONFIG_DS1682 is not set | ||
666 | # CONFIG_C2PORT is not set | ||
667 | |||
668 | # | ||
669 | # EEPROM support | ||
670 | # | ||
671 | # CONFIG_EEPROM_AT24 is not set | ||
672 | CONFIG_EEPROM_LEGACY=y | ||
673 | CONFIG_EEPROM_MAX6875=y | ||
674 | # CONFIG_EEPROM_93CX6 is not set | ||
675 | # CONFIG_CB710_CORE is not set | ||
544 | CONFIG_HAVE_IDE=y | 676 | CONFIG_HAVE_IDE=y |
545 | CONFIG_IDE=y | 677 | CONFIG_IDE=y |
546 | CONFIG_IDE_MAX_HWIFS=4 | ||
547 | CONFIG_BLK_DEV_IDE=y | ||
548 | 678 | ||
549 | # | 679 | # |
550 | # Please see Documentation/ide/ide.txt for help/info on IDE drives | 680 | # Please see Documentation/ide/ide.txt for help/info on IDE drives |
551 | # | 681 | # |
682 | CONFIG_IDE_XFER_MODE=y | ||
683 | CONFIG_IDE_TIMINGS=y | ||
684 | CONFIG_IDE_ATAPI=y | ||
552 | # CONFIG_BLK_DEV_IDE_SATA is not set | 685 | # CONFIG_BLK_DEV_IDE_SATA is not set |
553 | CONFIG_BLK_DEV_IDEDISK=y | 686 | CONFIG_IDE_GD=y |
554 | # CONFIG_IDEDISK_MULTI_MODE is not set | 687 | CONFIG_IDE_GD_ATA=y |
688 | # CONFIG_IDE_GD_ATAPI is not set | ||
555 | CONFIG_BLK_DEV_IDECD=y | 689 | CONFIG_BLK_DEV_IDECD=y |
556 | CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y | 690 | CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y |
557 | CONFIG_BLK_DEV_IDETAPE=y | 691 | CONFIG_BLK_DEV_IDETAPE=y |
558 | CONFIG_BLK_DEV_IDEFLOPPY=y | ||
559 | # CONFIG_BLK_DEV_IDESCSI is not set | ||
560 | # CONFIG_IDE_TASK_IOCTL is not set | 692 | # CONFIG_IDE_TASK_IOCTL is not set |
561 | CONFIG_IDE_PROC_FS=y | 693 | CONFIG_IDE_PROC_FS=y |
562 | 694 | ||
@@ -581,14 +713,13 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y | |||
581 | # CONFIG_BLK_DEV_AMD74XX is not set | 713 | # CONFIG_BLK_DEV_AMD74XX is not set |
582 | CONFIG_BLK_DEV_CMD64X=y | 714 | CONFIG_BLK_DEV_CMD64X=y |
583 | # CONFIG_BLK_DEV_TRIFLEX is not set | 715 | # CONFIG_BLK_DEV_TRIFLEX is not set |
584 | # CONFIG_BLK_DEV_CY82C693 is not set | ||
585 | # CONFIG_BLK_DEV_CS5520 is not set | 716 | # CONFIG_BLK_DEV_CS5520 is not set |
586 | # CONFIG_BLK_DEV_CS5530 is not set | 717 | # CONFIG_BLK_DEV_CS5530 is not set |
587 | # CONFIG_BLK_DEV_HPT34X is not set | ||
588 | # CONFIG_BLK_DEV_HPT366 is not set | 718 | # CONFIG_BLK_DEV_HPT366 is not set |
589 | # CONFIG_BLK_DEV_JMICRON is not set | 719 | # CONFIG_BLK_DEV_JMICRON is not set |
590 | # CONFIG_BLK_DEV_SC1200 is not set | 720 | # CONFIG_BLK_DEV_SC1200 is not set |
591 | # CONFIG_BLK_DEV_PIIX is not set | 721 | # CONFIG_BLK_DEV_PIIX is not set |
722 | # CONFIG_BLK_DEV_IT8172 is not set | ||
592 | CONFIG_BLK_DEV_IT8213=m | 723 | CONFIG_BLK_DEV_IT8213=m |
593 | # CONFIG_BLK_DEV_IT821X is not set | 724 | # CONFIG_BLK_DEV_IT821X is not set |
594 | # CONFIG_BLK_DEV_NS87415 is not set | 725 | # CONFIG_BLK_DEV_NS87415 is not set |
@@ -600,14 +731,12 @@ CONFIG_BLK_DEV_IT8213=m | |||
600 | # CONFIG_BLK_DEV_TRM290 is not set | 731 | # CONFIG_BLK_DEV_TRM290 is not set |
601 | # CONFIG_BLK_DEV_VIA82CXXX is not set | 732 | # CONFIG_BLK_DEV_VIA82CXXX is not set |
602 | CONFIG_BLK_DEV_TC86C001=m | 733 | CONFIG_BLK_DEV_TC86C001=m |
603 | # CONFIG_BLK_DEV_IDE_SWARM is not set | ||
604 | CONFIG_BLK_DEV_IDEDMA=y | 734 | CONFIG_BLK_DEV_IDEDMA=y |
605 | # CONFIG_BLK_DEV_HD_ONLY is not set | ||
606 | # CONFIG_BLK_DEV_HD is not set | ||
607 | 735 | ||
608 | # | 736 | # |
609 | # SCSI device support | 737 | # SCSI device support |
610 | # | 738 | # |
739 | CONFIG_SCSI_MOD=y | ||
611 | # CONFIG_RAID_ATTRS is not set | 740 | # CONFIG_RAID_ATTRS is not set |
612 | CONFIG_SCSI=y | 741 | CONFIG_SCSI=y |
613 | CONFIG_SCSI_DMA=y | 742 | CONFIG_SCSI_DMA=y |
@@ -625,10 +754,6 @@ CONFIG_BLK_DEV_SR=m | |||
625 | CONFIG_BLK_DEV_SR_VENDOR=y | 754 | CONFIG_BLK_DEV_SR_VENDOR=y |
626 | CONFIG_CHR_DEV_SG=m | 755 | CONFIG_CHR_DEV_SG=m |
627 | CONFIG_CHR_DEV_SCH=m | 756 | CONFIG_CHR_DEV_SCH=m |
628 | |||
629 | # | ||
630 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
631 | # | ||
632 | # CONFIG_SCSI_MULTI_LUN is not set | 757 | # CONFIG_SCSI_MULTI_LUN is not set |
633 | # CONFIG_SCSI_CONSTANTS is not set | 758 | # CONFIG_SCSI_CONSTANTS is not set |
634 | # CONFIG_SCSI_LOGGING is not set | 759 | # CONFIG_SCSI_LOGGING is not set |
@@ -645,27 +770,36 @@ CONFIG_SCSI_WAIT_SCAN=m | |||
645 | # CONFIG_SCSI_SRP_ATTRS is not set | 770 | # CONFIG_SCSI_SRP_ATTRS is not set |
646 | CONFIG_SCSI_LOWLEVEL=y | 771 | CONFIG_SCSI_LOWLEVEL=y |
647 | # CONFIG_ISCSI_TCP is not set | 772 | # CONFIG_ISCSI_TCP is not set |
773 | # CONFIG_SCSI_CXGB3_ISCSI is not set | ||
774 | # CONFIG_SCSI_BNX2_ISCSI is not set | ||
775 | # CONFIG_BE2ISCSI is not set | ||
648 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | 776 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set |
777 | # CONFIG_SCSI_HPSA is not set | ||
649 | # CONFIG_SCSI_3W_9XXX is not set | 778 | # CONFIG_SCSI_3W_9XXX is not set |
779 | # CONFIG_SCSI_3W_SAS is not set | ||
650 | # CONFIG_SCSI_ACARD is not set | 780 | # CONFIG_SCSI_ACARD is not set |
651 | # CONFIG_SCSI_AACRAID is not set | 781 | # CONFIG_SCSI_AACRAID is not set |
652 | # CONFIG_SCSI_AIC7XXX is not set | 782 | # CONFIG_SCSI_AIC7XXX is not set |
653 | # CONFIG_SCSI_AIC7XXX_OLD is not set | 783 | # CONFIG_SCSI_AIC7XXX_OLD is not set |
654 | # CONFIG_SCSI_AIC79XX is not set | 784 | # CONFIG_SCSI_AIC79XX is not set |
655 | # CONFIG_SCSI_AIC94XX is not set | 785 | # CONFIG_SCSI_AIC94XX is not set |
786 | # CONFIG_SCSI_MVSAS is not set | ||
656 | # CONFIG_SCSI_DPT_I2O is not set | 787 | # CONFIG_SCSI_DPT_I2O is not set |
657 | # CONFIG_SCSI_ADVANSYS is not set | 788 | # CONFIG_SCSI_ADVANSYS is not set |
658 | # CONFIG_SCSI_ARCMSR is not set | 789 | # CONFIG_SCSI_ARCMSR is not set |
659 | # CONFIG_MEGARAID_NEWGEN is not set | 790 | # CONFIG_MEGARAID_NEWGEN is not set |
660 | # CONFIG_MEGARAID_LEGACY is not set | 791 | # CONFIG_MEGARAID_LEGACY is not set |
661 | # CONFIG_MEGARAID_SAS is not set | 792 | # CONFIG_MEGARAID_SAS is not set |
793 | # CONFIG_SCSI_MPT2SAS is not set | ||
662 | # CONFIG_SCSI_HPTIOP is not set | 794 | # CONFIG_SCSI_HPTIOP is not set |
795 | # CONFIG_LIBFC is not set | ||
796 | # CONFIG_LIBFCOE is not set | ||
797 | # CONFIG_FCOE is not set | ||
663 | # CONFIG_SCSI_DMX3191D is not set | 798 | # CONFIG_SCSI_DMX3191D is not set |
664 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | 799 | # CONFIG_SCSI_FUTURE_DOMAIN is not set |
665 | # CONFIG_SCSI_IPS is not set | 800 | # CONFIG_SCSI_IPS is not set |
666 | # CONFIG_SCSI_INITIO is not set | 801 | # CONFIG_SCSI_INITIO is not set |
667 | # CONFIG_SCSI_INIA100 is not set | 802 | # CONFIG_SCSI_INIA100 is not set |
668 | # CONFIG_SCSI_MVSAS is not set | ||
669 | # CONFIG_SCSI_STEX is not set | 803 | # CONFIG_SCSI_STEX is not set |
670 | # CONFIG_SCSI_SYM53C8XX_2 is not set | 804 | # CONFIG_SCSI_SYM53C8XX_2 is not set |
671 | # CONFIG_SCSI_IPR is not set | 805 | # CONFIG_SCSI_IPR is not set |
@@ -676,9 +810,15 @@ CONFIG_SCSI_LOWLEVEL=y | |||
676 | # CONFIG_SCSI_DC395x is not set | 810 | # CONFIG_SCSI_DC395x is not set |
677 | # CONFIG_SCSI_DC390T is not set | 811 | # CONFIG_SCSI_DC390T is not set |
678 | # CONFIG_SCSI_DEBUG is not set | 812 | # CONFIG_SCSI_DEBUG is not set |
813 | # CONFIG_SCSI_PMCRAID is not set | ||
814 | # CONFIG_SCSI_PM8001 is not set | ||
679 | # CONFIG_SCSI_SRP is not set | 815 | # CONFIG_SCSI_SRP is not set |
816 | # CONFIG_SCSI_BFA_FC is not set | ||
817 | # CONFIG_SCSI_DH is not set | ||
818 | # CONFIG_SCSI_OSD_INITIATOR is not set | ||
680 | CONFIG_ATA=y | 819 | CONFIG_ATA=y |
681 | # CONFIG_ATA_NONSTANDARD is not set | 820 | # CONFIG_ATA_NONSTANDARD is not set |
821 | CONFIG_ATA_VERBOSE_ERROR=y | ||
682 | CONFIG_SATA_PMP=y | 822 | CONFIG_SATA_PMP=y |
683 | # CONFIG_SATA_AHCI is not set | 823 | # CONFIG_SATA_AHCI is not set |
684 | CONFIG_SATA_SIL24=y | 824 | CONFIG_SATA_SIL24=y |
@@ -700,6 +840,7 @@ CONFIG_ATA_SFF=y | |||
700 | # CONFIG_PATA_ALI is not set | 840 | # CONFIG_PATA_ALI is not set |
701 | # CONFIG_PATA_AMD is not set | 841 | # CONFIG_PATA_AMD is not set |
702 | # CONFIG_PATA_ARTOP is not set | 842 | # CONFIG_PATA_ARTOP is not set |
843 | # CONFIG_PATA_ATP867X is not set | ||
703 | # CONFIG_PATA_ATIIXP is not set | 844 | # CONFIG_PATA_ATIIXP is not set |
704 | # CONFIG_PATA_CMD640_PCI is not set | 845 | # CONFIG_PATA_CMD640_PCI is not set |
705 | # CONFIG_PATA_CMD64X is not set | 846 | # CONFIG_PATA_CMD64X is not set |
@@ -715,6 +856,7 @@ CONFIG_ATA_SFF=y | |||
715 | # CONFIG_PATA_IT821X is not set | 856 | # CONFIG_PATA_IT821X is not set |
716 | # CONFIG_PATA_IT8213 is not set | 857 | # CONFIG_PATA_IT8213 is not set |
717 | # CONFIG_PATA_JMICRON is not set | 858 | # CONFIG_PATA_JMICRON is not set |
859 | # CONFIG_PATA_LEGACY is not set | ||
718 | # CONFIG_PATA_TRIFLEX is not set | 860 | # CONFIG_PATA_TRIFLEX is not set |
719 | # CONFIG_PATA_MARVELL is not set | 861 | # CONFIG_PATA_MARVELL is not set |
720 | # CONFIG_PATA_MPIIX is not set | 862 | # CONFIG_PATA_MPIIX is not set |
@@ -725,14 +867,16 @@ CONFIG_ATA_SFF=y | |||
725 | # CONFIG_PATA_NS87415 is not set | 867 | # CONFIG_PATA_NS87415 is not set |
726 | # CONFIG_PATA_OPTI is not set | 868 | # CONFIG_PATA_OPTI is not set |
727 | # CONFIG_PATA_OPTIDMA is not set | 869 | # CONFIG_PATA_OPTIDMA is not set |
870 | # CONFIG_PATA_PDC2027X is not set | ||
728 | # CONFIG_PATA_PDC_OLD is not set | 871 | # CONFIG_PATA_PDC_OLD is not set |
729 | # CONFIG_PATA_RADISYS is not set | 872 | # CONFIG_PATA_RADISYS is not set |
873 | # CONFIG_PATA_RDC is not set | ||
730 | # CONFIG_PATA_RZ1000 is not set | 874 | # CONFIG_PATA_RZ1000 is not set |
731 | # CONFIG_PATA_SC1200 is not set | 875 | # CONFIG_PATA_SC1200 is not set |
732 | # CONFIG_PATA_SERVERWORKS is not set | 876 | # CONFIG_PATA_SERVERWORKS is not set |
733 | # CONFIG_PATA_PDC2027X is not set | ||
734 | CONFIG_PATA_SIL680=y | 877 | CONFIG_PATA_SIL680=y |
735 | # CONFIG_PATA_SIS is not set | 878 | # CONFIG_PATA_SIS is not set |
879 | # CONFIG_PATA_TOSHIBA is not set | ||
736 | # CONFIG_PATA_VIA is not set | 880 | # CONFIG_PATA_VIA is not set |
737 | # CONFIG_PATA_WINBOND is not set | 881 | # CONFIG_PATA_WINBOND is not set |
738 | # CONFIG_PATA_PLATFORM is not set | 882 | # CONFIG_PATA_PLATFORM is not set |
@@ -745,13 +889,16 @@ CONFIG_PATA_SIL680=y | |||
745 | # | 889 | # |
746 | 890 | ||
747 | # | 891 | # |
748 | # Enable only one of the two stacks, unless you know what you are doing | 892 | # You can enable one or both FireWire driver stacks. |
893 | # | ||
894 | |||
895 | # | ||
896 | # The newer stack is recommended. | ||
749 | # | 897 | # |
750 | # CONFIG_FIREWIRE is not set | 898 | # CONFIG_FIREWIRE is not set |
751 | # CONFIG_IEEE1394 is not set | 899 | # CONFIG_IEEE1394 is not set |
752 | # CONFIG_I2O is not set | 900 | # CONFIG_I2O is not set |
753 | CONFIG_NETDEVICES=y | 901 | CONFIG_NETDEVICES=y |
754 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
755 | # CONFIG_DUMMY is not set | 902 | # CONFIG_DUMMY is not set |
756 | # CONFIG_BONDING is not set | 903 | # CONFIG_BONDING is not set |
757 | # CONFIG_MACVLAN is not set | 904 | # CONFIG_MACVLAN is not set |
@@ -774,6 +921,9 @@ CONFIG_PHYLIB=y | |||
774 | # CONFIG_BROADCOM_PHY is not set | 921 | # CONFIG_BROADCOM_PHY is not set |
775 | # CONFIG_ICPLUS_PHY is not set | 922 | # CONFIG_ICPLUS_PHY is not set |
776 | # CONFIG_REALTEK_PHY is not set | 923 | # CONFIG_REALTEK_PHY is not set |
924 | # CONFIG_NATIONAL_PHY is not set | ||
925 | # CONFIG_STE10XP is not set | ||
926 | # CONFIG_LSI_ET1011C_PHY is not set | ||
777 | # CONFIG_FIXED_PHY is not set | 927 | # CONFIG_FIXED_PHY is not set |
778 | # CONFIG_MDIO_BITBANG is not set | 928 | # CONFIG_MDIO_BITBANG is not set |
779 | CONFIG_NET_ETHERNET=y | 929 | CONFIG_NET_ETHERNET=y |
@@ -783,23 +933,33 @@ CONFIG_MII=y | |||
783 | # CONFIG_SUNGEM is not set | 933 | # CONFIG_SUNGEM is not set |
784 | # CONFIG_CASSINI is not set | 934 | # CONFIG_CASSINI is not set |
785 | # CONFIG_NET_VENDOR_3COM is not set | 935 | # CONFIG_NET_VENDOR_3COM is not set |
936 | # CONFIG_SMC91X is not set | ||
786 | # CONFIG_DM9000 is not set | 937 | # CONFIG_DM9000 is not set |
938 | # CONFIG_ETHOC is not set | ||
939 | # CONFIG_SMSC911X is not set | ||
940 | # CONFIG_DNET is not set | ||
787 | # CONFIG_NET_TULIP is not set | 941 | # CONFIG_NET_TULIP is not set |
788 | # CONFIG_HP100 is not set | 942 | # CONFIG_HP100 is not set |
789 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | 943 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
790 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | 944 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
791 | # CONFIG_IBM_NEW_EMAC_TAH is not set | 945 | # CONFIG_IBM_NEW_EMAC_TAH is not set |
792 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | 946 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set |
947 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set | ||
948 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | ||
949 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | ||
793 | # CONFIG_NET_PCI is not set | 950 | # CONFIG_NET_PCI is not set |
794 | # CONFIG_B44 is not set | 951 | # CONFIG_B44 is not set |
952 | # CONFIG_KS8842 is not set | ||
953 | # CONFIG_KS8851_MLL is not set | ||
954 | # CONFIG_ATL2 is not set | ||
795 | CONFIG_NETDEV_1000=y | 955 | CONFIG_NETDEV_1000=y |
796 | # CONFIG_ACENIC is not set | 956 | # CONFIG_ACENIC is not set |
797 | # CONFIG_DL2K is not set | 957 | # CONFIG_DL2K is not set |
798 | # CONFIG_E1000 is not set | 958 | # CONFIG_E1000 is not set |
799 | # CONFIG_E1000E is not set | 959 | # CONFIG_E1000E is not set |
800 | # CONFIG_E1000E_ENABLED is not set | ||
801 | # CONFIG_IP1000 is not set | 960 | # CONFIG_IP1000 is not set |
802 | # CONFIG_IGB is not set | 961 | # CONFIG_IGB is not set |
962 | # CONFIG_IGBVF is not set | ||
803 | # CONFIG_NS83820 is not set | 963 | # CONFIG_NS83820 is not set |
804 | # CONFIG_HAMACHI is not set | 964 | # CONFIG_HAMACHI is not set |
805 | # CONFIG_YELLOWFIN is not set | 965 | # CONFIG_YELLOWFIN is not set |
@@ -811,29 +971,42 @@ CONFIG_SB1250_MAC=y | |||
811 | # CONFIG_VIA_VELOCITY is not set | 971 | # CONFIG_VIA_VELOCITY is not set |
812 | # CONFIG_TIGON3 is not set | 972 | # CONFIG_TIGON3 is not set |
813 | # CONFIG_BNX2 is not set | 973 | # CONFIG_BNX2 is not set |
974 | # CONFIG_CNIC is not set | ||
814 | # CONFIG_QLA3XXX is not set | 975 | # CONFIG_QLA3XXX is not set |
815 | # CONFIG_ATL1 is not set | 976 | # CONFIG_ATL1 is not set |
977 | # CONFIG_ATL1E is not set | ||
978 | # CONFIG_ATL1C is not set | ||
979 | # CONFIG_JME is not set | ||
816 | CONFIG_NETDEV_10000=y | 980 | CONFIG_NETDEV_10000=y |
981 | CONFIG_MDIO=m | ||
817 | # CONFIG_CHELSIO_T1 is not set | 982 | # CONFIG_CHELSIO_T1 is not set |
983 | CONFIG_CHELSIO_T3_DEPENDS=y | ||
818 | CONFIG_CHELSIO_T3=m | 984 | CONFIG_CHELSIO_T3=m |
985 | # CONFIG_ENIC is not set | ||
819 | # CONFIG_IXGBE is not set | 986 | # CONFIG_IXGBE is not set |
820 | # CONFIG_IXGB is not set | 987 | # CONFIG_IXGB is not set |
821 | # CONFIG_S2IO is not set | 988 | # CONFIG_S2IO is not set |
989 | # CONFIG_VXGE is not set | ||
822 | # CONFIG_MYRI10GE is not set | 990 | # CONFIG_MYRI10GE is not set |
823 | CONFIG_NETXEN_NIC=m | 991 | CONFIG_NETXEN_NIC=m |
824 | # CONFIG_NIU is not set | 992 | # CONFIG_NIU is not set |
993 | # CONFIG_MLX4_EN is not set | ||
825 | # CONFIG_MLX4_CORE is not set | 994 | # CONFIG_MLX4_CORE is not set |
826 | # CONFIG_TEHUTI is not set | 995 | # CONFIG_TEHUTI is not set |
827 | # CONFIG_BNX2X is not set | 996 | # CONFIG_BNX2X is not set |
997 | # CONFIG_QLCNIC is not set | ||
998 | # CONFIG_QLGE is not set | ||
828 | # CONFIG_SFC is not set | 999 | # CONFIG_SFC is not set |
1000 | # CONFIG_BE2NET is not set | ||
829 | # CONFIG_TR is not set | 1001 | # CONFIG_TR is not set |
1002 | CONFIG_WLAN=y | ||
1003 | # CONFIG_ATMEL is not set | ||
1004 | # CONFIG_PRISM54 is not set | ||
1005 | # CONFIG_HOSTAP is not set | ||
830 | 1006 | ||
831 | # | 1007 | # |
832 | # Wireless LAN | 1008 | # Enable WiMAX (Networking options) to see the WiMAX drivers |
833 | # | 1009 | # |
834 | # CONFIG_WLAN_PRE80211 is not set | ||
835 | # CONFIG_WLAN_80211 is not set | ||
836 | # CONFIG_IWLWIFI_LEDS is not set | ||
837 | # CONFIG_WAN is not set | 1010 | # CONFIG_WAN is not set |
838 | # CONFIG_FDDI is not set | 1011 | # CONFIG_FDDI is not set |
839 | # CONFIG_HIPPI is not set | 1012 | # CONFIG_HIPPI is not set |
@@ -856,6 +1029,7 @@ CONFIG_SLIP_MODE_SLIP6=y | |||
856 | # CONFIG_NETCONSOLE is not set | 1029 | # CONFIG_NETCONSOLE is not set |
857 | # CONFIG_NETPOLL is not set | 1030 | # CONFIG_NETPOLL is not set |
858 | # CONFIG_NET_POLL_CONTROLLER is not set | 1031 | # CONFIG_NET_POLL_CONTROLLER is not set |
1032 | # CONFIG_VMXNET3 is not set | ||
859 | # CONFIG_ISDN is not set | 1033 | # CONFIG_ISDN is not set |
860 | # CONFIG_PHONE is not set | 1034 | # CONFIG_PHONE is not set |
861 | 1035 | ||
@@ -873,6 +1047,7 @@ CONFIG_SERIO_SERPORT=y | |||
873 | # CONFIG_SERIO_PCIPS2 is not set | 1047 | # CONFIG_SERIO_PCIPS2 is not set |
874 | # CONFIG_SERIO_LIBPS2 is not set | 1048 | # CONFIG_SERIO_LIBPS2 is not set |
875 | CONFIG_SERIO_RAW=m | 1049 | CONFIG_SERIO_RAW=m |
1050 | # CONFIG_SERIO_ALTERA_PS2 is not set | ||
876 | # CONFIG_GAMEPORT is not set | 1051 | # CONFIG_GAMEPORT is not set |
877 | 1052 | ||
878 | # | 1053 | # |
@@ -893,8 +1068,6 @@ CONFIG_SERIAL_NONSTANDARD=y | |||
893 | # CONFIG_N_HDLC is not set | 1068 | # CONFIG_N_HDLC is not set |
894 | # CONFIG_RISCOM8 is not set | 1069 | # CONFIG_RISCOM8 is not set |
895 | # CONFIG_SPECIALIX is not set | 1070 | # CONFIG_SPECIALIX is not set |
896 | # CONFIG_SX is not set | ||
897 | # CONFIG_RIO is not set | ||
898 | # CONFIG_STALDRV is not set | 1071 | # CONFIG_STALDRV is not set |
899 | # CONFIG_NOZOMI is not set | 1072 | # CONFIG_NOZOMI is not set |
900 | 1073 | ||
@@ -911,7 +1084,9 @@ CONFIG_SERIAL_SB1250_DUART_CONSOLE=y | |||
911 | CONFIG_SERIAL_CORE=y | 1084 | CONFIG_SERIAL_CORE=y |
912 | CONFIG_SERIAL_CORE_CONSOLE=y | 1085 | CONFIG_SERIAL_CORE_CONSOLE=y |
913 | # CONFIG_SERIAL_JSM is not set | 1086 | # CONFIG_SERIAL_JSM is not set |
1087 | # CONFIG_SERIAL_TIMBERDALE is not set | ||
914 | CONFIG_UNIX98_PTYS=y | 1088 | CONFIG_UNIX98_PTYS=y |
1089 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
915 | CONFIG_LEGACY_PTYS=y | 1090 | CONFIG_LEGACY_PTYS=y |
916 | CONFIG_LEGACY_PTY_COUNT=256 | 1091 | CONFIG_LEGACY_PTY_COUNT=256 |
917 | # CONFIG_IPMI_HANDLER is not set | 1092 | # CONFIG_IPMI_HANDLER is not set |
@@ -923,89 +1098,99 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
923 | CONFIG_DEVPORT=y | 1098 | CONFIG_DEVPORT=y |
924 | CONFIG_I2C=y | 1099 | CONFIG_I2C=y |
925 | CONFIG_I2C_BOARDINFO=y | 1100 | CONFIG_I2C_BOARDINFO=y |
1101 | CONFIG_I2C_COMPAT=y | ||
926 | CONFIG_I2C_CHARDEV=y | 1102 | CONFIG_I2C_CHARDEV=y |
1103 | CONFIG_I2C_HELPER_AUTO=y | ||
927 | 1104 | ||
928 | # | 1105 | # |
929 | # I2C Hardware Bus support | 1106 | # I2C Hardware Bus support |
930 | # | 1107 | # |
1108 | |||
1109 | # | ||
1110 | # PC SMBus host controller drivers | ||
1111 | # | ||
931 | # CONFIG_I2C_ALI1535 is not set | 1112 | # CONFIG_I2C_ALI1535 is not set |
932 | # CONFIG_I2C_ALI1563 is not set | 1113 | # CONFIG_I2C_ALI1563 is not set |
933 | # CONFIG_I2C_ALI15X3 is not set | 1114 | # CONFIG_I2C_ALI15X3 is not set |
934 | # CONFIG_I2C_AMD756 is not set | 1115 | # CONFIG_I2C_AMD756 is not set |
935 | # CONFIG_I2C_AMD8111 is not set | 1116 | # CONFIG_I2C_AMD8111 is not set |
936 | # CONFIG_I2C_I801 is not set | 1117 | # CONFIG_I2C_I801 is not set |
937 | # CONFIG_I2C_I810 is not set | 1118 | # CONFIG_I2C_ISCH is not set |
938 | # CONFIG_I2C_PIIX4 is not set | 1119 | # CONFIG_I2C_PIIX4 is not set |
939 | # CONFIG_I2C_NFORCE2 is not set | 1120 | # CONFIG_I2C_NFORCE2 is not set |
940 | # CONFIG_I2C_OCORES is not set | ||
941 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
942 | # CONFIG_I2C_PROSAVAGE is not set | ||
943 | # CONFIG_I2C_SAVAGE4 is not set | ||
944 | CONFIG_I2C_SIBYTE=y | ||
945 | # CONFIG_I2C_SIMTEC is not set | ||
946 | # CONFIG_I2C_SIS5595 is not set | 1121 | # CONFIG_I2C_SIS5595 is not set |
947 | # CONFIG_I2C_SIS630 is not set | 1122 | # CONFIG_I2C_SIS630 is not set |
948 | # CONFIG_I2C_SIS96X is not set | 1123 | # CONFIG_I2C_SIS96X is not set |
949 | # CONFIG_I2C_TAOS_EVM is not set | ||
950 | # CONFIG_I2C_STUB is not set | ||
951 | # CONFIG_I2C_VIA is not set | 1124 | # CONFIG_I2C_VIA is not set |
952 | # CONFIG_I2C_VIAPRO is not set | 1125 | # CONFIG_I2C_VIAPRO is not set |
953 | # CONFIG_I2C_VOODOO3 is not set | ||
954 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
955 | 1126 | ||
956 | # | 1127 | # |
957 | # Miscellaneous I2C Chip support | 1128 | # I2C system bus drivers (mostly embedded / system-on-chip) |
958 | # | 1129 | # |
959 | # CONFIG_DS1682 is not set | 1130 | # CONFIG_I2C_OCORES is not set |
960 | CONFIG_EEPROM_LEGACY=y | 1131 | # CONFIG_I2C_SIMTEC is not set |
961 | CONFIG_SENSORS_PCF8574=y | 1132 | # CONFIG_I2C_XILINX is not set |
962 | # CONFIG_PCF8575 is not set | 1133 | |
963 | CONFIG_SENSORS_PCF8591=y | 1134 | # |
964 | CONFIG_EEPROM_MAX6875=y | 1135 | # External I2C/SMBus adapter drivers |
965 | # CONFIG_SENSORS_TSL2550 is not set | 1136 | # |
1137 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
1138 | # CONFIG_I2C_TAOS_EVM is not set | ||
1139 | |||
1140 | # | ||
1141 | # Other I2C/SMBus bus drivers | ||
1142 | # | ||
1143 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
1144 | CONFIG_I2C_SIBYTE=y | ||
1145 | # CONFIG_I2C_STUB is not set | ||
966 | CONFIG_I2C_DEBUG_CORE=y | 1146 | CONFIG_I2C_DEBUG_CORE=y |
967 | CONFIG_I2C_DEBUG_ALGO=y | 1147 | CONFIG_I2C_DEBUG_ALGO=y |
968 | CONFIG_I2C_DEBUG_BUS=y | 1148 | CONFIG_I2C_DEBUG_BUS=y |
969 | CONFIG_I2C_DEBUG_CHIP=y | ||
970 | # CONFIG_SPI is not set | 1149 | # CONFIG_SPI is not set |
1150 | |||
1151 | # | ||
1152 | # PPS support | ||
1153 | # | ||
1154 | # CONFIG_PPS is not set | ||
971 | # CONFIG_W1 is not set | 1155 | # CONFIG_W1 is not set |
972 | # CONFIG_POWER_SUPPLY is not set | 1156 | # CONFIG_POWER_SUPPLY is not set |
973 | # CONFIG_HWMON is not set | 1157 | # CONFIG_HWMON is not set |
974 | # CONFIG_THERMAL is not set | 1158 | # CONFIG_THERMAL is not set |
975 | # CONFIG_THERMAL_HWMON is not set | ||
976 | # CONFIG_WATCHDOG is not set | 1159 | # CONFIG_WATCHDOG is not set |
1160 | CONFIG_SSB_POSSIBLE=y | ||
977 | 1161 | ||
978 | # | 1162 | # |
979 | # Sonics Silicon Backplane | 1163 | # Sonics Silicon Backplane |
980 | # | 1164 | # |
981 | CONFIG_SSB_POSSIBLE=y | ||
982 | # CONFIG_SSB is not set | 1165 | # CONFIG_SSB is not set |
983 | 1166 | ||
984 | # | 1167 | # |
985 | # Multifunction device drivers | 1168 | # Multifunction device drivers |
986 | # | 1169 | # |
1170 | # CONFIG_MFD_CORE is not set | ||
1171 | # CONFIG_MFD_88PM860X is not set | ||
987 | # CONFIG_MFD_SM501 is not set | 1172 | # CONFIG_MFD_SM501 is not set |
988 | # CONFIG_HTC_PASIC3 is not set | 1173 | # CONFIG_HTC_PASIC3 is not set |
989 | 1174 | # CONFIG_TWL4030_CORE is not set | |
990 | # | 1175 | # CONFIG_MFD_TMIO is not set |
991 | # Multimedia devices | 1176 | # CONFIG_PMIC_DA903X is not set |
992 | # | 1177 | # CONFIG_PMIC_ADP5520 is not set |
993 | 1178 | # CONFIG_MFD_MAX8925 is not set | |
994 | # | 1179 | # CONFIG_MFD_WM8400 is not set |
995 | # Multimedia core support | 1180 | # CONFIG_MFD_WM831X is not set |
996 | # | 1181 | # CONFIG_MFD_WM8350_I2C is not set |
997 | # CONFIG_VIDEO_DEV is not set | 1182 | # CONFIG_MFD_WM8994 is not set |
998 | # CONFIG_DVB_CORE is not set | 1183 | # CONFIG_MFD_PCF50633 is not set |
999 | # CONFIG_VIDEO_MEDIA is not set | 1184 | # CONFIG_AB3100_CORE is not set |
1000 | 1185 | # CONFIG_LPC_SCH is not set | |
1001 | # | 1186 | # CONFIG_REGULATOR is not set |
1002 | # Multimedia drivers | 1187 | # CONFIG_MEDIA_SUPPORT is not set |
1003 | # | ||
1004 | # CONFIG_DAB is not set | ||
1005 | 1188 | ||
1006 | # | 1189 | # |
1007 | # Graphics support | 1190 | # Graphics support |
1008 | # | 1191 | # |
1192 | CONFIG_VGA_ARB=y | ||
1193 | CONFIG_VGA_ARB_MAX_GPUS=16 | ||
1009 | # CONFIG_DRM is not set | 1194 | # CONFIG_DRM is not set |
1010 | # CONFIG_VGASTATE is not set | 1195 | # CONFIG_VGASTATE is not set |
1011 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | 1196 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set |
@@ -1016,10 +1201,6 @@ CONFIG_SSB_POSSIBLE=y | |||
1016 | # Display device support | 1201 | # Display device support |
1017 | # | 1202 | # |
1018 | # CONFIG_DISPLAY_SUPPORT is not set | 1203 | # CONFIG_DISPLAY_SUPPORT is not set |
1019 | |||
1020 | # | ||
1021 | # Sound | ||
1022 | # | ||
1023 | # CONFIG_SOUND is not set | 1204 | # CONFIG_SOUND is not set |
1024 | CONFIG_USB_SUPPORT=y | 1205 | CONFIG_USB_SUPPORT=y |
1025 | CONFIG_USB_ARCH_HAS_HCD=y | 1206 | CONFIG_USB_ARCH_HAS_HCD=y |
@@ -1030,9 +1211,18 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
1030 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | 1211 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set |
1031 | 1212 | ||
1032 | # | 1213 | # |
1033 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 1214 | # Enable Host or Gadget support to see Inventra options |
1215 | # | ||
1216 | |||
1217 | # | ||
1218 | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may | ||
1034 | # | 1219 | # |
1035 | # CONFIG_USB_GADGET is not set | 1220 | # CONFIG_USB_GADGET is not set |
1221 | |||
1222 | # | ||
1223 | # OTG and related infrastructure | ||
1224 | # | ||
1225 | # CONFIG_UWB is not set | ||
1036 | # CONFIG_MMC is not set | 1226 | # CONFIG_MMC is not set |
1037 | # CONFIG_MEMSTICK is not set | 1227 | # CONFIG_MEMSTICK is not set |
1038 | # CONFIG_NEW_LEDS is not set | 1228 | # CONFIG_NEW_LEDS is not set |
@@ -1040,41 +1230,66 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
1040 | # CONFIG_INFINIBAND is not set | 1230 | # CONFIG_INFINIBAND is not set |
1041 | CONFIG_RTC_LIB=y | 1231 | CONFIG_RTC_LIB=y |
1042 | # CONFIG_RTC_CLASS is not set | 1232 | # CONFIG_RTC_CLASS is not set |
1233 | # CONFIG_DMADEVICES is not set | ||
1234 | # CONFIG_AUXDISPLAY is not set | ||
1043 | # CONFIG_UIO is not set | 1235 | # CONFIG_UIO is not set |
1044 | 1236 | ||
1045 | # | 1237 | # |
1238 | # TI VLYNQ | ||
1239 | # | ||
1240 | # CONFIG_STAGING is not set | ||
1241 | |||
1242 | # | ||
1046 | # File systems | 1243 | # File systems |
1047 | # | 1244 | # |
1048 | CONFIG_EXT2_FS=m | 1245 | CONFIG_EXT2_FS=m |
1049 | CONFIG_EXT2_FS_XATTR=y | 1246 | CONFIG_EXT2_FS_XATTR=y |
1050 | # CONFIG_EXT2_FS_POSIX_ACL is not set | 1247 | CONFIG_EXT2_FS_POSIX_ACL=y |
1051 | # CONFIG_EXT2_FS_SECURITY is not set | 1248 | CONFIG_EXT2_FS_SECURITY=y |
1052 | # CONFIG_EXT2_FS_XIP is not set | 1249 | CONFIG_EXT2_FS_XIP=y |
1053 | CONFIG_EXT3_FS=y | 1250 | CONFIG_EXT3_FS=m |
1251 | CONFIG_EXT3_DEFAULTS_TO_ORDERED=y | ||
1054 | CONFIG_EXT3_FS_XATTR=y | 1252 | CONFIG_EXT3_FS_XATTR=y |
1055 | # CONFIG_EXT3_FS_POSIX_ACL is not set | 1253 | CONFIG_EXT3_FS_POSIX_ACL=y |
1056 | # CONFIG_EXT3_FS_SECURITY is not set | 1254 | CONFIG_EXT3_FS_SECURITY=y |
1057 | # CONFIG_EXT4DEV_FS is not set | 1255 | CONFIG_EXT4_FS=y |
1058 | CONFIG_JBD=y | 1256 | CONFIG_EXT4_FS_XATTR=y |
1257 | CONFIG_EXT4_FS_POSIX_ACL=y | ||
1258 | CONFIG_EXT4_FS_SECURITY=y | ||
1259 | # CONFIG_EXT4_DEBUG is not set | ||
1260 | CONFIG_FS_XIP=y | ||
1261 | CONFIG_JBD=m | ||
1262 | CONFIG_JBD2=y | ||
1059 | CONFIG_FS_MBCACHE=y | 1263 | CONFIG_FS_MBCACHE=y |
1060 | # CONFIG_REISERFS_FS is not set | 1264 | # CONFIG_REISERFS_FS is not set |
1061 | # CONFIG_JFS_FS is not set | 1265 | # CONFIG_JFS_FS is not set |
1062 | # CONFIG_FS_POSIX_ACL is not set | 1266 | CONFIG_FS_POSIX_ACL=y |
1063 | # CONFIG_XFS_FS is not set | 1267 | # CONFIG_XFS_FS is not set |
1064 | # CONFIG_GFS2_FS is not set | 1268 | # CONFIG_GFS2_FS is not set |
1065 | # CONFIG_OCFS2_FS is not set | 1269 | # CONFIG_OCFS2_FS is not set |
1270 | # CONFIG_BTRFS_FS is not set | ||
1271 | # CONFIG_NILFS2_FS is not set | ||
1272 | CONFIG_FILE_LOCKING=y | ||
1273 | CONFIG_FSNOTIFY=y | ||
1066 | CONFIG_DNOTIFY=y | 1274 | CONFIG_DNOTIFY=y |
1067 | CONFIG_INOTIFY=y | 1275 | CONFIG_INOTIFY=y |
1068 | CONFIG_INOTIFY_USER=y | 1276 | CONFIG_INOTIFY_USER=y |
1069 | CONFIG_QUOTA=y | 1277 | CONFIG_QUOTA=y |
1070 | CONFIG_QUOTA_NETLINK_INTERFACE=y | 1278 | CONFIG_QUOTA_NETLINK_INTERFACE=y |
1071 | # CONFIG_PRINT_QUOTA_WARNING is not set | 1279 | # CONFIG_PRINT_QUOTA_WARNING is not set |
1280 | CONFIG_QUOTA_TREE=m | ||
1072 | # CONFIG_QFMT_V1 is not set | 1281 | # CONFIG_QFMT_V1 is not set |
1073 | CONFIG_QFMT_V2=m | 1282 | CONFIG_QFMT_V2=m |
1074 | CONFIG_QUOTACTL=y | 1283 | CONFIG_QUOTACTL=y |
1075 | CONFIG_AUTOFS_FS=m | 1284 | CONFIG_AUTOFS_FS=m |
1076 | CONFIG_AUTOFS4_FS=m | 1285 | CONFIG_AUTOFS4_FS=m |
1077 | CONFIG_FUSE_FS=m | 1286 | CONFIG_FUSE_FS=m |
1287 | # CONFIG_CUSE is not set | ||
1288 | |||
1289 | # | ||
1290 | # Caches | ||
1291 | # | ||
1292 | # CONFIG_FSCACHE is not set | ||
1078 | 1293 | ||
1079 | # | 1294 | # |
1080 | # CD-ROM/DVD Filesystems | 1295 | # CD-ROM/DVD Filesystems |
@@ -1103,15 +1318,13 @@ CONFIG_NTFS_RW=y | |||
1103 | CONFIG_PROC_FS=y | 1318 | CONFIG_PROC_FS=y |
1104 | CONFIG_PROC_KCORE=y | 1319 | CONFIG_PROC_KCORE=y |
1105 | CONFIG_PROC_SYSCTL=y | 1320 | CONFIG_PROC_SYSCTL=y |
1321 | CONFIG_PROC_PAGE_MONITOR=y | ||
1106 | CONFIG_SYSFS=y | 1322 | CONFIG_SYSFS=y |
1107 | CONFIG_TMPFS=y | 1323 | CONFIG_TMPFS=y |
1108 | # CONFIG_TMPFS_POSIX_ACL is not set | 1324 | # CONFIG_TMPFS_POSIX_ACL is not set |
1109 | # CONFIG_HUGETLB_PAGE is not set | 1325 | # CONFIG_HUGETLB_PAGE is not set |
1110 | CONFIG_CONFIGFS_FS=m | 1326 | CONFIG_CONFIGFS_FS=m |
1111 | 1327 | CONFIG_MISC_FILESYSTEMS=y | |
1112 | # | ||
1113 | # Miscellaneous filesystems | ||
1114 | # | ||
1115 | # CONFIG_ADFS_FS is not set | 1328 | # CONFIG_ADFS_FS is not set |
1116 | # CONFIG_AFFS_FS is not set | 1329 | # CONFIG_AFFS_FS is not set |
1117 | # CONFIG_ECRYPT_FS is not set | 1330 | # CONFIG_ECRYPT_FS is not set |
@@ -1120,9 +1333,12 @@ CONFIG_CONFIGFS_FS=m | |||
1120 | # CONFIG_BEFS_FS is not set | 1333 | # CONFIG_BEFS_FS is not set |
1121 | # CONFIG_BFS_FS is not set | 1334 | # CONFIG_BFS_FS is not set |
1122 | # CONFIG_EFS_FS is not set | 1335 | # CONFIG_EFS_FS is not set |
1336 | # CONFIG_LOGFS is not set | ||
1123 | # CONFIG_CRAMFS is not set | 1337 | # CONFIG_CRAMFS is not set |
1338 | # CONFIG_SQUASHFS is not set | ||
1124 | # CONFIG_VXFS_FS is not set | 1339 | # CONFIG_VXFS_FS is not set |
1125 | # CONFIG_MINIX_FS is not set | 1340 | # CONFIG_MINIX_FS is not set |
1341 | # CONFIG_OMFS_FS is not set | ||
1126 | # CONFIG_HPFS_FS is not set | 1342 | # CONFIG_HPFS_FS is not set |
1127 | # CONFIG_QNX4FS_FS is not set | 1343 | # CONFIG_QNX4FS_FS is not set |
1128 | # CONFIG_ROMFS_FS is not set | 1344 | # CONFIG_ROMFS_FS is not set |
@@ -1133,16 +1349,17 @@ CONFIG_NFS_FS=y | |||
1133 | CONFIG_NFS_V3=y | 1349 | CONFIG_NFS_V3=y |
1134 | # CONFIG_NFS_V3_ACL is not set | 1350 | # CONFIG_NFS_V3_ACL is not set |
1135 | # CONFIG_NFS_V4 is not set | 1351 | # CONFIG_NFS_V4 is not set |
1136 | # CONFIG_NFSD is not set | ||
1137 | CONFIG_ROOT_NFS=y | 1352 | CONFIG_ROOT_NFS=y |
1353 | # CONFIG_NFSD is not set | ||
1138 | CONFIG_LOCKD=y | 1354 | CONFIG_LOCKD=y |
1139 | CONFIG_LOCKD_V4=y | 1355 | CONFIG_LOCKD_V4=y |
1140 | CONFIG_NFS_COMMON=y | 1356 | CONFIG_NFS_COMMON=y |
1141 | CONFIG_SUNRPC=y | 1357 | CONFIG_SUNRPC=y |
1142 | # CONFIG_SUNRPC_BIND34 is not set | 1358 | CONFIG_SUNRPC_GSS=m |
1143 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 1359 | CONFIG_RPCSEC_GSS_KRB5=m |
1144 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 1360 | CONFIG_RPCSEC_GSS_SPKM3=m |
1145 | # CONFIG_SMB_FS is not set | 1361 | # CONFIG_SMB_FS is not set |
1362 | # CONFIG_CEPH_FS is not set | ||
1146 | # CONFIG_CIFS is not set | 1363 | # CONFIG_CIFS is not set |
1147 | # CONFIG_NCP_FS is not set | 1364 | # CONFIG_NCP_FS is not set |
1148 | # CONFIG_CODA_FS is not set | 1365 | # CONFIG_CODA_FS is not set |
@@ -1205,12 +1422,18 @@ CONFIG_ENABLE_WARN_DEPRECATED=y | |||
1205 | CONFIG_ENABLE_MUST_CHECK=y | 1422 | CONFIG_ENABLE_MUST_CHECK=y |
1206 | CONFIG_FRAME_WARN=2048 | 1423 | CONFIG_FRAME_WARN=2048 |
1207 | CONFIG_MAGIC_SYSRQ=y | 1424 | CONFIG_MAGIC_SYSRQ=y |
1425 | # CONFIG_STRIP_ASM_SYMS is not set | ||
1208 | # CONFIG_UNUSED_SYMBOLS is not set | 1426 | # CONFIG_UNUSED_SYMBOLS is not set |
1209 | # CONFIG_DEBUG_FS is not set | 1427 | # CONFIG_DEBUG_FS is not set |
1210 | # CONFIG_HEADERS_CHECK is not set | 1428 | # CONFIG_HEADERS_CHECK is not set |
1211 | CONFIG_DEBUG_KERNEL=y | 1429 | CONFIG_DEBUG_KERNEL=y |
1212 | # CONFIG_DEBUG_SHIRQ is not set | 1430 | # CONFIG_DEBUG_SHIRQ is not set |
1213 | CONFIG_DETECT_SOFTLOCKUP=y | 1431 | CONFIG_DETECT_SOFTLOCKUP=y |
1432 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | ||
1433 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 | ||
1434 | CONFIG_DETECT_HUNG_TASK=y | ||
1435 | # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set | ||
1436 | CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 | ||
1214 | CONFIG_SCHED_DEBUG=y | 1437 | CONFIG_SCHED_DEBUG=y |
1215 | # CONFIG_SCHEDSTATS is not set | 1438 | # CONFIG_SCHEDSTATS is not set |
1216 | # CONFIG_TIMER_STATS is not set | 1439 | # CONFIG_TIMER_STATS is not set |
@@ -1219,23 +1442,53 @@ CONFIG_SCHED_DEBUG=y | |||
1219 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1442 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1220 | # CONFIG_RT_MUTEX_TESTER is not set | 1443 | # CONFIG_RT_MUTEX_TESTER is not set |
1221 | # CONFIG_DEBUG_SPINLOCK is not set | 1444 | # CONFIG_DEBUG_SPINLOCK is not set |
1222 | CONFIG_DEBUG_MUTEXES=y | 1445 | # CONFIG_DEBUG_MUTEXES is not set |
1223 | # CONFIG_DEBUG_LOCK_ALLOC is not set | 1446 | # CONFIG_DEBUG_LOCK_ALLOC is not set |
1224 | # CONFIG_PROVE_LOCKING is not set | 1447 | # CONFIG_PROVE_LOCKING is not set |
1225 | # CONFIG_LOCK_STAT is not set | 1448 | # CONFIG_LOCK_STAT is not set |
1226 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1449 | CONFIG_DEBUG_SPINLOCK_SLEEP=y |
1227 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1450 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
1228 | # CONFIG_DEBUG_KOBJECT is not set | 1451 | # CONFIG_DEBUG_KOBJECT is not set |
1229 | # CONFIG_DEBUG_INFO is not set | 1452 | # CONFIG_DEBUG_INFO is not set |
1230 | # CONFIG_DEBUG_VM is not set | 1453 | # CONFIG_DEBUG_VM is not set |
1231 | # CONFIG_DEBUG_WRITECOUNT is not set | 1454 | # CONFIG_DEBUG_WRITECOUNT is not set |
1232 | # CONFIG_DEBUG_LIST is not set | 1455 | CONFIG_DEBUG_MEMORY_INIT=y |
1456 | CONFIG_DEBUG_LIST=y | ||
1233 | # CONFIG_DEBUG_SG is not set | 1457 | # CONFIG_DEBUG_SG is not set |
1458 | # CONFIG_DEBUG_NOTIFIERS is not set | ||
1459 | # CONFIG_DEBUG_CREDENTIALS is not set | ||
1234 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1460 | # CONFIG_BOOT_PRINTK_DELAY is not set |
1235 | # CONFIG_RCU_TORTURE_TEST is not set | 1461 | # CONFIG_RCU_TORTURE_TEST is not set |
1462 | CONFIG_RCU_CPU_STALL_DETECTOR=y | ||
1236 | # CONFIG_BACKTRACE_SELF_TEST is not set | 1463 | # CONFIG_BACKTRACE_SELF_TEST is not set |
1464 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | ||
1465 | # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set | ||
1237 | # CONFIG_FAULT_INJECTION is not set | 1466 | # CONFIG_FAULT_INJECTION is not set |
1467 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set | ||
1468 | # CONFIG_PAGE_POISONING is not set | ||
1469 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
1470 | CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y | ||
1471 | CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y | ||
1472 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
1473 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | ||
1474 | CONFIG_TRACING_SUPPORT=y | ||
1475 | CONFIG_FTRACE=y | ||
1476 | # CONFIG_FUNCTION_TRACER is not set | ||
1477 | # CONFIG_IRQSOFF_TRACER is not set | ||
1478 | # CONFIG_SCHED_TRACER is not set | ||
1479 | # CONFIG_ENABLE_DEFAULT_TRACERS is not set | ||
1480 | # CONFIG_BOOT_TRACER is not set | ||
1481 | CONFIG_BRANCH_PROFILE_NONE=y | ||
1482 | # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set | ||
1483 | # CONFIG_PROFILE_ALL_BRANCHES is not set | ||
1484 | # CONFIG_STACK_TRACER is not set | ||
1485 | # CONFIG_KMEMTRACE is not set | ||
1486 | # CONFIG_WORKQUEUE_TRACER is not set | ||
1487 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
1238 | # CONFIG_SAMPLES is not set | 1488 | # CONFIG_SAMPLES is not set |
1489 | CONFIG_HAVE_ARCH_KGDB=y | ||
1490 | # CONFIG_KGDB is not set | ||
1491 | CONFIG_EARLY_PRINTK=y | ||
1239 | # CONFIG_CMDLINE_BOOL is not set | 1492 | # CONFIG_CMDLINE_BOOL is not set |
1240 | # CONFIG_DEBUG_STACK_USAGE is not set | 1493 | # CONFIG_DEBUG_STACK_USAGE is not set |
1241 | # CONFIG_SB1XXX_CORELIS is not set | 1494 | # CONFIG_SB1XXX_CORELIS is not set |
@@ -1246,20 +1499,50 @@ CONFIG_DEBUG_MUTEXES=y | |||
1246 | # | 1499 | # |
1247 | CONFIG_KEYS=y | 1500 | CONFIG_KEYS=y |
1248 | CONFIG_KEYS_DEBUG_PROC_KEYS=y | 1501 | CONFIG_KEYS_DEBUG_PROC_KEYS=y |
1249 | # CONFIG_SECURITY is not set | 1502 | CONFIG_SECURITY=y |
1250 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 1503 | # CONFIG_SECURITYFS is not set |
1504 | CONFIG_SECURITY_NETWORK=y | ||
1505 | CONFIG_SECURITY_NETWORK_XFRM=y | ||
1506 | # CONFIG_SECURITY_PATH is not set | ||
1507 | CONFIG_LSM_MMAP_MIN_ADDR=65536 | ||
1508 | CONFIG_SECURITY_SELINUX=y | ||
1509 | CONFIG_SECURITY_SELINUX_BOOTPARAM=y | ||
1510 | CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 | ||
1511 | CONFIG_SECURITY_SELINUX_DISABLE=y | ||
1512 | CONFIG_SECURITY_SELINUX_DEVELOP=y | ||
1513 | CONFIG_SECURITY_SELINUX_AVC_STATS=y | ||
1514 | CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 | ||
1515 | # CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set | ||
1516 | # CONFIG_SECURITY_SMACK is not set | ||
1517 | # CONFIG_SECURITY_TOMOYO is not set | ||
1518 | # CONFIG_DEFAULT_SECURITY_SELINUX is not set | ||
1519 | # CONFIG_DEFAULT_SECURITY_SMACK is not set | ||
1520 | # CONFIG_DEFAULT_SECURITY_TOMOYO is not set | ||
1521 | CONFIG_DEFAULT_SECURITY_DAC=y | ||
1522 | CONFIG_DEFAULT_SECURITY="" | ||
1251 | CONFIG_CRYPTO=y | 1523 | CONFIG_CRYPTO=y |
1252 | 1524 | ||
1253 | # | 1525 | # |
1254 | # Crypto core or helper | 1526 | # Crypto core or helper |
1255 | # | 1527 | # |
1528 | # CONFIG_CRYPTO_FIPS is not set | ||
1256 | CONFIG_CRYPTO_ALGAPI=y | 1529 | CONFIG_CRYPTO_ALGAPI=y |
1530 | CONFIG_CRYPTO_ALGAPI2=y | ||
1257 | CONFIG_CRYPTO_AEAD=m | 1531 | CONFIG_CRYPTO_AEAD=m |
1532 | CONFIG_CRYPTO_AEAD2=y | ||
1258 | CONFIG_CRYPTO_BLKCIPHER=y | 1533 | CONFIG_CRYPTO_BLKCIPHER=y |
1534 | CONFIG_CRYPTO_BLKCIPHER2=y | ||
1259 | CONFIG_CRYPTO_HASH=y | 1535 | CONFIG_CRYPTO_HASH=y |
1536 | CONFIG_CRYPTO_HASH2=y | ||
1537 | CONFIG_CRYPTO_RNG=m | ||
1538 | CONFIG_CRYPTO_RNG2=y | ||
1539 | CONFIG_CRYPTO_PCOMP=y | ||
1260 | CONFIG_CRYPTO_MANAGER=y | 1540 | CONFIG_CRYPTO_MANAGER=y |
1541 | CONFIG_CRYPTO_MANAGER2=y | ||
1261 | CONFIG_CRYPTO_GF128MUL=m | 1542 | CONFIG_CRYPTO_GF128MUL=m |
1262 | CONFIG_CRYPTO_NULL=y | 1543 | CONFIG_CRYPTO_NULL=y |
1544 | # CONFIG_CRYPTO_PCRYPT is not set | ||
1545 | CONFIG_CRYPTO_WORKQUEUE=y | ||
1263 | # CONFIG_CRYPTO_CRYPTD is not set | 1546 | # CONFIG_CRYPTO_CRYPTD is not set |
1264 | CONFIG_CRYPTO_AUTHENC=m | 1547 | CONFIG_CRYPTO_AUTHENC=m |
1265 | # CONFIG_CRYPTO_TEST is not set | 1548 | # CONFIG_CRYPTO_TEST is not set |
@@ -1276,7 +1559,7 @@ CONFIG_CRYPTO_SEQIV=m | |||
1276 | # | 1559 | # |
1277 | CONFIG_CRYPTO_CBC=m | 1560 | CONFIG_CRYPTO_CBC=m |
1278 | CONFIG_CRYPTO_CTR=m | 1561 | CONFIG_CRYPTO_CTR=m |
1279 | # CONFIG_CRYPTO_CTS is not set | 1562 | CONFIG_CRYPTO_CTS=m |
1280 | CONFIG_CRYPTO_ECB=m | 1563 | CONFIG_CRYPTO_ECB=m |
1281 | CONFIG_CRYPTO_LRW=m | 1564 | CONFIG_CRYPTO_LRW=m |
1282 | CONFIG_CRYPTO_PCBC=m | 1565 | CONFIG_CRYPTO_PCBC=m |
@@ -1287,14 +1570,20 @@ CONFIG_CRYPTO_XTS=m | |||
1287 | # | 1570 | # |
1288 | CONFIG_CRYPTO_HMAC=y | 1571 | CONFIG_CRYPTO_HMAC=y |
1289 | CONFIG_CRYPTO_XCBC=m | 1572 | CONFIG_CRYPTO_XCBC=m |
1573 | CONFIG_CRYPTO_VMAC=m | ||
1290 | 1574 | ||
1291 | # | 1575 | # |
1292 | # Digest | 1576 | # Digest |
1293 | # | 1577 | # |
1294 | # CONFIG_CRYPTO_CRC32C is not set | 1578 | CONFIG_CRYPTO_CRC32C=m |
1579 | CONFIG_CRYPTO_GHASH=m | ||
1295 | CONFIG_CRYPTO_MD4=m | 1580 | CONFIG_CRYPTO_MD4=m |
1296 | CONFIG_CRYPTO_MD5=y | 1581 | CONFIG_CRYPTO_MD5=y |
1297 | CONFIG_CRYPTO_MICHAEL_MIC=m | 1582 | CONFIG_CRYPTO_MICHAEL_MIC=m |
1583 | CONFIG_CRYPTO_RMD128=m | ||
1584 | CONFIG_CRYPTO_RMD160=m | ||
1585 | CONFIG_CRYPTO_RMD256=m | ||
1586 | CONFIG_CRYPTO_RMD320=m | ||
1298 | CONFIG_CRYPTO_SHA1=m | 1587 | CONFIG_CRYPTO_SHA1=m |
1299 | CONFIG_CRYPTO_SHA256=m | 1588 | CONFIG_CRYPTO_SHA256=m |
1300 | CONFIG_CRYPTO_SHA512=m | 1589 | CONFIG_CRYPTO_SHA512=m |
@@ -1325,25 +1614,36 @@ CONFIG_CRYPTO_TWOFISH_COMMON=m | |||
1325 | # Compression | 1614 | # Compression |
1326 | # | 1615 | # |
1327 | CONFIG_CRYPTO_DEFLATE=m | 1616 | CONFIG_CRYPTO_DEFLATE=m |
1328 | # CONFIG_CRYPTO_LZO is not set | 1617 | CONFIG_CRYPTO_ZLIB=m |
1618 | CONFIG_CRYPTO_LZO=m | ||
1619 | |||
1620 | # | ||
1621 | # Random Number Generation | ||
1622 | # | ||
1623 | CONFIG_CRYPTO_ANSI_CPRNG=m | ||
1329 | CONFIG_CRYPTO_HW=y | 1624 | CONFIG_CRYPTO_HW=y |
1330 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set | 1625 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set |
1626 | # CONFIG_BINARY_PRINTF is not set | ||
1331 | 1627 | ||
1332 | # | 1628 | # |
1333 | # Library routines | 1629 | # Library routines |
1334 | # | 1630 | # |
1335 | CONFIG_BITREVERSE=y | 1631 | CONFIG_BITREVERSE=y |
1336 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | 1632 | CONFIG_GENERIC_FIND_LAST_BIT=y |
1337 | CONFIG_CRC_CCITT=m | 1633 | CONFIG_CRC_CCITT=m |
1338 | # CONFIG_CRC16 is not set | 1634 | CONFIG_CRC16=y |
1635 | CONFIG_CRC_T10DIF=m | ||
1339 | CONFIG_CRC_ITU_T=m | 1636 | CONFIG_CRC_ITU_T=m |
1340 | CONFIG_CRC32=y | 1637 | CONFIG_CRC32=y |
1341 | # CONFIG_CRC7 is not set | 1638 | CONFIG_CRC7=m |
1342 | CONFIG_LIBCRC32C=m | 1639 | CONFIG_LIBCRC32C=m |
1343 | CONFIG_AUDIT_GENERIC=y | 1640 | CONFIG_AUDIT_GENERIC=y |
1344 | CONFIG_ZLIB_INFLATE=m | 1641 | CONFIG_ZLIB_INFLATE=y |
1345 | CONFIG_ZLIB_DEFLATE=m | 1642 | CONFIG_ZLIB_DEFLATE=m |
1346 | CONFIG_PLIST=y | 1643 | CONFIG_LZO_COMPRESS=m |
1644 | CONFIG_LZO_DECOMPRESS=m | ||
1645 | CONFIG_DECOMPRESS_GZIP=y | ||
1347 | CONFIG_HAS_IOMEM=y | 1646 | CONFIG_HAS_IOMEM=y |
1348 | CONFIG_HAS_IOPORT=y | 1647 | CONFIG_HAS_IOPORT=y |
1349 | CONFIG_HAS_DMA=y | 1648 | CONFIG_HAS_DMA=y |
1649 | CONFIG_NLATTR=y | ||
diff --git a/arch/mips/include/asm/abi.h b/arch/mips/include/asm/abi.h index 1dd74fbdc09b..9252d9b50e59 100644 --- a/arch/mips/include/asm/abi.h +++ b/arch/mips/include/asm/abi.h | |||
@@ -13,12 +13,14 @@ | |||
13 | #include <asm/siginfo.h> | 13 | #include <asm/siginfo.h> |
14 | 14 | ||
15 | struct mips_abi { | 15 | struct mips_abi { |
16 | int (* const setup_frame)(struct k_sigaction * ka, | 16 | int (* const setup_frame)(void *sig_return, struct k_sigaction *ka, |
17 | struct pt_regs *regs, int signr, | 17 | struct pt_regs *regs, int signr, |
18 | sigset_t *set); | 18 | sigset_t *set); |
19 | int (* const setup_rt_frame)(struct k_sigaction * ka, | 19 | const unsigned long signal_return_offset; |
20 | int (* const setup_rt_frame)(void *sig_return, struct k_sigaction *ka, | ||
20 | struct pt_regs *regs, int signr, | 21 | struct pt_regs *regs, int signr, |
21 | sigset_t *set, siginfo_t *info); | 22 | sigset_t *set, siginfo_t *info); |
23 | const unsigned long rt_signal_return_offset; | ||
22 | const unsigned long restart; | 24 | const unsigned long restart; |
23 | }; | 25 | }; |
24 | 26 | ||
diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h index e53d7bed5cda..ea77a42c5f8c 100644 --- a/arch/mips/include/asm/elf.h +++ b/arch/mips/include/asm/elf.h | |||
@@ -310,6 +310,7 @@ do { \ | |||
310 | 310 | ||
311 | #endif /* CONFIG_64BIT */ | 311 | #endif /* CONFIG_64BIT */ |
312 | 312 | ||
313 | struct pt_regs; | ||
313 | struct task_struct; | 314 | struct task_struct; |
314 | 315 | ||
315 | extern void elf_dump_regs(elf_greg_t *, struct pt_regs *regs); | 316 | extern void elf_dump_regs(elf_greg_t *, struct pt_regs *regs); |
@@ -367,4 +368,8 @@ extern const char *__elf_platform; | |||
367 | #define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2) | 368 | #define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2) |
368 | #endif | 369 | #endif |
369 | 370 | ||
371 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 | ||
372 | struct linux_binprm; | ||
373 | extern int arch_setup_additional_pages(struct linux_binprm *bprm, | ||
374 | int uses_interp); | ||
370 | #endif /* _ASM_ELF_H */ | 375 | #endif /* _ASM_ELF_H */ |
diff --git a/arch/mips/include/asm/fpu_emulator.h b/arch/mips/include/asm/fpu_emulator.h index aecada6f6117..3b4092705567 100644 --- a/arch/mips/include/asm/fpu_emulator.h +++ b/arch/mips/include/asm/fpu_emulator.h | |||
@@ -41,7 +41,11 @@ struct mips_fpu_emulator_stats { | |||
41 | DECLARE_PER_CPU(struct mips_fpu_emulator_stats, fpuemustats); | 41 | DECLARE_PER_CPU(struct mips_fpu_emulator_stats, fpuemustats); |
42 | 42 | ||
43 | #define MIPS_FPU_EMU_INC_STATS(M) \ | 43 | #define MIPS_FPU_EMU_INC_STATS(M) \ |
44 | cpu_local_wrap(__local_inc(&__get_cpu_var(fpuemustats).M)) | 44 | do { \ |
45 | preempt_disable(); \ | ||
46 | __local_inc(&__get_cpu_var(fpuemustats).M); \ | ||
47 | preempt_enable(); \ | ||
48 | } while (0) | ||
45 | 49 | ||
46 | #else | 50 | #else |
47 | #define MIPS_FPU_EMU_INC_STATS(M) do { } while (0) | 51 | #define MIPS_FPU_EMU_INC_STATS(M) do { } while (0) |
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h index b12c4aca2cc9..96a2391ad85b 100644 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | |||
@@ -85,6 +85,7 @@ enum bcm63xx_regs_set { | |||
85 | RSET_TIMER, | 85 | RSET_TIMER, |
86 | RSET_WDT, | 86 | RSET_WDT, |
87 | RSET_UART0, | 87 | RSET_UART0, |
88 | RSET_UART1, | ||
88 | RSET_GPIO, | 89 | RSET_GPIO, |
89 | RSET_SPI, | 90 | RSET_SPI, |
90 | RSET_UDC0, | 91 | RSET_UDC0, |
@@ -123,6 +124,7 @@ enum bcm63xx_regs_set { | |||
123 | #define BCM_6338_TIMER_BASE (0xfffe0200) | 124 | #define BCM_6338_TIMER_BASE (0xfffe0200) |
124 | #define BCM_6338_WDT_BASE (0xfffe021c) | 125 | #define BCM_6338_WDT_BASE (0xfffe021c) |
125 | #define BCM_6338_UART0_BASE (0xfffe0300) | 126 | #define BCM_6338_UART0_BASE (0xfffe0300) |
127 | #define BCM_6338_UART1_BASE (0xdeadbeef) | ||
126 | #define BCM_6338_GPIO_BASE (0xfffe0400) | 128 | #define BCM_6338_GPIO_BASE (0xfffe0400) |
127 | #define BCM_6338_SPI_BASE (0xfffe0c00) | 129 | #define BCM_6338_SPI_BASE (0xfffe0c00) |
128 | #define BCM_6338_UDC0_BASE (0xdeadbeef) | 130 | #define BCM_6338_UDC0_BASE (0xdeadbeef) |
@@ -153,6 +155,7 @@ enum bcm63xx_regs_set { | |||
153 | #define BCM_6345_TIMER_BASE (0xfffe0200) | 155 | #define BCM_6345_TIMER_BASE (0xfffe0200) |
154 | #define BCM_6345_WDT_BASE (0xfffe021c) | 156 | #define BCM_6345_WDT_BASE (0xfffe021c) |
155 | #define BCM_6345_UART0_BASE (0xfffe0300) | 157 | #define BCM_6345_UART0_BASE (0xfffe0300) |
158 | #define BCM_6345_UART1_BASE (0xdeadbeef) | ||
156 | #define BCM_6345_GPIO_BASE (0xfffe0400) | 159 | #define BCM_6345_GPIO_BASE (0xfffe0400) |
157 | #define BCM_6345_SPI_BASE (0xdeadbeef) | 160 | #define BCM_6345_SPI_BASE (0xdeadbeef) |
158 | #define BCM_6345_UDC0_BASE (0xdeadbeef) | 161 | #define BCM_6345_UDC0_BASE (0xdeadbeef) |
@@ -182,6 +185,7 @@ enum bcm63xx_regs_set { | |||
182 | #define BCM_6348_TIMER_BASE (0xfffe0200) | 185 | #define BCM_6348_TIMER_BASE (0xfffe0200) |
183 | #define BCM_6348_WDT_BASE (0xfffe021c) | 186 | #define BCM_6348_WDT_BASE (0xfffe021c) |
184 | #define BCM_6348_UART0_BASE (0xfffe0300) | 187 | #define BCM_6348_UART0_BASE (0xfffe0300) |
188 | #define BCM_6348_UART1_BASE (0xdeadbeef) | ||
185 | #define BCM_6348_GPIO_BASE (0xfffe0400) | 189 | #define BCM_6348_GPIO_BASE (0xfffe0400) |
186 | #define BCM_6348_SPI_BASE (0xfffe0c00) | 190 | #define BCM_6348_SPI_BASE (0xfffe0c00) |
187 | #define BCM_6348_UDC0_BASE (0xfffe1000) | 191 | #define BCM_6348_UDC0_BASE (0xfffe1000) |
@@ -208,6 +212,7 @@ enum bcm63xx_regs_set { | |||
208 | #define BCM_6358_TIMER_BASE (0xfffe0040) | 212 | #define BCM_6358_TIMER_BASE (0xfffe0040) |
209 | #define BCM_6358_WDT_BASE (0xfffe005c) | 213 | #define BCM_6358_WDT_BASE (0xfffe005c) |
210 | #define BCM_6358_UART0_BASE (0xfffe0100) | 214 | #define BCM_6358_UART0_BASE (0xfffe0100) |
215 | #define BCM_6358_UART1_BASE (0xfffe0120) | ||
211 | #define BCM_6358_GPIO_BASE (0xfffe0080) | 216 | #define BCM_6358_GPIO_BASE (0xfffe0080) |
212 | #define BCM_6358_SPI_BASE (0xdeadbeef) | 217 | #define BCM_6358_SPI_BASE (0xdeadbeef) |
213 | #define BCM_6358_UDC0_BASE (0xfffe0800) | 218 | #define BCM_6358_UDC0_BASE (0xfffe0800) |
@@ -246,6 +251,8 @@ static inline unsigned long bcm63xx_regset_address(enum bcm63xx_regs_set set) | |||
246 | return BCM_6338_WDT_BASE; | 251 | return BCM_6338_WDT_BASE; |
247 | case RSET_UART0: | 252 | case RSET_UART0: |
248 | return BCM_6338_UART0_BASE; | 253 | return BCM_6338_UART0_BASE; |
254 | case RSET_UART1: | ||
255 | return BCM_6338_UART1_BASE; | ||
249 | case RSET_GPIO: | 256 | case RSET_GPIO: |
250 | return BCM_6338_GPIO_BASE; | 257 | return BCM_6338_GPIO_BASE; |
251 | case RSET_SPI: | 258 | case RSET_SPI: |
@@ -292,6 +299,8 @@ static inline unsigned long bcm63xx_regset_address(enum bcm63xx_regs_set set) | |||
292 | return BCM_6345_WDT_BASE; | 299 | return BCM_6345_WDT_BASE; |
293 | case RSET_UART0: | 300 | case RSET_UART0: |
294 | return BCM_6345_UART0_BASE; | 301 | return BCM_6345_UART0_BASE; |
302 | case RSET_UART1: | ||
303 | return BCM_6345_UART1_BASE; | ||
295 | case RSET_GPIO: | 304 | case RSET_GPIO: |
296 | return BCM_6345_GPIO_BASE; | 305 | return BCM_6345_GPIO_BASE; |
297 | case RSET_SPI: | 306 | case RSET_SPI: |
@@ -338,6 +347,8 @@ static inline unsigned long bcm63xx_regset_address(enum bcm63xx_regs_set set) | |||
338 | return BCM_6348_WDT_BASE; | 347 | return BCM_6348_WDT_BASE; |
339 | case RSET_UART0: | 348 | case RSET_UART0: |
340 | return BCM_6348_UART0_BASE; | 349 | return BCM_6348_UART0_BASE; |
350 | case RSET_UART1: | ||
351 | return BCM_6348_UART1_BASE; | ||
341 | case RSET_GPIO: | 352 | case RSET_GPIO: |
342 | return BCM_6348_GPIO_BASE; | 353 | return BCM_6348_GPIO_BASE; |
343 | case RSET_SPI: | 354 | case RSET_SPI: |
@@ -384,6 +395,8 @@ static inline unsigned long bcm63xx_regset_address(enum bcm63xx_regs_set set) | |||
384 | return BCM_6358_WDT_BASE; | 395 | return BCM_6358_WDT_BASE; |
385 | case RSET_UART0: | 396 | case RSET_UART0: |
386 | return BCM_6358_UART0_BASE; | 397 | return BCM_6358_UART0_BASE; |
398 | case RSET_UART1: | ||
399 | return BCM_6358_UART1_BASE; | ||
387 | case RSET_GPIO: | 400 | case RSET_GPIO: |
388 | return BCM_6358_GPIO_BASE; | 401 | return BCM_6358_GPIO_BASE; |
389 | case RSET_SPI: | 402 | case RSET_SPI: |
@@ -429,6 +442,7 @@ static inline unsigned long bcm63xx_regset_address(enum bcm63xx_regs_set set) | |||
429 | enum bcm63xx_irq { | 442 | enum bcm63xx_irq { |
430 | IRQ_TIMER = 0, | 443 | IRQ_TIMER = 0, |
431 | IRQ_UART0, | 444 | IRQ_UART0, |
445 | IRQ_UART1, | ||
432 | IRQ_DSL, | 446 | IRQ_DSL, |
433 | IRQ_ENET0, | 447 | IRQ_ENET0, |
434 | IRQ_ENET1, | 448 | IRQ_ENET1, |
@@ -510,6 +524,7 @@ enum bcm63xx_irq { | |||
510 | */ | 524 | */ |
511 | #define BCM_6358_TIMER_IRQ (IRQ_INTERNAL_BASE + 0) | 525 | #define BCM_6358_TIMER_IRQ (IRQ_INTERNAL_BASE + 0) |
512 | #define BCM_6358_UART0_IRQ (IRQ_INTERNAL_BASE + 2) | 526 | #define BCM_6358_UART0_IRQ (IRQ_INTERNAL_BASE + 2) |
527 | #define BCM_6358_UART1_IRQ (IRQ_INTERNAL_BASE + 3) | ||
513 | #define BCM_6358_OHCI0_IRQ (IRQ_INTERNAL_BASE + 5) | 528 | #define BCM_6358_OHCI0_IRQ (IRQ_INTERNAL_BASE + 5) |
514 | #define BCM_6358_ENET1_IRQ (IRQ_INTERNAL_BASE + 6) | 529 | #define BCM_6358_ENET1_IRQ (IRQ_INTERNAL_BASE + 6) |
515 | #define BCM_6358_ENET0_IRQ (IRQ_INTERNAL_BASE + 8) | 530 | #define BCM_6358_ENET0_IRQ (IRQ_INTERNAL_BASE + 8) |
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_uart.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_uart.h new file mode 100644 index 000000000000..23c705baf171 --- /dev/null +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_uart.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef BCM63XX_DEV_UART_H_ | ||
2 | #define BCM63XX_DEV_UART_H_ | ||
3 | |||
4 | int bcm63xx_uart_register(unsigned int id); | ||
5 | |||
6 | #endif /* BCM63XX_DEV_UART_H_ */ | ||
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h index 76a0b7216af5..43d4da0b1e9f 100644 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h | |||
@@ -10,6 +10,10 @@ static inline unsigned long bcm63xx_gpio_count(void) | |||
10 | switch (bcm63xx_get_cpu_id()) { | 10 | switch (bcm63xx_get_cpu_id()) { |
11 | case BCM6358_CPU_ID: | 11 | case BCM6358_CPU_ID: |
12 | return 40; | 12 | return 40; |
13 | case BCM6338_CPU_ID: | ||
14 | return 8; | ||
15 | case BCM6345_CPU_ID: | ||
16 | return 16; | ||
13 | case BCM6348_CPU_ID: | 17 | case BCM6348_CPU_ID: |
14 | default: | 18 | default: |
15 | return 37; | 19 | return 37; |
diff --git a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h index 6479090a4106..474daaa53497 100644 --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | |||
@@ -45,6 +45,8 @@ struct board_info { | |||
45 | unsigned int has_ohci0:1; | 45 | unsigned int has_ohci0:1; |
46 | unsigned int has_ehci0:1; | 46 | unsigned int has_ehci0:1; |
47 | unsigned int has_dsp:1; | 47 | unsigned int has_dsp:1; |
48 | unsigned int has_uart0:1; | ||
49 | unsigned int has_uart1:1; | ||
48 | 50 | ||
49 | /* ethernet config */ | 51 | /* ethernet config */ |
50 | struct bcm63xx_enet_platform_data enet0; | 52 | struct bcm63xx_enet_platform_data enet0; |
diff --git a/arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h b/arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h index 71742bac940d..f453c01d0672 100644 --- a/arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h | |||
@@ -24,7 +24,7 @@ | |||
24 | #define cpu_has_smartmips 0 | 24 | #define cpu_has_smartmips 0 |
25 | #define cpu_has_vtag_icache 0 | 25 | #define cpu_has_vtag_icache 0 |
26 | 26 | ||
27 | #if !defined(BCMCPU_RUNTIME_DETECT) && (defined(CONFIG_BCMCPU_IS_6348) || defined(CONFIG_CPU_IS_6338) || defined(CONFIG_CPU_IS_BCM6345)) | 27 | #if !defined(BCMCPU_RUNTIME_DETECT) && (defined(CONFIG_BCM63XX_CPU_6348) || defined(CONFIG_BCM63XX_CPU_6345) || defined(CONFIG_BCM63XX_CPU_6338)) |
28 | #define cpu_has_dc_aliases 0 | 28 | #define cpu_has_dc_aliases 0 |
29 | #endif | 29 | #endif |
30 | 30 | ||
diff --git a/arch/mips/include/asm/mach-sibyte/war.h b/arch/mips/include/asm/mach-sibyte/war.h index 7950ef4f032c..743385d7b5f2 100644 --- a/arch/mips/include/asm/mach-sibyte/war.h +++ b/arch/mips/include/asm/mach-sibyte/war.h | |||
@@ -16,7 +16,11 @@ | |||
16 | #if defined(CONFIG_SB1_PASS_1_WORKAROUNDS) || \ | 16 | #if defined(CONFIG_SB1_PASS_1_WORKAROUNDS) || \ |
17 | defined(CONFIG_SB1_PASS_2_WORKAROUNDS) | 17 | defined(CONFIG_SB1_PASS_2_WORKAROUNDS) |
18 | 18 | ||
19 | #define BCM1250_M3_WAR 1 | 19 | #ifndef __ASSEMBLY__ |
20 | extern int sb1250_m3_workaround_needed(void); | ||
21 | #endif | ||
22 | |||
23 | #define BCM1250_M3_WAR sb1250_m3_workaround_needed() | ||
20 | #define SIBYTE_1956_WAR 1 | 24 | #define SIBYTE_1956_WAR 1 |
21 | 25 | ||
22 | #else | 26 | #else |
diff --git a/arch/mips/include/asm/mmu.h b/arch/mips/include/asm/mmu.h index 4063edd79623..c436138945a8 100644 --- a/arch/mips/include/asm/mmu.h +++ b/arch/mips/include/asm/mmu.h | |||
@@ -1,6 +1,9 @@ | |||
1 | #ifndef __ASM_MMU_H | 1 | #ifndef __ASM_MMU_H |
2 | #define __ASM_MMU_H | 2 | #define __ASM_MMU_H |
3 | 3 | ||
4 | typedef unsigned long mm_context_t[NR_CPUS]; | 4 | typedef struct { |
5 | unsigned long asid[NR_CPUS]; | ||
6 | void *vdso; | ||
7 | } mm_context_t; | ||
5 | 8 | ||
6 | #endif /* __ASM_MMU_H */ | 9 | #endif /* __ASM_MMU_H */ |
diff --git a/arch/mips/include/asm/mmu_context.h b/arch/mips/include/asm/mmu_context.h index 145bb81ccaa5..d9592733a7ba 100644 --- a/arch/mips/include/asm/mmu_context.h +++ b/arch/mips/include/asm/mmu_context.h | |||
@@ -104,7 +104,7 @@ extern unsigned long smtc_asid_mask; | |||
104 | 104 | ||
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | #define cpu_context(cpu, mm) ((mm)->context[cpu]) | 107 | #define cpu_context(cpu, mm) ((mm)->context.asid[cpu]) |
108 | #define cpu_asid(cpu, mm) (cpu_context((cpu), (mm)) & ASID_MASK) | 108 | #define cpu_asid(cpu, mm) (cpu_context((cpu), (mm)) & ASID_MASK) |
109 | #define asid_cache(cpu) (cpu_data[cpu].asid_cache) | 109 | #define asid_cache(cpu) (cpu_data[cpu].asid_cache) |
110 | 110 | ||
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h index ac32572430f4..a16beafcea91 100644 --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h | |||
@@ -188,8 +188,10 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
188 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 188 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
189 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 189 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
190 | 190 | ||
191 | #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE) | 191 | #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE + \ |
192 | #define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET) | 192 | PHYS_OFFSET) |
193 | #define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET - \ | ||
194 | PHYS_OFFSET) | ||
193 | 195 | ||
194 | #include <asm-generic/memory_model.h> | 196 | #include <asm-generic/memory_model.h> |
195 | #include <asm-generic/getorder.h> | 197 | #include <asm-generic/getorder.h> |
diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm/processor.h index 087a8884ef06..ab387910009a 100644 --- a/arch/mips/include/asm/processor.h +++ b/arch/mips/include/asm/processor.h | |||
@@ -33,13 +33,19 @@ extern void (*cpu_wait)(void); | |||
33 | 33 | ||
34 | extern unsigned int vced_count, vcei_count; | 34 | extern unsigned int vced_count, vcei_count; |
35 | 35 | ||
36 | /* | ||
37 | * A special page (the vdso) is mapped into all processes at the very | ||
38 | * top of the virtual memory space. | ||
39 | */ | ||
40 | #define SPECIAL_PAGES_SIZE PAGE_SIZE | ||
41 | |||
36 | #ifdef CONFIG_32BIT | 42 | #ifdef CONFIG_32BIT |
37 | /* | 43 | /* |
38 | * User space process size: 2GB. This is hardcoded into a few places, | 44 | * User space process size: 2GB. This is hardcoded into a few places, |
39 | * so don't change it unless you know what you are doing. | 45 | * so don't change it unless you know what you are doing. |
40 | */ | 46 | */ |
41 | #define TASK_SIZE 0x7fff8000UL | 47 | #define TASK_SIZE 0x7fff8000UL |
42 | #define STACK_TOP TASK_SIZE | 48 | #define STACK_TOP ((TASK_SIZE & PAGE_MASK) - SPECIAL_PAGES_SIZE) |
43 | 49 | ||
44 | /* | 50 | /* |
45 | * This decides where the kernel will search for a free chunk of vm | 51 | * This decides where the kernel will search for a free chunk of vm |
@@ -59,7 +65,8 @@ extern unsigned int vced_count, vcei_count; | |||
59 | #define TASK_SIZE32 0x7fff8000UL | 65 | #define TASK_SIZE32 0x7fff8000UL |
60 | #define TASK_SIZE 0x10000000000UL | 66 | #define TASK_SIZE 0x10000000000UL |
61 | #define STACK_TOP \ | 67 | #define STACK_TOP \ |
62 | (test_thread_flag(TIF_32BIT_ADDR) ? TASK_SIZE32 : TASK_SIZE) | 68 | (((test_thread_flag(TIF_32BIT_ADDR) ? \ |
69 | TASK_SIZE32 : TASK_SIZE) & PAGE_MASK) - SPECIAL_PAGES_SIZE) | ||
63 | 70 | ||
64 | /* | 71 | /* |
65 | * This decides where the kernel will search for a free chunk of vm | 72 | * This decides where the kernel will search for a free chunk of vm |
diff --git a/arch/mips/include/asm/stackframe.h b/arch/mips/include/asm/stackframe.h index 3b6da3330e32..c8419129e770 100644 --- a/arch/mips/include/asm/stackframe.h +++ b/arch/mips/include/asm/stackframe.h | |||
@@ -121,6 +121,25 @@ | |||
121 | .endm | 121 | .endm |
122 | #else | 122 | #else |
123 | .macro get_saved_sp /* Uniprocessor variation */ | 123 | .macro get_saved_sp /* Uniprocessor variation */ |
124 | #ifdef CONFIG_CPU_LOONGSON2F | ||
125 | /* | ||
126 | * Clear BTB (branch target buffer), forbid RAS (return address | ||
127 | * stack) to workaround the Out-of-order Issue in Loongson2F | ||
128 | * via its diagnostic register. | ||
129 | */ | ||
130 | move k0, ra | ||
131 | jal 1f | ||
132 | nop | ||
133 | 1: jal 1f | ||
134 | nop | ||
135 | 1: jal 1f | ||
136 | nop | ||
137 | 1: jal 1f | ||
138 | nop | ||
139 | 1: move ra, k0 | ||
140 | li k0, 3 | ||
141 | mtc0 k0, $22 | ||
142 | #endif /* CONFIG_CPU_LOONGSON2F */ | ||
124 | #if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32) | 143 | #if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32) |
125 | lui k1, %hi(kernelsp) | 144 | lui k1, %hi(kernelsp) |
126 | #else | 145 | #else |
diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h index b99bd07e199b..11a8b5252549 100644 --- a/arch/mips/include/asm/uasm.h +++ b/arch/mips/include/asm/uasm.h | |||
@@ -84,6 +84,7 @@ Ip_u2s3u1(_lw); | |||
84 | Ip_u1u2u3(_mfc0); | 84 | Ip_u1u2u3(_mfc0); |
85 | Ip_u1u2u3(_mtc0); | 85 | Ip_u1u2u3(_mtc0); |
86 | Ip_u2u1u3(_ori); | 86 | Ip_u2u1u3(_ori); |
87 | Ip_u3u1u2(_or); | ||
87 | Ip_u2s3u1(_pref); | 88 | Ip_u2s3u1(_pref); |
88 | Ip_0(_rfe); | 89 | Ip_0(_rfe); |
89 | Ip_u2s3u1(_sc); | 90 | Ip_u2s3u1(_sc); |
@@ -102,6 +103,7 @@ Ip_0(_tlbwr); | |||
102 | Ip_u3u1u2(_xor); | 103 | Ip_u3u1u2(_xor); |
103 | Ip_u2u1u3(_xori); | 104 | Ip_u2u1u3(_xori); |
104 | Ip_u2u1msbu3(_dins); | 105 | Ip_u2u1msbu3(_dins); |
106 | Ip_u1(_syscall); | ||
105 | 107 | ||
106 | /* Handle labels. */ | 108 | /* Handle labels. */ |
107 | struct uasm_label { | 109 | struct uasm_label { |
diff --git a/arch/mips/include/asm/vdso.h b/arch/mips/include/asm/vdso.h new file mode 100644 index 000000000000..cca56aa40ff4 --- /dev/null +++ b/arch/mips/include/asm/vdso.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2009 Cavium Networks | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_VDSO_H | ||
10 | #define __ASM_VDSO_H | ||
11 | |||
12 | #include <linux/types.h> | ||
13 | |||
14 | |||
15 | #ifdef CONFIG_32BIT | ||
16 | struct mips_vdso { | ||
17 | u32 signal_trampoline[2]; | ||
18 | u32 rt_signal_trampoline[2]; | ||
19 | }; | ||
20 | #else /* !CONFIG_32BIT */ | ||
21 | struct mips_vdso { | ||
22 | u32 o32_signal_trampoline[2]; | ||
23 | u32 o32_rt_signal_trampoline[2]; | ||
24 | u32 rt_signal_trampoline[2]; | ||
25 | u32 n32_rt_signal_trampoline[2]; | ||
26 | }; | ||
27 | #endif /* CONFIG_32BIT */ | ||
28 | |||
29 | #endif /* __ASM_VDSO_H */ | ||
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index ef20957ca14b..7a6ac501cbb5 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile | |||
@@ -6,7 +6,7 @@ extra-y := head.o init_task.o vmlinux.lds | |||
6 | 6 | ||
7 | obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \ | 7 | obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \ |
8 | ptrace.o reset.o setup.o signal.o syscall.o \ | 8 | ptrace.o reset.o setup.o signal.o syscall.o \ |
9 | time.o topology.o traps.o unaligned.o watch.o | 9 | time.o topology.o traps.o unaligned.o watch.o vdso.o |
10 | 10 | ||
11 | ifdef CONFIG_FUNCTION_TRACER | 11 | ifdef CONFIG_FUNCTION_TRACER |
12 | CFLAGS_REMOVE_ftrace.o = -pg | 12 | CFLAGS_REMOVE_ftrace.o = -pg |
diff --git a/arch/mips/kernel/cpufreq/loongson2_clock.c b/arch/mips/kernel/cpufreq/loongson2_clock.c index d7ca256e33ef..cefc6e259baf 100644 --- a/arch/mips/kernel/cpufreq/loongson2_clock.c +++ b/arch/mips/kernel/cpufreq/loongson2_clock.c | |||
@@ -164,3 +164,7 @@ void loongson2_cpu_wait(void) | |||
164 | spin_unlock_irqrestore(&loongson2_wait_lock, flags); | 164 | spin_unlock_irqrestore(&loongson2_wait_lock, flags); |
165 | } | 165 | } |
166 | EXPORT_SYMBOL_GPL(loongson2_cpu_wait); | 166 | EXPORT_SYMBOL_GPL(loongson2_cpu_wait); |
167 | |||
168 | MODULE_AUTHOR("Yanhua <yanh@lemote.com>"); | ||
169 | MODULE_DESCRIPTION("cpufreq driver for Loongson 2F"); | ||
170 | MODULE_LICENSE("GPL"); | ||
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 463b71b90a00..99960940d4a4 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -63,8 +63,13 @@ void __noreturn cpu_idle(void) | |||
63 | 63 | ||
64 | smtc_idle_loop_hook(); | 64 | smtc_idle_loop_hook(); |
65 | #endif | 65 | #endif |
66 | if (cpu_wait) | 66 | |
67 | if (cpu_wait) { | ||
68 | /* Don't trace irqs off for idle */ | ||
69 | stop_critical_timings(); | ||
67 | (*cpu_wait)(); | 70 | (*cpu_wait)(); |
71 | start_critical_timings(); | ||
72 | } | ||
68 | } | 73 | } |
69 | #ifdef CONFIG_HOTPLUG_CPU | 74 | #ifdef CONFIG_HOTPLUG_CPU |
70 | if (!cpu_online(cpu) && !cpu_isset(cpu, cpu_callin_map) && | 75 | if (!cpu_online(cpu) && !cpu_isset(cpu, cpu_callin_map) && |
diff --git a/arch/mips/kernel/signal-common.h b/arch/mips/kernel/signal-common.h index 6c8e8c4246f7..10263b405981 100644 --- a/arch/mips/kernel/signal-common.h +++ b/arch/mips/kernel/signal-common.h | |||
@@ -26,11 +26,6 @@ | |||
26 | */ | 26 | */ |
27 | extern void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, | 27 | extern void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, |
28 | size_t frame_size); | 28 | size_t frame_size); |
29 | /* | ||
30 | * install trampoline code to get back from the sig handler | ||
31 | */ | ||
32 | extern int install_sigtramp(unsigned int __user *tramp, unsigned int syscall); | ||
33 | |||
34 | /* Check and clear pending FPU exceptions in saved CSR */ | 29 | /* Check and clear pending FPU exceptions in saved CSR */ |
35 | extern int fpcsr_pending(unsigned int __user *fpcsr); | 30 | extern int fpcsr_pending(unsigned int __user *fpcsr); |
36 | 31 | ||
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index d0c68b5d717b..2099d5a4c4b7 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <asm/ucontext.h> | 32 | #include <asm/ucontext.h> |
33 | #include <asm/cpu-features.h> | 33 | #include <asm/cpu-features.h> |
34 | #include <asm/war.h> | 34 | #include <asm/war.h> |
35 | #include <asm/vdso.h> | ||
35 | 36 | ||
36 | #include "signal-common.h" | 37 | #include "signal-common.h" |
37 | 38 | ||
@@ -44,47 +45,20 @@ extern asmlinkage int _restore_fp_context(struct sigcontext __user *sc); | |||
44 | extern asmlinkage int fpu_emulator_save_context(struct sigcontext __user *sc); | 45 | extern asmlinkage int fpu_emulator_save_context(struct sigcontext __user *sc); |
45 | extern asmlinkage int fpu_emulator_restore_context(struct sigcontext __user *sc); | 46 | extern asmlinkage int fpu_emulator_restore_context(struct sigcontext __user *sc); |
46 | 47 | ||
47 | /* | ||
48 | * Horribly complicated - with the bloody RM9000 workarounds enabled | ||
49 | * the signal trampolines is moving to the end of the structure so we can | ||
50 | * increase the alignment without breaking software compatibility. | ||
51 | */ | ||
52 | #if ICACHE_REFILLS_WORKAROUND_WAR == 0 | ||
53 | |||
54 | struct sigframe { | 48 | struct sigframe { |
55 | u32 sf_ass[4]; /* argument save space for o32 */ | 49 | u32 sf_ass[4]; /* argument save space for o32 */ |
56 | u32 sf_code[2]; /* signal trampoline */ | 50 | u32 sf_pad[2]; /* Was: signal trampoline */ |
57 | struct sigcontext sf_sc; | 51 | struct sigcontext sf_sc; |
58 | sigset_t sf_mask; | 52 | sigset_t sf_mask; |
59 | }; | 53 | }; |
60 | 54 | ||
61 | struct rt_sigframe { | 55 | struct rt_sigframe { |
62 | u32 rs_ass[4]; /* argument save space for o32 */ | 56 | u32 rs_ass[4]; /* argument save space for o32 */ |
63 | u32 rs_code[2]; /* signal trampoline */ | 57 | u32 rs_pad[2]; /* Was: signal trampoline */ |
64 | struct siginfo rs_info; | 58 | struct siginfo rs_info; |
65 | struct ucontext rs_uc; | 59 | struct ucontext rs_uc; |
66 | }; | 60 | }; |
67 | 61 | ||
68 | #else | ||
69 | |||
70 | struct sigframe { | ||
71 | u32 sf_ass[4]; /* argument save space for o32 */ | ||
72 | u32 sf_pad[2]; | ||
73 | struct sigcontext sf_sc; /* hw context */ | ||
74 | sigset_t sf_mask; | ||
75 | u32 sf_code[8] ____cacheline_aligned; /* signal trampoline */ | ||
76 | }; | ||
77 | |||
78 | struct rt_sigframe { | ||
79 | u32 rs_ass[4]; /* argument save space for o32 */ | ||
80 | u32 rs_pad[2]; | ||
81 | struct siginfo rs_info; | ||
82 | struct ucontext rs_uc; | ||
83 | u32 rs_code[8] ____cacheline_aligned; /* signal trampoline */ | ||
84 | }; | ||
85 | |||
86 | #endif | ||
87 | |||
88 | /* | 62 | /* |
89 | * Helper routines | 63 | * Helper routines |
90 | */ | 64 | */ |
@@ -266,32 +240,6 @@ void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, | |||
266 | return (void __user *)((sp - frame_size) & (ICACHE_REFILLS_WORKAROUND_WAR ? ~(cpu_icache_line_size()-1) : ALMASK)); | 240 | return (void __user *)((sp - frame_size) & (ICACHE_REFILLS_WORKAROUND_WAR ? ~(cpu_icache_line_size()-1) : ALMASK)); |
267 | } | 241 | } |
268 | 242 | ||
269 | int install_sigtramp(unsigned int __user *tramp, unsigned int syscall) | ||
270 | { | ||
271 | int err; | ||
272 | |||
273 | /* | ||
274 | * Set up the return code ... | ||
275 | * | ||
276 | * li v0, __NR__foo_sigreturn | ||
277 | * syscall | ||
278 | */ | ||
279 | |||
280 | err = __put_user(0x24020000 + syscall, tramp + 0); | ||
281 | err |= __put_user(0x0000000c , tramp + 1); | ||
282 | if (ICACHE_REFILLS_WORKAROUND_WAR) { | ||
283 | err |= __put_user(0, tramp + 2); | ||
284 | err |= __put_user(0, tramp + 3); | ||
285 | err |= __put_user(0, tramp + 4); | ||
286 | err |= __put_user(0, tramp + 5); | ||
287 | err |= __put_user(0, tramp + 6); | ||
288 | err |= __put_user(0, tramp + 7); | ||
289 | } | ||
290 | flush_cache_sigtramp((unsigned long) tramp); | ||
291 | |||
292 | return err; | ||
293 | } | ||
294 | |||
295 | /* | 243 | /* |
296 | * Atomically swap in the new signal mask, and wait for a signal. | 244 | * Atomically swap in the new signal mask, and wait for a signal. |
297 | */ | 245 | */ |
@@ -484,8 +432,8 @@ badframe: | |||
484 | } | 432 | } |
485 | 433 | ||
486 | #ifdef CONFIG_TRAD_SIGNALS | 434 | #ifdef CONFIG_TRAD_SIGNALS |
487 | static int setup_frame(struct k_sigaction * ka, struct pt_regs *regs, | 435 | static int setup_frame(void *sig_return, struct k_sigaction *ka, |
488 | int signr, sigset_t *set) | 436 | struct pt_regs *regs, int signr, sigset_t *set) |
489 | { | 437 | { |
490 | struct sigframe __user *frame; | 438 | struct sigframe __user *frame; |
491 | int err = 0; | 439 | int err = 0; |
@@ -494,8 +442,6 @@ static int setup_frame(struct k_sigaction * ka, struct pt_regs *regs, | |||
494 | if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) | 442 | if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) |
495 | goto give_sigsegv; | 443 | goto give_sigsegv; |
496 | 444 | ||
497 | err |= install_sigtramp(frame->sf_code, __NR_sigreturn); | ||
498 | |||
499 | err |= setup_sigcontext(regs, &frame->sf_sc); | 445 | err |= setup_sigcontext(regs, &frame->sf_sc); |
500 | err |= __copy_to_user(&frame->sf_mask, set, sizeof(*set)); | 446 | err |= __copy_to_user(&frame->sf_mask, set, sizeof(*set)); |
501 | if (err) | 447 | if (err) |
@@ -515,7 +461,7 @@ static int setup_frame(struct k_sigaction * ka, struct pt_regs *regs, | |||
515 | regs->regs[ 5] = 0; | 461 | regs->regs[ 5] = 0; |
516 | regs->regs[ 6] = (unsigned long) &frame->sf_sc; | 462 | regs->regs[ 6] = (unsigned long) &frame->sf_sc; |
517 | regs->regs[29] = (unsigned long) frame; | 463 | regs->regs[29] = (unsigned long) frame; |
518 | regs->regs[31] = (unsigned long) frame->sf_code; | 464 | regs->regs[31] = (unsigned long) sig_return; |
519 | regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; | 465 | regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; |
520 | 466 | ||
521 | DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n", | 467 | DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n", |
@@ -529,8 +475,9 @@ give_sigsegv: | |||
529 | } | 475 | } |
530 | #endif | 476 | #endif |
531 | 477 | ||
532 | static int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs, | 478 | static int setup_rt_frame(void *sig_return, struct k_sigaction *ka, |
533 | int signr, sigset_t *set, siginfo_t *info) | 479 | struct pt_regs *regs, int signr, sigset_t *set, |
480 | siginfo_t *info) | ||
534 | { | 481 | { |
535 | struct rt_sigframe __user *frame; | 482 | struct rt_sigframe __user *frame; |
536 | int err = 0; | 483 | int err = 0; |
@@ -539,8 +486,6 @@ static int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs, | |||
539 | if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) | 486 | if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) |
540 | goto give_sigsegv; | 487 | goto give_sigsegv; |
541 | 488 | ||
542 | err |= install_sigtramp(frame->rs_code, __NR_rt_sigreturn); | ||
543 | |||
544 | /* Create siginfo. */ | 489 | /* Create siginfo. */ |
545 | err |= copy_siginfo_to_user(&frame->rs_info, info); | 490 | err |= copy_siginfo_to_user(&frame->rs_info, info); |
546 | 491 | ||
@@ -573,7 +518,7 @@ static int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs, | |||
573 | regs->regs[ 5] = (unsigned long) &frame->rs_info; | 518 | regs->regs[ 5] = (unsigned long) &frame->rs_info; |
574 | regs->regs[ 6] = (unsigned long) &frame->rs_uc; | 519 | regs->regs[ 6] = (unsigned long) &frame->rs_uc; |
575 | regs->regs[29] = (unsigned long) frame; | 520 | regs->regs[29] = (unsigned long) frame; |
576 | regs->regs[31] = (unsigned long) frame->rs_code; | 521 | regs->regs[31] = (unsigned long) sig_return; |
577 | regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; | 522 | regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; |
578 | 523 | ||
579 | DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n", | 524 | DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n", |
@@ -590,8 +535,11 @@ give_sigsegv: | |||
590 | struct mips_abi mips_abi = { | 535 | struct mips_abi mips_abi = { |
591 | #ifdef CONFIG_TRAD_SIGNALS | 536 | #ifdef CONFIG_TRAD_SIGNALS |
592 | .setup_frame = setup_frame, | 537 | .setup_frame = setup_frame, |
538 | .signal_return_offset = offsetof(struct mips_vdso, signal_trampoline), | ||
593 | #endif | 539 | #endif |
594 | .setup_rt_frame = setup_rt_frame, | 540 | .setup_rt_frame = setup_rt_frame, |
541 | .rt_signal_return_offset = | ||
542 | offsetof(struct mips_vdso, rt_signal_trampoline), | ||
595 | .restart = __NR_restart_syscall | 543 | .restart = __NR_restart_syscall |
596 | }; | 544 | }; |
597 | 545 | ||
@@ -599,6 +547,8 @@ static int handle_signal(unsigned long sig, siginfo_t *info, | |||
599 | struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs) | 547 | struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs) |
600 | { | 548 | { |
601 | int ret; | 549 | int ret; |
550 | struct mips_abi *abi = current->thread.abi; | ||
551 | void *vdso = current->mm->context.vdso; | ||
602 | 552 | ||
603 | switch(regs->regs[0]) { | 553 | switch(regs->regs[0]) { |
604 | case ERESTART_RESTARTBLOCK: | 554 | case ERESTART_RESTARTBLOCK: |
@@ -619,9 +569,11 @@ static int handle_signal(unsigned long sig, siginfo_t *info, | |||
619 | regs->regs[0] = 0; /* Don't deal with this again. */ | 569 | regs->regs[0] = 0; /* Don't deal with this again. */ |
620 | 570 | ||
621 | if (sig_uses_siginfo(ka)) | 571 | if (sig_uses_siginfo(ka)) |
622 | ret = current->thread.abi->setup_rt_frame(ka, regs, sig, oldset, info); | 572 | ret = abi->setup_rt_frame(vdso + abi->rt_signal_return_offset, |
573 | ka, regs, sig, oldset, info); | ||
623 | else | 574 | else |
624 | ret = current->thread.abi->setup_frame(ka, regs, sig, oldset); | 575 | ret = abi->setup_frame(vdso + abi->signal_return_offset, |
576 | ka, regs, sig, oldset); | ||
625 | 577 | ||
626 | spin_lock_irq(¤t->sighand->siglock); | 578 | spin_lock_irq(¤t->sighand->siglock); |
627 | sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); | 579 | sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); |
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index 03abaf048f09..a0ed0e052b2e 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <asm/system.h> | 32 | #include <asm/system.h> |
33 | #include <asm/fpu.h> | 33 | #include <asm/fpu.h> |
34 | #include <asm/war.h> | 34 | #include <asm/war.h> |
35 | #include <asm/vdso.h> | ||
35 | 36 | ||
36 | #include "signal-common.h" | 37 | #include "signal-common.h" |
37 | 38 | ||
@@ -47,8 +48,6 @@ extern asmlinkage int fpu_emulator_restore_context32(struct sigcontext32 __user | |||
47 | /* | 48 | /* |
48 | * Including <asm/unistd.h> would give use the 64-bit syscall numbers ... | 49 | * Including <asm/unistd.h> would give use the 64-bit syscall numbers ... |
49 | */ | 50 | */ |
50 | #define __NR_O32_sigreturn 4119 | ||
51 | #define __NR_O32_rt_sigreturn 4193 | ||
52 | #define __NR_O32_restart_syscall 4253 | 51 | #define __NR_O32_restart_syscall 4253 |
53 | 52 | ||
54 | /* 32-bit compatibility types */ | 53 | /* 32-bit compatibility types */ |
@@ -77,47 +76,20 @@ struct ucontext32 { | |||
77 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ | 76 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ |
78 | }; | 77 | }; |
79 | 78 | ||
80 | /* | ||
81 | * Horribly complicated - with the bloody RM9000 workarounds enabled | ||
82 | * the signal trampolines is moving to the end of the structure so we can | ||
83 | * increase the alignment without breaking software compatibility. | ||
84 | */ | ||
85 | #if ICACHE_REFILLS_WORKAROUND_WAR == 0 | ||
86 | |||
87 | struct sigframe32 { | 79 | struct sigframe32 { |
88 | u32 sf_ass[4]; /* argument save space for o32 */ | 80 | u32 sf_ass[4]; /* argument save space for o32 */ |
89 | u32 sf_code[2]; /* signal trampoline */ | 81 | u32 sf_pad[2]; /* Was: signal trampoline */ |
90 | struct sigcontext32 sf_sc; | 82 | struct sigcontext32 sf_sc; |
91 | compat_sigset_t sf_mask; | 83 | compat_sigset_t sf_mask; |
92 | }; | 84 | }; |
93 | 85 | ||
94 | struct rt_sigframe32 { | 86 | struct rt_sigframe32 { |
95 | u32 rs_ass[4]; /* argument save space for o32 */ | 87 | u32 rs_ass[4]; /* argument save space for o32 */ |
96 | u32 rs_code[2]; /* signal trampoline */ | 88 | u32 rs_pad[2]; /* Was: signal trampoline */ |
97 | compat_siginfo_t rs_info; | 89 | compat_siginfo_t rs_info; |
98 | struct ucontext32 rs_uc; | 90 | struct ucontext32 rs_uc; |
99 | }; | 91 | }; |
100 | 92 | ||
101 | #else /* ICACHE_REFILLS_WORKAROUND_WAR */ | ||
102 | |||
103 | struct sigframe32 { | ||
104 | u32 sf_ass[4]; /* argument save space for o32 */ | ||
105 | u32 sf_pad[2]; | ||
106 | struct sigcontext32 sf_sc; /* hw context */ | ||
107 | compat_sigset_t sf_mask; | ||
108 | u32 sf_code[8] ____cacheline_aligned; /* signal trampoline */ | ||
109 | }; | ||
110 | |||
111 | struct rt_sigframe32 { | ||
112 | u32 rs_ass[4]; /* argument save space for o32 */ | ||
113 | u32 rs_pad[2]; | ||
114 | compat_siginfo_t rs_info; | ||
115 | struct ucontext32 rs_uc; | ||
116 | u32 rs_code[8] __attribute__((aligned(32))); /* signal trampoline */ | ||
117 | }; | ||
118 | |||
119 | #endif /* !ICACHE_REFILLS_WORKAROUND_WAR */ | ||
120 | |||
121 | /* | 93 | /* |
122 | * sigcontext handlers | 94 | * sigcontext handlers |
123 | */ | 95 | */ |
@@ -598,8 +570,8 @@ badframe: | |||
598 | force_sig(SIGSEGV, current); | 570 | force_sig(SIGSEGV, current); |
599 | } | 571 | } |
600 | 572 | ||
601 | static int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs, | 573 | static int setup_frame_32(void *sig_return, struct k_sigaction *ka, |
602 | int signr, sigset_t *set) | 574 | struct pt_regs *regs, int signr, sigset_t *set) |
603 | { | 575 | { |
604 | struct sigframe32 __user *frame; | 576 | struct sigframe32 __user *frame; |
605 | int err = 0; | 577 | int err = 0; |
@@ -608,8 +580,6 @@ static int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs, | |||
608 | if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) | 580 | if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) |
609 | goto give_sigsegv; | 581 | goto give_sigsegv; |
610 | 582 | ||
611 | err |= install_sigtramp(frame->sf_code, __NR_O32_sigreturn); | ||
612 | |||
613 | err |= setup_sigcontext32(regs, &frame->sf_sc); | 583 | err |= setup_sigcontext32(regs, &frame->sf_sc); |
614 | err |= __copy_conv_sigset_to_user(&frame->sf_mask, set); | 584 | err |= __copy_conv_sigset_to_user(&frame->sf_mask, set); |
615 | 585 | ||
@@ -630,7 +600,7 @@ static int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs, | |||
630 | regs->regs[ 5] = 0; | 600 | regs->regs[ 5] = 0; |
631 | regs->regs[ 6] = (unsigned long) &frame->sf_sc; | 601 | regs->regs[ 6] = (unsigned long) &frame->sf_sc; |
632 | regs->regs[29] = (unsigned long) frame; | 602 | regs->regs[29] = (unsigned long) frame; |
633 | regs->regs[31] = (unsigned long) frame->sf_code; | 603 | regs->regs[31] = (unsigned long) sig_return; |
634 | regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; | 604 | regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; |
635 | 605 | ||
636 | DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n", | 606 | DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n", |
@@ -644,8 +614,9 @@ give_sigsegv: | |||
644 | return -EFAULT; | 614 | return -EFAULT; |
645 | } | 615 | } |
646 | 616 | ||
647 | static int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs, | 617 | static int setup_rt_frame_32(void *sig_return, struct k_sigaction *ka, |
648 | int signr, sigset_t *set, siginfo_t *info) | 618 | struct pt_regs *regs, int signr, sigset_t *set, |
619 | siginfo_t *info) | ||
649 | { | 620 | { |
650 | struct rt_sigframe32 __user *frame; | 621 | struct rt_sigframe32 __user *frame; |
651 | int err = 0; | 622 | int err = 0; |
@@ -655,8 +626,6 @@ static int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs, | |||
655 | if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) | 626 | if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) |
656 | goto give_sigsegv; | 627 | goto give_sigsegv; |
657 | 628 | ||
658 | err |= install_sigtramp(frame->rs_code, __NR_O32_rt_sigreturn); | ||
659 | |||
660 | /* Convert (siginfo_t -> compat_siginfo_t) and copy to user. */ | 629 | /* Convert (siginfo_t -> compat_siginfo_t) and copy to user. */ |
661 | err |= copy_siginfo_to_user32(&frame->rs_info, info); | 630 | err |= copy_siginfo_to_user32(&frame->rs_info, info); |
662 | 631 | ||
@@ -690,7 +659,7 @@ static int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs, | |||
690 | regs->regs[ 5] = (unsigned long) &frame->rs_info; | 659 | regs->regs[ 5] = (unsigned long) &frame->rs_info; |
691 | regs->regs[ 6] = (unsigned long) &frame->rs_uc; | 660 | regs->regs[ 6] = (unsigned long) &frame->rs_uc; |
692 | regs->regs[29] = (unsigned long) frame; | 661 | regs->regs[29] = (unsigned long) frame; |
693 | regs->regs[31] = (unsigned long) frame->rs_code; | 662 | regs->regs[31] = (unsigned long) sig_return; |
694 | regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; | 663 | regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; |
695 | 664 | ||
696 | DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n", | 665 | DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n", |
@@ -709,7 +678,11 @@ give_sigsegv: | |||
709 | */ | 678 | */ |
710 | struct mips_abi mips_abi_32 = { | 679 | struct mips_abi mips_abi_32 = { |
711 | .setup_frame = setup_frame_32, | 680 | .setup_frame = setup_frame_32, |
681 | .signal_return_offset = | ||
682 | offsetof(struct mips_vdso, o32_signal_trampoline), | ||
712 | .setup_rt_frame = setup_rt_frame_32, | 683 | .setup_rt_frame = setup_rt_frame_32, |
684 | .rt_signal_return_offset = | ||
685 | offsetof(struct mips_vdso, o32_rt_signal_trampoline), | ||
713 | .restart = __NR_O32_restart_syscall | 686 | .restart = __NR_O32_restart_syscall |
714 | }; | 687 | }; |
715 | 688 | ||
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c index bb277e82d421..2c5df818c65a 100644 --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c | |||
@@ -39,13 +39,13 @@ | |||
39 | #include <asm/fpu.h> | 39 | #include <asm/fpu.h> |
40 | #include <asm/cpu-features.h> | 40 | #include <asm/cpu-features.h> |
41 | #include <asm/war.h> | 41 | #include <asm/war.h> |
42 | #include <asm/vdso.h> | ||
42 | 43 | ||
43 | #include "signal-common.h" | 44 | #include "signal-common.h" |
44 | 45 | ||
45 | /* | 46 | /* |
46 | * Including <asm/unistd.h> would give use the 64-bit syscall numbers ... | 47 | * Including <asm/unistd.h> would give use the 64-bit syscall numbers ... |
47 | */ | 48 | */ |
48 | #define __NR_N32_rt_sigreturn 6211 | ||
49 | #define __NR_N32_restart_syscall 6214 | 49 | #define __NR_N32_restart_syscall 6214 |
50 | 50 | ||
51 | extern int setup_sigcontext(struct pt_regs *, struct sigcontext __user *); | 51 | extern int setup_sigcontext(struct pt_regs *, struct sigcontext __user *); |
@@ -67,27 +67,13 @@ struct ucontextn32 { | |||
67 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ | 67 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ |
68 | }; | 68 | }; |
69 | 69 | ||
70 | #if ICACHE_REFILLS_WORKAROUND_WAR == 0 | ||
71 | |||
72 | struct rt_sigframe_n32 { | ||
73 | u32 rs_ass[4]; /* argument save space for o32 */ | ||
74 | u32 rs_code[2]; /* signal trampoline */ | ||
75 | struct compat_siginfo rs_info; | ||
76 | struct ucontextn32 rs_uc; | ||
77 | }; | ||
78 | |||
79 | #else /* ICACHE_REFILLS_WORKAROUND_WAR */ | ||
80 | |||
81 | struct rt_sigframe_n32 { | 70 | struct rt_sigframe_n32 { |
82 | u32 rs_ass[4]; /* argument save space for o32 */ | 71 | u32 rs_ass[4]; /* argument save space for o32 */ |
83 | u32 rs_pad[2]; | 72 | u32 rs_pad[2]; /* Was: signal trampoline */ |
84 | struct compat_siginfo rs_info; | 73 | struct compat_siginfo rs_info; |
85 | struct ucontextn32 rs_uc; | 74 | struct ucontextn32 rs_uc; |
86 | u32 rs_code[8] ____cacheline_aligned; /* signal trampoline */ | ||
87 | }; | 75 | }; |
88 | 76 | ||
89 | #endif /* !ICACHE_REFILLS_WORKAROUND_WAR */ | ||
90 | |||
91 | extern void sigset_from_compat(sigset_t *set, compat_sigset_t *compat); | 77 | extern void sigset_from_compat(sigset_t *set, compat_sigset_t *compat); |
92 | 78 | ||
93 | asmlinkage int sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) | 79 | asmlinkage int sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) |
@@ -173,7 +159,7 @@ badframe: | |||
173 | force_sig(SIGSEGV, current); | 159 | force_sig(SIGSEGV, current); |
174 | } | 160 | } |
175 | 161 | ||
176 | static int setup_rt_frame_n32(struct k_sigaction * ka, | 162 | static int setup_rt_frame_n32(void *sig_return, struct k_sigaction *ka, |
177 | struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info) | 163 | struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info) |
178 | { | 164 | { |
179 | struct rt_sigframe_n32 __user *frame; | 165 | struct rt_sigframe_n32 __user *frame; |
@@ -184,8 +170,6 @@ static int setup_rt_frame_n32(struct k_sigaction * ka, | |||
184 | if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) | 170 | if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) |
185 | goto give_sigsegv; | 171 | goto give_sigsegv; |
186 | 172 | ||
187 | install_sigtramp(frame->rs_code, __NR_N32_rt_sigreturn); | ||
188 | |||
189 | /* Create siginfo. */ | 173 | /* Create siginfo. */ |
190 | err |= copy_siginfo_to_user32(&frame->rs_info, info); | 174 | err |= copy_siginfo_to_user32(&frame->rs_info, info); |
191 | 175 | ||
@@ -219,7 +203,7 @@ static int setup_rt_frame_n32(struct k_sigaction * ka, | |||
219 | regs->regs[ 5] = (unsigned long) &frame->rs_info; | 203 | regs->regs[ 5] = (unsigned long) &frame->rs_info; |
220 | regs->regs[ 6] = (unsigned long) &frame->rs_uc; | 204 | regs->regs[ 6] = (unsigned long) &frame->rs_uc; |
221 | regs->regs[29] = (unsigned long) frame; | 205 | regs->regs[29] = (unsigned long) frame; |
222 | regs->regs[31] = (unsigned long) frame->rs_code; | 206 | regs->regs[31] = (unsigned long) sig_return; |
223 | regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; | 207 | regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; |
224 | 208 | ||
225 | DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n", | 209 | DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n", |
@@ -235,5 +219,7 @@ give_sigsegv: | |||
235 | 219 | ||
236 | struct mips_abi mips_abi_n32 = { | 220 | struct mips_abi mips_abi_n32 = { |
237 | .setup_rt_frame = setup_rt_frame_n32, | 221 | .setup_rt_frame = setup_rt_frame_n32, |
222 | .rt_signal_return_offset = | ||
223 | offsetof(struct mips_vdso, n32_rt_signal_trampoline), | ||
238 | .restart = __NR_N32_restart_syscall | 224 | .restart = __NR_N32_restart_syscall |
239 | }; | 225 | }; |
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c index 25e825aea327..a95dea5459c4 100644 --- a/arch/mips/kernel/smtc.c +++ b/arch/mips/kernel/smtc.c | |||
@@ -182,7 +182,7 @@ static int vpemask[2][8] = { | |||
182 | {0, 0, 0, 0, 0, 0, 0, 1} | 182 | {0, 0, 0, 0, 0, 0, 0, 1} |
183 | }; | 183 | }; |
184 | int tcnoprog[NR_CPUS]; | 184 | int tcnoprog[NR_CPUS]; |
185 | static atomic_t idle_hook_initialized = {0}; | 185 | static atomic_t idle_hook_initialized = ATOMIC_INIT(0); |
186 | static int clock_hang_reported[NR_CPUS]; | 186 | static int clock_hang_reported[NR_CPUS]; |
187 | 187 | ||
188 | #endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */ | 188 | #endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */ |
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index 9587abc67f35..dd81b0f87518 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c | |||
@@ -79,7 +79,11 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, | |||
79 | int do_color_align; | 79 | int do_color_align; |
80 | unsigned long task_size; | 80 | unsigned long task_size; |
81 | 81 | ||
82 | task_size = STACK_TOP; | 82 | #ifdef CONFIG_32BIT |
83 | task_size = TASK_SIZE; | ||
84 | #else /* Must be CONFIG_64BIT*/ | ||
85 | task_size = test_thread_flag(TIF_32BIT_ADDR) ? TASK_SIZE32 : TASK_SIZE; | ||
86 | #endif | ||
83 | 87 | ||
84 | if (len > task_size) | 88 | if (len > task_size) |
85 | return -ENOMEM; | 89 | return -ENOMEM; |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 4e00f9bc23ee..1a4dd657ccb9 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -1599,7 +1599,7 @@ void __init trap_init(void) | |||
1599 | ebase = (unsigned long) | 1599 | ebase = (unsigned long) |
1600 | __alloc_bootmem(size, 1 << fls(size), 0); | 1600 | __alloc_bootmem(size, 1 << fls(size), 0); |
1601 | } else { | 1601 | } else { |
1602 | ebase = CAC_BASE; | 1602 | ebase = CKSEG0; |
1603 | if (cpu_has_mips_r2) | 1603 | if (cpu_has_mips_r2) |
1604 | ebase += (read_c0_ebase() & 0x3ffff000); | 1604 | ebase += (read_c0_ebase() & 0x3ffff000); |
1605 | } | 1605 | } |
diff --git a/arch/mips/kernel/vdso.c b/arch/mips/kernel/vdso.c new file mode 100644 index 000000000000..b773c1112b14 --- /dev/null +++ b/arch/mips/kernel/vdso.c | |||
@@ -0,0 +1,112 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2009, 2010 Cavium Networks, Inc. | ||
7 | */ | ||
8 | |||
9 | |||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/err.h> | ||
12 | #include <linux/sched.h> | ||
13 | #include <linux/mm.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/binfmts.h> | ||
16 | #include <linux/elf.h> | ||
17 | #include <linux/vmalloc.h> | ||
18 | #include <linux/unistd.h> | ||
19 | |||
20 | #include <asm/vdso.h> | ||
21 | #include <asm/uasm.h> | ||
22 | |||
23 | /* | ||
24 | * Including <asm/unistd.h> would give use the 64-bit syscall numbers ... | ||
25 | */ | ||
26 | #define __NR_O32_sigreturn 4119 | ||
27 | #define __NR_O32_rt_sigreturn 4193 | ||
28 | #define __NR_N32_rt_sigreturn 6211 | ||
29 | |||
30 | static struct page *vdso_page; | ||
31 | |||
32 | static void __init install_trampoline(u32 *tramp, unsigned int sigreturn) | ||
33 | { | ||
34 | uasm_i_addiu(&tramp, 2, 0, sigreturn); /* li v0, sigreturn */ | ||
35 | uasm_i_syscall(&tramp, 0); | ||
36 | } | ||
37 | |||
38 | static int __init init_vdso(void) | ||
39 | { | ||
40 | struct mips_vdso *vdso; | ||
41 | |||
42 | vdso_page = alloc_page(GFP_KERNEL); | ||
43 | if (!vdso_page) | ||
44 | panic("Cannot allocate vdso"); | ||
45 | |||
46 | vdso = vmap(&vdso_page, 1, 0, PAGE_KERNEL); | ||
47 | if (!vdso) | ||
48 | panic("Cannot map vdso"); | ||
49 | clear_page(vdso); | ||
50 | |||
51 | install_trampoline(vdso->rt_signal_trampoline, __NR_rt_sigreturn); | ||
52 | #ifdef CONFIG_32BIT | ||
53 | install_trampoline(vdso->signal_trampoline, __NR_sigreturn); | ||
54 | #else | ||
55 | install_trampoline(vdso->n32_rt_signal_trampoline, | ||
56 | __NR_N32_rt_sigreturn); | ||
57 | install_trampoline(vdso->o32_signal_trampoline, __NR_O32_sigreturn); | ||
58 | install_trampoline(vdso->o32_rt_signal_trampoline, | ||
59 | __NR_O32_rt_sigreturn); | ||
60 | #endif | ||
61 | |||
62 | vunmap(vdso); | ||
63 | |||
64 | pr_notice("init_vdso successfull\n"); | ||
65 | |||
66 | return 0; | ||
67 | } | ||
68 | device_initcall(init_vdso); | ||
69 | |||
70 | static unsigned long vdso_addr(unsigned long start) | ||
71 | { | ||
72 | return STACK_TOP; | ||
73 | } | ||
74 | |||
75 | int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) | ||
76 | { | ||
77 | int ret; | ||
78 | unsigned long addr; | ||
79 | struct mm_struct *mm = current->mm; | ||
80 | |||
81 | down_write(&mm->mmap_sem); | ||
82 | |||
83 | addr = vdso_addr(mm->start_stack); | ||
84 | |||
85 | addr = get_unmapped_area(NULL, addr, PAGE_SIZE, 0, 0); | ||
86 | if (IS_ERR_VALUE(addr)) { | ||
87 | ret = addr; | ||
88 | goto up_fail; | ||
89 | } | ||
90 | |||
91 | ret = install_special_mapping(mm, addr, PAGE_SIZE, | ||
92 | VM_READ|VM_EXEC| | ||
93 | VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC| | ||
94 | VM_ALWAYSDUMP, | ||
95 | &vdso_page); | ||
96 | |||
97 | if (ret) | ||
98 | goto up_fail; | ||
99 | |||
100 | mm->context.vdso = (void *)addr; | ||
101 | |||
102 | up_fail: | ||
103 | up_write(&mm->mmap_sem); | ||
104 | return ret; | ||
105 | } | ||
106 | |||
107 | const char *arch_vma_name(struct vm_area_struct *vma) | ||
108 | { | ||
109 | if (vma->vm_mm && vma->vm_start == (long)vma->vm_mm->context.vdso) | ||
110 | return "[vdso]"; | ||
111 | return NULL; | ||
112 | } | ||
diff --git a/arch/mips/lib/delay.c b/arch/mips/lib/delay.c index 6b3b1de9dcae..5995969e8c42 100644 --- a/arch/mips/lib/delay.c +++ b/arch/mips/lib/delay.c | |||
@@ -41,7 +41,7 @@ EXPORT_SYMBOL(__delay); | |||
41 | 41 | ||
42 | void __udelay(unsigned long us) | 42 | void __udelay(unsigned long us) |
43 | { | 43 | { |
44 | unsigned int lpj = current_cpu_data.udelay_val; | 44 | unsigned int lpj = raw_current_cpu_data.udelay_val; |
45 | 45 | ||
46 | __delay((us * 0x000010c7ull * HZ * lpj) >> 32); | 46 | __delay((us * 0x000010c7ull * HZ * lpj) >> 32); |
47 | } | 47 | } |
@@ -49,7 +49,7 @@ EXPORT_SYMBOL(__udelay); | |||
49 | 49 | ||
50 | void __ndelay(unsigned long ns) | 50 | void __ndelay(unsigned long ns) |
51 | { | 51 | { |
52 | unsigned int lpj = current_cpu_data.udelay_val; | 52 | unsigned int lpj = raw_current_cpu_data.udelay_val; |
53 | 53 | ||
54 | __delay((ns * 0x00000005ull * HZ * lpj) >> 32); | 54 | __delay((ns * 0x00000005ull * HZ * lpj) >> 32); |
55 | } | 55 | } |
diff --git a/arch/mips/lib/libgcc.h b/arch/mips/lib/libgcc.h index 3f19d1c5d942..05909d58e2fe 100644 --- a/arch/mips/lib/libgcc.h +++ b/arch/mips/lib/libgcc.h | |||
@@ -17,8 +17,7 @@ struct DWstruct { | |||
17 | #error I feel sick. | 17 | #error I feel sick. |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | typedef union | 20 | typedef union { |
21 | { | ||
22 | struct DWstruct s; | 21 | struct DWstruct s; |
23 | long long ll; | 22 | long long ll; |
24 | } DWunion; | 23 | } DWunion; |
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index be8627bc5b02..12af739048fa 100644 --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c | |||
@@ -133,7 +133,7 @@ void __update_cache(struct vm_area_struct *vma, unsigned long address, | |||
133 | } | 133 | } |
134 | 134 | ||
135 | unsigned long _page_cachable_default; | 135 | unsigned long _page_cachable_default; |
136 | EXPORT_SYMBOL_GPL(_page_cachable_default); | 136 | EXPORT_SYMBOL(_page_cachable_default); |
137 | 137 | ||
138 | static inline void setup_protection_map(void) | 138 | static inline void setup_protection_map(void) |
139 | { | 139 | { |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 0de0e4127d66..d1f68aadbc4c 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -788,10 +788,15 @@ static void __cpuinit build_r4000_tlb_refill_handler(void) | |||
788 | * create the plain linear handler | 788 | * create the plain linear handler |
789 | */ | 789 | */ |
790 | if (bcm1250_m3_war()) { | 790 | if (bcm1250_m3_war()) { |
791 | UASM_i_MFC0(&p, K0, C0_BADVADDR); | 791 | unsigned int segbits = 44; |
792 | UASM_i_MFC0(&p, K1, C0_ENTRYHI); | 792 | |
793 | uasm_i_dmfc0(&p, K0, C0_BADVADDR); | ||
794 | uasm_i_dmfc0(&p, K1, C0_ENTRYHI); | ||
793 | uasm_i_xor(&p, K0, K0, K1); | 795 | uasm_i_xor(&p, K0, K0, K1); |
794 | UASM_i_SRL(&p, K0, K0, PAGE_SHIFT + 1); | 796 | uasm_i_dsrl32(&p, K1, K0, 62 - 32); |
797 | uasm_i_dsrl(&p, K0, K0, 12 + 1); | ||
798 | uasm_i_dsll32(&p, K0, K0, 64 + 12 + 1 - segbits - 32); | ||
799 | uasm_i_or(&p, K0, K0, K1); | ||
795 | uasm_il_bnez(&p, &r, K0, label_leave); | 800 | uasm_il_bnez(&p, &r, K0, label_leave); |
796 | /* No need for uasm_i_nop */ | 801 | /* No need for uasm_i_nop */ |
797 | } | 802 | } |
@@ -1312,10 +1317,15 @@ static void __cpuinit build_r4000_tlb_load_handler(void) | |||
1312 | memset(relocs, 0, sizeof(relocs)); | 1317 | memset(relocs, 0, sizeof(relocs)); |
1313 | 1318 | ||
1314 | if (bcm1250_m3_war()) { | 1319 | if (bcm1250_m3_war()) { |
1315 | UASM_i_MFC0(&p, K0, C0_BADVADDR); | 1320 | unsigned int segbits = 44; |
1316 | UASM_i_MFC0(&p, K1, C0_ENTRYHI); | 1321 | |
1322 | uasm_i_dmfc0(&p, K0, C0_BADVADDR); | ||
1323 | uasm_i_dmfc0(&p, K1, C0_ENTRYHI); | ||
1317 | uasm_i_xor(&p, K0, K0, K1); | 1324 | uasm_i_xor(&p, K0, K0, K1); |
1318 | UASM_i_SRL(&p, K0, K0, PAGE_SHIFT + 1); | 1325 | uasm_i_dsrl32(&p, K1, K0, 62 - 32); |
1326 | uasm_i_dsrl(&p, K0, K0, 12 + 1); | ||
1327 | uasm_i_dsll32(&p, K0, K0, 64 + 12 + 1 - segbits - 32); | ||
1328 | uasm_i_or(&p, K0, K0, K1); | ||
1319 | uasm_il_bnez(&p, &r, K0, label_leave); | 1329 | uasm_il_bnez(&p, &r, K0, label_leave); |
1320 | /* No need for uasm_i_nop */ | 1330 | /* No need for uasm_i_nop */ |
1321 | } | 1331 | } |
diff --git a/arch/mips/mm/uasm.c b/arch/mips/mm/uasm.c index 1581e9852461..611d564fdcf1 100644 --- a/arch/mips/mm/uasm.c +++ b/arch/mips/mm/uasm.c | |||
@@ -31,7 +31,8 @@ enum fields { | |||
31 | BIMM = 0x040, | 31 | BIMM = 0x040, |
32 | JIMM = 0x080, | 32 | JIMM = 0x080, |
33 | FUNC = 0x100, | 33 | FUNC = 0x100, |
34 | SET = 0x200 | 34 | SET = 0x200, |
35 | SCIMM = 0x400 | ||
35 | }; | 36 | }; |
36 | 37 | ||
37 | #define OP_MASK 0x3f | 38 | #define OP_MASK 0x3f |
@@ -52,6 +53,8 @@ enum fields { | |||
52 | #define FUNC_SH 0 | 53 | #define FUNC_SH 0 |
53 | #define SET_MASK 0x7 | 54 | #define SET_MASK 0x7 |
54 | #define SET_SH 0 | 55 | #define SET_SH 0 |
56 | #define SCIMM_MASK 0xfffff | ||
57 | #define SCIMM_SH 6 | ||
55 | 58 | ||
56 | enum opcode { | 59 | enum opcode { |
57 | insn_invalid, | 60 | insn_invalid, |
@@ -61,10 +64,10 @@ enum opcode { | |||
61 | insn_dmtc0, insn_dsll, insn_dsll32, insn_dsra, insn_dsrl, | 64 | insn_dmtc0, insn_dsll, insn_dsll32, insn_dsra, insn_dsrl, |
62 | insn_dsrl32, insn_drotr, insn_dsubu, insn_eret, insn_j, insn_jal, | 65 | insn_dsrl32, insn_drotr, insn_dsubu, insn_eret, insn_j, insn_jal, |
63 | insn_jr, insn_ld, insn_ll, insn_lld, insn_lui, insn_lw, insn_mfc0, | 66 | insn_jr, insn_ld, insn_ll, insn_lld, insn_lui, insn_lw, insn_mfc0, |
64 | insn_mtc0, insn_ori, insn_pref, insn_rfe, insn_sc, insn_scd, | 67 | insn_mtc0, insn_or, insn_ori, insn_pref, insn_rfe, insn_sc, insn_scd, |
65 | insn_sd, insn_sll, insn_sra, insn_srl, insn_rotr, insn_subu, insn_sw, | 68 | insn_sd, insn_sll, insn_sra, insn_srl, insn_rotr, insn_subu, insn_sw, |
66 | insn_tlbp, insn_tlbr, insn_tlbwi, insn_tlbwr, insn_xor, insn_xori, | 69 | insn_tlbp, insn_tlbr, insn_tlbwi, insn_tlbwr, insn_xor, insn_xori, |
67 | insn_dins | 70 | insn_dins, insn_syscall |
68 | }; | 71 | }; |
69 | 72 | ||
70 | struct insn { | 73 | struct insn { |
@@ -117,6 +120,7 @@ static struct insn insn_table[] __cpuinitdata = { | |||
117 | { insn_lw, M(lw_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, | 120 | { insn_lw, M(lw_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, |
118 | { insn_mfc0, M(cop0_op, mfc_op, 0, 0, 0, 0), RT | RD | SET}, | 121 | { insn_mfc0, M(cop0_op, mfc_op, 0, 0, 0, 0), RT | RD | SET}, |
119 | { insn_mtc0, M(cop0_op, mtc_op, 0, 0, 0, 0), RT | RD | SET}, | 122 | { insn_mtc0, M(cop0_op, mtc_op, 0, 0, 0, 0), RT | RD | SET}, |
123 | { insn_or, M(spec_op, 0, 0, 0, 0, or_op), RS | RT | RD }, | ||
120 | { insn_ori, M(ori_op, 0, 0, 0, 0, 0), RS | RT | UIMM }, | 124 | { insn_ori, M(ori_op, 0, 0, 0, 0, 0), RS | RT | UIMM }, |
121 | { insn_pref, M(pref_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, | 125 | { insn_pref, M(pref_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, |
122 | { insn_rfe, M(cop0_op, cop_op, 0, 0, 0, rfe_op), 0 }, | 126 | { insn_rfe, M(cop0_op, cop_op, 0, 0, 0, rfe_op), 0 }, |
@@ -136,6 +140,7 @@ static struct insn insn_table[] __cpuinitdata = { | |||
136 | { insn_xor, M(spec_op, 0, 0, 0, 0, xor_op), RS | RT | RD }, | 140 | { insn_xor, M(spec_op, 0, 0, 0, 0, xor_op), RS | RT | RD }, |
137 | { insn_xori, M(xori_op, 0, 0, 0, 0, 0), RS | RT | UIMM }, | 141 | { insn_xori, M(xori_op, 0, 0, 0, 0, 0), RS | RT | UIMM }, |
138 | { insn_dins, M(spec3_op, 0, 0, 0, 0, dins_op), RS | RT | RD | RE }, | 142 | { insn_dins, M(spec3_op, 0, 0, 0, 0, dins_op), RS | RT | RD | RE }, |
143 | { insn_syscall, M(spec_op, 0, 0, 0, 0, syscall_op), SCIMM}, | ||
139 | { insn_invalid, 0, 0 } | 144 | { insn_invalid, 0, 0 } |
140 | }; | 145 | }; |
141 | 146 | ||
@@ -208,6 +213,14 @@ static inline __cpuinit u32 build_jimm(u32 arg) | |||
208 | return (arg >> 2) & JIMM_MASK; | 213 | return (arg >> 2) & JIMM_MASK; |
209 | } | 214 | } |
210 | 215 | ||
216 | static inline __cpuinit u32 build_scimm(u32 arg) | ||
217 | { | ||
218 | if (arg & ~SCIMM_MASK) | ||
219 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | ||
220 | |||
221 | return (arg & SCIMM_MASK) << SCIMM_SH; | ||
222 | } | ||
223 | |||
211 | static inline __cpuinit u32 build_func(u32 arg) | 224 | static inline __cpuinit u32 build_func(u32 arg) |
212 | { | 225 | { |
213 | if (arg & ~FUNC_MASK) | 226 | if (arg & ~FUNC_MASK) |
@@ -266,6 +279,8 @@ static void __cpuinit build_insn(u32 **buf, enum opcode opc, ...) | |||
266 | op |= build_func(va_arg(ap, u32)); | 279 | op |= build_func(va_arg(ap, u32)); |
267 | if (ip->fields & SET) | 280 | if (ip->fields & SET) |
268 | op |= build_set(va_arg(ap, u32)); | 281 | op |= build_set(va_arg(ap, u32)); |
282 | if (ip->fields & SCIMM) | ||
283 | op |= build_scimm(va_arg(ap, u32)); | ||
269 | va_end(ap); | 284 | va_end(ap); |
270 | 285 | ||
271 | **buf = op; | 286 | **buf = op; |
@@ -373,6 +388,7 @@ I_u2s3u1(_lw) | |||
373 | I_u1u2u3(_mfc0) | 388 | I_u1u2u3(_mfc0) |
374 | I_u1u2u3(_mtc0) | 389 | I_u1u2u3(_mtc0) |
375 | I_u2u1u3(_ori) | 390 | I_u2u1u3(_ori) |
391 | I_u3u1u2(_or) | ||
376 | I_u2s3u1(_pref) | 392 | I_u2s3u1(_pref) |
377 | I_0(_rfe) | 393 | I_0(_rfe) |
378 | I_u2s3u1(_sc) | 394 | I_u2s3u1(_sc) |
@@ -391,6 +407,7 @@ I_0(_tlbwr) | |||
391 | I_u3u1u2(_xor) | 407 | I_u3u1u2(_xor) |
392 | I_u2u1u3(_xori) | 408 | I_u2u1u3(_xori) |
393 | I_u2u1msbu3(_dins); | 409 | I_u2u1msbu3(_dins); |
410 | I_u1(_syscall); | ||
394 | 411 | ||
395 | /* Handle labels. */ | 412 | /* Handle labels. */ |
396 | void __cpuinit uasm_build_label(struct uasm_label **lab, u32 *addr, int lid) | 413 | void __cpuinit uasm_build_label(struct uasm_label **lab, u32 *addr, int lid) |
diff --git a/arch/mips/pci/ops-loongson2.c b/arch/mips/pci/ops-loongson2.c index 2bb4057bf6c7..d657ee0bc131 100644 --- a/arch/mips/pci/ops-loongson2.c +++ b/arch/mips/pci/ops-loongson2.c | |||
@@ -180,15 +180,21 @@ struct pci_ops loongson_pci_ops = { | |||
180 | }; | 180 | }; |
181 | 181 | ||
182 | #ifdef CONFIG_CS5536 | 182 | #ifdef CONFIG_CS5536 |
183 | DEFINE_RAW_SPINLOCK(msr_lock); | ||
184 | |||
183 | void _rdmsr(u32 msr, u32 *hi, u32 *lo) | 185 | void _rdmsr(u32 msr, u32 *hi, u32 *lo) |
184 | { | 186 | { |
185 | struct pci_bus bus = { | 187 | struct pci_bus bus = { |
186 | .number = PCI_BUS_CS5536 | 188 | .number = PCI_BUS_CS5536 |
187 | }; | 189 | }; |
188 | u32 devfn = PCI_DEVFN(PCI_IDSEL_CS5536, 0); | 190 | u32 devfn = PCI_DEVFN(PCI_IDSEL_CS5536, 0); |
191 | unsigned long flags; | ||
192 | |||
193 | raw_spin_lock_irqsave(&msr_lock, flags); | ||
189 | loongson_pcibios_write(&bus, devfn, PCI_MSR_ADDR, 4, msr); | 194 | loongson_pcibios_write(&bus, devfn, PCI_MSR_ADDR, 4, msr); |
190 | loongson_pcibios_read(&bus, devfn, PCI_MSR_DATA_LO, 4, lo); | 195 | loongson_pcibios_read(&bus, devfn, PCI_MSR_DATA_LO, 4, lo); |
191 | loongson_pcibios_read(&bus, devfn, PCI_MSR_DATA_HI, 4, hi); | 196 | loongson_pcibios_read(&bus, devfn, PCI_MSR_DATA_HI, 4, hi); |
197 | raw_spin_unlock_irqrestore(&msr_lock, flags); | ||
192 | } | 198 | } |
193 | EXPORT_SYMBOL(_rdmsr); | 199 | EXPORT_SYMBOL(_rdmsr); |
194 | 200 | ||
@@ -198,9 +204,13 @@ void _wrmsr(u32 msr, u32 hi, u32 lo) | |||
198 | .number = PCI_BUS_CS5536 | 204 | .number = PCI_BUS_CS5536 |
199 | }; | 205 | }; |
200 | u32 devfn = PCI_DEVFN(PCI_IDSEL_CS5536, 0); | 206 | u32 devfn = PCI_DEVFN(PCI_IDSEL_CS5536, 0); |
207 | unsigned long flags; | ||
208 | |||
209 | raw_spin_lock_irqsave(&msr_lock, flags); | ||
201 | loongson_pcibios_write(&bus, devfn, PCI_MSR_ADDR, 4, msr); | 210 | loongson_pcibios_write(&bus, devfn, PCI_MSR_ADDR, 4, msr); |
202 | loongson_pcibios_write(&bus, devfn, PCI_MSR_DATA_LO, 4, lo); | 211 | loongson_pcibios_write(&bus, devfn, PCI_MSR_DATA_LO, 4, lo); |
203 | loongson_pcibios_write(&bus, devfn, PCI_MSR_DATA_HI, 4, hi); | 212 | loongson_pcibios_write(&bus, devfn, PCI_MSR_DATA_HI, 4, hi); |
213 | raw_spin_unlock_irqrestore(&msr_lock, flags); | ||
204 | } | 214 | } |
205 | EXPORT_SYMBOL(_wrmsr); | 215 | EXPORT_SYMBOL(_wrmsr); |
206 | #endif | 216 | #endif |
diff --git a/arch/mips/sibyte/sb1250/setup.c b/arch/mips/sibyte/sb1250/setup.c index 0444da1e23c2..92da3155ce07 100644 --- a/arch/mips/sibyte/sb1250/setup.c +++ b/arch/mips/sibyte/sb1250/setup.c | |||
@@ -87,6 +87,21 @@ static int __init setup_bcm1250(void) | |||
87 | return ret; | 87 | return ret; |
88 | } | 88 | } |
89 | 89 | ||
90 | int sb1250_m3_workaround_needed(void) | ||
91 | { | ||
92 | switch (soc_type) { | ||
93 | case K_SYS_SOC_TYPE_BCM1250: | ||
94 | case K_SYS_SOC_TYPE_BCM1250_ALT: | ||
95 | case K_SYS_SOC_TYPE_BCM1250_ALT2: | ||
96 | case K_SYS_SOC_TYPE_BCM1125: | ||
97 | case K_SYS_SOC_TYPE_BCM1125H: | ||
98 | return soc_pass < K_SYS_REVISION_BCM1250_C0; | ||
99 | |||
100 | default: | ||
101 | return 0; | ||
102 | } | ||
103 | } | ||
104 | |||
90 | static int __init setup_bcm112x(void) | 105 | static int __init setup_bcm112x(void) |
91 | { | 106 | { |
92 | int ret = 0; | 107 | int ret = 0; |
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index 25da07fd9f77..604af29b71ed 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c | |||
@@ -1004,7 +1004,8 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, | |||
1004 | struct kvm_vcpu *vcpu; | 1004 | struct kvm_vcpu *vcpu; |
1005 | ulong ga, ga_end; | 1005 | ulong ga, ga_end; |
1006 | int is_dirty = 0; | 1006 | int is_dirty = 0; |
1007 | int r, n; | 1007 | int r; |
1008 | unsigned long n; | ||
1008 | 1009 | ||
1009 | mutex_lock(&kvm->slots_lock); | 1010 | mutex_lock(&kvm->slots_lock); |
1010 | 1011 | ||
@@ -1022,7 +1023,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, | |||
1022 | kvm_for_each_vcpu(n, vcpu, kvm) | 1023 | kvm_for_each_vcpu(n, vcpu, kvm) |
1023 | kvmppc_mmu_pte_pflush(vcpu, ga, ga_end); | 1024 | kvmppc_mmu_pte_pflush(vcpu, ga, ga_end); |
1024 | 1025 | ||
1025 | n = ALIGN(memslot->npages, BITS_PER_LONG) / 8; | 1026 | n = kvm_dirty_bitmap_bytes(memslot); |
1026 | memset(memslot->dirty_bitmap, 0, n); | 1027 | memset(memslot->dirty_bitmap, 0, n); |
1027 | } | 1028 | } |
1028 | 1029 | ||
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index 7ae71cc56973..bcd6884985ad 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.33-rc2 | 3 | # Linux kernel version: 2.6.34-rc3 |
4 | # Mon Jan 4 09:03:07 2010 | 4 | # Fri Apr 9 09:57:10 2010 |
5 | # | 5 | # |
6 | CONFIG_SCHED_MC=y | 6 | CONFIG_SCHED_MC=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -17,6 +17,7 @@ CONFIG_GENERIC_TIME=y | |||
17 | CONFIG_GENERIC_TIME_VSYSCALL=y | 17 | CONFIG_GENERIC_TIME_VSYSCALL=y |
18 | CONFIG_GENERIC_CLOCKEVENTS=y | 18 | CONFIG_GENERIC_CLOCKEVENTS=y |
19 | CONFIG_GENERIC_BUG=y | 19 | CONFIG_GENERIC_BUG=y |
20 | CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y | ||
20 | CONFIG_NO_IOMEM=y | 21 | CONFIG_NO_IOMEM=y |
21 | CONFIG_NO_DMA=y | 22 | CONFIG_NO_DMA=y |
22 | CONFIG_GENERIC_LOCKBREAK=y | 23 | CONFIG_GENERIC_LOCKBREAK=y |
@@ -62,15 +63,11 @@ CONFIG_TREE_RCU=y | |||
62 | # CONFIG_RCU_TRACE is not set | 63 | # CONFIG_RCU_TRACE is not set |
63 | CONFIG_RCU_FANOUT=64 | 64 | CONFIG_RCU_FANOUT=64 |
64 | # CONFIG_RCU_FANOUT_EXACT is not set | 65 | # CONFIG_RCU_FANOUT_EXACT is not set |
66 | # CONFIG_RCU_FAST_NO_HZ is not set | ||
65 | # CONFIG_TREE_RCU_TRACE is not set | 67 | # CONFIG_TREE_RCU_TRACE is not set |
66 | CONFIG_IKCONFIG=y | 68 | CONFIG_IKCONFIG=y |
67 | CONFIG_IKCONFIG_PROC=y | 69 | CONFIG_IKCONFIG_PROC=y |
68 | CONFIG_LOG_BUF_SHIFT=17 | 70 | CONFIG_LOG_BUF_SHIFT=17 |
69 | CONFIG_GROUP_SCHED=y | ||
70 | CONFIG_FAIR_GROUP_SCHED=y | ||
71 | # CONFIG_RT_GROUP_SCHED is not set | ||
72 | CONFIG_USER_SCHED=y | ||
73 | # CONFIG_CGROUP_SCHED is not set | ||
74 | CONFIG_CGROUPS=y | 71 | CONFIG_CGROUPS=y |
75 | # CONFIG_CGROUP_DEBUG is not set | 72 | # CONFIG_CGROUP_DEBUG is not set |
76 | CONFIG_CGROUP_NS=y | 73 | CONFIG_CGROUP_NS=y |
@@ -79,6 +76,7 @@ CONFIG_CGROUP_NS=y | |||
79 | # CONFIG_CPUSETS is not set | 76 | # CONFIG_CPUSETS is not set |
80 | # CONFIG_CGROUP_CPUACCT is not set | 77 | # CONFIG_CGROUP_CPUACCT is not set |
81 | # CONFIG_RESOURCE_COUNTERS is not set | 78 | # CONFIG_RESOURCE_COUNTERS is not set |
79 | # CONFIG_CGROUP_SCHED is not set | ||
82 | CONFIG_SYSFS_DEPRECATED=y | 80 | CONFIG_SYSFS_DEPRECATED=y |
83 | CONFIG_SYSFS_DEPRECATED_V2=y | 81 | CONFIG_SYSFS_DEPRECATED_V2=y |
84 | # CONFIG_RELAY is not set | 82 | # CONFIG_RELAY is not set |
@@ -93,6 +91,7 @@ CONFIG_INITRAMFS_SOURCE="" | |||
93 | CONFIG_RD_GZIP=y | 91 | CONFIG_RD_GZIP=y |
94 | CONFIG_RD_BZIP2=y | 92 | CONFIG_RD_BZIP2=y |
95 | CONFIG_RD_LZMA=y | 93 | CONFIG_RD_LZMA=y |
94 | CONFIG_RD_LZO=y | ||
96 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 95 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
97 | CONFIG_SYSCTL=y | 96 | CONFIG_SYSCTL=y |
98 | CONFIG_ANON_INODES=y | 97 | CONFIG_ANON_INODES=y |
@@ -126,6 +125,7 @@ CONFIG_SLAB=y | |||
126 | # CONFIG_SLUB is not set | 125 | # CONFIG_SLUB is not set |
127 | # CONFIG_SLOB is not set | 126 | # CONFIG_SLOB is not set |
128 | # CONFIG_PROFILING is not set | 127 | # CONFIG_PROFILING is not set |
128 | CONFIG_TRACEPOINTS=y | ||
129 | CONFIG_HAVE_OPROFILE=y | 129 | CONFIG_HAVE_OPROFILE=y |
130 | CONFIG_KPROBES=y | 130 | CONFIG_KPROBES=y |
131 | CONFIG_HAVE_SYSCALL_WRAPPERS=y | 131 | CONFIG_HAVE_SYSCALL_WRAPPERS=y |
@@ -134,6 +134,7 @@ CONFIG_HAVE_KPROBES=y | |||
134 | CONFIG_HAVE_KRETPROBES=y | 134 | CONFIG_HAVE_KRETPROBES=y |
135 | CONFIG_HAVE_ARCH_TRACEHOOK=y | 135 | CONFIG_HAVE_ARCH_TRACEHOOK=y |
136 | CONFIG_USE_GENERIC_SMP_HELPERS=y | 136 | CONFIG_USE_GENERIC_SMP_HELPERS=y |
137 | CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y | ||
137 | CONFIG_HAVE_DEFAULT_NO_SPIN_MUTEXES=y | 138 | CONFIG_HAVE_DEFAULT_NO_SPIN_MUTEXES=y |
138 | 139 | ||
139 | # | 140 | # |
@@ -246,6 +247,7 @@ CONFIG_64BIT=y | |||
246 | CONFIG_SMP=y | 247 | CONFIG_SMP=y |
247 | CONFIG_NR_CPUS=32 | 248 | CONFIG_NR_CPUS=32 |
248 | CONFIG_HOTPLUG_CPU=y | 249 | CONFIG_HOTPLUG_CPU=y |
250 | # CONFIG_SCHED_BOOK is not set | ||
249 | CONFIG_COMPAT=y | 251 | CONFIG_COMPAT=y |
250 | CONFIG_SYSVIPC_COMPAT=y | 252 | CONFIG_SYSVIPC_COMPAT=y |
251 | CONFIG_AUDIT_ARCH=y | 253 | CONFIG_AUDIT_ARCH=y |
@@ -345,13 +347,13 @@ CONFIG_PM_SLEEP=y | |||
345 | CONFIG_HIBERNATION=y | 347 | CONFIG_HIBERNATION=y |
346 | CONFIG_PM_STD_PARTITION="" | 348 | CONFIG_PM_STD_PARTITION="" |
347 | # CONFIG_PM_RUNTIME is not set | 349 | # CONFIG_PM_RUNTIME is not set |
350 | CONFIG_PM_OPS=y | ||
348 | CONFIG_NET=y | 351 | CONFIG_NET=y |
349 | 352 | ||
350 | # | 353 | # |
351 | # Networking options | 354 | # Networking options |
352 | # | 355 | # |
353 | CONFIG_PACKET=y | 356 | CONFIG_PACKET=y |
354 | # CONFIG_PACKET_MMAP is not set | ||
355 | CONFIG_UNIX=y | 357 | CONFIG_UNIX=y |
356 | CONFIG_XFRM=y | 358 | CONFIG_XFRM=y |
357 | # CONFIG_XFRM_USER is not set | 359 | # CONFIG_XFRM_USER is not set |
@@ -529,6 +531,7 @@ CONFIG_NET_SCH_FIFO=y | |||
529 | # | 531 | # |
530 | # CONFIG_NET_PKTGEN is not set | 532 | # CONFIG_NET_PKTGEN is not set |
531 | # CONFIG_NET_TCPPROBE is not set | 533 | # CONFIG_NET_TCPPROBE is not set |
534 | # CONFIG_NET_DROP_MONITOR is not set | ||
532 | CONFIG_CAN=m | 535 | CONFIG_CAN=m |
533 | CONFIG_CAN_RAW=m | 536 | CONFIG_CAN_RAW=m |
534 | CONFIG_CAN_BCM=m | 537 | CONFIG_CAN_BCM=m |
@@ -605,6 +608,7 @@ CONFIG_MISC_DEVICES=y | |||
605 | # | 608 | # |
606 | # SCSI device support | 609 | # SCSI device support |
607 | # | 610 | # |
611 | CONFIG_SCSI_MOD=y | ||
608 | # CONFIG_RAID_ATTRS is not set | 612 | # CONFIG_RAID_ATTRS is not set |
609 | CONFIG_SCSI=y | 613 | CONFIG_SCSI=y |
610 | # CONFIG_SCSI_DMA is not set | 614 | # CONFIG_SCSI_DMA is not set |
@@ -863,6 +867,7 @@ CONFIG_MISC_FILESYSTEMS=y | |||
863 | # CONFIG_BEFS_FS is not set | 867 | # CONFIG_BEFS_FS is not set |
864 | # CONFIG_BFS_FS is not set | 868 | # CONFIG_BFS_FS is not set |
865 | # CONFIG_EFS_FS is not set | 869 | # CONFIG_EFS_FS is not set |
870 | # CONFIG_LOGFS is not set | ||
866 | # CONFIG_CRAMFS is not set | 871 | # CONFIG_CRAMFS is not set |
867 | # CONFIG_SQUASHFS is not set | 872 | # CONFIG_SQUASHFS is not set |
868 | # CONFIG_VXFS_FS is not set | 873 | # CONFIG_VXFS_FS is not set |
@@ -891,6 +896,7 @@ CONFIG_SUNRPC=y | |||
891 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 896 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
892 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 897 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
893 | # CONFIG_SMB_FS is not set | 898 | # CONFIG_SMB_FS is not set |
899 | # CONFIG_CEPH_FS is not set | ||
894 | # CONFIG_CIFS is not set | 900 | # CONFIG_CIFS is not set |
895 | # CONFIG_NCP_FS is not set | 901 | # CONFIG_NCP_FS is not set |
896 | # CONFIG_CODA_FS is not set | 902 | # CONFIG_CODA_FS is not set |
@@ -952,6 +958,7 @@ CONFIG_DEBUG_MUTEXES=y | |||
952 | # CONFIG_LOCK_STAT is not set | 958 | # CONFIG_LOCK_STAT is not set |
953 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | 959 | CONFIG_DEBUG_SPINLOCK_SLEEP=y |
954 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 960 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
961 | CONFIG_STACKTRACE=y | ||
955 | # CONFIG_DEBUG_KOBJECT is not set | 962 | # CONFIG_DEBUG_KOBJECT is not set |
956 | CONFIG_DEBUG_BUGVERBOSE=y | 963 | CONFIG_DEBUG_BUGVERBOSE=y |
957 | # CONFIG_DEBUG_INFO is not set | 964 | # CONFIG_DEBUG_INFO is not set |
@@ -973,12 +980,17 @@ CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y | |||
973 | # CONFIG_LATENCYTOP is not set | 980 | # CONFIG_LATENCYTOP is not set |
974 | CONFIG_SYSCTL_SYSCALL_CHECK=y | 981 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
975 | # CONFIG_DEBUG_PAGEALLOC is not set | 982 | # CONFIG_DEBUG_PAGEALLOC is not set |
983 | CONFIG_NOP_TRACER=y | ||
976 | CONFIG_HAVE_FUNCTION_TRACER=y | 984 | CONFIG_HAVE_FUNCTION_TRACER=y |
977 | CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y | 985 | CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y |
978 | CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y | 986 | CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y |
979 | CONFIG_HAVE_DYNAMIC_FTRACE=y | 987 | CONFIG_HAVE_DYNAMIC_FTRACE=y |
980 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | 988 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y |
981 | CONFIG_HAVE_SYSCALL_TRACEPOINTS=y | 989 | CONFIG_HAVE_SYSCALL_TRACEPOINTS=y |
990 | CONFIG_RING_BUFFER=y | ||
991 | CONFIG_EVENT_TRACING=y | ||
992 | CONFIG_CONTEXT_SWITCH_TRACER=y | ||
993 | CONFIG_TRACING=y | ||
982 | CONFIG_TRACING_SUPPORT=y | 994 | CONFIG_TRACING_SUPPORT=y |
983 | CONFIG_FTRACE=y | 995 | CONFIG_FTRACE=y |
984 | # CONFIG_FUNCTION_TRACER is not set | 996 | # CONFIG_FUNCTION_TRACER is not set |
@@ -995,10 +1007,15 @@ CONFIG_BRANCH_PROFILE_NONE=y | |||
995 | # CONFIG_KMEMTRACE is not set | 1007 | # CONFIG_KMEMTRACE is not set |
996 | # CONFIG_WORKQUEUE_TRACER is not set | 1008 | # CONFIG_WORKQUEUE_TRACER is not set |
997 | # CONFIG_BLK_DEV_IO_TRACE is not set | 1009 | # CONFIG_BLK_DEV_IO_TRACE is not set |
1010 | CONFIG_KPROBE_EVENT=y | ||
1011 | # CONFIG_RING_BUFFER_BENCHMARK is not set | ||
998 | # CONFIG_DYNAMIC_DEBUG is not set | 1012 | # CONFIG_DYNAMIC_DEBUG is not set |
999 | CONFIG_SAMPLES=y | 1013 | CONFIG_SAMPLES=y |
1014 | # CONFIG_SAMPLE_TRACEPOINTS is not set | ||
1015 | # CONFIG_SAMPLE_TRACE_EVENTS is not set | ||
1000 | # CONFIG_SAMPLE_KOBJECT is not set | 1016 | # CONFIG_SAMPLE_KOBJECT is not set |
1001 | # CONFIG_SAMPLE_KPROBES is not set | 1017 | # CONFIG_SAMPLE_KPROBES is not set |
1018 | # CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set | ||
1002 | 1019 | ||
1003 | # | 1020 | # |
1004 | # Security options | 1021 | # Security options |
@@ -1032,6 +1049,7 @@ CONFIG_CRYPTO_MANAGER=y | |||
1032 | CONFIG_CRYPTO_MANAGER2=y | 1049 | CONFIG_CRYPTO_MANAGER2=y |
1033 | CONFIG_CRYPTO_GF128MUL=m | 1050 | CONFIG_CRYPTO_GF128MUL=m |
1034 | # CONFIG_CRYPTO_NULL is not set | 1051 | # CONFIG_CRYPTO_NULL is not set |
1052 | # CONFIG_CRYPTO_PCRYPT is not set | ||
1035 | CONFIG_CRYPTO_WORKQUEUE=y | 1053 | CONFIG_CRYPTO_WORKQUEUE=y |
1036 | # CONFIG_CRYPTO_CRYPTD is not set | 1054 | # CONFIG_CRYPTO_CRYPTD is not set |
1037 | CONFIG_CRYPTO_AUTHENC=m | 1055 | CONFIG_CRYPTO_AUTHENC=m |
@@ -1119,7 +1137,7 @@ CONFIG_CRYPTO_SHA512_S390=m | |||
1119 | # CONFIG_CRYPTO_DES_S390 is not set | 1137 | # CONFIG_CRYPTO_DES_S390 is not set |
1120 | # CONFIG_CRYPTO_AES_S390 is not set | 1138 | # CONFIG_CRYPTO_AES_S390 is not set |
1121 | CONFIG_S390_PRNG=m | 1139 | CONFIG_S390_PRNG=m |
1122 | # CONFIG_BINARY_PRINTF is not set | 1140 | CONFIG_BINARY_PRINTF=y |
1123 | 1141 | ||
1124 | # | 1142 | # |
1125 | # Library routines | 1143 | # Library routines |
@@ -1136,14 +1154,16 @@ CONFIG_LIBCRC32C=m | |||
1136 | CONFIG_ZLIB_INFLATE=y | 1154 | CONFIG_ZLIB_INFLATE=y |
1137 | CONFIG_ZLIB_DEFLATE=m | 1155 | CONFIG_ZLIB_DEFLATE=m |
1138 | CONFIG_LZO_COMPRESS=m | 1156 | CONFIG_LZO_COMPRESS=m |
1139 | CONFIG_LZO_DECOMPRESS=m | 1157 | CONFIG_LZO_DECOMPRESS=y |
1140 | CONFIG_DECOMPRESS_GZIP=y | 1158 | CONFIG_DECOMPRESS_GZIP=y |
1141 | CONFIG_DECOMPRESS_BZIP2=y | 1159 | CONFIG_DECOMPRESS_BZIP2=y |
1142 | CONFIG_DECOMPRESS_LZMA=y | 1160 | CONFIG_DECOMPRESS_LZMA=y |
1161 | CONFIG_DECOMPRESS_LZO=y | ||
1143 | CONFIG_NLATTR=y | 1162 | CONFIG_NLATTR=y |
1144 | CONFIG_HAVE_KVM=y | 1163 | CONFIG_HAVE_KVM=y |
1145 | CONFIG_VIRTUALIZATION=y | 1164 | CONFIG_VIRTUALIZATION=y |
1146 | CONFIG_KVM=m | 1165 | CONFIG_KVM=m |
1166 | # CONFIG_VHOST_NET is not set | ||
1147 | CONFIG_VIRTIO=y | 1167 | CONFIG_VIRTIO=y |
1148 | CONFIG_VIRTIO_RING=y | 1168 | CONFIG_VIRTIO_RING=y |
1149 | CONFIG_VIRTIO_BALLOON=m | 1169 | CONFIG_VIRTIO_BALLOON=m |
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 9b5b9189c15e..89a504c3f12e 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -105,7 +105,7 @@ extern char empty_zero_page[PAGE_SIZE]; | |||
105 | #ifndef __ASSEMBLY__ | 105 | #ifndef __ASSEMBLY__ |
106 | /* | 106 | /* |
107 | * The vmalloc area will always be on the topmost area of the kernel | 107 | * The vmalloc area will always be on the topmost area of the kernel |
108 | * mapping. We reserve 96MB (31bit) / 1GB (64bit) for vmalloc, | 108 | * mapping. We reserve 96MB (31bit) / 128GB (64bit) for vmalloc, |
109 | * which should be enough for any sane case. | 109 | * which should be enough for any sane case. |
110 | * By putting vmalloc at the top, we maximise the gap between physical | 110 | * By putting vmalloc at the top, we maximise the gap between physical |
111 | * memory and vmalloc to catch misplaced memory accesses. As a side | 111 | * memory and vmalloc to catch misplaced memory accesses. As a side |
@@ -120,8 +120,8 @@ extern unsigned long VMALLOC_START; | |||
120 | #define VMALLOC_END 0x7e000000UL | 120 | #define VMALLOC_END 0x7e000000UL |
121 | #define VMEM_MAP_END 0x80000000UL | 121 | #define VMEM_MAP_END 0x80000000UL |
122 | #else /* __s390x__ */ | 122 | #else /* __s390x__ */ |
123 | #define VMALLOC_SIZE (1UL << 30) | 123 | #define VMALLOC_SIZE (128UL << 30) |
124 | #define VMALLOC_END 0x3e040000000UL | 124 | #define VMALLOC_END 0x3e000000000UL |
125 | #define VMEM_MAP_END 0x40000000000UL | 125 | #define VMEM_MAP_END 0x40000000000UL |
126 | #endif /* __s390x__ */ | 126 | #endif /* __s390x__ */ |
127 | 127 | ||
diff --git a/arch/s390/include/asm/vdso.h b/arch/s390/include/asm/vdso.h index 4a76d9480cce..533f35751aeb 100644 --- a/arch/s390/include/asm/vdso.h +++ b/arch/s390/include/asm/vdso.h | |||
@@ -29,6 +29,7 @@ struct vdso_data { | |||
29 | __u32 tz_minuteswest; /* Minutes west of Greenwich 0x30 */ | 29 | __u32 tz_minuteswest; /* Minutes west of Greenwich 0x30 */ |
30 | __u32 tz_dsttime; /* Type of dst correction 0x34 */ | 30 | __u32 tz_dsttime; /* Type of dst correction 0x34 */ |
31 | __u32 ectg_available; | 31 | __u32 ectg_available; |
32 | __u32 ntp_mult; /* NTP adjusted multiplier 0x3C */ | ||
32 | }; | 33 | }; |
33 | 34 | ||
34 | struct vdso_per_cpu_data { | 35 | struct vdso_per_cpu_data { |
diff --git a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c index 08db736dded0..a09408952ed0 100644 --- a/arch/s390/kernel/asm-offsets.c +++ b/arch/s390/kernel/asm-offsets.c | |||
@@ -61,6 +61,7 @@ int main(void) | |||
61 | DEFINE(__VDSO_WTOM_NSEC, offsetof(struct vdso_data, wtom_clock_nsec)); | 61 | DEFINE(__VDSO_WTOM_NSEC, offsetof(struct vdso_data, wtom_clock_nsec)); |
62 | DEFINE(__VDSO_TIMEZONE, offsetof(struct vdso_data, tz_minuteswest)); | 62 | DEFINE(__VDSO_TIMEZONE, offsetof(struct vdso_data, tz_minuteswest)); |
63 | DEFINE(__VDSO_ECTG_OK, offsetof(struct vdso_data, ectg_available)); | 63 | DEFINE(__VDSO_ECTG_OK, offsetof(struct vdso_data, ectg_available)); |
64 | DEFINE(__VDSO_NTP_MULT, offsetof(struct vdso_data, ntp_mult)); | ||
64 | DEFINE(__VDSO_ECTG_BASE, offsetof(struct vdso_per_cpu_data, ectg_timer_base)); | 65 | DEFINE(__VDSO_ECTG_BASE, offsetof(struct vdso_per_cpu_data, ectg_timer_base)); |
65 | DEFINE(__VDSO_ECTG_USER, offsetof(struct vdso_per_cpu_data, ectg_user_time)); | 66 | DEFINE(__VDSO_ECTG_USER, offsetof(struct vdso_per_cpu_data, ectg_user_time)); |
66 | /* constants used by the vdso */ | 67 | /* constants used by the vdso */ |
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 31d618a443af..2d92c2cf92d7 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c | |||
@@ -82,7 +82,8 @@ asm( | |||
82 | " lm 6,15,24(15)\n" | 82 | " lm 6,15,24(15)\n" |
83 | #endif | 83 | #endif |
84 | " br 14\n" | 84 | " br 14\n" |
85 | " .size savesys_ipl_nss, .-savesys_ipl_nss\n"); | 85 | " .size savesys_ipl_nss, .-savesys_ipl_nss\n" |
86 | " .previous\n"); | ||
86 | 87 | ||
87 | static __initdata char upper_command_line[COMMAND_LINE_SIZE]; | 88 | static __initdata char upper_command_line[COMMAND_LINE_SIZE]; |
88 | 89 | ||
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 4348f9bc5393..6af7045280a8 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -964,7 +964,7 @@ cleanup_critical: | |||
964 | clc 4(4,%r12),BASED(cleanup_table_io_work_loop) | 964 | clc 4(4,%r12),BASED(cleanup_table_io_work_loop) |
965 | bl BASED(0f) | 965 | bl BASED(0f) |
966 | clc 4(4,%r12),BASED(cleanup_table_io_work_loop+4) | 966 | clc 4(4,%r12),BASED(cleanup_table_io_work_loop+4) |
967 | bl BASED(cleanup_io_return) | 967 | bl BASED(cleanup_io_work_loop) |
968 | 0: | 968 | 0: |
969 | br %r14 | 969 | br %r14 |
970 | 970 | ||
@@ -1039,6 +1039,12 @@ cleanup_sysc_leave_insn: | |||
1039 | 1039 | ||
1040 | cleanup_io_return: | 1040 | cleanup_io_return: |
1041 | mvc __LC_RETURN_PSW(4),0(%r12) | 1041 | mvc __LC_RETURN_PSW(4),0(%r12) |
1042 | mvc __LC_RETURN_PSW+4(4),BASED(cleanup_table_io_return) | ||
1043 | la %r12,__LC_RETURN_PSW | ||
1044 | br %r14 | ||
1045 | |||
1046 | cleanup_io_work_loop: | ||
1047 | mvc __LC_RETURN_PSW(4),0(%r12) | ||
1042 | mvc __LC_RETURN_PSW+4(4),BASED(cleanup_table_io_work_loop) | 1048 | mvc __LC_RETURN_PSW+4(4),BASED(cleanup_table_io_work_loop) |
1043 | la %r12,__LC_RETURN_PSW | 1049 | la %r12,__LC_RETURN_PSW |
1044 | br %r14 | 1050 | br %r14 |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 29fd0f1e6ec4..52106d53271c 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -946,7 +946,7 @@ cleanup_critical: | |||
946 | clc 8(8,%r12),BASED(cleanup_table_io_work_loop) | 946 | clc 8(8,%r12),BASED(cleanup_table_io_work_loop) |
947 | jl 0f | 947 | jl 0f |
948 | clc 8(8,%r12),BASED(cleanup_table_io_work_loop+8) | 948 | clc 8(8,%r12),BASED(cleanup_table_io_work_loop+8) |
949 | jl cleanup_io_return | 949 | jl cleanup_io_work_loop |
950 | 0: | 950 | 0: |
951 | br %r14 | 951 | br %r14 |
952 | 952 | ||
@@ -1021,6 +1021,12 @@ cleanup_sysc_leave_insn: | |||
1021 | 1021 | ||
1022 | cleanup_io_return: | 1022 | cleanup_io_return: |
1023 | mvc __LC_RETURN_PSW(8),0(%r12) | 1023 | mvc __LC_RETURN_PSW(8),0(%r12) |
1024 | mvc __LC_RETURN_PSW+8(8),BASED(cleanup_table_io_return) | ||
1025 | la %r12,__LC_RETURN_PSW | ||
1026 | br %r14 | ||
1027 | |||
1028 | cleanup_io_work_loop: | ||
1029 | mvc __LC_RETURN_PSW(8),0(%r12) | ||
1024 | mvc __LC_RETURN_PSW+8(8),BASED(cleanup_table_io_work_loop) | 1030 | mvc __LC_RETURN_PSW+8(8),BASED(cleanup_table_io_work_loop) |
1025 | la %r12,__LC_RETURN_PSW | 1031 | la %r12,__LC_RETURN_PSW |
1026 | br %r14 | 1032 | br %r14 |
diff --git a/arch/s390/kernel/swsusp_asm64.S b/arch/s390/kernel/swsusp_asm64.S index b354427e03b7..c56d3f56d020 100644 --- a/arch/s390/kernel/swsusp_asm64.S +++ b/arch/s390/kernel/swsusp_asm64.S | |||
@@ -256,6 +256,9 @@ restore_registers: | |||
256 | lghi %r2,0 | 256 | lghi %r2,0 |
257 | brasl %r14,arch_set_page_states | 257 | brasl %r14,arch_set_page_states |
258 | 258 | ||
259 | /* Reinitialize the channel subsystem */ | ||
260 | brasl %r14,channel_subsystem_reinit | ||
261 | |||
259 | /* Return 0 */ | 262 | /* Return 0 */ |
260 | lmg %r6,%r15,STACK_FRAME_OVERHEAD + __SF_GPRS(%r15) | 263 | lmg %r6,%r15,STACK_FRAME_OVERHEAD + __SF_GPRS(%r15) |
261 | lghi %r2,0 | 264 | lghi %r2,0 |
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index fba6dec156bf..d906bf19c14a 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -221,6 +221,7 @@ void update_vsyscall(struct timespec *wall_time, struct clocksource *clock, | |||
221 | vdso_data->xtime_clock_nsec = wall_time->tv_nsec; | 221 | vdso_data->xtime_clock_nsec = wall_time->tv_nsec; |
222 | vdso_data->wtom_clock_sec = wall_to_monotonic.tv_sec; | 222 | vdso_data->wtom_clock_sec = wall_to_monotonic.tv_sec; |
223 | vdso_data->wtom_clock_nsec = wall_to_monotonic.tv_nsec; | 223 | vdso_data->wtom_clock_nsec = wall_to_monotonic.tv_nsec; |
224 | vdso_data->ntp_mult = mult; | ||
224 | smp_wmb(); | 225 | smp_wmb(); |
225 | ++vdso_data->tb_update_count; | 226 | ++vdso_data->tb_update_count; |
226 | } | 227 | } |
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index 14ef6f05e432..247b4c2d1e51 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c | |||
@@ -165,10 +165,11 @@ static void tl_to_cores(struct tl_info *info) | |||
165 | default: | 165 | default: |
166 | clear_cores(); | 166 | clear_cores(); |
167 | machine_has_topology = 0; | 167 | machine_has_topology = 0; |
168 | return; | 168 | goto out; |
169 | } | 169 | } |
170 | tle = next_tle(tle); | 170 | tle = next_tle(tle); |
171 | } | 171 | } |
172 | out: | ||
172 | spin_unlock_irq(&topology_lock); | 173 | spin_unlock_irq(&topology_lock); |
173 | } | 174 | } |
174 | 175 | ||
diff --git a/arch/s390/kernel/vdso32/clock_gettime.S b/arch/s390/kernel/vdso32/clock_gettime.S index 4a98909a8310..969643954273 100644 --- a/arch/s390/kernel/vdso32/clock_gettime.S +++ b/arch/s390/kernel/vdso32/clock_gettime.S | |||
@@ -38,13 +38,13 @@ __kernel_clock_gettime: | |||
38 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) | 38 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) |
39 | brc 3,2f | 39 | brc 3,2f |
40 | ahi %r0,-1 | 40 | ahi %r0,-1 |
41 | 2: mhi %r0,1000 /* cyc2ns(clock,cycle_delta) */ | 41 | 2: ms %r0,__VDSO_NTP_MULT(%r5) /* cyc2ns(clock,cycle_delta) */ |
42 | lr %r2,%r0 | 42 | lr %r2,%r0 |
43 | lhi %r0,1000 | 43 | l %r0,__VDSO_NTP_MULT(%r5) |
44 | ltr %r1,%r1 | 44 | ltr %r1,%r1 |
45 | mr %r0,%r0 | 45 | mr %r0,%r0 |
46 | jnm 3f | 46 | jnm 3f |
47 | ahi %r0,1000 | 47 | a %r0,__VDSO_NTP_MULT(%r5) |
48 | 3: alr %r0,%r2 | 48 | 3: alr %r0,%r2 |
49 | srdl %r0,12 | 49 | srdl %r0,12 |
50 | al %r0,__VDSO_XTIME_NSEC(%r5) /* + xtime */ | 50 | al %r0,__VDSO_XTIME_NSEC(%r5) /* + xtime */ |
@@ -86,13 +86,13 @@ __kernel_clock_gettime: | |||
86 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) | 86 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) |
87 | brc 3,12f | 87 | brc 3,12f |
88 | ahi %r0,-1 | 88 | ahi %r0,-1 |
89 | 12: mhi %r0,1000 /* cyc2ns(clock,cycle_delta) */ | 89 | 12: ms %r0,__VDSO_NTP_MULT(%r5) /* cyc2ns(clock,cycle_delta) */ |
90 | lr %r2,%r0 | 90 | lr %r2,%r0 |
91 | lhi %r0,1000 | 91 | l %r0,__VDSO_NTP_MULT(%r5) |
92 | ltr %r1,%r1 | 92 | ltr %r1,%r1 |
93 | mr %r0,%r0 | 93 | mr %r0,%r0 |
94 | jnm 13f | 94 | jnm 13f |
95 | ahi %r0,1000 | 95 | a %r0,__VDSO_NTP_MULT(%r5) |
96 | 13: alr %r0,%r2 | 96 | 13: alr %r0,%r2 |
97 | srdl %r0,12 | 97 | srdl %r0,12 |
98 | al %r0,__VDSO_XTIME_NSEC(%r5) /* + xtime */ | 98 | al %r0,__VDSO_XTIME_NSEC(%r5) /* + xtime */ |
diff --git a/arch/s390/kernel/vdso32/gettimeofday.S b/arch/s390/kernel/vdso32/gettimeofday.S index ad8acfc949fb..2d3633175e3b 100644 --- a/arch/s390/kernel/vdso32/gettimeofday.S +++ b/arch/s390/kernel/vdso32/gettimeofday.S | |||
@@ -35,13 +35,13 @@ __kernel_gettimeofday: | |||
35 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) | 35 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) |
36 | brc 3,3f | 36 | brc 3,3f |
37 | ahi %r0,-1 | 37 | ahi %r0,-1 |
38 | 3: mhi %r0,1000 /* cyc2ns(clock,cycle_delta) */ | 38 | 3: ms %r0,__VDSO_NTP_MULT(%r5) /* cyc2ns(clock,cycle_delta) */ |
39 | st %r0,24(%r15) | 39 | st %r0,24(%r15) |
40 | lhi %r0,1000 | 40 | l %r0,__VDSO_NTP_MULT(%r5) |
41 | ltr %r1,%r1 | 41 | ltr %r1,%r1 |
42 | mr %r0,%r0 | 42 | mr %r0,%r0 |
43 | jnm 4f | 43 | jnm 4f |
44 | ahi %r0,1000 | 44 | a %r0,__VDSO_NTP_MULT(%r5) |
45 | 4: al %r0,24(%r15) | 45 | 4: al %r0,24(%r15) |
46 | srdl %r0,12 | 46 | srdl %r0,12 |
47 | al %r0,__VDSO_XTIME_NSEC(%r5) /* + xtime */ | 47 | al %r0,__VDSO_XTIME_NSEC(%r5) /* + xtime */ |
diff --git a/arch/s390/kernel/vdso64/clock_gettime.S b/arch/s390/kernel/vdso64/clock_gettime.S index 49106c6e6f88..f40467884a03 100644 --- a/arch/s390/kernel/vdso64/clock_gettime.S +++ b/arch/s390/kernel/vdso64/clock_gettime.S | |||
@@ -36,7 +36,7 @@ __kernel_clock_gettime: | |||
36 | stck 48(%r15) /* Store TOD clock */ | 36 | stck 48(%r15) /* Store TOD clock */ |
37 | lg %r1,48(%r15) | 37 | lg %r1,48(%r15) |
38 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 38 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
39 | mghi %r1,1000 | 39 | msgf %r1,__VDSO_NTP_MULT(%r5) /* * NTP adjustment */ |
40 | srlg %r1,%r1,12 /* cyc2ns(clock,cycle_delta) */ | 40 | srlg %r1,%r1,12 /* cyc2ns(clock,cycle_delta) */ |
41 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + xtime */ | 41 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + xtime */ |
42 | lg %r0,__VDSO_XTIME_SEC(%r5) | 42 | lg %r0,__VDSO_XTIME_SEC(%r5) |
@@ -64,7 +64,7 @@ __kernel_clock_gettime: | |||
64 | stck 48(%r15) /* Store TOD clock */ | 64 | stck 48(%r15) /* Store TOD clock */ |
65 | lg %r1,48(%r15) | 65 | lg %r1,48(%r15) |
66 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 66 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
67 | mghi %r1,1000 | 67 | msgf %r1,__VDSO_NTP_MULT(%r5) /* * NTP adjustment */ |
68 | srlg %r1,%r1,12 /* cyc2ns(clock,cycle_delta) */ | 68 | srlg %r1,%r1,12 /* cyc2ns(clock,cycle_delta) */ |
69 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + xtime */ | 69 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + xtime */ |
70 | lg %r0,__VDSO_XTIME_SEC(%r5) | 70 | lg %r0,__VDSO_XTIME_SEC(%r5) |
diff --git a/arch/s390/kernel/vdso64/gettimeofday.S b/arch/s390/kernel/vdso64/gettimeofday.S index f873e75634e1..36ee674722ec 100644 --- a/arch/s390/kernel/vdso64/gettimeofday.S +++ b/arch/s390/kernel/vdso64/gettimeofday.S | |||
@@ -31,7 +31,7 @@ __kernel_gettimeofday: | |||
31 | stck 48(%r15) /* Store TOD clock */ | 31 | stck 48(%r15) /* Store TOD clock */ |
32 | lg %r1,48(%r15) | 32 | lg %r1,48(%r15) |
33 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 33 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
34 | mghi %r1,1000 | 34 | msgf %r1,__VDSO_NTP_MULT(%r5) /* * NTP adjustment */ |
35 | srlg %r1,%r1,12 /* cyc2ns(clock,cycle_delta) */ | 35 | srlg %r1,%r1,12 /* cyc2ns(clock,cycle_delta) */ |
36 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + xtime.tv_nsec */ | 36 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + xtime.tv_nsec */ |
37 | lg %r0,__VDSO_XTIME_SEC(%r5) /* xtime.tv_sec */ | 37 | lg %r0,__VDSO_XTIME_SEC(%r5) /* xtime.tv_sec */ |
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c index 8ea3144b45b8..90165e7ca04e 100644 --- a/arch/s390/mm/vmem.c +++ b/arch/s390/mm/vmem.c | |||
@@ -71,12 +71,8 @@ static pte_t __ref *vmem_pte_alloc(void) | |||
71 | pte = alloc_bootmem(PTRS_PER_PTE * sizeof(pte_t)); | 71 | pte = alloc_bootmem(PTRS_PER_PTE * sizeof(pte_t)); |
72 | if (!pte) | 72 | if (!pte) |
73 | return NULL; | 73 | return NULL; |
74 | if (MACHINE_HAS_HPAGE) | 74 | clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY, |
75 | clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY | _PAGE_CO, | 75 | PTRS_PER_PTE * sizeof(pte_t)); |
76 | PTRS_PER_PTE * sizeof(pte_t)); | ||
77 | else | ||
78 | clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY, | ||
79 | PTRS_PER_PTE * sizeof(pte_t)); | ||
80 | return pte; | 76 | return pte; |
81 | } | 77 | } |
82 | 78 | ||
@@ -117,8 +113,7 @@ static int vmem_add_mem(unsigned long start, unsigned long size, int ro) | |||
117 | if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) && | 113 | if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) && |
118 | (address + HPAGE_SIZE <= start + size) && | 114 | (address + HPAGE_SIZE <= start + size) && |
119 | (address >= HPAGE_SIZE)) { | 115 | (address >= HPAGE_SIZE)) { |
120 | pte_val(pte) |= _SEGMENT_ENTRY_LARGE | | 116 | pte_val(pte) |= _SEGMENT_ENTRY_LARGE; |
121 | _SEGMENT_ENTRY_CO; | ||
122 | pmd_val(*pm_dir) = pte_val(pte); | 117 | pmd_val(*pm_dir) = pte_val(pte); |
123 | address += HPAGE_SIZE - PAGE_SIZE; | 118 | address += HPAGE_SIZE - PAGE_SIZE; |
124 | continue; | 119 | continue; |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 6db513674050..9908d477ccd9 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -37,6 +37,9 @@ config SPARC64 | |||
37 | def_bool 64BIT | 37 | def_bool 64BIT |
38 | select ARCH_SUPPORTS_MSI | 38 | select ARCH_SUPPORTS_MSI |
39 | select HAVE_FUNCTION_TRACER | 39 | select HAVE_FUNCTION_TRACER |
40 | select HAVE_FUNCTION_GRAPH_TRACER | ||
41 | select HAVE_FUNCTION_GRAPH_FP_TEST | ||
42 | select HAVE_FUNCTION_TRACE_MCOUNT_TEST | ||
40 | select HAVE_KRETPROBES | 43 | select HAVE_KRETPROBES |
41 | select HAVE_KPROBES | 44 | select HAVE_KPROBES |
42 | select HAVE_LMB | 45 | select HAVE_LMB |
diff --git a/arch/sparc/Kconfig.debug b/arch/sparc/Kconfig.debug index 9d3c889718ac..1b4a831565f9 100644 --- a/arch/sparc/Kconfig.debug +++ b/arch/sparc/Kconfig.debug | |||
@@ -19,13 +19,10 @@ config DEBUG_DCFLUSH | |||
19 | bool "D-cache flush debugging" | 19 | bool "D-cache flush debugging" |
20 | depends on SPARC64 && DEBUG_KERNEL | 20 | depends on SPARC64 && DEBUG_KERNEL |
21 | 21 | ||
22 | config STACK_DEBUG | ||
23 | bool "Stack Overflow Detection Support" | ||
24 | |||
25 | config MCOUNT | 22 | config MCOUNT |
26 | bool | 23 | bool |
27 | depends on SPARC64 | 24 | depends on SPARC64 |
28 | depends on STACK_DEBUG || FUNCTION_TRACER | 25 | depends on FUNCTION_TRACER |
29 | default y | 26 | default y |
30 | 27 | ||
31 | config FRAME_POINTER | 28 | config FRAME_POINTER |
diff --git a/arch/sparc/include/asm/cpudata_64.h b/arch/sparc/include/asm/cpudata_64.h index 926397d345ff..050ef35b9dcf 100644 --- a/arch/sparc/include/asm/cpudata_64.h +++ b/arch/sparc/include/asm/cpudata_64.h | |||
@@ -17,7 +17,7 @@ typedef struct { | |||
17 | unsigned int __nmi_count; | 17 | unsigned int __nmi_count; |
18 | unsigned long clock_tick; /* %tick's per second */ | 18 | unsigned long clock_tick; /* %tick's per second */ |
19 | unsigned long __pad; | 19 | unsigned long __pad; |
20 | unsigned int __pad1; | 20 | unsigned int irq0_irqs; |
21 | unsigned int __pad2; | 21 | unsigned int __pad2; |
22 | 22 | ||
23 | /* Dcache line 2, rarely used */ | 23 | /* Dcache line 2, rarely used */ |
diff --git a/arch/sparc/include/asm/irqflags_64.h b/arch/sparc/include/asm/irqflags_64.h index 8b49bf920df3..bfa1ea45b4cd 100644 --- a/arch/sparc/include/asm/irqflags_64.h +++ b/arch/sparc/include/asm/irqflags_64.h | |||
@@ -76,9 +76,26 @@ static inline int raw_irqs_disabled(void) | |||
76 | */ | 76 | */ |
77 | static inline unsigned long __raw_local_irq_save(void) | 77 | static inline unsigned long __raw_local_irq_save(void) |
78 | { | 78 | { |
79 | unsigned long flags = __raw_local_save_flags(); | 79 | unsigned long flags, tmp; |
80 | 80 | ||
81 | raw_local_irq_disable(); | 81 | /* Disable interrupts to PIL_NORMAL_MAX unless we already |
82 | * are using PIL_NMI, in which case PIL_NMI is retained. | ||
83 | * | ||
84 | * The only values we ever program into the %pil are 0, | ||
85 | * PIL_NORMAL_MAX and PIL_NMI. | ||
86 | * | ||
87 | * Since PIL_NMI is the largest %pil value and all bits are | ||
88 | * set in it (0xf), it doesn't matter what PIL_NORMAL_MAX | ||
89 | * actually is. | ||
90 | */ | ||
91 | __asm__ __volatile__( | ||
92 | "rdpr %%pil, %0\n\t" | ||
93 | "or %0, %2, %1\n\t" | ||
94 | "wrpr %1, 0x0, %%pil" | ||
95 | : "=r" (flags), "=r" (tmp) | ||
96 | : "i" (PIL_NORMAL_MAX) | ||
97 | : "memory" | ||
98 | ); | ||
82 | 99 | ||
83 | return flags; | 100 | return flags; |
84 | } | 101 | } |
diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h index 9e2d9447f2ad..4827a3aeac7f 100644 --- a/arch/sparc/include/asm/thread_info_64.h +++ b/arch/sparc/include/asm/thread_info_64.h | |||
@@ -111,7 +111,7 @@ struct thread_info { | |||
111 | #define THREAD_SHIFT PAGE_SHIFT | 111 | #define THREAD_SHIFT PAGE_SHIFT |
112 | #endif /* PAGE_SHIFT == 13 */ | 112 | #endif /* PAGE_SHIFT == 13 */ |
113 | 113 | ||
114 | #define PREEMPT_ACTIVE 0x4000000 | 114 | #define PREEMPT_ACTIVE 0x10000000 |
115 | 115 | ||
116 | /* | 116 | /* |
117 | * macros/functions for gaining access to the thread information structure | 117 | * macros/functions for gaining access to the thread information structure |
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile index c6316142db4e..0c2dc1f24a9a 100644 --- a/arch/sparc/kernel/Makefile +++ b/arch/sparc/kernel/Makefile | |||
@@ -13,6 +13,14 @@ extra-y += init_task.o | |||
13 | CPPFLAGS_vmlinux.lds := -Usparc -m$(BITS) | 13 | CPPFLAGS_vmlinux.lds := -Usparc -m$(BITS) |
14 | extra-y += vmlinux.lds | 14 | extra-y += vmlinux.lds |
15 | 15 | ||
16 | ifdef CONFIG_FUNCTION_TRACER | ||
17 | # Do not profile debug and lowlevel utilities | ||
18 | CFLAGS_REMOVE_ftrace.o := -pg | ||
19 | CFLAGS_REMOVE_time_$(BITS).o := -pg | ||
20 | CFLAGS_REMOVE_perf_event.o := -pg | ||
21 | CFLAGS_REMOVE_pcr.o := -pg | ||
22 | endif | ||
23 | |||
16 | obj-$(CONFIG_SPARC32) += entry.o wof.o wuf.o | 24 | obj-$(CONFIG_SPARC32) += entry.o wof.o wuf.o |
17 | obj-$(CONFIG_SPARC32) += etrap_32.o | 25 | obj-$(CONFIG_SPARC32) += etrap_32.o |
18 | obj-$(CONFIG_SPARC32) += rtrap_32.o | 26 | obj-$(CONFIG_SPARC32) += rtrap_32.o |
@@ -85,7 +93,7 @@ obj-$(CONFIG_KGDB) += kgdb_$(BITS).o | |||
85 | 93 | ||
86 | 94 | ||
87 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o | 95 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o |
88 | CFLAGS_REMOVE_ftrace.o := -pg | 96 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o |
89 | 97 | ||
90 | obj-$(CONFIG_EARLYFB) += btext.o | 98 | obj-$(CONFIG_EARLYFB) += btext.o |
91 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | 99 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
diff --git a/arch/sparc/kernel/ftrace.c b/arch/sparc/kernel/ftrace.c index 9103a56b39e8..03ab022e51c5 100644 --- a/arch/sparc/kernel/ftrace.c +++ b/arch/sparc/kernel/ftrace.c | |||
@@ -13,7 +13,7 @@ static const u32 ftrace_nop = 0x01000000; | |||
13 | 13 | ||
14 | static u32 ftrace_call_replace(unsigned long ip, unsigned long addr) | 14 | static u32 ftrace_call_replace(unsigned long ip, unsigned long addr) |
15 | { | 15 | { |
16 | static u32 call; | 16 | u32 call; |
17 | s32 off; | 17 | s32 off; |
18 | 18 | ||
19 | off = ((s32)addr - (s32)ip); | 19 | off = ((s32)addr - (s32)ip); |
@@ -91,3 +91,61 @@ int __init ftrace_dyn_arch_init(void *data) | |||
91 | return 0; | 91 | return 0; |
92 | } | 92 | } |
93 | #endif | 93 | #endif |
94 | |||
95 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | ||
96 | |||
97 | #ifdef CONFIG_DYNAMIC_FTRACE | ||
98 | extern void ftrace_graph_call(void); | ||
99 | |||
100 | int ftrace_enable_ftrace_graph_caller(void) | ||
101 | { | ||
102 | unsigned long ip = (unsigned long)(&ftrace_graph_call); | ||
103 | u32 old, new; | ||
104 | |||
105 | old = *(u32 *) &ftrace_graph_call; | ||
106 | new = ftrace_call_replace(ip, (unsigned long) &ftrace_graph_caller); | ||
107 | return ftrace_modify_code(ip, old, new); | ||
108 | } | ||
109 | |||
110 | int ftrace_disable_ftrace_graph_caller(void) | ||
111 | { | ||
112 | unsigned long ip = (unsigned long)(&ftrace_graph_call); | ||
113 | u32 old, new; | ||
114 | |||
115 | old = *(u32 *) &ftrace_graph_call; | ||
116 | new = ftrace_call_replace(ip, (unsigned long) &ftrace_stub); | ||
117 | |||
118 | return ftrace_modify_code(ip, old, new); | ||
119 | } | ||
120 | |||
121 | #endif /* !CONFIG_DYNAMIC_FTRACE */ | ||
122 | |||
123 | /* | ||
124 | * Hook the return address and push it in the stack of return addrs | ||
125 | * in current thread info. | ||
126 | */ | ||
127 | unsigned long prepare_ftrace_return(unsigned long parent, | ||
128 | unsigned long self_addr, | ||
129 | unsigned long frame_pointer) | ||
130 | { | ||
131 | unsigned long return_hooker = (unsigned long) &return_to_handler; | ||
132 | struct ftrace_graph_ent trace; | ||
133 | |||
134 | if (unlikely(atomic_read(¤t->tracing_graph_pause))) | ||
135 | return parent + 8UL; | ||
136 | |||
137 | if (ftrace_push_return_trace(parent, self_addr, &trace.depth, | ||
138 | frame_pointer) == -EBUSY) | ||
139 | return parent + 8UL; | ||
140 | |||
141 | trace.func = self_addr; | ||
142 | |||
143 | /* Only trace if the calling function expects to */ | ||
144 | if (!ftrace_graph_entry(&trace)) { | ||
145 | current->curr_ret_stack--; | ||
146 | return parent + 8UL; | ||
147 | } | ||
148 | |||
149 | return return_hooker; | ||
150 | } | ||
151 | #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ | ||
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index e1cbdb94d97b..830d70a3e20b 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c | |||
@@ -20,7 +20,9 @@ | |||
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/proc_fs.h> | 21 | #include <linux/proc_fs.h> |
22 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
23 | #include <linux/ftrace.h> | ||
23 | #include <linux/irq.h> | 24 | #include <linux/irq.h> |
25 | #include <linux/kmemleak.h> | ||
24 | 26 | ||
25 | #include <asm/ptrace.h> | 27 | #include <asm/ptrace.h> |
26 | #include <asm/processor.h> | 28 | #include <asm/processor.h> |
@@ -45,6 +47,7 @@ | |||
45 | 47 | ||
46 | #include "entry.h" | 48 | #include "entry.h" |
47 | #include "cpumap.h" | 49 | #include "cpumap.h" |
50 | #include "kstack.h" | ||
48 | 51 | ||
49 | #define NUM_IVECS (IMAP_INR + 1) | 52 | #define NUM_IVECS (IMAP_INR + 1) |
50 | 53 | ||
@@ -647,6 +650,14 @@ unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino) | |||
647 | bucket = kzalloc(sizeof(struct ino_bucket), GFP_ATOMIC); | 650 | bucket = kzalloc(sizeof(struct ino_bucket), GFP_ATOMIC); |
648 | if (unlikely(!bucket)) | 651 | if (unlikely(!bucket)) |
649 | return 0; | 652 | return 0; |
653 | |||
654 | /* The only reference we store to the IRQ bucket is | ||
655 | * by physical address which kmemleak can't see, tell | ||
656 | * it that this object explicitly is not a leak and | ||
657 | * should be scanned. | ||
658 | */ | ||
659 | kmemleak_not_leak(bucket); | ||
660 | |||
650 | __flush_dcache_range((unsigned long) bucket, | 661 | __flush_dcache_range((unsigned long) bucket, |
651 | ((unsigned long) bucket + | 662 | ((unsigned long) bucket + |
652 | sizeof(struct ino_bucket))); | 663 | sizeof(struct ino_bucket))); |
@@ -703,25 +714,7 @@ void ack_bad_irq(unsigned int virt_irq) | |||
703 | void *hardirq_stack[NR_CPUS]; | 714 | void *hardirq_stack[NR_CPUS]; |
704 | void *softirq_stack[NR_CPUS]; | 715 | void *softirq_stack[NR_CPUS]; |
705 | 716 | ||
706 | static __attribute__((always_inline)) void *set_hardirq_stack(void) | 717 | void __irq_entry handler_irq(int irq, struct pt_regs *regs) |
707 | { | ||
708 | void *orig_sp, *sp = hardirq_stack[smp_processor_id()]; | ||
709 | |||
710 | __asm__ __volatile__("mov %%sp, %0" : "=r" (orig_sp)); | ||
711 | if (orig_sp < sp || | ||
712 | orig_sp > (sp + THREAD_SIZE)) { | ||
713 | sp += THREAD_SIZE - 192 - STACK_BIAS; | ||
714 | __asm__ __volatile__("mov %0, %%sp" : : "r" (sp)); | ||
715 | } | ||
716 | |||
717 | return orig_sp; | ||
718 | } | ||
719 | static __attribute__((always_inline)) void restore_hardirq_stack(void *orig_sp) | ||
720 | { | ||
721 | __asm__ __volatile__("mov %0, %%sp" : : "r" (orig_sp)); | ||
722 | } | ||
723 | |||
724 | void handler_irq(int irq, struct pt_regs *regs) | ||
725 | { | 718 | { |
726 | unsigned long pstate, bucket_pa; | 719 | unsigned long pstate, bucket_pa; |
727 | struct pt_regs *old_regs; | 720 | struct pt_regs *old_regs; |
diff --git a/arch/sparc/kernel/kgdb_64.c b/arch/sparc/kernel/kgdb_64.c index f5a0fd490b59..0a2bd0f99fc1 100644 --- a/arch/sparc/kernel/kgdb_64.c +++ b/arch/sparc/kernel/kgdb_64.c | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | #include <linux/kgdb.h> | 6 | #include <linux/kgdb.h> |
7 | #include <linux/kdebug.h> | 7 | #include <linux/kdebug.h> |
8 | #include <linux/ftrace.h> | ||
8 | 9 | ||
9 | #include <asm/kdebug.h> | 10 | #include <asm/kdebug.h> |
10 | #include <asm/ptrace.h> | 11 | #include <asm/ptrace.h> |
@@ -108,7 +109,7 @@ void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) | |||
108 | } | 109 | } |
109 | 110 | ||
110 | #ifdef CONFIG_SMP | 111 | #ifdef CONFIG_SMP |
111 | void smp_kgdb_capture_client(int irq, struct pt_regs *regs) | 112 | void __irq_entry smp_kgdb_capture_client(int irq, struct pt_regs *regs) |
112 | { | 113 | { |
113 | unsigned long flags; | 114 | unsigned long flags; |
114 | 115 | ||
diff --git a/arch/sparc/kernel/kstack.h b/arch/sparc/kernel/kstack.h index 5247283d1c03..53dfb92e09fb 100644 --- a/arch/sparc/kernel/kstack.h +++ b/arch/sparc/kernel/kstack.h | |||
@@ -61,4 +61,23 @@ check_magic: | |||
61 | 61 | ||
62 | } | 62 | } |
63 | 63 | ||
64 | static inline __attribute__((always_inline)) void *set_hardirq_stack(void) | ||
65 | { | ||
66 | void *orig_sp, *sp = hardirq_stack[smp_processor_id()]; | ||
67 | |||
68 | __asm__ __volatile__("mov %%sp, %0" : "=r" (orig_sp)); | ||
69 | if (orig_sp < sp || | ||
70 | orig_sp > (sp + THREAD_SIZE)) { | ||
71 | sp += THREAD_SIZE - 192 - STACK_BIAS; | ||
72 | __asm__ __volatile__("mov %0, %%sp" : : "r" (sp)); | ||
73 | } | ||
74 | |||
75 | return orig_sp; | ||
76 | } | ||
77 | |||
78 | static inline __attribute__((always_inline)) void restore_hardirq_stack(void *orig_sp) | ||
79 | { | ||
80 | __asm__ __volatile__("mov %0, %%sp" : : "r" (orig_sp)); | ||
81 | } | ||
82 | |||
64 | #endif /* _KSTACK_H */ | 83 | #endif /* _KSTACK_H */ |
diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c index b287b62c7ea3..a4bd7ba74c89 100644 --- a/arch/sparc/kernel/nmi.c +++ b/arch/sparc/kernel/nmi.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <asm/ptrace.h> | 23 | #include <asm/ptrace.h> |
24 | #include <asm/pcr.h> | 24 | #include <asm/pcr.h> |
25 | 25 | ||
26 | #include "kstack.h" | ||
27 | |||
26 | /* We don't have a real NMI on sparc64, but we can fake one | 28 | /* We don't have a real NMI on sparc64, but we can fake one |
27 | * up using profiling counter overflow interrupts and interrupt | 29 | * up using profiling counter overflow interrupts and interrupt |
28 | * levels. | 30 | * levels. |
@@ -92,7 +94,7 @@ static void die_nmi(const char *str, struct pt_regs *regs, int do_panic) | |||
92 | notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs) | 94 | notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs) |
93 | { | 95 | { |
94 | unsigned int sum, touched = 0; | 96 | unsigned int sum, touched = 0; |
95 | int cpu = smp_processor_id(); | 97 | void *orig_sp; |
96 | 98 | ||
97 | clear_softint(1 << irq); | 99 | clear_softint(1 << irq); |
98 | 100 | ||
@@ -100,13 +102,15 @@ notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs) | |||
100 | 102 | ||
101 | nmi_enter(); | 103 | nmi_enter(); |
102 | 104 | ||
105 | orig_sp = set_hardirq_stack(); | ||
106 | |||
103 | if (notify_die(DIE_NMI, "nmi", regs, 0, | 107 | if (notify_die(DIE_NMI, "nmi", regs, 0, |
104 | pt_regs_trap_type(regs), SIGINT) == NOTIFY_STOP) | 108 | pt_regs_trap_type(regs), SIGINT) == NOTIFY_STOP) |
105 | touched = 1; | 109 | touched = 1; |
106 | else | 110 | else |
107 | pcr_ops->write(PCR_PIC_PRIV); | 111 | pcr_ops->write(PCR_PIC_PRIV); |
108 | 112 | ||
109 | sum = kstat_irqs_cpu(0, cpu); | 113 | sum = local_cpu_data().irq0_irqs; |
110 | if (__get_cpu_var(nmi_touch)) { | 114 | if (__get_cpu_var(nmi_touch)) { |
111 | __get_cpu_var(nmi_touch) = 0; | 115 | __get_cpu_var(nmi_touch) = 0; |
112 | touched = 1; | 116 | touched = 1; |
@@ -125,6 +129,8 @@ notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs) | |||
125 | pcr_ops->write(pcr_enable); | 129 | pcr_ops->write(pcr_enable); |
126 | } | 130 | } |
127 | 131 | ||
132 | restore_hardirq_stack(orig_sp); | ||
133 | |||
128 | nmi_exit(); | 134 | nmi_exit(); |
129 | } | 135 | } |
130 | 136 | ||
diff --git a/arch/sparc/kernel/pci_common.c b/arch/sparc/kernel/pci_common.c index b775658a927d..8a000583b5cf 100644 --- a/arch/sparc/kernel/pci_common.c +++ b/arch/sparc/kernel/pci_common.c | |||
@@ -371,14 +371,19 @@ static void pci_register_iommu_region(struct pci_pbm_info *pbm) | |||
371 | struct resource *rp = kzalloc(sizeof(*rp), GFP_KERNEL); | 371 | struct resource *rp = kzalloc(sizeof(*rp), GFP_KERNEL); |
372 | 372 | ||
373 | if (!rp) { | 373 | if (!rp) { |
374 | prom_printf("Cannot allocate IOMMU resource.\n"); | 374 | pr_info("%s: Cannot allocate IOMMU resource.\n", |
375 | prom_halt(); | 375 | pbm->name); |
376 | return; | ||
376 | } | 377 | } |
377 | rp->name = "IOMMU"; | 378 | rp->name = "IOMMU"; |
378 | rp->start = pbm->mem_space.start + (unsigned long) vdma[0]; | 379 | rp->start = pbm->mem_space.start + (unsigned long) vdma[0]; |
379 | rp->end = rp->start + (unsigned long) vdma[1] - 1UL; | 380 | rp->end = rp->start + (unsigned long) vdma[1] - 1UL; |
380 | rp->flags = IORESOURCE_BUSY; | 381 | rp->flags = IORESOURCE_BUSY; |
381 | request_resource(&pbm->mem_space, rp); | 382 | if (request_resource(&pbm->mem_space, rp)) { |
383 | pr_info("%s: Unable to request IOMMU resource.\n", | ||
384 | pbm->name); | ||
385 | kfree(rp); | ||
386 | } | ||
382 | } | 387 | } |
383 | } | 388 | } |
384 | 389 | ||
diff --git a/arch/sparc/kernel/pcr.c b/arch/sparc/kernel/pcr.c index 2d94e7a03af5..c4a6a50b4849 100644 --- a/arch/sparc/kernel/pcr.c +++ b/arch/sparc/kernel/pcr.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/irq.h> | 8 | #include <linux/irq.h> |
9 | 9 | ||
10 | #include <linux/perf_event.h> | 10 | #include <linux/perf_event.h> |
11 | #include <linux/ftrace.h> | ||
11 | 12 | ||
12 | #include <asm/pil.h> | 13 | #include <asm/pil.h> |
13 | #include <asm/pcr.h> | 14 | #include <asm/pcr.h> |
@@ -34,7 +35,7 @@ unsigned int picl_shift; | |||
34 | * Therefore in such situations we defer the work by signalling | 35 | * Therefore in such situations we defer the work by signalling |
35 | * a lower level cpu IRQ. | 36 | * a lower level cpu IRQ. |
36 | */ | 37 | */ |
37 | void deferred_pcr_work_irq(int irq, struct pt_regs *regs) | 38 | void __irq_entry deferred_pcr_work_irq(int irq, struct pt_regs *regs) |
38 | { | 39 | { |
39 | struct pt_regs *old_regs; | 40 | struct pt_regs *old_regs; |
40 | 41 | ||
diff --git a/arch/sparc/kernel/rtrap_64.S b/arch/sparc/kernel/rtrap_64.S index 83f1873c6c13..090b9e9ad5e3 100644 --- a/arch/sparc/kernel/rtrap_64.S +++ b/arch/sparc/kernel/rtrap_64.S | |||
@@ -130,7 +130,17 @@ rtrap_xcall: | |||
130 | nop | 130 | nop |
131 | call trace_hardirqs_on | 131 | call trace_hardirqs_on |
132 | nop | 132 | nop |
133 | wrpr %l4, %pil | 133 | /* Do not actually set the %pil here. We will do that |
134 | * below after we clear PSTATE_IE in the %pstate register. | ||
135 | * If we re-enable interrupts here, we can recurse down | ||
136 | * the hardirq stack potentially endlessly, causing a | ||
137 | * stack overflow. | ||
138 | * | ||
139 | * It is tempting to put this test and trace_hardirqs_on | ||
140 | * call at the 'rt_continue' label, but that will not work | ||
141 | * as that path hits unconditionally and we do not want to | ||
142 | * execute this in NMI return paths, for example. | ||
143 | */ | ||
134 | #endif | 144 | #endif |
135 | rtrap_no_irq_enable: | 145 | rtrap_no_irq_enable: |
136 | andcc %l1, TSTATE_PRIV, %l3 | 146 | andcc %l1, TSTATE_PRIV, %l3 |
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index 4c5334528109..b6a2b8f47040 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/profile.h> | 22 | #include <linux/profile.h> |
23 | #include <linux/bootmem.h> | 23 | #include <linux/bootmem.h> |
24 | #include <linux/vmalloc.h> | 24 | #include <linux/vmalloc.h> |
25 | #include <linux/ftrace.h> | ||
25 | #include <linux/cpu.h> | 26 | #include <linux/cpu.h> |
26 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
27 | 28 | ||
@@ -823,13 +824,13 @@ void arch_send_call_function_single_ipi(int cpu) | |||
823 | &cpumask_of_cpu(cpu)); | 824 | &cpumask_of_cpu(cpu)); |
824 | } | 825 | } |
825 | 826 | ||
826 | void smp_call_function_client(int irq, struct pt_regs *regs) | 827 | void __irq_entry smp_call_function_client(int irq, struct pt_regs *regs) |
827 | { | 828 | { |
828 | clear_softint(1 << irq); | 829 | clear_softint(1 << irq); |
829 | generic_smp_call_function_interrupt(); | 830 | generic_smp_call_function_interrupt(); |
830 | } | 831 | } |
831 | 832 | ||
832 | void smp_call_function_single_client(int irq, struct pt_regs *regs) | 833 | void __irq_entry smp_call_function_single_client(int irq, struct pt_regs *regs) |
833 | { | 834 | { |
834 | clear_softint(1 << irq); | 835 | clear_softint(1 << irq); |
835 | generic_smp_call_function_single_interrupt(); | 836 | generic_smp_call_function_single_interrupt(); |
@@ -965,7 +966,7 @@ void flush_dcache_page_all(struct mm_struct *mm, struct page *page) | |||
965 | put_cpu(); | 966 | put_cpu(); |
966 | } | 967 | } |
967 | 968 | ||
968 | void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs) | 969 | void __irq_entry smp_new_mmu_context_version_client(int irq, struct pt_regs *regs) |
969 | { | 970 | { |
970 | struct mm_struct *mm; | 971 | struct mm_struct *mm; |
971 | unsigned long flags; | 972 | unsigned long flags; |
@@ -1149,7 +1150,7 @@ void smp_release(void) | |||
1149 | */ | 1150 | */ |
1150 | extern void prom_world(int); | 1151 | extern void prom_world(int); |
1151 | 1152 | ||
1152 | void smp_penguin_jailcell(int irq, struct pt_regs *regs) | 1153 | void __irq_entry smp_penguin_jailcell(int irq, struct pt_regs *regs) |
1153 | { | 1154 | { |
1154 | clear_softint(1 << irq); | 1155 | clear_softint(1 << irq); |
1155 | 1156 | ||
@@ -1365,7 +1366,7 @@ void smp_send_reschedule(int cpu) | |||
1365 | &cpumask_of_cpu(cpu)); | 1366 | &cpumask_of_cpu(cpu)); |
1366 | } | 1367 | } |
1367 | 1368 | ||
1368 | void smp_receive_signal_client(int irq, struct pt_regs *regs) | 1369 | void __irq_entry smp_receive_signal_client(int irq, struct pt_regs *regs) |
1369 | { | 1370 | { |
1370 | clear_softint(1 << irq); | 1371 | clear_softint(1 << irq); |
1371 | } | 1372 | } |
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index 67e165102885..c7bbe6cf7b85 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/clocksource.h> | 35 | #include <linux/clocksource.h> |
36 | #include <linux/of_device.h> | 36 | #include <linux/of_device.h> |
37 | #include <linux/platform_device.h> | 37 | #include <linux/platform_device.h> |
38 | #include <linux/ftrace.h> | ||
38 | 39 | ||
39 | #include <asm/oplib.h> | 40 | #include <asm/oplib.h> |
40 | #include <asm/timer.h> | 41 | #include <asm/timer.h> |
@@ -717,7 +718,7 @@ static struct clock_event_device sparc64_clockevent = { | |||
717 | }; | 718 | }; |
718 | static DEFINE_PER_CPU(struct clock_event_device, sparc64_events); | 719 | static DEFINE_PER_CPU(struct clock_event_device, sparc64_events); |
719 | 720 | ||
720 | void timer_interrupt(int irq, struct pt_regs *regs) | 721 | void __irq_entry timer_interrupt(int irq, struct pt_regs *regs) |
721 | { | 722 | { |
722 | struct pt_regs *old_regs = set_irq_regs(regs); | 723 | struct pt_regs *old_regs = set_irq_regs(regs); |
723 | unsigned long tick_mask = tick_ops->softint_mask; | 724 | unsigned long tick_mask = tick_ops->softint_mask; |
@@ -728,6 +729,7 @@ void timer_interrupt(int irq, struct pt_regs *regs) | |||
728 | 729 | ||
729 | irq_enter(); | 730 | irq_enter(); |
730 | 731 | ||
732 | local_cpu_data().irq0_irqs++; | ||
731 | kstat_incr_irqs_this_cpu(0, irq_to_desc(0)); | 733 | kstat_incr_irqs_this_cpu(0, irq_to_desc(0)); |
732 | 734 | ||
733 | if (unlikely(!evt->event_handler)) { | 735 | if (unlikely(!evt->event_handler)) { |
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c index 837dfc2390d6..9da57f032983 100644 --- a/arch/sparc/kernel/traps_64.c +++ b/arch/sparc/kernel/traps_64.c | |||
@@ -2203,27 +2203,6 @@ void dump_stack(void) | |||
2203 | 2203 | ||
2204 | EXPORT_SYMBOL(dump_stack); | 2204 | EXPORT_SYMBOL(dump_stack); |
2205 | 2205 | ||
2206 | static inline int is_kernel_stack(struct task_struct *task, | ||
2207 | struct reg_window *rw) | ||
2208 | { | ||
2209 | unsigned long rw_addr = (unsigned long) rw; | ||
2210 | unsigned long thread_base, thread_end; | ||
2211 | |||
2212 | if (rw_addr < PAGE_OFFSET) { | ||
2213 | if (task != &init_task) | ||
2214 | return 0; | ||
2215 | } | ||
2216 | |||
2217 | thread_base = (unsigned long) task_stack_page(task); | ||
2218 | thread_end = thread_base + sizeof(union thread_union); | ||
2219 | if (rw_addr >= thread_base && | ||
2220 | rw_addr < thread_end && | ||
2221 | !(rw_addr & 0x7UL)) | ||
2222 | return 1; | ||
2223 | |||
2224 | return 0; | ||
2225 | } | ||
2226 | |||
2227 | static inline struct reg_window *kernel_stack_up(struct reg_window *rw) | 2206 | static inline struct reg_window *kernel_stack_up(struct reg_window *rw) |
2228 | { | 2207 | { |
2229 | unsigned long fp = rw->ins[6]; | 2208 | unsigned long fp = rw->ins[6]; |
@@ -2252,6 +2231,7 @@ void die_if_kernel(char *str, struct pt_regs *regs) | |||
2252 | show_regs(regs); | 2231 | show_regs(regs); |
2253 | add_taint(TAINT_DIE); | 2232 | add_taint(TAINT_DIE); |
2254 | if (regs->tstate & TSTATE_PRIV) { | 2233 | if (regs->tstate & TSTATE_PRIV) { |
2234 | struct thread_info *tp = current_thread_info(); | ||
2255 | struct reg_window *rw = (struct reg_window *) | 2235 | struct reg_window *rw = (struct reg_window *) |
2256 | (regs->u_regs[UREG_FP] + STACK_BIAS); | 2236 | (regs->u_regs[UREG_FP] + STACK_BIAS); |
2257 | 2237 | ||
@@ -2259,8 +2239,8 @@ void die_if_kernel(char *str, struct pt_regs *regs) | |||
2259 | * find some badly aligned kernel stack. | 2239 | * find some badly aligned kernel stack. |
2260 | */ | 2240 | */ |
2261 | while (rw && | 2241 | while (rw && |
2262 | count++ < 30&& | 2242 | count++ < 30 && |
2263 | is_kernel_stack(current, rw)) { | 2243 | kstack_valid(tp, (unsigned long) rw)) { |
2264 | printk("Caller[%016lx]: %pS\n", rw->ins[7], | 2244 | printk("Caller[%016lx]: %pS\n", rw->ins[7], |
2265 | (void *) rw->ins[7]); | 2245 | (void *) rw->ins[7]); |
2266 | 2246 | ||
diff --git a/arch/sparc/kernel/unaligned_64.c b/arch/sparc/kernel/unaligned_64.c index ebce43018c49..c752c4c479bd 100644 --- a/arch/sparc/kernel/unaligned_64.c +++ b/arch/sparc/kernel/unaligned_64.c | |||
@@ -50,7 +50,7 @@ static inline enum direction decode_direction(unsigned int insn) | |||
50 | } | 50 | } |
51 | 51 | ||
52 | /* 16 = double-word, 8 = extra-word, 4 = word, 2 = half-word */ | 52 | /* 16 = double-word, 8 = extra-word, 4 = word, 2 = half-word */ |
53 | static inline int decode_access_size(unsigned int insn) | 53 | static inline int decode_access_size(struct pt_regs *regs, unsigned int insn) |
54 | { | 54 | { |
55 | unsigned int tmp; | 55 | unsigned int tmp; |
56 | 56 | ||
@@ -66,7 +66,7 @@ static inline int decode_access_size(unsigned int insn) | |||
66 | return 2; | 66 | return 2; |
67 | else { | 67 | else { |
68 | printk("Impossible unaligned trap. insn=%08x\n", insn); | 68 | printk("Impossible unaligned trap. insn=%08x\n", insn); |
69 | die_if_kernel("Byte sized unaligned access?!?!", current_thread_info()->kregs); | 69 | die_if_kernel("Byte sized unaligned access?!?!", regs); |
70 | 70 | ||
71 | /* GCC should never warn that control reaches the end | 71 | /* GCC should never warn that control reaches the end |
72 | * of this function without returning a value because | 72 | * of this function without returning a value because |
@@ -286,7 +286,7 @@ static void log_unaligned(struct pt_regs *regs) | |||
286 | asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | 286 | asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) |
287 | { | 287 | { |
288 | enum direction dir = decode_direction(insn); | 288 | enum direction dir = decode_direction(insn); |
289 | int size = decode_access_size(insn); | 289 | int size = decode_access_size(regs, insn); |
290 | int orig_asi, asi; | 290 | int orig_asi, asi; |
291 | 291 | ||
292 | current_thread_info()->kern_una_regs = regs; | 292 | current_thread_info()->kern_una_regs = regs; |
diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S index 4e5992593967..0c1e6783657f 100644 --- a/arch/sparc/kernel/vmlinux.lds.S +++ b/arch/sparc/kernel/vmlinux.lds.S | |||
@@ -46,11 +46,16 @@ SECTIONS | |||
46 | SCHED_TEXT | 46 | SCHED_TEXT |
47 | LOCK_TEXT | 47 | LOCK_TEXT |
48 | KPROBES_TEXT | 48 | KPROBES_TEXT |
49 | IRQENTRY_TEXT | ||
49 | *(.gnu.warning) | 50 | *(.gnu.warning) |
50 | } = 0 | 51 | } = 0 |
51 | _etext = .; | 52 | _etext = .; |
52 | 53 | ||
53 | RO_DATA(PAGE_SIZE) | 54 | RO_DATA(PAGE_SIZE) |
55 | |||
56 | /* Start of data section */ | ||
57 | _sdata = .; | ||
58 | |||
54 | .data1 : { | 59 | .data1 : { |
55 | *(.data1) | 60 | *(.data1) |
56 | } | 61 | } |
diff --git a/arch/sparc/lib/mcount.S b/arch/sparc/lib/mcount.S index 24b8b12deed2..3ad6cbdc2163 100644 --- a/arch/sparc/lib/mcount.S +++ b/arch/sparc/lib/mcount.S | |||
@@ -7,26 +7,11 @@ | |||
7 | 7 | ||
8 | #include <linux/linkage.h> | 8 | #include <linux/linkage.h> |
9 | 9 | ||
10 | #include <asm/ptrace.h> | ||
11 | #include <asm/thread_info.h> | ||
12 | |||
13 | /* | 10 | /* |
14 | * This is the main variant and is called by C code. GCC's -pg option | 11 | * This is the main variant and is called by C code. GCC's -pg option |
15 | * automatically instruments every C function with a call to this. | 12 | * automatically instruments every C function with a call to this. |
16 | */ | 13 | */ |
17 | 14 | ||
18 | #ifdef CONFIG_STACK_DEBUG | ||
19 | |||
20 | #define OVSTACKSIZE 4096 /* lets hope this is enough */ | ||
21 | |||
22 | .data | ||
23 | .align 8 | ||
24 | panicstring: | ||
25 | .asciz "Stack overflow\n" | ||
26 | .align 8 | ||
27 | ovstack: | ||
28 | .skip OVSTACKSIZE | ||
29 | #endif | ||
30 | .text | 15 | .text |
31 | .align 32 | 16 | .align 32 |
32 | .globl _mcount | 17 | .globl _mcount |
@@ -35,84 +20,48 @@ ovstack: | |||
35 | .type mcount,#function | 20 | .type mcount,#function |
36 | _mcount: | 21 | _mcount: |
37 | mcount: | 22 | mcount: |
38 | #ifdef CONFIG_STACK_DEBUG | ||
39 | /* | ||
40 | * Check whether %sp is dangerously low. | ||
41 | */ | ||
42 | ldub [%g6 + TI_FPDEPTH], %g1 | ||
43 | srl %g1, 1, %g3 | ||
44 | add %g3, 1, %g3 | ||
45 | sllx %g3, 8, %g3 ! each fpregs frame is 256b | ||
46 | add %g3, 192, %g3 | ||
47 | add %g6, %g3, %g3 ! where does task_struct+frame end? | ||
48 | sub %g3, STACK_BIAS, %g3 | ||
49 | cmp %sp, %g3 | ||
50 | bg,pt %xcc, 1f | ||
51 | nop | ||
52 | lduh [%g6 + TI_CPU], %g1 | ||
53 | sethi %hi(hardirq_stack), %g3 | ||
54 | or %g3, %lo(hardirq_stack), %g3 | ||
55 | sllx %g1, 3, %g1 | ||
56 | ldx [%g3 + %g1], %g7 | ||
57 | sub %g7, STACK_BIAS, %g7 | ||
58 | cmp %sp, %g7 | ||
59 | bleu,pt %xcc, 2f | ||
60 | sethi %hi(THREAD_SIZE), %g3 | ||
61 | add %g7, %g3, %g7 | ||
62 | cmp %sp, %g7 | ||
63 | blu,pn %xcc, 1f | ||
64 | 2: sethi %hi(softirq_stack), %g3 | ||
65 | or %g3, %lo(softirq_stack), %g3 | ||
66 | ldx [%g3 + %g1], %g7 | ||
67 | sub %g7, STACK_BIAS, %g7 | ||
68 | cmp %sp, %g7 | ||
69 | bleu,pt %xcc, 3f | ||
70 | sethi %hi(THREAD_SIZE), %g3 | ||
71 | add %g7, %g3, %g7 | ||
72 | cmp %sp, %g7 | ||
73 | blu,pn %xcc, 1f | ||
74 | nop | ||
75 | /* If we are already on ovstack, don't hop onto it | ||
76 | * again, we are already trying to output the stack overflow | ||
77 | * message. | ||
78 | */ | ||
79 | 3: sethi %hi(ovstack), %g7 ! cant move to panic stack fast enough | ||
80 | or %g7, %lo(ovstack), %g7 | ||
81 | add %g7, OVSTACKSIZE, %g3 | ||
82 | sub %g3, STACK_BIAS + 192, %g3 | ||
83 | sub %g7, STACK_BIAS, %g7 | ||
84 | cmp %sp, %g7 | ||
85 | blu,pn %xcc, 2f | ||
86 | cmp %sp, %g3 | ||
87 | bleu,pn %xcc, 1f | ||
88 | nop | ||
89 | 2: mov %g3, %sp | ||
90 | sethi %hi(panicstring), %g3 | ||
91 | call prom_printf | ||
92 | or %g3, %lo(panicstring), %o0 | ||
93 | call prom_halt | ||
94 | nop | ||
95 | 1: | ||
96 | #endif | ||
97 | #ifdef CONFIG_FUNCTION_TRACER | 23 | #ifdef CONFIG_FUNCTION_TRACER |
98 | #ifdef CONFIG_DYNAMIC_FTRACE | 24 | #ifdef CONFIG_DYNAMIC_FTRACE |
99 | mov %o7, %o0 | 25 | /* Do nothing, the retl/nop below is all we need. */ |
100 | .globl mcount_call | ||
101 | mcount_call: | ||
102 | call ftrace_stub | ||
103 | mov %o0, %o7 | ||
104 | #else | 26 | #else |
105 | sethi %hi(ftrace_trace_function), %g1 | 27 | sethi %hi(function_trace_stop), %g1 |
28 | lduw [%g1 + %lo(function_trace_stop)], %g2 | ||
29 | brnz,pn %g2, 2f | ||
30 | sethi %hi(ftrace_trace_function), %g1 | ||
106 | sethi %hi(ftrace_stub), %g2 | 31 | sethi %hi(ftrace_stub), %g2 |
107 | ldx [%g1 + %lo(ftrace_trace_function)], %g1 | 32 | ldx [%g1 + %lo(ftrace_trace_function)], %g1 |
108 | or %g2, %lo(ftrace_stub), %g2 | 33 | or %g2, %lo(ftrace_stub), %g2 |
109 | cmp %g1, %g2 | 34 | cmp %g1, %g2 |
110 | be,pn %icc, 1f | 35 | be,pn %icc, 1f |
111 | mov %i7, %o1 | 36 | mov %i7, %g3 |
112 | jmpl %g1, %g0 | 37 | save %sp, -176, %sp |
113 | mov %o7, %o0 | 38 | mov %g3, %o1 |
39 | jmpl %g1, %o7 | ||
40 | mov %i7, %o0 | ||
41 | ret | ||
42 | restore | ||
114 | /* not reached */ | 43 | /* not reached */ |
115 | 1: | 44 | 1: |
45 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | ||
46 | sethi %hi(ftrace_graph_return), %g1 | ||
47 | ldx [%g1 + %lo(ftrace_graph_return)], %g3 | ||
48 | cmp %g2, %g3 | ||
49 | bne,pn %xcc, 5f | ||
50 | sethi %hi(ftrace_graph_entry_stub), %g2 | ||
51 | sethi %hi(ftrace_graph_entry), %g1 | ||
52 | or %g2, %lo(ftrace_graph_entry_stub), %g2 | ||
53 | ldx [%g1 + %lo(ftrace_graph_entry)], %g1 | ||
54 | cmp %g1, %g2 | ||
55 | be,pt %xcc, 2f | ||
56 | nop | ||
57 | 5: mov %i7, %g2 | ||
58 | mov %fp, %g3 | ||
59 | save %sp, -176, %sp | ||
60 | mov %g2, %l0 | ||
61 | ba,pt %xcc, ftrace_graph_caller | ||
62 | mov %g3, %l1 | ||
63 | #endif | ||
64 | 2: | ||
116 | #endif | 65 | #endif |
117 | #endif | 66 | #endif |
118 | retl | 67 | retl |
@@ -131,14 +80,50 @@ ftrace_stub: | |||
131 | .globl ftrace_caller | 80 | .globl ftrace_caller |
132 | .type ftrace_caller,#function | 81 | .type ftrace_caller,#function |
133 | ftrace_caller: | 82 | ftrace_caller: |
134 | mov %i7, %o1 | 83 | sethi %hi(function_trace_stop), %g1 |
135 | mov %o7, %o0 | 84 | mov %i7, %g2 |
85 | lduw [%g1 + %lo(function_trace_stop)], %g1 | ||
86 | brnz,pn %g1, ftrace_stub | ||
87 | mov %fp, %g3 | ||
88 | save %sp, -176, %sp | ||
89 | mov %g2, %o1 | ||
90 | mov %g2, %l0 | ||
91 | mov %g3, %l1 | ||
136 | .globl ftrace_call | 92 | .globl ftrace_call |
137 | ftrace_call: | 93 | ftrace_call: |
138 | call ftrace_stub | 94 | call ftrace_stub |
139 | mov %o0, %o7 | 95 | mov %i7, %o0 |
140 | retl | 96 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
97 | .globl ftrace_graph_call | ||
98 | ftrace_graph_call: | ||
99 | call ftrace_stub | ||
141 | nop | 100 | nop |
101 | #endif | ||
102 | ret | ||
103 | restore | ||
104 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | ||
105 | .size ftrace_graph_call,.-ftrace_graph_call | ||
106 | #endif | ||
107 | .size ftrace_call,.-ftrace_call | ||
142 | .size ftrace_caller,.-ftrace_caller | 108 | .size ftrace_caller,.-ftrace_caller |
143 | #endif | 109 | #endif |
144 | #endif | 110 | #endif |
111 | |||
112 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | ||
113 | ENTRY(ftrace_graph_caller) | ||
114 | mov %l0, %o0 | ||
115 | mov %i7, %o1 | ||
116 | call prepare_ftrace_return | ||
117 | mov %l1, %o2 | ||
118 | ret | ||
119 | restore %o0, -8, %i7 | ||
120 | END(ftrace_graph_caller) | ||
121 | |||
122 | ENTRY(return_to_handler) | ||
123 | save %sp, -176, %sp | ||
124 | call ftrace_return_to_handler | ||
125 | mov %fp, %o0 | ||
126 | jmpl %o0 + 8, %g0 | ||
127 | restore | ||
128 | END(return_to_handler) | ||
129 | #endif | ||
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index 64cda95f59ca..7a656bd8bd3c 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include "linux/irqreturn.h" | 6 | #include "linux/irqreturn.h" |
7 | #include "linux/kd.h" | 7 | #include "linux/kd.h" |
8 | #include "linux/sched.h" | 8 | #include "linux/sched.h" |
9 | #include "linux/slab.h" | ||
9 | #include "chan_kern.h" | 10 | #include "chan_kern.h" |
10 | #include "irq_kern.h" | 11 | #include "irq_kern.h" |
11 | #include "irq_user.h" | 12 | #include "irq_user.h" |
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c index 06d6ccf0e444..b6b1096152aa 100644 --- a/arch/um/os-Linux/helper.c +++ b/arch/um/os-Linux/helper.c | |||
@@ -8,7 +8,6 @@ | |||
8 | #include <errno.h> | 8 | #include <errno.h> |
9 | #include <sched.h> | 9 | #include <sched.h> |
10 | #include <linux/limits.h> | 10 | #include <linux/limits.h> |
11 | #include <linux/slab.h> | ||
12 | #include <sys/socket.h> | 11 | #include <sys/socket.h> |
13 | #include <sys/wait.h> | 12 | #include <sys/wait.h> |
14 | #include "kern_constants.h" | 13 | #include "kern_constants.h" |
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S index 59b4556a5b92..e790bc1fbfa3 100644 --- a/arch/x86/ia32/ia32entry.S +++ b/arch/x86/ia32/ia32entry.S | |||
@@ -626,7 +626,7 @@ ia32_sys_call_table: | |||
626 | .quad stub32_sigreturn | 626 | .quad stub32_sigreturn |
627 | .quad stub32_clone /* 120 */ | 627 | .quad stub32_clone /* 120 */ |
628 | .quad sys_setdomainname | 628 | .quad sys_setdomainname |
629 | .quad sys_uname | 629 | .quad sys_newuname |
630 | .quad sys_modify_ldt | 630 | .quad sys_modify_ldt |
631 | .quad compat_sys_adjtimex | 631 | .quad compat_sys_adjtimex |
632 | .quad sys32_mprotect /* 125 */ | 632 | .quad sys32_mprotect /* 125 */ |
diff --git a/arch/x86/include/asm/amd_iommu_types.h b/arch/x86/include/asm/amd_iommu_types.h index ba19ad4c47d0..86a0ff0aeac7 100644 --- a/arch/x86/include/asm/amd_iommu_types.h +++ b/arch/x86/include/asm/amd_iommu_types.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #define _ASM_X86_AMD_IOMMU_TYPES_H | 21 | #define _ASM_X86_AMD_IOMMU_TYPES_H |
22 | 22 | ||
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/mutex.h> | ||
24 | #include <linux/list.h> | 25 | #include <linux/list.h> |
25 | #include <linux/spinlock.h> | 26 | #include <linux/spinlock.h> |
26 | 27 | ||
@@ -140,6 +141,7 @@ | |||
140 | 141 | ||
141 | /* constants to configure the command buffer */ | 142 | /* constants to configure the command buffer */ |
142 | #define CMD_BUFFER_SIZE 8192 | 143 | #define CMD_BUFFER_SIZE 8192 |
144 | #define CMD_BUFFER_UNINITIALIZED 1 | ||
143 | #define CMD_BUFFER_ENTRIES 512 | 145 | #define CMD_BUFFER_ENTRIES 512 |
144 | #define MMIO_CMD_SIZE_SHIFT 56 | 146 | #define MMIO_CMD_SIZE_SHIFT 56 |
145 | #define MMIO_CMD_SIZE_512 (0x9ULL << MMIO_CMD_SIZE_SHIFT) | 147 | #define MMIO_CMD_SIZE_512 (0x9ULL << MMIO_CMD_SIZE_SHIFT) |
@@ -237,6 +239,7 @@ struct protection_domain { | |||
237 | struct list_head list; /* for list of all protection domains */ | 239 | struct list_head list; /* for list of all protection domains */ |
238 | struct list_head dev_list; /* List of all devices in this domain */ | 240 | struct list_head dev_list; /* List of all devices in this domain */ |
239 | spinlock_t lock; /* mostly used to lock the page table*/ | 241 | spinlock_t lock; /* mostly used to lock the page table*/ |
242 | struct mutex api_lock; /* protect page tables in the iommu-api path */ | ||
240 | u16 id; /* the domain id written to the device table */ | 243 | u16 id; /* the domain id written to the device table */ |
241 | int mode; /* paging mode (0-6 levels) */ | 244 | int mode; /* paging mode (0-6 levels) */ |
242 | u64 *pt_root; /* page table root pointer */ | 245 | u64 *pt_root; /* page table root pointer */ |
diff --git a/arch/x86/include/asm/lguest_hcall.h b/arch/x86/include/asm/lguest_hcall.h index ba0eed8aa1a6..b60f2924c413 100644 --- a/arch/x86/include/asm/lguest_hcall.h +++ b/arch/x86/include/asm/lguest_hcall.h | |||
@@ -28,22 +28,39 @@ | |||
28 | 28 | ||
29 | #ifndef __ASSEMBLY__ | 29 | #ifndef __ASSEMBLY__ |
30 | #include <asm/hw_irq.h> | 30 | #include <asm/hw_irq.h> |
31 | #include <asm/kvm_para.h> | ||
32 | 31 | ||
33 | /*G:030 | 32 | /*G:030 |
34 | * But first, how does our Guest contact the Host to ask for privileged | 33 | * But first, how does our Guest contact the Host to ask for privileged |
35 | * operations? There are two ways: the direct way is to make a "hypercall", | 34 | * operations? There are two ways: the direct way is to make a "hypercall", |
36 | * to make requests of the Host Itself. | 35 | * to make requests of the Host Itself. |
37 | * | 36 | * |
38 | * We use the KVM hypercall mechanism, though completely different hypercall | 37 | * Our hypercall mechanism uses the highest unused trap code (traps 32 and |
39 | * numbers. Seventeen hypercalls are available: the hypercall number is put in | 38 | * above are used by real hardware interrupts). Seventeen hypercalls are |
40 | * the %eax register, and the arguments (when required) are placed in %ebx, | 39 | * available: the hypercall number is put in the %eax register, and the |
41 | * %ecx, %edx and %esi. If a return value makes sense, it's returned in %eax. | 40 | * arguments (when required) are placed in %ebx, %ecx, %edx and %esi. |
41 | * If a return value makes sense, it's returned in %eax. | ||
42 | * | 42 | * |
43 | * Grossly invalid calls result in Sudden Death at the hands of the vengeful | 43 | * Grossly invalid calls result in Sudden Death at the hands of the vengeful |
44 | * Host, rather than returning failure. This reflects Winston Churchill's | 44 | * Host, rather than returning failure. This reflects Winston Churchill's |
45 | * definition of a gentleman: "someone who is only rude intentionally". | 45 | * definition of a gentleman: "someone who is only rude intentionally". |
46 | :*/ | 46 | */ |
47 | static inline unsigned long | ||
48 | hcall(unsigned long call, | ||
49 | unsigned long arg1, unsigned long arg2, unsigned long arg3, | ||
50 | unsigned long arg4) | ||
51 | { | ||
52 | /* "int" is the Intel instruction to trigger a trap. */ | ||
53 | asm volatile("int $" __stringify(LGUEST_TRAP_ENTRY) | ||
54 | /* The call in %eax (aka "a") might be overwritten */ | ||
55 | : "=a"(call) | ||
56 | /* The arguments are in %eax, %ebx, %ecx, %edx & %esi */ | ||
57 | : "a"(call), "b"(arg1), "c"(arg2), "d"(arg3), "S"(arg4) | ||
58 | /* "memory" means this might write somewhere in memory. | ||
59 | * This isn't true for all calls, but it's safe to tell | ||
60 | * gcc that it might happen so it doesn't get clever. */ | ||
61 | : "memory"); | ||
62 | return call; | ||
63 | } | ||
47 | 64 | ||
48 | /* Can't use our min() macro here: needs to be a constant */ | 65 | /* Can't use our min() macro here: needs to be a constant */ |
49 | #define LGUEST_IRQS (NR_IRQS < 32 ? NR_IRQS: 32) | 66 | #define LGUEST_IRQS (NR_IRQS < 32 ? NR_IRQS: 32) |
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index f3dadb571d9b..f854d89b7edf 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -118,7 +118,7 @@ static bool check_device(struct device *dev) | |||
118 | return false; | 118 | return false; |
119 | 119 | ||
120 | /* No device or no PCI device */ | 120 | /* No device or no PCI device */ |
121 | if (!dev || dev->bus != &pci_bus_type) | 121 | if (dev->bus != &pci_bus_type) |
122 | return false; | 122 | return false; |
123 | 123 | ||
124 | devid = get_device_id(dev); | 124 | devid = get_device_id(dev); |
@@ -392,6 +392,7 @@ static int __iommu_queue_command(struct amd_iommu *iommu, struct iommu_cmd *cmd) | |||
392 | u32 tail, head; | 392 | u32 tail, head; |
393 | u8 *target; | 393 | u8 *target; |
394 | 394 | ||
395 | WARN_ON(iommu->cmd_buf_size & CMD_BUFFER_UNINITIALIZED); | ||
395 | tail = readl(iommu->mmio_base + MMIO_CMD_TAIL_OFFSET); | 396 | tail = readl(iommu->mmio_base + MMIO_CMD_TAIL_OFFSET); |
396 | target = iommu->cmd_buf + tail; | 397 | target = iommu->cmd_buf + tail; |
397 | memcpy_toio(target, cmd, sizeof(*cmd)); | 398 | memcpy_toio(target, cmd, sizeof(*cmd)); |
@@ -2186,7 +2187,7 @@ static void prealloc_protection_domains(void) | |||
2186 | struct dma_ops_domain *dma_dom; | 2187 | struct dma_ops_domain *dma_dom; |
2187 | u16 devid; | 2188 | u16 devid; |
2188 | 2189 | ||
2189 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { | 2190 | for_each_pci_dev(dev) { |
2190 | 2191 | ||
2191 | /* Do we handle this device? */ | 2192 | /* Do we handle this device? */ |
2192 | if (!check_device(&dev->dev)) | 2193 | if (!check_device(&dev->dev)) |
@@ -2298,7 +2299,7 @@ static void cleanup_domain(struct protection_domain *domain) | |||
2298 | list_for_each_entry_safe(dev_data, next, &domain->dev_list, list) { | 2299 | list_for_each_entry_safe(dev_data, next, &domain->dev_list, list) { |
2299 | struct device *dev = dev_data->dev; | 2300 | struct device *dev = dev_data->dev; |
2300 | 2301 | ||
2301 | do_detach(dev); | 2302 | __detach_device(dev); |
2302 | atomic_set(&dev_data->bind, 0); | 2303 | atomic_set(&dev_data->bind, 0); |
2303 | } | 2304 | } |
2304 | 2305 | ||
@@ -2327,6 +2328,7 @@ static struct protection_domain *protection_domain_alloc(void) | |||
2327 | return NULL; | 2328 | return NULL; |
2328 | 2329 | ||
2329 | spin_lock_init(&domain->lock); | 2330 | spin_lock_init(&domain->lock); |
2331 | mutex_init(&domain->api_lock); | ||
2330 | domain->id = domain_id_alloc(); | 2332 | domain->id = domain_id_alloc(); |
2331 | if (!domain->id) | 2333 | if (!domain->id) |
2332 | goto out_err; | 2334 | goto out_err; |
@@ -2379,9 +2381,7 @@ static void amd_iommu_domain_destroy(struct iommu_domain *dom) | |||
2379 | 2381 | ||
2380 | free_pagetable(domain); | 2382 | free_pagetable(domain); |
2381 | 2383 | ||
2382 | domain_id_free(domain->id); | 2384 | protection_domain_free(domain); |
2383 | |||
2384 | kfree(domain); | ||
2385 | 2385 | ||
2386 | dom->priv = NULL; | 2386 | dom->priv = NULL; |
2387 | } | 2387 | } |
@@ -2456,6 +2456,8 @@ static int amd_iommu_map_range(struct iommu_domain *dom, | |||
2456 | iova &= PAGE_MASK; | 2456 | iova &= PAGE_MASK; |
2457 | paddr &= PAGE_MASK; | 2457 | paddr &= PAGE_MASK; |
2458 | 2458 | ||
2459 | mutex_lock(&domain->api_lock); | ||
2460 | |||
2459 | for (i = 0; i < npages; ++i) { | 2461 | for (i = 0; i < npages; ++i) { |
2460 | ret = iommu_map_page(domain, iova, paddr, prot, PM_MAP_4k); | 2462 | ret = iommu_map_page(domain, iova, paddr, prot, PM_MAP_4k); |
2461 | if (ret) | 2463 | if (ret) |
@@ -2465,6 +2467,8 @@ static int amd_iommu_map_range(struct iommu_domain *dom, | |||
2465 | paddr += PAGE_SIZE; | 2467 | paddr += PAGE_SIZE; |
2466 | } | 2468 | } |
2467 | 2469 | ||
2470 | mutex_unlock(&domain->api_lock); | ||
2471 | |||
2468 | return 0; | 2472 | return 0; |
2469 | } | 2473 | } |
2470 | 2474 | ||
@@ -2477,12 +2481,16 @@ static void amd_iommu_unmap_range(struct iommu_domain *dom, | |||
2477 | 2481 | ||
2478 | iova &= PAGE_MASK; | 2482 | iova &= PAGE_MASK; |
2479 | 2483 | ||
2484 | mutex_lock(&domain->api_lock); | ||
2485 | |||
2480 | for (i = 0; i < npages; ++i) { | 2486 | for (i = 0; i < npages; ++i) { |
2481 | iommu_unmap_page(domain, iova, PM_MAP_4k); | 2487 | iommu_unmap_page(domain, iova, PM_MAP_4k); |
2482 | iova += PAGE_SIZE; | 2488 | iova += PAGE_SIZE; |
2483 | } | 2489 | } |
2484 | 2490 | ||
2485 | iommu_flush_tlb_pde(domain); | 2491 | iommu_flush_tlb_pde(domain); |
2492 | |||
2493 | mutex_unlock(&domain->api_lock); | ||
2486 | } | 2494 | } |
2487 | 2495 | ||
2488 | static phys_addr_t amd_iommu_iova_to_phys(struct iommu_domain *dom, | 2496 | static phys_addr_t amd_iommu_iova_to_phys(struct iommu_domain *dom, |
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index 42f5350b908f..6360abf993d4 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c | |||
@@ -138,9 +138,9 @@ int amd_iommus_present; | |||
138 | bool amd_iommu_np_cache __read_mostly; | 138 | bool amd_iommu_np_cache __read_mostly; |
139 | 139 | ||
140 | /* | 140 | /* |
141 | * Set to true if ACPI table parsing and hardware intialization went properly | 141 | * The ACPI table parsing functions set this variable on an error |
142 | */ | 142 | */ |
143 | static bool amd_iommu_initialized; | 143 | static int __initdata amd_iommu_init_err; |
144 | 144 | ||
145 | /* | 145 | /* |
146 | * List of protection domains - used during resume | 146 | * List of protection domains - used during resume |
@@ -391,9 +391,11 @@ static int __init find_last_devid_acpi(struct acpi_table_header *table) | |||
391 | */ | 391 | */ |
392 | for (i = 0; i < table->length; ++i) | 392 | for (i = 0; i < table->length; ++i) |
393 | checksum += p[i]; | 393 | checksum += p[i]; |
394 | if (checksum != 0) | 394 | if (checksum != 0) { |
395 | /* ACPI table corrupt */ | 395 | /* ACPI table corrupt */ |
396 | return -ENODEV; | 396 | amd_iommu_init_err = -ENODEV; |
397 | return 0; | ||
398 | } | ||
397 | 399 | ||
398 | p += IVRS_HEADER_LENGTH; | 400 | p += IVRS_HEADER_LENGTH; |
399 | 401 | ||
@@ -436,7 +438,7 @@ static u8 * __init alloc_command_buffer(struct amd_iommu *iommu) | |||
436 | if (cmd_buf == NULL) | 438 | if (cmd_buf == NULL) |
437 | return NULL; | 439 | return NULL; |
438 | 440 | ||
439 | iommu->cmd_buf_size = CMD_BUFFER_SIZE; | 441 | iommu->cmd_buf_size = CMD_BUFFER_SIZE | CMD_BUFFER_UNINITIALIZED; |
440 | 442 | ||
441 | return cmd_buf; | 443 | return cmd_buf; |
442 | } | 444 | } |
@@ -472,12 +474,13 @@ static void iommu_enable_command_buffer(struct amd_iommu *iommu) | |||
472 | &entry, sizeof(entry)); | 474 | &entry, sizeof(entry)); |
473 | 475 | ||
474 | amd_iommu_reset_cmd_buffer(iommu); | 476 | amd_iommu_reset_cmd_buffer(iommu); |
477 | iommu->cmd_buf_size &= ~(CMD_BUFFER_UNINITIALIZED); | ||
475 | } | 478 | } |
476 | 479 | ||
477 | static void __init free_command_buffer(struct amd_iommu *iommu) | 480 | static void __init free_command_buffer(struct amd_iommu *iommu) |
478 | { | 481 | { |
479 | free_pages((unsigned long)iommu->cmd_buf, | 482 | free_pages((unsigned long)iommu->cmd_buf, |
480 | get_order(iommu->cmd_buf_size)); | 483 | get_order(iommu->cmd_buf_size & ~(CMD_BUFFER_UNINITIALIZED))); |
481 | } | 484 | } |
482 | 485 | ||
483 | /* allocates the memory where the IOMMU will log its events to */ | 486 | /* allocates the memory where the IOMMU will log its events to */ |
@@ -920,11 +923,16 @@ static int __init init_iommu_all(struct acpi_table_header *table) | |||
920 | h->mmio_phys); | 923 | h->mmio_phys); |
921 | 924 | ||
922 | iommu = kzalloc(sizeof(struct amd_iommu), GFP_KERNEL); | 925 | iommu = kzalloc(sizeof(struct amd_iommu), GFP_KERNEL); |
923 | if (iommu == NULL) | 926 | if (iommu == NULL) { |
924 | return -ENOMEM; | 927 | amd_iommu_init_err = -ENOMEM; |
928 | return 0; | ||
929 | } | ||
930 | |||
925 | ret = init_iommu_one(iommu, h); | 931 | ret = init_iommu_one(iommu, h); |
926 | if (ret) | 932 | if (ret) { |
927 | return ret; | 933 | amd_iommu_init_err = ret; |
934 | return 0; | ||
935 | } | ||
928 | break; | 936 | break; |
929 | default: | 937 | default: |
930 | break; | 938 | break; |
@@ -934,8 +942,6 @@ static int __init init_iommu_all(struct acpi_table_header *table) | |||
934 | } | 942 | } |
935 | WARN_ON(p != end); | 943 | WARN_ON(p != end); |
936 | 944 | ||
937 | amd_iommu_initialized = true; | ||
938 | |||
939 | return 0; | 945 | return 0; |
940 | } | 946 | } |
941 | 947 | ||
@@ -1211,6 +1217,10 @@ static int __init amd_iommu_init(void) | |||
1211 | if (acpi_table_parse("IVRS", find_last_devid_acpi) != 0) | 1217 | if (acpi_table_parse("IVRS", find_last_devid_acpi) != 0) |
1212 | return -ENODEV; | 1218 | return -ENODEV; |
1213 | 1219 | ||
1220 | ret = amd_iommu_init_err; | ||
1221 | if (ret) | ||
1222 | goto out; | ||
1223 | |||
1214 | dev_table_size = tbl_size(DEV_TABLE_ENTRY_SIZE); | 1224 | dev_table_size = tbl_size(DEV_TABLE_ENTRY_SIZE); |
1215 | alias_table_size = tbl_size(ALIAS_TABLE_ENTRY_SIZE); | 1225 | alias_table_size = tbl_size(ALIAS_TABLE_ENTRY_SIZE); |
1216 | rlookup_table_size = tbl_size(RLOOKUP_TABLE_ENTRY_SIZE); | 1226 | rlookup_table_size = tbl_size(RLOOKUP_TABLE_ENTRY_SIZE); |
@@ -1270,12 +1280,19 @@ static int __init amd_iommu_init(void) | |||
1270 | if (acpi_table_parse("IVRS", init_iommu_all) != 0) | 1280 | if (acpi_table_parse("IVRS", init_iommu_all) != 0) |
1271 | goto free; | 1281 | goto free; |
1272 | 1282 | ||
1273 | if (!amd_iommu_initialized) | 1283 | if (amd_iommu_init_err) { |
1284 | ret = amd_iommu_init_err; | ||
1274 | goto free; | 1285 | goto free; |
1286 | } | ||
1275 | 1287 | ||
1276 | if (acpi_table_parse("IVRS", init_memory_definitions) != 0) | 1288 | if (acpi_table_parse("IVRS", init_memory_definitions) != 0) |
1277 | goto free; | 1289 | goto free; |
1278 | 1290 | ||
1291 | if (amd_iommu_init_err) { | ||
1292 | ret = amd_iommu_init_err; | ||
1293 | goto free; | ||
1294 | } | ||
1295 | |||
1279 | ret = sysdev_class_register(&amd_iommu_sysdev_class); | 1296 | ret = sysdev_class_register(&amd_iommu_sysdev_class); |
1280 | if (ret) | 1297 | if (ret) |
1281 | goto free; | 1298 | goto free; |
@@ -1288,6 +1305,8 @@ static int __init amd_iommu_init(void) | |||
1288 | if (ret) | 1305 | if (ret) |
1289 | goto free; | 1306 | goto free; |
1290 | 1307 | ||
1308 | enable_iommus(); | ||
1309 | |||
1291 | if (iommu_pass_through) | 1310 | if (iommu_pass_through) |
1292 | ret = amd_iommu_init_passthrough(); | 1311 | ret = amd_iommu_init_passthrough(); |
1293 | else | 1312 | else |
@@ -1300,8 +1319,6 @@ static int __init amd_iommu_init(void) | |||
1300 | 1319 | ||
1301 | amd_iommu_init_notifier(); | 1320 | amd_iommu_init_notifier(); |
1302 | 1321 | ||
1303 | enable_iommus(); | ||
1304 | |||
1305 | if (iommu_pass_through) | 1322 | if (iommu_pass_through) |
1306 | goto out; | 1323 | goto out; |
1307 | 1324 | ||
@@ -1315,6 +1332,7 @@ out: | |||
1315 | return ret; | 1332 | return ret; |
1316 | 1333 | ||
1317 | free: | 1334 | free: |
1335 | disable_iommus(); | ||
1318 | 1336 | ||
1319 | amd_iommu_uninit_devices(); | 1337 | amd_iommu_uninit_devices(); |
1320 | 1338 | ||
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c index 3704997e8b25..b5d8b0bcf235 100644 --- a/arch/x86/kernel/aperture_64.c +++ b/arch/x86/kernel/aperture_64.c | |||
@@ -393,6 +393,7 @@ void __init gart_iommu_hole_init(void) | |||
393 | for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) { | 393 | for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) { |
394 | int bus; | 394 | int bus; |
395 | int dev_base, dev_limit; | 395 | int dev_base, dev_limit; |
396 | u32 ctl; | ||
396 | 397 | ||
397 | bus = bus_dev_ranges[i].bus; | 398 | bus = bus_dev_ranges[i].bus; |
398 | dev_base = bus_dev_ranges[i].dev_base; | 399 | dev_base = bus_dev_ranges[i].dev_base; |
@@ -406,7 +407,19 @@ void __init gart_iommu_hole_init(void) | |||
406 | gart_iommu_aperture = 1; | 407 | gart_iommu_aperture = 1; |
407 | x86_init.iommu.iommu_init = gart_iommu_init; | 408 | x86_init.iommu.iommu_init = gart_iommu_init; |
408 | 409 | ||
409 | aper_order = (read_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL) >> 1) & 7; | 410 | ctl = read_pci_config(bus, slot, 3, |
411 | AMD64_GARTAPERTURECTL); | ||
412 | |||
413 | /* | ||
414 | * Before we do anything else disable the GART. It may | ||
415 | * still be enabled if we boot into a crash-kernel here. | ||
416 | * Reconfiguring the GART while it is enabled could have | ||
417 | * unknown side-effects. | ||
418 | */ | ||
419 | ctl &= ~GARTEN; | ||
420 | write_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL, ctl); | ||
421 | |||
422 | aper_order = (ctl >> 1) & 7; | ||
410 | aper_size = (32 * 1024 * 1024) << aper_order; | 423 | aper_size = (32 * 1024 * 1024) << aper_order; |
411 | aper_base = read_pci_config(bus, slot, 3, AMD64_GARTAPERTUREBASE) & 0x7fff; | 424 | aper_base = read_pci_config(bus, slot, 3, AMD64_GARTAPERTUREBASE) & 0x7fff; |
412 | aper_base <<= 25; | 425 | aper_base <<= 25; |
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c index a4849c10a77e..ebd4c51d096a 100644 --- a/arch/x86/kernel/crash.c +++ b/arch/x86/kernel/crash.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <asm/cpu.h> | 27 | #include <asm/cpu.h> |
28 | #include <asm/reboot.h> | 28 | #include <asm/reboot.h> |
29 | #include <asm/virtext.h> | 29 | #include <asm/virtext.h> |
30 | #include <asm/x86_init.h> | ||
31 | 30 | ||
32 | #if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC) | 31 | #if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC) |
33 | 32 | ||
@@ -103,10 +102,5 @@ void native_machine_crash_shutdown(struct pt_regs *regs) | |||
103 | #ifdef CONFIG_HPET_TIMER | 102 | #ifdef CONFIG_HPET_TIMER |
104 | hpet_disable(); | 103 | hpet_disable(); |
105 | #endif | 104 | #endif |
106 | |||
107 | #ifdef CONFIG_X86_64 | ||
108 | x86_platform.iommu_shutdown(); | ||
109 | #endif | ||
110 | |||
111 | crash_save_cpu(regs, safe_smp_processor_id()); | 105 | crash_save_cpu(regs, safe_smp_processor_id()); |
112 | } | 106 | } |
diff --git a/arch/x86/kernel/dumpstack.h b/arch/x86/kernel/dumpstack.h index e39e77168a37..e1a93be4fd44 100644 --- a/arch/x86/kernel/dumpstack.h +++ b/arch/x86/kernel/dumpstack.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #define get_bp(bp) asm("movq %%rbp, %0" : "=r" (bp) :) | 14 | #define get_bp(bp) asm("movq %%rbp, %0" : "=r" (bp) :) |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | #include <linux/uaccess.h> | ||
18 | |||
17 | extern void | 19 | extern void |
18 | show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs, | 20 | show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs, |
19 | unsigned long *stack, unsigned long bp, char *log_lvl); | 21 | unsigned long *stack, unsigned long bp, char *log_lvl); |
@@ -42,8 +44,10 @@ static inline unsigned long rewind_frame_pointer(int n) | |||
42 | get_bp(frame); | 44 | get_bp(frame); |
43 | 45 | ||
44 | #ifdef CONFIG_FRAME_POINTER | 46 | #ifdef CONFIG_FRAME_POINTER |
45 | while (n--) | 47 | while (n--) { |
46 | frame = frame->next_frame; | 48 | if (probe_kernel_address(&frame->next_frame, frame)) |
49 | break; | ||
50 | } | ||
47 | #endif | 51 | #endif |
48 | 52 | ||
49 | return (unsigned long)frame; | 53 | return (unsigned long)frame; |
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c index 68cd24f9deae..0f7f130caa67 100644 --- a/arch/x86/kernel/pci-gart_64.c +++ b/arch/x86/kernel/pci-gart_64.c | |||
@@ -565,6 +565,9 @@ static void enable_gart_translations(void) | |||
565 | 565 | ||
566 | enable_gart_translation(dev, __pa(agp_gatt_table)); | 566 | enable_gart_translation(dev, __pa(agp_gatt_table)); |
567 | } | 567 | } |
568 | |||
569 | /* Flush the GART-TLB to remove stale entries */ | ||
570 | k8_flush_garts(); | ||
568 | } | 571 | } |
569 | 572 | ||
570 | /* | 573 | /* |
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 48aeee8eefb0..19a8906bcaa2 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -1490,8 +1490,8 @@ static int mmu_zap_unsync_children(struct kvm *kvm, | |||
1490 | for_each_sp(pages, sp, parents, i) { | 1490 | for_each_sp(pages, sp, parents, i) { |
1491 | kvm_mmu_zap_page(kvm, sp); | 1491 | kvm_mmu_zap_page(kvm, sp); |
1492 | mmu_pages_clear_parents(&parents); | 1492 | mmu_pages_clear_parents(&parents); |
1493 | zapped++; | ||
1493 | } | 1494 | } |
1494 | zapped += pages.nr; | ||
1495 | kvm_mmu_pages_init(parent, &parents, &pages); | 1495 | kvm_mmu_pages_init(parent, &parents, &pages); |
1496 | } | 1496 | } |
1497 | 1497 | ||
@@ -1542,14 +1542,16 @@ void kvm_mmu_change_mmu_pages(struct kvm *kvm, unsigned int kvm_nr_mmu_pages) | |||
1542 | */ | 1542 | */ |
1543 | 1543 | ||
1544 | if (used_pages > kvm_nr_mmu_pages) { | 1544 | if (used_pages > kvm_nr_mmu_pages) { |
1545 | while (used_pages > kvm_nr_mmu_pages) { | 1545 | while (used_pages > kvm_nr_mmu_pages && |
1546 | !list_empty(&kvm->arch.active_mmu_pages)) { | ||
1546 | struct kvm_mmu_page *page; | 1547 | struct kvm_mmu_page *page; |
1547 | 1548 | ||
1548 | page = container_of(kvm->arch.active_mmu_pages.prev, | 1549 | page = container_of(kvm->arch.active_mmu_pages.prev, |
1549 | struct kvm_mmu_page, link); | 1550 | struct kvm_mmu_page, link); |
1550 | kvm_mmu_zap_page(kvm, page); | 1551 | used_pages -= kvm_mmu_zap_page(kvm, page); |
1551 | used_pages--; | 1552 | used_pages--; |
1552 | } | 1553 | } |
1554 | kvm_nr_mmu_pages = used_pages; | ||
1553 | kvm->arch.n_free_mmu_pages = 0; | 1555 | kvm->arch.n_free_mmu_pages = 0; |
1554 | } | 1556 | } |
1555 | else | 1557 | else |
@@ -1596,7 +1598,8 @@ static void mmu_unshadow(struct kvm *kvm, gfn_t gfn) | |||
1596 | && !sp->role.invalid) { | 1598 | && !sp->role.invalid) { |
1597 | pgprintk("%s: zap %lx %x\n", | 1599 | pgprintk("%s: zap %lx %x\n", |
1598 | __func__, gfn, sp->role.word); | 1600 | __func__, gfn, sp->role.word); |
1599 | kvm_mmu_zap_page(kvm, sp); | 1601 | if (kvm_mmu_zap_page(kvm, sp)) |
1602 | nn = bucket->first; | ||
1600 | } | 1603 | } |
1601 | } | 1604 | } |
1602 | } | 1605 | } |
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 445c59411ed0..2ba58206812a 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -706,29 +706,28 @@ static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id) | |||
706 | if (err) | 706 | if (err) |
707 | goto free_svm; | 707 | goto free_svm; |
708 | 708 | ||
709 | err = -ENOMEM; | ||
709 | page = alloc_page(GFP_KERNEL); | 710 | page = alloc_page(GFP_KERNEL); |
710 | if (!page) { | 711 | if (!page) |
711 | err = -ENOMEM; | ||
712 | goto uninit; | 712 | goto uninit; |
713 | } | ||
714 | 713 | ||
715 | err = -ENOMEM; | ||
716 | msrpm_pages = alloc_pages(GFP_KERNEL, MSRPM_ALLOC_ORDER); | 714 | msrpm_pages = alloc_pages(GFP_KERNEL, MSRPM_ALLOC_ORDER); |
717 | if (!msrpm_pages) | 715 | if (!msrpm_pages) |
718 | goto uninit; | 716 | goto free_page1; |
719 | 717 | ||
720 | nested_msrpm_pages = alloc_pages(GFP_KERNEL, MSRPM_ALLOC_ORDER); | 718 | nested_msrpm_pages = alloc_pages(GFP_KERNEL, MSRPM_ALLOC_ORDER); |
721 | if (!nested_msrpm_pages) | 719 | if (!nested_msrpm_pages) |
722 | goto uninit; | 720 | goto free_page2; |
723 | |||
724 | svm->msrpm = page_address(msrpm_pages); | ||
725 | svm_vcpu_init_msrpm(svm->msrpm); | ||
726 | 721 | ||
727 | hsave_page = alloc_page(GFP_KERNEL); | 722 | hsave_page = alloc_page(GFP_KERNEL); |
728 | if (!hsave_page) | 723 | if (!hsave_page) |
729 | goto uninit; | 724 | goto free_page3; |
725 | |||
730 | svm->nested.hsave = page_address(hsave_page); | 726 | svm->nested.hsave = page_address(hsave_page); |
731 | 727 | ||
728 | svm->msrpm = page_address(msrpm_pages); | ||
729 | svm_vcpu_init_msrpm(svm->msrpm); | ||
730 | |||
732 | svm->nested.msrpm = page_address(nested_msrpm_pages); | 731 | svm->nested.msrpm = page_address(nested_msrpm_pages); |
733 | 732 | ||
734 | svm->vmcb = page_address(page); | 733 | svm->vmcb = page_address(page); |
@@ -744,6 +743,12 @@ static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id) | |||
744 | 743 | ||
745 | return &svm->vcpu; | 744 | return &svm->vcpu; |
746 | 745 | ||
746 | free_page3: | ||
747 | __free_pages(nested_msrpm_pages, MSRPM_ALLOC_ORDER); | ||
748 | free_page2: | ||
749 | __free_pages(msrpm_pages, MSRPM_ALLOC_ORDER); | ||
750 | free_page1: | ||
751 | __free_page(page); | ||
747 | uninit: | 752 | uninit: |
748 | kvm_vcpu_uninit(&svm->vcpu); | 753 | kvm_vcpu_uninit(&svm->vcpu); |
749 | free_svm: | 754 | free_svm: |
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 82be6dac3d25..32022a8a5c3b 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -77,6 +77,8 @@ module_param(emulate_invalid_guest_state, bool, S_IRUGO); | |||
77 | #define KVM_PMODE_VM_CR4_ALWAYS_ON (X86_CR4_PAE | X86_CR4_VMXE) | 77 | #define KVM_PMODE_VM_CR4_ALWAYS_ON (X86_CR4_PAE | X86_CR4_VMXE) |
78 | #define KVM_RMODE_VM_CR4_ALWAYS_ON (X86_CR4_VME | X86_CR4_PAE | X86_CR4_VMXE) | 78 | #define KVM_RMODE_VM_CR4_ALWAYS_ON (X86_CR4_VME | X86_CR4_PAE | X86_CR4_VMXE) |
79 | 79 | ||
80 | #define RMODE_GUEST_OWNED_EFLAGS_BITS (~(X86_EFLAGS_IOPL | X86_EFLAGS_VM)) | ||
81 | |||
80 | /* | 82 | /* |
81 | * These 2 parameters are used to config the controls for Pause-Loop Exiting: | 83 | * These 2 parameters are used to config the controls for Pause-Loop Exiting: |
82 | * ple_gap: upper bound on the amount of time between two successive | 84 | * ple_gap: upper bound on the amount of time between two successive |
@@ -131,7 +133,7 @@ struct vcpu_vmx { | |||
131 | } host_state; | 133 | } host_state; |
132 | struct { | 134 | struct { |
133 | int vm86_active; | 135 | int vm86_active; |
134 | u8 save_iopl; | 136 | ulong save_rflags; |
135 | struct kvm_save_segment { | 137 | struct kvm_save_segment { |
136 | u16 selector; | 138 | u16 selector; |
137 | unsigned long base; | 139 | unsigned long base; |
@@ -818,18 +820,23 @@ static void vmx_fpu_deactivate(struct kvm_vcpu *vcpu) | |||
818 | 820 | ||
819 | static unsigned long vmx_get_rflags(struct kvm_vcpu *vcpu) | 821 | static unsigned long vmx_get_rflags(struct kvm_vcpu *vcpu) |
820 | { | 822 | { |
821 | unsigned long rflags; | 823 | unsigned long rflags, save_rflags; |
822 | 824 | ||
823 | rflags = vmcs_readl(GUEST_RFLAGS); | 825 | rflags = vmcs_readl(GUEST_RFLAGS); |
824 | if (to_vmx(vcpu)->rmode.vm86_active) | 826 | if (to_vmx(vcpu)->rmode.vm86_active) { |
825 | rflags &= ~(unsigned long)(X86_EFLAGS_IOPL | X86_EFLAGS_VM); | 827 | rflags &= RMODE_GUEST_OWNED_EFLAGS_BITS; |
828 | save_rflags = to_vmx(vcpu)->rmode.save_rflags; | ||
829 | rflags |= save_rflags & ~RMODE_GUEST_OWNED_EFLAGS_BITS; | ||
830 | } | ||
826 | return rflags; | 831 | return rflags; |
827 | } | 832 | } |
828 | 833 | ||
829 | static void vmx_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags) | 834 | static void vmx_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags) |
830 | { | 835 | { |
831 | if (to_vmx(vcpu)->rmode.vm86_active) | 836 | if (to_vmx(vcpu)->rmode.vm86_active) { |
837 | to_vmx(vcpu)->rmode.save_rflags = rflags; | ||
832 | rflags |= X86_EFLAGS_IOPL | X86_EFLAGS_VM; | 838 | rflags |= X86_EFLAGS_IOPL | X86_EFLAGS_VM; |
839 | } | ||
833 | vmcs_writel(GUEST_RFLAGS, rflags); | 840 | vmcs_writel(GUEST_RFLAGS, rflags); |
834 | } | 841 | } |
835 | 842 | ||
@@ -1483,8 +1490,8 @@ static void enter_pmode(struct kvm_vcpu *vcpu) | |||
1483 | vmcs_write32(GUEST_TR_AR_BYTES, vmx->rmode.tr.ar); | 1490 | vmcs_write32(GUEST_TR_AR_BYTES, vmx->rmode.tr.ar); |
1484 | 1491 | ||
1485 | flags = vmcs_readl(GUEST_RFLAGS); | 1492 | flags = vmcs_readl(GUEST_RFLAGS); |
1486 | flags &= ~(X86_EFLAGS_IOPL | X86_EFLAGS_VM); | 1493 | flags &= RMODE_GUEST_OWNED_EFLAGS_BITS; |
1487 | flags |= (vmx->rmode.save_iopl << IOPL_SHIFT); | 1494 | flags |= vmx->rmode.save_rflags & ~RMODE_GUEST_OWNED_EFLAGS_BITS; |
1488 | vmcs_writel(GUEST_RFLAGS, flags); | 1495 | vmcs_writel(GUEST_RFLAGS, flags); |
1489 | 1496 | ||
1490 | vmcs_writel(GUEST_CR4, (vmcs_readl(GUEST_CR4) & ~X86_CR4_VME) | | 1497 | vmcs_writel(GUEST_CR4, (vmcs_readl(GUEST_CR4) & ~X86_CR4_VME) | |
@@ -1557,8 +1564,7 @@ static void enter_rmode(struct kvm_vcpu *vcpu) | |||
1557 | vmcs_write32(GUEST_TR_AR_BYTES, 0x008b); | 1564 | vmcs_write32(GUEST_TR_AR_BYTES, 0x008b); |
1558 | 1565 | ||
1559 | flags = vmcs_readl(GUEST_RFLAGS); | 1566 | flags = vmcs_readl(GUEST_RFLAGS); |
1560 | vmx->rmode.save_iopl | 1567 | vmx->rmode.save_rflags = flags; |
1561 | = (flags & X86_EFLAGS_IOPL) >> IOPL_SHIFT; | ||
1562 | 1568 | ||
1563 | flags |= X86_EFLAGS_IOPL | X86_EFLAGS_VM; | 1569 | flags |= X86_EFLAGS_IOPL | X86_EFLAGS_VM; |
1564 | 1570 | ||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 21b9b6aa3e88..73d854c36e39 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -434,8 +434,6 @@ void kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) | |||
434 | 434 | ||
435 | #ifdef CONFIG_X86_64 | 435 | #ifdef CONFIG_X86_64 |
436 | if (cr0 & 0xffffffff00000000UL) { | 436 | if (cr0 & 0xffffffff00000000UL) { |
437 | printk(KERN_DEBUG "set_cr0: 0x%lx #GP, reserved bits 0x%lx\n", | ||
438 | cr0, kvm_read_cr0(vcpu)); | ||
439 | kvm_inject_gp(vcpu, 0); | 437 | kvm_inject_gp(vcpu, 0); |
440 | return; | 438 | return; |
441 | } | 439 | } |
@@ -444,14 +442,11 @@ void kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) | |||
444 | cr0 &= ~CR0_RESERVED_BITS; | 442 | cr0 &= ~CR0_RESERVED_BITS; |
445 | 443 | ||
446 | if ((cr0 & X86_CR0_NW) && !(cr0 & X86_CR0_CD)) { | 444 | if ((cr0 & X86_CR0_NW) && !(cr0 & X86_CR0_CD)) { |
447 | printk(KERN_DEBUG "set_cr0: #GP, CD == 0 && NW == 1\n"); | ||
448 | kvm_inject_gp(vcpu, 0); | 445 | kvm_inject_gp(vcpu, 0); |
449 | return; | 446 | return; |
450 | } | 447 | } |
451 | 448 | ||
452 | if ((cr0 & X86_CR0_PG) && !(cr0 & X86_CR0_PE)) { | 449 | if ((cr0 & X86_CR0_PG) && !(cr0 & X86_CR0_PE)) { |
453 | printk(KERN_DEBUG "set_cr0: #GP, set PG flag " | ||
454 | "and a clear PE flag\n"); | ||
455 | kvm_inject_gp(vcpu, 0); | 450 | kvm_inject_gp(vcpu, 0); |
456 | return; | 451 | return; |
457 | } | 452 | } |
@@ -462,15 +457,11 @@ void kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) | |||
462 | int cs_db, cs_l; | 457 | int cs_db, cs_l; |
463 | 458 | ||
464 | if (!is_pae(vcpu)) { | 459 | if (!is_pae(vcpu)) { |
465 | printk(KERN_DEBUG "set_cr0: #GP, start paging " | ||
466 | "in long mode while PAE is disabled\n"); | ||
467 | kvm_inject_gp(vcpu, 0); | 460 | kvm_inject_gp(vcpu, 0); |
468 | return; | 461 | return; |
469 | } | 462 | } |
470 | kvm_x86_ops->get_cs_db_l_bits(vcpu, &cs_db, &cs_l); | 463 | kvm_x86_ops->get_cs_db_l_bits(vcpu, &cs_db, &cs_l); |
471 | if (cs_l) { | 464 | if (cs_l) { |
472 | printk(KERN_DEBUG "set_cr0: #GP, start paging " | ||
473 | "in long mode while CS.L == 1\n"); | ||
474 | kvm_inject_gp(vcpu, 0); | 465 | kvm_inject_gp(vcpu, 0); |
475 | return; | 466 | return; |
476 | 467 | ||
@@ -478,8 +469,6 @@ void kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) | |||
478 | } else | 469 | } else |
479 | #endif | 470 | #endif |
480 | if (is_pae(vcpu) && !load_pdptrs(vcpu, vcpu->arch.cr3)) { | 471 | if (is_pae(vcpu) && !load_pdptrs(vcpu, vcpu->arch.cr3)) { |
481 | printk(KERN_DEBUG "set_cr0: #GP, pdptrs " | ||
482 | "reserved bits\n"); | ||
483 | kvm_inject_gp(vcpu, 0); | 472 | kvm_inject_gp(vcpu, 0); |
484 | return; | 473 | return; |
485 | } | 474 | } |
@@ -506,28 +495,23 @@ void kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4) | |||
506 | unsigned long pdptr_bits = X86_CR4_PGE | X86_CR4_PSE | X86_CR4_PAE; | 495 | unsigned long pdptr_bits = X86_CR4_PGE | X86_CR4_PSE | X86_CR4_PAE; |
507 | 496 | ||
508 | if (cr4 & CR4_RESERVED_BITS) { | 497 | if (cr4 & CR4_RESERVED_BITS) { |
509 | printk(KERN_DEBUG "set_cr4: #GP, reserved bits\n"); | ||
510 | kvm_inject_gp(vcpu, 0); | 498 | kvm_inject_gp(vcpu, 0); |
511 | return; | 499 | return; |
512 | } | 500 | } |
513 | 501 | ||
514 | if (is_long_mode(vcpu)) { | 502 | if (is_long_mode(vcpu)) { |
515 | if (!(cr4 & X86_CR4_PAE)) { | 503 | if (!(cr4 & X86_CR4_PAE)) { |
516 | printk(KERN_DEBUG "set_cr4: #GP, clearing PAE while " | ||
517 | "in long mode\n"); | ||
518 | kvm_inject_gp(vcpu, 0); | 504 | kvm_inject_gp(vcpu, 0); |
519 | return; | 505 | return; |
520 | } | 506 | } |
521 | } else if (is_paging(vcpu) && (cr4 & X86_CR4_PAE) | 507 | } else if (is_paging(vcpu) && (cr4 & X86_CR4_PAE) |
522 | && ((cr4 ^ old_cr4) & pdptr_bits) | 508 | && ((cr4 ^ old_cr4) & pdptr_bits) |
523 | && !load_pdptrs(vcpu, vcpu->arch.cr3)) { | 509 | && !load_pdptrs(vcpu, vcpu->arch.cr3)) { |
524 | printk(KERN_DEBUG "set_cr4: #GP, pdptrs reserved bits\n"); | ||
525 | kvm_inject_gp(vcpu, 0); | 510 | kvm_inject_gp(vcpu, 0); |
526 | return; | 511 | return; |
527 | } | 512 | } |
528 | 513 | ||
529 | if (cr4 & X86_CR4_VMXE) { | 514 | if (cr4 & X86_CR4_VMXE) { |
530 | printk(KERN_DEBUG "set_cr4: #GP, setting VMXE\n"); | ||
531 | kvm_inject_gp(vcpu, 0); | 515 | kvm_inject_gp(vcpu, 0); |
532 | return; | 516 | return; |
533 | } | 517 | } |
@@ -548,21 +532,16 @@ void kvm_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3) | |||
548 | 532 | ||
549 | if (is_long_mode(vcpu)) { | 533 | if (is_long_mode(vcpu)) { |
550 | if (cr3 & CR3_L_MODE_RESERVED_BITS) { | 534 | if (cr3 & CR3_L_MODE_RESERVED_BITS) { |
551 | printk(KERN_DEBUG "set_cr3: #GP, reserved bits\n"); | ||
552 | kvm_inject_gp(vcpu, 0); | 535 | kvm_inject_gp(vcpu, 0); |
553 | return; | 536 | return; |
554 | } | 537 | } |
555 | } else { | 538 | } else { |
556 | if (is_pae(vcpu)) { | 539 | if (is_pae(vcpu)) { |
557 | if (cr3 & CR3_PAE_RESERVED_BITS) { | 540 | if (cr3 & CR3_PAE_RESERVED_BITS) { |
558 | printk(KERN_DEBUG | ||
559 | "set_cr3: #GP, reserved bits\n"); | ||
560 | kvm_inject_gp(vcpu, 0); | 541 | kvm_inject_gp(vcpu, 0); |
561 | return; | 542 | return; |
562 | } | 543 | } |
563 | if (is_paging(vcpu) && !load_pdptrs(vcpu, cr3)) { | 544 | if (is_paging(vcpu) && !load_pdptrs(vcpu, cr3)) { |
564 | printk(KERN_DEBUG "set_cr3: #GP, pdptrs " | ||
565 | "reserved bits\n"); | ||
566 | kvm_inject_gp(vcpu, 0); | 545 | kvm_inject_gp(vcpu, 0); |
567 | return; | 546 | return; |
568 | } | 547 | } |
@@ -594,7 +573,6 @@ EXPORT_SYMBOL_GPL(kvm_set_cr3); | |||
594 | void kvm_set_cr8(struct kvm_vcpu *vcpu, unsigned long cr8) | 573 | void kvm_set_cr8(struct kvm_vcpu *vcpu, unsigned long cr8) |
595 | { | 574 | { |
596 | if (cr8 & CR8_RESERVED_BITS) { | 575 | if (cr8 & CR8_RESERVED_BITS) { |
597 | printk(KERN_DEBUG "set_cr8: #GP, reserved bits 0x%lx\n", cr8); | ||
598 | kvm_inject_gp(vcpu, 0); | 576 | kvm_inject_gp(vcpu, 0); |
599 | return; | 577 | return; |
600 | } | 578 | } |
@@ -650,15 +628,12 @@ static u32 emulated_msrs[] = { | |||
650 | static void set_efer(struct kvm_vcpu *vcpu, u64 efer) | 628 | static void set_efer(struct kvm_vcpu *vcpu, u64 efer) |
651 | { | 629 | { |
652 | if (efer & efer_reserved_bits) { | 630 | if (efer & efer_reserved_bits) { |
653 | printk(KERN_DEBUG "set_efer: 0x%llx #GP, reserved bits\n", | ||
654 | efer); | ||
655 | kvm_inject_gp(vcpu, 0); | 631 | kvm_inject_gp(vcpu, 0); |
656 | return; | 632 | return; |
657 | } | 633 | } |
658 | 634 | ||
659 | if (is_paging(vcpu) | 635 | if (is_paging(vcpu) |
660 | && (vcpu->arch.efer & EFER_LME) != (efer & EFER_LME)) { | 636 | && (vcpu->arch.efer & EFER_LME) != (efer & EFER_LME)) { |
661 | printk(KERN_DEBUG "set_efer: #GP, change LME while paging\n"); | ||
662 | kvm_inject_gp(vcpu, 0); | 637 | kvm_inject_gp(vcpu, 0); |
663 | return; | 638 | return; |
664 | } | 639 | } |
@@ -668,7 +643,6 @@ static void set_efer(struct kvm_vcpu *vcpu, u64 efer) | |||
668 | 643 | ||
669 | feat = kvm_find_cpuid_entry(vcpu, 0x80000001, 0); | 644 | feat = kvm_find_cpuid_entry(vcpu, 0x80000001, 0); |
670 | if (!feat || !(feat->edx & bit(X86_FEATURE_FXSR_OPT))) { | 645 | if (!feat || !(feat->edx & bit(X86_FEATURE_FXSR_OPT))) { |
671 | printk(KERN_DEBUG "set_efer: #GP, enable FFXSR w/o CPUID capability\n"); | ||
672 | kvm_inject_gp(vcpu, 0); | 646 | kvm_inject_gp(vcpu, 0); |
673 | return; | 647 | return; |
674 | } | 648 | } |
@@ -679,7 +653,6 @@ static void set_efer(struct kvm_vcpu *vcpu, u64 efer) | |||
679 | 653 | ||
680 | feat = kvm_find_cpuid_entry(vcpu, 0x80000001, 0); | 654 | feat = kvm_find_cpuid_entry(vcpu, 0x80000001, 0); |
681 | if (!feat || !(feat->ecx & bit(X86_FEATURE_SVM))) { | 655 | if (!feat || !(feat->ecx & bit(X86_FEATURE_SVM))) { |
682 | printk(KERN_DEBUG "set_efer: #GP, enable SVM w/o SVM\n"); | ||
683 | kvm_inject_gp(vcpu, 0); | 656 | kvm_inject_gp(vcpu, 0); |
684 | return; | 657 | return; |
685 | } | 658 | } |
@@ -968,9 +941,13 @@ static int set_msr_mce(struct kvm_vcpu *vcpu, u32 msr, u64 data) | |||
968 | if (msr >= MSR_IA32_MC0_CTL && | 941 | if (msr >= MSR_IA32_MC0_CTL && |
969 | msr < MSR_IA32_MC0_CTL + 4 * bank_num) { | 942 | msr < MSR_IA32_MC0_CTL + 4 * bank_num) { |
970 | u32 offset = msr - MSR_IA32_MC0_CTL; | 943 | u32 offset = msr - MSR_IA32_MC0_CTL; |
971 | /* only 0 or all 1s can be written to IA32_MCi_CTL */ | 944 | /* only 0 or all 1s can be written to IA32_MCi_CTL |
945 | * some Linux kernels though clear bit 10 in bank 4 to | ||
946 | * workaround a BIOS/GART TBL issue on AMD K8s, ignore | ||
947 | * this to avoid an uncatched #GP in the guest | ||
948 | */ | ||
972 | if ((offset & 0x3) == 0 && | 949 | if ((offset & 0x3) == 0 && |
973 | data != 0 && data != ~(u64)0) | 950 | data != 0 && (data | (1 << 10)) != ~(u64)0) |
974 | return -1; | 951 | return -1; |
975 | vcpu->arch.mce_banks[offset] = data; | 952 | vcpu->arch.mce_banks[offset] = data; |
976 | break; | 953 | break; |
@@ -2636,8 +2613,9 @@ static int kvm_vm_ioctl_reinject(struct kvm *kvm, | |||
2636 | int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, | 2613 | int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, |
2637 | struct kvm_dirty_log *log) | 2614 | struct kvm_dirty_log *log) |
2638 | { | 2615 | { |
2639 | int r, n, i; | 2616 | int r, i; |
2640 | struct kvm_memory_slot *memslot; | 2617 | struct kvm_memory_slot *memslot; |
2618 | unsigned long n; | ||
2641 | unsigned long is_dirty = 0; | 2619 | unsigned long is_dirty = 0; |
2642 | unsigned long *dirty_bitmap = NULL; | 2620 | unsigned long *dirty_bitmap = NULL; |
2643 | 2621 | ||
@@ -2652,7 +2630,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, | |||
2652 | if (!memslot->dirty_bitmap) | 2630 | if (!memslot->dirty_bitmap) |
2653 | goto out; | 2631 | goto out; |
2654 | 2632 | ||
2655 | n = ALIGN(memslot->npages, BITS_PER_LONG) / 8; | 2633 | n = kvm_dirty_bitmap_bytes(memslot); |
2656 | 2634 | ||
2657 | r = -ENOMEM; | 2635 | r = -ENOMEM; |
2658 | dirty_bitmap = vmalloc(n); | 2636 | dirty_bitmap = vmalloc(n); |
@@ -4533,7 +4511,9 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
4533 | kvm_set_cr8(vcpu, kvm_run->cr8); | 4511 | kvm_set_cr8(vcpu, kvm_run->cr8); |
4534 | 4512 | ||
4535 | if (vcpu->arch.pio.cur_count) { | 4513 | if (vcpu->arch.pio.cur_count) { |
4514 | vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu); | ||
4536 | r = complete_pio(vcpu); | 4515 | r = complete_pio(vcpu); |
4516 | srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx); | ||
4537 | if (r) | 4517 | if (r) |
4538 | goto out; | 4518 | goto out; |
4539 | } | 4519 | } |
@@ -5196,6 +5176,7 @@ int kvm_task_switch(struct kvm_vcpu *vcpu, u16 tss_selector, int reason) | |||
5196 | int ret = 0; | 5176 | int ret = 0; |
5197 | u32 old_tss_base = get_segment_base(vcpu, VCPU_SREG_TR); | 5177 | u32 old_tss_base = get_segment_base(vcpu, VCPU_SREG_TR); |
5198 | u16 old_tss_sel = get_segment_selector(vcpu, VCPU_SREG_TR); | 5178 | u16 old_tss_sel = get_segment_selector(vcpu, VCPU_SREG_TR); |
5179 | u32 desc_limit; | ||
5199 | 5180 | ||
5200 | old_tss_base = kvm_mmu_gva_to_gpa_write(vcpu, old_tss_base, NULL); | 5181 | old_tss_base = kvm_mmu_gva_to_gpa_write(vcpu, old_tss_base, NULL); |
5201 | 5182 | ||
@@ -5218,7 +5199,10 @@ int kvm_task_switch(struct kvm_vcpu *vcpu, u16 tss_selector, int reason) | |||
5218 | } | 5199 | } |
5219 | } | 5200 | } |
5220 | 5201 | ||
5221 | if (!nseg_desc.p || get_desc_limit(&nseg_desc) < 0x67) { | 5202 | desc_limit = get_desc_limit(&nseg_desc); |
5203 | if (!nseg_desc.p || | ||
5204 | ((desc_limit < 0x67 && (nseg_desc.type & 8)) || | ||
5205 | desc_limit < 0x2b)) { | ||
5222 | kvm_queue_exception_e(vcpu, TS_VECTOR, tss_selector & 0xfffc); | 5206 | kvm_queue_exception_e(vcpu, TS_VECTOR, tss_selector & 0xfffc); |
5223 | return 1; | 5207 | return 1; |
5224 | } | 5208 | } |
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index 7e59dc1d3fc2..2bdf628066bd 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -115,7 +115,7 @@ static void async_hcall(unsigned long call, unsigned long arg1, | |||
115 | local_irq_save(flags); | 115 | local_irq_save(flags); |
116 | if (lguest_data.hcall_status[next_call] != 0xFF) { | 116 | if (lguest_data.hcall_status[next_call] != 0xFF) { |
117 | /* Table full, so do normal hcall which will flush table. */ | 117 | /* Table full, so do normal hcall which will flush table. */ |
118 | kvm_hypercall4(call, arg1, arg2, arg3, arg4); | 118 | hcall(call, arg1, arg2, arg3, arg4); |
119 | } else { | 119 | } else { |
120 | lguest_data.hcalls[next_call].arg0 = call; | 120 | lguest_data.hcalls[next_call].arg0 = call; |
121 | lguest_data.hcalls[next_call].arg1 = arg1; | 121 | lguest_data.hcalls[next_call].arg1 = arg1; |
@@ -145,46 +145,45 @@ static void async_hcall(unsigned long call, unsigned long arg1, | |||
145 | * So, when we're in lazy mode, we call async_hcall() to store the call for | 145 | * So, when we're in lazy mode, we call async_hcall() to store the call for |
146 | * future processing: | 146 | * future processing: |
147 | */ | 147 | */ |
148 | static void lazy_hcall1(unsigned long call, | 148 | static void lazy_hcall1(unsigned long call, unsigned long arg1) |
149 | unsigned long arg1) | ||
150 | { | 149 | { |
151 | if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE) | 150 | if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE) |
152 | kvm_hypercall1(call, arg1); | 151 | hcall(call, arg1, 0, 0, 0); |
153 | else | 152 | else |
154 | async_hcall(call, arg1, 0, 0, 0); | 153 | async_hcall(call, arg1, 0, 0, 0); |
155 | } | 154 | } |
156 | 155 | ||
157 | /* You can imagine what lazy_hcall2, 3 and 4 look like. :*/ | 156 | /* You can imagine what lazy_hcall2, 3 and 4 look like. :*/ |
158 | static void lazy_hcall2(unsigned long call, | 157 | static void lazy_hcall2(unsigned long call, |
159 | unsigned long arg1, | 158 | unsigned long arg1, |
160 | unsigned long arg2) | 159 | unsigned long arg2) |
161 | { | 160 | { |
162 | if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE) | 161 | if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE) |
163 | kvm_hypercall2(call, arg1, arg2); | 162 | hcall(call, arg1, arg2, 0, 0); |
164 | else | 163 | else |
165 | async_hcall(call, arg1, arg2, 0, 0); | 164 | async_hcall(call, arg1, arg2, 0, 0); |
166 | } | 165 | } |
167 | 166 | ||
168 | static void lazy_hcall3(unsigned long call, | 167 | static void lazy_hcall3(unsigned long call, |
169 | unsigned long arg1, | 168 | unsigned long arg1, |
170 | unsigned long arg2, | 169 | unsigned long arg2, |
171 | unsigned long arg3) | 170 | unsigned long arg3) |
172 | { | 171 | { |
173 | if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE) | 172 | if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE) |
174 | kvm_hypercall3(call, arg1, arg2, arg3); | 173 | hcall(call, arg1, arg2, arg3, 0); |
175 | else | 174 | else |
176 | async_hcall(call, arg1, arg2, arg3, 0); | 175 | async_hcall(call, arg1, arg2, arg3, 0); |
177 | } | 176 | } |
178 | 177 | ||
179 | #ifdef CONFIG_X86_PAE | 178 | #ifdef CONFIG_X86_PAE |
180 | static void lazy_hcall4(unsigned long call, | 179 | static void lazy_hcall4(unsigned long call, |
181 | unsigned long arg1, | 180 | unsigned long arg1, |
182 | unsigned long arg2, | 181 | unsigned long arg2, |
183 | unsigned long arg3, | 182 | unsigned long arg3, |
184 | unsigned long arg4) | 183 | unsigned long arg4) |
185 | { | 184 | { |
186 | if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE) | 185 | if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE) |
187 | kvm_hypercall4(call, arg1, arg2, arg3, arg4); | 186 | hcall(call, arg1, arg2, arg3, arg4); |
188 | else | 187 | else |
189 | async_hcall(call, arg1, arg2, arg3, arg4); | 188 | async_hcall(call, arg1, arg2, arg3, arg4); |
190 | } | 189 | } |
@@ -196,13 +195,13 @@ static void lazy_hcall4(unsigned long call, | |||
196 | :*/ | 195 | :*/ |
197 | static void lguest_leave_lazy_mmu_mode(void) | 196 | static void lguest_leave_lazy_mmu_mode(void) |
198 | { | 197 | { |
199 | kvm_hypercall0(LHCALL_FLUSH_ASYNC); | 198 | hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0, 0); |
200 | paravirt_leave_lazy_mmu(); | 199 | paravirt_leave_lazy_mmu(); |
201 | } | 200 | } |
202 | 201 | ||
203 | static void lguest_end_context_switch(struct task_struct *next) | 202 | static void lguest_end_context_switch(struct task_struct *next) |
204 | { | 203 | { |
205 | kvm_hypercall0(LHCALL_FLUSH_ASYNC); | 204 | hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0, 0); |
206 | paravirt_end_context_switch(next); | 205 | paravirt_end_context_switch(next); |
207 | } | 206 | } |
208 | 207 | ||
@@ -286,7 +285,7 @@ static void lguest_write_idt_entry(gate_desc *dt, | |||
286 | /* Keep the local copy up to date. */ | 285 | /* Keep the local copy up to date. */ |
287 | native_write_idt_entry(dt, entrynum, g); | 286 | native_write_idt_entry(dt, entrynum, g); |
288 | /* Tell Host about this new entry. */ | 287 | /* Tell Host about this new entry. */ |
289 | kvm_hypercall3(LHCALL_LOAD_IDT_ENTRY, entrynum, desc[0], desc[1]); | 288 | hcall(LHCALL_LOAD_IDT_ENTRY, entrynum, desc[0], desc[1], 0); |
290 | } | 289 | } |
291 | 290 | ||
292 | /* | 291 | /* |
@@ -300,7 +299,7 @@ static void lguest_load_idt(const struct desc_ptr *desc) | |||
300 | struct desc_struct *idt = (void *)desc->address; | 299 | struct desc_struct *idt = (void *)desc->address; |
301 | 300 | ||
302 | for (i = 0; i < (desc->size+1)/8; i++) | 301 | for (i = 0; i < (desc->size+1)/8; i++) |
303 | kvm_hypercall3(LHCALL_LOAD_IDT_ENTRY, i, idt[i].a, idt[i].b); | 302 | hcall(LHCALL_LOAD_IDT_ENTRY, i, idt[i].a, idt[i].b, 0); |
304 | } | 303 | } |
305 | 304 | ||
306 | /* | 305 | /* |
@@ -321,7 +320,7 @@ static void lguest_load_gdt(const struct desc_ptr *desc) | |||
321 | struct desc_struct *gdt = (void *)desc->address; | 320 | struct desc_struct *gdt = (void *)desc->address; |
322 | 321 | ||
323 | for (i = 0; i < (desc->size+1)/8; i++) | 322 | for (i = 0; i < (desc->size+1)/8; i++) |
324 | kvm_hypercall3(LHCALL_LOAD_GDT_ENTRY, i, gdt[i].a, gdt[i].b); | 323 | hcall(LHCALL_LOAD_GDT_ENTRY, i, gdt[i].a, gdt[i].b, 0); |
325 | } | 324 | } |
326 | 325 | ||
327 | /* | 326 | /* |
@@ -334,8 +333,8 @@ static void lguest_write_gdt_entry(struct desc_struct *dt, int entrynum, | |||
334 | { | 333 | { |
335 | native_write_gdt_entry(dt, entrynum, desc, type); | 334 | native_write_gdt_entry(dt, entrynum, desc, type); |
336 | /* Tell Host about this new entry. */ | 335 | /* Tell Host about this new entry. */ |
337 | kvm_hypercall3(LHCALL_LOAD_GDT_ENTRY, entrynum, | 336 | hcall(LHCALL_LOAD_GDT_ENTRY, entrynum, |
338 | dt[entrynum].a, dt[entrynum].b); | 337 | dt[entrynum].a, dt[entrynum].b, 0); |
339 | } | 338 | } |
340 | 339 | ||
341 | /* | 340 | /* |
@@ -931,7 +930,7 @@ static int lguest_clockevent_set_next_event(unsigned long delta, | |||
931 | } | 930 | } |
932 | 931 | ||
933 | /* Please wake us this far in the future. */ | 932 | /* Please wake us this far in the future. */ |
934 | kvm_hypercall1(LHCALL_SET_CLOCKEVENT, delta); | 933 | hcall(LHCALL_SET_CLOCKEVENT, delta, 0, 0, 0); |
935 | return 0; | 934 | return 0; |
936 | } | 935 | } |
937 | 936 | ||
@@ -942,7 +941,7 @@ static void lguest_clockevent_set_mode(enum clock_event_mode mode, | |||
942 | case CLOCK_EVT_MODE_UNUSED: | 941 | case CLOCK_EVT_MODE_UNUSED: |
943 | case CLOCK_EVT_MODE_SHUTDOWN: | 942 | case CLOCK_EVT_MODE_SHUTDOWN: |
944 | /* A 0 argument shuts the clock down. */ | 943 | /* A 0 argument shuts the clock down. */ |
945 | kvm_hypercall0(LHCALL_SET_CLOCKEVENT); | 944 | hcall(LHCALL_SET_CLOCKEVENT, 0, 0, 0, 0); |
946 | break; | 945 | break; |
947 | case CLOCK_EVT_MODE_ONESHOT: | 946 | case CLOCK_EVT_MODE_ONESHOT: |
948 | /* This is what we expect. */ | 947 | /* This is what we expect. */ |
@@ -1100,7 +1099,7 @@ static void set_lguest_basic_apic_ops(void) | |||
1100 | /* STOP! Until an interrupt comes in. */ | 1099 | /* STOP! Until an interrupt comes in. */ |
1101 | static void lguest_safe_halt(void) | 1100 | static void lguest_safe_halt(void) |
1102 | { | 1101 | { |
1103 | kvm_hypercall0(LHCALL_HALT); | 1102 | hcall(LHCALL_HALT, 0, 0, 0, 0); |
1104 | } | 1103 | } |
1105 | 1104 | ||
1106 | /* | 1105 | /* |
@@ -1112,8 +1111,8 @@ static void lguest_safe_halt(void) | |||
1112 | */ | 1111 | */ |
1113 | static void lguest_power_off(void) | 1112 | static void lguest_power_off(void) |
1114 | { | 1113 | { |
1115 | kvm_hypercall2(LHCALL_SHUTDOWN, __pa("Power down"), | 1114 | hcall(LHCALL_SHUTDOWN, __pa("Power down"), |
1116 | LGUEST_SHUTDOWN_POWEROFF); | 1115 | LGUEST_SHUTDOWN_POWEROFF, 0, 0); |
1117 | } | 1116 | } |
1118 | 1117 | ||
1119 | /* | 1118 | /* |
@@ -1123,7 +1122,7 @@ static void lguest_power_off(void) | |||
1123 | */ | 1122 | */ |
1124 | static int lguest_panic(struct notifier_block *nb, unsigned long l, void *p) | 1123 | static int lguest_panic(struct notifier_block *nb, unsigned long l, void *p) |
1125 | { | 1124 | { |
1126 | kvm_hypercall2(LHCALL_SHUTDOWN, __pa(p), LGUEST_SHUTDOWN_POWEROFF); | 1125 | hcall(LHCALL_SHUTDOWN, __pa(p), LGUEST_SHUTDOWN_POWEROFF, 0, 0); |
1127 | /* The hcall won't return, but to keep gcc happy, we're "done". */ | 1126 | /* The hcall won't return, but to keep gcc happy, we're "done". */ |
1128 | return NOTIFY_DONE; | 1127 | return NOTIFY_DONE; |
1129 | } | 1128 | } |
@@ -1162,7 +1161,7 @@ static __init int early_put_chars(u32 vtermno, const char *buf, int count) | |||
1162 | len = sizeof(scratch) - 1; | 1161 | len = sizeof(scratch) - 1; |
1163 | scratch[len] = '\0'; | 1162 | scratch[len] = '\0'; |
1164 | memcpy(scratch, buf, len); | 1163 | memcpy(scratch, buf, len); |
1165 | kvm_hypercall1(LHCALL_NOTIFY, __pa(scratch)); | 1164 | hcall(LHCALL_NOTIFY, __pa(scratch), 0, 0, 0); |
1166 | 1165 | ||
1167 | /* This routine returns the number of bytes actually written. */ | 1166 | /* This routine returns the number of bytes actually written. */ |
1168 | return len; | 1167 | return len; |
@@ -1174,7 +1173,7 @@ static __init int early_put_chars(u32 vtermno, const char *buf, int count) | |||
1174 | */ | 1173 | */ |
1175 | static void lguest_restart(char *reason) | 1174 | static void lguest_restart(char *reason) |
1176 | { | 1175 | { |
1177 | kvm_hypercall2(LHCALL_SHUTDOWN, __pa(reason), LGUEST_SHUTDOWN_RESTART); | 1176 | hcall(LHCALL_SHUTDOWN, __pa(reason), LGUEST_SHUTDOWN_RESTART, 0, 0); |
1178 | } | 1177 | } |
1179 | 1178 | ||
1180 | /*G:050 | 1179 | /*G:050 |
diff --git a/arch/x86/lguest/i386_head.S b/arch/x86/lguest/i386_head.S index 27eac0faee48..4f420c2f2d55 100644 --- a/arch/x86/lguest/i386_head.S +++ b/arch/x86/lguest/i386_head.S | |||
@@ -32,7 +32,7 @@ ENTRY(lguest_entry) | |||
32 | */ | 32 | */ |
33 | movl $LHCALL_LGUEST_INIT, %eax | 33 | movl $LHCALL_LGUEST_INIT, %eax |
34 | movl $lguest_data - __PAGE_OFFSET, %ebx | 34 | movl $lguest_data - __PAGE_OFFSET, %ebx |
35 | .byte 0x0f,0x01,0xc1 /* KVM_HYPERCALL */ | 35 | int $LGUEST_TRAP_ENTRY |
36 | 36 | ||
37 | /* Set up the initial stack so we can run C code. */ | 37 | /* Set up the initial stack so we can run C code. */ |
38 | movl $(init_thread_union+THREAD_SIZE),%esp | 38 | movl $(init_thread_union+THREAD_SIZE),%esp |