All of lore.kernel.org
 help / color / mirror / Atom feed
From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: Fix UP build warning in gic-v3
Date: Tue, 29 Jul 2014 12:57:16 +0100	[thread overview]
Message-ID: <878uncml7n.fsf@approximate.cambridge.arm.com> (raw)
In-Reply-To: <1406588159.28348.41.camel@smoke> (Geoff Levand's message of "Mon, 28 Jul 2014 23:55:59 +0100")

On Mon, Jul 28 2014 at 11:55:59 pm BST, Geoff Levand <geoff@infradead.org> wrote:
> The static routines gic_write_sgi1r() and gic_peek_irq() are only used for SMP
> builds, so move those two routines to within the defined(CONFIG_SMP)
> preprocessor conditional.
>
> Fixes build warnings like these when CONFIG_SMP=n:
>
>   drivers/irqchip/irq-gic-v3.c: warning: ?gic_write_sgi1r? defined but not used
>   drivers/irqchip/irq-gic-v3.c: warning: ?gic_peek_irq? defined but not used
>
> Signed-off-by: Geoff Levand <geoff@infradead.org>
> ---
> Hi Marc,
>
> I'm not sure if this has gone upstream yet, but I get these warnings
> with Catalin's current arm64/for-next/core branch.
>
> Feel free to just fold this into your gic-v3 patch if you'll be
> sending out a new version.

Hi Geof,

There is a similar patch from Mark Brown on its way (not addressing
gic_write_sgi1r though).

Thanks,

	M.
>
> -Geoff
>
>  drivers/irqchip/irq-gic-v3.c | 36 ++++++++++++++++++------------------
>  1 file changed, 18 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
> index 57eaa5a..e9ee18a 100644
> --- a/drivers/irqchip/irq-gic-v3.c
> +++ b/drivers/irqchip/irq-gic-v3.c
> @@ -129,11 +129,6 @@ static void gic_write_grpen1(u64 val)
>  	isb();
>  }
>  
> -static void gic_write_sgi1r(u64 val)
> -{
> -	asm volatile("msr_s " __stringify(ICC_SGI1R_EL1) ", %0" : : "r" (val));
> -}
> -
>  static void gic_enable_sre(void)
>  {
>  	u64 val;
> @@ -200,19 +195,6 @@ static void gic_poke_irq(struct irq_data *d, u32 offset)
>  	rwp_wait();
>  }
>  
> -static int gic_peek_irq(struct irq_data *d, u32 offset)
> -{
> -	u32 mask = 1 << (gic_irq(d) % 32);
> -	void __iomem *base;
> -
> -	if (gic_irq_in_rdist(d))
> -		base = gic_data_rdist_sgi_base();
> -	else
> -		base = gic_data.dist_base;
> -
> -	return !!(readl_relaxed(base + offset + (gic_irq(d) / 32) * 4) & mask);
> -}
> -
>  static void gic_mask_irq(struct irq_data *d)
>  {
>  	gic_poke_irq(d, GICD_ICENABLER);
> @@ -401,6 +383,24 @@ static void gic_cpu_init(void)
>  }
>  
>  #ifdef CONFIG_SMP
> +static void gic_write_sgi1r(u64 val)
> +{
> +	asm volatile("msr_s " __stringify(ICC_SGI1R_EL1) ", %0" : : "r" (val));
> +}
> +
> +static int gic_peek_irq(struct irq_data *d, u32 offset)
> +{
> +	u32 mask = 1 << (gic_irq(d) % 32);
> +	void __iomem *base;
> +
> +	if (gic_irq_in_rdist(d))
> +		base = gic_data_rdist_sgi_base();
> +	else
> +		base = gic_data.dist_base;
> +
> +	return !!(readl_relaxed(base + offset + (gic_irq(d) / 32) * 4) & mask);
> +}
> +
>  static int gic_secondary_init(struct notifier_block *nfb,
>  			      unsigned long action, void *hcpu)
>  {

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

  reply	other threads:[~2014-07-29 11:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-28 22:55 [PATCH] arm64: Fix UP build warning in gic-v3 Geoff Levand
2014-07-29 11:57 ` Marc Zyngier [this message]
2014-07-29 12:03   ` Mark Brown
2014-07-29 12:39     ` Marc Zyngier

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=878uncml7n.fsf@approximate.cambridge.arm.com \
    --to=marc.zyngier@arm.com \
    --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 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.