Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3174245rwd; Mon, 29 May 2023 06:48:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4CONkaJCQuf6F74Kk5fnxCSzNcBKywfZ/JyyaOtDce1+/ALMjrIqwWSjOhRyjPTceZpxdF X-Received: by 2002:a05:6a20:4413:b0:10c:ef18:7473 with SMTP id ce19-20020a056a20441300b0010cef187473mr9821802pzb.56.1685368108697; Mon, 29 May 2023 06:48:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685368108; cv=none; d=google.com; s=arc-20160816; b=g5uz3TUb41US/aN4P0R44h67jRFzJKyxhYkViZL1xLNB/8w5RkgZwOMMx/aYxdkHrZ fcgKIBGYemqMf8tzDdUyG59hGOaJs+wYbxgXRytxEgET4OTtY3DkQXCtqNqN06ViJ9nQ UvuwFbFhjb5yG/MnHgGOihHAfGGj6JKrg/3EUC3FszaPsedBYPpqV3zBZot3v/zVipDJ yFZBo/59fj1zCe++6vFmo/1H4OP1nzTvsQ+b2xqsL7ShUcL33Vl67CUIams/OlmNvwdS 6g4bD0NP12UZiTOsH082o2Zmky66ue8nsf9/tOr5QM4sEZE/LRP9O59q8eJ1Wv03bd0j 1aLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=RGvkKx8R2qcLpyPQj+Iub4TztqD9v+W7RJ87xUf2oQw=; b=FQ5wAbHKsxbsBPPVOpFnhmqD9irRCn+Nxu684S0vqzGt0z7novCeIPGsssj6R9HFnu Uw06HbgnFUHRcOdBQOFsxv+h0by6QOlMOBLqlnEyHJ3uyxYKd6+0MeOTuomgHuVVY4qZ K0EWxeETekHz+Ml3Fou/obrMJj2RL1Q7nyAt2yVkBNlPDr2YmsKzOpyeh+tS4rGk3J9J TEUCw299Ks4YeGqSY1BV3nDbtjsFztyZXJOPbVyF5N++5dsXRbjCWyJIXVB67kmmZEJD xQlMKp4TArry2xUAlb6yOE10dxx4wKM/+ov133UucmmUQ3q/TcxhrFFenrvO2qg5eC1+ +pLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fa+xbQq1; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v22-20020a636116000000b0053ef4692839si4253880pgb.819.2023.05.29.06.48.15; Mon, 29 May 2023 06:48:28 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fa+xbQq1; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229663AbjE2Nbb (ORCPT + 99 others); Mon, 29 May 2023 09:31:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbjE2Nb3 (ORCPT ); Mon, 29 May 2023 09:31:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D644C90 for ; Mon, 29 May 2023 06:31:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 72DEF61853 for ; Mon, 29 May 2023 13:31:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF9D3C433EF for ; Mon, 29 May 2023 13:31:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685367085; bh=gai7gg0nc2XAlnjc330+sTNAq2Dcj7WxQOfnyM5Av1E=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=fa+xbQq1IBIaAgWAroL1Q9UyEs6LTvXkBgOhHCWWGjO58BzCpvltVxbI2oWa4H6rM +ayrZRhUsVdPIQjH0x27adEBxWda+kqQopk3qi8RDrnfn504ttclALlst03alq8xjK TSdJPKRAJz+NQfNDNJAxZ6H3WZqkCWNlr3ZDoij1/LqJcQ/58ceBJz7FIpdIjcL17i o9RYxgwxesu+3EvUgLLUksY3cMuMc9XlwodV8SpVPB3geNFEW1PmUvz1KCR8btc4bM B0N0cTTm+av2zfNDST8ZdkUZXqAtlG7BX8S/cESxiTxm88uWIS4fLZVmMufOEu4uwT Ga289QSyauarQ== Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-4f4e71a09a7so3577583e87.1 for ; Mon, 29 May 2023 06:31:25 -0700 (PDT) X-Gm-Message-State: AC+VfDxEzDMi0yPw5VvVo8woG62cBZGgrjmDb0p0kIcgnqwCwrUfR68U FOUPr/dzNzM8jGy8avPwTSLWIvK2RsppMWY+ck4= X-Received: by 2002:ac2:5581:0:b0:4e8:487a:7c2e with SMTP id v1-20020ac25581000000b004e8487a7c2emr3007235lfg.14.1685367083877; Mon, 29 May 2023 06:31:23 -0700 (PDT) MIME-Version: 1.0 References: <20230526121751.41060-1-lihuisong@huawei.com> In-Reply-To: From: Ard Biesheuvel Date: Mon, 29 May 2023 15:31:12 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] arm64: acpi: Export symbol for acpi_os_ioremap To: "lihuisong (C)" Cc: Lorenzo Pieralisi , catalin.marinas@arm.com, will@kernel.org, sudeep.holla@arm.com, rafael.j.wysocki@intel.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, anshuman.khandual@arm.com, wangkefeng.wang@huawei.com, liuyonglong@huawei.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 26 May 2023 at 15:12, lihuisong (C) wrote: > > > =E5=9C=A8 2023/5/26 20:39, Ard Biesheuvel =E5=86=99=E9=81=93: > > (cc Lorenzo) > > > > On Fri, 26 May 2023 at 14:20, Huisong Li 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] undef= ined! > >> scripts/Makefile.modpost:136: recipe for target 'Module.symvers' faile= d > >> 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 > >> --- > >> 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_addres= s 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 notificatio= n. > >> -- > >> 2.33.0 > >> > >> > >> _______________________________________________ > >> linux-arm-kernel mailing list > >> linux-arm-kernel@lists.infradead.org > >> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > > .