diff options
| author | tsutsui <tsutsui@NetBSD.org> | 2023-01-06 10:28:27 +0000 |
|---|---|---|
| committer | tsutsui <tsutsui@NetBSD.org> | 2023-01-06 10:28:27 +0000 |
| commit | 60e2ec70c71982b44452bf4816ef4ac58e6da213 (patch) | |
| tree | 11a0a5dbd362476743af3374c55f02dbe57395d1 /sys | |
| parent | df2fe19c1466739734a0c412be23bc385ca5db50 (diff) | |
TAB/spaces/indents cleanup.
Diffstat (limited to 'sys')
66 files changed, 803 insertions, 802 deletions
diff --git a/sys/arch/atari/atari/atari_init.c b/sys/arch/atari/atari/atari_init.c index bece39a9f07..9ba4f0558c4 100644 --- a/sys/arch/atari/atari/atari_init.c +++ b/sys/arch/atari/atari/atari_init.c @@ -1,4 +1,4 @@ -/* $NetBSD: atari_init.c,v 1.106 2022/07/03 16:03:08 tsutsui Exp $ */ +/* $NetBSD: atari_init.c,v 1.107 2023/01/06 10:28:27 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.106 2022/07/03 16:03:08 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.107 2023/01/06 10:28:27 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_mbtype.h" @@ -120,7 +120,7 @@ static u_int milan_probe_bank(paddr_t paddr); */ static cpu_kcore_hdr_t cpu_kcore_hdr; -extern u_int lowram; +extern u_int lowram; int machineid, mmutype, cputype, astpending; extern char *esym; @@ -180,16 +180,16 @@ int reloc_kernel = RELOC_KERNEL; /* Patchable */ * Interrupts are disabled * PA == VA, we don't have to relocate addresses before enabling * the MMU - * Exec is no longer available (because we're loaded all over + * Exec is no longer available (because we're loaded all over * low memory, no ExecBase is available anymore) * * It's purpose is: - * Do the things that are done in locore.s in the hp300 version, + * Do the things that are done in locore.s in the hp300 version, * this includes allocation of kernel maps and enabling the MMU. - * - * Some of the code in here is `stolen' from Amiga MACH, and was + * + * Some of the code in here is `stolen' from Amiga MACH, and was * written by Bryan Ford and Niklas Hallqvist. - * + * * Very crude 68040 support by Michael L. Hitch. */ int kernel_copyback = 1; @@ -199,7 +199,7 @@ start_c(int id, u_int ttphystart, u_int ttphysize, u_int stphysize, char *esym_addr) /* id: Machine id */ /* ttphystart, ttphysize: Start address and size of TT-ram */ - /* stphysize: Size of ST-ram */ + /* stphysize: Size of ST-ram */ /* esym_addr: Address of kernel '_esym' symbol */ { extern char end[]; @@ -304,7 +304,7 @@ start_c(int id, u_int ttphystart, u_int ttphysize, u_int stphysize, machineid = id; esym = esym_addr; - /* + /* * the kernel ends at end() or esym. */ if (esym == NULL) @@ -448,7 +448,7 @@ start_c(int id, u_int ttphystart, u_int ttphysize, u_int stphysize, pg_proto += PAGE_SIZE; } - /* + /* * data, bss and dynamic tables are read/write */ pg_proto = (pg_proto & PG_FRAME) | PG_RW | PG_V; @@ -608,8 +608,8 @@ start_c(int id, u_int ttphystart, u_int ttphysize, u_int stphysize, cpu_init_kcorehdr(kbase, Sysseg_pa); /* - * copy over the kernel (and all now initialized variables) - * to fastram. DONT use bcopy(), this beast is much larger + * copy over the kernel (and all now initialized variables) + * to fastram. DONT use bcopy(), this beast is much larger * than 128k ! */ if (kbase) { @@ -632,8 +632,8 @@ start_c(int id, u_int ttphystart, u_int ttphysize, u_int stphysize, */ if (cputype == CPU_68060) { /* XXX: Need the branch cache be cleared? */ - __asm volatile (".word 0x4e7a,0x0002;" - "orl #0x400000,%%d0;" + __asm volatile (".word 0x4e7a,0x0002;" + "orl #0x400000,%%d0;" ".word 0x4e7b,0x0002" : : : "d0"); } __asm volatile ("movel %0,%%a0;" @@ -1101,7 +1101,7 @@ cpu_init_kcorehdr(paddr_t kbase, paddr_t sysseg_pa) m->sg_v = SG_V; m->sg_frame = SG_FRAME; m->sg_ishift = SG_ISHIFT; - m->sg_pmask = SG_PMASK; + m->sg_pmask = SG_PMASK; m->sg40_shift1 = SG4_SHIFT1; m->sg40_mask2 = SG4_MASK2; m->sg40_shift2 = SG4_SHIFT2; @@ -1164,7 +1164,7 @@ mmu030_setup(paddr_t sysseg_pa, u_int kstsize, paddr_t ptpa, psize_t ptsize, pg_proto += PAGE_SIZE; } - /* + /* * Invalidate the remainder of the tables. */ esg = (st_entry_t *)sysseg_pa; @@ -1315,7 +1315,7 @@ initcpu(void) extern trapfun illinst; #endif - __asm volatile ("movl %0,%%d0; .word 0x4e7b,0x0808" : : + __asm volatile ("movl %0,%%d0; .word 0x4e7b,0x0808" : : "d"(m68060_pcr_init):"d0" ); /* bus/addrerr vectors */ @@ -1396,8 +1396,8 @@ dump_segtable(u_int *stp) shift = SG_ISHIFT; } - /* - * XXX need changes for 68040 + /* + * XXX need changes for 68040 */ for (i = 0; s < es; s++, i++) if (*s & SG_V) diff --git a/sys/arch/atari/atari/autoconf.c b/sys/arch/atari/atari/autoconf.c index 762bb32bcec..2d550f47821 100644 --- a/sys/arch/atari/atari/autoconf.c +++ b/sys/arch/atari/atari/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.73 2022/07/02 13:47:53 tsutsui Exp $ */ +/* $NetBSD: autoconf.c,v 1.74 2023/01/06 10:28:27 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.73 2022/07/02 13:47:53 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.74 2023/01/06 10:28:27 tsutsui Exp $"); #include "opt_md.h" @@ -134,8 +134,8 @@ simple_devprint(void *aux, const char *pnp) /* * use config_search_ia to find appropriate device, then call that device - * directly with NULL device variable storage. A device can then - * always tell the difference between the real and console init + * directly with NULL device variable storage. A device can then + * always tell the difference between the real and console init * by checking for NULL. */ int @@ -175,12 +175,12 @@ atari_config_found(cfdata_t pcfp, device_t parent, void *aux, cfprint_t pfn, /* * this function needs to get enough configured to do a console - * basically this means start attaching the grfxx's that support + * basically this means start attaching the grfxx's that support * the console. Kinda hacky but it works. */ void config_console(void) -{ +{ cfdata_t cf; config_init(); @@ -261,7 +261,7 @@ findroot(void) if (dkp->dk_driver == NULL || dkp->dk_driver->d_strategy == NULL) continue; - + maj = devsw_name2blk(genericconf[i]->cd_name, NULL, 0); if (maj == -1) continue; @@ -280,7 +280,7 @@ findroot(void) continue; (void)(*bdev->d_close)(MAKEDISKDEV(maj, unit, 0), FREAD|FNONBLOCK, 0, &lwp0); - + pp = &dkp->dk_label->d_partitions[booted_partition]; if (pp->p_size != 0 && pp->p_fstype == FS_BSDFFS) { booted_device = devs[unit]; @@ -290,8 +290,8 @@ findroot(void) } } -/* - * mainbus driver +/* + * mainbus driver */ CFATTACH_DECL_NEW(mainbus, 0, mbmatch, mbattach, NULL, NULL); diff --git a/sys/arch/atari/atari/be_bus.c b/sys/arch/atari/atari/be_bus.c index 7a90ef17638..efe168f3b3b 100644 --- a/sys/arch/atari/atari/be_bus.c +++ b/sys/arch/atari/atari/be_bus.c @@ -1,4 +1,4 @@ -/* $NetBSD: be_bus.c,v 1.17 2021/01/03 17:42:10 thorpej Exp $ */ +/* $NetBSD: be_bus.c,v 1.18 2023/01/06 10:28:27 tsutsui Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: be_bus.c,v 1.17 2021/01/03 17:42:10 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: be_bus.c,v 1.18 2023/01/06 10:28:27 tsutsui Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -186,7 +186,7 @@ beb_alloc_bus_space_tag(bus_space_tag_t storage) beb_t = kmem_alloc(sizeof(*beb_t), KM_SLEEP); } memset(beb_t, 0, sizeof(*beb_t)); - + beb_t->abs_p_1 = beb_bus_space_peek_1; beb_t->abs_p_2 = beb_bus_space_peek_2; beb_t->abs_p_4 = beb_bus_space_peek_4; @@ -269,21 +269,21 @@ beb_bus_space_peek_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) return !badbaddr((void *)(h + o), 1); } -static int +static int beb_bus_space_peek_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) { return !badbaddr((void *)(h + o), 2); } -static int +static int beb_bus_space_peek_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) { return !badbaddr((void *)(h + o), 4); } -static int +static int beb_bus_space_peek_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) { @@ -368,7 +368,7 @@ beb_bus_space_write_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, /* * void bus_space_read_multi_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, uintX_t *address, - * bus_size_t count); + * bus_size_t count); * * Read 'count' 1, 2, 4, or 8 byte values from the bus_space described by * tag/handle at `offset' and store them in the address range starting at diff --git a/sys/arch/atari/atari/bus.c b/sys/arch/atari/atari/bus.c index a2d7baf7f63..878d46dc618 100644 --- a/sys/arch/atari/atari/bus.c +++ b/sys/arch/atari/atari/bus.c @@ -1,4 +1,4 @@ -/* $NetBSD: bus.c,v 1.67 2022/07/26 20:08:55 andvar Exp $ */ +/* $NetBSD: bus.c,v 1.68 2023/01/06 10:28:27 tsutsui Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #include "opt_m68k_arch.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.67 2022/07/26 20:08:55 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.68 2023/01/06 10:28:27 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -110,7 +110,7 @@ bootm_alloc(paddr_t pa, u_long size, int flags) (u_long)pa, size); return 0; } - + pg = &bootm_ptep[btoc(rva - bootm_ex->ex_start)]; epg = &pg[btoc(size)]; va = rva; @@ -379,7 +379,7 @@ static size_t _bus_dmamap_mapsize(int const nsegments) { - KASSERT(nsegments > 0); + KASSERT(nsegments > 0); return sizeof(struct atari_bus_dmamap) + (sizeof(bus_dma_segment_t) * (nsegments - 1)); } diff --git a/sys/arch/atari/atari/device.h b/sys/arch/atari/atari/device.h index 9fb4e2f0f06..4d82ceb8953 100644 --- a/sys/arch/atari/atari/device.h +++ b/sys/arch/atari/atari/device.h @@ -1,4 +1,4 @@ -/* $NetBSD: device.h,v 1.8 2021/08/07 16:18:46 thorpej Exp $ */ +/* $NetBSD: device.h,v 1.9 2023/01/06 10:28:27 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman @@ -34,9 +34,9 @@ #ifndef _ATARI_DEVICE_H_ #define _ATARI_DEVICE_H_ -/* +/* * devices that need to configure before console use this - * *and know it* (i.e. everything is really tight certain params won't be + * *and know it* (i.e. everything is really tight certain params won't be * passed in some cases and the devices will deal with it) */ int atari_config_found(cfdata_t, device_t, void *, cfprint_t, diff --git a/sys/arch/atari/atari/genassym.cf b/sys/arch/atari/atari/genassym.cf index 36d9dd0d6c5..33cb735cf8d 100644 --- a/sys/arch/atari/atari/genassym.cf +++ b/sys/arch/atari/atari/genassym.cf @@ -1,12 +1,12 @@ -# $NetBSD: genassym.cf,v 1.35 2020/02/20 08:27:38 skrll Exp $ +# $NetBSD: genassym.cf,v 1.36 2023/01/06 10:28:27 tsutsui Exp $ #- # Copyright (c) 1997 The NetBSD Foundation, Inc. # All rights reserved. -# +# # This code is derived from software contributed to The NetBSD Foundation # by Leo Weppelman. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: @@ -15,7 +15,7 @@ # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR @@ -156,7 +156,7 @@ define SIZEOF_PCB sizeof(struct pcb) # frame offsets define TF_PC offsetof(struct frame, f_pc) - + # exception frame offset/sizes define FR_SP offsetof(struct frame, f_regs[15]) define FR_HW offsetof(struct frame, f_sr) diff --git a/sys/arch/atari/atari/intr.c b/sys/arch/atari/atari/intr.c index 6a303649b52..f8f64d7e3e9 100644 --- a/sys/arch/atari/atari/intr.c +++ b/sys/arch/atari/atari/intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.30 2022/07/02 08:25:21 tsutsui Exp $ */ +/* $NetBSD: intr.c,v 1.31 2023/01/06 10:28:27 tsutsui Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.30 2022/07/02 08:25:21 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.31 2023/01/06 10:28:27 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -169,7 +169,7 @@ intr_establish(int vector, int type, int pri, hw_ifun_t ih_fun, void *ih_arg) */ *hard_vec = (u_long)intr_glue; } - + splx(s); return ih; diff --git a/sys/arch/atari/atari/le_bus.c b/sys/arch/atari/atari/le_bus.c index 6bdaceb58a3..97318262792 100644 --- a/sys/arch/atari/atari/le_bus.c +++ b/sys/arch/atari/atari/le_bus.c @@ -1,4 +1,4 @@ -/* $NetBSD: le_bus.c,v 1.22 2021/09/16 20:17:47 andvar Exp $ */ +/* $NetBSD: le_bus.c,v 1.23 2023/01/06 10:28:27 tsutsui Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: le_bus.c,v 1.22 2021/09/16 20:17:47 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: le_bus.c,v 1.23 2023/01/06 10:28:27 tsutsui Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -353,21 +353,21 @@ leb_bus_space_peek_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) return !badbaddr((void *)(h + o), 1); } -static int +static int leb_bus_space_peek_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) { return !badbaddr((void *)(h + o), 2); } -static int +static int leb_bus_space_peek_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) { return !badbaddr((void *)(h + o), 4); } -static int +static int leb_bus_space_peek_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) { @@ -514,7 +514,7 @@ leb_bus_space_write_stream_8(bus_space_tag_t t, bus_space_handle_t h, /* * void bus_space_read_multi_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, uintX_t *address, - * bus_size_t count); + * bus_size_t count); * * Read 'count' 1, 2, 4, or 8 byte values from the bus_space described by * tag/handle at `offset' and store them in the address range starting at @@ -605,7 +605,7 @@ leb_bus_space_write_multi_8(bus_space_tag_t t, bus_space_handle_t h, /* * void bus_space_read_multi_stream_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, uintX_t *address, - * bus_size_t count); + * bus_size_t count); * * Read 'count' 1, 2, 4, or 8 byte values from the bus_space described by * tag/handle at `offset' and store them in the address range starting at diff --git a/sys/arch/atari/atari/locore.s b/sys/arch/atari/atari/locore.s index ea79f0a5edc..019e20533ac 100644 --- a/sys/arch/atari/atari/locore.s +++ b/sys/arch/atari/atari/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.116 2022/05/30 09:56:03 andvar Exp $ */ +/* $NetBSD: locore.s,v 1.117 2023/01/06 10:28:27 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -88,7 +88,7 @@ ENTRY_NOPROFILE(doadump) /* * Trap/interrupt vector routines - */ + */ #include <m68k/m68k/trap_subr.s> #if defined(M68040) || defined(M68060) @@ -111,7 +111,7 @@ ENTRY_NOPROFILE(buserr60) movl %a0,%sp@(FR_SP) | in the savearea movel %sp@(FR_HW+12),%d0 | FSLW btst #2,%d0 | branch prediction error? - jeq Lnobpe + jeq Lnobpe movc %cacr,%d2 orl #IC60_CABC,%d2 | clear all branch cache entries movc %d2,%cacr @@ -131,7 +131,7 @@ Lnobpe: Lberr3: movl %d1,%sp@- movl %d0,%sp@- | code is FSLW now. - andw #0x1f80,%d0 + andw #0x1f80,%d0 jeq Lisberr movl #T_MMUFLT,%sp@- | show that we are an MMU fault jra _ASM_LABEL(faultstkadj) | and deal with it @@ -642,7 +642,7 @@ ENTRY_NOPROFILE(spurintr) addql #1,_C_LABEL(intrcnt)+0 INTERRUPT_SAVEREG | save scratch registers CPUINFO_INCREMENT(CI_NINTR) - INTERRUPT_RESTOREREG | restore scratch regs + INTERRUPT_RESTOREREG | restore scratch regs jra _ASM_LABEL(rei) /* MFP timer A handler --- System clock --- */ @@ -655,7 +655,7 @@ ASENTRY_NOPROFILE(mfp_tima) addql #1,_C_LABEL(intrcnt_user)+52 | add another system clock interrupt CPUINFO_INCREMENT(CI_NINTR) - INTERRUPT_RESTOREREG | restore scratch regs + INTERRUPT_RESTOREREG | restore scratch regs subql #1,_C_LABEL(idepth) jra _ASM_LABEL(rei) | all done @@ -667,7 +667,7 @@ ASENTRY_NOPROFILE(mfp_timc) jbsr _C_LABEL(statintr) | call statistics clock handler addql #1,_C_LABEL(intrcnt)+36 | add another stat clock interrupt CPUINFO_INCREMENT(CI_NINTR) - INTERRUPT_RESTOREREG | restore scratch regs + INTERRUPT_RESTOREREG | restore scratch regs subql #1,_C_LABEL(idepth) jra _ASM_LABEL(rei) | all done #endif /* STATCLOCK */ @@ -684,7 +684,7 @@ ASENTRY_NOPROFILE(mfp_kbd) jbsr _C_LABEL(kbdintr) | handle interrupt addql #4,%sp | pop SR CPUINFO_INCREMENT(CI_NINTR) - INTERRUPT_RESTOREREG | restore scratch regs + INTERRUPT_RESTOREREG | restore scratch regs subql #1,_C_LABEL(idepth) jra _ASM_LABEL(rei) #endif /* NKBD */ @@ -701,7 +701,7 @@ ASENTRY_NOPROFILE(mfp2_5380dm) jbsr _C_LABEL(scsi_dma) | handle interrupt addql #4,%sp | pop SR CPUINFO_INCREMENT(CI_NINTR) - INTERRUPT_RESTOREREG | restore scratch regs + INTERRUPT_RESTOREREG | restore scratch regs subql #1,_C_LABEL(idepth) jra _ASM_LABEL(rei) @@ -716,7 +716,7 @@ ASENTRY_NOPROFILE(mfp2_5380) jbsr _C_LABEL(scsi_ctrl) | handle interrupt addql #4,%sp | pop SR CPUINFO_INCREMENT(CI_NINTR) - INTERRUPT_RESTOREREG | restore scratch regs + INTERRUPT_RESTOREREG | restore scratch regs subql #1,_C_LABEL(idepth) jra _ASM_LABEL(rei) #endif /* NNCRSCSI > 0 */ @@ -796,7 +796,7 @@ Lrei1: clrl %sp@- | code == none movl #T_ASTFLT,%sp@- | type == async system trap pea %sp@(12) | fp == address of trap frame - jbsr _C_LABEL(trap) | go handle it + jbsr _C_LABEL(trap) | go handle it lea %sp@(16),%sp | pop value args movl %sp@(FR_SP),%a0 | restore user SP movl %a0,%usp | from save area @@ -838,15 +838,15 @@ Lgotsir: pea %sp@(12) | fp == address of trap frame jbsr _C_LABEL(trap) | go handle it lea %sp@(16),%sp | pop value args - movl %sp@(FR_SP),%a0 | restore + movl %sp@(FR_SP),%a0 | restore movl %a0,%usp | user SP moveml %sp@+,#0x7FFF | and all remaining registers - addql #8,%sp | pop SP and stack adjust + addql #8,%sp | pop SP and stack adjust rte Lnosir: movl %sp@+,%d0 | restore scratch register Ldorte: - rte | real return + rte | real return /* * Initialization @@ -1014,11 +1014,11 @@ Lcacheon: * When "main()" returns, we're running in process 1 and have * successfully faked the "execve()". We load up the registers from * that set; the "rte" loads the PC and PSR, which jumps to "init". - */ + */ movl #0,%a6 | make DDB stack_trace() work - clrw %sp@- | vector offset/frame type + clrw %sp@- | vector offset/frame type clrl %sp@- | PC - filled in by "execve" - movw #PSL_USER,%sp@- | in user mode + movw #PSL_USER,%sp@- | in user mode clrl %sp@- | stack adjust count lea %sp@(-64),%sp | construct space for D0-D7/A0-A7 lea _C_LABEL(lwp0),%a0 | lwp0 in a0 @@ -1037,7 +1037,7 @@ Lnoflush: movl %a0,%usp | user SP moveml %sp@+,#0x7FFF | load most registers (all but SSP) addql #8,%sp | pop SSP and stack adjust count - rte + rte /* * Use common m68k sigcode. @@ -1251,7 +1251,7 @@ Ldoboot0: Ldb1: clrl %a0@+ dbra %d0,Ldb1 - + lea Ldoreboot,%a1 | a1 = start of copy range lea Ldorebootend,%a2 | a2 = end of copy range movl _C_LABEL(page_zero),%a0 | a0 = virtual base for page zero diff --git a/sys/arch/atari/atari/mainbus.c b/sys/arch/atari/atari/mainbus.c index b78ca1269e0..d844cfc4b9d 100644 --- a/sys/arch/atari/atari/mainbus.c +++ b/sys/arch/atari/atari/mainbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.13 2021/01/03 17:42:10 thorpej Exp $ */ +/* $NetBSD: mainbus.c,v 1.14 2023/01/06 10:28:27 tsutsui Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.13 2021/01/03 17:42:10 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.14 2023/01/06 10:28:27 tsutsui Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -246,21 +246,21 @@ mb_bus_space_peek_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) return !badbaddr((void *)(calc_addr(h, o, t->stride, t->wo_1)), 1); } -static int +static int mb_bus_space_peek_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) { return !badbaddr((void *)(calc_addr(h, o, t->stride, t->wo_2)), 2); } -static int +static int mb_bus_space_peek_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) { return !badbaddr((void *)(calc_addr(h, o, t->stride, t->wo_4)), 4); } -static int +static int mb_bus_space_peek_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) { diff --git a/sys/arch/atari/atari/pmap_bootstrap.c b/sys/arch/atari/atari/pmap_bootstrap.c index 98cf039b445..db010720620 100644 --- a/sys/arch/atari/atari/pmap_bootstrap.c +++ b/sys/arch/atari/atari/pmap_bootstrap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.9 2018/03/10 02:48:51 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.10 2023/01/06 10:28:27 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -28,7 +28,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* +/* * Copyright (c) 1991 Regents of the University of California. * All rights reserved. * @@ -89,7 +89,7 @@ extern paddr_t msgbufpa; /* * All those kernel PT submaps that BSD is so fond of */ -void *CADDR1, *CADDR2; +void *CADDR1, *CADDR2; char *vmmap; /* diff --git a/sys/arch/atari/atari/stalloc.c b/sys/arch/atari/atari/stalloc.c index 5ab765a9a35..12d554f5e30 100644 --- a/sys/arch/atari/atari/stalloc.c +++ b/sys/arch/atari/atari/stalloc.c @@ -1,4 +1,4 @@ -/* $NetBSD: stalloc.c,v 1.18 2022/07/02 08:43:28 tsutsui Exp $ */ +/* $NetBSD: stalloc.c,v 1.19 2023/01/06 10:28:27 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman (Atari modifications) @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: stalloc.c,v 1.18 2022/07/02 08:43:28 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: stalloc.c,v 1.19 2023/01/06 10:28:27 tsutsui Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -65,13 +65,13 @@ init_stmem(void) s = splhigh(); stmem_total = st_pool_size - sizeof(*mem); - + mem = (struct mem_node *)st_pool_virt; mem->size = st_pool_size - sizeof(*mem); TAILQ_INIT(&st_list); TAILQ_INIT(&free_list); - + TAILQ_INSERT_HEAD(&st_list, mem, link); TAILQ_INSERT_HEAD(&free_list, mem, free_link); splx(s); @@ -88,7 +88,7 @@ alloc_stmem(u_long size, void **phys_addr) s = splhigh(); - if ((size & ~(ST_BLOCKMASK)) != 0) + if ((size & ~(ST_BLOCKMASK)) != 0) size = (size & ST_BLOCKMASK) + ST_BLOCKSIZE; /* @@ -114,7 +114,7 @@ alloc_stmem(u_long size, void **phys_addr) if ((mn->size - size) <= sizeof(*mn)) { /* - * our allocation would not leave room + * our allocation would not leave room * for a new node in between. */ TAILQ_REMOVE(&free_list, mn, free_link); diff --git a/sys/arch/atari/atari/stalloc.h b/sys/arch/atari/atari/stalloc.h index 479dd7b39f4..7be600c8f25 100644 --- a/sys/arch/atari/atari/stalloc.h +++ b/sys/arch/atari/atari/stalloc.h @@ -1,4 +1,4 @@ -/* $NetBSD: stalloc.h,v 1.6 2014/01/03 07:14:20 mlelstv Exp $ */ +/* $NetBSD: stalloc.h,v 1.7 2023/01/06 10:28:27 tsutsui Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps (allocator stuff) @@ -39,7 +39,7 @@ * St-mem allocator stuff. */ struct mem_node { - TAILQ_ENTRY(mem_node) link; + TAILQ_ENTRY(mem_node) link; TAILQ_ENTRY(mem_node) free_link; u_long size; /* size of memory following node. */ u_char type; /* free, used */ diff --git a/sys/arch/atari/atari/trap.c b/sys/arch/atari/atari/trap.c index 7ac9a56833b..ca5a4a6e5c0 100644 --- a/sys/arch/atari/atari/trap.c +++ b/sys/arch/atari/atari/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.117 2021/09/25 19:16:31 tsutsui Exp $ */ +/* $NetBSD: trap.c,v 1.118 2023/01/06 10:28:27 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.117 2021/09/25 19:16:31 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.118 2023/01/06 10:28:27 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_execfmt.h" @@ -369,7 +369,7 @@ trap(struct frame *fp, int type, u_int code, u_int v) BUS_OBJERR : BUS_ADRERR; break; - /* + /* * Kernel coprocessor violation */ case T_COPERR: @@ -402,7 +402,7 @@ trap(struct frame *fp, int type, u_int code, u_int v) ILL_COPROC : ILL_ILLOPC; break; - /* + /* * User coprocessor violation */ case T_COPERR|T_USER: @@ -411,8 +411,8 @@ trap(struct frame *fp, int type, u_int code, u_int v) ksi.ksi_code = FPE_FLTINV; break; - /* - * 6888x exceptions + /* + * 6888x exceptions */ case T_FPERR|T_USER: /* @@ -464,7 +464,7 @@ trap(struct frame *fp, int type, u_int code, u_int v) break; /* - * divde by zero, CHK/TRAPV inst + * divde by zero, CHK/TRAPV inst */ case T_ZERODIV|T_USER: ksi.ksi_code = FPE_FLTDIV; @@ -511,7 +511,7 @@ trap(struct frame *fp, int type, u_int code, u_int v) fp->f_sr &= ~PSL_T; ksi.ksi_signo = SIGTRAP; break; - /* + /* * Kernel AST (should not happen) */ case T_ASTFLT: @@ -572,8 +572,8 @@ trap(struct frame *fp, int type, u_int code, u_int v) #endif /* * It is only a kernel address space fault iff: - * 1. (type & T_USER) == 0 and - * 2. pcb_onfault not set or + * 1. (type & T_USER) == 0 and + * 2. pcb_onfault not set or * 3. pcb_onfault set but supervisor space data fault * The last can occur during an exec() copyin where the * argument space is lazy-allocated. @@ -670,5 +670,5 @@ trap(struct frame *fp, int type, u_int code, u_int v) if ((type & T_USER) == 0) return; out: - userret(l, fp, sticks, v, 1); + userret(l, fp, sticks, v, 1); } diff --git a/sys/arch/atari/atari/vectors.s b/sys/arch/atari/atari/vectors.s index eeb5cb41390..8220f61ec24 100644 --- a/sys/arch/atari/atari/vectors.s +++ b/sys/arch/atari/atari/vectors.s @@ -1,4 +1,4 @@ -/* $NetBSD: vectors.s,v 1.23 2011/02/08 20:20:09 rmind Exp $ */ +/* $NetBSD: vectors.s,v 1.24 2023/01/06 10:28:27 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah @@ -82,7 +82,7 @@ GLOBAL(autovects) #ifdef COMPAT_16 VECTOR(trap3) | 35: compat_16_sigreturn special syscall #else - VECTOR(illinst) + VECTOR(illinst) #endif VECTOR(illinst) | 36: TRAP instruction vector VECTOR(illinst) | 37: TRAP instruction vector @@ -147,7 +147,7 @@ GLOBAL(uservects) VECTOR(badmfpint) | 72: Display enable counter VECTOR(badmfpint) | 73: modem port 1 - XMIT error VECTOR(badmfpint) | 74: modem port 1 - XMIT buffer empty - VECTOR(badmfpint) | 75: modem port 1 - RCV error + VECTOR(badmfpint) | 75: modem port 1 - RCV error VECTOR(badmfpint) | 76: modem port 1 - RCV buffer full ASVECTOR(mfp_tima) | 77: Timer A (System clock) VECTOR(badmfpint) | 78: modem port 1 - RI diff --git a/sys/arch/atari/conf/majors.atari b/sys/arch/atari/conf/majors.atari index c402ba0df3d..026d18da710 100644 --- a/sys/arch/atari/conf/majors.atari +++ b/sys/arch/atari/conf/majors.atari @@ -1,4 +1,4 @@ -# $NetBSD: majors.atari,v 1.26 2020/04/04 16:06:11 jdolecek Exp $ +# $NetBSD: majors.atari,v 1.27 2023/01/06 10:28:27 tsutsui Exp $ # # Device majors for atari # @@ -63,5 +63,5 @@ device-major wsmouse char 59 wsmouse #device-major obsolete char 98 obsolete (nsmb) # Majors up to 143 are reserved for machine-dependent drivers. -# New machine-independent driver majors are assigned in +# New machine-independent driver majors are assigned in # sys/conf/majors. diff --git a/sys/arch/atari/dev/atari5380.c b/sys/arch/atari/dev/atari5380.c index 917dff7f477..d10622a9ceb 100644 --- a/sys/arch/atari/dev/atari5380.c +++ b/sys/arch/atari/dev/atari5380.c @@ -1,4 +1,4 @@ -/* $NetBSD: atari5380.c,v 1.65 2021/10/04 20:48:05 andvar Exp $ */ +/* $NetBSD: atari5380.c,v 1.66 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: atari5380.c,v 1.65 2021/10/04 20:48:05 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atari5380.c,v 1.66 2023/01/06 10:28:28 tsutsui Exp $"); #include "opt_atariscsi.h" @@ -65,7 +65,7 @@ __KERNEL_RCSID(0, "$NetBSD: atari5380.c,v 1.65 2021/10/04 20:48:05 andvar Exp $" * Set the various driver options */ #define NREQ 18 /* Size of issue queue */ -#define AUTO_SENSE 1 /* Automatically issue a request-sense */ +#define AUTO_SENSE 1 /* Automatically issue a request-sense */ #define DRNAME ncrscsi /* used in various prints */ #undef DBG_SEL /* Show the selection process */ @@ -214,7 +214,7 @@ static struct ncr_softc *cur_softc; #if defined(TT_SCSI) /* - * Prototype functions defined below + * Prototype functions defined below */ #ifdef NO_TTRAM_DMA static int tt_wrong_dma_range(SC_REQ *, struct dma_chain *); @@ -637,7 +637,6 @@ ncr5380_drq_intr(int poll) PID("end drq"); if (!poll) single_inst_bset_b(MFP2->mf_imra, IA_SCSI); - } #endif /* defined(TT_SCSI) */ @@ -667,7 +666,7 @@ ncr5380_drq_intr(int poll) #if defined(FALCON_SCSI) /* - * Prototype functions defined below + * Prototype functions defined below */ static void scsi_falcon_init(struct ncr_softc *); static uint8_t get_falcon_5380_reg(u_short); @@ -914,7 +913,7 @@ falcon_get_dma_result(SC_REQ *reqp, u_long *bytes_left) * should be handled by the mi-part of the driver. * NOTE: We formerly did this by using the 'byte-count-zero' bit * of the DMA controller, but this didn't seem to work??? - * [lwp 29/06/96] + * [lwp 29/06/96] */ bytes_done = st_dmaaddr_get() - reqp->dm_cur->dm_addr; if (bytes_done & 511) { diff --git a/sys/arch/atari/dev/dma.c b/sys/arch/atari/dev/dma.c index 03a1ca715df..13fddcc6e53 100644 --- a/sys/arch/atari/dev/dma.c +++ b/sys/arch/atari/dev/dma.c @@ -1,4 +1,4 @@ -/* $NetBSD: dma.c,v 1.28 2017/10/07 16:05:31 jdolecek Exp $ */ +/* $NetBSD: dma.c,v 1.29 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. @@ -47,7 +47,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dma.c,v 1.28 2017/10/07 16:05:31 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dma.c,v 1.29 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -164,7 +164,7 @@ st_dmafree(void *softc, int *lock_stat) { int s; DMA_ENTRY *req; - + s = splhigh(); /* diff --git a/sys/arch/atari/dev/fd.c b/sys/arch/atari/dev/fd.c index 35d114da84e..90b4717f580 100644 --- a/sys/arch/atari/dev/fd.c +++ b/sys/arch/atari/dev/fd.c @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.94 2022/06/26 18:46:14 tsutsui Exp $ */ +/* $NetBSD: fd.c,v 1.95 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.94 2022/06/26 18:46:14 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.95 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -183,7 +183,7 @@ struct fd_types { /* * This is set only once at attach time. The value is determined by reading - * the configuration switches and is one of the FLP_TYPE_*'s. + * the configuration switches and is one of the FLP_TYPE_*'s. * This is similar to the way Atari handles the _FLP cookie. */ static short def_type = 0; /* Reflects config-switches */ @@ -372,7 +372,7 @@ fdcprint(void *aux, const char *pnp) if (pnp != NULL) aprint_normal("fd%d at %s:", (int)aux, pnp); - + return UNCONF; } @@ -1302,7 +1302,7 @@ fdgetdefaultlabel(struct fd_softc *sc, struct disklabel *lp, int part) lp->d_secperunit = sc->nblocks; lp->d_type = DKTYPE_FLOPPY; - lp->d_rpm = 300; /* good guess I suppose. */ + lp->d_rpm = 300; /* good guess I suppose. */ lp->d_interleave = 1; /* FIXME: is this OK? */ lp->d_bbsize = 0; lp->d_sbsize = 0; diff --git a/sys/arch/atari/dev/font_8x16.c b/sys/arch/atari/dev/font_8x16.c index f0e007f58c3..be9078b0294 100644 --- a/sys/arch/atari/dev/font_8x16.c +++ b/sys/arch/atari/dev/font_8x16.c @@ -1,10 +1,10 @@ -/* $NetBSD: font_8x16.c,v 1.5 2022/06/21 15:40:20 tsutsui Exp $ */ +/* $NetBSD: font_8x16.c,v 1.6 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1992, 1993, 1994 Hellmuth Michaelis and Joerg Wunsch - * + * * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -15,11 +15,11 @@ * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: - * This product includes software developed by + * This product includes software developed by * Hellmuth Michaelis and Joerg Wunsch * 4. The name authors may not be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. @@ -36,12 +36,12 @@ * Translated into compiler and human readable for for the Atari-TT port of * NetBSD by Leo Weppelman. * - * Reorganized and edited some chars to fit the iso-8859-1 fontset by + * Reorganized and edited some chars to fit the iso-8859-1 fontset by * Thomas Gerner */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: font_8x16.c,v 1.5 2022/06/21 15:40:20 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: font_8x16.c,v 1.6 2023/01/06 10:28:28 tsutsui Exp $"); #include <atari/dev/font.h> diff --git a/sys/arch/atari/dev/font_8x8.c b/sys/arch/atari/dev/font_8x8.c index 8dddcc55454..8c3416496eb 100644 --- a/sys/arch/atari/dev/font_8x8.c +++ b/sys/arch/atari/dev/font_8x8.c @@ -1,10 +1,10 @@ -/* $NetBSD: font_8x8.c,v 1.4 2005/12/11 12:16:54 christos Exp $ */ +/* $NetBSD: font_8x8.c,v 1.5 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1992, 1993, 1994 Hellmuth Michaelis and Joerg Wunsch - * + * * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -15,11 +15,11 @@ * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: - * This product includes software developed by + * This product includes software developed by * Hellmuth Michaelis and Joerg Wunsch * 4. The name authors may not be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: font_8x8.c,v 1.4 2005/12/11 12:16:54 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: font_8x8.c,v 1.5 2023/01/06 10:28:28 tsutsui Exp $"); #include <atari/dev/font.h> @@ -50,7 +50,7 @@ char fontname_8x8[64] = "vt220iso.808"; extern unsigned char fontdata_8x8[]; font_info font_info_8x8 = { 1, 8, 8, 6, 0, 255, &fontdata_8x8[0] }; - + unsigned char fontdata_8x8[] = { /* 0x00 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x01 */ 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x7e, 0x3c, 0x18, diff --git a/sys/arch/atari/dev/grf.c b/sys/arch/atari/dev/grf.c index cd1bfebd6ba..983bf1ce38f 100644 --- a/sys/arch/atari/dev/grf.c +++ b/sys/arch/atari/dev/grf.c @@ -1,4 +1,4 @@ -/* $NetBSD: grf.c,v 1.55 2022/06/26 18:46:14 tsutsui Exp $ */ +/* $NetBSD: grf.c,v 1.56 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.55 2022/06/26 18:46:14 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.56 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -95,7 +95,7 @@ static int grfbusmatch(device_t, cfdata_t, void *); static void grfbusattach(device_t, device_t, void *); /* - * pointers to grf drivers device structs + * pointers to grf drivers device structs */ struct grf_softc *grfsp[NGRF]; /* XXX */ @@ -214,7 +214,7 @@ grfioctl(dev_t dev, u_long cmd, void * data, int flag, struct lwp *l) switch (cmd) { case OGRFIOCGINFO: /* argl.. no bank-member.. */ - memcpy(data, (void *)&gp->g_display, sizeof(struct grfinfo)-4); + memcpy(data, (void *)&gp->g_display, sizeof(struct grfinfo)-4); break; case GRFIOCGINFO: memcpy(data, (void *)&gp->g_display, sizeof(struct grfinfo)); @@ -263,7 +263,7 @@ grfioctl(dev_t dev, u_long cmd, void * data, int flag, struct lwp *l) } /* - * map the contents of a graphics display card into process' + * map the contents of a graphics display card into process' * memory space. */ static paddr_t @@ -272,14 +272,14 @@ grfmmap(dev_t dev, off_t off, int prot) struct grf_softc *gp; struct grfinfo *gi; u_int vgabase, linbase; - + gp = grfsp[GRFUNIT(dev)]; gi = &gp->g_display; vgabase = gi->gd_vgabase; linbase = gi->gd_linbase; - /* + /* * control registers */ if (off >= 0 && off < gi->gd_regsize) @@ -373,9 +373,9 @@ grf_viewsync(struct grf_softc *gp) (*view_cdevsw.d_ioctl)(gp->g_viewdev, VIOCGBMAP, (void *)&bm, 0, NOLWP); - + gp->g_data = (void *) 0xDeadBeaf; /* not particularly clean.. */ - + gi->gd_fbaddr = bm.hw_address; gi->gd_fbsize = bm.phys_mappable; gi->gd_linbase = bm.lin_base; @@ -397,7 +397,7 @@ grf_viewsync(struct grf_softc *gp) } gi->gd_colors = 1 << vs.depth; gi->gd_planes = vs.depth; - + gi->gd_fbwidth = vs.width; gi->gd_fbheight = vs.height; gi->gd_dyn.gdi_fbx = 0; @@ -406,7 +406,7 @@ grf_viewsync(struct grf_softc *gp) gi->gd_dyn.gdi_dheight = vs.height; gi->gd_dyn.gdi_dx = 0; gi->gd_dyn.gdi_dy = 0; -} +} /* * Change the mode of the display. diff --git a/sys/arch/atari/dev/grf_etreg.h b/sys/arch/atari/dev/grf_etreg.h index 88a38e991ad..544ff4f3b44 100644 --- a/sys/arch/atari/dev/grf_etreg.h +++ b/sys/arch/atari/dev/grf_etreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: grf_etreg.h,v 1.2 2007/03/04 05:59:40 christos Exp $ */ +/* $NetBSD: grf_etreg.h,v 1.3 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1996 Tobias Abt @@ -31,7 +31,7 @@ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _GRF_ETREG_H diff --git a/sys/arch/atari/dev/grfabs.c b/sys/arch/atari/dev/grfabs.c index cb3cc51e7c5..ec5a8e07096 100644 --- a/sys/arch/atari/dev/grfabs.c +++ b/sys/arch/atari/dev/grfabs.c @@ -1,4 +1,4 @@ -/* $NetBSD: grfabs.c,v 1.18 2012/02/12 16:34:07 matt Exp $ */ +/* $NetBSD: grfabs.c,v 1.19 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: grfabs.c,v 1.18 2012/02/12 16:34:07 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grfabs.c,v 1.19 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -185,7 +185,7 @@ get_best_display_mode(dimen_t *dim, int depth, dmode_t *curr_mode) { dmode_t *save; dmode_t *dm; - long dx, dy, dd, ct; + long dx, dy, dd, ct; long size_diff, depth_diff; save = NULL; diff --git a/sys/arch/atari/dev/grfabs_et.c b/sys/arch/atari/dev/grfabs_et.c index 8b0b59de81e..55a6f7c8404 100644 --- a/sys/arch/atari/dev/grfabs_et.c +++ b/sys/arch/atari/dev/grfabs_et.c @@ -1,4 +1,4 @@ -/* $NetBSD: grfabs_et.c,v 1.36 2021/08/12 19:53:18 andvar Exp $ */ +/* $NetBSD: grfabs_et.c,v 1.37 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1996 Leo Weppelman. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: grfabs_et.c,v 1.36 2021/08/12 19:53:18 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grfabs_et.c,v 1.37 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/param.h> #include <sys/queue.h> @@ -110,13 +110,13 @@ struct grfabs_sw et_vid_sw = { }; static struct grfvideo_mode hw_modes[] = { - { + { 0, "", 22450000, /* num, descr, pix-clock */ 640, 400, 4, /* width, height, depth */ 632/8, 672/8, 688/8, 808/8, 768/8,/* HBS, HBE, HSS, HSE, HT */ 399, 450, 408, 413, 449 /* VBS, VBE, VSS, VSE, VT */ }, - { + { 0, "", 25175000, /* num, descr, pix-clock */ 640, 480, 4, /* width, height, depth */ 632/8, 672/8, 688/8, 752/8, 752/8,/* HBS, HBE, HSS, HSE, HT */ @@ -150,7 +150,7 @@ static bmap_t con_bm; /* XXX */ struct grfabs_et_priv { pcitag_t pci_tag; void *regkva; - void *memkva; + void *memkva; u_int linbase; int regsz; int memsz; @@ -350,7 +350,7 @@ et_alloc_view(dmode_t *mode, dimen_t *dim, u_char depth) et_loadmode(mode->data, &sa->sv_regs); } else v->save_area = NULL; - + v->colormap = alloc_colormap(mode); if (v->colormap) { INIT_BOX(&box,0,0,mode->size.width,mode->size.height); @@ -473,8 +473,8 @@ static void et_loadmode(struct grfvideo_mode *mode, et_sv_reg_t *regs) { unsigned short HDE, VDE; - int lace, dblscan; - int uplim, lowlim; + int lace, dblscan; + int uplim, lowlim; int i; unsigned char clock, tmp; volatile u_char *ba; @@ -618,12 +618,12 @@ et_loadmode(struct grfvideo_mode *mode, et_sv_reg_t *regs) */ tmp = regs->misc_output & 0x3f; #if 1 /* This is according to my BW monitor & Xfree... */ - if (VDE < 400) + if (VDE < 400) tmp |= 0x40; /* -hsync +vsync */ else if (VDE < 480) tmp |= 0xc0; /* -hsync -vsync */ #else /* This is according to my color monitor.... */ - if (VDE < 400) + if (VDE < 400) tmp |= 0x00; /* +hsync +vsync */ else if (VDE < 480) tmp |= 0x80; /* +hsync -vsync */ diff --git a/sys/arch/atari/dev/grfabs_fal.c b/sys/arch/atari/dev/grfabs_fal.c index 8e2e2fd9d99..5063e1c7827 100644 --- a/sys/arch/atari/dev/grfabs_fal.c +++ b/sys/arch/atari/dev/grfabs_fal.c @@ -1,4 +1,4 @@ -/* $NetBSD: grfabs_fal.c,v 1.28 2021/08/17 22:00:27 andvar Exp $ */ +/* $NetBSD: grfabs_fal.c,v 1.29 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1995 Thomas Gerner. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: grfabs_fal.c,v 1.28 2021/08/17 22:00:27 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grfabs_fal.c,v 1.29 2023/01/06 10:28:28 tsutsui Exp $"); #ifdef FALCON_VIDEO /* @@ -55,7 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: grfabs_fal.c,v 1.28 2021/08/17 22:00:27 andvar Exp $ static void init_view(view_t *, bmap_t *, dmode_t *, box_t *); static bmap_t *alloc_bitmap(u_long, u_long, u_char); static colormap_t *alloc_colormap(dmode_t *); -static void free_bitmap(bmap_t *); +static void free_bitmap(bmap_t *); static void falcon_display_view(view_t *); static view_t *falcon_alloc_view(dmode_t *, dimen_t *, u_char); static void falcon_free_view(view_t *); @@ -100,7 +100,6 @@ static struct falcon_hwregs fal_hwregs[] = { { RES_VGA256 }, { RES_DIRECT } }; - static dmode_t vid_modes[] = { { {NULL,NULL}, "falauto", { 0, 0 }, 0, NULL, &fal_vid_sw}, @@ -129,8 +128,8 @@ static struct videl videlinit[] = { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }, - { FAL_VGA | RES_FAL_STHIGH, /* sthigh, 640x400, 2 colors */ - 0x2, 0x0, 0x28, 0x0, 0x400, 0xc6, 0x8d, 0x15, 0x273, 0x50, 0x96, 0x0, + { FAL_VGA | RES_FAL_STHIGH, /* sthigh, 640x400, 2 colors */ + 0x2, 0x0, 0x28, 0x0, 0x400, 0xc6, 0x8d, 0x15, 0x273, 0x50, 0x96, 0x0, 0x0, 0x419, 0x3af, 0x8f, 0x8f, 0x3af, 0x415, 0x186, 0x8 }, #if 0 /* not yet */ @@ -140,35 +139,35 @@ static struct videl videlinit[] = { #endif { FAL_VGA | RES_FAL_STMID, /* stmid, 640x200, 4 colors */ - 0x2, 0x0, 0x50, 0x1, 0x0, 0x17, 0x12, 0x1, 0x20e, 0xd, 0x11, 0x0, + 0x2, 0x0, 0x50, 0x1, 0x0, 0x17, 0x12, 0x1, 0x20e, 0xd, 0x11, 0x0, 0x0, 0x419, 0x3af, 0x8f, 0x8f, 0x3af, 0x415, 0x186, 0x9 }, { FAL_VGA | RES_FAL_STLOW, /* stlow, 320x200, 16 colors */ - 0x2, 0x0, 0x50, 0x0, 0x0, 0x17, 0x12, 0x1, 0x20e, 0xd, 0x11, 0x0, + 0x2, 0x0, 0x50, 0x0, 0x0, 0x17, 0x12, 0x1, 0x20e, 0xd, 0x11, 0x0, 0x0, 0x419, 0x3af, 0x8f, 0x8f, 0x3af, 0x415, 0x186, 0x5 }, { FAL_VGA | RES_FAL_TTLOW, /* ttlow, 320x480, 256 colors */ - 0x2, 0x0, 0xa0, 0x0, 0x10, 0xc6, 0x8d, 0x15, 0x29a, 0x7b, 0x96, 0x0, + 0x2, 0x0, 0xa0, 0x0, 0x10, 0xc6, 0x8d, 0x15, 0x29a, 0x7b, 0x96, 0x0, 0x0, 0x419, 0x3ff, 0x3f, 0x3f, 0x3ff, 0x415, 0x186, 0x4 }, { FAL_VGA | RES_VGA2, /* vga, 640x480, 2 colors */ - 0x2, 0x0, 0x28, 0x0, 0x400, 0xc6, 0x8d, 0x15, 0x273, 0x50, 0x96, 0x0, + 0x2, 0x0, 0x28, 0x0, 0x400, 0xc6, 0x8d, 0x15, 0x273, 0x50, 0x96, 0x0, 0x0, 0x419, 0x3ff, 0x3f, 0x3f, 0x3ff, 0x415, 0x186, 0x8 }, { FAL_VGA | RES_VGA4, /* vga, 640x480, 4 colors */ - 0x2, 0x0, 0x50, 0x1, 0x0, 0x17, 0x12, 0x1, 0x20e, 0xd, 0x11, 0x0, + 0x2, 0x0, 0x50, 0x1, 0x0, 0x17, 0x12, 0x1, 0x20e, 0xd, 0x11, 0x0, 0x0, 0x419, 0x3ff, 0x3f, 0x3f, 0x3ff, 0x415, 0x186, 0x8 }, { FAL_VGA | RES_VGA16, /* vga, 640x480, 16 colors */ - 0x2, 0x0, 0xa0, 0x1, 0x0, 0xc6, 0x8d, 0x15, 0x2a3, 0x7c, 0x96, 0x0, + 0x2, 0x0, 0xa0, 0x1, 0x0, 0xc6, 0x8d, 0x15, 0x2a3, 0x7c, 0x96, 0x0, 0x0, 0x419, 0x3ff, 0x3f, 0x3f, 0x3ff, 0x415, 0x186, 0x8 }, { FAL_VGA | RES_VGA256, /* vga, 640x480, 256 colors */ - 0x2, 0x0, 0x140, 0x1, 0x10, 0xc6, 0x8d, 0x15, 0x2ab, 0x84, 0x96, 0x0, + 0x2, 0x0, 0x140, 0x1, 0x10, 0xc6, 0x8d, 0x15, 0x2ab, 0x84, 0x96, 0x0, 0x0, 0x419, 0x3ff, 0x3f, 0x3f, 0x3ff, 0x415, 0x186, 0x8 }, { FAL_VGA | RES_DIRECT, /* direct video, 320x200, 65536 colors */ - 0x2, 0x0, 0x140, 0x0, 0x100, 0xc6, 0x8d, 0x15, 0x2ac, 0x91, 0x96, 0x0, + 0x2, 0x0, 0x140, 0x0, 0x100, 0xc6, 0x8d, 0x15, 0x2ac, 0x91, 0x96, 0x0, 0x0, 0x419, 0x3ff, 0x3f, 0x3f, 0x3ff, 0x415, 0x186, 0x4 }, { 0xffff } /* end of list */ @@ -220,7 +219,7 @@ falcon_getreg(u_short mode) { int i; struct videl *vregs; - + for (i = 0; (vregs = &videlinit[i])->video_mode != 0xffff; i++) if ((vregs->video_mode) == mode) return vregs; @@ -259,7 +258,6 @@ falcon_detect(dmode_t *dm) vregs->vd_v_ss = VIDEO->vd_v_ss; vregs->vd_fal_ctrl = VIDEO->vd_fal_ctrl; vregs->vd_fal_mode = VIDEO->vd_fal_mode; - /* * Calculate the depth of the screen @@ -518,7 +516,7 @@ falcon_alloc_view(dmode_t *mode, dimen_t *dim, u_char depth) v = malloc(sizeof(*v), M_DEVBUF, M_NOWAIT); if (v == NULL) return(NULL); - + bm = alloc_bitmap(mode->size.width, mode->size.height, mode->depth); if (bm) { box_t box; @@ -558,7 +556,7 @@ alloc_bitmap(u_long width, u_long height, u_char depth) * Sigh, it seems for mapping to work we need the bitplane data to * 1: be aligned on a page boundary. * 2: be n pages large. - * + * * why? because the user gets a page aligned address, if this is before * your allocation, too bad. Also it seems that the mapping routines * do not watch to closely to the allowable length. so if you go over diff --git a/sys/arch/atari/dev/grfabs_fal.h b/sys/arch/atari/dev/grfabs_fal.h index 38dc662bbcf..339419f54c1 100644 --- a/sys/arch/atari/dev/grfabs_fal.h +++ b/sys/arch/atari/dev/grfabs_fal.h @@ -1,4 +1,4 @@ -/* $NetBSD: grfabs_fal.h,v 1.5 2009/10/21 21:57:39 snj Exp $ */ +/* $NetBSD: grfabs_fal.h,v 1.6 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1995 Thomas Gerner. @@ -38,7 +38,7 @@ struct videl { u_char vd_st_res; /* ST resolution */ u_short vd_fal_res; /* Falcon resolution */ u_short vd_h_hold_tim; /* Falcon horizontal hold timer */ - u_short vd_h_bord_beg; /* Falcon horizontal border begin */ + u_short vd_h_bord_beg; /* Falcon horizontal border begin */ u_short vd_h_bord_end; /* Falcon horizontal border end */ u_short vd_h_dis_beg; /* Falcon horizontal display begin */ u_short vd_h_dis_end; /* Falcon horizontal display end */ diff --git a/sys/arch/atari/dev/grfabs_reg.h b/sys/arch/atari/dev/grfabs_reg.h index 38658dd6fb3..1e1e0a94d5d 100644 --- a/sys/arch/atari/dev/grfabs_reg.h +++ b/sys/arch/atari/dev/grfabs_reg.h @@ -1,4 +1,4 @@ -/* $NetBSD: grfabs_reg.h,v 1.14 2009/03/14 14:45:56 dsl Exp $ */ +/* $NetBSD: grfabs_reg.h,v 1.15 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman @@ -147,7 +147,7 @@ struct grfabs_sw { void (*free_view)(view_t *); void (*remove_view)(view_t *); void (*save_view)(view_t *); - int (*use_colormap)(view_t *, colormap_t *); + int (*use_colormap)(view_t *, colormap_t *); }; /* display mode */ diff --git a/sys/arch/atari/dev/grfabs_tt.c b/sys/arch/atari/dev/grfabs_tt.c index 1d45c79833d..5e617a6c436 100644 --- a/sys/arch/atari/dev/grfabs_tt.c +++ b/sys/arch/atari/dev/grfabs_tt.c @@ -1,4 +1,4 @@ -/* $NetBSD: grfabs_tt.c,v 1.24 2021/08/17 22:00:27 andvar Exp $ */ +/* $NetBSD: grfabs_tt.c,v 1.25 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: grfabs_tt.c,v 1.24 2021/08/17 22:00:27 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grfabs_tt.c,v 1.25 2023/01/06 10:28:28 tsutsui Exp $"); #ifdef TT_VIDEO /* @@ -54,7 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: grfabs_tt.c,v 1.24 2021/08/17 22:00:27 andvar Exp $" static void init_view(view_t *, bmap_t *, dmode_t *, box_t *); static bmap_t *alloc_bitmap(u_long, u_long, u_char); static colormap_t *alloc_colormap(dmode_t *); -static void free_bitmap(bmap_t *); +static void free_bitmap(bmap_t *); static void tt_display_view(view_t *); static view_t *tt_alloc_view(dmode_t *, dimen_t *, u_char); static void tt_free_view(view_t *); @@ -288,7 +288,7 @@ tt_alloc_view(dmode_t *mode, dimen_t *dim, u_char depth) v = malloc(sizeof(*v), M_DEVBUF, M_NOWAIT); if (v == NULL) return (NULL); - + bm = alloc_bitmap(mode->size.width, mode->size.height, mode->depth); if (bm) { box_t box; @@ -328,7 +328,7 @@ alloc_bitmap(u_long width, u_long height, u_char depth) * Sigh, it seems for mapping to work we need the bitplane data to * 1: be aligned on a page boundary. * 2: be n pages large. - * + * * why? because the user gets a page aligned address, if this is before * your allocation, too bad. Also it seems that the mapping routines * do not watch to closely to the allowable length. so if you go over diff --git a/sys/arch/atari/dev/grfioctl.h b/sys/arch/atari/dev/grfioctl.h index be3792763f6..d65b98b3fd2 100644 --- a/sys/arch/atari/dev/grfioctl.h +++ b/sys/arch/atari/dev/grfioctl.h @@ -1,4 +1,4 @@ -/* $NetBSD: grfioctl.h,v 1.12 2022/05/24 06:18:34 andvar Exp $ */ +/* $NetBSD: grfioctl.h,v 1.13 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -51,7 +51,7 @@ struct grfdyninfo { int gdi_dwidth; /* displayed part width */ int gdi_dheight; /* displayed part height */ int gdi_dx; /* displayed part x offset */ - int gdi_dy; /* displayed part y offset */ + int gdi_dy; /* displayed part y offset */ }; struct grfinfo { @@ -73,7 +73,7 @@ struct grfinfo { /* compatibility... */ #define gd_fbx gd_dyn.gdi_fbx #define gd_fby gd_dyn.gdi_fby -#define gd_dwidth gd_dyn.gdi_dwidth +#define gd_dwidth gd_dyn.gdi_dwidth #define gd_dheight gd_dyn.gdi_dheight #define gd_dx gd_dyn.gdi_dx #define gd_dy gd_dyn.gdi_dy @@ -83,7 +83,7 @@ struct grfinfo { }; -/* video mode, should be display-independent, but it might need +/* video mode, should be display-independent, but it might need modifications in the future to really become hardware-independent. */ struct grfvideo_mode { @@ -93,8 +93,8 @@ struct grfvideo_mode { u_short disp_width; /* width of displayed video (incl overscan) */ u_short disp_height; /* height "" */ u_short depth; /* number of bitplanes resp. bits per pixel */ - u_short hblank_start; - u_short hblank_stop; + u_short hblank_start; + u_short hblank_stop; u_short hsync_start; /* video-parameters, take care not to */ u_short hsync_stop; /* use parameters that violete specs of */ u_short htotal; /* your monitor ! */ @@ -130,7 +130,7 @@ struct grfvideo_mode { /* * generic framebuffer-related ioctls. These are somewhat * similar to SunOS fb-ioctls since I liked them reading - * thru the X11-server code. + * thru the X11-server code. */ /* diff --git a/sys/arch/atari/dev/grfvar.h b/sys/arch/atari/dev/grfvar.h index c75cc0a7d44..190a0259c09 100644 --- a/sys/arch/atari/dev/grfvar.h +++ b/sys/arch/atari/dev/grfvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: grfvar.h,v 1.14 2012/10/27 17:17:42 chs Exp $ */ +/* $NetBSD: grfvar.h,v 1.15 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -49,10 +49,10 @@ typedef struct { struct ite_softc; -/* +/* * this struct is owned by the driver (grfcc) - * and is passed to grf when grf is configed. The ite also - * uses it... + * and is passed to grf when grf is configed. The ite also + * uses it... */ struct grf_softc { device_t g_device; /* config sets this up. */ diff --git a/sys/arch/atari/dev/hdfd.c b/sys/arch/atari/dev/hdfd.c index 7acabf5e75d..591ebeaa326 100644 --- a/sys/arch/atari/dev/hdfd.c +++ b/sys/arch/atari/dev/hdfd.c @@ -1,4 +1,4 @@ -/* $NetBSD: hdfd.c,v 1.91 2022/06/26 18:46:14 tsutsui Exp $ */ +/* $NetBSD: hdfd.c,v 1.92 2023/01/06 10:28:28 tsutsui Exp $ */ /*- * Copyright (c) 1996 Leo Weppelman @@ -91,7 +91,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.91 2022/06/26 18:46:14 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.92 2023/01/06 10:28:28 tsutsui Exp $"); #include "opt_ddb.h" @@ -236,12 +236,12 @@ struct fd_type { * The order of the types is the same as for the TT/Falcon.... */ struct fd_type fd_types[] = { - /* 360kB in 720kB drive */ - { 9,2,18,2,0xff,0xdf,0x2a,0x50,40, 720,2,FDC_125KBPS,0xf6,1,"360KB" }, - /* 3.5" 720kB diskette */ - { 9,2,18,2,0xff,0xdf,0x2a,0x50,80,1440,1,FDC_125KBPS,0xf6,1,"720KB" }, - /* 1.44MB diskette */ - { 18,2,36,2,0xff,0xcf,0x1b,0x6c,80,2880,1,FDC_250KBPS,0xf6,1,"1.44MB" }, + /* 360kB in 720kB drive */ + { 9,2,18,2,0xff,0xdf,0x2a,0x50,40, 720,2,FDC_125KBPS,0xf6,1,"360KB" }, + /* 3.5" 720kB diskette */ + { 9,2,18,2,0xff,0xdf,0x2a,0x50,80,1440,1,FDC_125KBPS,0xf6,1,"720KB" }, + /* 1.44MB diskette */ + { 18,2,36,2,0xff,0xcf,0x1b,0x6c,80,2880,1,FDC_250KBPS,0xf6,1,"1.44MB" }, }; /* software state, per disk (with up to 4 disks per ctlr) */ @@ -257,7 +257,7 @@ struct fd_softc { daddr_t sc_blkno; /* starting block number */ int sc_bcount; /* byte count left */ - int sc_opts; /* user-set options */ + int sc_opts; /* user-set options */ int sc_skip; /* bytes already transferred */ int sc_nblks; /* #blocks currently transferring */ int sc_nbytes; /* #bytes currently transferring */ @@ -607,7 +607,7 @@ fdstrategy(struct buf *bp) { struct fd_softc *fd = device_lookup_private(&hdfd_cd, FDUNIT(bp->b_dev)); int sz; - int s; + int s; /* Valid unit, controller, and request? */ if (bp->b_blkno < 0 || @@ -639,7 +639,7 @@ fdstrategy(struct buf *bp) } bp->b_rawblkno = bp->b_blkno; - bp->b_cylinder = bp->b_blkno / (FDC_BSIZE/DEV_BSIZE) / fd->sc_type->seccyl; + bp->b_cylinder = bp->b_blkno / (FDC_BSIZE/DEV_BSIZE) / fd->sc_type->seccyl; #ifdef FD_DEBUG printf("fdstrategy: b_blkno %d b_bcount %ld blkno %qd cylin %ld sz" @@ -962,7 +962,7 @@ loop: fd = fdc->sc_drives.tqh_first; if (fd == NULL) { fdc->sc_state = DEVIDLE; - return 1; + return 1; } /* Is there a transfer to this drive? If not, deactivate drive. */ @@ -1448,7 +1448,7 @@ fdioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) fd_formb->fd_formb_secno(i) = il[i+1]; fd_formb->fd_formb_secsize(i) = fd->sc_type->secsize; } - + error = fdformat(dev, fd_formb, l->l_proc); kmem_free(fd_formb, sizeof(*fd_formb)); return error; @@ -1514,7 +1514,7 @@ fdformat(dev_t dev, struct ne7_fd_formb *finfo, struct proc *p) break; } mutex_exit(bp->b_objlock); - + if (rv == EWOULDBLOCK) { /* timed out */ rv = EIO; @@ -1588,12 +1588,12 @@ fdgetdefaultlabel(struct fd_softc *fd, struct disklabel *lp, int part) lp->d_secperunit = fd->sc_type->size; lp->d_type = DKTYPE_FLOPPY; - lp->d_rpm = 300; /* good guess I suppose. */ + lp->d_rpm = 300; /* good guess I suppose. */ lp->d_interleave = 1; /* FIXME: is this OK? */ lp->d_bbsize = 0; lp->d_sbsize = 0; lp->d_npartitions = part + 1; - lp->d_trkseek = 6000; /* Who cares... */ + lp->d_trkseek = 6000; /* Who cares... */ lp->d_magic = DISKMAGIC; lp->d_magic2 = DISKMAGIC; lp->d_checksum = dkcksum(lp); diff --git a/sys/arch/atari/dev/hdfd_intr.s b/sys/arch/atari/dev/hdfd_intr.s index fe4953bad9a..c8fdffa9856 100644 --- a/sys/arch/atari/dev/hdfd_intr.s +++ b/sys/arch/atari/dev/hdfd_intr.s @@ -1,4 +1,4 @@ -/* $NetBSD: hdfd_intr.s,v 1.10 2010/12/20 00:25:30 matt Exp $ +/* $NetBSD: hdfd_intr.s,v 1.11 2023/01/06 10:28:28 tsutsui Exp $ /* * Copyright (c) 1996 Leo Weppelman. @@ -135,7 +135,7 @@ hdfdc_norm: addl %d0, _C_LABEL(intrcnt_user)+88 | add another interrupt CPUINFO_ADD(CI_NINTR, %d0) 0: jbsr _C_LABEL(fdc_ctrl_intr) | handle interrupt - INTERRUPT_RESTOREREG | and saved registers + INTERRUPT_RESTOREREG | and saved registers jra _ASM_LABEL(rei) .data diff --git a/sys/arch/atari/dev/hdfdreg.h b/sys/arch/atari/dev/hdfdreg.h index 90dee04d7a8..a0430ab9e45 100644 --- a/sys/arch/atari/dev/hdfdreg.h +++ b/sys/arch/atari/dev/hdfdreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: hdfdreg.h,v 1.7 2011/06/30 20:09:21 wiz Exp $ */ +/* $NetBSD: hdfdreg.h,v 1.8 2023/01/06 10:28:28 tsutsui Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -100,7 +100,7 @@ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * - * From: FreeBSD: Id: ioctl_fd.h,v 1.7 1994/10/30 19:17:39 joerg Exp + * From: FreeBSD: Id: ioctl_fd.h,v 1.7 1994/10/30 19:17:39 joerg Exp */ #define FD_MAX_NSEC 36 /* highest known number of spt - allow for */ diff --git a/sys/arch/atari/dev/ite.c b/sys/arch/atari/dev/ite.c index 91a59bd7e9e..a6f1dfdb525 100644 --- a/sys/arch/atari/dev/ite.c +++ b/sys/arch/atari/dev/ite.c @@ -1,4 +1,4 @@ -/* $NetBSD: ite.c,v 1.84 2022/06/26 18:46:14 tsutsui Exp $ */ +/* $NetBSD: ite.c,v 1.85 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.84 2022/06/26 18:46:14 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.85 2023/01/06 10:28:28 tsutsui Exp $"); #include "opt_ddb.h" @@ -184,7 +184,7 @@ static int cons_ite = -1; static int itematch(device_t parent, cfdata_t cf, void *aux) { - + /* * Handle early console stuff. The first unit number * is the console unit. All other early matches will fail. @@ -240,7 +240,7 @@ iteattach(device_t parent, device_t self, void *aux) aprint_normal(" has keyboard"); aprint_normal("\n"); sc->flags |= ITE_ATTACHED; - } else { + } else { if (con_itesoftc.grf != NULL && con_itesoftc.grf->g_conpri > gsc->g_conpri) return; @@ -272,7 +272,7 @@ getitesp(dev_t dev) void itecnprobe(struct consdev *cd) { - /* + /* * return priority of the best ite (already picked from attach) * or CN_DEAD. */ @@ -346,7 +346,7 @@ itecnputc(dev_t dev, int c) * standard entry points to the device. */ -/* +/* * iteinit() is the standard entry point for initialization of * an ite device, it is also called from itecninit(). * @@ -512,7 +512,7 @@ iteioctl(dev_t dev, u_long cmd, void * addr, int flag, struct lwp *l) struct itewinsize *is; struct itebell *ib; int error; - + sc = getitesp(dev); tp = sc->tp; view = viewview(sc->grf->g_viewdev); @@ -606,7 +606,7 @@ itestart(struct tty *tp) tp->t_state |= TS_BUSY; rbp = &tp->t_outq; - + len = q_to_b(rbp, buf, ITEBURST); } splx(s); @@ -628,7 +628,7 @@ void ite_on(dev_t dev, int flag) { struct ite_softc *sc; - sc = getitesp(dev); + sc = getitesp(dev); /* force ite active, overriding graphics mode */ if (flag & 1) { @@ -689,7 +689,7 @@ ite_switch(int unit) /* * Make sure the cursor's there too.... */ - SUBR_CURSOR(sc, DRAW_CURSOR); + SUBR_CURSOR(sc, DRAW_CURSOR); } /* XXX called after changes made in underlying grf layer. */ @@ -777,7 +777,7 @@ ite_cnfilter(u_int c, enum caller caller) splx(s); return -1; } - + /* translate modifiers */ if (kbd_modifier & KBD_MOD_SHIFT) { if (kbd_modifier & KBD_MOD_ALT) @@ -849,7 +849,7 @@ static void repeat_handler(void *arg) { tout_pending = 0; - if (last_char) + if (last_char) add_sicallback((si_farg)ite_filter, (void *)last_char, (void *)ITEFILT_REPEATER); } @@ -883,7 +883,7 @@ ite_filter(u_int c, enum caller caller) /* have to make sure we're at spltty in here */ s = spltty(); - /* + /* * keyboard interrupts come at priority 2, while softint * generated keyboard-repeat interrupts come at level 1. So, * to not allow a key-up event to get thru before a repeat for @@ -969,7 +969,7 @@ ite_filter(u_int c, enum caller caller) } code = key.code; - /* + /* * Arrange to repeat the keystroke. By doing this at the level * of scan-codes, we can have function keys, and keys that * send strings, repeat too. This also entitles an additional @@ -1021,7 +1021,7 @@ ite_filter(u_int c, enum caller caller) static const char * const out = "pqrstuvwxymlnMPQRS"; char *cp = strchr(in, code); - /* + /* * keypad-appmode sends SS3 followed by the above * translated character */ @@ -1040,7 +1040,7 @@ ite_filter(u_int c, enum caller caller) 3, 27, 'O', 'D'}; str = kbdmap->strings + code; - /* + /* * if this is a cursor key, AND it has the default * keymap setting, AND we're in app-cursor mode, switch * to the above table. This is *nasty* ! @@ -1051,7 +1051,7 @@ ite_filter(u_int c, enum caller caller) strchr("ABCD", str[3])) str = app_cursor + 4 * (str[3] - 'A'); - /* + /* * using a length-byte instead of 0-termination allows * to embed \0 into strings, although this is not used * in the default keymap @@ -1082,87 +1082,89 @@ ite_sendstr(const char *str) static void alignment_display(struct ite_softc *sc) { - int i, j; + int i, j; - for (j = 0; j < sc->rows; j++) - for (i = 0; i < sc->cols; i++) - SUBR_PUTC(sc, 'E', j, i, ATTR_NOR); - attrclr(sc, 0, 0, sc->rows, sc->cols); - SUBR_CURSOR(sc, DRAW_CURSOR); + for (j = 0; j < sc->rows; j++) + for (i = 0; i < sc->cols; i++) + SUBR_PUTC(sc, 'E', j, i, ATTR_NOR); + attrclr(sc, 0, 0, sc->rows, sc->cols); + SUBR_CURSOR(sc, DRAW_CURSOR); } static inline void snap_cury(struct ite_softc *sc) { - if (sc->inside_margins) - { - if (sc->cury < sc->top_margin) - sc->cury = sc->top_margin; - if (sc->cury > sc->bottom_margin) - sc->cury = sc->bottom_margin; - } + + if (sc->inside_margins) { + if (sc->cury < sc->top_margin) + sc->cury = sc->top_margin; + if (sc->cury > sc->bottom_margin) + sc->cury = sc->bottom_margin; + } } static inline void ite_dnchar(struct ite_softc *sc, int n) { - n = uimin(n, sc->cols - sc->curx); - if (n < sc->cols - sc->curx) - { - SUBR_SCROLL(sc, sc->cury, sc->curx + n, n, SCROLL_LEFT); - attrmov(sc, sc->cury, sc->curx + n, sc->cury, sc->curx, - 1, sc->cols - sc->curx - n); - attrclr(sc, sc->cury, sc->cols - n, 1, n); - } - while (n-- > 0) - SUBR_PUTC(sc, ' ', sc->cury, sc->cols - n - 1, ATTR_NOR); - SUBR_CURSOR(sc, DRAW_CURSOR); + + n = uimin(n, sc->cols - sc->curx); + if (n < sc->cols - sc->curx) { + SUBR_SCROLL(sc, sc->cury, sc->curx + n, n, SCROLL_LEFT); + attrmov(sc, sc->cury, sc->curx + n, sc->cury, sc->curx, + 1, sc->cols - sc->curx - n); + attrclr(sc, sc->cury, sc->cols - n, 1, n); + } + while (n-- > 0) + SUBR_PUTC(sc, ' ', sc->cury, sc->cols - n - 1, ATTR_NOR); + SUBR_CURSOR(sc, DRAW_CURSOR); } static inline void ite_inchar(struct ite_softc *sc, int n) { - n = uimin(n, sc->cols - sc->curx); - if (n < sc->cols - sc->curx) - { - SUBR_SCROLL(sc, sc->cury, sc->curx, n, SCROLL_RIGHT); - attrmov(sc, sc->cury, sc->curx, sc->cury, sc->curx + n, - 1, sc->cols - sc->curx - n); - attrclr(sc, sc->cury, sc->curx, 1, n); - } - while (n--) - SUBR_PUTC(sc, ' ', sc->cury, sc->curx + n, ATTR_NOR); - SUBR_CURSOR(sc, DRAW_CURSOR); + + n = uimin(n, sc->cols - sc->curx); + if (n < sc->cols - sc->curx) { + SUBR_SCROLL(sc, sc->cury, sc->curx, n, SCROLL_RIGHT); + attrmov(sc, sc->cury, sc->curx, sc->cury, sc->curx + n, + 1, sc->cols - sc->curx - n); + attrclr(sc, sc->cury, sc->curx, 1, n); + } + while (n--) + SUBR_PUTC(sc, ' ', sc->cury, sc->curx + n, ATTR_NOR); + SUBR_CURSOR(sc, DRAW_CURSOR); } static inline void ite_clrtoeol(struct ite_softc *sc) { - int y = sc->cury, x = sc->curx; - if (sc->cols - x > 0) - { - SUBR_CLEAR(sc, y, x, 1, sc->cols - x); - attrclr(sc, y, x, 1, sc->cols - x); - SUBR_CURSOR(sc, DRAW_CURSOR); - } + int y = sc->cury, x = sc->curx; + + if (sc->cols - x > 0) { + SUBR_CLEAR(sc, y, x, 1, sc->cols - x); + attrclr(sc, y, x, 1, sc->cols - x); + SUBR_CURSOR(sc, DRAW_CURSOR); + } } static inline void ite_clrtobol(struct ite_softc *sc) { - int y = sc->cury, x = uimin(sc->curx + 1, sc->cols); - SUBR_CLEAR(sc, y, 0, 1, x); - attrclr(sc, y, 0, 1, x); - SUBR_CURSOR(sc, DRAW_CURSOR); + int y = sc->cury, x = uimin(sc->curx + 1, sc->cols); + + SUBR_CLEAR(sc, y, 0, 1, x); + attrclr(sc, y, 0, 1, x); + SUBR_CURSOR(sc, DRAW_CURSOR); } static inline void ite_clrline(struct ite_softc *sc) { - int y = sc->cury; - SUBR_CLEAR(sc, y, 0, 1, sc->cols); - attrclr(sc, y, 0, 1, sc->cols); - SUBR_CURSOR(sc, DRAW_CURSOR); + int y = sc->cury; + + SUBR_CLEAR(sc, y, 0, 1, sc->cols); + attrclr(sc, y, 0, 1, sc->cols); + SUBR_CURSOR(sc, DRAW_CURSOR); } @@ -1170,33 +1172,35 @@ ite_clrline(struct ite_softc *sc) static inline void ite_clrtoeos(struct ite_softc *sc) { - ite_clrtoeol(sc); - if (sc->cury < sc->rows - 1) - { - SUBR_CLEAR(sc, sc->cury + 1, 0, sc->rows - 1 - sc->cury, sc->cols); - attrclr(sc, sc->cury, 0, sc->rows - sc->cury, sc->cols); - SUBR_CURSOR(sc, DRAW_CURSOR); - } + + ite_clrtoeol(sc); + if (sc->cury < sc->rows - 1) { + SUBR_CLEAR(sc, sc->cury + 1, 0, + sc->rows - 1 - sc->cury, sc->cols); + attrclr(sc, sc->cury, 0, sc->rows - sc->cury, sc->cols); + SUBR_CURSOR(sc, DRAW_CURSOR); + } } static inline void ite_clrtobos(struct ite_softc *sc) { - ite_clrtobol(sc); - if (sc->cury > 0) - { - SUBR_CLEAR(sc, 0, 0, sc->cury, sc->cols); - attrclr(sc, 0, 0, sc->cury, sc->cols); - SUBR_CURSOR(sc, DRAW_CURSOR); - } + + ite_clrtobol(sc); + if (sc->cury > 0) { + SUBR_CLEAR(sc, 0, 0, sc->cury, sc->cols); + attrclr(sc, 0, 0, sc->cury, sc->cols); + SUBR_CURSOR(sc, DRAW_CURSOR); + } } static inline void ite_clrscreen(struct ite_softc *sc) { - SUBR_CLEAR(sc, 0, 0, sc->rows, sc->cols); - attrclr(sc, 0, 0, sc->rows, sc->cols); - SUBR_CURSOR(sc, DRAW_CURSOR); + + SUBR_CLEAR(sc, 0, 0, sc->rows, sc->cols); + attrclr(sc, 0, 0, sc->rows, sc->cols); + SUBR_CURSOR(sc, DRAW_CURSOR); } @@ -1204,139 +1208,144 @@ ite_clrscreen(struct ite_softc *sc) static inline void ite_dnline(struct ite_softc *sc, int n) { - /* interesting.. if the cursor is outside the scrolling - region, this command is simply ignored.. */ - if (sc->cury < sc->top_margin || sc->cury > sc->bottom_margin) - return; - - n = uimin(n, sc->bottom_margin + 1 - sc->cury); - if (n <= sc->bottom_margin - sc->cury) - { - SUBR_SCROLL(sc, sc->cury + n, 0, n, SCROLL_UP); - attrmov(sc, sc->cury + n, 0, sc->cury, 0, - sc->bottom_margin + 1 - sc->cury - n, sc->cols); - } - SUBR_CLEAR(sc, sc->bottom_margin - n + 1, 0, n, sc->cols); - attrclr(sc, sc->bottom_margin - n + 1, 0, n, sc->cols); - SUBR_CURSOR(sc, DRAW_CURSOR); + + /* + * interesting.. if the cursor is outside the scrolling + * region, this command is simply ignored.. + */ + if (sc->cury < sc->top_margin || sc->cury > sc->bottom_margin) + return; + + n = uimin(n, sc->bottom_margin + 1 - sc->cury); + if (n <= sc->bottom_margin - sc->cury) { + SUBR_SCROLL(sc, sc->cury + n, 0, n, SCROLL_UP); + attrmov(sc, sc->cury + n, 0, sc->cury, 0, + sc->bottom_margin + 1 - sc->cury - n, sc->cols); + } + SUBR_CLEAR(sc, sc->bottom_margin - n + 1, 0, n, sc->cols); + attrclr(sc, sc->bottom_margin - n + 1, 0, n, sc->cols); + SUBR_CURSOR(sc, DRAW_CURSOR); } static inline void ite_inline(struct ite_softc *sc, int n) { - /* interesting.. if the cursor is outside the scrolling - region, this command is simply ignored.. */ - if (sc->cury < sc->top_margin || sc->cury > sc->bottom_margin) - return; - - n = uimin(n, sc->bottom_margin + 1 - sc->cury); - if (n <= sc->bottom_margin - sc->cury) - { - SUBR_SCROLL(sc, sc->cury, 0, n, SCROLL_DOWN); - attrmov(sc, sc->cury, 0, sc->cury + n, 0, - sc->bottom_margin + 1 - sc->cury - n, sc->cols); - } - SUBR_CLEAR(sc, sc->cury, 0, n, sc->cols); - attrclr(sc, sc->cury, 0, n, sc->cols); - SUBR_CURSOR(sc, DRAW_CURSOR); + + /* + * interesting.. if the cursor is outside the scrolling + * region, this command is simply ignored.. + */ + if (sc->cury < sc->top_margin || sc->cury > sc->bottom_margin) + return; + + n = uimin(n, sc->bottom_margin + 1 - sc->cury); + if (n <= sc->bottom_margin - sc->cury) { + SUBR_SCROLL(sc, sc->cury, 0, n, SCROLL_DOWN); + attrmov(sc, sc->cury, 0, sc->cury + n, 0, + sc->bottom_margin + 1 - sc->cury - n, sc->cols); + } + SUBR_CLEAR(sc, sc->cury, 0, n, sc->cols); + attrclr(sc, sc->cury, 0, n, sc->cols); + SUBR_CURSOR(sc, DRAW_CURSOR); } static inline void -ite_lf (struct ite_softc *sc) +ite_lf(struct ite_softc *sc) { - ++sc->cury; - if ((sc->cury == sc->bottom_margin+1) || (sc->cury == sc->rows)) - { - sc->cury--; - SUBR_SCROLL(sc, sc->top_margin + 1, 0, 1, SCROLL_UP); - ite_clrline(sc); - } - SUBR_CURSOR(sc, MOVE_CURSOR); - clr_attr(sc, ATTR_INV); - - /* reset character set */ - sc->G0 = CSET_ASCII; - sc->G1 = CSET_DECGRAPH; - sc->G2 = 0; - sc->G3 = 0; - sc->GL = &sc->G0; - sc->GR = &sc->G1; + + ++sc->cury; + if ((sc->cury == sc->bottom_margin+1) || (sc->cury == sc->rows)) { + sc->cury--; + SUBR_SCROLL(sc, sc->top_margin + 1, 0, 1, SCROLL_UP); + ite_clrline(sc); + } + SUBR_CURSOR(sc, MOVE_CURSOR); + clr_attr(sc, ATTR_INV); + + /* reset character set */ + sc->G0 = CSET_ASCII; + sc->G1 = CSET_DECGRAPH; + sc->G2 = 0; + sc->G3 = 0; + sc->GL = &sc->G0; + sc->GR = &sc->G1; } static inline void -ite_crlf (struct ite_softc *sc) +ite_crlf(struct ite_softc *sc) { - sc->curx = 0; - ite_lf (sc); + + sc->curx = 0; + ite_lf(sc); } static inline void -ite_cr (struct ite_softc *sc) +ite_cr(struct ite_softc *sc) { - if (sc->curx) - { - sc->curx = 0; - SUBR_CURSOR(sc, MOVE_CURSOR); - } + + if (sc->curx) { + sc->curx = 0; + SUBR_CURSOR(sc, MOVE_CURSOR); + } } static inline void -ite_rlf (struct ite_softc *sc) +ite_rlf(struct ite_softc *sc) { - sc->cury--; - if ((sc->cury < 0) || (sc->cury == sc->top_margin - 1)) - { - sc->cury++; - SUBR_SCROLL(sc, sc->top_margin, 0, 1, SCROLL_DOWN); - ite_clrline(sc); - } - SUBR_CURSOR(sc, MOVE_CURSOR); - clr_attr(sc, ATTR_INV); + + sc->cury--; + if ((sc->cury < 0) || (sc->cury == sc->top_margin - 1)) { + sc->cury++; + SUBR_SCROLL(sc, sc->top_margin, 0, 1, SCROLL_DOWN); + ite_clrline(sc); + } + SUBR_CURSOR(sc, MOVE_CURSOR); + clr_attr(sc, ATTR_INV); } static inline int -atoi (const char *cp) +atoi(const char *cp) { - int n; + int n; - for (n = 0; *cp && *cp >= '0' && *cp <= '9'; cp++) - n = n * 10 + *cp - '0'; + for (n = 0; *cp && *cp >= '0' && *cp <= '9'; cp++) + n = n * 10 + *cp - '0'; - return n; + return n; } static inline int -ite_argnum (struct ite_softc *sc) +ite_argnum(struct ite_softc *sc) { - char ch; - int n; - - /* convert argument string into number */ - if (sc->ap == sc->argbuf) - return 1; - ch = *sc->ap; - *sc->ap = 0; - n = atoi (sc->argbuf); - *sc->ap = ch; - - return n; + char ch; + int n; + + /* convert argument string into number */ + if (sc->ap == sc->argbuf) + return 1; + ch = *sc->ap; + *sc->ap = 0; + n = atoi (sc->argbuf); + *sc->ap = ch; + + return n; } static inline int -ite_zargnum (struct ite_softc *sc) +ite_zargnum(struct ite_softc *sc) { - char ch; - int n; - - /* convert argument string into number */ - if (sc->ap == sc->argbuf) - return 0; - ch = *sc->ap; - *sc->ap = 0; - n = atoi (sc->argbuf); - *sc->ap = ch; - - return n; /* don't "n ? n : 1" here, <CSI>0m != <CSI>1m ! */ + char ch; + int n; + + /* convert argument string into number */ + if (sc->ap == sc->argbuf) + return 0; + ch = *sc->ap; + *sc->ap = 0; + n = atoi (sc->argbuf); + *sc->ap = ch; + + return n; /* don't "n ? n : 1" here, <CSI>0m != <CSI>1m ! */ } static void @@ -1344,12 +1353,12 @@ ite_putstr(const u_char *s, int len, dev_t dev) { struct ite_softc *sc; int i; - + sc = getitesp(dev); /* XXX avoid problems */ if ((sc->flags & (ITE_ACTIVE|ITE_INGRF)) != ITE_ACTIVE) - return; + return; SUBR_CURSOR(sc, START_CURSOROPT); for (i = 0; i < len; i++) @@ -1371,70 +1380,70 @@ iteputchar(register int c, struct ite_softc *sc) else kbd_tty = kbd_ite->tp; - if (sc->escape) + if (sc->escape) { - switch (sc->escape) + switch (sc->escape) { case ESC: switch (c) { /* first 7bit equivalents for the 8bit control characters */ - + case 'D': c = IND; sc->escape = 0; break; /* and fall into the next switch below (same for all `break') */ - + case 'E': c = NEL; sc->escape = 0; break; - + case 'H': c = HTS; sc->escape = 0; break; - + case 'M': c = RI; sc->escape = 0; break; - + case 'N': c = SS2; sc->escape = 0; break; - + case 'O': c = SS3; sc->escape = 0; break; - + case 'P': c = DCS; sc->escape = 0; break; - + case '[': c = CSI; sc->escape = 0; break; - + case '\\': c = ST; sc->escape = 0; break; - + case ']': c = OSC; sc->escape = 0; break; - + case '^': c = PM; sc->escape = 0; break; - + case '_': c = APC; sc->escape = 0; @@ -1447,8 +1456,8 @@ iteputchar(register int c, struct ite_softc *sc) sc->escape = ' '; break; - - /* a lot of character set selections, not yet used... + + /* a lot of character set selections, not yet used... 94-character sets: */ case '(': /* G0 */ case ')': /* G1 */ @@ -1461,12 +1470,12 @@ iteputchar(register int c, struct ite_softc *sc) case 'A': /* ISO latin 1 */ case '<': /* user preferred suplemental */ case '0': /* DEC special graphics */ - + /* 96-character sets: */ case '-': /* G1 */ case '.': /* G2 */ case '/': /* G3 */ - + /* national character sets: */ case '4': /* dutch */ case '5': @@ -1477,33 +1486,33 @@ iteputchar(register int c, struct ite_softc *sc) case 'Y': /* italian */ case '6': /* norwegian/danish */ /* note: %5 and %6 are not supported (two chars..) */ - + sc->escape = 0; /* just ignore for now */ return; - - + + /* locking shift modes (as you might guess, not yet supported..) */ case '`': sc->GR = &sc->G1; sc->escape = 0; return; - + case 'n': sc->GL = &sc->G2; sc->escape = 0; return; - + case '}': sc->GR = &sc->G2; sc->escape = 0; return; - + case 'o': sc->GL = &sc->G3; sc->escape = 0; return; - + case '|': sc->GR = &sc->G3; sc->escape = 0; @@ -1513,14 +1522,14 @@ iteputchar(register int c, struct ite_softc *sc) sc->GR = &sc->G1; sc->escape = 0; return; - - + + /* font width/height control */ case '#': sc->escape = '#'; return; - - + + /* hard terminal reset .. */ case 'c': ite_reset (sc); @@ -1542,7 +1551,7 @@ iteputchar(register int c, struct ite_softc *sc) sc->sc_GR = sc->GR; sc->escape = 0; return; - + case '8': /* restore cursor */ sc->curx = sc->save_curx; @@ -1557,17 +1566,17 @@ iteputchar(register int c, struct ite_softc *sc) SUBR_CURSOR(sc, MOVE_CURSOR); sc->escape = 0; return; - + case '=': sc->keypad_appmode = 1; sc->escape = 0; return; - + case '>': sc->keypad_appmode = 0; sc->escape = 0; return; - + case 'Z': /* request ID */ if (sc->emul_level == EMUL_VT100) ite_sendstr ("\033[?61;0c"); /* XXX not clean */ @@ -1611,20 +1620,20 @@ iteputchar(register int c, struct ite_softc *sc) sc->eightbit_C1 = 0; sc->escape = 0; return; - + case 'G': sc->eightbit_C1 = 1; sc->escape = 0; return; - + default: /* not supported */ sc->escape = 0; return; } break; - - + + case '#': switch (c) { @@ -1632,34 +1641,34 @@ iteputchar(register int c, struct ite_softc *sc) /* single height, single width */ sc->escape = 0; return; - + case '6': /* double width, single height */ sc->escape = 0; return; - + case '3': /* top half */ sc->escape = 0; return; - + case '4': /* bottom half */ sc->escape = 0; return; - + case '8': /* screen alignment pattern... */ alignment_display (sc); sc->escape = 0; return; - + default: sc->escape = 0; return; } break; - + case CSI: @@ -1688,14 +1697,14 @@ iteputchar(register int c, struct ite_softc *sc) if (! strncmp (sc->argbuf, "61\"", 3)) sc->emul_level = EMUL_VT100; else if (! strncmp (sc->argbuf, "63;1\"", 5) - || ! strncmp (sc->argbuf, "62;1\"", 5)) + || ! strncmp (sc->argbuf, "62;1\"", 5)) sc->emul_level = EMUL_VT300_7; else sc->emul_level = EMUL_VT300_8; sc->escape = 0; return; - - + + case '?': *sc->ap = 0; sc->escape = '?'; @@ -1704,7 +1713,7 @@ iteputchar(register int c, struct ite_softc *sc) case 'c': - *sc->ap = 0; + *sc->ap = 0; if (sc->argbuf[0] == '>') { ite_sendstr ("\033[>24;0;0;0c"); @@ -1737,8 +1746,8 @@ iteputchar(register int c, struct ite_softc *sc) } sc->escape = 0; return; - - + + case 'x': switch (ite_zargnum(sc)) { @@ -1769,8 +1778,8 @@ iteputchar(register int c, struct ite_softc *sc) sc->escape = 0; return; - - case 'h': case 'l': + + case 'h': case 'l': n = ite_zargnum (sc); switch (n) { @@ -1790,7 +1799,7 @@ iteputchar(register int c, struct ite_softc *sc) sc->escape = 0; return; - + case 'L': ite_inline (sc, ite_argnum (sc)); sc->escape = 0; @@ -1801,7 +1810,7 @@ iteputchar(register int c, struct ite_softc *sc) ite_dnchar (sc, ite_argnum (sc)); sc->escape = 0; return; - + case '@': ite_inchar (sc, ite_argnum (sc)); @@ -1810,7 +1819,7 @@ iteputchar(register int c, struct ite_softc *sc) case 'G': - /* this one was *not* in my vt320 manual but in + /* this one was *not* in my vt320 manual but in a vt320 termcap entry.. who is right? It's supposed to set the horizontal cursor position. */ *sc->ap = 0; @@ -1858,8 +1867,8 @@ iteputchar(register int c, struct ite_softc *sc) SUBR_CURSOR(sc, MOVE_CURSOR); clr_attr (sc, ATTR_INV); return; - - case 'A': + + case 'A': n = ite_argnum (sc); n = sc->cury - (n ? n : 1); if (n < 0) n = 0; @@ -1874,7 +1883,7 @@ iteputchar(register int c, struct ite_softc *sc) SUBR_CURSOR(sc, MOVE_CURSOR); clr_attr (sc, ATTR_INV); return; - + case 'B': n = ite_argnum (sc); n = sc->cury + (n ? n : 1); @@ -1890,7 +1899,7 @@ iteputchar(register int c, struct ite_softc *sc) SUBR_CURSOR(sc, MOVE_CURSOR); clr_attr (sc, ATTR_INV); return; - + case 'C': n = ite_argnum (sc); n = n ? n : 1; @@ -1899,7 +1908,7 @@ iteputchar(register int c, struct ite_softc *sc) SUBR_CURSOR(sc, MOVE_CURSOR); clr_attr (sc, ATTR_INV); return; - + case 'D': n = ite_argnum (sc); n = n ? n : 1; @@ -1909,8 +1918,8 @@ iteputchar(register int c, struct ite_softc *sc) SUBR_CURSOR(sc, MOVE_CURSOR); clr_attr (sc, ATTR_INV); return; - - + + case 'J': @@ -1949,7 +1958,7 @@ iteputchar(register int c, struct ite_softc *sc) sc->escape = 0; return; - + case '}': case '`': /* status line control */ sc->escape = 0; @@ -1985,8 +1994,8 @@ iteputchar(register int c, struct ite_softc *sc) } sc->escape = 0; return; - - + + case 'm': /* big attribute setter/resetter */ { @@ -2004,12 +2013,12 @@ iteputchar(register int c, struct ite_softc *sc) clr_attr (sc, ATTR_ALL); chp++; break; - + case '1': set_attr (sc, ATTR_BOLD); chp++; break; - + case '2': switch (chp[1]) { @@ -2017,49 +2026,49 @@ iteputchar(register int c, struct ite_softc *sc) clr_attr (sc, ATTR_BOLD); chp += 2; break; - + case '4': clr_attr (sc, ATTR_UL); chp += 2; break; - + case '5': clr_attr (sc, ATTR_BLINK); chp += 2; break; - + case '7': clr_attr (sc, ATTR_INV); chp += 2; break; - - default: - chp++; - break; - } + + default: + chp++; + break; + } break; - + case '4': set_attr (sc, ATTR_UL); chp++; break; - + case '5': set_attr (sc, ATTR_BLINK); chp++; break; - + case '7': set_attr (sc, ATTR_INV); chp++; break; - + default: chp++; break; } } - + } sc->escape = 0; return; @@ -2071,8 +2080,8 @@ iteputchar(register int c, struct ite_softc *sc) sc->escape = 0; return; - - + + default: sc->escape = 0; return; @@ -2082,8 +2091,7 @@ iteputchar(register int c, struct ite_softc *sc) case '?': /* CSI ? */ - switch (c) - { + switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ';': case '\"': case '$': @@ -2101,11 +2109,11 @@ iteputchar(register int c, struct ite_softc *sc) if (! strncmp (sc->argbuf, "15", 2)) /* printer status: no printer */ ite_sendstr ("\033[13n"); - + else if (! strncmp (sc->argbuf, "25", 2)) /* udk status */ ite_sendstr ("\033[20n"); - + else if (! strncmp (sc->argbuf, "26", 2)) /* keyboard dialect: US */ ite_sendstr ("\033[27;1n"); @@ -2114,7 +2122,7 @@ iteputchar(register int c, struct ite_softc *sc) return; - case 'h': case 'l': + case 'h': case 'l': n = ite_zargnum (sc); switch (n) { @@ -2158,14 +2166,14 @@ iteputchar(register int c, struct ite_softc *sc) } sc->escape = 0; return; - + default: sc->escape = 0; return; } break; - + default: sc->escape = 0; return; @@ -2177,7 +2185,7 @@ iteputchar(register int c, struct ite_softc *sc) case VT: /* VT is treated like LF */ case FF: /* so is FF */ case LF: - /* cr->crlf distinction is done here, on output, + /* cr->crlf distinction is done here, on output, not on input! */ if (sc->linefeed_newline) ite_crlf (sc); @@ -2188,7 +2196,7 @@ iteputchar(register int c, struct ite_softc *sc) case CR: ite_cr (sc); break; - + case BS: if (--sc->curx < 0) sc->curx = 0; @@ -2214,7 +2222,7 @@ iteputchar(register int c, struct ite_softc *sc) case SO: sc->GL = &sc->G1; break; - + case SI: sc->GL = &sc->G0; break; @@ -2226,7 +2234,7 @@ iteputchar(register int c, struct ite_softc *sc) case CAN: sc->escape = 0; /* cancel any escape sequence in progress */ break; - + case SUB: sc->escape = 0; /* dito, but see below */ /* should also display a reverse question mark!! */ @@ -2241,7 +2249,7 @@ iteputchar(register int c, struct ite_softc *sc) case IND: /* index: move cursor down, scroll */ ite_lf (sc); break; - + case NEL: /* next line. next line, first pos. */ ite_crlf (sc); break; @@ -2250,7 +2258,7 @@ iteputchar(register int c, struct ite_softc *sc) if (sc->curx < sc->cols) sc->tabs[sc->curx] = 1; break; - + case RI: /* reverse index */ ite_rlf (sc); break; @@ -2258,24 +2266,24 @@ iteputchar(register int c, struct ite_softc *sc) case SS2: /* go into G2 for one character */ /* not yet supported */ break; - + case SS3: /* go into G3 for one character */ break; - + case DCS: /* device control string introducer */ sc->escape = DCS; sc->ap = sc->argbuf; break; - + case CSI: /* control sequence introducer */ sc->escape = CSI; sc->ap = sc->argbuf; break; - + case ST: /* string terminator */ /* ignore, if not used as terminator */ break; - + case OSC: /* introduces OS command. Ignore everything upto ST */ sc->escape = OSC; break; @@ -2283,7 +2291,7 @@ iteputchar(register int c, struct ite_softc *sc) case PM: /* privacy message, ignore everything upto ST */ sc->escape = PM; break; - + case APC: /* application program command, ignore everything upto ST */ sc->escape = APC; break; @@ -2298,8 +2306,7 @@ iteputchar(register int c, struct ite_softc *sc) if ((sc->attribute & ATTR_INV) || attrtest(sc, ATTR_INV)) { attrset(sc, ATTR_INV); SUBR_PUTC(sc, c, sc->cury, sc->curx, ATTR_INV); - } - else + } else SUBR_PUTC(sc, c, sc->cury, sc->curx, ATTR_NOR); #else SUBR_PUTC(sc, c, sc->cury, sc->curx, sc->attribute); diff --git a/sys/arch/atari/dev/ite_cc.c b/sys/arch/atari/dev/ite_cc.c index 2f9b9da64b4..abedd70ac3e 100644 --- a/sys/arch/atari/dev/ite_cc.c +++ b/sys/arch/atari/dev/ite_cc.c @@ -1,4 +1,4 @@ -/* $NetBSD: ite_cc.c,v 1.46 2022/06/26 18:46:14 tsutsui Exp $ */ +/* $NetBSD: ite_cc.c,v 1.47 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1996 Leo Weppelman @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ite_cc.c,v 1.46 2022/06/26 18:46:14 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ite_cc.c,v 1.47 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -207,7 +207,7 @@ grfccattach(device_t parent, device_t self, void *aux) extern const struct cdevsw grf_cdevsw; /* - * find our major device number + * find our major device number */ maj = cdevsw_lookup_major(&grf_cdevsw); @@ -265,7 +265,7 @@ grfccattach(device_t parent, device_t self, void *aux) aprint_normal(" monochrome\n"); else aprint_normal(" colors %d\n", sc->g_display.gd_colors); - + /* * try and attach an ite */ @@ -302,7 +302,7 @@ grfcc_cnprobe(void) return CN_INTERNAL; } /* - * called from grf_cc to init ite portion of + * called from grf_cc to init ite portion of * grf_softc struct */ void @@ -375,7 +375,7 @@ static int ite_newsize(struct ite_softc *ip, struct itewinsize *winsz) { struct view_size vs; - ipriv_t *cci = ip->priv; + ipriv_t *cci = ip->priv; u_long i, j; int error = 0; view_t *view; @@ -394,7 +394,7 @@ ite_newsize(struct ite_softc *ip, struct itewinsize *winsz) /* * Reinitialize our structs */ - ip->cols = view->display.width / ip->font.width; + ip->cols = view->display.width / ip->font.width; ip->rows = view->display.height / ip->font.height; /* @@ -436,7 +436,7 @@ ite_newsize(struct ite_softc *ip, struct itewinsize *winsz) cci->ft_y = ip->font.height; cci->row_bytes = cci->row_offset * cci->ft_y; cci->row_ptr[0] = view->bitmap->plane; - for (i = 1; i < ip->rows; i++) + for (i = 1; i < ip->rows; i++) cci->row_ptr[i] = cci->row_ptr[i - 1] + cci->row_bytes; /* @@ -445,14 +445,14 @@ ite_newsize(struct ite_softc *ip, struct itewinsize *winsz) */ j = view->bitmap->depth * 2; cci->column_offset[0] = 0; - for (i = 1; i < ip->cols; i++) + for (i = 1; i < ip->cols; i++) cci->column_offset[i] = ((i >> 1) * j) + (i & 1); /* initialize the font cell pointers */ cci->font_cell[ip->font.font_lo] = ip->font.font_p; for (i = ip->font.font_lo + 1; i <= ip->font.font_hi; i++) cci->font_cell[i] = cci->font_cell[i - 1] + ip->font.height; - + return error; } @@ -481,8 +481,8 @@ itecc_ioctl(struct ite_softc *ip, u_long cmd, void * addr, int flag, ws.ws_ypixel = view->display.height; ite_reset(ip); /* - * XXX tell tty about the change - * XXX this is messy, but works + * XXX tell tty about the change + * XXX this is messy, but works */ (*ite_cdevsw.d_ioctl)(ip->grf->g_itedev, TIOCSWINSZ, (void *)&ws, 0, l); @@ -522,16 +522,16 @@ cursor32(struct ite_softc *ip, int flag) cci->cursor_opt++; return; /* if we are already opted. */ } - - if (cci->cursor_opt) + + if (cci->cursor_opt) return; /* if we are still nested. */ /* else we draw the cursor. */ - + if (flag != DRAW_CURSOR && flag != END_CURSOROPT) { /* * erase the cursor */ - cend = ip->font.height - 1; + cend = ip->font.height - 1; pl = cci->column_offset[ip->cursorx] + cci->row_ptr[ip->cursory]; __asm volatile @@ -545,8 +545,8 @@ cursor32(struct ite_softc *ip, int flag) if (flag != DRAW_CURSOR && flag != MOVE_CURSOR && flag != END_CURSOROPT) return; - - /* + + /* * draw the cursor */ cend = uimin(ip->curx, ip->cols - 1); @@ -555,7 +555,7 @@ cursor32(struct ite_softc *ip, int flag) return; ip->cursorx = cend; ip->cursory = ip->cury; - cend = ip->font.height - 1; + cend = ip->font.height - 1; pl = cci->column_offset[ip->cursorx] + cci->row_ptr[ip->cursory]; @@ -627,7 +627,7 @@ clear8(struct ite_softc *ip, int sy, int sx, int h, int w) /* common case: clearing whole lines */ while (h--) { int i; - u_char *ptr = cci->row_ptr[sy]; + u_char *ptr = cci->row_ptr[sy]; for (i = 0; i < ip->font.height; i++) { memset(ptr, 0, bm->bytes_per_row); ptr += bm->bytes_per_row; @@ -652,8 +652,8 @@ clear8(struct ite_softc *ip, int sy, int sx, int h, int w) u_char *p = pls; while (p <= ple) *p++ = 0; - pls += bm->bytes_per_row; - ple += bm->bytes_per_row; + pls += bm->bytes_per_row; + ple += bm->bytes_per_row; } } } @@ -674,7 +674,7 @@ scroll8(register struct ite_softc *ip, register int sy, int sx, int count, (ip->bottom_margin - dy + 1) * ip->font.height, 0, -(count * ip->font.height)); } else if (dir == SCROLL_DOWN) { - cursor32(ip, ERASE_CURSOR); + cursor32(ip, ERASE_CURSOR); scrollbmap(bm, 0, sy * ip->font.height, bm->bytes_per_row >> 3, (ip->bottom_margin - sy + 1) * ip->font.height, 0, count * ip->font.height); @@ -697,7 +697,7 @@ scroll8(register struct ite_softc *ip, register int sy, int sx, int count, : "a" (pl), "d" (dofs2), "d" (ip->font.width), "d" (t)); } - pl += bm->bytes_per_row; + pl += bm->bytes_per_row; } } else { /* SCROLL_LEFT */ int sofs = (sx) * ip->font.width; @@ -719,12 +719,12 @@ scroll8(register struct ite_softc *ip, register int sy, int sx, int count, sofs2 += ip->font.width; dofs2 += ip->font.width; } - pl += bm->bytes_per_row; + pl += bm->bytes_per_row; } - } + } } -static void +static void scrollbmap (bmap_t *bm, u_short x, u_short y, u_short width, u_short height, short dx, short dy) { @@ -733,11 +733,11 @@ scrollbmap (bmap_t *bm, u_short x, u_short y, u_short width, u_short height, if (dx) { /* FIX: */ panic ("delta x not supported in scroll bitmap yet."); - } + } if (dy == 0) { return; - } + } if (dy > 0) { u_long *pl = (u_long *)bm->plane; u_long *src_y = pl + (lwpr * y); @@ -746,13 +746,13 @@ scrollbmap (bmap_t *bm, u_short x, u_short y, u_short width, u_short height, u_long *clr_y = src_y; u_long clr_count = dest_y - src_y; u_long bc, cbc; - + src_y += count - 1; dest_y += count - 1; bc = count >> 4; count &= 0xf; - + while (bc--) { *dest_y-- = *src_y--; *dest_y-- = *src_y--; *dest_y-- = *src_y--; *dest_y-- = *src_y--; @@ -780,7 +780,7 @@ scrollbmap (bmap_t *bm, u_short x, u_short y, u_short width, u_short height, } else { u_long *pl = (u_long *)bm->plane; u_long *src_y = pl + (lwpr * (y - dy)); - u_long *dest_y = pl + (lwpr * y); + u_long *dest_y = pl + (lwpr * y); long count = lwpr * (height + dy); u_long *clr_y = dest_y + count; u_long clr_count = src_y - dest_y; @@ -788,7 +788,7 @@ scrollbmap (bmap_t *bm, u_short x, u_short y, u_short width, u_short height, bc = count >> 4; count &= 0xf; - + while (bc--) { *dest_y++ = *src_y++; *dest_y++ = *src_y++; *dest_y++ = *src_y++; *dest_y++ = *src_y++; diff --git a/sys/arch/atari/dev/ite_et.c b/sys/arch/atari/dev/ite_et.c index b890d410b3e..aa4e26c3e05 100644 --- a/sys/arch/atari/dev/ite_et.c +++ b/sys/arch/atari/dev/ite_et.c @@ -1,4 +1,4 @@ -/* $NetBSD: ite_et.c,v 1.37 2022/06/26 18:46:14 tsutsui Exp $ */ +/* $NetBSD: ite_et.c,v 1.38 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1996 Leo Weppelman. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ite_et.c,v 1.37 2022/06/26 18:46:14 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ite_et.c,v 1.38 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -181,7 +181,7 @@ grfetattach(device_t parent, device_t self, void *aux) extern const struct cdevsw grf_cdevsw; /* - * find our major device number + * find our major device number */ maj = cdevsw_lookup_major(&grf_cdevsw); @@ -239,7 +239,7 @@ grfetattach(device_t parent, device_t self, void *aux) aprint_normal(" monochrome\n"); else aprint_normal(" colors %d\n", sc->g_display.gd_colors); - + /* * try and attach an ite */ @@ -370,7 +370,7 @@ ite_newsize(struct ite_softc *ip, struct itewinsize *winsz) /* * Reinitialize our structs */ - ip->cols = view->display.width / ip->font.width; + ip->cols = view->display.width / ip->font.width; ip->rows = view->display.height / ip->font.height; /* @@ -421,8 +421,8 @@ iteet_ioctl(struct ite_softc *ip, u_long cmd, void * addr, int flag, ws.ws_ypixel = view->display.height; ite_reset(ip); /* - * XXX tell tty about the change - * XXX this is messy, but works + * XXX tell tty about the change + * XXX this is messy, but works */ (*ite_cdevsw.d_ioctl)(ip->grf->g_itedev, TIOCSWINSZ, (void *)&ws, 0, l); @@ -462,9 +462,9 @@ et_cursor(struct ite_softc *ip, int flag) return; switch (flag) { - case DRAW_CURSOR: + case DRAW_CURSOR: /*WCrt(ba, CRT_ID_CURSOR_START, & ~0x20); */ - case MOVE_CURSOR: + case MOVE_CURSOR: cpos = RCrt(ba, CRT_ID_START_ADDR_LOW) & 0xff; cpos |= (RCrt(ba, CRT_ID_START_ADDR_HIGH) & 0xff) << 8; cpos += ip->curx + ip->cury * ip->cols; @@ -475,13 +475,13 @@ et_cursor(struct ite_softc *ip, int flag) ip->cursorx = ip->curx; ip->cursory = ip->cury; break; - case ERASE_CURSOR: + case ERASE_CURSOR: /*WCrt(ba, CRT_ID_CURSOR_START, | 0x20); */ - case START_CURSOROPT: - case END_CURSOROPT: - default: + case START_CURSOROPT: + case END_CURSOROPT: + default: break; - } + } } void @@ -536,28 +536,28 @@ et_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir) fb = (u_short*)v->bitmap->plane + sy * ip->cols; switch (dir) { - case SCROLL_UP: - src = fb; - dst = fb - count * ip->cols; - len = (ip->bottom_margin + 1 - sy) * ip->cols; - break; - case SCROLL_DOWN: - src = fb; - dst = fb + count * ip->cols; - len = (ip->bottom_margin + 1 - (sy + count)) * ip->cols; - break; - case SCROLL_RIGHT: - src = fb + sx; - dst = fb + sx + count; - len = ip->cols - sx + count; - break; - case SCROLL_LEFT: - src = fb + sx; - dst = fb + sx - count; - len = ip->cols - sx; - break; - default: - return; + case SCROLL_UP: + src = fb; + dst = fb - count * ip->cols; + len = (ip->bottom_margin + 1 - sy) * ip->cols; + break; + case SCROLL_DOWN: + src = fb; + dst = fb + count * ip->cols; + len = (ip->bottom_margin + 1 - (sy + count)) * ip->cols; + break; + case SCROLL_RIGHT: + src = fb + sx; + dst = fb + sx + count; + len = ip->cols - sx + count; + break; + case SCROLL_LEFT: + src = fb + sx; + dst = fb + sx - count; + len = ip->cols - sx; + break; + default: + return; } if (src > dst) { while (len--) @@ -603,7 +603,7 @@ et_inittextmode(struct ite_softc *ip, et_sv_reg_t *etregs, int loadfont) vgaw(ba, VDAC_ADDRESS_W, 0); for (z = 0; z < 256; z++) { y = (z & 1) ? ((z > 7) ? 2 : 1) : 0; - + vgaw(ba, VDAC_DATA, etconscolors[y][0]); vgaw(ba, VDAC_DATA, etconscolors[y][1]); vgaw(ba, VDAC_DATA, etconscolors[y][2]); @@ -622,7 +622,7 @@ et_inittextmode(struct ite_softc *ip, et_sv_reg_t *etregs, int loadfont) WGfx(ba, GCT_ID_GRAPHICS_MODE, 0x00); WGfx(ba, GCT_ID_MISC, 0x04); splx(s); - + /* * load text font into beginning of display memory. Each * character cell is 32 bytes long (enough for 4 planes) diff --git a/sys/arch/atari/dev/itevar.h b/sys/arch/atari/dev/itevar.h index 08b5bbffacd..bd484ce6790 100644 --- a/sys/arch/atari/dev/itevar.h +++ b/sys/arch/atari/dev/itevar.h @@ -1,4 +1,4 @@ -/* $NetBSD: itevar.h,v 1.15 2022/06/25 03:33:29 tsutsui Exp $ */ +/* $NetBSD: itevar.h,v 1.16 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman (Atari modifications) @@ -91,10 +91,10 @@ struct ite_softc { short top_margin; short bottom_margin; short inside_margins; - short eightbit_C1; + short eightbit_C1; short emul_level; - enum ite_attr attribute; - enum ite_attr save_attribute; + enum ite_attr attribute; + enum ite_attr save_attribute; int curx; int save_curx; int cury; diff --git a/sys/arch/atari/dev/kbd.c b/sys/arch/atari/dev/kbd.c index 94b33e34354..32479f9d923 100644 --- a/sys/arch/atari/dev/kbd.c +++ b/sys/arch/atari/dev/kbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: kbd.c,v 1.56 2022/06/26 09:18:06 martin Exp $ */ +/* $NetBSD: kbd.c,v 1.57 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.56 2022/06/26 09:18:06 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.57 2023/01/06 10:28:28 tsutsui Exp $"); #include "mouse.h" #include "ite.h" @@ -95,7 +95,7 @@ struct kbd_softc { int sc_pollingmode; /* polling mode on? whatever it is... */ #endif void *sc_sicookie; /* softint(9) cookie */ - krndsource_t sc_rndsource; /* rnd(9) entropy */ + krndsource_t sc_rndsource; /* rnd(9) entropy */ }; /* WSKBD */ diff --git a/sys/arch/atari/dev/kbdmap.c b/sys/arch/atari/dev/kbdmap.c index eca3ac7a309..ea993dbc079 100644 --- a/sys/arch/atari/dev/kbdmap.c +++ b/sys/arch/atari/dev/kbdmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: kbdmap.c,v 1.6 2009/10/20 19:10:10 snj Exp $ */ +/* $NetBSD: kbdmap.c,v 1.7 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. @@ -26,11 +26,11 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kbdmap.c,v 1.6 2009/10/20 19:10:10 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kbdmap.c,v 1.7 2023/01/06 10:28:28 tsutsui Exp $"); #include <atari/dev/kbdmap.h> -/* define a default keymap. This can be changed by keyboard ioctl's +/* define a default keymap. This can be changed by keyboard ioctl's (later at least..) */ /* mode shortcuts: */ @@ -130,7 +130,7 @@ struct kbdmap ascii_kbdmap = { /* 0x78 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, /* 0x7c */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, - + /* alt map FIXME: No altmap yet.. */ { { 0, 0 } @@ -141,14 +141,14 @@ struct kbdmap ascii_kbdmap = { { 0, 0 } }, - { + { /* string table. If there's a better way to get the offsets into the above table, please tell me.. - + NOTE: save yourself and others a lot of grief by *not* using CSI == 0x9b, using the two-character sequence gives much less trouble, especially in GNU-Emacs.. */ - + 3, ESC, '[', 'A', /* 0x00: CRSR UP */ 3, ESC, '[', 'B', /* 0x04: CRSR DOWN */ 3, ESC, '[', 'C', /* 0x08: CRSR RIGHT */ @@ -187,18 +187,16 @@ struct kbdmap ascii_kbdmap = { unsigned char acctable[KBD_NUM_ACC][64] = { { "@ÀBCDÈFGHÌJKLMNÒPQRSTÙVWXYZ[\\]^_" "`àbcdèfghìjklmnòpqrstùvwxyz{|}~\177"}, /* KBD_ACC_GRAVE */ - + { "@ÁBCDÉFGHÍJKLMNÓPQRSTÚVWXYZ[\\]^_" "`ábcdéfghíjklmnópqrstúvwxyz{|}~\177"}, /* KBD_ACC_ACUTE */ - + { "@ÂBCDÊFGHÎJKLMNÔPQRSTÛVWXYZ[\\]^_" "`âbcdêfghîjklmnôpqrstûvwxyz{|}~\177"}, /* KBD_ACC_CIRC */ { "@ÃBCDEFGHIJKLMÑÕPQRSTUVWXYZ[\\]^_" "`ãbcdefghijklmñÕpqrstuvwxyz{|}~\177"}, /* KBD_ACC_TILDE */ - + { "@ÄBCDËFGHÏJKLMNÖPQRSTÜVWXYZ[\\]^_" "`äbcdëfghïjklmnöpqrstüvwxyz{|}~\177"}, /* KBD_ACC_DIER */ }; - - diff --git a/sys/arch/atari/dev/lpt.c b/sys/arch/atari/dev/lpt.c index f8d94b5a08e..cdff702cae7 100644 --- a/sys/arch/atari/dev/lpt.c +++ b/sys/arch/atari/dev/lpt.c @@ -1,4 +1,4 @@ -/* $NetBSD: lpt.c,v 1.39 2022/06/26 06:25:09 tsutsui Exp $ */ +/* $NetBSD: lpt.c,v 1.40 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1996 Leo Weppelman @@ -16,7 +16,7 @@ * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: - * This software is a component of "386BSD" developed by + * This software is a component of "386BSD" developed by * William F. Jolitz, TeleMuse. * 4. Neither the name of the developer nor the name "386BSD" * may be used to endorse or promote products derived from this software @@ -39,24 +39,24 @@ * Device Driver originally written for AT parallel printer port. Now * drives the printer port on the YM2149. * - * THIS SOFTWARE IS A COMPONENT OF 386BSD DEVELOPED BY WILLIAM F. JOLITZ - * AND IS INTENDED FOR RESEARCH AND EDUCATIONAL PURPOSES ONLY. THIS - * SOFTWARE SHOULD NOT BE CONSIDERED TO BE A COMMERCIAL PRODUCT. - * THE DEVELOPER URGES THAT USERS WHO REQUIRE A COMMERCIAL PRODUCT + * THIS SOFTWARE IS A COMPONENT OF 386BSD DEVELOPED BY WILLIAM F. JOLITZ + * AND IS INTENDED FOR RESEARCH AND EDUCATIONAL PURPOSES ONLY. THIS + * SOFTWARE SHOULD NOT BE CONSIDERED TO BE A COMMERCIAL PRODUCT. + * THE DEVELOPER URGES THAT USERS WHO REQUIRE A COMMERCIAL PRODUCT * NOT MAKE USE OF THIS WORK. * * FOR USERS WHO WISH TO UNDERSTAND THE 386BSD SYSTEM DEVELOPED - * BY WILLIAM F. JOLITZ, WE RECOMMEND THE USER STUDY WRITTEN - * REFERENCES SUCH AS THE "PORTING UNIX TO THE 386" SERIES - * (BEGINNING JANUARY 1991 "DR. DOBBS JOURNAL", USA AND BEGINNING - * JUNE 1991 "UNIX MAGAZIN", GERMANY) BY WILLIAM F. JOLITZ AND - * LYNNE GREER JOLITZ, AS WELL AS OTHER BOOKS ON UNIX AND THE - * ON-LINE 386BSD USER MANUAL BEFORE USE. A BOOK DISCUSSING THE INTERNALS + * BY WILLIAM F. JOLITZ, WE RECOMMEND THE USER STUDY WRITTEN + * REFERENCES SUCH AS THE "PORTING UNIX TO THE 386" SERIES + * (BEGINNING JANUARY 1991 "DR. DOBBS JOURNAL", USA AND BEGINNING + * JUNE 1991 "UNIX MAGAZIN", GERMANY) BY WILLIAM F. JOLITZ AND + * LYNNE GREER JOLITZ, AS WELL AS OTHER BOOKS ON UNIX AND THE + * ON-LINE 386BSD USER MANUAL BEFORE USE. A BOOK DISCUSSING THE INTERNALS * OF 386BSD ENTITLED "386BSD FROM THE INSIDE OUT" WILL BE AVAILABLE LATE 1992. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.39 2022/06/26 06:25:09 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.40 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -190,7 +190,7 @@ lpopen(dev_t dev, int flag, int mode, struct lwp *l) { u_char flags = LPTFLAGS(dev); struct lpt_softc *sc; - int error; + int error; int spin; int sps; @@ -335,7 +335,7 @@ pushbytes(struct lpt_softc *sc) return 0; } -/* +/* * Copy a line from user space to a local buffer, then call putc to get the * chars moved to the output queue. */ diff --git a/sys/arch/atari/dev/md_root.c b/sys/arch/atari/dev/md_root.c index 602435b80cc..258bf12de4c 100644 --- a/sys/arch/atari/dev/md_root.c +++ b/sys/arch/atari/dev/md_root.c @@ -1,4 +1,4 @@ -/* $NetBSD: md_root.c,v 1.35 2021/01/03 17:42:10 thorpej Exp $ */ +/* $NetBSD: md_root.c,v 1.36 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1996 Leo Weppelman. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: md_root.c,v 1.35 2021/01/03 17:42:10 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: md_root.c,v 1.36 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -281,8 +281,8 @@ md_compressed(void * buf, int nbyte, struct read_info *rsp) { static int dotc = 0; struct buf *bp; - int nread = 0; - int done, error; + int nread = 0; + int done, error; error = 0; diff --git a/sys/arch/atari/dev/ncr5380.c b/sys/arch/atari/dev/ncr5380.c index 42c982a1124..b0b66127c6c 100644 --- a/sys/arch/atari/dev/ncr5380.c +++ b/sys/arch/atari/dev/ncr5380.c @@ -1,4 +1,4 @@ -/* $NetBSD: ncr5380.c,v 1.77 2022/04/07 19:33:37 andvar Exp $ */ +/* $NetBSD: ncr5380.c,v 1.78 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ncr5380.c,v 1.77 2022/04/07 19:33:37 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ncr5380.c,v 1.78 2023/01/06 10:28:28 tsutsui Exp $"); /* * Bit mask of targets you want debugging to be shown @@ -145,7 +145,7 @@ finish_req(SC_REQ *reqp) /* * If we bounced, free the bounce buffer */ - if (reqp->dr_flag & DRIVER_BOUNCING) + if (reqp->dr_flag & DRIVER_BOUNCING) free_bounceb(reqp->bounceb); #endif /* REAL_DMA */ #ifdef DBG_REQ @@ -486,7 +486,7 @@ scsi_main(struct ncr_softc *sc) * Found one, remove it from * the issue queue. */ - if (prev == NULL) + if (prev == NULL) issue_q = req->next; else prev->next = req->next; @@ -510,7 +510,7 @@ scsi_main(struct ncr_softc *sc) if ((GET_5380_REG(NCR5380_IDSTAT) & (SC_S_SEL|SC_S_IO)) == (SC_S_SEL|SC_S_IO)){ if (req != NULL) { - req->next = issue_q; + req->next = issue_q; issue_q = req; } splx(sps); @@ -545,7 +545,7 @@ scsi_main(struct ncr_softc *sc) */ if (scsi_select(req, 0)) { sps = splbio(); - req->next = issue_q; + req->next = issue_q; issue_q = req; splx(sps); #ifdef DBG_REQ @@ -747,7 +747,7 @@ scsi_select(SC_REQ *reqp, int code) */ SET_5380_REG(NCR5380_DATA, SC_HOST_ID); SET_5380_REG(NCR5380_MODE, SC_ARBIT); - + splx(sps); cnt = 10; @@ -899,7 +899,7 @@ scsi_select(SC_REQ *reqp, int code) * Since we followed the SCSI-spec and raised ATN while SEL was true * but before BSY was false during the selection, a 'MESSAGE OUT' * phase should follow. Unfortunately, this does not happen on - * all targets (Asante ethernet devices, for example), so we must + * all targets (Asante ethernet devices, for example), so we must * check the actual mode if the message transfer fails--if the * new phase is PH_CMD and has never been successfully selected * w/ATN in the past, then we assume that it is an old device @@ -1104,7 +1104,7 @@ information_transfer(struct ncr_softc *sc) reqp->status = tmp; PID("info_transf6"); return -1; - default : + default: ncr_tprint(reqp, "Unknown phase\n"); } PID("info_transf7"); @@ -1181,7 +1181,7 @@ handle_message(SC_REQ *reqp, u_int msg) case MSG_ABORT: case MSG_CMDCOMPLETE: ack_message(); - connected = NULL; + connected = NULL; busy &= ~(1 << reqp->targ_id); if ((reqp->dr_flag & DRIVER_AUTOSEN) == 0) { reqp->xs->resid = reqp->xdata_len; @@ -1228,7 +1228,7 @@ handle_message(SC_REQ *reqp, u_int msg) nack_message(reqp, MSG_MESSAGE_REJECT); PID("hmessage9"); return -1; - default: + default: if ((msg & 0x80) && (msg & 0x18) == 0) { /* IDENTIFY */ PID("hmessage10"); ack_message(); @@ -1283,7 +1283,7 @@ reselect(struct ncr_softc *sc) } SET_5380_REG(NCR5380_ICOM, 0); - + /* * Check if the reselection is still valid. Check twice because * of possible line glitches - cheaper than delay(1) and we need @@ -1365,12 +1365,12 @@ transfer_pio(u_char *phase, u_char *data, u_long *len, int dont_drop_ack) SET_5380_REG(NCR5380_TCOM, ph); do { if (!wait_req_true()) { - DBG_PIOPRINT ("SCSI: transfer_pio: missing REQ\n", + DBG_PIOPRINT ("SCSI: transfer_pio: missing REQ\n", 0, 0); break; } if (((GET_5380_REG(NCR5380_IDSTAT) >> 2) & 7) != ph) { - DBG_PIOPRINT("SCSI: transfer_pio: phase mismatch\n", + DBG_PIOPRINT("SCSI: transfer_pio: phase mismatch\n", 0, 0); break; } @@ -1702,7 +1702,7 @@ reach_msg_out(struct ncr_softc *sc, u_long len) } ncr_aprint(sc, "Phase now: %d after %ld bytes.\n", phase, len - n); - + } return -1; } diff --git a/sys/arch/atari/dev/ncr5380reg.h b/sys/arch/atari/dev/ncr5380reg.h index fce3f4a2055..d9325ed51b5 100644 --- a/sys/arch/atari/dev/ncr5380reg.h +++ b/sys/arch/atari/dev/ncr5380reg.h @@ -1,4 +1,4 @@ -/* $NetBSD: ncr5380reg.h,v 1.23 2011/06/05 06:33:42 tsutsui Exp $ */ +/* $NetBSD: ncr5380reg.h,v 1.24 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. @@ -102,7 +102,7 @@ #define SC_ACK_STAT 0x01 /* R - State of ACK line */ #define SC_S_SEND 0x00 /* W - Start DMA output */ -#define SC_CLINT { /* Clear interrupts */ \ +#define SC_CLINT { /* Clear interrupts */ \ int i = GET_5380_REG(NCR5380_IRCV); \ } diff --git a/sys/arch/atari/dev/ncr5380var.h b/sys/arch/atari/dev/ncr5380var.h index 64b1aa3fc66..d91b917b614 100644 --- a/sys/arch/atari/dev/ncr5380var.h +++ b/sys/arch/atari/dev/ncr5380var.h @@ -1,4 +1,4 @@ -/* $NetBSD: ncr5380var.h,v 1.8 2010/04/13 13:30:37 tsutsui Exp $ */ +/* $NetBSD: ncr5380var.h,v 1.9 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1996 Leo Weppelman. @@ -36,21 +36,21 @@ #endif #ifdef DBG_SEL -#define DBG_SELPRINT(a,b) printf(a,b) +#define DBG_SELPRINT(a, b) printf(a, b) #else -#define DBG_SELPRINT(a,b) +#define DBG_SELPRINT(a, b) #endif #ifdef DBG_PIO -#define DBG_PIOPRINT(a,b,c) printf(a,b,c) +#define DBG_PIOPRINT(a, b, c) printf(a, b, c) #else -#define DBG_PIOPRINT(a,b,c) +#define DBG_PIOPRINT(a, b, c) #endif #ifdef DBG_INF -#define DBG_INFPRINT(a,b,c) a(b,c) +#define DBG_INFPRINT(a, b, c) a(b, c) #else -#define DBG_INFPRINT(a,b,c) +#define DBG_INFPRINT(a, b, c) #endif #ifdef DBG_PID diff --git a/sys/arch/atari/dev/nvram.c b/sys/arch/atari/dev/nvram.c index 340a3376330..86e8c583194 100644 --- a/sys/arch/atari/dev/nvram.c +++ b/sys/arch/atari/dev/nvram.c @@ -1,4 +1,4 @@ -/* $NetBSD: nvram.c,v 1.22 2022/07/02 14:29:04 tsutsui Exp $ */ +/* $NetBSD: nvram.c,v 1.23 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nvram.c,v 1.22 2022/07/02 14:29:04 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvram.c,v 1.23 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -89,7 +89,7 @@ nvr_attach(device_t parent, device_t self, void *aux) { struct nvr_softc *sc; int nreg; - + /* * Check the validity of the NVram contents */ @@ -181,7 +181,7 @@ nvram_csum(void) { uint8_t csum; int nreg; - + for (csum = 0, nreg = MC_NVRAM_START; nreg < MC_NVRAM_CSUM; nreg++) csum += mc146818_read(RTC, nreg); return csum; diff --git a/sys/arch/atari/dev/ser.c b/sys/arch/atari/dev/ser.c index 4ed0390812f..5a90f2069d7 100644 --- a/sys/arch/atari/dev/ser.c +++ b/sys/arch/atari/dev/ser.c @@ -1,4 +1,4 @@ -/* $NetBSD: ser.c,v 1.57 2022/06/26 06:25:09 tsutsui Exp $ */ +/* $NetBSD: ser.c,v 1.58 2023/01/06 10:28:28 tsutsui Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -60,11 +60,11 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + /* * Copyright (c) 1991 The Regents of the University of California. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -88,12 +88,12 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * + * * @(#)com.c 7.5 (Berkeley) 5/16/91 */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.57 2022/06/26 06:25:09 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.58 2023/01/06 10:28:28 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_mbtype.h" @@ -185,10 +185,10 @@ struct ser_softc { uint8_t sc_mcr_dtr, sc_mcr_rts, sc_msr_cts, sc_msr_dcd; int sc_r_hiwat; - volatile u_int sc_rbget; - volatile u_int sc_rbput; + volatile u_int sc_rbget; + volatile u_int sc_rbput; volatile u_int sc_rbavail; - uint8_t sc_rbuf[RXBUFSIZE]; + uint8_t sc_rbuf[RXBUFSIZE]; uint8_t sc_lbuf[RXBUFSIZE]; volatile uint8_t sc_rx_blocked; @@ -198,8 +198,8 @@ struct ser_softc { volatile uint8_t sc_tx_stopped; volatile uint8_t sc_st_check; - uint8_t *sc_tba; - int sc_tbc; + uint8_t *sc_tba; + int sc_tbc; int sc_heldtbc; volatile uint8_t sc_heldchange; @@ -379,7 +379,7 @@ seropen(dev_t dev, int flag, int mode, struct lwp *l) struct tty *tp; int s, s2; int error = 0; - + sc = device_lookup_private(&ser_cd, unit); if (sc == NULL) return ENXIO; @@ -488,7 +488,7 @@ bad: return error; } - + static int serclose(dev_t dev, int flag, int mode, struct lwp *l) { @@ -520,16 +520,16 @@ serread(dev_t dev, struct uio *uio, int flag) { struct ser_softc *sc = device_lookup_private(&ser_cd, SERUNIT(dev)); struct tty *tp = sc->sc_tty; - + return (*tp->t_linesw->l_read)(tp, uio, flag); } - + static int serwrite(dev_t dev, struct uio *uio, int flag) { struct ser_softc *sc = device_lookup_private(&ser_cd, SERUNIT(dev)); struct tty *tp = sc->sc_tty; - + return (*tp->t_linesw->l_write)(tp, uio, flag); } @@ -538,7 +538,7 @@ serpoll(dev_t dev, int events, struct lwp *l) { struct ser_softc *sc = device_lookup_private(&ser_cd, SERUNIT(dev)); struct tty *tp = sc->sc_tty; - + return (*tp->t_linesw->l_poll)(tp, events, l); } @@ -590,9 +590,9 @@ serioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) case TIOCSFLAGS: error = kauth_authorize_device_tty(l->l_cred, - KAUTH_DEVICE_TTY_PRIVSET, tp); + KAUTH_DEVICE_TTY_PRIVSET, tp); if (error) - return error; + return error; sc->sc_swflags = *(int *)data; break; @@ -765,7 +765,7 @@ serparam(struct tty *tp, struct termios *t) #endif sc->sc_ospeed = ospeed; - + /* and copy to tty */ tp->t_ispeed = 0; tp->t_ospeed = t->c_ospeed; @@ -1037,7 +1037,7 @@ ser_shutdown(struct ser_softc *sc) s = splhigh(); - + /* If we were asserting flow control, then deassert it. */ sc->sc_rx_blocked = 1; ser_hwiflow(sc, 1); @@ -1177,7 +1177,7 @@ sersoft(void *arg) if (!ISSET(tp->t_state, TS_ISOPEN) && (tp->t_wopen == 0)) return; - + if (sc->sc_rx_ready) { sc->sc_rx_ready = 0; serrxint(sc, tp); diff --git a/sys/arch/atari/dev/view.c b/sys/arch/atari/dev/view.c index 408b384452f..8ead66e2b3f 100644 --- a/sys/arch/atari/dev/view.c +++ b/sys/arch/atari/dev/view.c @@ -1,4 +1,4 @@ -/* $NetBSD: view.c,v 1.37 2022/06/26 06:25:09 tsutsui Exp $ */ +/* $NetBSD: view.c,v 1.38 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -31,14 +31,14 @@ */ /* The view major device is a placeholder device. It serves - * simply to map the semantics of a graphics dipslay to + * simply to map the semantics of a graphics dipslay to * the semantics of a character block device. In other * words the graphics system as currently built does not like to be * referred to by open/close/ioctl. This device serves as * a interface to graphics. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: view.c,v 1.37 2022/06/26 06:25:09 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: view.c,v 1.38 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -92,7 +92,7 @@ const struct cdevsw view_cdevsw = { .d_flag = 0 }; -/* +/* * functions for probeing. */ void @@ -106,8 +106,8 @@ viewattach(int cnt) int viewprobe(void) { - int i; - + int i; + if (view_inited) return 1; @@ -132,11 +132,11 @@ view_display (struct view_softc *vu) if (vu == NULL) return; - + s = spltty(); /* - * mark views that share this monitor as not displaying + * mark views that share this monitor as not displaying */ for (i = 0; i < NVIEW; i++) { if (views[i].flags & VUF_DISPLAY) { @@ -167,7 +167,7 @@ view_display (struct view_softc *vu) splx(s); } -/* +/* * remove a view from our added list if it is marked as displaying * switch to a new display. */ @@ -199,7 +199,7 @@ view_setsize(struct view_softc *vu, struct view_size *vs) dmode_t *dmode; dimen_t ns; int co, cs; - + co = 0; cs = 0; if (vs->x != vu->size.x || vs->y != vu->size.y) @@ -211,7 +211,7 @@ view_setsize(struct view_softc *vu, struct view_size *vs) if (cs == 0 && co == 0) return 0; - + ns.width = vs->width; ns.height = vs->height; @@ -225,7 +225,7 @@ view_setsize(struct view_softc *vu, struct view_size *vs) new = grf_alloc_view(dmode, &ns, vs->depth); if (new == NULL) return ENOMEM; - + old = vu->view; vu->view = new; vu->size.x = new->display.x; @@ -234,9 +234,9 @@ view_setsize(struct view_softc *vu, struct view_size *vs) vu->size.height = new->display.height; vu->size.depth = new->bitmap->depth; - /* - * we need a custom remove here to avoid letting - * another view display mark as not added or displayed + /* + * we need a custom remove here to avoid letting + * another view display mark as not added or displayed */ if (vu->flags & VUF_DISPLAY) { vu->flags &= ~(VUF_ADDED|VUF_DISPLAY); @@ -255,13 +255,13 @@ view_get_colormap (struct view_softc *vu, colormap_t *ucm) if (ucm->size > MAX_CENTRIES) return EINVAL; - + /* add one incase of zero, ick. */ cme = malloc(sizeof(ucm->entry[0])*(ucm->size+1), M_TEMP,M_WAITOK); if (cme == NULL) return ENOMEM; - error = 0; + error = 0; uep = ucm->entry; ucm->entry = cme; /* set entry to out alloc. */ if (vu->view == NULL || grf_get_colormap(vu->view, ucm)) @@ -281,7 +281,7 @@ view_set_colormap(struct view_softc *vu, colormap_t *ucm) if (ucm->size > MAX_CENTRIES) return EINVAL; - + cm = malloc(sizeof(ucm->entry[0])*ucm->size + sizeof(*cm), M_TEMP, M_WAITOK); if (cm == NULL) @@ -289,7 +289,7 @@ view_set_colormap(struct view_softc *vu, colormap_t *ucm) memcpy(cm, ucm, sizeof(colormap_t)); cm->entry = (long *)&cm[1]; /* table directly after. */ - if (((error = + if (((error = copyin(ucm->entry,cm->entry,sizeof(ucm->entry[0])*ucm->size)) == 0) && (vu->view == NULL || grf_use_colormap(vu->view, cm))) error = EINVAL; @@ -329,8 +329,8 @@ viewopen(dev_t dev, int flags, int mode, struct lwp *l) vu->size.width = vu->view->display.width; vu->size.height = vu->view->display.height; vu->size.depth = vu->view->bitmap->depth; - vu->flags |= VUF_OPEN; - return 0; + vu->flags |= VUF_OPEN; + return 0; } /*ARGSUSED*/ @@ -370,7 +370,7 @@ viewioctl (dev_t dev, u_long cmd, void * data, int flag, struct lwp *l) view_remove(vu); break; case VIOCGSIZE: - memcpy(data, &vu->size, sizeof (struct view_size)); + memcpy(data, &vu->size, sizeof (struct view_size)); break; case VIOCSSIZE: error = view_setsize(vu, (struct view_size *)data); @@ -405,15 +405,15 @@ viewmmap(dev_t dev, off_t off, int prot) struct view_softc *vu; bmap_t *bm; u_char *bmd_start; - u_long bmd_lin, bmd_vga; + u_long bmd_lin, bmd_vga; vu = &views[minor(dev)]; bm = vu->view->bitmap; - bmd_start = bm->hw_address; + bmd_start = bm->hw_address; bmd_lin = bm->lin_base; bmd_vga = bm->vga_base; - /* + /* * control registers */ if (off >= 0 && off < bm->reg_size) diff --git a/sys/arch/atari/dev/viewioctl.h b/sys/arch/atari/dev/viewioctl.h index 8b9e71eb2a4..20a83643d80 100644 --- a/sys/arch/atari/dev/viewioctl.h +++ b/sys/arch/atari/dev/viewioctl.h @@ -1,4 +1,4 @@ -/* $NetBSD: viewioctl.h,v 1.3 2021/09/19 10:34:08 andvar Exp $ */ +/* $NetBSD: viewioctl.h,v 1.4 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -54,6 +54,6 @@ struct view_size { #define VIOCSSIZE _IOW('V', 0x2, struct view_size) #define VIOCGSIZE _IOR('V', 0x3, struct view_size) #define VIOCGBMAP _IOR('V', 0x4, bmap_t) -#define VIOCSCMAP _IOW('V', 0x5, colormap_t) -#define VIOCGCMAP _IOWR('V', 0x6, colormap_t) +#define VIOCSCMAP _IOW('V', 0x5, colormap_t) +#define VIOCGCMAP _IOWR('V', 0x6, colormap_t) diff --git a/sys/arch/atari/dev/wdc_mb.c b/sys/arch/atari/dev/wdc_mb.c index 39852035203..aaf0647579d 100644 --- a/sys/arch/atari/dev/wdc_mb.c +++ b/sys/arch/atari/dev/wdc_mb.c @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_mb.c,v 1.41 2019/06/29 16:41:19 tsutsui Exp $ */ +/* $NetBSD: wdc_mb.c,v 1.42 2023/01/06 10:28:28 tsutsui Exp $ */ /*- * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wdc_mb.c,v 1.41 2019/06/29 16:41:19 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc_mb.c,v 1.42 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -234,7 +234,7 @@ claim_hw(struct ata_channel *chp, int maysleep) &wd_lock, 1, &chp->ch_lock)) return 0; } - return 1; + return 1; } static void diff --git a/sys/arch/atari/dev/wskbdmap_atari.c b/sys/arch/atari/dev/wskbdmap_atari.c index f8cf43c13d5..90f93e0676d 100644 --- a/sys/arch/atari/dev/wskbdmap_atari.c +++ b/sys/arch/atari/dev/wskbdmap_atari.c @@ -1,4 +1,4 @@ -/* $NetBSD: wskbdmap_atari.c,v 1.5 2018/09/19 23:28:58 rin Exp $ */ +/* $NetBSD: wskbdmap_atari.c,v 1.6 2023/01/06 10:28:28 tsutsui Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wskbdmap_atari.c,v 1.5 2018/09/19 23:28:58 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wskbdmap_atari.c,v 1.6 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/types.h> #include <dev/wscons/wsksymdef.h> @@ -147,7 +147,7 @@ static const keysym_t atarikbd_keydesc_de[] = { KC(11), KS_0, KS_equal, KC(12), KS_ssharp, KS_question, KC(13), KS_dead_acute, KS_dead_grave, - KC(16), KS_q, KS_Q, + KC(16), KS_q, KS_Q, KC(21), KS_z, KC(26), KS_udiaeresis, KS_Udiaeresis, KS_at, KS_backslash, KC(27), KS_plus, KS_asterisk, @@ -250,7 +250,7 @@ static const keysym_t atarikbd_keydesc_fr[] = { KC(13), KS_equal, KS_plus, KS_braceright, KC(16), KS_a, KC(17), KS_z, - KC(26), KS_dead_circumflex, KS_dead_diaeresis, + KC(26), KS_dead_circumflex, KS_dead_diaeresis, KC(27), KS_dollar, KS_sterling, KS_currency, KC(30), KS_q, KC(39), KS_m, diff --git a/sys/arch/atari/dev/zs.c b/sys/arch/atari/dev/zs.c index 746fd666ae5..2baee0ad512 100644 --- a/sys/arch/atari/dev/zs.c +++ b/sys/arch/atari/dev/zs.c @@ -1,4 +1,4 @@ -/* $NetBSD: zs.c,v 1.80 2022/06/26 06:25:09 tsutsui Exp $ */ +/* $NetBSD: zs.c,v 1.81 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1992, 1993 @@ -79,7 +79,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.80 2022/06/26 06:25:09 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.81 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -463,7 +463,7 @@ zsopen(dev_t dev, int flags, int mode, struct lwp *l) error = ttyopen(tp, ZS_DIALOUT(dev), (flags & O_NONBLOCK)); if (error) goto bad; - + error = tp->t_linesw->l_open(dev, tp); if (error) goto bad; @@ -556,7 +556,7 @@ zspoll(dev_t dev, int events, struct lwp *l) sc = device_lookup_private(&zs_cd, unit >> 1); cs = sc->sc_cs[unit & 1]; tp = cs->cs_ttyp; - + return (*tp->t_linesw->l_poll)(tp, events, l); } @@ -926,7 +926,7 @@ zsioctl(dev_t dev, u_long cmd, void * data, int flag, struct lwp *l) cs->cs_creg[15] &= ~ZSWR15_DCD_IE; ZS_WRITE(cs->cs_zc, 15, cs->cs_creg[15]); } else if ((userbits & TIOCFLAG_CLOCAL) != 0) { - cs->cs_softcar = 0; /* turn off softcar */ + cs->cs_softcar = 0; /* turn off softcar */ cs->cs_preg[15] |= ZSWR15_DCD_IE; /* turn on dcd */ cs->cs_creg[15] |= ZSWR15_DCD_IE; ZS_WRITE(cs->cs_zc, 15, cs->cs_creg[15]); diff --git a/sys/arch/atari/dev/zsvar.h b/sys/arch/atari/dev/zsvar.h index a0bc40a6db6..51f8f3fb0fb 100644 --- a/sys/arch/atari/dev/zsvar.h +++ b/sys/arch/atari/dev/zsvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: zsvar.h,v 1.17 2014/11/15 19:20:01 christos Exp $ */ +/* $NetBSD: zsvar.h,v 1.18 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1992, 1993 @@ -179,6 +179,6 @@ struct zs_chanstate { /* * Split minor into unit, dialin/dialout & flag nibble. */ -#define ZS_UNIT(dev) (TTUNIT(dev) >> 4) -#define ZS_FLAGS(dev) (TTUNIT(dev) & 0xf) +#define ZS_UNIT(dev) (TTUNIT(dev) >> 4) +#define ZS_FLAGS(dev) (TTUNIT(dev) & 0xf) #define ZS_DIALOUT(dev) TTDIALOUT(dev) diff --git a/sys/arch/atari/include/cpu.h b/sys/arch/atari/include/cpu.h index 17cfa554fe5..3b31483bd4b 100644 --- a/sys/arch/atari/include/cpu.h +++ b/sys/arch/atari/include/cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.73 2019/11/23 19:40:34 ad Exp $ */ +/* $NetBSD: cpu.h,v 1.74 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -86,7 +86,7 @@ struct clockframe { * or after the current trap/syscall if in system mode. */ #define cpu_need_resched(ci,l,flags) do { \ - __USE(flags); \ + __USE(flags); \ setsoftast(); \ } while (/*CONSTCOND*/0) diff --git a/sys/arch/atari/include/pmap.h b/sys/arch/atari/include/pmap.h index ec60ba22bbc..5ec39fc4b7f 100644 --- a/sys/arch/atari/include/pmap.h +++ b/sys/arch/atari/include/pmap.h @@ -1,6 +1,6 @@ -/* $NetBSD: pmap.h,v 1.42 2022/04/21 21:31:11 andvar Exp $ */ +/* $NetBSD: pmap.h,v 1.43 2023/01/06 10:28:28 tsutsui Exp $ */ -/* +/* * Copyright (c) 1991 Regents of the University of California. * All rights reserved. * @@ -35,7 +35,7 @@ * @(#)pmap.h 7.6 (Berkeley) 5/10/91 */ -/* +/* * Copyright (c) 1987 Carnegie-Mellon University * * This code is derived from software contributed to Berkeley by @@ -95,7 +95,7 @@ struct memseg { /* * Memory segment descriptors. * - boot_segs - * describes the segments obtained from the bootcode. + * describes the segments obtained from the bootcode. * - usable_segs * describes the segments available after system requirements are * subtracted (reserved pages, etc...). diff --git a/sys/arch/atari/include/vmparam.h b/sys/arch/atari/include/vmparam.h index d94379c538d..41b29ccb2b7 100644 --- a/sys/arch/atari/include/vmparam.h +++ b/sys/arch/atari/include/vmparam.h @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.34 2020/02/01 19:41:49 tsutsui Exp $ */ +/* $NetBSD: vmparam.h,v 1.35 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -112,12 +112,12 @@ #define __HAVE_PMAP_PHYSSEG -/* +/* * pmap-specific data stored in the vm_physmem[] array. - */ -struct pmap_physseg { + */ +struct pmap_physseg { struct pv_header *pvheader; /* pv table for this seg */ -}; +}; /* diff --git a/sys/arch/atari/isa/fdcisa.c b/sys/arch/atari/isa/fdcisa.c index 75ecc2a6751..27c84f17486 100644 --- a/sys/arch/atari/isa/fdcisa.c +++ b/sys/arch/atari/isa/fdcisa.c @@ -1,4 +1,4 @@ -/* $NetBSD: fdcisa.c,v 1.15 2019/06/29 16:41:19 tsutsui Exp $ */ +/* $NetBSD: fdcisa.c,v 1.16 2023/01/06 10:28:28 tsutsui Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fdcisa.c,v 1.15 2019/06/29 16:41:19 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdcisa.c,v 1.16 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -153,7 +153,7 @@ fdc_isa_probe(device_t parent, cfdata_t cfp, void *aux) /* reset */ bus_space_write_1(iot, ioh, fdout, 0); - delay(100); + delay(100); bus_space_write_1(iot, ioh, fdout, FDO_FRST); /* see if it can handle a command */ diff --git a/sys/arch/atari/isa/isa_hades.c b/sys/arch/atari/isa/isa_hades.c index a62b71faf98..7006ebab361 100644 --- a/sys/arch/atari/isa/isa_hades.c +++ b/sys/arch/atari/isa/isa_hades.c @@ -1,4 +1,4 @@ -/* $NetBSD: isa_hades.c,v 1.9 2009/03/18 10:22:25 cegger Exp $ */ +/* $NetBSD: isa_hades.c,v 1.10 2023/01/06 10:28:28 tsutsui Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isa_hades.c,v 1.9 2009/03/18 10:22:25 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isa_hades.c,v 1.10 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -165,7 +165,7 @@ isa_intr_establish(isa_chipset_tag_t ic, int irq, int type, int level, int (*ih_ iinfo_p = &iinfo[slot]; if (iinfo_p->slot >= 0) - panic("isa_intr_establish: interrupt was already established"); + panic("isa_intr_establish: interrupt was already established"); ihand = intr_establish((slot == 0) ? 3 : 15, USER_VEC, 0, (hw_ifun_t)iifun, (void *)slot); @@ -198,7 +198,7 @@ isa_intr_disestablish(isa_chipset_tag_t ic, void *handler) isa_intr_info_t *iinfo_p = (isa_intr_info_t *)handler; if (iinfo_p->slot < 0) - panic("isa_intr_disestablish: interrupt was not established"); + panic("isa_intr_disestablish: interrupt was not established"); (void) intr_disestablish(iinfo_p->ihand); iinfo_p->slot = -1; diff --git a/sys/arch/atari/pci/pci_machdep.c b/sys/arch/atari/pci/pci_machdep.c index 7e23e49096b..ac33d317bf3 100644 --- a/sys/arch/atari/pci/pci_machdep.c +++ b/sys/arch/atari/pci/pci_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.62 2021/08/21 11:55:24 andvar Exp $ */ +/* $NetBSD: pci_machdep.c,v 1.63 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1996 Leo Weppelman. All rights reserved. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.62 2021/08/21 11:55:24 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.63 2023/01/06 10:28:28 tsutsui Exp $"); #include "opt_mbtype.h" @@ -232,7 +232,7 @@ init_pci_bus(void) tag = 0; id = 0; - + maxndevs = pci_bus_maxdevs(pc, 0); for (device = 0; device < maxndevs; device++) { @@ -284,7 +284,7 @@ overlap_pci_areas(struct pci_memreg *p, struct pci_memreg *self, u_int addr, if (p == NULL) return 0; - + q = p; while (q != NULL) { if ((q != self) && (q->csr & what)) { @@ -732,7 +732,6 @@ pci_intr_string(pci_chipset_tag_t pc, pci_intr_handle_t ih, char *buf, snprintf(buf, len, "irq %d", ih); return buf; - } const struct evcnt * diff --git a/sys/arch/atari/pci/pci_milan.c b/sys/arch/atari/pci/pci_milan.c index 7aa4d8542cc..f674913a6de 100644 --- a/sys/arch/atari/pci/pci_milan.c +++ b/sys/arch/atari/pci/pci_milan.c @@ -1,4 +1,4 @@ -/* $NetBSD: pci_milan.c,v 1.16 2019/05/04 08:20:05 tsutsui Exp $ */ +/* $NetBSD: pci_milan.c,v 1.17 2023/01/06 10:28:28 tsutsui Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pci_milan.c,v 1.16 2019/05/04 08:20:05 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_milan.c,v 1.17 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -124,7 +124,7 @@ pci_intr_disestablish(pci_chipset_tag_t pc, void *cookie) /* * VGA related stuff... - * + * * It looks like the Milan BIOS is initializing the VGA card in a reasonably * standard text mode. However, the screen mode is 640*480 instead of 640*400. * Since wscons does not handle the right by default, the card is reprogrammed diff --git a/sys/arch/atari/pci/pci_tseng.c b/sys/arch/atari/pci/pci_tseng.c index 3debd7289d0..caa84f75eff 100644 --- a/sys/arch/atari/pci/pci_tseng.c +++ b/sys/arch/atari/pci/pci_tseng.c @@ -1,4 +1,4 @@ -/* $NetBSD: pci_tseng.c,v 1.13 2019/05/04 09:03:08 tsutsui Exp $ */ +/* $NetBSD: pci_tseng.c,v 1.14 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1999 Leo Weppelman. All rights reserved. @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pci_tseng.c,v 1.13 2019/05/04 09:03:08 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_tseng.c,v 1.14 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/param.h> #include <sys/queue.h> @@ -45,7 +45,7 @@ static void et6000_init(volatile uint8_t *, uint8_t *, int); * Use tables for the card init... */ static const uint8_t seq_tab[] = { - 0x03, 0x01, 0x03, 0x00, 0x02, 0x00, 0x00, 0xb4 + 0x03, 0x01, 0x03, 0x00, 0x02, 0x00, 0x00, 0xb4 }; static const uint8_t gfx_tab[] = { @@ -128,12 +128,12 @@ tseng_init(pci_chipset_tag_t pc, pcitag_t tag, int id, volatile uint8_t *ba, for (i = 1; i < 8; i++) WSeq(ba, i, seq_tab[i]); WSeq(ba, SEQ_ID_RESET , 0x03); - + vgar(ba, VDAC_ADDRESS); /* clear old state */ - vgar(ba, VDAC_MASK); - vgar(ba, VDAC_MASK); - vgar(ba, VDAC_MASK); - vgar(ba, VDAC_MASK); + vgar(ba, VDAC_MASK); + vgar(ba, VDAC_MASK); + vgar(ba, VDAC_MASK); + vgar(ba, VDAC_MASK); vgaw(ba, VDAC_MASK, 0); /* set to palette */ vgar(ba, VDAC_ADDRESS); /* clear state */ vgaw(ba, VDAC_MASK, 0xff); @@ -184,7 +184,7 @@ et6000_init(volatile uint8_t *ba, uint8_t *fb, int iter) ba[0x47] = 0x10; ba[0x58] = 0x00; /* Video Control 1 */ ba[0x59] = 0x04; /* Video Control 2 */ - + /* * Setup a 'standard' CLKDAC */ @@ -199,7 +199,7 @@ et6000_init(volatile uint8_t *ba, uint8_t *fb, int iter) /* * XXX Black magic to get the bloody MDRAM's to function... - * XXX _Only_ tested on my card! [leo] + * XXX _Only_ tested on my card! [leo] */ bv = ba[45]; ba[0x45] = bv | 0x40; /* Reset MDRAM's */ diff --git a/sys/arch/atari/pci/pci_vga.c b/sys/arch/atari/pci/pci_vga.c index 3ab2553e5dd..4e6110f7afb 100644 --- a/sys/arch/atari/pci/pci_vga.c +++ b/sys/arch/atari/pci/pci_vga.c @@ -1,4 +1,4 @@ -/* $NetBSD: pci_vga.c,v 1.19 2022/08/15 04:37:46 tsutsui Exp $ */ +/* $NetBSD: pci_vga.c,v 1.20 2023/01/06 10:28:28 tsutsui Exp $ */ /* * Copyright (c) 1999 Leo Weppelman. All rights reserved. @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pci_vga.c,v 1.19 2022/08/15 04:37:46 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_vga.c,v 1.20 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/param.h> #include <sys/queue.h> @@ -215,7 +215,7 @@ check_for_vga(bus_space_tag_t iot, bus_space_tag_t memt) /* * Generic parts of the initialization... */ - + /* set ATC registers */ for (i = 0; i < 21; i++) WAttr(regs, i, vga_atc[i]); @@ -243,7 +243,7 @@ check_for_vga(bus_space_tag_t iot, bus_space_tag_t memt) } for (i = 56; *nbd; i += 2) fb[i] = *nbd++; - + rv = 1; vga_iot = iot; vga_memt = memt; @@ -305,7 +305,7 @@ loadfont(volatile uint8_t *ba, uint8_t *fb) WGfx(ba, GCT_ID_READ_MAP_SELECT, 0x02); WGfx(ba, GCT_ID_GRAPHICS_MODE, 0x00); WGfx(ba, GCT_ID_MISC, 0x0c); - + /* * load text font into beginning of display memory. Each * character cell is 32 bytes long (enough for 4 planes) diff --git a/sys/arch/atari/vme/et4000.c b/sys/arch/atari/vme/et4000.c index 7875575b020..06fd2fa584e 100644 --- a/sys/arch/atari/vme/et4000.c +++ b/sys/arch/atari/vme/et4000.c @@ -1,4 +1,4 @@ -/* $NetBSD: et4000.c,v 1.27 2022/07/03 15:25:54 tsutsui Exp $ */ +/* $NetBSD: et4000.c,v 1.28 2023/01/06 10:28:28 tsutsui Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: et4000.c,v 1.27 2022/07/03 15:25:54 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: et4000.c,v 1.28 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/param.h> #include <sys/ioctl.h> @@ -156,7 +156,7 @@ const struct cdevsw et4k_cdevsw = { * Look for a ET4000 (Crazy Dots) card on the VME bus. We might * match Spektrum cards too (untested). */ -int +int et4k_vme_match(device_t parent, cfdata_t cf, void *aux) { struct vme_attach_args *va = aux; @@ -199,8 +199,8 @@ et4k_probe_addresses(struct vme_attach_args *va) return 0; } if (bus_space_map(memt, vat.va_maddr, vat.va_msize, - BUS_SPACE_MAP_LINEAR|BUS_SPACE_MAP_CACHEABLE, - &memh)) { + BUS_SPACE_MAP_LINEAR|BUS_SPACE_MAP_CACHEABLE, + &memh)) { bus_space_unmap(iot, ioh, vat.va_iosize); printf("%s: cannot map memory area\n", __func__); return 0; @@ -468,7 +468,7 @@ et4kmmap(dev_t dev, off_t offset, int prot) sc = device_lookup_private(&et4k_cd, minor(dev)); - /* + /* * control registers * mapped from offset 0x0 to REG_MAPPABLE */ @@ -492,7 +492,7 @@ et4kmmap(dev_t dev, off_t offset, int prot) return -1; } -int +int et4kon(dev_t dev) { struct et4k_softc *sc; @@ -505,7 +505,7 @@ et4kon(dev_t dev) return 0; } -int +int et4koff(dev_t dev) { diff --git a/sys/arch/atari/vme/if_le_vme.c b/sys/arch/atari/vme/if_le_vme.c index 2afd5c50252..f39324db830 100644 --- a/sys/arch/atari/vme/if_le_vme.c +++ b/sys/arch/atari/vme/if_le_vme.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_le_vme.c,v 1.34 2022/06/26 04:51:17 tsutsui Exp $ */ +/* $NetBSD: if_le_vme.c,v 1.35 2023/01/06 10:28:28 tsutsui Exp $ */ /*- * Copyright (c) 1998 maximum entropy. All rights reserved. @@ -74,7 +74,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.34 2022/06/26 04:51:17 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.35 2023/01/06 10:28:28 tsutsui Exp $"); #include "opt_inet.h" @@ -189,7 +189,7 @@ lerdcsr(struct lance_softc *sc, uint16_t port) s = splhigh(); bus_space_write_2(lesc->sc_iot, lesc->sc_ioh, LER_RAP, port); - val = bus_space_read_2(lesc->sc_iot, lesc->sc_ioh, LER_RDP); + val = bus_space_read_2(lesc->sc_iot, lesc->sc_ioh, LER_RDP); splx(s); return val; @@ -458,7 +458,7 @@ le_vme_attach(device_t parent, device_t self, void *aux) /* * XXX: We always use uservector 64.... */ - if ((lesc->sc_intr = intr_establish(64, USER_VEC, 0, + if ((lesc->sc_intr = intr_establish(64, USER_VEC, 0, (hw_ifun_t)le_intr, lesc)) == NULL) { aprint_error("le_vme_attach: Can't establish interrupt\n"); return; @@ -567,7 +567,7 @@ bvme410_probe(bus_space_tag_t iot, bus_space_handle_t ioh) bus_space_write_2(iot, ioh, BVME410_IVEC, 0x0000); if (bus_space_read_2(iot, ioh, BVME410_IVEC) != 0xff00) return 0; - + bus_space_write_2(iot, ioh, BVME410_IVEC, 0xffff); if (bus_space_read_2(iot, ioh, BVME410_IVEC) != 0xffff) return 0; @@ -612,7 +612,7 @@ bvme410_copytobuf(struct lance_softc *sc, void *from, int boff, int len) for (buf += boff; len != 0; buf++, f++, len--) { do { - *buf = *f; + *buf = *f; } while (*buf != *f); } } @@ -624,7 +624,7 @@ bvme410_zerobuf(struct lance_softc *sc, int boff, int len) for (buf += boff; len != 0; buf++, len--) { do { - *buf = '\0'; + *buf = '\0'; } while (*buf != '\0'); } } diff --git a/sys/arch/atari/vme/leo.c b/sys/arch/atari/vme/leo.c index 76613b700fc..cd32f266940 100644 --- a/sys/arch/atari/vme/leo.c +++ b/sys/arch/atari/vme/leo.c @@ -1,4 +1,4 @@ -/* $NetBSD: leo.c,v 1.23 2022/07/03 15:25:54 tsutsui Exp $ */ +/* $NetBSD: leo.c,v 1.24 2023/01/06 10:28:28 tsutsui Exp $ */ /*- * Copyright (c) 1997 maximum entropy <entropy@zippy.bernstein.com> @@ -41,13 +41,13 @@ * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * This code is derived from software contributed to Berkeley by - * Ralph Campbell and Rick Macklem. + * Ralph Campbell and Rick Macklem. * This product includes software developed by the University of * California, Berkeley and its contributors. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: leo.c,v 1.23 2022/07/03 15:25:54 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: leo.c,v 1.24 2023/01/06 10:28:28 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -166,8 +166,8 @@ leo_match(device_t parent, cfdata_t cf, void *aux) return 0; } if (bus_space_map(memt, vat.va_maddr, vat.va_msize, - BUS_SPACE_MAP_LINEAR|BUS_SPACE_MAP_CACHEABLE, - &memh)) { + BUS_SPACE_MAP_LINEAR|BUS_SPACE_MAP_CACHEABLE, + &memh)) { bus_space_unmap(iot, ioh, vat.va_iosize); printf("leo_match: cannot map memory area\n"); return 0; @@ -332,9 +332,9 @@ leo_scroll(struct leo_softc *sc, int scroll) if ((scroll < 0) || (scroll > 255)) return EINVAL; - bus_space_write_1(sc->sc_iot, sc->sc_ioh, LEO_REG_MSBSCROLL, + bus_space_write_1(sc->sc_iot, sc->sc_ioh, LEO_REG_MSBSCROLL, (scroll >> 6) & 0xff); - bus_space_write_1(sc->sc_iot, sc->sc_ioh, LEO_REG_LSBSCROLL, + bus_space_write_1(sc->sc_iot, sc->sc_ioh, LEO_REG_LSBSCROLL, (scroll << 2) & 0xff); return 0; } @@ -354,33 +354,33 @@ leoclose(dev_t dev, int flags, int devtype, struct lwp *l) int leomove(dev_t dev, struct uio *uio, int flags) { - struct leo_softc *sc; - int length, size, error; - u_int8_t smallbuf[SMALLBSIZE]; + struct leo_softc *sc; + int length, size, error; + u_int8_t smallbuf[SMALLBSIZE]; off_t offset; - sc = device_lookup_private(&leo_cd,minor(dev)); - if (uio->uio_offset > sc->sc_msize) - return 0; - length = sc->sc_msize - uio->uio_offset; - if (length > uio->uio_resid) - length = uio->uio_resid; - while (length > 0) { - size = length; - if (size > SMALLBSIZE) - size = SMALLBSIZE; - length -= size; + sc = device_lookup_private(&leo_cd,minor(dev)); + if (uio->uio_offset > sc->sc_msize) + return 0; + length = sc->sc_msize - uio->uio_offset; + if (length > uio->uio_resid) + length = uio->uio_resid; + while (length > 0) { + size = length; + if (size > SMALLBSIZE) + size = SMALLBSIZE; + length -= size; offset = uio->uio_offset; - if (uio->uio_rw == UIO_READ) - bus_space_read_region_1(sc->sc_memt, sc->sc_memh, - offset, smallbuf, size); - if ((error = uiomove((void *)smallbuf, size, uio))) - return (error); - if (uio->uio_rw == UIO_WRITE) - bus_space_write_region_1(sc->sc_memt, sc->sc_memh, - offset, smallbuf, size); - } - return 0; + if (uio->uio_rw == UIO_READ) + bus_space_read_region_1(sc->sc_memt, sc->sc_memh, + offset, smallbuf, size); + if ((error = uiomove((void *)smallbuf, size, uio))) + return (error); + if (uio->uio_rw == UIO_WRITE) + bus_space_write_region_1(sc->sc_memt, sc->sc_memh, + offset, smallbuf, size); + } + return 0; } int @@ -389,11 +389,11 @@ leoioctl(dev_t dev, u_long cmd, void *data, int flags, struct lwp *l) struct leo_softc *sc; sc = device_lookup_private(&leo_cd,minor(dev)); - switch (cmd) { - case LIOCYRES: + switch (cmd) { + case LIOCYRES: return leo_init(sc, *(int *)data); break; - case LIOCSCRL: + case LIOCSCRL: return leo_scroll(sc, *(int *)data); break; default: diff --git a/sys/arch/atari/vme/vmevar.h b/sys/arch/atari/vme/vmevar.h index 984b751a7e0..8cd7585edf0 100644 --- a/sys/arch/atari/vme/vmevar.h +++ b/sys/arch/atari/vme/vmevar.h @@ -1,4 +1,4 @@ -/* $NetBSD: vmevar.h,v 1.8 2011/07/01 20:34:06 dyoung Exp $ */ +/* $NetBSD: vmevar.h,v 1.9 2023/01/06 10:28:28 tsutsui Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include <sys/bus.h> -/* +/* * Structures and definitions needed by the machine-dependent header. */ struct vmebus_attach_args; |
