Re: [PATCH V3 11/14] coresight: sink: Add TRBE driver

2021-02-11 Thread Anshuman Khandual
On 2/11/21 12:30 AM, Mathieu Poirier wrote: > On Wed, Jan 27, 2021 at 02:25:35PM +0530, Anshuman Khandual wrote: >> Trace Buffer Extension (TRBE) implements a trace buffer per CPU which is >> accessible via the system registers. The TRBE supports different addressing >>

Re: [PATCH V3 11/14] coresight: sink: Add TRBE driver

2021-02-11 Thread Anshuman Khandual
On 2/12/21 12:30 AM, Mathieu Poirier wrote: > On Wed, Jan 27, 2021 at 02:25:35PM +0530, Anshuman Khandual wrote: >> Trace Buffer Extension (TRBE) implements a trace buffer per CPU which is >> accessible via the system registers. The TRBE supports different addressing >>

Re: [PATCH V2 1/2] arm64/mm: Fix pfn_valid() for ZONE_DEVICE based memory

2021-02-11 Thread Anshuman Khandual
On 2/11/21 5:23 PM, Will Deacon wrote: > On Fri, Feb 05, 2021 at 06:55:53PM +, Will Deacon wrote: >> On Wed, Feb 03, 2021 at 09:20:39AM +0530, Anshuman Khandual wrote: >>> On 2/2/21 6:26 PM, David Hildenbrand wrote: >>>> On 02.02.21 13:51, Will Deacon wrote: &g

[PATCH 1/3] mm/page_alloc: Fix pageblock_order when HUGETLB_PAGE_ORDER >= MAX_ORDER

2021-02-10 Thread Anshuman Khandual
on certain platforms like arm64. Lets prevent the scenario by first checking HUGETLB_PAGE_ORDER against MAX_ORDER, before its assignment as pageblock_order. Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- mm/page_alloc.c | 2 +- 1 file

[PATCH 2/3] arm64/hugetlb: Enable HUGETLB_PAGE_SIZE_VARIABLE

2021-02-10 Thread Anshuman Khandual
Signed-off-by: Anshuman Khandual --- arch/arm64/Kconfig | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index f39568b28ec1..8e3a5578f663 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1909,6 +1909,10 @@ config ARCH_ENABLE_THP_MIGRATION

[PATCH 3/3] dma-contiguous: Type cast MAX_ORDER as unsigned int

2021-02-10 Thread Anshuman Khandual
guous.c:402:35: note: in expansion of macro ‘max’ phys_addr_t align = PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order); Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Cc: io...@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual

[PATCH 0/3] mm/page_alloc: Fix pageblock_order with HUGETLB_PAGE_SIZE_VARIABLE

2021-02-10 Thread Anshuman Khandual
d.org Cc: io...@lists.linux-foundation.org Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Changes in V1: - Rebased on 5.11-rc7 - Dropped the RFC Changes in RFC: https://lore.kernel.org/linux-mm/1612422084-30429-1-git-send-email-anshuman.khand...@arm.com/ Anshuman Khandual (3): mm/pag

Re: [PATCH V3 11/14] coresight: sink: Add TRBE driver

2021-02-09 Thread Anshuman Khandual
On 2/9/21 11:09 PM, Mathieu Poirier wrote: > On Fri, Feb 05, 2021 at 10:53:30AM -0700, Mathieu Poirier wrote: >> On Wed, Jan 27, 2021 at 02:25:35PM +0530, Anshuman Khandual wrote: >>> Trace Buffer Extension (TRBE) implements a trace buffer per CPU which is >>>

Re: [RFC 0/3] mm/page_alloc: Fix pageblock_order with HUGETLB_PAGE_SIZE_VARIABLE

2021-02-07 Thread Anshuman Khandual
On 2/4/21 12:31 PM, Anshuman Khandual wrote: > The following warning gets triggered while trying to boot a 64K page size > without THP config kernel on arm64 platform. > > WARNING: CPU: 5 PID: 124 at mm/vmstat.c:1080 __fragmentation_index+0xa4/0xc0 > Modules linked in: > CP

Re: [PATCH V3 11/14] coresight: sink: Add TRBE driver

2021-02-07 Thread Anshuman Khandual
On 2/5/21 11:23 PM, Mathieu Poirier wrote: > On Wed, Jan 27, 2021 at 02:25:35PM +0530, Anshuman Khandual wrote: >> Trace Buffer Extension (TRBE) implements a trace buffer per CPU which is >> accessible via the system registers. The TRBE supports different addressing >>

Re: [PATCH] mm/memtest: Add ARCH_USE_MEMTEST

2021-02-07 Thread Anshuman Khandual
On 2/5/21 2:50 PM, Vladimir Murzin wrote: > Hi Anshuman, > > On 2/5/21 4:10 AM, Anshuman Khandual wrote: >> early_memtest() does not get called from all architectures. Hence enabling >> CONFIG_MEMTEST and providing a valid memtest=[1..N] kernel command line >&g

Re: [PATCH] mm/memtest: Add ARCH_USE_MEMTEST

2021-02-07 Thread Anshuman Khandual
On 2/5/21 1:05 PM, Max Filippov wrote: > On Thu, Feb 4, 2021 at 8:10 PM Anshuman Khandual > wrote: >> >> early_memtest() does not get called from all architectures. Hence enabling >> CONFIG_MEMTEST and providing a valid memtest=[1..N] kernel command line >> optio

