<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch/powerpc, branch v3.4.6</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/arch/powerpc?h=v3.4.6</id>
<link rel='self' href='https://git.amat.us/linux/atom/arch/powerpc?h=v3.4.6'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-07-16T16:03:49Z</updated>
<entry>
<title>powerpc: Fix build of some debug irq code</title>
<updated>2012-07-16T16:03:49Z</updated>
<author>
<name>Benjamin Herrenschmidt</name>
<email>benh@kernel.crashing.org</email>
</author>
<published>2012-07-10T08:37:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dd3ce2fa647d42d524392d5e6a0647061fc64c67'/>
<id>urn:sha1:dd3ce2fa647d42d524392d5e6a0647061fc64c67</id>
<content type='text'>
commit 21b2de341270bd7bb7a811027ffe63276d9b3b75 upstream.

There was a typo, checking for CONFIG_TRACE_IRQFLAG instead of
CONFIG_TRACE_IRQFLAGS causing some useful debug code to not be
built

This in turns causes a build error on BookE 64-bit due to incorrect
semicolons at the end of a couple of macros, so let's fix that too

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>powerpc: More fixes for lazy IRQ vs. idle</title>
<updated>2012-07-16T16:03:49Z</updated>
<author>
<name>Benjamin Herrenschmidt</name>
<email>benh@kernel.crashing.org</email>
</author>
<published>2012-07-10T08:36:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6ef0d09aaa123dfba91f3261c78827c4d85e786a'/>
<id>urn:sha1:6ef0d09aaa123dfba91f3261c78827c4d85e786a</id>
<content type='text'>
commit be2cf20a5ad31ebb13562c1c866ecc626fbd721e upstream.

Looks like we still have issues with pSeries and Cell idle code
vs. the lazy irq state. In fact, the reset fixes that went upstream
are exposing the problem more by causing BUG_ON() to trigger (which
this patch turns into a WARN_ON instead).

We need to be careful when using a variant of low power state that
has the side effect of turning interrupts back on, to properly set
all the SW &amp; lazy state to look as if everything is enabled before
we enter the low power state with MSR:EE off as we will return with
MSR:EE on. If not, we have a discrepancy of state which can cause
things to go very wrong later on.

This patch moves the logic into a helper and uses it from the
pseries and cell idle code. The power4/970 idle code already got
things right (in assembly even !) so I'm not touching it. The power7
"bare metal" idle code is subtly different and correct. Remains PA6T
and some hypervisor based Cell platforms which have questionable
code in there, but they are mostly dead platforms so I'll fix them
when I manage to get final answers from the respective maintainers
about how the low power state actually works on them.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>powerpc/xmon: Use cpumask iterator to avoid warning</title>
<updated>2012-07-16T16:03:23Z</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2012-06-28T19:28:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7e9356ed7ba29f1f76d7b5fae6b3c9f128663741'/>
<id>urn:sha1:7e9356ed7ba29f1f76d7b5fae6b3c9f128663741</id>
<content type='text'>
commit bc1d7702910c7c7e88eb60b58429dbfe293683ce upstream.

We have a bug report where the kernel hits a warning in the cpumask
code:

WARNING: at include/linux/cpumask.h:107

Which is:
        WARN_ON_ONCE(cpu &gt;= nr_cpumask_bits);

The backtrace is:
        cpu_cmd
        cmds
        xmon_core
        xmon
        die

xmon is iterating through 0 to NR_CPUS. I'm not sure why we are still
open coding this but iterating above nr_cpu_ids is definitely a bug.

This patch iterates through all possible cpus, in case we issue a
system reset and CPUs in an offline state call in.

Perhaps the old code was trying to handle CPUs that were in the
partition but were never started (eg kexec into a kernel with an
nr_cpus= boot option). They are going to die way before we get into
xmon since we haven't set any kernel state up for them.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>powerpc/kvm: sldi should be sld</title>
<updated>2012-07-16T16:03:22Z</updated>
<author>
<name>Michael Neuling</name>
<email>mikey@neuling.org</email>
</author>
<published>2012-06-25T13:33:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9b385370031c7880d19ce46849d3768aa30b3e09'/>
<id>urn:sha1:9b385370031c7880d19ce46849d3768aa30b3e09</id>
<content type='text'>
commit 2f584a146a2965b82fce89b8d2f95dc5cfe468d0 upstream.

Since we are taking a registers, this should never have been an sldi.
Talking to paulus offline, this is the correct fix.

Was introduced by:
 commit 19ccb76a1938ab364a412253daec64613acbf3df
 Author: Paul Mackerras &lt;paulus@samba.org&gt;
 Date:   Sat Jul 23 17:42:46 2011 +1000

Talking to paulus, this shouldn't be a literal.

Signed-off-by: Michael Neuling &lt;mikey@neuling.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>powerpc: check_and_cede_processor() never cedes</title>
<updated>2012-07-16T16:03:21Z</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2012-06-27T13:13:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ee1602ff18545ddf7f19638fb350e4eec2030c0d'/>
<id>urn:sha1:ee1602ff18545ddf7f19638fb350e4eec2030c0d</id>
<content type='text'>
commit 0b17ba7258db83cd02da560884e053b85de371f2 upstream.

Commit f948501b36c6 ("Make hard_irq_disable() actually hard-disable
interrupts") caused check_and_cede_processor to stop working.
-&gt;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: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>powerpc/pseries: Fix software invalidate TCE</title>
<updated>2012-07-16T16:03:21Z</updated>
<author>
<name>Michael Neuling</name>
<email>mikey@neuling.org</email>
</author>
<published>2012-06-26T21:26:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8057f6c444173496806618f2fe173c2f02fb3995'/>
<id>urn:sha1:8057f6c444173496806618f2fe173c2f02fb3995</id>
<content type='text'>
commit bc6dc752f35488160ffac07ae91bed1bddaea32a upstream.

The following added support for powernv but broke pseries/BML:
 1f1616e powerpc/powernv: Add TCE SW invalidation support

TCE_PCI_SW_INVAL was split into FREE and CREATE flags but the tests in
the pseries code were not updated to reflect this.

Signed-off-by: Michael Neuling &lt;mikey@neuling.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>powerpc: Fix uninitialised error in numa.c</title>
<updated>2012-07-16T16:03:21Z</updated>
<author>
<name>Michael Neuling</name>
<email>mikey@neuling.org</email>
</author>
<published>2012-06-19T20:01:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3fb55c2a681f7618c828b5853abc27f86d7e9fe1'/>
<id>urn:sha1:3fb55c2a681f7618c828b5853abc27f86d7e9fe1</id>
<content type='text'>
commit 82b2521d257b5c0efd51821cf5fa306e53bbb6ba upstream.

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: Michael Neuling &lt;mikey@neuling.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>powerpc/ftrace: Do not trace restore_interrupts()</title>
<updated>2012-07-16T16:03:21Z</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2012-06-04T16:27:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3f8d5752c3926dab96e00bfb5d0c8e2f015a975e'/>
<id>urn:sha1:3f8d5752c3926dab96e00bfb5d0c8e2f015a975e</id>
<content type='text'>
commit 2d773aa4810d4a612d1c879faacc38594cc3f841 upstream.

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 &gt; t
 num=`wc -l t`
 sed -ne "1,${num}p" t &gt; t1
 let num=num+1
 sed -ne "${num},$p" t &gt; t2
 cat t1 &gt; /debug/tracing/set_ftrace_filter
 echo function /debug/tracing/current_tracer
 &lt;failed? bisect t1, if not bisect t2&gt;

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.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Make hard_irq_disable() actually hard-disable interrupts</title>
<updated>2012-06-22T18:36:57Z</updated>
<author>
<name>Paul Mackerras</name>
<email>paulus@samba.org</email>
</author>
<published>2012-06-15T04:51:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d6bc383209efd8a57b3c73ef2524a98df32c7bcc'/>
<id>urn:sha1:d6bc383209efd8a57b3c73ef2524a98df32c7bcc</id>
<content type='text'>
commit f948501b36c6b3d9352ce212a197098a7e958971 upstream.

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 7230c56441 ("powerpc: Rework lazy-interrupt
handling") changed it to a static inline function.

Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
--
 arch/powerpc/include/asm/hw_irq.h |    3 +++
 1 file changed, 3 insertions(+)

</content>
</entry>
<entry>
<title>powerpc: Fix kernel panic during kernel module load</title>
<updated>2012-06-17T18:21:22Z</updated>
<author>
<name>Steffen Rumler</name>
<email>steffen.rumler.ext@nsn.com</email>
</author>
<published>2012-06-06T14:37:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e6e70e4c7ef345d3af2d2ba98c2d2f175aa64c2a'/>
<id>urn:sha1:e6e70e4c7ef345d3af2d2ba98c2d2f175aa64c2a</id>
<content type='text'>
commit 3c75296562f43e6fbc6cddd3de948a7b3e4e9bcf upstream.

This fixes a problem which can causes kernel oopses while loading
a kernel module.

According to the PowerPC EABI specification, GPR r11 is assigned
the dedicated function to point to the previous stack frame.
In the powerpc-specific kernel module loader, do_plt_call()
(in arch/powerpc/kernel/module_32.c), GPR r11 is also used
to generate trampoline code.

This combination crashes the kernel, in the case where the compiler
chooses to use a helper function for saving GPRs on entry, and the
module loader has placed the .init.text section far away from the
.text section, meaning that it has to generate a trampoline for
functions in the .init.text section to call the GPR save helper.
Because the trampoline trashes r11, references to the stack frame
using r11 can cause an oops.

The fix just uses GPR r12 instead of GPR r11 for generating the
trampoline code.  According to the statements from Freescale, this is
safe from an EABI perspective.

I've tested the fix for kernel 2.6.33 on MPC8541.

Signed-off-by: Steffen Rumler &lt;steffen.rumler.ext@nsn.com&gt;
[paulus@samba.org: reworded the description]
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
