2 * arch/xtensa/mm/fault.c
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
10 * Chris Zankel <chris@zankel.net>
13 #if (DCACHE_SIZE > PAGE_SIZE)
15 pte_t
* pte_alloc_one_kernel(struct mm_struct
*mm
, unsigned long address
)
18 int color
= ADDR_COLOR(address
);
21 p
= (pte_t
*) __get_free_pages(GFP_KERNEL
|__GFP_REPEAT
, COLOR_ORDER
);
26 for (i
= 0; i
< COLOR_SIZE
; i
++, p
++) {
27 page
= virt_to_page(pte
);
29 set_page_count(page
, 1);
30 ClearPageCompound(page
);
32 if (ADDR_COLOR(p
) == color
)
50 struct page
* pte_alloc_one(struct mm_struct
*mm
, unsigned long address
)
53 int color
= ADDR_COLOR(address
);
55 p
= alloc_pages(GFP_KERNEL
| __GFP_REPEAT
, PTE_ORDER
);
58 for (i
= 0; i
< PAGE_ORDER
; i
++) {
62 if (PADDR_COLOR(page_address(pg
)) == color
)