Re: [RFC 2/3] arm64/hugetlb: Enable HUGETLB_PAGE_SIZE_VARIABLE

2021-02-05 Thread Anshuman Khandual
On 2/5/21 1:50 PM, David Hildenbrand wrote: > On 04.02.21 08:01, Anshuman Khandual wrote: >> MAX_ORDER which invariably depends on FORCE_MAX_ZONEORDER can be a variable >> for a given page size, depending on whether TRANSPARENT_HUGEPAGE is enabled >> or not. In cert

[PATCH] mm/memtest: Add ARCH_USE_MEMTEST

2021-02-04 Thread Anshuman Khandual
-...@lists.ozlabs.org Cc: linux-xte...@linux-xtensa.org Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- This patch applies on v5.11-rc6 and has been tested on arm64 platform. But it has been just build tested on all other platforms. arch/arm/Kconfig

[RFC 3/3] dma-contiguous: Type cast MAX_ORDER as unsigned int

2021-02-03 Thread Anshuman Khandual
guous.c:402:35: note: in expansion of macro ‘max’ phys_addr_t align = PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order); Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Cc: io...@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual

[RFC 2/3] arm64/hugetlb: Enable HUGETLB_PAGE_SIZE_VARIABLE

2021-02-03 Thread Anshuman Khandual
Signed-off-by: Anshuman Khandual --- arch/arm64/Kconfig | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 175914f2f340..c4acf8230f20 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1918,6 +1918,10 @@ config ARCH_ENABLE_THP_MIGRATION

[RFC 1/3] mm/page_alloc: Fix pageblock_order when HUGETLB_PAGE_ORDER >= MAX_ORDER

2021-02-03 Thread Anshuman Khandual
on certain platforms like arm64. Lets prevent the scenario by first checking HUGETLB_PAGE_ORDER against MAX_ORDER, before its assignment as pageblock_order. Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- mm/page_alloc.c | 2 +- 1 file

[RFC 0/3] mm/page_alloc: Fix pageblock_order with HUGETLB_PAGE_SIZE_VARIABLE

2021-02-03 Thread Anshuman Khandual
rg Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Anshuman Khandual (3): mm/page_alloc: Fix pageblock_order when HUGETLB_PAGE_ORDER >= MAX_ORDER arm64/hugetlb: Enable HUGETLB_PAGE_SIZE_VARIABLE dma-contiguous: Type cast MAX_ORDER as unsigned int arch/arm64/Kconfig | 4 +

Re: [PATCH V2 1/2] arm64/mm: Fix pfn_valid() for ZONE_DEVICE based memory

2021-02-02 Thread Anshuman Khandual
t;>>>> On Tue, Feb 02, 2021 at 09:41:53AM +0530, Anshuman Khandual wrote: >>>>>> pfn_valid() validates a pfn but basically it checks for a valid struct >>>>>> page >>>>>> backing for that pfn. It should always return positiv

Re: [PATCH V3 11/14] coresight: sink: Add TRBE driver

2021-02-01 Thread Anshuman Khandual
On 1/29/21 3:53 PM, Suzuki K Poulose wrote: > Hi Anshuman > > On 1/27/21 8:55 AM, Anshuman Khandual wrote: >> Trace Buffer Extension (TRBE) implements a trace buffer per CPU which is >> accessible via the system registers. The TRBE supports different addressing >>

[PATCH V2 1/2] arm64/mm: Fix pfn_valid() for ZONE_DEVICE based memory

2021-02-01 Thread Anshuman Khandual
for normal hotplug memory as well. Cc: Catalin Marinas Cc: Will Deacon Cc: Ard Biesheuvel Cc: Robin Murphy Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Acked-by: David Hildenbrand Fixes: 73b20c84d42d ("arm64: mm: implement pte_devmap support") Signed-off-by

[PATCH V2 2/2] arm64/mm: Reorganize pfn_valid()

2021-02-01 Thread Anshuman Khandual
. This does not cause any functional change. Cc: Catalin Marinas Cc: Will Deacon Cc: Ard Biesheuvel Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/arm64/mm/init.c | 20 +++- 1 file changed, 15 insertions(+), 5

[PATCH V2 0/2] arm64/mm: Fix pfn_valid() for ZONE_DEVICE based memory

2021-02-01 Thread Anshuman Khandual
-20155-1-git-send-email-anshuman.khand...@arm.com/ - Test pfn_section_valid() for non boot memory Changes in RFC: https://lore.kernel.org/linux-arm-kernel/1608621144-4001-1-git-send-email-anshuman.khand...@arm.com/ Anshuman Khandual (2): arm64/mm: Fix pfn_valid() for ZONE_DEVICE based memory

Re: [PATCH 2/2] arm64/mm: Reorganize pfn_valid()

2021-01-31 Thread Anshuman Khandual
On 1/29/21 3:37 PM, David Hildenbrand wrote: > On 29.01.21 08:39, Anshuman Khandual wrote: >> There are multiple instances of pfn_to_section_nr() and __pfn_to_section() >> when CONFIG_SPARSEMEM is enabled. This can be just optimized if the memory >> section is fetched ear

[PATCH V5 1/4] mm/memory_hotplug: Prevalidate the address range being added with platform

