Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4186535rdb; Mon, 11 Dec 2023 11:14:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IEc0RNY8Y4Ad41sMPw6lTQgXNhWZB9UkszVV5+fNhMpqcoHQFWuiNpaKEVPkrdHfRth/u2L X-Received: by 2002:a05:6a00:2e93:b0:6cb:a434:b58f with SMTP id fd19-20020a056a002e9300b006cba434b58fmr6742991pfb.33.1702322071337; Mon, 11 Dec 2023 11:14:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702322071; cv=none; d=google.com; s=arc-20160816; b=JXaNI7UODgpfzVULTup+c1qclTpODIsdqIdCDlpZ9InzIqrKaU+23X5//ChBNeZELg hk7ZsR3ZrbqRsrddsTLk899FNC7sD1PDzOIsQsk/eTx8p7ENlW7wCoBCdFVllP7l4c0t OR26ChKy/fMKnDNdg9s0Xgyha0Vb4z4hwYBdgZH0WyujOMe37Qf14HpofPO1ajDADpzC 2Hj//XZqomzsLjCKZiLsPwEe9M/LoooQQ8WbN1JwuSyzFTJSN9yz0Crvg+KlwQZvi/f8 4Md/NcjpjZQDjXn07tpAzDix4ZUnOMqli3bSz6rr9q0/9FHnbk7jZQkS4htiXweRQVPd gP9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:to:subject:message-id :date:from:in-reply-to:references:mime-version:dkim-signature; bh=DAfezLtwlsLKsGLxIMeUmD/ncEXFCl8paKQT2/k5F8Y=; fh=BDRYN1K/BTasOPw0adnSO58mQFPzEyeZNk/8JRxA8R0=; b=b2udGDl+eukFLfsotWR0orJWjHVi2bHi1m6BZmsJThddOEdAlC/5vg21P0YBvGw8kD niW9V0KBAzbF3q+1QoZhEzWGLDDX5t2pdlRksSNtQNEF0v9CYm1qWcQYruLV545PQJFH FiurZWVv4fAFP/auSVo9PGuiEbu2fQvFjSKIyA+uoUwHy2oNyn5KE4wKzRTM4Z6iuCJz rDcSYrGCTbxTiJKcS5MxA9CsU7pSrUOdxhc1LnqTWoAkP5pA/jcoOUaYAI/m+PhmJq+T 3fNGqaWi1Gu4t2bWTlS7f1cJEJsun3VA2Sh7BcFXnX9E4p+lbMkqGEPVH/zeUXNUdc9x eZ4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IfvCoTgl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id ka23-20020a056a00939700b006ce6a1cbc97si6635660pfb.68.2023.12.11.11.14.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 11:14:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IfvCoTgl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id DABDE8093D7A; Mon, 11 Dec 2023 11:14:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344348AbjLKTON (ORCPT + 99 others); Mon, 11 Dec 2023 14:14:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229516AbjLKTOM (ORCPT ); Mon, 11 Dec 2023 14:14:12 -0500 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20EDFBD for ; Mon, 11 Dec 2023 11:14:18 -0800 (PST) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2c9c18e7990so66814541fa.2 for ; Mon, 11 Dec 2023 11:14:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702322056; x=1702926856; darn=vger.kernel.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=DAfezLtwlsLKsGLxIMeUmD/ncEXFCl8paKQT2/k5F8Y=; b=IfvCoTglC021eQ+oYTMUiWABBsiQmXZ91FOBuJFPgKKBjk1cbNAvUA5eIKRueb6j8W FCupufQNrWGjYjvzDrrkBzXxi8AY0O9W09MoIpbpTXl3FPfiaGNW3vDs/dd/VDW19uSE La03cU2IsqiMOQ/FVjS6slIbpSu8PdKb9Rldo9+Hce9i/GU5GBWWgVrjEPaUOyNem6Bj jrhvkZpFK1MxZLyZxZEF5OlqmFKGIaUPtiJ2aCmttBTbL8O15v+lHRex/3L3dMKit+it NpIZ+noK0EjM7VVOQLbg/AzxGuXL5xpfm++5MtGyyye+Hd+9BWQR5QVPSzoEKyXwaI8e MuZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702322056; x=1702926856; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DAfezLtwlsLKsGLxIMeUmD/ncEXFCl8paKQT2/k5F8Y=; b=Kvli0IA1zrm+QYA8FxDS2puWYydpCWH4jgxMhn3jDE18Ukdps7QIm/8U3tRQCkValr RmMjrbe40VqRMvA0YrVtLsgPrV9K7xHyOBjpfF2gz3azP6/G2KoTHWAocDakdVVqjNSc MOuGD9Mj/RU1cx/PwZUmDV1LwpNGW1+uIMYbp0GOjaPganc8tnlKTkqNVa8eABDOEVjk 2s/1IoX4CXhP4ygKBuKle9r4darUtefGBZYxL3rwmsUYkH7fB2LTeEir2tGS0JGNrybC D6y85UD8wJbVlgopWftTNrDhYC6f8g3jhi0mYeb8dGRg8GVwVzQLkA5X10P48wzBKdnr 2E5A== X-Gm-Message-State: AOJu0YwYvriJjiSR8Ol3RnLy88xxz9fD7fsJR/4eIUi0MdKBYLxPzlyW 0j59qnGR5uXzed2nqGgLTG1W5JbG2HYpkv2REVPOCsmW/46hOA== X-Received: by 2002:a2e:b5b5:0:b0:2cc:2170:87fa with SMTP id f21-20020a2eb5b5000000b002cc217087famr740056ljn.44.1702322056038; Mon, 11 Dec 2023 11:14:16 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ajay Garg Date: Tue, 12 Dec 2023 00:44:03 +0530 Message-ID: Subject: Re: Query on a rare simultaneous processing of interrupts from GIC/NVIC To: linux-arm-kernel@lists.infradead.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 11 Dec 2023 11:14:29 -0800 (PST) Have had some discussion at the following link and following comments : linux kernel - Query on a rare simultaneous processing of interrupts from GIC/NVIC - Stack Overflow Really wish to understand if interrupts can in fact be queued at the software side, if the sequencing mentioned occurs. On Mon, Dec 11, 2023 at 6:36=E2=80=AFPM Ajay Garg = wrote: > > Hi everyone. > > Let's say the following code is shared by multiple ISRs : > > spin_lock_irqsave > > spin_lock_irqrestore > > > > Also, following sequencing happens : > > * > Low-priority interrupt comes in, and GIC/NVIC causes it jump to ISR. > > * > Low-priority interrupt starts executing "spin_lock_irqsave". > > * > Before preemption and interrupts could be disabled (by the executing > low-priority interrupt). high-priority interrupt comes in. > Since a higher priority interrupt has come in, the GIC/NVIC causes it > to start executing the "spin_lock_irqsave" statement. > > * > Through the low-priority interrupt executing, "spin_lock_irqsave" has com= pleted. > Preemption and interrupts are disabled, and low-priority interrupt > grabs the spin lock. > > * > High-priority interrupt spins on the spin-lock. > > > > Is the above sequencing possible? > > In other words, although the first interrupt did its best to disable > all preemption and interrupts before it could enter the critical > section, yet above sequencing *will* cause the high-priority interrupt > to spin? > > > Many thanks in advance for your time for help ! > > > Thanks and Regards, > Ajay