[PATCH v3 03/13] iommupt: Remove the sanity check for pt_num_items_lg2() at the top level

Nicolin Chen nicolinc at nvidia.com
Mon Nov 23 16:40:09 PST 2026


On Sun, Nov 15, 2026 at 07:30:33PM -0400, Jason Gunthorpe wrote:
> This was ill conceived, the existing formats work OK because they
> happen to support pt_num_items_lg2() at the topk  level. However the

"topk level" reads like a typo?

> documentation is clear that is not permitted because ARMv8 has
> concatenated top levels and we do not want to calculate an exact
> pt_num_items_lg2() for the top level special case.
> 
> The logic to compute the number of items of the top level is shown in
> pt_top_memsize_lg2() which is:
> 
> 	num_items_lg2 = common->max_vasz_lg2 - pt_table_item_lg2sz(&pts);
> 
> Which is pointless to try and sanity check.
> 
> Reviewed-by: Mostafa Saleh <smostafa at google.com>
> Reviewed-by: Pranjal Shrivastava <praan at google.com>
> Signed-off-by: Jason Gunthorpe <jgg at nvidia.com>

Reviewed-by: Nicolin Chen <nicolinc at nvidia.com>



More information about the linux-arm-kernel mailing list