Hi Thomas, On Monday 01 February 2010 11:36:28 Thomas Bogendoerfer wrote: > On Mon, Feb 01, 2010 at 10:27:37AM +0100, Florian Fainelli wrote: > > Commit 24a6d9866c5f15ba7e5b14dc17be4b6edba21d0e broke > > the installation of handlers for boards which have their > > handlers above a 1 << 26 address. Fix this by making sure that > > jump_mask does not excess 0xfc000000 and add the missing ~ operator > > j can handle 28 bit jump targets (26 bit in instruction plus two 0 bits > for 32bit aligment), so 0xf000000 was IMHO fine. Corrected version below, thanks. --- From: Florian Fainelli <florian@xxxxxxxxxxx> Subject: [PATCH urgent] MIPS: fix micro-assembly overflow in set_except_vector Commit 24a6d9866c5f15ba7e5b14dc17be4b6edba21d0e broke the installation of handlers for boards which have their handlers above 0xf0000000. Fix this by adding the missing ~ operator to jump_mask when loading the handler target address into buf. Reported-by: Maxime Bizon <mbizon@xxxxxxxxxx> Acked-by: David Daney <ddaney@xxxxxxxxxxxxxxxxxx> Signed-off-by: Florian Fainelli <florian@xxxxxxxxxxx> --- diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 7693929..af176b8 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -1283,7 +1283,7 @@ void __init *set_except_vector(int n, void *addr) u32 *buf = (u32 *)(ebase + 0x200); unsigned int k0 = 26; if ((handler & jump_mask) == ((ebase + 0x200) & jump_mask)) { - uasm_i_j(&buf, handler & jump_mask); + uasm_i_j(&buf, handler & ~jump_mask); uasm_i_nop(&buf); } else { UASM_i_LA(&buf, k0, handler);