Re: [PATCH] powerpc: silence unused-but-set-variable warnings

2019-03-06 Thread Christophe Leroy
On 03/07/2019 03:48 AM, Qian Cai wrote: pte_unmap() compiles away on some powerpc platforms, so silence the warnings below by using the argument to pte_unmap() as a nop. Also, fix checkpatch.pl warnings "Single statement macros should not use a do {} while (0) loop". mm/memory.c: In function

Re: [PATCH v9 02/11] powerpc: prepare string/mem functions for KASAN

2019-03-06 Thread Christophe Leroy
Hi Daniel, On 03/04/2019 05:26 AM, Daniel Axtens wrote: Hi Christophe, diff --git a/arch/powerpc/include/asm/kasan.h b/arch/powerpc/include/asm/kasan.h new file mode 100644 index ..c3161b8fc017 --- /dev/null +++ b/arch/powerpc/include/asm/kasan.h @@ -0,0 +1,15 @@ +/* SPDX-License-Id

Re: [PATCH] Disable kcov for slb routines.

2019-03-06 Thread Satheesh Rajendran
On Mon, Mar 04, 2019 at 01:55:51PM +0530, Mahesh J Salgaonkar wrote: > From: Mahesh Salgaonkar > > The kcov instrumentation inside SLB routines causes duplicate SLB entries > to be added resulting into SLB multihit machine checks. > Disable kcov instrumentation on slb.o > > Signed-off-by: Mahesh

[PATCH] powerpc: silence unused-but-set-variable warnings

2019-03-06 Thread Qian Cai
pte_unmap() compiles away on some powerpc platforms, so silence the warnings below by using the argument to pte_unmap() as a nop. Also, fix checkpatch.pl warnings "Single statement macros should not use a do {} while (0) loop". mm/memory.c: In function 'copy_pte_range': mm/memory.c:820:24: warning

Re: [PATCH v9 02/11] powerpc: prepare string/mem functions for KASAN

2019-03-06 Thread Christophe Leroy
Le 04/03/2019 à 06:26, Daniel Axtens a écrit : Hi Christophe, diff --git a/arch/powerpc/include/asm/kasan.h b/arch/powerpc/include/asm/kasan.h new file mode 100644 index ..c3161b8fc017 --- /dev/null +++ b/arch/powerpc/include/asm/kasan.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifie

Re: [PATCH v5 4/4] hugetlb: allow to free gigantic pages regardless of the configuration

2019-03-06 Thread Dave Hansen
On 3/6/19 12:08 PM, Alex Ghiti wrote: >>> >>> +    /* >>> + * Gigantic pages allocation depends on the capability for large >>> page >>> + * range allocation. If the system cannot provide >>> alloc_contig_range, >>> + * allow users to free gigantic pages. >>> + */ >>> +    if (hstat

Re: [PATCH v5 4/4] hugetlb: allow to free gigantic pages regardless of the configuration

2019-03-06 Thread Alex Ghiti
On 3/6/19 2:16 PM, Dave Hansen wrote: On 3/6/19 11:00 AM, Alexandre Ghiti wrote: +static int set_max_huge_pages(struct hstate *h, unsigned long count, + nodemask_t *nodes_allowed) { unsigned long min_count, ret; - if (hstate_is_gigantic(h) && !gigantic_pa

Re: [PATCH v5 3/4] mm: Simplify MEMORY_ISOLATION && COMPACTION || CMA into CONTIG_ALLOC

2019-03-06 Thread Alex Ghiti
On 3/6/19 2:30 PM, Vlastimil Babka wrote: On 3/6/19 8:00 PM, Alexandre Ghiti wrote: This condition allows to define alloc_contig_range, so simplify it into a more accurate naming. Suggested-by: Vlastimil Babka Signed-off-by: Alexandre Ghiti Acked-by: Vlastimil Babka (you could have sent th

Re: [PATCH v5 2/4] sparc: Advertise gigantic page support

2019-03-06 Thread Alex Ghiti
On 3/6/19 2:04 PM, David Miller wrote: From: Alexandre Ghiti Date: Wed, 6 Mar 2019 14:00:03 -0500 sparc actually supports gigantic pages and selecting ARCH_HAS_GIGANTIC_PAGE allows it to allocate and free gigantic pages at runtime. sparc allows configuration such as huge pages of 16GB, pages

Re: [PATCH v5 3/4] mm: Simplify MEMORY_ISOLATION && COMPACTION || CMA into CONTIG_ALLOC

2019-03-06 Thread Vlastimil Babka
On 3/6/19 8:00 PM, Alexandre Ghiti wrote: > This condition allows to define alloc_contig_range, so simplify > it into a more accurate naming. > > Suggested-by: Vlastimil Babka > Signed-off-by: Alexandre Ghiti Acked-by: Vlastimil Babka (you could have sent this with my ack from v4 as there was

Re: [PATCH v5 4/4] hugetlb: allow to free gigantic pages regardless of the configuration

2019-03-06 Thread David Miller
From: Alexandre Ghiti Date: Wed, 6 Mar 2019 14:00:05 -0500 > On systems without CONTIG_ALLOC activated but that support gigantic pages, > boottime reserved gigantic pages can not be freed at all. This patch > simply enables the possibility to hand back those pages to memory > allocator. > > Sig

Re: [PATCH v5 4/4] hugetlb: allow to free gigantic pages regardless of the configuration

2019-03-06 Thread Dave Hansen
On 3/6/19 11:00 AM, Alexandre Ghiti wrote: > +static int set_max_huge_pages(struct hstate *h, unsigned long count, > + nodemask_t *nodes_allowed) > { > unsigned long min_count, ret; > > - if (hstate_is_gigantic(h) && !gigantic_page_supported()) > -

[PATCH v5 4/4] hugetlb: allow to free gigantic pages regardless of the configuration

2019-03-06 Thread Alexandre Ghiti
On systems without CONTIG_ALLOC activated but that support gigantic pages, boottime reserved gigantic pages can not be freed at all. This patch simply enables the possibility to hand back those pages to memory allocator. Signed-off-by: Alexandre Ghiti --- arch/arm64/Kconfig

Re: [PATCH v5 2/4] sparc: Advertise gigantic page support

2019-03-06 Thread David Miller
From: Alexandre Ghiti Date: Wed, 6 Mar 2019 14:00:03 -0500 > sparc actually supports gigantic pages and selecting > ARCH_HAS_GIGANTIC_PAGE allows it to allocate and free > gigantic pages at runtime. > > sparc allows configuration such as huge pages of 16GB, > pages of 8KB and MAX_ORDER = 13 (de

[PATCH v5 3/4] mm: Simplify MEMORY_ISOLATION && COMPACTION || CMA into CONTIG_ALLOC

2019-03-06 Thread Alexandre Ghiti
This condition allows to define alloc_contig_range, so simplify it into a more accurate naming. Suggested-by: Vlastimil Babka Signed-off-by: Alexandre Ghiti --- arch/arm64/Kconfig | 2 +- arch/powerpc/platforms/Kconfig.cputype | 2 +- arch/s390/Kconfig |

[PATCH v5 2/4] sparc: Advertise gigantic page support

2019-03-06 Thread Alexandre Ghiti
sparc actually supports gigantic pages and selecting ARCH_HAS_GIGANTIC_PAGE allows it to allocate and free gigantic pages at runtime. sparc allows configuration such as huge pages of 16GB, pages of 8KB and MAX_ORDER = 13 (default): HPAGE_SHIFT (34) - PAGE_SHIFT (13) = 21 >= MAX_ORDER (13) Signed-

[PATCH v5 1/4] sh: Advertise gigantic page support

2019-03-06 Thread Alexandre Ghiti
sh actually supports gigantic pages and selecting ARCH_HAS_GIGANTIC_PAGE allows it to allocate and free gigantic pages at runtime. At least sdk7786_defconfig exposes such a configuration with huge pages of 64MB, pages of 4KB and MAX_ORDER = 11: HPAGE_SHIFT (26) - PAGE_SHIFT (12) = 14 >= MAX_ORDER

[PATCH v5 0/4] Fix free/allocation of runtime gigantic pages

2019-03-06 Thread Alexandre Ghiti
This series fixes sh and sparc that did not advertise their gigantic page support and then were not able to allocate and free those pages at runtime. It renames MEMORY_ISOLATION && COMPACTION || CMA condition into the more accurate CONTIG_ALLOC, since it allows the definition of alloc_contig_range

Re: [PATCH] tools: testing: selftests: Remove duplicate headers

2019-03-06 Thread Souptick Joarder
On Mon, Mar 4, 2019 at 4:19 PM Souptick Joarder wrote: > > On Tue, Feb 26, 2019 at 10:59 AM Souptick Joarder > wrote: > > > > On Tue, Feb 26, 2019 at 7:18 AM Michael Ellerman > > wrote: > > > > > > Souptick Joarder writes: > > > > Remove duplicate headers which are included twice. > > > > > >

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

2019-03-06 Thread Steven Price
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' entry in the page tables. This information is provided by the p?d_large() functions/macros. For powerpc pmd_large() was already implemented, so hoist

Re: [PATCH 2/2] mm/dax: Don't enable huge dax mapping by default

2019-03-06 Thread Kirill A. Shutemov
On Wed, Mar 06, 2019 at 06:15:25PM +0530, Aneesh Kumar K.V wrote: > On 3/6/19 5:14 PM, Michal Suchánek wrote: > > On Wed, 06 Mar 2019 14:47:33 +0530 > > "Aneesh Kumar K.V" wrote: > > > > > Dan Williams writes: > > > > > > > On Thu, Feb 28, 2019 at 1:40 AM Oliver wrote: > > > > > > > > > > On

Re: [PATCH 2/2] mm/dax: Don't enable huge dax mapping by default

2019-03-06 Thread Aneesh Kumar K.V
On 3/6/19 5:14 PM, Michal Suchánek wrote: On Wed, 06 Mar 2019 14:47:33 +0530 "Aneesh Kumar K.V" wrote: Dan Williams writes: On Thu, Feb 28, 2019 at 1:40 AM Oliver wrote: On Thu, Feb 28, 2019 at 7:35 PM Aneesh Kumar K.V wrote: Also even if the user decided to not use THP, by echo "ne

Re: [PATCH 2/2] mm/dax: Don't enable huge dax mapping by default

2019-03-06 Thread Michal Suchánek
On Wed, 06 Mar 2019 14:47:33 +0530 "Aneesh Kumar K.V" wrote: > Dan Williams writes: > > > On Thu, Feb 28, 2019 at 1:40 AM Oliver wrote: > >> > >> On Thu, Feb 28, 2019 at 7:35 PM Aneesh Kumar K.V > >> wrote: > Also even if the user decided to not use THP, by > echo "never" > transparent_

[PATCH v2 7/7] LS1021A: dtsi: add ftm quad decoder entries

2019-03-06 Thread Patrick Havelange
Add the 4 Quadrature counters for this board. Signed-off-by: Patrick Havelange Reviewed-by: Esben Haabendal --- Changes v2 - None --- arch/arm/boot/dts/ls1021a.dtsi | 28 1 file changed, 28 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/

[PATCH v2 6/7] counter: ftm-quaddec: Documentation: Add specific counter sysfs documentation

2019-03-06 Thread Patrick Havelange
This adds documentation for the specific prescaler entry. Signed-off-by: Patrick Havelange --- Changes v2 - Add doc for prescaler entry --- .../ABI/testing/sysfs-bus-counter-ftm-quaddec| 16 1 file changed, 16 insertions(+) create mode 100644 Documentation/ABI/testing/sysf

[PATCH v2 5/7] counter: add FlexTimer Module Quadrature decoder counter driver

2019-03-06 Thread Patrick Havelange
This driver exposes the counter for the quadrature decoder of the FlexTimer Module, present in the LS1021A soc. Signed-off-by: Patrick Havelange --- Changes v2 - Rebased on new counter subsystem - Cleaned up included headers - Use devm_ioremap() - Correct order of devm_ and unmanaged resource

[PATCH v2 4/7] dt-bindings: counter: ftm-quaddec

2019-03-06 Thread Patrick Havelange
FlexTimer quadrature decoder driver. Signed-off-by: Patrick Havelange Reviewed-by: Esben Haabendal --- Changes v2 - None --- .../bindings/counter/ftm-quaddec.txt | 18 ++ 1 file changed, 18 insertions(+) create mode 100644 Documentation/devicetree/bindings/counte

[PATCH v2 3/7] drivers/clocksource: timer-fsl-ftm: use common header for FlexTimer #defines

2019-03-06 Thread Patrick Havelange
Common #defines have been moved to "linux/fsl/ftm.h". Thus making use of this file. Also FTM_SC_CLK_SHIFT has been renamed to FTM_SC_CLK_MASK_SHIFT. Signed-off-by: Patrick Havelange Reviewed-by: Esben Haabendal --- Changes v2 - None --- drivers/clocksource/timer-fsl-ftm.c | 15 ++--

[PATCH v2 2/7] drivers/pwm: pwm-fsl-ftm: use common header for FlexTimer #defines

2019-03-06 Thread Patrick Havelange
This also fixes the wrong value for the previously defined FTM_MODE_INIT macro (it was not used). Signed-off-by: Patrick Havelange Reviewed-by: Esben Haabendal --- Changes v2 - None --- drivers/pwm/pwm-fsl-ftm.c | 44 +-- 1 file changed, 1 insertion(+),

[PATCH v2 1/7] include/fsl: add common FlexTimer #defines in a separate header.

2019-03-06 Thread Patrick Havelange
Several files are/will be using the same #defines to use the Flextimer module. Regroup them in a common file. Signed-off-by: Patrick Havelange Reviewed-by: Esben Haabendal --- Changes v2 - Commit message --- include/linux/fsl/ftm.h | 88 + 1 file cha

[PATCH v2 0/7] FlexTimer Module Quadrature decoder counter

2019-03-06 Thread Patrick Havelange
This patch serie is to be applied on top of https://patchwork.kernel.org/project/linux-iio/list/?series=147 (a more recent version of the serie is available here : https://gitlab.com/vilhelmgray/iio/tree/generic_counter_v10 ) Main changes in v2: The code is a bit simpler, thanks to more use of

Re: [PATCH 2/2] mm/dax: Don't enable huge dax mapping by default

2019-03-06 Thread Aneesh Kumar K.V
Dan Williams writes: > On Thu, Feb 28, 2019 at 1:40 AM Oliver wrote: >> >> On Thu, Feb 28, 2019 at 7:35 PM Aneesh Kumar K.V >> wrote: >> > >> > Add a flag to indicate the ability to do huge page dax mapping. On >> > architecture >> > like ppc64, the hypervisor can disable huge page support in