Re: [PATCH v1 04/10] powerpc/kernel/iommu: Add new iommu_table_in_use() helper

2020-08-27 Thread Alexey Kardashevskiy
On 28/08/2020 04:34, Leonardo Bras wrote: > On Sat, 2020-08-22 at 20:34 +1000, Alexey Kardashevskiy wrote: >>> + >>> + /*ignore reserved bit0*/ >> >> s/ignore reserved bit0/ ignore reserved bit0 / (add spaces) > > Fixed > >>> + if (tbl->it_offset == 0) >>> + p1_start = 1; >>> +

Re: [PATCH v1 04/10] powerpc/kernel/iommu: Add new iommu_table_in_use() helper

2020-08-27 Thread Leonardo Bras
On Sat, 2020-08-22 at 20:34 +1000, Alexey Kardashevskiy wrote: > > + > > + /*ignore reserved bit0*/ > > s/ignore reserved bit0/ ignore reserved bit0 / (add spaces) Fixed > > + if (tbl->it_offset == 0) > > + p1_start = 1; > > + > > + /* Check if reserved memory is valid*/ > > A

Re: [PATCH v1 04/10] powerpc/kernel/iommu: Add new iommu_table_in_use() helper

2020-08-22 Thread Alexey Kardashevskiy
On 18/08/2020 09:40, Leonardo Bras wrote: > Having a function to check if the iommu table has any allocation helps > deciding if a tbl can be reset for using a new DMA window. > > It should be enough to replace all instances of !bitmap_empty(tbl...). > > iommu_table_in_use() skips reserved

[PATCH v1 04/10] powerpc/kernel/iommu: Add new iommu_table_in_use() helper

2020-08-17 Thread Leonardo Bras
Having a function to check if the iommu table has any allocation helps deciding if a tbl can be reset for using a new DMA window. It should be enough to replace all instances of !bitmap_empty(tbl...). iommu_table_in_use() skips reserved memory, so we don't need to worry about releasing it before