Hi,

the following diff fixes kernel builds with ACPI_DEBUG defined.
Not sure if these are the right ones, but at least it
compiles again.

Cheers,
Fabian


Index: acpi.c
===================================================================
RCS file: /cvs/src/sys/dev/acpi/acpi.c,v
retrieving revision 1.257
diff -u -p -r1.257 acpi.c
--- acpi.c      25 Apr 2014 14:37:06 -0000      1.257
+++ acpi.c      16 May 2014 22:09:26 -0000
@@ -435,7 +435,7 @@ acpi_matchhids(struct acpi_attach_args *
        if (aa->aaa_dev == NULL || aa->aaa_node == NULL)
                return (0);
        if (_acpi_matchhids(aa->aaa_dev, hids)) {
-               dnprintf(5, "driver %s matches %s\n", driver, hids);
+               dnprintf(5, "driver %s matches %s\n", driver, (char *)hids);
                return (1);
        }
        return (0);
@@ -1336,7 +1336,7 @@ acpi_map_pmregs(struct acpi_softc *sc)
                        break;
                }
                if (size && addr) {
-                       dnprintf(50, "mapping: %.4x %.4x %s\n",
+                       dnprintf(50, "mapping: %.4lx %.4lx %s\n",
                            addr, size, name);
 
                        /* Size and address exist; map register space */
Index: acpicpu.c
===================================================================
RCS file: /cvs/src/sys/dev/acpi/acpicpu.c,v
retrieving revision 1.57
diff -u -p -r1.57 acpicpu.c
--- acpicpu.c   21 Jul 2010 19:35:15 -0000      1.57
+++ acpicpu.c   16 May 2014 22:09:26 -0000
@@ -344,7 +344,7 @@ acpicpu_attach(struct device *parent, st
 #ifdef ACPI_DEBUG
        printf(": %s: ", sc->sc_devnode->name);
        printf("\n: hdr:%x pblk:%x,%x duty:%x,%x pstate:%x "
-              "(%d throttling states)\n", sc->sc_acpi->sc_fadt->hdr_revision,
+              "(%ld throttling states)\n", sc->sc_acpi->sc_fadt->hdr_revision,
                sc->sc_pblk_addr, sc->sc_pblk_len, sc->sc_duty_off,
                sc->sc_duty_wid, sc->sc_acpi->sc_fadt->pstate_cnt,
                CPU_MAXSTATE(sc));
@@ -519,7 +519,7 @@ acpicpu_getpct(struct acpicpu_softc *sc)
                goto ffh;
        }
 
-       dnprintf(10, "_PCT(ctrl)  : %02x %04x %02x %02x %02x %02x %016x\n",
+       dnprintf(10, "_PCT(ctrl)  : %02x %04x %02x %02x %02x %02x %016llx\n",
            sc->sc_pct.pct_ctrl.grd_descriptor,
            sc->sc_pct.pct_ctrl.grd_length,
            sc->sc_pct.pct_ctrl.grd_gas.address_space_id,
@@ -528,7 +528,7 @@ acpicpu_getpct(struct acpicpu_softc *sc)
            sc->sc_pct.pct_ctrl.grd_gas.access_size,
            sc->sc_pct.pct_ctrl.grd_gas.address);
 
-       dnprintf(10, "_PCT(status): %02x %04x %02x %02x %02x %02x %016x\n",
+       dnprintf(10, "_PCT(status): %02x %04x %02x %02x %02x %02x %016llx\n",
            sc->sc_pct.pct_status.grd_descriptor,
            sc->sc_pct.pct_status.grd_length,
            sc->sc_pct.pct_status.grd_gas.address_space_id,
Index: acpiec.c
===================================================================
RCS file: /cvs/src/sys/dev/acpi/acpiec.c,v
retrieving revision 1.48
diff -u -p -r1.48 acpiec.c
--- acpiec.c    2 Jul 2013 18:37:47 -0000       1.48
+++ acpiec.c    16 May 2014 22:09:26 -0000
@@ -142,9 +142,10 @@ acpiec_read_data(struct acpiec_softc *sc
        u_int8_t                val;
 
        acpiec_wait(sc, EC_STAT_OBF, EC_STAT_OBF);
-       dnprintf(40, "acpiec: read_data\n", (int)val);
        val = bus_space_read_1(sc->sc_data_bt, sc->sc_data_bh, 0);
 
+       dnprintf(40, "acpiec: read_data %d\n", (int)val);
+
        return (val);
 }
 
@@ -482,7 +483,7 @@ acpiec_getcrs(struct acpiec_softc *sc, s
        /* XXX: todo - validate _CRS checksum? */
 ecdtdone:
 
-       dnprintf(10, "%s: Data: 0x%x, S/C: 0x%x\n",
+       dnprintf(10, "%s: Data: 0x%lx, S/C: 0x%lx\n",
            DEVNAME(sc), ec_data, ec_sc);
 
        if (ctype == GAS_SYSTEM_IOSPACE)
Index: atk0110.c
===================================================================
RCS file: /cvs/src/sys/dev/acpi/atk0110.c,v
retrieving revision 1.8
diff -u -p -r1.8 atk0110.c
--- atk0110.c   21 Feb 2014 16:25:57 -0000      1.8
+++ atk0110.c   16 May 2014 22:09:27 -0000
@@ -448,13 +448,13 @@ aibs_getvalue(struct aibs_softc *sc, int
        }
 
        if (aml_evalnode(sc->sc_acpi, n, 1, &req, &res)) {
-               dprintf("%s: %s: %i: evaluation failed\n",
+               dprintf("%s: %s: %lld: evaluation failed\n",
                    DEVNAME(sc), n->name, i);
                aml_freevalue(&res);
                return (-1);
        }
        if (res.type != type) {
-               dprintf("%s: %s: %i: not an integer: type %i\n",
+               dprintf("%s: %s: %lld: not an integer: type %i\n",
                    DEVNAME(sc), n->name, i, res.type);
                aml_freevalue(&res);
                return (-1);
@@ -462,14 +462,14 @@ aibs_getvalue(struct aibs_softc *sc, int
 
        if (sc->sc_mode) {
                if (res.length < sizeof(ret)) {
-                       dprintf("%s: %s: %i: result buffer too small\n",
+                       dprintf("%s: %s: %lld: result buffer too small\n",
                            DEVNAME(sc), n->name, i);
                        aml_freevalue(&res);
                        return (-1);
                }
                bcopy(res.v_buffer, &ret, sizeof(ret));
                if (ret.flags == 0) {
-                       dprintf("%s: %s: %i: bad flags in result\n",
+                       dprintf("%s: %s: %lld: bad flags in result\n",
                            DEVNAME(sc), n->name, i);
                        aml_freevalue(&res);
                        return (-1);
@@ -493,13 +493,13 @@ aibs_getpack(struct aibs_softc *sc, stru
        req.v_integer = i;
 
        if (aml_evalnode(sc->sc_acpi, n, 1, &req, res)) {
-               dprintf("%s: %s: %i: evaluation failed\n",
+               dprintf("%s: %s: %lld: evaluation failed\n",
                    DEVNAME(sc), n->name, i);
                aml_freevalue(res);
                return (-1);
        }
        if (res->type != AML_OBJTYPE_PACKAGE) {
-               dprintf("%s: %s: %i: not a package: type %i\n",
+               dprintf("%s: %s: %lld: not a package: type %i\n",
                    DEVNAME(sc), n->name, i, res->type);
                aml_freevalue(res);
                return (-1);
Index: dsdt.c
===================================================================
RCS file: /cvs/src/sys/dev/acpi/dsdt.c,v
retrieving revision 1.208
diff -u -p -r1.208 dsdt.c
--- dsdt.c      2 May 2014 14:04:50 -0000       1.208
+++ dsdt.c      16 May 2014 22:09:27 -0000
@@ -424,7 +424,7 @@ _acpi_os_malloc(size_t size, const char 
        struct acpi_memblock *sptr;
 
        sptr = malloc(size+sizeof(*sptr), M_ACPI, M_WAITOK | M_ZERO);
-       dnprintf(99, "alloc: %x %s:%d\n", sptr, fn, line);
+       dnprintf(99, "alloc: %p %s:%d\n", sptr, fn, line);
        acpi_nalloc += size;
        sptr->size = size;
 #ifdef ACPI_MEMDEBUG
@@ -451,7 +451,7 @@ _acpi_os_free(void *ptr, const char *fn,
                LIST_REMOVE(sptr, link);
 #endif
 
-               dnprintf(99, "free: %x %s:%d\n", sptr, fn, line);
+               dnprintf(99, "free: %p %s:%d\n", sptr, fn, line);
                free(sptr, M_ACPI);
        }
 }
@@ -552,7 +552,7 @@ aml_register_notify(struct aml_node *nod
        struct aml_notify_data  *pdata;
        extern int acpi_poll_enabled;
 
-       dnprintf(10, "aml_register_notify: %s %s %x\n",
+       dnprintf(10, "aml_register_notify: %s %s %p\n",
            node->name, pnpid ? pnpid : "", proc);
 
        pdata = acpi_os_malloc(sizeof(struct aml_notify_data));
@@ -3124,7 +3124,7 @@ aml_eval(struct aml_scope *scope, struct
        case AML_OBJTYPE_BUFFERFIELD:
        case AML_OBJTYPE_FIELDUNIT:
                my_ret = aml_allocvalue(0,0,NULL);
-               dnprintf(20,"quick: Convert Bufferfield to %c 0x%x\n",
+               dnprintf(20,"quick: Convert Bufferfield to %c %p\n",
                    ret_type, my_ret);
                aml_rwfield(tmp, 0, tmp->v_field.bitlen, my_ret, ACPI_IOREAD);
                break;
@@ -3971,7 +3971,7 @@ aml_parse(struct aml_scope *scope, int r
        case AMLOP_NOTIFY:
                /* Notify: Si */
                rv = aml_gettgt(opargs[0], opcode);
-               dnprintf(50,"Notifying: %s %x\n",
+               dnprintf(50,"Notifying: %s %llx\n",
                    aml_nodename(rv->node),
                    opargs[1]->v_integer);
                aml_notify(rv->node, opargs[1]->v_integer);
@@ -4132,7 +4132,7 @@ aml_evalnode(struct acpi_softc *sc, stru
                memset(res, 0, sizeof(*res));
        if (node == NULL || node->value == NULL)
                return (ACPI_E_BADVALUE);
-       dnprintf(12,"EVALNODE: %s %d\n", aml_nodename(node), acpi_nalloc);
+       dnprintf(12,"EVALNODE: %s %lx\n", aml_nodename(node), acpi_nalloc);
 
        aml_error = 0;
        xres = aml_eval(NULL, node->value, 't', argc, argv);
@@ -4205,7 +4205,7 @@ __aml_searchname(struct aml_node *root, 
        char  nseg[AML_NAMESEG_LEN + 1];
        int   i;
 
-       dnprintf(25,"Searchname: %s:%s = ", aml_nodename(root), vname);
+       dnprintf(25,"Searchname: %s:%s = ", aml_nodename(root), name);
        while (*name == AMLOP_ROOTCHAR) {
                root = &aml_root;
                name++;

Reply via email to