Sat Jan 26 15:46:24 2013 UTC ()
Whitespace nits.


(tsutsui)
diff -r1.8 -r1.9 src/sys/arch/luna68k/luna68k/clock.c
diff -r1.94 -r1.95 src/sys/arch/luna68k/luna68k/machdep.c
diff -r1.35 -r1.36 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c

cvs diff -r1.8 -r1.9 src/sys/arch/luna68k/luna68k/clock.c (expand / switch to unified diff)

--- src/sys/arch/luna68k/luna68k/clock.c 2011/02/08 20:20:16 1.8
+++ src/sys/arch/luna68k/luna68k/clock.c 2013/01/26 15:46:24 1.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: clock.c,v 1.8 2011/02/08 20:20:16 rmind Exp $ */ 1/* $NetBSD: clock.c,v 1.9 2013/01/26 15:46:24 tsutsui Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1988 University of Utah. 4 * Copyright (c) 1988 University of Utah.
5 * Copyright (c) 1992, 1993 5 * Copyright (c) 1992, 1993
6 * The Regents of the University of California. All rights reserved. 6 * The Regents of the University of California. All rights reserved.
7 * 7 *
8 * This code is derived from software contributed to Berkeley by 8 * This code is derived from software contributed to Berkeley by
9 * the Systems Programming Group of the University of Utah Computer 9 * the Systems Programming Group of the University of Utah Computer
10 * Science Department and Ralph Campbell. 10 * Science Department and Ralph Campbell.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions 13 * modification, are permitted provided that the following conditions
14 * are met: 14 * are met:
@@ -29,27 +29,27 @@ @@ -29,27 +29,27 @@
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE. 34 * SUCH DAMAGE.
35 * 35 *
36 * from: Utah Hdr: clock.c 1.18 91/01/21 36 * from: Utah Hdr: clock.c 1.18 91/01/21
37 * 37 *
38 * @(#)clock.c 8.1 (Berkeley) 6/10/93 38 * @(#)clock.c 8.1 (Berkeley) 6/10/93
39 */ 39 */
40 40
41#include <sys/cdefs.h> 41#include <sys/cdefs.h>
42__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.8 2011/02/08 20:20:16 rmind Exp $"); 42__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.9 2013/01/26 15:46:24 tsutsui Exp $");
43 43
44#include <sys/param.h> 44#include <sys/param.h>
45#include <sys/systm.h> 45#include <sys/systm.h>
46#include <sys/device.h> 46#include <sys/device.h>
47#include <sys/kernel.h> 47#include <sys/kernel.h>
48 48
49#include <machine/cpu.h> 49#include <machine/cpu.h>
50 50
51#include <dev/clock_subr.h> 51#include <dev/clock_subr.h>
52 52
53/* 53/*
54 * Machine-dependent clock routines. 54 * Machine-dependent clock routines.
55 * 55 *
@@ -69,28 +69,28 @@ cpu_initclocks(void) @@ -69,28 +69,28 @@ cpu_initclocks(void)
69{ 69{
70 int s; 70 int s;
71 71
72 if (machtype == LUNA_I) 72 if (machtype == LUNA_I)
73 hz = 60; /* LUNA-I is clocked at 60Hz, not 100Hz */ 73 hz = 60; /* LUNA-I is clocked at 60Hz, not 100Hz */
74 74
75 tick = 1000000 / hz; /* number of microseconds between interrupts */ 75 tick = 1000000 / hz; /* number of microseconds between interrupts */
76 76
77 /* 77 /*
78 * Get the clock started. 78 * Get the clock started.
79 */ 79 */
80 s = splhigh(); 80 s = splhigh();
81 /* 81 /*
82 * XXX  82 * XXX
83 * I guess it's necessary to program clock source with  83 * I guess it's necessary to program clock source with
84 * approprivate mode/value. 84 * approprivate mode/value.
85 * XXX 85 * XXX
86 */ 86 */
87 clock_enable = 1; 87 clock_enable = 1;
88 splx(s); 88 splx(s);
89} 89}
90 90
91/* 91/*
92 * We assume newhz is either stathz or profhz, and that neither will 92 * We assume newhz is either stathz or profhz, and that neither will
93 * change after being set up above. Could recalculate intervals here 93 * change after being set up above. Could recalculate intervals here
94 * but that would be a drag. 94 * but that would be a drag.
95 */ 95 */
96void 96void

