[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86: use "unsigned int" for cache attribute values
commit 8ac9cc7a72481d8578e36db8f19835109e99817e Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Fri Mar 4 14:09:04 2016 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Mar 4 14:09:04 2016 +0100 x86: use "unsigned int" for cache attribute values ... where suitable. But note that the type of "cacheattr" in get_page_from_l1e() specifically needs to remain "unsigned long". Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/mm.c | 4 ++-- xen/include/asm-x86/page.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 32b4910..36c4487 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -802,7 +802,7 @@ int is_iomem_page(unsigned long mfn) return (page_get_owner(page) == dom_io); } -static int update_xen_mappings(unsigned long mfn, unsigned long cacheattr) +static int update_xen_mappings(unsigned long mfn, unsigned int cacheattr) { int err = 0; bool_t alias = mfn >= PFN_DOWN(xen_phys_start) && @@ -2136,7 +2136,7 @@ static int mod_l4_entry(l4_pgentry_t *pl4e, static int cleanup_page_cacheattr(struct page_info *page) { - uint32_t cacheattr = + unsigned int cacheattr = (page->count_info & PGC_cacheattr_mask) >> PGC_cacheattr_base; if ( likely(cacheattr == 0) ) diff --git a/xen/include/asm-x86/page.h b/xen/include/asm-x86/page.h index fd9a2ec..224852a 100644 --- a/xen/include/asm-x86/page.h +++ b/xen/include/asm-x86/page.h @@ -348,11 +348,11 @@ void free_xen_pagetable(void *v); l1_pgentry_t *virt_to_xen_l1e(unsigned long v); /* Convert between PAT/PCD/PWT embedded in PTE flags and 3-bit cacheattr. */ -static inline uint32_t pte_flags_to_cacheattr(uint32_t flags) +static inline unsigned int pte_flags_to_cacheattr(unsigned int flags) { return ((flags >> 5) & 4) | ((flags >> 3) & 3); } -static inline uint32_t cacheattr_to_pte_flags(uint32_t cacheattr) +static inline unsigned int cacheattr_to_pte_flags(unsigned int cacheattr) { return ((cacheattr & 4) << 5) | ((cacheattr & 3) << 3); } -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |