forked from riscvarchive/riscv-linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
riscv: Introduce per cpu based local timer interrupt
Currently, ther timer interrupt handleri(riscv_timer_interrupt()) is invoked directly from the arch handler. This approach creates interwinding of driver and architecture code which is not ideal. Register timer interrupt as a per cpu based irq behind generic Linux IRQ infrastructure. As the local timer node is directly connected to individual harts, HLIC acts as the parent irq domain. This patch requires necessary bbl changes that adds timer node in device tree which can be found here. riscv-software-src/riscv-pk#112 Before the patch --------------------------------------------------- CPU1 CPU2 CPU3 CPU4 21: 12 8 6 5 riscv,plic0,c000000 53 eth0 37: 0 0 0 0 riscv,plic0,c000000 32 xilinx-pcie 43: 0 0 0 0 riscv,plic0,c000000 4 10010000.serial 44: 0 0 0 0 riscv,plic0,c000000 5 10011000.serial 45: 0 0 0 0 riscv,plic0,c000000 51 10040000.spi 46: 0 0 0 0 riscv,plic0,c000000 52 10041000.spi 47: 25 1 26 50 riscv,plic0,c000000 6 10050000.spi After the patch --------------------------------------------------- CPU1 CPU2 CPU3 CPU4 5: 271 0 0 0 riscv,cpu_intc,1 5 local_timer 6: 0 307 0 0 riscv,cpu_intc,2 5 local_timer 7: 0 0 303 0 riscv,cpu_intc,3 5 local_timer 8: 0 0 0 223 riscv,cpu_intc,4 5 local_timer 47: 337 489 389 35 riscv,plic0,c000000 4 10010000.serial 48: 0 0 0 0 riscv,plic0,c000000 5 10011000.serial 49: 0 0 0 0 riscv,plic0,c000000 51 10040000.spi 50: 0 0 0 0 riscv,plic0,c000000 52 10041000.spi 51: 2 14 47 39 riscv,plic0,c000000 6 10050000.spi Signed-off-by: Atish Patra <[email protected]>
- Loading branch information
Showing
4 changed files
with
64 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters