mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Jonas Gorski <jonas.gorski@gmail.com>,
	linux-kernel@vger.kernel.org, linux-mips@linux-mips.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Jason Cooper <jason@lakedaemon.net>,
	Kevin Cernekee <cernekee@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [PATCH] irqchip/bcm7038-l1: hide cpu offline callback when building for !SMP
Date: Mon, 13 Aug 2018 16:21:48 +0100	[thread overview]
Message-ID: <795995ac-8cab-23df-e3f9-bf3578cd525c@arm.com> (raw)
In-Reply-To: <20180809085901.26568-1-jonas.gorski@gmail.com>

On 09/08/18 09:59, Jonas Gorski wrote:
> When compiling bmips with SMP disabled, the build fails with:
> 
> drivers/irqchip/irq-bcm7038-l1.o: In function `bcm7038_l1_cpu_offline':
> drivers/irqchip/irq-bcm7038-l1.c:242: undefined reference to `irq_set_affinity_locked'
> make[5]: *** [vmlinux] Error 1
> 
> Fix this by adding and setting bcm7038_l1_cpu_offline only when actually
> compiling for SMP. It wouldn't have been used anyway, as it requires
> CPU_HOTPLUG, which in turn requires SMP.
> 
> Fixes: 34c535793bcb ("irqchip/bcm7038-l1: Implement irq_cpu_offline() callback")
> Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
> ---
>  drivers/irqchip/irq-bcm7038-l1.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/irqchip/irq-bcm7038-l1.c b/drivers/irqchip/irq-bcm7038-l1.c
> index faf734ff4cf3..0f6e30e9009d 100644
> --- a/drivers/irqchip/irq-bcm7038-l1.c
> +++ b/drivers/irqchip/irq-bcm7038-l1.c
> @@ -217,6 +217,7 @@ static int bcm7038_l1_set_affinity(struct irq_data *d,
>  	return 0;
>  }
>  
> +#ifdef CONFIG_SMP
>  static void bcm7038_l1_cpu_offline(struct irq_data *d)
>  {
>  	struct cpumask *mask = irq_data_get_affinity_mask(d);
> @@ -241,6 +242,7 @@ static void bcm7038_l1_cpu_offline(struct irq_data *d)
>  	}
>  	irq_set_affinity_locked(d, &new_affinity, false);
>  }
> +#endif
>  
>  static int __init bcm7038_l1_init_one(struct device_node *dn,
>  				      unsigned int idx,
> @@ -293,7 +295,9 @@ static struct irq_chip bcm7038_l1_irq_chip = {
>  	.irq_mask		= bcm7038_l1_mask,
>  	.irq_unmask		= bcm7038_l1_unmask,
>  	.irq_set_affinity	= bcm7038_l1_set_affinity,
> +#ifdef CONFIG_SMP
>  	.irq_cpu_offline	= bcm7038_l1_cpu_offline,
> +#endif
>  };
>  
>  static int bcm7038_l1_map(struct irq_domain *d, unsigned int virq,
> 

Queued, thanks.

	M.
-- 
Jazz is not dead. It just smells funny...

      reply	other threads:[~2018-08-13 15:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-09  8:59 Jonas Gorski
2018-08-13 15:21 ` Marc Zyngier [this message]

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=795995ac-8cab-23df-e3f9-bf3578cd525c@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=cernekee@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=jason@lakedaemon.net \
    --cc=jonas.gorski@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=tglx@linutronix.de \
    /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®