Re: [PATCH] memblock: stop using implicit alignement to SMP_CACHE_BYTES
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx>
- Subject: Re: [PATCH] memblock: stop using implicit alignement to SMP_CACHE_BYTES
- From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 5 Oct 2018 15:19:34 -0700
- Cc: linux-mm@xxxxxxxxx, Catalin Marinas <catalin.marinas@xxxxxxx>, Chris Zankel <chris@xxxxxxxxxx>, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>, Guan Xuetao <gxt@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Matt Turner <mattst88@xxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>, Michal Simek <monstr@xxxxxxxxx>, Paul Burton <paul.burton@xxxxxxxx>, Richard Weinberger <richard@xxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, linux-alpha@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-m68k@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-um@xxxxxxxxxxxxxxxxxxx
- In-reply-to: <1538687224-17535-1-git-send-email-rppt@linux.vnet.ibm.com>
- References: <1538687224-17535-1-git-send-email-rppt@linux.vnet.ibm.com>
On Fri, 5 Oct 2018 00:07:04 +0300 Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx> wrote:
> When a memblock allocation APIs are called with align = 0, the alignment is
> implicitly set to SMP_CACHE_BYTES.
>
> Replace all such uses of memblock APIs with the 'align' parameter explicitly
> set to SMP_CACHE_BYTES and stop implicit alignment assignment in the
> memblock internal allocation functions.
>
> For the case when memblock APIs are used via helper functions, e.g. like
> iommu_arena_new_node() in Alpha, the helper functions were detected with
> Coccinelle's help and then manually examined and updated where appropriate.
>
> ...
>
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -1298,9 +1298,6 @@ static phys_addr_t __init memblock_alloc_range_nid(phys_addr_t size,
> {
> phys_addr_t found;
>
> - if (!align)
> - align = SMP_CACHE_BYTES;
> -
Can we add a WARN_ON_ONCE(!align) here? To catch unconverted code
which sneaks in later on.
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]