Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 0 on MIPS loongson64 DTS #100

Open
krzk opened this issue Feb 23, 2023 · 1 comment
Open

KeyError: 0 on MIPS loongson64 DTS #100

krzk opened this issue Feb 23, 2023 · 1 comment

Comments

@krzk
Copy link

krzk commented Feb 23, 2023

dtschema-2023.2.dev3+gbb4b09d439b4
Python 3.10.6

dtbs_check on Loongson MIPS tree produces exception:

ARCH="mips" CROSS_COMPILE="mips64-linux-gnuabi64-" KBUILD_OUTPUT="out/" make loongson2k_defconfig
touch arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi
ARCH="mips" CROSS_COMPILE="mips64-linux-gnuabi64-" KBUILD_OUTPUT="out/" make dtbs_check 


make[1]: Entering directory '/home/krzk/dev/linux/linux/out'
  DTC_CHK arch/mips/boot/dts/loongson/loongson64_2core_2k1000.dtb
Traceback (most recent call last):
  File "/home/krzk/.local/bin/dt-validate", line 164, in <module>
    testtree = dtschema.load(filename)
  File "/home/krzk/.local/lib/python3.10/site-packages/dtschema/lib.py", line 1023, in load
    return [ dtschema.dtb.fdt_unflatten(f.read()) ]
  File "/home/krzk/.local/lib/python3.10/site-packages/dtschema/dtb.py", line 485, in fdt_unflatten
    fixup_interrupts(dt, 1)
  File "/home/krzk/.local/lib/python3.10/site-packages/dtschema/dtb.py", line 414, in fixup_interrupts
    fixup_interrupts(v, icells)
  File "/home/krzk/.local/lib/python3.10/site-packages/dtschema/dtb.py", line 414, in fixup_interrupts
    fixup_interrupts(v, icells)
  File "/home/krzk/.local/lib/python3.10/site-packages/dtschema/dtb.py", line 414, in fixup_interrupts
    fixup_interrupts(v, icells)
  File "/home/krzk/.local/lib/python3.10/site-packages/dtschema/dtb.py", line 440, in fixup_interrupts
    p_icells = _get_cells_size(phandles[phandle], '#interrupt-cells')
KeyError: 0
make[1]: Leaving directory '/home/krzk/dev/linux/linux/out'
@robherring
Copy link
Member

The 'pci_bridge' nodes aren't valid. They are missing #address-cells which interrupt-map depends on. They also need 'device_type = "pci";'. 'interrupt-parent' in those nodes doesn't make sense either.

Should we handle this better? Yes, but crap in, crap out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants