Re: [PATCH 4/7] iommu/arm-smmu: Check for num_context_irqs > 0 to avoid divide by zero exception

2013-09-25 Thread Andreas Herrmann
On Tue, Sep 24, 2013 at 11:40:48AM -0400, Will Deacon wrote: > On Tue, Sep 24, 2013 at 04:06:58PM +0100, Andreas Herrmann wrote: > > With the right (or wrong;-) definition of v1 SMMU node in DTB it is > > possible to trigger a division by zero in arm_smmu_init_domain_context > > (if number of conte

Re: [PATCH 4/7] iommu/arm-smmu: Check for num_context_irqs > 0 to avoid divide by zero exception

2013-09-24 Thread Will Deacon
On Tue, Sep 24, 2013 at 04:06:58PM +0100, Andreas Herrmann wrote: > With the right (or wrong;-) definition of v1 SMMU node in DTB it is > possible to trigger a division by zero in arm_smmu_init_domain_context > (if number of context irqs is 0): > >if (smmu->version == 1) { >

[PATCH 4/7] iommu/arm-smmu: Check for num_context_irqs > 0 to avoid divide by zero exception

2013-09-24 Thread Andreas Herrmann
With the right (or wrong;-) definition of v1 SMMU node in DTB it is possible to trigger a division by zero in arm_smmu_init_domain_context (if number of context irqs is 0): if (smmu->version == 1) { root_cfg->irptndx = atomic_inc_return(&smmu->irptndx); → root_cf