Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

char/agp: introduce asm-generic/agp.h

There are several architectures that duplicate definitions of
map_page_into_agp(), unmap_page_from_agp() and flush_agp_cache().

Define those in asm-generic/agp.h and use it instead of duplicated
per-architecture headers.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

authored by

Mike Rapoport and committed by
Arnd Bergmann
a13408c2 0e4f2c45

+8 -65
+1
arch/alpha/include/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 3 3 generated-y += syscall_table.h 4 + generic-y += agp.h 4 5 generic-y += export.h 5 6 generic-y += kvm_para.h 6 7 generic-y += mcs_spinlock.h
-13
arch/alpha/include/asm/agp.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef AGP_H 3 - #define AGP_H 1 4 - 5 - #include <asm/io.h> 6 - 7 - /* dummy for now */ 8 - 9 - #define map_page_into_agp(page) do { } while (0) 10 - #define unmap_page_from_agp(page) do { } while (0) 11 - #define flush_agp_cache() mb() 12 - 13 - #endif
+1
arch/ia64/include/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 generated-y += syscall_table.h 3 + generic-y += agp.h 3 4 generic-y += kvm_para.h 4 5 generic-y += mcs_spinlock.h 5 6 generic-y += vtime.h
-21
arch/ia64/include/asm/agp.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_IA64_AGP_H 3 - #define _ASM_IA64_AGP_H 4 - 5 - /* 6 - * IA-64 specific AGP definitions. 7 - * 8 - * Copyright (C) 2002-2003 Hewlett-Packard Co 9 - * David Mosberger-Tang <davidm@hpl.hp.com> 10 - */ 11 - 12 - /* 13 - * To avoid memory-attribute aliasing issues, we require that the AGPGART engine operate 14 - * in coherent mode, which lets us map the AGP memory as normal (write-back) memory 15 - * (unlike x86, where it gets mapped "write-coalescing"). 16 - */ 17 - #define map_page_into_agp(page) do { } while (0) 18 - #define unmap_page_from_agp(page) do { } while (0) 19 - #define flush_agp_cache() mb() 20 - 21 - #endif /* _ASM_IA64_AGP_H */
+1
arch/parisc/include/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 generated-y += syscall_table_32.h 3 3 generated-y += syscall_table_64.h 4 + generic-y += agp.h 4 5 generic-y += kvm_para.h 5 6 generic-y += mcs_spinlock.h 6 7 generic-y += user.h
-15
arch/parisc/include/asm/agp.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_PARISC_AGP_H 3 - #define _ASM_PARISC_AGP_H 4 - 5 - /* 6 - * PARISC specific AGP definitions. 7 - * Copyright (c) 2006 Kyle McMartin <kyle@parisc-linux.org> 8 - * 9 - */ 10 - 11 - #define map_page_into_agp(page) do { } while (0) 12 - #define unmap_page_from_agp(page) do { } while (0) 13 - #define flush_agp_cache() mb() 14 - 15 - #endif /* _ASM_PARISC_AGP_H */
+1
arch/powerpc/include/asm/Kbuild
··· 2 2 generated-y += syscall_table_32.h 3 3 generated-y += syscall_table_64.h 4 4 generated-y += syscall_table_spu.h 5 + generic-y += agp.h 5 6 generic-y += export.h 6 7 generic-y += kvm_types.h 7 8 generic-y += mcs_spinlock.h
+3 -5
arch/powerpc/include/asm/agp.h include/asm-generic/agp.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_POWERPC_AGP_H 3 - #define _ASM_POWERPC_AGP_H 4 - #ifdef __KERNEL__ 2 + #ifndef _ASM_GENERIC_AGP_H 3 + #define _ASM_GENERIC_AGP_H 5 4 6 5 #include <asm/io.h> 7 6 ··· 8 9 #define unmap_page_from_agp(page) do {} while (0) 9 10 #define flush_agp_cache() mb() 10 11 11 - #endif /* __KERNEL__ */ 12 - #endif /* _ASM_POWERPC_AGP_H */ 12 + #endif /* _ASM_GENERIC_AGP_H */
+1
arch/sparc/include/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 generated-y += syscall_table_32.h 3 3 generated-y += syscall_table_64.h 4 + generic-y += agp.h 4 5 generic-y += export.h 5 6 generic-y += kvm_para.h 6 7 generic-y += mcs_spinlock.h
-11
arch/sparc/include/asm/agp.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef AGP_H 3 - #define AGP_H 1 4 - 5 - /* dummy for now */ 6 - 7 - #define map_page_into_agp(page) do { } while (0) 8 - #define unmap_page_from_agp(page) do { } while (0) 9 - #define flush_agp_cache() mb() 10 - 11 - #endif