2018-12-13 08:49:39

by Michael Cree

[permalink] [raw]
Subject: Generic kernel fails to boot on Alpha bisected to b38d08f3181c

A kernel built for generic UP Alpha had been noted to fail to boot
for quite some time (since the release of 3.18). The kernel either
locks up before printing any messages to the console or just falls
back into the SRM with a HALT instruction again before any messages
are printed to the console. A work around is to either use a kernel
built for generic SMP or to build a machine specific kernel as these
boot correctly.

Because there were other compile errors at the time it proved
difficult to bisect, but we are continuing to get complaints about
it as it renders the Debian Alpha installer somewhat useless, so I
returned to trying to find the problem and managed to bisect it to:

commit b38d08f3181c5025a7ce84646494cc4748492a3b
Author: Tejun Heo <[email protected]>
Date: Tue Sep 2 14:46:02 2014 -0400

percpu: restructure locking

Any suggestions as to what might be the problem and a fix?

Cheers,
Michael.


2018-12-13 17:53:19

by Tejun Heo

[permalink] [raw]
Subject: Re: Generic kernel fails to boot on Alpha bisected to b38d08f3181c

Hello, Michael.

On Thu, Dec 13, 2018 at 09:26:12PM +1300, Michael Cree wrote:
> A kernel built for generic UP Alpha had been noted to fail to boot
> for quite some time (since the release of 3.18). The kernel either
> locks up before printing any messages to the console or just falls
> back into the SRM with a HALT instruction again before any messages
> are printed to the console. A work around is to either use a kernel
> built for generic SMP or to build a machine specific kernel as these
> boot correctly.
>
> Because there were other compile errors at the time it proved
> difficult to bisect, but we are continuing to get complaints about
> it as it renders the Debian Alpha installer somewhat useless, so I
> returned to trying to find the problem and managed to bisect it to:
>
> commit b38d08f3181c5025a7ce84646494cc4748492a3b
> Author: Tejun Heo <[email protected]>
> Date: Tue Sep 2 14:46:02 2014 -0400
>
> percpu: restructure locking
>
> Any suggestions as to what might be the problem and a fix?

So, the only thing I can think of is that it's calling
spin_unlock_irq() while irq handling isn't set up yet. Can you please
try the followings?

1. Convert all spin_[un]lock_irq() to
spin_lock_irqsave/unlock_irqrestore().

2. If that still doesn't work, just convert all of them to
spin_lock/unlock(), which is obviously broken but still is useful
for debugging.

Thanks.

--
tejun

2018-12-14 04:48:46

by Michael Cree

[permalink] [raw]
Subject: Re: Generic kernel fails to boot on Alpha bisected to b38d08f3181c

On Thu, Dec 13, 2018 at 08:07:24AM -0800, Tejun Heo wrote:
> Hello, Michael.
>
> On Thu, Dec 13, 2018 at 09:26:12PM +1300, Michael Cree wrote:
> > A kernel built for generic UP Alpha had been noted to fail to boot
> > for quite some time (since the release of 3.18). The kernel either
> > locks up before printing any messages to the console or just falls
> > back into the SRM with a HALT instruction again before any messages
> > are printed to the console. A work around is to either use a kernel
> > built for generic SMP or to build a machine specific kernel as these
> > boot correctly.
> >
> > Because there were other compile errors at the time it proved
> > difficult to bisect, but we are continuing to get complaints about
> > it as it renders the Debian Alpha installer somewhat useless, so I
> > returned to trying to find the problem and managed to bisect it to:
> >
> > commit b38d08f3181c5025a7ce84646494cc4748492a3b
> > Author: Tejun Heo <[email protected]>
> > Date: Tue Sep 2 14:46:02 2014 -0400
> >
> > percpu: restructure locking
> >
> > Any suggestions as to what might be the problem and a fix?
>
> So, the only thing I can think of is that it's calling
> spin_unlock_irq() while irq handling isn't set up yet. Can you please
> try the followings?
>
> 1. Convert all spin_[un]lock_irq() to
> spin_lock_irqsave/unlock_irqrestore().

Yes, that's it. With the attached patch the kernel boots.

Cheers
Michael.


Attachments:
(No filename) (1.45 kB)
0001-percpu-convert-spin_lock_irq-to-spin_lock_irqsave.patch (1.55 kB)
Download all attachments