Re: [PATCH v2 06/32] s390: reuse asm-generic/barrier.h

2016-01-04 Thread Michael S. Tsirkin
On Mon, Jan 04, 2016 at 04:03:39PM +0100, Martin Schwidefsky wrote: > On Mon, 4 Jan 2016 14:20:42 +0100 > Peter Zijlstra wrote: > > > On Thu, Dec 31, 2015 at 09:06:30PM +0200, Michael S. Tsirkin wrote: > > > On s390 read_barrier_depends, smp_read_barrier_depends > > >

Re: [PATCH 3/3] checkpatch: add virt barriers

2016-01-04 Thread Michael S. Tsirkin
On Mon, Jan 04, 2016 at 08:47:53AM -0800, Joe Perches wrote: > On Mon, 2016-01-04 at 13:37 +0200, Michael S. Tsirkin wrote: > > Add virt_ barriers to list of barriers to check for > > presence of a comment. > > Are these virt_ barriers used anywhere? > > I see some virtio_ barrier like uses.

Re: [PATCH v2 17/32] arm: define __smp_xxx

2016-01-04 Thread Michael S. Tsirkin
On Mon, Jan 04, 2016 at 02:54:20PM +0100, Peter Zijlstra wrote: > On Mon, Jan 04, 2016 at 02:36:58PM +0100, Peter Zijlstra wrote: > > On Sun, Jan 03, 2016 at 11:12:44AM +0200, Michael S. Tsirkin wrote: > > > On Sat, Jan 02, 2016 at 11:24:38AM +, Russell King - ARM Linux wrote: > > > > > > My

Re: [RFC PATCH v2 3/3] vfio-pci: Allow to mmap MSI-X table if EEH is supported

2016-01-04 Thread Alex Williamson
On Thu, 2015-12-31 at 16:50 +0800, Yongji Xie wrote: > Current vfio-pci implementation disallows to mmap MSI-X > table in case that user get to touch this directly. > > However, EEH mechanism can ensure that a given pci device > can only shoot the MSIs assigned for its PE. So we think > it's safe

Re: [RFC PATCH v2 1/3] PCI: Add support for enforcing all MMIO BARs to be page aligned

2016-01-04 Thread Alex Williamson
On Thu, 2015-12-31 at 16:50 +0800, Yongji Xie wrote: > When vfio passthrough a PCI device of which MMIO BARs > are smaller than PAGE_SIZE, guest will not handle the > mmio accesses to the BARs which leads to mmio emulations > in host. > > This is because vfio will not allow to passthrough one >

Re: [PATCH v2 22/32] s390: define __smp_xxx

2016-01-04 Thread Michael S. Tsirkin
On Mon, Jan 04, 2016 at 02:45:25PM +0100, Peter Zijlstra wrote: > On Thu, Dec 31, 2015 at 09:08:38PM +0200, Michael S. Tsirkin wrote: > > This defines __smp_xxx barriers for s390, > > for use by virtualization. > > > > Some smp_xxx barriers are removed as they are > > defined correctly by

Re: [PATCH v2 06/32] s390: reuse asm-generic/barrier.h

2016-01-04 Thread Michael S. Tsirkin
On Mon, Jan 04, 2016 at 02:20:42PM +0100, Peter Zijlstra wrote: > On Thu, Dec 31, 2015 at 09:06:30PM +0200, Michael S. Tsirkin wrote: > > On s390 read_barrier_depends, smp_read_barrier_depends > > smp_store_mb(), smp_mb__before_atomic and smp_mb__after_atomic match the > > asm-generic variants

Re: [PATCH 1/3] checkpatch.pl: add missing memory barriers

2016-01-04 Thread Michael S. Tsirkin
On Mon, Jan 04, 2016 at 08:07:40AM -0800, Joe Perches wrote: > On Mon, 2016-01-04 at 13:36 +0200, Michael S. Tsirkin wrote: > > SMP-only barriers were missing in checkpatch.pl > > > > Refactor code slightly to make adding more variants easier. > > > > Signed-off-by: Michael S. Tsirkin

Re: [PATCH v2 17/32] arm: define __smp_xxx

2016-01-04 Thread Michael S. Tsirkin
On Mon, Jan 04, 2016 at 02:36:58PM +0100, Peter Zijlstra wrote: > On Sun, Jan 03, 2016 at 11:12:44AM +0200, Michael S. Tsirkin wrote: > > On Sat, Jan 02, 2016 at 11:24:38AM +, Russell King - ARM Linux wrote: > > > > My only concern is that it gives people an additional handle onto a > > >

[PATCH] powerpc/fsl-pci: Correct the comparison of the LTSSM

2016-01-04 Thread Zhiqiang Hou
From: Hou Zhiqiang Only the value PCIE_LTSSM_L0 stands for the link is up, instead of >= PCIE_LTSSM_L0. Signed-off-by: Hou Zhiqiang --- arch/powerpc/sysdev/fsl_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2] perf/probe: Search both .eh_frame and .debug_frame sections for probe location

2016-01-04 Thread Hemant Kumar
perf probe through debuginfo__find_probes() in util/probe-finder.c checks for the functions' frame descriptions in either .eh_frame section of an ELF or the .debug_frame. The check is based on whether either one of these sections is present. Depending on distro, toolchain defaults, architetcutre,

Re: [Xen-devel] [PATCH v2 33/34] xenbus: use virt_xxx barriers

2016-01-04 Thread David Vrabel
On 31/12/15 19:10, Michael S. Tsirkin wrote: > drivers/xen/xenbus/xenbus_comms.c uses > full memory barriers to communicate with the other side. > > For guests compiled with CONFIG_SMP, smp_wmb and smp_mb > would be sufficient, so mb() and wmb() here are only needed if > a non-SMP guest runs on

Re: [Xen-devel] [PATCH v2 34/34] xen/io: use virt_xxx barriers

2016-01-04 Thread David Vrabel
On 31/12/15 19:10, Michael S. Tsirkin wrote: > include/xen/interface/io/ring.h uses > full memory barriers to communicate with the other side. > > For guests compiled with CONFIG_SMP, smp_wmb and smp_mb > would be sufficient, so mb() and wmb() here are only needed if > a non-SMP guest runs on an

[PATCH 2/3] checkpatch: check for __smp outside barrier.h

2016-01-04 Thread Michael S. Tsirkin
Introduction of __smp barriers cleans up a bunch of duplicate code, but it gives people an additional handle onto a "new" set of barriers - just because they're prefixed with __* unfortunately doesn't stop anyone from using it (as happened with other arch stuff before.) Add a checkpatch test so

[PATCH 3/3] checkpatch: add virt barriers

2016-01-04 Thread Michael S. Tsirkin
Add virt_ barriers to list of barriers to check for presence of a comment. Signed-off-by: Michael S. Tsirkin --- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index e3f9ad9..5fb6ef7

[PATCH 0/3] checkpatch: handling of memory barriers

2016-01-04 Thread Michael S. Tsirkin
As part of memory barrier cleanup, this patchset extends checkpatch to make it easier to stop incorrect memory barrier usage. This applies on top of my series arch: barrier cleanup + barriers for virt and will be included in the next version of the series. Michael S. Tsirkin (3):

Re: [PATCH v2 34/34] xen/io: use virt_xxx barriers

2016-01-04 Thread Stefano Stabellini
On Thu, 31 Dec 2015, Michael S. Tsirkin wrote: > include/xen/interface/io/ring.h uses > full memory barriers to communicate with the other side. > > For guests compiled with CONFIG_SMP, smp_wmb and smp_mb > would be sufficient, so mb() and wmb() here are only needed if > a non-SMP guest runs on

Re: [PATCH v2 33/34] xenbus: use virt_xxx barriers

2016-01-04 Thread Stefano Stabellini
On Thu, 31 Dec 2015, Michael S. Tsirkin wrote: > drivers/xen/xenbus/xenbus_comms.c uses > full memory barriers to communicate with the other side. > > For guests compiled with CONFIG_SMP, smp_wmb and smp_mb > would be sufficient, so mb() and wmb() here are only needed if > a non-SMP guest runs on

[PATCH 1/3] checkpatch.pl: add missing memory barriers

2016-01-04 Thread Michael S. Tsirkin
SMP-only barriers were missing in checkpatch.pl Refactor code slightly to make adding more variants easier. Signed-off-by: Michael S. Tsirkin --- scripts/checkpatch.pl | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl

[PATCH v3 2/2] cpufreq: powernv: Redesign the presentation of throttle notification

2016-01-04 Thread Shilpasri G Bhat
Replace the throttling event console messages to perf trace point "power:powernv_throttle" and throttle counter stats which are exported in sysfs in /sys/devices/system/cpu/cpufreq/chipN. The newly added sysfs files are as follows: 1)/sys/devices/system/cpu/cpufreq/chip0/throttle_frequencies

[PATCH v3 0/2] cpufreq: powernv: Redesign the presentation of throttle notification

2016-01-04 Thread Shilpasri G Bhat
In POWER8, OCC(On-Chip-Controller) can throttle the frequency of the CPU when the chip crosses its thermal and power limits. Currently, powernv-cpufreq driver detects and reports this event as a console message. Some boxes may not sustain the max turbo frequency in all conditions and can be

[PATCH v3 1/2] cpufreq: powernv/tracing: Add powernv_throttle tracepoint

2016-01-04 Thread Shilpasri G Bhat
This patch adds the powernv_throttle tracepoint to trace the CPU frequency throttling event, which is used by the powernv-cpufreq driver in POWER8. Signed-off-by: Shilpasri G Bhat CC: Ingo Molnar CC: Steven Rostedt --- No

Pull request: scottwood/linux.git next

2016-01-04 Thread Scott Wood
Highlights include moving QE code out of arch/powerpc (to be shared with arm), device tree updates, and minor fixes. Sorry for sending this in so late and not getting to everything in my queue -- in addition to the holidays I've been slowed down by email troubles and a broken arm. The following

Re: [PATCH v2 20/32] metag: define __smp_xxx

2016-01-04 Thread James Hogan
Hi Michael, On Thu, Dec 31, 2015 at 09:08:22PM +0200, Michael S. Tsirkin wrote: > This defines __smp_xxx barriers for metag, > for use by virtualization. > > smp_xxx barriers are removed as they are > defined correctly by asm-generic/barriers.h > > Note: as __smp_XX macros should not depend on

Re: [PATCH 3/3] checkpatch: add virt barriers

2016-01-04 Thread Joe Perches
On Mon, 2016-01-04 at 23:07 +0200, Michael S. Tsirkin wrote: > On Mon, Jan 04, 2016 at 08:47:53AM -0800, Joe Perches wrote: > > On Mon, 2016-01-04 at 13:37 +0200, Michael S. Tsirkin wrote: > > > Add virt_ barriers to list of barriers to check for > > > presence of a comment. > > > > Are these

Re: [PATCH 1/3] checkpatch.pl: add missing memory barriers

2016-01-04 Thread Joe Perches
On Mon, 2016-01-04 at 22:45 +0200, Michael S. Tsirkin wrote: > On Mon, Jan 04, 2016 at 08:07:40AM -0800, Joe Perches wrote: > > On Mon, 2016-01-04 at 13:36 +0200, Michael S. Tsirkin wrote: > > > SMP-only barriers were missing in checkpatch.pl > > > > > > Refactor code slightly to make adding more

Re: [RFC PATCH v2 3/3] vfio-pci: Allow to mmap MSI-X table if EEH is supported

2016-01-04 Thread Benjamin Herrenschmidt
On Mon, 2016-01-04 at 14:07 -0700, Alex Williamson wrote: > On Thu, 2015-12-31 at 16:50 +0800, Yongji Xie wrote: > > Current vfio-pci implementation disallows to mmap MSI-X > > table in case that user get to touch this directly. > > > > However, EEH mechanism can ensure that a given pci device >

Re: [PATCH] ppc64: select HAVE_CONTEXT_TRACKING by default

2016-01-04 Thread Shi, Yang
Hi folks, Any comment on this is appreciated. Thanks, Yang On 12/9/2015 2:43 PM, Yang Shi wrote: The functionality of context tracking has been implemented by PPC64 and HAVE_CONTEXT_TRACKING was selected by pseries by default. Actually, it is applicale to all PPC64 platforms, so select it in

Re: [PATCH v2 15/32] powerpc: define __smp_xxx

2016-01-04 Thread Boqun Feng
Hi Michael, On Thu, Dec 31, 2015 at 09:07:42PM +0200, Michael S. Tsirkin wrote: > This defines __smp_xxx barriers for powerpc > for use by virtualization. > > smp_xxx barriers are removed as they are > defined correctly by asm-generic/barriers.h > > This reduces the amount of arch-specific

