1. 29 Jun, 2012 6 commits
    • Anton Blanchard's avatar
      powerpc: check_and_cede_processor() never cedes · 0b17ba72
      Anton Blanchard authored
      Commit f948501b ("Make hard_irq_disable() actually hard-disable
      interrupts") caused check_and_cede_processor to stop working.
      ->irq_happened will never be zero right after a hard_irq_disable
      so the compiler removes the call to cede_processor completely.
      
      The bug was introduced back in the lazy interrupt handling rework
      of 3.4 but was hidden until recently because hard_irq_disable did
      nothing.
      
      This issue will eventually appear in 3.4 stable since the
      hard_irq_disable fix is marked stable, so mark this one for stable
      too.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      0b17ba72
    • Steven Rostedt's avatar
      powerpc/ftrace: Do not trace restore_interrupts() · 2d773aa4
      Steven Rostedt authored
      As I was adding code that affects all archs, I started testing function
      tracer against PPC64 and found that it currently locks up with 3.4
      kernel. I figured it was due to tracing a function that shouldn't be, so
      I went through the following process to bisect to find the culprit:
      
       cat /debug/tracing/available_filter_functions > t
       num=`wc -l t`
       sed -ne "1,${num}p" t > t1
       let num=num+1
       sed -ne "${num},$p" t > t2
       cat t1 > /debug/tracing/set_ftrace_filter
       echo function /debug/tracing/current_tracer
       <failed? bisect t1, if not bisect t2>
      
      It finally came down to this function: restore_interrupts()
      
      I'm not sure why this locks up the system. It just seems to prevent
      scheduling from occurring. Interrupts seem to still work, as I can ping
      the box. But all user processes freeze.
      
      When restore_interrupts() is not traced, function tracing works fine.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      2d773aa4
    • Li Zhong's avatar
      powerpc: Fix Section mismatch warnings in prom_init.c · 2cb387ae
      Li Zhong authored
      This patches tries to fix a couple of Section mismatch warnings like
      following one:
      
      WARNING: arch/powerpc/kernel/built-in.o(.text+0x2923c): Section mismatch
      in reference from the function .prom_query_opal() to the
      function .init.text:.call_prom()
      The function .prom_query_opal() references
      the function __init .call_prom().
      This is often because .prom_query_opal lacks a __init
      annotation or the annotation of .call_prom is wrong.
      Signed-off-by: default avatarLi Zhong <zhong@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      2cb387ae
    • Tiejun Chen's avatar
      ppc64: fix missing to check all bits of _TIF_USER_WORK_MASK in preempt · c58ce2b1
      Tiejun Chen authored
      In entry_64.S version of ret_from_except_lite, you'll notice that
      in the !preempt case, after we've checked MSR_PR we test for any
      TIF flag in _TIF_USER_WORK_MASK to decide whether to go to do_work
      or not. However, in the preempt case, we do a convoluted trick to
      test SIGPENDING only if PR was set and always test NEED_RESCHED ...
      but we forget to test any other bit of _TIF_USER_WORK_MASK !!! So
      that means that with preempt, we completely fail to test for things
      like single step, syscall tracing, etc...
      
      This should be fixed as the following path:
      
       - Test PR. If not set, go to resume_kernel, else continue.
      
       - If go resume_kernel, to do that original do_work.
      
       - If else, then always test for _TIF_USER_WORK_MASK to decide to do
      that original user_work, else restore directly.
      Signed-off-by: default avatarTiejun Chen <tiejun.chen@windriver.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      c58ce2b1
    • Michael Neuling's avatar
      powerpc: Fix uninitialised error in numa.c · 82b2521d
      Michael Neuling authored
      chroma_defconfig currently gives me this with gcc 4.6:
        arch/powerpc/mm/numa.c:638:13: error: 'dm' may be used uninitialized in this function [-Werror=uninitialized]
      
      It's a bogus warning/error since of_get_drconf_memory() only writes it
      anyway.
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      cc: <stable@kernel.org> [v3.3+]
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      82b2521d
    • Michael Ellerman's avatar
      powerpc: Fix BPF_JIT code to link with multiple TOCs · 7784655a
      Michael Ellerman authored
      If the kernel is big enough (eg. allyesconfig), the linker may need to
      switch TOCs when calling from the BPF JIT code out to the external
      helpers (skb_copy_bits() & bpf_internal_load_pointer_neg_helper()).
      
      In order to do that we need to leave space after the bl for the linker
      to insert a reload of our TOC pointer.
      Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
      Acked-by: default avatarMatt Evans <matt@ozlabs.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      7784655a
  2. 28 Jun, 2012 16 commits
  3. 27 Jun, 2012 17 commits
  4. 26 Jun, 2012 1 commit