From: David Daney <ddaney.cavm@gmail.com>
To: "Steven J. Hill" <sjhill@mips.com>
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: Re: [PATCH] MIPS: microMIPS: Redefine value of BRK_BUG.
Date: Thu, 17 Jan 2013 10:15:49 -0800 [thread overview]
Message-ID: <50F83FD5.2060908@gmail.com> (raw)
In-Reply-To: <1358444216-17213-1-git-send-email-sjhill@mips.com>
On 01/17/2013 09:36 AM, Steven J. Hill wrote:
> From: "Steven J. Hill" <sjhill@mips.com>
>
> The BRK_BUG value is used in the BUG and __BUG_ON inline macros. For
> standard MIPS cores the code in the 'tne' instruction is 10-bits long.
> In microMIPS, the 'tne' instruction is recoded and the code can only be
> 4-bits long. We use the value of 12 instead of 512 when building a
> microMIPS kernel.
>
> Signed-off-by: Steven J. Hill <sjhill@mips.com>
> ---
> arch/mips/include/asm/break.h | 1 +
> arch/mips/include/asm/bug.h | 4 ++++
> 2 files changed, 5 insertions(+)
>
> diff --git a/arch/mips/include/asm/break.h b/arch/mips/include/asm/break.h
> index 9161e68..df9d090 100644
> --- a/arch/mips/include/asm/break.h
> +++ b/arch/mips/include/asm/break.h
> @@ -27,6 +27,7 @@
> #define BRK_STACKOVERFLOW 9 /* For Ada stackchecking */
> #define BRK_NORLD 10 /* No rld found - not used by Linux/MIPS */
> #define _BRK_THREADBP 11 /* For threads, user bp (used by debuggers) */
> +#define BRK_BUG_MM 12 /* Used by BUG() in microMIPS mode */
> #define BRK_BUG 512 /* Used by BUG() */
Can we move the CONFIG_CPU_MICROMIPS to here and just call the thing
BRK_BUG?
Or perhaps redefining it unconditionally. I am not sure what the
implications of doing that would be.
That way...
> #define BRK_KDB 513 /* Used in KDB_ENTER() */
> #define BRK_MEMU 514 /* Used by FPU emulator */
> diff --git a/arch/mips/include/asm/bug.h b/arch/mips/include/asm/bug.h
> index 540c98a..b716fb9 100644
> --- a/arch/mips/include/asm/bug.h
> +++ b/arch/mips/include/asm/bug.h
> @@ -7,6 +7,10 @@
> #ifdef CONFIG_BUG
>
> #include <asm/break.h>
> +#ifdef CONFIG_CPU_MICROMIPS
> +#undef BRK_BUG
> +#define BRK_BUG BRK_BUG_MM
> +#endif
>
...We don't need this bit. Doing an #undef risks using different
values for BRK_BUG depending on whether or not asm/bug.h is included.
> static inline void __noreturn BUG(void)
> {
>
next prev parent reply other threads:[~2013-01-17 18:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-17 17:36 [PATCH] MIPS: microMIPS: Redefine value of BRK_BUG Steven J. Hill
2013-01-17 18:15 ` David Daney [this message]
2013-01-17 19:07 ` Hill, Steven
2013-01-17 22:54 ` Ralf Baechle
2013-01-18 0:42 ` David Daney
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=50F83FD5.2060908@gmail.com \
--to=ddaney.cavm@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=sjhill@mips.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.