public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: LLVMLinux: Add missing abort() for AARCH64
Date: Sat, 06 Sep 2014 16:12:57 +0200	[thread overview]
Message-ID: <53558632.2D4ZDSZcaf@wuerfel> (raw)
In-Reply-To: <1409959302-13976-1-git-send-email-behanw@converseincode.com>

On Friday 05 September 2014 16:21:42 behanw at converseincode.com wrote:
> From: Mark Charlebois <charlebm@gmail.com>
> 
> Add missing abort for arch aarch64.
> 
> This patch makes the aarch64 kernel able to compile with gcc or clang.
> 
> Signed-off-by: Mark Charlebois <charlebm@gmail.com>
> Signed-off-by: Behan Webster <behanw@converseincode.com>

You don't describe why this is needed. When does clang emit an abort()
call? Is that the expected behavior when not linking against a full
C library?

>  arch/arm64/kernel/traps.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
> index 02cd3f0..123cd6e 100644
> --- a/arch/arm64/kernel/traps.c
> +++ b/arch/arm64/kernel/traps.c
> @@ -349,6 +349,15 @@ void __pgd_error(const char *file, int line, unsigned long val)
>         pr_crit("%s:%d: bad pgd %016lx.\n", file, line, val);
>  }
>  
> +void abort(void)
> +{
> +       BUG();
> +
> +       /* if that doesn't kill us, halt */
> +       panic("Oops failed to kill thread");
> +}
> +EXPORT_SYMBOL(abort);

I don't see the point in doing both BUG() and panic(). Doesn't panic()
already print all the information you want in this case?

	Arnd

  reply	other threads:[~2014-09-06 14:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-05 23:21 [PATCH] arm64: LLVMLinux: Add missing abort() for AARCH64 behanw at converseincode.com
2014-09-06 14:12 ` Arnd Bergmann [this message]
2014-09-07  2:49   ` Mark Charlebois

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=53558632.2D4ZDSZcaf@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.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