From nobody Thu Feb 27 14:17:13 2025 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 4Z3YLy0ngvz5qG9s; Thu, 27 Feb 2025 14:17:14 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Z3YLy0DzCz3xBC; Thu, 27 Feb 2025 14:17:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740665834; 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=VYTropdEDUYsxQnEzH7426OkbyxfL8u8JBGnDguToqE=; b=vm6+r6hcCT1QJUZdRwAp20h6BuYjzm3+9949MzKqL1MV685ACdFz9uRCRp3bR6bfbLJESn ceHeDoH8M6X+7Bxxq9NHUYH9NUZHom3HPwZp2xDBKeek3txWMLYTNvaeNb0DNhF8HDrbFm eqRwJgis62mqCZ4E+b7MD/WmLLZB78anvuUCSkv9HBLLjI2WRvFQaBqg/aHJ3wZfObTZm2 O77c2VU5dyyi6YwfXtT2ey2wy6YYf3VFqtB2yTF9o9j+iTS3pobBGg/UN7sUt+CyTkdkgV tcCBIwGnsBbCRkO8NZeRbb+4bqcYZIIqKFgXMAd8dz0JyExecI9EIsD2CFBzYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1740665834; a=rsa-sha256; cv=none; b=JYUlwhobY1TufSMv1nnJNjMk/lI1v29Jsh3mlH4bfvoCTa8QVhNuCLzUZwgL0gCxhIRPoW dJa0e7wNZlCWBGEeBFMNWfXd734ZzDh89u8qK3xXc8MkpUQ8WV1Lkc3izipPJKptzQJzVG jYX3zaO3n+KfiBcqilYBes5c8ozsji8WTENUz8Adcq6tQa3wUDkNF9eft4eiDrMpD4ME6P 4AsY/s9IRLGCxVm6Pm92HXLJNRGC0ziQsrGzd3v0IEbHx5ac/Khe/Tx3zzqAKR9qxeeEdn b6srsZCQTUPS4lN1S9IXQz0tMSNTs7UoFRRWEUQl91YW6uiAdOckUSWXxUG0/g== 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=1740665834; 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=VYTropdEDUYsxQnEzH7426OkbyxfL8u8JBGnDguToqE=; b=WbLXPhoki5WKbdpwMKmYX+Fmo9Hh+cSXpC+K0Elml8yP7oxSV9pvVyblcymwWg2Hb6EaLj tQjOofmIFlElDgS0JecEDdNHE517a8hu1NjYntP6wK1hJSltTxyxBRGv3L5as9uOKqtR6c /nKqabKhzAG6lNttY2YvCnRUHE4MAJGrzou9G5j02r6mymqrIEQLHqqszHo33wpt2zyVLG F79c3SmozINrwfhL70jICOBY9NNJQh5ci7MULZkbNdTPYdflCahNWsqNG3xxzAR3A0oe0B umDwGrLNp3A4R3fuHOAWTffNJpJcK8FzDno9jypcZWFAB/f0iXRL+qAUcfB+ZQ== 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 4Z3YLx6rf6zmqS; Thu, 27 Feb 2025 14:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51REHDf4016986; Thu, 27 Feb 2025 14:17:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51REHDJX016983; Thu, 27 Feb 2025 14:17:13 GMT (envelope-from git) Date: Thu, 27 Feb 2025 14:17:13 GMT Message-Id: <202502271417.51REHDJX016983@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 799a372ecfb3 - stable/14 - 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 799a372ecfb32ba405d34692caccce28be71fd02 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=799a372ecfb32ba405d34692caccce28be71fd02 commit 799a372ecfb32ba405d34692caccce28be71fd02 Author: John Baldwin AuthorDate: 2024-03-05 04:52:54 +0000 Commit: John Baldwin CommitDate: 2025-02-27 13:09:22 +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 (cherry picked from commit 332dbd3a2f08a887014a425d2532af93503588ce) --- 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 *