From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) (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 2DFED56457 for ; Thu, 2 May 2024 09:32:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714642369; cv=none; b=f2kluj5eqM+g+yNwY4IubGwUbtIsYRxRzryiBss1s/Ryx9UdlCXPWUNv/gUtQdgNnWN6rJ70TpET0JsFftpC+dml5KIpBHcqzURu5HSfU/57zlvzruEzT2q6WuVoWeS5pQPnrFJIaLab+e6V1apvc3Lmnc72lxKbcb08WbKZg1Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714642369; c=relaxed/simple; bh=+KdPWEN16wQ9Tm9ok2b58EnczYYvk8kPtRWjVxLHs/Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=H1uStz136EMRsjEHwR6JV5GT63arkfBcFww0cc9ajm4kY0NgYPw/Wyvy+uRPwCbN4SnNSd2TvT9KSkBrQ81stAVaMeczYGdVMI80H3f0a+n+gMQfdqpGJ+e+qL1+N+d4kX4ygmcLRJZIDdFGi0FzXog2+eRU3Gc7jJSFmo1k08M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com; spf=pass smtp.mailfrom=ventanamicro.com; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b=kPPRWhN1; arc=none smtp.client-ip=209.85.167.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="kPPRWhN1" Received: by mail-oi1-f182.google.com with SMTP id 5614622812f47-3c71c7e2d40so1797167b6e.3 for ; Thu, 02 May 2024 02:32:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1714642367; x=1715247167; darn=lists.linux.dev; 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=FvW/lnO7fBno/xaBzZIt3Emz2T8DvtxIkgq7/bGwou8=; b=kPPRWhN1Ub50xOl9LJJPq0pmdPuxhnI1eMXP4Tud0euCAj9yUQyMTaJjZAfpuc+3ZB SYYBngfft2I7M7liOTKDBo4CabvLiZ4DrCgMQKu0yHou8kx0qPsw2jNnangtLPpHo+t/ apGDaOZr/K4gGYvY+USn6UeB9JkXz63MZrfffbGXd3svRGj6zxP+29EB0Qy7arjQbd/p RbSbHScMz4P7al4e1+m5NdbiEWWL+uoO900ONdqWszUGZ4GY1fghmvdFBwd7Ne7vuUA2 /8C9/twQ5FuBWU40zV7ZUWhv0OfX1XcGbnxkl62HXDNpzb82nwWolApfI3R2jCnt0u6J U/zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714642367; x=1715247167; 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=FvW/lnO7fBno/xaBzZIt3Emz2T8DvtxIkgq7/bGwou8=; b=Q7LS/zZxhmyKade5MvdH8ffwB8La/vyv6tJIceszR60ILKoUGa9n/7l6AgOl4SbOaU JEto4Nm+yoyfV0Iv/Ryx11TRlh6yp2YDoHVlV5cvAkOPEr0m8GoHSaZg86CshgNKCtiE gvQMh/2jWIE5v6Hd3e65I5hqPuHxNlWtbDGEQ0aVtfpaWI0v4b3vnS5lSRZESsN5PD+m CK8XWJvluAFzZnVc10gjjk+aoDbXsaYVQ9QL7A5TXZBsn7Vx9YhFjxsKjLVC/AMyPAJq ZNsVfIJOfzTBs4aYgzySps63r9e7JBdJhnRaFsE72uVW1XwwZ/qiML/gzxLUmO+P3UWK rWgw== X-Forwarded-Encrypted: i=1; AJvYcCUC5AUx/xiO24jJhAp2KUa5Z8/LFImSkgu9iivdaFr8u2w1EpHq4jBw9XntBfP0hp0Xh3fgBK92F68UQr8I6XRv8U2LbM3R2eG6qr3Q X-Gm-Message-State: AOJu0YyiRh3RcnBOLmKisO151gsILQ0iJKhBE02Az3VsNG6wdiuQeOfL 7FAKCB2lRNpNvR6scUxS7Y5CIyKwN9r1QVaEx+MdSPy1F59camZwYjvBW+MsYdE= X-Google-Smtp-Source: AGHT+IF4b+lPGskb1gHK2IpUgfNkpEMYBXho2rUofukPTZVb0za3mVEu5Rsh7KTHfVzjAbIKdeiEtg== X-Received: by 2002:a05:6359:4c9e:b0:18f:673e:fce2 with SMTP id kk30-20020a0563594c9e00b0018f673efce2mr6283164rwc.6.1714642367069; Thu, 02 May 2024 02:32:47 -0700 (PDT) Received: from sunil-laptop ([106.51.190.19]) by smtp.gmail.com with ESMTPSA id l25-20020a63ba59000000b0060795a08227sm692025pgu.37.2024.05.02.02.32.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 02:32:46 -0700 (PDT) Date: Thu, 2 May 2024 15:02:33 +0530 From: Sunil V L To: Andy Shevchenko Cc: Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, acpica-devel@lists.linux.dev, Catalin Marinas , Will Deacon , Paul Walmsley , Albert Ou , "Rafael J . Wysocki" , Len Brown , Bjorn Helgaas , Anup Patel , Thomas Gleixner , Samuel Holland , Greg Kroah-Hartman , Jiri Slaby , Robert Moore , Conor Dooley , Andrew Jones , Marc Zyngier , Atish Kumar Patra , Andrei Warkentin , Haibo1 Xu , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= Subject: Re: [PATCH v5 08/17] ACPI: pci_link: Clear the dependencies after probe Message-ID: References: <20240501121742.1215792-9-sunilvl@ventanamicro.com> <20240501165615.GA758227@bhelgaas> Precedence: bulk X-Mailing-List: acpica-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, May 02, 2024 at 12:25:35PM +0300, Andy Shevchenko wrote: > On Wed, May 01, 2024 at 11:56:15AM -0500, Bjorn Helgaas wrote: > > On Wed, May 01, 2024 at 05:47:33PM +0530, Sunil V L wrote: > > > RISC-V platforms need to use dependencies between PCI host bridge, Link > > > devices and the interrupt controllers to ensure probe order. The > > > dependency is like below. > > > > > > Interrupt controller <-- Link Device <-- PCI Host bridge. > > > > > > If there is no dependency added between Link device and PCI Host Bridge, > > > then the PCI end points can get probed prior to link device, unable to > > > get mapping for INTx. > > > > > > So, add the link device's HID to dependency honor list and also clear it > > > after its probe. > > > > > > Since this is required only for architectures like RISC-V, enable this > > > code under a new config option and set this only in RISC-V. > > ... > > > > + if (IS_ENABLED(CONFIG_ARCH_ACPI_DEFERRED_GSI)) > > > + acpi_dev_clear_dependencies(device); > > > > This is really a question for Rafael, but it doesn't seem right that > > this completely depends on a config option. > > +1 here, fells like a hack and looks like a hack. > I can remove the config option. I just thought this would probably never required to be called on other architectures. Unless there is an objection, I will remove it in next version. Thanks! Sunil > > Is there a reason this wouldn't work for all architectures, i.e., what > > would happen if you just called acpi_dev_clear_dependencies() > > unconditionally? > > -- > With Best Regards, > Andy Shevchenko > > 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 57BD2C4345F for ; Thu, 2 May 2024 09:33:01 +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=m6gGXAYAi4eVU/InvGoROjCFvXe5s1YFhIuhBTcNCdA=; b=H86Q4i8l3T56nE DcguHrbpuwCJnVv3FrLP8fcmFFKo4/QnesxDC+3iHdt1y4fCGOHcglfrDTqXqK1+rfHSHc5sbE9ry rJ2Q3tHibRMhP9Tpl9bZObr4dZYJc6SnXSmaf2QBYce/I7zOv9/nN0If6DTx8yLhBhkafSWgHQl0J gKFZx2gn5/KMCOe8WQAkHyQhG34KdtaPxe+j61XhDhFZ1ib2PopeltYek/xfLXvJ4jbispRdWkh1s BpSB4vohWln0wdyUe8maxcIpOQ7PrGpCXIXY2+4n+HUqpZVoYqFI5U3OhXW7SKyeRpCPm5vAiYZTZ rXAATLdoNioQaN+NAwYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2So9-0000000CAtI-2eyv; Thu, 02 May 2024 09:32:53 +0000 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2So5-0000000CAsI-2PA5 for linux-riscv@lists.infradead.org; Thu, 02 May 2024 09:32:51 +0000 Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-6ea2436de79so4012080a34.1 for ; Thu, 02 May 2024 02:32:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1714642367; x=1715247167; darn=lists.infradead.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=FvW/lnO7fBno/xaBzZIt3Emz2T8DvtxIkgq7/bGwou8=; b=jZ7qCxzqQ90UPjPVAPtGCTfQ0uN5B8TFBgKgtXjisBPq0qYlqlBTZNDrqfJHXxmkj3 oBHvW3T6hhgd7qDAp2vX0iGXCnBAw00xOHH8ike8Zw2rCiUo3JH5pG38GUi+3jApZ9kD hKyWM1sFdDXMrTIAXaCNgtxLjdcKw8Ep7j971h3GDOGsOnOPxAkjwUTiZjgkJxybgR3C v0DmUCjwI7S5oz8ueysZSdxOAXkJMvY1Z1HDlU3E7t7UjFvy+NUbIKTF5aMG9RojOMOA EHlA7MmciAAnELN8R65Ibg256NBUvX3b2IhKsYbJu5uprkBOFN7vCWqtmLdFlt/1M3o3 6idA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714642367; x=1715247167; 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=FvW/lnO7fBno/xaBzZIt3Emz2T8DvtxIkgq7/bGwou8=; b=w1rAl5ocCW4slf8num8uMGXcBu1m3dKXP94wsRRcEaMgGK5lhsRTkav5jONTiK1whU 2kpk15cvlv+dLc8QVv30b/NcxR7eJmIK/LSbUz9F35oBRFmfJ9x04Et3iIM8LhYjHBVY lpGPZYgD3SbKadfjMeAIbUlI5DUWPj72FkRFDYoyPSfPgdVWtMPTo3cShYqsl5NaHJO3 mXOOSDq8mDkzfDJimUlnbJFNFDcNQJ/p9TYVQu9++Y1rcWGOJOwz1oCvbHXL4mKJ+U5r YnqCxqhOWW7fDkXfnyJNP58cDAJSfEYkE+fnilu2q6LZYnd8zoPg2J4YnZ8hV7V/ryz2 J1xg== X-Forwarded-Encrypted: i=1; AJvYcCU72LtLNz0jQ9i/8F0BV67WQbN5Q8Z15uxoPwYSpNdukG+viO+mCVXUi8Q+e/s3+nDfqJU2cqxbcwjgtFqwzWZ90r5G73dBIY1rmNeTF8ha X-Gm-Message-State: AOJu0YwIw3NfoBoKajVEftjNUSZUwuYgEq9z9WuZgsoZpJeioLE6liqN OGHt8hZypoQMNiGfRhgqjM/jY51qg43jHVjlQjNf+9VE233Z8JEQVkrK2mBtgqc= X-Google-Smtp-Source: AGHT+IF4b+lPGskb1gHK2IpUgfNkpEMYBXho2rUofukPTZVb0za3mVEu5Rsh7KTHfVzjAbIKdeiEtg== X-Received: by 2002:a05:6359:4c9e:b0:18f:673e:fce2 with SMTP id kk30-20020a0563594c9e00b0018f673efce2mr6283164rwc.6.1714642367069; Thu, 02 May 2024 02:32:47 -0700 (PDT) Received: from sunil-laptop ([106.51.190.19]) by smtp.gmail.com with ESMTPSA id l25-20020a63ba59000000b0060795a08227sm692025pgu.37.2024.05.02.02.32.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 02:32:46 -0700 (PDT) Date: Thu, 2 May 2024 15:02:33 +0530 From: Sunil V L To: Andy Shevchenko Cc: Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, acpica-devel@lists.linux.dev, Catalin Marinas , Will Deacon , Paul Walmsley , Albert Ou , "Rafael J . Wysocki" , Len Brown , Bjorn Helgaas , Anup Patel , Thomas Gleixner , Samuel Holland , Greg Kroah-Hartman , Jiri Slaby , Robert Moore , Conor Dooley , Andrew Jones , Marc Zyngier , Atish Kumar Patra , Andrei Warkentin , Haibo1 Xu , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= Subject: Re: [PATCH v5 08/17] ACPI: pci_link: Clear the dependencies after probe Message-ID: References: <20240501121742.1215792-9-sunilvl@ventanamicro.com> <20240501165615.GA758227@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240502_023249_647164_61CF0465 X-CRM114-Status: GOOD ( 26.66 ) X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Thu, May 02, 2024 at 12:25:35PM +0300, Andy Shevchenko wrote: > On Wed, May 01, 2024 at 11:56:15AM -0500, Bjorn Helgaas wrote: > > On Wed, May 01, 2024 at 05:47:33PM +0530, Sunil V L wrote: > > > RISC-V platforms need to use dependencies between PCI host bridge, Link > > > devices and the interrupt controllers to ensure probe order. The > > > dependency is like below. > > > > > > Interrupt controller <-- Link Device <-- PCI Host bridge. > > > > > > If there is no dependency added between Link device and PCI Host Bridge, > > > then the PCI end points can get probed prior to link device, unable to > > > get mapping for INTx. > > > > > > So, add the link device's HID to dependency honor list and also clear it > > > after its probe. > > > > > > Since this is required only for architectures like RISC-V, enable this > > > code under a new config option and set this only in RISC-V. > > ... > > > > + if (IS_ENABLED(CONFIG_ARCH_ACPI_DEFERRED_GSI)) > > > + acpi_dev_clear_dependencies(device); > > > > This is really a question for Rafael, but it doesn't seem right that > > this completely depends on a config option. > > +1 here, fells like a hack and looks like a hack. > I can remove the config option. I just thought this would probably never required to be called on other architectures. Unless there is an objection, I will remove it in next version. Thanks! Sunil > > Is there a reason this wouldn't work for all architectures, i.e., what > > would happen if you just called acpi_dev_clear_dependencies() > > unconditionally? > > -- > With Best Regards, > Andy Shevchenko > > _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 D2881C4345F for ; Thu, 2 May 2024 09:33:13 +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=ilYdSmygMqxheXb3Qvldsuh4Go6i5/DxZ2Fo7ohorEY=; b=2OJNYXRUK9m5cO 0J0i4baTSvHjZJIcAhaxHTy9xUDgzmSnfiW963AuhhXanlM9g3APIDjM+BRo0sAqKehDcSycRUt/+ iAQx9ZpeXgYnC+9CdLt6otuLaCAtFm1f35roRkCaIgj1ygGq5pCNFvCJAJQrkXCjurPM/nJDZtasR y8mEhFO0aBitUhyhBl+byGBiTsZDAo0d8Wl6KYxgkhLiSNQPAdz2Uh8OzyAFm1EOEIVEZeLoKUV/f iYT8Rl5M/2Pcm0hZoiDdz22YgPZlFX81Iiut/z0JKuO/cdNzVEVU4psVdcBQoe7mMEK0WkdawF1h5 JRfObLhw0bXokB7pOqCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2SoA-0000000CAuK-1AHg; Thu, 02 May 2024 09:32:54 +0000 Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2So5-0000000CAsJ-2PIG for linux-arm-kernel@lists.infradead.org; Thu, 02 May 2024 09:32:51 +0000 Received: by mail-ot1-x32f.google.com with SMTP id 46e09a7af769-6ee1b203f30so2868881a34.0 for ; Thu, 02 May 2024 02:32:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1714642367; x=1715247167; darn=lists.infradead.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=FvW/lnO7fBno/xaBzZIt3Emz2T8DvtxIkgq7/bGwou8=; b=jZ7qCxzqQ90UPjPVAPtGCTfQ0uN5B8TFBgKgtXjisBPq0qYlqlBTZNDrqfJHXxmkj3 oBHvW3T6hhgd7qDAp2vX0iGXCnBAw00xOHH8ike8Zw2rCiUo3JH5pG38GUi+3jApZ9kD hKyWM1sFdDXMrTIAXaCNgtxLjdcKw8Ep7j971h3GDOGsOnOPxAkjwUTiZjgkJxybgR3C v0DmUCjwI7S5oz8ueysZSdxOAXkJMvY1Z1HDlU3E7t7UjFvy+NUbIKTF5aMG9RojOMOA EHlA7MmciAAnELN8R65Ibg256NBUvX3b2IhKsYbJu5uprkBOFN7vCWqtmLdFlt/1M3o3 6idA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714642367; x=1715247167; 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=FvW/lnO7fBno/xaBzZIt3Emz2T8DvtxIkgq7/bGwou8=; b=RGgumf6pzZiDMlyHxloOPf9N+CXqxt+6JAyW9WGd2M4VivNESExueGemT4OvwLNB5J Y1dOc7J/2tkjatP7WYfYNwnbZm9fyvBLUrKUZ+mQFdP9XgIcjxEr6HcV2BDzsK3dqz6X P4nNwV7ZeioPo3vz2NWO1in/XA0ofUBA7u86VjlqFi4rFXolDVBW8v5QN7VZ0x7TYXY3 CCPdYx3gWEyD4XGiDRL4YbqCZ6lRU9KSAx2TUqU2uytndo+4HK6BwTz5r/PzQhfqzkgT nedXCX/Ke1Cn8Su/2z8AyTRshZtSe91oYrbocbo6FhqC3poki9V8aPNn4JjW9yiagA0C cs1g== X-Forwarded-Encrypted: i=1; AJvYcCV8cIIjItNO2moq6YhMMbUdBJuoeOOzr26FS+mG0duMK+TQpwcVO4BVPYC/NrsrMtXn+XKEOwC0zXAw/TCfTmJNqrxVqsrVBQrEx75EeaS4QpUppR4= X-Gm-Message-State: AOJu0YzJhCkF9+CwT7hUM8CkjLOI+uZGhc21InJDq0w52KqQGT8rBqrs ffJBvT3jajV3eAYDq+AYiM+626s/rNeMmAH9VP+cO/4iix04qaXvcGLxBwFE6AA= X-Google-Smtp-Source: AGHT+IF4b+lPGskb1gHK2IpUgfNkpEMYBXho2rUofukPTZVb0za3mVEu5Rsh7KTHfVzjAbIKdeiEtg== X-Received: by 2002:a05:6359:4c9e:b0:18f:673e:fce2 with SMTP id kk30-20020a0563594c9e00b0018f673efce2mr6283164rwc.6.1714642367069; Thu, 02 May 2024 02:32:47 -0700 (PDT) Received: from sunil-laptop ([106.51.190.19]) by smtp.gmail.com with ESMTPSA id l25-20020a63ba59000000b0060795a08227sm692025pgu.37.2024.05.02.02.32.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 02:32:46 -0700 (PDT) Date: Thu, 2 May 2024 15:02:33 +0530 From: Sunil V L To: Andy Shevchenko Cc: Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, acpica-devel@lists.linux.dev, Catalin Marinas , Will Deacon , Paul Walmsley , Albert Ou , "Rafael J . Wysocki" , Len Brown , Bjorn Helgaas , Anup Patel , Thomas Gleixner , Samuel Holland , Greg Kroah-Hartman , Jiri Slaby , Robert Moore , Conor Dooley , Andrew Jones , Marc Zyngier , Atish Kumar Patra , Andrei Warkentin , Haibo1 Xu , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= Subject: Re: [PATCH v5 08/17] ACPI: pci_link: Clear the dependencies after probe Message-ID: References: <20240501121742.1215792-9-sunilvl@ventanamicro.com> <20240501165615.GA758227@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240502_023249_642903_17832644 X-CRM114-Status: GOOD ( 28.13 ) 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 On Thu, May 02, 2024 at 12:25:35PM +0300, Andy Shevchenko wrote: > On Wed, May 01, 2024 at 11:56:15AM -0500, Bjorn Helgaas wrote: > > On Wed, May 01, 2024 at 05:47:33PM +0530, Sunil V L wrote: > > > RISC-V platforms need to use dependencies between PCI host bridge, Link > > > devices and the interrupt controllers to ensure probe order. The > > > dependency is like below. > > > > > > Interrupt controller <-- Link Device <-- PCI Host bridge. > > > > > > If there is no dependency added between Link device and PCI Host Bridge, > > > then the PCI end points can get probed prior to link device, unable to > > > get mapping for INTx. > > > > > > So, add the link device's HID to dependency honor list and also clear it > > > after its probe. > > > > > > Since this is required only for architectures like RISC-V, enable this > > > code under a new config option and set this only in RISC-V. > > ... > > > > + if (IS_ENABLED(CONFIG_ARCH_ACPI_DEFERRED_GSI)) > > > + acpi_dev_clear_dependencies(device); > > > > This is really a question for Rafael, but it doesn't seem right that > > this completely depends on a config option. > > +1 here, fells like a hack and looks like a hack. > I can remove the config option. I just thought this would probably never required to be called on other architectures. Unless there is an objection, I will remove it in next version. Thanks! Sunil > > Is there a reason this wouldn't work for all architectures, i.e., what > > would happen if you just called acpi_dev_clear_dependencies() > > unconditionally? > > -- > With Best Regards, > Andy Shevchenko > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel