]> Git Repo - linux.git/commitdiff
Merge branch 'syscore' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspen...
authorLinus Torvalds <[email protected]>
Sat, 26 Mar 2011 04:07:59 +0000 (21:07 -0700)
committerLinus Torvalds <[email protected]>
Sat, 26 Mar 2011 04:07:59 +0000 (21:07 -0700)
* 'syscore' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  Introduce ARCH_NO_SYSDEV_OPS config option (v2)
  cpufreq: Use syscore_ops for boot CPU suspend/resume (v2)
  KVM: Use syscore_ops instead of sysdev class and sysdev
  PCI / Intel IOMMU: Use syscore_ops instead of sysdev class and sysdev
  timekeeping: Use syscore_ops instead of sysdev class and sysdev
  x86: Use syscore_ops instead of sysdev classes and sysdevs

1  2 
arch/x86/Kconfig
virt/kvm/kvm_main.c

diff --combined arch/x86/Kconfig
index 140e254fe546e195c125915392d0f1ece1d38d8f,b1cd5a96a511af10537326d8eb45f16756501fae..cc6c53a95bfdd7ca40d5836e25d2a24e23482f83
@@@ -71,6 -71,7 +71,7 @@@ config X8
        select GENERIC_IRQ_SHOW
        select IRQ_FORCED_THREADING
        select USE_GENERIC_SMP_HELPERS if SMP
+       select ARCH_NO_SYSDEV_OPS
  
  config INSTRUCTION_DECODER
        def_bool (KPROBES || PERF_EVENTS)
@@@ -2096,16 -2097,6 +2097,16 @@@ source "drivers/pcmcia/Kconfig
  
  source "drivers/pci/hotplug/Kconfig"
  
 +config RAPIDIO
 +      bool "RapidIO support"
 +      depends on PCI
 +      default n
 +      help
 +        If you say Y here, the kernel will include drivers and
 +        infrastructure code to support RapidIO interconnect devices.
 +
 +source "drivers/rapidio/Kconfig"
 +
  endmenu
  
  
diff --combined virt/kvm/kvm_main.c
index 7bee6dc8cdb2b5cc65dcc68b0ecf67aa4774d446,24444527f422fc97f873dc6fed0cf70d36b8fc74..556e3efe532523df4f3bc138ba62605c253fd977
@@@ -30,7 -30,7 +30,7 @@@
  #include <linux/debugfs.h>
  #include <linux/highmem.h>
  #include <linux/file.h>
- #include <linux/sysdev.h>
+ #include <linux/syscore_ops.h>
  #include <linux/cpu.h>
  #include <linux/sched.h>
  #include <linux/cpumask.h>
@@@ -52,6 -52,7 +52,6 @@@
  #include <asm/io.h>
  #include <asm/uaccess.h>
  #include <asm/pgtable.h>
 -#include <asm-generic/bitops/le.h>
  
  #include "coalesced_mmio.h"
  #include "async_pf.h"
@@@ -1438,7 -1439,7 +1438,7 @@@ void mark_page_dirty_in_slot(struct kv
        if (memslot && memslot->dirty_bitmap) {
                unsigned long rel_gfn = gfn - memslot->base_gfn;
  
 -              generic___set_le_bit(rel_gfn, memslot->dirty_bitmap);
 +              __set_bit_le(rel_gfn, memslot->dirty_bitmap);
        }
  }
  
@@@ -2446,33 -2447,26 +2446,26 @@@ static void kvm_exit_debug(void
        debugfs_remove(kvm_debugfs_dir);
  }
  
- static int kvm_suspend(struct sys_device *dev, pm_message_t state)
+ static int kvm_suspend(void)
  {
        if (kvm_usage_count)
                hardware_disable_nolock(NULL);
        return 0;
  }
  
- static int kvm_resume(struct sys_device *dev)
+ static void kvm_resume(void)
  {
        if (kvm_usage_count) {
                WARN_ON(raw_spin_is_locked(&kvm_lock));
                hardware_enable_nolock(NULL);
        }
-       return 0;
  }
  
- static struct sysdev_class kvm_sysdev_class = {
-       .name = "kvm",
+ static struct syscore_ops kvm_syscore_ops = {
        .suspend = kvm_suspend,
        .resume = kvm_resume,
  };
  
- static struct sys_device kvm_sysdev = {
-       .id = 0,
-       .cls = &kvm_sysdev_class,
- };
  struct page *bad_page;
  pfn_t bad_pfn;
  
@@@ -2556,14 -2550,6 +2549,6 @@@ int kvm_init(void *opaque, unsigned vcp
                goto out_free_2;
        register_reboot_notifier(&kvm_reboot_notifier);
  
-       r = sysdev_class_register(&kvm_sysdev_class);
-       if (r)
-               goto out_free_3;
-       r = sysdev_register(&kvm_sysdev);
-       if (r)
-               goto out_free_4;
        /* A kmem cache lets us meet the alignment requirements of fx_save. */
        if (!vcpu_align)
                vcpu_align = __alignof__(struct kvm_vcpu);
                                           0, NULL);
        if (!kvm_vcpu_cache) {
                r = -ENOMEM;
-               goto out_free_5;
+               goto out_free_3;
        }
  
        r = kvm_async_pf_init();
                goto out_unreg;
        }
  
+       register_syscore_ops(&kvm_syscore_ops);
        kvm_preempt_ops.sched_in = kvm_sched_in;
        kvm_preempt_ops.sched_out = kvm_sched_out;
  
@@@ -2599,10 -2587,6 +2586,6 @@@ out_unreg
        kvm_async_pf_deinit();
  out_free:
        kmem_cache_destroy(kvm_vcpu_cache);
- out_free_5:
-       sysdev_unregister(&kvm_sysdev);
- out_free_4:
-       sysdev_class_unregister(&kvm_sysdev_class);
  out_free_3:
        unregister_reboot_notifier(&kvm_reboot_notifier);
        unregister_cpu_notifier(&kvm_cpu_notifier);
@@@ -2630,8 -2614,7 +2613,7 @@@ void kvm_exit(void
        misc_deregister(&kvm_dev);
        kmem_cache_destroy(kvm_vcpu_cache);
        kvm_async_pf_deinit();
-       sysdev_unregister(&kvm_sysdev);
-       sysdev_class_unregister(&kvm_sysdev_class);
+       unregister_syscore_ops(&kvm_syscore_ops);
        unregister_reboot_notifier(&kvm_reboot_notifier);
        unregister_cpu_notifier(&kvm_cpu_notifier);
        on_each_cpu(hardware_disable_nolock, NULL, 1);
This page took 0.117982 seconds and 4 git commands to generate.