Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1240138 > unrolled thread
| Started by | David Gibson <david@gibson.dropbear.id.au> |
|---|---|
| First post | 2015-10-06 05:30 +0200 |
| Last post | 2015-10-12 23:20 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 1/2] powerpc/iommu: expose IOMMU page shift David Gibson <david@gibson.dropbear.id.au> - 2015-10-06 05:30 +0200
Re: [PATCH 1/2] powerpc/iommu: expose IOMMU page shift Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-10-12 18:10 +0200
Re: [PATCH 1/2] powerpc/iommu: expose IOMMU page shift Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-10-12 23:20 +0200
| From | David Gibson <david@gibson.dropbear.id.au> |
|---|---|
| Date | 2015-10-06 05:30 +0200 |
| Subject | Re: [PATCH 1/2] powerpc/iommu: expose IOMMU page shift |
| Message-ID | <qgr6V-2iB-1@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
On Fri, Oct 02, 2015 at 10:18:00AM -0700, Nishanth Aravamudan wrote: > We will leverage this macro in the NVMe driver, which needs to know the > configured IOMMU page shift to properly configure its device's page > size. > > Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com> > > --- > Given this is available, it seems reasonable to expose -- and it doesn't > really make sense to make the driver do a log2 call on the existing > IOMMU_PAGE_SIZE() value. > > diff --git a/arch/powerpc/include/asm/iommu.h b/arch/powerpc/include/asm/iommu.h > index ca18cff..6fdf857 100644 > --- a/arch/powerpc/include/asm/iommu.h > +++ b/arch/powerpc/include/asm/iommu.h > @@ -36,6 +36,7 @@ > #define IOMMU_PAGE_MASK_4K (~((1 << IOMMU_PAGE_SHIFT_4K) - 1)) > #define IOMMU_PAGE_ALIGN_4K(addr) _ALIGN_UP(addr, IOMMU_PAGE_SIZE_4K) > > +#define IOMMU_PAGE_SHIFT(tblptr) (tblptr)->it_page_shift > #define IOMMU_PAGE_SIZE(tblptr) (ASM_CONST(1) << (tblptr)->it_page_shift) Seems like it would be a touch safer to alter IOMMU_PAGE_SIZE so it uses the new IOMMU_PAGE_SHIFT macro. > #define IOMMU_PAGE_MASK(tblptr) (~((1 << (tblptr)->it_page_shift) - 1)) > #define IOMMU_PAGE_ALIGN(addr, tblptr) _ALIGN_UP(addr, IOMMU_PAGE_SIZE(tblptr)) > -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
[toc] | [next] | [standalone]
| From | Nishanth Aravamudan <nacc@linux.vnet.ibm.com> |
|---|---|
| Date | 2015-10-12 18:10 +0200 |
| Message-ID | <qiNPI-3X3-17@gated-at.bofh.it> |
| In reply to | #1240138 |
On 06.10.2015 [14:19:43 +1100], David Gibson wrote: > On Fri, Oct 02, 2015 at 10:18:00AM -0700, Nishanth Aravamudan wrote: > > We will leverage this macro in the NVMe driver, which needs to know the > > configured IOMMU page shift to properly configure its device's page > > size. > > > > Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com> > > > > --- > > Given this is available, it seems reasonable to expose -- and it doesn't > > really make sense to make the driver do a log2 call on the existing > > IOMMU_PAGE_SIZE() value. > > > > diff --git a/arch/powerpc/include/asm/iommu.h b/arch/powerpc/include/asm/iommu.h > > index ca18cff..6fdf857 100644 > > --- a/arch/powerpc/include/asm/iommu.h > > +++ b/arch/powerpc/include/asm/iommu.h > > @@ -36,6 +36,7 @@ > > #define IOMMU_PAGE_MASK_4K (~((1 << IOMMU_PAGE_SHIFT_4K) - 1)) > > #define IOMMU_PAGE_ALIGN_4K(addr) _ALIGN_UP(addr, IOMMU_PAGE_SIZE_4K) > > > > +#define IOMMU_PAGE_SHIFT(tblptr) (tblptr)->it_page_shift > > #define IOMMU_PAGE_SIZE(tblptr) (ASM_CONST(1) << (tblptr)->it_page_shift) > > Seems like it would be a touch safer to alter IOMMU_PAGE_SIZE so it > uses the new IOMMU_PAGE_SHIFT macro. Yes absolutely! Sorry, I initially didn't add the first macro, so didn't think that through. Will update. -Nish -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Nishanth Aravamudan <nacc@linux.vnet.ibm.com> |
|---|---|
| Date | 2015-10-12 23:20 +0200 |
| Message-ID | <qiSFI-2zW-19@gated-at.bofh.it> |
| In reply to | #1244859 |
On 12.10.2015 [09:03:52 -0700], Nishanth Aravamudan wrote: > On 06.10.2015 [14:19:43 +1100], David Gibson wrote: > > On Fri, Oct 02, 2015 at 10:18:00AM -0700, Nishanth Aravamudan wrote: > > > We will leverage this macro in the NVMe driver, which needs to know the > > > configured IOMMU page shift to properly configure its device's page > > > size. > > > > > > Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com> > > > > > > --- > > > Given this is available, it seems reasonable to expose -- and it doesn't > > > really make sense to make the driver do a log2 call on the existing > > > IOMMU_PAGE_SIZE() value. > > > > > > diff --git a/arch/powerpc/include/asm/iommu.h b/arch/powerpc/include/asm/iommu.h > > > index ca18cff..6fdf857 100644 > > > --- a/arch/powerpc/include/asm/iommu.h > > > +++ b/arch/powerpc/include/asm/iommu.h > > > @@ -36,6 +36,7 @@ > > > #define IOMMU_PAGE_MASK_4K (~((1 << IOMMU_PAGE_SHIFT_4K) - 1)) > > > #define IOMMU_PAGE_ALIGN_4K(addr) _ALIGN_UP(addr, IOMMU_PAGE_SIZE_4K) > > > > > > +#define IOMMU_PAGE_SHIFT(tblptr) (tblptr)->it_page_shift > > > #define IOMMU_PAGE_SIZE(tblptr) (ASM_CONST(1) << (tblptr)->it_page_shift) > > > > Seems like it would be a touch safer to alter IOMMU_PAGE_SIZE so it > > uses the new IOMMU_PAGE_SHIFT macro. > > Yes absolutely! Sorry, I initially didn't add the first macro, so didn't > think that through. Will update. Err, replied too quickly -- just got back from vacation -- this is from an old version of the patchset, we no longer introduce this macro. -Nish -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web