Skip to content

Commit

Permalink
ARC: SMP resurrect foss-for-synopsys-dwc-arc-processors#29: [plat-arc…
Browse files Browse the repository at this point in the history
…fpga] userspace prints locking bootup

This happens occasionally, when init task starts to run on CPU1, making
it's STDOUT open call land in ARC serial driver. The request_irq() call
is thus made from CPU1, leading to low level IRQ unmasking on CPU1 only,
whereas the UART IRQ is hardwired to CPU0. Thus despite the driver being
SMP re-entrant, the driver Tx locks up because TX_DONE interrupts are
asserted for CPU0, which is just not listening for them.

The workaround for now, is to unconditionally enable UART IRQ on it's
"home-cpu". Need to find the "right" way.

Signed-off-by: Vineet Gupta <[email protected]>
  • Loading branch information
vineetgarc committed Jul 27, 2012
1 parent 7ebe354 commit a5019e7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arch/arc/plat-arcfpga/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,14 @@ void __init plat_init_IRQ()
for (i = 0; i < NR_IRQS; i++) {
irq_set_chip_and_handler(i, &fpga_chip, handle_level_irq);
}

/*
* SMP Hack because UART IRQ hardwired to cpu0 (boot-cpu) but if the
* request_irq() comes from any other CPU, the low level IRQ unamsking
* essential for getting Interrupts won't be enabled on cpu0, locking
* up the UART state machine.
*/
#ifdef CONFIG_SMP
arch_unmask_irq(UART0_IRQ);
#endif
}

0 comments on commit a5019e7

Please sign in to comment.