aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 17:07:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 17:07:35 -0400
commit15fc204afc6feb915c400159546f646eca8ba1d9 (patch)
tree51bec0710be2a0cb0bedbccbea7813f17fbc61ea /arch/sh/kernel
parentd2aa4550379f92e929af7ed1dd4f55e6a1e331f8 (diff)
parent944557116908cbe835be41bfbd39d9706da9fd71 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (56 commits) sh: Fix declaration of __kernel_sigreturn and __kernel_rt_sigreturn sh: Enable soc-camera in ap325rxa/migor/se7724 defconfigs. sh: remove stray markers. sh: defconfig updates. sh: pci: Initial PCI-Express support for SH7786 Urquell board. sh: Generic HAVE_PERF_COUNTER support. SH: convert migor to soc-camera as platform-device SH: convert ap325rxa to soc-camera as platform-device soc-camera: unify i2c camera device platform data sh: add platform data for r8a66597-hcd in setup-sh7723 sh: add platform data for r8a66597-hcd in setup-sh7366 sh: x3proto: add platform data for r8a66597-hcd sh: highlander: add platform data for r8a66597-hcd sh: sh7785lcr: add platform data for r8a66597-hcd sh: turn off irqs when disabling CMT/TMU timers sh: use kzalloc() for cpg clocks sh: unbreak WARN_ON() sh: Use generic atomic64_t implementation. sh: Revised clock function in highlander sh: Update r7780mp defconfig ...
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r--arch/sh/kernel/cpu/clock-cpg.c16
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7366.c10
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7723.c9
-rw-r--r--arch/sh/kernel/cpu/sh4a/smp-shx3.c5
-rw-r--r--arch/sh/kernel/ftrace.c60
-rw-r--r--arch/sh/kernel/process_32.c2
-rw-r--r--arch/sh/kernel/process_64.c7
-rw-r--r--arch/sh/kernel/sh_ksyms_64.c7
-rw-r--r--arch/sh/kernel/signal_32.c4
-rw-r--r--arch/sh/kernel/smp.c10
-rw-r--r--arch/sh/kernel/sys_sh.c2
-rw-r--r--arch/sh/kernel/syscalls_32.S1
-rw-r--r--arch/sh/kernel/syscalls_64.S1
-rw-r--r--arch/sh/kernel/time.c27
-rw-r--r--arch/sh/kernel/traps.c1
15 files changed, 77 insertions, 85 deletions
diff --git a/arch/sh/kernel/cpu/clock-cpg.c b/arch/sh/kernel/cpu/clock-cpg.c
index 275942e58e4f..6dfe2cced3fc 100644
--- a/arch/sh/kernel/cpu/clock-cpg.c
+++ b/arch/sh/kernel/cpu/clock-cpg.c
@@ -1,6 +1,6 @@
1#include <linux/clk.h> 1#include <linux/clk.h>
2#include <linux/compiler.h> 2#include <linux/compiler.h>
3#include <linux/bootmem.h> 3#include <linux/slab.h>
4#include <linux/io.h> 4#include <linux/io.h>
5#include <asm/clock.h> 5#include <asm/clock.h>
6 6
@@ -127,10 +127,11 @@ int __init sh_clk_div6_register(struct clk *clks, int nr)
127 int k; 127 int k;
128 128
129 freq_table_size *= (nr_divs + 1); 129 freq_table_size *= (nr_divs + 1);
130 130 freq_table = kzalloc(freq_table_size * nr, GFP_KERNEL);
131 freq_table = alloc_bootmem(freq_table_size * nr); 131 if (!freq_table) {
132 if (!freq_table) 132 pr_err("sh_clk_div6_register: unable to alloc memory\n");
133 return -ENOMEM; 133 return -ENOMEM;
134 }
134 135
135 for (k = 0; !ret && (k < nr); k++) { 136 for (k = 0; !ret && (k < nr); k++) {
136 clkp = clks + k; 137 clkp = clks + k;
@@ -175,10 +176,11 @@ int __init sh_clk_div4_register(struct clk *clks, int nr,
175 int k; 176 int k;
176 177
177 freq_table_size *= (nr_divs + 1); 178 freq_table_size *= (nr_divs + 1);
178 179 freq_table = kzalloc(freq_table_size * nr, GFP_KERNEL);
179 freq_table = alloc_bootmem(freq_table_size * nr); 180 if (!freq_table) {
180 if (!freq_table) 181 pr_err("sh_clk_div4_register: unable to alloc memory\n");
181 return -ENOMEM; 182 return -ENOMEM;
183 }
182 184
183 for (k = 0; !ret && (k < nr); k++) { 185 for (k = 0; !ret && (k < nr); k++) {
184 clkp = clks + k; 186 clkp = clks + k;
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
index 318516f6bfad..c18f7d09281b 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
@@ -15,6 +15,7 @@
15#include <linux/serial_sci.h> 15#include <linux/serial_sci.h>
16#include <linux/uio_driver.h> 16#include <linux/uio_driver.h>
17#include <linux/sh_timer.h> 17#include <linux/sh_timer.h>
18#include <linux/usb/r8a66597.h>
18#include <asm/clock.h> 19#include <asm/clock.h>
19 20
20static struct resource iic_resources[] = { 21static struct resource iic_resources[] = {
@@ -38,18 +39,20 @@ static struct platform_device iic_device = {
38 .resource = iic_resources, 39 .resource = iic_resources,
39}; 40};
40 41
42static struct r8a66597_platdata r8a66597_data = {
43 /* This set zero to all members */
44};
45
41static struct resource usb_host_resources[] = { 46static struct resource usb_host_resources[] = {
42 [0] = { 47 [0] = {
43 .name = "r8a66597_hcd",
44 .start = 0xa4d80000, 48 .start = 0xa4d80000,
45 .end = 0xa4d800ff, 49 .end = 0xa4d800ff,
46 .flags = IORESOURCE_MEM, 50 .flags = IORESOURCE_MEM,
47 }, 51 },
48 [1] = { 52 [1] = {
49 .name = "r8a66597_hcd",
50 .start = 65, 53 .start = 65,
51 .end = 65, 54 .end = 65,
52 .flags = IORESOURCE_IRQ, 55 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
53 }, 56 },
54}; 57};
55 58
@@ -59,6 +62,7 @@ static struct platform_device usb_host_device = {
59 .dev = { 62 .dev = {
60 .dma_mask = NULL, 63 .dma_mask = NULL,
61 .coherent_dma_mask = 0xffffffff, 64 .coherent_dma_mask = 0xffffffff,
65 .platform_data = &r8a66597_data,
62 }, 66 },
63 .num_resources = ARRAY_SIZE(usb_host_resources), 67 .num_resources = ARRAY_SIZE(usb_host_resources),
64 .resource = usb_host_resources, 68 .resource = usb_host_resources,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
index d8f4a13aeff9..e1bb80b2a27b 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
@@ -13,6 +13,7 @@
13#include <linux/mm.h> 13#include <linux/mm.h>
14#include <linux/serial_sci.h> 14#include <linux/serial_sci.h>
15#include <linux/uio_driver.h> 15#include <linux/uio_driver.h>
16#include <linux/usb/r8a66597.h>
16#include <linux/sh_timer.h> 17#include <linux/sh_timer.h>
17#include <linux/io.h> 18#include <linux/io.h>
18#include <asm/clock.h> 19#include <asm/clock.h>
@@ -396,9 +397,12 @@ static struct platform_device rtc_device = {
396 .resource = rtc_resources, 397 .resource = rtc_resources,
397}; 398};
398 399
400static struct r8a66597_platdata r8a66597_data = {
401 /* This set zero to all members */
402};
403
399static struct resource sh7723_usb_host_resources[] = { 404static struct resource sh7723_usb_host_resources[] = {
400 [0] = { 405 [0] = {
401 .name = "r8a66597_hcd",
402 .start = 0xa4d80000, 406 .start = 0xa4d80000,
403 .end = 0xa4d800ff, 407 .end = 0xa4d800ff,
404 .flags = IORESOURCE_MEM, 408 .flags = IORESOURCE_MEM,
@@ -406,7 +410,7 @@ static struct resource sh7723_usb_host_resources[] = {
406 [1] = { 410 [1] = {
407 .start = 65, 411 .start = 65,
408 .end = 65, 412 .end = 65,
409 .flags = IORESOURCE_IRQ, 413 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
410 }, 414 },
411}; 415};
412 416
@@ -416,6 +420,7 @@ static struct platform_device sh7723_usb_host_device = {
416 .dev = { 420 .dev = {
417 .dma_mask = NULL, /* not use dma */ 421 .dma_mask = NULL, /* not use dma */
418 .coherent_dma_mask = 0xffffffff, 422 .coherent_dma_mask = 0xffffffff,
423 .platform_data = &r8a66597_data,
419 }, 424 },
420 .num_resources = ARRAY_SIZE(sh7723_usb_host_resources), 425 .num_resources = ARRAY_SIZE(sh7723_usb_host_resources),
421 .resource = sh7723_usb_host_resources, 426 .resource = sh7723_usb_host_resources,
diff --git a/arch/sh/kernel/cpu/sh4a/smp-shx3.c b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
index b8869aa20dec..2b6b0d50c576 100644
--- a/arch/sh/kernel/cpu/sh4a/smp-shx3.c
+++ b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
@@ -35,8 +35,7 @@ void __init plat_smp_setup(void)
35 unsigned int cpu = 0; 35 unsigned int cpu = 0;
36 int i, num; 36 int i, num;
37 37
38 cpus_clear(cpu_possible_map); 38 init_cpu_possible(cpumask_of(cpu));
39 cpu_set(cpu, cpu_possible_map);
40 39
41 __cpu_number_map[0] = 0; 40 __cpu_number_map[0] = 0;
42 __cpu_logical_map[0] = 0; 41 __cpu_logical_map[0] = 0;
@@ -46,7 +45,7 @@ void __init plat_smp_setup(void)
46 * for the total number of cores. 45 * for the total number of cores.
47 */ 46 */
48 for (i = 1, num = 0; i < NR_CPUS; i++) { 47 for (i = 1, num = 0; i < NR_CPUS; i++) {
49 cpu_set(i, cpu_possible_map); 48 set_cpu_possible(i, true);
50 __cpu_number_map[i] = ++num; 49 __cpu_number_map[i] = ++num;
51 __cpu_logical_map[num] = i; 50 __cpu_logical_map[num] = i;
52 } 51 }
diff --git a/arch/sh/kernel/ftrace.c b/arch/sh/kernel/ftrace.c
index 4c3247477aa3..066f37dc32a9 100644
--- a/arch/sh/kernel/ftrace.c
+++ b/arch/sh/kernel/ftrace.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2008 Matt Fleming <mjf@gentoo.org> 2 * Copyright (C) 2008 Matt Fleming <matt@console-pimps.org>
3 * Copyright (C) 2008 Paul Mundt <lethal@linux-sh.org> 3 * Copyright (C) 2008 Paul Mundt <lethal@linux-sh.org>
4 * 4 *
5 * Code for replacing ftrace calls with jumps. 5 * Code for replacing ftrace calls with jumps.
@@ -19,30 +19,37 @@
19#include <asm/ftrace.h> 19#include <asm/ftrace.h>
20#include <asm/cacheflush.h> 20#include <asm/cacheflush.h>
21 21
22static unsigned char ftrace_nop[] = {
23 0x09, 0x00, /* nop */
24 0x09, 0x00, /* nop */
25};
26
27static unsigned char ftrace_replaced_code[MCOUNT_INSN_SIZE]; 22static unsigned char ftrace_replaced_code[MCOUNT_INSN_SIZE];
28 23
29unsigned char *ftrace_nop_replace(void) 24static unsigned char ftrace_nop[4];
25/*
26 * If we're trying to nop out a call to a function, we instead
27 * place a call to the address after the memory table.
28 *
29 * 8c011060 <a>:
30 * 8c011060: 02 d1 mov.l 8c01106c <a+0xc>,r1
31 * 8c011062: 22 4f sts.l pr,@-r15
32 * 8c011064: 02 c7 mova 8c011070 <a+0x10>,r0
33 * 8c011066: 2b 41 jmp @r1
34 * 8c011068: 2a 40 lds r0,pr
35 * 8c01106a: 09 00 nop
36 * 8c01106c: 68 24 .word 0x2468 <--- ip
37 * 8c01106e: 1d 8c .word 0x8c1d
38 * 8c011070: 26 4f lds.l @r15+,pr <--- ip + MCOUNT_INSN_SIZE
39 *
40 * We write 0x8c011070 to 0x8c01106c so that on entry to a() we branch
41 * past the _mcount call and continue executing code like normal.
42 */
43static unsigned char *ftrace_nop_replace(unsigned long ip)
30{ 44{
45 __raw_writel(ip + MCOUNT_INSN_SIZE, ftrace_nop);
31 return ftrace_nop; 46 return ftrace_nop;
32} 47}
33 48
34static int is_sh_nop(unsigned char *ip) 49static unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr)
35{
36 return strncmp(ip, ftrace_nop, sizeof(ftrace_nop));
37}
38
39unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr)
40{ 50{
41 /* Place the address in the memory table. */ 51 /* Place the address in the memory table. */
42 if (addr == CALLER_ADDR) 52 __raw_writel(addr, ftrace_replaced_code);
43 __raw_writel(addr + MCOUNT_INSN_OFFSET, ftrace_replaced_code);
44 else
45 __raw_writel(addr, ftrace_replaced_code);
46 53
47 /* 54 /*
48 * No locking needed, this must be called via kstop_machine 55 * No locking needed, this must be called via kstop_machine
@@ -51,7 +58,7 @@ unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr)
51 return ftrace_replaced_code; 58 return ftrace_replaced_code;
52} 59}
53 60
54int ftrace_modify_code(unsigned long ip, unsigned char *old_code, 61static int ftrace_modify_code(unsigned long ip, unsigned char *old_code,
55 unsigned char *new_code) 62 unsigned char *new_code)
56{ 63{
57 unsigned char replaced[MCOUNT_INSN_SIZE]; 64 unsigned char replaced[MCOUNT_INSN_SIZE];
@@ -66,13 +73,6 @@ int ftrace_modify_code(unsigned long ip, unsigned char *old_code,
66 * kstop_machine, or before SMP starts. 73 * kstop_machine, or before SMP starts.
67 */ 74 */
68 75
69 /*
70 * If we're trying to nop out a call to a function, we instead
71 * place a call to the address after the memory table.
72 */
73 if (is_sh_nop(new_code) == 0)
74 __raw_writel(ip + MCOUNT_INSN_SIZE, (unsigned long)new_code);
75
76 /* read the text we want to modify */ 76 /* read the text we want to modify */
77 if (probe_kernel_read(replaced, (void *)ip, MCOUNT_INSN_SIZE)) 77 if (probe_kernel_read(replaced, (void *)ip, MCOUNT_INSN_SIZE))
78 return -EFAULT; 78 return -EFAULT;
@@ -92,13 +92,13 @@ int ftrace_modify_code(unsigned long ip, unsigned char *old_code,
92 92
93int ftrace_update_ftrace_func(ftrace_func_t func) 93int ftrace_update_ftrace_func(ftrace_func_t func)
94{ 94{
95 unsigned long ip = (unsigned long)(&ftrace_call); 95 unsigned long ip = (unsigned long)(&ftrace_call) + MCOUNT_INSN_OFFSET;
96 unsigned char old[MCOUNT_INSN_SIZE], *new; 96 unsigned char old[MCOUNT_INSN_SIZE], *new;
97 97
98 memcpy(old, (unsigned char *)(ip + MCOUNT_INSN_OFFSET), MCOUNT_INSN_SIZE); 98 memcpy(old, (unsigned char *)ip, MCOUNT_INSN_SIZE);
99 new = ftrace_call_replace(ip, (unsigned long)func); 99 new = ftrace_call_replace(ip, (unsigned long)func);
100 100
101 return ftrace_modify_code(ip + MCOUNT_INSN_OFFSET, old, new); 101 return ftrace_modify_code(ip, old, new);
102} 102}
103 103
104int ftrace_make_nop(struct module *mod, 104int ftrace_make_nop(struct module *mod,
@@ -108,7 +108,7 @@ int ftrace_make_nop(struct module *mod,
108 unsigned long ip = rec->ip; 108 unsigned long ip = rec->ip;
109 109
110 old = ftrace_call_replace(ip, addr); 110 old = ftrace_call_replace(ip, addr);
111 new = ftrace_nop_replace(); 111 new = ftrace_nop_replace(ip);
112 112
113 return ftrace_modify_code(rec->ip, old, new); 113 return ftrace_modify_code(rec->ip, old, new);
114} 114}
@@ -118,7 +118,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
118 unsigned char *new, *old; 118 unsigned char *new, *old;
119 unsigned long ip = rec->ip; 119 unsigned long ip = rec->ip;
120 120
121 old = ftrace_nop_replace(); 121 old = ftrace_nop_replace(ip);
122 new = ftrace_call_replace(ip, addr); 122 new = ftrace_call_replace(ip, addr);
123 123
124 return ftrace_modify_code(rec->ip, old, new); 124 return ftrace_modify_code(rec->ip, old, new);
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c
index 601bbc0ec74e..92d7740faab1 100644
--- a/arch/sh/kernel/process_32.c
+++ b/arch/sh/kernel/process_32.c
@@ -119,8 +119,6 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
119 pid = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, 119 pid = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0,
120 &regs, 0, NULL, NULL); 120 &regs, 0, NULL, NULL);
121 121
122 trace_mark(kernel_arch_kthread_create, "pid %d fn %p", pid, fn);
123
124 return pid; 122 return pid;
125} 123}
126 124
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c
index 3826773496d8..24de74214940 100644
--- a/arch/sh/kernel/process_64.c
+++ b/arch/sh/kernel/process_64.c
@@ -323,7 +323,6 @@ ATTRIB_NORET void kernel_thread_helper(void *arg, int (*fn)(void *))
323int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) 323int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
324{ 324{
325 struct pt_regs regs; 325 struct pt_regs regs;
326 int pid;
327 326
328 memset(&regs, 0, sizeof(regs)); 327 memset(&regs, 0, sizeof(regs));
329 regs.regs[2] = (unsigned long)arg; 328 regs.regs[2] = (unsigned long)arg;
@@ -333,12 +332,8 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
333 regs.sr = (1 << 30); 332 regs.sr = (1 << 30);
334 333
335 /* Ok, create the new process.. */ 334 /* Ok, create the new process.. */
336 pid = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, 335 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0,
337 &regs, 0, NULL, NULL); 336 &regs, 0, NULL, NULL);
338
339 trace_mark(kernel_arch_kthread_create, "pid %d fn %p", pid, fn);
340
341 return pid;
342} 337}
343 338
344/* 339/*
diff --git a/arch/sh/kernel/sh_ksyms_64.c b/arch/sh/kernel/sh_ksyms_64.c
index 8f54ef0cfbca..f5bd156ea504 100644
--- a/arch/sh/kernel/sh_ksyms_64.c
+++ b/arch/sh/kernel/sh_ksyms_64.c
@@ -38,13 +38,6 @@ EXPORT_SYMBOL(clear_user_page);
38EXPORT_SYMBOL(flush_dcache_page); 38EXPORT_SYMBOL(flush_dcache_page);
39#endif 39#endif
40 40
41/* Networking helper routines. */
42EXPORT_SYMBOL(csum_partial);
43EXPORT_SYMBOL(csum_partial_copy_nocheck);
44#ifdef CONFIG_IPV6
45EXPORT_SYMBOL(csum_ipv6_magic);
46#endif
47
48#ifdef CONFIG_VT 41#ifdef CONFIG_VT
49EXPORT_SYMBOL(screen_info); 42EXPORT_SYMBOL(screen_info);
50#endif 43#endif
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c
index 17784e19ae34..b5afbec1db59 100644
--- a/arch/sh/kernel/signal_32.c
+++ b/arch/sh/kernel/signal_32.c
@@ -332,8 +332,8 @@ get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size)
332 332
333/* These symbols are defined with the addresses in the vsyscall page. 333/* These symbols are defined with the addresses in the vsyscall page.
334 See vsyscall-trapa.S. */ 334 See vsyscall-trapa.S. */
335extern void __user __kernel_sigreturn; 335extern void __kernel_sigreturn(void);
336extern void __user __kernel_rt_sigreturn; 336extern void __kernel_rt_sigreturn(void);
337 337
338static int setup_frame(int sig, struct k_sigaction *ka, 338static int setup_frame(int sig, struct k_sigaction *ka,
339 sigset_t *set, struct pt_regs *regs) 339 sigset_t *set, struct pt_regs *regs)
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c
index 8f4027412614..442d8d47a41e 100644
--- a/arch/sh/kernel/smp.c
+++ b/arch/sh/kernel/smp.c
@@ -47,7 +47,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
47 plat_prepare_cpus(max_cpus); 47 plat_prepare_cpus(max_cpus);
48 48
49#ifndef CONFIG_HOTPLUG_CPU 49#ifndef CONFIG_HOTPLUG_CPU
50 cpu_present_map = cpu_possible_map; 50 init_cpu_present(&cpu_possible_map);
51#endif 51#endif
52} 52}
53 53
@@ -58,8 +58,8 @@ void __devinit smp_prepare_boot_cpu(void)
58 __cpu_number_map[0] = cpu; 58 __cpu_number_map[0] = cpu;
59 __cpu_logical_map[0] = cpu; 59 __cpu_logical_map[0] = cpu;
60 60
61 cpu_set(cpu, cpu_online_map); 61 set_cpu_online(cpu, true);
62 cpu_set(cpu, cpu_possible_map); 62 set_cpu_possible(cpu, true);
63} 63}
64 64
65asmlinkage void __cpuinit start_secondary(void) 65asmlinkage void __cpuinit start_secondary(void)
@@ -171,11 +171,11 @@ void smp_send_stop(void)
171 smp_call_function(stop_this_cpu, 0, 0); 171 smp_call_function(stop_this_cpu, 0, 0);
172} 172}
173 173
174void arch_send_call_function_ipi(cpumask_t mask) 174void arch_send_call_function_ipi_mask(const struct cpumask *mask)
175{ 175{
176 int cpu; 176 int cpu;
177 177
178 for_each_cpu_mask(cpu, mask) 178 for_each_cpu(cpu, mask)
179 plat_send_ipi(cpu, SMP_MSG_FUNCTION); 179 plat_send_ipi(cpu, SMP_MSG_FUNCTION);
180} 180}
181 181
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c
index e3a7e36639ef..90d00e47264d 100644
--- a/arch/sh/kernel/sys_sh.c
+++ b/arch/sh/kernel/sys_sh.c
@@ -88,8 +88,6 @@ asmlinkage int sys_ipc(uint call, int first, int second,
88 version = call >> 16; /* hack for backward compatibility */ 88 version = call >> 16; /* hack for backward compatibility */
89 call &= 0xffff; 89 call &= 0xffff;
90 90
91 trace_mark(kernel_arch_ipc_call, "call %u first %d", call, first);
92
93 if (call <= SEMTIMEDOP) 91 if (call <= SEMTIMEDOP)
94 switch (call) { 92 switch (call) {
95 case SEMOP: 93 case SEMOP:
diff --git a/arch/sh/kernel/syscalls_32.S b/arch/sh/kernel/syscalls_32.S
index a9fff9f731ec..f9e21fa2f592 100644
--- a/arch/sh/kernel/syscalls_32.S
+++ b/arch/sh/kernel/syscalls_32.S
@@ -352,3 +352,4 @@ ENTRY(sys_call_table)
352 .long sys_preadv 352 .long sys_preadv
353 .long sys_pwritev 353 .long sys_pwritev
354 .long sys_rt_tgsigqueueinfo /* 335 */ 354 .long sys_rt_tgsigqueueinfo /* 335 */
355 .long sys_perf_counter_open
diff --git a/arch/sh/kernel/syscalls_64.S b/arch/sh/kernel/syscalls_64.S
index 75c1889af1ed..bf420b616ae0 100644
--- a/arch/sh/kernel/syscalls_64.S
+++ b/arch/sh/kernel/syscalls_64.S
@@ -390,3 +390,4 @@ sys_call_table:
390 .long sys_preadv 390 .long sys_preadv
391 .long sys_pwritev 391 .long sys_pwritev
392 .long sys_rt_tgsigqueueinfo 392 .long sys_rt_tgsigqueueinfo
393 .long sys_perf_counter_open
diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c
index 2edde32c764b..9b352a1e3fb4 100644
--- a/arch/sh/kernel/time.c
+++ b/arch/sh/kernel/time.c
@@ -91,21 +91,6 @@ module_init(rtc_generic_init);
91 91
92void (*board_time_init)(void); 92void (*board_time_init)(void);
93 93
94unsigned long long sched_clock(void)
95{
96 return (jiffies_64 - INITIAL_JIFFIES) * (NSEC_PER_SEC / HZ);
97}
98
99static void __init sh_late_time_init(void)
100{
101 /*
102 * Make sure all compiled-in early timers register themselves.
103 * Run probe() for one "earlytimer" device.
104 */
105 early_platform_driver_register_all("earlytimer");
106 early_platform_driver_probe("earlytimer", 1, 0);
107}
108
109void __init time_init(void) 94void __init time_init(void)
110{ 95{
111 if (board_time_init) 96 if (board_time_init)
@@ -121,5 +106,15 @@ void __init time_init(void)
121 local_timer_setup(smp_processor_id()); 106 local_timer_setup(smp_processor_id());
122#endif 107#endif
123 108
124 late_time_init = sh_late_time_init; 109 /*
110 * Make sure all compiled-in early timers register themselves.
111 *
112 * Run probe() for two "earlytimer" devices, these will be the
113 * clockevents and clocksource devices respectively. In the event
114 * that only a clockevents device is available, we -ENODEV on the
115 * clocksource and the jiffies clocksource is used transparently
116 * instead. No error handling is necessary here.
117 */
118 early_platform_driver_register_all("earlytimer");
119 early_platform_driver_probe("earlytimer", 2, 0);
125} 120}
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c
index 46348ed07cc3..b3e0067db358 100644
--- a/arch/sh/kernel/traps.c
+++ b/arch/sh/kernel/traps.c
@@ -69,6 +69,7 @@ BUILD_TRAP_HANDLER(bug)
69 insn_size_t insn = *(insn_size_t *)instruction_pointer(regs); 69 insn_size_t insn = *(insn_size_t *)instruction_pointer(regs);
70 if (insn == TRAPA_BUG_OPCODE) 70 if (insn == TRAPA_BUG_OPCODE)
71 handle_BUG(regs); 71 handle_BUG(regs);
72 return;
72 } 73 }
73#endif 74#endif
74 75