From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 12 19:45:14 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3761106566B for ; Sun, 12 Jul 2009 19:45:14 +0000 (UTC) (envelope-from hdante@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.226]) by mx1.freebsd.org (Postfix) with ESMTP id 7BDBC8FC1A for ; Sun, 12 Jul 2009 19:45:14 +0000 (UTC) (envelope-from hdante@gmail.com) Received: by rv-out-0506.google.com with SMTP id f9so556323rvb.43 for ; Sun, 12 Jul 2009 12:45:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=bdrzYEr0wcItOmKfHNwjWb6G6n9kT/7IZCFqFXZaUgA=; b=VIq01yla+MliiW44djbdu3yk/btcLcYbuvzRcOLQ4zRTPWfvnil9y7MrtPhgEiu4De 3xeGO32j5BUtD4b/oSVd5FOTOq8jWWwHFyp975IDQb/eBn69PmWMEzNlmHqf8mjOiRz0 fZScznP2RRFUhEuOaWjhdVwIQnY1L2GSF/F4M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=teYzE1SKl73StSuDkha29BkG9ndDY9PATWXKqMN3Nc8+dyhWodgFfTTtBIKVoduclx +voVsVSUto0oBfnIesPWGHDfjeZB5yM5/Gm7KtsSthQGz0Rpzsk7jY0EfE29p/SdltAB oamLN0Jmpxi+fjN0EJjnwBOcxIJ+IxmJz6YOM= MIME-Version: 1.0 Received: by 10.140.170.12 with SMTP id s12mr2220601rve.278.1247426418027; Sun, 12 Jul 2009 12:20:18 -0700 (PDT) Date: Sun, 12 Jul 2009 16:20:18 -0300 Message-ID: From: Henrique Almeida To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Help on relicensing derived code X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 19:45:14 -0000 Hello, I have a doubt about licensing, please refer to the correct mailing list if I've sent to the wrong one. I need to write an "errno.h" with constant values used by the FreeBSD kernel. My project uses exclusively the 2 clause BSD license. I expected to copy those values from FreeBSD errno.h. However, FreeBSD errno.h has 3 clauses. I'm a total newbie in licensing procedures so, it's not clear what to do. - Relicense the code as a 2 license BSD, because it's a derived work (prefered choice) - If the above is not allowed, ask the original authors of errno.h to provide an alternative 2 clause BSD license. Which choice is legally correct ? -- Henrique Dante de Almeida hdante@gmail.com From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 12 20:50:14 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2B4F106566B; Sun, 12 Jul 2009 20:50:14 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojteks.tensor.gdynia.pl (wojteks.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id F286E8FC18; Sun, 12 Jul 2009 20:50:13 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::2]) by wojteks.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id n6CKov4X031065; Sun, 12 Jul 2009 22:50:57 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id n6CKosQw016063; Sun, 12 Jul 2009 22:50:54 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3/Submit) with ESMTP id n6CKos5l016060; Sun, 12 Jul 2009 22:50:54 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Sun, 12 Jul 2009 22:50:54 +0200 (CEST) From: Wojciech Puchar To: Robert Watson In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@FreeBSD.org Subject: Re: What's changed between 7.1 and 7.2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 20:50:15 -0000 >> i'm using glabel only to avoid mess about what drive is connected to what >> SATA port. > > This is effectively debugging output that slipped into the release and > shouldn't have. I believe it's now removed in 8.x, I'm not sure it's been > MFC'd to 7.x yet. The output can be entirely ignored and does not reflect a > problem, just state changes resulting from a volume becoming visible to geom, > and then the label name being removed following mount. > just commented it out from source ;) thanks From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 13 04:24:55 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A76761065672 for ; Mon, 13 Jul 2009 04:24:55 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from mail-fx0-f224.google.com (mail-fx0-f224.google.com [209.85.220.224]) by mx1.freebsd.org (Postfix) with ESMTP id 38A728FC1E for ; Mon, 13 Jul 2009 04:24:54 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: by fxm24 with SMTP id 24so1653662fxm.43 for ; Sun, 12 Jul 2009 21:24:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=i/tZ0aGYrUO0ZxknECK2rbC6/b/G9wsYAti2m1rGrIM=; b=woVO75cPjZGX7lR7VYb/oYl5vqpMclIa3rMdZjiHxnwYf2lDZc3EAr9k0SOWe+g4Yz yBuqhD0u0nmA9+2Oe6wHK46dFrjzW+mbdZnbVs2xPV7rgwilJLn9iLkOaxv/NIrZTlSf tKQLmtlkixiV1ZwCEis2DhnBm0bKTq8UjV4GQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=lakkc2q6q92yi+ak7buJ5kY+7zRMKZBFRZ/qQMWuFnYLzlqAeMj2mEDzfesLqONbY1 vnPF4FYKf9YjTt9eAG40vMYfYkaapCtDklXznfPYgONcgdSt/oDLM81lpgsBAnOXmWzZ ll73TmWHE5jof9r0bAJqoZXYOShZJw9qqWvBI= MIME-Version: 1.0 Received: by 10.239.164.6 with SMTP id r6mr398288hbd.104.1247459094198; Sun, 12 Jul 2009 21:24:54 -0700 (PDT) In-Reply-To: References: Date: Mon, 13 Jul 2009 01:24:54 -0300 Message-ID: From: "Carlos A. M. dos Santos" To: Henrique Almeida Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Help on relicensing derived code X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 04:24:56 -0000 On Sun, Jul 12, 2009 at 4:20 PM, Henrique Almeida wrote: > I need to write an "errno.h" with constant values used by the FreeBSD > kernel. My project uses exclusively the 2 clause BSD license. I > expected to copy those values from FreeBSD errno.h. However, FreeBSD > errno.h has 3 clauses.[...] Do you have any particular reason to refuse the current 3-clause license? >[...] I'm a total newbie in licensing procedures so, > it's not clear what to do. > > - Relicense the code as a 2 license BSD, because it's a derived work > (prefered choice) You can't do that. The copyright owners are The Regents of the University of California and UNIX System Laboratories (now Novell). Changing the license without their permission would be legally considered theft. > - If the above is not allowed, ask the original authors of errno.h to > provide an alternative 2 clause BSD license. You must ask the copyright owners, UC and Novell. I don't believe you will have success any time soon, however. > Which choice is legally correct ? The second one, but I strongly advise you to adopt the file as is. The license is already fairly liberal. -- My preferred quotation of Robert Louis Stevenson is "You cannot make an omelette without breaking eggs". Not because I like the omelettes, but because I like the sound of eggs being broken. From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 13 09:41:03 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7920D106566B for ; Mon, 13 Jul 2009 09:41:03 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from mail.embedded-brains.de (host-82-135-62-35.customer.m-online.net [82.135.62.35]) by mx1.freebsd.org (Postfix) with ESMTP id 2E5AA8FC15 for ; Mon, 13 Jul 2009 09:41:03 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: by mail.embedded-brains.de (Postfix, from userid 65534) id C8C7A65F2E1; Mon, 13 Jul 2009 11:23:24 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on fidibus X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from [192.168.96.31] (eb0011.eb.z [192.168.96.31]) by mail.embedded-brains.de (Postfix) with ESMTP id E54466F8249 for ; Mon, 13 Jul 2009 11:23:23 +0200 (CEST) Message-ID: <4A5AFD0B.2060207@embedded-brains.de> Date: Mon, 13 Jul 2009 11:23:23 +0200 From: Sebastian Huber User-Agent: Thunderbird 2.0.0.19 (X11/20081227) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Subject: Return type of xpt_bus_register() and xpt_bus_deregister() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 09:41:03 -0000 Hi, why have the functions xpt_bus_register() and xpt_bus_unregister() a return value type of int32_t? For me it is not clear how the supposed return value should look like. They return a mixture of cam_status and CAM_SUCCESS (this one equals CAM_REQ_INPROG). Have a nice day! -- Sebastian Huber, Embedded Brains GmbH Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany Phone : +49 89 18 90 80 79-6 Fax : +49 89 18 90 80 79-9 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 13 12:57:44 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DED71065711 for ; Mon, 13 Jul 2009 12:57:44 +0000 (UTC) (envelope-from hdante@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.233]) by mx1.freebsd.org (Postfix) with ESMTP id 649608FC13 for ; Mon, 13 Jul 2009 12:57:44 +0000 (UTC) (envelope-from hdante@gmail.com) Received: by rv-out-0506.google.com with SMTP id f9so690652rvb.43 for ; Mon, 13 Jul 2009 05:57:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=4EbMXFPDGHsQCGRpmezBowM7FGMLpBq+zTPUGEsnFC4=; b=LwGxTf3Lta4nMgDn95PJCksSPzQNJpd/74eM7B5fJ3Wx4hSs3InkMPk3BQQz2H35Cd NnK4f8RYOBdpBvWeYJuK35H/3JG7tp/kM0gINoNCVaULo3lF1BHlS+apdpfMU26PaHIA cY+EBB6zQfO2onnP5LwGWxoKCE4giHfQhFsFw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=V7RZKbFnGKkQhTV/OdLL4Kjnz1RSLyzGfF03rukygkt5r3LAl4mYZovxPDhG5Zzjk4 Di8H1ldmArfAwcTi0CnG/OfG+fTj330gt6BqcTCdppc+USmT79gb6hRlACyP0unIJd5o Ajnncc67ljTlTgvo8xM4MOFGpngYr1wmoIpYg= MIME-Version: 1.0 Received: by 10.140.143.9 with SMTP id q9mr2841321rvd.198.1247489863546; Mon, 13 Jul 2009 05:57:43 -0700 (PDT) In-Reply-To: References: Date: Mon, 13 Jul 2009 09:57:43 -0300 Message-ID: From: Henrique Almeida To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Fwd: Help on relicensing derived code X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 12:57:50 -0000 ---------- Forwarded message ---------- From: Henrique Almeida Date: 2009/7/13 Subject: Re: Help on relicensing derived code To: "Carlos A. M. dos Santos" 2009/7/13 Carlos A. M. dos Santos : > On Sun, Jul 12, 2009 at 4:20 PM, Henrique Almeida wrote= : > >> =C2=A0I need to write an "errno.h" with constant values used by the Free= BSD >> kernel. My project uses exclusively the 2 clause BSD license. I >> expected to copy those values from FreeBSD errno.h. However, FreeBSD >> errno.h has 3 clauses.[...] > > Do you have any particular reason to refuse the current 3-clause license? =C2=A0Yes, I've decided to choose uniform licensing for the whole project. I think it will be better for users this way. I'll try to stick with that unless completelly impossible. > >>[...] I'm a total newbie in licensing procedures so, >> it's not clear what to do. >> >> =C2=A0- Relicense the code as a 2 license BSD, because it's a derived wo= rk >> (prefered choice) > > You can't do that. The copyright owners are The Regents of the > University of California and UNIX System Laboratories (now Novell). > Changing the license without their permission would be legally > considered theft. =C2=A0Notice that I won't relicense the original code. I only need to relicense the derived work (my own version of errno.h), as described in the copyright law section of the following link: =C2=A0http://www.openbsd.org/policy.html =C2=A0Maybe we could find a lawyer to explain that. :-/ > >> =C2=A0- If the above is not allowed, ask the original authors of errno.h= to >> provide an alternative 2 clause BSD license. > > You must ask the copyright owners, UC and Novell. I don't believe you > will have success any time soon, however. > >> =C2=A0Which choice is legally correct ? > > The second one, but I strongly advise you to adopt the file as is. The > license is already fairly liberal. =C2=A0Please answer again, given the comment above. :-) I still have hope I can use a 2 clause license. > > -- > My preferred quotation of Robert Louis Stevenson is "You cannot > make an omelette without breaking eggs". Not because I like the > omelettes, but because I like the sound of eggs being broken. > -- =C2=A0Henrique Dante de Almeida =C2=A0hdante@gmail.com --=20 Henrique Dante de Almeida hdante@gmail.com From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 13 13:23:54 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 161211065670 for ; Mon, 13 Jul 2009 13:23:53 +0000 (UTC) (envelope-from hdante@gmail.com) Received: from mail-px0-f200.google.com (mail-px0-f200.google.com [209.85.216.200]) by mx1.freebsd.org (Postfix) with ESMTP id A6E658FC12 for ; Mon, 13 Jul 2009 13:23:53 +0000 (UTC) (envelope-from hdante@gmail.com) Received: by pxi38 with SMTP id 38so61958pxi.3 for ; Mon, 13 Jul 2009 06:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=PnXZV5v4JRCWWlrhYtEmOyo7hWunkSEI7uVdDHt/dyE=; b=Nzm3uk6UVmCjb+cZwt0RWWczoPiioOLpnzwefs8ZoRtckGj0Q7xbm+VtDcCtzfVopl wia00360dtkTAr9WqqwbMR/rT5ScTilafojQys0Q8j+R9Hffzqg+waQU9X5fGiSCnJ3Y HG2vdIEyXO7reQj8LDmBXdUUFb6sxRcooOe34= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=pcIkWtg8Y4uID9EOyWcwFvMXiUR86t9QKJF1ojQQyllhXfgvw4qS9uhjWh5Ec5LhWI C00M5v5z1alO9qTYH4mhv5rimRJUzv2FfCnyZ4RuTiJQuZHhENLmZ3/8+11oSN0PesCR zv8EX9dY3k3Q/DVPDDLsL8mDZLXyugg3l9/9M= MIME-Version: 1.0 Received: by 10.141.26.11 with SMTP id d11mr2687155rvj.96.1247491433341; Mon, 13 Jul 2009 06:23:53 -0700 (PDT) In-Reply-To: References: Date: Mon, 13 Jul 2009 10:23:53 -0300 Message-ID: From: Henrique Almeida To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: Help on relicensing derived code X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 13:23:54 -0000 Good news, in Android errno, there's a statement that suggests that constant values are not copyrightable. :-) http://android.git.kernel.org/?p=3Dplatform/bionic.git;a=3Dblob;f=3Dlibc/ke= rnel/common/asm-generic/errno-base.h;h=3D2fb4a336454e47f8bf0764fd253a78be63= 3f9652;hb=3DHEAD /*************************************************************************= *** **************************************************************************= ** *** *** This header was automatically generated from a Linux kernel header *** of the same name, to make information necessary for userspace to *** call into the kernel available to libc. It contains only constants, *** structures, and macros generated from the original header, and thus, *** contains no copyrightable information. *** **************************************************************************= ** **************************************************************************= **/ But does this mean I can copy those values without using an automated procedure ? Damned licensing hell. 2009/7/13 Henrique Almeida : > ---------- Forwarded message ---------- > From: Henrique Almeida > Date: 2009/7/13 > Subject: Re: Help on relicensing derived code > To: "Carlos A. M. dos Santos" > > > 2009/7/13 Carlos A. M. dos Santos : >> On Sun, Jul 12, 2009 at 4:20 PM, Henrique Almeida wrot= e: >> >>> =C2=A0I need to write an "errno.h" with constant values used by the Fre= eBSD >>> kernel. My project uses exclusively the 2 clause BSD license. I >>> expected to copy those values from FreeBSD errno.h. However, FreeBSD >>> errno.h has 3 clauses.[...] >> >> Do you have any particular reason to refuse the current 3-clause license= ? > > =C2=A0Yes, I've decided to choose uniform licensing for the whole project= . > I think it will be better for users this way. I'll try to stick with > that unless completelly impossible. > >> >>>[...] I'm a total newbie in licensing procedures so, >>> it's not clear what to do. >>> >>> =C2=A0- Relicense the code as a 2 license BSD, because it's a derived w= ork >>> (prefered choice) >> >> You can't do that. The copyright owners are The Regents of the >> University of California and UNIX System Laboratories (now Novell). >> Changing the license without their permission would be legally >> considered theft. > > =C2=A0Notice that I won't relicense the original code. I only need to > relicense the derived work (my own version of errno.h), as described > in the copyright law section of the following link: > > =C2=A0http://www.openbsd.org/policy.html > > =C2=A0Maybe we could find a lawyer to explain that. :-/ > >> >>> =C2=A0- If the above is not allowed, ask the original authors of errno.= h to >>> provide an alternative 2 clause BSD license. >> >> You must ask the copyright owners, UC and Novell. I don't believe you >> will have success any time soon, however. >> >>> =C2=A0Which choice is legally correct ? >> >> The second one, but I strongly advise you to adopt the file as is. The >> license is already fairly liberal. > > =C2=A0Please answer again, given the comment above. :-) I still have hope= I > can use a 2 clause license. > >> >> -- >> My preferred quotation of Robert Louis Stevenson is "You cannot >> make an omelette without breaking eggs". Not because I like the >> omelettes, but because I like the sound of eggs being broken. >> > > > > -- > =C2=A0Henrique Dante de Almeida > =C2=A0hdante@gmail.com > > > > -- > =C2=A0Henrique Dante de Almeida > =C2=A0hdante@gmail.com > --=20 Henrique Dante de Almeida hdante@gmail.com From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 13 13:26:31 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB62410656D1 for ; Mon, 13 Jul 2009 13:26:31 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from mail-fx0-f224.google.com (mail-fx0-f224.google.com [209.85.220.224]) by mx1.freebsd.org (Postfix) with ESMTP id 6B22A8FC1D for ; Mon, 13 Jul 2009 13:26:31 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: by fxm24 with SMTP id 24so1869698fxm.43 for ; Mon, 13 Jul 2009 06:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=21zzT/x/n8jvZg91bD4+0ce0MoYIJb+/Va0Fo6o0Quk=; b=xd+NdgU8Chyft1um9vU0qxMxaIO4gDojVoHtTdhMxrK2fpi9rWz8DLBSZk639mY7o6 x/ooy4X+3Ck2Kuq+N9752HBkm5yBKKIr5ACg4QvPInNPTn5+7clIhw2NSUh09JTGXDFy 5xQs6VKNZaSClumzGzaIrx4LpyB/neK9WcimY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Tsf5kcb4IlWwq7J3WF4MPRM7wPdeu6vPzylZ8xFwxrWJDf15+/k8eITUrZH63GwCqB NS02UvIcvq9woQyPFLycwoeJl6sRMLhGzh3Dwlqf0DZoi8tZnDf93J6kSb1thoqYgLr0 SyPXB2B/YruigTKjUQhjZKThgcRtEL/1M0Mm0= MIME-Version: 1.0 Received: by 10.239.169.80 with SMTP id n16mr454924hbe.167.1247491590469; Mon, 13 Jul 2009 06:26:30 -0700 (PDT) In-Reply-To: References: Date: Mon, 13 Jul 2009 10:26:30 -0300 Message-ID: From: "Carlos A. M. dos Santos" To: Henrique Almeida Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Help on relicensing derived code X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 13:26:32 -0000 On Mon, Jul 13, 2009 at 9:57 AM, Henrique Almeida wrote: > 2009/7/13 Carlos A. M. dos Santos : >> On Sun, Jul 12, 2009 at 4:20 PM, Henrique Almeida wrot= e: >>> =A0I need to write an "errno.h" with constant values used by the FreeBS= D >>> kernel. My project uses exclusively the 2 clause BSD license. I >>> expected to copy those values from FreeBSD errno.h. However, FreeBSD >>> errno.h has 3 clauses.[...] >> >> Do you have any particular reason to refuse the current 3-clause license= ? > > =A0Yes, I've decided to choose uniform licensing for the whole project. > I think it will be better for users this way. I still don't see the point. The advertising clause was removed ten years ago and the remaining 3 clauses impose just a few restrictions. > I'll try to stick with that unless completelly impossible. You can choose any license for code owned by you. You can also relicense BSD-licensed code, but you still must either obey the original license or obtain written permission to change the terms [from the original copyright owner, University of Californa and USL/Novell, not the FreeBSD project]. Take a look at http://www.groklaw.net/articlebasic.php?story=3D20070114093427179 > Notice that I won't relicense the original code. I only need to > relicense the derived work (my own version of errno.h), as described > in the copyright law section of the following link: > > =A0http://www.openbsd.org/policy.html If you are writing your own version of errno.h then it is not a derived work. In this particular case, errno.h is just a list of error codes so you can copy/paste the numbers and mnemonics from the output of "man 2 intro". That would be considered "compatible code", not derived work. Please refer to the last two paragraphs of the "Pretrial" section at http://en.wikipedia.org/wiki/USL_v._BSDi#Pretrial > =A0Maybe we could find a lawyer to explain that. :-/ May be you could just accept the current license and avoid the pain. ;-) --=20 My preferred quotation of Robert Louis Stevenson is "You cannot make an omelette without breaking eggs". Not because I like the omelettes, but because I like the sound of eggs being broken. From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 13 13:39:56 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BCFF1065698 for ; Mon, 13 Jul 2009 13:39:56 +0000 (UTC) (envelope-from hdante@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.228]) by mx1.freebsd.org (Postfix) with ESMTP id 0CFC08FC3C for ; Mon, 13 Jul 2009 13:39:55 +0000 (UTC) (envelope-from hdante@gmail.com) Received: by rv-out-0506.google.com with SMTP id f9so697098rvb.43 for ; Mon, 13 Jul 2009 06:39:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=gJIkJ2jha/CsPwJE2JYGad7m/AfkJ/5rrrYCje14BTE=; b=cIzra3hWftwtitt2nYc/M/tduPeQ2VQtBgO/3aFoqeLM1SmEhw+brHivqFwfN5Axzm vJ8vz02D0J8drxurCkqRD/1DoEJiFolw79ys8BtNvqo5I5j8ysmf8Y9PR+Vwz4uCRSsc 96IjL7fYRmNRGhD79Dvv/ZgSozYB0xnTj796M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=uUJzPk+gSWyqBh6OF7It5ykyAL0CW8K4oUV1JeNkf0MfosTq4w/f+ybp7m8sWjbRF+ kVXF/N+Y+xMbqUYVt/EaNVyagHVqAQ7crbaHRGgD4KJrWpGbH1nN4pCkKcijBg5hJ6Am cGW9HEdK2VuSGei+FCKJlvoBKMYJhdTFnSvFU= MIME-Version: 1.0 Received: by 10.140.201.21 with SMTP id y21mr2832540rvf.89.1247492395458; Mon, 13 Jul 2009 06:39:55 -0700 (PDT) In-Reply-To: References: Date: Mon, 13 Jul 2009 10:39:55 -0300 Message-ID: From: Henrique Almeida To: "Carlos A. M. dos Santos" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Help on relicensing derived code X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 13:39:56 -0000 2009/7/13 Carlos A. M. dos Santos : > If you are writing your own version of errno.h then it is not a > derived work. In this particular case, errno.h is just a list of error > codes so you can copy/paste the numbers and mnemonics from the output > of "man 2 intro". That would be considered "compatible code", not Perfect. I told you I would be able to use uniform licensing. ;-) -- Henrique Dante de Almeida hdante@gmail.com From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 13 14:32:41 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8BF3106564A for ; Mon, 13 Jul 2009 14:32:41 +0000 (UTC) (envelope-from nkoch@demig.de) Received: from www61.your-server.de (www61.your-server.de [213.133.104.61]) by mx1.freebsd.org (Postfix) with ESMTP id A4E508FC13 for ; Mon, 13 Jul 2009 14:32:41 +0000 (UTC) (envelope-from nkoch@demig.de) Received: from [217.7.243.216] (helo=firewall.demig.intra) by www61.your-server.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1MQMAD-00056D-C9 for freebsd-hackers@freebsd.org; Mon, 13 Jul 2009 16:05:53 +0200 Received: from [192.168.148.72] (ws-pr-3.demig.intra [192.168.148.72]) by firewall.demig.intra (8.14.3/8.14.0) with ESMTP id n6DE5Gmf091520 for ; Mon, 13 Jul 2009 16:05:16 +0200 (CEST) (envelope-from nkoch@demig.de) Message-ID: <4A5B3F1B.3040207@demig.de> Date: Mon, 13 Jul 2009 14:05:15 +0000 From: Norbert Koch Organization: demig Prozessautomatisierung GmbH User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 192.168.148.235 X-Authenticated-Sender: webmaster@demig.de X-Virus-Scanned: Clear (ClamAV 0.95.1/9559/Mon Jul 13 13:00:11 2009) Subject: bus device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 14:32:42 -0000 Hello. I just started to write a device driver for a multi-function pci card. This card replaces a number of independant isa hardware devices. This pci card contains memory, i/o and interrupt sources. I want my device driver to serve as a bus driver between the pci driver and the specific device drivers. Do I need more than the following (see below)? Do I have to do any bookkeeping for allocated resources? /*****************************************/ int mypci_probe (device_t dev) { if (pci_get_vendor (dev) == MYVENDOR && pci_get_devid (dev) == MYDEVID) { device_set_desc (dev, "MYPCI bus"); return 0; }; return ENXIO; } static devclass_t mypci_devclass; /* stolen from ISA/PCI brigde */ static device_method_t mypci_methods[] = { /* device */ DEVMETHOD (device_probe, mypci_probe), DEVMETHOD (device_attach, bus_generic_attach), DEVMETHOD (device_detach, bus_generic_detach), /* bus */ DEVMETHOD (bus_print_child, bus_generic_print_child), DEVMETHOD (bus_alloc_resource, bus_generic_alloc_resource), DEVMETHOD (bus_release_resource, bus_generic_release_resource), DEVMETHOD (bus_activate_resource, bus_generic_activate_resource), DEVMETHOD (bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD (bus_setup_intr, bus_generic_setup_intr), DEVMETHOD (bus_teardown_intr, bus_generic_teardown_intr), {0, 0} }; static driver_t mypci_driver = { "mypci", mypci_methods, 0 }; /*****************************************/ Thank you for any help. Norbert Koch From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 13 18:44:43 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7236B106567D; Mon, 13 Jul 2009 18:44:43 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 42C6D8FC20; Mon, 13 Jul 2009 18:44:43 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id E5A2346B7E; Mon, 13 Jul 2009 14:44:42 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 03ECF8A096; Mon, 13 Jul 2009 14:44:42 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 13 Jul 2009 14:17:53 -0400 User-Agent: KMail/1.9.7 References: <4A4740B8.8090205@embedded-brains.de> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907131417.53876.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 13 Jul 2009 14:44:42 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Sebastian Huber , hackers@freebsd.org, Robert Watson Subject: Re: callout(9) and Giant lock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 18:44:43 -0000 On Sunday 28 June 2009 11:57:05 am Robert Watson wrote: > > On Sun, 28 Jun 2009, Sebastian Huber wrote: > > > suppose that a certain time event triggered several callout functions. What > > happens if the first of these callout functions blocks on the Giant lock? > > Does this delay all further callout functions until the Giant lock is > > available for the first callout function? What happens if one of the callout > > function blocks forever? Does this deadlock the system? > > Callouts are marked as MPSAFE or non-MPSAFE when registered. If non-MPSAFE, > we will acquire Giant automatically for the callout, but I believe we'll also > try and sort non-MPSAFE callouts behind MPSAFE ones in execution order to > minimize latency for MPSAFE callouts. Most callouts acquire locks of some > sort, and stalling any callout indefinitely will stall the entire callout > thread indefinitely, which in turn could lead to a variety of odd behaviors > and potentially (although not necessarily) deadlock. FWIW, we do not actually sort the callouts in this manner, so all callouts will be blocked until Giant is acquired. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 13 18:44:43 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7236B106567D; Mon, 13 Jul 2009 18:44:43 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 42C6D8FC20; Mon, 13 Jul 2009 18:44:43 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id E5A2346B7E; Mon, 13 Jul 2009 14:44:42 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 03ECF8A096; Mon, 13 Jul 2009 14:44:42 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 13 Jul 2009 14:17:53 -0400 User-Agent: KMail/1.9.7 References: <4A4740B8.8090205@embedded-brains.de> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907131417.53876.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 13 Jul 2009 14:44:42 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Sebastian Huber , hackers@freebsd.org, Robert Watson Subject: Re: callout(9) and Giant lock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 18:44:43 -0000 On Sunday 28 June 2009 11:57:05 am Robert Watson wrote: > > On Sun, 28 Jun 2009, Sebastian Huber wrote: > > > suppose that a certain time event triggered several callout functions. What > > happens if the first of these callout functions blocks on the Giant lock? > > Does this delay all further callout functions until the Giant lock is > > available for the first callout function? What happens if one of the callout > > function blocks forever? Does this deadlock the system? > > Callouts are marked as MPSAFE or non-MPSAFE when registered. If non-MPSAFE, > we will acquire Giant automatically for the callout, but I believe we'll also > try and sort non-MPSAFE callouts behind MPSAFE ones in execution order to > minimize latency for MPSAFE callouts. Most callouts acquire locks of some > sort, and stalling any callout indefinitely will stall the entire callout > thread indefinitely, which in turn could lead to a variety of odd behaviors > and potentially (although not necessarily) deadlock. FWIW, we do not actually sort the callouts in this manner, so all callouts will be blocked until Giant is acquired. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 13 18:44:44 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB6C9106566B; Mon, 13 Jul 2009 18:44:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8C2718FC23; Mon, 13 Jul 2009 18:44:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 3CF9746B85; Mon, 13 Jul 2009 14:44:44 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 2AFD38A097; Mon, 13 Jul 2009 14:44:43 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 13 Jul 2009 14:28:08 -0400 User-Agent: KMail/1.9.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907131428.08923.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 13 Jul 2009 14:44:43 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Nate Eldredge , Alan Cox , Alexander Best Subject: Re: mmap/munmap with zero length X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 18:44:45 -0000 On Sunday 05 July 2009 3:32:25 am Alexander Best wrote: > so mmap differs from the POSIX recommendation right. the malloc.conf option > seems more like a workaround/hack. imo it's confusing to have mmap und munmap > deal differently with len=0. being able to succesfully alocate memory which > cannot be removed doesn't seem logical to me. This should fix it: --- //depot/user/jhb/acpipci/vm/vm_mmap.c +++ /home/jhb/work/p4/acpipci/vm/vm_mmap.c @@ -229,7 +229,7 @@ fp = NULL; /* make sure mapping fits into numeric range etc */ - if ((ssize_t) uap->len < 0 || + if ((ssize_t) uap->len <= 0 || ((flags & MAP_ANON) && uap->fd != -1)) return (EINVAL); -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 13 18:44:45 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8FD9106564A for ; Mon, 13 Jul 2009 18:44:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id BCB008FC19 for ; Mon, 13 Jul 2009 18:44:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 6B5B246B6C; Mon, 13 Jul 2009 14:44:45 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 5BD188A094; Mon, 13 Jul 2009 14:44:44 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 13 Jul 2009 14:35:30 -0400 User-Agent: KMail/1.9.7 References: <4A5B3F1B.3040207@demig.de> In-Reply-To: <4A5B3F1B.3040207@demig.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907131435.30452.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 13 Jul 2009 14:44:44 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Norbert Koch Subject: Re: bus device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 18:44:46 -0000 On Monday 13 July 2009 10:05:15 am Norbert Koch wrote: > Hello. > > I just started to write a device > driver for a multi-function pci card. > This card replaces a number of > independant isa hardware devices. > This pci card contains memory, i/o > and interrupt sources. > I want my device driver to > serve as a bus driver between > the pci driver and the specific > device drivers. > > Do I need more than the following (see below)? > Do I have to do any bookkeeping for allocated resources? How do the child devices receive resources? Do they suballocate regions from BARs in the PCI device or is your device a subtractive bridge that will forward requests for ISA ranges and your devices all use ISA ranges? -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 13 18:49:27 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D82F10656C6; Mon, 13 Jul 2009 18:49:27 +0000 (UTC) (envelope-from rwatson@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E980A8FC21; Mon, 13 Jul 2009 18:49:26 +0000 (UTC) (envelope-from rwatson@freebsd.org) Received: from [192.168.2.101] (host86-145-8-156.range86-145.btcentralplus.com [86.145.8.156]) by cyrus.watson.org (Postfix) with ESMTPSA id 09DF546B81; Mon, 13 Jul 2009 14:49:25 -0400 (EDT) Message-Id: <732D77F4-6D18-4724-A76C-FB38B9DAE0F1@freebsd.org> From: "Robert N. M. Watson" To: John Baldwin In-Reply-To: <200907131417.53876.jhb@freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Mon, 13 Jul 2009 19:49:24 +0100 References: <4A4740B8.8090205@embedded-brains.de> <200907131417.53876.jhb@freebsd.org> X-Mailer: Apple Mail (2.935.3) Cc: freebsd-hackers@freebsd.org, Sebastian Huber Subject: Re: callout(9) and Giant lock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 18:49:27 -0000 On 13 Jul 2009, at 19:17, John Baldwin wrote: >> Callouts are marked as MPSAFE or non-MPSAFE when registered. If >> non-MPSAFE, >> we will acquire Giant automatically for the callout, but I believe >> we'll also >> try and sort non-MPSAFE callouts behind MPSAFE ones in execution >> order to >> minimize latency for MPSAFE callouts. Most callouts acquire locks >> of some >> sort, and stalling any callout indefinitely will stall the entire >> callout >> thread indefinitely, which in turn could lead to a variety of odd >> behaviors >> and potentially (although not necessarily) deadlock. > > FWIW, we do not actually sort the callouts in this manner, so all > callouts > will be blocked until Giant is acquired. I must have been remembering a proposed change -- as you say, it's certainly not in kern_timeout.c. However, I'd rather just eliminate support for Giant in callouts in 9.x than try to further facilitate them :-) Robert From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 13 19:26:27 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A090A106566C; Mon, 13 Jul 2009 19:26:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7167D8FC1E; Mon, 13 Jul 2009 19:26:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 1F86046B0D; Mon, 13 Jul 2009 15:26:27 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 25F588A095; Mon, 13 Jul 2009 15:26:26 -0400 (EDT) From: John Baldwin To: "Robert N. M. Watson" Date: Mon, 13 Jul 2009 15:05:04 -0400 User-Agent: KMail/1.9.7 References: <4A4740B8.8090205@embedded-brains.de> <200907131417.53876.jhb@freebsd.org> <732D77F4-6D18-4724-A76C-FB38B9DAE0F1@freebsd.org> In-Reply-To: <732D77F4-6D18-4724-A76C-FB38B9DAE0F1@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907131505.04688.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 13 Jul 2009 15:26:26 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org, Sebastian Huber Subject: Re: callout(9) and Giant lock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 19:26:28 -0000 On Monday 13 July 2009 2:49:24 pm Robert N. M. Watson wrote: > > On 13 Jul 2009, at 19:17, John Baldwin wrote: > > >> Callouts are marked as MPSAFE or non-MPSAFE when registered. If > >> non-MPSAFE, > >> we will acquire Giant automatically for the callout, but I believe > >> we'll also > >> try and sort non-MPSAFE callouts behind MPSAFE ones in execution > >> order to > >> minimize latency for MPSAFE callouts. Most callouts acquire locks > >> of some > >> sort, and stalling any callout indefinitely will stall the entire > >> callout > >> thread indefinitely, which in turn could lead to a variety of odd > >> behaviors > >> and potentially (although not necessarily) deadlock. > > > > FWIW, we do not actually sort the callouts in this manner, so all > > callouts > > will be blocked until Giant is acquired. > > I must have been remembering a proposed change -- as you say, it's > certainly not in kern_timeout.c. However, I'd rather just eliminate > support for Giant in callouts in 9.x than try to further facilitate > them :-) Agreed. :) -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 13 20:05:47 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AB96106564A; Mon, 13 Jul 2009 20:05:47 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from mailrelay003.isp.belgacom.be (mailrelay003.isp.belgacom.be [195.238.6.53]) by mx1.freebsd.org (Postfix) with ESMTP id 62CDB8FC16; Mon, 13 Jul 2009 20:05:45 +0000 (UTC) (envelope-from tijl@ulyssis.org) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar0EAH8pW0pR9Sb4/2dsb2JhbACBUc43hAkF Received: from 248.38-245-81.adsl-dyn.isp.belgacom.be (HELO kalimero.kotnet.org) ([81.245.38.248]) by relay.skynet.be with ESMTP; 13 Jul 2009 21:36:23 +0200 Received: from kalimero.kotnet.org (kalimero.kotnet.org [127.0.0.1]) by kalimero.kotnet.org (8.14.3/8.14.3) with ESMTP id n6DJXq0o007739; Mon, 13 Jul 2009 21:33:52 +0200 (CEST) (envelope-from tijl@ulyssis.org) From: Tijl Coosemans To: freebsd-hackers@freebsd.org Date: Mon, 13 Jul 2009 21:33:51 +0200 User-Agent: KMail/1.9.10 References: <200907131428.08923.jhb@freebsd.org> In-Reply-To: <200907131428.08923.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907132133.52217.tijl@ulyssis.org> Cc: Nate Eldredge , Alan Cox , Alexander Best Subject: Re: mmap/munmap with zero length X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 20:05:47 -0000 On Monday 13 July 2009 20:28:08 John Baldwin wrote: > On Sunday 05 July 2009 3:32:25 am Alexander Best wrote: >> so mmap differs from the POSIX recommendation right. the malloc.conf >> option seems more like a workaround/hack. imo it's confusing to have >> mmap und munmap deal differently with len=0. being able to >> succesfully alocate memory which cannot be removed doesn't seem >> logical to me. > > This should fix it: > > --- //depot/user/jhb/acpipci/vm/vm_mmap.c > +++ /home/jhb/work/p4/acpipci/vm/vm_mmap.c > @@ -229,7 +229,7 @@ > > fp = NULL; > /* make sure mapping fits into numeric range etc */ > - if ((ssize_t) uap->len < 0 || > + if ((ssize_t) uap->len <= 0 || > ((flags & MAP_ANON) && uap->fd != -1)) > return (EINVAL); Why not "uap->len == 0"? Sizes of 2GiB and more (32bit) shouldn't cause an error. From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 13 20:40:46 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08BED1065688; Mon, 13 Jul 2009 20:40:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id CD8DB8FC1C; Mon, 13 Jul 2009 20:40:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 7E8B046B6C; Mon, 13 Jul 2009 16:40:45 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 670CF8A097; Mon, 13 Jul 2009 16:40:44 -0400 (EDT) From: John Baldwin To: Tijl Coosemans Date: Mon, 13 Jul 2009 16:39:09 -0400 User-Agent: KMail/1.9.7 References: <200907131428.08923.jhb@freebsd.org> <200907132133.52217.tijl@ulyssis.org> In-Reply-To: <200907132133.52217.tijl@ulyssis.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907131639.10346.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 13 Jul 2009 16:40:44 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Nate Eldredge , freebsd-hackers@freebsd.org, Alexander Best , Alan Cox Subject: Re: mmap/munmap with zero length X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 20:40:46 -0000 On Monday 13 July 2009 3:33:51 pm Tijl Coosemans wrote: > On Monday 13 July 2009 20:28:08 John Baldwin wrote: > > On Sunday 05 July 2009 3:32:25 am Alexander Best wrote: > >> so mmap differs from the POSIX recommendation right. the malloc.conf > >> option seems more like a workaround/hack. imo it's confusing to have > >> mmap und munmap deal differently with len=0. being able to > >> succesfully alocate memory which cannot be removed doesn't seem > >> logical to me. > > > > This should fix it: > > > > --- //depot/user/jhb/acpipci/vm/vm_mmap.c > > +++ /home/jhb/work/p4/acpipci/vm/vm_mmap.c > > @@ -229,7 +229,7 @@ > > > > fp = NULL; > > /* make sure mapping fits into numeric range etc */ > > - if ((ssize_t) uap->len < 0 || > > + if ((ssize_t) uap->len <= 0 || > > ((flags & MAP_ANON) && uap->fd != -1)) > > return (EINVAL); > > Why not "uap->len == 0"? Sizes of 2GiB and more (32bit) shouldn't cause > an error. I don't actually disagree and know of locally modified versions of FreeBSD that remove this check for precisely that reason. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 14 04:37:20 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E74C0106566C for ; Tue, 14 Jul 2009 04:37:20 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 57F598FC22 for ; Tue, 14 Jul 2009 04:37:20 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (adsl129-38.kln.forthnet.gr [77.49.248.38]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-9) with ESMTP id n6E4NDS5030889 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 14 Jul 2009 07:23:19 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id n6E4NDPL010023 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 14 Jul 2009 07:23:13 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id n6E4NCdT010022; Tue, 14 Jul 2009 07:23:12 +0300 (EEST) (envelope-from keramida@freebsd.org) From: Giorgos Keramidas To: freebsd-hackers@freebsd.org Date: Tue, 14 Jul 2009 07:23:12 +0300 Message-ID: <87d483q4en.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Hellug-MailScanner-ID: n6E4NDS5030889 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.47, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL -0.07, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Subject: can we afford an extra column in iostat? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 04:37:21 -0000 While converting my laptop's main disk to zfs, I noticed iostat output like this (bits copied from here and there): | keramida@kobe:/home/keramida$ iostat -w3 ad0 da0 | tty ad0 da0 cpu | tin tout KB/t tps MB/s KB/t tps MB/s us ni sy in id | 5 2119 36.29 56 2.00 54.95 7 0.35 3 0 8 0 89 | 0 9478 10.90 290 3.09 57.22 12 0.67 42 0 43 0 15 | 012595 1.72 213 0.36 21.36 80 1.66 48 0 48 0 4 | 050042 4.56 715 3.19 11.44 164 1.83 29 0 50 1 20 | 11529568 7.34 443 3.17 16.97 165 2.74 31 0 53 0 16 | 33835534 7.61 211 1.57 7.31 295 2.11 36 0 55 1 9 | 38636874 3.10 186 0.56 6.63 309 2.00 37 0 56 0 7 | 24239726 2.54 196 0.49 6.13 336 2.01 36 0 56 0 8 | 17136654 0.57 192 0.11 7.97 305 2.37 34 0 56 0 9 | 23439020 0.76 195 0.15 7.02 333 2.28 32 0 57 1 11 | 43733189 2.52 192 0.47 6.99 269 1.84 37 0 57 1 5 | 36232178 5.48 193 1.03 6.78 268 1.77 38 0 54 0 8 | 43226266 34.19 228 7.61 6.94 253 1.72 32 0 49 1 19 The default output of iostat, when no disks are specified is a bit wider than this, reaching column 75 here: 1 2 3 4 5 6 7 12345678901234567890123456789012345678901234567890123456789012345678901234567890 --------------------------------------------------------------------------- tty ad0 md0 da0 cpu tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id 6 2315 34.97 58 1.99 6.46 0 0.00 47.41 8 0.37 4 0 8 0 88 But there's still a bit of space before column 80, so can we afford an extra space between tin/tout to make the output look more like this? | $ ./iostat -w2 | tty ad0 md0 da0 cpu | tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id | 7 2570 32.92 62 1.98 6.46 0 0.00 43.44 10 0.41 4 0 9 0 87 | 0 36506 0.99 507 0.49 0.00 0 0.00 20.13 155 3.04 34 0 56 1 9 | 0 16695 0.83 226 0.18 0.00 0 0.00 26.16 97 2.48 35 0 56 0 9 | 0 24158 10.63 428 4.45 0.00 0 0.00 14.44 137 1.93 32 0 51 0 17 | ^C The patch that changes this is quite small: %%% diff -r 0f182a7399e8 usr.sbin/iostat/iostat.c --- a/usr.sbin/iostat/iostat.c Sun Jul 12 09:34:48 2009 +0300 +++ b/usr.sbin/iostat/iostat.c Tue Jul 14 07:20:41 2009 +0300 @@ -586,7 +586,7 @@ } if (xflag == 0 && Tflag > 0) - printf("%4.0Lf%5.0Lf", cur.tk_nin / etime, + printf("%4.0Lf %5.0Lf", cur.tk_nin / etime, cur.tk_nout / etime); devstats(hflag, etime, havelast); @@ -696,7 +696,7 @@ (void)printf("\n"); if (Tflag > 0) - (void)printf(" tin tout"); + (void)printf(" tin tout"); for (i=0, printed = 0;(i < num_devices) && (printed < maxshowdevs);i++){ if ((dev_select[i].selected != 0) @@ -754,7 +754,7 @@ "device r/i w/i kr/i kw/i wait svc_t %%b " ); if (Tflag > 0) - printf("tin tout "); + printf("tin tout "); if (Cflag > 0) printf("us ni sy in id "); printf("\n"); @@ -895,7 +895,7 @@ */ printf("%52s",""); if (Tflag > 0) - printf("%4.0Lf%5.0Lf", cur.tk_nin / etime, + printf("%4.0Lf %5.0Lf", cur.tk_nin / etime, cur.tk_nout / etime); if (Cflag > 0) cpustats(); %%% From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 14 07:09:09 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88855106566B for ; Tue, 14 Jul 2009 07:09:09 +0000 (UTC) (envelope-from nkoch@demig.de) Received: from www61.your-server.de (www61.your-server.de [213.133.104.61]) by mx1.freebsd.org (Postfix) with ESMTP id 190238FC17 for ; Tue, 14 Jul 2009 07:09:08 +0000 (UTC) (envelope-from nkoch@demig.de) Received: from [217.7.243.216] (helo=firewall.demig.intra) by www61.your-server.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1MQc8Q-0007ps-DQ; Tue, 14 Jul 2009 09:09:06 +0200 Received: from [192.168.148.72] (ws-pr-3.demig.intra [192.168.148.72]) by firewall.demig.intra (8.14.3/8.14.0) with ESMTP id n6E78es1006157; Tue, 14 Jul 2009 09:08:40 +0200 (CEST) (envelope-from nkoch@demig.de) Message-ID: <4A5C2EF8.3080208@demig.de> Date: Tue, 14 Jul 2009 07:08:40 +0000 From: Norbert Koch Organization: demig Prozessautomatisierung GmbH User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: John Baldwin References: <4A5B3F1B.3040207@demig.de> <200907131435.30452.jhb@freebsd.org> In-Reply-To: <200907131435.30452.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Scanned-By: MIMEDefang 2.64 on 192.168.148.235 X-Authenticated-Sender: webmaster@demig.de X-Virus-Scanned: Clear (ClamAV 0.95.1/9560/Tue Jul 14 02:13:16 2009) Cc: freebsd-hackers@freebsd.org Subject: Re: bus device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 07:09:09 -0000 John Baldwin schrieb: > On Monday 13 July 2009 10:05:15 am Norbert Koch wrote: > >> Hello. >> >> I just started to write a device >> driver for a multi-function pci card. >> This card replaces a number of >> independant isa hardware devices. >> This pci card contains memory, i/o >> and interrupt sources. >> I want my device driver to >> serve as a bus driver between >> the pci driver and the specific >> device drivers. >> >> Do I need more than the following (see below)? >> Do I have to do any bookkeeping for allocated resources? >> > > How do the child devices receive resources? Do they suballocate regions from > BARs in the PCI device or is your device a subtractive bridge that will > forward requests for ISA ranges and your devices all use ISA ranges? > > I am not quite sure that I understand what you mean. What is the difference? My old device drivers were isa based. We had all our resources in the 15-16M isa hole. So I want to change them to just allocate resources from the pci bus through the bus device driver. I thought it would be sufficient to just forward *_alloc_resource calls directly to the pci driver. Clearly, my drivers will have to know that they are just forwarded through to pci and have to know what sub-resources to allocate. -- Dipl.-Ing. Norbert Koch Entwicklung Prozessregler ***************************************** * demig Prozessautomatisierung GmbH * * * * Anschrift: Haardtstrasse 40 * * D-57076 Siegen * * Registergericht: Siegen HRB 2819 * * Geschaeftsfuehrer: Joachim Herbst, * * Winfried Held * * Telefon: +49 271 772020 * * Telefax: +49 271 74704 * * E-Mail: info@demig.de * * http://www.demig.de * ***************************************** From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 14 14:08:54 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C7CF106566C for ; Tue, 14 Jul 2009 14:08:54 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4EC938FC20 for ; Tue, 14 Jul 2009 14:08:54 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id CB0DB46B5C; Tue, 14 Jul 2009 10:08:53 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id CEE568A098; Tue, 14 Jul 2009 10:08:52 -0400 (EDT) From: John Baldwin To: Norbert Koch Date: Tue, 14 Jul 2009 08:49:51 -0400 User-Agent: KMail/1.9.7 References: <4A5B3F1B.3040207@demig.de> <200907131435.30452.jhb@freebsd.org> <4A5C2EF8.3080208@demig.de> In-Reply-To: <4A5C2EF8.3080208@demig.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200907140849.51702.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 14 Jul 2009 10:08:52 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org Subject: Re: bus device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 14:08:54 -0000 On Tuesday 14 July 2009 3:08:40 am Norbert Koch wrote: >=20 > John Baldwin schrieb: > > On Monday 13 July 2009 10:05:15 am Norbert Koch wrote: > > =20 > >> Hello. > >> > >> I just started to write a device > >> driver for a multi-function pci card. > >> This card replaces a number of > >> independant isa hardware devices. > >> This pci card contains memory, i/o > >> and interrupt sources. > >> I want my device driver to > >> serve as a bus driver between > >> the pci driver and the specific > >> device drivers. > >> > >> Do I need more than the following (see below)? > >> Do I have to do any bookkeeping for allocated resources? > >> =20 > > > > How do the child devices receive resources? Do they suballocate region= s=20 from=20 > > BARs in the PCI device or is your device a subtractive bridge that will= =20 > > forward requests for ISA ranges and your devices all use ISA ranges? > > > > =20 > I am not quite sure that I understand what you mean. What is the differen= ce? > My old device drivers were isa based. We had all our resources in the=20 > 15-16M isa hole. > So I want to change them to just allocate resources from the pci bus=20 > through the bus device driver. > I thought it would be sufficient to just forward *_alloc_resource calls=20 > directly to the pci driver. > Clearly, my drivers will have to know that they are just forwarded=20 > through to pci > and have to know what sub-resources to allocate. =46rom a hardware perspective, how do your devices know which addresses to= =20 decode? Do they consume subranges of BARs or are they assigned fixed=20 addresses somehow? Do they have programmable decoders of some sort=20 themselves? If you wish to have the PCI bus assign you resources then that= =20 implies that your PCI device has a BAR and that you want to request resourc= es=20 for that BAR and then hand out subranges of that to your children. If that= =20 is the case, then you will need to allocate the resources for the BAR for t= he=20 PCI device from the PCI bus. Then your bus driver for the PCI device will= =20 need to suballoc from that BAR to your children devices. =2D-=20 John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 14 15:31:32 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3127510656C0; Tue, 14 Jul 2009 15:31:32 +0000 (UTC) (envelope-from nkoch@demig.de) Received: from www61.your-server.de (www61.your-server.de [213.133.104.61]) by mx1.freebsd.org (Postfix) with ESMTP id E05D18FC1C; Tue, 14 Jul 2009 15:31:31 +0000 (UTC) (envelope-from nkoch@demig.de) Received: from [217.7.243.216] (helo=firewall.demig.intra) by www61.your-server.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1MQjyc-0008Qf-0w; Tue, 14 Jul 2009 17:31:30 +0200 Received: from [192.168.148.72] (ws-pr-3.demig.intra [192.168.148.72]) by firewall.demig.intra (8.14.3/8.14.0) with ESMTP id n6EFUtdA019224; Tue, 14 Jul 2009 17:30:55 +0200 (CEST) (envelope-from nkoch@demig.de) Message-ID: <4A5CA4AA.6050307@demig.de> Date: Tue, 14 Jul 2009 15:30:50 +0000 From: Norbert Koch Organization: demig Prozessautomatisierung GmbH User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: John Baldwin References: <4A5B3F1B.3040207@demig.de> <200907131435.30452.jhb@freebsd.org> <4A5C2EF8.3080208@demig.de> <200907140849.51702.jhb@freebsd.org> In-Reply-To: <200907140849.51702.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 192.168.148.235 X-Authenticated-Sender: webmaster@demig.de X-Virus-Scanned: Clear (ClamAV 0.95.1/9562/Tue Jul 14 15:54:21 2009) Cc: freebsd-hackers@freebsd.org Subject: Re: bus device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 15:31:32 -0000 > From a hardware perspective, how do your devices know which addresses to > decode? Do they consume subranges of BARs or are they assigned fixed > addresses somehow? Do they have programmable decoders of some sort > themselves? If you wish to have the PCI bus assign you resources then that > implies that your PCI device has a BAR and that you want to request resources > for that BAR and then hand out subranges of that to your children. If that > is the case, then you will need to allocate the resources for the BAR for the > PCI device from the PCI bus. Then your bus driver for the PCI device will > need to suballoc from that BAR to your children devices. > > My device decodes one ram address range (16MB) and gives me one interrupt line. As my sub-devices operate on partial address areas my idea was to let them all call bus_alloc_resource() with the same rid parameter (= BAR selector) and different offsets. So the bookkeeping should be done by the pci driver, right? From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 14 16:32:45 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CF711065670; Tue, 14 Jul 2009 16:32:45 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (mail.cs.rice.edu [128.42.1.31]) by mx1.freebsd.org (Postfix) with ESMTP id 60B898FC1A; Tue, 14 Jul 2009 16:32:45 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1]) by mail.cs.rice.edu (Postfix) with ESMTP id 044D62C2A8C; Tue, 14 Jul 2009 11:32:45 -0500 (CDT) X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu Received: from mail.cs.rice.edu ([127.0.0.1]) by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id HSh1f0KxIBOq; Tue, 14 Jul 2009 11:32:37 -0500 (CDT) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.rice.edu (Postfix) with ESMTP id 216852C2A7E; Tue, 14 Jul 2009 11:32:37 -0500 (CDT) Message-ID: <4A5CB324.80708@cs.rice.edu> Date: Tue, 14 Jul 2009 11:32:36 -0500 From: Alan Cox User-Agent: Thunderbird 2.0.0.22 (X11/20090626) MIME-Version: 1.0 To: John Baldwin References: <200907131428.08923.jhb@freebsd.org> <200907132133.52217.tijl@ulyssis.org> <200907131639.10346.jhb@freebsd.org> In-Reply-To: <200907131639.10346.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Nate Eldredge , Tijl Coosemans , Alexander Best , Alan Cox , freebsd-hackers@freebsd.org Subject: Re: mmap/munmap with zero length X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 16:32:45 -0000 John Baldwin wrote: > On Monday 13 July 2009 3:33:51 pm Tijl Coosemans wrote: > >> On Monday 13 July 2009 20:28:08 John Baldwin wrote: >> >>> On Sunday 05 July 2009 3:32:25 am Alexander Best wrote: >>> >>>> so mmap differs from the POSIX recommendation right. the malloc.conf >>>> option seems more like a workaround/hack. imo it's confusing to have >>>> mmap und munmap deal differently with len=0. being able to >>>> succesfully alocate memory which cannot be removed doesn't seem >>>> logical to me. >>>> >>> This should fix it: >>> >>> --- //depot/user/jhb/acpipci/vm/vm_mmap.c >>> +++ /home/jhb/work/p4/acpipci/vm/vm_mmap.c >>> @@ -229,7 +229,7 @@ >>> >>> fp = NULL; >>> /* make sure mapping fits into numeric range etc */ >>> - if ((ssize_t) uap->len < 0 || >>> + if ((ssize_t) uap->len <= 0 || >>> ((flags & MAP_ANON) && uap->fd != -1)) >>> return (EINVAL); >>> >> Why not "uap->len == 0"? Sizes of 2GiB and more (32bit) shouldn't cause >> an error. >> > > I don't actually disagree and know of locally modified versions of FreeBSD > that remove this check for precisely that reason. > > I have no objections to "uap->len == 0" (without the cast). Alan From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 14 17:39:17 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 061EE106568F for ; Tue, 14 Jul 2009 17:39:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id CB6398FC18 for ; Tue, 14 Jul 2009 17:39:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 6A69D46B2D; Tue, 14 Jul 2009 13:39:16 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 698628A097; Tue, 14 Jul 2009 13:39:15 -0400 (EDT) From: John Baldwin To: Norbert Koch Date: Tue, 14 Jul 2009 11:51:29 -0400 User-Agent: KMail/1.9.7 References: <4A5B3F1B.3040207@demig.de> <200907140849.51702.jhb@freebsd.org> <4A5CA4AA.6050307@demig.de> In-Reply-To: <4A5CA4AA.6050307@demig.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907141151.29971.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 14 Jul 2009 13:39:15 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org Subject: Re: bus device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 17:39:18 -0000 On Tuesday 14 July 2009 11:30:50 am Norbert Koch wrote: > > > From a hardware perspective, how do your devices know which addresses to > > decode? Do they consume subranges of BARs or are they assigned fixed > > addresses somehow? Do they have programmable decoders of some sort > > themselves? If you wish to have the PCI bus assign you resources then that > > implies that your PCI device has a BAR and that you want to request resources > > for that BAR and then hand out subranges of that to your children. If that > > is the case, then you will need to allocate the resources for the BAR for the > > PCI device from the PCI bus. Then your bus driver for the PCI device will > > need to suballoc from that BAR to your children devices. > > > > > My device decodes one ram address range (16MB) and gives me > one interrupt line. > As my sub-devices operate on partial address areas my idea was to > let them all call bus_alloc_resource() with the same rid parameter (= > BAR selector) > and different offsets. So the bookkeeping should be done by the pci > driver, right? No. First of all, the PCI bus driver will only allocate resources for direct children. It simply passes requests up the tree for grandchildren (this is how ISA devices behind a PCI-ISA bridge request resources). In this case, you will want to allocate resources for your BAR and your interrupt using bus_alloc_resource() during your attach routine. You can then either share the resources directly with your children by returning your resource values in your own bus_alloc_resource() method (see ppc(4) for an example of this) or subdivide your resource to make new resources (the easiest way to do this is probably to create a rman from your resource and then use rman_reserve_resource() to sub-allocate chunks of that to your children). For the interrupt resource you can just return your own resource pointer directly in your bus_alloc_resource() routine. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 14 22:23:24 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CF451065672; Tue, 14 Jul 2009 22:23:24 +0000 (UTC) (envelope-from prvs=14395d223a=brian@FreeBSD.org) Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id 38D588FC14; Tue, 14 Jul 2009 22:23:23 +0000 (UTC) (envelope-from prvs=14395d223a=brian@FreeBSD.org) Received: from pd3ml2so-ssvc.prod.shaw.ca ([10.0.141.138]) by pd3mo1so-svcs.prod.shaw.ca with ESMTP; 14 Jul 2009 15:55:02 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.0 c=1 a=2Bce08JPMMMA:10 a=4Z0QP1WVBuUwHZGQKe2N1A==:17 a=6I5d2MoRAAAA:8 a=MMwg4So0AAAA:8 a=gOhR4Zn30islFdwkyB0A:9 a=tzvay4HcvqmBmYZEesGSF76i07AA:4 a=SV7veod9ZcQA:10 a=WJ3hkfHDukgA:10 Received: from unknown (HELO store.lan.Awfulhak.org) ([174.7.23.140]) by pd3ml2so-dmz.prod.shaw.ca with ESMTP; 14 Jul 2009 15:55:01 -0600 Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 95413C433AC_A5CFEF4B; Tue, 14 Jul 2009 21:56:04 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Sophos Email Appliance) with ESMTP id F3AEEC460F7_A5CFEF1F; Tue, 14 Jul 2009 21:56:01 +0000 (GMT) Received: from localhost (brian@gw.lan.Awfulhak.org [172.16.0.1]) by gw.Awfulhak.org (8.14.3/8.14.3) with ESMTP id n6ELsvOt033714; Tue, 14 Jul 2009 14:54:57 -0700 (PDT) (envelope-from brian@FreeBSD.org) Date: Tue, 14 Jul 2009 14:55:15 -0700 From: Brian Somers To: Giorgos Keramidas Message-ID: <20090714145515.43e309ca@Awfulhak.org> In-Reply-To: <87d483q4en.fsf@kobe.laptop> References: <87d483q4en.fsf@kobe.laptop> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.4; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: can we afford an extra column in iostat? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 22:23:24 -0000 On Tue, 14 Jul 2009 07:23:12 +0300, Giorgos Keramidas wrote: > While converting my laptop's main disk to zfs, I noticed iostat output > like this (bits copied from here and there): > > | keramida@kobe:/home/keramida$ iostat -w3 ad0 da0 > | tty ad0 da0 cpu > | tin tout KB/t tps MB/s KB/t tps MB/s us ni sy in id > | 5 2119 36.29 56 2.00 54.95 7 0.35 3 0 8 0 89 > | 0 9478 10.90 290 3.09 57.22 12 0.67 42 0 43 0 15 > | 012595 1.72 213 0.36 21.36 80 1.66 48 0 48 0 4 > | 050042 4.56 715 3.19 11.44 164 1.83 29 0 50 1 20 > | 11529568 7.34 443 3.17 16.97 165 2.74 31 0 53 0 16 >[.....] > | $ ./iostat -w2 > | tty ad0 md0 da0 cpu > | tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id > | 7 2570 32.92 62 1.98 6.46 0 0.00 43.44 10 0.41 4 0 9 0 87 > | 0 36506 0.99 507 0.49 0.00 0 0.00 20.13 155 3.04 34 0 56 1 9 > | 0 16695 0.83 226 0.18 0.00 0 0.00 26.16 97 2.48 35 0 56 0 9 > | 0 24158 10.63 428 4.45 0.00 0 0.00 14.44 137 1.93 32 0 51 0 17 > | ^C > > The patch that changes this is quite small: This should be fixed. Ironically, the only people that usually have problems with fixes like this are people that have seen the fields merge and have adjusted some script to understand column widths! -- Brian Somers Don't _EVER_ lose your sense of humour ! From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 14 23:28:23 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38A66106566C for ; Tue, 14 Jul 2009 23:28:23 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 9C4EC8FC08 for ; Tue, 14 Jul 2009 23:28:22 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (adsl129-38.kln.forthnet.gr [77.49.248.38]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-9) with ESMTP id n6ENS6Hf000406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 15 Jul 2009 02:28:12 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id n6ENS5v6024180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 15 Jul 2009 02:28:06 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id n6ENS5Q8024179; Wed, 15 Jul 2009 02:28:05 +0300 (EEST) (envelope-from keramida@freebsd.org) From: Giorgos Keramidas To: Brian Somers References: <87d483q4en.fsf@kobe.laptop> <20090714145515.43e309ca@Awfulhak.org> Date: Wed, 15 Jul 2009 02:28:05 +0300 In-Reply-To: <20090714145515.43e309ca@Awfulhak.org> (Brian Somers's message of "Tue, 14 Jul 2009 14:55:15 -0700") Message-ID: <87vdluetfe.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Hellug-MailScanner-ID: n6ENS6Hf000406 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.468, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL -0.07, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: freebsd-hackers@freebsd.org Subject: Re: can we afford an extra column in iostat? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 23:28:23 -0000 On Tue, 14 Jul 2009 14:55:15 -0700, Brian Somers wrote: > On Tue, 14 Jul 2009 07:23:12 +0300, Giorgos Keramidas wrote: >> While converting my laptop's main disk to zfs, I noticed iostat output >> like this (bits copied from here and there): >> >> | keramida@kobe:/home/keramida$ iostat -w3 ad0 da0 >> | tty ad0 da0 cpu >> | tin tout KB/t tps MB/s KB/t tps MB/s us ni sy in id >> | 5 2119 36.29 56 2.00 54.95 7 0.35 3 0 8 0 89 >> | 0 9478 10.90 290 3.09 57.22 12 0.67 42 0 43 0 15 >> | 012595 1.72 213 0.36 21.36 80 1.66 48 0 48 0 4 >> | 050042 4.56 715 3.19 11.44 164 1.83 29 0 50 1 20 >> | 11529568 7.34 443 3.17 16.97 165 2.74 31 0 53 0 16 >>[.....] >> | $ ./iostat -w2 >> | tty ad0 md0 da0 cpu >> | tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id >> | 7 2570 32.92 62 1.98 6.46 0 0.00 43.44 10 0.41 4 0 9 0 87 >> | 0 36506 0.99 507 0.49 0.00 0 0.00 20.13 155 3.04 34 0 56 1 9 >> | 0 16695 0.83 226 0.18 0.00 0 0.00 26.16 97 2.48 35 0 56 0 9 >> | 0 24158 10.63 428 4.45 0.00 0 0.00 14.44 137 1.93 32 0 51 0 17 >> | ^C >> >> The patch that changes this is quite small: > > This should be fixed. Ironically, the only people that usually > have problems with fixes like this are people that have seen > the fields merge and have adjusted some script to understand > column widths! Yes, that's a bit unfortunate. I'm ok with keeping this in 8.X only for this reason alone, but I would prefer if it was eventually MFCd. I'll ask re@ if they are ok with committing this now in head. Thanks :) From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 15 07:19:25 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC85D1065672; Wed, 15 Jul 2009 07:19:25 +0000 (UTC) (envelope-from nkoch@demig.de) Received: from www61.your-server.de (www61.your-server.de [213.133.104.61]) by mx1.freebsd.org (Postfix) with ESMTP id 87BBB8FC17; Wed, 15 Jul 2009 07:19:25 +0000 (UTC) (envelope-from nkoch@demig.de) Received: from [217.7.243.216] (helo=firewall.demig.intra) by www61.your-server.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1MQylv-0000Tx-MN; Wed, 15 Jul 2009 09:19:23 +0200 Received: from [192.168.148.72] (ws-pr-3.demig.intra [192.168.148.72]) by firewall.demig.intra (8.14.3/8.14.0) with ESMTP id n6F7IfCF032965; Wed, 15 Jul 2009 09:18:41 +0200 (CEST) (envelope-from nkoch@demig.de) Message-ID: <4A5D82D1.8030608@demig.de> Date: Wed, 15 Jul 2009 07:18:41 +0000 From: Norbert Koch Organization: demig Prozessautomatisierung GmbH User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: John Baldwin References: <4A5B3F1B.3040207@demig.de> <200907140849.51702.jhb@freebsd.org> <4A5CA4AA.6050307@demig.de> <200907141151.29971.jhb@freebsd.org> In-Reply-To: <200907141151.29971.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 192.168.148.235 X-Authenticated-Sender: webmaster@demig.de X-Virus-Scanned: Clear (ClamAV 0.95.1/9569/Wed Jul 15 07:55:56 2009) Cc: freebsd-hackers@freebsd.org Subject: Re: bus device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2009 07:19:26 -0000 > No. First of all, the PCI bus driver will only allocate resources for direct > children. It simply passes requests up the tree for grandchildren (this is > how ISA devices behind a PCI-ISA bridge request resources). In this case, > you will want to allocate resources for your BAR and your interrupt using > bus_alloc_resource() during your attach routine. You can then either share > the resources directly with your children by returning your resource values > in your own bus_alloc_resource() method (see ppc(4) for an example of this) > or subdivide your resource to make new resources (the easiest way to do this > is probably to create a rman from your resource and then use > rman_reserve_resource() to sub-allocate chunks of that to your children). > For the interrupt resource you can just return your own resource pointer > directly in your bus_alloc_resource() routine. > > Ok, that makes things a bit clearer. Thank you for your help! From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 15 14:48:54 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E446A106566B; Wed, 15 Jul 2009 14:48:54 +0000 (UTC) (envelope-from sos@deepcore.dk) Received: from deepcore.dk (adsl.deepcore.dk [87.63.29.106]) by mx1.freebsd.org (Postfix) with ESMTP id 6E1BC8FC0A; Wed, 15 Jul 2009 14:48:54 +0000 (UTC) (envelope-from sos@deepcore.dk) Received: from [192.168.0.138] ([192.168.0.138]) by deepcore.dk (8.14.3/8.14.3) with ESMTP id n6FElERZ035856; Wed, 15 Jul 2009 16:47:14 +0200 (CEST) (envelope-from sos@deepcore.dk) Message-Id: From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= To: "Marat N.Afanasyev" In-Reply-To: <4A5DA250.9000902@ksu.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v935.3) Date: Wed, 15 Jul 2009 16:48:52 +0200 References: <8EB69F68-8ED2-469C-B83E-2555A72630B4@deepcore.dk> <4A5DA250.9000902@ksu.ru> X-Mailer: Apple Mail (2.935.3) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.2 (deepcore.dk [87.63.29.106]); Wed, 15 Jul 2009 16:47:15 +0200 (CEST) X-Mailman-Approved-At: Wed, 15 Jul 2009 14:58:54 +0000 Cc: stable@freebsd.org, hackers@freebsd.org Subject: Re: ATA driver update for 7.2RELEASE available X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2009 14:48:55 -0000 On 15Jul, 2009, at 11:33 , Marat N.Afanasyev wrote: > S=F8ren Schmidt wrote: >> Over the past months I've gotten huge amounts of requests for ATA =20 >> related things, so I've whipped up what I use here for FreeBSD 7.2-=20= >> Release. >> This is a total replacement of the ATA driver, modulerized as in -=20 >> current, but based on my WIP not from what might have happend to -=20 >> current since I gave up maintainership. >> There is a number of new chipsets supported in here that I dont =20 >> think is in any of the official sources (havn't checked in quite =20 >> some time though), mostly newish ATI, nVidia and Marvell chips =20 >> (yeah those buggers with both ATA & SATA ports). >> You can find and install.sh script and a tarball of the needed =20 >> files at: >> http://www.deepcore.dk/pub/ATA >> Put both in /usr/src and run install.sh. >> As I dont subscribe to any of the mailing lists nor does my =20 >> FreeBSD.org mail address seem to work anymore, you will need to =20 >> reply to me directly if needed. >> As always - Enjoy! >> -S=F8ren > > i think i'm dumb, but can you tell me how can atapicam be enabled =20 > with this implementation of ata? i couldn't still find a way :( You could just grap atapi-cam.c from stock 7.2 and use that I guess =20 (as a module or compiled in), newer used it though... -S=F8ren -- From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 16 17:35:58 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68ECD106568E for ; Thu, 16 Jul 2009 17:35:58 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-fx0-f224.google.com (mail-fx0-f224.google.com [209.85.220.224]) by mx1.freebsd.org (Postfix) with ESMTP id 010DA8FC14 for ; Thu, 16 Jul 2009 17:35:57 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: by fxm24 with SMTP id 24so247803fxm.43 for ; Thu, 16 Jul 2009 10:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=hLUNug3BaeRtCgrDWkVyh8XS0/fkVQlCZD1jNwVsVJQ=; b=mnzmp0Fk+Ui+byOU8tv5ELrMRsP4KMoYX/vw90Kd/kdnUuH5MgQxv9S6Q1AA7PRUJu 1R9bKmkhFulRfQRmpk/1r82IGst272lmEt9cZEVkLGGjhwlxWVgnkDtPLpM3eq/8/5nU heJ9mYFpr1X0DrCIyTktVJROcVCAgjFGF7byM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=cKPj4MSE/1BCUsIZiiz8CXAHWaqBsqA2/GrZkVk04jhD9+awZDF4vg1PJXMWfuRapq Zq5ZVrjHHOMBT/dZf3ANPw2b/1u+MUpQSSMBe+NFUjahciM30PJGlyjoOkexkWTJP6ZC KZjf2KSDKRaImTR8FVibPJYUcDnC0Ds675BVM= MIME-Version: 1.0 Received: by 10.103.179.1 with SMTP id g1mr4917039mup.57.1247764295880; Thu, 16 Jul 2009 10:11:35 -0700 (PDT) Date: Thu, 16 Jul 2009 19:11:35 +0200 Message-ID: <6101e8c40907161011o57b3ae0bi8af2e6ebd9dc1364@mail.gmail.com> From: Oliver Pinter To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: ZFS: freebsd-current vs osol2009.06 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2009 17:35:58 -0000 http://209.85.129.132/translate_c?hl=en&u=http://suckit.blog.hu/2009/07/16/zfs_sebesseg_freebsd_vs_opensolaris&rurl=translate.google.com&usg=ALkJrhhn2z8lEDw1hZEUEqAiCZ330Gw41w From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 17 10:50:32 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A49A106568A for ; Fri, 17 Jul 2009 10:50:32 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 0E7ED8FC0A for ; Fri, 17 Jul 2009 10:50:31 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 3B23D6D418; Fri, 17 Jul 2009 12:50:31 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 185BD844C2; Fri, 17 Jul 2009 12:50:31 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Henrique Almeida References: Date: Fri, 17 Jul 2009 12:50:30 +0200 In-Reply-To: (Henrique Almeida's message of "Sun, 12 Jul 2009 16:20:18 -0300") Message-ID: <86iqhrh9c9.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Help on relicensing derived code X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 10:50:32 -0000 Henrique Almeida writes: > I need to write an "errno.h" with constant values used by the FreeBSD > kernel. My project uses exclusively the 2 clause BSD license. I > expected to copy those values from FreeBSD errno.h. However, FreeBSD > errno.h has 3 clauses. I'm a total newbie in licensing procedures so, > it's not clear what to do. In the US at least, you can safely ignore the license and copy the macro definitions themselves. There is plenty of legal precedent (including but not limited to SCO vs. IBM) to back that up. I'm unsure about the comments, though. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 17 19:32:39 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F394106564A; Fri, 17 Jul 2009 19:32:39 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) by mx1.freebsd.org (Postfix) with ESMTP id 356268FC19; Fri, 17 Jul 2009 19:32:39 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from mail1.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id n6HJ4oJ1014669; Fri, 17 Jul 2009 21:04:50 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail1.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id n6HJ4oEA017444; Fri, 17 Jul 2009 21:04:50 +0200 Received: (from localhost) by curry.mchp.siemens.de (8.14.3/8.14.3) id n6HJ4o7W081513; Date: Fri, 17 Jul 2009 21:04:50 +0200 From: Andre Albsmeier To: freebsd-hackers@freebsd.org Message-ID: <20090717190450.GA4697@curry.mchp.siemens.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Rui Paulo , Andre.Albsmeier@siemens.com Subject: Reading acpi memory from a driver attached to hostb X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 19:32:40 -0000 [CC'ing this to Rui Paulo since he tried to help me a while ago] I have written a driver that is a child of hostb (similar to agp) for RELENG_7. However, on some chipsets (e.g. i975) it has to read some memory locations (not pci configuration space) which were registered by acpi as system resources. Since my driver is a child of hostb0, I have no idea of how to access this memory area. Here is a devinfo -r to make things clear: nexus0 acpi0 Interrupt request lines: 9 I/O ports: 0x10-0x1f 0x22-0x3f ... 0x800-0x87f I/O memory addresses: 0xc0000-0xdffff 0xe0000-0xfffff 0xf0000000-0xf3ffffff 0xfec00000-0xfec00fff 0xfed13000-0xfed19fff <--- the memory needed 0xfed1c000-0xfed1ffff .... 0xfed20000-0xfed3ffff 0xfff00000-0xffffffff cpu0 coretemp0 acpi_throttle0 ACPI I/O ports: 0x810-0x813 cpufreq0 cpu1 coretemp1 pcib0 pci0 I/O ports: 0x170-0x177 0x376 hostb0 I/O memory addresses: 0xe4000000-0xe7ffffff MYDRIVER0 <--- my driver agp0 pcib1 pci7 vgapci0 Interrupt request lines: 16 I had the same problem under RELENG_6 six month ago which could be solved by a bus_set_resource() but since the driver now attaches to hostb, this is not possible anymore. Earlier, I was given the hint to attach as a child of acpi (see the old mail attached below) but in this case I didn't have access to the hostb registers which I need as well. The only thing I see is: Attach two drivers -- one as child of acpi and another as child of hostb and let them communicate somehow (no idea how to do this). I have also done crazy things like searching for acpi0 and trying to bus_alloc_resource() the memory I am interested in but this also failed. Or is it possible to free(!) somehow the address space from acpi0 and pass it to hostb0 so I can bus_alloc_resource() it? Thanks a lot for all ideas, -Andre ------------------------------------------------------------------ > Hello all, > > I am writing a driver which needs to access memory at a > specific location. The location depends on what the BIOS > has configured into the host bridge. For example, my > current machine uses an Intel 975X chipset and the memory > location I am interested in has been set to 0xFED14000 and > is 16KB in size (this is MCHBAR of the 975X memory hub). You probably just need to do something like: rid = PCI_BAR(number); res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); And then, bus_read_4(res, offset from specified PCI BAR); > > > I have no idea how to access this space from my driver. > I have played around with bus_alloc_resource() but this > only gives me back NULL. > > However, a devinfo -r gives me: > > nexus0 > npx0 > acpi0 > Interrupt request lines: > 9 > I/O ports: > 0x10-0x1f > ... > 0x800-0x87f > I/O memory addresses: > 0x0-0x9ffff > 0xc0000-0xdffff > 0xe0000-0xfffff > 0x100000-0x7fffffff > 0xf0000000-0xf3ffffff > 0xfec00000-0xfec00fff > 0xfed13000-0xfed19fff <--- > 0xfed1c000-0xfed1ffff > 0xfed20000-0xfed3ffff > 0xfed50000-0xfed8ffff > 0xfee00000-0xfee00fff > 0xffb00000-0xffbfffff > 0xfff00000-0xffffffff > cpu0 > ... > > The line marked with <--- shows the range which includes > the location I am interested in. It is probably assigned > to the acpi0 device. > > How do I proceed from this? Do I have to hack around in > the ACPI-Code? I don't hope so ;-) You'll probably need to create a fake ACPI child driver to access it. Create your identify routine with something like: static void mydriver_identify(driver_t *driver, device_t parent) { if (device_find_child(parent, "mydriver", -1) == NULL && mydriver_match(parent)) device_add_child(parent, "mydriver", -1); } mydriver_match() should check if you were given the acpi0 device. Regards, -- Rui Paulo From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 17 19:53:54 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C29321065672 for ; Fri, 17 Jul 2009 19:53:54 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outU.internet-mail-service.net (outu.internet-mail-service.net [216.240.47.244]) by mx1.freebsd.org (Postfix) with ESMTP id 61AD98FC15 for ; Fri, 17 Jul 2009 19:53:54 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 34C45B96A6; Fri, 17 Jul 2009 12:53:55 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id C23872D6016; Fri, 17 Jul 2009 12:53:53 -0700 (PDT) Message-ID: <4A60D6D1.3050703@elischer.org> Date: Fri, 17 Jul 2009 12:53:53 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: Andre Albsmeier References: <20090717190450.GA4697@curry.mchp.siemens.de> In-Reply-To: <20090717190450.GA4697@curry.mchp.siemens.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Rui Paulo Subject: Re: Reading acpi memory from a driver attached to hostb X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 19:53:55 -0000 Andre Albsmeier wrote: > [CC'ing this to Rui Paulo since he tried to help me a while ago] > > I have written a driver that is a child of hostb (similar to agp) for > RELENG_7. However, on some chipsets (e.g. i975) it has to read some > memory locations (not pci configuration space) which were registered > by acpi as system resources. > > Since my driver is a child of hostb0, I have no idea of how to access > this memory area. Here is a devinfo -r to make things clear: > > nexus0 > acpi0 > Interrupt request lines: > 9 > I/O ports: > 0x10-0x1f > 0x22-0x3f > ... > 0x800-0x87f > I/O memory addresses: > 0xc0000-0xdffff > 0xe0000-0xfffff > 0xf0000000-0xf3ffffff > 0xfec00000-0xfec00fff > 0xfed13000-0xfed19fff <--- the memory needed > 0xfed1c000-0xfed1ffff > .... > 0xfed20000-0xfed3ffff > 0xfff00000-0xffffffff > cpu0 > coretemp0 > acpi_throttle0 > ACPI I/O ports: > 0x810-0x813 > cpufreq0 > cpu1 > coretemp1 > pcib0 > pci0 > I/O ports: > 0x170-0x177 > 0x376 > hostb0 > I/O memory addresses: > 0xe4000000-0xe7ffffff > MYDRIVER0 <--- my driver > agp0 > pcib1 > pci7 > vgapci0 > Interrupt request lines: > 16 > > I had the same problem under RELENG_6 six month ago which could be > solved by a bus_set_resource() but since the driver now attaches to > hostb, this is not possible anymore. > > Earlier, I was given the hint to attach as a child of acpi (see the > old mail attached below) but in this case I didn't have access to the > hostb registers which I need as well. > > The only thing I see is: Attach two drivers -- one as child of acpi > and another as child of hostb and let them communicate somehow (no > idea how to do this). > > I have also done crazy things like searching for acpi0 and trying > to bus_alloc_resource() the memory I am interested in but this also > failed. > > Or is it possible to free(!) somehow the address space from acpi0 > and pass it to hostb0 so I can bus_alloc_resource() it? > > Thanks a lot for all ideas, > > -Andre > You can probably make two drivers in one which cooperate to allow access to both sets of resources. > From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 18 09:03:52 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 100CE106571C; Sat, 18 Jul 2009 09:03:52 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from thoth.sbs.de (thoth.sbs.de [192.35.17.2]) by mx1.freebsd.org (Postfix) with ESMTP id 64C4C8FC0C; Sat, 18 Jul 2009 09:03:51 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from mail3.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id n6I8ABSD012596; Sat, 18 Jul 2009 10:10:11 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail3.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id n6I8ABFZ016013; Sat, 18 Jul 2009 10:10:11 +0200 Received: (from localhost) by curry.mchp.siemens.de (8.14.3/8.14.3) id n6I8ABZX083995; Date: Sat, 18 Jul 2009 10:10:11 +0200 From: Andre Albsmeier To: Julian Elischer Message-ID: <20090718081011.GA6920@curry.mchp.siemens.de> References: <20090717190450.GA4697@curry.mchp.siemens.de> <4A60D6D1.3050703@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A60D6D1.3050703@elischer.org> X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-hackers@freebsd.org, Rui Paulo , Andre Albsmeier Subject: Re: Reading acpi memory from a driver attached to hostb X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2009 09:03:52 -0000 On Fri, 17-Jul-2009 at 12:53:53 -0700, Julian Elischer wrote: > Andre Albsmeier wrote: > > [CC'ing this to Rui Paulo since he tried to help me a while ago] > > > > Since my driver is a child of hostb0, I have no idea of how to access > > acpi0's memory area. Here is a devinfo -r to make things clear: > > > ... > > > > Earlier, I was given the hint to attach as a child of acpi (see the > > old mail attached below) but in this case I didn't have access to the > > hostb registers which I need as well. > > > > The only thing I see is: Attach two drivers -- one as child of acpi > > and another as child of hostb and let them communicate somehow (no > > idea how to do this). > > > > I have also done crazy things like searching for acpi0 and trying > > to bus_alloc_resource() the memory I am interested in but this also > > failed. > > > > Or is it possible to free(!) somehow the address space from acpi0 > > and pass it to hostb0 so I can bus_alloc_resource() it? > > > > You can probably make two drivers in one which cooperate to > allow access to both sets of resources. Hmm, that's what I meant by: Attach two drivers -- one as child of acpi and another as child of hostb... And that's similar to Rui Paulo's suggestion a while ago: > You'll probably need to create a fake ACPI child driver to access it. > > Create your identify routine with something like: > > static void mydriver_identify(driver_t *driver, device_t parent) > { > if (device_find_child(parent, "mydriver", -1) == NULL && > mydriver_match(parent)) > device_add_child(parent, "mydriver", -1); > } > > mydriver_match() should check if you were given the acpi0 device. But in order to attach to acpi0, I need to say DRIVER_MODULE( eccmon, acpi, eccmon_driver, eccmon_devclass, NULL, NULL ); instead of DRIVER_MODULE( eccmon, hostb, eccmon_driver, eccmon_devclass, NULL, NULL ); This way I could attach to acpi but not to hostb anymore.... I have searched the net for solutions, I have read newbus-draft.txt and newbus-intro.txt and Warner Losh's newbus-led.c (thanks to all of these my driver is working on other mainboards where it doesn't have to access foreign memory) but didn't find anything. Thanks, -Andre From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 18 09:47:48 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32C60106564A for ; Sat, 18 Jul 2009 09:47:48 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-ew0-f220.google.com (mail-ew0-f220.google.com [209.85.219.220]) by mx1.freebsd.org (Postfix) with ESMTP id AE1BC8FC13 for ; Sat, 18 Jul 2009 09:47:47 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ewy20 with SMTP id 20so1130580ewy.43 for ; Sat, 18 Jul 2009 02:47:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=X46w0mXfMipnTDAUWp8QQE6XY9bYlPxhDpMsAlDEhrg=; b=p1lgyqfwyWagaw/5QSBtx+NSyk5wJlZqhjmnou5tXsilAf680JXsd0z1HnYDq1wzky 5T1woTG02wz33OxcNsOCZZr6wK5WawpZ0rpnL186H9khYol8wnuOBnXoAadR70GEGtFz oRA4iBaZ8rHVQI3XkqTdIFNOwkV5zqqbp2J/I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=xzbZKkgfj8MJdS8pr2ZNGmy53MZS/Ik3nspM5RcCq6nOLrCeGxsbHs+QFKiDmEOZE9 dHld2LPy+K0UBThs+9EVuyF6sXcdII5gom6SH3YXwdtXh9oxJEk81vGz8AbQol5xbPR7 wmZbTUSzJUNNoiVtqipfVJCTZ3gPv1b4yledI= Received: by 10.210.19.7 with SMTP id 7mr946863ebs.7.1247909108425; Sat, 18 Jul 2009 02:25:08 -0700 (PDT) Received: from omega.lan (bl6-149-62.dsl.telepac.pt [82.155.149.62]) by mx.google.com with ESMTPS id 5sm363372eyf.17.2009.07.18.02.25.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 18 Jul 2009 02:25:07 -0700 (PDT) Sender: Rui Paulo Message-Id: From: Rui Paulo To: Andre Albsmeier In-Reply-To: <20090718081011.GA6920@curry.mchp.siemens.de> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Sat, 18 Jul 2009 10:25:06 +0100 References: <20090717190450.GA4697@curry.mchp.siemens.de> <4A60D6D1.3050703@elischer.org> <20090718081011.GA6920@curry.mchp.siemens.de> X-Mailer: Apple Mail (2.935.3) Cc: freebsd-hackers@freebsd.org, Julian Elischer Subject: Re: Reading acpi memory from a driver attached to hostb X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2009 09:47:48 -0000 On 18 Jul 2009, at 09:10, Andre Albsmeier wrote: > On Fri, 17-Jul-2009 at 12:53:53 -0700, Julian Elischer wrote: >> Andre Albsmeier wrote: >>> [CC'ing this to Rui Paulo since he tried to help me a while ago] >>> >>> Since my driver is a child of hostb0, I have no idea of how to >>> access >>> acpi0's memory area. Here is a devinfo -r to make things clear: >>> >> ... >>> >>> Earlier, I was given the hint to attach as a child of acpi (see the >>> old mail attached below) but in this case I didn't have access to >>> the >>> hostb registers which I need as well. >>> >>> The only thing I see is: Attach two drivers -- one as child of acpi >>> and another as child of hostb and let them communicate somehow (no >>> idea how to do this). >>> >>> I have also done crazy things like searching for acpi0 and trying >>> to bus_alloc_resource() the memory I am interested in but this also >>> failed. >>> >>> Or is it possible to free(!) somehow the address space from acpi0 >>> and pass it to hostb0 so I can bus_alloc_resource() it? >>> >> >> You can probably make two drivers in one which cooperate to >> allow access to both sets of resources. > > Hmm, that's what I meant by: Attach two drivers -- one as child of > acpi > and another as child of hostb... > > And that's similar to Rui Paulo's suggestion a while ago: > >> You'll probably need to create a fake ACPI child driver to access it. >> >> Create your identify routine with something like: >> >> static void mydriver_identify(driver_t *driver, device_t parent) >> { >> if (device_find_child(parent, "mydriver", -1) == NULL && >> mydriver_match(parent)) >> device_add_child(parent, "mydriver", -1); >> } >> >> mydriver_match() should check if you were given the acpi0 device. > > But in order to attach to acpi0, I need to say > > DRIVER_MODULE( eccmon, acpi, eccmon_driver, eccmon_devclass, NULL, > NULL ); > > instead of > > DRIVER_MODULE( eccmon, hostb, eccmon_driver, eccmon_devclass, NULL, > NULL ); > > This way I could attach to acpi but not to hostb anymore.... > > I have searched the net for solutions, I have read newbus-draft.txt > and newbus-intro.txt and Warner Losh's newbus-led.c (thanks to all > of these my driver is working on other mainboards where it doesn't > have to access foreign memory) but didn't find anything. I'm out of ideas. John, do you know if this is a newbus limitation or if it can be worked around ? -- Rui Paulo From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 18 13:39:43 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BF53106566C; Sat, 18 Jul 2009 13:39:43 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) by mx1.freebsd.org (Postfix) with ESMTP id C04758FC0C; Sat, 18 Jul 2009 13:39:42 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from mail3.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id n6IDddW6032389; Sat, 18 Jul 2009 15:39:39 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail3.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id n6IDddcU024439; Sat, 18 Jul 2009 15:39:39 +0200 Received: (from localhost) by curry.mchp.siemens.de (8.14.3/8.14.3) id n6IDddTj084807; Date: Sat, 18 Jul 2009 15:39:38 +0200 From: Andre Albsmeier To: Rui Paulo Message-ID: <20090718133938.GA7802@curry.mchp.siemens.de> References: <20090717190450.GA4697@curry.mchp.siemens.de> <4A60D6D1.3050703@elischer.org> <20090718081011.GA6920@curry.mchp.siemens.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-hackers@freebsd.org, Julian Elischer , Andre Albsmeier Subject: Re: Reading acpi memory from a driver attached to hostb X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2009 13:39:43 -0000 On Sat, 18-Jul-2009 at 10:25:06 +0100, Rui Paulo wrote: > On 18 Jul 2009, at 09:10, Andre Albsmeier wrote: > > > On Fri, 17-Jul-2009 at 12:53:53 -0700, Julian Elischer wrote: > >> Andre Albsmeier wrote: > >>> [CC'ing this to Rui Paulo since he tried to help me a while ago] > >>> > >>> Since my driver is a child of hostb0, I have no idea of how to > >>> access > >>> acpi0's memory area. Here is a devinfo -r to make things clear: > >>> > >> ... > >>> > >>> Earlier, I was given the hint to attach as a child of acpi (see the > >>> old mail attached below) but in this case I didn't have access to > >>> the > >>> hostb registers which I need as well. > >>> > >>> The only thing I see is: Attach two drivers -- one as child of acpi > >>> and another as child of hostb and let them communicate somehow (no > >>> idea how to do this). > >>> > >>> I have also done crazy things like searching for acpi0 and trying > >>> to bus_alloc_resource() the memory I am interested in but this also > >>> failed. > >>> > >>> Or is it possible to free(!) somehow the address space from acpi0 > >>> and pass it to hostb0 so I can bus_alloc_resource() it? > >>> > >> > >> You can probably make two drivers in one which cooperate to > >> allow access to both sets of resources. > > > > Hmm, that's what I meant by: Attach two drivers -- one as child of > > acpi > > and another as child of hostb... > > > > And that's similar to Rui Paulo's suggestion a while ago: > > > >> You'll probably need to create a fake ACPI child driver to access it. > >> > >> Create your identify routine with something like: > >> > >> static void mydriver_identify(driver_t *driver, device_t parent) > >> { > >> if (device_find_child(parent, "mydriver", -1) == NULL && > >> mydriver_match(parent)) > >> device_add_child(parent, "mydriver", -1); > >> } > >> > >> mydriver_match() should check if you were given the acpi0 device. > > > > But in order to attach to acpi0, I need to say > > > > DRIVER_MODULE( eccmon, acpi, eccmon_driver, eccmon_devclass, NULL, > > NULL ); > > > > instead of > > > > DRIVER_MODULE( eccmon, hostb, eccmon_driver, eccmon_devclass, NULL, > > NULL ); > > > > This way I could attach to acpi but not to hostb anymore.... > > > > I have searched the net for solutions, I have read newbus-draft.txt > > and newbus-intro.txt and Warner Losh's newbus-led.c (thanks to all > > of these my driver is working on other mainboards where it doesn't > > have to access foreign memory) but didn't find anything. > > I'm out of ideas. > John, do you know if this is a newbus limitation or if it can be > worked around ? I assume it is possible somehow, I am just too stupid (it is the first driver I wrote). John, for easy reference, here is my initial message: http://lists.freebsd.org/pipermail/freebsd-hackers/2009-July/029127.html Please remember all, that I need the access to the acpi0 memory location only for a few reads during probing/attaching, not later. I have also read somewhere that, when resources are allocated, the system "walks up" the device tree until it finds the resource. Since my driver is below hostb0 and hostb0 is below acpi0 I thought it should work but it doesn't.. Thanks again, -Andre From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 18 14:06:51 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82B051065679 for ; Sat, 18 Jul 2009 14:06:51 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outB.internet-mail-service.net (outb.internet-mail-service.net [216.240.47.225]) by mx1.freebsd.org (Postfix) with ESMTP id 658AE8FC1A for ; Sat, 18 Jul 2009 14:06:51 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 3CEA5B094E; Sat, 18 Jul 2009 07:06:51 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id AF9FC2D6016; Sat, 18 Jul 2009 07:06:50 -0700 (PDT) Message-ID: <4A61D6FB.2090904@elischer.org> Date: Sat, 18 Jul 2009 07:06:51 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: Andre Albsmeier References: <20090717190450.GA4697@curry.mchp.siemens.de> <4A60D6D1.3050703@elischer.org> <20090718081011.GA6920@curry.mchp.siemens.de> In-Reply-To: <20090718081011.GA6920@curry.mchp.siemens.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Rui Paulo Subject: Re: Reading acpi memory from a driver attached to hostb X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2009 14:06:52 -0000 Andre Albsmeier wrote: > On Fri, 17-Jul-2009 at 12:53:53 -0700, Julian Elischer wrote: >> Andre Albsmeier wrote: >>> [CC'ing this to Rui Paulo since he tried to help me a while ago] >>> >>> Since my driver is a child of hostb0, I have no idea of how to access >>> acpi0's memory area. Here is a devinfo -r to make things clear: >>> >> ... >>> Earlier, I was given the hint to attach as a child of acpi (see the >>> old mail attached below) but in this case I didn't have access to the >>> hostb registers which I need as well. >>> >>> The only thing I see is: Attach two drivers -- one as child of acpi >>> and another as child of hostb and let them communicate somehow (no >>> idea how to do this). >>> >>> I have also done crazy things like searching for acpi0 and trying >>> to bus_alloc_resource() the memory I am interested in but this also >>> failed. >>> >>> Or is it possible to free(!) somehow the address space from acpi0 >>> and pass it to hostb0 so I can bus_alloc_resource() it? >>> >> You can probably make two drivers in one which cooperate to >> allow access to both sets of resources. > > Hmm, that's what I meant by: Attach two drivers -- one as child of acpi > and another as child of hostb... > > And that's similar to Rui Paulo's suggestion a while ago: > >> You'll probably need to create a fake ACPI child driver to access it. >> >> Create your identify routine with something like: >> >> static void mydriver_identify(driver_t *driver, device_t parent) >> { >> if (device_find_child(parent, "mydriver", -1) == NULL && >> mydriver_match(parent)) >> device_add_child(parent, "mydriver", -1); >> } >> >> mydriver_match() should check if you were given the acpi0 device. > > But in order to attach to acpi0, I need to say > > DRIVER_MODULE( eccmon, acpi, eccmon_driver, eccmon_devclass, NULL, NULL ); > > instead of > > DRIVER_MODULE( eccmon, hostb, eccmon_driver, eccmon_devclass, NULL, NULL ); try both with different devclass and other args. > > This way I could attach to acpi but not to hostb anymore.... > > I have searched the net for solutions, I have read newbus-draft.txt > and newbus-intro.txt and Warner Losh's newbus-led.c (thanks to all > of these my driver is working on other mainboards where it doesn't > have to access foreign memory) but didn't find anything. > > Thanks, > > -Andre