Commit da342326 authored by Ralf Baechle's avatar Ralf Baechle

Merge branch '4.3-fixes' into mips-for-linux-next

parents bf463f2f 3bfb7224
...@@ -507,7 +507,7 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v) ...@@ -507,7 +507,7 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
* @u: ...unless v is equal to u. * @u: ...unless v is equal to u.
* *
* Atomically adds @a to @v, so long as it was not @u. * Atomically adds @a to @v, so long as it was not @u.
* Returns the old value of @v. * Returns true iff @v was not @u.
*/ */
static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
{ {
......
...@@ -84,6 +84,17 @@ void mips_cdmm_driver_unregister(struct mips_cdmm_driver *); ...@@ -84,6 +84,17 @@ void mips_cdmm_driver_unregister(struct mips_cdmm_driver *);
module_driver(__mips_cdmm_driver, mips_cdmm_driver_register, \ module_driver(__mips_cdmm_driver, mips_cdmm_driver_register, \
mips_cdmm_driver_unregister) mips_cdmm_driver_unregister)
/*
* builtin_mips_cdmm_driver() - Helper macro for drivers that don't do anything
* special in init and have no exit. This eliminates some boilerplate. Each
* driver may only use this macro once, and calling it replaces device_initcall
* (or in some cases, the legacy __initcall). This is meant to be a direct
* parallel of module_mips_cdmm_driver() above but without the __exit stuff that
* is not used for builtin cases.
*/
#define builtin_mips_cdmm_driver(__mips_cdmm_driver) \
builtin_driver(__mips_cdmm_driver, mips_cdmm_driver_register)
/* drivers/tty/mips_ejtag_fdc.c */ /* drivers/tty/mips_ejtag_fdc.c */
#ifdef CONFIG_MIPS_EJTAG_FDC_EARLYCON #ifdef CONFIG_MIPS_EJTAG_FDC_EARLYCON
......
...@@ -171,7 +171,6 @@ void __init check_wait(void) ...@@ -171,7 +171,6 @@ void __init check_wait(void)
case CPU_BMIPS3300: case CPU_BMIPS3300:
case CPU_BMIPS4350: case CPU_BMIPS4350:
case CPU_BMIPS4380: case CPU_BMIPS4380:
case CPU_BMIPS5000:
case CPU_CAVIUM_OCTEON: case CPU_CAVIUM_OCTEON:
case CPU_CAVIUM_OCTEON_PLUS: case CPU_CAVIUM_OCTEON_PLUS:
case CPU_CAVIUM_OCTEON2: case CPU_CAVIUM_OCTEON2:
...@@ -182,7 +181,9 @@ void __init check_wait(void) ...@@ -182,7 +181,9 @@ void __init check_wait(void)
case CPU_XLP: case CPU_XLP:
cpu_wait = r4k_wait; cpu_wait = r4k_wait;
break; break;
case CPU_BMIPS5000:
cpu_wait = r4k_wait_irqoff;
break;
case CPU_RM7000: case CPU_RM7000:
cpu_wait = rm7k_wait_irqoff; cpu_wait = rm7k_wait_irqoff;
break; break;
......
...@@ -1857,12 +1857,14 @@ void __noreturn nmi_exception_handler(struct pt_regs *regs) ...@@ -1857,12 +1857,14 @@ void __noreturn nmi_exception_handler(struct pt_regs *regs)
{ {
char str[100]; char str[100];
nmi_enter();
raw_notifier_call_chain(&nmi_chain, 0, regs); raw_notifier_call_chain(&nmi_chain, 0, regs);
bust_spinlocks(1); bust_spinlocks(1);
snprintf(str, 100, "CPU%d NMI taken, CP0_EPC=%lx\n", snprintf(str, 100, "CPU%d NMI taken, CP0_EPC=%lx\n",
smp_processor_id(), regs->cp0_epc); smp_processor_id(), regs->cp0_epc);
regs->cp0_epc = read_c0_errorepc(); regs->cp0_epc = read_c0_errorepc();
die(str, regs); die(str, regs);
nmi_exit();
} }
#define VECTORSPACING 0x100 /* for EI/VI mode */ #define VECTORSPACING 0x100 /* for EI/VI mode */
......
...@@ -17,7 +17,9 @@ OUTPUT_ARCH(mips) ...@@ -17,7 +17,9 @@ OUTPUT_ARCH(mips)
ENTRY(kernel_entry) ENTRY(kernel_entry)
PHDRS { PHDRS {
text PT_LOAD FLAGS(7); /* RWX */ text PT_LOAD FLAGS(7); /* RWX */
#ifndef CONFIG_CAVIUM_OCTEON_SOC
note PT_NOTE FLAGS(4); /* R__ */ note PT_NOTE FLAGS(4); /* R__ */
#endif /* CAVIUM_OCTEON_SOC */
} }
#ifdef CONFIG_32BIT #ifdef CONFIG_32BIT
...@@ -71,7 +73,12 @@ SECTIONS ...@@ -71,7 +73,12 @@ SECTIONS
__stop___dbe_table = .; __stop___dbe_table = .;
} }
NOTES :text :note #ifdef CONFIG_CAVIUM_OCTEON_SOC
#define NOTES_HEADER
#else /* CONFIG_CAVIUM_OCTEON_SOC */
#define NOTES_HEADER :note
#endif /* CONFIG_CAVIUM_OCTEON_SOC */
NOTES :text NOTES_HEADER
.dummy : { *(.dummy) } :text .dummy : { *(.dummy) } :text
_sdata = .; /* Start of data section */ _sdata = .; /* Start of data section */
...@@ -186,6 +193,7 @@ SECTIONS ...@@ -186,6 +193,7 @@ SECTIONS
DISCARDS DISCARDS
/DISCARD/ : { /DISCARD/ : {
/* ABI crap starts here */ /* ABI crap starts here */
*(.MIPS.abiflags)
*(.MIPS.options) *(.MIPS.options)
*(.options) *(.options)
*(.pdr) *(.pdr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment