Skip to content
Snippets Groups Projects
Select Git revision
  • 60e50f34b13e9e40763be12aa55f2144d8da514c
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

sun3_pgalloc.h

Blame
    • Mike Rapoport's avatar
      60e50f34
      m68k: mm: use pgtable-nopXd instead of 4level-fixup · 60e50f34
      Mike Rapoport authored
      m68k has two or three levels of page tables and can use appropriate
      pgtable-nopXd and folding of the upper layers.
      
      Replace usage of include/asm-generic/4level-fixup.h and explicit
      definitions of __PAGETABLE_PxD_FOLDED in m68k with
      include/asm-generic/pgtable-nopmd.h for two-level configurations and
      with include/asm-generic/pgtable-nopud.h for three-lelve configurations
      and adjust page table manipulation macros and functions accordingly.
      
      [akpm@linux-foundation.org: fix merge glitch]
      [geert@linux-m68k.org: more merge glitch fixes]
      [akpm@linux-foundation.org: s/bad_pgd/bad_pud/, per Mike]
      Link: http://lkml.kernel.org/r/1572938135-31886-6-git-send-email-rppt@kernel.org
      
      
      Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Acked-by: default avatarGreg Ungerer <gerg@linux-m68k.org>
      Cc: Anatoly Pugachev <matorola@gmail.com>
      Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Sam Creasey <sammy@sammy.net>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      60e50f34
      History
      m68k: mm: use pgtable-nopXd instead of 4level-fixup
      Mike Rapoport authored
      m68k has two or three levels of page tables and can use appropriate
      pgtable-nopXd and folding of the upper layers.
      
      Replace usage of include/asm-generic/4level-fixup.h and explicit
      definitions of __PAGETABLE_PxD_FOLDED in m68k with
      include/asm-generic/pgtable-nopmd.h for two-level configurations and
      with include/asm-generic/pgtable-nopud.h for three-lelve configurations
      and adjust page table manipulation macros and functions accordingly.
      
      [akpm@linux-foundation.org: fix merge glitch]
      [geert@linux-m68k.org: more merge glitch fixes]
      [akpm@linux-foundation.org: s/bad_pgd/bad_pud/, per Mike]
      Link: http://lkml.kernel.org/r/1572938135-31886-6-git-send-email-rppt@kernel.org
      
      
      Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Acked-by: default avatarGreg Ungerer <gerg@linux-m68k.org>
      Cc: Anatoly Pugachev <matorola@gmail.com>
      Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Sam Creasey <sammy@sammy.net>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    sun3_pgalloc.h 1.41 KiB
    /* SPDX-License-Identifier: GPL-2.0 */
    /* sun3_pgalloc.h --
     * reorganization around 2.3.39, routines moved from sun3_pgtable.h
     *
     *
     * 02/27/2002 -- Modified to support "highpte" implementation in 2.5.5 (Sam)
     *
     * moved 1/26/2000 Sam Creasey
     */
    
    #ifndef _SUN3_PGALLOC_H
    #define _SUN3_PGALLOC_H
    
    #include <asm/tlb.h>
    
    #include <asm-generic/pgalloc.h>	/* for pte_{alloc,free}_one */
    
    extern const char bad_pmd_string[];
    
    #define __pte_free_tlb(tlb,pte,addr)			\
    do {							\
    	pgtable_pte_page_dtor(pte);			\
    	tlb_remove_page((tlb), pte);			\
    } while (0)
    
    static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte)
    {
    	pmd_val(*pmd) = __pa((unsigned long)pte);
    }
    
    static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t page)
    {
    	pmd_val(*pmd) = __pa((unsigned long)page_address(page));
    }
    #define pmd_pgtable(pmd) pmd_page(pmd)
    
    /*
     * allocating and freeing a pmd is trivial: the 1-entry pmd is
     * inside the pgd, so has no extra memory associated with it.
     */
    #define pmd_free(mm, x)			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)
    {
         pgd_t *new_pgd;
    
         new_pgd = (pgd_t *)get_zeroed_page(GFP_KERNEL);
         memcpy(new_pgd, swapper_pg_dir, PAGE_SIZE);
         memset(new_pgd, 0, (PAGE_OFFSET >> PGDIR_SHIFT));
         return new_pgd;
    }
    
    #endif /* SUN3_PGALLOC_H */