From nobody Sat Apr 29 07:36:48 2023 X-Original-To: dev-commits-src-branches@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 4Q7hB90pYyz48crN; Sat, 29 Apr 2023 07:36:49 +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 4Q7hB872QJz3GlK; Sat, 29 Apr 2023 07:36:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682753809; 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=G12ER/cyPo50vdZzh1yZGEGPssJZveqrAvNw5JFEIrA=; b=doPplMrs5BDs0y55Kwp8XCmdWB4voKgkAMudB3NUUZQzGLQOK8cIdjt2+zVjp4kaOvTNDq qwC0ilKBhbpVQsn/ir/y36gy9TE+gufxFgaDMY2RNQ1bqVNQ6SwPvVnCFlkUYOl9AK+51m zjf4eJ9j6N8BJSgZVGsk5Wc7AisxV/qKOwA/CMzt3ET2EonLgeC0mkb+6tpCWT4ndAHQEs i8nNEsgKsqiI63TCaxCftWaaLVYAU7+6d+nIC4srBslQ5AaY1rqS8jXXS0NqBnzwA0rJ6D 8wj1u9EWfuPHQq4p4vnwzCTx/eaVhQ17C5mN6MKJ1uQ7evJr8mBiDz30FSu4ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682753809; 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=G12ER/cyPo50vdZzh1yZGEGPssJZveqrAvNw5JFEIrA=; b=hjoQ9zCbKno5Ff2qi+LGJRLQ+8MkAETSAylzU+B1QsmSzpmyO+rDrcsQdx3aRWs9yanGcP yeqzk9ihr91whthaz2DwU7jyL5N7rUNtGZmKa4sr7Lv7/Re46irk+3IVL6nNIhd1jesDte DyROtUd5LhSmrL49xCUwzYAm9IW7E3WkgBbAEjlP9LjsX/eKdBQqDJ8nzkx3B+3uMlnN8o +NEQgz6HdrN6CEcvXjt17raBKwkp1IhW3yGtidaLnE+o+I+SDi4RYRUDpi9KB4anz+n9AE JgH++U+TF+9gd1xDTskdorwNtzs35t8UypOMhAD/Ol+rTesBef7nJ1jomupyzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682753809; a=rsa-sha256; cv=none; b=tu69kZPRHg6rVtEmx5KNfd6YKNAeUe6D7MuntjpPtRkOVNx/4nudPzBagIEdprWk+D87eb 5hXiLtAX8TKjtFQZCTWQL9I9LXtmYXKACqOLLrm/AEr+Z5JbkxM0HtlPF1OXXJrHO2gewN vhH1x7AsskCIgtkTnYBnvq1/Ck0GnEpzL829xh8fxDh8Z9XHlvE/Fe91vRo7DG9kTSsuXu jCso4j0z4W500x5/K4j6mcOhHdOZA5kmc9m/YhFofQ5DBceGo858E/nDxROxc5FwktDtTV 36vbrSh/yn2KRKGVUjC54b9ogBOjGSw+fWDe3QctQsVd/ttNAIqSNhKRAQZU4g== 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 4Q7hB85xkgzYP2; Sat, 29 Apr 2023 07:36:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33T7amnB064167; Sat, 29 Apr 2023 07:36:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33T7ame0064166; Sat, 29 Apr 2023 07:36:48 GMT (envelope-from git) Date: Sat, 29 Apr 2023 07:36:48 GMT Message-Id: <202304290736.33T7ame0064166@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 286ed9ef4f9f - stable/13 - powerpc: fix a few pmap related functions to return correct types List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 286ed9ef4f9fdd23bddc12ff656af641ecc43a03 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=286ed9ef4f9fdd23bddc12ff656af641ecc43a03 commit 286ed9ef4f9fdd23bddc12ff656af641ecc43a03 Author: Dimitry Andric AuthorDate: 2023-04-23 13:22:44 +0000 Commit: Dimitry Andric CommitDate: 2023-04-29 07:23:20 +0000 powerpc: fix a few pmap related functions to return correct types While experimenting with changing boolean_t to another type, I noticed that several powerpc pmap related functions returned the wrong type: boolean_t instead of int. Fix several declarations and definitions to match the actual pmap function types: pmap_dev_direct_mapped_t and pmap_ts_referenced_t. MFC after: 3 days (cherry picked from commit d142601887524fc595ed0f5e6a69419727222f0a) --- sys/powerpc/aim/mmu_oea.c | 4 ++-- sys/powerpc/aim/mmu_oea64.c | 4 ++-- sys/powerpc/aim/mmu_radix.c | 8 ++++---- sys/powerpc/booke/pmap.c | 2 +- sys/powerpc/powerpc/pmap_dispatch.c | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c index e86df137c963..59a742ff9967 100644 --- a/sys/powerpc/aim/mmu_oea.c +++ b/sys/powerpc/aim/mmu_oea.c @@ -320,7 +320,7 @@ vm_paddr_t moea_kextract(vm_offset_t); void moea_kenter_attr(vm_offset_t, vm_paddr_t, vm_memattr_t); void moea_kenter(vm_offset_t, vm_paddr_t); void moea_page_set_memattr(vm_page_t m, vm_memattr_t ma); -boolean_t moea_dev_direct_mapped(vm_paddr_t, vm_size_t); +int moea_dev_direct_mapped(vm_paddr_t, vm_size_t); static void moea_sync_icache(pmap_t, vm_offset_t, vm_size_t); void moea_dumpsys_map(vm_paddr_t pa, size_t sz, void **va); void moea_scan_init(void); @@ -2658,7 +2658,7 @@ moea_bat_mapped(int idx, vm_paddr_t pa, vm_size_t size) return (0); } -boolean_t +int moea_dev_direct_mapped(vm_paddr_t pa, vm_size_t size) { int i; diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c index 156463148f64..84b6cd0c3730 100644 --- a/sys/powerpc/aim/mmu_oea64.c +++ b/sys/powerpc/aim/mmu_oea64.c @@ -426,7 +426,7 @@ vm_paddr_t moea64_kextract(vm_offset_t); void moea64_page_set_memattr(vm_page_t m, vm_memattr_t ma); void moea64_kenter_attr(vm_offset_t, vm_paddr_t, vm_memattr_t ma); void moea64_kenter(vm_offset_t, vm_paddr_t); -boolean_t moea64_dev_direct_mapped(vm_paddr_t, vm_size_t); +int moea64_dev_direct_mapped(vm_paddr_t, vm_size_t); static void moea64_sync_icache(pmap_t, vm_offset_t, vm_size_t); void moea64_dumpsys_map(vm_paddr_t pa, size_t sz, void **va); @@ -3149,7 +3149,7 @@ moea64_clear_bit(vm_page_t m, u_int64_t ptebit) return (count); } -boolean_t +int moea64_dev_direct_mapped(vm_paddr_t pa, vm_size_t size) { struct pvo_entry *pvo, key; diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c index 9f59d524196f..4210f1faf0a6 100644 --- a/sys/powerpc/aim/mmu_radix.c +++ b/sys/powerpc/aim/mmu_radix.c @@ -458,7 +458,7 @@ void mmu_radix_qenter(vm_offset_t, vm_page_t *, int); void mmu_radix_qremove(vm_offset_t, int); vm_offset_t mmu_radix_quick_enter_page(vm_page_t); void mmu_radix_quick_remove_page(vm_offset_t); -boolean_t mmu_radix_ts_referenced(vm_page_t); +int mmu_radix_ts_referenced(vm_page_t); void mmu_radix_release(pmap_t); void mmu_radix_remove(pmap_t, vm_offset_t, vm_offset_t); void mmu_radix_remove_all(vm_page_t); @@ -492,7 +492,7 @@ static void *mmu_radix_mapdev(vm_paddr_t, vm_size_t); static void *mmu_radix_mapdev_attr(vm_paddr_t, vm_size_t, vm_memattr_t); static void mmu_radix_unmapdev(vm_offset_t, vm_size_t); static void mmu_radix_kenter_attr(vm_offset_t, vm_paddr_t, vm_memattr_t ma); -static boolean_t mmu_radix_dev_direct_mapped(vm_paddr_t, vm_size_t); +static int mmu_radix_dev_direct_mapped(vm_paddr_t, vm_size_t); static void mmu_radix_dumpsys_map(vm_paddr_t pa, size_t sz, void **va); static void mmu_radix_scan_init(void); static void mmu_radix_cpu_bootstrap(int ap); @@ -3838,7 +3838,7 @@ mmu_radix_is_referenced(vm_page_t m) * invalidations are performed before the PV list lock is * released. */ -boolean_t +int mmu_radix_ts_referenced(vm_page_t m) { struct md_page *pvh; @@ -6090,7 +6090,7 @@ mmu_radix_decode_kernel_ptr(vm_offset_t addr, return (0); } -static boolean_t +static int mmu_radix_dev_direct_mapped(vm_paddr_t pa, vm_size_t size) { diff --git a/sys/powerpc/booke/pmap.c b/sys/powerpc/booke/pmap.c index 6c48584096c5..2d16bba90925 100644 --- a/sys/powerpc/booke/pmap.c +++ b/sys/powerpc/booke/pmap.c @@ -338,7 +338,7 @@ static vm_paddr_t mmu_booke_kextract(vm_offset_t); static void mmu_booke_kenter(vm_offset_t, vm_paddr_t); static void mmu_booke_kenter_attr(vm_offset_t, vm_paddr_t, vm_memattr_t); static void mmu_booke_kremove(vm_offset_t); -static boolean_t mmu_booke_dev_direct_mapped(vm_paddr_t, vm_size_t); +static int mmu_booke_dev_direct_mapped(vm_paddr_t, vm_size_t); static void mmu_booke_sync_icache(pmap_t, vm_offset_t, vm_size_t); static void mmu_booke_dumpsys_map(vm_paddr_t pa, size_t, diff --git a/sys/powerpc/powerpc/pmap_dispatch.c b/sys/powerpc/powerpc/pmap_dispatch.c index 00d4a2074327..1adfc42eefd1 100644 --- a/sys/powerpc/powerpc/pmap_dispatch.c +++ b/sys/powerpc/powerpc/pmap_dispatch.c @@ -150,7 +150,7 @@ DEFINE_PMAP_IFUNC(void, qenter, (vm_offset_t, vm_page_t *, int)); DEFINE_PMAP_IFUNC(void, qremove, (vm_offset_t, int)); DEFINE_PMAP_IFUNC(vm_offset_t, quick_enter_page, (vm_page_t)); DEFINE_PMAP_IFUNC(void, quick_remove_page, (vm_offset_t)); -DEFINE_PMAP_IFUNC(boolean_t, ts_referenced, (vm_page_t)); +DEFINE_PMAP_IFUNC(int, ts_referenced, (vm_page_t)); DEFINE_PMAP_IFUNC(void, release, (pmap_t)); DEFINE_PMAP_IFUNC(void, remove, (pmap_t, vm_offset_t, vm_offset_t)); DEFINE_PMAP_IFUNC(void, remove_all, (vm_page_t)); @@ -179,7 +179,7 @@ DEFINE_PMAP_IFUNC(void, unmapdev, (vm_offset_t, vm_size_t)); DEFINE_PMAP_IFUNC(int, map_user_ptr, (pmap_t, volatile const void *, void **, size_t, size_t *)); DEFINE_PMAP_IFUNC(int, decode_kernel_ptr, (vm_offset_t, int *, vm_offset_t *)); -DEFINE_PMAP_IFUNC(boolean_t, dev_direct_mapped, (vm_paddr_t, vm_size_t)); +DEFINE_PMAP_IFUNC(int, dev_direct_mapped, (vm_paddr_t, vm_size_t)); DEFINE_PMAP_IFUNC(void, sync_icache, (pmap_t, vm_offset_t, vm_size_t)); DEFINE_PMAP_IFUNC(int, change_attr, (vm_offset_t, vm_size_t, vm_memattr_t)); DEFINE_PMAP_IFUNC(void, page_array_startup, (long));