Merge tag 'powerpc-4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Michael Ellerman: "Core: - Ground work for the new Power9 MMU from Aneesh Kumar K.V - Optimise FP/VMX/VSX context switching from Anton Blanchard Misc: - Various cleanups from Krzysztof Kozlowski, John Ogness, Rashmica Gupta, Russell Currey, Gavin Shan, Daniel Axtens, Michael Neuling, Andrew Donnellan - Allow wrapper to work on non-english system from Laurent Vivier - Add rN aliases to the pt_regs_offset table from Rashmica Gupta - Fix module autoload for rackmeter & axonram drivers from Luis de Bethencourt - Include KVM guest test in all interrupt vectors from Paul Mackerras - Fix DSCR inheritance over fork() from Anton Blanchard - Make value-returning atomics & {cmp}xchg* & their atomic_ versions fully ordered from Boqun Feng - Print MSR TM bits in oops messages from Michael Neuling - Add TM signal return & invalid stack selftests from Michael Neuling - Limit EPOW reset event warnings from Vipin K Parashar - Remove the Cell QPACE code from Rashmica Gupta - Append linux_banner to exception information in xmon from Rashmica Gupta - Add selftest to check if VSRs are corrupted from Rashmica Gupta - Remove broken GregorianDay() from Daniel Axtens - Import Anton's context_switch2 benchmark into selftests from Michael Ellerman - Add selftest script to test HMI functionality from Daniel Axtens - Remove obsolete OPAL v2 support from Stewart Smith - Make enter_rtas() private from Michael Ellerman - PPR exception cleanups from Michael Ellerman - Add page soft dirty tracking from Laurent Dufour - Add support for Nvlink NPUs from Alistair Popple - Add support for kexec on 476fpe from Alistair Popple - Enable kernel CPU dlpar from sysfs from Nathan Fontenot - Copy only required pieces of the mm_context_t to the paca from Michael Neuling - Add a kmsg_dumper that flushes OPAL console output on panic from Russell Currey - Implement save_stack_trace_regs() to enable kprobe stack tracing from Steven Rostedt - Add HWCAP bits for Power9 from Michael Ellerman - Fix _PAGE_PTE breaking swapoff from Aneesh Kumar K.V - Fix _PAGE_SWP_SOFT_DIRTY breaking swapoff from Hugh Dickins - scripts/recordmcount.pl: support data in text section on powerpc from Ulrich Weigand - Handle R_PPC64_ENTRY relocations in modules from Ulrich Weigand cxl: - cxl: Fix possible idr warning when contexts are released from Vaibhav Jain - cxl: use correct operator when writing pcie config space values from Andrew Donnellan - cxl: Fix DSI misses when the context owning task exits from Vaibhav Jain - cxl: fix build for GCC 4.6.x from Brian Norris - cxl: use -Werror only with CONFIG_PPC_WERROR from Brian Norris - cxl: Enable PCI device ID for future IBM CXL adapter from Uma Krishnan Freescale: - Freescale updates from Scott: Highlights include moving QE code out of arch/powerpc (to be shared with arm), device tree updates, and minor fixes" * tag 'powerpc-4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (149 commits) powerpc/module: Handle R_PPC64_ENTRY relocations scripts/recordmcount.pl: support data in text section on powerpc powerpc/powernv: Fix OPAL_CONSOLE_FLUSH prototype and usages powerpc/mm: fix _PAGE_SWP_SOFT_DIRTY breaking swapoff powerpc/mm: Fix _PAGE_PTE breaking swapoff cxl: Enable PCI device ID for future IBM CXL adapter cxl: use -Werror only with CONFIG_PPC_WERROR cxl: fix build for GCC 4.6.x powerpc: Add HWCAP bits for Power9 powerpc/powernv: Reserve PE#0 on NPU powerpc/powernv: Change NPU PE# assignment powerpc/powernv: Fix update of NVLink DMA mask powerpc/powernv: Remove misleading comment in pci.c powerpc: Implement save_stack_trace_regs() to enable kprobe stack tracing powerpc: Fix build break due to paca mm_context_t changes cxl: Fix DSI misses when the context owning task exits MAINTAINERS: Update Scott Wood's e-mail address powerpc/powernv: Fix minor off-by-one error in opal_mce_check_early_recovery() powerpc: Fix style of self-test config prompts powerpc/powernv: Only delay opal_rtc_read() retry when necessary ...
This commit is contained in:
@@ -98,16 +98,11 @@ int __init early_init_dt_scan_opal(unsigned long node,
|
||||
pr_debug("OPAL Entry = 0x%llx (sizep=%p runtimesz=%d)\n",
|
||||
opal.size, sizep, runtimesz);
|
||||
|
||||
powerpc_firmware_features |= FW_FEATURE_OPAL;
|
||||
if (of_flat_dt_is_compatible(node, "ibm,opal-v3")) {
|
||||
powerpc_firmware_features |= FW_FEATURE_OPALv2;
|
||||
powerpc_firmware_features |= FW_FEATURE_OPALv3;
|
||||
pr_info("OPAL V3 detected !\n");
|
||||
} else if (of_flat_dt_is_compatible(node, "ibm,opal-v2")) {
|
||||
powerpc_firmware_features |= FW_FEATURE_OPALv2;
|
||||
pr_info("OPAL V2 detected !\n");
|
||||
powerpc_firmware_features |= FW_FEATURE_OPAL;
|
||||
pr_info("OPAL detected !\n");
|
||||
} else {
|
||||
pr_info("OPAL V1 detected !\n");
|
||||
panic("OPAL != V3 detected, no longer supported.\n");
|
||||
}
|
||||
|
||||
/* Reinit all cores with the right endian */
|
||||
@@ -352,17 +347,15 @@ int opal_put_chars(uint32_t vtermno, const char *data, int total_len)
|
||||
* enough room and be done with it
|
||||
*/
|
||||
spin_lock_irqsave(&opal_write_lock, flags);
|
||||
if (firmware_has_feature(FW_FEATURE_OPALv2)) {
|
||||
rc = opal_console_write_buffer_space(vtermno, &olen);
|
||||
len = be64_to_cpu(olen);
|
||||
if (rc || len < total_len) {
|
||||
spin_unlock_irqrestore(&opal_write_lock, flags);
|
||||
/* Closed -> drop characters */
|
||||
if (rc)
|
||||
return total_len;
|
||||
opal_poll_events(NULL);
|
||||
return -EAGAIN;
|
||||
}
|
||||
rc = opal_console_write_buffer_space(vtermno, &olen);
|
||||
len = be64_to_cpu(olen);
|
||||
if (rc || len < total_len) {
|
||||
spin_unlock_irqrestore(&opal_write_lock, flags);
|
||||
/* Closed -> drop characters */
|
||||
if (rc)
|
||||
return total_len;
|
||||
opal_poll_events(NULL);
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
/* We still try to handle partial completions, though they
|
||||
@@ -555,7 +548,7 @@ bool opal_mce_check_early_recovery(struct pt_regs *regs)
|
||||
goto out;
|
||||
|
||||
if ((regs->nip >= opal.base) &&
|
||||
(regs->nip <= (opal.base + opal.size)))
|
||||
(regs->nip < (opal.base + opal.size)))
|
||||
recover_addr = find_recovery_address(regs->nip);
|
||||
|
||||
/*
|
||||
@@ -696,10 +689,7 @@ static int __init opal_init(void)
|
||||
}
|
||||
|
||||
/* Register OPAL consoles if any ports */
|
||||
if (firmware_has_feature(FW_FEATURE_OPALv2))
|
||||
consoles = of_find_node_by_path("/ibm,opal/consoles");
|
||||
else
|
||||
consoles = of_node_get(opal_node);
|
||||
consoles = of_find_node_by_path("/ibm,opal/consoles");
|
||||
if (consoles) {
|
||||
for_each_child_of_node(consoles, np) {
|
||||
if (strcmp(np->name, "serial"))
|
||||
@@ -758,6 +748,9 @@ static int __init opal_init(void)
|
||||
opal_pdev_init(opal_node, "ibm,opal-flash");
|
||||
opal_pdev_init(opal_node, "ibm,opal-prd");
|
||||
|
||||
/* Initialise OPAL kmsg dumper for flushing console on panic */
|
||||
opal_kmsg_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
machine_subsys_initcall(powernv, opal_init);
|
||||
|
Reference in New Issue
Block a user