Re: [PATCH 17/32] staging: gasket: annotate ioctl arg with __user

2018-07-19 Thread Greg Kroah-Hartman
On Thu, Jul 19, 2018 at 07:44:53PM -0700, Todd Poynor wrote: > >> /* Type of the ioctl permissions check callback. See below. */ > >> typedef int (*gasket_ioctl_permissions_cb_t)( > >> - struct file *filp, uint cmd, ulong arg); > >> + struct file *filp, uint cmd, void __user *arg); > >> >

Re: [PATCH 05/23] staging: wilc1000: rename goto to avoid leading '_' in label name

2018-07-19 Thread Ajay Singh
Hi Dan, On Thu, 19 Jul 2018 12:27:44 +0300 Dan Carpenter wrote: > On Thu, Jul 19, 2018 at 04:15:01AM +0530, Ajay Singh wrote: > > diff --git a/drivers/staging/wilc1000/wilc_wlan.c > > b/drivers/staging/wilc1000/wilc_wlan.c index 85af365..8e71c28 100644 > > --- a/drivers/staging/wilc1000/wilc_wla

[PATCH] Drivers: staging: rts5208: xd.c fixed a brace coding style issue

2018-07-19 Thread Ali Aminian
Fixing a coding style issue Signed-off-by: Ali Aminian --- drivers/staging/rts5208/xd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rts5208/xd.c b/drivers/staging/rts5208/xd.c index 667dfe1..261d868 100644 --- a/drivers/staging/rts5208/xd.c +++ b/drivers

RE: [PATCH V3 0/4] KVM/x86/hyper-V: Introduce PV guest address space mapping flush support

2018-07-19 Thread KY Srinivasan
> -Original Message- > From: Tianyu Lan > Sent: Thursday, July 19, 2018 1:40 AM > Cc: Tianyu Lan ; de...@linuxdriverproject.org; > Haiyang Zhang ; h...@zytor.com; > k...@vger.kernel.org; KY Srinivasan ; linux- > ker...@vger.kernel.org; mi...@redhat.com; pbonz...@redhat.com; > rkrc...@red

[PATCH 00/20 v4] staging: gasket: sundry fixes and fixups

2018-07-19 Thread Todd Poynor
From: Todd Poynor Various fixes mainly from the chromium review of the gasket and apex drivers. More to come. Todd Poynor (20): staging: gasket: allow compile for ARM64 in Kconfig staging: gasket: gasket_enable_dev remove unnecessary variable staging: gasket: remove code for no physical d

[PATCH 1/1] x86/hyper-v: Fix a merge error

2018-07-19 Thread kys
From: "K. Y. Srinivasan" When the mapping betwween the Linux notion of CPU ID to the hypervisor's notion of CPU ID is not initialized, we should fall back on the non-enligghtened path for IPI. A merge error introduced this bug; fix it. Fixes: 1268ed0c474a ("Merge branch 'x86/urgent' into x86/hyp

[PATCH 09/20] staging: gasket: gasket page table functions use bool return type

2018-07-19 Thread Todd Poynor
From: Todd Poynor Convert from int to bool return type for gasket page table functions that return values used as booleans. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 58 +++--- drivers/stagi

[PATCH 12/20] staging: gasket: remove unnecessary parens in page table code

2018-07-19 Thread Todd Poynor
From: Todd Poynor gasket_alloc_coherent_memory() extra parentheses in statement. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/g

[PATCH 11/20] staging: gasket: fix comment syntax in apex.h

2018-07-19 Thread Todd Poynor
From: Todd Poynor Use kernel-style multi-line comment syntax. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/gasket/apex.h b/drivers/st

[PATCH 13/20] staging: gasket: gasket_mmap use PAGE_MASK

2018-07-19 Thread Todd Poynor
From: Todd Poynor gasket_mmap use PAGE_MASK, instead of performing math on PAGE_SIZE, for simplicity and clarity. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[PATCH 16/20] staging: gasket: always allow root open for write

