mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
mm: move the powerpc hugepd code to mm/gup.c
While only powerpc supports the hugepd case, the code is pretty generic and I'd like to keep all GUP internals in one place. Link: http://lkml.kernel.org/r/20190625143715.1689-15-hch@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Andrey Konovalov <andreyknvl@google.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: David Miller <davem@davemloft.net> Cc: James Hogan <jhogan@kernel.org> Cc: Jason Gunthorpe <jgg@mellanox.com> Cc: Khalid Aziz <khalid.aziz@oracle.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Paul Burton <paul.burton@mips.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Rich Felker <dalias@libc.org> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
817be129e6
commit
cbd34da7dc
@@ -16,29 +16,11 @@ struct user_struct;
|
||||
struct mmu_gather;
|
||||
|
||||
#ifndef is_hugepd
|
||||
/*
|
||||
* Some architectures requires a hugepage directory format that is
|
||||
* required to support multiple hugepage sizes. For example
|
||||
* a4fe3ce76 "powerpc/mm: Allow more flexible layouts for hugepage pagetables"
|
||||
* introduced the same on powerpc. This allows for a more flexible hugepage
|
||||
* pagetable layout.
|
||||
*/
|
||||
typedef struct { unsigned long pd; } hugepd_t;
|
||||
#define is_hugepd(hugepd) (0)
|
||||
#define __hugepd(x) ((hugepd_t) { (x) })
|
||||
static inline int gup_huge_pd(hugepd_t hugepd, unsigned long addr,
|
||||
unsigned pdshift, unsigned long end,
|
||||
int write, struct page **pages, int *nr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
extern int gup_huge_pd(hugepd_t hugepd, unsigned long addr,
|
||||
unsigned pdshift, unsigned long end,
|
||||
int write, struct page **pages, int *nr);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CONFIG_HUGETLB_PAGE
|
||||
|
||||
#include <linux/mempolicy.h>
|
||||
|
Reference in New Issue
Block a user