From: David Daney <ddaney@caviumnetworks.com>
To: Florian Fainelli <florian@openwrt.org>
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: [PATCH urgent] MIPS: fix micro-assembly overflow in set_except_vector
Date: Mon, 01 Feb 2010 09:13:36 -0800 [thread overview]
Message-ID: <4B670BC0.8030003@caviumnetworks.com> (raw)
In-Reply-To: <201002011027.37521.florian@openwrt.org>
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
> to jump_mask when jumping to the handler address.
>
> Reported-by: Maxime Bizon <mbizon@freebox.fr>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
Acked-by: David Daney <ddaney@caviumnetworks.com>
> ---
> diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
> index 7693929..40d94c3 100644
> --- a/arch/mips/kernel/traps.c
> +++ b/arch/mips/kernel/traps.c
> @@ -1279,11 +1279,11 @@ void __init *set_except_vector(int n, void *addr)
>
> exception_handlers[n] = handler;
> if (n == 0 && cpu_has_divec) {
> - unsigned long jump_mask = ~((1 << 28) - 1);
> + unsigned long jump_mask = ~((1 << 26) - 1);
> 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);
>
>
>
next prev parent reply other threads:[~2010-02-01 17:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-01 9:27 [PATCH urgent] MIPS: fix micro-assembly overflow in set_except_vector Florian Fainelli
2010-02-01 17:13 ` David Daney [this message]
[not found] ` <20100201103628.GA15661@alpha.franken.de>
2010-02-02 9:06 ` Florian Fainelli
2010-02-03 14:36 ` Ralf Baechle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B670BC0.8030003@caviumnetworks.com \
--to=ddaney@caviumnetworks.com \
--cc=florian@openwrt.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox