diff options
| -rw-r--r-- | arch/mips/jz4740/gpio.c | 2 | ||||
| -rw-r--r-- | arch/mips/kernel/r2300_fpu.S | 2 | ||||
| -rw-r--r-- | arch/mips/kernel/r4k_fpu.S | 2 | ||||
| -rw-r--r-- | arch/mips/kernel/traps.c | 13 | ||||
| -rw-r--r-- | arch/mips/mm/sc-mips.c | 13 |
5 files changed, 18 insertions, 14 deletions
diff --git a/arch/mips/jz4740/gpio.c b/arch/mips/jz4740/gpio.c index 8c6d76c9b2d6..d9907e57e9b9 100644 --- a/arch/mips/jz4740/gpio.c +++ b/arch/mips/jz4740/gpio.c | |||
| @@ -270,7 +270,7 @@ uint32_t jz_gpio_port_get_value(int port, uint32_t mask) | |||
| 270 | } | 270 | } |
| 271 | EXPORT_SYMBOL(jz_gpio_port_get_value); | 271 | EXPORT_SYMBOL(jz_gpio_port_get_value); |
| 272 | 272 | ||
| 273 | #define IRQ_TO_BIT(irq) BIT(irq_to_gpio(irq) & 0x1f) | 273 | #define IRQ_TO_BIT(irq) BIT((irq - JZ4740_IRQ_GPIO(0)) & 0x1f) |
| 274 | 274 | ||
| 275 | static void jz_gpio_check_trigger_both(struct jz_gpio_chip *chip, unsigned int irq) | 275 | static void jz_gpio_check_trigger_both(struct jz_gpio_chip *chip, unsigned int irq) |
| 276 | { | 276 | { |
diff --git a/arch/mips/kernel/r2300_fpu.S b/arch/mips/kernel/r2300_fpu.S index 5ce3b746cedc..b4ac6374a38f 100644 --- a/arch/mips/kernel/r2300_fpu.S +++ b/arch/mips/kernel/r2300_fpu.S | |||
| @@ -125,7 +125,7 @@ LEAF(_restore_fp_context) | |||
| 125 | END(_restore_fp_context) | 125 | END(_restore_fp_context) |
| 126 | .set reorder | 126 | .set reorder |
| 127 | 127 | ||
| 128 | .type fault@function | 128 | .type fault, @function |
| 129 | .ent fault | 129 | .ent fault |
| 130 | fault: li v0, -EFAULT | 130 | fault: li v0, -EFAULT |
| 131 | jr ra | 131 | jr ra |
diff --git a/arch/mips/kernel/r4k_fpu.S b/arch/mips/kernel/r4k_fpu.S index f09546ee2cdc..17732f876eff 100644 --- a/arch/mips/kernel/r4k_fpu.S +++ b/arch/mips/kernel/r4k_fpu.S | |||
| @@ -358,7 +358,7 @@ LEAF(_restore_msa_all_upper) | |||
| 358 | 358 | ||
| 359 | .set reorder | 359 | .set reorder |
| 360 | 360 | ||
| 361 | .type fault@function | 361 | .type fault, @function |
| 362 | .ent fault | 362 | .ent fault |
| 363 | fault: li v0, -EFAULT # failure | 363 | fault: li v0, -EFAULT # failure |
| 364 | jr ra | 364 | jr ra |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index ae790c575d4f..bf14da9f3e33 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
| @@ -690,15 +690,15 @@ static int simulate_sync(struct pt_regs *regs, unsigned int opcode) | |||
| 690 | asmlinkage void do_ov(struct pt_regs *regs) | 690 | asmlinkage void do_ov(struct pt_regs *regs) |
| 691 | { | 691 | { |
| 692 | enum ctx_state prev_state; | 692 | enum ctx_state prev_state; |
| 693 | siginfo_t info; | 693 | siginfo_t info = { |
| 694 | .si_signo = SIGFPE, | ||
| 695 | .si_code = FPE_INTOVF, | ||
| 696 | .si_addr = (void __user *)regs->cp0_epc, | ||
| 697 | }; | ||
| 694 | 698 | ||
| 695 | prev_state = exception_enter(); | 699 | prev_state = exception_enter(); |
| 696 | die_if_kernel("Integer overflow", regs); | 700 | die_if_kernel("Integer overflow", regs); |
| 697 | 701 | ||
| 698 | info.si_code = FPE_INTOVF; | ||
| 699 | info.si_signo = SIGFPE; | ||
| 700 | info.si_errno = 0; | ||
| 701 | info.si_addr = (void __user *) regs->cp0_epc; | ||
| 702 | force_sig_info(SIGFPE, &info, current); | 702 | force_sig_info(SIGFPE, &info, current); |
| 703 | exception_exit(prev_state); | 703 | exception_exit(prev_state); |
| 704 | } | 704 | } |
| @@ -874,7 +874,7 @@ out: | |||
| 874 | void do_trap_or_bp(struct pt_regs *regs, unsigned int code, | 874 | void do_trap_or_bp(struct pt_regs *regs, unsigned int code, |
| 875 | const char *str) | 875 | const char *str) |
| 876 | { | 876 | { |
| 877 | siginfo_t info; | 877 | siginfo_t info = { 0 }; |
| 878 | char b[40]; | 878 | char b[40]; |
| 879 | 879 | ||
| 880 | #ifdef CONFIG_KGDB_LOW_LEVEL_TRAP | 880 | #ifdef CONFIG_KGDB_LOW_LEVEL_TRAP |
| @@ -903,7 +903,6 @@ void do_trap_or_bp(struct pt_regs *regs, unsigned int code, | |||
| 903 | else | 903 | else |
| 904 | info.si_code = FPE_INTOVF; | 904 | info.si_code = FPE_INTOVF; |
| 905 | info.si_signo = SIGFPE; | 905 | info.si_signo = SIGFPE; |
| 906 | info.si_errno = 0; | ||
| 907 | info.si_addr = (void __user *) regs->cp0_epc; | 906 | info.si_addr = (void __user *) regs->cp0_epc; |
| 908 | force_sig_info(SIGFPE, &info, current); | 907 | force_sig_info(SIGFPE, &info, current); |
| 909 | break; | 908 | break; |
diff --git a/arch/mips/mm/sc-mips.c b/arch/mips/mm/sc-mips.c index 249647578e58..91dec32c77b7 100644 --- a/arch/mips/mm/sc-mips.c +++ b/arch/mips/mm/sc-mips.c | |||
| @@ -164,11 +164,13 @@ static int __init mips_sc_probe_cm3(void) | |||
| 164 | 164 | ||
| 165 | sets = cfg & CM_GCR_L2_CONFIG_SET_SIZE_MSK; | 165 | sets = cfg & CM_GCR_L2_CONFIG_SET_SIZE_MSK; |
| 166 | sets >>= CM_GCR_L2_CONFIG_SET_SIZE_SHF; | 166 | sets >>= CM_GCR_L2_CONFIG_SET_SIZE_SHF; |
| 167 | c->scache.sets = 64 << sets; | 167 | if (sets) |
| 168 | c->scache.sets = 64 << sets; | ||
| 168 | 169 | ||
| 169 | line_sz = cfg & CM_GCR_L2_CONFIG_LINE_SIZE_MSK; | 170 | line_sz = cfg & CM_GCR_L2_CONFIG_LINE_SIZE_MSK; |
| 170 | line_sz >>= CM_GCR_L2_CONFIG_LINE_SIZE_SHF; | 171 | line_sz >>= CM_GCR_L2_CONFIG_LINE_SIZE_SHF; |
| 171 | c->scache.linesz = 2 << line_sz; | 172 | if (line_sz) |
| 173 | c->scache.linesz = 2 << line_sz; | ||
| 172 | 174 | ||
| 173 | assoc = cfg & CM_GCR_L2_CONFIG_ASSOC_MSK; | 175 | assoc = cfg & CM_GCR_L2_CONFIG_ASSOC_MSK; |
| 174 | assoc >>= CM_GCR_L2_CONFIG_ASSOC_SHF; | 176 | assoc >>= CM_GCR_L2_CONFIG_ASSOC_SHF; |
| @@ -176,9 +178,12 @@ static int __init mips_sc_probe_cm3(void) | |||
| 176 | c->scache.waysize = c->scache.sets * c->scache.linesz; | 178 | c->scache.waysize = c->scache.sets * c->scache.linesz; |
| 177 | c->scache.waybit = __ffs(c->scache.waysize); | 179 | c->scache.waybit = __ffs(c->scache.waysize); |
| 178 | 180 | ||
| 179 | c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT; | 181 | if (c->scache.linesz) { |
| 182 | c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT; | ||
| 183 | return 1; | ||
| 184 | } | ||
| 180 | 185 | ||
| 181 | return 1; | 186 | return 0; |
| 182 | } | 187 | } |
| 183 | 188 | ||
| 184 | static inline int __init mips_sc_probe(void) | 189 | static inline int __init mips_sc_probe(void) |
