aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-07-28Add skiboot-5.2.5 release notesskiboot-5.2.5Stewart Smith1-0/+37
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-28pflash: Fix the makefileJoel Stanley1-9/+17
Someone was a bit too keen with the cleanups last time. Restore the ability for pflash to build in non-shared mode. Fixes: c327eddd9b29 (pflash: Clean up makefiles and resolve build race) Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit fd599965f723330da5ec55519c20cdb6aa2b3a2d) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-27pflash: Clean up makefiles and resolve build raceJoel Stanley3-21/+20
The pflash build process has regressed from when the were last fixed in 6c21c4ffaf82. This patch resolves that issue and performs some cleanups: - Remove duplicated rules. Patches had moved rules into common files, but forgotten to remove them from the pflash makefiles. - Make assignements simply expanded variables where possible. Form the make manual: Functions referenced in the definition will be executed every time the variable is expanded. This makes make run slower; worse, it causes the wildcard and shell functions to give unpredictable results because you cannot easily control when they are called, or even how many times. To avoid all the problems and inconveniences of recursively expanded variables, there is another flavor: simply expanded variables. - set the 'shared' target as a dependency of the libflash objects. This was the final piece to resolve the race condition. The failed build could be reproduced by doing a `git clean -f -x` and then running the following: $ make -j 32 CROSS_COMPILE=arm-linux-gnueabi- SKIBOOT_VERSION=5.2.4 PFLASH_VERSION=5.2.4 V=1 -C external/pflash all LINKAGE=dynamic make: Entering directory '/home/joel/dev/skiboot/external/pflash' ln -sf ../../libflash ./libflash ln -sf ../../ccan ./ccan ln -sf ../common ./common cc -O2 -Wall -I. -c pflash.c -o pflash.o cc -O2 -Wall -I. -c progress.c -o progress.o make -C ../shared make[1]: Entering directory '/home/joel/dev/skiboot/external/shared' ln -sf ../../hw/ast-bmc/ast-sf-ctrl.c common/ast-sf-ctrl.c ln -sf ../../include/ast.h common/ast.h ln -sf arch_flash_arm_io.h common/io.h cc -O2 -Wall -I. -c common/arch_flash_common.c -o common-arch_flash_common.o cc -O2 -Wall -I. -c common/arch_flash_arm.c -o common-arch_flash_arm.o cc -O2 -Wall -I. -c common/ast-sf-ctrl.c -o common-ast-sf-ctrl.o cc -O2 -Wall -I. -c version.c -o version.o ld -r common-arch_flash_common.o common-arch_flash_arm.o common-ast-sf-ctrl.o -o common-arch_flash.o ln -sf ../../libflash ./libflash ln -sf ../../ccan ./ccan ln -sf ../common ./common make[1]: *** No rule to make target 'libflash/file.c', needed by 'libflash-file.o'. Stop. make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/home/joel/dev/skiboot/external/shared' rules.mk:25: recipe for target '../shared/libflash.so.skiboot-5.2.4-1-g9f13f64c322f-joel-dirty-d5873ce' failed make: *** [../shared/libflash.so.skiboot-5.2.4-1-g9f13f64c322f-joel-dirty-d5873ce] Error 2 Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit c327eddd9b291a0e6e54001fa3b1e547bad3fca2) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-21Merge branch 'skiboot-5.1.x' into skiboot-5.2.xStewart Smith3-39/+89
2016-07-21FSP/ELOG: Fix OPAL generated elog resend logicVasant Hegde1-5/+0
Fix resend logic in opal_resend_pending_logs, so that it actually restarts sending remaining logs. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit a6d4a7884e95cb9c918b8a217c11e46b01218358) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-21FSP/ELOG: Fix possible event notifier hangsVasant Hegde2-3/+18
In some corner cases host may send acknowledgement without reading actual data (fsp_opal_elog_info -> fsp_opal_elog_ack). Because of this elog_read_from_fsp_head_state may be stuck in wrong state (ELOG_STATE_HOST_INFO) and not able to send remaining ELOG's to host. Hence reset ELOG state and start sending remaining ELOG's. Also in normal case we will ACK the logs which are already processed (elog_read_processed). Hence rearrange the code such that we go through elog_read_processed first. Finally return OPAL_PARAMETER if we are not able to find ELOG ID. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: spelling fix] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit e7c8cba4ad773055f390632c2996d3242b633bf4) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-21FSP/ELOG: Disable event notification if list is not consistentVasant Hegde1-0/+2
Chances of elog_read_pending inconsistent state is very very less. Just to be on safer side, disable notification if list is not in consistent state. 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> (cherry picked from commit 1fb10de164d3ca034193df81c1f5d007aec37781) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-21FSP/ELOG: Improve elog event statesVasant Hegde2-1/+3
ELOG enables event notification once new log is available. And this will be disabled after host completes reading logs (it has to complete both fsp_opal_elog_info and fsp_opal_elog_read). Ideally we should disable notification as soon as host consumes event (after fsp_opal_elog_info). Also if host fails to call fsp_opal_elog_read (ex: situations like duplicate event), then we endup keeping notification forever. This patch introduces new ELOG state (ELOG_STATE_HOST_INFO). As soon as host consumes event elog will move to this new state so that event notification is disabled. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit cec5750a4a86ff3f69e1d8817eda023f4d40c492) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-21FSP/ELOG: Fix OPAL generated elog event notificationVasant Hegde3-18/+34
We use elog notifier to notify logs from multiple sources (FSP generated logs - fsp-elog-read.c and OPAL generated logs - fsp-elog-write.c). OPAL generated logs sets elog event bit whenever it has new logs to send to host. But it relies on fsp-elog-read.c to disable the event bit..which is wrong! This patch creates common function to enable/disable event notification. It will enable event notification if any of the source is ready to send error log to host and disables notification once it completes sending all errors to host. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit ec366ad4e2e871096fa4c614ad7e89f5bb6f884f) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-21FSP/ELOG: Disable event notification during kexecVasant Hegde1-13/+33
ELOG enables event notification once new log is available. And this will be disabled after host completes reading logs (it has to complete both fsp_opal_elog_info and fsp_opal_elog_read). In some corner cases like kexec, host may endup reading same ELOG id twice (calling fsp_opal_elog_info twice because of resend request). Host finds it as duplicate and it will not read actual log (fsp_opal_elog_read()). In such situations we fails to disable event notification :-( Scenario : OPAL Host ------------------------------------- OPAL_EVENT_ELOG_AVAIL --> kexec OPAL_EVENT_ELOG_AVAIL --> elog client registered <-- read ELOG (id=x) <-- resend elog (opal_resend_pending_logs()) resend all ELOG --> read ELOG (id=x) -- Duplicate ELOG ! bhoom!! kernel call trace: ------------------ [ 28.055923] CPU: 10 PID: 20 Comm: irq/29-opal-elo Not tainted 4.4.0-24-generic #43-Ubuntu [ 28.056012] task: c0000000ef982a20 ti: c0000000efa38000 task.ti: c0000000efa38000 [ 28.056100] NIP: c000000008010a24 LR: c000000008010a24 CTR: 0000000030033758 [ 28.056188] REGS: c0000000efa3b9c0 TRAP: 0901 Not tainted (4.4.0-24-generic) [ 28.056274] MSR: 9000000100009033 <SF,HV,EE,ME,IR,DR,RI,LE> CR: 22000844 XER: 20000000 [ 28.056499] CFAR: c000000008009958 SOFTE: 1 GPR00: c000000008131e8c c0000000efa3bc40 c0000000095b4200 0000000000000900 GPR04: c0000000094a63c8 0000000000000001 9000000100009033 0000000000000062 GPR08: 0000000000000000 0000000000000000 c0000000ef960400 9000000100001003 GPR12: c00000000806de48 c00000000fb45f00 [ 28.057042] NIP [c000000008010a24] arch_local_irq_restore+0x74/0x90 [ 28.057117] LR [c000000008010a24] arch_local_irq_restore+0x74/0x90 [ 28.057189] Call Trace: [ 28.057221] [c0000000efa3bc40] [c0000000f108a980] 0xc0000000f108a980 (unreliable) [ 28.057326] [c0000000efa3bc60] [c000000008131e8c] irq_finalize_oneshot.part.2+0xbc/0x250 [ 28.057429] [c0000000efa3bcb0] [c000000008132170] irq_thread_fn+0x80/0xa0 [ 28.057519] [c0000000efa3bcf0] [c00000000813263c] irq_thread+0x1ac/0x280 [ 28.057609] [c0000000efa3bd80] [c0000000080e61e0] kthread+0x110/0x130 [ 28.057698] [c0000000efa3be30] [c000000008009538] ret_from_kernel_thread+0x5c/0xa4 [ 28.057799] Instruction dump: [ 28.057844] 994d02ca 2fa30000 409e0024 e92d0020 61298000 7d210164 38210020 e8010010 [ 28.057995] 7c0803a6 4e800020 60420000 4bff17ad <60000000> 4bffffe4 60420000 e92d0020 This patch adds kexec notifier client. It will disable event notification during kexec. Once host is ready to receive ELOG's again it will call fsp_opal_resend_pending_logs(). This call re-enables ELOG notication. It will fix above issue. I will add follow up patch to improve event state. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit d2ae07fd97bb9408456279cec799f72cb78680a6) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
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-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-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-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-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-05hw/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)
2016-06-30Add skiboot-5.2.3 release notesskiboot-5.2.3Stewart Smith1-0/+57
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-06-28external: Fix ARM build failure with parallel makeBrad Bishop1-1/+1
Arch headers need to be linked in before compiling. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 5660d300fb23f299c4a306be4a213eb608158b6c)
2016-06-27occ: Filter out entries from Pmin to Pmax in pstate tableShilpasri G Bhat1-6/+10
Parse the entire pstate table provided by OCC and filter out the entries that are outside the Pmax and Pmin limits. This can occur when turbo mode is disabled and OCC limits the Pmax to nominal pstate, but includes turbo pstates in the pstate table. We end up with wrong pstates in such cases if we do not parse the pstate table to filter out the correct range. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Acked-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit eca02ee2e62cee115d921a01cea061782ce47cc7)
2016-06-20gard: disable cross compile for travisStewart Smith2-3/+3
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 98b80af1001027cc59dce040831c1f54d41e4f88)
2016-06-20gard: remove err.h includeStewart Smith1-1/+0
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 0c94f97edaee2d0b1c00066db24fd4555650dbe4)
2016-06-20Disable cross compile of opal-prdStewart Smith1-4/+0
Current travis-ci seems to no longer do this terribly cleanly. Just disable it for now.. it was never a great test anyway. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 3df1760b4851d65ce04a748dc915284e1b377ddb)
2016-06-20core: Fix backtrace for gcc 6Joel Stanley1-2/+2
GCC 6 warns when we look at any stack frame other than our own, ie any argument to __builtin_frame_address other than zero. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 793f6f5b32c96f2774bd955b6062c74a672317ca)
2016-06-20Merge branch 'skiboot-5.1.x' into skiboot-5.2.xStewart Smith8-12/+12
2016-06-20Fix typosStewart Smith8-12/+12
Backport of user visible typo fixes partial cherry picked from 4c95b5e04e3c4f72e4005574f67cd6e365d3276f Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-06-09Merge branch 'skiboot-5.1.x' into skiboot-5.2.xStewart Smith1-0/+7
2016-06-09Fixup whitespace and build warning/errorStewart Smith1-4/+4
Fixes: f46c1e506d199332b0f9741278c8ec35b3e39135 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 348dacfaca9f139db2603f5c2e78d87e21938ca6)
2016-06-09pci: Do a dummy config write to devices to establish bus numberBenjamin Herrenschmidt1-0/+7
On PCI Express, devices need to know their own bus number in order to provide the correct source identification (aka RID) in upstream packets they might send, such as error messages or DMAs. However while devices know (and hard wire) their own device and function number, they know nothing about bus numbers by default, those are decoded by bridges for routing. All they know is that if their parent bridge sends a "type 0" configuration access, they should decode it provided the device and function numbers match. The PCIe spec thus defines that when a device receive such a configuration access and it's a write, it should "capture" the bus number in the source field of the packet, and re-use as the originator bus number of all subsequent outgoing requests. In order to ensure that a device has this bus number firmly established before it's likely to send error packets upstream, we should thus do a dummy configuration write to it as soon as possible after probing. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: fix Evolution broken patch, write vdid rather than &vdid as per Gavin suggestion] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit f46c1e506d199332b0f9741278c8ec35b3e39135)
2016-05-05Add skiboot 5.2.2 release notesskiboot-5.2.2Stewart Smith1-0/+32
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-04-29PHB3: Fix corruption of pref window registerGavin Shan1-0/+2
On P8+ Garrison platform, the root port's pref window register might be not writable and we have to emulate the window because of hardware defect. In order to detect that, we read the register content, write inversed value and read the register content again. The register is regarded as read-only if the values from the two continuous read are same. However, the original register content isn't written back and it causes corruption on pref window register if it's writable. This fixes the above issue by writing the original content back to the register at the end. Fixes: d40160f6 ("PHB3: Emulate root complex pref 64-bits window") Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-04-29Merge branch 'skiboot-5.1.x' into skiboot-5.2.x - 5.1.16 release notesStewart Smith1-0/+52
2016-04-29Add skiboot-5.1.16 release notesskiboot-5.1.16Stewart Smith1-0/+52
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-04-27Add skiboot-5.2.1 release notesskiboot-5.2.1Stewart Smith1-0/+121
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-04-27pflash: Allow building under yocto.Patrick Williams5-9/+4
The makefiles under external/* utilize the $(CROSS_COMPILE) variable to determine the cross-compiler prefix. In a few places, $(CROSS_COMPILE)gcc is called instead of $(CC). The issue with this is that yocto build passes some compile flags as part of $(CC) instead of $(CFLAGS), the most important of these is '--sysroot=...'. Without the proper --sysroot flag, pflash compile fails to find critical libc headers like stdio.h. This change delegates setting of $(CC) and $(LD) to external/common/rules.mk, which is widely used in the external tree, and ensures that: 1) $(CC) is used instead of $(CROSS_COMPILE)gcc. 2) CC is only set when not passed from the environment. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 3137d249ba10ad6fa7a52486cdacddfab7419189)
2016-04-27platforms/astbmc/garrison.c: Add slot location namesAlistair Popple1-0/+206
Add the slot location names for the PCI and NPU slots. Signed-off-by: Alistair Popple <alistair@popple.id.au> Claimed-to-be-Tested-By: Abhijit Saikia <Abhijit.Saikia@in.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-04-27hw/npu.c: Add ibm, npu-index property to npu device treeAlistair Popple2-3/+9
The PHB slot location code ueses the ibm,phb-index property to find slot location names. As the NPU is implemented as a different PHB type it means the phb-index property overlaps with the other PHBs in the system. This patch changes the existing usage of phb-index to npu-index which allows the phb-index property to be assigned a unique value which can then be matched by the PHB slot location code. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-04-27Merge branch 'skiboot-5.1.x' into skiboot-5.2.xStewart Smith3-14/+70
Merge PHB3 race fix
2016-04-27hw/phb3: Ensure PQ bits are cleared in the IVC when masking IRQMichael Neuling1-6/+26
When we mask an interrupt, we may race with another interrupt coming in from the hardware. If this occurs, the P and/or Q bit may end up being set but we never EOI/clear them. This could result in a lost interrupt or the next interrupt that comes in after re-enabling never being presented. This patch ensures that when masking an interrupt, any pending P/Q bits are cleared. This fixes a bug seen with some CAPI workloads which have lots of interrupt masking at the same time as high interrupt load. The fix is not specific to CAPI though. Signed-off-by: Michael Neuling <mikey@neuling.org> Tested-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>