diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-22 21:05:45 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-22 21:05:45 -0400 |
| commit | 3cb7a59fd8c816af6765f3712cd233d83984edf2 (patch) | |
| tree | efbb3b4dd4978d812f65620fb86aeccc4c5e3b55 | |
| parent | bb3ec6b08396bbd631b6441102dd1c3d89cbc576 (diff) | |
| parent | dec33abaafc89bcbd78f85fad0513170415a26d5 (diff) | |
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS update from Ralf Baechle:
- Fix a build error if <linux/printk.h> is included without
<linux/linkage.h> having been included before.
- Cleanup and fix the damage done by the generic idle loop patch.
- A kprobes fix that brings the MIPS code in line with what other
architectures are for quite a while already.
- Wire up the native getdents64(2) syscall for 64 bit - for some reason
it was only for the compat ABIs. This has been reported to cause an
application issue. This turned out bigger than I meant but the wait
instruction support code was driving me nuts.
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
MIPS: N64: Wire getdents64(2)
kprobes/mips: Fix to check double free of insn slot
MIPS: Idle: Break r4k_wait into two functions and fix it.
MIPS: Idle: Do address fiddlery in helper functions.
MIPS: Idle: Consolidate all declarations in <asm/idle.h>.
MIPS: Idle: Don't call local_irq_disable() in cpu_wait() implementations.
MIPS: Idle: Re-enable irqs at the end of r3081, au1k and loongson2 cpu_wait.
MIPS: Idle: Make call of function pointer readable.
MIPS: Idle: Consistently reformat inline assembler.
MIPS: Idle: cleaup SMTC idle hook as per Linux coding style.
MIPS: Consolidate idle loop / WAIT instruction support in a single file.
MIPS: clock.h: Remove declaration of cpu_wait.
Add include dependencies to <linux/printk.h>.
MIPS: Rewrite pfn_valid to work in modules, too.
30 files changed, 309 insertions, 237 deletions
diff --git a/arch/mips/alchemy/board-gpr.c b/arch/mips/alchemy/board-gpr.c index cb0f6afb7389..9edc35ff8cf1 100644 --- a/arch/mips/alchemy/board-gpr.c +++ b/arch/mips/alchemy/board-gpr.c | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include <linux/i2c.h> | 31 | #include <linux/i2c.h> |
| 32 | #include <linux/i2c-gpio.h> | 32 | #include <linux/i2c-gpio.h> |
| 33 | #include <asm/bootinfo.h> | 33 | #include <asm/bootinfo.h> |
| 34 | #include <asm/idle.h> | ||
| 34 | #include <asm/reboot.h> | 35 | #include <asm/reboot.h> |
| 35 | #include <asm/mach-au1x00/au1000.h> | 36 | #include <asm/mach-au1x00/au1000.h> |
| 36 | #include <prom.h> | 37 | #include <prom.h> |
diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c index 38afb11ba2c4..93fa586d52e2 100644 --- a/arch/mips/alchemy/common/time.c +++ b/arch/mips/alchemy/common/time.c | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
| 37 | #include <linux/spinlock.h> | 37 | #include <linux/spinlock.h> |
| 38 | 38 | ||
| 39 | #include <asm/idle.h> | ||
| 39 | #include <asm/processor.h> | 40 | #include <asm/processor.h> |
| 40 | #include <asm/time.h> | 41 | #include <asm/time.h> |
| 41 | #include <asm/mach-au1x00/au1000.h> | 42 | #include <asm/mach-au1x00/au1000.h> |
diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c index a0233a2c1988..8be4e856b8b8 100644 --- a/arch/mips/ath79/setup.c +++ b/arch/mips/ath79/setup.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
| 20 | 20 | ||
| 21 | #include <asm/bootinfo.h> | 21 | #include <asm/bootinfo.h> |
| 22 | #include <asm/idle.h> | ||
| 22 | #include <asm/time.h> /* for mips_hpt_frequency */ | 23 | #include <asm/time.h> /* for mips_hpt_frequency */ |
| 23 | #include <asm/reboot.h> /* for _machine_{restart,halt} */ | 24 | #include <asm/reboot.h> /* for _machine_{restart,halt} */ |
| 24 | #include <asm/mips_machine.h> | 25 | #include <asm/mips_machine.h> |
diff --git a/arch/mips/cobalt/reset.c b/arch/mips/cobalt/reset.c index 516b4428df4e..4eedd481dd00 100644 --- a/arch/mips/cobalt/reset.c +++ b/arch/mips/cobalt/reset.c | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <linux/io.h> | 12 | #include <linux/io.h> |
| 13 | #include <linux/leds.h> | 13 | #include <linux/leds.h> |
| 14 | 14 | ||
| 15 | #include <asm/idle.h> | ||
| 15 | #include <asm/processor.h> | 16 | #include <asm/processor.h> |
| 16 | 17 | ||
| 17 | #include <cobalt.h> | 18 | #include <cobalt.h> |
diff --git a/arch/mips/include/asm/clock.h b/arch/mips/include/asm/clock.h index c9456e7a7283..778e32d817bc 100644 --- a/arch/mips/include/asm/clock.h +++ b/arch/mips/include/asm/clock.h | |||
| @@ -6,8 +6,6 @@ | |||
| 6 | #include <linux/seq_file.h> | 6 | #include <linux/seq_file.h> |
| 7 | #include <linux/clk.h> | 7 | #include <linux/clk.h> |
| 8 | 8 | ||
| 9 | extern void (*cpu_wait) (void); | ||
| 10 | |||
| 11 | struct clk; | 9 | struct clk; |
| 12 | 10 | ||
| 13 | struct clk_ops { | 11 | struct clk_ops { |
diff --git a/arch/mips/include/asm/idle.h b/arch/mips/include/asm/idle.h new file mode 100644 index 000000000000..d192158886b1 --- /dev/null +++ b/arch/mips/include/asm/idle.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | #ifndef __ASM_IDLE_H | ||
| 2 | #define __ASM_IDLE_H | ||
| 3 | |||
| 4 | #include <linux/linkage.h> | ||
| 5 | |||
| 6 | extern void (*cpu_wait)(void); | ||
| 7 | extern void r4k_wait(void); | ||
| 8 | extern asmlinkage void __r4k_wait(void); | ||
| 9 | extern void r4k_wait_irqoff(void); | ||
| 10 | extern void __pastwait(void); | ||
| 11 | |||
| 12 | static inline int using_rollback_handler(void) | ||
| 13 | { | ||
| 14 | return cpu_wait == r4k_wait; | ||
| 15 | } | ||
| 16 | |||
| 17 | static inline int address_is_in_r4k_wait_irqoff(unsigned long addr) | ||
| 18 | { | ||
| 19 | return addr >= (unsigned long)r4k_wait_irqoff && | ||
| 20 | addr < (unsigned long)__pastwait; | ||
| 21 | } | ||
| 22 | |||
| 23 | #endif /* __ASM_IDLE_H */ | ||
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h index ec1ca537fbc1..f59552fae917 100644 --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h | |||
| @@ -171,14 +171,13 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
| 171 | 171 | ||
| 172 | #ifdef CONFIG_FLATMEM | 172 | #ifdef CONFIG_FLATMEM |
| 173 | 173 | ||
| 174 | #define pfn_valid(pfn) \ | 174 | static inline int pfn_valid(unsigned long pfn) |
| 175 | ({ \ | 175 | { |
| 176 | unsigned long __pfn = (pfn); \ | 176 | /* avoid <linux/mm.h> include hell */ |
| 177 | /* avoid <linux/bootmem.h> include hell */ \ | 177 | extern unsigned long max_mapnr; |
| 178 | extern unsigned long min_low_pfn; \ | 178 | |
| 179 | \ | 179 | return pfn >= ARCH_PFN_OFFSET && pfn < max_mapnr; |
| 180 | __pfn >= min_low_pfn && __pfn < max_mapnr; \ | 180 | } |
| 181 | }) | ||
| 182 | 181 | ||
| 183 | #elif defined(CONFIG_SPARSEMEM) | 182 | #elif defined(CONFIG_SPARSEMEM) |
| 184 | 183 | ||
diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm/processor.h index 71686c897dea..1470b7b68b0e 100644 --- a/arch/mips/include/asm/processor.h +++ b/arch/mips/include/asm/processor.h | |||
| @@ -28,7 +28,6 @@ | |||
| 28 | /* | 28 | /* |
| 29 | * System setup and hardware flags.. | 29 | * System setup and hardware flags.. |
| 30 | */ | 30 | */ |
| 31 | extern void (*cpu_wait)(void); | ||
| 32 | 31 | ||
| 33 | extern unsigned int vced_count, vcei_count; | 32 | extern unsigned int vced_count, vcei_count; |
| 34 | 33 | ||
diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h index 16338b84fa79..1dee279f9665 100644 --- a/arch/mips/include/uapi/asm/unistd.h +++ b/arch/mips/include/uapi/asm/unistd.h | |||
| @@ -694,16 +694,17 @@ | |||
| 694 | #define __NR_process_vm_writev (__NR_Linux + 305) | 694 | #define __NR_process_vm_writev (__NR_Linux + 305) |
| 695 | #define __NR_kcmp (__NR_Linux + 306) | 695 | #define __NR_kcmp (__NR_Linux + 306) |
| 696 | #define __NR_finit_module (__NR_Linux + 307) | 696 | #define __NR_finit_module (__NR_Linux + 307) |
| 697 | #define __NR_getdents64 (__NR_Linux + 308) | ||
| 697 | 698 | ||
| 698 | /* | 699 | /* |
| 699 | * Offset of the last Linux 64-bit flavoured syscall | 700 | * Offset of the last Linux 64-bit flavoured syscall |
| 700 | */ | 701 | */ |
| 701 | #define __NR_Linux_syscalls 307 | 702 | #define __NR_Linux_syscalls 308 |
| 702 | 703 | ||
| 703 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 704 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
| 704 | |||
