Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft

* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft:
ibft: Fix finding IBFT ACPI table on UEFI

+42 -26
+40 -2
drivers/firmware/iscsi_ibft.c
··· 746 746 ibft_cleanup(); 747 747 } 748 748 749 + #ifdef CONFIG_ACPI 750 + static const struct { 751 + char *sign; 752 + } ibft_signs[] = { 753 + /* 754 + * One spec says "IBFT", the other says "iBFT". We have to check 755 + * for both. 756 + */ 757 + { ACPI_SIG_IBFT }, 758 + { "iBFT" }, 759 + }; 760 + 761 + static void __init acpi_find_ibft_region(void) 762 + { 763 + int i; 764 + struct acpi_table_header *table = NULL; 765 + 766 + if (acpi_disabled) 767 + return; 768 + 769 + for (i = 0; i < ARRAY_SIZE(ibft_signs) && !ibft_addr; i++) { 770 + acpi_get_table(ibft_signs[i].sign, 0, &table); 771 + ibft_addr = (struct acpi_table_ibft *)table; 772 + } 773 + } 774 + #else 775 + static void __init acpi_find_ibft_region(void) 776 + { 777 + } 778 + #endif 779 + 749 780 /* 750 781 * ibft_init() - creates sysfs tree entries for the iBFT data. 751 782 */ ··· 784 753 { 785 754 int rc = 0; 786 755 756 + /* 757 + As on UEFI systems the setup_arch()/find_ibft_region() 758 + is called before ACPI tables are parsed and it only does 759 + legacy finding. 760 + */ 761 + if (!ibft_addr) 762 + acpi_find_ibft_region(); 763 + 787 764 if (ibft_addr) { 788 - printk(KERN_INFO "iBFT detected at 0x%llx.\n", 789 - (u64)isa_virt_to_bus(ibft_addr)); 765 + pr_info("iBFT detected.\n"); 790 766 791 767 rc = ibft_check_device(); 792 768 if (rc)
+2 -24
drivers/firmware/iscsi_ibft_find.c
··· 45 45 static const struct { 46 46 char *sign; 47 47 } ibft_signs[] = { 48 - #ifdef CONFIG_ACPI 49 - /* 50 - * One spec says "IBFT", the other says "iBFT". We have to check 51 - * for both. 52 - */ 53 - { ACPI_SIG_IBFT }, 54 - #endif 55 48 { "iBFT" }, 56 49 { "BIFT" }, /* Broadcom iSCSI Offload */ 57 50 }; ··· 54 61 #define IBFT_END 0x100000 /* 1MB */ 55 62 #define VGA_MEM 0xA0000 /* VGA buffer */ 56 63 #define VGA_SIZE 0x20000 /* 128kB */ 57 - 58 - #ifdef CONFIG_ACPI 59 - static int __init acpi_find_ibft(struct acpi_table_header *header) 60 - { 61 - ibft_addr = (struct acpi_table_ibft *)header; 62 - return 0; 63 - } 64 - #endif /* CONFIG_ACPI */ 65 64 66 65 static int __init find_ibft_in_mem(void) 67 66 { ··· 79 94 * the table cannot be valid. */ 80 95 if (pos + len <= (IBFT_END-1)) { 81 96 ibft_addr = (struct acpi_table_ibft *)virt; 97 + pr_info("iBFT found at 0x%lx.\n", pos); 82 98 goto done; 83 99 } 84 100 } ··· 94 108 */ 95 109 unsigned long __init find_ibft_region(unsigned long *sizep) 96 110 { 97 - #ifdef CONFIG_ACPI 98 - int i; 99 - #endif 100 111 ibft_addr = NULL; 101 - 102 - #ifdef CONFIG_ACPI 103 - for (i = 0; i < ARRAY_SIZE(ibft_signs) && !ibft_addr; i++) 104 - acpi_table_parse(ibft_signs[i].sign, acpi_find_ibft); 105 - #endif /* CONFIG_ACPI */ 106 112 107 113 /* iBFT 1.03 section 1.4.3.1 mandates that UEFI machines will 108 114 * only use ACPI for this */ 109 115 110 - if (!ibft_addr && !efi_enabled) 116 + if (!efi_enabled) 111 117 find_ibft_in_mem(); 112 118 113 119 if (ibft_addr) {