Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq

* master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ] Fix typos in powernow-k8 printk's.
[CPUFREQ] Restore previously used governor on a hot-replugged CPU
[CPUFREQ] bugfix cpufreq in combination with performance governor
[CPUFREQ] powernow-k8 compile fix.
[CPUFREQ] the overdue removal of X86_SPEEDSTEP_CENTRINO_ACPI
[CPUFREQ] Longhaul - Option to disable ACPI C3 support

Fixed up arch/i386/kernel/cpu/cpufreq/powernow-k8.c due to revert that
got fixed differently in the cpufreq branch.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+67 -320
-22
Documentation/feature-removal-schedule.txt
··· 196 196 197 197 --------------------------- 198 198 199 - What: ACPI hooks (X86_SPEEDSTEP_CENTRINO_ACPI) in speedstep-centrino driver 200 - When: December 2006 201 - Why: Speedstep-centrino driver with ACPI hooks and acpi-cpufreq driver are 202 - functionally very much similar. They talk to ACPI in same way. Only 203 - difference between them is the way they do frequency transitions. 204 - One uses MSRs and the other one uses IO ports. Functionaliy of 205 - speedstep_centrino with ACPI hooks is now merged into acpi-cpufreq. 206 - That means one common driver will support all Intel Enhanced Speedstep 207 - capable CPUs. That means less confusion over name of 208 - speedstep-centrino driver (with that driver supposed to be used on 209 - non-centrino platforms). That means less duplication of code and 210 - less maintenance effort and no possibility of these two drivers 211 - going out of sync. 212 - Current users of speedstep_centrino with ACPI hooks are requested to 213 - switch over to acpi-cpufreq driver. speedstep-centrino will continue 214 - to work using older non-ACPI static table based scheme even after this 215 - date. 216 - 217 - Who: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> 218 - 219 - --------------------------- 220 - 221 199 What: /sys/firmware/acpi/namespace 222 200 When: 2.6.21 223 201 Why: The ACPI namespace is effectively the symbol list for
+2 -16
arch/i386/kernel/cpu/cpufreq/Kconfig
··· 116 116 config X86_SPEEDSTEP_CENTRINO 117 117 tristate "Intel Enhanced SpeedStep" 118 118 select CPU_FREQ_TABLE 119 - select X86_SPEEDSTEP_CENTRINO_TABLE if (!X86_SPEEDSTEP_CENTRINO_ACPI) 119 + select X86_SPEEDSTEP_CENTRINO_TABLE 120 120 help 121 121 This adds the CPUFreq driver for Enhanced SpeedStep enabled 122 122 mobile CPUs. This means Intel Pentium M (Centrino) CPUs. However, ··· 127 127 For details, take a look at <file:Documentation/cpu-freq/>. 128 128 129 129 If in doubt, say N. 130 - 131 - config X86_SPEEDSTEP_CENTRINO_ACPI 132 - bool "Use ACPI tables to decode valid frequency/voltage (deprecated)" 133 - depends on X86_SPEEDSTEP_CENTRINO && ACPI_PROCESSOR 134 - depends on !(X86_SPEEDSTEP_CENTRINO = y && ACPI_PROCESSOR = m) 135 - help 136 - This is deprecated and this functionality is now merged into 137 - acpi_cpufreq (X86_ACPI_CPUFREQ). Use that driver instead of 138 - speedstep_centrino. 139 - Use primarily the information provided in the BIOS ACPI tables 140 - to determine valid CPU frequency and voltage pairings. It is 141 - required for the driver to work on non-Banias CPUs. 142 - 143 - If in doubt, say Y. 144 130 145 131 config X86_SPEEDSTEP_CENTRINO_TABLE 146 132 bool "Built-in tables for Banias CPUs" ··· 223 237 config X86_ACPI_CPUFREQ_PROC_INTF 224 238 bool "/proc/acpi/processor/../performance interface (deprecated)" 225 239 depends on PROC_FS 226 - depends on X86_ACPI_CPUFREQ || X86_SPEEDSTEP_CENTRINO_ACPI || X86_POWERNOW_K7_ACPI || X86_POWERNOW_K8_ACPI 240 + depends on X86_ACPI_CPUFREQ || X86_POWERNOW_K7_ACPI || X86_POWERNOW_K8_ACPI 227 241 help 228 242 This enables the deprecated /proc/acpi/processor/../performance 229 243 interface. While it is helpful for debugging, the generic,
+7
arch/i386/kernel/cpu/cpufreq/longhaul.c
··· 75 75 76 76 /* Module parameters */ 77 77 static int scale_voltage; 78 + static int disable_acpi_c3; 78 79 79 80 #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "longhaul", msg) 80 81 ··· 845 844 if (cx->address > 0 && cx->latency <= 1000) 846 845 longhaul_flags |= USE_ACPI_C3; 847 846 } 847 + /* Disable if it isn't working */ 848 + if (disable_acpi_c3) 849 + longhaul_flags &= ~USE_ACPI_C3; 848 850 /* Check if northbridge is friendly */ 849 851 if (enable_arbiter_disable()) 850 852 longhaul_flags |= USE_NORTHBRIDGE; ··· 955 951 cpufreq_unregister_driver(&longhaul_driver); 956 952 kfree(longhaul_table); 957 953 } 954 + 955 + module_param (disable_acpi_c3, int, 0644); 956 + MODULE_PARM_DESC(disable_acpi_c3, "Don't use ACPI C3 support"); 958 957 959 958 module_param (scale_voltage, int, 0644); 960 959 MODULE_PARM_DESC(scale_voltage, "Scale voltage of processor");
+19 -10
arch/i386/kernel/cpu/cpufreq/powernow-k8.c
··· 599 599 for (j = 0; j < data->numps; j++) { 600 600 if (data->powernow_table[j].frequency != CPUFREQ_ENTRY_INVALID) { 601 601 if (cpu_family == CPU_HW_PSTATE) { 602 - printk(KERN_INFO PFX " %d : fid 0x%x gid 0x%x (%d MHz)\n", j, (data->powernow_table[j].index & 0xff00) >> 8, 603 - (data->powernow_table[j].index & 0xff0000) >> 16, 604 - data->powernow_table[j].frequency/1000); 602 + printk(KERN_INFO PFX " %d : fid 0x%x did 0x%x (%d MHz)\n", 603 + j, 604 + (data->powernow_table[j].index & 0xff00) >> 8, 605 + (data->powernow_table[j].index & 0xff0000) >> 16, 606 + data->powernow_table[j].frequency/1000); 605 607 } else { 606 - printk(KERN_INFO PFX " %d : fid 0x%x (%d MHz), vid 0x%x\n", j, 607 - data->powernow_table[j].index & 0xff, 608 - data->powernow_table[j].frequency/1000, 609 - data->powernow_table[j].index >> 8); 608 + printk(KERN_INFO PFX " %d : fid 0x%x (%d MHz), vid 0x%x\n", 609 + j, 610 + data->powernow_table[j].index & 0xff, 611 + data->powernow_table[j].frequency/1000, 612 + data->powernow_table[j].index >> 8); 610 613 } 611 614 } 612 615 } ··· 1089 1086 1090 1087 if (cpu_family == CPU_HW_PSTATE) 1091 1088 dprintk("targ: curr fid 0x%x, did 0x%x\n", 1092 - data->currfid, data->currvid); 1089 + data->currfid, data->currdid); 1093 1090 else { 1094 1091 dprintk("targ: curr fid 0x%x, vid 0x%x\n", 1095 1092 data->currfid, data->currvid); ··· 1325 1322 static int __cpuinit powernowk8_init(void) 1326 1323 { 1327 1324 unsigned int i, supported_cpus = 0; 1325 + unsigned int booted_cores = 1; 1328 1326 1329 1327 for_each_online_cpu(i) { 1330 1328 if (check_supported_cpu(i)) 1331 1329 supported_cpus++; 1332 1330 } 1333 1331 1332 + #ifdef CONFIG_SMP 1333 + booted_cores = cpu_data[0].booted_cores; 1334 + #endif 1335 + 1334 1336 if (supported_cpus == num_online_cpus()) { 1335 1337 printk(KERN_INFO PFX "Found %d %s " 1336 - "processors (" VERSION ")\n", supported_cpus, 1337 - boot_cpu_data.x86_model_id); 1338 + "processors (%d cpu cores) (" VERSION ")\n", 1339 + supported_cpus/booted_cores, 1340 + boot_cpu_data.x86_model_id, supported_cpus); 1338 1341 return cpufreq_register_driver(&cpufreq_amd64_driver); 1339 1342 } 1340 1343
+16 -260
arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
··· 21 21 #include <linux/delay.h> 22 22 #include <linux/compiler.h> 23 23 24 - #ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI 25 - #include <linux/acpi.h> 26 - #include <linux/dmi.h> 27 - #include <acpi/processor.h> 28 - #endif 29 - 30 24 #include <asm/msr.h> 31 25 #include <asm/processor.h> 32 26 #include <asm/cpufeature.h> ··· 251 257 /* Matched a non-match */ 252 258 dprintk("no table support for CPU model \"%s\"\n", 253 259 cpu->x86_model_id); 254 - #ifndef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI 255 - dprintk("try compiling with CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI enabled\n"); 256 - #endif 260 + dprintk("try using the acpi-cpufreq driver\n"); 257 261 return -ENOENT; 258 262 } 259 263 ··· 338 346 } 339 347 340 348 341 - #ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI 342 - 343 - static struct acpi_processor_performance *acpi_perf_data[NR_CPUS]; 344 - 345 - /* 346 - * centrino_cpu_early_init_acpi - Do the preregistering with ACPI P-States 347 - * library 348 - * 349 - * Before doing the actual init, we need to do _PSD related setup whenever 350 - * supported by the BIOS. These are handled by this early_init routine. 351 - */ 352 - static int centrino_cpu_early_init_acpi(void) 353 - { 354 - unsigned int i, j; 355 - struct acpi_processor_performance *data; 356 - 357 - for_each_possible_cpu(i) { 358 - data = kzalloc(sizeof(struct acpi_processor_performance), 359 - GFP_KERNEL); 360 - if (!data) { 361 - for_each_possible_cpu(j) { 362 - kfree(acpi_perf_data[j]); 363 - acpi_perf_data[j] = NULL; 364 - } 365 - return (-ENOMEM); 366 - } 367 - acpi_perf_data[i] = data; 368 - } 369 - 370 - acpi_processor_preregister_performance(acpi_perf_data); 371 - return 0; 372 - } 373 - 374 - 375 - #ifdef CONFIG_SMP 376 - /* 377 - * Some BIOSes do SW_ANY coordination internally, either set it up in hw 378 - * or do it in BIOS firmware and won't inform about it to OS. If not 379 - * detected, this has a side effect of making CPU run at a different speed 380 - * than OS intended it to run at. Detect it and handle it cleanly. 381 - */ 382 - static int bios_with_sw_any_bug; 383 - static int sw_any_bug_found(struct dmi_system_id *d) 384 - { 385 - bios_with_sw_any_bug = 1; 386 - return 0; 387 - } 388 - 389 - static struct dmi_system_id sw_any_bug_dmi_table[] = { 390 - { 391 - .callback = sw_any_bug_found, 392 - .ident = "Supermicro Server X6DLP", 393 - .matches = { 394 - DMI_MATCH(DMI_SYS_VENDOR, "Supermicro"), 395 - DMI_MATCH(DMI_BIOS_VERSION, "080010"), 396 - DMI_MATCH(DMI_PRODUCT_NAME, "X6DLP"), 397 - }, 398 - }, 399 - { } 400 - }; 401 - #endif 402 - 403 - /* 404 - * centrino_cpu_init_acpi - register with ACPI P-States library 405 - * 406 - * Register with the ACPI P-States library (part of drivers/acpi/processor.c) 407 - * in order to determine correct frequency and voltage pairings by reading 408 - * the _PSS of the ACPI DSDT or SSDT tables. 409 - */ 410 - static int centrino_cpu_init_acpi(struct cpufreq_policy *policy) 411 - { 412 - unsigned long cur_freq; 413 - int result = 0, i; 414 - unsigned int cpu = policy->cpu; 415 - struct acpi_processor_performance *p; 416 - 417 - p = acpi_perf_data[cpu]; 418 - 419 - /* register with ACPI core */ 420 - if (acpi_processor_register_performance(p, cpu)) { 421 - dprintk(PFX "obtaining ACPI data failed\n"); 422 - return -EIO; 423 - } 424 - 425 - policy->shared_type = p->shared_type; 426 - /* 427 - * Will let policy->cpus know about dependency only when software 428 - * coordination is required. 429 - */ 430 - if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL || 431 - policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) { 432 - policy->cpus = p->shared_cpu_map; 433 - } 434 - 435 - #ifdef CONFIG_SMP 436 - dmi_check_system(sw_any_bug_dmi_table); 437 - if (bios_with_sw_any_bug && cpus_weight(policy->cpus) == 1) { 438 - policy->shared_type = CPUFREQ_SHARED_TYPE_ALL; 439 - policy->cpus = cpu_core_map[cpu]; 440 - } 441 - #endif 442 - 443 - /* verify the acpi_data */ 444 - if (p->state_count <= 1) { 445 - dprintk("No P-States\n"); 446 - result = -ENODEV; 447 - goto err_unreg; 448 - } 449 - 450 - if ((p->control_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) || 451 - (p->status_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) { 452 - dprintk("Invalid control/status registers (%x - %x)\n", 453 - p->control_register.space_id, p->status_register.space_id); 454 - result = -EIO; 455 - goto err_unreg; 456 - } 457 - 458 - for (i=0; i<p->state_count; i++) { 459 - if ((p->states[i].control & INTEL_MSR_RANGE) != 460 - (p->states[i].status & INTEL_MSR_RANGE)) { 461 - dprintk("Different MSR bits in control (%llu) and status (%llu)\n", 462 - p->states[i].control, p->states[i].status); 463 - result = -EINVAL; 464 - goto err_unreg; 465 - } 466 - 467 - if (!p->states[i].core_frequency) { 468 - dprintk("Zero core frequency for state %u\n", i); 469 - result = -EINVAL; 470 - goto err_unreg; 471 - } 472 - 473 - if (p->states[i].core_frequency > p->states[0].core_frequency) { 474 - dprintk("P%u has larger frequency (%llu) than P0 (%llu), skipping\n", i, 475 - p->states[i].core_frequency, p->states[0].core_frequency); 476 - p->states[i].core_frequency = 0; 477 - continue; 478 - } 479 - } 480 - 481 - centrino_model[cpu] = kzalloc(sizeof(struct cpu_model), GFP_KERNEL); 482 - if (!centrino_model[cpu]) { 483 - result = -ENOMEM; 484 - goto err_unreg; 485 - } 486 - 487 - centrino_model[cpu]->model_name=NULL; 488 - centrino_model[cpu]->max_freq = p->states[0].core_frequency * 1000; 489 - centrino_model[cpu]->op_points = kmalloc(sizeof(struct cpufreq_frequency_table) * 490 - (p->state_count + 1), GFP_KERNEL); 491 - if (!centrino_model[cpu]->op_points) { 492 - result = -ENOMEM; 493 - goto err_kfree; 494 - } 495 - 496 - for (i=0; i<p->state_count; i++) { 497 - centrino_model[cpu]->op_points[i].index = p->states[i].control & INTEL_MSR_RANGE; 498 - centrino_model[cpu]->op_points[i].frequency = p->states[i].core_frequency * 1000; 499 - dprintk("adding state %i with frequency %u and control value %04x\n", 500 - i, centrino_model[cpu]->op_points[i].frequency, centrino_model[cpu]->op_points[i].index); 501 - } 502 - centrino_model[cpu]->op_points[p->state_count].frequency = CPUFREQ_TABLE_END; 503 - 504 - cur_freq = get_cur_freq(cpu); 505 - 506 - for (i=0; i<p->state_count; i++) { 507 - if (!p->states[i].core_frequency) { 508 - dprintk("skipping state %u\n", i); 509 - centrino_model[cpu]->op_points[i].frequency = CPUFREQ_ENTRY_INVALID; 510 - continue; 511 - } 512 - 513 - if (extract_clock(centrino_model[cpu]->op_points[i].index, cpu, 0) != 514 - (centrino_model[cpu]->op_points[i].frequency)) { 515 - dprintk("Invalid encoded frequency (%u vs. %u)\n", 516 - extract_clock(centrino_model[cpu]->op_points[i].index, cpu, 0), 517 - centrino_model[cpu]->op_points[i].frequency); 518 - result = -EINVAL; 519 - goto err_kfree_all; 520 - } 521 - 522 - if (cur_freq == centrino_model[cpu]->op_points[i].frequency) 523 - p->state = i; 524 - } 525 - 526 - /* notify BIOS that we exist */ 527 - acpi_processor_notify_smm(THIS_MODULE); 528 - printk("speedstep-centrino with X86_SPEEDSTEP_CENTRINO_ACPI " 529 - "config is deprecated.\n " 530 - "Use X86_ACPI_CPUFREQ (acpi-cpufreq) instead.\n" ); 531 - 532 - return 0; 533 - 534 - err_kfree_all: 535 - kfree(centrino_model[cpu]->op_points); 536 - err_kfree: 537 - kfree(centrino_model[cpu]); 538 - err_unreg: 539 - acpi_processor_unregister_performance(p, cpu); 540 - dprintk(PFX "invalid ACPI data\n"); 541 - return (result); 542 - } 543 - #else 544 - static inline int centrino_cpu_init_acpi(struct cpufreq_policy *policy) { return -ENODEV; } 545 - static inline int centrino_cpu_early_init_acpi(void) { return 0; } 546 - #endif 547 - 548 349 static int centrino_cpu_init(struct cpufreq_policy *policy) 549 350 { 550 351 struct cpuinfo_x86 *cpu = &cpu_data[policy->cpu]; ··· 353 568 if (cpu_has(cpu, X86_FEATURE_CONSTANT_TSC)) 354 569 centrino_driver.flags |= CPUFREQ_CONST_LOOPS; 355 570 356 - if (centrino_cpu_init_acpi(policy)) { 357 - if (policy->cpu != 0) 358 - return -ENODEV; 571 + if (policy->cpu != 0) 572 + return -ENODEV; 359 573 360 - for (i = 0; i < N_IDS; i++) 361 - if (centrino_verify_cpu_id(cpu, &cpu_ids[i])) 362 - break; 574 + for (i = 0; i < N_IDS; i++) 575 + if (centrino_verify_cpu_id(cpu, &cpu_ids[i])) 576 + break; 363 577 364 - if (i != N_IDS) 365 - centrino_cpu[policy->cpu] = &cpu_ids[i]; 578 + if (i != N_IDS) 579 + centrino_cpu[policy->cpu] = &cpu_ids[i]; 366 580 367 - if (!centrino_cpu[policy->cpu]) { 368 - dprintk("found unsupported CPU with " 369 - "Enhanced SpeedStep: send /proc/cpuinfo to " 370 - MAINTAINER "\n"); 371 - return -ENODEV; 372 - } 581 + if (!centrino_cpu[policy->cpu]) { 582 + dprintk("found unsupported CPU with " 583 + "Enhanced SpeedStep: send /proc/cpuinfo to " 584 + MAINTAINER "\n"); 585 + return -ENODEV; 586 + } 373 587 374 - if (centrino_cpu_init_table(policy)) { 375 - return -ENODEV; 376 - } 588 + if (centrino_cpu_init_table(policy)) { 589 + return -ENODEV; 377 590 } 378 591 379 592 /* Check to see if Enhanced SpeedStep is enabled, and try to ··· 416 633 return -ENODEV; 417 634 418 635 cpufreq_frequency_table_put_attr(cpu); 419 - 420 - #ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI 421 - if (!centrino_model[cpu]->model_name) { 422 - static struct acpi_processor_performance *p; 423 - 424 - if (acpi_perf_data[cpu]) { 425 - p = acpi_perf_data[cpu]; 426 - dprintk("unregistering and freeing ACPI data\n"); 427 - acpi_processor_unregister_performance(p, cpu); 428 - kfree(centrino_model[cpu]->op_points); 429 - kfree(centrino_model[cpu]); 430 - } 431 - } 432 - #endif 433 636 434 637 centrino_model[cpu] = NULL; 435 638 ··· 618 849 if (!cpu_has(cpu, X86_FEATURE_EST)) 619 850 return -ENODEV; 620 851 621 - centrino_cpu_early_init_acpi(); 622 - 623 852 return cpufreq_register_driver(&centrino_driver); 624 853 } 625 854 626 855 static void __exit centrino_exit(void) 627 856 { 628 - #ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI 629 - unsigned int j; 630 - #endif 631 - 632 857 cpufreq_unregister_driver(&centrino_driver); 633 - 634 - #ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI 635 - for_each_possible_cpu(j) { 636 - kfree(acpi_perf_data[j]); 637 - acpi_perf_data[j] = NULL; 638 - } 639 - #endif 640 858 } 641 859 642 860 MODULE_AUTHOR ("Jeremy Fitzhardinge <jeremy@goop.org>");
+1 -5
arch/x86_64/kernel/cpufreq/Kconfig
··· 48 48 49 49 If in doubt, say N. 50 50 51 - config X86_SPEEDSTEP_CENTRINO_ACPI 52 - bool 53 - depends on X86_SPEEDSTEP_CENTRINO 54 - 55 51 config X86_ACPI_CPUFREQ 56 52 tristate "ACPI Processor P-States driver" 57 53 select CPU_FREQ_TABLE ··· 69 73 config X86_ACPI_CPUFREQ_PROC_INTF 70 74 bool "/proc/acpi/processor/../performance interface (deprecated)" 71 75 depends on PROC_FS 72 - depends on X86_ACPI_CPUFREQ || X86_SPEEDSTEP_CENTRINO_ACPI || X86_POWERNOW_K8_ACPI 76 + depends on X86_ACPI_CPUFREQ || X86_POWERNOW_K8_ACPI 73 77 help 74 78 This enables the deprecated /proc/acpi/processor/../performance 75 79 interface. While it is helpful for debugging, the generic,
+22 -7
drivers/cpufreq/cpufreq.c
··· 39 39 */ 40 40 static struct cpufreq_driver *cpufreq_driver; 41 41 static struct cpufreq_policy *cpufreq_cpu_data[NR_CPUS]; 42 + #ifdef CONFIG_HOTPLUG_CPU 43 + /* This one keeps track of the previously set governor of a removed CPU */ 44 + static struct cpufreq_governor *cpufreq_cpu_governor[NR_CPUS]; 45 + #endif 42 46 static DEFINE_SPINLOCK(cpufreq_driver_lock); 43 47 44 48 /* ··· 774 770 } 775 771 policy->user_policy.min = policy->cpuinfo.min_freq; 776 772 policy->user_policy.max = policy->cpuinfo.max_freq; 777 - policy->user_policy.governor = policy->governor; 778 773 779 774 #ifdef CONFIG_SMP 775 + 776 + #ifdef CONFIG_HOTPLUG_CPU 777 + if (cpufreq_cpu_governor[cpu]){ 778 + policy->governor = cpufreq_cpu_governor[cpu]; 779 + dprintk("Restoring governor %s for cpu %d\n", 780 + policy->governor->name, cpu); 781 + } 782 + #endif 783 + 780 784 for_each_cpu_mask(j, policy->cpus) { 781 785 if (cpu == j) 782 786 continue; ··· 885 873 /* set default policy */ 886 874 ret = __cpufreq_set_policy(policy, &new_policy); 887 875 policy->user_policy.policy = policy->policy; 876 + policy->user_policy.governor = policy->governor; 888 877 889 878 unlock_policy_rwsem_write(cpu); 890 879 ··· 982 969 } 983 970 984 971 #ifdef CONFIG_SMP 972 + 973 + #ifdef CONFIG_HOTPLUG_CPU 974 + cpufreq_cpu_governor[cpu] = data->governor; 975 + #endif 976 + 985 977 /* if we have other CPUs still registered, we need to unlink them, 986 978 * or else wait_for_completion below will lock up. Clean the 987 979 * cpufreq_cpu_data[] while holding the lock, and remove the sysfs ··· 1007 989 if (j == cpu) 1008 990 continue; 1009 991 dprintk("removing link for cpu %u\n", j); 992 + #ifdef CONFIG_HOTPLUG_CPU 993 + cpufreq_cpu_governor[j] = data->governor; 994 + #endif 1010 995 cpu_sys_dev = get_cpu_sysdev(j); 1011 996 sysfs_remove_link(&cpu_sys_dev->kobj, "cpufreq"); 1012 997 cpufreq_cpu_put(data); ··· 1708 1687 { 1709 1688 unsigned int cpu = (unsigned long)hcpu; 1710 1689 struct sys_device *sys_dev; 1711 - struct cpufreq_policy *policy; 1712 1690 1713 1691 sys_dev = get_cpu_sysdev(cpu); 1714 1692 if (sys_dev) { ··· 1721 1701 if (unlikely(lock_policy_rwsem_write(cpu))) 1722 1702 BUG(); 1723 1703 1724 - policy = cpufreq_cpu_data[cpu]; 1725 - if (policy) { 1726 - __cpufreq_driver_target(policy, policy->min, 1727 - CPUFREQ_RELATION_H); 1728 - } 1729 1704 __cpufreq_remove_dev(sys_dev); 1730 1705 break; 1731 1706 case CPU_DOWN_FAILED: