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

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] Workaround for a sparse warning in include/asm-mips/mach-tx4927/ioremap.h
[MIPS] Make show_code static and add __user tag
[MIPS] Workaround for a sparse warning in include/asm-mips/compat.h
[MIPS] Add some __user tags
[MIPS] math-emu minor cleanup
[MIPS] Kill CONFIG_TX4927BUG_WORKAROUND
[MIPS] Alchemy: Remove code wrapped by dead symbol CONFIG_FB_XPERT98
[MIPS] Alchemy: Remove code wrapped by dead symbol CONFIG_AU1000_SRC_CLK
[MIPS] Alchemy: Remove code wrapped by dead symbol CONFIG_AU1000_USE32K
[MIPS] Alchemy: Remove code wrapped by dead symbol CONFIG_AU1XXX_PSC_SPI
[CHAR] Delete leftovers of old Alchemy UART driver

+27 -100
-6
arch/mips/au1000/common/setup.c
··· 103 } 104 #endif 105 106 - #ifdef CONFIG_FB_XPERT98 107 - if ((argptr = strstr(argptr, "video=")) == NULL) { 108 - argptr = prom_getcmdline(); 109 - strcat(argptr, " video=atyfb:1024x768-8@70"); 110 - } 111 - #endif 112 113 #if defined(CONFIG_SOUND_AU1X00) && !defined(CONFIG_SOC_AU1000) 114 /* au1000 does not support vra, au1500 and au1100 do */
··· 103 } 104 #endif 105 106 107 #if defined(CONFIG_SOUND_AU1X00) && !defined(CONFIG_SOC_AU1000) 108 /* au1000 does not support vra, au1500 and au1100 do */
-29
arch/mips/au1000/common/time.c
··· 203 /* I haven't found anyone that doesn't use a 12 MHz source clock, 204 * but just in case..... 205 */ 206 - #ifdef CONFIG_AU1000_SRC_CLK 207 - #define AU1000_SRC_CLK CONFIG_AU1000_SRC_CLK 208 - #else 209 #define AU1000_SRC_CLK 12000000 210 - #endif 211 212 /* 213 * We read the real processor speed from the PLL. This is important ··· 243 au_writel (0, SYS_TOYWRITE); 244 while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S); 245 246 - #if defined(CONFIG_AU1000_USE32K) 247 - { 248 - unsigned long start, end, count; 249 - 250 - start = au_readl(SYS_RTCREAD); 251 - start += 2; 252 - /* wait for the beginning of a new tick 253 - */ 254 - while (au_readl(SYS_RTCREAD) < start); 255 - 256 - /* Start r4k counter. 257 - */ 258 - write_c0_count(0); 259 - 260 - /* Wait 0.5 seconds. 261 - */ 262 - end = start + (32768 / trim_divide)/2; 263 - 264 - while (end > au_readl(SYS_RTCREAD)); 265 - 266 - count = read_c0_count(); 267 - cpu_speed = count * 2; 268 - } 269 - #else 270 cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * 271 AU1000_SRC_CLK; 272 - #endif 273 } 274 else { 275 /* The 32KHz oscillator isn't running, so assume there
··· 203 /* I haven't found anyone that doesn't use a 12 MHz source clock, 204 * but just in case..... 205 */ 206 #define AU1000_SRC_CLK 12000000 207 208 /* 209 * We read the real processor speed from the PLL. This is important ··· 247 au_writel (0, SYS_TOYWRITE); 248 while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S); 249 250 cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * 251 AU1000_SRC_CLK; 252 } 253 else { 254 /* The 32KHz oscillator isn't running, so assume there
+1 -8
arch/mips/au1000/pb1200/board_setup.c
··· 131 /* The Pb1200 development board uses external MUX for PSC0 to 132 support SMB/SPI. bcsr->resets bit 12: 0=SMB 1=SPI 133 */ 134 - #if defined(CONFIG_AU1XXX_PSC_SPI) && defined(CONFIG_I2C_AU1550) 135 - #error I2C and SPI are mutually exclusive. Both are physically connected to PSC0.\ 136 - Refer to Pb1200/Db1200 documentation. 137 - #elif defined( CONFIG_AU1XXX_PSC_SPI ) 138 - bcsr->resets |= BCSR_RESETS_PCS0MUX; 139 - /*Hard Coding Value to enable Temp Sensors [bit 14] Value for SOC Au1200. Pls refer documentation*/ 140 - bcsr->resets =0x900f; 141 - #elif defined( CONFIG_I2C_AU1550 ) 142 bcsr->resets &= (~BCSR_RESETS_PCS0MUX); 143 #endif 144 au_sync();
··· 131 /* The Pb1200 development board uses external MUX for PSC0 to 132 support SMB/SPI. bcsr->resets bit 12: 0=SMB 1=SPI 133 */ 134 + #ifdef CONFIG_I2C_AU1550 135 bcsr->resets &= (~BCSR_RESETS_PCS0MUX); 136 #endif 137 au_sync();
+3 -2
arch/mips/kernel/branch.c
··· 22 */ 23 int __compute_return_epc(struct pt_regs *regs) 24 { 25 - unsigned int *addr, bit, fcr31, dspcontrol; 26 long epc; 27 union mips_instruction insn; 28 ··· 34 /* 35 * Read the instruction 36 */ 37 - addr = (unsigned int *) epc; 38 if (__get_user(insn.word, addr)) { 39 force_sig(SIGSEGV, current); 40 return -EFAULT;
··· 22 */ 23 int __compute_return_epc(struct pt_regs *regs) 24 { 25 + unsigned int __user *addr; 26 + unsigned int bit, fcr31, dspcontrol; 27 long epc; 28 union mips_instruction insn; 29 ··· 33 /* 34 * Read the instruction 35 */ 36 + addr = (unsigned int __user *) epc; 37 if (__get_user(insn.word, addr)) { 38 force_sig(SIGSEGV, current); 39 return -EFAULT;
+4 -4
arch/mips/kernel/traps.c
··· 131 const int field = 2 * sizeof(unsigned long); 132 long stackdata; 133 int i; 134 - unsigned long *sp = (unsigned long *)regs->regs[29]; 135 136 printk("Stack :"); 137 i = 0; ··· 187 188 EXPORT_SYMBOL(dump_stack); 189 190 - void show_code(unsigned int *pc) 191 { 192 long i; 193 ··· 305 printk("Process %s (pid: %d, threadinfo=%p, task=%p)\n", 306 current->comm, current->pid, current_thread_info(), current); 307 show_stacktrace(current, regs); 308 - show_code((unsigned int *) regs->cp0_epc); 309 printk("\n"); 310 } 311 ··· 865 dump_tlb_all(); 866 } 867 868 - show_code((unsigned int *) regs->cp0_epc); 869 870 /* 871 * Some chips may have other causes of machine check (e.g. SB1
··· 131 const int field = 2 * sizeof(unsigned long); 132 long stackdata; 133 int i; 134 + unsigned long __user *sp = (unsigned long __user *)regs->regs[29]; 135 136 printk("Stack :"); 137 i = 0; ··· 187 188 EXPORT_SYMBOL(dump_stack); 189 190 + static void show_code(unsigned int __user *pc) 191 { 192 long i; 193 ··· 305 printk("Process %s (pid: %d, threadinfo=%p, task=%p)\n", 306 current->comm, current->pid, current_thread_info(), current); 307 show_stacktrace(current, regs); 308 + show_code((unsigned int __user *) regs->cp0_epc); 309 printk("\n"); 310 } 311 ··· 865 dump_tlb_all(); 866 } 867 868 + show_code((unsigned int __user *) regs->cp0_epc); 869 870 /* 871 * Some chips may have other causes of machine check (e.g. SB1
+9 -10
arch/mips/math-emu/cp1emu.c
··· 205 static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx) 206 { 207 mips_instruction ir; 208 - void * emulpc, *contpc; 209 unsigned int cond; 210 211 if (get_user(ir, (mips_instruction __user *) xcp->cp0_epc)) { ··· 230 * Linux MIPS branch emulator operates on context, updating the 231 * cp0_epc. 232 */ 233 - emulpc = (void *) (xcp->cp0_epc + 4); /* Snapshot emulation target */ 234 235 if (__compute_return_epc(xcp)) { 236 #ifdef CP1DBG ··· 244 return SIGBUS; 245 } 246 /* __compute_return_epc() will have updated cp0_epc */ 247 - contpc = (void *) xcp->cp0_epc; 248 /* In order not to confuse ptrace() et al, tweak context */ 249 - xcp->cp0_epc = (unsigned long) emulpc - 4; 250 } else { 251 - emulpc = (void *) xcp->cp0_epc; 252 - contpc = (void *) (xcp->cp0_epc + 4); 253 } 254 255 emul: ··· 427 * instruction 428 */ 429 xcp->cp0_epc += 4; 430 - contpc = (void *) 431 - (xcp->cp0_epc + 432 (MIPSInst_SIMM(ir) << 2)); 433 434 if (get_user(ir, ··· 461 * Single step the non-cp1 462 * instruction in the dslot 463 */ 464 - return mips_dsemul(xcp, ir, (unsigned long) contpc); 465 } 466 else { 467 /* branch not taken */ ··· 520 } 521 522 /* we did it !! */ 523 - xcp->cp0_epc = (unsigned long) contpc; 524 xcp->cp0_cause &= ~CAUSEF_BD; 525 526 return 0;
··· 205 static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx) 206 { 207 mips_instruction ir; 208 + unsigned long emulpc, contpc; 209 unsigned int cond; 210 211 if (get_user(ir, (mips_instruction __user *) xcp->cp0_epc)) { ··· 230 * Linux MIPS branch emulator operates on context, updating the 231 * cp0_epc. 232 */ 233 + emulpc = xcp->cp0_epc + 4; /* Snapshot emulation target */ 234 235 if (__compute_return_epc(xcp)) { 236 #ifdef CP1DBG ··· 244 return SIGBUS; 245 } 246 /* __compute_return_epc() will have updated cp0_epc */ 247 + contpc = xcp->cp0_epc; 248 /* In order not to confuse ptrace() et al, tweak context */ 249 + xcp->cp0_epc = emulpc - 4; 250 } else { 251 + emulpc = xcp->cp0_epc; 252 + contpc = xcp->cp0_epc + 4; 253 } 254 255 emul: ··· 427 * instruction 428 */ 429 xcp->cp0_epc += 4; 430 + contpc = (xcp->cp0_epc + 431 (MIPSInst_SIMM(ir) << 2)); 432 433 if (get_user(ir, ··· 462 * Single step the non-cp1 463 * instruction in the dslot 464 */ 465 + return mips_dsemul(xcp, ir, contpc); 466 } 467 else { 468 /* branch not taken */ ··· 521 } 522 523 /* we did it !! */ 524 + xcp->cp0_epc = contpc; 525 xcp->cp0_cause &= ~CAUSEF_BD; 526 527 return 0;
+6 -6
arch/mips/math-emu/dsemul.c
··· 54 int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc) 55 { 56 extern asmlinkage void handle_dsemulret(void); 57 - mips_instruction *dsemul_insns; 58 - struct emuframe *fr; 59 int err; 60 61 if (ir == 0) { /* a nop is easy */ ··· 86 */ 87 88 /* Ensure that the two instructions are in the same cache line */ 89 - dsemul_insns = (mips_instruction *) ((regs->regs[29] - sizeof(struct emuframe)) & ~0x7); 90 - fr = (struct emuframe *) dsemul_insns; 91 92 /* Verify that the stack pointer is not competely insane */ 93 if (unlikely(!access_ok(VERIFY_WRITE, fr, sizeof(struct emuframe)))) ··· 112 113 int do_dsemulret(struct pt_regs *xcp) 114 { 115 - struct emuframe *fr; 116 unsigned long epc; 117 u32 insn, cookie; 118 int err = 0; 119 120 - fr = (struct emuframe *) (xcp->cp0_epc - sizeof(mips_instruction)); 121 122 /* 123 * If we can't even access the area, something is very wrong, but we'll
··· 54 int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc) 55 { 56 extern asmlinkage void handle_dsemulret(void); 57 + struct emuframe __user *fr; 58 int err; 59 60 if (ir == 0) { /* a nop is easy */ ··· 87 */ 88 89 /* Ensure that the two instructions are in the same cache line */ 90 + fr = (struct emuframe __user *) 91 + ((regs->regs[29] - sizeof(struct emuframe)) & ~0x7); 92 93 /* Verify that the stack pointer is not competely insane */ 94 if (unlikely(!access_ok(VERIFY_WRITE, fr, sizeof(struct emuframe)))) ··· 113 114 int do_dsemulret(struct pt_regs *xcp) 115 { 116 + struct emuframe __user *fr; 117 unsigned long epc; 118 u32 insn, cookie; 119 int err = 0; 120 121 + fr = (struct emuframe __user *) 122 + (xcp->cp0_epc - sizeof(mips_instruction)); 123 124 /* 125 * If we can't even access the area, something is very wrong, but we'll
-19
arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
··· 138 char *prom_getcmdline(void); 139 140 #ifdef CONFIG_PCI 141 - #define CONFIG_TX4927BUG_WORKAROUND 142 #undef TX4927_SUPPORT_COMMAND_IO 143 #undef TX4927_SUPPORT_PCI_66 144 int tx4927_cpu_clock = 100000000; /* 100MHz */ ··· 668 669 /* PCI->GB mappings (MEM 16MB) -not used */ 670 tx4927_pcicptr->p2gm1plbase = 0xffffffff; 671 - #ifdef CONFIG_TX4927BUG_WORKAROUND 672 - /* 673 - * TX4927-PCIC-BUG: P2GM1PUBASE must be 0 674 - * if P2GM0PUBASE was 0. 675 - */ 676 - tx4927_pcicptr->p2gm1pubase = 0; 677 - #else 678 tx4927_pcicptr->p2gm1pubase = 0xffffffff; 679 - #endif 680 tx4927_pcicptr->p2gmgbase[1] = 0; 681 682 /* PCI->GB mappings (MEM 1MB) -not used */ ··· 900 /* enable Timeout BusError */ 901 if (tx4927_ccfg_toeon) 902 tx4927_ccfgptr->ccfg |= TX4927_CCFG_TOE; 903 - 904 - /* SDRAMC fixup */ 905 - #ifdef CONFIG_TX4927BUG_WORKAROUND 906 - /* 907 - * TX4927-BUG: INF 01-01-18/ BUG 01-01-22 908 - * G-bus timeout error detection is incorrect 909 - */ 910 - if (tx4927_ccfg_toeon) 911 - tx4927_sdramcptr->tr |= 0x02000000; /* RCD:3tck */ 912 - #endif 913 914 tx4927_pci_setup(); 915 if (tx4927_using_backplane == 1)
··· 138 char *prom_getcmdline(void); 139 140 #ifdef CONFIG_PCI 141 #undef TX4927_SUPPORT_COMMAND_IO 142 #undef TX4927_SUPPORT_PCI_66 143 int tx4927_cpu_clock = 100000000; /* 100MHz */ ··· 669 670 /* PCI->GB mappings (MEM 16MB) -not used */ 671 tx4927_pcicptr->p2gm1plbase = 0xffffffff; 672 tx4927_pcicptr->p2gm1pubase = 0xffffffff; 673 tx4927_pcicptr->p2gmgbase[1] = 0; 674 675 /* PCI->GB mappings (MEM 1MB) -not used */ ··· 909 /* enable Timeout BusError */ 910 if (tx4927_ccfg_toeon) 911 tx4927_ccfgptr->ccfg |= TX4927_CCFG_TOE; 912 913 tx4927_pci_setup(); 914 if (tx4927_using_backplane == 1)
-14
drivers/char/Kconfig
··· 374 To compile this driver as a module, choose M here: the 375 module will be called istallion. 376 377 - config AU1000_UART 378 - bool "Enable Au1000 UART Support" 379 - depends on SERIAL_NONSTANDARD && MIPS 380 - help 381 - If you have an Alchemy AU1000 processor (MIPS based) and you want 382 - to use serial ports, say Y. Otherwise, say N. 383 - 384 - config AU1000_SERIAL_CONSOLE 385 - bool "Enable Au1000 serial console" 386 - depends on AU1000_UART 387 - help 388 - If you have an Alchemy AU1000 processor (MIPS based) and you want 389 - to use a console on a serial port, say Y. Otherwise, say N. 390 - 391 config SERIAL_DEC 392 bool "DECstation serial support" 393 depends on MACH_DECSTATION
··· 374 To compile this driver as a module, choose M here: the 375 module will be called istallion. 376 377 config SERIAL_DEC 378 bool "DECstation serial support" 379 depends on MACH_DECSTATION
+2 -1
include/asm-mips/compat.h
··· 132 133 static inline void __user *compat_ptr(compat_uptr_t uptr) 134 { 135 - return (void __user *)(long)uptr; 136 } 137 138 static inline compat_uptr_t ptr_to_compat(void __user *uptr)
··· 132 133 static inline void __user *compat_ptr(compat_uptr_t uptr) 134 { 135 + /* cast to a __user pointer via "unsigned long" makes sparse happy */ 136 + return (void __user *)(unsigned long)(long)uptr; 137 } 138 139 static inline compat_uptr_t ptr_to_compat(void __user *uptr)
+2 -1
include/asm-mips/mach-tx49xx/ioremap.h
··· 36 37 static inline int plat_iounmap(const volatile void __iomem *addr) 38 { 39 - return (unsigned long)addr >= (unsigned long)(int)TXX9_DIRECTMAP_BASE; 40 } 41 42 #endif /* __ASM_MACH_TX49XX_IOREMAP_H */
··· 36 37 static inline int plat_iounmap(const volatile void __iomem *addr) 38 { 39 + return (unsigned long)addr >= 40 + (unsigned long)(int)(TXX9_DIRECTMAP_BASE & 0xffffffff); 41 } 42 43 #endif /* __ASM_MACH_TX49XX_IOREMAP_H */