Re: [RFC PATCH 1/2] spi: Add QuadSPI driver for Atmel SAMA5D2

2018-06-21 Thread Piotr Bugalski
Hi Boris, I'm a bit allergic to personal preferences in coding style, anyway thank you for comments and some important findings. On Thu, 21 Jun 2018, Boris Brezillon wrote: Hi Piotr, On Mon, 18 Jun 2018 18:21:23 +0200 Piotr Bugalski wrote: Kernel contains QSPI driver strongly tied to

Re: [RFC PATCH 1/2] spi: Add QuadSPI driver for Atmel SAMA5D2

2018-06-21 Thread Piotr Bugalski
Hi Boris, I'm a bit allergic to personal preferences in coding style, anyway thank you for comments and some important findings. On Thu, 21 Jun 2018, Boris Brezillon wrote: Hi Piotr, On Mon, 18 Jun 2018 18:21:23 +0200 Piotr Bugalski wrote: Kernel contains QSPI driver strongly tied to

Re: [RFC 2/2] rcu: Remove ->dynticks_nmi_nesting from struct rcu_dynticks

2018-06-21 Thread Joel Fernandes
Hi Paul, On Wed, Jun 20, 2018 at 09:49:02AM -0700, Paul E. McKenney wrote: > On Thu, Jun 21, 2018 at 01:05:22AM +0900, Byungchul Park wrote: > > On Wed, Jun 20, 2018 at 11:58 PM, Paul E. McKenney > > wrote: > > > On Wed, Jun 20, 2018 at 05:47:20PM +0900, Byungchul Park wrote: > > >> Hello folks,

Re: [RFC 2/2] rcu: Remove ->dynticks_nmi_nesting from struct rcu_dynticks

2018-06-21 Thread Joel Fernandes
Hi Paul, On Wed, Jun 20, 2018 at 09:49:02AM -0700, Paul E. McKenney wrote: > On Thu, Jun 21, 2018 at 01:05:22AM +0900, Byungchul Park wrote: > > On Wed, Jun 20, 2018 at 11:58 PM, Paul E. McKenney > > wrote: > > > On Wed, Jun 20, 2018 at 05:47:20PM +0900, Byungchul Park wrote: > > >> Hello folks,

Re: [PATCH v2 1/3] dt-bindings: thermal: Add binding document for SR thermal

2018-06-21 Thread Srinath Mannam
Hi Rob, Please find my comments for the reason to have multiple DT nodes. On Thu, Jun 21, 2018 at 1:22 AM, Rob Herring wrote: > On Mon, Jun 18, 2018 at 02:01:17PM +0530, Srinath Mannam wrote: >> From: Pramod Kumar >> >> Add binding document for supported thermal implementation >> in Stingray.

Re: [PATCH v2 1/3] dt-bindings: thermal: Add binding document for SR thermal

2018-06-21 Thread Srinath Mannam
Hi Rob, Please find my comments for the reason to have multiple DT nodes. On Thu, Jun 21, 2018 at 1:22 AM, Rob Herring wrote: > On Mon, Jun 18, 2018 at 02:01:17PM +0530, Srinath Mannam wrote: >> From: Pramod Kumar >> >> Add binding document for supported thermal implementation >> in Stingray.

[PATCH] ARM: imx: enable bus auto clock gating function for i.mx6sll

2018-06-21 Thread Anson Huang
i.MX6SLL has HW bus auto clock gating function, enable it by default to save VDD_SOC_IN power, about 5% ~ 20% saved depends on different use cases. Signed-off-by: Anson Huang --- arch/arm/mach-imx/pm-imx6.c | 11 +-- include/linux/mfd/syscon/imx6q-iomuxc-gpr.h | 3 +++

[PATCH] ARM: imx: enable bus auto clock gating function for i.mx6sll

2018-06-21 Thread Anson Huang
i.MX6SLL has HW bus auto clock gating function, enable it by default to save VDD_SOC_IN power, about 5% ~ 20% saved depends on different use cases. Signed-off-by: Anson Huang --- arch/arm/mach-imx/pm-imx6.c | 11 +-- include/linux/mfd/syscon/imx6q-iomuxc-gpr.h | 3 +++

[RFC PATCH 02/14] fsi: Move code around to avoid forward declaration

2018-06-21 Thread Benjamin Herrenschmidt
Move fsi_slave_set_smode() and its helpers to before it's first user and remove the corresponding forward declaration. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-core.c | 94 +- 1 file changed, 46 insertions(+), 48 deletions(-) diff --git

Re: [PATCH] devres: Add devm_of_iomap()

2018-06-21 Thread Greg Kroah-Hartman
On Fri, Jun 22, 2018 at 02:13:15PM +1000, Benjamin Herrenschmidt wrote: > On Thu, 2018-06-14 at 13:31 +1000, Benjamin Herrenschmidt wrote: > > There are still quite a few cases where a device might want > > to get to a different node of the device-tree, obtain the > > resources and map them. > >

[RFC PATCH 02/14] fsi: Move code around to avoid forward declaration

2018-06-21 Thread Benjamin Herrenschmidt
Move fsi_slave_set_smode() and its helpers to before it's first user and remove the corresponding forward declaration. Signed-off-by: Benjamin Herrenschmidt --- drivers/fsi/fsi-core.c | 94 +- 1 file changed, 46 insertions(+), 48 deletions(-) diff --git

Re: [PATCH] devres: Add devm_of_iomap()

2018-06-21 Thread Greg Kroah-Hartman
On Fri, Jun 22, 2018 at 02:13:15PM +1000, Benjamin Herrenschmidt wrote: > On Thu, 2018-06-14 at 13:31 +1000, Benjamin Herrenschmidt wrote: > > There are still quite a few cases where a device might want > > to get to a different node of the device-tree, obtain the > > resources and map them. > >

Re: [PATCH v2] PCI: controller: Move PCI_DOMAINS selection to arch Kconfig

2018-06-21 Thread Scott Branden
On 18-06-21 09:54 AM, Lorenzo Pieralisi wrote: On Wed, Jun 20, 2018 at 10:07:33AM +0200, Jan Kiszka wrote: On 2018-06-19 13:21, Lorenzo Pieralisi wrote: Commit 51bc085d6454 ("PCI: Improve host drivers compile test coverage") added configuration options to allow PCI host controller drivers

Re: [PATCH v2] PCI: controller: Move PCI_DOMAINS selection to arch Kconfig

2018-06-21 Thread Scott Branden
On 18-06-21 09:54 AM, Lorenzo Pieralisi wrote: On Wed, Jun 20, 2018 at 10:07:33AM +0200, Jan Kiszka wrote: On 2018-06-19 13:21, Lorenzo Pieralisi wrote: Commit 51bc085d6454 ("PCI: Improve host drivers compile test coverage") added configuration options to allow PCI host controller drivers

linux-next: Tree for Jun 22

2018-06-21 Thread Stephen Rothwell
Hi all, Changes since 20180621: New tree: fsi The tip tree gained a conflict against the vfs tree. The rcu tree gained a conflict against the tip tree. Non-merge commits (relative to Linus' tree): 1714 1747 files changed, 55739 insertions(+), 30108 deletions

linux-next: Tree for Jun 22

2018-06-21 Thread Stephen Rothwell
Hi all, Changes since 20180621: New tree: fsi The tip tree gained a conflict against the vfs tree. The rcu tree gained a conflict against the tip tree. Non-merge commits (relative to Linus' tree): 1714 1747 files changed, 55739 insertions(+), 30108 deletions

RE: [PATCH v2] panic: move bust_spinlocks(0) after console_flush_on_panic() to avoid deadlocks

2018-06-21 Thread Hoeun Ryu
+CC sergey.senozhatsky.w...@gmail.com pmla...@suse.com Please review this patch. > -Original Message- > From: Hoeun Ryu [mailto:hoeun@lge.com.com] > Sent: Tuesday, June 05, 2018 11:19 AM > To: Andrew Morton ; Kees Cook > ; Andi Kleen ; Borislav Petkov > ; Thomas Gleixner ; Steven

RE: [PATCH v2] panic: move bust_spinlocks(0) after console_flush_on_panic() to avoid deadlocks

2018-06-21 Thread Hoeun Ryu
+CC sergey.senozhatsky.w...@gmail.com pmla...@suse.com Please review this patch. > -Original Message- > From: Hoeun Ryu [mailto:hoeun@lge.com.com] > Sent: Tuesday, June 05, 2018 11:19 AM > To: Andrew Morton ; Kees Cook > ; Andi Kleen ; Borislav Petkov > ; Thomas Gleixner ; Steven

[RFC PATCH 01/14] devres: Add devm_of_iomap()

2018-06-21 Thread Benjamin Herrenschmidt
There are still quite a few cases where a device might want to get to a different node of the device-tree, obtain the resources and map them. We have of_iomap() and of_io_request_and_map() but they both have shortcomings, such as not returning the size of the resource found (which can be useful)

[RFC PATCH 01/14] devres: Add devm_of_iomap()

2018-06-21 Thread Benjamin Herrenschmidt
There are still quite a few cases where a device might want to get to a different node of the device-tree, obtain the resources and map them. We have of_iomap() and of_io_request_and_map() but they both have shortcomings, such as not returning the size of the resource found (which can be useful)

[RFC PATCH 00/14] fsi: Fixes and Coldfire coprocessor offload

2018-06-21 Thread Benjamin Herrenschmidt
This series implements support for offloading the FSI protocol bitbanging to the ColdFire secondary core of the Aspeed SoCs. The result increases FSI performance by a factor of 4, and on systems that don't support async FSI clock, provide much more regular and continuous clocking which helps

[RFC PATCH 00/14] fsi: Fixes and Coldfire coprocessor offload

2018-06-21 Thread Benjamin Herrenschmidt
This series implements support for offloading the FSI protocol bitbanging to the ColdFire secondary core of the Aspeed SoCs. The result increases FSI performance by a factor of 4, and on systems that don't support async FSI clock, provide much more regular and continuous clocking which helps

Re: [PATCH] devres: Add devm_of_iomap()

2018-06-21 Thread Benjamin Herrenschmidt
On Thu, 2018-06-14 at 13:31 +1000, Benjamin Herrenschmidt wrote: > There are still quite a few cases where a device might want > to get to a different node of the device-tree, obtain the > resources and map them. > > This is generally open coded in drivers which is quite error prone > > We have

Re: [PATCH] devres: Add devm_of_iomap()

2018-06-21 Thread Benjamin Herrenschmidt
On Thu, 2018-06-14 at 13:31 +1000, Benjamin Herrenschmidt wrote: > There are still quite a few cases where a device might want > to get to a different node of the device-tree, obtain the > resources and map them. > > This is generally open coded in drivers which is quite error prone > > We have

[PATCH -mm -v4 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-06-21 Thread Huang, Ying
From: Huang Ying To support to swapin the THP as a whole, we need to create PMD swap mapping during swapout, and maintain PMD swap mapping count. This patch implements the support to increase the PMD swap mapping count (for swapout, fork, etc.) and set SWAP_HAS_CACHE flag (for swapin, etc.)

[PATCH -mm -v4 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-06-21 Thread Huang, Ying
From: Huang Ying To support to swapin the THP as a whole, we need to create PMD swap mapping during swapout, and maintain PMD swap mapping count. This patch implements the support to increase the PMD swap mapping count (for swapout, fork, etc.) and set SWAP_HAS_CACHE flag (for swapin, etc.)

[PATCH -mm -v4 06/21] mm, THP, swap: Support PMD swap mapping when splitting huge PMD

2018-06-21 Thread Huang, Ying
From: Huang Ying A huge PMD need to be split when zap a part of the PMD mapping etc. If the PMD mapping is a swap mapping, we need to split it too. This patch implemented the support for this. This is similar as splitting the PMD page mapping, except we need to decrease the PMD swap mapping

[PATCH -mm -v4 06/21] mm, THP, swap: Support PMD swap mapping when splitting huge PMD

2018-06-21 Thread Huang, Ying
From: Huang Ying A huge PMD need to be split when zap a part of the PMD mapping etc. If the PMD mapping is a swap mapping, we need to split it too. This patch implemented the support for this. This is similar as splitting the PMD page mapping, except we need to decrease the PMD swap mapping

[PATCH -mm -v4 10/21] mm, THP, swap: Support to count THP swapin and its fallback

2018-06-21 Thread Huang, Ying
From: Huang Ying 2 new /proc/vmstat fields are added, "thp_swapin" and "thp_swapin_fallback" to count swapin a THP from swap device as a whole and fallback to normal page swapin. Signed-off-by: "Huang, Ying" Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Michal Hocko Cc: Johannes Weiner

[PATCH -mm -v4 09/21] mm, THP, swap: Swapin a THP as a whole

2018-06-21 Thread Huang, Ying
From: Huang Ying With this patch, when page fault handler find a PMD swap mapping, it will swap in a THP as a whole. This avoids the overhead of splitting/collapsing before/after the THP swapping. And improves the swap performance greatly for reduced page fault count etc.

[PATCH -mm -v4 08/21] mm, THP, swap: Support to read a huge swap cluster for swapin a THP

2018-06-21 Thread Huang, Ying
From: Huang Ying To swapin a THP as a whole, we need to read a huge swap cluster from the swap device. This patch revised the __read_swap_cache_async() and its callers and callees to support this. If __read_swap_cache_async() find the swap cluster of the specified swap entry is huge, it will

[PATCH -mm -v4 10/21] mm, THP, swap: Support to count THP swapin and its fallback

2018-06-21 Thread Huang, Ying
From: Huang Ying 2 new /proc/vmstat fields are added, "thp_swapin" and "thp_swapin_fallback" to count swapin a THP from swap device as a whole and fallback to normal page swapin. Signed-off-by: "Huang, Ying" Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Michal Hocko Cc: Johannes Weiner

[PATCH -mm -v4 09/21] mm, THP, swap: Swapin a THP as a whole

2018-06-21 Thread Huang, Ying
From: Huang Ying With this patch, when page fault handler find a PMD swap mapping, it will swap in a THP as a whole. This avoids the overhead of splitting/collapsing before/after the THP swapping. And improves the swap performance greatly for reduced page fault count etc.

[PATCH -mm -v4 08/21] mm, THP, swap: Support to read a huge swap cluster for swapin a THP

2018-06-21 Thread Huang, Ying
From: Huang Ying To swapin a THP as a whole, we need to read a huge swap cluster from the swap device. This patch revised the __read_swap_cache_async() and its callers and callees to support this. If __read_swap_cache_async() find the swap cluster of the specified swap entry is huge, it will

[PATCH -mm -v4 07/21] mm, THP, swap: Support PMD swap mapping in split_swap_cluster()

2018-06-21 Thread Huang, Ying
From: Huang Ying When splitting a THP in swap cache or failing to allocate a THP when swapin a huge swap cluster, the huge swap cluster will be split. In addition to clear the huge flag of the swap cluster, the PMD swap mapping count recorded in cluster_count() will be set to 0. But we will

[PATCH -mm -v4 07/21] mm, THP, swap: Support PMD swap mapping in split_swap_cluster()

2018-06-21 Thread Huang, Ying
From: Huang Ying When splitting a THP in swap cache or failing to allocate a THP when swapin a huge swap cluster, the huge swap cluster will be split. In addition to clear the huge flag of the swap cluster, the PMD swap mapping count recorded in cluster_count() will be set to 0. But we will

[PATCH -mm -v4 17/21] mm, THP, swap: Support PMD swap mapping for MADV_WILLNEED

2018-06-21 Thread Huang, Ying
From: Huang Ying During MADV_WILLNEED, for a PMD swap mapping, if THP swapin is enabled for the VMA, the whole swap cluster will be swapin. Otherwise, the huge swap cluster and the PMD swap mapping will be split and fallback to PTE swap mapping. Signed-off-by: "Huang, Ying" Cc: "Kirill A.

[PATCH -mm -v4 17/21] mm, THP, swap: Support PMD swap mapping for MADV_WILLNEED

2018-06-21 Thread Huang, Ying
From: Huang Ying During MADV_WILLNEED, for a PMD swap mapping, if THP swapin is enabled for the VMA, the whole swap cluster will be swapin. Otherwise, the huge swap cluster and the PMD swap mapping will be split and fallback to PTE swap mapping. Signed-off-by: "Huang, Ying" Cc: "Kirill A.

[PATCH -mm -v4 14/21] mm, cgroup, THP, swap: Support to move swap account for PMD swap mapping

2018-06-21 Thread Huang, Ying
From: Huang Ying Previously the huge swap cluster will be split after the THP is swapout. Now, to support to swapin the THP as a whole, the huge swap cluster will not be split after the THP is reclaimed. So in memcg, we need to move the swap account for PMD swap mappings in the process's page

[PATCH -mm -v4 14/21] mm, cgroup, THP, swap: Support to move swap account for PMD swap mapping

2018-06-21 Thread Huang, Ying
From: Huang Ying Previously the huge swap cluster will be split after the THP is swapout. Now, to support to swapin the THP as a whole, the huge swap cluster will not be split after the THP is reclaimed. So in memcg, we need to move the swap account for PMD swap mappings in the process's page

[PATCH -mm -v4 12/21] mm, THP, swap: Support PMD swap mapping in swapoff

2018-06-21 Thread Huang, Ying
From: Huang Ying During swapoff, for a huge swap cluster, we need to allocate a THP, read its contents into the THP and unuse the PMD and PTE swap mappings to it. If failed to allocate a THP, the huge swap cluster will be split. During unuse, if it is found that the swap cluster mapped by a

[PATCH -mm -v4 12/21] mm, THP, swap: Support PMD swap mapping in swapoff

2018-06-21 Thread Huang, Ying
From: Huang Ying During swapoff, for a huge swap cluster, we need to allocate a THP, read its contents into the THP and unuse the PMD and PTE swap mappings to it. If failed to allocate a THP, the huge swap cluster will be split. During unuse, if it is found that the swap cluster mapped by a

[PATCH -mm -v4 21/21] mm, THP: Avoid to split THP when reclaim MADV_FREE THP

2018-06-21 Thread Huang, Ying
From: Huang Ying Previously, to reclaim MADV_FREE THP, the THP will be split firstly, then reclaim each sub-pages. This wastes cycles to split THP and unmap and free each sub-pages, and split THP even if it has been written since MADV_FREE. We have to do this because MADV_FREE THP reclaiming

[PATCH -mm -v4 19/21] mm, THP, swap: Support PMD swap mapping in common path

2018-06-21 Thread Huang, Ying
From: Huang Ying Original code is only for PMD migration entry, it is revised to support PMD swap mapping. Signed-off-by: "Huang, Ying" Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Michal Hocko Cc: Johannes Weiner Cc: Shaohua Li Cc: Hugh Dickins Cc: Minchan Kim Cc: Rik van Riel

[PATCH -mm -v4 21/21] mm, THP: Avoid to split THP when reclaim MADV_FREE THP

2018-06-21 Thread Huang, Ying
From: Huang Ying Previously, to reclaim MADV_FREE THP, the THP will be split firstly, then reclaim each sub-pages. This wastes cycles to split THP and unmap and free each sub-pages, and split THP even if it has been written since MADV_FREE. We have to do this because MADV_FREE THP reclaiming

[PATCH -mm -v4 19/21] mm, THP, swap: Support PMD swap mapping in common path

2018-06-21 Thread Huang, Ying
From: Huang Ying Original code is only for PMD migration entry, it is revised to support PMD swap mapping. Signed-off-by: "Huang, Ying" Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Michal Hocko Cc: Johannes Weiner Cc: Shaohua Li Cc: Hugh Dickins Cc: Minchan Kim Cc: Rik van Riel

[PATCH -mm -v4 11/21] mm, THP, swap: Add sysfs interface to configure THP swapin

2018-06-21 Thread Huang, Ying
From: Huang Ying Swapin a THP as a whole isn't desirable at some situations. For example, for random access pattern, swapin a THP as a whole will inflate the reading greatly. So a sysfs interface: /sys/kernel/mm/transparent_hugepage/swapin_enabled is added to configure it. Three options as

[PATCH -mm -v4 18/21] mm, THP, swap: Support PMD swap mapping in mincore()

2018-06-21 Thread Huang, Ying
From: Huang Ying During mincore(), for PMD swap mapping, swap cache will be looked up. If the resulting page isn't compound page, the PMD swap mapping will be split and fallback to PTE swap mapping processing. Signed-off-by: "Huang, Ying" Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc:

[PATCH -mm -v4 20/21] mm, THP, swap: create PMD swap mapping when unmap the THP

2018-06-21 Thread Huang, Ying
From: Huang Ying This is the final step of the THP swapin support. When reclaiming a anonymous THP, after allocating the huge swap cluster and add the THP into swap cache, the PMD page mapping will be changed to the mapping to the swap space. Previously, the PMD page mapping will be split

[PATCH -mm -v4 11/21] mm, THP, swap: Add sysfs interface to configure THP swapin

2018-06-21 Thread Huang, Ying
From: Huang Ying Swapin a THP as a whole isn't desirable at some situations. For example, for random access pattern, swapin a THP as a whole will inflate the reading greatly. So a sysfs interface: /sys/kernel/mm/transparent_hugepage/swapin_enabled is added to configure it. Three options as

[PATCH -mm -v4 18/21] mm, THP, swap: Support PMD swap mapping in mincore()

2018-06-21 Thread Huang, Ying
From: Huang Ying During mincore(), for PMD swap mapping, swap cache will be looked up. If the resulting page isn't compound page, the PMD swap mapping will be split and fallback to PTE swap mapping processing. Signed-off-by: "Huang, Ying" Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc:

[PATCH -mm -v4 20/21] mm, THP, swap: create PMD swap mapping when unmap the THP

2018-06-21 Thread Huang, Ying
From: Huang Ying This is the final step of the THP swapin support. When reclaiming a anonymous THP, after allocating the huge swap cluster and add the THP into swap cache, the PMD page mapping will be changed to the mapping to the swap space. Previously, the PMD page mapping will be split

[PATCH -mm -v4 16/21] mm, THP, swap: Free PMD swap mapping when zap_huge_pmd()

2018-06-21 Thread Huang, Ying
From: Huang Ying For a PMD swap mapping, zap_huge_pmd() will clear the PMD and call free_swap_and_cache() to decrease the swap reference count and maybe free or split the huge swap cluster and the THP in swap cache. Signed-off-by: "Huang, Ying" Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli

[PATCH -mm -v4 15/21] mm, THP, swap: Support to copy PMD swap mapping when fork()

2018-06-21 Thread Huang, Ying
From: Huang Ying During fork, the page table need to be copied from parent to child. A PMD swap mapping need to be copied too and the swap reference count need to be increased. When the huge swap cluster has been split already, we need to split the PMD swap mapping and fallback to PTE copying.

[PATCH -mm -v4 13/21] mm, THP, swap: Support PMD swap mapping in madvise_free()

2018-06-21 Thread Huang, Ying
From: Huang Ying When madvise_free() found a PMD swap mapping, if only part of the huge swap cluster is operated on, the PMD swap mapping will be split and fallback to PTE swap mapping processing. Otherwise, if all huge swap cluster is operated on, free_swap_and_cache() will be called to

[PATCH -mm -v4 16/21] mm, THP, swap: Free PMD swap mapping when zap_huge_pmd()

2018-06-21 Thread Huang, Ying
From: Huang Ying For a PMD swap mapping, zap_huge_pmd() will clear the PMD and call free_swap_and_cache() to decrease the swap reference count and maybe free or split the huge swap cluster and the THP in swap cache. Signed-off-by: "Huang, Ying" Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli

[PATCH -mm -v4 15/21] mm, THP, swap: Support to copy PMD swap mapping when fork()

2018-06-21 Thread Huang, Ying
From: Huang Ying During fork, the page table need to be copied from parent to child. A PMD swap mapping need to be copied too and the swap reference count need to be increased. When the huge swap cluster has been split already, we need to split the PMD swap mapping and fallback to PTE copying.

[PATCH -mm -v4 13/21] mm, THP, swap: Support PMD swap mapping in madvise_free()

2018-06-21 Thread Huang, Ying
From: Huang Ying When madvise_free() found a PMD swap mapping, if only part of the huge swap cluster is operated on, the PMD swap mapping will be split and fallback to PTE swap mapping processing. Otherwise, if all huge swap cluster is operated on, free_swap_and_cache() will be called to

[PATCH -mm -v4 05/21] mm, THP, swap: Support PMD swap mapping in free_swap_and_cache()/swap_free()

2018-06-21 Thread Huang, Ying
From: Huang Ying When a PMD swap mapping is removed from a huge swap cluster, for example, unmap a memory range mapped with PMD swap mapping, etc, free_swap_and_cache() will be called to decrease the reference count to the huge swap cluster. free_swap_and_cache() may also free or split the huge

[PATCH -mm -v4 01/21] mm, THP, swap: Enable PMD swap operations for CONFIG_THP_SWAP

2018-06-21 Thread Huang, Ying
From: Huang Ying Previously, the PMD swap operations are only enabled for CONFIG_ARCH_ENABLE_THP_MIGRATION. Because they are only used by the THP migration support. We will support PMD swap mapping to the huge swap cluster and swapin the THP as a whole. That will be enabled via

[PATCH -mm -v4 05/21] mm, THP, swap: Support PMD swap mapping in free_swap_and_cache()/swap_free()

2018-06-21 Thread Huang, Ying
From: Huang Ying When a PMD swap mapping is removed from a huge swap cluster, for example, unmap a memory range mapped with PMD swap mapping, etc, free_swap_and_cache() will be called to decrease the reference count to the huge swap cluster. free_swap_and_cache() may also free or split the huge

[PATCH -mm -v4 01/21] mm, THP, swap: Enable PMD swap operations for CONFIG_THP_SWAP

2018-06-21 Thread Huang, Ying
From: Huang Ying Previously, the PMD swap operations are only enabled for CONFIG_ARCH_ENABLE_THP_MIGRATION. Because they are only used by the THP migration support. We will support PMD swap mapping to the huge swap cluster and swapin the THP as a whole. That will be enabled via

[PATCH -mm -v4 04/21] mm, THP, swap: Support PMD swap mapping in swapcache_free_cluster()

2018-06-21 Thread Huang, Ying
From: Huang Ying Previously, during swapout, all PMD page mapping will be split and replaced with PTE swap mapping. And when clearing the SWAP_HAS_CACHE flag for the huge swap cluster in swapcache_free_cluster(), the huge swap cluster will be split. Now, during swapout, the PMD page mapping

[PATCH -mm -v4 02/21] mm, THP, swap: Make CONFIG_THP_SWAP depends on CONFIG_SWAP

2018-06-21 Thread Huang, Ying
From: Huang Ying It's unreasonable to optimize swapping for THP without basic swapping support. And this will cause build errors when THP_SWAP functions are defined in swapfile.c and called elsewhere. The comments are fixed too to reflect the latest progress. Signed-off-by: "Huang, Ying" Cc:

[PATCH -mm -v4 00/21] mm, THP, swap: Swapout/swapin THP in one piece

2018-06-21 Thread Huang, Ying
From: Huang Ying Hi, Andrew, could you help me to check whether the overall design is reasonable? Hi, Hugh, Shaohua, Minchan and Rik, could you help me to review the swap part of the patchset? Especially [02/21], [03/21], [04/21], [05/21], [06/21], [07/21], [08/21], [09/21], [10/21], [11/21],

[PATCH -mm -v4 04/21] mm, THP, swap: Support PMD swap mapping in swapcache_free_cluster()

2018-06-21 Thread Huang, Ying
From: Huang Ying Previously, during swapout, all PMD page mapping will be split and replaced with PTE swap mapping. And when clearing the SWAP_HAS_CACHE flag for the huge swap cluster in swapcache_free_cluster(), the huge swap cluster will be split. Now, during swapout, the PMD page mapping

[PATCH -mm -v4 02/21] mm, THP, swap: Make CONFIG_THP_SWAP depends on CONFIG_SWAP

2018-06-21 Thread Huang, Ying
From: Huang Ying It's unreasonable to optimize swapping for THP without basic swapping support. And this will cause build errors when THP_SWAP functions are defined in swapfile.c and called elsewhere. The comments are fixed too to reflect the latest progress. Signed-off-by: "Huang, Ying" Cc:

[PATCH -mm -v4 00/21] mm, THP, swap: Swapout/swapin THP in one piece

2018-06-21 Thread Huang, Ying
From: Huang Ying Hi, Andrew, could you help me to check whether the overall design is reasonable? Hi, Hugh, Shaohua, Minchan and Rik, could you help me to review the swap part of the patchset? Especially [02/21], [03/21], [04/21], [05/21], [06/21], [07/21], [08/21], [09/21], [10/21], [11/21],

Re: [PATCH 2/3] perf script: Fix crash because of missing evsel->priv

2018-06-21 Thread Ravi Bangoria
Hi Arnaldo, On 06/20/2018 07:22 PM, Arnaldo Carvalho de Melo wrote: > Em Wed, Jun 20, 2018 at 07:00:29PM +0530, Ravi Bangoria escreveu: >> perf script in pipped mode is crashing because evsel->priv is not >> set properly. Fix it. >> >> Before: >> # ./perf record -o - -- ls | ./perf script >>

Re: [PATCH 2/3] perf script: Fix crash because of missing evsel->priv

2018-06-21 Thread Ravi Bangoria
Hi Arnaldo, On 06/20/2018 07:22 PM, Arnaldo Carvalho de Melo wrote: > Em Wed, Jun 20, 2018 at 07:00:29PM +0530, Ravi Bangoria escreveu: >> perf script in pipped mode is crashing because evsel->priv is not >> set properly. Fix it. >> >> Before: >> # ./perf record -o - -- ls | ./perf script >>

[PATCH 3/7] pinctrl: mt7622: fix that pinctrl_claim_hogs cannot work

2018-06-21 Thread sean.wang
From: Sean Wang To allow claiming hogs by pinctrl, we cannot enable pinctrl until all groups and functions are being added done. Also, it's necessary that the corresponding gpiochip is being added when the pinctrl device is enabled. Cc: sta...@vger.kernel.org Fixes: d6ed93551320 ("pinctrl:

[PATCH 3/7] pinctrl: mt7622: fix that pinctrl_claim_hogs cannot work

2018-06-21 Thread sean.wang
From: Sean Wang To allow claiming hogs by pinctrl, we cannot enable pinctrl until all groups and functions are being added done. Also, it's necessary that the corresponding gpiochip is being added when the pinctrl device is enabled. Cc: sta...@vger.kernel.org Fixes: d6ed93551320 ("pinctrl:

[PATCH 4/7] pinctrl: mt7622: stop using the deprecated pinctrl_add_gpio_range

2018-06-21 Thread sean.wang
From: Sean Wang If the pinctrl node has the gpio-ranges property, the range will be added by the gpio core and doesn't need to be added by the pinctrl driver. But for keeping backward compatibility, an explicit pinctrl_add_gpio_range is still needed to be called when there is a missing

[PATCH 4/7] pinctrl: mt7622: stop using the deprecated pinctrl_add_gpio_range

2018-06-21 Thread sean.wang
From: Sean Wang If the pinctrl node has the gpio-ranges property, the range will be added by the gpio core and doesn't need to be added by the pinctrl driver. But for keeping backward compatibility, an explicit pinctrl_add_gpio_range is still needed to be called when there is a missing

[PATCH 6/7] arm64: dts: mt7622: use gpio-ranges to pinctrl device

2018-06-21 Thread sean.wang
From: Sean Wang Using gpio-ranges property represent which GPIOs correspond to which pins on MT7622 pin controllers. For details, we can see section 2.1 of Documentation/devicetree/bindings/gpio/gpio.txt to know how to bind pinctrl and gpio drivers via the "gpio-ranges" property. Signed-off-by:

[PATCH 1/7] pinctrl: mt7622: fix error path on failing at groups building

2018-06-21 Thread sean.wang
From: Sean Wang It should be to return an error code when failing at groups building. Cc: sta...@vger.kernel.org Fixes: d6ed93551320 ("pinctrl: mediatek: add pinctrl driver for MT7622 SoC") Signed-off-by: Sean Wang --- drivers/pinctrl/mediatek/pinctrl-mt7622.c | 2 +- 1 file changed, 1

[PATCH 7/7] arm64: dts: mt7622: add earlycon to mt7622-rfb1 board

2018-06-21 Thread sean.wang
From: Sean Wang Add earlycon to mt7622-rfb1 as to know what was going on when a certain fault is happening at the early initialization stage. Signed-off-by: Sean Wang --- arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/7] pinctrl: mt7622: fix error path on failing at groups building

2018-06-21 Thread sean.wang
From: Sean Wang It should be to return an error code when failing at groups building. Cc: sta...@vger.kernel.org Fixes: d6ed93551320 ("pinctrl: mediatek: add pinctrl driver for MT7622 SoC") Signed-off-by: Sean Wang --- drivers/pinctrl/mediatek/pinctrl-mt7622.c | 2 +- 1 file changed, 1

[PATCH 7/7] arm64: dts: mt7622: add earlycon to mt7622-rfb1 board

2018-06-21 Thread sean.wang
From: Sean Wang Add earlycon to mt7622-rfb1 as to know what was going on when a certain fault is happening at the early initialization stage. Signed-off-by: Sean Wang --- arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 6/7] arm64: dts: mt7622: use gpio-ranges to pinctrl device

2018-06-21 Thread sean.wang
From: Sean Wang Using gpio-ranges property represent which GPIOs correspond to which pins on MT7622 pin controllers. For details, we can see section 2.1 of Documentation/devicetree/bindings/gpio/gpio.txt to know how to bind pinctrl and gpio drivers via the "gpio-ranges" property. Signed-off-by:

[PATCH 5/7] pinctrl: mt7622: fix a kernel panic when gpio-hog is being applied

2018-06-21 Thread sean.wang
From: Sean Wang When we are explicitly using GPIO hogging mechanism in the pinctrl node, such as: { line_input { gpio-hog; gpios = <95 0>, <96 0>, <97 0>; input; }; }; A

[PATCH 5/7] pinctrl: mt7622: fix a kernel panic when gpio-hog is being applied

2018-06-21 Thread sean.wang
From: Sean Wang When we are explicitly using GPIO hogging mechanism in the pinctrl node, such as: { line_input { gpio-hog; gpios = <95 0>, <96 0>, <97 0>; input; }; }; A

[PATCH 2/7] pinctrl: mt7622: fix initialization sequence between eint and gpiochip

2018-06-21 Thread sean.wang
From: Sean Wang Because gpichip applied in the driver must depend on mtk eint to implement the input data debouncing and the translation between gpio and irq, it's better to keep logic consistent with mtk eint being built prior to gpiochip being added. Cc: sta...@vger.kernel.org Fixes:

[PATCH 2/7] pinctrl: mt7622: fix initialization sequence between eint and gpiochip

2018-06-21 Thread sean.wang
From: Sean Wang Because gpichip applied in the driver must depend on mtk eint to implement the input data debouncing and the translation between gpio and irq, it's better to keep logic consistent with mtk eint being built prior to gpiochip being added. Cc: sta...@vger.kernel.org Fixes:

Re: [PATCH 2/2] tools/memory-model: Add write ordering by release-acquire and by locks

2018-06-21 Thread Paul E. McKenney
On Thu, Jun 21, 2018 at 08:04:22PM +0200, Peter Zijlstra wrote: > On Thu, Jun 21, 2018 at 01:27:12PM -0400, Alan Stern wrote: > > More than one kernel developer has expressed the opinion that the LKMM > > should enforce ordering of writes by release-acquire chains and by > > locking. In other

Re: [PATCH 2/2] tools/memory-model: Add write ordering by release-acquire and by locks

2018-06-21 Thread Paul E. McKenney
On Thu, Jun 21, 2018 at 08:04:22PM +0200, Peter Zijlstra wrote: > On Thu, Jun 21, 2018 at 01:27:12PM -0400, Alan Stern wrote: > > More than one kernel developer has expressed the opinion that the LKMM > > should enforce ordering of writes by release-acquire chains and by > > locking. In other

Re: [PATCH v2 3/4] ima: Use tpm_chip_find() and access TPM functions using it

2018-06-21 Thread Jason Gunthorpe
On Thu, Jun 21, 2018 at 04:59:55PM -0400, Stefan Berger wrote: > On 06/21/2018 04:53 PM, Mimi Zohar wrote: > >On Wed, 2018-06-20 at 16:42 -0400, Stefan Berger wrote: > >>Rather than accessing the TPM functions using a NULL pointer, which > >>causes a lookup for a suitable chip every time, get a

Re: [PATCH v2 3/4] ima: Use tpm_chip_find() and access TPM functions using it

2018-06-21 Thread Jason Gunthorpe
On Thu, Jun 21, 2018 at 04:59:55PM -0400, Stefan Berger wrote: > On 06/21/2018 04:53 PM, Mimi Zohar wrote: > >On Wed, 2018-06-20 at 16:42 -0400, Stefan Berger wrote: > >>Rather than accessing the TPM functions using a NULL pointer, which > >>causes a lookup for a suitable chip every time, get a

[PATCH 0/3] k3dma: add support to reserved channels

2018-06-21 Thread Guodong Xu
This patchset fixes bug people found on hikey960 when allocating DMA channels to peripherals such as SPI. It fails because the channel is reserved, and is not accessible by kernel. Patch 1 and 2 add support to reserved channels for K3 DMA. Patch 3 includes a removal of axi_config who controls DMA

[PATCH 0/3] k3dma: add support to reserved channels

2018-06-21 Thread Guodong Xu
This patchset fixes bug people found on hikey960 when allocating DMA channels to peripherals such as SPI. It fails because the channel is reserved, and is not accessible by kernel. Patch 1 and 2 add support to reserved channels for K3 DMA. Patch 3 includes a removal of axi_config who controls DMA

[PATCH 3/3] k3dma: delete axi_config

2018-06-21 Thread Guodong Xu
From: Li Yu Axi_config controls whether DMA resources can be accessed in non-secure mode, such as linux kernel. The setting is actually done in bootloader stage. This patch removes axi_config from k3dma driver. Signed-off-by: Li Yu Signed-off-by: Guodong Xu --- drivers/dma/k3dma.c | 3 ---

[PATCH 3/3] k3dma: delete axi_config

2018-06-21 Thread Guodong Xu
From: Li Yu Axi_config controls whether DMA resources can be accessed in non-secure mode, such as linux kernel. The setting is actually done in bootloader stage. This patch removes axi_config from k3dma driver. Signed-off-by: Li Yu Signed-off-by: Guodong Xu --- drivers/dma/k3dma.c | 3 ---

[PATCH 2/3] k3dma: add support to reserved minimum channels

2018-06-21 Thread Guodong Xu
From: Li Yu On k3 series of SoC, DMA controller reserves some channels for other on-chip coprocessors. By adding support to dma_min_chan, kernel will not be able to use these reserved channels. One example is on Hi3660 platform, channel 0 is reserved to lpm3. Please also refer to

[PATCH 1/3] dt-bindings: k3dma: add optional property dma_min_chan

2018-06-21 Thread Guodong Xu
From: Li Yu Add optional property dma_min_chan for k3dma. Signed-off-by: Li Yu --- Documentation/devicetree/bindings/dma/k3dma.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/dma/k3dma.txt b/Documentation/devicetree/bindings/dma/k3dma.txt index

[PATCH 2/3] k3dma: add support to reserved minimum channels

2018-06-21 Thread Guodong Xu
From: Li Yu On k3 series of SoC, DMA controller reserves some channels for other on-chip coprocessors. By adding support to dma_min_chan, kernel will not be able to use these reserved channels. One example is on Hi3660 platform, channel 0 is reserved to lpm3. Please also refer to

[PATCH 1/3] dt-bindings: k3dma: add optional property dma_min_chan

2018-06-21 Thread Guodong Xu
From: Li Yu Add optional property dma_min_chan for k3dma. Signed-off-by: Li Yu --- Documentation/devicetree/bindings/dma/k3dma.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/dma/k3dma.txt b/Documentation/devicetree/bindings/dma/k3dma.txt index

Re: linux-next: Please add the fsi tree

2018-06-21 Thread Stephen Rothwell
Hi Ben, On Fri, 22 Jun 2018 11:53:50 +1000 Benjamin Herrenschmidt wrote: > > Please add the fsi tree at > > https://git.kernel.org/pub/scm/linux/kernel/git/benh/linux-fsi.git (master) > > To linux-next. It contains the changes that I will send to Greg KH to the FSI > subsystem used by the

Re: linux-next: Please add the fsi tree

2018-06-21 Thread Stephen Rothwell
Hi Ben, On Fri, 22 Jun 2018 11:53:50 +1000 Benjamin Herrenschmidt wrote: > > Please add the fsi tree at > > https://git.kernel.org/pub/scm/linux/kernel/git/benh/linux-fsi.git (master) > > To linux-next. It contains the changes that I will send to Greg KH to the FSI > subsystem used by the

[PATCH] Fix for clk disable issue on imx6ul

2018-06-21 Thread Chakra Divi
isiot engicam board is not booting after the commit cf091ee994ec266e33c3a305d6fc8c5ccb1f8acd done by . Modified the commit to support imx6ul based SOMs too along with imx6ull processors Signed-off-by: Chakra Divi --- drivers/clk/imx/clk-imx6ul.c | 6 -- 1 file changed, 4 insertions(+), 2

[PATCH] Fix for clk disable issue on imx6ul

2018-06-21 Thread Chakra Divi
isiot engicam board is not booting after the commit cf091ee994ec266e33c3a305d6fc8c5ccb1f8acd done by . Modified the commit to support imx6ul based SOMs too along with imx6ull processors Signed-off-by: Chakra Divi --- drivers/clk/imx/clk-imx6ul.c | 6 -- 1 file changed, 4 insertions(+), 2

  1   2   3   4   5   6   7   8   9   10   >