Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus

Pull MIPS updates from Ralf Baechle:
"A number of fixes all across the MIPS tree. No area is particularly
standing out and things have cooled down quite nicely for a release."

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
MIPS: Function tracer: Fix broken function tracing
mips: Move __virt_addr_valid() to a place for MIPS 64
MIPS: Netlogic: Fix UP compilation on XLR
MIPS: AR71xx: Fix AR71XX_PCI_MEM_SIZE
MIPS: AR724x: Fix AR724X_PCI_MEM_SIZE
MIPS: Lantiq: Fix cp0_perfcount_irq mapping
MIPS: DSP: Fix DSP mask for registers.
MIPS: Fix build failure by adding definition of pfn_pmd().
MIPS: Octeon: Fix warning.
MIPS: delay.c: Check BITS_PER_LONG instead of __SIZEOF_LONG__
MIPS: PNX833x: Fix comment.
MIPS: Add struct p_format to union mips_instruction.
MIPS: Export <asm/break.h>.
MIPS: BCM47xx: Enable SSB prerequisite SSB_DRIVER_PCICORE.
MIPS: BCM47xx: Select GPIOLIB for BCMA on bcm47xx platform
MIPS: vpe.c: Fix null pointer dereference in print arguments.

Changed files
+67 -22
arch
mips
bcm47xx
cavium-octeon
executive
include
asm
uapi
kernel
lantiq
lib
mm
netlogic
xlr
pci
+3
arch/mips/bcm47xx/Kconfig
··· 8 8 select SSB_DRIVER_EXTIF 9 9 select SSB_EMBEDDED 10 10 select SSB_B43_PCI_BRIDGE if PCI 11 + select SSB_DRIVER_PCICORE if PCI 11 12 select SSB_PCICORE_HOSTMODE if PCI 12 13 select SSB_DRIVER_GPIO 14 + select GPIOLIB 13 15 default y 14 16 help 15 17 Add support for old Broadcom BCM47xx boards with Sonics Silicon Backplane support. ··· 27 25 select BCMA_HOST_PCI if PCI 28 26 select BCMA_DRIVER_PCI_HOSTMODE if PCI 29 27 select BCMA_DRIVER_GPIO 28 + select GPIOLIB 30 29 default y 31 30 help 32 31 Add support for new Broadcom BCM47xx boards with Broadcom specific Advanced Microcontroller Bus.
+5 -4
arch/mips/cavium-octeon/executive/cvmx-l2c.c
··· 30 30 * measurement, and debugging facilities. 31 31 */ 32 32 33 + #include <linux/compiler.h> 33 34 #include <linux/irqflags.h> 34 35 #include <asm/octeon/cvmx.h> 35 36 #include <asm/octeon/cvmx-l2c.h> ··· 286 285 */ 287 286 static void fault_in(uint64_t addr, int len) 288 287 { 289 - volatile char *ptr; 290 - volatile char dummy; 288 + char *ptr; 289 + 291 290 /* 292 291 * Adjust addr and length so we get all cache lines even for 293 292 * small ranges spanning two cache lines. 294 293 */ 295 294 len += addr & CVMX_CACHE_LINE_MASK; 296 295 addr &= ~CVMX_CACHE_LINE_MASK; 297 - ptr = (volatile char *)cvmx_phys_to_ptr(addr); 296 + ptr = cvmx_phys_to_ptr(addr); 298 297 /* 299 298 * Invalidate L1 cache to make sure all loads result in data 300 299 * being in L2. 301 300 */ 302 301 CVMX_DCACHE_INVALIDATE; 303 302 while (len > 0) { 304 - dummy += *ptr; 303 + ACCESS_ONCE(*ptr); 305 304 len -= CVMX_CACHE_LINE_SIZE; 306 305 ptr += CVMX_CACHE_LINE_SIZE; 307 306 }
arch/mips/include/asm/break.h arch/mips/include/uapi/asm/break.h
+1 -1
arch/mips/include/asm/dsp.h
··· 16 16 #include <asm/mipsregs.h> 17 17 18 18 #define DSP_DEFAULT 0x00000000 19 - #define DSP_MASK 0x3ff 19 + #define DSP_MASK 0x3f 20 20 21 21 #define __enable_dsp_hazard() \ 22 22 do { \
+1
arch/mips/include/asm/inst.h
··· 353 353 struct u_format u_format; 354 354 struct c_format c_format; 355 355 struct r_format r_format; 356 + struct p_format p_format; 356 357 struct f_format f_format; 357 358 struct ma_format ma_format; 358 359 struct b_format b_format;
+1 -1
arch/mips/include/asm/mach-pnx833x/war.h
··· 21 21 #define R10000_LLSC_WAR 0 22 22 #define MIPS34K_MISSED_ITLB_WAR 0 23 23 24 - #endif /* __ASM_MIPS_MACH_PNX8550_WAR_H */ 24 + #endif /* __ASM_MIPS_MACH_PNX833X_WAR_H */
+1
arch/mips/include/asm/pgtable-64.h
··· 230 230 #else 231 231 #define pte_pfn(x) ((unsigned long)((x).pte >> _PFN_SHIFT)) 232 232 #define pfn_pte(pfn, prot) __pte(((pfn) << _PFN_SHIFT) | pgprot_val(prot)) 233 + #define pfn_pmd(pfn, prot) __pmd(((pfn) << _PFN_SHIFT) | pgprot_val(prot)) 233 234 #endif 234 235 235 236 #define __pgd_offset(address) pgd_index(address)
+1
arch/mips/include/uapi/asm/Kbuild
··· 3 3 4 4 header-y += auxvec.h 5 5 header-y += bitsperlong.h 6 + header-y += break.h 6 7 header-y += byteorder.h 7 8 header-y += cachectl.h 8 9 header-y += errno.h
+35 -1
arch/mips/kernel/ftrace.c
··· 25 25 #define MCOUNT_OFFSET_INSNS 4 26 26 #endif 27 27 28 + /* Arch override because MIPS doesn't need to run this from stop_machine() */ 29 + void arch_ftrace_update_code(int command) 30 + { 31 + ftrace_modify_all_code(command); 32 + } 33 + 28 34 /* 29 35 * Check if the address is in kernel space 30 36 * ··· 95 89 return 0; 96 90 } 97 91 92 + #ifndef CONFIG_64BIT 93 + static int ftrace_modify_code_2(unsigned long ip, unsigned int new_code1, 94 + unsigned int new_code2) 95 + { 96 + int faulted; 97 + 98 + safe_store_code(new_code1, ip, faulted); 99 + if (unlikely(faulted)) 100 + return -EFAULT; 101 + ip += 4; 102 + safe_store_code(new_code2, ip, faulted); 103 + if (unlikely(faulted)) 104 + return -EFAULT; 105 + flush_icache_range(ip, ip + 8); /* original ip + 12 */ 106 + return 0; 107 + } 108 + #endif 109 + 98 110 /* 99 111 * The details about the calling site of mcount on MIPS 100 112 * ··· 155 131 * needed. 156 132 */ 157 133 new = in_kernel_space(ip) ? INSN_NOP : INSN_B_1F; 158 - 134 + #ifdef CONFIG_64BIT 159 135 return ftrace_modify_code(ip, new); 136 + #else 137 + /* 138 + * On 32 bit MIPS platforms, gcc adds a stack adjust 139 + * instruction in the delay slot after the branch to 140 + * mcount and expects mcount to restore the sp on return. 141 + * This is based on a legacy API and does nothing but 142 + * waste instructions so it's being removed at runtime. 143 + */ 144 + return ftrace_modify_code_2(ip, new, INSN_NOP); 145 + #endif 160 146 } 161 147 162 148 int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
+4 -3
arch/mips/kernel/mcount.S
··· 46 46 PTR_L a5, PT_R9(sp) 47 47 PTR_L a6, PT_R10(sp) 48 48 PTR_L a7, PT_R11(sp) 49 - PTR_ADDIU sp, PT_SIZE 50 49 #else 51 - PTR_ADDIU sp, (PT_SIZE + 8) 50 + PTR_ADDIU sp, PT_SIZE 52 51 #endif 53 52 .endm 54 53 ··· 68 69 .globl _mcount 69 70 _mcount: 70 71 b ftrace_stub 71 - nop 72 + addiu sp,sp,8 73 + 74 + /* When tracing is activated, it calls ftrace_caller+8 (aka here) */ 72 75 lw t1, function_trace_stop 73 76 bnez t1, ftrace_stub 74 77 nop
+1 -1
arch/mips/kernel/vpe.c
··· 705 705 706 706 printk(KERN_WARNING 707 707 "VPE loader: TC %d is already in use.\n", 708 - t->index); 708 + v->tc->index); 709 709 return -ENOEXEC; 710 710 } 711 711 } else {
+1 -1
arch/mips/lantiq/irq.c
··· 408 408 #endif 409 409 410 410 /* tell oprofile which irq to use */ 411 - cp0_perfcount_irq = LTQ_PERF_IRQ; 411 + cp0_perfcount_irq = irq_create_mapping(ltq_domain, LTQ_PERF_IRQ); 412 412 413 413 /* 414 414 * if the timer irq is not one of the mips irqs we need to
+1 -1
arch/mips/lib/delay.c
··· 21 21 " .set noreorder \n" 22 22 " .align 3 \n" 23 23 "1: bnez %0, 1b \n" 24 - #if __SIZEOF_LONG__ == 4 24 + #if BITS_PER_LONG == 32 25 25 " subu %0, 1 \n" 26 26 #else 27 27 " dsubu %0, 1 \n"
-6
arch/mips/mm/ioremap.c
··· 190 190 191 191 EXPORT_SYMBOL(__ioremap); 192 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);
+6
arch/mips/mm/mmap.c
··· 192 192 193 193 return ret; 194 194 } 195 + 196 + int __virt_addr_valid(const volatile void *kaddr) 197 + { 198 + return pfn_valid(PFN_DOWN(virt_to_phys(kaddr))); 199 + } 200 + EXPORT_SYMBOL_GPL(__virt_addr_valid);
+4 -1
arch/mips/netlogic/xlr/setup.c
··· 193 193 194 194 void __init prom_init(void) 195 195 { 196 - int i, *argv, *envp; /* passed as 32 bit ptrs */ 196 + int *argv, *envp; /* passed as 32 bit ptrs */ 197 197 struct psb_info *prom_infop; 198 + #ifdef CONFIG_SMP 199 + int i; 200 + #endif 198 201 199 202 /* truncate to 32 bit and sign extend all args */ 200 203 argv = (int *)(long)(int)fw_arg1;
+1 -1
arch/mips/pci/pci-ar71xx.c
··· 24 24 #include <asm/mach-ath79/pci.h> 25 25 26 26 #define AR71XX_PCI_MEM_BASE 0x10000000 27 - #define AR71XX_PCI_MEM_SIZE 0x08000000 27 + #define AR71XX_PCI_MEM_SIZE 0x07000000 28 28 29 29 #define AR71XX_PCI_WIN0_OFFS 0x10000000 30 30 #define AR71XX_PCI_WIN1_OFFS 0x11000000
+1 -1
arch/mips/pci/pci-ar724x.c
··· 21 21 #define AR724X_PCI_CTRL_SIZE 0x100 22 22 23 23 #define AR724X_PCI_MEM_BASE 0x10000000 24 - #define AR724X_PCI_MEM_SIZE 0x08000000 24 + #define AR724X_PCI_MEM_SIZE 0x04000000 25 25 26 26 #define AR724X_PCI_REG_RESET 0x18 27 27 #define AR724X_PCI_REG_INT_STATUS 0x4c