[PATCH v8 18/20] x86: mm: Convert ptdump_walk_pgd_level_debugfs() to take an mm_struct

2019-04-03 Thread Steven Price
To enable x86 to use the generic walk_page_range() function, the callers of ptdump_walk_pgd_level_debugfs() need to pass in the mm_struct. This means that ptdump_walk_pgd_level_core() is now always passed a valid pgd, so drop the support for pgd==NULL. Signed-off-by: Steven Price --- arch/x86

[PATCH v8 16/20] x86: mm: Point to struct seq_file from struct pg_state

2019-04-03 Thread Steven Price
-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 69 ++- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index e2b53db92c34..3d12ac031144 100644 --- a/arch/x86/mm/dump_pagetables.c +++ b/arch

[PATCH v8 14/20] arm64: mm: Convert mm/dump.c to use walk_page_range()

2019-04-03 Thread Steven Price
Now walk_page_range() can walk kernel page tables, we can switch the arm64 ptdump code over to using it, simplifying the code. Signed-off-by: Steven Price --- arch/arm64/mm/dump.c | 117 ++- 1 file changed, 59 insertions(+), 58 deletions(-) diff --git

[PATCH v8 11/20] mm: pagewalk: Add p4d_entry() and pgd_entry()

2019-04-03 Thread Steven Price
ll entries, not just transparent huge pages. Signed-off-by: Steven Price --- include/linux/mm.h | 15 +-- mm/pagewalk.c | 27 --- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 76769749b5a5.

[PATCH v8 13/20] mm: pagewalk: Add test_p?d callbacks

2019-04-03 Thread Steven Price
It is useful to be able to skip parts of the page table tree even when walking without VMAs. Add test_p?d callbacks similar to test_walk but which are called just before a table at that level is walked. If the callback returns non-zero then the entire table is skipped. Signed-off-by: Steven Price

[PATCH v8 15/20] x86: mm: Don't display pages which aren't present in debugfs

2019-04-03 Thread Steven Price
' that the page table holes are at. Signed-off-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index ca270fb00805..e2b53db92c34 100644 --- a/arch/x86/mm

[PATCH v8 12/20] mm: pagewalk: Allow walking without vma

2019-04-03 Thread Steven Price
r. Remove the requirement to have a vma except when trying to split huge pages. Signed-off-by: Steven Price --- mm/pagewalk.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/mm/pagewalk.c b/mm/pagewalk.c index 98373a9f88b8..dac0c848b458 10064

[PATCH v8 06/20] riscv: mm: Add p?d_large() definitions

2019-04-03 Thread Steven Price
or execute bit set on it. CC: Palmer Dabbelt CC: Albert Ou CC: linux-ri...@lists.infradead.org Signed-off-by: Steven Price --- arch/riscv/include/asm/pgtable-64.h | 7 +++ arch/riscv/include/asm/pgtable.h| 7 +++ 2 files changed, 14 insertions(+) diff --git a/arch/riscv/include/asm

[PATCH v8 10/20] mm: Add generic p?d_large() macros

2019-04-03 Thread Steven Price
. Signed-off-by: Steven Price --- include/asm-generic/pgtable.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index fa782fba51ee..9c5d0f73db67 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm

[PATCH v8 08/20] sparc: mm: Add p?d_large() definitions

2019-04-03 Thread Steven Price
provided, so add #defines to prevent the generic versions (added in a later patch) from being used. CC: "David S. Miller" CC: sparcli...@vger.kernel.org Signed-off-by: Steven Price Acked-by: David S. Miller --- arch/sparc/include/asm/pgtable_64.h | 2 ++ 1 file changed, 2 insertion

[PATCH v8 07/20] s390: mm: Add p?d_large() definitions

2019-04-03 Thread Steven Price
implemented as static inline functions. Add a #define so we don't pick up the generic version introduced in a later patch. CC: Martin Schwidefsky CC: Heiko Carstens CC: linux-s...@vger.kernel.org Signed-off-by: Steven Price --- arch/s390/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions

[PATCH v8 09/20] x86: mm: Add p?d_large() definitions

2019-04-03 Thread Steven Price
simply add #defines to prevent the generic versions (added in a later patch) from being picked up. We also need to add corresponding #undefs in dump_pagetables.c. This code will be removed when x86 is switched over to using the generic pagewalk code in a later patch. Signed-off-by: Steven Price

[PATCH v8 04/20] powerpc: mm: Add p?d_large() definitions

2019-04-03 Thread Steven Price
it out of the CONFIG_TRANSPARENT_HUGEPAGE condition and implement the other levels. CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Michael Ellerman CC: linuxppc-...@lists.ozlabs.org CC: kvm-...@vger.kernel.org Signed-off-by: Steven Price --- arch/powerpc/include/asm/book3s/64/pgtable.h

