Skip to content

Commit 3d85339

Browse files
committed
Merge tag 'arc-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Pull ARC fixes from Vineet Gupta: - arch_atomic64_cmpxchg relaxed variant [Jason] - use of inbuilt swap in stack unwinder [Yu-Chun Lin] - use of __ASSEMBLER__ in kernel headers [Thomas Huth] * tag 'arc-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: Replace __ASSEMBLY__ with __ASSEMBLER__ in the non-uapi headers ARC: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers ARC: unwind: Use built-in sort swap to reduce code size and improve performance ARC: atomics: Implement arch_atomic64_cmpxchg using _relaxed
2 parents 2c4a1f3 + 179e949 commit 3d85339

27 files changed

+53
-67
lines changed

arch/arc/include/asm/arcregs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
#define ARC_AUX_AGU_MOD2 0x5E2
145145
#define ARC_AUX_AGU_MOD3 0x5E3
146146

147-
#ifndef __ASSEMBLY__
147+
#ifndef __ASSEMBLER__
148148

149149
#include <soc/arc/arc_aux.h>
150150

arch/arc/include/asm/atomic.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#ifndef _ASM_ARC_ATOMIC_H
77
#define _ASM_ARC_ATOMIC_H
88

9-
#ifndef __ASSEMBLY__
9+
#ifndef __ASSEMBLER__
1010

1111
#include <linux/types.h>
1212
#include <linux/compiler.h>
@@ -31,6 +31,6 @@
3131
#include <asm/atomic64-arcv2.h>
3232
#endif
3333

34-
#endif /* !__ASSEMBLY__ */
34+
#endif /* !__ASSEMBLER__ */
3535

3636
#endif

arch/arc/include/asm/atomic64-arcv2.h

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,9 @@ ATOMIC64_OPS(xor, xor, xor)
137137
#undef ATOMIC64_OP_RETURN
138138
#undef ATOMIC64_OP
139139

140-
static inline s64
141-
arch_atomic64_cmpxchg(atomic64_t *ptr, s64 expected, s64 new)
140+
static inline u64 __arch_cmpxchg64_relaxed(volatile void *ptr, u64 old, u64 new)
142141
{
143-
s64 prev;
144-
145-
smp_mb();
142+
u64 prev;
146143

147144
__asm__ __volatile__(
148145
"1: llockd %0, [%1] \n"
@@ -152,14 +149,12 @@ arch_atomic64_cmpxchg(atomic64_t *ptr, s64 expected, s64 new)
152149
" bnz 1b \n"
153150
"2: \n"
154151
: "=&r"(prev)
155-
: "r"(ptr), "ir"(expected), "r"(new)
156-
: "cc"); /* memory clobber comes from smp_mb() */
157-
158-
smp_mb();
152+
: "r"(ptr), "ir"(old), "r"(new)
153+
: "memory", "cc");
159154

160155
return prev;
161156
}
162-
#define arch_atomic64_cmpxchg arch_atomic64_cmpxchg
157+
#define arch_cmpxchg64_relaxed __arch_cmpxchg64_relaxed
163158

164159
static inline s64 arch_atomic64_xchg(atomic64_t *ptr, s64 new)
165160
{

arch/arc/include/asm/bitops.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#error only <linux/bitops.h> can be included directly
1111
#endif
1212

13-
#ifndef __ASSEMBLY__
13+
#ifndef __ASSEMBLER__
1414

1515
#include <linux/types.h>
1616
#include <linux/compiler.h>
@@ -192,6 +192,6 @@ static inline __attribute__ ((const)) unsigned long __ffs(unsigned long x)
192192
#include <asm-generic/bitops/le.h>
193193
#include <asm-generic/bitops/ext2-atomic-setbit.h>
194194

195-
#endif /* !__ASSEMBLY__ */
195+
#endif /* !__ASSEMBLER__ */
196196

197197
#endif

arch/arc/include/asm/bug.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#ifndef _ASM_ARC_BUG_H
77
#define _ASM_ARC_BUG_H
88

9-
#ifndef __ASSEMBLY__
9+
#ifndef __ASSEMBLER__
1010

1111
#include <asm/ptrace.h>
1212

@@ -29,6 +29,6 @@ void die(const char *str, struct pt_regs *regs, unsigned long address);
2929

3030
#include <asm-generic/bug.h>
3131

32-
#endif /* !__ASSEMBLY__ */
32+
#endif /* !__ASSEMBLER__ */
3333

3434
#endif

arch/arc/include/asm/cache.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
#define ARC_UNCACHED_ADDR_SPACE 0xc0000000
2525

26-
#ifndef __ASSEMBLY__
26+
#ifndef __ASSEMBLER__
2727

2828
#include <linux/build_bug.h>
2929

@@ -65,7 +65,7 @@
6565
extern int ioc_enable;
6666
extern unsigned long perip_base, perip_end;
6767

68-
#endif /* !__ASSEMBLY__ */
68+
#endif /* !__ASSEMBLER__ */
6969

7070
/* Instruction cache related Auxiliary registers */
7171
#define ARC_REG_IC_BCR 0x77 /* Build Config reg */

arch/arc/include/asm/current.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef _ASM_ARC_CURRENT_H
1010
#define _ASM_ARC_CURRENT_H
1111

12-
#ifndef __ASSEMBLY__
12+
#ifndef __ASSEMBLER__
1313

1414
#ifdef CONFIG_ARC_CURR_IN_REG
1515

@@ -20,6 +20,6 @@ register struct task_struct *curr_arc asm("gp");
2020
#include <asm-generic/current.h>
2121
#endif /* ! CONFIG_ARC_CURR_IN_REG */
2222

23-
#endif /* ! __ASSEMBLY__ */
23+
#endif /* ! __ASSEMBLER__ */
2424

2525
#endif /* _ASM_ARC_CURRENT_H */

arch/arc/include/asm/dsp-impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#define DSP_CTRL_DISABLED_ALL 0
1313

14-
#ifdef __ASSEMBLY__
14+
#ifdef __ASSEMBLER__
1515

1616
/* clobbers r5 register */
1717
.macro DSP_EARLY_INIT

arch/arc/include/asm/dsp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#ifndef __ASM_ARC_DSP_H
88
#define __ASM_ARC_DSP_H
99

10-
#ifndef __ASSEMBLY__
10+
#ifndef __ASSEMBLER__
1111

1212
/*
1313
* DSP-related saved registers - need to be saved only when you are
@@ -24,6 +24,6 @@ struct dsp_callee_regs {
2424
#endif
2525
};
2626

27-
#endif /* !__ASSEMBLY__ */
27+
#endif /* !__ASSEMBLER__ */
2828

2929
#endif /* __ASM_ARC_DSP_H */

arch/arc/include/asm/dwarf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#ifndef _ASM_ARC_DWARF_H
77
#define _ASM_ARC_DWARF_H
88

9-
#ifdef __ASSEMBLY__
9+
#ifdef __ASSEMBLER__
1010

1111
#ifdef ARC_DW2_UNWIND_AS_CFI
1212

@@ -38,6 +38,6 @@
3838

3939
#endif /* !ARC_DW2_UNWIND_AS_CFI */
4040

41-
#endif /* __ASSEMBLY__ */
41+
#endif /* __ASSEMBLER__ */
4242

4343
#endif /* _ASM_ARC_DWARF_H */

0 commit comments

Comments
 (0)