Skip to content

Commit b3154a6

Browse files
committed
Merge tag 'sh-for-v6.16-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux
Pull sh updates from John Paul Adrian Glaubitz: - replace the __ASSEMBLY__ with __ASSEMBLER__ macro in all headers since the latter is now defined automatically by both GCC and Clang when compiling assembly code (Thomas Huth) - set the default SPI mode for the ecovec24 board which became necessary after a new mode member as added to the sh_msiof_spi_info struct in cf9e478 ("spi: sh-msiof: Add slave mode support") (Geert Uytterhoeven) - remove unused variables in the kprobes code in kprobe_exceptions_notify() (Mike Rapoport) * tag 'sh-for-v6.16-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux: sh: kprobes: Remove unused variables in kprobe_exceptions_notify() sh: ecovec24: Make SPI mode explicit sh: Replace __ASSEMBLY__ with __ASSEMBLER__ in all headers
2 parents b719158 + 8a36826 commit b3154a6

File tree

19 files changed

+47
-50
lines changed

19 files changed

+47
-50
lines changed

arch/sh/boards/mach-ecovec24/setup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,7 @@ static struct spi_board_info spi_bus[] = {
825825
/* MSIOF0 */
826826
static struct sh_msiof_spi_info msiof0_data = {
827827
.num_chipselect = 1,
828+
.mode = MSIOF_SPI_HOST,
828829
};
829830

830831
static struct resource msiof0_resources[] = {

arch/sh/include/asm/cache.h

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

2323
#define __read_mostly __section(".data..read_mostly")
2424

25-
#ifndef __ASSEMBLY__
25+
#ifndef __ASSEMBLER__
2626
struct cache_info {
2727
unsigned int ways; /* Number of cache ways */
2828
unsigned int sets; /* Number of cache sets */
@@ -48,5 +48,5 @@ struct cache_info {
4848

4949
unsigned long flags;
5050
};
51-
#endif /* __ASSEMBLY__ */
51+
#endif /* __ASSEMBLER__ */
5252
#endif /* __ASM_SH_CACHE_H */

arch/sh/include/asm/dwarf.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
*/
190190
#define DWARF_ARCH_RA_REG 17
191191

192-
#ifndef __ASSEMBLY__
192+
#ifndef __ASSEMBLER__
193193

194194
#include <linux/compiler.h>
195195
#include <linux/bug.h>
@@ -379,7 +379,7 @@ extern int module_dwarf_finalize(const Elf_Ehdr *, const Elf_Shdr *,
379379
struct module *);
380380
extern void module_dwarf_cleanup(struct module *);
381381

382-
#endif /* !__ASSEMBLY__ */
382+
#endif /* !__ASSEMBLER__ */
383383

384384
#define CFI_STARTPROC .cfi_startproc
385385
#define CFI_ENDPROC .cfi_endproc
@@ -402,7 +402,7 @@ extern void module_dwarf_cleanup(struct module *);
402402
#define CFI_REL_OFFSET CFI_IGNORE
403403
#define CFI_UNDEFINED CFI_IGNORE
404404

405-
#ifndef __ASSEMBLY__
405+
#ifndef __ASSEMBLER__
406406
static inline void dwarf_unwinder_init(void)
407407
{
408408
}

arch/sh/include/asm/fpu.h

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

5-
#ifndef __ASSEMBLY__
5+
#ifndef __ASSEMBLER__
66

77
#include <asm/ptrace.h>
88

@@ -67,6 +67,6 @@ static inline void clear_fpu(struct task_struct *tsk, struct pt_regs *regs)
6767
void float_raise(unsigned int flags);
6868
int float_rounding_mode(void);
6969

70-
#endif /* __ASSEMBLY__ */
70+
#endif /* __ASSEMBLER__ */
7171

7272
#endif /* __ASM_SH_FPU_H */

arch/sh/include/asm/ftrace.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
88
#define FTRACE_SYSCALL_MAX NR_syscalls
99

10-
#ifndef __ASSEMBLY__
10+
#ifndef __ASSEMBLER__
1111
extern void mcount(void);
1212

1313
#define MCOUNT_ADDR ((unsigned long)(mcount))
@@ -35,10 +35,10 @@ static inline unsigned long ftrace_call_adjust(unsigned long addr)
3535

3636
void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr);
3737

38-
#endif /* __ASSEMBLY__ */
38+
#endif /* __ASSEMBLER__ */
3939
#endif /* CONFIG_FUNCTION_TRACER */
4040

41-
#ifndef __ASSEMBLY__
41+
#ifndef __ASSEMBLER__
4242

4343
/* arch/sh/kernel/return_address.c */
4444
extern void *return_address(unsigned int);
@@ -53,6 +53,6 @@ static inline void arch_ftrace_nmi_enter(void) { }
5353
static inline void arch_ftrace_nmi_exit(void) { }
5454
#endif
5555

56-
#endif /* __ASSEMBLY__ */
56+
#endif /* __ASSEMBLER__ */
5757

5858
#endif /* __ASM_SH_FTRACE_H */

arch/sh/include/asm/mmu.h

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

3434
#define PMB_NO_ENTRY (-1)
3535

36-
#ifndef __ASSEMBLY__
36+
#ifndef __ASSEMBLER__
3737
#include <linux/errno.h>
3838
#include <linux/threads.h>
3939
#include <asm/page.h>
@@ -102,6 +102,6 @@ pmb_remap(phys_addr_t phys, unsigned long size, pgprot_t prot)
102102
return pmb_remap_caller(phys, size, prot, __builtin_return_address(0));
103103
}
104104

105-
#endif /* __ASSEMBLY__ */
105+
#endif /* __ASSEMBLER__ */
106106

107107
#endif /* __MMU_H */

arch/sh/include/asm/page.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT-PAGE_SHIFT)
3131
#endif
3232

33-
#ifndef __ASSEMBLY__
33+
#ifndef __ASSEMBLER__
3434
#include <asm/uncached.h>
3535

3636
extern unsigned long shm_align_mask;
@@ -85,7 +85,7 @@ typedef struct page *pgtable_t;
8585

8686
#define pte_pgprot(x) __pgprot(pte_val(x) & PTE_FLAGS_MASK)
8787

88-
#endif /* !__ASSEMBLY__ */
88+
#endif /* !__ASSEMBLER__ */
8989

9090
/*
9191
* __MEMORY_START and SIZE are the physical addresses and size of RAM.
@@ -126,10 +126,10 @@ typedef struct page *pgtable_t;
126126
#define ___va(x) ((x)+PAGE_OFFSET)
127127
#endif
128128

129-
#ifndef __ASSEMBLY__
129+
#ifndef __ASSEMBLER__
130130
#define __pa(x) ___pa((unsigned long)x)
131131
#define __va(x) (void *)___va((unsigned long)x)
132-
#endif /* !__ASSEMBLY__ */
132+
#endif /* !__ASSEMBLER__ */
133133

134134
#ifdef CONFIG_UNCACHED_MAPPING
135135
#if defined(CONFIG_29BIT)

arch/sh/include/asm/pgtable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <asm/page.h>
1818
#include <asm/mmu.h>
1919

20-
#ifndef __ASSEMBLY__
20+
#ifndef __ASSEMBLER__
2121
#include <asm/addrspace.h>
2222
#include <asm/fixmap.h>
2323

@@ -28,7 +28,7 @@
2828
extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
2929
#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
3030

31-
#endif /* !__ASSEMBLY__ */
31+
#endif /* !__ASSEMBLER__ */
3232

3333
/*
3434
* Effective and physical address definitions, to aid with sign

arch/sh/include/asm/pgtable_32.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static inline unsigned long copy_ptea_attributes(unsigned long x)
170170
(PTE_MASK | _PAGE_ACCESSED | _PAGE_CACHABLE | \
171171
_PAGE_DIRTY | _PAGE_SPECIAL)
172172

173-
#ifndef __ASSEMBLY__
173+
#ifndef __ASSEMBLER__
174174

175175
#if defined(CONFIG_X2TLB) /* SH-X2 TLB */
176176
#define PAGE_NONE __pgprot(_PAGE_PROTNONE | _PAGE_CACHABLE | \
@@ -287,9 +287,9 @@ static inline unsigned long copy_ptea_attributes(unsigned long x)
287287
__pgprot(0)
288288
#endif
289289

