|
@@ -570,6 +570,21 @@ static bool __init early_alloc_p2m(unsigned long pfn)
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
+bool __init early_set_phys_to_machine(unsigned long pfn, unsigned long mfn)
|
|
|
+{
|
|
|
+ if (unlikely(!__set_phys_to_machine(pfn, mfn))) {
|
|
|
+ if (!early_alloc_p2m(pfn))
|
|
|
+ return false;
|
|
|
+
|
|
|
+ if (!early_alloc_p2m_middle(pfn, false /* boundary crossover OK!*/))
|
|
|
+ return false;
|
|
|
+
|
|
|
+ if (!__set_phys_to_machine(pfn, mfn))
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;
|
|
|
+}
|
|
|
unsigned long __init set_phys_range_identity(unsigned long pfn_s,
|
|
|
unsigned long pfn_e)
|
|
|
{
|