]> git.baikalelectronics.ru Git - kernel.git/commitdiff
LoongArch: Remove unused variables
authorBibo Mao <maobibo@loongson.cn>
Wed, 20 Jul 2022 07:21:52 +0000 (15:21 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Fri, 29 Jul 2022 10:22:32 +0000 (18:22 +0800)
There are some variables never used or referenced, this patch
removes these varaibles and make the code cleaner.

Reviewed-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/include/asm/loongson.h
arch/loongarch/kernel/env.c

index 8522afafc24e05e53cdb851ff030a60cd0cafe31..6e8f6972ceb614c9cd96b3814063006507d71064 100644 (file)
@@ -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)
 
index 467946ecf4513d0b21a2c81dd8066504dfc6f509..82b478a5c665746e90ed72dc17b00d6c6089807e 100644 (file)
@@ -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)