From 0e4f2c4567953a230b420f2c4460c3368d6509db Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Sun, 12 Feb 2023 10:46:10 +0200 Subject: char/agp: consolidate {alloc,free}_gatt_pages() There is a copy of alloc_gatt_pages() and free_gatt_pages in several architectures in arch/$ARCH/include/asm/agp.h. All the copies do exactly the same: alias alloc_gatt_pages() to __get_free_pages(GFP_KERNEL) and alias free_gatt_pages() to free_pages(). Define alloc_gatt_pages() and free_gatt_pages() in drivers/char/agp/agp.h and drop per-architecture definitions. Signed-off-by: Mike Rapoport (IBM) Signed-off-by: Arnd Bergmann --- arch/parisc/include/asm/agp.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'arch/parisc') diff --git a/arch/parisc/include/asm/agp.h b/arch/parisc/include/asm/agp.h index 14ae54cfd368..d193a48490e2 100644 --- a/arch/parisc/include/asm/agp.h +++ b/arch/parisc/include/asm/agp.h @@ -12,10 +12,4 @@ #define unmap_page_from_agp(page) do { } while (0) #define flush_agp_cache() mb() -/* GATT allocation. Returns/accepts GATT kernel virtual address. */ -#define alloc_gatt_pages(order) \ - ((char *)__get_free_pages(GFP_KERNEL, (order))) -#define free_gatt_pages(table, order) \ - free_pages((unsigned long)(table), (order)) - #endif /* _ASM_PARISC_AGP_H */ -- cgit v1.2.1 From a13408c205260716e925a734ef399899d69182ba Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Sun, 12 Feb 2023 10:46:11 +0200 Subject: 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) Signed-off-by: Arnd Bergmann --- arch/parisc/include/asm/Kbuild | 1 + arch/parisc/include/asm/agp.h | 15 --------------- 2 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 arch/parisc/include/asm/agp.h (limited to 'arch/parisc') diff --git a/arch/parisc/include/asm/Kbuild b/arch/parisc/include/asm/Kbuild index e6e7f74c8ac9..4fb596d94c89 100644 --- a/arch/parisc/include/asm/Kbuild +++ b/arch/parisc/include/asm/Kbuild @@ -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 index d193a48490e2..000000000000 --- a/arch/parisc/include/asm/agp.h +++ /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 - * - */ - -#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 */ -- cgit v1.2.1