diff options
author | Mike Rapoport <rppt@kernel.org> | 2023-02-12 10:46:10 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2023-02-13 22:13:12 +0100 |
commit | 0e4f2c4567953a230b420f2c4460c3368d6509db (patch) | |
tree | 619d28cce3da8a56aa786bcd9f39d0e159439ef3 /drivers/char/agp/agp.h | |
parent | 6246541522845a443b7ae4a8f0e16facc5a91198 (diff) |
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) <rppt@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/char/agp/agp.h')
-rw-r--r-- | drivers/char/agp/agp.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h index bb09d64cd51e..8771dcc9b8e2 100644 --- a/drivers/char/agp/agp.h +++ b/drivers/char/agp/agp.h @@ -236,6 +236,12 @@ void agp3_generic_tlbflush(struct agp_memory *mem); int agp3_generic_configure(void); void agp3_generic_cleanup(void); +/* 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)) + /* aperture sizes have been standardised since v3 */ #define AGP_GENERIC_SIZES_ENTRIES 11 extern const struct aper_size_info_16 agp3_generic_sizes[]; |