From 091326f2ad6559c5cc969ac5f197fe2fd4416eed Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Wed, 22 Feb 2017 07:07:05 +0000 Subject: [PATCH] More fixes for regression in r313898 on i386. Use long long constants where needed. Reported and tested by: kargl Sponsored by: The FreeBSD Foundation MFC after: 10 days --- sys/x86/x86/x86_mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/x86/x86/x86_mem.c b/sys/x86/x86/x86_mem.c index 8e93883863a6..d639224f8403 100644 --- a/sys/x86/x86/x86_mem.c +++ b/sys/x86/x86/x86_mem.c @@ -260,7 +260,7 @@ x86_mrfetch(struct mem_range_softc *sc) /* Compute the range from the mask. Ick. */ mrd->mr_len = (~(msrv & mtrr_physmask) & - (mtrr_physmask | 0xfffL)) + 1; + (mtrr_physmask | 0xfffLL)) + 1; if (!mrvalid(mrd->mr_base, mrd->mr_len)) mrd->mr_flags |= MDF_BOGUS; @@ -638,7 +638,7 @@ x86_mrinit(struct mem_range_softc *sc) * Determine the size of the PhysMask and PhysBase fields in * the variable range MTRRs. */ - mtrr_physmask = (((uint64_t)1 << cpu_maxphyaddr) - 1) & ~0xfffUL; + mtrr_physmask = (((uint64_t)1 << cpu_maxphyaddr) - 1) & ~0xfffULL; /* If fixed MTRRs supported and enabled. */ if ((mtrrcap & MTRR_CAP_FIXED) && (mtrrdef & MTRR_DEF_FIXED_ENABLE)) {