Age | Commit message (Collapse) | Author | Files | Lines |
|
The comment says 1s but we are really only waiting for 100ms and this
isn't enough for some Altera FPGA cards it seems.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
A performance issue on HPC workloads was identified with some network
adapters due to the specific DMA access patterns they use which hits
a worst-case scenario in the PHB.
Disabling the write scope group feature in the PHB works around this,
so let's do that when we detect such an adapter in a PCIe direct slot.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The idle states are characterized by latency and residency
numbers which determine the breakeven point for entry into them. The
latency is a measure of the exit overhead from the idle state and
residency is the minimum amount of time that a CPU must be predicted
to be idle so as to reap the powersavings from entering into that idle
state.
These numbers are made use of by the cpuidle governors in the kernel to
arrive at the appropriate idle state that a CPU must enter into when there is
no work to be done. Today the kernel uses the latency numbers given by the
firmware. To arrive at a value for residency, it uses a multiplier of 10 on
the latency number. The latency number coded in the firmware is inaccurate
as is the technique for calculating the residency. This patch codes in the
the measured latency numbers for the idle states. The residency numbers have
been arrived at experimentally after ensuring that the performance of latency
sensitive workloads do not regress while allowing deeper idle states to be
entered into during low load situations. The kernel is expected to use these
values for optimal power efficiency.
Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
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>
|
|
There are many places where we just pass fsp_msg without
validating whether message allocation succeded or not (like
fsp_queue_msg(fsp_mkmsg(...))).
If message allocation fails then we endup crashing OPAL. This
patch validates fsp_msg before using.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This function uses int arrays from stack that pushes stack usage to
more than 2kB. Reduce stack usage by allocating memory.
Ben H's stack check compile option exposed this usage count:
hw/occ.c: In function 'add_cpu_pstate_properties':
hw/occ.c:187:1: warning: the frame size of 2064 bytes is larger than
2048 bytes [-Wframe-larger-than=]
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Modify the FSP response message to include the status code in the
status/error byte instead of adding a new word to it which is
incorrect.
FSP ack messages are 2 words with status in the 3rd byte of second
word. Status byte is in the extra (3rd) word only on new status
messages from OPAL to FSP.
Code corrected based on FSP mailbox spec version 3.16.
Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
OPAL is expected to leave OCC stopped after receiving reset OCC
message from FSP. FSP will send this either at boot before
a load/start, or during runtime before load/start. If there
is no subsequent load/start command, the OCC can be left stopped.
After few attempts (runtime reset), FSP can just send reset and
expect OPAL to leave OCC in stopped state.
Call HBRT to stop OCC on FSP reset OCC command and acknowledge.
Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This increase various timeouts as per CQ SW283991 which should help
with some external drawers and GPUs.
We also fixup the timeouts in the PEC which HB won't do before GA3.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
On a re-ipl or warm reboot, Sapphire asserts and deasserts PERST to each slot.
This results in the fpga image loaded into the flash for a CAPP adapter. HMIs
have been observed with a 200ms wait following PERST deassert, so bump time up
to 1s. Do this for all cases because re-ipl does not preserve memory and we'd
need a mechanism for Sapphire know that there is a CAPP adapter.
We might be able to reduce this to 750ms or 500ms but need more testing. Use
1s to be safe. Also, phyp fw uses 1s after deassert.
Signed-off-by: Ryan Grimm <grimm@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Presently we are logging informational event if OCC timeout happens
during boot. Change the severity to Unrecoverable Error.
Also updated the elog description.
Sample Output:
|------------------------------------------------------------------------------|
| Entry Id Commit Time SubSystem Committed by |
| Platform Id State Event Severity Ascii Str |
|------------------------------------------------------------------------------|
| 0x53A530C8 10/09/2014 10:13:06 CEC Hardware Subsystem OC |
| 0xB0000001 Sent to Hypervisor Unrecoverable Error BB82C013 |
|------------------------------------------------------------------------------|
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Acked-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The patch enables injecting PCI errors to DMA address address,
including 32-bits and 64-bits ranges.
BZ: 115222
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The patch enables injecting PCI errors to 64-bits MMIO range.
BZ: 115222
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
When doing error injection to 32-bits MMIO range, fixed length 8MB
is used. That's incorrect as one PE might span multile segments.
Also the 32-bits MMIO segment size isn't 8MB necessarily.
The patch fixes the issue to cover all (contiguous) 32-bits MMIO
segments assigned to the specified PE. Also, it fixes the 48 bits
of 50 bits AIB address, instead of all bits used for comparison.
BZ: 115222
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The patch refactors the code we had for PCI error injection. It
doesn't change the logic:
* Rename names of error types and functions according to the
comments given by Michael Ellerman when reviewing the kernel
counterpart.
* Split The backend of error injection for PHB3 and P7IOC to
multiple functions to improve code readability. Some logics
are simplified without affecting their original functionality.
* Misc cleanup like renaming variables and functions.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Use real functionality based flags instead of a mode list in the DT
and other cleanups & missing bits (this one actually builds !)
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Add a flag indicating the CAPP unit is in recovery. When a capp recoverable
malfunction HMI comes in, the HMI handler will call into
phb3_set_capp_recovery, which will put set the flag and send the event to
Linux.
EEH will call phb3_next_error which will tell it the phb is fenced.
EEH will then call into sapphire to reinitialize the phb which contains steps
3-5 of capp recovery procedure. The code increases wait time of PERST to 1s to
ensure fpga download is complete before polling linkup.
EEH will then rebind the cxl driver and it will complete recovery once it
initializes and turns snoops on, steps 7-8, completing capp recovery procedure.
Signed-off-by: Ryan Grimm <grimm@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
For user initiated capp recovery, provide a mode to turn snoops off. The perst
alone does not turn snoops off and we need to do this as part of the capp
recovery procedure before reinitializing the phb.
A second mode turns snoops back on after recovery. The driver needs to do this
after it reinitializes the PSL otherwise tlbies could come in before the psl is
initialized. Also write 0 to capp error status and control as part of the
recovery procedure.
Put modes as flag defines in opal.h so the driver can pick them up.
Add a dt property "ibm,capi-modes" which tells the driver which modes sapphire
supports. For backwards compatibility with older opals. Also, the driver can
disable reset in sysfs if not supported.
Move the mode checking into phb3.c so it's all in one place.
Signed-off-by: Ryan Grimm <grimm@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
FLUSH_SUE_STATE_MAP change fixes a problem with recovery. We were using an old
lab value that marked PTE entries in a shared state. After recovery, PTE
entries were getting flushed out to memory with an SUE, resulting in a machine
check. The new value means PTE entries are dropped on recovery.
For, APC_MASTER_PB_CTRL spec says to use initfile value and bit 3 should be
set. Initfile missing bit 3 so do a RMW. Bit 3 enables CAPP combined
response.
CAPP_EPOCH_TIMER_CTRL enables epoch timers and the recovery timer when recovery
is enabled. Also relax epoch timer period mask due to a bug.
TRANSPORT_CONTROL reg set bit 37 - rfs_benign_ptr_data in addition to spec
value. Should be set in initifile in future.
Rename APC_MASTER_CONFIG to APC_MASTER_CAPI_CTRL to match workbook name.
Signed-off-by: Ryan Grimm <grimm@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This patch changes fsp_opal_get_dpo_status function to return
OPAL_WRONG_STATE when not in DPO pending state. This will help
the host to differentiate whether the system is in DPO pending
state or not and then analyse the returned timeout value correctly.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Right now if the OPAL message queuing fails, the FSP never gets
the ack back for the original DPO initiation message it had sent
previously. With this patch, if the OPAL message queuing fails to
send the DPO message to the host, it still acks the FSP about the
original message but with error flags.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Acked-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This patch adds a positive return statement after handling
DPO message from FSP. Currently it was returning a negetive
value for all the possible cases.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Acked-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This patch cleans up multiple printf statements and also
introduces couple of defines to reflect the byte position
signatures present on the FSP DPO initiation command.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The FPGA used on some open power machines generates regular pulses instead
of levels. In that case, reading the status might fail since it's not
latched. In that case, also check the latched event bit in the XIVR.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The platform probe code might want to add things to it.
While at it, make add_cpu_idle_state_properties() local to slw.c
and call it from slw_init() instead of from add_opal_node().
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The patch adds function pci_device_init(), which is called by
phb->ops->device_init() to apply common initialization on the
specified PCI device during bootup or after PE reset.
Currently, we only put the logic of MPS configuration to the
function, but more will be put there.
Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Keep it 0 for open-power platforms where OCC is going to be preloaded,
also avoids a annoying 1mn delay on early openpower and bml when there
is no OCC firmware to wait for.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The patch provides the in-band support for reading the 'console-select'
system parameter. It also adds the console support to honour the system
param for switching the console type in P8 systems.
Tested-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeremy Kerr <jeremy.kerr@au.ibm.com>
|
|
Match the fast-sleep name between OPAL and HB
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Jeremy Kerr <jeremy.kerr@au.ibm.com>
|
|
Our libc now has a proper implementation of mktime, which makes adding
tm structures together easy. This patch makes the FSP RTC functions
use the library functions and removes the generic time calculation
code from the FSP RTC driver.
The OPAL<->tm conversion functions are also made public as they will
be useful for the IPMI RTC implementation.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
For the case where the survserver on the fsp server is dead (for whatever
reason [1]), even before the first time query via sysparam of the surv
status by sapphire, we get an error response to the sysparam query.
We should apparently trigger a HIR in that case (same as phyp).
[1] survserver has a real bug on a 'fsptelinit --disablerecovery'
followed by a 'kill -9 <survserver_pid>'
Fixes https://bugzilla.linux.ibm.com/show_bug.cgi?id=114646.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Jeremy Kerr <jeremy.kerr@au.ibm.com>
|
|
This chagne fixes a bug found by Alistair Popple: we have a stray '9' in
the count of non-leap-years in 400 years. This will cause an incorrect
result from tm_add if the TOD cache is >400 years old.
Signed-off-by: Jeremy Kerr <jeremy.kerr@au.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Now that the log automatically timestamps entries, remove the tb print
in the error paths.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
It seems that when we commited the IPMI/BT driver we updated the
device tree compatible property for the iBT interface. Unfortunately
Palmetto still requires a DT fixup for this node and somewhere along
the way there was a typo.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This patch adds a OPAL interface to fetch the DPO timeout. This
functionality is required to synchronously query Sapphire about
how much seconds are remaining for a forced system shutdown which
is useful in cases where the host has missed the OPAL_MSG_DPO for
some reason like system boot, reboot or kexec operations. This
ensures host can still query about the DPO timeout status and act.
This patch also adds helper routine to convert time base into seconds.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This patch moves the DPO message handling from FSP core code into
a separate file to make it more cleaner and to add OPAL interfaces
in the subsequent patch. It does not change anything functionally.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This patch changes the log message prefix from EPOW to FSPEPOW
as this standard is followed every where in FSP specific code
base. This also changes a bit in the file header.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
For better debugability, the patch adds git version and backtrace
details to user data section (along with file info which was already
present).
After adding required details TermImmedData looks like:
TermImmedData |
| 00000000 63386631 6639322D 64697274 793A0000 c8f1f92-dirty:.. |
| 00000010 00000000 00000000 00000000 00000000 ................ |
| 00000020 00000000 00000000 43505520 30303030 ........CPU 0000 |
| 00000030 30303264 20426163 6B747261 63653A0A 002d Backtrace:. |
| 00000040 20533A20 30303030 30303030 33316162 S: 0000000031ab |
| 00000050 36626130 20523A20 30303030 30303030 6ba0 R: 00000000 |
| 00000060 33303031 33306238 0A20533A 20303030 300130b8. S: 000 |
| 00000070 30303030 30333161 62366334 3020523A 0000031ab6c40 R: |
| 00000080 20303030 30303030 30333030 34623738 000000003004b78 |
| 00000090 380A2053 3A203030 30303030 30303331 8. S: 0000000031 |
| 000000A0 61623663 63302052 3A203030 30303030 ab6cc0 R: 000000 |
| 000000B0 30303330 30313736 31300A20 533A2030 0030017610. S: 0 |
| 000000C0 30303030 30303033 31616236 64343020 000000031ab6d40 |
| 000000D0 523A2030 30303030 30303033 30303035 R: 0000000030005 |
| 000000E0 3133340A 20533A20 30303030 30303030 134. S: 00000000 |
| 000000F0 33316162 36663030 20523A20 30303030 31ab6f00 R: 0000 |
| 00000100 30303030 33303030 32353534 0A000000 000030002554.... |
| 00000110 00000000 00000000 00000000 00000000 ................ |
| 00000120 00000000 00000000 00000000 00000000 ................ |
| 00000130 00000000 00000000 00000000 00000000 ................ |
| 00000140 00000000 00000000 00000000 00000000 ................ |
| 00000150 00000000 00000000 00000000 00000000 ................ |
| 00000160 00000000 00000000 00000000 00000000 ................ |
| 00000170 00000000 00000000 00000000 00000000 ................ |
| 00000180 00000000 00000000 00000000 00000000 ................ |
| 00000190 00000000 00000000 00000000 00000000 ................ |
| 000001A0 00000000 00000000 00000000 00000000 ................ |
| 000001B0 00000000 00000000 00000000 00000000 ................ |
| 000001C0 00000000 00000000 00000000 636F7265 ............core |
| 000001D0 2F6F7061 6C2E633A 3233383A 30000000 /opal.c:238:0... |
|------------------------------------------------------------------------------|
Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Generating src dynamically results in:
1. Difficulty in documenting and for field people to understand.
2. It might also conflict with existing srcs.
Hence add default SRC in SRC section.
Assert function call address in hex word 2.
errl -d <elog-entry-id>:
..
| Reference Code : BB821410 |
| Hex Words 2 - 5 : 30017610 00000000 00000000 00000000 |
..
Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This patch enabled TPO sequence handling in Sapphire.
Timed power on notification comes from the user through
set_poweron_time tool. After receiving a valid TPO from user,
Sapphire sends a request to FSP through maibox command to set TPO.
FSP will set TPO and power on the system as per the TPO set by the user.
[ Removed global read_data, removed writing to NULL pointers,
fixed a couple of memory leaks ... --BenH
]
Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Linux can request for lesser bytes than actual elog size.
Also make sure Linux is not requesting more than elog size.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This patch adds a basic IPMI layer to the sapphire core and support
for a BT IPMI interface as found on the Aspeed BMC of the Palmetto
platform
[ Changed the compatible property -- BenH ]
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
OCC F/w team recommends 60s timeout waiting for OCC to init. OCC has
to wait for memory throttle calibration from hardware procedure and
that takes 10s of seconds on large memory configurations. In one of
the failing case, it took 24s for OCC to init.
Typically OCC takes 2-5 secs to boot and we do that in parallel with
skiboot inits. But on certain corner cases with large memory,
we have to wait for 60s before we give up.
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Don't add timestamps, the core printf does it now
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
When setting the flag in a lock that indicates that it's on the console
path, we need to take and release that lock to ensure that any other
processor that might have taken it before the flag was set has released
it, otherwise the lock might still be held without the console count
properly incremented, which can cause it to go negative or cause the
deadlock that we mean to avoid by that to still occur.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Adds a fake RTC that can be initialized via a named reserve in the
device tree that may, at some point, be on NVRAM.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|