[PATCH v2] usb: musb: cppi_dma.c: use DIV_ROUND_UP macro in cppi_next_(r|t)x_segment()

2017-03-24 Thread Ivan Safonov
DIV_ROUND_UP is bit useful than series of "/" and "%" operations. Replace "/%" sequence with DIV_ROUND_UP macro. Signed-off-by: Ivan Safonov --- Changes in v2: - little style fix drivers/usb/musb/cppi_dma.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers

Re: __link_block_group uses GFP_KERNEL

2017-03-24 Thread Denis Kirjanov
On 3/25/17, Jeff Mahoney wrote: > On 3/24/17 5:02 AM, Denis Kirjanov wrote: >> Hi guys, >> >> Looks like that current code does GFP_KERNEL allocation inside >> __link_block_group. >> the function invokes kobject_add and internally creates sysfs files >> with the GFP_KERNEL flag set. > > Yep, that'

Re: [PATCH] uapi: add missing install of userio.h

2017-03-24 Thread Dmitry Torokhov
On Fri, Mar 24, 2017 at 03:49:08PM +0100, Jiri Kosina wrote: > On Wed, 8 Mar 2017, Naohiro Aota wrote: > > > While commit 5523662edd4f ("Input: add userio module") added userio.h > > under the uapi/ directory, it forgot to add the header file to Kbuild. > > Thus, the file is missing from header in

[PATCH 2/4] Input: synaptics - use BIT() and GENMASK() macros

2017-03-24 Thread Dmitry Torokhov
Use standard infrastructure, such as BIT and GENMASK, instead of rolling bitmasks by hand. Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/synaptics.c | 6 +-- drivers/input/mouse/synaptics.h | 90 - 2 files changed, 48 insertions(+), 48 deletions(

[PATCH 3/4] Input: synaptics - do not abuse -1 as return value

2017-03-24 Thread Dmitry Torokhov
Let's stop using -1 as a universal return value and instead propagate errors from underlying calls up the stack. Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/synaptics.c | 71 ++--- 1 file changed, 46 insertions(+), 25 deletions(-) diff --git a/driv

[PATCH 1/4] Input: synaptics - add synaptics_query_int()

2017-03-24 Thread Dmitry Torokhov
Factor out querying and parsing 3-byte response into an integer value. Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/synaptics.c | 77 - drivers/input/mouse/synaptics.h | 3 +- 2 files changed, 32 insertions(+), 48 deletions(-) diff --git a/driv

[PATCH 4/4] Input: synaptics - use u8 instead of unsigned char

2017-03-24 Thread Dmitry Torokhov
The rest of the kernel uses u8, u16, etc for data coming form hardware, let's switch ti using u8 here as well. Also turn pkt_type into an enum. Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/synaptics.c | 60 - drivers/input/mouse/synaptics.h | 22

[PATCH 4/4] Input: synaptics-rmi4 - when registering sensors do not call them "drivers"

2017-03-24 Thread Dmitry Torokhov
We are not registering drivers, but transport devices (AKA sensors), so let's call them that. Also let's rename "retval" to "error" in probe() functions as the variables are used to store error codes. Signed-off-by: Dmitry Torokhov --- drivers/input/rmi4/rmi_i2c.c | 51 +--

[PATCH 2/4] Input: synaptics-rmi4 - fix endianness issue in SMBus transport

2017-03-24 Thread Dmitry Torokhov
The mapping table holds address in LE form, so we should convert it to CPU when comparing it. Signed-off-by: Dmitry Torokhov --- drivers/input/rmi4/rmi_smbus.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/input/rmi4/rmi_smbus.c b/drivers/input/rmi4/rmi_smb

[PATCH 3/4] Input: synaptics-rmi4 - cleanup SMbus mapping handling

2017-03-24 Thread Dmitry Torokhov
There is no reason to copy structures field-by-filed when we can copy eements at once. Signed-off-by: Dmitry Torokhov --- drivers/input/rmi4/rmi_smbus.c | 43 ++ 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/drivers/input/rmi4/rmi_smbus.c

[PATCH 1/4] Input: synaptics-rmi4 - fix handling failures from rmi_enable_sensor

2017-03-24 Thread Dmitry Torokhov
If rmi_enable_sensor() fails in rmi_driver_probe(), we should not return immediately, but disable IRQs and tear down function list. Signed-off-by: Dmitry Torokhov --- drivers/input/rmi4/rmi_driver.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/input/rmi

[PATCH] staging: media: atomisp: compress return logic

2017-03-24 Thread Arushi Singhal
Simplify function returns by merging assignment and return. Signed-off-by: Arushi Singhal --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 8 ++-- .../media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c| 7 ++- 2 files changed, 4 insertions(+), 11 deleti

Re: [PATCH 6/9] bus: brcmstb_gisb: correct support for 64-bit address output

2017-03-24 Thread Gregory Fong
On Fri, Mar 24, 2017 at 7:46 AM, Doug Berger wrote: > The GISB bus can support addresses beyond 32-bits. So this commit > corrects support for reading a captured 64-bit address into a 64-bit > variable by obtaining the high bits from the ARB_ERR_CAP_HI_ADDR > register (when present) and then outp

RE: [RFC PATCH] iommu/dma/pci: account pci host bridge dma_mask for IOVA allocation

2017-03-24 Thread Oza Oza
Hi Robin, I have made 3 separate patches now, which gives clear idea about the changes. we can have discussion there. Regards, Oza. -Original Message- From: Robin Murphy [mailto:robin.mur...@arm.com] Sent: Monday, March 20, 2017 9:14 PM To: Oza Oza Cc: Joerg Roedel; linux-...@vger.kernel

[RFC PATCH 2/3] iommu/dma: account pci host bridge dma_mask for IOVA allocation

2017-03-24 Thread Oza Pawandeep
it is possible that PCI device supports 64-bit DMA addressing, and thus it's driver sets device's dma_mask to DMA_BIT_MASK(64), however PCI host bridge may have limitations on the inbound transaction addressing. As an example, consider NVME SSD device connected to iproc-PCIe controller. Currently,

[RFC PATCH 3/3] of: fix node traversing in of_dma_get_range

2017-03-24 Thread Oza Pawandeep
it jumps to the parent node without examining the child node. also with that, it throws "no dma-ranges found for node" for pci dma-ranges. this patch fixes device node traversing for dma-ranges. Reviewed-by: Anup Patel Signed-off-by: Oza Pawandeep diff --git a/drivers/of/address.c b/drivers/of

[RFC PATCH 1/3] of/pci: dma-ranges to account highest possible host bridge dma_mask

2017-03-24 Thread Oza Pawandeep
it is possible that PCI device supports 64-bit DMA addressing, and thus it's driver sets device's dma_mask to DMA_BIT_MASK(64), however PCI host bridge may have limitations on the inbound transaction addressing. As an example, consider NVME SSD device connected to iproc-PCIe controller. Currently,

Re: [PATCH v6 03/15] IB/mthca: Replace PCI pool old API

2017-03-24 Thread Doug Ledford
On Sun, 2017-03-19 at 18:03 +0100, Romain Perier wrote: > The PCI pool API is deprecated. This commit replaces the PCI pool old > API by the appropriate function with the DMA pool API. > > Signed-off-by: Romain Perier > Acked-by: Peter Senna Tschudin > Tested-by: Peter Senna Tschudin >  Change

Re: [PATCH 4/9] bus: brcmstb_gisb: Use register offsets with writes too

2017-03-24 Thread Gregory Fong
On Fri, Mar 24, 2017 at 7:46 AM, Doug Berger wrote: > This commit corrects the bug introduced in commit f80835875d3d > ("bus: brcmstb_gisb: Look up register offsets in a table") such > that gisb_write() translates the register enumeration into an > offset from the base address for writes as well a

[PATCH] staging: greybus: compress return logic

2017-03-24 Thread Arushi Singhal
Simplify function returns by merging assignment and return. Signed-off-by: Arushi Singhal --- drivers/staging/greybus/loopback.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c index aaf29a5fac83..08

Re: [PATCH] regulator: core: Limit propagation of parent voltage count and list

2017-03-24 Thread Javier Martinez Canillas
Hello Matthias, On 03/24/2017 05:38 PM, Brian Norris wrote: > On Fri, Mar 24, 2017 at 01:09:52PM -0700, Matthias Kaehlcke wrote: >> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c >> index 53d4fc70dbd0..121838e0125b 100644 >> --- a/drivers/regulator/core.c >> +++ b/drivers/regulat

0324 tree BUG at kernel/auditsc.c:1513!

2017-03-24 Thread Xiong Zhou
crc32c_intel nd_pmem serio_raw i2c_core pps_core scsi_transport_sas [last unloaded: scsi_debug] [11231.440342] CPU: 24 PID: 15334 Comm: dio_truncate Not tainted 4.11.0-rc3-linux-next-65b2dc3-next-20170324 #336 [11231.488861] Hardware name: HP ProLiant DL360 Gen9, BIOS P89 05/06/2015

[PATCH][RFC] cpufreq: Bring CPUs up even if cpufreq_online failed

2017-03-24 Thread Chen Yu
There is a report that after commit 27622b061eb4 ("cpufreq: Convert to hotplug state machine"), the normal CPU offline/online cycle failed on some platforms. According to the ftrace result, this problem was triggered on platforms using acpi-freq as the default cpufreq driver, and due to the lack of

Re: [PATCH 4.10 00/27] 4.10.6-stable review

2017-03-24 Thread Guenter Roeck
On 03/24/2017 10:58 AM, Greg Kroah-Hartman wrote: This is the start of the stable review cycle for the 4.10.6 release. There are 27 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be ma

Re: [PATCH 4.9 00/24] 4.9.18-stable review

2017-03-24 Thread Guenter Roeck
On 03/24/2017 10:58 AM, Greg Kroah-Hartman wrote: This is the start of the stable review cycle for the 4.9.18 release. There are 24 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be ma

Re: [PATCH 4.4 00/30] 4.4.57-stable review

2017-03-24 Thread Guenter Roeck
On 03/24/2017 10:58 AM, Greg Kroah-Hartman wrote: This is the start of the stable review cycle for the 4.4.57 release. There are 30 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be ma

Re: [PATCH 4.4 00/30] 4.4.57-stable review

2017-03-24 Thread Guenter Roeck
On 03/24/2017 05:10 PM, Kevin Hilman wrote: + at91 maintainers kernelci.org bot writes: stable-rc boot: 496 boots: 1 failed, 492 passed with 2 offline, 1 conflict (v4.4.56-31-gbcd1e808ead3) Full Boot Summary: https://kernelci.org/boot/all/job/stable-rc/kernel/v4.4.56-31-gbcd1e808ead3/ Full

[PATCH net-next 0/2] netvsc: Fix miscellaneous issues

2017-03-24 Thread kys
From: K. Y. Srinivasan Fix miscellaneous issues. K. Y. Srinivasan (2): netvsc: Fix a bug in sub-channel handling netvsc: Properly initialize the return value drivers/net/hyperv/netvsc_drv.c |2 +- drivers/net/hyperv/rndis_filter.c |5 + 2 files changed, 6 insertions(+), 1 del

[PATCH net-next 1/2] netvsc: Fix a bug in sub-channel handling

2017-03-24 Thread kys
From: K. Y. Srinivasan All netvsc channels are handled via NAPI. Setup the "read mode" correctly for the netvsc sub-channels. Signed-off-by: K. Y. Srinivasan --- drivers/net/hyperv/rndis_filter.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/net/hyperv/rn

[PATCH net-next 2/2] netvsc: Properly initialize the return value

2017-03-24 Thread kys
From: K. Y. Srinivasan Initialize the return value correctly. Signed-off-by: K. Y. Srinivasan --- drivers/net/hyperv/netvsc_drv.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index eb7ae79..f830bbb 1

Re: [net-next PATCH v3 0/8] Add busy poll support for epoll

2017-03-24 Thread David Miller
From: Alexander Duyck Date: Fri, 24 Mar 2017 10:07:47 -0700 > This patch set adds support for using busy polling with epoll. Series applied, thanks!

Re: [RFC][PATCH 2/2] cpufreq: schedutil: Force max frequency on busy CPUs

2017-03-24 Thread Joel Fernandes
Hi Vincent, On Thu, Mar 23, 2017 at 3:08 PM, Vincent Guittot wrote: [..] >>> So I'm not really aligned with the description of your problem: PELT metric underestimates the load of the CPU. The PELT is just about tracking CFS task utilization but not whole CPU utilization and

Re: [PATCH v6 06/15] mlx5: Replace PCI pool old API

2017-03-24 Thread Doug Ledford
On Mon, 2017-03-20 at 08:31 +0200, Leon Romanovsky wrote: > On Sun, Mar 19, 2017 at 06:03:55PM +0100, Romain Perier wrote: > > > > The PCI pool API is deprecated. This commit replaces the PCI pool > > old > > API by the appropriate function with the DMA pool API. > > > > Signed-off-by: Romain Per

Re: [net-next PATCH v3 5/8] net: Track start of busy loop instead of when it should end

2017-03-24 Thread Eric Dumazet
On Fri, 2017-03-24 at 10:08 -0700, Alexander Duyck wrote: > From: Alexander Duyck > > This patch flips the logic we were using to determine if the busy polling > has timed out. The main motivation for this is that we will need to > support two different possible timeout values in the future and

Re: [net-next PATCH v3 7/8] epoll: Add busy poll support to epoll with socket fds.

2017-03-24 Thread Eric Dumazet
On Fri, 2017-03-24 at 10:08 -0700, Alexander Duyck wrote: > From: Sridhar Samudrala > > This patch adds busy poll support to epoll. The implementation is meant to > be opportunistic in that it will take the NAPI ID from the last socket > that is added to the ready list that contains a valid NAPI

Re: [PATCH] drm/vmwgfx: Check check that number of mip levels is above zero in vmw_surface_define_ioctl()

2017-03-24 Thread Sinclair Yeh
Hi, thank you for this patch. Murray McAllister reported this one a couple of months ago, and this is already in our queue. Sinclair On Fri, Mar 24, 2017 at 04:37:10PM +0100, Vladis Dronov wrote: > In vmw_surface_define_ioctl(), a num_sizes parameter is assigned a > user-controlled value which

[PATCH v3] staging: media: davinci_vpfe: Replace a bit shift.

2017-03-24 Thread Arushi Singhal
This patch replaces bit shifting on 1 with the BIT(x) macro. This was done with coccinelle: @@ constant c; @@ -1 << c +BIT(c) Signed-off-by: Arushi Singhal --- changes in v3 - change the subject. - remove extra parenthesis. drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 2 +- drivers/

Re: [PATCH] ipmi_ssif: use setup_timer

2017-03-24 Thread Corey Minyard
A little nicer, yes. In queue for the next release. Thanks, -corey On 03/24/2017 09:15 AM, Geliang Tang wrote: Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang --- drivers/char/ipmi/ipmi_ssif.c | 5 ++--- 1 file changed, 2 insertions(+), 3 delet

Re: [PATCH] ACPI / IPMI: allow ACPI_IPMI with IPMI_SSIF

2017-03-24 Thread Corey Minyard
Oops, yes, this is an issue. However, it should probably depend on IPMI_HANDLER, not the individual interface types. -corey On 03/23/2017 10:53 AM, Sinan Kaya wrote: ACPI_IPMI driver currently depends on IPMI System Interface (IPMI_SI) driver to be enabled. IPMI_SI driver only handles KCS, S

[PATCH] Staging: atomisp - octal permissions, style fix

2017-03-24 Thread Derek Robson
Changed permissions to octal style Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c | 9 +++-- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 8 2 files changed, 7 insertions(+), 10 deletions(-) diff --g

Re: [PATCH] ACPI / IPMI: change warning to debug on timeout

2017-03-24 Thread Corey Minyard
Why would a timeout for a message be expected? The BMC should at least respond with an error for an incorrect message. -corey On 03/23/2017 10:32 AM, Sinan Kaya wrote: Getting timeout message from BMC when trying to read from a non-existent FRU. This is expected but warning is not. Let's redu

Re: [PATCH] ipmi: Fix kernel panic at ipmi_ssif_thread()

2017-03-24 Thread Corey Minyard
This is incorrect. These values *must* be set before ssif_i2c_send() is done. Once ssif_i2c_send() is called, msg_written_handler can be called at any time after that, including before where you moved the new code. If I understand this correctly, I think you need to add a variable, maybe named

Re: [RESEND PATCH] IB/qib: fix false-postive maybe-uninitialized warning

2017-03-24 Thread Doug Ledford
On Tue, 2017-03-14 at 13:18 +0100, Arnd Bergmann wrote: > aarch64-linux-gcc-7 complains about code it doesn't fully understand: > > drivers/infiniband/hw/qib/qib_iba7322.c: In function > 'qib_7322_txchk_change': > include/asm-generic/bitops/non-atomic.h:105:35: error: 'shadow' may > be used uninit

Re: [PATCH v2 09/23] MAINTAINERS: Add file patterns for infiniband device tree bindings

2017-03-24 Thread Doug Ledford
On Sun, 2017-03-12 at 14:16 +0100, 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: Doug Ledford > Cc: Sean Hefty > Cc: Hal Rosenstock > Cc: linux-r...@vger.ke

Re: [RFC v5 5/9] sched/deadline: do not reclaim the whole CPU bandwidth

2017-03-24 Thread Steven Rostedt
On Fri, 24 Mar 2017 22:58:27 +0100 luca abeni wrote: > Hi Peter, > > On Fri, 24 Mar 2017 15:00:15 +0100 > Peter Zijlstra wrote: > > > On Fri, Mar 24, 2017 at 04:52:58AM +0100, luca abeni wrote: > > > > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > > > index 20c62e7..efa88eb 100

Re: [RFC v5 2/9] sched/deadline: improve the tracking of active utilization

2017-03-24 Thread Steven Rostedt
On Fri, 24 Mar 2017 22:47:15 +0100 luca abeni wrote: > Ok... Since I am not good at ascii art, would it be ok to add a textual > description? If yes, I'll add a comment like: > " > The utilization of a task is added to the runqueue's active utilization > when the task becomes active (is enqueued

Re: [net-next PATCH v3 0/8] Add busy poll support for epoll

2017-03-24 Thread David Miller
From: Alexander Duyck Date: Fri, 24 Mar 2017 10:07:47 -0700 > v3: Split off the code for limiting busy_poll and busy_read into a separate > patch for net. > Updated patch that changed busy loop time tracking so that it uses > "local_clock() >> 10" as we originally did. > Tweaked "

Re: [PATCH] uapi: fix rdma/mlx5-abi.h userspace compilation errors

2017-03-24 Thread Doug Ledford
On Fri, 2017-02-24 at 03:28 +0300, Dmitry V. Levin wrote: > Consistently use types from linux/types.h to fix the following > rdma/mlx5-abi.h userspace compilation errors: > > /usr/include/rdma/mlx5-abi.h:69:25: error: 'u64' undeclared here (not > in a function) >   MLX5_LIB_CAP_4K_UAR = (u64)1 <<

Re: [PATCH v3 1/2] module: verify address is read-only

2017-03-24 Thread Kees Cook
On Fri, Mar 24, 2017 at 5:42 PM, Jessica Yu wrote: > +++ Kees Cook [23/03/17 14:13 -0700]: >> >> On Wed, Mar 22, 2017 at 7:55 PM, Eddie Kovsky wrote: >>> >>> Implement a mechanism to check if a module's address is in >>> the rodata or ro_after_init sections. It mimics the exsiting functions >>> t

Re: [PATCH v3 1/2] module: verify address is read-only

2017-03-24 Thread Kees Cook
On Fri, Mar 24, 2017 at 6:41 PM, Eddie Kovsky wrote: > On 03/24/17, Jessica Yu wrote: >> +++ Eddie Kovsky [22/03/17 20:55 -0600]: >> > Implement a mechanism to check if a module's address is in >> > the rodata or ro_after_init sections. It mimics the exsiting functions >> > that test if an address

[PATCH] Staging: vt6655 - block comments style fix

2017-03-24 Thread Derek Robson
Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/vt6655/rf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/rf.h b/drivers/staging/vt6655/rf.h index b6e853784a26..37600093cab2 100644 --- a/drivers/sta

Re: [PATCH v3 1/2] module: verify address is read-only

2017-03-24 Thread Eddie Kovsky
On 03/24/17, Jessica Yu wrote: > +++ Eddie Kovsky [22/03/17 20:55 -0600]: > > Implement a mechanism to check if a module's address is in > > the rodata or ro_after_init sections. It mimics the exsiting functions > > that test if an address is inside a module's text section. > > > > Functions that

Re: [PATCH 4.9 00/24] 4.9.18-stable review

2017-03-24 Thread Javier Martinez Canillas
Hello Kevin, On 03/24/2017 08:57 PM, Kevin Hilman wrote: > + Sjoerd, Javier, > > kernelci.org bot writes: > >> stable-rc boot: 233 boots: 1 failed, 222 passed with 10 offline >> (v4.9.17-25-g4d90baeca3c8) >> >> Full Boot Summary: >> https://kernelci.org/boot/all/job/stable-rc/kernel/v4.9.17-2

Re: [RFC][PATCH v3 2/2] cpufreq: schedutil: Avoid reducing frequency of busy CPUs prematurely

2017-03-24 Thread Rafael J. Wysocki
On Sat, Mar 25, 2017 at 2:14 AM, Sai Gurrappadi wrote: > Hi Rafael, > > On 03/21/2017 04:08 PM, Rafael J. Wysocki wrote: >> From: Rafael J. Wysocki >> >> The way the schedutil governor uses the PELT metric causes it to >> underestimate the CPU utilization in some cases. >> >> That can be easily d

Re: lockdep warning: console vs. mem hotplug

2017-03-24 Thread Sergey Senozhatsky
On (03/24/17 21:08), Steven Rostedt wrote: > > Sebastian, does this change make lockdep happy? > > > > it removes console drivers from the __offline_isolated_pages(). not the > > best solution I can think of, but the simplest one. > > > > --- > > > > mm/page_alloc.c | 2 +- > > 1 file changed,

Re: maybe revert commit c275a57f5ec3 "xen/balloon: Set balloon's initial state to number of existing RAM pages"

2017-03-24 Thread Boris Ostrovsky
I think we can all agree that the *ideal* situation would be, for the balloon driver to not immediately hotplug memory so it can add 11 more pages, so maybe I just need to figure out why the balloon driver thinks it needs 11 more pages, and fix that. How does the new memory appear in the gue

Re: [RFC][PATCH v3 2/2] cpufreq: schedutil: Avoid reducing frequency of busy CPUs prematurely

2017-03-24 Thread Sai Gurrappadi
Hi Rafael, On 03/21/2017 04:08 PM, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > The way the schedutil governor uses the PELT metric causes it to > underestimate the CPU utilization in some cases. > > That can be easily demonstrated by running kernel compilation on > a Sandy Bridge Int

Re: lockdep warning: console vs. mem hotplug

2017-03-24 Thread Steven Rostedt
On Sat, 25 Mar 2017 09:04:42 +0900 Sergey Senozhatsky wrote: > On (03/21/17 13:44), Sergey Senozhatsky wrote: > [..] > > so we probably can > > > > > > 1) move pr_info() out of zone->lock in __offline_isolated_pages(). > >meh... > > > > > > 2) switch to printk_deferred() in __offline_isol

[PATCH] cfg80211: Fix array-bounds warning in fragment copy

2017-03-24 Thread Matthias Kaehlcke
__ieee80211_amsdu_copy_frag intentionally initializes a pointer to array[-1] to increment it later to valid values. clang rightfully generates an array-bounds warning on the initialization statement. Work around this by initializing the pointer to array[0] and decrementing it later, which allows to

[GIT PULL] clk fixes for v4.11-rc3

2017-03-24 Thread Stephen Boyd
The following changes since commit c1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201: Linux 4.11-rc1 (2017-03-05 12:59:56 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git tags/clk-fixes-for-linus for you to fetch changes up to 7f0b97d5bb4c1c

Re: lockdep warning: console vs. mem hotplug

2017-03-24 Thread Steven Rostedt
On Sat, 25 Mar 2017 09:00:05 +0900 Sergey Senozhatsky wrote: > Hello, > > On (03/24/17 12:39), Steven Rostedt wrote: > [..] > > Is there a stack trace of where the lockdep dump happened? That is > > useful too. Otherwise we don't see where the inverse happened. > > Steven, isn't it the invers

Re: [PATCH] perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()

2017-03-24 Thread Arnaldo Carvalho de Melo
Em Fri, Mar 24, 2017 at 04:20:12PM -0700, Andi Kleen escreveu: > On Fri, Mar 24, 2017 at 02:15:52PM +0200, Adrian Hunter wrote: > > Address filtering with kernel symbols incorrectly resulted in the error > > "Cannot determine size of symbol" because the no_size logic was the wrong > > way around. >

Re: [PATCH] perf report: Fix build-test error for make_minimal_O target

2017-03-24 Thread Arnaldo Carvalho de Melo
Em Sat, Mar 25, 2017 at 04:23:41PM +0800, Jin Yao escreveu: > make -C tools/perf build-test Thanks, I'll fold this with the patch where the problem happened, - Arnaldo > The error is "undefined reference to dso__demangle_sym". > > This patch adds the dso__dmangle_sym() in symbol-minimal.c to f

Re: [PATCH] hugetlbfs: initialize shared policy as part of inode allocation

2017-03-24 Thread Tetsuo Handa
Mike Kravetz wrote: > Any time after inode allocation, destroy_inode can be called. The > hugetlbfs inode contains a shared_policy structure, and > mpol_free_shared_policy is unconditionally called as part of > hugetlbfs_destroy_inode. Initialize the policy as part of inode > allocation so that a

Re: [PATCH v3 1/2] module: verify address is read-only

2017-03-24 Thread Jessica Yu
+++ Kees Cook [23/03/17 14:13 -0700]: On Wed, Mar 22, 2017 at 7:55 PM, Eddie Kovsky wrote: Implement a mechanism to check if a module's address is in the rodata or ro_after_init sections. It mimics the exsiting functions that test if an address is inside a module's text section. Functions that

Re: [PATCH v3 1/2] module: verify address is read-only

2017-03-24 Thread Jessica Yu
+++ Eddie Kovsky [22/03/17 20:55 -0600]: Implement a mechanism to check if a module's address is in the rodata or ro_after_init sections. It mimics the exsiting functions that test if an address is inside a module's text section. Functions that take a module as an argument will be able to ver

Re: [PATCH -v6 04/13] futex,rt_mutex: Provide futex specific rt_mutex API

2017-03-24 Thread Darren Hart
On Wed, Mar 22, 2017 at 11:35:51AM +0100, Peter Zijlstra wrote: > Part of what makes futex_unlock_pi() intricate is that > rt_mutex_futex_unlock() -> rt_mutex_slowunlock() can drop > rt_mutex::wait_lock. > > This means we cannot rely on the atomicy of wait_lock, which we would > like to do in orde

[PATCH] perf report: Fix build-test error for make_minimal_O target

2017-03-24 Thread Jin Yao
make -C tools/perf build-test The error is "undefined reference to dso__demangle_sym". This patch adds the dso__dmangle_sym() in symbol-minimal.c to fix it. Signed-off-by: Jin Yao --- tools/perf/util/symbol-minimal.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tools/perf/util/sy

Re: [PATCH v5 0/5] perf report: Show inline stack

2017-03-24 Thread Jin, Yao
Hi Arnaldo, I checked it needed to add dso__dmangle_sym() in symbol-minimal.c. make -C tools/perf build-test .. iqhvUMsN DESTDIR=/tmp/tmp.9zqX9FtV0p Makefile:203: Please install asciidoc xmlto to have the man pages installed make_no_slang_O: cd . && make NO_SLANG=1 FEATUR

Re: [RFC][PATCH 0/4] printk: introduce printing kernel thread

2017-03-24 Thread Sergey Senozhatsky
On (03/24/17 15:43), Petr Mladek wrote: [..] > > we have that thing which we call "old printk" mode, which is not > > really informative. and my proposal is rename "old" mode and use > > "printk rescue" mode instead. because we switch to that mode when > > we are trying to "rescue" kernel logs. so

Re: [oss-security] Linux kernel ping socket / AF_LLC connect() sin_family race

2017-03-24 Thread Solar Designer
On Fri, Mar 24, 2017 at 03:21:06PM -0700, Eric Dumazet wrote: > Looks easy enough to fix ? Oh. Probably. Thanks. Need to test, but I guess you already did? > diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c > index > 2af6244b83e27ae384e96cf071c10c5a89674804..ccfbce13a6333a65dab64e4847dd510dfafb1

[PATCH 3/7] usb: dwc3: core: change goto labels to meaningful names

2017-03-24 Thread Shuah Khan
Change goto labels to meaningful names. Signed-off-by: Shuah Khan --- drivers/usb/dwc3/core.c | 62 - 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 0fc7bef..f82786a 100644 --

Re: lockdep warning: console vs. mem hotplug

2017-03-24 Thread Sergey Senozhatsky
On (03/21/17 13:44), Sergey Senozhatsky wrote: [..] > so we probably can > > > 1) move pr_info() out of zone->lock in __offline_isolated_pages(). >meh... > > > 2) switch to printk_deferred() in __offline_isolated_pages(). >meh.. there might a bunch of other printks done from under zone-

[PATCH 7/7] usb: dwc3: host: change goto labels in this file to meaningful names

2017-03-24 Thread Shuah Khan
Change goto labels in this file to meaningful names. Signed-off-by: Shuah Khan --- drivers/usb/dwc3/host.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index 76f0b0d..eb264a9 100644 --- a/drivers/usb/dwc3/host.c

[PATCH 6/7] usb: dwc3: gadget: change goto labels in this file to meaningful names

2017-03-24 Thread Shuah Khan
Change goto labels in this file to meaningful names. Signed-off-by: Shuah Khan --- drivers/usb/dwc3/gadget.c | 56 +++ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 8d44a2f..

[PATCH 2/7] usb: dwc3: dwc3-omap: fix dwc3_omap_probe() do put_sync when get_sync works

2017-03-24 Thread Shuah Khan
dwc3_omap_probe() does pm_runtime_put_sync() in its err1 handling when pm_runtime_get_sync() fails. Fix it to do put_sync only when get_sync succeeds. Signed-off-by: Shuah Khan --- drivers/usb/dwc3/dwc3-omap.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/

[PATCH 4/7] usb: dwc3: exynos: change goto labels in this file to meaningful names

2017-03-24 Thread Shuah Khan
Change goto labels in this file to meaningful names Signed-off-by: Shuah Khan --- drivers/usb/dwc3/dwc3-exynos.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c index 98f74ff..11f31f4 100644 ---

[PATCH 5/7] usb: dwc3: omap: change goto labels in this file to meaningful names

2017-03-24 Thread Shuah Khan
Change goto labels in this file to meaningful names. Signed-off-by: Shuah Khan --- drivers/usb/dwc3/dwc3-omap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 55b12a9..ca0075a 100644 --- a/drivers/usb/dwc3

[PATCH 1/7] usb: dwc3: core: fix dwc3_probe() to not do put_sync when get_sync fails

2017-03-24 Thread Shuah Khan
dwc3_probe() does pm_runtime_put_sync() in its err1 handling when pm_runtime_get_sync() fails. Move the pm_runtime_put_sync() under err2 instead as it is used in error paths after pm_runtime_get_sync() succeeds. Signed-off-by: Shuah Khan --- drivers/usb/dwc3/core.c | 2 +- 1 file changed, 1 ins

[PATCH 0/7] dwc3 - bug fixes and use meaningful goto labels

2017-03-24 Thread Shuah Khan
This patch series consists of two fixes and changes to goto labels to use meaningful names. While working on goto label changes, I noticed put_sync calls without successful get_sync in error legs. The first two patches are the fixes and the rest of the patches are goto label changes. Shuah Kha

[PATCH] kbuild: Add better clang cross build support

2017-03-24 Thread Matthias Kaehlcke
Add cross target to CC if using clang. Also add custom gcc toolchain path for fallback gcc tools. COMPILER is previously set to "clang" if CC=clang was set from the make command line. So -target and -gcc-toolchain can be added to CC, since we already know that it is set. Clang will fallback to u

Re: [PATCH 4.4 00/30] 4.4.57-stable review

2017-03-24 Thread Shuah Khan
On 03/24/2017 11:58 AM, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 4.4.57 release. > There are 30 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. > > Responses sh

Re: [PATCH 4.9 00/24] 4.9.18-stable review

2017-03-24 Thread Shuah Khan
On 03/24/2017 11:58 AM, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 4.9.18 release. > There are 24 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. > > Responses sh

Re: lockdep warning: console vs. mem hotplug

2017-03-24 Thread Sergey Senozhatsky
Hello, On (03/24/17 12:39), Steven Rostedt wrote: [..] > Is there a stack trace of where the lockdep dump happened? That is > useful too. Otherwise we don't see where the inverse happened. Steven, isn't it the inversion I describe in [1] (after the first lockdep warning)? [1] lkml.kernel.org/r/2

Re: [PATCH 4.10 00/27] 4.10.6-stable review

2017-03-24 Thread Shuah Khan
On 03/24/2017 11:58 AM, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 4.10.6 release. > There are 27 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. > > Responses sh

Re: [PATCH v3] printk: Correctly handle preemption in console_unlock()

2017-03-24 Thread Sergey Senozhatsky
On (03/24/17 17:14), Petr Mladek wrote: [..] > Fixes: 6b97a20d3a7909 ("printk: set may_schedule for some of > console_trylock() callers") > Suggested-by: Tetsuo Handa > Signed-off-by: Petr Mladek Reviewed-by: Sergey Senozhatsky -ss

Re: [RFC v3 0/5] Add capacity capping support to the CPU controller

2017-03-24 Thread Rafael J. Wysocki
On Tue, Mar 21, 2017 at 12:01 PM, Patrick Bellasi wrote: > On 20-Mar 23:51, Rafael J. Wysocki wrote: [cut] >> So if you want to say "please don't sacrifice performance for these >> top-apps" to it, chances are it will not understand what you are >> asking it for. :-) > > Actually, this series ar

Re: [PATCH] perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()

2017-03-24 Thread Andi Kleen
On Fri, Mar 24, 2017 at 02:15:52PM +0200, Adrian Hunter wrote: > Address filtering with kernel symbols incorrectly resulted in the error > "Cannot determine size of symbol" because the no_size logic was the wrong > way around. > > Signed-off-by: Adrian Hunter > Cc: sta...@vger.kernel.org # v4.9+

Re: [PATCH] scsi: ufs: remove the duplicated checking for supporting clkscaling

2017-03-24 Thread Subhash Jadavani
On 2017-03-21 05:19, Jaehoon Chung wrote: There are same conditions for checking whether supporting clkscaling or not. When ufshcd is supporting clkscaling, active_reqs should be decreased by two. Signed-off-by: Jaehoon Chung --- drivers/scsi/ufs/ufshcd.c | 2 -- 1 file changed, 2 deletions(

Re: [PATCH] x86/intel_rdt: Implement "update" mode when writing schemata file

2017-03-24 Thread Fenghua Yu
On Fri, Mar 24, 2017 at 10:51:58AM -0700, Luck, Tony wrote: > From: Tony Luck > > The schemata file can have multiple lines and it is cumbersome to > update from shell scripts. "from shell scripts" makes people a bit confused. Not just shell scripts, C or Java code also can be cumbersome to upda

Re: __link_block_group uses GFP_KERNEL

2017-03-24 Thread Jeff Mahoney
On 3/24/17 5:02 AM, Denis Kirjanov wrote: > Hi guys, > > Looks like that current code does GFP_KERNEL allocation inside > __link_block_group. > the function invokes kobject_add and internally creates sysfs files > with the GFP_KERNEL flag set. Yep, that's a bug. > But since do_chunk_alloc execut

[PATCH] hugetlbfs: initialize shared policy as part of inode allocation

2017-03-24 Thread Mike Kravetz
Any time after inode allocation, destroy_inode can be called. The hugetlbfs inode contains a shared_policy structure, and mpol_free_shared_policy is unconditionally called as part of hugetlbfs_destroy_inode. Initialize the policy as part of inode allocation so that any quick (error path) calls to

Re: [PATCH v2] ARM: ptdump: Add domain to output

2017-03-24 Thread Russell King - ARM Linux
On Fri, Mar 24, 2017 at 03:54:48PM -0700, Kees Cook wrote: > > This actually works correctly now (tested by forcing different domains on > > portions of the Kernel Mapping. I really wanted to find a way to use the > > existing bit structs, but I couldn't make anything work... I'm open to > > ideas

[PATCH] irda: vlsi_ir: fix check for dma mapping errors

2017-03-24 Thread Alexey Khoroshilov
vlsi_alloc_ring() checks for dma mapping errors by comparison returned address with zero, while pci_dma_mapping_error() should be used. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/net/irda/vlsi_ir.c | 8 1 file changed, 4

Re: [PATCH v2] ARM: ptdump: Add domain to output

2017-03-24 Thread Kees Cook
On Thu, Mar 2, 2017 at 4:30 PM, Kees Cook wrote: > This adds the memory domain (on non-LPAE) to the PMD and PTE dumps. This > isn't in the regular PMD bit struct because I couldn't find a clean way to > fall back to retain some of the PMD bits when reporting PTE. So this is > special-cased for now

Re: [GIT PULL 1/4] bcm2835 arm DT updates for 4.12

2017-03-24 Thread Arnd Bergmann
On Tue, Mar 21, 2017 at 8:39 PM, Eric Anholt wrote: > Linux 4.11-rc1 (2017-03-05 12:59:56 -0800) > > are available in the git repository at: > > git://github.com/anholt/linux tags/bcm2835-dt-next-2017-03-21 > > for you to fetch changes up to 7f31a955a0c34de0463f7ff50b2bd62a5cce4204: > > ARM:

Re: [PATCH v3 4/4] mvebu: wrt1900ac: Use pwm-fan rather than gpio-fan

2017-03-24 Thread Ralph Sennhauser
On Fri, 24 Mar 2017 15:35:05 +0100 Andrew Lunn wrote: > > + pwm_fan { > > /* SUNON HA4010V4--C99 */ > > - compatible = "gpio-fan"; > > - gpios = <&gpio0 24 0>; > > > > - gpio-fan,speed-map = <00 > > - 4500 1>; >

Re: [PATCH v2 1/4] gpio: mvebu: Add limited PWM support

2017-03-24 Thread Ralph Sennhauser
On Fri, 24 Mar 2017 10:18:29 -0500 Rob Herring wrote: > On Sat, Mar 18, 2017 at 04:43:01PM +0100, Ralph Sennhauser wrote: > > From: Andrew Lunn > > > > Armada 370/XP devices can 'blink' gpio lines with a configurable on > > and off period. This can be modelled as a PWM. > > > > However, there

Re: [PATCH v6] vfio error recovery: kernel support

2017-03-24 Thread Alex Williamson
On Thu, 23 Mar 2017 17:07:31 +0800 Cao jin wrote: A more appropriate patch subject would be: vfio-pci: Report correctable errors and slot reset events to user > From: "Michael S. Tsirkin" This hardly seems accurate anymore. You could say Suggested-by and let Michael add a sign-off, but it's

Re: [PATCH] blkcg: allocate struct blkcg_gq outside request queue spinlock

2017-03-24 Thread Jens Axboe
On 03/24/2017 03:56 PM, Tahsin Erdogan wrote: > blkg_conf_prep() currently calls blkg_lookup_create() while holding > request queue spinlock. This means allocating memory for struct > blkcg_gq has to be made non-blocking. This causes occasional -ENOMEM > failures in call paths like below: > > pc

  1   2   3   4   5   6   7   8   9   10   >