All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Karl Mehltretter <kmehltretter@gmail.com>
Cc: Jiri Slaby <jirislaby@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Nicolas Pitre <nico@fluxnic.net>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty: hvc: restrict HVC_DCC to ARMv6+ and ARM64
Date: Fri, 17 Jul 2026 09:22:18 +0200	[thread overview]
Message-ID: <2026071743-number-headfirst-bcca@gregkh> (raw)
In-Reply-To: <20260717071616.91423-1-kmehltretter@gmail.com>

On Fri, Jul 17, 2026 at 09:16:16AM +0200, Karl Mehltretter wrote:
> hvc_dcc drives the JTAG DCC via the ARMv6/v7 CP14 debug registers
> (mrc/mcr p14, 0, rX, c0, c1/c5, 0 in asm/dcc.h). That encoding is
> undefined on older ARM cores, and also on ARMv7-M, but HVC_DCC only
> depends on ARM, so it can be enabled on e.g. ARM926 (ARCH_MULTI_V5),
> where hvc_dcc_console_init() runs __dcc_putchar() at boot and takes an
> undefined-instruction trap before the console is up:
> 
>   Internal error: Oops - undefined instruction: 0 [#1] ARM
>   PC is at hvc_dcc_check+0x50/0x8c
>    hvc_dcc_check from hvc_dcc_console_init+0x18/0x48
>    hvc_dcc_console_init from console_init+0x58/0x170
>   Kernel panic - not syncing: Fatal exception
> 
> Restrict HVC_DCC to the CPUs where that encoding is valid: the
> CPU_V6 || CPU_V6K || CPU_V7 set that arch/arm/include/debug/icedcc.S
> guards it with, plus ARM64.
> 
> Fixes: 16c63f8ea49c ("drivers: char: hvc: add arm JTAG DCC console support")
> Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
> ---
>  drivers/tty/hvc/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/hvc/Kconfig b/drivers/tty/hvc/Kconfig
> index c2a4e88b328f..5866195de26a 100644
> --- a/drivers/tty/hvc/Kconfig
> +++ b/drivers/tty/hvc/Kconfig
> @@ -79,7 +79,7 @@ config HVC_UDBG
>  
>  config HVC_DCC
>  	bool "ARM JTAG DCC console"
> -	depends on ARM || ARM64
> +	depends on (ARM && (CPU_V6 || CPU_V6K || CPU_V7)) || ARM64

What about testing builds?

thanks,

greg k-h

  reply	other threads:[~2026-07-17  7:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17  7:16 [PATCH] tty: hvc: restrict HVC_DCC to ARMv6+ and ARM64 Karl Mehltretter
2026-07-17  7:22 ` Greg Kroah-Hartman [this message]
2026-07-17  8:04   ` Arnd Bergmann
2026-07-17 10:25     ` Karl Mehltretter
2026-07-17 10:51       ` Greg Kroah-Hartman

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=2026071743-number-headfirst-bcca@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=jirislaby@kernel.org \
    --cc=kmehltretter@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=nico@fluxnic.net \
    /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.