Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amd64/amd64 KNF a bit, so I don't get scared each t...



details:   https://anonhg.NetBSD.org/src/rev/8a33aad9f128
branches:  trunk
changeset: 341794:8a33aad9f128
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Nov 22 13:41:24 2015 +0000

description:
KNF a bit, so I don't get scared each time I open a file

diffstat:

 sys/arch/amd64/amd64/amd64_trap.S       |  14 ++--
 sys/arch/amd64/amd64/autoconf.c         |   5 +-
 sys/arch/amd64/amd64/bios32.c           |   6 +-
 sys/arch/amd64/amd64/gdt.c              |  14 ++--
 sys/arch/amd64/amd64/kgdb_machdep.c     |   8 +-
 sys/arch/amd64/amd64/linux32_sigcode.S  |  40 +++++++-------
 sys/arch/amd64/amd64/machdep.c          |   9 +--
 sys/arch/amd64/amd64/mptramp.S          |  86 ++++++++++++++++----------------
 sys/arch/amd64/amd64/netbsd32_machdep.c |  12 ++--
 sys/arch/amd64/amd64/spl.S              |  10 +-
 sys/arch/amd64/amd64/trap.c             |   6 +-
 sys/arch/amd64/amd64/vector.S           |  86 ++++++++++++++++----------------
 12 files changed, 145 insertions(+), 151 deletions(-)

diffs (truncated from 694 to 300 lines):

diff -r fc89600b6110 -r 8a33aad9f128 sys/arch/amd64/amd64/amd64_trap.S
--- a/sys/arch/amd64/amd64/amd64_trap.S Sun Nov 22 12:26:11 2015 +0000
+++ b/sys/arch/amd64/amd64/amd64_trap.S Sun Nov 22 13:41:24 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amd64_trap.S,v 1.2 2014/02/12 19:53:49 dsl Exp $       */
+/*     $NetBSD: amd64_trap.S,v 1.3 2015/11/22 13:41:24 maxv Exp $      */
 
 /*-
  * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
 
 #if 0
 #include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: amd64_trap.S,v 1.2 2014/02/12 19:53:49 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amd64_trap.S,v 1.3 2015/11/22 13:41:24 maxv Exp $");
 #endif
 
 /*
@@ -144,7 +144,7 @@
 #else
        ZTRAP_NJ(T_BPTFLT)
        INTRENTRY
-       STI(si)
+       STI(si)
        /*
         * DTrace Function Boundary Trace (fbt) probes are triggered
         * by int3 (0xcc).
@@ -378,7 +378,7 @@
  */
 NENTRY(alltraps)
        INTRENTRY
-       STI(si)
+       STI(si)
 
 calltrap:
 #ifdef DIAGNOSTIC
@@ -393,11 +393,11 @@
 .Lalltraps_checkast:
        movq    CPUVAR(CURLWP),%r14
        /* Check for ASTs on exit to user mode. */
-       CLI(si)
+       CLI(si)
        CHECK_ASTPENDING(%r14)
        je      3f
        CLEAR_ASTPENDING(%r14)
-       STI(si)
+       STI(si)
        movl    $T_ASTFLT,TF_TRAPNO(%rsp)
        movq    %rsp,%rdi
        incq    CPUVAR(NTRAP)
@@ -411,7 +411,7 @@
 6:     cmpl    CPUVAR(ILEVEL),%ebx
        jne     3f
        INTRFASTEXIT
-3:     STI(si)
+3:     STI(si)
        movabsq $4f,%rdi
        movl    CPUVAR(ILEVEL),%esi
        movl    %ebx,%edx
diff -r fc89600b6110 -r 8a33aad9f128 sys/arch/amd64/amd64/autoconf.c
--- a/sys/arch/amd64/amd64/autoconf.c   Sun Nov 22 12:26:11 2015 +0000
+++ b/sys/arch/amd64/amd64/autoconf.c   Sun Nov 22 13:41:24 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.24 2012/11/08 02:00:44 chs Exp $        */
+/*     $NetBSD: autoconf.c,v 1.25 2015/11/22 13:41:24 maxv Exp $       */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.24 2012/11/08 02:00:44 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.25 2015/11/22 13:41:24 maxv Exp $");
 
 #include "opt_multiprocessor.h"
 #include "opt_intrdebug.h"
