History

mm: add new arch_make_huge_pte() method for tile support

The tile support for multiple-size huge pages requires tagging the hugetlb PTE with a "super" bit for PTEs that are multiples of the basic size of a pagetable span. To set that bit properly we need to tweak the PTe in make_huge_pte() based on the vma. This change provides the API for a subsequent tile-specific change to use.

Chris Metcalf committed 14 years ago

Commit d9ed9fa1 parent fc0c49f2 files · +9 −0Browse files

Unified · Split

2 files
  1. include/linux/hugetlb.h +8 −0
  2. mm/hugetlb.c +1 −0
include/linux/hugetlb.h+8−0
@@ -284,6 +284,14 @@ static inline unsigned int blocks_per_huge_page(struct hstate *h) · 283 unmodified lines
284284
285285 #include <asm/hugetlb.h>
286286
287+#ifndef arch_make_huge_pte
288+static inline pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma,
289+ struct page *page, int writable)
290+{
291+ return entry;
292+}
293+#endif
294+
287295 static inline struct hstate *page_hstate(struct page *page)
288296 {
289297 return size_to_hstate(PAGE_SIZE << compound_order(page));
mm/hugetlb.c+1−0
@@ -2213,6 +2213,7 @@ static pte_t make_huge_pte(struct vm_area_struct *vma, struct page *page, · 2212 unmodified lines
22132213 }
22142214 entry = pte_mkyoung(entry);
22152215 entry = pte_mkhuge(entry);
2216+ entry = arch_make_huge_pte(entry, vma, page, writable);
22162217
22172218 return entry;
22182219 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t