The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	Sergey Shtylyov <s.shtylyov@omp.ru>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>,
	Rich Felker <dalias@libc.org>,
	linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sh: Avoid using IRQ0 on SH3 and SH4
Date: Thu, 6 Jul 2023 08:51:29 -0700	[thread overview]
Message-ID: <7b7c8cfe-2bcf-8980-fe66-fe3efae03845@roeck-us.net> (raw)
In-Reply-To: <544f02b696a0a1554efe63f799754f3e5fbfecdc.camel@physik.fu-berlin.de>

On 7/6/23 07:01, John Paul Adrian Glaubitz wrote:
> Hi Guenter!
> 
> On Thu, 2023-07-06 at 06:57 -0700, Guenter Roeck wrote:
>> On Thu, Jun 01, 2023 at 11:22:17PM +0300, Sergey Shtylyov wrote:
>>> IRQ0 is no longer returned by platform_get_irq() and its ilk -- they now
>>> return -EINVAL instead.  However, the kernel code supporting SH3/4-based
>>> SoCs still maps the IRQ #s starting at 0 -- modify that code to start the
>>> IRQ #s from 16 instead.
>>>
>>> The patch should mostly affect the AP-SH4A-3A/AP-SH4AD-0A boards as they
>>> indeed are using IRQ0 for the SMSC911x compatible Ethernet chip.
>>>
>>
>> Unfortunately it also affects all sh4 emulations in qemu, and results in
>> boot stalls with those. There isn't a relevant log to attach because there
>> is no error message - booting just stalls until the emulation is aborted.
>>
>> Reverting this patch fixes the problem.
>>
>> Bisect log is attached for reference. Note that bisect requires applying
>> commit 7497840d462c ("sh: Provide unxlate_dev_mem_ptr() in asm/io.h"),
>> which is also the reason why the problem was not observed earlier since
>> it was hiding behind a build failure.
> 
> Interesting. My naive understanding was that IRQ0 is no longer usable in the
> kernel as Sergey claimed. Was that not correct?
> 

I have no idea. All I know is that all my sh4 qemu emulations hang during boot
after this patch is applied. I don't have CONFIG_SMSC911X enabled in my builds.
I also don't see any error messages from failed IRQ requests after reverting
this patch.

Guenter


  reply	other threads:[~2023-07-06 15:52 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06 13:57 [PATCH] sh: Avoid using IRQ0 on SH3 and SH4 Guenter Roeck
2023-07-06 14:01 ` John Paul Adrian Glaubitz
2023-07-06 15:51   ` Guenter Roeck [this message]
2023-07-08 20:35   ` Sergey Shtylyov
2023-07-08 20:43     ` Sergey Shtylyov
2023-07-06 15:39 ` Geert Uytterhoeven
2023-07-06 15:51   ` Guenter Roeck
2023-07-06 16:38   ` John Paul Adrian Glaubitz
2023-07-06 17:04     ` Guenter Roeck
2023-07-06 17:41       ` John Paul Adrian Glaubitz
2023-07-08 20:55         ` Sergey Shtylyov
2023-07-07  7:14     ` Geert Uytterhoeven
2023-07-07  8:48       ` Geert Uytterhoeven
2023-07-07  9:30         ` John Paul Adrian Glaubitz
2023-07-07  9:53         ` John Paul Adrian Glaubitz
2023-07-07 14:34           ` Guenter Roeck
     [not found]             ` <407492B8-5D9F-41BC-A696-24C421C69F49@physik.fu-berlin.de>
2023-07-07 15:30               ` Guenter Roeck
2023-07-08 20:52     ` Sergey Shtylyov
2023-07-08 22:06       ` Guenter Roeck
2023-07-08 23:13         ` John Paul Adrian Glaubitz
2023-07-09  0:28           ` Guenter Roeck
2023-07-12  8:12           ` David Laight
2023-07-12  8:15             ` John Paul Adrian Glaubitz
2023-07-12  8:20             ` Sergei Shtylyov
2023-07-12  8:24               ` David Laight
2023-07-12 15:38               ` Guenter Roeck
2023-07-12 15:51                 ` John Paul Adrian Glaubitz
2023-07-12 16:22                 ` Sergey Shtylyov
2023-07-12 16:25                   ` Sergey Shtylyov
2023-07-08 13:26 ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7b7c8cfe-2bcf-8980-fe66-fe3efae03845@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=dalias@libc.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=s.shtylyov@omp.ru \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox