[PATCH v2 2/2] iio: generic_buffer: Add --device-num option

2016-05-23 Thread Crestez Dan Leonard
This makes it possible to distinguish between iio devices with the same name. Signed-off-by: Crestez Dan Leonard --- tools/iio/generic_buffer.c | 69 ++ 1 file changed, 51 insertions(+), 18 deletions(-) diff --git a/tools/iio/generic_buffer.c

[PATCH v2 1/2] iio: generic_buffer: Cleanup when receiving signals

2016-05-23 Thread Crestez Dan Leonard
This will clean (disable buffer/trigger/channels) when doing something like a CTRL-C. Otherwise restarting generic_buffer requires a manual echo 0 > buffer/enable This also cleanup up all the code freeing string buffers at the end of main. We initialize all pointers to NULL so that cleanup can

RE: UBSAN whinge in ihci-hub.c

2016-05-23 Thread David Laight
From: Andrey Ryabinin > Sent: 18 May 2016 13:21 ... > >> $ 6.5.6.8 > >>"If both the pointer operand and the result point to elements of > >> the same array object, > >> or one past the last element of the array object, the evaluation > >> shall not produce an overflow; > >>

RE: UBSAN whinge in ihci-hub.c

2016-05-23 Thread David Laight
From: Andrey Ryabinin > Sent: 18 May 2016 13:21 ... > >> $ 6.5.6.8 > >>"If both the pointer operand and the result point to elements of > >> the same array object, > >> or one past the last element of the array object, the evaluation > >> shall not produce an overflow; > >>

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-23 Thread Oliver Neukum
On Mon, 2016-05-23 at 07:43 -0700, Guenter Roeck wrote: > On 05/23/2016 06:58 AM, Oliver Neukum wrote: > > Now I am confused. Are you saying that the choice of Alternate Mode does > > not belong into user space? > > > > No; sorry for the confusion. The above was meant to apply to my use > of

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-23 Thread Oliver Neukum
On Mon, 2016-05-23 at 07:43 -0700, Guenter Roeck wrote: > On 05/23/2016 06:58 AM, Oliver Neukum wrote: > > Now I am confused. Are you saying that the choice of Alternate Mode does > > not belong into user space? > > > > No; sorry for the confusion. The above was meant to apply to my use > of

Re: [PATCH v3 0/2] kbuild: Remove stale asm-generic wrappers

2016-05-23 Thread Arnd Bergmann
On Monday, May 23, 2016 9:21:19 AM CEST James Hogan wrote: > This patchset attempts to fix kbuild to automatically remove stale > asm-generic wrappers, i.e. when files are removed from generic-y and > added directly into arch/*/include/uapi/asm/, but where the existing > wrapper in

Re: [PATCH v3 0/2] kbuild: Remove stale asm-generic wrappers

2016-05-23 Thread Arnd Bergmann
On Monday, May 23, 2016 9:21:19 AM CEST James Hogan wrote: > This patchset attempts to fix kbuild to automatically remove stale > asm-generic wrappers, i.e. when files are removed from generic-y and > added directly into arch/*/include/uapi/asm/, but where the existing > wrapper in

[RFC PATCH 1/2] livepatch: Extend the livepatch-sample patch

2016-05-23 Thread Petr Mladek
We are going to play with the livepatch API when fixing the use of kobjects. This change makes the livepatch more complex and better see the effects of the new API. But it might be useful on its own. Anyway, it adds alternative output also for: /proc/uptime /proc/consoles and for the

[RFC PATCH 2/2] livepatch: Use kobjects the right way

2016-05-23 Thread Petr Mladek
There is the following note in Documentation/kobject/txt: One important point cannot be overstated: every kobject must have a release() method, and the kobject must persist (in a consistent state) until that method is called. If these constraints are not met, the code is flawed. The

[RFC PATCH 1/2] livepatch: Extend the livepatch-sample patch

2016-05-23 Thread Petr Mladek
We are going to play with the livepatch API when fixing the use of kobjects. This change makes the livepatch more complex and better see the effects of the new API. But it might be useful on its own. Anyway, it adds alternative output also for: /proc/uptime /proc/consoles and for the

[RFC PATCH 2/2] livepatch: Use kobjects the right way

2016-05-23 Thread Petr Mladek
There is the following note in Documentation/kobject/txt: One important point cannot be overstated: every kobject must have a release() method, and the kobject must persist (in a consistent state) until that method is called. If these constraints are not met, the code is flawed. The

[RFC PATCH 0/2] livepatch: Avoid possible race when releasing the patch

2016-05-23 Thread Petr Mladek
There was a long discussion about a possible race with sysfs, kobjects when removing an unused livepatch, see https://lkml.kernel.org/g/%3c1462190242-24731-1-git-send-email-mbe...@suse.cz%3E This patch set tries to implement what looked the most preferred solution from the discussion. I did my

[RFC PATCH 0/2] livepatch: Avoid possible race when releasing the patch

2016-05-23 Thread Petr Mladek
There was a long discussion about a possible race with sysfs, kobjects when removing an unused livepatch, see https://lkml.kernel.org/g/%3c1462190242-24731-1-git-send-email-mbe...@suse.cz%3E This patch set tries to implement what looked the most preferred solution from the discussion. I did my

[PATCH net-next 3/5] hv_netvsc: pass struct netvsc_device to rndis_filter_{open,close}()

2016-05-23 Thread Vitaly Kuznetsov
Both rndis_filter_open()/rndis_filter_close() use struct hv_device to reach to struct netvsc_device only and all callers have it already. While on it, rename net_device to nvdev in rndis_filter_open() as net_device is misleading. Signed-off-by: Vitaly Kuznetsov ---

[PATCH net-next 0/5] hv_netvsc: cleanup after untangling the pointer mess

2016-05-23 Thread Vitaly Kuznetsov
After we made traveling through our internal structures explicit it became obvious that some functions take arguments they don't need just to do redundant pointer travel and get to what they really need while their callers already have the required information. This is just a cleanup series with

[PATCH net-next 3/5] hv_netvsc: pass struct netvsc_device to rndis_filter_{open,close}()

2016-05-23 Thread Vitaly Kuznetsov
Both rndis_filter_open()/rndis_filter_close() use struct hv_device to reach to struct netvsc_device only and all callers have it already. While on it, rename net_device to nvdev in rndis_filter_open() as net_device is misleading. Signed-off-by: Vitaly Kuznetsov ---

[PATCH net-next 0/5] hv_netvsc: cleanup after untangling the pointer mess

2016-05-23 Thread Vitaly Kuznetsov
After we made traveling through our internal structures explicit it became obvious that some functions take arguments they don't need just to do redundant pointer travel and get to what they really need while their callers already have the required information. This is just a cleanup series with

[PATCH net-next 1/5] hv_netvsc: remove redundant assignment in netvsc_recv_callback()

2016-05-23 Thread Vitaly Kuznetsov
net_device_ctx is assigned in the very beginning of the function and 'net' pointer doesn't change. Signed-off-by: Vitaly Kuznetsov --- drivers/net/hyperv/netvsc_drv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/hyperv/netvsc_drv.c

[PATCH net-next 2/5] hv_netvsc: introduce {net,hv}_device_to_netvsc_device() helpers

2016-05-23 Thread Vitaly Kuznetsov
Make it easier to get 'struct netvsc_device' from 'struct net_device' and 'struct hv_device' by introducing inline helpers. Signed-off-by: Vitaly Kuznetsov --- drivers/net/hyperv/hyperv_net.h | 12 drivers/net/hyperv/netvsc.c | 11 +++

[PATCH net-next 1/5] hv_netvsc: remove redundant assignment in netvsc_recv_callback()

2016-05-23 Thread Vitaly Kuznetsov
net_device_ctx is assigned in the very beginning of the function and 'net' pointer doesn't change. Signed-off-by: Vitaly Kuznetsov --- drivers/net/hyperv/netvsc_drv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index

[PATCH net-next 2/5] hv_netvsc: introduce {net,hv}_device_to_netvsc_device() helpers

2016-05-23 Thread Vitaly Kuznetsov
Make it easier to get 'struct netvsc_device' from 'struct net_device' and 'struct hv_device' by introducing inline helpers. Signed-off-by: Vitaly Kuznetsov --- drivers/net/hyperv/hyperv_net.h | 12 drivers/net/hyperv/netvsc.c | 11 +++

[PATCH v2 3/3] coccinelle: catch krealloc() on devm_*() allocated memory

2016-05-23 Thread Yann Droneaud
krealloc() must not be used against devm_*() allocated memory regions: - if a bigger memory is to be allocated, krealloc() and __krealloc() could return a different pointer than the one given to them, creating a memory region which is not managed, thus it will not be automatically released

[PATCH v2 2/3] coccinelle: recognize more devm_* memory allocation functions

