linux/arch/s390/include/asm
Niklas Schnelle b02002cc4c s390/pci: Implement ioremap_wc/prot() with MIO
With our current support for the new MIO PCI instructions, write
combining/write back MMIO memory can be obtained via the pci_iomap_wc()
and pci_iomap_wc_range() functions.
This is achieved by using the write back address for a specific bar
as provided in clp_store_query_pci_fn()

These functions are however not widely used and instead drivers often
rely on ioremap_wc() and ioremap_prot(), which on other platforms enable
write combining using a PTE flag set through the pgrprot value.

While we do not have a write combining flag in the low order flag bits
of the PTE like x86_64 does, with MIO support, there is a write back bit
in the physical address (bit 1 on z15) and thus also the PTE.
Which bit is used to toggle write back and whether it is available at
all, is however not fixed in the architecture. Instead we get this
information from the CLP Store Logical Processor Characteristics for PCI
command. When the write back bit is not provided we fall back to the
existing behavior.

Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2020-09-14 10:30:07 +02:00
..
fpu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vdso s390: convert to GENERIC_VDSO 2020-08-26 18:47:21 +02:00
airq.h s390/airq: use DMA memory for adapter interrupts 2019-06-15 12:25:05 +02:00
alternative-asm.h s390: add assembler macros for CPU alternatives 2018-03-28 08:38:27 +02:00
alternative.h s390/alternatives: make use of asm_inline 2019-10-31 17:20:51 +01:00
ap.h s390/zcrypt: Fix wrong dispatching for control domain CPRBs 2019-05-28 14:49:38 +02:00
appldata.h s390/appldata: pass parameter list pointer to appldata_asm 2018-10-09 11:20:50 +02:00
archrandom.h s390x: Mark archrandom.h functions __must_check 2020-01-25 12:18:51 -05:00
asm-const.h s390/kernel: unify EX_TABLE* implementations 2020-07-20 10:55:45 +02:00
asm-prototypes.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atomic_ops.h s390/atomic,bitops: mark function(s) __always_inline 2019-10-04 16:37:33 +02:00
atomic.h s390/atomic: circumvent gcc 10 build regression 2020-08-11 18:16:08 +02:00
barrier.h s390: add optimized array_index_mask_nospec 2018-02-05 07:51:41 +01:00
bitops.h kasan: support instrumented bitops combined with generic bitops 2019-11-07 13:15:39 +11:00
boot_data.h s390/ipl: read IPL report at early boot 2019-04-26 12:34:05 +02:00
bug.h printk: Make linux/printk.h self-contained 2020-07-27 17:46:24 +09:00
bugs.h s390: add a few more SPDX identifiers 2017-12-05 07:51:09 +01:00
cache.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ccwdev.h s390/cio, s390/qeth: cleanup PNSO CHSC 2020-05-28 12:21:55 +02:00
ccwgroup.h s390/net: remove pm ops from ccwgroup drivers 2020-05-19 12:48:39 -07:00
checksum.h s390/checksum: coding style changes 2020-08-26 18:47:20 +02:00
chpid.h s390/cio: rename struct channel_path_desc 2018-03-26 16:13:11 +02:00
chsc.h s390/cio, s390/qeth: cleanup PNSO CHSC 2020-05-28 12:21:55 +02:00
cio.h s390/cio: move struct node_descriptor to cio.h 2019-06-19 17:54:27 +02:00
clocksource.h s390: convert to GENERIC_VDSO 2020-08-26 18:47:21 +02:00
clp.h s390/pci: Implement ioremap_wc/prot() with MIO 2020-09-14 10:30:07 +02:00
cmb.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cmpxchg.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
compat.h compat: provide compat_ptr() on all architectures 2020-01-03 09:32:51 +01:00
cpacf.h s390: mark __cpacf_query() as __always_inline 2019-10-04 16:37:33 +02:00
cpcmd.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cpu_mcf.h s390/cpum_cf_diag: Add support for s390 counter facility diagnostic trace 2019-02-22 09:19:56 +01:00
cpu_mf-insn.h s390/cpu_mf: add store cpu counter multiple instruction support 2019-02-22 09:19:52 +01:00
cpu_mf.h s390/cpum_sf: Replace function name in debug statements 2019-11-30 10:52:46 +01:00
cpu.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cpufeature.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cputime.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
crw.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
css_chars.h s390/cio: sanitize css_general_characteristics definition 2018-06-12 15:14:05 +02:00
ctl_reg.h s390/early: move control registers setup in C code 2019-11-20 12:58:12 +01:00
current.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
debug.h s390/debug: debug feature version 3 2020-08-11 18:16:43 +02:00
delay.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
diag.h s390/setup: diag 318: refactor struct 2020-06-23 09:16:48 +02:00
dis.h s390/tools: generate header files in arch/s390/include/generated/ 2018-01-23 07:36:53 +01:00
dma.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dwarf.h s390/vdso: revise CFI annotations of vDSO functions 2017-12-13 10:51:36 +01:00
eadm.h s390/eadm: fix CONFIG_BLOCK include dependency 2018-02-02 10:47:14 +01:00
ebcdic.h s390: fix clang -Wpointer-sign warnigns in boot code 2019-05-03 17:17:58 +02:00
elf.h s390: report new CPU capabilities 2019-04-25 15:34:10 +02:00
exec.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
extable.h s390/kernel: expand exception table logic to allow new handling options 2020-07-20 10:55:50 +02:00
extmem.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
facility.h s390: fix stfle zero padding 2019-06-19 17:54:27 +02:00
fcx.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ftrace.h s390/ftrace: use HAVE_FUNCTION_GRAPH_RET_ADDR_PTR 2019-05-02 13:54:11 +02:00
futex.h [parisc, s390, sparc64] no need for access_ok() in futex handling 2020-03-27 23:58:52 -04:00
gmap.h KVM: s390/mm: Make pages accessible before destroying the guest 2020-02-27 19:47:11 +01:00
hardirq.h softirq/s390: Move default mutators of overwritten softirq mask to s390 2018-05-14 11:25:28 +02:00
hugetlb.h mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
hw_irq.h s390/irq: make init_ext_interrupts static 2020-03-11 14:18:44 +01:00
idals.h s390/idal: use struct_size() in kmalloc() 2019-06-04 15:03:18 +02:00
idle.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
io.h s390/pci: Implement ioremap_wc/prot() with MIO 2020-09-14 10:30:07 +02:00
ipl.h s390: nvme ipl 2020-05-06 15:19:35 +02:00
irq.h s390/pci: gather statistics for floating vs directed irqs 2019-04-29 10:47:01 +02:00
irqflags.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
isc.h KVM: s390: add gib_alert_irq_handler() 2019-02-05 14:29:23 +01:00
itcw.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
jump_label.h s390/jump_label: use "i" constraint for clang 2020-01-22 13:05:35 +01:00
kasan.h mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
Kbuild KVM: Move x86's version of struct kvm_mmu_memory_cache to common code 2020-07-09 13:29:42 -04:00
kdebug.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
kexec.h s390/kernel: build a relocatable kernel 2019-04-29 10:47:10 +02:00
kprobes.h s390: support KPROBES_ON_FTRACE 2020-01-30 13:07:55 +01:00
kvm_host.h KVM: s390: Enhancement for 5.9 2020-08-03 14:19:13 -04:00
kvm_para.h KVM: Introduce paravirtualization hints and KVM_HINTS_DEDICATED 2018-03-06 18:40:44 +01:00
linkage.h s390/kernel: expand exception table logic to allow new handling options 2020-07-20 10:55:50 +02:00
livepatch.h livepatch: Remove klp_check_compiler_support() 2019-05-10 17:53:29 -04:00
lowcore.h s390: prevent leaking kernel address in BEAR 2020-03-10 15:16:25 +01:00
mem_detect.h s390/mem_detect: provide single get_mem_detect_end 2019-08-26 12:51:18 +02:00
mem_encrypt.h s390/mm: Remove sev_active() function 2019-08-09 22:52:11 +10:00
mmu_context.h s390 updates for the 5.7 merge window 2020-04-04 09:45:50 -07:00
mmu.h s390 updates for the 5.7 merge window 2020-04-04 09:45:50 -07:00
mmzone.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
module.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nmi.h s390: remove critical section cleanup from entry.S 2020-05-28 12:21:54 +02:00
nospec-branch.h s390: correct nospec auto detection init order 2018-04-11 17:46:00 +02:00
nospec-insn.h s390/nospec: rename assembler generated expoline thunks 2019-05-02 13:54:11 +02:00
numa.h s390/mm: remove fake numa support 2020-02-27 16:02:21 +01:00
os_info.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
page-states.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
page.h mm/vma: define a default value for VM_DATA_DEFAULT_FLAGS 2020-04-10 15:36:21 -07:00
pci_clp.h s390/pci: Implement ioremap_wc/prot() with MIO 2020-09-14 10:30:07 +02:00
pci_debug.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-13 11:47:01 -08:00
pci_dma.h s390/pci: remove unused functions 2020-06-29 16:32:09 +02:00
pci_insn.h s390: fix setting of mio addressing control 2019-07-11 20:40:02 +02:00
pci_io.h s390/pci: Fix s390_mmio_read/write with MIO 2020-05-14 23:21:37 +02:00
pci.h s390/pci: Implement ioremap_wc/prot() with MIO 2020-09-14 10:30:07 +02:00
percpu.h s390: enforce CONFIG_SMP 2019-06-07 10:09:37 +02:00
perf_event.h s390: implement perf_arch_fetch_caller_regs 2019-11-30 10:52:44 +01:00
pgalloc.h s390/mm: cleanup init_new_context() callback 2020-03-28 12:46:12 +01:00
pgtable.h s390/pci: Implement ioremap_wc/prot() with MIO 2020-09-14 10:30:07 +02:00
pkey.h s390/pkey: pkey cleanup: narrow in-kernel API, fix some variable types 2019-08-21 12:58:53 +02:00
pnet.h s390/net: move pnet constants 2019-02-07 18:06:18 -08:00
preempt.h sched/rt, s390: Use CONFIG_PREEMPTION 2019-12-08 14:37:35 +01:00
processor.h s390: remove critical section cleanup from entry.S 2020-05-28 12:21:54 +02:00
ptrace.h s390: enable HAVE_FUNCTION_ERROR_INJECTION 2020-07-27 10:33:28 +02:00
purgatory.h s390/purgatory: Remove duplicate variable definitions 2018-07-06 08:47:51 +02:00
qdio.h s390/qdio: clean up QDR setup 2020-09-14 10:30:07 +02:00
runtime_instr.h s390/runtime instrumentation: provide uapi header file 2018-02-02 10:47:15 +01:00
schid.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sclp.h s390/ipl: Fix detection of has_secure attribute 2019-07-11 20:40:02 +02:00
scsw.h s390: fix comment for scsw_cmd_is_valid_sctl 2018-02-22 15:31:24 +01:00
seccomp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sections.h locking/lockdep: check for freed initmem in static_obj() 2019-04-29 10:47:10 +02:00
serial.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
set_memory.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
setup.h s390/pci: Implement ioremap_wc/prot() with MIO 2020-09-14 10:30:07 +02:00
shmparam.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
signal.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sigp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
smp.h These were the main changes in this cycle: 2020-08-03 14:39:35 -07:00
sparsemem.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
spinlock_types.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-13 11:47:01 -08:00
spinlock.h s390/alternatives: make use of asm_inline 2019-10-31 17:20:51 +01:00
stacktrace.h s390: fix register clobbering in CALL_ON_STACK 2019-11-30 10:52:47 +01:00
stp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
string.h s390/kasan: provide uninstrumented __strlen 2019-08-21 12:58:52 +02:00
switch_to.h s390: always save and restore all registers on context switch 2017-12-05 07:51:08 +01:00
syscall_wrapper.h s390: enable HAVE_FUNCTION_ERROR_INJECTION 2020-07-27 10:33:28 +02:00
syscall.h s390: fix syscall_get_error for compat processes 2020-06-17 23:05:05 +02:00
sysinfo.h s390/sysinfo: add and display licensed internal code identifier 2018-02-02 10:47:15 +01:00
termios.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
thread_info.h s390: Break cyclic percpu include 2020-07-10 12:00:02 +02:00
timex.h s390/time: remove unused function 2020-06-29 16:32:14 +02:00
tlb.h mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
tlbflush.h mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
topology.h s390/numa: set node distance to LOCAL_DISTANCE 2020-08-11 18:16:35 +02:00
uaccess.h uaccess: remove segment_eq 2020-08-12 10:57:58 -07:00
unistd.h s390: wire up clone3 system call 2019-07-23 10:45:53 +02:00
unwind.h s390/unwind: start unwinding from reliable state 2019-11-30 10:52:48 +01:00
uprobes.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
user.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uv.h KVM: s390: protvirt: Add UV cpu reset calls 2020-02-27 19:47:12 +01:00
vdso.h s390: convert to GENERIC_VDSO 2020-08-26 18:47:21 +02:00
vga.h s390: add a few more SPDX identifiers 2017-12-05 07:51:09 +01:00
vmalloc.h mm/vmalloc: Add empty <asm/vmalloc.h> headers and use them from <linux/vmalloc.h> 2019-12-10 10:12:55 +01:00
vmlinux.lds.h s390: introduce .boot.preserved.data section 2019-04-10 17:47:09 +02:00
vtime.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vtimer.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vx-insn.h s390: add alignment hints to vector load and store 2019-02-07 11:57:10 +01:00
xor.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00