aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/mm/pat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index 070ee4a3b225..ffc88cc00fda 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -333,6 +333,9 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
333 req_type & _PAGE_CACHE_MASK); 333 req_type & _PAGE_CACHE_MASK);
334 } 334 }
335 335
336 if (new_type)
337 *new_type = actual_type;
338
336 /* 339 /*
337 * For legacy reasons, some parts of the physical address range in the 340 * For legacy reasons, some parts of the physical address range in the
338 * legacy 1MB region is treated as non-RAM (even when listed as RAM in 341 * legacy 1MB region is treated as non-RAM (even when listed as RAM in
@@ -356,9 +359,6 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
356 new->end = end; 359 new->end = end;
357 new->type = actual_type; 360 new->type = actual_type;
358 361
359 if (new_type)
360 *new_type = actual_type;
361
362 spin_lock(&memtype_lock); 362 spin_lock(&memtype_lock);
363 363
364 if (cached_entry && start >= cached_start) 364 if (cached_entry && start >= cached_start)