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
..
2014-06-04 22:50:41 +02:00
2013-02-01 10:00:22 +01:00
2015-11-11 08:35:45 +01:00
2013-02-01 10:00:22 +01:00
2013-02-01 10:00:22 +01:00
2015-09-03 12:08:02 +02:00
2015-09-03 12:08:02 +02:00
2016-02-17 13:47:19 +00:00
2015-09-03 12:08:02 +02:00
2015-11-11 08:36:57 +01:00
2016-01-27 20:51:50 +01:00
2015-06-21 21:53:30 +02:00
2016-04-03 12:32:09 +02:00
2015-04-08 01:09:49 +02:00
2014-03-26 23:09:21 +01:00
2015-06-21 21:52:44 +02:00
2015-03-31 11:59:40 +02:00
2016-04-03 12:32:09 +02:00
2015-04-08 01:09:49 +02:00
2016-04-03 12:32:09 +02:00
2014-08-26 02:18:58 +02:00
2015-04-17 15:50:54 -04:00
2015-04-01 17:22:01 +02:00
2016-04-03 12:32:09 +02:00
2015-11-11 08:37:31 +01:00
2015-03-31 11:59:40 +02:00
2015-06-21 21:53:59 +02:00
2015-09-03 12:08:02 +02:00
2015-11-11 08:35:47 +01:00
2015-04-01 17:21:50 +02:00
2015-03-31 11:59:40 +02:00
2016-01-24 02:53:28 +01:00
2015-09-03 12:08:02 +02:00
2015-02-17 15:37:21 +00:00
2015-03-31 11:59:40 +02:00
2016-01-20 00:39:20 +01:00
2015-09-03 12:08:02 +02:00
2015-04-08 01:09:49 +02:00
2014-11-24 07:44:56 +01:00
2015-07-14 21:47:34 +02:00
2015-03-31 11:59:40 +02:00
2014-11-24 22:47:31 +01:00
2015-03-31 11:59:40 +02:00
2015-11-11 08:38:44 +01:00
2015-04-01 17:22:07 +02:00
2015-09-16 15:47:51 +02:00
2016-04-03 12:32:09 +02:00
2016-04-03 12:32:09 +02:00
2016-04-03 12:32:09 +02:00
2013-02-01 10:00:22 +01:00
2016-04-03 12:32:09 +02:00
2013-02-01 10:00:22 +01:00
2013-02-01 10:00:22 +01:00
2015-06-21 21:54:21 +02:00
2015-11-11 08:36:36 +01:00
2014-07-30 21:46:19 +02:00
2014-01-22 20:19:02 +01:00
2010-08-05 13:26:02 +01:00
2015-04-10 15:41:43 +02:00
2014-03-31 18:17:12 +02:00
2015-04-13 16:01:37 +02:00
2014-01-13 23:40:56 +01:00
2015-09-03 12:07:40 +02:00
2015-11-15 09:10:53 -08:00
2016-01-12 20:46:56 +02:00
2015-10-26 09:49:41 +01:00
2015-06-21 21:54:30 +02:00
2015-06-21 21:53:30 +02:00
2015-04-08 23:52:32 +02:00
2014-11-24 22:47:31 +01:00
2015-02-17 15:37:37 +00:00
2013-02-20 18:24:24 +01:00
2011-05-10 18:15:24 +01:00
2015-03-25 13:48:00 +01:00
2016-01-24 03:29:58 +01:00
2015-11-05 11:15:41 +01:00
2015-09-03 12:07:52 +02:00
2016-03-13 23:55:13 -04:00
2013-12-04 17:19:44 +01:00
2014-11-24 07:45:37 +01:00
2015-11-11 08:36:41 +01:00
2014-05-27 11:06:42 +02:00
2015-05-13 10:55:42 +02:00
2013-02-01 10:00:22 +01:00
2015-11-12 11:35:47 +01:00
2015-02-17 15:37:21 +00:00
2014-10-23 19:58:13 +02:00
2016-01-20 00:39:20 +01:00
2016-03-29 23:56:36 +02:00
2015-08-26 15:23:03 +02:00
2016-01-20 00:39:20 +01:00
2015-10-26 09:49:42 +01:00
2012-10-16 22:20:03 +02:00
2010-10-29 19:08:31 +01:00
2014-01-22 20:43:10 +01:00
2016-01-20 17:09:18 -08:00
2013-02-01 10:00:22 +01:00
2013-01-24 13:20:09 +01:00
2015-05-28 15:31:53 +02:00
2016-02-11 11:38:22 +01:00
2012-10-09 09:47:14 +01:00
2014-08-26 02:18:56 +02:00
2012-03-28 18:30:02 +01:00
2014-05-24 00:07:01 +02:00
2013-02-01 10:00:22 +01:00
2014-11-07 15:07:36 +01:00
2016-01-24 01:35:46 +01:00
2016-02-01 23:36:38 +01:00
2014-10-24 02:38:33 +02:00
2015-02-17 15:37:23 +00:00
2015-02-20 13:30:55 +01:00
2013-02-01 10:00:22 +01:00
2015-06-21 21:52:28 +02:00
2015-11-09 15:11:24 -08:00
2014-11-24 07:45:02 +01:00
2015-06-25 17:00:35 -07:00
2011-07-26 16:49:47 -07:00
2015-06-21 21:54:29 +02:00
2014-11-12 21:17:27 +01:00
2013-05-09 17:55:20 +02:00
2016-01-24 01:44:21 +01:00
2014-11-24 07:44:52 +01:00
2015-09-03 12:07:38 +02:00
2016-01-22 01:58:49 +01:00
2013-02-01 10:00:22 +01:00
2013-02-01 10:00:22 +01:00
2013-02-01 10:00:22 +01:00
2015-08-03 11:34:15 +02:00
2015-10-04 16:31:13 +01:00
2015-09-03 12:08:05 +02:00
2012-12-13 16:46:47 +01:00
2015-06-21 21:54:10 +02:00
2013-02-01 10:00:22 +01:00
2013-02-01 10:00:22 +01:00
2016-01-24 12:50:56 -08:00
2014-05-30 21:01:11 +02:00
2015-09-03 12:07:39 +02:00
2015-02-17 15:37:24 +00:00
2013-02-01 10:00:22 +01:00
2015-09-27 14:15:26 +02:00
2013-02-01 10:00:22 +01:00
2013-05-08 01:19:07 +02:00
2014-05-24 00:07:01 +02:00
2016-04-03 12:32:09 +02:00
2015-11-11 08:35:17 +01:00
2016-04-03 12:32:09 +02:00
2014-05-28 16:20:22 +01:00
2011-10-20 15:00:18 +01:00
2016-01-24 03:20:46 +01:00
2015-02-16 10:55:26 +01:00
2015-02-12 12:30:29 +01:00
2015-02-17 15:37:17 +00:00
2015-09-03 12:07:40 +02:00
2013-02-01 10:00:22 +01:00
2014-06-02 16:34:41 +02:00
2014-11-24 07:45:36 +01:00
2016-01-23 00:28:57 +01:00
2016-03-07 10:40:02 -06:00
2011-03-14 21:07:26 +01:00
2013-11-15 09:32:18 +09:00
2015-06-21 21:53:42 +02:00
2015-04-01 17:21:59 +02:00
2016-01-15 17:56:32 -08:00
2016-05-19 19:12:14 -07:00
2014-05-28 16:20:31 +01:00
2014-05-29 15:08:23 +02:00
2016-02-04 01:24:40 +01:00
2015-06-21 21:54:14 +02:00
2015-09-03 12:08:05 +02:00
2012-08-17 10:57:28 +02:00
2015-04-10 15:41:46 +02:00
2014-08-02 00:06:38 +02:00
2013-02-01 10:00:22 +01:00
2014-01-22 20:19:02 +01:00
2015-04-17 09:04:10 -04:00
2013-10-29 21:24:36 +01:00
2015-01-13 16:04:28 +01:00
2016-04-03 12:32:09 +02:00
2013-02-01 10:00:22 +01:00
2014-06-26 10:48:18 +01:00
2015-09-03 12:07:56 +02:00
2013-02-03 18:33:02 -05:00
2014-07-30 20:47:39 +02:00
2016-02-25 10:56:58 +01:00
2015-08-03 09:25:12 +02:00
2013-02-01 10:00:22 +01:00
2012-10-09 09:47:14 +01:00
2014-07-30 21:46:19 +02:00
2013-02-01 10:00:22 +01:00
2015-09-03 12:08:01 +02:00
2015-02-17 15:37:20 +00:00
2016-02-01 23:36:38 +01:00
2013-07-01 15:10:48 +02:00
2011-06-15 14:35:33 +02:00
2013-02-01 10:00:22 +01:00
2015-09-03 12:08:05 +02:00
2016-02-01 23:27:08 +01:00
2012-10-09 09:47:14 +01:00
2015-09-03 12:08:05 +02:00
2015-09-03 12:07:38 +02:00
2014-05-30 18:21:30 +02:00
2014-01-22 20:18:59 +01:00
2015-09-03 12:07:45 +02:00
2011-12-07 22:01:45 +00:00
2015-05-27 15:22:15 +02:00
2013-02-01 10:00:22 +01:00
2015-06-21 21:52:50 +02:00
2013-02-01 10:00:22 +01:00
2014-11-24 22:47:31 +01:00
2016-04-03 12:32:09 +02:00
2014-11-24 22:47:31 +01:00
2014-06-04 16:54:14 -07:00
2015-09-03 12:08:05 +02:00
2015-11-11 08:36:41 +01:00
2013-09-18 17:13:58 +02:00
2015-08-26 15:23:40 +02:00
2013-02-01 10:00:22 +01:00