06 Oct, 2020

1 commit

  • Split out all the bits that are purely for dma_map_ops implementations
    and related code into a new header so that they
    don't get pulled into all the drivers. That also means the architecture
    specific is not pulled in by
    any more, which leads to a missing includes that were pulled in by the
    x86 or arm versions in a few not overly portable drivers.

    Signed-off-by: Christoph Hellwig

    Christoph Hellwig
     

25 Sep, 2020

1 commit

  • This API is the equivalent of alloc_pages, except that the returned memory
    is guaranteed to be DMA addressable by the passed in device. The
    implementation will also be used to provide a more sensible replacement
    for DMA_ATTR_NON_CONSISTENT flag.

    Additionally dma_alloc_noncoherent is switched over to use dma_alloc_pages
    as its backend.

    Signed-off-by: Christoph Hellwig
    Acked-by: Thomas Bogendoerfer (MIPS part)

    Christoph Hellwig
     

04 Sep, 2020

1 commit

  • We found that callers of dma_get_seg_boundary mostly do an ALIGN
    with page mask and then do a page shift to get number of pages:
    ALIGN(boundary + 1, 1 << shift) >> shift

    However, the boundary might be as large as ULONG_MAX, which means
    that a device has no specific boundary limit. So either "+ 1" or
    passing it to ALIGN() would potentially overflow.

    According to kernel defines:
    #define ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask))
    #define ALIGN(x, a) ALIGN_MASK(x, (typeof(x))(a) - 1)

    We can simplify the logic here into a helper function doing:
    ALIGN(boundary + 1, 1 << shift) >> shift
    = ALIGN_MASK(b + 1, (1 << s) - 1) >> s
    = {[b + 1 + (1 << s) - 1] & ~[(1 << s) - 1]} >> s
    = [b + 1 + (1 << s) - 1] >> s
    = [b + (1 << s)] >> s
    = (b >> s) + 1

    This patch introduces and applies dma_get_seg_boundary_nr_pages()
    as an overflow-free helper for the dma_get_seg_boundary() callers
    to get numbers of pages. It also takes care of the NULL dev case
    for non-DMA API callers.

    Suggested-by: Christoph Hellwig
    Signed-off-by: Nicolin Chen
    Acked-by: Niklas Schnelle
    Acked-by: Michael Ellerman (powerpc)
    Signed-off-by: Christoph Hellwig

    Nicolin Chen
     

27 Jun, 2020

1 commit


20 Sep, 2019

1 commit

  • Pull dma-mapping updates from Christoph Hellwig:

    - add dma-mapping and block layer helpers to take care of IOMMU merging
    for mmc plus subsequent fixups (Yoshihiro Shimoda)

    - rework handling of the pgprot bits for remapping (me)

    - take care of the dma direct infrastructure for swiotlb-xen (me)

    - improve the dma noncoherent remapping infrastructure (me)

    - better defaults for ->mmap, ->get_sgtable and ->get_required_mask
    (me)

    - cleanup mmaping of coherent DMA allocations (me)

    - various misc cleanups (Andy Shevchenko, me)

    * tag 'dma-mapping-5.4' of git://git.infradead.org/users/hch/dma-mapping: (41 commits)
    mmc: renesas_sdhi_internal_dmac: Add MMC_CAP2_MERGE_CAPABLE
    mmc: queue: Fix bigger segments usage
    arm64: use asm-generic/dma-mapping.h
    swiotlb-xen: merge xen_unmap_single into xen_swiotlb_unmap_page
    swiotlb-xen: simplify cache maintainance
    swiotlb-xen: use the same foreign page check everywhere
    swiotlb-xen: remove xen_swiotlb_dma_mmap and xen_swiotlb_dma_get_sgtable
    xen: remove the exports for xen_{create,destroy}_contiguous_region
    xen/arm: remove xen_dma_ops
    xen/arm: simplify dma_cache_maint
    xen/arm: use dev_is_dma_coherent
    xen/arm: consolidate page-coherent.h
    xen/arm: use dma-noncoherent.h calls for xen-swiotlb cache maintainance
    arm: remove wrappers for the generic dma remap helpers
    dma-mapping: introduce a dma_common_find_pages helper
    dma-mapping: always use VM_DMA_COHERENT for generic DMA remap
    vmalloc: lift the arm flag for coherent mappings to common code
    dma-mapping: provide a better default ->get_required_mask
    dma-mapping: remove the dma_declare_coherent_memory export
    remoteproc: don't allow modular build
    ...

    Linus Torvalds
     

04 Sep, 2019

1 commit

  • While the default ->mmap and ->get_sgtable implementations work for the
    majority of our dma_map_ops impementations they are inherently safe
    for others that don't use the page allocator or CMA and/or use their
    own way of remapping not covered by the common code. So remove the
    defaults if these methods are not wired up, but instead wire up the
    default implementations for all safe instances.

    Fixes: e1c7e324539a ("dma-mapping: always provide the dma_map_ops based implementation")
    Signed-off-by: Christoph Hellwig

    Christoph Hellwig
     

17 Aug, 2019

5 commits

  • The only thing remaining of the machvecs is a few checks if we are
    running on an SGI UV system. Replace those with the existing
    is_uv_system() check that has been rewritten to simply check the
    OEM ID directly.

    That leaves us with a generic kernel that is as fast as the previous
    DIG/ZX1/UV kernels, but can support all hardware. Support for UV
    and the HP SBA IOMMU is now optional based on new config options.

    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-27-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • ia64 currently organizes the iommu probing along machves, which isn't
    very helpful. Instead just try to probe for Intel IOMMUs in mem_init
    as they are properly described in ACPI and if none was found initialize
    the swiotlb buffer. The HP SBA handling is then only done delayed when
    the actual hardware is probed. Only in the case that we actually found
    usable IOMMUs we then set up the DMA ops and free the not needed
    swiotlb buffer. This scheme gets rid of the need for the dma_init
    machvec operation, and the dig_vtd machvec.

    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-24-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • The aim of this machvec is to support devices with < 32-bit dma
    masks. But given that ia64 only has a ZONE_DMA32 and not a ZONE_DMA
    that isn't supported by swiotlb either.

    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-21-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • Now that hpsim support is gone, CONFIG_PCI is forced on for ia64, and
    we can remove a few ifdefs for it.

    Acked-by: Tom Vaden
    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-19-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • The hpsim platform supports the HP IA64 simulator which was useful as a
    bring up platform. But it is fairly non-standard vs real IA64 system
    in that it for example doesn't support ACPI. It also comes with a
    whole bunch of simulator specific drivers. Remove it to simplify the
    IA64 port.

    Note that through a weird twist only them hpsim boot loader built the
    vmlinux.gz file, so the makefile targets for that are moved to the
    main ia64 Makefile now.

    Acked-by: Tom Vaden
    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-18-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     

12 Jul, 2019

1 commit

  • Pull tty / serial driver updates from Greg KH:
    "Here is the "large" TTY and Serial driver update for 5.3-rc1.

    It's in the negative number of lines overall as we removed an obsolete
    serial driver that was causing problems for some people who were
    trying to clean up some apis (the mpsc.c driver, which only worked for
    some pre-production hardware that no one has anymore.)

    Other than that, lots of tiny changes, cleaning up small things along
    with some platform-specific serial driver updates.

    All of these have been in linux-next for a while now with no reported
    issues"

    * tag 'tty-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (68 commits)
    tty: serial: fsl_lpuart: add imx8qxp support
    serial: imx: set_termios(): preserve RTS state
    serial: imx: set_termios(): clarify RTS/CTS bits calculation
    serial: imx: set_termios(): factor-out 'ucr2' initial value
    serial: sh-sci: Terminate TX DMA during buffer flushing
    serial: sh-sci: Fix TX DMA buffer flushing and workqueue races
    serial: mpsc: Remove obsolete MPSC driver
    serial: 8250: 8250_core: Fix missing unlock on error in serial8250_register_8250_port()
    serial: stm32: add RX and TX FIFO flush
    serial: stm32: add support of RX FIFO threshold
    serial: stm32: add support of TX FIFO threshold
    serial: stm32: update PIO transmission
    serial: stm32: add support of timeout interrupt for RX
    Revert "serial: 8250: Don't service RX FIFO if interrupts are disabled"
    tty/serial/8250: use mctrl_gpio helpers
    serial: mctrl_gpio: Check if GPIO property exisits before requesting it
    serial: 8250: pericom_do_set_divisor can be static
    tty: serial_core: Set port active bit in uart_port_activate
    serial: 8250: Add MSR/MCR TIOCM conversion wrapper functions
    serial: 8250: factor out serial8250_{set,clear}_THRI() helpers
    ...

    Linus Torvalds
     

19 Jun, 2019

1 commit

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 4122 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

03 Jun, 2019

1 commit


31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 3029 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

24 May, 2019

1 commit


21 May, 2019

1 commit


16 Mar, 2019

1 commit


29 Dec, 2018

1 commit

  • Pull SCSI updates from James Bottomley:
    "This is mostly update of the usual drivers: smarpqi, lpfc, qedi,
    megaraid_sas, libsas, zfcp, mpt3sas, hisi_sas.

    Additionally, we have a pile of annotation, unused variable and minor
    updates.

    The big API change is the updates for Christoph's DMA rework which
    include removing the DISABLE_CLUSTERING flag.

    And finally there are a couple of target tree updates"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (259 commits)
    scsi: isci: request: mark expected switch fall-through
    scsi: isci: remote_node_context: mark expected switch fall-throughs
    scsi: isci: remote_device: Mark expected switch fall-throughs
    scsi: isci: phy: Mark expected switch fall-through
    scsi: iscsi: Capture iscsi debug messages using tracepoints
    scsi: myrb: Mark expected switch fall-throughs
    scsi: megaraid: fix out-of-bound array accesses
    scsi: mpt3sas: mpt3sas_scsih: Mark expected switch fall-through
    scsi: fcoe: remove set but not used variable 'port'
    scsi: smartpqi: call pqi_free_interrupts() in pqi_shutdown()
    scsi: smartpqi: fix build warnings
    scsi: smartpqi: update driver version
    scsi: smartpqi: add ofa support
    scsi: smartpqi: increase fw status register read timeout
    scsi: smartpqi: bump driver version
    scsi: smartpqi: add smp_utils support
    scsi: smartpqi: correct lun reset issues
    scsi: smartpqi: correct volume status
    scsi: smartpqi: do not offline disks for transient did no connect conditions
    scsi: smartpqi: allow for larger raid maps
    ...

    Linus Torvalds
     

19 Dec, 2018

1 commit

  • The same effects can be achieved by setting the dma_boundary to
    PAGE_SIZE - 1 and the max_segment_size to PAGE_SIZE, so shift those
    settings into the drivers. Note that in many cases the setting might
    be bogus, but this keeps the status quo.

    [mkp: fix myrs and myrb]

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Christoph Hellwig
     

14 Dec, 2018

2 commits

  • Avoid expensive indirect calls in the fast path DMA mapping
    operations by directly calling the dma_direct_* ops if we are using
    the directly mapped DMA operations.

    Signed-off-by: Christoph Hellwig
    Acked-by: Jesper Dangaard Brouer
    Tested-by: Jesper Dangaard Brouer
    Tested-by: Tony Luck

    Christoph Hellwig
     
  • While the dma-direct code is (relatively) clean and simple we actually
    have to use the swiotlb ops for the mapping on many architectures due
    to devices with addressing limits. Instead of keeping two
    implementations around this commit allows the dma-direct
    implementation to call the swiotlb bounce buffering functions and
    thus share the guts of the mapping implementation. This also
    simplified the dma-mapping setup on a few architectures where we
    don't have to differenciate which implementation to use.

    Signed-off-by: Christoph Hellwig
    Acked-by: Jesper Dangaard Brouer
    Tested-by: Jesper Dangaard Brouer
    Tested-by: Tony Luck

    Christoph Hellwig
     

06 Dec, 2018

2 commits


24 Oct, 2018

