Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Rolf Eike Beer <eike-kernel@sf-tec.de>,
	Sven Schnelle <svens@stackframe.org>
Cc: linux-parisc@vger.kernel.org
Subject: Re: [PATCH v3 4/4] parisc: add support for TOC (transfer of control)
Date: Sat, 16 Oct 2021 18:56:35 +0200	[thread overview]
Message-ID: <312371f5-e2e4-8044-9898-5be8258927ac@gmx.de> (raw)
In-Reply-To: <2081016.irdbgypaU6@daneel.sf-tec.de>

On 10/16/21 18:49, Rolf Eike Beer wrote:
> Sven Schnelle wrote:
>
>> diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
>> index 27a8b49af11f..97a889eaffe1 100644
>> --- a/arch/parisc/Kconfig
>> +++ b/arch/parisc/Kconfig
>> @@ -288,6 +288,20 @@ config SMP
>>
>>  	  If you don't know what to do here, say N.
>>
>> +config TOC
>> +	bool "Support TOC switch"
>> +	default y if 64BIT || !SMP
>> +	help
>> +	  Most PA-RISC machines have either a switch at the back of the
> machine
>> +	  or a command in BMC to trigger a TOC interrupt. If you say Y here
> a
>> +	  handler will be installed which will either show a backtrace on
> all
>> +	  CPUs, or enter a possible configured debugger like kgdb/kdb.
>> +
>> +	  Note that with this option enabled, the kernel will use an
> additional
>> 16KB +	  per possible CPU as a special stack for the TOC handler.
>> +
>> +	  If you don't want to debug the Kernel, so N.
>
> so -> say?

Yes, I fixed that before I applied to my tree.

>> +void notrace __noreturn __cold toc_intr(struct pt_regs *regs)
>> +{
>> +	struct pdc_toc_pim_20 pim_data20;
>> +	struct pdc_toc_pim_11 pim_data11;
>> +
>> +	nmi_enter();
>> +
>> +	if (boot_cpu_data.cpu_type >= pcxu) {
>> +		if (pdc_pim_toc20(&pim_data20))
>> +			panic("Failed to get PIM data");
>> +		toc20_to_pt_regs(regs, &pim_data20);
>> +	} else {
>> +		if (pdc_pim_toc11(&pim_data11))
>> +			panic("Failed to get PIM data");
>> +		toc11_to_pt_regs(regs, &pim_data11);
>> +	}
>
> As I said elsewhere because I had missed v3: move the variables in the if
> branches.

It won't change anything, the compiler is clever enough to optimize it.
Another option would be to completely move the pdc_pim_toc* functions
into the toc*_to_pt_regs functions, maybe then renaming them to
get_tocXX_pt_regs(regs);

Helge

  reply	other threads:[~2021-10-16 16:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-14 19:49 [PATCH v3 0/4] add TOC support Sven Schnelle
2021-10-14 19:49 ` [PATCH v3 1/4] parisc: move virt_map macro to assembly.h Sven Schnelle
2021-10-14 19:49 ` [PATCH v3 2/4] parisc: add PIM TOC data structures Sven Schnelle
2021-10-14 19:49 ` [PATCH v3 3/4] parisc/firmware: add functions to retrieve TOC data Sven Schnelle
2021-10-14 19:49 ` [PATCH v3 4/4] parisc: add support for TOC (transfer of control) Sven Schnelle
2021-10-16 16:49   ` Rolf Eike Beer
2021-10-16 16:56     ` Helge Deller [this message]
2021-10-14 20:27 ` [PATCH v3 0/4] add TOC support Helge Deller

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=312371f5-e2e4-8044-9898-5be8258927ac@gmx.de \
    --to=deller@gmx.de \
    --cc=eike-kernel@sf-tec.de \
    --cc=linux-parisc@vger.kernel.org \
    --cc=svens@stackframe.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