diff mbox series

[UNSTABLE,IMPISH,v5.13] Revert "riscv: Get CPU manufacturer information"

Message ID 20210727131404.29543-1-dimitri.ledkov@canonical.com
State New
Headers show
Series [UNSTABLE,IMPISH,v5.13] Revert "riscv: Get CPU manufacturer information" | expand

Commit Message

Dimitri John Ledkov July 27, 2021, 1:14 p.m. UTC
This reverts commit 58ed2afd01ffeb45f2db71ab13a2046e5bb0c1dd.

Superseded by upstream change 6f4eea9046 ("riscv: Introduce
alternative mechanism to apply errata solution") and the
riscv_fill_cpu_mfr_info() function it implements.

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
---
 arch/riscv/include/asm/hwcap.h     |  6 ------
 arch/riscv/include/asm/processor.h |  2 --
 arch/riscv/include/asm/soc.h       |  1 -
 arch/riscv/kernel/cpufeature.c     | 17 -----------------
 arch/riscv/kernel/setup.c          |  2 --
 arch/riscv/kernel/soc.c            |  1 -
 6 files changed, 29 deletions(-)

Comments

Andrea Righi July 27, 2021, 1:19 p.m. UTC | #1
On Tue, Jul 27, 2021 at 02:14:04PM +0100, Dimitri John Ledkov wrote:
> This reverts commit 58ed2afd01ffeb45f2db71ab13a2046e5bb0c1dd.
> 
> Superseded by upstream change 6f4eea9046 ("riscv: Introduce
> alternative mechanism to apply errata solution") and the
> riscv_fill_cpu_mfr_info() function it implements.
> 
> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
> ---

Applied to impish.

Thanks!
-Andrea
Andrea Righi July 27, 2021, 1:23 p.m. UTC | #2
On Tue, Jul 27, 2021 at 02:14:04PM +0100, Dimitri John Ledkov wrote:
> This reverts commit 58ed2afd01ffeb45f2db71ab13a2046e5bb0c1dd.
> 
> Superseded by upstream change 6f4eea9046 ("riscv: Introduce
> alternative mechanism to apply errata solution") and the
> riscv_fill_cpu_mfr_info() function it implements.
> 
> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
> ---

Applied to unstable.

Thanks,
-Andrea
diff mbox series

Patch

diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h
index b7409487c9..5ce50468af 100644
--- a/arch/riscv/include/asm/hwcap.h
+++ b/arch/riscv/include/asm/hwcap.h
@@ -44,12 +44,6 @@  bool __riscv_isa_extension_available(const unsigned long *isa_bitmap, int bit);
 #define riscv_isa_extension_available(isa_bitmap, ext)	\
 	__riscv_isa_extension_available(isa_bitmap, RISCV_ISA_EXT_##ext)
 
-struct cpu_manufacturer_info_t {
-	unsigned long vendor_id;
-	unsigned long arch_id;
-	unsigned long imp_id;
-};
-
 #endif
 
 #endif /* _ASM_RISCV_HWCAP_H */
diff --git a/arch/riscv/include/asm/processor.h b/arch/riscv/include/asm/processor.h
index e15fbf9e9b..021ed64ee6 100644
--- a/arch/riscv/include/asm/processor.h
+++ b/arch/riscv/include/asm/processor.h
@@ -73,8 +73,6 @@  int riscv_of_parent_hartid(struct device_node *node);
 extern void riscv_fill_hwcap(void);
 extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src);
 
-void riscv_fill_cpu_manufacturer_info(void);
-
 #endif /* __ASSEMBLY__ */
 
 #endif /* _ASM_RISCV_PROCESSOR_H */
diff --git a/arch/riscv/include/asm/soc.h b/arch/riscv/include/asm/soc.h
index 03dee6db40..f494066051 100644
--- a/arch/riscv/include/asm/soc.h
+++ b/arch/riscv/include/asm/soc.h
@@ -10,7 +10,6 @@ 
 #include <linux/of.h>
 #include <linux/linkage.h>
 #include <linux/types.h>
-#include <asm/hwcap.h>
 
 #define SOC_EARLY_INIT_DECLARE(name, compat, fn)			\
 	static const struct of_device_id __soc_early_init__##name	\
diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
index 389162ee19..ac202f44a6 100644
--- a/arch/riscv/kernel/cpufeature.c
+++ b/arch/riscv/kernel/cpufeature.c
@@ -12,8 +12,6 @@ 
 #include <asm/hwcap.h>
 #include <asm/smp.h>
 #include <asm/switch_to.h>
-#include <asm/sbi.h>
-#include <asm/csr.h>
 
 unsigned long elf_hwcap __read_mostly;
 
@@ -24,8 +22,6 @@  static DECLARE_BITMAP(riscv_isa, RISCV_ISA_EXT_MAX) __read_mostly;
 bool has_fpu __read_mostly;
 #endif
 
-struct cpu_manufacturer_info_t cpu_mfr_info;
-
 /**
  * riscv_isa_extension_base() - Get base extension word
  *
@@ -153,16 +149,3 @@  void riscv_fill_hwcap(void)
 		has_fpu = true;
 #endif
 }
-
-void riscv_fill_cpu_manufacturer_info(void)
-{
-#ifndef CONFIG_RISCV_M_MODE
-	cpu_mfr_info.vendor_id = sbi_get_vendorid();
-	cpu_mfr_info.arch_id = sbi_get_archid();
-	cpu_mfr_info.imp_id = sbi_get_impid();
-#else
-	cpu_mfr_info.vendor_id = csr_read(CSR_MVENDORID);
-	cpu_mfr_info.arch_id = csr_read(CSR_MARCHID);
-	cpu_mfr_info.imp_id = csr_read(CSR_MIMPID);
-#endif
-}
diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index e75352ed7d..9a1b7a0603 100644
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -309,8 +309,6 @@  void __init setup_arch(char **cmdline_p)
 #endif
 
 	riscv_fill_hwcap();
-
-	riscv_fill_cpu_manufacturer_info();
 }
 
 static int __init topology_init(void)
diff --git a/arch/riscv/kernel/soc.c b/arch/riscv/kernel/soc.c
index 58f6fd9174..a0516172a3 100644
--- a/arch/riscv/kernel/soc.c
+++ b/arch/riscv/kernel/soc.c
@@ -6,7 +6,6 @@ 
 #include <linux/libfdt.h>
 #include <linux/pgtable.h>
 #include <asm/soc.h>
-#include <asm/hwcap.h>
 
 /*
  * This is called extremly early, before parse_dtb(), to allow initializing