[PATCH v8 03/20] mips: mm: Add p?d_large() definitions

2019-04-03 Thread Steven Price
...@vger.kernel.org Signed-off-by: Steven Price Acked-by: Paul Burton --- arch/mips/include/asm/pgtable-64.h | 8 1 file changed, 8 insertions(+) diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h index 93a9dce31f25..42162877ac62 100644 --- a/arch/mips/include/asm

[PATCH v8 02/20] arm64: mm: Add p?d_large() definitions

2019-04-03 Thread Steven Price
age walking macros is implicitly relying on the page size/number of levels being the same as the kernel. So it is safe to reuse this for p?d_large() as it is an architectural restriction. CC: Catalin Marinas CC: Will Deacon Signed-off-by: Steven Price --- arch/arm64/include/asm/pgtable.h | 2 ++ 1 f

[PATCH v8 00/20] Convert x86 & arm64 to use generic page walk

2019-04-03 Thread Steven Price
) Steven Price (20): arc: mm: Add p?d_large() definitions arm64: mm: Add p?d_large() definitions mips: mm: Add p?d_large() definitions powerpc: mm: Add p?d_large() definitions KVM: PPC: Book3S HV: Remove pmd_is_leaf() riscv: mm: Add p?d_large() definitions s390: mm: Add p?d_large

Re: [PATCH 2/6] arm64/mm: Enable memory hot remove

2019-04-03 Thread Steven Price
On 03/04/2019 13:37, Robin Murphy wrote: > [ +Steve ] > > Hi Anshuman, > > On 03/04/2019 05:30, Anshuman Khandual wrote: >> diff --git a/arch/arm64/include/asm/pgtable.h >> b/arch/arm64/include/asm/pgtable.h >> index de70c1e..858098e 100644 >> --- a/arch/arm64/include/asm/pgtable.h >> +++

[PATCH v7 08/20] sparc: mm: Add p?d_large() definitions

2019-03-28 Thread Steven Price
provided, so add #defines to prevent the generic versions (added in a later patch) from being used. CC: "David S. Miller" CC: sparcli...@vger.kernel.org Signed-off-by: Steven Price Acked-by: David S. Miller --- arch/sparc/include/asm/pgtable_64.h | 2 ++ 1 file changed, 2 insertion

[PATCH v7 12/20] mm: pagewalk: Allow walking without vma

2019-03-28 Thread Steven Price
r. Remove the requirement to have a vma except when trying to split huge pages. Signed-off-by: Steven Price --- mm/pagewalk.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/mm/pagewalk.c b/mm/pagewalk.c index 98373a9f88b8..dac0c848b458 10064

[PATCH v7 20/20] x86: mm: Convert dump_pagetables to use walk_page_range

2019-03-28 Thread Steven Price
callbacks which can decide to skip an entire tree of entries Signed-off-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 280 ++ 1 file changed, 146 insertions(+), 134 deletions(-) diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index

[PATCH v7 19/20] x86: mm: Convert ptdump_walk_pgd_level_core() to take an mm_struct

2019-03-28 Thread Steven Price
page tables. This fake_mm structure is initialised with the minimum necessary for the generic page walk code. Signed-off-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 36 --- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/arch/x86/mm

[PATCH v7 18/20] x86: mm: Convert ptdump_walk_pgd_level_debugfs() to take an mm_struct

2019-03-28 Thread Steven Price
To enable x86 to use the generic walk_page_range() function, the callers of ptdump_walk_pgd_level_debugfs() need to pass in the mm_struct. This means that ptdump_walk_pgd_level_core() is now always passed a valid pgd, so drop the support for pgd==NULL. Signed-off-by: Steven Price --- arch/x86

[PATCH v7 17/20] x86: mm+efi: Convert ptdump_walk_pgd_level() to take a mm_struct

2019-03-28 Thread Steven Price
Signed-off-by: Steven Price --- arch/x86/include/asm/pgtable.h | 2 +- arch/x86/mm/dump_pagetables.c | 4 ++-- arch/x86/platform/efi/efi_32.c | 2 +- arch/x86/platform/efi/efi_64.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/i

[PATCH v7 16/20] x86: mm: Point to struct seq_file from struct pg_state

2019-03-28 Thread Steven Price
-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 69 ++- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index e2b53db92c34..3d12ac031144 100644 --- a/arch/x86/mm/dump_pagetables.c +++ b/arch

[PATCH v7 13/20] mm: pagewalk: Add test_p?d callbacks

