Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Nov 2013 19:52:03 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r257894 - projects/altix2/sys/ia64/sgisn
Message-ID:  <201311091952.rA9Jq3KP015362@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marcel
Date: Sat Nov  9 19:52:03 2013
New Revision: 257894
URL: http://svnweb.freebsd.org/changeset/base/257894

Log:
  Use the right operator to get the bit shift form the entry. We were
  mistakenly clearing bit 0 in the corresponding 64-bit integral.

Modified:
  projects/altix2/sys/ia64/sgisn/sgisn_pcib.c

Modified: projects/altix2/sys/ia64/sgisn/sgisn_pcib.c
==============================================================================
--- projects/altix2/sys/ia64/sgisn/sgisn_pcib.c	Sat Nov  9 19:43:16 2013	(r257893)
+++ projects/altix2/sys/ia64/sgisn/sgisn_pcib.c	Sat Nov  9 19:52:03 2013	(r257894)
@@ -781,7 +781,7 @@ sgisn_pcib_iommu_unmap(device_t bus, dev
 
 	KASSERT(count <= 64, ("foo: count"));
 	KASSERT((entry + count) <= PCIB_REG_ATE_SIZE, ("foo"));
-	bitshft = entry & 64;
+	bitshft = entry % 64;
 	KASSERT(bitshft <= (64 - count), ("foo: bitshft"));
 	bits = (count < 64) ? ((1UL << count) - 1UL) << bitshft : ~0UL;
 	ate = entry / 64;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311091952.rA9Jq3KP015362>