Skip to content

Commit ec22120

Browse files
committed
Disintegrate asm/system.h for Alpha
Disintegrate asm/system.h for Alpha. Signed-off-by: David Howells <dhowells@redhat.com> cc: linux-alpha@vger.kernel.org
1 parent f05e798 commit ec22120

65 files changed

Lines changed: 388 additions & 402 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/alpha/boot/bootp.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <generated/utsrelease.h>
1414
#include <linux/mm.h>
1515

16-
#include <asm/system.h>
1716
#include <asm/console.h>
1817
#include <asm/hwrpb.h>
1918
#include <asm/pgtable.h>

‎arch/alpha/boot/bootpz.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <generated/utsrelease.h>
1616
#include <linux/mm.h>
1717

18-
#include <asm/system.h>
1918
#include <asm/console.h>
2019
#include <asm/hwrpb.h>
2120
#include <asm/pgtable.h>

‎arch/alpha/boot/head.S‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* initial bootloader stuff..
55
*/
66

7-
#include <asm/system.h>
87

98
.set noreorder
109
.globl __start

‎arch/alpha/boot/main.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <generated/utsrelease.h>
1212
#include <linux/mm.h>
1313

14-
#include <asm/system.h>
1514
#include <asm/console.h>
1615
#include <asm/hwrpb.h>
1716
#include <asm/pgtable.h>

‎arch/alpha/include/asm/atomic.h‎

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#include <linux/types.h>
55
#include <asm/barrier.h>
6-
#include <asm/system.h>
76

87
/*
98
* Atomic operations that C can't guarantee us. Useful for
@@ -169,6 +168,73 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
169168
return result;
170169
}
171170

171+
/*
172+
* Atomic exchange routines.
173+
*/
174+
175+
#define __ASM__MB
176+
#define ____xchg(type, args...) __xchg ## type ## _local(args)
177+
#define ____cmpxchg(type, args...) __cmpxchg ## type ## _local(args)
178+
#include <asm/xchg.h>
179+
180+
#define xchg_local(ptr,x) \
181+
({ \
182+
__typeof__(*(ptr)) _x_ = (x); \
183+
(__typeof__(*(ptr))) __xchg_local((ptr), (unsigned long)_x_, \
184+
sizeof(*(ptr))); \
185+
})
186+
187+
#define cmpxchg_local(ptr, o, n) \
188+
({ \
189+
__typeof__(*(ptr)) _o_ = (o); \
190+
__typeof__(*(ptr)) _n_ = (n); \
191+
(__typeof__(*(ptr))) __cmpxchg_local((ptr), (unsigned long)_o_, \
192+
(unsigned long)_n_, \
193+
sizeof(*(ptr))); \
194+
})
195+
196+
#define cmpxchg64_local(ptr, o, n) \
197+
({ \
198+
BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
199+
cmpxchg_local((ptr), (o), (n)); \
200+
})
201+
202+
#ifdef CONFIG_SMP
203+
#undef __ASM__MB
204+
#define __ASM__MB "\tmb\n"
205+
#endif
206+
#undef ____xchg
207+
#undef ____cmpxchg
208+
#define ____xchg(type, args...) __xchg ##type(args)
209+
#define ____cmpxchg(type, args...) __cmpxchg ##type(args)
210+
#include <asm/xchg.h>
211+
212+
#define xchg(ptr,x) \
213+
({ \
214+
__typeof__(*(ptr)) _x_ = (x); \
215+
(__typeof__(*(ptr))) __xchg((ptr), (unsigned long)_x_, \
216+
sizeof(*(ptr))); \
217+
})
218+
219+
#define cmpxchg(ptr, o, n) \
220+
({ \
221+
__typeof__(*(ptr)) _o_ = (o); \
222+
__typeof__(*(ptr)) _n_ = (n); \
223+
(__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \
224+
(unsigned long)_n_, sizeof(*(ptr)));\
225+
})
226+
227+
#define cmpxchg64(ptr, o, n) \
228+
({ \
229+
BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
230+
cmpxchg((ptr), (o), (n)); \
231+
})
232+
233+
#undef __ASM__MB
234+
#undef ____cmpxchg
235+
236+
#define __HAVE_ARCH_CMPXCHG 1
237+
172238
#define atomic64_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new))
173239
#define atomic64_xchg(v, new) (xchg(&((v)->counter), new))
174240

‎arch/alpha/include/asm/auxvec.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@
2121
#define AT_L2_CACHESHAPE 36
2222
#define AT_L3_CACHESHAPE 37
2323

24+
#define AT_VECTOR_SIZE_ARCH 4 /* entries in ARCH_DLINFO */
25+
2426
#endif /* __ASM_ALPHA_AUXVEC_H */

‎arch/alpha/include/asm/core_lca.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#ifndef __ALPHA_LCA__H__
22
#define __ALPHA_LCA__H__
33

4-
#include <asm/system.h>
54
#include <asm/compiler.h>
5+
#include <asm/mce.h>
66

77
/*
88
* Low Cost Alpha (LCA) definitions (these apply to 21066 and 21068,

‎arch/alpha/include/asm/core_mcpcia.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#include <linux/types.h>
99
#include <asm/compiler.h>
10+
#include <asm/mce.h>
1011

1112
/*
1213
* MCPCIA is the internal name for a core logic chipset which provides

‎arch/alpha/include/asm/core_t2.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <linux/types.h>
88
#include <linux/spinlock.h>
99
#include <asm/compiler.h>
10-
#include <asm/system.h>
1110

1211
/*
1312
* T2 is the internal name for the core logic chipset which provides

‎arch/alpha/include/asm/elf.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define __ASM_ALPHA_ELF_H
33

44
#include <asm/auxvec.h>
5+
#include <asm/special_insns.h>
56

67
/* Special values for the st_other field in the symbol table. */
78

0 commit comments

Comments
 (0)