set_memory_* functions header refactor
Subsystems (32)
v3 cover set_memory_* functions header refactor
Hi,
This is v3 of the series to decouple set_memory_* from cacheflush.h. This version contains a few minor alphabetical order fixes and some fixes caught by the 0day bot. Several places unfortunately need an #ifdef around the header for arches without the set_memory_* functions.
Andrew, it might be best to wait a few days to let the 0day bot churn on this series.
Thanks,
Laura
Laura Abbott (16):
treewide: Move set_memory_* functions away from cacheflush.h
arm: Use set_memory.h header
arm64: Use set_memory.h header
s390: Use set_memory.h header
x86: Use set_memory.h header
agp: Use set_memory.h header
drm: Use set_memory.h header
intel_th: Use set_memory.h header
watchdog: hpwdt: Use set_memory.h header
bpf: Use set_memory.h header
module: Use set_memory.h header
PM / hibernate: Use set_memory.h header
ALSA: Use set_memory.h header
misc: sram: Use set_memory.h header
video: vermilion: Use set_memory.h header
treewide: Decouple cacheflush.h and set_memory.h
arch/arm/include/asm/cacheflush.h | 20 ------- arch/arm/include/asm/set_memory.h | 32 ++++++++++++ arch/arm/kernel/ftrace.c | 1 + arch/arm/kernel/machine_kexec.c | 1 + arch/arm/mm/pageattr.c | 1 + arch/arm/net/bpf_jit_32.c | 1 + arch/arm64/include/asm/Kbuild | 1 + arch/arm64/include/asm/cacheflush.h | 5 -- arch/arm64/mm/pageattr.c | 1 + arch/arm64/net/bpf_jit_comp.c | 1 + arch/s390/include/asm/Kbuild | 1 + arch/s390/include/asm/cacheflush.h | 34 ------------ arch/s390/include/asm/set_memory.h | 31 +++++++++++ arch/s390/kernel/ftrace.c | 1 + arch/s390/kernel/kprobes.c | 2 +- arch/s390/kernel/machine_kexec.c | 1 + arch/s390/mm/init.c | 1 + arch/s390/mm/pageattr.c | 1 + arch/s390/mm/vmem.c | 1 + arch/s390/net/bpf_jit_comp.c | 1 + arch/x86/include/asm/cacheflush.h | 85 ------------------------------ arch/x86/include/asm/set_memory.h | 87 +++++++++++++++++++++++++++++++ arch/x86/kernel/amd_gart_64.c | 2 +- arch/x86/kernel/cpu/amd.c | 2 +- arch/x86/kernel/cpu/bugs.c | 2 +- arch/x86/kernel/ftrace.c | 2 +- arch/x86/kernel/machine_kexec_32.c | 2 +- arch/x86/kernel/machine_kexec_64.c | 1 + arch/x86/mm/init.c | 2 +- arch/x86/mm/init_32.c | 2 +- arch/x86/mm/init_64.c | 2 +- arch/x86/mm/ioremap.c | 2 +- arch/x86/mm/pageattr.c | 1 + arch/x86/net/bpf_jit_comp.c | 1 + arch/x86/pci/pcbios.c | 2 +- arch/x86/platform/efi/efi.c | 2 +- arch/x86/realmode/init.c | 2 +- drivers/char/agp/amd-k7-agp.c | 1 + drivers/char/agp/ati-agp.c | 1 + drivers/char/agp/generic. | 0 drivers/char/agp/generic.c | 4 +- drivers/char/agp/intel-gtt.c | 1 + drivers/char/agp/sworks-agp.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 3 ++ drivers/gpu/drm/gma500/gtt.c | 1 + drivers/gpu/drm/gma500/psb_drv.c | 1 + drivers/gpu/drm/radeon/radeon_gart.c | 3 ++ drivers/gpu/drm/ttm/ttm_page_alloc.c | 3 ++ drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 3 ++ drivers/gpu/drm/ttm/ttm_tt.c | 3 ++ drivers/hwtracing/intel_th/msu.c | 4 +- drivers/misc/sram-exec.c | 3 +- drivers/video/fbdev/vermilion/vermilion.c | 2 +- drivers/watchdog/hpwdt.c | 2 +- include/asm-generic/set_memory.h | 12 +++++ include/linux/filter.h | 4 +- kernel/module.c | 3 ++ kernel/power/snapshot.c | 3 ++ sound/pci/hda/hda_intel.c | 2 +- sound/pci/intel8x0.c | 4 +- sound/x86/intel_hdmi_audio.c | 2 +- 61 files changed, 237 insertions(+), 166 deletions(-) create mode 100644 arch/arm/include/asm/set_memory.h delete mode 100644 arch/s390/include/asm/cacheflush.h create mode 100644 arch/s390/include/asm/set_memory.h create mode 100644 arch/x86/include/asm/set_memory.h create mode 100644 drivers/char/agp/generic. create mode 100644 include/asm-generic/set_memory.h
Signature · 1 line
2.7.4
PATCH v3 1/16 treewide: Move set_memory_* functions away from cacheflush.h
The set_memory_* APIs came out of a desire to have a better way to change memory attributes. Many of these attributes were linked to cache functionality so the prototypes were put in cacheflush.h. These days, the APIs have grown and have a much wider use than just cache APIs. To support this growth, split off set_memory_* and friends into a separate header file to avoid growing cacheflush.h for APIs that have nothing to do with caches.
---
v3: No changes
--- arch/arm/include/asm/cacheflush.h | 21 +-------- arch/arm/include/asm/set_memory.h | 32 ++++++++++++++ arch/arm64/include/asm/Kbuild | 1 + arch/arm64/include/asm/cacheflush.h | 6 +-- arch/s390/include/asm/cacheflush.h | 28 +----------- arch/s390/include/asm/set_memory.h | 31 +++++++++++++ arch/x86/include/asm/cacheflush.h | 86 +----------------------------------- arch/x86/include/asm/set_memory.h | 87 +++++++++++++++++++++++++++++++++++++ include/asm-generic/set_memory.h | 12 +++++ 9 files changed, 167 insertions(+), 137 deletions(-) create mode 100644 arch/arm/include/asm/set_memory.h create mode 100644 arch/s390/include/asm/set_memory.h create mode 100644 arch/x86/include/asm/set_memory.h create mode 100644 include/asm-generic/set_memory.h
arch/arm/include/asm/cacheflush.h +1 -20
@@ -16,6 +16,7 @@#include <asm/shmparam.h> #include <asm/cachetype.h> #include <asm/outercache.h> +#include <asm/set_memory.h> #define CACHE_COLOUR (vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT)
@@ -478,26 +479,6 @@ static inline void __sync_cache_range_r(volatile void *p, size_t size) : : : "r0","r1","r2","r3","r4","r5","r6","r7", \ "r9","r10","lr","memory" ) -#ifdef CONFIG_MMU -int set_memory_ro (unsigned long addr,int numpages); -int set_memory_rw (unsigned long addr,int numpages); -int set_memory_x (unsigned long addr,int numpages); -int set_memory_nx (unsigned long addr,int numpages); -#else -static inline int set_memory_ro (unsigned long addr,int numpages) {return 0 ; } -static inline int set_memory_rw (unsigned long addr,int numpages) {return 0 ; } -static inline int set_memory_x (unsigned long addr,int numpages) {return 0 ; } -static inline int set_memory_nx (unsigned long addr,int numpages) {return 0 ; } -#endif - -#ifdef CONFIG_STRICT_KERNEL_RWX -void set_kernel_text_rw (void ); -void set_kernel_text_ro (void ); -#else -static inline void set_kernel_text_rw (void ) { } -static inline void set_kernel_text_ro (void ) { } -#endif -void flush_uprobe_xol_access (struct page *page,unsigned long uaddr,void *kaddr,unsigned long len);
arch/arm/include/asm/set_memory.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* Copyright (C) 1999-2002 Russell King +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef _ASMARM_SET_MEMORY_H +#define _ASMARM_SET_MEMORY_H + +#ifdef CONFIG_MMU +int set_memory_ro (unsigned long addr,int numpages); +int set_memory_rw (unsigned long addr,int numpages); +int set_memory_x (unsigned long addr,int numpages); +int set_memory_nx (unsigned long addr,int numpages); +#else +static inline int set_memory_ro (unsigned long addr,int numpages) {return 0 ; } +static inline int set_memory_rw (unsigned long addr,int numpages) {return 0 ; } +static inline int set_memory_x (unsigned long addr,int numpages) {return 0 ; } +static inline int set_memory_nx (unsigned long addr,int numpages) {return 0 ; } +#endif + +#ifdef CONFIG_STRICT_KERNEL_RWX +void set_kernel_text_rw (void ); +void set_kernel_text_ro (void ); +#else +static inline void set_kernel_text_rw (void ) { } +static inline void set_kernel_text_ro (void ) { } +#endif + +#endif
arch/arm64/include/asm/Kbuild +1 -0
@@ -29,6 +29,7 @@ generic-y += rwsem.h generic-y += segment.h generic-y += sembuf.h generic-y += serial.h +generic-y += set_memory.h generic-y += shmbuf.h generic-y += simd.h generic-y += sizes.h
arch/arm64/include/asm/cacheflush.h +1 -5
@@ -20,6 +20,7 @@#define __ASM_CACHEFLUSH_H#include <linux/mm.h> +#include <asm/set_memory.h> /* * This flag is used to indicate that the page pointed to by a pte is clean
@@ -150,9 +151,4 @@ static inline void flush_cache_vunmap(unsigned long start, unsigned long end) { } -int set_memory_ro (unsigned long addr,int numpages); -int set_memory_rw (unsigned long addr,int numpages); -int set_memory_x (unsigned long addr,int numpages); -int set_memory_nx (unsigned long addr,int numpages); -#endif
arch/s390/include/asm/cacheflush.h +1 -27
@@ -3,32 +3,6 @@/* Caches aren't brain-dead on the s390. */ #include <asm-generic/cacheflush.h> - -#define SET_MEMORY_RO 1UL -#define SET_MEMORY_RW 2UL -#define SET_MEMORY_NX 4UL -#define SET_MEMORY_X 8UL - -int __set_memory (unsigned long addr,int numpages,unsigned long flags); - -static inline int set_memory_ro (unsigned long addr,int numpages) -{ -return __set_memory (addr, numpages,SET_MEMORY_RO ); -} - -static inline int set_memory_rw (unsigned long addr,int numpages) -{ -return __set_memory (addr, numpages,SET_MEMORY_RW ); -} - -static inline int set_memory_nx (unsigned long addr,int numpages) -{ -return __set_memory (addr, numpages,SET_MEMORY_NX ); -} - -static inline int set_memory_x (unsigned long addr,int numpages) -{ -return __set_memory (addr, numpages,SET_MEMORY_X ); -} +#include <asm/set_memory.h> #endif /* _S390_CACHEFLUSH_H */
arch/s390/include/asm/set_memory.h new file +31 -0
@@ -0,0 +1,31 @@ +#ifndef _ASMS390_SET_MEMORY_H +#define _ASMS390_SET_MEMORY_H + +#define SET_MEMORY_RO 1UL +#define SET_MEMORY_RW 2UL +#define SET_MEMORY_NX 4UL +#define SET_MEMORY_X 8UL + +int __set_memory (unsigned long addr,int numpages,unsigned long flags); + +static inline int set_memory_ro (unsigned long addr,int numpages) +{ +return __set_memory (addr, numpages,SET_MEMORY_RO ); +} + +static inline int set_memory_rw (unsigned long addr,int numpages) +{ +return __set_memory (addr, numpages,SET_MEMORY_RW ); +} + +static inline int set_memory_nx (unsigned long addr,int numpages) +{ +return __set_memory (addr, numpages,SET_MEMORY_NX ); +} + +static inline int set_memory_x (unsigned long addr,int numpages) +{ +return __set_memory (addr, numpages,SET_MEMORY_X ); +} + +#endif
arch/x86/include/asm/cacheflush.h +1 -85
95 lines not on this page · raw message
arch/x86/include/asm/set_memory.h new file +87 -0
87 lines not on this page · raw message
include/asm-generic/set_memory.h new file +12 -0
@@ -0,0 +1,12 @@ +#ifndef __ASM_SET_MEMORY_H +#define __ASM_SET_MEMORY_H + +/* +* Functions to change memory attributes. +*/ +int set_memory_ro (unsigned long addr,int numpages); +int set_memory_rw (unsigned long addr,int numpages); +int set_memory_x (unsigned long addr,int numpages); +int set_memory_nx (unsigned long addr,int numpages); + +#endif
Signature · 1 line
2.7.4
PATCH v3 2/16 arm: Use set_memory.h header
In reply to Laura Abbottset_memory_* functions have moved to set_memory.h. Switch to this explicitly
---
v3: Add one file, keep the cacheflush.h header in bpf
--- arch/arm/kernel/ftrace.c | 1 + arch/arm/kernel/machine_kexec.c | 1 + arch/arm/mm/pageattr.c | 1 + arch/arm/net/bpf_jit_32.c | 1 + 4 files changed, 4 insertions(+)
arch/arm/kernel/ftrace.c +1 -0
@@ -21,6 +21,7 @@#include <asm/opcodes.h> #include <asm/ftrace.h> #include <asm/insn.h> +#include <asm/set_memory.h> #ifdef CONFIG_THUMB2_KERNEL #define NOP 0xf85deb04/* pop.w {lr} */
arch/arm/kernel/machine_kexec.c +1 -0
@@ -18,6 +18,7 @@#include <asm/mach-types.h> #include <asm/smp_plat.h> #include <asm/system_misc.h> +#include <asm/set_memory.h> extern void relocate_new_kernel (void );extern const unsigned int relocate_new_kernel_size;
arch/arm/mm/pageattr.c +1 -0
@@ -15,6 +15,7 @@#include <asm/pgtable.h> #include <asm/tlbflush.h> +#include <asm/set_memory.h> struct page_change_data {pgprot_t set_mask;
arch/arm/net/bpf_jit_32.c +1 -0
@@ -18,6 +18,7 @@#include <linux/if_vlan.h> #include <asm/cacheflush.h> +#include <asm/set_memory.h> #include <asm/hwcap.h> #include <asm/opcodes.h>
Signature · 1 line
2.7.4
PATCH v3 3/16 arm64: Use set_memory.h header
In reply to Laura AbbottThe set_memory_* functions have moved to set_memory.h. Use that header explicitly.
---
v3: Alphabetical order
--- arch/arm64/mm/pageattr.c | 1 + arch/arm64/net/bpf_jit_comp.c | 1 + 2 files changed, 2 insertions(+)
arch/arm64/mm/pageattr.c +1 -0
@@ -17,6 +17,7 @@#include <linux/vmalloc.h> #include <asm/pgtable.h> +#include <asm/set_memory.h> #include <asm/tlbflush.h> struct page_change_data {
arch/arm64/net/bpf_jit_comp.c +1 -0
@@ -27,6 +27,7 @@#include <asm/byteorder.h> #include <asm/cacheflush.h> #include <asm/debug-monitors.h> +#include <asm/set_memory.h> #include "bpf_jit.h"
Signature · 1 line
2.7.4
PATCH v3 4/16 s390: Use set_memory.h header
In reply to Laura Abbottset_memory_* functions have moved to set_memory.h. Switch to this explicitly
---
v3: No changes
--- arch/s390/kernel/ftrace.c | 1 + arch/s390/kernel/kprobes.c | 2 +- arch/s390/kernel/machine_kexec.c | 1 + arch/s390/mm/init.c | 1 + arch/s390/mm/pageattr.c | 1 + arch/s390/mm/vmem.c | 1 + arch/s390/net/bpf_jit_comp.c | 1 + 7 files changed, 7 insertions(+), 1 deletion(-)
arch/s390/kernel/ftrace.c +1 -0
@@ -17,6 +17,7 @@#include <trace/syscall.h> #include <asm/asm-offsets.h> #include <asm/cacheflush.h> +#include <asm/set_memory.h> #include "entry.h" /*
arch/s390/kernel/kprobes.c +1 -1
@@ -31,7 +31,7 @@#include <linux/slab.h> #include <linux/hardirq.h> #include <linux/ftrace.h> -#include <asm/cacheflush.h> +#include <asm/set_memory.h> #include <asm/sections.h> #include <linux/uaccess.h> #include <asm/dis.h>
arch/s390/kernel/machine_kexec.c +1 -0
@@ -26,6 +26,7 @@#include <asm/asm-offsets.h> #include <asm/cacheflush.h> #include <asm/os_info.h> +#include <asm/set_memory.h> #include <asm/switch_to.h> typedef void (*relocate_kernel_t )(kimage_entry_t *,unsigned long );
arch/s390/mm/init.c +1 -0
@@ -39,6 +39,7 @@#include <asm/sections.h> #include <asm/ctl_reg.h> #include <asm/sclp.h> +#include <asm/set_memory.h> pgd_t swapper_pg_dir[PTRS_PER_PGD] __section(.bss..swapper_pg_dir);
arch/s390/mm/pageattr.c +1 -0
@@ -8,6 +8,7 @@#include <asm/facility.h> #include <asm/pgtable.h> #include <asm/page.h> +#include <asm/set_memory.h> static inline unsigned long sske_frame (unsigned long addr,unsigned char skey) {
arch/s390/mm/vmem.c +1 -0
@@ -17,6 +17,7 @@#include <asm/setup.h> #include <asm/tlbflush.h> #include <asm/sections.h> +#include <asm/set_memory.h> static DEFINE_MUTEX (vmem_mutex);
arch/s390/net/bpf_jit_comp.c +1 -0
@@ -24,6 +24,7 @@#include <linux/bpf.h> #include <asm/cacheflush.h> #include <asm/dis.h> +#include <asm/set_memory.h> #include "bpf_jit.h" int bpf_jit_enable__read_mostly ;
Signature · 1 line
2.7.4
PATCH v3 5/16 x86: Use set_memory.h header
In reply to Laura Abbottset_memory_* functions have moved to set_memory.h. Switch to this explicitly.
---
v3: Add missing headers
--- arch/x86/kernel/amd_gart_64.c | 2 +- arch/x86/kernel/cpu/amd.c | 2 +- arch/x86/kernel/cpu/bugs.c | 2 +- arch/x86/kernel/ftrace.c | 2 +- arch/x86/kernel/machine_kexec_32.c | 2 +- arch/x86/kernel/machine_kexec_64.c | 1 + arch/x86/mm/init.c | 2 +- arch/x86/mm/init_32.c | 2 +- arch/x86/mm/init_64.c | 2 +- arch/x86/mm/ioremap.c | 2 +- arch/x86/mm/pageattr.c | 1 + arch/x86/net/bpf_jit_comp.c | 1 + arch/x86/pci/pcbios.c | 2 +- arch/x86/platform/efi/efi.c | 2 +- arch/x86/realmode/init.c | 2 +- 15 files changed, 15 insertions(+), 12 deletions(-)
arch/x86/kernel/amd_gart_64.c +1 -1
@@ -36,7 +36,7 @@#include <asm/proto.h> #include <asm/iommu.h> #include <asm/gart.h> -#include <asm/cacheflush.h> +#include <asm/set_memory.h> #include <asm/swiotlb.h> #include <asm/dma.h> #include <asm/amd_nb.h>
arch/x86/kernel/cpu/amd.c +1 -1
@@ -16,7 +16,7 @@#ifdef CONFIG_X86_64 # include <asm/mmconfig.h> -# include <asm/cacheflush.h> +# include <asm/set_memory.h> #endif #include "cpu.h"
arch/x86/kernel/cpu/bugs.c +1 -1
@@ -17,7 +17,7 @@#include <asm/paravirt.h> #include <asm/alternative.h> #include <asm/pgtable.h> -#include <asm/cacheflush.h> +#include <asm/set_memory.h> void __init check_bugs (void ) {
arch/x86/kernel/ftrace.c +1 -1
@@ -24,7 +24,7 @@#include <trace/syscall.h> -#include <asm/cacheflush.h> +#include <asm/set_memory.h> #include <asm/kprobes.h> #include <asm/ftrace.h> #include <asm/nops.h>
arch/x86/kernel/machine_kexec_32.c +1 -1
@@ -23,7 +23,7 @@#include <asm/io_apic.h> #include <asm/cpufeature.h> #include <asm/desc.h> -#include <asm/cacheflush.h> +#include <asm/set_memory.h> #include <asm/debugreg.h> static void set_idt (void *newidt,__u16 limit)
arch/x86/kernel/machine_kexec_64.c +1 -0
@@ -27,6 +27,7 @@#include <asm/debugreg.h> #include <asm/kexec-bzimage64.h> #include <asm/setup.h> +#include <asm/set_memory.h> #ifdef CONFIG_KEXEC_FILE static struct kexec_file_ops *kexec_file_loaders[] = {
arch/x86/mm/init.c +1 -1
@@ -5,7 +5,7 @@#include <linux/memblock.h> #include <linux/bootmem.h> /* for max_low_pfn */ -#include <asm/cacheflush.h> +#include <asm/set_memory.h> #include <asm/e820.h> #include <asm/init.h> #include <asm/page.h>
arch/x86/mm/init_32.c +1 -1
@@ -48,7 +48,7 @@#include <asm/sections.h> #include <asm/paravirt.h> #include <asm/setup.h> -#include <asm/cacheflush.h> +#include <asm/set_memory.h> #include <asm/page_types.h> #include <asm/init.h>
arch/x86/mm/init_64.c +1 -1
@@ -50,7 +50,7 @@#include <asm/sections.h> #include <asm/kdebug.h> #include <asm/numa.h> -#include <asm/cacheflush.h> +#include <asm/set_memory.h> #include <asm/init.h> #include <asm/uv/uv.h> #include <asm/setup.h>
arch/x86/mm/ioremap.c +1 -1
@@ -13,7 +13,7 @@#include <linux/vmalloc.h> #include <linux/mmiotrace.h> -#include <asm/cacheflush.h> +#include <asm/set_memory.h> #include <asm/e820.h> #include <asm/fixmap.h> #include <asm/pgtable.h>
arch/x86/mm/pageattr.c +1 -0
@@ -24,6 +24,7 @@#include <asm/pgalloc.h> #include <asm/proto.h> #include <asm/pat.h> +#include <asm/set_memory.h> /* * The current flushing context - we pass it instead of 5 arguments:
arch/x86/net/bpf_jit_comp.c +1 -0
@@ -12,6 +12,7 @@#include <linux/filter.h> #include <linux/if_vlan.h> #include <asm/cacheflush.h> +#include <asm/set_memory.h> #include <linux/bpf.h> int bpf_jit_enable__read_mostly ;
arch/x86/pci/pcbios.c +1 -1
@@ -9,7 +9,7 @@#include <linux/uaccess.h> #include <asm/pci_x86.h> #include <asm/pci-functions.h> -#include <asm/cacheflush.h> +#include <asm/set_memory.h> /* BIOS32 signature: "_32_" */ #define BIOS32_SIGNATURE (('_' << 0) + ('3' << 8) + ('2' << 16) + ('_' << 24))
arch/x86/platform/efi/efi.c +1 -1
@@ -48,7 +48,7 @@#include <asm/setup.h> #include <asm/efi.h> #include <asm/time.h> -#include <asm/cacheflush.h> +#include <asm/set_memory.h> #include <asm/tlbflush.h> #include <asm/x86_init.h> #include <asm/uv/uv.h>
arch/x86/realmode/init.c +1 -1
@@ -2,7 +2,7 @@#include <linux/slab.h> #include <linux/memblock.h> -#include <asm/cacheflush.h> +#include <asm/set_memory.h> #include <asm/pgtable.h> #include <asm/realmode.h> #include <asm/tlbflush.h>
Signature · 1 line
2.7.4
PATCH v3 6/16 agp: Use set_memory.h header
In reply to Laura Abbottset_memory_* functions have moved to set_memory.h. Switch to this explicitly.
---
v3: Added some #ifdef CONFIG_X86
--- drivers/char/agp/amd-k7-agp.c | 1 + drivers/char/agp/ati-agp.c | 1 + drivers/char/agp/generic. | 0 drivers/char/agp/generic.c | 4 +++- drivers/char/agp/intel-gtt.c | 1 + drivers/char/agp/sworks-agp.c | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 drivers/char/agp/generic.
drivers/char/agp/amd-k7-agp.c +1 -0
@@ -9,6 +9,7 @@#include <linux/page-flags.h> #include <linux/mm.h> #include <linux/slab.h> +#include <asm/set_memory.h> #include "agp.h" #define AMD_MMBASE_BAR 1
drivers/char/agp/ati-agp.c +1 -0
@@ -10,6 +10,7 @@#include <linux/slab.h> #include <linux/agp_backend.h> #include <asm/agp.h> +#include <asm/set_memory.h> #include "agp.h" #define ATI_GART_MMBASE_BAR 1
drivers/char/agp/generic. new file +0 -0
drivers/char/agp/generic.c +3 -1
@@ -39,7 +39,9 @@#include <linux/sched.h> #include <linux/slab.h> #include <asm/io.h> -#include <asm/cacheflush.h> +#ifdef CONFIG_X86 +#include <asm/set_memory.h> +#endif #include <asm/pgtable.h> #include "agp.h"
drivers/char/agp/intel-gtt.c +1 -0
@@ -25,6 +25,7 @@#include "agp.h" #include "intel-agp.h" #include <drm/intel-gtt.h> +#include <asm/set_memory.h> /* * If we have Intel graphics, we're not going to have anything other than
drivers/char/agp/sworks-agp.c +1 -0
@@ -9,6 +9,7 @@#include <linux/slab.h> #include <linux/jiffies.h> #include <linux/agp_backend.h> +#include <asm/set_memory.h> #include "agp.h" #define SVWRKS_COMMAND 0x04
Signature · 1 line
2.7.4
PATCH v3 7/16 drm: Use set_memory.h header
In reply to Laura Abbottset_memory_* functions have moved to set_memory.h. Switch to this explicitly.
---
v3: Add some #ifdef CONFIG_X86
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 3 +++ drivers/gpu/drm/gma500/gtt.c | 1 + drivers/gpu/drm/gma500/psb_drv.c | 1 + drivers/gpu/drm/radeon/radeon_gart.c | 3 +++ drivers/gpu/drm/ttm/ttm_page_alloc.c | 3 +++ drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 3 +++ drivers/gpu/drm/ttm/ttm_tt.c | 3 +++ 7 files changed, 17 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c +3 -0
@@ -27,6 +27,9 @@*/ #include <drm/drmP.h> #include <drm/amdgpu_drm.h> +#ifdef CONFIG_X86 +#include <asm/set_memory.h> +#endif #include "amdgpu.h" /*
drivers/gpu/drm/gma500/gtt.c +1 -0
@@ -21,6 +21,7 @@#include <drm/drmP.h> #include <linux/shmem_fs.h> +#include <asm/set_memory.h> #include "psb_drv.h" #include "blitter.h"
drivers/gpu/drm/gma500/psb_drv.c +1 -0
@@ -35,6 +35,7 @@#include <linux/pm_runtime.h> #include <acpi/video.h> #include <linux/module.h> +#include <asm/set_memory.h> static struct drm_driver driver;static int psb_pci_probe (struct pci_dev *pdev,const struct pci_device_id *ent);
drivers/gpu/drm/radeon/radeon_gart.c +3 -0
@@ -27,6 +27,9 @@*/ #include <drm/drmP.h> #include <drm/radeon_drm.h> +#ifdef CONFIG_X86 +#include <asm/set_memory.h> +#endif #include "radeon.h" /*
drivers/gpu/drm/ttm/ttm_page_alloc.c +3 -0
@@ -51,6 +51,9 @@#if IS_ENABLED (CONFIG_AGP )#include <asm/agp.h> #endif +#ifdef CONFIG_X86 +#include <asm/set_memory.h> +#endif #define NUM_PAGES_TO_ALLOC (PAGE_SIZE/sizeof(struct page *))#define SMALL_ALLOCATION 16
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c +3 -0
@@ -53,6 +53,9 @@#if IS_ENABLED (CONFIG_AGP )#include <asm/agp.h> #endif +#ifdef CONFIG_X86 +#include <asm/set_memory.h> +#endif #define NUM_PAGES_TO_ALLOC (PAGE_SIZE/sizeof(struct page *))#define SMALL_ALLOCATION 4
drivers/gpu/drm/ttm/ttm_tt.c +3 -0
@@ -44,6 +44,9 @@#include <drm/ttm/ttm_bo_driver.h> #include <drm/ttm/ttm_placement.h> #include <drm/ttm/ttm_page_alloc.h> +#ifdef CONFIG_X86 +#include <asm/set_memory.h> +#endif /** * Allocates storage for pointers to the pages that back the ttm.
Signature · 1 line
2.7.4
PATCH v3 8/16 intel_th: Use set_memory.h header
In reply to Laura Abbottset_memory_* functions have moved to set_memory.h. Switch to this explicitly.
---
v3: Add #ifdef CONFIG_X86
--- drivers/hwtracing/intel_th/msu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/hwtracing/intel_th/msu.c +3 -1
@@ -27,7 +27,9 @@#include <linux/io.h> #include <linux/dma-mapping.h> -#include <asm/cacheflush.h> +#ifdef CONFIG_X86 +#include <asm/set_memory.h> +#endif #include "intel_th.h" #include "msu.h"
Signature · 1 line
2.7.4
PATCH v3 9/16 watchdog: hpwdt: Use set_memory.h header
In reply to Laura Abbottset_memory_* functions have moved to set_memory.h. Switch to this explicitly.
---
v3: No changes
--- drivers/watchdog/hpwdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/hpwdt.c +1 -1
@@ -34,7 +34,7 @@#include <linux/nmi.h> #include <linux/kdebug.h> #include <linux/notifier.h> -#include <asm/cacheflush.h> +#include <asm/set_memory.h> #endif /* CONFIG_HPWDT_NMI_DECODING */ #include <asm/nmi.h> #include <asm/frame.h>
Signature · 1 line
2.7.4
PATCH v3 10/16 bpf: Use set_memory.h header
In reply to Laura Abbottset_memory_* functions have moved to set_memory.h. Switch to this explicitly.
---
v3: #ifdef guard
--- include/linux/filter.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
include/linux/filter.h +3 -1
@@ -18,7 +18,9 @@#include <net/sch_generic.h> -#include <asm/cacheflush.h> +#ifdef CONFIG_ARCH_HAS_SET_MEMORY +#include <asm/set_memory.h> +#endif #include <uapi/linux/filter.h> #include <uapi/linux/bpf.h>
Signature · 1 line
2.7.4
PATCH v3 11/16 module: Use set_memory.h header
In reply to Laura Abbottset_memory_* functions have moved to set_memory.h. Switch to this explicitly.
---
v3: #ifdef protection
--- kernel/module.c | 3 +++ 1 file changed, 3 insertions(+)
kernel/module.c +3 -0
@@ -49,6 +49,9 @@#include <linux/rculist.h> #include <linux/uaccess.h> #include <asm/cacheflush.h> +#ifdef CONFIG_STRICT_MODULE_RWX +#include <asm/set_memory.h> +#endif #include <asm/mmu_context.h> #include <linux/license.h> #include <asm/sections.h>
Signature · 1 line
2.7.4
PATCH v3 12/16 PM / hibernate: Use set_memory.h header
In reply to Laura Abbottset_memory_* functions have moved to set_memory.h. Switch to this explicitly.
---
v3: #ifdef protection
--- kernel/power/snapshot.c | 3 +++ 1 file changed, 3 insertions(+)
kernel/power/snapshot.c +3 -0
@@ -36,6 +36,9 @@#include <asm/pgtable.h> #include <asm/tlbflush.h> #include <asm/io.h> +#ifdef CONFIG_STRICT_KERNEL_RWX +#include <asm/set_memory.h> +#endif #include "power.h"
Signature · 1 line
2.7.4
PATCH v3 13/16 ALSA: Use set_memory.h header
In reply to Laura Abbottset_memory_* functions have moved to set_memory.h. Switch to this explicitly.
---
v3: Add a few other files caught by 0day bot
--- sound/pci/hda/hda_intel.c | 2 +- sound/pci/intel8x0.c | 4 +++- sound/x86/intel_hdmi_audio.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-)
sound/pci/hda/hda_intel.c +1 -1
@@ -53,7 +53,7 @@#ifdef CONFIG_X86 /* for snoop control */ #include <asm/pgtable.h> -#include <asm/cacheflush.h> +#include <asm/set_memory.h> #include <asm/cpufeature.h> #endif #include <sound/core.h>
sound/pci/intel8x0.c +3 -1
@@ -40,7 +40,9 @@#include <sound/initval.h> /* for 440MX workaround */ #include <asm/pgtable.h> -#include <asm/cacheflush.h> +#ifdef CONFIG_X86 +#include <asm/set_memory.h> +#endif MODULE_AUTHOR ("Jaroslav Kysela <[email protected]>" );MODULE_DESCRIPTION ("Intel 82801AA,82901AB,i810,i820,i830,i840,i845,MX440; SiS 7012; Ali 5455" );
sound/x86/intel_hdmi_audio.c +1 -1
@@ -30,7 +30,7 @@#include <linux/pm_runtime.h> #include <linux/dma-mapping.h> #include <linux/delay.h> -#include <asm/cacheflush.h> +#include <asm/set_memory.h> #include <sound/core.h> #include <sound/asoundef.h> #include <sound/pcm.h>
Signature · 1 line
2.7.4
Re: [PATCHv3 13/16] ALSA: Use set_memory.h header
Quoted 7 lines · Laura Abbott
set_memory_* functions have moved to
set_memory.h. Switch to this explicitly.Signed-off-by Laura Abbott <[email protected]>---
v3: Add a few other files caught by 0day bot
I hoped we could get rid of the ifdef, but other than that, feel free to take my ack for the sound part:
thanks,
Takashi
Quoted 51 lines
--- sound/pci/hda/hda_intel.c | 2 +- sound/pci/intel8x0.c | 4 +++- sound/x86/intel_hdmi_audio.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-)sound/pci/hda/hda_intel.c +1
-1@@ -53,7 +53,7 @@#ifdef CONFIG_X86 /* for snoop control */ #include <asm/pgtable.h> -#include <asm/cacheflush.h> +#include <asm/set_memory.h> #include <asm/cpufeature.h> #endif #include <sound/core.h> sound/pci/intel8x0.c +3
-1@@ -40,7 +40,9 @@#include <sound/initval.h> /* for 440MX workaround */ #include <asm/pgtable.h> -#include <asm/cacheflush.h> +#ifdef CONFIG_X86 +#include <asm/set_memory.h> +#endif MODULE_AUTHOR ("Jaroslav Kysela <[email protected]>" );MODULE_DESCRIPTION ("Intel 82801AA,82901AB,i810,i820,i830,i840,i845,MX440; SiS 7012; Ali 5455" );sound/x86/intel_hdmi_audio.c +1
-1@@ -30,7 +30,7 @@#include <linux/pm_runtime.h> #include <linux/dma-mapping.h> #include <linux/delay.h> -#include <asm/cacheflush.h> +#include <asm/set_memory.h> #include <sound/core.h> #include <sound/asoundef.h> #include <sound/pcm.h> Signature · 1 line
2.7.4
PATCH v3 14/16 misc: sram: Use set_memory.h header
In reply to Laura Abbottset_memory_* functions have moved to set_memory.h. Switch to this explicitly.
---
V3: New file which was not caught in the first pass.
--- drivers/misc/sram-exec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/misc/sram-exec.c +2 -1
@@ -16,9 +16,10 @@#include <linux/device.h> #include <linux/genalloc.h> +#include <linux/mm.h> #include <linux/sram.h> -#include <asm/cacheflush.h> +#include <asm/set_memory.h> #include "sram.h"
Signature · 1 line
2.7.4
PATCH v3 15/16 video: vermilion: Use set_memory.h header
In reply to Laura Abbottset_memory_* functions have moved to set_memory.h. Switch to this explicitly.
---
v3: New files not caught in the first pass
--- drivers/video/fbdev/vermilion/vermilion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/vermilion/vermilion.c +1 -1
@@ -37,7 +37,7 @@#include <linux/mm.h> #include <linux/fb.h> #include <linux/pci.h> -#include <asm/cacheflush.h> +#include <asm/set_memory.h> #include <asm/tlbflush.h> #include <linux/mmzone.h>
Signature · 1 line
2.7.4
Re: [PATCHv3 15/16] video: vermilion: Use set_memory.h header
Quoted 5 lines · Laura Abbott
set_memory_* functions have moved to
set_memory.h. Switch to this explicitly.Signed-off-by Laura Abbott <[email protected]>
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
PATCH v3 16/16 treewide: Decouple cacheflush.h and set_memory.h
In reply to Laura AbbottNow that all call sites, completely decouple cacheflush.h and set_memory.h
---
v3: No changes
--- arch/arm/include/asm/cacheflush.h | 1 - arch/arm64/include/asm/cacheflush.h | 1 - arch/s390/include/asm/Kbuild | 1 + arch/s390/include/asm/cacheflush.h | 8 -------- arch/x86/include/asm/cacheflush.h | 1 - 5 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 arch/s390/include/asm/cacheflush.h
arch/arm/include/asm/cacheflush.h +0 -1
@@ -16,7 +16,6 @@#include <asm/shmparam.h> #include <asm/cachetype.h> #include <asm/outercache.h> -#include <asm/set_memory.h> #define CACHE_COLOUR (vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT)
arch/arm64/include/asm/cacheflush.h +0 -1
@@ -20,7 +20,6 @@#define __ASM_CACHEFLUSH_H#include <linux/mm.h> -#include <asm/set_memory.h> /* * This flag is used to indicate that the page pointed to by a pte is clean
arch/s390/include/asm/Kbuild +1 -0
@@ -1,4 +1,5 @@ generic-y += asm-offsets.h +generic-y += cacheflush.h generic-y += clkdev.h generic-y += dma-contiguous.h generic-y += export.h
arch/s390/include/asm/cacheflush.h deleted +0 -8
@@ -1,8 +0,0 @@ -#ifndef _S390_CACHEFLUSH_H -#define _S390_CACHEFLUSH_H - -/* Caches aren't brain-dead on the s390. */ -#include <asm-generic/cacheflush.h> -#include <asm/set_memory.h> - -#endif /* _S390_CACHEFLUSH_H */
arch/x86/include/asm/cacheflush.h +0 -1
@@ -4,7 +4,6 @@/* Caches aren't brain-dead on the intel. */ #include <asm-generic/cacheflush.h> #include <asm/special_insns.h> -#include <asm/set_memory.h> void clflush_cache_range (void *addr,unsigned int size);
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html