On Thu, Jan 16, 2014 at 12:44:17PM +0000, Andreas Herrmann wrote: > Cc: Andreas Herrmann <[email protected]> > Signed-off-by: Andreas Herrmann <[email protected]> > --- > drivers/iommu/arm-smmu.c | 25 ++++++++++++++++++++++--- > 1 file changed, 22 insertions(+), 3 deletions(-) > > diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c > index 02a871e..a4e0c93 100644 > --- a/drivers/iommu/arm-smmu.c > +++ b/drivers/iommu/arm-smmu.c > @@ -56,6 +56,9 @@ > /* Maximum number of stream IDs assigned to a single device */ > #define MAX_MASTER_STREAMIDS 8 > > +/* Maximum stream ID */ > +#define ARM_SMMU_MAX_STREAMID (SZ_64K - 1) > + > /* Maximum number of context banks per SMMU */ > #define ARM_SMMU_MAX_CBS 128 > > @@ -386,6 +389,8 @@ struct arm_smmu_device { > u32 smr_mask_mask; > u32 smr_id_mask; > > + unsigned long *sids;
DECLARE_BITMAP instead? However, that's an 8k bitmap just for sanity checking, which I'm not too fond of. Given that the motivation for the checking was your smr allocator, perhaps it's sufficient just to do the checking on a per-master basis, which we can do with the exhaustive search each time. Will _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
