Re: [PATCH] iommu/arm-smmu-qcom: create qcom_smmu_impl for ACPI boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue 06 Apr 11:23 CDT 2021, Lorenzo Pieralisi wrote:

> On Thu, Mar 25, 2021 at 12:02:56PM -0500, Bjorn Andersson wrote:
> > On Thu 25 Mar 09:59 CDT 2021, Will Deacon wrote:
> > 
> > > [+ Lorenzo]
> > > 
> > > On Mon, Mar 01, 2021 at 03:40:21PM +0800, Shawn Guo wrote:
> > > > Though qcom_adreno_smmu_impl is not used by ACPI boot right now,
> > > > qcom_smmu_impl is already required at least to boot up Lenovo Flex 5G
> > > > laptop.  Let's check asl_compiler_id in IORT header to ensure we are
> > > > running a QCOM SMMU and create qcom_smmu_impl for it.
> > > > 
> > > > !np is used to check ACPI boot, because fwnode of SMMU device is
> > > > a static allocation and thus has_acpi_companion() doesn't work here.
> > > > 
> > > > Signed-off-by: Shawn Guo <shawn.guo@xxxxxxxxxx>
> > > > ---
> > > >  drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 33 ++++++++++++++++++++++
> > > >  1 file changed, 33 insertions(+)
> > > 
> > > I don't know what a "asl_compiler_id" is, but it doesn't sound like it
> > > has an awful lot to do with the SMMU.
> > > 
> > 
> > I would prefer that we somehow relate this to the particular board,
> > rather than all Qualcomm-related ACPI tables. E.g. by relying on the
> > SMMU devices having a _HID of QCOM0409.
> > 
> > Shawn, any reason for this wouldn't be possible?
> > 
> > > Lorenzo -- any idea what we should be doing here instead? Probably not
> > > using ACPI?
> > > 
> > 
> > The 8cx (aka sc8180x) platform comes with Qualcomm's usual SMMU
> > stream-mapping quirks and this is one of the patches needed to bring
> > enough ACPI support to run the Debian installer that Shawn has been
> > working on. After the installer we currently only boot this using DT -
> > which already enables the quirk.
> 
> I am not sure I follow - can you explain please why this patch (and so
> the QCOM SMMU) is actually needed ? I don't get why getting the SMMU
> up and running with ACPI is mandatory to complete the process you describe
> above (but I am not sure I understood it entirely either - apologies).
> 

The bootloader sets up stream mappings for things such as storage and
display before jumping to Linux and as things are implemented today the
arm-smmu driver is probed.

The problem that arises, which is the reason for this patch, is that
when the arm-smmu driver resets the SMMU it wipes the stream mappings
and the next time the display hardware tries to scan out the EFIFB a
fault is triggered - of the type that happens to trap into one of the
higher security levels - which results in the device rebooting.

The handling of this is implemented by  07a7f2caaa5a
("iommu/arm-smmu-qcom: Read back stream mappings") and f9081b8ff593
("iommu/arm-smmu-qcom: Implement S2CR quirk"), which are activated based
on DT compatibles today.

What Shawn is looking for is a way to enable this quirk for the ACPI
case as well.

Regards,
Bjorn



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux