From nobody Tue Jan 23 17:46:02 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 4TKDyz2Xp0z57mrQ; Tue, 23 Jan 2024 17:46:03 +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 4TKDyz1KgFz47H8; Tue, 23 Jan 2024 17:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031963; 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=peuBwv+YX+HYmh4A9NqwRxygmrDZ6PMgiJTpaXN15lM=; b=ED1Cww1j1BWVDGPj8/9Lts/kXMbBU5Kk+Pw1KeIVbtloLb5VSq3YbGTrxhiMwYPp4tC1Gu WL19Gw90vwo89aPpUDytusoBEQBxVyPeDIPQNmwnjDGWq9EEvPIJVYzFwy46/UXek0HqWc EDcFgc6h23lYc7pwT7fq41IL/jrxvae1QU+UwnIyCcSVOnTMj5KYRSPjBjj5+zjKfc6x1+ 7ruSGiUETZQ+/MMBwyJov45ZVHM6gi3xNn7llM3eppBQZy+6t6bTLMvoUG5TUxAS7FbyTb +jexYtV2fl9JmGsDLjtoGqJJTZHG8pPsu0Ta4Oqm2sFmJgNCNZ7oU53f3asfRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031963; 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=peuBwv+YX+HYmh4A9NqwRxygmrDZ6PMgiJTpaXN15lM=; b=xvCL+/Ndpo17RC3LhzYFPjn3a7pWy3sIvdu7GjEfwB6VWFf0FIS+QhvFlwr9BATrkA+dax 4XOZDRe9kXu1Q+T7xCnLFDGmNB0hi+kHL2rgzUL1vC9WY2wWURQAx258EAY9xrwsENFgcn vviWm/53RZbyKaBSZ+bjKKf4HFblfjHRVq+X+kL6lK+ipN4oQ0d1eGTq2lt8YhjzeXvb/P /gZa5zeEnQxwqYeYmkzzzUuoOkErdi9vCcGiVC+9kUZx0NYQHRA9y7TKBlOMqOCEX3y3ed TJrf37TLMPmR6uCV2rJlaiXz0GBAp/mE9CTlxvjSdS8bmiyul0w6iP7rTrBnnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031963; a=rsa-sha256; cv=none; b=t1gs2tIMoE4f+hyPzfwlkHrlJoRjqxVyxjO/Ves/AnRppD+AXKp5D9YcSBPgXk/Bo8e60s qIkLJqGSwIS7XF5P9wwYwQT7/BSPCvcUmZTqmSDI3XeePr7U92PUIfhZ87ajQXJU+aFHBj yDlF9LqQjaMHLv/+yepuoTxTBeF7vs8ljypbKpgazVO97UF6GBQjMNyI4CgEbSnHvKX40j CiwBsFhfybdJ0mcUREp+B3PlquegsQ5YsBvQUYOJI9LCu9Sbm0gtjrA4a9lYhTLbM7WE1o ZVWhIKaVQDmSE0QXXSC1S8WRzNgzzNDxpizad7gQCrS6NUGE8hZeZn+9B1uGEw== 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 4TKDyz0Qr8zg90; Tue, 23 Jan 2024 17:46:03 +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 40NHk2Yx076097; Tue, 23 Jan 2024 17:46:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NHk2KU076094; Tue, 23 Jan 2024 17:46:02 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:46:02 GMT Message-Id: <202401231746.40NHk2KU076094@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: a3d6e0de1c89 - main - powerpc: Fix bus_space_unmap 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: a3d6e0de1c89c145b40ed80fe54c6bad1abbf416 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a3d6e0de1c89c145b40ed80fe54c6bad1abbf416 commit a3d6e0de1c89c145b40ed80fe54c6bad1abbf416 Author: John Baldwin AuthorDate: 2024-01-23 17:37:53 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:37:53 +0000 powerpc: Fix bus_space_unmap Previously it failed to compile since the macro passed too many arguments to the function. Fix by adding the bus handle to the function and adding an implementation that calls pmap_unmapdev. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D43440 --- sys/powerpc/include/bus.h | 2 +- sys/powerpc/powerpc/bus_machdep.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/powerpc/include/bus.h b/sys/powerpc/include/bus.h index 6e91900c236d..ddb4737d9b76 100644 --- a/sys/powerpc/include/bus.h +++ b/sys/powerpc/include/bus.h @@ -103,7 +103,7 @@ struct bus_space { /* mapping/unmapping */ int (*bs_map)(bus_addr_t, bus_size_t, int, bus_space_handle_t *); - void (*bs_unmap)(bus_size_t); + void (*bs_unmap)(bus_space_handle_t, bus_size_t); int (*bs_subregion)(bus_space_handle_t, bus_size_t, bus_size_t, bus_space_handle_t *); diff --git a/sys/powerpc/powerpc/bus_machdep.c b/sys/powerpc/powerpc/bus_machdep.c index 39096edfc1f7..e908750961d0 100644 --- a/sys/powerpc/powerpc/bus_machdep.c +++ b/sys/powerpc/powerpc/bus_machdep.c @@ -140,8 +140,13 @@ bs_remap_earlyboot(void) } static void -bs_gen_unmap(bus_size_t size __unused) +bs_gen_unmap(bus_space_handle_t bsh, bus_size_t size) { + + if (!pmap_bootstrapped) + return; + + pmap_unmapdev((void *)bsh, size); } static int