Commit 5983b125 authored by Linus Torvalds's avatar Linus Torvalds

Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: support older gcc's
  sh: trivial build cleanups.
  sh: Fix vsyscall build failure.
  sh: Trivial fix for dma-api compile failure.
  sh: Fix pcrel too far for in_nmi label.
  sh: section mismatch fixes for system timer.
parents 8ac1c101 4e1c2084
...@@ -39,7 +39,7 @@ cflags-$(CONFIG_CPU_SH2A) := -m2a $(call cc-option,-m2a-nofpu,) ...@@ -39,7 +39,7 @@ cflags-$(CONFIG_CPU_SH2A) := -m2a $(call cc-option,-m2a-nofpu,)
cflags-$(CONFIG_CPU_SH3) := -m3 cflags-$(CONFIG_CPU_SH3) := -m3
cflags-$(CONFIG_CPU_SH4) := -m4 \ cflags-$(CONFIG_CPU_SH4) := -m4 \
$(call cc-option,-mno-implicit-fp,-m4-nofpu) $(call cc-option,-mno-implicit-fp,-m4-nofpu)
cflags-$(CONFIG_CPU_SH4A) := -m4a $(call cc-option,-m4a-nofpu,) cflags-$(CONFIG_CPU_SH4A) := $(call cc-option,-m4a,) $(call cc-option,-m4a-nofpu,)
cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb
cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/list.h> #include <linux/list.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/sched.h>
#include <asm/dma.h> #include <asm/dma.h>
DEFINE_SPINLOCK(dma_spin_lock); DEFINE_SPINLOCK(dma_spin_lock);
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/interrupt.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -149,6 +150,11 @@ static int __init cf_init_se(void) ...@@ -149,6 +150,11 @@ static int __init cf_init_se(void)
ctrl_outb(0x42, PA_MRSHPC_MW2 + 0x200); ctrl_outb(0x42, PA_MRSHPC_MW2 + 0x200);
return 0; return 0;
} }
#else
static int __init cf_init_se(void)
{
return -1;
}
#endif #endif
int __init cf_init(void) int __init cf_init(void)
......
...@@ -320,6 +320,7 @@ skip_restore: ...@@ -320,6 +320,7 @@ skip_restore:
.align 2 .align 2
5: .long 0x00001000 ! DSP 5: .long 0x00001000 ! DSP
6: .long in_nmi
7: .long 0x30000000 7: .long 0x30000000
! common exception handler ! common exception handler
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
*/ */
#include <linux/init.h> #include <linux/init.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/smp.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/cache.h> #include <asm/cache.h>
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
* Free Software Foundation; either version 2 of the License, or (at your * Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. * option) any later version.
*/ */
#include <linux/err.h>
#include <linux/cache.h> #include <linux/cache.h>
#include <linux/cpumask.h> #include <linux/cpumask.h>
#include <linux/delay.h> #include <linux/delay.h>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <linux/string.h> #include <linux/string.h>
#include <asm/timer.h> #include <asm/timer.h>
static struct sys_timer *sys_timers[] __initdata = { static struct sys_timer *sys_timers[] = {
#ifdef CONFIG_SH_TMU #ifdef CONFIG_SH_TMU
&tmu_timer, &tmu_timer,
#endif #endif
...@@ -26,7 +26,7 @@ static struct sys_timer *sys_timers[] __initdata = { ...@@ -26,7 +26,7 @@ static struct sys_timer *sys_timers[] __initdata = {
NULL, NULL,
}; };
static char timer_override[10] __initdata; static char timer_override[10];
static int __init timer_setup(char *str) static int __init timer_setup(char *str)
{ {
if (str) if (str)
...@@ -53,4 +53,3 @@ struct sys_timer *get_sys_timer(void) ...@@ -53,4 +53,3 @@ struct sys_timer *get_sys_timer(void)
return NULL; return NULL;
} }
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/gfp.h> #include <linux/gfp.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/elf.h> #include <linux/elf.h>
#include <linux/sched.h>
/* /*
* Should the kernel map a VDSO page into processes and pass its * Should the kernel map a VDSO page into processes and pass its
......
...@@ -24,6 +24,9 @@ ...@@ -24,6 +24,9 @@
#define FRQMR1 0xffc80014 #define FRQMR1 0xffc80014
#else #else
#define FRQCR 0xffc00000 #define FRQCR 0xffc00000
#define FRQCR_PSTBY 0x0200
#define FRQCR_PLLEN 0x0400
#define FRQCR_CKOEN 0x0800
#endif #endif
#define MIN_DIVISOR_NR 0 #define MIN_DIVISOR_NR 0
#define MAX_DIVISOR_NR 3 #define MAX_DIVISOR_NR 3
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/wait.h> #include <linux/wait.h>
#include <linux/sched.h>
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <asm/cpu/dma.h> #include <asm/cpu/dma.h>
......
...@@ -116,13 +116,13 @@ void __raw_readsl(unsigned long addr, void *data, int longlen); ...@@ -116,13 +116,13 @@ void __raw_readsl(unsigned long addr, void *data, int longlen);
* redefined by userlevel programs. * redefined by userlevel programs.
*/ */
#ifdef __readb #ifdef __readb
# define readb(a) ({ unsigned long r_ = __raw_readb(a); mb(); r_; }) # define readb(a) ({ unsigned int r_ = __raw_readb(a); mb(); r_; })
#endif #endif
#ifdef __raw_readw #ifdef __raw_readw
# define readw(a) ({ unsigned long r_ = __raw_readw(a); mb(); r_; }) # define readw(a) ({ unsigned int r_ = __raw_readw(a); mb(); r_; })
#endif #endif
#ifdef __raw_readl #ifdef __raw_readl
# define readl(a) ({ unsigned long r_ = __raw_readl(a); mb(); r_; }) # define readl(a) ({ unsigned int r_ = __raw_readl(a); mb(); r_; })
#endif #endif
#ifdef __raw_writeb #ifdef __raw_writeb
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
#include <asm/spinlock.h> #include <linux/spinlock.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/current.h> #include <asm/current.h>
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#define __ASM_SH_SPINLOCK_H #define __ASM_SH_SPINLOCK_H
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/spinlock_types.h>
/* /*
* Your basic SMP spinlocks, allowing only a single CPU anywhere * 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,7 +43,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
static inline void __raw_spin_unlock(raw_spinlock_t *lock) static inline void __raw_spin_unlock(raw_spinlock_t *lock)
{ {
assert_spin_locked(lock); //assert_spin_locked(lock);
lock->lock = 0; lock->lock = 0;
} }
...@@ -88,6 +89,11 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw) ...@@ -88,6 +89,11 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
__raw_spin_unlock(&rw->lock); __raw_spin_unlock(&rw->lock);
} }
static inline int __raw_write_can_lock(raw_rwlock_t *rw)
{
return (atomic_read(&rw->counter) == RW_LOCK_BIAS);
}
static inline int __raw_read_trylock(raw_rwlock_t *lock) static inline int __raw_read_trylock(raw_rwlock_t *lock)
{ {
atomic_t *count = (atomic_t*)lock; atomic_t *count = (atomic_t*)lock;
......
...@@ -9,7 +9,9 @@ typedef struct { ...@@ -9,7 +9,9 @@ typedef struct {
volatile unsigned long lock; volatile unsigned long lock;
} raw_spinlock_t; } raw_spinlock_t;
#define __SPIN_LOCK_UNLOCKED { 0 } #define __RAW_SPIN_LOCK_UNLOCKED { 1 }
#include <asm/atomic.h>
typedef struct { typedef struct {
raw_spinlock_t lock; raw_spinlock_t lock;
......
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