Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4505520rdb; Fri, 29 Dec 2023 04:24:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IHDR0AaHIxXiBd5DORK4qFSUpOfVUXC13GoR2Q/JJkopyHRmxa1mwc/sJX3XubhLduQ1dTD X-Received: by 2002:a05:6214:dac:b0:67a:c181:a326 with SMTP id h12-20020a0562140dac00b0067ac181a326mr21974269qvh.14.1703852688376; Fri, 29 Dec 2023 04:24:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703852688; cv=none; d=google.com; s=arc-20160816; b=YRGuCkxRRIb0d03VbTSloznUDIR1W3Cg0VS05uzqlzP5h65J3FsBEHntWka5tRMu5f /vE20zzrUoJ0TwemGMUCqydT5VUfvuZhTtRQwYMjmZQjgSjrTHEn57rhOVKy9FYd10OV T/svyW80BPn+Zg2hObUu49e9KgasRPv6279AJL3pzuPiKolqRpMevYVqAf9WhEhDkDS+ GBPl3x+QSbDQKZXaUI+sp/06URzbZqey3ZPAFdPpOKUN9Jvu4VxG3rdHyV2GviuAws1s pFU8T5J4jV4sAcUvtBSrz0QfUdivz5yXbLTDkb6xqx/dMLU+sL6wfyJayuriOLzh0G5M T3Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=m+9fLIClJIzoEjZOg0STXMha8MrhSpd0nwVKR/ajoO4=; fh=dVTYRjnlLx/77DYFp81sQ+6KrzQzRCFTYwap2aFJ7ik=; b=dBzb8EfZvZoemyHZeP84NLZYEmFOrxVeXrPN3NHkS08MUWCEzxnklZF+djwkas0Xgk K0q8kkZ7rRYlb4hSCRfuUAFuUhpO1Kado3HMFKkxW+HWFdTW46eCXhUwWLx6t8z1IoiP atqaRwwRnSMiDzsAffvOUYzkANbuX434aeoz3dixT+eLfJgfCDTBk7aqlA6UQOQj6LZF Lbq5tHROhCIBM+lWfHL/6iRXpUwig8Tdoj3wbSJRk6LoKVX2+k3Xyt4D9z93yVohUfmo ckebytf3sWO9XTxSLYI9fY9mirO5iwHRSReACCRwMKo78sDPkufdzhmAtJR64J9E0bHr 67iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=efqfWp81; spf=pass (google.com: domain of linux-kernel+bounces-13077-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13077-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id t16-20020a0ce2d0000000b0067efac3f6f5si18975376qvl.67.2023.12.29.04.24.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 04:24:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13077-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=efqfWp81; spf=pass (google.com: domain of linux-kernel+bounces-13077-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13077-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 26A611C22386 for ; Fri, 29 Dec 2023 12:24:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C08C5111A3; Fri, 29 Dec 2023 12:24:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="efqfWp81" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) (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 2EBDB11C80; Fri, 29 Dec 2023 12:24:33 +0000 (UTC) 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=1703852674; x=1735388674; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=aurePmLofIA0vQ9MuqkyTIcVPSgmqQEk9JYs9fwJovo=; b=efqfWp81sh2CoVmPO7Oh5xlyCNFurVqe/pP/cUR8RoSwq3yqGn6UvN3P GRKF5uFd6BuIMsx2BSpMOQVQ9l5+7qSqMcwQ7rHYMw8YDtidrMiKg0J6B PWZWBt/HKCKtsZ2BaR9twpGwGxONAcC7PUmh2F5ozxdwcsVecngir3IQ7 w35RqbG8m/MR+NWhTeguesVTCHcmldBxmu00LM9F8MlnmKddrJndNb6ry dxsMXxGiBx2bPE3mek/xrIIE5zIvcn/97RBto/mI86iYcQDuDhmnPAOkJ zfRSR9sazZ36gTyGtM6fzYwpwidgFFnuekaBsqIKjgs+pwHd1CcbzFvow Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10937"; a="381617786" X-IronPort-AV: E=Sophos;i="6.04,314,1695711600"; d="scan'208";a="381617786" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Dec 2023 04:24:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10937"; a="807679892" X-IronPort-AV: E=Sophos;i="6.04,314,1695711600"; d="scan'208";a="807679892" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga008.jf.intel.com with ESMTP; 29 Dec 2023 04:24:29 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id 4A158241; Fri, 29 Dec 2023 14:24:29 +0200 (EET) Date: Fri, 29 Dec 2023 14:24:29 +0200 From: Mika Westerberg To: Ilpo =?utf-8?B?SsOkcnZpbmVu?= Cc: linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Rob Herring , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Igor Mammedov , Lukas Wunner , Andy Shevchenko , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/7] PCI: Solve two bridge window sizing issues Message-ID: <20231229122429.GH2543524@black.fi.intel.com> References: <20231228165707.3447-1-ilpo.jarvinen@linux.intel.com> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231228165707.3447-1-ilpo.jarvinen@linux.intel.com> Hi Ilpo, On Thu, Dec 28, 2023 at 06:57:00PM +0200, Ilpo Järvinen wrote: > Hi all, > > Here's a series that contains two fixes to PCI bridge window sizing > algorithm. Together, they should enable remove & rescan cycle to work > for a PCI bus that has PCI devices with optional resources and/or > disparity in BAR sizes. > > For the second fix, I chose to expose find_empty_resource_slot() from > kernel/resource.c because it should increase accuracy of the cannot-fit > decision (currently that function is called find_resource()). 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. > > Unfortunately I don't have a reason to suspect these would help with > the issues related to the currently ongoing resource regression > thread [1]. > > [1] https://lore.kernel.org/linux-pci/ZXpaNCLiDM+Kv38H@marvin.atrad.com.au/ > > v2: > - Add "typedef" to kerneldoc to get correct formatting > - Use RESOURCE_SIZE_MAX instead of literal > - Remove unnecessary checks for io{port/mem}_resource > - Apply a few style tweaks from Andy > > Ilpo Järvinen (7): > PCI: Fix resource double counting on remove & rescan > resource: Rename find_resource() to find_empty_resource_slot() > resource: Document find_empty_resource_slot() and resource_constraint > resource: Use typedef for alignf callback > resource: Handle simple alignment inside __find_empty_resource_slot() > resource: Export find_empty_resource_slot() > PCI: Relax bridge window tail sizing rules Thanks for doing this! :) All look good to me, Reviewed-by: Mika Westerberg