aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/boot
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2014-09-11 04:04:25 -0400
committerMatt Fleming <matt.fleming@intel.com>2014-09-24 07:46:59 -0400
commit56394ab8c26893bbaef02da04a06cc5ae71ccc5c (patch)
treec1d8de73c36f28fda3b642210b897c41ac028b8b /arch/x86/boot
parent84be880560fbbd0b6a6ef973bee85dbd4ca52198 (diff)
x86/efi: Delete misleading efi_printk() error message
A number of people are reporting seeing the "setup_efi_pci() failed!" error message in what used to be a quiet boot, https://bugzilla.kernel.org/show_bug.cgi?id=81891 The message isn't all that helpful because setup_efi_pci() can return a non-success error code for a variety of reasons, not all of them fatal. Let's drop the return code from setup_efi_pci*() altogether, since there's no way to process it in any meaningful way outside of the inner __setup_efi_pci*() functions. Reported-by: Darren Hart <dvhart@linux.intel.com> Reported-by: Josh Boyer <jwboyer@fedoraproject.org> Cc: Ulf Winkelvos <ulf@winkelvos.de> Cc: Andre Müller <andre.muller@web.de> Cc: Ingo Molnar <mingo@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'arch/x86/boot')
-rw-r--r--arch/x86/boot/compressed/eboot.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index b04f1e0e3fab..dc30c1732057 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -365,7 +365,7 @@ free_struct:
365 return status; 365 return status;
366} 366}
367 367
368static efi_status_t 368static void
369setup_efi_pci32(struct boot_params *params, void **pci_handle, 369setup_efi_pci32(struct boot_params *params, void **pci_handle,
370 unsigned long size) 370 unsigned long size)
371{ 371{
@@ -408,8 +408,6 @@ setup_efi_pci32(struct boot_params *params, void **pci_handle,
408 data = (struct setup_data *)rom; 408 data = (struct setup_data *)rom;
409 409
410 } 410 }
411
412 return status;
413} 411}
414 412
415static efi_status_t 413static efi_status_t
@@ -468,7 +466,7 @@ free_struct:
468 466
469} 467}
470 468
471static efi_status_t 469static void
472setup_efi_pci64(struct boot_params *params, void **pci_handle, 470setup_efi_pci64(struct boot_params *params, void **pci_handle,
473 unsigned long size) 471 unsigned long size)
474{ 472{
@@ -511,11 +509,18 @@ setup_efi_pci64(struct boot_params *params, void **pci_handle,
511 data = (struct setup_data *)rom; 509 data = (struct setup_data *)rom;
512 510
513 } 511 }
514
515 return status;
516} 512}
517 513
518static efi_status_t setup_efi_pci(struct boot_params *params) 514/*
515 * There's no way to return an informative status from this function,
516 * because any analysis (and printing of error messages) needs to be
517 * done directly at the EFI function call-site.
518 *
519 * For example, EFI_INVALID_PARAMETER could indicate a bug or maybe we
520 * just didn't find any PCI devices, but there's no way to tell outside
521 * the context of the call.
522 */
523static void setup_efi_pci(struct boot_params *params)
519{ 524{
520 efi_status_t status; 525 efi_status_t status;
521 void **pci_handle = NULL; 526 void **pci_handle = NULL;
@@ -532,7 +537,7 @@ static efi_status_t setup_efi_pci(struct boot_params *params)
532 size, (void **)&pci_handle); 537 size, (void **)&pci_handle);
533 538
534 if (status != EFI_SUCCESS) 539 if (status != EFI_SUCCESS)
535 return status; 540 return;
536 541
537 status = efi_call_early(locate_handle, 542 status = efi_call_early(locate_handle,
538 EFI_LOCATE_BY_PROTOCOL, &pci_proto, 543 EFI_LOCATE_BY_PROTOCOL, &pci_proto,
@@ -543,13 +548,12 @@ static efi_status_t setup_efi_pci(struct boot_params *params)
543 goto free_handle; 548 goto free_handle;
544 549
545 if (efi_early->is64) 550 if (efi_early->is64)
546 status = setup_efi_pci64(params, pci_handle, size); 551 setup_efi_pci64(params, pci_handle, size);
547 else 552 else
548 status = setup_efi_pci32(params, pci_handle, size); 553 setup_efi_pci32(params, pci_handle, size);
549 554
550free_handle: 555free_handle:
551 efi_call_early(free_pool, pci_handle); 556 efi_call_early(free_pool, pci_handle);
552 return status;
553} 557}
554 558
555static void 559static void
@@ -1385,10 +1389,7 @@ struct boot_params *efi_main(struct efi_config *c,
1385 1389
1386 setup_graphics(boot_params); 1390 setup_graphics(boot_params);
1387 1391
1388 status = setup_efi_pci(boot_params); 1392 setup_efi_pci(boot_params);
1389 if (status != EFI_SUCCESS) {
1390 efi_printk(sys_table, "setup_efi_pci() failed!\n");
1391 }
1392 1393
1393 status = efi_call_early(allocate_pool, EFI_LOADER_DATA, 1394 status = efi_call_early(allocate_pool, EFI_LOADER_DATA,
1394 sizeof(*gdt), (void **)&gdt); 1395 sizeof(*gdt), (void **)&gdt);