]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branches 'x86-cpu-for-linus' and 'x86-cpufeature-for-linus' of git://git.kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 1 Oct 2012 18:06:35 +0000 (11:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 1 Oct 2012 18:06:35 +0000 (11:06 -0700)
Pull x86/cpu and x86/cpufeature from Ingo Molnar:
 "One tiny cleanup, and prepare for SMAP (Supervisor Mode Access
  Prevention) support on x86"

* 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86: Remove the useless branch in c_start()

* 'x86-cpufeature-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, cpufeature: Add feature bit for SMAP

arch/x86/include/asm/cpufeature.h
arch/x86/kernel/cpu/proc.c

index 6b7ee5ff682024f80ec205bf7bdc9c7814787e01..633b6176cf6097bd64cde003dbcfadee48c88a34 100644 (file)
 #define X86_FEATURE_RTM                (9*32+11) /* Restricted Transactional Memory */
 #define X86_FEATURE_RDSEED     (9*32+18) /* The RDSEED instruction */
 #define X86_FEATURE_ADX                (9*32+19) /* The ADCX and ADOX instructions */
+#define X86_FEATURE_SMAP       (9*32+20) /* Supervisor Mode Access Prevention */
 
 #if defined(__KERNEL__) && !defined(__ASSEMBLY__)
 
index 8022c668148518ec03ced2a38b01d8b55b677c46..fbd895562292cdf54695a5aaa1433e7dfee61397 100644 (file)
@@ -140,10 +140,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
 
 static void *c_start(struct seq_file *m, loff_t *pos)
 {
-       if (*pos == 0)  /* just in case, cpu 0 is not the first */
-               *pos = cpumask_first(cpu_online_mask);
-       else
-               *pos = cpumask_next(*pos - 1, cpu_online_mask);
+       *pos = cpumask_next(*pos - 1, cpu_online_mask);
        if ((*pos) < nr_cpu_ids)
                return &cpu_data(*pos);
        return NULL;