lkml.org 
[lkml]   [2020]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/3] arm: introduce IRQ stacks
(also resending this reply from @kernel.org)

On Fri, Oct 16, 2020 at 12:19 PM Arnd Bergmann <arnd@arndb.de> wrote:
> On Thu, Oct 8, 2020 at 9:20 AM Maninder Singh <maninder1.s@samsung.com> wrote:
> >
> > This patch adds code for switching to IRQ stack.
> > IRQ stack and Kernel SVC stack have below design.
> >
> > IRQ STACK:-
> > ------------ IRQ stack top
> > | |
> > ------------
> > . .
> > . .
> > . .
> > ------------
> > | sp | <- irq_stack_base + 0x8
> > ------------
> > | fp | <- irq_stack_base + 0x4
> > ------------
> > |tinfo_ptr | /* pointer to thread info */
> > irq_stack_ptr --> ------------ IRQ stack base
> >
> > Kernel SVC stack:-
> > ------------ Kernel stack top
> > | |
> > ------------
> > . .
> > . .
> > . .
> > ------------
> > | |
> > | |
> > ------------
> > |tinfo_ptr | /* pointer to thread info */
> > ------------ Kernel stack base
>
> The extra indirection doesn't look great, and I don't see any of the
> other architectures need that. Since we can access percpu data
> without going through thread_info, maybe doing the same as
> x86 would work here:
>
> - define 'current' as 'this_cpu_read_stable(current_task);'
> - convert to CONFIG_THREAD_INFO_IN_TASK
>
> Arnd

\
 
 \ /
  Last update: 2020-10-21 14:43    [W:0.183 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site