Andy Lutomirski 5ff3e2c3c3 x86/boot: Rework reserve_real_mode() to allow multiple tries
If reserve_real_mode() fails, panicing immediately means we're
doomed.  Make it safe to try more than once to allocate the
trampoline:

 - Degrade a failure from panic() to pr_info().  (If we make it to
   setup_real_mode() without reserving the trampoline, we'll panic
   them.)

 - Factor out helpers so that platform code can supply a specific
   address to try.

 - Warn if reserve_real_mode() is called after we're done with the
   memblock allocator.  If that were to happen, we would behave
   unpredictably.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mario Limonciello <mario_limonciello@dell.com>
Cc: Matt Fleming <mfleming@suse.de>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/876e383038f3e9971aa72fd20a4f5da05f9d193d.1470821230.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-08-11 11:15:01 +02:00
..
2016-07-25 13:41:01 +02:00
2016-07-27 11:35:37 -07:00
2015-07-31 10:23:23 +02:00
2014-12-11 11:35:02 +01:00
2015-04-14 16:49:06 -07:00
2015-05-28 15:31:53 +02:00
2012-03-28 18:11:12 +01:00
2016-01-20 11:39:14 +01:00
2014-03-04 21:47:51 +01:00
2015-10-21 11:17:32 +02:00
2015-04-24 15:36:55 +02:00
2015-09-08 14:35:59 -07:00
2012-06-25 13:48:30 +02:00
2016-01-12 12:17:28 +01:00
2015-07-31 13:31:10 +02:00
2014-02-27 08:07:39 -08:00
2015-12-19 11:53:40 +01:00
2016-03-15 08:56:16 -05:00
2014-09-01 10:15:31 +02:00
2016-07-12 19:25:38 -07:00
2016-08-04 13:52:21 +02:00
2015-05-19 15:47:30 +02:00
2016-01-30 11:22:17 +01:00
2016-07-27 11:35:37 -07:00
2016-07-23 11:04:23 -07:00
2016-06-16 00:04:31 +02:00
2015-07-31 13:31:10 +02:00
2016-06-16 00:04:31 +02:00
2016-07-23 11:04:23 -07:00
2015-05-19 15:47:30 +02:00