linux_dsm_epyc7002/arch/arm/include/asm
Krzysztof Kozlowski 00085f1efa dma-mapping: use unsigned long for dma_attrs
The dma-mapping core and the implementations do not change the DMA
attributes passed by pointer.  Thus the pointer can point to const data.
However the attributes do not have to be a bitfield.  Instead unsigned
long will do fine:

1. This is just simpler.  Both in terms of reading the code and setting
   attributes.  Instead of initializing local attributes on the stack
   and passing pointer to it to dma_set_attr(), just set the bits.

2. It brings safeness and checking for const correctness because the
   attributes are passed by value.

Semantic patches for this change (at least most of them):

    virtual patch
    virtual context

    @r@
    identifier f, attrs;

    @@
    f(...,
    - struct dma_attrs *attrs
    + unsigned long attrs
    , ...)
    {
    ...
    }

    @@
    identifier r.f;
    @@
    f(...,
    - NULL
    + 0
     )

and

    // Options: --all-includes
    virtual patch
    virtual context

    @r@
    identifier f, attrs;
    type t;

    @@
    t f(..., struct dma_attrs *attrs);

    @@
    identifier r.f;
    @@
    f(...,
    - NULL
    + 0
     )

Link: http://lkml.kernel.org/r/1468399300-5399-2-git-send-email-k.kozlowski@samsung.com
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Vineet Gupta <vgupta@synopsys.com>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>
Acked-by: Mark Salter <msalter@redhat.com> [c6x]
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> [cris]
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> [drm]
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Acked-by: Joerg Roedel <jroedel@suse.de> [iommu]
Acked-by: Fabien Dessenne <fabien.dessenne@st.com> [bdisp]
Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com> [vb2-core]
Acked-by: David Vrabel <david.vrabel@citrix.com> [xen]
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> [xen swiotlb]
Acked-by: Joerg Roedel <jroedel@suse.de> [iommu]
Acked-by: Richard Kuo <rkuo@codeaurora.org> [hexagon]
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> [m68k]
Acked-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> [s390]
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no> [avr32]
Acked-by: Vineet Gupta <vgupta@synopsys.com> [arc]
Acked-by: Robin Murphy <robin.murphy@arm.com> [arm64 and dma-iommu]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-08-04 08:50:07 -04:00
..
hardware
mach ARM: Make PCI I/O space optional 2016-06-21 10:54:29 -05:00
xen dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
arch_gicv3.h irqchip/gic-v3: Add missing barrier to 32bit version of gic_read_iar() 2016-02-18 19:15:45 +00:00
arch_timer.h
arm-cci.h
asm-offsets.h
assembler.h ARM: introduce svc_pt_regs structure 2016-06-22 19:54:52 +01:00
atomic.h locking/atomic: Remove linux/atomic.h:atomic_fetch_or() 2016-06-16 10:48:32 +02:00
auxvec.h
barrier.h ARM: 8582/1: remove unused CONFIG_ARCH_HAS_BARRIERS 2016-07-02 11:01:08 +01:00
bitops.h
bitrev.h
bL_switcher.h
bug.h ARM: 8455/1: define __BUG as asm(BUG_INSTR) without CONFIG_BUG 2015-12-03 00:02:29 +00:00
bugs.h
cache.h
cacheflush.h asm-generic: Consolidate mark_rodata_ro() 2016-02-22 08:51:37 +01:00
cachetype.h
checksum.h ipv6: Pass proto to csum_ipv6_magic as __u8 instead of unsigned short 2016-03-13 23:55:13 -04:00
cmpxchg.h
compiler.h
cp15.h
cpu.h
cpuidle.h ARM: cpuidle: add const qualifier to cpuidle_ops member in structures 2016-04-20 06:59:10 +02:00
cputype.h ARM: 8564/1: fix cpu feature extracting helper 2016-04-19 19:42:26 +01:00
cti.h
dcc.h
delay.h ARM: 8306/1: loop_udelay: remove bogomips value limitation 2016-06-22 19:55:12 +01:00
device.h
div64.h ARM: 8504/1: __arch_xprod_64(): small optimization 2016-02-11 15:33:37 +00:00
dma-contiguous.h
dma-iommu.h
dma-mapping.h dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
dma.h
domain.h ARM: 8573/1: domain: move {set,get}_domain under config guard 2016-05-05 19:03:02 +01:00
ecard.h
edac.h
efi.h efi: Convert efi_call_virt() to efi_call_virt_pointer() 2016-06-27 13:06:56 +02:00
elf.h
entry-macro-multi.S
exception.h arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections 2016-03-25 16:37:42 -07:00
fb.h
fiq.h
firmware.h
fixmap.h ARM: add support for generic early_ioremap/early_memremap 2015-12-13 19:18:28 +01:00
flat.h
floppy.h ARM: 8584/1: floppy: avoid gcc-6 warning 2016-07-02 11:02:13 +01:00
fncpy.h
fpstate.h
ftrace.h
futex.h
glue-cache.h
glue-df.h
glue-pf.h
glue-proc.h
glue.h
gpio.h
hardirq.h ARM: 8487/1: Remove IPI_CALL_FUNC_SINGLE 2015-12-22 12:09:43 +00:00
highmem.h kmap_atomic_to_page() has no users, remove it 2015-11-09 15:11:24 -08:00
hugetlb-3level.h
hugetlb.h
hw_breakpoint.h
hw_irq.h
hwcap.h
hypervisor.h
ide.h
idmap.h
insn.h
io.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2016-07-28 14:22:25 -07:00
irq_work.h
irq.h xen/events: Always allocate legacy interrupts on PV guests 2015-11-26 18:05:01 +00:00
irqflags.h
jump_label.h
Kbuild ARM: SoC cleanups for v4.6 2016-03-20 14:37:22 -07:00
kexec.h ARM: kexec: fix kexec for Keystone 2 2016-08-02 19:35:29 -04:00
kgdb.h
kmap_types.h
kprobes.h
kvm_arm.h arm64: KVM: Add support for 16-bit VMID 2015-12-18 10:15:12 +00:00
kvm_asm.h arm: KVM: Allow hyp teardown 2016-07-03 23:41:27 +02:00
kvm_coproc.h
kvm_emulate.h arm/arm64: KVM: Handle out-of-RAM cache maintenance as a NOP 2016-02-29 18:34:15 +00:00
kvm_host.h KVM: arm/arm64: Extend arch CAP checks to allow per-VM capabilities 2016-07-18 18:10:31 +01:00
kvm_hyp.h arm/arm64: Get rid of KERN_TO_HYP 2016-07-03 23:41:27 +02:00
kvm_mmio.h KVM: arm/arm64: Export mmio_read/write_bus 2016-05-20 15:39:42 +02:00
kvm_mmu.h arm/arm64: Get rid of KERN_TO_HYP 2016-07-03 23:41:27 +02:00
kvm_psci.h
limits.h
linkage.h
mach-types.h
mc146818rtc.h
mcpm.h
mcs_spinlock.h
memblock.h
memory.h ARM: provide arm_has_idmap_alias() helper 2016-05-03 11:17:28 +01:00
mmu_context.h ARM: Hide finish_arch_post_lock_switch() from modules 2016-05-13 16:12:53 +02:00
mmu.h
module.h
mpu.h
mtd-xip.h
mutex.h
neon.h
nwflash.h
opcodes-sec.h
opcodes-virt.h
opcodes.h
outercache.h
page-nommu.h asm-generic: page.h: Remove useless get_user_page and free_user_page 2016-02-26 15:24:55 +01:00
page.h
paravirt.h arm: introduce CONFIG_PARAVIRT, PARAVIRT_TIME_ACCOUNTING and pv_time_ops 2015-12-21 14:40:54 +00:00
patch.h
pci.h PCI: Move pci_dma_* helpers to common code 2016-03-07 10:40:02 -06:00
percpu.h
perf_event.h
pgalloc.h arm: get rid of superfluous __GFP_REPEAT 2016-07-26 16:19:19 -07:00
pgtable-2level-hwdef.h
pgtable-2level-types.h
pgtable-2level.h ARM: 8578/1: mm: ensure pmd_present only checks the valid bit 2016-06-09 17:51:47 +01:00
pgtable-3level-hwdef.h
pgtable-3level-types.h
pgtable-3level.h ARM: 8579/1: mm: Fix definition of pmd_mknotpresent 2016-06-09 17:51:47 +01:00
pgtable-hwdef.h
pgtable-nommu.h
pgtable.h - ARM: GICv3 ITS emulation and various fixes. Removal of the old 2016-08-02 16:11:27 -04:00
probes.h
proc-fns.h
processor.h
procinfo.h
prom.h
psci.h ARM: SoC cleanups for v4.5 2016-01-20 17:55:20 -08:00
ptrace.h ARM: save and reset the address limit when entering an exception 2016-07-07 16:01:01 +01:00
sections.h ARM: 8518/1: Use correct symbols for XIP_KERNEL 2016-02-11 15:43:14 +00:00
setup.h ARM: 8495/1: ATAGS: move save_atags() to arch/arm/include/asm/setup.h 2016-01-04 11:26:00 +00:00
shmparam.h
signal.h
smp_plat.h
smp_scu.h
smp_twd.h
smp.h
sparsemem.h ARM: 8411/1: Add default SPARSEMEM settings 2016-02-16 16:35:21 +00:00
spinlock_types.h
spinlock.h locking/spinlock, arch: Update and fix spin_unlock_wait() implementations 2016-06-14 11:55:15 +02:00
stackprotector.h
stacktrace.h
stage2_pgtable.h kvm-arm: arm32: Introduce stage2 page table helpers 2016-04-21 14:57:26 +02:00
string.h
suspend.h
swab.h
switch_to.h
sync_bitops.h
syscall.h
system_info.h
system_misc.h
tcm.h
therm.h
thread_info.h
thread_notify.h
timex.h
tlb.h mm/mmu_gather: track page size with mmu gather and force flush if page size change 2016-07-26 16:19:19 -07:00
tlbflush.h
tls.h
topology.h
traps.h
trusted_foundations.h
types.h
uaccess.h ARM: uaccess: remove put_user() code duplication 2016-06-22 19:55:11 +01:00
ucontext.h
unified.h
unistd.h ARM: wire up preadv2 and pwritev2 syscalls 2016-04-07 21:57:02 +01:00
unwind.h
uprobes.h
user.h
v7m.h
vdso_datapage.h
vdso.h
vfp.h
vfpmacros.h
vga.h
virt.h arm/arm64: KVM: Export __hyp_text_start/end symbols 2016-07-03 23:41:27 +02:00
word-at-a-time.h
xor.h