Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5220540pxu; Wed, 21 Oct 2020 17:41:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkd3icK3xAK8vFqFSTlsroimZxBCuhBO3Re9yD/DJSfYihlat5h8LYQpMaFSmwwIO57wGv X-Received: by 2002:a17:906:bc4b:: with SMTP id s11mr6142522ejv.437.1603327280069; Wed, 21 Oct 2020 17:41:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603327280; cv=none; d=google.com; s=arc-20160816; b=abzOgUCcmLKyUxWsPKYEVs7KnGncrcMU0qPI65/608jAeetvP3t9w6q83zdTGYqt8w cVSfp9Nc/+TL4IJK09PUM5zZ9oog7UTlKyN7fGSSYJ69NDD+gVCG9NTAYwxJYb042+i6 qQY2kfYT3oT2y+Izmzmae7sjuNdx9UVS9HyF/mGIYSt2sY3bfxjJeomPogNHPB/d2wJ7 bStIkrc1lVw0m4H9XXCpwMKG1euX0OohhgW7DEMiKKpNbY2z+vCeZBszc5LiFeggT9iy eHVCCMj9iYz7zNefiypblzQF3YmTXgaFD8uyeBNUxr8+vrL2XcmiF0Jrpxoh9tRPO0iC eQpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=SQomrC7S9e4QVua0j5MC2fw2TlZxR7WCObbWyCOjEq8=; b=JNSF/GkgFd8tZBgRm+uK8Ku7Ajv+BNK46ZoWnSR2m3KEKa2fRPt8Q11lxXZTW4AM9O PsQgj3vhW8Aa9XuB1Y76zDiJMCWHuABcyjvh8aoFgooFldIFeasKwhwOYp6IoJ4nq2sT HtvEkDioAdgw5WDN0hWZDhVesoe+VH5tS1DKy3NY1RNWV/Ecu9Ho0VwTP6oc9wNVbsnU 6taUzK6kekPQtIiN0UUHpjZIvArochEHvNtFaZvjHv1ATJc0kt/la9/qgPbO6O0pBhvb jn90eQbrVOH+hagywV9gyKUtqdEBSr7VVnNEaV0wvu0fDq71/sFFYB2IRA/DRG60TB9E 6L6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=euVMfjGb; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c20si2920124ejr.515.2020.10.21.17.40.58; Wed, 21 Oct 2020 17:41:20 -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=pass header.i=@kernel.org header.s=default header.b=euVMfjGb; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440755AbgJUMnI (ORCPT + 99 others); Wed, 21 Oct 2020 08:43:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:41452 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2395096AbgJUMnI (ORCPT ); Wed, 21 Oct 2020 08:43:08 -0400 Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2CCC622275 for ; Wed, 21 Oct 2020 12:43:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603284187; bh=foR2I9na45RfgZ8XF/B0L81dQ5zjTMkWJtVbS1BEcgU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=euVMfjGbN8/O2abyZBt+61Fj15CVagY/4cKj1241p2psemlc7Rf4XQBGf1msjEBUS +1WgUTPIyZIbbx2yhsoPiD7/3GsmExuShl/ItZzlEzPV9PdbkZ9uXVgBOfxWGf9gUq bylt/oR5b+GP+hywkqEYcOrRbXbrOnhNgD2M1wX4= Received: by mail-qk1-f170.google.com with SMTP id q199so1664884qke.10 for ; Wed, 21 Oct 2020 05:43:07 -0700 (PDT) X-Gm-Message-State: AOAM531olkDayO54cuqlOCPMr+K+QCTN1MVPBHehb4uFYuK8tMAfQY4b SuI3BSLUg/+shTiLuhDHfXQv5Qsqel5F8aK4Oh4= X-Received: by 2002:a37:2dc6:: with SMTP id t189mr2904370qkh.394.1603284184218; Wed, 21 Oct 2020 05:43:04 -0700 (PDT) MIME-Version: 1.0 References: <1602141333-17822-1-git-send-email-maninder1.s@samsung.com> <1602141333-17822-3-git-send-email-maninder1.s@samsung.com> In-Reply-To: From: Arnd Bergmann Date: Wed, 21 Oct 2020 14:42:48 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/3] arm: introduce IRQ stacks To: Maninder Singh Cc: Russell King - ARM Linux , 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (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 > > Arnd