aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/include/asm/ginvt.h2
-rw-r--r--arch/mips/include/asm/page.h2
-rw-r--r--arch/mips/kernel/uprobes.c3
-rw-r--r--arch/mips/mm/mmap.c7
-rw-r--r--arch/mips/pistachio/Platform1
-rw-r--r--arch/mips/pnx833x/Platform2
-rw-r--r--arch/mips/txx9/generic/setup.c6
7 files changed, 10 insertions, 13 deletions
diff --git a/arch/mips/include/asm/ginvt.h b/arch/mips/include/asm/ginvt.h
index 49c6dbe37338..6eb7c2b94dc7 100644
--- a/arch/mips/include/asm/ginvt.h
+++ b/arch/mips/include/asm/ginvt.h
@@ -19,7 +19,7 @@ _ASM_MACRO_1R1I(ginvt, rs, type,
19# define _ASM_SET_GINV 19# define _ASM_SET_GINV
20#endif 20#endif
21 21
22static inline void ginvt(unsigned long addr, enum ginvt_type type) 22static __always_inline void ginvt(unsigned long addr, enum ginvt_type type)
23{ 23{
24 asm volatile( 24 asm volatile(
25 ".set push\n" 25 ".set push\n"
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
index 6b31c93b5eaa..a25643d258cb 100644
--- a/arch/mips/include/asm/page.h
+++ b/arch/mips/include/asm/page.h
@@ -249,7 +249,7 @@ static inline int pfn_valid(unsigned long pfn)
249#define virt_to_pfn(kaddr) PFN_DOWN(virt_to_phys((void *)(kaddr))) 249#define virt_to_pfn(kaddr) PFN_DOWN(virt_to_phys((void *)(kaddr)))
250#define virt_to_page(kaddr) pfn_to_page(virt_to_pfn(kaddr)) 250#define virt_to_page(kaddr) pfn_to_page(virt_to_pfn(kaddr))
251 251
252extern int __virt_addr_valid(const volatile void *kaddr); 252extern bool __virt_addr_valid(const volatile void *kaddr);
253#define virt_addr_valid(kaddr) \ 253#define virt_addr_valid(kaddr) \
254 __virt_addr_valid((const volatile void *) (kaddr)) 254 __virt_addr_valid((const volatile void *) (kaddr))
255 255
diff --git a/arch/mips/kernel/uprobes.c b/arch/mips/kernel/uprobes.c
index 4aaff3b3175c..6dbe4eab0a0e 100644
--- a/arch/mips/kernel/uprobes.c
+++ b/arch/mips/kernel/uprobes.c
@@ -112,9 +112,6 @@ int arch_uprobe_pre_xol(struct arch_uprobe *aup, struct pt_regs *regs)
112 */ 112 */
113 aup->resume_epc = regs->cp0_epc + 4; 113 aup->resume_epc = regs->cp0_epc + 4;
114 if (insn_has_delay_slot((union mips_instruction) aup->insn[0])) { 114 if (insn_has_delay_slot((union mips_instruction) aup->insn[0])) {
115 unsigned long epc;
116
117 epc = regs->cp0_epc;
118 __compute_return_epc_for_insn(regs, 115 __compute_return_epc_for_insn(regs,
119 (union mips_instruction) aup->insn[0]); 116 (union mips_instruction) aup->insn[0]);
120 aup->resume_epc = regs->cp0_epc; 117 aup->resume_epc = regs->cp0_epc;
diff --git a/arch/mips/mm/mmap.c b/arch/mips/mm/mmap.c
index 2f616ebeb7e0..50ee7213b432 100644
--- a/arch/mips/mm/mmap.c
+++ b/arch/mips/mm/mmap.c
@@ -201,8 +201,13 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
201 return ret; 201 return ret;
202} 202}
203 203
204int __virt_addr_valid(const volatile void *kaddr) 204bool __virt_addr_valid(const volatile void *kaddr)
205{ 205{
206 unsigned long vaddr = (unsigned long)vaddr;
207
208 if ((vaddr < PAGE_OFFSET) || (vaddr >= MAP_BASE))
209 return false;
210
206 return pfn_valid(PFN_DOWN(virt_to_phys(kaddr))); 211 return pfn_valid(PFN_DOWN(virt_to_phys(kaddr)));
207} 212}
208EXPORT_SYMBOL_GPL(__virt_addr_valid); 213EXPORT_SYMBOL_GPL(__virt_addr_valid);
diff --git a/arch/mips/pistachio/Platform b/arch/mips/pistachio/Platform
index d80cd612df1f..c3592b374ad2 100644
--- a/arch/mips/pistachio/Platform
+++ b/arch/mips/pistachio/Platform
@@ -6,3 +6,4 @@ cflags-$(CONFIG_MACH_PISTACHIO) += \
6 -I$(srctree)/arch/mips/include/asm/mach-pistachio 6 -I$(srctree)/arch/mips/include/asm/mach-pistachio
7load-$(CONFIG_MACH_PISTACHIO) += 0xffffffff80400000 7load-$(CONFIG_MACH_PISTACHIO) += 0xffffffff80400000
8zload-$(CONFIG_MACH_PISTACHIO) += 0xffffffff81000000 8zload-$(CONFIG_MACH_PISTACHIO) += 0xffffffff81000000
9all-$(CONFIG_MACH_PISTACHIO) := uImage.gz
diff --git a/arch/mips/pnx833x/Platform b/arch/mips/pnx833x/Platform
index 6b1a847d593f..287260669551 100644
--- a/arch/mips/pnx833x/Platform
+++ b/arch/mips/pnx833x/Platform
@@ -1,5 +1,5 @@
1# NXP STB225 1# NXP STB225
2platform-$(CONFIG_SOC_PNX833X) += pnx833x/ 2platform-$(CONFIG_SOC_PNX833X) += pnx833x/
3cflags-$(CONFIG_SOC_PNX833X) += -I $(srctree)/arch/mips/include/asm/mach-pnx833x 3cflags-$(CONFIG_SOC_PNX833X) += -I$(srctree)/arch/mips/include/asm/mach-pnx833x
4load-$(CONFIG_NXP_STB220) += 0xffffffff80001000 4load-$(CONFIG_NXP_STB220) += 0xffffffff80001000
5load-$(CONFIG_NXP_STB225) += 0xffffffff80001000 5load-$(CONFIG_NXP_STB225) += 0xffffffff80001000
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index 46537c2ca86a..6d0fd0e055b4 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -33,7 +33,6 @@
33#include <asm/time.h> 33#include <asm/time.h>
34#include <asm/reboot.h> 34#include <asm/reboot.h>
35#include <asm/r4kcache.h> 35#include <asm/r4kcache.h>
36#include <asm/sections.h>
37#include <asm/setup.h> 36#include <asm/setup.h>
38#include <asm/txx9/generic.h> 37#include <asm/txx9/generic.h>
39#include <asm/txx9/pci.h> 38#include <asm/txx9/pci.h>
@@ -343,11 +342,6 @@ void __init prom_init(void)
343 342
344void __init prom_free_prom_memory(void) 343void __init prom_free_prom_memory(void)
345{ 344{
346 unsigned long saddr = PAGE_SIZE;
347 unsigned long eaddr = __pa_symbol(&_text);
348
349 if (saddr < eaddr)
350 free_init_pages("prom memory", saddr, eaddr);
351} 345}
352 346
353const char *get_system_type(void) 347const char *get_system_type(void)