Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-14 Thread David Sterba
On Wed, Sep 12, 2018 at 05:08:52PM +0200, Arnd Bergmann wrote: > The .ioctl and .compat_ioctl file operations have the same prototype so > they can both point to the same function, which works great almost all > the time when all the commands are compatible. > > One exception is the s390

[PATCH 6/8] staging: erofs: avoid magic constants when initializing clusterbits

2018-09-14 Thread Gao Xiang
Currently erofs only supports clustersize == blocksize. and clustersize == 2^n * blocksize will be supported in the future. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/super.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH 3/8] staging: rtl8188eu: remove whitespace

2018-09-14 Thread Michael Straube
Replace tabs with spaces or just remove spaces in declarations. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/core/rtw_ioctl_set.c| 34 +-- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c

[PATCH 4/8] staging: rtl8188eu: fix comparsions to true

2018-09-14 Thread Michael Straube
Use if(x) instead of if(x == true). Signed-off-by: Michael Straube --- .../staging/rtl8188eu/core/rtw_ioctl_set.c| 26 +-- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c

[PATCH 6/8] staging: rtl8188eu: add missing spaces around operators

2018-09-14 Thread Michael Straube
Add missing spaces around '|', '-', and '&' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH 7/8] staging: rtl8188eu: fix lines over 80 characters

2018-09-14 Thread Michael Straube
Wrap lines over 80 characters where appropriate to clear checkpatch warnings. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c

[PATCH 1/8] staging: rtl8188eu: simplify calculation

2018-09-14 Thread Michael Straube
Simpliy calcualation: * 10 / 2 can be reduced to * 5 Also cleans missing spaces checkpatch issues. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v2 1/4] staging/vc04_services: Use correct cache line size

2018-09-14 Thread Phil Elwell
On 14/09/2018 14:22, Phil Elwell wrote: Use the compatible string in the DTB to select the correct cache line size for the SoC - 32 for BCM2835, and 64 for BCM2836 and BCM2837. Signed-off-by: Phil Elwell --- .../interface/vchiq_arm/vchiq_2835_arm.c | 4 ++-

Re: [PATCH 2/7] staging: erofs: code cleanup for option parsing of fault_injection

2018-09-14 Thread Chao Yu
On 2018/9/13 13:46, cgxu519 wrote: > On 09/13/2018 10:15 AM, Chao Yu wrote: >> On 2018/9/12 13:10, Chengguang Xu wrote: >>> Define a dummpy function of erofs_build_fault_attr() when macro >>> CONFIG_EROFS_FAULT_INJECTION is disabled, so that we don't have to >>> check the macro in calling place.

[PATCH v3 2/6] vmbus: keep pointer to ring buffer page

2018-09-14 Thread Stephen Hemminger
Avoid going from struct page to virt address (and back) by just keeping pointer to the allocated pages instead of virt address. Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c | 20 +--- drivers/uio/uio_hv_generic.c | 5 +++-- include/linux/hyperv.h | 2

[PATCH v3 1/6] vmbus: pass channel to hv_process_channel_removal

2018-09-14 Thread Stephen Hemminger
Rather than passing relid and then looking up the channel. Pass the channel directly, since caller already knows it. Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c | 3 +-- drivers/hv/channel_mgmt.c | 17 + drivers/hv/vmbus_drv.c| 3 +--

[PATCH v3 0/6] fix hv_uio_generic open/close

2018-09-14 Thread Stephen Hemminger
This set of patches fixes the problem where DPDK applications using hv_uio_generic driver can not be successfully restarted. In order to get this working it required small change to uio to allow for mapping without no-cache. And refactoring of how ring buffer is setup in vmbus code. It could be

[PATCH v3 3/6] vmbus: split ring buffer allocation from open

2018-09-14 Thread Stephen Hemminger
The UIO driver needs the ring buffer to be persistent(reused) across open/close. Split the allocation and setup of ring buffer out of vmbus_open. For normal usage vmbus_open/vmbus_close there are no changes; only impacts uio_hv_generic which needs to keep ring buffer memory and reuse when

[PATCH v3 4/6] uio: introduce UIO_MEM_IOVA

2018-09-14 Thread Stephen Hemminger
Introduce the concept of mapping physical memory locations that are normal memory. The new type UIO_MEM_IOVA are similar to existing UIO_MEM_PHYS but the backing memory is not marked as uncached. Also, indent related switch to the currently used style. Signed-off-by: Stephen Hemminger ---

