1. 06 Apr, 2009 3 commits
  2. 31 Mar, 2009 9 commits
  3. 30 Mar, 2009 28 commits
    • Linus Torvalds's avatar
      Merge branch 'proc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan/proc · cf2f7d7c
      Linus Torvalds authored
      * 'proc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan/proc:
        Revert "proc: revert /proc/uptime to ->read_proc hook"
        proc 2/2: remove struct proc_dir_entry::owner
        proc 1/2: do PDE usecounting even for ->read_proc, ->write_proc
        proc: fix sparse warnings in pagemap_read()
        proc: move fs/proc/inode-alloc.txt comment into a source file
      cf2f7d7c
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6 · 53d8f670
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
        PCI PM: Make pci_prepare_to_sleep() disable wake-up if needed
        radeonfb: Use __pci_complete_power_transition()
        PCI PM: Introduce __pci_[start|complete]_power_transition() (rev. 2)
        PCI PM: Restore config spaces of all devices during early resume
        PCI PM: Make pci_set_power_state() handle devices with no PM support
        PCI PM: Put devices into low power states during late suspend (rev. 2)
        PCI PM: Move pci_restore_standard_config to pci-driver.c
        PCI PM: Use pci_set_power_state during early resume
        PCI PM: Consistently use variable name "error" for pm call return values
        kexec: Change kexec jump code ordering
        PM: Change hibernation code ordering
        PM: Change suspend code ordering
        PM: Rework handling of interrupts during suspend-resume
        PM: Introduce functions for suspending and resuming device interrupts
      53d8f670
    • Randy Dunlap's avatar
      dma-debug: fix printk formats (i386) · 93c36ed8
      Randy Dunlap authored
      Fix printk format warnings in dma-debug:
      
        lib/dma-debug.c:645: warning: format '%016llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t'
        lib/dma-debug.c:662: warning: format '%016llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t'
        lib/dma-debug.c:676: warning: format '%016llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t'
        lib/dma-debug.c:686: warning: format '%016llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t'
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      93c36ed8
    • Jeff Mahoney's avatar
      reiserfs: xattr_create is unused with xattrs disabled · 3a355cc6
      Jeff Mahoney authored
      This patch ifdefs xattr_create when xattrs aren't enabled.
      Signed-off-by: default avatarJeff Mahoney <jeffm@suse.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3a355cc6
    • Alexander Beregalov's avatar
      reiserfs: fix build breakage · 77e46586
      Alexander Beregalov authored
      Fix this build error when REISERFS_FS_POSIX_ACL is not set:
      
        fs/reiserfs/inode.c: In function 'reiserfs_new_inode':
        fs/reiserfs/inode.c:1919: warning: passing argument 1 of 'reiserfs_inherit_default_acl' from incompatible pointer type
        fs/reiserfs/inode.c:1919: warning: passing argument 2 of 'reiserfs_inherit_default_acl' from incompatible pointer type
        fs/reiserfs/inode.c:1919: warning: passing argument 3 of 'reiserfs_inherit_default_acl' from incompatible pointer type
        fs/reiserfs/inode.c:1919: error: too many arguments to function 'reiserfs_inherit_default_acl'
      
      due to a missing transaction-handle argument in the non-acl
      compatibility function.
      Signed-off-by: default avatarAlexander Beregalov <a.beregalov@gmail.com>
      Acked-by: default avatarJeff Mahoney <jeffm@suse.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      77e46586
    • Peter Zijlstra's avatar
      lockdep: fix deadlock in lockdep_trace_alloc · 2f850181
      Peter Zijlstra authored
      Heiko reported that we grab the graph lock with irqs enabled.
      
      Fix this by providng the same wrapper as all other lockdep entry
      functions have.
      Reported-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Nick Piggin <npiggin@suse.de>
      LKML-Reference: <1237544000.24626.52.camel@twins>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      2f850181
    • Alexey Dobriyan's avatar
      Revert "proc: revert /proc/uptime to ->read_proc hook" · a9caa3de
      Alexey Dobriyan authored
      This reverts commit 6c87df37.
      
      proc files implemented through seq_file do pread(2) now.
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      a9caa3de
    • Alexey Dobriyan's avatar
      proc 2/2: remove struct proc_dir_entry::owner · 99b76233
      Alexey Dobriyan authored
      Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
      as correctly noted at bug #12454. Someone can lookup entry with NULL
      ->owner, thus not pinning enything, and release it later resulting
      in module refcount underflow.
      
      We can keep ->owner and supply it at registration time like ->proc_fops
      and ->data.
      
      But this leaves ->owner as easy-manipulative field (just one C assignment)
      and somebody will forget to unpin previous/pin current module when
      switching ->owner. ->proc_fops is declared as "const" which should give
      some thoughts.
      
      ->read_proc/->write_proc were just fixed to not require ->owner for
      protection.
      
      rmmod'ed directories will be empty and return "." and ".." -- no harm.
      And directories with tricky enough readdir and lookup shouldn't be modular.
      We definitely don't want such modular code.
      
      Removing ->owner will also make PDE smaller.
      
      So, let's nuke it.
      
      Kudos to Jeff Layton for reminding about this, let's say, oversight.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=12454Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      99b76233
    • Alexey Dobriyan's avatar
      proc 1/2: do PDE usecounting even for ->read_proc, ->write_proc · 3dec7f59
      Alexey Dobriyan authored
      struct proc_dir_entry::owner is going to be removed. Now it's only necessary
      to protect PDEs which are using ->read_proc, ->write_proc hooks.
      
      However, ->owner assignments are racy and make it very easy for someone to switch
      ->owner on live PDE (as some subsystems do) without fixing refcounts and so on.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=12454
      
      So, ->owner is on death row.
      
      Proxy file operations exist already (proc_file_operations), just bump usecount
      when necessary.
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      3dec7f59
    • Milind Arun Choudhary's avatar
      proc: fix sparse warnings in pagemap_read() · 09729a99
      Milind Arun Choudhary authored
      fs/proc/task_mmu.c:696:12: warning: cast removes address space of expression
      fs/proc/task_mmu.c:696:9: warning: incorrect type in assignment (different address spaces)
      fs/proc/task_mmu.c:696:9:    expected unsigned long long [noderef] [usertype] <asn:1>*out
      fs/proc/task_mmu.c:696:9:    got unsigned long long [usertype] *<noident>
      fs/proc/task_mmu.c:697:12: warning: cast removes address space of expression
      fs/proc/task_mmu.c:697:9: warning: incorrect type in assignment (different address spaces)
      fs/proc/task_mmu.c:697:9:    expected unsigned long long [noderef] [usertype] <asn:1>*end
      fs/proc/task_mmu.c:697:9:    got unsigned long long [usertype] *<noident>
      fs/proc/task_mmu.c:723:12: warning: cast removes address space of expression
      fs/proc/task_mmu.c:723:26: error: subtraction of different types can't work (different address spaces)
      fs/proc/task_mmu.c:725:24: error: subtraction of different types can't work (different address spaces)
      Signed-off-by: default avatarMilind Arun Choudhary <milindchoudhary@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      09729a99
    • Randy Dunlap's avatar
      proc: move fs/proc/inode-alloc.txt comment into a source file · 1681bc30
      Randy Dunlap authored
      so that people will realize that it exists and can update it as needed.
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      1681bc30
    • Ingo Molnar's avatar
      lockdep: annotate reclaim context (__GFP_NOFS), fix SLOB · 19cefdff
      Ingo Molnar authored
      Impact: build fix
      
      fix typo in mm/slob.c:
      
       mm/slob.c:469: error: ‘flags’ undeclared (first use in this function)
       mm/slob.c:469: error: (Each undeclared identifier is reported only once
       mm/slob.c:469: error: for each function it appears in.)
      
      Cc: Nick Piggin <npiggin@suse.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <20090128135457.350751756@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      19cefdff
    • Linus Torvalds's avatar
      Merge branch 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 · dfbbe89e
      Linus Torvalds authored
      * 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (53 commits)
        drm: detect hdmi monitor by hdmi identifier (v3)
        drm: drm_fops.c unlock missing on error path
        drm: reorder struct drm_ioctl_desc to save space on 64 bit builds
        radeon: add some new pci ids
        drm: read EDID extensions from monitor
        drm: Use a little stash on the stack to avoid kmalloc in most DRM ioctls.
        drm/radeon: add regs required for occlusion queries support
        drm/i915: check the return value from the copy from user
        drm/radeon: fix logic in r600_page_table_init() to match ati_gart
        drm/radeon: r600 ptes are 64-bit, cleanup cleanup function.
        drm/radeon: don't call irq changes on r600 suspend/resume
        drm/radeon: fix r600 writeback across suspend/resume
        drm/radeon: fix r600 writeback setup.
        drm: fix warnings about new mappings in info code.
        drm/radeon: NULL noise: drivers/gpu/drm/radeon/radeon_*.c
        drm/radeon: fix r600 pci mapping calls.
        drm/radeon: r6xx/r7xx: fix possible oops in r600_page_table_cleanup()
        radeon: call the correct idle function, logic got inverted.
        drm/radeon: RS600: fix interrupt handling
        drm/r600: fix rptr address along lines of previous fixes to radeon.
        ...
      dfbbe89e
    • Linus Torvalds's avatar
      Merge branch 'iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip · 712b0006
      Linus Torvalds authored
      * 'iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (60 commits)
        dma-debug: make memory range checks more consistent
        dma-debug: warn of unmapping an invalid dma address
        dma-debug: fix dma_debug_add_bus() definition for !CONFIG_DMA_API_DEBUG
        dma-debug/x86: register pci bus for dma-debug leak detection
        dma-debug: add a check dma memory leaks
        dma-debug: add checks for kernel text and rodata
        dma-debug: print stacktrace of mapping path on unmap error
        dma-debug: Documentation update
        dma-debug: x86 architecture bindings
        dma-debug: add function to dump dma mappings
        dma-debug: add checks for sync_single_sg_*
        dma-debug: add checks for sync_single_range_*
        dma-debug: add checks for sync_single_*
        dma-debug: add checking for [alloc|free]_coherent
        dma-debug: add add checking for map/unmap_sg
        dma-debug: add checking for map/unmap_page/single
        dma-debug: add core checking functions
        dma-debug: add debugfs interface
        dma-debug: add kernel command line parameters
        dma-debug: add initialization code
        ...
      
      Fix trivial conflicts due to whitespace changes in arch/x86/kernel/pci-nommu.c
      712b0006
    • Rafael J. Wysocki's avatar
      PCI PM: Make pci_prepare_to_sleep() disable wake-up if needed · 8efb8c76
      Rafael J. Wysocki authored
      If the device is not supposed to wake up the system, ie. when
      device_may_wakeup(&dev->dev) returns 'false', pci_prepare_to_sleep()
      should pass 'false' to pci_enable_wake() so that it calls the
      platform to disable the wake-up capability of the device.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      8efb8c76
    • Rafael J. Wysocki's avatar
      radeonfb: Use __pci_complete_power_transition() · b8e676d2
      Rafael J. Wysocki authored
      Use __pci_complete_power_transition() to finalize the transition into
      D2 after programming the PMCSR of the device directly.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      b8e676d2
    • Rafael J. Wysocki's avatar
      PCI PM: Introduce __pci_[start|complete]_power_transition() (rev. 2) · 0e5dd46b
      Rafael J. Wysocki authored
      The radeonfb driver needs to program the device's PMCSR directly due
      to some quirky hardware it has to handle (see
      http://bugzilla.kernel.org/show_bug.cgi?id=12846 for details) and
      after doing that it needs to call the platform (usually ACPI) to
      finish the power transition of the device.  Currently it uses
      pci_set_power_state() for this purpose, however making a specific
      assumption about the internal behavior of this function, which has
      changed recently so that this assumption is no longer satisfied.
      For this reason, introduce __pci_complete_power_transition() that may
      be called by the radeonfb driver to complete the power transition of
      the device.  For symmetry, introduce __pci_start_power_transition().
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      0e5dd46b
    • Rafael J. Wysocki's avatar
      PCI PM: Restore config spaces of all devices during early resume · 931ff68a
      Rafael J. Wysocki authored
      At present the configuration spaces of PCI devices that have no
      drivers or no PM support in the drivers (either legacy or through a
      pm object) are not saved during suspend and, consequently, they are
      not restored during resume.  This generally may lead to the state of
      the system being slightly inconsistent after the resume, so it's
      better to save and restore the configuration spaces of these devices
      as well.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Acked-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      931ff68a
    • Rafael J. Wysocki's avatar
      PCI PM: Make pci_set_power_state() handle devices with no PM support · 4a865905
      Rafael J. Wysocki authored
      There is a problem with PCI devices without any PM support (either
      native or through the platform) that pci_set_power_state() always
      returns error code for them, even if they are being put into D0.
      However, such devices are always in D0, so pci_set_power_state()
      should return success when attempting to put such a device into D0.
      It also should update the current_state field for these devices as
      appropriate.  This modification is necessary so that the standard
      configuration registers of these devices are successfully restored by
      pci_restore_standard_config() during the "early" phase of resume.
      
      In addition, pci_set_power_state() should check the value of
      current_state before calling the platform to change the power state
      of the device to avoid doing that unnecessarily.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Acked-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      4a865905
    • Rafael J. Wysocki's avatar
      PCI PM: Put devices into low power states during late suspend (rev. 2) · 46939f8b
      Rafael J. Wysocki authored
      Once we have allowed timer interrupts to be enabled during the late
      phase of suspending devices, we are now able to use the generic
      pci_set_power_state() to put PCI devices into low power states at
      that time.  We can also use some related platform callbacks, like the
      ones preparing devices for wake-up, during the late suspend.
      
      Doing this will allow us to avoid the race condition where a device
      using shared interrupts is put into a low power state with interrupts
      enabled and then an interrupt (for another device) comes in and
      confuses its driver.  At the same time, devices that don't support
      the native PCI PM or that require some additional, platform-specific
      operations to be carried out to put them into low power states will
      be handled as appropriate.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Acked-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      46939f8b
    • Rafael J. Wysocki's avatar
      PCI PM: Move pci_restore_standard_config to pci-driver.c · 0128a89c
      Rafael J. Wysocki authored
      Move pci_restore_standard_config() from pci.c to pci-driver.c and
      make it static.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Acked-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      0128a89c
    • Rafael J. Wysocki's avatar
      PCI PM: Use pci_set_power_state during early resume · f00a20ef
      Rafael J. Wysocki authored
      Once we have allowed timer interrupts to be enabled during the early
      phase of resuming devices, we are now able to use the generic
      pci_set_power_state() to put PCI devices into D0 at that time.  Then,
      the platform-specific PM code will have a chance to handle devices
      that don't implement the native PCI PM or that require some
      additional, platform-specific operations to be carried out to power
      them up.  Also, by doing this we can simplify the code quite a bit.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Acked-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      f00a20ef
    • Frans Pop's avatar
      PCI PM: Consistently use variable name "error" for pm call return values · 57ef8026
      Frans Pop authored
      I noticed two functions use a variable "i" to store the return value of PM
      function calls while the rest of the file uses "error". As "i" normally
      indicates a counter of some sort it seems better to keep this consistent.
      Signed-off-by: default avatarFrans Pop <elendil@planet.nl>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      57ef8026
    • Rafael J. Wysocki's avatar
      kexec: Change kexec jump code ordering · 749b0afc
      Rafael J. Wysocki authored
      Change the ordering of the kexec jump code so that the nonboot CPUs
      are disabled after calling device drivers' "late suspend" methods.
      
      This change reflects the recent modifications of the power management
      code that is also used by kexec jump.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      749b0afc
    • Rafael J. Wysocki's avatar
      PM: Change hibernation code ordering · 4aecd671
      Rafael J. Wysocki authored
      Change the ordering of the hibernation core code so that the platform
      "prepare" callbacks are executed and the nonboot CPUs are disabled
      after calling device drivers' "late suspend" methods.
      
      This change (along with the previous analogous change of the suspend
      core code) will allow us to rework the PCI PM core so that the power
      state of devices is changed in the "late" phase of suspend (and
      analogously in the "early" phase of resume), which in turn will allow
      us to avoid the race condition where a device using shared interrupts
      is put into a low power state with interrupts enabled and then an
      interrupt (for another device) comes in and confuses its driver.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      4aecd671
    • Rafael J. Wysocki's avatar
      PM: Change suspend code ordering · 900af0d9
      Rafael J. Wysocki authored
      Change the ordering of the suspend core code so that the platform
      "prepare" callback is executed and the nonboot CPUs are disabled
      after calling device drivers' "late suspend" methods.
      
      This change will allow us to rework the PCI PM core so that the power
      state of devices is changed in the "late" phase of suspend (and
      analogously in the "early" phase of resume), which in turn will allow
      us to avoid the race condition where a device using shared interrupts
      is put into a low power state with interrupts enabled and then an
      interrupt (for another device) comes in and confuses its driver.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      900af0d9
    • Rafael J. Wysocki's avatar
      PM: Rework handling of interrupts during suspend-resume · 2ed8d2b3
      Rafael J. Wysocki authored
      Use the functions introduced in by the previous patch,
      suspend_device_irqs(), resume_device_irqs() and check_wakeup_irqs(),
      to rework the handling of interrupts during suspend (hibernation) and
      resume.  Namely, interrupts will only be disabled on the CPU right
      before suspending sysdevs, while device drivers will be prevented
      from receiving interrupts, with the help of the new helper function,
      before their "late" suspend callbacks run (and analogously during
      resume).
      
      In addition, since the device interrups are now disabled before the
      CPU has turned all interrupts off and the CPU will ACK the interrupts
      setting the IRQ_PENDING bit for them, check in sysdev_suspend() if
      any wake-up interrupts are pending and abort suspend if that's the
      case.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      2ed8d2b3
    • Rafael J. Wysocki's avatar
      PM: Introduce functions for suspending and resuming device interrupts · 0a0c5168
      Rafael J. Wysocki authored
      Introduce helper functions allowing us to prevent device drivers from
      getting any interrupts (without disabling interrupts on the CPU)
      during suspend (or hibernation) and to make them start to receive
      interrupts again during the subsequent resume.  These functions make it
      possible to keep timer interrupts enabled while the "late" suspend and
      "early" resume callbacks provided by device drivers are being
      executed.  In turn, this allows device drivers' "late" suspend and
      "early" resume callbacks to sleep, execute ACPI callbacks etc.
      
      The functions introduced here will be used to rework the handling of
      interrupts during suspend (hibernation) and resume.  Namely,
      interrupts will only be disabled on the CPU right before suspending
      sysdevs, while device drivers will be prevented from receiving
      interrupts, with the help of the new helper function, before their
      "late" suspend callbacks run (and analogously during resume).
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      0a0c5168