arch/xtensa/esp32: When calling up_cpu_index no need to check if in SMP

mode.  up_cpu_index already does that.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
Abdelatif Guettouche 2021-08-02 10:57:37 +02:00 committed by Xiang Xiao
parent 3e44c347fd
commit 0ca5fb4edc
2 changed files with 0 additions and 17 deletions

View File

@ -417,11 +417,7 @@ void esp32_gpioirqinitialize(void)
/* Set up to receive peripheral interrupts on the current CPU */
#ifdef CONFIG_SMP
cpu = up_cpu_index();
#else
cpu = 0;
#endif
/* Attach the GPIO peripheral to the allocated CPU interrupt */

View File

@ -1025,11 +1025,7 @@ static int esp32_attach(struct uart_dev_s *dev)
/* Set up to receive peripheral interrupts on the current CPU */
#ifdef CONFIG_SMP
cpu = up_cpu_index();
#else
cpu = 0;
#endif
/* Attach the GPIO peripheral to the allocated CPU interrupt */
@ -1073,12 +1069,7 @@ static void esp32_detach(struct uart_dev_s *dev)
/* Disassociate the peripheral interrupt from the CPU interrupt */
#ifdef CONFIG_SMP
cpu = up_cpu_index();
#else
cpu = 0;
#endif
esp32_detach_peripheral(cpu, priv->config->periph, priv->cpuint);
/* And release the CPU interrupt */
@ -1161,11 +1152,7 @@ static void dma_attach(uint8_t dma_chan)
/* Set up to receive peripheral interrupts on the current CPU */
#ifdef CONFIG_SMP
cpu = up_cpu_index();
#else
cpu = 0;
#endif
/* Attach the UHCI interrupt to the allocated CPU interrupt
* and attach and enable the IRQ.