@@ -86,7 +86,6 @@
 void
 cpu_configure(void)
 {
-
        startrtclock();
 
 #if NBIOS32 > 0
diff -r fc89600b6110 -r 8a33aad9f128 sys/arch/amd64/amd64/bios32.c
--- a/sys/arch/amd64/amd64/bios32.c     Sun Nov 22 12:26:11 2015 +0000
+++ b/sys/arch/amd64/amd64/bios32.c     Sun Nov 22 13:41:24 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bios32.c,v 1.20 2012/02/25 00:13:28 joerg Exp $        */
+/*     $NetBSD: bios32.c,v 1.21 2015/11/22 13:41:24 maxv Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bios32.c,v 1.20 2012/02/25 00:13:28 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bios32.c,v 1.21 2015/11/22 13:41:24 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -171,7 +171,7 @@
                smbios_entry.min = sh->minrev;
                smbios_entry.count = sh->count;
 
-               for (; pa < end; pa+= NBPG, eva+= NBPG)
+               for (; pa < end; pa+= NBPG, eva+= NBPG)
 #ifdef XEN
                        pmap_kenter_ma(eva, pa, VM_PROT_READ, 0);
 #else
diff -r fc89600b6110 -r 8a33aad9f128 sys/arch/amd64/amd64/gdt.c
--- a/sys/arch/amd64/amd64/gdt.c        Sun Nov 22 12:26:11 2015 +0000
+++ b/sys/arch/amd64/amd64/gdt.c        Sun Nov 22 13:41:24 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gdt.c,v 1.25 2013/10/16 18:07:56 christos Exp $        */
+/*     $NetBSD: gdt.c,v 1.26 2015/11/22 13:41:24 maxv Exp $    */
 
 /*-
  * Copyright (c) 1996, 1997, 2009 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.25 2013/10/16 18:07:56 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.26 2015/11/22 13:41:24 maxv Exp $");
 
 #include "opt_multiprocessor.h"
 #include "opt_xen.h"
@@ -55,7 +55,7 @@
 
 #ifdef XEN
 #include <xen/hypervisor.h>
-#endif 
+#endif
 
 int gdt_size;          /* size of GDT in bytes */
 int gdt_dyncount;      /* number of dyn. allocated GDT entries in use */
@@ -99,13 +99,13 @@
        struct cpu_info *ci;
        int idx;
 
-        set_sys_segment(&d.sd, base, limit, type, dpl, gran);
+       set_sys_segment(&d.sd, base, limit, type, dpl, gran);
        idx = IDXSEL(GDYNSEL(slot, SEL_KPL));
-        for (CPU_INFO_FOREACH(cii, ci)) {
-                KASSERT(ci->ci_gdt != NULL);
+       for (CPU_INFO_FOREACH(cii, ci)) {
+               KASSERT(ci->ci_gdt != NULL);
                update_descriptor(&ci->ci_gdt[idx + 0], &d.bits[0]);
                update_descriptor(&ci->ci_gdt[idx + 1], &d.bits[1]);
-        }
+       }
 }
 
 /*
diff -r fc89600b6110 -r 8a33aad9f128 sys/arch/amd64/amd64/kgdb_machdep.c
--- a/sys/arch/amd64/amd64/kgdb_machdep.c       Sun Nov 22 12:26:11 2015 +0000
+++ b/sys/arch/amd64/amd64/kgdb_machdep.c       Sun Nov 22 13:41:24 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kgdb_machdep.c,v 1.9 2015/07/26 10:49:05 mrg Exp $     */
+/*     $NetBSD: kgdb_machdep.c,v 1.10 2015/11/22 13:41:24 maxv Exp $   */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.9 2015/07/26 10:49:05 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.10 2015/11/22 13:41:24 maxv Exp $");
 
 #include "opt_ddb.h"
 
@@ -110,7 +110,7 @@
  * Translate a trap number into a unix compatible signal value.
  * (gdb only understands unix signal numbers).
  */
