1. 19 4月, 2012 1 次提交
    • A
      KVM: VMX: Fix kvm_set_shared_msr() called in preemptible context · 2225fd56
      Avi Kivity 提交于
      kvm_set_shared_msr() may not be called in preemptible context,
      but vmx_set_msr() does so:
      
        BUG: using smp_processor_id() in preemptible [00000000] code: qemu-kvm/22713
        caller is kvm_set_shared_msr+0x32/0xa0 [kvm]
        Pid: 22713, comm: qemu-kvm Not tainted 3.4.0-rc3+ #39
        Call Trace:
         [<ffffffff8131fa82>] debug_smp_processor_id+0xe2/0x100
         [<ffffffffa0328ae2>] kvm_set_shared_msr+0x32/0xa0 [kvm]
         [<ffffffffa03a103b>] vmx_set_msr+0x28b/0x2d0 [kvm_intel]
         ...
      
      Making kvm_set_shared_msr() work in preemptible is cleaner, but
      it's used in the fast path.  Making two variants is overkill, so
      this patch just disables preemption around the call.
      Reported-by: NDave Jones <davej@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      2225fd56
  2. 17 4月, 2012 3 次提交
  3. 16 4月, 2012 8 次提交
  4. 15 4月, 2012 2 次提交
  5. 14 4月, 2012 12 次提交
  6. 13 4月, 2012 4 次提交
  7. 12 4月, 2012 3 次提交
    • G
      irq_domain: Move irq_virq_count into NOMAP revmap · 6fa6c8e2
      Grant Likely 提交于
      This patch replaces the old global setting of irq_virq_count that is only
      used by the NOMAP mapping and instead uses a revmap_data property so that
      the maximum NOMAP allocation can be set per NOMAP irq_domain.
      
      There is exactly one user of irq_virq_count in-tree right now: PS3.
      Also, irq_virq_count is only useful for the NOMAP mapping.  So,
      instead of having a single global irq_virq_count values, this change
      drops it entirely and added a max_irq argument to irq_domain_add_nomap().
      That makes it a property of an individual nomap irq domain instead of
      a global system settting.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Tested-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Milton Miller <miltonm@bga.com>
      6fa6c8e2
    • C
      arch/tile: avoid unused variable warning in proc.c for tilegx · e72d5c7e
      Chris Metcalf 提交于
      Until we push the unaligned access support for tilegx, it's silly
      to have arch/tile/kernel/proc.c generate a warning about an unused
      variable.  Extend the #ifdef to cover all the code and data for now.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      e72d5c7e
    • L
      x86: merge 32/64-bit versions of 'strncpy_from_user()' and speed it up · 92ae03f2
      Linus Torvalds 提交于
      This merges the 32- and 64-bit versions of the x86 strncpy_from_user()
      by just rewriting it in C rather than the ancient inline asm versions
      that used lodsb/stosb and had been duplicated for (trivial) differences
      between the 32-bit and 64-bit versions.
      
      While doing that, it also speeds them up by doing the accesses a word at
      a time.  Finally, the new routines also properly handle the case of
      hitting the end of the address space, which we have never done correctly
      before (fs/namei.c has a hack around it for that reason).
      
      Despite all these improvements, it actually removes more lines than it
      adds, due to the de-duplication.  Also, we no longer export (or define)
      the legacy __strncpy_from_user() function (that was defined to not do
      the user permission checks), since it's not actually used anywhere, and
      the user address space checks are built in to the new code.
      
      Other architecture maintainers have been notified that the old hack in
      fs/namei.c will be going away in the 3.5 merge window, in case they
      copied the x86 approach of being a bit cavalier about the end of the
      address space.
      
      Cc: linux-arch@vger.kernel.org
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Peter Anvin" <hpa@zytor.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      92ae03f2
  8. 11 4月, 2012 7 次提交
    • M
      [S390] Fix compile error in swab.h · affbb420
      Martin Schwidefsky 提交于
      The inline assembly in__arch_swab16p causes compile errors of the form:
      
      *error*: *invalid* '*asm*': operand number missing after %-*letter*
      
      The assembly uses the %O<n>/%R<n> notation but the first operand misses
      the operand number, it needs to be "%O1" instead of "%O".
      Reported-by: NGil Peleg <gilpeleg@servframe.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      affbb420
    • M
      [S390] Fix stfle() lowcore protection problem · 37e37c20
      Michael Holzheu 提交于
      The stfle() function writes into lowcore memory when stfl_fac_list
      is initialized with "S390_lowcore.stfl_fac_list = 0". For older
      compilers this triggers a lowcore exception. With newer compilers
      and "-OXX" compile option the bug does not show up because
      the "S390_lowcore.stfl_fac_list" initialization is removed by the
      compiler. The reason for thatis the incorrect "=m"
      (S390_lowcore.stfl_fac_list) constraint in the stfl inline assembly.
      
      The following shows the disassembly of the stfle() optimized code
      that is inlined in the lgr_info_get() function:
      
      000000000011325c <lgr_info_get>:
        11325c:       eb 9f f0 60 00 24       stmg    %r9,%r15,96(%r15)
        113262:       c0 d0 00 29 0e 47       larl    %r13,634ef0 <servi..>
        113268:       a7 f1 3f c0             tml     %r15,16320
        11326c:       b9 04 00 ef             lgr     %r14,%r15
        113270:       a7 84 00 01             je      113272 <lgr_info_g..>
        113274:       a7 fb ff c0             aghi    %r15,-64
        113278:       b9 04 00 c2             lgr     %r12,%r2
        11327c:       a7 29 00 01             lghi    %r2,1
        113280:       e3 e0 f0 98 00 24       stg     %r14,152(%r15)
        113286:       d7 97 c0 00 c0 00       xc      0(152,%r12),0(%r12)
        11328c:       c0 e5 00 28 db 4c       brasl   %r14,62e924 <add_e..>
        113292:       b2 b1 00 00             stfl    0
      
      To fix the problem we now clear the S390_lowcore.stfl_fac_list at
      startup in "head.S" for all machine types before lowcore protection
      is enabled.
      
      In addition to that the "=m" constraint is replaced by "+m".
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      37e37c20
    • H
      [S390] cpum_cf: get rid of compile warnings · af0ee94e
      Heiko Carstens 提交于
      Fix these:
      
      arch/s390/kernel/perf_cpum_cf.c:180:3: warning: format '%lx'
         expects argument of type 'long unsigned int',
         but argument 2 has type 'int' [-Wformat]
      arch/s390/kernel/perf_cpum_cf.c: In function 'cpumf_pmu_disable':
      arch/s390/kernel/perf_cpum_cf.c:205:3: warning: format '%lx'
         expects argument of type 'long unsigned int',
         but argument 2 has type 'int' [-Wformat]
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      af0ee94e
    • H
      [S390] irq: simple coding style change · 7968ca81
      Heiko Carstens 提交于
      Use braces for if/else/list_for_each_entry bodies if the body consists
      of more than a single line. Otherwise I get confused and check if there
      is something broken whenever I see these code snippets.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      7968ca81
    • M
      [S390] update default configuration · ac2ac6e8
      Michael Holzheu 提交于
      Add TASKSTATS options, enable CRASH_DUMP, and regenerate defconfig
      file with "make savedefconfig".
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      ac2ac6e8
    • M
      [S390] fix tlb flushing for page table pages · cd94154c
      Martin Schwidefsky 提交于
      Git commit 36409f63 "use generic RCU
      page-table freeing code" introduced a tlb flushing bug. Partially revert
      the above git commit and go back to s390 specific page table flush code.
      
      For s390 the TLB can contain three types of entries, "normal" TLB
      page-table entries, TLB combined region-and-segment-table (CRST) entries
      and real-space entries. Linux does not use real-space entries which
      leaves normal TLB entries and CRST entries. The CRST entries are
      intermediate steps in the page-table translation called translation paths.
      For example a 4K page access in a three-level page table setup will
      create two CRST TLB entries and one page-table TLB entry. The advantage
      of that approach is that a page access next to the previous one can reuse
      the CRST entries and needs just a single read from memory to create the
      page-table TLB entry. The disadvantage is that the TLB flushing rules are
      more complicated, before any page-table may be freed the TLB needs to be
      flushed.
      
      In short: the generic RCU page-table freeing code is incorrect for the
      CRST entries, in particular the check for mm_users < 2 is troublesome.
      
      This is applicable to 3.0+ kernels.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      cd94154c
    • M
      [S390] kernel: Use local_irq_save() for memcpy_real() · b785e0d0
      Michael Holzheu 提交于
      Currently in the memcpy_real() function interrupts are disabled with
      __arch_local_irq_stnsm(). In order to notify lockdep that interrupts
      are disabled, with this patch local_irq_save() is used instead. The
      function __arch_local_irq_stnsm() is still used for switching to
      real mode.
      Reviewed-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      b785e0d0