From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH] memblock: stop using implicit alignement to SMP_CACHE_BYTES Date: Fri, 5 Oct 2018 15:19:34 -0700 Message-ID: <20181005151934.87226fa92825c3002a475413@linux-foundation.org> References: <1538687224-17535-1-git-send-email-rppt@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1538687224-17535-1-git-send-email-rppt@linux.vnet.ibm.com> Sender: linux-kernel-owner@vger.kernel.org To: Mike Rapoport Cc: linux-mm@kvack.org, Catalin Marinas , Chris Zankel , Geert Uytterhoeven , Guan Xuetao , Ingo Molnar , Matt Turner , Michael Ellerman , Michal Hocko , Michal Simek , Paul Burton , Richard Weinberger , Russell King , Thomas Gleixner , Tony Luck , linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@vger.kernel.org, linux-mips@linux-mips.org, linuxppc-dev@lists.ozlabs.org, linux-um@lists.infradead.org List-Id: linux-m68k@vger.kernel.org On Fri, 5 Oct 2018 00:07:04 +0300 Mike Rapoport 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.