diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/acpi/sleep.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/apm_32.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/early-quirks.c | 26 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 5 |
4 files changed, 32 insertions, 9 deletions
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c index 793ad2045f58..868de3d5c39d 100644 --- a/arch/x86/kernel/acpi/sleep.c +++ b/arch/x86/kernel/acpi/sleep.c | |||
@@ -158,6 +158,8 @@ static int __init acpi_sleep_setup(char *str) | |||
158 | acpi_realmode_flags |= 2; | 158 | acpi_realmode_flags |= 2; |
159 | if (strncmp(str, "s3_beep", 7) == 0) | 159 | if (strncmp(str, "s3_beep", 7) == 0) |
160 | acpi_realmode_flags |= 4; | 160 | acpi_realmode_flags |= 4; |
161 | if (strncmp(str, "old_ordering", 12) == 0) | ||
162 | acpi_old_suspend_ordering(); | ||
161 | str = strchr(str, ','); | 163 | str = strchr(str, ','); |
162 | if (str != NULL) | 164 | if (str != NULL) |
163 | str += strspn(str, ", \t"); | 165 | str += strspn(str, ", \t"); |
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c index 75cb5da4ea0a..bf9b441331e9 100644 --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c | |||
@@ -1213,9 +1213,9 @@ static int suspend(int vetoable) | |||
1213 | if (err != APM_SUCCESS) | 1213 | if (err != APM_SUCCESS) |
1214 | apm_error("suspend", err); | 1214 | apm_error("suspend", err); |
1215 | err = (err == APM_SUCCESS) ? 0 : -EIO; | 1215 | err = (err == APM_SUCCESS) ? 0 : -EIO; |
1216 | device_power_up(); | 1216 | device_power_up(PMSG_RESUME); |
1217 | local_irq_enable(); | 1217 | local_irq_enable(); |
1218 | device_resume(); | 1218 | device_resume(PMSG_RESUME); |
1219 | queue_event(APM_NORMAL_RESUME, NULL); | 1219 | queue_event(APM_NORMAL_RESUME, NULL); |
1220 | spin_lock(&user_list_lock); | 1220 | spin_lock(&user_list_lock); |
1221 | for (as = user_list; as != NULL; as = as->next) { | 1221 | for (as = user_list; as != NULL; as = as->next) { |
@@ -1240,7 +1240,7 @@ static void standby(void) | |||
1240 | apm_error("standby", err); | 1240 | apm_error("standby", err); |
1241 | 1241 | ||
1242 | local_irq_disable(); | 1242 | local_irq_disable(); |
1243 | device_power_up(); | 1243 | device_power_up(PMSG_RESUME); |
1244 | local_irq_enable(); | 1244 | local_irq_enable(); |
1245 | } | 1245 | } |
1246 | 1246 | ||
@@ -1326,7 +1326,7 @@ static void check_events(void) | |||
1326 | ignore_bounce = 1; | 1326 | ignore_bounce = 1; |
1327 | if ((event != APM_NORMAL_RESUME) | 1327 | if ((event != APM_NORMAL_RESUME) |
1328 | || (ignore_normal_resume == 0)) { | 1328 | || (ignore_normal_resume == 0)) { |
1329 | device_resume(); | 1329 | device_resume(PMSG_RESUME); |
1330 | queue_event(event, NULL); | 1330 | queue_event(event, NULL); |
1331 | } | 1331 | } |
1332 | ignore_normal_resume = 0; | 1332 | ignore_normal_resume = 0; |
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index a4665f37cfc5..a0e11c0cc872 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c | |||
@@ -120,7 +120,18 @@ static struct chipset early_qrk[] __initdata = { | |||
120 | {} | 120 | {} |
121 | }; | 121 | }; |
122 | 122 | ||
123 | static void __init check_dev_quirk(int num, int slot, int func) | 123 | /** |
124 | * check_dev_quirk - apply early quirks to a given PCI device | ||
125 | * @num: bus number | ||
126 | * @slot: slot number | ||
127 | * @func: PCI function | ||
128 | * | ||
129 | * Check the vendor & device ID against the early quirks table. | ||
130 | * | ||
131 | * If the device is single function, let early_quirks() know so we don't | ||
132 | * poke at this device again. | ||
133 | */ | ||
134 | static int __init check_dev_quirk(int num, int slot, int func) | ||
124 | { | 135 | { |
125 | u16 class; | 136 | u16 class; |
126 | u16 vendor; | 137 | u16 vendor; |
@@ -131,7 +142,7 @@ static void __init check_dev_quirk(int num, int slot, int func) | |||
131 | class = read_pci_config_16(num, slot, func, PCI_CLASS_DEVICE); | 142 | class = read_pci_config_16(num, slot, func, PCI_CLASS_DEVICE); |
132 | 143 | ||
133 | if (class == 0xffff) | 144 | if (class == 0xffff) |
134 | return; | 145 | return -1; /* no class, treat as single function */ |
135 | 146 | ||
136 | vendor = read_pci_config_16(num, slot, func, PCI_VENDOR_ID); | 147 | vendor = read_pci_config_16(num, slot, func, PCI_VENDOR_ID); |
137 | 148 | ||
@@ -154,7 +165,9 @@ static void __init check_dev_quirk(int num, int slot, int func) | |||
154 | type = read_pci_config_byte(num, slot, func, | 165 | type = read_pci_config_byte(num, slot, func, |
155 | PCI_HEADER_TYPE); | 166 | PCI_HEADER_TYPE); |
156 | if (!(type & 0x80)) | 167 | if (!(type & 0x80)) |
157 | return; | 168 | return -1; |
169 | |||
170 | return 0; | ||
158 | } | 171 | } |
159 | 172 | ||
160 | void __init early_quirks(void) | 173 | void __init early_quirks(void) |
@@ -167,6 +180,9 @@ void __init early_quirks(void) | |||
167 | /* Poor man's PCI discovery */ | 180 | /* Poor man's PCI discovery */ |
168 | for (num = 0; num < 32; num++) | 181 | for (num = 0; num < 32; num++) |
169 | for (slot = 0; slot < 32; slot++) | 182 | for (slot = 0; slot < 32; slot++) |
170 | for (func = 0; func < 8; func++) | 183 | for (func = 0; func < 8; func++) { |
171 | check_dev_quirk(num, slot, func); | 184 | /* Only probe function 0 on single fn devices */ |
185 | if (check_dev_quirk(num, slot, func)) | ||
186 | break; | ||
187 | } | ||
172 | } | 188 | } |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 36c540d4ac4b..531b55b8e81a 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -684,6 +684,11 @@ void __init setup_arch(char **cmdline_p) | |||
684 | clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); | 684 | clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); |
685 | } | 685 | } |
686 | 686 | ||
687 | #ifdef CONFIG_PCI | ||
688 | if (pci_early_dump_regs) | ||
689 | early_dump_pci_devices(); | ||
690 | #endif | ||
691 | |||
687 | finish_e820_parsing(); | 692 | finish_e820_parsing(); |
688 | 693 | ||
689 | #ifdef CONFIG_X86_32 | 694 | #ifdef CONFIG_X86_32 |