Skip to content
  1. Aug 05, 2009
    • Dave Jones's avatar
      [CPUFREQ] Make cpufreq suspend code conditional on powerpc. · 4bc5d341
      Dave Jones authored
      The suspend code runs with interrupts disabled, and the powerpc workaround we
      do in the cpufreq suspend hook calls the drivers ->get method.
      
      powernow-k8's ->get does an smp_call_function_single
      which needs interrupts enabled
      
      cpufreq's suspend/resume code was added in 42d4dc3f
      
       to work around
      a hardware problem on ppc powerbooks.  If we make all this code
      conditional on powerpc, we avoid the issue above.
      
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      4bc5d341
    • Thomas Renninger's avatar
      [CPUFREQ] Fix a kobject reference bug related to managed CPUs · d5194dec
      Thomas Renninger authored
      The first offline/online cycle is successful, the second not.
      Doing:
      echo 0 >cpu1/online
      echo 1 >cpu1/online
      echo 0 >cpu1/online
      
      The last command will trigger:
      Jul 22 14:39:50 linux kernel: [  593.210125] ------------[ cut here ]------------
      Jul 22 14:39:50 linux kernel: [  593.210139] WARNING: at lib/kref.c:43 kref_get+0x23/0x2b()
      Jul 22 14:39:50 linux kernel: [  593.210144] Hardware name: To Be Filled By O.E.M.
      Jul 22 14:39:50 linux kernel: [  593.210148] Modules linked in: powernow_k8
      Jul 22 14:39:50 linux kernel: [  593.210158] Pid: 378, comm: kondemand/2 Tainted: G        W  2.6.31-rc2 #38
      Jul 22 14:39:50 linux kernel: [  593.210163] Call Trace:
      Jul 22 14:39:50 linux kernel: [  593.210171]  [<ffffffff812008e8>] ? kref_get+0x23/0x2b
      Jul 22 14:39:50 linux kernel: [  593.210181]  [<ffffffff81041926>] warn_slowpath_common+0x77/0xa4
      Jul 22 14:39:50 linux kernel: [  593.210190]  [<ffffffff81041962>] warn_slowpath_null+0xf/0x11
      Jul 22 14:39:50 linux kernel: [  593.210198]  [<ffffffff812008e8>] kref_get+0x23/0x2b
      Jul 22 14:39:50 linux kernel: [  593.210206]  [<ffffffff811ffa19>] kobject_get+0x1a/0x22
      Jul 22 14:39:50 linux kernel: [  593.210214]  [<ffffffff813e815d>] cpufreq_cpu_get+0x8a/0xcb
      Jul 22 14:39:50 linux kernel: [  593.210222]  [<ffffffff813e87d1>] __cpufreq_driver_getavg+0x1d/0x67
      Jul 22 14:39:50 linux kernel: [  593.210231]  [<ffffffff813ea18f>] do_dbs_timer+0x158/0x27f
      Jul 22 14:39:50 linux kernel: [  593.210240]  [<ffffffff810529ea>] worker_thread+0x200/0x313
      ...
      
      The output continues on every do_dbs_timer ondemand freq checking poll.
      This regression was introduced by git commit:
      3f4a782b
      
      
      
      The policy is released when the cpufreq device is removed in:
      __cpufreq_remove_dev():
      	/* if this isn't the CPU which is the parent of the kobj, we
      	 * only need to unlink, put and exit
      	 */
      
      Not creating the symlink is not sever at all.
      As long as:
      sysfs_remove_link(&sys_dev->kobj, "cpufreq");
      handles it gracefully that the symlink did not exist.
      Possibly no error should be returned at all, because ondemand
      governor would still provide the same functionality.
      Userspace in userspace gov case might be confused if the link
      is missing.
      
      Resolves http://bugzilla.kernel.org/show_bug.cgi?id=13903
      
      CC: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      CC: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: default avatarThomas Renninger <trenn@suse.de>
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      d5194dec
    • Prarit Bhargava's avatar
      [CPUFREQ] Do not set policy for offline cpus · 42c74b84
      Prarit Bhargava authored
      
      
      Suspend/Resume fails on multi socket, multi core systems because the cpufreq
      code erroneously sets the per_cpu policy_cpu value when a logical cpu is
      offline.
      
      This most notably results in missing sysfs files that are used to set the
      cpu frequencies of the various cpus.
      
      Signed-off-by: default avatarPrarit Bhargava <prarit@redhat.com>
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      42c74b84
    • Pallipadi, Venkatesh's avatar
      [CPUFREQ] Fix NULL pointer dereference regression in conservative governor · 26d204af
      Pallipadi, Venkatesh authored
      Commit ee88415c
      
      
      introduced this regression when it removed enable bit in cpu_dbs_info_s.
      That added a possibility of dbs_cpufreq_notifier getting called for a
      CPU that is not yet managed by conservative governor. That will happen
      as the transition notifier is set as soon as one CPU switches to
      conservative governor and other CPUs can get a NULL pointer dereference
      without the enable bit check. Add the enable bit back again.
      
      Reported-by: default avatarLermytte Christophe <Christophe.Lermytte@thomson.net>
      Signed-off-by: default avatarVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      26d204af
  2. Aug 03, 2009
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://neil.brown.name/md · a33a052f
      Linus Torvalds authored
      * 'for-linus' of git://neil.brown.name/md:
        md: Use revalidate_disk to effect changes in size of device.
        md: allow raid5_quiesce to work properly when reshape is happening.
        md/raid5: set reshape_position correctly when reshape starts.
        md: Handle growth of v1.x metadata correctly.
        md: avoid array overflow with bad v1.x metadata
        md: when a level change reduces the number of devices, remove the excess.
        md: Push down data integrity code to personalities.
        md/raid6: release spare page at ->stop()
      a33a052f
    • NeilBrown's avatar
      md: Use revalidate_disk to effect changes in size of device. · 449aad3e
      NeilBrown authored
      
      
      As revalidate_disk calls check_disk_size_change, it will cause
      any capacity change of a gendisk to be propagated to the blockdev
      inode.  So use that instead of mucking about with locks and
      i_size_write.
      
      Also add a call to revalidate_disk in do_md_run and a few other places
      where the gendisk capacity is changed.
      
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      449aad3e
    • NeilBrown's avatar
      md: allow raid5_quiesce to work properly when reshape is happening. · 64bd660b
      NeilBrown authored
      
      
      The ->quiesce method is not supposed to stop resync/recovery/reshape,
      just normal IO.
      But in raid5 we don't have a way to know which stripes are being
      used for normal IO and which for resync etc, so we need to wait for
      all stripes to be idle to be sure that all writes have completed.
      
      However reshape keeps at least some stripe busy for an extended period
      of time, so a call to raid5_quiesce can block for several seconds
      needlessly.
      So arrange for reshape etc to pause briefly while raid5_quiesce is
      trying to quiesce the array so that the active_stripes count can
      drop to zero.
      
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      64bd660b
    • NeilBrown's avatar
      md/raid5: set reshape_position correctly when reshape starts. · e516402c
      NeilBrown authored
      
      
      As the internal reshape_progress counter is the main driver
      for reshape, the fact that reshape_position sometimes starts with the
      wrong value has minimal effect.  It is visible in sysfs and that
      is all.
      
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      e516402c
    • NeilBrown's avatar
      md: Handle growth of v1.x metadata correctly. · 70471daf
      NeilBrown authored
      
      
      The v1.x metadata does not have a fixed size and can grow
      when devices are added.
      If it grows enough to require an extra sector of storage,
      we need to update the 'sb_size' to match.
      
      Without this, md can write out an incomplete superblock with a
      bad checksum, which will be rejected when trying to re-assemble
      the array.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      70471daf
    • NeilBrown's avatar
      md: avoid array overflow with bad v1.x metadata · 3673f305
      NeilBrown authored
      
      
      We trust the 'desc_nr' field in v1.x metadata enough to use it
      as an index in an array.  This isn't really safe.
      So range-check the value first.
      
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      3673f305
    • NeilBrown's avatar
      md: when a level change reduces the number of devices, remove the excess. · 3a981b03
      NeilBrown authored
      
      
      When an array is changed from RAID6 to RAID5, fewer drives are
      needed.  So any device that is made superfluous by the level
      conversion must be marked as not-active.
      For the RAID6->RAID5 conversion, this will be a drive which only
      has 'Q' blocks on it.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      3a981b03
    • Andre Noll's avatar
      md: Push down data integrity code to personalities. · ac5e7113
      Andre Noll authored
      
      
      This patch replaces md_integrity_check() by two new public functions:
      md_integrity_register() and md_integrity_add_rdev() which are both
      personality-independent.
      
      md_integrity_register() is called from the ->run and ->hot_remove
      methods of all personalities that support data integrity.  The
      function iterates over the component devices of the array and
      determines if all active devices are integrity capable and if their
      profiles match. If this is the case, the common profile is registered
      for the mddev via blk_integrity_register().
      
      The second new function, md_integrity_add_rdev() is called from the
      ->hot_add_disk methods, i.e. whenever a new device is being added
      to a raid array. If the new device does not support data integrity,
      or has a profile different from the one already registered, data
      integrity for the mddev is disabled.
      
      For raid0 and linear, only the call to md_integrity_register() from
      the ->run method is necessary.
      
      Signed-off-by: default avatarAndre Noll <maan@systemlinux.org>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      ac5e7113
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog · 4905f92e
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
        [WATCHDOG] Fix COH 901 327 watchdog enablement
      4905f92e
    • Linus Torvalds's avatar
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 · 0ce166b7
      Linus Torvalds authored
      * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
        eeepc-laptop: fix hot-unplug on resume
        ACPI: Ingore the memory block with zero block size in course of memory hotplug
        ACPI: Don't treat generic error as ACPI error code in acpi memory hotplug driver
        ACPI: bind workqueues to CPU 0 to avoid SMI corruption
        ACPI: root-only read protection on /sys/firmware/acpi/tables/*
        thinkpad-acpi: fix incorrect use of TPACPI_BRGHT_MODE_ECNVRAM
        thinkpad-acpi: restrict procfs count value to sane upper limit
        thinkpad-acpi: remove dock and bay subdrivers
        thinkpad-acpi: disable broken bay and dock subdrivers
        hp-wmi: check that an input device exists in resume handler
        Revert "ACPICA: Remove obsolete acpi_os_validate_address interface"
      0ce166b7
    • Greg Kroah-Hartman's avatar
      TTY: Maintainer change · 57d7f282
      Greg Kroah-Hartman authored
      
      
      Clearly, I am a glutton for punishment.  I'll see if I can see Alan's
      changes through to the end, otherwise I'll be fending off a lot of bug
      reports for usb-serial devices.
      
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      57d7f282
    • Linus Torvalds's avatar
      Make pci_claim_resource() use request_resource() rather than insert_resource() · 79896cf4
      Linus Torvalds authored
      This function has traditionally used "insert_resource()", because before
      commit cebd78a8 ("Fix pci_claim_resource") it used to just insert the
      resource into whatever root resource tree that was indicated by
      "pcibios_select_root()".
      
      So there Matthew fixed it to actually look up the proper parent
      resource, which means that now it's actively wrong to then traverse the
      resource tree any more: we already know exactly where the new resource
      should go.
      
      And when we then did commit a76117df
      
       ("x86: Use pci_claim_resource"),
      which changed the x86 PCI code from the open-coded
      
      	pr = pci_find_parent_resource(dev, r);
      	if (!pr || request_resource(pr, r) < 0) {
      
      to using
      
      	if (pci_claim_resource(dev, idx) < 0) {
      
      that "insert_resource()" now suddenly became a problem, and causes a
      regression covered by
      
      	http://bugzilla.kernel.org/show_bug.cgi?id=13891
      
      which this fixes.
      
      Reported-and-tested-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Cc: Matthew Wilcox <willy@linux.intel.com>
      Cc: Andrew Patterson <andrew.patterson@hp.com>
      Cc: Linux PCI <linux-pci@vger.kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      79896cf4
    • Linus Walleij's avatar
      [WATCHDOG] Fix COH 901 327 watchdog enablement · 5973bee4
      Linus Walleij authored
      
      
      Since the COH 901 327 found in U300 is clocked at 32 kHz we need
      to wait for the interrupt clearing flag to propagate through
      hardware in order not to accidentally fire off any interrupts
      when we enable them.
      
      Signed-off-by: default avatarLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      5973bee4
    • Len Brown's avatar
      Merge branch 'misc-2.6.31' into release · 3be4ee51
      Len Brown authored
      3be4ee51
    • Len Brown's avatar
      Merge branch 'bugzilla-13825' into release · 95452a6c
      Len Brown authored
      95452a6c
    • Alan Jenkins's avatar
      eeepc-laptop: fix hot-unplug on resume · 7334546a
      Alan Jenkins authored
      
      
      OOPS on resume when the wireless adaptor is disabled during suspend was
      introduced by "eeepc-laptop: read rfkill soft-blocked state on resume".
      
      Unable to handle kernel NULL pointer dereference
      
      Process s2disk
      Tainted: G W
      IP: klist_put
      
      Call trace:
      ? klist_del
      ? device_del
      ? device_unregister
      ? pci_stop_dev
      ? pci_stop_bus
      ? pci_remove_device
      ? eeepc_rfkill_hotplug [eeepc_laptop]
      ? eeepc_hotk_resume [eeepc_laptop]
      ? acpi_device_resume
      ? device_resume
      ? hibernation_snapshot
      
      It appears the PCI device is removed twice.  The eeepc_rfkill_hotplug()
      call from the resume handler is racing against the call from the ACPI
      notifier callback.  The ACPI notification is triggered by the resume
      handler when it refreshes the value of CM_ASL_WLAN.
      
      The fix is to serialize hotplug calls using a workqueue.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=13825
      
      Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Acked-by: default avatarCorentin Chary <corentin.chary@gmail.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      7334546a
    • Len Brown's avatar
      Merge branch 'memhotplug-crash' into release · a571a79a
      Len Brown authored
      a571a79a
    • Zhao Yakui's avatar
      ACPI: Ingore the memory block with zero block size in course of memory hotplug · 5d2619fc
      Zhao Yakui authored
      
      
      If the memory block size is zero, ignore it and don't do the memory hotplug
      flowchart. Otherwise it will complain the following warning message:
        >System RAM resource 0 - ffffffffffffffff cannot be added
      
      Signed-off-by: default avatarZhao Yakui <yakui.zhao@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      5d2619fc
    • Zhao Yakui's avatar
      ACPI: Don't treat generic error as ACPI error code in acpi memory hotplug driver · aa7b2b2e
      Zhao Yakui authored
      
      
      Don't treat the generic error as ACPI error code. Otherwise when the generic
      code is returned, it will complain the following warning messag:
         >ACPI Exception (acpi_memhotplug-0171): UNKNOWN_STATUS_CODE,
      		Cannot get acpi bus device [20080609]
         >ACPI: Cannot find driver data
         > ACPI Error (utglobal-0127): Unknown exception code: 0xFFFFFFED [20080609]
         > Pid: 85, comm: kacpi_notify Not tainted 2.6.27.19-5-default #1
           Call Trace:
           [<ffffffff8020da29>] show_trace_log_lvl+0x41/0x58
           [<ffffffff8049a3da>] dump_stack+0x69/0x6f
          .....
      
      At the same time when the generic error code is returned, the ACPI_EXCEPTION
      is replaced by the printk.
      
      Signed-off-by: default avatarZhao Yakui <yakui.zhao@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      aa7b2b2e
    • Len Brown's avatar
      Merge branch 'bugzilla-13751' into release · 6a614877
      Len Brown authored
      6a614877
    • Bjorn Helgaas's avatar
      ACPI: bind workqueues to CPU 0 to avoid SMI corruption · 74b58208
      Bjorn Helgaas authored
      
      
      On some machines, a software-initiated SMI causes corruption unless the
      SMI runs on CPU 0.  An SMI can be initiated by any AML, but typically it's
      done in GPE-related methods that are run via workqueues, so we can avoid
      the known corruption cases by binding the workqueues to CPU 0.
      
      References:
          http://bugzilla.kernel.org/show_bug.cgi?id=13751
          https://bugs.launchpad.net/bugs/157171
          https://bugs.launchpad.net/bugs/157691
      
      Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      74b58208
  3. Aug 02, 2009
  4. Aug 01, 2009