[PATCH v3 5/6] hv_uio_generic: map ringbuffer phys addr

2018-09-14 Thread Stephen Hemminger
The ring buffer is contiguous IOVA and is mapped via phys addr for sysfs file. Use same method for the UIO mapping. Signed-off-by: Stephen Hemminger --- drivers/uio/uio_hv_generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/uio/uio_hv_generic.c

[PATCH v3 6/6] uio_hv_generic: defer opening vmbus until first use

2018-09-14 Thread Stephen Hemminger
This fixes two design flaws in hv_uio_generic. Since hv_uio_probe is called from vmbus_probe with lock held it potentially can cause sleep in an atomic section because vmbus_open will wait for response from host. The hv_uio_generic driver could not handle applications exiting and restarting

Re: [patch 10/11] x86/vdso: Move cycle_last handling into the caller

2018-09-14 Thread Vitaly Kuznetsov
Thomas Gleixner writes: > Dereferencing gtod->cycle_last all over the place and foing the cycles < > last comparison in the vclock read functions generates horrible code. Doing > it at the call site is much better and gains a few cycles both for TSC and > pvclock. > > Caveat: This adds the

[PATCH 3/6] vmbus: split ring buffer allocation from open

2018-09-14 Thread Stephen Hemminger
The UIO driver needs the ring buffer to be persistent(reused) across open/close. Split the allocation and setup of ring buffer out of vmbus_open. For normal usage vmbus_open/vmbus_close there are no changes; only impacts uio_hv_generic which needs to keep ring buffer memory and reuse when

[PATCH 5/6] hv_uio_generic: map ringbuffer phys addr

2018-09-14 Thread Stephen Hemminger
The ring buffer is contiguous IOVA and is mapped via phys addr for sysfs file. Use same method for the UIO mapping. Signed-off-by: Stephen Hemminger --- drivers/uio/uio_hv_generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/uio/uio_hv_generic.c

[PATCH 2/6] vmbus: keep pointer to ring buffer page

2018-09-14 Thread Stephen Hemminger
Avoid going from struct page to virt address (and back) by just keeping pointer to the allocated pages instead of virt address. Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c | 20 +--- drivers/uio/uio_hv_generic.c | 5 +++-- include/linux/hyperv.h | 2

[PATCH 1/6] vmbus: pass channel to hv_process_channel_removal

2018-09-14 Thread Stephen Hemminger
Rather than passing relid and then looking up the channel. Pass the channel directly, since caller already knows it. Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c | 3 +-- drivers/hv/channel_mgmt.c | 17 + drivers/hv/vmbus_drv.c| 3 +--

[PATCH 6/6] uio_hv_generic: defer opening vmbus until first use

2018-09-14 Thread Stephen Hemminger
This fixes two design flaws in hv_uio_generic. Since hv_uio_probe is called from vmbus_probe with lock held it potentially can cause sleep in an atomic section because vmbus_open will wait for response from host. The hv_uio_generic driver could not handle applications exiting and restarting

[PATCH 4/6] uio: introduce UIO_MEM_IOVA

2018-09-14 Thread Stephen Hemminger
Introduce the concept of mapping physical memory locations that are normal memory. The new type UIO_MEM_IOVA are similar to existing UIO_MEM_PHYS but the backing memory is not marked as uncached. Also, indent related switch to the currently used style. Signed-off-by: Stephen Hemminger ---

[PATCH 5/8] staging: erofs: complete error handing of z_erofs_do_read_page

2018-09-14 Thread Gao Xiang
This patch completes error handing code of z_erofs_do_read_page. PG_error will be set when some read error happens, therefore z_erofs_onlinepage_endio will unlock this page without setting PG_uptodate. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 20

[PATCH 4/8] staging: erofs: fix a bug when appling cache strategy

2018-09-14 Thread Gao Xiang
As described in Kconfig, the last compressed pack should be cached for further reading for either `EROFS_FS_ZIP_CACHE_UNIPOLAR' or `EROFS_FS_ZIP_CACHE_BIPOLAR' by design. However, there is a bug in z_erofs_do_read_page, it will switch `initial' to `false' at the very beginning before it decides

[PATCH 2/8] staging: erofs: clean up z_erofs_map_blocks_iter

2018-09-14 Thread Gao Xiang
This patch mainly introduces `vle_map_blocks_iter_ctx' to clean up z_erofs_map_blocks_iter and vle_get_logical_extent_head. It changes the return value of `vle_get_logical_extent_head' to int for the later error handing. In addition, it also renames `pcn' to `pblk' since only `pblk' exists in

