Changes in 4.9.163 USB: serial: option: add Telit ME910 ECM composition USB: serial: cp210x: add ID for Ingenico 3070 USB: serial: ftdi_sio: add ID for Hjelmslund Electronics USB485 cpufreq: Use struct kobj_attribute instead of struct global_attr ncpfs: fix build warning of strncpy isdn: isdn_tty: fix build warning of strncpy staging: comedi: ni_660x: fix missing break in switch statement staging: wilc1000: fix to set correct value for 'vif_num' staging: android: ion: fix sys heap pool's gfp_flags ip6mr: Do not call __IP6_INC_STATS() from preemptible context net-sysfs: Fix mem leak in netdev_register_kobject sky2: Disable MSI on Dell Inspiron 1545 and Gateway P-79 team: Free BPF filter when unregistering netdev bnxt_en: Drop oversize TX packets to prevent errors. hv_netvsc: Fix IP header checksum for coalesced packets net: dsa: mv88e6xxx: Fix u64 statistics netlabel: fix out-of-bounds memory accesses net: netem: fix skb length BUG_ON in __skb_to_sgvec net: nfc: Fix NULL dereference on nfc_llcp_build_tlv fails net: sit: fix memory leak in sit_init_net() xen-netback: don't populate the hash cache on XenBus disconnect xen-netback: fix occasional leak of grant ref mappings under memory pressure net: Add __icmp_send helper. net: avoid use IPCB in cipso_v4_error tun: fix blocking read tun: remove unnecessary memory barrier net: phy: Micrel KSZ8061: link failure after cable connect x86/CPU/AMD: Set the CPB bit unconditionally on F17h applicom: Fix potential Spectre v1 vulnerabilities MIPS: irq: Allocate accurate order pages for irq stack hugetlbfs: fix races and page leaks during migration exec: Fix mem leak in kernel_read_file media: uvcvideo: Fix 'type' check leading to overflow vti4: Fix a ipip packet processing bug in 'IPCOMP' virtual tunnel perf core: Fix perf_proc_update_handler() bug perf tools: Handle TOPOLOGY headers with no CPU IB/{hfi1, qib}: Fix WC.byte_len calculation for UD_SEND_WITH_IMM iommu/amd: Call free_iova_fast with pfn in map_sg iommu/amd: Unmap all mapped pages in error path of map_sg ipvs: Fix signed integer overflow when setsockopt timeout iommu/amd: Fix IOMMU page flush when detach device from a domain xtensa: SMP: fix ccount_timer_shutdown xtensa: SMP: fix secondary CPU initialization xtensa: smp_lx200_defconfig: fix vectors clash xtensa: SMP: mark each possible CPU as present xtensa: SMP: limit number of possible CPUs by NR_CPUS net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case net: hns: Fix for missing of_node_put() after of_parse_phandle() net: hns: Fix wrong read accesses via Clause 45 MDIO protocol net: stmmac: dwmac-rk: fix error handling in rk_gmac_powerup() gpio: vf610: Mask all GPIO interrupts nfs: Fix NULL pointer dereference of dev_name qed: Fix VF probe failure while FLR scsi: libfc: free skb when receiving invalid flogi resp platform/x86: Fix unmet dependency warning for SAMSUNG_Q10 cifs: fix computation for MAX_SMB2_HDR_SIZE arm64: kprobe: Always blacklist the KVM world-switch code x86/kexec: Don't setup EFI info if EFI runtime is not enabled x86_64: increase stack size for KASAN_EXTRA mm, memory_hotplug: is_mem_section_removable do not pass the end of a zone mm, memory_hotplug: test_pages_in_a_zone do not pass the end of zone fs/drop_caches.c: avoid softlockups in drop_pagecache_sb() autofs: drop dentry reference only when it is never used autofs: fix error return in autofs_fill_super() soc: fsl: qbman: avoid race in clearing QMan interrupt ARM: pxa: ssp: unneeded to free devm_ allocated data arm64: dts: add msm8996 compatible to gicv3 usb: phy: fix link errors irqchip/mmp: Only touch the PJ4 IRQ & FIQ bits on enable/disable drm/sun4i: tcon: Prepare and enable TCON channel 0 clock at init dmaengine: at_xdmac: Fix wrongfull report of a channel as in use vsock/virtio: fix kernel panic after device hot-unplug vsock/virtio: reset connected sockets on device removal dmaengine: dmatest: Abort test in case of mapping error selftests: netfilter: fix config fragment CONFIG_NF_TABLES_INET selftests: netfilter: add simple masq/redirect test cases netfilter: nf_nat: skip nat clash resolution for same-origin entries s390/qeth: fix use-after-free in error path perf symbols: Filter out hidden symbols from labels MIPS: Remove function size check in get_frame_info() fs: ratelimit __find_get_block_slow() failure message. Input: wacom_serial4 - add support for Wacom ArtPad II tablet Input: elan_i2c - add id for touchpad found in Lenovo s21e-20 iscsi_ibft: Fix missing break in switch statement scsi: aacraid: Fix missing break in switch statement futex,rt_mutex: Restructure rt_mutex_finish_proxy_lock() ARM: dts: exynos: Fix pinctrl definition for eMMC RTSN line on Odroid X2/U3 ARM: dts: exynos: Add minimal clkout parameters to Exynos3250 PMU drm: disable uncached DMA optimization for ARM and arm64 ARM: 8781/1: Fix Thumb-2 syscall return for binutils 2.29+ ARM: dts: exynos: Do not ignore real-world fuse values for thermal zone 0 on Exynos5420 perf/x86/intel: Make cpuc allocations consistent perf/x86/intel: Generalize dynamic constraint creation x86: Add TSX Force Abort CPUID/MSR Linux 4.9.163 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
68 lines
2.7 KiB
C
68 lines
2.7 KiB
C
/**************************************************************************
|
|
*
|
|
* Copyright 2009 Red Hat Inc.
|
|
* All Rights Reserved.
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
* copy of this software and associated documentation files (the
|
|
* "Software"), to deal in the Software without restriction, including
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
* distribute, sub license, and/or sell copies of the Software, and to
|
|
* permit persons to whom the Software is furnished to do so, subject to
|
|
* the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice (including the
|
|
* next paragraph) shall be included in all copies or substantial portions
|
|
* of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
|
* THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
|
|
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
*
|
|
*
|
|
**************************************************************************/
|
|
/*
|
|
* Authors:
|
|
* Dave Airlie <airlied@redhat.com>
|
|
*/
|
|
|
|
#ifndef _DRM_CACHE_H_
|
|
#define _DRM_CACHE_H_
|
|
|
|
void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
|
|
|
|
static inline bool drm_arch_can_wc_memory(void)
|
|
{
|
|
#if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
|
|
return false;
|
|
#elif defined(CONFIG_MIPS) && defined(CONFIG_CPU_LOONGSON3)
|
|
return false;
|
|
#elif defined(CONFIG_ARM) || defined(CONFIG_ARM64)
|
|
/*
|
|
* The DRM driver stack is designed to work with cache coherent devices
|
|
* only, but permits an optimization to be enabled in some cases, where
|
|
* for some buffers, both the CPU and the GPU use uncached mappings,
|
|
* removing the need for DMA snooping and allocation in the CPU caches.
|
|
*
|
|
* The use of uncached GPU mappings relies on the correct implementation
|
|
* of the PCIe NoSnoop TLP attribute by the platform, otherwise the GPU
|
|
* will use cached mappings nonetheless. On x86 platforms, this does not
|
|
* seem to matter, as uncached CPU mappings will snoop the caches in any
|
|
* case. However, on ARM and arm64, enabling this optimization on a
|
|
* platform where NoSnoop is ignored results in loss of coherency, which
|
|
* breaks correct operation of the device. Since we have no way of
|
|
* detecting whether NoSnoop works or not, just disable this
|
|
* optimization entirely for ARM and arm64.
|
|
*/
|
|
return false;
|
|
#else
|
|
return true;
|
|
#endif
|
|
}
|
|
|
|
#endif
|