diff options
Diffstat (limited to 'arch/sh/include')
-rw-r--r-- | arch/sh/include/asm/atomic.h | 12 | ||||
-rw-r--r-- | arch/sh/include/asm/delay.h | 27 | ||||
-rw-r--r-- | arch/sh/include/asm/hw_irq.h | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/page.h | 5 | ||||
-rw-r--r-- | arch/sh/include/asm/pci.h | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/ptrace.h | 4 | ||||
-rw-r--r-- | arch/sh/include/asm/smp.h | 2 | ||||
-rw-r--r-- | arch/sh/include/cpu-sh3/cpu/serial.h | 10 | ||||
-rw-r--r-- | arch/sh/include/cpu-sh4a/cpu/serial.h | 7 |
9 files changed, 31 insertions, 40 deletions
diff --git a/arch/sh/include/asm/atomic.h b/arch/sh/include/asm/atomic.h index c7983124d99..63a27dbc952 100644 --- a/arch/sh/include/asm/atomic.h +++ b/arch/sh/include/asm/atomic.h | |||
@@ -30,7 +30,6 @@ | |||
30 | #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) | 30 | #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) |
31 | #define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0) | 31 | #define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0) |
32 | #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) | 32 | #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) |
33 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
34 | 33 | ||
35 | #define atomic_inc(v) atomic_add(1, (v)) | 34 | #define atomic_inc(v) atomic_add(1, (v)) |
36 | #define atomic_dec(v) atomic_sub(1, (v)) | 35 | #define atomic_dec(v) atomic_sub(1, (v)) |
@@ -39,15 +38,15 @@ | |||
39 | #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) | 38 | #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) |
40 | 39 | ||
41 | /** | 40 | /** |
42 | * atomic_add_unless - add unless the number is a given value | 41 | * __atomic_add_unless - add unless the number is a given value |
43 | * @v: pointer of type atomic_t | 42 | * @v: pointer of type atomic_t |
44 | * @a: the amount to add to v... | 43 | * @a: the amount to add to v... |
45 | * @u: ...unless v is equal to u. | 44 | * @u: ...unless v is equal to u. |
46 | * | 45 | * |
47 | * Atomically adds @a to @v, so long as it was not @u. | 46 | * Atomically adds @a to @v, so long as it was not @u. |
48 | * Returns non-zero if @v was not @u, and zero otherwise. | 47 | * Returns the old value of @v. |
49 | */ | 48 | */ |
50 | static inline int atomic_add_unless(atomic_t *v, int a, int u) | 49 | static inline int __atomic_add_unless(atomic_t *v, int a, int u) |
51 | { | 50 | { |
52 | int c, old; | 51 | int c, old; |
53 | c = atomic_read(v); | 52 | c = atomic_read(v); |
@@ -60,7 +59,7 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) | |||
60 | c = old; | 59 | c = old; |
61 | } | 60 | } |
62 | 61 | ||
63 | return c != (u); | 62 | return c; |
64 | } | 63 | } |
65 | 64 | ||
66 | #define smp_mb__before_atomic_dec() smp_mb() | 65 | #define smp_mb__before_atomic_dec() smp_mb() |
@@ -68,7 +67,4 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) | |||
68 | #define smp_mb__before_atomic_inc() smp_mb() | 67 | #define smp_mb__before_atomic_inc() smp_mb() |
69 | #define smp_mb__after_atomic_inc() smp_mb() | 68 | #define smp_mb__after_atomic_inc() smp_mb() |
70 | 69 | ||
71 | #include <asm-generic/atomic-long.h> | ||
72 | #include <asm-generic/atomic64.h> | ||
73 | |||
74 | #endif /* __ASM_SH_ATOMIC_H */ | 70 | #endif /* __ASM_SH_ATOMIC_H */ |
diff --git a/arch/sh/include/asm/delay.h b/arch/sh/include/asm/delay.h index 4b16bf9b56b..9670e127b7b 100644 --- a/arch/sh/include/asm/delay.h +++ b/arch/sh/include/asm/delay.h | |||
@@ -1,26 +1 @@ | |||
1 | #ifndef __ASM_SH_DELAY_H | #include <asm-generic/delay.h> | |
2 | #define __ASM_SH_DELAY_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 1993 Linus Torvalds | ||
6 | * | ||
7 | * Delay routines calling functions in arch/sh/lib/delay.c | ||
8 | */ | ||
9 | |||
10 | extern void __bad_udelay(void); | ||
11 | extern void __bad_ndelay(void); | ||
12 | |||
13 | extern void __udelay(unsigned long usecs); | ||
14 | extern void __ndelay(unsigned long nsecs); | ||
15 | extern void __const_udelay(unsigned long xloops); | ||
16 | extern void __delay(unsigned long loops); | ||
17 | |||
18 | #define udelay(n) (__builtin_constant_p(n) ? \ | ||
19 | ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c6ul)) : \ | ||
20 | __udelay(n)) | ||
21 | |||
22 | #define ndelay(n) (__builtin_constant_p(n) ? \ | ||
23 | ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \ | ||
24 | __ndelay(n)) | ||
25 | |||
26 | #endif /* __ASM_SH_DELAY_H */ | ||
diff --git a/arch/sh/include/asm/hw_irq.h b/arch/sh/include/asm/hw_irq.h index 603cdde813d..693d4418405 100644 --- a/arch/sh/include/asm/hw_irq.h +++ b/arch/sh/include/asm/hw_irq.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/init.h> | 4 | #include <linux/init.h> |
5 | #include <linux/sh_intc.h> | 5 | #include <linux/sh_intc.h> |
6 | #include <asm/atomic.h> | 6 | #include <linux/atomic.h> |
7 | 7 | ||
8 | extern atomic_t irq_err_count; | 8 | extern atomic_t irq_err_count; |
9 | 9 | ||
diff --git a/arch/sh/include/asm/page.h b/arch/sh/include/asm/page.h index 822d6084195..abcc4dcc2d9 100644 --- a/arch/sh/include/asm/page.h +++ b/arch/sh/include/asm/page.h | |||
@@ -141,8 +141,13 @@ typedef struct page *pgtable_t; | |||
141 | #endif /* !__ASSEMBLY__ */ | 141 | #endif /* !__ASSEMBLY__ */ |
142 | 142 | ||
143 | #ifdef CONFIG_UNCACHED_MAPPING | 143 | #ifdef CONFIG_UNCACHED_MAPPING |
144 | #if defined(CONFIG_29BIT) | ||
145 | #define UNCAC_ADDR(addr) P2SEGADDR(addr) | ||
146 | #define CAC_ADDR(addr) P1SEGADDR(addr) | ||
147 | #else | ||
144 | #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + uncached_start) | 148 | #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + uncached_start) |
145 | #define CAC_ADDR(addr) ((addr) - uncached_start + PAGE_OFFSET) | 149 | #define CAC_ADDR(addr) ((addr) - uncached_start + PAGE_OFFSET) |
150 | #endif | ||
146 | #else | 151 | #else |
147 | #define UNCAC_ADDR(addr) ((addr)) | 152 | #define UNCAC_ADDR(addr) ((addr)) |
148 | #define CAC_ADDR(addr) ((addr)) | 153 | #define CAC_ADDR(addr) ((addr)) |
diff --git a/arch/sh/include/asm/pci.h b/arch/sh/include/asm/pci.h index f0efe97f175..cb21e2399dc 100644 --- a/arch/sh/include/asm/pci.h +++ b/arch/sh/include/asm/pci.h | |||
@@ -112,7 +112,7 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
112 | #endif | 112 | #endif |
113 | 113 | ||
114 | /* Board-specific fixup routines. */ | 114 | /* Board-specific fixup routines. */ |
115 | int pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin); | 115 | int pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin); |
116 | 116 | ||
117 | extern void pcibios_resource_to_bus(struct pci_dev *dev, | 117 | extern void pcibios_resource_to_bus(struct pci_dev *dev, |
118 | struct pci_bus_region *region, struct resource *res); | 118 | struct pci_bus_region *region, struct resource *res); |
diff --git a/arch/sh/include/asm/ptrace.h b/arch/sh/include/asm/ptrace.h index 88bd6be168a..2d3679b2447 100644 --- a/arch/sh/include/asm/ptrace.h +++ b/arch/sh/include/asm/ptrace.h | |||
@@ -45,8 +45,6 @@ | |||
45 | #define GET_FP(regs) ((regs)->regs[14]) | 45 | #define GET_FP(regs) ((regs)->regs[14]) |
46 | #define GET_USP(regs) ((regs)->regs[15]) | 46 | #define GET_USP(regs) ((regs)->regs[15]) |
47 | 47 | ||
48 | extern void show_regs(struct pt_regs *); | ||
49 | |||
50 | #define arch_has_single_step() (1) | 48 | #define arch_has_single_step() (1) |
51 | 49 | ||
52 | /* | 50 | /* |
@@ -125,7 +123,7 @@ static inline unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, | |||
125 | struct perf_event; | 123 | struct perf_event; |
126 | struct perf_sample_data; | 124 | struct perf_sample_data; |
127 | 125 | ||
128 | extern void ptrace_triggered(struct perf_event *bp, int nmi, | 126 | extern void ptrace_triggered(struct perf_event *bp, |
129 | struct perf_sample_data *data, struct pt_regs *regs); | 127 | struct perf_sample_data *data, struct pt_regs *regs); |
130 | 128 | ||
131 | #define task_pt_regs(task) \ | 129 | #define task_pt_regs(task) \ |
diff --git a/arch/sh/include/asm/smp.h b/arch/sh/include/asm/smp.h index 9070d943ddd..78b0d0f4b24 100644 --- a/arch/sh/include/asm/smp.h +++ b/arch/sh/include/asm/smp.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #ifdef CONFIG_SMP | 8 | #ifdef CONFIG_SMP |
9 | 9 | ||
10 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
11 | #include <asm/atomic.h> | 11 | #include <linux/atomic.h> |
12 | #include <asm/current.h> | 12 | #include <asm/current.h> |
13 | #include <asm/percpu.h> | 13 | #include <asm/percpu.h> |
14 | 14 | ||
diff --git a/arch/sh/include/cpu-sh3/cpu/serial.h b/arch/sh/include/cpu-sh3/cpu/serial.h new file mode 100644 index 00000000000..7766329bc10 --- /dev/null +++ b/arch/sh/include/cpu-sh3/cpu/serial.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef __CPU_SH3_SERIAL_H | ||
2 | #define __CPU_SH3_SERIAL_H | ||
3 | |||
4 | #include <linux/serial_sci.h> | ||
5 | |||
6 | extern struct plat_sci_port_ops sh770x_sci_port_ops; | ||
7 | extern struct plat_sci_port_ops sh7710_sci_port_ops; | ||
8 | extern struct plat_sci_port_ops sh7720_sci_port_ops; | ||
9 | |||
10 | #endif /* __CPU_SH3_SERIAL_H */ | ||
diff --git a/arch/sh/include/cpu-sh4a/cpu/serial.h b/arch/sh/include/cpu-sh4a/cpu/serial.h new file mode 100644 index 00000000000..ff1bc275d21 --- /dev/null +++ b/arch/sh/include/cpu-sh4a/cpu/serial.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __CPU_SH4A_SERIAL_H | ||
2 | #define __CPU_SH4A_SERIAL_H | ||
3 | |||
4 | /* arch/sh/kernel/cpu/sh4a/serial-sh7722.c */ | ||
5 | extern struct plat_sci_port_ops sh7722_sci_port_ops; | ||
6 | |||
7 | #endif /* __CPU_SH4A_SERIAL_H */ | ||