2016-05-23 Thread Yann Droneaud
Updates free/devm_free.cocci to recognize functions added by: - commit 64c862a839a8 ('devres: add kernel standard devm_k.alloc functions') - commit e31108cad3de ('devres: introduce API "devm_kstrdup"') - commit 3046365bb470 ('devres: introduce API "devm_kmemdup') - commit 43339bed7010 ('devres:

[PATCH v2 3/3] coccinelle: catch krealloc() on devm_*() allocated memory

2016-05-23 Thread Yann Droneaud
krealloc() must not be used against devm_*() allocated memory regions: - if a bigger memory is to be allocated, krealloc() and __krealloc() could return a different pointer than the one given to them, creating a memory region which is not managed, thus it will not be automatically released

[PATCH v2 2/3] coccinelle: recognize more devm_* memory allocation functions

2016-05-23 Thread Yann Droneaud
Updates free/devm_free.cocci to recognize functions added by: - commit 64c862a839a8 ('devres: add kernel standard devm_k.alloc functions') - commit e31108cad3de ('devres: introduce API "devm_kstrdup"') - commit 3046365bb470 ('devres: introduce API "devm_kmemdup') - commit 43339bed7010 ('devres:

[PATCH v2 0/3] coccinelle: catchup on memory allocation functions

2016-05-23 Thread Yann Droneaud
Hi, Please find updated patches that remove coccicheck's blindness regarding the following functions: - kzfree() - krealloc() - __krealloc() - devm_kmalloc() - devm_kvasprintf() - devm_kasprintf() - devm_kmalloc_array() - devm_kcalloc() - devm_kstrdup() - devm_kmemdup() - devm_get_free_pages() -

Re: [PATCH] drm/mm: avoid possible null pointer dereference

2016-05-23 Thread Chris Wilson
On Mon, May 23, 2016 at 04:35:53PM +0100, Eric Engestrom wrote: > On Mon, May 23, 2016 at 02:46:59PM +0100, Chris Wilson wrote: > > It's a programming error, just as would be passing in mm == NULL. Mark up > > the function as requiring non-NULL parameters. > > Using `__attribute__((nonnull))`? I

[PATCH v2 0/3] coccinelle: catchup on memory allocation functions

2016-05-23 Thread Yann Droneaud
Hi, Please find updated patches that remove coccicheck's blindness regarding the following functions: - kzfree() - krealloc() - __krealloc() - devm_kmalloc() - devm_kvasprintf() - devm_kasprintf() - devm_kmalloc_array() - devm_kcalloc() - devm_kstrdup() - devm_kmemdup() - devm_get_free_pages() -

Re: [PATCH] drm/mm: avoid possible null pointer dereference

2016-05-23 Thread Chris Wilson
On Mon, May 23, 2016 at 04:35:53PM +0100, Eric Engestrom wrote: > On Mon, May 23, 2016 at 02:46:59PM +0100, Chris Wilson wrote: > > It's a programming error, just as would be passing in mm == NULL. Mark up > > the function as requiring non-NULL parameters. > > Using `__attribute__((nonnull))`? I

[PATCH v2 1/3] coccinelle: also catch kzfree() issues

2016-05-23 Thread Yann Droneaud
Since commit 3ef0e5ba4673 ('slab: introduce kzfree()'), kfree() is no more the only function to be considered: kzfree() should be recognized too. In particular, kzfree() must not be called on memory allocated through devm_*() functions. Cc: Johannes Weiner Signed-off-by:

[PATCH net-next 5/5] hv_netvsc: pass struct net_device to rndis_filter_set_offload_params()

2016-05-23 Thread Vitaly Kuznetsov
The only caller rndis_filter_device_add() has 'struct net_device' pointer already. Signed-off-by: Vitaly Kuznetsov --- drivers/net/hyperv/rndis_filter.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/hyperv/rndis_filter.c

[PATCH net-next 5/5] hv_netvsc: pass struct net_device to rndis_filter_set_offload_params()

2016-05-23 Thread Vitaly Kuznetsov
The only caller rndis_filter_device_add() has 'struct net_device' pointer already. Signed-off-by: Vitaly Kuznetsov --- drivers/net/hyperv/rndis_filter.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/hyperv/rndis_filter.c

[PATCH v2 1/3] coccinelle: also catch kzfree() issues

2016-05-23 Thread Yann Droneaud
Since commit 3ef0e5ba4673 ('slab: introduce kzfree()'), kfree() is no more the only function to be considered: kzfree() should be recognized too. In particular, kzfree() must not be called on memory allocated through devm_*() functions. Cc: Johannes Weiner Signed-off-by: Yann Droneaud ---

[PATCH net-next 4/5] hv_netvsc: pass struct net_device to rndis_filter_set_device_mac()

2016-05-23 Thread Vitaly Kuznetsov
We unpack 'struct net_device' in netvsc_set_mac_addr() to get to 'struct hv_device' pointer which we use in rndis_filter_set_device_mac() to get back to 'struct net_device'. Signed-off-by: Vitaly Kuznetsov --- drivers/net/hyperv/hyperv_net.h | 2 +-

[PATCH net-next 4/5] hv_netvsc: pass struct net_device to rndis_filter_set_device_mac()

2016-05-23 Thread Vitaly Kuznetsov
We unpack 'struct net_device' in netvsc_set_mac_addr() to get to 'struct hv_device' pointer which we use in rndis_filter_set_device_mac() to get back to 'struct net_device'. Signed-off-by: Vitaly Kuznetsov --- drivers/net/hyperv/hyperv_net.h | 2 +- drivers/net/hyperv/netvsc_drv.c | 4 +---

Re: [PATCH] drm/mm: avoid possible null pointer dereference

2016-05-23 Thread Eric Engestrom
On Mon, May 23, 2016 at 02:46:59PM +0100, Chris Wilson wrote: > On Mon, May 23, 2016 at 02:38:29PM +0100, Eric Engestrom wrote: > > On Mon, May 23, 2016 at 02:02:26PM +0100, Chris Wilson wrote: > > > On Mon, May 23, 2016 at 02:56:45PM +0200, Daniel Vetter wrote: > > > > On Mon, May 23, 2016 at

Re: [PATCH] drm/mm: avoid possible null pointer dereference

2016-05-23 Thread Eric Engestrom
On Mon, May 23, 2016 at 02:46:59PM +0100, Chris Wilson wrote: > On Mon, May 23, 2016 at 02:38:29PM +0100, Eric Engestrom wrote: > > On Mon, May 23, 2016 at 02:02:26PM +0100, Chris Wilson wrote: > > > On Mon, May 23, 2016 at 02:56:45PM +0200, Daniel Vetter wrote: > > > > On Mon, May 23, 2016 at

Re: [PATCH v2 1/5] dt-bindings: mediatek: add descriptions for mediatek mt2701 iommu and smi

2016-05-23 Thread Rob Herring
On Thu, May 19, 2016 at 07:49:14PM +0800, honghui.zh...@mediatek.com wrote: > From: Honghui Zhang > > This patch defines the local arbitor port IDs for mediatek SoC MT2701 and > add descriptions of binding for mediatek generation one iommu and smi. > > Signed-off-by:

Re: [PATCH v2 1/5] dt-bindings: mediatek: add descriptions for mediatek mt2701 iommu and smi

2016-05-23 Thread Rob Herring
On Thu, May 19, 2016 at 07:49:14PM +0800, honghui.zh...@mediatek.com wrote: > From: Honghui Zhang > > This patch defines the local arbitor port IDs for mediatek SoC MT2701 and > add descriptions of binding for mediatek generation one iommu and smi. > > Signed-off-by: Honghui Zhang > --- >

Re: [PATCH] MIPS: devicetree: fix cpu interrupt controller node-names

2016-05-23 Thread Rob Herring
On Mon, May 23, 2016 at 6:39 AM, Antony Pavlov wrote: > Here is the quote from [1]: > > The unit-address must match the first address specified > in the reg property of the node. If the node has no reg property, > the @ and unit-address must be omitted and the

Re: [PATCH] MIPS: devicetree: fix cpu interrupt controller node-names

2016-05-23 Thread Rob Herring
On Mon, May 23, 2016 at 6:39 AM, Antony Pavlov wrote: > Here is the quote from [1]: > > The unit-address must match the first address specified > in the reg property of the node. If the node has no reg property, > the @ and unit-address must be omitted and the node-name alone >

Re: [PATCH] soc: qcom: provide mechanism for drivers to access L2 registers

2016-05-23 Thread Neil Leeder
On 5/20/2016 05:19 PM, Stephen Boyd wrote: > On 05/20/2016 12:13 PM, Neil Leeder wrote: >> diff --git a/drivers/soc/qcom/l2-accessors.c >> b/drivers/soc/qcom/l2-accessors.c >> new file mode 100644 >> index 000..fbb69bd >> --- /dev/null >> +++ b/drivers/soc/qcom/l2-accessors.c >> @@ -0,0

Re: [PATCH] soc: qcom: provide mechanism for drivers to access L2 registers

2016-05-23 Thread Neil Leeder
On 5/20/2016 05:19 PM, Stephen Boyd wrote: > On 05/20/2016 12:13 PM, Neil Leeder wrote: >> diff --git a/drivers/soc/qcom/l2-accessors.c >> b/drivers/soc/qcom/l2-accessors.c >> new file mode 100644 >> index 000..fbb69bd >> --- /dev/null >> +++ b/drivers/soc/qcom/l2-accessors.c >> @@ -0,0

Re: [PATCH 03/16] sched/fair: Disregard idle task wakee_flips in wake_wide

2016-05-23 Thread Mike Galbraith
On Mon, 2016-05-23 at 15:10 +0100, Morten Rasmussen wrote: > On Mon, May 23, 2016 at 03:00:46PM +0200, Mike Galbraith wrote: > > On Mon, 2016-05-23 at 13:00 +0100, Morten Rasmussen wrote: > > > > > The problem then seems to be distinguishing truly idle and busy doing > > > interrupts. The issue

Re: [PATCH 03/16] sched/fair: Disregard idle task wakee_flips in wake_wide

2016-05-23 Thread Mike Galbraith
On Mon, 2016-05-23 at 15:10 +0100, Morten Rasmussen wrote: > On Mon, May 23, 2016 at 03:00:46PM +0200, Mike Galbraith wrote: > > On Mon, 2016-05-23 at 13:00 +0100, Morten Rasmussen wrote: > > > > > The problem then seems to be distinguishing truly idle and busy doing > > > interrupts. The issue

Re: siginfo memory leak?

2016-05-23 Thread Oleg Nesterov
On 05/23, Michal Hocko wrote: > > x86 do_error_trap doesn't do any initialization at all! it actually does, please see fill_trap_info() although I'll try to re-check if it initializes everything we need. Oleg.

Re: siginfo memory leak?

2016-05-23 Thread Oleg Nesterov
On 05/23, Michal Hocko wrote: > > x86 do_error_trap doesn't do any initialization at all! it actually does, please see fill_trap_info() although I'll try to re-check if it initializes everything we need. Oleg.

Re: [PATCH 4/4] x86: Pass kernel thread parameters in fork_frame

2016-05-23 Thread Andy Lutomirski
On Mon, May 23, 2016 at 8:23 AM, Josh Poimboeuf wrote: > On Sat, May 21, 2016 at 12:04:51PM -0400, Brian Gerst wrote: >> --- a/arch/x86/entry/entry_64.S >> +++ b/arch/x86/entry/entry_64.S >> @@ -405,37 +405,29 @@ END(__switch_to_asm) >> * A newly forked process directly

Re: [PATCH 4/4] x86: Pass kernel thread parameters in fork_frame

2016-05-23 Thread Andy Lutomirski
On Mon, May 23, 2016 at 8:23 AM, Josh Poimboeuf wrote: > On Sat, May 21, 2016 at 12:04:51PM -0400, Brian Gerst wrote: >> --- a/arch/x86/entry/entry_64.S >> +++ b/arch/x86/entry/entry_64.S >> @@ -405,37 +405,29 @@ END(__switch_to_asm) >> * A newly forked process directly context switches into

Re: [PATCH V7 00/11] Support for generic ACPI based PCI host controller

2016-05-23 Thread Sinan Kaya
On 5/10/2016 11:19 AM, Tomasz Nowicki wrote: > From the functionality point of view this series may be split into the > following logic parts: > 1. New ECAM API and update for users of the pci-host-common API > 2. Necessary fixes as the preparation for using driver on ARM64. > 3. Use new MCFG

Re: [PATCH V7 00/11] Support for generic ACPI based PCI host controller

2016-05-23 Thread Sinan Kaya
On 5/10/2016 11:19 AM, Tomasz Nowicki wrote: > From the functionality point of view this series may be split into the > following logic parts: > 1. New ECAM API and update for users of the pci-host-common API > 2. Necessary fixes as the preparation for using driver on ARM64. > 3. Use new MCFG

Re: [PATCH] x86: fix potential memleak in do_error_trap

2016-05-23 Thread Oleg Nesterov
On 05/23, Michal Hocko wrote: > > @@ -271,6 +271,7 @@ static void do_error_trap(struct pt_regs *regs, long > error_code, char *str, > > if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) != > NOTIFY_STOP) { > + memset(, 0, sizeof(info)); >

Re: [PATCH] x86: fix potential memleak in do_error_trap

2016-05-23 Thread Oleg Nesterov
On 05/23, Michal Hocko wrote: > > @@ -271,6 +271,7 @@ static void do_error_trap(struct pt_regs *regs, long > error_code, char *str, > > if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) != > NOTIFY_STOP) { > + memset(, 0, sizeof(info)); >

Re: [PATCH 41/54] MAINTAINERS: Add file patterns for remoteproc device tree bindings

2016-05-23 Thread Bjorn Andersson
On Sun 22 May 02:06 PDT 2016, Geert Uytterhoeven wrote: > Submitters of device tree binding documentation may forget to CC > the subsystem maintainer if this is missing. > > Signed-off-by: Geert Uytterhoeven > Cc: Ohad Ben-Cohen > Cc: Bjorn Andersson

Re: [PATCH 41/54] MAINTAINERS: Add file patterns for remoteproc device tree bindings

2016-05-23 Thread Bjorn Andersson
On Sun 22 May 02:06 PDT 2016, Geert Uytterhoeven wrote: > Submitters of device tree binding documentation may forget to CC > the subsystem maintainer if this is missing. > > Signed-off-by: Geert Uytterhoeven > Cc: Ohad Ben-Cohen > Cc: Bjorn Andersson > Cc: linux-remotep...@vger.kernel.org

Re: [PATCH v2 10/12] spi: add driver for J-Core SPI controller

2016-05-23 Thread Mark Brown
On Fri, May 20, 2016 at 07:24:14PM -0400, Rich Felker wrote: > On Fri, May 20, 2016 at 11:23:17AM +0100, Mark Brown wrote: > > This is *extremely* late for a first posting of a driver for v4.7 (you > > missed the list as well as the maintainers). > I'm sorry for the mix-up. The kernel workflow

Re: [PATCH v2 10/12] spi: add driver for J-Core SPI controller

2016-05-23 Thread Mark Brown
On Fri, May 20, 2016 at 07:24:14PM -0400, Rich Felker wrote: > On Fri, May 20, 2016 at 11:23:17AM +0100, Mark Brown wrote: > > This is *extremely* late for a first posting of a driver for v4.7 (you > > missed the list as well as the maintainers). > I'm sorry for the mix-up. The kernel workflow

[PATCH] m32r: fix build failure

2016-05-23 Thread Sudip Mukherjee
m32r allmodconfig build was failing with the error: ERROR: "smp_flush_cache_all" [drivers/misc/lkdtm.ko] undefined! lkdtm driver at drivers/misc is using flush_icache_range() which for m32r is defined as smp_flush_cache_all() if CONFIG_SMP is defined. But as smp_flush_cache_all() was not exported

[PATCH] m32r: fix build failure

2016-05-23 Thread Sudip Mukherjee
m32r allmodconfig build was failing with the error: ERROR: "smp_flush_cache_all" [drivers/misc/lkdtm.ko] undefined! lkdtm driver at drivers/misc is using flush_icache_range() which for m32r is defined as smp_flush_cache_all() if CONFIG_SMP is defined. But as smp_flush_cache_all() was not exported

[PATCH] ARM: mach-imx6q: fix spelling mistake in error message

2016-05-23 Thread Jean Guyomarc'h
The compatible device tree node that is searched for is imx6q-iomuxc-gpr but was misspelled imx6q-iomux-gpr in the error handling message. Signed-off-by: Jean Guyomarc'h --- arch/arm/mach-imx/mach-imx6q.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] ARM: mach-imx6q: fix spelling mistake in error message

2016-05-23 Thread Jean Guyomarc'h
The compatible device tree node that is searched for is imx6q-iomuxc-gpr but was misspelled imx6q-iomux-gpr in the error handling message. Signed-off-by: Jean Guyomarc'h --- arch/arm/mach-imx/mach-imx6q.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v3 3/9] powerpc/powernv: Rename reusable idle functions to hardware agnostic names

2016-05-23 Thread Shreyas B. Prabhu
Functions like power7_wakeup_loss, power7_wakeup_noloss, power7_wakeup_tb_loss are used by POWER7 and POWER8 hardware. They can also be used by POWER9. Hence rename these functions hardware agnostic names. Suggested-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu

Re: [PATCH 4/4] x86: Pass kernel thread parameters in fork_frame

2016-05-23 Thread Josh Poimboeuf
On Sat, May 21, 2016 at 12:04:51PM -0400, Brian Gerst wrote: > --- a/arch/x86/entry/entry_64.S > +++ b/arch/x86/entry/entry_64.S > @@ -405,37 +405,29 @@ END(__switch_to_asm) > * A newly forked process directly context switches into this address. > * > * rax: prev task we switched from > + *

[PATCH v3 3/9] powerpc/powernv: Rename reusable idle functions to hardware agnostic names

2016-05-23 Thread Shreyas B. Prabhu
Functions like power7_wakeup_loss, power7_wakeup_noloss, power7_wakeup_tb_loss are used by POWER7 and POWER8 hardware. They can also be used by POWER9. Hence rename these functions hardware agnostic names. Suggested-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- New in v3

Re: [PATCH 4/4] x86: Pass kernel thread parameters in fork_frame

2016-05-23 Thread Josh Poimboeuf
On Sat, May 21, 2016 at 12:04:51PM -0400, Brian Gerst wrote: > --- a/arch/x86/entry/entry_64.S > +++ b/arch/x86/entry/entry_64.S > @@ -405,37 +405,29 @@ END(__switch_to_asm) > * A newly forked process directly context switches into this address. > * > * rax: prev task we switched from > + *

Re: [PATCH V5 5/6] vfio: platform: call _RST method when using ACPI

2016-05-23 Thread Eric Auger
Hi Sinan, On 05/16/2016 04:13 AM, Sinan Kaya wrote: > The device tree code checks for the presence of a reset driver and calls > the of_reset function pointer by looking up the reset driver as a module. > > ACPI defines _RST method to perform device level reset. After the _RST > method is

[PATCH v3 1/9] powerpc/kvm: make hypervisor state restore a function

2016-05-23 Thread Shreyas B. Prabhu
In the current code, when the thread wakes up in reset vector, some of the state restore code and check for whether a thread needs to branch to kvm is duplicated. Reorder the code such that this duplication is avoided. At a higher level this is what the change looks like- Before this patch -

Re: [PATCH V5 5/6] vfio: platform: call _RST method when using ACPI

2016-05-23 Thread Eric Auger
Hi Sinan, On 05/16/2016 04:13 AM, Sinan Kaya wrote: > The device tree code checks for the presence of a reset driver and calls > the of_reset function pointer by looking up the reset driver as a module. > > ACPI defines _RST method to perform device level reset. After the _RST > method is

[PATCH v3 1/9] powerpc/kvm: make hypervisor state restore a function

2016-05-23 Thread Shreyas B. Prabhu
In the current code, when the thread wakes up in reset vector, some of the state restore code and check for whether a thread needs to branch to kvm is duplicated. Reorder the code such that this duplication is avoided. At a higher level this is what the change looks like- Before this patch -

Re: [PATCH V5 6/6] vfio, platform: make reset driver a requirement by default

2016-05-23 Thread Eric Auger
Hi Sinan, On 05/16/2016 04:13 AM, Sinan Kaya wrote: > The code was allowing platform devices to be used without a supporting > VFIO reset driver. The hardware can be left in some inconsistent state > after a guest machine abort. > > The reset driver will put the hardware back to safe state and

[PATCH v3 7/9] powerpc/powernv: Add platform support for stop instruction

2016-05-23 Thread Shreyas B. Prabhu
POWER ISA v3 defines a new idle processor core mechanism. In summary, a) new instruction named stop is added. This instruction replaces instructions like nap, sleep, rvwinkle. b) new per thread SPR named PSSCR is added which controls the behavior of stop instruction. PSSCR has

