From nobody Sun Apr 23 13:23:23 2023 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 4Q488q40C4z45QgP; Sun, 23 Apr 2023 13:23:23 +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 4Q488q3Xvmz3wdL; Sun, 23 Apr 2023 13:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682256203; 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=rjjwnt3vjSsu25tPARPhEF2W0HYH5O4M+p9MZmU4dRM=; b=T0ReRzRCACTgl+m+8kEzzspLtggQdh37ljsGI33PpQ3gmmIctSrznMinya95IHvl5c9NQB 6DEFBq2OCO2BEkkc/hRa77djB8M5AK2nZL/KjgqlT+muGOm3A8xTF3BNFyFFA0KZ8eS33Z lOy0QNIHdbw9zo/fRRMLqye4fdkTMfk5f0nUy5CLrGZivperyx5P42Zg5mW6+R6GOi3uXP OpJPfV1lE7+z4Hlfebli82/cugj6gm9AEEUIMZsU6X9waGqYNzdENDbB1IQTbQ6VK/QTIH LupKosv8ktivek9hfimxy4If3DkxZ5bCjgywd12Jgpc8w6aQl3QWdIZKhJeyaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682256203; 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=rjjwnt3vjSsu25tPARPhEF2W0HYH5O4M+p9MZmU4dRM=; b=tRGBambFVXy5Yza8xQUyK3REHbUf5/lR10NpJhYEBVt56xsA1rG0sRQcULZ9ZNJ5hv7c3p +MmBTpV3OGiE63ojUw8CtJ2G7frJIP3LHOur2/tLFiQz+J9Dh3flyblK5r6M7u4gKal45g jtlSXi5P4d2wtASwGEAYmi9DGROXPyuhEPcprjdEOOxEaNpdFEQzyiYygpPRMiAHYH3jhq BjOy6kJh7uauYn0hAH8V22cPKKg5jedH0rwRiTDpkmuxv5Gq3pqepiyjS52ewXPyXSY/9B lnx54jA6bz9sPN5BclspOEDMwDxJ2SMd1YCBFJlLaCzjzQ0tzBy+L0yZ7vBzhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682256203; a=rsa-sha256; cv=none; b=r9ssr7aHIpGNy2DNVAciQqulenQCMa6bPvOY1Og+Z0zQS9Amtfm539I9eicQ6ImeZXzinD xp/4WKm1ELu1F8wq4FpR8qLpJX+lzubNhHeeimYr05oQjSI/mV9v3PEIOMzftvzo9bTwlC WWfQ6/5LFrFQr4yopwjGNP+szybyskMkdr7AAfxSj5OZswN8CcGWDyhlGJyJzKH7mmZ5qU dalad8nXLnxxR7BsG2yZarVTk9wLwhoWTNEL7esp65QNux8wDWdgEdv6CBNcRbiDdDiZVg qAlLTMOQqdOrUOHVC62YreHhIXR5Y/nc7MHXQnqkEENE0XnOup25Xr2KUfkXng== 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 4Q488q2fdzzlgq; Sun, 23 Apr 2023 13:23:23 +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 33NDNNV2082549; Sun, 23 Apr 2023 13:23:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33NDNNHx082548; Sun, 23 Apr 2023 13:23:23 GMT (envelope-from git) Date: Sun, 23 Apr 2023 13:23:23 GMT Message-Id: <202304231323.33NDNNHx082548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: d14260188752 - main - powerpc: fix a few pmap related functions to return correct types 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d142601887524fc595ed0f5e6a69419727222f0a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d142601887524fc595ed0f5e6a69419727222f0a commit d142601887524fc595ed0f5e6a69419727222f0a Author: Dimitry Andric AuthorDate: 2023-04-23 13:22:44 +0000 Commit: Dimitry Andric CommitDate: 2023-04-23 13:23:04 +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 --- 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 1478b508c1c8..d646312eff4a 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 48bd03e2a0a4..f3810b830cb9 100644 --- a/sys/powerpc/aim/mmu_oea64.c +++ b/sys/powerpc/aim/mmu_oea64.c @@ -430,7 +430,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); @@ -3142,7 +3142,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 c95de527f554..99f8806456be 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(void *, 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); @@ -3845,7 +3845,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; @@ -6102,7 +6102,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 f3b2f16b5f93..bed0b2b4b174 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 42ff7a6de304..63566d2d11d6 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, (void *, 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));