290-
#endif /* __ASSEMBLY__ */
290+
#endif /* __ASSEMBLER__ */
291291

292-
#ifndef __ASSEMBLY__
292+
#ifndef __ASSEMBLER__
293293

294294
/*
295295
* Certain architectures need to do special things when PTEs
@@ -478,5 +478,5 @@ static inline int pte_swp_exclusive(pte_t pte)
478478
PTE_BIT_FUNC(low, swp_mkexclusive, |= _PAGE_SWP_EXCLUSIVE);
479479
PTE_BIT_FUNC(low, swp_clear_exclusive, &= ~_PAGE_SWP_EXCLUSIVE);
480480

481-
#endif /* __ASSEMBLY__ */
481+
#endif /* __ASSEMBLER__ */
482482
#endif /* __ASM_SH_PGTABLE_32_H */

arch/sh/include/asm/processor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <asm/cpu-features.h>
66
#include <asm/cache.h>
77

8-
#ifndef __ASSEMBLY__
8+
#ifndef __ASSEMBLER__
99
/*
1010
* CPU type and hardware bug flags. Kept separately for each CPU.
1111
*
@@ -168,7 +168,7 @@ extern unsigned int instruction_size(unsigned int insn);
168168

169169
void select_idle_routine(void);
170170

171-
#endif /* __ASSEMBLY__ */
171+
#endif /* __ASSEMBLER__ */
172172

173173
#include <asm/processor_32.h>
174174

arch/sh/include/asm/smc37c93x.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
#define UART_DLL 0x0 /* Divisor Latch (LS) */
6868
#define UART_DLM 0x2 /* Divisor Latch (MS) */
6969