[PATCH v3 7/9] powerpc/powernv: Add platform support for stop instruction

2016-05-23 Thread Shreyas B. Prabhu
POWER ISA v3 defines a new idle processor core mechanism. In summary, a) new instruction named stop is added. This instruction replaces instructions like nap, sleep, rvwinkle. b) new per thread SPR named PSSCR is added which controls the behavior of stop instruction. PSSCR has

Re: [PATCH V5 6/6] vfio, platform: make reset driver a requirement by default

2016-05-23 Thread Eric Auger
Hi Sinan, On 05/16/2016 04:13 AM, Sinan Kaya wrote: > The code was allowing platform devices to be used without a supporting > VFIO reset driver. The hardware can be left in some inconsistent state > after a guest machine abort. > > The reset driver will put the hardware back to safe state and

[PATCH v3 4/9] powerpc/powernv: Make power7_powersave_common more generic

2016-05-23 Thread Shreyas B. Prabhu
power7_powersave_common does common steps needed before entering idle state and eventually changes MSR to MSR_IDLE and does rfid to power7_enter_nap_mode. Move the updation of HSTATE_HWTHREAD_STATE to power7_powersave_common from power7_enter_nap_mode and make it more generic by passing the rfid

[PATCH v3 4/9] powerpc/powernv: Make power7_powersave_common more generic

2016-05-23 Thread Shreyas B. Prabhu
power7_powersave_common does common steps needed before entering idle state and eventually changes MSR to MSR_IDLE and does rfid to power7_enter_nap_mode. Move the updation of HSTATE_HWTHREAD_STATE to power7_powersave_common from power7_enter_nap_mode and make it more generic by passing the rfid

Re: [PATCH v3] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-05-23 Thread Alex Williamson
On Mon, 23 May 2016 11:45:34 +0800 Yongji Xie wrote: > On 2016/5/20 6:33, Alex Williamson wrote: > > > On Thu, 12 May 2016 18:20:51 +0800 > > Yongji Xie wrote: > > > >> Current vfio-pci implementation disallows to mmap > >> sub-page(size

Re: [PATCH v3] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-05-23 Thread Alex Williamson
On Mon, 23 May 2016 11:45:34 +0800 Yongji Xie wrote: > On 2016/5/20 6:33, Alex Williamson wrote: > > > On Thu, 12 May 2016 18:20:51 +0800 > > Yongji Xie wrote: > > > >> Current vfio-pci implementation disallows to mmap > >> sub-page(size < PAGE_SIZE) MMIO BARs because these BARs' mmio > >>

[PATCH v3 9/9] powerpc/powernv: Use deepest stop state when cpu is offlined

2016-05-23 Thread Shreyas B. Prabhu
If hardware supports stop state, use the deepest stop state when the cpu is offlined. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/platforms/powernv/idle.c| 15 +--

RE: [PATCH V2 2/2] usb: musb: Stop bulk endpoint while queue is rotated

2016-05-23 Thread Andrew Goodbody
> From: Sergei Shtylyov [mailto:sergei.shtyl...@cogentembedded.com] > On 05/23/2016 04:40 PM, Sergei Shtylyov wrote: > > Ensure that the endpoint is stopped by clearing REQPKT before > clearing DATAERR_NAKTIMEOUT before rotating the queue on the > dedicated bulk endpoint. >

Re: [PATCH] blk: remove NULL check before freeing functions

2016-05-23 Thread Jeff Moyer
Mike Danese writes: > Coccinelle complains: > > WARNING: NULL check before freeing functions like kfree, debugfs_remove, > debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider > reorganizing relevant code to avoid passing NULL values. > > Signed-off-by:

[PATCH v3 8/9] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-05-23 Thread Shreyas B. Prabhu
POWER ISA v3 defines a new idle processor core mechanism. In summary, a) new instruction named stop is added. b) new per thread SPR named PSSCR is added which controls the behavior of stop instruction. Supported idle states and value to be written to PSSCR register to enter any idle

[PATCH v3 6/9] powerpc/powernv: set power_save func after the idle states are initialized

2016-05-23 Thread Shreyas B. Prabhu
pnv_init_idle_states discovers supported idle states from the device tree and does the required initialization. Set power_save function pointer only after this initialization is done Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu

Re: [PATCH] blk: remove NULL check before freeing functions

2016-05-23 Thread Jeff Moyer
Mike Danese writes: > Coccinelle complains: > > WARNING: NULL check before freeing functions like kfree, debugfs_remove, > debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider > reorganizing relevant code to avoid passing NULL values. > > Signed-off-by: Mike Danese Acked-by:

[PATCH v3 8/9] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-05-23 Thread Shreyas B. Prabhu
POWER ISA v3 defines a new idle processor core mechanism. In summary, a) new instruction named stop is added. b) new per thread SPR named PSSCR is added which controls the behavior of stop instruction. Supported idle states and value to be written to PSSCR register to enter any idle

[PATCH v3 6/9] powerpc/powernv: set power_save func after the idle states are initialized

2016-05-23 Thread Shreyas B. Prabhu
pnv_init_idle_states discovers supported idle states from the device tree and does the required initialization. Set power_save function pointer only after this initialization is done Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/platforms/powernv/idle.c | 3

[PATCH v3 9/9] powerpc/powernv: Use deepest stop state when cpu is offlined

2016-05-23 Thread Shreyas B. Prabhu
If hardware supports stop state, use the deepest stop state when the cpu is offlined. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/platforms/powernv/idle.c| 15 +-- arch/powerpc/platforms/powernv/powernv.h | 1 +

RE: [PATCH V2 2/2] usb: musb: Stop bulk endpoint while queue is rotated

2016-05-23 Thread Andrew Goodbody
> From: Sergei Shtylyov [mailto:sergei.shtyl...@cogentembedded.com] > On 05/23/2016 04:40 PM, Sergei Shtylyov wrote: > > Ensure that the endpoint is stopped by clearing REQPKT before > clearing DATAERR_NAKTIMEOUT before rotating the queue on the > dedicated bulk endpoint. >

Re: [PATCH v2] cpufreq: stats: Walk online CPUs with CPU offline/online locked

2016-05-23 Thread Viresh Kumar
On 23-05-16, 15:40, Rafael J. Wysocki wrote: > On Monday, May 23, 2016 09:27:03 AM Viresh Kumar wrote: > > On 20-05-16, 23:33, Rafael J. Wysocki wrote: > > > The policy rwsem is really only needed in cpufreq_stats_create_table(), > > > because > > > the policy notifier is gone when _free_table()

[PATCH v3 5/9] powerpc/powernv: abstraction for saving SPRs before entering deep idle states

2016-05-23 Thread Shreyas B. Prabhu
Create a function for saving SPRs before entering deep idle states. This function can be reused for POWER9 deep idle states. Signed-off-by: Shreyas B. Prabhu --- New in v3 arch/powerpc/kernel/idle_power_common.S | 54 +++-- 1 file

Re: [PATCH v2] cpufreq: stats: Walk online CPUs with CPU offline/online locked

2016-05-23 Thread Viresh Kumar
On 23-05-16, 15:40, Rafael J. Wysocki wrote: > On Monday, May 23, 2016 09:27:03 AM Viresh Kumar wrote: > > On 20-05-16, 23:33, Rafael J. Wysocki wrote: > > > The policy rwsem is really only needed in cpufreq_stats_create_table(), > > > because > > > the policy notifier is gone when _free_table()

[PATCH v3 5/9] powerpc/powernv: abstraction for saving SPRs before entering deep idle states

2016-05-23 Thread Shreyas B. Prabhu
Create a function for saving SPRs before entering deep idle states. This function can be reused for POWER9 deep idle states. Signed-off-by: Shreyas B. Prabhu --- New in v3 arch/powerpc/kernel/idle_power_common.S | 54 +++-- 1 file changed, 32 insertions(+), 22

Re: v4.6 kernel BUG at mm/rmap.c:1101!

2016-05-23 Thread Andrea Arcangeli
On Mon, May 23, 2016 at 05:24:59PM +0300, Kirill A. Shutemov wrote: > On Mon, May 23, 2016 at 05:06:38PM +0300, Mika Westerberg wrote: > > Hi, > > > > After upgrading kernel of my desktop system from v4.6-rc7 to v4.6, I've > > started seeing following: > > > > [176611.093747]

[PATCH v3 2/9] powerpc/powernv: Rename idle_power7.S to idle_power_common.S

2016-05-23 Thread Shreyas B. Prabhu
idle_power7.S handles idle entry/exit for POWER7, POWER8 and in next patch for POWER9. Rename the file to a non-hardware specific name. Signed-off-by: Shreyas B. Prabhu --- Changes in v3: == - Instead of moving few common functions from idle_power7.S to

[PATCH v3 0/9] powerpc/powernv/cpuidle: Add support for POWER ISA v3 idle states

2016-05-23 Thread Shreyas B. Prabhu
POWER ISA v3 defines a new idle processor core mechanism. In summary, a) new instruction named stop is added. This instruction replaces instructions like nap, sleep, rvwinkle. b) new per thread SPR named PSSCR is added which controls the behavior of stop instruction.

Re: v4.6 kernel BUG at mm/rmap.c:1101!

2016-05-23 Thread Andrea Arcangeli
On Mon, May 23, 2016 at 05:24:59PM +0300, Kirill A. Shutemov wrote: > On Mon, May 23, 2016 at 05:06:38PM +0300, Mika Westerberg wrote: > > Hi, > > > > After upgrading kernel of my desktop system from v4.6-rc7 to v4.6, I've > > started seeing following: > > > > [176611.093747]

[PATCH v3 2/9] powerpc/powernv: Rename idle_power7.S to idle_power_common.S

2016-05-23 Thread Shreyas B. Prabhu
idle_power7.S handles idle entry/exit for POWER7, POWER8 and in next patch for POWER9. Rename the file to a non-hardware specific name. Signed-off-by: Shreyas B. Prabhu --- Changes in v3: == - Instead of moving few common functions from idle_power7.S to idle_power_common.S,

[PATCH v3 0/9] powerpc/powernv/cpuidle: Add support for POWER ISA v3 idle states

2016-05-23 Thread Shreyas B. Prabhu
POWER ISA v3 defines a new idle processor core mechanism. In summary, a) new instruction named stop is added. This instruction replaces instructions like nap, sleep, rvwinkle. b) new per thread SPR named PSSCR is added which controls the behavior of stop instruction.

Re: [PATCH v2 1/3] coccinelle: also catch kzfree() issues

2016-05-23 Thread Julia Lawall
On Mon, 23 May 2016, Yann Droneaud wrote: > Since commit 3ef0e5ba4673 ('slab: introduce kzfree()'), > kfree() is no more the only function to be considered: > kzfree() should be recognized too. > > In particular, kzfree() must not be called on memory > allocated through devm_*() functions. > >

Re: [PATCH v2 1/3] coccinelle: also catch kzfree() issues

2016-05-23 Thread Julia Lawall
On Mon, 23 May 2016, Yann Droneaud wrote: > Since commit 3ef0e5ba4673 ('slab: introduce kzfree()'), > kfree() is no more the only function to be considered: > kzfree() should be recognized too. > > In particular, kzfree() must not be called on memory > allocated through devm_*() functions. > >

<    4   5   6   7   8   9   10   11   12   13   >