From 14789694cd1ba57b1d548451b8b7630e888d679f Mon Sep 17 00:00:00 2001 From: David Gibson Date: Mon, 23 Sep 2019 15:19:28 +1000 Subject: spapr: Eliminate SpaprIrq:get_nodename method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This method is used to determine the name of the irq backend's node in the device tree, so that we can find its phandle (after SLOF may have modified it from the phandle we initially gave it). But, in the two cases the only difference between the node name is the presence of a unit address. Searching for a node name without considering unit address is standard practice for the device tree, and fdt_subnode_offset() will do exactly that, making this method unecessary. While we're there, remove the XICS_NODENAME define. The name "interrupt-controller" is required by PAPR (and IEEE1275), and a bunch of places assume it already. Signed-off-by: David Gibson Reviewed-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Greg Kurz --- include/hw/ppc/spapr_irq.h | 1 - include/hw/ppc/xics_spapr.h | 2 -- 2 files changed, 3 deletions(-) (limited to 'include') diff --git a/include/hw/ppc/spapr_irq.h b/include/hw/ppc/spapr_irq.h index a4e790e..9b60378 100644 --- a/include/hw/ppc/spapr_irq.h +++ b/include/hw/ppc/spapr_irq.h @@ -52,7 +52,6 @@ typedef struct SpaprIrq { int (*post_load)(SpaprMachineState *spapr, int version_id); void (*reset)(SpaprMachineState *spapr, Error **errp); void (*set_irq)(void *opaque, int srcno, int val); - const char *(*get_nodename)(SpaprMachineState *spapr); void (*init_kvm)(SpaprMachineState *spapr, Error **errp); } SpaprIrq; diff --git a/include/hw/ppc/xics_spapr.h b/include/hw/ppc/xics_spapr.h index 691a6d0..0b35e85 100644 --- a/include/hw/ppc/xics_spapr.h +++ b/include/hw/ppc/xics_spapr.h @@ -29,8 +29,6 @@ #include "hw/ppc/spapr.h" -#define XICS_NODENAME "interrupt-controller" - #define TYPE_ICS_SPAPR "ics-spapr" #define ICS_SPAPR(obj) OBJECT_CHECK(ICSState, (obj), TYPE_ICS_SPAPR) -- cgit v1.1