[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160406135659.29846d02@thinkpad>
Date: Wed, 6 Apr 2016 13:56:59 +0200
From: Gerald Schaefer <gerald.schaefer@...ibm.com>
To: Hugh Dickins <hughd@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Andres Lagar-Cavilla <andreslc@...gle.com>,
Yang Shi <yang.shi@...aro.org>, Ning Qu <quning@...il.com>,
Arnd Bergman <arnd@...db.de>,
Ralf Baechle <ralf@...ux-mips.org>,
Vineet Gupta <vgupta@...opsys.com>,
Russell King <linux@....linux.org.uk>,
Will Deacon <will.deacon@....com>,
Michael Ellerman <mpe@...erman.id.au>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
David Miller <davem@...emloft.net>,
Chris Metcalf <cmetcalf@...era.com>,
Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 10/10] arch: fix has_transparent_hugepage()
On Tue, 5 Apr 2016 14:02:49 -0700 (PDT)
Hugh Dickins <hughd@...gle.com> wrote:
> I've just discovered that the useful-sounding has_transparent_hugepage()
> is actually an architecture-dependent minefield: on some arches it only
> builds if CONFIG_TRANSPARENT_HUGEPAGE=y, on others it's also there when
> not, but on some of those (arm and arm64) it then gives the wrong answer;
> and on mips alone it's marked __init, which would crash if called later
> (but so far it has not been called later).
>
> Straighten this out: make it available to all configs, with a sensible
> default in asm-generic/pgtable.h, removing its definitions from those
> arches (arc, arm, arm64, sparc, tile) which are served by the default,
> adding #define has_transparent_hugepage has_transparent_hugepage to those
> (mips, powerpc, s390, x86) which need to override the default at runtime,
> and removing the __init from mips (but maybe that kind of code should be
> avoided after init: set a static variable the first time it's called).
>
> Signed-off-by: Hugh Dickins <hughd@...gle.com>
> ---
Acked-by: Gerald Schaefer <gerald.schaefer@...ibm.com> # for arch/s390 bits
Powered by blists - more mailing lists