Skip to content
  1. Jun 22, 2015
  2. Jun 21, 2015
  3. Jun 20, 2015
  4. Jun 18, 2015
    • Luis R. Rodriguez's avatar
      x86/mm/pat, drivers/infiniband/ipath: Use arch_phys_wc_add() and require PAT disabled · 7ea402d0
      Luis R. Rodriguez authored
      
      
      We are burrying direct access to MTRR code support on
      x86 in order to take advantage of PAT. In the future, we
      also want to make the default behaviour of ioremap_nocache()
      to use strong UC, use of mtrr_add() on those systems
      would make write-combining void.
      
      In order to help both enable us to later make strong
      UC default and in order to phase out direct MTRR access
      code port the driver over to arch_phys_wc_add() and
      annotate that the device driver requires systems to
      boot with PAT disabled, with the 'nopat' kernel parameter.
      
      This is a workable compromise given that the ipath device
      driver powers the old HTX bus cards that only work in
      AMD systems, while the newer IB/qib device driver
      powers all PCI-e cards. The ipath device driver is
      obsolete, hardware is hard to find and because of this
      its a reasonable compromise to require users of ipath
      to boot with 'nopat'.
      
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Acked-by: default avatarDoug Ledford <dledford@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Andy Walls <awalls@md.metrocast.net>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Mike Marciniszyn <mike.marciniszyn@intel.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
      Cc: Roger Pau Monné <roger.pau@citrix.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Sean Hefty <sean.hefty@intel.com>
      Cc: Stefan Bader <stefan.bader@canonical.com>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Ville Syrjälä <syrjala@sci.fi>
      Cc: infinipath@intel.com
      Cc: jbeulich@suse.com
      Cc: konrad.wilk@oracle.com
      Cc: linux-rdma@vger.kernel.org
      Cc: mchehab@osg.samsung.com
      Cc: toshi.kani@hp.com
      Link: http://lkml.kernel.org/r/1434053994-2196-4-git-send-email-mcgrof@do-not-panic.com
      Link: http://lkml.kernel.org/r/1434356898-25135-5-git-send-email-bp@alien8.de
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      7ea402d0
    • Luis R. Rodriguez's avatar
      x86/mm/pat, drivers/media/ivtv: Use arch_phys_wc_add() and require PAT disabled · 1bf1735b
      Luis R. Rodriguez authored
      
      
      We are burrying direct access to MTRR code support on
      x86 in order to take advantage of PAT. In the future, we
      also want to make the default behavior of ioremap_nocache()
      to use strong UC, at which point the use of mtrr_add() on
      those systems would make write-combining void.
      
      In order to help both enable us to later make strong
      UC default and in order to phase out direct MTRR access
      code, port the driver over to the arch_phys_wc_add() API
      and annotate that the device driver requires systems to
      boot with PAT disabled, with the 'nopat' kernel parameter.
      
      This is a workable compromise given that the hardware is
      really rare these days, and perhaps only some lost souls
      stuck with obsolete hardware are expected to be using this
      feature of the device driver.
      
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Acked-by: default avatarAndy Walls <awalls@md.metrocast.net>
      Acked-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Roger Pau Monné <roger.pau@citrix.com>
      Cc: Stefan Bader <stefan.bader@canonical.com>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ville Syrjälä <syrjala@sci.fi>
      Cc: bhelgaas@google.com
      Cc: konrad.wilk@oracle.com
      Cc: linux-media@vger.kernel.org
      Cc: tomi.valkeinen@ti.com
      Cc: toshi.kani@hp.com
      Link: http://lkml.kernel.org/r/1434053994-2196-2-git-send-email-mcgrof@do-not-panic.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      1bf1735b
    • Feng Tang's avatar
      x86/platform/intel/baytrail: Add comments about why we disabled HPET on Baytrail · b58d9307
      Feng Tang authored
      
      
      This question has been asked many times, and finally I found the
      official document which explains the problem of HPET on Baytrail,
      that it will halt in deep idle states.
      
      Signed-off-by: default avatarFeng Tang <feng.tang@intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: john.stultz@linaro.org
      Cc: len.brown@intel.com
      Cc: matthew.lee@intel.com
      Link: http://lkml.kernel.org/r/1434361201-31743-1-git-send-email-feng.tang@intel.com
      
      
      [ Prettified things a bit. ]
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      b58d9307
  5. Jun 16, 2015
  6. Jun 12, 2015
  7. Jun 10, 2015
    • Andy Lutomirski's avatar
      x86/asm/entry/64: Disentangle error_entry/exit gsbase/ebx/usermode code · 539f5113
      Andy Lutomirski authored
      
      
      The error_entry/error_exit code to handle gsbase and whether we
      return to user mdoe was a mess:
      
       - error_sti was misnamed.  In particular, it did not enable interrupts.
      
       - Error handling for gs_change was hopelessly tangled the normal
         usermode path.  Separate it out.  This saves a branch in normal
         entries from kernel mode.
      
       - The comments were bad.
      
      Fix it up.  As a nice side effect, there's now a code path that
      happens on error entries from user mode.  We'll use it soon.
      
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/f1be898ab93360169fb845ab85185948832209ee.1433878454.git.luto@kernel.org
      
      
      [ Prettified it, clarified comments some more. ]
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      539f5113
    • Denys Vlasenko's avatar
      x86/asm/entry/32: Shorten __audit_syscall_entry() args preparation · a92fde25
      Denys Vlasenko authored
      
      
      We use three MOVs to swap edx and ecx. We can use one XCHG
      instead.
      
      Expand the comments. It's difficult to keep track which arg#
      every register corresponds to, so spell it out.
      
      Signed-off-by: default avatarDenys Vlasenko <dvlasenk@redhat.com>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Will Drewry <wad@chromium.org>
      Link: http://lkml.kernel.org/r/1433876051-26604-3-git-send-email-dvlasenk@redhat.com
      
      
      [ Expanded the comments some more. ]
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      a92fde25
    • Denys Vlasenko's avatar
      x86/asm/entry/32: Explain reloading of registers after __audit_syscall_entry() · 1536bb46
      Denys Vlasenko authored
      
      
      Here it is not obvious why we load pt_regs->cx to %esi etc.
      Lets improve comments.
      
      Explain that here we combine two things: first, we reload
      registers since some of them are clobbered by the C function we
      just called; and we also convert 32-bit syscall params to 64-bit
      C ABI, because we are going to jump back to syscall dispatch
      code.
      
      Move reloading of 6th argument into the macro instead of having
      it after each of two macro invocations.
      
      No actual code changes here.
      
      Signed-off-by: default avatarDenys Vlasenko <dvlasenk@redhat.com>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Will Drewry <wad@chromium.org>
      Link: http://lkml.kernel.org/r/1433876051-26604-2-git-send-email-dvlasenk@redhat.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      1536bb46
    • Denys Vlasenko's avatar
      x86/asm/entry/32: Fix fallout from the R9 trick removal in the SYSCALL code · aee4b013
      Denys Vlasenko authored
      
      
      I put %ebp restoration code too late. Under strace, it is not
      reached and %ebp is not restored upon return to userspace.
      
      This is the fix. Run-tested.
      
      Signed-off-by: default avatarDenys Vlasenko <dvlasenk@redhat.com>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Will Drewry <wad@chromium.org>
      Link: http://lkml.kernel.org/r/1433876051-26604-1-git-send-email-dvlasenk@redhat.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      aee4b013
  8. Jun 09, 2015
    • Denys Vlasenko's avatar
      x86/asm/entry: Clean up entry*.S style, final bits · 9b47feb7
      Denys Vlasenko authored
      
      
      A few bits were missed.
      
      Signed-off-by: default avatarDenys Vlasenko <dvlasenk@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      9b47feb7
    • Ingo Molnar's avatar
      x86/asm/entry: (Re-)rename __NR_entry_INT80_compat_max to __NR_syscall_compat_max · bace7117
      Ingo Molnar authored
      Brian Gerst noticed that I did a weird rename in the following commit:
      
         b2502b41
      
       ("x86/asm/entry: Untangle 'system_call' into two entry points: entry_SYSCALL_64 and entry_INT80_32")
      
      which renamed __NR_ia32_syscall_max to __NR_entry_INT80_compat_max.
      
      Now the original name was a misnomer, but the new one is a misnomer as well,
      as all the 32-bit compat syscall entry points (sysenter, syscall) share the
      system call table, not just the INT80 based one.
      
      Rename it to __NR_syscall_compat_max.
      
      Reported-by: default avatarBrian Gerst <brgerst@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      bace7117
    • Denys Vlasenko's avatar
      x86/asm/entry/32: Reinstate clearing of pt_regs->r8..r11 on EFAULT path · eb478544
      Denys Vlasenko authored
      
      
      I broke this recently when I changed pt_regs->r8..r11 clearing
      logic in INT 80 code path.
      
      There is a branch from SYSENTER/SYSCALL code to INT 80 code:
      if we fail to retrieve arg6, we return EFAULT. Before this
      patch, in this case we don't clear pt_regs->r8..r11.
      
      This patch fixes this. The resulting code is smaller and
      simpler.
      
      While at it, remove incorrect comment about syscall dispatching
      CALL insn: it does not use RIP-relative addressing form (the
      comment was meant to be "TODO: make this rip-relative", and
      morphed since then, dropping "TODO").
      
      Signed-off-by: default avatarDenys Vlasenko <dvlasenk@redhat.com>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Will Drewry <wad@chromium.org>
      Link: http://lkml.kernel.org/r/1433701470-28800-1-git-send-email-dvlasenk@redhat.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      eb478544
    • Ingo Molnar's avatar
      x86/asm/entry/64: Clean up entry_64.S · 4d732138
      Ingo Molnar authored
      
      
      Make the 64-bit syscall entry code a bit more readable:
      
       - use consistent assembly coding style similar to the other entry_*.S files
      
       - remove old comments that are not true anymore
      
       - eliminate whitespace noise
      
       - use consistent vertical spacing
      
       - fix various comments
      
       - reorganize entry point generation tables to be more readable
      
      No code changed:
      
        # arch/x86/entry/entry_64.o:
      
         text    data     bss     dec     hex filename
        12282       0       0   12282    2ffa entry_64.o.before
        12282       0       0   12282    2ffa entry_64.o.after
      
      md5:
         cbab1f2d727a2a8a87618eeb79f391b7  entry_64.o.before.asm
         cbab1f2d727a2a8a87618eeb79f391b7  entry_64.o.after.asm
      
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      4d732138
    • Ingo Molnar's avatar
      Merge branch 'x86/asm' into x86/core, to prepare for new patch · 9dda1658
      Ingo Molnar authored
      
      
      Collect all changes to arch/x86/entry/entry_64.S, before applying
      patch that changes most of the file.
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      9dda1658
  9. Jun 08, 2015
    • Ingo Molnar's avatar
      x86/asm/entry/32: Clean up entry_32.S · a49976d1
      Ingo Molnar authored
      
      
      Make the 32-bit syscall entry code a bit more readable:
      
       - use consistent assembly coding style similar to entry_64.S
      
       - remove old comments that are not true anymore
      
       - eliminate whitespace noise
      
       - use consistent vertical spacing
      
       - fix various comments
      
      No code changed:
      
        # arch/x86/entry/entry_32.o:
      
         text    data     bss     dec     hex filename
         6025       0       0    6025    1789 entry_32.o.before
         6025       0       0    6025    1789 entry_32.o.after
      
      md5:
         f3fa16b2b0dca804f052deb6b30ba6cb  entry_32.o.before.asm
         f3fa16b2b0dca804f052deb6b30ba6cb  entry_32.o.after.asm
      
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      a49976d1
    • Ingo Molnar's avatar
      x86/asm/entry: Untangle 'system_call' into two entry points: entry_SYSCALL_64 and entry_INT80_32 · b2502b41
      Ingo Molnar authored
      
      
      The 'system_call' entry points differ starkly between native 32-bit and 64-bit
      kernels: on 32-bit kernels it defines the INT 0x80 entry point, while on
      64-bit it's the SYSCALL entry point.
      
      This is pretty confusing when looking at generic code, and it also obscures
      the nature of the entry point at the assembly level.
      
      So unangle this by splitting the name into its two uses:
      
      	system_call (32) -> entry_INT80_32
      	system_call (64) -> entry_SYSCALL_64
      
      As per the generic naming scheme for x86 system call entry points:
      
      	entry_MNEMONIC_qualifier
      
      where 'qualifier' is one of _32, _64 or _compat.
      
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      b2502b41
    • Ingo Molnar's avatar
      x86/asm/entry: Untangle 'ia32_sysenter_target' into two entry points:... · 4c8cd0c5
      Ingo Molnar authored
      
      x86/asm/entry: Untangle 'ia32_sysenter_target' into two entry points: entry_SYSENTER_32 and entry_SYSENTER_compat
      
      So the SYSENTER instruction is pretty quirky and it has different behavior
      depending on bitness and CPU maker.
      
      Yet we create a false sense of coherency by naming it 'ia32_sysenter_target'
      in both of the cases.
      
      Split the name into its two uses:
      
      	ia32_sysenter_target (32)    -> entry_SYSENTER_32
      	ia32_sysenter_target (64)    -> entry_SYSENTER_compat
      
      As per the generic naming scheme for x86 system call entry points:
      
      	entry_MNEMONIC_qualifier
      
      where 'qualifier' is one of _32, _64 or _compat.
      
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      4c8cd0c5
    • Ingo Molnar's avatar
      x86/asm/entry: Rename compat syscall entry points · 2cd23553
      Ingo Molnar authored
      
      
      Rename the following system call entry points:
      
      	ia32_cstar_target       -> entry_SYSCALL_compat
      	ia32_syscall            -> entry_INT80_compat
      
      The generic naming scheme for x86 system call entry points is:
      
      	entry_MNEMONIC_qualifier
      
      where 'qualifier' is one of _32, _64 or _compat.
      
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      2cd23553
  10. Jun 07, 2015
    • Borislav Petkov's avatar
      x86/uapi: Do not export <asm/msr-index.h> as part of the user API headers · b72e7464
      Borislav Petkov authored
      
      
      This header containing all MSRs and respective bit definitions
      got exported to userspace in conjunction with the big UAPI
      shuffle.
      
      But, it doesn't belong in the UAPI headers because userspace can
      do its own MSR defines and exporting them from the kernel blocks
      us from doing cleanups/renames in that header. Which is
      ridiculous - it is not kernel's job to export such a header and
      keep MSRs list and their names stable.
      
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Acked-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1433436928-31903-19-git-send-email-bp@alien8.de
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      b72e7464
    • Ingo Molnar's avatar
      Merge branch 'x86/ras' into x86/core, to fix conflicts · c2f9b0af
      Ingo Molnar authored
      
      
      Conflicts:
      	arch/x86/include/asm/irq_vectors.h
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      c2f9b0af
    • Borislav Petkov's avatar
      x86: Kill CONFIG_X86_HT · c8e56d20
      Borislav Petkov authored
      
      
      In talking to Aravind recently about making certain AMD topology
      attributes available to the MCE injection module, it seemed like
      that CONFIG_X86_HT thing is more or less superfluous. It is
      def_bool y, depends on SMP and gets enabled in the majority of
      .configs - distro and otherwise - out there.
      
      So let's kill it and make code behind it depend directly on SMP.
      
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Daniel Walter <dwalter@google.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Jacob Shin <jacob.w.shin@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1433436928-31903-18-git-send-email-bp@alien8.de
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      c8e56d20
    • Ashok Raj's avatar
      x86/mce: Handle Local MCE events · 243d657e
      Ashok Raj authored
      
      
      Add the necessary changes to do_machine_check() to be able to
      process MCEs signaled as local MCEs. Typically, only recoverable
      errors (SRAR type) will be Signaled as LMCE. The architecture
      does not restrict to only those errors, however.
      
      When errors are signaled as LMCE, there is no need for the MCE
      handler to perform rendezvous with other logical processors
      unlike earlier processors that would broadcast machine check
      errors.
      
      Signed-off-by: default avatarAshok Raj <ashok.raj@intel.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: linux-edac <linux-edac@vger.kernel.org>
      Link: http://lkml.kernel.org/r/1433436928-31903-17-git-send-email-bp@alien8.de
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      243d657e
    • Ashok Raj's avatar
      x86/mce: Add infrastructure to support Local MCE · 88d53867
      Ashok Raj authored
      
      
      Initialize and prepare for handling LMCEs. Add a boot-time
      option to disable LMCEs.
      
      Signed-off-by: default avatarAshok Raj <ashok.raj@intel.com>
      [ Simplify stuff, align statements for better readability, reflow comments; kill
        unused lmce_clear(); save us an MSR write if LMCE is already enabled. ]
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: linux-edac <linux-edac@vger.kernel.org>
      Link: http://lkml.kernel.org/r/1433436928-31903-16-git-send-email-bp@alien8.de
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      88d53867
    • Ashok Raj's avatar
      x86/mce: Add Local MCE definitions · bc12edb8
      Ashok Raj authored
      Add required definitions to support Local Machine Check
      Exceptions.
      
      Historically, machine check exceptions on Intel x86 processors
      have been broadcast to all logical processors in the system.
      Upcoming CPUs will support an opt-in mechanism to request some
      machine check exceptions be delivered to a single logical
      processor experiencing the fault.
      
      See http://www.intel.com/sdm
      
       Volume 3, System Programming Guide,
      chapter 15 for more information on MSRs and documentation on
      Local MCE.
      
      Signed-off-by: default avatarAshok Raj <ashok.raj@intel.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: linux-edac <linux-edac@vger.kernel.org>
      Link: http://lkml.kernel.org/r/1433436928-31903-15-git-send-email-bp@alien8.de
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      bc12edb8
    • Toshi Kani's avatar
      drivers/block/pmem: Map NVDIMM in Write-Through mode · 957561ec
      Toshi Kani authored
      
      
      The pmem driver maps NVDIMM uncacheable so that we don't lose
      data which hasn't reached non-volatile storage in the case of a
      crash. Change this to Write-Through mode which provides uncached
      writes but cached reads, thus improving read performance.
      
      Signed-off-by: default avatarToshi Kani <toshi.kani@hp.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Acked-by: default avatarDan Williams <dan.j.williams@intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Elliott@hp.com
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Luis R. Rodriguez <mcgrof@suse.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: arnd@arndb.de
      Cc: hch@lst.de
      Cc: hmh@hmh.eng.br
      Cc: jgross@suse.com
      Cc: konrad.wilk@oracle.com
      Cc: linux-mm <linux-mm@kvack.org>
      Cc: linux-nvdimm@lists.01.org
      Cc: stefan.bader@canonical.com
      Cc: yigal@plexistor.com
      Link: http://lkml.kernel.org/r/1433436928-31903-14-git-send-email-bp@alien8.de
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      957561ec
    • Toshi Kani's avatar
      x86/mm/pat: Add set_memory_wt() for Write-Through type · 623dffb2
      Toshi Kani authored
      
      
      Now that reserve_ram_pages_type() accepts the WT type, add
      set_memory_wt(), set_memory_array_wt() and set_pages_array_wt()
      in order to be able to set memory to Write-Through page cache
      mode.
      
      Also, extend ioremap_change_attr() to accept the WT type.
      
      Signed-off-by: default avatarToshi Kani <toshi.kani@hp.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Elliott@hp.com
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Luis R. Rodriguez <mcgrof@suse.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: arnd@arndb.de
      Cc: hch@lst.de
      Cc: hmh@hmh.eng.br
      Cc: jgross@suse.com
      Cc: konrad.wilk@oracle.com
      Cc: linux-mm <linux-mm@kvack.org>
      Cc: linux-nvdimm@lists.01.org
      Cc: stefan.bader@canonical.com
      Cc: yigal@plexistor.com
      Link: http://lkml.kernel.org/r/1433436928-31903-13-git-send-email-bp@alien8.de
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      623dffb2
    • Toshi Kani's avatar
      x86/mm/pat: Extend set_page_memtype() to support Write-Through type · 35a5a104
      Toshi Kani authored
      
      
      As set_memory_wb() calls free_ram_pages_type(), which then calls
      set_page_memtype() with -1, _PGMT_DEFAULT is used for tracking
      the WB type. _PGMT_WB is defined but unused. Thus, rename
      _PGMT_DEFAULT to _PGMT_WB to clarify the usage, and release the
      slot used by _PGMT_WB.
      
      Furthermore, change free_ram_pages_type() to call
      set_page_memtype() with _PGMT_WB, and get_page_memtype() to
      return _PAGE_CACHE_MODE_WB for _PGMT_WB.
      
      Then, define _PGMT_WT in the freed slot. This allows
      set_page_memtype() to track the WT type.
      
      Signed-off-by: default avatarToshi Kani <toshi.kani@hp.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Elliott@hp.com
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Luis R. Rodriguez <mcgrof@suse.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: arnd@arndb.de
      Cc: hch@lst.de
      Cc: hmh@hmh.eng.br
      Cc: jgross@suse.com
      Cc: konrad.wilk@oracle.com
      Cc: linux-mm <linux-mm@kvack.org>
      Cc: linux-nvdimm@lists.01.org
      Cc: stefan.bader@canonical.com
      Cc: yigal@plexistor.com
      Link: http://lkml.kernel.org/r/1433436928-31903-12-git-send-email-bp@alien8.de
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      35a5a104