From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 94E18C6FA93 for ; Tue, 27 Sep 2022 15:58:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2O272Kfl4nRU+T0dPC8Jk8HqByjUfLXRoPWt8zYQzvc=; b=ehaKi91OMmDUt7 UL5TyMNgS4UqU4Tj96xGDQxYYM6Fan5pCIkxaHTKDa1zOGVjtLnRP1VjuqGecuoZjfBa+aKw2BiHJ NiYa2mxc3oUwFFpcCGHwwH1sukEWBNr6AmmZWyCHNAJezZ5bnu/VLV/BZzqSZQZ73eH/B+Rbsseqt 4SV5rjst/qvzLP0uRBGchZV438yU/g8JmoOEQj4ZzaTZU+/mn8j1mnBsHuZkndBCvUeoqQUfd6pEs Yj3Ez6VAVSPN2xyjUjmk+PYaBGkCDkaFIl80hTNnQ7H1QMy8+d/kns7nedOpgGgAxkdGEdJIr4+bj PN+KjqtvQl8bTnUGgC5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1odCxW-00BfQv-G7; Tue, 27 Sep 2022 15:57:22 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1odCxT-00BfOy-M6 for linux-arm-kernel@lists.infradead.org; Tue, 27 Sep 2022 15:57:21 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4EB2261A22; Tue, 27 Sep 2022 15:57:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98B9EC433C1; Tue, 27 Sep 2022 15:57:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664294234; bh=AP0yvi+xNBHfgk9amxtHM4EwDwHpYgIKDtg3jxHprIY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pBUS9s/SQi7lULWKftZBuxS2KEdhgwNZsfkNQF3CznWTz/wsIAn2D+KkIK8tYivu7 RpjQQa3gtXzIMu5SnmqaCQdLlZivOPr32jQ3KHsRJjaM8vOF0qdxgbiQ0pH4779dHe w1/58xuOKnj4B+AaaaQ/aVbyutfT2VTVubonhl1VYZDjORbnUUPYC3Hp4tsAUW5eZU Vy0j90p7pBzXACliOsQ9AULPjpgjaWb/fSks/NX7NSdd9KijX7SA6VzvLInFuZFXUF ie+k+H6/7l9gPpO3oS4Gms3gJ7NpP2KFYOj0MnT9lHSIUAa4dlpMcSBTkEMaKA/BKc 06E8G37Mu8n3Q== Date: Tue, 27 Sep 2022 17:57:09 +0200 From: Lorenzo Pieralisi To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Marek =?iso-8859-1?Q?Beh=FAn?= , Lorenzo Pieralisi , Bjorn Helgaas , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 03/11] PCI: aardvark: Add support for DLLSC and hotplug interrupt Message-ID: References: <20220818135140.5996-1-kabel@kernel.org> <20220818135140.5996-4-kabel@kernel.org> <20220916182302.4eba1b48@dellmb> <20220927111357.wctpynl6lmr5ei3a@pali> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220927111357.wctpynl6lmr5ei3a@pali> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220927_085719_815480_68CCE364 X-CRM114-Status: GOOD ( 21.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Sep 27, 2022 at 01:13:57PM +0200, Pali Roh=E1r wrote: > Hello! Just briefly from my side, but Marek would probably answer it > better. > = > On Tuesday 27 September 2022 10:29:26 Lorenzo Pieralisi wrote: > > Better, certainly. Question, also related to Marc's query. Do you > > rely on the hotplug (emulated IRQ) to be run _before_ carrying on > > with PCI config space accesses following a link-up detection ? > = > During PCI config space access is PCI core code holding atomic raw spin > lock, so link-up check from PCI config space can throw emulated HP IRQ > only _after_ config space is finished (when IRQs are unmasked again). So > it happens after (not before). > = > > How was the jiffies + 1 expiration time determined ? > = > jiffies + 1 was chosen as the earliest possible time when HP IRQ can be > thrown. Somebody said to me (year or more ago, no remember who and > when) that I cannot use just "jiffies", I have to use "jiffies + 1", so > timer would be scheduled after my call finish, which is after PCI config > space access finish. jiffies + 1 should be the earliest possible time > with the highest priority. > = > > I assume you > > want to run the emulated HP IRQ asap - the question though is > > how fast should it be ? > = > HP IRQ should be thrown _ASAP_ when we know that link is up, so PCIe HP > driver can handle it and do its job. Just like for hardware which fully > and correctly supports link up HP IRQs. My question really is - what are we expecting the HP core code to fix up ? And related, is it safe to carry on with the PCI config space access till the IRQ is actually emulated to carry out those actions ? Lorenzo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel