forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'parisc-4.4-2' of git://git.kernel.org/pub/scm/linux/ker…
…nel/git/deller/parisc-linux Pull parisc update from Helge Deller: "This patchset adds Huge Page and HUGETLBFS support for parisc" Honestly, the hugepage support should have gone through in the merge window, and is not really an rc-time fix. But it only touches arch/parisc, and I cannot find it in myself to care. If one of the three parisc users notices a breakage, I will point at Helge and make rude farting noises. * 'parisc-4.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Map kernel text and data on huge pages parisc: Add Huge Page and HUGETLBFS support parisc: Use long branch to do_syscall_trace_exit parisc: Increase initial kernel mapping to 32MB on 64bit kernel parisc: Initialize the fault vector earlier in the boot process. parisc: Add defines for Huge page support parisc: Drop unused MADV_xxxK_PAGES flags from asm/mman.h parisc: Drop definition of start_thread_som for HP-UX SOM binaries parisc: Fix wrong comment regarding first pmd entry flags
- Loading branch information
Showing
17 changed files
with
382 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#ifndef _ASM_PARISC64_HUGETLB_H | ||
#define _ASM_PARISC64_HUGETLB_H | ||
|
||
#include <asm/page.h> | ||
#include <asm-generic/hugetlb.h> | ||
|
||
|
||
void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, | ||
pte_t *ptep, pte_t pte); | ||
|
||
pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | ||
pte_t *ptep); | ||
|
||
static inline int is_hugepage_only_range(struct mm_struct *mm, | ||
unsigned long addr, | ||
unsigned long len) { | ||
return 0; | ||
} | ||
|
||
/* | ||
* If the arch doesn't supply something else, assume that hugepage | ||
* size aligned regions are ok without further preparation. | ||
*/ | ||
static inline int prepare_hugepage_range(struct file *file, | ||
unsigned long addr, unsigned long len) | ||
{ | ||
if (len & ~HPAGE_MASK) | ||
return -EINVAL; | ||
if (addr & ~HPAGE_MASK) | ||
return -EINVAL; | ||
return 0; | ||
} | ||
|
||
static inline void hugetlb_free_pgd_range(struct mmu_gather *tlb, | ||
unsigned long addr, unsigned long end, | ||
unsigned long floor, | ||
unsigned long ceiling) | ||
{ | ||
free_pgd_range(tlb, addr, end, floor, ceiling); | ||
} | ||
|
||
static inline void huge_ptep_clear_flush(struct vm_area_struct *vma, | ||
unsigned long addr, pte_t *ptep) | ||
{ | ||
} | ||
|
||
static inline int huge_pte_none(pte_t pte) | ||
{ | ||
return pte_none(pte); | ||
} | ||
|
||
static inline pte_t huge_pte_wrprotect(pte_t pte) | ||
{ | ||
return pte_wrprotect(pte); | ||
} | ||
|
||
static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, | ||
unsigned long addr, pte_t *ptep) | ||
{ | ||
pte_t old_pte = *ptep; | ||
set_huge_pte_at(mm, addr, ptep, pte_wrprotect(old_pte)); | ||
} | ||
|
||
static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma, | ||
unsigned long addr, pte_t *ptep, | ||
pte_t pte, int dirty) | ||
{ | ||
int changed = !pte_same(*ptep, pte); | ||
if (changed) { | ||
set_huge_pte_at(vma->vm_mm, addr, ptep, pte); | ||
flush_tlb_page(vma, addr); | ||
} | ||
return changed; | ||
} | ||
|
||
static inline pte_t huge_ptep_get(pte_t *ptep) | ||
{ | ||
return *ptep; | ||
} | ||
|
||
static inline void arch_clear_hugepage_flags(struct page *page) | ||
{ | ||
} | ||
|
||
#endif /* _ASM_PARISC64_HUGETLB_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.