Re: [PATCH 11/16] powerpc: vio_cmo: use dev_groups and not dev_attrs for bus_type

2017-06-08 Thread Greg Kroah-Hartman
On Fri, Jun 09, 2017 at 08:53:22AM +1000, Michael Ellerman wrote: > Greg Kroah-Hartman writes: > > > On Thu, Jun 08, 2017 at 11:12:10PM +1000, Michael Ellerman wrote: > >> Greg Kroah-Hartman writes: > >> > >> > The dev_attrs field has

Re: [PATCH] macintosh: move mac_hid driver to input/mouse.

2017-06-08 Thread Dmitry Torokhov
On Thu, Jun 8, 2017 at 4:07 PM, Peter Hutterer wrote: > On Thu, Jun 08, 2017 at 03:18:42PM +0200, Michal Suchánek wrote: >> This is what evtest reports about my keyboard: >> >> Select the device event number [0-12]: 2 >> Input driver version is 1.0.1 >> Input device ID:

Re: [PATCH] macintosh: move mac_hid driver to input/mouse.

2017-06-08 Thread Peter Hutterer
On Thu, Jun 08, 2017 at 03:18:42PM +0200, Michal Suchánek wrote: > This is what evtest reports about my keyboard: > > Select the device event number [0-12]: 2 > Input driver version is 1.0.1 > Input device ID: bus 0x3 vendor 0x413c product 0x2107 version 0x111 > Input device name: "DELL Dell USB

Re: [PATCH 11/16] powerpc: vio_cmo: use dev_groups and not dev_attrs for bus_type

2017-06-08 Thread Michael Ellerman
Greg Kroah-Hartman writes: > On Thu, Jun 08, 2017 at 11:12:10PM +1000, Michael Ellerman wrote: >> Greg Kroah-Hartman writes: >> >> > The dev_attrs field has long been "depreciated" and is finally being >> > removed, so move the driver to

Re: powerpc/book3s64: Move PPC_DT_CPU_FTRs and enable it by default

2017-06-08 Thread Michael Ellerman
On Thu, 2017-06-08 at 06:51:41 UTC, Michael Ellerman wrote: > The PPC_DT_CPU_FTRs is a bit misplaced in menuconfig, it shows up with > other general kernel options. It's really more at home in the "Platform > Support" section, so move it there. > > Also enable it by default, for Book3s 64. It

Re: [v2] cxl: Fix error path on bad ioctl

2017-06-08 Thread Michael Ellerman
On Tue, 2017-06-06 at 09:43:41 UTC, Frederic Barrat wrote: > Fix error path if we can't copy user structure on CXL_IOCTL_START_WORK > ioctl. We shouldn't unlock the context status mutex as it was not > locked (yet). > > Signed-off-by: Frederic Barrat > Cc:

Re: powerpc/mm/4k: Limit 4k page size config to 64TB virtual address space

2017-06-08 Thread Michael Ellerman
On Thu, 2017-06-01 at 14:35:04 UTC, "Aneesh Kumar K.V" wrote: > Supporting 512TB requires us to do a order 3 allocation for level 1 page > table(pgd). This results in page allocation failures with certain workloads. > For now limit 4k linux page size config to 64TB. > > Signed-off-by: Aneesh

Re: Resend [PATCH] powerpc/hotplug-mem: Fix aa_index match bug for hotplug

2017-06-08 Thread Michael Ellerman
Michael Bringmann writes: > When adding or removing memory, the aa_index (affinity value) for the > memblock must also be converted to match the endianness of the rest > of the 'ibm,dynamic-memory' property. Otherwise, subsequent retrieval > of the attribute will likely

Re: [PATCH 03/44] dmaengine: ioat: don't use DMA_ERROR_CODE

2017-06-08 Thread Dave Jiang
On 06/08/2017 06:25 AM, Christoph Hellwig wrote: > DMA_ERROR_CODE is not a public API and will go away. Instead properly > unwind based on the loop counter. > > Signed-off-by: Christoph Hellwig Acked-by: Dave Jiang > --- > drivers/dma/ioat/init.c | 24

[PATCH 00/35] defconfig: Cleanup from old entries

2017-06-08 Thread Krzysztof Kozlowski
Hi, While cleaning Samsung ARM defconfigs with savedefconfig, I encountered similar obsolete entries in other files. Except the ARM, no dependencies. For ARM, the rest of patches depend on the first change (otherwise it might not apply cleanly). Best regards, Krzysztof Krzysztof Kozlowski

[PATCH v10 10/10] powerpc/perf: Thread imc cpuhotplug support

2017-06-08 Thread Madhavan Srinivasan
From: Anju T Sudhakar Code to add support for thread IMC on cpuhotplug. When a cpu goes offline, the LDBAR for that cpu is disabled, and when it comes back online the previous ldbar value is written back to the LDBAR for that cpu. To register the hotplug functions for

[PATCH v10 09/10] powerpc/perf: Thread IMC PMU functions

2017-06-08 Thread Madhavan Srinivasan
From: Anju T Sudhakar Code to add PMU functions required for event initialization, read, update, add, del etc. for thread IMC PMU. Thread IMC PMUs are used for per-task monitoring. For each CPU, a page of memory is allocated and is kept static i.e., these pages will

[PATCH v10 07/10] powerpc/perf: PMU functions for Core IMC and hotplugging

2017-06-08 Thread Madhavan Srinivasan
Code to add PMU function to initialize a core IMC event. It also adds cpumask initialization function for core IMC PMU. For initialization, memory is allocated per core where the data for core IMC counters will be accumulated. The base address for this page is sent to OPAL via an OPAL call which

[PATCH v10 08/10] powerpc/powernv: Thread IMC events detection

2017-06-08 Thread Madhavan Srinivasan
From: Anju T Sudhakar Code to add support for detection of thread IMC events. It adds a new domain IMC_DOMAIN_THREAD and it is determined with the help of the "type" property in the imc device-tree. Signed-off-by: Anju T Sudhakar Signed-off-by:

[PATCH v10 06/10] powerpc/powernv: Core IMC events detection

2017-06-08 Thread Madhavan Srinivasan
This patch adds support for detection of core IMC events along with the Nest IMC events. It adds a new domain IMC_DOMAIN_CORE and its determined with the help of the "type" property in the IMC device tree. Signed-off-by: Anju T Sudhakar Signed-off-by: Hemant Kumar

[PATCH v10 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support

2017-06-08 Thread Madhavan Srinivasan
From: Anju T Sudhakar Adds cpumask attribute to be used by each IMC pmu. Only one cpu (any online CPU) from each chip for nest PMUs is designated to read counters. On CPU hotplug, dying CPU is checked to see whether it is one of the designated cpus, if yes, next online

[PATCH v10 04/10] powerpc/perf: Add generic IMC pmu group and event functions

2017-06-08 Thread Madhavan Srinivasan
From: Anju T Sudhakar Device tree IMC driver code parses the IMC units and their events. It passes the information to IMC pmu code which is placed in powerpc/perf as "imc-pmu.c". Patch adds a set of generic imc pmu related event functions to be used by each imc pmu

[PATCH v10 03/10] powerpc/powernv: Detect supported IMC units and its events

2017-06-08 Thread Madhavan Srinivasan
Parse device tree to detect IMC units. Traverse through each IMC unit node to find supported events and corresponding unit/scale files (if any). The device tree for IMC counters starts at the node "imc-counters". This node contains all the IMC PMU nodes and event nodes for these IMC PMUs. The PMU

[PATCH v10 02/10] powerpc/powernv: Autoload IMC device driver module

2017-06-08 Thread Madhavan Srinivasan
From: Anju T Sudhakar Code to create platform device for the IMC counters. Paltform devices are created based on the IMC compatibility string. New Config flag "CONFIG_HV_PERF_IMC_CTRS" add to contain the IMC counter changes. Signed-off-by: Anju T Sudhakar

[PATCH v10 01/10] powerpc/powernv: Data structure and macros definitions for IMC

2017-06-08 Thread Madhavan Srinivasan
Create a new header file to add the data structures and macros needed for In-Memory Collection (IMC) counter support. Signed-off-by: Anju T Sudhakar Signed-off-by: Hemant Kumar Signed-off-by: Madhavan Srinivasan ---

[PATCH v10 00/10] IMC Instrumentation Support

2017-06-08 Thread Madhavan Srinivasan
Power9 has In-Memory-Collection (IMC) infrastructure which contains various Performance Monitoring Units (PMUs) at Nest level (these are on-chip but off-core), Core level and Thread level. The Nest PMU counters are handled by a Nest IMC microcode which runs in the OCC (On-Chip Controller)

Re: [PATCH 3/4] powerpc/64: context switch an hwsync instruction can be avoided

2017-06-08 Thread Peter Zijlstra
On Fri, Jun 09, 2017 at 01:36:08AM +1000, Nicholas Piggin wrote: > The hwsync in the context switch code to prevent MMIO access being > reordered from the point of view of a single process if it gets > migrated to a different CPU is not required because there is an hwsync > performed earlier in

[PATCH] kernel/kprobes: Add test to validate pt_regs

2017-06-08 Thread Naveen N. Rao
Add a test to verify that the registers passed in pt_regs on kprobe (trap), optprobe (jump) and kprobe_on_ftrace (ftrace_caller) are accurate. The tests are exercized if KPROBES_SANITY_TEST is enabled. Implemented for powerpc64. Other architectures will have to implement the relevant arch_*

[PATCH] powerpc/kprobes: Don't save/restore DAR/DSISR to/from pt_regs for optprobes

2017-06-08 Thread Naveen N. Rao
We don't save/restore these across a trap, or with KPROBES_ON_FTRACE. Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/optprobes_head.S | 8 1 file changed, 8 deletions(-) diff --git a/arch/powerpc/kernel/optprobes_head.S

Resend [PATCH] powerpc/hotplug-mem: Fix aa_index match bug for hotplug

2017-06-08 Thread Michael Bringmann
When adding or removing memory, the aa_index (affinity value) for the memblock must also be converted to match the endianness of the rest of the 'ibm,dynamic-memory' property. Otherwise, subsequent retrieval of the attribute will likely lead to non-existent nodes, followed by using the default

Re: [PATCH v9 10/10] powerpc/perf: Thread imc cpuhotplug support

2017-06-08 Thread Madhavan Srinivasan
On Tuesday 06 June 2017 03:57 PM, Thomas Gleixner wrote: On Mon, 5 Jun 2017, Anju T Sudhakar wrote: static void thread_imc_mem_alloc(int cpu_id) { - u64 ldbar_addr, ldbar_value; int phys_id = topology_physical_package_id(cpu_id); per_cpu_add[cpu_id] =

Re: [PATCH v5 2/2] powerpc/fadump: update documentation about 'fadump_append=' parameter

2017-06-08 Thread Hari Bathini
Hi Michal, Sorry for taking this long to respond. I was working on a few other things. On Monday 15 May 2017 02:59 PM, Michal Suchánek wrote: Hello, On Mon, 15 May 2017 12:59:46 +0530 Hari Bathini wrote: On Friday 12 May 2017 09:12 PM, Michal Suchánek wrote:

Re: [PATCH 19/44] s390: implement ->mapping_error

2017-06-08 Thread Gerald Schaefer
On Thu, 8 Jun 2017 15:25:44 +0200 Christoph Hellwig wrote: > s390 can also use noop_dma_ops, and while that currently does not return > errors it will so in the future. Implementing the mapping_error method > is the proper way to have per-ops error conditions. > > Signed-off-by:

[PATCH 21/35] powerpc: defconfig: Cleanup from old Kconfig options

2017-06-08 Thread Krzysztof Kozlowski
Remove old, dead Kconfig option USB_LED. It is gone since commit a335aaf3125c ("usb: misc: remove outdated USB LED driver"). Signed-off-by: Krzysztof Kozlowski --- arch/powerpc/configs/c2k_defconfig| 1 - arch/powerpc/configs/ppc6xx_defconfig | 1 - 2 files changed, 2

[PATCH 14/14] powerpc/64s: idle runlatch switch is done with MSR[EE]=0

2017-06-08 Thread Nicholas Piggin
2*mfmsr and 2*mtmsr can be avoided in the idle sleep/wake code because we know the MSR[EE] is clear. Signed-off-by: Nicholas Piggin --- arch/powerpc/platforms/powernv/idle.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH 13/14] powerpc/64: runlatch CTRL[RUN] set optimisation

2017-06-08 Thread Nicholas Piggin
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. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/process.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-)

[PATCH 12/14] powerpc/64s: cpuidle no memory barrier after break from idle

2017-06-08 Thread Nicholas Piggin
A memory barrier is not required after the task wakes up, only if we clear the polling flag before waking. The case where we have work to do is the important one, so optimise for it. Signed-off-by: Nicholas Piggin --- drivers/cpuidle/cpuidle-powernv.c | 11 +--

[PATCH 11/14] powerpc/64s: cpuidle read mostly for common globals

2017-06-08 Thread Nicholas Piggin
Ensure these don't get put into bouncing cachelines. Signed-off-by: Nicholas Piggin --- drivers/cpuidle/cpuidle-powernv.c | 10 +- drivers/cpuidle/cpuidle-pseries.c | 8 2 files changed, 9 insertions(+), 9 deletions(-) diff --git

[PATCH 10/14] powerpc/64s: cpuidle set polling before enabling irqs

2017-06-08 Thread Nicholas Piggin
local_irq_enable can cause interrupts to be taken which could take significant amount of processing time. The idle process should set its polling flag before this, so another process that wakes it during this time will not have to send an IPI. Expand the TIF_POLLING_NRFLAG coverage to as large as

[PATCH 09/14] powerpc/64s: idle hmi wakeup is unlikely

2017-06-08 Thread Nicholas Piggin
In a busy system, idle wakeups can be expected from IPIs and device interrupts. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/idle_book3s.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/idle_book3s.S

[PATCH 08/14] powerpc/64s: idle avoid SRR usage in idle sleep/wake paths

2017-06-08 Thread Nicholas Piggin
Idle code now always runs at the 0xc... effective address whether in real or virtual mode. This means rfid can be ditched, along with a lot of SRR manipulations. In the wakeup path, carry SRR1 around in r12. Use mtmsrd to change MSR states as required. This also balances the return prediction

[PATCH 07/14] powerpc/64s: idle branch to handler with virtual mode offset

2017-06-08 Thread Nicholas Piggin
Have the system reset idle wakeup handlers branched to in real mode with the 0xc... kernel address applied. This allows simplifications of avoiding rfid when switching to virtual mode in the wakeup handler. Signed-off-by: Nicholas Piggin ---

[PATCH 06/14] powerpc/64s: interrupt replay balance the return branch predictor

2017-06-08 Thread Nicholas Piggin
The __replay_interrupt code is branched to with bl, but the caller is returned to directly with rfid from the interrupt. Instead return to a return stub that returns to the caller with blr, which should do better with the return predictor. Signed-off-by: Nicholas Piggin ---

[PATCH 05/14] powerpc/64s: msgclr when handling doorbell exceptions

2017-06-08 Thread Nicholas Piggin
msgsnd doorbell exceptions are cleared when the doorbell interrupt is taken. However if a doorbell exception causes a system reset interrupt wake from power saving state, the message is not cleared. Processing the doorbell from the system reset interrupt requires msgclr to avoid taking the

[PATCH 04/14] powerpc/64s: idle process interrupts from system reset wakeup

2017-06-08 Thread Nicholas Piggin
When the CPU wakes from low power state, it begins at the system reset interrupt with the exception that caused the wakeup encoded in SRR1. Today, powernv idle wakeup ignores the wakeup reason (except a special case for HMI), and the regular interrupt corresponding to the exception will fire

[PATCH 03/14] powerpc/64s: idle provide a default idle for POWER9

2017-06-08 Thread Nicholas Piggin
Before the cpuidle driver is enabled, provide a default idle function similarly to POWER7/8. This should not have much effect, because the cpuidle driver for powernv is mandatory, but if that changes we should have a fallback. Signed-off-by: Nicholas Piggin ---

[PATCH 02/14] powerpc/64s: idle hotplug lazy-irq simplification

2017-06-08 Thread Nicholas Piggin
Rather than concern ourselves with any soft-mask logic in the CPU hotplug handler, just hard disable interrupts. This ensures there are no lazy-irqs pending, which means we can call directly to idle instruction in order to sleep. Signed-off-by: Nicholas Piggin ---

[PATCH 01/14] powerpc/64s: idle move soft interrupt mask logic into C code

2017-06-08 Thread Nicholas Piggin
This simplifies the asm and fixes irq-off tracing over sleep instructions. Also move powersave_nap check for POWER8 into C code, and move PSSCR register value calculation for POWER9 into C. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/machdep.h | 1 +

[PATCH 00/14] idle performance improvements

2017-06-08 Thread Nicholas Piggin
These patches improve performance of idle sleep and wake. The first patches rework the lazy-irq handling of idle code a bit to make it simpler first. Any review would be welcome. I've tested this with some performance and simple correctness tests on POWER8, POWER9, and with KVM on POWER8, so it's

[PATCH 4/4] powerpc/64s: context switch avoid cpabort

2017-06-08 Thread Nicholas Piggin
The ISA v3.0B copy-paste facility only requires cpabort when switching to a process that has foreign real addresses mapped (direct access to accelerators), to clear a potential copy buffer filled by a previous thread. There is no accelerator driver implemented yet, so cpabort can be removed. It

[PATCH 3/4] powerpc/64: context switch an hwsync instruction can be avoided

2017-06-08 Thread Nicholas Piggin
The hwsync in the context switch code to prevent MMIO access being reordered from the point of view of a single process if it gets migrated to a different CPU is not required because there is an hwsync performed earlier in the context switch path. Comment this so it's clear enough if anything

[PATCH 2/4] powerpc/64: context switch avoid reservation-clearing instruction

2017-06-08 Thread Nicholas Piggin
There is no need to break reservation in _switch, because we are guranteed that context switch path will include a larx/stcx. Comment the guarantee and remove the reservation clear from _switch. This is worth 1-2% in context switch performance. Signed-off-by: Nicholas Piggin

[PATCH 1/4] powerpc/64s: context switch leave interrupts hard enabled for radix

2017-06-08 Thread Nicholas Piggin
Commit 4387e9ff25 ("[POWERPC] Fix PMU + soft interrupt disable bug") hard disabled interrupts over the low level context switch, because the SLB management can't cope with a PMU interrupt accesing the stack in that window. Radix based kernel mapping does not use the SLB so it does not require

[PATCH 2/2] powerpc/64: syscall avoid restore_math call if possible

2017-06-08 Thread Nicholas Piggin
The syscall exit code that branches to restore_math is quite heavy on Book3S, consisting of 2 mtmsr instructions. Threads that don't use both FP and vector can get caught here if the kernel ever uses FP or vector. Lazy-FP/vec context switching also trips this case. So check for lazy FP and vector

[PATCH 1/2] powerpc/64s: syscall optimize hypercall/syscall entry

2017-06-08 Thread Nicholas Piggin
After bc3551257a ("powerpc/64: Allow for relocation-on interrupts from guest to host"), a getppid() system call goes from 307 cycles to 358 cycles (+17%) on POWER8. This is due significantly to the scratch SPR used by the hypercall check. It turns out there are a some volatile registers common to

Re: [PATCH v2 1/4] powerpc/kprobes: Pause function_graph tracing during jprobes handling

2017-06-08 Thread Steven Rostedt
On Thu, 8 Jun 2017 22:43:54 +0900 Masami Hiramatsu wrote: > On Thu, 1 Jun 2017 16:18:15 +0530 > "Naveen N. Rao" wrote: > > > This fixes a crash when function_graph and jprobes are used together. > > This is essentially commit 237d28db036e

Re: [PATCH] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH

2017-06-08 Thread Murilo Opsfelder Araújo
On 06/08/2017 10:10 AM, Alexey Kardashevskiy wrote: [...] > The config you attached in the first mail has CONFIG_VFIO_SPAPR_EEH=m, here > is my confusion. The config from the link below does not have KVM_BOOK3S_64 > which selects SPAPR_TCE_IOMMU and which in turn selects VFIO_IOMMU_SPAPR_TCE. > >

Re: [PATCH 25/44] arm: implement ->mapping_error

2017-06-08 Thread Russell King - ARM Linux
BOn Thu, Jun 08, 2017 at 03:25:50PM +0200, Christoph Hellwig wrote: > +static int dmabounce_mapping_error(struct device *dev, dma_addr_t dma_addr) > +{ > + if (dev->archdata.dmabounce) > + return 0; I'm not convinced that we need this check here: dev->archdata.dmabounce =

Re: [PATCH 28/44] sparc: remove arch specific dma_supported implementations

2017-06-08 Thread David Miller
From: Christoph Hellwig Date: Thu, 8 Jun 2017 15:25:53 +0200 > Usually dma_supported decisions are done by the dma_map_ops instance. > Switch sparc to that model by providing a ->dma_supported instance for > sbus that always returns false, and implementations tailored to the sun4u

Re: [PATCH 20/44] sparc: implement ->mapping_error

2017-06-08 Thread David Miller
From: Christoph Hellwig Date: Thu, 8 Jun 2017 15:25:45 +0200 > DMA_ERROR_CODE is going to go away, so don't rely on it. > > Signed-off-by: Christoph Hellwig Acked-by: David S. Miller

Re: [PATCH 28/44] sparc: remove arch specific dma_supported implementations

2017-06-08 Thread Julian Calaby
Hi Christoph, On Thu, Jun 8, 2017 at 11:25 PM, Christoph Hellwig wrote: > Usually dma_supported decisions are done by the dma_map_ops instance. > Switch sparc to that model by providing a ->dma_supported instance for > sbus that always returns false, and implementations tailored to

Re: [PATCH 27/44] sparc: remove leon_dma_ops

2017-06-08 Thread David Miller
From: Christoph Hellwig Date: Thu, 8 Jun 2017 15:25:52 +0200 > We can just use pci32_dma_ops. > > Btw, given that leon is 32-bit and appears to be PCI based, do even need > the special case for it in get_arch_dma_ops at all? I would need to defer to the LEON developers on that,

Re: [PATCH 02/44] ibmveth: properly unwind on init errors

2017-06-08 Thread David Miller
From: Christoph Hellwig Date: Thu, 8 Jun 2017 15:25:27 +0200 > That way the driver doesn't have to rely on DMA_ERROR_CODE, which > is not a public API and going away. > > Signed-off-by: Christoph Hellwig Acked-by: David S. Miller

Re: clean up and modularize arch dma_mapping interface

2017-06-08 Thread David Miller
From: Christoph Hellwig Date: Thu, 8 Jun 2017 15:25:25 +0200 > for a while we have a generic implementation of the dma mapping routines > that call into per-arch or per-device operations. But right now there > still are various bits in the interfaces where don't clearly operate >

Re: [PATCH 16/44] arm64: remove DMA_ERROR_CODE

2017-06-08 Thread Robin Murphy
On 08/06/17 14:25, Christoph Hellwig wrote: > The dma alloc interface returns an error by return NULL, and the > mapping interfaces rely on the mapping_error method, which the dummy > ops already implement correctly. > > Thus remove the DMA_ERROR_CODE define. Reviewed-by: Robin Murphy

Re: [PATCH v2 3/4] powerpc/kprobes_on_ftrace: Skip livepatch_handler() for jprobes

2017-06-08 Thread Masami Hiramatsu
On Thu, 1 Jun 2017 16:18:17 +0530 "Naveen N. Rao" wrote: > ftrace_caller() depends on a modified regs->nip to detect if a certain > function has been livepatched. However, with KPROBES_ON_FTRACE, it is > possible for regs->nip to have been modified by the

Re: [PATCH 06/44] iommu/dma: don't rely on DMA_ERROR_CODE

2017-06-08 Thread Robin Murphy
Hi Christoph, On 08/06/17 14:25, Christoph Hellwig wrote: > DMA_ERROR_CODE is not a public API and will go away soon. dma dma-iommu > driver already implements a proper ->mapping_error method, so it's only > using the value internally. Add a new local define using the value > that arm64 which

Re: [RFC][PATCH 5/5] powerpc: Remove SYNC from _switch

2017-06-08 Thread Peter Zijlstra
On Thu, Jun 08, 2017 at 11:18:13PM +1000, Nicholas Piggin wrote: > I guess I see your point... okay, will constrain the comment to powerpc > context switch and primitives code. Any fundamental change to such > scheduler barriers I guess would require at least a glance over arch > switch code :)

Re: [PATCH v2 1/4] powerpc/kprobes: Pause function_graph tracing during jprobes handling

2017-06-08 Thread Masami Hiramatsu
On Thu, 1 Jun 2017 16:18:15 +0530 "Naveen N. Rao" wrote: > This fixes a crash when function_graph and jprobes are used together. > This is essentially commit 237d28db036e ("ftrace/jprobes/x86: Fix > conflict between jprobes and function graph tracing"), but for

Re: [PATCH 11/16] powerpc: vio_cmo: use dev_groups and not dev_attrs for bus_type

2017-06-08 Thread Greg Kroah-Hartman
On Thu, Jun 08, 2017 at 11:12:10PM +1000, Michael Ellerman wrote: > Greg Kroah-Hartman writes: > > > The dev_attrs field has long been "depreciated" and is finally being > > removed, so move the driver to use the "correct" dev_groups field > > instead for struct

[PATCH 44/44] powerpc: merge __dma_set_mask into dma_set_mask

2017-06-08 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- arch/powerpc/include/asm/dma-mapping.h | 1 - arch/powerpc/kernel/dma.c | 13 - 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/include/asm/dma-mapping.h

[PATCH 43/44] dma-mapping: remove the set_dma_mask method

2017-06-08 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- arch/powerpc/kernel/dma.c | 4 include/linux/dma-mapping.h | 6 -- 2 files changed, 10 deletions(-) diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c index 41c749586bd2..466c9f07b288 100644 ---

[PATCH 42/44] powerpc/cell: use the dma_supported method for ops switching

2017-06-08 Thread Christoph Hellwig
Besides removing the last instance of the set_dma_mask method this also reduced the code duplication. Signed-off-by: Christoph Hellwig --- arch/powerpc/platforms/cell/iommu.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git

[PATCH 41/44] powerpc/cell: clean up fixed mapping dma_ops initialization

2017-06-08 Thread Christoph Hellwig
By the time cell_pci_dma_dev_setup calls cell_dma_dev_setup no device can have the fixed map_ops set yet as it's only set by the set_dma_mask method. So move the setup for the fixed case to be only called in that place instead of indirecting through cell_dma_dev_setup. Signed-off-by: Christoph

[PATCH 40/44] tile: remove dma_supported and mapping_error methods

2017-06-08 Thread Christoph Hellwig
These just duplicate the default behavior if no method is provided. Signed-off-by: Christoph Hellwig --- arch/tile/kernel/pci-dma.c | 30 -- 1 file changed, 30 deletions(-) diff --git a/arch/tile/kernel/pci-dma.c b/arch/tile/kernel/pci-dma.c index

[PATCH 39/44] xen-swiotlb: remove xen_swiotlb_set_dma_mask

2017-06-08 Thread Christoph Hellwig
This just duplicates the generic implementation. Signed-off-by: Christoph Hellwig --- drivers/xen/swiotlb-xen.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index c3a04b2d7532..82fc54f8eb77 100644 ---

[PATCH 38/44] arm: implement ->dma_supported instead of ->set_dma_mask

2017-06-08 Thread Christoph Hellwig
Same behavior, less code duplication. Signed-off-by: Christoph Hellwig --- arch/arm/common/dmabounce.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index 4aabf117e136..d89a0b56b245 100644 ---

[PATCH 37/44] mips/loongson64: implement ->dma_supported instead of ->set_dma_mask

2017-06-08 Thread Christoph Hellwig
Same behavior, less code duplication. Signed-off-by: Christoph Hellwig --- arch/mips/loongson64/common/dma-swiotlb.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/arch/mips/loongson64/common/dma-swiotlb.c

[PATCH 35/44] x86: remove arch specific dma_supported implementation

2017-06-08 Thread Christoph Hellwig
And instead wire it up as method for all the dma_map_ops instances. Note that this also means the arch specific check will be fully instead of partially applied in the AMD iommu driver. Signed-off-by: Christoph Hellwig --- arch/x86/include/asm/dma-mapping.h | 3 ---

[PATCH 36/44] dma-mapping: remove HAVE_ARCH_DMA_SUPPORTED

2017-06-08 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/linux/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index a57875309bfd..3e5908656226 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h

[PATCH 34/44] arm: remove arch specific dma_supported implementation

2017-06-08 Thread Christoph Hellwig
And instead wire it up as method for all the dma_map_ops instances. Note that the code seems a little fishy for dmabounce and iommu, but for now I'd like to preserve the existing behavior 1:1. Signed-off-by: Christoph Hellwig --- arch/arm/common/dmabounce.c| 1 +

[PATCH 32/44] hexagon: remove the unused dma_is_consistent prototype

2017-06-08 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- arch/hexagon/include/asm/dma-mapping.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/hexagon/include/asm/dma-mapping.h b/arch/hexagon/include/asm/dma-mapping.h index 9c15cb5271a6..463dbc18f853 100644 ---

[PATCH 33/44] openrisc: remove arch-specific dma_supported implementation

2017-06-08 Thread Christoph Hellwig
This implementation is simply bogus - hexagon only has a simple direct mapped DMA implementation and thus doesn't care about the address. Signed-off-by: Christoph Hellwig --- arch/openrisc/include/asm/dma-mapping.h | 7 --- 1 file changed, 7 deletions(-) diff --git

[PATCH 31/44] hexagon: remove arch-specific dma_supported implementation

2017-06-08 Thread Christoph Hellwig
This implementation is simply bogus - hexagon only has a simple direct mapped DMA implementation and thus doesn't care about the address. Signed-off-by: Christoph Hellwig --- arch/hexagon/include/asm/dma-mapping.h | 2 -- arch/hexagon/kernel/dma.c | 9 - 2

[PATCH 30/44] dma-virt: remove dma_supported and mapping_error methods

2017-06-08 Thread Christoph Hellwig
These just duplicate the default behavior if no method is provided. Signed-off-by: Christoph Hellwig --- lib/dma-virt.c | 12 1 file changed, 12 deletions(-) diff --git a/lib/dma-virt.c b/lib/dma-virt.c index dcd4df1f7174..5c4f11329721 100644 --- a/lib/dma-virt.c +++

[PATCH 29/44] dma-noop: remove dma_supported and mapping_error methods

2017-06-08 Thread Christoph Hellwig
These just duplicate the default behavior if no method is provided. Signed-off-by: Christoph Hellwig --- lib/dma-noop.c | 12 1 file changed, 12 deletions(-) diff --git a/lib/dma-noop.c b/lib/dma-noop.c index de26c8b68f34..643a074f139d 100644 --- a/lib/dma-noop.c +++

[PATCH 28/44] sparc: remove arch specific dma_supported implementations

2017-06-08 Thread Christoph Hellwig
Usually dma_supported decisions are done by the dma_map_ops instance. Switch sparc to that model by providing a ->dma_supported instance for sbus that always returns false, and implementations tailored to the sun4u and sun4v cases for sparc64, and leave it unimplemented for PCI on sparc32, which

[PATCH 26/44] dma-mapping: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
And update the documentation - dma_mapping_error has been supported everywhere for a long time. Signed-off-by: Christoph Hellwig --- Documentation/DMA-API-HOWTO.txt | 31 +-- include/linux/dma-mapping.h | 5 - 2 files changed, 5 insertions(+),

[PATCH 27/44] sparc: remove leon_dma_ops

2017-06-08 Thread Christoph Hellwig
We can just use pci32_dma_ops. Btw, given that leon is 32-bit and appears to be PCI based, do even need the special case for it in get_arch_dma_ops at all? Signed-off-by: Christoph Hellwig --- arch/sparc/include/asm/dma-mapping.h | 3 +-- arch/sparc/kernel/ioport.c | 5

[PATCH 25/44] arm: implement ->mapping_error

2017-06-08 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig --- arch/arm/common/dmabounce.c| 16 --- arch/arm/include/asm/dma-iommu.h | 2 ++ arch/arm/include/asm/dma-mapping.h | 1 - arch/arm/mm/dma-mapping.c | 41

[PATCH 22/44] x86/pci-nommu: implement ->mapping_error

2017-06-08 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig --- arch/x86/kernel/pci-nommu.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c index

[PATCH 24/44] x86: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
All dma_map_ops instances now handle their errors through ->mapping_error. Signed-off-by: Christoph Hellwig --- arch/x86/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h index

[PATCH 23/44] x86/calgary: implement ->mapping_error

2017-06-08 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig --- arch/x86/kernel/pci-calgary_64.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/arch/x86/kernel/pci-calgary_64.c

[PATCH 21/44] powerpc: implement ->mapping_error

2017-06-08 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Instead define a ->mapping_error method for all IOMMU based dma operation instances. The direct ops don't ever return an error and don't need a ->mapping_error method. Signed-off-by: Christoph Hellwig ---

[PATCH 20/44] sparc: implement ->mapping_error

2017-06-08 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig --- arch/sparc/include/asm/dma-mapping.h | 2 -- arch/sparc/kernel/iommu.c| 12 +--- arch/sparc/kernel/iommu_common.h | 2 ++ arch/sparc/kernel/pci_sun4v.c|

[PATCH 19/44] s390: implement ->mapping_error

2017-06-08 Thread Christoph Hellwig
s390 can also use noop_dma_ops, and while that currently does not return errors it will so in the future. Implementing the mapping_error method is the proper way to have per-ops error conditions. Signed-off-by: Christoph Hellwig --- arch/s390/include/asm/dma-mapping.h | 2 --

[PATCH 18/44] iommu/amd: implement ->mapping_error

2017-06-08 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig --- drivers/iommu/amd_iommu.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index

[PATCH 16/44] arm64: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
The dma alloc interface returns an error by return NULL, and the mapping interfaces rely on the mapping_error method, which the dummy ops already implement correctly. Thus remove the DMA_ERROR_CODE define. Signed-off-by: Christoph Hellwig --- arch/arm64/include/asm/dma-mapping.h |

[PATCH 17/44] hexagon: switch to use ->mapping_error for error reporting

2017-06-08 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- arch/hexagon/include/asm/dma-mapping.h | 2 -- arch/hexagon/kernel/dma.c | 12 +--- arch/hexagon/kernel/hexagon_ksyms.c| 1 - 3 files changed, 9 insertions(+), 6 deletions(-) diff --git

[PATCH 15/44] xtensa: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
xtensa already implements the mapping_error method for its only dma_map_ops instance. Signed-off-by: Christoph Hellwig --- arch/xtensa/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/xtensa/include/asm/dma-mapping.h

[PATCH 14/44] sh: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
sh does not return errors for dma_map_page. Signed-off-by: Christoph Hellwig --- arch/sh/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/sh/include/asm/dma-mapping.h b/arch/sh/include/asm/dma-mapping.h index d99008af5f73..9b06be07db4d 100644 ---

[PATCH 11/44] m32r: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
dma-noop is the only dma_mapping_ops instance for m32r and does not return errors. Signed-off-by: Christoph Hellwig --- arch/m32r/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/m32r/include/asm/dma-mapping.h

[PATCH 10/44] ia64: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
All ia64 dma_mapping_ops instances already have a mapping_error member. Signed-off-by: Christoph Hellwig --- arch/ia64/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h index

[PATCH 12/44] microblaze: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
microblaze does not return errors for dma_map_page. Signed-off-by: Christoph Hellwig --- arch/microblaze/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/microblaze/include/asm/dma-mapping.h b/arch/microblaze/include/asm/dma-mapping.h index

[PATCH 13/44] openrisc: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
openrisc does not return errors for dma_map_page. Signed-off-by: Christoph Hellwig --- arch/openrisc/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/openrisc/include/asm/dma-mapping.h b/arch/openrisc/include/asm/dma-mapping.h index

  1   2   >