Have nothing else than octeons to test with, but I guess it
affects/fixes other mips64s too.

For mips64_machdep.c, the vaddr_t va wasn't printable with %p, and since
vaddr_t seems to be a unsigned long on mips64, I just %lx'd it. Casting
it to (void *) also worked.

The unconditional #define DEBUG in octeon/machdep.c is somewhat weird.

Should we just keep the whole block and remove the #ifdefs, move it to
#if 1 for later easy removal? Dunno, but it won't compile with DEBUG
unless something is done or it will complain about DEBUG getting redefined.

Index: arch/mips64/mips64/db_machdep.c
===================================================================
RCS file: /cvs/src/sys/arch/mips64/mips64/db_machdep.c,v
retrieving revision 1.49
diff -u -p -u -r1.49 db_machdep.c
--- arch/mips64/mips64/db_machdep.c     20 Mar 2018 15:45:32 -0000      1.49
+++ arch/mips64/mips64/db_machdep.c     12 Jun 2018 19:07:21 -0000
@@ -185,7 +185,7 @@ db_enter_ddb(void)
        mtx_enter(&ddb_mp_mutex);

 #ifdef DEBUG
-       printf("db_enter_ddb %d: state %x pause %x\n", ci->ci_cpuid,
+       printf("db_enter_ddb %ld: state %x pause %x\n", ci->ci_cpuid,
            ddb_state, ci->ci_ddb);
 #endif
        /* If we are first in, grab ddb and stop all other CPUs */
Index: arch/mips64/mips64/ipifuncs.c
===================================================================
RCS file: /cvs/src/sys/arch/mips64/mips64/ipifuncs.c,v
retrieving revision 1.18
diff -u -p -u -r1.18 ipifuncs.c
--- arch/mips64/mips64/ipifuncs.c       18 Feb 2018 14:42:32 -0000      1.18
+++ arch/mips64/mips64/ipifuncs.c       12 Jun 2018 19:07:21 -0000
@@ -131,7 +131,7 @@ mips64_send_ipi(unsigned int cpuid, unsi
        if (cpuid >= CPU_MAXID || get_cpu_info(cpuid) == NULL)
                panic("mips_send_ipi: bogus cpu_id");
        if (!cpuset_isset(&cpus_running, get_cpu_info(cpuid)))
-               panic("mips_send_ipi: CPU %ld not running", cpuid);
+               panic("mips_send_ipi: CPU %d not running", cpuid);
 #endif

        atomic_setbits_int(&ipi_mailbox[cpuid], ipimask);
@@ -162,7 +162,7 @@ void
 mips64_ipi_nop(void)
 {
 #ifdef DEBUG
-       printf("mips64_ipi_nop on cpu%d\n", cpu_number());
+       printf("mips64_ipi_nop on cpu%ld\n", cpu_number());
 #endif
 }

Index: arch/mips64/mips64/mips64_machdep.c
===================================================================
RCS file: /cvs/src/sys/arch/mips64/mips64/mips64_machdep.c,v
retrieving revision 1.25
diff -u -p -u -r1.25 mips64_machdep.c
--- arch/mips64/mips64/mips64_machdep.c 2 Sep 2017 15:56:29 -0000       1.25
+++ arch/mips64/mips64/mips64_machdep.c 12 Jun 2018 19:07:21 -0000
@@ -186,7 +186,7 @@ exec_md_map(struct proc *p, struct exec_
        if (rc != 0)
                return rc;
 #ifdef DEBUG
-       printf("%s: p %p fppgva %p\n", __func__, p, va);
+       printf("%s: p %p fppgva %lx\n", __func__, p, va);
 #endif
        p->p_md.md_fppgva = va;
 #endif
Index: arch/octeon/octeon/machdep.c
===================================================================
RCS file: /cvs/src/sys/arch/octeon/octeon/machdep.c,v
retrieving revision 1.105
diff -u -p -u -r1.105 machdep.c
--- arch/octeon/octeon/machdep.c        9 Apr 2018 13:46:15 -0000
1.105
+++ arch/octeon/octeon/machdep.c        12 Jun 2018 19:07:21 -0000
@@ -419,7 +419,9 @@ mips_init(register_t a0, register_t a1,
        consinit();
        printf("Initial setup done, switching console.\n");

+#ifndef DEBUG
 #define DEBUG
+#endif
 #ifdef DEBUG
 #define DUMP_BOOT_DESC(field, format) \
        printf("boot_desc->" #field ":" #format "\n", boot_desc->field)



-- 
-"Any girl with sense love those dead presidents"
Quireboys - Debbie


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to