On Tue, Oct 01, 2024 at 12:38:56PM -0700, Yang Shi wrote:
Maybe just make a little inline function to do this math and remove
On 10/1/24 12:18 PM, Jason Gunthorpe wrote:
On Tue, Oct 01, 2024 at 12:09:03PM -0700, Yang Shi wrote:OK, will cover this is v2.
Still, we should be fixing them all if sid_bits == 32, all thoseAlso, there are other places doing "1 << smmu->sid_bits", e.g.The disassembly shows it uses "sbfiz x21, x20, 6, 32" instead of lsl. 1UL
arm_smmu_init_strtab_linear().
should be used if we want to take extra caution and don't prefer rely on
compiler.
shifts should be throwing a UBSAN error. It would be crazy to have a
the repated open coding? Then the types can be right, etc.
Jason