aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-07-21Merge branch 'skiboot-5.1.x' into skiboot-5.2.x (release notes)Stewart Smith1-0/+19
2016-07-21Merge skiboot-5.1.x into skiboot-5.2.xStewart Smith0-0/+0
2016-07-21Add skiboot-5.1.17 release notesskiboot-5.1.17Stewart Smith1-0/+19
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-21hw/xscom: Reset XSCOM engine after querying sleeping core FIRVipin K Parashar1-2/+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> (cherry picked from commit 15cec493804ff14e6246eb1b65e9d0c7cb469a81) Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-21hw/xscom: Reset XSCOM engine after finite number of retries when busyVipin K Parashar3-17/+64
OPAL retries XSCOM read/write operations forever till it succeeds. This can cause XSCOM ops to hang forever when XSCOM engine remains busy for some reason. Changed it to retry XSCOM operations only XSCOM_BUSY_MAX_RETRIES number of times instead of retrying forever. Also added logic to reset XSCOM engine after XSCOM_BUSY_RESET_THRESHOLD number of retries to unblock it when it remains busy. Cc: stable # 9c2d82394fd2 ("xscom: Return OPAL_WRONG_STATE on XSCOM ops..") 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> (cherry picked from commit e761222593a1ae932cddbc81239b6a7cd98ddb70) Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-21xscom: Return OPAL_WRONG_STATE on XSCOM ops if CPU is asleepRussell Currey2-11/+23
xscom_read and xscom_write return OPAL_SUCCESS if they worked, and OPAL_HARDWARE if they didn't. This doesn't provide information about why the operation failed, such as if the CPU happens to be asleep. This is specifically useful in error scanning, so if every CPU is being scanned for errors, sleeping CPUs likely aren't the cause of failures. So, return OPAL_WRONG_STATE in xscom_read and xscom_write if the CPU is sleeping. Signed-off-by: Russell Currey <ruscur@russell.cc> Reviewed-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 9c2d82394fd2303847cac4a665dee62556ca528a) Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-20mambo: Fix bt command and add little endian supportMichael Neuling1-8/+32
This fixes the bt (back trace) command which had bit rot. It also adds little endian support. Format looks like this: systemsim % bt pc: 0x000000003007F270 lr: 0x000000003007EFAC stack:0x0000000031C03B60 0x0000000031C03BF0 stack:0x0000000031C03C00 0x0000000030022F44 stack:0x0000000031C03C90 0x0000000030023000 stack:0x0000000031C03D20 0x0000000030039540 stack:0x0000000031C03E30 0x00000000300145BC stack:0x0000000031C03F00 0x000000003000259C Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-20Document changes to how firmware versions are passed to host on P9Stewart Smith2-1/+4
We won't do mi-version/ml-version, but we will always have version. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-20device-tree: Only advertise ibm, opal-v3 (not v2) on POWER9 and aboveStewart Smith3-3/+13
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-20Stop adding legacy linux, phandle to device tree, just add phandleStewart Smith1-5/+0
Since the very first commit of a skeleton powernv platform in Linux, the kernel has been able to deal with phandle rather than linux,phandle. Thus, every kernel in the real world that has a hope of even getting to a twinkle in the eye of booting knows about phandle. So, we don't need to add linux,phandle along with phandle as it's just redundantly redundant. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-20occ: add missing packed attribute to occ_pstate_entryStewart Smith1-1/+1
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-20flash: Allocate flashes dynamicallyMichael Neuling1-34/+35
Convert flashes from a static array which wastes memory and limits us. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-20hw/npu: assert() on PHB device nodeGavin Shan1-11/+1
This uses assert() to assure the PHB device node is created successfully as we never hit the failing case as I image, to simplify the code. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-20hw/npu: Get AT BAR from MMIO layoutGavin Shan1-18/+6
The DL/PL/AT BARs are assigned according to predetermined MMIO layout by assign_mmio_bars() when probing NPU device node in npu_probe_phb(). The AT BAR is covered by NPU LINK#1's second BAR. assign_mmio_bars() updates the AT BAR register with the predetermined values (base/size) and then npu_probe_phb() gets same informatin from the register, which is unecessary. This passes @at_bar[] to assign_mmio_bars[] where @at_bar[] are filled, so that assign_mmio_bars() can use it directly without getting it from AT BAR register. As a result, the code looks a bit simplified. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-20hw/npu: Get number of links from NPU node propertyGavin Shan1-4/+2
The NPU device node property "ibm,npu-links" indicates number of NPU links supported. This retrieves the number of links from the properties instead of counting its child device nodes. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-20nvlink: Associate and allocate NPUs using slotsRussell Currey5-77/+62
Allocating BDFNs to NPU devices and associating NPU devices with PCI devices of GPUs both rely on comparing PBCQ handles. This will fail if a system has multiple sets of GPUs behind a single PHB. Rework this to instead use slot locations. The following changes are introduced: - Groups of NPU links that connect to the same GPU are presented in the slot table entries as st_npu_slot, using ST_LOC_NPU_GROUP - NPU links are created with the ibm,npu-group-id property replacing the ibm,pbcq property, which is used in BDFN allocation and GPU association - Slot comparison is handled slightly differently for NPU devices as the function of the BDFN is ignored, since the device number represents the physical GPU the link is connected to - BDFN allocation for NPU devices is now derived from the groups in the slot table. For Garrison, the same BDFNs are generated as before. - Association with GPU PCI devices is performed by comparing the slot label. This means for future machines with NPUs that slot labels are compulsory to have NVLink functionality working. Signed-off-by: Russell Currey <ruscur@russell.cc> Reviewed-By: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-20doc/opal-api: Document OPAL_PCI_GET_PHB_DIAG_DATA2Russell Currey1-0/+24
Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-19platforms/ibm-fsp: Avoid associating PHB slot with platform slotGavin Shan2-18/+0
We shouldn't have a hotpluggable slot behind PHB as the root port cannot be plugged. This removes the association between PHB slot and platform specific slot. Otherwise, we will run into strange situation: there are two slots behind PHB and root port separately, but both of them are dereferencing same platform specific slot. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-19platforms/ibm-fsp: Reuse PCI slot mechanism for fixupGavin Shan1-121/+107
Currently, we have separately I2C stubs used for PCI slot power management and fixup. It's reasonable to merge them to one so that the code looks unified. Also, this introduces a table tracking PCI slot fixup info which is very easy to be extended in future. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-19Allow mtspr/mfspr to compile indepedantly of the optimization levelBalbir Singh1-2/+4
The compiler expects to see a constant value in the asm operations involving spr's. When compiling with -O0, spr is treated as a variable on stack when inline (this can be seen from the RTL). We do two things to fix the issue, we mark the functions as always_inline and we pass spr as a const so that the value is propagated as constants to the inline asm statement Tested with -O0 Signed-off-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-18doc: add OPAL_SYNC_HOST_REBOOT documentationStewart Smith1-0/+15
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-18Use mktemp rather than the deprecated tempfileStewart Smith3-3/+3
Fixes: 2ceb8b8c0ac53a9014e83d12e1c758d5f9e07fe6 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-18libc: Remove NULL check for format argument in snprintf()Cyril Bur1-1/+1
libc printf style functions are annotated with __attribute__((format (printf, x, y))) which causes GCC to perform compile time checks against these arguments. As of at least gcc 6.1.1 [(GCC) 6.1.1 20160602] this causes an error running make check. GCC appears to be guaranteeing that the format argument won't be NULL and complaining about explicit checks. In file included from core/test/run-console-log-buf-overrun.c:48:0: core/test/run-console-log-buf-overrun.c: In function ‘snprintf’: core/test/../../libc/stdio/snprintf.c:21:19: error: nonnull argument ‘format’compared to NULL [-Werror=nonnull-compare] if ((buff==NULL) || (format==NULL)) ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make: *** [core/test/Makefile.check:59:core/test/run-console-log-buf-overrun] Error 1 Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-18make check: Use mktemp instead of tempfileVasant Hegde1-1/+1
Commit 2ceb8b8c (make check: make test runs less noisy) used tempfile command to create temporary files. Looks like distros like Fedora doesn't have tempfile command. Looks like mktemp is supported on all distros (at least Fedora and Ubuntu supports this command). Hence replace tempfile with mktemp. Output without patch: [ CLEANUP ] gard-test-clean ./test/run.sh: line 3: tempfile: command not found skiboot/external/gard/test/Makefile.check:18: recipe for target 'gard-test-clean' failed make: *** [gard-test-clean] Error 1 Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Reported-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-15Merge branch 'skiboot-5.2.x'Stewart Smith1-2/+2
2016-07-15SEL: Fix eSEL ID while logging eSEL eventVasant Hegde1-2/+2
Commit 127a7dac added eSEL ID to SEL event in reverse order (0700 instead of 0007). This code fixes this issue by adding ID in proper order. Sample SEL event output without this patch: Event Data (RAW) : 050700 Sample SEL event output with this patch: Event Data (RAW) : 050005 Fixes: 127a7dac (IPMI: Add SEL event with eSEL record ID) Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-15Merge branch 'skiboot-5.2.x'Stewart Smith0-0/+0
2016-07-15fsp/console: Ignore data on unresponsive consolesSam Mendoza-Jonas1-2/+16
Linux kernels from v4.1 onwards will try to request an irq for each hvc console using OPAL_EVENT_CONSOLE_INPUT, however because the IRQF_SHARED flag is not set any console after the first will fail. If there is data on one of these failed consoles OPAL will set OPAL_EVENT_CONSOLE_INPUT every time fsp_console_read is called, leading to RCU stalls in the kernel. As a workaround for unpatched kernels, cease setting OPAL_EVENT_CONSOLE_INPUT for consoles that we have noticed are not being read. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit fd6b71fcc6912611ce81f455b4805f0531699d5e) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-15fsp/console: Ignore data on unresponsive consolesSam Mendoza-Jonas1-2/+16
Linux kernels from v4.1 onwards will try to request an irq for each hvc console using OPAL_EVENT_CONSOLE_INPUT, however because the IRQF_SHARED flag is not set any console after the first will fail. If there is data on one of these failed consoles OPAL will set OPAL_EVENT_CONSOLE_INPUT every time fsp_console_read is called, leading to RCU stalls in the kernel. As a workaround for unpatched kernels, cease setting OPAL_EVENT_CONSOLE_INPUT for consoles that we have noticed are not being read. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-14FSP/ELOG: Remove redundant validationVasant Hegde1-2/+0
We don't need to validate msg->resp message as its always allocated. 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-14errorlog : Typo mistakeMukesh Ojha1-1/+1
componenet => component Signed-off-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-14Reassign duplicate error log component IDs to free onesStewart Smith1-2/+2
Since these were unused, it's safe to just reassign them and not change anything we expose to anyone. Reported-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-14Re-order error log component ID defines to be in orderStewart Smith1-14/+14
This makes the (two) duplicates easier to spot Reported-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-14OPAL_REINIT_CPUS: clarify that for P9 and above, we can have other flagsStewart Smith3-1/+10
On P8 we got it a bit wrong and would fall into a workaround for P8 DD1 HILE setting if other bits were set in the flags to OPAL_REINIT_CPUS, limiting our opportunity to extend it in the future. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-14Document OPAL_RETURN_CPU and OPAL_REINIT_CPUSStewart Smith2-0/+44
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-13cpu: Don't call time_wait with lock heldBenjamin Herrenschmidt2-7/+18
Also make the locking around re-init safer, properly block the OS from restarting a thread that was caught for re-init. 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-13xscom: Log error on invalid partidBenjamin Herrenschmidt1-0/+16
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> [stewart@linux.vnet.ibm.com: added FWTS annotation] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-13interrupts: Expose irq_source and change prototypes of all opsBenjamin Herrenschmidt8-116/+143
This makes irq_source public, and change all irq_source_ops to take the source pointer as a first argument (they can still dig the void * data out of that). This will allow us to embed/wrap it for XIVE later on. 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-13Move around comment in interrupts.hBenjamin Herrenschmidt1-33/+32
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-13head: Update list of exception stubsBenjamin Herrenschmidt1-0/+3
Some were missing 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-12interrupts: Use a #interrupt-cells of 2 for XICS interruptsBenjamin Herrenschmidt8-31/+42
This is more compliant with PAPR, it will also allow us to use the second cell for other attributes on P9. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-12interrupts: LPC is always an interrupt controllerBenjamin Herrenschmidt1-2/+3
Whether we have Naples or not, the "interrupts" properties of the child of the LPC node are always in the LPC interrupt number space, and so should always have the LPC controller as their interrupt controller. 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-12interrupts: Remove #interrupt-cells from ICP nodesBenjamin Herrenschmidt5-29/+0
It's not necessary and not in PAPR. HostBoot should probably do a similar change. 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-12Remove empty 'echo' from boot test scriptsStewart Smith4-4/+0
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-12make remaining noisy tests quietStewart Smith3-13/+13
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-12make check: make test runs less noisyStewart Smith7-10/+72
Run a small wrapper around some unit tests with the QTEST makefile macro (QTEST=Quiet TEST). Also, wrap boot tests in mambo and qemu to be quiet by default. Both ./test/run.sh and the modified mambo/qemu test runner scripts output full stdout and stderr in the event of error. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-12Merge branch 'skiboot-5.2.x' - skiboot 5.2.4 release notesStewart Smith1-0/+27
2016-07-12Add skiboot-5.2.4 release notesskiboot-5.2.4Stewart Smith1-0/+27
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
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-12Merge branch 'skiboot-5.2.x'Stewart Smith0-0/+0