mmu.c (a02633e9b13dcb9b1a656b08f81bc8ba2d4d2294) | mmu.c (15122ee2c515a253b0c66a3e618bc7ebe35105eb) |
---|---|
1/* 2 * Based on arch/arm/mm/mmu.c 3 * 4 * Copyright (C) 1995-2005 Russell King 5 * Copyright (C) 2012 ARM Ltd. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 919 unchanged lines hidden (view full) --- 928{ 929 return 1; 930} 931 932int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot) 933{ 934 pgprot_t sect_prot = __pgprot(PUD_TYPE_SECT | 935 pgprot_val(mk_sect_prot(prot))); | 1/* 2 * Based on arch/arm/mm/mmu.c 3 * 4 * Copyright (C) 1995-2005 Russell King 5 * Copyright (C) 2012 ARM Ltd. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 919 unchanged lines hidden (view full) --- 928{ 929 return 1; 930} 931 932int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot) 933{ 934 pgprot_t sect_prot = __pgprot(PUD_TYPE_SECT | 935 pgprot_val(mk_sect_prot(prot))); |
936 937 /* ioremap_page_range doesn't honour BBM */ 938 if (pud_present(READ_ONCE(*pudp))) 939 return 0; 940 |
|
936 BUG_ON(phys & ~PUD_MASK); 937 set_pud(pudp, pfn_pud(__phys_to_pfn(phys), sect_prot)); 938 return 1; 939} 940 941int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot) 942{ 943 pgprot_t sect_prot = __pgprot(PMD_TYPE_SECT | 944 pgprot_val(mk_sect_prot(prot))); | 941 BUG_ON(phys & ~PUD_MASK); 942 set_pud(pudp, pfn_pud(__phys_to_pfn(phys), sect_prot)); 943 return 1; 944} 945 946int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot) 947{ 948 pgprot_t sect_prot = __pgprot(PMD_TYPE_SECT | 949 pgprot_val(mk_sect_prot(prot))); |
950 951 /* ioremap_page_range doesn't honour BBM */ 952 if (pmd_present(READ_ONCE(*pmdp))) 953 return 0; 954 |
|
945 BUG_ON(phys & ~PMD_MASK); 946 set_pmd(pmdp, pfn_pmd(__phys_to_pfn(phys), sect_prot)); 947 return 1; 948} 949 950int pud_clear_huge(pud_t *pudp) 951{ 952 if (!pud_sect(READ_ONCE(*pudp))) --- 12 unchanged lines hidden --- | 955 BUG_ON(phys & ~PMD_MASK); 956 set_pmd(pmdp, pfn_pmd(__phys_to_pfn(phys), sect_prot)); 957 return 1; 958} 959 960int pud_clear_huge(pud_t *pudp) 961{ 962 if (!pud_sect(READ_ONCE(*pudp))) --- 12 unchanged lines hidden --- |