Re: [RESEND PATCH v4] iommu/mediatek: check 4GB mode by reading infracfg

2020-08-29 Thread Miles Chen
On Thu, 2020-08-27 at 20:27 +0100, Robin Murphy wrote: > On 2020-08-27 06:31, Yong Wu wrote: > > On Wed, 2020-08-26 at 16:56 +0800, Miles Chen wrote: > >> In previous discussion [1] and [2], we found that it is risky to > >> use max_pfn or totalram_pages to tell if 4GB mode is enabled. > >> > >> Ch

Re: [RESEND PATCH v4] iommu/mediatek: check 4GB mode by reading infracfg

2020-08-27 Thread Robin Murphy
On 2020-08-27 06:31, Yong Wu wrote: On Wed, 2020-08-26 at 16:56 +0800, Miles Chen wrote: In previous discussion [1] and [2], we found that it is risky to use max_pfn or totalram_pages to tell if 4GB mode is enabled. Check 4GB mode by reading infracfg register, remove the usage of the un-exporte

Re: [RESEND PATCH v4] iommu/mediatek: check 4GB mode by reading infracfg

2020-08-27 Thread Matthias Brugger
On 26/08/2020 10:56, Miles Chen wrote: In previous discussion [1] and [2], we found that it is risky to use max_pfn or totalram_pages to tell if 4GB mode is enabled. Check 4GB mode by reading infracfg register, remove the usage of the un-exported symbol max_pfn. This is a step towards buildi

Re: [RESEND PATCH v4] iommu/mediatek: check 4GB mode by reading infracfg

2020-08-26 Thread Yong Wu
On Wed, 2020-08-26 at 16:56 +0800, Miles Chen wrote: > In previous discussion [1] and [2], we found that it is risky to > use max_pfn or totalram_pages to tell if 4GB mode is enabled. > > Check 4GB mode by reading infracfg register, remove the usage > of the un-exported symbol max_pfn. > > This i