70-
#ifndef __ASSEMBLY__
70+
#ifndef __ASSEMBLER__
7171
typedef struct uart_reg {
7272
volatile __u16 rbr;
7373
volatile __u16 ier;
@@ -78,7 +78,7 @@ typedef struct uart_reg {
7878
volatile __u16 msr;
7979
volatile __u16 scr;
8080
} uart_reg;
81-
#endif /* ! __ASSEMBLY__ */
81+
#endif /* ! __ASSEMBLER__ */
8282

8383
/* Alias for Write Only Register */
8484

arch/sh/include/asm/suspend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#ifndef _ASM_SH_SUSPEND_H
33
#define _ASM_SH_SUSPEND_H
44

5-
#ifndef __ASSEMBLY__
5+
#ifndef __ASSEMBLER__
66
#include <linux/notifier.h>
77

88
#include <asm/ptrace.h>

arch/sh/include/asm/thread_info.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#define FAULT_CODE_PROT (1 << 3) /* protection fault */
2222
#define FAULT_CODE_USER (1 << 4) /* user-mode access */
2323

24-
#ifndef __ASSEMBLY__
24+
#ifndef __ASSEMBLER__
2525
#include <asm/processor.h>
2626

2727
struct thread_info {
@@ -49,7 +49,7 @@ struct thread_info {
4949
/*
5050
* macros/functions for gaining access to the thread information structure
5151
*/
52-
#ifndef __ASSEMBLY__
52+
#ifndef __ASSEMBLER__
5353
#define INIT_THREAD_INFO(tsk) \
5454
{ \
5555
.task = &tsk, \
@@ -86,7 +86,7 @@ static inline struct thread_info *current_thread_info(void)
8686

8787
extern void init_thread_xstate(void);
8888

89-
#endif /* __ASSEMBLY__ */
89+
#endif /* __ASSEMBLER__ */
9090

9191
/*
9292
* Thread information flags
@@ -144,7 +144,7 @@ extern void init_thread_xstate(void);
144144
*/
145145
#define TS_USEDFPU 0x0002 /* FPU used by this task this quantum */
146146

147-
#ifndef __ASSEMBLY__
147+
#ifndef __ASSEMBLER__
148148

149149
#define TI_FLAG_FAULT_CODE_SHIFT 24
150150

@@ -164,5 +164,5 @@ static inline unsigned int get_thread_fault_code(void)
164164
return ti->flags >> TI_FLAG_FAULT_CODE_SHIFT;
165165
}
166166

167-
#endif /* !__ASSEMBLY__ */
167+
#endif /* !__ASSEMBLER__ */
168168
#endif /* __ASM_SH_THREAD_INFO_H */

arch/sh/include/asm/tlb.h

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

5-
#ifndef __ASSEMBLY__
5+
#ifndef __ASSEMBLER__
66
#include <linux/pagemap.h>
77
#include <asm-generic/tlb.h>
88

@@ -29,5 +29,5 @@ asmlinkage int handle_tlbmiss(struct pt_regs *regs, unsigned long error_code,
2929
unsigned long address);
3030

3131
#endif /* CONFIG_MMU */
32-
#endif /* __ASSEMBLY__ */
32+
#endif /* __ASSEMBLER__ */
3333
#endif /* __ASM_SH_TLB_H */

arch/sh/include/asm/types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
/*
88
* These aren't exported outside the kernel to avoid name space clashes
99
*/
10-
#ifndef __ASSEMBLY__
10+
#ifndef __ASSEMBLER__
1111

1212
typedef u16 insn_size_t;
1313
typedef u32 reg_size_t;
1414

15-
#endif /* __ASSEMBLY__ */
15+
#endif /* __ASSEMBLER__ */
1616
#endif /* __ASM_SH_TYPES_H */
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2-
#ifdef __ASSEMBLY__
2+
#ifdef __ASSEMBLER__
33

44
/* do nothing here by default */
55

6-
#else /* __ASSEMBLY__ */
6+
#else /* __ASSEMBLER__ */
77

88
static inline void mmcif_update_progress(int nr)
99
{
1010
}
1111

12-
#endif /* __ASSEMBLY__ */
12+
#endif /* __ASSEMBLER__ */

arch/sh/include/mach-ecovec24/mach/romimage.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2-
#ifdef __ASSEMBLY__
2+
#ifdef __ASSEMBLER__
33

44
/* EcoVec board specific boot code:
55
* converts the "partner-jet-script.txt" script into assembly
@@ -22,7 +22,7 @@
2222
1 : .long 0xa8000000
2323
2 :
2424

25-
#else /* __ASSEMBLY__ */
25+
#else /* __ASSEMBLER__ */
2626

2727
/* Ecovec board specific information:
2828
*
@@ -45,4 +45,4 @@ static inline void mmcif_update_progress(int nr)
4545
__raw_writeb(1 << (nr - 1), PGDR);
4646
}
4747

48-
#endif /* __ASSEMBLY__ */
48+
#endif /* __ASSEMBLER__ */

arch/sh/include/mach-kfr2r09/mach/romimage.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2-
#ifdef __ASSEMBLY__
2+
#ifdef __ASSEMBLER__
33

44
/* kfr2r09 board specific boot code:
55
* converts the "partner-jet-script.txt" script into assembly
@@ -22,10 +22,10 @@
2222
1: .long 0xa8000000
2323
2:
2424

25-
#else /* __ASSEMBLY__ */
25+
#else /* __ASSEMBLER__ */
2626

2727
static inline void mmcif_update_progress(int nr)
2828
{
2929
}
3030

31-
#endif /* __ASSEMBLY__ */
31+
#endif /* __ASSEMBLER__ */

arch/sh/kernel/kprobes.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,13 +404,10 @@ int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr)
404404
int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
405405
unsigned long val, void *data)
406406
{
407-
struct kprobe *p = NULL;
408407
struct die_args *args = (struct die_args *)data;
409408
int ret = NOTIFY_DONE;
410-
kprobe_opcode_t *addr = NULL;
411409
struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
412410

413-
addr = (kprobe_opcode_t *) (args->regs->pc);
414411
if (val == DIE_TRAP &&
415412
args->trapnr == (BREAKPOINT_INSTRUCTION & 0xff)) {
416413
if (!kprobe_running()) {
@@ -421,7 +418,6 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
421418
ret = NOTIFY_DONE;
422419
}
423420
} else {
424-
p = get_kprobe(addr);
425421
if ((kcb->kprobe_status == KPROBE_HIT_SS) ||
426422
(kcb->kprobe_status == KPROBE_REENTER)) {
427423
if (post_kprobe_handler(args->regs))

0 commit comments

Comments
 (0)