2018-07-19 Thread Todd Poynor
From: Todd Poynor Always allow root to open device for writing. Drop special-casing of ioctl permissions for root vs. owner. Convert to bool types as appropriate. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 1

[PATCH 18/20] staging: gasket: apex ioctl add __user annotations

2018-07-19 Thread Todd Poynor
From: Todd Poynor Add __user annotation to ioctl pointer argument, for sparse checking. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --

[PATCH 03/20] staging: gasket: remove code for no physical device

2018-07-19 Thread Todd Poynor
From: Todd Poynor gasket_enable_dev code for enabling a gasket device with no physical PCI device registered shouldn't be necessary. Reported-by: Greg Kroah-Hartman Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 12 +--- 1 file changed, 1 insertion(+), 11 deleti

[PATCH 06/20] staging: gasket: don't treat no device reset callback as an error

2018-07-19 Thread Todd Poynor
From: Todd Poynor It is not an error for a device to not have a reset callback registered. Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/gasket/gasket_core

[PATCH 08/20] staging: gasket: apex_clock_gating simplify logic, reduce indentation

2018-07-19 Thread Todd Poynor
From: Todd Poynor Collapse together two checks and return immediately, avoid conditional indentation for most of function code. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 43 +--- 1 file ch

[PATCH 15/20] staging: gasket: fix multi-line comment syntax in gasket_core.h

2018-07-19 Thread Todd Poynor
From: Todd Poynor Use consistent kernel-style multi-line comment syntax. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket

[PATCH 14/20] staging: gasket: remove extra parens in gasket_write_mappable_regions

2018-07-19 Thread Todd Poynor
From: Todd Poynor Remove unneeded parentheses around subexpressions. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket_core.

[PATCH 20/20] staging: gasket: common ioctls add __user annotations

2018-07-19 Thread Todd Poynor
From: Todd Poynor Add __user annotation to gasket common ioctl pointer arguments for sparse checking. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_ioctl.c | 102 ++ 1 file changed, 55 insertions(+)

[PATCH 17/20] staging: gasket: top ioctl handler add __user annotations

2018-07-19 Thread Todd Poynor
From: Todd Poynor Add __user annotation to gasket_core top-level ioctl handling pointer arguments, for sparse checking. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 6 -- drivers/staging/gasket/gasket_core.h

[PATCH 19/20] staging: gasket: common ioctl dispatcher add __user annotations

2018-07-19 Thread Todd Poynor
From: Todd Poynor Add __user annotation to gasket core common ioctl pointer arguments for sparse checking. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_ioctl.c | 8 +--- drivers/staging/gasket/gasket_ioctl.h | 4 +++-

[PATCH 10/20] staging: gasket: remove else clause after return in if clause

2018-07-19 Thread Todd Poynor
From: Todd Poynor Else after return is unnecessary and may cause static code checkers to complain. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --gi

[PATCH 01/20] staging: gasket: allow compile for ARM64 in Kconfig

2018-07-19 Thread Todd Poynor
From: Todd Poynor The gasket and apex drivers are also to be used on ARM64 architectures. Signed-off-by: Todd Poynor --- drivers/staging/gasket/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket/Kconfig b/drivers/staging/gasket/Kconfig index c836

[PATCH 02/20] staging: gasket: gasket_enable_dev remove unnecessary variable

2018-07-19 Thread Todd Poynor
From: Todd Poynor Remove unnecessary variable, pass constant param instead. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/gaske

[PATCH 07/20] staging: gasket: gasket_mmap return error instead of valid BAR index

2018-07-19 Thread Todd Poynor
From: Todd Poynor When offset to be mapped matches both a BAR region and a coherent mapped region return an error as intended, not the BAR index. Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 04/20] staging: gasket: fix class create bug handling

2018-07-19 Thread Todd Poynor
From: Todd Poynor class_create() never returns NULL, and this driver should never return PTR_ERR(NULL) anyway. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor Reviewed-by: Dmitry Torokhov --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 in

[PATCH 05/20] staging: gasket: remove unnecessary code in coherent allocator