2021-01-31 Thread Anshuman Khandual
Signed-off-by: Anshuman Khandual --- include/linux/memory_hotplug.h | 10 + mm/memory_hotplug.c| 78 +- mm/memremap.c | 6 ++- 3 files changed, 74 insertions(+), 20 deletions(-) diff --git a/include/linux/memory_hotplug.h b/include

[PATCH V5 4/4] virtio-mem: check against mhp_get_pluggable_range() which memory we can hotplug

2021-01-31 Thread Anshuman Khandual
, and in corner cases only some memory at the end of the device-managed memory region to not be pluggable. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Cc: Oscar Salvador Cc: Wei Yang Cc: Andrew Morton Cc: catalin.mari...@arm.com Cc: teawater Cc: Anshuman Khandual Cc: Pankaj

[PATCH V5 3/4] s390/mm: Define arch_get_mappable_range()

2021-01-31 Thread Anshuman Khandual
been called on the hotplug path. Cc: Heiko Carstens Cc: Vasily Gorbik Cc: David Hildenbrand Cc: linux-s...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Heiko Carstens Signed-off-by: Anshuman Khandual --- arch/s390/mm/init.c | 1 + arch/s390/mm/vmem.c | 14 +- 2 files

[PATCH V5 0/4] mm/memory_hotplug: Pre-validate the address range with platform

2021-01-31 Thread Anshuman Khandual
Gorbik Cc: Catalin Marinas Cc: Will Deacon Cc: Ard Biesheuvel Cc: Mark Rutland Cc: David Hildenbrand Cc: Andrew Morton Cc: linux-arm-ker...@lists.infradead.org Cc: linux-s...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Anshuman Khandual (3): mm/memory_hotplug: P

[PATCH V5 2/4] arm64/mm: Define arch_get_mappable_range()

2021-01-31 Thread Anshuman Khandual
() has already been called. Cc: Catalin Marinas Cc: Will Deacon Cc: Ard Biesheuvel Cc: Mark Rutland Cc: David Hildenbrand Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: David Hildenbrand Signed-off-by: Anshuman Khandual --- arch/arm64/mm/mmu.c | 15

[PATCH 2/2] arm64/mm: Reorganize pfn_valid()

2021-01-28 Thread Anshuman Khandual
replace the open coded pfn <--> addr conversion with __[pfn|phys]_to_[phys|pfn](). This does not cause any functional change. Cc: Catalin Marinas Cc: Will Deacon Cc: Ard Biesheuvel Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual ---

[PATCH 1/2] arm64/mm: Fix pfn_valid() for ZONE_DEVICE based memory

2021-01-28 Thread Anshuman Khandual
for normal hotplug memory as well. Cc: Catalin Marinas Cc: Will Deacon Cc: Ard Biesheuvel Cc: Robin Murphy Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Fixes: 73b20c84d42d ("arm64: mm: implement pte_devmap support") Signed-off-by: Anshuman Khandual --- arc

[PATCH 0/2] arm64/mm: Fix pfn_valid() for ZONE_DEVICE based memory

2021-01-28 Thread Anshuman Khandual
@vger.kernel.org Changes in V1: - Test pfn_section_valid() for non boot memory Changes in RFC: https://lore.kernel.org/linux-arm-kernel/1608621144-4001-1-git-send-email-anshuman.khand...@arm.com/ Anshuman Khandual (2): arm64/mm: Fix pfn_valid() for ZONE_DEVICE based memory arm64/mm: Reorganize pfn_valid

Re: [RFC 1/2] arm64/mm: Fix pfn_valid() for ZONE_DEVICE based memory

2021-01-27 Thread Anshuman Khandual
On 1/27/21 2:59 PM, David Hildenbrand wrote: > On 27.01.21 05:06, Anshuman Khandual wrote: >> >> >> On 1/25/21 2:43 PM, David Hildenbrand wrote: >>> On 25.01.21 07:22, Anshuman Khandual wrote: >>>> >>>> On 12/22/20 12:42

Re: [PATCH v1 2/2] mm: simplify free_highmem_page() and free_reserved_page()

2021-01-27 Thread Anshuman Khandual
ed_page(). > > Cc: Andrew Morton > Cc: Thomas Gleixner > Cc: "Peter Zijlstra (Intel)" > Cc: Mike Rapoport > Cc: Oscar Salvador > Cc: Michal Hocko > Cc: Wei Yang > Signed-off-by: David Hildenbrand Reviewed-by: Anshuman Khandual > --- > incl

Re: [PATCH v1 1/2] video: fbdev: acornfb: remove free_unused_pages()

2021-01-27 Thread Anshuman Khandual
ort > Cc: Oscar Salvador > Cc: Michal Hocko > Cc: Wei Yang > Cc: "Gustavo A. R. Silva" > Cc: Sam Ravnborg > Signed-off-by: David Hildenbrand There is no other reference for free_unused_pages() in the tree. Reviewed-by: Anshuman Khandual > --- > drivers/v

[PATCH V3 06/14] dts: bindings: Document device tree bindings for ETE

2021-01-27 Thread Anshuman Khandual
Leach Cc: Rob Herring Signed-off-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- Changes in V3: - Fixed all DT yaml semantics problems Documentation/devicetree/bindings/arm/ete.yaml | 74 ++ 1 file changed, 74 insertions(+) create mode 100644 Documentation

[PATCH V3 09/14] arm64: Add TRBE definitions

