summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-08-28powerpc/configs: Add CONFIG_RAS now required for CONFIG_EDACMichael Ellerman
In commit e3c4ff6d8c94 ("EDAC: Remove EDAC_MM_EDAC") CONFIG_EDAC grew a dependency on CONFIG_RAS. Some of our defconfigs don't have the latter, which means we lose CONFIG_EDAC, so add CONFIG_RAS to fix that. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop no longer needed CONFIG_AUDITSYSCALLMichael Ellerman
Since commit cb74ed278f80 ("audit: always enable syscall auditing when supported and audit is enabled") we no longer need to set CONFIG_AUDITSYSCALL in our defconfigs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop CONFIG_SERIAL_TXX9_* from cell/ppc64Michael Ellerman
In commit bf4981a00636 ("powerpc: Remove the celleb support") we dropped the celleb support, which made these symbols unselectable because we no longer select HAS_TX99_SERIAL. So drop them from the defconfigs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop MEMORY_HOTREMOVE from ppc64/cellMichael Ellerman
xxxx In commit 577ec789a79e ("powerpc/cell: Drop select of MEMORY_HOTPLUG") we removed the last traces of any dependency between Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop unnecessary CONFIG_POWERNV_OP_PANELMichael Ellerman
In commit 43a1dd9b5fc6 ("powerpc/powernv: Add driver for operator panel on FSP machines") we added CONFIG_POWERNV_OP_PANEL=m to the powernv defconfig, but it's default m so that's no necessary. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop no longer needed PCI_MSI on powernvMichael Ellerman
In commit a311e738b6d8 ("powerpc/powernv: Make PCI non-optional") we made PCI (and therefore PCI_MSI) non-optional on powernv, so it doesn't need to be in the defconfig anymore. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop no longer needed CONFIG_SMP for pseries/ppc64/powernvMichael Ellerman
In commit 40e275653e2c ("powerpc/powernv: Always enable SMP when building powernv") and 270e2dc9b803 ("powerpc/pseries: Always enable SMP when building pseries") we forced CONFIG_SMP on for some configs. Therefore we don't need to set it in those configs anymore. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop unnecessary CONFIG_UPROBE_EVENTMichael Ellerman
In commit 6b0b7551428e ("perf/core: Rename CONFIG_[UK]PROBE_EVENT to CONFIG_[UK]PROBE_EVENTS") it was renamed to CONFIG_UPROBE_EVENTS. Additionally it's default y, and we have the prerequisites enabled, so we don't need it in our defconfigs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop unnecessary CONFIG_NUMA_BALANCING_DEFAULT_ENABLEDMichael Ellerman
In commit 9654f95a081a ("powerpc: Enable NUMA balancing in pseries[_le]_defconfig") we added CONFIG_NUMA_BALANCING_DEFAULT_ENABLED to our defconfigs. But it's already enabled by default, so drop it. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop no longer needed CONFIG_DEVPTS_MULTIPLE_INSTANCESMichael Ellerman
Since commit eedf265aa003 ("devpts: Make each mount of devpts an independent filesystem.") we no longer need to set CONFIG_DEVPTS_MULTIPLE_INSTANCES in our defconfigs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop no longer needed CONFIG_CRYPTO_GCMMichael Ellerman
Since commit 00b9cfa3ff38 ("mac80111: Add GCMP and GCMP-256 ciphers") we no longer need to set CONFIG_CRYPTO_GCM in our defconfigs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop no longer needed CONFIG_CRYPTO_NULL in g5 / c2kMichael Ellerman
Since commit 3491244c6298 ("crypto: echainiv - Set Kconfig default to m") we no longer need to set CONFIG_CRYPTO_NULL in our defconfigs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop no longer needed CONFIG_CRYPTO_NULLMichael Ellerman
Since commit 00b9cfa3ff38 ("mac80111: Add GCMP and GCMP-256 ciphers") we no longer need to set CONFIG_CRYPTO_NULL in our defconfigs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop no longer needed CONFIG_CRYPTO_SHA256Michael Ellerman
Since commit 826775bbf38f ("crypto: drbg - Add select on sha256") we no longer need to set CONFIG_CRYPTO_SHA256 in our defconfigs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop no longer needed CONFIG_CRYPTO_ECBMichael Ellerman
Since commit 12cb3a1c4184 ("crypto: xts - Add ECB dependency") we no longer need to set CONFIG_CRYPTO_ECB in our defconfigs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop no longer needed CONFIG_CRYPTO_HMACMichael Ellerman
Since commit 401e4238f35c ("crypto: rng - Make DRBG the default RNG") we no longer need to set CONFIG_CRYPTO_HMAC in our defconfigs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop no longer needed CONFIG_CRYPTO_DEV_VMX_ENCRYPTMichael Ellerman
Since commit ccf5c442a1b8 ("crypto: vmx - Convert to CPU feature based module autoloading") we no longer need to set CONFIG_CRYPTO_DEV_VMX_ENCRYPT in our defconfigs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Update for CONFIG_NF_CT_PROTO_(SCTP|UDPLITE)=yMichael Ellerman
In commit a85406afeb3e ("netfilter: conntrack: built-in support for SCTP"), NF_CT_PROTO_SCTP switched from tristate to bool and became default y. Similarly in commit 9b91c96c5d1f ("netfilter: conntrack: built-in support for UDPlite"), NF_CT_PROTO_UDPLITE switched from tristate to bool and became default y. We had a few configs which set them to =m, which is no longer valid. We don't need to change them to =y because both symbols are default y and are enabled automatically based on the other symbols in the affected defconfigs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Update for CONFIG_FIXED_PHY being selected by CONFIG_OF_MDIOMichael Ellerman
In commit a5e4bd991362 ("of_mdio: select fixed phy support unconditionally"), CONFIG_OF_MDIO began selecting CONFIG_FIXED_PHY. That means we no longer need to set it some of our defconfigs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Update for CONFIG_DEBUG_FS being selected via CONFIG_RCU_TRACEMichael Ellerman
In commit 961518259b3b ("rcu: Enable RCU tracepoints by default to aid in debugging"), CONFIG_RCU_TRACE was made default y (if CONFIG_TREE_RCU=y, which it is for some of our configs). That in turn causes CONFIG_TREE_RCU_TRACE to be enabled, which selects CONFIG_DEBUG_FS. The end result is that CONFIG_DEBUG_FS is forced on, meaning we don't have to enable it in some of our configs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop no longer needed CONFIG_DEVKMEMMichael Ellerman
Since commit e334cd69fa65 ("Move CONFIG_DEVKMEM default to n") we no longer need to set CONFIG_DEVKMEM in our defconfigs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop no longer needed CONFIG_FHANDLEMichael Ellerman
Since commit f76be61755c5 ("Make CONFIG_FHANDLE default y") we no longer need to set CONFIG_FHANDLE in our defconfigs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Explicitly drop CONFIG_INPUT_MOUSEDEVMichael Ellerman
In commit 73d8ef76006b ("Input: mousedev - stop offering PS/2 to userspace by default") (Jan 2017), CONFIG_INPUT_MOUSEDEV was switched from default y to default n, with the explanation: Evdev interface has been available for many years and by now everyone is switched to using it, so let's stop offering /dev/input/mouseN and /dev/psaux by default. We had a number of configs which had it enabled, but going by the above explanation probably don't need it enabled anymore. So drop the last remnants of it from our defconfigs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Drop unneeded CONFIG_CRYPTO_ANSI_CPRNGMichael Ellerman
Since commit 401e4238f35c ("crypto: rng - Make DRBG the default RNG") we no longer need to set CONFIG_CRYPTO_ANSI_CPRNG in our defconfigs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/configs: Update for symbol movement onlyMichael Ellerman
Update defconfigs for symbols that have moved around, without their value changing. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/oops: Line up NIP & MSR with other rowsMichael Ellerman
This is purely cosmetic, but does look nicer IMHO: Before: task: c000000001453400 task.stack: c000000001c6c000 NIP: c000000000a0fbfc LR: c000000000a0fbf4 CTR: c000000000ba6220 REGS: c0000001fffef820 TRAP: 0300 Not tainted (4.13.0-rc6-gcc-6.3.1-00234-g423af27f7d81) MSR: 8000000000009033 <SF,EE,ME,IR,DR,RI,LE> CR: 88088242 XER: 00000000 CFAR: c0000000000b3488 DAR: 0000000000000000 DSISR: 42000000 SOFTE: 0 After: task: c000000001453400 task.stack: c000000001c6c000 NIP: c000000000a0fbfc LR: c000000000a0fbf4 CTR: c000000000ba6220 REGS: c0000001fffef820 TRAP: 0300 Not tainted (4.13.0-rc6-gcc-6.3.1-00234-g423af27f7d81-dirty) MSR: 8000000000009033 <SF,EE,ME,IR,DR,RI,LE> CR: 88088242 XER: 00000000 CFAR: c0000000000b34a4 DAR: 0000000000000000 DSISR: 42000000 SOFTE: 0 Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/oops: Print CR/XER on same line as MSRMichael Ellerman
Somehow we missed this when the pr_cont() changes went in. Fix CR/XER to go on the same line as MSR, as they have historically, eg: MSR: 8000000000009032 <SF,EE,ME,IR,DR,RI> CR: 4804408a XER: 20000000 Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/oops: Use IS_ENABLED() for oops markersMichael Ellerman
Just because it looks less gross. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/oops: Print the kernel's endian in the oopsMichael Ellerman
Although the MSR tells you what endian you're in it's possible that isn't the same endian the kernel was built for, and if that happens you're usually having a very bad day. So print a marker to make it 100% clear which endian the kernel was built for. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/oops: Fix the oops markers to use pr_cont()Michael Ellerman
When we oops we print a few markers for significant config options such as PREEMPT, SMP etc. Currently these appear on separate lines because we're not using pr_cont() properly. Fix it. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28powerpc/powernv: Fix build error in opal-imc.c when NUMA=nLABBE Corentin
When building a random powerpc kernel I hit this build error: arch/powerpc/platforms/powernv/opal-imc.c:130:13: error : assignment discards « const » qualifier from pointer target type [-Werror=discarded-qualifiers] l_cpumask = cpumask_of_node(nid); ^ This happens because when CONFIG_NUMA=n cpumask_of_node() returns a const pointer. This patch simply adds const to l_cpumask to fix this issue. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Reviewed-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> [mpe: Flesh out change log] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-28Add documentation for the powerpc memtrace debugfs filesRashmica Gupta
CONFIG_PPC_MEMTRACE must be set to use this feature. This can only be used on powernv platforms. Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com> [mpe: Update dates and kernel versions, mention size is in bytes] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-24powerpc/powernv: Enable removal of memory for in memory tracingRashmica Gupta
The hardware trace macro feature requires access to a chunk of real memory. This patch provides a debugfs interface to do this. By writing an integer containing the size of memory to be unplugged into /sys/kernel/debug/powerpc/memtrace/enable, the code will attempt to remove that much memory from the end of each NUMA node. This patch also adds additional debugsfs files for each node that allows the tracer to interact with the removed memory, as well as a trace file that allows userspace to read the generated trace. Note that this patch does not invoke the hardware trace macro, it only allows memory to be removed during runtime for the trace macro to utilise. Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com> [mpe: Minor formatting etc fixups] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-24powerpc/uprobes: Implement arch_uretprobe_is_alive()Naveen N. Rao
This helper is used to detect if a uprobe'd function has returned through a setjmp/longjmp, rather than branching to the LR that was updated previously by us. This fixes a SIGSEGV that gets generated when programs use setjmp/longjmp with uretprobes. We use the arm64 model (arch/arm64/kernel/probes/uprobes.c: arch_uretprobe_is_alive()) for detecting when stack frames have been removed from under us. Reference: https://marc.info/?l=linux-kernel&m=143748610330073 commit 7b868e4802a86 ("uprobes/x86: Reimplement arch_uretprobe_is_alive()") commit db087ef69a2b1 ("uprobes/x86: Make arch_uretprobe_is_alive(RP_CHECK_CALL) more clever") Tested with the test program from: https://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=blob;f=testsuite/systemtap.base/bz5274.c;hb=HEAD And this script: $ cat test.sh #!/bin/bash perf probe -x ./bz5274 -a bz5274_main_return=main%return perf probe -x ./bz5274 -a bz5274_funca_return=funca%return perf probe -x ./bz5274 -a bz5274_funcb_return=funcb%return perf probe -x ./bz5274 -a bz5274_funcc_return=funcc%return perf probe -x ./bz5274 -a bz5274_funcd_return=funcd%return perf record -e 'probe_bz5274:*' -aR ./bz5274 Reported-by: Gustavo Luiz Duarte <gduarte@redhat.com> Reported-by: zsun@redhat.com Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-24powerpc/kprobes: Don't save/restore DAR/DSISR to/from pt_regs for optprobesNaveen N. Rao
We don't save/restore these across a trap, or with KPROBES_ON_FTRACE. Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-24powerpc/xive: Fix the size of the cpumask used in xive_find_target_in_mask()Cédric Le Goater
When called from xive_irq_startup(), the size of the cpumask can be larger than nr_cpu_ids. This can result in a WARN_ON such as: WARNING: CPU: 10 PID: 1 at ../arch/powerpc/sysdev/xive/common.c:476 xive_find_target_in_mask+0x110/0x2f0 ... NIP [c00000000008a310] xive_find_target_in_mask+0x110/0x2f0 LR [c00000000008a2e4] xive_find_target_in_mask+0xe4/0x2f0 Call Trace: xive_find_target_in_mask+0x74/0x2f0 (unreliable) xive_pick_irq_target.isra.1+0x200/0x230 xive_irq_startup+0x60/0x180 irq_startup+0x70/0xd0 __setup_irq+0x7bc/0x880 request_threaded_irq+0x14c/0x2c0 request_event_sources_irqs+0x100/0x180 __machine_initcall_pseries_init_ras_IRQ+0x104/0x134 do_one_initcall+0x68/0x1d0 kernel_init_freeable+0x290/0x374 kernel_init+0x24/0x170 ret_from_kernel_thread+0x5c/0x74 This happens because we're being called with our affinity mask set to irq_default_affinity. That in turn was populated using cpumask_setall(), which sets NR_CPUs worth of bits, not nr_cpu_ids worth. Finally cpumask_weight() will return > nr_cpu_ids when passed a mask which has > nr_cpu_ids bits set. Fix it by limiting the value returned by cpumask_weight(). Signed-off-by: Cédric Le Goater <clg@kaod.org> [mpe: Add change log details on actual cause] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-23powerpc/64: Optimise set/clear of CTRL[RUN] (runlatch)Nicholas Piggin
On modern CPUs the CTRL register is read-only except bit 63 which is the run latch control. This means it can be updated with a mtspr rather than mfspr/mtspr. To accomodate older CPUs (Cell at least), where there are other bits in the register, we still do a read/modify/write on pre 2.06 CPUs. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [mpe: Update change log to mention 2.06 workaround] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-23powerpc/64s: Remove spurious IRQ reason in IRQ replayNicholas Piggin
HVI interrupts have always used 0x500, so remove the dead branch. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-23powerpc/64: Remove redundant instruction in interrupt replayNicholas Piggin
Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-23powerpc/64s: Use the HV handler for external IRQ replay in HV mode on POWER9Nicholas Piggin
POWER9 host external interrupts use the h_virt_irq_common handler, so use that to replay them rather than using the hardware_interrupt_common handler. Both call do_IRQ, but using the correct handler reduces i-cache footprint. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-23powerpc/64s: Merge HV and non-HV paths for doorbell IRQ replayNicholas Piggin
This results in smaller code, and fewer branches. This relies on the fact that both the 0xe80 and 0xa00 handlers call the same upper level code, namely doorbell_exception(). Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [mpe: Mention we rely on the implementation of the 0xe80/0xa00 handlers] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-23powerpc/64: Cleanup __check_irq_replay()Nicholas Piggin
Move the clearing of irq_happened bits into the condition where they were found to be set. This reduces instruction count slightly, and reduces stores into irq_happened. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-23powerpc/64s: masked_interrupt() returns to kernel so avoid restoring r13Nicholas Piggin
Places in the kernel where r13 is not the PACA pointer must have maskable interrupts disabled, so r13 does not have to be restored when returning from a soft-masked interrupt. We should never have interrupts soft disabled when we're in user space. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-23powerpc/64s: Optimise clearing of MSR_EE in masked_[H]interrupt()Nicholas Piggin
MSR_EE is always enabled in SRR1 for masked interrupts, so we can use xor to clear it. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-23powerpc/64s: Avoid a branch in masked_[H]interrupt()Nicholas Piggin
Interrupts which do not require EE to be cleared can all be tested with a single bitwise test. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-23powerpc/mm: Make switch_mm_irqs_off() out of lineBenjamin Herrenschmidt
It's too big to be inline, there is no reason to keep it that way. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [mpe: Rework to incorporate the comment changes via fixes branch] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-23powerpc/mm: Optimize detection of thread local mm'sBenjamin Herrenschmidt
Instead of comparing the whole CPU mask every time, let's keep a counter of how many bits are set in the mask. Thus testing for a local mm only requires testing if that counter is 1 and the current CPU bit is set in the mask. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-23powerpc/mm: Use mm_is_thread_local() instread of open-codingBenjamin Herrenschmidt
We open-code testing for the mm being local to the current CPU in a few places. Use our existing helper instead. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-23powerpc/mm: Avoid double irq save/restore in activate_mmBenjamin Herrenschmidt
It calls switch_mm() which already does the irq save/restore these days. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-23powerpc/mm: Move pgdir setting into a helperBenjamin Herrenschmidt
Makes switch_mm_irqs_off() a bit more readable Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>