[Skiboot] [PATCH v4 02/15] Remove dead POWER7 code
Nicholas Piggin
npiggin at gmail.com
Thu Oct 10 10:49:38 AEDT 2019
Oliver points out that add_xics_icps() must be unused on POWER8
because it asserts if number of threads > 4, so remove it.
And change 16b7ae641 ("Remove POWER7 and POWER7+ support") removed
all references to opal_boot_trampoline, so remove that.
Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
asm/head.S | 10 -------
hdata/paca.c | 80 ----------------------------------------------------
2 files changed, 90 deletions(-)
diff --git a/asm/head.S b/asm/head.S
index 58f9aea97..426b5d5c1 100644
--- a/asm/head.S
+++ b/asm/head.S
@@ -857,16 +857,6 @@ hv_lid_load_table:
.long 0
- /* The FSP seems to ignore our primary/secondary entry
- * points and instead copy that bit down to 0x180 and
- * patch the first instruction to get our expected
- * boot CPU number. We ignore that patching for now and
- * got to the same entry we use for pHyp and FDT HB.
- */
-opal_boot_trampoline:
- li %r27,-1
- ba boot_entry - __head
-
/*
*
* OPAL entry point from operating system
diff --git a/hdata/paca.c b/hdata/paca.c
index 28025b0cd..3e8d89856 100644
--- a/hdata/paca.c
+++ b/hdata/paca.c
@@ -12,8 +12,6 @@
#include "hdata.h"
-#define PACA_MAX_THREADS 4
-
static unsigned int paca_index(const struct HDIF_common_hdr *paca)
{
void *start = get_hdif(&spira.ntuples.paca, PACA_HDIF_SIG);
@@ -121,77 +119,6 @@ static void add_be32_sorted(__be32 arr[], __be32 new, unsigned num)
arr[i] = new;
}
-static void add_xics_icps(void)
-{
- struct dt_node *cpu;
- unsigned int i;
- u64 reg[PACA_MAX_THREADS * 2];
- struct dt_node *icp;
-
- dt_for_each_node(dt_root, cpu) {
- u32 irange[2], size, pir;
- const struct dt_property *intsrv;
- const struct HDIF_common_hdr *paca;
- u64 ibase;
- unsigned int num_threads;
- bool found = false;
-
- if (!dt_has_node_property(cpu, "device_type", "cpu"))
- continue;
-
- intsrv = dt_find_property(cpu, "ibm,ppc-interrupt-server#s");
- if (!intsrv)
- continue;
-
- pir = dt_prop_get_u32(cpu, "ibm,pir");
-
- /* Get ibase address */
- paca = get_hdif(&spira.ntuples.paca, PACA_HDIF_SIG);
- for_each_paca(paca) {
- const struct sppaca_cpu_id *id;
- id = HDIF_get_idata(paca, SPPACA_IDATA_CPU_ID, &size);
-
- if (!CHECK_SPPTR(id))
- continue;
-
- if (pir != be32_to_cpu(id->pir))
- continue;
- ibase = cleanup_addr(be64_to_cpu(id->ibase));
- found = true;
- break;
- }
- if (!found)
- return;
-
- num_threads = intsrv->len / sizeof(u32);
- assert(num_threads <= PACA_MAX_THREADS);
-
- icp = dt_new_addr(dt_root, "interrupt-controller", ibase);
- if (!icp)
- continue;
-
- dt_add_property_strings(icp, "compatible",
- "IBM,ppc-xicp",
- "IBM,power7-xicp");
-
- irange[0] = dt_property_get_cell(intsrv, 0); /* Index */
- irange[1] = num_threads; /* num servers */
- dt_add_property(icp, "ibm,interrupt-server-ranges",
- irange, sizeof(irange));
- dt_add_property(icp, "interrupt-controller", NULL, 0);
- dt_add_property_cells(icp, "#address-cells", 0);
- dt_add_property_string(icp, "device_type",
- "PowerPC-External-Interrupt-Presentation");
- for (i = 0; i < num_threads*2; i += 2) {
- reg[i] = ibase;
- /* One page is enough for a handful of regs. */
- reg[i+1] = 4096;
- ibase += reg[i+1];
- }
- dt_add_property(icp, "reg", reg, sizeof(reg));
- }
-}
-
static bool __paca_parse(void)
{
const struct HDIF_common_hdr *paca;
@@ -311,13 +238,6 @@ static bool __paca_parse(void)
free(new_prop);
}
- /*
- * P7 and P8 use the XICS interrupt controller which has a per-core
- * interrupt controller node.
- */
- if (proc_gen <= proc_gen_p8)
- add_xics_icps();
-
return true;
}
--
2.23.0
More information about the Skiboot
mailing list