1. 20 7月, 2012 8 次提交
  2. 17 6月, 2012 1 次提交
  3. 15 6月, 2012 2 次提交
    • P
      Make hard_irq_disable() actually hard-disable interrupts · f948501b
      Paul Mackerras 提交于
      At present, hard_irq_disable() does nothing on powerpc because of
      this code in include/linux/interrupt.h:
      
          #ifndef hard_irq_disable
          #define hard_irq_disable()      do { } while(0)
          #endif
      
      So we need to make our hard_irq_disable be a macro.  It was previously
      a macro until commit 7230c564 ("powerpc: Rework lazy-interrupt
      handling") changed it to a static inline function.
      
      Cc: stable@vger.kernel.org
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      --
       arch/powerpc/include/asm/hw_irq.h |    3 +++
       1 file changed, 3 insertions(+)
      f948501b
    • S
      xen: mark local pages as FOREIGN in the m2p_override · b9e0d95c
      Stefano Stabellini 提交于
      When the frontend and the backend reside on the same domain, even if we
      add pages to the m2p_override, these pages will never be returned by
      mfn_to_pfn because the check "get_phys_to_machine(pfn) != mfn" will
      always fail, so the pfn of the frontend will be returned instead
      (resulting in a deadlock because the frontend pages are already locked).
      
      INFO: task qemu-system-i38:1085 blocked for more than 120 seconds.
      "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
      qemu-system-i38 D ffff8800cfc137c0     0  1085      1 0x00000000
       ffff8800c47ed898 0000000000000282 ffff8800be4596b0 00000000000137c0
       ffff8800c47edfd8 ffff8800c47ec010 00000000000137c0 00000000000137c0
       ffff8800c47edfd8 00000000000137c0 ffffffff82213020 ffff8800be4596b0
      Call Trace:
       [<ffffffff81101ee0>] ? __lock_page+0x70/0x70
       [<ffffffff81a0fdd9>] schedule+0x29/0x70
       [<ffffffff81a0fe80>] io_schedule+0x60/0x80
       [<ffffffff81101eee>] sleep_on_page+0xe/0x20
       [<ffffffff81a0e1ca>] __wait_on_bit_lock+0x5a/0xc0
       [<ffffffff81101ed7>] __lock_page+0x67/0x70
       [<ffffffff8106f750>] ? autoremove_wake_function+0x40/0x40
       [<ffffffff811867e6>] ? bio_add_page+0x36/0x40
       [<ffffffff8110b692>] set_page_dirty_lock+0x52/0x60
       [<ffffffff81186021>] bio_set_pages_dirty+0x51/0x70
       [<ffffffff8118c6b4>] do_blockdev_direct_IO+0xb24/0xeb0
       [<ffffffff811e71a0>] ? ext3_get_blocks_handle+0xe00/0xe00
       [<ffffffff8118ca95>] __blockdev_direct_IO+0x55/0x60
       [<ffffffff811e71a0>] ? ext3_get_blocks_handle+0xe00/0xe00
       [<ffffffff811e91c8>] ext3_direct_IO+0xf8/0x390
       [<ffffffff811e71a0>] ? ext3_get_blocks_handle+0xe00/0xe00
       [<ffffffff81004b60>] ? xen_mc_flush+0xb0/0x1b0
       [<ffffffff81104027>] generic_file_aio_read+0x737/0x780
       [<ffffffff813bedeb>] ? gnttab_map_refs+0x15b/0x1e0
       [<ffffffff811038f0>] ? find_get_pages+0x150/0x150
       [<ffffffff8119736c>] aio_rw_vect_retry+0x7c/0x1d0
       [<ffffffff811972f0>] ? lookup_ioctx+0x90/0x90
       [<ffffffff81198856>] aio_run_iocb+0x66/0x1a0
       [<ffffffff811998b8>] do_io_submit+0x708/0xb90
       [<ffffffff81199d50>] sys_io_submit+0x10/0x20
       [<ffffffff81a18d69>] system_call_fastpath+0x16/0x1b
      
      The explanation is in the comment within the code:
      
      We need to do this because the pages shared by the frontend
      (xen-blkfront) can be already locked (lock_page, called by
      do_read_cache_page); when the userspace backend tries to use them
      with direct_IO, mfn_to_pfn returns the pfn of the frontend, so
      do_blockdev_direct_IO is going to try to lock the same pages
      again resulting in a deadlock.
      
      A simplified call graph looks like this:
      
      pygrub                          QEMU
      -----------------------------------------------
      do_read_cache_page              io_submit
        |                              |
      lock_page                       ext3_direct_IO
                                       |
                                      bio_add_page
                                       |
                                      lock_page
      
      Internally the xen-blkback uses m2p_add_override to swizzle (temporarily)
      a 'struct page' to have a different MFN (so that it can point to another
      guest). It also can easily find out whether another pfn corresponding
      to the mfn exists in the m2p, and can set the FOREIGN bit
      in the p2m, making sure that mfn_to_pfn returns the pfn of the backend.
      
      This allows the backend to perform direct_IO on these pages, but as a
      side effect prevents the frontend from using get_user_pages_fast on
      them while they are being shared with the backend.
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      b9e0d95c
  4. 14 6月, 2012 1 次提交
  5. 13 6月, 2012 9 次提交
    • S
      perf/x86: Fix broken LBR fixup code · 25f42985
      Stephane Eranian 提交于
      I noticed that the LBR fixups were not working anymore
      on programs where they used to. I tracked this down to
      a recent change to copy_from_user_nmi():
      
       db0dc75d ("perf/x86: Check user address explicitly in copy_from_user_nmi()")
      
      This commit added a call to __range_not_ok() to the
      copy_from_user_nmi() routine. The problem is that the logic
      of the test must be reversed. __range_not_ok() returns 0 if the
      range is VALID. We want to return early from copy_from_user_nmi()
      if the range is NOT valid.
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NArun Sharma <asharma@fb.com>
      Link: http://lkml.kernel.org/r/20120611134426.GA7542@quadSigned-off-by: NIngo Molnar <mingo@kernel.org>
      25f42985
    • B
      x86/smp: Fix topology checks on AMD MCM CPUs · 161270fc
      Borislav Petkov 提交于
      The warning below triggers on AMD MCM packages because physical package
      IDs on the cores of a _physical_ socket are the same. I.e., this field
      says which CPUs belong to the same physical package.
      
      However, the same two CPUs belong to two different internal, i.e.
      "logical" nodes in the same physical socket which is reflected in the
      CPU-to-node map on x86 with NUMA.
      
      Which makes this check wrong on the above topologies so circumvent it.
      
      [    0.444413] Booting Node   0, Processors  #1 #2 #3 #4 #5 Ok.
      [    0.461388] ------------[ cut here ]------------
      [    0.465997] WARNING: at arch/x86/kernel/smpboot.c:310 topology_sane.clone.1+0x6e/0x81()
      [    0.473960] Hardware name: Dinar
      [    0.477170] sched: CPU #6's mc-sibling CPU #0 is not on the same node! [node: 1 != 0]. Ignoring dependency.
      [    0.486860] Booting Node   1, Processors  #6
      [    0.491104] Modules linked in:
      [    0.494141] Pid: 0, comm: swapper/6 Not tainted 3.4.0+ #1
      [    0.499510] Call Trace:
      [    0.501946]  [<ffffffff8144bf92>] ? topology_sane.clone.1+0x6e/0x81
      [    0.508185]  [<ffffffff8102f1fc>] warn_slowpath_common+0x85/0x9d
      [    0.514163]  [<ffffffff8102f2b7>] warn_slowpath_fmt+0x46/0x48
      [    0.519881]  [<ffffffff8144bf92>] topology_sane.clone.1+0x6e/0x81
      [    0.525943]  [<ffffffff8144c234>] set_cpu_sibling_map+0x251/0x371
      [    0.532004]  [<ffffffff8144c4ee>] start_secondary+0x19a/0x218
      [    0.537729] ---[ end trace 4eaa2a86a8e2da22 ]---
      [    0.628197]  #7 #8 #9 #10 #11 Ok.
      [    0.807108] Booting Node   3, Processors  #12 #13 #14 #15 #16 #17 Ok.
      [    0.897587] Booting Node   2, Processors  #18 #19 #20 #21 #22 #23 Ok.
      [    0.917443] Brought up 24 CPUs
      
      We ran a topology sanity check test we have here on it and
      it all looks ok... hopefully :).
      Signed-off-by: NBorislav Petkov <borislav.petkov@amd.com>
      Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20120529135442.GE29157@aftab.osrc.amd.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      161270fc
    • M
      ARM: dma-mapping: fix debug messages in dmabounce code · fdb11173
      Marek Szyprowski 提交于
      This patch fixes the usage of uninitialized variables in dmabounce code
      intoduced by commit a227fb92 ('ARM: dma-mapping: remove offset parameter
      to prepare for generic dma_ops'):
      arch/arm/common/dmabounce.c: In function ‘dmabounce_sync_for_device’:
      arch/arm/common/dmabounce.c:409: warning: ‘off’ may be used uninitialized in this function
      arch/arm/common/dmabounce.c:407: note: ‘off’ was declared here
      arch/arm/common/dmabounce.c: In function ‘dmabounce_sync_for_cpu’:
      arch/arm/common/dmabounce.c:369: warning: ‘off’ may be used uninitialized in this function
      arch/arm/common/dmabounce.c:367: note: ‘off’ was declared here
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      fdb11173
    • P
      sh: Kill off additional asm-generic wrappers. · 1318002a
      Paul Mundt 提交于
      A few wrappers were overlooked in the initial conversion, take care of
      them now.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      1318002a
    • G
      sh: Setup CROSS_COMPILE at the top · d14a5fdc
      Geert Uytterhoeven 提交于
      CROSS_COMPILE must be setup before using e.g. cc-option (and a few other
      as-*, cc-*, ld-* macros), else they will check against the wrong compiler
      when cross-compiling, and may invoke the cross compiler with wrong or
      suboptimal compiler options.
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: linux-sh@vger.kernel.org
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      d14a5fdc
    • P
      sh: Fix up link time defsym warnings. · 8e780be9
      Paul Mundt 提交于
      sh-linux-gnu-ld:--defsym 'jiffies=jiffies_64': ignoring invalid character `'' in expression
      
      For some reason ld has recently started complaining about the quotes, so just
      get rid of them, we don't need them for anything anyways.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      8e780be9
    • P
      sh: use the new generic strnlen_user() function · cba8df4b
      Paul Mundt 提交于
      This discards both the _32 and _64 versions in favour of the consolidated
      generic one.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      cba8df4b
    • P
      sh: switch to generic strncpy_from_user(). · 0e100e11
      Paul Mundt 提交于
      This kills off the special sh32/64 versions and adopts the generic
      version. It should be possible to optimize this for SH-4A unaligned
      loads, but this is a corner case that can be supported incrementally.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      0e100e11
    • P
      sh: Kill off last dead UBC header · 74ca4313
      Paul Bolle 提交于
      Commit 7025bec9 ("sh: Kill off dead UBC
      headers.") skipped arch/sh/include/cpu-sh2a/cpu/ubc.h. Since nothing is
      using that header either, kill it off too.
      Signed-off-by: NPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      74ca4313
  6. 12 6月, 2012 7 次提交
    • M
      x86: kvmclock: remove check_and_clear_guest_paused warning · e32025a5
      Marcelo Tosatti 提交于
      CPU offline path calls the hrtimer interrupt handler with interrupts
      disabled, without touching preempt_count, triggering this warning.
      
      Remove the warning since it is supposed to be used from hrtimer
      interrupt context only.
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      e32025a5
    • G
      m68k: make syscall_trace_enter/leave exist for non-MMU classic m68k types · 70c778f7
      Greg Ungerer 提交于
      The assembler entry code calls directly to the syscall_trace_enter() and
      syscall_trace_leave() functions. But currently they are conditionaly
      compiled out for the non-MMU classic m68k CPU types (so 68328 for example),
      resulting in a link error:
      
            LD      vmlinux
          arch/m68k/platform/68328/built-in.o: In function `do_trace':
          (.text+0x1c): undefined reference to `syscall_trace_enter'
          arch/m68k/platform/68328/built-in.o: In function `do_trace':
          (.text+0x4c): undefined reference to `syscall_trace_leave'
      
      Change the conditional check that includes these functions to be true for
      the !defined(CONFIG_MMU) case as well.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      70c778f7
    • G
      m68knommu: fix 68360 local setting of timer interrupt handler · 1b461d76
      Greg Ungerer 提交于
      Compiling for 68360 based targets fails with:
      
          arch/m68k/platform/68360/config.c: In function ‘hw_tick’:
          arch/m68k/platform/68360/config.c:55:2: error: implicit declaration of function ‘arch_timer_interrupt’
          arch/m68k/platform/68360/config.c: At top level:
          arch/m68k/platform/68360/config.c:64:6: error: conflicting types for ‘hw_timer_init’
          arch/m68k/include/asm/machdep.h:36:13: note: previous declaration of ‘hw_timer_init’ was here
      
      Changes made to hw_timer_init() didn't get updated in the 68328 timer code.
      So process and call the "handler" arg that is now passed into that
      hw_timer_init() function.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      1b461d76
    • G
      m68knommu: fix 68328 local setting of timer interrupt handler · dc5588ae
      Greg Ungerer 提交于
      Compiling for 68328 based targets fails with:
      
          arch/m68k/platform/68328/timers.c: In function ‘hw_tick’:
          arch/m68k/platform/68328/timers.c:65:2: error: implicit declaration of function ‘arch_timer_interrupt’
          arch/m68k/platform/68328/timers.c: At top level:
          arch/m68k/platform/68328/timers.c:102:6: error: conflicting types for ‘hw_timer_init’
          arch/m68k/include/asm/machdep.h:36:13: note: previous declaration of ‘hw_timer_init’ was here
      
      Changes made to hw_timer_init() didn't get updated in the 68328 timer code.
      So process and call the "handler" arg that is now passed into that
      hw_timer_init() function.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      dc5588ae
    • G
      m68k: fix inclusion of arch_gettimeoffset for non-MMU 68k classic CPU types · b13b3f51
      Greg Ungerer 提交于
      When building for non-MMU based classic 68k CPU types (like the 68328 for
      example) you get a compilation error:
      
        CC      arch/m68k/kernel/time.o
      arch/m68k/kernel/time.c:91:5: error: redefinition of ‘arch_gettimeoffset’
      include/linux/time.h:145:19: note: previous definition of ‘arch_gettimeoffset’ was here
      
      The arch_gettimeoffset() code is included when building for these CPU types,
      but it shouldn't be. Those machine types do not have
      CONFIG_ARCH_USES_GETTIMEOFFSET set.
      
      The fix is simply to conditionally include the arch_gettimeoffset() code on
      that same config setting that specifies its use or not.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      b13b3f51
    • S
      m68knommu: m528x qspi definition fix · f75b0d07
      Steven King 提交于
      The consolidation of the qspi code missed a definition for 528x.
      Signed-off-by: NSteven King <sfking@fdwdc.com>
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      f75b0d07
    • P
      sparc: remove two unused headers · 8a51178e
      Paul Bolle 提交于
      Nothing includes these two headers. None of the macros they define are
      used anywhere in the tree. This was also the case in v2.6.12-rc2 and,
      presumably, every release in between. These two headers can safely be
      removed.
      Signed-off-by: NPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8a51178e
  7. 11 6月, 2012 3 次提交
  8. 10 6月, 2012 1 次提交
  9. 08 6月, 2012 6 次提交
  10. 06 6月, 2012 2 次提交