From: Alexander Graf <agraf@suse.de>
To: "qemu-ppc@nongnu.org List" <qemu-ppc@nongnu.org>
Cc: Michael Ellerman <michael@ellerman.id.au>,
qemu-devel qemu-devel <qemu-devel@nongnu.org>,
David Gibson <david@gibson.dropbear.id.au>
Subject: [Qemu-devel] [PATCH 02/40] pseries: Use #define for XICS base irq number
Date: Fri, 14 Dec 2012 13:13:18 +0100 [thread overview]
Message-ID: <1355487236-27451-3-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1355487236-27451-1-git-send-email-agraf@suse.de>
From: Ben Herrenschmidt <benh@kernel.crashing.org>
Currently the lowest "real" irq number for the XICS irq controller (as
opposed to numbers reserved for IPIs and other special purposes) is
hard coded as 16 in two places - in xics_system_init() and in spapr.c.
As well as being generally bad practice, we're going to need to change this
number soon to fit in with the in-kernel XICS implementation. This patch
adds a #define for this number to avoid future breakage.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Ben Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
hw/spapr.c | 2 +-
hw/xics.c | 2 +-
hw/xics.h | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/spapr.c b/hw/spapr.c
index ad3f0ea..eafee03 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -801,7 +801,7 @@ static void ppc_spapr_init(QEMUMachineInitArgs *args)
/* Set up Interrupt Controller */
spapr->icp = xics_system_init(XICS_IRQS);
- spapr->next_irq = 16;
+ spapr->next_irq = XICS_IRQ_BASE;
/* Set up EPOW events infrastructure */
spapr_events_init(spapr);
diff --git a/hw/xics.c b/hw/xics.c
index edf5833..b8887cd 100644
--- a/hw/xics.c
+++ b/hw/xics.c
@@ -549,7 +549,7 @@ struct icp_state *xics_system_init(int nr_irqs)
ics = g_malloc0(sizeof(*ics));
ics->nr_irqs = nr_irqs;
- ics->offset = 16;
+ ics->offset = XICS_IRQ_BASE;
ics->irqs = g_malloc0(nr_irqs * sizeof(struct ics_irq_state));
icp->ics = ics;
diff --git a/hw/xics.h b/hw/xics.h
index 6817268..c3bf008 100644
--- a/hw/xics.h
+++ b/hw/xics.h
@@ -28,6 +28,7 @@
#define __XICS_H__
#define XICS_IPI 0x2
+#define XICS_IRQ_BASE 0x10
struct icp_state;
--
1.6.0.2
next prev parent reply other threads:[~2012-12-14 12:15 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 12:13 [Qemu-devel] [PULL 00/40] ppc patch queue 2012-12-14 Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 01/40] pseries: Fix incorrect initialization of interrupt controller Alexander Graf
2012-12-14 12:13 ` Alexander Graf [this message]
2012-12-14 12:13 ` [Qemu-devel] [PATCH 03/40] pseries: Return the token when we register an RTAS call Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 04/40] pseries: Allow RTAS tokens without a qemu handler Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 05/40] pseries: Add tracepoints to the XICS interrupt controller Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 06/40] pseries: Split xics irq configuration from state information Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 07/40] pseries: Implement PAPR NVRAM Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 08/40] pseries: Update SLOF for NVRAM support Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 09/40] e500: Adding CCSR memory region Alexander Graf
2012-12-14 13:47 ` Andreas Färber
2012-12-14 12:13 ` [Qemu-devel] [PATCH 10/40] Adding BAR0 for e500 PCI controller Alexander Graf
2012-12-14 13:49 ` Andreas Färber
2012-12-14 12:13 ` [Qemu-devel] [PATCH 11/40] pseries: Don't allow TCE (iommu) tables to be registered with duplicate LIOBNs Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 12/40] openpic: Remove unused code Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 13/40] mpic: Unify numbering scheme Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 14/40] openpic: update to proper memory api Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 15/40] openpic: combine mpic and openpic src handlers Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 16/40] openpic: Convert subregions to memory api Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 17/40] openpic: combine mpic and openpic irq raise functions Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 18/40] openpic: merge mpic and openpic timer handling Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 19/40] openpic: combine openpic and mpic reset functions Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 20/40] openpic: unify memory api subregions Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 21/40] openpic: remove unused type variable Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 22/40] openpic: convert simple reg operations to builtin bitops Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 23/40] openpic: rename openpic_t to OpenPICState Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 24/40] openpic: remove irq_out Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 25/40] openpic: convert to qdev Alexander Graf
2012-12-14 20:32 ` Blue Swirl
2012-12-14 20:42 ` Alexander Graf
2012-12-14 20:50 ` Blue Swirl
2012-12-14 12:13 ` [Qemu-devel] [PATCH 26/40] openpic: make brr1 model specific Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 27/40] openpic: add Shared MSI support Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 28/40] PPC: e500: Add " Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 29/40] PPC: e500: Declare pci bridge as bridge Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 30/40] MSI-X: Fix endianness Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 31/40] openpic: fix minor coding style issues Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 32/40] openpic: Accelerate pending irq search Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 33/40] PPC: E500: PCI: Make first slot qdev settable Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 34/40] PPC: E500: PCI: Make IRQ calculation more generic Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 35/40] PPC: E500: Generate dt pci irq map dynamically Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 36/40] PPC: E500: Move PCI slot information into params Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 37/40] PPC: E500plat: Make a lot of PCI slots available Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 38/40] PPC: e500: pci: Export slot2irq calculation Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 39/40] target-ppc: Don't use hwaddr to represent hardware state Alexander Graf
2012-12-14 12:13 ` [Qemu-devel] [PATCH 40/40] pseries: Increase default NVRAM size Alexander Graf
2012-12-15 10:09 ` [Qemu-devel] [PULL 00/40] ppc patch queue 2012-12-14 Blue Swirl
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=1355487236-27451-3-git-send-email-agraf@suse.de \
--to=agraf@suse.de \
--cc=david@gibson.dropbear.id.au \
--cc=michael@ellerman.id.au \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.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;
as well as URLs for NNTP newsgroup(s).