Some KNF.
This commit is contained in:
parent
30b8022325
commit
50dbef0dcb
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atari_init.c,v 1.74 2009/03/05 13:21:44 tsutsui Exp $ */
|
||||
/* $NetBSD: atari_init.c,v 1.75 2009/03/05 13:42:59 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.74 2009/03/05 13:21:44 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.75 2009/03/05 13:42:59 tsutsui Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_mbtype.h"
|
||||
@ -483,8 +483,7 @@ char *esym_addr; /* Address of kernel '_esym' symbol */
|
||||
*/
|
||||
usable_segs[0].start = PAGE_SIZE;
|
||||
usable_segs[1].start += pstart;
|
||||
}
|
||||
else
|
||||
} else
|
||||
usable_segs[0].start += pstart;
|
||||
|
||||
/*
|
||||
@ -623,8 +622,9 @@ char *esym_addr; /* Address of kernel '_esym' symbol */
|
||||
* Note: This module runs *before* the io-mapping is setup!
|
||||
*/
|
||||
static void
|
||||
set_machtype()
|
||||
set_machtype(void)
|
||||
{
|
||||
|
||||
#ifdef _MILANHW_
|
||||
machineid |= ATARI_MILAN;
|
||||
|
||||
@ -643,13 +643,15 @@ set_machtype()
|
||||
}
|
||||
if (!badbaddr((void *)(PCI_CONFB_PHYS + PCI_CONFM_PHYS), sizeof(char)))
|
||||
machineid |= ATARI_HADES;
|
||||
else machineid |= ATARI_TT;
|
||||
else
|
||||
machineid |= ATARI_TT;
|
||||
#endif /* _MILANHW_ */
|
||||
}
|
||||
|
||||
static void
|
||||
atari_hwinit()
|
||||
atari_hwinit(void)
|
||||
{
|
||||
|
||||
#if defined(_ATARIHW_)
|
||||
/*
|
||||
* Initialize the sound chip
|
||||
@ -770,8 +772,8 @@ map_io_areas(ptpa, ptsize, ptextra)
|
||||
pg_proto = PCI_CONFB_PHYS | PG_RW | PG_CI | PG_V;
|
||||
for (; pg < epg; mask <<= 1)
|
||||
*pg++ = pg_proto | mask;
|
||||
}
|
||||
else pci_conf_addr = 0; /* XXX: should crash */
|
||||
} else
|
||||
pci_conf_addr = 0; /* XXX: should crash */
|
||||
|
||||
if (machineid & (ATARI_HADES|ATARI_MILAN)) {
|
||||
pci_io_addr = ioaddr;
|
||||
@ -812,7 +814,7 @@ map_io_areas(ptpa, ptsize, ptextra)
|
||||
#define MDHDRSIZE roundup(CHDRSIZE, dbtob(1))
|
||||
|
||||
int
|
||||
cpu_dumpsize()
|
||||
cpu_dumpsize(void)
|
||||
{
|
||||
|
||||
return btodb(MDHDRSIZE);
|
||||
@ -1078,7 +1080,7 @@ int m68060_pcr_init = 0x21; /* make this patchable */
|
||||
#endif
|
||||
|
||||
static void
|
||||
initcpu()
|
||||
initcpu(void)
|
||||
{
|
||||
typedef void trapfun(void);
|
||||
|
||||
@ -1204,9 +1206,10 @@ u_int
|
||||
vmtophys(ste, vm)
|
||||
u_int *ste, vm;
|
||||
{
|
||||
|
||||
ste = (u_int *)(*(ste + (vm >> SEGSHIFT)) & SG_FRAME);
|
||||
ste += (vm & SG_PMASK) >> PGSHIFT;
|
||||
return((*ste & -PAGE_SIZE) | (vm & (PAGE_SIZE - 1)));
|
||||
return (*ste & -PAGE_SIZE) | (vm & (PAGE_SIZE - 1));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.159 2009/02/13 22:41:01 apb Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.160 2009/03/05 13:42:59 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
|
||||
@ -77,7 +77,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.159 2009/02/13 22:41:01 apb Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.160 2009/03/05 13:42:59 tsutsui Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_compat_netbsd.h"
|
||||
@ -262,8 +262,7 @@ cpu_startup(void)
|
||||
* Finally, allocate mbuf cluster submap.
|
||||
*/
|
||||
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
|
||||
nmbclusters * mclbytes, VM_MAP_INTRSAFE,
|
||||
false, NULL);
|
||||
nmbclusters * mclbytes, VM_MAP_INTRSAFE, false, NULL);
|
||||
|
||||
#ifdef DEBUG
|
||||
pmapdebug = opmapdebug;
|
||||
@ -397,6 +396,7 @@ static int waittime = -1;
|
||||
static void
|
||||
bootsync(void)
|
||||
{
|
||||
|
||||
if (waittime < 0) {
|
||||
waittime = 0;
|
||||
|
||||
@ -413,6 +413,7 @@ bootsync(void)
|
||||
void
|
||||
cpu_reboot(int howto, char *bootstr)
|
||||
{
|
||||
|
||||
/* take a snap shot before clobbering any registers */
|
||||
if (curlwp->l_addr)
|
||||
savectx(&curlwp->l_addr->u_pcb);
|
||||
@ -433,8 +434,7 @@ cpu_reboot(int howto, char *bootstr)
|
||||
if (howto & RB_HALT) {
|
||||
printf("halted\n\n");
|
||||
__asm(" stop #0x2700");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (howto & RB_DUMP)
|
||||
dumpsys();
|
||||
|
||||
@ -454,8 +454,9 @@ static vaddr_t dumpspace; /* Virt. space to map dumppages */
|
||||
vaddr_t
|
||||
reserve_dumppages(vaddr_t p)
|
||||
{
|
||||
|
||||
dumpspace = p;
|
||||
return(p + BYTES_PER_DUMP);
|
||||
return p + BYTES_PER_DUMP;
|
||||
}
|
||||
|
||||
u_int32_t dumpmag = 0x8fca0101; /* magic number for savecore */
|
||||
@ -568,7 +569,8 @@ dumpsys(void)
|
||||
if (segbytes == 0) {
|
||||
segnum++;
|
||||
maddr = boot_segs[segnum].start;
|
||||
segbytes = boot_segs[segnum].end - boot_segs[segnum].start;
|
||||
segbytes = boot_segs[segnum].end -
|
||||
boot_segs[segnum].start;
|
||||
}
|
||||
/*
|
||||
* Print Mb's to go
|
||||
@ -587,8 +589,10 @@ dumpsys(void)
|
||||
* Map to a VA and write it
|
||||
*/
|
||||
if (maddr != 0) { /* XXX kvtop chokes on this */
|
||||
(void)pmap_map(dumpspace, maddr, maddr+n, VM_PROT_READ);
|
||||
error = (*dump)(dumpdev, blkno, (void *)dumpspace, n);
|
||||
(void)pmap_map(dumpspace, maddr, maddr + n,
|
||||
VM_PROT_READ);
|
||||
error = (*dump)(dumpdev, blkno,
|
||||
(void *)dumpspace, n);
|
||||
if (error)
|
||||
break;
|
||||
}
|
||||
@ -641,6 +645,7 @@ straytrap(int pc, u_short evec)
|
||||
void
|
||||
straymfpint(int pc, u_short evec)
|
||||
{
|
||||
|
||||
printf("unexpected mfp-interrupt (vector offset 0x%x) from 0x%x\n",
|
||||
evec & 0xFFF, pc);
|
||||
}
|
||||
@ -659,7 +664,7 @@ badbaddr(void *addr, int size)
|
||||
nofault = (int *) &faultbuf;
|
||||
if (setjmp((label_t *)nofault)) {
|
||||
nofault = (int *) 0;
|
||||
return(1);
|
||||
return 1;
|
||||
}
|
||||
switch (size) {
|
||||
case 1:
|
||||
@ -675,7 +680,7 @@ badbaddr(void *addr, int size)
|
||||
panic("badbaddr: unknown size");
|
||||
}
|
||||
nofault = (int *) 0;
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -727,7 +732,7 @@ add_sicallback(void (*function)(void *, void *), void *rock1, void *rock2)
|
||||
splx(s);
|
||||
|
||||
if(si == NULL) {
|
||||
si = (struct si_callback *)malloc(sizeof(*si),M_TEMP,M_NOWAIT);
|
||||
si = malloc(sizeof(*si), M_TEMP, M_NOWAIT);
|
||||
#ifdef DIAGNOSTIC
|
||||
if (si)
|
||||
++ncbd; /* count # dynamically allocated */
|
||||
@ -778,7 +783,8 @@ rem_sicallback(void (*function)(void *rock1, void *rock2))
|
||||
si_free = si;
|
||||
if (psi)
|
||||
psi->next = nsi;
|
||||
else si_callbacks = nsi;
|
||||
else
|
||||
si_callbacks = nsi;
|
||||
}
|
||||
si = nsi;
|
||||
}
|
||||
@ -850,6 +856,7 @@ void candbtimer(void);
|
||||
void
|
||||
candbtimer(void)
|
||||
{
|
||||
|
||||
crashandburn = 0;
|
||||
}
|
||||
#endif
|
||||
@ -873,7 +880,7 @@ cpu_exec_aout_makecmds(struct lwp *l, struct exec_package *epp)
|
||||
&& execp->a_midmag == ZMAGIC)
|
||||
return(exec_aout_prep_zmagic(l->l_proc, epp));
|
||||
#endif
|
||||
return(error);
|
||||
return error;
|
||||
}
|
||||
|
||||
#ifdef _MILANHW_
|
||||
|
Loading…
Reference in New Issue
Block a user