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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 21E44C47247 for ; Mon, 4 May 2020 12:30:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D2D5020661 for ; Mon, 4 May 2020 12:30:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hOCBKXWH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2D5020661 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+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=GiE+8SFRUfoATveUXCZh/5fI4qQf1s59L/QWOY0nf4M=; b=hOC BKXWH944Hfe71yiI5bxRa8XfEQ8aPbkHbrvqym5urYKudp9aTOM/tNBc6AsazhBBWHd3rgYa4P71Q RQLh9F/zifPE/bW1O4L54QzvwPQ8mnHzYWQ4UTxyJvcwkA6LrqQpSavWTaN19ao6UZzTZ2QbEstZI fTMd0LT8h8UVTN+6tYvSVKTrdHUlylgA4IvP2mxZZrrc5CU8dD805H/jVsTFL+0Vh8JyK433E33uL ddPy4HFP1V4SLJTDlhVmb7KHIxRlUTjY+X7sBcLhoAqv18D6Kzzv1c66HP6T0L2Yuy+mNN4l+guHX pkm+9v9OLO6ib/ju9fDP9gsSAZQGi2w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jVaF9-0003J5-RK; Mon, 04 May 2020 12:30:43 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jVaF6-0003I9-Uo for linux-arm-kernel@lists.infradead.org; Mon, 04 May 2020 12:30:42 +0000 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 D84F31FB; Mon, 4 May 2020 05:30:39 -0700 (PDT) Received: from p8cg001049571a15.arm.com (unknown [10.163.71.79]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 02DE73F71F; Mon, 4 May 2020 05:30:36 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64/cpuinfo: Drop boot_cpu_data Date: Mon, 4 May 2020 18:00:00 +0530 Message-Id: <1588595400-4560-1-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200504_053041_036322_FEAF7526 X-CRM114-Status: GOOD ( 10.93 ) 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: Mark Rutland , Suzuki Poulose , Catalin Marinas , Anshuman Khandual , linux-kernel@vger.kernel.org, Mark Brown , Will Deacon MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org A global boot_cpu_data is not really required. Lets drop this. While here, rename the local variable as boot_cpu_info when it is fetched for the boot cpu. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Brown Cc: Mark Rutland Cc: Suzuki Poulose Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- Based on 5.7-rc4 arch/arm64/kernel/cpuinfo.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c index a515d8f3639e..dabcdc132e56 100644 --- a/arch/arm64/kernel/cpuinfo.c +++ b/arch/arm64/kernel/cpuinfo.c @@ -31,7 +31,6 @@ * values depending on configuration at or after reset. */ DEFINE_PER_CPU(struct cpuinfo_arm64, cpu_data); -static struct cpuinfo_arm64 boot_cpu_data; static const char *icache_policy_str[] = { [0 ... ICACHE_POLICY_PIPT] = "RESERVED/UNKNOWN", @@ -393,15 +392,16 @@ static void __cpuinfo_store_cpu(struct cpuinfo_arm64 *info) void cpuinfo_store_cpu(void) { struct cpuinfo_arm64 *info = this_cpu_ptr(&cpu_data); + struct cpuinfo_arm64 *boot_cpu_info = &per_cpu(cpu_data, 0); + __cpuinfo_store_cpu(info); - update_cpu_features(smp_processor_id(), info, &boot_cpu_data); + update_cpu_features(smp_processor_id(), info, boot_cpu_info); } void __init cpuinfo_store_boot_cpu(void) { - struct cpuinfo_arm64 *info = &per_cpu(cpu_data, 0); - __cpuinfo_store_cpu(info); + struct cpuinfo_arm64 *boot_cpu_info = &per_cpu(cpu_data, 0); - boot_cpu_data = *info; - init_cpu_features(&boot_cpu_data); + __cpuinfo_store_cpu(boot_cpu_info); + init_cpu_features(boot_cpu_info); } -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel