Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2896203rwl; Mon, 27 Mar 2023 06:48:45 -0700 (PDT) X-Google-Smtp-Source: AKy350aCQmSk5YtWYdOOVxfjRm6C3hl32W56uE5sgJm1+u2tOVRVof+kG4FMuO++e/b6tnQNyUpt X-Received: by 2002:aa7:dc02:0:b0:4be:b39b:ea8f with SMTP id b2-20020aa7dc02000000b004beb39bea8fmr11893328edu.2.1679924924672; Mon, 27 Mar 2023 06:48:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679924924; cv=none; d=google.com; s=arc-20160816; b=ep+F+EWdmJh88zxKaunrpSd8DBzs06e3Yovs+B2y6DLJAdAdHc4hQqHG8l0DMBC08s wo74RPKPBzpxWntdOkJVp32Q9SkZPjS6kzD4Jhkzelm3ezrNFJpJys0zh8MmhhcfStGn npV/ZrggEe8Cazf4xiHAt6hOAP/S4em4La0W/BgvwC9iU8mkl1yEzUO1x86+/lqc57JZ 1PtE7oIQP8c4aIPqwBC0xdRp67yUznnG4tlY1JtrG2zoz0hHfjMuW4S2RdwfpCPyPfLX HpjNuawYimW0QTP/iEBw2NW0z+x3rkt0uR1H9p7UYjHgjUyAvvevfSekB9XBahMQX42c OOLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Xy/y3j3K4QzGfzgp3UQp05AVqeWjQ5VL+9baDRWb5sc=; b=lFhgo+MjKRTjzHUhEG0N+weov9C7qJAC9FYuF1C4R4izVqiXkorl1m3bZv/Epn0j20 vUmtH5U3JBpMsbTS7EU8lwS3y+Nk8MspJOy80mUybPQ+ATbxPTq9tc+umDdqSTKXSAey OtNFVNOEBYBXw8HnvqJez+0+R5Z4FXKnz0oyvhc0z2zNwfCdXMzaeTJZX4wnos9/d967 Gj7TYDMa+nLpfiQhciRBx8T6LoUNYcnQl3QHdsBAm1oYUUczTRNXQk21E8Y/M1VFlqWU LR7njj9zC7aS/DMdSdE0X5mhjcuJ/0axSrAPLhY35Nz72v7uvWaHA3W4AIpAM5Cxq/Lk Zjtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=nq5kbpR2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b1-20020aa7c6c1000000b005024c85f879si78988eds.481.2023.03.27.06.48.19; Mon, 27 Mar 2023 06:48:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=nq5kbpR2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232611AbjC0Ni1 (ORCPT + 99 others); Mon, 27 Mar 2023 09:38:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230379AbjC0NiY (ORCPT ); Mon, 27 Mar 2023 09:38:24 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F8B61718; Mon, 27 Mar 2023 06:38:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1679924302; x=1711460302; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=dVJBi1CSJbvncILoFNPRbdwLCRiIlKW5OwVx2Vpb/Z4=; b=nq5kbpR22XBChluk5yNyFVK9sx7I1OM6t7zW8H3iXxpDqywZzII55aCm MaD68xRw1RcZrcgiAfkroA3YSu6NMbf4NNc0pCmCo0lXSjM6E67DOiQnF sWwDx4B+wXiab89uUbgzDreeaaC7jqcU4Bj1G6qYruIH680w/ZoWa30X0 MHTx+Ji465+USwe+4AAHM38+KtwZnrFH0Mv5mzKh5dyTpilZ5ygvcO0QB R2wQm/fCfAD3Pnp0kiw/erAwctan/Rs7Eso71KVBp5RevRg/U1/cfKKI1 dCgEyL/J198vQXp3Ln+YjVH41LDbFvmEWXFcWTRHzkj4glRsjncvc9ZsP Q==; X-IronPort-AV: E=Sophos;i="5.98,294,1673938800"; d="asc'?scan'208";a="203613708" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 27 Mar 2023 06:38:21 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 27 Mar 2023 06:38:20 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Mon, 27 Mar 2023 06:38:17 -0700 Date: Mon, 27 Mar 2023 14:49:34 +0100 From: Conor Dooley To: Guo Ren CC: , , , , , , , , , , , , , , , , , Guo Ren Subject: Re: [PATCH -next V11 1/3] riscv: stack: Support HAVE_IRQ_EXIT_ON_IRQ_STACK Message-ID: <77e67121-3857-4389-897b-77a6506a3443@spud> References: <20230324071239.151677-1-guoren@kernel.org> <20230324071239.151677-2-guoren@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bZdHL0QuALWZLGDg" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --bZdHL0QuALWZLGDg Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 27, 2023 at 09:32:51PM +0800, Guo Ren wrote: > On Mon, Mar 27, 2023 at 7:30=E2=80=AFPM Conor Dooley wrote: > > > > On Fri, Mar 24, 2023 at 03:12:37AM -0400, guoren@kernel.org wrote: > > > From: Guo Ren > > > > > > Add independent irq stacks for percpu to prevent kernel stack overflo= ws. > > > It is also compatible with VMAP_STACK by implementing > > > arch_alloc_vmap_stack. Many architectures have supported > > > HAVE_IRQ_EXIT_ON_IRQ_STACK, riscv should follow up. > > > > > > Tested-by: Jisheng Zhang > > > Signed-off-by: Guo Ren > > > Signed-off-by: Guo Ren > > > > > --- a/arch/riscv/kernel/irq.c > > > +++ b/arch/riscv/kernel/irq.c > > > @@ -9,6 +9,37 @@ > > > #include > > > #include > > > #include > > > +#include > > > + > > > +#ifdef CONFIG_IRQ_STACKS > > > +DEFINE_PER_CPU(ulong *, irq_stack_ptr); > > > > btw, sparse is complaining about this variable: > > ../arch/riscv/kernel/irq.c:15:1: warning: symbol '__pcpu_scope_irq_stac= k_ptr' was not declared. Should it be static? > I declared it in traps.c, maybe I should put it in the vmap_stack.h. Ahh, I was distracted by the DEFINE_PER_CPU above and didn't look at where the actual declaration was.. Moving it to a header sounds good to me, thanks. --bZdHL0QuALWZLGDg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZCGe7gAKCRB4tDGHoIJi 0mLWAP4rp/MPI/P/M/C92bO7bf4f3lX+L/7fmSNZrzm/FLCMdwD6A0aWsBLYPXVt 7GpynNcJOjN1reQhsOA4nhNcMQCVLAY= =KsYo -----END PGP SIGNATURE----- --bZdHL0QuALWZLGDg--