Date: Mon, 19 Mar 2012 00:23:33 +0100 From: Robert Millan <rmh@freebsd.org> To: Bruce Evans <brde@optusnet.com.au> Cc: Adrian Chadd <adrian@freebsd.org>, freebsd-arch@freebsd.org Subject: Re: [PATCH] Add compatibility <sys/io.h> Message-ID: <CAOfDtXMmR-On5k7rLKNqXhGTPLkc4XOao672HcS-9vAbVJxiSQ@mail.gmail.com> In-Reply-To: <20120312121852.P1122@besplex.bde.org> References: <CAOfDtXPGPP0reN9NTBw_5%2BNwXZ56Yy0oyx_fH%2BDOvmpc1O%2BQdQ@mail.gmail.com> <CAJ-Vmonu_ApSd192cjvsW6k3eNNK4Kz=MmAMe_e=zmwbrS8Ayw@mail.gmail.com> <CAOfDtXOCyjga5QHz98Re3jXkefNzB-MbULcAVUQH89ToVLkw9g@mail.gmail.com> <20120312121852.P1122@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--14dae9340ccbf8ecd304bb8cbad3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable El 12 de mar=C3=A7 de 2012 3:18, Bruce Evans <brde@optusnet.com.au> ha escr= it: > I would prefer to make it fail to build if it gets the arg order wrong, > but I don't see how to do that, since both args are integers. I don't think you can. E.g. consider: outb (0x60, 0x61); then only semantical analysis could tell. >> Looks good. =C2=A0So you suggest we tell userspace users to switch to >> bus_space_write_*? > > > The problem with that is that if you don't do the switch yourself then > most users won't even know that it is necessary. =C2=A0You have to remove > the functionaility in cpufunc.h and/or add messy userland ifdefs as > well as messy kernel ifdefs to unremove it, so that users who don't > know what they are doing and which you haven't adjusted get warned > by build failures. =C2=A0All users that knew what they were doing have to > do it differently. Okay, I see your point. Maybe we can try a conservative approach and just issue warnings. How does this look for a start? --=20 Robert Millan --14dae9340ccbf8ecd304bb8cbad3 Content-Type: text/plain; charset=US-ASCII; name="cpufunc.diff" Content-Disposition: attachment; filename="cpufunc.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gzylsu1x0 SW5kZXg6IHN5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2lkZS4gRm9yIHVzZXItc3BhY2UgSS9PLCB1c2UgdGhl IGJ1c19zcGFjZSg5KSBmYW1pbHkgb2YgZnVuY3Rpb25zLiIKKyNlbmRpZgorCiBzdHJ1Y3QgcmVn aW9uX2Rlc2NyaXB0b3I7CiAKICNkZWZpbmUgcmVhZGIodmEpCSgqKHZvbGF0aWxlIHVpbnQ4X3Qg KikgKHZhKSkK --14dae9340ccbf8ecd304bb8cbad3--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOfDtXMmR-On5k7rLKNqXhGTPLkc4XOao672HcS-9vAbVJxiSQ>