Re: [PATCH] sh: Avoid using IRQ0 on SH3 and SH4

Guenter Roeck <[email protected]>
Newsgroups gmane.linux.ports.sh.devel,gmane.linux.kernel
Message-ID <[email protected]>
On 7/6/23 08:39, Geert Uytterhoeven wrote:
> Hi Günter,
> 
> On Thu, Jul 6, 2023 at 4:03 PM Guenter Roeck <[email protected]> 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.
> 
> Which sh4 platforms in particular?
> 
> I booted a kernel with this patch on rts7751r2d (QEMU) and landisk
> (physical) two days ago.
> 

It is r2d. Example qemu command line:

qemu-system-sh4 -M r2d -kernel arch/sh/boot/zImage -no-reboot \
	-initrd rootfs.cpio -device rtl8139,netdev=net0 -netdev user,id=net0 \
	-append "rdinit=/sbin/init console=ttySC1,115200 earlycon=scif,mmio16,0xffe80000 noiotrap" \
	-serial null -serial stdio -nographic -monitor null

Example set of logs:

https://kerneltests.org/builders/qemu-sh-master/builds/5/steps/qemubuildcommand/logs/stdio

Guenter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.