git: d14260188752 - main - powerpc: fix a few pmap related functions to return correct types
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 23 Apr 2023 13:23:23 UTC
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d142601887524fc595ed0f5e6a69419727222f0a commit d142601887524fc595ed0f5e6a69419727222f0a Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-04-23 13:22:44 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> 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));