From 2c8af54b2053cae5a6b5ff073cfd94606b21920a Mon Sep 17 00:00:00 2001 From: arighi Date: Mon, 19 Apr 2010 16:03:35 +0000 Subject: [PATCH] at91sam7x: force inlining of all the UART ISR functions. NOTE: this is not just an improvement (that is worth to be applied anyway), it's also a workaround for a GCC bug (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41999): the compiler corrupts the stack pointer and the frame pointer when calling functions with at least one parameter inside ISR functions, declared with __attribute__((interrupt)). git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3465 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/arm/drv/ser_at91.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bertos/cpu/arm/drv/ser_at91.c b/bertos/cpu/arm/drv/ser_at91.c index 0ddeee5a..ffa5a440 100644 --- a/bertos/cpu/arm/drv/ser_at91.c +++ b/bertos/cpu/arm/drv/ser_at91.c @@ -734,7 +734,7 @@ struct SerialHardware *ser_hw_getdesc(int unit) /** * Serial 0 TX interrupt handler */ -static void uart0_irq_tx(void) +INLINE void uart0_irq_tx(void) { SER_STROBE_ON; @@ -743,7 +743,7 @@ static void uart0_irq_tx(void) if (fifo_isempty(txfifo)) { /* - * - Disable the TX empty interrupts + * - Disable the TX empty interrupts */ US0_IDR = BV(US_TXEMPTY); SER_UART0_BUS_TXEND; @@ -761,7 +761,7 @@ static void uart0_irq_tx(void) /** * Serial 0 RX complete interrupt handler. */ -static void uart0_irq_rx(void) +INLINE void uart0_irq_rx(void) { SER_STROBE_ON; @@ -798,7 +798,7 @@ static DECLARE_ISR(uart0_irq_dispatcher) /** * Serial 1 TX interrupt handler */ -static void uart1_irq_tx(void) +INLINE void uart1_irq_tx(void) { SER_STROBE_ON; @@ -807,7 +807,7 @@ static void uart1_irq_tx(void) if (fifo_isempty(txfifo)) { /* - * - Disable the TX empty interrupts + * - Disable the TX empty interrupts */ US1_IDR = BV(US_TXEMPTY); SER_UART1_BUS_TXEND; @@ -825,7 +825,7 @@ static void uart1_irq_tx(void) /** * Serial 1 RX complete interrupt handler. */ -static void uart1_irq_rx(void) +INLINE void uart1_irq_rx(void) { SER_STROBE_ON; -- 2.25.1