use 'enum ihk_mc_pt_attribute' instead of 'int'

This commit is contained in:
NAKAMURA Gou
2014-04-08 17:36:03 +09:00
parent 55817e9e83
commit f60b37ea1b
2 changed files with 5 additions and 5 deletions

View File

@ -142,8 +142,8 @@ static inline uintptr_t pte_get_phys(pte_t *ptep)
} }
struct page_table; struct page_table;
void set_pte(pte_t *ppte, unsigned long phys, int attr); void set_pte(pte_t *ppte, unsigned long phys, enum ihk_mc_pt_attribute attr);
pte_t *get_pte(struct page_table *pt, void *virt, int attr); pte_t *get_pte(struct page_table *pt, void *virt, enum ihk_mc_pt_attribute attr);
void *early_alloc_page(void); void *early_alloc_page(void);
void *get_last_early_heap(void); void *get_last_early_heap(void);

View File

@ -266,7 +266,7 @@ static unsigned long attr_to_l1attr(enum ihk_mc_pt_attribute attr)
| ((uint64_t)(l1i) << PTL1_SHIFT) \ | ((uint64_t)(l1i) << PTL1_SHIFT) \
) )
void set_pte(pte_t *ppte, unsigned long phys, int attr) void set_pte(pte_t *ppte, unsigned long phys, enum ihk_mc_pt_attribute attr)
{ {
if (attr & PTATTR_LARGEPAGE) { if (attr & PTATTR_LARGEPAGE) {
*ppte = phys | attr_to_l2attr(attr) | PFL2_SIZE; *ppte = phys | attr_to_l2attr(attr) | PFL2_SIZE;
@ -285,7 +285,7 @@ void set_pte(pte_t *ppte, unsigned long phys, int attr)
* and returns a pointer to the PTE corresponding to the * and returns a pointer to the PTE corresponding to the
* virtual address. * virtual address.
*/ */
pte_t *get_pte(struct page_table *pt, void *virt, int attr, enum ihk_mc_ap_flag ap_flag) pte_t *get_pte(struct page_table *pt, void *virt, enum ihk_mc_pt_attribute attr, enum ihk_mc_ap_flag ap_flag)
{ {
int l4idx, l3idx, l2idx, l1idx; int l4idx, l3idx, l2idx, l1idx;
unsigned long v = (unsigned long)virt; unsigned long v = (unsigned long)virt;
@ -341,7 +341,7 @@ pte_t *get_pte(struct page_table *pt, void *virt, int attr, enum ihk_mc_ap_flag
#endif #endif
static int __set_pt_page(struct page_table *pt, void *virt, unsigned long phys, static int __set_pt_page(struct page_table *pt, void *virt, unsigned long phys,
int attr) enum ihk_mc_pt_attribute attr)
{ {
int l4idx, l3idx, l2idx, l1idx; int l4idx, l3idx, l2idx, l1idx;
unsigned long v = (unsigned long)virt; unsigned long v = (unsigned long)virt;