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>
This commit is contained in:
Matt Fleming 2014-09-11 09:04:25 +01:00
parent 84be880560
commit 56394ab8c2

View File

@ -365,7 +365,7 @@ free_struct:
return status; return status;
} }
static efi_status_t static void
setup_efi_pci32(struct boot_params *params, void **pci_handle, setup_efi_pci32(struct boot_params *params, void **pci_handle,
unsigned long size) unsigned long size)
{ {
@ -408,8 +408,6 @@ setup_efi_pci32(struct boot_params *params, void **pci_handle,
data = (struct setup_data *)rom; data = (struct setup_data *)rom;
} }
return status;
} }
static efi_status_t static efi_status_t
@ -468,7 +466,7 @@ free_struct:
} }
static efi_status_t static void
setup_efi_pci64(struct boot_params *params, void **pci_handle, setup_efi_pci64(struct boot_params *params, void **pci_handle,
unsigned long size) unsigned long size)
{ {
@ -511,11 +509,18 @@ setup_efi_pci64(struct boot_params *params, void **pci_handle,
data = (struct setup_data *)rom; data = (struct setup_data *)rom;
} }
return status;
} }
static efi_status_t setup_efi_pci(struct boot_params *params) /*
* There's no way to return an informative status from this function,
* because any analysis (and printing of error messages) needs to be
* done directly at the EFI function call-site.
*
* For example, EFI_INVALID_PARAMETER could indicate a bug or maybe we
* just didn't find any PCI devices, but there's no way to tell outside
* the context of the call.
*/
static void setup_efi_pci(struct boot_params *params)
{ {
efi_status_t status; efi_status_t status;
void **pci_handle = NULL; void **pci_handle = NULL;
@ -532,7 +537,7 @@ static efi_status_t setup_efi_pci(struct boot_params *params)
size, (void **)&pci_handle); size, (void **)&pci_handle);
if (status != EFI_SUCCESS) if (status != EFI_SUCCESS)
return status; return;
status = efi_call_early(locate_handle, status = efi_call_early(locate_handle,
EFI_LOCATE_BY_PROTOCOL, &pci_proto, EFI_LOCATE_BY_PROTOCOL, &pci_proto,
@ -543,13 +548,12 @@ static efi_status_t setup_efi_pci(struct boot_params *params)
goto free_handle; goto free_handle;
if (efi_early->is64) if (efi_early->is64)
status = setup_efi_pci64(params, pci_handle, size); setup_efi_pci64(params, pci_handle, size);
else else
status = setup_efi_pci32(params, pci_handle, size); setup_efi_pci32(params, pci_handle, size);
free_handle: free_handle:
efi_call_early(free_pool, pci_handle); efi_call_early(free_pool, pci_handle);
return status;
} }
static void static void
@ -1385,10 +1389,7 @@ struct boot_params *efi_main(struct efi_config *c,
setup_graphics(boot_params); setup_graphics(boot_params);
status = setup_efi_pci(boot_params); setup_efi_pci(boot_params);
if (status != EFI_SUCCESS) {
efi_printk(sys_table, "setup_efi_pci() failed!\n");
}
status = efi_call_early(allocate_pool, EFI_LOADER_DATA, status = efi_call_early(allocate_pool, EFI_LOADER_DATA,
sizeof(*gdt), (void **)&gdt); sizeof(*gdt), (void **)&gdt);