-int 
+int
 kgdb_signal(int type)
 {
        switch (type) {
@@ -208,7 +208,7 @@
        regs->tf_rflags = gdb_regs[17];
        regs->tf_cs  = gdb_regs[18];
        regs->tf_ss  = gdb_regs[19];
-}      
+}
 
 /*
  * Trap into kgdb to wait for debugger to connect,
diff -r fc89600b6110 -r 8a33aad9f128 sys/arch/amd64/amd64/linux32_sigcode.S
--- a/sys/arch/amd64/amd64/linux32_sigcode.S    Sun Nov 22 12:26:11 2015 +0000
+++ b/sys/arch/amd64/amd64/linux32_sigcode.S    Sun Nov 22 13:41:24 2015 +0000
@@ -1,28 +1,28 @@
-/*     $NetBSD: linux32_sigcode.S,v 1.2 2011/08/01 22:21:01 joerg Exp $ */
+/*     $NetBSD: linux32_sigcode.S,v 1.3 2015/11/22 13:41:24 maxv Exp $ */
 
 #include "assym.h"
 #include <machine/asm.h>
 
        .code32
 NENTRY(linux32_sigcode)
-        call    *LINUX32_SF_HANDLER(%esp)
-        leal    LINUX32_SF_SC(%esp),%ebx # scp
-        pushl   %eax
-        movl    $LINUX32_SYS_sigreturn,%eax
-        int     $0x80
-        movl    $LINUX32_SYS_exit,%eax
-        int     $0x80
-  
-       .balign 16
+       call    *LINUX32_SF_HANDLER(%esp)
+       leal    LINUX32_SF_SC(%esp),%ebx        # scp
+       pushl   %eax
+       movl    $LINUX32_SYS_sigreturn,%eax
+       int     $0x80
+       movl    $LINUX32_SYS_exit,%eax
+       int     $0x80
+
+       .balign 16
 NENTRY(linux32_rt_sigcode)
-        call    *LINUX32_RT_SF_HANDLER(%esp)
-        leal    LINUX32_RT_SF_UC(%esp),%ebx # scp
-        pushl   %eax
-        movl    $LINUX32_SYS_rt_sigreturn,%eax
-        int     $0x80
-        movl    $LINUX32_SYS_exit,%eax
-        int     $0x80
-       .balign 16
-        .globl  _C_LABEL(linux32_esigcode)
-_C_LABEL(linux32_esigcode): 
+       call    *LINUX32_RT_SF_HANDLER(%esp)
+       leal    LINUX32_RT_SF_UC(%esp),%ebx     # scp
+       pushl   %eax
+       movl    $LINUX32_SYS_rt_sigreturn,%eax
+       int     $0x80
+       movl    $LINUX32_SYS_exit,%eax
+       int     $0x80
+       .balign 16
+       .globl  _C_LABEL(linux32_esigcode)
+_C_LABEL(linux32_esigcode):
 
diff -r fc89600b6110 -r 8a33aad9f128 sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c    Sun Nov 22 12:26:11 2015 +0000
+++ b/sys/arch/amd64/amd64/machdep.c    Sun Nov 22 13:41:24 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.213 2015/07/15 04:10:02 msaitoh Exp $    */
+/*     $NetBSD: machdep.c,v 1.214 2015/11/22 13:41:24 maxv Exp $       */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.213 2015/07/15 04:10:02 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.214 2015/11/22 13:41:24 maxv Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -1552,7 +1552,6 @@
 
        cpu_init_msrs(&cpu_info_primary, true);
 
-
        use_pae = 1; /* PAE always enabled in long mode */
 
 #ifdef XEN
@@ -1590,7 +1589,6 @@
        avail_start = 8 * PAGE_SIZE;
 
 #if !defined(REALBASEMEM) && !defined(REALEXTMEM)
-
        /*
         * Check to see if we have a memory map from the BIOS (passed
         * to us by the boot program.
@@ -1598,7 +1596,6 @@
        bim = lookup_bootinfo(BTINFO_MEMMAP);
        if (bim != NULL && bim->num > 0)
                initx86_parse_memmap(bim, iomem_ex);
-
 #endif /* ! REALBASEMEM && ! REALEXTMEM */
 
        /*
@@ -1632,7 +1629,6 @@
 
 #ifndef XEN
        initx86_load_memmap(first_avail);
-
 #else  /* XEN */
        kern_end = KERNBASE + first_avail;
        physmem = xen_start_info.nr_pages;
@@ -1707,7 +1703,6 @@
        /*
         * 32 bit GDT entries.
         */
-



Home | Main Index | Thread Index | Old Index