1. 25 1月, 2008 24 次提交
  2. 24 1月, 2008 3 次提交
    • L
      ACPI: make _OSI(Linux) console messages smarter · d4b7dc49
      Len Brown 提交于
      If BIOS invokes _OSI(Linux), the kernel response
      depends on what the ACPI DMI list knows about the system,
      and that is reflectd in dmesg:
      
      1) System unknown to DMI:
      
      ACPI: BIOS _OSI(Linux) query ignored
      ACPI: DMI System Vendor: LENOVO
      ACPI: DMI Product Name: 7661W1P
      ACPI: DMI Product Version: ThinkPad T61
      ACPI: DMI Board Name: 7661W1P
      ACPI: DMI BIOS Vendor: LENOVO
      ACPI: DMI BIOS Date: 10/18/2007
      ACPI: Please send DMI info above to linux-acpi@vger.kernel.org
      ACPI: If "acpi_osi=Linux" works better, please notify linux-acpi@vger.kernel.org
      
      2) System known to DMI, but effect of OSI(Linux) unknown:
      
      ACPI: DMI detected: Lenovo ThinkPad T61
      ...
      ACPI: BIOS _OSI(Linux) query ignored via DMI
      ACPI: If "acpi_osi=Linux" works better, please notify linux-acpi@vger.kernel.org
      
      3) System known to DMI, which disables _OSI(Linux):
      
      ACPI: DMI detected: Lenovo ThinkPad T61
      ...
      ACPI: BIOS _OSI(Linux) query ignored via DMI
      
      4) System known to DMI, which enable _OSI(Linux):
      
      ACPI: DMI detected: Lenovo ThinkPad T61
      ACPI: Added _OSI(Linux)
      ...
      ACPI: BIOS _OSI(Linux) query honored via DMI
      
      cmdline overrides take precidence over the built-in
      default and the DMI prescribed default.
      cmdline "acpi_osi=Linux" results in:
      
      ACPI: BIOS _OSI(Linux) query honored via cmdline
      Signed-off-by: NLen Brown <len.brown@intel.com>
      d4b7dc49
    • L
      DMI: create dmi_get_slot() · f89e3b06
      Len Brown 提交于
      This simply allows other sub-systems (such as ACPI)
      to access and print out slots in static dmi_ident[].
      Signed-off-by: NLen Brown <len.brown@intel.com>
      f89e3b06
    • L
      DMI: move dmi_available declaration to linux/dmi.h · 81b4e1f6
      Len Brown 提交于
      Signed-off-by: NLen Brown <len.brown@intel.com>
      81b4e1f6
  3. 16 1月, 2008 2 次提交
  4. 15 1月, 2008 2 次提交
  5. 14 1月, 2008 1 次提交
    • R
      remove task_ppid_nr_ns · 84427eae
      Roland McGrath 提交于
      task_ppid_nr_ns is called in three places.  One of these should never
      have called it.  In the other two, using it broke the existing
      semantics.  This was presumably accidental.  If the function had not
      been there, it would have been much more obvious to the eye that those
      patches were changing the behavior.  We don't need this function.
      
      In task_state, the pid of the ptracer is not the ppid of the ptracer.
      
      In do_task_stat, ppid is the tgid of the real_parent, not its pid.
      I also moved the call outside of lock_task_sighand, since it doesn't
      need it.
      
      In sys_getppid, ppid is the tgid of the real_parent, not its pid.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      84427eae
  6. 12 1月, 2008 1 次提交
  7. 11 1月, 2008 2 次提交
  8. 09 1月, 2008 4 次提交
    • D
      [NET]: Add NAPI_STATE_DISABLE. · a0a46196
      David S. Miller 提交于
      Create a bit to signal that a napi_disable() is in progress.
      
      This sets up infrastructure such that net_rx_action() can generically
      break out of the ->poll() loop on a NAPI context that has a pending
      napi_disable() yet is being bombed with packets (and thus would
      otherwise poll endlessly and not allow the napi_disable() to finish).
      
      Now, what napi_disable() does is first set the NAPI_STATE_DISABLE bit
      (to indicate that a disable is pending), then it polls for the
      NAPI_STATE_SCHED bit, and once the NAPI_STATE_SCHED bit is acquired
      the NAPI_STATE_DISABLE bit is cleared.  Here, the test_and_set_bit()
      provides the necessary memory barrier between the various bitops.
      
      napi_schedule_prep() now tests for a pending disable as it's first
      action and won't try to obtain the NAPI_STATE_SCHED bit if a disable
      is pending.
      
      As a result, we can remove the netif_running() check in
      netif_rx_schedule_prep() because the NAPI disable pending state serves
      this purpose.  And, it does so in a NAPI centric manner which is what
      we really want.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a0a46196
    • D
      [NET]: Do not grab device reference when scheduling a NAPI poll. · bdb95b17
      David S. Miller 提交于
      It is pointless, because everything that can make a device go away
      will do a napi_disable() first.
      
      The main impetus behind this is that now we can legally do a NAPI
      completion in generic code like net_rx_action() which a following
      changeset needs to do.  net_rx_action() can only perform actions
      in NAPI centric ways, because there may be a one to many mapping
      between NAPI contexts and network devices (SKY2 is one example).
      
      We also want to get rid of this because it's an extra atomic in the
      NAPI paths, and also because it is one of the last instances where the
      NAPI interfaces care about net devices.
      
      The one remaining netdev detail the NAPI stuff cares about is the
      netif_running() check which will be killed off in a subsequent
      changeset.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bdb95b17
    • A
      pl2303: Fix mode switching regression · bf5e5834
      Alan Cox 提交于
      Cleaning out all the incorrect 'no change made' checks for termios
      settings showed up a problem with the PL2303. The hardware here seems to
      lose sync and bits if you tell it to make no changes. This shows up with
      a real world application.
      
      To fix this the driver check for meaningful hardware changes is restored
      but doing the tests correctly and as a tty layer function so it doesn't
      get duplicated wrongly everywhere if other drivers turn out to need it.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Tested-by: NMirko Parthey <mirko.parthey@informatik.tu-chemnitz.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bf5e5834
    • S
      KEYS: fix macro · 5b7741b3
      Sebastian Siewior 提交于
      Commit 664cceb0 changed the parameters of
      the function make_key_ref().  The macros that are used in case CONFIG_KEY
      is not defined did not change.
      
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: NSebastian Siewior <sebastian@breakpoint.cc>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5b7741b3
  9. 07 1月, 2008 1 次提交
    • I
      CPU hotplug: fix cpu_is_offline() on !CONFIG_HOTPLUG_CPU · a263898f
      Ingo Molnar 提交于
      make randconfig bootup testing found that the cpufreq code
      crashes on bootup, if the powernow-k8 driver is enabled and
      if maxcpus=1 passed on the boot line to a !CONFIG_HOTPLUG_CPU
      kernel.
      
      First lockdep found out that there's an inconsistent unlock
      sequence:
      
       =====================================
       [ BUG: bad unlock balance detected! ]
       -------------------------------------
       swapper/1 is trying to release lock (&per_cpu(cpu_policy_rwsem, cpu)) at:
       [<ffffffff806ffd8e>] unlock_policy_rwsem_write+0x3c/0x42
       but there are no more locks to release!
      
      Call Trace:
       [<ffffffff806ffd8e>] unlock_policy_rwsem_write+0x3c/0x42
       [<ffffffff80251c29>] print_unlock_inbalance_bug+0x104/0x12c
       [<ffffffff80252f3a>] mark_held_locks+0x56/0x94
       [<ffffffff806ffd8e>] unlock_policy_rwsem_write+0x3c/0x42
       [<ffffffff807008b6>] cpufreq_add_dev+0x2a8/0x5c4
       ...
      
      then shortly afterwards the cpufreq code crashed on an assert:
      
       ------------[ cut here ]------------
       kernel BUG at drivers/cpufreq/cpufreq.c:1068!
       invalid opcode: 0000 [1] SMP
       [...]
       Call Trace:
        [<ffffffff805145d6>] sysdev_driver_unregister+0x5b/0x91
        [<ffffffff806ff520>] cpufreq_register_driver+0x15d/0x1a2
        [<ffffffff80cc0596>] powernowk8_init+0x86/0x94
       [...]
       ---[ end trace 1e9219be2b4431de ]---
      
      the bug was caused by maxcpus=1 bootup, which brought up the
      secondary core as !cpu_online() but !cpu_is_offline() either,
      which on on !CONFIG_HOTPLUG_CPU is always 0 (include/linux/cpu.h):
      
        /* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */
        static inline int cpu_is_offline(int cpu) { return 0; }
      
      but the cpufreq code uses cpu_online() and cpu_is_offline() in
      a mixed way - the low-level drivers use cpu_online(), while
      the cpufreq core uses cpu_is_offline(). This opened up the
      possibility to add the non-initialized sysdev device of the
      secondary core:
      
       cpufreq-core: trying to register driver powernow-k8
       cpufreq-core: adding CPU 0
       powernow-k8: BIOS error - no PSB or ACPI _PSS objects
       cpufreq-core: initialization failed
       cpufreq-core: adding CPU 1
       cpufreq-core: initialization failed
      
      which then blew up. The fix is to make cpu_is_offline() always
      the negation of cpu_online(). With that fix applied the kernel
      boots up fine without crashing:
      
       Calling initcall 0xffffffff80cc0510: powernowk8_init+0x0/0x94()
       powernow-k8: Found 1 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ processors (1 cpu cores) (version 2.20.00)
       powernow-k8: BIOS error - no PSB or ACPI _PSS objects
       initcall 0xffffffff80cc0510: powernowk8_init+0x0/0x94() returned -19.
       initcall 0xffffffff80cc0510 ran for 19 msecs: powernowk8_init+0x0/0x94()
       Calling initcall 0xffffffff80cc328f: init_lapic_nmi_sysfs+0x0/0x39()
      
      We could fix this by making CPU enumeration aware of max_cpus, but that
      would be more fragile IMO, and the cpu_online(cpu) != cpu_is_offline(cpu)
      possibility was quite confusing and a continuous source of bugs too.
      
      Most distributions have kernels with CPU hotplug enabled, so this bug
      remained hidden for a long time.
      
      Bug forensics:
      
      The broken cpu_is_offline() API variant was introduced via:
      
       commit a59d2e4e6977e7b94e003c96a41f07e96cddc340
       Author: Rusty Russell <rusty@rustcorp.com.au>
       Date:   Mon Mar 8 06:06:03 2004 -0800
      
           [PATCH] minor cleanups for hotplug CPUs
      
      ( this predates linux-2.6.git, this commit is available from Thomas's
        historic git tree. )
      
      Then 1.5 years later the cpufreq code made use of it:
      
       commit c32b6b8e
       Author: Ashok Raj <ashok.raj@intel.com>
       Date:   Sun Oct 30 14:59:54 2005 -0800
      
           [PATCH] create and destroy cpufreq sysfs entries based on cpu notifiers
      
       +       if (cpu_is_offline(cpu))
       +               return 0;
      
      which is a correct use of the subtly broken new API. v2.6.15 then
      shipped with this bug included.
      
      then it took two more years for random-kernel qa to hit it.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a263898f