Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Upgrade to 4.4.50-rt62
[kvmfornfv.git]
/
kernel
/
arch
/
arm64
/
kernel
/
cpuinfo.c
diff --git
a/kernel/arch/arm64/kernel/cpuinfo.c
b/kernel/arch/arm64/kernel/cpuinfo.c
index
212ae63
..
0166cfb
100644
(file)
--- a/
kernel/arch/arm64/kernel/cpuinfo.c
+++ b/
kernel/arch/arm64/kernel/cpuinfo.c
@@
-22,6
+22,8
@@
#include <linux/bitops.h>
#include <linux/bug.h>
#include <linux/bitops.h>
#include <linux/bug.h>
+#include <linux/compat.h>
+#include <linux/elf.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/personality.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/personality.h>
@@
-85,7
+87,8
@@
static const char *const compat_hwcap_str[] = {
"idivt",
"vfpd32",
"lpae",
"idivt",
"vfpd32",
"lpae",
- "evtstrm"
+ "evtstrm",
+ NULL
};
static const char *const compat_hwcap2_str[] = {
};
static const char *const compat_hwcap2_str[] = {
@@
-101,6
+104,7
@@
static const char *const compat_hwcap2_str[] = {
static int c_show(struct seq_file *m, void *v)
{
int i, j;
static int c_show(struct seq_file *m, void *v)
{
int i, j;
+ bool compat = personality(current->personality) == PER_LINUX32;
for_each_online_cpu(i) {
struct cpuinfo_arm64 *cpuinfo = &per_cpu(cpu_data, i);
for_each_online_cpu(i) {
struct cpuinfo_arm64 *cpuinfo = &per_cpu(cpu_data, i);
@@
-112,6
+116,9
@@
static int c_show(struct seq_file *m, void *v)
* "processor". Give glibc what it expects.
*/
seq_printf(m, "processor\t: %d\n", i);
* "processor". Give glibc what it expects.
*/
seq_printf(m, "processor\t: %d\n", i);
+ if (compat)
+ seq_printf(m, "model name\t: ARMv8 Processor rev %d (%s)\n",
+ MIDR_REVISION(midr), COMPAT_ELF_PLATFORM);
seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
loops_per_jiffy / (500000UL/HZ),
seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
loops_per_jiffy / (500000UL/HZ),
@@
-124,7
+131,7
@@
static int c_show(struct seq_file *m, void *v)
* software which does already (at least for 32-bit).
*/
seq_puts(m, "Features\t:");
* software which does already (at least for 32-bit).
*/
seq_puts(m, "Features\t:");
- if (
personality(current->personality) == PER_LINUX32
) {
+ if (
compat
) {
#ifdef CONFIG_COMPAT
for (j = 0; compat_hwcap_str[j]; j++)
if (compat_elf_hwcap & (1 << j))
#ifdef CONFIG_COMPAT
for (j = 0; compat_hwcap_str[j]; j++)
if (compat_elf_hwcap & (1 << j))