2018-07-19 Thread Todd Poynor
From: Todd Poynor Remove extraneous statement in gasket_config_coherent_allocator() Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_ioctl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/stagi

Re: [PATCH 17/32] staging: gasket: annotate ioctl arg with __user

2018-07-19 Thread Todd Poynor
On Thu, Jul 19, 2018 at 2:37 AM, Greg Kroah-Hartman wrote: > On Tue, Jul 17, 2018 at 01:56:57PM -0700, Todd Poynor wrote: >> From: Todd Poynor >> >> For sparse checking. > > Close, but you can do better :) > >> >> Reported-by: Dmitry Torokhov >> Signed-off-by: Zhongze Hu >> Signed-off-by: Todd

Re: [RFC PATCH v3] Xilinx AXI-Stream FIFO v4.1 IP core driver

2018-07-19 Thread Jacob Feder
First I run "make menuconfig" and select my driver in "device drivers" > "staging". If I run "make" or "make all" or "make drivers/staging/axis-fifo" everything compiles without errors or warnings even if I put blatant syntax errors in my code. What am I missing here? Thanks, Jacob __

Re: [PATCH 16/32] staging: gasket: always allow root open for write

2018-07-19 Thread Todd Poynor
On Thu, Jul 19, 2018 at 2:29 AM, Greg Kroah-Hartman wrote: > On Tue, Jul 17, 2018 at 01:56:56PM -0700, Todd Poynor wrote: >> From: Todd Poynor >> >> Always allow root to open device for writing. >> >> Drop special-casing of ioctl permissions for root vs. owner. >> >> Reported-by: Dmitry Torokhov

[PATCH] Staging: pi433: rf69: fixed a multi line comment issue

2018-07-19 Thread Mark Railton
Fixed a coding style issue Signed-off-by: Mark Railton --- drivers/staging/pi433/rf69.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index 90280e9b006d..14826fb505dd 100644 --- a/drivers/staging/pi433/rf69.c +++

Re: [PATCH v7 4/4] kexec_file: Load kernel at top of system RAM if required

2018-07-19 Thread Andrew Morton
On Thu, 19 Jul 2018 23:17:53 +0800 Baoquan He wrote: > Hi Andrew, > > On 07/18/18 at 03:33pm, Andrew Morton wrote: > > On Wed, 18 Jul 2018 10:49:44 +0800 Baoquan He wrote: > > > > > For kexec_file loading, if kexec_buf.top_down is 'true', the memory which > > > is used to load kernel/initrd/pu

Re: [RFC PATCH v3] Xilinx AXI-Stream FIFO v4.1 IP core driver

2018-07-19 Thread Stephen Hemminger
On Thu, 19 Jul 2018 13:16:57 +0300 Dan Carpenter wrote: > I'm getting some compile warnings where we us %u instead of %lu for > size_t. > > We also need a README explaining what else needs to be done before this > can be moved out of staging into the normal part of the kernel. Use %zu to print

Re: [RFC PATCH v3] Xilinx AXI-Stream FIFO v4.1 IP core driver

