linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Redfearn <matt.redfearn@imgtec.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Ralf Baechle <ralf@linux-mips.org>, <linux-mips@linux-mips.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Marcin Nowakowski <marcin.nowakowski@imgtec.com>,
	Masanari Iida <standby24x7@gmail.com>,
	Chris Metcalf <cmetcalf@mellanox.com>,
	LKML <linux-kernel@vger.kernel.org>,
	James Hogan <james.hogan@imgtec.com>,
	Paul Burton <paul.burton@imgtec.com>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] MIPS: IRQ Stack: Unwind IRQ stack onto task stack
Date: Tue, 4 Apr 2017 13:18:58 +0100	[thread overview]
Message-ID: <c2249854-12ee-6040-4623-bcc17c467f2d@imgtec.com> (raw)
In-Reply-To: <CAHmME9p_Yw7Xi2P=zs4snEM3vGo8OkgM8cddpOy69KssNHqsmA@mail.gmail.com>

Hi Jason,


On 04/04/17 12:58, Jason A. Donenfeld wrote:
> This indeed is useful. Out of curiosity, are other archs using a
> similar technique? In anycase,
>
> Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>

Yes, at least x86 and ARM64 do the same thing (probably more)

x86 saves the previous stack pointer on the IRQ stack in 
http://lxr.free-electrons.com/source/arch/x86/kernel/irq_32.c#L70
which is then unwound in 
http://lxr.free-electrons.com/source/arch/x86/kernel/dumpstack.c#L51

ARM64 saves the task SP in 
http://lxr.free-electrons.com/source/arch/arm64/kernel/entry.S#L249
And unwinds it in 
http://lxr.free-electrons.com/source/arch/arm64/kernel/traps.c#L140

Thanks,
Matt

WARNING: multiple messages have this Message-ID (diff)
From: Matt Redfearn <matt.redfearn@imgtec.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	linux-mips@linux-mips.org, Paolo Bonzini <pbonzini@redhat.com>,
	Marcin Nowakowski <marcin.nowakowski@imgtec.com>,
	Masanari Iida <standby24x7@gmail.com>,
	Chris Metcalf <cmetcalf@mellanox.com>,
	LKML <linux-kernel@vger.kernel.org>,
	James Hogan <james.hogan@imgtec.com>,
	Paul Burton <paul.burton@imgtec.com>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] MIPS: IRQ Stack: Unwind IRQ stack onto task stack
Date: Tue, 4 Apr 2017 13:18:58 +0100	[thread overview]
Message-ID: <c2249854-12ee-6040-4623-bcc17c467f2d@imgtec.com> (raw)
Message-ID: <20170404121858.DDDBsSElitM6ubReZtOVKTG4C9TzYHO3azW0IlYS-p8@z> (raw)
In-Reply-To: <CAHmME9p_Yw7Xi2P=zs4snEM3vGo8OkgM8cddpOy69KssNHqsmA@mail.gmail.com>

Hi Jason,


On 04/04/17 12:58, Jason A. Donenfeld wrote:
> This indeed is useful. Out of curiosity, are other archs using a
> similar technique? In anycase,
>
> Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>

Yes, at least x86 and ARM64 do the same thing (probably more)

x86 saves the previous stack pointer on the IRQ stack in 
http://lxr.free-electrons.com/source/arch/x86/kernel/irq_32.c#L70
which is then unwound in 
http://lxr.free-electrons.com/source/arch/x86/kernel/dumpstack.c#L51

ARM64 saves the task SP in 
http://lxr.free-electrons.com/source/arch/arm64/kernel/entry.S#L249
And unwinds it in 
http://lxr.free-electrons.com/source/arch/arm64/kernel/traps.c#L140

Thanks,
Matt

  reply	other threads:[~2017-04-04 12:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21 14:52 [PATCH] MIPS: IRQ Stack: Unwind IRQ stack onto task stack Matt Redfearn
2017-03-21 14:52 ` Matt Redfearn
2017-04-04 11:58 ` Jason A. Donenfeld
2017-04-04 12:18   ` Matt Redfearn [this message]
2017-04-04 12:18     ` Matt Redfearn
2017-04-04 12:36   ` Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c2249854-12ee-6040-4623-bcc17c467f2d@imgtec.com \
    --to=matt.redfearn@imgtec.com \
    --cc=Jason@zx2c4.com \
    --cc=akpm@linux-foundation.org \
    --cc=cmetcalf@mellanox.com \
    --cc=james.hogan@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=marcin.nowakowski@imgtec.com \
    --cc=mingo@kernel.org \
    --cc=paul.burton@imgtec.com \
    --cc=pbonzini@redhat.com \
    --cc=ralf@linux-mips.org \
    --cc=standby24x7@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).