aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-05-20powerpc: Clear ELF personality flag if ELFv2 is not requested.Jeff Bailey1-0/+2
powerpc: Clear ELF personality flag if ELFv2 is not requested. The POWER kernel uses a personality flag to determine whether it should be setting up function descriptors or not (per the updated ABI). This flag wasn't being cleared on a new process but instead was being inherited. The visible effect was that an ELFv2 binary could not execve to an ELFv1 binary. Signed-off-by: Jeff Bailey <[email protected]> arch/powerpc/include/asm/elf.h | 2 ++ 1 file changed, 2 insertions(+) Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-05-20powerpc: Fix smp_processor_id() in preemptible splat in set_breakpointPaul Gortmaker6-9/+17
Currently, on 8641D, which doesn't set CONFIG_HAVE_HW_BREAKPOINT we get the following splat: BUG: using smp_processor_id() in preemptible [00000000] code: login/1382 caller is set_breakpoint+0x1c/0xa0 CPU: 0 PID: 1382 Comm: login Not tainted 3.15.0-rc3-00041-g2aafe1a4d451 #1 Call Trace: [decd5d80] [c0008dc4] show_stack+0x50/0x158 (unreliable) [decd5dc0] [c03c6fa0] dump_stack+0x7c/0xdc [decd5de0] [c01f8818] check_preemption_disabled+0xf4/0x104 [decd5e00] [c00086b8] set_breakpoint+0x1c/0xa0 [decd5e10] [c00d4530] flush_old_exec+0x2bc/0x588 [decd5e40] [c011c468] load_elf_binary+0x2ac/0x1164 [decd5ec0] [c00d35f8] search_binary_handler+0xc4/0x1f8 [decd5ef0] [c00d4ee8] do_execve+0x3d8/0x4b8 [decd5f40] [c001185c] ret_from_syscall+0x0/0x38 --- Exception: c01 at 0xfeee554 LR = 0xfeee7d4 The call path in this case is: flush_thread --> set_debug_reg_defaults --> set_breakpoint --> __get_cpu_var Since preemption is enabled in the cleanup of flush thread, and there is no need to disable it, introduce the distinction between set_breakpoint and __set_breakpoint, leaving only the flush_thread instance as the current user of set_breakpoint. Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-05-20powerpc: Drop return value from set_breakpoint as it is unusedPaul Gortmaker2-5/+5
None of the callers check the return value, so it might as well not have one at all. Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-05-20powerpc: Remove non-uapi linkage.h exportJames Hogan1-1/+0
The arch/powerpc/include/asm/linkage.h is being unintentionally exported in the kernel headers since commit e1b5bb6d1236 (consolidate cond_syscall and SYSCALL_ALIAS declarations) when arch/powerpc/include/uapi/asm/linkage.h was deleted but the header-y not removed from the Kbuild file. This happens because Makefile.headersinst still checks the old asm/ directory if the specified header doesn't exist in the uapi directory. The asm/linkage.h shouldn't ever have been exported anyway. No other arch does and it doesn't contain anything useful to userland, so remove the header-y line from the Kbuild file which triggers the export. Signed-off-by: James Hogan <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: [email protected] Cc: Al Viro <[email protected]> Cc: David Woodhouse <[email protected]> Cc: David Howells <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-05-20powerpc/eeh: Fix build error for cellebGavin Shan1-0/+1
Commit 7f52a526f ("powerpc/eeh: Allow to disable EEH") caused following build error with "celleb_defconfig" as being catched by Mikey on linux-next. arch/powerpc/kernel/eeh.c: In function 'eeh_init_proc': arch/powerpc/kernel/eeh.c:1173:37: error: 'powerpc_debugfs_root' \ undeclared (first use in this function) arch/powerpc/kernel/eeh.c:1173:37: note: each undeclared identifier \ is reported only once for each function it appears in Reported-by: Michael Neuling <[email protected]> Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-05-20Merge branch 'merge' into nextBenjamin Herrenschmidt1-3/+0
Merge "merge" branch to get two fairly important bug fixes: powerpc/powernv: Reset root port in firmware powerpc: irq work racing with timer interrupt can result in timer interrupt
2014-05-20Revert "powerpc/powernv: Fundamental reset on PLX ports"Benjamin Herrenschmidt2-95/+16
This reverts commit b2b5efcf208ddc9444aca77336627428782a39f4. This code was way too board specific, there are quirks as to how the PERST line is wired on different boards, we'll have to revisit this using/creating appropriate firmware interfaces. Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-05-12powerpc: irq work racing with timer interrupt can result in timer interrupt hangAnton Blanchard1-3/+0
I am seeing an issue where a CPU running perf eventually hangs. Traces show timer interrupts happening every 4 seconds even when a userspace task is running on the CPU. /proc/timer_list also shows pending hrtimers have not run in over an hour, including the scheduler. Looking closer, decrementers_next_tb is getting set to 0xffffffffffffffff, and at that point we will never take a timer interrupt again. In __timer_interrupt() we set decrementers_next_tb to 0xffffffffffffffff and rely on ->event_handler to update it: *next_tb = ~(u64)0; if (evt->event_handler) evt->event_handler(evt); In this case ->event_handler is hrtimer_interrupt. This will eventually call back through the clockevents code with the next event to be programmed: static int decrementer_set_next_event(unsigned long evt, struct clock_event_device *dev) { /* Don't adjust the decrementer if some irq work is pending */ if (test_irq_work_pending()) return 0; __get_cpu_var(decrementers_next_tb) = get_tb_or_rtc() + evt; If irq work came in between these two points, we will return before updating decrementers_next_tb and we never process a timer interrupt again. This looks to have been introduced by 0215f7d8c53f (powerpc: Fix races with irq_work). Fix it by removing the early exit and relying on code later on in the function to force an early decrementer: /* We may have raced with new irq work */ if (test_irq_work_pending()) set_dec(1); Signed-off-by: Anton Blanchard <[email protected]> Cc: [email protected] # 3.14+ Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-05-12powerpc/powernv: Reset root port in firmwareGavin Shan1-1/+2
Resetting root port has more stuff to do than that for PCIe switch ports and we should have resetting root port done in firmware instead of the kernel itself. The problem was introduced by commit 5b2e198e ("powerpc/powernv: Rework EEH reset"). Cc: linux-stable <[email protected]> Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-05-09powerpc/fsl-rio: Fix fsl_rio_setup error paths and use-after-unmapScott Wood1-1/+9
Several of the error paths from fsl_rio_setup are missing error messages. Worse, fsl_rio_setup initializes several global pointers and does not NULL them out after freeing/unmapping on error. This caused fsl_rio_mcheck_exception() to crash when accessing rio_regs_win which was non-NULL but had been unmapped. Signed-off-by: Scott Wood <[email protected]> Cc: Liu Gang <[email protected]> --- Liu Gang, are you sure all of these error conditions are fatal? Why does the rio driver fail if rmu is not present (e.g. on t4240)?
2014-05-05Merge remote-tracking branch 'anton/abiv2' into nextBenjamin Herrenschmidt55-680/+902
This series adds support for building the powerpc 64-bit LE kernel using the new ABI v2. We already supported running ABI v2 userspace programs but this adds support for building the kernel itself using the new ABI.
2014-05-01powerpc/mm: use macro PGTABLE_EADDR_SIZE instead of digitalLiu Ping Fan1-1/+1
In case of extending the eaddr in future, use this macro PGTABLE_EADDR_SIZE to ease the maintenance of the code. Signed-off-by: Liu Ping Fan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-05-01ppc476: Enable a linker work around for IBM errata #46Alistair Popple3-0/+34
This patch adds an option to enable a work around for an icache bug on 476 that can cause execution of stale instructions when falling through pages (IBM errata #46). It requires a recent version of binutils which supports the --ppc476-workaround option. The work around enables the appropriate linker options and ensures that all module output sections are aligned to 4K page boundaries. The work around is only required when building modules. Signed-off-by: Alistair Popple <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-05-01powerpc: Added PCI MSI support using the HSTA moduleAlistair Popple8-25/+287
The PPC476GTR SoC supports message signalled interrupts (MSI) by writing to special addresses within the High Speed Transfer Assist (HSTA) module. This patch adds support for PCI MSI with a new system device. The DMA window is also updated to allow access to the entire 42-bit address range to allow PCI devices write access to the HSTA module. Signed-off-by: Alistair Popple <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-05-01IBM Akebono: Add the Akebono platformAlistair Popple11-26/+901
This patch adds support for the IBM Akebono board. Signed-off-by: Alistair Popple <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-05-01IBM Currituck: Clean up board specific code before adding Akebono codeAlistair Popple2-5/+5
The IBM Akebono code uses the same initialisation functions as the earlier Currituck board. Rather than create a copy of this code for Akebono we will instead integrate support for it into the same file as the Currituck code. This patch just renames the board support file and updates the Makefile. Signed-off-by: Alistair Popple <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-05-01powerpc/le: Show the endianess of the LPAR under PowerVM.Tony Breeds1-0/+4
Signed-off-by: Tony Breeds <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-05-01powerpc: Use 64k io pages when we never see an HEAAlexander Graf1-3/+22
When we never get around to seeing an HEA ethernet adapter, there's no point in restricting ourselves to 4k IO page size. This speeds up IO maps when CONFIG_IBMEBUS is disabled. [ Updated the test to also lift the restriction on arch 2.07 (Power 8) which cannot have an HEA -- BenH ] Signed-off-by: Alexander Graf <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]> foo
2014-04-30powerpc: memcpy optimization for 64bit LEPhilippe Bergheaud4-8/+16
Unaligned stores take alignment exceptions on POWER7 running in little-endian. This is a dumb little-endian base memcpy that prevents unaligned stores. Once booted the feature fixup code switches over to the VMX copy loops (which are already endian safe). The question is what we do before that switch over. The base 64bit memcpy takes alignment exceptions on POWER7 so we can't use it as is. Fixing the causes of alignment exception would slow it down, because we'd need to ensure all loads and stores are aligned either through rotate tricks or bytewise loads and stores. Either would be bad for all other 64bit platforms. [ I simplified the loop a bit - Anton ] Signed-off-by: Philippe Bergheaud <[email protected]> Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-30Merge commit 'f3cae355a962784101478504ef7f6a389ad62979' into nextBenjamin Herrenschmidt2-3/+2
Merge Linus tree to get "cpufreq, powernv: Fix build failure on UP" to avoid build breakages in some of my test configs.
2014-04-28powerpc/tm: Add checking to treclaim/trechkptMichael Neuling2-3/+36
If we do a treclaim and we are not in TM suspend mode, it results in a TM bad thing (ie. a 0x700 program check). Similarly if we do a trechkpt and we have an active transaction or TEXASR Failure Summary (FS) is not set, we also take a TM bad thing. This should never happen, but if it does (ie. a kernel bug), the cause is almost impossible to debug as the GPR state is mostly userspace and hence we don't get a call chain. This adds some checks in these cases case a BUG_ON() (in asm) in case we ever hit these cases. It moves the register saving around to preserve r1 till later also. Signed-off-by: Michael Neuling <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/tm: Remove unnecessary r1 saveMichael Neuling1-2/+0
We save r1 to the scratch SPR and restore it from there after the trechkpt so saving r1 to the paca is not needed. Signed-off-by: Michael Neuling <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc: powernv: Implement ppc_md.get_proc_freq()Gautham R. Shenoy1-0/+21
Implement a method named pnv_get_proc_freq(unsigned int cpu) which returns the current clock rate on the 'cpu' in Hz to be reported in /proc/cpuinfo. This method uses the value reported by cpufreq when such a value is sane. Otherwise it falls back to old way of reporting the clockrate, i.e. ppc_proc_freq. Set the ppc_md.get_proc_freq() hook to pnv_get_proc_freq() on the PowerNV platform. Signed-off-by: Gautham R. Shenoy <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc: powernv: Framework to show the correct clock in /proc/cpuinfoGautham R. Shenoy2-4/+14
Currently, the code in setup-common.c for powerpc assumes that all clock rates are same in a smp system. This value is cached in the variable named ppc_proc_freq and is the value that is reported in /proc/cpuinfo. However on the PowerNV platform, the clock rate is same only across the threads of the same core. Hence the value that is reported in /proc/cpuinfo is incorrect on PowerNV platforms. We need a better way to query and report the correct value of the processor clock in /proc/cpuinfo. The patch achieves this by creating a machdep_call named get_proc_freq() which is expected to returns the frequency in Hz. The code in show_cpuinfo() can invoke this method to display the correct clock rate on platforms that have implemented this method. On the other powerpc platforms it can use the value cached in ppc_proc_freq. Signed-off-by: Gautham R. Shenoy <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/powernv: Return secondary CPUs to firmware before FW updateVasant Hegde3-7/+66
Firmware update on PowerNV platform takes several minutes. During this time one CPU is stuck in FW and the kernel complains about "soft lockups". This patch returns all secondary CPUs to firmware before starting firmware update process. [ Reworked a bit and cleaned up -- BenH ] Signed-off-by: Vasant Hegde <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/pci: Use of_pci_range_parser helper in pci_process_bridge_OF_rangesAndrew Murray1-59/+29
This patch updates the implementation of pci_process_bridge_OF_ranges to use the of_pci_range_parser helpers. Signed-off-by: Andrew Murray <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/legacy_serial: Support MVME5100 UARTS with shifted registersStephen Chivers2-6/+16
This patch adds support to legacy serial for UARTS with shifted registers. The MVME5100 Single Board Computer is a PowerPC platform that has 16550 style UARTS with register addresses that are 16 bytes apart (shifted by 4). Commit 309257484cc1a592e8ac5fbdd8cd661be2b80bf8 "powerpc: Cleanup udbg_16550 and add support for LPC PIO-only UARTs" added support to udbg_16550 for shifted registers by adding a "stride" parameter to the initialisation operations for Programmed IO and Memory Mapped IO. As a consequence it is now possible to use the services of legacy serial to provide early serial console messages for the MVME5100. An added benefit of this is that the serial console will always be "ttyS0" irrespective of whether the computer is fitted with extra PCI 8250 interface boards or not. I have tested this patch using the four PowerPC platforms available to me: MVME5100 - shifted registers, SAM440EP - unshifted registers, MPC8349 - unshifted registers, MVME4100 - unshifted registers. Signed-off-by: Stephen Chivers <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/boot: Add support for 64bit little endian wrapperCédric Le Goater7-5/+72
The code is only slightly modified : entry points now use the FIXUP_ENDIAN trampoline to switch endian order. The 32bit wrapper is kept for big endian kernels and 64bit is enforced for little endian kernels with a PPC64_BOOT_WRAPPER config option. The linker script is generated using the kernel preprocessor flags to make use of the CONFIG_* definitions and the wrapper script is modified to take into account the new elf64ppc format. Finally, the zImage file is compiled as a position independent executable (-pie) which makes it loadable at any address by the firmware. Signed-off-by: Cédric Le Goater <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/boot: Add a global entry point for pseriesCédric Le Goater3-1/+11
When entering the boot wrapper in little endian, we will need to fix the endian order using a fixup trampoline like in the kernel. This patch overrides the _zimage_start entry point for this purpose. Signed-off-by: Cédric Le Goater <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/boot: Modify entry point for 64bitCédric Le Goater1-4/+104
This patch adds support a 64bit wrapper entry point. As in 32bit, the entry point does its own relocation and can be loaded at any address by the firmware. Signed-off-by: Cédric Le Goater <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/boot: Define a routine to enter promCédric Le Goater2-0/+77
This patch defines a 'prom' routine similar to 'enter_prom' in the kernel. The difference is in the MSR which is built before entering prom. Big endian order is enforced as in the kernel but 32bit mode is not. It prepares ground for the next patches which will introduce Little endian order. Signed-off-by: Cédric Le Goater <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/boot: Add little endian support to elf utilsCédric Le Goater1-0/+4
Signed-off-by: Cédric Le Goater <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/boot: Add 64bit and little endian support to addnoteCédric Le Goater1-43/+85
It could certainly be improved using Elf macros and byteswapping routines, but the initial version of the code is organised to be a single file program with limited dependencies. yaboot is the same. Please scream if you want a total rewrite. Signed-off-by: Cédric Le Goater <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/boot: Define byteswapping routines for little endianCédric Le Goater2-0/+36
These are not the most efficient versions of swab but the wrapper does not do much byte swapping. On a big endian cpu, these routines are a no-op. Signed-off-by: Cédric Le Goater <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/boot: Fix compile warning in 64bitCédric Le Goater1-1/+1
arch/powerpc/boot/oflib.c:211:9: warning: cast to pointer from integer of \ different size [-Wint-to-pointer-cast] return (phandle) of_call_prom("finddevice", 1, 1, name); This is a work around. The definite solution would be to define the phandle typedef as a u32, as in the kernel, but this would break the device tree ops API. Let it be for the moment. Signed-off-by: Cédric Le Goater <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/boot: Define typedef ihandle as u32Cédric Le Goater2-6/+6
This makes ihandle 64bit friendly. Signed-off-by: Cédric Le Goater <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/boot: Rework of_claim() to make it 64bit friendlyCédric Le Goater3-10/+12
This patch fixes 64bit compile warnings and updates the wrapper code to converge the kernel code in prom_init. Signed-off-by: Cédric Le Goater <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/boot: Add PROM_ERROR define in oflibCédric Le Goater2-3/+5
This is mostly useful to make to the boot wrapper code closer with the kernel code in prom_init. Signed-off-by: Cédric Le Goater <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/boot: Add byteswapping routines in oflibCédric Le Goater3-13/+18
Values will need to be byte-swapped when calling prom (big endian) from a little endian boot wrapper. Signed-off-by: Cédric Le Goater <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/boot: Use prom_arg_t in oflibCédric Le Goater1-4/+6
This patch updates the wrapper code to converge with the kernel code in prom_init. Signed-off-by: Cédric Le Goater <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/boot: Use a common prom_args struct in oflibCédric Le Goater2-14/+17
This patch fixes warnings when the wrapper is compiled in 64bit and updates the boot wrapper code related to prom to converge with the kernel code in prom_init. This should make the review of changes easier. The kernel has a different number of possible arguments (10) when entering prom. There does not seem to be any good reason to have 12 in the wrapper, so the patch changes this value to args[10] in the prom_args struct. Signed-off-by: Cédric Le Goater <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/boot: Fix do_div for 64bit wrapperCédric Le Goater1-0/+14
When the boot wrapper is compiled in 64bit, there is no need to use __div64_32. Signed-off-by: Cédric Le Goater <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/prom: Stop scanning dev-tree for fdump earlyGavin Shan1-2/+3
Function early_init_dt_scan_fw_dump() is called to scan the device tree for fdump properties under node "rtas". Any one of them is invalid, we can stop scanning the device tree early by returning "1". It would save a bit time during boot. Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/powernv: Don't use pe->pbus to get the domain numberGavin Shan1-2/+2
If the PE contains single PCI function, "pe->pbus" would be NULL. It's not reliable to be used by pci_domain_nr(). We just grab the PCI domain number from the PCI host controller (struct pci_controller) instance. Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/powernv: Missed IOMMU table typeGavin Shan1-5/+4
In function pnv_pci_ioda2_setup_dma_pe(), the IOMMU table type is set to (TCE_PCI_SWINV_CREATE | TCE_PCI_SWINV_FREE) unconditionally. It was just set to TCE_PCI by pnv_pci_setup_iommu_table(). So the primary IOMMU table type (TCE_PCI) is lost. The patch fixes it. Also, pnv_pci_setup_iommu_table() already set "tbl->it_busno" to zero and we needn't do it again. The patch removes the redundant assignment. The patch also fixes similar issues in pnv_pci_ioda_setup_dma_pe(). Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/powernv: Fundamental reset on PLX portsGavin Shan2-16/+95
The patch intends to support fundamental reset on PLX downstream ports. If the PCI device matches any one of the internal table, which includes PLX vendor ID, bridge device ID, register offset for fundamental reset and bit, fundamental reset will be done accordingly. Otherwise, it will fail back to hot reset. Additional flag (EEH_DEV_FRESET) is introduced to record the last reset type on the PCI bridge. Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/eeh: Can't recover from non-PE-reset caseGavin Shan1-3/+9
When PCI_ERS_RESULT_CAN_RECOVER returned from device drivers, the EEH core should enable I/O and DMA for the affected PE. However, it was missed to have DMA enabled in eeh_handle_normal_event(). Besides, the frozen state of the affected PE should be cleared after successful recovery, but we didn't. The patch fixes both of the issues as above. Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powrpc/powernv: Reset PHB in kdump kernelGavin Shan3-4/+24
In the kdump scenario, the first kerenl doesn't shutdown PCI devices and the kdump kerenl clean PHB IODA table at the early probe time. That means the kdump kerenl can't support PCI transactions piled by the first kerenl. Otherwise, lots of EEH errors and frozen PEs will be detected. In order to avoid the EEH errors, the PHB is resetted to drop all PCI transaction from the first kerenl. Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/pci: Mask linkDown on resetting PCI busGavin Shan6-10/+74
The problem was initially reported by Wendy who tried pass through IPR adapter, which was connected to PHB root port directly, to KVM based guest. When doing that, pci_reset_bridge_secondary_bus() was called by VFIO driver and linkDown was detected by the root port. That caused all PEs to be frozen. The patch fixes the issue by routing the reset for the secondary bus of root port to underly firmware. For that, one more weak function pci_reset_secondary_bus() is introduced so that the individual platforms can override that and do specific reset for bridge's secondary bus. Reported-by: Wendy Xiong <[email protected]> Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2014-04-28powerpc/eeh: Make the delay for PE reset unifiedGavin Shan4-15/+30
Basically, we have 3 types of resets to fulfil PE reset: fundamental, hot and PHB reset. For the later 2 cases, we need PCI bus reset hold and settlement delay as specified by PCI spec. PowerNV and pSeries platforms are running on top of different firmware and some of the delays have been covered by underly firmware (PowerNV). The patch makes the delays unified to be done in backend, instead of EEH core. Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>