From owner-freebsd-arch@FreeBSD.ORG Tue Jun 18 19:17:18 2013 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D19D5F52 for ; Tue, 18 Jun 2013 19:17:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-x231.google.com (mail-ie0-x231.google.com [IPv6:2607:f8b0:4001:c03::231]) by mx1.freebsd.org (Postfix) with ESMTP id A19361E80 for ; Tue, 18 Jun 2013 19:17:18 +0000 (UTC) Received: by mail-ie0-f177.google.com with SMTP id aq17so11108055iec.22 for ; Tue, 18 Jun 2013 12:17:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=XjfINV4cJeL8hKFqMQJOwsqG2VVDzTnB04FuQk0RF3M=; b=DQUDdwFqkKPa0L/Km4Uuqq9szSbJMVbfhr3ex++T4ZfgWjM2Aou9zIhCHkeNFkDJhI GjLXBkX4Z860aH5qBfFsqWHtEeDgTjTFt/qQUoTlQDHk/GYnrHGunHHpAteuirkd49Vv NGdjDZP24UZfS1GzV5+E8usfApJyz1Q+TXC24zciypKiYB0UPMjSxIDlVQz6At/IdHz1 TxxGFS8idd3q0J8I1ZNnfL/bd3+ALh1bV96Y+tvWk+uMlIzR6od9I/BTOT+EBU+afukr 0XX/PxZgz8B3y1cNzTEPY8wGAI3f6IuaZ5ifxNiUPoO9Vb9FYY9VyuE0LuTWey7QXcZ0 zMJQ== X-Received: by 10.50.85.114 with SMTP id g18mr8314574igz.14.1371583038328; Tue, 18 Jun 2013 12:17:18 -0700 (PDT) Received: from [10.0.0.53] (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id fu2sm2381630igb.3.2013.06.18.12.17.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Jun 2013 12:17:17 -0700 (PDT) Sender: Warner Losh Subject: Re: Bus space routines Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <51C0AC01.8070007@FreeBSD.org> Date: Tue, 18 Jun 2013 13:17:13 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <1AF8EDA9-3403-49F2-B16F-B324084908FD@bsdimp.com> References: <51C0345E.4000309@freebsd.org> <51C0AC01.8070007@FreeBSD.org> To: Jung-uk Kim X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQmqRzA3Vm4yJjQ87WN+M0K+G5q+7C7sxwdhcTW4EzvPGDY6Bm2BDkPD69zegnGVjq5S5idq Cc: arch@freebsd.org, Niclas Zeising , Robert Millan X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jun 2013 19:17:18 -0000 On Jun 18, 2013, at 12:50 PM, Jung-uk Kim wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > On 2013-06-18 06:56:15 -0400, Robert Millan wrote: >> I think the BSD world did the right thing by introducing new=20 >> semantics. Plus they're also more portable (on the hardware >> sense), have a look, e.g.: > ... >> So why not just use those? It seems very natural to me that if you=20 >> have something which is unambigous and reliable, you use this >> instead of something else which is prone to nasty errors. >=20 > bus_space(9!) is KPI and it must not be used on userland. Actually, > it only works on X86 by pure luck, e.g., bus_space_tag_t is an > integral type, it has very simple instructions to directly access I/O > space, etc. There's nothing preventing a bus_space implementation in user space. = It's just that we don't have one yet, except on x86 where it works by = luck. On most architectures other than x86, however, it would likely be tricky = to implement. Warner