From a6bbce200deefb78c49e159ca718df22f18e5037 Mon Sep 17 00:00:00 2001 From: Jaswinder Singh Rajput Date: Tue, 22 Sep 2009 13:50:26 +0000 Subject: sh: includecheck fix: dwarf.c fix the following 'make includecheck' warning: arch/sh/kernel/dwarf.c: asm/dwarf.h is included more than once. Signed-off-by: Jaswinder Singh Rajput Signed-off-by: Paul Mundt --- arch/sh/kernel/dwarf.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch') diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c index bc4d8d75332..03b3616c80a 100644 --- a/arch/sh/kernel/dwarf.c +++ b/arch/sh/kernel/dwarf.c @@ -24,7 +24,6 @@ #include #include #include -#include #include /* Reserve enough memory for two stack frames */ -- cgit v1.2.3 From acf3cc283f1ea4ed7e579663eefed62f0aa572da Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 24 Sep 2009 06:28:27 +0000 Subject: sh: mach-ecovec24: Add active low setting for sh_eth Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt --- arch/sh/boards/mach-ecovec24/setup.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 96bc1698310..5f9881e16e2 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c @@ -121,6 +121,7 @@ static struct resource sh_eth_resources[] = { struct sh_eth_plat_data sh_eth_plat = { .phy = 0x1f, /* SMSC LAN8700 */ .edmac_endian = EDMAC_LITTLE_ENDIAN, + .ether_link_active_low = 1 }; static struct platform_device sh_eth_device = { -- cgit v1.2.3 From 23c4c82171008c8b18d8627c9741cdd577631cea Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Thu, 24 Sep 2009 17:38:18 +0900 Subject: sh: Handle unaligned 16-bit instructions on SH-2A. This adds some sanity checking in the unaligned instruction handler to verify the instruction size, which enables basic support for 16-bit fixups on SH-2A parts. Signed-off-by: Paul Mundt --- arch/sh/kernel/traps_32.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c index 6aba9af79ea..f9760c5c234 100644 --- a/arch/sh/kernel/traps_32.c +++ b/arch/sh/kernel/traps_32.c @@ -452,6 +452,12 @@ int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs, u_int rm; int ret, index; + /* + * XXX: We can't handle mixed 16/32-bit instructions yet + */ + if (instruction_size(instruction) != 2) + return -EINVAL; + index = (instruction>>8)&15; /* 0x0F00 */ rm = regs->regs[index]; @@ -619,9 +625,9 @@ asmlinkage void do_address_error(struct pt_regs *regs, se_user += 1; -#ifndef CONFIG_CPU_SH2A set_fs(USER_DS); - if (copy_from_user(&instruction, (u16 *)(regs->pc & ~1), 2)) { + if (copy_from_user(&instruction, (insn_size_t *)(regs->pc & ~1), + sizeof(instruction))) { set_fs(oldfs); goto uspace_segv; } @@ -633,7 +639,6 @@ asmlinkage void do_address_error(struct pt_regs *regs, "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", current->comm, current->pid, (void *)regs->pc, instruction); -#endif if (se_usermode & 2) goto fixup; -- cgit v1.2.3 From 40258ee97d0d5e5c30a3d4b7acaf294fe82cd23f Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Thu, 24 Sep 2009 17:48:15 +0900 Subject: sh: Fix up uninitialized variable use caught by gcc 4.4. In the unaligned kernel exception fixup case the printk() was ordered before the copy_from_user(), resulting in a nonsensical instruction value. This fixes up the ordering properly. Signed-off-by: Paul Mundt --- arch/sh/kernel/traps_32.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'arch') diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c index f9760c5c234..69bb1652ecc 100644 --- a/arch/sh/kernel/traps_32.c +++ b/arch/sh/kernel/traps_32.c @@ -678,12 +678,6 @@ uspace_segv: } else { se_sys += 1; - if (se_kernmode_warn) - printk(KERN_NOTICE "Unaligned kernel access " - "on behalf of \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", - current->comm, current->pid, (void *)regs->pc, - instruction); - if (regs->pc & 1) die("unaligned program counter", regs, error_code); @@ -697,6 +691,12 @@ uspace_segv: die("insn faulting in do_address_error", regs, 0); } + if (se_kernmode_warn) + printk(KERN_NOTICE "Unaligned kernel access " + "on behalf of \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", + current->comm, current->pid, (void *)regs->pc, + instruction); + handle_unaligned_access(instruction, regs, &user_mem_access, 0); set_fs(oldfs); -- cgit v1.2.3 From 3e9ad52b95e259e68c7dcb69a25d58047ed51094 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Fri, 21 Aug 2009 01:24:54 +0000 Subject: sh: add FSI driver support for ms7724se Signed-off-by: Kuninori Morimoto Acked-by: Mark Brown Signed-off-by: Paul Mundt --- arch/sh/boards/mach-se/7724/setup.c | 89 +++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) (limited to 'arch') diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index 00973e0f8c6..e78c3be8ad2 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c @@ -22,6 +22,7 @@ #include #include