From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D25E1C433E3 for ; Fri, 24 Jul 2020 09:35:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ABBEA206EB for ; Fri, 24 Jul 2020 09:35:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726810AbgGXJfd (ORCPT ); Fri, 24 Jul 2020 05:35:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:58712 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726114AbgGXJfd (ORCPT ); Fri, 24 Jul 2020 05:35:33 -0400 Received: from gaia (unknown [95.146.230.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1E530206D7; Fri, 24 Jul 2020 09:35:30 +0000 (UTC) Date: Fri, 24 Jul 2020 10:35:28 +0100 From: Catalin Marinas To: Mark Rutland Cc: Anshuman Khandual , Kefeng Wang , Will Deacon , Mikko Perttunen , Sumit Gupta , Viresh Kumar , Hulk Robot , "linux-kernel@vger.kernel.org List" , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH -next] arm64: Export __cpu_logical_map Message-ID: <20200724093528.GB23388@gaia> References: <20200724030433.22287-1-wangkefeng.wang@huawei.com> <82f750c4-d423-1ed8-a158-e75153745e07@huawei.com> <7998529f-da52-5e46-dd09-b9b11d83ec1a@arm.com> <20200724091308.GA44746@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200724091308.GA44746@C02TD0UTHF1T.local> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 24, 2020 at 10:13:52AM +0100, Mark Rutland wrote: > On Fri, Jul 24, 2020 at 01:46:18PM +0530, Anshuman Khandual wrote: > > On 07/24/2020 08:38 AM, Kefeng Wang wrote: > > >> Reported-by: Hulk Robot > > >> Signed-off-by: Kefeng Wang > > >> --- > > >>   arch/arm64/kernel/setup.c | 1 + > > >>   1 file changed, 1 insertion(+) > > >> > > >> diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c > > >> index c793276ec7ad9..3aea05fbb9998 100644 > > >> --- a/arch/arm64/kernel/setup.c > > >> +++ b/arch/arm64/kernel/setup.c > > >> @@ -275,6 +275,7 @@ static int __init reserve_memblock_reserved_regions(void) > > >>   arch_initcall(reserve_memblock_reserved_regions); > > >>     u64 __cpu_logical_map[NR_CPUS] = { [0 ... NR_CPUS-1] = INVALID_HWID }; > > >> +EXPORT_SYMBOL(__cpu_logical_map); > > If modules are using cpu_logical_map(), this looks sane ot me, but I > wonder if we should instead turn cpu_logical_map() into a C wrapper in > smp.c, or at least mark __cpu_logical_map as __ro_after_init lest > someone have the bright idea to fiddle with it. I'd go for a C wrapper and also change a couple of instances where we assign a value directly to cpu_logical_map(cpu). -- Catalin From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E03BC433E0 for ; Fri, 24 Jul 2020 09:37:04 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 68115206D7 for ; Fri, 24 Jul 2020 09:37:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hzOXmoZp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 68115206D7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=l/8Pf1h/S1MqhIUJn5/k/JGffUifNggcXClnsCTFhsw=; b=hzOXmoZpKfo71uyE0IqmhZE3m NumNbElFYX53QxpQtLLZ1deqx5m5mxN7DccV5z/JPq1M4hcufuFYafiX47K08pQYRBmoNEVmyJDrF kpp1OqWdvLa6RO7C1lHKHAr6y+y59Ygeo6Qf/lopIiKeZ36lc5Fk54DbkhLbRJ2aTKfZ1HUkqO0dN uJUilRlzQba7Xofbou3Zz7Ruxa453ZRfyZkcf+plAJ2SeVBpkik+Uj7bLOZQ+JB5FWTFJDwQuqaDb PEfBVk1TsRSuzACjeAl6Wvn0bBOD8kb0e6FLMCS1kFKqfjLTrN4cxh+EZiMtShsl+rQy63Ub/FfZM OqVjMoSEw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyu7D-00008Q-Lx; Fri, 24 Jul 2020 09:35:43 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyu73-00006O-Ie for linux-arm-kernel@lists.infradead.org; Fri, 24 Jul 2020 09:35:34 +0000 Received: from gaia (unknown [95.146.230.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1E530206D7; Fri, 24 Jul 2020 09:35:30 +0000 (UTC) Date: Fri, 24 Jul 2020 10:35:28 +0100 From: Catalin Marinas To: Mark Rutland Subject: Re: [PATCH -next] arm64: Export __cpu_logical_map Message-ID: <20200724093528.GB23388@gaia> References: <20200724030433.22287-1-wangkefeng.wang@huawei.com> <82f750c4-d423-1ed8-a158-e75153745e07@huawei.com> <7998529f-da52-5e46-dd09-b9b11d83ec1a@arm.com> <20200724091308.GA44746@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200724091308.GA44746@C02TD0UTHF1T.local> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200724_053533_684015_4472E0E1 X-CRM114-Status: GOOD ( 15.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kefeng Wang , Anshuman Khandual , Viresh Kumar , "linux-kernel@vger.kernel.org List" , Mikko Perttunen , Hulk Robot , Sumit Gupta , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jul 24, 2020 at 10:13:52AM +0100, Mark Rutland wrote: > On Fri, Jul 24, 2020 at 01:46:18PM +0530, Anshuman Khandual wrote: > > On 07/24/2020 08:38 AM, Kefeng Wang wrote: > > >> Reported-by: Hulk Robot > > >> Signed-off-by: Kefeng Wang > > >> --- > > >> =A0 arch/arm64/kernel/setup.c | 1 + > > >> =A0 1 file changed, 1 insertion(+) > > >> > > >> diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c > > >> index c793276ec7ad9..3aea05fbb9998 100644 > > >> --- a/arch/arm64/kernel/setup.c > > >> +++ b/arch/arm64/kernel/setup.c > > >> @@ -275,6 +275,7 @@ static int __init reserve_memblock_reserved_regi= ons(void) > > >> =A0 arch_initcall(reserve_memblock_reserved_regions); > > >> =A0 =A0 u64 __cpu_logical_map[NR_CPUS] =3D { [0 ... NR_CPUS-1] =3D I= NVALID_HWID }; > > >> +EXPORT_SYMBOL(__cpu_logical_map); > = > If modules are using cpu_logical_map(), this looks sane ot me, but I > wonder if we should instead turn cpu_logical_map() into a C wrapper in > smp.c, or at least mark __cpu_logical_map as __ro_after_init lest > someone have the bright idea to fiddle with it. I'd go for a C wrapper and also change a couple of instances where we assign a value directly to cpu_logical_map(cpu). -- = Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel