aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc
AgeCommit message (Collapse)AuthorFilesLines
2015-10-21powerpc/eeh: Force reset on fenced PHBGavin Shan1-0/+8
On fenced PHB, the error handlers in the drivers of its subordinate devices could return PCI_ERS_RESULT_CAN_RECOVER, indicating no reset will be issued during the recovery. It's conflicting with the fact that fenced PHB won't be recovered without reset. This limits the return value from the error handlers in the drivers of the fenced PHB's subordinate devices to PCI_ERS_RESULT_NEED_NONE or PCI_ERS_RESULT_NEED_RESET, to ensure reset will be issued during recovery. Signed-off-by: Gavin Shan <[email protected]> Reviewed-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-10-21powerpc/eeh: More relaxed hotplug criterionGavin Shan1-1/+4
Currently, we rely on the existence of struct pci_driver::err_handler to decide if the corresponding PCI device should be unplugged during EEH recovery (partially hotplug case). However that check is not sufficient. Some device drivers implement only some of the EEH error handlers to collect diag-data. That means the driver still expects a hotplug to recover from the EEH error. This makes the hotplug criterion more relaxed: if the device driver doesn't provide all necessary EEH error handlers, it will experience hotplug during EEH recovery. Signed-off-by: Gavin Shan <[email protected]> [mpe: Minor change log rewording] Signed-off-by: Michael Ellerman <[email protected]>
2015-10-21powerpc/eeh: Don't unfreeze PHB PE after resetGavin Shan1-4/+10
On PowerNV platform, the PE is kept in frozen state until the PE reset is completed to avoid recursive EEH error caused by MMIO access during the period of EEH reset. The PE's frozen state is cleared after BARs of PCI device included in the PE are restored and enabled. However, we needn't clear the frozen state for PHB PE explicitly at this point as there is no real PE for PHB PE. As the PHB PE is always binding with PE#0, we actually clear PE#0, which is wrong. It doesn't incur any problem though. This checks if the PE is PHB PE and doesn't clear the frozen state if it is. Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-10-21powerpc/ps3: Quieten boot wrapper output with run_cmdGeoff Levand1-4/+21
Add a boot wrapper script function run_cmd which will run a shell command quietly and only print the output if either V=1 or an error occurs. Also, run the ps3 dd commands with run_cmd to clean up the build output. Signed-off-by: Geoff Levand <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-10-21KVM: PPC: Book3S HV: Handle H_DOORBELL on the guest exit pathGautham R. Shenoy1-3/+14
Currently a CPU running a guest can receive a H_DOORBELL in the following two cases: 1) When the CPU is napping due to CEDE or there not being a guest vcpu. 2) The CPU is running the guest vcpu. Case 1), the doorbell message is not cleared since we were waking up from nap. Hence when the EE bit gets set on transition from guest to host, the H_DOORBELL interrupt is delivered to the host and the corresponding handler is invoked. However in Case 2), the message gets cleared by the action of taking the H_DOORBELL interrupt. Since the CPU was running a guest, instead of invoking the doorbell handler, the code invokes the second-level interrupt handler to switch the context from the guest to the host. At this point the setting of the EE bit doesn't result in the CPU getting the doorbell interrupt since it has already been delivered once. So, the handler for this doorbell is never invoked! This causes softlockups if the missed DOORBELL was an IPI sent from a sibling subcore on the same CPU. This patch fixes it by explitly invoking the doorbell handler on the exit path if the exit reason is H_DOORBELL similar to the way an EXTERNAL interrupt is handled. Since this will also handle Case 1), we can unconditionally clear the doorbell message in kvmppc_check_wake_reason. Signed-off-by: Gautham R. Shenoy <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2015-10-21KVM: PPC: Implement extension to report number of memslotsNikunj A Dadhania1-0/+3
QEMU assumes 32 memslots if this extension is not implemented. Although, current value of KVM_USER_MEM_SLOTS is 32, once KVM_USER_MEM_SLOTS changes QEMU would take a wrong value. Signed-off-by: Nikunj A Dadhania <[email protected]> Reviewed-by: Thomas Huth <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2015-10-21KVM: PPC: Book3S HV: Make H_REMOVE return correct HPTE value for absent HPTEsPaul Mackerras1-0/+2
This fixes a bug where the old HPTE value returned by H_REMOVE has the valid bit clear if the HPTE was an absent HPTE, as happens for HPTEs for emulated MMIO pages and for RAM pages that have been paged out by the host. If the absent bit is set, we clear it and set the valid bit, because from the guest's point of view, the HPTE is valid. Signed-off-by: Paul Mackerras <[email protected]>
2015-10-21KVM: PPC: Book3S HV: Don't fall back to smaller HPT size in allocation ioctlPaul Mackerras1-1/+2
Currently the KVM_PPC_ALLOCATE_HTAB will try to allocate the requested size of HPT, and if that is not possible, then try to allocate smaller sizes (by factors of 2) until either a minimum is reached or the allocation succeeds. This is not ideal for userspace, particularly in migration scenarios, where the destination VM really does require the size requested. Also, the minimum HPT size of 256kB may be insufficient for the guest to run successfully. This removes the fallback to smaller sizes on allocation failure for the KVM_PPC_ALLOCATE_HTAB ioctl. The fallback still exists for the case where the HPT is allocated at the time the first VCPU is run, if no HPT has been allocated by ioctl by that time. Signed-off-by: Paul Mackerras <[email protected]>
2015-10-21powerpc/prom: Avoid reference to potentially freed memoryChristophe Jaillet1-5/+8
of_get_property() is used inside the loop, but then the reference to the node is dropped before dereferencing the prop pointer, which could by then point to junk if the node has been freed. Instead use of_property_read_u32() to actually read the property value before dropping the reference. of_property_read_u32() requires at least one cell (u32) to be present, which is stricter than the old logic which would happily dereference a property of any size. However we believe all device trees in the wild have at least one cell. Skiboot may produce memory nodes with more than one cell, but that is OK, of_property_read_u32() will return the first one. Signed-off-by: Christophe JAILLET <[email protected]> [mpe: Expand change log with device tree details] Signed-off-by: Michael Ellerman <[email protected]>
2015-10-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller7-23/+30
Conflicts: drivers/net/usb/asix_common.c net/ipv4/inet_connection_sock.c net/switchdev/switchdev.c In the inet_connection_sock.c case the request socket hashing scheme is completely different in net-next. The other two conflicts were overlapping changes. Signed-off-by: David S. Miller <[email protected]>
2015-10-20perf/powerpc: Add support for PERF_SAMPLE_BRANCH_CALLStephane Eranian1-0/+3
The patch catches PERF_SAMPLE_BRANCH_CALL because it is not clear whether this is actually supported by the hardware. Signed-off-by: Stephane Eranian <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vince Weaver <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2015-10-19powerpc/cell: Drop CONFIG_TUNE_CELL in favour of CONFIG_CELL_CPUMichael Ellerman4-15/+2
The TUNE_CELL option allows you to build a kernel that runs on multiple CPUs but is tuned (ie. optimised) to run on Cell CPUs. Now days no one is building a distro in that fashion, and any users who are building custom kernels for their Cell machines are better off building with CONFIG_CELL_CPU, which builds a kernel that only runs on Cell and therefore can be optimised even more aggresively. Dropping the option also avoids confusing other users, who are presented with an option to tune for Cell when they are not building for a Cell CPU at all. Suggested-by: Thomas Huth <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-10-19vTPM: get the buffer allocated for event log instead of the actual logHon Ching \(Vicky\) Lo1-6/+15
The OS should ask Power Firmware (PFW) for the size of the buffer allocated for the event log, instead of the size of the actual event log. It then passes the buffer adddress and size to PFW in the handover process, into which PFW copies the log. Signed-off-by: Hon Ching(Vicky) Lo <[email protected]> Signed-off-by: Peter Huewe <[email protected]>
2015-10-19vTPM: reformat event log to be byte-alignedHon Ching \(Vicky\) Lo1-1/+12
The event log generated by OpenFirmware in PowerPC is 4-byte aligned. This patch reformats the log to be byte-aligned for the Linux client. Signed-off-by: Hon Ching(Vicky) Lo <[email protected]> Signed-off-by: Peter Huewe <[email protected]>
2015-10-19vTPM: fix searching for the right vTPM node in device treeHon Ching \(Vicky\) Lo1-4/+4
Replace all occurrences of '/ibm,vtpm' with '/vdevice/vtpm', as only the latter is guanranteed to be available for the client OS. The '/ibm,vtpm' node should only be used by Open Firmware, which is susceptible to changes. Signed-off-by: Hon Ching(Vicky) Lo <[email protected]> Signed-off-by: Peter Huewe <[email protected]>
2015-10-17powerpc/fsl_pci: Don't set up inbound windows in kdump crash kernelScott Wood1-23/+61
Otherwise, because the top end of the crash kernel is treated as the absolute top of memory rather than the beginning of a reserved region, in-flight DMA from the previous kernel that targets areas above the crash kernel can trigger a storm of PCI errors. We only do this for kdump, not normal kexec, in case kexec is being used to upgrade to a kernel that wants a different inbound memory map. Signed-off-by: Scott Wood <[email protected]> Cc: Mingkai Hu <[email protected]>
2015-10-17powerpc/85xx: Don't use generic timebase sync on 64-bitScott Wood1-1/+1
85xx currently uses the generic timebase sync mechanism when CONFIG_KEXEC is enabled, because 32-bit 85xx kexec support does a hard reset of each core. 64-bit 85xx kexec does not do this, so we neither need nor want this (nor is the generic timebase sync code built on ppc64). FWIW, I don't like the fact that the hard reset is done on 32-bit kexec, and I especially don't like the timebase sync being triggered only on the presence of CONFIG_KEXEC rather than actually booting in that environment, but that's beyond the scope of this patch... Signed-off-by: Scott Wood <[email protected]>
2015-10-17powerpc/fsl-corenet: Disable coreint if kexec is enabledScott Wood1-2/+4
Problems have been observed in coreint (EPR) mode if interrupts are left pending (due to the lack of device quiescence with kdump) after having tried to deliver to a CPU but unable to deliver due to MSR[EE] -- interrupts no longer get reliably delivered in the new kernel. I tried various ways of fixing it up inside the crash kernel itself, and none worked (including resetting the entire mpic). Masking all interrupts and issuing EOIs in the crashing kernel did help a lot of the time, but the behavior was not consistent. Thus, stick to standard IACK mode when kdump is a possibility. Signed-off-by: Scott Wood <[email protected]>
2015-10-17powerpc/fsl-booke-64: Allow booting from the secondary threadScott Wood1-7/+20
This allows SMP kernels to work as kdump crash kernels. While crash kernels don't really need to be SMP, this prevents things from breaking if a user does it anyway (which is not something you want to only find out once the main kernel has crashed in the field, especially if whether it works or not depends on which cpu crashed). Signed-off-by: Scott Wood <[email protected]>
2015-10-17powerpc/b4860: Renamed the L2 cachespoonam aggrwal5-14/+12
To make provision for more than one L2 caches in the system, change the name from L2 to L2_1; same as in T4 platforms. * Also remove the L2 entry from common file "arch/powerpc/boot/dts/fsl/b4si-post.dtsi" Keep them only in separate files for b4860 and b4420. Signed-off-by: Shaveta Leekha <[email protected]> Signed-off-by: Poonam Aggrwal <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-10-17powerpc/fsl: Move Freescale device tree files into fsl folderHongtao Jia105-143/+146
It makes no sense that some Freescale device tree files are in fsl directory while some others not. This patch move Freescale device tree files into fsl folder. To do that the following two steps are made: - Move Freescale device tree files into fsl folder. - Update the include path in these files from "fsl/*.dtsi" to "*.dtsi". Please add "fsl/" prefix when you make dtb using Makefile. Signed-off-by: Jia Hongtao <[email protected]> [scottwood: fixed cuImage rule] Signed-off-by: Scott Wood <[email protected]>
2015-10-17powerpc/b4860: Removed LIODN register from sRIO nodepoonam aggrwal1-2/+0
In case of B4860 LIODN register for sRIO is not in GUTs block but in the sRIO register space. Signed-off-by: Varun Sethi <[email protected]> Signed-off-by: Poonam Aggrwal <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-10-17powerpc/85xx: Add support for Varisys Cyrus boardAndy Fleming2-0/+156
This board uses a P5020 chip, and boots just fine using the corenet_generic code. The device tree is very similar to the P5020DS, except that there is no Flash memory. The environment is, instead, stored on an MMC card on the motherboard. Signed-off-by: Andy Fleming <[email protected]> [scottwood: fixed trailing whitespace] Signed-off-by: Scott Wood <[email protected]>
2015-10-17powerpc/fsl_pci: Check for get_user/probe_kernel_address failureScott Wood1-1/+1
Signed-off-by: Scott Wood <[email protected]> Reported-by: Andrew Morton <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Hongtao Jia <[email protected]>
2015-10-16powerpc/t104xd4rdb: add DS26522 nodes to device treeZhao Qiang1-0/+10
DS26522 is used for tdm, configured by SPI bus. Add nodes under spi node to t104xd4rdb.dtsi. Signed-off-by: Zhao Qiang <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-10-16powerpc/dts: don't fall back to fsl,pq3-gpio for fsl,mpc8572-gpioUwe Kleine-König2-2/+2
While the handling of fsl,pq3-gpio and fsl,mpc8572-gpio is done in the same driver and the two hardly differ, the latter controller needs a workaround for an erratum in the gpio_get callback. To make this difference more explicit remove fsl,pq3-gpio from the list of compatibles for mpc8572 machines. Signed-off-by: Uwe Kleine-König <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-10-16powerpc/dts: Add and fix 1588 timer node for eTSECYangbo Lu8-6/+90
Add 1588 timer node in files: arch/powerpc/boot/dts/bsc9131rdb.dtsi arch/powerpc/boot/dts/bsc9132qds.dtsi arch/powerpc/boot/dts/p1010rdb.dtsi arch/powerpc/boot/dts/p1020rdb-pd.dts arch/powerpc/boot/dts/p1021rdb-pc.dtsi arch/powerpc/boot/dts/p1022ds.dtsi arch/powerpc/boot/dts/p1025twr.dtsi For P2020RDB-PC, registers' values should be calculated based on default 1588 reference clock(300MHz) not 250MHz, and fix this in file: arch/powerpc/boot/dts/p2020rdb-pc.dtsi Signed-off-by: Yangbo Lu <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-10-16powerpc/corenet: use the mixed mode of MPIC when enabling CPU hotplugchenhui zhao1-0/+8
Core reset may cause issue if using the proxy mode of MPIC. Use the mixed mode of MPIC if enabling CPU hotplug. Signed-off-by: Chenhui Zhao <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-10-16Merge tag 'powerpc-4.3-4' of ↵Linus Torvalds6-23/+25
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Re-enable CONFIG_SCSI_DH in our defconfigs - Remove unused os_area_db_id_video_mode - cxl: fix leak of IRQ names in cxl_free_afu_irqs() from Andrew - cxl: fix leak of ctx->irq_bitmap when releasing context via kernel API from Andrew - cxl: fix leak of ctx->mapping when releasing kernel API contexts from Andrew - cxl: Workaround malformed pcie packets on some cards from Philippe - cxl: Fix number of allocated pages in SPA from Christophe Lombard - Fix checkstop in native_hpte_clear() with lockdep from Cyril - Panic on unhandled Machine Check on powernv from Daniel - selftests/powerpc: Fix build failure of load_unaligned_zeropad test * tag 'powerpc-4.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: selftests/powerpc: Fix build failure of load_unaligned_zeropad test powerpc/powernv: Panic on unhandled Machine Check powerpc: Fix checkstop in native_hpte_clear() with lockdep cxl: Fix number of allocated pages in SPA cxl: Workaround malformed pcie packets on some cards cxl: fix leak of ctx->mapping when releasing kernel API contexts cxl: fix leak of ctx->irq_bitmap when releasing context via kernel API cxl: fix leak of IRQ names in cxl_free_afu_irqs() powerpc/ps3: Remove unused os_area_db_id_video_mode powerpc/configs: Re-enable CONFIG_SCSI_DH
2015-10-16KVM: PPC: Book3S HV: Deliver machine check with MSR(RI=0) to guest as MCEMahesh Salgaonkar1-4/+8
For the machine check interrupt that happens while we are in the guest, kvm layer attempts the recovery, and then delivers the machine check interrupt directly to the guest if recovery fails. On successful recovery we go back to normal functioning of the guest. But there can be cases where a machine check interrupt can happen with MSR(RI=0) while we are in the guest. This means MC interrupt is unrecoverable and we have to deliver a machine check to the guest since the machine check interrupt might have trashed valid values in SRR0/1. The current implementation do not handle this case, causing guest to crash with Bad kernel stack pointer instead of machine check oops message. [26281.490060] Bad kernel stack pointer 3fff9ccce5b0 at c00000000000490c [26281.490434] Oops: Bad kernel stack pointer, sig: 6 [#1] [26281.490472] SMP NR_CPUS=2048 NUMA pSeries This patch fixes this issue by checking MSR(RI=0) in KVM layer and forwarding unrecoverable interrupt to guest which then panics with proper machine check Oops message. Signed-off-by: Mahesh Salgaonkar <[email protected]> Acked-by: Paul Mackerras <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2015-10-15powerpc/xmon: Add some more elements to the existing PACA dump listMichael Ellerman1-4/+57
This patch adds a set of new elements to the existing PACA dump list inside an xmon session which can be listed below improving the overall xmon debug support. With this patch, a typical xmon PACA dump looks something like this. paca for cpu 0x0 @ c00000000fdc0000: possible = yes present = yes online = yes lock_token = 0x8000 (0xa) paca_index = 0x0 (0x8) kernel_toc = 0xc000000001393200 (0x10) kernelbase = 0xc000000000000000 (0x18) kernel_msr = 0xb000000000001033 (0x20) emergency_sp = 0xc00000003fff0000 (0x28) mc_emergency_sp = 0xc00000003ffec000 (0x2e0) in_mce = 0x0 (0x2e8) hmi_event_available = 0x0 (0x2ea) data_offset = 0x1fe7b0000 (0x30) hw_cpu_id = 0x0 (0x38) cpu_start = 0x1 (0x3a) kexec_state = 0x0 (0x3b) slb_shadow[0]: = 0xc000000008000000 0x40016e7779000510 slb_shadow[1]: = 0xd000000008000001 0x400142add1000510 vmalloc_sllp = 0x510 (0x1b8) slb_cache_ptr = 0x4 (0x1ba) slb_cache[0]: = 0x000000000003f000 slb_cache[1]: = 0x0000000000000001 slb_cache[2]: = 0x0000000000000003 slb_cache[3]: = 0x0000000000001000 slb_cache[4]: = 0x0000000000001000 slb_cache[5]: = 0x0000000000000000 slb_cache[6]: = 0x0000000000000000 slb_cache[7]: = 0x0000000000000000 dscr_default = 0x0 (0x58) __current = 0xc000000001331e80 (0x290) kstack = 0xc000000001393e30 (0x298) stab_rr = 0x11 (0x2a0) saved_r1 = 0xc0000001fffef5e0 (0x2a8) trap_save = 0x0 (0x2b8) soft_enabled = 0x0 (0x2ba) irq_happened = 0x1 (0x2bb) io_sync = 0x0 (0x2bc) irq_work_pending = 0x0 (0x2bd) nap_state_lost = 0x0 (0x2be) sprg_vdso = 0x0 (0x2c0) tm_scratch = 0x8000000100009033 (0x2c8) core_idle_state_ptr = (null) (0x2d0) thread_idle_state = 0x0 (0x2d8) thread_mask = 0x0 (0x2d9) subcore_sibling_mask = 0x0 (0x2da) user_time = 0x0 (0x2f0) system_time = 0x0 (0x2f8) user_time_scaled = 0x0 (0x300) starttime = 0x3f462418b5cf4 (0x308) starttime_user = 0x3f4622a57092a (0x310) startspurr = 0xd62a5718 (0x318) utime_sspurr = 0x0 (0x320) stolen_time = 0x0 (0x328) Signed-off-by: Anshuman Khandual <[email protected]> [mpe: Endian swap slb_shadow before display, minor formatting] Signed-off-by: Michael Ellerman <[email protected]>
2015-10-15powerpc/xmon: Paginate kernel log buffer displaySam bobroff1-3/+3
The kernel log buffer is often much longer than the size of a terminal so paginate it's output. Signed-off-by: Sam Bobroff <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-10-15powerpc/xmon: Paged output for paca displaySam bobroff3-2/+83
The paca display is already more than 24 lines, which can be problematic if you have an old school 80x24 terminal, or more likely you are on a virtual terminal which does not scroll for whatever reason. This patch adds a new command "#", which takes a single (hex) numeric argument: lines per page. It will cause the output of "dp" and "dpa" to be broken into pages, if necessary. Sample output: 0:mon> # 10 0:mon> dp1 paca for cpu 0x1 @ c00000000fdc0480: possible = yes present = yes online = yes lock_token = 0x8000 (0x8) paca_index = 0x1 (0xa) kernel_toc = 0xc000000000eb2400 (0x10) kernelbase = 0xc000000000000000 (0x18) kernel_msr = 0xb000000000001032 (0x20) emergency_sp = 0xc00000003ffe8000 (0x28) mc_emergency_sp = 0xc00000003ffe4000 (0x2e0) in_mce = 0x0 (0x2e8) data_offset = 0x7f170000 (0x30) hw_cpu_id = 0x8 (0x38) cpu_start = 0x1 (0x3a) kexec_state = 0x0 (0x3b) [Hit a key (a:all, q:truncate, any:next page)] 0:mon> __current = 0xc00000007e696620 (0x290) kstack = 0xc00000007e6ebe30 (0x298) stab_rr = 0xb (0x2a0) saved_r1 = 0xc00000007ef37860 (0x2a8) trap_save = 0x0 (0x2b8) soft_enabled = 0x0 (0x2ba) irq_happened = 0x1 (0x2bb) io_sync = 0x0 (0x2bc) irq_work_pending = 0x0 (0x2bd) nap_state_lost = 0x0 (0x2be) 0:mon> Signed-off-by: Sam Bobroff <[email protected]> [mpe: Use bool, make some variables static] Signed-off-by: Michael Ellerman <[email protected]>
2015-10-15powerpc/mpc5xxx: Use of_get_next_parent to simplify codeChristophe Jaillet1-4/+1
of_get_next_parent can be used to simplify the while() loop and avoid the need of a temp variable. Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-10-15powerpc/numa: Use of_get_next_parent to simplify codeChristophe Jaillet1-4/+1
of_get_next_parent can be used to simplify the while() loop and avoid the need of a temp variable. Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-10-15powerpc: Delete old orphaned PrPMC 280/2800 DTS and boot file.Paul Gortmaker2-868/+0
In commit 3c8464a9b12bf83807b6e2c896d7e7b633e1cae7 ("powerpc: Delete old PrPMC 280/2800 support") we got rid of most of the C code, and the Makefile/Kconfig hooks, but it seems I left the platform's DTS file orphaned in the tree as well as the boot code. Here we get rid of them both. Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: [email protected] Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-10-15powerpc: discard .exit.data at runtimeStephen Rothwell1-0/+6
.exit.text is discarded at run time and there are some references from that to .exit.data, so we need to discard .exit.data at run time as well. Fixes these errors: `.exit.data' referenced in section `.exit.text' of drivers/built-in.o: defined in discarded section `.exit.data' of drivers/built-in.o `.exit.data' referenced in section `.exit.text' of drivers/built-in.o: defined in discarded section `.exit.data' of drivers/built-in.o Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-10-15powerpc/eeh: atomic_dec_if_positive() to update passthru countGavin Shan1-2/+1
No need to have two atomic opertions (update and fetch/check) when decreasing PE's number of passed devices as one atomic operation is enough. Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-10-15powerpc/pci: export pcibios_free_controller()Andrew Donnellan1-0/+1
Export pcibios_free_controller(), so it can be used by the cxl module to free virtual PHBs. Signed-off-by: Andrew Donnellan <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-10-15powerpc: Individual System V IPC system callsSam bobroff3-1/+25
This patch provides individual system call numbers for the following System V IPC system calls, on PowerPC, so that they do not need to be multiplexed: * semop, semget, semctl, semtimedop * msgsnd, msgrcv, msgget, msgctl * shmat, shmdt, shmget, shmctl Signed-off-by: Sam Bobroff <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-10-15powerpc/pseries: Drop always true CONFIG_PSERIES_MSIMichael Ellerman2-7/+1
Now that pseries selects PCI_MSI && PCI, EEH will always be true, and therefore CONFIG_PSERIES_MSI will always be true. So drop it, and move msi.o to obj-y. Signed-off-by: Michael Ellerman <[email protected]>
2015-10-15powerpc/pseries: Move PCI objects to obj-yMichael Ellerman1-3/+2
Make it entirely clear in the Makefile that we always build the pci related files by moving them to obj-y. Note that CONFIG_EEH is now always enabled on pseries, because it depends on PSERIES && PCI. Signed-off-by: Michael Ellerman <[email protected]>
2015-10-15powerpc/pseries: Remove use of CONFIG_PCIMichael Ellerman2-14/+0
Now that we always have CONFIG_PCI=y for pseries, we can stop guarding code with CONFIG_PCI ifdefs. Signed-off-by: Michael Ellerman <[email protected]>
2015-10-15powerpc/pseries: Make PCI non-optionalMichael Ellerman1-1/+1
The pseries build with PCI=n looks to have been broken for at least 5 years, and no one's noticed or cared. Following the obvious breakages backward, the first commit I can find that builds is the parent of 2eb4afb69ff3 ("powerpc/pci: Move pseries code into pseries platform specific area") from April 2009. A distro would never ship a PCI=n kernel, so it is only useful for folks building custom kernels. Also on KVM the virtio devices appear on PCI, so it would only be useful if you were building kernels specifically to run on PowerVM and with no PCI devices. The added code complexity, and testing load (which we've clearly not been doing), is not justified by the small reduction in kernel size for such a niche use case. So just make PCI non-optional on pseries. Signed-off-by: Michael Ellerman <[email protected]>
2015-10-15KVM: PPC: e500: fix couple of shift operations on 64 bitsTudor Laurentiu1-2/+2
Fix couple of cases where we shift left a 32-bit value thus might get truncated results on 64-bit targets. Signed-off-by: Laurentiu Tudor <[email protected]> Suggested-by: Scott Wood <[email protected]> Acked-by: Scott Wood <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2015-10-15KVM: PPC: e500: Emulate TMCFG0 TMRN registerTudor Laurentiu2-0/+24
Emulate TMCFG0 TMRN register exposing one HW thread per vcpu. Signed-off-by: Mihai Caraman <[email protected]> [[email protected]: rebased on latest kernel, use define instead of hardcoded value, moved code in own function] Signed-off-by: Laurentiu Tudor <[email protected]> Acked-by: Scott Wood <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2015-10-15KVM: PPC: e500: fix handling local_sid_lookup resultAndrzej Hajda1-1/+2
The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda <[email protected]> Acked-by: Scott Wood <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2015-10-15powerpc/e6500: add TMCFG0 register definitionTudor Laurentiu1-0/+6
The register is not currently used in the base kernel but will be in a forthcoming kvm patch. Signed-off-by: Laurentiu Tudor <[email protected]> Acked-by: Scott Wood <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2015-10-13irqdomain: Use irq_domain_get_of_node() instead of direct field accessMarc Zyngier11-14/+24
The struct irq_domain contains a "struct device_node *" field (of_node) that is almost the only link between the irqdomain and the device tree infrastructure. In order to prepare for the removal of that field, convert all users to use irq_domain_get_of_node() instead. Signed-off-by: Marc Zyngier <[email protected]> Reviewed-and-tested-by: Hanjun Guo <[email protected]> Tested-by: Lorenzo Pieralisi <[email protected]> Cc: <[email protected]> Cc: Tomasz Nowicki <[email protected]> Cc: Suravee Suthikulpanit <[email protected]> Cc: Graeme Gregory <[email protected]> Cc: Jake Oshins <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-10-12powerpc/mm: Differentiate between hugetlb and THP during page walkAneesh Kumar K.V12-24/+49
We need to properly identify whether a hugepage is an explicit or a transparent hugepage in follow_huge_addr(). We used to depend on hugepage shift argument to do that. But in some case that can result in wrong results. For ex: On finding a transparent hugepage we set hugepage shift to PMD_SHIFT. But we can end up clearing the thp pte, via pmdp_huge_get_and_clear. We do prevent reusing the pfn page via the usage of kick_all_cpus_sync(). But that happens after we updated the pte to 0. Hence in follow_huge_addr() we can find hugepage shift set, but transparent huge page check fail for a thp pte. NOTE: We fixed a variant of this race against thp split in commit 691e95fd7396905a38d98919e9c150dbc3ea21a3 ("powerpc/mm/thp: Make page table walk safe against thp split/collapse") Without this patch, we may hit the BUG_ON(flags & FOLL_GET) in follow_page_mask occasionally. In the long term, we may want to switch ppc64 64k page size config to enable CONFIG_ARCH_WANT_GENERAL_HUGETLB Reported-by: David Gibson <[email protected]> Signed-off-by: Aneesh Kumar K.V <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>