From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) (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 5617123C8AE; Tue, 24 Mar 2026 17:00:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774371634; cv=none; b=Jd12nuJjdqPDvgogp59/8tBggqJMQYUv/16zN5+uNnTE80rwt56YDjpv6lQb1S2zflJukHtlErE0Vmgqn3fTZg2LxU+974dFag0iY3hnXOUN2M8/P/YWU7OiKo5Hm2yGvAyWyJggpKuA9hEuk+lmvfnu191nA81miOJ4dM2Hac0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774371634; c=relaxed/simple; bh=yRiNPjyR6BmckrFz9yS55d2yQZU16Z4uT3UMgBowpHk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=ejn578OaF6JP8coUZEk1Wzq1NqYhGdkRCdg5x5TmJ/vBlg/iAAL6aRUlcryEX2qUWtB0fTK+9bZppr8fE024llnfF5JrcYVk3C3p2kWpmQa15LXODaBBN/uY3KPYj/aNP9gC9EpyhB19hFcacfjyln+Cg7BdVR+aDg2EE3abmVM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=XVu7atom; arc=none smtp.client-ip=198.175.65.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="XVu7atom" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1774371632; x=1805907632; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yRiNPjyR6BmckrFz9yS55d2yQZU16Z4uT3UMgBowpHk=; b=XVu7atomGqeRQ/mCvdsKBuOQqnS1A97ZFHQ5puo3JRTcIwdzrp5Yr2Rd jj1ETPgCNbjE6BE79nJ3C7Zaa+z4mSwmDHFYxZRmzrp2mpbO4Cu3Qt/yD vJJiRCY2WGxFF2yToGAcCqMXJn0mooQi9q830Eh2W/9dyTmG97j3QNmRd mzE6F3SHc1fSTFh0U4wYdOQ1jinn5Iw0QBTFOWxePvgJJAl/rtzmYuJKM jDxSMumIEEoe+9e1PoNoEwc9Sqib5SCOCiOVH3nSToaOEA2SziPRnnnZT hG7orP7S4succId+dkQnlq9tlZ16Uzf2dP8dFFiFg03yoXx6YLJepcJZr A==; X-CSE-ConnectionGUID: 0aj1QaDoTeiUONUsc8/J8Q== X-CSE-MsgGUID: MXAYKiVpSQOuiLrr6n22vw== X-IronPort-AV: E=McAfee;i="6800,10657,11739"; a="75281459" X-IronPort-AV: E=Sophos;i="6.23,138,1770624000"; d="scan'208";a="75281459" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2026 10:00:31 -0700 X-CSE-ConnectionGUID: NHjFhTG1RYO9C2glveQ6yA== X-CSE-MsgGUID: hhyUW1HYQmiP63jGpn9/jA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,138,1770624000"; d="scan'208";a="219540299" Received: from ijarvine-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.244.217]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2026 10:00:22 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: linux-pci@vger.kernel.org, Bjorn Helgaas , Guenter Roeck , linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, Russell King , Geert Uytterhoeven , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Chris Zankel , Max Filippov , Madhavan Srinivasan , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 08/10] PCI: Rename window_alignment() to pci_min_window_alignment() Date: Tue, 24 Mar 2026 18:56:31 +0200 Message-Id: <20260324165633.4583-9-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20260324165633.4583-1-ilpo.jarvinen@linux.intel.com> References: <20260324165633.4583-1-ilpo.jarvinen@linux.intel.com> Precedence: bulk X-Mailing-List: linux-alpha@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit window_alignment() lacks prefix. Rename it to pci_min_window_alignment() in order to include the prefix and also add min to indicate the returned window alignment is the minimum PCI spec and arch allows. Also make it available in drivers/pci/pci.h as upcoming changes will need to call it from outside of setup-bus.c. Signed-off-by: Ilpo Järvinen --- drivers/pci/pci.h | 3 +++ drivers/pci/setup-bus.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 13d998fbacce..2edb03c1c6b9 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -1053,6 +1053,9 @@ static inline resource_size_t pci_resource_alignment(struct pci_dev *dev, return resource_alignment(res); } +resource_size_t pci_min_window_alignment(struct pci_bus *bus, + unsigned long type); + void pci_acs_init(struct pci_dev *dev); void pci_enable_acs(struct pci_dev *dev); #ifdef CONFIG_PCI_QUIRKS diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 61f769aaa2f6..edc0d682dcad 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -1035,7 +1035,7 @@ resource_size_t __weak pcibios_window_alignment(struct pci_bus *bus, #define PCI_P2P_DEFAULT_IO_ALIGN SZ_4K #define PCI_P2P_DEFAULT_IO_ALIGN_1K SZ_1K -static resource_size_t window_alignment(struct pci_bus *bus, unsigned long type) +resource_size_t pci_min_window_alignment(struct pci_bus *bus, unsigned long type) { resource_size_t align = 1, arch_align; @@ -1084,7 +1084,7 @@ static void pbus_size_io(struct pci_bus *bus, resource_size_t add_size, if (resource_assigned(b_res)) return; - min_align = window_alignment(bus, IORESOURCE_IO); + min_align = pci_min_window_alignment(bus, IORESOURCE_IO); list_for_each_entry(dev, &bus->devices, bus_list) { struct resource *r; @@ -1339,7 +1339,7 @@ static void pbus_size_mem(struct pci_bus *bus, struct resource *b_res, } } - win_align = window_alignment(bus, b_res->flags); + win_align = pci_min_window_alignment(bus, b_res->flags); min_align = calculate_head_align(aligns, max_order); min_align = max(min_align, win_align); size0 = calculate_memsize(size, realloc_head ? 0 : add_size, -- 2.39.5