|
|
902636 |
From f2f57c1ed926384e074d2048cdbdc30ee2f426eb Mon Sep 17 00:00:00 2001
|
|
|
902636 |
From: David Gibson <dgibson@redhat.com>
|
|
|
902636 |
Date: Tue, 21 Jan 2020 05:16:13 +0000
|
|
|
902636 |
Subject: [PATCH 03/15] ppc: Don't use CPUPPCState::irq_input_state with modern
|
|
|
902636 |
Book3s CPU models
|
|
|
902636 |
MIME-Version: 1.0
|
|
|
902636 |
Content-Type: text/plain; charset=UTF-8
|
|
|
902636 |
Content-Transfer-Encoding: 8bit
|
|
|
902636 |
|
|
|
902636 |
RH-Author: David Gibson <dgibson@redhat.com>
|
|
|
902636 |
Message-id: <20200121051613.388295-4-dgibson@redhat.com>
|
|
|
902636 |
Patchwork-id: 93431
|
|
|
902636 |
O-Subject: [RHEL-AV-8.2 qemu-kvm PATCH 3/3] ppc: Don't use CPUPPCState::irq_input_state with modern Book3s CPU models
|
|
|
902636 |
Bugzilla: 1776638
|
|
|
902636 |
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
902636 |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
902636 |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
902636 |
|
|
|
902636 |
From: Greg Kurz <groug@kaod.org>
|
|
|
902636 |
|
|
|
902636 |
The power7_set_irq() and power9_set_irq() functions set this but it is
|
|
|
902636 |
never used actually. Modern Book3s compatible CPUs are only supported
|
|
|
902636 |
by the pnv and spapr machines. They have an interrupt controller, XICS
|
|
|
902636 |
for POWER7/8 and XIVE for POWER9, whose models don't require to track
|
|
|
902636 |
IRQ input states at the CPU level.
|
|
|
902636 |
|
|
|
902636 |
Drop these lines to avoid confusion.
|
|
|
902636 |
|
|
|
902636 |
Signed-off-by: Greg Kurz <groug@kaod.org>
|
|
|
902636 |
Message-Id: <157548862861.3650476.16622818876928044450.stgit@bahia.lan>
|
|
|
902636 |
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
|
|
|
902636 |
(cherry picked from commit c1ad0b892ce20cf2b5e619c79e8a0c4c66b235dc)
|
|
|
902636 |
|
|
|
902636 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1776638
|
|
|
902636 |
|
|
|
902636 |
Signed-off-by: David Gibson <dgibson@redhat.com>
|
|
|
902636 |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
902636 |
---
|
|
|
902636 |
hw/ppc/ppc.c | 16 ++--------------
|
|
|
902636 |
target/ppc/cpu.h | 4 +++-
|
|
|
902636 |
2 files changed, 5 insertions(+), 15 deletions(-)
|
|
|
902636 |
|
|
|
902636 |
diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c
|
|
|
902636 |
index d554b64..730a41f 100644
|
|
|
902636 |
--- a/hw/ppc/ppc.c
|
|
|
902636 |
+++ b/hw/ppc/ppc.c
|
|
|
902636 |
@@ -275,10 +275,9 @@ void ppc970_irq_init(PowerPCCPU *cpu)
|
|
|
902636 |
static void power7_set_irq(void *opaque, int pin, int level)
|
|
|
902636 |
{
|
|
|
902636 |
PowerPCCPU *cpu = opaque;
|
|
|
902636 |
- CPUPPCState *env = &cpu->env;
|
|
|
902636 |
|
|
|
902636 |
LOG_IRQ("%s: env %p pin %d level %d\n", __func__,
|
|
|
902636 |
- env, pin, level);
|
|
|
902636 |
+ &cpu->env, pin, level);
|
|
|
902636 |
|
|
|
902636 |
switch (pin) {
|
|
|
902636 |
case POWER7_INPUT_INT:
|
|
|
902636 |
@@ -292,11 +291,6 @@ static void power7_set_irq(void *opaque, int pin, int level)
|
|
|
902636 |
LOG_IRQ("%s: unknown IRQ pin %d\n", __func__, pin);
|
|
|
902636 |
return;
|
|
|
902636 |
}
|
|
|
902636 |
- if (level) {
|
|
|
902636 |
- env->irq_input_state |= 1 << pin;
|
|
|
902636 |
- } else {
|
|
|
902636 |
- env->irq_input_state &= ~(1 << pin);
|
|
|
902636 |
- }
|
|
|
902636 |
}
|
|
|
902636 |
|
|
|
902636 |
void ppcPOWER7_irq_init(PowerPCCPU *cpu)
|
|
|
902636 |
@@ -311,10 +305,9 @@ void ppcPOWER7_irq_init(PowerPCCPU *cpu)
|
|
|
902636 |
static void power9_set_irq(void *opaque, int pin, int level)
|
|
|
902636 |
{
|
|
|
902636 |
PowerPCCPU *cpu = opaque;
|
|
|
902636 |
- CPUPPCState *env = &cpu->env;
|
|
|
902636 |
|
|
|
902636 |
LOG_IRQ("%s: env %p pin %d level %d\n", __func__,
|
|
|
902636 |
- env, pin, level);
|
|
|
902636 |
+ &cpu->env, pin, level);
|
|
|
902636 |
|
|
|
902636 |
switch (pin) {
|
|
|
902636 |
case POWER9_INPUT_INT:
|
|
|
902636 |
@@ -334,11 +327,6 @@ static void power9_set_irq(void *opaque, int pin, int level)
|
|
|
902636 |
LOG_IRQ("%s: unknown IRQ pin %d\n", __func__, pin);
|
|
|
902636 |
return;
|
|
|
902636 |
}
|
|
|
902636 |
- if (level) {
|
|
|
902636 |
- env->irq_input_state |= 1 << pin;
|
|
|
902636 |
- } else {
|
|
|
902636 |
- env->irq_input_state &= ~(1 << pin);
|
|
|
902636 |
- }
|
|
|
902636 |
}
|
|
|
902636 |
|
|
|
902636 |
void ppcPOWER9_irq_init(PowerPCCPU *cpu)
|
|
|
902636 |
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
|
|
|
902636 |
index 5c53801..8887f76 100644
|
|
|
902636 |
--- a/target/ppc/cpu.h
|
|
|
902636 |
+++ b/target/ppc/cpu.h
|
|
|
902636 |
@@ -1090,7 +1090,9 @@ struct CPUPPCState {
|
|
|
902636 |
#if !defined(CONFIG_USER_ONLY)
|
|
|
902636 |
/*
|
|
|
902636 |
* This is the IRQ controller, which is implementation dependent
|
|
|
902636 |
- * and only relevant when emulating a complete machine.
|
|
|
902636 |
+ * and only relevant when emulating a complete machine. Note that
|
|
|
902636 |
+ * this isn't used by recent Book3s compatible CPUs (POWER7 and
|
|
|
902636 |
+ * newer).
|
|
|
902636 |
*/
|
|
|
902636 |
uint32_t irq_input_state;
|
|
|
902636 |
void **irq_inputs;
|
|
|
902636 |
--
|
|
|
902636 |
1.8.3.1
|
|
|
902636 |
|