Skip to content

Commit 3a3a4f7

Browse files
bibo-maochenhuacai
authored andcommitted
LoongArch: Remove unused variables
There are some variables never used or referenced, this patch removes these varaibles and make the code cleaner. Reviewed-by: WANG Xuerui <[email protected]> Signed-off-by: Bibo Mao <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent 71610ab commit 3a3a4f7

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

arch/loongarch/include/asm/loongson.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,6 @@ extern const struct plat_smp_ops loongson3_smp_ops;
3939

4040
#define MAX_PACKAGES 16
4141

42-
/* Chip Config register of each physical cpu package */
43-
extern u64 loongson_chipcfg[MAX_PACKAGES];
44-
#define LOONGSON_CHIPCFG(id) (*(volatile u32 *)(loongson_chipcfg[id]))
45-
46-
/* Chip Temperature register of each physical cpu package */
47-
extern u64 loongson_chiptemp[MAX_PACKAGES];
48-
#define LOONGSON_CHIPTEMP(id) (*(volatile u32 *)(loongson_chiptemp[id]))
49-
50-
/* Freq Control register of each physical cpu package */
51-
extern u64 loongson_freqctrl[MAX_PACKAGES];
52-
#define LOONGSON_FREQCTRL(id) (*(volatile u32 *)(loongson_freqctrl[id]))
53-
5442
#define xconf_readl(addr) readl(addr)
5543
#define xconf_readq(addr) readq(addr)
5644

arch/loongarch/kernel/env.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,6 @@ u64 efi_system_table;
1717
struct loongson_system_configuration loongson_sysconf;
1818
EXPORT_SYMBOL(loongson_sysconf);
1919

20-
u64 loongson_chipcfg[MAX_PACKAGES];
21-
u64 loongson_chiptemp[MAX_PACKAGES];
22-
u64 loongson_freqctrl[MAX_PACKAGES];
23-
unsigned long long smp_group[MAX_PACKAGES];
24-
25-
static void __init register_addrs_set(u64 *registers, const u64 addr, int num)
26-
{
27-
u64 i;
28-
29-
for (i = 0; i < num; i++) {
30-
*registers = (i << 44) | addr;
31-
registers++;
32-
}
33-
}
34-
3520
void __init init_environ(void)
3621
{
3722
int efi_boot = fw_arg0;
@@ -50,11 +35,6 @@ void __init init_environ(void)
5035
efi_memmap_init_early(&data);
5136
memblock_reserve(data.phys_map & PAGE_MASK,
5237
PAGE_ALIGN(data.size + (data.phys_map & ~PAGE_MASK)));
53-
54-
register_addrs_set(smp_group, TO_UNCACHE(0x1fe01000), 16);
55-
register_addrs_set(loongson_chipcfg, TO_UNCACHE(0x1fe00180), 16);
56-
register_addrs_set(loongson_chiptemp, TO_UNCACHE(0x1fe0019c), 16);
57-
register_addrs_set(loongson_freqctrl, TO_UNCACHE(0x1fe001d0), 16);
5838
}
5939

6040
static int __init init_cpu_fullname(void)

0 commit comments

Comments
 (0)