diff options
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/cpu/sh2a/opcode_helper.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 3 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 1 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7757.c | 3 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7786.c | 14 | ||||
-rw-r--r-- | arch/sh/kernel/dwarf.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/kprobes.c | 6 | ||||
-rw-r--r-- | arch/sh/kernel/return_address.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/smp.c | 6 | ||||
-rw-r--r-- | arch/sh/kernel/syscalls/syscall.tbl | 1 | ||||
-rw-r--r-- | arch/sh/kernel/traps.c | 10 | ||||
-rw-r--r-- | arch/sh/kernel/traps_32.c | 5 | ||||
-rw-r--r-- | arch/sh/kernel/vsyscall/Makefile | 4 |
13 files changed, 28 insertions, 31 deletions
diff --git a/arch/sh/kernel/cpu/sh2a/opcode_helper.c b/arch/sh/kernel/cpu/sh2a/opcode_helper.c index c509081d90..fcf53f5827 100644 --- a/arch/sh/kernel/cpu/sh2a/opcode_helper.c +++ b/arch/sh/kernel/cpu/sh2a/opcode_helper.c @@ -8,6 +8,8 @@ */ #include <linux/kernel.h> +#include <asm/processor.h> + /* * Instructions on SH are generally fixed at 16-bits, however, SH-2A * introduces some 32-bit instructions. Since there are no real diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index 83ae1ad4a8..d64d28c4f0 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c @@ -14,9 +14,12 @@ #include <linux/sh_timer.h> #include <linux/sh_intc.h> #include <linux/io.h> + +#include <asm/cacheflush.h> #include <asm/clock.h> #include <asm/mmzone.h> #include <asm/platform_early.h> + #include <cpu/sh7723.h> /* Serial */ diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c index 0d990ab1ba..ef4b26a4b3 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c @@ -21,6 +21,7 @@ #include <linux/io.h> #include <linux/notifier.h> +#include <asm/cacheflush.h> #include <asm/suspend.h> #include <asm/clock.h> #include <asm/mmzone.h> diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c index 67e330b7ea..2ad19a0c5e 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c @@ -17,8 +17,11 @@ #include <linux/sh_dma.h> #include <linux/sh_intc.h> #include <linux/usb/ohci_pdriver.h> + #include <cpu/dma-register.h> #include <cpu/sh7757.h> + +#include <asm/mmzone.h> #include <asm/platform_early.h> static struct plat_sci_port scif2_platform_data = { diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c index 74620f30b1..c048842d8a 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c @@ -400,20 +400,6 @@ static struct platform_device *sh7786_devices[] __initdata = { &usb_ohci_device, }; -/* - * Please call this function if your platform board - * use external clock for USB - * */ -#define USBCTL0 0xffe70858 -#define CLOCK_MODE_MASK 0xffffff7f -#define EXT_CLOCK_MODE 0x00000080 - -void __init sh7786_usb_use_exclock(void) -{ - u32 val = __raw_readl(USBCTL0) & CLOCK_MODE_MASK; - __raw_writel(val | EXT_CLOCK_MODE, USBCTL0); -} - #define USBINITREG1 0xffe70094 #define USBINITREG2 0xffe7009c #define USBINITVAL1 0x00ff0040 diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c index bf8682e718..45c8ae20d1 100644 --- a/arch/sh/kernel/dwarf.c +++ b/arch/sh/kernel/dwarf.c @@ -344,7 +344,7 @@ out: * dwarf_lookup_fde - locate the FDE that covers pc * @pc: the program counter */ -struct dwarf_fde *dwarf_lookup_fde(unsigned long pc) +static struct dwarf_fde *dwarf_lookup_fde(unsigned long pc) { struct rb_node **rb_node = &fde_root.rb_node; struct dwarf_fde *fde = NULL; diff --git a/arch/sh/kernel/kprobes.c b/arch/sh/kernel/kprobes.c index 74051b8ddf..49c4ffd782 100644 --- a/arch/sh/kernel/kprobes.c +++ b/arch/sh/kernel/kprobes.c @@ -39,7 +39,7 @@ static DEFINE_PER_CPU(struct kprobe, saved_next_opcode2); int __kprobes arch_prepare_kprobe(struct kprobe *p) { - kprobe_opcode_t opcode = *(kprobe_opcode_t *) (p->addr); + kprobe_opcode_t opcode = *p->addr; if (OPCODE_RTE(opcode)) return -EFAULT; /* Bad breakpoint */ @@ -248,7 +248,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs) p = get_kprobe(addr); if (!p) { /* Not one of ours: let kernel handle it */ - if (*(kprobe_opcode_t *)addr != BREAKPOINT_INSTRUCTION) { + if (*addr != BREAKPOINT_INSTRUCTION) { /* * The breakpoint instruction was removed right * after we hit it. Another cpu has removed @@ -296,7 +296,7 @@ static void __used kretprobe_trampoline_holder(void) /* * Called when we hit the probe point at __kretprobe_trampoline */ -int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) +static int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) { regs->pc = __kretprobe_trampoline_handler(regs, NULL); diff --git a/arch/sh/kernel/return_address.c b/arch/sh/kernel/return_address.c index 8838094c9f..2ce22f11ea 100644 --- a/arch/sh/kernel/return_address.c +++ b/arch/sh/kernel/return_address.c @@ -7,7 +7,9 @@ */ #include <linux/kernel.h> #include <linux/module.h> + #include <asm/dwarf.h> +#include <asm/ftrace.h> #ifdef CONFIG_DWARF_UNWINDER diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c index 5cf35a774d..108d808767 100644 --- a/arch/sh/kernel/smp.c +++ b/arch/sh/kernel/smp.c @@ -21,6 +21,8 @@ #include <linux/sched/hotplug.h> #include <linux/atomic.h> #include <linux/clockchips.h> +#include <linux/profile.h> + #include <asm/processor.h> #include <asm/mmu_context.h> #include <asm/smp.h> @@ -170,7 +172,7 @@ void native_play_dead(void) } #endif -asmlinkage void start_secondary(void) +static asmlinkage void start_secondary(void) { unsigned int cpu = smp_processor_id(); struct mm_struct *mm = &init_mm; @@ -320,11 +322,13 @@ void smp_message_recv(unsigned int msg) } } +#ifdef CONFIG_PROFILING /* Not really SMP stuff ... */ int setup_profiling_timer(unsigned int multiplier) { return 0; } +#endif #ifdef CONFIG_MMU diff --git a/arch/sh/kernel/syscalls/syscall.tbl b/arch/sh/kernel/syscalls/syscall.tbl index 0495a57c1e..c55fd7696d 100644 --- a/arch/sh/kernel/syscalls/syscall.tbl +++ b/arch/sh/kernel/syscalls/syscall.tbl @@ -465,3 +465,4 @@ 459 common lsm_get_self_attr sys_lsm_get_self_attr 460 common lsm_set_self_attr sys_lsm_set_self_attr 461 common lsm_list_modules sys_lsm_list_modules +462 common mseal sys_mseal diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c index 01884054ae..4339c4cafa 100644 --- a/arch/sh/kernel/traps.c +++ b/arch/sh/kernel/traps.c @@ -15,6 +15,8 @@ #include <linux/extable.h> #include <linux/module.h> /* print_modules */ + +#include <asm/ftrace.h> #include <asm/unwinder.h> #include <asm/traps.h> @@ -170,14 +172,6 @@ BUILD_TRAP_HANDLER(bug) force_sig(SIGTRAP); } -#ifdef CONFIG_DYNAMIC_FTRACE -extern void arch_ftrace_nmi_enter(void); -extern void arch_ftrace_nmi_exit(void); -#else -static inline void arch_ftrace_nmi_enter(void) { } -static inline void arch_ftrace_nmi_exit(void) { } -#endif - BUILD_TRAP_HANDLER(nmi) { TRAP_HANDLER_DECL; diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c index 6cdda3a621..1271b839a1 100644 --- a/arch/sh/kernel/traps_32.c +++ b/arch/sh/kernel/traps_32.c @@ -27,6 +27,7 @@ #include <asm/alignment.h> #include <asm/fpu.h> #include <asm/kprobes.h> +#include <asm/setup.h> #include <asm/traps.h> #include <asm/bl_bit.h> @@ -568,7 +569,7 @@ uspace_segv: /* * SH-DSP support gerg@snapgear.com. */ -int is_dsp_inst(struct pt_regs *regs) +static int is_dsp_inst(struct pt_regs *regs) { unsigned short inst = 0; @@ -590,7 +591,7 @@ int is_dsp_inst(struct pt_regs *regs) return 0; } #else -#define is_dsp_inst(regs) (0) +static inline int is_dsp_inst(struct pt_regs *regs) { return 0; } #endif /* CONFIG_SH_DSP */ #ifdef CONFIG_CPU_SH2A diff --git a/arch/sh/kernel/vsyscall/Makefile b/arch/sh/kernel/vsyscall/Makefile index 118744d349..cb4f0bb80c 100644 --- a/arch/sh/kernel/vsyscall/Makefile +++ b/arch/sh/kernel/vsyscall/Makefile @@ -19,14 +19,14 @@ vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 -Wl,--hash-style=sysv SYSCFLAGS_vsyscall-trapa.so = $(vsyscall-flags) $(obj)/vsyscall-trapa.so: \ -$(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE +$(obj)/vsyscall-%.so: $(obj)/vsyscall.lds $(obj)/vsyscall-%.o FORCE $(call if_changed,syscall) # We also create a special relocatable object that should mirror the symbol # table and layout of the linked DSO. With ld -R we can then refer to # these symbols in the kernel code rather than hand-coded addresses. SYSCFLAGS_vsyscall-dummy.o = -r -$(obj)/vsyscall-dummy.o: $(src)/vsyscall.lds \ +$(obj)/vsyscall-dummy.o: $(obj)/vsyscall.lds \ $(obj)/vsyscall-trapa.o $(obj)/vsyscall-note.o FORCE $(call if_changed,syscall) |