Re: [PATCH v2 06/32] s390: reuse asm-generic/barrier.h

2016-01-04 Thread Peter Zijlstra
On Thu, Dec 31, 2015 at 09:06:30PM +0200, Michael S. Tsirkin wrote: > On s390 read_barrier_depends, smp_read_barrier_depends > smp_store_mb(), smp_mb__before_atomic and smp_mb__after_atomic match the > asm-generic variants exactly. Drop the local definitions and pull in > asm-generic/barrier.h

Re: [PATCH v2 22/32] s390: define __smp_xxx

2016-01-04 Thread Peter Zijlstra
On Thu, Dec 31, 2015 at 09:08:38PM +0200, Michael S. Tsirkin wrote: > This defines __smp_xxx barriers for s390, > for use by virtualization. > > Some smp_xxx barriers are removed as they are > defined correctly by asm-generic/barriers.h > > Note: smp_mb, smp_rmb and smp_wmb are defined as full

Re: [PATCH v2 17/32] arm: define __smp_xxx

2016-01-04 Thread Peter Zijlstra
On Sun, Jan 03, 2016 at 11:12:44AM +0200, Michael S. Tsirkin wrote: > On Sat, Jan 02, 2016 at 11:24:38AM +, Russell King - ARM Linux wrote: > > My only concern is that it gives people an additional handle onto a > > "new" set of barriers - just because they're prefixed with __* > >

Re: [PATCH v2 20/32] metag: define __smp_xxx

2016-01-04 Thread Peter Zijlstra
On Thu, Dec 31, 2015 at 09:08:22PM +0200, Michael S. Tsirkin wrote: > +#ifdef CONFIG_SMP > +#define fence() metag_fence() > +#else > +#define fence() do { } while (0) > #endif James, it strikes me as odd that fence() is a no-op instead of a barrier() for UP, can you verify/explain?

Re: [PATCH v2 31/32] sh: support a 2-byte smp_store_mb

2016-01-04 Thread Peter Zijlstra
On Thu, Dec 31, 2015 at 09:09:47PM +0200, Michael S. Tsirkin wrote: > At the moment, xchg on sh only supports 4 and 1 byte values, so using it > from smp_store_mb means attempts to store a 2 byte value using this > macro fail. > > And happens to be exactly what virtio drivers want to do. > >

Re: [PATCH v2 11/32] mips: reuse asm-generic/barrier.h

2016-01-04 Thread Peter Zijlstra
On Thu, Dec 31, 2015 at 09:07:10PM +0200, Michael S. Tsirkin wrote: > -#define smp_store_release(p, v) > \ > -do { \ > - compiletime_assert_atomic_type(*p);

Re: [PATCH v2 17/32] arm: define __smp_xxx

2016-01-04 Thread Peter Zijlstra
On Mon, Jan 04, 2016 at 02:36:58PM +0100, Peter Zijlstra wrote: > On Sun, Jan 03, 2016 at 11:12:44AM +0200, Michael S. Tsirkin wrote: > > On Sat, Jan 02, 2016 at 11:24:38AM +, Russell King - ARM Linux wrote: > > > > My only concern is that it gives people an additional handle onto a > > >

Re: [PATCH v2 17/32] arm: define __smp_xxx

2016-01-04 Thread Russell King - ARM Linux
On Mon, Jan 04, 2016 at 02:54:20PM +0100, Peter Zijlstra wrote: > On Mon, Jan 04, 2016 at 02:36:58PM +0100, Peter Zijlstra wrote: > > On Sun, Jan 03, 2016 at 11:12:44AM +0200, Michael S. Tsirkin wrote: > > > On Sat, Jan 02, 2016 at 11:24:38AM +, Russell King - ARM Linux wrote: > > > > > > My

Re: [PATCH v2 33/34] xenbus: use virt_xxx barriers

2016-01-04 Thread Peter Zijlstra
On Thu, Dec 31, 2015 at 09:10:01PM +0200, Michael S. Tsirkin wrote: > drivers/xen/xenbus/xenbus_comms.c uses > full memory barriers to communicate with the other side. > > For guests compiled with CONFIG_SMP, smp_wmb and smp_mb > would be sufficient, so mb() and wmb() here are only needed if > a

