From: Mike Rapoport <rppt@linux•ibm.com>
To: Rob Herring <robh@kernel•org>
Cc: mhocko@suse•com, linux-sh@vger•kernel.org, linux-mm@kvack•org,
dalias@libc•org, Paul Mackerras <paulus@samba•org>,
sparclinux@vger•kernel.org, deanbo422@gmail•com,
jonas@southpole•se, linux-c6x-dev@linux-c6x•org,
ysato@users•sourceforge.jp, linux@armlinux•org.uk,
msalter@redhat•com, Arnd Bergmann <arnd@arndb•de>,
stefan.kristiansson@saunalahti•fi, openrisc@lists•librecores.org,
Greentime Hu <green.hu@gmail•com>,
shorne@gmail•com, gxt@pku•edu.cn,
linux-arm-kernel <linux-arm-kernel@lists•infradead.org>,
Michal Simek <monstr@monstr•eu>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Andrew Morton <akpm@linux-foundation•org>,
linuxppc-dev@lists•ozlabs.org, davem@davemloft•net
Subject: Re: [PATCH v2 6/6] arm, unicore32: remove early_alloc*() wrappers
Date: Mon, 3 Dec 2018 18:55:04 +0200 [thread overview]
Message-ID: <20181203165504.GC26700@rapoport-lnx> (raw)
In-Reply-To: <CABGGisySdgSma1bSF2Bk586Vf461o-U2f3w9UMgHJcVucQ0oFA@mail.gmail.com>
On Mon, Dec 03, 2018 at 10:27:02AM -0600, Rob Herring wrote:
> On Mon, Dec 3, 2018 at 9:48 AM Mike Rapoport <rppt@linux•ibm.com> wrote:
> >
> > On arm and unicore32i the early_alloc_aligned() and and early_alloc() are
> > oneliner wrappers for memblock_alloc.
> >
> > Replace their usage with direct call to memblock_alloc.
> >
> > Suggested-by: Christoph Hellwig <hch@infradead•org>
> > Signed-off-by: Mike Rapoport <rppt@linux•ibm.com>
> > ---
> > arch/arm/mm/mmu.c | 11 +++--------
> > arch/unicore32/mm/mmu.c | 12 ++++--------
> > 2 files changed, 7 insertions(+), 16 deletions(-)
> >
> > diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
> > index 0a04c9a5..57de0dd 100644
> > --- a/arch/arm/mm/mmu.c
> > +++ b/arch/arm/mm/mmu.c
> > @@ -719,14 +719,9 @@ EXPORT_SYMBOL(phys_mem_access_prot);
> >
> > #define vectors_base() (vectors_high() ? 0xffff0000 : 0)
> >
> > -static void __init *early_alloc_aligned(unsigned long sz, unsigned long align)
> > -{
> > - return memblock_alloc(sz, align);
> > -}
> > -
> > static void __init *early_alloc(unsigned long sz)
>
> Why not get rid of this wrapper like you do on unicore?
ARM has early_alloc() and late_alloc() callbacks which in the end are
passed as a parameter to alloc_init_pXd() functions.
Removing early_alloc() would require refactoring all the page table
allocation code.
> > {
> > - return early_alloc_aligned(sz, sz);
> > + return memblock_alloc(sz, sz);
> > }
>
--
Sincerely yours,
Mike.
prev parent reply other threads:[~2018-12-03 16:57 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-03 15:47 [PATCH v2 0/6] memblock: simplify several early memory allocation Mike Rapoport
2018-12-03 15:47 ` [PATCH v2 1/6] powerpc: prefer memblock APIs returning virtual address Mike Rapoport
2018-12-04 9:59 ` Michael Ellerman
2018-12-04 17:13 ` Mike Rapoport
2018-12-05 12:37 ` Michael Ellerman
2018-12-05 21:22 ` Mike Rapoport
2018-12-03 15:47 ` [PATCH v2 2/6] microblaze: prefer memblock API " Mike Rapoport
2018-12-05 15:29 ` Michal Simek
2018-12-06 7:31 ` Mike Rapoport
2018-12-03 15:47 ` [PATCH v2 3/6] sh: prefer memblock APIs " Mike Rapoport
2018-12-03 16:10 ` Sam Ravnborg
2018-12-03 16:28 ` Mike Rapoport
2018-12-03 15:47 ` [PATCH v2 4/6] openrisc: simplify pte_alloc_one_kernel() Mike Rapoport
2018-12-03 15:47 ` [PATCH v2 5/6] arch: simplify several early memory allocations Mike Rapoport
2018-12-03 16:29 ` Sam Ravnborg
2018-12-03 16:49 ` Mike Rapoport
2018-12-06 18:08 ` Sam Ravnborg
2018-12-06 21:30 ` Mike Rapoport
2018-12-03 15:47 ` [PATCH v2 6/6] arm, unicore32: remove early_alloc*() wrappers Mike Rapoport
2018-12-03 16:27 ` Rob Herring
2018-12-03 16:55 ` Mike Rapoport [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181203165504.GC26700@rapoport-lnx \
--to=rppt@linux$(echo .)ibm.com \
--cc=akpm@linux-foundation$(echo .)org \
--cc=arnd@arndb$(echo .)de \
--cc=dalias@libc$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=deanbo422@gmail$(echo .)com \
--cc=green.hu@gmail$(echo .)com \
--cc=gxt@pku$(echo .)edu.cn \
--cc=jonas@southpole$(echo .)se \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-c6x-dev@linux-c6x$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-mm@kvack$(echo .)org \
--cc=linux-sh@vger$(echo .)kernel.org \
--cc=linux@armlinux$(echo .)org.uk \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=mhocko@suse$(echo .)com \
--cc=monstr@monstr$(echo .)eu \
--cc=msalter@redhat$(echo .)com \
--cc=openrisc@lists$(echo .)librecores.org \
--cc=paulus@samba$(echo .)org \
--cc=robh@kernel$(echo .)org \
--cc=shorne@gmail$(echo .)com \
--cc=sparclinux@vger$(echo .)kernel.org \
--cc=stefan.kristiansson@saunalahti$(echo .)fi \
--cc=ysato@users$(echo .)sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox