lkml.org 
[lkml]   [2012]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    Subjectlinux-next: manual merge of the driver-core tree with Linus' tree
    Hi Greg,

    Today's linux-next merge of the driver-core tree got a conflict in
    drivers/acpi/processor_driver.c between commit 54d5dcc45af7 ("ACPI
    processor hotplug: Split up acpi_processor_add") from Linus' tree and
    commit 9061e0e16700 ("ACPI: Load acpi-cpufreq from processor driver
    automatically") from the driver-core tree.

    I fixed it up (I think- see below) and can carry the fix as necessary.
    --
    Cheers,
    Stephen Rothwell sfr@canb.auug.org.au

    diff --cc drivers/acpi/processor_driver.c
    index 2b805d7,e6920d0..0000000
    --- a/drivers/acpi/processor_driver.c
    +++ b/drivers/acpi/processor_driver.c
    @@@ -459,71 -440,6 +459,72 @@@ static struct notifier_block acpi_cpu_n
    .notifier_call = acpi_cpu_soft_notify,
    };

    +/*
    + * acpi_processor_start() is called by the cpu_hotplug_notifier func:
    + * acpi_cpu_soft_notify(). Getting it __cpuinit{data} is difficult, the
    + * root cause seem to be that acpi_processor_uninstall_hotplug_notify()
    + * is in the module_exit (__exit) func. Allowing acpi_processor_start()
    + * to not be in __cpuinit section, but being called from __cpuinit funcs
    + * via __ref looks like the right thing to do here.
    + */
    +static __ref int acpi_processor_start(struct acpi_processor *pr)
    +{
    + struct acpi_device *device = per_cpu(processor_device_array, pr->id);
    + int result = 0;
    +
    +#ifdef CONFIG_CPU_FREQ
    + acpi_processor_ppc_has_changed(pr, 0);
    ++ acpi_processor_load_module(pr);
    +#endif
    + acpi_processor_get_throttling_info(pr);
    + acpi_processor_get_limit_info(pr);
    +
    + if (!cpuidle_get_driver() || cpuidle_get_driver() == &acpi_idle_driver)
    + acpi_processor_power_init(pr, device);
    +
    + pr->cdev = thermal_cooling_device_register("Processor", device,
    + &processor_cooling_ops);
    + if (IS_ERR(pr->cdev)) {
    + result = PTR_ERR(pr->cdev);
    + goto err_power_exit;
    + }
    +
    + dev_dbg(&device->dev, "registered as cooling_device%d\n",
    + pr->cdev->id);
    +
    + result = sysfs_create_link(&device->dev.kobj,
    + &pr->cdev->device.kobj,
    + "thermal_cooling");
    + if (result) {
    + printk(KERN_ERR PREFIX "Create sysfs link\n");
    + goto err_thermal_unregister;
    + }
    + result = sysfs_create_link(&pr->cdev->device.kobj,
    + &device->dev.kobj,
    + "device");
    + if (result) {
    + printk(KERN_ERR PREFIX "Create sysfs link\n");
    + goto err_remove_sysfs_thermal;
    + }
    +
    + return 0;
    +
    +err_remove_sysfs_thermal:
    + sysfs_remove_link(&device->dev.kobj, "thermal_cooling");
    +err_thermal_unregister:
    + thermal_cooling_device_unregister(pr->cdev);
    +err_power_exit:
    + acpi_processor_power_exit(pr, device);
    +
    + return result;
    +}
    +
    +/*
    + * Do not put anything in here which needs the core to be online.
    + * For example MSR access or setting up things which check for cpuinfo_x86
    + * (cpu_data(cpu)) values, like CPU feature flags, family, model, etc.
    + * Such things have to be put in and set up above in acpi_processor_start()
    + */
    static int __cpuinit acpi_processor_add(struct acpi_device *device)
    {
    struct acpi_processor *pr = NULL;
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2012-01-30 03:27    [W:0.032 / U:0.400 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site