linux_dsm_epyc7002/arch/powerpc/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
..
book3s powerpc updates for 4.8 # 1 2016-07-30 21:01:36 -07:00
nohash powerpc updates for 4.8 # 1 2016-07-30 21:01:36 -07:00
8xx_immap.h
accounting.h powerpc32: provide VIRT_CPU_ACCOUNTING 2016-07-09 01:43:50 -05:00
agp.h
archrandom.h powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_* 2015-07-23 19:52:03 +10:00
asm-compat.h powerpc/ebpf/jit: Implement JIT compiler for extended BPF 2016-06-24 15:17:57 +10:00
asm-offsets.h
asm-prototypes.h powerpc: Introduce asm-prototypes.h 2016-06-16 22:39:54 +10:00
async_tx.h
atomic.h locking/atomic, arch/powerpc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}{,_relaxed,_acquire,_release}() 2016-06-16 10:48:28 +02:00
backlight.h
barrier.h powerpc: define __smp_xxx 2016-01-12 20:46:53 +02:00
bitops.h powerpc: Fix comment typos in arch/powerpc/include/asm/bitops.h 2014-11-12 16:31:46 +11:00
bootx.h
btext.h
bug.h powerpc: Remove stale function prototypes 2014-09-25 23:14:43 +10:00
bugs.h
cache.h powerpc: add inline functions for cache related instructions 2016-03-11 17:20:11 -06:00
cacheflush.h powerpc32: move xxxxx_dcache_range() functions inline 2016-03-11 17:20:12 -06:00
cell-pmu.h
cell-regs.h
checksum.h powerpc: optimise csum_partial() call when len is constant 2016-03-09 10:44:18 -06:00
cmpxchg.h powerpc: Use BUILD_BUG_ON_MSG() for unsupported {cmp}xchg sizes 2016-02-24 20:08:48 +11:00
code-patching.h powerpc: Define and use PPC64_ELF_ABI_v2/v1 2016-06-14 13:58:27 +10:00
compat.h powerpc/kernel: Add SIG_SYS support for compat tasks 2015-07-29 11:56:13 +10:00
context_tracking.h powerpc: No need to use dot symbols when branching to a function 2014-04-23 10:05:16 +10:00
copro.h powerpc/cell: Make spu_flush_all_slbs() generic 2014-10-08 20:15:37 +11:00
cpm1.h
cpm2.h powerpc/cpm: Remove duplicate FCC_GFMR_TTX define 2014-06-11 17:03:28 +10:00
cpm.h QE: Move QE from arch/powerpc to drivers/soc 2015-12-22 17:12:56 -06:00
cpufeature.h powerpc: Add module autoloading based on CPU features 2016-07-21 20:33:57 +10:00
cpuidle.h powerpc/powernv: Add platform support for stop instruction 2016-07-15 20:18:41 +10:00
cputable.h powerpc/cache: add cache flush operation for various e500 2016-03-04 23:44:51 -06:00
cputhreads.h powerpc/mpc85xx: Add CPU hotplug support for E6500 2016-03-04 23:58:38 -06:00
cputime.h powerpc32: provide VIRT_CPU_ACCOUNTING 2016-07-09 01:43:50 -05:00
current.h
dbdma.h powerpc: Move Power Macintosh drivers to generic byteswappers 2015-03-23 14:29:40 +11:00
dbell.h
dcr-generic.h
dcr-mmio.h of: Stop naming platform_device using dcr address 2014-05-23 08:28:02 +09:00
dcr-native.h powerpc: Use bool function return values of true/false not 1/0 2015-03-31 14:19:47 +11:00
dcr-regs.h
dcr.h
debug.h powerpc: Fix smp_processor_id() in preemptible splat in set_breakpoint 2014-05-20 10:54:06 +10:00
delay.h
device.h powerpc/iommu: Remove dma_data union 2015-07-13 10:10:54 +10:00
disassemble.h KVM: PPC: e500: Emulate TMCFG0 TMRN register 2015-10-15 15:58:16 +11:00
dma-mapping.h dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
dma.h
edac.h EDAC: Cleanup atomic_scrub mess 2015-05-28 15:31:53 +02:00
eeh_event.h powerpc/powernv: Fix killed EEH event 2014-06-11 17:04:33 +10:00
eeh.h powerpc/pci: Delay populating pdn 2016-06-21 15:30:56 +10:00
ehv_pic.h
elf.h mm: fold arch_randomize_brk into ARCH_HAS_ELF_RANDOMIZE 2015-04-14 16:49:05 -07:00
emergency-restart.h
emulated_ops.h powerpc: Add lq/stq emulation 2014-04-09 12:53:28 +10:00
epapr_hcalls.h kvm/powerpc: move kvm_hypercall0() and friends to epapr_hypercall0() 2014-01-09 10:14:57 +01:00
exception-64e.h powerpc/e6500: hw tablewalk: make sure we invalidate and write to the same tlb entry 2015-10-27 18:14:40 -05:00
exception-64s.h Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next 2016-07-30 13:43:19 +10:00
exec.h
fadump.h powerpc/fadump: rename cpu_online_mask member of struct fadump_crash_info_header 2016-01-20 17:09:18 -08:00
fb.h
feature-fixups.h powerpc: Factor do_feature_fixup calls 2016-07-21 18:51:42 +10:00
firmware.h powerpc: Move FW feature probing out of pseries probe() 2016-07-21 18:56:13 +10:00
fixmap.h powerpc/8xx: Fix vaddr for IMMR early remap 2016-07-09 02:02:48 -05:00
floppy.h
fs_pd.h powerpc/8xx: Remove empty asm/mpc8xx.h 2014-06-25 18:49:40 -05:00
fsl_85xx_cache_sram.h
fsl_gtm.h
fsl_hcalls.h
fsl_lbc.h uio: uio_fsl_elbc_gpcm: new driver 2015-01-12 05:04:13 -08:00
fsl_pamu_stash.h iommu/fsl: Various cleanups 2015-02-03 18:47:18 +01:00
fsl_pm.h powerpc/rcpm: add RCPM driver 2016-03-04 23:50:27 -06:00
ftrace.h powerpc: Define and use PPC64_ELF_ABI_v2/v1 2016-06-14 13:58:27 +10:00
futex.h
grackle.h
hardirq.h powerpc: Replace __get_cpu_var uses 2014-11-03 12:12:32 +11:00
heathrow.h
highmem.h kmap_atomic_to_page() has no users, remove it 2015-11-09 15:11:24 -08:00
hmi.h KVM: PPC: Book3S HV: Fix TB corruption in guest exit path on HMI interrupt 2016-06-20 14:11:25 +10:00
hugetlb.h powerpc/mm: Add radix support for hugetlb 2016-05-11 21:53:55 +10:00
hvcall.h powerpc: Put exception configuration in a common place 2016-07-21 18:56:31 +10:00
hvconsole.h
hvcserver.h
hvsi.h
hw_breakpoint.h powerpc: Fix smp_processor_id() in preemptible splat in set_breakpoint 2014-05-20 10:54:06 +10:00
hw_irq.h powerpc/irq: Add mechanism to force a replay of interrupts 2016-07-17 16:42:44 +10:00
hydra.h powerpc: Fix misspellings in comments. 2016-03-01 19:27:20 +11:00
i8259.h
ibmebus.h
icswx.h crypto: nx-842 - Mask XERS0 bit in return value 2015-12-17 16:42:12 +08:00
ide.h
immap_cpm2.h
io_event_irq.h
io-defs.h
io-workarounds.h
io.h powerpc: Fix misspellings in comments. 2016-03-01 19:27:20 +11:00
iommu.h dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
ipic.h
irq_work.h powerpc: Re-enable dynticks 2015-02-23 14:52:04 +11:00
irq.h powerpc: Remove stale function prototypes 2014-09-25 23:14:43 +10:00
irqflags.h powerpc: Update comments in irqflags.h 2014-07-28 14:11:23 +10:00
jump_label.h locking/static_keys: Add a new static_key interface 2015-08-03 11:34:15 +02:00
Kbuild word-at-a-time.h: fix some Kbuild files 2015-10-06 14:52:48 -04:00
kdebug.h
kdump.h
kexec.h powerpc/kdump: Ignore failure in enabling big endian exception during crash 2014-12-29 15:44:53 +11:00
keylargo.h
kgdb.h
kmap_types.h
kprobes.h powerpc: Define and use PPC64_ELF_ABI_v2/v1 2016-06-14 13:58:27 +10:00
kvm_asm.h KVM: PPC: Remove shared defines for SPE and AltiVec interrupts 2014-09-22 10:11:34 +02:00
kvm_book3s_32.h
kvm_book3s_64.h powerpc/mm/book3s: Rename hash specific PTE bits to carry H_ prefix 2016-05-01 18:32:43 +10:00
kvm_book3s_asm.h powerpc/powernv: Add platform support for stop instruction 2016-07-15 20:18:41 +10:00
kvm_book3s.h kvm: rename pfn_t to kvm_pfn_t 2016-01-15 17:56:32 -08:00
kvm_booke_hv_asm.h powerpc/booke64: Use SPRG_TLB_EXFRAME on bolted handlers 2014-03-19 19:57:15 -05:00
kvm_booke.h KVM: PPC: Book3S: correct width in XER handling 2015-08-22 11:16:19 +02:00
kvm_fpu.h
kvm_host.h KVM: halt_polling: provide a way to qualify wakeups during poll 2016-05-13 17:29:23 +02:00
kvm_para.h kvm/powerpc: move kvm_hypercall0() and friends to epapr_hypercall0() 2014-01-09 10:14:57 +01:00
kvm_ppc.h KVM: PPC: Add support for 64bit TCE windows 2016-03-02 09:56:50 +11:00
libata-portmap.h
linkage.h powerpc: Define and use PPC64_ELF_ABI_v2/v1 2016-06-14 13:58:27 +10:00
livepatch.h powerpc/livepatch: Add livepatch stack to struct thread_info 2016-04-14 15:47:06 +10:00
local.h
lppaca.h
lv1call.h
machdep.h powerpc: Get rid of ppc_md.init_early() 2016-07-21 19:07:26 +10:00
macio.h
mc146818rtc.h
mce.h powerpc/book3s: Recover from MC in sapphire on SCOM read via MMIO. 2014-03-07 15:52:10 +11:00
mediabay.h
mm-arch-hooks.h powerpc/mm: tracking vDSO remap 2015-06-24 17:49:41 -07:00
mman.h include: mman: use bool instead of int for the return value of arch_validate_prot 2016-08-02 19:35:02 -04:00
mmu_context.h powerpc/mm/radix: Add mmu context handling callback for radix 2016-05-01 18:33:05 +10:00
mmu-8xx.h powerpc/8xx: Fix vaddr for IMMR early remap 2016-07-09 02:02:48 -05:00
mmu-40x.h
mmu-44x.h
mmu-book3e.h KVM: PPC: Book3e: Add TLBSEL/TSIZE defines for MAS0/1 2014-07-28 15:23:13 +02:00
mmu.h powerpc/mm: Clear top 16 bits of va only on older cpus 2016-07-17 16:42:52 +10:00
mmzone.h
module.h Merge branch 'topic/mprofile-kernel' into next 2016-03-11 11:20:15 +11:00
mpc5xxx.h
mpc6xx.h
mpc52xx_psc.h powerpc: mpc512x: drop bogus and unused psc register bit definitions 2015-10-22 16:06:08 +02:00
mpc52xx.h powerpc: Make ppc_md.{halt, restart} __noreturn 2016-07-14 21:12:06 +10:00
mpc85xx.h powerpc/fsl-booke: Add T4080 SVR value 2015-03-31 22:23:17 -05:00
mpc5121.h powerpc/512x: add LocalPlus Bus FIFO device driver 2015-10-22 15:19:40 +02:00
mpc8260.h
mpic_msgr.h
mpic_timer.h
mpic.h powerpc/mpic: Add get_version API both for internal and external use 2015-03-23 19:51:17 -05:00
msi_bitmap.h powerpc/msi: Free the bitmap if it was slab allocated 2015-10-05 21:32:50 +11:00
mutex.h locking/mutex: Optimize mutex_trylock() fast-path 2016-06-08 15:17:01 +02:00
nmi.h powerpc: Add ppc64 hard lockup detector support 2015-04-11 20:49:27 +10:00
nvram.h powerpc/nvram: Move generic code for nvram and pstore 2015-03-23 14:05:49 +11:00
ohare.h
opal-api.h powerpc/opal: Add real mode call wrappers 2016-07-17 16:42:46 +10:00
opal.h powerpc: Put exception configuration in a common place 2016-07-21 18:56:31 +10:00
oprofile_impl.h powerpc: Remove oprofile RS64 support 2014-07-28 14:10:25 +10:00
paca.h - ARM: GICv3 ITS emulation and various fixes. Removal of the old 2016-08-02 16:11:27 -04:00
page_32.h powerpc32: Remove clear_pages() and define clear_page() inline 2016-03-11 17:20:11 -06:00
page_64.h powerpc/mm/slice: Remove slice_mm_new_context() 2016-05-11 21:54:00 +10:00
page.h powerpc/32: Remove RELOCATABLE_PPC32 2016-07-19 20:17:07 +10:00
parport.h
pasemi_dma.h
pci-bridge.h powerpc/pci: Override pcibios_setup_bridge() 2016-06-21 15:30:52 +10:00
pci.h PCI: Unify pci_resource_to_user() declarations 2016-06-17 14:43:34 -05:00
percpu.h
perf_event_fsl_emb.h
perf_event_server.h powerpc/perf: Export Power8 generic and cache events to sysfs 2016-03-10 22:56:05 +11:00
perf_event.h powerpc: Rename __get_SP() to current_stack_pointer() 2014-10-15 11:23:20 +11:00
pgalloc.h powerpc/mm: Copy pgalloc (part 2) 2016-05-11 21:53:49 +10:00
pgtable-be-types.h powerpc/mm: use _raw variant of page table accessors 2016-07-17 16:42:51 +10:00
pgtable-types.h powerpc/mm: Add pte_xchg() helper 2016-05-01 18:32:16 +10:00
pgtable.h powerpc/mm: check for irq disabled() only if DEBUG_VM is enabled 2016-07-26 16:19:19 -07:00
plpar_wrappers.h powerpc/mm: Use H_READ with H_READ_4 2015-12-14 15:19:17 +11:00
pmac_feature.h powerpc: Various typo fixes 2016-06-14 13:58:26 +10:00
pmac_low_i2c.h
pmac_pfunc.h
pmc.h
pmi.h
pnv-pci.h PCI/hotplug: pnv_php: export symbols and move struct types needed by cxl 2016-07-14 20:28:08 +10:00
ppc4xx_ocm.h
ppc4xx.h powerpc: Make ppc_md.{halt, restart} __noreturn 2016-07-14 21:12:06 +10:00
ppc_asm.h powerpc updates for 4.8 # 1 2016-07-30 21:01:36 -07:00
ppc-opcode.h powerpc updates for 4.8 # 1 2016-07-30 21:01:36 -07:00
ppc-pci.h powerpc/pci: Delay populating pdn 2016-06-21 15:30:56 +10:00
probes.h
processor.h powerpc/powernv: Add platform support for stop instruction 2016-07-15 20:18:41 +10:00
prom.h powerpc: Remove stale function prototypes 2014-09-25 23:14:43 +10:00
ps3.h powerpc/64: Move MMU backend selection out of platform code 2016-07-21 18:56:38 +10:00
ps3av.h powerpc: Various typo fixes 2016-06-14 13:58:26 +10:00
ps3gpu.h
ps3stor.h
pte-common.h powerpc: Various typo fixes 2016-06-14 13:58:26 +10:00
ptrace.h powerpc: Define and use PPC64_ELF_ABI_v2/v1 2016-06-14 13:58:27 +10:00
reg_8xx.h powerpc/8xx: Fix do_mtspr_cpu6() build on older compilers 2016-03-16 15:22:40 +11:00
reg_a2.h powerpc: Remove platforms/wsp and associated pieces 2014-06-11 16:35:38 +10:00
reg_booke.h powerpc: Fix misspellings in comments. 2016-03-01 19:27:20 +11:00
reg_fsl_emb.h
reg.h Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next 2016-07-30 13:43:19 +10:00
rheap.h
rio.h powerpc: Remove stale function prototypes 2014-09-25 23:14:43 +10:00
rtas.h powerpc: Merge 32-bit and 64-bit setup_arch() 2016-07-21 19:17:46 +10:00
rtc.h
runlatch.h
scom.h
seccomp.h powerpc: switch to using asm-generic for seccomp.h 2015-04-17 09:04:10 -04:00
sections.h powerpc: Define and use PPC64_ELF_ABI_v2/v1 2016-06-14 13:58:27 +10:00
serial.h
setjmp.h
setup.h powerpc: Put exception configuration in a common place 2016-07-21 18:56:31 +10:00
sfp-machine.h
shmparam.h
signal.h
smp.h powerpc: Merge 32-bit and 64-bit setup_arch() 2016-07-21 19:17:46 +10:00
smu.h powerpc/pmac: Remove early allocation of the SMU command buffer 2016-07-21 18:56:38 +10:00
sparsemem.h
spinlock_types.h
spinlock.h powerpc/spinlock: Fix spin_unlock_wait() 2016-06-14 16:05:44 +10:00
spu_csa.h powerpc/cell: Drop support for 64K local store on 4K kernels 2015-08-18 19:29:49 +10:00
spu_info.h
spu_priv1.h
spu.h powerpc/cell: Move spu_handle_mm_fault() out of cell platform 2014-10-08 20:14:54 +11:00
sstep.h powerpc: Emulate icbi, mcrf and conditional-trap instructions 2014-09-25 23:14:51 +10:00
string.h powerpc: Remove assembly versions of strcpy, strcat, strlen and strcmp 2016-06-14 13:58:25 +10:00
swab.h powerpc: Remove unused st_le*() and ld_le* functions 2015-03-24 13:33:52 +11:00
swiotlb.h
switch_to.h powerpc: Add the ability to save VSX without giving it up 2016-03-02 23:34:50 +11:00
synch.h powerpc: Factor do_feature_fixup calls 2016-07-21 18:51:42 +10:00
syscall.h powerpc: Change syscall_get_nr() to return int 2015-07-29 11:56:13 +10:00
syscalls.h
systbl.h powerpc: wire up preadv2 and pwritev2 syscalls 2016-04-27 16:47:55 +10:00
tce.h powerpc/powernv/pci: Remove SWINV constants and obsolete TCE code 2016-07-17 16:42:47 +10:00
termios.h
thread_info.h signal: consolidate {TS,TLF}_RESTORE_SIGMASK code 2016-08-02 19:35:23 -04:00
time.h powerpc/timer: Large Decrementer support 2016-07-05 23:58:53 +10:00
timex.h
tlb.h mmu_gather: move minimal range calculations into generic code 2014-11-17 10:12:42 +00:00
tlbflush.h powerpc/mm/radix: Add tlbflush routines 2016-05-01 18:33:09 +10:00
tm.h Merge branch 'kvm-ppchv-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into kvm-next 2014-03-29 15:44:05 +01:00
topology.h sched/topology: Rename topology_thread_cpumask() to topology_sibling_cpumask() 2015-05-27 15:22:15 +02:00
trace_clock.h powerpc/ftrace: add powerpc timebase as a trace clock source 2015-08-06 16:36:23 +10:00
trace.h powerpc/pseries: Don't trace hcalls on offline CPUs 2016-02-15 21:10:03 +11:00
tsi108_irq.h
tsi108_pci.h genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
tsi108.h powerpc: Various typo fixes 2016-06-14 13:58:26 +10:00
types.h powerpc: Define and use PPC64_ELF_ABI_v2/v1 2016-06-14 13:58:27 +10:00
uaccess.h ppc: get rid of the remnants of __get_user64() 2016-01-04 10:28:12 -05:00
udbg.h powerpc: Remove stale function prototypes 2014-09-25 23:14:43 +10:00
uic.h
unaligned.h
uninorth.h powerpc: Fix misspellings in comments. 2016-03-01 19:27:20 +11:00
unistd.h powerpc: wire up preadv2 and pwritev2 syscalls 2016-04-27 16:47:55 +10:00
uprobes.h
user.h
vdso_datapage.h powerpc: Standardise on NR_syscalls rather than __NR_syscalls. 2015-11-26 22:11:17 +11:00
vdso.h powerpc: Link VDSOs at 0x0 2014-02-17 11:19:37 +11:00
vga.h powerpc: Move Power Macintosh drivers to generic byteswappers 2015-03-23 14:29:40 +11:00
vio.h remove <asm/scatterlist.h> 2015-05-05 13:35:39 -06:00
word-at-a-time.h powerpc: Fix bad inline asm constraint in create_zero_mask() 2016-05-02 11:10:25 +10:00
xics.h powerpc/xics: Add ICP OPAL backend 2016-07-17 16:42:45 +10:00
xilinx_intc.h
xilinx_pci.h
xmon.h
xor.h