2019-03-28 Thread Steven Price
It is useful to be able to skip parts of the page table tree even when walking without VMAs. Add test_p?d callbacks similar to test_walk but which are called just before a table at that level is walked. If the callback returns non-zero then the entire table is skipped. Signed-off-by: Steven Price

[PATCH v7 11/20] mm: pagewalk: Add p4d_entry() and pgd_entry()

2019-03-28 Thread Steven Price
ll entries, not just transparent huge pages. Signed-off-by: Steven Price --- include/linux/mm.h | 15 +-- mm/pagewalk.c | 27 --- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 76769749b5a5.

[PATCH v7 15/20] x86: mm: Don't display pages which aren't present in debugfs

2019-03-28 Thread Steven Price
' that the page table holes are at. Signed-off-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index ca270fb00805..e2b53db92c34 100644 --- a/arch/x86/mm

[PATCH v7 14/20] arm64: mm: Convert mm/dump.c to use walk_page_range()

2019-03-28 Thread Steven Price
Now walk_page_range() can walk kernel page tables, we can switch the arm64 ptdump code over to using it, simplifying the code. Signed-off-by: Steven Price --- arch/arm64/mm/dump.c | 117 ++- 1 file changed, 59 insertions(+), 58 deletions(-) diff --git

[PATCH v7 10/20] mm: Add generic p?d_large() macros

2019-03-28 Thread Steven Price
. Signed-off-by: Steven Price --- include/asm-generic/pgtable.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index fa782fba51ee..9c5d0f73db67 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm

[PATCH v7 09/20] x86: mm: Add p?d_large() definitions

2019-03-28 Thread Steven Price
simply add #defines to prevent the generic versions (added in a later patch) from being picked up. We also need to add corresponding #undefs in dump_pagetables.c. This code will be removed when x86 is switched over to using the generic pagewalk code in a later patch. Signed-off-by: Steven Price

[PATCH v7 07/20] s390: mm: Add p?d_large() definitions

2019-03-28 Thread Steven Price
implemented as static inline functions. Add a #define so we don't pick up the generic version introduced in a later patch. CC: Martin Schwidefsky CC: Heiko Carstens CC: linux-s...@vger.kernel.org Signed-off-by: Steven Price --- arch/s390/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions

[PATCH v7 06/20] riscv: mm: Add p?d_large() definitions

2019-03-28 Thread Steven Price
or execute bit set on it. CC: Palmer Dabbelt CC: Albert Ou CC: linux-ri...@lists.infradead.org Signed-off-by: Steven Price --- arch/riscv/include/asm/pgtable-64.h | 7 +++ arch/riscv/include/asm/pgtable.h| 7 +++ 2 files changed, 14 insertions(+) diff --git a/arch/riscv/include/asm

[PATCH v7 03/20] mips: mm: Add p?d_large() definitions

2019-03-28 Thread Steven Price
...@vger.kernel.org Signed-off-by: Steven Price Acked-by: Paul Burton --- arch/mips/include/asm/pgtable-64.h | 8 1 file changed, 8 insertions(+) diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h index 93a9dce31f25..42162877ac62 100644 --- a/arch/mips/include/asm

[PATCH v7 02/20] arm64: mm: Add p?d_large() definitions

2019-03-28 Thread Steven Price
we can reuse for p?d_large(). CC: Catalin Marinas CC: Will Deacon Signed-off-by: Steven Price --- arch/arm64/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index de70c1eabf33..6eef345dbaf4 100644

[PATCH v7 00/20] Convert x86 & arm64 to use generic page walk

2019-03-28 Thread Steven Price
depth and P?D * Handle folded page tables at all levels, so depth from pte_hole() ignores folding at any level (see real_depth() function in mm/pagewalk.c) Steven Price (20): arc: mm: Add p?d_large() definitions arm64: mm: Add p?d_large() definitions mips: mm: Add p?d_large

[PATCH v6 14/19] x86: mm: Don't display pages which aren't present in debugfs

2019-03-26 Thread Steven Price
' that the page table holes are at. Signed-off-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index ca270fb00805..e2b53db92c34 100644 --- a/arch/x86/mm

[PATCH v6 19/19] x86: mm: Convert dump_pagetables to use walk_page_range

2019-03-26 Thread Steven Price
callbacks which can decide to skip an entire tree of entries Signed-off-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 280 ++ 1 file changed, 146 insertions(+), 134 deletions(-) diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index

[PATCH v6 15/19] x86: mm: Point to struct seq_file from struct pg_state

2019-03-26 Thread Steven Price
-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 69 ++- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index e2b53db92c34..3d12ac031144 100644 --- a/arch/x86/mm/dump_pagetables.c +++ b/arch

[PATCH v6 13/19] arm64: mm: Convert mm/dump.c to use walk_page_range()

