Skip to content

Commit da34232

Browse files
committed
Merge branch '4.3-fixes' into mips-for-linux-next
2 parents bf463f2 + 3bfb722 commit da34232

File tree

5 files changed

+26
-4
lines changed

5 files changed

+26
-4
lines changed

arch/mips/include/asm/atomic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
507507
* @u: ...unless v is equal to u.
508508
*
509509
* Atomically adds @a to @v, so long as it was not @u.
510-
* Returns the old value of @v.
510+
* Returns true iff @v was not @u.
511511
*/
512512
static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
513513
{

arch/mips/include/asm/cdmm.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,17 @@ void mips_cdmm_driver_unregister(struct mips_cdmm_driver *);
8484
module_driver(__mips_cdmm_driver, mips_cdmm_driver_register, \
8585
mips_cdmm_driver_unregister)
8686

87+
/*
88+
* builtin_mips_cdmm_driver() - Helper macro for drivers that don't do anything
89+
* special in init and have no exit. This eliminates some boilerplate. Each
90+
* driver may only use this macro once, and calling it replaces device_initcall
91+
* (or in some cases, the legacy __initcall). This is meant to be a direct
92+
* parallel of module_mips_cdmm_driver() above but without the __exit stuff that
93+
* is not used for builtin cases.
94+
*/
95+
#define builtin_mips_cdmm_driver(__mips_cdmm_driver) \
96+
builtin_driver(__mips_cdmm_driver, mips_cdmm_driver_register)
97+
8798
/* drivers/tty/mips_ejtag_fdc.c */
8899

89100
#ifdef CONFIG_MIPS_EJTAG_FDC_EARLYCON

arch/mips/kernel/idle.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ void __init check_wait(void)
171171
case CPU_BMIPS3300:
172172
case CPU_BMIPS4350:
173173
case CPU_BMIPS4380:
174-
case CPU_BMIPS5000:
175174
case CPU_CAVIUM_OCTEON:
176175
case CPU_CAVIUM_OCTEON_PLUS:
177176
case CPU_CAVIUM_OCTEON2:
@@ -182,7 +181,9 @@ void __init check_wait(void)
182181
case CPU_XLP:
183182
cpu_wait = r4k_wait;
184183
break;
185-
184+
case CPU_BMIPS5000:
185+
cpu_wait = r4k_wait_irqoff;
186+
break;
186187
case CPU_RM7000:
187188
cpu_wait = rm7k_wait_irqoff;
188189
break;

arch/mips/kernel/traps.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,12 +1857,14 @@ void __noreturn nmi_exception_handler(struct pt_regs *regs)
18571857
{
18581858
char str[100];
18591859

1860+
nmi_enter();
18601861
raw_notifier_call_chain(&nmi_chain, 0, regs);
18611862
bust_spinlocks(1);
18621863
snprintf(str, 100, "CPU%d NMI taken, CP0_EPC=%lx\n",
18631864
smp_processor_id(), regs->cp0_epc);
18641865
regs->cp0_epc = read_c0_errorepc();
18651866
die(str, regs);
1867+
nmi_exit();
18661868
}
18671869

18681870
#define VECTORSPACING 0x100 /* for EI/VI mode */

arch/mips/kernel/vmlinux.lds.S

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ OUTPUT_ARCH(mips)
1717
ENTRY(kernel_entry)
1818
PHDRS {
1919
text PT_LOAD FLAGS(7); /* RWX */
20+
#ifndef CONFIG_CAVIUM_OCTEON_SOC
2021
note PT_NOTE FLAGS(4); /* R__ */
22+
#endif /* CAVIUM_OCTEON_SOC */
2123
}
2224

2325
#ifdef CONFIG_32BIT
@@ -71,7 +73,12 @@ SECTIONS
7173
__stop___dbe_table = .;
7274
}
7375

74-
NOTES :text :note
76+
#ifdef CONFIG_CAVIUM_OCTEON_SOC
77+
#define NOTES_HEADER
78+
#else /* CONFIG_CAVIUM_OCTEON_SOC */
79+
#define NOTES_HEADER :note
80+
#endif /* CONFIG_CAVIUM_OCTEON_SOC */
81+
NOTES :text NOTES_HEADER
7582
.dummy : { *(.dummy) } :text
7683

7784
_sdata = .; /* Start of data section */
@@ -186,6 +193,7 @@ SECTIONS
186193
DISCARDS
187194
/DISCARD/ : {
188195
/* ABI crap starts here */
196+
*(.MIPS.abiflags)
189197
*(.MIPS.options)
190198
*(.options)
191199
*(.pdr)

0 commit comments

Comments
 (0)