2021-01-27 Thread Anshuman Khandual
This adds TRBE related registers and corresponding feature macros. Cc: Mathieu Poirier Cc: Mike Leach Cc: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- Changes in V3: - ID_AA64DFR0_TRBE_SHIFT has been moved here from the TRBE driver - Changed TRBLIMITR_TRIG_MODE_SHIFT as 3 arch

[PATCH V3 10/14] arm64: nvhe: Allow TRBE access at EL1

2021-01-27 Thread Anshuman Khandual
From: Suzuki K Poulose When the kernel is booted at EL2 in a nvhe configuration, enable the TRBE access to the EL1. The EL1 still can't trace EL2, unless EL2 permits explicitly via TRFCR_EL2.E2TRE. Cc: Will Deacon Cc: Catalin Marinas Cc: Marc Zyngier Cc: Mark Rutland cc: Anshuman Khandual

[PATCH V3 08/14] coresight: core: Add support for dedicated percpu sinks

2021-01-27 Thread Anshuman Khandual
. But such connections are not present for certain percpu source and sink devices which are exclusively linked and dependent. Build the path directly and skip connection scanning for such devices. Cc: Mathieu Poirier Cc: Mike Leach Cc: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- Changes in V3

[PATCH V3 13/14] perf: aux: Add flags for the buffer format

2021-01-27 Thread Anshuman Khandual
Cc: w...@kernel.org Cc: mark.rutl...@arm.com Cc: mike.le...@linaro.org Cc: a...@kernel.org Cc: jo...@redhat.com Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- include/uapi/linux/perf_event.h | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git

[PATCH V3 14/14] coresight: etm-perf: Add support for trace buffer format

2021-01-27 Thread Anshuman Khandual
e TRBE sink driver. Cc: Peter Zijlstra Cc: Mike Leach Cc: Mathieu Poirier Cc: Leo Yan Cc: Anshuman Khandual Signed-off-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- drivers/hwtracing/coresight/coresight-trbe.c | 2 ++ include/uapi/linux/perf_event.h | 4 2 files

[PATCH V3 07/14] coresight: etm-perf: Handle stale output handles

2021-01-27 Thread Anshuman Khandual
ne of them supports an IRQ and is centrally handled by the etm-perf. Cc: Mathieu Poirier Cc: Anshuman Khandual Cc: Leo Yan Cc: Mike Leach Signed-off-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- drivers/hwtracing/coresight/coresight-etm-perf.c | 45 +--- 1 file chan

[PATCH V3 12/14] dts: bindings: Document device tree bindings for Arm TRBE

2021-01-27 Thread Anshuman Khandual
From: Suzuki K Poulose Document the device tree bindings for Trace Buffer Extension (TRBE). Cc: Anshuman Khandual Cc: Mathieu Poirier Cc: Rob Herring Cc: devicet...@vger.kernel.org Signed-off-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- Changes in V3: - Added missing

[PATCH V3 05/14] coresight: ete: Add support for ETE tracing

2021-01-27 Thread Anshuman Khandual
to it indicating TraceActive. Cc: Mathieu Poirier Cc: Mike Leach Signed-off-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- drivers/hwtracing/coresight/Kconfig| 10 ++-- drivers/hwtracing/coresight/coresight-etm4x-core.c | 56 +- .../hwtracing/coresight

[PATCH V3 11/14] coresight: sink: Add TRBE driver

2021-01-27 Thread Anshuman Khandual
is full. Overall implementation here is inspired from the Arm SPE driver. Cc: Mathieu Poirier Cc: Mike Leach Cc: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- Changes in V3: - Added new DT bindings document TRBE.yaml - Changed TRBLIMITR_TRIG_MODE_SHIFT from 2 to 3 - Dropped isb() from

[PATCH V3 00/14] arm64: coresight: Enable ETE and TRBE

2021-01-27 Thread Anshuman Khandual
ki K Poulose Cc: Mike Leach Cc: Linu Cherian Cc: coresi...@lists.linaro.org Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Anshuman Khandual (3): coresight: core: Add support for dedicated percpu sinks arm64: Add TRBE definitions coresight: sink: Add TRBE dr

[PATCH V3 02/14] coresight: Do not scan for graph if none is present

2021-01-27 Thread Anshuman Khandual
: Mathieu Poirier Cc: Mike Leach Signed-off-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- drivers/hwtracing/coresight/coresight-platform.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/hwtracing/coresight/coresight-platform.c b/drivers/hwtracing/coresight/coresight

[PATCH V3 01/14] coresight: etm-perf: Allow an event to use different sinks

2021-01-27 Thread Anshuman Khandual
, the event will only trace on the first detected sink. Cc: Mathieu Poirier Cc: Mike Leach Tested-by: Linu Cherian Signed-off-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- drivers/hwtracing/coresight/coresight-etm-perf.c | 48 +++- 1 file changed, 38 insertions

[PATCH V3 03/14] coresight: etm4x: Add support for PE OS lock

2021-01-27 Thread Anshuman Khandual
-by: Anshuman Khandual --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 50 ++ drivers/hwtracing/coresight/coresight-etm4x.h | 15 +++ 2 files changed, 56 insertions(+), 9 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers

[PATCH V3 04/14] coresight: ete: Add support for ETE sysreg access

2021-01-27 Thread Anshuman Khandual
: Mike Leach Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 32 + drivers/hwtracing/coresight/coresight-etm4x.h | 52 ++ 2 files changed, 75 insertions(+), 9

Re: [PATCH V4 4/4] virtio-mem: check against mhp_get_pluggable_range() which memory we can hotplug