1 commit

  • Pull tty ioctl updates from Al Viro:
    "This is the compat_ioctl work related to tty ioctls.

    Quite a bit of dead code taken out, all tty-related stuff gone from
    fs/compat_ioctl.c. A bunch of compat bugs fixed - some still remain,
    but all more or less generic tty-related ioctls should be covered
    (remaining issues are in things like driver-private ioctls in a pcmcia
    serial card driver not getting properly handled in 32bit processes on
    64bit host, etc)"

    * 'work.tty-ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (53 commits)
    kill TIOCSERGSTRUCT
    change semantics of ldisc ->compat_ioctl()
    kill TIOCSER[SG]WILD
    synclink_gt(): fix compat_ioctl()
    pty: fix compat ioctls
    compat_ioctl - kill keyboard ioctl handling
    gigaset: add ->compat_ioctl()
    vt_compat_ioctl(): clean up, use compat_ptr() properly
    gigaset: don't try to printk userland buffer contents
    dgnc: don't bother with (empty) stub for TCXONC
    dgnc: leave TIOC[GS]SOFTCAR to ldisc
    remove fallback to drivers for TIOCGICOUNT
    dgnc: break-related ioctls won't reach ->ioctl()
    kill the rest of tty COMPAT_IOCTL() entries
    dgnc: TIOCM... won't reach ->ioctl()
    isdn_tty: TCSBRK{,P} won't reach ->ioctl()
    kill capinc_tty_ioctl()
    take compat TIOC[SG]SERIAL treatment into tty_compat_ioctl()
    synclink: reduce pointless checks in ->ioctl()
    complete ->[sg]et_serial() switchover
    ...

    Linus Torvalds
     

13 Oct, 2018

2 commits

  • Once upon a time a bunch of serial drivers used to provide that;
    today it's only amiserial and it's FUBAR - the structure being
    copied to userland includes kernel pointers, fields with
    config-dependent size, etc. No userland code using it could
    possibly survive - e.g. enabling lockdep definitely changes the
    layout. Besides, it's a massive infoleak.

    Kill it. If somebody needs that data for debugging purposes, they
    can bloody well expose it saner ways. Assuming anyone does debugging
    of amiserial in the first place, that is.

    Signed-off-by: Al Viro

    Al Viro
     
  • the only user is very old setserial rc script and even that
    (as far back as MCC Interim, AFAICS) doesn't actually fail -
    just gives one message during the boot ("Cannot scan for wild
    interrupts") and proceeds past that just fine.

    Signed-off-by: Al Viro

    Al Viro
     

18 Sep, 2018

1 commit

  • The original form of these was added (to the HP zx1 platform only) by
    the following bitkeeper commit (by the way of the historic.git tree):

    commit 66b99421d118a5ddd98a72913670b0fcf0a38d45
    Author: Andrew Morton
    Date: Sat Mar 13 17:05:37 2004 -0800

    [PATCH] DMA: Fill gaping hole in DMA API interfaces.

    From: "David S. Miller"

    The commit does not explain why we'd need the memory barrier on ia64,
    it never included the swiotlb or SGI IOMMU based platforms, and also
    failed to address the map/unmap parts of the dma mapping interface,
    which should provide the same ordering semantics and actually are
    commonly used. The conclusion of this is that they were added in
    error and should be removed.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Tony Luck

    Christoph Hellwig
     

14 Sep, 2018

1 commit


23 Aug, 2018

1 commit


05 Jun, 2018

1 commit

  • Pull dma-mapping updates from Christoph Hellwig:

    - replace the force_dma flag with a dma_configure bus method. (Nipun
    Gupta, although one patch is іncorrectly attributed to me due to a
    git rebase bug)

    - use GFP_DMA32 more agressively in dma-direct. (Takashi Iwai)

    - remove PCI_DMA_BUS_IS_PHYS and rely on the dma-mapping API to do the
    right thing for bounce buffering.

    - move dma-debug initialization to common code, and apply a few
    cleanups to the dma-debug code.

    - cleanup the Kconfig mess around swiotlb selection

    - swiotlb comment fixup (Yisheng Xie)

    - a trivial swiotlb fix. (Dan Carpenter)

    - support swiotlb on RISC-V. (based on a patch from Palmer Dabbelt)

    - add a new generic dma-noncoherent dma_map_ops implementation and use
    it for arc, c6x and nds32.

    - improve scatterlist validity checking in dma-debug. (Robin Murphy)

    - add a struct device quirk to limit the dma-mask to 32-bit due to
    bridge/system issues, and switch x86 to use it instead of a local
    hack for VIA bridges.

    - handle devices without a dma_mask more gracefully in the dma-direct
    code.

    * tag 'dma-mapping-4.18' of git://git.infradead.org/users/hch/dma-mapping: (48 commits)
    dma-direct: don't crash on device without dma_mask
    nds32: use generic dma_noncoherent_ops
    nds32: implement the unmap_sg DMA operation
    nds32: consolidate DMA cache maintainance routines
    x86/pci-dma: switch the VIA 32-bit DMA quirk to use the struct device flag
    x86/pci-dma: remove the explicit nodac and allowdac option
    x86/pci-dma: remove the experimental forcesac boot option
    Documentation/x86: remove a stray reference to pci-nommu.c
    core, dma-direct: add a flag 32-bit dma limits
    dma-mapping: remove unused gfp_t parameter to arch_dma_alloc_attrs
    dma-debug: check scatterlist segments
    c6x: use generic dma_noncoherent_ops
    arc: use generic dma_noncoherent_ops
    arc: fix arc_dma_{map,unmap}_page
    arc: fix arc_dma_sync_sg_for_{cpu,device}
    arc: simplify arc_dma_sync_single_for_{cpu,device}
    dma-mapping: provide a generic dma-noncoherent implementation
    dma-mapping: simplify Kconfig dependencies
    riscv: add swiotlb support
    riscv: only enable ZONE_DMA32 for 64-bit
    ...

    Linus Torvalds
     

16 May, 2018

2 commits


07 May, 2018

1 commit

  • This was used by the ide, scsi and networking code in the past to
    determine if they should bounce payloads. Now that the dma mapping
    always have to support dma to all physical memory (thanks to swiotlb
    for non-iommu systems) there is no need to this crude hack any more.

    Signed-off-by: Christoph Hellwig
    Acked-by: Palmer Dabbelt (for riscv)
    Reviewed-by: Jens Axboe

    Christoph Hellwig
     

15 Jan, 2018

2 commits


02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

13 Jun, 2017

1 commit

  • This driver was setting the deprecated and broken alt_speed based on port
    flags, but never provided a means to change the flags or to actually
    change the speed.

    Signed-off-by: Johan Hovold
    Reviewed-by: Andy Shevchenko
    Reviewed-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     

02 Mar, 2017

1 commit


25 Jan, 2017

1 commit

  • Most dma_map_ops structures are never modified. Constify these
    structures such that these can be write-protected. This patch
    has been generated as follows:

    git grep -l 'struct dma_map_ops' |
    xargs -d\\n sed -i \
    -e 's/struct dma_map_ops/const struct dma_map_ops/g' \
    -e 's/const struct dma_map_ops {/struct dma_map_ops {/g' \
    -e 's/^const struct dma_map_ops;$/struct dma_map_ops;/' \
    -e 's/const const struct dma_map_ops /const struct dma_map_ops /g';
    sed -i -e 's/const \(struct dma_map_ops intel_dma_ops\)/\1/' \
    $(git grep -l 'struct dma_map_ops intel_dma_ops');
    sed -i -e 's/const \(struct dma_map_ops dma_iommu_ops\)/\1/' \
    $(git grep -l 'struct dma_map_ops' | grep ^arch/powerpc);
    sed -i -e '/^struct vmd_dev {$/,/^};$/ s/const \(struct dma_map_ops[[:blank:]]dma_ops;\)/\1/' \
    -e '/^static void vmd_setup_dma_ops/,/^}$/ s/const \(struct dma_map_ops \*dest\)/\1/' \
    -e 's/const \(struct dma_map_ops \*dest = \&vmd->dma_ops\)/\1/' \
    drivers/pci/host/*.c
    sed -i -e '/^void __init pci_iommu_alloc(void)$/,/^}$/ s/dma_ops->/intel_dma_ops./' arch/ia64/kernel/pci-dma.c
    sed -i -e 's/static const struct dma_map_ops sn_dma_ops/static struct dma_map_ops sn_dma_ops/' arch/ia64/sn/pci/pci_dma.c
    sed -i -e 's/(const struct dma_map_ops \*)//' drivers/misc/mic/bus/vop_bus.c

    Signed-off-by: Bart Van Assche
    Reviewed-by: Christoph Hellwig
    Cc: Benjamin Herrenschmidt
    Cc: Boris Ostrovsky
    Cc: David Woodhouse
    Cc: Juergen Gross
    Cc: H. Peter Anvin
    Cc: Ingo Molnar
    Cc: linux-arch@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: Russell King
    Cc: x86@kernel.org
    Signed-off-by: Doug Ledford

    Bart Van Assche