diff --git a/sys/riscv/include/atomic.h b/sys/riscv/include/atomic.h index 7f713dfc095a..d08047593861 100644 --- a/sys/riscv/include/atomic.h +++ b/sys/riscv/include/atomic.h @@ -117,7 +117,6 @@ ATOMIC_FCMPSET_ACQ_REL(16); #define atomic_fcmpset_acq_char atomic_fcmpset_acq_8 #define atomic_fcmpset_rel_char atomic_fcmpset_rel_8 - #define atomic_cmpset_short atomic_cmpset_16 #define atomic_cmpset_acq_short atomic_cmpset_acq_16 #define atomic_cmpset_rel_short atomic_cmpset_rel_16 diff --git a/sys/riscv/include/bus.h b/sys/riscv/include/bus.h index 8aaf1d3e76cd..82c93e586254 100644 --- a/sys/riscv/include/bus.h +++ b/sys/riscv/include/bus.h @@ -89,7 +89,6 @@ #define BUS_SPACE_BARRIER_READ 0x01 #define BUS_SPACE_BARRIER_WRITE 0x02 - struct bus_space { /* cookie */ void *bs_cookie; @@ -256,7 +255,6 @@ struct bus_space { bus_size_t, const u_int64_t *, bus_size_t); }; - /* * Utility macros; INTERNAL USE ONLY. */ @@ -282,7 +280,6 @@ struct bus_space { #define __bs_nonsingle_s(type, sz, t, h, o, a, c) \ (*(t)->__bs_opname_s(type,sz))((t)->bs_cookie, h, o, a, c) - /* * Mapping and unmapping operations. */ @@ -293,7 +290,6 @@ struct bus_space { #define bus_space_subregion(t, h, o, s, hp) \ (*(t)->bs_subregion)((t)->bs_cookie, (h), (o), (s), (hp)) - /* * Allocation and deallocation operations. */ @@ -309,8 +305,6 @@ struct bus_space { #define bus_space_barrier(t, h, o, l, f) \ (*(t)->bs_barrier)((t)->bs_cookie, (h), (o), (l), (f)) - - /* * Bus read (single) operations. */ @@ -345,7 +339,6 @@ struct bus_space { #define bus_space_read_multi_stream_8(t, h, o, a, c) \ __bs_nonsingle_s(rm,8,(t),(h),(o),(a),(c)) - /* * Bus read region operations. */ @@ -367,7 +360,6 @@ struct bus_space { #define bus_space_read_region_stream_8(t, h, o, a, c) \ __bs_nonsingle_s(rr,8,(t),(h),(o),(a),(c)) - /* * Bus write (single) operations. */ @@ -381,7 +373,6 @@ struct bus_space { #define bus_space_write_stream_4(t, h, o, v) __bs_ws_s(4,(t),(h),(o),(v)) #define bus_space_write_stream_8(t, h, o, v) __bs_ws_s(8,(t),(h),(o),(v)) - /* * Bus write multiple operations. */ @@ -403,7 +394,6 @@ struct bus_space { #define bus_space_write_multi_stream_8(t, h, o, a, c) \ __bs_nonsingle_s(wm,8,(t),(h),(o),(a),(c)) - /* * Bus write region operations. */ @@ -425,7 +415,6 @@ struct bus_space { #define bus_space_write_region_stream_8(t, h, o, a, c) \ __bs_nonsingle_s(wr,8,(t),(h),(o),(a),(c)) - /* * Set multiple operations. */ @@ -438,7 +427,6 @@ struct bus_space { #define bus_space_set_multi_8(t, h, o, v, c) \ __bs_set(sm,8,(t),(h),(o),(v),(c)) - /* * Set region operations. */ @@ -451,7 +439,6 @@ struct bus_space { #define bus_space_set_region_8(t, h, o, v, c) \ __bs_set(sr,8,(t),(h),(o),(v),(c)) - /* * Copy operations. */ diff --git a/sys/riscv/riscv/busdma_bounce.c b/sys/riscv/riscv/busdma_bounce.c index 7961c2014349..75d64a4ec8d8 100644 --- a/sys/riscv/riscv/busdma_bounce.c +++ b/sys/riscv/riscv/busdma_bounce.c @@ -400,7 +400,6 @@ bounce_bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map) return (0); } - /* * Allocate a piece of memory that can be efficiently mapped into * bus device space based on the constraints lited in the dma tag. @@ -813,7 +812,6 @@ bounce_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, if (map->sync_count == 0 || (kvaddr != 0 && kvaddr != sl_vend) || (curaddr != sl_pend)) { - if (++map->sync_count > dmat->common.nsegments) goto cleanup; sl++; diff --git a/sys/riscv/riscv/identcpu.c b/sys/riscv/riscv/identcpu.c index de4ca2a3869d..f3afa9b8c7ea 100644 --- a/sys/riscv/riscv/identcpu.c +++ b/sys/riscv/riscv/identcpu.c @@ -173,7 +173,6 @@ fill_elf_hwcap(void *dummy __unused) elf_hwcap &= hwcap; else elf_hwcap = hwcap; - } } diff --git a/sys/riscv/riscv/mem.c b/sys/riscv/riscv/mem.c index 38488a2c9a87..ef1ad708f000 100644 --- a/sys/riscv/riscv/mem.c +++ b/sys/riscv/riscv/mem.c @@ -121,4 +121,3 @@ memrw(struct cdev *dev, struct uio *uio, int flags) return (error); } - diff --git a/sys/riscv/riscv/nexus.c b/sys/riscv/riscv/nexus.c index 9549f37e0df1..4a459e3e1016 100644 --- a/sys/riscv/riscv/nexus.c +++ b/sys/riscv/riscv/nexus.c @@ -117,7 +117,6 @@ static device_method_t nexus_methods[] = { DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), DEVMETHOD(bus_setup_intr, nexus_setup_intr), DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), - { 0, 0 } }; @@ -193,7 +192,6 @@ nexus_add_child(device_t bus, u_int order, const char *name, int unit) return (child); } - /* * Allocate a resource on behalf of child. NB: child is usually going to be a * child of one of our descendants, not a direct child of nexus0. @@ -349,7 +347,6 @@ nexus_set_resource(device_t dev, device_t child, int type, int rid, return(0); } - static int nexus_deactivate_resource(device_t bus, device_t child, int type, int rid, struct resource *r) diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index 725bf647b7a1..f8f57bb59bf5 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -543,7 +543,6 @@ pmap_bootstrap_l3(vm_offset_t l1pt, vm_offset_t va, vm_offset_t l3_start) l3pt += PAGE_SIZE; } - /* Clean the L2 page table */ memset((void *)l3_start, 0, l3pt - l3_start); @@ -641,7 +640,7 @@ pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, vm_size_t kernlen) virtual_avail = roundup2(freemempos, L2_SIZE); virtual_end = VM_MAX_KERNEL_ADDRESS - L2_SIZE; kernel_vm_end = virtual_avail; - + pa = pmap_early_vtophys(l1pt, freemempos); physmem_exclude_region(kernstart, pa - kernstart, EXFLAG_NOALLOC); @@ -986,7 +985,6 @@ pmap_map(vm_offset_t *virt, vm_paddr_t start, vm_paddr_t end, int prot) return PHYS_TO_DMAP(start); } - /* * Add a list of wired pages to the kva * this routine is only used for temporary @@ -1100,7 +1098,7 @@ pmap_remove_pt_page(pmap_t pmap, vm_offset_t va) PMAP_LOCK_ASSERT(pmap, MA_OWNED); return (vm_radix_remove(&pmap->pm_root, pmap_l2_pindex(va))); } - + /* * Decrements a page table page's reference count, which is used to record the * number of valid page table entries within the page. If the reference count @@ -1381,7 +1379,6 @@ pmap_alloc_l3(pmap_t pmap, vm_offset_t va, struct rwlock **lockp) return (m); } - /*************************************************** * Pmap allocation/deallocation routines. ***************************************************/ @@ -1507,7 +1504,6 @@ pmap_growkernel(vm_offset_t addr) } } - /*************************************************** * page management routines. ***************************************************/ diff --git a/sys/riscv/riscv/sbi.c b/sys/riscv/riscv/sbi.c index bc8327cdfb9a..4c644f342d25 100644 --- a/sys/riscv/riscv/sbi.c +++ b/sys/riscv/riscv/sbi.c @@ -70,7 +70,6 @@ sbi_get_mvendorid(void) return (SBI_CALL0(SBI_EXT_ID_BASE, SBI_BASE_GET_MVENDORID)); } - static struct sbi_ret sbi_get_marchid(void) {