[PATCH 3/8] staging: erofs: complete error handing of z_erofs_map_blocks_iter

2018-09-14 Thread Gao Xiang
This patch completes error handing of z_erofs_map_blocks_iter and vle_get_logical_extent_head, including no memory and io error cases. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 35 ++- 1 file changed, 26 insertions(+),

[PATCH 0/8] staging: erofs: error handing and more tracepoints

2018-09-14 Thread Gao Xiang
In order to avoid conflicts with cleanup patches, Chao and I think it is better to send reviewed preview patches in the erofs mailing list to the community in time. So here is reviewed & tested patches right now, which clean up and enhance the error handing and add some tracepoints for

[PATCH 1/8] staging: erofs: fix a missing endian conversion

2018-09-14 Thread Gao Xiang
This patch fixes a missing endian conversion in vle_get_logical_extent_head. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/erofs/unzip_vle.c

Re: [patch 02/11] x86/time: Implement clocksource_arch_init()

2018-09-14 Thread Vitaly Kuznetsov
Thomas Gleixner writes: > Runtime validate the VCLOCK_MODE in clocksource::archdata and disable > VCLOCK if invalid, which disables the VDSO but keeps the system running. > > Signed-off-by: Thomas Gleixner > --- > arch/x86/Kconfig |1 + > arch/x86/kernel/time.c | 16

Re: [patch 11/11] x66/vdso: Add CLOCK_TAI support

2018-09-14 Thread Thomas Gleixner
On Fri, 14 Sep 2018, Andy Lutomirski wrote: > > On Sep 14, 2018, at 5:50 AM, Thomas Gleixner wrote: > > > > With the storage array in place it's now trivial to support CLOCK_TAI in > > the vdso. Instead of extending the array to accomodate CLOCK_TAI, make use > > of the fact that: > > > > -

[PATCH 8/8] staging: erofs: replace BUG_ON with DBG_BUGON in data.c

2018-09-14 Thread Gao Xiang
From: Chen Gong This patch replace BUG_ON with DBG_BUGON in data.c, and add necessary error handler. Signed-off-by: Chen Gong Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/data.c | 31 --- 1 file changed, 20

Re: [patch 11/11] x66/vdso: Add CLOCK_TAI support

2018-09-14 Thread Andy Lutomirski
> On Sep 14, 2018, at 7:27 AM, Thomas Gleixner wrote: > > On Fri, 14 Sep 2018, Andy Lutomirski wrote: >>> On Sep 14, 2018, at 5:50 AM, Thomas Gleixner wrote: >>> >>> With the storage array in place it's now trivial to support CLOCK_TAI in >>> the vdso. Instead of extending the array to

[PATCH 2/8] staging: rtl8188eu: remove unnecessary parentheses

2018-09-14 Thread Michael Straube
Remove unnecessary parentheses as reported by checkpatch and from conditionals. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/core/rtw_ioctl_set.c| 50 +-- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git

[PATCH 5/8] staging: rtl8188eu: fix comparsions to false

2018-09-14 Thread Michael Straube
Use if(!x) instead of if(x == false). Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c index

[PATCH 8/8] staging: rtl8188eu: simplify function comments

2018-09-14 Thread Michael Straube
Simplify function comments to a single line. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c

Re: [patch 11/11] x66/vdso: Add CLOCK_TAI support

2018-09-14 Thread Andy Lutomirski
> On Sep 14, 2018, at 5:50 AM, Thomas Gleixner wrote: > > With the storage array in place it's now trivial to support CLOCK_TAI in > the vdso. Instead of extending the array to accomodate CLOCK_TAI, make use > of the fact that: > > - CLOCK ids are set in stone > - CLOCK_THREAD_CPUTIME is

Re: [PATCH v2] staging: Convert to using %pOFn instead of device_node.name

2018-09-14 Thread Joe Perches
On Thu, 2018-09-13 at 16:26 -0500, Rob Herring wrote: > On Thu, Sep 13, 2018 at 3:45 PM Joe Perches wrote: > > > > On Wed, 2018-09-12 at 15:26 -0500, Rob Herring wrote: > > > A problem with MAINTAINERS is there is no way to tell who applies > > > patches for a given path vs. anyone else listed.

