[PATCH v4 05/18] of: overlay: use prop add changeset entry for property in new nodes

2018-10-15 Thread frowand . list
From: Frank Rowand The changeset entry 'update property' was used for new properties in an overlay instead of 'add property'. The decision of whether to use 'update property' was based on whether the property already exists in the subtree where the node is being spliced into. At the top level o

[PATCH v4 06/18] of: overlay: do not duplicate properties from overlay for new nodes

2018-10-15 Thread frowand . list
From: Frank Rowand When allocating a new node, add_changeset_node() was duplicating the properties from the respective node in the overlay instead of allocating a node with no properties. When this patch is applied the errors reported by the devictree unittest from patch "of: overlay: add tests

[PATCH v4 07/18] of: dynamic: change type of of_{at, de}tach_node() to void

2018-10-15 Thread frowand . list
From: Frank Rowand of_attach_node() and of_detach_node() always return zero, so their return value is meaningless. Change their type to void and fix all callers to ignore return value. Signed-off-by: Frank Rowand --- arch/powerpc/platforms/pseries/dlpar.c| 13 ++--- arch/powerpc/p

[PATCH v4 08/18] of: overlay: reorder fields in struct fragment

2018-10-15 Thread frowand . list
From: Frank Rowand Order the fields of struct fragment in the same order as struct of_overlay_notify_data. The order in struct fragment is not significant. If both structs are ordered the same then when examining the data in a debugger or dump the human involved does not have to remember which

[PATCH v4 09/18] of: overlay: validate overlay properties #address-cells and #size-cells

2018-10-15 Thread frowand . list
From: Frank Rowand If overlay properties #address-cells or #size-cells are already in the live devicetree for any given node, then the values in the overlay must match the values in the live tree. If the properties are already in the live tree then there is no need to create a changeset entry to

[PATCH v4 10/18] of: overlay: make all pr_debug() and pr_err() messages unique

2018-10-15 Thread frowand . list
From: Frank Rowand Make overlay.c debug and error messages unique so that they can be unambiguously found by grep. Signed-off-by: Frank Rowand --- drivers/of/overlay.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c i

[PATCH v4 11/18] of: overlay: test case of two fragments adding same node

2018-10-15 Thread frowand . list
From: Frank Rowand Multiple overlay fragments adding or deleting the same node is not supported. An attempt to do so results in an incorrect devicetree. The node name will be munged for the second add. After adding this patch, the unittest messages will show: Duplicate name in motor-1, rena

[PATCH v4 12/18] of: overlay: check prevents multiple fragments add or delete same node

2018-10-15 Thread frowand . list
From: Frank Rowand Multiple overlay fragments adding or deleting the same node is not supported. Replace code comment of such, with check to detect the attempt and fail the overlay apply. Devicetree unittest where multiple fragments added the same node was added in the previous patch in the ser

[PATCH v4 13/18] of: overlay: check prevents multiple fragments touching same property

2018-10-15 Thread frowand . list
From: Frank Rowand Add test case of two fragments updating the same property. After adding the test case, the system hangs at end of boot, after after slub stack dumps from kfree() in crypto modprobe code. Multiple overlay fragments adding, modifying, or deleting the same property is not suppor

[PATCH v4 14/18] of: unittest: remove unused of_unittest_apply_overlay() argument

2018-10-15 Thread frowand . list
From: Frank Rowand Argument unittest_nr is not used in of_unittest_apply_overlay(), remove it. Signed-off-by: Frank Rowand --- drivers/of/unittest.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index efd9c947f192..6d80

[PATCH v4 15/18] of: overlay: set node fields from properties when add new overlay node

2018-10-15 Thread frowand . list
From: Frank Rowand Overlay nodes added by add_changeset_node() do not have the node fields name, phandle, and type set. The node passed to __of_attach_node() when the add node changeset entry is processed does not contain any properties. The node's properties are located in add property changes

[PATCH v4 16/18] of: unittest: allow base devicetree to have symbol metadata

2018-10-15 Thread frowand . list
From: Frank Rowand The overlay metadata nodes in the FDT created from testcases.dts are not handled properly. The __fixups__ and __local_fixups__ node were added to the live devicetree, but should not be. Only the first property in the /__symbols__ node was added to the live devicetree if the l

[PATCH v4 17/18] of: unittest: find overlays[] entry by name instead of index

2018-10-15 Thread frowand . list
From: Frank Rowand One accessor of overlays[] was using a hard coded index value to find the correct array entry instead of searching for the entry containing the correct name. Signed-off-by: Frank Rowand --- drivers/of/unittest.c | 21 + 1 file changed, 17 insertions(+), 4

[PATCH v4 18/18] of: unittest: initialize args before calling of_*parse_*()

2018-10-15 Thread frowand . list
From: Frank Rowand Callers of of_irq_parse_one() blindly use the pointer args.np without checking whether of_irq_parse_one() had an error and thus did not set the value of args.np. Initialize args to zero so that using the format "%pOF" to show the value of args.np will show "(null)" when of_irq

Re: [PATCH v2 2/2] mm: speed up mremap by 500x on large regions

2018-10-15 Thread Joel Fernandes
On Mon, Oct 15, 2018 at 10:18:14AM +0200, Martin Schwidefsky wrote: > On Mon, 15 Oct 2018 09:10:53 +0200 > Christian Borntraeger wrote: > > > On 10/12/2018 03:37 AM, Joel Fernandes (Google) wrote: > > > Android needs to mremap large regions of memory during memory management > > > related operati

Re: linux-next: Tree for Oct 15

2018-10-15 Thread Benjamin Herrenschmidt
On Tue, 2018-10-16 at 13:19 +1100, Stephen Rothwell wrote: > Hi all, > > On Tue, 16 Oct 2018 13:02:16 +1100 Stephen Rothwell > wrote: > > > > Reverting fe3d2a45e8079fdd7d4da1ff07f4b40bc3cb499f (and the following 2 > > commits) produces a kernel that boots. > > Instead of that, I applied this p

Re: [PATCH V3 1/2] mm: Add get_user_pages_cma_migrate

2018-10-15 Thread Alexey Kardashevskiy
On 18/09/2018 21:58, Aneesh Kumar K.V wrote: > This helper does a get_user_pages_fast and if it find pages in the CMA area > it will try to migrate them before taking page reference. This makes sure that > we don't keep non-movable pages (due to page reference count) in the CMA area. > Not able

Re: [PATCH V3 2/2] powerpc/mm/iommu: Allow migration of cma allocated pages during mm_iommu_get

2018-10-15 Thread Alexey Kardashevskiy
On 18/09/2018 21:58, Aneesh Kumar K.V wrote: > Current code doesn't do page migration if the page allocated is a compound > page. > With HugeTLB migration support, we can end up allocating hugetlb pages from > CMA region. Also THP pages can be allocated from CMA region. This patch > updates >

[PATCH v8 0/9] powerpc: Switch to CONFIG_THREAD_INFO_IN_TASK

2018-10-15 Thread Christophe Leroy
The purpose of this serie is to activate CONFIG_THREAD_INFO_IN_TASK which moves the thread_info into task_struct. Moving thread_info into task_struct has the following advantages: - It protects thread_info from corruption in the case of stack overflows. - Its address is harder to determine if stac

[PATCH v8 1/9] book3s/64: avoid circular header inclusion in mmu-hash.h

2018-10-15 Thread Christophe Leroy
When activating CONFIG_THREAD_INFO_IN_TASK, linux/sched.h includes asm/current.h. This generates a circular dependency. To avoid that, asm/processor.h shall not be included in mmu-hash.h In order to do that, this patch moves into a new header called asm/task_size_user64.h the information from asm/

[PATCH v8 2/9] powerpc: Only use task_struct 'cpu' field on SMP

2018-10-15 Thread Christophe Leroy
When moving to CONFIG_THREAD_INFO_IN_TASK, the thread_info 'cpu' field gets moved into task_struct and only defined when CONFIG_SMP is set. This patch ensures that TI_CPU is only used when CONFIG_SMP is set and that task_struct 'cpu' field is not used directly out of SMP code. Signed-off-by: Chri

[PATCH v8 3/9] powerpc: Prepare for moving thread_info into task_struct

2018-10-15 Thread Christophe Leroy
This patch cleans the powerpc kernel before activating CONFIG_THREAD_INFO_IN_TASK: - The purpose of the pointer given to call_do_softirq() and call_do_irq() is to point the new stack ==> change it to void* and rename it 'sp' - Don't use CURRENT_THREAD_INFO() to locate the stack. - Fix a few comment

[PATCH v8 4/9] powerpc: Activate CONFIG_THREAD_INFO_IN_TASK

2018-10-15 Thread Christophe Leroy
This patch activates CONFIG_THREAD_INFO_IN_TASK which moves the thread_info into task_struct. Moving thread_info into task_struct has the following advantages: - It protects thread_info from corruption in the case of stack overflows. - Its address is harder to determine if stack addresses are leak

[PATCH v8 5/9] powerpc: regain entire stack space

2018-10-15 Thread Christophe Leroy
thread_info is not anymore in the stack, so the entire stack can now be used. There is also no risk anymore of corrupting task_cpu(p) with a stack overflow so the patch removes the test. When doing this, an explicit test for NULL stack pointer is needed in validate_sp() as it is not anymore impli

[PATCH v8 6/9] powerpc: 'current_set' is now a table of task_struct pointers

2018-10-15 Thread Christophe Leroy
The table of pointers 'current_set' has been used for retrieving the stack and current. They used to be thread_info pointers as they were pointing to the stack and current was taken from the 'task' field of the thread_info. Now, the pointers of 'current_set' table are now both pointers to task_str

[PATCH v8 7/9] powerpc/32: Remove CURRENT_THREAD_INFO and rename TI_CPU

2018-10-15 Thread Christophe Leroy
Now that thread_info is similar to task_struct, it's address is in r2 so CURRENT_THREAD_INFO() macro is useless. This patch removes it. At the same time, as the 'cpu' field is not anymore in thread_info, this patch renames it to TASK_CPU. Signed-off-by: Christophe Leroy --- arch/powerpc/Makefil

[PATCH v8 8/9] powerpc/64: Remove CURRENT_THREAD_INFO

2018-10-15 Thread Christophe Leroy
Now that current_thread_info is located at the beginning of 'current' task struct, CURRENT_THREAD_INFO macro is not really needed any more. This patch replaces it by loads of the value at PACACURRENT(r13). Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/exception-64s.h | 4 +

[PATCH v8 9/9] powerpc: clean stack pointers naming

2018-10-15 Thread Christophe Leroy
Some stack pointers used to also be thread_info pointers and were called tp. Now that they are only stack pointers, rename them sp. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/irq.c | 17 +++-- arch/powerpc/kernel/setup_64.c | 20 ++-- 2 files changed

Re: [PATCH 8/8] kconfig: remove CONFIG_MCA leftovers

2018-10-15 Thread Masahiro Yamada
On Sun, Oct 14, 2018 at 12:11 AM Christoph Hellwig wrote: > > Signed-off-by: Christoph Hellwig > --- Can you use "powerpc:" or something for the subject line? I'd like to see "kconfig:" only for patches that touch the scripts/kconfig/ directory. > arch/powerpc/Kconfig | 4 > drivers/

[PATCH kernel] powerpc/powernv/tce: Implement pnv_phb::tce_invalidate

2018-10-15 Thread Alexey Kardashevskiy
At the moment there are 5 types of TCE invalidation: - IODA1/POWER7 - uses raw PHB registers; - IODA2 "direct" - uses raw PHB3 registers; - IODA2 "opal" - calls OPAL for invalidation; - NPU - always invalidates the entire cache; - NPU2 - calls OPAL for invalidation but uses wrong OPAL_PCI_TCE_KILL

<    1   2