From 6778948f9de86c3cfaf36725a7c87dcff9ba247f Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Mon, 11 Dec 2023 08:20:59 +0000
Subject: [PATCH] kernel_5.10 no rt
---
kernel/arch/m68k/include/asm/sun3_pgalloc.h | 55 +++----------------------------------------------------
1 files changed, 3 insertions(+), 52 deletions(-)
diff --git a/kernel/arch/m68k/include/asm/sun3_pgalloc.h b/kernel/arch/m68k/include/asm/sun3_pgalloc.h
index 11485d3..000f648 100644
--- a/kernel/arch/m68k/include/asm/sun3_pgalloc.h
+++ b/kernel/arch/m68k/include/asm/sun3_pgalloc.h
@@ -13,56 +13,15 @@
#include <asm/tlb.h>
+#include <asm-generic/pgalloc.h>
+
extern const char bad_pmd_string[];
-
-#define pmd_alloc_one(mm,address) ({ BUG(); ((pmd_t *)2); })
-
-
-static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
-{
- free_page((unsigned long) pte);
-}
-
-static inline void pte_free(struct mm_struct *mm, pgtable_t page)
-{
- pgtable_page_dtor(page);
- __free_page(page);
-}
#define __pte_free_tlb(tlb,pte,addr) \
do { \
- pgtable_page_dtor(pte); \
+ pgtable_pte_page_dtor(pte); \
tlb_remove_page((tlb), pte); \
} while (0)
-
-static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
- unsigned long address)
-{
- unsigned long page = __get_free_page(GFP_KERNEL);
-
- if (!page)
- return NULL;
-
- memset((void *)page, 0, PAGE_SIZE);
- return (pte_t *) (page);
-}
-
-static inline pgtable_t pte_alloc_one(struct mm_struct *mm,
- unsigned long address)
-{
- struct page *page = alloc_pages(GFP_KERNEL, 0);
-
- if (page == NULL)
- return NULL;
-
- clear_highpage(page);
- if (!pgtable_page_ctor(page)) {
- __free_page(page);
- return NULL;
- }
- return page;
-
-}
static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte)
{
@@ -80,12 +39,6 @@
* inside the pgd, so has no extra memory associated with it.
*/
#define pmd_free(mm, x) do { } while (0)
-#define __pmd_free_tlb(tlb, x, addr) do { } while (0)
-
-static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
-{
- free_page((unsigned long) pgd);
-}
static inline pgd_t * pgd_alloc(struct mm_struct *mm)
{
@@ -96,7 +49,5 @@
memset(new_pgd, 0, (PAGE_OFFSET >> PGDIR_SHIFT));
return new_pgd;
}
-
-#define pgd_populate(mm, pmd, pte) BUG()
#endif /* SUN3_PGALLOC_H */
--
Gitblit v1.6.2