1. 27 7月, 2016 1 次提交
  2. 06 2月, 2016 1 次提交
    • B
      PCI: Remove includes of asm/pci-bridge.h · 952bbcb0
      Bjorn Helgaas 提交于
      Drivers should include asm/pci-bridge.h only when they need the arch-
      specific things provided there.  Outside of the arch/ directories, the only
      drivers that actually need things provided by asm/pci-bridge.h are the
      powerpc RPA hotplug drivers in drivers/pci/hotplug/rpa*.
      
      Remove the includes of asm/pci-bridge.h from the other drivers, adding an
      include of linux/pci.h if necessary.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      952bbcb0
  3. 18 4月, 2015 1 次提交
    • Q
      ide: remove deprecated use of pci api · d681f116
      Quentin Lambert 提交于
      Replace occurences of the pci api by appropriate call to the dma api.
      
      A simplified version of the semantic patch that finds this problem is as
      follows: (http://coccinelle.lip6.fr)
      
      @deprecated@
      idexpression id;
      position p;
      @@
      
      (
        pci_dma_supported@p ( id, ...)
      |
        pci_alloc_consistent@p ( id, ...)
      )
      
      @bad1@
      idexpression id;
      position deprecated.p;
      @@
      ...when != &id->dev
         when != pci_get_drvdata ( id )
         when != pci_enable_device ( id )
      (
        pci_dma_supported@p ( id, ...)
      |
        pci_alloc_consistent@p ( id, ...)
      )
      
      @depends on !bad1@
      idexpression id;
      expression direction;
      position deprecated.p;
      @@
      
      (
      - pci_dma_supported@p ( id,
      + dma_supported ( &id->dev,
      ...
      + , GFP_ATOMIC
        )
      |
      - pci_alloc_consistent@p ( id,
      + dma_alloc_coherent ( &id->dev,
      ...
      + , GFP_ATOMIC
        )
      )
      Signed-off-by: NQuentin Lambert <lambert.quentin@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d681f116
  4. 23 3月, 2015 1 次提交
    • D
      powerpc: Move Power Macintosh drivers to generic byteswappers · f5718726
      David Gibson 提交于
      ppc has special instruction forms to efficiently load and store values
      in non-native endianness.  These can be accessed via the arch-specific
      {ld,st}_le{16,32}() inlines in arch/powerpc/include/asm/swab.h.
      
      However, gcc is perfectly capable of generating the byte-reversing
      load/store instructions when using the normal, generic cpu_to_le*() and
      le*_to_cpu() functions eaning the arch-specific functions don't have much
      point.
      
      Worse the "le" in the names of the arch specific functions is now
      misleading, because they always generate byte-reversing forms, but some
      ppc machines can now run a little-endian kernel.
      
      To start getting rid of the arch-specific forms, this patch removes them
      from all the old Power Macintosh drivers, replacing them with the
      generic byteswappers.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      f5718726
  5. 15 11月, 2013 2 次提交
  6. 04 1月, 2013 1 次提交
    • G
      Drivers: ide: remove __dev* attributes. · fe31edc8
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fe31edc8
  7. 01 11月, 2011 1 次提交
  8. 23 11月, 2010 1 次提交
  9. 02 6月, 2010 1 次提交
  10. 19 5月, 2010 1 次提交
  11. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  12. 04 2月, 2010 1 次提交
  13. 19 1月, 2010 2 次提交
  14. 09 12月, 2009 1 次提交
    • B
      powerpc/macio: Rework hotplug media bay support · d58b0c39
      Benjamin Herrenschmidt 提交于
      The hotplug mediabay has tendrils deep into drivers/ide code
      which makes a libata port reather difficult. In addition it's
      ugly and could be done better.
      
      This reworks the interface between the mediabay and the rest
      of the world so that:
      
         - Any macio_driver can now have a mediabay_event callback
      which will be called when that driver sits on a mediabay and
      it's been either plugged or unplugged. The device type is
      passed as an argument. We can now move all the IDE cruft
      into the IDE driver itself
      
         - A check_media_bay() function can be used to take a peek
      at the type of device currently in the bay if any, a cleaner
      variant of the previous function with the same name.
      
         - A pair of lock/unlock functions are exposed to allow the
      IDE driver to block the hotplug callbacks during the initial
      setup and probing of the bay in order to avoid nasty race
      conditions.
      
         - The mediabay code no longer needs to spin on the status
      register of the IDE interface when it detects an IDE device,
      this is done just fine by the IDE code itself
      
      Overall, less code, simpler, and allows for another driver
      than our old drivers/ide based one.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d58b0c39
  15. 18 5月, 2009 2 次提交
  16. 18 4月, 2009 1 次提交
  17. 01 4月, 2009 7 次提交
  18. 27 3月, 2009 4 次提交
    • B
      ide: add ->dma_timer_expiry method and remove ->dma_exec_cmd one (v2) · 22117d6e
      Bartlomiej Zolnierkiewicz 提交于
      * Rename dma_timer_expiry() to ide_dma_sff_timer_expiry() and export it.
      
      * Add ->dma_timer_expiry method and use it to set hwif->expiry for
        ATA_PROT_DMA protocol in do_rw_taskfile().
      
      * Initialize ->dma_timer_expiry to ide_dma_sff_timer_expiry() for SFF hosts.
      
      * Move setting hwif->expiry from ide_execute_command() to its users and drop
        'expiry' argument.
      
      * Use ide_execute_command() instead of ->dma_exec_cmd in do_rw_taskfile().
      
      * Remove ->dma_exec_cmd method and its implementations.
      
      * Unexport ide_execute_command() and ide_dma_intr().
      
      v2:
      * Fix CONFIG_BLK_DEV_IDEDMA=n build (noticed by Randy Dunlap).
      
      * Fix *dma_expiry naming (suggested by Sergei Shtylyov).
      
      There should be no functional changes caused by this patch.
      
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      22117d6e
    • B
      ide: pass command to ide_map_sg() · 22981694
      Bartlomiej Zolnierkiewicz 提交于
      * Set IDE_TFLAG_WRITE flag and ->rq also for ATA_CMD_PACKET
        commands.
      
      * Pass command to ->dma_setup method and update all its
        implementations accordingly.
      
      * Pass command instead of request to ide_build_sglist(),
        *_build_dmatable() and ide_map_sg().
      
      While at it:
      
      * Fix scc_dma_setup() documentation + use ATA_DMA_WR define.
      
      * Rename sgiioc4_build_dma_table() to sgiioc4_build_dmatable(),
        change return value type to 'int' and drop unused 'ddir'
        argument.
      
      * Do some minor cleanups in [tx4939]ide_dma_setup().
      
      There should be no functional changes caused by this patch.
      Acked-by: NBorislav Petkov <petkovbb@gmail.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      22981694
    • B
      ide: move command related fields from ide_hwif_t to struct ide_cmd · b6308ee0
      Bartlomiej Zolnierkiewicz 提交于
      * Move command related fields from ide_hwif_t to struct ide_cmd.
      
      * Make ide_init_sg_cmd() take command and sectors number as arguments.
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      b6308ee0
    • B
      ide: call ide_build_sglist() prior to ->dma_setup (v2) · e6830a86
      Bartlomiej Zolnierkiewicz 提交于
      * Re-map sg table if needed in ide_build_sglist().
      
      * Move ide_build_sglist() call from ->dma_setup to its users.
      
      * Un-export ide_build_sglist().
      
      v2:
      * Build fix for CONFIG_BLK_DEV_IDEDMA=n (noticed by Randy Dunlap).
      
      There should be no functional changes caused by this patch.
      
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e6830a86
  19. 07 1月, 2009 3 次提交
  20. 09 12月, 2008 1 次提交
    • B
      ide: build-fix for CONFIG_BLK_DEV_IDEDMA_PMAC=n · 53846574
      Bartlomiej Zolnierkiewicz 提交于
      IDE pmac host driver build fails with CONFIG_BLK_DEV_IDEDMA_PMAC=n
      as reported by Kamalesh:
      
      > drivers/ide/pmac.c: In function 'pmac_ide_set_pio_mode':
      > drivers/ide/pmac.c:527: error: implicit declaration of function 'kauai_lookup_timing'
      > drivers/ide/pmac.c:527: error: 'shasta_pio_timings' undeclared (first use in this function)
      > drivers/ide/pmac.c:527: error: (Each undeclared identifier is reported only once
      > drivers/ide/pmac.c:527: error: for each function it appears in.)
      > drivers/ide/pmac.c:534: error: 'kauai_pio_timings' undeclared (first use in this function)
      > drivers/ide/pmac.c: In function 'pmac_ide_do_resume':
      > drivers/ide/pmac.c:914: error: 'IDE_WAKEUP_DELAY' undeclared (first use in this function)
      > drivers/ide/pmac.c: At top level:
      > drivers/ide/pmac.c:1007: error: 'pmac_ide_init_dma' undeclared here (not in a function)
      > drivers/ide/pmac.c: In function 'pmac_ide_setup_device':
      > drivers/ide/pmac.c:1107: error: 'IDE_WAKEUP_DELAY' undeclared (first use in this function)
      > drivers/ide/pmac.c: In function 'pmac_ide_macio_attach':
      > drivers/ide/pmac.c:1209: error: 'pmac_ide_hwif_t' has no member named 'dma_regs'
      > drivers/ide/pmac.c:1210: error: 'pmac_ide_hwif_t' has no member named 'dma_regs'
      > make[2]: *** [drivers/ide/pmac.o] Error 1
      
      Fix it by removing the superfluous config option.
      Reported-and-tested-by: NKamalesh Babulal <kamalesh@linux.vnet.ibm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      53846574
  21. 22 10月, 2008 1 次提交
  22. 14 10月, 2008 5 次提交