mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] x86/irq: factor out IS_ERR_OR_NULL check from platfom-specific handle_irq
Date: Mon, 19 Aug 2019 12:41:29 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1908191236540.1923@nanos.tec.linutronix.de> (raw)
In-Reply-To: <e9b4d21d-d9eb-51c5-871e-87e3b69d01ec@gmail.com>

On Sun, 4 Aug 2019, Heiner Kallweit wrote:
> -
> -	if (!handle_irq(desc, regs)) {
> +	if (IS_ERR_OR_NULL(desc)) {

This really want's an unlikely or preferrably be written as:

	if (likely(!IS_ERR_OR_NULL(desc))) {
		handle_irq(desc);
	} else {

>  		ack_APIC_irq();
>  
>  		if (desc != VECTOR_RETRIGGERED && desc != VECTOR_SHUTDOWN) {
> @@ -254,6 +253,8 @@ __visible unsigned int __irq_entry do_IRQ(struct pt_regs *regs)
>  		} else {
>  			__this_cpu_write(vector_irq[vector], VECTOR_UNUSED);
>  		}
> +	} else {
> +		handle_irq(desc, regs);
>  	}
>  
> diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c
> index 6bf6517a0..cd4595b71 100644
> --- a/arch/x86/kernel/irq_64.c
> +++ b/arch/x86/kernel/irq_64.c
> @@ -26,13 +26,9 @@
>  DEFINE_PER_CPU_PAGE_ALIGNED(struct irq_stack, irq_stack_backing_store) __visible;
>  DECLARE_INIT_PER_CPU(irq_stack_backing_store);
>  
> -bool handle_irq(struct irq_desc *desc, struct pt_regs *regs)
> +void handle_irq(struct irq_desc *desc, struct pt_regs *regs)
>  {
> -	if (IS_ERR_OR_NULL(desc))
> -		return false;
> -
>  	generic_handle_irq_desc(desc);

With that the function call does not make any sense for 64bit. So the
wrapper should be an inline and only for 32bit a function call.

Thanks,

	tglx

  reply	other threads:[~2019-08-19 10:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-04  8:18 [PATCH 0/3] x86/irq: slightly improve handle_irq Heiner Kallweit
2019-08-04  8:19 ` [PATCH 1/3] x86/irq: improve definition of VECTOR_SHUTDOWN et al Heiner Kallweit
2019-08-04  8:21 ` [PATCH 2/3] x86/irq: factor out IS_ERR_OR_NULL check from platfom-specific handle_irq Heiner Kallweit
2019-08-19 10:41   ` Thomas Gleixner [this message]
2019-08-04  8:22 ` [PATCH 3/3] x86/irq: slightly improve do_IRQ Heiner Kallweit

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=alpine.DEB.2.21.1908191236540.1923@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=bp@alien8.de \
    --cc=hkallweit1@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=x86@kernel.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

all inboxes | Powered by JetHome®