Re: [PATCH v2 1/4] staging/vc04_services: Use correct cache line size

2018-09-14 Thread Stefan Wahren
Hi Phil, > Phil Elwell hat am 14. September 2018 um 17:22 > geschrieben: > > > On 14/09/2018 14:22, Phil Elwell wrote: > > Use the compatible string in the DTB to select the correct cache line > > size for the SoC - 32 for BCM2835, and 64 for BCM2836 and BCM2837. > > > > Signed-off-by: Phil

Re: [PATCH] staging: rtl8188eu: remove code that is valid only for 5 GHz

2018-09-14 Thread Dan Carpenter
On Fri, Sep 14, 2018 at 05:58:58PM +0200, Robert Węcławski wrote: > > On Thu, Sep 13, 2018 at 10:32:39PM +0200, Robert Węcławski wrote: > > > diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c > > > b/drivers/staging/rtl8188eu/core/rtw_mlme.c > > > index eca06f05c0c4..b610443f2ac6 100644 > >

Re: [PATCH v2 1/4] staging/vc04_services: Use correct cache line size

2018-09-14 Thread Florian Fainelli
On 09/14/2018 06:22 AM, Phil Elwell wrote: > Use the compatible string in the DTB to select the correct cache line > size for the SoC - 32 for BCM2835, and 64 for BCM2836 and BCM2837. > > Signed-off-by: Phil Elwell > --- [snip] > @@ -170,6 +170,14 @@ static struct device *vchiq_dev; > static

[PATCH v2 0/2] hv_netvsc: associate VF and PV device by serial number

2018-09-14 Thread Stephen Hemminger
The Hyper-V implementation of PCI controller has concept of 32 bit serial number (not to be confused with PCI-E serial number). This value is sent in the protocol from the host to indicate SR-IOV VF device is attached to a synthetic NIC. Using the serial number (instead of MAC address) to

[PATCH v2 1/2] PCI: hv: support reporting serial number as slot information

2018-09-14 Thread Stephen Hemminger
The Hyper-V host API for PCI provides a unique "serial number" which can be used as basis for sysfs PCI slot table. This can be useful for cases where userspace wants to find the PCI device based on serial number. When an SR-IOV NIC is added, the host sends an attach message with serial number.

[PATCH v2 2/2] hv_netvsc: pair VF based on serial number

2018-09-14 Thread Stephen Hemminger
Matching network device based on MAC address is problematic since a non VF network device can be creted with a duplicate MAC address causing confusion and problems. The VMBus API does provide a serial number that is a better matching method. Signed-off-by: Stephen Hemminger ---

Re: [ 1/1] KVM/MMU: Fix comment in walk_shadow_page_lockless_end()

2018-09-14 Thread Paolo Bonzini
On 07/09/2018 07:45, Tianyu Lan wrote: > kvm_commit_zap_page() has been renamed to kvm_mmu_commit_zap_page() > This patch is to fix the commit. > > Signed-off-by: Lan Tianyu > --- > arch/x86/kvm/mmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kvm/mmu.c

Re: [PATCH v2 4/4] ARM: dts: bcm283x: Correct mailbox register sizes

2018-09-14 Thread Florian Fainelli
On 09/14/2018 06:22 AM, Phil Elwell wrote: > The size field in a Device Tree "reg" property is encoded in bytes, not > words. > > Signed-off-by: Phil Elwell This should probably have a: Fixes: 614fa22119d6 ("ARM: dts: bcm2835: Add VCHIQ node to the Raspberry Pi boards. (v3)") as well? > ---

[PATCH v2] staging: rtl8188eu: remove code that is valid only for 5 GHz

2018-09-14 Thread Robert Węcławski
Remove code that is used only for 5 GHz. This addresses the below TODO item: - find and remove remaining code valid only for 5 GHz. Most of the obvious ones have been removed, but things like channel > 14 still exist. Signed-off-by: Robert Węcławski --- Changes in v2: - set

Re: [PATCH v2 1/4] staging/vc04_services: Use correct cache line size

