Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5203360imw; Wed, 20 Jul 2022 00:37:27 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tHrRUs5cN1qIwh7/0Vs93i//klPKHzZPy3yjheBtzzzceVqnPzWfTicxaEpa6rDnnP5DLX X-Received: by 2002:a17:90b:388c:b0:1f0:29f7:7d15 with SMTP id mu12-20020a17090b388c00b001f029f77d15mr3766687pjb.181.1658302647620; Wed, 20 Jul 2022 00:37:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658302647; cv=none; d=google.com; s=arc-20160816; b=DfywuzUD3Yq1rk/Bcx3EDeiyNyi4I//01ihCk0vOVDBhov52XAMeH++iHrVdy9u4VK pp5NPoy6f1f4BpCTnfjjaFTrMMEufe4+VPwfAlRXjROcUYI4/5fJvBCSfB4WNcAYunL+ PDw1dUfWipfjlqUbYWMDxlVVAuLDOfWLv8/A7oveYS+hpLQ+kPR6mVqjmbcN4z9luZ63 5Mf6X2w0pgpkv1xUPGXAyg7/mVrCdlzf6MjmmwVleu6ZHTfKQWD3PfUjJUcCSYeboPZX GOFyzbcY6baZ6QIfG6RJWLGf2FQgsgzqq5vBzmQGDFuta1VZ15Se5ViPmDsj6f6ab4jB 6duw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=083Vn1OfV2+thl+2EYKv0qcSX3QkgwIAhAE9UeqNBG8=; b=VN5GP80Zi5rYZARNmwCDUf4A0Z5e3yVU+hoo2w0eiR/KnDHFqk8HtrQssuPGYPRa24 oQXVDL84man1ZEDrfmbE8kT1fYYaLUZy3KvZgXPJd8p4UlWWrcXD06iJRUd00ScGrsKY zpzgqHAaEdnLwOOXbjHWLs63cqLlrS/Wu33XjZ7YY2jnJkgjcPv3uqYolj2nlZ1PmaVm B0oFBEUhbCcG1BWwc+EHqr2tk8MLtgvRQzv4ehlmaRKmwbjhUq2kH353Sv/JgcY3JPxe Bi5PfAJ/5/IJtCpBWuj+lOhkMJL3Ax+vdbDUDZSMXfQimHoUyWLXb+i8LT8dIMlNfSDt X/ZQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n127-20020a622785000000b0052aca7b944esi21227260pfn.188.2022.07.20.00.37.12; Wed, 20 Jul 2022 00:37:27 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234048AbiGTHWD (ORCPT + 99 others); Wed, 20 Jul 2022 03:22:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229636AbiGTHWB (ORCPT ); Wed, 20 Jul 2022 03:22:01 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0A2B15FAD7 for ; Wed, 20 Jul 2022 00:21:59 -0700 (PDT) Received: from localhost.localdomain (unknown [10.2.5.185]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9AxKeEQrddivyMqAA--.15305S3; Wed, 20 Jul 2022 15:21:53 +0800 (CST) From: Bibo Mao To: Huacai Chen Cc: WANG Xuerui , Jiaxun Yang , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] LoongArch: Remove unused variable Date: Wed, 20 Jul 2022 15:21:52 +0800 Message-Id: <20220720072152.3894559-2-maobibo@loongson.cn> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220720072152.3894559-1-maobibo@loongson.cn> References: <20220720072152.3894559-1-maobibo@loongson.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf9AxKeEQrddivyMqAA--.15305S3 X-Coremail-Antispam: 1UD129KBjvJXoWxGry7Gry7Gw17ZF1ruF4UArb_yoW5Xr1UpF 9xAwsagr4Ygrn5Zr98JFW5WF1jkasxGwnrZanFv3W8uFnrZ34UXrykCFykZFZFvaykAay0 qFZ5C3yvga1jgwUanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnUUvcSsGvfC2KfnxnUUI43ZEXa7xR_UUUUUUUUU== X-CM-SenderInfo: xpdruxter6z05rqj20fqof0/ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS 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 There are some variables never used or referenced, this patch removes these varaibles and make the code cleaner. Signed-off-by: Bibo Mao --- arch/loongarch/include/asm/loongson.h | 12 ------------ arch/loongarch/kernel/env.c | 20 -------------------- 2 files changed, 32 deletions(-) diff --git a/arch/loongarch/include/asm/loongson.h b/arch/loongarch/include/asm/loongson.h index 6a8038725ba7..2df649e73371 100644 --- a/arch/loongarch/include/asm/loongson.h +++ b/arch/loongarch/include/asm/loongson.h @@ -39,18 +39,6 @@ extern const struct plat_smp_ops loongson3_smp_ops; #define MAX_PACKAGES 16 -/* Chip Config register of each physical cpu package */ -extern u64 loongson_chipcfg[MAX_PACKAGES]; -#define LOONGSON_CHIPCFG(id) (*(volatile u32 *)(loongson_chipcfg[id])) - -/* Chip Temperature register of each physical cpu package */ -extern u64 loongson_chiptemp[MAX_PACKAGES]; -#define LOONGSON_CHIPTEMP(id) (*(volatile u32 *)(loongson_chiptemp[id])) - -/* Freq Control register of each physical cpu package */ -extern u64 loongson_freqctrl[MAX_PACKAGES]; -#define LOONGSON_FREQCTRL(id) (*(volatile u32 *)(loongson_freqctrl[id])) - #define xconf_readl(addr) readl(addr) #define xconf_readq(addr) readq(addr) diff --git a/arch/loongarch/kernel/env.c b/arch/loongarch/kernel/env.c index 467946ecf451..82b478a5c665 100644 --- a/arch/loongarch/kernel/env.c +++ b/arch/loongarch/kernel/env.c @@ -17,21 +17,6 @@ u64 efi_system_table; struct loongson_system_configuration loongson_sysconf; EXPORT_SYMBOL(loongson_sysconf); -u64 loongson_chipcfg[MAX_PACKAGES]; -u64 loongson_chiptemp[MAX_PACKAGES]; -u64 loongson_freqctrl[MAX_PACKAGES]; -unsigned long long smp_group[MAX_PACKAGES]; - -static void __init register_addrs_set(u64 *registers, const u64 addr, int num) -{ - u64 i; - - for (i = 0; i < num; i++) { - *registers = (i << 44) | addr; - registers++; - } -} - void __init init_environ(void) { int efi_boot = fw_arg0; @@ -50,11 +35,6 @@ void __init init_environ(void) efi_memmap_init_early(&data); memblock_reserve(data.phys_map & PAGE_MASK, PAGE_ALIGN(data.size + (data.phys_map & ~PAGE_MASK))); - - register_addrs_set(smp_group, TO_UNCACHE(0x1fe01000), 16); - register_addrs_set(loongson_chipcfg, TO_UNCACHE(0x1fe00180), 16); - register_addrs_set(loongson_chiptemp, TO_UNCACHE(0x1fe0019c), 16); - register_addrs_set(loongson_freqctrl, TO_UNCACHE(0x1fe001d0), 16); } static int __init init_cpu_fullname(void) -- 2.31.1