1. 27 1月, 2010 1 次提交
  2. 16 12月, 2009 1 次提交
    • H
      x86, msr/cpuid: Register enough minors for the MSR and CPUID drivers · 0b962d47
      H. Peter Anvin 提交于
      register_chrdev() hardcodes registering 256 minors, presumably to
      avoid breaking old drivers.  However, we need to register enough
      minors so that we have all possible CPUs.
      
      checkpatch warns on this patch, but the patch is correct: NR_CPUS here
      is a static *upper bound* on the *maximum CPU index* (not *number of
      CPUs!*) and that is what we want.
      Reported-and-tested-by: NRuss Anderson <rja@sgi.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      LKML-Reference: <tip-*@git.kernel.org>
      0b962d47
  3. 15 12月, 2009 1 次提交
    • H
      x86, msr: Remove incorrect, duplicated code in the MSR driver · 494c2ebf
      H. Peter Anvin 提交于
      The MSR driver would compute the values for cpu and c at declaration,
      and then again in the body of the function.  This isn't merely
      redundant, but unsafe, since cpu might not refer to a valid CPU at
      that point.
      
      Remove the unnecessary and dangerous references in the declarations.
      This code now matches the equivalent code in the CPUID driver.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      494c2ebf
  4. 08 10月, 2009 1 次提交
    • F
      x86, msr: Remove the bkl from msr_open() · d6c30405
      Frederic Weisbecker 提交于
      Remove the big kernel lock from msr_open() as it doesn't protect
      anything there.
      
      The only racy event that can happen here is a concurrent cpu shutdown.
      
      So let's look at what could be racy during/after the above event:
      
      - The cpu_online() check is racy, but the bkl doesn't help about
        that anyway it disables preemption but we may be chcking another
        cpu than the current one.
        Also the cpu can still become offlined between open and read calls.
      
      - The cpu_data(cpu) returns a safe pointer too. It won't be released on
        cpu offlining. But some fields can be changed from
        arch/x86/kernel/smpboot.c:remove_siblinginfo() :
      
      	- phys_proc_id
      	- cpu_core_id
      
        Those are not read from msr_open(). What we are checking is the
        x86_capability that is left untouched on offlining.
      
      So this removal looks safe.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: John Kacur <jkacur@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Sven-Thorsten Dietrich <sdietrich@suse.de>
      LKML-Reference: <1254944602-7382-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      d6c30405
  5. 20 9月, 2009 1 次提交
  6. 01 9月, 2009 2 次提交
  7. 16 6月, 2009 1 次提交
  8. 12 1月, 2009 1 次提交
  9. 04 1月, 2009 1 次提交
  10. 17 10月, 2008 1 次提交
  11. 26 8月, 2008 2 次提交
  12. 15 8月, 2008 1 次提交
  13. 22 7月, 2008 1 次提交
  14. 19 5月, 2008 1 次提交
  15. 20 4月, 2008 1 次提交
    • R
      PM: Remove destroy_suspended_device() · b844eba2
      Rafael J. Wysocki 提交于
      After 2.6.24 there was a plan to make the PM core acquire all device
      semaphores during a suspend/hibernation to protect itself from
      concurrent operations involving device objects.  That proved to be
      too heavy-handed and we found a better way to achieve the goal, but
      before it happened, we had introduced the functions
      device_pm_schedule_removal() and destroy_suspended_device() to allow
      drivers to "safely" destroy a suspended device and we had adapted some
      drivers to use them.  Now that these functions are no longer necessary,
      it seems reasonable to remove them and modify their users to use the
      normal device unregistration instead.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b844eba2
  16. 17 4月, 2008 1 次提交
  17. 04 2月, 2008 1 次提交
  18. 02 2月, 2008 1 次提交
    • S
      x86: fix section mismatch warnings when referencing notifiers · c72258c7
      Sam Ravnborg 提交于
      Fix the following warnings:
      WARNING: arch/x86/kernel/built-in.o(.exit.text+0xf8): Section mismatch in reference from the function msr_exit() to the variable .cpuinit.data:msr_class_cpu_notifier
      WARNING: arch/x86/kernel/built-in.o(.exit.text+0x158): Section mismatch in reference from the function cpuid_exit() to the variable .cpuinit.data:cpuid_class_cpu_notifier
      WARNING: arch/x86/kernel/built-in.o(.exit.text+0x171): Section mismatch in reference from the function microcode_exit() to the variable .cpuinit.data:mc_cpu_notifier
      
      In all three cases there were a function annotated __exit
      that referenced a variable annotated __cpuinitdata.
      
      The fix was to replace the annotation of the notifier
      with __refdata to tell modpost that the reference to
      a _cpuinit function in the notifier are OK.
      The unregister call that references the notifier
      variable will simple delete the function pointer
      so there is no problem ignoring the reference.
      
      Note: This looks like another case where __cpuinit
      has been used as replacement for proper use
      of CONFIG_HOTPLUG_CPU to decide what code are used for
      HOTPLUG_CPU.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c72258c7
  19. 25 1月, 2008 1 次提交
    • R
      PM: Acquire device locks on suspend · 775b64d2
      Rafael J. Wysocki 提交于
      This patch reorganizes the way suspend and resume notifications are
      sent to drivers.  The major changes are that now the PM core acquires
      every device semaphore before calling the methods, and calls to
      device_add() during suspends will fail, while calls to device_del()
      during suspends will block.
      
      It also provides a way to safely remove a suspended device with the
      help of the PM core, by using the device_pm_schedule_removal() callback
      introduced specifically for this purpose, and updates two drivers (msr
      and cpuid) that need to use it.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      775b64d2
  20. 20 10月, 2007 1 次提交
    • M
      x86: convert cpuinfo_x86 array to a per_cpu array · 92cb7612
      Mike Travis 提交于
      cpu_data is currently an array defined using NR_CPUS.  This means that
      we overallocate since we will rarely really use maximum configured cpus.
      When NR_CPU count is raised to 4096 the size of cpu_data becomes
      3,145,728 bytes.
      
      These changes were adopted from the sparc64 (and ia64) code.  An
      additional field was added to cpuinfo_x86 to be a non-ambiguous cpu
      index.  This corresponds to the index into a cpumask_t as well as the
      per_cpu index.  It's used in various places like show_cpuinfo().
      
      cpu_data is defined to be the boot_cpu_data structure for the NON-SMP
      case.
      Signed-off-by: NMike Travis <travis@sgi.com>
      Acked-by: NChristoph Lameter <clameter@sgi.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Cc: Dmitry Torokhov <dtor@mail.ru>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Cc: Mark M. Hoffman <mhoffman@lightlink.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      92cb7612
  21. 19 10月, 2007 2 次提交
  22. 18 10月, 2007 1 次提交
  23. 14 10月, 2007 1 次提交
    • D
      Delete filenames in comments. · 835c34a1
      Dave Jones 提交于
      Since the x86 merge, lots of files that referenced their own filenames
      are no longer correct.  Rather than keep them up to date, just delete
      them, as they add no real value.
      
      Additionally:
      - fix up comment formatting in scx200_32.c
      - Remove a credit from myself in setup_64.c from a time when we had no SCM
      - remove longwinded history from tsc_32.c which can be figured out from
        git.
      Signed-off-by: NDave Jones <davej@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      835c34a1
  24. 11 10月, 2007 1 次提交
  25. 10 5月, 2007 1 次提交
    • R
      Add suspend-related notifications for CPU hotplug · 8bb78442
      Rafael J. Wysocki 提交于
      Since nonboot CPUs are now disabled after tasks and devices have been
      frozen and the CPU hotplug infrastructure is used for this purpose, we need
      special CPU hotplug notifications that will help the CPU-hotplug-aware
      subsystems distinguish normal CPU hotplug events from CPU hotplug events
      related to a system-wide suspend or resume operation in progress.  This
      patch introduces such notifications and causes them to be used during
      suspend and resume transitions.  It also changes all of the
      CPU-hotplug-aware subsystems to take these notifications into consideration
      (for now they are handled in the same way as the corresponding "normal"
      ones).
      
      [oleg@tv-sign.ru: cleanups]
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Gautham R Shenoy <ego@in.ibm.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8bb78442
  26. 08 5月, 2007 1 次提交
  27. 13 2月, 2007 2 次提交
  28. 09 12月, 2006 1 次提交
  29. 08 12月, 2006 1 次提交
  30. 07 12月, 2006 1 次提交
  31. 02 12月, 2006 1 次提交
  32. 01 7月, 2006 2 次提交
  33. 28 6月, 2006 1 次提交
  34. 20 4月, 2006 1 次提交
  35. 07 1月, 2006 1 次提交