cvs diff -r1.94 -r1.95 src/sys/arch/luna68k/luna68k/machdep.c (expand / switch to unified diff)

--- src/sys/arch/luna68k/luna68k/machdep.c 2013/01/18 18:41:12 1.94
+++ src/sys/arch/luna68k/luna68k/machdep.c 2013/01/26 15:46:24 1.95
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: machdep.c,v 1.94 2013/01/18 18:41:12 tsutsui Exp $ */ 1/* $NetBSD: machdep.c,v 1.95 2013/01/26 15:46:24 tsutsui Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2000 The NetBSD Foundation, Inc. 4 * Copyright (c) 2000 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Tohru Nishimura. 8 * by Tohru Nishimura.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ 32#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
33 33
34__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.94 2013/01/18 18:41:12 tsutsui Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.95 2013/01/26 15:46:24 tsutsui Exp $");
35 35
36#include "opt_ddb.h" 36#include "opt_ddb.h"
37#include "opt_kgdb.h" 37#include "opt_kgdb.h"
38#include "opt_compat_sunos.h" 38#include "opt_compat_sunos.h"
39#include "opt_modular.h" 39#include "opt_modular.h"
40#include "opt_panicbutton.h" 40#include "opt_panicbutton.h"
41#include "opt_m68k_arch.h" 41#include "opt_m68k_arch.h"
42 42
43#include <sys/param.h> 43#include <sys/param.h>
44#include <sys/systm.h> 44#include <sys/systm.h>
45#include <sys/kernel.h> 45#include <sys/kernel.h>
46#include <sys/proc.h> 46#include <sys/proc.h>
47#include <sys/buf.h> 47#include <sys/buf.h>
@@ -89,27 +89,27 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v  @@ -89,27 +89,27 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v
89#include <machine/db_machdep.h> 89#include <machine/db_machdep.h>
90#include <ddb/db_sym.h> 90#include <ddb/db_sym.h>
91#include <ddb/db_extern.h> 91#include <ddb/db_extern.h>
92#endif 92#endif
93 93
94#include "ksyms.h" 94#include "ksyms.h"
95 95
96/* 96/*
97 * Info for CTL_HW 97 * Info for CTL_HW
98 */ 98 */
99char machine[] = MACHINE; 99char machine[] = MACHINE;
100char cpu_model[120]; 100char cpu_model[120];
101 101
102/* Our exported CPU info; we can have only one. */  102/* Our exported CPU info; we can have only one. */
103struct cpu_info cpu_info_store; 103struct cpu_info cpu_info_store;
104 104
105struct vm_map *phys_map = NULL; 105struct vm_map *phys_map = NULL;
106 106
107int maxmem; /* max memory per process */ 107int maxmem; /* max memory per process */
108 108
109extern u_int lowram; 109extern u_int lowram;
110 110
111void luna68k_init(void); 111void luna68k_init(void);
112void identifycpu(void); 112void identifycpu(void);
113void dumpsys(void); 113void dumpsys(void);
114 114
115void straytrap(int, u_short); 115void straytrap(int, u_short);
@@ -467,27 +467,27 @@ haltsys: @@ -467,27 +467,27 @@ haltsys:
467 for (;;) 467 for (;;)
468 ; 468 ;
469} 469}
470 470
471/* 471/*
472 * Initialize the kernel crash dump header. 472 * Initialize the kernel crash dump header.
473 */ 473 */
474void 474void
475cpu_init_kcore_hdr(void) 475cpu_init_kcore_hdr(void)
476{ 476{
477 cpu_kcore_hdr_t *h = &cpu_kcore_hdr; 477 cpu_kcore_hdr_t *h = &cpu_kcore_hdr;
478 struct m68k_kcore_hdr *m = &h->un._m68k; 478 struct m68k_kcore_hdr *m = &h->un._m68k;
479 479
480 memset(&cpu_kcore_hdr, 0, sizeof(cpu_kcore_hdr));  480 memset(&cpu_kcore_hdr, 0, sizeof(cpu_kcore_hdr));
481 481
482 /* 482 /*
483 * Initialize the `dispatcher' portion of the header. 483 * Initialize the `dispatcher' portion of the header.
484 */ 484 */
485 strcpy(h->name, machine); 485 strcpy(h->name, machine);
486 h->page_size = PAGE_SIZE; 486 h->page_size = PAGE_SIZE;
487 h->kernbase = KERNBASE; 487 h->kernbase = KERNBASE;
488 488
489 /* 489 /*
490 * Fill in information about our MMU configuration. 490 * Fill in information about our MMU configuration.
491 */ 491 */
492 m->mmutype = mmutype; 492 m->mmutype = mmutype;
493 m->sg_v = SG_V; 493 m->sg_v = SG_V;
@@ -542,27 +542,27 @@ cpu_init_kcore_hdr(void) @@ -542,27 +542,27 @@ cpu_init_kcore_hdr(void)
542int 542int
543cpu_dumpsize(void) 543cpu_dumpsize(void)
544{ 544{
545 545
546 return btodb(MDHDRSIZE); 546 return btodb(MDHDRSIZE);
547} 547}
548 548
549/* 549/*
550 * Called by dumpsys() to dump the machine-dependent header. 550 * Called by dumpsys() to dump the machine-dependent header.
551 */ 551 */
552int 552int
553cpu_dump(int (*dump)(dev_t, daddr_t, void *, size_t), daddr_t *blknop) 553cpu_dump(int (*dump)(dev_t, daddr_t, void *, size_t), daddr_t *blknop)
554{ 554{
555 int buf[MDHDRSIZE / sizeof(int)];  555 int buf[MDHDRSIZE / sizeof(int)];
556 cpu_kcore_hdr_t *chdr; 556 cpu_kcore_hdr_t *chdr;
557 kcore_seg_t *kseg; 557 kcore_seg_t *kseg;
558 int error; 558 int error;
559 559
560 kseg = (kcore_seg_t *)buf; 560 kseg = (kcore_seg_t *)buf;
561 chdr = (cpu_kcore_hdr_t *)&buf[ALIGN(sizeof(kcore_seg_t)) / 561 chdr = (cpu_kcore_hdr_t *)&buf[ALIGN(sizeof(kcore_seg_t)) /
562 sizeof(int)]; 562 sizeof(int)];
563 563
564 /* Create the segment header. */ 564 /* Create the segment header. */
565 CORE_SETMAGIC(*kseg, KCORE_MAGIC, MID_MACHINE, CORE_CPU); 565 CORE_SETMAGIC(*kseg, KCORE_MAGIC, MID_MACHINE, CORE_CPU);
566 kseg->c_size = MDHDRSIZE - ALIGN(sizeof(kcore_seg_t)); 566 kseg->c_size = MDHDRSIZE - ALIGN(sizeof(kcore_seg_t));
567 567
568 memcpy(chdr, &cpu_kcore_hdr, sizeof(cpu_kcore_hdr_t)); 568 memcpy(chdr, &cpu_kcore_hdr, sizeof(cpu_kcore_hdr_t));
@@ -791,27 +791,27 @@ luna68k_abort(const char *cp) @@ -791,27 +791,27 @@ luna68k_abort(const char *cp)
791 cpu_Debugger(); 791 cpu_Debugger();
792#else 792#else
793#ifdef PANICBUTTON 793#ifdef PANICBUTTON
794 panic(cp); 794 panic(cp);
795#else 795#else
796 printf("%s ignored\n", cp); 796 printf("%s ignored\n", cp);
797#endif /* PANICBUTTON */ 797#endif /* PANICBUTTON */
798#endif /* DDB */ 798#endif /* DDB */
799} 799}
800 800
801/* 801/*
802 * cpu_exec_aout_makecmds(): 802 * cpu_exec_aout_makecmds():
803 * CPU-dependent a.out format hook for execve(). 803 * CPU-dependent a.out format hook for execve().
804 *  804 *
805 * Determine of the given exec package refers to something which we 805 * Determine of the given exec package refers to something which we
806 * understand and, if so, set up the vmcmds for it. 806 * understand and, if so, set up the vmcmds for it.
807 */ 807 */
808int 808int
809cpu_exec_aout_makecmds(struct lwp *l, struct exec_package *epp) 809cpu_exec_aout_makecmds(struct lwp *l, struct exec_package *epp)
810{ 810{
811 int error = ENOEXEC; 811 int error = ENOEXEC;
812#ifdef COMPAT_SUNOS 812#ifdef COMPAT_SUNOS
813 extern sunos_exec_aout_makecmds(struct proc *, struct exec_package *); 813 extern sunos_exec_aout_makecmds(struct proc *, struct exec_package *);
814 814
815 if ((error = sunos_exec_aout_makecmds(l->l_proc, epp)) == 0) 815 if ((error = sunos_exec_aout_makecmds(l->l_proc, epp)) == 0)
816 return 0; 816 return 0;
817#endif 817#endif

cvs diff -r1.35 -r1.36 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c (expand / switch to unified diff)

--- src/sys/arch/luna68k/luna68k/pmap_bootstrap.c 2012/02/10 06:28:39 1.35
+++ src/sys/arch/luna68k/luna68k/pmap_bootstrap.c 2013/01/26 15:46:24 1.36
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1/* $NetBSD: pmap_bootstrap.c,v 1.35 2012/02/10 06:28:39 mhitch Exp $ */ 1/* $NetBSD: pmap_bootstrap.c,v 1.36 2013/01/26 15:46:24 tsutsui Exp $ */
2 2
3/*  3/*
4 * Copyright (c) 1991, 1993 4 * Copyright (c) 1991, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * the Systems Programming Group of the University of Utah Computer 8 * the Systems Programming Group of the University of Utah Computer
9 * Science Department. 9 * Science Department.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer. 15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright 16 * 2. Redistributions in binary form must reproduce the above copyright
@@ -26,27 +26,27 @@ @@ -26,27 +26,27 @@
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE. 33 * SUCH DAMAGE.
34 * 34 *
35 * @(#)pmap_bootstrap.c 8.1 (Berkeley) 6/10/93 35 * @(#)pmap_bootstrap.c 8.1 (Berkeley) 6/10/93
36 */ 36 */
37 37
38#include <sys/cdefs.h> 38#include <sys/cdefs.h>
39__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.35 2012/02/10 06:28:39 mhitch Exp $"); 39__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.36 2013/01/26 15:46:24 tsutsui Exp $");
40 40
41#include "opt_m68k_arch.h" 41#include "opt_m68k_arch.h"
42 42
43#include <sys/param.h> 43#include <sys/param.h>
44#include <uvm/uvm_extern.h> 44#include <uvm/uvm_extern.h>
45 45
46#include <machine/cpu.h> 46#include <machine/cpu.h>
47#include <machine/pte.h> 47#include <machine/pte.h>
48#include <machine/vmparam.h> 48#include <machine/vmparam.h>
49 49
50#define RELOC(v, t) *((t*)((uintptr_t)&(v) + firstpa)) 50#define RELOC(v, t) *((t*)((uintptr_t)&(v) + firstpa))
51 51
52extern char *etext; 52extern char *etext;