From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geert Uytterhoeven Date: Wed, 01 Aug 2018 07:42:02 +0000 Subject: Re: [PATCH] sh: remove unneeded constructor. Message-Id: List-Id: References: <20180731051519.101249-1-ysato@users.sourceforge.jp> In-Reply-To: <20180731051519.101249-1-ysato@users.sourceforge.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Yoshinori Sato Cc: Rich Felker , Linux-sh list , Rob Landley , Matthew Wilcox , Linux-Arch Hi Sato-san, CC Rob , Willy, linux-arch On Tue, Jul 31, 2018 at 7:15 AM Yoshinori Sato wrote: > pgd_cache specifies __GFP_ZERO when allocating. > This constructor is meaningless. > > Signed-off-by: Yoshinori Sato Thanks for your patch! > --- a/arch/sh/mm/pgtable.c > +++ b/arch/sh/mm/pgtable.c > @@ -9,20 +9,11 @@ static struct kmem_cache *pgd_cachep; > static struct kmem_cache *pmd_cachep; > #endif > > -void pgd_ctor(void *x) > -{ > - pgd_t *pgd = x; > - > - memcpy(pgd + USER_PTRS_PER_PGD, > - swapper_pg_dir + USER_PTRS_PER_PGD, > - (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); > -} > - > void pgtable_cache_init(void) > { > pgd_cachep = kmem_cache_create("pgd_cache", > PTRS_PER_PGD * (1< - PAGE_SIZE, SLAB_PANIC, pgd_ctor); > + PAGE_SIZE, SLAB_PANIC, NULL); > #if PAGETABLE_LEVELS > 2 > pmd_cachep = kmem_cache_create("pmd_cache", > PTRS_PER_PMD * (1< Received: from mail-ua0-f196.google.com ([209.85.217.196]:37124 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387553AbeHAJ0g (ORCPT ); Wed, 1 Aug 2018 05:26:36 -0400 MIME-Version: 1.0 References: <20180731051519.101249-1-ysato@users.sourceforge.jp> In-Reply-To: <20180731051519.101249-1-ysato@users.sourceforge.jp> From: Geert Uytterhoeven Date: Wed, 1 Aug 2018 09:42:02 +0200 Message-ID: Subject: Re: [PATCH] sh: remove unneeded constructor. Content-Type: text/plain; charset="UTF-8" Sender: linux-arch-owner@vger.kernel.org List-ID: To: Yoshinori Sato Cc: Rich Felker , Linux-sh list , Rob Landley , Matthew Wilcox , Linux-Arch Hi Sato-san, CC Rob , Willy, linux-arch On Tue, Jul 31, 2018 at 7:15 AM Yoshinori Sato wrote: > pgd_cache specifies __GFP_ZERO when allocating. > This constructor is meaningless. > > Signed-off-by: Yoshinori Sato Thanks for your patch! > --- a/arch/sh/mm/pgtable.c > +++ b/arch/sh/mm/pgtable.c > @@ -9,20 +9,11 @@ static struct kmem_cache *pgd_cachep; > static struct kmem_cache *pmd_cachep; > #endif > > -void pgd_ctor(void *x) > -{ > - pgd_t *pgd = x; > - > - memcpy(pgd + USER_PTRS_PER_PGD, > - swapper_pg_dir + USER_PTRS_PER_PGD, > - (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); > -} > - > void pgtable_cache_init(void) > { > pgd_cachep = kmem_cache_create("pgd_cache", > PTRS_PER_PGD * (1< - PAGE_SIZE, SLAB_PANIC, pgd_ctor); > + PAGE_SIZE, SLAB_PANIC, NULL); > #if PAGETABLE_LEVELS > 2 > pmd_cachep = kmem_cache_create("pmd_cache", > PTRS_PER_PMD * (1<