Re: [PATCH] dcdbas: Fix Intel-IOMMU domain allocation failure

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

 



On Fri, Jan 25, 2019 at 3:50 AM Szabolcs Fruhwald <sfruhwald@xxxxxxxxxx> wrote:

First of all, please do not top post!

> I took a quick look at arch_setup_pdev_archdata(), overridden it in
> dcdbas.c and it works well (despite it's being called twice, since
> it's called from platform_device_alloc and platform_device_register).
>
> However, as I am not super familiar with ELF weak method references,
> especially with its scope resolution / versioning part, so as I see
> this weak method was introduced mainly for arch/** specific hooks.
> Is it safe to override this method from driver code, when let's say
> there's another implementation in the x86 arch code (currently there
> isn't)?

No, it should be done somewhere in arch/x86.

OTOH, Intel iommu driver can do it based on the check dev_is_pci().
For now I think it's better to solve this inside Intel iommu driver.

> So while I agree that archdata should be ideally written from within
> this hook to make sure the value is there when the bus notifiers call
> the iommu code (currently not registered for platform_bus), I am just
> a bit worried that this might mask a future generic arch
> implementation and could cause issues. What do you think?

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux