Also no reasoning and no signed-off.

Jan

On 2017-09-13 16:29, Ralf Ramsauer wrote:
> ---
>  inmates/demos/arm/gic-demo.c            | 2 +-
>  inmates/lib/arm-common/gic.c            | 4 ++--
>  inmates/lib/arm-common/include/inmate.h | 2 +-
>  inmates/lib/arm/include/arch/gic.h      | 4 +---
>  inmates/lib/arm64/include/arch/gic.h    | 2 +-
>  5 files changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/inmates/demos/arm/gic-demo.c b/inmates/demos/arm/gic-demo.c
> index 83284374..43e01e93 100644
> --- a/inmates/demos/arm/gic-demo.c
> +++ b/inmates/demos/arm/gic-demo.c
> @@ -57,7 +57,7 @@ static void handle_IRQ(unsigned int irqn)
>  void inmate_main(void *irq_stack)
>  {
>       printk("Initializing the GIC...\n");
> -     gic_setup(handle_IRQ);
> +     gic_setup(handle_IRQ, irq_stack);
>       gic_enable_irq(TIMER_IRQ);
>  
>       printk("Initializing the timer...\n");
> diff --git a/inmates/lib/arm-common/gic.c b/inmates/lib/arm-common/gic.c
> index 059a6b6e..475a38b6 100644
> --- a/inmates/lib/arm-common/gic.c
> +++ b/inmates/lib/arm-common/gic.c
> @@ -60,7 +60,7 @@ void vector_irq(void)
>       }
>  }
>  
> -void gic_setup(irq_handler_t handler)
> +void gic_setup(irq_handler_t handler, void *irq_stack)
>  {
>  #if GIC_VERSION == 2
>       gic = gic_v2;
> @@ -74,7 +74,7 @@ void gic_setup(irq_handler_t handler)
>  
>       irq_handler = handler;
>  
> -     gic_setup_irq_stack();
> +     gic_setup_irq_stack(irq_stack);
>  }
>  
>  void gic_enable_irq(unsigned int irq)
> diff --git a/inmates/lib/arm-common/include/inmate.h 
> b/inmates/lib/arm-common/include/inmate.h
> index 19730a9d..da0d4050 100644
> --- a/inmates/lib/arm-common/include/inmate.h
> +++ b/inmates/lib/arm-common/include/inmate.h
> @@ -82,7 +82,7 @@ static inline void cpu_relax(void)
>  }
>  
>  typedef void (*irq_handler_t)(unsigned int);
> -void gic_setup(irq_handler_t handler);
> +void gic_setup(irq_handler_t handler, void *irq_stack);
>  void gic_enable_irq(unsigned int irq);
>  
>  unsigned long timer_get_frequency(void);
> diff --git a/inmates/lib/arm/include/arch/gic.h 
> b/inmates/lib/arm/include/arch/gic.h
> index 7b282213..bec10bb0 100644
> --- a/inmates/lib/arm/include/arch/gic.h
> +++ b/inmates/lib/arm/include/arch/gic.h
> @@ -38,10 +38,8 @@
>  
>  #ifndef __ASSEMBLY__
>  
> -static inline void gic_setup_irq_stack(void)
> +static inline void gic_setup_irq_stack(void *irq_stack)
>  {
> -     static __attribute__((aligned(0x1000))) u32 irq_stack[1024];
> -
>       asm volatile (".arch_extension virt\n");
>       asm volatile ("msr      SP_irq, %0\n" : : "r" (irq_stack));
>       asm volatile ("cpsie    i\n");
> diff --git a/inmates/lib/arm64/include/arch/gic.h 
> b/inmates/lib/arm64/include/arch/gic.h
> index 80720664..aafc1667 100644
> --- a/inmates/lib/arm64/include/arch/gic.h
> +++ b/inmates/lib/arm64/include/arch/gic.h
> @@ -36,4 +36,4 @@
>   * THE POSSIBILITY OF SUCH DAMAGE.
>   */
>  
> -#define gic_setup_irq_stack()
> +#define gic_setup_irq_stack(irq_stack)
> 

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to