2018-09-14 Thread Phil Elwell
On 14/09/2018 18:03, Florian Fainelli wrote: On 09/14/2018 06:22 AM, Phil Elwell wrote: Use the compatible string in the DTB to select the correct cache line size for the SoC - 32 for BCM2835, and 64 for BCM2836 and BCM2837. Signed-off-by: Phil Elwell --- [snip] @@ -170,6 +170,14 @@

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-14 Thread Darren Hart
On Wed, Sep 12, 2018 at 05:08:52PM +0200, Arnd Bergmann wrote: > The .ioctl and .compat_ioctl file operations have the same prototype so > they can both point to the same function, which works great almost all > the time when all the commands are compatible. > > One exception is the s390

[PATCH v7 0/1] staging: mt7621-mmc: Fix debug macros and their usages

2018-09-14 Thread Nishad Kamdar
This patch fixes the the debug macro IRQ_MSG(). It deletes IRQ_MSG() and all its users as currently it is a no-op. Changes in v7: - Delete IRQ_MSG() macro and its users. - Patchset reduced to 1 patch as the patches fixing N_MSG() and ERR_MSG() have been accepted. Changes in v6: -

[PATCH] staging: rtl8188eu: Fix a sleep-in-atomic-context bug in issue_deauth_ex()

2018-09-14 Thread Jia-Ju Bai
The driver may sleep with holding a spinlock. The function call path (from bottom to top) in Linux-4.17 is: [FUNC] msleep drivers/staging/rtl8188eu/core/rtw_mlme_ext.c, 1536: msleep in issue_deauth_ex drivers/staging/rtl8188eu/core/rtw_mlme_ext.c, 5110: issue_deauth_ex in

[PATCH v7 1/1] staging: mt7621-mmc: Delete IRQ_MSG() and its users.

2018-09-14 Thread Nishad Kamdar
This patch removes IRQ_MSG() and its users as currently it is a no-op. Signed-off-by: Nishad Kamdar --- Changes in v7: - Delete IRQ_MSG() and all its users Changes in v6: - No change Changes in v5: - No change --- drivers/staging/mt7621-mmc/dbg.h | 12

Re: [PATCH v6 3/3] staging: mt7621-mmc: Fix debug macro IRQ_MSG and its usages

2018-09-14 Thread Nishad Kamdar
On Mon, Sep 10, 2018 at 05:05:13PM +0200, Greg Kroah-Hartman wrote: > On Sat, Sep 01, 2018 at 03:51:10AM +0530, Nishad Kamdar wrote: > > Replace all usages of IRQ_MSG with with dev_ without __func__ > > or __LINE__ or current->comm and current->pid. Remove the do {} > > while(0) loop for the

[PATCH 1/2] staging: rtl8723bs: Fix a sleep-in-atomic-context bug in issue_deauth_ex()

2018-09-14 Thread Jia-Ju Bai
The driver may sleep with holding a spinlock. The function call paths (from bottom to top) in Linux-4.17 are: [FUNC] msleep drivers/staging/rtl8723bs/core/rtw_mlme_ext.c, 3805: msleep in issue_deauth_ex drivers/staging/rtl8723bs/core/rtw_mlme_ext.c, 6336: issue_deauth_ex in

[PATCH 2/2] staging: rtl8723bs: Fix two sleep-in-atomic-context bugs in _rtw_pwr_wakeup()

2018-09-14 Thread Jia-Ju Bai
The driver may sleep with holding a spinlock. The function call paths (from bottom to top) in Linux-4.17 are: [FUNC] msleep drivers/staging/rtl8723bs/core/rtw_pwrctrl.c, 1243: msleep in _rtw_pwr_wakeup drivers/staging/rtl8723bs/core/rtw_ioctl_set.c, 510: _rtw_pwr_wakeup in

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-14 Thread Al Viro
On Fri, Sep 14, 2018 at 01:35:06PM -0700, Darren Hart wrote: > Acked-by: Darren Hart (VMware) > > As for a longer term solution, would it be possible to init fops in such > a way that the compat_ioctl call defaults to generic_compat_ioctl_ptrarg > so we don't have to duplicate this boilerplate

[PATCH] staging: dgnc: Fix a sleep-in-atomic-context bug in cls_assert_modem_signals()

2018-09-14 Thread Jia-Ju Bai
The driver may sleep with holding a spinlock. The function call path (from bottom to top) in Linux-4.17 is: [FUNC] usleep_range drivers/staging/dgnc/dgnc_cls.c, 391: usleep_range in cls_assert_modem_signals drivers/staging/dgnc/dgnc_cls.c, 449: cls_assert_modem_signals in

