Re: [PATCH v3 08/10] x86/hyper-v: use hypercall for remote TLB flush

2017-07-14 Thread Andy Lutomirski
On Thu, Jul 13, 2017 at 5:46 AM, Vitaly Kuznetsov wrote: > Andy Lutomirski writes: > >> On Tue, May 23, 2017 at 5:36 AM, Vitaly Kuznetsov >> wrote: >>> Andy Lutomirski writes: >>> Also, can you share the benchmark you used for these patches? >>> >>> I didn't do much while writing the

Re: [PATCH v9 08/10] x86/hyper-v: use hypercall for remote TLB flush

2017-07-14 Thread Andy Shevchenko
On Fri, Jul 14, 2017 at 3:44 PM, Vitaly Kuznetsov wrote: Couple of nits in case you are going send new version (I'm fine with this as well). > +static inline int fill_gva_list(u64 gva_list[], int offset, > + unsigned long start, unsigned long end) > +{ > +} + empt

Re: [PATCH][V2] staging: lustre: fix spelling mistake, "grranted" -> "granted"

2017-07-14 Thread Oleg Drokin
On Jul 14, 2017, at 5:33 PM, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistake in CERROR error message. Also > clean up the grammar. > > Signed-off-by: Colin Ian King Reviewed-by: Oleg Drokin > --- > drivers/staging/lustre/lustre/ptlrpc/import.c | 2 +- > 1 file c

[PATCH][V2] staging: lustre: fix spelling mistake, "grranted" -> "granted"

2017-07-14 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in CERROR error message. Also clean up the grammar. Signed-off-by: Colin Ian King --- drivers/staging/lustre/lustre/ptlrpc/import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/ptlrpc/impo

Re: [PATCH] staging: lustre: fix spelling mistake, "grranted" -> "granted"

2017-07-14 Thread Oleg Drokin
On Jul 14, 2017, at 9:26 AM, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistake in CERROR error message > > Signed-off-by: Colin Ian King > --- > drivers/staging/lustre/lustre/ptlrpc/import.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/dr

Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-14 Thread Arnd Bergmann
On Fri, Jul 14, 2017 at 3:09 PM, Dan Carpenter wrote: > On Fri, Jul 14, 2017 at 03:55:26PM +0300, Dan Carpenter wrote: >> I don't agree with it as a static analysis dev... > > What I mean is if it's a macro that returns -ENODEV or a function that > returns -ENODEV, they should both be treated the

Re: [PATCH 00/12] staging: ccree: coding style fixes

2017-07-14 Thread Gilad Ben-Yossef
On Fri, Jul 14, 2017 at 2:39 PM, Greg Kroah-Hartman wrote: > On Thu, Jul 13, 2017 at 11:19:50AM +0300, Gilad Ben-Yossef wrote: >> Another batch of ccree coding style fixes. >> >> These goes on top of commit a8c4ae12 ("staging: ccree: Fix alignment issues >> in ssi_sysfs.c") >> in staging-testing.

[PATCH] use __func__ to print "dcon_freeze_store"

2017-07-14 Thread KIU Shueng Chuan
Signed-off-by: KIU Shueng Chuan --- drivers/staging/olpc_dcon/olpc_dcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c index f7f3a780ec10..3a8d99fa9e49 100644 --- a/drivers/staging/olpc_dcon/olpc

[PATCH v1] staging: rts5208: Change fixed function names with "%s: ", __func__

2017-07-14 Thread Gaurav Pathak
staging: rts5208: Refactored code to avoid few defects. Signed-off-by: Gaurav Pathak --- Hi, Gaurav hope this text appaers in the email, and i put it at the right place in patch. drivers/staging/rts5208/ms.c| 5 +++-- drivers/staging/rts5208/rtsx.c | 4 ++-- drivers/staging/rts52

[PATCH] staging: lustre: fix spelling mistake, "grranted" -> "granted"

2017-07-14 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in CERROR error message Signed-off-by: Colin Ian King --- drivers/staging/lustre/lustre/ptlrpc/import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/ptlrpc/import.c b/drivers/staging/lust

Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-14 Thread Dan Carpenter
On Fri, Jul 14, 2017 at 03:55:26PM +0300, Dan Carpenter wrote: > I don't agree with it as a static analysis dev... What I mean is if it's a macro that returns -ENODEV or a function that returns -ENODEV, they should both be treated the same. The other warnings this check prints are quite clever.

Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-14 Thread Dan Carpenter
Ah... I see why it's complaining about these ones in particular... I don't agree with it as a static analysis dev, and I don't like the changes too much. But since it's only generating a hand full of warnings then I don't care. regards, dan carpenter ___

[PATCH v9 10/10] tracing/hyper-v: trace hyperv_mmu_flush_tlb_others()

2017-07-14 Thread Vitaly Kuznetsov
Add Hyper-V tracing subsystem and trace hyperv_mmu_flush_tlb_others(). Tracing is done the same way we do xen_mmu_flush_tlb_others(). Signed-off-by: Vitaly Kuznetsov Reviewed-by: Andy Shevchenko Reviewed-by: Stephen Hemminger --- MAINTAINERS | 1 + arch/x86/hyperv/mmu.

[PATCH v9 05/10] hyper-v: use fast hypercall for HVCALL_SIGNAL_EVENT

2017-07-14 Thread Vitaly Kuznetsov
We need to pass only 8 bytes of input for HvSignalEvent which makes it a perfect fit for fast hypercall. hv_input_signal_event_buffer is not needed any more and hv_input_signal_event is converted to union for convenience. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Andy Shevchenko Reviewed-by:

[PATCH v9 09/10] x86/hyper-v: support extended CPU ranges for TLB flush hypercalls

2017-07-14 Thread Vitaly Kuznetsov
Hyper-V hosts may support more than 64 vCPUs, we need to use HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX/LIST_EX hypercalls in this case. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Andy Shevchenko Reviewed-by: Stephen Hemminger --- arch/x86/hyperv/mmu.c | 134 +

[PATCH v9 06/10] x86/hyper-v: implement rep hypercalls

2017-07-14 Thread Vitaly Kuznetsov
Rep hypercalls are normal hypercalls which perform multiple actions at once. Hyper-V guarantees to return exectution to the caller in not more than 50us and the caller needs to use hypercall continuation. Touch NMI watchdog between hypercall invocations. This is going to be used for HvFlushVirtual

[PATCH v9 04/10] x86/hyper-v: fast hypercall implementation

2017-07-14 Thread Vitaly Kuznetsov
Hyper-V supports 'fast' hypercalls when all parameters are passed through registers. Implement an inline version of a simpliest of these calls: hypercall with one 8-byte input and no output. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Andy Shevchenko Reviewed-by: Stephen Hemminger --- arch/x8

[PATCH v9 08/10] x86/hyper-v: use hypercall for remote TLB flush

2017-07-14 Thread Vitaly Kuznetsov
Hyper-V host can suggest us to use hypercall for doing remote TLB flush, this is supposed to work faster than IPIs. Implementation details: to do HvFlushVirtualAddress{Space,List} hypercalls we need to put the input somewhere in memory and we don't really want to have memory allocation on each cal

[PATCH v9 07/10] hyper-v: globalize vp_index

2017-07-14 Thread Vitaly Kuznetsov
To support implementing remote TLB flushing on Hyper-V with a hypercall we need to make vp_index available outside of vmbus module. Rename and globalize. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Andy Shevchenko Reviewed-by: Stephen Hemminger --- arch/x86/hyperv/hv_init.c | 34 +++

[PATCH v9 03/10] x86/hyper-v: make hv_do_hypercall() inline

2017-07-14 Thread Vitaly Kuznetsov
We have only three call sites for hv_do_hypercall() and we're going to change HVCALL_SIGNAL_EVENT to doing fast hypercall so we can inline this function for optimization. Hyper-V top level functional specification states that r9-r11 registers and flags may be clobbered by the hypervisor during hyp

[PATCH v9 00/10] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements

2017-07-14 Thread Vitaly Kuznetsov
It seems the series missed 4.13 merge window, rebase and resend. Changes since v8: - Rebase to the current char-misc tree (mostly to account for the newly added struct flush_tlb_info in tlb flush interfaces). - PATCH07: drop hv_tmpcpumap as we have global infrastructure now. - PATCH08: make fill

[PATCH v9 02/10] x86/hyper-v: stash the max number of virtual/logical processor

2017-07-14 Thread Vitaly Kuznetsov
Max virtual processor will be needed for 'extended' hypercalls supporting more than 64 vCPUs. While on it, unify on 'Hyper-V' in mshyperv.c as we currently have a mix, report acquired misc features as well. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Andy Shevchenko Reviewed-by: Stephen Hemming

[PATCH v9 01/10] x86/hyper-v: include hyperv/ only when CONFIG_HYPERV is set

2017-07-14 Thread Vitaly Kuznetsov
Code is arch/x86/hyperv/ is only needed when CONFIG_HYPERV is set, the 'basic' support and detection lives in arch/x86/kernel/cpu/mshyperv.c which is included when CONFIG_HYPERVISOR_GUEST is set. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Andy Shevchenko Reviewed-by: Stephen Hemminger --- ar

Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-14 Thread Dan Carpenter
On Fri, Jul 14, 2017 at 11:36:56AM +0200, Arnd Bergmann wrote: > @@ -1158,7 +1158,8 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc) >*/ > fmt_src.pad = pad->index; > fmt_src.which = V4L2_SUBDEV_FORMAT_ACTIVE; > - if (!v4l2_subdev_call(sensor, pad, get_fmt, NULL,

Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-14 Thread Arnd Bergmann
On Fri, Jul 14, 2017 at 2:05 PM, Dan Carpenter wrote: > Changing: > > - if (!frob()) { > + if (frob() == 0) { > > is a totally pointless change. They're both bad, because they're doing > success testing instead of failure testing, but probably the second one > is slightly worse. > > This warning

Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-14 Thread Dan Carpenter
Changing: - if (!frob()) { + if (frob() == 0) { is a totally pointless change. They're both bad, because they're doing success testing instead of failure testing, but probably the second one is slightly worse. This warning seems dumb. I can't imagine it has even a 10% success rate at finding r

Re: [PATCH 00/12] staging: ccree: coding style fixes

2017-07-14 Thread Greg Kroah-Hartman
On Thu, Jul 13, 2017 at 11:19:50AM +0300, Gilad Ben-Yossef wrote: > Another batch of ccree coding style fixes. > > These goes on top of commit a8c4ae12 ("staging: ccree: Fix alignment issues > in ssi_sysfs.c") > in staging-testing. Odd, some of these did not apply, but others did. Please rebase

Re: New Driver for electrical energy measurement

2017-07-14 Thread Jonathan Cameron
On Fri, 14 Jul 2017 12:33:02 +0200 Christian Gromm wrote: > On 14.07.2017 11:40, Lars-Peter Clausen wrote: > > On 07/14/2017 11:00 AM, Guenter Roeck wrote: > >> On 07/14/2017 01:07 AM, Jonathan Cameron wrote: > >>> On Wed, 12 Jul 2017 15:19:40 +0200 > >>> Christian Gromm wrote: > >>> > >>>

Re: New Driver for electrical energy measurement

2017-07-14 Thread Christian Gromm
On 14.07.2017 11:40, Lars-Peter Clausen wrote: On 07/14/2017 11:00 AM, Guenter Roeck wrote: On 07/14/2017 01:07 AM, Jonathan Cameron wrote: On Wed, 12 Jul 2017 15:19:40 +0200 Christian Gromm wrote: On Wed, 12 Jul 2017 14:51:01 +0200 Greg KH wrote: On Wed, Jul 12, 2017 at 02:18:54PM +0200,

Re: New Driver for electrical energy measurement

2017-07-14 Thread Christian Gromm
On 14.07.2017 11:00, Guenter Roeck wrote: On 07/14/2017 01:07 AM, Jonathan Cameron wrote: On Wed, 12 Jul 2017 15:19:40 +0200 Christian Gromm wrote: On Wed, 12 Jul 2017 14:51:01 +0200 Greg KH wrote: On Wed, Jul 12, 2017 at 02:18:54PM +0200, Christian Gromm wrote: Hi, Microchip is plannin

[PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-14 Thread Arnd Bergmann
v4l2_subdev_call is a macro returning whatever the callback return type is, usually 'int'. With gcc-7 and ccache, this can lead to many wanings like: media/platform/pxa_camera.c: In function 'pxa_mbus_build_fmts_xlate': media/platform/pxa_camera.c:766:27: error: ?: using integer constants in bool

Re: New Driver for electrical energy measurement

2017-07-14 Thread Lars-Peter Clausen
On 07/14/2017 11:00 AM, Guenter Roeck wrote: > On 07/14/2017 01:07 AM, Jonathan Cameron wrote: >> On Wed, 12 Jul 2017 15:19:40 +0200 >> Christian Gromm wrote: >> >>> On Wed, 12 Jul 2017 14:51:01 +0200 >>> Greg KH wrote: >>> On Wed, Jul 12, 2017 at 02:18:54PM +0200, Christian Gromm wrote: >>>

[PATCH 10/14] staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read

2017-07-14 Thread Arnd Bergmann
gcc-7 points out an older regression: drivers/staging/iio/resolver/ad2s1210.c: In function 'ad2s1210_read_raw': drivers/staging/iio/resolver/ad2s1210.c:515:42: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context] The original code had 'unsigned short' here, but incorr

Re: New Driver for electrical energy measurement

2017-07-14 Thread Guenter Roeck
On 07/14/2017 01:07 AM, Jonathan Cameron wrote: On Wed, 12 Jul 2017 15:19:40 +0200 Christian Gromm wrote: On Wed, 12 Jul 2017 14:51:01 +0200 Greg KH wrote: On Wed, Jul 12, 2017 at 02:18:54PM +0200, Christian Gromm wrote: Hi, Microchip is planning to introduce a driver for a new companion

Re: New Driver for electrical energy measurement

2017-07-14 Thread Jonathan Cameron
On Wed, 12 Jul 2017 15:19:40 +0200 Christian Gromm wrote: > On Wed, 12 Jul 2017 14:51:01 +0200 > Greg KH wrote: > > > On Wed, Jul 12, 2017 at 02:18:54PM +0200, Christian Gromm wrote: > > > > > > Hi, > > > > > > Microchip is planning to introduce a driver for a new companion > > > chip serie