Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp270893rdb; Thu, 1 Feb 2024 08:06:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IGtpYjvTMe87Ll+OJN1Vx9Y0a2szGiYACrdRNsFON6AR2dHDyAwrVyZaLnSudj62CzyqWSc X-Received: by 2002:a17:906:a883:b0:a36:5079:d6c9 with SMTP id ha3-20020a170906a88300b00a365079d6c9mr3713270ejb.76.1706803580330; Thu, 01 Feb 2024 08:06:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706803580; cv=pass; d=google.com; s=arc-20160816; b=vcDTcfIkUqLcJ2bZqvg+PMOamPTlagdILAvtHMfwGiDwDhrFIQRZGBPGK3NtUJ+HiO CVUIjXTOXSfk9pmbB1BTeG9daTj9dbil0853neRrhmXzgPSeeoXivNPn8UgV3Gs47Atp GVyJpmVXaT8s1k8PymRr3VMic4FizMXUVA/s1VydNlIh2E9Xp/jUYnmwgFJegUtxtoou Crg4/MkBMrn0mJ1T1FSps0agcRe3Ze/PdBBKXJPqKrvMJyQQrqLjbp0hZER/JHfUZH8d AUVBralGUsVo3r13ohnb/l+EOjzD/CpniQ51YthFww78aWzyrW+2POeZ+TPqaeMmlxJZ fIXQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:date:from :dkim-signature; bh=uXt0cS8IvaG8Qm1bbLlxoBzI2ajQmfVjD+Hh9FJ+WqQ=; fh=2eAUF/SnBCyvg82pFbz1O61L7BW4oofu5c3+99IgiDM=; b=tsL8srGB/yNCutAsIN9RsaglwPcdw27QNpmEPXqLn+FlUrcITj1abUaYZ2jFxumeOp GjotdqX/EhakjbjqD35yRm9MdEyTeMlXaPvTEfs0J3EAP8gcM/Nf6kU6m4h0FwMk0FDW 0vKkrd9qcRRoO8df27I2ePeDqAUSsJidASHtKGmMPDtGAMx069Nb10KIgdWAhtLbUzf5 +xHv20GSmMqPYIHiBDkeDkzarwPMKslM8s+Gk2s+8wEdKSgw1gtkwUu2Pr4tLpyC3PUm CaUswJQSN+INvtuNbdFnXI1mgSvZxEv+kTQZi12GUgZCNOAPSNTb36RuBZySbA5crVKk pYSQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="IU/9G31n"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-48333-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48333-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCV+iFzQSRMBzIJ1OF39EDa5n+X2uyY2JAOdoXIgh6gI4NT/QkCX3Raggo1j///H7KnFSxZC5JTFArqayHdtDZOIE1i52fTEae4D7QPEVA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id v14-20020a1709064e8e00b00a36d5a7d77asi416764eju.536.2024.02.01.08.06.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 08:06:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48333-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="IU/9G31n"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-48333-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48333-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A213F1F2792B for ; Thu, 1 Feb 2024 14:47:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4EA9A5F48A; Thu, 1 Feb 2024 14:47:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="IU/9G31n" Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C07945F491; Thu, 1 Feb 2024 14:47:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.134.136.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706798844; cv=none; b=Zv3l7lny6zbwgabwR6eOq3v5Qmoh25faaiBGp6dXFOzoEm8i7b/PQIuxf0UOwBwtElZ/0mCBffpmy/ezdGGe+HJLBbCoKPUk8h5/B4pBlrDZDgwogMCbLYZBmeWFWwQHGR0JrKxlS8hcgsjHz3kNapKSIzTT9bj/SkfX4lMy5vg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706798844; c=relaxed/simple; bh=qgms/9isPo0TXHC6cRuho639q8nVW5hPrmWxyYGXX6Q=; h=From:Date:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=lJR6qlSh2EfxQDqI7GLALhd/ilVPEfd25j2X00Vb2vwuGZPoT9mtO/7n58jilzimbcJ4kfUflKNReGdKOkLH8BQUlpCnRf7dpSUY5TTYQdipBL5nsp7B3QAyQDmrcRm3+XJliIiMQHpD3xzEO9YHtQaTLQn6E09wrl0E6bhQp5w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=IU/9G31n; arc=none smtp.client-ip=134.134.136.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706798842; x=1738334842; h=from:date:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=qgms/9isPo0TXHC6cRuho639q8nVW5hPrmWxyYGXX6Q=; b=IU/9G31nm9/5rgh15vuSaxp08Ulo93ev+f7aOUnfDp2/sacjBfcBXD8r 0BOhUce4aNlHNzoJmk36LWsYWo1IiHwNI5eAq0ZKFLqRLRbp3qFd69RnZ pM0ZtkNqCJdGQFOBZj3ANmHTG9IsqV2aV7wjww6dpcB3OjBjplut22VZ8 B2v4B8aV5J1jXsdHWOcaC4mdXM/bvayvNHQOb+p4nDJHoM/HlZr641Pu0 2rtEsBnip8I/KFKs7YuJ8A01yFOzYidLMlvD5n5PjFcuu5NbBV54M/8E6 zKM73RLf/tcOP9nrMKPZbECIm475wPuv3n8A/1fZogccAAnbAeTt1f9D1 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="407626471" X-IronPort-AV: E=Sophos;i="6.05,234,1701158400"; d="scan'208";a="407626471" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2024 06:47:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,234,1701158400"; d="scan'208";a="4394902" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.246.33.1]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2024 06:47:19 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Thu, 1 Feb 2024 16:47:14 +0200 (EET) To: Jonathan Woithe cc: Igor Mammedov , Andy Shevchenko , linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Rob Herring , =?ISO-8859-2?Q?Krzysztof_Wilczy=F1ski?= , Lukas Wunner , Mika Westerberg , "Rafael J . Wysocki" , LKML Subject: Re: [PATCH v2 0/7] PCI: Solve two bridge window sizing issues In-Reply-To: Message-ID: <1ee94000-14af-3edf-10b6-acd821075d3e@linux.intel.com> References: <20231228165707.3447-1-ilpo.jarvinen@linux.intel.com> <20240104131210.71f44d4b@imammedo.users.ipa.redhat.com> <62b66d58-7824-3650-6a73-12068a22563e@linux.intel.com> <20240122144520.7761c5a6@imammedo.users.ipa.redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323328-945909834-1706798834=:1028" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-945909834-1706798834=:1028 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 1 Feb 2024, Jonathan Woithe wrote: > On Mon, Jan 22, 2024 at 02:45:20PM +0100, Igor Mammedov wrote: > > On Mon, 22 Jan 2024 14:37:32 +0200 (EET) > > Ilpo J=C3=A4rvinen wrote: > >=20 > > > On Mon, 22 Jan 2024, Jonathan Woithe wrote: > > >=20 > > > > On Sun, Jan 21, 2024 at 02:54:22PM +0200, Andy Shevchenko wrote: = =20 > > > > > On Thu, Jan 18, 2024 at 05:18:45PM +1030, Jonathan Woithe wrote: = =20 > > > > > > On Thu, Jan 11, 2024 at 06:30:22PM +1030, Jonathan Woithe wrote= : =20 > > > > > > > On Thu, Jan 04, 2024 at 10:48:53PM +1030, Jonathan Woithe wro= te: =20 > > > > > > > > On Thu, Jan 04, 2024 at 01:12:10PM +0100, Igor Mammedov wro= te: =20 > > > > > > > > > On Thu, 28 Dec 2023 18:57:00 +0200 > > > > > > > > > Ilpo J=C3=A4rvinen wrote: > > > > > > > > > =20 > > > > > > > > > > Hi all, > > > > > > > > > >=20 > > > > > > > > > > Here's a series that contains two fixes to PCI bridge w= indow sizing > > > > > > > > > > algorithm. Together, they should enable remove & rescan= cycle to work > > > > > > > > > > for a PCI bus that has PCI devices with optional resour= ces and/or > > > > > > > > > > disparity in BAR sizes. > > > > > > > > > >=20 > > > > > > > > > > For the second fix, I chose to expose find_empty_resour= ce_slot() from > > > > > > > > > > kernel/resource.c because it should increase accuracy o= f the cannot-fit > > > > > > > > > > decision (currently that function is called find_resour= ce()). In order > > > > > > > > > > to do that sensibly, a few improvements seemed in order= to make its > > > > > > > > > > interface and name of the function sane before exposing= it. Thus, the > > > > > > > > > > few extra patches on resource side. > > > > > > > > > >=20 > > > > > > > > > > Unfortunately I don't have a reason to suspect these wo= uld help with > > > > > > > > > > the issues related to the currently ongoing resource re= gression > > > > > > > > > > thread [1]. =20 > > > > Thanks, and understood. In this case the request from Igor was=20 > > > >=20 > > > > can you test this series on affected machine with broken kernel= to see if > > > > it's of any help in your case? > > > >=20 > > > > The latest vanilla kernel (6.7) has (AFAIK) had the offending commi= t > > > > reverted, so it's not a "broken" kernel in this respect. Therefore= , if I've > > > > understood the request correctly, working with that kernel won't pr= oduce the > > > > desired test. =20 > > >=20 > > > Well, you can revert the revert again to get back to the broken state= =2E > >=20 > > either this or just a hand patching as Ilpo has suggested earlier > > would do. >=20 > No problem. This was the easiest approach for me and I have now done thi= s.=20 > Apologies for the delay in getting to this: I ran out of time last Thursd= ay. >=20 > > There is non zero chance that this series might fix issues > > Jonathan is facing. i.e. failed resource reallocation which > > offending patches trigger. >=20 > I can confirm that as expected, this patch series has had no effect on th= e > system which experiences the failed resource reallocation. From syslog, > running a 5.15.141+ kernel[1]: >=20 > kernel: radeon 0000:4b:00.0: Fatal error during GPU init > kernel: radeon: probe of 0000:4b:00.0 failed with error -12 >=20 > This is unchanged from what is seen with the unaltered 5.15.141 kernel. >=20 > In case it's important, can also confirm that the errors related to the > thunderbolt device are are also still present in the patched 5.15.141+ > kernel: >=20 > thunderbolt 0000:04:00.0: interrupt for TX ring 0 is already enabled > : > thunderbolt 0000:04:00.0: interrupt for RX ring 0 is already enabled > : >=20 > Like the GPU failure, they do not appear in the working kernels on this > system. >=20 > Let me know if you would like to me to run further tests. >=20 > Regards > jonathan >=20 > [1] This is 5.15.141, patched with the series of interest here and the ha= nd > patch from Ilpo. Hi Jonathan, Thanks a lot for testing it regardless. The end result was not a big=20 surprise given how it looked like based on the logs but was certainly=20 worth a test like Igor mentioned. The resource allocation code isn't among= =20 the easiest to track. --=20 i. --8323328-945909834-1706798834=:1028--