Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4861772pxu; Wed, 21 Oct 2020 07:11:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6RAaJ/qFmCBpqSmjlqKbQ1F/gnhbDos6HN9ZjJBN8GnHa4gaJcC9QSkqRr1iraEDkR2Zk X-Received: by 2002:aa7:dada:: with SMTP id x26mr3285741eds.167.1603289479212; Wed, 21 Oct 2020 07:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603289479; cv=none; d=google.com; s=arc-20160816; b=dJbLifPtzIl6sbxAgr/st2nqug5QlI4NWeM7xA7mVJFdepOXzteFk44hjsmvzF4W2L LlsDwoi9ZRIgOCuIXGuEY2A9OagC8F3AFRtCorqV0ZBISULKERi1Z7AoM6SkAMOBIIOq VjFyv0sMru1l9XFX7UOImXL/xqChdbuhpqt36pibafvE9RcTf1ixcQmPhWojBc02ZgIF zPFV0cv4l04ugMni7/XEhw5p/3jjvtXeavoGfihkIp7yc+hzve99Qi2srgJj26qS90Up ru8ukFGqsBhUH8uckT7RK6B+dE3Wn5zJaoxd5Lu6rXMt0FLeCMMEPt/VbbeMGF9/fc/A RHoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=erzJ45tZHdKCSwUlwbFLZ5SMRuQ10sfHSD1kkcO8798=; b=Y0rBtmtT1MEv2drI44B/8+9MIbu2rFcRV0c6KKFqg4q9sbHJ77R3hcbzajrlLKtFZM SEnxO5yKEa+5SlIbTccw+21v3Q9Z/Qio7KKejyjms55VXXiRQ/Ear85j1jfvQ84zxCMq hr5AOW75wFlNA/Ex0kBn5HTnP874LHZimGnJyqoOmRda4CK2F8REWVsJwRaV6of+5dEf 60RsWCZg5LrJSPiH1twFXzxU1PK2k8u66mAAzxF1f1QvG2iXvMh+5AFsHgqi5fuESbwZ Jtmwsm17f+7dlYZqvS8nQK+7ovRqHCL+FWoVNfaSq2LYNsdt7MtK7mU+cttnVxsFPUVC z36w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="ji/Ur4W6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ss23si1355678ejb.654.2020.10.21.07.10.56; Wed, 21 Oct 2020 07:11:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="ji/Ur4W6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395295AbgJUMpv (ORCPT + 99 others); Wed, 21 Oct 2020 08:45:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391392AbgJUMpv (ORCPT ); Wed, 21 Oct 2020 08:45:51 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 344D0C0613CE for ; Wed, 21 Oct 2020 05:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=erzJ45tZHdKCSwUlwbFLZ5SMRuQ10sfHSD1kkcO8798=; b=ji/Ur4W6kHAQmPf9pVvtEVVOt 7qTVDx1mFFg2hqbRgRZ1vWccUK//PT2Z62JXuJrBfNC+UEjpw5PmaY7uBxmvnCTtp5aDRPH9GpqyE HoozeZXGqq7dsYN/tkXI+po+S+r8fho6K5FNOLkloKFtFFUIvy5iUP9Kal5OwsfOKa6cCKuKF0UBD 4MSmdamUvEFKZTvYsexkmH9rMYeWZvGCLzyfiR0RBG6Folq4zAG0WWqgUFVl9Jv70ol+lomhp5+qt h9SWfQoUeTPD/r+zON2nCjMW5g4LmwocAf+MwWPKJlPT467yRg/+j5WpJiLOv7SeESBDDV5NBerx3 BQUsNDwdQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:49094) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVDUu-0000YA-5g; Wed, 21 Oct 2020 13:45:44 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1kVDUs-0006Oi-G8; Wed, 21 Oct 2020 13:45:42 +0100 Date: Wed, 21 Oct 2020 13:45:42 +0100 From: Russell King - ARM Linux admin To: Arnd Bergmann Cc: Maninder Singh , Nick Desaulniers , Jian Cai , Thomas Gleixner , Sebastian Andrzej Siewior , Marc Zyngier , Valentin Schneider , Vincent Whitchurch , Nathan Huckleberry , Andrew Morton , Dmitry Safonov <0x7f454c46@gmail.com>, Will Deacon , v.narang@samsung.com, a.sahrawat@samsung.com, "linux-kernel@vger.kernel.org" , Linux ARM Subject: Re: [PATCH 2/3] arm: introduce IRQ stacks Message-ID: <20201021124542.GL1551@shell.armlinux.org.uk> References: <1602141333-17822-1-git-send-email-maninder1.s@samsung.com> <1602141333-17822-3-git-send-email-maninder1.s@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: Russell King - ARM Linux admin Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 21, 2020 at 02:42:48PM +0200, Arnd Bergmann wrote: > (also resending this reply from @kernel.org) > > On Fri, Oct 16, 2020 at 12:19 PM Arnd Bergmann wrote: > > On Thu, Oct 8, 2020 at 9:20 AM Maninder Singh 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 That means we need to also code that up in assembly - remember, we need to access thread_info from assembly code. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!