From owner-freebsd-arch@FreeBSD.ORG Sun Mar 18 23:23:34 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5B1821065673; Sun, 18 Mar 2012 23:23:34 +0000 (UTC) (envelope-from rmh.aybabtu@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0EA0C8FC12; Sun, 18 Mar 2012 23:23:33 +0000 (UTC) Received: by iahk25 with SMTP id k25so11972795iah.13 for ; Sun, 18 Mar 2012 16:23:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=8ISIL4RAIrU+YNVhQRo2WIXWF7yDG8r1tdp8Zv4TyRQ=; b=e2yZpT9ZFtnj8ikyBvT9Icjw5sX82XAg/ydKEHmXrhn89awGGas0judy2Lof+wGyMY 9ygeAGwYZT41ucmFRniBdPzwYxU892vJl7qRFzt4IBwpVlGYVggM/9XHrqFfhLFRa0aD 6tbJPcRZxVt54SyULp7BKG1czTdKeEcKj0hicltin7DawqvFNTK3zlG2A9KnB3uSG374 V9gMVRCArLVluWFVthFhtprYB6SLrb3SoyY1x5xIM5RA3QdmvqUJNoAFGkVZ4QE3N9Sv zom/NNmUFXna23FwNdgZioHikE3E4XQK8JcY+jDRyJHoyyo+LrNfC6smI6aKqikwN6ma gyLA== MIME-Version: 1.0 Received: by 10.50.185.228 with SMTP id ff4mr4638220igc.17.1332113013533; Sun, 18 Mar 2012 16:23:33 -0700 (PDT) Sender: rmh.aybabtu@gmail.com Received: by 10.43.130.201 with HTTP; Sun, 18 Mar 2012 16:23:33 -0700 (PDT) In-Reply-To: <20120312121852.P1122@besplex.bde.org> References: <20120312121852.P1122@besplex.bde.org> Date: Mon, 19 Mar 2012 00:23:33 +0100 X-Google-Sender-Auth: KBEs9KzAp96qR-hvEo4t9gAUAOA Message-ID: From: Robert Millan To: Bruce Evans Content-Type: multipart/mixed; boundary=14dae9340ccbf8ecd304bb8cbad3 Cc: Adrian Chadd , freebsd-arch@freebsd.org Subject: Re: [PATCH] Add compatibility X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Mar 2012 23:23:34 -0000 --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 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 SW5kZXg6IHN5cy9pMzg2L2luY2x1ZGUvY3B1ZnVuYy5oCj09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHN5cy9pMzg2 L2luY2x1ZGUvY3B1ZnVuYy5oCShyZXZpc2lvbiAyMzMwOTUpCisrKyBzeXMva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