From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 25 08:59: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 B14D4106566C for ; Sun, 25 Jan 2009 08:59:51 +0000 (UTC) (envelope-from webmaster@kibab.com) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 0FE4C8FC27 for ; Sun, 25 Jan 2009 08:59:51 +0000 (UTC) (envelope-from webmaster@kibab.com) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 7E7E78FC27 for ; Sun, 25 Jan 2009 11:47:50 +0300 (MSK) Received: from [192.168.1.2] (ppp91-76-107-171.pppoe.mtu-net.ru [91.76.107.171]) by mx0.deglitch.com (Postfix) with ESMTPA id 1AA308FC1D; Sun, 25 Jan 2009 11:47:49 +0300 (MSK) From: Ilya Bakulin To: freebsd-mobile@freebsd.org, freebsd-acpi@freebsd.org, freebsd-hackers@freebsd.org Organization: Deglitch Networks Date: Sun, 25 Jan 2009 11:47:56 +0300 Message-Id: <1232873276.3689.2.camel@kibab-nb.kibab.com> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 FreeBSD GNOME Team Port X-DSPAM-Result: Innocent X-DSPAM-Processed: Sun Jan 25 11:47:50 2009 X-DSPAM-Confidence: 1.0000 X-DSPAM-Improbability: 1 in 98689409 chance of being spam X-DSPAM-Probability: 0.0023 X-DSPAM-Signature: 497c2736967001885613896 Content-Type: multipart/mixed; boundary=DSPAM_MULTIPART_EX-96700 X-Mailman-Approved-At: Sun, 25 Jan 2009 12:28:07 +0000 Cc: Subject: ACPI AE_NO_HARDWARE_RESPONSE workaround 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, 25 Jan 2009 08:59:51 -0000 --DSPAM_MULTIPART_EX-96700 Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-HtyI8ZXFqPJSego7sc22" --=-HtyI8ZXFqPJSego7sc22 Content-Type: multipart/mixed; boundary="=-9IEzOQBN4p+R9MZFrs6a" --=-9IEzOQBN4p+R9MZFrs6a Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi! I have Dell Vostro 1310 laptop, this system has some problems with ACPI. Sometimes I see this in dmesg: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Jan 24 20:36:00 kibab-nb kernel: acpi_ec0: wait timed out (no response), forcing polled mode Jan 24 20:36:00 kibab-nb kernel: acpi_ec0: EcRead: failed waiting to get data Jan 24 20:36:00 kibab-nb kernel: ACPI Exception (evregion-0529): AE_NO_HARDWARE_RESPONSE, Returned by Handler for [EmbeddedControl] [20070320] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D These messages repeat constantly till rebooting. After that I can't query battery state through "acpiconf -i 0" -- it either reports constant charge percent (for example, 48% -- till laptop shutdowns due to low charge) or reports nothing. Just in case anyone has the same problems with ACPI, I want to share my workaround for this problem, and ask if it is the right way to deal with it. My system is set up to use "burst mode" to query EC (debug.acpi.ec.burst=3D1 in sysctl.conf, and reverting back to burst=3D0 on shutdown to prevent soft reset instead of normal shutdown). After described event occurs, system also sets "debug.acpi.ec.polled" to 1. But, as I understand, laptop's BIOS doesn't support operating in polled mode. If I manually set debug.acpi.ec.polled back to 0, problem goes away -- I can query battery status as before! I've slightly patched sys/dev/acpi/acpi_ec.c (patch is attached) to add new sysctl OID "debeg.acpi.ec.disable_polling". Setting it to 1 prevents going to polled mode. I set it from /etc/sysctl.conf on boot. Now I have no problems with battery status (and other EC interaction, as I guess). I hope someone will find this patch useful, or will have some suggestions how to do it better. P.S. I'm running FreeBSD 7.1-STABLE i386, system dmesg may be found here: http://dl.kibab.com/dell_vostro_1310_A12_dmesg.log --=20 Ilya Bakulin xmpp://kibab612@jabber.ru --=-9IEzOQBN4p+R9MZFrs6a Content-Disposition: attachment; filename="acpi_ec_addon.diff" Content-Type: text/x-patch; name="acpi_ec_addon.diff"; charset="KOI8-R" Content-Transfer-Encoding: base64 LS0tIC91c3Ivc3JjL3N5cy9kZXYvYWNwaWNhL2FjcGlfZWMuYy5vcmlnCTIwMDktMDEtMjAgMDc6 NDA6MTEuMDAwMDAwMDAwICswMzAwDQorKysgL3Vzci9zcmMvc3lzL2Rldi9hY3BpY2EvYWNwaV9l Yy5jCTIwMDktMDEtMjAgMDc6NDc6MDEuMDAwMDAwMDAwICswMzAwDQpAQCAtMTk1LDYgKzE5NSwx MCBAQA0KIFNZU0NUTF9JTlQoX2RlYnVnX2FjcGlfZWMsIE9JRF9BVVRPLCB0aW1lb3V0LCBDVExG TEFHX1JXLCAmZWNfdGltZW91dCwNCiAgICAgRUNfVElNRU9VVCwgIlRvdGFsIHRpbWUgc3BlbnQg d2FpdGluZyBmb3IgYSByZXNwb25zZSAocG9sbCtzbGVlcCkiKTsNCiANCitzdGF0aWMgaW50CWVj X2Rpc2FibGVfcG9sbGluZzsNCitTWVNDVExfSU5UKF9kZWJ1Z19hY3BpX2VjLCBPSURfQVVUTywg ZGlzYWJsZV9wb2xsaW5nLCBDVExGTEFHX1JXLCAmZWNfZGlzYWJsZV9wb2xsaW5nLCAwLA0KKyAg ICAiVG90YWxseSBkaXNhYmxlIHVzZSBvZiBwb2xsZWQgbW9kZSAoRGVsbCBFQyBwcm9ibGVtIHdv cmthcm91bmQpIik7DQorDQogc3RhdGljIEFDUElfU1RBVFVTDQogRWNMb2NrKHN0cnVjdCBhY3Bp X2VjX3NvZnRjICpzYykNCiB7DQpAQCAtODkyLDcgKzg5NiwxMSBAQA0KIAkgICAgZGV2aWNlX3By aW50ZihzYy0+ZWNfZGV2LA0KIAkJIndhaXQgdGltZWQgb3V0ICglc3Jlc3BvbnNlKSwgZm9yY2lu ZyBwb2xsZWQgbW9kZVxuIiwNCiAJCVN0YXR1cyA9PSBBRV9PSyA/ICIiIDogIm5vICIpOw0KLQkg ICAgZWNfcG9sbGVkX21vZGUgPSBUUlVFOw0KKwkgICAgaWYgKGVjX2Rpc2FibGVfcG9sbGluZykg ew0KKwkJZGV2aWNlX3ByaW50ZihzYy0+ZWNfZGV2LCAiUG9sbGluZyBleHBsaWNpdGx5IGRpc2Fi bGVkISBDb250aW51ZSB3YWl0aW5nIGZvciBnZW5lcmF0ZWQgR1BFcy4uLlxuIik7DQorCSAgICB9 IGVsc2Ugew0KKwkJZWNfcG9sbGVkX21vZGUgPSBUUlVFOw0KKwkgICAgfQ0KIAl9DQogICAgIH0N CiAgICAgaWYgKFN0YXR1cyAhPSBBRV9PSykNCg== --=-9IEzOQBN4p+R9MZFrs6a-- --=-HtyI8ZXFqPJSego7sc22 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: =?koi8-r?Q?=FC=D4=C1?= =?koi8-r?Q?_=DE=C1=D3=D4=D8?= =?koi8-r?Q?_=D3=CF=CF=C2=DD=C5=CE=C9=D1?= =?koi8-r?Q?_=D0=CF=C4=D0=C9=D3=C1=CE=C1?= =?koi8-r?Q?_=C3=C9=C6=D2=CF=D7=CF=CA?= =?koi8-r?Q?_=D0=CF=C4=D0=C9=D3=D8=C0?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEABECAAYFAkl8JzwACgkQo9vlj1oadwg8ZgCg1LEcYN+gc9Hlin/teRI2YMXL tFQAn0wvzqM+6Z+5/cqBlFCY0Kxb9V7i =auov -----END PGP SIGNATURE----- --=-HtyI8ZXFqPJSego7sc22-- --DSPAM_MULTIPART_EX-96700 Content-Type: text/plain X-DSPAM-Signature: 497c2736967001885613896 !DSPAM:497c2736967001885613896! --DSPAM_MULTIPART_EX-96700-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 26 09:52:04 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 318631065672 for ; Mon, 26 Jan 2009 09:52:04 +0000 (UTC) (envelope-from lvj@nietykalni.org) Received: from po-out-1718.google.com (po-out-1718.google.com [72.14.252.153]) by mx1.freebsd.org (Postfix) with ESMTP id 164458FC08 for ; Mon, 26 Jan 2009 09:52:03 +0000 (UTC) (envelope-from lvj@nietykalni.org) Received: by po-out-1718.google.com with SMTP id b23so3277358poe.3 for ; Mon, 26 Jan 2009 01:52:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.115.110.15 with SMTP id n15mr1165281wam.16.1232962550733; Mon, 26 Jan 2009 01:35:50 -0800 (PST) Date: Mon, 26 Jan 2009 10:35:50 +0100 Message-ID: <3930e0780901260135j1428e77fmfe7392770fcd31fc@mail.gmail.com> From: Lukasz Jaroszewski To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: write(2) to /dev/ad4 = EINVAL 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, 26 Jan 2009 09:52:04 -0000 Hi, after opening /dev/ad4 with success for O_RDWR, I am getting [EINVAL] from write(2), which according to man 2 write, means `` [EINVAL] The pointer associated with d was negative.'', as you can see below it is not true, I have tried different block sizes, with same result. How can I write one byte to /dev/adN ? 1361 ow CALL open(0x80485e3,O_RDWR,0xbfbfecc8) 1361 ow NAMI "/dev/ad4" ;/dev/ad4 is DOS FAT formatted CF Card. 1361 ow RET open 3 1361 ow CALL write(0x3,0xbfbfecb8,0x8) 1361 ow RET write -1 errno 22 Invalid argument root@~(0) uname -r 7.0-STABLE ----------- Best Regards Lukasz. From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 26 10:07: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 C6B8C10656BD for ; Mon, 26 Jan 2009 10:07:20 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 5AD6C8FC1F for ; Mon, 26 Jan 2009 10:07:20 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=6I5d2MoRAAAA:8 a=5E7JUROi1AhxMIt08LoA:9 a=vImgDvcXfFv7YKRyhLYA:7 a=2vpgLvEIT43tJLxv7x6mEImAZa8A:4 a=SV7veod9ZcQA:10 a=LY0hPdMaydYA:10 Received: from [85.19.218.115] (account mc467741@c2i.net HELO [10.37.1.92]) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1083449352; Mon, 26 Jan 2009 11:07:18 +0100 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Mon, 26 Jan 2009 11:09:42 +0100 User-Agent: KMail/1.9.7 References: <3930e0780901260135j1428e77fmfe7392770fcd31fc@mail.gmail.com> In-Reply-To: <3930e0780901260135j1428e77fmfe7392770fcd31fc@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901261109.43376.hselasky@c2i.net> Cc: Lukasz Jaroszewski Subject: Re: write(2) to /dev/ad4 = EINVAL 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, 26 Jan 2009 10:07:22 -0000 On Monday 26 January 2009, Lukasz Jaroszewski wrote: > Hi, > after opening /dev/ad4 with success for O_RDWR, I am getting [EINVAL] > from write(2), which according to man 2 write, means > `` [EINVAL] The pointer associated with d was > negative.'', as you can see below it is not true, I have tried > different block sizes, with same result. > > How can I write one byte to /dev/adN ? Hi, You cannot write one byte to /dev/adN, I think. Harddisks are block based. Please see: diskinfo -v ad4 And especially the "sector size". When you seek and transfer data the offset and length must be a factor of the "sector size" or "block size". See also LBA, logical block address. --HPS > > > 1361 ow CALL open(0x80485e3,O_RDWR,0xbfbfecc8) > 1361 ow NAMI "/dev/ad4" > ;/dev/ad4 is DOS FAT formatted CF Card. > 1361 ow RET open 3 > > 1361 ow CALL write(0x3,0xbfbfecb8,0x8) > 1361 ow RET write -1 errno 22 Invalid argument > > root@~(0) uname -r > 7.0-STABLE > ----------- > Best Regards > Lukasz. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 26 10:24:49 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 E0554106564A for ; Mon, 26 Jan 2009 10:24:49 +0000 (UTC) (envelope-from lvj@nietykalni.org) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.235]) by mx1.freebsd.org (Postfix) with ESMTP id C021D8FC1D for ; Mon, 26 Jan 2009 10:24:49 +0000 (UTC) (envelope-from lvj@nietykalni.org) Received: by rv-out-0506.google.com with SMTP id b25so5905542rvf.43 for ; Mon, 26 Jan 2009 02:24:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.201.1 with SMTP id y1mr2730196waf.154.1232965488696; Mon, 26 Jan 2009 02:24:48 -0800 (PST) In-Reply-To: <200901261109.43376.hselasky@c2i.net> References: <3930e0780901260135j1428e77fmfe7392770fcd31fc@mail.gmail.com> <200901261109.43376.hselasky@c2i.net> Date: Mon, 26 Jan 2009 11:24:48 +0100 Message-ID: <3930e0780901260224ye4acbabx7a629ec8da195138@mail.gmail.com> From: Lukasz Jaroszewski To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: write(2) to /dev/ad4 = EINVAL 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, 26 Jan 2009 10:24:50 -0000 2009/1/26 Hans Petter Selasky : > On Monday 26 January 2009, Lukasz Jaroszewski wrote: >> Hi, >> after opening /dev/ad4 with success for O_RDWR, I am getting [EINVAL] >> from write(2), which according to man 2 write, means >> `` [EINVAL] The pointer associated with d was >> negative.'', as you can see below it is not true, I have tried >> different block sizes, with same result. >> >> How can I write one byte to /dev/adN ? > > Hi, > > You cannot write one byte to /dev/adN, I think. Harddisks are block based. > Please see: > > diskinfo -v ad4 > > And especially the "sector size". When you seek and transfer data the offset > and length must be a factor of the "sector size" or "block size". See also > LBA, logical block address. Yes, I have tried with bs=512 and multiplies, no luck. root@~(0) diskinfo -v ad4 ad4 512 # sectorsize 2029805568 # mediasize in bytes (1.9G) 3964464 # mediasize in sectors 3933 # Cylinders according to firmware. 16 # Heads according to firmware. 63 # Sectors according to firmware. ad:CFx20CARDx200000190C # Disk ident. ------------ Best Regards Lukasz. > > --HPS > > >> >> >> 1361 ow CALL open(0x80485e3,O_RDWR,0xbfbfecc8) >> 1361 ow NAMI "/dev/ad4" >> ;/dev/ad4 is DOS FAT formatted CF Card. >> 1361 ow RET open 3 >> >> 1361 ow CALL write(0x3,0xbfbfecb8,0x8) >> 1361 ow RET write -1 errno 22 Invalid argument >> >> root@~(0) uname -r >> 7.0-STABLE >> ----------- >> Best Regards >> Lukasz. >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > > From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 26 10:31:28 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 CBF6E106564A for ; Mon, 26 Jan 2009 10:31:28 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.swip.net [212.247.154.65]) by mx1.freebsd.org (Postfix) with ESMTP id 5DED28FC0C for ; Mon, 26 Jan 2009 10:31:28 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=LM6s6kK2HmktTp5hIBEA:9 a=_ad5w0irk8D5ob9HfnsA:7 a=CWb9w0avl5R_JSKTsWGeTBFdBVQA:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [85.19.218.115] (account mc467741@c2i.net HELO [10.37.1.92]) by mailfe03.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1190351307; Mon, 26 Jan 2009 11:31:26 +0100 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Mon, 26 Jan 2009 11:33:51 +0100 User-Agent: KMail/1.9.7 References: <3930e0780901260135j1428e77fmfe7392770fcd31fc@mail.gmail.com> <200901261109.43376.hselasky@c2i.net> <3930e0780901260224ye4acbabx7a629ec8da195138@mail.gmail.com> In-Reply-To: <3930e0780901260224ye4acbabx7a629ec8da195138@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901261133.51924.hselasky@c2i.net> Cc: Lukasz Jaroszewski Subject: Re: write(2) to /dev/ad4 = EINVAL 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, 26 Jan 2009 10:31:29 -0000 On Monday 26 January 2009, Lukasz Jaroszewski wrote: > 2009/1/26 Hans Petter Selasky : > > On Monday 26 January 2009, Lukasz Jaroszewski wrote: > >> Hi, > >> after opening /dev/ad4 with success for O_RDWR, I am getting [EINVAL] > >> from write(2), which according to man 2 write, means > >> `` [EINVAL] The pointer associated with d was > >> negative.'', as you can see below it is not true, I have tried > >> different block sizes, with same result. > >> > >> How can I write one byte to /dev/adN ? > > > > Hi, > > > > You cannot write one byte to /dev/adN, I think. Harddisks are block > > based. Please see: > > > > diskinfo -v ad4 > > > > And especially the "sector size". When you seek and transfer data the > > offset and length must be a factor of the "sector size" or "block size". > > See also LBA, logical block address. > > Yes, I have tried with bs=512 and multiplies, no luck. > > root@~(0) diskinfo -v ad4 > ad4 > 512 # sectorsize > 2029805568 # mediasize in bytes (1.9G) > 3964464 # mediasize in sectors > 3933 # Cylinders according to firmware. > 16 # Heads according to firmware. > 63 # Sectors according to firmware. > ad:CFx20CARDx200000190C # Disk ident. > And if you add a "lseek(f, 0, SEEK_SET);" after open? --HPS From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 26 10:31: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 5B8371065676 for ; Mon, 26 Jan 2009 10:31:54 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 9A5CA8FC23 for ; Mon, 26 Jan 2009 10:31:53 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 26 Jan 2009 10:31:51 -0000 Received: from p54A3E512.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.229.18] by mail.gmx.net (mp041) with SMTP; 26 Jan 2009 11:31:51 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1+Ty1A3IqGTK1gFzZ5LKhS3ncuXbiYSvyUxBhUUgX yg/HUCBKC+RCrr Message-ID: <497D9116.1040408@gmx.de> Date: Mon, 26 Jan 2009 11:31:50 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Lukasz Jaroszewski References: <3930e0780901260135j1428e77fmfe7392770fcd31fc@mail.gmail.com> <200901261109.43376.hselasky@c2i.net> <3930e0780901260224ye4acbabx7a629ec8da195138@mail.gmail.com> In-Reply-To: <3930e0780901260224ye4acbabx7a629ec8da195138@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.51 Cc: freebsd-hackers@freebsd.org, Hans Petter Selasky Subject: Re: write(2) to /dev/ad4 = EINVAL 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, 26 Jan 2009 10:31:54 -0000 Lukasz Jaroszewski schrieb: > 2009/1/26 Hans Petter Selasky : >> On Monday 26 January 2009, Lukasz Jaroszewski wrote: >>> Hi, >>> after opening /dev/ad4 with success for O_RDWR, I am getting [EINVAL] >>> from write(2), which according to man 2 write, means >>> `` [EINVAL] The pointer associated with d was >>> negative.'', as you can see below it is not true, I have tried >>> different block sizes, with same result. >>> >>> How can I write one byte to /dev/adN ? >> Hi, >> >> You cannot write one byte to /dev/adN, I think. Harddisks are block based. >> Please see: >> >> diskinfo -v ad4 >> >> And especially the "sector size". When you seek and transfer data the offset >> and length must be a factor of the "sector size" or "block size". See also >> LBA, logical block address. > > > Yes, I have tried with bs=512 and multiplies, no luck. > > root@~(0) diskinfo -v ad4 > ad4 > 512 # sectorsize > 2029805568 # mediasize in bytes (1.9G) > 3964464 # mediasize in sectors > 3933 # Cylinders according to firmware. > 16 # Heads according to firmware. > 63 # Sectors according to firmware. > ad:CFx20CARDx200000190C # Disk ident. It would be helpful, if you showed the actual code, instead of letting us guess what you are doing. From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 26 13:04:28 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 6195210656D1 for ; Mon, 26 Jan 2009 13:04:28 +0000 (UTC) (envelope-from lvj@nietykalni.org) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.176]) by mx1.freebsd.org (Postfix) with ESMTP id 3FC238FC13 for ; Mon, 26 Jan 2009 13:04:28 +0000 (UTC) (envelope-from lvj@nietykalni.org) Received: by wa-out-1112.google.com with SMTP id k34so501776wah.27 for ; Mon, 26 Jan 2009 05:04:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.56.1 with SMTP id e1mr2565546waa.19.1232975067834; Mon, 26 Jan 2009 05:04:27 -0800 (PST) In-Reply-To: <497D9116.1040408@gmx.de> References: <3930e0780901260135j1428e77fmfe7392770fcd31fc@mail.gmail.com> <200901261109.43376.hselasky@c2i.net> <3930e0780901260224ye4acbabx7a629ec8da195138@mail.gmail.com> <497D9116.1040408@gmx.de> Date: Mon, 26 Jan 2009 14:04:27 +0100 Message-ID: <3930e0780901260504m44f43958m82f2ba8902558906@mail.gmail.com> From: Lukasz Jaroszewski To: Christoph Mallon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Hans Petter Selasky Subject: Re: write(2) to /dev/ad4 = EINVAL 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, 26 Jan 2009 13:04:29 -0000 2009/1/26 Christoph Mallon : > Lukasz Jaroszewski schrieb: >> >> 2009/1/26 Hans Petter Selasky : >>> >>> On Monday 26 January 2009, Lukasz Jaroszewski wrote: >>>> >>>> Hi, >>>> after opening /dev/ad4 with success for O_RDWR, I am getting [EINVAL] >>>> from write(2), which according to man 2 write, means >>>> `` [EINVAL] The pointer associated with d was >>>> negative.'', as you can see below it is not true, I have tried >>>> different block sizes, with same result. >>>> >>>> How can I write one byte to /dev/adN ? >>> >>> Hi, >>> >>> You cannot write one byte to /dev/adN, I think. Harddisks are block >>> based. >>> Please see: >>> >>> diskinfo -v ad4 >>> >>> And especially the "sector size". When you seek and transfer data the >>> offset >>> and length must be a factor of the "sector size" or "block size". See >>> also >>> LBA, logical block address. >> >> >> Yes, I have tried with bs=512 and multiplies, no luck. >> >> root@~(0) diskinfo -v ad4 >> ad4 >> 512 # sectorsize >> 2029805568 # mediasize in bytes (1.9G) >> 3964464 # mediasize in sectors >> 3933 # Cylinders according to firmware. >> 16 # Heads according to firmware. >> 63 # Sectors according to firmware. >> ad:CFx20CARDx200000190C # Disk ident. > > It would be helpful, if you showed the actual code, instead of letting us > guess what you are doing. Ok, I solved that, I were trying to dd with bs correctly set, tho if=./s wasn't big enough plus I had code like below, where I didn't check write for errors, just called perror, which gave me wrong errno. So to change one byte, I need to read it, change it, and write it in 512 chunks? or play with kernel and add smth like ``write_byte'' to ata? I am sorry for bothering with my silly errors. #define S 0x200 int main(int argc, char **argv){ int fd,i=0; char *s; s = malloc(S); for(i=0;i From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 26 13:08:35 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 BD0231065674; Mon, 26 Jan 2009 13:08:35 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (unknown [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 26B0B8FC14; Mon, 26 Jan 2009 13:08:34 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id n0QD8X38058157; Mon, 26 Jan 2009 14:08:33 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id n0QD8WwD058156; Mon, 26 Jan 2009 14:08:32 +0100 (CET) (envelope-from olli) From: Oliver Fromme Message-Id: <200901261308.n0QD8WwD058156@lurza.secnetix.de> To: dougb@FreeBSD.org (Doug Barton) Date: Mon, 26 Jan 2009 14:08:32 +0100 (CET) In-Reply-To: <497B9743.6080109@FreeBSD.org> X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Mon, 26 Jan 2009 14:08:33 +0100 (CET) Cc: freebsd-hackers@FreeBSD.org Subject: Re: freebsd-update's install_verify routine excessive stating 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, 26 Jan 2009 13:08:36 -0000 Doug Barton wrote: > Oliver Fromme wrote: > > However, I think cmp wouldn't work here, because cmp only > > detects whether there is a difference between two files. > > > > In this case we need to know if one file is a subset of > > the other: For every hash there must be a .gz file, but > > it doesn't hurt if there are more files. So the list of > > hashes can be a subset of the list of .gz files, they > > don't have to be equal. > > Hrrmmm, that doesn't sound like a good thing to me. I would think that > the hash list is pretty useless if it doesn't cover all the files. Right, that's why there should be a file for every entry in the hash list -- but not necessarily the other way around. I.e. I think freebsd-update should not abort if there are superfluous files. > > While I were at it, I skimmed through the cmp source and > > found a bug (or inefficiency): When the -s option is > > specified (i.e. silent, exit code only), it would be > > sufficient to terminate when the first difference is > > encountered. But it always compares the whole files. > > I'll try to make a patch to improve this. > > That would definitely be appreciated, I use cmp -s in several places > in portmaster where that speed-up would make a non-trivial difference. > If there is anything I can do to help please let me know. I was wrong, the -s option behaves correctly. Sorry for the confusion. I ended up in the wrong code path in the source (I was confused by the fact that the diffmsg() function never returns). Indeed, cmp(1) stops comparing the files as son as it finds the first differing byte, unless you use the -l or -x option. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd One Unix to rule them all, One Resolver to find them, One IP to bring them all and in the zone to bind them. From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 26 17:08:02 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 D3669106566B for ; Mon, 26 Jan 2009 17:08:02 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe15.swipnet.se [212.247.155.193]) by mx1.freebsd.org (Postfix) with ESMTP id 6864D8FC0A for ; Mon, 26 Jan 2009 17:08:02 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=2V2iuldQSBbWmav1FwkA:9 a=elbioWvLvWQVDFzLKO4A:7 a=QvjUidVIBIIgDWhrYG5pwPrywScA:4 a=_RhRFcbxBZMA:10 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [85.19.218.115] (account mc467741@c2i.net HELO [10.37.1.92]) by mailfe15.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 440169506; Mon, 26 Jan 2009 15:07:59 +0100 From: Hans Petter Selasky To: Lukasz Jaroszewski Date: Mon, 26 Jan 2009 15:10:24 +0100 User-Agent: KMail/1.9.7 References: <3930e0780901260135j1428e77fmfe7392770fcd31fc@mail.gmail.com> <497D9116.1040408@gmx.de> <3930e0780901260504m44f43958m82f2ba8902558906@mail.gmail.com> In-Reply-To: <3930e0780901260504m44f43958m82f2ba8902558906@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200901261510.25074.hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org, Christoph Mallon Subject: Re: write(2) to /dev/ad4 = EINVAL 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, 26 Jan 2009 17:08:03 -0000 On Monday 26 January 2009, Lukasz Jaroszewski wrote: > 2009/1/26 Christoph Mallon : > > Lukasz Jaroszewski schrieb: > >> 2009/1/26 Hans Petter Selasky : > >>> On Monday 26 January 2009, Lukasz Jaroszewski wrote: Hi, > > It would be helpful, if you showed the actual code, instead of letting = us > > guess what you are doing. > > Ok, I solved that, I were trying to dd with bs correctly set, tho > if=3D./s wasn't big enough plus I had code like below, where I didn't > check write for errors, just called perror, which gave me wrong errno. > > So to change one byte, I need to read it, change it, and write it in > 512 chunks?=20 Yes! Maybe you should not write single bytes at a time in your design. > or play with kernel and add smth like ``write_byte'' to=20 > ata? =46rom my knowledge there is no standard harddisk command or SCSI command t= hat=20 can change only one byte at a time of the disk. It is all block based. And= =20 note that the block size can be different from 512 bytes. =2D-HPS From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 26 18:41:32 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 264D2106567D; Mon, 26 Jan 2009 18:41:32 +0000 (UTC) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (green.homeunix.org [66.92.150.152]) by mx1.freebsd.org (Postfix) with ESMTP id BF2A58FC1D; Mon, 26 Jan 2009 18:41:31 +0000 (UTC) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (obama@localhost [127.0.0.1]) by green.homeunix.org (8.14.3/8.14.1) with ESMTP id n0QIfTnS057463; Mon, 26 Jan 2009 13:41:29 -0500 (EST) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.14.3/8.14.1/Submit) id n0QIfSBN057462; Mon, 26 Jan 2009 13:41:28 -0500 (EST) (envelope-from green) Date: Mon, 26 Jan 2009 13:41:26 -0500 From: Brian Fundakowski Feldman To: Daniel Eischen Message-ID: <20090126184126.GA3712@green.homeunix.org> References: <4966F81C.3070406@elischer.org> <20090109163426.GC2825@green.homeunix.org> <49678BBC.8050306@elischer.org> <20090116211959.GA12007@green.homeunix.org> <49710BD6.7040705@FreeBSD.org> <20090120004135.GB12007@green.homeunix.org> <20090121230033.GC12007@green.homeunix.org> <20090122045637.GA61058@zim.MIT.EDU> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Cc: David Schultz , hackers@freebsd.org, Jason Evans , Julian Elischer Subject: Re: threaded, forked, rethreaded processes will deadlock 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, 26 Jan 2009 18:41:32 -0000 On Thu, Jan 22, 2009 at 12:42:56AM -0500, Daniel Eischen wrote: > On Wed, 21 Jan 2009, David Schultz wrote: > >> I think there *is* a real bug here, but there's two distinct ways >> to fix it. When a threaded process forks, malloc acquires all its >> locks so that its state is consistent after a fork. However, the >> post-fork hook that's supposed to release these locks fails to do >> so in the child because the child process isn't threaded, and >> malloc_mutex_unlock() is optimized to be a no-op in >> single-threaded processes. If the child *stays* single-threaded, >> malloc() works by accident even with all the locks held because >> malloc_mutex_lock() is also a no-op in single-threaded processes. >> But if the child goes multi-threaded, then things break. >> >> Solution 1 is to actually unlock the locks in the child process, >> which is what Brian is proposing. >> >> Solution 2 is to take the position that all of this pre- and >> post-fork bloat in the fork() path is gratuitous and should be >> removed. The rationale here is that if you fork with multiple >> running threads, there's scads of ways in which the child's heap >> could be inconsistent; fork hooks would be needed not just in >> malloc(), but in stdio, third party libraries, etc. Why should >> malloc() be special? It's the programmer's job to quiesce all the >> threads before calling fork(), and if the programmer doesn't do >> this, then POSIX only guarantees that async-signal-safe functions >> will work. >> >> Note that Solution 2 also fixes Brian's problem if he quiesces all >> of his worker threads before forking (as he should!) With the >> pre-fork hook removed, all the locks will start out free in the >> child. So that's what I vote for... > > The problem is that our own libraries (libthr included) > need to malloc() for themselves, even after a fork() in > the child. After a fork(), the malloc locks should be > reinitialized in the child if it was threaded, so that > our implementation actually works for all the async > signal calls, fork(), exec(), etc. I forget the exact > failure modes for very common cases, but if you remove > the re-initialization of the malloc locks, I'm sure > you will have problems. > > Perhaps much of this malloc() stuff goes away when we > move to pthread locks that are not pointers to allocated > objects, but instead are actual objects/structures. > This needs to be done in order for mutexes/CVs/etc > to be PTHREAD_PROCESS_SHARED (placed in shared memory > and used by multiple processes). In other words, > pthread_mutex_t goes from this: > > typedef struct pthread_mutex *pthread_mutex_t; > > to something like this: > > struct __pthread_mutex { > uint32_t lock; > ... > } > typedef struct __pthread_mutex pthread_mutex_t; > > Same thing for CVs, and we probably should convert any other > locks used internally by libc/libpthread (spinlocks). > > So after a fork(), there is no need to reallocate anything, > it can just be reinitialized if necessary. In this case it's not a matter of locks needing to be again initialized -- the mutexes are fine -- they just need to be relinquished, which never occurs for the child now, but used to work fine in 7.0. What is truly broken about the current behavior module the bug I'm trying to fix? -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 26 20:55:33 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 3AF0810656BB; Mon, 26 Jan 2009 20:55:33 +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 BAA058FC1E; Mon, 26 Jan 2009 20:55:32 +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.2) with ESMTP id n0QKMadk093274; Mon, 26 Jan 2009 21:22:36 +0100 (CET) (envelope-from sos@deepcore.dk) Message-Id: From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= To: current , hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v930.3) Date: Mon, 26 Jan 2009 21:22:36 +0100 X-Mailer: Apple Mail (2.930.3) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (deepcore.dk [87.63.29.106]); Mon, 26 Jan 2009 21:22:36 +0100 (CET) Cc: Subject: WANTED! board models with Marvell 61XX chips 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, 26 Jan 2009 20:55:35 -0000 Hi there! I thought I finally had a motherboard using one of the Marvell SATA/=20 PATA chips coming in, but unfortunately the delivery has been =20 postponed to some unspecified date, oh well.. Thats where you come into the picture as I'd like to get another one, =20= but finding boards that uses these is a bit tricky as most vendors =20 doesn't write such unimportant stuff on their web pages (hell it works =20= in windows!). If you have a motherboard using one of the following Marvell chips, or =20= know for certain a model that does, please send me a private mail with =20= make and model as there is no need to pollute the lists (which I dont =20= follow closely for the time being btw). The chips in question are: Marvell 6111, 6121, 6141 or 6145 It is also important that there is physical access to both the SATA =20 and the PATA port(s) as some boards only utilize one or the other. I know of one PCI-express add-in board that uses the 6145, so if =20 anybody knows how to get ahold of one, that would be very welcomed as =20= well. The board in question is this: = http://www.sunix.com.tw/it/en/Product_Detail.php?cate=3D2&class_a_id=3D35&= sid=3D538 So far I've only found shops in South Africa that has it available, =20 but none of them ships outside the country. So if you have any useful info on this topic please get in touch with =20= me, thanks! -S=F8ren -- From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 26 21:57: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 3162710656C4 for ; Mon, 26 Jan 2009 21:57:39 +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 762508FC24 for ; Mon, 26 Jan 2009 21:57:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id 02FCD46B0C; Mon, 26 Jan 2009 16:57:36 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n0QLvJkB080649; Mon, 26 Jan 2009 16:57:30 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 26 Jan 2009 16:51:28 -0500 User-Agent: KMail/1.9.7 References: <20071220093950.GA79196@server.vk2pj.dyndns.org> <20071221181125.0B6F25B42@mail.bitblocks.com> <20071221201633.GM57756@deviant.kiev.zoral.com.ua> In-Reply-To: <20071221201633.GM57756@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901261651.29116.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 26 Jan 2009 16:57:31 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8905/Mon Jan 26 12:29:36 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Kostik Belousov , Carl Shapiro Subject: Re: critical floating point incompatibility 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, 26 Jan 2009 21:57:46 -0000 On Friday 21 December 2007 3:16:33 pm Kostik Belousov wrote: > On Fri, Dec 21, 2007 at 10:11:24AM -0800, Bakul Shah wrote: > > Peter Jeremy wrote: > > > On Wed, Dec 19, 2007 at 09:40:34PM -0800, Carl Shapiro wrote: > > > >The default setting of the x87 floating point control word on the i386 > > > >port is 0x127F. Among other things, this value sets the precision > > > >control to double precision. The default setting of the x87 floating > > > >point control word on the AMD64 is 0x37F. > > > ... > > > >It seems clear that the right thing to do is to set the floating point > > > >environment to the i386 default for i386 binaries. Is the current > > > >behavior intended? > > > > > > I believe this is an oversight. See the thread beginning > > > http://lists.freebsd.org/pipermail/freebsd-stable/2007-November/037947.html > > > > >From reading Bruce's last message in that thread, seems to me > > may be default for 64bit binaries should be the same as on > > i386. Anyone wanting different behavior can always call > > fpsetprec() etc. > > > > I think the fix is to change __INITIAL_FPUCW__ in > > /sys/amd64/include/fpu.h to 0x127F like on i386. > I think this shall be done for 32-bit processes only, or we get into > another ABI breaking nightmare. How about something like this: (Carl, can you please test this?) http://www.FreeBSD.org/~jhb/patches/amd64_fpu_i386.patch --- //depot/vendor/freebsd/src/sys/amd64/amd64/fpu.c 2006/06/19 22:39:16 +++ //depot/user/jhb/acpipci/amd64/amd64/fpu.c 2009/01/26 21:47:49 @@ -391,6 +391,7 @@ { struct pcb *pcb; register_t s; + u_short control; if (PCPU_GET(fpcurthread) == curthread) { printf("fpudna: fpcurthread == curthread %d times\n", @@ -421,6 +422,10 @@ * explicitly load sanitized registers. */ fxrstor(&fpu_cleanstate); + if (pcb->pcb_flags & PCB_32BIT) { + control = __INITIAL_FPUCW_I386__; + fldcw(&control); + } pcb->pcb_flags |= PCB_FPUINITDONE; } else fxrstor(&pcb->pcb_save); --- //depot/vendor/freebsd/src/sys/amd64/include/fpu.h 2004/04/05 21:30:47 +++ //depot/user/jhb/acpipci/amd64/include/fpu.h 2009/01/26 21:47:49 @@ -92,6 +92,7 @@ * SSE2 based math. For FreeBSD/amd64, we go with the default settings. */ #define __INITIAL_FPUCW__ 0x037F +#define __INITIAL_FPUCW_I386__ 0x127F #define __INITIAL_MXCSR__ 0x1F80 #define __INITIAL_MXCSR_MASK__ 0xFFBF -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 27 09:42:58 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 B9E9D1065673; Tue, 27 Jan 2009 09:42:58 +0000 (UTC) (envelope-from mike@reifenberger.com) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by mx1.freebsd.org (Postfix) with ESMTP id 3FC268FC14; Tue, 27 Jan 2009 09:42:57 +0000 (UTC) (envelope-from mike@reifenberger.com) Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 572731C01F85; Tue, 27 Jan 2009 10:25:28 +0100 (CET) Received: from localhost (dynscan2.mnet-online.de [192.168.1.215]) by mail.m-online.net (Postfix) with ESMTP id 3E0599015C; Tue, 27 Jan 2009 10:25:28 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan2.mnet-online.de [192.168.1.215]) (amavisd-new, port 10024) with ESMTP id Q-9SykinmLAu; Tue, 27 Jan 2009 10:25:27 +0100 (CET) Received: from mail.reifenberger.com (ppp-93-104-61-113.dynamic.mnet-online.de [93.104.61.113]) by mail.mnet-online.de (Postfix) with ESMTP; Tue, 27 Jan 2009 10:25:26 +0100 (CET) Received: by mail.reifenberger.com (Postfix, from userid 1001) id 5A5222AA34; Tue, 27 Jan 2009 10:25:26 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.reifenberger.com (Postfix) with ESMTP id 51FF72AA33; Tue, 27 Jan 2009 10:25:26 +0100 (CET) Date: Tue, 27 Jan 2009 10:25:26 +0100 (CET) From: Michael Reifenberger To: =?ISO-8859-15?Q?S=F8ren_Schmidt?= In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="29518260-508733382-1233048326=:29922" Cc: hackers@freebsd.org, current Subject: Re: WANTED! board models with Marvell 61XX chips 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, 27 Jan 2009 09:42:59 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --29518260-508733382-1233048326=:29922 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8BIT On Mon, 26 Jan 2009, Søren Schmidt wrote: > Date: Mon, 26 Jan 2009 21:22:36 +0100 > From: Søren Schmidt > To: current , hackers@freebsd.org > Subject: WANTED! board models with Marvell 61XX chips > > Hi there! > > I thought I finally had a motherboard using one of the Marvell SATA/PATA > chips coming in, but unfortunately the delivery has been postponed to some > unspecified date, oh well.. > > Thats where you come into the picture as I'd like to get another one, but > finding boards that uses these is a bit tricky as most vendors doesn't write > such unimportant stuff on their web pages (hell it works in windows!). > > If you have a motherboard using one of the following Marvell chips, or know > for certain a model that does, please send me a private mail with make and > model as there is no need to pollute the lists (which I dont follow closely > for the time being btw). > > The chips in question are: > > Marvell 6111, 6121, 6141 or 6145 > I have an ASUS M2N32 WS Professional which has an 6141 onboard. Both SATA and PATA are accessable. Bye/2 --- Michael Reifenberger Michael@Reifenberger.com http://www.Reifenberger.com --29518260-508733382-1233048326=:29922-- From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 27 11:41:42 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 C115C106566B for ; Tue, 27 Jan 2009 11:41:42 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from smtp.lamaiziere.net (net.lamaiziere.net [91.121.44.19]) by mx1.freebsd.org (Postfix) with ESMTP id 86BD88FC1D for ; Tue, 27 Jan 2009 11:41:42 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from baby-jane.lamaiziere.net (67.158.192-77.rev.gaoland.net [77.192.158.67]) by smtp.lamaiziere.net (Postfix) with ESMTPA id AA5F2633301 for ; Tue, 27 Jan 2009 12:41:41 +0100 (CET) Received: from baby-jane.lamaiziere.net (localhost [127.0.0.1]) by baby-jane.lamaiziere.net (Postfix) with ESMTP id C3662C184 for ; Tue, 27 Jan 2009 12:41:39 +0100 (CET) Date: Tue, 27 Jan 2009 12:41:37 +0100 From: Patrick =?ISO-8859-15?Q?Lamaizi=E8re?= To: freebsd-hackers@freebsd.org Message-ID: <20090127124137.46fcfac5@baby-jane.lamaiziere.net> Organization: /dave/nulle X-Mailer: Claws Mail 3.7.0 (GTK+ 2.12.11; i386-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Mackbook pro nvidia based video backlight 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, 27 Jan 2009 11:41:43 -0000 Hello, I've made a small driver to set the backlight level on Apple MacBook Pro, for the models based on the Nvida video card (model 3,1 and 3,2). (if it works on other models please tell me) At the moment this is a quick and dirty hack, but you don't need to wear a pair of sunglasses anymore! Module (FreeBSD 7.1): http://user.lamaiziere.net/patrick/ambnb-270109.tar.gz The driver does not check if the hardware is a suitable Macbook Pro (TODO!), so use with care. You can check the model of your Mac with dmidecode: Handle 0x0011, DMI type 1, 27 bytes System Information Manufacturer: Apple Inc. Product Name: MacBookPro3,1 Version: 1.0 There is a sysctl hw.ambnb.level to set the level of the backlight (0 <= level <= 15). I don't have the time for the moment, but i will try to improve it a bit. I'm asking which method will be the best to interface the driver with userland applications? Regards. From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 27 14:32:27 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 CC4D5106566B for ; Tue, 27 Jan 2009 14:32:27 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.26]) by mx1.freebsd.org (Postfix) with ESMTP id 571EE8FC36 for ; Tue, 27 Jan 2009 14:32:26 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: by ey-out-2122.google.com with SMTP id d26so857353eyd.7 for ; Tue, 27 Jan 2009 06:32:26 -0800 (PST) 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=0OiLgLEF8rIh89geJ7IzzhFg9i7Azu3OpZ7UgJYqOTw=; b=BH3ATDxi6jwkz8joPdpvg4mpOwtKZZ6MlRKuPQxq8zujj1bBbFLbnhywoA39ShlbTa UqbNh8eYTB6bj14FsL3L+kYmFZywrnUn3qFHub9uRXg2qWeQJ2B91AjwC+/JNTtuG3Ti 3dFL5xfDlzy2mI7i03LhblFSfXknNO/Bv1RVM= 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=MZB/PYND5AdbwjUWYg3j5WW/kKDe8qmO6cRgmNBoI1BUkXyFPM3p0P3i1B+kSdP5gb DvL1z5jJ8H+KVb5kF4FsaaS+pJ5WzQrHJMOdm/llsyswA0c94YI/2hgMlVBkxsQDpIYY SIwdTZWrSfTItYmkA5sMlZlMvBauRTIdKMIhQ= MIME-Version: 1.0 Received: by 10.102.247.4 with SMTP id u4mr880646muh.128.1233065234058; Tue, 27 Jan 2009 06:07:14 -0800 (PST) In-Reply-To: References: Date: Tue, 27 Jan 2009 15:07:13 +0100 Message-ID: <6101e8c40901270607i73baea4bxf903a6aab95afc29@mail.gmail.com> From: Oliver Pinter To: =?ISO-8859-1?Q?S=F8ren_Schmidt?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Tue, 27 Jan 2009 16:13:47 +0000 Cc: hackers@freebsd.org, current Subject: Re: WANTED! board models with Marvell 61XX chips 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, 27 Jan 2009 14:32:32 -0000 Hi ASUS P5Q-E has 88SE6121 On 1/26/09, S=F8ren Schmidt wrote: > Hi there! > > I thought I finally had a motherboard using one of the Marvell SATA/ > PATA chips coming in, but unfortunately the delivery has been > postponed to some unspecified date, oh well.. > > Thats where you come into the picture as I'd like to get another one, > but finding boards that uses these is a bit tricky as most vendors > doesn't write such unimportant stuff on their web pages (hell it works > in windows!). > > If you have a motherboard using one of the following Marvell chips, or > know for certain a model that does, please send me a private mail with > make and model as there is no need to pollute the lists (which I dont > follow closely for the time being btw). > > The chips in question are: > > Marvell 6111, 6121, 6141 or 6145 > > It is also important that there is physical access to both the SATA > and the PATA port(s) as some boards only utilize one or the other. > > I know of one PCI-express add-in board that uses the 6145, so if > anybody knows how to get ahold of one, that would be very welcomed as > well. The board in question is this: > http://www.sunix.com.tw/it/en/Product_Detail.php?cate=3D2&class_a_id=3D35= &sid=3D538 > So far I've only found shops in South Africa that has it available, > but none of them ships outside the country. > > So if you have any useful info on this topic please get in touch with > me, thanks! > > > -S=F8ren > -- > > > > > > > > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org= " > From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 27 17:02:16 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 E720C106566B for ; Tue, 27 Jan 2009 17:02:16 +0000 (UTC) (envelope-from op@trekdanne.se) Received: from hydrogen.nixihost.com (nixihost.com [75.126.199.194]) by mx1.freebsd.org (Postfix) with ESMTP id C06098FC27 for ; Tue, 27 Jan 2009 17:02:16 +0000 (UTC) (envelope-from op@trekdanne.se) Received: from c83-251-40-4.bredband.comhem.se ([83.251.40.4] helo=localhost) by hydrogen.nixihost.com with esmtpa (Exim 4.69) (envelope-from ) id 1LRpOE-0007Sw-3R for freebsd-hackers@freebsd.org; Tue, 27 Jan 2009 08:58:10 -0600 Date: Tue, 27 Jan 2009 16:00:41 +0100 From: Daniel Lannstrom To: freebsd-hackers@freebsd.org Message-ID: <20090127150040.GA4333@haruhi> References: <20090127124137.46fcfac5@baby-jane.lamaiziere.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090127124137.46fcfac5@baby-jane.lamaiziere.net> User-Agent: Mutt/1.5.18 (2008-05-17) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hydrogen.nixihost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - trekdanne.se X-Source: X-Source-Args: X-Source-Dir: Subject: Re: Mackbook pro nvidia based video backlight 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, 27 Jan 2009 17:02:17 -0000 > I'm asking which method will be the best to interface the driver with > userland applications? You might want to make it a character device driver. And write a small userland control program. Sysctl isn't really made for this kind of functionality. From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 27 17:55:39 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 E877B106564A; Tue, 27 Jan 2009 17:55:39 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mxout4.cac.washington.edu (mxout4.cac.washington.edu [140.142.33.19]) by mx1.freebsd.org (Postfix) with ESMTP id BC4C08FC08; Tue, 27 Jan 2009 17:55:39 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.141] (may be forged)) by mxout4.cac.washington.edu (8.14.3+UW08.09/8.14.3+UW08.11) with ESMTP id n0RHtZS3014179 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 27 Jan 2009 09:55:35 -0800 X-Auth-Received: from [192.168.10.7] (adsl-99-146-97-242.dsl.pltn13.sbcglobal.net [99.146.97.242]) (authenticated authid=youshi10) by smtp.washington.edu (8.14.3+UW08.09/8.14.3+UW08.11) with ESMTP id n0RHtXte011391 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 27 Jan 2009 09:55:34 -0800 Message-Id: <92231DDF-6ACE-467D-AD8F-CF31740F365F@gmail.com> From: Garrett Cooper To: Oliver Pinter In-Reply-To: <6101e8c40901270607i73baea4bxf903a6aab95afc29@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v930.3) Date: Tue, 27 Jan 2009 10:00:28 -0800 References: <6101e8c40901270607i73baea4bxf903a6aab95afc29@mail.gmail.com> X-Mailer: Apple Mail (2.930.3) X-PMX-Version: 5.5.0.356843, Antispam-Engine: 2.6.1.350677, Antispam-Data: 2009.1.27.174318 X-Uwash-Spam: Gauge=IIIIIII, Probability=8%, Report='FORGED_FROM_GMAIL 0.1, BODY_SIZE_1700_1799 0, BODY_SIZE_5000_LESS 0, __BOUNCE_CHALLENGE_SUBJ 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FRAUD_419_LOC 0, __FRAUD_419_WEBMAIL 0, __FRAUD_419_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __STOCK_SUBJ_9 0' Cc: hackers@freebsd.org, current , =?ISO-8859-1?Q?S=F8ren_Schmidt?= Subject: Re: WANTED! board models with Marvell 61XX chips 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, 27 Jan 2009 17:55:40 -0000 On Jan 27, 2009, at 6:07 AM, Oliver Pinter wrote: > Hi ASUS P5Q-E has 88SE6121 > > On 1/26/09, S=F8ren Schmidt wrote: >> Hi there! >> >> I thought I finally had a motherboard using one of the Marvell SATA/ >> PATA chips coming in, but unfortunately the delivery has been >> postponed to some unspecified date, oh well.. >> >> Thats where you come into the picture as I'd like to get another one, >> but finding boards that uses these is a bit tricky as most vendors >> doesn't write such unimportant stuff on their web pages (hell it =20 >> works >> in windows!). >> >> If you have a motherboard using one of the following Marvell chips, =20= >> or >> know for certain a model that does, please send me a private mail =20 >> with >> make and model as there is no need to pollute the lists (which I dont >> follow closely for the time being btw). >> >> The chips in question are: >> >> Marvell 6111, 6121, 6141 or 6145 >> >> It is also important that there is physical access to both the SATA >> and the PATA port(s) as some boards only utilize one or the other. >> >> I know of one PCI-express add-in board that uses the 6145, so if >> anybody knows how to get ahold of one, that would be very welcomed as >> well. The board in question is this: >> = http://www.sunix.com.tw/it/en/Product_Detail.php?cate=3D2&class_a_id=3D35&= sid=3D538 >> So far I've only found shops in South Africa that has it available, >> but none of them ships outside the country. >> >> So if you have any useful info on this topic please get in touch with >> me, thanks! ASUS M3N-HT has a 6111 chipset hooked up to the e-SATA. Is that =20= sufficient for your testing? Let me know and I'll help round up some parts for you... Cheers, -Garrett= From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 27 22:32:36 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 7E43D10657C1 for ; Tue, 27 Jan 2009 22:32:36 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-ew0-f21.google.com (mail-ew0-f21.google.com [209.85.219.21]) by mx1.freebsd.org (Postfix) with ESMTP id 034F98FC14 for ; Tue, 27 Jan 2009 22:32:35 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ewy14 with SMTP id 14so3421362ewy.19 for ; Tue, 27 Jan 2009 14:32:35 -0800 (PST) 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=jdDXy4trLarkGbJOzavDi4WbRTLB2aUpiCsHgscOoYY=; b=G6zQhK2TN0tTQFgHM90mlnUpQU+c4p1ivhFM6Qv1mGItPwppI4Au169o597Z3RYCd1 lmLprPmlBU5YxDEbXgvVn4DcLZknQ/VJAOsbyFGBhmfkvIchc67l+3BT+pYIUwWVNwNc Si3UWNcOALzq3kGtSK0mUn5spwWcFmDb8SA+4= 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=Fucv2Q4XRAGfuwoE/leTA+OHoAbHMmWd943dv6r+0zBJxEb658IVIzjO3UW7M4pk0u hUQcq0GCOIT+6Qrv3N+ljMn76bAe0zUvuRHpq+WwZjd9a5is/wn85enoYROc5fLF0h93 jDD3VYTKoQ+lIT78L9ZRU9tjBW/d0I+5RFuUA= Received: by 10.210.11.17 with SMTP id 17mr4606971ebk.32.1233095555096; Tue, 27 Jan 2009 14:32:35 -0800 (PST) Received: from epsilon.lan (bl6-156-29.dsl.telepac.pt [82.155.156.29]) by mx.google.com with ESMTPS id c5sm46624780nfi.51.2009.01.27.14.32.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 27 Jan 2009 14:32:34 -0800 (PST) Sender: Rui Paulo Message-Id: <4AB80C23-53E2-4413-B680-1B26BD46E886@freebsd.org> From: Rui Paulo To: Daniel Lannstrom In-Reply-To: <20090127150040.GA4333@haruhi> Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Tue, 27 Jan 2009 22:32:32 +0000 References: <20090127124137.46fcfac5@baby-jane.lamaiziere.net> <20090127150040.GA4333@haruhi> X-Mailer: Apple Mail (2.930.3) Cc: freebsd-hackers@freebsd.org Subject: Re: Mackbook pro nvidia based video backlight 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, 27 Jan 2009 22:32:37 -0000 On 27 Jan 2009, at 15:00, Daniel Lannstrom wrote: >> I'm asking which method will be the best to interface the driver with >> userland applications? > > You might want to make it a character device driver. And write a small > userland control program. Sysctl isn't really made for this kind of > functionality. Why not? Sysctl seems perfect to handle this. -- Rui Paulo From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 27 22:36:29 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 346851065826; Tue, 27 Jan 2009 22:36:29 +0000 (UTC) (envelope-from sos@deepcore.dk) Received: from exchange.physicalsegment.com (78-105-106-222.zone3.bethere.co.uk [78.105.106.222]) by mx1.freebsd.org (Postfix) with ESMTP id 980448FC13; Tue, 27 Jan 2009 22:36:28 +0000 (UTC) (envelope-from sos@deepcore.dk) Received: from mail pickup service by exchange.physicalsegment.com with Microsoft SMTPSVC; Tue, 27 Jan 2009 21:31:36 +0000 Received: from mx2.freebsd.org ([69.147.83.53]) by tsplpt01.thespinney.local with Microsoft SMTPSVC(6.0.2600.5512); Mon, 26 Jan 2009 20:56:49 +0000 Received: from hub.freebsd.org (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id B8783179474; Mon, 26 Jan 2009 20:55:52 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 42EAD106573B; Mon, 26 Jan 2009 20:55:51 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AF0810656BB; Mon, 26 Jan 2009 20:55:33 +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 BAA058FC1E; Mon, 26 Jan 2009 20:55:32 +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.2) with ESMTP id n0QKMadk093274; Mon, 26 Jan 2009 21:22:36 +0100 (CET) (envelope-from sos@deepcore.dk) Message-Id: From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= To: current , hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v930.3) Date: Mon, 26 Jan 2009 21:22:36 +0100 X-Mailer: Apple Mail (2.930.3) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (deepcore.dk [87.63.29.106]); Mon, 26 Jan 2009 21:22:36 +0100 (CET) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-OriginalArrivalTime: 26 Jan 2009 20:56:49.0942 (UTC) FILETIME=[9BCEFB60:01C97FF8] Cc: Subject: WANTED! board models with Marvell 61XX chips X-BeenThere: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 22:36:30 -0000 Hi there! I thought I finally had a motherboard using one of the Marvell SATA/=20 PATA chips coming in, but unfortunately the delivery has been =20 postponed to some unspecified date, oh well.. Thats where you come into the picture as I'd like to get another one, =20= but finding boards that uses these is a bit tricky as most vendors =20 doesn't write such unimportant stuff on their web pages (hell it works =20= in windows!). If you have a motherboard using one of the following Marvell chips, or =20= know for certain a model that does, please send me a private mail with =20= make and model as there is no need to pollute the lists (which I dont =20= follow closely for the time being btw). The chips in question are: Marvell 6111, 6121, 6141 or 6145 It is also important that there is physical access to both the SATA =20 and the PATA port(s) as some boards only utilize one or the other. I know of one PCI-express add-in board that uses the 6145, so if =20 anybody knows how to get ahold of one, that would be very welcomed as =20= well. The board in question is this: = http://www.sunix.com.tw/it/en/Product_Detail.php?cate=3D2&class_a_id=3D35&= sid=3D538 So far I've only found shops in South Africa that has it available, =20 but none of them ships outside the country. So if you have any useful info on this topic please get in touch with =20= me, thanks! -S=F8ren -- _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 27 22:37:20 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 4AFDF10659B3; Tue, 27 Jan 2009 22:37:20 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from exchange.physicalsegment.com (78-105-106-222.zone3.bethere.co.uk [78.105.106.222]) by mx1.freebsd.org (Postfix) with ESMTP id 9B2378FC0C; Tue, 27 Jan 2009 22:37:19 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail pickup service by exchange.physicalsegment.com with Microsoft SMTPSVC; Tue, 27 Jan 2009 21:31:45 +0000 Received: from mx2.freebsd.org ([69.147.83.53]) by tsplpt01.thespinney.local with Microsoft SMTPSVC(6.0.2600.5512); Tue, 27 Jan 2009 17:56:06 +0000 Received: from hub.freebsd.org (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id D17E81A4D81; Tue, 27 Jan 2009 17:55:49 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id AB3221065730; Tue, 27 Jan 2009 17:55:48 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E877B106564A; Tue, 27 Jan 2009 17:55:39 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mxout4.cac.washington.edu (mxout4.cac.washington.edu [140.142.33.19]) by mx1.freebsd.org (Postfix) with ESMTP id BC4C08FC08; Tue, 27 Jan 2009 17:55:39 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.141] (may be forged)) by mxout4.cac.washington.edu (8.14.3+UW08.09/8.14.3+UW08.11) with ESMTP id n0RHtZS3014179 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 27 Jan 2009 09:55:35 -0800 X-Auth-Received: from [192.168.10.7] (adsl-99-146-97-242.dsl.pltn13.sbcglobal.net [99.146.97.242]) (authenticated authid=youshi10) by smtp.washington.edu (8.14.3+UW08.09/8.14.3+UW08.11) with ESMTP id n0RHtXte011391 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 27 Jan 2009 09:55:34 -0800 Message-Id: <92231DDF-6ACE-467D-AD8F-CF31740F365F@gmail.com> From: Garrett Cooper To: Oliver Pinter In-Reply-To: <6101e8c40901270607i73baea4bxf903a6aab95afc29@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v930.3) Date: Tue, 27 Jan 2009 10:00:28 -0800 References: <6101e8c40901270607i73baea4bxf903a6aab95afc29@mail.gmail.com> X-Mailer: Apple Mail (2.930.3) X-PMX-Version: 5.5.0.356843, Antispam-Engine: 2.6.1.350677, Antispam-Data: 2009.1.27.174318 X-Uwash-Spam: Gauge=IIIIIII, Probability=8%, Report='FORGED_FROM_GMAIL 0.1, BODY_SIZE_1700_1799 0, BODY_SIZE_5000_LESS 0, __BOUNCE_CHALLENGE_SUBJ 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FRAUD_419_LOC 0, __FRAUD_419_WEBMAIL 0, __FRAUD_419_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __STOCK_SUBJ_9 0' X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-OriginalArrivalTime: 27 Jan 2009 17:56:06.0614 (UTC) FILETIME=[87182F60:01C980A8] Cc: hackers@freebsd.org, current , =?ISO-8859-1?Q?S=F8ren_Schmidt?= Subject: Re: WANTED! board models with Marvell 61XX chips X-BeenThere: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 22:37:23 -0000 On Jan 27, 2009, at 6:07 AM, Oliver Pinter wrote: > Hi ASUS P5Q-E has 88SE6121 > > On 1/26/09, S=F8ren Schmidt wrote: >> Hi there! >> >> I thought I finally had a motherboard using one of the Marvell SATA/ >> PATA chips coming in, but unfortunately the delivery has been >> postponed to some unspecified date, oh well.. >> >> Thats where you come into the picture as I'd like to get another one, >> but finding boards that uses these is a bit tricky as most vendors >> doesn't write such unimportant stuff on their web pages (hell it =20 >> works >> in windows!). >> >> If you have a motherboard using one of the following Marvell chips, =20= >> or >> know for certain a model that does, please send me a private mail =20 >> with >> make and model as there is no need to pollute the lists (which I dont >> follow closely for the time being btw). >> >> The chips in question are: >> >> Marvell 6111, 6121, 6141 or 6145 >> >> It is also important that there is physical access to both the SATA >> and the PATA port(s) as some boards only utilize one or the other. >> >> I know of one PCI-express add-in board that uses the 6145, so if >> anybody knows how to get ahold of one, that would be very welcomed as >> well. The board in question is this: >> = http://www.sunix.com.tw/it/en/Product_Detail.php?cate=3D2&class_a_id=3D35&= sid=3D538 >> So far I've only found shops in South Africa that has it available, >> but none of them ships outside the country. >> >> So if you have any useful info on this topic please get in touch with >> me, thanks! ASUS M3N-HT has a 6111 chipset hooked up to the e-SATA. Is that =20= sufficient for your testing? Let me know and I'll help round up some parts for you... Cheers, -Garrett= _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 27 22:51:00 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 0230F1065971; Tue, 27 Jan 2009 22:50:59 +0000 (UTC) (envelope-from mike@reifenberger.com) Received: from exchange.physicalsegment.com (78-105-106-222.zone3.bethere.co.uk [78.105.106.222]) by mx1.freebsd.org (Postfix) with ESMTP id 99F9F8FC23; Tue, 27 Jan 2009 22:50:57 +0000 (UTC) (envelope-from mike@reifenberger.com) Received: from mail pickup service by exchange.physicalsegment.com with Microsoft SMTPSVC; Tue, 27 Jan 2009 21:33:36 +0000 Received: from mx2.freebsd.org ([69.147.83.53]) by tsplpt01.thespinney.local with Microsoft SMTPSVC(6.0.2600.5512); Tue, 27 Jan 2009 09:44:35 +0000 Received: from hub.freebsd.org (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 6AE8E176DDA; Tue, 27 Jan 2009 09:43:12 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 1926410656CB; Tue, 27 Jan 2009 09:43:11 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9E9D1065673; Tue, 27 Jan 2009 09:42:58 +0000 (UTC) (envelope-from mike@reifenberger.com) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by mx1.freebsd.org (Postfix) with ESMTP id 3FC268FC14; Tue, 27 Jan 2009 09:42:57 +0000 (UTC) (envelope-from mike@reifenberger.com) Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 572731C01F85; Tue, 27 Jan 2009 10:25:28 +0100 (CET) Received: from localhost (dynscan2.mnet-online.de [192.168.1.215]) by mail.m-online.net (Postfix) with ESMTP id 3E0599015C; Tue, 27 Jan 2009 10:25:28 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan2.mnet-online.de [192.168.1.215]) (amavisd-new, port 10024) with ESMTP id Q-9SykinmLAu; Tue, 27 Jan 2009 10:25:27 +0100 (CET) Received: from mail.reifenberger.com (ppp-93-104-61-113.dynamic.mnet-online.de [93.104.61.113]) by mail.mnet-online.de (Postfix) with ESMTP; Tue, 27 Jan 2009 10:25:26 +0100 (CET) Received: by mail.reifenberger.com (Postfix, from userid 1001) id 5A5222AA34; Tue, 27 Jan 2009 10:25:26 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.reifenberger.com (Postfix) with ESMTP id 51FF72AA33; Tue, 27 Jan 2009 10:25:26 +0100 (CET) Date: Tue, 27 Jan 2009 10:25:26 +0100 (CET) From: Michael Reifenberger To: =?ISO-8859-15?Q?S=F8ren_Schmidt?= In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="29518260-508733382-1233048326=:29922" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-OriginalArrivalTime: 27 Jan 2009 09:44:35.0551 (UTC) FILETIME=[DD0D16F0:01C98063] Cc: hackers@freebsd.org, current Subject: Re: WANTED! board models with Marvell 61XX chips X-BeenThere: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 22:51:04 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --29518260-508733382-1233048326=:29922 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8BIT On Mon, 26 Jan 2009, Søren Schmidt wrote: > Date: Mon, 26 Jan 2009 21:22:36 +0100 > From: Søren Schmidt > To: current , hackers@freebsd.org > Subject: WANTED! board models with Marvell 61XX chips > > Hi there! > > I thought I finally had a motherboard using one of the Marvell SATA/PATA > chips coming in, but unfortunately the delivery has been postponed to some > unspecified date, oh well.. > > Thats where you come into the picture as I'd like to get another one, but > finding boards that uses these is a bit tricky as most vendors doesn't write > such unimportant stuff on their web pages (hell it works in windows!). > > If you have a motherboard using one of the following Marvell chips, or know > for certain a model that does, please send me a private mail with make and > model as there is no need to pollute the lists (which I dont follow closely > for the time being btw). > > The chips in question are: > > Marvell 6111, 6121, 6141 or 6145 > I have an ASUS M2N32 WS Professional which has an 6141 onboard. Both SATA and PATA are accessable. Bye/2 --- Michael Reifenberger Michael@Reifenberger.com http://www.Reifenberger.com --29518260-508733382-1233048326=:29922 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" --29518260-508733382-1233048326=:29922-- From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 27 22:37:23 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 9371610659CC; Tue, 27 Jan 2009 22:37:23 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from exchange.physicalsegment.com (78-105-106-222.zone3.bethere.co.uk [78.105.106.222]) by mx1.freebsd.org (Postfix) with ESMTP id EBE198FC19; Tue, 27 Jan 2009 22:37:22 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail pickup service by exchange.physicalsegment.com with Microsoft SMTPSVC; Tue, 27 Jan 2009 21:32:02 +0000 Received: from mx2.freebsd.org ([69.147.83.53]) by tsplpt01.thespinney.local with Microsoft SMTPSVC(6.0.2600.5512); Tue, 27 Jan 2009 14:07:48 +0000 Received: from hub.freebsd.org (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id D0C74179A51; Tue, 27 Jan 2009 14:07:26 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 66F9B1065771; Tue, 27 Jan 2009 14:07:25 +0000 (UTC) (envelope-from owner-freebsd-current@freebsd.org) Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 116971065693 for ; Tue, 27 Jan 2009 14:07:16 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-ew0-f21.google.com (mail-ew0-f21.google.com [209.85.219.21]) by mx1.freebsd.org (Postfix) with ESMTP id 6E46C8FC14 for ; Tue, 27 Jan 2009 14:07:14 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: by ewy14 with SMTP id 14so2605437ewy.19 for ; Tue, 27 Jan 2009 06:07:14 -0800 (PST) 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=0OiLgLEF8rIh89geJ7IzzhFg9i7Azu3OpZ7UgJYqOTw=; b=BH3ATDxi6jwkz8joPdpvg4mpOwtKZZ6MlRKuPQxq8zujj1bBbFLbnhywoA39ShlbTa UqbNh8eYTB6bj14FsL3L+kYmFZywrnUn3qFHub9uRXg2qWeQJ2B91AjwC+/JNTtuG3Ti 3dFL5xfDlzy2mI7i03LhblFSfXknNO/Bv1RVM= 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=MZB/PYND5AdbwjUWYg3j5WW/kKDe8qmO6cRgmNBoI1BUkXyFPM3p0P3i1B+kSdP5gb DvL1z5jJ8H+KVb5kF4FsaaS+pJ5WzQrHJMOdm/llsyswA0c94YI/2hgMlVBkxsQDpIYY SIwdTZWrSfTItYmkA5sMlZlMvBauRTIdKMIhQ= MIME-Version: 1.0 Received: by 10.102.247.4 with SMTP id u4mr880646muh.128.1233065234058; Tue, 27 Jan 2009 06:07:14 -0800 (PST) In-Reply-To: References: Date: Tue, 27 Jan 2009 15:07:13 +0100 Message-ID: <6101e8c40901270607i73baea4bxf903a6aab95afc29@mail.gmail.com> From: Oliver Pinter To: =?ISO-8859-1?Q?S=F8ren_Schmidt?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-OriginalArrivalTime: 27 Jan 2009 14:07:48.0520 (UTC) FILETIME=[A264EA80:01C98088] X-Mailman-Approved-At: Tue, 27 Jan 2009 23:20:00 +0000 Cc: hackers@freebsd.org, current Subject: Re: WANTED! board models with Marvell 61XX chips X-BeenThere: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 22:37:26 -0000 Hi ASUS P5Q-E has 88SE6121 On 1/26/09, S=F8ren Schmidt wrote: > Hi there! > > I thought I finally had a motherboard using one of the Marvell SATA/ > PATA chips coming in, but unfortunately the delivery has been > postponed to some unspecified date, oh well.. > > Thats where you come into the picture as I'd like to get another one, > but finding boards that uses these is a bit tricky as most vendors > doesn't write such unimportant stuff on their web pages (hell it works > in windows!). > > If you have a motherboard using one of the following Marvell chips, or > know for certain a model that does, please send me a private mail with > make and model as there is no need to pollute the lists (which I dont > follow closely for the time being btw). > > The chips in question are: > > Marvell 6111, 6121, 6141 or 6145 > > It is also important that there is physical access to both the SATA > and the PATA port(s) as some boards only utilize one or the other. > > I know of one PCI-express add-in board that uses the 6145, so if > anybody knows how to get ahold of one, that would be very welcomed as > well. The board in question is this: > http://www.sunix.com.tw/it/en/Product_Detail.php?cate=3D2&class_a_id=3D35= &sid=3D538 > So far I've only found shops in South Africa that has it available, > but none of them ships outside the country. > > So if you have any useful info on this topic please get in touch with > me, thanks! > > > -S=F8ren > -- > > > > > > > > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org= " > _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 09:11:56 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 A0A171065677 for ; Wed, 28 Jan 2009 09:11:56 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 40F998FC0A for ; Wed, 28 Jan 2009 09:11:56 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n0S99TP5091820 for ; Wed, 28 Jan 2009 02:09:29 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 28 Jan 2009 02:09:50 -0700 (MST) Message-Id: <20090128.020950.-1962670362.imp@bsdimp.com> To: hackers@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Wed_Jan_28_02_09_50_2009_836)--" Content-Transfer-Encoding: 7bit Cc: Subject: Code review request: cdcontrol status label additon 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, 28 Jan 2009 09:11:57 -0000 ----Next_Part(Wed_Jan_28_02_09_50_2009_836)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Please find enclosed patches to enable printing of the ISO-9660 Volume label, if present, for a CD. I've connected this to the 'status label' command. Please comment. Warner ----Next_Part(Wed_Jan_28_02_09_50_2009_836)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cdcontrol.diff" Index: cdcontrol.1 =================================================================== --- cdcontrol.1 (revision 187760) +++ cdcontrol.1 (working copy) @@ -156,12 +156,14 @@ Play the right subtrack on both left and right channels. .It Ic info Print the table of contents. -.It Ic status Op Cm audio | media | volume +.It Ic status Op Cm audio | label | media | volume Print the information about the disc: .Pp .Bl -tag -width ".Cm volume" -compact .It Cm audio the current playing status and position +.It Cm label +the current ISO 9660 volume label, if present .It Cm media the current media catalog status .It Cm volume Index: cdcontrol.c =================================================================== --- cdcontrol.c (revision 187760) +++ cdcontrol.c (working copy) @@ -86,6 +86,7 @@ #define STATUS_AUDIO 0x1 #define STATUS_MEDIA 0x2 #define STATUS_VOLUME 0x4 +#define STATUS_LABEL 0x8 struct cmdtab { int command; @@ -801,6 +802,8 @@ what |= STATUS_MEDIA; else if (!strncasecmp(p, "volume", strlen(p))) what |= STATUS_VOLUME; + else if (!strncasecmp(p, "label", strlen(p))) + what |= STATUS_LABEL; else { warnx("invalid command arguments"); return 0; @@ -851,6 +854,32 @@ else printf ("No volume level info available\n"); } + if (what & STATUS_LABEL) { +#define ISO9660_MAGIC "\x01" "CD001" "\x01\x00" +#define ISO9660_OFFSET 0x8000 +#define VOLUME_LEN 32 +#define CD_SECTOR_LEN 2048 +#define LABEL_NAME_OFF 0x28 +#define LABEL_NAME_LEN 32 + char *sp, *ep, buffer[CD_SECTOR_LEN]; + + lseek(fd, ISO9660_OFFSET, SEEK_SET); + rc = read (fd, buffer, CD_SECTOR_LEN); + if (rc == CD_SECTOR_LEN && + memcmp(buffer, ISO9660_MAGIC, sizeof(ISO9660_MAGIC) - 1) == 0) { + sp = buffer + LABEL_NAME_OFF; + ep = sp + LABEL_NAME_LEN - 1; + while (*ep == ' ' && ep >= sp) + *ep-- = '\0'; + if (verbose) + printf("ISO 9660 Label is: %s\n", sp); + else + printf("%s\n", sp); + } + else + printf("No ISO 9660 label found\n"); + } + return(0); } ----Next_Part(Wed_Jan_28_02_09_50_2009_836)---- From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 10:16:37 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 7CBF1106564A for ; Wed, 28 Jan 2009 10:16:37 +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 CA4838FC14 for ; Wed, 28 Jan 2009 10:16:36 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (adsl21-232.kln.forthnet.gr [77.49.148.232]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id n0SA2N5P011121 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 28 Jan 2009 12:02:28 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id n0SA2Mj3007935; Wed, 28 Jan 2009 12:02:22 +0200 (EET) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id n0SA2MCZ007934; Wed, 28 Jan 2009 12:02:22 +0200 (EET) (envelope-from keramida@freebsd.org) From: Giorgos Keramidas To: "M. Warner Losh" References: <20090128.020950.-1962670362.imp@bsdimp.com> Date: Wed, 28 Jan 2009 12:02:21 +0200 In-Reply-To: <20090128.020950.-1962670362.imp@bsdimp.com> (M. Warner Losh's message of "Wed, 28 Jan 2009 02:09:50 -0700 (MST)") Message-ID: <87k58f7npu.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: n0SA2N5P011121 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.462, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL -0.06, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: hackers@freebsd.org Subject: Re: Code review request: cdcontrol status label additon 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, 28 Jan 2009 10:16:37 -0000 On Wed, 28 Jan 2009 02:09:50 -0700 (MST), "M. Warner Losh" wrote: > Please find enclosed patches to enable printing of the ISO-9660 Volume > label, if present, for a CD. I've connected this to the 'status > label' command. Please comment. The style looks ok, but this didn't work for a Fedora Core 10 disk I have around. glabel on the other hand detected the label fine: [ /var/log/messages ] Jan 28 11:59:00 kobe kernel: GEOM_LABEL: Label for provider acd0t01 is iso9660/F10-i686-Live. Running `status label' on the same disk didn't find one: # ./cdcontrol status label No ISO 9660 label found # ./cdcontrol -f /dev/acd0t01 status label No ISO 9660 label found Maybe it would be better to hook into glabel (when available) or use a userland copy of the same code? From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 10:55: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 78F2A106564A for ; Wed, 28 Jan 2009 10:55:45 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from ey-out-1920.google.com (ey-out-1920.google.com [74.125.78.149]) by mx1.freebsd.org (Postfix) with ESMTP id 0EDAF8FC19 for ; Wed, 28 Jan 2009 10:55:44 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by ey-out-1920.google.com with SMTP id 5so1794080eyb.0 for ; Wed, 28 Jan 2009 02:55:43 -0800 (PST) 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=JL82vpJEqBB182C/IESBjo4z8dxAI2sfTRYsqEQ5LeI=; b=NqF54Ssi4aXet74HZ0YDrtG1HRwBT15YE1CGc8dSA/VUU5QWK0nuvM8AlHcdC8XmwZ tEwuJni3X60cqOmsYteiOG5A/Ua13yd06eWkNJv2SJXi2zobdIQeXio/M9i22ImE5//b fDK9+/P1wsUtinpD9zmpdqTfvgCHmMHpWAuVY= 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=Uvt+a7bL8KCLfZmhsZyuVmixq2IpG8paO1WkidA4yiMp5UqqgMqF199kIswGqXD/QN TqxYrj/OM2mONzyyp4A2hqp7DpI93wcJ8eSK8O9Y2mpbwD0sEq8OSzsMliIdpxQoph/g Um86wyr6blYvwPk1Ag3WMqoxdr+MMKbb43rUI= MIME-Version: 1.0 Received: by 10.86.49.13 with SMTP id w13mr538579fgw.48.1233140143608; Wed, 28 Jan 2009 02:55:43 -0800 (PST) Date: Wed, 28 Jan 2009 13:55:43 +0300 Message-ID: From: pluknet To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: dublicated vm stats in sysctl 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, 28 Jan 2009 10:55:45 -0000 Hi. What is a purpose of some dublicated vm stuff in vm. and vm.stats. branches? vm.v_free_min: 6392 vm.stats.vm.v_free_min: 6392 vm.v_cache_min: 26928 vm.v_cache_max: 53856 vm.stats.vm.v_cache_max: 53856 vm.stats.vm.v_cache_min: 26928 and so on.. I see some relevance in vm/vm_meter.c#rev1.62 but cannot understand it. -- wbr, pluknet From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 13:43:11 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 37E6C106566B for ; Wed, 28 Jan 2009 13:43:11 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id C93B08FC18 for ; Wed, 28 Jan 2009 13:43:10 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id D643A1CDE9; Wed, 28 Jan 2009 14:43:09 +0100 (CET) Date: Wed, 28 Jan 2009 14:43:09 +0100 From: Ed Schouten To: Daniel Lannstrom Message-ID: <20090128134309.GN17198@hoeg.nl> References: <20090127124137.46fcfac5@baby-jane.lamaiziere.net> <20090127150040.GA4333@haruhi> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wwtQuX191/I956S7" Content-Disposition: inline In-Reply-To: <20090127150040.GA4333@haruhi> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: FreeBSD Hackers Subject: Re: Mackbook pro nvidia based video backlight 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, 28 Jan 2009 13:43:11 -0000 --wwtQuX191/I956S7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Daniel Lannstrom wrote: > > I'm asking which method will be the best to interface the driver with > > userland applications? >=20 > You might want to make it a character device driver. And write a small > userland control program. Sysctl isn't really made for this kind of > functionality. No. sysctl is good for doing stuff like this. An even better approach would be to integrate it to the X11 driver, but I guess it will be cold day in hell when this happens. --=20 Ed Schouten WWW: http://80386.nl/ --wwtQuX191/I956S7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkmAYO0ACgkQ52SDGA2eCwWFeACfdKlZzq49IoLih4qclgJcGBAZ V/EAn19FZ30YR6DqMTUs6qk4FvkDR1eI =dAtJ -----END PGP SIGNATURE----- --wwtQuX191/I956S7-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 14:30:01 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 8FFB21065676 for ; Wed, 28 Jan 2009 14:30:01 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by mx1.freebsd.org (Postfix) with ESMTP id 193D38FC1B for ; Wed, 28 Jan 2009 14:30:00 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ey-out-2122.google.com with SMTP id d26so17399eyd.7 for ; Wed, 28 Jan 2009 06:30:00 -0800 (PST) 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=LEZ5ycBfGQNV0E0Fmzqmu50gbV1DqfkpH0JkCOVT3ts=; b=gwWbSX7iYsUp/TnegCk8HHnl07OpxsHZWdXb1unj4a3HaCLxzSEJyzMfcKGLbmorZk i6MaC6fLxWLLSxWaJcbXiraTV+CtM5tfDboloKF8qbrozwxU/5wAeSuKnByj6vvfKl9p eI/cxHPeR2jy3aacBRXwsh3H4J54QAvNiIzNU= 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=iqyxwcm9BVdKo2JqKDKBmJrGQD9VijCPMXGrDTIzHP5/LUrYHfMDvHuL8PZS9KDqJ8 n3nQkLRujhQ5p9M9HxQrOyinMIQ7oc/atCioiezB+ISBh0CCZuvbaaooiag/ZNI2Lhxb Jwk3Y8tanLNb/tsSSElnP8gwwg+b7rvDFhwbM= Received: by 10.86.59.18 with SMTP id h18mr877551fga.57.1233152999773; Wed, 28 Jan 2009 06:29:59 -0800 (PST) Received: from ?172.17.12.153? ([193.136.24.128]) by mx.google.com with ESMTPS id d4sm2660155fga.51.2009.01.28.06.29.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 28 Jan 2009 06:29:59 -0800 (PST) Sender: Rui Paulo Message-Id: <71915973-47E0-4F38-AC20-221817A19C11@freebsd.org> From: Rui Paulo To: Ed Schouten In-Reply-To: <20090128134309.GN17198@hoeg.nl> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Wed, 28 Jan 2009 14:29:57 +0000 References: <20090127124137.46fcfac5@baby-jane.lamaiziere.net> <20090127150040.GA4333@haruhi> <20090128134309.GN17198@hoeg.nl> X-Mailer: Apple Mail (2.930.3) Cc: FreeBSD Hackers , Daniel Lannstrom Subject: Re: Mackbook pro nvidia based video backlight 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, 28 Jan 2009 14:30:02 -0000 On 28 Jan 2009, at 13:43, Ed Schouten wrote: > * Daniel Lannstrom wrote: >>> I'm asking which method will be the best to interface the driver >>> with >>> userland applications? >> >> You might want to make it a character device driver. And write a >> small >> userland control program. Sysctl isn't really made for this kind of >> functionality. > > No. sysctl is good for doing stuff like this. An even better approach > would be to integrate it to the X11 driver, but I guess it will be > cold > day in hell when this happens. Not really. The xorg intel driver is already able to deal with this. I don't know about NVIDIA. -- Rui Paulo From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 14:29:05 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 A721F106576A for ; Wed, 28 Jan 2009 14:29:05 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-ew0-f21.google.com (mail-ew0-f21.google.com [209.85.219.21]) by mx1.freebsd.org (Postfix) with ESMTP id 322038FC2F for ; Wed, 28 Jan 2009 14:29:05 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ewy14 with SMTP id 14so4059424ewy.19 for ; Wed, 28 Jan 2009 06:29:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=LEZ5ycBfGQNV0E0Fmzqmu50gbV1DqfkpH0JkCOVT3ts=; b=lstGoVZBIzrYapHdcrPCxemIJLcvrtjO9eZlcpfCFwOthw6Tcu2hfN0cw2oAMlwHbn XcKDWUkEu0VUogl65ppGPpfjr95ZcNVpRMCbODrmk94J0SEL4bQz90Fqm174o6ocdLSK a83gcrwJ1YD0SMp8cxr5fecbqob5+XA2cBItw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=so2L4QxQ/Oajq3zBRVGEVNLo734Wf8DPPAUitcwXHh5Lm854G4Ct5lXoD7ok4OhSOI X2nvZB6p2kAJRfNwgLmFA0ezx8E1LZuCgGFxJ214NNQbsrfixbSyWMV2Tw5siU7GMT8p HKkgu7XkdRsHyhbaRDGYzzQEW5ke9TDO1EIl4= Received: by 10.86.89.20 with SMTP id m20mr699363fgb.71.1233152944123; Wed, 28 Jan 2009 06:29:04 -0800 (PST) Received: from ?172.17.12.153? ([193.136.24.128]) by mx.google.com with ESMTPS id d4sm2660155fga.51.2009.01.28.06.29.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 28 Jan 2009 06:29:03 -0800 (PST) Message-Id: <224440FC-D2A2-4EE6-A4DB-CCB43F1DCDB4@gmail.com> From: Rui Paulo To: Ed Schouten In-Reply-To: <20090128134309.GN17198@hoeg.nl> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Wed, 28 Jan 2009 14:29:00 +0000 References: <20090127124137.46fcfac5@baby-jane.lamaiziere.net> <20090127150040.GA4333@haruhi> <20090128134309.GN17198@hoeg.nl> X-Mailer: Apple Mail (2.930.3) X-Mailman-Approved-At: Wed, 28 Jan 2009 14:47:17 +0000 Cc: FreeBSD Hackers , Daniel Lannstrom Subject: Re: Mackbook pro nvidia based video backlight 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, 28 Jan 2009 14:29:06 -0000 On 28 Jan 2009, at 13:43, Ed Schouten wrote: > * Daniel Lannstrom wrote: >>> I'm asking which method will be the best to interface the driver >>> with >>> userland applications? >> >> You might want to make it a character device driver. And write a >> small >> userland control program. Sysctl isn't really made for this kind of >> functionality. > > No. sysctl is good for doing stuff like this. An even better approach > would be to integrate it to the X11 driver, but I guess it will be > cold > day in hell when this happens. Not really. The xorg intel driver is already able to deal with this. I don't know about NVIDIA. -- Rui Paulo From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 15:12:35 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 13B501065674 for ; Wed, 28 Jan 2009 15:12:35 +0000 (UTC) (envelope-from brampton@gmail.com) Received: from mail-ew0-f21.google.com (mail-ew0-f21.google.com [209.85.219.21]) by mx1.freebsd.org (Postfix) with ESMTP id 9DEEA8FC08 for ; Wed, 28 Jan 2009 15:12:34 +0000 (UTC) (envelope-from brampton@gmail.com) Received: by ewy14 with SMTP id 14so4131539ewy.19 for ; Wed, 28 Jan 2009 07:12:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Td+HoTuxWu7iEt8CLaRxsmcFZqQIGdsNYUnF5u3ebSM=; b=ZDEt5F9DW19SYyGG/mzoYLcCHjIzXhPr/I9cuTEAarXYIde/aM4Mlsj9EHCHmYLQFe LmcWCMWBL9qhehPKGF+ozY52KoPa8o67TO5t4/7P4S9lH7bGMPGsLPJX8skKS4P1fiuC /hh+LSVmVghY3ANobevGxKYkWvAv7CEU5fQvc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; b=AXyhc72vBRfm5ARJhmrBTA/KYsRiiZEFj1H6m6mAeFusa6rvTrryqUXg/i/0N6mXpi yvT2FPlIgRPKUgujamr3B9MKONNVqrO7oaPVWO2s5cah2MMWbOvjAIwD998MuEwlt3Ln oJVUK8EbC9+FEvFWN8NXgsKY5I6fpLJizK5s8= MIME-Version: 1.0 Sender: brampton@gmail.com Received: by 10.67.116.8 with SMTP id t8mr175638ugm.53.1233155553234; Wed, 28 Jan 2009 07:12:33 -0800 (PST) Date: Wed, 28 Jan 2009 15:12:33 +0000 X-Google-Sender-Auth: 34ad57bc8957c05a Message-ID: From: Andrew Brampton To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Mutually exclusive kernel modules 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, 28 Jan 2009 15:12:35 -0000 Hi, I'm writing a new kernel module which can not be run with another module. If both run then bad things will happen and the kernel will fall over. Fixing the modules so they can be run together is not a option, so I wanted to code something in this new module which would A) Check if the other module is already running and thus refuse to start. and B) Stop the other module from loading in the future. So is there a way to do this? thanks Andrew From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 15:40:22 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 0E23A106564A for ; Wed, 28 Jan 2009 15:40:22 +0000 (UTC) (envelope-from assaulter0x80@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.187]) by mx1.freebsd.org (Postfix) with ESMTP id 7CF2A8FC14 for ; Wed, 28 Jan 2009 15:40:21 +0000 (UTC) (envelope-from assaulter0x80@gmail.com) Received: by mu-out-0910.google.com with SMTP id i2so5081635mue.3 for ; Wed, 28 Jan 2009 07:40:20 -0800 (PST) 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; bh=ZG4J3COED3LIl5jNPqya5KqpPBY4yBndrLDE2kF8xcE=; b=PHNPYxXH9RyjYOREvrhqjJQWCjq6RESBudA2alKayMAEHw94eLafRE+DZxHfDlUr6h LqX/L01D7KtqRBSqSU2w0TemLp6eTe3WmOBxwc4nSyhzfegbJQvMFZskOgv8I8mWvnWU clFhAWV77OZs+reYU/r3E4IbhQXGD8fpHzNBw= 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; b=aAd12Ecr4w6uYah9nIKf2/xZnagp/ZvY7gD6I90S5TFLWa2Zu64Gu6dhmk52ZHTqwJ cWjLpl71cDv6m1CLHIjapr+EeqLF8znVrHHlrGIQtyT/UJjfkB/eCoe9Yg6GlzlvCwja c0jg5xkinqDpV0K9k0ehm4uVG/DlJO5bA3dWc= MIME-Version: 1.0 Received: by 10.181.226.19 with SMTP id d19mr2409934bkr.35.1233157220464; Wed, 28 Jan 2009 07:40:20 -0800 (PST) In-Reply-To: References: <20090120.131627.-1717264382.imp@bsdimp.com> Date: Wed, 28 Jan 2009 16:40:20 +0100 Message-ID: From: Jacky Oh To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Fwd: KLD: program.ko: depends of kernel - no avaiable 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, 28 Jan 2009 15:40:22 -0000 hi everyone, the main goal of KLD are load code for executing as part of kernel at run-time, so, i don't think that rebuild the kernel are a good solution.. In other way a try to load any dev/syscall example at /usr/share/examples/kld the result was the same.. When i was thinking in S. Sedov reply about the undefined symbols i go to run objdump for my syscall.ko and i can find the following: # objdump -x syscall.ko ... 000019d4 l O .data 00000010 M_DIRP2_uninit_sys_uninit 0000094c l O set_sysinit_set 00000004 __set_sysinit_set_sym_M_DIRP2_init_sys_init 000019e4 l O .data 00000010 M_DIRP2_init_sys_init 000019f4 l O .data 0000000c syscall_mod 00001a00 l O .data 0000000c _syscall_depend_on_kernel <------ 00001a20 l O .data 00000028 syscall_syscall_mod 00001a48 l O .data 00000004 offset ... The result whit the examples also shows the same symbol (_syscall_depend_on_kernel), so, y disassemble this function: 00001a00 <_syscall_depend_on_kernel>: 1a00: 3c 35 cmp $0x35,%al 1a02: 0c 00 or $0x0,%al 1a04: 3c 35 cmp $0x35,%al 1a06: 0c 00 or $0x0,%al 1a08: 9f lahf 1a09: bb 0d 00 00 00 mov $0xd,%ebx ... lahf == load status flags (EFLAGS) on ah register so, my question is, why precompiled modules (as if_ipw.ko, for example) don't show this function? Thanks to all, jacky. From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 16:10:21 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 00469106566B for ; Wed, 28 Jan 2009 16:10:20 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id 9E8B48FC14 for ; Wed, 28 Jan 2009 16:10:20 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from [192.168.166.22] ([68.0.14.34]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id n0SFnmhc053918 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 28 Jan 2009 10:49:49 -0500 (EST) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Rui Paulo In-Reply-To: <224440FC-D2A2-4EE6-A4DB-CCB43F1DCDB4@gmail.com> References: <20090127124137.46fcfac5@baby-jane.lamaiziere.net> <20090127150040.GA4333@haruhi> <20090128134309.GN17198@hoeg.nl> <224440FC-D2A2-4EE6-A4DB-CCB43F1DCDB4@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-caXOGD8fIXNAmBOJ4GTQ" Organization: FreeBSD Date: Wed, 28 Jan 2009 10:50:25 -0500 Message-Id: <1233157825.1733.5.camel@wombat.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 FreeBSD GNOME Team Port X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00, RCVD_IN_SORBS_DUL,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: Ed Schouten , Daniel Lannstrom , FreeBSD Hackers Subject: Re: Mackbook pro nvidia based video backlight 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, 28 Jan 2009 16:10:21 -0000 --=-caXOGD8fIXNAmBOJ4GTQ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2009-01-28 at 14:29 +0000, Rui Paulo wrote: > On 28 Jan 2009, at 13:43, Ed Schouten wrote: >=20 > > * Daniel Lannstrom wrote: > >>> I'm asking which method will be the best to interface the driver =20 > >>> with > >>> userland applications? > >> > >> You might want to make it a character device driver. And write a =20 > >> small > >> userland control program. Sysctl isn't really made for this kind of > >> functionality. > > > > No. sysctl is good for doing stuff like this. An even better approach > > would be to integrate it to the X11 driver, but I guess it will be =20 > > cold > > day in hell when this happens. >=20 > Not really. The xorg intel driver is already able to deal with this. > I don't know about NVIDIA. The intel ddx driver doesn't really deal with it. On linux the drm has code that interfaces with acpi to deal with backlight management. For us, afaik we handle it in acpi_video. I've not tried to port that part of the drm code. I'm not certain where the best place for this function to live is really, but for Nvidia's proprietary driver, the only option is a seperate kernel driver. robert. > -- > Rui Paulo >=20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " --=-caXOGD8fIXNAmBOJ4GTQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEABECAAYFAkmAfsEACgkQM4TrQ4qfROP20gCeKAGnKxjKPg/wUhoTeABrV2Me kYUAoIUPBxPic2uQNdisnqdNXS39iU3U =DiOv -----END PGP SIGNATURE----- --=-caXOGD8fIXNAmBOJ4GTQ-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 16:21:05 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 68D151065688; Wed, 28 Jan 2009 16:21:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 27AF78FC1C; Wed, 28 Jan 2009 16:21:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n0SGKO3f005665; Wed, 28 Jan 2009 09:20:24 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 28 Jan 2009 09:20:46 -0700 (MST) Message-Id: <20090128.092046.84362525.imp@bsdimp.com> To: keramida@freebsd.org From: "M. Warner Losh" In-Reply-To: <87k58f7npu.fsf@kobe.laptop> References: <20090128.020950.-1962670362.imp@bsdimp.com> <87k58f7npu.fsf@kobe.laptop> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: Code review request: cdcontrol status label additon 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, 28 Jan 2009 16:21:06 -0000 In message: <87k58f7npu.fsf@kobe.laptop> Giorgos Keramidas writes: : On Wed, 28 Jan 2009 02:09:50 -0700 (MST), "M. Warner Losh" wrote: : > Please find enclosed patches to enable printing of the ISO-9660 Volume : > label, if present, for a CD. I've connected this to the 'status : > label' command. Please comment. : : The style looks ok, but this didn't work for a Fedora Core 10 disk I : have around. glabel on the other hand detected the label fine: : : [ /var/log/messages ] : Jan 28 11:59:00 kobe kernel: GEOM_LABEL: Label for provider acd0t01 is iso9660/F10-i686-Live. : : Running `status label' on the same disk didn't find one: : : # ./cdcontrol status label : No ISO 9660 label found : # ./cdcontrol -f /dev/acd0t01 status label : No ISO 9660 label found : : Maybe it would be better to hook into glabel (when available) or use a : userland copy of the same code? Not going to look at glabel for this. I lifted the code from glable, but must have done it badly. I'll grab a core 10 cd and see what's up. Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 16:29:30 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 58C991065675 for ; Wed, 28 Jan 2009 16:29:30 +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 CFD2C8FC18 for ; Wed, 28 Jan 2009 16:29:28 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (adsl21-232.kln.forthnet.gr [77.49.148.232]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id n0SGTBbC009465 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 28 Jan 2009 18:29:17 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id n0SGTB8U005174; Wed, 28 Jan 2009 18:29:11 +0200 (EET) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id n0SGTADO005173; Wed, 28 Jan 2009 18:29:10 +0200 (EET) (envelope-from keramida@freebsd.org) From: Giorgos Keramidas To: "M. Warner Losh" References: <20090128.020950.-1962670362.imp@bsdimp.com> <87k58f7npu.fsf@kobe.laptop> <20090128.092046.84362525.imp@bsdimp.com> Date: Wed, 28 Jan 2009 18:29:10 +0200 In-Reply-To: <20090128.092046.84362525.imp@bsdimp.com> (M. Warner Losh's message of "Wed, 28 Jan 2009 09:20:46 -0700 (MST)") Message-ID: <87mydbiecp.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: n0SGTBbC009465 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.458, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL -0.06, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: hackers@freebsd.org Subject: Re: Code review request: cdcontrol status label additon 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, 28 Jan 2009 16:29:31 -0000 On Wed, 28 Jan 2009 09:20:46 -0700 (MST), "M. Warner Losh" wrote: > Not going to look at glabel for this. I lifted the code from glable, > but must have done it badly. I'll grab a core 10 cd and see what's up. It may not be Fedora specific. I just happened to have it handy... Sorry for creating *more* work for you. I'll see if I can hack at cdcontrol too, and provide more useful input :) From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 16:33:29 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 BD56E106568C; Wed, 28 Jan 2009 16:33:29 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 559B38FC08; Wed, 28 Jan 2009 16:33:29 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id B4E4F1CE4B; Wed, 28 Jan 2009 17:33:28 +0100 (CET) Date: Wed, 28 Jan 2009 17:33:28 +0100 From: Ed Schouten To: Rui Paulo Message-ID: <20090128163328.GS17198@hoeg.nl> References: <20090127124137.46fcfac5@baby-jane.lamaiziere.net> <20090127150040.GA4333@haruhi> <20090128134309.GN17198@hoeg.nl> <71915973-47E0-4F38-AC20-221817A19C11@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4ZVTVymsHR1TEBjP" Content-Disposition: inline In-Reply-To: <71915973-47E0-4F38-AC20-221817A19C11@freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: FreeBSD Hackers , Daniel Lannstrom Subject: Re: Mackbook pro nvidia based video backlight 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, 28 Jan 2009 16:33:30 -0000 --4ZVTVymsHR1TEBjP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Rui Paulo wrote: > Not really. The xorg intel driver is already able to deal with this. > I don't know about NVIDIA. Yes, but that's what I mean. It will be a cold day in hell when "nv" supports this. As far as I can tell, it's just a pile of obfuscated C code. --=20 Ed Schouten WWW: http://80386.nl/ --4ZVTVymsHR1TEBjP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkmAiNgACgkQ52SDGA2eCwXs2QCePBec/U39aYsnTo0u5UX3Ljhv TvsAnA0cK6auzNy1abS+iXOVfzjnC7q1 =3jn+ -----END PGP SIGNATURE----- --4ZVTVymsHR1TEBjP-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 17:00:56 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 C9FA0106566B; Wed, 28 Jan 2009 17:00:56 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 894B18FC19; Wed, 28 Jan 2009 17:00:56 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n0SGuwHu006125; Wed, 28 Jan 2009 09:56:58 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 28 Jan 2009 09:57:20 -0700 (MST) Message-Id: <20090128.095720.1650439658.imp@bsdimp.com> To: keramida@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <87mydbiecp.fsf@kobe.laptop> References: <87k58f7npu.fsf@kobe.laptop> <20090128.092046.84362525.imp@bsdimp.com> <87mydbiecp.fsf@kobe.laptop> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: hackers@FreeBSD.org Subject: Re: Code review request: cdcontrol status label additon 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, 28 Jan 2009 17:00:57 -0000 In message: <87mydbiecp.fsf@kobe.laptop> Giorgos Keramidas writes: : On Wed, 28 Jan 2009 09:20:46 -0700 (MST), "M. Warner Losh" wrote: : > Not going to look at glabel for this. I lifted the code from glable, : > but must have done it badly. I'll grab a core 10 cd and see what's up. : : It may not be Fedora specific. I just happened to have it handy... : : Sorry for creating *more* work for you. I'll see if I can hack at : cdcontrol too, and provide more useful input :) I was actually thinking of moving this from status to its own command because the label isn't the only thing from the master header that I want to display. Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 17:16:37 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 7427A106566C for ; Wed, 28 Jan 2009 17:16:37 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id B03DE8FC19 for ; Wed, 28 Jan 2009 17:16:36 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl21-232.kln.forthnet.gr [77.49.148.232]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id n0SH60YP012617 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 28 Jan 2009 19:06:05 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id n0SH60Kb005693; Wed, 28 Jan 2009 19:06:00 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id n0SH601A005692; Wed, 28 Jan 2009 19:06:00 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: "M. Warner Losh" References: <20090128.020950.-1962670362.imp@bsdimp.com> <87k58f7npu.fsf@kobe.laptop> <20090128.092046.84362525.imp@bsdimp.com> <87mydbiecp.fsf@kobe.laptop> Date: Wed, 28 Jan 2009 19:05:59 +0200 In-Reply-To: <87mydbiecp.fsf@kobe.laptop> (Giorgos Keramidas's message of "Wed, 28 Jan 2009 18:29:10 +0200") Message-ID: <87d4e7e4y0.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: n0SH60YP012617 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.866, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.53, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: hackers@freebsd.org Subject: Re: Code review request: cdcontrol status label additon 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, 28 Jan 2009 17:16:38 -0000 On Wed, 28 Jan 2009 18:29:10 +0200, Giorgos Keramidas wrote: > On Wed, 28 Jan 2009 09:20:46 -0700 (MST), "M. Warner Losh" wrote: >> Not going to look at glabel for this. I lifted the code from glable, >> but must have done it badly. I'll grab a core 10 cd and see what's up. > > It may not be Fedora specific. I just happened to have it handy... > > Sorry for creating *more* work for you. I'll see if I can hack at > cdcontrol too, and provide more useful input :) If it helps at all, I added this: lseek(fd, ISO9660_OFFSET, SEEK_SET); rc = read (fd, buffer, CD_SECTOR_LEN); + if (rc == -1) + err(1, "read"); if (rc == CD_SECTOR_LEN && memcmp(buffer, ISO9660_MAGIC, sizeof(ISO9660_MAGIC) - 1) == 0) { and it seems that read() fails with EIO: lseek(3,0x8000,SEEK_SET) = 32768 (0x8000) read(3,0xbfbfe3a3,2048) ERR#5 'Input/output error' My `/var/log/messages' shows at the same time: Jan 28 19:01:52 kobe kernel: acd0: FAILURE - non aligned DMA transfer attempted Jan 28 19:01:52 kobe kernel: acd0: setting up DMA failed This is with a FreeBSD 8.0-CURRENT kernel from svn /head @ 187792. So it may not really be a problem with the patch itself... From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 17:21:23 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 64B181065680 for ; Wed, 28 Jan 2009 17:21:23 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 21BC48FC17 for ; Wed, 28 Jan 2009 17:21:23 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n0SHIdHM006539; Wed, 28 Jan 2009 10:18:39 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 28 Jan 2009 10:19:00 -0700 (MST) Message-Id: <20090128.101900.1355775961.imp@bsdimp.com> To: keramida@ceid.upatras.gr From: "M. Warner Losh" In-Reply-To: <87d4e7e4y0.fsf@kobe.laptop> References: <20090128.092046.84362525.imp@bsdimp.com> <87mydbiecp.fsf@kobe.laptop> <87d4e7e4y0.fsf@kobe.laptop> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: Code review request: cdcontrol status label additon 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, 28 Jan 2009 17:21:23 -0000 In message: <87d4e7e4y0.fsf@kobe.laptop> Giorgos Keramidas writes: : On Wed, 28 Jan 2009 18:29:10 +0200, Giorgos Keramidas wrote: : > On Wed, 28 Jan 2009 09:20:46 -0700 (MST), "M. Warner Losh" wrote: : >> Not going to look at glabel for this. I lifted the code from glable, : >> but must have done it badly. I'll grab a core 10 cd and see what's up. : > : > It may not be Fedora specific. I just happened to have it handy... : > : > Sorry for creating *more* work for you. I'll see if I can hack at : > cdcontrol too, and provide more useful input :) : : If it helps at all, I added this: : : lseek(fd, ISO9660_OFFSET, SEEK_SET); : rc = read (fd, buffer, CD_SECTOR_LEN); : + if (rc == -1) : + err(1, "read"); : if (rc == CD_SECTOR_LEN && : memcmp(buffer, ISO9660_MAGIC, sizeof(ISO9660_MAGIC) - 1) == 0) { : : and it seems that read() fails with EIO: : : lseek(3,0x8000,SEEK_SET) = 32768 (0x8000) : read(3,0xbfbfe3a3,2048) ERR#5 'Input/output error' OK. That's definitely not page aligned. : My `/var/log/messages' shows at the same time: : : Jan 28 19:01:52 kobe kernel: acd0: FAILURE - non aligned DMA transfer attempted : Jan 28 19:01:52 kobe kernel: acd0: setting up DMA failed ???? I have no clue what this means. I'll have to investigate. Chances are that your hardware has limitations on where DMA can come from and no provisions in the acd driver to bounce them (likely a reasonable performance thing). This likely means that I'll have to malloc the buffer to get it page aligned... Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 17:35:17 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 A41421065747 for ; Wed, 28 Jan 2009 17:35:17 +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 0C3A98FC19 for ; Wed, 28 Jan 2009 17:35:16 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (adsl21-232.kln.forthnet.gr [77.49.148.232]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id n0SHYxFh013896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 28 Jan 2009 19:35:04 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id n0SHYwAe005992; Wed, 28 Jan 2009 19:34:59 +0200 (EET) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id n0SHYwMr005991; Wed, 28 Jan 2009 19:34:58 +0200 (EET) (envelope-from keramida@freebsd.org) From: Giorgos Keramidas To: "M. Warner Losh" References: <20090128.092046.84362525.imp@bsdimp.com> <87mydbiecp.fsf@kobe.laptop> <87d4e7e4y0.fsf@kobe.laptop> <20090128.101900.1355775961.imp@bsdimp.com> Date: Wed, 28 Jan 2009 19:34:58 +0200 In-Reply-To: <20090128.101900.1355775961.imp@bsdimp.com> (M. Warner Losh's message of "Wed, 28 Jan 2009 10:19:00 -0700 (MST)") Message-ID: <87zlhb49ml.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: n0SHYxFh013896 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.457, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL -0.06, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: hackers@freebsd.org Subject: Re: Code review request: cdcontrol status label additon 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, 28 Jan 2009 17:35:18 -0000 On Wed, 28 Jan 2009 10:19:00 -0700 (MST), "M. Warner Losh" wrote: > : lseek(3,0x8000,SEEK_SET) = 32768 (0x8000) > : read(3,0xbfbfe3a3,2048) ERR#5 'Input/output error' > > OK. That's definitely not page aligned. Slightly modified to force the alignment. Thanks for the tip about the address, which I failed to notice in truss output :) %%% diff -r 0c625c73ecc0 usr.sbin/cdcontrol/cdcontrol.1 --- a/usr.sbin/cdcontrol/cdcontrol.1 Wed Jan 28 18:38:39 2009 +0200 +++ b/usr.sbin/cdcontrol/cdcontrol.1 Wed Jan 28 19:34:15 2009 +0200 @@ -156,12 +156,14 @@ Play the right subtrack on both left and right channels. .It Ic info Print the table of contents. -.It Ic status Op Cm audio | media | volume +.It Ic status Op Cm audio | label | media | volume Print the information about the disc: .Pp .Bl -tag -width ".Cm volume" -compact .It Cm audio the current playing status and position +.It Cm label +the current ISO 9660 volume label, if present .It Cm media the current media catalog status .It Cm volume diff -r 0c625c73ecc0 usr.sbin/cdcontrol/cdcontrol.c --- a/usr.sbin/cdcontrol/cdcontrol.c Wed Jan 28 18:38:39 2009 +0200 +++ b/usr.sbin/cdcontrol/cdcontrol.c Wed Jan 28 19:34:15 2009 +0200 @@ -86,6 +86,7 @@ #define STATUS_AUDIO 0x1 #define STATUS_MEDIA 0x2 #define STATUS_VOLUME 0x4 +#define STATUS_LABEL 0x8 struct cmdtab { int command; @@ -801,6 +802,8 @@ what |= STATUS_MEDIA; else if (!strncasecmp(p, "volume", strlen(p))) what |= STATUS_VOLUME; + else if (!strncasecmp(p, "label", strlen(p))) + what |= STATUS_LABEL; else { warnx("invalid command arguments"); return 0; @@ -851,6 +854,32 @@ else printf ("No volume level info available\n"); } + if (what & STATUS_LABEL) { +#define ISO9660_MAGIC "\x01" "CD001" "\x01\x00" +#define ISO9660_OFFSET 0x8000 +#define VOLUME_LEN 32 +#define CD_SECTOR_LEN 2048 +#define LABEL_NAME_OFF 0x28 +#define LABEL_NAME_LEN 32 + uint32_t buffer[CD_SECTOR_LEN / sizeof(uint32_t)]; + char *sp, *ep; + + lseek(fd, ISO9660_OFFSET, SEEK_SET); + rc = read (fd, buffer, CD_SECTOR_LEN); + if (rc == CD_SECTOR_LEN && + memcmp(buffer, ISO9660_MAGIC, sizeof(ISO9660_MAGIC) - 1) == 0) { + sp = (void *)buffer + LABEL_NAME_OFF; + ep = sp + LABEL_NAME_LEN - 1; + while (*ep == ' ' && ep >= sp) + *ep-- = '\0'; + if (verbose) + printf("ISO 9660 Label is: %s\n", sp); + else + printf("%s\n", sp); + } + else + printf("No ISO 9660 label found\n"); + } return(0); } %%% From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 19:24: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 784BF1065697 for ; Wed, 28 Jan 2009 19:24:24 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from mail.bitblocks.com (mail.bitblocks.com [64.142.15.60]) by mx1.freebsd.org (Postfix) with ESMTP id 1CAAD8FC20 for ; Wed, 28 Jan 2009 19:24:22 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost.bitblocks.com [127.0.0.1]) by mail.bitblocks.com (Postfix) with ESMTP id C9E3D5B13; Wed, 28 Jan 2009 11:24:21 -0800 (PST) To: John Baldwin In-reply-to: Your message of "Mon, 26 Jan 2009 16:51:28 EST." <200901261651.29116.jhb@freebsd.org> References: <20071220093950.GA79196@server.vk2pj.dyndns.org> <20071221181125.0B6F25B42@mail.bitblocks.com> <20071221201633.GM57756@deviant.kiev.zoral.com.ua> <200901261651.29116.jhb@freebsd.org> Comments: In-reply-to John Baldwin message dated "Mon, 26 Jan 2009 16:51:28 -0500." Date: Wed, 28 Jan 2009 11:24:21 -0800 From: Bakul Shah Message-Id: <20090128192421.C9E3D5B13@mail.bitblocks.com> Cc: Kostik Belousov , freebsd-hackers@freebsd.org, Carl Shapiro Subject: Re: critical floating point incompatibility 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, 28 Jan 2009 19:24:25 -0000 On Mon, 26 Jan 2009 16:51:28 EST John Baldwin wrote: > On Friday 21 December 2007 3:16:33 pm Kostik Belousov wrote: > > On Fri, Dec 21, 2007 at 10:11:24AM -0800, Bakul Shah wrote: > > > Peter Jeremy wrote: > > > > On Wed, Dec 19, 2007 at 09:40:34PM -0800, Carl Shapiro wrote: > > > > >The default setting of the x87 floating point control word on the i386 > > > > >port is 0x127F. Among other things, this value sets the precision > > > > >control to double precision. The default setting of the x87 floating > > > > >point control word on the AMD64 is 0x37F. > > > > ... > > > > >It seems clear that the right thing to do is to set the floating point > > > > >environment to the i386 default for i386 binaries. Is the current > > > > >behavior intended? > > > > > > > > I believe this is an oversight. See the thread beginning > > > > > http://lists.freebsd.org/pipermail/freebsd-stable/2007-November/037947.html > > > > > > >From reading Bruce's last message in that thread, seems to me > > > may be default for 64bit binaries should be the same as on > > > i386. Anyone wanting different behavior can always call > > > fpsetprec() etc. > > > > > > I think the fix is to change __INITIAL_FPUCW__ in > > > /sys/amd64/include/fpu.h to 0x127F like on i386. > > I think this shall be done for 32-bit processes only, or we get into > > another ABI breaking nightmare. > > How about something like this: (Carl, can you please test this?) Your patch works fine on a recent -current. Here is a program Carl had sent me more than a year ago for testing this. May be some varition of it can be added to compatibility tests. #include int main(void) { unsigned short cw; __asm__ __volatile__ ("fnstcw %0":"=m"(*&cw)); printf("cw=%#x\n", cw); return 0; } -- bakul PS: On a mac, cc -m64 builds 64 bit binaries and cc -m32 builds 32 bit binaries. The following script makes it as easy to do so on a 64 bit FreeBSD -- at least on the few programs I tried. Ideally the right magic needs to be folded in gcc's builtin "specs". #!/bin/sh args=/usr/bin/cc while [ ".$1" != . ] do a=$1; shift case $a in -m32) args="$args -B/usr/lib32 -I/usr/include32 -m32";; *) args="$args $a";; esac done $args Ideally x86_64 platforms run *all* i386 programs (that don't depend on a 32 bit kernel). From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 20:41:00 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 581AF10657E2 for ; Wed, 28 Jan 2009 20:41:00 +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 18C048FC17 for ; Wed, 28 Jan 2009 20:41:00 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id A0FB746B53; Wed, 28 Jan 2009 15:40:59 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n0SKekch099624; Wed, 28 Jan 2009 15:40:53 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 28 Jan 2009 14:06:52 -0500 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: <200901281406.53033.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 28 Jan 2009 15:40:53 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8914/Wed Jan 28 01:40:00 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Jacky Oh Subject: Re: Fwd: KLD: program.ko: depends of kernel - no avaiable 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, 28 Jan 2009 20:41:04 -0000 On Wednesday 28 January 2009 10:40:20 am Jacky Oh wrote: > hi everyone, > > the main goal of KLD are load code for executing as part of kernel at > run-time, so, i don't think that rebuild the kernel are a good solution.. > In other way a try to load any dev/syscall example at > /usr/share/examples/kld the result was the same.. > When i was thinking in S. Sedov reply about the undefined symbols i go to > run objdump for my syscall.ko and i can find the following: > # objdump -x syscall.ko > ... > 000019d4 l O .data 00000010 M_DIRP2_uninit_sys_uninit > 0000094c l O set_sysinit_set 00000004 > __set_sysinit_set_sym_M_DIRP2_init_sys_init > 000019e4 l O .data 00000010 M_DIRP2_init_sys_init > 000019f4 l O .data 0000000c syscall_mod > 00001a00 l O .data 0000000c _syscall_depend_on_kernel <------ > 00001a20 l O .data 00000028 syscall_syscall_mod > 00001a48 l O .data 00000004 offset > ... > The result whit the examples also shows the same symbol > (_syscall_depend_on_kernel), so, y disassemble this function: > > 00001a00 <_syscall_depend_on_kernel>: > 1a00: 3c 35 cmp $0x35,%al > 1a02: 0c 00 or $0x0,%al > 1a04: 3c 35 cmp $0x35,%al > 1a06: 0c 00 or $0x0,%al > 1a08: 9f lahf > 1a09: bb 0d 00 00 00 mov $0xd,%ebx > ... > > lahf == load status flags (EFLAGS) on ah register > > so, my question is, why precompiled modules (as if_ipw.ko, for example) > don't show this function? That is a MODULE_DEPEND() data structure, not a function. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 20:41:30 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 E83931065970 for ; Wed, 28 Jan 2009 20:41:29 +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 B91B18FC12 for ; Wed, 28 Jan 2009 20:41:29 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id 4B87C46B6C; Wed, 28 Jan 2009 15:41:29 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n0SKekcm099624; Wed, 28 Jan 2009 15:41:23 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Bakul Shah Date: Wed, 28 Jan 2009 15:35:30 -0500 User-Agent: KMail/1.9.7 References: <20071220093950.GA79196@server.vk2pj.dyndns.org> <200901261651.29116.jhb@freebsd.org> <20090128192421.C9E3D5B13@mail.bitblocks.com> In-Reply-To: <20090128192421.C9E3D5B13@mail.bitblocks.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901281535.31501.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 28 Jan 2009 15:41:23 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8914/Wed Jan 28 01:40:00 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Kostik Belousov , freebsd-hackers@freebsd.org, Carl Shapiro Subject: Re: critical floating point incompatibility 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, 28 Jan 2009 20:41:31 -0000 On Wednesday 28 January 2009 2:24:21 pm Bakul Shah wrote: > On Mon, 26 Jan 2009 16:51:28 EST John Baldwin wrote: > > On Friday 21 December 2007 3:16:33 pm Kostik Belousov wrote: > > > On Fri, Dec 21, 2007 at 10:11:24AM -0800, Bakul Shah wrote: > > > > Peter Jeremy wrote: > > > > > On Wed, Dec 19, 2007 at 09:40:34PM -0800, Carl Shapiro wrote: > > > > > >The default setting of the x87 floating point control word on the i386 > > > > > >port is 0x127F. Among other things, this value sets the precision > > > > > >control to double precision. The default setting of the x87 floating > > > > > >point control word on the AMD64 is 0x37F. > > > > > ... > > > > > >It seems clear that the right thing to do is to set the floating point > > > > > >environment to the i386 default for i386 binaries. Is the current > > > > > >behavior intended? > > > > > > > > > > I believe this is an oversight. See the thread beginning > > > > > > > http://lists.freebsd.org/pipermail/freebsd-stable/2007-November/037947.html > > > > > > > > >From reading Bruce's last message in that thread, seems to me > > > > may be default for 64bit binaries should be the same as on > > > > i386. Anyone wanting different behavior can always call > > > > fpsetprec() etc. > > > > > > > > I think the fix is to change __INITIAL_FPUCW__ in > > > > /sys/amd64/include/fpu.h to 0x127F like on i386. > > > I think this shall be done for 32-bit processes only, or we get into > > > another ABI breaking nightmare. > > > > How about something like this: (Carl, can you please test this?) > > Your patch works fine on a recent -current. Here is a > program Carl had sent me more than a year ago for testing > this. May be some varition of it can be added to > compatibility tests. > > #include > int main(void) > { > unsigned short cw; > __asm__ __volatile__ ("fnstcw %0":"=m"(*&cw)); > printf("cw=%#x\n", cw); > return 0; > } > > -- bakul Cool, thanks for testing! -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 22:01:18 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 8E69C10657CC for ; Wed, 28 Jan 2009 22:01:18 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from smtp.lamaiziere.net (net.lamaiziere.net [91.121.44.19]) by mx1.freebsd.org (Postfix) with ESMTP id 4F5258FC0A for ; Wed, 28 Jan 2009 22:01:18 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from baby-jane.lamaiziere.net (67.158.192-77.rev.gaoland.net [77.192.158.67]) by smtp.lamaiziere.net (Postfix) with ESMTPA id 9A53D633301 for ; Wed, 28 Jan 2009 23:01:17 +0100 (CET) Received: from baby-jane.lamaiziere.net (localhost [127.0.0.1]) by baby-jane.lamaiziere.net (Postfix) with ESMTP id A88BDC63E for ; Wed, 28 Jan 2009 23:01:15 +0100 (CET) Date: Wed, 28 Jan 2009 23:01:15 +0100 From: Patrick =?ISO-8859-15?Q?Lamaizi=E8re?= To: freebsd-hackers@freebsd.org Message-ID: <20090128230115.3a1e2871@baby-jane.lamaiziere.net> In-Reply-To: <20090128163328.GS17198@hoeg.nl> References: <20090127124137.46fcfac5@baby-jane.lamaiziere.net> <20090127150040.GA4333@haruhi> <20090128134309.GN17198@hoeg.nl> <71915973-47E0-4F38-AC20-221817A19C11@freebsd.org> <20090128163328.GS17198@hoeg.nl> Organization: /dave/nulle X-Mailer: Claws Mail 3.7.0 (GTK+ 2.12.11; i386-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: Mackbook pro nvidia based video backlight 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, 28 Jan 2009 22:01:20 -0000 Le Wed, 28 Jan 2009 17:33:28 +0100, Ed Schouten : > > Not really. The xorg intel driver is already able to deal with this. > > I don't know about NVIDIA. > > Yes, but that's what I mean. It will be a cold day in hell when "nv" > supports this. As far as I can tell, it's just a pile of obfuscated C > code. Anyway the backlight is very very high even in the console, I don't want to use X for this, i will not be able to set it at boot-time. Thanks for your replies, i will use both sysctl and a character device. Regards. From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 29 04:53:35 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 93C92106566B for ; Thu, 29 Jan 2009 04:53:35 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153]) by mx1.freebsd.org (Postfix) with ESMTP id 1E6B38FC1B for ; Thu, 29 Jan 2009 04:53:34 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: by fg-out-1718.google.com with SMTP id e12so1007807fga.35 for ; Wed, 28 Jan 2009 20:53:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:reply-to:mail-followup-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=QGTYw0G+SNJ2rLkWvdFscYd1iZ3n95jkLQwAC6mEIz0=; b=s+lmDo5Ypr6JEzCxCGA33kwoFIuOLV1B2wtDV8iOjCRZkspdTubA+ViaUjJm2Uhv2w N0tqhn1Y3VRXQtuWybwk4m0i3xL96YhgVsP3dfXoSQYjBSzu+MIwGvvPTWuA3ccvLIDC Yj95XEMoXU9VjlVbDeFah+60b7oyhrGED0nXM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:reply-to:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; b=WIi1JgnRJKW3cnXmEnsWWydh4k6AY6KWAobIMF5eQ3r5eqtwsQPEeq2f91aoLPlfBj RdAYHrOQW54v3Zns7r6sYtrsbtJNF/kA4zSU+syjPSz3tBJczccH0H+u1AgQDn7Yn+/c 2iK1xa5c+nGDfyvAqzVkkOzvNzC69ZwSAkAMc= Received: by 10.181.208.15 with SMTP id k15mr2425381bkq.130.1233204813693; Wed, 28 Jan 2009 20:53:33 -0800 (PST) Received: from localhost (BAJ370b.baj.pppool.de [77.137.55.11]) by mx.google.com with ESMTPS id z10sm28047331fka.13.2009.01.28.20.53.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 28 Jan 2009 20:53:33 -0800 (PST) Date: Thu, 29 Jan 2009 05:53:04 +0100 From: Alexej Sokolov To: freebsd-hackers@freebsd.org Message-ID: <20090129045304.GA18493@debian.samsung.router> Mail-Followup-To: freebsd-hackers@freebsd.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Re: KLD: program.ko: depends of kernel - no avaiable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexej Sokolov List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2009 04:53:35 -0000 Can you paste please the dmesg after KLDloading ? Sometimes there are in /var/log/messages more helpful information. And I would like to look your syscall code if it possible. Alexej On Tue, Jan 20, 2009 at 05:21:02PM +0100, Jacky Oh wrote: > Hi, > > I'm writing a syscall module and he compiles well but at load time, kldload > shows: > > KLD: program.ko: depends of kernel - no avaiable > > anyone know something about this? > > Thanks! > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -- Alexej Sokolov From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 29 05:36:16 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 47CD0106566B for ; Thu, 29 Jan 2009 05:36:16 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 06B078FC12 for ; Thu, 29 Jan 2009 05:36:15 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n0T5WqSh035895; Wed, 28 Jan 2009 22:32:52 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 28 Jan 2009 22:33:15 -0700 (MST) Message-Id: <20090128.223315.1447365184.imp@bsdimp.com> To: bsd.quest@googlemail.com From: "M. Warner Losh" In-Reply-To: <20090129045304.GA18493@debian.samsung.router> References: <20090129045304.GA18493@debian.samsung.router> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: KLD: program.ko: depends of kernel - no avaiable 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, 29 Jan 2009 05:36:16 -0000 In message: <20090129045304.GA18493@debian.samsung.router> Alexej Sokolov writes: : Can you paste please the dmesg after KLDloading ? Sometimes there are : in /var/log/messages more helpful information. And I would like to look : your syscall code if it possible. : : Alexej : : On Tue, Jan 20, 2009 at 05:21:02PM +0100, Jacky Oh wrote: : > Hi, : > : > I'm writing a syscall module and he compiles well but at load time, kldload : > shows: : > : > KLD: program.ko: depends of kernel - no avaiable : > : > anyone know something about this? The problem here is that the kernel _FreeBSD_version was bumped and no longer matches. Jacky installed the kernel with version, say 800060, and then updated the source bases where it changed to 800061, built modules and tried to load them. Warner From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 29 11:47:40 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 D1F7010656D1 for ; Thu, 29 Jan 2009 11:47:40 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id EA63B8FC1C for ; Thu, 29 Jan 2009 11:47:39 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA17760 for ; Thu, 29 Jan 2009 13:47:36 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <49819757.2010002@icyb.net.ua> Date: Thu, 29 Jan 2009 13:47:35 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.19 (X11/20090110) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: INTR_FILTER? 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, 29 Jan 2009 11:47:41 -0000 INTR_FILTER - what does it do? It doesn't seem to be documented anywhere, but seems to affect interrupt code. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 29 12:55:07 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 8DF10106564A for ; Thu, 29 Jan 2009 12:55:07 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 2762E8FC14 for ; Thu, 29 Jan 2009 12:55:07 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id D78031CDE9; Thu, 29 Jan 2009 13:55:05 +0100 (CET) Date: Thu, 29 Jan 2009 13:55:05 +0100 From: Ed Schouten To: Andriy Gapon Message-ID: <20090129125505.GA17198@hoeg.nl> References: <49819757.2010002@icyb.net.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LMmSgwdUwKH/sMG1" Content-Disposition: inline In-Reply-To: <49819757.2010002@icyb.net.ua> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: FreeBSD Hackers Subject: Re: INTR_FILTER? 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, 29 Jan 2009 12:55:07 -0000 --LMmSgwdUwKH/sMG1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Andriy Gapon wrote: > INTR_FILTER - what does it do? > It doesn't seem to be documented anywhere, but seems to affect interrupt > code. Not sure, but I think I was once told that FreeBSD has a `two level' interrupt handling scheme, where the filter is invoked directly to only figure out whether the interrupt is spurious or not. After it has been determined it is not, an interrupt thread is scheduled to handle the interrupt. But as I said, I'm not sure. :-) --=20 Ed Schouten WWW: http://80386.nl/ --LMmSgwdUwKH/sMG1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkmBpykACgkQ52SDGA2eCwVEQgCePBmjmPjcWwRG5VXmgs9Iew8p 5PMAn2uBafUEokC+O6zC1v6VRs3+L298 =DZxu -----END PGP SIGNATURE----- --LMmSgwdUwKH/sMG1-- From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 29 12:58: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 DFB081065687 for ; Thu, 29 Jan 2009 12:58:46 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 007998FC17 for ; Thu, 29 Jan 2009 12:58:45 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA19618; Thu, 29 Jan 2009 14:58:25 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4981A7F1.1050709@icyb.net.ua> Date: Thu, 29 Jan 2009 14:58:25 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.19 (X11/20090110) MIME-Version: 1.0 To: Ed Schouten References: <49819757.2010002@icyb.net.ua> <20090129125505.GA17198@hoeg.nl> In-Reply-To: <20090129125505.GA17198@hoeg.nl> Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: FreeBSD Hackers Subject: Re: INTR_FILTER? 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, 29 Jan 2009 12:58:47 -0000 on 29/01/2009 14:55 Ed Schouten said the following: > * Andriy Gapon wrote: >> INTR_FILTER - what does it do? >> It doesn't seem to be documented anywhere, but seems to affect interrupt >> code. > > Not sure, but I think I was once told that FreeBSD has a `two level' > interrupt handling scheme, where the filter is invoked directly to only > figure out whether the interrupt is spurious or not. After it has been > determined it is not, an interrupt thread is scheduled to handle the > interrupt. > > But as I said, I'm not sure. :-) > This is true and is documented in bus_setup_intr(9). But INTR_FILTER is a compile-time kernel option. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 29 14:36:07 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 6C84E106567D for ; Thu, 29 Jan 2009 14:36:07 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 2B4E48FC0A for ; Thu, 29 Jan 2009 14:36:07 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 175DE1CCA7; Thu, 29 Jan 2009 15:36:06 +0100 (CET) Date: Thu, 29 Jan 2009 15:36:06 +0100 From: Ed Schouten To: Alexander Leidinger Message-ID: <20090129143606.GC17198@hoeg.nl> References: <20090127124137.46fcfac5@baby-jane.lamaiziere.net> <20090127150040.GA4333@haruhi> <20090128134309.GN17198@hoeg.nl> <20090129151021.14131so3ozumpfj4@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bnBIwIKtMHAVL+3z" Content-Disposition: inline In-Reply-To: <20090129151021.14131so3ozumpfj4@webmail.leidinger.net> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: FreeBSD Hackers , Daniel Lannstrom Subject: Re: Mackbook pro nvidia based video backlight 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, 29 Jan 2009 14:36:07 -0000 --bnBIwIKtMHAVL+3z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Alexander Leidinger wrote: > So you want that either > - a daemon running as root is written which listens to user > requests to set the backlight via sysctl > or > - a SUID root program is written that sets the backlight > via sysctl > instead of > - a character device with appropriate filesystem permissions > which allows to not go the SUID root or daemon running as > root way > ? Yes. The primary reason is that it is more consistent with the rest of the operating system. powerd also uses sysctl's instead of a character device, for example. The ideal solution would be to integrate it into vidcontrol, calling some kind of ioctl on the TTY/consolectl, but syscons is too brainless to know anything about hardware specific features. --=20 Ed Schouten WWW: http://80386.nl/ --bnBIwIKtMHAVL+3z Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkmBvtYACgkQ52SDGA2eCwVm1wCbBNonc/3kJSYF1Xuy3TbbZuZ7 fnkAnRXEg2pxR4//vJg1zf9Rcsz/K6Mr =AiqI -----END PGP SIGNATURE----- --bnBIwIKtMHAVL+3z-- From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 29 14:10:30 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 EA3101065675 for ; Thu, 29 Jan 2009 14:10:30 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 800E28FC14 for ; Thu, 29 Jan 2009 14:10:30 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (pD9E2D9C6.dip.t-dialin.net [217.226.217.198]) by redbull.bpaserver.net (Postfix) with ESMTP id BE1B62E0EF; Thu, 29 Jan 2009 15:10:25 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 2D62812D459; Thu, 29 Jan 2009 15:10:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1233238222; bh=3PsS5z+JsFwNBChgiilelOCZENb2dS3Va DPqdegfaDE=; h=Message-ID:Date:From:To:Cc:Subject:References: In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Hs2gL5FCgHoNTdJQS08C9aOahfAc4WBSsLpRtfuiXYgU43ol1WgKrcD42ZHWMv6Tg AHzNoX3Da6wuosEMG+wTtoVU4ZkfIA4mKmDaz4EewSOSpYJM7Z0E/ZEpCzuaqGh0Dh6 GN7O0eD6KMKpZK2WJwV2s1inXprz82UR8FJGz16n1ba6cUyVY4RxJML2mmrPF9ROFIT ZZcld8MFfmntvwgQd45ZxblzS7VJ3ONukRuK9Y65SNimu3ih3+HZ/q5ns79U87CMScS TieaEBK6Y7JJHaFTx7diHTUskQDa6wDCKz1B5mKUxkivjjjQBdBSAe6OC/9nBqdcquo Yr0nMymBA== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id n0TEALuG025722; Thu, 29 Jan 2009 15:10:21 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Thu, 29 Jan 2009 15:10:21 +0100 Message-ID: <20090129151021.14131so3ozumpfj4@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Thu, 29 Jan 2009 15:10:21 +0100 From: Alexander Leidinger To: Ed Schouten References: <20090127124137.46fcfac5@baby-jane.lamaiziere.net> <20090127150040.GA4333@haruhi> <20090128134309.GN17198@hoeg.nl> In-Reply-To: <20090128134309.GN17198@hoeg.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.3) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: BE1B62E0EF.A6FE1 X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-14.4, required 6, BAYES_00 -15.00, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, RDNS_DYNAMIC 0.10, VOWEL_TOCC_5 0.50) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No X-Mailman-Approved-At: Thu, 29 Jan 2009 14:36:49 +0000 Cc: FreeBSD Hackers , Daniel Lannstrom Subject: Re: Mackbook pro nvidia based video backlight 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, 29 Jan 2009 14:10:31 -0000 Quoting Ed Schouten (from Wed, 28 Jan 2009 14:43:09 +0100): > * Daniel Lannstrom wrote: >> > I'm asking which method will be the best to interface the driver with >> > userland applications? >> >> You might want to make it a character device driver. And write a small >> userland control program. Sysctl isn't really made for this kind of >> functionality. > > No. sysctl is good for doing stuff like this. An even better approach So you want that either - a daemon running as root is written which listens to user requests to set the backlight via sysctl or - a SUID root program is written that sets the backlight via sysctl instead of - a character device with appropriate filesystem permissions which allows to not go the SUID root or daemon running as root way ? Bye, Alexander. --=20 E.T. GO HOME!!! (And take your Smurfs with you.) http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 29 17:17:30 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 3998F1065670 for ; Thu, 29 Jan 2009 17:17:30 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-ew0-f21.google.com (mail-ew0-f21.google.com [209.85.219.21]) by mx1.freebsd.org (Postfix) with ESMTP id B94388FC12 for ; Thu, 29 Jan 2009 17:17:29 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ewy14 with SMTP id 14so78453ewy.19 for ; Thu, 29 Jan 2009 09:17:28 -0800 (PST) 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=VnOuQbP4OZnWtbTsSSiYpxEvQLvIZKndu4rAabqxN80=; b=T3at56pvceWe4eyJu7g/LHRH2/QsAOX900ckqtZcr1chXPv5sr6G5fZxqw295S0bpD acAsMdPOEYA3Qty8tRmHxjaWoQvtLQT6gQgyiHBaCa4Bq6j5NppMjDrdBRQDyDFsfc1c /NxsWnK0IO7iPVSKb/Jv0jE5fZOAKYfSM1b0s= 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=r+9xffR+Un6W+8nIi9UlygXYa0bp01kX4ZlRtwtJMH2WS9ceHo9iUYq7MsI2IZScTP koFI/gmov9ybpRhPg7Tc57/+gV9YwheNdWCX/pxBnfH91ELWrPsrSRgC7kcyY9tSndnj tYqSHzp2hKd48AIcUXzGua3yArpCZnLbwDVbQ= Received: by 10.210.90.20 with SMTP id n20mr304399ebb.162.1233249448680; Thu, 29 Jan 2009 09:17:28 -0800 (PST) Received: from epsilon.lan (bl6-156-29.dsl.telepac.pt [82.155.156.29]) by mx.google.com with ESMTPS id y37sm1068iky.2.2009.01.29.09.17.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 29 Jan 2009 09:17:28 -0800 (PST) Sender: Rui Paulo Message-Id: <8F669786-30A2-458C-8A6B-3272297ADE14@freebsd.org> From: Rui Paulo To: Andriy Gapon In-Reply-To: <49819757.2010002@icyb.net.ua> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Thu, 29 Jan 2009 17:17:27 +0000 References: <49819757.2010002@icyb.net.ua> X-Mailer: Apple Mail (2.930.3) Cc: freebsd-hackers@freebsd.org Subject: Re: INTR_FILTER? 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, 29 Jan 2009 17:17:30 -0000 On 29 Jan 2009, at 11:47, Andriy Gapon wrote: > INTR_FILTER - what does it do? > It doesn't seem to be documented anywhere, but seems to affect > interrupt > code. INTR_FILTER allows you to skip the FILTER+ITHREAD headache. See dev/asmc/asmc.c for an example. -- Rui Paulo From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 29 17:51:21 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 8330E106564A for ; Thu, 29 Jan 2009 17:51:21 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 75FB58FC19 for ; Thu, 29 Jan 2009 17:51:20 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA28367; Thu, 29 Jan 2009 19:51:18 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4981EC95.1090002@icyb.net.ua> Date: Thu, 29 Jan 2009 19:51:17 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.19 (X11/20090110) MIME-Version: 1.0 To: Rui Paulo References: <49819757.2010002@icyb.net.ua> <8F669786-30A2-458C-8A6B-3272297ADE14@freebsd.org> In-Reply-To: <8F669786-30A2-458C-8A6B-3272297ADE14@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: INTR_FILTER? 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, 29 Jan 2009 17:51:21 -0000 on 29/01/2009 19:17 Rui Paulo said the following: > > On 29 Jan 2009, at 11:47, Andriy Gapon wrote: > >> INTR_FILTER - what does it do? >> It doesn't seem to be documented anywhere, but seems to affect interrupt >> code. > > INTR_FILTER allows you to skip the FILTER+ITHREAD headache. Could you please explain a little bit what is this headache? I thought, similarly to what Ed said, that in filter one could quickly check for a stray interrupt (or shared interrupt from other device) and in ithread one could perform meaningful work. But I also had some doubts about what is legal and what is illegal in ithread. E.g. could I take a non-spin mutex or wait on a condvar? I guess not - because in the case of shared interrupts the same ithread is used to handle everything. > See dev/asmc/asmc.c for an example. Thank you, the example is enlightening. But also one has to look into how "the framework" works (or just know it) to understand why things are done this way but not the other. E.g. why you have to use a taskqueue in non-INTR_FILTER case. BTW, INTR_FILTER seems quite useful. Why, then, it is not the default? -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 29 18:44:07 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 AE9C4106566C for ; Thu, 29 Jan 2009 18:44:07 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail18.syd.optusnet.com.au (mail18.syd.optusnet.com.au [211.29.132.199]) by mx1.freebsd.org (Postfix) with ESMTP id 3FC118FC17 for ; Thu, 29 Jan 2009 18:44:07 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c122-106-216-167.belrs3.nsw.optusnet.com.au [122.106.216.167]) by mail18.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n0TIi1cN029562 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Jan 2009 05:44:03 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id n0TIi15K061154; Fri, 30 Jan 2009 05:44:01 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id n0TIi0S4061153; Fri, 30 Jan 2009 05:44:00 +1100 (EST) (envelope-from peter) Date: Fri, 30 Jan 2009 05:44:00 +1100 From: Peter Jeremy To: Bakul Shah Message-ID: <20090129184400.GI1755@server.vk2pj.dyndns.org> References: <20071220093950.GA79196@server.vk2pj.dyndns.org> <20071221181125.0B6F25B42@mail.bitblocks.com> <20071221201633.GM57756@deviant.kiev.zoral.com.ua> <200901261651.29116.jhb@freebsd.org> <20090128192421.C9E3D5B13@mail.bitblocks.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6Vw0j8UKbyX0bfpA" Content-Disposition: inline In-Reply-To: <20090128192421.C9E3D5B13@mail.bitblocks.com> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org Subject: Re: critical floating point incompatibility 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, 29 Jan 2009 18:44:08 -0000 --6Vw0j8UKbyX0bfpA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2009-Jan-28 11:24:21 -0800, Bakul Shah wrote: >On a mac, cc -m64 builds 64 bit binaries and cc -m32 builds >32 bit binaries. The following script makes it as easy to do >so on a 64 bit FreeBSD -- at least on the few programs I >tried. Ideally the right magic needs to be folded in gcc's >builtin "specs". > >#!/bin/sh >args=3D/usr/bin/cc >while [ ".$1" !=3D . ] >do > a=3D$1; shift > case $a in > -m32) args=3D"$args -B/usr/lib32 -I/usr/include32 -m32";; > *) args=3D"$args $a";; > esac >done >$args You also need to manually populate /usr/include32 since it doesn't exist by default and may still get bitten by stuff in /usr/local/include. Do you have a script (or installworld patches) to do this? amd64/112215 includes a first attempt at updating the gcc specs (though it's missing the include handling), as well as some of the remaining problems. >Ideally x86_64 platforms run *all* i386 programs (that don't >depend on a 32 bit kernel). Agreed. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --6Vw0j8UKbyX0bfpA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEARECAAYFAkmB+PAACgkQ/opHv/APuIcQMwCgu3oFCnRIbPUZvQR51+2mZbJz I+gAmwW0xoTQ/arjlwpqcDISBwrBQZe6 =du2O -----END PGP SIGNATURE----- --6Vw0j8UKbyX0bfpA-- From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 29 17:16:36 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 3B317106564A for ; Thu, 29 Jan 2009 17:16:36 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by mx1.freebsd.org (Postfix) with ESMTP id B76C98FC1E for ; Thu, 29 Jan 2009 17:16:35 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by nf-out-0910.google.com with SMTP id h3so4882nfh.33 for ; Thu, 29 Jan 2009 09:16:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=VnOuQbP4OZnWtbTsSSiYpxEvQLvIZKndu4rAabqxN80=; b=o3HTpsRUZxszoGBCnPxMDD8ku5kk3S7nCMAXqqgd+e74yDwgl+efCjXqGLG5pnmbjV 68GvA843pkYAHLxSX7g14cdkIe8QGPIPWVHK/mr6Fxf4YwDJi7NNs52xSZD1bwOw34Ln J82pmkHzpIp8BQNGLIngodCvC+xYp8CXeijWM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=wwomeopSy70znl3wZRp3/5nkbJL/q7+GStO2zxr/KvrdXsEs2X+ry9CeTyxarqgz6V Ss647H3C/Ts88THHurUp9mAQWtCpg8D0neTRSwlIsjh5AVrBHAUpRu1awFHoItzM1Je3 E6EeeKG5L3Rj064zLJnBQ8FGNDHPtXA19pe4A= Received: by 10.210.111.17 with SMTP id j17mr318293ebc.115.1233249394569; Thu, 29 Jan 2009 09:16:34 -0800 (PST) Received: from epsilon.lan (bl6-156-29.dsl.telepac.pt [82.155.156.29]) by mx.google.com with ESMTPS id y37sm1068iky.2.2009.01.29.09.16.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 29 Jan 2009 09:16:33 -0800 (PST) Message-Id: From: Rui Paulo To: Andriy Gapon In-Reply-To: <49819757.2010002@icyb.net.ua> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Thu, 29 Jan 2009 17:16:31 +0000 References: <49819757.2010002@icyb.net.ua> X-Mailer: Apple Mail (2.930.3) X-Mailman-Approved-At: Thu, 29 Jan 2009 19:19:01 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: INTR_FILTER? 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, 29 Jan 2009 17:16:36 -0000 On 29 Jan 2009, at 11:47, Andriy Gapon wrote: > INTR_FILTER - what does it do? > It doesn't seem to be documented anywhere, but seems to affect > interrupt > code. INTR_FILTER allows you to skip the FILTER+ITHREAD headache. See dev/asmc/asmc.c for an example. -- Rui Paulo From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 29 22:11:35 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 4F1D3106564A for ; Thu, 29 Jan 2009 22:11:35 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from mail.bitblocks.com (bitblocks.com [64.142.15.60]) by mx1.freebsd.org (Postfix) with ESMTP id 2C12C8FC0A for ; Thu, 29 Jan 2009 22:11:35 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost.bitblocks.com [127.0.0.1]) by mail.bitblocks.com (Postfix) with ESMTP id 0EAA35B21; Thu, 29 Jan 2009 14:11:33 -0800 (PST) To: Peter Jeremy In-reply-to: Your message of "Fri, 30 Jan 2009 05:44:00 +1100." <20090129184400.GI1755@server.vk2pj.dyndns.org> References: <20071220093950.GA79196@server.vk2pj.dyndns.org> <20071221181125.0B6F25B42@mail.bitblocks.com> <20071221201633.GM57756@deviant.kiev.zoral.com.ua> <200901261651.29116.jhb@freebsd.org> <20090128192421.C9E3D5B13@mail.bitblocks.com> <20090129184400.GI1755@server.vk2pj.dyndns.org> Comments: In-reply-to Peter Jeremy message dated "Fri, 30 Jan 2009 05:44:00 +1100." Date: Thu, 29 Jan 2009 14:11:33 -0800 From: Bakul Shah Message-Id: <20090129221134.0EAA35B21@mail.bitblocks.com> Cc: freebsd-hackers@freebsd.org Subject: cc -m32 (was Re: critical floating point incompatibility 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, 29 Jan 2009 22:11:35 -0000 On Fri, 30 Jan 2009 05:44:00 +1100 Peter Jeremy wrote: > > On 2009-Jan-28 11:24:21 -0800, Bakul Shah wrote: > >On a mac, cc -m64 builds 64 bit binaries and cc -m32 builds > >32 bit binaries. The following script makes it as easy to do > >so on a 64 bit FreeBSD -- at least on the few programs I > >tried. Ideally the right magic needs to be folded in gcc's > >builtin "specs". > > > >#!/bin/sh > >args=3D/usr/bin/cc > >while [ ".$1" !=3D . ] > >do > > a=3D$1; shift > > case $a in > > -m32) args=3D"$args -B/usr/lib32 -I/usr/include32 -m32";; > > *) args=3D"$args $a";; > > esac > >done > >$args > > You also need to manually populate /usr/include32 since it doesn't > exist by default and may still get bitten by stuff in > /usr/local/include. Do you have a script (or installworld patches) to > do this? Yes, includes for native programs will may cause trouble -- but you can't use -nostdinc (as that would take away that feature from a user), which is why this needs to be in the gcc specs. I don't have a script as I just copied include directories from a i386 system. But a script would be better. This script was an initial stab at proper -m32 support and needs more work. I will be happy to work with you or anyone else to make this happen. From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 29 22:30:33 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 524AB10656F9 for ; Thu, 29 Jan 2009 22:30:33 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-ew0-f21.google.com (mail-ew0-f21.google.com [209.85.219.21]) by mx1.freebsd.org (Postfix) with ESMTP id A5F4A8FC26 for ; Thu, 29 Jan 2009 22:30:32 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ewy14 with SMTP id 14so507484ewy.19 for ; Thu, 29 Jan 2009 14:30:31 -0800 (PST) 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=qX0o1GoMif3YtD8c9mCruSXp1gkK2ioexaOp3ODsJqo=; b=VuHkOdmmxWhPg3g3UPtDSpNkD92MJfgnnZD4Zgen7pF6npNgRdmGdlzxwkBluGPiou ZhxZa7cbIrXq63w6KqhD+9ksKpXrJSljZyJEJO7OwHoktKfNAe62ndyWfj1PjJwtEF5X zJVhwo0UtqH7ka/0HfCbogZFNXRaMs4MlGeL0= 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=lXHtkC+Sy5BC1svmkIU4sG1ntBtYrSn7u307HcmcPdFsMqwFSniBJaMrZ1jKYPQ5+J I96eFwiaMUri35HMUoh6OLjmKa8qzfEMC/3+6nuA/An+DTmtY+msE1ikfdUAKRFkYfw/ 8/ubkiBd25/V54Pc6Z9mCUIlb7ogIxLtCf5I0= Received: by 10.210.92.11 with SMTP id p11mr679112ebb.2.1233268231396; Thu, 29 Jan 2009 14:30:31 -0800 (PST) Received: from epsilon.lan (bl6-156-29.dsl.telepac.pt [82.155.156.29]) by mx.google.com with ESMTPS id d23sm579850nfh.28.2009.01.29.14.30.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 29 Jan 2009 14:30:30 -0800 (PST) Sender: Rui Paulo Message-Id: From: Rui Paulo To: Andriy Gapon In-Reply-To: <4981EC95.1090002@icyb.net.ua> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Thu, 29 Jan 2009 22:30:08 +0000 References: <49819757.2010002@icyb.net.ua> <8F669786-30A2-458C-8A6B-3272297ADE14@freebsd.org> <4981EC95.1090002@icyb.net.ua> X-Mailer: Apple Mail (2.930.3) Cc: freebsd-hackers@freebsd.org Subject: Re: INTR_FILTER? 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, 29 Jan 2009 22:30:34 -0000 On 29 Jan 2009, at 17:51, Andriy Gapon wrote: > on 29/01/2009 19:17 Rui Paulo said the following: >> >> On 29 Jan 2009, at 11:47, Andriy Gapon wrote: >> >>> INTR_FILTER - what does it do? >>> It doesn't seem to be documented anywhere, but seems to affect >>> interrupt >>> code. >> >> INTR_FILTER allows you to skip the FILTER+ITHREAD headache. > > Could you please explain a little bit what is this headache? Basically, you use filter + ithread (intr_filter) when you want to do more than basic things in your interrupt handler routine. For example, allocating memory must be done in a ithread, it can't be done on the interrupt routine. > I thought, similarly to what Ed said, that in filter one could quickly > check for a stray interrupt (or shared interrupt from other device) > and > in ithread one could perform meaningful work. That's right. But INTR_FILTER does all the filter + ithread setup for you via FILTER_SCHEDULE_THREAD. > But I also had some doubts about what is legal and what is illegal in > ithread. E.g. could I take a non-spin mutex or wait on a condvar? I > guess not - because in the case of shared interrupts the same > ithread is > used to handle everything. > >> See dev/asmc/asmc.c for an example. > > Thank you, the example is enlightening. But also one has to look into > how "the framework" works (or just know it) to understand why things > are > done this way but not the other. E.g. why you have to use a > taskqueue in > non-INTR_FILTER case. I needed a taskqueue because devctl_notify() calls malloc and you can't call malloc (which holds some type of lock, I can't remember) from an interrupt context (asmc_sms_intrfast()) > BTW, INTR_FILTER seems quite useful. Why, then, it is not the default? The drivers would have to be ported to INTR_FILTER. Right now, only asmc is using INTR_FILTER, so I don't think there is much gain in making it the default. -- Rui Paulo From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 30 08:44: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 58436106564A for ; Fri, 30 Jan 2009 08:44:23 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id E69F08FC19 for ; Fri, 30 Jan 2009 08:44:22 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 613BF1CCA7; Fri, 30 Jan 2009 09:44:21 +0100 (CET) Date: Fri, 30 Jan 2009 09:44:21 +0100 From: Ed Schouten To: Alexander Leidinger Message-ID: <20090130084421.GO17198@hoeg.nl> References: <20090130085227.957230z897u8viww@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Ian02MSQ7xDzAZO2" Content-Disposition: inline In-Reply-To: <20090130085227.957230z897u8viww@webmail.leidinger.net> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: FreeBSD Hackers , Daniel Lannstrom Subject: Re: Mackbook pro nvidia based video backlight 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, 30 Jan 2009 08:44:23 -0000 --Ian02MSQ7xDzAZO2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Alexander Leidinger wrote: >> The ideal solution would be to integrate it into vidcontrol, calling >> some kind of ioctl on the TTY/consolectl, but syscons is too brainless >> to know anything about hardware specific features. > > Here we are back to what was proposed instead of sysctl. I have to admin= =20 > that I'm confused now about what you propose as a good solution. Well, I wouldn't like it if we create character devices, just to let it implement a single ioctl() ("/dev/backlight", for example). There is only 1 parameter that's adjustable, namely the backlight intensity. A sysctl is a good place to store such things. In my opinion we should only use character devices for devices that have the semantics of a file descriptor, namely to read/write data to it, perform select(), etc. Saying sysctl is bad, because it doesn't allow any permissions should be considered to be a defect of sysctl, not an advantage of devfs. The reason why I prefer consolectl, is because it already exists and allows related graphics parameters to be configured. --=20 Ed Schouten WWW: http://80386.nl/ --Ian02MSQ7xDzAZO2 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkmCveUACgkQ52SDGA2eCwWIlwCfRZ7vNV3EuDaoTaUKmcOeihVb hAQAnjO4ARli5O0PHEr5cGncLf+ok9My =g6Sf -----END PGP SIGNATURE----- --Ian02MSQ7xDzAZO2-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 30 09:53:49 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 0639D1065672 for ; Fri, 30 Jan 2009 09:53:49 +0000 (UTC) (envelope-from prvs=julian=27491d7ee@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id E4CB18FC0C for ; Fri, 30 Jan 2009 09:53:48 +0000 (UTC) (envelope-from prvs=julian=27491d7ee@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.102]) by smtp-outbound.ironport.com with ESMTP; 30 Jan 2009 01:25:13 -0800 Message-ID: <4982C777.9030700@elischer.org> Date: Fri, 30 Jan 2009 01:25:11 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Ed Schouten References: <20090130085227.957230z897u8viww@webmail.leidinger.net> <20090130084421.GO17198@hoeg.nl> In-Reply-To: <20090130084421.GO17198@hoeg.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexander Leidinger , Daniel Lannstrom , FreeBSD Hackers Subject: Re: Mackbook pro nvidia based video backlight 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, 30 Jan 2009 09:53:49 -0000 Ed Schouten wrote: > * Alexander Leidinger wrote: >>> The ideal solution would be to integrate it into vidcontrol, calling >>> some kind of ioctl on the TTY/consolectl, but syscons is too brainless >>> to know anything about hardware specific features. >> Here we are back to what was proposed instead of sysctl. I have to admin >> that I'm confused now about what you propose as a good solution. > > Well, I wouldn't like it if we create character devices, just to let it > implement a single ioctl() ("/dev/backlight", for example). There is > only 1 parameter that's adjustable, namely the backlight intensity. A > sysctl is a good place to store such things. I don't know.... you could flash morse code in response to a write. > > In my opinion we should only use character devices for devices that > have the semantics of a file descriptor, namely to read/write data to > it, perform select(), etc. Saying sysctl is bad, because it doesn't > allow any permissions should be considered to be a defect of sysctl, not > an advantage of devfs. > > The reason why I prefer consolectl, is because it already exists and > allows related graphics parameters to be configured. > From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 30 10: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 1A6D51065688 for ; Fri, 30 Jan 2009 10:28:23 +0000 (UTC) (envelope-from vasanth.raonaik@gmail.com) Received: from el-out-1112.google.com (el-out-1112.google.com [209.85.162.180]) by mx1.freebsd.org (Postfix) with ESMTP id C97738FC1B for ; Fri, 30 Jan 2009 10:28:22 +0000 (UTC) (envelope-from vasanth.raonaik@gmail.com) Received: by el-out-1112.google.com with SMTP id r27so242398ele.13 for ; Fri, 30 Jan 2009 02:28:22 -0800 (PST) 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; bh=xeugpite5Ur0C1DfEAU/+zzVVN7AgHCNucU433XlPgU=; b=pCJGRzSZRHXlEvp56h1BpV/SG5wbaCkkNzEEsFlFyiGcha1Nvh2eE8CCwvA4ynaNcU 1L2LPOzQxwUBpNw/XjeoLU4IRafwirwj/3Lq8X/OWo71X0P8WyXpchsilVGitj3fs7lH VzGtyaGDy/+brgw9Mu8xgxy7xnyuzk6z//Ca0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Re07UiyTwOKgCFX76t8cryxCvKiKCU10XeBSW66s/BCM3l032L3f/lHyb87/oncTwP GKAWYWSLcQvxBiHQE/TFSWdg2ZJFVathPd1V4GLgEI1eGgDVRrlGk6TZFnT4yEoxCycz gY1LqWuY2ej5gkbGHiRqDD2Rsi+hwt1cM3On4= MIME-Version: 1.0 Received: by 10.90.83.2 with SMTP id g2mr796311agb.79.1233309305344; Fri, 30 Jan 2009 01:55:05 -0800 (PST) Date: Fri, 30 Jan 2009 15:25:05 +0530 Message-ID: From: vasanth raonaik To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: telnetd[20170]: ttloop: peer died: Resource temporarily unavailable 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, 30 Jan 2009 10:28:23 -0000 Hello Hackers, I am seeing this message continuously in syslog for every 60 secs. what could be the possible reasons for this error messages. Thanks, Vasanth From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 30 07:52: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 2F9B9106567E for ; Fri, 30 Jan 2009 07:52:46 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id B201A8FC17 for ; Fri, 30 Jan 2009 07:52:45 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (unknown [217.226.221.233]) by redbull.bpaserver.net (Postfix) with ESMTP id 7DE1D2E06B; Fri, 30 Jan 2009 08:52:41 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 4E3E65D7B2; Fri, 30 Jan 2009 08:52:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1233301948; bh=Q6hHeRGrFcvxw5Csu6QXLkkJ071VqnsnV OYNLn42Cuo=; h=Message-ID:Date:From:To:Cc:Subject:References: In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=RRXUN4hu4Qc+7YuCQN6A9rRxhG6JtJcHYFs6eFf8QezkU1yjbOHGu6cbli4NhbCbq P+M79g2Jtzu8hFPQYVr6edgT6FtYQwzLaI/O/Yumu1zS9hpHpkfmkHRneWem+TFHfTz UqO8s91oWj9UE4geHz7Sg5TBT7XkeLplWX+8JHHvrMmEJ4/Zj9W7VEiT5fM7W98X+J5 BHOdqMgcSB18fBTC1EIVWV4/2fS5PAwdbAzukQNY19ioCdPJSdk0tBaAFJloL3RUe07 8cwYLiDTPM5HWIgJMrqILrsAb1uA07TPYiWsH5QFncCFfk/zUTio2MF62o8TrJ0Xo2S AEFT+938g== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id n0U7qRj3022404; Fri, 30 Jan 2009 08:52:27 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Fri, 30 Jan 2009 08:52:27 +0100 Message-ID: <20090130085227.957230z897u8viww@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Fri, 30 Jan 2009 08:52:27 +0100 From: Alexander Leidinger To: Ed Schouten References: <20090127124137.46fcfac5@baby-jane.lamaiziere.net> <20090127150040.GA4333@haruhi> <20090128134309.GN17198@hoeg.nl> <20090129151021.14131so3ozumpfj4@webmail.leidinger.net> <20090129143606.GC17198@hoeg.nl> In-Reply-To: <20090129143606.GC17198@hoeg.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.3) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: 7DE1D2E06B.57F56 X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-13.9, required 6, BAYES_00 -15.00, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, NO_RDNS 0.50, RDNS_NONE 0.10, VOWEL_TOCC_5 0.50) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No X-Mailman-Approved-At: Fri, 30 Jan 2009 12:14:06 +0000 Cc: FreeBSD Hackers , Daniel Lannstrom Subject: Re: Mackbook pro nvidia based video backlight 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, 30 Jan 2009 07:52:46 -0000 Quoting Ed Schouten (from Thu, 29 Jan 2009 15:36:06 +0100): > * Alexander Leidinger wrote: >> So you want that either >> - a daemon running as root is written which listens to user >> requests to set the backlight via sysctl >> or >> - a SUID root program is written that sets the backlight >> via sysctl >> instead of >> - a character device with appropriate filesystem permissions >> which allows to not go the SUID root or daemon running as >> root way >> ? > > Yes. The primary reason is that it is more consistent with the rest of > the operating system. powerd also uses sysctl's instead of a character > device, for example. Powerd does not interact with the user, it is doing automatic power =20 management. A backlight on the other hand needs to be adjustable by =20 the user. Normally I would expect some keys on the keyboard to handle this, so =20 there should be no need to have some userland stuff, but as I don't =20 know about how Apple is doing this, I assume there's some valid reason =20 to handle it from userland. But then there needs to be some easy way =20 to let an user handle it, even if you are on the console. A separate =20 daemon or a SUID root program to control the backlight sounds like =20 overkill to me. > The ideal solution would be to integrate it into vidcontrol, calling > some kind of ioctl on the TTY/consolectl, but syscons is too brainless > to know anything about hardware specific features. Here we are back to what was proposed instead of sysctl. I have to =20 admin that I'm confused now about what you propose as a good solution. Bye, Alexander. --=20 If I had any humility I would be perfect. =09=09-- Ted Turner http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 30 13:25:59 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 849C61065672 for ; Fri, 30 Jan 2009 13:25:59 +0000 (UTC) (envelope-from p.pisati@oltrelinux.com) Received: from mail0.tomato.it (mail0.tomato.it [213.92.0.53]) by mx1.freebsd.org (Postfix) with SMTP id 1A21D8FC0A for ; Fri, 30 Jan 2009 13:25:48 +0000 (UTC) (envelope-from p.pisati@oltrelinux.com) Received: from wlf.contactlab.it (unknown [172.16.7.101]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mail0.tomato.it (Postfix) with ESMTPS id 6626328485; Fri, 30 Jan 2009 14:09:58 +0100 (CET) Received: from ferret.tomato.lan (62.101.64.91) by wfl.contactlab.it (172.16.7.101) with Microsoft SMTP Server id 8.1.240.5; Fri, 30 Jan 2009 14:10:37 +0100 Message-ID: <4982FBC7.1080100@oltrelinux.com> Date: Fri, 30 Jan 2009 14:08:23 +0100 From: Paolo Pisati User-Agent: Thunderbird 2.0.0.16 (X11/20080815) MIME-Version: 1.0 To: Andriy Gapon References: <49819757.2010002@icyb.net.ua> In-Reply-To: <49819757.2010002@icyb.net.ua> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: INTR_FILTER? 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, 30 Jan 2009 13:26:00 -0000 Andriy Gapon wrote: > INTR_FILTER - what does it do? > It doesn't seem to be documented anywhere, but seems to affect interrupt > code. > > for a bit more information about interrupt filtering, see here: http://lists.freebsd.org/pipermail/freebsd-hackers/2007-February/019704.html -- bye, P. From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 30 17:11:57 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 90D01106566B for ; Fri, 30 Jan 2009 17:11:57 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.190]) by mx1.freebsd.org (Postfix) with ESMTP id 0EAA78FC17 for ; Fri, 30 Jan 2009 17:11:56 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: by mu-out-0910.google.com with SMTP id i2so469054mue.3 for ; Fri, 30 Jan 2009 09:11:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-mailer; bh=AnVwk5RsY7JlGLsv08OwzdYHe30rr/BxgxX3lrNQvCw=; b=xWgy7LESw8uMxT8Z6FK8Xhn5NMl0q5CXc2QbBIareZQcSentWmYjUUSaT2jONG4uNL NON0aMNp2kz5oq9m9FkQUG2CAmy0wHPLXlqV3pvdN2c9dyozAkviQRC/ECtMUC+14WoO 3jL7ICXmcMiJVDwOCk9mL17snkba+2nqltcYs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=qqSmde5P1WPjz6giUYvKOTyA3JLcahBEqZq1zrcFAoxUIbfF0WV49YiJmw0wMFV+74 UCvDzLYwhfg0+aqDtd6m9W+GjInVSXSUnSIobdmZcamsTQ2HFCubtU+vsB6ycAWthFNt 8oJDRf9ZB47EnzHoxWeAbtF0X6gD9oeP1V6d0= Received: by 10.103.160.3 with SMTP id m3mr675439muo.25.1233335516057; Fri, 30 Jan 2009 09:11:56 -0800 (PST) Received: from nslpc5.epfl.ch (nslpc5.epfl.ch [128.178.149.20]) by mx.google.com with ESMTPS id g1sm1969959muf.47.2009.01.30.09.11.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 30 Jan 2009 09:11:55 -0800 (PST) Message-Id: <02026848-7F83-405C-B4F3-EDD8B47DA294@gmail.com> From: =?UTF-8?Q?Nikola_Kne=C5=BEevi=C4=87?= To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Fri, 30 Jan 2009 18:11:53 +0100 X-Mailer: Apple Mail (2.930.3) Subject: blockable sleep lock (sleep mutex) 16 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, 30 Jan 2009 17:11:58 -0000 Hi, I'm trying to port Click modular router to FreeBSD 7.1, but with a twist. Instead of letting Click run in netisr (as it used to run in FreeBSD 4), I want to have it running in a kthread. I managed to get it running this way, but when I turn on INVARIANTS and WITNESS (along with WITNESS_SKIPSPIN), I get coredumps when I'm trying to install a new configuration... Here is the trace: ---8<--- (kgdb) bt #0 doadump () at pcpu.h:195 #1 0xffffffff8049ef98 in boot (howto=260) at /usr/src/sys/kern/ kern_shutdown.c:418 #2 0xffffffff8049f429 in panic (fmt=Variable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:574 #3 0xffffffff804d941c in witness_checkorder (lock=0xffffff0007fdfc50, flags=Variable "flags" is not available. ) at /usr/src/sys/kern/subr_witness.c:877 #4 0xffffffff80493769 in _mtx_lock_flags (m=0xffffff0007fdfc50, opts=0, file=0xffffffff8085536f "/usr/src/sys/vm/uma_core.c", line=1834) at /usr/src/sys/kern/kern_mutex.c:183 #5 0xffffffff806a6aab in uma_zalloc_arg (zone=0xffffff0007fde9c0, udata=0x0, flags=2) at /usr/src/sys/vm/uma_core.c:1834 #6 0xffffffff804908c6 in malloc (size=Variable "size" is not available. ) at uma.h:277 #7 0xffffffff877579bd in operator new[] (sz=Variable "sz" is not available. ) at /home/knl/work/mx/click/bsdmodule/..//lib/glue.cc:285 #8 0xffffffff877856d3 in ?? () #9 0xffffffff8785d540 in ?? () #10 0xffffffff8785d610 in ?? () #11 0x0000000000000000 in ?? () #12 0xffffff0001353300 in ?? () #13 0xffffffff8785d580 in ?? () #14 0xffffffff87777afa in Click::ClickInstance::element_hindexes (this=0x4, result=@0xffffffff8785d610) at vector.hh:96 Previous frame identical to this frame (corrupt stack?) --->8--- This is the message buffer: Unread portion of the kernel message buffer: panic: blockable sleep lock (sleep mutex) 16 @ /usr/src/sys/vm/ uma_core.c:1834 cpuid = 0 Uptime: 24m35s Physical memory: 114 MB Dumping 42 MB: 27 11 Any hints where I should search for the cause? I'm using MTX_DEF mutexes to protect data structures. Click exports its own FS, where each element (part of the router) has its own files. Each file has coresponding function which is responsible for input/ output of the data. So, when I want to create a new router, I write to file named "config". Then, function named write_config takes over, starts the Lexer, which in turns produces elements, which then export their representations in the VFS. All of this happens in the clickfs_close (creation starts when file is closed). If I read the code correctly, vn_closefile locks the Giant, so that may cause problems... Cheers, N. From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 30 17:53:50 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 898E41065674 for ; Fri, 30 Jan 2009 17:53:50 +0000 (UTC) (envelope-from matthew.fleming@isilon.com) Received: from seaxch09.isilon.com (seaxch09.isilon.com [74.85.160.25]) by mx1.freebsd.org (Postfix) with ESMTP id 694DF8FC18 for ; Fri, 30 Jan 2009 17:53:50 +0000 (UTC) (envelope-from matthew.fleming@isilon.com) X-MimeOLE: Produced By Microsoft Exchange V6.5 Received: from 10.54.190.89 ([10.54.190.89]) by seaxch09.desktop.isilon.com ([10.10.2.96]) with Microsoft Exchange Server HTTP-DAV ; Fri, 30 Jan 2009 17:41:50 +0000 MIME-Version: 1.0 Received: from amaretto by SEAXCH09.isilon.com; 30 Jan 2009 09:41:59 -0800 Organization: The Q Continuum X-Mailer: Evolution 2.24.2 Content-class: urn:content-classes:message Date: Fri, 30 Jan 2009 09:41:58 -0800 Message-ID: <1233337318.13748.101.camel@amaretto> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Dynamic ddb commands Thread-Index: AcmDAgfEVN4qhoMZRjucAuqo8gYrMQ== From: "Matthew Fleming" To: X-Mailman-Approved-At: Fri, 30 Jan 2009 18:08:33 +0000 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Dynamic ddb commands 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, 30 Jan 2009 17:53:50 -0000 I'm working on BSD 6.x and of course the set of ddb commands is static to whatever is in the kernel at compile. I see that BSD 7.1 has dynamic commands using sysinits and sysuninit's to call a new db_[un]register_cmd. I see this, though, only after I have spent a day or so adding a linker_file_[un]register_ddb() that works similarly to how sysinits are merged for the boot-time modules (malloc and copy pointers). It seems to me that this solution (have the linker look for db_set and db_cmd_set and, if there are any entries, malloc and save pointers to commands) is more efficient in terms of space than adding a LIST to the command structure and then forcing sysinits to run. I'm curious as to why the current method was chosen when something lighter-weight was available... or so it seems from my perspective looking at the 6.x code base. As another side note, lexicographic order for the commands doesn't seem to add anything, except that command insert/delete are O(n/2) instead of O(n). It can make it harder to use ddb to debug ddb, though. If, e.g. there's a pointer problem somewhere in the command list, if the most basic commands are up front like examine and write, then at least those can be used to possibly repair ddb so a debug session can continue. Just wondering things. Thanks, matthew From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 30 18:24: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 DB46610656CC for ; Fri, 30 Jan 2009 18:24:48 +0000 (UTC) (envelope-from matthew.fleming@isilon.com) Received: from seaxch09.isilon.com (seaxch09.isilon.com [74.85.160.25]) by mx1.freebsd.org (Postfix) with ESMTP id C0CC88FC27 for ; Fri, 30 Jan 2009 18:24:48 +0000 (UTC) (envelope-from matthew.fleming@isilon.com) Received: from 10.54.190.89 ([10.54.190.89]) by seaxch09.desktop.isilon.com ([10.10.2.96]) with Microsoft Exchange Server HTTP-DAV ; Fri, 30 Jan 2009 18:24:48 +0000 Received: from amaretto by SEAXCH09.isilon.com; 30 Jan 2009 10:24:57 -0800 From: Matthew Fleming To: freebsd-hackers@freebsd.org In-Reply-To: <1233337318.13748.101.camel@amaretto> References: <1233337318.13748.101.camel@amaretto> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: The Q Continuum Date: Fri, 30 Jan 2009 10:24:57 -0800 Message-Id: <1233339897.13748.106.camel@amaretto> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 Subject: Re: Dynamic ddb commands 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, 30 Jan 2009 18:24:49 -0000 Just an addenda: > I see that BSD 7.1 has dynamic commands using sysinits and sysuninit's to call a new > db_[un]register_cmd. I was looking at HEAD, not RELENG_7_1. The remainder of my questions as to why this mechanism are the same, though. Thanks, matthew From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 30 18:29:37 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 864C8106566B for ; Fri, 30 Jan 2009 18:29:37 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 5C8668FC16 for ; Fri, 30 Jan 2009 18:29:36 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n0UITaIY048045 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Jan 2009 10:29:36 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <49834710.9070908@freebsd.org> Date: Fri, 30 Jan 2009 10:29:36 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.18 (X11/20081209) MIME-Version: 1.0 To: Matthew Fleming References: <1233337318.13748.101.camel@amaretto> In-Reply-To: <1233337318.13748.101.camel@amaretto> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-sonic.net-Metrics: ebb.errno.com; whitelist Cc: freebsd-hackers@freebsd.org Subject: Re: Dynamic ddb commands 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, 30 Jan 2009 18:29:37 -0000 Matthew Fleming wrote: > I'm working on BSD 6.x and of course the set of ddb commands is static > to whatever is in the kernel at compile. I see that BSD 7.1 has dynamic > commands using sysinits and sysuninit's to call a new > db_[un]register_cmd. > > I see this, though, only after I have spent a day or so adding a > linker_file_[un]register_ddb() that works similarly to how sysinits are > merged for the boot-time modules (malloc and copy pointers). It seems > to me that this solution (have the linker look for db_set and db_cmd_set > and, if there are any entries, malloc and save pointers to commands) is > more efficient in terms of space than adding a LIST to the command > structure and then forcing sysinits to run. > I haven't looked at your approach so not sure how to respond. The existing code was simple. > I'm curious as to why the current method was chosen when something > lighter-weight was available... or so it seems from my perspective > looking at the 6.x code base. > > As another side note, lexicographic order for the commands doesn't seem > to add anything, except that command insert/delete are O(n/2) instead of > O(n). It can make it harder to use ddb to debug ddb, though. If, e.g. > there's a pointer problem somewhere in the command list, if the most > basic commands are up front like examine and write, then at least those > can be used to possibly repair ddb so a debug session can continue. > > If I recall it was painful to find entries in the help listing w/o sorting. Feel free to propose an alternative implementation; noone's wed to what's in the tree. Sam From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 30 19:25:34 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 96AAE1065693 for ; Fri, 30 Jan 2009 19:25:34 +0000 (UTC) (envelope-from assaulter0x80@gmail.com) Received: from mail-fx0-f10.google.com (mail-fx0-f10.google.com [209.85.220.10]) by mx1.freebsd.org (Postfix) with ESMTP id 2117F8FC1D for ; Fri, 30 Jan 2009 19:25:33 +0000 (UTC) (envelope-from assaulter0x80@gmail.com) Received: by fxm3 with SMTP id 3so126940fxm.19 for ; Fri, 30 Jan 2009 11:25:32 -0800 (PST) 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; bh=hyZ37N6zs3VLH3vfNng8kiYvZ/1Gm3cQ0qZNzgj1k+A=; b=JazyJRhJco5IqfH7eYXCKXTjzI9gmFof0SWAOD0aQeSuJ/EcBgObThkFmJ7LxgxIUU 8KBCNl/hpUOsMidtbJx9g2hKSu5tQUaRaJ7XrSGBHuQHfdqQKqML9Q8P8D5spUt6AiZI 40qJHwLqC7GXSddqXrE5Fr2/WHXAxhNhc5ChU= 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; b=ciovr25Fu8DOmW8TT7xngNylq8WA1C86UJQ714q5FERKZeMF2CgiBEnxv7E43kYQ/w F/622QwEBJybq0ya+BshmgeAWbV/GGHKSHqJ9S6TlxMHnLRPJ9r4IEYi5rHv3GgKITWw vV49Qil9SoRqBxGPMi/nnuNjiqNpoude6Bofk= MIME-Version: 1.0 Received: by 10.181.240.10 with SMTP id s10mr535518bkr.108.1233343495399; Fri, 30 Jan 2009 11:24:55 -0800 (PST) In-Reply-To: <20090128.223315.1447365184.imp@bsdimp.com> References: <20090129045304.GA18493@debian.samsung.router> <20090128.223315.1447365184.imp@bsdimp.com> Date: Fri, 30 Jan 2009 20:24:55 +0100 Message-ID: From: Jacky Oh To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: KLD: program.ko: depends of kernel - no avaiable 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, 30 Jan 2009 19:25:35 -0000 Hi Warner.. Can the solution become the source tree updates to the same version of my installed kernel? Sorry for my irregular-time questions and responses but currently i cannot access to inet.. It's really difficult for me becouse I don't put instant solution for my systems and my case of study problems...I try to resolve the problem if the source tree is it fails.. anyway, thanks very much.. From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 30 19:36:15 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 68BDD1065789 for ; Fri, 30 Jan 2009 19:36:15 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 248078FC1B for ; Fri, 30 Jan 2009 19:36:15 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n0UJX4Dp052471; Fri, 30 Jan 2009 12:33:04 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 30 Jan 2009 12:33:30 -0700 (MST) Message-Id: <20090130.123330.2025563190.imp@bsdimp.com> To: assaulter0x80@gmail.com From: "M. Warner Losh" In-Reply-To: References: <20090129045304.GA18493@debian.samsung.router> <20090128.223315.1447365184.imp@bsdimp.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: KLD: program.ko: depends of kernel - no avaiable 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, 30 Jan 2009 19:36:16 -0000 In message: Jacky Oh writes: : Can the solution become the source tree updates to the same version of my : installed kernel? Sorry for my irregular-time questions and responses but : currently i cannot access to inet.. It's really difficult for me becouse I : don't put instant solution for my systems and my case of study problems...I : try to resolve the problem if the source tree is it fails.. The solution is to rebuild the kernel and the modules, install them and reboot. Warner From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 30 19:44: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 B99011065731 for ; Fri, 30 Jan 2009 19:44:14 +0000 (UTC) (envelope-from matthew.fleming@isilon.com) Received: from seaxch09.isilon.com (seaxch09.isilon.com [74.85.160.25]) by mx1.freebsd.org (Postfix) with ESMTP id 9A0EC8FC1C for ; Fri, 30 Jan 2009 19:44:14 +0000 (UTC) (envelope-from matthew.fleming@isilon.com) Received: from 10.54.190.89 ([10.54.190.89]) by seaxch09.desktop.isilon.com ([10.10.2.96]) with Microsoft Exchange Server HTTP-DAV ; Fri, 30 Jan 2009 19:44:14 +0000 Received: from amaretto by SEAXCH09.isilon.com; 30 Jan 2009 11:44:23 -0800 From: Matthew Fleming To: Sam Leffler In-Reply-To: <49834710.9070908@freebsd.org> References: <1233337318.13748.101.camel@amaretto> <49834710.9070908@freebsd.org> Content-Type: multipart/mixed; boundary="=-fq7uZMe0OJhocqSP8KeS" Organization: The Q Continuum Date: Fri, 30 Jan 2009 11:44:23 -0800 Message-Id: <1233344663.13748.120.camel@amaretto> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 Cc: freebsd-hackers Subject: Re: Dynamic ddb commands 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, 30 Jan 2009 19:44:15 -0000 --=-fq7uZMe0OJhocqSP8KeS Content-Type: text/plain Content-Transfer-Encoding: 7bit > If I recall it was painful to find entries in the help listing w/o sorting. So it's a human reading problem, where ddb spat out the command names in order that they were in the in-memory struct, and if I wanted to look over the listing I had to visually scan every one since they weren't in order? > Feel free to propose an alternative implementation; noone's wed to > what's in the tree. Here's a patch for 6.x. The display order for the commands is an interesting issue; it would also make sense to group commands (perhaps alphabetically) by the module that defined them, so that when I added a module all my ddb commands stayed together. The patch I have here will leave commands grouped by module, so it would be relatively trivial to have linker_file_register_ddb add a new kind of dummy command that specifies the module name for the following set of commands. N.B. It appears from the FAQ that attachments are acceptable so I'm sending the patch as an attachment. Apologies if this is incorrect. Thanks, matthew --=-fq7uZMe0OJhocqSP8KeS Content-Disposition: attachment; filename="ddb.diff" Content-Transfer-Encoding: base64 Content-Type: text/x-patch; name="ddb.diff"; charset="UTF-8" SW5kZXg6IGtlcm4va2Vybl9saW5rZXIuYw0KPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KLS0tIGtlcm4va2Vybl9saW5r ZXIuYwkocmV2aXNpb24gMTA4NjU5KQ0KKysrIGtlcm4va2Vybl9saW5rZXIuYwkod29ya2luZyBj b3B5KQ0KQEAgLTQwLDQzICs0MCw1MyBAQCBfX0ZCU0RJRCgiJEZyZWVCU0Q6IHNyYy9zeXMva2Vy bi9rZXJuX2xpDQogI2luY2x1ZGUgPHN5cy9wcm9jLmg+DQogI2luY2x1ZGUgPHN5cy9sb2NrLmg+ DQogI2luY2x1ZGUgPHN5cy9tdXRleC5oPg0KICNpbmNsdWRlIDxzeXMvc3guaD4NCiAjaW5jbHVk ZSA8c3lzL21hYy5oPg0KICNpbmNsdWRlIDxzeXMvbW9kdWxlLmg+DQogI2luY2x1ZGUgPHN5cy9s aW5rZXIuaD4NCiAjaW5jbHVkZSA8c3lzL2ZjbnRsLmg+DQogI2luY2x1ZGUgPHN5cy9saWJrZXJu Lmg+DQogI2luY2x1ZGUgPHN5cy9uYW1laS5oPg0KICNpbmNsdWRlIDxzeXMvdm5vZGUuaD4NCiAj aW5jbHVkZSA8c3lzL3N5c2N0bC5oPg0KICNpZmRlZiBLREINCiAjaW5jbHVkZSA8c3lzL2tkYi5o Pg0KICNlbmRpZg0KKyNpZmRlZiBEREINCisjaW5jbHVkZSA8ZGRiL2RkY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gU0VUX0JFR0lOKGRiX2NtZF9zZXQpLCBTRVRfTElNSVQoZGJfY21kX3Nl dCkpOw0KKwkJICAgICAgIGRiX2NtZF9zdGFydCwgZGJfY21kX2VuZCk7DQogCX0NCiB9DQogDQog dm9pZA0KIGRiX2Vycm9yKHMpDQogCWNvbnN0IGNoYXIgKnM7DQogew0KIAlpZiAocykNCiAJICAg IGRiX3ByaW50ZigiJXMiLCBzKTsNCiAJZGJfZmx1c2hfbGV4KCk7DQogCWtkYl9yZWVudGVyKCk7 DQogfQ0KIA0KIA0KIC8qDQo= --=-fq7uZMe0OJhocqSP8KeS-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 31 16:31: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 8F1A410656C9 for ; Sat, 31 Jan 2009 16:31:44 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-ew0-f21.google.com (mail-ew0-f21.google.com [209.85.219.21]) by mx1.freebsd.org (Postfix) with ESMTP id DE6CF8FC13 for ; Sat, 31 Jan 2009 16:31:43 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ewy14 with SMTP id 14so1538673ewy.19 for ; Sat, 31 Jan 2009 08:31:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:in-reply-to :subject:x-priority:references:message-id:content-type :content-transfer-encoding:mime-version:date:cc:x-pgp-agent:x-mailer; bh=myWoQl2tdj5T/KDYcRr350K9xM+yVGSDZ+3rzBnLYv0=; b=DRJjjDBnxdVEzl2U/qVfrw5sEjs1rEZGrq67xHB/U7hKnJqPqZz9L8EMGPXYTmyTTS jmi///DSi856o9Ehn6QaIWq4bFQ5wtjjD3aHJgZbVpH8eEV5Y9iZEIw0mySVG9gV6cqD IVFg0WL/69BMbxhRYtRMvObrQFB/1TauDyN30= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:in-reply-to:subject:x-priority:references:message-id :content-type:content-transfer-encoding:mime-version:date:cc :x-pgp-agent:x-mailer; b=h7yd88ErM80Si9+aDcim1UQZtj/X1nKNvWufqpESWf85mLf22wEwzYnMm4orZgffLx GRr6nOMfICJNVGeCZXynNwX09qtbuePiikMi+qDA+T0fcxWhiOaKpe1bjoIC7FQkRUwi nui3Vjci/W5J1vjKgmmN33bzUHm6JGpxS7XI0= Received: by 10.210.35.17 with SMTP id i17mr2714458ebi.140.1233419503040; Sat, 31 Jan 2009 08:31:43 -0800 (PST) Received: from epsilon.lan ([83.144.140.27]) by mx.google.com with ESMTPS id q9sm2438054gve.27.2009.01.31.08.31.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 31 Jan 2009 08:31:42 -0800 (PST) Sender: Rui Paulo From: Rui Paulo To: Alexander Leidinger In-Reply-To: <20090130085227.957230z897u8viww@webmail.leidinger.net> X-Priority: 3 (Normal) References: <20090127124137.46fcfac5@baby-jane.lamaiziere.net> <20090127150040.GA4333@haruhi> <20090128134309.GN17198@hoeg.nl> <20090129151021.14131so3ozumpfj4@webmail.leidinger.net> <20090129143606.GC17198@hoeg.nl> <20090130085227.957230z897u8viww@webmail.leidinger.net> Message-Id: <508FD1E6-8281-4C9E-A495-AE435447C636@freebsd.org> Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-3--438256651" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Sat, 31 Jan 2009 16:31:37 +0000 X-Pgp-Agent: GPGMail 1.2.0 (v56) X-Mailer: Apple Mail (2.930.3) Cc: Ed Schouten , Daniel Lannstrom , FreeBSD Hackers Subject: Re: Mackbook pro nvidia based video backlight 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, 31 Jan 2009 16:31:44 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-3--438256651 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On 30 Jan 2009, at 07:52, Alexander Leidinger wrote: > Quoting Ed Schouten (from Thu, 29 Jan 2009 15:36:06 > +0100): > >> * Alexander Leidinger wrote: >>> So you want that either >>> - a daemon running as root is written which listens to user >>> requests to set the backlight via sysctl >>> or >>> - a SUID root program is written that sets the backlight >>> via sysctl >>> instead of >>> - a character device with appropriate filesystem permissions >>> which allows to not go the SUID root or daemon running as >>> root way >>> ? >> >> Yes. The primary reason is that it is more consistent with the rest >> of >> the operating system. powerd also uses sysctl's instead of a >> character >> device, for example. > > Powerd does not interact with the user, it is doing automatic power > management. A backlight on the other hand needs to be adjustable by > the user. > > Normally I would expect some keys on the keyboard to handle this, so > there should be no need to have some userland stuff, but as I don't > know about how Apple is doing this, I assume there's some valid > reason to handle it from userland. But then there needs to be some > easy way to let an user handle it, even if you are on the console. A > separate daemon or a SUID root program to control the backlight > sounds like overkill to me. Well, easy: only let the operator group change the sysctl and add your appropriate user accounts to the operator group. No daemon is needed. This is what I thought about when doing the Intel backlight driver, but I never actually did it. Regards, -- Rui Paulo --Apple-Mail-3--438256651 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iEUEARECAAYFAkmEfOkACgkQfD8M/ASTygJ9xQCVFEaOpr7Oj1sC8kuvRyH2Hwqu rgCcCVy3U2WaQWg/8MCYaVV8BJookbE= =VKiZ -----END PGP SIGNATURE----- --Apple-Mail-3--438256651-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 31 16:30:59 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 B3BA410656BC for ; Sat, 31 Jan 2009 16:30:59 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by mx1.freebsd.org (Postfix) with ESMTP id 2F1BE8FC12 for ; Sat, 31 Jan 2009 16:30:59 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by nf-out-0910.google.com with SMTP id h3so135053nfh.33 for ; Sat, 31 Jan 2009 08:30:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:in-reply-to:subject :x-priority:references:message-id:content-type :content-transfer-encoding:mime-version:date:cc:x-pgp-agent:x-mailer; bh=w1BaNMxfj5055S51IKAKtgoJlzuYZON3q7Q1B+LjZyQ=; b=Q04LU8BvKlwaVztzVwsTcvSqkEkeMTDPlTdo1bGNX8fu1tNtUp8W25SxglbOR5aIDO C2OX4OKHMJdrIBetXReJUoLdMszcj6kY4cljUmAidaVIdE2GqLQztLHldwd+fucONuJl fMDZFeo4kt6oW6y4+V6fSoMoc+NfNa9u9jlyc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:in-reply-to:subject:x-priority:references:message-id :content-type:content-transfer-encoding:mime-version:date:cc :x-pgp-agent:x-mailer; b=dQLezDF4WOeB6aijWOKLCwlY5vphuuFzO5ts0Qn4vy7zDPLtZu96SzcyLZHwDzAq5N id+1nFQASnSqXMTN6Mdm7wQytQsibOXjAGMlw085tVcSsme4RRtGCAAo3oHkuUJf+P0d x/RANF6uMPGsj8uh0stmBeP8EvY7pB/AJaz98= Received: by 10.210.87.19 with SMTP id k19mr4566ebb.79.1233419458224; Sat, 31 Jan 2009 08:30:58 -0800 (PST) Received: from epsilon.lan ([83.144.140.27]) by mx.google.com with ESMTPS id q9sm2438054gve.27.2009.01.31.08.30.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 31 Jan 2009 08:30:57 -0800 (PST) From: Rui Paulo To: Alexander Leidinger In-Reply-To: <20090130085227.957230z897u8viww@webmail.leidinger.net> X-Priority: 3 (Normal) References: <20090127124137.46fcfac5@baby-jane.lamaiziere.net> <20090127150040.GA4333@haruhi> <20090128134309.GN17198@hoeg.nl> <20090129151021.14131so3ozumpfj4@webmail.leidinger.net> <20090129143606.GC17198@hoeg.nl> <20090130085227.957230z897u8viww@webmail.leidinger.net> Message-Id: <76ADC89F-EFAC-4F45-A0B7-FA58470018DF@gmail.com> Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-2--438304265" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Sat, 31 Jan 2009 16:30:49 +0000 X-Pgp-Agent: GPGMail 1.2.0 (v56) X-Mailer: Apple Mail (2.930.3) X-Mailman-Approved-At: Sat, 31 Jan 2009 16:36:18 +0000 Cc: Ed Schouten , Daniel Lannstrom , FreeBSD Hackers Subject: Re: Mackbook pro nvidia based video backlight 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, 31 Jan 2009 16:31:00 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-2--438304265 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On 30 Jan 2009, at 07:52, Alexander Leidinger wrote: > Quoting Ed Schouten (from Thu, 29 Jan 2009 15:36:06 > +0100): > >> * Alexander Leidinger wrote: >>> So you want that either >>> - a daemon running as root is written which listens to user >>> requests to set the backlight via sysctl >>> or >>> - a SUID root program is written that sets the backlight >>> via sysctl >>> instead of >>> - a character device with appropriate filesystem permissions >>> which allows to not go the SUID root or daemon running as >>> root way >>> ? >> >> Yes. The primary reason is that it is more consistent with the rest >> of >> the operating system. powerd also uses sysctl's instead of a >> character >> device, for example. > > Powerd does not interact with the user, it is doing automatic power > management. A backlight on the other hand needs to be adjustable by > the user. > > Normally I would expect some keys on the keyboard to handle this, so > there should be no need to have some userland stuff, but as I don't > know about how Apple is doing this, I assume there's some valid > reason to handle it from userland. But then there needs to be some > easy way to let an user handle it, even if you are on the console. A > separate daemon or a SUID root program to control the backlight > sounds like overkill to me. Well, easy: only let the operator group change the sysctl and add your appropriate user accounts to the operator group. No daemon is needed. This is what I thought about when doing the Intel backlight driver, but I never actually did it. Regards, -- Rui Paulo --Apple-Mail-2--438304265 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iEYEARECAAYFAkmEfLkACgkQfD8M/ASTygIX0ACgrI909aI0XUgHgC+PAcHFagNH whcAoJ/DaVTMV16GqPYUoc0m1f3y0v/0 =FMVO -----END PGP SIGNATURE----- --Apple-Mail-2--438304265--