Files
android_kernel_xiaomi_sm8450/arch/x86/include/asm
Yinghai Lu 8d57470d8f x86, mm: setup page table in top-down
Get pgt_buf early from BRK, and use it to map PMD_SIZE from top at first.
Then use mapped pages to map more ranges below, and keep looping until
all pages get mapped.

alloc_low_page will use page from BRK at first, after that buffer is used
up, will use memblock to find and reserve pages for page table usage.

Introduce min_pfn_mapped to make sure find new pages from mapped ranges,
that will be updated when lower pages get mapped.

Also add step_size to make sure that don't try to map too big range with
limited mapped pages initially, and increase the step_size when we have
more mapped pages on hand.

We don't need to call pagetable_reserve anymore, reserve work is done
in alloc_low_page() directly.

At last we can get rid of calculation and find early pgt related code.

-v2: update to after fix_xen change,
     also use MACRO for initial pgt_buf size and add comments with it.
-v3: skip big reserved range in memblock.reserved near end.
-v4: don't need fix_xen change now.
-v5: add changelog about moving about reserving pagetable to alloc_low_page.

Suggested-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/1353123563-3103-22-git-send-email-yinghai@kernel.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2012-11-17 11:59:19 -08:00
..
2011-12-05 17:17:24 +01:00
2009-01-29 14:16:51 +01:00
2011-08-29 13:44:12 -07:00
2012-03-28 18:11:12 +01:00
2012-03-28 18:11:12 +01:00
2012-09-19 17:26:08 +02:00
2012-05-08 14:08:44 +02:00
2012-07-20 16:18:58 -07:00
2012-03-28 18:11:12 +01:00
2012-03-28 18:11:12 +01:00
2011-02-14 12:08:28 +01:00
2011-05-02 17:24:48 +02:00
2012-03-28 18:11:12 +01:00
2010-02-16 21:22:26 -08:00
2011-04-18 09:26:48 -07:00
2012-03-20 21:48:30 +08:00
2009-08-27 00:35:56 +02:00
2010-10-26 16:52:08 -07:00
2012-06-25 13:48:30 +02:00
2011-02-23 22:27:52 +01:00
2012-10-03 21:33:53 +02:00
2009-06-13 15:37:30 +02:00
2011-07-22 14:39:50 +09:30
2011-05-24 14:33:35 +02:00
2010-06-09 11:12:36 +02:00
2012-03-28 18:11:12 +01:00
2012-01-26 21:23:53 +01:00
2010-05-07 17:13:04 -07:00
2012-07-05 21:12:11 +02:00
2010-11-01 15:38:34 -04:00
2009-02-02 23:27:09 +05:30
2011-03-15 15:34:15 -07:00
2010-02-12 09:42:39 -08:00
2011-03-18 10:39:30 +01:00
2011-08-29 13:44:12 -07:00
2012-02-20 12:52:05 -08:00
2009-06-15 12:40:02 +02:00
2009-01-31 00:19:32 +05:30
2012-03-28 18:11:12 +01:00
2011-03-23 19:47:18 -07:00
2012-03-28 18:11:12 +01:00
2011-06-05 21:30:32 +02:00
2012-09-21 17:18:44 -07:00