History

Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull EFI fixes from Thomas Gleixner: "Two fixes for EFI/PAT: - a 32bit overflow bug in the PAT code which was unearthed by the large EFI mappings - prevent a boot hang on large systems when EFI mixed mode is enabled but not used" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/efi: Only map RAM into EFI page tables if in mixed-mode x86/mm/pat: Prevent hang during boot when mapping pages

Linus Torvalds committed 10 years ago

Commit 709b8f62 parents 4b8b0ff 7597cdc2 files · +12 −11Browse files

Unified · Split

2 files
  1. arch/x86/mm/pageattr.c +11 −10
  2. arch/x86/platform/efi/efi_64.c +1 −1
arch/x86/mm/pageattr.c+11−10
@@ -917,11 +917,11 @@ static void populate_pte(struct cpa_data *cpa, · 916 unmodified lines
917917 }
918918 }
919919
920−static int populate_pmd(struct cpa_data *cpa,
921− unsigned long start, unsigned long end,
922− unsigned num_pages, pud_t *pud, pgprot_t pgprot)
920+static long populate_pmd(struct cpa_data *cpa,
921+ unsigned long start, unsigned long end,
922+ unsigned num_pages, pud_t *pud, pgprot_t pgprot)
923923 {
924− unsigned int cur_pages = 0;
924+ long cur_pages = 0;
925925 pmd_t *pmd;
926926 pgprot_t pmd_pgprot;
927927
@@ -991,12 +991,12 @@ static int populate_pmd(struct cpa_data *cpa, · 63 unmodified lines
991991 return num_pages;
992992 }
993993
994−static int populate_pud(struct cpa_data *cpa, unsigned long start, pgd_t *pgd,
995− pgprot_t pgprot)
994+static long populate_pud(struct cpa_data *cpa, unsigned long start, pgd_t *pgd,
995+ pgprot_t pgprot)
996996 {
997997 pud_t *pud;
998998 unsigned long end;
999− int cur_pages = 0;
999+ long cur_pages = 0;
10001000 pgprot_t pud_pgprot;
10011001
10021002 end = start + (cpa->numpages << PAGE_SHIFT);
@@ -1052,7 +1052,7 @@ static int populate_pud(struct cpa_data *cpa, unsigned long start, pgd_t *pgd, · 49 unmodified lines
10521052
10531053 /* Map trailing leftover */
10541054 if (start < end) {
1055− int tmp;
1055+ long tmp;
10561056
10571057 pud = pud_offset(pgd, start);
10581058 if (pud_none(*pud))
@@ -1078,7 +1078,7 @@ static int populate_pgd(struct cpa_data *cpa, unsigned long addr) · 19 unmodified lines
10781078 pgprot_t pgprot = __pgprot(_KERNPG_TABLE);
10791079 pud_t *pud = NULL; /* shut up gcc */
10801080 pgd_t *pgd_entry;
1081− int ret;
1081+ long ret;
10821082
10831083 pgd_entry = cpa->pgd + pgd_index(addr);
10841084
@@ -1327,7 +1327,8 @@ static int cpa_process_alias(struct cpa_data *cpa) · 242 unmodified lines
13271327
13281328 static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias)
13291329 {
1330− int ret, numpages = cpa->numpages;
1330+ unsigned long numpages = cpa->numpages;
1331+ int ret;
13311332
13321333 while (numpages) {
13331334 /*
arch/x86/platform/efi/efi_64.c+1−1
@@ -245,7 +245,7 @@ int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages) · 244 unmodified lines
245245 * text and allocate a new stack because we can't rely on the
246246 * stack pointer being < 4GB.
247247 */
248− if (!IS_ENABLED(CONFIG_EFI_MIXED))
248+ if (!IS_ENABLED(CONFIG_EFI_MIXED) || efi_is_native())
249249 return 0;
250250
251251 /*