diff options
| -rw-r--r-- | arch/sh/Makefile | 2 | ||||
| -rw-r--r-- | arch/sh/drivers/dma/dma-api.c | 1 | ||||
| -rw-r--r-- | arch/sh/kernel/cf-enabler.c | 6 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh3/entry.S | 1 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh4/probe.c | 1 | ||||
| -rw-r--r-- | arch/sh/kernel/smp.c | 2 | ||||
| -rw-r--r-- | arch/sh/kernel/timers/timer.c | 5 | ||||
| -rw-r--r-- | arch/sh/kernel/vsyscall/vsyscall.c | 1 | ||||
| -rw-r--r-- | include/asm-sh/cpu-sh4/freq.h | 3 | ||||
| -rw-r--r-- | include/asm-sh/dma.h | 1 | ||||
| -rw-r--r-- | include/asm-sh/io.h | 6 | ||||
| -rw-r--r-- | include/asm-sh/smp.h | 2 | ||||
| -rw-r--r-- | include/asm-sh/spinlock.h | 8 | ||||
| -rw-r--r-- | include/asm-sh/spinlock_types.h | 4 | 
14 files changed, 33 insertions, 10 deletions
| diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 7b1122417050..883b03b040c4 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile | |||
| @@ -39,7 +39,7 @@ cflags-$(CONFIG_CPU_SH2A) := -m2a $(call cc-option,-m2a-nofpu,) | |||
| 39 | cflags-$(CONFIG_CPU_SH3) := -m3 | 39 | cflags-$(CONFIG_CPU_SH3) := -m3 | 
| 40 | cflags-$(CONFIG_CPU_SH4) := -m4 \ | 40 | cflags-$(CONFIG_CPU_SH4) := -m4 \ | 
| 41 | $(call cc-option,-mno-implicit-fp,-m4-nofpu) | 41 | $(call cc-option,-mno-implicit-fp,-m4-nofpu) | 
| 42 | cflags-$(CONFIG_CPU_SH4A) := -m4a $(call cc-option,-m4a-nofpu,) | 42 | cflags-$(CONFIG_CPU_SH4A) := $(call cc-option,-m4a,) $(call cc-option,-m4a-nofpu,) | 
| 43 | 43 | ||
| 44 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb | 44 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb | 
| 45 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml | 45 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml | 
| diff --git a/arch/sh/drivers/dma/dma-api.c b/arch/sh/drivers/dma/dma-api.c index 8057a27a1bc6..cf8e11994330 100644 --- a/arch/sh/drivers/dma/dma-api.c +++ b/arch/sh/drivers/dma/dma-api.c | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/list.h> | 16 | #include <linux/list.h> | 
| 17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> | 
| 18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> | 
| 19 | #include <linux/sched.h> | ||
| 19 | #include <asm/dma.h> | 20 | #include <asm/dma.h> | 
| 20 | 21 | ||
| 21 | DEFINE_SPINLOCK(dma_spin_lock); | 22 | DEFINE_SPINLOCK(dma_spin_lock); | 
| diff --git a/arch/sh/kernel/cf-enabler.c b/arch/sh/kernel/cf-enabler.c index 849a9e191391..ebc73b85094a 100644 --- a/arch/sh/kernel/cf-enabler.c +++ b/arch/sh/kernel/cf-enabler.c | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <linux/init.h> | 12 | #include <linux/init.h> | 
| 13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> | 
| 14 | #include <linux/vmalloc.h> | 14 | #include <linux/vmalloc.h> | 
| 15 | #include <linux/interrupt.h> | ||
| 15 | #include <asm/io.h> | 16 | #include <asm/io.h> | 
| 16 | #include <asm/irq.h> | 17 | #include <asm/irq.h> | 
| 17 | 18 | ||
| @@ -149,6 +150,11 @@ static int __init cf_init_se(void) | |||
| 149 | ctrl_outb(0x42, PA_MRSHPC_MW2 + 0x200); | 150 | ctrl_outb(0x42, PA_MRSHPC_MW2 + 0x200); | 
| 150 | return 0; | 151 | return 0; | 
| 151 | } | 152 | } | 
| 153 | #else | ||
| 154 | static int __init cf_init_se(void) | ||
| 155 | { | ||
| 156 | return -1; | ||
| 157 | } | ||
| 152 | #endif | 158 | #endif | 
| 153 | 159 | ||
| 154 | int __init cf_init(void) | 160 | int __init cf_init(void) | 
| diff --git a/arch/sh/kernel/cpu/sh3/entry.S b/arch/sh/kernel/cpu/sh3/entry.S index 832c0b4a1e6c..659cc081e5e7 100644 --- a/arch/sh/kernel/cpu/sh3/entry.S +++ b/arch/sh/kernel/cpu/sh3/entry.S | |||
| @@ -320,6 +320,7 @@ skip_restore: | |||
| 320 | 320 | ||
| 321 | .align 2 | 321 | .align 2 | 
| 322 | 5: .long 0x00001000 ! DSP | 322 | 5: .long 0x00001000 ! DSP | 
| 323 | 6: .long in_nmi | ||
| 323 | 7: .long 0x30000000 | 324 | 7: .long 0x30000000 | 
| 324 | 325 | ||
| 325 | ! common exception handler | 326 | ! common exception handler | 
| diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c index 8cd04904c77a..fab2eb07196b 100644 --- a/arch/sh/kernel/cpu/sh4/probe.c +++ b/arch/sh/kernel/cpu/sh4/probe.c | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | */ | 12 | */ | 
| 13 | #include <linux/init.h> | 13 | #include <linux/init.h> | 
| 14 | #include <linux/io.h> | 14 | #include <linux/io.h> | 
| 15 | #include <linux/smp.h> | ||
| 15 | #include <asm/processor.h> | 16 | #include <asm/processor.h> | 
| 16 | #include <asm/cache.h> | 17 | #include <asm/cache.h> | 
| 17 | 18 | ||
| diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c index dbebaddcfe39..283e1425ced5 100644 --- a/arch/sh/kernel/smp.c +++ b/arch/sh/kernel/smp.c | |||
| @@ -10,6 +10,8 @@ | |||
| 10 | * Free Software Foundation; either version 2 of the License, or (at your | 10 | * Free Software Foundation; either version 2 of the License, or (at your | 
| 11 | * option) any later version. | 11 | * option) any later version. | 
| 12 | */ | 12 | */ | 
| 13 | |||
| 14 | #include <linux/err.h> | ||
| 13 | #include <linux/cache.h> | 15 | #include <linux/cache.h> | 
| 14 | #include <linux/cpumask.h> | 16 | #include <linux/cpumask.h> | 
| 15 | #include <linux/delay.h> | 17 | #include <linux/delay.h> | 
| diff --git a/arch/sh/kernel/timers/timer.c b/arch/sh/kernel/timers/timer.c index a6bcc913d25e..4e7e747d1b69 100644 --- a/arch/sh/kernel/timers/timer.c +++ b/arch/sh/kernel/timers/timer.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | #include <linux/string.h> | 13 | #include <linux/string.h> | 
| 14 | #include <asm/timer.h> | 14 | #include <asm/timer.h> | 
| 15 | 15 | ||
| 16 | static struct sys_timer *sys_timers[] __initdata = { | 16 | static struct sys_timer *sys_timers[] = { | 
| 17 | #ifdef CONFIG_SH_TMU | 17 | #ifdef CONFIG_SH_TMU | 
| 18 | &tmu_timer, | 18 | &tmu_timer, | 
| 19 | #endif | 19 | #endif | 
| @@ -26,7 +26,7 @@ static struct sys_timer *sys_timers[] __initdata = { | |||
| 26 | NULL, | 26 | NULL, | 
| 27 | }; | 27 | }; | 
| 28 | 28 | ||
| 29 | static char timer_override[10] __initdata; | 29 | static char timer_override[10]; | 
| 30 | static int __init timer_setup(char *str) | 30 | static int __init timer_setup(char *str) | 
| 31 | { | 31 | { | 
| 32 | if (str) | 32 | if (str) | 
| @@ -53,4 +53,3 @@ struct sys_timer *get_sys_timer(void) | |||
| 53 | 53 | ||
| 54 | return NULL; | 54 | return NULL; | 
| 55 | } | 55 | } | 
| 56 | |||
| diff --git a/arch/sh/kernel/vsyscall/vsyscall.c b/arch/sh/kernel/vsyscall/vsyscall.c index e146bafcd14f..2aa9438361bc 100644 --- a/arch/sh/kernel/vsyscall/vsyscall.c +++ b/arch/sh/kernel/vsyscall/vsyscall.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/gfp.h> | 17 | #include <linux/gfp.h> | 
| 18 | #include <linux/module.h> | 18 | #include <linux/module.h> | 
| 19 | #include <linux/elf.h> | 19 | #include <linux/elf.h> | 
| 20 | #include <linux/sched.h> | ||
| 20 | 21 | ||
| 21 | /* | 22 | /* | 
| 22 | * Should the kernel map a VDSO page into processes and pass its | 23 | * Should the kernel map a VDSO page into processes and pass its | 
| diff --git a/include/asm-sh/cpu-sh4/freq.h b/include/asm-sh/cpu-sh4/freq.h index 86564e7a26ae..39f41fcd509d 100644 --- a/include/asm-sh/cpu-sh4/freq.h +++ b/include/asm-sh/cpu-sh4/freq.h | |||
| @@ -24,6 +24,9 @@ | |||
| 24 | #define FRQMR1 0xffc80014 | 24 | #define FRQMR1 0xffc80014 | 
| 25 | #else | 25 | #else | 
| 26 | #define FRQCR 0xffc00000 | 26 | #define FRQCR 0xffc00000 | 
| 27 | #define FRQCR_PSTBY 0x0200 | ||
| 28 | #define FRQCR_PLLEN 0x0400 | ||
| 29 | #define FRQCR_CKOEN 0x0800 | ||
| 27 | #endif | 30 | #endif | 
| 28 | #define MIN_DIVISOR_NR 0 | 31 | #define MIN_DIVISOR_NR 0 | 
| 29 | #define MAX_DIVISOR_NR 3 | 32 | #define MAX_DIVISOR_NR 3 | 
| diff --git a/include/asm-sh/dma.h b/include/asm-sh/dma.h index faf3051cd429..6034d4a29e73 100644 --- a/include/asm-sh/dma.h +++ b/include/asm-sh/dma.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> | 
| 15 | #include <linux/wait.h> | 15 | #include <linux/wait.h> | 
| 16 | #include <linux/sched.h> | ||
| 16 | #include <linux/sysdev.h> | 17 | #include <linux/sysdev.h> | 
| 17 | #include <asm/cpu/dma.h> | 18 | #include <asm/cpu/dma.h> | 
| 18 | 19 | ||
| diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h index a0e55b09e4fd..aa80930ce8e4 100644 --- a/include/asm-sh/io.h +++ b/include/asm-sh/io.h | |||
| @@ -116,13 +116,13 @@ void __raw_readsl(unsigned long addr, void *data, int longlen); | |||
| 116 | * redefined by userlevel programs. | 116 | * redefined by userlevel programs. | 
| 117 | */ | 117 | */ | 
| 118 | #ifdef __readb | 118 | #ifdef __readb | 
| 119 | # define readb(a) ({ unsigned long r_ = __raw_readb(a); mb(); r_; }) | 119 | # define readb(a) ({ unsigned int r_ = __raw_readb(a); mb(); r_; }) | 
| 120 | #endif | 120 | #endif | 
| 121 | #ifdef __raw_readw | 121 | #ifdef __raw_readw | 
| 122 | # define readw(a) ({ unsigned long r_ = __raw_readw(a); mb(); r_; }) | 122 | # define readw(a) ({ unsigned int r_ = __raw_readw(a); mb(); r_; }) | 
| 123 | #endif | 123 | #endif | 
| 124 | #ifdef __raw_readl | 124 | #ifdef __raw_readl | 
| 125 | # define readl(a) ({ unsigned long r_ = __raw_readl(a); mb(); r_; }) | 125 | # define readl(a) ({ unsigned int r_ = __raw_readl(a); mb(); r_; }) | 
| 126 | #endif | 126 | #endif | 
| 127 | 127 | ||
| 128 | #ifdef __raw_writeb | 128 | #ifdef __raw_writeb | 
| diff --git a/include/asm-sh/smp.h b/include/asm-sh/smp.h index 71ecddf70db3..caa7b93f1bce 100644 --- a/include/asm-sh/smp.h +++ b/include/asm-sh/smp.h | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | #ifdef CONFIG_SMP | 16 | #ifdef CONFIG_SMP | 
| 17 | 17 | ||
| 18 | #include <asm/spinlock.h> | 18 | #include <linux/spinlock.h> | 
| 19 | #include <asm/atomic.h> | 19 | #include <asm/atomic.h> | 
| 20 | #include <asm/current.h> | 20 | #include <asm/current.h> | 
| 21 | 21 | ||
| diff --git a/include/asm-sh/spinlock.h b/include/asm-sh/spinlock.h index 2586eef07d57..92f6e2008b2e 100644 --- a/include/asm-sh/spinlock.h +++ b/include/asm-sh/spinlock.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #define __ASM_SH_SPINLOCK_H | 11 | #define __ASM_SH_SPINLOCK_H | 
| 12 | 12 | ||
| 13 | #include <asm/atomic.h> | 13 | #include <asm/atomic.h> | 
| 14 | #include <asm/spinlock_types.h> | ||
| 14 | 15 | ||
| 15 | /* | 16 | /* | 
| 16 | * Your basic SMP spinlocks, allowing only a single CPU anywhere | 17 | * Your basic SMP spinlocks, allowing only a single CPU anywhere | 
| @@ -42,7 +43,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock) | |||
| 42 | 43 | ||
| 43 | static inline void __raw_spin_unlock(raw_spinlock_t *lock) | 44 | static inline void __raw_spin_unlock(raw_spinlock_t *lock) | 
| 44 | { | 45 | { | 
| 45 | assert_spin_locked(lock); | 46 | //assert_spin_locked(lock); | 
| 46 | 47 | ||
| 47 | lock->lock = 0; | 48 | lock->lock = 0; | 
| 48 | } | 49 | } | 
| @@ -88,6 +89,11 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw) | |||
| 88 | __raw_spin_unlock(&rw->lock); | 89 | __raw_spin_unlock(&rw->lock); | 
| 89 | } | 90 | } | 
| 90 | 91 | ||
| 92 | static inline int __raw_write_can_lock(raw_rwlock_t *rw) | ||
| 93 | { | ||
| 94 | return (atomic_read(&rw->counter) == RW_LOCK_BIAS); | ||
| 95 | } | ||
| 96 | |||
| 91 | static inline int __raw_read_trylock(raw_rwlock_t *lock) | 97 | static inline int __raw_read_trylock(raw_rwlock_t *lock) | 
| 92 | { | 98 | { | 
| 93 | atomic_t *count = (atomic_t*)lock; | 99 | atomic_t *count = (atomic_t*)lock; | 
| diff --git a/include/asm-sh/spinlock_types.h b/include/asm-sh/spinlock_types.h index 8c41b6c3aac8..5c58134f2c4e 100644 --- a/include/asm-sh/spinlock_types.h +++ b/include/asm-sh/spinlock_types.h | |||
| @@ -9,7 +9,9 @@ typedef struct { | |||
| 9 | volatile unsigned long lock; | 9 | volatile unsigned long lock; | 
| 10 | } raw_spinlock_t; | 10 | } raw_spinlock_t; | 
| 11 | 11 | ||
| 12 | #define __SPIN_LOCK_UNLOCKED { 0 } | 12 | #define __RAW_SPIN_LOCK_UNLOCKED { 1 } | 
| 13 | |||
| 14 | #include <asm/atomic.h> | ||
| 13 | 15 | ||
| 14 | typedef struct { | 16 | typedef struct { | 
| 15 | raw_spinlock_t lock; | 17 | raw_spinlock_t lock; | 
