1. 06 7月, 2015 8 次提交
    • A
      x86/asm/tsc, x86/paravirt: Remove read_tsc() and read_tscp() paravirt hooks · 9261e050
      Andy Lutomirski 提交于
      We've had ->read_tsc() and ->read_tscp() paravirt hooks since
      the very beginning of paravirt, i.e.,
      
        d3561b7f ("[PATCH] paravirt: header and stubs for paravirtualisation").
      
      AFAICT, the only paravirt guest implementation that ever
      replaced these calls was vmware, and it's gone. Arguably even
      vmware shouldn't have hooked RDTSC -- we fully support systems
      that don't have a TSC at all, so there's no point for a paravirt
      implementation to pretend that we have a TSC but to replace it.
      
      I also doubt that these hooks actually worked. Calls to rdtscl()
      and rdtscll(), which respected the hooks, were used seemingly
      interchangeably with native_read_tsc(), which did not.
      
      Just remove them. If anyone ever needs them again, they can try
      to make a case for why they need them.
      
      Before, on a paravirt config:
        text    	data     bss     dec     hex filename
        12618257      1816384 1093632 15528273 ecf151 vmlinux
      
      After:
        text		data     bss     dec     hex filename
        12617207      1816384 1093632 15527223 eced37 vmlinux
      Signed-off-by: NAndy Lutomirski <luto@kernel.org>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      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: Huang Rui <ray.huang@amd.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: kvm ML <kvm@vger.kernel.org>
      Cc: virtualization@lists.linux-foundation.org
      Link: http://lkml.kernel.org/r/d08a2600fb298af163681e5efd8e599d889a5b97.1434501121.git.luto@kernel.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      9261e050
    • A
      x86/asm/tsc, kvm: Remove vget_cycles() · 881d7bf8
      Andy Lutomirski 提交于
      The only caller was KVM's read_tsc(). The only difference
      between vget_cycles() and native_read_tsc() was that
      vget_cycles() returned zero instead of crashing on TSC-less
      systems. KVM already checks vclock_mode() before calling that
      function, so the extra check is unnecessary. Also, KVM
      (host-side) requires the TSC to exist.
      Signed-off-by: NAndy Lutomirski <luto@kernel.org>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
      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: Huang Rui <ray.huang@amd.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: kvm ML <kvm@vger.kernel.org>
      Link: http://lkml.kernel.org/r/20615df14ae2eb713ea7a5f5123c1dc4c7ca993d.1434501121.git.luto@kernel.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      881d7bf8
    • A
      x86/asm/tsc: Inline native_read_tsc() and remove __native_read_tsc() · c6e5ca35
      Andy Lutomirski 提交于
      In the following commit:
      
        cdc7957d ("x86: move native_read_tsc() offline")
      
      ... native_read_tsc() was moved out of line, presumably for some
      now-obsolete vDSO-related reason. Undo it.
      
      The entire rdtsc, shl, or sequence is only 11 bytes, and calls
      via rdtscl() and similar helpers were already inlined.
      Signed-off-by: NAndy Lutomirski <luto@kernel.org>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      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: Huang Rui <ray.huang@amd.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: kvm ML <kvm@vger.kernel.org>
      Link: http://lkml.kernel.org/r/d05ffe2aaf8468ca475ebc00efad7b2fa174af19.1434501121.git.luto@kernel.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      c6e5ca35
    • D
      x86/asm/entry/32: Replace RESTORE_RSI_RDI with open-coded 32-bit reads · c73e36b7
      Denys Vlasenko 提交于
      This doesn't change much, but uses shorter 32-bit insns:
      
              -48 8b 74 24 68         mov    0x68(%rsp),%rsi
              -48 8b 7c 24 70         mov    0x70(%rsp),%rdi
              -48 8b 54 24 60         mov    0x60(%rsp),%rdx
              +8b 54 24 60            mov    0x60(%rsp),%edx
              +8b 74 24 68            mov    0x68(%rsp),%esi
              +8b 7c 24 70            mov    0x70(%rsp),%edi
      
      and does the loads in pt_regs order.
      
      Since these are the only uses of RESTORE_RSI_RDI[_RDX], drop
      these macros.
      Signed-off-by: NDenys Vlasenko <dvlasenk@redhat.com>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      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/1435954742-2545-1-git-send-email-dvlasenk@redhat.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      c73e36b7
    • L
      Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 1c4c7159
      Linus Torvalds 提交于
      Pull ext4 bugfixes from Ted Ts'o:
       "Bug fixes (all for stable kernels) for ext4:
      
         - address corner cases for indirect blocks->extent migration
      
         - fix reserved block accounting invalidate_page when
           page_size != block_size (i.e., ppc or 1k block size file systems)
      
         - fix deadlocks when a memcg is under heavy memory pressure
      
         - fix fencepost error in lazytime optimization"
      
      * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: replace open coded nofail allocation in ext4_free_blocks()
        ext4: correctly migrate a file with a hole at the beginning
        ext4: be more strict when migrating to non-extent based file
        ext4: fix reservation release on invalidatepage for delalloc fs
        ext4: avoid deadlocks in the writeback path by using sb_getblk_gfp
        bufferhead: Add _gfp version for sb_getblk()
        ext4: fix fencepost error in lazytime optimization
      1c4c7159
    • L
      Linux 4.2-rc1 · d770e558
      Linus Torvalds 提交于
      d770e558
    • L
      Merge tag 'platform-drivers-x86-v4.2-2' of... · a585d2b7
      Linus Torvalds 提交于
      Merge tag 'platform-drivers-x86-v4.2-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86
      
      Pull late x86 platform driver updates from Darren Hart:
       "The following came in a bit later and I wanted them to bake in next a
        few more days before submitting, thus the second pull.
      
        A new intel_pmc_ipc driver, a symmetrical allocation and free fix in
        dell-laptop, a couple minor fixes, and some updated documentation in
        the dell-laptop comments.
      
        intel_pmc_ipc:
         - Add Intel Apollo Lake PMC IPC driver
      
        tc1100-wmi:
         - Delete an unnecessary check before the function call "kfree"
      
        dell-laptop:
         - Fix allocating & freeing SMI buffer page
         - Show info about WiGig and UWB in debugfs
         - Update information about wireless control"
      
      * tag 'platform-drivers-x86-v4.2-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86:
        intel_pmc_ipc: Add Intel Apollo Lake PMC IPC driver
        tc1100-wmi: Delete an unnecessary check before the function call "kfree"
        dell-laptop: Fix allocating & freeing SMI buffer page
        dell-laptop: Show info about WiGig and UWB in debugfs
        dell-laptop: Update information about wireless control
      a585d2b7
    • M
      ext4: replace open coded nofail allocation in ext4_free_blocks() · 7444a072
      Michal Hocko 提交于
      ext4_free_blocks is looping around the allocation request and mimics
      __GFP_NOFAIL behavior without any allocation fallback strategy. Let's
      remove the open coded loop and replace it with __GFP_NOFAIL. Without the
      flag the allocator has no way to find out never-fail requirement and
      cannot help in any way.
      Signed-off-by: NMichal Hocko <mhocko@suse.cz>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      7444a072
  2. 05 7月, 2015 32 次提交