Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4361250rwd; Tue, 30 May 2023 04:31:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5L4Lmy/7x8Oky0MRV8zVltgHcylskvdNeH1QGSAhVoiN1xDWLatJ4dXwabb1ZjN40VnCbO X-Received: by 2002:a05:6a20:4422:b0:10f:2273:16a8 with SMTP id ce34-20020a056a20442200b0010f227316a8mr2366861pzb.61.1685446316533; Tue, 30 May 2023 04:31:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685446316; cv=none; d=google.com; s=arc-20160816; b=g2aqu4vE84DKuy63QU1gClPSRI9OqMTFeF2tDClx1iLF4fkWPDgwcJbUPO+KoW8O37 hB8NCBalnh8+8ADGtLXHKVNAaAxdrBBpzRsLaCcOnj4QjCQavhRqOWT/hDVYJKjqMPcx sbmLT/DvnH2kbjgPunxhaD8CHM73agXbemFDFwi2r80FokcgdQNFFEh1K7MxY2MzpVq7 nM3TE8i15i4n5HsJJKPix+JM8/PQ6HoyzK0cPNv7LepkEcHPu9Q4bZmcfPRVPcxlaEbK Awx+6SgQrGtd/GbH8WvxU+n5JIr0265hC+mfDqpNqL2Q0kxZ+YLbCG/NCYeOZQ86WOaz 54vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=dg3b3MiJSXCXpj7uYmi8KhnvYpB14qQr7r2DC8P87gc=; b=rWkOyQuQtxZdoa5Vm4nygOT0nZkKjmwNiDjP8E/MwvHL0C8rnVs6ge+JzDRl4/yxsC 1bsj4wLIvOyOg9xcWkLBDg13QrKGfrji5DKmpzsEAKeiXpjqZnVYiBytRwgL6JEN2xNT 2dLXjkrKg+IBhdchGZmY5GwfxtRDr8tYA7KDPdKGb1TqXxp5e9LgzQch/2sgLTrtjeAl 0EHadTlDN1iyL+TSuCRle069+hbAdcrvKe3GYWB167JaFnoiqugheMzx2EoM/pcn2YZ6 528j3o61+Wk51chH9/TNIjj1tpnY7Rwr1Jhpb6a/z70eFOnZRE4WQTqaUN1r5t4ToDrj LTpw== 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=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r15-20020a638f4f000000b005347d133470si11170753pgn.385.2023.05.30.04.31.43; Tue, 30 May 2023 04:31:56 -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=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231676AbjE3K7G (ORCPT + 99 others); Tue, 30 May 2023 06:59:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231548AbjE3K6w (ORCPT ); Tue, 30 May 2023 06:58:52 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6FD1E118 for ; Tue, 30 May 2023 03:58:47 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5A5D3AB6; Tue, 30 May 2023 03:59:32 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 80DFA3F67D; Tue, 30 May 2023 03:58:45 -0700 (PDT) Date: Tue, 30 May 2023 11:58:43 +0100 From: Sudeep Holla To: Ard Biesheuvel Cc: "lihuisong (C)" , Sudeep Holla , Lorenzo Pieralisi , catalin.marinas@arm.com, will@kernel.org, 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 Subject: Re: [PATCH] arm64: acpi: Export symbol for acpi_os_ioremap Message-ID: <20230530105843.ewgmwb3wyewqoqxo@bogus> References: <20230526121751.41060-1-lihuisong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,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 Mon, May 29, 2023 at 03:31:12PM +0200, Ard Biesheuvel wrote: > On Fri, 26 May 2023 at 15:12, lihuisong (C) wrote: > > > > > > 在 2023/5/26 20:39, Ard Biesheuvel 写道: > > > (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] 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. -- Regards, Sudeep