2021-01-26 Thread Anshuman Khandual
On 1/25/21 5:31 PM, David Hildenbrand wrote: > On 25.01.21 03:58, Anshuman Khandual wrote: >> From: David Hildenbrand >> >> Right now, we only check against MAX_PHYSMEM_BITS - but turns out there >> are more restrictions of which memory we can actually hotplug, espe

Re: [RFC 1/2] arm64/mm: Fix pfn_valid() for ZONE_DEVICE based memory

2021-01-26 Thread Anshuman Khandual
On 1/25/21 1:01 PM, Mike Rapoport wrote: > On Mon, Jan 25, 2021 at 11:52:32AM +0530, Anshuman Khandual wrote: >> >> On 12/22/20 12:42 PM, Anshuman Khandual wrote: >>> pfn_valid() asserts that there is a memblock entry for a given pfn without >>> MEMBLOCK_

Re: [RFC 1/2] arm64/mm: Fix pfn_valid() for ZONE_DEVICE based memory

2021-01-26 Thread Anshuman Khandual
On 1/25/21 2:43 PM, David Hildenbrand wrote: > On 25.01.21 07:22, Anshuman Khandual wrote: >> >> On 12/22/20 12:42 PM, Anshuman Khandual wrote: >>> pfn_valid() asserts that there is a memblock entry for a given pfn without >>> MEMBLOCK_NOMAP flag being set. T

Re: [PATCH V4 0/4] mm/memory_hotplug: Pre-validate the address range with platform

2021-01-26 Thread Anshuman Khandual
On 1/25/21 2:55 PM, David Hildenbrand wrote: > On 25.01.21 03:58, Anshuman Khandual wrote: >> This series adds a mechanism allowing platforms to weigh in and prevalidate >> incoming address range before proceeding further with the memory hotplug. >> This helps prevent pote

Re: [PATCH] mm/memory_hotplug: Rename all existing 'memhp' into 'mhp'

2021-01-25 Thread Anshuman Khandual
On 1/25/21 1:56 PM, Greg Kroah-Hartman wrote: > On Mon, Jan 25, 2021 at 11:24:53AM +0530, Anshuman Khandual wrote: >> This renames all 'memhp' instances to 'mhp' except for memhp_default_state >> for being a kernel command line option. This is just a clean up and shou

Re: [RFC 1/2] arm64/mm: Fix pfn_valid() for ZONE_DEVICE based memory

2021-01-24 Thread Anshuman Khandual
On 12/22/20 12:42 PM, Anshuman Khandual wrote: > pfn_valid() asserts that there is a memblock entry for a given pfn without > MEMBLOCK_NOMAP flag being set. The problem with ZONE_DEVICE based memory is > that they do not have memblock entries. Hence memblock_is_map_memory() will >

[PATCH] mm/memory_hotplug: Rename all existing 'memhp' into 'mhp'

2021-01-24 Thread Anshuman Khandual
nux-kernel@vger.kernel.org Suggested-by: David Hildenbrand Signed-off-by: Anshuman Khandual --- During hotplug arch callback series, it was proposed to convert all the remaining 'memhp' into 'mhp' instead. https://lore.kernel.org/linux-mm/c37de2d0-28a1-4f7d-f944-cfd7d81c3...@redhat.com/ This applies on

[PATCH V4 3/4] s390/mm: Define arch_get_mappable_range()

2021-01-24 Thread Anshuman Khandual
been called on the hotplug path. Cc: Heiko Carstens Cc: Vasily Gorbik Cc: David Hildenbrand Cc: linux-s...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Heiko Carstens Signed-off-by: Anshuman Khandual --- arch/s390/mm/init.c | 1 + arch/s390/mm/vmem.c | 14 +- 2 files

[PATCH V4 4/4] virtio-mem: check against mhp_get_pluggable_range() which memory we can hotplug

2021-01-24 Thread Anshuman Khandual
, and in corner cases only some memory at the end of the device-managed memory region to not be pluggable. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Cc: Oscar Salvador Cc: Wei Yang Cc: Andrew Morton Cc: catalin.mari...@arm.com Cc: teawater Cc: Anshuman Khandual Cc: Pankaj

[PATCH V4 2/4] arm64/mm: Define arch_get_mappable_range()

2021-01-24 Thread Anshuman Khandual
() has already been called. Cc: Catalin Marinas Cc: Will Deacon Cc: Ard Biesheuvel Cc: Mark Rutland Cc: David Hildenbrand Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: David Hildenbrand Signed-off-by: Anshuman Khandual --- arch/arm64/mm/mmu.c | 15

[PATCH V4 1/4] mm/memory_hotplug: Prevalidate the address range being added with platform

2021-01-24 Thread Anshuman Khandual
in arch_add_memory() where applicable and check_hotplug_memory_addressable(), with unified mhp_range_allowed(). Cc: David Hildenbrand Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Oscar Salvador Suggested-by: David Hildenbrand Signed-off-by: Anshuman Khandual

[PATCH V4 0/4] mm/memory_hotplug: Pre-validate the address range with platform

2021-01-24 Thread Anshuman Khandual
arinas Cc: Will Deacon Cc: Ard Biesheuvel Cc: Mark Rutland Cc: David Hildenbrand Cc: Andrew Morton Cc: linux-arm-ker...@lists.infradead.org Cc: linux-s...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Anshuman Khandual (3): mm/memory_hotplug: Prevalidate the address r