2018-07-19 Thread Stephen Hemminger
On Wed, 18 Jul 2018 22:46:34 -0400 Jacob Feder wrote: > +MODULE_DESCRIPTION("Xilinx AXI-Stream FIFO v4.1 IP core driver\n\n" > +"This IP core has read and write AXI-Stream FIFOs, the contents of which > can\n" > +"be accessed from the AXI4 memory-mapped interface. This is useful for\n" > +"trans

Re: [PATCH v7 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-07-19 Thread Baoquan He
On 07/18/18 at 07:37pm, Andy Shevchenko wrote: > On Wed, Jul 18, 2018 at 7:36 PM, Andy Shevchenko > wrote: > > On Wed, Jul 18, 2018 at 5:49 AM, Baoquan He wrote: > >> reparent_resources() is duplicated in arch/microblaze/pci/pci-common.c > >> and arch/powerpc/kernel/pci-common.c, so move it to ke

Re: [PATCH v7 4/4] kexec_file: Load kernel at top of system RAM if required

2018-07-19 Thread Baoquan He
Hi Andrew, On 07/18/18 at 03:33pm, Andrew Morton wrote: > On Wed, 18 Jul 2018 10:49:44 +0800 Baoquan He wrote: > > > For kexec_file loading, if kexec_buf.top_down is 'true', the memory which > > is used to load kernel/initrd/purgatory is supposed to be allocated from > > top to down. This is wha

[Update PATCH V3 1/4] X86/Hyper-V: Add flush HvFlushGuestPhysicalAddressSpace hypercall support

2018-07-19 Thread Tianyu Lan
Hyper-V supports a pv hypercall HvFlushGuestPhysicalAddressSpace to flush nested VM address space mapping in l1 hypervisor and it's to reduce overhead of flushing ept tlb among vcpus. This patch is to implement it. Signed-off-by: Lan Tianyu --- Change since v3 Remove GPL boilerplate. ar

Re: [PATCH V3 1/4] X86/Hyper-V: Add flush HvFlushGuestPhysicalAddressSpace hypercall support

2018-07-19 Thread Thomas Gleixner
On Thu, 19 Jul 2018, Tianyu Lan wrote: > On 7/19/2018 8:05 PM, Thomas Gleixner wrote: > > You already have the SPDX identifier. So the GPL boilerplate is not really > > required, unless your legal departement insist on it. > > > > Hi Thomas: > Thanks for your reminder. How about the followi

Re: [PATCH V3 1/4] X86/Hyper-V: Add flush HvFlushGuestPhysicalAddressSpace hypercall support

2018-07-19 Thread Tianyu Lan
On 7/19/2018 8:05 PM, Thomas Gleixner wrote: > On Thu, 19 Jul 2018, Tianyu Lan wrote: >> @@ -0,0 +1,64 @@ >> +// SPDX-License-Identifier: GPL-2.0 >> + >> +/* >> + * Hyper-V nested virtualization code. >> + * >> + * Copyright (C) 2018, Microsoft, Inc. >> + * >> + * Author : Lan Tianyu >> + * >> + *

Re: [PATCH V3 1/4] X86/Hyper-V: Add flush HvFlushGuestPhysicalAddressSpace hypercall support

2018-07-19 Thread Thomas Gleixner
On Thu, 19 Jul 2018, Tianyu Lan wrote: > @@ -0,0 +1,64 @@ > +// SPDX-License-Identifier: GPL-2.0 > + > +/* > + * Hyper-V nested virtualization code. > + * > + * Copyright (C) 2018, Microsoft, Inc. > + * > + * Author : Lan Tianyu > + * > + * This program is free software; you can redistribute it an

Re: [RFC PATCH v3] Xilinx AXI-Stream FIFO v4.1 IP core driver

2018-07-19 Thread Dan Carpenter
I'm getting some compile warnings where we us %u instead of %lu for size_t. We also need a README explaining what else needs to be done before this can be moved out of staging into the normal part of the kernel. On Wed, Jul 18, 2018 at 10:46:34PM -0400, Jacob Feder wrote: > I hope I did the Makef

Re: [PATCH 17/32] staging: gasket: annotate ioctl arg with __user

2018-07-19 Thread Greg Kroah-Hartman
On Tue, Jul 17, 2018 at 01:56:57PM -0700, Todd Poynor wrote: > From: Todd Poynor > > For sparse checking. Close, but you can do better :) > > Reported-by: Dmitry Torokhov > Signed-off-by: Zhongze Hu > Signed-off-by: Todd Poynor > Reviewed-by: Dmitry Torokhov > --- > drivers/staging/gasket

Re: [PATCH V3 0/4] KVM/x86/hyper-V: Introduce PV guest address space mapping flush support

2018-07-19 Thread Tianyu Lan
On 7/19/2018 4:57 PM, Paolo Bonzini wrote: > On 19/07/2018 10:39, Tianyu Lan wrote: >> Hyper-V provides a para-virtualization hypercall >> HvFlushGuestPhysicalAddressSpace >> to flush nested VM address space mapping in l1 hypervisor and it's to reduce >> overhead >> of flushing ept tlb among vcpu

Re: [PATCH 16/32] staging: gasket: always allow root open for write

2018-07-19 Thread Greg Kroah-Hartman
On Tue, Jul 17, 2018 at 01:56:56PM -0700, Todd Poynor wrote: > From: Todd Poynor > > Always allow root to open device for writing. > > Drop special-casing of ioctl permissions for root vs. owner. > > Reported-by: Dmitry Torokhov > Signed-off-by: Zhongze Hu > Signed-off-by: Todd Poynor > ---

Re: [PATCH 05/23] staging: wilc1000: rename goto to avoid leading '_' in label name

2018-07-19 Thread Dan Carpenter
On Thu, Jul 19, 2018 at 04:15:01AM +0530, Ajay Singh wrote: > diff --git a/drivers/staging/wilc1000/wilc_wlan.c > b/drivers/staging/wilc1000/wilc_wlan.c > index 85af365..8e71c28 100644 > --- a/drivers/staging/wilc1000/wilc_wlan.c > +++ b/drivers/staging/wilc1000/wilc_wlan.c > @@ -850,13 +850,13 @@

Re: [PATCH 01/32] staging: gasket: remove X86 Kconfig restriction

2018-07-19 Thread Greg Kroah-Hartman
On Mon, Jul 16, 2018 at 07:08:55PM -0700, Todd Poynor wrote: > From: Todd Poynor > > The gasket and apex drivers are to be used on other architectures > besides X86. > > Signed-off-by: Todd Poynor > --- > drivers/staging/gasket/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [PATCH V3 0/4] KVM/x86/hyper-V: Introduce PV guest address space mapping flush support

2018-07-19 Thread Paolo Bonzini
On 19/07/2018 10:39, Tianyu Lan wrote: > Hyper-V provides a para-virtualization hypercall > HvFlushGuestPhysicalAddressSpace > to flush nested VM address space mapping in l1 hypervisor and it's to reduce > overhead > of flushing ept tlb among vcpus. The tradition way is to send IPIs to all > aff

[PATCH V3 0/4] KVM/x86/hyper-V: Introduce PV guest address space mapping flush support

2018-07-19 Thread Tianyu Lan
Hyper-V provides a para-virtualization hypercall HvFlushGuestPhysicalAddressSpace to flush nested VM address space mapping in l1 hypervisor and it's to reduce overhead of flushing ept tlb among vcpus. The tradition way is to send IPIs to all affected vcpus and executes INVEPT on each vcpus. It w

[PATCH V3 2/4] X86/Hyper-V: Add hyperv_nested_flush_guest_mapping ftrace support

2018-07-19 Thread Tianyu Lan
This patch is to add hyperv_nested_flush_guest_mapping support to trace hvFlushGuestPhysicalAddressSpace hypercall. Signed-off-by: Lan Tianyu --- arch/x86/hyperv/nested.c| 3 +++ arch/x86/include/asm/trace/hyperv.h | 14 ++ 2 files changed, 17 insertions(+) diff --git a

[PATCH V3 1/4] X86/Hyper-V: Add flush HvFlushGuestPhysicalAddressSpace hypercall support

2018-07-19 Thread Tianyu Lan
Hyper-V supports a pv hypercall HvFlushGuestPhysicalAddressSpace to flush nested VM address space mapping in l1 hypervisor and it's to reduce overhead of flushing ept tlb among vcpus. This patch is to implement it. Signed-off-by: Lan Tianyu --- arch/x86/hyperv/Makefile | 2 +- arch/x8

Re: [PATCH 00/23] staging: wilc1000: cleanup patch to follow linux coding style

2018-07-19 Thread Claudiu Beznea
Reviewed-by: Claudiu Beznea On 19.07.2018 01:44, Ajay Singh wrote: > This patch series contains modification to follow Linux coding style & > cleanup change to remove unused variables and enums. > Few patches also contain changes to remove unnecessary typecast. > > Ajay Singh (23): > staging: