diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c index 989ea8fe49d00930327427ab9d6f43a6da70133c..ad5349b4906e11e4b119659cf24b893fab6e356e 100644 --- a/arch/arm64/kernel/armv8_deprecated.c +++ b/arch/arm64/kernel/armv8_deprecated.c @@ -182,15 +182,15 @@ static void __init register_insn_emulation(struct insn_emulation_ops *ops) switch (ops->status) { case INSN_DEPRECATED: -#if 0 +#ifndef CONFIG_OPENEULER_RASPBERRYPI insn->current_mode = INSN_EMULATE; /* Disable the HW mode if it was turned on at early boot time */ run_all_cpu_set_hw_mode(insn, false); #else insn->current_mode = INSN_HW; run_all_cpu_set_hw_mode(insn, true); - insn->max = INSN_HW; #endif + insn->max = INSN_HW; break; case INSN_OBSOLETE: insn->current_mode = INSN_UNDEF; diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c index a0ce6bd927137b3767b6e2dc52a9e553836a3e58..e91a3bfdcaf47855ccca58cdf19431c558c47c29 100644 --- a/arch/arm64/kernel/cpuinfo.c +++ b/arch/arm64/kernel/cpuinfo.c @@ -17,7 +17,9 @@ #include #include #include +#ifdef CONFIG_OPENEULER_RASPBERRYPI #include +#endif #include #include #include @@ -138,10 +140,12 @@ static int c_show(struct seq_file *m, void *v) { int i, j; bool aarch32 = personality(current->personality) == PER_LINUX32; +#ifdef CONFIG_OPENEULER_RASPBERRYPI struct device_node *np; const char *model; const char *serial; u32 revision; +#endif for_each_online_cpu(i) { struct cpuinfo_arm64 *cpuinfo = &per_cpu(cpu_data, i); @@ -202,6 +206,7 @@ static int c_show(struct seq_file *m, void *v) seq_printf(m, "CPU revision\t: %d\n\n", MIDR_REVISION(midr)); } +#ifdef CONFIG_OPENEULER_RASPBERRYPI seq_printf(m, "Hardware\t: BCM2835\n"); np = of_find_node_by_path("/system"); @@ -221,6 +226,7 @@ static int c_show(struct seq_file *m, void *v) seq_printf(m, "Model\t\t: %s\n", model); of_node_put(np); } +#endif return 0; }