Re: [PATCH] staging: rtl8188eu: remove code that is valid only for 5 GHz

2018-09-14 Thread Dan Carpenter
On Thu, Sep 13, 2018 at 10:32:39PM +0200, Robert Węcławski wrote: > diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c > b/drivers/staging/rtl8188eu/core/rtw_mlme.c > index eca06f05c0c4..b610443f2ac6 100644 > --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c > +++

Re: [PATCH 6/6] uio_hv_generic: defer opening vmbus until first use

2018-09-14 Thread Dan Carpenter
On Thu, Sep 13, 2018 at 03:25:27PM -0700, Stephen Hemminger wrote: > +/* VMBus primary channel is opened on first use */ > +static int > +hv_uio_open(struct uio_info *info, struct inode *inode) > +{ > + struct hv_uio_private_data *pdata > + = container_of(info, struct

[patch 01/11] clocksource: Provide clocksource_arch_init()

2018-09-14 Thread Thomas Gleixner
Architectures have extra archdata in the clocksource, e.g. for VDSO support. There are no sanity checks or general initializations for this available. Add support for that. Signed-off-by: Thomas Gleixner --- include/linux/clocksource.h |5 + kernel/time/Kconfig |4

[patch 03/11] x86/vdso: Enforce 64bit clocksource

2018-09-14 Thread Thomas Gleixner
All VDSO clock sources are TSC based and use CLOCKSOURCE_MASK(64). There is no point in masking with all FF. Get rid of it and enforce the mask in the sanity checker. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c |2 +- arch/x86/kernel/time.c |6

[patch 05/11] x86/vdso: Introduce and use vgtod_ts

2018-09-14 Thread Thomas Gleixner
It's desired to support more clocks in the VDSO, e.g. CLOCK_TAI. This results either in indirect calls due to the larger switch case, which then requires retpolines or when the compiler is forced to avoid jump tables it results in even more conditionals. To avoid both variants which are bad for

[patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-14 Thread Thomas Gleixner
The code flow for the vclocks is convoluted as it requires the vclocks which can be invalidated separately from the vsyscall_gtod_data sequence to store the fact in a separate variable. That's inefficient. Restructure the code so the vclock readout returns cycles and the conversion to nanoseconds

[patch 10/11] x86/vdso: Move cycle_last handling into the caller

2018-09-14 Thread Thomas Gleixner
Dereferencing gtod->cycle_last all over the place and foing the cycles < last comparison in the vclock read functions generates horrible code. Doing it at the call site is much better and gains a few cycles both for TSC and pvclock. Caveat: This adds the comparison to the hyperv vclock as well,

[patch 02/11] x86/time: Implement clocksource_arch_init()

2018-09-14 Thread Thomas Gleixner
Runtime validate the VCLOCK_MODE in clocksource::archdata and disable VCLOCK if invalid, which disables the VDSO but keeps the system running. Signed-off-by: Thomas Gleixner --- arch/x86/Kconfig |1 + arch/x86/kernel/time.c | 16 2 files changed, 17 insertions(+)

[patch 07/11] x86/vdso: Collapse coarse functions

2018-09-14 Thread Thomas Gleixner
do_realtime_coarse() and do_monotonic_coarse() are now the same except for the storage array index. Hand the index in as an argument and collapse the functions. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c | 20 1 file changed, 4 insertions(+),

[patch 04/11] x86/vdso: Use unsigned int consistently for vsyscall_gtod_data::seq

2018-09-14 Thread Thomas Gleixner
The sequence count in vgtod_data is unsigned int, but the call sites use unsigned long, which is a pointless exercise. Fix the call sites and replace 'unsigned' with unsinged 'int' while at it. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c |8

[patch 08/11] x86/vdso: Replace the clockid switch case

2018-09-14 Thread Thomas Gleixner
Now that the time getter functions use the clockid as index into the storage array for the base time access, the switch case can be replaced. - Check for clockid >= MAX_CLOCKS and for negative clockid (CPU/FD) first and call the fallback function right away. - After establishing that clockid

[patch 11/11] x66/vdso: Add CLOCK_TAI support

2018-09-14 Thread Thomas Gleixner
With the storage array in place it's now trivial to support CLOCK_TAI in the vdso. Instead of extending the array to accomodate CLOCK_TAI, make use of the fact that: - CLOCK ids are set in stone - CLOCK_THREAD_CPUTIME is never going to be supported in the VDSO so the array slot 3 is unused

[patch 06/11] x86/vdso: Collapse high resolution functions

2018-09-14 Thread Thomas Gleixner
do_realtime() and do_monotonic() are now the same except for the storage array index. Hand the index in as an argument and collapse the functions. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c | 35 +++ 1 file changed, 7 insertions(+),

[patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-14 Thread Thomas Gleixner
Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() implementation, which extended the clockid switch case and added yet another slightly different copy of the same code. Especially the extended switch case is problematic as the compiler tends to generate a jump table which then

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-14 Thread Florian Weimer
On 09/14/2018 02:50 PM, Thomas Gleixner wrote: Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() implementation, which extended the clockid switch case and added yet another slightly different copy of the same code. Especially the extended switch case is problematic as the

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-14 Thread Thomas Gleixner
On Fri, 14 Sep 2018, Florian Weimer wrote: > On 09/14/2018 02:50 PM, Thomas Gleixner wrote: > > Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() > > implementation, which extended the clockid switch case and added yet > > another slightly different copy of the same code. > > >

[GIT PULL] Staging/IIO driver fixes for 4.19-rc4

2018-09-14 Thread Greg KH
The following changes since commit 5b394b2ddf0347bef56e50c69a58773c94343ff3: Linux 4.19-rc1 (2018-08-26 14:11:59 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git tags/staging-4.19-rc4 for you to fetch changes up to

[PATCH] staging: greybus: fix spelling mistake "entires" -> "entries"

2018-09-14 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake Signed-off-by: Colin Ian King --- drivers/staging/greybus/tools/README.loopback | 2 +- drivers/staging/greybus/tools/loopback_test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [greybus-dev] [PATCH] staging: greybus: fix spelling mistake "entires" -> "entries"

2018-09-14 Thread Alex Elder
On 09/14/2018 06:24 AM, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistake I hate to have two-character fixes to documentation like this. I.e., as long as you're touching the README file it might have been nice to review it and look for other things. I suspect you

Re: [greybus-dev] [PATCH] staging: greybus: fix spelling mistake "entires" -> "entries"

2018-09-14 Thread Colin Ian King
On 14/09/18 12:43, Alex Elder wrote: > On 09/14/2018 06:24 AM, Colin King wrote: >> From: Colin Ian King >> >> Trivial fix to spelling mistake > > I hate to have two-character fixes to documentation like this. I.e., > as long as you're touching the README file it might have been nice to >

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-14 Thread Peter Zijlstra
On Fri, Sep 14, 2018 at 02:56:46PM +0200, Florian Weimer wrote: > On 09/14/2018 02:50 PM, Thomas Gleixner wrote: > > Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() > > implementation, which extended the clockid switch case and added yet > > another slightly different copy of

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-14 Thread Thomas Gleixner
On Fri, 14 Sep 2018, Florian Weimer wrote: > On 09/14/2018 03:05 PM, Thomas Gleixner wrote: > > On Fri, 14 Sep 2018, Florian Weimer wrote: > > > > > On 09/14/2018 02:50 PM, Thomas Gleixner wrote: > > > > Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() > > > > implementation,

[PATCH v2 2/4] dt-bindings: soc: Document "brcm,bcm2836-vchiq"

2018-09-14 Thread Phil Elwell
"brcm,bcm2836-vchiq" should be used on BCM2836 and BCM2837 to ensure correct operation. Signed-off-by: Phil Elwell --- Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v2 3/4] ARM: dts: bcm283x: Correct vchiq compatible string

2018-09-14 Thread Phil Elwell
To allow VCHIQ to determine the correct cache line size, use the new "brcm,bcm2836-vchiq" compatible string on BCM2836 and BCM2837. Signed-off-by: Phil Elwell --- arch/arm/boot/dts/bcm2835-rpi.dtsi | 2 +- arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 2 +-

[PATCH v2 1/4] staging/vc04_services: Use correct cache line size

2018-09-14 Thread Phil Elwell
Use the compatible string in the DTB to select the correct cache line size for the SoC - 32 for BCM2835, and 64 for BCM2836 and BCM2837. Signed-off-by: Phil Elwell --- .../interface/vchiq_arm/vchiq_2835_arm.c | 4 ++- .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 36