2019-03-26 Thread Steven Price
Now walk_page_range() can walk kernel page tables, we can switch the arm64 ptdump code over to using it, simplifying the code. Signed-off-by: Steven Price --- arch/arm64/mm/dump.c | 117 ++- 1 file changed, 59 insertions(+), 58 deletions(-) diff --git

[PATCH v6 16/19] x86: mm+efi: Convert ptdump_walk_pgd_level() to take a mm_struct

2019-03-26 Thread Steven Price
Signed-off-by: Steven Price --- arch/x86/include/asm/pgtable.h | 2 +- arch/x86/mm/dump_pagetables.c | 4 ++-- arch/x86/platform/efi/efi_32.c | 2 +- arch/x86/platform/efi/efi_64.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/i

[PATCH v6 18/19] x86: mm: Convert ptdump_walk_pgd_level_core() to take an mm_struct

2019-03-26 Thread Steven Price
page tables. This fake_mm structure is initialised with the minimum necessary for the generic page walk code. Signed-off-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 36 --- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/arch/x86/mm

[PATCH v6 17/19] x86: mm: Convert ptdump_walk_pgd_level_debugfs() to take an mm_struct

2019-03-26 Thread Steven Price
To enable x86 to use the generic walk_page_range() function, the callers of ptdump_walk_pgd_level_debugfs() need to pass in the mm_struct. This means that ptdump_walk_pgd_level_core() is now always passed a valid pgd, so drop the support for pgd==NULL. Signed-off-by: Steven Price --- arch/x86

[PATCH v6 11/19] mm: pagewalk: Allow walking without vma

2019-03-26 Thread Steven Price
r. Remove the requirement to have a vma except when trying to split huge pages. Signed-off-by: Steven Price --- mm/pagewalk.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/mm/pagewalk.c b/mm/pagewalk.c index 98373a9f88b8..dac0c848b458 10064

[PATCH v6 10/19] mm: pagewalk: Add p4d_entry() and pgd_entry()

2019-03-26 Thread Steven Price
ll entries, not just transparent huge pages. Signed-off-by: Steven Price --- include/linux/mm.h | 15 +-- mm/pagewalk.c | 27 --- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 76769749b5a5.

[PATCH v6 12/19] mm: pagewalk: Add test_p?d callbacks

2019-03-26 Thread Steven Price
It is useful to be able to skip parts of the page table tree even when walking without VMAs. Add test_p?d callbacks similar to test_walk but which are called just before a table at that level is walked. If the callback returns non-zero then the entire table is skipped. Signed-off-by: Steven Price

[PATCH v6 09/19] mm: Add generic p?d_large() macros

2019-03-26 Thread Steven Price
. Signed-off-by: Steven Price --- include/asm-generic/pgtable.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index fa782fba51ee..9c5d0f73db67 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm

[PATCH v6 08/19] x86: mm: Add p?d_large() definitions

2019-03-26 Thread Steven Price
simply add #defines to prevent the generic versions (added in a later patch) from being picked up. We also need to add corresponding #undefs in dump_pagetables.c. This code will be removed when x86 is switched over to using the generic pagewalk code in a later patch. Signed-off-by: Steven Price

[PATCH v6 07/19] sparc: mm: Add p?d_large() definitions

2019-03-26 Thread Steven Price
provided, so add #defines to prevent the generic versions (added in a later patch) from being used. CC: "David S. Miller" CC: sparcli...@vger.kernel.org Signed-off-by: Steven Price Acked-by: David S. Miller --- arch/sparc/include/asm/pgtable_64.h | 2 ++ 1 file changed, 2 insertion

[PATCH v6 06/19] s390: mm: Add p?d_large() definitions

2019-03-26 Thread Steven Price
implemented as static inline functions. Add a #define so we don't pick up the generic version introduced in a later patch. CC: Martin Schwidefsky CC: Heiko Carstens CC: linux-s...@vger.kernel.org Signed-off-by: Steven Price --- arch/s390/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions

[PATCH v6 05/19] riscv: mm: Add p?d_large() definitions

2019-03-26 Thread Steven Price
or execute bit set on it. CC: Palmer Dabbelt CC: Albert Ou CC: linux-ri...@lists.infradead.org Signed-off-by: Steven Price --- arch/riscv/include/asm/pgtable-64.h | 7 +++ arch/riscv/include/asm/pgtable.h| 7 +++ 2 files changed, 14 insertions(+) diff --git a/arch/riscv/include/asm

[PATCH v6 03/19] mips: mm: Add p?d_large() definitions

2019-03-26 Thread Steven Price
...@vger.kernel.org Signed-off-by: Steven Price Acked-by: Paul Burton --- arch/mips/include/asm/pgtable-64.h | 8 1 file changed, 8 insertions(+) diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h index 93a9dce31f25..42162877ac62 100644 --- a/arch/mips/include/asm

[PATCH v6 02/19] arm64: mm: Add p?d_large() definitions

2019-03-26 Thread Steven Price
we can reuse for p?d_large(). CC: Catalin Marinas CC: Will Deacon Signed-off-by: Steven Price --- arch/arm64/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index de70c1eabf33..6eef345dbaf4 100644

[PATCH v6 00/19] Convert x86 & arm64 to use generic page walk

2019-03-26 Thread Steven Price
() function in mm/pagewalk.c) Steven Price (19): arc: mm: Add p?d_large() definitions arm64: mm: Add p?d_large() definitions mips: mm: Add p?d_large() definitions powerpc: mm: Add p?d_large() definitions riscv: mm: Add p?d_large() definitions s390: mm: Add p?d_large() definitions sparc

Re: [PATCH] firmware: arm_scmi: Fix leak in scmi_mailbox_check

2019-03-26 Thread Steven Price
On 26/03/2019 07:23, Mukesh Ojha wrote: > > On 3/25/2019 11:07 PM, Steven Price wrote: >> of_parse_phandle_with_args() requires the caller to call of_node_put() on >> the returned args->np pointer. Otherwise the reference count will remain >> incremented. >> &

Re: [PATCH v3] PCI: xilinx: Check for __get_free_pages() failure

2019-03-26 Thread Steven Price
u Reviewed-by: Steven Price > --- > v3: remove "unlikely", as suggested by Bjorn Helgaas. > v2: caller is redefined to accept the error code, as suggested by > Steven Price > --- > drivers/pci/controller/pcie-xilinx.c | 12 ++-- > 1 file changed, 10 in

Re: [PATCH] firmware: arm_scmi: check return value of idr_find

2019-03-26 Thread Steven Price
cmi_mbox_chan_setup(). > Therefore, the patch conservatively checks the return value and > returns -EINVAL when it indeed failed. > > Signed-off-by: Kangjie Lu > Reviewed-by: Steven Price > --- > drivers/firmware/arm_scmi/driver.c | 2 ++ > 1 file changed, 2 insertions

[PATCH] firmware: arm_scmi: Fix leak in scmi_mailbox_check

2019-03-25 Thread Steven Price
firmware: arm_scmi: add basic driver infrastructure for SCMI") Signed-off-by: Steven Price --- drivers/firmware/arm_scmi/driver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index 8f952f2f1a29.

Re: [RESEND] i2c: imx: defer probing on dma channel request

2019-03-25 Thread Steven Price
On 25/03/2019 15:30, laurentiu.tu...@nxp.com wrote: > From: Laurentiu Tudor > > If the dma controller is not yet probed, defer i2c probe. > The error path in probe was slightly modified (no functional change) There is a functional change for cases like: > ret = pm_runtime_get_sync(>dev);

Re: [PATCH v2] pci: pcie-xilinx: fix a missing-check bug for __get_free_pages

2019-03-25 Thread Steven Price
On 23/03/2019 21:04, Aditya Pakki wrote: > In case __get_free_pages fail, the fix returns error upstream > to avoid NULL pointer dereference. > > Signed-off-by: Aditya Pakki Reviewed-by: Steven Price > > --- > v1: Return error upstream as suggested by Steven > --- &

Re: [PATCH] firmware: arm_scmi: check return value of idr_find

2019-03-25 Thread Steven Price
On 09/03/2019 04:02, Kangjie Lu wrote: > idr_find may return NULL, so check its return value and return an > error code. > > Signed-off-by: Kangjie Lu > --- > drivers/firmware/arm_scmi/driver.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/firmware/arm_scmi/driver.c >

Re: [PATCH v3] ASoC: sirf-audio: Remove redundant of_match_node call

2019-03-25 Thread Steven Price
On 22/03/2019 22:00, Aditya Pakki wrote: > Unlike other drivers probe method, of_match_node return value > is not used or checked. This patch removes the redundant code. > > Signed-off-by: Aditya Pakki Reviewed-by: Steven Price > > --- > v2: Move the signed by above t

Re: [PATCH v2] firmware: arm_scmi: Fix to replace of_match_device

2019-03-25 Thread Steven Price
On 22/03/2019 21:55, Aditya Pakki wrote: > of_match_device can return NULL if no matching device is found. > This patch replaces the function with of_device_get_match_data. > and returns -EINVAL in such a scenario. > > Signed-off-by: Aditya Pakki Reviewed-by: Steven Price

