Re: [PATCH v6] x86: Avoid pr_cont() in show_opcodes().

2018-07-19 Thread Peter Zijlstra
On Thu, Jul 19, 2018 at 10:53:03PM +0900, Tetsuo Handa wrote: > + if (probe_kernel_read(opcodes, rip - PROLOGUE_SIZE, OPCODE_BUFSIZE)) > + printk("%sCode: Bad RIP value.\n", loglvl); > + else > + printk("%sCode: %" __stringify(PROLOGUE_SIZE) "ph <%02x> %" > +

Re: [PATCH v11 9/9] cpuset: Allow reporting of sched domain generation info

2018-07-19 Thread Waiman Long
On 07/19/2018 09:54 AM, Peter Zijlstra wrote: > On Sun, Jun 24, 2018 at 03:30:40PM +0800, Waiman Long wrote: >> This patch enables us to report sched domain generation information. >> >> If DYNAMIC_DEBUG is enabled, issuing the following command >> >> echo "file cpuset.c +p" >

Re: NULL pointer dereference in msi_set_mask_bit

2018-07-19 Thread Paul Menzel
Dear Thomas, On 07/19/18 15:48, Thomas Gleixner wrote: > On Thu, 19 Jul 2018, Paul Menzel wrote: > >> I had to copy the files, and then was able to create an archive with >> non-zero files. Please find the tar archive attached. > > Thanks for providing the data. All looks normal there. Thank

Re: NULL pointer dereference in msi_set_mask_bit

2018-07-19 Thread Paul Menzel
Dear Thomas, On 07/19/18 15:48, Thomas Gleixner wrote: > On Thu, 19 Jul 2018, Paul Menzel wrote: > >> I had to copy the files, and then was able to create an archive with >> non-zero files. Please find the tar archive attached. > > Thanks for providing the data. All looks normal there. Thank

Re: [PATCH] power: supply: max77693_charger: fix unintentional fall-through

2018-07-19 Thread Gustavo A. R. Silva
Hi Krzysztof, On 07/18/2018 01:14 AM, Krzysztof Kozlowski wrote: > On 17 July 2018 at 23:47, Gustavo A. R. Silva wrote: >> It seems that a *break* is missing in order to avoid a fall-through. >> Otherwise, the calculation of *data* makes no sense. >> >> Addresses-Coverity-ID: 1271172 ("Missing

Re: [PATCH] power: supply: max77693_charger: fix unintentional fall-through

2018-07-19 Thread Gustavo A. R. Silva
Hi Krzysztof, On 07/18/2018 01:14 AM, Krzysztof Kozlowski wrote: > On 17 July 2018 at 23:47, Gustavo A. R. Silva wrote: >> It seems that a *break* is missing in order to avoid a fall-through. >> Otherwise, the calculation of *data* makes no sense. >> >> Addresses-Coverity-ID: 1271172 ("Missing

Re: [PATCH v5] x86: Avoid pr_cont() in show_opcodes().

2018-07-19 Thread Tetsuo Handa
On 2018/07/18 20:57, Ingo Molnar wrote: > > * Tetsuo Handa wrote: > >> Since syzbot is confused by concurrent printk() messages [1], >> this patch changes show_opcodes() to use %ph format string. >> >> When we start adding prefix to each line of printk() output, >> we will be able to handle

Re: [PATCH v5] x86: Avoid pr_cont() in show_opcodes().

2018-07-19 Thread Tetsuo Handa
On 2018/07/18 20:57, Ingo Molnar wrote: > > * Tetsuo Handa wrote: > >> Since syzbot is confused by concurrent printk() messages [1], >> this patch changes show_opcodes() to use %ph format string. >> >> When we start adding prefix to each line of printk() output, >> we will be able to handle

[PATCH v6] x86: Avoid pr_cont() in show_opcodes().

2018-07-19 Thread Tetsuo Handa
From: Rasmus Villemoes Since syzbot is confused by concurrent printk() messages [1], this patch changes show_opcodes() to use %ph format string. When we start adding prefix to each line of printk() output, we will be able to handle concurrent printk() messages. [1]

[PATCH v6] x86: Avoid pr_cont() in show_opcodes().

2018-07-19 Thread Tetsuo Handa
From: Rasmus Villemoes Since syzbot is confused by concurrent printk() messages [1], this patch changes show_opcodes() to use %ph format string. When we start adding prefix to each line of printk() output, we will be able to handle concurrent printk() messages. [1]

Re: NULL pointer dereference in msi_set_mask_bit

2018-07-19 Thread Thomas Gleixner
Paul, On Thu, 19 Jul 2018, Paul Menzel wrote: > I had to copy the files, and then was able to create an archive with > non-zero files. Please find the tar archive attached. Thanks for providing the data. All looks normal there. Just for clarification. Did this happen exactly once, or did it

Re: NULL pointer dereference in msi_set_mask_bit

2018-07-19 Thread Thomas Gleixner
Paul, On Thu, 19 Jul 2018, Paul Menzel wrote: > I had to copy the files, and then was able to create an archive with > non-zero files. Please find the tar archive attached. Thanks for providing the data. All looks normal there. Just for clarification. Did this happen exactly once, or did it

Re: [PATCH v2 2/5] mm: access zone->node via zone_to_nid() and zone_set_nid()

2018-07-19 Thread Michal Hocko
On Thu 19-07-18 09:44:09, Pavel Tatashin wrote: > > > On 07/19/2018 09:40 AM, Michal Hocko wrote: > > On Thu 19-07-18 15:27:37, osalva...@techadventures.net wrote: > >> From: Pavel Tatashin > >> > >> zone->node is configured only when CONFIG_NUMA=y, so it is a good idea to > >> have inline

Re: [PATCH v2 2/5] mm: access zone->node via zone_to_nid() and zone_set_nid()

2018-07-19 Thread Michal Hocko
On Thu 19-07-18 09:44:09, Pavel Tatashin wrote: > > > On 07/19/2018 09:40 AM, Michal Hocko wrote: > > On Thu 19-07-18 15:27:37, osalva...@techadventures.net wrote: > >> From: Pavel Tatashin > >> > >> zone->node is configured only when CONFIG_NUMA=y, so it is a good idea to > >> have inline

Re: [RFC PATCH] sched/debug: Use terse backtrace for idly sleeping threads.

2018-07-19 Thread Peter Zijlstra
On Thu, Jul 19, 2018 at 10:37:23PM +0900, Tetsuo Handa wrote: > This patch can be applied before proposing abovementioned changes. > Since there are many kernel threads whose backtrace is boring due to idly > waiting for an event inside the main loop, this patch introduces a kernel > config option

Re: [RFC PATCH] sched/debug: Use terse backtrace for idly sleeping threads.

2018-07-19 Thread Peter Zijlstra
On Thu, Jul 19, 2018 at 10:37:23PM +0900, Tetsuo Handa wrote: > This patch can be applied before proposing abovementioned changes. > Since there are many kernel threads whose backtrace is boring due to idly > waiting for an event inside the main loop, this patch introduces a kernel > config option

Re: [PATCH v2 5/5] mm/page_alloc: Only call pgdat_set_deferred_range when the system boots

2018-07-19 Thread Michal Hocko
On Thu 19-07-18 15:27:40, osalva...@techadventures.net wrote: > From: Oscar Salvador > > We should only care about deferred initialization when booting. Again why is this worth doing? > Signed-off-by: Oscar Salvador > --- > mm/page_alloc.c | 3 ++- > 1 file changed, 2 insertions(+), 1

Re: [PATCH v2 5/5] mm/page_alloc: Only call pgdat_set_deferred_range when the system boots

2018-07-19 Thread Michal Hocko
On Thu 19-07-18 15:27:40, osalva...@techadventures.net wrote: > From: Oscar Salvador > > We should only care about deferred initialization when booting. Again why is this worth doing? > Signed-off-by: Oscar Salvador > --- > mm/page_alloc.c | 3 ++- > 1 file changed, 2 insertions(+), 1

Re: [PATCH v2 4/5] mm/page_alloc: Inline function to handle CONFIG_DEFERRED_STRUCT_PAGE_INIT

2018-07-19 Thread Michal Hocko
On Thu 19-07-18 15:27:39, osalva...@techadventures.net wrote: > From: Oscar Salvador > > Let us move the code between CONFIG_DEFERRED_STRUCT_PAGE_INIT > to an inline function. ... to remove an ugly ifdef in the code. Please always mention _why_ in the changelog. I can clearly see what you've

Re: [PATCH v2 4/5] mm/page_alloc: Inline function to handle CONFIG_DEFERRED_STRUCT_PAGE_INIT

2018-07-19 Thread Michal Hocko
On Thu 19-07-18 15:27:39, osalva...@techadventures.net wrote: > From: Oscar Salvador > > Let us move the code between CONFIG_DEFERRED_STRUCT_PAGE_INIT > to an inline function. ... to remove an ugly ifdef in the code. Please always mention _why_ in the changelog. I can clearly see what you've

[PATCH V3 2/2] mux: adgs1408: new driver for Analog Devices ADGS1408/1409 mux …

2018-07-19 Thread Mircea Caprioru
This patch adds basic support for Analog Device ADGS1408/09 SPI mux controller. The device is probed and set to a disabled state. It uses the new mux controller framework. Signed-off-by: Mircea Caprioru --- Changelog V2 -> V3 - removed Kconfig line - changed to GPL-2.0-or-later - fixed typo in

Re: [PATCH v2 2/5] mm: access zone->node via zone_to_nid() and zone_set_nid()

2018-07-19 Thread Pavel Tatashin
On 07/19/2018 09:40 AM, Michal Hocko wrote: > On Thu 19-07-18 15:27:37, osalva...@techadventures.net wrote: >> From: Pavel Tatashin >> >> zone->node is configured only when CONFIG_NUMA=y, so it is a good idea to >> have inline functions to access this field in order to avoid ifdef's in >> c

Re: [PATCH v2 2/5] mm: access zone->node via zone_to_nid() and zone_set_nid()

2018-07-19 Thread Pavel Tatashin
On 07/19/2018 09:40 AM, Michal Hocko wrote: > On Thu 19-07-18 15:27:37, osalva...@techadventures.net wrote: >> From: Pavel Tatashin >> >> zone->node is configured only when CONFIG_NUMA=y, so it is a good idea to >> have inline functions to access this field in order to avoid ifdef's in >> c

[PATCH V3 2/2] mux: adgs1408: new driver for Analog Devices ADGS1408/1409 mux …

2018-07-19 Thread Mircea Caprioru
This patch adds basic support for Analog Device ADGS1408/09 SPI mux controller. The device is probed and set to a disabled state. It uses the new mux controller framework. Signed-off-by: Mircea Caprioru --- Changelog V2 -> V3 - removed Kconfig line - changed to GPL-2.0-or-later - fixed typo in

Re: [PATCH v2 3/5] mm/page_alloc: Optimize free_area_init_core

2018-07-19 Thread Michal Hocko
On Thu 19-07-18 15:27:38, osalva...@techadventures.net wrote: > From: Oscar Salvador > > In free_area_init_core we calculate the amount of managed pages > we are left with, by substracting the memmap pages and the pages > reserved for dma. > With the values left, we also account the total of

Re: [PATCH v2 3/5] mm/page_alloc: Optimize free_area_init_core

2018-07-19 Thread Michal Hocko
On Thu 19-07-18 15:27:38, osalva...@techadventures.net wrote: > From: Oscar Salvador > > In free_area_init_core we calculate the amount of managed pages > we are left with, by substracting the memmap pages and the pages > reserved for dma. > With the values left, we also account the total of

Re: [PATCH 4.4 0/3] 4.4.142-stable review

2018-07-19 Thread Greg Kroah-Hartman
On Thu, Jul 19, 2018 at 01:19:19AM +0530, Naresh Kamboju wrote: > On 18 July 2018 at 20:31, Greg Kroah-Hartman > wrote: > > This is the start of the stable review cycle for the 4.4.142 release. > > There are 3 patches in this series, all will be posted as a response > > to this one. If anyone

Re: [PATCH 4.4 0/3] 4.4.142-stable review

2018-07-19 Thread Greg Kroah-Hartman
On Thu, Jul 19, 2018 at 01:19:19AM +0530, Naresh Kamboju wrote: > On 18 July 2018 at 20:31, Greg Kroah-Hartman > wrote: > > This is the start of the stable review cycle for the 4.4.142 release. > > There are 3 patches in this series, all will be posted as a response > > to this one. If anyone

Re: [PATCH 4.4 0/3] 4.4.142-stable review

2018-07-19 Thread Greg Kroah-Hartman
On Thu, Jul 19, 2018 at 06:18:10AM -0700, Guenter Roeck wrote: > On 07/18/2018 08:01 AM, Greg Kroah-Hartman wrote: > > This is the start of the stable review cycle for the 4.4.142 release. > > There are 3 patches in this series, all will be posted as a response > > to this one. If anyone has any

Re: [PATCH 4.4 0/3] 4.4.142-stable review

2018-07-19 Thread Greg Kroah-Hartman
On Thu, Jul 19, 2018 at 06:18:10AM -0700, Guenter Roeck wrote: > On 07/18/2018 08:01 AM, Greg Kroah-Hartman wrote: > > This is the start of the stable review cycle for the 4.4.142 release. > > There are 3 patches in this series, all will be posted as a response > > to this one. If anyone has any

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-19 Thread Thomas Gleixner
On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > On Thu, Jul 19, 2018 at 03:18:03PM +0200, Thomas Gleixner wrote: > > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > > On Thu, Jul 19, 2018 at 02:37:35PM +0200, Thomas Gleixner wrote: > > > > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > > >

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-19 Thread Thomas Gleixner
On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > On Thu, Jul 19, 2018 at 03:18:03PM +0200, Thomas Gleixner wrote: > > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > > On Thu, Jul 19, 2018 at 02:37:35PM +0200, Thomas Gleixner wrote: > > > > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > > >

Re: [PATCH v2 2/5] mm: access zone->node via zone_to_nid() and zone_set_nid()

2018-07-19 Thread Michal Hocko
On Thu 19-07-18 15:27:37, osalva...@techadventures.net wrote: > From: Pavel Tatashin > > zone->node is configured only when CONFIG_NUMA=y, so it is a good idea to > have inline functions to access this field in order to avoid ifdef's in > c files. Is this a manual find & replace or did you use

Re: [PATCH v2 2/5] mm: access zone->node via zone_to_nid() and zone_set_nid()

2018-07-19 Thread Michal Hocko
On Thu 19-07-18 15:27:37, osalva...@techadventures.net wrote: > From: Pavel Tatashin > > zone->node is configured only when CONFIG_NUMA=y, so it is a good idea to > have inline functions to access this field in order to avoid ifdef's in > c files. Is this a manual find & replace or did you use

Re: [PATCH 0/4] Rework NVMe abort handling

2018-07-19 Thread Christoph Hellwig
On Thu, Jul 19, 2018 at 03:28:34PM +0200, Johannes Thumshirn wrote: > PCI currently is the only transport we have which is doing more than > queueing a transport reset but trying to abort the command first. > > This series brings the other transports we currently have up to the > same level.

Re: [PATCH 0/4] Rework NVMe abort handling

2018-07-19 Thread Christoph Hellwig
On Thu, Jul 19, 2018 at 03:28:34PM +0200, Johannes Thumshirn wrote: > PCI currently is the only transport we have which is doing more than > queueing a transport reset but trying to abort the command first. > > This series brings the other transports we currently have up to the > same level.

[RFC PATCH] sched/debug: Use terse backtrace for idly sleeping threads.

2018-07-19 Thread Tetsuo Handa
Since syzbot is hitting crashes too frequently to capture vmcore for later analysis, currently we need to rely on printk()-based analysis. And I'm planning to add a kernel config option for additional printk() etc. for testing under syzbot environment. One of missing printk() is in khungtaskd.

[RFC PATCH] sched/debug: Use terse backtrace for idly sleeping threads.

2018-07-19 Thread Tetsuo Handa
Since syzbot is hitting crashes too frequently to capture vmcore for later analysis, currently we need to rely on printk()-based analysis. And I'm planning to add a kernel config option for additional printk() etc. for testing under syzbot environment. One of missing printk() is in khungtaskd.

Re: [RFC] Make need_resched() return true when rcu_urgent_qs requested

2018-07-19 Thread David Woodhouse
On Thu, 2018-07-19 at 15:14 +0200, Frederic Weisbecker wrote: > > I'm not sure about the context tracking condition in the code snippet > > cited above, though. I think that's what caused my problem in the first > > place — I have CONTEXT_TRACKING_FORCE && !NO_HZ_FULL. So in 4.15, that > > means

Re: [RFC] Make need_resched() return true when rcu_urgent_qs requested

2018-07-19 Thread David Woodhouse
On Thu, 2018-07-19 at 15:14 +0200, Frederic Weisbecker wrote: > > I'm not sure about the context tracking condition in the code snippet > > cited above, though. I think that's what caused my problem in the first > > place — I have CONTEXT_TRACKING_FORCE && !NO_HZ_FULL. So in 4.15, that > > means

[PATCH] ARM: dts: stm32: Add clk-lse node's label on stm32f429

2018-07-19 Thread patrice.chotard
From: Patrice Chotard Add missing clk_lse label for node clk-lse. Signed-off-by: Patrice Chotard --- arch/arm/boot/dts/stm32f429.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi index

[PATCH] ARM: dts: stm32: Add clk-lse node's label on stm32f429

2018-07-19 Thread patrice.chotard
From: Patrice Chotard Add missing clk_lse label for node clk-lse. Signed-off-by: Patrice Chotard --- arch/arm/boot/dts/stm32f429.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi index

Re: [PATCH] x86/kvm: Don't use pvqspinlock code if only 1 vCPU

2018-07-19 Thread Waiman Long
On 07/18/2018 09:15 PM, Konrad Rzeszutek Wilk wrote: > On Tue, Jul 17, 2018 at 05:59:27PM -0400, Waiman Long wrote: >> On a VM with only 1 vCPU, the locking fast path will always be >> successful. In this case, there is no need to use the the PV qspinlock >> code which has higher overhead on the

Re: [PATCH] x86/kvm: Don't use pvqspinlock code if only 1 vCPU

2018-07-19 Thread Waiman Long
On 07/18/2018 09:15 PM, Konrad Rzeszutek Wilk wrote: > On Tue, Jul 17, 2018 at 05:59:27PM -0400, Waiman Long wrote: >> On a VM with only 1 vCPU, the locking fast path will always be >> successful. In this case, there is no need to use the the PV qspinlock >> code which has higher overhead on the

Re: arm: v4.18-rc5 with cpuidle on TC2 (A7 boot) spectre v2 issue

2018-07-19 Thread Russell King - ARM Linux
On Thu, Jul 19, 2018 at 11:01:10AM +0100, Russell King - ARM Linux wrote: > On Thu, Jul 19, 2018 at 11:42:50AM +0200, Dietmar Eggemann wrote: > > Hi, > > > > running v4.18-rc5 (plus still missing "power: vexpress: fix corruption in > > notifier registration", otherwise I get this rcu_sched stall

Re: arm: v4.18-rc5 with cpuidle on TC2 (A7 boot) spectre v2 issue

2018-07-19 Thread Russell King - ARM Linux
On Thu, Jul 19, 2018 at 11:01:10AM +0100, Russell King - ARM Linux wrote: > On Thu, Jul 19, 2018 at 11:42:50AM +0200, Dietmar Eggemann wrote: > > Hi, > > > > running v4.18-rc5 (plus still missing "power: vexpress: fix corruption in > > notifier registration", otherwise I get this rcu_sched stall

[PATCH 2/4] nvme: rdma: abort commands before resetting controller

2018-07-19 Thread Johannes Thumshirn
Currently if a timeout on rdma happens we just go ahead and reset the underlying transport. Instead try to abort the timeout out command and if this fails as well continue the error path escalation and tear down the transport. Signed-off-by: Johannes Thumshirn --- drivers/nvme/host/rdma.c | 22

[PATCH 2/4] nvme: rdma: abort commands before resetting controller

2018-07-19 Thread Johannes Thumshirn
Currently if a timeout on rdma happens we just go ahead and reset the underlying transport. Instead try to abort the timeout out command and if this fails as well continue the error path escalation and tear down the transport. Signed-off-by: Johannes Thumshirn --- drivers/nvme/host/rdma.c | 22

[PATCH 0/4] Rework NVMe abort handling

2018-07-19 Thread Johannes Thumshirn
PCI currently is the only transport we have which is doing more than queueing a transport reset but trying to abort the command first. This series brings the other transports we currently have up to the same level. On FC we can prepend a third escalation level by first to abort the FC operation

[PATCH 0/4] Rework NVMe abort handling

2018-07-19 Thread Johannes Thumshirn
PCI currently is the only transport we have which is doing more than queueing a transport reset but trying to abort the command first. This series brings the other transports we currently have up to the same level. On FC we can prepend a third escalation level by first to abort the FC operation

[PATCH 3/4] nvmet: loop: abort commands before resetting controller

2018-07-19 Thread Johannes Thumshirn
Currently if a timeout on loop happens we just go ahead and reset the underlying transport. Instead try to abort the timeout out command and if this fails as well continue the error path escalation and tear down the transport. Signed-off-by: Johannes Thumshirn --- drivers/nvme/target/loop.c |

[PATCH 1/4] nvme: factor out pci abort handling into core

2018-07-19 Thread Johannes Thumshirn
Currently PCI is the only transport which does a more fine grained error handling than just resetting the controller. Factor out the command abort logic into nvme-core so other transports can benefit of it as well. Signed-off-by: Johannes Thumshirn --- drivers/nvme/host/core.c | 47

[PATCH 1/4] nvme: factor out pci abort handling into core

2018-07-19 Thread Johannes Thumshirn
Currently PCI is the only transport which does a more fine grained error handling than just resetting the controller. Factor out the command abort logic into nvme-core so other transports can benefit of it as well. Signed-off-by: Johannes Thumshirn --- drivers/nvme/host/core.c | 47

[PATCH 3/4] nvmet: loop: abort commands before resetting controller

2018-07-19 Thread Johannes Thumshirn
Currently if a timeout on loop happens we just go ahead and reset the underlying transport. Instead try to abort the timeout out command and if this fails as well continue the error path escalation and tear down the transport. Signed-off-by: Johannes Thumshirn --- drivers/nvme/target/loop.c |

[PATCH 4/4] nvme: fc: abort commands before resetting controller

2018-07-19 Thread Johannes Thumshirn
Currently if a timeout on fc happens we just go ahead and reset the underlying transport. Instead try for a more fine grained error recovery by first aborting the FC OP, if this fails abort the NVMe command and if this as well fails go the hard route and reset the controller. Signed-off-by:

[PATCH 4/4] nvme: fc: abort commands before resetting controller

2018-07-19 Thread Johannes Thumshirn
Currently if a timeout on fc happens we just go ahead and reset the underlying transport. Instead try for a more fine grained error recovery by first aborting the FC OP, if this fails abort the NVMe command and if this as well fails go the hard route and reset the controller. Signed-off-by:

Re: [PATCH] perf/core: fix a possible deadlock scenario

2018-07-19 Thread Jiri Olsa
On Wed, Jul 18, 2018 at 01:21:11PM -0700, Cong Wang wrote: SNIP > > hum, the swevent pmu does not triger NMI, so that timer > > will never be touched in NMI context > > Good to know! So I worry too much here. > > But still, given hrtimer interrupt is called with IRQ disabled, getting > stuck

Re: [PATCH] perf/core: fix a possible deadlock scenario

2018-07-19 Thread Jiri Olsa
On Wed, Jul 18, 2018 at 01:21:11PM -0700, Cong Wang wrote: SNIP > > hum, the swevent pmu does not triger NMI, so that timer > > will never be touched in NMI context > > Good to know! So I worry too much here. > > But still, given hrtimer interrupt is called with IRQ disabled, getting > stuck

[PATCH v2 1/5] mm/page_alloc: Move ifdefery out of free_area_init_core

2018-07-19 Thread osalvador
From: Oscar Salvador Moving the #ifdefs out of the function makes it easier to follow. Signed-off-by: Oscar Salvador Acked-by: Michal Hocko Reviewed-by: Pavel Tatashin --- mm/page_alloc.c | 50 +- 1 file changed, 37 insertions(+), 13

[PATCH v2 1/5] mm/page_alloc: Move ifdefery out of free_area_init_core

2018-07-19 Thread osalvador
From: Oscar Salvador Moving the #ifdefs out of the function makes it easier to follow. Signed-off-by: Oscar Salvador Acked-by: Michal Hocko Reviewed-by: Pavel Tatashin --- mm/page_alloc.c | 50 +- 1 file changed, 37 insertions(+), 13

[PATCH v2 2/5] mm: access zone->node via zone_to_nid() and zone_set_nid()

2018-07-19 Thread osalvador
From: Pavel Tatashin zone->node is configured only when CONFIG_NUMA=y, so it is a good idea to have inline functions to access this field in order to avoid ifdef's in c files. Signed-off-by: Pavel Tatashin Signed-off-by: Oscar Salvador Reviewed-by: Oscar Salvador --- include/linux/mm.h

Re: [U-BOOT internal] ARM: dts: stm32: Add clk-lse node's label on stm32f429

2018-07-19 Thread Patrice CHOTARD
Sorry, don't take care about this patch, it was send using the wrong script Patrice On 07/19/2018 03:10 PM, patrice.chot...@st.com wrote: > From: Patrice Chotard > > Add missing clk_lse label for node clk-lse. > > Signed-off-by: Patrice Chotard > --- > arch/arm/boot/dts/stm32f429.dtsi | 2

[PATCH v2 4/5] mm/page_alloc: Inline function to handle CONFIG_DEFERRED_STRUCT_PAGE_INIT

2018-07-19 Thread osalvador
From: Oscar Salvador Let us move the code between CONFIG_DEFERRED_STRUCT_PAGE_INIT to an inline function. Signed-off-by: Oscar Salvador --- mm/page_alloc.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index

[PATCH v2 2/5] mm: access zone->node via zone_to_nid() and zone_set_nid()

2018-07-19 Thread osalvador
From: Pavel Tatashin zone->node is configured only when CONFIG_NUMA=y, so it is a good idea to have inline functions to access this field in order to avoid ifdef's in c files. Signed-off-by: Pavel Tatashin Signed-off-by: Oscar Salvador Reviewed-by: Oscar Salvador --- include/linux/mm.h

Re: [U-BOOT internal] ARM: dts: stm32: Add clk-lse node's label on stm32f429

2018-07-19 Thread Patrice CHOTARD
Sorry, don't take care about this patch, it was send using the wrong script Patrice On 07/19/2018 03:10 PM, patrice.chot...@st.com wrote: > From: Patrice Chotard > > Add missing clk_lse label for node clk-lse. > > Signed-off-by: Patrice Chotard > --- > arch/arm/boot/dts/stm32f429.dtsi | 2

[PATCH v2 4/5] mm/page_alloc: Inline function to handle CONFIG_DEFERRED_STRUCT_PAGE_INIT

2018-07-19 Thread osalvador
From: Oscar Salvador Let us move the code between CONFIG_DEFERRED_STRUCT_PAGE_INIT to an inline function. Signed-off-by: Oscar Salvador --- mm/page_alloc.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index

[PATCH v2 5/5] mm/page_alloc: Only call pgdat_set_deferred_range when the system boots

2018-07-19 Thread osalvador
From: Oscar Salvador We should only care about deferred initialization when booting. Signed-off-by: Oscar Salvador --- mm/page_alloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index d77bc2a7ec2c..5911b64a88ab 100644 ---

[PATCH v2 3/5] mm/page_alloc: Optimize free_area_init_core

2018-07-19 Thread osalvador
From: Oscar Salvador In free_area_init_core we calculate the amount of managed pages we are left with, by substracting the memmap pages and the pages reserved for dma. With the values left, we also account the total of kernel pages and the total of pages. Since memmap pages are calculated from

[PATCH v2 5/5] mm/page_alloc: Only call pgdat_set_deferred_range when the system boots

2018-07-19 Thread osalvador
From: Oscar Salvador We should only care about deferred initialization when booting. Signed-off-by: Oscar Salvador --- mm/page_alloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index d77bc2a7ec2c..5911b64a88ab 100644 ---

[PATCH v2 3/5] mm/page_alloc: Optimize free_area_init_core

2018-07-19 Thread osalvador
From: Oscar Salvador In free_area_init_core we calculate the amount of managed pages we are left with, by substracting the memmap pages and the pages reserved for dma. With the values left, we also account the total of kernel pages and the total of pages. Since memmap pages are calculated from

[PATCH v2 0/5] Refactor free_area_init_node/free_area_init_core

2018-07-19 Thread osalvador
From: Oscar Salvador This patchset pretends to make free_area_init_core more readable by moving the ifdefery to inline functions, and while we are at it, it optimizes the function a little bit (better explained in patch 3). Oscar Salvador (4): mm/page_alloc: Move ifdefery out of

[PATCH v2 0/5] Refactor free_area_init_node/free_area_init_core

2018-07-19 Thread osalvador
From: Oscar Salvador This patchset pretends to make free_area_init_core more readable by moving the ifdefery to inline functions, and while we are at it, it optimizes the function a little bit (better explained in patch 3). Oscar Salvador (4): mm/page_alloc: Move ifdefery out of

[PATCH v1] memory: tegra: Don't invoke Tegra30+ specific memory timing setup on Tegra20

2018-07-19 Thread Dmitry Osipenko
This fixes irrelevant "tegra-mc 7000f000.memory-controller: no memory timings for RAM code 0 registered" warning message during of kernels boot-up on Tegra20. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/mc.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff

[PATCH v1] memory: tegra: Don't invoke Tegra30+ specific memory timing setup on Tegra20

2018-07-19 Thread Dmitry Osipenko
This fixes irrelevant "tegra-mc 7000f000.memory-controller: no memory timings for RAM code 0 registered" warning message during of kernels boot-up on Tegra20. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/mc.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff

Re: [DISCUSSION] spi multi chipselect support

2018-07-19 Thread Mark Brown
On Wed, Jul 18, 2018 at 07:19:19PM +0200, Lars-Peter Clausen wrote: > My preferred solution would to have something like > i2c_new_secondary_device(), but for SPI. This way the driver that binds to > the compatible string can allocate devices for additional chip selects as > necessary. Also make

Re: [DISCUSSION] spi multi chipselect support

2018-07-19 Thread Mark Brown
On Wed, Jul 18, 2018 at 07:19:19PM +0200, Lars-Peter Clausen wrote: > My preferred solution would to have something like > i2c_new_secondary_device(), but for SPI. This way the driver that binds to > the compatible string can allocate devices for additional chip selects as > necessary. Also make

[PATCH] x86: Use PTR_ERR_OR_ZERO

2018-07-19 Thread YueHaibing
Replace IS_ERR/PTR_ERR Signed-off-by: YueHaibing --- arch/x86/kernel/pcspeaker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/pcspeaker.c b/arch/x86/kernel/pcspeaker.c index da5190a..4a710ff 100644 --- a/arch/x86/kernel/pcspeaker.c +++

[PATCH] x86: Use PTR_ERR_OR_ZERO

2018-07-19 Thread YueHaibing
Replace IS_ERR/PTR_ERR Signed-off-by: YueHaibing --- arch/x86/kernel/pcspeaker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/pcspeaker.c b/arch/x86/kernel/pcspeaker.c index da5190a..4a710ff 100644 --- a/arch/x86/kernel/pcspeaker.c +++

[PATCH v4 3/8] dt: bindings: Move tegra20-emc binding to memory-controllers directory

2018-07-19 Thread Dmitry Osipenko
Move tegra20-emc binding to the memory-controllers directory for consistency with the other Tegra memory bindings. Signed-off-by: Dmitry Osipenko Acked-by: Rob Herring --- .../{arm/tegra => memory-controllers}/nvidia,tegra20-emc.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-)

[PATCH v4 3/8] dt: bindings: Move tegra20-emc binding to memory-controllers directory

2018-07-19 Thread Dmitry Osipenko
Move tegra20-emc binding to the memory-controllers directory for consistency with the other Tegra memory bindings. Signed-off-by: Dmitry Osipenko Acked-by: Rob Herring --- .../{arm/tegra => memory-controllers}/nvidia,tegra20-emc.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-)

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-19 Thread Kirill A. Shutemov
On Thu, Jul 19, 2018 at 03:18:03PM +0200, Thomas Gleixner wrote: > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > On Thu, Jul 19, 2018 at 02:37:35PM +0200, Thomas Gleixner wrote: > > > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > > > On Wed, Jul 18, 2018 at 04:19:10PM -0700, Dave Hansen

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-19 Thread Kirill A. Shutemov
On Thu, Jul 19, 2018 at 03:18:03PM +0200, Thomas Gleixner wrote: > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > On Thu, Jul 19, 2018 at 02:37:35PM +0200, Thomas Gleixner wrote: > > > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > > > On Wed, Jul 18, 2018 at 04:19:10PM -0700, Dave Hansen

[PATCH v4 2/8] dt: bindings: tegra20-emc: Document clock property

2018-07-19 Thread Dmitry Osipenko
Embedded memory controller has a corresponding clock, document the clock property. Signed-off-by: Dmitry Osipenko Acked-by: Rob Herring --- .../devicetree/bindings/arm/tegra/nvidia,tegra20-emc.txt| 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH v4 2/8] dt: bindings: tegra20-emc: Document clock property

2018-07-19 Thread Dmitry Osipenko
Embedded memory controller has a corresponding clock, document the clock property. Signed-off-by: Dmitry Osipenko Acked-by: Rob Herring --- .../devicetree/bindings/arm/tegra/nvidia,tegra20-emc.txt| 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH v4 6/8] clk: tegra20: Turn EMC clock gate into divider

2018-07-19 Thread Dmitry Osipenko
Kernel should never gate the EMC clock as it causes immediate lockup, so removing clk-gate functionality doesn't affect anything. Turning EMC clk gate into divider allows to implement glitch-less EMC scaling, avoiding reparenting to a backup clock. Signed-off-by: Dmitry Osipenko Acked-by: Peter

[PATCH v4 5/8] ARM: dts: tegra20: Add clock entry to External Memory Controller

2018-07-19 Thread Dmitry Osipenko
Add clock entry into the EMC DT node. Signed-off-by: Dmitry Osipenko --- arch/arm/boot/dts/tegra20.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi index 9eb4163a4390..979f38293fe5 100644 ---

[PATCH v4 6/8] clk: tegra20: Turn EMC clock gate into divider

2018-07-19 Thread Dmitry Osipenko
Kernel should never gate the EMC clock as it causes immediate lockup, so removing clk-gate functionality doesn't affect anything. Turning EMC clk gate into divider allows to implement glitch-less EMC scaling, avoiding reparenting to a backup clock. Signed-off-by: Dmitry Osipenko Acked-by: Peter

[PATCH v4 5/8] ARM: dts: tegra20: Add clock entry to External Memory Controller

2018-07-19 Thread Dmitry Osipenko
Add clock entry into the EMC DT node. Signed-off-by: Dmitry Osipenko --- arch/arm/boot/dts/tegra20.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi index 9eb4163a4390..979f38293fe5 100644 ---

[PATCH v4 7/8] clk: tegra20: Check whether direct PLLM sourcing is turned off for EMC

2018-07-19 Thread Dmitry Osipenko
Ensure that direct PLLM sourcing is turned off for EMC as we don't support that configuration in the clk driver. Signed-off-by: Dmitry Osipenko Acked-by: Peter De Schrijver --- drivers/clk/tegra/clk-tegra20.c | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH v4 0/8] Tegra20 External Memory Controller driver

2018-07-19 Thread Dmitry Osipenko
Hello, Couple years ago the Tegra20 EMC driver was removed from the kernel due to incompatible changes in the Tegra's clock driver. This patchset introduces a modernized EMC driver. Currently the sole purpose of the driver is to initialize DRAM frequency to maximum rate during of the kernels

[PATCH v4 7/8] clk: tegra20: Check whether direct PLLM sourcing is turned off for EMC

2018-07-19 Thread Dmitry Osipenko
Ensure that direct PLLM sourcing is turned off for EMC as we don't support that configuration in the clk driver. Signed-off-by: Dmitry Osipenko Acked-by: Peter De Schrijver --- drivers/clk/tegra/clk-tegra20.c | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH v4 0/8] Tegra20 External Memory Controller driver

2018-07-19 Thread Dmitry Osipenko
Hello, Couple years ago the Tegra20 EMC driver was removed from the kernel due to incompatible changes in the Tegra's clock driver. This patchset introduces a modernized EMC driver. Currently the sole purpose of the driver is to initialize DRAM frequency to maximum rate during of the kernels

[PATCH v4 8/8] memory: tegra: Introduce Tegra20 EMC driver

2018-07-19 Thread Dmitry Osipenko
Introduce driver for the External Memory Controller (EMC) found on Tegra20 chips, which controls the external DRAM on the board. The purpose of this driver is to program memory timing for external memory on the EMC clock rate change. Signed-off-by: Dmitry Osipenko Acked-by: Peter De Schrijver

[PATCH v4 8/8] memory: tegra: Introduce Tegra20 EMC driver

2018-07-19 Thread Dmitry Osipenko
Introduce driver for the External Memory Controller (EMC) found on Tegra20 chips, which controls the external DRAM on the board. The purpose of this driver is to program memory timing for external memory on the EMC clock rate change. Signed-off-by: Dmitry Osipenko Acked-by: Peter De Schrijver

[PATCH v4 1/8] dt: bindings: tegra20-emc: Document interrupt property

2018-07-19 Thread Dmitry Osipenko
EMC has a dedicated interrupt that is used to notify about completion of HW operations. Document the interrupt property. Signed-off-by: Dmitry Osipenko Acked-by: Rob Herring Acked-by: Peter De Schrijver --- .../devicetree/bindings/arm/tegra/nvidia,tegra20-emc.txt| 2 ++ 1 file

[PATCH v4 4/8] ARM: dts: tegra20: Add interrupt entry to External Memory Controller

2018-07-19 Thread Dmitry Osipenko
Add interrupt entry into the EMC DT node. Signed-off-by: Dmitry Osipenko Acked-by: Peter De Schrijver --- arch/arm/boot/dts/tegra20.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi index 15b73bd377f0..9eb4163a4390 100644

[PATCH v4 1/8] dt: bindings: tegra20-emc: Document interrupt property

2018-07-19 Thread Dmitry Osipenko
EMC has a dedicated interrupt that is used to notify about completion of HW operations. Document the interrupt property. Signed-off-by: Dmitry Osipenko Acked-by: Rob Herring Acked-by: Peter De Schrijver --- .../devicetree/bindings/arm/tegra/nvidia,tegra20-emc.txt| 2 ++ 1 file

[PATCH v4 4/8] ARM: dts: tegra20: Add interrupt entry to External Memory Controller

2018-07-19 Thread Dmitry Osipenko
Add interrupt entry into the EMC DT node. Signed-off-by: Dmitry Osipenko Acked-by: Peter De Schrijver --- arch/arm/boot/dts/tegra20.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi index 15b73bd377f0..9eb4163a4390 100644

Re: [PATCH 08/10] psi: pressure stall information for CPU, memory, and IO

2018-07-19 Thread Peter Zijlstra
On Thu, Jul 19, 2018 at 08:50:38AM -0400, Johannes Weiner wrote: > On Thu, Jul 19, 2018 at 11:26:14AM +0200, Peter Zijlstra wrote: > > On Wed, Jul 18, 2018 at 02:03:18PM +0200, Peter Zijlstra wrote: > > > > > Leaving us just 5 bytes short of needing a single cacheline :/ > > > > > > struct

Re: [PATCH 08/10] psi: pressure stall information for CPU, memory, and IO

2018-07-19 Thread Peter Zijlstra
On Thu, Jul 19, 2018 at 08:50:38AM -0400, Johannes Weiner wrote: > On Thu, Jul 19, 2018 at 11:26:14AM +0200, Peter Zijlstra wrote: > > On Wed, Jul 18, 2018 at 02:03:18PM +0200, Peter Zijlstra wrote: > > > > > Leaving us just 5 bytes short of needing a single cacheline :/ > > > > > > struct

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