diff mbox

[08/10] powerpc/mpic_pasemi_msi: Move MSI-related ops to pci_controller_ops

Message ID 1428985683-24767-9-git-send-email-dja@axtens.net (mailing list archive)
State Accepted
Delegated to: Michael Ellerman
Headers show

Commit Message

Daniel Axtens April 14, 2015, 4:28 a.m. UTC
Move the PaSemi MPIC msi subsystem to use the pci_controller_ops
structure rather than ppc_md for MSI related PCI controller
operations.

As with fsl_msi, operations are plugged in at the subsys level, after
controller creation. Again, we iterate over all controllers and
populate them with the MSI ops.
---
 arch/powerpc/sysdev/mpic_pasemi_msi.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comments

Christian Zigotzky July 7, 2015, 10:50 a.m. UTC | #1
Dear Linuxppc-dev mailing list,

I compiled a kernel from the git on Tuesday 23rd of June 2015. It didn't 
boot with my PASEMI PA6T board.

Error messages:

Oops: Kernel access of bad area, sig: 11 [#1]

.sb600_8259_cascade+0x4c/0xac (unreliable)
.schedule+0x74/0x9c (unreliable)

Kernel panic - not syncing: Fatal exception in interrupt

I compiled the RC1 of kernel 4.2 last Sunday. Unfortunately it didn't 
boot either. The kernel 4.1 and 4.1.1 boot without any problems.

Could someone please explain me why it doesn't boot anymore?

I would like to thank you very much in advance for helping me.

If you have any questions, please don't hesitate to ask. I'm looking 
forward to getting your reply.


Kind regards,

Christian Zigotzky
Christian Zigotzky July 7, 2015, 11:25 a.m. UTC | #2
Error messages images:

http://forum.hyperion-entertainment.biz/download/file.php?id=1772&mode=view
http://forum.hyperion-entertainment.biz/download/file.php?id=1774&mode=view

-- Christian

On 07 July 2015 12:50 PM Christian Zigotzky wrote:
> Dear Linuxppc-dev mailing list,
>
> I compiled a kernel from the git on Tuesday 23rd of June 2015. It 
> didn't boot with my PASEMI PA6T board.
>
> Error messages:
>
> Oops: Kernel access of bad area, sig: 11 [#1]
>
> .sb600_8259_cascade+0x4c/0xac (unreliable)
> .schedule+0x74/0x9c (unreliable)
>
> Kernel panic - not syncing: Fatal exception in interrupt
>
> I compiled the RC1 of kernel 4.2 last Sunday. Unfortunately it didn't 
> boot either. The kernel 4.1 and 4.1.1 boot without any problems.
>
> Could someone please explain me why it doesn't boot anymore?
>
> I would like to thank you very much in advance for helping me.
>
> If you have any questions, please don't hesitate to ask. I'm looking 
> forward to getting your reply.
>
>
> Kind regards,
>
> Christian Zigotzky
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
Christian Zigotzky July 8, 2015, 6 p.m. UTC | #3
Dear Linuxppc-dev mailing list,

I used git bisect and found out that the following commit is the problem.

commit 3ceaccdf92073d193f0bfbe24280dd736e3fed86
Author: Dave Hansen <dave.hansen@linux.intel.com>


Log:

git clone 
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-git

git bisect start b953c0d234bc72e8489d3bf51a276c5c4ec85345 (Linux 4.1)

git bisect bad d770e558e21961ad6cfdf0ff7df0eb5d7d4f0754 (Linux 4.2-rc1)

Output:

Bisecting: 6261 revisions left to test after this (roughly 13 steps)
[4570a37169d4b44d316f40b2ccc681dc93fedc7b] Merge tag 'sound-4.2-rc1' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

----

git bisect bad

Output:

Bisecting: 3295 revisions left to test after this (roughly 12 steps)
[4e241557fc1cb560bd9e77ca1b4a9352732a5427] Merge tag 'for-linus' of 
git://git.kernel.org/pub/scm/virt/kvm/kvm

----

git bisect bad

Output:

Bisecting: 1625 revisions left to test after this (roughly 11 steps)
[44d21c3f3a2ef2f58b18bda64c52c99e723f3f4a] Merge 
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

----

git bisect bad

Output:

Bisecting: 712 revisions left to test after this (roughly 10 steps)
[e75c73ad64478c12b3a44b86a3e7f62a4f65b93e] Merge branch 
'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

----

git bisect bad (sometimes the kernel boots but the mouse doesn't work)

Output:

Bisecting: 371 revisions left to test after this (roughly 9 steps)
[c58267e9fa7b0345dd9006939254701e3622ca6a] Merge branch 
'perf-core-for-linus' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

----

git bisect good

Output:

Bisecting: 185 revisions left to test after this (roughly 8 steps)
[59a36d16be8f9f68410f1bd396577fb7f31ae877] x86/fpu: Factor out 
fpu/regset.h from fpu/internal.h

----

git bisect good

Output:

Bisecting: 93 revisions left to test after this (roughly 7 steps)
[23b7776290b10297fe2cae0fb5f166a4f2c68121] Merge branch 
'sched-core-for-linus' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

----

git bisect good

Output:

Bisecting: 46 revisions left to test after this (roughly 6 steps)
[0c4109bec0a6cde471bef3a21cd6f8384a614469] x86/fpu/xstate: Fix up bad 
get_xsave_addr() assumptions

----

git bisect good

Output:

Bisecting: 19 revisions left to test after this (roughly 5 steps)
[cfe3eceb7a2eb91284d5605c5315249bb165e9d3] Merge branch 
'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

----

git bisect good

Output:

Bisecting: 9 revisions left to test after this (roughly 3 steps)
[cd4996dce18b619bd7b3acf75c91f49c77f05a97] x86/mpx: Trace allocation of 
new bounds tables

----

git bisect good

Output:

Bisecting: 4 revisions left to test after this (roughly 2 steps)
[613fcb7d3c79ec25b5913a6aa974c9047c31e68c] x86/mpx: Support 32-bit 
binaries on 64-bit kernels

----

git bisect good

Output:

Bisecting: 2 revisions left to test after this (roughly 1 step)
[bea03c50b871a2fa922f31ad7c9993bb4fc7b192] x86/mpx: Do not count MPX 
VMAs as neighbors when unmapping

----

git bisect bad (sometimes the kernel boots but the mouse doesn't work)

Output:

Bisecting: 0 revisions left to test after this (roughly 0 steps)
[3ceaccdf92073d193f0bfbe24280dd736e3fed86] x86/mpx: Rewrite the unmap code

----

git bisect bad (sometimes the kernel boots but the mouse doesn't work)

Output:

3ceaccdf92073d193f0bfbe24280dd736e3fed86 is the first bad commit
commit 3ceaccdf92073d193f0bfbe24280dd736e3fed86
Author: Dave Hansen <dave.hansen@linux.intel.com>
Date:   Sun Jun 7 11:37:06 2015 -0700

     x86/mpx: Rewrite the unmap code

     The MPX code needs to clear out bounds tables for memory which
     is no longer in use.  We do this when a userspace mapping is
     torn down (unmapped).

     There are two modes:

       1. An entire bounds table becomes unused, and can be freed
          and its pointer removed from the bounds directory.  This
          happens either when a large mapping is torn down, or when
          a small mapping is torn down and it is the last mapping
          "covered" by a bounds table.

       2. Only part of a bounds table becomes unused, in which case
          we free the backing memory as if MADV_DONTNEED was called.

     The old code was a spaghetti mess of "edge" bounds tables
     where the edges were handled specially, even if we were
     unmapping an entire one.  Non-edge bounds tables are always
     fully unmapped, but share a different code path from the edge
     ones.  The old code had a bug where it was unmapping too much
     memory.  I worked on fixing it for two days and gave up.

     I didn't write the original code.  I didn't particularly like
     it, but it worked, so I left it.  After my debug session, I
     realized it was undebuggagle *and* buggy, so out it went.

     I also wrote a new unmapping test program which uncovers bugs
     pretty nicely.

     Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
     Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
     Cc: Andrew Morton <akpm@linux-foundation.org>
     Cc: Dave Hansen <dave@sr71.net>
     Cc: H. Peter Anvin <hpa@zytor.com>
     Cc: Linus Torvalds <torvalds@linux-foundation.org>
     Cc: Peter Zijlstra <peterz@infradead.org>
     Link: 
http://lkml.kernel.org/r/20150607183706.DCAEC67D@viggo.jf.intel.com
     Signed-off-by: Ingo Molnar <mingo@kernel.org>

:040000 040000 d6809ce6030ff42a5813da4a94971888d8ad67c9 
a0514265bbf313aba996e5606c00881acc62b220 M    arch

----

Cheers,

Christian


On 07 July 2015 2:44 PM, Christian Zigotzky wrote:
>
>
> Error messages images:
>
> http://forum.hyperion-entertainment.biz/download/file.php?id=1772&mode=view 
>
> http://forum.hyperion-entertainment.biz/download/file.php?id=1774&mode=view 
>
>
> -- Christian
>
> On 07 July 2015 12:50 PM Christian Zigotzky wrote:
>> Dear Linuxppc-dev mailing list,
>>
>> I compiled a kernel from the git on Tuesday 23rd of June 2015. It
>> didn't boot with my PASEMI PA6T board.
>>
>> Error messages:
>>
>> Oops: Kernel access of bad area, sig: 11 [#1]
>>
>> .sb600_8259_cascade+0x4c/0xac (unreliable)
>> .schedule+0x74/0x9c (unreliable)
>>
>> Kernel panic - not syncing: Fatal exception in interrupt
>>
>> I compiled the RC1 of kernel 4.2 last Sunday. Unfortunately it didn't
>> boot either. The kernel 4.1 and 4.1.1 boot without any problems.
>>
>> Could someone please explain me why it doesn't boot anymore?
>>
>> I would like to thank you very much in advance for helping me.
>>
>> If you have any questions, please don't hesitate to ask. I'm looking
>> forward to getting your reply.
>>
>>
>> Kind regards,
>>
>> Christian Zigotzky
>>
>>
>> _______________________________________________
>> Linuxppc-dev mailing list
>> Linuxppc-dev@lists.ozlabs.org
>> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
Benjamin Herrenschmidt July 8, 2015, 10:36 p.m. UTC | #4
On Wed, 2015-07-08 at 20:00 +0200, Christian Zigotzky wrote:
> Dear Linuxppc-dev mailing list,
> 
> I used git bisect and found out that the following commit is the problem.
> 
> commit 3ceaccdf92073d193f0bfbe24280dd736e3fed86
> Author: Dave Hansen <dave.hansen@linux.intel.com>

There is no way that commit affects anything on that platform, it only
changes a file in arch/x86 that isn't compiled on a powerpc build. You
must have made a mistake in your bisection, possibly the one "sometimes
boots" should be considered good, but I can't say for sure.

Michael has a PA6T board at work, so I assume he will see if he can
reproduce.

Ben.

> 
> Log:
> 
> git clone 
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-git
> 
> git bisect start b953c0d234bc72e8489d3bf51a276c5c4ec85345 (Linux 4.1)
> 
> git bisect bad d770e558e21961ad6cfdf0ff7df0eb5d7d4f0754 (Linux 4.2-rc1)
> 
> Output:
> 
> Bisecting: 6261 revisions left to test after this (roughly 13 steps)
> [4570a37169d4b44d316f40b2ccc681dc93fedc7b] Merge tag 'sound-4.2-rc1' of 
> git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
> 
> ----
> 
> git bisect bad
> 
> Output:
> 
> Bisecting: 3295 revisions left to test after this (roughly 12 steps)
> [4e241557fc1cb560bd9e77ca1b4a9352732a5427] Merge tag 'for-linus' of 
> git://git.kernel.org/pub/scm/virt/kvm/kvm
> 
> ----
> 
> git bisect bad
> 
> Output:
> 
> Bisecting: 1625 revisions left to test after this (roughly 11 steps)
> [44d21c3f3a2ef2f58b18bda64c52c99e723f3f4a] Merge 
> git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
> 
> ----
> 
> git bisect bad
> 
> Output:
> 
> Bisecting: 712 revisions left to test after this (roughly 10 steps)
> [e75c73ad64478c12b3a44b86a3e7f62a4f65b93e] Merge branch 
> 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
> 
> ----
> 
> git bisect bad (sometimes the kernel boots but the mouse doesn't work)
> 
> Output:
> 
> Bisecting: 371 revisions left to test after this (roughly 9 steps)
> [c58267e9fa7b0345dd9006939254701e3622ca6a] Merge branch 
> 'perf-core-for-linus' of 
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
> 
> ----
> 
> git bisect good
> 
> Output:
> 
> Bisecting: 185 revisions left to test after this (roughly 8 steps)
> [59a36d16be8f9f68410f1bd396577fb7f31ae877] x86/fpu: Factor out 
> fpu/regset.h from fpu/internal.h
> 
> ----
> 
> git bisect good
> 
> Output:
> 
> Bisecting: 93 revisions left to test after this (roughly 7 steps)
> [23b7776290b10297fe2cae0fb5f166a4f2c68121] Merge branch 
> 'sched-core-for-linus' of 
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
> 
> ----
> 
> git bisect good
> 
> Output:
> 
> Bisecting: 46 revisions left to test after this (roughly 6 steps)
> [0c4109bec0a6cde471bef3a21cd6f8384a614469] x86/fpu/xstate: Fix up bad 
> get_xsave_addr() assumptions
> 
> ----
> 
> git bisect good
> 
> Output:
> 
> Bisecting: 19 revisions left to test after this (roughly 5 steps)
> [cfe3eceb7a2eb91284d5605c5315249bb165e9d3] Merge branch 
> 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
> 
> ----
> 
> git bisect good
> 
> Output:
> 
> Bisecting: 9 revisions left to test after this (roughly 3 steps)
> [cd4996dce18b619bd7b3acf75c91f49c77f05a97] x86/mpx: Trace allocation of 
> new bounds tables
> 
> ----
> 
> git bisect good
> 
> Output:
> 
> Bisecting: 4 revisions left to test after this (roughly 2 steps)
> [613fcb7d3c79ec25b5913a6aa974c9047c31e68c] x86/mpx: Support 32-bit 
> binaries on 64-bit kernels
> 
> ----
> 
> git bisect good
> 
> Output:
> 
> Bisecting: 2 revisions left to test after this (roughly 1 step)
> [bea03c50b871a2fa922f31ad7c9993bb4fc7b192] x86/mpx: Do not count MPX 
> VMAs as neighbors when unmapping
> 
> ----
> 
> git bisect bad (sometimes the kernel boots but the mouse doesn't work)
> 
> Output:
> 
> Bisecting: 0 revisions left to test after this (roughly 0 steps)
> [3ceaccdf92073d193f0bfbe24280dd736e3fed86] x86/mpx: Rewrite the unmap code
> 
> ----
> 
> git bisect bad (sometimes the kernel boots but the mouse doesn't work)
> 
> Output:
> 
> 3ceaccdf92073d193f0bfbe24280dd736e3fed86 is the first bad commit
> commit 3ceaccdf92073d193f0bfbe24280dd736e3fed86
> Author: Dave Hansen <dave.hansen@linux.intel.com>
> Date:   Sun Jun 7 11:37:06 2015 -0700
> 
>      x86/mpx: Rewrite the unmap code
> 
>      The MPX code needs to clear out bounds tables for memory which
>      is no longer in use.  We do this when a userspace mapping is
>      torn down (unmapped).
> 
>      There are two modes:
> 
>        1. An entire bounds table becomes unused, and can be freed
>           and its pointer removed from the bounds directory.  This
>           happens either when a large mapping is torn down, or when
>           a small mapping is torn down and it is the last mapping
>           "covered" by a bounds table.
> 
>        2. Only part of a bounds table becomes unused, in which case
>           we free the backing memory as if MADV_DONTNEED was called.
> 
>      The old code was a spaghetti mess of "edge" bounds tables
>      where the edges were handled specially, even if we were
>      unmapping an entire one.  Non-edge bounds tables are always
>      fully unmapped, but share a different code path from the edge
>      ones.  The old code had a bug where it was unmapping too much
>      memory.  I worked on fixing it for two days and gave up.
> 
>      I didn't write the original code.  I didn't particularly like
>      it, but it worked, so I left it.  After my debug session, I
>      realized it was undebuggagle *and* buggy, so out it went.
> 
>      I also wrote a new unmapping test program which uncovers bugs
>      pretty nicely.
> 
>      Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
>      Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
>      Cc: Andrew Morton <akpm@linux-foundation.org>
>      Cc: Dave Hansen <dave@sr71.net>
>      Cc: H. Peter Anvin <hpa@zytor.com>
>      Cc: Linus Torvalds <torvalds@linux-foundation.org>
>      Cc: Peter Zijlstra <peterz@infradead.org>
>      Link: 
> http://lkml.kernel.org/r/20150607183706.DCAEC67D@viggo.jf.intel.com
>      Signed-off-by: Ingo Molnar <mingo@kernel.org>
> 
> :040000 040000 d6809ce6030ff42a5813da4a94971888d8ad67c9 
> a0514265bbf313aba996e5606c00881acc62b220 M    arch
> 
> ----
> 
> Cheers,
> 
> Christian
> 
> 
> On 07 July 2015 2:44 PM, Christian Zigotzky wrote:
> >
> >
> > Error messages images:
> >
> > http://forum.hyperion-entertainment.biz/download/file.php?id=1772&mode=view 
> >
> > http://forum.hyperion-entertainment.biz/download/file.php?id=1774&mode=view 
> >
> >
> > -- Christian
> >
> > On 07 July 2015 12:50 PM Christian Zigotzky wrote:
> >> Dear Linuxppc-dev mailing list,
> >>
> >> I compiled a kernel from the git on Tuesday 23rd of June 2015. It
> >> didn't boot with my PASEMI PA6T board.
> >>
> >> Error messages:
> >>
> >> Oops: Kernel access of bad area, sig: 11 [#1]
> >>
> >> .sb600_8259_cascade+0x4c/0xac (unreliable)
> >> .schedule+0x74/0x9c (unreliable)
> >>
> >> Kernel panic - not syncing: Fatal exception in interrupt
> >>
> >> I compiled the RC1 of kernel 4.2 last Sunday. Unfortunately it didn't
> >> boot either. The kernel 4.1 and 4.1.1 boot without any problems.
> >>
> >> Could someone please explain me why it doesn't boot anymore?
> >>
> >> I would like to thank you very much in advance for helping me.
> >>
> >> If you have any questions, please don't hesitate to ask. I'm looking
> >> forward to getting your reply.
> >>
> >>
> >> Kind regards,
> >>
> >> Christian Zigotzky
> >>
> >>
> >> _______________________________________________
> >> Linuxppc-dev mailing list
> >> Linuxppc-dev@lists.ozlabs.org
> >> https://lists.ozlabs.org/listinfo/linuxppc-dev
> >
> >
> >
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev@lists.ozlabs.org
> > https://lists.ozlabs.org/listinfo/linuxppc-dev
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
Michael Ellerman July 9, 2015, 1:42 a.m. UTC | #5
On Thu, 2015-07-09 at 08:36 +1000, Benjamin Herrenschmidt wrote:
> On Wed, 2015-07-08 at 20:00 +0200, Christian Zigotzky wrote:
> > Dear Linuxppc-dev mailing list,
> > 
> > I used git bisect and found out that the following commit is the problem.
> > 
> > commit 3ceaccdf92073d193f0bfbe24280dd736e3fed86
> > Author: Dave Hansen <dave.hansen@linux.intel.com>
> 
> There is no way that commit affects anything on that platform, it only
> changes a file in arch/x86 that isn't compiled on a powerpc build. You
> must have made a mistake in your bisection, possibly the one "sometimes
> boots" should be considered good, but I can't say for sure.
> 
> Michael has a PA6T board at work, so I assume he will see if he can
> reproduce.

Yeah I can't reproduce here.

I think you need to bisect again and look for the particular crash you
reported. If you see that crash then mark it bad, else mark it good.

cheers
Christian Zigotzky July 9, 2015, 5:19 a.m. UTC | #6
Hi All

Many thanks for your answers. You're right. It is something wrong with 
my bisect. I will do another bisect. I will evaluate the one "sometimes 
boots" with good.

Thanks

Christian

On 09 July 2015 03:42 AM, Michael Ellerman wrote:
> On Thu, 2015-07-09 at 08:36 +1000, Benjamin Herrenschmidt wrote:
>> On Wed, 2015-07-08 at 20:00 +0200, Christian Zigotzky wrote:
>>> Dear Linuxppc-dev mailing list,
>>>
>>> I used git bisect and found out that the following commit is the problem.
>>>
>>> commit 3ceaccdf92073d193f0bfbe24280dd736e3fed86
>>> Author: Dave Hansen <dave.hansen@linux.intel.com>
>> There is no way that commit affects anything on that platform, it only
>> changes a file in arch/x86 that isn't compiled on a powerpc build. You
>> must have made a mistake in your bisection, possibly the one "sometimes
>> boots" should be considered good, but I can't say for sure.
>>
>> Michael has a PA6T board at work, so I assume he will see if he can
>> reproduce.
> Yeah I can't reproduce here.
>
> I think you need to bisect again and look for the particular crash you
> reported. If you see that crash then mark it bad, else mark it good.
>
> cheers
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
Michael Ellerman July 9, 2015, 7:07 a.m. UTC | #7
On Thu, 2015-07-09 at 07:19 +0200, Christian Zigotzky wrote:
> Hi All
> 
> Many thanks for your answers. You're right. It is something wrong with 
> my bisect. I will do another bisect. I will evaluate the one "sometimes 
> boots" with good.

Thanks Christian.

cheers
Benjamin Herrenschmidt July 9, 2015, 7:53 a.m. UTC | #8
On Thu, 2015-07-09 at 11:42 +1000, Michael Ellerman wrote:
> > 
> > There is no way that commit affects anything on that platform, it
> only
> > changes a file in arch/x86 that isn't compiled on a powerpc build.
> You
> > must have made a mistake in your bisection, possibly the one
> "sometimes
> > boots" should be considered good, but I can't say for sure.
> > 
> > Michael has a PA6T board at work, so I assume he will see if he can
> > reproduce.
> 
> Yeah I can't reproduce here.
> 
> I think you need to bisect again and look for the particular crash you
> reported. If you see that crash then mark it bad, else mark it good.

Michael, the crash looks like a neat NULL dereference, any chance you
can spot something in the code that might explain it ?

The strange thing is that the crash is in sb600_8259_cascade(), however
that function doesn't seem to exist in a current kernel tree, or if it
does it's somewhat hidden behind grep-defeating macros.

All I can find that relates to something called "sb600" is some quirks
in AHCI and x86 fixups that seem ATI related.

Christian, do you have some out of tree driver in that kernel ?

Ben.
Christian Zigotzky July 9, 2015, 10:27 p.m. UTC | #9
Hi All,

Many thanks for your help. You're right. It was something wrong with my 
last bisect. I did another bisect. I evaluated the one "sometimes boots" 
with good.

Log:

git clone 
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-git

git bisect start

git bisect good b953c0d234bc72e8489d3bf51a276c5c4ec85345 (Linux 4.1)

git bisect bad d770e558e21961ad6cfdf0ff7df0eb5d7d4f0754 (Linux 4.2-rc1)

Output:

Bisecting: 6261 revisions left to test after this (roughly 13 steps)
[4570a37169d4b44d316f40b2ccc681dc93fedc7b] Merge tag 'sound-4.2-rc1' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

----

git bisect bad

Output:

Bisecting: 3295 revisions left to test after this (roughly 12 steps)
[4e241557fc1cb560bd9e77ca1b4a9352732a5427] Merge tag 'for-linus' of 
git://git.kernel.org/pub/scm/virt/kvm/kvm

----

git bisect bad

Output:

Bisecting: 1625 revisions left to test after this (roughly 11 steps)
[44d21c3f3a2ef2f58b18bda64c52c99e723f3f4a] Merge 
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

----

git bisect bad

Output:

Bisecting: 712 revisions left to test after this (roughly 10 steps)
[e75c73ad64478c12b3a44b86a3e7f62a4f65b93e] Merge branch 
'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

----

git bisect good

Output:

Bisecting: 343 revisions left to test after this (roughly 9 steps)
[43224b96af3154cedd7220f7b90094905f07ac78] Merge branch 
'timers-core-for-linus' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

----

git bisect good

Output:

Bisecting: 171 revisions left to test after this (roughly 8 steps)
[056c04ba8bbad4c563c05306cc8a8c66e713f280] crypto: seqiv - Fix module 
unload/reload crash

----

git bisect good

Output:

Bisecting: 85 revisions left to test after this (roughly 7 steps)
[edf18b9108f5025f9e83b2c167c9122954acbc62] crypto: api - Add 
CRYPTO_MINALIGN_ATTR to struct crypto_alg

----

git bisect good

Output:

Bisecting: 41 revisions left to test after this (roughly 6 steps)
[407a2c720556e8e340e06f6a7174f5d6d80cf9ea] Merge branch 
'irq-core-for-linus' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

----

It didn't boot with the following error messages:

Oops: Kernel access of bad area, sig: 11 [#1]

.sb600_8259_cascade+0x4c/0xac (unreliable)
.kmem_cache_alloc+0x5c/0x1c4 (unreliable)

----

git bisect bad

Output:

Bisecting: 21 revisions left to test after this (roughly 5 steps)
[3b0f95be143bea1aa47beb20134ef82e4e4068dc] irq: Add 
irq_set_chained_handler_and_data()

----

git bisect good

Output:

Bisecting: 12 revisions left to test after this (roughly 4 steps)
[62a993df31f795d87bcb4c6cb005d36f32f6ad55] irqchip: atmel-aic5: Add 
sama5d2 support

----

git bisect good

Output:

Bisecting: 6 revisions left to test after this (roughly 3 steps)
[a614a610ac9b28f195d790d25be72d26f345c53a] genirq: Remove bogus 
restriction in irq_move_mask_irq()

----

It didn't boot with the following error messages:

Oops: Kernel access of bad area, sig: 11 [#1]

.sb600_8259_cascade+0x4c/0xac (unreliable)
.__kernfs_new_node+0x54/0xd8 (unreliable)

----

git bisect bad

Output:

Bisecting: 2 revisions left to test after this (roughly 2 steps)
[0d0b4c866bcce647f40d73efe5e90aeeb079050a] genirq: Introduce struct 
irq_common_data to host shared irq data

----

It didn't boot with the following error messages:

Oops: Kernel access of bad area, sig: 11 [#1]

.sb600_8259_cascade+0x4c/0xac (unreliable)
.schedule+0x74/0x9c (unreliable)

----

git bisect bad

Output:

Bisecting: 0 revisions left to test after this (roughly 1 step)
[77ed42f18edd486e9994ccd1f174076309a6343f] genirq: Prevent crash in 
irq_move_irq()

----

git bisect good

Output:
0d0b4c866bcce647f40d73efe5e90aeeb079050a is the first bad commit
commit 0d0b4c866bcce647f40d73efe5e90aeeb079050a
Author: Jiang Liu <jiang.liu@linux.intel.com>
Date:   Mon Jun 1 16:05:12 2015 +0800

     genirq: Introduce struct irq_common_data to host shared irq data

     With the introduction of hierarchy irqdomain, struct irq_data becomes
     per-chip instead of per-irq and there may be multiple irq_datas
     associated with the same irq. Some per-irq data stored in struct
     irq_data now may get duplicated into multiple irq_datas, and causes
     inconsistent view.

     So introduce struct irq_common_data to host per-irq common data and to
     achieve consistent view among irq_chips.

     Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
     Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
     Cc: Tony Luck <tony.luck@intel.com>
     Cc: Bjorn Helgaas <bhelgaas@google.com>
     Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
     Cc: Randy Dunlap <rdunlap@infradead.org>
     Cc: Yinghai Lu <yinghai@kernel.org>
     Cc: Borislav Petkov <bp@alien8.de>
     Cc: Jason Cooper <jason@lakedaemon.net>
     Cc: Kevin Cernekee <cernekee@gmail.com>
     Cc: Arnd Bergmann <arnd@arndb.de>
     Cc: Marc Zyngier <marc.zyngier@arm.com>
     Link: 
http://lkml.kernel.org/r/1433145945-789-4-git-send-email-jiang.liu@linux.intel.com
     Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

:040000 040000 4cb60e0b1d4beb046834e75c66b5d0a0613935b9 
df0b465b70ec087560482267cca2d9ff54d92c49 M    include
:040000 040000 3808922cd797449f8f9b33300064a2ff1727f3a6 
25a75bf65be0ba9e397151de0ed1beb1695fddb2 M    kernel

----

Rgds,

Christian
Christian Zigotzky July 10, 2015, 6:51 a.m. UTC | #10
Hi All,

The first bad commit: 
http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?id=0d0b4c866bcce647f40d73efe5e90aeeb079050a

I replaced the following irq files with the old kernel 4.1 irq files:

~/Downloads/linux-4.2/linux-4.2-nemo$ cp 
/home/christian/Downloads/linux-4.1/linux-4.1/include/linux/irq.h 
include/linux/irq.h
~/Downloads/linux-4.2/linux-4.2-nemo$ cp 
/home/christian/Downloads/linux-4.1/linux-4.1/include/linux/irqdesc.h 
include/linux/irqdesc.h
~/Downloads/linux-4.2/linux-4.2-nemo$ cp 
/home/christian/Downloads/linux-4.1/linux-4.1/kernel/irq/internals.h 
kernel/irq/internals.h
~/Downloads/linux-4.2/linux-4.2-nemo$ cp 
/home/christian/Downloads/linux-4.1/linux-4.1/kernel/irq/irqdesc.c 
kernel/irq/irqdesc.c
~/Downloads/linux-4.2/linux-4.2-nemo$ cp 
/home/christian/Downloads/linux-4.1/linux-4.1/kernel/irq/irqdomain.c 
kernel/irq/irqdomain.c
~/Downloads/linux-4.2/linux-4.2-nemo$ cp 
/home/christian/Downloads/linux-4.1/linux-4.1/kernel/irq/manage.c 
kernel/irq/manage.c
~/Downloads/linux-4.2/linux-4.2-nemo$ cp 
/home/christian/Downloads/linux-4.1/linux-4.1/kernel/irq/proc.c 
kernel/irq/proc.c

I compiled the RC1 of kernel 4.2 with these old irq source code today. 
I'm happy it boots. :-)

Rgds,

Christian

On 10 July 2015 at 00:27 AM, Christian Zigotzky wrote:
> Hi All,
>
> Many thanks for your help. You're right. It was something wrong with 
> my last bisect. I did another bisect. I evaluated the one "sometimes 
> boots" with good.
>
> Log:
>
> git clone 
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
> linux-git
>
> git bisect start
>
> git bisect good b953c0d234bc72e8489d3bf51a276c5c4ec85345 (Linux 4.1)
>
> git bisect bad d770e558e21961ad6cfdf0ff7df0eb5d7d4f0754 (Linux 4.2-rc1)
>
> Output:
>
> Bisecting: 6261 revisions left to test after this (roughly 13 steps)
> [4570a37169d4b44d316f40b2ccc681dc93fedc7b] Merge tag 'sound-4.2-rc1' 
> of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
>
> ----
>
> git bisect bad
>
> Output:
>
> Bisecting: 3295 revisions left to test after this (roughly 12 steps)
> [4e241557fc1cb560bd9e77ca1b4a9352732a5427] Merge tag 'for-linus' of 
> git://git.kernel.org/pub/scm/virt/kvm/kvm
>
> ----
>
> git bisect bad
>
> Output:
>
> Bisecting: 1625 revisions left to test after this (roughly 11 steps)
> [44d21c3f3a2ef2f58b18bda64c52c99e723f3f4a] Merge 
> git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
>
> ----
>
> git bisect bad
>
> Output:
>
> Bisecting: 712 revisions left to test after this (roughly 10 steps)
> [e75c73ad64478c12b3a44b86a3e7f62a4f65b93e] Merge branch 
> 'x86-fpu-for-linus' of 
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
>
> ----
>
> git bisect good
>
> Output:
>
> Bisecting: 343 revisions left to test after this (roughly 9 steps)
> [43224b96af3154cedd7220f7b90094905f07ac78] Merge branch 
> 'timers-core-for-linus' of 
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
>
> ----
>
> git bisect good
>
> Output:
>
> Bisecting: 171 revisions left to test after this (roughly 8 steps)
> [056c04ba8bbad4c563c05306cc8a8c66e713f280] crypto: seqiv - Fix module 
> unload/reload crash
>
> ----
>
> git bisect good
>
> Output:
>
> Bisecting: 85 revisions left to test after this (roughly 7 steps)
> [edf18b9108f5025f9e83b2c167c9122954acbc62] crypto: api - Add 
> CRYPTO_MINALIGN_ATTR to struct crypto_alg
>
> ----
>
> git bisect good
>
> Output:
>
> Bisecting: 41 revisions left to test after this (roughly 6 steps)
> [407a2c720556e8e340e06f6a7174f5d6d80cf9ea] Merge branch 
> 'irq-core-for-linus' of 
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
>
> ----
>
> It didn't boot with the following error messages:
>
> Oops: Kernel access of bad area, sig: 11 [#1]
>
> .sb600_8259_cascade+0x4c/0xac (unreliable)
> .kmem_cache_alloc+0x5c/0x1c4 (unreliable)
>
> ----
>
> git bisect bad
>
> Output:
>
> Bisecting: 21 revisions left to test after this (roughly 5 steps)
> [3b0f95be143bea1aa47beb20134ef82e4e4068dc] irq: Add 
> irq_set_chained_handler_and_data()
>
> ----
>
> git bisect good
>
> Output:
>
> Bisecting: 12 revisions left to test after this (roughly 4 steps)
> [62a993df31f795d87bcb4c6cb005d36f32f6ad55] irqchip: atmel-aic5: Add 
> sama5d2 support
>
> ----
>
> git bisect good
>
> Output:
>
> Bisecting: 6 revisions left to test after this (roughly 3 steps)
> [a614a610ac9b28f195d790d25be72d26f345c53a] genirq: Remove bogus 
> restriction in irq_move_mask_irq()
>
> ----
>
> It didn't boot with the following error messages:
>
> Oops: Kernel access of bad area, sig: 11 [#1]
>
> .sb600_8259_cascade+0x4c/0xac (unreliable)
> .__kernfs_new_node+0x54/0xd8 (unreliable)
>
> ----
>
> git bisect bad
>
> Output:
>
> Bisecting: 2 revisions left to test after this (roughly 2 steps)
> [0d0b4c866bcce647f40d73efe5e90aeeb079050a] genirq: Introduce struct 
> irq_common_data to host shared irq data
>
> ----
>
> It didn't boot with the following error messages:
>
> Oops: Kernel access of bad area, sig: 11 [#1]
>
> .sb600_8259_cascade+0x4c/0xac (unreliable)
> .schedule+0x74/0x9c (unreliable)
>
> ----
>
> git bisect bad
>
> Output:
>
> Bisecting: 0 revisions left to test after this (roughly 1 step)
> [77ed42f18edd486e9994ccd1f174076309a6343f] genirq: Prevent crash in 
> irq_move_irq()
>
> ----
>
> git bisect good
>
> Output:
> 0d0b4c866bcce647f40d73efe5e90aeeb079050a is the first bad commit
> commit 0d0b4c866bcce647f40d73efe5e90aeeb079050a
> Author: Jiang Liu <jiang.liu@linux.intel.com>
> Date:   Mon Jun 1 16:05:12 2015 +0800
>
>     genirq: Introduce struct irq_common_data to host shared irq data
>
>     With the introduction of hierarchy irqdomain, struct irq_data becomes
>     per-chip instead of per-irq and there may be multiple irq_datas
>     associated with the same irq. Some per-irq data stored in struct
>     irq_data now may get duplicated into multiple irq_datas, and causes
>     inconsistent view.
>
>     So introduce struct irq_common_data to host per-irq common data 
> and to
>     achieve consistent view among irq_chips.
>
>     Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
>     Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>     Cc: Tony Luck <tony.luck@intel.com>
>     Cc: Bjorn Helgaas <bhelgaas@google.com>
>     Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>     Cc: Randy Dunlap <rdunlap@infradead.org>
>     Cc: Yinghai Lu <yinghai@kernel.org>
>     Cc: Borislav Petkov <bp@alien8.de>
>     Cc: Jason Cooper <jason@lakedaemon.net>
>     Cc: Kevin Cernekee <cernekee@gmail.com>
>     Cc: Arnd Bergmann <arnd@arndb.de>
>     Cc: Marc Zyngier <marc.zyngier@arm.com>
>     Link: 
> http://lkml.kernel.org/r/1433145945-789-4-git-send-email-jiang.liu@linux.intel.com
>     Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>
> :040000 040000 4cb60e0b1d4beb046834e75c66b5d0a0613935b9 
> df0b465b70ec087560482267cca2d9ff54d92c49 M    include
> :040000 040000 3808922cd797449f8f9b33300064a2ff1727f3a6 
> 25a75bf65be0ba9e397151de0ed1beb1695fddb2 M    kernel
>
> ----
>
> Rgds,
>
> Christian
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
Benjamin Herrenschmidt July 13, 2015, 6:44 a.m. UTC | #11
On Fri, 2015-07-10 at 00:27 +0200, Christian Zigotzky wrote:
> Hi All,
> 
> Many thanks for your help. You're right. It was something wrong with my 
> last bisect. I did another bisect. I evaluated the one "sometimes boots" 
> with good.

 .../...

Now that makes more sense since the problem is around IRQ handling...
more specifically the SB600 code, so I suspect it's your SB600 patch
that has an issue. Look at how that series from Jiang modified the
irq handlers and see if the sb600 patch needs a similar change maybe ?

Ben.

> 
> Output:
> 0d0b4c866bcce647f40d73efe5e90aeeb079050a is the first bad commit
> commit 0d0b4c866bcce647f40d73efe5e90aeeb079050a
> Author: Jiang Liu <jiang.liu@linux.intel.com>
> Date:   Mon Jun 1 16:05:12 2015 +0800
> 
>      genirq: Introduce struct irq_common_data to host shared irq data
> 
>      With the introduction of hierarchy irqdomain, struct irq_data becomes
>      per-chip instead of per-irq and there may be multiple irq_datas
>      associated with the same irq. Some per-irq data stored in struct
>      irq_data now may get duplicated into multiple irq_datas, and causes
>      inconsistent view.
> 
>      So introduce struct irq_common_data to host per-irq common data and to
>      achieve consistent view among irq_chips.
> 
>      Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
>      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>      Cc: Tony Luck <tony.luck@intel.com>
>      Cc: Bjorn Helgaas <bhelgaas@google.com>
>      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>      Cc: Randy Dunlap <rdunlap@infradead.org>
>      Cc: Yinghai Lu <yinghai@kernel.org>
>      Cc: Borislav Petkov <bp@alien8.de>
>      Cc: Jason Cooper <jason@lakedaemon.net>
>      Cc: Kevin Cernekee <cernekee@gmail.com>
>      Cc: Arnd Bergmann <arnd@arndb.de>
>      Cc: Marc Zyngier <marc.zyngier@arm.com>
>      Link: 
> http://lkml.kernel.org/r/1433145945-789-4-git-send-email-jiang.liu@linux.intel.com
>      Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> 
> :040000 040000 4cb60e0b1d4beb046834e75c66b5d0a0613935b9 
> df0b465b70ec087560482267cca2d9ff54d92c49 M    include
> :040000 040000 3808922cd797449f8f9b33300064a2ff1727f3a6 
> 25a75bf65be0ba9e397151de0ed1beb1695fddb2 M    kernel
> 
> ----
> 
> Rgds,
> 
> Christian
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
diff mbox

Patch

diff --git a/arch/powerpc/sysdev/mpic_pasemi_msi.c b/arch/powerpc/sysdev/mpic_pasemi_msi.c
index a3f660e..b49334c 100644
--- a/arch/powerpc/sysdev/mpic_pasemi_msi.c
+++ b/arch/powerpc/sysdev/mpic_pasemi_msi.c
@@ -144,6 +144,7 @@  static int pasemi_msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
 int mpic_pasemi_msi_init(struct mpic *mpic)
 {
 	int rc;
+	struct pci_controller *phb;
 
 	if (!mpic->irqhost->of_node ||
 	    !of_device_is_compatible(mpic->irqhost->of_node,
@@ -159,9 +160,11 @@  int mpic_pasemi_msi_init(struct mpic *mpic)
 	pr_debug("pasemi_msi: Registering PA Semi MPIC MSI callbacks\n");
 
 	msi_mpic = mpic;
-	WARN_ON(ppc_md.setup_msi_irqs);
-	ppc_md.setup_msi_irqs = pasemi_msi_setup_msi_irqs;
-	ppc_md.teardown_msi_irqs = pasemi_msi_teardown_msi_irqs;
+	list_for_each_entry(phb, &hose_list, list_node) {
+		WARN_ON(phb->controller_ops.setup_msi_irqs);
+		phb->controller_ops.setup_msi_irqs = pasemi_msi_setup_msi_irqs;
+		phb->controller_ops.teardown_msi_irqs = pasemi_msi_teardown_msi_irqs;
+	}
 
 	return 0;
 }