linux/arch/powerpc/platforms/powernv
Michael Ellerman a70b487b07 powerpc/powernv: Fix boot on Power8 bare metal due to opal_configure_cores()
In commit 1c0eaf0f56 ("powerpc/powernv: Tell OPAL about our MMU mode
on POWER9"), we added additional flags to the OPAL call to configure
CPUs at boot.

These flags only work on Power9 firmwares, and worse can cause boot
failures on Power8 machines, so we check for CPU_FTR_ARCH_300 (aka POWER9)
before adding the extra flags.

Unfortunately we forgot that opal_configure_cores() is called before
the CPU feature checks are dynamically patched, meaning the check
always returns true.

We definitely need to do something to make the CPU feature checks less
prone to bugs like this, but for now the minimal fix is to use
early_cpu_has_feature().

Reported-and-tested-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
Fixes: 1c0eaf0f56 ("powerpc/powernv: Tell OPAL about our MMU mode on POWER9")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-07-17 21:30:32 +10:00
..
eeh-powernv.c powerpc/powernv/pci: Dynamically allocate PHB diag data 2017-06-27 12:14:27 +10:00
idle.c powerpc/64s/idle: Run latch switch is done with MSR[EE]=0 2017-06-19 19:46:30 +10:00
Kconfig powerpc/powernv: Always enable SMP when building powernv 2017-04-13 23:37:17 +10:00
Makefile powerpc/powernv: Split cxl code out into a separate file 2016-07-14 20:26:31 +10:00
npu-dma.c powerpc/powernv/npu-dma: Add explicit flush when sending an ATSD 2017-06-22 21:21:08 +10:00
opal-async.c powerpc/opal: Wake up kopald polling thread before waiting for events 2016-07-08 19:53:26 +10:00
opal-dump.c powerpc/powernv : Drop reference added by kset_find_obj() 2016-08-29 12:48:21 +10:00
opal-elog.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
opal-flash.c powerpc/powernv: Add interfaces for flash device access 2015-04-11 20:49:21 +10:00
opal-hmi.c powerpc/powernv: Display the correct error info for CAPP errors. 2017-02-09 10:31:36 +11:00
opal-irqchip.c powerpc/opal-irqchip: Use interrupt names if present 2017-02-09 10:31:37 +11:00
opal-kmsg.c powerpc/powernv: Fix OPAL_CONSOLE_FLUSH prototype and usages 2016-01-13 12:35:17 +11:00
opal-lpc.c powerpc: Create asm/debugfs.h and move powerpc_debugfs_root there 2017-04-11 07:46:03 +10:00
opal-memory-errors.c powerpc/powernv: Fix spelling mistake "Retrived" -> "Retrieved" 2016-06-28 13:52:18 +10:00
opal-msglog.c powerpc/powernv: Report size of OPAL memcons log 2017-01-25 13:33:55 +11:00
opal-nvram.c powerpc/powernv: Add pstore support on powernv 2015-03-23 14:06:10 +11:00
opal-power.c powerpc/powernv: Add poweroff (EPOW, DPO) events support for PowerNV platform 2015-07-16 13:34:36 +10:00
opal-prd.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
opal-rtc.c powerpc/powernv: Only delay opal_rtc_read() retry when necessary 2015-12-27 19:12:40 +11:00
opal-sensor.c powerpc/powernv: Handle OPAL_WRONG_STATE in opal_get_sensor_data() 2017-03-31 15:22:56 +11:00
opal-sysparam.c powerpc/opal: Add inline function to get rc from an ASYNC_COMP opal_msg 2016-06-29 17:33:18 +10:00
opal-tracepoints.c tracing: Have the reg function allow to fail 2016-12-09 09:13:30 -05:00
opal-wrappers.S powerpc/64s: Fix OPAL_CALL non-maskable interrupt reentrancy 2017-05-30 14:59:51 +10:00
opal-xscom.c powerpc/powernv: Fix XSCOM address mangling for form 1 indirect 2017-03-28 10:52:03 +11:00
opal.c powerpc/powernv: Fix boot on Power8 bare metal due to opal_configure_cores() 2017-07-17 21:30:32 +10:00
pci-cxl.c powerpc: Remove all usages of NO_IRQ 2016-09-20 20:57:12 +10:00
pci-ioda.c powerpc/powernv/pci: Enable 64-bit devices to access >4GB DMA space 2017-06-27 12:14:28 +10:00
pci.c powerpc/powernv/pci: Add support for PHB4 diagnostics 2017-06-27 12:14:27 +10:00
pci.h powerpc/powernv/pci: Dynamically allocate PHB diag data 2017-06-27 12:14:27 +10:00
powernv.h powerpc/powernv: Move CPU-Offline idle state invocation from smp.c to idle.c 2017-04-11 08:45:09 +10:00
rng.c powerpc: Consolidate variants of real-mode MMIOs 2017-04-10 21:43:16 +10:00
setup.c powerpc/powernv: Tell OPAL about our MMU mode on POWER9 2017-07-10 21:12:27 +10:00
smp.c powerpc/smp: Convert NR_CPUS to nr_cpu_ids 2017-06-28 13:08:16 +10:00
subcore-asm.S powerpc/powernv: Add support for POWER8 split core on powernv 2014-05-28 13:35:37 +10:00
subcore.c powerpc updates for 4.13 2017-07-07 13:55:45 -07:00
subcore.h powernv/powerpc: Add winkle support for offline cpus 2014-12-15 10:46:41 +11:00