diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2019-11-11 15:44:48 +1000 |
---|---|---|
committer | Oliver O'Halloran <oohall@gmail.com> | 2019-11-11 18:35:00 +1100 |
commit | 3fbfb0e351cdeb9279aa2857046ecf0823b787dc (patch) | |
tree | eb1564eaf99f4dbb1d21c6be55e813d3eafa0d83 /hw/fsp | |
parent | bb445088d0dd11c2a1b749792e49ccdb1d6f6c33 (diff) | |
download | skiboot-3fbfb0e351cdeb9279aa2857046ecf0823b787dc.zip skiboot-3fbfb0e351cdeb9279aa2857046ecf0823b787dc.tar.gz skiboot-3fbfb0e351cdeb9279aa2857046ecf0823b787dc.tar.bz2 |
Remove dead POWER7 code
There are a number of proc_gen branches removed that are trivially
dead code and comments that refer to P7. As well as those:
- Oliver points out that add_xics_icps() must be unused on POWER8
because it asserts if number of threads > 4, so remove it.
- Change 16b7ae641 ("Remove POWER7 and POWER7+ support") removed all
references to opal_boot_trampoline, so remove that.
- It also removed the only non-trival choose_bus implementation, so
that is removed and its caller simplified.
- Remove the paca code, later CPUs use pcia.
Cc: Stewart Smith <stewart@flamingspork.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'hw/fsp')
-rw-r--r-- | hw/fsp/fsp-console.c | 58 | ||||
-rw-r--r-- | hw/fsp/fsp-occ.c | 4 | ||||
-rw-r--r-- | hw/fsp/fsp-sysdump.c | 19 | ||||
-rw-r--r-- | hw/fsp/fsp.c | 5 |
4 files changed, 19 insertions, 67 deletions
diff --git a/hw/fsp/fsp-console.c b/hw/fsp/fsp-console.c index 42fb988..1a2ecab 100644 --- a/hw/fsp/fsp-console.c +++ b/hw/fsp/fsp-console.c @@ -1015,53 +1015,31 @@ void fsp_console_add_nodes(void) void fsp_console_select_stdout(void) { bool use_serial = false; + int rc; + u8 param; if (!fsp_present()) return; - /* On P8, we have a sysparam ! yay ! */ - if (proc_gen >= proc_gen_p8) { - int rc; - u8 param; - - rc = fsp_get_sys_param(SYS_PARAM_CONSOLE_SELECT, - ¶m, 1, NULL, NULL); - if (rc != 1) - prerror("FSPCON: Failed to get console" - " sysparam rc %d\n", rc); - else { - switch(param) { - case 0: - use_serial = false; - break; - case 1: - use_serial = true; - break; - default: - prerror("FSPCON: Unknown console" - " sysparam %d\n", param); - } - } + rc = fsp_get_sys_param(SYS_PARAM_CONSOLE_SELECT, + ¶m, 1, NULL, NULL); + if (rc != 1) { + prerror("FSPCON: Failed to get console" + " sysparam rc %d\n", rc); } else { - struct dt_node *iplp; - u32 ipl_mode = 0; - - /* - * We hijack the "os-ipl-mode" setting in iplparams to select - * out output console. This is the "i5/OS partition mode boot" - * setting in ASMI converted to an integer: 0=A, 1=B. - */ - iplp = dt_find_by_path(dt_root, "ipl-params/ipl-params"); - if (iplp) { - ipl_mode = dt_prop_get_u32_def(iplp, "os-ipl-mode", 0); - use_serial = ipl_mode > 0; - - /* - * Now, if ipl_mode is > 0, we use serial port A else - * we use IPMI/SOL/DVS - */ + switch(param) { + case 0: + use_serial = false; + break; + case 1: + use_serial = true; + break; + default: + prerror("FSPCON: Unknown console" + " sysparam %d\n", param); } } + dt_check_del_prop(dt_chosen, "linux,stdout-path"); if (fsp_serials[1].open && use_serial) { diff --git a/hw/fsp/fsp-occ.c b/hw/fsp/fsp-occ.c index d48c28f..8164129 100644 --- a/hw/fsp/fsp-occ.c +++ b/hw/fsp/fsp-occ.c @@ -410,10 +410,6 @@ static struct fsp_client fsp_occ_client = { void occ_fsp_init(void) { - /* OCC is supported in P8 and P9 */ - if (proc_gen < proc_gen_p8) - return; - /* If we have an FSP, register for notifications */ if (fsp_present()) fsp_register_client(&fsp_occ_client, FSP_MCLASS_OCC); diff --git a/hw/fsp/fsp-sysdump.c b/hw/fsp/fsp-sysdump.c index cf4af34..fd915f4 100644 --- a/hw/fsp/fsp-sysdump.c +++ b/hw/fsp/fsp-sysdump.c @@ -64,12 +64,6 @@ static int max_dump_size = MIN(MAX_SAPPHIRE_DUMP_SIZE, PSI_DMA_HYP_DUMP_SIZE); /* Protect MDST table entries */ static struct lock mdst_lock = LOCK_UNLOCKED; -/* Not supported on P7 */ -static inline bool fsp_mdst_supported(void) -{ - return proc_gen >= proc_gen_p8; -} - static inline uint32_t get_dump_region_map_size(uint64_t addr, uint32_t size) { uint64_t start, end; @@ -280,11 +274,6 @@ static int64_t fsp_opal_register_dump_region(uint32_t id, if (!fsp_present()) return OPAL_UNSUPPORTED; - if (!fsp_mdst_supported()) { - printf("MDST: Not supported\n"); - return OPAL_UNSUPPORTED; - } - /* Validate memory region id */ if (id < DUMP_REGION_HOST_START || id > DUMP_REGION_HOST_END) { log_simple_error(&e_info(OPAL_RC_DUMP_MDST_ADD), @@ -315,11 +304,6 @@ static int64_t fsp_opal_unregister_dump_region(uint32_t id) if (!fsp_present()) return OPAL_UNSUPPORTED; - if (!fsp_mdst_supported()) { - printf("MDST: Not supported\n"); - return OPAL_UNSUPPORTED; - } - /* Validate memory region id */ if (id < DUMP_REGION_HOST_START || id > DUMP_REGION_HOST_END) { log_simple_error(&e_info(OPAL_RC_DUMP_MDST_REMOVE), @@ -407,9 +391,6 @@ void fsp_mdst_table_init(void) opal_register(OPAL_UNREGISTER_DUMP_REGION, fsp_opal_unregister_dump_region, 1); - if (!fsp_mdst_supported()) - return; - /* Initiate MDST */ if (mdst_table_init() != OPAL_SUCCESS) return; diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c index 6fa6534..f368998 100644 --- a/hw/fsp/fsp.c +++ b/hw/fsp/fsp.c @@ -1844,10 +1844,7 @@ static void fsp_init_tce_table(void) { fsp_tce_table = (u64 *)PSI_TCE_TABLE_BASE; - /* Memset the larger table even if we only use the smaller - * one on P7 - */ - memset(fsp_tce_table, 0, PSI_TCE_TABLE_SIZE_P8); + memset(fsp_tce_table, 0, PSI_TCE_TABLE_SIZE); } void fsp_tce_map(u32 offset, void *addr, u32 size) |