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 */

arch/arc/include/asm/entry.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <asm/processor.h> /* For VMALLOC_START */
1414
#include <asm/mmu.h>
1515

16-
#ifdef __ASSEMBLY__
16+
#ifdef __ASSEMBLER__
1717

1818
#ifdef CONFIG_ISA_ARCOMPACT
1919
#include <asm/entry-compact.h> /* ISA specific bits */
@@ -146,7 +146,7 @@
146146

147147
#endif /* CONFIG_ARC_CURR_IN_REG */
148148

149-
#else /* !__ASSEMBLY__ */
149+
#else /* !__ASSEMBLER__ */
150150

151151
extern void do_signal(struct pt_regs *);
152152
extern void do_notify_resume(struct pt_regs *);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
#define ISA_INIT_STATUS_BITS (STATUS_IE_MASK | __AD_ENB | \
5151
(ARCV2_IRQ_DEF_PRIO << 1))
5252

53-
#ifndef __ASSEMBLY__
53+
#ifndef __ASSEMBLER__
5454

5555
/*
5656
* Save IRQ state and disable IRQs
@@ -170,6 +170,6 @@ static inline void arc_softirq_clear(int irq)
170170
seti
171171
.endm
172172

173-
#endif /* __ASSEMBLY__ */
173+
#endif /* __ASSEMBLER__ */
174174

175175
#endif

arch/arc/include/asm/irqflags-compact.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
#define ISA_INIT_STATUS_BITS STATUS_IE_MASK
4242

43-
#ifndef __ASSEMBLY__
43+
#ifndef __ASSEMBLER__
4444

4545
/******************************************************************
4646
* IRQ Control Macros
@@ -196,6 +196,6 @@ static inline int arch_irqs_disabled(void)
196196
flag \scratch
197197
.endm
198198

199-
#endif /* __ASSEMBLY__ */
199+
#endif /* __ASSEMBLER__ */
200200

201201
#endif

arch/arc/include/asm/jump_label.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#ifndef _ASM_ARC_JUMP_LABEL_H
33
#define _ASM_ARC_JUMP_LABEL_H
44

5-
#ifndef __ASSEMBLY__
5+
#ifndef __ASSEMBLER__
66

77
#include <linux/stringify.h>
88
#include <linux/types.h>
@@ -68,5 +68,5 @@ struct jump_entry {
6868
jump_label_t key;
6969
};
7070

71-
#endif /* __ASSEMBLY__ */
71+
#endif /* __ASSEMBLER__ */
7272
#endif

arch/arc/include/asm/linkage.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#define __ALIGN .align 4
1313
#define __ALIGN_STR __stringify(__ALIGN)
1414

15-
#ifdef __ASSEMBLY__
15+
#ifdef __ASSEMBLER__
1616

1717
.macro ST2 e, o, off
1818
#ifdef CONFIG_ARC_HAS_LL64
@@ -61,7 +61,7 @@
6161
CFI_ENDPROC ASM_NL \
6262
.size name, .-name
6363

64-
#else /* !__ASSEMBLY__ */
64+
#else /* !__ASSEMBLER__ */
6565

6666
#ifdef CONFIG_ARC_HAS_ICCM
6767
#define __arcfp_code __section(".text.arcfp")
@@ -75,6 +75,6 @@
7575
#define __arcfp_data __section(".data")
7676
#endif
7777

78-
#endif /* __ASSEMBLY__ */
78+
#endif /* __ASSEMBLER__ */
7979

8080
#endif

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969

7070
#define PTE_BITS_NON_RWX_IN_PD1 (PAGE_MASK_PHYS | _PAGE_CACHEABLE)
7171

72-
#ifndef __ASSEMBLY__
72+
#ifndef __ASSEMBLER__
7373

7474
struct mm_struct;
7575
extern int pae40_exist_but_not_enab(void);
@@ -100,6 +100,6 @@ static inline void mmu_setup_pgd(struct mm_struct *mm, void *pgd)
100100
sr \reg, [ARC_REG_PID]
101101
.endm
102102

103-
#endif /* !__ASSEMBLY__ */
103+
#endif /* !__ASSEMBLER__ */
104104

105105
#endif

arch/arc/include/asm/mmu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#ifndef _ASM_ARC_MMU_H
77
#define _ASM_ARC_MMU_H
88

