Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/dev/ic/com.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/dev/ic/com.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.295 retrieving revision 1.296 diff -u -p -r1.295 -r1.296 --- src/sys/dev/ic/com.c 2010/02/24 22:37:58 1.295 +++ src/sys/dev/ic/com.c 2010/03/22 23:00:08 1.296 @@ -1,4 +1,4 @@ -/* $NetBSD: com.c,v 1.295 2010/02/24 22:37:58 dyoung Exp $ */ +/* $NetBSD: com.c,v 1.296 2010/03/22 23:00:08 dyoung Exp $ */ /*- * Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.295 2010/02/24 22:37:58 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.296 2010/03/22 23:00:08 dyoung Exp $"); #include "opt_com.h" #include "opt_ddb.h" @@ -263,6 +263,13 @@ const bus_size_t com_std_map[16] = COM_R #define COM_BARRIER(r, f) \ bus_space_barrier((r)->cr_iot, (r)->cr_ioh, 0, (r)->cr_nports, (f)) +/* XXX Comparing bus_space_tag_t's is not allowed! */ +static bool +tags_are_equal(const bus_space_tag_t lt, const bus_space_tag_t rt) +{ + return true; +} + /*ARGSUSED*/ int comspeed(long speed, long frequency, int type) @@ -392,7 +399,7 @@ com_attach_subr(struct com_softc *sc) CSR_WRITE_1(regsp, COM_REG_IER, sc->sc_ier); - if (regsp->cr_iot == comcons_info.regs.cr_iot && + if (tags_are_equal(regsp->cr_iot, comcons_info.regs.cr_iot) && regsp->cr_iobase == comcons_info.regs.cr_iobase) { comconsattached = 1; @@ -541,7 +548,7 @@ fifodone: * exclusive use. If it's the console _and_ the * kgdb device, it doesn't. */ - if (regsp->cr_iot == comkgdbregs.cr_iot && + if (tags_are_equal(regsp->cr_iot, comkgdbregs.cr_iot) && regsp->cr_iobase == comkgdbregs.cr_iobase) { if (!ISSET(sc->sc_hwflags, COM_HW_CONSOLE)) { com_kgdb_attached = 1; @@ -2302,7 +2309,7 @@ com_kgdb_attach1(struct com_regs *regsp, { int res; - if (regsp->cr_iot == comcons_info.regs.cr_iot && + if (tags_are_equal(regsp->cr_iot, comcons_info.regs.cr_iot) && regsp->cr_iobase == comcons_info.regs.cr_iobase) { #if !defined(DDB) return (EBUSY); /* cannot share with console */ @@ -2371,12 +2378,12 @@ com_is_console(bus_space_tag_t iot, bus_ bus_space_handle_t help; if (!comconsattached && - iot == comcons_info.regs.cr_iot && + tags_are_equal(iot, comcons_info.regs.cr_iot) && iobase == comcons_info.regs.cr_iobase) help = comcons_info.regs.cr_ioh; #ifdef KGDB else if (!com_kgdb_attached && - iot == comkgdbregs.cr_iot && iobase == comkgdbregs.cr_iobase) + tags_are_equal(iot, comkgdbregs.cr_iot) && iobase == comkgdbregs.cr_iobase) help = comkgdbregs.cr_ioh; #endif else