Skip to contentSkip to conversation

Getting Bullseye/Bookworm kernel running on Loongson 3A boards

DISCUSSION Thomas Bogendoerfer 2 participants 2 messages Aug 5, 2023 – Aug 6, 2023 1 message not in the archive MIPS

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Thomas Bogendoerfer

author maintainer
#1 lore raw
Quoted 26 lines · Aurelien Jarno

Dear MIPS porters,

DSA would like to upgrade the remaining mips*el buildds to bullseye (and later to bookworm), however we have trouble running the Bullseye or Bookworm kernel on the LS3A-RS780-1w ones.

Both Bullseye and Bookworm kernels boot fine up to the userland, but the network card does not work. It *seems* to an interrupt issue as the corresponding counter in /proc/interrupts does not change, and in addition the kernel logs show the following warnings:

[    5.077846] pcieport 0000:00:02.0: of_irq_parse_pci: failed with rc=-22
[    5.084744] pcieport 0000:00:03.0: of_irq_parse_pci: failed with rc=-22
[    5.170772] ahci 0000:00:11.0: of_irq_parse_pci: failed with rc=-22
[    7.376554] pci 0000:00:07.0: of_irq_parse_pci: failed with rc=-22
[    7.444769] ata_generic 0000:00:14.1: of_irq_parse_pci: failed with rc=-22
[    7.495993] ehci-pci 0000:00:12.2: of_irq_parse_pci: failed with rc=-22
[    7.624868] ehci-pci 0000:00:13.2: of_irq_parse_pci: failed with rc=-22
[    7.753230] ohci-pci 0000:00:12.0: of_irq_parse_pci: failed with rc=-22
[    7.886362] ohci-pci 0000:00:12.1: of_irq_parse_pci: failed with rc=-22
[    8.018045] ohci-pci 0000:00:13.0: of_irq_parse_pci: failed with rc=-22
[    8.150168] ohci-pci 0000:00:13.1: of_irq_parse_pci: failed with rc=-22
[    8.294391] ohci-pci 0000:00:14.5: of_irq_parse_pci: failed with rc=-22
[   18.398222] snd_hda_intel 0000:00:14.2: of_irq_parse_pci: failed with rc=-22
[   18.547932] pci 0000:00:01.0: of_irq_parse_pci: failed with rc=-22
Quoted 2 lines

Any idea how to solve this issue? I have attached a full 6.1 kernel boot log for reference.

asking on [email protected] might get more feedback on the issue... From the quick look at kernel code and device tree of the board IMHO the DTS is missing interrupt mapping entries for the PCI bus.

Could someone from Loongson have a look at the issue ?

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
#2 lore raw
Quoted 27 lines · Thomas Bogendoerfer
Quoted 26 lines · Aurelien Jarno

Dear MIPS porters,

DSA would like to upgrade the remaining mips*el buildds to bullseye (and later to bookworm), however we have trouble running the Bullseye or Bookworm kernel on the LS3A-RS780-1w ones.

Both Bullseye and Bookworm kernels boot fine up to the userland, but the network card does not work. It *seems* to an interrupt issue as the corresponding counter in /proc/interrupts does not change, and in addition the kernel logs show the following warnings:

[    5.077846] pcieport 0000:00:02.0: of_irq_parse_pci: failed with rc=-22
[    5.084744] pcieport 0000:00:03.0: of_irq_parse_pci: failed with rc=-22
[    5.170772] ahci 0000:00:11.0: of_irq_parse_pci: failed with rc=-22
[    7.376554] pci 0000:00:07.0: of_irq_parse_pci: failed with rc=-22
[    7.444769] ata_generic 0000:00:14.1: of_irq_parse_pci: failed with rc=-22
[    7.495993] ehci-pci 0000:00:12.2: of_irq_parse_pci: failed with rc=-22
[    7.624868] ehci-pci 0000:00:13.2: of_irq_parse_pci: failed with rc=-22
[    7.753230] ohci-pci 0000:00:12.0: of_irq_parse_pci: failed with rc=-22
[    7.886362] ohci-pci 0000:00:12.1: of_irq_parse_pci: failed with rc=-22
[    8.018045] ohci-pci 0000:00:13.0: of_irq_parse_pci: failed with rc=-22
[    8.150168] ohci-pci 0000:00:13.1: of_irq_parse_pci: failed with rc=-22
[    8.294391] ohci-pci 0000:00:14.5: of_irq_parse_pci: failed with rc=-22
[   18.398222] snd_hda_intel 0000:00:14.2: of_irq_parse_pci: failed with rc=-22
[   18.547932] pci 0000:00:01.0: of_irq_parse_pci: failed with rc=-22
Quoted 7 lines
Quoted 2 lines

Any idea how to solve this issue? I have attached a full 6.1 kernel boot log for reference.

asking on [email protected] might get more feedback on the issue...
From the quick look at kernel code and device tree of the board IMHO
the DTS is missing interrupt mapping entries for the PCI bus.

Could someone from Loongson have a look at the issue ?

Hi,

This error meesage is expected because we are not using devicetree to parse interrupt, it is falling back to legacy PCI interrupt on i8259.

```

static int loongson_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{
    int irq;
    u8 val;

    irq = of_irq_parse_and_map_pci(dev, slot, pin);
    if (irq > 0)
        return irq;

    /* Care i8259 legacy systems */
    pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &val);
    /* i8259 only have 15 IRQs */
    if (val > 15)
        return 0;

    return val;
}
```

Is there any other error message regarding NIC in dmesg?

Thanks
- Jiaxun

Quoted 3 lines

Thomas.