Re: [PATCH v2 20/32] metag: define __smp_xxx

2016-01-04 Thread Peter Zijlstra
On Mon, Jan 04, 2016 at 03:25:58PM +, James Hogan wrote: > It is used along with the metag specific __global_lock1() (global > voluntary lock between hw threads) whenever a write is performed, and by > smp_mb/smp_rmb to try to catch other cases, but I've never been > confident this fixes every

Re: [PATCH v2 20/32] metag: define __smp_xxx

2016-01-04 Thread James Hogan
Hi Peter, On Mon, Jan 04, 2016 at 02:41:28PM +0100, Peter Zijlstra wrote: > On Thu, Dec 31, 2015 at 09:08:22PM +0200, Michael S. Tsirkin wrote: > > +#ifdef CONFIG_SMP > > +#define fence() metag_fence() > > +#else > > +#define fence()do { } while (0) > > #endif > > James, it strikes

Re: [PATCH v2 06/32] s390: reuse asm-generic/barrier.h

2016-01-04 Thread Martin Schwidefsky
On Mon, 4 Jan 2016 14:20:42 +0100 Peter Zijlstra wrote: > On Thu, Dec 31, 2015 at 09:06:30PM +0200, Michael S. Tsirkin wrote: > > On s390 read_barrier_depends, smp_read_barrier_depends > > smp_store_mb(), smp_mb__before_atomic and smp_mb__after_atomic match the > >

Re: [PATCH 1/3] checkpatch.pl: add missing memory barriers

2016-01-04 Thread Russell King - ARM Linux
On Mon, Jan 04, 2016 at 08:07:40AM -0800, Joe Perches wrote: > On Mon, 2016-01-04 at 13:36 +0200, Michael S. Tsirkin wrote: > > + my $all_barriers = join('|', (@barriers, @smp_barriers)); > > + > > + if ($line =~ /\b($all_barriers)\(/) { > > It would be better to use

Re: [PATCH 1/3] checkpatch.pl: add missing memory barriers

2016-01-04 Thread Joe Perches
On Mon, 2016-01-04 at 16:11 +, Russell King - ARM Linux wrote: > On Mon, Jan 04, 2016 at 08:07:40AM -0800, Joe Perches wrote: > > On Mon, 2016-01-04 at 13:36 +0200, Michael S. Tsirkin wrote: > > > + my $all_barriers = join('|', (@barriers, @smp_barriers)); > > > + > > > + if

Re: [PATCH v2 20/32] metag: define __smp_xxx

2016-01-04 Thread James Hogan
On Mon, Jan 04, 2016 at 04:30:36PM +0100, Peter Zijlstra wrote: > On Mon, Jan 04, 2016 at 03:25:58PM +, James Hogan wrote: > > It is used along with the metag specific __global_lock1() (global > > voluntary lock between hw threads) whenever a write is performed, and by > > smp_mb/smp_rmb to

Re: [PATCH 1/3] checkpatch.pl: add missing memory barriers

2016-01-04 Thread Joe Perches
On Mon, 2016-01-04 at 13:36 +0200, Michael S. Tsirkin wrote: > SMP-only barriers were missing in checkpatch.pl > > Refactor code slightly to make adding more variants easier. > > Signed-off-by: Michael S. Tsirkin > --- >  scripts/checkpatch.pl | 9 - >  1 file changed, 8

Re: [PATCH v2 10/32] metag: reuse asm-generic/barrier.h

2016-01-04 Thread James Hogan
On Thu, Dec 31, 2015 at 09:07:02PM +0200, Michael S. Tsirkin wrote: > On metag dma_rmb, dma_wmb, smp_store_mb, read_barrier_depends, > smp_read_barrier_depends, smp_store_release and smp_load_acquire match > the asm-generic variants exactly. Drop the local definitions and pull in >

Re: [PATCH 3/3] checkpatch: add virt barriers

2016-01-04 Thread Joe Perches
On Mon, 2016-01-04 at 13:37 +0200, Michael S. Tsirkin wrote: > Add virt_ barriers to list of barriers to check for > presence of a comment. Are these virt_ barriers used anywhere? I see some virtio_ barrier like uses. ___ Linuxppc-dev mailing list