aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-12-10PLAT/i2c: Fix the i2c device node name and add target propertyskiboot-4.1Neelesh Gupta1-13/+29
Fix the i2c device node name that should show the functionality and use a dedicated 'target' name property to tell targets being controlled. Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-10Don't add dummy console property if already in dt.Ryan Grimm1-1/+3
generic_platform_init() adds this propery by default in commit 9594a715b50c338f1261e88c12c120cf8e5b8bba . If a platform adds it to the dt, Sapphire detects multiple dt props and dies. So don't add it if already exists in the dt. Signed-off-by: Ryan Grimm <grimm@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-10Update README with list and patchwork locationsStewart Smith1-0/+22
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-10Fix bug/warning in hdata/memory.c I introduced in f1a3a19Stewart Smith1-2/+3
Passing the wrong parameter to snprintf (sizeof(char*)) rather than actual length of the string. GCC 4.9 told us about it (and broke make check when I enabled -Werror) hdata/test/../memory.c: In function ‘add_address_range’: hdata/test/../memory.c:144:23: error: argument to ‘sizeof’ in ‘snprintf’ call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-10Enable -WerrorStewart Smith1-2/+2
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-10Fix warn_unused_result warnings in fsp-leds.cStewart Smith1-25/+131
We now prerror() for cases where we're failing to send responses. there's likely some better handling of this that can go on, but at least we'll have a log message now. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-10Fix warning of unbounded stack in libfdt/fdt_sw.cStewart Smith1-1/+6
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-10Console: Fix unused result warnings in console driverAnanth N Mavinakayanahalli1-22/+79
Fix Wunused-result Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-10FSP/EPOW: Fix unused result warnings in EPOW driverVasant Hegde1-3/+34
Commit c36c5607 added warn_unused_result compilation flag to fsp_queue_msg function....which resulted in multiple warnings in EPOW driver. This patch fixes those warnings. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-10FSP/DPO: Fix unused result warnings in DPO driverVasant Hegde1-4/+46
Commit c36c5607 added warn_unused_result compilation flag to fsp_queue_msg function....which resulted in multiple warnings in DPO driver. This patch fixes those warnings. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-10SURV: Fix unused result warnings in surveillance codeAnanth N Mavinakayanahalli1-6/+14
Fix Wunused_result Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-10RTC: Fix unused result warnings in RTC driverAnanth N Mavinakayanahalli1-2/+11
Fix Wunused-result Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-10FSP: Fix unused result warnings in fsp driverAnanth N Mavinakayanahalli1-9/+60
Fix Wunused-result Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-10Enable warn_unused_result for fsp_fetch_data_queue()Vasant Hegde2-9/+22
fsp_fetch_data_queue() internally calls fsp_queue_msg(). So ideally we should consume the result of this function. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-10FSP/CUPD: Convert printf based log messages into prlog based logsVasant Hegde1-16/+18
This patch changes all printf based log messages in the Code Update code into prlog based log messages with appropriate priority level. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-10fsp-elog: Add various NULL checksBenjamin Herrenschmidt2-11/+46
Recent gcc 4.9 will silently add conditional traps for NULL checks in cases where it thinks we may dereference a NULL pointer. It seems to be pretty keen on doing so when we dereference the result of list_top. Most of the time, these aren't bugs because we have some other state variable that tells us whether our list contains something or not but we hit a bug in the FSP code recently where that was getting out of sync, and the result of a trap in real mode isn't pretty .... So this adds explicit NULL checks in a number of place where gcc added trap instructions. With this patch, the current tree doesn't generate any. I didn't find a way to make gcc warn unfortunately. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-09Make fsp_freemsg() behave if passed a NULL pointerStewart Smith1-1/+1
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-09fsp: Avoid NULL dereference in case of invalid class_resp bitsBenjamin Herrenschmidt1-8/+19
When handling timeouts, we appear to do an occasional NULL dereference in fsp_timeout_poll() due to fsp_cmdclass_resp_bitmask being out of sync (bit set but class queue empty). The cause for the discrepancy will be sorted out separately but the code should be more robust. Additionally, add a lock to ensure we don't race on the timer calculations otherwise we might get spurrious dual detection of the timeout. Fixes SW288484 Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-12-09Merge remote-tracking branch 'ltcgit/master'Benjamin Herrenschmidt12-19/+39
2014-12-06Improve mambo configBenjamin Herrenschmidt1-3/+71
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-12-05Fix warning of potential unbound stack usage in hdata/memory.cStewart Smith1-1/+5
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-05Silence warning for hdata/tests/stubs.c prlog missing prototypeStewart Smith1-1/+3
We get the real prototype in real code from skiboot.h Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-05silence integer/pointer from integer/pointer warnings in ↵Stewart Smith1-3/+3
core/test/run-mem_region_init.c Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-05Fix unused result of realloc warning in core/test/run-malloc.cStewart Smith1-1/+3
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-05Fix unbounded stack usage warning in core/test/run-mem_region_release_unused.cStewart Smith1-1/+5
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-05opal: Don't put the symbol map whole into a propertyBenjamin Herrenschmidt1-3/+5
The huge property trips a bug in some versions of kexec, and it generally makes looking at the device-tree more painful than it has to be. Instead, let's just pass the address & size and we'll add a debugfs file on the Linux side to recover them. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-05Silence warning for core/tests/stubs.c prlog missing prototypeStewart Smith1-1/+3
We get the real prototype in real code from skiboot.h Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-05Fix unbounded stack usage warning in ↵Stewart Smith1-1/+5
core/test/run-mem_region_release_unused_noalloc.c Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-05Reduce -Wstack-usage down to 1024 bytes.Stewart Smith1-2/+2
We now warn on any function or stack frame that's going to use more than 1024 bytes of stack. The current biggest user with 912 bytes is p7ioc_init_ci_routing() Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-05occ: Fix clearing of OCC interrupt on remote fixBenjamin Herrenschmidt3-5/+5
If the OCC interrupt comes from another chip, we incorrectly try to clear it on the local one. This causes hangs at boot on some machines. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-03core/hostservices.c and core/slw.c: cleanup log messagesCédric Le Goater2-6/+5
printing timebase is redundant, prlog does that for us. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-03ipmi/fru: Remove redundant version informationAlistair Popple1-4/+8
The FRU data format limits string length to 31 characters. Currently we truncate the version string as required but leave the redundant (because it's included in the product name field) "skiboot-" at the start of the version. This patch removes the redundant prefix allowing more of the actual version string to be stored. It also fixes a bug which caused the last character of a 31 character version string to be overwritten as well as a rather embarrassing off-by-one buffer overflow. Note that 31 characters should be enough to store the complete version string for any release builds. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-03Merge branch 'update-2.1.1.1' - empty merge (just cherry-picked a commit)Stewart Smith0-0/+0
2014-12-03PSI: Drive link down on HIRAnanth N Mavinakayanahalli1-31/+34
After sending the FSP reset sequence via PSIHBCR, drive the PSI link down without actually waiting for the PSI interrupt indicating the 'Link Inactive Transition'. There have been cases where this interrupt doesn't arrive and we are left high and dry waiting for it, while the FSP comes back up and thinks Sapphire is not initializing the new link (bz 117526 for instance). Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-03epow: Convert printf based log messages into prlog based logsAnshuman Khandual1-10/+10
This patch changes all printf based log messages in the EPOW handling code into prlog based log messages with appropriate priority level. Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-03dpo: Convert printf based log messages into prlog based logsAnshuman Khandual1-5/+5
This patch changes all printf based log messages in the DPO handling code into prlog based log messages with appropriate priority level. Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02elog: Clean up error logging headersAlistair Popple22-211/+196
Commit cf6f4e8912d29fb89ce85c84834607065ad595a5 introduced a platform independent frontend for error logging. However it failed to move the generic parts of the fsp-elog.h header into the platform independent one, instead relying on the fact that up until now fsp-elog.h was included whenever a function needed to log errors. This patch moves the platform independent defines into the frontend header file (errorlog.h) and removes the include of the platform specific header in generic code paths. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02astbmc: Add a system-id device tree propertyAlistair Popple1-0/+13
The pel logging code requires a system-id device tree property. This should be passed to us from Hostboot but at present we don't seem to get one. This patch adds a default value of "unavailable" if it doesn't exist. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02esel: Add a logging backend for bmc based machinesAlistair Popple6-1/+218
This patch adds a backend for bmc based machines running AMI firmware supporting the OEM extended sel commands. Errors are logged in pel format to the bmc. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02ipmi/bt: Enable adding messages to the start of the queueAlistair Popple3-5/+32
By default new ipmi messages are added to the end of the transmission queue. However sometimes it is necessary to add messages to the start of the queue. This patch adds a new ipmi function that adds messages to the start of the transmission queue. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02ipmi-rtc: Update the rtc cacheAlistair Popple1-7/+13
Update the ipmi-rtc code to update the rtc cache whenever we are asked the time. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02rtc: Add a generic rtc cacheAlistair Popple5-58/+130
Some of the generic skiboot code needs access to the rtc (for example the pel logging code). Currently this is accessed via a call to fsp specific code which implements an rtc cache. Obviously this wont work on systems without a fsp. This patch makes the rtc cache generic so that we can get the time on other platforms (assuming they have some kind of rtc). Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02tce: Use TCE macrosNeelesh Gupta2-16/+17
Use available TCE mask and size macros to make the code readable and easy to maintain. Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02ipmi/fru: Add support for populating fru dataAlistair Popple6-3/+353
This patch adds basic support for populating some fru data. Currently we only support adding the skiboot version number to the product information area. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02core/device: wrap a function to destroy a dt_nodeWei Yang1-8/+13
When destroying a dt_node, it needs to release both the name and itself. And there are several places to do the release. This patch wrap a function dt_destroy() to make sure both of the elements of a dt_node are released when it is not used any more. Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02Makefile: set CROSS based on archWei Yang1-1/+6
CROSS is used to do the cross compile of skiboot on other platform, while this variable is not necessary on ppc64. When this is set on ppc64, there would be an error. This patch sets the CROSS depends on the arch. Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02core/init: make fdt a local variableWei Yang1-1/+1
Currently there is a file scope variable fdt, which is just used in load_and_boot_kernel(). Since no other user, it is not necessary to define it as a file scope variable. This patch makes it a local variable in the function. Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02Remove #define sync in test/run-trace.c - don't confuse with sync(2)Stewart Smith1-2/+1
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02core/test: fix compile error in run-traceCédric Le Goater1-0/+5
Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02opal: Report only one HMI event per core for recovered TFAC errors.Mahesh Salgaonkar1-1/+14
HMER is per thread and each thread needs to reset the relavant error bit. But Timebase register is per core and first thread that gets an interrupt would fix the actual TFAC errors where as others just resets the respective HMER error bit. This patch limits the reporting of HMI event one per core for TFAC errors. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>