Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1238375 > unrolled thread

[PATCH 0/2] GICv3 ITS fixes for v4.3

Started byMarc Zyngier <marc.zyngier@arm.com>
First post2015-10-02 17:50 +0200
Last post2015-10-02 21:00 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/2] GICv3 ITS fixes for v4.3 Marc Zyngier <marc.zyngier@arm.com> - 2015-10-02 17:50 +0200
    [PATCH 1/2] irqchip/gic-v3-its: Silence warning when its_lpi_alloc_chunks gets inlined Marc Zyngier <marc.zyngier@arm.com> - 2015-10-02 17:50 +0200
      [tip:irq/urgent] irqchip/gic-v3-its:   Silence warning when its_lpi_alloc_chunks gets inlined tip-bot for Marc Zyngier <tipbot@zytor.com> - 2015-10-02 21:00 +0200

#1238375 — [PATCH 0/2] GICv3 ITS fixes for v4.3

FromMarc Zyngier <marc.zyngier@arm.com>
Date2015-10-02 17:50 +0200
Subject[PATCH 0/2] GICv3 ITS fixes for v4.3
Message-ID<qfaKS-7Fv-9@gated-at.bofh.it>
Thomas, Jason,

A couple of relatively minor fixes for the GICv3 ITS code:
- Silence a warning that seems to happen when GCC is a bit inlining happy,
- Fix a thinko when trying to account for PCI aliases.

Thanks,

	M.

Marc Zyngier (2):
  irqchip/gic-v3-its: Silence warning when its_lpi_alloc_chunks gets
    inlined
  irqchip/gic-v3-its: Count additional LPIs for the aliased devices

 drivers/irqchip/irq-gic-v3-its-pci-msi.c | 2 +-
 drivers/irqchip/irq-gic-v3-its.c         | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1238376 — [PATCH 1/2] irqchip/gic-v3-its: Silence warning when its_lpi_alloc_chunks gets inlined

FromMarc Zyngier <marc.zyngier@arm.com>
Date2015-10-02 17:50 +0200
Subject[PATCH 1/2] irqchip/gic-v3-its: Silence warning when its_lpi_alloc_chunks gets inlined
Message-ID<qfaKS-7Fv-21@gated-at.bofh.it>
In reply to#1238375
More agressive inlining in recent versions of GCC have uncovered
a new set of warnings:

	drivers/irqchip/irq-gic-v3-its.c: In function its_msi_prepare:
	drivers/irqchip/irq-gic-v3-its.c:1148:26: warning: lpi_base may be used
	uninitialized in this function [-Wmaybe-uninitialized]
	  dev->event_map.lpi_base = lpi_base;
                          ^
	drivers/irqchip/irq-gic-v3-its.c:1116:6: note: lpi_base was declared here
	  int lpi_base;
	      ^
	drivers/irqchip/irq-gic-v3-its.c:1149:25: warning: nr_lpis may be used
	uninitialized in this function [-Wmaybe-uninitialized]
	  dev->event_map.nr_lpis = nr_lpis;
	                         ^
	drivers/irqchip/irq-gic-v3-its.c:1117:6: note: nr_lpis was declared here
	  int nr_lpis;
	      ^
The warning is fairly benign (there is no code path that could
actually use uninitialized vatiables), but let's silence it anyway
by zeroing the variables on the error path.

Reported-by: Alex Shi <alex.shi@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
 drivers/irqchip/irq-gic-v3-its.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index ac7ae2b..25ceae9f 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -719,6 +719,9 @@ static unsigned long *its_lpi_alloc_chunks(int nr_irqs, int *base, int *nr_ids)
 out:
 	spin_unlock(&lpi_lock);
 
+	if (!bitmap)
+		*base = *nr_ids = 0;
+
 	return bitmap;
 }
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1238534 — [tip:irq/urgent] irqchip/gic-v3-its: Silence warning when its_lpi_alloc_chunks gets inlined

Fromtip-bot for Marc Zyngier <tipbot@zytor.com>
Date2015-10-02 21:00 +0200
Subject[tip:irq/urgent] irqchip/gic-v3-its: Silence warning when its_lpi_alloc_chunks gets inlined
Message-ID<qfdIK-3ul-15@gated-at.bofh.it>
In reply to#1238376
Commit-ID:  c8415b9470727f70afce8607d4fe521789aa6c1c
Gitweb:     http://git.kernel.org/tip/c8415b9470727f70afce8607d4fe521789aa6c1c
Author:     Marc Zyngier <marc.zyngier@arm.com>
AuthorDate: Fri, 2 Oct 2015 16:44:05 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 2 Oct 2015 20:51:41 +0200

irqchip/gic-v3-its: Silence warning when its_lpi_alloc_chunks gets inlined

More agressive inlining in recent versions of GCC have uncovered
a new set of warnings:

 drivers/irqchip/irq-gic-v3-its.c: In function its_msi_prepare:
  drivers/irqchip/irq-gic-v3-its.c:1148:26: warning: lpi_base may be used
    uninitialized in this function [-Wmaybe-uninitialized]
     dev->event_map.lpi_base = lpi_base;
                          ^
 drivers/irqchip/irq-gic-v3-its.c:1116:6: note: lpi_base was declared here
  int lpi_base;
	      ^
 drivers/irqchip/irq-gic-v3-its.c:1149:25: warning: nr_lpis may be used
  uninitialized in this function [-Wmaybe-uninitialized]
   dev->event_map.nr_lpis = nr_lpis;
	                         ^
 drivers/irqchip/irq-gic-v3-its.c:1117:6: note: nr_lpis was declared here
  int nr_lpis;
	      ^
The warning is fairly benign (there is no code path that could
actually use uninitialized variables), but let's silence it anyway
by zeroing the variables on the error path.

Reported-by: Alex Shi <alex.shi@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: David Daney <ddaney.cavm@gmail.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Link: http://lkml.kernel.org/r/1443800646-8074-2-git-send-email-marc.zyngier@arm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/irqchip/irq-gic-v3-its.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index ac7ae2b..25ceae9f 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -719,6 +719,9 @@ static unsigned long *its_lpi_alloc_chunks(int nr_irqs, int *base, int *nr_ids)
 out:
 	spin_unlock(&lpi_lock);
 
+	if (!bitmap)
+		*base = *nr_ids = 0;
+
 	return bitmap;
 }
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web