diff options
| -rw-r--r-- | arch/x86/include/asm/cpufeature.h | 1 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/proc.c | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index 6b7ee5ff6820..633b6176cf60 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h | |||
| @@ -209,6 +209,7 @@ | |||
| 209 | #define X86_FEATURE_RTM (9*32+11) /* Restricted Transactional Memory */ | 209 | #define X86_FEATURE_RTM (9*32+11) /* Restricted Transactional Memory */ |
| 210 | #define X86_FEATURE_RDSEED (9*32+18) /* The RDSEED instruction */ | 210 | #define X86_FEATURE_RDSEED (9*32+18) /* The RDSEED instruction */ |
| 211 | #define X86_FEATURE_ADX (9*32+19) /* The ADCX and ADOX instructions */ | 211 | #define X86_FEATURE_ADX (9*32+19) /* The ADCX and ADOX instructions */ |
| 212 | #define X86_FEATURE_SMAP (9*32+20) /* Supervisor Mode Access Prevention */ | ||
| 212 | 213 | ||
| 213 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) | 214 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) |
| 214 | 215 | ||
diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c index 8022c6681485..fbd895562292 100644 --- a/arch/x86/kernel/cpu/proc.c +++ b/arch/x86/kernel/cpu/proc.c | |||
| @@ -140,10 +140,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
| 140 | 140 | ||
| 141 | static void *c_start(struct seq_file *m, loff_t *pos) | 141 | static void *c_start(struct seq_file *m, loff_t *pos) |
| 142 | { | 142 | { |
| 143 | if (*pos == 0) /* just in case, cpu 0 is not the first */ | 143 | *pos = cpumask_next(*pos - 1, cpu_online_mask); |
| 144 | *pos = cpumask_first(cpu_online_mask); | ||
| 145 | else | ||
| 146 | *pos = cpumask_next(*pos - 1, cpu_online_mask); | ||
| 147 | if ((*pos) < nr_cpu_ids) | 144 | if ((*pos) < nr_cpu_ids) |
| 148 | return &cpu_data(*pos); | 145 | return &cpu_data(*pos); |
| 149 | return NULL; | 146 | return NULL; |
