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

Return allocated IRQ from FDT #39

Merged
merged 1 commit into from
Sep 16, 2020
Merged

Conversation

xurtis
Copy link
Contributor

@xurtis xurtis commented Sep 9, 2020

When allocating an IRQ from the FDT the IRQ that was allocated should be passed back to the caller in addition to the IRQ handler ID.

For rockpro64, the ltimer implementation for its second timer should use the IRQ number one greater that the first timer's IRQ number (rather than the first timer's IRQ handler ID).

Fixes seL4/sel4test#25.

@xurtis xurtis requested a review from nomadeel September 9, 2020 23:37
@xurtis xurtis changed the title Fdt return irq Return allocated IRQ from FDT Sep 9, 2020
@xurtis
Copy link
Contributor Author

xurtis commented Sep 10, 2020

This passes all tests internally including tests with SMP enabled on rockpro64

@xurtis
Copy link
Contributor Author

xurtis commented Sep 10, 2020

IPC1001 seems to get stuck with all 6 cores enabled still which is an improvement over seL4/seL4#184

@yyshen
Copy link
Contributor

yyshen commented Sep 10, 2020

how long did you wait? it might take a while.

@xurtis
Copy link
Contributor Author

xurtis commented Sep 10, 2020

Well, I looked and it's now up to IPC1002 so it seems to be taking an astoundingly long time.

@yyshen
Copy link
Contributor

yyshen commented Sep 10, 2020

ok I expected it will take a while. similar story on hikey when all 8 cores are enabled.

@xurtis
Copy link
Contributor Author

xurtis commented Sep 10, 2020

MULTICORE0002 and MULTICORE0005 fail on the 6-core config for rockpro64

@yyshen
Copy link
Contributor

yyshen commented Sep 10, 2020

MULTICORE0002 and MULTICORE0005 fail on the 6-core config for rockpro64

some logs?

@xurtis
Copy link
Contributor Author

xurtis commented Sep 10, 2020

If I run the multicore tests on their own they pass without issue

@yyshen
Copy link
Contributor

yyshen commented Sep 10, 2020

hmm, how about IPC and Multicore tests together?

@xurtis
Copy link
Contributor Author

xurtis commented Sep 10, 2020

I reran all of the tests and they all passed this time so 🤷

@kent-mcleod
Copy link
Member

ps_fdt_index_register_irq is intended to have a simple interface to handle the common case of registering a callback handler on an interrupt at a certain index of the device tree. In cases where you need more complicated behavior, which appears to be the case here, then ps_fdt_walk_irqs should be used instead which does provide the ps_irq_t and will allow you to handle the rockpro64 behavior.

This traverses the FDT directly when initialising the driver for the
rockpro64 timer so that the IRQ for the second timer can be derived from
the IRQ allocated to the first device.

Signed-off-by: Curtis Millar <[email protected]>
@xurtis
Copy link
Contributor Author

xurtis commented Sep 11, 2020

@kent-mcleod updated the changes per your recommendation.

@xurtis
Copy link
Contributor Author

xurtis commented Sep 12, 2020

@ssrg-bamboo test

@ssrg-bamboo
Copy link

Hello, I'm a bot! I'll bring this PR into Trustworthy Systems and run some tests

@ssrg-bamboo
Copy link

All the tests we ran have passed! Nice job!

@ssrg-bamboo ssrg-bamboo merged commit 28c378b into seL4:master Sep 16, 2020
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

Successfully merging this pull request may close these issues.

rockpro64: sel4test freezes at BIND0001 when SMP is enabled
5 participants