From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailapp01.imgtec.com ([195.59.15.196]:64387 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23993883AbdDDMTEdNx0F (ORCPT ); Tue, 4 Apr 2017 14:19:04 +0200 Subject: Re: [PATCH] MIPS: IRQ Stack: Unwind IRQ stack onto task stack References: <1490107945-21553-1-git-send-email-matt.redfearn@imgtec.com> From: Matt Redfearn Message-ID: Date: Tue, 4 Apr 2017 13:18:58 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: To: "Jason A. Donenfeld" Cc: Ralf Baechle , linux-mips@linux-mips.org, Paolo Bonzini , Marcin Nowakowski , Masanari Iida , Chris Metcalf , LKML , James Hogan , Paul Burton , Ingo Molnar , Andrew Morton Message-ID: <20170404121858.DDDBsSElitM6ubReZtOVKTG4C9TzYHO3azW0IlYS-p8@z> 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 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