summaryrefslogtreecommitdiffstats
path: root/core
Commit message (Collapse)AuthorAgeFilesLines
...
| * | pci: Add for_each_phb macro for PHB traversalRussell Currey2016-03-311-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to for_each_cpu, adding a for_each_phb makes PHB traversal easy. Suggested-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | | Move ipmi-opal.c from hw/ipmi to coreVasant Hegde2016-03-312-1/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ipmi-opal.c contain OPAL API related functions. Commit a561cf7b added IPMI support for FSP based system. Now FSP and AMI BMC based system makes use of these functions. Hence move this file from hw specific dir to core dir. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Acked-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | | init: Test device tree for kernel locationMichael Neuling2016-03-311-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test device tree for kernel location in /chosen/kernel-base-address. Use this if found and then detect if it's an elf or a raw binary. This can reduce the boot time since the kernel no longer needs to relocate itself when loaded directly at 0. An example of how to do this using mambo is given with the follow skiboot.tcl patch and these commands: % objcopy -O binary vmlinux vmlinux.raw % SKIBOOT_ZIMAGE=vmlinux.raw --- a/external/mambo/skiboot.tcl +++ b/external/mambo/skiboot.tcl @@ -34,7 +34,7 @@ if { ![info exists env(SKIBOOT_ZIMAGE)] } { mconfig payload PAYLOAD $env(SKIBOOT_ZIMAGE) # Paylod: Memory location for a Linux style ramdisk/initrd -mconfig payload_addr PAYLOAD_ADDR 0x20000000; +mconfig payload_addr PAYLOAD_ADDR 0x0; # FW: Where should ePAPR Flat Devtree Binary be loaded mconfig epapr_dt_addr EPAPR_DT_ADDR 0x1f00000;# place at 31M @@ -170,9 +170,9 @@ lappend compat "ibm,power8-xscom" set compat [of::encode_compat $compat] mysim of addprop $xscom_node byte_array "compatible" $compat +set chosen_node [mysim of find_device /chosen] if { [info exists env(SKIBOOT_INITRD)] } { set cpio_file $env(SKIBOOT_INITRD) - set chosen_node [mysim of find_device /chosen] set cpio_size [file size $cpio_file] set cpio_start 0x10000000 set cpio_end [expr $cpio_start + $cpio_size] @@ -180,6 +180,8 @@ if { [info exists env(SKIBOOT_INITRD)] } { mysim of addprop $chosen_node int "linux,initrd-end" $cpio_end mysim mcm 0 memory fread $cpio_start $cpio_size $cpio_file } +set reg [list $mconf(payload_addr) ] +mysim of addprop $chosen_node array64 "kernel-base-address" reg # Flatten it Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | | core: Fix backtrace for gcc 6Joel Stanley2016-03-301-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>
* | | */test/*: Added '<subdir>-check' make targetsOliver O'Halloran2016-03-301-5/+8
|/ / | | | | | | | | | | | | Currently these exist for some parts of the source tree, but not all of it. They're nice if you are only modifing code in a one part of the tree as the full test suite can be a little slow. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | core/fdt: Remove deivce_tree.hGavin Shan2016-03-081-1/+0
| | | | | | | | | | | | | | | | | | None of the functions declared in the header file are public. This removes the header file. No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Enable Simics UART consoleRyan Grimm2016-03-072-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The UART is a simulated ns16550 with memory mapped registers. A /simics dt node is detected and a SIMICS_QUIRK is added to chip quirks similar to MAMBO_CALLOUTS. It can contain an ns16550 dt node with a property console-bar. The LPC UART code is reused and this will work without an LPC bus in the model. Signed-off-by: Ryan Grimm <grimm@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | ipmi: Log exact NetFn value in OPAL logsVipin K Parashar2016-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per IPMI message format NetFn value in present in first 6 bits while last 2 bits contain LUN value. This needs to be taken care while printing NetFn value in OPAL logs which is useful while debugging fails. [root@fir01 /]# ipmitool raw 0x0a 0x48 47 b1 d0 56 [root@fir01 /]# >From OPAL Logs --------------- [133969609199,7] BT: seq 0x3d netfn 0x0a cmd 0x48: Message sent to host [133975465455,7] BT: seq 0x3d netfn 0x0a cmd 0x48: IPMI MSG done >From BMC Logs -------------- IPMIMain: [693 WARNING][corecmdselect.c:913] Request: Channel:f; Netfn:a; Cmd:48; IPMIMain: [693 INFO][corecmdselect.c:924] Response: Channel:f; Netfn:a; Cmd:48; Data:0 47 b1 d0 56 Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Reviewed-by: Cyril Bur <cyrilbur@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | init: Save away first 16 bytes of memoryMichael Neuling2016-03-071-0/+2
| | | | | | | | | | | | | | | | | | | | Currently the null branch catcher blows away the first 16 bytes of memory. This patch saves this away in case we need to reinstate them later Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | init: Update comments for branch null catcherMichael Neuling2016-03-071-0/+6
| | | | | | | | | | | | | | Make note that this will be broken for little endian. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Fix early backtracesRyan Grimm2016-03-041-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we fail an assert() before we add a mem region, such as missing chip-id in a dt xscom node, we don't get a backtrace: [836883,0] Assert fail: core/device.c:870:id != 0xffffffff [848859,0] Aborting! CPU 0000 Backtrace: This patch adjusts the top_of_ram value compared to the fp stack frame to assume one stack early on so we get a backtrace: [440546,0] Assert fail: core/device.c:822:id != 0xffffffff [452522,0] Aborting! CPU 0000 Backtrace: S: 0000000031c03b70 R: 00000000300135d0 .backtrace+0x24 S: 0000000031c03bf0 R: 0000000030017f38 ._abort+0x4c S: 0000000031c03c70 R: 0000000030017fb4 .assert_fail+0x34 S: 0000000031c03cf0 R: 0000000030021830 .dt_get_chip_id+0x24 S: 0000000031c03d60 R: 00000000300143cc .init_chips+0x23c S: 0000000031c03e30 R: 0000000030013ab8 .main_cpu_entry+0x110 S: 0000000031c03f00 R: 000000003000254c boot_entry+0x19c Signed-off-by: Ryan Grimm <grimm@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | cpu: Add helper function to return number of cores available in the chipShilpasri G Bhat2016-02-231-0/+11
| | | | | | | | | | | | | | | | | | get_available_nr_cores_in_chip() takes 'chip_id' as an argument and returns the number of available cores in the chip. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Merge branch 'stable' - ranges properties for offbStewart Smith2016-02-231-5/+12
|\|
| * core: Add explicit 1:1 mappings in ranges propertiesSam Mendoza-Jonas2016-02-231-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently skiboot adds an empty ranges property for each PCI bridge, representing a 1:1 mapping, which the kernel can later update if needed. However this does not appear to be the case, which leads to an issue in the kernel where the translation of assigned-addresses properties is mishandled and prematurely drops the PCI memory flags (ie. the first cell of an address). Instead, explicitly describe a 1:1 mapping in each bridge's ranges property, allowing assigned-addresses to be properly handled. Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
| * hmi: Identify the phb upon CAPI malfunction alertPhilippe Bergheaud2016-01-271-1/+3
| | | | | | | | | | | | | | | | | | | | commit 2e4cc4dca8c0d31138adc52076b38d80c5a6bef0 upstream Find the phb index with capp_phb3_attached_mask. Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Merge branch 'stable'Stewart Smith2016-01-212-4/+123
|\| | | | | | | Merge device tree sorting
| * DT sorting testOliver O'Halloran2016-01-212-1/+72
| | | | | | | | | | | | | | | | | | | | | | | | Moved the dt_dump() into test/dt_common.c so that it can be shared between hdata/test/hdata_to_dt.c and core/test/run-device.c run-device.c contains two tests, one basic sorting test and a generate-and-sort test. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> [stewart@linux.vnet.ibm.com: remove trailing whitespace] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
| * core/device.c: Sort nodes with name@unit names by unitOliver O'Halloran2016-01-211-4/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When unflattening (or building from hdat) a device tree child nodes are added in the order in which they are encountered. For nodes that have a <basename>@<unit> style name with a common basename it is useful to have them in the tree sorted by the unit in ascending order. Currently this requires the source data to present them in sorted order, but this isn't always the case. This patch modifies the node insertion process to insert new nodes in the correct location so the list of child nodes is sorted. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> [stewart@linux.vnet.ibm.com: remove trailing whitespace] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
| * Enable -Werror for -WformatStewart Smith2016-01-212-4/+6
| | | | | | | | | | | | | | | | | | commit 56bc1890b229072513788992d1d29b6f173c13de upstream We create our own inttypes.h to get the correct printf formatting for 64bit numbers. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | hmi: Identify the phb upon CAPI malfunction alertPhilippe Bergheaud2016-01-151-1/+3
| | | | | | | | | | | | | | | | Find the phb index with capp_phb3_attached_mask. Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Merge OPAL_CONSOLE_FLUSH from stableStewart Smith2016-01-122-5/+24
|\|
| * Add OPAL_CONSOLE_FLUSH to the OPAL APIRussell Currey2016-01-122-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | uart consoles only flush output when polled. The Linux kernel calls these pollers frequently, except when in a panic state. As such, panic messages are not fully printed unless the system is configured to reboot after panic. This patch adds a new call to the OPAL API to flush the buffer. If the system has a uart console (i.e. BMC machines), it will incrementally flush the buffer, returning if there is more to be flushed or not. If the system has a different console, the function will have no effect. This will allow the Linux kernel to ensure that panic message have been fully printed out. The existing synchronous flushing mechanism used in OPAL's shutdown and reboot routines has been refactored into a helper that repeatedly calls the new partial flush function. Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Drop support for p5ioc2Daniel Axtens2015-11-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | p5ioc2 is used by approximately 2 machines in the world, and has never ever been a supported configuration. Not only is the code virtually unused and very tricky to test, but keeping it around is making life unnecessarily difficult: - It's more complexity to manage for things such as PCI slot support - It's more code for static analysis to cover, which means more time fixing bugs that affect no-one. - It's bloating every single install of skiboot for no benefit. - It's reducing coverage stats, which is sad. Drop p5ioc2. Signed-off-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | PCI: use define for wanting dynamic PHB id for pci_register_phbStewart Smith2015-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | No functional change, but static analysis showed up the oddity of something that is generally unsigned (opal_id) having a signed value assigned to it. Took the opportunity to use a define to increase readability. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Enable -Werror for -WformatStewart Smith2015-11-162-4/+6
| | | | | | | | | | | | | | We create our own inttypes.h to get the correct printf formatting for 64bit numbers. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | assert cpu < CPUS in core/test/run-trace.cStewart Smith2015-11-161-2/+7
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | occ: hbrt: Change the OCC reset orderShilpasri G Bhat2015-11-131-12/+28
| | | | | | | | | | | | | | | | | | | | | | | | Modify the OCC reset order such that master OCC is reset after the slave OCCs are reset. In Tuleta/Alpine systems 'proc0' will always be the master OCC, which has to be stopped last when FSP sends OCC_RESET command to Opal. This fixes BZ 119718, SW289036 Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Merge branch 'stable'Stewart Smith2015-11-131-1/+1
|\|
| * core: Check con_driver is not NULLSamuel Mendoza-Jonas2015-11-131-1/+1
| | | | | | | | | | Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | core/pci.c: Move device node fixups to happen after all devices are added to ↵Alistair Popple2015-11-121-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the DT Commit 75e9440 (PCI: Trace device node from PCI device) introduced the ability for PCI devices to do fixups based on information added to the device tree as part of device initialisation. However that patch called the fixups during device initialisation meaning not all devices present in the system had been added to the device tree. Depending on device initialisation order this means some devices were not detected by the fixup code. This patch moves the calls to the fixup code until after all PCI devices have been added to the device tree. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Merge branch 'stable'Stewart Smith2015-11-121-0/+1
|\|
| * sensor: add a compatible propertyCédric Le Goater2015-11-121-0/+1
| | | | | | | | | | | | | | | | OPAL needs an extra compatible property "ibm,opal-sensor" to make module autoload work smoothly in Linux for ibmpowernv driver. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
| * console: Completely flush output buffer before power down and rebootRussell Currey2015-11-092-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Completely flush the output buffer of the console driver before power down and reboot. Implements the flushing function for uart consoles, which includes the astbmc and rhesus platforms. Adds a new function, flush(), to the con_ops struct that allows each console driver to specify how their output buffers are flushed. In the cec_power_down and cec_reboot functions, the flush function of the driver is called if it exists. This fixes an issue where some console output is sometimes lost before power down or reboot in uart consoles. If this issue is also prevalent in other console types then it can be fixed later by adding a .flush to that driver's con_ops. Signed-off-by: Russell Currey <ruscur@russell.cc> [stewart@linux.vnet.ibm.com: reduce diff size, change flush function name] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Fix resource leak on crash (similar to 125f95e)Stewart Smith2015-11-121-1/+3
| | | | | | | | | | | | | | | | | | The error paths here are a bit suspicious anyway as we're allocating memory in a failure path for having failed to allocate memory. One can hope that the memory allocated to display the error is less than the memory we attempted to allocate in the first place. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Fix resource leak on crashStewart Smith2015-11-111-1/+5
| | | | | | | | | | | | | | | | | | Even though we're heading to abort(), it seems like some static analysis checkers still think we're leaking. So.... well, let's just make them happy and free the memory. It's harmless to do that. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | sparse: fix endian conversion warnings in core/opal-msg.cStewart Smith2015-11-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | No resulting code changes due to skiboot being all BE core/opal-msg.c:58:29: warning: incorrect type in assignment (different base types) core/opal-msg.c:58:29: expected restricted beint32_t [usertype] msg_type core/opal-msg.c:58:29: got int enum opal_msg_type [signed] msg_type core/opal-msg.c:120:50: warning: restricted beint64_t degrades to integer Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Fix two sparse warnings on __stack_chk_guardStewart Smith2015-11-091-1/+2
| | | | | | | | | | | | | | core/utils.c:25:35: warning: constant 0xdeadf00dbaad300d is so big it is unsigned long core/utils.c:25:15: warning: symbol '__stack_chk_guard' was not declared. Should it be static? Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Fix sparse warnings in opal_trace_entry()Stewart Smith2015-11-091-5/+6
| | | | | | | | | | | | | | | | | | Need to flip things appropriately for endian annotations No actual functional changes since skiboot is still BE, but we're a bit more explicit about the fact the ABI is BE. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Fixup sparse endian annotations for opal events and masksStewart Smith2015-11-092-4/+4
| | | | | | | | | | | | This fixes many spurious sparse warnings Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Fix sparse warning in trace repeat structureStewart Smith2015-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | core/trace.c:106:23: warning: incorrect type in assignment (different base types) core/trace.c:106:23: expected restricted beint16_t [usertype] prev_len core/trace.c:106:23: got int Never read anywhere (by anyone), but silences a warning by doing the right thing. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Fix sparse warnings in init_boot_tracebuf()Stewart Smith2015-11-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | core/trace.c:43:42: warning: incorrect type in assignment (different base types) core/trace.c:43:42: expected restricted beint64_t static [toplevel] [usertype] mask core/trace.c:43:42: got int core/trace.c:44:46: warning: incorrect type in assignment (different base types) core/trace.c:44:46: expected restricted beint32_t static [toplevel] [usertype] max_size core/trace.c:44:46: got unsigned long Shouldn't affect any runtime code, just cleans up the warnings. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Skip OCCs for chip that has occ_functional set to falseStewart Smith2015-11-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some simulation environments, we simulate a system close to an ibm-fsp system but with a crucial difference: we don't simulate OCCs. This means that for a P8 (well, a simulated one) that looks like it's part of a ibm-fsp system, we'd wait around for about a minute to be asked to start OCCs and for the OCCs to start. Obviously, this would never happen and we'd hit the OCC initialization timeout (correctly) logging an error. However, in this simulation environment, it isn't an error as the required information to work out it isn't an error is (at least now) provided in hdat under 'OCC Functional State'. Previously, the ibm,occ-functional-state property was just passed through the device tree to the host through the XSCOM node and skiboot ignored it. This patch takes note of occ-functional-state and skips waiting for OCCs on any chips that have been marked as having non functional OCC. In such simulation environments this means we: a) don't log an error that isn't really an error b) boot 1 minute quicker as we don't hit the timeout. Tested-by: Gajendra B Bandhu1 <gbandhu1@in.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | console: Completely flush output buffer before power down and rebootRussell Currey2015-11-092-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Completely flush the output buffer of the console driver before power down and reboot. Implements the flushing function for uart consoles, which includes the astbmc and rhesus platforms. Adds a new function, flush(), to the con_ops struct that allows each console driver to specify how their output buffers are flushed. In the cec_power_down and cec_reboot functions, the flush function of the driver is called if it exists. This fixes an issue where some console output is sometimes lost before power down or reboot in uart consoles. If this issue is also prevalent in other console types then it can be fixed later by adding a .flush to that driver's con_ops. Signed-off-by: Russell Currey <ruscur@russell.cc> [stewart@linux.vnet.ibm.com: reduce diff size, change flush function name] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | slw: Move add_cpu_idle_state_properties() to add_opal_node()Shilpasri G Bhat2015-10-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 05f52a8dd7c7e402896e049fd24f83d56b70aff4 core: Setup the OPAL DT node before platform probe add_cpu_idle_state_properties() was made local to slw.c in the above commit which caused p7 systems to not populate the nap idle state in DT. So moving add_cpu_idle_state_properties() to add_opal_node to fix this bug. Reported-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Merge branch 'stable'Stewart Smith2015-10-301-0/+11
|\|
| * opal/hmi: Signal PRD about NX unit checkstop.Mahesh Salgaonkar2015-10-301-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | On NX checkstop OPAL need to signal PRD about it by setting NXDMAENGFIR[38] bit. Otherwise PRD will not be able to do NX unit checkstop error analysis. NXDMAENGFIR[38] is a spare bit and used to report a software initiated attention for NX checkstop. The behavior of this bit and all FIR bits are documented in RAS spreadsheet. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Nvlink: Add NPU PHB functionsAlistair Popple2015-10-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the NPU Nvlink PHB type. It provides access to each nvlink in the system by exposing them as PCIe devices under a NPU PHB type. Each PCIe device has a configuration space implemented in software which indicates the base address of the DL/TL/PL registers required by the device drivers. It also presents one LSI per device which is used to signal device drivers of changes in device status. The configuration space also adds a vendor specific capability which is used primarily by device drivers to power on an train the IBM PHY. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | PCI: Trace device node from PCI deviceGavin Shan2015-10-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When nvLink and nVida's GPU included in PCI topology, we have the emulated PCI devices to represent nvLinks, which is associated with the real GPU PCI device with help of device-tree. The patch introduces one more field "dn" to "struct pci_device" to make the job easier. The patch also adds one more PHB operations "device_node_fixup", which is to be called when populating PCI device node so that we have chance to link the emulated PCI device and the real GPU device through device tree. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | PCI: Cache PCI device IDsGavin Shan2015-10-261-0/+5
| | | | | | | | | | | | | | | | | | The patch caches IDs (vendor, device, sub-vendor, sub-device and class) for PCI devices. Those IDs could be used to identify one specific PCI device later. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Merge fix for soft lockup on TB errors from branch 'stable'Stewart Smith2015-10-141-1/+23
|\|
OpenPOWER on IntegriCloud