Message ID | 20230526121751.41060-1-lihuisong@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp433929vqr; Fri, 26 May 2023 05:31:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5QMm4FgMR2WOJqdO8bngVF6p6ANXcnG6VPf5/a/N61o7FELSwA6jtrTyKIv/dagGmtQMZt X-Received: by 2002:a17:902:ec83:b0:1ad:d542:6e14 with SMTP id x3-20020a170902ec8300b001add5426e14mr2252798plg.12.1685104278442; Fri, 26 May 2023 05:31:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685104278; cv=none; d=google.com; s=arc-20160816; b=qhQPVNxxp/ZwPdtPCpqMPrXunfI2pvRR2dJxBLgh5DzAytJSCCKSLytVAU8mttMNjc fSTqetxtBFxjndpGlGKL62crRplI2TGTo8U/ZuEzrVfZbPMf8liKXinwnSdPL79Gax4u Jp22KIOaRdet4iO8rUmItJS9ZiEyscYVD54IWB75xpOB3gceKxSamEC/T6ovHefMQrHW TIkVbnSOofYUmawQC2EywNo+ikvLaCfbpytX7ZjYxUedVtaaafFTe5RQGoUcZoVjyJ6M zbVKzlGIt3f9fb79Cdi7PyXZ1uyA20F+AiSVp2TCdmfyJajAf99BWow7SrTW0kZIILO3 SVnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=HS9FeTJWD0p4pSHN9ZRNVSHS7alRttcqaAqFWNCOI7k=; b=Gz6pHGLMpTKtFYqFEw7tCAB55fCRFEkU/DcDsD8mMr593DRXwPBgFT32byoPot++5o OshQVHV2CuUQtAAzWw/mX9cR4hw4zIO5MGh/cXh1EVZ048pAttK5GGIlqoMWPDm6ECEP wOPqUNuJpUSX6pm/WC4LdCctCBAYYJqAkwCJkHEfh1KuKUCggch858nQUz54yJ/f1QkA IMwXDggu8WkJEtKDssXkGYUZ+5ZT847pbic8LBWqw4AoNb9cXYT0dIpM7zTjuYC8d8+s cJEGF1d3FsyqQMmjlawNDzssK7jJhB5ObF+mlkUtqa90eJ6NmgySPVg+TpkYJ5pDsSot I8Zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w8-20020a1709027b8800b001ae4c3bbb0dsi3697891pll.145.2023.05.26.05.31.05; Fri, 26 May 2023 05:31:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243382AbjEZMTw (ORCPT <rfc822;zhanglyra.2023@gmail.com> + 99 others); Fri, 26 May 2023 08:19:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230064AbjEZMTt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 26 May 2023 08:19:49 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CD7EA4 for <linux-kernel@vger.kernel.org>; Fri, 26 May 2023 05:19:48 -0700 (PDT) Received: from kwepemm600004.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4QSP7g4t7YzsRnm; Fri, 26 May 2023 20:17:35 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Fri, 26 May 2023 20:19:44 +0800 From: Huisong Li <lihuisong@huawei.com> To: <catalin.marinas@arm.com>, <will@kernel.org>, <sudeep.holla@arm.com>, <rafael.j.wysocki@intel.com> CC: <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <anshuman.khandual@arm.com>, <wangkefeng.wang@huawei.com>, <liuyonglong@huawei.com>, <lihuisong@huawei.com> Subject: [PATCH] arm64: acpi: Export symbol for acpi_os_ioremap Date: Fri, 26 May 2023 20:17:51 +0800 Message-ID: <20230526121751.41060-1-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm600004.china.huawei.com (7.193.23.242) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766959903438910356?= X-GMAIL-MSGID: =?utf-8?q?1766959903438910356?= |
Series |
arm64: acpi: Export symbol for acpi_os_ioremap
|
|
Commit Message
Huisong Li
May 26, 2023, 12:17 p.m. UTC
The driver who calls the acpi_os_ioremap() cannot be compiled if the 'M'
is selected for the driver. The compiling log is as follows:
-->
MODPOST Module.symvers
ERROR: modpost: "acpi_os_ioremap" [drivers/soc/hisilicon/xxx.ko] undefined!
scripts/Makefile.modpost:136: recipe for target 'Module.symvers' failed
make[1]: *** [Module.symvers] Error 1
So this patch exports symbol for acpi_os_ioremap.
Signed-off-by: Huisong Li <lihuisong@huawei.com>
---
arch/arm64/kernel/acpi.c | 1 +
1 file changed, 1 insertion(+)
Comments
(cc Lorenzo) On Fri, 26 May 2023 at 14:20, Huisong Li <lihuisong@huawei.com> wrote: > > The driver who calls the acpi_os_ioremap() cannot be compiled if the 'M' > is selected for the driver. The compiling log is as follows: > --> > MODPOST Module.symvers > ERROR: modpost: "acpi_os_ioremap" [drivers/soc/hisilicon/xxx.ko] undefined! > scripts/Makefile.modpost:136: recipe for target 'Module.symvers' failed > make[1]: *** [Module.symvers] Error 1 > > So this patch exports symbol for acpi_os_ioremap. > That driver does not exist in mainline. Why does it need to use acpi_os_ioremap() instead of the ordinary memremap/ioremap routines? > Signed-off-by: Huisong Li <lihuisong@huawei.com> > --- > arch/arm64/kernel/acpi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c > index dba8fcec7f33..ec0414caf3d1 100644 > --- a/arch/arm64/kernel/acpi.c > +++ b/arch/arm64/kernel/acpi.c > @@ -354,6 +354,7 @@ void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size) > } > return ioremap_prot(phys, size, pgprot_val(prot)); > } > +EXPORT_SYMBOL(acpi_os_ioremap); > > /* > * Claim Synchronous External Aborts as a firmware first notification. > -- > 2.33.0 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
在 2023/5/26 20:39, Ard Biesheuvel 写道: > (cc Lorenzo) > > On Fri, 26 May 2023 at 14:20, Huisong Li <lihuisong@huawei.com> wrote: >> The driver who calls the acpi_os_ioremap() cannot be compiled if the 'M' >> is selected for the driver. The compiling log is as follows: >> --> >> MODPOST Module.symvers >> ERROR: modpost: "acpi_os_ioremap" [drivers/soc/hisilicon/xxx.ko] undefined! >> scripts/Makefile.modpost:136: recipe for target 'Module.symvers' failed >> make[1]: *** [Module.symvers] Error 1 >> >> So this patch exports symbol for acpi_os_ioremap. >> > That driver does not exist in mainline. We have an uploading driver [1] that may use it. [1] https://patchwork.kernel.org/project/linux-soc/patch/20230522072211.8894-2-lihuisong@huawei.com/ > > Why does it need to use acpi_os_ioremap() instead of the ordinary > memremap/ioremap routines? This driver needs to ioremap the shared memory space of a PCC subspace. And @Sudeep suggested that we use this interface. It is suitable here. > >> Signed-off-by: Huisong Li <lihuisong@huawei.com> >> --- >> arch/arm64/kernel/acpi.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c >> index dba8fcec7f33..ec0414caf3d1 100644 >> --- a/arch/arm64/kernel/acpi.c >> +++ b/arch/arm64/kernel/acpi.c >> @@ -354,6 +354,7 @@ void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size) >> } >> return ioremap_prot(phys, size, pgprot_val(prot)); >> } >> +EXPORT_SYMBOL(acpi_os_ioremap); >> >> /* >> * Claim Synchronous External Aborts as a firmware first notification. >> -- >> 2.33.0 >> >> >> _______________________________________________ >> linux-arm-kernel mailing list >> linux-arm-kernel@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > .
On Fri, 26 May 2023 at 15:12, lihuisong (C) <lihuisong@huawei.com> wrote: > > > 在 2023/5/26 20:39, Ard Biesheuvel 写道: > > (cc Lorenzo) > > > > On Fri, 26 May 2023 at 14:20, Huisong Li <lihuisong@huawei.com> wrote: > >> The driver who calls the acpi_os_ioremap() cannot be compiled if the 'M' > >> is selected for the driver. The compiling log is as follows: > >> --> > >> MODPOST Module.symvers > >> ERROR: modpost: "acpi_os_ioremap" [drivers/soc/hisilicon/xxx.ko] undefined! > >> scripts/Makefile.modpost:136: recipe for target 'Module.symvers' failed > >> make[1]: *** [Module.symvers] Error 1 > >> > >> So this patch exports symbol for acpi_os_ioremap. > >> > > That driver does not exist in mainline. > > We have an uploading driver [1] that may use it. > > [1] > https://patchwork.kernel.org/project/linux-soc/patch/20230522072211.8894-2-lihuisong@huawei.com/ > > > > > Why does it need to use acpi_os_ioremap() instead of the ordinary > > memremap/ioremap routines? > This driver needs to ioremap the shared memory space of a PCC subspace. > And @Sudeep suggested that we use this interface. > It is suitable here. I disagree. acpi_io_ioremap() is internal arch plumbing for the ACPI subsystem. I don't see why we should use it here. On arm64, acpi_os_ioremap() cross references the EFI memory map to figure out whether a physical region is memory or device, but a driver should already know that. > > > >> Signed-off-by: Huisong Li <lihuisong@huawei.com> > >> --- > >> arch/arm64/kernel/acpi.c | 1 + > >> 1 file changed, 1 insertion(+) > >> > >> diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c > >> index dba8fcec7f33..ec0414caf3d1 100644 > >> --- a/arch/arm64/kernel/acpi.c > >> +++ b/arch/arm64/kernel/acpi.c > >> @@ -354,6 +354,7 @@ void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size) > >> } > >> return ioremap_prot(phys, size, pgprot_val(prot)); > >> } > >> +EXPORT_SYMBOL(acpi_os_ioremap); > >> > >> /* > >> * Claim Synchronous External Aborts as a firmware first notification. > >> -- > >> 2.33.0 > >> > >> > >> _______________________________________________ > >> linux-arm-kernel mailing list > >> linux-arm-kernel@lists.infradead.org > >> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > > .
On Mon, May 29, 2023 at 03:31:12PM +0200, Ard Biesheuvel wrote: > On Fri, 26 May 2023 at 15:12, lihuisong (C) <lihuisong@huawei.com> wrote: > > > > > > 在 2023/5/26 20:39, Ard Biesheuvel 写道: > > > (cc Lorenzo) > > > > > > On Fri, 26 May 2023 at 14:20, Huisong Li <lihuisong@huawei.com> wrote: > > >> The driver who calls the acpi_os_ioremap() cannot be compiled if the 'M' > > >> is selected for the driver. The compiling log is as follows: > > >> --> > > >> MODPOST Module.symvers > > >> ERROR: modpost: "acpi_os_ioremap" [drivers/soc/hisilicon/xxx.ko] undefined! > > >> scripts/Makefile.modpost:136: recipe for target 'Module.symvers' failed > > >> make[1]: *** [Module.symvers] Error 1 > > >> > > >> So this patch exports symbol for acpi_os_ioremap. > > >> > > > That driver does not exist in mainline. > > > > We have an uploading driver [1] that may use it. > > > > [1] > > https://patchwork.kernel.org/project/linux-soc/patch/20230522072211.8894-2-lihuisong@huawei.com/ > > > > > > > > Why does it need to use acpi_os_ioremap() instead of the ordinary > > > memremap/ioremap routines? > > This driver needs to ioremap the shared memory space of a PCC subspace. > > And @Sudeep suggested that we use this interface. > > It is suitable here. > > I disagree. acpi_io_ioremap() is internal arch plumbing for the ACPI > subsystem. I don't see why we should use it here. > Yes. One reason I suggested this was in past firmware authors had mixed the memory allocated for PCC and using acpi_io_ioremap() made sense. But I hear you and it make sense to avoid it especially if the driver must know what type of memory it is and must be dealing with. > On arm64, acpi_os_ioremap() cross references the EFI memory map to > figure out whether a physical region is memory or device, but a driver > should already know that. Agreed.
在 2023/5/30 18:58, Sudeep Holla 写道: > On Mon, May 29, 2023 at 03:31:12PM +0200, Ard Biesheuvel wrote: >> On Fri, 26 May 2023 at 15:12, lihuisong (C) <lihuisong@huawei.com> wrote: >>> >>> 在 2023/5/26 20:39, Ard Biesheuvel 写道: >>>> (cc Lorenzo) >>>> >>>> On Fri, 26 May 2023 at 14:20, Huisong Li <lihuisong@huawei.com> wrote: >>>>> The driver who calls the acpi_os_ioremap() cannot be compiled if the 'M' >>>>> is selected for the driver. The compiling log is as follows: >>>>> --> >>>>> MODPOST Module.symvers >>>>> ERROR: modpost: "acpi_os_ioremap" [drivers/soc/hisilicon/xxx.ko] undefined! >>>>> scripts/Makefile.modpost:136: recipe for target 'Module.symvers' failed >>>>> make[1]: *** [Module.symvers] Error 1 >>>>> >>>>> So this patch exports symbol for acpi_os_ioremap. >>>>> >>>> That driver does not exist in mainline. >>> We have an uploading driver [1] that may use it. >>> >>> [1] >>> https://patchwork.kernel.org/project/linux-soc/patch/20230522072211.8894-2-lihuisong@huawei.com/ >>> >>>> Why does it need to use acpi_os_ioremap() instead of the ordinary >>>> memremap/ioremap routines? >>> This driver needs to ioremap the shared memory space of a PCC subspace. >>> And @Sudeep suggested that we use this interface. >>> It is suitable here. >> I disagree. acpi_io_ioremap() is internal arch plumbing for the ACPI >> subsystem. I don't see why we should use it here. >> > Yes. One reason I suggested this was in past firmware authors had mixed > the memory allocated for PCC and using acpi_io_ioremap() made sense. But > I hear you and it make sense to avoid it especially if the driver must > know what type of memory it is and must be dealing with. > >> On arm64, acpi_os_ioremap() cross references the EFI memory map to >> figure out whether a physical region is memory or device, but a driver >> should already know that. > Agreed. Thank you. will drop this patch. >
diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index dba8fcec7f33..ec0414caf3d1 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -354,6 +354,7 @@ void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size) } return ioremap_prot(phys, size, pgprot_val(prot)); } +EXPORT_SYMBOL(acpi_os_ioremap); /* * Claim Synchronous External Aborts as a firmware first notification.