diff options
author | Steve French <sfrench@us.ibm.com> | 2005-11-01 12:02:10 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-11-01 12:02:10 -0500 |
commit | ef0eaa13362041f531f951b89362bfbc177e2bc0 (patch) | |
tree | e2d43099698aa238f9d108c67451871b0d4073f9 | |
parent | 53b2ec5518aa2623e8c0cb36f1c304a797988a46 (diff) | |
parent | df70b17f88a4d1d8545d3569a1f6d28c6004f9e4 (diff) |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
-rw-r--r-- | arch/i386/Kconfig | 5 | ||||
-rw-r--r-- | arch/i386/kernel/apic.c | 77 | ||||
-rw-r--r-- | arch/i386/kernel/i8259.c | 4 | ||||
-rw-r--r-- | arch/i386/kernel/io_apic.c | 6 | ||||
-rw-r--r-- | arch/i386/kernel/smpboot.c | 68 | ||||
-rw-r--r-- | arch/i386/kernel/time.c | 12 | ||||
-rw-r--r-- | drivers/input/keyboard/Kconfig | 4 | ||||
-rw-r--r-- | drivers/input/mouse/Kconfig | 2 | ||||
-rw-r--r-- | drivers/scsi/ide-scsi.c | 44 | ||||
-rw-r--r-- | drivers/usb/host/pci-quirks.c | 23 | ||||
-rw-r--r-- | fs/fs-writeback.c | 2 | ||||
-rw-r--r-- | fs/ntfs/file.c | 17 | ||||
-rw-r--r-- | include/asm-i386/apic.h | 3 | ||||
-rw-r--r-- | include/asm-i386/hw_irq.h | 1 | ||||
-rw-r--r-- | include/asm-i386/mach-default/smpboot_hooks.h | 15 | ||||
-rw-r--r-- | include/asm-i386/mach-visws/smpboot_hooks.h | 7 | ||||
-rw-r--r-- | include/sound/emu10k1.h | 1 | ||||
-rw-r--r-- | init/main.c | 11 | ||||
-rw-r--r-- | sound/pci/emu10k1/emu10k1_main.c | 39 |
19 files changed, 212 insertions, 129 deletions
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index 5383e5e2d9b7..bac0da731ee3 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -1042,8 +1042,3 @@ config X86_TRAMPOLINE | |||
1042 | bool | 1042 | bool |
1043 | depends on X86_SMP || (X86_VOYAGER && SMP) | 1043 | depends on X86_SMP || (X86_VOYAGER && SMP) |
1044 | default y | 1044 | default y |
1045 | |||
1046 | config PC | ||
1047 | bool | ||
1048 | depends on X86 && !EMBEDDED | ||
1049 | default y | ||
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 9204be6eedb3..7c724ffa08bb 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c | |||
@@ -803,7 +803,6 @@ no_apic: | |||
803 | 803 | ||
804 | void __init init_apic_mappings(void) | 804 | void __init init_apic_mappings(void) |
805 | { | 805 | { |
806 | unsigned int orig_apicid; | ||
807 | unsigned long apic_phys; | 806 | unsigned long apic_phys; |
808 | 807 | ||
809 | /* | 808 | /* |
@@ -825,11 +824,8 @@ void __init init_apic_mappings(void) | |||
825 | * Fetch the APIC ID of the BSP in case we have a | 824 | * Fetch the APIC ID of the BSP in case we have a |
826 | * default configuration (or the MP table is broken). | 825 | * default configuration (or the MP table is broken). |
827 | */ | 826 | */ |
828 | orig_apicid = boot_cpu_physical_apicid; | 827 | if (boot_cpu_physical_apicid == -1U) |
829 | boot_cpu_physical_apicid = GET_APIC_ID(apic_read(APIC_ID)); | 828 | boot_cpu_physical_apicid = GET_APIC_ID(apic_read(APIC_ID)); |
830 | if ((orig_apicid != -1U) && (orig_apicid != boot_cpu_physical_apicid)) | ||
831 | printk(KERN_WARNING "Boot APIC ID in local APIC unexpected (%d vs %d)", | ||
832 | orig_apicid, boot_cpu_physical_apicid); | ||
833 | 829 | ||
834 | #ifdef CONFIG_X86_IO_APIC | 830 | #ifdef CONFIG_X86_IO_APIC |
835 | { | 831 | { |
@@ -1259,81 +1255,40 @@ fastcall void smp_error_interrupt(struct pt_regs *regs) | |||
1259 | } | 1255 | } |
1260 | 1256 | ||
1261 | /* | 1257 | /* |
1262 | * This initializes the IO-APIC and APIC hardware. | 1258 | * This initializes the IO-APIC and APIC hardware if this is |
1259 | * a UP kernel. | ||
1263 | */ | 1260 | */ |
1264 | int __init APIC_init(void) | 1261 | int __init APIC_init_uniprocessor (void) |
1265 | { | 1262 | { |
1266 | if (enable_local_apic < 0) { | 1263 | if (enable_local_apic < 0) |
1267 | printk(KERN_INFO "APIC disabled\n"); | 1264 | clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability); |
1268 | return -1; | ||
1269 | } | ||
1270 | 1265 | ||
1271 | /* See if we have a SMP configuration or have forced enabled | 1266 | if (!smp_found_config && !cpu_has_apic) |
1272 | * the local apic. | ||
1273 | */ | ||
1274 | if (!smp_found_config && !acpi_lapic && !cpu_has_apic) { | ||
1275 | enable_local_apic = -1; | ||
1276 | return -1; | 1267 | return -1; |
1277 | } | ||
1278 | 1268 | ||
1279 | /* | 1269 | /* |
1280 | * Complain if the BIOS pretends there is an apic. | 1270 | * Complain if the BIOS pretends there is one. |
1281 | * Then get out because we don't have an a local apic. | ||
1282 | */ | 1271 | */ |
1283 | if (!cpu_has_apic && APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) { | 1272 | if (!cpu_has_apic && APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) { |
1284 | printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n", | 1273 | printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n", |
1285 | boot_cpu_physical_apicid); | 1274 | boot_cpu_physical_apicid); |
1286 | printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n"); | ||
1287 | enable_local_apic = -1; | ||
1288 | return -1; | 1275 | return -1; |
1289 | } | 1276 | } |
1290 | 1277 | ||
1291 | verify_local_APIC(); | 1278 | verify_local_APIC(); |
1292 | 1279 | ||
1293 | /* | ||
1294 | * Should not be necessary because the MP table should list the boot | ||
1295 | * CPU too, but we do it for the sake of robustness anyway. | ||
1296 | * Makes no sense to do this check in clustered apic mode, so skip it | ||
1297 | */ | ||
1298 | if (!check_phys_apicid_present(boot_cpu_physical_apicid)) { | ||
1299 | printk("weird, boot CPU (#%d) not listed by the BIOS.\n", | ||
1300 | boot_cpu_physical_apicid); | ||
1301 | physid_set(boot_cpu_physical_apicid, phys_cpu_present_map); | ||
1302 | } | ||
1303 | |||
1304 | /* | ||
1305 | * Switch from PIC to APIC mode. | ||
1306 | */ | ||
1307 | connect_bsp_APIC(); | 1280 | connect_bsp_APIC(); |
1308 | setup_local_APIC(); | ||
1309 | 1281 | ||
1310 | #ifdef CONFIG_X86_IO_APIC | 1282 | phys_cpu_present_map = physid_mask_of_physid(boot_cpu_physical_apicid); |
1311 | /* | ||
1312 | * Now start the IO-APICs | ||
1313 | */ | ||
1314 | if (smp_found_config && !skip_ioapic_setup && nr_ioapics) | ||
1315 | setup_IO_APIC(); | ||
1316 | #endif | ||
1317 | return 0; | ||
1318 | } | ||
1319 | 1283 | ||
1320 | void __init APIC_late_time_init(void) | 1284 | setup_local_APIC(); |
1321 | { | ||
1322 | /* Improve our loops per jiffy estimate */ | ||
1323 | loops_per_jiffy = ((1000 + HZ - 1)/HZ)*cpu_khz; | ||
1324 | boot_cpu_data.loops_per_jiffy = loops_per_jiffy; | ||
1325 | cpu_data[0].loops_per_jiffy = loops_per_jiffy; | ||
1326 | |||
1327 | /* setup_apic_nmi_watchdog doesn't work properly before cpu_khz is | ||
1328 | * initialized. So redo it here to ensure the boot cpu is setup | ||
1329 | * properly. | ||
1330 | */ | ||
1331 | if (nmi_watchdog == NMI_LOCAL_APIC) | ||
1332 | setup_apic_nmi_watchdog(); | ||
1333 | 1285 | ||
1334 | #ifdef CONFIG_X86_IO_APIC | 1286 | #ifdef CONFIG_X86_IO_APIC |
1335 | if (smp_found_config && !skip_ioapic_setup && nr_ioapics) | 1287 | if (smp_found_config) |
1336 | IO_APIC_late_time_init(); | 1288 | if (!skip_ioapic_setup && nr_ioapics) |
1289 | setup_IO_APIC(); | ||
1337 | #endif | 1290 | #endif |
1338 | setup_boot_APIC_clock(); | 1291 | setup_boot_APIC_clock(); |
1292 | |||
1293 | return 0; | ||
1339 | } | 1294 | } |
diff --git a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c index d86f24909284..323ef8ab3244 100644 --- a/arch/i386/kernel/i8259.c +++ b/arch/i386/kernel/i8259.c | |||
@@ -435,8 +435,4 @@ void __init init_IRQ(void) | |||
435 | setup_irq(FPU_IRQ, &fpu_irq); | 435 | setup_irq(FPU_IRQ, &fpu_irq); |
436 | 436 | ||
437 | irq_ctx_init(smp_processor_id()); | 437 | irq_ctx_init(smp_processor_id()); |
438 | |||
439 | #ifdef CONFIG_X86_LOCAL_APIC | ||
440 | APIC_init(); | ||
441 | #endif | ||
442 | } | 438 | } |
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 5a77c52b20a9..cc5d7ac5b2e7 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -2387,15 +2387,11 @@ void __init setup_IO_APIC(void) | |||
2387 | sync_Arb_IDs(); | 2387 | sync_Arb_IDs(); |
2388 | setup_IO_APIC_irqs(); | 2388 | setup_IO_APIC_irqs(); |
2389 | init_IO_APIC_traps(); | 2389 | init_IO_APIC_traps(); |
2390 | check_timer(); | ||
2390 | if (!acpi_ioapic) | 2391 | if (!acpi_ioapic) |
2391 | print_IO_APIC(); | 2392 | print_IO_APIC(); |
2392 | } | 2393 | } |
2393 | 2394 | ||
2394 | void __init IO_APIC_late_time_init(void) | ||
2395 | { | ||
2396 | check_timer(); | ||
2397 | } | ||
2398 | |||
2399 | /* | 2395 | /* |
2400 | * Called after all the initialization is done. If we didnt find any | 2396 | * Called after all the initialization is done. If we didnt find any |
2401 | * APIC bugs then we can allow the modify fast path | 2397 | * APIC bugs then we can allow the modify fast path |
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 5a2bbe0c4fff..01b618e73ecd 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -1078,16 +1078,6 @@ void *xquad_portio; | |||
1078 | EXPORT_SYMBOL(xquad_portio); | 1078 | EXPORT_SYMBOL(xquad_portio); |
1079 | #endif | 1079 | #endif |
1080 | 1080 | ||
1081 | /* | ||
1082 | * Fall back to non SMP mode after errors. | ||
1083 | * | ||
1084 | */ | ||
1085 | static __init void disable_smp(void) | ||
1086 | { | ||
1087 | cpu_set(0, cpu_sibling_map[0]); | ||
1088 | cpu_set(0, cpu_core_map[0]); | ||
1089 | } | ||
1090 | |||
1091 | static void __init smp_boot_cpus(unsigned int max_cpus) | 1081 | static void __init smp_boot_cpus(unsigned int max_cpus) |
1092 | { | 1082 | { |
1093 | int apicid, cpu, bit, kicked; | 1083 | int apicid, cpu, bit, kicked; |
@@ -1100,6 +1090,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus) | |||
1100 | printk("CPU%d: ", 0); | 1090 | printk("CPU%d: ", 0); |
1101 | print_cpu_info(&cpu_data[0]); | 1091 | print_cpu_info(&cpu_data[0]); |
1102 | 1092 | ||
1093 | boot_cpu_physical_apicid = GET_APIC_ID(apic_read(APIC_ID)); | ||
1103 | boot_cpu_logical_apicid = logical_smp_processor_id(); | 1094 | boot_cpu_logical_apicid = logical_smp_processor_id(); |
1104 | x86_cpu_to_apicid[0] = boot_cpu_physical_apicid; | 1095 | x86_cpu_to_apicid[0] = boot_cpu_physical_apicid; |
1105 | 1096 | ||
@@ -1111,27 +1102,68 @@ static void __init smp_boot_cpus(unsigned int max_cpus) | |||
1111 | cpus_clear(cpu_core_map[0]); | 1102 | cpus_clear(cpu_core_map[0]); |
1112 | cpu_set(0, cpu_core_map[0]); | 1103 | cpu_set(0, cpu_core_map[0]); |
1113 | 1104 | ||
1114 | map_cpu_to_logical_apicid(); | ||
1115 | |||
1116 | /* | 1105 | /* |
1117 | * If we couldn't find an SMP configuration at boot time, | 1106 | * If we couldn't find an SMP configuration at boot time, |
1118 | * get out of here now! | 1107 | * get out of here now! |
1119 | */ | 1108 | */ |
1120 | if (!smp_found_config && !acpi_lapic) { | 1109 | if (!smp_found_config && !acpi_lapic) { |
1121 | printk(KERN_NOTICE "SMP motherboard not detected.\n"); | 1110 | printk(KERN_NOTICE "SMP motherboard not detected.\n"); |
1122 | disable_smp(); | 1111 | smpboot_clear_io_apic_irqs(); |
1112 | phys_cpu_present_map = physid_mask_of_physid(0); | ||
1113 | if (APIC_init_uniprocessor()) | ||
1114 | printk(KERN_NOTICE "Local APIC not detected." | ||
1115 | " Using dummy APIC emulation.\n"); | ||
1116 | map_cpu_to_logical_apicid(); | ||
1117 | cpu_set(0, cpu_sibling_map[0]); | ||
1118 | cpu_set(0, cpu_core_map[0]); | ||
1119 | return; | ||
1120 | } | ||
1121 | |||
1122 | /* | ||
1123 | * Should not be necessary because the MP table should list the boot | ||
1124 | * CPU too, but we do it for the sake of robustness anyway. | ||
1125 | * Makes no sense to do this check in clustered apic mode, so skip it | ||
1126 | */ | ||
1127 | if (!check_phys_apicid_present(boot_cpu_physical_apicid)) { | ||
1128 | printk("weird, boot CPU (#%d) not listed by the BIOS.\n", | ||
1129 | boot_cpu_physical_apicid); | ||
1130 | physid_set(hard_smp_processor_id(), phys_cpu_present_map); | ||
1131 | } | ||
1132 | |||
1133 | /* | ||
1134 | * If we couldn't find a local APIC, then get out of here now! | ||
1135 | */ | ||
1136 | if (APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid]) && !cpu_has_apic) { | ||
1137 | printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n", | ||
1138 | boot_cpu_physical_apicid); | ||
1139 | printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n"); | ||
1140 | smpboot_clear_io_apic_irqs(); | ||
1141 | phys_cpu_present_map = physid_mask_of_physid(0); | ||
1142 | cpu_set(0, cpu_sibling_map[0]); | ||
1143 | cpu_set(0, cpu_core_map[0]); | ||
1123 | return; | 1144 | return; |
1124 | } | 1145 | } |
1125 | 1146 | ||
1147 | verify_local_APIC(); | ||
1148 | |||
1126 | /* | 1149 | /* |
1127 | * If SMP should be disabled, then really disable it! | 1150 | * If SMP should be disabled, then really disable it! |
1128 | */ | 1151 | */ |
1129 | if (!max_cpus || (enable_local_apic < 0)) { | 1152 | if (!max_cpus) { |
1130 | printk(KERN_INFO "SMP mode deactivated.\n"); | 1153 | smp_found_config = 0; |
1131 | disable_smp(); | 1154 | printk(KERN_INFO "SMP mode deactivated, forcing use of dummy APIC emulation.\n"); |
1155 | smpboot_clear_io_apic_irqs(); | ||
1156 | phys_cpu_present_map = physid_mask_of_physid(0); | ||
1157 | cpu_set(0, cpu_sibling_map[0]); | ||
1158 | cpu_set(0, cpu_core_map[0]); | ||
1132 | return; | 1159 | return; |
1133 | } | 1160 | } |
1134 | 1161 | ||
1162 | connect_bsp_APIC(); | ||
1163 | setup_local_APIC(); | ||
1164 | map_cpu_to_logical_apicid(); | ||
1165 | |||
1166 | |||
1135 | setup_portio_remap(); | 1167 | setup_portio_remap(); |
1136 | 1168 | ||
1137 | /* | 1169 | /* |
@@ -1212,6 +1244,10 @@ static void __init smp_boot_cpus(unsigned int max_cpus) | |||
1212 | cpu_set(0, cpu_sibling_map[0]); | 1244 | cpu_set(0, cpu_sibling_map[0]); |
1213 | cpu_set(0, cpu_core_map[0]); | 1245 | cpu_set(0, cpu_core_map[0]); |
1214 | 1246 | ||
1247 | smpboot_setup_io_apic(); | ||
1248 | |||
1249 | setup_boot_APIC_clock(); | ||
1250 | |||
1215 | /* | 1251 | /* |
1216 | * Synchronize the TSC with the AP | 1252 | * Synchronize the TSC with the AP |
1217 | */ | 1253 | */ |
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c index 07471bba2dc6..41c5b2dc6200 100644 --- a/arch/i386/kernel/time.c +++ b/arch/i386/kernel/time.c | |||
@@ -440,8 +440,8 @@ static int time_init_device(void) | |||
440 | 440 | ||
441 | device_initcall(time_init_device); | 441 | device_initcall(time_init_device); |
442 | 442 | ||
443 | extern void (*late_time_init)(void); | ||
444 | #ifdef CONFIG_HPET_TIMER | 443 | #ifdef CONFIG_HPET_TIMER |
444 | extern void (*late_time_init)(void); | ||
445 | /* Duplicate of time_init() below, with hpet_enable part added */ | 445 | /* Duplicate of time_init() below, with hpet_enable part added */ |
446 | static void __init hpet_time_init(void) | 446 | static void __init hpet_time_init(void) |
447 | { | 447 | { |
@@ -458,11 +458,6 @@ static void __init hpet_time_init(void) | |||
458 | printk(KERN_INFO "Using %s for high-res timesource\n",cur_timer->name); | 458 | printk(KERN_INFO "Using %s for high-res timesource\n",cur_timer->name); |
459 | 459 | ||
460 | time_init_hook(); | 460 | time_init_hook(); |
461 | |||
462 | #ifdef CONFIG_X86_LOCAL_APIC | ||
463 | if (enable_local_apic >= 0) | ||
464 | APIC_late_time_init(); | ||
465 | #endif | ||
466 | } | 461 | } |
467 | #endif | 462 | #endif |
468 | 463 | ||
@@ -487,9 +482,4 @@ void __init time_init(void) | |||
487 | printk(KERN_INFO "Using %s for high-res timesource\n",cur_timer->name); | 482 | printk(KERN_INFO "Using %s for high-res timesource\n",cur_timer->name); |
488 | 483 | ||
489 | time_init_hook(); | 484 | time_init_hook(); |
490 | |||
491 | #ifdef CONFIG_X86_LOCAL_APIC | ||
492 | if (enable_local_apic >= 0) | ||
493 | late_time_init = APIC_late_time_init; | ||
494 | #endif | ||
495 | } | 485 | } |
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 571a68691a4a..4a917748fd9f 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig | |||
@@ -13,11 +13,11 @@ menuconfig INPUT_KEYBOARD | |||
13 | if INPUT_KEYBOARD | 13 | if INPUT_KEYBOARD |
14 | 14 | ||
15 | config KEYBOARD_ATKBD | 15 | config KEYBOARD_ATKBD |
16 | tristate "AT keyboard" if !PC | 16 | tristate "AT keyboard" if !X86_PC |
17 | default y | 17 | default y |
18 | select SERIO | 18 | select SERIO |
19 | select SERIO_LIBPS2 | 19 | select SERIO_LIBPS2 |
20 | select SERIO_I8042 if PC | 20 | select SERIO_I8042 if X86_PC |
21 | select SERIO_GSCPS2 if GSC | 21 | select SERIO_GSCPS2 if GSC |
22 | help | 22 | help |
23 | Say Y here if you want to use a standard AT or PS/2 keyboard. Usually | 23 | Say Y here if you want to use a standard AT or PS/2 keyboard. Usually |
diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig index 537154dd7a87..574b18a523af 100644 --- a/drivers/input/mouse/Kconfig +++ b/drivers/input/mouse/Kconfig | |||
@@ -17,7 +17,7 @@ config MOUSE_PS2 | |||
17 | default y | 17 | default y |
18 | select SERIO | 18 | select SERIO |
19 | select SERIO_LIBPS2 | 19 | select SERIO_LIBPS2 |
20 | select SERIO_I8042 if PC | 20 | select SERIO_I8042 if X86_PC |
21 | select SERIO_GSCPS2 if GSC | 21 | select SERIO_GSCPS2 if GSC |
22 | ---help--- | 22 | ---help--- |
23 | Say Y here if you have a PS/2 mouse connected to your system. This | 23 | Say Y here if you have a PS/2 mouse connected to your system. This |
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 00d6a6657ebc..a440ea38efaa 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c | |||
@@ -180,12 +180,22 @@ static void idescsi_input_buffers (ide_drive_t *drive, idescsi_pc_t *pc, unsigne | |||
180 | return; | 180 | return; |
181 | } | 181 | } |
182 | count = min(pc->sg->length - pc->b_count, bcount); | 182 | count = min(pc->sg->length - pc->b_count, bcount); |
183 | buf = kmap_atomic(pc->sg->page, KM_IRQ0); | 183 | if (PageHighMem(pc->sg->page)) { |
184 | drive->hwif->atapi_input_bytes(drive, | 184 | unsigned long flags; |
185 | buf + pc->b_count + pc->sg->offset, count); | 185 | |
186 | kunmap_atomic(buf, KM_IRQ0); | 186 | local_irq_save(flags); |
187 | bcount -= count; | 187 | buf = kmap_atomic(pc->sg->page, KM_IRQ0) + |
188 | pc->b_count += count; | 188 | pc->sg->offset; |
189 | drive->hwif->atapi_input_bytes(drive, | ||
190 | buf + pc->b_count, count); | ||
191 | kunmap_atomic(buf - pc->sg->offset, KM_IRQ0); | ||
192 | local_irq_restore(flags); | ||
193 | } else { | ||
194 | buf = page_address(pc->sg->page) + pc->sg->offset; | ||
195 | drive->hwif->atapi_input_bytes(drive, | ||
196 | buf + pc->b_count, count); | ||
197 | } | ||
198 | bcount -= count; pc->b_count += count; | ||
189 | if (pc->b_count == pc->sg->length) { | 199 | if (pc->b_count == pc->sg->length) { |
190 | pc->sg++; | 200 | pc->sg++; |
191 | pc->b_count = 0; | 201 | pc->b_count = 0; |
@@ -205,12 +215,22 @@ static void idescsi_output_buffers (ide_drive_t *drive, idescsi_pc_t *pc, unsign | |||
205 | return; | 215 | return; |
206 | } | 216 | } |
207 | count = min(pc->sg->length - pc->b_count, bcount); | 217 | count = min(pc->sg->length - pc->b_count, bcount); |
208 | buf = kmap_atomic(pc->sg->page, KM_IRQ0); | 218 | if (PageHighMem(pc->sg->page)) { |
209 | drive->hwif->atapi_output_bytes(drive, | 219 | unsigned long flags; |
210 | buf + pc->b_count + pc->sg->offset, count); | 220 | |
211 | kunmap_atomic(buf, KM_IRQ0); | 221 | local_irq_save(flags); |
212 | bcount -= count; | 222 | buf = kmap_atomic(pc->sg->page, KM_IRQ0) + |
213 | pc->b_count += count; | 223 | pc->sg->offset; |
224 | drive->hwif->atapi_output_bytes(drive, | ||
225 | buf + pc->b_count, count); | ||
226 | kunmap_atomic(buf - pc->sg->offset, KM_IRQ0); | ||
227 | local_irq_restore(flags); | ||
228 | } else { | ||
229 | buf = page_address(pc->sg->page) + pc->sg->offset; | ||
230 | drive->hwif->atapi_output_bytes(drive, | ||
231 | buf + pc->b_count, count); | ||
232 | } | ||
233 | bcount -= count; pc->b_count += count; | ||
214 | if (pc->b_count == pc->sg->length) { | 234 | if (pc->b_count == pc->sg->length) { |
215 | pc->sg++; | 235 | pc->sg++; |
216 | pc->b_count = 0; | 236 | pc->b_count = 0; |
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index b7fd3f644e1e..b1aa350fd32f 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c | |||
@@ -138,11 +138,23 @@ reset_needed: | |||
138 | } | 138 | } |
139 | EXPORT_SYMBOL_GPL(uhci_check_and_reset_hc); | 139 | EXPORT_SYMBOL_GPL(uhci_check_and_reset_hc); |
140 | 140 | ||
141 | static inline int io_type_enabled(struct pci_dev *pdev, unsigned int mask) | ||
142 | { | ||
143 | u16 cmd; | ||
144 | return !pci_read_config_word(pdev, PCI_COMMAND, &cmd) && (cmd & mask); | ||
145 | } | ||
146 | |||
147 | #define pio_enabled(dev) io_type_enabled(dev, PCI_COMMAND_IO) | ||
148 | #define mmio_enabled(dev) io_type_enabled(dev, PCI_COMMAND_MEMORY) | ||
149 | |||
141 | static void __devinit quirk_usb_handoff_uhci(struct pci_dev *pdev) | 150 | static void __devinit quirk_usb_handoff_uhci(struct pci_dev *pdev) |
142 | { | 151 | { |
143 | unsigned long base = 0; | 152 | unsigned long base = 0; |
144 | int i; | 153 | int i; |
145 | 154 | ||
155 | if (!pio_enabled(pdev)) | ||
156 | return; | ||
157 | |||
146 | for (i = 0; i < PCI_ROM_RESOURCE; i++) | 158 | for (i = 0; i < PCI_ROM_RESOURCE; i++) |
147 | if ((pci_resource_flags(pdev, i) & IORESOURCE_IO)) { | 159 | if ((pci_resource_flags(pdev, i) & IORESOURCE_IO)) { |
148 | base = pci_resource_start(pdev, i); | 160 | base = pci_resource_start(pdev, i); |
@@ -153,12 +165,20 @@ static void __devinit quirk_usb_handoff_uhci(struct pci_dev *pdev) | |||
153 | uhci_check_and_reset_hc(pdev, base); | 165 | uhci_check_and_reset_hc(pdev, base); |
154 | } | 166 | } |
155 | 167 | ||
168 | static int __devinit mmio_resource_enabled(struct pci_dev *pdev, int idx) | ||
169 | { | ||
170 | return pci_resource_start(pdev, idx) && mmio_enabled(pdev); | ||
171 | } | ||
172 | |||
156 | static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) | 173 | static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) |
157 | { | 174 | { |
158 | void __iomem *base; | 175 | void __iomem *base; |
159 | int wait_time; | 176 | int wait_time; |
160 | u32 control; | 177 | u32 control; |
161 | 178 | ||
179 | if (!mmio_resource_enabled(pdev, 0)) | ||
180 | return; | ||
181 | |||
162 | base = ioremap_nocache(pci_resource_start(pdev, 0), | 182 | base = ioremap_nocache(pci_resource_start(pdev, 0), |
163 | pci_resource_len(pdev, 0)); | 183 | pci_resource_len(pdev, 0)); |
164 | if (base == NULL) return; | 184 | if (base == NULL) return; |
@@ -201,6 +221,9 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev) | |||
201 | u32 hcc_params, val, temp; | 221 | u32 hcc_params, val, temp; |
202 | u8 cap_length; | 222 | u8 cap_length; |
203 | 223 | ||
224 | if (!mmio_resource_enabled(pdev, 0)) | ||
225 | return; | ||
226 | |||
204 | base = ioremap_nocache(pci_resource_start(pdev, 0), | 227 | base = ioremap_nocache(pci_resource_start(pdev, 0), |
205 | pci_resource_len(pdev, 0)); | 228 | pci_resource_len(pdev, 0)); |
206 | if (base == NULL) return; | 229 | if (base == NULL) return; |
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index ffab4783ac64..c27f8d4098be 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c | |||
@@ -247,7 +247,7 @@ __writeback_single_inode(struct inode *inode, struct writeback_control *wbc) | |||
247 | wait_queue_head_t *wqh; | 247 | wait_queue_head_t *wqh; |
248 | 248 | ||
249 | if (!atomic_read(&inode->i_count)) | 249 | if (!atomic_read(&inode->i_count)) |
250 | WARN_ON(!(inode->i_state & I_WILL_FREE)); | 250 | WARN_ON(!(inode->i_state & (I_WILL_FREE|I_FREEING))); |
251 | else | 251 | else |
252 | WARN_ON(inode->i_state & I_WILL_FREE); | 252 | WARN_ON(inode->i_state & I_WILL_FREE); |
253 | 253 | ||
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c index cf3e6ced2d01..727533891813 100644 --- a/fs/ntfs/file.c +++ b/fs/ntfs/file.c | |||
@@ -668,10 +668,10 @@ map_buffer_cached: | |||
668 | * to, we need to read it in before the write, | 668 | * to, we need to read it in before the write, |
669 | * i.e. now. | 669 | * i.e. now. |
670 | */ | 670 | */ |
671 | if (!buffer_uptodate(bh) && ((bh_pos < pos && | 671 | if (!buffer_uptodate(bh) && bh_pos < end && |
672 | bh_end > pos) || | 672 | bh_end > pos && |
673 | (bh_end > end && | 673 | (bh_pos < pos || |
674 | bh_end > end))) { | 674 | bh_end > end)) { |
675 | /* | 675 | /* |
676 | * If the buffer is fully or partially | 676 | * If the buffer is fully or partially |
677 | * within the initialized size, do an | 677 | * within the initialized size, do an |
@@ -784,10 +784,11 @@ retry_remap: | |||
784 | blocksize_bits); | 784 | blocksize_bits); |
785 | cdelta = 0; | 785 | cdelta = 0; |
786 | /* | 786 | /* |
787 | * If the number of remaining clusters in the | 787 | * If the number of remaining clusters touched |
788 | * @pages is smaller or equal to the number of | 788 | * by the write is smaller or equal to the |
789 | * cached clusters, unlock the runlist as the | 789 | * number of cached clusters, unlock the |
790 | * map cache will be used from now on. | 790 | * runlist as the map cache will be used from |
791 | * now on. | ||
791 | */ | 792 | */ |
792 | if (likely(vcn + vcn_len >= cend)) { | 793 | if (likely(vcn + vcn_len >= cend)) { |
793 | if (rl_write_locked) { | 794 | if (rl_write_locked) { |
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h index a515e2aed829..8c454aa58ac6 100644 --- a/include/asm-i386/apic.h +++ b/include/asm-i386/apic.h | |||
@@ -118,8 +118,7 @@ extern void release_lapic_nmi(void); | |||
118 | extern void disable_timer_nmi_watchdog(void); | 118 | extern void disable_timer_nmi_watchdog(void); |
119 | extern void enable_timer_nmi_watchdog(void); | 119 | extern void enable_timer_nmi_watchdog(void); |
120 | extern void nmi_watchdog_tick (struct pt_regs * regs); | 120 | extern void nmi_watchdog_tick (struct pt_regs * regs); |
121 | extern int APIC_init(void); | 121 | extern int APIC_init_uniprocessor (void); |
122 | extern void APIC_late_time_init(void); | ||
123 | extern void disable_APIC_timer(void); | 122 | extern void disable_APIC_timer(void); |
124 | extern void enable_APIC_timer(void); | 123 | extern void enable_APIC_timer(void); |
125 | 124 | ||
diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h index 9139b89497a1..622815bf3243 100644 --- a/include/asm-i386/hw_irq.h +++ b/include/asm-i386/hw_irq.h | |||
@@ -55,7 +55,6 @@ void init_8259A(int aeoi); | |||
55 | void FASTCALL(send_IPI_self(int vector)); | 55 | void FASTCALL(send_IPI_self(int vector)); |
56 | void init_VISWS_APIC_irqs(void); | 56 | void init_VISWS_APIC_irqs(void); |
57 | void setup_IO_APIC(void); | 57 | void setup_IO_APIC(void); |
58 | void IO_APIC_late_time_init(void); | ||
59 | void disable_IO_APIC(void); | 58 | void disable_IO_APIC(void); |
60 | void print_IO_APIC(void); | 59 | void print_IO_APIC(void); |
61 | int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn); | 60 | int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn); |
diff --git a/include/asm-i386/mach-default/smpboot_hooks.h b/include/asm-i386/mach-default/smpboot_hooks.h index d7c70c144f9f..7f45f6311059 100644 --- a/include/asm-i386/mach-default/smpboot_hooks.h +++ b/include/asm-i386/mach-default/smpboot_hooks.h | |||
@@ -1,6 +1,11 @@ | |||
1 | /* two abstractions specific to kernel/smpboot.c, mainly to cater to visws | 1 | /* two abstractions specific to kernel/smpboot.c, mainly to cater to visws |
2 | * which needs to alter them. */ | 2 | * which needs to alter them. */ |
3 | 3 | ||
4 | static inline void smpboot_clear_io_apic_irqs(void) | ||
5 | { | ||
6 | io_apic_irqs = 0; | ||
7 | } | ||
8 | |||
4 | static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip) | 9 | static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip) |
5 | { | 10 | { |
6 | CMOS_WRITE(0xa, 0xf); | 11 | CMOS_WRITE(0xa, 0xf); |
@@ -27,3 +32,13 @@ static inline void smpboot_restore_warm_reset_vector(void) | |||
27 | 32 | ||
28 | *((volatile long *) phys_to_virt(0x467)) = 0; | 33 | *((volatile long *) phys_to_virt(0x467)) = 0; |
29 | } | 34 | } |
35 | |||
36 | static inline void smpboot_setup_io_apic(void) | ||
37 | { | ||
38 | /* | ||
39 | * Here we can be sure that there is an IO-APIC in the system. Let's | ||
40 | * go and set it up: | ||
41 | */ | ||
42 | if (!skip_ioapic_setup && nr_ioapics) | ||
43 | setup_IO_APIC(); | ||
44 | } | ||
diff --git a/include/asm-i386/mach-visws/smpboot_hooks.h b/include/asm-i386/mach-visws/smpboot_hooks.h index 14d8e0375f7a..d926471fa359 100644 --- a/include/asm-i386/mach-visws/smpboot_hooks.h +++ b/include/asm-i386/mach-visws/smpboot_hooks.h | |||
@@ -11,7 +11,14 @@ static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip) | |||
11 | 11 | ||
12 | /* for visws do nothing for any of these */ | 12 | /* for visws do nothing for any of these */ |
13 | 13 | ||
14 | static inline void smpboot_clear_io_apic_irqs(void) | ||
15 | { | ||
16 | } | ||
17 | |||
14 | static inline void smpboot_restore_warm_reset_vector(void) | 18 | static inline void smpboot_restore_warm_reset_vector(void) |
15 | { | 19 | { |
16 | } | 20 | } |
17 | 21 | ||
22 | static inline void smpboot_setup_io_apic(void) | ||
23 | { | ||
24 | } | ||
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index 14cb2718cb77..46e3c0bf3c94 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h | |||
@@ -1055,6 +1055,7 @@ typedef struct { | |||
1055 | unsigned char emu10k2_chip; /* Audigy 1 or Audigy 2. */ | 1055 | unsigned char emu10k2_chip; /* Audigy 1 or Audigy 2. */ |
1056 | unsigned char ca0102_chip; /* Audigy 1 or Audigy 2. Not SB Audigy 2 Value. */ | 1056 | unsigned char ca0102_chip; /* Audigy 1 or Audigy 2. Not SB Audigy 2 Value. */ |
1057 | unsigned char ca0108_chip; /* Audigy 2 Value */ | 1057 | unsigned char ca0108_chip; /* Audigy 2 Value */ |
1058 | unsigned char ca_cardbus_chip; /* Audigy 2 ZS Notebook */ | ||
1058 | unsigned char ca0151_chip; /* P16V */ | 1059 | unsigned char ca0151_chip; /* P16V */ |
1059 | unsigned char spk71; /* Has 7.1 speakers */ | 1060 | unsigned char spk71; /* Has 7.1 speakers */ |
1060 | unsigned char sblive51; /* SBLive! 5.1 - extout 0x11 -> center, 0x12 -> lfe */ | 1061 | unsigned char sblive51; /* SBLive! 5.1 - extout 0x11 -> center, 0x12 -> lfe */ |
diff --git a/init/main.c b/init/main.c index 4075d97e94b1..f142d4035341 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -64,6 +64,10 @@ | |||
64 | #endif | 64 | #endif |
65 | #endif | 65 | #endif |
66 | 66 | ||
67 | #ifdef CONFIG_X86_LOCAL_APIC | ||
68 | #include <asm/smp.h> | ||
69 | #endif | ||
70 | |||
67 | /* | 71 | /* |
68 | * Versions of gcc older than that listed below may actually compile | 72 | * Versions of gcc older than that listed below may actually compile |
69 | * and link okay, but the end product can have subtle run time bugs. | 73 | * and link okay, but the end product can have subtle run time bugs. |
@@ -310,7 +314,14 @@ extern void setup_arch(char **); | |||
310 | 314 | ||
311 | #ifndef CONFIG_SMP | 315 | #ifndef CONFIG_SMP |
312 | 316 | ||
317 | #ifdef CONFIG_X86_LOCAL_APIC | ||
318 | static void __init smp_init(void) | ||
319 | { | ||
320 | APIC_init_uniprocessor(); | ||
321 | } | ||
322 | #else | ||
313 | #define smp_init() do { } while (0) | 323 | #define smp_init() do { } while (0) |
324 | #endif | ||
314 | 325 | ||
315 | static inline void setup_per_cpu_areas(void) { } | 326 | static inline void setup_per_cpu_areas(void) { } |
316 | static inline void smp_prepare_cpus(unsigned int maxcpus) { } | 327 | static inline void smp_prepare_cpus(unsigned int maxcpus) { } |
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index e9cd8e054f25..53aeff0b783a 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c | |||
@@ -579,6 +579,30 @@ static int __devinit snd_emu10k1_ecard_init(emu10k1_t * emu) | |||
579 | return 0; | 579 | return 0; |
580 | } | 580 | } |
581 | 581 | ||
582 | static int __devinit snd_emu10k1_cardbus_init(emu10k1_t * emu) | ||
583 | { | ||
584 | unsigned long special_port; | ||
585 | unsigned int value; | ||
586 | |||
587 | /* Special initialisation routine | ||
588 | * before the rest of the IO-Ports become active. | ||
589 | */ | ||
590 | special_port = emu->port + 0x38; | ||
591 | value = inl(special_port); | ||
592 | outl(0x00d00000, special_port); | ||
593 | value = inl(special_port); | ||
594 | outl(0x00d00001, special_port); | ||
595 | value = inl(special_port); | ||
596 | outl(0x00d0005f, special_port); | ||
597 | value = inl(special_port); | ||
598 | outl(0x00d0007f, special_port); | ||
599 | value = inl(special_port); | ||
600 | outl(0x0090007f, special_port); | ||
601 | value = inl(special_port); | ||
602 | |||
603 | return 0; | ||
604 | } | ||
605 | |||
582 | /* | 606 | /* |
583 | * Create the EMU10K1 instance | 607 | * Create the EMU10K1 instance |
584 | */ | 608 | */ |
@@ -624,6 +648,16 @@ static emu_chip_details_t emu_chip_details[] = { | |||
624 | .ca0108_chip = 1, | 648 | .ca0108_chip = 1, |
625 | .spk71 = 1, | 649 | .spk71 = 1, |
626 | .ac97_chip = 1} , | 650 | .ac97_chip = 1} , |
651 | /* Audigy 2 ZS Notebook Cardbus card.*/ | ||
652 | /* Tested by James@superbug.co.uk 30th October 2005 */ | ||
653 | /* Not working yet, but progressing. */ | ||
654 | {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x20011102, | ||
655 | .driver = "Audigy2", .name = "Audigy 2 ZS Notebook [SB0530]", | ||
656 | .id = "Audigy2", | ||
657 | .emu10k2_chip = 1, | ||
658 | .ca0108_chip = 1, | ||
659 | .ca_cardbus_chip = 1, | ||
660 | .spk71 = 1} , | ||
627 | {.vendor = 0x1102, .device = 0x0008, | 661 | {.vendor = 0x1102, .device = 0x0008, |
628 | .driver = "Audigy2", .name = "Audigy 2 Value [Unknown]", | 662 | .driver = "Audigy2", .name = "Audigy 2 Value [Unknown]", |
629 | .id = "Audigy2", | 663 | .id = "Audigy2", |
@@ -1011,6 +1045,11 @@ int __devinit snd_emu10k1_create(snd_card_t * card, | |||
1011 | snd_emu10k1_free(emu); | 1045 | snd_emu10k1_free(emu); |
1012 | return err; | 1046 | return err; |
1013 | } | 1047 | } |
1048 | } else if (emu->card_capabilities->ca_cardbus_chip) { | ||
1049 | if ((err = snd_emu10k1_cardbus_init(emu)) < 0) { | ||
1050 | snd_emu10k1_free(emu); | ||
1051 | return err; | ||
1052 | } | ||
1014 | } else { | 1053 | } else { |
1015 | /* 5.1: Enable the additional AC97 Slots. If the emu10k1 version | 1054 | /* 5.1: Enable the additional AC97 Slots. If the emu10k1 version |
1016 | does not support this, it shouldn't do any harm */ | 1055 | does not support this, it shouldn't do any harm */ |