diff options
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7343.c | 31 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/process_64.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/traps_32.c | 9 |
4 files changed, 36 insertions, 8 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c index 0623e377f488..4ff4dc64520c 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c | |||
@@ -112,6 +112,34 @@ static struct platform_device veu_device = { | |||
112 | .num_resources = ARRAY_SIZE(veu_resources), | 112 | .num_resources = ARRAY_SIZE(veu_resources), |
113 | }; | 113 | }; |
114 | 114 | ||
115 | static struct uio_info jpu_platform_data = { | ||
116 | .name = "JPU", | ||
117 | .version = "0", | ||
118 | .irq = 27, | ||
119 | }; | ||
120 | |||
121 | static struct resource jpu_resources[] = { | ||
122 | [0] = { | ||
123 | .name = "JPU", | ||
124 | .start = 0xfea00000, | ||
125 | .end = 0xfea102d3, | ||
126 | .flags = IORESOURCE_MEM, | ||
127 | }, | ||
128 | [1] = { | ||
129 | /* place holder for contiguous memory */ | ||
130 | }, | ||
131 | }; | ||
132 | |||
133 | static struct platform_device jpu_device = { | ||
134 | .name = "uio_pdrv_genirq", | ||
135 | .id = 2, | ||
136 | .dev = { | ||
137 | .platform_data = &jpu_platform_data, | ||
138 | }, | ||
139 | .resource = jpu_resources, | ||
140 | .num_resources = ARRAY_SIZE(jpu_resources), | ||
141 | }; | ||
142 | |||
115 | static struct plat_sci_port sci_platform_data[] = { | 143 | static struct plat_sci_port sci_platform_data[] = { |
116 | { | 144 | { |
117 | .mapbase = 0xffe00000, | 145 | .mapbase = 0xffe00000, |
@@ -152,6 +180,7 @@ static struct platform_device *sh7343_devices[] __initdata = { | |||
152 | &sci_device, | 180 | &sci_device, |
153 | &vpu_device, | 181 | &vpu_device, |
154 | &veu_device, | 182 | &veu_device, |
183 | &jpu_device, | ||
155 | }; | 184 | }; |
156 | 185 | ||
157 | static int __init sh7343_devices_setup(void) | 186 | static int __init sh7343_devices_setup(void) |
@@ -160,9 +189,11 @@ static int __init sh7343_devices_setup(void) | |||
160 | clk_always_enable("xymem0"); /* XYMEM */ | 189 | clk_always_enable("xymem0"); /* XYMEM */ |
161 | clk_always_enable("veu0"); /* VEU */ | 190 | clk_always_enable("veu0"); /* VEU */ |
162 | clk_always_enable("vpu0"); /* VPU */ | 191 | clk_always_enable("vpu0"); /* VPU */ |
192 | clk_always_enable("jpu0"); /* JPU */ | ||
163 | 193 | ||
164 | platform_resource_setup_memory(&vpu_device, "vpu", 1 << 20); | 194 | platform_resource_setup_memory(&vpu_device, "vpu", 1 << 20); |
165 | platform_resource_setup_memory(&veu_device, "veu", 2 << 20); | 195 | platform_resource_setup_memory(&veu_device, "veu", 2 << 20); |
196 | platform_resource_setup_memory(&jpu_device, "jpu", 2 << 20); | ||
166 | 197 | ||
167 | return platform_add_devices(sh7343_devices, | 198 | return platform_add_devices(sh7343_devices, |
168 | ARRAY_SIZE(sh7343_devices)); | 199 | ARRAY_SIZE(sh7343_devices)); |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c index 50cf6838ec41..5146afc156e0 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c | |||
@@ -158,7 +158,7 @@ static struct resource jpu_resources[] = { | |||
158 | [0] = { | 158 | [0] = { |
159 | .name = "JPU", | 159 | .name = "JPU", |
160 | .start = 0xfea00000, | 160 | .start = 0xfea00000, |
161 | .end = 0xfea102d0, | 161 | .end = 0xfea102d3, |
162 | .flags = IORESOURCE_MEM, | 162 | .flags = IORESOURCE_MEM, |
163 | }, | 163 | }, |
164 | [1] = { | 164 | [1] = { |
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c index a7e5f2e74bac..c90c7e5e5fee 100644 --- a/arch/sh/kernel/process_64.c +++ b/arch/sh/kernel/process_64.c | |||
@@ -520,7 +520,6 @@ asmlinkage int sys_execve(char *ufilename, char **uargv, | |||
520 | int error; | 520 | int error; |
521 | char *filename; | 521 | char *filename; |
522 | 522 | ||
523 | lock_kernel(); | ||
524 | filename = getname((char __user *)ufilename); | 523 | filename = getname((char __user *)ufilename); |
525 | error = PTR_ERR(filename); | 524 | error = PTR_ERR(filename); |
526 | if (IS_ERR(filename)) | 525 | if (IS_ERR(filename)) |
@@ -537,7 +536,6 @@ asmlinkage int sys_execve(char *ufilename, char **uargv, | |||
537 | } | 536 | } |
538 | putname(filename); | 537 | putname(filename); |
539 | out: | 538 | out: |
540 | unlock_kernel(); | ||
541 | return error; | 539 | return error; |
542 | } | 540 | } |
543 | 541 | ||
diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c index c0aa3d83ec0e..60dcf87ed019 100644 --- a/arch/sh/kernel/traps_32.c +++ b/arch/sh/kernel/traps_32.c | |||
@@ -125,20 +125,18 @@ static inline void die_if_kernel(const char *str, struct pt_regs *regs, | |||
125 | * - userspace errors just cause EFAULT to be returned, resulting in SEGV | 125 | * - userspace errors just cause EFAULT to be returned, resulting in SEGV |
126 | * - kernel/userspace interfaces cause a jump to an appropriate handler | 126 | * - kernel/userspace interfaces cause a jump to an appropriate handler |
127 | * - other kernel errors are bad | 127 | * - other kernel errors are bad |
128 | * - return 0 if fixed-up, -EFAULT if non-fatal (to the kernel) fault | ||
129 | */ | 128 | */ |
130 | static int die_if_no_fixup(const char * str, struct pt_regs * regs, long err) | 129 | static void die_if_no_fixup(const char * str, struct pt_regs * regs, long err) |
131 | { | 130 | { |
132 | if (!user_mode(regs)) { | 131 | if (!user_mode(regs)) { |
133 | const struct exception_table_entry *fixup; | 132 | const struct exception_table_entry *fixup; |
134 | fixup = search_exception_tables(regs->pc); | 133 | fixup = search_exception_tables(regs->pc); |
135 | if (fixup) { | 134 | if (fixup) { |
136 | regs->pc = fixup->fixup; | 135 | regs->pc = fixup->fixup; |
137 | return 0; | 136 | return; |
138 | } | 137 | } |
139 | die(str, regs, err); | 138 | die(str, regs, err); |
140 | } | 139 | } |
141 | return -EFAULT; | ||
142 | } | 140 | } |
143 | 141 | ||
144 | static inline void sign_extend(unsigned int count, unsigned char *dst) | 142 | static inline void sign_extend(unsigned int count, unsigned char *dst) |
@@ -314,7 +312,8 @@ static int handle_unaligned_ins(opcode_t instruction, struct pt_regs *regs, | |||
314 | /* Argh. Address not only misaligned but also non-existent. | 312 | /* Argh. Address not only misaligned but also non-existent. |
315 | * Raise an EFAULT and see if it's trapped | 313 | * Raise an EFAULT and see if it's trapped |
316 | */ | 314 | */ |
317 | return die_if_no_fixup("Fault in unaligned fixup", regs, 0); | 315 | die_if_no_fixup("Fault in unaligned fixup", regs, 0); |
316 | return -EFAULT; | ||
318 | } | 317 | } |
319 | 318 | ||
320 | /* | 319 | /* |