diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-07 10:50:41 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-07 10:50:41 -0500 |
commit | 5ce2955e04a80da7287dc12f32da7f870039bf8f (patch) | |
tree | 1d8fef77ac0ac767c47550c3ac631037908f7d33 | |
parent | d0631c6e09f51e094ae5aec1eabe81cc63d78178 (diff) | |
parent | 2f12fb20dee7285d8e9b8c1f703c0c1604b2c22e (diff) |
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS fixes from Ralf Baechle:
"Various fixes across the tree. The modpost error due to
virt_addr_valid() not being usable from modules required a number of
preparatory cleanups so a clean fix was possible."
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
MIPS: 64-bit: Fix build if !CONFIG_MODULES
MIPS: Wire up finit_module syscall.
MIPS: Fix modpost error in modules attepting to use virt_addr_valid().
MIPS: page.h: Remove now unnecessary #ifndef __ASSEMBLY__ wrapper.
MIPS: Switch remaining assembler PAGE_SIZE users to <asm/asm-offsets.h>.
MIPS: Include PAGE_S{IZE,HIFT} in <asm/offset.h>.
MIPS: Don't include <asm/page.h> unnecessarily.
MIPS: Fix comment.
Revert "MIPS: Optimise TLB handlers for MIPS32/64 R2 cores."
MIPS: perf: Fix build failure in XLP perf support.
MIPS: Alchemy: Make 32kHz and r4k timer coexist peacefully
-rw-r--r-- | arch/mips/Kconfig | 4 | ||||
-rw-r--r-- | arch/mips/alchemy/common/time.c | 25 | ||||
-rw-r--r-- | arch/mips/include/asm/page.h | 9 | ||||
-rw-r--r-- | arch/mips/include/asm/thread_info.h | 9 | ||||
-rw-r--r-- | arch/mips/include/uapi/asm/unistd.h | 15 | ||||
-rw-r--r-- | arch/mips/kernel/asm-offsets.c | 3 | ||||
-rw-r--r-- | arch/mips/kernel/genex.S | 5 | ||||
-rw-r--r-- | arch/mips/kernel/head.S | 1 | ||||
-rw-r--r-- | arch/mips/kernel/octeon_switch.S | 1 | ||||
-rw-r--r-- | arch/mips/kernel/perf_event_mipsxx.c | 38 | ||||
-rw-r--r-- | arch/mips/kernel/r2300_switch.S | 1 | ||||
-rw-r--r-- | arch/mips/kernel/r4k_switch.S | 1 | ||||
-rw-r--r-- | arch/mips/kernel/relocate_kernel.S | 3 | ||||
-rw-r--r-- | arch/mips/kernel/scall32-o32.S | 1 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-64.S | 1 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-n32.S | 1 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-o32.S | 1 | ||||
-rw-r--r-- | arch/mips/kernel/vmlinux.lds.S | 3 | ||||
-rw-r--r-- | arch/mips/mm/ioremap.c | 6 | ||||
-rw-r--r-- | arch/mips/mm/tlbex-fault.S | 1 | ||||
-rw-r--r-- | arch/mips/mm/tlbex.c | 16 | ||||
-rw-r--r-- | arch/mips/power/hibernate.S | 3 |
22 files changed, 44 insertions, 104 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index b7dc39c6c84..2ac626ab9d4 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -39,8 +39,8 @@ config MIPS | |||
39 | select GENERIC_CLOCKEVENTS | 39 | select GENERIC_CLOCKEVENTS |
40 | select GENERIC_CMOS_UPDATE | 40 | select GENERIC_CMOS_UPDATE |
41 | select HAVE_MOD_ARCH_SPECIFIC | 41 | select HAVE_MOD_ARCH_SPECIFIC |
42 | select MODULES_USE_ELF_REL | 42 | select MODULES_USE_ELF_REL if MODULES |
43 | select MODULES_USE_ELF_RELA if 64BIT | 43 | select MODULES_USE_ELF_RELA if MODULES && 64BIT |
44 | 44 | ||
45 | menu "Machine selection" | 45 | menu "Machine selection" |
46 | 46 | ||
diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c index a7193ae13a5..b67930d1932 100644 --- a/arch/mips/alchemy/common/time.c +++ b/arch/mips/alchemy/common/time.c | |||
@@ -53,7 +53,7 @@ static struct clocksource au1x_counter1_clocksource = { | |||
53 | .read = au1x_counter1_read, | 53 | .read = au1x_counter1_read, |
54 | .mask = CLOCKSOURCE_MASK(32), | 54 | .mask = CLOCKSOURCE_MASK(32), |
55 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 55 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
56 | .rating = 100, | 56 | .rating = 1500, |
57 | }; | 57 | }; |
58 | 58 | ||
59 | static int au1x_rtcmatch2_set_next_event(unsigned long delta, | 59 | static int au1x_rtcmatch2_set_next_event(unsigned long delta, |
@@ -84,7 +84,7 @@ static irqreturn_t au1x_rtcmatch2_irq(int irq, void *dev_id) | |||
84 | static struct clock_event_device au1x_rtcmatch2_clockdev = { | 84 | static struct clock_event_device au1x_rtcmatch2_clockdev = { |
85 | .name = "rtcmatch2", | 85 | .name = "rtcmatch2", |
86 | .features = CLOCK_EVT_FEAT_ONESHOT, | 86 | .features = CLOCK_EVT_FEAT_ONESHOT, |
87 | .rating = 100, | 87 | .rating = 1500, |
88 | .set_next_event = au1x_rtcmatch2_set_next_event, | 88 | .set_next_event = au1x_rtcmatch2_set_next_event, |
89 | .set_mode = au1x_rtcmatch2_set_mode, | 89 | .set_mode = au1x_rtcmatch2_set_mode, |
90 | .cpumask = cpu_all_mask, | 90 | .cpumask = cpu_all_mask, |
@@ -158,20 +158,6 @@ cntr_err: | |||
158 | return -1; | 158 | return -1; |
159 | } | 159 | } |
160 | 160 | ||
161 | static void __init alchemy_setup_c0timer(void) | ||
162 | { | ||
163 | /* | ||
164 | * MIPS kernel assigns 'au1k_wait' to 'cpu_wait' before this | ||
165 | * function is called. Because the Alchemy counters are unusable | ||
166 | * the C0 timekeeping code is installed and use of the 'wait' | ||
167 | * instruction must be prohibited, which is done most easily by | ||
168 | * assigning NULL to cpu_wait. | ||
169 | */ | ||
170 | cpu_wait = NULL; | ||
171 | r4k_clockevent_init(); | ||
172 | init_r4k_clocksource(); | ||
173 | } | ||
174 | |||
175 | static int alchemy_m2inttab[] __initdata = { | 161 | static int alchemy_m2inttab[] __initdata = { |
176 | AU1000_RTC_MATCH2_INT, | 162 | AU1000_RTC_MATCH2_INT, |
177 | AU1500_RTC_MATCH2_INT, | 163 | AU1500_RTC_MATCH2_INT, |
@@ -186,8 +172,7 @@ void __init plat_time_init(void) | |||
186 | int t; | 172 | int t; |
187 | 173 | ||
188 | t = alchemy_get_cputype(); | 174 | t = alchemy_get_cputype(); |
189 | if (t == ALCHEMY_CPU_UNKNOWN) | 175 | if (t == ALCHEMY_CPU_UNKNOWN || |
190 | alchemy_setup_c0timer(); | 176 | alchemy_time_init(alchemy_m2inttab[t])) |
191 | else if (alchemy_time_init(alchemy_m2inttab[t])) | 177 | cpu_wait = NULL; /* wait doesn't work with r4k timer */ |
192 | alchemy_setup_c0timer(); | ||
193 | } | 178 | } |
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h index 31ab10f02ba..dbaec94046d 100644 --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h | |||
@@ -45,8 +45,6 @@ | |||
45 | #define HUGETLB_PAGE_ORDER ({BUILD_BUG(); 0; }) | 45 | #define HUGETLB_PAGE_ORDER ({BUILD_BUG(); 0; }) |
46 | #endif /* CONFIG_MIPS_HUGE_TLB_SUPPORT */ | 46 | #endif /* CONFIG_MIPS_HUGE_TLB_SUPPORT */ |
47 | 47 | ||
48 | #ifndef __ASSEMBLY__ | ||
49 | |||
50 | #include <linux/pfn.h> | 48 | #include <linux/pfn.h> |
51 | #include <asm/io.h> | 49 | #include <asm/io.h> |
52 | 50 | ||
@@ -139,8 +137,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
139 | */ | 137 | */ |
140 | #define ptep_buddy(x) ((pte_t *)((unsigned long)(x) ^ sizeof(pte_t))) | 138 | #define ptep_buddy(x) ((pte_t *)((unsigned long)(x) ^ sizeof(pte_t))) |
141 | 139 | ||
142 | #endif /* !__ASSEMBLY__ */ | ||
143 | |||
144 | /* | 140 | /* |
145 | * __pa()/__va() should be used only during mem init. | 141 | * __pa()/__va() should be used only during mem init. |
146 | */ | 142 | */ |
@@ -202,7 +198,10 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
202 | #endif | 198 | #endif |
203 | 199 | ||
204 | #define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr))) | 200 | #define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr))) |
205 | #define virt_addr_valid(kaddr) pfn_valid(PFN_DOWN(virt_to_phys(kaddr))) | 201 | |
202 | extern int __virt_addr_valid(const volatile void *kaddr); | ||
203 | #define virt_addr_valid(kaddr) \ | ||
204 | __virt_addr_valid((const volatile void *) (kaddr)) | ||
206 | 205 | ||
207 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 206 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
208 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 207 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h index 18806a52061..b2050b9e64b 100644 --- a/arch/mips/include/asm/thread_info.h +++ b/arch/mips/include/asm/thread_info.h | |||
@@ -29,10 +29,11 @@ struct thread_info { | |||
29 | __u32 cpu; /* current CPU */ | 29 | __u32 cpu; /* current CPU */ |
30 | int preempt_count; /* 0 => preemptable, <0 => BUG */ | 30 | int preempt_count; /* 0 => preemptable, <0 => BUG */ |
31 | 31 | ||
32 | mm_segment_t addr_limit; /* thread address space: | 32 | mm_segment_t addr_limit; /* |
33 | 0-0xBFFFFFFF for user-thead | 33 | * thread address space limit: |
34 | 0-0xFFFFFFFF for kernel-thread | 34 | * 0x7fffffff for user-thead |
35 | */ | 35 | * 0xffffffff for kernel-thread |
36 | */ | ||
36 | struct restart_block restart_block; | 37 | struct restart_block restart_block; |
37 | struct pt_regs *regs; | 38 | struct pt_regs *regs; |
38 | }; | 39 | }; |
diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h index cc98a9dcb01..0eebf3c3e03 100644 --- a/arch/mips/include/uapi/asm/unistd.h +++ b/arch/mips/include/uapi/asm/unistd.h | |||
@@ -368,16 +368,17 @@ | |||
368 | #define __NR_process_vm_readv (__NR_Linux + 345) | 368 | #define __NR_process_vm_readv (__NR_Linux + 345) |
369 | #define __NR_process_vm_writev (__NR_Linux + 346) | 369 | #define __NR_process_vm_writev (__NR_Linux + 346) |
370 | #define __NR_kcmp (__NR_Linux + 347) | 370 | #define __NR_kcmp (__NR_Linux + 347) |
371 | #define __NR_finit_module (__NR_Linux + 348) | ||
371 | 372 | ||
372 | /* | 373 | /* |
373 | * Offset of the last Linux o32 flavoured syscall | 374 | * Offset of the last Linux o32 flavoured syscall |
374 | */ | 375 | */ |
375 | #define __NR_Linux_syscalls 347 | 376 | #define __NR_Linux_syscalls 348 |
376 | 377 | ||
377 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 378 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
378 | 379 | ||
379 | #define __NR_O32_Linux 4000 | 380 | #define __NR_O32_Linux 4000 |
380 | #define __NR_O32_Linux_syscalls 347 | 381 | #define __NR_O32_Linux_syscalls 348 |
381 | 382 | ||
382 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 383 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
383 | 384 | ||
@@ -692,16 +693,17 @@ | |||
692 | #define __NR_process_vm_readv (__NR_Linux + 304) | 693 | #define __NR_process_vm_readv (__NR_Linux + 304) |
693 | #define __NR_process_vm_writev (__NR_Linux + 305) | 694 | #define __NR_process_vm_writev (__NR_Linux + 305) |
694 | #define __NR_kcmp (__NR_Linux + 306) | 695 | #define __NR_kcmp (__NR_Linux + 306) |
696 | #define __NR_finit_module (__NR_Linux + 307) | ||
695 | 697 | ||
696 | /* | 698 | /* |
697 | * Offset of the last Linux 64-bit flavoured syscall | 699 | * Offset of the last Linux 64-bit flavoured syscall |
698 | */ | 700 | */ |
699 | #define __NR_Linux_syscalls 306 | 701 | #define __NR_Linux_syscalls 307 |
700 | 702 | ||
701 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 703 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
702 | 704 | ||
703 | #define __NR_64_Linux 5000 | 705 | #define __NR_64_Linux 5000 |
704 | #define __NR_64_Linux_syscalls 306 | 706 | #define __NR_64_Linux_syscalls 307 |
705 | 707 | ||
706 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 708 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
707 | 709 | ||
@@ -1021,15 +1023,16 @@ | |||
1021 | #define __NR_process_vm_readv (__NR_Linux + 309) | 1023 | #define __NR_process_vm_readv (__NR_Linux + 309) |
1022 | #define __NR_process_vm_writev (__NR_Linux + 310) | 1024 | #define __NR_process_vm_writev (__NR_Linux + 310) |
1023 | #define __NR_kcmp (__NR_Linux + 311) | 1025 | #define __NR_kcmp (__NR_Linux + 311) |
1026 | #define __NR_finit_module (__NR_Linux + 312) | ||
1024 | 1027 | ||
1025 | /* | 1028 | /* |
1026 | * Offset of the last N32 flavoured syscall | 1029 | * Offset of the last N32 flavoured syscall |
1027 | */ | 1030 | */ |
1028 | #define __NR_Linux_syscalls 311 | 1031 | #define __NR_Linux_syscalls 312 |
1029 | 1032 | ||
1030 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 1033 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
1031 | 1034 | ||
1032 | #define __NR_N32_Linux 6000 | 1035 | #define __NR_N32_Linux 6000 |
1033 | #define __NR_N32_Linux_syscalls 311 | 1036 | #define __NR_N32_Linux_syscalls 312 |
1034 | 1037 | ||
1035 | #endif /* _UAPI_ASM_UNISTD_H */ | 1038 | #endif /* _UAPI_ASM_UNISTD_H */ |
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c index 9690998d4ef..50285b2c7ff 100644 --- a/arch/mips/kernel/asm-offsets.c +++ b/arch/mips/kernel/asm-offsets.c | |||
@@ -200,6 +200,9 @@ void output_mm_defines(void) | |||
200 | DEFINE(_PTRS_PER_PMD, PTRS_PER_PMD); | 200 | DEFINE(_PTRS_PER_PMD, PTRS_PER_PMD); |
201 | DEFINE(_PTRS_PER_PTE, PTRS_PER_PTE); | 201 | DEFINE(_PTRS_PER_PTE, PTRS_PER_PTE); |
202 | BLANK(); | 202 | BLANK(); |
203 | DEFINE(_PAGE_SHIFT, PAGE_SHIFT); | ||
204 | DEFINE(_PAGE_SIZE, PAGE_SIZE); | ||
205 | BLANK(); | ||
203 | } | 206 | } |
204 | 207 | ||
205 | #ifdef CONFIG_32BIT | 208 | #ifdef CONFIG_32BIT |
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S index 8882e5766f2..8a0096d6281 100644 --- a/arch/mips/kernel/genex.S +++ b/arch/mips/kernel/genex.S | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <asm/mipsregs.h> | 19 | #include <asm/mipsregs.h> |
20 | #include <asm/stackframe.h> | 20 | #include <asm/stackframe.h> |
21 | #include <asm/war.h> | 21 | #include <asm/war.h> |
22 | #include <asm/page.h> | ||
23 | #include <asm/thread_info.h> | 22 | #include <asm/thread_info.h> |
24 | 23 | ||
25 | #define PANIC_PIC(msg) \ | 24 | #define PANIC_PIC(msg) \ |
@@ -483,8 +482,8 @@ NESTED(nmi_handler, PT_SIZE, sp) | |||
483 | MFC0 k1, CP0_ENTRYHI | 482 | MFC0 k1, CP0_ENTRYHI |
484 | andi k1, 0xff /* ASID_MASK */ | 483 | andi k1, 0xff /* ASID_MASK */ |
485 | MFC0 k0, CP0_EPC | 484 | MFC0 k0, CP0_EPC |
486 | PTR_SRL k0, PAGE_SHIFT + 1 | 485 | PTR_SRL k0, _PAGE_SHIFT + 1 |
487 | PTR_SLL k0, PAGE_SHIFT + 1 | 486 | PTR_SLL k0, _PAGE_SHIFT + 1 |
488 | or k1, k0 | 487 | or k1, k0 |
489 | MTC0 k1, CP0_ENTRYHI | 488 | MTC0 k1, CP0_ENTRYHI |
490 | mtc0_tlbw_hazard | 489 | mtc0_tlbw_hazard |
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index ea695d9605e..fcf97312f32 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <asm/asmmacro.h> | 21 | #include <asm/asmmacro.h> |
22 | #include <asm/irqflags.h> | 22 | #include <asm/irqflags.h> |
23 | #include <asm/regdef.h> | 23 | #include <asm/regdef.h> |
24 | #include <asm/page.h> | ||
25 | #include <asm/pgtable-bits.h> | 24 | #include <asm/pgtable-bits.h> |
26 | #include <asm/mipsregs.h> | 25 | #include <asm/mipsregs.h> |
27 | #include <asm/stackframe.h> | 26 | #include <asm/stackframe.h> |
diff --git a/arch/mips/kernel/octeon_switch.S b/arch/mips/kernel/octeon_switch.S index 0441f54b2a6..207f1341578 100644 --- a/arch/mips/kernel/octeon_switch.S +++ b/arch/mips/kernel/octeon_switch.S | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <asm/fpregdef.h> | 15 | #include <asm/fpregdef.h> |
16 | #include <asm/mipsregs.h> | 16 | #include <asm/mipsregs.h> |
17 | #include <asm/asm-offsets.h> | 17 | #include <asm/asm-offsets.h> |
18 | #include <asm/page.h> | ||
19 | #include <asm/pgtable-bits.h> | 18 | #include <asm/pgtable-bits.h> |
20 | #include <asm/regdef.h> | 19 | #include <asm/regdef.h> |
21 | #include <asm/stackframe.h> | 20 | #include <asm/stackframe.h> |
diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c index b14c14d90fc..d9c81c5a6c9 100644 --- a/arch/mips/kernel/perf_event_mipsxx.c +++ b/arch/mips/kernel/perf_event_mipsxx.c | |||
@@ -847,7 +847,6 @@ static const struct mips_perf_event xlp_event_map[PERF_COUNT_HW_MAX] = { | |||
847 | [PERF_COUNT_HW_CACHE_MISSES] = { 0x07, CNTR_ALL }, /* PAPI_L1_ICM */ | 847 | [PERF_COUNT_HW_CACHE_MISSES] = { 0x07, CNTR_ALL }, /* PAPI_L1_ICM */ |
848 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = { 0x1b, CNTR_ALL }, /* PAPI_BR_CN */ | 848 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = { 0x1b, CNTR_ALL }, /* PAPI_BR_CN */ |
849 | [PERF_COUNT_HW_BRANCH_MISSES] = { 0x1c, CNTR_ALL }, /* PAPI_BR_MSP */ | 849 | [PERF_COUNT_HW_BRANCH_MISSES] = { 0x1c, CNTR_ALL }, /* PAPI_BR_MSP */ |
850 | [PERF_COUNT_HW_BUS_CYCLES] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
851 | }; | 850 | }; |
852 | 851 | ||
853 | /* 24K/34K/1004K cores can share the same cache event map. */ | 852 | /* 24K/34K/1004K cores can share the same cache event map. */ |
@@ -1115,24 +1114,12 @@ static const struct mips_perf_event xlp_cache_map | |||
1115 | [C(RESULT_ACCESS)] = { 0x2f, CNTR_ALL }, /* PAPI_L1_DCW */ | 1114 | [C(RESULT_ACCESS)] = { 0x2f, CNTR_ALL }, /* PAPI_L1_DCW */ |
1116 | [C(RESULT_MISS)] = { 0x2e, CNTR_ALL }, /* PAPI_L1_STM */ | 1115 | [C(RESULT_MISS)] = { 0x2e, CNTR_ALL }, /* PAPI_L1_STM */ |
1117 | }, | 1116 | }, |
1118 | [C(OP_PREFETCH)] = { | ||
1119 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1120 | [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1121 | }, | ||
1122 | }, | 1117 | }, |
1123 | [C(L1I)] = { | 1118 | [C(L1I)] = { |
1124 | [C(OP_READ)] = { | 1119 | [C(OP_READ)] = { |
1125 | [C(RESULT_ACCESS)] = { 0x04, CNTR_ALL }, /* PAPI_L1_ICA */ | 1120 | [C(RESULT_ACCESS)] = { 0x04, CNTR_ALL }, /* PAPI_L1_ICA */ |
1126 | [C(RESULT_MISS)] = { 0x07, CNTR_ALL }, /* PAPI_L1_ICM */ | 1121 | [C(RESULT_MISS)] = { 0x07, CNTR_ALL }, /* PAPI_L1_ICM */ |
1127 | }, | 1122 | }, |
1128 | [C(OP_WRITE)] = { | ||
1129 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1130 | [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1131 | }, | ||
1132 | [C(OP_PREFETCH)] = { | ||
1133 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1134 | [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1135 | }, | ||
1136 | }, | 1123 | }, |
1137 | [C(LL)] = { | 1124 | [C(LL)] = { |
1138 | [C(OP_READ)] = { | 1125 | [C(OP_READ)] = { |
@@ -1143,10 +1130,6 @@ static const struct mips_perf_event xlp_cache_map | |||
1143 | [C(RESULT_ACCESS)] = { 0x34, CNTR_ALL }, /* PAPI_L2_DCA */ | 1130 | [C(RESULT_ACCESS)] = { 0x34, CNTR_ALL }, /* PAPI_L2_DCA */ |
1144 | [C(RESULT_MISS)] = { 0x36, CNTR_ALL }, /* PAPI_L2_DCM */ | 1131 | [C(RESULT_MISS)] = { 0x36, CNTR_ALL }, /* PAPI_L2_DCM */ |
1145 | }, | 1132 | }, |
1146 | [C(OP_PREFETCH)] = { | ||
1147 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1148 | [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1149 | }, | ||
1150 | }, | 1133 | }, |
1151 | [C(DTLB)] = { | 1134 | [C(DTLB)] = { |
1152 | /* | 1135 | /* |
@@ -1154,45 +1137,24 @@ static const struct mips_perf_event xlp_cache_map | |||
1154 | * read and write. | 1137 | * read and write. |
1155 | */ | 1138 | */ |
1156 | [C(OP_READ)] = { | 1139 | [C(OP_READ)] = { |
1157 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1158 | [C(RESULT_MISS)] = { 0x2d, CNTR_ALL }, /* PAPI_TLB_DM */ | 1140 | [C(RESULT_MISS)] = { 0x2d, CNTR_ALL }, /* PAPI_TLB_DM */ |
1159 | }, | 1141 | }, |
1160 | [C(OP_WRITE)] = { | 1142 | [C(OP_WRITE)] = { |
1161 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1162 | [C(RESULT_MISS)] = { 0x2d, CNTR_ALL }, /* PAPI_TLB_DM */ | 1143 | [C(RESULT_MISS)] = { 0x2d, CNTR_ALL }, /* PAPI_TLB_DM */ |
1163 | }, | 1144 | }, |
1164 | [C(OP_PREFETCH)] = { | ||
1165 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1166 | [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1167 | }, | ||
1168 | }, | 1145 | }, |
1169 | [C(ITLB)] = { | 1146 | [C(ITLB)] = { |
1170 | [C(OP_READ)] = { | 1147 | [C(OP_READ)] = { |
1171 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1172 | [C(RESULT_MISS)] = { 0x08, CNTR_ALL }, /* PAPI_TLB_IM */ | 1148 | [C(RESULT_MISS)] = { 0x08, CNTR_ALL }, /* PAPI_TLB_IM */ |
1173 | }, | 1149 | }, |
1174 | [C(OP_WRITE)] = { | 1150 | [C(OP_WRITE)] = { |
1175 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1176 | [C(RESULT_MISS)] = { 0x08, CNTR_ALL }, /* PAPI_TLB_IM */ | 1151 | [C(RESULT_MISS)] = { 0x08, CNTR_ALL }, /* PAPI_TLB_IM */ |
1177 | }, | 1152 | }, |
1178 | [C(OP_PREFETCH)] = { | ||
1179 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1180 | [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1181 | }, | ||
1182 | }, | 1153 | }, |
1183 | [C(BPU)] = { | 1154 | [C(BPU)] = { |
1184 | [C(OP_READ)] = { | 1155 | [C(OP_READ)] = { |
1185 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1186 | [C(RESULT_MISS)] = { 0x25, CNTR_ALL }, | 1156 | [C(RESULT_MISS)] = { 0x25, CNTR_ALL }, |
1187 | }, | 1157 | }, |
1188 | [C(OP_WRITE)] = { | ||
1189 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1190 | [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1191 | }, | ||
1192 | [C(OP_PREFETCH)] = { | ||
1193 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1194 | [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
1195 | }, | ||
1196 | }, | 1158 | }, |
1197 | }; | 1159 | }; |
1198 | 1160 | ||
diff --git a/arch/mips/kernel/r2300_switch.S b/arch/mips/kernel/r2300_switch.S index 9c51be5a163..8d32d5a6b46 100644 --- a/arch/mips/kernel/r2300_switch.S +++ b/arch/mips/kernel/r2300_switch.S | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <asm/fpregdef.h> | 15 | #include <asm/fpregdef.h> |
16 | #include <asm/mipsregs.h> | 16 | #include <asm/mipsregs.h> |
17 | #include <asm/asm-offsets.h> | 17 | #include <asm/asm-offsets.h> |
18 | #include <asm/page.h> | ||
19 | #include <asm/regdef.h> | 18 | #include <asm/regdef.h> |
20 | #include <asm/stackframe.h> | 19 | #include <asm/stackframe.h> |
21 | #include <asm/thread_info.h> | 20 | #include <asm/thread_info.h> |
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S index 42d2a393842..8decdfacb44 100644 --- a/arch/mips/kernel/r4k_switch.S +++ b/arch/mips/kernel/r4k_switch.S | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <asm/fpregdef.h> | 15 | #include <asm/fpregdef.h> |
16 | #include <asm/mipsregs.h> | 16 | #include <asm/mipsregs.h> |
17 | #include <asm/asm-offsets.h> | 17 | #include <asm/asm-offsets.h> |
18 | #include <asm/page.h> | ||
19 | #include <asm/pgtable-bits.h> | 18 | #include <asm/pgtable-bits.h> |
20 | #include <asm/regdef.h> | 19 | #include <asm/regdef.h> |
21 | #include <asm/stackframe.h> | 20 | #include <asm/stackframe.h> |
diff --git a/arch/mips/kernel/relocate_kernel.S b/arch/mips/kernel/relocate_kernel.S index e4142c5f7c2..804ebb2c34a 100644 --- a/arch/mips/kernel/relocate_kernel.S +++ b/arch/mips/kernel/relocate_kernel.S | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <asm/asm.h> | 9 | #include <asm/asm.h> |
10 | #include <asm/asmmacro.h> | 10 | #include <asm/asmmacro.h> |
11 | #include <asm/regdef.h> | 11 | #include <asm/regdef.h> |
12 | #include <asm/page.h> | ||
13 | #include <asm/mipsregs.h> | 12 | #include <asm/mipsregs.h> |
14 | #include <asm/stackframe.h> | 13 | #include <asm/stackframe.h> |
15 | #include <asm/addrspace.h> | 14 | #include <asm/addrspace.h> |
@@ -50,7 +49,7 @@ process_entry: | |||
50 | and s3, s2, 0x8 | 49 | and s3, s2, 0x8 |
51 | beq s3, zero, process_entry | 50 | beq s3, zero, process_entry |
52 | and s2, s2, ~0x8 | 51 | and s2, s2, ~0x8 |
53 | li s6, (1 << PAGE_SHIFT) / SZREG | 52 | li s6, (1 << _PAGE_SHIFT) / SZREG |
54 | 53 | ||
55 | copy_word: | 54 | copy_word: |
56 | /* copy page word by word */ | 55 | /* copy page word by word */ |
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index 374f66e05f3..d20a4bc9ed0 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
@@ -583,6 +583,7 @@ einval: li v0, -ENOSYS | |||
583 | sys sys_process_vm_readv 6 /* 4345 */ | 583 | sys sys_process_vm_readv 6 /* 4345 */ |
584 | sys sys_process_vm_writev 6 | 584 | sys sys_process_vm_writev 6 |
585 | sys sys_kcmp 5 | 585 | sys sys_kcmp 5 |
586 | sys sys_finit_module 3 | ||
586 | .endm | 587 | .endm |
587 | 588 | ||
588 | /* We pre-compute the number of _instruction_ bytes needed to | 589 | /* We pre-compute the number of _instruction_ bytes needed to |
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index 169de6a6d91..b64f642da07 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
@@ -422,4 +422,5 @@ sys_call_table: | |||
422 | PTR sys_process_vm_readv | 422 | PTR sys_process_vm_readv |
423 | PTR sys_process_vm_writev /* 5305 */ | 423 | PTR sys_process_vm_writev /* 5305 */ |
424 | PTR sys_kcmp | 424 | PTR sys_kcmp |
425 | PTR sys_finit_module | ||
425 | .size sys_call_table,.-sys_call_table | 426 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index ad3de9668da..c29ac197f44 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
@@ -416,4 +416,5 @@ EXPORT(sysn32_call_table) | |||
416 | PTR compat_sys_process_vm_readv | 416 | PTR compat_sys_process_vm_readv |
417 | PTR compat_sys_process_vm_writev /* 6310 */ | 417 | PTR compat_sys_process_vm_writev /* 6310 */ |
418 | PTR sys_kcmp | 418 | PTR sys_kcmp |
419 | PTR sys_finit_module | ||
419 | .size sysn32_call_table,.-sysn32_call_table | 420 | .size sysn32_call_table,.-sysn32_call_table |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 9601be6afa3..cf3e75e4665 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -540,4 +540,5 @@ sys_call_table: | |||
540 | PTR compat_sys_process_vm_readv /* 4345 */ | 540 | PTR compat_sys_process_vm_readv /* 4345 */ |
541 | PTR compat_sys_process_vm_writev | 541 | PTR compat_sys_process_vm_writev |
542 | PTR sys_kcmp | 542 | PTR sys_kcmp |
543 | PTR sys_finit_module | ||
543 | .size sys_call_table,.-sys_call_table | 544 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 007ccbe1e26..0a4336b803e 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S | |||
@@ -1,7 +1,8 @@ | |||
1 | #include <asm/asm-offsets.h> | 1 | #include <asm/asm-offsets.h> |
2 | #include <asm/page.h> | ||
3 | #include <asm/thread_info.h> | 2 | #include <asm/thread_info.h> |
4 | 3 | ||
4 | #define PAGE_SIZE _PAGE_SIZE | ||
5 | |||
5 | /* | 6 | /* |
6 | * Put .bss..swapper_pg_dir as the first thing in .bss. This will | 7 | * Put .bss..swapper_pg_dir as the first thing in .bss. This will |
7 | * ensure that it has .bss alignment (64K). | 8 | * ensure that it has .bss alignment (64K). |
diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c index cacfd31e8ec..7657fd21cd3 100644 --- a/arch/mips/mm/ioremap.c +++ b/arch/mips/mm/ioremap.c | |||
@@ -190,3 +190,9 @@ void __iounmap(const volatile void __iomem *addr) | |||
190 | 190 | ||
191 | EXPORT_SYMBOL(__ioremap); | 191 | EXPORT_SYMBOL(__ioremap); |
192 | EXPORT_SYMBOL(__iounmap); | 192 | EXPORT_SYMBOL(__iounmap); |
193 | |||
194 | int __virt_addr_valid(const volatile void *kaddr) | ||
195 | { | ||
196 | return pfn_valid(PFN_DOWN(virt_to_phys(kaddr))); | ||
197 | } | ||
198 | EXPORT_SYMBOL_GPL(__virt_addr_valid); | ||
diff --git a/arch/mips/mm/tlbex-fault.S b/arch/mips/mm/tlbex-fault.S index e99eaa1fbed..318855eb5f8 100644 --- a/arch/mips/mm/tlbex-fault.S +++ b/arch/mips/mm/tlbex-fault.S | |||
@@ -7,7 +7,6 @@ | |||
7 | * Copyright (C) 1999 Silicon Graphics, Inc. | 7 | * Copyright (C) 1999 Silicon Graphics, Inc. |
8 | */ | 8 | */ |
9 | #include <asm/mipsregs.h> | 9 | #include <asm/mipsregs.h> |
10 | #include <asm/page.h> | ||
11 | #include <asm/regdef.h> | 10 | #include <asm/regdef.h> |
12 | #include <asm/stackframe.h> | 11 | #include <asm/stackframe.h> |
13 | 12 | ||
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 05613355627..1c8ac49ec72 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -976,13 +976,6 @@ build_get_pgde32(u32 **p, unsigned int tmp, unsigned int ptr) | |||
976 | #endif | 976 | #endif |
977 | uasm_i_mfc0(p, tmp, C0_BADVADDR); /* get faulting address */ | 977 | uasm_i_mfc0(p, tmp, C0_BADVADDR); /* get faulting address */ |
978 | uasm_i_lw(p, ptr, uasm_rel_lo(pgdc), ptr); | 978 | uasm_i_lw(p, ptr, uasm_rel_lo(pgdc), ptr); |
979 | |||
980 | if (cpu_has_mips_r2) { | ||
981 | uasm_i_ext(p, tmp, tmp, PGDIR_SHIFT, (32 - PGDIR_SHIFT)); | ||
982 | uasm_i_ins(p, ptr, tmp, PGD_T_LOG2, (32 - PGDIR_SHIFT)); | ||
983 | return; | ||
984 | } | ||
985 | |||
986 | uasm_i_srl(p, tmp, tmp, PGDIR_SHIFT); /* get pgd only bits */ | 979 | uasm_i_srl(p, tmp, tmp, PGDIR_SHIFT); /* get pgd only bits */ |
987 | uasm_i_sll(p, tmp, tmp, PGD_T_LOG2); | 980 | uasm_i_sll(p, tmp, tmp, PGD_T_LOG2); |
988 | uasm_i_addu(p, ptr, ptr, tmp); /* add in pgd offset */ | 981 | uasm_i_addu(p, ptr, ptr, tmp); /* add in pgd offset */ |
@@ -1018,15 +1011,6 @@ static void __cpuinit build_adjust_context(u32 **p, unsigned int ctx) | |||
1018 | 1011 | ||
1019 | static void __cpuinit build_get_ptep(u32 **p, unsigned int tmp, unsigned int ptr) | 1012 | static void __cpuinit build_get_ptep(u32 **p, unsigned int tmp, unsigned int ptr) |
1020 | { | 1013 | { |
1021 | if (cpu_has_mips_r2) { | ||
1022 | /* PTE ptr offset is obtained from BadVAddr */ | ||
1023 | UASM_i_MFC0(p, tmp, C0_BADVADDR); | ||
1024 | UASM_i_LW(p, ptr, 0, ptr); | ||
1025 | uasm_i_ext(p, tmp, tmp, PAGE_SHIFT+1, PGDIR_SHIFT-PAGE_SHIFT-1); | ||
1026 | uasm_i_ins(p, ptr, tmp, PTE_T_LOG2+1, PGDIR_SHIFT-PAGE_SHIFT-1); | ||
1027 | return; | ||
1028 | } | ||
1029 | |||
1030 | /* | 1014 | /* |
1031 | * Bug workaround for the Nevada. It seems as if under certain | 1015 | * Bug workaround for the Nevada. It seems as if under certain |
1032 | * circumstances the move from cp0_context might produce a | 1016 | * circumstances the move from cp0_context might produce a |
diff --git a/arch/mips/power/hibernate.S b/arch/mips/power/hibernate.S index f8a751c0328..61e2558a2dc 100644 --- a/arch/mips/power/hibernate.S +++ b/arch/mips/power/hibernate.S | |||
@@ -8,7 +8,6 @@ | |||
8 | * Wu Zhangjin <wuzhangjin@gmail.com> | 8 | * Wu Zhangjin <wuzhangjin@gmail.com> |
9 | */ | 9 | */ |
10 | #include <asm/asm-offsets.h> | 10 | #include <asm/asm-offsets.h> |
11 | #include <asm/page.h> | ||
12 | #include <asm/regdef.h> | 11 | #include <asm/regdef.h> |
13 | #include <asm/asm.h> | 12 | #include <asm/asm.h> |
14 | 13 | ||
@@ -35,7 +34,7 @@ LEAF(swsusp_arch_resume) | |||
35 | 0: | 34 | 0: |
36 | PTR_L t1, PBE_ADDRESS(t0) /* source */ | 35 | PTR_L t1, PBE_ADDRESS(t0) /* source */ |
37 | PTR_L t2, PBE_ORIG_ADDRESS(t0) /* destination */ | 36 | PTR_L t2, PBE_ORIG_ADDRESS(t0) /* destination */ |
38 | PTR_ADDU t3, t1, PAGE_SIZE | 37 | PTR_ADDU t3, t1, _PAGE_SIZE |
39 | 1: | 38 | 1: |
40 | REG_L t8, (t1) | 39 | REG_L t8, (t1) |
41 | REG_S t8, (t2) | 40 | REG_S t8, (t2) |