Files
android_kernel_xiaomi_sm8450/arch/tile/include/asm
Hugh Dickins fd8cfd3000 arch: fix has_transparent_hugepage()
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@google.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Andres Lagar-Cavilla <andreslc@google.com>
Cc: Yang Shi <yang.shi@linaro.org>
Cc: Ning Qu <quning@gmail.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Vineet Gupta <vgupta@synopsys.com>		[arch/arc]
Acked-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>	[arch/s390]
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-05-19 19:12:14 -07:00
..
2016-01-12 20:46:58 +02:00
2014-04-18 14:20:45 +02:00
2014-04-18 14:20:45 +02:00
2014-04-18 14:20:45 +02:00
2015-07-30 12:32:16 -04:00
2014-01-23 16:36:54 -08:00
2013-11-13 20:21:46 +01:00
2013-09-03 14:53:29 -04:00
2015-04-17 12:58:44 -04:00
2014-08-26 13:45:54 -04:00
2015-10-06 14:52:48 -04:00
2013-08-30 11:55:53 -04:00
2012-05-25 12:48:25 -04:00
2013-09-03 14:51:26 -04:00
2012-07-24 15:27:32 +08:00
2013-08-30 11:55:53 -04:00
2014-08-26 13:45:54 -04:00
2013-08-13 16:26:21 -04:00
2013-09-13 11:15:24 -04:00
2016-05-19 19:12:14 -07:00
2013-08-12 14:46:18 -04:00
2015-04-17 12:58:44 -04:00
2015-05-11 11:22:40 -04:00
2015-08-08 10:29:21 +02:00
2015-07-30 12:32:16 -04:00
2012-03-28 18:30:03 +01:00
2013-08-13 16:26:05 -04:00
2013-02-14 09:21:15 -05:00
2014-10-02 13:56:07 -04:00