char/agp: introduce asm-generic/agp.h
authorMike Rapoport <rppt@kernel.org>
Sun, 12 Feb 2023 08:46:11 +0000 (10:46 +0200)
committerArnd Bergmann <arnd@arndb.de>
Mon, 13 Feb 2023 21:13:29 +0000 (22:13 +0100)
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>
arch/alpha/include/asm/Kbuild
arch/alpha/include/asm/agp.h [deleted file]
arch/ia64/include/asm/Kbuild
arch/ia64/include/asm/agp.h [deleted file]
arch/parisc/include/asm/Kbuild
arch/parisc/include/asm/agp.h [deleted file]
arch/powerpc/include/asm/Kbuild
arch/powerpc/include/asm/agp.h [deleted file]
arch/sparc/include/asm/Kbuild
arch/sparc/include/asm/agp.h [deleted file]
include/asm-generic/agp.h [new file with mode: 0644]

index 42911c8340c7869bdb47b31ea159a4b16f805409..54f5126628c67a6bea8d2536efe6f5410ba8fb7d 100644 (file)
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 
 generated-y += syscall_table.h
+generic-y += agp.h
 generic-y += export.h
 generic-y += kvm_para.h
 generic-y += mcs_spinlock.h
diff --git a/arch/alpha/include/asm/agp.h b/arch/alpha/include/asm/agp.h
deleted file mode 100644 (file)
index 4197b3b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef AGP_H
-#define AGP_H 1
-
-#include <asm/io.h>
-
-/* dummy for now */
-
-#define map_page_into_agp(page)                do { } while (0)
-#define unmap_page_from_agp(page)      do { } while (0)
-#define flush_agp_cache() mb()
-
-#endif
index f994c1daf9d424f1de9bd7ecdce18d1c982a0f08..aefae2efde9f323d5223fad507a996bc5abcdeb5 100644 (file)
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 generated-y += syscall_table.h
+generic-y += agp.h
 generic-y += kvm_para.h
 generic-y += mcs_spinlock.h
 generic-y += vtime.h
diff --git a/arch/ia64/include/asm/agp.h b/arch/ia64/include/asm/agp.h
deleted file mode 100644 (file)
index f42c7dc..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_IA64_AGP_H
-#define _ASM_IA64_AGP_H
-
-/*
- * IA-64 specific AGP definitions.
- *
- * Copyright (C) 2002-2003 Hewlett-Packard Co
- *     David Mosberger-Tang <davidm@hpl.hp.com>
- */
-
-/*
- * To avoid memory-attribute aliasing issues, we require that the AGPGART engine operate
- * in coherent mode, which lets us map the AGP memory as normal (write-back) memory
- * (unlike x86, where it gets mapped "write-coalescing").
- */
-#define map_page_into_agp(page)                do { } while (0)
-#define unmap_page_from_agp(page)      do { } while (0)
-#define flush_agp_cache()              mb()
-
-#endif /* _ASM_IA64_AGP_H */
index e6e7f74c8ac9c30766821708587586468b56fa40..4fb596d94c8932dd1e12a765a21af5b5099fbafd 100644 (file)
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 generated-y += syscall_table_32.h
 generated-y += syscall_table_64.h
+generic-y += agp.h
 generic-y += kvm_para.h
 generic-y += mcs_spinlock.h
 generic-y += user.h
diff --git a/arch/parisc/include/asm/agp.h b/arch/parisc/include/asm/agp.h
deleted file mode 100644 (file)
index d193a48..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_PARISC_AGP_H
-#define _ASM_PARISC_AGP_H
-
-/*
- * PARISC specific AGP definitions.
- * Copyright (c) 2006 Kyle McMartin <kyle@parisc-linux.org>
- *
- */
-
-#define map_page_into_agp(page)                do { } while (0)
-#define unmap_page_from_agp(page)      do { } while (0)
-#define flush_agp_cache()              mb()
-
-#endif /* _ASM_PARISC_AGP_H */
index bcf95ce0964f982da4c02bc77e5d0707e2b0609d..419319c4963ccaec814cb9a31535630da88e4921 100644 (file)
@@ -2,6 +2,7 @@
 generated-y += syscall_table_32.h
 generated-y += syscall_table_64.h
 generated-y += syscall_table_spu.h
+generic-y += agp.h
 generic-y += export.h
 generic-y += kvm_types.h
 generic-y += mcs_spinlock.h
diff --git a/arch/powerpc/include/asm/agp.h b/arch/powerpc/include/asm/agp.h
deleted file mode 100644 (file)
index e86f2ce..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_POWERPC_AGP_H
-#define _ASM_POWERPC_AGP_H
-#ifdef __KERNEL__
-
-#include <asm/io.h>
-
-#define map_page_into_agp(page) do {} while (0)
-#define unmap_page_from_agp(page) do {} while (0)
-#define flush_agp_cache() mb()
-
-#endif /* __KERNEL__ */
-#endif /* _ASM_POWERPC_AGP_H */
index 0b9d98ced34aff39585c6ec446dcdc6862d9f96f..595ca0be286b5abb1a998c255a31460ba5d61d21 100644 (file)
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 generated-y += syscall_table_32.h
 generated-y += syscall_table_64.h
+generic-y += agp.h
 generic-y += export.h
 generic-y += kvm_para.h
 generic-y += mcs_spinlock.h
diff --git a/arch/sparc/include/asm/agp.h b/arch/sparc/include/asm/agp.h
deleted file mode 100644 (file)
index 5186924..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef AGP_H
-#define AGP_H 1
-
-/* dummy for now */
-
-#define map_page_into_agp(page)                do { } while (0)
-#define unmap_page_from_agp(page)      do { } while (0)
-#define flush_agp_cache()              mb()
-
-#endif
diff --git a/include/asm-generic/agp.h b/include/asm-generic/agp.h
new file mode 100644 (file)
index 0000000..10db92e
--- /dev/null
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_GENERIC_AGP_H
+#define _ASM_GENERIC_AGP_H
+
+#include <asm/io.h>
+
+#define map_page_into_agp(page) do {} while (0)
+#define unmap_page_from_agp(page) do {} while (0)
+#define flush_agp_cache() mb()
+
+#endif /* _ASM_GENERIC_AGP_H */