mirror of https://github.com/torvalds/linux.git
PCI BARs tell us whether prefetching is safe, but they don't say
anything about write combining (WC). WC changes ordering rules
and allows writes to be collapsed, so it's not safe in general
to use it on a prefetchable region.
Add pci_iomap_wc() and pci_iomap_wc_range() so drivers can take
advantage of write combining when they know it's safe.
On architectures that don't fully support WC, e.g., x86 without
PAT, drivers for legacy framebuffers may get some of the benefit
by using arch_phys_wc_add() in addition to pci_iomap_wc(). But
arch_phys_wc_add() is unreliable and should be avoided in
general. On x86, it uses MTRRs, which are limited in number and
size, so the results will vary based on driver loading order.
The goals of adding pci_iomap_wc() are to:
- Give drivers an architecture-independent way to use WC so they can stop
using interfaces like mtrr_add() (on x86, pci_iomap_wc() uses
PAT when available).
- Move toward using _PAGE_CACHE_MODE_UC, not _PAGE_CACHE_MODE_UC_MINUS,
on x86 on ioremap_nocache() (see
|
||
|---|---|---|
| .. | ||
| bitops | ||
| 4level-fixup.h | ||
| Kbuild.asm | ||
| asm-offsets.h | ||
| atomic-long.h | ||
| atomic.h | ||
| atomic64.h | ||
| audit_change_attr.h | ||
| audit_dir_write.h | ||
| audit_read.h | ||
| audit_signal.h | ||
| audit_write.h | ||
| barrier.h | ||
| bitops.h | ||
| bitsperlong.h | ||
| bug.h | ||
| bugs.h | ||
| cache.h | ||
| cacheflush.h | ||
| checksum.h | ||
| clkdev.h | ||
| cmpxchg-local.h | ||
| cmpxchg.h | ||
| cputime.h | ||
| cputime_jiffies.h | ||
| cputime_nsecs.h | ||
| current.h | ||
| delay.h | ||
| device.h | ||
| div64.h | ||
| dma-coherent.h | ||
| dma-contiguous.h | ||
| dma-mapping-broken.h | ||
| dma-mapping-common.h | ||
| dma.h | ||
| early_ioremap.h | ||
| emergency-restart.h | ||
| exec.h | ||
| fb.h | ||
| fixmap.h | ||
| ftrace.h | ||
| futex.h | ||
| getorder.h | ||
| gpio.h | ||
| hardirq.h | ||
| hugetlb.h | ||
| hw_irq.h | ||
| ide_iops.h | ||
| int-ll64.h | ||
| io-64-nonatomic-hi-lo.h | ||
| io-64-nonatomic-lo-hi.h | ||
| io.h | ||
| ioctl.h | ||
| iomap.h | ||
| irq.h | ||
| irq_regs.h | ||
| irq_work.h | ||
| irqflags.h | ||
| kdebug.h | ||
| kmap_types.h | ||
| kvm_para.h | ||
| libata-portmap.h | ||
| linkage.h | ||
| local.h | ||
| local64.h | ||
| mcs_spinlock.h | ||
| memory_model.h | ||
| mm-arch-hooks.h | ||
| mm_hooks.h | ||
| mmu.h | ||
| mmu_context.h | ||
| module.h | ||
| msi.h | ||
| mutex-dec.h | ||
| mutex-null.h | ||
| mutex-xchg.h | ||
| mutex.h | ||
| page.h | ||
| param.h | ||
| parport.h | ||
| pci-bridge.h | ||
| pci-dma-compat.h | ||
| pci.h | ||
| pci_iomap.h | ||
| percpu.h | ||
| pgalloc.h | ||
| pgtable-nopmd.h | ||
| pgtable-nopud.h | ||
| pgtable.h | ||
| preempt.h | ||
| ptrace.h | ||
| qrwlock.h | ||
| qrwlock_types.h | ||
| qspinlock.h | ||
| qspinlock_types.h | ||
| resource.h | ||
| rtc.h | ||
| rwsem.h | ||
| seccomp.h | ||
| sections.h | ||
| segment.h | ||
| serial.h | ||
| siginfo.h | ||
| signal.h | ||
| simd.h | ||
| sizes.h | ||
| spinlock.h | ||
| statfs.h | ||
| string.h | ||
| switch_to.h | ||
| syscall.h | ||
| syscalls.h | ||
| termios-base.h | ||
| termios.h | ||
| timex.h | ||
| tlb.h | ||
| tlbflush.h | ||
| topology.h | ||
| trace_clock.h | ||
| uaccess-unaligned.h | ||
| uaccess.h | ||
| unaligned.h | ||
| unistd.h | ||
| user.h | ||
| vga.h | ||
| vmlinux.lds.h | ||
| vtime.h | ||
| word-at-a-time.h | ||
| xor.h | ||