Skip to content
  1. Jun 03, 2015
  2. May 29, 2015
  3. May 26, 2015
    • Joe Perches's avatar
      MIPS: irq: Use DECLARE_BITMAP · 884e7e5e
      Joe Perches authored
      
      
      Use the generic mechanism to declare a bitmap instead of unsigned long.
      
      This could fix an overwrite defect of whatever follows irq_map.
      
      Not all "#define NR_IRQS <value>" are a multiple of BITS_PER_LONG so
      using DECLARE_BITMAP allocates the proper number of longs required
      for the possible bits.
      
      For instance:
      
      arch/mips/include/asm/mach-ath79/irq.h:#define NR_IRQS                  51
      arch/mips/include/asm/mach-db1x00/irq.h:#define NR_IRQS 152
      arch/mips/include/asm/mach-lantiq/falcon/irq.h:#define NR_IRQS 328
      
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Cc: linux-mips <linux-mips@linux-mips.org>
      Cc: LKML <linux-kernel@vger.kernel.org>
      Cc: Gabor Juhos <juhosg@openwrt.org>
      Cc: Manuel Lauss <manuel.lauss@googlemail.com>
      Cc: John Crispin <blogic@openwrt.org>
      Patchwork: https://patchwork.linux-mips.org/patch/10091/
      
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      884e7e5e
  4. May 15, 2015
  5. May 12, 2015
    • Petri Gynther's avatar
      MIPS: traps: remove extra Tainted: line from __show_regs() output · 2d2ec2f7
      Petri Gynther authored
      
      
      __show_regs() calls show_regs_print_info(), which already outputs
      the Tainted: information. So, no need to output it twice.
      
      Signed-off-by: default avatarPetri Gynther <pgynther@google.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/9997/
      
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      2d2ec2f7
    • Maciej W. Rozycki's avatar
      MIPS: Fix a preemption issue with thread's FPU defaults · 03dce595
      Maciej W. Rozycki authored
      
      
      Fix "BUG: using smp_processor_id() in preemptible" reported in accesses
      to thread's FPU defaults: the value to initialise FSCR to at program
      startup, the FCSR r/w mask and the contents of FIR in full FPU
      emulation, removing a regression introduced with 9b26616c [MIPS: Respect
      the ISA level in FCSR handling] and f6843626 [MIPS: math-emu: Set FIR
      feature flags for full emulation].
      
      Use `boot_cpu_data' to obtain the data from, following the approach that
      `cpu_has_*' macros take and avoiding the call to `smp_processor_id' made
      in the reference to `current_cpu_data'.  The contents of FSCR have to be
      consistent across processors in an SMP system, the settings there must
      not change as a thread is migrated across processors.  And the contents
      of FIR are guaranteed to be consistent in FPU emulation, by definition.
      
      Signed-off-by: default avatarMaciej W. Rozycki <macro@linux-mips.org>
      Tested-by: default avatarEzequiel Garcia <ezequiel.garcia@imgtec.com>
      Tested-by: default avatarPaul Martin <paul.martin@codethink.co.uk>
      Cc: Markos Chandras <Markos.Chandras@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/10030/
      
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      03dce595
    • Paul Burton's avatar
      MIPS: fix FP mode selection in lieu of .MIPS.abiflags data · 620b1550
      Paul Burton authored
      
      
      Commit 46490b57 ("MIPS: kernel: elf: Improve the overall ABI and FPU
      mode checks") reworked the ELF FP ABI mode selection logic, but when
      CONFIG_MIPS_O32_FP64_SUPPORT is enabled it breaks the use of binaries
      which have no PT_MIPS_ABIFLAGS program header & associated
      .MIPS.abiflags section.
      
      A default mode is selected based upon whether the ELF contains MIPS32 or
      MIPS64 code, but that selection is made in arch_elf_pt_proc.
      arch_elf_pt_proc only executes when a PT_MIPS_ABIFLAGS program header is
      found. If one is not found then arch_elf_pt_proc is never called, and no
      default overall_fp_mode value is selected. When arch_check_elf is
      called, both abi0 & abi1 are MIPS_ABI_FP_UNKNOWN which leads to both
      prog_req & interp_req being set to none_req. none_req matches none of
      the conditions for mode selection at the end of arch_check_elf, so
      overall_fp_mode is left untouched. Finally once mips_set_personality_fp
      is called the BUG() in the default case is then hit & the kernel likely
      panics.
      
      Fix this by moving the selection of a default overall mode to the start
      of arch_check_elf, which runs once per ELF executed regardless of
      whether it has a PT_MIPS_ABIFLAGS program header.
      
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Matthew Fortune <matthew.fortune@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Cc: stable@vger.kernel.org # v4.0+
      Patchwork: http://patchwork.linux-mips.org/patch/9978/
      
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      620b1550
    • Ralf Baechle's avatar
      MIPS: SMP: Fix build error. · cafb45b2
      Ralf Baechle authored
      
      
        CC      arch/mips/kernel/smp.o
      arch/mips/kernel/smp.c: In function ‘start_secondary’:
      arch/mips/kernel/smp.c:149:2: error: passing argument 2 of ‘cpumask_set_cpu’ discards ‘volatile’ qualifier from pointer target type [-Werror]
        cpumask_set_cpu(cpu, &cpu_callin_map);
        ^
      In file included from ./arch/mips/include/asm/processor.h:14:0,
                       from ./arch/mips/include/asm/thread_info.h:15,
                       from include/linux/thread_info.h:54,
                       from include/asm-generic/preempt.h:4,
                       from arch/mips/include/generated/asm/preempt.h:1,
                       from include/linux/preempt.h:18,
                       from include/linux/interrupt.h:8,
                       from arch/mips/kernel/smp.c:24:
      include/linux/cpumask.h:272:91: note: expected ‘struct cpumask *’ but argument is of type ‘volatile struct cpumask_t *’
       static inline void cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
                                                                                                 ^
      arch/mips/kernel/smp.c: In function ‘smp_prepare_boot_cpu’:
      arch/mips/kernel/smp.c:211:2: error: passing argument 2 of ‘cpumask_set_cpu’ discards ‘volatile’ qualifier from pointer target type [-Werror]
        cpumask_set_cpu(0, &cpu_callin_map);
        ^
      In file included from ./arch/mips/include/asm/processor.h:14:0,
                       from ./arch/mips/include/asm/thread_info.h:15,
                       from include/linux/thread_info.h:54,
                       from include/asm-generic/preempt.h:4,
                       from arch/mips/include/generated/asm/preempt.h:1,
                       from include/linux/preempt.h:18,
                       from include/linux/interrupt.h:8,
                       from arch/mips/kernel/smp.c:24:
      include/linux/cpumask.h:272:91: note: expected ‘struct cpumask *’ but argument is of type ‘volatile struct cpumask_t *’
       static inline void cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
                                                                                                 ^
      arch/mips/kernel/smp.c: In function ‘__cpu_up’:
      arch/mips/kernel/smp.c:221:10: error: passing argument 2 of ‘cpumask_test_cpu’ discards ‘volatile’ qualifier from pointer target type [-Werror]
        while (!cpumask_test_cpu(cpu, &cpu_callin_map))
                ^
      In file included from ./arch/mips/include/asm/processor.h:14:0,
                       from ./arch/mips/include/asm/thread_info.h:15,
                       from include/linux/thread_info.h:54,
                       from include/asm-generic/preempt.h:4,
                       from arch/mips/include/generated/asm/preempt.h:1,
                       from include/linux/preempt.h:18,
                       from include/linux/interrupt.h:8,
                       from arch/mips/kernel/smp.c:24:
      include/linux/cpumask.h:294:90: note: expected ‘const struct cpumask *’ but argument is of type ‘volatile struct cpumask_t *’
       static inline int cpumask_test_cpu(int cpu, const struct cpumask *cpumask)
                                                                                                ^
      cc1: all warnings being treated as errors
      make[2]: *** [arch/mips/kernel/smp.o] Error 1
      make[1]: *** [arch/mips/kernel] Error 2
      make: *** [arch/mips] Error 2
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      cafb45b2
  6. Apr 12, 2015
  7. Apr 10, 2015
  8. Apr 07, 2015
  9. Apr 01, 2015
Loading