Re: [PATCH] ASoC: codecs: Fix to avoid potential NULL pointer dereferences

2019-03-22 Thread Steven Price
On 19/03/2019 00:58, Aditya Pakki wrote: > In sirf_audio_codec_driver_probe, of_match_node may fail and return a > NULL pointer. The patch avoids a potential NULL pointer dereference. Actually 'match' isn't used in this function... So there's no chance of a NULL dereference. You might as well

Re: [PATCH] firmware: arm_scmi: Fix to check return value of of_match_device

2019-03-22 Thread Steven Price
On 18/03/2019 23:04, Aditya Pakki wrote: > of_match_device can return NULL if no matching device is found. This patch > checks and returns -ENODEV in such a scenario. > > Signed-off-by: Aditya Pakki > --- > drivers/firmware/arm_scmi/driver.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff

Re: [PATCH] pci: pcie-xilinx: fix a missing-check bug for __get_free_pages

2019-03-22 Thread Steven Price
On 14/03/2019 05:58, Kangjie Lu wrote: > In case __get_free_pages fail, the fix returns to avoid NULL > pointer dereference. > > Signed-off-by: Kangjie Lu > --- > drivers/pci/controller/pcie-xilinx.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git

Re: [PATCH v5 10/19] mm: pagewalk: Add p4d_entry() and pgd_entry()

2019-03-22 Thread Steven Price
On 22/03/2019 10:29, Mike Rapoport wrote: > On Fri, Mar 22, 2019 at 10:11:59AM +0000, Steven Price wrote: >> On 21/03/2019 21:15, Mike Rapoport wrote: >>> On Thu, Mar 21, 2019 at 02:19:44PM +, Steven Price wrote: >>>> pgd_entry() and pud_entry() were remo

Re: [PATCH v5 10/19] mm: pagewalk: Add p4d_entry() and pgd_entry()

2019-03-22 Thread Steven Price
On 21/03/2019 21:15, Mike Rapoport wrote: > On Thu, Mar 21, 2019 at 02:19:44PM +0000, Steven Price wrote: >> pgd_entry() and pud_entry() were removed by commit 0b1fbfe50006c410 >> ("mm/pagewalk: remove pgd_entry() and pud_entry()") because there were >> no use

[PATCH v5 17/19] x86: mm: Convert ptdump_walk_pgd_level_debugfs() to take an mm_struct

2019-03-21 Thread Steven Price
To enable x86 to use the generic walk_page_range() function, the callers of ptdump_walk_pgd_level_debugfs() need to pass in the mm_struct. This means that ptdump_walk_pgd_level_core() is now always passed a valid pgd, so drop the support for pgd==NULL. Signed-off-by: Steven Price --- arch/x86

[PATCH v5 15/19] x86: mm: Point to struct seq_file from struct pg_state

2019-03-21 Thread Steven Price
-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 69 ++- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index e2b53db92c34..3d12ac031144 100644 --- a/arch/x86/mm/dump_pagetables.c +++ b/arch

[PATCH v5 18/19] x86: mm: Convert ptdump_walk_pgd_level_core() to take an mm_struct

2019-03-21 Thread Steven Price
page tables. This fake_mm structure is initialised with the minimum necessary for the generic page walk code. Signed-off-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 36 --- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/arch/x86/mm

[PATCH v5 19/19] x86: mm: Convert dump_pagetables to use walk_page_range

2019-03-21 Thread Steven Price
callbacks which can decide to skip an entire tree of entries Signed-off-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 280 ++ 1 file changed, 146 insertions(+), 134 deletions(-) diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index

[PATCH v5 16/19] x86: mm+efi: Convert ptdump_walk_pgd_level() to take a mm_struct

2019-03-21 Thread Steven Price
Signed-off-by: Steven Price --- arch/x86/include/asm/pgtable.h | 2 +- arch/x86/mm/dump_pagetables.c | 4 ++-- arch/x86/platform/efi/efi_32.c | 2 +- arch/x86/platform/efi/efi_64.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/i

[PATCH v5 10/19] mm: pagewalk: Add p4d_entry() and pgd_entry()

2019-03-21 Thread Steven Price
ll entries, not just transparent huge pages. Signed-off-by: Steven Price --- include/linux/mm.h | 9 ++--- mm/pagewalk.c | 27 --- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 76769749b5a5.

[PATCH v5 08/19] x86: mm: Add p?d_large() definitions

2019-03-21 Thread Steven Price
simply add #defines to prevent the generic versions (added in a later patch) from being picked up. We also need to add corresponding #undefs in dump_pagetables.c. This code will be removed when x86 is switched over to using the generic pagewalk code in a later patch. Signed-off-by: Steven Price

[PATCH v5 06/19] s390: mm: Add p?d_large() definitions

2019-03-21 Thread Steven Price
implemented as static inline functions. Add a #define so we don't pick up the generic version introduced in a later patch. CC: Martin Schwidefsky CC: Heiko Carstens CC: linux-s...@vger.kernel.org Signed-off-by: Steven Price --- arch/s390/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions

[PATCH v5 07/19] sparc: mm: Add p?d_large() definitions

2019-03-21 Thread Steven Price
provided, so add #defines to prevent the generic versions (added in a later patch) from being used. CC: "David S. Miller" CC: sparcli...@vger.kernel.org Signed-off-by: Steven Price Acked-by: David S. Miller --- arch/sparc/include/asm/pgtable_64.h | 2 ++ 1 file changed, 2 insertion

[PATCH v5 14/19] x86: mm: Don't display pages which aren't present in debugfs

2019-03-21 Thread Steven Price
' that the page table holes are at. Signed-off-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index ca270fb00805..e2b53db92c34 100644 --- a/arch/x86/mm

[PATCH v5 11/19] mm: pagewalk: Allow walking without vma

2019-03-21 Thread Steven Price
r. Remove the requirement to have a vma except when trying to split huge pages. Signed-off-by: Steven Price --- mm/pagewalk.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/mm/pagewalk.c b/mm/pagewalk.c index 98373a9f88b8..dac0c848b458 10064

[PATCH v5 09/19] mm: Add generic p?d_large() macros

2019-03-21 Thread Steven Price
. Signed-off-by: Steven Price --- include/asm-generic/pgtable.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index fa782fba51ee..9c5d0f73db67 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm

[PATCH v5 13/19] arm64: mm: Convert mm/dump.c to use walk_page_range()

2019-03-21 Thread Steven Price
Now walk_page_range() can walk kernel page tables, we can switch the arm64 ptdump code over to using it, simplifying the code. Signed-off-by: Steven Price --- arch/arm64/mm/dump.c | 117 ++- 1 file changed, 59 insertions(+), 58 deletions(-) diff --git

[PATCH v5 12/19] mm: pagewalk: Add test_p?d callbacks

2019-03-21 Thread Steven Price
It is useful to be able to skip parts of the page table tree even when walking without VMAs. Add test_p?d callbacks similar to test_walk but which are called just before a table at that level is walked. If the callback returns non-zero then the entire table is skipped. Signed-off-by: Steven Price

[PATCH v5 03/19] mips: mm: Add p?d_large() definitions

2019-03-21 Thread Steven Price
...@vger.kernel.org Signed-off-by: Steven Price Acked-by: Paul Burton --- arch/mips/include/asm/pgtable-64.h | 8 1 file changed, 8 insertions(+) diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h index 93a9dce31f25..42162877ac62 100644 --- a/arch/mips/include/asm

[PATCH v5 05/19] riscv: mm: Add p?d_large() definitions

2019-03-21 Thread Steven Price
or execute bit set on it. CC: Palmer Dabbelt CC: Albert Ou CC: linux-ri...@lists.infradead.org Signed-off-by: Steven Price --- arch/riscv/include/asm/pgtable-64.h | 7 +++ arch/riscv/include/asm/pgtable.h| 7 +++ 2 files changed, 14 insertions(+) diff --git a/arch/riscv/include/asm

[PATCH v5 02/19] arm64: mm: Add p?d_large() definitions

2019-03-21 Thread Steven Price
we can reuse for p?d_large(). CC: Catalin Marinas CC: Will Deacon Signed-off-by: Steven Price --- arch/arm64/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index de70c1eabf33..6eef345dbaf4 100644

[PATCH v5 00/19] Convert x86 & arm64 to use generic page walk

2019-03-21 Thread Steven Price
* Handle folded page tables at all levels, so depth from pte_hole() ignores folding at any level (see real_depth() function in mm/pagewalk.c) Steven Price (19): arc: mm: Add p?d_large() definitions arm64: mm: Add p?d_large() definitions mips: mm: Add p?d_large() definitions powerpc

Re: [PATCH 1/1] initrd: move initrd_start calculate within linear mapping range check

2019-03-13 Thread Steven Price
the desired effect. So you might want to add a Fixes tag. Otherwise FWIW: Reviewed-by: Steven Price Thanks, Steve > Signed-off-by: pierre Kuo > --- > arch/arm64/mm/init.c | 8 +++- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/arch/arm64/mm/init.c b

Re: [PATCH v4 04/19] powerpc: mm: Add p?d_large() definitions

2019-03-08 Thread Steven Price
On 08/03/2019 08:37, Mike Rapoport wrote: > On Wed, Mar 06, 2019 at 03:50:16PM +0000, Steven Price wrote: >> walk_page_range() is going to be allowed to walk page tables other than >> those of user space. For this it needs to know when it has reached a >> 'leaf' ent

[PATCH v4 07/19] sparc: mm: Add p?d_large() definitions

2019-03-06 Thread Steven Price
provided, so add #defines to prevent the generic versions (added in a later patch) from being used. CC: "David S. Miller" CC: sparcli...@vger.kernel.org Signed-off-by: Steven Price --- arch/sparc/include/asm/pgtable_64.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/spa

[PATCH v4 10/19] mm: pagewalk: Add p4d_entry() and pgd_entry()

2019-03-06 Thread Steven Price
ll entries, not just transparent huge pages. Signed-off-by: Steven Price --- include/linux/mm.h | 9 ++--- mm/pagewalk.c | 27 --- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 80bb6408fe73.

[PATCH v4 08/19] x86: mm: Add p?d_large() definitions

2019-03-06 Thread Steven Price
simply add #defines to prevent the generic versions (added in a later patch) from being picked up. We also need to add corresponding #undefs in dump_pagetables.c. This code will be removed when x86 is switched over to using the generic pagewalk code in a later patch. Signed-off-by: Steven Price

[PATCH v4 11/19] mm: pagewalk: Allow walking without vma

2019-03-06 Thread Steven Price
r. Remove the requirement to have a vma except when trying to split huge pages. Signed-off-by: Steven Price --- mm/pagewalk.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/mm/pagewalk.c b/mm/pagewalk.c index 98373a9f88b8..dac0c848b458 10064

[PATCH v4 12/19] mm: pagewalk: Add test_p?d callbacks

2019-03-06 Thread Steven Price
It is useful to be able to skip parts of the page table tree even when walking without VMAs. Add test_p?d callbacks similar to test_walk but which are called just before a table at that level is walked. If the callback returns non-zero then the entire table is skipped. Signed-off-by: Steven Price

[PATCH v4 18/19] x86: mm: Convert ptdump_walk_pgd_level_core() to take an mm_struct

2019-03-06 Thread Steven Price
page tables. This fake_mm structure is initialised with the minimum necessary for the generic page walk code. Signed-off-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 36 --- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/arch/x86/mm

[PATCH v4 13/19] arm64: mm: Convert mm/dump.c to use walk_page_range()

2019-03-06 Thread Steven Price
Now walk_page_range() can walk kernel page tables, we can switch the arm64 ptdump code over to using it, simplifying the code. Signed-off-by: Steven Price --- arch/arm64/mm/dump.c | 117 ++- 1 file changed, 59 insertions(+), 58 deletions(-) diff --git

[PATCH v4 16/19] x86: mm+efi: Convert ptdump_walk_pgd_level() to take a mm_struct

2019-03-06 Thread Steven Price
Signed-off-by: Steven Price --- arch/x86/include/asm/pgtable.h | 2 +- arch/x86/mm/dump_pagetables.c | 4 ++-- arch/x86/platform/efi/efi_32.c | 2 +- arch/x86/platform/efi/efi_64.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/i

[PATCH v4 19/19] x86: mm: Convert dump_pagetables to use walk_page_range

2019-03-06 Thread Steven Price
callbacks which can decide to skip an entire tree of entries Signed-off-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 282 ++ 1 file changed, 146 insertions(+), 136 deletions(-) diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index

[PATCH v4 09/19] mm: Add generic p?d_large() macros

2019-03-06 Thread Steven Price
. Signed-off-by: Steven Price --- include/asm-generic/pgtable.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 05e61e6c843f..f0de24100ac6 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm

[PATCH v4 17/19] x86: mm: Convert ptdump_walk_pgd_level_debugfs() to take an mm_struct

2019-03-06 Thread Steven Price
To enable x86 to use the generic walk_page_range() function, the callers of ptdump_walk_pgd_level_debugfs() need to pass in the mm_struct. This means that ptdump_walk_pgd_level_core() is now always passed a valid pgd, so drop the support for pgd==NULL. Signed-off-by: Steven Price --- arch/x86

[PATCH v4 15/19] x86: mm: Point to struct seq_file from struct pg_state

2019-03-06 Thread Steven Price
-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 69 ++- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index f9eb25dd3766..b448546277f4 100644 --- a/arch/x86/mm/dump_pagetables.c +++ b/arch

[PATCH v4 14/19] x86: mm: Don't display pages which aren't present in debugfs

2019-03-06 Thread Steven Price
' that the page table holes are at. Signed-off-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index cf37abc0f58a..f9eb25dd3766 100644 --- a/arch/x86/mm

<    1   2   3   4   5   6   7   >