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 0BC6FC54EE9 for ; Tue, 27 Sep 2022 11:15:07 +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=4pXprUGJK0sYx/10DLQvyQ/wYP1aC+COVP22tYeJbuk=; b=xdgo4XOU2WN59H Ww41Q1cBzSRS7Tj/V7AgtKyyD1Uu8yRIP1N8Rppsh/GtnuBds1XXIJjHT3Z4Qblu5Kd9dBzcj65Es Jo2daZ6LdYfxX37xcIpT9h68ne8OMYcPFoUeD9HIe03deqz/Tz5lwvI+lp3dV4K+nG3ll5rZW/z5B 65yvwJy9aqO3cCingxJpUvIlqqNSDmfCr1gs1N+3MxjB9XBoYgei/+BOdYBU2UlA17/0Q8nyvdM2j oRCpgWoZwQV9EIRL/nvTnQEIHsL2tluhe5IWsEZtpf0rC+aWG+MDRP3J26jKzRgPKjnJFXp8i04tI 43MGJaw/44di1ReHYyng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1od8XO-00A7tV-Ru; Tue, 27 Sep 2022 11:14:06 +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 1od8XL-00A7rT-Bw for linux-arm-kernel@lists.infradead.org; Tue, 27 Sep 2022 11:14:04 +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 AF686617BE; Tue, 27 Sep 2022 11:14:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF2EDC433C1; Tue, 27 Sep 2022 11:14:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664277241; bh=lVYuYBHbpOk4XfSOSXHqxiv9KB8vmVBtkER0Cdob1AE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XLw06jM8ypiZdZZtN3gvYM4ujPaUpcDm/f03uYUfD/p1X8A6h/MkJeriHEQuh/Sxz MJYKfCM25d7y3S6OCOW81VqV/wfunTwLCDJrp2oP9YapVt2XeZ+tlclp9wqPmmDhmK LT3PXaxKm3pNKMUL1kBoKKI9tts5nNRzBKPeT3Y8G1850FQssrLPJ1mBNawZ4aT2WF BGgZhmI0Jy3zE5yP2mY40ZjHBqW1qSfKl25voKyVg1GNfpoUACbpg4UjRBytpMBjeG DVelcN6ccwIqm9OXCOIBDFHFq/7SK/KNSTAK/dcfl19XYoDev6yGNVd1jT3joeKU/r b6qi4sU/6gn8A== Received: by pali.im (Postfix) id E6843795; Tue, 27 Sep 2022 13:13:57 +0200 (CEST) Date: Tue, 27 Sep 2022 13:13:57 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Lorenzo Pieralisi Cc: Marek =?utf-8?B?QmVow7pu?= , 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: <20220927111357.wctpynl6lmr5ei3a@pali> References: <20220818135140.5996-1-kabel@kernel.org> <20220818135140.5996-4-kabel@kernel.org> <20220916182302.4eba1b48@dellmb> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220927_041403_488987_C72BF661 X-CRM114-Status: GOOD ( 14.27 ) 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="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel