1. 22 Apr, 2008 12 commits
    • Hidetoshi Seto's avatar
      [IA64] disable interrupts on exit of ia64_trace_syscall · 38477ad7
      Hidetoshi Seto authored
      While testing with CONFIG_VIRT_CPU_ACCOUNTING=y, I found that
      I occasionally get very huge system time in some threads.
      
      So I dug the issue and finally noticed that it was caused
      because of an interrupt which interrupt in the following window:
      
      > [arch/ia64/kernel/entry.S: (!CONFIG_PREEMPT && CONFIG_VIRT_CPU_ACCOUNTING)]
      >
      > ENTRY(ia64_leave_syscall)
      >    :
      > (pUStk) rsm psr.i
      >         cmp.eq pLvSys,p0=r0,r0          // pLvSys=1: leave from syscall
      > (pUStk) cmp.eq.unc p6,p0=r0,r0          // p6 <- pUStk
      > .work_processed_syscall:
      >         adds r2=PT(LOADRS)+16,r12
      > (pUStk) mov.m r22=ar.itc                        // fetch time at leave
      >         adds r18=TI_FLAGS+IA64_TASK_SIZE,r13
      >         ;;
      > <<< window: from here >>>
      > (p6)    ld4 r31=[r18]  // load current_thread_info()->flags
      >         ld8 r19=[r2],PT(B6)-PT(LOADRS)
      >         adds r3=PT(AR_BSPSTORE)+16,r12
      >         ;;
      >         mov r16=ar.bsp
      >         ld8 r18=[r2],PT(R9)-PT(B6)
      > (p6)    and r15=TIF_WORK_MASK,r31  // any work other than TIF_SYSCALL_TRACE?
      >         ;;
      >         ld8 r23=[r3],PT(R11)-PT(AR_BSPSTORE)
      > (p6)    cmp4.ne.unc p6,p0=r15, r0               // any special work pending?
      > (p6)    br.cond.spnt .work_pending_syscall
      >         ;;
      >         ld8 r9=[r2],PT(CR_IPSR)-PT(R9)
      >         ld8 r11=[r3],PT(CR_IIP)-PT(R11)
      > (pNonSys) break 0 // bug check: we shouldn't be here if pNonSys is TRUE!
      >         ;;
      >         invala
      > <<< window: to here >>>
      >         rsm psr.i | psr.ic // turn off interrupts and interruption collection
      
      If pUStk is true, it means we are going to return user mode, hence we fetch
      ar.itc to get time at leave from system.
      It seems that it is not possible to interrupt the window if pUStk is true,
      because interrupts are disabled early.  And also disabling interrupt makes
      sense because it is safe for referring current_thread_info()->flags.
      
      However interrupting the window while pUStk is true was possible.
      The route was:
      ia64_trace_syscall
      -> .work_pending_syscall_end
      -> .work_processed_syscall
      Only in case entering the window from this route, interrupts are enabled
      during in the window even if pUStk is true.  I suppose interrupts must be
      disabled here anyway if pUStk is true.
      I'm not sure but afraid that what kind of bad effect were there, other
      than crazy system time which I found.
      
      FYI, there was a commit 6f6d7582 that
      points out a bug at same point(exit of ia64_trace_syscall) in 2006.
      It can be said that there was an another bug.
      Signed-off-by: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
      38477ad7
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband · 80750147
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
        IB/ipath: Correct capitalization "IntX" -> "INTx"
        IB/ipath: Remove tests of PCI_MSI in ipath_iba7220.c
        IB/ipath: Remove dependency on PCI_MSI || HT_IRQ
        IB/ipath: Build IBA7220 code unconditionally
        IB/ipath: Remove reference to dev->class_dev
        IB/ipath: Fix module parameter description for disable_sma
        RDMA/nes: Remove unneeded function declarations
      
      Fix up conflict in drivers/infiniband/hw/ipath/ipath_verbs.c (by picking
      the solution from the infiniband branch)
      80750147
    • Roland Dreier's avatar
      IB/ipath: Correct capitalization "IntX" -> "INTx" · bc751fe6
      Roland Dreier authored
      Match what the PCI specification uses.
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      bc751fe6
    • Roland Dreier's avatar
      IB/ipath: Remove tests of PCI_MSI in ipath_iba7220.c · 44957572
      Roland Dreier authored
      The PCI MSI interface is stubbed out properly so that all the
      functions just return failure if PCI_MSI=n, so there's no reason to
      have "#ifdef CONFIG_PCI_MSI" blocks in ipath_iba7220.c.
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      44957572
    • Roland Dreier's avatar
      IB/ipath: Remove dependency on PCI_MSI || HT_IRQ · 480f58e6
      Roland Dreier authored
      Before IBA7220 support was added, the ipath driver didn't support any
      hardware unless PCI_MSI and/or HT_IRQ was enabled.  However, the
      IBA7220 can generate INTx interrupts, so it makes sense to allow the
      driver to be build even if PCI_MSI=n and HT_IRQ=n.
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      480f58e6
    • Roland Dreier's avatar
      IB/ipath: Build IBA7220 code unconditionally · 37a6ab52
      Roland Dreier authored
      The new IBA7220 code added a call to ipath_init_iba7220_funcs() that
      is compiled unconditionally, but only built the IBA7220 code if
      PCI_MSI is enabled.  Fix this by building the IBA7220 file
      unconditonally.
      
      This fixes build breakage when PCI_MSI=n, HT_IRQ=y and
      INFINIBAND_IPATH=y reported by Ingo Molnar <mingo@elte.hu>:
      
       drivers/built-in.o: In function `ipath_init_one':
       ipath_driver.c:(.devinit.text+0x1e5bc): undefined reference to `ipath_init_iba7220_funcs'
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      37a6ab52
    • Roland Dreier's avatar
      IB/ipath: Remove reference to dev->class_dev ... · 88a8317b
      Roland Dreier authored
      IB/ipath: Remove reference to dev->class_dev                                                        
                                                                                                          
      Commit 124b4dcb ("IB/ipath: add calls to new 7220 code and enable in                                
      build") inadvertently added core to set dev->class_dev.dev back into                                
      ib_ipath.  This is completely redundant since commit 1912ffbb ("IB: Set                             
      class_dev->dev in core for nice device symlink"), which removed                                     
      class_dev setting from low-level drivers, and also will break the build
      when class_dev is removed completely from struct ib_device.
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      88a8317b
    • Paul Bolle's avatar
      IB/ipath: Fix module parameter description for disable_sma · 9862874d
      Paul Bolle authored
      Describe disable_sma parameter with its name rather than the internal
      ib_ipath_disable_sma variable name, so that the description shows up
      properly in modinfo.
      Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
      Acked-by: default avatarRalph Campbell <ralph.campbell@qlogic.com>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      9862874d
    • Roland Dreier's avatar
      RDMA/nes: Remove unneeded function declarations · 6a5546e7
      Roland Dreier authored
      Remove redundant static declarations of functions that are defined
      before they are used in the source.
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      6a5546e7
    • Stephen Rothwell's avatar
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc · 135cedad
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (26 commits)
        mmc: sdio_ops.c should #include "sdio_ops.h"
        mmc: proper prototypes for mmc_attach_*()
        mmc: make __mmc_release_bus() static
        sdhci: improve no card, no reset quirk
        MMC: OMAP: Do not busy wait for end of command for ever
        MMC: OMAP: Start new commands from work queue instead of irq
        MMC: OMAP: Lazy clock shutdown
        MMC: OMAP: Move failing command abortion to workqueue
        MMC: OMAP: Use tasklet instead of workqueue for cover switch notification
        MMC: OMAP: Check the get_cover_state function pointer if not set
        MMC: OMAP: Using setup_timer instead of init_timer
        MMC: OMAP: Abort stuck commands
        MMC: OMAP: General cleanup for MMC multislot support
        MMC: OMAP: Power functions modified to MMC multislot support
        MMC: OMAP: Fix timeout calculation for MMC multislot support
        MMC: OMAP: New release dma and abort xfer functions
        MMC: OMAP: Add back cover switch support
        MMC: OMAP: Introduce new multislot structure and change driver to use it
        MMC: OMAP: Remove cover switch handling to allow adding multislot support
        MMC: OMAP: Fix the BYTEBLOCK capability removal
        ...
      135cedad
    • Linus Torvalds's avatar
      8a322726
  2. 21 Apr, 2008 28 commits