hugetlbpage.c (db8c246937713e60b7628661ccc187eeb81f2bae) hugetlbpage.c (106c992a5ebef28193cf5958e49ceff5e4aebb04)
1/*
2 * IBM System z Huge TLB Page Support for Kernel.
3 *
4 * Copyright IBM Corp. 2007
5 * Author(s): Gerald Schaefer <gerald.schaefer@de.ibm.com>
6 */
7
8#include <linux/mm.h>

--- 25 unchanged lines hidden (view full) ---

34
35 if (MACHINE_HAS_HPAGE)
36 return 0;
37
38 ptep = (pte_t *) pte_alloc_one(&init_mm, addr);
39 if (!ptep)
40 return -ENOMEM;
41
1/*
2 * IBM System z Huge TLB Page Support for Kernel.
3 *
4 * Copyright IBM Corp. 2007
5 * Author(s): Gerald Schaefer <gerald.schaefer@de.ibm.com>
6 */
7
8#include <linux/mm.h>

--- 25 unchanged lines hidden (view full) ---

34
35 if (MACHINE_HAS_HPAGE)
36 return 0;
37
38 ptep = (pte_t *) pte_alloc_one(&init_mm, addr);
39 if (!ptep)
40 return -ENOMEM;
41
42 pte = mk_pte(page, PAGE_RW);
42 pte_val(pte) = addr;
43 for (i = 0; i < PTRS_PER_PTE; i++) {
44 set_pte_at(&init_mm, addr + i * PAGE_SIZE, ptep + i, pte);
45 pte_val(pte) += PAGE_SIZE;
46 }
47 page[1].index = (unsigned long) ptep;
48 return 0;
49}
50

--- 82 unchanged lines hidden ---
43 for (i = 0; i < PTRS_PER_PTE; i++) {
44 set_pte_at(&init_mm, addr + i * PAGE_SIZE, ptep + i, pte);
45 pte_val(pte) += PAGE_SIZE;
46 }
47 page[1].index = (unsigned long) ptep;
48 return 0;
49}
50

--- 82 unchanged lines hidden ---