From nobody Tue Mar 05 04:53:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TpjrR0qCfz5Bmxt; Tue, 5 Mar 2024 04:53:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TpjrQ6vgNz4qqv; Tue, 5 Mar 2024 04:53:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709614423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kq9Wu3Hyk5afsaC3y1bMVd6XVa2hlxcAS7TB7TnJJBI=; b=jC/gLH6/X2T11DAG35XJBB+8nEo7FgUFm+HhqptMTF4+TnlrPzv5UeXulDg8LmLLx//5eG PXhydY9iHTuiJhKNe5xYm4W563hH6/K41RLUPz+0lTjgMHxcVlDfHONVmwnu4moCGz3Ee3 ZQ0dsDTgyMCVZqjD1NFgck2FJ0vZEex2gD6DdBvy8P9KSi99VuZUlrQEX8yMiSSPAc6MBT 0Ld8+MhQcEqYKSTBoQ0MQ76JhtAK5pFhpFwqdYRDuPBfnUgKP8Q+/uP7Imgpo5P7DE6h7m uUGoKkK4X1O8WseVPV/scrCYL2lxZEK7GGkqRwtquxoeQJxgFbvINTIZkex6RQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709614423; a=rsa-sha256; cv=none; b=OEbaRNNhBTF0EkjKNZI0jiIbpFSVhA1vOA07Cs96KI9OqnB7PTZpxaW0alH9viopizzj+B nB42a4HDtr4ZQeJxVpHgzUnpwmRQuNxdOqxu4HRdCh31hneDuUOI9l955KiP8TXkolsdxl 9eYerCn/2b5nFB0voy9cHRXE0L93N1n2EbiAI1XygwJIRxAotrYk9rhC4gy4Nzx8c5/V1L 4f73q1czETm4xtx1zRZKZuqBfjLMnB1bxvNGyHNFPqTMIJHE0vsPo+c7kX5BNcGwiXn1V9 sjQmUPpu4xAeAPGj62jkvTKdFtpnaAFTHu0VZQkpehlaeoTlfkSJzUNfzBDgbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709614423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kq9Wu3Hyk5afsaC3y1bMVd6XVa2hlxcAS7TB7TnJJBI=; b=fakhV/vXcVAjw3aKF3utsKNY638KRSwH1V4A4NijprQkypGE2VRK8+4YRFqJXnwMEEtyZ1 vB25aRkxcyfnQ23cOxNgl9MSmBVK0jkUvqC5v9XleGRP/Lg9778MIDpBQ2mSjavWrbSNc3 sWKBaVee6xz9sMQC3qtTqd2cZlkExrFkVjCPT4wtZbkPB7CLgNH+a6kvh7s+x5NuwWAhtE hBDBQ23ekwBvfZ7YXERBFkXa9h6rtDnF2H0cZB1EB9L1hVYxTrZwdoPrNYyw2SQqomGJNQ VtgWGmNuLLxxt2rfjMa14i5bTv7pRpWOrknQD36tXE/4qr0VSniiBSELS2Cynw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TpjrQ6Dj8zsHZ; Tue, 5 Mar 2024 04:53:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4254rgpp027371; Tue, 5 Mar 2024 04:53:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4254rgKY027368; Tue, 5 Mar 2024 04:53:42 GMT (envelope-from git) Date: Tue, 5 Mar 2024 04:53:42 GMT Message-Id: <202403050453.4254rgKY027368@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 332dbd3a2f08 - main - pci_host_generic: Pass a valid end address in generic_pcie_translate_resource List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 332dbd3a2f08a887014a425d2532af93503588ce Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=332dbd3a2f08a887014a425d2532af93503588ce commit 332dbd3a2f08a887014a425d2532af93503588ce Author: John Baldwin AuthorDate: 2024-03-05 04:52:54 +0000 Commit: John Baldwin CommitDate: 2024-03-05 04:52:54 +0000 pci_host_generic: Pass a valid end address in generic_pcie_translate_resource The generic_pcie_containing_range helper added in commit d79b6b8ec267 assumed that the passed in (start, end) range used to locate the containing mapping range was a valid address range (with end >= start). The previous version of generic_pcie_translate_resource_common only used the start address to locate a mapping range, so the end address of 0 did not matter, but an end of 0 now causes the first range to match and an incorrect translation for resources using a later range. PR: 277211 Reported by: dch, tuexen Reviewed by: tuexen Fixes: d79b6b8ec267 pci_host_generic: Don't rewrite resource start address for translation Differential Revision: https://reviews.freebsd.org/D44205 --- sys/dev/pci/pci_host_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/pci_host_generic.c b/sys/dev/pci/pci_host_generic.c index 67b329b58685..0f85e23eb028 100644 --- a/sys/dev/pci/pci_host_generic.c +++ b/sys/dev/pci/pci_host_generic.c @@ -538,7 +538,7 @@ generic_pcie_translate_resource(device_t bus, int type, rman_res_t newend; /* unused */ return (generic_pcie_translate_resource_common( - bus, type, start, 0, newstart, &newend)); + bus, type, start, start, newstart, &newend)); } struct resource *