From nobody Wed Feb 14 22:52:45 2024 X-Original-To: dev-commits-src-main@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 4TZtkj3nTfz53xTd; Wed, 14 Feb 2024 22:52:45 +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 4TZtkj1lTnz4FLS; Wed, 14 Feb 2024 22:52:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707951165; 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=4ZRB/GM8Mm2p/FWytDAQf/vNtdAIGecGiuxNL3Uxtc4=; b=cG3iAIGHHdK8o1Lj7rac5xsFGR2PpKhD5NBv4oP28KFjG77v3zYA/RltL0PAZhBaX6Px2U EikJfRsRb8W+fjOh783/zlseET0+k2xiHhdDfCcx0dRs6tlfXLk2p5B/33tulGCOs7BTOi st3qSJBNGPsGQZh6eOa5cM47ltZhKVk51mwpPGqoy8gF8e/hakA+zcjovMvE2NX8tBRiUq ef9bKe0oJ3VnyhBI+ROId6Tm6vMhvznqP/NKoEt6Yd3Wjk74s/OHODYd5krCqJEIfSbFw6 55XsMEUekeNYRB31UrcbkUNuOOYuSENSQyjOb6LVteMoqAZlpgom6Xe5o43Tkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707951165; a=rsa-sha256; cv=none; b=S63agDcEjusMMdlOqaxSEMZ1bcKu5G61JplGwFJg1qPfef59OplPP4T1Z/RzV4IN60rkF/ ByDgCOew/39UGZ1Kzrw/cX/bPhjbmmcGg+zfLoztEQKulGpS3biZZnGQYKMOAHNVHdJoQw C+0q96uWlfXHww05xebcDtNUT9aN43N11nlT+yZjYkyzumBRNGdBoEjcmW/bYPKBQmEwXd WLhzOV/WlcrGSubM6z7LIvR8VeVxTsn37jnjv8QNWiPR0DzJEE4XVFE7KH2RX8J3RdSG/g UXyT2SNSJ7U0PYcotp0k+hlGJjGzXK6ju7SxDcfnkmlSjk1sgDER5G6z2QK6AA== 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=1707951165; 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=4ZRB/GM8Mm2p/FWytDAQf/vNtdAIGecGiuxNL3Uxtc4=; b=a62W22IugoVN2dAMtzrqjQhi/N9B7sGxjaU1VTxd+hzkmb8M2PmgbkOFvMQ2gfWkY28BG0 53KuezHyd8VfzVJzJWQYg+B3VkV+hHgZ6acpOkal2bnkLlpKmvphdF7JhcI0yki9iFcooK JsCxs1XWLzhS0T3H705H6R3sEkK2qnjNK1R5N2ZhR/vq5+pMOrWXjao2bfoSR73mwtlFbP D7hfo+nytrolXrQPdfoAJQ0PoN6p49k8xWDsRIa9T7DxP/CHV/oALkzcmEODh/zE8HnbQO f138c6BKMb3aLyy7WrwTaBqw4x5lMNFDg0lFvBVRw+RaM59j+v3L+G9JrQJTLg== 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 4TZtkj0m0bzGwF; Wed, 14 Feb 2024 22:52:45 +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 41EMqjWV086388; Wed, 14 Feb 2024 22:52:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41EMqj8w086385; Wed, 14 Feb 2024 22:52:45 GMT (envelope-from git) Date: Wed, 14 Feb 2024 22:52:45 GMT Message-Id: <202402142252.41EMqj8w086385@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: add99c9c4bae - main - physmem ram: Don't reserve excluded regions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: add99c9c4bae2769cba14a88b83377ec9c04cad9 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=add99c9c4bae2769cba14a88b83377ec9c04cad9 commit add99c9c4bae2769cba14a88b83377ec9c04cad9 Author: John Baldwin AuthorDate: 2024-02-14 22:07:33 +0000 Commit: John Baldwin CommitDate: 2024-02-14 22:07:33 +0000 physmem ram: Don't reserve excluded regions These regions can conflict with I/O resources and prevent allocation of those regions by other drivers. It may make sense to reserve them after the boot-time probe of devices has concluded (or after an initial pass to reserve firmware-assigned resources before "wildcard" resources are allocated), but that would require additional changes. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43893 --- sys/kern/subr_physmem.c | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/sys/kern/subr_physmem.c b/sys/kern/subr_physmem.c index 79fedf58d66d..fda47d4ef697 100644 --- a/sys/kern/subr_physmem.c +++ b/sys/kern/subr_physmem.c @@ -582,7 +582,6 @@ ram_attach(device_t dev) { vm_paddr_t avail_list[PHYS_AVAIL_COUNT]; rman_res_t start, end; - struct region *hwp; int rid, i; rid = 0; @@ -608,30 +607,6 @@ ram_attach(device_t dev) rid++; } - /* Now, reserve the excluded memory regions. */ - for (i = 0, hwp = exregions; i < excnt; i++, hwp++) { - start = hwp->addr; - end = hwp->addr + hwp->size; - - if (bootverbose) - device_printf(dev, - "reserving excluded region: %jx-%jx\n", - (uintmax_t)start, (uintmax_t)(end - 1)); - - /* - * Best-effort attempt to reserve the range. This may fail, as - * sometimes the excluded ranges provided by the device tree - * will cover or overlap some I/O range. - */ - if (bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, start, end, - end - start, 0) == NULL) { - if (bootverbose) - device_printf(dev, "failed to reserve region\n"); - continue; - } - rid++; - } - return (0); }