From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8FDF81ACA for ; Fri, 3 Jan 2025 22:47:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735944434; cv=none; b=cyLIzVDBfCZ0ktq1CX7GBOvgSvbMZu5TyIf7H2r7vCZVH0wxPEtVW6xJbp9bneIyaN3gQQ3wntEv/PDYNZqDVWRV/XOaSlROQuoAn9jXn9TLacDNj7RJI6OrKez0oOv8avcD/36etbpGw2N26/B7cpaait8KHzbvyQU7v023NyY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735944434; c=relaxed/simple; bh=P8E+gvJmIvygKyvlnRGIsNHsgErZdgNurCHrS0UTHM0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lxdrXuRI8uK0VHy6FMEQ06vNXfWh3XvketnjFavArEMhw7GWwhBMIBABcjV/VYaYkG4tCuvWUMApUAb4YQCyl1wqNpMDY1M4z7Zf41W0Xa7A9GigMelMQ4IV24Z7stcYR0AXvRBSAxpPZM3DH845HeAZQfw+Mam5Q98uqcIYKDY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=chzta081; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="chzta081" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-2165cb60719so180636255ad.0 for ; Fri, 03 Jan 2025 14:47:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1735944432; x=1736549232; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=wbZWcvbmbP2zpaLuv9bUzmsFWqJNzUQlwoJwEbV2MJA=; b=chzta081nGGCZTTB4ahFWRcCfM9joxFzzEL5pL0ta8QTUzWE+sw1Qd04mf4kz4usOg YvSFFeL07T2nWZ8dJILLONAbM9lQO3nn3LfU3vw4Ui0XlqCYi32I6CpzHgzDmvQlSUiK b8Vs6mmXlCCmX5dWFelDPMXCmwf2/L1lg/qj0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735944432; x=1736549232; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wbZWcvbmbP2zpaLuv9bUzmsFWqJNzUQlwoJwEbV2MJA=; b=ZaCgsqJOskcJ8xTyLWW3zVb/XEfRr9GqvnEhn8rshlhA44vRmgR7+akqVK75kzm5su QwT0AtRvu+20jIwoKyAfRtgnRj95qunt3EYXbvx2Us2hHzg8e9z5gYOiym7nmp5scD9J romAZ0Nq2c6BGzj3LHR7iAdlh5EaoxOXTpa83ukfJNfSCQDj7vHLMazRxz5BbdTdZXvW /4cz+wNt5d9xf7THUsIf2VaTMF4xuTSX0kytss0c1xRPojjLZcz+agZUsyCxLc2IUKSd qc9WdPHefImf2DQBam2EyRJzXPHSiNbR3lX30VnKU69DUIO08P/BvpPmZMI6m5UKwt2t sxYw== X-Forwarded-Encrypted: i=1; AJvYcCW+Fyy7z0lsTKWaJjESirR38m3SMLMdv7rUosBvAUXskDsHDkkXqleSY9K/a9HN/bQt8tE/RV+dvQxxArs=@vger.kernel.org X-Gm-Message-State: AOJu0Yxu/AKfViRlsRwmdO/eKjXxPHQb0HC7pvothkdA510I/E2x/mLh OzSddGtpLB5BgyiC7DOFnczP0/ofI7AfsdTO30iuFBY18zy9TrqDdxA3AE84xw== X-Gm-Gg: ASbGncvYZ5L6/aql2YDfZfNlGW6KiAvRTrojUz4Ru2Bwz/VJSwwjk+eLWNa2xeSgUxK VEQ8pYG3joOPXQZ5jPq6+n0nOhrSOECm+dBH7XG7vW5sHvfXGvOIeH+B8jsn/qargs3FronYFUJ dJf7NgJexPzSeRAjPrt7osPbjKxvuJ7eXsMGgPt9GmmSKDY/SITzJAhCYA4r864DVQLEuCKjOqz /0U/FKBOWPzn/Z94nbPejW7BjEsqL/Va0lMiS4lF2Nz26B4l/E6346ApuYfDxq2soltgi2frr04 LVKd8O1Jawzh/AKFbCo= X-Google-Smtp-Source: AGHT+IHaT2+DbkcwEInnWPgtxUJOcNbztGCijdx/qVD4rKIGVGtz8a1VPVJnqU04Mu39O7QyWx49uw== X-Received: by 2002:a05:6a21:3115:b0:1e1:af74:a235 with SMTP id adf61e73a8af0-1e5e0499fafmr74460516637.24.1735944431936; Fri, 03 Jan 2025 14:47:11 -0800 (PST) Received: from localhost ([2a00:79e0:2e14:7:3330:154b:5c45:7be8]) by smtp.gmail.com with UTF8SMTPSA id 41be03b00d2f7-842b1ce1fd5sm24652155a12.25.2025.01.03.14.47.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Jan 2025 14:47:11 -0800 (PST) Date: Fri, 3 Jan 2025 14:47:09 -0800 From: Brian Norris To: Bjorn Helgaas Cc: Manivannan Sadhasivam , Jingoo Han , Lorenzo Pieralisi , Bjorn Helgaas , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Rob Herring , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Marc Zyngier Subject: Re: [PATCH] PCI: dwc: Use level-triggered handler for MSI IRQs Message-ID: References: <20250103174955.GA4182381@bhelgaas> <20250103175839.GA4182486@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250103175839.GA4182486@bhelgaas> Hi Bjorn, On Fri, Jan 03, 2025 at 11:58:39AM -0600, Bjorn Helgaas wrote: > On Fri, Jan 03, 2025 at 11:49:57AM -0600, Bjorn Helgaas wrote: > > On Thu, Jan 02, 2025 at 05:43:26PM -0800, Brian Norris wrote: > > > On Mon, Dec 30, 2024 at 10:41:45PM +0530, Manivannan Sadhasivam wrote: > > > > On Tue, Oct 15, 2024 at 02:12:16PM -0700, Brian Norris wrote: > > > > > From: Brian Norris > > > > > > > > > > Per Synopsis's documentation, the msi_ctrl_int signal is > > > > > level-triggered, not edge-triggered. > > > > > > > > Could you please quote the spec reference? > > > > > > From the reference manual for msi_ctrl_int: > > > > > > "Asserted when an MSI interrupt is pending. De-asserted when there is > > > no MSI interrupt pending. > > > ... > > > Active State: High (level)" > > > > > > The reference manual also points at the databook for more info. One > > > relevant excerpt from the databook: > > > > > > "When any status bit remains set, then msi_ctrl_int remains asserted. > > > The interrupt status register provides a status bit for up to 32 > > > interrupt vectors per Endpoint. When the decoded interrupt vector is > > > enabled but is masked, then the controller sets the corresponding bit > > > in interrupt status register but the it does not assert the top-level > > > controller output msi_ctrl_int. > > > > "the it" might be a transcription error? Nope, direct copy/paste quote. I unwisely chose not to include a "[sic]". > > > That's essentially a prose description of level-triggering, plus > > > 32-vector multiplexing and masking. > > > > > > Did you want a v2 with this included, or did you just want it noted > > > here? > > > > I think a v2 with citations (spec name, revision, section number) > > would be helpful. Including these quotes as well would be fine with > > me. For the record: DesignWare Cores PCI Express RP Controller Reference Manual Version 6.00a, June 2022 Section 2.89 MSI Interface Signals and DesignWare Cores PCI Express Controller Databook Version 6.00a, June 2022 Section 3.9.2.3 iMSI-RX: Integrated MSI Receiver [AXI Bridge] Sure, I can send v2. > Oh, and it would be awesome if we can motivate this patch by mentioning > an actual problem it can avoid. > > It sounds like there really *is* a problem at least in some > topologies, so I think we should describe that problem before > explaining why we haven't seen it yet. Yeah, that's probably a good idea ... I'm still working out the nature of a problem I'm dealing with here, but it has to do with when (due to HW bugs) I have to configure the parent interrupt (GIC) as edge-triggered. It turns out this change alone doesn't resolve all my problems, but: (a) I was hoping to get feedback on whether this change is sensible regardless of the adjacent HW bug I'm dealing with (I think it is); and (b) I don't think I have a great publishable explanation of my HW bug(s) yet. I understand (b) is not really a great situation for public review and would understand if that delays/defers any action here. But I'm also not really an IRQ expert (though I have to dabble quite a lot) and am interested in (a) still. (If it helps, I can try to summarize the above in a commit message, even if it's still a bit vague.) Brian > > > (Side note: I think it doesn't really matter that much whether we use > > > the 'level' or 'edge' variant handlers here, at least if the parent > > > interrupt is configured correctly as level-triggered. We're not actually > > > in danger of a level-triggered interrupt flood or similar issue.)