aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-07-12hw/xscom: Reset XSCOM engine after querying sleeping core FIRVipin K Parashar1-1/+2
XSCOM engine blocks subsequently after querying FIR of any sleeping core. This causes subsequent XSCOM opertions to hang forever due to XSCOM engine being continuously busy. Reset XSCOM engine after querying FIR of any sleeping core. Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-12external: Add dynamically linked pflashBrad Bishop2-4/+17
Modify the $(EXE) and install target dependencies if LINKAGE=dynamic. The default remains a statically linked pflash binary. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 24ae270984a37525f8393eeccbd0ac55da4503e1) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-12external: Create shared rules.mkBrad Bishop2-5/+5
Building a dynamically linked pflash will need the shared library name. Export it here. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 45e548176e16ad8ba9540fcd75131ba4993e42b7) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-12external: Remove -m64 from shared CFLAGS on ARMBrad Bishop1-1/+4
-m64 isn't an ARM flag. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit e415b3b9bf0441745f442e12bfce25ed49c589bf) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-12external: Fix pflash install targetBrad Bishop1-0/+1
The install target used $(sbindir) which isn't set anywhere. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit e5fc583e610d4360f8fe50f225c868cb3019c1a7) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-12external: Remove external/shared link targetsBrad Bishop1-12/+0
These are already defined just like we need them in common/rules.mk Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 7c7911eb7bea505474c3062bf5b0c60d99b502a5) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-12opal-prd: fix make test dependencies for common symlink generationStewart Smith1-1/+1
Fixes: e42206bf0729782330778e77283af2aca23499dc Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 2ebc0ae0a2c61c006062ba42fc253296060c34cf) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-12Make links target reusableDinar Valeev4-63/+29
Move symlinking target to external/common/rules.mk, so the rule could be reused by gard and opal-prd. Signed-off-by: Dinar Valeev <dvaleev@suse.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit e42206bf0729782330778e77283af2aca23499dc) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-11Fix GCOV_COUNTERS ifdef logic for GCC 6.0Stewart Smith1-1/+1
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-11doc/error-logging : Updates the doc on error loggingMukesh Ojha1-3/+3
Fix include new file location for the error logging interface and the PEL structure and correct typo mistake. Signed-off-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-11fsp-leds: add () around macrosStewart Smith1-2/+2
found by Smatch static analysis (http://smatch.sourceforge.net/): hw/fsp/fsp-leds.c:576 fsp_msg_set_led_state() warn: the 'FSP_LED_EXCL_FAULT' ma\ cro might need parens hw/fsp/fsp-leds.c:583 fsp_msg_set_led_state() warn: the 'FSP_LED_EXCL_IDENTIFY'\ macro might need parens Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-11phb3: fix inconsistent indentingStewart Smith1-2/+2
Found by smatch static analysis (http://smatch.sourceforge.net/): hw/phb3.c:2331 capp_load_ucode() warn: inconsistent indenting hw/phb3.c:3444 phb3_set_capi_mode() warn: inconsistent indenting Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-11slw: fix not indented if conditionStewart Smith1-1/+1
found by Smatch static analysis (http://smatch.sourceforge.net/): hw/slw.c:687 add_cpu_idle_state_properties() warn: if statement not indented Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-11nvram-format: fix inconsistent indentingStewart Smith1-3/+3
Found by smatch static analysis (http://smatch.sourceforge.net/): core/nvram-format.c:146 nvram_check() warn: inconsistent indenting core/nvram-format.c:151 nvram_check() warn: inconsistent indenting Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-11mem_region: fix inconsistent indentingStewart Smith1-3/+3
Found by smatch static analysis (http://smatch.sourceforge.net/): core/mem_region.c:561 mem_check() warn: inconsistent indenting core/mem_region.c:569 mem_check() warn: inconsistent indenting Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-11FSP: Validate fsp_msg response memory allocationVasant Hegde1-1/+7
fsp_allocmsg() returns true even if msg->resp memory allocation fails. Validate msg->resp memory allocation as well. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Reviewed-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-11mambo: Add NULL checks and error messagesCyril Bur1-0/+6
While it extremely unlikely that these paths will ever by triggered the error message could be useful to help diagnose a broken system. This patch also fixes coverity issue 127700 Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-08doc/device-tree/examples/power9-phb4.dts: Enable a couple of extra PHBsStewart Smith1-2/+2
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-08lpc: Example DT update for P9 LPC busBenjamin Herrenschmidt1-0/+36
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-08lpc: Add basic P9 LPC read/write opsBenjamin Herrenschmidt2-25/+108
We still need to review interrupts handling etc... Also update the example device-tree for SIMICS Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-08power9: Add example device tree for phb4Benjamin Herrenschmidt1-0/+156
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-08Add documentation for OPAL_PCI_TCE_KILLStewart Smith1-0/+55
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-08hw/phb4: Add initial supportBenjamin Herrenschmidt9-4/+4188
This adds the base support for the PHB4. It currently only support the M32 window, EEH or in general error recovery aren't supported yet. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [stewart@linux.vnet.ibm.com: update (C) year, fix indenting] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-08pci: When restoring bus numbers after a reset, also restore device cacheBenjamin Herrenschmidt1-1/+7
PCIe devices cache the bus number on the first config write, make sure we restore them when at the same time Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-08pci: get_reserved_pe_number() needs to take the PHB as argumentBenjamin Herrenschmidt4-4/+4
The value might be different for different PHB instances Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-08XIVE: Base XIVE support for OPAL XICS emulation callsBenjamin Herrenschmidt7-6/+2402
This provides basic initialization of the XIVE along with some OPAL calls to emulate an old-style XICS which will initially be used by Linux for backward compatibility. The current implementation is limited to one priority and doesn't expose much to Linux for future exploitation mode yet. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [stewart@linux.vnet.ibm.com: add (C) header, fix whitespace, missing breaks] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-08interrupts: Add eoi() callback in preparation for XIVE supportBenjamin Herrenschmidt2-4/+60
This will be used by the XICS emulation in order to EOI the sources themselves. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-06Cleanup xscom_read_cfam_chipid to make p8/p9 difference clearerBenjamin Herrenschmidt1-1/+2
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> [stewart@linux.vnet.ibm.com: split from timebase quirk patch] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-06Timebase quirk for slow simulators like AWAN and SIMICSBenjamin Herrenschmidt7-3/+27
This will internally pretend the timebase is running 1000 times slower, which reduces some otherwise really terrible delays in some simulators. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> [stewart@linux.vnet.ibm.com: move cfam_chipid cleanup into own patch] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-06devicetree: Add dt_node_is_enabled()Benjamin Herrenschmidt2-0/+12
This accessor tests the "status" property allowing us to represent disabled devices in the device-tree. It will be used by PHB4 initially but its usage could be made more widespread. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-06uart: Cleanup initialization and remove simulator hackBenjamin Herrenschmidt8-106/+85
Add more generic support for MMIO based UARTs, simplify code, use common initialization, and clean up the device-tree representation as well. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-06xscom: A few P9 updatesBenjamin Herrenschmidt1-10/+23
More to go, especially we need to review recovery, but at least this enables indirect and errors out on not-yet-supported EX targeting. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-06Add "ffs" inline functionBenjamin Herrenschmidt1-0/+5
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-06bitutils: Add PPC_BITMASK8Benjamin Herrenschmidt1-0/+1
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-06chip: Add more P9 accessors for converting to/from PIRBenjamin Herrenschmidt1-1/+9
To access a local CPU number within a chip essentially, will be used by XIVE Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-06POWER9: Add XSCOM related definitionsBenjamin Herrenschmidt2-2/+43
Macros for EP/EX/EC accesses and some register definitions Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-06POWER9: Fix P9 chip name in XSCOMBenjamin Herrenschmidt1-1/+1
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-06POWER9: Make xscom_addr() work for p8 and p9Michael Neuling1-3/+5
Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-06doc/OPAL_INT_EOI: document positive return valueStewart Smith1-0/+5
From benh suggestion in id:1467792521.13965.118.camel@kernel.crashing.org Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-06Reserve OPAL API numbers for XICS emulation for XIVEStewart Smith5-1/+66
Additionally, we put in some skeleton docs for what's coming, key points being that this is for P9 and above, relies on a device being present in the device tree and is modelled on the PAPR calls. Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-06Revert "flash: Use blocklevel to do ECC reads"Stewart Smith1-2/+2
Was causing boot failures on Garrison and Firestone (likely other OpenPower platforms) This reverts commit 74ba83462c64d6a987ed4785aee55309daf9ffb6. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-05chip: Add simics specific quirksMichael Neuling1-1/+2
Use that instead of mambo. Simics supports the F000F, so remove that quirk. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-05mambo: Run at fastest speed.Michael Neuling1-2/+2
Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-05mambo: Flash driver using bogus diskMichael Neuling1-0/+159
Implement a flash driver using mambo bogus disk. Works as a system flash (ie palmetto.pnor) or with disk images (via Linux mtdblock). Linux MTD needs this patch to perform at a resonable speed: https://lists.ozlabs.org/pipermail/linuxppc-dev/2016-July/145202.html Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-05flash: Use blocklevel to do ECC readsAlistair Popple1-2/+2
flash_read_corrected() assumes the passed blocklevel device is an actual flash device. However the blocklevel flash abstraction supports automatically reading ECC protected data so use that instead. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Michael Neuling <mikey@neuling.org> Reviewed-by: Cyril Bur <cyrilbur@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-05flash: Increase the maximum number of flash devicesMichael Neuling1-1/+1
Increase the max number of flash devices from 1 to 8. With mambo bogusdisk, we can have many flash devices. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-05PHB3: Disable UTL outbound discard error interruptGavin Shan1-1/+1
The UTL outbound discard error (bit#12) in UTL_PCIE_PORT_IRQ_EN (offset: 0x558) isn't set in initial setup. It's set wrongly after a reset on root port. With this bit set, frozen (all) error was observed on the PHB to which a LPFC adapter is connected directly. This removes the bit in reset handler to avoid the unexpected frozen (all) error. BZ: 142877 Reported-by: Pridhiviraj Paidipeddi <ppaidipe@in.ibm.com> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-05libflash: Add sanity checks to ffs init code.Cyril Bur1-0/+22
Quite a lot of code relies on values read from flash. These values shouldn't be totally trusted without at least basic sanity checks. Fixes coverity bug: 119719 Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-05hw/lpc: LPC driver use prlog rather than printfVipin K Parashar1-22/+25
Use pr_fmt macro for LPC driver log messages, changed printfs to use prlog. Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: just take pr_fmt part] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-05Merge branch 'skiboot-5.2.x'Stewart Smith0-0/+0