Re: [PATCH V3 1/3] mm/memory_hotplug: Prevalidate the address range being added with platform

2021-01-22 Thread Anshuman Khandual
On 1/22/21 2:48 PM, David Hildenbrand wrote: > >> +/* >> + * Platforms should define arch_get_mappable_range() that provides >> + * maximum possible addressable physical memory range for which the >> + * linear mapping could be created. The platform returned address >> + * range must adhere to

Re: [PATCH V3 0/3] mm/memory_hotplug: Pre-validate the address range with platform

2021-01-21 Thread Anshuman Khandual
On 1/20/21 2:07 PM, Anshuman Khandual wrote: > > > On 1/19/21 7:10 PM, Oscar Salvador wrote: >> On Tue, Jan 19, 2021 at 02:33:03PM +0100, David Hildenbrand wrote: >>> Minor thing, we should make up our mind if we want to call stuff >>> internally "memhp_&q

Re: [PATCH RFC] virtio-mem: check against memhp_get_pluggable_range() which memory we can hotplug

2021-01-21 Thread Anshuman Khandual
On 1/21/21 3:27 PM, David Hildenbrand wrote: > On 18.01.21 14:21, Anshuman Khandual wrote: >> >> >> On 1/18/21 6:43 PM, Anshuman Khandual wrote: >>> From: David Hildenbrand >>> >>> Right now, we only check against MAX_PHYSMEM_BITS - but turns out

Re: [PATCH 1/1] arm64/sparsemem: reduce SECTION_SIZE_BITS

2021-01-21 Thread Anshuman Khandual
s bits in the !vmemmap case. Also section size needs to be multiple >> of 128MB to have PMD based vmemmap mapping with CONFIG_ARM64_4K_PAGES. >> >> Given these constraints, lets just reduce the section size to 128MB for 4K >> and 16K base page size configs, and to 512MB fo

[PATCH V3 1/2] mm/debug_vm_pgtable/basic: Add validation for dirtiness after write protect

2021-01-20 Thread Anshuman Khandual
-by: Catalin Marinas Signed-off-by: Anshuman Khandual --- Documentation/vm/arch_pgtable_helpers.rst | 8 ++--- mm/debug_vm_pgtable.c | 39 +++ 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/Documentation/vm/arch_pgtable_helpers.rst b/Documentation

[PATCH V3 2/2] mm/debug_vm_pgtable/basic: Iterate over entire protection_map[]

2021-01-20 Thread Anshuman Khandual
the mm_struct i.e __is_defined(__PAGETABLE_PMD_FOLDED). Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Tested-by: Gerald Schaefer [s390] Reviewed-by: Steven Price Suggested-by: Catalin Marinas Signed-off-by: Anshuman Khandual --- mm/debug_vm_pgtable.c | 47

Re: [PATCH V3 0/3] mm/memory_hotplug: Pre-validate the address range with platform

2021-01-20 Thread Anshuman Khandual
On 1/19/21 7:10 PM, Oscar Salvador wrote: > On Tue, Jan 19, 2021 at 02:33:03PM +0100, David Hildenbrand wrote: >> Minor thing, we should make up our mind if we want to call stuff >> internally "memhp_" or "mhp". I prefer the latter, because it is shorter. > > I would rather use the latter as

Re: [PATCH V3 1/3] mm/memory_hotplug: Prevalidate the address range being added with platform

2021-01-20 Thread Anshuman Khandual
On 1/19/21 5:51 PM, David Hildenbrand wrote: > On 18.01.21 14:12, Anshuman Khandual wrote: >> This introduces memhp_range_allowed() which can be called in various memory >> hotplug paths to prevalidate the address range which is being added, with >> the platform. The

Re: [PATCH V3 3/3] s390/mm: Define arch_get_mappable_range()

2021-01-20 Thread Anshuman Khandual
On 1/19/21 5:56 PM, David Hildenbrand wrote: > On 18.01.21 14:13, Anshuman Khandual wrote: >> This overrides arch_get_mappabble_range() on s390 platform which will be >> used with recently added generic framework. It modifies the existing range >> check in vme

Re: [PATCH RFC] virtio-mem: check against memhp_get_pluggable_range() which memory we can hotplug

2021-01-18 Thread Anshuman Khandual
On 1/18/21 6:43 PM, Anshuman Khandual wrote: > From: David Hildenbrand > > Right now, we only check against MAX_PHYSMEM_BITS - but turns out there > are more restrictions of which memory we can actually hotplug, especially > om arm64 or s390x once we support them: we might re

[PATCH V3 3/3] s390/mm: Define arch_get_mappable_range()

2021-01-18 Thread Anshuman Khandual
been called on the hotplug path. Cc: Heiko Carstens Cc: Vasily Gorbik Cc: David Hildenbrand Cc: linux-s...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Heiko Carstens Signed-off-by: Anshuman Khandual --- arch/s390/mm/init.c | 1 + arch/s390/mm/vmem.c | 15 ++- 2

[PATCH V3 0/3] mm/memory_hotplug: Pre-validate the address range with platform

2021-01-18 Thread Anshuman Khandual
-ker...@lists.infradead.org Cc: linux-s...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Anshuman Khandual (3): mm/memory_hotplug: Prevalidate the address range being added with platform arm64/mm: Define arch_get_mappable_range() s390/mm: Define arch_get_mappable_range() D

[PATCH RFC] virtio-mem: check against memhp_get_pluggable_range() which memory we can hotplug

2021-01-18 Thread Anshuman Khandual
, and in corner cases only some memory at the end of the device-managed memory region to not be pluggable. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Cc: Michal Hocko Cc: Oscar Salvador Cc: Wei Yang Cc: Andrew Morton Cc: catalin.mari...@arm.com Cc: teawater Cc: Anshuman Khandual

[PATCH V3 2/3] arm64/mm: Define arch_get_mappable_range()

2021-01-18 Thread Anshuman Khandual
() has already been called. Cc: Catalin Marinas Cc: Will Deacon Cc: Ard Biesheuvel Cc: Mark Rutland Cc: David Hildenbrand Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/arm64/mm/mmu.c | 15 +++ 1 file changed, 7

[PATCH V3 1/3] mm/memory_hotplug: Prevalidate the address range being added with platform

2021-01-18 Thread Anshuman Khandual
in arch_add_memory() where applicable and check_hotplug_memory_addressable(), with unified memhp_range_allowed(). Cc: David Hildenbrand Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Suggested-by: David Hildenbrand Signed-off-by: Anshuman Khandual --- include/linux

Re: [PATCH V2 10/11] coresight: sink: Add TRBE driver

2021-01-17 Thread Anshuman Khandual
On 1/15/21 6:13 PM, Suzuki K Poulose wrote: > On 1/15/21 5:29 AM, Anshuman Khandual wrote: >> >> >> On 1/13/21 8:58 PM, Suzuki K Poulose wrote: >>> Hi Anshuman, >>> >>> The driver looks overall good to me. Please find some minor comments be

Re: [PATCH V2 10/11] coresight: sink: Add TRBE driver

2021-01-14 Thread Anshuman Khandual
On 1/13/21 8:58 PM, Suzuki K Poulose wrote: > Hi Anshuman, > > The driver looks overall good to me. Please find some minor comments below > > On 1/13/21 4:18 AM, Anshuman Khandual wrote: >> Trace Buffer Extension (TRBE) implements a trace buffer per CPU which is >>

Re: [PATCH V2 08/11] coresight: core: Add support for dedicated percpu sinks

2021-01-14 Thread Anshuman Khandual
On 1/13/21 3:13 PM, Suzuki K Poulose wrote: > On 1/13/21 4:18 AM, Anshuman Khandual wrote: >> Add support for dedicated sinks that are bound to individual CPUs. (e.g, >> TRBE). To allow quicker access to the sink for a given CPU bound source, >> keep a percpu array of t

Re: [PATCH V2 07/11] arm64: Add TRBE definitions

2021-01-14 Thread Anshuman Khandual
On 1/13/21 2:51 PM, Suzuki K Poulose wrote: > On 1/13/21 4:18 AM, Anshuman Khandual wrote: >> This adds TRBE related registers and corresponding feature macros. >> >> Cc: Mathieu Poirier >> Cc: Mike Leach >> Cc: Suzuki K Poulose >> Signed-off-by: An

Re: [PATCH V2 3/3] s390/mm: Define arch_get_mappable_range()

2021-01-12 Thread Anshuman Khandual
On 1/11/21 4:10 PM, David Hildenbrand wrote: > On 17.12.20 16:28, Anshuman Khandual wrote: >> This overrides arch_get_mappabble_range() on s390 platform which will be >> used with recently added generic framework. It modifies the existing range >> check in vme

Re: [PATCH V2 1/3] mm/hotplug: Prevalidate the address range being added with platform

2021-01-12 Thread Anshuman Khandual
On 1/12/21 3:39 PM, David Hildenbrand wrote: > On 12.01.21 04:51, Anshuman Khandual wrote: >> >> >> On 1/11/21 7:13 PM, Oscar Salvador wrote: >>> On Mon, Jan 11, 2021 at 11:51:47AM +0100, David Hildenbrand wrote: >>>> AFAIKs, all memhp_get_pluggable_ra

[PATCH V2 08/11] coresight: core: Add support for dedicated percpu sinks

2021-01-12 Thread Anshuman Khandual
. But such connections are not present for certain percpu source and sink devices which are exclusively linked and dependent. Build the path directly and skip connection scanning for such devices. Cc: Mathieu Poirier Cc: Mike Leach Cc: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- drivers/hwtracing

[PATCH V2 09/11] coresight: etm-perf: Truncate the perf record if handle has no space

2021-01-12 Thread Anshuman Khandual
While starting off the etm event, just abort and truncate the perf record if the perf handle as no space left. This avoids configuring both source and sink devices in case the data cannot be consumed in perf. Cc: Mathieu Poirier Cc: Mike Leach Cc: Suzuki K Poulose Signed-off-by: Anshuman

[PATCH V2 10/11] coresight: sink: Add TRBE driver

2021-01-12 Thread Anshuman Khandual
is full. Overall implementation here is inspired from the Arm SPE driver. Cc: Mathieu Poirier Cc: Mike Leach Cc: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- Changes in V2: - Dropped irq from coresight sysfs documentation - Renamed get_trbe_limit() as compute_trbe_buffer_limit

[PATCH V2 11/11] dts: bindings: Document device tree bindings for Arm TRBE

2021-01-12 Thread Anshuman Khandual
From: Suzuki K Poulose Document the device tree bindings for Trace Buffer Extension (TRBE). Cc: Anshuman Khandual Cc: Mathieu Poirier Cc: Rob Herring Cc: devicet...@vger.kernel.org Signed-off-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- Documentation/devicetree/bindings/arm

[PATCH V2 06/11] dts: bindings: Document device tree bindings for ETE

2021-01-12 Thread Anshuman Khandual
Leach Cc: Rob Herring Signed-off-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- Documentation/devicetree/bindings/arm/ete.yaml | 71 ++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/ete.yaml diff --git

[PATCH V2 05/11] coresight: ete: Add support for ETE tracing

2021-01-12 Thread Anshuman Khandual
to it indicating TraceActive. Cc: Mathieu Poirier Cc: Mike Leach Signed-off-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- Changes in V2: - Update Kconfig title and description to include ETE - Filter out registers not implemented in ETE from sysfs drivers/hwtracing/coresight/Kconfig

[PATCH V2 07/11] arm64: Add TRBE definitions

2021-01-12 Thread Anshuman Khandual
This adds TRBE related registers and corresponding feature macros. Cc: Mathieu Poirier Cc: Mike Leach Cc: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- arch/arm64/include/asm/sysreg.h | 49 + 1 file changed, 49 insertions(+) diff --git a/arch

[PATCH V2 04/11] coresight: ete: Add support for ETE sysreg access

2021-01-12 Thread Anshuman Khandual
: Mike Leach Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 32 + drivers/hwtracing/coresight/coresight-etm4x.h | 52 ++ 2 files changed, 75 insertions(+), 9

[PATCH V2 02/11] coresight: Do not scan for graph if none is present

2021-01-12 Thread Anshuman Khandual
: Mathieu Poirier Cc: Mike Leach Signed-off-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- drivers/hwtracing/coresight/coresight-platform.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/hwtracing/coresight/coresight-platform.c b/drivers/hwtracing/coresight/coresight

[PATCH V2 03/11] coresight: etm4x: Add support for PE OS lock

2021-01-12 Thread Anshuman Khandual
-by: Anshuman Khandual --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 50 ++ drivers/hwtracing/coresight/coresight-etm4x.h | 15 +++ 2 files changed, 56 insertions(+), 9 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers

[PATCH V2 01/11] coresight: etm-perf: Allow an event to use different sinks

2021-01-12 Thread Anshuman Khandual
, the event will only trace on the first detected sink. Cc: Mathieu Poirier Cc: Mike Leach Tested-by: Linu Cherian Signed-off-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- drivers/hwtracing/coresight/coresight-etm-perf.c | 48 +++- 1 file changed, 38 insertions

[PATCH V2 00/11] arm64: coresight: Enable ETE and TRBE

2021-01-12 Thread Anshuman Khandual
lose Cc: Mike Leach Cc: Linu Cherian Cc: coresi...@lists.linaro.org Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Anshuman Khandual (4): arm64: Add TRBE definitions coresight: core: Add support for dedicated percpu sinks coresight: etm-perf: Truncate the perf re

Re: [PATCH RFC] virtio-mem: check against memhp_get_pluggable_range() which memory we can hotplug

2021-01-11 Thread Anshuman Khandual
> Cc: Oscar Salvador > Cc: Wei Yang > Cc: Andrew Morton > Cc: catalin.mari...@arm.com > Cc: teawater > Cc: Anshuman Khandual > Cc: Pankaj Gupta > Cc: Jonathan Cameron > Cc: h...@linux.ibm.com > Cc: Vasily Gorbik > Cc: Will Deacon > Cc: Ard Biesheuv

Re: [PATCH V2 1/3] mm/hotplug: Prevalidate the address range being added with platform

2021-01-11 Thread Anshuman Khandual
On 1/11/21 7:13 PM, Oscar Salvador wrote: > On Mon, Jan 11, 2021 at 11:51:47AM +0100, David Hildenbrand wrote: >> AFAIKs, all memhp_get_pluggable_range() users pass "1". >> >> What about the "add_pages()-only" path? > > I guess you refer to memremap_pages(), right? Right, via pagemap_range().

Re: [PATCH V2 1/3] mm/hotplug: Prevalidate the address range being added with platform

2021-01-11 Thread Anshuman Khandual
On 1/11/21 4:21 PM, David Hildenbrand wrote: > On 17.12.20 16:28, Anshuman Khandual wrote: >> This introduces memhp_range_allowed() which can be called in various memory >> hotplug paths to prevalidate the address range which is being added, with >> the platform. The

Re: [PATCH 1/1] arm64: reduce section size for sparsemem

2021-01-11 Thread Anshuman Khandual
by: Sudarshan Rajagopalan > Suggested-by: David Hildenbrand > Cc: Will Deacon > Cc: Anshuman Khandual > Cc: Mike Rapoport > Cc: Mark Rutland > Cc: Suren Baghdasaryan A nit. Please add all relevant mailing lists like LAKML, MM along with other developers here in the CC list,

Re: [PATCH 1/1] arm64: make section size configurable for memory hotplug

2021-01-11 Thread Anshuman Khandual
On 1/11/21 3:43 PM, David Hildenbrand wrote: > On 11.01.21 05:17, Anshuman Khandual wrote: >> >> >> On 1/8/21 9:00 PM, David Hildenbrand wrote: >>>> To summarize, the section size bits for each base page size config >>>> should always &

<    1   2   3   4   5   6   7   8   9   10   >