9-
#ifndef __ASSEMBLY__
9+
#ifndef __ASSEMBLER__
1010

1111
#include <linux/threads.h> /* NR_CPUS */
1212

arch/arc/include/asm/page.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#endif /* CONFIG_ARC_HAS_PAE40 */
2121

22-
#ifndef __ASSEMBLY__
22+
#ifndef __ASSEMBLER__
2323

2424
#define clear_page(paddr) memset((paddr), 0, PAGE_SIZE)
2525
#define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
@@ -136,6 +136,6 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
136136
#include <asm-generic/memory_model.h> /* page_to_pfn, pfn_to_page */
137137
#include <asm-generic/getorder.h>
138138

139-
#endif /* !__ASSEMBLY__ */
139+
#endif /* !__ASSEMBLER__ */
140140

141141
#endif

arch/arc/include/asm/pgtable-bits-arcv2.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
* This is to enable COW mechanism
7676
*/
7777
/* xwr */
78-
#ifndef __ASSEMBLY__
78+
#ifndef __ASSEMBLER__
7979

8080
#define pte_write(pte) (pte_val(pte) & _PAGE_WRITE)
8181
#define pte_dirty(pte) (pte_val(pte) & _PAGE_DIRTY)
@@ -142,6 +142,6 @@ PTE_BIT_FUNC(swp_clear_exclusive, &= ~(_PAGE_SWP_EXCLUSIVE));
142142
#include <asm/hugepage.h>
143143
#endif
144144

145-
#endif /* __ASSEMBLY__ */
145+
#endif /* __ASSEMBLER__ */
146146

147147
#endif

arch/arc/include/asm/pgtable-levels.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585

8686
#define PTRS_PER_PTE BIT(PMD_SHIFT - PAGE_SHIFT)
8787

88-
#ifndef __ASSEMBLY__
88+
#ifndef __ASSEMBLER__
8989

9090
#if CONFIG_PGTABLE_LEVELS > 3
9191
#include <asm-generic/pgtable-nop4d.h>
@@ -181,6 +181,6 @@
181181
#define pmd_leaf(x) (pmd_val(x) & _PAGE_HW_SZ)
182182
#endif
183183

184-
#endif /* !__ASSEMBLY__ */
184+
#endif /* !__ASSEMBLER__ */
185185

186186
#endif

arch/arc/include/asm/pgtable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020
#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
2121

22-
#ifndef __ASSEMBLY__
22+
#ifndef __ASSEMBLER__
2323

2424
extern char empty_zero_page[PAGE_SIZE];
2525
#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
@@ -29,6 +29,6 @@ extern pgd_t swapper_pg_dir[] __aligned(PAGE_SIZE);
2929
/* to cope with aliasing VIPT cache */
3030
#define HAVE_ARCH_UNMAPPED_AREA
3131

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

3434
#endif

arch/arc/include/asm/processor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#ifndef __ASM_ARC_PROCESSOR_H
1212
#define __ASM_ARC_PROCESSOR_H
1313

14-
#ifndef __ASSEMBLY__
14+
#ifndef __ASSEMBLER__
1515

1616
#include <asm/ptrace.h>
1717
#include <asm/dsp.h>
@@ -66,7 +66,7 @@ extern void start_thread(struct pt_regs * regs, unsigned long pc,
6666

6767
extern unsigned int __get_wchan(struct task_struct *p);
6868

69-
#endif /* !__ASSEMBLY__ */
69+
#endif /* !__ASSEMBLER__ */
7070

7171
/*
7272
* Default System Memory Map on ARC

arch/arc/include/asm/ptrace.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <uapi/asm/ptrace.h>
1111
#include <linux/compiler.h>
1212

13-
#ifndef __ASSEMBLY__
13+
#ifndef __ASSEMBLER__
1414

1515
typedef union {
1616
struct {
@@ -172,6 +172,6 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
172172
extern int syscall_trace_enter(struct pt_regs *);
173173
extern void syscall_trace_exit(struct pt_regs *);
174174

175-
#endif /* !__ASSEMBLY__ */
175+
#endif /* !__ASSEMBLER__ */
176176

177177
#endif /* __ASM_PTRACE_H */

0 commit comments

Comments
 (0)