lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 25 Jan 2021 14:49:44 +0800
From:   Yong Wu <yong.wu@...iatek.com>
To:     Krzysztof Kozlowski <krzk@...nel.org>
CC:     Matthias Brugger <matthias.bgg@...il.com>,
        Joerg Roedel <joro@...tes.org>,
        Robin Murphy <robin.murphy@....com>,
        Will Deacon <will@...nel.org>, Tomasz Figa <tfiga@...gle.com>,
        <linux-mediatek@...ts.infradead.org>,
        <srv_heupstream@...iatek.com>, <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <iommu@...ts.linux-foundation.org>, <youlin.pei@...iatek.com>,
        Nicolas Boichat <drinkcat@...omium.org>,
        <anan.sun@...iatek.com>, <yi.kuo@...iatek.com>
Subject: Re: [PATCH 3/3] memory: mtk-smi: Switch MTK_SMI to tristate

On Fri, 2021-01-22 at 22:35 +0100, Krzysztof Kozlowski wrote:
> On Thu, Jan 21, 2021 at 02:24:29PM +0800, Yong Wu wrote:
> > This patch switches MTK_SMI to tristate. Support it could be 'm'.
> > 
> > Meanwhile, Fix a build issue while MTK_SMI is built as module.
> 
> s/Fix/fix.
> 
> What error is being fixed here? How can I reproduce it? Aren't you just
> adjusting it to being buildable by module?

Sorry, I didn't copy the fail log here. This is the build log:

In file included from .../drivers/iommu/mtk_iommu.c:34:0:
.../drivers/iommu/mtk_iommu.h:84:28: error: array type has incomplete
element type 'struct mtk_smi_larb_iommu'
  struct mtk_smi_larb_iommu larb_imu[MTK_LARB_NR_MAX];

Our iommu driver will use this structure. but it was contained by
"#ifdef CONFIG_MTK_SMI". thus I change it to "#if
IS_ENABLED(CONFIG_MTK_SMI)"

If reproducing it, we should change mtk-iommu to module_init[1]. and
switch kconfig MTK_IOMMU to tristate, then change the CONFIG_MTK_IOMMU
to m. we could get the fail log.

In this case, Should I squash this change into this patch? I though this
is a preparing patch and the fail is caused by MTK_SMI. thus I squash
that into this patch. or change it as a independent patch and send when
I change MTK_IOMMU to tristate?

[1]
https://lore.kernel.org/linux-mediatek/1590826218-23653-14-git-send-email-yong.wu@mediatek.com/


> 
> Best regards,
> Krzysztof
> 
> 
> > 
> > Signed-off-by: Yong Wu <yong.wu@...iatek.com>
> > ---
> > This patch has a little conflict with the mt8192 iommu patch which
> > delete the MTK_LARB_NR_MAX in smi.h(It's still reviewing).
> > This patch rebase on the clean v5.11-rc1.
> > ---
> >  drivers/memory/Kconfig     | 2 +-
> >  include/soc/mediatek/smi.h | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
> > index 3ea6913df176..d5f0f4680880 100644
> > --- a/drivers/memory/Kconfig
> > +++ b/drivers/memory/Kconfig
> > @@ -173,7 +173,7 @@ config JZ4780_NEMC
> >  	  memory devices such as NAND and SRAM.
> >  
> >  config MTK_SMI
> > -	bool "Mediatek SoC Memory Controller driver" if COMPILE_TEST
> > +	tristate "Mediatek SoC Memory Controller driver" if COMPILE_TEST
> >  	depends on ARCH_MEDIATEK || COMPILE_TEST
> >  	help
> >  	  This driver is for the Memory Controller module in MediaTek SoCs,
> > diff --git a/include/soc/mediatek/smi.h b/include/soc/mediatek/smi.h
> > index 5a34b87d89e3..29e2fb8f33d6 100644
> > --- a/include/soc/mediatek/smi.h
> > +++ b/include/soc/mediatek/smi.h
> > @@ -9,7 +9,7 @@
> >  #include <linux/bitops.h>
> >  #include <linux/device.h>
> >  
> > -#ifdef CONFIG_MTK_SMI
> > +#if IS_ENABLED(CONFIG_MTK_SMI)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