From owner-freebsd-current@FreeBSD.ORG Sun Apr 29 07:56:09 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 904C81065672; Sun, 29 Apr 2012 07:56:09 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5B0D98FC08; Sun, 29 Apr 2012 07:56:09 +0000 (UTC) Received: by dadz14 with SMTP id z14so10718124dad.17 for ; Sun, 29 Apr 2012 00:56:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=2fzgStanklFtM4BkA6f/m76ZD/LjKrQcTfnI3o8ACwU=; b=qy4qwj/xpkmU7ZtnyuFVmMq5WtTtJJMcFPU4e3xzeKtXMCZ2pP8rJtg3yLxUILNHjp ya0K9c2pmjZWuhIuiE+Mw/QXRVd9xpHF7XLQfdvCzNvnEuZ6H9448rZBAKdOJFJwadm4 56cgi4jXrq4bk7c5juOySDwlzOajsMPXKx2FaNqo0XKQZactOqcSHRtgaPDE2EnaSnv4 Kr3pbM4TRXjvJCjtbw44GddPlYOW60xSgEcJlSiiUlLMMJ+Wvwh3t+K1VFxBUIBV25F1 XMvx0tfuwPyaHIfNKn80YOrmd7EDnjSQZINE78GXxU1HUljt0sWzBiRC01MkrSTJoYcf cFww== MIME-Version: 1.0 Received: by 10.68.200.7 with SMTP id jo7mr5171934pbc.27.1335686169201; Sun, 29 Apr 2012 00:56:09 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.101.9 with HTTP; Sun, 29 Apr 2012 00:56:09 -0700 (PDT) In-Reply-To: <20120428231703.374bc042.ray@dlink.ua> References: <20120421185402.GH1743@albert.catwhisker.org> <7AD8956D-AD18-4CAB-9953-06E00185A7DA@freebsd.org> <20120428150941.e0464900.ray@dlink.ua> <20120428231703.374bc042.ray@dlink.ua> Date: Sun, 29 Apr 2012 00:56:09 -0700 X-Google-Sender-Auth: kLqRDvET6P4_C8LgLiqzp6bmLu0 Message-ID: From: Adrian Chadd To: Aleksandr Rybalko Content-Type: text/plain; charset=ISO-8859-1 Cc: Jason Evans , current@freebsd.org Subject: Re: : jemalloc_arena.c:182: Failed assertion: "p[i] == 0" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2012 07:56:09 -0000 Hi, So hm, how do I define MALLOC_PRODUCTION correctly when doing a cross-build? When doing a cross-build, I do this in my build script: env CROSS_BUILD_TESTING=YES MAKEOBJDIRPREFIX=${X_MAKEOBJDIRPREFIX} \ make ${BUILD_FLAGS} TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ ${X_TARGET_CPUTYPE} KERNCONF=${KERNCONF} DESTDIR=${X_DESTDIR} \ KODIR=/boot/kernel.${KERNCONF}/ \ KMODDIR=/boot/kernel.${KERNCONF}/ \ __MAKE_CONF=/dev/null SRCCONF=/dev/null \ LOCAL_DIRS="${LOCAL_DIRS}" \ LOCAL_TOOL_DIRS="${LOCAL_TOOL_DIRS}" $1 \ .. so I'd have to put MALLOC_PRODUCTION=yes in a temporary make.conf, and point __MAKE_CONF at that? Adrian From owner-freebsd-current@FreeBSD.ORG Sun Apr 29 08:10:16 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F303F106564A for ; Sun, 29 Apr 2012 08:10:16 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id A62978FC0A for ; Sun, 29 Apr 2012 08:10:16 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) for freebsd-current@freebsd.org with esmtp (envelope-from ) id <1SOPCx-0007zT-NT>; Sun, 29 Apr 2012 10:10:15 +0200 Received: from e178035180.adsl.alicedsl.de ([85.178.35.180] helo=thor.walstatt.dyndns.org) by inpost2.zedat.fu-berlin.de (Exim 4.69) for freebsd-current@freebsd.org with esmtpsa (envelope-from ) id <1SOPCx-0006k6-Ho>; Sun, 29 Apr 2012 10:10:15 +0200 Message-ID: <4F9CF75F.2000605@zedat.fu-berlin.de> Date: Sun, 29 Apr 2012 10:10:07 +0200 From: "O. Hartmann" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120314 Thunderbird/10.0.3 MIME-Version: 1.0 To: Current FreeBSD X-Enigmail-Version: 1.4 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig89DACBDBD8C8F7504EE7813D" X-Originating-IP: 85.178.35.180 Subject: www/firefox and mail/thunderbird fail to compile in FreeBSD 10-CUR/amd64 with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2012 08:10:17 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig89DACBDBD8C8F7504EE7813D Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On my FreeBSD 10 boxes, all compiled with CLANG and using CLANG ( FreeBSD 10.0-CURRENT #0 r234500: Fri Apr 20 21:59:02 CEST 2012), compiling/updating Firefox to V12 and Thunderbird to V12 fails with the below shown error. Does someone have any clue what could trigger the problem? On FreeBSD 9-STABLE/amd64, also compiled with CLANG, there is no such problem. Thanks in advance, Oliver [...] In file included from /usr/ports/www/firefox/work/mozilla-release/js/src/jsalloc.cpp:40: In file included from ./jscntxt.h:50: =2E/jsapi.h:2102:1: error: 'JS_GetNaNValue' has C-linkage specified, but returns user-defined type 'jsval' (aka 'JS::Value') which is incompatible with C [-Werror,-Wreturn-type-c-linkage] JS_GetNaNValue(JSContext *cx); ^ =2E/jsapi.h:2105:1: error: 'JS_GetNegativeInfinityValue' has C-linkage specified, but returns user-defined type 'jsval' (aka 'JS::Value') which = is incompatible with C [-Werror,-Wreturn-type-c-linkage] JS_GetNegativeInfinityValue(JSContext *cx); ^ =2E/jsapi.h:2108:1: error: 'JS_GetPositiveInfinityValue' has C-linkage specified, but returns user-defined type 'jsval' (aka 'JS::Value') which = is incompatible with C [-Werror,-Wreturn-type-c-linkage] JS_GetPositiveInfinityValue(JSContext *cx); ^ =2E/jsapi.h:2111:1: error: 'JS_GetEmptyStringValue' has C-linkage specified, but returns user-defined type 'jsval' (aka 'JS::Value') which is incompatible with C [-Werror,-Wreturn-type-c-linkage] JS_GetEmptyStringValue(JSContext *cx); ^ =2E/jsapi.h:2819:1: error: 'JS_ComputeThis' has C-linkage specified, but returns user-defined type 'jsval' (aka 'JS::Value') which is incompatible with C [-Werror,-Wreturn-type-c-linkage] JS_ComputeThis(JSContext *cx, jsval *vp); ^ In file included from /usr/ports/www/firefox/work/mozilla-release/js/src/jsanalyze.cpp:40: In file included from ./jsanalyze.h:44: In file included from ./jscompartment.h:46: In file included from ./jscntxt.h:50: =2E/jsapi.h:2102:1: error: 'JS_GetNaNValue' has C-linkage specified, but returns user-defined type 'jsval' (aka 'JS::Value') which is incompatible with C [-Werror,-Wreturn-type-c-linkage] JS_GetNaNValue(JSContext *cx); ^ =2E/jsapi.h:2105:1: error: 'JS_GetNegativeInfinityValue' has C-linkage specified, but returns user-defined type 'jsval' (aka 'JS::Value') which = is incompatible with C [-Werror,-Wreturn-type-c-linkage] --------------enig89DACBDBD8C8F7504EE7813D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJPnPdnAAoJEOgBcD7A/5N8pe4H/iLeVSkjHGvPxj9hrZMiLJdv UFz+kzTCIz9keTrwoGqQDKT8awvXkq4WLNEDgB0AAJb6ukI9xM9z3QWFww3xOgWk rE+v/GcsyBKezc2SHY7ZOFTsdmweM7LICCxRye7DXqZ6Amik+Phr0KaygxNdlEoN JtX0/YgLB/q7+URnmhRzUgLPgbFjM9ccofYS2csyvoLXpPysn6mAOw8mCp55fhB+ aL2/sIcy9yF18KN4pzKmYmF7YhC9kAh1/UDtX4nemfXc0qB/i3IJDbu3m3O+YG0q Wc0Xiq1CMZHAcKlFdN8QRq17xPO3yLI03smiddsJwg9kqhx0LvDvz5GrS5MZtWg= =Gb08 -----END PGP SIGNATURE----- --------------enig89DACBDBD8C8F7504EE7813D-- From owner-freebsd-current@FreeBSD.ORG Sun Apr 29 08:37:03 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3DDB31065672; Sun, 29 Apr 2012 08:37:03 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id E2F8B8FC08; Sun, 29 Apr 2012 08:37:02 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1SOPcs-0001bm-3l>; Sun, 29 Apr 2012 10:37:02 +0200 Received: from e178035180.adsl.alicedsl.de ([85.178.35.180] helo=thor.walstatt.dyndns.org) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1SOPcr-0007rU-St>; Sun, 29 Apr 2012 10:37:02 +0200 Message-ID: <4F9CFDA7.9060605@zedat.fu-berlin.de> Date: Sun, 29 Apr 2012 10:36:55 +0200 From: "O. Hartmann" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120314 Thunderbird/10.0.3 MIME-Version: 1.0 To: Volodymyr Kostyrko References: <4F9BC101.8090305@zedat.fu-berlin.de> <4F9BD08C.4090405@gmail.com> In-Reply-To: <4F9BD08C.4090405@gmail.com> X-Enigmail-Version: 1.4 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig6BB4F76169D56BC3291C5591" X-Originating-IP: 85.178.35.180 Cc: Current FreeBSD , Ports FreeBSD Subject: Re: New Xorg: graphics/dri: fails to compile with CLANG: nouveau_array.c:49:16: error: illegal storage class on function, *extract_u = EXTRACT(char, unsigned, 1); X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2012 08:37:03 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6BB4F76169D56BC3291C5591 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am 04/28/12 13:12, schrieb Volodymyr Kostyrko: > O. Hartmann wrote: >> Is there in "official" way to get this fixed with CLANG? I see that >> files folder in graphics/dri is missing, so none of the fixes for bot= h >> the faulty source files >=20 > I think the patch should go to graphics/libGL. >=20 > cd /usr/ports/graphics/libGL/files > fetch -rao - > 'http://cgit.freedesktop.org/mesa/mesa/patch/?id=3D4aa1ac5fe94b56960952= 29ee3568bf4fa7cfed95' > | sed -e 's|^--- a/src|--- src|' -e 's|^+++ b/src|+++ src|' > patch-nou= veau >=20 > Should do. >=20 Thank you very much. Yes, this worked ;-) Regards, Oliver --------------enig6BB4F76169D56BC3291C5591 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJPnP2tAAoJEOgBcD7A/5N8ntgIANKFnitTtOoG8dNlI7PU6/9x SUDZl95FT8iLFe4dUUwnXaAtYWVygM5MuGLvw4MfxzZVHCyTEIs5XDiyhKrjHW07 9WuG/5mrnxfv2ETI51oGAfiquEiHFFuo+mNoy2eJoJwDLsZi31CY6fsQXPKZ9iJf eEIbvrXCNy9lxe95igPkPVbZmM8l+MdkGwLWRgXnZdv/Ex6kzyqwTNhFWo/B35le ZLeZZJfoRnUvRVeIpgyir/tyZ9SZ31f+K9Ejbgv9lEsKIbqZw7Z/PwHqx+Zh0uaO hgzrHvKhHo6Z0m2YlKq0llKRx8CjuyMQ+FHG2CIDqVi9pKxqApI8K5zOnruiqgA= =MCSb -----END PGP SIGNATURE----- --------------enig6BB4F76169D56BC3291C5591-- From owner-freebsd-current@FreeBSD.ORG Sun Apr 29 10:55:02 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 40963106564A for ; Sun, 29 Apr 2012 10:55:02 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id CD4B78FC08 for ; Sun, 29 Apr 2012 10:55:01 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) for freebsd-current@freebsd.org with esmtp (envelope-from ) id <1SORmI-0004ts-NZ>; Sun, 29 Apr 2012 12:54:54 +0200 Received: from e178035180.adsl.alicedsl.de ([85.178.35.180] helo=thor.walstatt.dyndns.org) by inpost2.zedat.fu-berlin.de (Exim 4.69) for freebsd-current@freebsd.org with esmtpsa (envelope-from ) id <1SORmI-0005WZ-Em>; Sun, 29 Apr 2012 12:54:54 +0200 Message-ID: <4F9D1DF8.20001@zedat.fu-berlin.de> Date: Sun, 29 Apr 2012 12:54:48 +0200 From: "O. Hartmann" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120314 Thunderbird/10.0.3 MIME-Version: 1.0 To: Current FreeBSD X-Enigmail-Version: 1.4 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig7DA28C0D1B49305E7F4A407F" X-Originating-IP: 85.178.35.180 Subject: lang/gcc46: error when compiling with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2012 10:55:02 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig7DA28C0D1B49305E7F4A407F Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On a FreeBSD 10-CURRENT/amd64 box the compilation/update of the port lang/gcc46 fails with the below shown error. Since the port compiles well on FreeBSD 9 and another FreeBSD 10 box (all amd64, CLANG built), I feel a bit confused since the setup is almost the same on all boxes. The machine in question is the most modern box, equipted with a Core i7-3930K: Copyright (c) 1992-2012 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved.= FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 10.0-CURRENT #0: Sat Apr 28 11:08:09 CEST 2012 root@telesto.geoinf.fu-berlin.de:/usr/obj/usr/src/sys/TELESTO amd64 CPU: Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz (3209.59-MHz K8-class CPU) Origin =3D "GenuineIntel" Id =3D 0x206d7 Family =3D 6 Model =3D 2d Stepping =3D 7 Features=3D0xbfebfbff Features2=3D0x1fbee3bf AMD Features=3D0x2c100800 AMD Features2=3D0x1 TSC: P-state invariant, performance statistics real memory =3D 34359738368 (32768 MB) avail memory =3D 33091874816 (31558 MB) Event timer "LAPIC" quality 600 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 12 CPUs FreeBSD/SMP: 1 package(s) x 6 core(s) x 2 SMT threads cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 cpu2 (AP): APIC ID: 2 cpu3 (AP): APIC ID: 3 cpu4 (AP): APIC ID: 4 cpu5 (AP): APIC ID: 5 cpu6 (AP): APIC ID: 6 cpu7 (AP): APIC ID: 7 cpu8 (AP): APIC ID: 8 cpu9 (AP): APIC ID: 9 cpu10 (AP): APIC ID: 10 cpu11 (AP): APIC ID: 11 ioapic0 irqs 0-23 on motherboard ioapic1 irqs 24-47 on motherboard [...] clang -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/genenums \ build/genenums.o build/read-md.o build/errors.o =2E./build-x86_64-portbld-freebsd10.0/libiberty/libiberty.a =2E././../gcc-4.6-20120420/gcc/gengtype.h:474:40: warning: Use of comma pasting extension is non-portable [-pedantic] =2E././../gcc-4.6-20120420/gcc/gengtype.h:474:40: warning: Use of comma pasting extension is non-portable [-pedantic] =2E././../gcc-4.6-20120420/gcc/gengtype.h:474:40: warning: Use of comma pasting extension is non-portable [-pedantic] =2E././../gcc-4.6-20120420/gcc/gengtype.h:474:40: warning: Use of comma pasting extension is non-portable [-pedantic] =2E././../gcc-4.6-20120420/gcc/gengtype.h:474:40: warning: Use of comma pasting extension is non-portable [-pedantic] =2E././../gcc-4.6-20120420/gcc/gengtype.h:474:40: warning: Use of comma pasting extension is non-portable [-pedantic] =2E././../gcc-4.6-20120420/gcc/gengtype.h:474:40: warning: Use of comma pasting extension is non-portable [-pedantic] =2E././../gcc-4.6-20120420/gcc/gengtype.h:474:40: warning: Use of comma pasting extension is non-portable [-pedantic] =2E././../gcc-4.6-20120420/gcc/gengtype.h:474:40: warning: Use of comma pasting extension is non-portable [-pedantic] clang: warning: argument unused during compilation: '-g' echo timestamp > doc/cpp.1 (pod2man --center=3D"GNU" --release=3D"gcc-4.6.4" --date=3D2012-04-20 --section=3D1 cpp.pod > doc/cpp.1.T$$ && \ mv -f doc/cpp.1.T$$ doc/cpp.1) || \ (rm -f doc/cpp.1.T$$ && exit 1) clang -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/genconstants \ build/genconstants.o build/read-md.o build/errors.o =2E./build-x86_64-portbld-freebsd10.0/libiberty/libiberty.a clang -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/genmddeps \ build/genmddeps.o build/read-md.o build/errors.o =2E./build-x86_64-portbld-freebsd10.0/libiberty/libiberty.a clang -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/genmodes \ build/genmodes.o build/errors.o =2E./build-x86_64-portbld-freebsd10.0/libiberty/libiberty.a clang -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/gengenrtl \ build/gengenrtl.o build/errors.o =2E./build-x86_64-portbld-freebsd10.0/libiberty/libiberty.a build/genhooks > tmp-target-hooks-def.h =2E././../gcc-4.6-20120420/gcc/gengtype.h:474:40: warning: Use of comma pasting extension is non-portable [-pedantic] =2E././../gcc-4.6-20120420/gcc/gengtype.h:474:40: warning: Use of comma pasting clang: warning: argument unused during compilation: '-g' extension is non-portable [-pedantic] clang.././../gcc-4.6-20120420/gcc/gengtype.h:474:40: warning: Use of comma pastingclang: warning: argument unused during compilation: '-g' extension is non-portable [-pedantic] : .././../gcc-4.6-20120420/gcc/gengtype.h:474:40: warning: Use of comma pasting extension is non-portable [-pedantic] warning: argument unused during compilation: '-g' =2E././../gcc-4.6-20120420/gcc/gengtype.h:474:40: warning: Use of comma pasting extension is non-portable [-pedantic] =2E././../gcc-4.6-20120420/gcc/gengtype.h:474:40: warning: Use of comma pasting extension is non-portable [-pedantic] =2E././../gcc-4.6-20120420/gcc/gengtype.h:474:40: warning: Use of comma pasting extension is non-portable [-pedantic] /bin/sh .././../gcc-4.6-20120420/gcc/../move-if-change tmp-target-hooks-def.h \ target-hooks-def.h build/genhooks \ .././../gcc-4.6-20120420/gcc/doc/tm.texi.in > tmp-tm.texi= clang: warning: argument unused during compilation: '-g' echo timestamp > s-target-hooks-def-h build/genmodes -h > tmp-modes.h build/genmodes -m > tmp-min-modes.c build/genmodes > tmp-modes.c /bin/sh .././../gcc-4.6-20120420/gcc/../move-if-change tmp-modes.c insn-modes.c /bin/sh .././../gcc-4.6-20120420/gcc/../move-if-change tmp-min-modes.c min-insn-modes.c /bin/sh .././../gcc-4.6-20120420/gcc/../move-if-change tmp-modes.h insn-modes.h gmake[3]: *** [s-tm-texi] Segmentation fault: 11 (core dumped) gmake[3]: *** Waiting for unfinished jobs.... echo timestamp > s-modes echo timestamp > s-modes-m echo timestamp > s-modes-h 14 warnings generated. 36 warnings generated. /bin/sh .././../gcc-4.6-20120420/gcc/../move-if-change tmp-optionlist optionlist echo timestamp > s-options rm cpp.pod gcc.pod gfdl.pod gcov.pod fsf-funding.pod gmake[3]: Leaving directory `/usr/ports/lang/gcc46/work/build/gcc' gmake[2]: *** [all-stage1-gcc] Error 2 gmake[2]: Leaving directory `/usr/ports/lang/gcc46/work/build' gmake[1]: *** [stage1-bubble] Error 2 gmake[1]: Leaving directory `/usr/ports/lang/gcc46/work/build' gmake: *** [bootstrap-lean] Error 2 *** [do-build] Error code 1 Stop in /usr/ports/lang/gcc46. *** [build] Error code 1 Stop in /usr/ports/lang/gcc46. --------------enig7DA28C0D1B49305E7F4A407F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJPnR3+AAoJEOgBcD7A/5N802MIAJ98KIunb86wPI6TgJrhd/mg gD8ZCkwmtd1yPW4w9aKbo+ZAmMicyk3pjNBlx4iHDPhLZ6bH1VZxmdPM2GNeApE2 jrqUuan3sj3fg+S7Al0NVGAs9TirX4C+Fh0Ktp6xKEVvwSqx6pzLu41vmXyepgKp k2ONp6+wEW/JCisKbK/9DIvNfw6szTS2K8iijJfZMNRJWWDZj5OZHZE7RbMUYNkb vI4NkV61y5OPXp3flMM2JvLNbTlmBkWG0ckL+TNOip7sIYBWlACHXZcR0cKfCREr i4eV/YB4mJgpvk5gFYCEAz7T8AENkZss5Da/iKrXtUGGHO0K4TEIBUT+i8rz6Rs= =O232 -----END PGP SIGNATURE----- --------------enig7DA28C0D1B49305E7F4A407F-- From owner-freebsd-current@FreeBSD.ORG Sun Apr 29 11:38:49 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BBC4106566C; Sun, 29 Apr 2012 11:38:49 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 06AE88FC08; Sun, 29 Apr 2012 11:38:49 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (89.112.15.178.pppoe.eltel.net [89.112.15.178]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 4D1BB4AC2D; Sun, 29 Apr 2012 15:38:40 +0400 (MSK) Date: Sun, 29 Apr 2012 15:38:38 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <4810068524.20120429153838@serebryakov.spb.ru> To: Current FreeBSD MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: bschmidt@FreeBSD.org Subject: 10.0-CURRENT could not be built: make: don't know how to make blacklist.c. Stop X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2012 11:38:49 -0000 Hello, Current. I'm trying to build fresh (several minutes ago) 10.0-CURRENT/i386 on month-old 10.0-CURRENT/i386. And it fails in very beginning: ===> usr.sbin/wpa (depend) ===> usr.sbin/wpa/wpa_supplicant (depend) make: don't know how to make blacklist.c. Stop *** [depend] Error code 2 I've looked at "usr.sbin/wpa/wpa_supplicant/Makefile" and found here only ".PATH.c:${WPA_DISTDIR}/src/drivers", without "${WPA_SUPPLICANT_DISTDIR". hostapd is same story. Revisions in question seems to be r234756 and r234711. -- // Black Lion AKA Lev Serebryakov From owner-freebsd-current@FreeBSD.ORG Sun Apr 29 12:13:53 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DCF91065672 for ; Sun, 29 Apr 2012 12:13:53 +0000 (UTC) (envelope-from bschmidt@techwires.net) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id D43D38FC17 for ; Sun, 29 Apr 2012 12:13:52 +0000 (UTC) Received: by bkvi17 with SMTP id i17so794328bkv.13 for ; Sun, 29 Apr 2012 05:13:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:message-id:x-gm-message-state; bh=rfD2nszp1LEN4BV3/gDn23LACjtXccTmVKgFm36JrvE=; b=pXQx74r69S8QBz6j/4Ff3wxhYEuccnTd/M1sEMhCphbjbHq6vHrDy7cMcY2jS2DBvY u7o5EyR84tokq5ZpX9RQmHa5z3kqMDbrUaPPLHF6xPzEnxYa/PGCO+VyfPwdYjUxPZLj iX1MR7/YKLmjBs7dd2Z6ZZ9coDQUJwEMLvkIs9kKRzateNPnCGR3Q7Z4iS+fckY6+dlB v0pkrX6thBE9xIiW3/8ryDwGnSmAArAwpOJA5NaLZ/KK8ueBtQmn7I+JgA7SIeXVSrVS 4zn2KC12qsh1vk9NJBg7HshidDQhj//Y70jW/OIFlmrOcz25EsC45f2OmdJKnjYW3Gjs YoFQ== Received: by 10.204.148.80 with SMTP id o16mr6243187bkv.3.1335701631821; Sun, 29 Apr 2012 05:13:51 -0700 (PDT) Received: from amy.lab.techwires.net (dslb-088-065-053-006.pools.arcor-ip.net. [88.65.53.6]) by mx.google.com with ESMTPS id g5sm20922787bkt.9.2012.04.29.05.13.50 (version=SSLv3 cipher=OTHER); Sun, 29 Apr 2012 05:13:51 -0700 (PDT) Sender: Bernhard Schmidt From: Bernhard Schmidt To: lev@freebsd.org Date: Sun, 29 Apr 2012 14:14:14 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.0-STABLE; KDE/4.7.4; amd64; ; ) References: <4810068524.20120429153838@serebryakov.spb.ru> In-Reply-To: <4810068524.20120429153838@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_XCTnPT0a8PmNemD" Message-Id: <201204291414.15397.bschmidt@freebsd.org> X-Gm-Message-State: ALoCoQn9Wp3+lURNc2VeiknZe9URrvz/K+Pz1MyigT31BUtAa0HsBQrBSfbtZQ38lQqBUcgk/loU Cc: Current FreeBSD Subject: Re: 10.0-CURRENT could not be built: make: don't know how to make blacklist.c. Stop X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2012 12:13:53 -0000 --Boundary-00=_XCTnPT0a8PmNemD Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit On Sunday 29 April 2012 13:38:38 Lev Serebryakov wrote: > Hello, Current. > > > I'm trying to build fresh (several minutes ago) 10.0-CURRENT/i386 on > month-old 10.0-CURRENT/i386. And it fails in very beginning: > > ===> usr.sbin/wpa (depend) > ===> usr.sbin/wpa/wpa_supplicant (depend) > make: don't know how to make blacklist.c. Stop > *** [depend] Error code 2 > > I've looked at "usr.sbin/wpa/wpa_supplicant/Makefile" and found here > only ".PATH.c:${WPA_DISTDIR}/src/drivers", without > "${WPA_SUPPLICANT_DISTDIR". > > hostapd is same story. > > Revisions in question seems to be r234756 and r234711. Just noticed that myself a few minutes ago.. I'm about to commit attached fix in few minutes. Wanna give it a quick shot? Other then that, removing WITHOUT_EXAMPLES from src.conf helps too, that's why I missed it. -- Bernhard --Boundary-00=_XCTnPT0a8PmNemD Content-Type: text/x-patch; charset="UTF-8"; name="wpa.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="wpa.diff" Index: usr.sbin/wpa/wpa_supplicant/Makefile =================================================================== --- usr.sbin/wpa/wpa_supplicant/Makefile (revision 234784) +++ usr.sbin/wpa/wpa_supplicant/Makefile (working copy) @@ -2,7 +2,8 @@ .include "${.CURDIR}/../Makefile.inc" -.PATH.c:${WPA_DISTDIR}/src/drivers +.PATH.c:${WPA_SUPPLICANT_DISTDIR} \ + ${WPA_DISTDIR}/src/drivers PROG= wpa_supplicant SRCS= aes-unwrap.c \ Index: usr.sbin/wpa/hostapd/Makefile =================================================================== --- usr.sbin/wpa/hostapd/Makefile (revision 234784) +++ usr.sbin/wpa/hostapd/Makefile (working copy) @@ -2,7 +2,8 @@ .include "${.CURDIR}/../Makefile.inc" -.PATH.c:${WPA_DISTDIR}/src/drivers +.PATH.c:${HOSTAPD_DISTDIR} \ + ${WPA_DISTDIR}/src/drivers PROG= hostapd SRCS= accounting.c \ --Boundary-00=_XCTnPT0a8PmNemD-- From owner-freebsd-current@FreeBSD.ORG Sun Apr 29 12:17:59 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0845B106564A for ; Sun, 29 Apr 2012 12:17:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id B9D858FC14 for ; Sun, 29 Apr 2012 12:17:58 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:6d7f:80b2:d515:5107] (unknown [IPv6:2001:7b8:3a7:0:6d7f:80b2:d515:5107]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 015165C59; Sun, 29 Apr 2012 14:17:57 +0200 (CEST) Message-ID: <4F9D317D.40609@FreeBSD.org> Date: Sun, 29 Apr 2012 14:18:05 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120420 Thunderbird/12.0 MIME-Version: 1.0 To: "O. Hartmann" References: <4F9D1DF8.20001@zedat.fu-berlin.de> In-Reply-To: <4F9D1DF8.20001@zedat.fu-berlin.de> X-Enigmail-Version: 1.4.1 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: Current FreeBSD Subject: Re: lang/gcc46: error when compiling with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2012 12:17:59 -0000 On 2012-04-29 12:54, O. Hartmann wrote: > On a FreeBSD 10-CURRENT/amd64 box the compilation/update of the port > lang/gcc46 fails with the below shown error. > > Since the port compiles well on FreeBSD 9 and another FreeBSD 10 box > (all amd64, CLANG built), I feel a bit confused since the setup is > almost the same on all boxes. The machine in question is the most modern > box, equipted with a Core i7-3930K: ... ... > gmake[3]: *** [s-tm-texi] Segmentation fault: 11 (core dumped) > gmake[3]: *** Waiting for unfinished jobs.... What happens if you simply repeat the build? If the segfault occurs at different stages every time, you might simply have bad RAM. Another possibility is that the build is out of memory, in that case you could try running it without multiple make jobs (e.g. set DISABLE_MAKE_JOBS). From owner-freebsd-current@FreeBSD.ORG Sun Apr 29 12:33:28 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5F71F1065675; Sun, 29 Apr 2012 12:33:28 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [46.4.40.135]) by mx1.freebsd.org (Postfix) with ESMTP id 1B53E8FC12; Sun, 29 Apr 2012 12:33:28 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (89.112.15.178.pppoe.eltel.net [89.112.15.178]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 060564AC2D; Sun, 29 Apr 2012 16:33:26 +0400 (MSK) Date: Sun, 29 Apr 2012 16:33:26 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <1623095341.20120429163326@serebryakov.spb.ru> To: Bernhard Schmidt In-Reply-To: <201204291414.15397.bschmidt@freebsd.org> References: <4810068524.20120429153838@serebryakov.spb.ru> <201204291414.15397.bschmidt@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: Current FreeBSD Subject: Re: 10.0-CURRENT could not be built: make: don't know how to make blacklist.c. Stop X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2012 12:33:28 -0000 Hello, Bernhard. You wrote 29 =E0=EF=F0=E5=EB=FF 2012 =E3., 16:14:14: BS> Just noticed that myself a few minutes ago.. I'm about to commit BS> attached fix in few minutes. Wanna give it a quick shot? Yep, it helps :) --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-current@FreeBSD.ORG Sun Apr 29 12:49:41 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D23991065673 for ; Sun, 29 Apr 2012 12:49:41 +0000 (UTC) (envelope-from bschmidt@techwires.net) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5BB5D8FC0C for ; Sun, 29 Apr 2012 12:49:41 +0000 (UTC) Received: by weyt57 with SMTP id t57so1662837wey.13 for ; Sun, 29 Apr 2012 05:49:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id :x-gm-message-state; bh=YdIosYwKwvwnIj1bYvXIVutYkXzw72jEumT2fO4yeiU=; b=XDsvKZaOkiUJmthMToSkVPXqjamSRiWq37StpZy7xK0Hs4DuSY1gV6IDz8DBguBXcs ObY3FPS2uhUmv1IXrT9WmisprP88T9I9mR6qBvJK8ulZydohQ38xiXLCELda9DYVxyaZ j6D4T6WPORWulOi1UIUULhzJCJN9OwYaG5I42E6qd0/xIQuMUFwWm0CGW07fgpFj2Usz vaPp5VC5hcpXrsPHH2QhnMN4pZuksgvcPvni6T/ft45FqKxHyU7E0QZe2OFUtvFhBNZG TuC6uRonpjN6/t4wBfN+xwu52lmDJnFFx7BeSBeTNOrVcoYpvFqLIpG4ibJ2wjdzYMig GqmQ== Received: by 10.180.102.100 with SMTP id fn4mr21302792wib.1.1335703780314; Sun, 29 Apr 2012 05:49:40 -0700 (PDT) Received: from amy.lab.techwires.net (dslb-088-065-053-006.pools.arcor-ip.net. [88.65.53.6]) by mx.google.com with ESMTPS id n20sm32653063wiw.5.2012.04.29.05.49.38 (version=SSLv3 cipher=OTHER); Sun, 29 Apr 2012 05:49:39 -0700 (PDT) Sender: Bernhard Schmidt From: Bernhard Schmidt To: lev@freebsd.org Date: Sun, 29 Apr 2012 14:50:00 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.0-STABLE; KDE/4.7.4; amd64; ; ) References: <4810068524.20120429153838@serebryakov.spb.ru> <201204291414.15397.bschmidt@freebsd.org> <1623095341.20120429163326@serebryakov.spb.ru> In-Reply-To: <1623095341.20120429163326@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable Message-Id: <201204291450.00700.bschmidt@freebsd.org> X-Gm-Message-State: ALoCoQnloiD1aaliP7UnZ3bCg8/Qpv99vGlllHjCdWptn32xrRHssbVAldP9cxZmE/zpUFN0JF/e Cc: Current FreeBSD Subject: Re: 10.0-CURRENT could not be built: make: don't know how to make blacklist.c. Stop X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2012 12:49:41 -0000 On Sunday 29 April 2012 14:33:26 Lev Serebryakov wrote: > Hello, Bernhard. > You wrote 29 =E0=EF=F0=E5=EB=FF 2012 =E3., 16:14:14: >=20 > BS> Just noticed that myself a few minutes ago.. I'm about to commit > BS> attached fix in few minutes. Wanna give it a quick shot? > Yep, it helps :) Committed, sorry for the breakage.=20 =2D-=20 Bernhard From owner-freebsd-current@FreeBSD.ORG Sun Apr 29 16:02:35 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 32F1C1065670 for ; Sun, 29 Apr 2012 16:02:35 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id D83DF8FC08 for ; Sun, 29 Apr 2012 16:02:34 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) for freebsd-current@freebsd.org with esmtp (envelope-from ) id <1SOWa1-0004Z9-Pb>; Sun, 29 Apr 2012 18:02:33 +0200 Received: from e178035180.adsl.alicedsl.de ([85.178.35.180] helo=thor.walstatt.dyndns.org) by inpost2.zedat.fu-berlin.de (Exim 4.69) for freebsd-current@freebsd.org with esmtpsa (envelope-from ) id <1SOWa1-0002Dm-JQ>; Sun, 29 Apr 2012 18:02:33 +0200 Message-ID: <4F9D6613.3070608@zedat.fu-berlin.de> Date: Sun, 29 Apr 2012 18:02:27 +0200 From: "O. Hartmann" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120314 Thunderbird/10.0.3 MIME-Version: 1.0 To: Current FreeBSD X-Enigmail-Version: 1.4 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD114CB7B7AF56554293AA19C" X-Originating-IP: 85.178.35.180 Subject: www/firefox or mail/thunderbird: Build on FreeBSD 10-CURRENT/amd64 CLANG doesn't work: ./jsapi.h:2105:1: error: 'JS_GetNegativeInfinityValue' has C-linkage specified, but returns user-defined type 'jsval' (aka 'JS::Value') which is, incompatible with C [-Werror, -Wreturn-type-c-linkage], JS_GetNegativeInfinityValue(JSContext *cx); X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2012 16:02:35 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD114CB7B7AF56554293AA19C Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Both ports, www/firefox and mail/thunderbird, reject compiling/updating with almost the same error as shown below for www/firefox. This happens on all FreeBSD 10-CURRENT/amd64 boxes compiling with CLANG. FreeBSD 9 is fine. Are there any solutions? Is this problem "well known" and I missed something? regards, Oliver [...] In file included from In file included from /usr/ports/www/firefox/work/mozilla-release/js/src/jsalloc.cpp:40: In file included from ./jscntxt.h:50: =2E/jsapi.h:2102:1: error: 'JS_GetNaNValue' has C-linkage specified, but returns user-defined type 'jsval' (aka 'JS::Value') which is incompatible with C [-Werror,-Wreturn-type-c-linkage] JS_GetNaNValue(JSContext *cx); ^ =2E/jsapi.h:2105:1: error: 'JS_GetNegativeInfinityValue' has C-linkage specified, but returns user-defined type 'jsval' (aka 'JS::Value') which = is incompatible with C [-Werror,-Wreturn-type-c-linkage] JS_GetNegativeInfinityValue(JSContext *cx); ^ =2E/jsapi.h:2108:1: error: 'JS_GetPositiveInfinityValue' has C-linkage specified, but returns user-defined type 'jsval' (aka 'JS::Value') which = is incompatible with C [-Werror,-Wreturn-type-c-linkage] JS_GetPositiveInfinityValue(JSContext *cx); ^ /usr/ports/www/firefox/work/mozilla-release/js/src/jsanalyze.cpp:40: In file included from ./jsanalyze.h:44: In file included from ./jscompartment.h:46: In file included from ./jscntxt.h:50: =2E/jsapi.h:2102:1: error: 'JS_GetNaNValue' has C-linkage specified, but returns user-defined type 'jsval' (aka 'JS::Value') which is incompatible with C [-Werror,-Wreturn-type-c-linkage] JS_GetNaNValue(JSContext *cx); ^ =2E/jsapi.h:2105:1: error: 'JS_GetNegativeInfinityValue' has C-linkage specified, but returns user-defined type 'jsval' (aka 'JS::Value') which = is incompatible with C [-Werror,-Wreturn-type-c-linkage] JS_GetNegativeInfinityValue(JSContext *cx); ^ =2E/jsapi.h:2108:1: error: 'JS_GetPositiveInfinityValue'In file included from has/usr/ports/www/firefox/work/mozilla-release/js/src/jsdbgapi.cpp :C-linkage47 : In file included from specified,./jsprvtd.h:57 : but ./jsapi.hreturns: 2102user-defined: 1type: 'jsval' (aka 'JS::Value')error: which is 'JS_GetNaNValue' has C-linkage specified, but returns user-definedincompatible type 'jsval' (aka 'JS::Value') which isIn file included from /usr/ports/www/firefox/work/mozilla-release/js/src/jsarray.cppwith: 108C:= incompatible with C [-Werror,-Wreturn-type-c-linkage]./jsapi.h:2102 :[-Werror,-Wreturn-type-c-linkage]1 : error: 'JS_GetNaNValue'JS_GetNaNValue(JSContext *cx); has ^C-linkage specified, but returns user-defined type 'jsval' (aka 'JS::Value') which is incompatible with C [-Werror,-Wreturn-type-c-linkage] JS_GetNaNValue(JSContext *cx); ^ =2E/jsapi.h:2105:1: error: 'JS_GetNegativeInfinityValue' has C-linkage specified, but returns user-defined type 'jsval' (aka 'JS::Value') which = is incompatible with C [-Werror,-Wreturn-type-c-linkage] JS_GetNegativeInfinityValue(JSContext *cx); --------------enigD114CB7B7AF56554293AA19C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJPnWYZAAoJEOgBcD7A/5N8+VwH/33DtSnea+RwKn0BdItzZpTv /EI5HN0Lx3JZChww7dQETviZqbbhkXoL/RFrvBD5vEeluYkcypTBFEIZoGNuDrgd E1E5hBLIT7LHmoXN5ylVhoWu1266Ypsx2VsfT7ErSOCDKVREHWMzlGscrLhKUtTZ V9CINGNbGQAnSmV3R6TJ1ywmwRWzFDjndOBSHNxUlsOgg69KII4yFQVulXD/7lpm rshCKefLWEuN1lbdzErhpLpmJGG0lzd7oQ37rag+8203dWRIBdKD+j0sKkfGrB7w 6t+DcqKg77IbldY98qoGiUmhtadkKFGXoPxKDKnR2jAEMvNLzee0Nt1c8IVua1Y= =OQoz -----END PGP SIGNATURE----- --------------enigD114CB7B7AF56554293AA19C-- From owner-freebsd-current@FreeBSD.ORG Sun Apr 29 19:02:37 2012 Return-Path: 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 A92D3106564A; Sun, 29 Apr 2012 19:02:37 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5A8AF8FC1A; Sun, 29 Apr 2012 19:02:37 +0000 (UTC) Received: by dadz14 with SMTP id z14so12141987dad.17 for ; Sun, 29 Apr 2012 12:02:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Im0kLCnT2kVDfrOUyk4vnnQwafeuZNkcLKOs5YDFGPg=; b=APQXdmF94xAiJBbwUQXVHp8jvdkPaCG1njlDeQRBN3mDQWWbZhojIek0YzfsMzAc1s XtBsAlwPDEcC4YQwskH4CfHsUnC+sBBH0flupGZvk7p88zRR/XDL20kCHp3dB8BbJEOl iZrv3pWtOdrVesfE9kDbNOMB8mpkrRgPMk8+sbvPX61UanBxHI3XT/leoAQMfq30yVfg ycqWxuaKTtEqwvbf6nmJ2ubtt4LhQmBEdjBvuED0gTXDQC2JWsN/ggLnBGmbmmt9exCt sHAiT8uBO7aEz5xmzQrqYQfZt0LSMa83Euefe+IZFFwOB2EZYwwgjH4M6Dv61zjrD7Lx OSzA== MIME-Version: 1.0 Received: by 10.68.195.163 with SMTP id if3mr41870619pbc.127.1335726156967; Sun, 29 Apr 2012 12:02:36 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.101.9 with HTTP; Sun, 29 Apr 2012 12:02:36 -0700 (PDT) In-Reply-To: References: <20120421185402.GH1743@albert.catwhisker.org> <7AD8956D-AD18-4CAB-9953-06E00185A7DA@freebsd.org> <20120428150941.e0464900.ray@dlink.ua> <20120428231703.374bc042.ray@dlink.ua> Date: Sun, 29 Apr 2012 12:02:36 -0700 X-Google-Sender-Auth: V_GXFpji7mYL6DhWTohHGkZShEE Message-ID: From: Adrian Chadd To: Aleksandr Rybalko Content-Type: text/plain; charset=ISO-8859-1 Cc: Jason Evans , current@freebsd.org Subject: Re: : jemalloc_arena.c:182: Failed assertion: "p[i] == 0" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2012 19:02:37 -0000 Hi Jason, Cross compiles are now failing for me when I enable MALLOC_PRODUCTION. I'm doing cross-builds using my environment at http://code.google.com/p/freebsd-wifi-build/ . All it requires is a checkout of -HEAD src, so you should be able to reproduce it by following the instructions for an example device: http://code.google.com/p/freebsd-wifi-build/wiki/TpLinkTLWR1043ND You'll have to patch build_freebsd in that SVN repo to populate make.conf with 'MALLOC_PRODUCTION=', rather than pointing it to /dev/null. Please note that for cross builds to MIPS, the compiler being used is GCC and not LLVM. Thanks, Adrian From owner-freebsd-current@FreeBSD.ORG Sun Apr 29 19:04:11 2012 Return-Path: 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 96E6D1065673; Sun, 29 Apr 2012 19:04:11 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5F13E8FC0C; Sun, 29 Apr 2012 19:04:11 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so1534351pbb.13 for ; Sun, 29 Apr 2012 12:04:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=COVw/yMTiHNVBKwXv02mSvExFMVZQym6ufpiWolR7gU=; b=SlXiJSUM55tsdMqebWmeDL24E/CKxjQU5Qb3FshUTg6rqoaI2iO0FsJIFwYmAF4sAf iDybOC6BFzW5anGP69DM73ogneLlq2bNfAncC4qP2GrlWAONft3doV7y8UEI3/8Ol6zB 3dCvQaYgcJuLr5CAF0khA98nwhKqjMMD2Ku+hzoMovTCyfTdIUToGr+/oFaHtrkG4Nh3 EuQCmGDIAtsY02mMskeT35HgRsslnUwhnmfwZKr/5KTf8JTqlwCUbFHKLRLKZz0+UrEH iWBjrzxgpfv0ck399rOG/VNvWtCfuEKeuhr7VWKjWGR86gGmZg2tffF0IXdTJ62KAYsu d4Gg== MIME-Version: 1.0 Received: by 10.68.221.74 with SMTP id qc10mr41674514pbc.80.1335726245467; Sun, 29 Apr 2012 12:04:05 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.101.9 with HTTP; Sun, 29 Apr 2012 12:04:05 -0700 (PDT) In-Reply-To: References: <20120421185402.GH1743@albert.catwhisker.org> <7AD8956D-AD18-4CAB-9953-06E00185A7DA@freebsd.org> <20120428150941.e0464900.ray@dlink.ua> <20120428231703.374bc042.ray@dlink.ua> Date: Sun, 29 Apr 2012 12:04:05 -0700 X-Google-Sender-Auth: jUtGGvne23PsvvMHaUxNqr7UZXU Message-ID: From: Adrian Chadd To: Aleksandr Rybalko Content-Type: text/plain; charset=ISO-8859-1 Cc: Jason Evans , current@freebsd.org Subject: Re: : jemalloc_arena.c:182: Failed assertion: "p[i] == 0" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2012 19:04:11 -0000 .. and the output from the buildworld: cc -fpic -DPIC -O -pipe -G0 -march=mips32 -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/include -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../include -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/mips -DNLS -DSOFTFLOAT -D__DBINTERFACE_PRIVATE -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/gdtoa -DINET6 -I/usr/home/adrian/work/freebsd/svn/obj/mipseb/mips.mips/usr/home/adrian/work/freebsd/svn/src/lib/libc -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/resolv -D_ACL_PRIVATE -DPOSIX_MISTAKE -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/jemalloc/include -DMALLOC_PRODUCTION -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/tzcode/stdtime -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/stdtime -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/rpc -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/mips/softfloat -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/softfloat -DSOFTFLOAT_FOR_GCC -DYP -DNS_CACHING -DSYMBOL_VERSIONING -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c /usr/home/adrian/work/freebsd/svn/src/lib/libc/stdlib/twalk.c -o twalk.So cc -O -pipe -G0 -march=mips32 -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/include -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../include -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/mips -DNLS -DSOFTFLOAT -D__DBINTERFACE_PRIVATE -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/gdtoa -DINET6 -I/usr/home/adrian/work/freebsd/svn/obj/mipseb/mips.mips/usr/home/adrian/work/freebsd/svn/src/lib/libc -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/resolv -D_ACL_PRIVATE -DPOSIX_MISTAKE -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/jemalloc/include -DMALLOC_PRODUCTION -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/tzcode/stdtime -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/stdtime -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/rpc -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/mips/softfloat -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/softfloat -DSOFTFLOAT_FOR_GCC -DYP -DNS_CACHING -DSYMBOL_VERSIONING -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c jemalloc_jemalloc.c -o jemalloc_jemalloc.o cc -fpic -DPIC -O -pipe -G0 -march=mips32 -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/include -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../include -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/mips -DNLS -DSOFTFLOAT -D__DBINTERFACE_PRIVATE -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/gdtoa -DINET6 -I/usr/home/adrian/work/freebsd/svn/obj/mipseb/mips.mips/usr/home/adrian/work/freebsd/svn/src/lib/libc -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/resolv -D_ACL_PRIVATE -DPOSIX_MISTAKE -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/jemalloc/include -DMALLOC_PRODUCTION -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/tzcode/stdtime -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/stdtime -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/rpc -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/mips/softfloat -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/softfloat -DSOFTFLOAT_FOR_GCC -DYP -DNS_CACHING -DSYMBOL_VERSIONING -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c jemalloc_jemalloc.c -o jemalloc_jemalloc.So jemalloc_jemalloc.c: In function 'calloc': jemalloc_jemalloc.c:1027: internal compiler error: in change_address_1, at emit-rtl.c:1784 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. *** Error code 1 1 error *** Error code 2 1 error *** Error code 2 1 error *** Error code 2 1 error *** Error code 2 1 error and the diff against build_freebsd: Index: build_freebsd =================================================================== --- build_freebsd (revision 165) +++ build_freebsd (working copy) @@ -45,6 +45,9 @@ X_TARGET_CPUTYPE="TARGET_CPUTYPE=${TARGET_CPUTYPE}" fi +# Create a make.conf +echo "MALLOC_PRODUCTION=" > ${X_DESTDIR}/../make.conf.${BUILDNAME} + while [ "x$1" != "x" ]; do if [ "$1" = "installworld" ]; then mkdir -p ${X_DESTDIR}/usr/local/bin/ @@ -63,7 +66,8 @@ ${X_TARGET_CPUTYPE} KERNCONF=${KERNCONF} DESTDIR=${X_DESTDIR} \ KODIR=/boot/kernel.${KERNCONF}/ \ KMODDIR=/boot/kernel.${KERNCONF}/ \ - __MAKE_CONF=/dev/null SRCCONF=/dev/null \ + __MAKE_CONF=${X_DESTDIR}/../make.conf.${BUILDNAME} \ + SRCCONF=/dev/null \ LOCAL_DIRS="${LOCAL_DIRS}" \ LOCAL_TOOL_DIRS="${LOCAL_TOOL_DIRS}" $1 \ || exit 1 @@ -74,3 +78,6 @@ fi shift done + +# __MAKE_CONF=/dev/null \ +# SRCCONF=${X_DESTDIR}/../src.conf.${BUILDNAME} \ adrian From owner-freebsd-current@FreeBSD.ORG Sun Apr 29 22:49:47 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5977A106564A; Sun, 29 Apr 2012 22:49:47 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id AE95C8FC08; Sun, 29 Apr 2012 22:49:46 +0000 (UTC) Received: from rnote.ddteam.net (199-2-133-95.pool.ukrtel.net [95.133.2.199]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id 0F4DBC493C; Mon, 30 Apr 2012 01:49:39 +0300 (EEST) Date: Mon, 30 Apr 2012 01:49:32 +0300 From: Aleksandr Rybalko To: Adrian Chadd Message-Id: <20120430014932.7a87f731.ray@dlink.ua> In-Reply-To: References: <20120421185402.GH1743@albert.catwhisker.org> <7AD8956D-AD18-4CAB-9953-06E00185A7DA@freebsd.org> <20120428150941.e0464900.ray@dlink.ua> <20120428231703.374bc042.ray@dlink.ua> Organization: D-Link X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Jason Evans , current@freebsd.org Subject: Re: : jemalloc_arena.c:182: Failed assertion: "p[i] == 0" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2012 22:49:47 -0000 On Sun, 29 Apr 2012 12:04:05 -0700 Adrian Chadd wrote: > .. and the output from the buildworld: > > cc -fpic -DPIC -O -pipe -G0 -march=mips32 > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/include > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../include > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/mips -DNLS > -DSOFTFLOAT -D__DBINTERFACE_PRIVATE > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/gdtoa > -DINET6 > -I/usr/home/adrian/work/freebsd/svn/obj/mipseb/mips.mips/usr/home/adrian/work/freebsd/svn/src/lib/libc > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/resolv > -D_ACL_PRIVATE -DPOSIX_MISTAKE > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/jemalloc/include > -DMALLOC_PRODUCTION > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/tzcode/stdtime > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/stdtime > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/locale -DBROKEN_DES > -DPORTMAP -DDES_BUILTIN > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/rpc > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/mips/softfloat > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/softfloat > -DSOFTFLOAT_FOR_GCC -DYP -DNS_CACHING -DSYMBOL_VERSIONING -std=gnu99 > -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized > -Wno-pointer-sign > -c /usr/home/adrian/work/freebsd/svn/src/lib/libc/stdlib/twalk.c -o > twalk.So cc -O -pipe -G0 -march=mips32 > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/include > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../include > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/mips -DNLS > -DSOFTFLOAT -D__DBINTERFACE_PRIVATE > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/gdtoa > -DINET6 > -I/usr/home/adrian/work/freebsd/svn/obj/mipseb/mips.mips/usr/home/adrian/work/freebsd/svn/src/lib/libc > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/resolv > -D_ACL_PRIVATE -DPOSIX_MISTAKE > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/jemalloc/include > -DMALLOC_PRODUCTION > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/tzcode/stdtime > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/stdtime > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/locale -DBROKEN_DES > -DPORTMAP -DDES_BUILTIN > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/rpc > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/mips/softfloat > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/softfloat > -DSOFTFLOAT_FOR_GCC -DYP -DNS_CACHING -DSYMBOL_VERSIONING -std=gnu99 > -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized > -Wno-pointer-sign -c jemalloc_jemalloc.c -o jemalloc_jemalloc.o cc > -fpic -DPIC -O -pipe -G0 -march=mips32 > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/include > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../include > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/mips -DNLS > -DSOFTFLOAT -D__DBINTERFACE_PRIVATE > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/gdtoa > -DINET6 > -I/usr/home/adrian/work/freebsd/svn/obj/mipseb/mips.mips/usr/home/adrian/work/freebsd/svn/src/lib/libc > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/resolv > -D_ACL_PRIVATE -DPOSIX_MISTAKE > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/jemalloc/include > -DMALLOC_PRODUCTION > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/tzcode/stdtime > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/stdtime > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/locale -DBROKEN_DES > -DPORTMAP -DDES_BUILTIN > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/rpc > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/mips/softfloat > -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/softfloat > -DSOFTFLOAT_FOR_GCC -DYP -DNS_CACHING -DSYMBOL_VERSIONING -std=gnu99 > -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized > -Wno-pointer-sign -c jemalloc_jemalloc.c -o jemalloc_jemalloc.So > jemalloc_jemalloc.c: In function 'calloc': jemalloc_jemalloc.c:1027: > internal compiler error: in change_address_1, at emit-rtl.c:1784 > Please submit a full bug report, with preprocessed source if > appropriate. See for instructions. > *** Error code 1 > 1 error > *** Error code 2 > 1 error > *** Error code 2 > 1 error > *** Error code 2 > 1 error > *** Error code 2 > 1 error > > > and the diff against build_freebsd: > > > Index: build_freebsd > =================================================================== > --- build_freebsd (revision 165) > +++ build_freebsd (working copy) > @@ -45,6 +45,9 @@ > X_TARGET_CPUTYPE="TARGET_CPUTYPE=${TARGET_CPUTYPE}" > fi > > +# Create a make.conf > +echo "MALLOC_PRODUCTION=" > ${X_DESTDIR}/../make.conf.${BUILDNAME} > + > while [ "x$1" != "x" ]; do > if [ "$1" = "installworld" ]; then > mkdir -p ${X_DESTDIR}/usr/local/bin/ > @@ -63,7 +66,8 @@ > ${X_TARGET_CPUTYPE} KERNCONF=${KERNCONF} > DESTDIR=${X_DESTDIR} \ > KODIR=/boot/kernel.${KERNCONF}/ > \ > KMODDIR=/boot/kernel.${KERNCONF}/ > \ > - __MAKE_CONF=/dev/null SRCCONF=/dev/null > \ > + __MAKE_CONF=${X_DESTDIR}/../make.conf.${BUILDNAME} > \ > + SRCCONF=/dev/null > \ > LOCAL_DIRS="${LOCAL_DIRS}" > \ > LOCAL_TOOL_DIRS="${LOCAL_TOOL_DIRS}" $1 > \ > || exit 1 > @@ -74,3 +78,6 @@ > fi > shift > done > + > +# __MAKE_CONF=/dev/null > \ > +# SRCCONF=${X_DESTDIR}/../src.conf.${BUILDNAME} > \ > > > > adrian Hi, confirm, same for zrouter builds, at least for MIPS32EB and MIPS32EL. In short, MALLOC_PRODUCTION flag for MIPS32EL used this way: make \ TARGET=mips \ TARGET_ARCH=mipsel \ TARGET_CPUARCH=mips \ ... \ MALLOC_PRODUCTION=yes toolchain make \ TARGET=mips \ TARGET_ARCH=mipsel \ TARGET_CPUARCH=mips \ ... \ MALLOC_PRODUCTION=yes buildworld Just s/mipsel/mips/ for MIPS32EB. WBW -- Aleksandr Rybalko From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 06:11:51 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8C19106564A; Mon, 30 Apr 2012 06:11:51 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id 323548FC12; Mon, 30 Apr 2012 06:11:51 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1SOjpu-0000hP-7I>; Mon, 30 Apr 2012 08:11:50 +0200 Received: from e178001179.adsl.alicedsl.de ([85.178.1.179] helo=thor.walstatt.dyndns.org) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1SOjpu-000462-1g>; Mon, 30 Apr 2012 08:11:50 +0200 Message-ID: <4F9E2D20.4010300@zedat.fu-berlin.de> Date: Mon, 30 Apr 2012 08:11:44 +0200 From: "O. Hartmann" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120314 Thunderbird/10.0.3 MIME-Version: 1.0 To: Dimitry Andric References: <4F9D1DF8.20001@zedat.fu-berlin.de> <4F9D317D.40609@FreeBSD.org> In-Reply-To: <4F9D317D.40609@FreeBSD.org> X-Enigmail-Version: 1.4 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4B14BFD497D98BF07C6680BA" X-Originating-IP: 85.178.1.179 Cc: Current FreeBSD Subject: Re: lang/gcc46: error when compiling with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 06:11:51 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4B14BFD497D98BF07C6680BA Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Am 04/29/12 14:18, schrieb Dimitry Andric: > On 2012-04-29 12:54, O. Hartmann wrote: >> On a FreeBSD 10-CURRENT/amd64 box the compilation/update of the port >> lang/gcc46 fails with the below shown error. >> >> Since the port compiles well on FreeBSD 9 and another FreeBSD 10 box >> (all amd64, CLANG built), I feel a bit confused since the setup is >> almost the same on all boxes. The machine in question is the most mode= rn >> box, equipted with a Core i7-3930K: > ... > ... >> gmake[3]: *** [s-tm-texi] Segmentation fault: 11 (core dumped) >> gmake[3]: *** Waiting for unfinished jobs.... >=20 > What happens if you simply repeat the build? If the segfault occurs at= > different stages every time, you might simply have bad RAM. Another > possibility is that the build is out of memory, in that case you could > try running it without multiple make jobs (e.g. set DISABLE_MAKE_JOBS).= Repeating the build ends up at the same "stage" as it stopped when building on regular basis - for my understanding. I also disabled building with parallel make jobs as recommended - with no effect. Also, I tried to build lang/gcc46 with "portmaster -f lang/gcc46", with the same result - bad. Maybe I should recompile texinfo or whatever this core-dumping *.texi triggers? Regards, Oliver [...] --no-split -I . -I .././../gcc-4.6-20120420/gcc/doc \ -I .././../gcc-4.6-20120420/gcc/doc/include -o doc/gcc.info .././../gcc-4.6-20120420/gcc/doc/gcc.texi; \ fi build/genhooks \ .././../gcc-4.6-20120420/gcc/doc/tm.texi.in > tmp-tm.texi= gmake[3]: *** [s-tm-texi] Segmentation fault: 11 (core dumped) gmake[3]: Leaving directory `/usr/ports/lang/gcc46/work/build/gcc' gmake[2]: *** [all-stage1-gcc] Error 2 gmake[2]: Leaving directory `/usr/ports/lang/gcc46/work/build' gmake[1]: *** [stage1-bubble] Error 2 gmake[1]: Leaving directory `/usr/ports/lang/gcc46/work/build' gmake: *** [bootstrap-lean] Error 2 *** [do-build] Error code 1 Stop in /usr/ports/lang/gcc46. *** [build] Error code 1 Stop in /usr/ports/lang/gcc46. =3D=3D=3D>>> make failed for lang/gcc46 =3D=3D=3D>>> Aborting update --------------enig4B14BFD497D98BF07C6680BA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJPni0lAAoJEOgBcD7A/5N8rHsH/32LqfY/C8lfO5DGZrghQWHx fZnT9QAMmzRzt4hry0vBNek0TybUUPaC+QR9HGUasKxXxENC98BsDUH5D2SnEYLO RAW2pVMbp/Y0v0nfl1qbWgdle6/HgS6mOP9z6Vp5VuGCG7grHmdnIMXuy33eTd6Z cpeso9FfC30ulg6kpHYuzQ4LDn9wmFJJD/1GK+imf0z/GbmMwytplt0ZVzlIV9Z+ vVBXzeMyOiFFarOO12JsA6Sl3egLo/6JE6xQZ508NVoSSWnO0153eDhJ9aL/bFqx olSPmbOWz7IaZlg/UFTjjgqckoVHSF14b7Gcgh3eXZep08nfCCvTG8ipHpUw6Rc= =1uN0 -----END PGP SIGNATURE----- --------------enig4B14BFD497D98BF07C6680BA-- From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 06:13:27 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 62BA0106564A; Mon, 30 Apr 2012 06:13:27 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id 11F878FC1D; Mon, 30 Apr 2012 06:13:27 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1SOjrS-0000qc-AZ>; Mon, 30 Apr 2012 08:13:26 +0200 Received: from e178001179.adsl.alicedsl.de ([85.178.1.179] helo=thor.walstatt.dyndns.org) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1SOjrS-0004BN-5L>; Mon, 30 Apr 2012 08:13:26 +0200 Message-ID: <4F9E2D85.9000904@zedat.fu-berlin.de> Date: Mon, 30 Apr 2012 08:13:25 +0200 From: "O. Hartmann" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120314 Thunderbird/10.0.3 MIME-Version: 1.0 To: Dimitry Andric References: <4F9BC101.8090305@zedat.fu-berlin.de> <4F9BD08C.4090405@gmail.com> <4F9C2047.8020108@FreeBSD.org> In-Reply-To: <4F9C2047.8020108@FreeBSD.org> X-Enigmail-Version: 1.4 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig761FB6F4585874D509FDDC24" X-Originating-IP: 85.178.1.179 Cc: Volodymyr Kostyrko , Current FreeBSD , Ports FreeBSD Subject: Re: New Xorg: graphics/dri: fails to compile with CLANG: nouveau_array.c:49:16: error: illegal storage class on function, *extract_u = EXTRACT(char, unsigned, 1); X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 06:13:27 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig761FB6F4585874D509FDDC24 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Am 04/28/12 18:52, schrieb Dimitry Andric: > On 2012-04-28 13:12, Volodymyr Kostyrko wrote: >> O. Hartmann wrote: >>> Is there in "official" way to get this fixed with CLANG? I see that >>> files folder in graphics/dri is missing, so none of the fixes for bo= th >>> the faulty source files >> >> I think the patch should go to graphics/libGL. >> >> cd /usr/ports/graphics/libGL/files >> fetch -rao -=20 >> 'http://cgit.freedesktop.org/mesa/mesa/patch/?id=3D4aa1ac5fe94b5696095= 229ee3568bf4fa7cfed95'=20 >> | sed -e 's|^--- a/src|--- src|' -e 's|^+++ b/src|+++ src|' > patch-no= uveau >> >> Should do. >=20 > Please try this patch (lightly tested): >=20 > http://www.andric.com/freebsd/clang/clangports-graphics-libGL-3.diff I'll give it a try as soon as possible. Ath the moment, things went perfect utilizing the initial hint by Volodymyr Kostyrko. --------------enig761FB6F4585874D509FDDC24 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJPni2FAAoJEOgBcD7A/5N84GsH/1EP5YGwPhUHuHyrR4CLNMli XrbzaEIqIzidA9HVLJkDvHvaA1ppvtdLwS0jKa/wGbj8mho0FgFqL74k+9JDiGem aAt+b2zlp1ncrTrmSGNE/aqmWQJCVSSlGJ3xMFvYgWecJf33CadSyAJR7wAs1p95 F9cSQGbNhxBmDXfjfViOwJpyyH+pIaxk9Auvy2aBj+NX26ncqdglpCSthAWdjQue pIsIL7flgcZMhVHG2+eMAmjJkoAHGJq85RCIEaDFWti4crvsMm+gzcWqin9hoAq8 +V0FIy6fw8/r+Y5TvpUEYHDyHRcGb5kFaS/DG+/egbFH4T7J/GNs+vLLBclEJlA= =QfWC -----END PGP SIGNATURE----- --------------enig761FB6F4585874D509FDDC24-- From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 06:40:05 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7D9F106566B for ; Mon, 30 Apr 2012 06:40:05 +0000 (UTC) (envelope-from erichfreebsdlist@ovitrap.com) Received: from alogreentechnologies.com (alogreentechnologies.com [67.212.226.44]) by mx1.freebsd.org (Postfix) with ESMTP id 767A48FC14 for ; Mon, 30 Apr 2012 06:40:05 +0000 (UTC) Received: from amd620.ovitrap.com ([49.128.188.2]) (authenticated bits=0) by alogreentechnologies.com (8.13.1/8.13.1) with ESMTP id q3U6dTlf007531; Mon, 30 Apr 2012 00:39:32 -0600 From: Erich Dollansky To: David Wolfskill Date: Mon, 30 Apr 2012 13:39:52 +0700 User-Agent: KMail/1.13.7 (FreeBSD/8.3-STABLE; KDE/4.7.4; amd64; ; ) References: <201204272308.22440.erichfreebsdlist@ovitrap.com> <201204280850.47758.erichfreebsdlist@ovitrap.com> <20120428015915.GW1669@albert.catwhisker.org> In-Reply-To: <20120428015915.GW1669@albert.catwhisker.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Message-Id: <201204301339.52736.erichfreebsdlist@ovitrap.com> Cc: freebsd-current@freebsd.org Subject: Re: compiling world fails with 9.0 and 10.0 from today (28.04) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 06:40:05 -0000 Hi, after failing to compile 9.0 and 10.0 on a fresh 9.0 installation, I compiled both 9.0 and 10.0 on a 8.3 machine without any problem. I will test the new kernel on the 9.0 machine later today. I was not able to pinpoint what causes the failure on the 9.0 machine. Erich On Saturday 28 April 2012 08:59:15 David Wolfskill wrote: > On Sat, Apr 28, 2012 at 08:50:47AM +0700, Erich Dollansky wrote: > > ... > > I use the following commands to do the compilation: > > > > cd /usr/src > > /usr/bin/nice -n 20 make buildworld > > OK. That should build the userland OK. > > > > Have you reviewed /usr/src/UPDATING? Near the end of that file, there > > > is a list of commands to use to build from sources. Scan for "COMMON > > > ITEMS". > > > > > Do you mean this one? > > > > make kernel-toolchain > > make -DALWAYS_CHECK_MAKE buildkernel KERNCONF=YOUR_KERNEL_HERE > > make -DALWAYS_CHECK_MAKE installkernel KERNCONF=YOUR_KERNEL_HERE > > > > Isn't this the next step after building the world? > > No; I was referring to the part with the sub-heading > > To rebuild everything and install it on the current system. > > or > > To upgrade in-place from 8.x-stable to current > > depending on whether you're tring to update release/9.0 to stable/9 or > release/9.0 to head (for example). > > > ... > > I am currently downloading the 9.0 sources into an empty source tree on a 8.3 machine to see what happens there. > > Note that this is also an upgrade. > > Peace, > david > -- > David H. Wolfskill david@catwhisker.org > Depriving a girl or boy of an opportunity for education is evil. > > See http://www.catwhisker.org/~david/publickey.gpg for my public key. > From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 06:43:34 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E0DB2106566C for ; Mon, 30 Apr 2012 06:43:34 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id 956268FC0C for ; Mon, 30 Apr 2012 06:43:34 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) for freebsd-current@freebsd.org with esmtp (envelope-from ) id <1SOkKb-0004BS-Sl>; Mon, 30 Apr 2012 08:43:33 +0200 Received: from e178001179.adsl.alicedsl.de ([85.178.1.179] helo=thor.walstatt.dyndns.org) by inpost2.zedat.fu-berlin.de (Exim 4.69) for freebsd-current@freebsd.org with esmtpsa (envelope-from ) id <1SOkKb-0005a2-N6>; Mon, 30 Apr 2012 08:43:33 +0200 Message-ID: <4F9E348F.1090306@zedat.fu-berlin.de> Date: Mon, 30 Apr 2012 08:43:27 +0200 From: "O. Hartmann" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120314 Thunderbird/10.0.3 MIME-Version: 1.0 To: Current FreeBSD References: <4F9CF75F.2000605@zedat.fu-berlin.de> In-Reply-To: <4F9CF75F.2000605@zedat.fu-berlin.de> X-Enigmail-Version: 1.4 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4161D7E026DB493D1FAC6CBE" X-Originating-IP: 85.178.1.179 Subject: Re: www/firefox and mail/thunderbird fail to compile in FreeBSD 10-CUR/amd64 with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 06:43:35 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4161D7E026DB493D1FAC6CBE Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable I realized that compiling mail/thunderbird and www/firefox on most recent FreeBSD 10-CURRENT/amd64 with CLANG/LLVM 3.1 doesn't work anymore. Compiling www/firefox and mail/thunderbird with gcc 4.6 works fine. Am 04/29/12 10:10, schrieb O. Hartmann: > On my FreeBSD 10 boxes, all compiled with CLANG and using CLANG ( > FreeBSD 10.0-CURRENT #0 r234500: Fri Apr 20 21:59:02 CEST 2012), > compiling/updating Firefox to V12 and Thunderbird to V12 fails with the= > below shown error. >=20 > Does someone have any clue what could trigger the problem? >=20 > On FreeBSD 9-STABLE/amd64, also compiled with CLANG, there is no such > problem. >=20 >=20 > Thanks in advance, >=20 > Oliver >=20 >=20 > [...] > In file included from > /usr/ports/www/firefox/work/mozilla-release/js/src/jsalloc.cpp:40: > In file included from ./jscntxt.h:50: > ./jsapi.h:2102:1: error: 'JS_GetNaNValue' has C-linkage specified, but > returns user-defined type 'jsval' (aka 'JS::Value') which is > incompatible with C > [-Werror,-Wreturn-type-c-linkage] > JS_GetNaNValue(JSContext *cx); > ^ > ./jsapi.h:2105:1: error: 'JS_GetNegativeInfinityValue' has C-linkage > specified, but returns user-defined type 'jsval' (aka 'JS::Value') whic= h is > incompatible with C [-Werror,-Wreturn-type-c-linkage] > JS_GetNegativeInfinityValue(JSContext *cx); > ^ > ./jsapi.h:2108:1: error: 'JS_GetPositiveInfinityValue' has C-linkage > specified, but returns user-defined type 'jsval' (aka 'JS::Value') whic= h is > incompatible with C [-Werror,-Wreturn-type-c-linkage] > JS_GetPositiveInfinityValue(JSContext *cx); > ^ > ./jsapi.h:2111:1: error: 'JS_GetEmptyStringValue' has C-linkage > specified, but returns user-defined type 'jsval' (aka 'JS::Value') whic= h > is incompatible > with C [-Werror,-Wreturn-type-c-linkage] > JS_GetEmptyStringValue(JSContext *cx); > ^ > ./jsapi.h:2819:1: error: 'JS_ComputeThis' has C-linkage specified, but > returns user-defined type 'jsval' (aka 'JS::Value') which is > incompatible with C > [-Werror,-Wreturn-type-c-linkage] > JS_ComputeThis(JSContext *cx, jsval *vp); > ^ > In file included from > /usr/ports/www/firefox/work/mozilla-release/js/src/jsanalyze.cpp:40: > In file included from ./jsanalyze.h:44: > In file included from ./jscompartment.h:46: > In file included from ./jscntxt.h:50: > ./jsapi.h:2102:1: error: 'JS_GetNaNValue' has C-linkage specified, but > returns user-defined type 'jsval' (aka 'JS::Value') which is > incompatible with C > [-Werror,-Wreturn-type-c-linkage] > JS_GetNaNValue(JSContext *cx); > ^ > ./jsapi.h:2105:1: error: 'JS_GetNegativeInfinityValue' has C-linkage > specified, but returns user-defined type 'jsval' (aka 'JS::Value') whic= h is > incompatible with C [-Werror,-Wreturn-type-c-linkage] >=20 --=20 O. Hartmann Freie Universit=E4t Berlin Institut fuer Geologische Wissenschaften Fachrichtung Planetologie und Fernerkundung Malteser-Str. 74--100/Haus D D-12249 Berlin Tel.: +49 (0) 30 838 70 508 FAX: +49 (0) 30 838 70 837 --------------enig4161D7E026DB493D1FAC6CBE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJPnjSVAAoJEOgBcD7A/5N8qn8H/2iHAniA1ISAC07UXlDc5LFw ULdRvxkdxuuNzJXtxEO+4jt41z+VCtmSb6EA52gPB7tS17bD7qmVc9Uztu9wfsK/ 7xMhZi2COMBDKEdbbC3FiTnvByiqBXVbR9QTjmwmGhwEmwUknaDyfjHXcrZu6enV xSiGlTqNMubgxD8SBKeHhjhdwNJl1pqFD/XcluCkhPmVWuMS5d16P1IZm4BIPrjo F0iNHq6+CZtoRMjOeqtLqhA0579oPu9I7TQaXlTaVow2KwcE6QV1bstvLR9RAs0L dnaYCNJ1SW4w5W85KenYOgrW4FIWhAApCFO77IPBO7YV7kAJUhqHUeAg/QnuLMg= =Fz8Y -----END PGP SIGNATURE----- --------------enig4161D7E026DB493D1FAC6CBE-- From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 11:35:16 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A062A1065670; Mon, 30 Apr 2012 11:35:16 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (unknown [IPv6:2001:41d0:1:7018::1:3]) by mx1.freebsd.org (Postfix) with ESMTP id 2E4A08FC14; Mon, 30 Apr 2012 11:35:16 +0000 (UTC) Received: from [2a01:e35:8b50:830:290:f5ff:fe9d:b78c] (helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SOoss-000Kky-K6; Mon, 30 Apr 2012 13:35:15 +0200 Message-ID: <4F9E78F1.8090807@FreeBSD.org> Date: Mon, 30 Apr 2012 13:35:13 +0200 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120426 Thunderbird/12.0 MIME-Version: 1.0 To: Boris Samorodov References: <4F9703C9.8080503@FreeBSD.org> <4F98492D.8070006@FreeBSD.org> <4F984CC2.5080404@passap.ru> <4F985334.8030109@FreeBSD.org> <4F99183A.5060406@FreeBSD.org> <4F99C5A4.9030309@passap.ru> In-Reply-To: <4F99C5A4.9030309@passap.ru> X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: freebsd-current@freebsd.org, Dimitry Andric Subject: Re: segfault in vfscanf(3): clang and __restrict usage X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 11:35:16 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 27.04.2012 00:01, Boris Samorodov wrote: > I've rebuild the world (because I had to use gcc-built world for > obvious reason) and now smartd works (can't test cupsd for now). > BTW, the port devel/ORBit2 which segfaulted both with clang and gcc > is built fine now. Thanks! I committed the patch to HEAD r234836. Thank you both for your feedback and sorry for the delay. - -- Jean-Sébastien Pédron -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+eePEACgkQa+xGJsFYOlMD5QCcDh/qLnHOysRjWjsR9o18FxHv oTkAnRoAXi4t3QCDk7tiQeVM7FDqB07c =1SPA -----END PGP SIGNATURE----- From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 11:44:19 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DC5441065672 for ; Mon, 30 Apr 2012 11:44:19 +0000 (UTC) (envelope-from jean-sebastien.pedron@dumbbell.fr) Received: from mail.made4.biz (unknown [IPv6:2001:41d0:1:7018::1:3]) by mx1.freebsd.org (Postfix) with ESMTP id 9772F8FC12 for ; Mon, 30 Apr 2012 11:44:19 +0000 (UTC) Received: from [2a01:e35:8b50:830:290:f5ff:fe9d:b78c] (helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SOp1d-000Kx2-SD for freebsd-current@freebsd.org; Mon, 30 Apr 2012 13:44:18 +0200 Message-ID: <4F9E7B11.3060901@dumbbell.fr> Date: Mon, 30 Apr 2012 13:44:17 +0200 From: =?ISO-8859-15?Q?Jean-S=E9bastien_P=E9dron?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120426 Thunderbird/12.0 MIME-Version: 1.0 To: freebsd-current@freebsd.org References: <4F9D1DF8.20001@zedat.fu-berlin.de> <4F9D317D.40609@FreeBSD.org> <4F9E2D20.4010300@zedat.fu-berlin.de> In-Reply-To: <4F9E2D20.4010300@zedat.fu-berlin.de> X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Subject: Re: lang/gcc46: error when compiling with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 11:44:19 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 30.04.2012 08:11, O. Hartmann wrote: > Repeating the build ends up at the same "stage" as it stopped when > building on regular basis - for my understanding. You say you have two boxes running 10-CURRENT: do they run the same SVN revision? A recent change (r234585, 2012-04-22) in libc causes several softwares to segfault if the libc is built with clang. I just committed to HEAD (r234836) a patch that fixes this. Maybe it's related to your problem, you may want to try it. - -- Jean-Sébastien Pédron -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+eexEACgkQa+xGJsFYOlNvQgCgmOVXZiH5zv5T+RdVL25rdome +zAAoLR/deC5HhWwZgNi/8yK8wcYJ0AS =RUSU -----END PGP SIGNATURE----- From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 11:54:16 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 830B8106564A for ; Mon, 30 Apr 2012 11:54:16 +0000 (UTC) (envelope-from martymac@FreeBSD.org) Received: from lmtp.galacsys.net (webmail.galacsys.net [IPv6:2001:1b78:0:1:d918:51d7:0:1]) by mx1.freebsd.org (Postfix) with ESMTP id 162D08FC0A for ; Mon, 30 Apr 2012 11:54:16 +0000 (UTC) Received: from martymac.org (webmail.galacsys.net [217.24.81.215]) by lmtp.galacsys.net (Postfix) with ESMTP id 6D6741FA5CE3; Mon, 30 Apr 2012 13:54:14 +0200 (CEST) From: "Ganael LAPLANCHE" To: matt X-Openwebmail-Date: Mon, 30 Apr 2012 14:54:14 +0200 Message-Id: <20120430115203.M31160@FreeBSD.org> In-Reply-To: <4F6782F1.9000909@gmail.com> References: <4E836C06.9070405@gmail.com> <4E8374A7.90105@gmail.com> <4E9BDF13.4040006@gmail.com> <4F38211D.4070305@mehnert.org> <4F40A2D4.6000000@gmail.com> <4F57A8FC.8090106@gmail.com> <20120308092234.M18590@martymac.org> <4F5AC96A.3050600@gmail.com> <4F5FE9C1.7010901@gmail.com> <4F6020C0.60405@gmail.com> <4F60E258.6030606@gmail.com> <20120319131812.M90515@martymac.org> <4F6782F1.9000909@gmail.com> X-Mailer: Open WebMail 2.01 20030425 X-OriginatingIP: 157.99.64.43 (ganael.laplanche@martymac.org) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Date: Mon, 30 Apr 2012 11:54:16 +0000 (UTC) Cc: Vrachnis Ilias-Dimitrios , freebsd-current@freebsd.org Subject: Re: x220 notes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 11:54:16 -0000 On Mon, 19 Mar 2012 12:03:13 -0700, matt wrote Hi Matt, > I'll have to try again without the patch to see if it's > Xorg/KMS or FreeBSD base that has changed. FYI, I've just tried suspend/resume with all.14.5.patch and sources from 2012/04/28, but I still get a black screen on resume :/ Best regards, -- Ganael LAPLANCHE http://www.martymac.org | http://contribs.martymac.org FreeBSD: martymac , http://www.FreeBSD.org From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 12:49:29 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C2F561065672 for ; Mon, 30 Apr 2012 12:49:29 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 975958FC0A for ; Mon, 30 Apr 2012 12:49:29 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 01350B9C2; Mon, 30 Apr 2012 08:49:29 -0400 (EDT) From: John Baldwin To: Anton Shterenlikht Date: Mon, 30 Apr 2012 08:43:14 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <20120426224215.GA79891@mech-cluster241.men.bris.ac.uk> <201204270751.11885.jhb@freebsd.org> <20120428172021.GA92264@mech-cluster241.men.bris.ac.uk> In-Reply-To: <20120428172021.GA92264@mech-cluster241.men.bris.ac.uk> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201204300843.14636.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 30 Apr 2012 08:49:29 -0400 (EDT) Cc: freebsd-current@freebsd.org Subject: Re: updating from r231158 to 234465: mounting from ufs:/dev/ad4s1a failed with error 19 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 12:49:29 -0000 On Saturday, April 28, 2012 1:20:22 pm Anton Shterenlikht wrote: > On Fri, Apr 27, 2012 at 07:51:11AM -0400, John Baldwin wrote: > > On Thursday, April 26, 2012 6:42:15 pm Anton Shterenlikht wrote: > > > I was updating from r231158 to 234465 > > > (amd64 laptop Compaq 6715s), > > > and I think I must've messed someting > > > up in the kernel config. Now I get > > > build error, panic of a loader error, > > > depending on which kernel I build. > > > > > > ********************************************************* > > > > > > If I build GENERIC, I get: > > > > > > (transcribed by hand) > > > > > > mountroot: waiting for device /dev/ad4s1a > > > Mounting from ufs:/dev/ad4s1a failed with error 19. > > > > > > mountroot> ? > > > > > > List of GEOM managed disk devices: > > > > > > cd0 > > > > > > mountroot> > > > > Hmm, so GENERIC is not finding ad4. Can you look in the dmesg > > (using scroll-lock) to see if GENERIC finds your ATA controller > > ok? > > I see only one line: > > ata0: at channel 0 on atapci0 > > ata does not appear anywhere else. > > > > > > The device is certainly correct in r231158: > > > > > > BUZI> df > > > Filesystem 512-blocks Used Avail Capacity Mounted on > > > /dev/ad4s1a 101554068 46474368 46955376 50% / > > > devfs 2 2 0 100% /dev > > > BUZI> > > > > > > ********************************************************* > > > > > > If I add > > > > > > device atadisk > > > > > > to GENERIC, then I get this linking error: > > > > Yes, you aren't supposed to use 'atadisk' with ATA_CAM. See the UPDATING > > entry 20110424 for more details on that. > > > > However, can you obtain a verbose dmesg from your old kernel? > > Amazingly (for me) I can't! > > Twice I got a panic. The third time, > and thereafter, I get the same error as with GENERIC: > > Mounting from ufs:/dev/ad4s1a failed with error 19. > > I also see: > > ata0: stat0=0x00 err=0x01 lsb=0x14 msb=0exb > ata0: stat1=0x00 err=0x00 lsb=0x00 msb=0x00 > ata0: reset tp2 stat0=00 stat1=00 devices=0x10000 Hmmm, I don't know how to grok these lines, but does your disk work at all now with any kernel? It may be that your disk has died (or a cable, etc.) and it just happened to coincide with your upgrade? -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 13:51:09 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F1DD106566B; Mon, 30 Apr 2012 13:51:09 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from csmtp3.one.com (csmtp3.one.com [91.198.169.23]) by mx1.freebsd.org (Postfix) with ESMTP id 5ADF58FC14; Mon, 30 Apr 2012 13:51:09 +0000 (UTC) Received: from [192.168.1.15] (unknown [217.157.7.221]) by csmtp3.one.com (Postfix) with ESMTPA id 30E402410372; Mon, 30 Apr 2012 13:41:02 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=iso-8859-1 From: Erik Cederstrand In-Reply-To: Date: Mon, 30 Apr 2012 15:41:02 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <42D8809D-0E99-47A5-802F-71991B5B0B8D@cederstrand.dk> References: <20120426093548.GR2358@deviant.kiev.zoral.com.ua> <20120426134140.GF14350@lo0.su> <4F99ACF9.2050609@infracaninophile.co.uk> To: Chris Rees X-Mailer: Apple Mail (2.1257) Cc: Matthew Seaman , freebsd-current@freebsd.org Subject: Re: [RFC] Un-staticise the toolchain X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 13:51:09 -0000 Den 26/04/2012 kl. 22.30 skrev Chris Rees: > On 26 April 2012 20:15, Matthew Seaman = wrote: >> On 26/04/2012 20:01, Chris Rees wrote: >>> hydra# cd /usr/ports && time make MAKE=3D~crees/bin/make-static = index >>>=20 >>> Generating INDEX-9 - please wait.. Done. >>> 729.770u 120.841s 7:45.10 182.8% 920+2676k 5251+116484io = 7750pf+0w >>>=20 >>> hydra# time make MAKE=3D~crees/bin/make-dynamic index >>>=20 >>> Generating INDEX-9 - please wait.. Done. >>> 771.320u 133.540s 8:07.83 185.4% 609+2918k 474+116484io = 570pf+0w >>>=20 >>> We have a 10% slowdown (or 11% speedup, depending on your figures) = when >>> using a dynamically loaded make. >>=20 >> I don't think you can validly conclude much from just one sample of = each >> type. Try repeating those tests enough that you can do some decent >> statistics. >>=20 >> Oh, and you should probably either discard the first few results, or >> else take pains to flush[*] the buffer cache between each run, so you >> end up measuring the same thing repeatably. >=20 > Had I done the tests the other way around, I may agree with you, but > the second test should benefit from any buffering, and it is *still* > slower. >=20 > Look, I know it's not a perfect benchmark, it was just some food for > thought-- a difference of 10% is pretty significant, and I don't think > you can blame that on a solar flare. Can anyone explain to me why the dynamically linked version is = significantly slower? What are the extra steps involved compared to a = statically linked binary? Thanks, Erik= From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 14:12:57 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3CE41065670; Mon, 30 Apr 2012 14:12:57 +0000 (UTC) (envelope-from gperez@entel.upc.edu) Received: from dash.upc.es (dash.upc.es [147.83.2.50]) by mx1.freebsd.org (Postfix) with ESMTP id 50D4B8FC12; Mon, 30 Apr 2012 14:12:57 +0000 (UTC) Received: from ackerman2.upc.es (ackerman2.upc.es [147.83.2.244]) by dash.upc.es (8.14.1/8.13.1) with ESMTP id q3UECrG3014636 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 30 Apr 2012 16:12:53 +0200 Received: from portgus.lan (17.Red-83-38-184.dynamicIP.rima-tde.net [83.38.184.17]) (authenticated bits=0) by ackerman2.upc.es (8.14.4/8.14.4) with ESMTP id q3UECoR5000883 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 30 Apr 2012 16:12:53 +0200 Message-ID: <4F9E9E06.4070004@entel.upc.edu> Date: Mon, 30 Apr 2012 16:13:26 +0200 From: =?ISO-8859-1?Q?Gustau_P=E9rez_i_Querol?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120422 Thunderbird/12.0 MIME-Version: 1.0 To: FreeBSD current X-Scanned-By: MIMEDefang 2.70 on 147.83.2.244 X-Mail-Scanned: Criba 2.0 + Clamd X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (dash.upc.es [147.83.2.50]); Mon, 30 Apr 2012 16:12:55 +0200 (CEST) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: avilla@freebsd.org Subject: RFC: jemalloc: qdbus sigsegv in malloc_init X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 14:12:57 -0000 Hi, the kde team is seeing some strange problems with the new version (4.8.1) of devel/dbus-qt4 with current. It does work with stable. I also suspect that the problem described below is affecting the experimental cinnamon port (an alternative to gnome3, possible replacement of gnome2). The problem happens with both i386 and amd64 with empty /etc/malloc.conf and simple /etc/make.conf. Everything compiled with base gcc (no clang). The kernel was compiled with no debug support, but it can enable if needed. There are reports from avilla@freebsd.org of the same behavior with clang compiled world and kernel and with MALLOC_PRODUCTION=yes. When qdbus starts, it segfauts. The backtrace of the problem with r234769 can be found here: http://pastebin.com/ryBXtqGF. When starting the qdbus daemon by hand in a X+twm session, we see it calls calloc many times and after a fixed number of times segfaults. We see it segfaults at rb_gen (a quite large macro defined at $SRC_BASE/contrib/jemalloc/include/jemalloc/internal/rb.h). If the daemon is started by hand, I'm able to skip all the calls qdbus makes to calloc till the one causing the segfault. At that point, at rb_gen, we don't exactly know what is going on or how to debug the macro. Ktrace are available, but we were unable to find anything new from them. With old versions of current before the jemalloc imports (as of March 30th) the daemon segfaulted at malloc.c:2426. With revisions during April 20 to 24th (can be more precise, it was during the jemalloc imports) the daemon segfaulted at malloc_init. Bts are available if needed, and if necessary I can go back to those revision and recompile world+kernel to see its behavior. Any help from freebsd-current@ (perhaps Jason Evans can help us) will be appreciated. Any additional info, like source revisions, can be provided. I would like to stress that the experimental devel/dbus-qt4 works fine with recent stable. From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 17:10:56 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E2E4106564A; Mon, 30 Apr 2012 17:10:56 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by mx1.freebsd.org (Postfix) with ESMTP id F07FD8FC0C; Mon, 30 Apr 2012 17:10:55 +0000 (UTC) Received: by dadz14 with SMTP id z14so15646838dad.17 for ; Mon, 30 Apr 2012 10:10:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=bofnkMuoqQ19Z4pEHTi3WZmBeJdonDpNrwDXcl581wA=; b=ndRx2fTxpOrCR4dBsuVKWLuAtI7vMwE/Z2k4RnxMCcvjjHkaytxwgmEaATPx03+jf/ PF4Q5it4UNjg9bnoh1dsVTFedKffZjXM5ih0ZMtn+aLQ6IYX4qaP9igqq5Se3uUiyPfF QBt/LDtwAxsRngjujAxcmsiBK9ctFk56qsORom2YtYp2rqruBV7k/FY/8uhHdvVqzyM8 NT/URDopB6heIUhnVicmB6BYLXKpN9iTFymzqiISAu/C9I3WQ7+jyOGNleNQCReDHgzs FLHu/g5JhmwhrPW84chBSQu1dn20yChtu7u+Ra78DbB7LKebfqT/TV//m2ALJ/A8qsdL V/NQ== MIME-Version: 1.0 Received: by 10.68.224.167 with SMTP id rd7mr25973339pbc.129.1335805855824; Mon, 30 Apr 2012 10:10:55 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.101.9 with HTTP; Mon, 30 Apr 2012 10:10:55 -0700 (PDT) In-Reply-To: <4F9E9E06.4070004@entel.upc.edu> References: <4F9E9E06.4070004@entel.upc.edu> Date: Mon, 30 Apr 2012 10:10:55 -0700 X-Google-Sender-Auth: T3ymPggspnKo5RgVNEKKwWAsDWc Message-ID: From: Adrian Chadd To: =?ISO-8859-1?Q?Gustau_P=E9rez_i_Querol?= Content-Type: text/plain; charset=ISO-8859-1 Cc: avilla@freebsd.org, FreeBSD current Subject: Re: RFC: jemalloc: qdbus sigsegv in malloc_init X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 17:10:56 -0000 Hi, Please install valgrind and run the program inside valgrind. See what kind of errors it generates. Adrian From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 18:10:43 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2492106566B for ; Mon, 30 Apr 2012 18:10:43 +0000 (UTC) (envelope-from aorchid@mac.com) Received: from mho-01-ewr.mailhop.org (mho-01-ewr.mailhop.org [204.13.248.71]) by mx1.freebsd.org (Postfix) with ESMTP id 7574D8FC08 for ; Mon, 30 Apr 2012 18:10:43 +0000 (UTC) Received: from [149.142.103.17] (helo=freeenv.ad.medctr.ucla.edu) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.72) (envelope-from ) id 1SOv3a-0005KQ-Rd for freebsd-current@freebsd.org; Mon, 30 Apr 2012 18:10:43 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 149.142.103.17 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+SnD8hKenxDw5Bt3VEj+HQ Date: Mon, 30 Apr 2012 11:10:40 -0700 From: Aric Gregson To: freebsd-current@freebsd.org Message-ID: <20120430111040.412fdb04@freeenv.ad.medctr.ucla.edu> Organization: Slow Children at Play Productions X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Upgrade Paths X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: aorchid@mac.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 18:10:43 -0000 Hello, Apologies for this question, but I am not clear on how I can upgrade from 9.0-CURRENT (July 2011) to 9.0-RELEASE? Must I use CVS or can I use the freebsd-upgrade pathway? freebsd-upgrade is giving me an error, so I suspect that either I cannot use it or I must change some setting prior to its use. # freebsd-update -r 9.0-RELEASE upgrade Looking up update.FreeBSD.org mirrors... 4 mirrors found. Fetching public key from update5.FreeBSD.org... failed. Fetching public key from update4.FreeBSD.org... failed. Fetching public key from update3.FreeBSD.org... failed. Fetching public key from update2.FreeBSD.org... failed. No mirrors remaining, giving up. Thanks very much for any suggestions. Aric From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 18:43:19 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C9B91065672 for ; Mon, 30 Apr 2012 18:43:19 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 210228FC15 for ; Mon, 30 Apr 2012 18:43:18 +0000 (UTC) Received: by wgbds12 with SMTP id ds12so3032826wgb.31 for ; Mon, 30 Apr 2012 11:43:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=aTuUM4xIWR69EjM28nSzmP+MF6UvJVzWJFfJqBaGchI=; b=LrPoqEIS9RdgDpjkqiwJR4hu4BX1OTee+cUBeQahzGBnJpb2o8ohkmlI6W/wJoul4A F6sQu9hDcYIDbHndfE68ae3+BXI90UJMBa8IlbWmZmEzqU/71T1oHLJaKj/HVBYMot+R gGpEtydochn4Ajls04R0kRNWsC7sMUP0tnfpR7cSyPYcCHGYELeeNEOrlAAu6AORvsrt R55VgiERQx/xSbxbkpZKrReMDKZNB4/gEc+HENfO33ttTCcieVqLv7OKgxsQ5KYdptTq uOMkri9kKhzJXgIiCh9KrtZLQLqBtpXez64S2xAlaLoHM8labuwECOUISRRlqnYzsXOf sKpg== MIME-Version: 1.0 Received: by 10.216.134.136 with SMTP id s8mr13608544wei.6.1335811397039; Mon, 30 Apr 2012 11:43:17 -0700 (PDT) Received: by 10.223.143.22 with HTTP; Mon, 30 Apr 2012 11:43:16 -0700 (PDT) In-Reply-To: <20120430111040.412fdb04@freeenv.ad.medctr.ucla.edu> References: <20120430111040.412fdb04@freeenv.ad.medctr.ucla.edu> Date: Mon, 30 Apr 2012 11:43:16 -0700 Message-ID: From: Kevin Oberman To: aorchid@mac.com Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current@freebsd.org Subject: Re: Upgrade Paths X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 18:43:19 -0000 On Mon, Apr 30, 2012 at 11:10 AM, Aric Gregson wrote: > Hello, > > Apologies for this question, but I am not clear on how I can upgrade > from 9.0-CURRENT (July 2011) to 9.0-RELEASE? Must I use CVS or can I > use the freebsd-upgrade pathway? freebsd-upgrade is giving me an error, > so I suspect that either I cannot use it or I must change some setting > prior to its use. > > # freebsd-update -r 9.0-RELEASE upgrade > Looking up update.FreeBSD.org mirrors... 4 mirrors found. > Fetching public key from update5.FreeBSD.org... failed. > Fetching public key from update4.FreeBSD.org... failed. > Fetching public key from update3.FreeBSD.org... failed. > Fetching public key from update2.FreeBSD.org... failed. > No mirrors remaining, giving up. As freebsd-update depends on the existence of a system matching a release, it cannot be used when upgrading from any system that is not a RELEASE, so you will need to update your sources and follow the "standard" update procedure in /usr/src/UPDATING. You can update sources with svn, CVS or csup. The latter is probably the best choice if you don't update very often. -- R. Kevin Oberman, Network Engineer E-mail: kob6558@gmail.com From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 18:47:33 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 78ED01065670 for ; Mon, 30 Apr 2012 18:47:33 +0000 (UTC) (envelope-from aorchid@mac.com) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) by mx1.freebsd.org (Postfix) with ESMTP id 4841C8FC14 for ; Mon, 30 Apr 2012 18:47:33 +0000 (UTC) Received: from [149.142.103.17] (helo=freeenv.ad.medctr.ucla.edu) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.72) (envelope-from ) id 1SOvd8-000ENE-Rv; Mon, 30 Apr 2012 18:47:27 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 149.142.103.17 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+j8MGIDCMmZm202i5O3Vd7 Date: Mon, 30 Apr 2012 11:47:23 -0700 From: Aric Gregson To: Kevin Oberman Message-ID: <20120430114723.29d4c519@freeenv.ad.medctr.ucla.edu> In-Reply-To: References: <20120430111040.412fdb04@freeenv.ad.medctr.ucla.edu> Organization: Slow Children at Play Productions X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: Upgrade Paths X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: aorchid@mac.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 18:47:33 -0000 On Mon, 30 Apr 2012 11:43:16 -0700 Kevin Oberman wrote: [snip] > You can update sources with svn, CVS or csup. The latter is probably > the best choice if you don't update very often. Thank you for your reply. Aric From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 19:04:43 2012 Return-Path: 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 BEAF6106564A; Mon, 30 Apr 2012 19:04:43 +0000 (UTC) (envelope-from gonzo@hq.bluezbox.com) Received: from hq.bluezbox.com (hq.bluezbox.com [70.38.37.145]) by mx1.freebsd.org (Postfix) with ESMTP id 5F6B88FC08; Mon, 30 Apr 2012 19:04:43 +0000 (UTC) Received: from localhost ([127.0.0.1]) by hq.bluezbox.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.73 (FreeBSD)) (envelope-from ) id 1SOvte-000D9r-MB; Mon, 30 Apr 2012 12:04:31 -0700 Message-ID: <4F9EE24B.7050909@freebsd.org> Date: Mon, 30 Apr 2012 12:04:43 -0700 From: Oleksandr Tymoshenko User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120420 Thunderbird/12.0 MIME-Version: 1.0 To: Adrian Chadd References: <20120421185402.GH1743@albert.catwhisker.org> <7AD8956D-AD18-4CAB-9953-06E00185A7DA@freebsd.org> <20120428150941.e0464900.ray@dlink.ua> <20120428231703.374bc042.ray@dlink.ua> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: gonzo@hq.bluezbox.com X-Spam-Level: ---- X-Spam-Report: Spam detection software, running on the system "hq.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: On 29/04/2012 12:04 PM, Adrian Chadd wrote: > .. and the output from the buildworld: .. skipped .. > -DSOFTFLOAT_FOR_GCC -DYP -DNS_CACHING -DSYMBOL_VERSIONING -std=gnu99 > -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized > -Wno-pointer-sign -c jemalloc_jemalloc.c -o jemalloc_jemalloc.So > jemalloc_jemalloc.c: In function 'calloc': > jemalloc_jemalloc.c:1027: internal compiler error: in > change_address_1, at emit-rtl.c:1784 > Please submit a full bug report, > with preprocessed source if appropriate. > See for instructions. > *** Error code 1 > 1 error > *** Error code 2 > 1 error > *** Error code 2 > 1 error > *** Error code 2 > 1 error > *** Error code 2 > 1 error [...] Content analysis details: (-4.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Cc: Aleksandr Rybalko , Jason Evans , current@freebsd.org Subject: Re: : jemalloc_arena.c:182: Failed assertion: "p[i] == 0" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 19:04:44 -0000 On 29/04/2012 12:04 PM, Adrian Chadd wrote: > .. and the output from the buildworld: .. skipped .. > -DSOFTFLOAT_FOR_GCC -DYP -DNS_CACHING -DSYMBOL_VERSIONING -std=gnu99 > -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized > -Wno-pointer-sign -c jemalloc_jemalloc.c -o jemalloc_jemalloc.So > jemalloc_jemalloc.c: In function 'calloc': > jemalloc_jemalloc.c:1027: internal compiler error: in > change_address_1, at emit-rtl.c:1784 > Please submit a full bug report, > with preprocessed source if appropriate. > See for instructions. > *** Error code 1 > 1 error > *** Error code 2 > 1 error > *** Error code 2 > 1 error > *** Error code 2 > 1 error > *** Error code 2 > 1 error This ICE was fixed here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33256 Unfortunately the fix is GPLv3-licensed, so we can't merge it back as-is. I tracked down the cause of the issue to contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h line 214. So possible workaround could be replacing this line to #if defined(JEMALLOC_DEBUG) || defined(__mips__) Ugly, yes, but good enough as a band-aid until we figure out what to do with the real issue From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 19:34:31 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC63A106566B; Mon, 30 Apr 2012 19:34:31 +0000 (UTC) (envelope-from jasone@freebsd.org) Received: from canonware.com (10140.x.rootbsd.net [204.109.63.53]) by mx1.freebsd.org (Postfix) with ESMTP id 994038FC08; Mon, 30 Apr 2012 19:34:31 +0000 (UTC) Received: from [172.25.16.174] (unknown [173.252.71.3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by canonware.com (Postfix) with ESMTPSA id E059A28416; Mon, 30 Apr 2012 12:34:24 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=iso-8859-1 From: Jason Evans In-Reply-To: <4F9E9E06.4070004@entel.upc.edu> Date: Mon, 30 Apr 2012 12:34:32 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <2D080258-652B-4EFA-8F6F-6ECA3CA4404B@freebsd.org> References: <4F9E9E06.4070004@entel.upc.edu> To: =?iso-8859-1?Q?Gustau_P=E9rez_i_Querol?= X-Mailer: Apple Mail (2.1257) Cc: avilla@freebsd.org, FreeBSD current Subject: Re: RFC: jemalloc: qdbus sigsegv in malloc_init X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 19:34:31 -0000 On Apr 30, 2012, at 7:13 AM, Gustau P=E9rez i Querol wrote: > the kde team is seeing some strange problems with the new version = (4.8.1) of devel/dbus-qt4 with current. It does work with stable. I also = suspect that the problem described below is affecting the experimental = cinnamon port (an alternative to gnome3, possible replacement of = gnome2). >=20 > The problem happens with both i386 and amd64 with empty = /etc/malloc.conf and simple /etc/make.conf. Everything compiled with = base gcc (no clang). The kernel was compiled with no debug support, but = it can enable if needed. There are reports from avilla@freebsd.org of = the same behavior with clang compiled world and kernel and with = MALLOC_PRODUCTION=3Dyes. >=20 > When qdbus starts, it segfauts. The backtrace of the problem with = r234769 can be found here: http://pastebin.com/ryBXtqGF. When starting = the qdbus daemon by hand in a X+twm session, we see it calls calloc many = times and after a fixed number of times segfaults. We see it segfaults = at rb_gen (a quite large macro defined at = $SRC_BASE/contrib/jemalloc/include/jemalloc/internal/rb.h). >=20 > If the daemon is started by hand, I'm able to skip all the calls qdbus = makes to calloc till the one causing the segfault. At that point, at = rb_gen, we don't exactly know what is going on or how to debug the = macro. Ktrace are available, but we were unable to find anything new = from them. >=20 > With old versions of current before the jemalloc imports (as of March = 30th) the daemon segfaulted at malloc.c:2426. With revisions during = April 20 to 24th (can be more precise, it was during the jemalloc = imports) the daemon segfaulted at malloc_init. Bts are available if = needed, and if necessary I can go back to those revision and recompile = world+kernel to see its behavior. >=20 > Any help from freebsd-current@ (perhaps Jason Evans can help us) will = be appreciated. Any additional info, like source revisions, can be = provided. I would like to stress that the experimental devel/dbus-qt4 = works fine with recent stable. The crash is happening in page run management, so there is some pretty = bad memory corruption going on by the time of the crash. If I = understand you correctly, you have reproduced the crash on a system that = does *not* have MALLOC_PRODUCTION defined, which means that none of the = assertions in jemalloc caught the problem. Adrian Chadd made the excellent suggestion of trying valgrind; it's = likely to point out the problem almost immediately. If that doesn't = work, the utrace functionality in malloc may help you figure out what = activity has occurred by the time of the crash, and give you a better = understanding of what happened to memory around the address that is = involved in the crash. Jason= From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 20:52:54 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B28A3106566C for ; Mon, 30 Apr 2012 20:52:54 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm21.bullet.mail.sp2.yahoo.com (nm21.bullet.mail.sp2.yahoo.com [98.139.91.91]) by mx1.freebsd.org (Postfix) with SMTP id 868218FC12 for ; Mon, 30 Apr 2012 20:52:54 +0000 (UTC) Received: from [98.139.91.63] by nm21.bullet.mail.sp2.yahoo.com with NNFMP; 30 Apr 2012 20:52:54 -0000 Received: from [208.71.42.201] by tm3.bullet.mail.sp2.yahoo.com with NNFMP; 30 Apr 2012 20:52:54 -0000 Received: from [127.0.0.1] by smtp212.mail.gq1.yahoo.com with NNFMP; 30 Apr 2012 20:52:54 -0000 X-Yahoo-Newman-Id: 60262.16066.bm@smtp212.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: sTxTGOMVM1nC8Y3PNMW0qKh.4xWTabsWzIwxZN0Sd42zN.F tZ9ewafn3l7LOzdmDZNpzyTSuKuZQm0b9LRNPtep0rNRIikKAbPj3rKsvtQ4 3.sRizhY1MusTE2Agr7N8gRAouIdKI1m3mJyU9Yt_P10bX4kTa8ZGk_xy9xG YoO_OSSYMP_95Nbef0ALjKst66sb3HkiRAisUtRYpb0ABtg_JjgO8uBj_6tU 5RKfwrdW79.1iSyXvfVmX5teIc_xDF9o98OgdPHQaPYgDps7gCN1ZVQ9DF81 S4tykRo5lv61Lg8QJ0d4VENnWBtqj7CL.cABE2nK2E8ZF0nQR_PTlnmVOIxZ XRckslQ6YWiVYnzpuqYdyuIYgFQ6ZbbVV720JSiBLpDs5bbnq2YJKUmPx5VJ 2MD7QaXP_8GQnneWZPG9FRW.G03IFevMHQbmSnpM4iy19O.rdu0EZe4QkaA. uLnFHGiwrZ30c4_Ql3hnCNsTgFpCmmf3eSTJj1WkImmpJPRTSWNXe2sAN2.. R8ZlaLbYJ3iekxEtfXrz3tcOyqY7rJMPKi0M0ErBvBATEw9Fl_u3d9w-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Received: from [192.168.10.103] (pfg@200.118.157.7 with plain) by smtp212.mail.gq1.yahoo.com with SMTP; 30 Apr 2012 13:52:53 -0700 PDT Message-ID: <4F9EFBA3.7000206@FreeBSD.org> Date: Mon, 30 Apr 2012 15:52:51 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120328 Thunderbird/10.0.3 MIME-Version: 1.0 To: freebsd-current@freebsd.org References: <20120421185402.GH1743@albert.catwhisker.org> <7AD8956D-AD18-4CAB-9953-06E00185A7DA@freebsd.org> <20120428150941.e0464900.ray@dlink.ua> <20120428231703.374bc042.ray@dlink.ua> <4F9EE24B.7050909@freebsd.org> In-Reply-To: <4F9EE24B.7050909@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: gonzo@freebsd.org, mm@FreeBSD.org Subject: Re: : jemalloc_arena.c:182: Failed assertion: "p[i] == 0" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 20:52:54 -0000 On 04/30/12 14:04, Oleksandr Tymoshenko wrote: > On 29/04/2012 12:04 PM, Adrian Chadd wrote: >> .. and the output from the buildworld: > > .. skipped .. > >> -DSOFTFLOAT_FOR_GCC -DYP -DNS_CACHING -DSYMBOL_VERSIONING -std=gnu99 >> -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized >> -Wno-pointer-sign -c jemalloc_jemalloc.c -o jemalloc_jemalloc.So >> jemalloc_jemalloc.c: In function 'calloc': >> jemalloc_jemalloc.c:1027: internal compiler error: in >> change_address_1, at emit-rtl.c:1784 >> Please submit a full bug report, >> with preprocessed source if appropriate. >> See for instructions. >> *** Error code 1 >> 1 error >> *** Error code 2 >> 1 error >> *** Error code 2 >> 1 error >> *** Error code 2 >> 1 error >> *** Error code 2 >> 1 error > > This ICE was fixed here: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33256 > Unfortunately the fix is GPLv3-licensed, so we can't merge it > back as-is. > Actually.. the fix was merged to the gcc 4.1 branch so we can take it under GPLv2: http://gcc.gnu.org/viewcvs?view=revision&revision=128198 best regards, Pedro. From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 21:51:46 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D280A106566C; Mon, 30 Apr 2012 21:51:46 +0000 (UTC) (envelope-from gonzo@hq.bluezbox.com) Received: from hq.bluezbox.com (hq.bluezbox.com [70.38.37.145]) by mx1.freebsd.org (Postfix) with ESMTP id 6B0BB8FC0C; Mon, 30 Apr 2012 21:51:46 +0000 (UTC) Received: from localhost ([127.0.0.1]) by hq.bluezbox.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.73 (FreeBSD)) (envelope-from ) id 1SOyVJ-000EEI-LU; Mon, 30 Apr 2012 14:51:34 -0700 Message-ID: <4F9F0971.3070400@freebsd.org> Date: Mon, 30 Apr 2012 14:51:45 -0700 From: Oleksandr Tymoshenko User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120420 Thunderbird/12.0 MIME-Version: 1.0 To: Pedro Giffuni References: <20120421185402.GH1743@albert.catwhisker.org> <7AD8956D-AD18-4CAB-9953-06E00185A7DA@freebsd.org> <20120428150941.e0464900.ray@dlink.ua> <20120428231703.374bc042.ray@dlink.ua> <4F9EE24B.7050909@freebsd.org> <4F9EFBA3.7000206@FreeBSD.org> In-Reply-To: <4F9EFBA3.7000206@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: gonzo@hq.bluezbox.com X-Spam-Level: ---- X-Spam-Report: Spam detection software, running on the system "hq.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: On 30/04/2012 1:52 PM, Pedro Giffuni wrote: > On 04/30/12 14:04, Oleksandr Tymoshenko wrote: >> On 29/04/2012 12:04 PM, Adrian Chadd wrote: >>> .. and the output from the buildworld: >> >> .. skipped .. >> >>> -DSOFTFLOAT_FOR_GCC -DYP -DNS_CACHING -DSYMBOL_VERSIONING -std=gnu99 >>> -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized >>> -Wno-pointer-sign -c jemalloc_jemalloc.c -o jemalloc_jemalloc.So >>> jemalloc_jemalloc.c: In function 'calloc': >>> jemalloc_jemalloc.c:1027: internal compiler error: in >>> change_address_1, at emit-rtl.c:1784 >>> Please submit a full bug report, >>> with preprocessed source if appropriate. >>> See for instructions. >>> *** Error code 1 >>> 1 error >>> *** Error code 2 >>> 1 error >>> *** Error code 2 >>> 1 error >>> *** Error code 2 >>> 1 error >>> *** Error code 2 >>> 1 error >> >> This ICE was fixed here: >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33256 >> Unfortunately the fix is GPLv3-licensed, so we can't merge it >> back as-is. >> > > Actually.. the fix was merged to the gcc 4.1 branch > so we can take it under GPLv2: > > http://gcc.gnu.org/viewcvs?view=revision&revision=128198 [...] Content analysis details: (-4.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Cc: freebsd-current@freebsd.org, mm@FreeBSD.org Subject: Re: : jemalloc_arena.c:182: Failed assertion: "p[i] == 0" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 21:51:47 -0000 On 30/04/2012 1:52 PM, Pedro Giffuni wrote: > On 04/30/12 14:04, Oleksandr Tymoshenko wrote: >> On 29/04/2012 12:04 PM, Adrian Chadd wrote: >>> .. and the output from the buildworld: >> >> .. skipped .. >> >>> -DSOFTFLOAT_FOR_GCC -DYP -DNS_CACHING -DSYMBOL_VERSIONING -std=gnu99 >>> -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized >>> -Wno-pointer-sign -c jemalloc_jemalloc.c -o jemalloc_jemalloc.So >>> jemalloc_jemalloc.c: In function 'calloc': >>> jemalloc_jemalloc.c:1027: internal compiler error: in >>> change_address_1, at emit-rtl.c:1784 >>> Please submit a full bug report, >>> with preprocessed source if appropriate. >>> See for instructions. >>> *** Error code 1 >>> 1 error >>> *** Error code 2 >>> 1 error >>> *** Error code 2 >>> 1 error >>> *** Error code 2 >>> 1 error >>> *** Error code 2 >>> 1 error >> >> This ICE was fixed here: >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33256 >> Unfortunately the fix is GPLv3-licensed, so we can't merge it >> back as-is. >> > > Actually.. the fix was merged to the gcc 4.1 branch > so we can take it under GPLv2: > > http://gcc.gnu.org/viewcvs?view=revision&revision=128198 Thanks, Pedro! It's GPLv2 indeed. I missed it yesterday. Will commit. From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 21:56:40 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 87098106566B; Mon, 30 Apr 2012 21:56:40 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mail.vx.sk (mail.vx.sk [176.9.45.25]) by mx1.freebsd.org (Postfix) with ESMTP id 05DEB8FC08; Mon, 30 Apr 2012 21:56:40 +0000 (UTC) Received: from core2.vx.sk (localhost [127.0.0.2]) by mail.vx.sk (Postfix) with ESMTP id A03B42C670; Mon, 30 Apr 2012 23:56:38 +0200 (CEST) X-Virus-Scanned: amavisd-new at mail.vx.sk Received: from mail.vx.sk by core2.vx.sk (amavisd-new, unix socket) with LMTP id lmd3DWtHIDpQ; Mon, 30 Apr 2012 23:56:36 +0200 (CEST) Received: from ip-46.34.254.105.o2inet.sk (ip-46.34.254.105.o2inet.sk [46.34.254.105]) by mail.vx.sk (Postfix) with ESMTPSA id 8435B2C656; Mon, 30 Apr 2012 23:56:32 +0200 (CEST) References: <20120421185402.GH1743@albert.catwhisker.org> <7AD8956D-AD18-4CAB-9953-06E00185A7DA@freebsd.org> <20120428150941.e0464900.ray@dlink.ua> <20120428231703.374bc042.ray@dlink.ua> <4F9EE24B.7050909@freebsd.org> <4F9EFBA3.7000206@FreeBSD.org> User-Agent: K-9 Mail for Android In-Reply-To: <4F9EFBA3.7000206@FreeBSD.org> MIME-Version: 1.0 From: =?UTF-8?Q?Martin_Matu=C5=A1ka?= Date: Mon, 30 Apr 2012 23:56:13 +0200 To: Pedro Giffuni ,freebsd-current@freebsd.org Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: gonzo@freebsd.org Subject: Re: : jemalloc_arena.c:182: Failed assertion: "p[i] == 0" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 21:56:40 -0000 Feel free to import this change referencing this explicit gcc-4_1-branch revision as source and mentioning the GPLv2 license. -- Martin MatuÅ¡ka FreeBSD commiter http://blog.vx.sk Pedro Giffuni wrote: On 04/30/12 14:04, Oleksandr Tymoshenko wrote: > On 29/04/2012 12:04 PM, Adrian Chadd wrote: >> .. and the output from the buildworld: > > .. skipped .. > >> -DSOFTFLOAT_FOR_GCC -DYP -DNS_CACHING -DSYMBOL_VERSIONING -std=gnu99 >> -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized >> -Wno-pointer-sign -c jemalloc_jemalloc.c -o jemalloc_jemalloc.So >> jemalloc_jemalloc.c: In function 'calloc': >> jemalloc_jemalloc.c:1027: internal compiler error: in >> change_address_1, at emit-rtl.c:1784 >> Please submit a full bug report, >> with preprocessed source if appropriate. >> See; for instructions. >> *** Error code 1 >> 1 error >> *** Error code 2 >> 1 error >> *** Error code 2 >> 1 error >> *** Error code 2 >> 1 error >> *** Error code 2 >> 1 error > > This ICE was fixed here: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33256 > Unfortunately the fix is GPLv3-licensed, so we can't merge it > back as-is. > Actually.. the fix was merged to the gcc 4.1 branch so we can take it under GPLv2: http://gcc.gnu.org/viewcvs?view=revision&revision=128198 best regards, Pedro. _____________________________________________ 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-current@FreeBSD.ORG Mon Apr 30 22:54:39 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E0933106564A; Mon, 30 Apr 2012 22:54:39 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id B9CD78FC08; Mon, 30 Apr 2012 22:54:39 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.5/8.14.5) with ESMTP id q3UMsd34006363; Mon, 30 Apr 2012 15:54:39 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.5/8.14.5/Submit) id q3UMscdx006362; Mon, 30 Apr 2012 15:54:38 -0700 (PDT) (envelope-from obrien) Date: Mon, 30 Apr 2012 15:54:38 -0700 From: "David O'Brien" To: Bob Bishop Message-ID: <20120430225438.GB60636@dragon.NUXI.org> Mail-Followup-To: obrien@freebsd.org, Bob Bishop , Konstantin Belousov , toolchain@freebsd.org, freebsd-current@freebsd.org References: <20120426093548.GR2358@deviant.kiev.zoral.com.ua> <5BCE2E77-2B45-43B7-AB1F-6E6C13B87B34@gid.co.uk> <20120428031212.GE80419@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Konstantin Belousov , toolchain@freebsd.org, freebsd-current@freebsd.org Subject: Re: [RFC] Un-staticise the toolchain X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 22:54:40 -0000 On Sat, Apr 28, 2012 at 11:03:17AM +0100, Bob Bishop wrote: > Yes. You to have a statically linked /rescue/sh on board, so what's the > point of /bin/sh being dynamic? While you and I agree on this, the primary reason we went with a dynamically linked root was for PAM and NSS support -- which are dlopen'ed. And thus requires using a shared libc. -- -- David (obrien@FreeBSD.org) From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 22:59:22 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F039F1065670 for ; Mon, 30 Apr 2012 22:59:22 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id C80D28FC14 for ; Mon, 30 Apr 2012 22:59:22 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.5/8.14.5) with ESMTP id q3UMxMLY006436; Mon, 30 Apr 2012 15:59:22 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.5/8.14.5/Submit) id q3UMxLkH006435; Mon, 30 Apr 2012 15:59:21 -0700 (PDT) (envelope-from obrien) Date: Mon, 30 Apr 2012 15:59:21 -0700 From: "David O'Brien" To: Vladimir Sharun Message-ID: <20120430225921.GC60636@dragon.NUXI.org> Mail-Followup-To: obrien@freebsd.org, Vladimir Sharun , Current FreeBSD References: <4F9428ED.6060902@FreeBSD.org> <9B9312D3-489E-4EF1-85CB-0353024F6B94@gmail.com> <3862F1CA-C1C8-49E6-B768-114A0A212496@gmail.com> <4F915384.6070308@semihalf.com> <4F919C50.70809@FreeBSD.org> <20120424175735.GC80419@dragon.NUXI.org> <18628.1335292498.18396666118269960192@front-ffe4.ukr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18628.1335292498.18396666118269960192@front-ffe4.ukr.net> X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Current FreeBSD Subject: Re: buildworld fails on FreeBSD 7.x for HEAD from 19.04.2012 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 22:59:23 -0000 On Tue, Apr 24, 2012 at 09:34:58PM +0300, Vladimir Sharun wrote: > ===> usr.bin/file (all) ... > file.o: In function `main': > /usr/src/usr.bin/file/../../contrib/file/file.c:(.text+0x717): undefined > reference to `magic_getpath' > /usr/src/usr.bin/file/../../contrib/file/file.c:(.text+0x7df): undefined > reference to `magic_list' > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > *** [file] Error code 1 How are you building this? Did libmagic get [re]built first? > r234657 $ svn info -r234657 svn info -r234657 svn://svn.freebsd.org/base/head Last Changed Date: 2012-04-24 10:51:36 -0700 (Tue, 24 Apr 2012) I do not believe that a 10-CURRENT system from 2012-04-24 has trouble building the new file(1). The issue that started this thread is due to a commit from 2009-02-27 -- which pre-dates 10-CURRENT. -- -- David (obrien@FreeBSD.org) From owner-freebsd-current@FreeBSD.ORG Tue May 1 00:24:45 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AE2E01065673 for ; Tue, 1 May 2012 00:24:45 +0000 (UTC) (envelope-from shesha@juniper.net) Received: from exprod7og122.obsmtp.com (exprod7og122.obsmtp.com [64.18.2.22]) by mx1.freebsd.org (Postfix) with ESMTP id 5C1CD8FC12 for ; Tue, 1 May 2012 00:24:45 +0000 (UTC) Received: from P-EMHUB01-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob122.postini.com ([64.18.6.12]) with SMTP ID DSNKT58tRwnuRl8rRTlH+8aKkzeEvL9MdS25@postini.com; Mon, 30 Apr 2012 17:24:45 PDT Received: from EMBX01-HQ.jnpr.net ([fe80::c821:7c81:f21f:8bc7]) by P-EMHUB01-HQ.jnpr.net ([fe80::fc92:eb1:759:2c72%11]) with mapi; Mon, 30 Apr 2012 17:21:58 -0700 From: Shesha Sreenivasamurthy To: "current@FreeBSD.org" Date: Mon, 30 Apr 2012 17:21:59 -0700 Thread-Topic: Sparse option for makefs Thread-Index: Ac0nMGvFbDNWkQjwThio0CM8h8/5Vg== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.2.1.120420 acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 01 May 2012 01:54:30 +0000 Cc: Marcel Moolenaar Subject: Sparse option for makefs X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2012 00:24:45 -0000 Hi, I have added a sparse option to makefs, where the tool does not fill the file with zeros, before laying out the data on it. This is handy when we are creating a VM image because, 1. It reduces the creation time significantly. 2. Copying around is less time consuming (Tools like rsync and cp can deal efficiently with sparse files) 3. Easily fits the image into a CD without additional processing like 'cp --sparse=3DAlways' etc. Please see if this can be made a part of main tree. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D *** ../9/usr/src/usr.sbin/makefs/makefs.c 2012-01-02 19:25:41.000000000 -0800 --- usr/src/usr.sbin/makefs/makefs.c 2012-04-22 22:38:49.000000000 -0700 *************** *** 112,118 **** start_time.tv_sec =3D start.tv_sec; start_time.tv_nsec =3D start.tv_usec * 1000; =20 ! while ((ch =3D getopt(argc, argv, "B:b:d:f:F:M:m:N:o:s:S:t:x")) != =3D -1) { switch (ch) { =20 case 'B': --- 112,118 ---- start_time.tv_sec =3D start.tv_sec; start_time.tv_nsec =3D start.tv_usec * 1000; =20 ! while ((ch =3D getopt(argc, argv, "B:b:d:f:F:M:m:N:o:s:S:t:xp")) != =3D -1) { switch (ch) { =20 case 'B': *************** *** 224,230 **** case 'x': fsoptions.onlyspec =3D 1; break; !=20 case '?': default: usage(); --- 224,232 ---- case 'x': fsoptions.onlyspec =3D 1; break; ! case 'p': ! fsoptions.sparse =3D 1; ! break; case '?': default: usage(); *************** *** 335,341 **** fprintf(stderr, "usage: %s [-t fs-type] [-o fs-options] [-d debug-mask] [-B endian]\n" "\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-s image-size]\n" ! "\t[-b free-blocks] [-f free-files] [-F mtree-specfile] [-x]\n" "\t[-N userdb-dir] image-file directory | manifest\n", prog); exit(1); --- 337,343 ---- fprintf(stderr, "usage: %s [-t fs-type] [-o fs-options] [-d debug-mask] [-B endian]\n" "\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-s image-size]\n" ! "\t[-b free-blocks] [-f free-files] [-F mtree-specfile] [-x] [-p sparse]\n" "\t[-N userdb-dir] image-file directory | manifest\n", prog); exit(1); *** ../9/usr/src/usr.sbin/makefs/makefs.h 2012-01-02 19:25:41.000000000 -0800 --- usr/src/usr.sbin/makefs/makefs.h 2012-04-22 22:49:25.000000000 -0700 *************** *** 127,132 **** --- 127,133 ---- int freeblockpc; /* free block % */ int needswap; /* non-zero if byte swapping needed */ int sectorsize; /* sector size */ + int sparse; /* sparse image, don't fill it with zeros */ =20 void *fs_specific; /* File system specific additions. */ } fsinfo_t; *** ../9/usr/src/usr.sbin/makefs/ffs.c 2012-01-02 19:25:41.000000000 -0800 --- usr/src/usr.sbin/makefs/ffs.c 2012-04-30 16:06:01.715365000 -0700 *************** *** 493,498 **** --- 493,508 ---- bufsize =3D sfs.f_iosize; #endif bufrem =3D fsopts->size; +=20 + if (fsopts->sparse) { + if (lseek(fsopts->fd, bufrem - bufsize, SEEK_SET) =3D=3D -1= ) { + printf ("ERROR in lseek. Sparse option disabled\n"); + fsopts->sparse =3D 0; + } else { + bufrem =3D bufsize; /* Seek to end and write one block */ + } + } +=20 if (debug & DEBUG_FS_CREATE_IMAGE) printf( "zero-ing image `%s', %lld sectors, using %d byte chunks\n", =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -- Thanks, Sh=E9sha (uint64_t cache, uint16_t FOOD) { return 0XCODE; } From owner-freebsd-current@FreeBSD.ORG Tue May 1 05:52:56 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BC761065670 for ; Tue, 1 May 2012 05:52:56 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id 22CEC8FC1E for ; Tue, 1 May 2012 05:52:56 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id q415qaAk007710; Tue, 1 May 2012 05:52:37 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.143] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id 86z7a8ju58igtiq3iqu43a3m62; Tue, 01 May 2012 05:52:36 +0000 (UTC) (envelope-from tim@kientzle.com) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=windows-1252 From: Tim Kientzle In-Reply-To: <42D8809D-0E99-47A5-802F-71991B5B0B8D@cederstrand.dk> Date: Mon, 30 Apr 2012 22:52:35 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20120426093548.GR2358@deviant.kiev.zoral.com.ua> <20120426134140.GF14350@lo0.su> <4F99ACF9.2050609@infracaninophile.co.uk> <42D8809D-0E99-47A5-802F-71991B5B0B8D@cederstrand.dk> To: Erik Cederstrand X-Mailer: Apple Mail (2.1257) Cc: freebsd-current FreeBSD Subject: Re: [RFC] Un-staticise the toolchain X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2012 05:52:56 -0000 On Apr 30, 2012, at 6:41 AM, Erik Cederstrand wrote: >=20 > Can anyone explain to me why the dynamically linked version is = significantly slower? What are the extra steps involved compared to a = statically linked binary? At the risk of dramatically over-simplifying=85. When a static binary is started by the kernel, it does the following: * Initializes some libc internals. * Calls main. When a dynamic binary is started by the kernel, it does the following: * Initializes some libc internals. * For every dynamic library referenced by this executable: - loads the dynamic library into memory - fixes up references * Calls main The process of loading the required libraries and fixing up references can be quite time-consuming. Cheers, Tim From owner-freebsd-current@FreeBSD.ORG Tue May 1 07:10:28 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1173A10656EE for ; Tue, 1 May 2012 07:10:28 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id B75CB8FC15 for ; Tue, 1 May 2012 07:10:27 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1SP7E5-0002fM-44>; Tue, 01 May 2012 09:10:21 +0200 Received: from e178014238.adsl.alicedsl.de ([85.178.14.238] helo=thor.walstatt.dyndns.org) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1SP7E4-0001Zn-Ux>; Tue, 01 May 2012 09:10:21 +0200 Message-ID: <4F9F8C56.10206@zedat.fu-berlin.de> Date: Tue, 01 May 2012 09:10:14 +0200 From: "O. Hartmann" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120430 Thunderbird/12.0 MIME-Version: 1.0 To: =?ISO-8859-15?Q?Jean-S=E9bastien_P=E9dron?= References: <4F9D1DF8.20001@zedat.fu-berlin.de> <4F9D317D.40609@FreeBSD.org> <4F9E2D20.4010300@zedat.fu-berlin.de> <4F9E7B11.3060901@dumbbell.fr> In-Reply-To: <4F9E7B11.3060901@dumbbell.fr> X-Enigmail-Version: 1.5pre Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigE39AD30D8AE108769F267DFF" X-Originating-IP: 85.178.14.238 Cc: freebsd-current@freebsd.org Subject: Re: lang/gcc46: error when compiling with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2012 07:10:28 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE39AD30D8AE108769F267DFF Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Am 04/30/12 13:44, schrieb Jean-S=E9bastien P=E9dron: > On 30.04.2012 08:11, O. Hartmann wrote: >> Repeating the build ends up at the same "stage" as it stopped when >> building on regular basis - for my understanding. >=20 > You say you have two boxes running 10-CURRENT: do they run the same > SVN revision? A recent change (r234585, 2012-04-22) in libc causes > several softwares to segfault if the libc is built with clang. >=20 > I just committed to HEAD (r234836) a patch that fixes this. Maybe it's > related to your problem, you may want to try it. After the patch, gcc 4.7 build well as expected. Thanks, Oliver --------------enigE39AD30D8AE108769F267DFF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJPn4xcAAoJEOgBcD7A/5N8MJYIAOmK8loUg0Xf2aRjk/CM7R0z Ew6+i9lcc7eFszCfhbuAP+jGGMqRn4D/ZWatqKuk3nYNe9oaIstw78C1Bcbg+F9H VkgLUQjPgvN0nbIdi1LW6ejHHw6o7B/DWZEgYRnxoUB6ZuAK0jgJWW5mqHGbchX0 mK4x64LH3FDw8AEx/+3hZG7EVY0W7RYizZ8gS3nzPJnKa/IVxF+BGrfd3fttJWrU JOF3THsLUukAR1AV85BS0qn9ikqusaL+AOJF0G/B6B/LLZQkyrEhc0vFt06C+jkS ytpHrCtJ3BaZR8ACimzaHEAc4bQlGGD/O20uoobNwYG4QmvC/9lO5mw1S1e0Dbg= =lp7f -----END PGP SIGNATURE----- --------------enigE39AD30D8AE108769F267DFF-- From owner-freebsd-current@FreeBSD.ORG Tue May 1 11:35:30 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 031A2106566B; Tue, 1 May 2012 11:35:30 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id 52E8B8FC08; Tue, 1 May 2012 11:35:29 +0000 (UTC) Received: from ncsc.bris.ac.uk ([137.222.10.41]) by dirg.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1SPBMd-0001Oa-T7; Tue, 01 May 2012 12:35:28 +0100 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncsc.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1SPBMc-0001j6-IC; Tue, 01 May 2012 12:35:27 +0100 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5) with ESMTP id q41BZQRM004762; Tue, 1 May 2012 12:35:26 +0100 (BST) (envelope-from mexas@bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5/Submit) id q41BZQXr004761; Tue, 1 May 2012 12:35:26 +0100 (BST) (envelope-from mexas@bris.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bris.ac.uk using -f Date: Tue, 1 May 2012 12:35:26 +0100 From: Anton Shterenlikht To: John Baldwin Message-ID: <20120501113526.GA4735@mech-cluster241.men.bris.ac.uk> Mail-Followup-To: John Baldwin , Anton Shterenlikht , freebsd-current@freebsd.org References: <20120426224215.GA79891@mech-cluster241.men.bris.ac.uk> <201204270751.11885.jhb@freebsd.org> <20120428172021.GA92264@mech-cluster241.men.bris.ac.uk> <201204300843.14636.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201204300843.14636.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@freebsd.org, Anton Shterenlikht Subject: Re: updating from r231158 to 234465: mounting from ufs:/dev/ad4s1a failed with error 19 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2012 11:35:30 -0000 On Mon, Apr 30, 2012 at 08:43:14AM -0400, John Baldwin wrote: > > > > I also see: > > > > ata0: stat0=0x00 err=0x01 lsb=0x14 msb=0exb > > ata0: stat1=0x00 err=0x00 lsb=0x00 msb=0x00 > > ata0: reset tp2 stat0=00 stat1=00 devices=0x10000 > > Hmmm, I don't know how to grok these lines, but does your disk work at all now > with any kernel? It may be that your disk has died (or a cable, etc.) and it > just happened to coincide with your upgrade? I reverted back to r231158, built world and generic kernel (minus all modules, i.e. "option MODULES_OVERRIDE="). This works, see the verbose boot dmesg at the end. I think I'll just do a binary search. Many thanks *********************************************** Table 'FACP' at 0xb7fc8084 Table 'SLIC' at 0xb7fc8220 Table 'EPTH' at 0xb7fc8398 Table 'APIC' at 0xb7fc83d0 APIC: Found table at 0xb7fc83d0 APIC: Using the MADT enumerator. MADT: Found CPU APIC ID 0 ACPI ID 1: enabled SMP: Added CPU 0 (AP) MADT: Found CPU APIC ID 1 ACPI ID 2: enabled SMP: Added CPU 1 (AP) Copyright (c) 1992-2012 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 9.9-CURRENT #9 r231158M: Tue May 1 12:13:45 BST 2012 root@:/usr/obj/usr/src/sys/GEN amd64 WARNING: WITNESS option enabled, expect reduced performance. Preloaded elf kernel "/boot/kernel/kernel" at 0xffffffff81660000. Calibrating TSC clock ... TSC clock: 1994986478 Hz CPU: AMD Turion(tm) 64 X2 Mobile Technology TL-60 (1994.99-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0x60f82 Family = f Model = 68 Stepping = 2 Features=0x178bfbff Features2=0x2001 AMD Features=0xea500800 AMD Features2=0x11f L1 2MB data TLB: 8 entries, fully associative L1 2MB instruction TLB: 8 entries, fully associative L1 4KB data TLB: 32 entries, fully associative L1 4KB instruction TLB: 32 entries, fully associative L1 data cache: 64 kbytes, 64 bytes/line, 1 lines/tag, 2-way associative L1 instruction cache: 64 kbytes, 64 bytes/line, 1 lines/tag, 2-way associative L2 2MB unified TLB: 0 entries, disabled/not present L2 4KB data TLB: 512 entries, 4-way associative L2 4KB instruction TLB: 512 entries, 4-way associative L2 unified cache: 512 kbytes, 64 bytes/line, 1 lines/tag, 16-way associative real memory = 3221225472 (3072 MB) Physical memory chunk(s): 0x0000000000001000 - 0x000000000009bfff, 634880 bytes (155 pages) 0x0000000000100000 - 0x00000000001fffff, 1048576 bytes (256 pages) 0x000000000168f000 - 0x00000000b28ecfff, 2972049408 bytes (725598 pages) avail memory = 2950324224 (2813 MB) Event timer "LAPIC" quality 400 ACPI APIC Table: INTR: Adding local APIC 1 as a target FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs FreeBSD/SMP: 1 package(s) x 2 core(s) cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 x86bios: IVT 0x000000-0x0004ff at 0xfffffe0000000000 x86bios: SSEG 0x001000-0x001fff at 0xffffff8000210000 x86bios: EBDA 0x09f000-0x09ffff at 0xfffffe000009f000 x86bios: ROM 0x0a0000-0x0fefff at 0xfffffe00000a0000 APIC: CPU 0 has ACPI ID 1 APIC: CPU 1 has ACPI ID 2 ULE: setup cpu 0 ULE: setup cpu 1 ACPI: RSDP 0xfe0b0 00024 (v02 HP ) ACPI: XSDT 0xb7fc81bc 00064 (v01 HPQOEM SLIC-MPC 00000001 HP 00000001) ACPI: FACP 0xb7fc8084 000F4 (v04 HP 0944 00000003 HP 00000001) ACPI Error: 32/64X address mismatch in Pm2ControlBlock: 0x00008800/0x0000000000008100, using 32 (20120111/tbfadt-471) ACPI: DSDT 0xb7fc84a4 11437 (v01 HP SB400 00010000 MSFT 03000001) ACPI: FACS 0xb7fe7d80 00040 ACPI: SLIC 0xb7fc8220 00176 (v01 HPQOEM SLIC-MPC 00000001 HP 00000001) ACPI: EPTH 0xb7fc8398 00038 (v01 HP 0944 00000001 HP 00000001) ACPI: APIC 0xb7fc83d0 00062 (v01 HP 0944 00000001 HP 00000001) ACPI: MCFG 0xb7fc8434 0003C (v01 HP 0944 00000001 HP 00000001) ACPI: TCPA 0xb7fc8470 00032 (v02 HP 0944 00000001 HP 00000001) ACPI: SSDT 0xb7fd98db 00059 (v01 HP HPQNLP 00000001 MSFT 03000001) ACPI: SSDT 0xb7fd9934 00206 (v01 HP PSSTBLID 00000001 HP 00000001) MADT: Found IO APIC ID 2, Interrupt 0 at 0xfec00000 ioapic0: Changing APIC ID to 2 ioapic0: Routing external 8259A's -> intpin 0 MADT: Interrupt override: source 0, irq 2 ioapic0: Routing IRQ 0 -> intpin 2 MADT: Interrupt override: source 9, irq 9 ioapic0: intpin 9 trigger: level ioapic0: intpin 9 polarity: low lapic0: Routing NMI -> LINT1 lapic0: LINT1 trigger: edge lapic0: LINT1 polarity: high ioapic0 irqs 0-23 on motherboard cpu0 BSP: ID: 0x00000000 VER: 0x80050010 LDR: 0x00000000 DFR: 0xffffffff lint0: 0x00010700 lint1: 0x00000400 TPR: 0x00000000 SVR: 0x000001ff timer: 0x000100ef therm: 0x00010000 err: 0x000000f0 pmc: 0x00010400 wlan: <802.11 Link Layer> snd_unit_init() u=0x00ff8000 [512] d=0x00007c00 [32] c=0x000003ff [1024] feeder_register: snd_unit=-1 snd_maxautovchans=16 latency=5 feeder_rate_min=1 feeder_rate_max=2016000 feeder_rate_round=25 kbd: new array size 4 kbd1 at kbdmux0 mem: nfslock: pseudo-device null: random: io: hptrr: RocketRAID 17xx/2xxx SATA controller driver v1.2 ctl: CAM Target Layer loaded acpi0: on motherboard PCIe: Memory Mapped configuration base @ 0xe0000000 ioapic0: routing intpin 9 (ISA IRQ 9) to lapic 0 vector 48 acpi0: Power Button (fixed) unknown: I/O range not supported acpi0: reservation of 0, 8000000 (3) failed acpi0: reservation of 100000, fff00000 (3) failed ACPI timer: 1/1 1/1 1/1 1/1 1/1 1/1 1/1 1/1 1/1 1/1 -> 10 Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 acpi_timer0: <32-bit timer at 3.579545MHz> port 0x8008-0x800b on acpi0 cpu0: on acpi0 cpu0: switching to generic Cx mode cpu1: on acpi0 acpi_ec0: port 0x62,0x66 on acpi0 pci_link0: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 10 11 Validation 0 255 N 0 10 11 After Disable 0 255 N 0 10 11 pci_link1: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 10 11 Validation 0 255 N 0 10 11 After Disable 0 255 N 0 10 11 pci_link2: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 10 11 Validation 0 255 N 0 10 11 After Disable 0 255 N 0 10 11 pci_link3: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 10 11 Validation 0 255 N 0 10 11 After Disable 0 255 N 0 10 11 pci_link4: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 10 11 Validation 0 255 N 0 10 11 After Disable 0 255 N 0 10 11 pci_link5: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 9 Validation 0 255 N 0 9 After Disable 0 255 N 0 9 pci_link6: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 10 11 Validation 0 255 N 0 10 11 After Disable 0 255 N 0 10 11 pci_link7: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 10 11 Validation 0 255 N 0 10 11 After Disable 0 255 N 0 10 11 pcib0: port 0xcf8-0xcff on acpi0 pcib0: decoding 4 range 0-0xcf7 pcib0: decoding 4 range 0xd00-0xffff pcib0: decoding 3 range 0xa0000-0xbffff pcib0: decoding 3 range 0xc0000000-0xfedfffff pcib0: Length mismatch for 3 range: 11ff000 vs 11fefff pcib0: decoding 3 range 0xfee01000-0xffffffff pcib0: decoding 3 range 0xd3000-0xdffff pci0: on pcib0 pci0: domain=0, physical bus=0 found-> vendor=0x1002, dev=0x7910, revid=0x00 domain=0, bus=0, slot=0, func=0 class=06-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0006, statreg=0x2220, cachelnsz=0 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) found-> vendor=0x1002, dev=0x7912, revid=0x00 domain=0, bus=0, slot=1, func=0 class=06-04-00, hdrtype=0x01, mfdev=0 cmdreg=0x0007, statreg=0x0230, cachelnsz=0 (dwords) lattimer=0x40 (1920 ns), mingnt=0x0c (3000 ns), maxlat=0x00 (0 ns) found-> vendor=0x1002, dev=0x7914, revid=0x00 domain=0, bus=0, slot=4, func=0 class=06-04-00, hdrtype=0x01, mfdev=0 cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x04 (1000 ns), maxlat=0x00 (0 ns) powerspec 3 supports D0 D3 current D0 MSI supports 1 message found-> vendor=0x1002, dev=0x7915, revid=0x00 domain=0, bus=0, slot=5, func=0 class=06-04-00, hdrtype=0x01, mfdev=0 cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x04 (1000 ns), maxlat=0x00 (0 ns) powerspec 3 supports D0 D3 current D0 MSI supports 1 message found-> vendor=0x1002, dev=0x4380, revid=0x00 domain=0, bus=0, slot=18, func=0 class=01-01-8f, hdrtype=0x00, mfdev=0 cmdreg=0x0007, statreg=0x0230, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=10 powerspec 2 supports D0 D3 current D0 map[10]: type I/O Port, range 32, base 0x9000, size 3, enabled pcib0: allocated type 4 (0x9000-0x9007) for rid 10 of pci0:0:18:0 map[14]: type I/O Port, range 32, base 0x9008, size 2, enabled pcib0: allocated type 4 (0x9008-0x900b) for rid 14 of pci0:0:18:0 map[18]: type I/O Port, range 32, base 0x9010, size 3, enabled pcib0: allocated type 4 (0x9010-0x9017) for rid 18 of pci0:0:18:0 map[1c]: type I/O Port, range 32, base 0x5018, size 2, enabled pcib0: allocated type 4 (0x5018-0x501b) for rid 1c of pci0:0:18:0 map[20]: type I/O Port, range 32, base 0x5020, size 4, enabled pcib0: allocated type 4 (0x5020-0x502f) for rid 20 of pci0:0:18:0 map[24]: type Memory, range 32, base 0xcc409000, size 10, enabled pcib0: allocated type 3 (0xcc409000-0xcc4093ff) for rid 24 of pci0:0:18:0 pcib0: matched entry for 0.18.INTA pcib0: slot 18 INTA hardwired to IRQ 16 found-> vendor=0x1002, dev=0x4387, revid=0x00 domain=0, bus=0, slot=19, func=0 class=0c-03-10, hdrtype=0x00, mfdev=1 cmdreg=0x0007, statreg=0x02a0, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=11 map[10]: type Memory, range 32, base 0xcc401000, size 12, enabled pcib0: allocated type 3 (0xcc401000-0xcc401fff) for rid 10 of pci0:0:19:0 pcib0: matched entry for 0.19.INTA pcib0: slot 19 INTA hardwired to IRQ 23 found-> vendor=0x1002, dev=0x4388, revid=0x00 domain=0, bus=0, slot=19, func=1 class=0c-03-10, hdrtype=0x00, mfdev=0 cmdreg=0x0007, statreg=0x02a0, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=b, irq=5 map[10]: type Memory, range 32, base 0xcc402000, size 12, enabled pcib0: allocated type 3 (0xcc402000-0xcc402fff) for rid 10 of pci0:0:19:1 pcib0: matched entry for 0.19.INTB pcib0: slot 19 INTB hardwired to IRQ 17 found-> vendor=0x1002, dev=0x4389, revid=0x00 domain=0, bus=0, slot=19, func=2 class=0c-03-10, hdrtype=0x00, mfdev=0 cmdreg=0x0007, statreg=0x02a0, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=c, irq=5 map[10]: type Memory, range 32, base 0xcc403000, size 12, enabled pcib0: allocated type 3 (0xcc403000-0xcc403fff) for rid 10 of pci0:0:19:2 pcib0: matched entry for 0.19.INTC pcib0: slot 19 INTC hardwired to IRQ 17 found-> vendor=0x1002, dev=0x438a, revid=0x00 domain=0, bus=0, slot=19, func=3 class=0c-03-10, hdrtype=0x00, mfdev=0 cmdreg=0x0007, statreg=0x02a0, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=b, irq=5 map[10]: type Memory, range 32, base 0xcc404000, size 12, enabled pcib0: allocated type 3 (0xcc404000-0xcc404fff) for rid 10 of pci0:0:19:3 pcib0: matched entry for 0.19.INTB pcib0: slot 19 INTB hardwired to IRQ 17 found-> vendor=0x1002, dev=0x438b, revid=0x00 domain=0, bus=0, slot=19, func=4 class=0c-03-10, hdrtype=0x00, mfdev=0 cmdreg=0x0007, statreg=0x02a0, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=c, irq=5 map[10]: type Memory, range 32, base 0xcc405000, size 12, enabled pcib0: allocated type 3 (0xcc405000-0xcc405fff) for rid 10 of pci0:0:19:4 pcib0: matched entry for 0.19.INTC pcib0: slot 19 INTC hardwired to IRQ 17 found-> vendor=0x1002, dev=0x4386, revid=0x00 domain=0, bus=0, slot=19, func=5 class=0c-03-20, hdrtype=0x00, mfdev=0 cmdreg=0x0007, statreg=0x02b0, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=d, irq=11 powerspec 2 supports D0 D1 D2 D3 current D0 map[10]: type Memory, range 32, base 0xcc406000, size 8, enabled pcib0: allocated type 3 (0xcc406000-0xcc4060ff) for rid 10 of pci0:0:19:5 pcib0: matched entry for 0.19.INTD pcib0: slot 19 INTD hardwired to IRQ 23 found-> vendor=0x1002, dev=0x4385, revid=0x14 domain=0, bus=0, slot=20, func=0 class=0c-05-00, hdrtype=0x00, mfdev=1 cmdreg=0x0003, statreg=0x0230, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) map[10]: type I/O Port, range 32, base 0x8200, size 4, enabled pcib0: allocated type 4 (0x8200-0x820f) for rid 10 of pci0:0:20:0 found-> vendor=0x1002, dev=0x438c, revid=0x00 domain=0, bus=0, slot=20, func=1 class=01-01-82, hdrtype=0x00, mfdev=0 cmdreg=0x0005, statreg=0x0220, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=10 pcib0: allocated type 4 (0x1f0-0x1f7) for rid 10 of pci0:0:20:1 pcib0: allocated type 4 (0x3f6-0x3f6) for rid 14 of pci0:0:20:1 pcib0: allocated type 4 (0x170-0x177) for rid 18 of pci0:0:20:1 pcib0: allocated type 4 (0x376-0x376) for rid 1c of pci0:0:20:1 map[20]: type I/O Port, range 32, base 0x5040, size 4, enabled pcib0: allocated type 4 (0x5040-0x504f) for rid 20 of pci0:0:20:1 pcib0: matched entry for 0.20.INTA pcib0: slot 20 INTA hardwired to IRQ 16 found-> vendor=0x1002, dev=0x4383, revid=0x00 domain=0, bus=0, slot=20, func=2 class=04-03-00, hdrtype=0x00, mfdev=0 cmdreg=0x0006, statreg=0x0410, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=10 powerspec 2 supports D0 D3 current D0 map[10]: type Memory, range 64, base 0xcc408000, size 14, enabled pcib0: matched entry for 0.20.INTA pcib0: slot 20 INTA hardwired to IRQ 16 found-> vendor=0x1002, dev=0x438d, revid=0x00 domain=0, bus=0, slot=20, func=3 class=06-01-00, hdrtype=0x00, mfdev=1 cmdreg=0x000f, statreg=0x0220, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) found-> vendor=0x1002, dev=0x4384, revid=0x00 domain=0, bus=0, slot=20, func=4 class=06-04-01, hdrtype=0x01, mfdev=1 cmdreg=0x0027, statreg=0x02a0, cachelnsz=0 (dwords) lattimer=0x40 (1920 ns), mingnt=0x04 (1000 ns), maxlat=0x00 (0 ns) found-> vendor=0x1022, dev=0x1100, revid=0x00 domain=0, bus=0, slot=24, func=0 class=06-00-00, hdrtype=0x00, mfdev=1 cmdreg=0x0000, statreg=0x0010, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) found-> vendor=0x1022, dev=0x1101, revid=0x00 domain=0, bus=0, slot=24, func=1 class=06-00-00, hdrtype=0x00, mfdev=1 cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) found-> vendor=0x1022, dev=0x1102, revid=0x00 domain=0, bus=0, slot=24, func=2 class=06-00-00, hdrtype=0x00, mfdev=1 cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) found-> vendor=0x1022, dev=0x1103, revid=0x00 domain=0, bus=0, slot=24, func=3 class=06-00-00, hdrtype=0x00, mfdev=1 cmdreg=0x0000, statreg=0x0010, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) pcib1: at device 1.0 on pci0 pcib0: allocated type 4 (0x4000-0x4fff) for rid 1c of pcib1 pcib0: allocated type 3 (0xcc200000-0xcc3fffff) for rid 20 of pcib1 pcib0: allocated type 3 (0xc0000000-0xc7ffffff) for rid 24 of pcib1 pcib1: domain 0 pcib1: secondary bus 1 pcib1: subordinate bus 1 pcib1: I/O decode 0x4000-0x4fff pcib1: memory decode 0xcc200000-0xcc3fffff pcib1: prefetched decode 0xc0000000-0xc7ffffff pci1: on pcib1 pci1: domain=0, physical bus=1 found-> vendor=0x1002, dev=0x791f, revid=0x00 domain=0, bus=1, slot=5, func=0 class=03-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=b, irq=11 powerspec 2 supports D0 D1 D2 D3 current D0 MSI supports 1 message, 64 bit map[10]: type Prefetchable Memory, range 64, base 0xc0000000, size 27, enabled pcib1: allocated prefetch range (0xc0000000-0xc7ffffff) for rid 10 of pci0:1:5:0 map[18]: type Memory, range 64, base 0xcc200000, size 16, enabled pcib1: allocated memory range (0xcc200000-0xcc20ffff) for rid 18 of pci0:1:5:0 map[20]: type I/O Port, range 32, base 0x4000, size 8, enabled pcib1: allocated I/O port range (0x4000-0x40ff) for rid 20 of pci0:1:5:0 map[24]: type Memory, range 32, base 0xcc300000, size 20, enabled pcib1: allocated memory range (0xcc300000-0xcc3fffff) for rid 24 of pci0:1:5:0 pcib1: matched entry for 1.5.INTB pcib1: slot 5 INTB hardwired to IRQ 19 vgapci0: port 0x4000-0x40ff mem 0xc0000000-0xc7ffffff,0xcc200000-0xcc20ffff,0xcc300000-0xcc3fffff irq 19 at device 5.0 on pci1 pcib2: at device 4.0 on pci0 pcib0: allocated type 3 (0xcc000000-0xcc0fffff) for rid 20 of pcib2 pcib2: domain 0 pcib2: secondary bus 16 pcib2: subordinate bus 16 pcib2: memory decode 0xcc000000-0xcc0fffff pcib2: no prefetched decode pcib2: could not get PCI interrupt routing table for \\_SB_.C08B.C24F - AE_NOT_FOUND pci16: on pcib2 pci16: domain=0, physical bus=16 found-> vendor=0x14e4, dev=0x1713, revid=0x02 domain=0, bus=16, slot=0, func=0 class=02-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0006, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=10 powerspec 3 supports D0 D3 current D0 MSI supports 1 message, 64 bit map[10]: type Memory, range 64, base 0xcc000000, size 16, enabled pcib2: allocated memory range (0xcc000000-0xcc00ffff) for rid 10 of pci0:16:0:0 pcib0: matched entry for 0.4.INTA pcib0: slot 4 INTA hardwired to IRQ 16 pcib2: slot 0 INTA is routed to irq 16 bge0: mem 0xcc000000-0xcc00ffff irq 16 at device 0.0 on pci16 bge0: CHIP ID 0x0000c002; ASIC REV 0x0c; CHIP REV 0xc0; PCI-E miibus0: on bge0 brgphy0: PHY 1 on miibus0 brgphy0: OUI 0x0050ef, model 0x0004, rev. 0 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow bge0: bpf attached bge0: Ethernet address: 00:1a:4b:89:4b:4e ioapic0: routing intpin 16 (PCI IRQ 16) to lapic 0 vector 49 pcib3: at device 5.0 on pci0 pcib0: allocated type 4 (0x2000-0x3fff) for rid 1c of pcib3 pcib0: allocated type 3 (0xc8000000-0xcbffffff) for rid 20 of pcib3 pcib3: domain 0 pcib3: secondary bus 32 pcib3: subordinate bus 32 pcib3: I/O decode 0x2000-0x3fff pcib3: memory decode 0xc8000000-0xcbffffff pcib3: no prefetched decode pcib3: could not get PCI interrupt routing table for \\_SB_.C08B.C254 - AE_NOT_FOUND pci32: on pcib3 pci32: domain=0, physical bus=32 ahci0: port 0x9000-0x9007,0x9008-0x900b,0x9010-0x9017,0x5018-0x501b,0x5020-0x502f mem 0xcc409000-0xcc4093ff irq 16 at device 18.0 on pci0 ahci0: AHCI v1.10 with 4 3Gbps ports, Port Multiplier not supported ahci0: Caps: 64bit NCQ SNTF MPS ALP AL CLO 3Gbps PMD SSC PSC 32cmd CCC 4ports ahci0: Caps2: ahcich0: at channel 0 on ahci0 ahcich0: Caps: ahcich1: not probed (disabled) ahcich2: not probed (disabled) ahcich3: not probed (disabled) ohci0: mem 0xcc401000-0xcc401fff irq 23 at device 19.0 on pci0 ioapic0: routing intpin 23 (PCI IRQ 23) to lapic 0 vector 50 usbus0: on ohci0 usbus0: bpf attached ohci0: usbpf: Attached ohci1: mem 0xcc402000-0xcc402fff irq 17 at device 19.1 on pci0 ioapic0: routing intpin 17 (PCI IRQ 17) to lapic 0 vector 51 usbus1: on ohci1 usbus1: bpf attached ohci1: usbpf: Attached ohci2: mem 0xcc403000-0xcc403fff irq 17 at device 19.2 on pci0 usbus2: on ohci2 usbus2: bpf attached ohci2: usbpf: Attached ohci3: mem 0xcc404000-0xcc404fff irq 17 at device 19.3 on pci0 usbus3: on ohci3 usbus3: bpf attached ohci3: usbpf: Attached ohci4: mem 0xcc405000-0xcc405fff irq 17 at device 19.4 on pci0 usbus4: on ohci4 usbus4: bpf attached ohci4: usbpf: Attached ehci0: mem 0xcc406000-0xcc4060ff irq 23 at device 19.5 on pci0 ehci0: AMD SB600/700 quirk applied ehci0: Dropped interrupts workaround enabled usbus5: EHCI version 1.0 usbus5: on ehci0 usbus5: bpf attached ehci0: usbpf: Attached pci0: at device 20.0 (no driver attached) atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x5040-0x504f irq 16 at device 20.1 on pci0 ata0: at channel 0 on atapci0 ioapic0: routing intpin 14 (ISA IRQ 14) to lapic 0 vector 52 hdac0: irq 16 at device 20.2 on pci0 hdac0: HDA Driver Revision: 20120126_0002 hdac0: Config options: on=0x00000000 off=0x00000000 pcib0: allocated type 3 (0xcc100000-0xcc103fff) for rid 10 of hdac0 hdac0: Lazy allocation of 0x4000 bytes rid 0x10 type 3 at 0xcc100000 hdac0: Caps: OSS 4, ISS 4, BSS 0, NSDO 1, 64bit, CORB 256, RIRB 256 isab0: at device 20.3 on pci0 isa0: on isab0 pcib4: at device 20.4 on pci0 pcib4: failed to allocate initial memory window: 0xcc100000-0xcc1fffff pcib4: domain 0 pcib4: secondary bus 2 pcib4: subordinate bus 3 pcib4: no prefetched decode pcib4: Subtractively decoded bridge. pci2: on pcib4 pci2: domain=0, physical bus=2 found-> vendor=0x1180, dev=0x0476, revid=0xb6 domain=0, bus=2, slot=4, func=0 class=06-07-00, hdrtype=0x02, mfdev=1 cmdreg=0x0007, statreg=0x0210, cachelnsz=0 (dwords) lattimer=0x40 (1920 ns), mingnt=0x80 (32000 ns), maxlat=0x07 (1750 ns) intpin=a, irq=10 powerspec 2 supports D0 D1 D2 D3 current D0 map[10]: type Memory, range 32, base 0xcc100000, size 12, enabled pcib4: failed to allocate initial memory window (0xcc100000-0xcc1fffff,0x100000) pcib4: matched entry for 2.4.INTA pcib4: slot 4 INTA hardwired to IRQ 20 cbb0: irq 20 at device 4.0 on pci2 pcib0: allocated type 3 (0xcc500000-0xcc5fffff) for rid 20 of pcib4 pcib4: allocated initial memory window of 0xcc500000-0xcc5fffff pcib4: allocated memory range (0xcc500000-0xcc500fff) for rid 10 of cbb0 cbb0: Lazy allocation of 0x1000 bytes rid 0x10 type 3 at 0xcc500000 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 ioapic0: routing intpin 20 (PCI IRQ 20) to lapic 0 vector 53 cbb0: PCI Configuration space: 0x00: 0x04761180 0x02100007 0x060700b6 0x00824000 0x10: 0xcc500000 0x020000dc 0x20030302 0xfffff000 0x20: 0x00000000 0xfffff000 0x00000000 0xfffffffc 0x30: 0x00000000 0xfffffffc 0x00000000 0x07000114 0x40: 0x30c2103c 0x00000001 0x00000000 0x00000000 0x50: 0x00000000 0x00000000 0x00000000 0x00000000 0x60: 0x00000000 0x00000000 0x00000000 0x00000000 0x70: 0x00000000 0x00000000 0x00000000 0x00000000 0x80: 0x30a00001 0x00000000 0x04630463 0x00000000 0x90: 0x00000000 0x00000000 0x00000000 0x00000000 0xa0: 0x00000008 0x00000000 0x00000000 0x00000000 0xb0: 0x00000000 0xbe000000 0x00003000 0x00000000 0xc0: 0x30c2103c 0x00000000 0x00000000 0x00000000 0xd0: 0x00000000 0x00000000 0x00000000 0xfe0a0001 0xe0: 0x24c04000 0x00000000 0x00000000 0x00000000 0xf0: 0x00000000 0x00000000 0x00000000 0x00000000 battery0: on acpi0 battery1: on acpi0 acpi_acad0: on acpi0 acpi_button0: on acpi0 acpi_lid0: on acpi0 acpi_tz0: on acpi0 attimer0: port 0x40-0x43 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 ioapic0: routing intpin 2 (ISA IRQ 0) to lapic 0 vector 54 Event timer "i8254" frequency 1193182 Hz quality 100 atrtc0: port 0x70-0x71,0x72-0x73 irq 8 on acpi0 atrtc0: registered as a time-of-day clock (resolution 1000000us, adjustment 0.500000000s) ioapic0: routing intpin 8 (ISA IRQ 8) to lapic 0 vector 55 Event timer "RTC" frequency 32768 Hz quality 0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 atkbd: the current kbd controller command byte 0065 atkbd: keyboard ID 0x41ab (2) kbd0 at atkbd0 kbd0: atkbd0, AT 101/102 (2), config:0x0, flags:0x3d0000 ioapic0: routing intpin 1 (ISA IRQ 1) to lapic 0 vector 56 atkbd0: [GIANT-LOCKED] psm0: unable to allocate IRQ psmcpnp0: irq 12 on acpi0 psm0: current command byte:0065 psm0: irq 12 on atkbdc0 ioapic0: routing intpin 12 (ISA IRQ 12) to lapic 0 vector 57 psm0: [GIANT-LOCKED] psm0: model IntelliMouse, device ID 3-00, 3 buttons psm0: config:00000000, flags:00000008, packet size:4 psm0: syncmask:08, syncbits:00 acpi0: wakeup code va 0xffffff80cd338000 pa 0x4000 ahc_isa_probe 0: ioport 0xc00 alloc failed ahc_isa_probe 1: ioport 0x1c00 alloc failed ahc_isa_probe 2: ioport 0x2c00 alloc failed ahc_isa_probe 3: ioport 0x3c00 alloc failed ahc_isa_probe 4: ioport 0x4c00 alloc failed ahc_isa_probe 5: ioport 0x5c00 alloc failed ahc_isa_probe 6: ioport 0x6c00 alloc failed ahc_isa_probe 7: ioport 0x7c00 alloc failed ahc_isa_probe 8: ioport 0x8c00 alloc failed ahc_isa_probe 9: ioport 0x9c00 alloc failed ahc_isa_probe 10: ioport 0xac00 alloc failed ahc_isa_probe 11: ioport 0xbc00 alloc failed ahc_isa_probe 12: ioport 0xcc00 alloc failed ahc_isa_probe 13: ioport 0xdc00 alloc failed ahc_isa_probe 14: ioport 0xec00 alloc failed pcib0: allocated type 3 (0xa0000-0xa07ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa0800-0xa0fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa1000-0xa17ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa1800-0xa1fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa2000-0xa27ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa2800-0xa2fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa3000-0xa37ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa3800-0xa3fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa4000-0xa47ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa4800-0xa4fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa5000-0xa57ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa5800-0xa5fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa6000-0xa67ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa6800-0xa6fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa7000-0xa77ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa7800-0xa7fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa8000-0xa87ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa8800-0xa8fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa9000-0xa97ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa9800-0xa9fff) for rid 0 of orm0 pcib0: allocated type 3 (0xaa000-0xaa7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xaa800-0xaafff) for rid 0 of orm0 pcib0: allocated type 3 (0xab000-0xab7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xab800-0xabfff) for rid 0 of orm0 pcib0: allocated type 3 (0xac000-0xac7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xac800-0xacfff) for rid 0 of orm0 pcib0: allocated type 3 (0xad000-0xad7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xad800-0xadfff) for rid 0 of orm0 pcib0: allocated type 3 (0xae000-0xae7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xae800-0xaefff) for rid 0 of orm0 pcib0: allocated type 3 (0xaf000-0xaf7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xaf800-0xaffff) for rid 0 of orm0 pcib0: allocated type 3 (0xb0000-0xb07ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb0800-0xb0fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb1000-0xb17ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb1800-0xb1fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb2000-0xb27ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb2800-0xb2fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb3000-0xb37ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb3800-0xb3fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb4000-0xb47ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb4800-0xb4fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb5000-0xb57ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb5800-0xb5fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb6000-0xb67ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb6800-0xb6fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb7000-0xb77ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb7800-0xb7fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb8000-0xb87ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb8800-0xb8fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb9000-0xb97ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb9800-0xb9fff) for rid 0 of orm0 pcib0: allocated type 3 (0xba000-0xba7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xba800-0xbafff) for rid 0 of orm0 pcib0: allocated type 3 (0xbb000-0xbb7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xbb800-0xbbfff) for rid 0 of orm0 pcib0: allocated type 3 (0xbc000-0xbc7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xbc800-0xbcfff) for rid 0 of orm0 pcib0: allocated type 3 (0xbd000-0xbd7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xbd800-0xbdfff) for rid 0 of orm0 pcib0: allocated type 3 (0xbe000-0xbe7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xbe800-0xbefff) for rid 0 of orm0 pcib0: allocated type 3 (0xbf000-0xbf7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xbf800-0xbffff) for rid 0 of orm0 pcib0: allocated type 3 (0xd3000-0xd37ff) for rid 1 of orm0 pcib0: allocated type 3 (0xd3800-0xd3fff) for rid 1 of orm0 pcib0: allocated type 3 (0xd4000-0xd47ff) for rid 1 of orm0 pcib0: allocated type 3 (0xd4800-0xd4fff) for rid 1 of orm0 pcib0: allocated type 3 (0xd5000-0xd57ff) for rid 1 of orm0 pcib0: allocated type 3 (0xd5800-0xd5fff) for rid 1 of orm0 pcib0: allocated type 3 (0xd6000-0xd67ff) for rid 1 of orm0 pcib0: allocated type 3 (0xd6800-0xd6fff) for rid 1 of orm0 pcib0: allocated type 3 (0xd7000-0xd77ff) for rid 1 of orm0 pcib0: allocated type 3 (0xd7800-0xd7fff) for rid 1 of orm0 pcib0: allocated type 3 (0xd8000-0xd87ff) for rid 1 of orm0 pcib0: allocated type 3 (0xd8800-0xd8fff) for rid 1 of orm0 pcib0: allocated type 3 (0xd9000-0xd97ff) for rid 1 of orm0 pcib0: allocated type 3 (0xd9800-0xd9fff) for rid 1 of orm0 pcib0: allocated type 3 (0xda000-0xda7ff) for rid 1 of orm0 pcib0: allocated type 3 (0xda800-0xdafff) for rid 1 of orm0 pcib0: allocated type 3 (0xdb000-0xdb7ff) for rid 1 of orm0 pcib0: allocated type 3 (0xdb800-0xdbfff) for rid 1 of orm0 pcib0: allocated type 3 (0xdc000-0xdc7ff) for rid 1 of orm0 pcib0: allocated type 3 (0xdc800-0xdcfff) for rid 1 of orm0 pcib0: allocated type 3 (0xdd000-0xdd7ff) for rid 1 of orm0 pcib0: allocated type 3 (0xdd800-0xddfff) for rid 1 of orm0 pcib0: allocated type 3 (0xde000-0xde7ff) for rid 1 of orm0 pcib0: allocated type 3 (0xde800-0xdefff) for rid 1 of orm0 pcib0: allocated type 3 (0xdf000-0xdf7ff) for rid 1 of orm0 pcib0: allocated type 3 (0xdf800-0xdffff) for rid 1 of orm0 ex_isa_identify() isa_probe_children: disabling PnP devices atkbdc: atkbdc0 already exists; skipping it atrtc: atrtc0 already exists; skipping it attimer: attimer0 already exists; skipping it sc: sc0 already exists; skipping it isa_probe_children: probing non-PnP devices orm0: at iomem 0xd0000-0xd0fff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sc0: fb0, kbd1, terminal emulator: scteken (teken terminal) vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 pcib0: allocated type 4 (0x3c0-0x3df) for rid 0 of vga0 pcib0: allocated type 3 (0xa0000-0xbffff) for rid 0 of vga0 pcib0: allocated type 4 (0x3f0-0x3f5) for rid 0 of fdc0 pcib0: allocated type 4 (0x3f7-0x3f7) for rid 1 of fdc0 fdc0 failed to probe at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0 ppc0: cannot reserve I/O port range ppc0: failed to probe at irq 7 on isa0 pcib0: allocated type 4 (0x3f8-0x3ff) for rid 0 of uart0 uart0: failed to probe at port 0x3f8-0x3ff irq 4 on isa0 pcib0: allocated type 4 (0x2f8-0x2ff) for rid 0 of uart1 uart1: failed to probe at port 0x2f8-0x2ff irq 3 on isa0 isa_probe_children: probing PnP devices acpi_throttle0: on cpu0 acpi_throttle0: P_CNT from P_BLK 0x8010 powernow0: on cpu0 acpi_throttle1: on cpu1 acpi_throttle1: failed to attach P_CNT device_attach: acpi_throttle1 attach returned 6 powernow1: on cpu1 Device configuration finished. procfs registered lapic: Divisor 2, Frequency 99750265 Hz Timecounters tick every 1.000 msec vlan: initialized, using hash tables with chaining lo0: bpf attached hptrr: no controller detected. hdacc0: at cad 0 on hdac0 hdacc0: Root Node at nid=0: 1 subnodes 1-1 hdaa0: at nid 1 on hdacc0 hdaa0: Audio Function Group at nid=1: 30 subnodes 2-31 hdaa0: NumGPIO=4 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1 hdaa0: GPIO0: disabled hdaa0: GPIO1: disabled hdaa0: GPIO2: disabled hdaa0: GPIO3: disabled hdaa0: WARNING: nid=2 has cnid outside of the AFG range j=0 entnum=4 index=0 res=0x00000401 hdaa0: Original pins configuration: hdaa0: nid 0x as seq device conn jack loc color misc hdaa0: 5 92174110 1 0 Speaker Fixed Analog 0x12 Green 1 hdaa0: 6 0421201f 1 15 Headphones Jack 1/8 Right Grey 0 hdaa0: 7 410710f0 15 0 Line-out None Analog Rear Black 0 hdaa0: 8 04a12020 2 0 Mic Jack 1/8 Right Grey 0 hdaa0: 9 0181302e 2 14 Line-in Jack 1/8 Rear Blue 0 hdaa0: 10 4145f0f0 15 0 SPDIF-out None Optical Rear Other 0 hdaa0: 22 995711f0 15 0 Digital-out Fixed Analog Onboard Black 1 hdaa0: 23 5993e0f0 15 0 AUX None ATAPI Onboard White 0 hdaa0: 24 f0a79159 5 9 Mic Both Analog Other Pink 1 hdaa0: 25 593310f0 15 0 CD None ATAPI Onboard Black 0 hdaa0: Patched pins configuration: hdaa0: nid 0x as seq device conn jack loc color misc hdaa0: 5 92174110 1 0 Speaker Fixed Analog 0x12 Green 1 hdaa0: 6 0421201f 1 15 Headphones Jack 1/8 Right Grey 0 hdaa0: 7 410710f0 15 0 Line-out None Analog Rear Black 0 DISA hdaa0: 8 04a12020 2 0 Mic Jack 1/8 Right Grey 0 hdaa0: 9 0181302e 2 14 Line-in Jack 1/8 Rear Blue 0 hdaa0: 10 4145f0f0 15 0 SPDIF-out None Optical Rear Other 0 DISA hdaa0: 22 995711f0 15 0 Digital-out Fixed Analog Onboard Black 1 hdaa0: 23 5993e0f0 15 0 AUX None ATAPI Onboard White 0 DISA hdaa0: 24 f0a79159 5 9 Mic Both Analog Other Pink 1 hdaa0: 25 593310f0 15 0 CD None ATAPI Onboard Black 0 DISA hdaa0: 4 associations found: hdaa0: Association 0 (1) out: hdaa0: Pin nid=5 seq=0 hdaa0: Pin nid=6 seq=15 hdaa0: Association 1 (2) in: hdaa0: Pin nid=8 seq=0 hdaa0: Pin nid=9 seq=14 hdaa0: Association 2 (5) in: hdaa0: Pin nid=24 seq=9 hdaa0: Association 3 (15) out: hdaa0: Pin nid=22 seq=0 hdaa0: Tracing association 0 (1) hdaa0: Pin 5 traced to DAC 3 hdaa0: Pin 6 traced to DAC 3 and hpredir 0 hdaa0: Association 0 (1) trace succeeded hdaa0: Tracing association 1 (2) hdaa0: Pin 8 traced to ADC 4 hdaa0: Pin 9 traced to ADC 4 hdaa0: Association 1 (2) trace succeeded hdaa0: Tracing association 2 (5) hdaa0: Association 2 (5) trace failed hdaa0: Tracing association 3 (15) hdaa0: Unable to trace pin 22 seq 0 with min nid 0 hdaa0: Association 3 (15) trace failed hdaa0: Looking for additional DAC for association 0 (1) hdaa0: Looking for additional ADC for association 1 (2) hdaa0: Tracing input monitor hdaa0: Tracing nid 12 to out hdaa0: Tracing other input monitors hdaa0: Tracing nid 8 to out hdaa0: nid 8 is input monitor hdaa0: Tracing nid 9 to out hdaa0: nid 9 is input monitor hdaa0: Tracing beeper hdaa0: nid 16 traced to out hdaa0: Headphones redirection for association 0 nid=6 using unsolicited responses. hdaa0: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref hdaa0: hdaa0: +-------------------+ hdaa0: | DUMPING HDA NODES | hdaa0: +-------------------+ hdaa0: hdaa0: Default Parameter hdaa0: ----------------- hdaa0: Stream cap: 0x00000001 hdaa0: PCM hdaa0: PCM cap: 0x000e007f hdaa0: 16 20 24 bits, 8 11 16 22 32 44 48 KHz hdaa0: IN amp: 0x00270300 hdaa0: OUT amp: 0x80053f3d hdaa0: hdaa0: nid: 2 [DISABLED] hdaa0: Name: audio output hdaa0: Widget cap: 0x00030311 hdaa0: DIGITAL STEREO hdaa0: Stream cap: 0x00000005 hdaa0: AC3 PCM hdaa0: PCM cap: 0x00020060 hdaa0: 16 bits, 44 48 KHz hdaa0: connections: 2 hdaa0: | hdaa0: + [DISABLED] <- nid=1 [GHOST!] [UNKNOWN] (selected) hdaa0: + <- nid=4 [audio input] hdaa0: hdaa0: nid: 3 hdaa0: Name: audio output hdaa0: Widget cap: 0x00000441 hdaa0: PWR PROC STEREO hdaa0: Association: 0 (0x00008001) hdaa0: OSS: pcm (pcm) hdaa0: Stream cap: 0x00000001 hdaa0: PCM hdaa0: PCM cap: 0x000e007f hdaa0: 16 20 24 bits, 8 11 16 22 32 44 48 KHz hdaa0: hdaa0: nid: 4 hdaa0: Name: audio input hdaa0: Widget cap: 0x00100511 hdaa0: PWR STEREO hdaa0: Association: 1 (0x00004001) hdaa0: Stream cap: 0x00000001 hdaa0: PCM hdaa0: PCM cap: 0x0006007f hdaa0: 16 20 bits, 8 11 16 22 32 44 48 KHz hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=21 [audio selector] hdaa0: hdaa0: nid: 5 hdaa0: Name: pin: Speaker (Fixed) hdaa0: Widget cap: 0x00400187 hdaa0: UNSOL STEREO hdaa0: Association: 0 (0x00000001) hdaa0: Pin cap: 0x0001173f hdaa0: ISC TRQD PDC HP OUT IN VREF[ 50 80 GROUND HIZ ] EAPD hdaa0: Pin config: 0x92174110 hdaa0: Pin control: 0x00000040 OUT hdaa0: EAPD: 0x00000002 hdaa0: Output amp: 0x80053f3d hdaa0: mute=1 step=63 size=5 offset=61 hdaa0: Input amp: 0x00270300 hdaa0: mute=0 step=3 size=39 offset=0 hdaa0: connections: 2 hdaa0: | hdaa0: + [DISABLED] <- nid=3 [audio output] hdaa0: + <- nid=14 [audio mixer] (selected) hdaa0: hdaa0: nid: 6 hdaa0: Name: pin: Headphones (Grey Jack) hdaa0: Widget cap: 0x00400185 hdaa0: UNSOL STEREO hdaa0: Association: 0 (0x00008000) hdaa0: Pin cap: 0x0000001f hdaa0: ISC TRQD PDC HP OUT hdaa0: Pin config: 0x0421201f hdaa0: Pin control: 0x000000c0 HP OUT hdaa0: Output amp: 0x80053f3d hdaa0: mute=1 step=63 size=5 offset=61 hdaa0: connections: 2 hdaa0: | hdaa0: + [DISABLED] <- nid=3 [audio output] hdaa0: + <- nid=14 [audio mixer] (selected) hdaa0: hdaa0: nid: 7 [DISABLED] hdaa0: Name: pin: Line-out (None) hdaa0: Widget cap: 0x00400104 hdaa0: Pin cap: 0x00000010 hdaa0: OUT hdaa0: Pin config: 0x410710f0 hdaa0: Pin control: 0x00000000 hdaa0: Output amp: 0x80053f3d hdaa0: mute=1 step=63 size=5 offset=61 hdaa0: connections: 1 hdaa0: | hdaa0: + [DISABLED] <- nid=15 [audio mixer] [DISABLED] hdaa0: hdaa0: nid: 8 hdaa0: Name: pin: Mic (Grey Jack) hdaa0: Widget cap: 0x00400083 hdaa0: UNSOL STEREO hdaa0: Association: 1 (0x00000001) hdaa0: OSS: mic (mic) hdaa0: Pin cap: 0x00001727 hdaa0: ISC TRQD PDC IN VREF[ 50 80 GROUND HIZ ] hdaa0: Pin config: 0x04a12020 hdaa0: Pin control: 0x00000024 IN VREFs hdaa0: Input amp: 0x00270300 hdaa0: mute=0 step=3 size=39 offset=0 hdaa0: hdaa0: nid: 9 hdaa0: Name: pin: Line-in (Blue Jack) hdaa0: Widget cap: 0x00400187 hdaa0: UNSOL STEREO hdaa0: Association: 1 (0x00004000) hdaa0: OSS: line (line) hdaa0: Pin cap: 0x00001737 hdaa0: ISC TRQD PDC OUT IN VREF[ 50 80 GROUND HIZ ] hdaa0: Pin config: 0x0181302e hdaa0: Pin control: 0x00000024 IN VREFs hdaa0: Output amp: 0x80053f3d hdaa0: mute=1 step=63 size=5 offset=61 hdaa0: Input amp: 0x00270300 hdaa0: mute=0 step=3 size=39 offset=0 hdaa0: connections: 2 hdaa0: | hdaa0: + [DISABLED] <- nid=3 [audio output] (selected) hdaa0: + [DISABLED] <- nid=14 [audio mixer] hdaa0: hdaa0: nid: 10 [DISABLED] hdaa0: Name: pin: SPDIF-out (None) hdaa0: Widget cap: 0x00400301 hdaa0: DIGITAL STEREO hdaa0: Pin cap: 0x00000010 hdaa0: OUT hdaa0: Pin config: 0x4145f0f0 hdaa0: Pin control: 0x00000000 hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=2 [audio output] [DISABLED] hdaa0: hdaa0: nid: 11 [DISABLED] hdaa0: Name: audio selector hdaa0: Widget cap: 0x00300101 hdaa0: STEREO hdaa0: connections: 6 hdaa0: | hdaa0: + <- nid=3 [audio output] (selected) hdaa0: + <- nid=12 [audio mixer] hdaa0: + <- nid=9 [pin: Line-in (Blue Jack)] hdaa0: + <- nid=14 [audio mixer] hdaa0: + <- nid=5 [pin: Speaker (Fixed)] hdaa0: + <- nid=24 [pin: Mic (Both)] [DISABLED] hdaa0: hdaa0: nid: 12 hdaa0: Name: audio mixer hdaa0: Widget cap: 0x00200101 hdaa0: STEREO hdaa0: Association: 1 (0x00000001) hdaa0: OSS: mic hdaa0: connections: 2 hdaa0: | hdaa0: + <- nid=30 [audio selector] hdaa0: + [DISABLED] <- nid=31 [audio selector] [DISABLED] hdaa0: hdaa0: nid: 13 hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010c hdaa0: Association: -2 (0x00000000) hdaa0: OSS: speaker hdaa0: Output amp: 0x800b0f0f hdaa0: mute=1 step=15 size=11 offset=15 hdaa0: connections: 2 hdaa0: | hdaa0: + <- nid=16 [beep widget] (selected) hdaa0: + [DISABLED] <- nid=22 [pin: Digital-out (Fixed)] [DISABLED] hdaa0: hdaa0: nid: 14 hdaa0: Name: audio mixer hdaa0: Widget cap: 0x00200101 hdaa0: STEREO hdaa0: Association: 0 (0x00008001) hdaa0: OSS: pcm, speaker, line, mic hdaa0: connections: 8 hdaa0: | hdaa0: + <- nid=13 [audio selector] hdaa0: + <- nid=17 [audio selector] hdaa0: + <- nid=18 [audio selector] hdaa0: + <- nid=19 [audio selector] hdaa0: + [DISABLED] <- nid=26 [audio selector] [DISABLED] hdaa0: + [DISABLED] <- nid=27 [audio selector] [DISABLED] hdaa0: + [DISABLED] <- nid=28 [audio selector] [DISABLED] hdaa0: + [DISABLED] <- nid=29 [audio selector] [DISABLED] hdaa0: hdaa0: nid: 15 [DISABLED] hdaa0: Name: audio mixer hdaa0: Widget cap: 0x00200100 hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=11 [audio selector] [DISABLED] hdaa0: hdaa0: nid: 16 hdaa0: Name: beep widget hdaa0: Widget cap: 0x00700000 hdaa0: Association: -2 (0x00000000) hdaa0: OSS: speaker (speaker) hdaa0: hdaa0: nid: 17 hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Association: 0 (0x00008001) hdaa0: OSS: pcm hdaa0: Output amp: 0x80051f17 hdaa0: mute=1 step=31 size=5 offset=23 hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=3 [audio output] hdaa0: hdaa0: nid: 18 hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Association: -2 (0x00000000) hdaa0: OSS: mic hdaa0: Output amp: 0x80051f17 hdaa0: mute=1 step=31 size=5 offset=23 hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=8 [pin: Mic (Grey Jack)] hdaa0: hdaa0: nid: 19 hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Association: -2 (0x00000000) hdaa0: OSS: line hdaa0: Output amp: 0x80051f17 hdaa0: mute=1 step=31 size=5 offset=23 hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=9 [pin: Line-in (Blue Jack)] hdaa0: hdaa0: nid: 20 [DISABLED] hdaa0: Name: power widget hdaa0: Widget cap: 0x00500500 hdaa0: PWR hdaa0: connections: 13 hdaa0: | hdaa0: + <- nid=13 [audio selector] (selected) hdaa0: + <- nid=14 [audio mixer] hdaa0: + <- nid=15 [audio mixer] [DISABLED] hdaa0: + <- nid=16 [beep widget] hdaa0: + <- nid=19 [audio selector] hdaa0: + <- nid=20 [power widget] [DISABLED] hdaa0: + <- nid=21 [audio selector] hdaa0: + <- nid=22 [pin: Digital-out (Fixed)] [DISABLED] hdaa0: + <- nid=23 [pin: AUX (None)] [DISABLED] hdaa0: + <- nid=24 [pin: Mic (Both)] [DISABLED] hdaa0: + <- nid=25 [pin: CD (None)] [DISABLED] hdaa0: + <- nid=26 [audio selector] [DISABLED] hdaa0: + <- nid=29 [audio selector] [DISABLED] hdaa0: hdaa0: nid: 21 hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Association: 1 (0x00004001) hdaa0: OSS: line, mic hdaa0: Output amp: 0x80050f00 hdaa0: mute=1 step=15 size=5 offset=0 hdaa0: connections: 8 hdaa0: | hdaa0: + <- nid=12 [audio mixer] hdaa0: + <- nid=9 [pin: Line-in (Blue Jack)] (selected) hdaa0: + [DISABLED] <- nid=14 [audio mixer] hdaa0: + [DISABLED] <- nid=15 [audio mixer] [DISABLED] hdaa0: + [DISABLED] <- nid=25 [pin: CD (None)] [DISABLED] hdaa0: + [DISABLED] <- nid=5 [pin: Speaker (Fixed)] hdaa0: + [DISABLED] <- nid=24 [pin: Mic (Both)] [DISABLED] hdaa0: + [DISABLED] <- nid=23 [pin: AUX (None)] [DISABLED] hdaa0: hdaa0: nid: 22 [DISABLED] hdaa0: Name: pin: Digital-out (Fixed) hdaa0: Widget cap: 0x00400000 hdaa0: Pin cap: 0x00000020 hdaa0: IN hdaa0: Pin config: 0x995711f0 hdaa0: Pin control: 0x00000000 hdaa0: hdaa0: nid: 23 [DISABLED] hdaa0: Name: pin: AUX (None) hdaa0: Widget cap: 0x00400081 hdaa0: UNSOL STEREO hdaa0: Pin cap: 0x00000027 hdaa0: ISC TRQD PDC IN hdaa0: Pin config: 0x5993e0f0 hdaa0: Pin control: 0x00000000 hdaa0: hdaa0: nid: 24 [DISABLED] hdaa0: Name: pin: Mic (Both) hdaa0: Widget cap: 0x00400187 hdaa0: UNSOL STEREO hdaa0: Pin cap: 0x00001737 hdaa0: ISC TRQD PDC OUT IN VREF[ 50 80 GROUND HIZ ] hdaa0: Pin config: 0xf0a79159 hdaa0: Pin control: 0x00000000 hdaa0: Output amp: 0x80053f3d hdaa0: mute=1 step=63 size=5 offset=61 hdaa0: Input amp: 0x00270300 hdaa0: mute=0 step=3 size=39 offset=0 hdaa0: connections: 2 hdaa0: | hdaa0: + [DISABLED] <- nid=3 [audio output] (selected) hdaa0: + <- nid=14 [audio mixer] hdaa0: hdaa0: nid: 25 [DISABLED] hdaa0: Name: pin: CD (None) hdaa0: Widget cap: 0x00400001 hdaa0: STEREO hdaa0: Pin cap: 0x00000020 hdaa0: IN hdaa0: Pin config: 0x593310f0 hdaa0: Pin control: 0x00000000 hdaa0: hdaa0: nid: 26 [DISABLED] hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Output amp: 0x80051f17 hdaa0: mute=1 step=31 size=5 offset=23 hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=5 [pin: Speaker (Fixed)] hdaa0: hdaa0: nid: 27 [DISABLED] hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Output amp: 0x80051f17 hdaa0: mute=1 step=31 size=5 offset=23 hdaa0: connections: 1 hdaa0: | hdaa0: + [DISABLED] <- nid=23 [pin: AUX (None)] [DISABLED] hdaa0: hdaa0: nid: 28 [DISABLED] hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Output amp: 0x80051f17 hdaa0: mute=1 step=31 size=5 offset=23 hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=24 [pin: Mic (Both)] [DISABLED] hdaa0: hdaa0: nid: 29 [DISABLED] hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Output amp: 0x80051f17 hdaa0: mute=1 step=31 size=5 offset=23 hdaa0: connections: 1 hdaa0: | hdaa0: + [DISABLED] <- nid=25 [pin: CD (None)] [DISABLED] hdaa0: hdaa0: nid: 30 hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Association: 1 (0x00000001) hdaa0: OSS: mic hdaa0: Output amp: 0x80000000 hdaa0: mute=1 step=0 size=0 offset=0 hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=8 [pin: Mic (Grey Jack)] hdaa0: hdaa0: nid: 31 [DISABLED] hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Output amp: 0x80000000 hdaa0: mute=1 step=0 size=0 offset=0 hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=24 [pin: Mic (Both)] [DISABLED] hdaa0: pcm0: at nid 5,6 and 8,9 on hdaa0 pcm0: +--------------------------------------+ pcm0: | DUMPING PCM Playback/Record Channels | pcm0: +--------------------------------------+ pcm0: pcm0: Playback: pcm0: pcm0: Stream cap: 0x00000001 pcm0: PCM pcm0: PCM cap: 0x000e007f pcm0: 16 20 24 bits, 8 11 16 22 32 44 48 KHz pcm0: DAC: 3 pcm0: pcm0: Record: pcm0: pcm0: Stream cap: 0x00000001 pcm0: PCM pcm0: PCM cap: 0x0006007f pcm0: 16 20 bits, 8 11 16 22 32 44 48 KHz pcm0: DAC: 4 pcm0: pcm0: +-------------------------------+ pcm0: | DUMPING Playback/Record Paths | pcm0: +-------------------------------+ pcm0: pcm0: Playback: pcm0: pcm0: nid=5 [pin: Speaker (Fixed)] pcm0: | pcm0: + <- nid=14 [audio mixer] [src: pcm, speaker, line, mic] pcm0: | pcm0: + <- nid=13 [audio selector] [src: speaker] pcm0: | pcm0: + <- nid=16 [beep widget] [src: speaker] pcm0: + <- nid=17 [audio selector] [src: pcm] pcm0: | pcm0: + <- nid=3 [audio output] [src: pcm] pcm0: + <- nid=18 [audio selector] [src: mic] pcm0: | pcm0: + <- nid=8 [pin: Mic (Grey Jack)] [src: mic] pcm0: + <- nid=19 [audio selector] [src: line] pcm0: | pcm0: + <- nid=9 [pin: Line-in (Blue Jack)] [src: line] pcm0: pcm0: nid=6 [pin: Headphones (Grey Jack)] pcm0: | pcm0: + <- nid=14 [audio mixer] [src: pcm, speaker, line, mic] pcm0: | pcm0: + <- nid=13 [audio selector] [src: speaker] pcm0: | pcm0: + <- nid=16 [beep widget] [src: speaker] pcm0: + <- nid=17 [audio selector] [src: pcm] pcm0: | pcm0: + <- nid=3 [audio output] [src: pcm] pcm0: + <- nid=18 [audio selector] [src: mic] pcm0: | pcm0: + <- nid=8 [pin: Mic (Grey Jack)] [src: mic] pcm0: + <- nid=19 [audio selector] [src: line] pcm0: | pcm0: + <- nid=9 [pin: Line-in (Blue Jack)] [src: line] pcm0: pcm0: Record: pcm0: pcm0: nid=4 [audio input] pcm0: | pcm0: + <- nid=21 [audio selector] [src: line, mic] pcm0: | pcm0: + <- nid=12 [audio mixer] [src: mic] pcm0: | pcm0: + <- nid=30 [audio selector] [src: mic] pcm0: | pcm0: + <- nid=8 [pin: Mic (Grey Jack)] [src: mic] pcm0: + <- nid=9 [pin: Line-in (Blue Jack)] [src: line] pcm0: pcm0: +-------------------------+ pcm0: | DUMPING Volume Controls | pcm0: +-------------------------+ pcm0: pcm0: Master Volume (OSS: vol): -91/3dB pcm0: | pcm0: +- ctl 1 (nid 5 in ): -91/3dB (64 steps) + mute pcm0: +- ctl 3 (nid 6 in ): -91/3dB (64 steps) + mute pcm0: +- ctl 8 (nid 13 out): -45/0dB (16 steps) + mute pcm0: +- ctl 9 (nid 17 out): -34/12dB (32 steps) + mute pcm0: +- ctl 10 (nid 18 out): -34/12dB (32 steps) + mute pcm0: +- ctl 11 (nid 19 out): -34/12dB (32 steps) + mute pcm0: pcm0: PCM Volume (OSS: pcm): -34/12dB pcm0: | pcm0: +- ctl 9 (nid 17 out): -34/12dB (32 steps) + mute pcm0: pcm0: Microphone Volume (OSS: mic): 0/30dB pcm0: | pcm0: +- ctl 5 (nid 8 out): 0/30dB (4 steps) pcm0: +- ctl 10 (nid 18 out): -34/12dB (32 steps) + mute pcm0: +- ctl 12 (nid 21 out): 0/22dB (16 steps) + mute pcm0: +- ctl 19 (nid 30 out): mute pcm0: pcm0: Line-in Volume (OSS: line): 0/30dB pcm0: | pcm0: +- ctl 7 (nid 9 out): 0/30dB (4 steps) pcm0: +- ctl 11 (nid 19 out): -34/12dB (32 steps) + mute pcm0: +- ctl 12 (nid 21 out): 0/22dB (16 steps) + mute pcm0: pcm0: Speaker/Beep Volume (OSS: speaker): -45/0dB pcm0: | pcm0: +- ctl 8 (nid 13 out): -45/0dB (16 steps) + mute pcm0: pcm0: Recording Level (OSS: rec): 0/22dB pcm0: | pcm0: +- ctl 12 (nid 21 out): 0/22dB (16 steps) + mute pcm0: +- ctl 19 (nid 30 out): mute pcm0: pcm0: Input Monitoring Level (OSS: igain): -34/0dB pcm0: | pcm0: +- ctl 8 (nid 13 out): -45/0dB (16 steps) + mute pcm0: +- ctl 10 (nid 18 out): -34/12dB (32 steps) + mute pcm0: +- ctl 11 (nid 19 out): -34/12dB (32 steps) + mute pcm0: pcm0: Mixer "vol": pcm0: Mixer "pcm": pcm0: Mixer "speaker": pcm0: Mixer "line": pcm0: Mixer "mic": pcm0: Mixer "rec": pcm0: Mixer "igain": pcm0: Mixer "ogain": pcm0: clone manager: deadline=750ms flags=0x8000001e pcm0: sndbuf_setmap 7a40000, 10000; 0xffffff80cd34b000 -> 7a40000 pcm0: sndbuf_setmap 7a80000, 10000; 0xffffff80cd38b000 -> 7a80000 hdacc1: at cad 1 on hdac0 hdacc1: Root Node at nid=0: 1 subnodes 1-1 unknown: at nid 1 on hdacc1 (no driver attached) usbus0: 12Mbps Full Speed USB v1.0 usbus1: 12Mbps Full Speed USB v1.0 usbus2: 12Mbps Full Speed USB v1.0 usbus3: 12Mbps Full Speed USB v1.0 usbus4: 12Mbps Full Speed USB v1.0 usbus5: 480Mbps High Speed USB v2.0 acpi_tz0: _AC3: temperature 71.0 >= setpoint 40.0 acpi_tz0: _AC2: temperature 71.0 >= setpoint 50.0 acpi_tz0: _AC1: temperature 71.0 >= setpoint 60.0 acpi_tz0: _AC0: temperature 71.0 >= setpoint 70.0 acpi_tz0: switched from NONE to _AC0: 71.0C ugen0.1: at usbus0 uhub0: on usbus0 ugen1.1: at usbus1 uhub1: on usbus1 ugen2.1: at usbus2 uhub2: on usbus2 ugen3.1: at usbus3 uhub3: on usbus3 ugen4.1: at usbus4 uhub4: on usbus4 ugen5.1: at usbus5 uhub5: on usbus5 ahcich0: AHCI reset... ahcich0: SATA connect time=1800us status=00000113 ahcich0: AHCI reset: device found ata0: reset tp1 mask=03 ostat0=50 ostat1=00 ahcich0: AHCI reset: device ready after 100ms (aprobe0:ahcich0:0:0:0): SIGNATURE: 0000 ata0: stat0=0x00 err=0x01 lsb=0x14 msb=0xeb ata0: stat1=0x00 err=0x00 lsb=0x00 msb=0x00 ata0: reset tp2 stat0=00 stat1=00 devices=0x10000 (aprobe1:ata0:0:0:0): SIGNATURE: eb14 battery0: battery initialization start battery1: battery initialization start acpi_acad0: acline initialization start acpi_acad0: On Line acpi_acad0: acline initialization done, tried 1 times acpi_tz0: _AC3: temperature 71.0 >= setpoint 40.0 acpi_tz0: _AC2: temperature 71.0 >= setpoint 50.0 acpi_tz0: _AC1: temperature 71.0 >= setpoint 60.0 acpi_tz0: _AC3: temperature 71.0 >= setpoint 40.0 acpi_tz0: _AC2: temperature 71.0 >= setpoint 50.0 acpi_tz0: _AC1: temperature 71.0 >= setpoint 60.0 acpi_tz0: switched from _AC0 to _AC1: 71.0C battery0: battery initialization done, tried 1 times uhub0: 2 ports with 2 removable, self powered uhub1: 2 ports with 2 removable, self powered uhub2: 2 ports with 2 removable, self powered uhub3: 2 ports with 2 removable, self powered uhub4: 2 ports with 2 removable, self powered (probe0:ctl2cam0:0:1:0): Error 6, Unretryable error ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0: ATA-7 SATA 1.x device ada0: Serial Number 5MA83WKD ada0: 150.000MB/s transfers (SATA 1.x, UDMA5, PIO 8192bytes) ada0: 152627MB (312581808 512 byte sectors: 16H 63S/T 16383C) GEOM: new disk ada0 ada0: Previously was known as ad4 pass0 at ahcich0 bus 0 scbus0 target 0 lun 0 pass0: ATA-7 SATA 1.x device pass0: Serial Number 5MA83WKD pass0: 150.000MB/s transfers (SATA 1.x, UDMA5, PIO 8192bytes) pass1 at ata0 bus 0 scbus1 target 0 lun 0 pass1: Removable CD-ROM SCSI-0 device pass1: Serial Number HE58 101390 pass1: 16.700MB/s transfers (WDMA2, ATAPI 12bytes, PIO 65534bytes) (cd0:ata0:0:0:0): SCSI status error (cd0:ata0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd0:ata0:0:0:0): CAM status: SCSI Status Error (cd0:ata0:0:0:0): SCSI status: Check Condition (cd0:ata0:0:0:0): SCSI sense: NOT READY asc:3a,1 (Medium not present - tray closed) (cd0:ata0:0:0:0): Error 6, Unretryable error cd0 at ata0 bus 0 scbus1 target 0 lun 0 cd0: Removable CD-ROM SCSI-0 device cd0: Serial Number HE58 101390 cd0: 16.700MB/s transfers (WDMA2, ATAPI 12bytes, PIO 65534bytes) cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed SMP: AP CPU #1 Launched! cpu1 AP: ID: 0x01000000 VER: 0x80050010 LDR: 0x00000000 DFR: 0xffffffff lint0: 0x00010700 lint1: 0x00000400 TPR: 0x00000000 SVR: 0x000001ff timer: 0x000100ef therm: 0x00010000 err: 0x000000f0 pmc: 0x00010400 TSC timecounter discards lower 7 bit(s) Timecounter "TSC-low" frequency 15585831 Hz quality -100 WARNING: WITNESS option enabled, expect reduced performance. GEOM: new disk cd0 (cd0:ata0:0:0:0): SCSI status error (cd0:ata0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd0:ata0:0:0:0): CAM status: SCSI Status Error (cd0:ata0:0:0:0): SCSI status: Check Condition (cd0:ata0:0:0:0): SCSI sense: NOT READY asc:3a,1 (Medium not present - tray closed) (cd0:ata0:0:0:0): Error 6, Unretryable error (cd0:ata0:0:0:0): SCSI status error (cd0:ata0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd0:ata0:0:0:0): CAM status: SCSI Status Error (cd0:ata0:0:0:0): SCSI status: Check Condition (cd0:ata0:0:0:0): SCSI sense: NOT READY asc:3a,1 (Medium not present - tray closed) (cd0:ata0:0:0:0): Error 6, Unretryable error (cd0:ata0:0:0:0): SCSI status error (cd0:ata0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd0:ata0:0:0:0): CAM status: SCSI Status Error (cd0:ata0:0:0:0): SCSI status: Check Condition (cd0:ata0:0:0:0): SCSI sense: NOT READY asc:3a,1 (Medium not present - tray closed) (cd0:ata0:0:0:0): Error 6, Unretryable error Root mount waiting for: usbus5 uhub5: 10 ports with 10 removable, self powered Trying to mount root from ufs:/dev/ad4s1a [rw]... start_init: trying /sbin/init bge0: link DOWN acpi_tz0: _AC3: temperature 66.0 >= setpoint 40.0 acpi_tz0: _AC2: temperature 66.0 >= setpoint 50.0 -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 From owner-freebsd-current@FreeBSD.ORG Tue May 1 11:54:07 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 17B0F106566B for ; Tue, 1 May 2012 11:54:07 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from csmtp2.one.com (csmtp2.one.com [91.198.169.22]) by mx1.freebsd.org (Postfix) with ESMTP id C56D68FC12 for ; Tue, 1 May 2012 11:54:06 +0000 (UTC) Received: from [192.168.187.69] (unknown [87.54.33.251]) by csmtp2.one.com (Postfix) with ESMTPA id 3E13E303DA1E; Tue, 1 May 2012 11:53:59 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=windows-1252 From: Erik Cederstrand In-Reply-To: Date: Tue, 1 May 2012 13:53:58 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20120426093548.GR2358@deviant.kiev.zoral.com.ua> <20120426134140.GF14350@lo0.su> <4F99ACF9.2050609@infracaninophile.co.uk> <42D8809D-0E99-47A5-802F-71991B5B0B8D@cederstrand.dk> To: Tim Kientzle X-Mailer: Apple Mail (2.1257) Cc: freebsd-current FreeBSD Subject: Re: [RFC] Un-staticise the toolchain X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2012 11:54:07 -0000 Den 01/05/2012 kl. 07.52 skrev Tim Kientzle: >=20 > On Apr 30, 2012, at 6:41 AM, Erik Cederstrand wrote: >>=20 >> Can anyone explain to me why the dynamically linked version is = significantly slower? What are the extra steps involved compared to a = statically linked binary? >=20 > At the risk of dramatically over-simplifying=85. >=20 > When a static binary is started by the kernel, it does the following: > * Initializes some libc internals. > * Calls main. >=20 > When a dynamic binary is started by the kernel, it does the following: > * Initializes some libc internals. > * For every dynamic library referenced by this executable: > - loads the dynamic library into memory > - fixes up references > * Calls main >=20 > The process of loading the required libraries and fixing up references > can be quite time-consuming. Thanks for the explanation. In the previous 'make index' benchmark by = Chris, make is called very often, which means the dynamic libraries = should already be loaded into memory after the first run, right? Which = means the extra time is being spent fixing up references? Erik= From owner-freebsd-current@FreeBSD.ORG Tue May 1 13:56:04 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48AFB106564A for ; Tue, 1 May 2012 13:56:04 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from noop.in-addr.com (mail.in-addr.com [IPv6:2001:470:8:162::1]) by mx1.freebsd.org (Postfix) with ESMTP id 0C8FE8FC14 for ; Tue, 1 May 2012 13:56:04 +0000 (UTC) Received: from gjp by noop.in-addr.com with local (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SPDYA-000D3W-M2; Tue, 01 May 2012 09:55:30 -0400 Date: Tue, 1 May 2012 09:55:30 -0400 From: Gary Palmer To: Erik Cederstrand Message-ID: <20120501135530.GA50127@in-addr.com> References: <20120426093548.GR2358@deviant.kiev.zoral.com.ua> <20120426134140.GF14350@lo0.su> <4F99ACF9.2050609@infracaninophile.co.uk> <42D8809D-0E99-47A5-802F-71991B5B0B8D@cederstrand.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on noop.in-addr.com); SAEximRunCond expanded to false Cc: freebsd-current FreeBSD Subject: Re: [RFC] Un-staticise the toolchain X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2012 13:56:04 -0000 On Tue, May 01, 2012 at 01:53:58PM +0200, Erik Cederstrand wrote: > Den 01/05/2012 kl. 07.52 skrev Tim Kientzle: > > > > On Apr 30, 2012, at 6:41 AM, Erik Cederstrand wrote: > >> > >> Can anyone explain to me why the dynamically linked version is significantly slower? What are the extra steps involved compared to a statically linked binary? > > > > At the risk of dramatically over-simplifying?. > > > > When a static binary is started by the kernel, it does the following: > > * Initializes some libc internals. > > * Calls main. > > > > When a dynamic binary is started by the kernel, it does the following: > > * Initializes some libc internals. > > * For every dynamic library referenced by this executable: > > - loads the dynamic library into memory > > - fixes up references > > * Calls main > > > > The process of loading the required libraries and fixing up references > > can be quite time-consuming. > > Thanks for the explanation. In the previous 'make index' benchmark by > Chris, make is called very often, which means the dynamic libraries > should already be loaded into memory after the first run, right? Which > means the extra time is being spent fixing up references? To an extent, yes. However the kernel still has to do some work to resolve the filename for the library to an inode, check to see if that inode is already loaded into memory, and then map the pages for the shared libraries into the new process that is requesting them. I may be misremembering (it is many many years since I had anything to do with the VM system) but I think some of that effort is non-trivial. If you want a high-level view of what goes on run ldd `which ls` check that it has libraries to load and doesn't say "not a dynamic ELF executable", and then run: ktrace ls kdump | more All the system calls related to resolving and loading shared libraries take time. I realise "ls" is not "make", but it should give you an idea. Gary From owner-freebsd-current@FreeBSD.ORG Tue May 1 14:27:41 2012 Return-Path: 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 C4979106566C; Tue, 1 May 2012 14:27:41 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) by mx1.freebsd.org (Postfix) with ESMTP id 960968FC0A; Tue, 1 May 2012 14:27:41 +0000 (UTC) Received: from [209.249.190.124] (port=56103 helo=[10.2.212.229]) by vps.hungerhost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77) (envelope-from ) id 1SPE3I-0007HC-O8; Tue, 01 May 2012 10:27:40 -0400 Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: George Neville-Neil In-Reply-To: <20120420190309.GA5617@onelab2.iet.unipi.it> Date: Tue, 1 May 2012 10:27:42 -0400 Content-Transfer-Encoding: 7bit Message-Id: References: <20120419133018.GA91364@onelab2.iet.unipi.it> <20120420190309.GA5617@onelab2.iet.unipi.it> To: Luigi Rizzo X-Mailer: Apple Mail (2.1257) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - neville-neil.com Cc: current@freebsd.org, net@freebsd.org Subject: Re: more network performance info: ether_output() X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2012 14:27:41 -0000 On Apr 20, 2012, at 15:03 , Luigi Rizzo wrote: > Continuing my profiling on network performance, another place > were we waste a lot of time is if_ethersubr.c::ether_output() > > In particular, from the beginning of ether_output() to the > final call to ether_output_frame() the code takes slightly > more than 210ns on my i7-870 CPU running at 2.93 GHz + TurboBoost. > In particular: > > - the route does not have a MAC address (lle) attached, which causes > arpresolve() to be called all the times. This consumes about 100ns. > It happens also with locally sourced TCP. > Using the flowtable cuts this time down to about 30-40ns > > - another 100ns is spend to copy the MAC header into the mbuf, > and then check whether a local copy should be looped back. > Unfortunately the code here is a bit convoluted so the > header fields are copied twice, and using memcpy on the > individual pieces. > > Note that all the above happens not just with my udp flooding > tests, but also with regular TCP traffic. Hi Luigi, I'm really glad you're working on this. I may have missed this in a thread but are you tracking these somewhere so we can pick them up and fix them? Also, how are you doing the measurements. Sorry, if these have been answered before. Best, George From owner-freebsd-current@FreeBSD.ORG Tue May 1 15:20:48 2012 Return-Path: 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 2AF41106564A; Tue, 1 May 2012 15:20:48 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id DBF5A8FC16; Tue, 1 May 2012 15:20:47 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id A54C87300A; Tue, 1 May 2012 17:40:31 +0200 (CEST) Date: Tue, 1 May 2012 17:40:31 +0200 From: Luigi Rizzo To: George Neville-Neil Message-ID: <20120501154031.GB80942@onelab2.iet.unipi.it> References: <20120419133018.GA91364@onelab2.iet.unipi.it> <20120420190309.GA5617@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: current@freebsd.org, net@freebsd.org Subject: Re: more network performance info: ether_output() X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2012 15:20:48 -0000 On Tue, May 01, 2012 at 10:27:42AM -0400, George Neville-Neil wrote: > > On Apr 20, 2012, at 15:03 , Luigi Rizzo wrote: > > > Continuing my profiling on network performance, another place > > were we waste a lot of time is if_ethersubr.c::ether_output() > > > > In particular, from the beginning of ether_output() to the > > final call to ether_output_frame() the code takes slightly > > more than 210ns on my i7-870 CPU running at 2.93 GHz + TurboBoost. > > In particular: > > > > - the route does not have a MAC address (lle) attached, which causes > > arpresolve() to be called all the times. This consumes about 100ns. > > It happens also with locally sourced TCP. > > Using the flowtable cuts this time down to about 30-40ns > > > > - another 100ns is spend to copy the MAC header into the mbuf, > > and then check whether a local copy should be looped back. > > Unfortunately the code here is a bit convoluted so the > > header fields are copied twice, and using memcpy on the > > individual pieces. > > > > Note that all the above happens not just with my udp flooding > > tests, but also with regular TCP traffic. > > Hi Luigi, > > I'm really glad you're working on this. I may have missed this in a thread > but are you tracking these somewhere so we can pick them up and fix them? > > Also, how are you doing the measurements. The measurements are done with tools/tools/netrate/netsend and kernel patches to return from sendto() at various places in the stack (from the syscall entry point down to the device driver). A patch is attached. You don't really need netmap to run it, it was just a convenient place to put the variables. I am not sure how much we can "fix", there are multiple expensive functions on the tx path, and probably also on the rx path. My hope at least for the tx path is that we can find out a way to install a "fastpath" handler in the socket. When there is no handler installed (e.g. on the first packet or unsupported protocols/interfaces) everything works as usual. Then when the packet reaches the bottom of the stack, we try to update the socket with a copy of the headers generated in the process, and the name of the fastpath function to be called. Next transmissions will then be able to shortcut the stack and go straight to the device output routine. I don't have data on the receive path or good ideas on how to proceed -- the advantage of the tx path is that traffic is implicitly classified, whereas it might not be the case for incoming traffic, and classification might be the expensive step. Hopefully we'll have time to discuss this next week in ottawa. cheers luigi From owner-freebsd-current@FreeBSD.ORG Tue May 1 17:34:11 2012 Return-Path: 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 D2C251065670; Tue, 1 May 2012 17:34:11 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) by mx1.freebsd.org (Postfix) with ESMTP id 8A8158FC17; Tue, 1 May 2012 17:34:11 +0000 (UTC) Received: from [209.249.190.124] (port=59026 helo=[10.2.212.229]) by vps.hungerhost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77) (envelope-from ) id 1SPGxm-0005n9-MF; Tue, 01 May 2012 13:34:10 -0400 Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: George Neville-Neil In-Reply-To: <20120501154031.GB80942@onelab2.iet.unipi.it> Date: Tue, 1 May 2012 13:34:12 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <265D6A39-2F35-4D31-91EF-16146E77E92E@neville-neil.com> References: <20120419133018.GA91364@onelab2.iet.unipi.it> <20120420190309.GA5617@onelab2.iet.unipi.it> <20120501154031.GB80942@onelab2.iet.unipi.it> To: Luigi Rizzo X-Mailer: Apple Mail (2.1257) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - neville-neil.com Cc: current@freebsd.org, net@freebsd.org Subject: Re: more network performance info: ether_output() X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2012 17:34:12 -0000 On May 1, 2012, at 11:40 , Luigi Rizzo wrote: > On Tue, May 01, 2012 at 10:27:42AM -0400, George Neville-Neil wrote: >>=20 >> On Apr 20, 2012, at 15:03 , Luigi Rizzo wrote: >>=20 >>> Continuing my profiling on network performance, another place >>> were we waste a lot of time is if_ethersubr.c::ether_output() >>>=20 >>> In particular, from the beginning of ether_output() to the >>> final call to ether_output_frame() the code takes slightly >>> more than 210ns on my i7-870 CPU running at 2.93 GHz + TurboBoost. >>> In particular: >>>=20 >>> - the route does not have a MAC address (lle) attached, which causes >>> arpresolve() to be called all the times. This consumes about 100ns. >>> It happens also with locally sourced TCP. >>> Using the flowtable cuts this time down to about 30-40ns >>>=20 >>> - another 100ns is spend to copy the MAC header into the mbuf, >>> and then check whether a local copy should be looped back. >>> Unfortunately the code here is a bit convoluted so the >>> header fields are copied twice, and using memcpy on the >>> individual pieces. >>>=20 >>> Note that all the above happens not just with my udp flooding >>> tests, but also with regular TCP traffic. >>=20 >> Hi Luigi, >>=20 >> I'm really glad you're working on this. I may have missed this in a = thread >> but are you tracking these somewhere so we can pick them up and fix = them? >>=20 >> Also, how are you doing the measurements. >=20 > The measurements are done with tools/tools/netrate/netsend and > kernel patches to return from sendto() at various places in the > stack (from the syscall entry point down to the device driver). > A patch is attached. You don't really need netmap to run it, > it was just a convenient place to put the variables. >=20 > I am not sure how much we can "fix", there are multiple expensive > functions on the tx path, and probably also on the rx path. >=20 > My hope at least for the tx path is that we can find out a way to = install a > "fastpath" handler in the socket. > When there is no handler installed (e.g. on the first packet or > unsupported protocols/interfaces) everything works as usual. Then > when the packet reaches the bottom of the stack, we try to update > the socket with a copy of the headers generated in the process, and > the name of the fastpath function to be called. Next transmissions > will then be able to shortcut the stack and go straight to the > device output routine. >=20 > I don't have data on the receive path or good ideas on how to proceed = -- the > advantage of the tx path is that traffic is implicitly classified, > whereas it might not be the case for incoming traffic, and = classification > might be the expensive step. >=20 > Hopefully we'll have time to discuss this next week in ottawa. Yes, I think we should. Best, George From owner-freebsd-current@FreeBSD.ORG Tue May 1 17:51:47 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2FC4F1065674; Tue, 1 May 2012 17:51:47 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id DB0AD8FC0C; Tue, 1 May 2012 17:51:46 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1SPHEn-0002aB-SR>; Tue, 01 May 2012 19:51:45 +0200 Received: from e178020237.adsl.alicedsl.de ([85.178.20.237] helo=thor.walstatt.dyndns.org) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1SPHEn-0005kt-N8>; Tue, 01 May 2012 19:51:45 +0200 Message-ID: <4FA022AB.5090706@zedat.fu-berlin.de> Date: Tue, 01 May 2012 19:51:39 +0200 From: "O. Hartmann" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120430 Thunderbird/12.0 MIME-Version: 1.0 To: freebsd-performance@freebsd.org, Current FreeBSD X-Enigmail-Version: 1.5pre Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigC31A0724EDD7B88BD20AF2FC" X-Originating-IP: 85.178.20.237 Cc: Subject: LLVM compiler backend for AMD Radeon HD r600 - the potential solution for OpenCL in FreeBSD? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2012 17:51:47 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC31A0724EDD7B88BD20AF2FC Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable I read this week this article on Phoronix: http://www.phoronix.com/scan.php?page=3Darticle&item=3Damd_r600g_llvm&num= =3D1 Well, it looks promising to me in terms of having also OpenCL capabilities for GPGPU, but as the report says, the code is not finished and still in a very preliminary stage. What is the opinion of the FreeBSD people about this approach? Does the Gallium3D/Mesa driver with LLVM have the ability to bring professionality of HPC/GPGPU to FreeBSD? Or is it a dead end? I'm not familiar with the details of what's necessary for compiling executables for a specific GPU but the compiler, as far as I know, especially the code generator, needs to know about chip's internal and so I fear it's like nVidia's chips a black box. Oliver --------------enigC31A0724EDD7B88BD20AF2FC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJPoCKxAAoJEOgBcD7A/5N8PuQH/1n353gUEB0HsLlna2JyBhnm 2AjHjAjIRildNpdaaA2+mEpiUXTZ1R037nsZ+axeKcOtTR7++XE06VsjN0h3BMHG JpKtCrvm9j8i0i9ptQ6qkDcVEBmiOPZ3jt+7UNC+kkS2kLjBhXOraOdcJmAlT0gk 2KC4ouzDPaWgQqscdZIcOZmW7ylaVKUrt+QYzyYP0898Lg03X3ismo5c/yVs7Lu3 jZtzi6hvq9umCDFXAGCOwauNTSCPCxS5z56Ne8gRSjzI0o2tah5WFut4WaRLdc4D RkLm/yEbTKSRlH5A378Jf7dn0I5wwxXASahsI/M13t/YhZah5OKr0R/y7Ken1ZA= =i9l5 -----END PGP SIGNATURE----- --------------enigC31A0724EDD7B88BD20AF2FC-- From owner-freebsd-current@FreeBSD.ORG Tue May 1 18:17:40 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A866F106564A; Tue, 1 May 2012 18:17:40 +0000 (UTC) (envelope-from gperez@entel.upc.edu) Received: from dash.upc.es (dash.upc.es [147.83.2.50]) by mx1.freebsd.org (Postfix) with ESMTP id 2B5B38FC15; Tue, 1 May 2012 18:17:39 +0000 (UTC) Received: from ackerman2.upc.es (ackerman2.upc.es [147.83.2.244]) by dash.upc.es (8.14.1/8.13.1) with ESMTP id q41IHWTL007663 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 1 May 2012 20:17:33 +0200 Received: from portgus.lan (17.Red-83-38-184.dynamicIP.rima-tde.net [83.38.184.17]) (authenticated bits=0) by ackerman2.upc.es (8.14.4/8.14.4) with ESMTP id q41IHSUT008023 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 1 May 2012 20:17:32 +0200 Message-ID: <4FA028D9.1010403@entel.upc.edu> Date: Tue, 01 May 2012 20:18:01 +0200 From: =?ISO-8859-15?Q?Gustau_P=E9rez_i_Querol?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120422 Thunderbird/12.0 MIME-Version: 1.0 To: Jason Evans References: <4F9E9E06.4070004@entel.upc.edu> <2D080258-652B-4EFA-8F6F-6ECA3CA4404B@freebsd.org> In-Reply-To: <2D080258-652B-4EFA-8F6F-6ECA3CA4404B@freebsd.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.70 on 147.83.2.244 X-Mail-Scanned: Criba 2.0 + Clamd X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (dash.upc.es [147.83.2.50]); Tue, 01 May 2012 20:17:33 +0200 (CEST) Cc: avilla@freebsd.org, Adrian Chadd , FreeBSD current Subject: Re: RFC: jemalloc: qdbus sigsegv in malloc_init X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2012 18:17:40 -0000 Al 30/04/2012 21:34, En/na Jason Evans ha escrit: > On Apr 30, 2012, at 7:13 AM, Gustau Pérez i Querol wrote: >> the kde team is seeing some strange problems with the new version (4.8.1) of devel/dbus-qt4 with current. It does work with stable. I also suspect that the problem described below is affecting the experimental cinnamon port (an alternative to gnome3, possible replacement of gnome2). >> >> The problem happens with both i386 and amd64 with empty /etc/malloc.conf and simple /etc/make.conf. Everything compiled with base gcc (no clang). The kernel was compiled with no debug support, but it can enable if needed. There are reports from avilla@freebsd.org of the same behavior with clang compiled world and kernel and with MALLOC_PRODUCTION=yes. >> >> When qdbus starts, it segfauts. The backtrace of the problem with r234769 can be found here: http://pastebin.com/ryBXtqGF. When starting the qdbus daemon by hand in a X+twm session, we see it calls calloc many times and after a fixed number of times segfaults. We see it segfaults at rb_gen (a quite large macro defined at $SRC_BASE/contrib/jemalloc/include/jemalloc/internal/rb.h). >> >> If the daemon is started by hand, I'm able to skip all the calls qdbus makes to calloc till the one causing the segfault. At that point, at rb_gen, we don't exactly know what is going on or how to debug the macro. Ktrace are available, but we were unable to find anything new from them. >> >> With old versions of current before the jemalloc imports (as of March 30th) the daemon segfaulted at malloc.c:2426. With revisions during April 20 to 24th (can be more precise, it was during the jemalloc imports) the daemon segfaulted at malloc_init. Bts are available if needed, and if necessary I can go back to those revision and recompile world+kernel to see its behavior. >> >> Any help from freebsd-current@ (perhaps Jason Evans can help us) will be appreciated. Any additional info, like source revisions, can be provided. I would like to stress that the experimental devel/dbus-qt4 works fine with recent stable. > The crash is happening in page run management, so there is some pretty bad memory corruption going on by the time of the crash. If I understand you correctly, you have reproduced the crash on a system that does *not* have MALLOC_PRODUCTION defined, which means that none of the assertions in jemalloc caught the problem. > > Adrian Chadd made the excellent suggestion of trying valgrind; it's likely to point out the problem almost immediately. If that doesn't work, the utrace functionality in malloc may help you figure out what activity has occurred by the time of the crash, and give you a better understanding of what happened to memory around the address that is involved in the crash. Thanks all for your suggestions. It would appear devel/dbus-qt4 has some problems with multithread management, the daemon has a problem which consists in starting a lot of threads and leading it to be finished due to stack exhaustion. Valgrind suggested to increase the stack size, doing so made things even worse; the qdbus daemon was able to spawn even more threads, causing the machine to need more memory than the physically allocated (that is, it started to use swap). So the problem seems to be not related to jemalloc or malloc. As the experimental 4.8.1 devel/dbus-qt4 port works fine in stable, the problem has do to with some differences between head and stable. When we get more hints where the problem is, I will post them in a new thread in freebsd-current@. Anyhow, thanks again for your suggestions! Gus From owner-freebsd-current@FreeBSD.ORG Tue May 1 21:09:10 2012 Return-Path: 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 AFA7B106564A; Tue, 1 May 2012 21:09:10 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) by mx1.freebsd.org (Postfix) with ESMTP id 4E7268FC0A; Tue, 1 May 2012 21:09:10 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id EF43825D389C; Tue, 1 May 2012 21:09:08 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 1E181BE609F; Tue, 1 May 2012 21:09:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id A+i8h3SLwvPG; Tue, 1 May 2012 21:09:06 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 2AADCBE609D; Tue, 1 May 2012 21:09:05 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <20120501154031.GB80942@onelab2.iet.unipi.it> Date: Tue, 1 May 2012 21:09:05 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <6BF3F3EE-23CF-4FF6-B513-93E985CEE07E@lists.zabbadoz.net> References: <20120419133018.GA91364@onelab2.iet.unipi.it> <20120420190309.GA5617@onelab2.iet.unipi.it> <20120501154031.GB80942@onelab2.iet.unipi.it> To: Luigi Rizzo X-Mailer: Apple Mail (2.1084) Cc: George Neville-Neil , current@freebsd.org, net@freebsd.org Subject: Re: more network performance info: ether_output() X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2012 21:09:10 -0000 On 1. May 2012, at 15:40 , Luigi Rizzo wrote: > On Tue, May 01, 2012 at 10:27:42AM -0400, George Neville-Neil wrote: >>=20 >> On Apr 20, 2012, at 15:03 , Luigi Rizzo wrote: >>=20 >>> Continuing my profiling on network performance, another place >>> were we waste a lot of time is if_ethersubr.c::ether_output() >>>=20 >>> In particular, from the beginning of ether_output() to the >>> final call to ether_output_frame() the code takes slightly >>> more than 210ns on my i7-870 CPU running at 2.93 GHz + TurboBoost. >>> In particular: >>>=20 >>> - the route does not have a MAC address (lle) attached, which causes >>> arpresolve() to be called all the times. This consumes about 100ns. >>> It happens also with locally sourced TCP. >>> Using the flowtable cuts this time down to about 30-40ns >>>=20 >>> - another 100ns is spend to copy the MAC header into the mbuf, >>> and then check whether a local copy should be looped back. >>> Unfortunately the code here is a bit convoluted so the >>> header fields are copied twice, and using memcpy on the >>> individual pieces. >>>=20 >>> Note that all the above happens not just with my udp flooding >>> tests, but also with regular TCP traffic. >>=20 >> Hi Luigi, >>=20 >> I'm really glad you're working on this. I may have missed this in a = thread >> but are you tracking these somewhere so we can pick them up and fix = them? >>=20 >> Also, how are you doing the measurements. >=20 > The measurements are done with tools/tools/netrate/netsend and > kernel patches to return from sendto() at various places in the > stack (from the syscall entry point down to the device driver). > A patch is attached. I think that was lost on the way. Can you mail it or put it somewhere and send a link? > You don't really need netmap to run it, > it was just a convenient place to put the variables. >=20 > I am not sure how much we can "fix", there are multiple expensive > functions on the tx path, and probably also on the rx path. >=20 > My hope at least for the tx path is that we can find out a way to = install a > "fastpath" handler in the socket. > When there is no handler installed (e.g. on the first packet or > unsupported protocols/interfaces) everything works as usual. Then > when the packet reaches the bottom of the stack, we try to update > the socket with a copy of the headers generated in the process, and > the name of the fastpath function to be called. Next transmissions > will then be able to shortcut the stack and go straight to the > device output routine. >=20 > I don't have data on the receive path or good ideas on how to proceed = -- the > advantage of the tx path is that traffic is implicitly classified, > whereas it might not be the case for incoming traffic, and = classification > might be the expensive step. >=20 > Hopefully we'll have time to discuss this next week in ottawa. Yepp:) --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-freebsd-current@FreeBSD.ORG Tue May 1 21:21:51 2012 Return-Path: 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 694FA106566B; Tue, 1 May 2012 21:21:51 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 25A8B8FC08; Tue, 1 May 2012 21:21:51 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id A12377300A; Tue, 1 May 2012 23:41:40 +0200 (CEST) Date: Tue, 1 May 2012 23:41:40 +0200 From: Luigi Rizzo To: "Bjoern A. Zeeb" Message-ID: <20120501214140.GA83902@onelab2.iet.unipi.it> References: <20120419133018.GA91364@onelab2.iet.unipi.it> <20120420190309.GA5617@onelab2.iet.unipi.it> <20120501154031.GB80942@onelab2.iet.unipi.it> <6BF3F3EE-23CF-4FF6-B513-93E985CEE07E@lists.zabbadoz.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6BF3F3EE-23CF-4FF6-B513-93E985CEE07E@lists.zabbadoz.net> User-Agent: Mutt/1.4.2.3i Cc: George Neville-Neil , current@freebsd.org, net@freebsd.org Subject: Re: more network performance info: ether_output() X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2012 21:21:51 -0000 On Tue, May 01, 2012 at 09:09:05PM +0000, Bjoern A. Zeeb wrote: > > On 1. May 2012, at 15:40 , Luigi Rizzo wrote: > > > On Tue, May 01, 2012 at 10:27:42AM -0400, George Neville-Neil wrote: ... > >> Also, how are you doing the measurements. > > > > The measurements are done with tools/tools/netrate/netsend and > > kernel patches to return from sendto() at various places in the > > stack (from the syscall entry point down to the device driver). > > A patch is attached. > > I think that was lost on the way. Can you mail it or put it somewhere > and send a link? nope, my fault, i forgot to put the attachment. I have now put it at http://info.iet.unipi.it/~luigi/netmap/20120501-netmap_drop.diff cheers luigi From owner-freebsd-current@FreeBSD.ORG Tue May 1 22:46:17 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D419106566B; Tue, 1 May 2012 22:46:17 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from csmtp3.one.com (csmtp3.one.com [91.198.169.23]) by mx1.freebsd.org (Postfix) with ESMTP id 26FD08FC0C; Tue, 1 May 2012 22:46:17 +0000 (UTC) Received: from [192.168.1.15] (unknown [217.157.7.221]) by csmtp3.one.com (Postfix) with ESMTPA id 8C8B42427E3A; Tue, 1 May 2012 22:46:06 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: Erik Cederstrand In-Reply-To: <20120501135530.GA50127@in-addr.com> Date: Wed, 2 May 2012 00:46:04 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <13119BE4-531E-4681-89F0-876DC272B18F@cederstrand.dk> References: <20120426093548.GR2358@deviant.kiev.zoral.com.ua> <20120426134140.GF14350@lo0.su> <4F99ACF9.2050609@infracaninophile.co.uk> <42D8809D-0E99-47A5-802F-71991B5B0B8D@cederstrand.dk> <20120501135530.GA50127@in-addr.com> To: Gary Palmer X-Mailer: Apple Mail (2.1257) Cc: freebsd-current FreeBSD Subject: Re: [RFC] Un-staticise the toolchain X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2012 22:46:17 -0000 Den 01/05/2012 kl. 15.55 skrev Gary Palmer: >=20 > If you want a high-level view of what goes on run >=20 > ldd `which ls` >=20 > check that it has libraries to load and doesn't say "not a dynamic ELF > executable", and then run:=20 >=20 > ktrace ls > kdump | more >=20 > All the system calls related to resolving and loading shared libraries > take time. I realise "ls" is not "make", but it should give you an > idea. Just for fun, I did some measurements with ktrace and a static vs = dynamic make. I did 'ktrace make' and 'trace dynamicmake' ('dynamicmake' = produced by running 'make NO_SHARED=3Dno' in /usr/src/usr.bin/make), = just to see where time is spent when loading and running make in the = static and dynamic cases. I did this 100 times for each version = (discarding the first run) and ran through ministat (numbers in msecs): x static.dat = +-------------------------------------------------------------------------= -------+ | x x = | | x x x x x x x = | | x x x x x x x x = | | x x x x x x x x x x x x x = | | x x x x x x x x x x x x x x x x x = | | x x x x x x x x x x x x x x x x x x x x x x x = | |x x x x x x x x x x x x x x x x x x x x x x x x x x x x x = x| | |_____________M__A_______________| = | = +-------------------------------------------------------------------------= -------+ N Min Max Median Avg = Stddev x 100 2.228 2.266 2.242 2.24333 = 0.00794 x dynamic.dat = +-------------------------------------------------------------------------= -------+ | x = | | xx = | | x xx x x x = | | x xx x x xx x = | | x x xx x x xx x x x = | | x x x x x xx x x xx x x x x = | |x x x xx x x x xx x x x x xx x x x x x x = | |x xx x x x xx x x x xx x x x x xx x x x x xx x x x x xx x = x x x| | |_____________M_A_______________| = | = +-------------------------------------------------------------------------= -------+ N Min Max Median Avg = Stddev x 100 2.648 2.691 2.666 2.6669 = 0.00873 So the dynamic version is ca. 0.42 ms, or 16%, slower on my system. I then compared a trace from a static and a dynamic 'make'. Both = selected traces had a running time matching the median of that run. I = cut away all common system calls etc., which resulted in just the steps = involved in loading 'make' to a state where it can start executing. In the static case, this took 0.26 ms. In the dynamic case, this took = 0.57 ms, or 0.31 ms (119%) more. The remaining ca. 0.11 ms (0.42 - 0.31) = are mainly due to the dynamic version having slightly slower IO (read() = and stat()). I have no idea why. The following are the notable steps in = each version: Static version: * 0.09 ms spent execve'ing /usr/bin/make * The rest is mostly sysctl calls Dynamic version: * 0.09 ms spent execve'ing ./dynamicmake and /libexec/ld-elf.so.1 * 0.18 ms spent loading libc.so.7 (incl. reading /etc/libmap.conf and = /var/run/ld-elf.so.hints) * 0.11 ms spent calling sysarch(0x81,0x7fffffffXXXX) (static version = also does this but only uses 0.01 ms. No idea why) * The rest is mostly sysctl and sigprocmask calls Loading of libc.so.7 does indeed seem to be the main culprit. Thanks, Erik= From owner-freebsd-current@FreeBSD.ORG Wed May 2 11:56:50 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A8A8106564A; Wed, 2 May 2012 11:56:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4BAE18FC0C; Wed, 2 May 2012 11:56:50 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 95C34B9AC; Wed, 2 May 2012 07:56:49 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Wed, 2 May 2012 07:56:47 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <20120426093548.GR2358@deviant.kiev.zoral.com.ua> <20120501135530.GA50127@in-addr.com> <13119BE4-531E-4681-89F0-876DC272B18F@cederstrand.dk> In-Reply-To: <13119BE4-531E-4681-89F0-876DC272B18F@cederstrand.dk> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201205020756.47783.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 02 May 2012 07:56:49 -0400 (EDT) Cc: Gary Palmer , Erik Cederstrand Subject: Re: [RFC] Un-staticise the toolchain X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 May 2012 11:56:50 -0000 On Tuesday, May 01, 2012 6:46:04 pm Erik Cederstrand wrote: > Den 01/05/2012 kl. 15.55 skrev Gary Palmer: > > > > If you want a high-level view of what goes on run > > > > ldd `which ls` > > > > check that it has libraries to load and doesn't say "not a dynamic ELF > > executable", and then run: > > > > ktrace ls > > kdump | more > > > > All the system calls related to resolving and loading shared libraries > > take time. I realise "ls" is not "make", but it should give you an > > idea. > > Just for fun, I did some measurements with ktrace and a static vs dynamic make. I did 'ktrace make' and 'trace dynamicmake' ('dynamicmake' produced by running 'make NO_SHARED=no' in /usr/src/usr.bin/make), just to see where time is spent when loading and running make in the static and dynamic cases. I did this 100 times for each version (discarding the first run) and ran through ministat (numbers in msecs): > > x static.dat > +--------------------------------------------------------------------------------+ > | x x | > | x x x x x x x | > | x x x x x x x x | > | x x x x x x x x x x x x x | > | x x x x x x x x x x x x x x x x x | > | x x x x x x x x x x x x x x x x x x x x x x x | > |x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x| > | |_____________M__A_______________| | > +--------------------------------------------------------------------------------+ > N Min Max Median Avg Stddev > x 100 2.228 2.266 2.242 2.24333 0.00794 > > x dynamic.dat > +--------------------------------------------------------------------------------+ > | x | > | xx | > | x xx x x x | > | x xx x x xx x | > | x x xx x x xx x x x | > | x x x x x xx x x xx x x x x | > |x x x xx x x x xx x x x x xx x x x x x x | > |x xx x x x xx x x x xx x x x x xx x x x x xx x x x x xx x x x x| > | |_____________M_A_______________| | > +--------------------------------------------------------------------------------+ > N Min Max Median Avg Stddev > x 100 2.648 2.691 2.666 2.6669 0.00873 > > > So the dynamic version is ca. 0.42 ms, or 16%, slower on my system. > > I then compared a trace from a static and a dynamic 'make'. Both selected traces had a running time matching the median of that run. I cut away all common system calls etc., which resulted in just the steps involved in loading 'make' to a state where it can start executing. > > In the static case, this took 0.26 ms. In the dynamic case, this took 0.57 ms, or 0.31 ms (119%) more. The remaining ca. 0.11 ms (0.42 - 0.31) are mainly due to the dynamic version having slightly slower IO (read() and stat()). I have no idea why. The following are the notable steps in each version: > > Static version: > * 0.09 ms spent execve'ing /usr/bin/make > * The rest is mostly sysctl calls > > Dynamic version: > * 0.09 ms spent execve'ing ./dynamicmake and /libexec/ld-elf.so.1 > * 0.18 ms spent loading libc.so.7 (incl. reading /etc/libmap.conf and /var/run/ld-elf.so.hints) > * 0.11 ms spent calling sysarch(0x81,0x7fffffffXXXX) (static version also does this but only uses 0.01 ms. No idea why) > * The rest is mostly sysctl and sigprocmask calls Keep in mind that the first time each system call is invoked, the runtime linker has to resolve the symbol. You can force the linker to do all that when the object is loaded instead by setting LD_BIND_NOW=yes in the environment of dynamicmake. If that makes the sysarch() call take 0.01 ms, then you know that the extra 0.10 ms is because of rtld doing the lookup of sysarch() on the first sysarch() call. -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Wed May 2 18:06:13 2012 Return-Path: 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 704891065672 for ; Wed, 2 May 2012 18:06:13 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 2F0788FC19 for ; Wed, 2 May 2012 18:06:13 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 671777300A; Wed, 2 May 2012 20:25:57 +0200 (CEST) Date: Wed, 2 May 2012 20:25:57 +0200 From: Luigi Rizzo To: current@freebsd.org, net@frebsd.org Message-ID: <20120502182557.GA93838@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: fast bcopy... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 May 2012 18:06:13 -0000 as part of my netmap investigations, i was looking at how expensive are memory copies, and here are a couple of findings (first one is obvious, the second one less so) 1. especially on 64bit machines, always use multiple of at least 8 bytes (possibly even larger units). The bcopy code in amd64 seems to waste an extra 20ns (on a 3.4 GHz machine) when processing blocks of size 8n + {4,5,6,7}. The difference is relevant, on that machine i have bcopy(src, dst, 1) ~12.9ns (data in L1 cache) bcopy(src, dst, 3) ~12.9ns (data in L1 cache) bcopy(src, dst, 4) ~33.4ns (data in L1 cache) <--- NOTE bcopy(src, dst, 32) ~12.9ns (data in L1 cache) bcopy(src, dst, 63) ~33.4ns (data in L1 cache) <--- NOTE bcopy(src, dst, 64) ~12.9ns (data in L1 cache) Note how the two marked lines are much slower than the others. Same thing happens with data not in L1 bcopy(src, dst, 64) ~ 22ns (not in L1) bcopy(src, dst, 63) ~ 44ns (not in L1) ... Continuing the tests on larger sizes, for the next item: bcopy(src, dst,256) ~19.8ns (data in L1 cache) bcopy(src, dst,512) ~28.8ns (data in L1 cache) bcopy(src, dst,1K) ~39.6ns (data in L1 cache) bcopy(src, dst,4K) ~95.2ns (data in L1 cache) An older P4 running FreeBSD4/32 bit the operand size seems less sensitive to odd sizes. 2. apparently, bcopy is not the fastest way to copy memory. For small blocks and multiples of 32-64 bytes, i noticed that the following is a lot faster (breaking even at about 1 KBytes) static inline void fast_bcopy(void *_src, void *_dst, int l) { uint64_t *src = _src; uint64_t *dst = _dst; for (; l > 0; l-=32) { *dst++ = *src++; *dst++ = *src++; *dst++ = *src++; *dst++ = *src++; } } fast_bcopy(src, dst, 32) ~ 1.8ns (data in L1 cache) fast_bcopy(src, dst, 64) ~ 2.9ns (data in L1 cache) fast_bcopy(src, dst,256) ~10.1ns (data in L1 cache) fast_bcopy(src, dst,512) ~19.5ns (data in L1 cache) fast_bcopy(src, dst,1K) ~38.4ns (data in L1 cache) fast_bcopy(src, dst,4K) ~152.0ns (data in L1 cache) fast_bcopy(src, dst, 32) ~15.3ns (not in L1) fast_bcopy(src, dst,256) ~38.7ns (not in L1) ... The old P4/32 bit also exhibits similar results. Conclusion: if you have to copy packets you might be better off padding the length to a multiple of 32, and using the following function to get the best of both worlds. Sprinkle some prefetch() for better taste. // XXX only for multiples of 32 bytes, non overlapped. static inline void good_bcopy(void *_src, void *_dst, int l) { uint64_t *src = _src; uint64_t *dst = _dst; #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) if (unlikely(l >= 1024)) { bcopy(src, dst, l); return; } for (; l > 0; l-=32) { *dst++ = *src++; *dst++ = *src++; *dst++ = *src++; *dst++ = *src++; } } cheers luigi From owner-freebsd-current@FreeBSD.ORG Wed May 2 21:05:56 2012 Return-Path: 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 8F796106566B for ; Wed, 2 May 2012 21:05:56 +0000 (UTC) (envelope-from ale@FreeBSD.org) Received: from lab.alexdupre.com (alexdupre-1-pt.tunnel.tserv23.zrh1.ipv6.he.net [IPv6:2001:470:25:450::2]) by mx1.freebsd.org (Postfix) with ESMTP id C179E8FC17 for ; Wed, 2 May 2012 21:05:55 +0000 (UTC) Received: (qmail 53017 invoked from network); 2 May 2012 21:05:54 -0000 Received: from atom.alexdupre.com (HELO ?192.168.178.12?) (sysadmin@alexdupre.com@192.168.178.12) by lab.alexdupre.com with ESMTPSA; 2 May 2012 21:05:54 -0000 Message-ID: <4FA1A1AF.3050503@FreeBSD.org> Date: Wed, 02 May 2012 23:05:51 +0200 From: Alex Dupre User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20120312 Firefox/11.0 SeaMonkey/2.8 MIME-Version: 1.0 To: Luigi Rizzo References: <20120502182557.GA93838@onelab2.iet.unipi.it> In-Reply-To: <20120502182557.GA93838@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: current@freebsd.org, net@frebsd.org Subject: Re: fast bcopy... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 May 2012 21:05:56 -0000 Luigi Rizzo ha scritto: > For small blocks and multiples of 32-64 bytes, i noticed that > the following is a lot faster (breaking even at about 1 KBytes) > > static inline void > fast_bcopy(void *_src, void *_dst, int l) > { > uint64_t *src = _src; > uint64_t *dst = _dst; > for (; l> 0; l-=32) { > *dst++ = *src++; > *dst++ = *src++; > *dst++ = *src++; > *dst++ = *src++; > } > } DJB influence? :-) -- Alex Dupre From owner-freebsd-current@FreeBSD.ORG Wed May 2 21:53:02 2012 Return-Path: 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 3844A1065670; Wed, 2 May 2012 21:53:02 +0000 (UTC) (envelope-from snatreju@googlemail.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id 981138FC1C; Wed, 2 May 2012 21:53:01 +0000 (UTC) Received: by wibhj6 with SMTP id hj6so4182756wib.13 for ; Wed, 02 May 2012 14:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=dzjzKXtp5wSal789PEtOy/Nd5/P8p5l8c9/HUFAGrRM=; b=Z7PN6V3lxe+PmQ/qz7ZWkRvDT12xQs/2XCj9itLqJSckqnaybVsxw4uJsoo17zBVye D46osO0zity7KFxVzEtTjs5YMRF2OwnbBT2yNf7Vklz7jC8VF6kJUhbaNRbuapzKRTtU eYeRFVsIuKhKaG1SRe9Un0G8AYVGFT/qctLgRmtg2L4B5pLN6sn+P8zuw2vbUsedQ/B3 CDrGuF+PyokUR9RP9Bn6WE/hTdZuFe9ocf9q4sJ89j39um6BtJVntCn/CKfnq5hOreMP pARaNtB6/fp3T5o2SLR8bYxPmkWURZI3CLqnDvQP2c5aLGcbjG6yCU5zVKtjWpN8H11i sVHQ== Received: by 10.180.79.72 with SMTP id h8mr952158wix.1.1335995575314; Wed, 02 May 2012 14:52:55 -0700 (PDT) Received: from sherwood.local ([89.204.154.196]) by mx.google.com with ESMTPS id fl2sm10956872wib.2.2012.05.02.14.52.53 (version=SSLv3 cipher=OTHER); Wed, 02 May 2012 14:52:54 -0700 (PDT) Date: Wed, 2 May 2012 23:52:49 +0200 From: Steven Atreju To: Luigi Rizzo Message-ID: <20120502215249.GT633@sherwood.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20120502182557.GA93838@onelab2.iet.unipi.it> User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Wed, 02 May 2012 22:24:12 +0000 Cc: current@freebsd.org, net@freebsd.org Subject: Re: fast bcopy... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 May 2012 21:53:02 -0000 Luigi Rizzo wrote: > 2. apparently, bcopy is not the fastest way to copy memory. http://now.cs.berkeley.edu/Td/bcopy.html Best Regards. Steven. From owner-freebsd-current@FreeBSD.ORG Thu May 3 00:10:22 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 372EA1065672; Thu, 3 May 2012 00:10:22 +0000 (UTC) (envelope-from dlt@mebtel.net) Received: from mail959c35.nsolutionszone.com (mail959c35.nsolutionszone.com [209.235.152.149]) by mx1.freebsd.org (Postfix) with ESMTP id AE4F48FC14; Thu, 3 May 2012 00:10:21 +0000 (UTC) X-POP-User: dlt.mebtel.net Received: from localhost (99-194-23-158.dyn.centurytel.net [99.194.23.158]) by mail959c35.nsolutionszone.com (8.13.6/8.13.1) with ESMTP id q42MqMXm006903; Wed, 2 May 2012 22:52:23 GMT Date: Wed, 2 May 2012 18:52:21 -0400 From: Derek Tattersall To: freebsd-ports@freebsd.org Message-ID: <20120502225221.GA61282@oriental.arm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-CSC: 0 X-CHA: v=1.1 cv=8nlY8jQc6aUhywRrzctsLUdS8p5R31SNpIMGL8J8sHQ= c=1 sm=1 a=z1TLwsU0kBEA:10 a=P2oOn6vrs4wA:10 a=GPr01A5e9VcA:10 a=kj9zAlcOel0A:10 a=5FSmvsqyZ8dLHOg+TByL6Q==:17 a=xwPayol1AAAA:8 a=CjxXgO3LAAAA:8 a=pGLkceISAAAA:8 a=Ad-iuJT9Ndu29sZ75jEA:9 a=GecwELLhSOKAhqmPhjwA:7 a=CjuIK1q_8ugA:10 a=0Ob1RWNGeVAA:10 a=rC2wZJ5BpNYA:10 a=MSl-tDqOz04A:10 a=5FSmvsqyZ8dLHOg+TByL6Q==:117 Cc: freebsd-current@freebsd.org Subject: ksh93 build failure X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dlt@mebtel.net List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 00:10:22 -0000 On a 10.0 Current system, cvsupped today, ksh93 fails to build. As best I can determine, the failure is due to a problem of conflicting includes. In file included from /home/ports/usr/ports/shells/ksh93/work/arch/freebsd.amd64/include/ast/ast_wchar.h:113, from /home/ports/usr/ports/shells/ksh93/work/arch/freebsd.amd64/include/ast/wchar.h:22, from /home/ports/usr/ports/shells/ksh93/work/src/cmd/ksh93/include/lexstates.h:85, from /home/ports/usr/ports/shells/ksh93/work/src/cmd/ksh93/include/shlex.h:32, from /home/ports/usr/ports/shells/ksh93/work/src/cmd/ksh93/data/keywords.c:22: /usr/include/../include/wchar.h:102: error: conflicting types for '_sfio_FILE' Has anyone else run into this problem, and if so, what did you do about it. ksh93 builds without error on 9.0 Stable. -- Best regards, Derek Tattersall dlt@mebtel.net dlt666@yahoo.com dtatters@gmail.com From owner-freebsd-current@FreeBSD.ORG Thu May 3 00:58:06 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 91F00106566B; Thu, 3 May 2012 00:58:06 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 37AFB8FC18; Thu, 3 May 2012 00:58:06 +0000 (UTC) Received: by yenl9 with SMTP id l9so1702712yen.13 for ; Wed, 02 May 2012 17:58:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=FUKwYALkR5tq7eyIr11FU09V46czQs+VXa3OC299OKA=; b=fAcmKMglFQxbZd4m6WdtUsGZVGkLwan9UeipRHaRZVIQPC15xoDnRWw42lbJsh5VR6 iRjC/wL+CfkrpZLnDW8Ht3yo5cubANnd1FjjGAJAWErIcgBxfhLBUJE2xEB7hBE1KZoC dCTF5z/3TVqsgDPCl/++OaFrDU/yjqn1RynTlRKxUKrjErJamtWQuCPUSYbnN6iEzLkr uYmqcfRJEVmiSfHsEvF31VR8fl6XoUKGlCHf94uJGM1CKoXrfcrQtk6qoGHCf40jG8Xj YYn/hUQ6cbQE8Iwr3vVlBSRm9FnZ37ZASXn4RMDNVgWH+3U84+sKxq1MKem/9F0HIVab Zw/Q== MIME-Version: 1.0 Received: by 10.50.194.232 with SMTP id hz8mr115119igc.38.1336006685367; Wed, 02 May 2012 17:58:05 -0700 (PDT) Sender: kmacybsd@gmail.com Received: by 10.50.129.39 with HTTP; Wed, 2 May 2012 17:58:05 -0700 (PDT) In-Reply-To: <20120502215249.GT633@sherwood.local> References: <20120502182557.GA93838@onelab2.iet.unipi.it> <20120502215249.GT633@sherwood.local> Date: Thu, 3 May 2012 02:58:05 +0200 X-Google-Sender-Auth: PsoKud2b--Af30RLbY-2r4lysso Message-ID: From: "K. Macy" To: Steven Atreju Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Cc: Luigi Rizzo , current@freebsd.org, net@freebsd.org Subject: Re: fast bcopy... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 00:58:06 -0000 It's highly chipset and processor dependent what works best. Intel now has non-temporal loads and stores which work much better in some cases but provide little benefit in others. -Kip On Wed, May 2, 2012 at 11:52 PM, Steven Atreju wr= ote: > Luigi Rizzo wrote: >> 2. apparently, bcopy is not the fastest way to copy memory. > > http://now.cs.berkeley.edu/Td/bcopy.html > > Best Regards. > > Steven. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" --=20 =A0 =A0=93The real damage is done by those millions who want to 'get by.' The ordinary men who just want to be left in peace. Those who don=92t want their little lives disturbed by anything bigger than themselves. Those with no sides and no causes. Those who won=92t take measure of their own strength, for fear of antagonizing their own weakness. Those who don=92t like to make waves=97or enemies. =A0 =A0Those for whom freedom, honour, truth, and principles are only literature. Those who live small, love small, die small. It=92s the reductionist approach to life: if you keep it small, you=92ll keep it under control. If you don=92t make any noise, the bogeyman won=92t find you. =A0 =A0But it=92s all an illusion, because they die too, those people who roll up their spirits into tiny little balls so as to be safe. Safe?! >From what? Life is always on the edge of death; narrow streets lead to the same place as wide avenues, and a little candle burns itself out just like a flaming torch does. =A0 =A0I choose my own way to burn.=94 =A0 =A0Sophie Scholl From owner-freebsd-current@FreeBSD.ORG Thu May 3 01:11:18 2012 Return-Path: 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 383101065670; Thu, 3 May 2012 01:11:18 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 8E5AB8FC0C; Thu, 3 May 2012 01:11:17 +0000 (UTC) Received: by wgbds12 with SMTP id ds12so1216548wgb.31 for ; Wed, 02 May 2012 18:11:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=//vnWyl0pLbMOQIt4OQO7Yp/P00TxNcdEVdVeGb/uGE=; b=dTl51GoEe+FGYnDN8KmHy9s2Nv7He4Jah39ICbrNBT3ZL+osX+CcJL3bomnM+ZQ5ym COipOeClgq0LdZnCQXM0OUX0Ov9MOcFrthbLZsffqY8ur1S2pu3zAVCsYg/Deugg2GUF aPlZPatbjsLvUnbA1nhDf8hxGCPC6XxEYK3Ax2nvLaKc/HhuZStQtGG3FjWxCKYGQx5p 1wlnuDBnfQgyIUdciwbQULIq1bhU/u0qqXG72ZInjtFuybEt7ZJvd/wLEHkRjXuO/f2e X17zV9ymaV56DQMx6eyGqXldQ3fJw7rZmfRk7KIMxkB/CYoePZ36mqiiUTfiiD4ZEgaA uinA== MIME-Version: 1.0 Received: by 10.180.100.230 with SMTP id fb6mr897818wib.3.1336007476710; Wed, 02 May 2012 18:11:16 -0700 (PDT) Received: by 10.216.193.220 with HTTP; Wed, 2 May 2012 18:11:16 -0700 (PDT) In-Reply-To: <20120502215249.GT633@sherwood.local> References: <20120502182557.GA93838@onelab2.iet.unipi.it> <20120502215249.GT633@sherwood.local> Date: Wed, 2 May 2012 21:11:16 -0400 Message-ID: From: Arnaud Lacombe To: Steven Atreju Content-Type: text/plain; charset=ISO-8859-1 Cc: Luigi Rizzo , current@freebsd.org, net@freebsd.org Subject: Re: fast bcopy... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 01:11:18 -0000 Hi, On Wed, May 2, 2012 at 5:52 PM, Steven Atreju wrote: > Luigi Rizzo wrote: >> 2. apparently, bcopy is not the fastest way to copy memory. > > http://now.cs.berkeley.edu/Td/bcopy.html > "Pentium 166, Triton Chipset, EDO memory"... ahem. - Arnaud > Best Regards. > > Steven. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-current@FreeBSD.ORG Thu May 3 04:31:12 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EAC8D106566B for ; Thu, 3 May 2012 04:31:12 +0000 (UTC) (envelope-from vance.siemens@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id C38488FC0A for ; Thu, 3 May 2012 04:31:12 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so2138160pbb.13 for ; Wed, 02 May 2012 21:31:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=X0oUqxqoUeKqXR7yC1mxRGUrErsVPM76OyBgVCIMlnM=; b=DqzoigL9Thrcvrx+KwxcHjr52D2RDfOamHB086N3++9w/KTjTqArJO0VAu0jRtbLJX S/hDSmNxeZ4OtascZGz16eFU6usU+zSI2afBNTeaL8+ok6rqkrmWMJ+ECxBhqBKqrL/8 QVNxToLfzqGGds2BvNBeIDGKIUdH6IhCHoUcnlMuokH6cjCtHWPtBmqZRuXPfbDmw0yS 4v/8HBO13lUzb6urJVDx8jGsWTvPAez1iUQ1vg/Q6sLKcRN+uLcLblzYEuvnAQe0Fh+Z pIo7XwRw/7xnoi38gfjBCBn1dpPy2VY0BjMFM8aiQW2bhBdehRINcLBF65LOIwx3B50x HFAg== MIME-Version: 1.0 Received: by 10.68.221.136 with SMTP id qe8mr3534618pbc.108.1336019472297; Wed, 02 May 2012 21:31:12 -0700 (PDT) Received: by 10.68.72.228 with HTTP; Wed, 2 May 2012 21:31:12 -0700 (PDT) Date: Thu, 3 May 2012 00:31:12 -0400 Message-ID: From: Vance Siemens To: freebsd-current@freebsd.org Content-Type: text/plain; charset=UTF-8 Subject: FreeBSD 10 prognostication... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 04:31:13 -0000 Can't say that I wouldn't look forward to this, but it sounds a little off: http://www.trollaxor.com/2012/05/freebsd-x-berkeley-unix-apple-quality.html What do others think? --Vance From owner-freebsd-current@FreeBSD.ORG Thu May 3 04:44:25 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E623106564A for ; Thu, 3 May 2012 04:44:25 +0000 (UTC) (envelope-from lsc@luke.xen.prgmr.com) Received: from luke.xen.prgmr.com (luke.xen.prgmr.com [38.99.2.47]) by mx1.freebsd.org (Postfix) with ESMTP id 59D688FC08 for ; Thu, 3 May 2012 04:44:25 +0000 (UTC) Received: by luke.xen.prgmr.com (Postfix, from userid 500) id 07DFF1043D8; Thu, 3 May 2012 00:44:24 -0400 (EDT) Date: Thu, 3 May 2012 00:44:24 -0400 From: "Luke S. Crawford" To: freebsd-current@freebsd.org Message-ID: <20120503044424.GG8940@luke.xen.prgmr.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Subject: Re: FreeBSD 10 prognostication... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 04:44:25 -0000 On Thu, May 03, 2012 at 12:31:12AM -0400, Vance Siemens wrote: > Can't say that I wouldn't look forward to this, but it sounds a little off: > > http://www.trollaxor.com/2012/05/freebsd-x-berkeley-unix-apple-quality.html > > What do others think? Please leave trollaxor on Kuro5hin or slashdot where he belongs. I mean, this isn't even adequacy level stuff. From owner-freebsd-current@FreeBSD.ORG Thu May 3 05:06:32 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 80408106566C for ; Thu, 3 May 2012 05:06:32 +0000 (UTC) (envelope-from grog@lemis.com) Received: from w3.lemis.com (w3.lemis.com [208.86.224.149]) by mx1.freebsd.org (Postfix) with ESMTP id 4EC988FC08 for ; Thu, 3 May 2012 05:06:32 +0000 (UTC) Received: from dereel.lemis.com (1032.x.rootbsd.net [208.86.224.149]) by w3.lemis.com (Postfix) with ESMTP id 92AAE3B856; Thu, 3 May 2012 04:58:57 +0000 (UTC) Received: by dereel.lemis.com (Postfix, from userid 1004) id 482ECDB062; Thu, 3 May 2012 14:58:56 +1000 (EST) Date: Thu, 3 May 2012 14:58:56 +1000 From: Greg 'groggy' Lehey To: Vance Siemens Message-ID: <20120503045856.GD9169@dereel.lemis.com> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XvKFcGCOAo53UbWW" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Organization: The FreeBSD Project Phone: +61-3-5346-1370 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Cc: freebsd-current@freebsd.org Subject: Re: FreeBSD 10 prognostication... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 05:06:32 -0000 --XvKFcGCOAo53UbWW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thursday, 3 May 2012 at 0:31:12 -0400, Vance Siemens wrote: > Can't say that I wouldn't look forward to this, but it sounds a little off: > > http://www.trollaxor.com/2012/05/freebsd-x-berkeley-unix-apple-quality.html > > What do others think? What do you expect of a troll web site? It's all imagination. I don't see any true fact in there. Greg -- Sent from my desktop computer Finger grog@FreeBSD.org for PGP public key. See complete headers for address and phone numbers. This message is digitally signed. If your Microsoft MUA reports problems, please read http://tinyurl.com/broken-mua --XvKFcGCOAo53UbWW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iEYEARECAAYFAk+iEJAACgkQIubykFB6QiMFHQCdE/+W9CJyMudlLa0hn8amRpIN gQcAn3RzuYk8oG5FgdIDE9AZ2XdBXEeB =GTaI -----END PGP SIGNATURE----- --XvKFcGCOAo53UbWW-- From owner-freebsd-current@FreeBSD.ORG Thu May 3 05:23:09 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D333C1065670 for ; Thu, 3 May 2012 05:23:09 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id 881D38FC15 for ; Thu, 3 May 2012 05:23:09 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) for freebsd-current@freebsd.org with esmtp (envelope-from ) id <1SPoVL-0003n6-7h>; Thu, 03 May 2012 07:23:03 +0200 Received: from e178003087.adsl.alicedsl.de ([85.178.3.87] helo=thor.walstatt.dyndns.org) by inpost2.zedat.fu-berlin.de (Exim 4.69) for freebsd-current@freebsd.org with esmtpsa (envelope-from ) id <1SPoVL-00068s-2N>; Thu, 03 May 2012 07:23:03 +0200 Message-ID: <4FA2162E.7010706@zedat.fu-berlin.de> Date: Thu, 03 May 2012 07:22:54 +0200 From: "O. Hartmann" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120502 Thunderbird/12.0.1 MIME-Version: 1.0 CC: freebsd-current@freebsd.org References: In-Reply-To: X-Enigmail-Version: 1.5pre Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD0A529724BDF3A4E9632642E" X-Originating-IP: 85.178.3.87 Subject: Re: FreeBSD 10 prognostication... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 05:23:09 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD0A529724BDF3A4E9632642E Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/03/12 06:31, Vance Siemens wrote: > Can't say that I wouldn't look forward to this, but it sounds a little = off: >=20 > http://www.trollaxor.com/2012/05/freebsd-x-berkeley-unix-apple-quality.= html >=20 > What do others think? >=20 > --Vance OMG! --------------enigD0A529724BDF3A4E9632642E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJPohY2AAoJEOgBcD7A/5N8WiwIAJs7fSFpCSehZt8x9jFNFTFH nKw3SBieZ3GutBQKGrzJzi72LA5sDEPIOAfNBqNEyKrdwW9hyR39ZP2w6ocPYU11 Q7uZmFuFxzjJoaL5v0Gs3uBjklfhEczbdc9p0WTB9ZntasnRNtcoRlYUwog/SPXg G6aNe1TcJ5WdgRxWocL8wjAHdkzS5GIda8fHBe2bZdZGdO/WHzdcbs/6TO7XM09S vWpmKwAz3fZEyz0voA8MQO6dkTgeOf7FyxAGtpIdfi8A8WgryWq62D1GMIGKWwyk TKrtXjLvVVvf0RcrKw3mulj8TW7LncI+eXlkOSvq/JJqWLefREuHqlmgxGw6b/Q= =8wWJ -----END PGP SIGNATURE----- --------------enigD0A529724BDF3A4E9632642E-- From owner-freebsd-current@FreeBSD.ORG Thu May 3 05:44:57 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D8F81065670 for ; Thu, 3 May 2012 05:44:57 +0000 (UTC) (envelope-from jhellenthal@dataix.net) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id CB3718FC0C for ; Thu, 3 May 2012 05:44:56 +0000 (UTC) Received: by ghrr20 with SMTP id r20so1862842ghr.13 for ; Wed, 02 May 2012 22:44:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dataix.net; s=rsa; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; bh=BVPK9m9764EWI0KTX46NlhGhoFSGSfvIcpuWbw+TTW8=; b=JaE0oX3hguy+sUQcVNr0tY2t8QKu9jPapoCkk7rSH7evpBqOW4FFWNLfKzaXKjr8Q8 h1NZqeMT+j63F/wz1CO40Goi59cvn6nMFFF6o8JAcjeX7URiZvmm55l6JDWdqOQuleWQ scqVVbvgJGNPSWh+IpqWvbjjkiunJynRqw8hg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:x-gm-message-state; bh=BVPK9m9764EWI0KTX46NlhGhoFSGSfvIcpuWbw+TTW8=; b=a5WKlw3nkLgiyg6odEBKzsi0rUAE/Om1kWbXzgq9Zin9BiVG6HTi4CoYFoE4rQgp1+ Ac6LC0BaGyzA4Qv//3pUYya5PV/kGV7QUS9gOu/A++e1+S1PS0H5YJMFDu7eT68OhStZ lQafEWcd+iWl6e8RUTw74s/dDVUXydBblaPFHitmIv0PmfBEGXeIgJf/Cp70J/6BLjRz sGm2G1pWJ/uXKjmmgDnIZUKLM0WFmxzghyHXB4NdkZ8cv1qK/IRATqcvwGPkth1tmAEv ketsEmFqPr3TQ4YC5Wj5rLTW7qVFReFhSYid+wU7rXnbTcgdobl2lsUCxFLws3YhwAhJ GAEw== Received: by 10.42.123.66 with SMTP id q2mr380556icr.52.1336023895815; Wed, 02 May 2012 22:44:55 -0700 (PDT) Received: from DataIX.net (adsl-99-181-131-146.dsl.klmzmi.sbcglobal.net. [99.181.131.146]) by mx.google.com with ESMTPS id cg9sm5379842igb.17.2012.05.02.22.44.09 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 May 2012 22:44:54 -0700 (PDT) Received: from DataIX.net (localhost [127.0.0.1]) by DataIX.net (8.14.5/8.14.5) with ESMTP id q435i7gB087327 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 May 2012 01:44:07 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Received: (from jhellenthal@localhost) by DataIX.net (8.14.5/8.14.5/Submit) id q435hMb3077687; Thu, 3 May 2012 01:43:22 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Date: Thu, 3 May 2012 01:43:22 -0400 From: Jason Hellenthal To: Derek Tattersall Message-ID: <20120503054322.GA19695@DataIX.net> References: <20120502225221.GA61282@oriental.arm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120502225221.GA61282@oriental.arm.org> X-Gm-Message-State: ALoCoQk9WZARqxG2NHhpAuw1p3K1XmjhPXGkXbNj/AcDw9uGIfaWn5iz0ciwfmZJK4mnUi6iOqgk Cc: freebsd-current@freebsd.org, freebsd-ports@freebsd.org Subject: Re: ksh93 build failure X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 05:44:57 -0000 On Wed, May 02, 2012 at 06:52:21PM -0400, Derek Tattersall wrote: > On a 10.0 Current system, cvsupped today, ksh93 fails to build. As best > I can determine, the failure is due to a problem of conflicting > includes. > > In file included from /home/ports/usr/ports/shells/ksh93/work/arch/freebsd.amd64/include/ast/ast_wchar.h:113, > from /home/ports/usr/ports/shells/ksh93/work/arch/freebsd.amd64/include/ast/wchar.h:22, > from /home/ports/usr/ports/shells/ksh93/work/src/cmd/ksh93/include/lexstates.h:85, > from /home/ports/usr/ports/shells/ksh93/work/src/cmd/ksh93/include/shlex.h:32, > from /home/ports/usr/ports/shells/ksh93/work/src/cmd/ksh93/data/keywords.c:22: > /usr/include/../include/wchar.h:102: error: conflicting types for '_sfio_FILE' > Has anyone else run into this problem, and if so, what did you do about > it. ksh93 builds without error on 9.0 Stable. Do you perhaps have devel/sfio installed on that machine ? If so can you deinstall and retry the build. -- - (2^(N-1)) From owner-freebsd-current@FreeBSD.ORG Thu May 3 08:15:05 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25DB0106564A for ; Thu, 3 May 2012 08:15:05 +0000 (UTC) (envelope-from jake@avenue22.net) Received: from floor13.viper.enta.net (floor13.viper.enta.net [78.33.24.2]) by mx1.freebsd.org (Postfix) with ESMTP id C965C8FC1A for ; Thu, 3 May 2012 08:15:04 +0000 (UTC) Received: from xz.cx (floor13.viper.enta.net [78.33.24.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jake) by floor13.viper.enta.net (Postfix) with ESMTPSA id C8632BDCB7 for ; Thu, 3 May 2012 09:09:10 +0100 (BST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 03 May 2012 09:09:09 +0100 From: Jake Smith To: In-Reply-To: References: Message-ID: <66592b1b7da37b748398e07e98c2999c@viper-webmail.viper.enta.net> X-Sender: jake@avenue22.net User-Agent: Roundcube Webmail/0.6 Subject: Re: FreeBSD 10 prognostication... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 08:15:05 -0000 On 03.05.2012 05:31, Vance Siemens wrote: > Can't say that I wouldn't look forward to this, but it sounds a > little off: > > > http://www.trollaxor.com/2012/05/freebsd-x-berkeley-unix-apple-quality.html > > What do others think? > > --Vance > _______________________________________________ > 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" I hope this is some kind of sick joke... I can't imagine anything worse. Jake. From owner-freebsd-current@FreeBSD.ORG Thu May 3 09:00:36 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30114106566B for ; Thu, 3 May 2012 09:00:36 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id DD4418FC0A for ; Thu, 3 May 2012 09:00:35 +0000 (UTC) Received: by yhgm50 with SMTP id m50so1363049yhg.13 for ; Thu, 03 May 2012 02:00:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=0gaoW8ikAx8HX/bRyaZq91JR147IjrVBtU3qyGNDWnc=; b=AI6vKjw9Bt8lygQD3hiaxkZfUj8Uk7ukpHwM/nbn0HK3BaCGqe4FZDMjhjcl6KvCco 5hTHSk/K/JjoUwMQGFZmGsa1x5IP4eIyPtGCzvkbhz02gtm3qc9tFdLfXV+NLjqAPdsk fSNs0MZBraoGmMfi29dyLPqYgUlVwLjDb7nd+YMU927wuIfLUEn3BTgn0NfaaKYSwENT bmLw4uqKJsX7WSSX786/+OyLH87cCeSG9N0V9rmxjEEXttlGQp/yw+h8U/q6G3WPymYL q+UUM0Hu/zx8Ck9tQ9yvvqi/AyKKrx3cW0de46CISaIpG6iJdohpa/dK6lWEkTfZgLuZ umGA== MIME-Version: 1.0 Received: by 10.50.46.195 with SMTP id x3mr192097igm.54.1336035634991; Thu, 03 May 2012 02:00:34 -0700 (PDT) Received: by 10.231.210.79 with HTTP; Thu, 3 May 2012 02:00:34 -0700 (PDT) X-Originating-IP: [93.221.174.108] In-Reply-To: References: Date: Thu, 3 May 2012 11:00:34 +0200 Message-ID: From: "C. P. Ghost" To: Vance Siemens Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQnoM9fXgEmAVyHF4sFBHyziY5cUHkiz+gPplCebKpAWbxGI4cv+lxNiOOhjQdzndB7kpLIb Cc: freebsd-current@freebsd.org Subject: Re: FreeBSD 10 prognostication... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 09:00:36 -0000 On Thu, May 3, 2012 at 6:31 AM, Vance Siemens wrote: > Can't say that I wouldn't look forward to this, but it sounds a little off: > > http://www.trollaxor.com/2012/05/freebsd-x-berkeley-unix-apple-quality.html > > What do others think? ROTFL. Thank you for the laughs. That was slashdot's "Netcraft confirms: BSD is dying" meme on steroids. I didn't imagine that someone would come along and pile on it a whole blog entry so full of inaccuracies. -cpghost. > --Vance -- Cordula's Web. http://www.cordula.ws/ From owner-freebsd-current@FreeBSD.ORG Thu May 3 09:18:16 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6AFC9106566B; Thu, 3 May 2012 09:18:16 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from csmtp2.one.com (csmtp2.one.com [91.198.169.22]) by mx1.freebsd.org (Postfix) with ESMTP id 2A3398FC18; Thu, 3 May 2012 09:18:16 +0000 (UTC) Received: from [192.168.1.15] (unknown [217.157.7.221]) by csmtp2.one.com (Postfix) with ESMTPA id 775AB303D838; Thu, 3 May 2012 09:18:15 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=iso-8859-1 From: Erik Cederstrand In-Reply-To: <201205020756.47783.jhb@freebsd.org> Date: Thu, 3 May 2012 11:18:15 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <5140DD3A-63A1-42B0-A464-317E54C4185F@cederstrand.dk> References: <20120426093548.GR2358@deviant.kiev.zoral.com.ua> <20120501135530.GA50127@in-addr.com> <13119BE4-531E-4681-89F0-876DC272B18F@cederstrand.dk> <201205020756.47783.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1257) Cc: Gary Palmer , freebsd-current@freebsd.org Subject: Re: [RFC] Un-staticise the toolchain X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 09:18:16 -0000 Den 02/05/2012 kl. 13.56 skrev John Baldwin: >>=20 >> Static version: >> * 0.09 ms spent execve'ing /usr/bin/make >> * The rest is mostly sysctl calls >>=20 >> Dynamic version: >> * 0.09 ms spent execve'ing ./dynamicmake and /libexec/ld-elf.so.1 >> * 0.18 ms spent loading libc.so.7 (incl. reading /etc/libmap.conf and = /var/run/ld-elf.so.hints) >> * 0.11 ms spent calling sysarch(0x81,0x7fffffffXXXX) (static version = also does this but only uses 0.01 ms. No idea why) >> * The rest is mostly sysctl and sigprocmask calls >=20 > Keep in mind that the first time each system call is invoked, the = runtime > linker has to resolve the symbol. You can force the linker to do all > that when the object is loaded instead by setting LD_BIND_NOW=3Dyes in = the > environment of dynamicmake. If that makes the sysarch() call take = 0.01 > ms, then you know that the extra 0.10 ms is because of rtld doing the > lookup of sysarch() on the first sysarch() call. Thanks for the suggestion. There is only a single sysarch() call in each = version so I'm not sure that would help. Anyway, setting LD_BIND_NOW in = the dynamic case just made the sysarch() call 0.20 ms slower without = speeding up anything else. Kind regards, Erik= From owner-freebsd-current@FreeBSD.ORG Thu May 3 09:21:29 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5415D106566B for ; Thu, 3 May 2012 09:21:29 +0000 (UTC) (envelope-from se@freebsd.org) Received: from nm9-vm0.bullet.mail.ird.yahoo.com (nm9-vm0.bullet.mail.ird.yahoo.com [77.238.189.197]) by mx1.freebsd.org (Postfix) with SMTP id 94FEB8FC0A for ; Thu, 3 May 2012 09:21:28 +0000 (UTC) Received: from [77.238.189.55] by nm9.bullet.mail.ird.yahoo.com with NNFMP; 03 May 2012 09:21:21 -0000 Received: from [217.146.189.70] by tm8.bullet.mail.ird.yahoo.com with NNFMP; 03 May 2012 09:21:21 -0000 Received: from [127.0.0.1] by smtp150.mail.ird.yahoo.com with NNFMP; 03 May 2012 09:21:21 -0000 X-Yahoo-Newman-Id: 723460.28140.bm@smtp150.mail.ird.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: HeQsM_AVM1lPRvPoMZ1rUIfIYwEMCD6kB74R2H0y30G.U8n 5Zsh01Td7TgtcV8OzxH8SdRnG5FKTErSz3Sqin7mjRYPajjukUpTx5mQUoZS ShG9vH6a1XK3Kt7JV7TUY0yRKiRICVrEIeAQJBFHG597WxqPD_BisyxlflRu ksl1D8GD1AZDL0bf7Rpj0BiJzSdQtQVoI6ZDF6bWzt9fTe2u4WxeRKDtrq3F owHrzoKcLPkEup0WdX8NNqZBRUvyRIsZRSKVqI9dgxUJYPpkPyIyy4ZWjSU7 LWURvPLvfV8R.rfjbCZLsjWl4gOJT24Kx_PS67YFh6v2dFhQ4WpK8RyMzxO2 B2udM6tnaB62RSn1w2S1DRBsoEAY0KqinoPbW2uldY2JP7uQlebxw3SJ0kO7 dT8j2vBqbe5NBHktpv81PyKItEnULeZ5hCIe8KVPBUWkK2ggfMSqgip97iYN 9OE4HKLgJ7Q5AtBdAzwmg.C8Jwpu1KN30ozyi8HLw_steJ093uWxCTRDwlW3 VMWVLMhJSNDkfpw-- X-Yahoo-SMTP: iDf2N9.swBDAhYEh7VHfpgq0lnq. Received: from [192.168.119.11] (se@81.173.146.83 with plain) by smtp150.mail.ird.yahoo.com with SMTP; 03 May 2012 02:21:21 -0700 PDT Message-ID: <4FA24E11.4080509@freebsd.org> Date: Thu, 03 May 2012 11:21:21 +0200 From: Stefan Esser User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-current@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: FreeBSD 10 prognostication... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 09:21:29 -0000 Am 03.05.2012 06:31, schrieb Vance Siemens: > Can't say that I wouldn't look forward to this, but it sounds a little off: > > http://www.trollaxor.com/2012/05/freebsd-x-berkeley-unix-apple-quality.html > > What do others think? Looks like the author was just one month late with his April's fool joke. And there are real funny parts, e.g. how Wind River is spelled WinDriver (and described as a company that writing drivers for Windows, as its name says ;-) ...). I have entered an anonymous comment and I'm curious, whether they will allow it to appear below the article (it is awaiting moderator approval). Regards, STefan From owner-freebsd-current@FreeBSD.ORG Thu May 3 10:28:52 2012 Return-Path: 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 8E2631065670; Thu, 3 May 2012 10:28:52 +0000 (UTC) (envelope-from snatreju@googlemail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id AEA778FC0A; Thu, 3 May 2012 10:28:51 +0000 (UTC) Received: by bkvi17 with SMTP id i17so1687587bkv.13 for ; Thu, 03 May 2012 03:28:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=zcxGotwkR+HeIibL63OsKVMTBP8p2seI1+OQEQj9D8o=; b=wNkb75IfCmlE+XpjZCN6SyYjkcyaIje9Gt4muiJFLEr4pvm6wUitk8Zgx8U2hK41/c o3ozDIlKcZw5UUcM5e2YGrh+igWmrE3+AlvXHDgmRKvnPabqT32AG6GxITDl79grxL7w qUksHqVGcsoqmPn7Ec3rDqp69XrOLTSz+OsC1tpEuzvY1wmlx89p6ZjlaTBLQUxfajW0 7oejLBByIU0BK4yRWC78HAQZfqs3K0rb8qC7s9abaFlKEYPq1xjx1FwuhyicuAKEkuXZ oVuuYtW7nmyx6DDtUSUjAvQAP0PChgo8pwGU5kE1wy95Fdtn/pk9pHj+3c//AqNWncjn vu9g== Received: by 10.204.131.84 with SMTP id w20mr538439bks.65.1336040930536; Thu, 03 May 2012 03:28:50 -0700 (PDT) Received: from sherwood.local ([89.204.155.34]) by mx.google.com with ESMTPS id gm18sm9414285bkc.7.2012.05.03.03.28.47 (version=SSLv3 cipher=OTHER); Thu, 03 May 2012 03:28:49 -0700 (PDT) Date: Thu, 3 May 2012 12:28:44 +0200 From: Steven Atreju To: "K. Macy" Message-ID: <20120503102844.GU633@sherwood.local> References: <20120502182557.GA93838@onelab2.iet.unipi.it> <20120502215249.GT633@sherwood.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Thu, 03 May 2012 10:42:33 +0000 Cc: Luigi Rizzo , current@freebsd.org, net@freebsd.org Subject: Re: fast bcopy... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 10:28:52 -0000 K. Macy wrote [2012-05-03 02:58+0200]: > It's highly chipset and processor dependent what works best. Yes, of course. Though i was kinda, even shocked, once i've seen this first: http://marc.info/?l=dragonfly-commits&m=132241713812022&w=2 So we don't use our assembler version for new gccs and HAMMER or SSE3+ (the decision for these was rather arbitrarily, except they were yet existent for an instant implementation). > Intel now has non-temporal loads and stores which work much > better in some cases but provide little benefit in others. Yes, our 2002 tests have shown that these were *extremely* dependent upon alignment. (Note: 2002. o-) Hmm, it doesn't really matter, but i guess this is a good time to thank the FreeBSD hackers for that FPU stack FILD/FISTP idea! I'll append the copy related notes of our doc/memperf.txt. Thanks, > -Kip Steven. I. x86 (AMD Athlon 1600+, 256MB DDR, 133/133 FSB) ------------------------------------------------- COPY .... The basic idea is always the same: - Branch off to REPZ MOVSB if less than 16 bytes to go. - Align at least one pointer on a nice boundary (&3 or &7). (Done by a byte loop; one 4/8 store is more expensive here.) We always align the _from pointer due to test experience. - DEPENDENT. - Do the remaining maximally 3 bytes in an unrolled MOVSB way. DEPENDENT: - !SF_FPU && !defined(SF_X86_MMX): just a matter of REPZ MOVSL. - Otherwise we use three different loops over 64, 16 and 8 bytes, respectively. If more than 4 bytes remain after that we use one additional MOVSL. Note that the 8 byte loop is not a loop but executes once only. The big loop uses pairs of MOVNTQ/MOVQ, MOVQ/MOVQ and FILD/FISTP, if _SSE, _MMX or _FPU, respectively. The _SSE loop exists in addition and is never used if the non-aligned (the _to) pointer is not also aligned. The two smaller ones never use SSE's non-temporal moves; this way we simply can go no matter wether the to pointer is aligned or not. Tests demonstrated that non-temporal is no win for them anyway. At the end we add additional SFENCE (if _SSE) and EMMS (_MMX) or FEMMS (if _3DNOW) to serialize the non-temporal moves and clear the MMX state, respectively. The SFENCE should not be needed, however. Prefetching is not used (very bad on Athlon (or i don't understand it)). 1. !_MMX && !_FPU 2. _MMX 3. _FPU (thanks to the FreeBSD crew for this idea!) 4. _MMX+_3DNOW+_SSE implementation (all we have). ([*] times in brackets show which time has been measured if the from pointer alignment loop has a leading '.ALIGN 2' statement; note especially the value for 4096... note this value in general.) UNT: unaligned pointers, to pointer alignment goal UNF: unaligned pointers, from pointer alignment goal 1000 loops; times in (averaged) microseconds P.S.: 03-04-01: SSE stuff disabled because speed for smaller ranges considered to be more important than for large and even more largest ranges. (And small difference for non-perfect ranges and non-aligned pointers.) --------------------------------------------------------------------------- |bytes| 1./ UNT/ UNF | 2./ UNT/ UNF | 3./ UNT/ UNF | 4.[*] / UNF | |-------------------------------------------------------------------------- |16 | 34/ / | 19/ / 37 | 21/ / 37 | 24[ 26]/ 37 | |15 | 40/ / | 39/ / 35 | 37/ / 35 | 38[ 39]/ 35 | |32 | 36/ / | 23/ / 30 | 23/ / 30 | 27[ 30]/ 33 | |31 | 43/ / | 37/ / 28 | 36/ / 28 | 38[ 42]/ 31 | |64 | 45/ / | 17/ / 38 | 17/ / 36 | 21[ 23]/ 39 | |63 | 50/ / | 46/ / 35 | 44/ / 34 | 47[ 50]/ 37 | |128 | 59/ 70/ 74 | 31/ / 45 | 34/ / 47 | 34[ 36]/ 50 | |127 | 67/ 82/ 62 | 53/ / 45 | 51/ / 44 | 62[ 63]/ 50 | |256 | 89/ 111/ 108 | 52/ / 74 | 53/ / 77 | 50[ 50]/ 76 | |255 | 99/ 123/ 96 | 67/ / 73 | 73/ / 75 | 68[ 70]/ 74 | |512 | 151/ 197/ 177 | 95/ / 131 | 98/ / 137 | 84[103]/ 137 | |511 | 158/ 208/ 166 | 100/ / 132 | 117/ / 134 | 99[112]/ 135 | |1024 | 274/ 395/ 314 | 179/ / 255 | 211/ / 270 | 166[207]/ 257 | |1023 | 280/ 408/ 303 | 196/ / 253 | 225/ / 267 | 184[185]/ 253 | |2048 | 579/ 765/ 966 | 350/ / 485 | 394/ / 511 | 389[388]/ 486 | |2047 | 585/ 777/ 942 | 368/ / 484 | 410/ / 520 | 323[398]/ 484 | |4096 | 1009/1385/1140 | 704/ /1036 | 761/ /1040 | 671[583]/1038 | |4095 | 1027/1386/1130 | 721/ /1034 | 776/ /1037 | 602[604]/1035 | |-------------------------------------------------------------------------- P.S.: ooops - i've really forgotten that the SSE stuff has been completely disabled at a later time! I guess we'll have to redo some testing eventually! From owner-freebsd-current@FreeBSD.ORG Thu May 3 10:49:40 2012 Return-Path: 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 80710106564A; Thu, 3 May 2012 10:49:40 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 85E268FC08; Thu, 3 May 2012 10:49:39 +0000 (UTC) Received: by lagv3 with SMTP id v3so1563843lag.13 for ; Thu, 03 May 2012 03:49:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=c5db86wHEhm02qq6fQ2SecJmHD8Aq0D32Oblle5MatA=; b=tANeaMcTEAeCo0vRhWXOZ6VqPr8fl2ulFbLIVOUJKZzs6SPRgrsxtREeHKqYcrCQf7 fzYb29R/ZG6TQSNO12uLkNtpvriYibvMcY2BgS/UYK2F6ZEc0r5e04v7ghVTEKaqiJif B6rwJnaCpF2ngLaM5NKCNs1xDrxXCDfCyegkNcmrDhP+FF9EnTPG8DjUA2HBc+N0sowJ 8Iun/Cn1/vhVuGcv+q4qoshf0/2yQhOYYHkW02DyVH8yLEP0KbpQdPQo2bSdxg5jIOJC Ri6PGvkaXrJQuJPSDTYE0epq5S+MFAh7BUGaMq/rYjQh0MnbJZvR7xzaCglNWk2BBE38 utOQ== MIME-Version: 1.0 Received: by 10.152.132.166 with SMTP id ov6mr1757981lab.35.1336042178447; Thu, 03 May 2012 03:49:38 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.27.65 with HTTP; Thu, 3 May 2012 03:49:38 -0700 (PDT) In-Reply-To: <20120503102844.GU633@sherwood.local> References: <20120502182557.GA93838@onelab2.iet.unipi.it> <20120502215249.GT633@sherwood.local> <20120503102844.GU633@sherwood.local> Date: Thu, 3 May 2012 11:49:38 +0100 X-Google-Sender-Auth: Woi8Qh4LWGNtIwv5ifqXkdsIsHY Message-ID: From: Attilio Rao To: Steven Atreju Content-Type: text/plain; charset=UTF-8 Cc: net@freebsd.org, Luigi Rizzo , "K. Macy" , current@freebsd.org Subject: Re: fast bcopy... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 10:49:40 -0000 2012/5/3, Steven Atreju : > K. Macy wrote [2012-05-03 02:58+0200]: >> It's highly chipset and processor dependent what works best. > > Yes, of course. > Though i was kinda, even shocked, once i've seen this first: > > http://marc.info/?l=dragonfly-commits&m=132241713812022&w=2 > > So we don't use our assembler version for new gccs and HAMMER or > SSE3+ (the decision for these was rather arbitrarily, except they > were yet existent for an instant implementation). > >> Intel now has non-temporal loads and stores which work much >> better in some cases but provide little benefit in others. > > Yes, our 2002 tests have shown that these were *extremely* > dependent upon alignment. (Note: 2002. o-) > Hmm, it doesn't really matter, but i guess this is a good time to > thank the FreeBSD hackers for that FPU stack FILD/FISTP idea! > I'll append the copy related notes of our doc/memperf.txt. > Thanks, I made an implementation of fpu unwinding and mmx copy to see if they were really making a difference years ago (reimplementing bcopy, memcopy, etc.). What really mattered with hw available at that time (pentium4) was the alignment and use of non-temporal operations on heavilly contended cache-lines. In few words it is more important we engineer the "buffer" layout rather than the functions themselves. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-current@FreeBSD.ORG Thu May 3 12:36:21 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CD1D106566B; Thu, 3 May 2012 12:36:21 +0000 (UTC) (envelope-from dlt@mebtel.net) Received: from mail959c35.nsolutionszone.com (mail959c35.nsolutionszone.com [209.235.152.149]) by mx1.freebsd.org (Postfix) with ESMTP id 16D708FC16; Thu, 3 May 2012 12:36:20 +0000 (UTC) X-POP-User: dlt.mebtel.net Received: from localhost (99-194-23-158.dyn.centurytel.net [99.194.23.158] (may be forged)) by mail959c35.nsolutionszone.com (8.13.6/8.13.1) with ESMTP id q43Ca5x7024097; Thu, 3 May 2012 12:36:06 GMT Date: Thu, 3 May 2012 08:35:59 -0400 From: Derek Tattersall To: Jason Hellenthal Message-ID: <20120503123559.GA71834@oriental.arm.org> References: <20120502225221.GA61282@oriental.arm.org> <20120503054322.GA19695@DataIX.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120503054322.GA19695@DataIX.net> User-Agent: Mutt/1.4.2.3i X-CSC: 0 X-CHA: v=1.1 cv=8nlY8jQc6aUhywRrzctsLUdS8p5R31SNpIMGL8J8sHQ= c=1 sm=1 a=z1TLwsU0kBEA:10 a=P2oOn6vrs4wA:10 a=GPr01A5e9VcA:10 a=kj9zAlcOel0A:10 a=5FSmvsqyZ8dLHOg+TByL6Q==:17 a=M0VwM5ZyAAAA:8 a=xwPayol1AAAA:8 a=CjxXgO3LAAAA:8 a=pGLkceISAAAA:8 a=OLrVjZ3zrwKhWJWUnYMA:9 a=rGMOKOPEo9kX0B04PjkA:7 a=CjuIK1q_8ugA:10 a=Xclt7nbD0wcA:10 a=0Ob1RWNGeVAA:10 a=rC2wZJ5BpNYA:10 a=MSl-tDqOz04A:10 a=5FSmvsqyZ8dLHOg+TByL6Q==:117 Cc: freebsd-current@freebsd.org, freebsd-ports@freebsd.org Subject: Re: ksh93 build failure X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dlt@mebtel.net List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 12:36:21 -0000 * Jason Hellenthal [120503 06:43]: > > > On Wed, May 02, 2012 at 06:52:21PM -0400, Derek Tattersall wrote: > > On a 10.0 Current system, cvsupped today, ksh93 fails to build. As best > > I can determine, the failure is due to a problem of conflicting > > includes. > > > > In file included from /home/ports/usr/ports/shells/ksh93/work/arch/freebsd.amd64/include/ast/ast_wchar.h:113, > > from /home/ports/usr/ports/shells/ksh93/work/arch/freebsd.amd64/include/ast/wchar.h:22, > > from /home/ports/usr/ports/shells/ksh93/work/src/cmd/ksh93/include/lexstates.h:85, > > from /home/ports/usr/ports/shells/ksh93/work/src/cmd/ksh93/include/shlex.h:32, > > from /home/ports/usr/ports/shells/ksh93/work/src/cmd/ksh93/data/keywords.c:22: > > /usr/include/../include/wchar.h:102: error: conflicting types for '_sfio_FILE' > > Has anyone else run into this problem, and if so, what did you do about > > it. ksh93 builds without error on 9.0 Stable. > > Do you perhaps have devel/sfio installed on that machine ? If so can you > deinstall and retry the build. > > -- > > - (2^(N-1)) Thanks for the pointer to sfio, but it's not installed on either the 10.0 Current system, nor the 9.0 Stable system. I'm still confused. -- Best regards, Derek Tattersall dlt@mebtel.net dlt666@yahoo.com dtatters@gmail.com From owner-freebsd-current@FreeBSD.ORG Thu May 3 12:48:25 2012 Return-Path: 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 A3F55106564A; Thu, 3 May 2012 12:48:25 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 518568FC12; Thu, 3 May 2012 12:48:25 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id ED81614E7489; Thu, 3 May 2012 14:48:15 +0200 (CEST) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id FhLi_YgRQdce; Thu, 3 May 2012 14:48:14 +0200 (CEST) Received: from [84.224.160.154] (netacc-gpn-4-160-154.pool.telenor.hu [84.224.160.154]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 4771A14E730B; Thu, 3 May 2012 14:48:14 +0200 (CEST) Message-ID: <4FA27E8F.2040402@FreeBSD.org> Date: Thu, 03 May 2012 14:48:15 +0200 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: Steven Atreju References: <20120502182557.GA93838@onelab2.iet.unipi.it> <20120502215249.GT633@sherwood.local> <20120503102844.GU633@sherwood.local> In-Reply-To: <20120503102844.GU633@sherwood.local> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: net@freebsd.org, Luigi Rizzo , "K. Macy" , current@freebsd.org Subject: Re: fast bcopy... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 12:48:25 -0000 Em 03-05-2012 12:28, Steven Atreju escreveu: > Yes, of course. > Though i was kinda, even shocked, once i've seen this first: > > http://marc.info/?l=dragonfly-commits&m=132241713812022&w=2 I also experimented a bit with some trivial libc functions when testing a change for memcpy (still in queue, will send it out for review once I have some more detailed benchamrks) and I also noticed that sometimes the trivial C version performed just like the assembly code. It is definitely something that needs some cleanup and I'm interested in working on it but cannot afford too much time at the moment. Gabor From owner-freebsd-current@FreeBSD.ORG Thu May 3 15:36:23 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B038A106564A; Thu, 3 May 2012 15:36:23 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id D6B8E8FC16; Thu, 3 May 2012 15:36:22 +0000 (UTC) Received: from ncsd.bris.ac.uk ([137.222.10.59] helo=ncs.bris.ac.uk) by dirg.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1SPy3r-0007TY-RY; Thu, 03 May 2012 16:36:15 +0100 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncs.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1SPy3r-0006ob-HY; Thu, 03 May 2012 16:35:19 +0100 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5) with ESMTP id q43FZJvY014546; Thu, 3 May 2012 16:35:19 +0100 (BST) (envelope-from mexas@bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5/Submit) id q43FZJOp014545; Thu, 3 May 2012 16:35:19 +0100 (BST) (envelope-from mexas@bris.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bris.ac.uk using -f Date: Thu, 3 May 2012 16:35:19 +0100 From: Anton Shterenlikht To: John Baldwin , freebsd-current@freebsd.org Message-ID: <20120503153519.GA14465@mech-cluster241.men.bris.ac.uk> Mail-Followup-To: John Baldwin , freebsd-current@freebsd.org References: <20120426224215.GA79891@mech-cluster241.men.bris.ac.uk> <201204270751.11885.jhb@freebsd.org> <20120428172021.GA92264@mech-cluster241.men.bris.ac.uk> <201204300843.14636.jhb@freebsd.org> <20120501113526.GA4735@mech-cluster241.men.bris.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120501113526.GA4735@mech-cluster241.men.bris.ac.uk> User-Agent: Mutt/1.4.2.3i Cc: Subject: Re: updating from r231158 to 234465: mounting from ufs:/dev/ad4s1a failed with error 19 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 15:36:23 -0000 On Tue, May 01, 2012 at 12:35:26PM +0100, Anton Shterenlikht wrote: > On Mon, Apr 30, 2012 at 08:43:14AM -0400, John Baldwin wrote: > > > > > > I also see: > > > > > > ata0: stat0=0x00 err=0x01 lsb=0x14 msb=0exb > > > ata0: stat1=0x00 err=0x00 lsb=0x00 msb=0x00 > > > ata0: reset tp2 stat0=00 stat1=00 devices=0x10000 > > > > Hmmm, I don't know how to grok these lines, but does your disk work at all now > > with any kernel? It may be that your disk has died (or a cable, etc.) and it > > just happened to coincide with your upgrade? > > I reverted back to r231158, built world and generic > kernel (minus all modules, i.e. "option MODULES_OVERRIDE="). > This works, see the verbose boot dmesg at the end. > > I think I'll just do a binary search. I traced it to r233677. The only change from 233676 to 233677 is in /sys/dev/pci/pci.c My kernel is GENERIC with no modules and with various bits removed, e.g. all raid devices and PCI network devices, which I definitely haven't got on this laptop. Below is the verbose boot with r233676. Apparently at the beginning there's also the previous unsuccessful boot with r233677. Is this a new feature? I didn't know the previous dmesg is preserved after a reboot. Anyway, you can see clearly the error with r233677. I guess this is something to do with ata -> ada change? I probably need to change ad4 into ada0 in /etc/fstab? Many thanks Copyright (c) 1992-2012 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 9.9-CURRENT #11 r233677M: Thu May 3 15:58:38 BST 2012 root@mech-aslap239.men.bris.ac.uk:/usr/obj/usr/src/sys/GEN2 amd64 WARNING: WITNESS option enabled, expect reduced performance. CPU: AMD Turion(tm) 64 X2 Mobile Technology TL-60 (1995.05-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0x60f82 Family = f Model = 68 Stepping = 2 Features=0x178bfbff Features2=0x2001 AMD Features=0xea500800 AMD Features2=0x11f real memory = 3221225472 (3072 MB) avail memory = 2955333632 (2818 MB) Event timer "LAPIC" quality 400 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs FreeBSD/SMP: 1 package(s) x 2 core(s) cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ACPI Error: 32/64X address mismatch in Pm2ControlBlock: 0x00008800/0x0000000000008100, using 32 (20120320/tbfadt-474) ioapic0: Changing APIC ID to 2 ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 ctl: CAM Target Layer loaded acpi0: on motherboard acpi0: Power Button (fixed) unknown: I/O range not supported acpi0: reservation of 0, 8000000 (3) failed acpi0: reservation of 100000, fff00000 (3) failed cpu0: on acpi0 cpu1: on acpi0 attimer0: port 0x40-0x43 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 atrtc0: port 0x70-0x71,0x72-0x73 irq 8 on acpi0 Event timer "RTC" frequency 32768 Hz quality 0 Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 acpi_timer0: <32-bit timer at 3.579545MHz> port 0x8008-0x800b on acpi0 acpi_ec0: port 0x62,0x66 on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pcib0: Length mismatch for 3 range: 11ff000 vs 11fefff pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 vgapci0: port 0x4000-0x40ff mem 0xc0000000-0xc7ffffff,0xcc200000-0xcc20ffff,0xcc300000-0xcc3fffff irq 19 at device 5.0 on pci1 pcib2: at device 4.0 on pci0 pci16: on pcib2 bge0: mem 0xcc000000-0xcc00ffff irq 16 at device 0.0 on pci16 bge0: CHIP ID 0x0000c002; ASIC REV 0x0c; CHIP REV 0xc0; PCI-E miibus0: on bge0 brgphy0: PHY 1 on miibus0 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow bge0: Ethernet address: 00:1a:4b:89:4b:4e pcib3: at device 5.0 on pci0 pci32: on pcib3 ahci0: port 0x9000-0x9007,0x9008-0x900b,0x9010-0x9017,0x5018-0x501b,0x5020-0x502f mem 0xcc409000-0xcc4093ff irq 16 at device 18.0 on pci0 ahci0: AHCI v0.00 with 1 ?Gbps ports, Port Multiplier not supported with FBS ahcich0: at channel 0 on ahci0 ahcich1: at channel 1 on ahci0 ahcich7: at channel 7 on ahci0 device_attach: ahcich7 attach returned 6 ahcich8: at channel 8 on ahci0 device_attach: ahcich8 attach returned 6 ahcich9: at channel 9 on ahci0 device_attach: ahcich9 attach returned 6 ahcich10: at channel 10 on ahci0 device_attach: ahcich10 attach returned 6 ahcich11: at channel 11 on ahci0 device_attach: ahcich11 attach returned 6 ahcich12: at channel 12 on ahci0 device_attach: ahcich12 attach returned 6 ahcich13: at channel 13 on ahci0 device_attach: ahcich13 attach returned 6 ahcich14: at channel 14 on ahci0 device_attach: ahcich14 attach returned 6 ahcich15: at channel 15 on ahci0 device_attach: ahcich15 attach returned 6 ahcich21: at channel 21 on ahci0 device_attach: ahcich21 attach returned 6 ahcich24: at channel 24 on ahci0 device_attach: ahcich24 attach returned 6 ahcich25: at channel 25 on ahci0 device_attach: ahcich25 attach returned 6 ahcich26: at channel 26 on ahci0 device_attach: ahcich26 attach returned 6 ahcich28: at channel 28 on ahci0 device_attach: ahcich28 attach returned 6 ahcich29: at channel 29 on ahci0 device_attach: ahcich29 attach returned 6 ahcich30: at channel 30 on ahci0 device_attach: ahcich30 attach returned 6 ahcich31: at channel 31 on ahci0 device_attach: ahcich31 attach returned 6 ahcich32: at channel 32 on ahci0 device_attach: ahcich32 attach returned 6 ahcich33: at channel 33 on ahci0 device_attach: ahcich33 attach returned 6 ahcich39: at channel 39 on ahci0 device_attach: ahcich39 attach returned 6 ahcich40: at channel 40 on ahci0 device_attach: ahcich40 attach returned 6 ahcich41: at channel 41 on ahci0 device_attach: ahcich41 attach returned 6 ahcich42: at channel 42 on ahci0 device_attach: ahcich42 attach returned 6 ahcich43: at channel 43 on ahci0 device_attach: ahcich43 attach returned 6 ahcich44: at channel 44 on ahci0 device_attach: ahcich44 attach returned 6 ahcich45: at channel 45 on ahci0 device_attach: ahcich45 attach returned 6 ahcich46: at channel 46 on ahci0 device_attach: ahcich46 attach returned 6 ahcich47: at channel 47 on ahci0 device_attach: ahcich47 attach returned 6 ahcich53: at channel 53 on ahci0 device_attach: ahcich53 attach returned 6 ahcich56: at channel 56 on ahci0 device_attach: ahcich56 attach returned 6 ahcich57: at channel 57 on ahci0 device_attach: ahcich57 attach returned 6 ahcich58: at channel 58 on ahci0 device_attach: ahcich58 attach returned 6 ahcich60: at channel 60 on ahci0 device_attach: ahcich60 attach returned 6 ahcich61: at channel 61 on ahci0 device_attach: ahcich61 attach returned 6 ahcich62: at channel 62 on ahci0 device_attach: ahcich62 attach returned 6 ahcich63: at channel 63 on ahci0 device_attach: ahcich63 attach returned 6 ohci0: mem 0xcc401000-0xcc401fff irq 23 at device 19.0 on pci0 usbus0 on ohci0 ohci1: mem 0xcc402000-0xcc402fff irq 17 at device 19.1 on pci0 usbus1 on ohci1 ohci2: mem 0xcc403000-0xcc403fff irq 17 at device 19.2 on pci0 usbus2 on ohci2 ohci3: mem 0xcc404000-0xcc404fff irq 17 at device 19.3 on pci0 usbus3 on ohci3 ohci4: mem 0xcc405000-0xcc405fff irq 17 at device 19.4 on pci0 usbus4 on ohci4 ehci0: mem 0xcc406000-0xcc4060ff irq 23 at device 19.5 on pci0 ehci0: AMD SB600/700 quirk applied usbus5: EHCI version 1.0 usbus5 on ehci0 pci0: at device 20.0 (no driver attached) atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x5040-0x504f irq 16 at device 20.1 on pci0 ata0: at channel 0 on atapci0 hdac0: irq 16 at device 20.2 on pci0 isab0: at device 20.3 on pci0 isa0: on isab0 pcib4: at device 20.4 on pci0 pcib4: failed to allocate initial memory window: 0xcc100000-0xcc1fffff pci2: on pcib4 cbb0: irq 20 at device 4.0 on pci2 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 battery0: on acpi0 battery1: on acpi0 acpi_acad0: on acpi0 acpi_button0: on acpi0 acpi_lid0: on acpi0 acpi_tz0: on acpi0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model IntelliMouse, device ID 3 orm0: at iomem 0xd0000-0xd0fff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 acpi_throttle0: on cpu0 powernow0: on cpu0 acpi_throttle1: on cpu1 acpi_throttle1: failed to attach P_CNT device_attach: acpi_throttle1 attach returned 6 powernow1: on cpu1 Timecounters tick every 1.000 msec hdacc0: at cad 0 on hdac0 hdaa0: at nid 1 on hdacc0 pcm0: at nid 5,6 and 8,9 on hdaa0 hdacc1: at cad 1 on hdac0 unknown: at nid 1 on hdacc1 (no driver attached) usbus0: 12Mbps Full Speed USB v1.0 usbus1: 12Mbps Full Speed USB v1.0 usbus2: 12Mbps Full Speed USB v1.0 usbus3: 12Mbps Full Speed USB v1.0 usbus4: 12Mbps Full Speed USB v1.0 usbus5: 480Mbps High Speed USB v2.0 ugen0.1: at usbus0 uhub0: on usbus0 ugen1.1: at usbus1 uhub1: on usbus1 ugen2.1: at usbus2 uhub2: on usbus2 ugen3.1: at usbus3 uhub3: on usbus3 ugen4.1: at usbus4 uhub4: on usbus4 ugen5.1: at usbus5 uhub5: on usbus5 ahcich0: Poll timeout on slot 0 port 0 ahcich0: is 00000000 cs 00000001 ss 00000000 rs 00000001 tfd 150 serr 00000000 cmd 00002007 cd0 at ata0 bus 0 scbus2 target 0 lun 0 cd0: Removable CD-ROM SCSI-0 device cd0: 16.700MB/s transfers (WDMA2, ATAPI 12bytes, PIO 65534bytes) cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed SMP: AP CPU #1 Launched! WARNING: WITNESS option enabled, expect reduced performance. Root mount waiting for: usbus5 usbus4 usbus3 usbus2 usbus1 usbus0 uhub1: 2 ports with 2 removable, self powered uhub0: 2 ports with 2 removable, self powered uhub2: 2 ports with 2 removable, self powered uhub4: 2 ports with 2 removable, self powered uhub3: 2 ports with 2 removable, self powered Root mount waiting for: usbus5 Root mount waiting for: usbus5 Root mount waiting for: usbus5 Root mount waiting for: usbus5 uhub5: 10 ports with 10 removable, self powered Trying to mount root from ufs:/dev/ad4s1a [rw]... mountroot: waiting for device /dev/ad4s1a ... Mounting from ufs:/dev/ad4s1a failed with error 19. Loader variables: vfs.root.mountfrom=ufs:/dev/ad4s1a vfs.root.mountfrom.options=rw Manual root filesystem specification: : [options] Mount using filesystem and with the specified (optional) option list. eg. ufs:/dev/da0s1a zfs:tank cd9660:/dev/acd0 ro (which is equivalent to: mount -t cd9660 -o ro /dev/acd0 /) ? List valid disk boot devices . Yield 1 second (for background tasks) Abort manual input mountroot> List of GEOM managed disk devices: cd0 mountroot> panic: mountroot: unable to (re-)mount root. cpuid = 1 KDB: enter: panic Table 'FACP' at 0xb7fc8084 Table 'SLIC' at 0xb7fc8220 Table 'EPTH' at 0xb7fc8398 Table 'APIC' at 0xb7fc83d0 APIC: Found table at 0xb7fc83d0 APIC: Using the MADT enumerator. MADT: Found CPU APIC ID 0 ACPI ID 1: enabled SMP: Added CPU 0 (AP) MADT: Found CPU APIC ID 1 ACPI ID 2: enabled SMP: Added CPU 1 (AP) Copyright (c) 1992-2012 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 9.9-CURRENT #9 r233676M: Thu May 3 15:30:08 BST 2012 root@mech-aslap239.men.bris.ac.uk:/usr/obj/usr/src/sys/GEN2 amd64 WARNING: WITNESS option enabled, expect reduced performance. Preloaded elf kernel "/boot/kernel.old/kernel" at 0xffffffff811b3000. Calibrating TSC clock ... TSC clock: 1995045302 Hz CPU: AMD Turion(tm) 64 X2 Mobile Technology TL-60 (1995.05-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0x60f82 Family = f Model = 68 Stepping = 2 Features=0x178bfbff Features2=0x2001 AMD Features=0xea500800 AMD Features2=0x11f L1 2MB data TLB: 8 entries, fully associative L1 2MB instruction TLB: 8 entries, fully associative L1 4KB data TLB: 32 entries, fully associative L1 4KB instruction TLB: 32 entries, fully associative L1 data cache: 64 kbytes, 64 bytes/line, 1 lines/tag, 2-way associative L1 instruction cache: 64 kbytes, 64 bytes/line, 1 lines/tag, 2-way associative L2 2MB unified TLB: 0 entries, disabled/not present L2 4KB data TLB: 512 entries, 4-way associative L2 4KB instruction TLB: 512 entries, 4-way associative L2 unified cache: 512 kbytes, 64 bytes/line, 1 lines/tag, 16-way associative real memory = 3221225472 (3072 MB) Physical memory chunk(s): 0x0000000000010000 - 0x000000000009bfff, 573440 bytes (140 pages) 0x0000000000100000 - 0x00000000001fffff, 1048576 bytes (256 pages) 0x00000000011e2000 - 0x00000000b28ecfff, 2976952320 bytes (726795 pages) avail memory = 2955333632 (2818 MB) Event timer "LAPIC" quality 400 ACPI APIC Table: INTR: Adding local APIC 1 as a target FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs FreeBSD/SMP: 1 package(s) x 2 core(s) cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 APIC: CPU 0 has ACPI ID 1 APIC: CPU 1 has ACPI ID 2 x86bios: IVT 0x000000-0x0004ff at 0xfffffe0000000000 x86bios: SSEG 0x098000-0x098fff at 0xffffff8000210000 x86bios: EBDA 0x09f000-0x09ffff at 0xfffffe000009f000 x86bios: ROM 0x0a0000-0x0fefff at 0xfffffe00000a0000 ULE: setup cpu 0 ULE: setup cpu 1 ACPI: RSDP 0xfe0b0 00024 (v02 HP ) ACPI: XSDT 0xb7fc81bc 00064 (v01 HPQOEM SLIC-MPC 00000001 HP 00000001) ACPI: FACP 0xb7fc8084 000F4 (v04 HP 0944 00000003 HP 00000001) ACPI Error: 32/64X address mismatch in Pm2ControlBlock: 0x00008800/0x0000000000008100, using 32 (20120320/tbfadt-474) ACPI: DSDT 0xb7fc84a4 11437 (v01 HP SB400 00010000 MSFT 03000001) ACPI: FACS 0xb7fe7d80 00040 ACPI: SLIC 0xb7fc8220 00176 (v01 HPQOEM SLIC-MPC 00000001 HP 00000001) ACPI: EPTH 0xb7fc8398 00038 (v01 HP 0944 00000001 HP 00000001) ACPI: APIC 0xb7fc83d0 00062 (v01 HP 0944 00000001 HP 00000001) ACPI: MCFG 0xb7fc8434 0003C (v01 HP 0944 00000001 HP 00000001) ACPI: TCPA 0xb7fc8470 00032 (v02 HP 0944 00000001 HP 00000001) ACPI: SSDT 0xb7fd98db 00059 (v01 HP HPQNLP 00000001 MSFT 03000001) ACPI: SSDT 0xb7fd9934 00206 (v01 HP PSSTBLID 00000001 HP 00000001) MADT: Found IO APIC ID 2, Interrupt 0 at 0xfec00000 ioapic0: Changing APIC ID to 2 ioapic0: Routing external 8259A's -> intpin 0 MADT: Interrupt override: source 0, irq 2 ioapic0: Routing IRQ 0 -> intpin 2 MADT: Interrupt override: source 9, irq 9 ioapic0: intpin 9 trigger: level ioapic0: intpin 9 polarity: low lapic0: Routing NMI -> LINT1 lapic0: LINT1 trigger: edge lapic0: LINT1 polarity: high ioapic0 irqs 0-23 on motherboard cpu0 BSP: ID: 0x00000000 VER: 0x80050010 LDR: 0x00000000 DFR: 0xffffffff lint0: 0x00010700 lint1: 0x00000400 TPR: 0x00000000 SVR: 0x000001ff timer: 0x000100ef therm: 0x00010000 err: 0x000000f0 pmc: 0x00010400 snd_unit_init() u=0x00ff8000 [512] d=0x00007c00 [32] c=0x000003ff [1024] feeder_register: snd_unit=-1 snd_maxautovchans=16 latency=5 feeder_rate_min=1 feeder_rate_max=2016000 feeder_rate_round=25 wlan: <802.11 Link Layer> mem: nfslock: pseudo-device null: random: io: kbd: new array size 4 kbd1 at kbdmux0 ctl: CAM Target Layer loaded acpi0: on motherboard PCIe: Memory Mapped configuration base @ 0xe0000000 ioapic0: routing intpin 9 (ISA IRQ 9) to lapic 0 vector 48 acpi0: Power Button (fixed) unknown: I/O range not supported acpi0: reservation of 0, 8000000 (3) failed acpi0: reservation of 100000, fff00000 (3) failed cpu0: on acpi0 cpu0: switching to generic Cx mode cpu1: on acpi0 attimer0: port 0x40-0x43 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 ioapic0: routing intpin 2 (ISA IRQ 0) to lapic 0 vector 49 Event timer "i8254" frequency 1193182 Hz quality 100 atrtc0: port 0x70-0x71,0x72-0x73 irq 8 on acpi0 atrtc0: registered as a time-of-day clock (resolution 1000000us, adjustment 0.500000000s) ioapic0: routing intpin 8 (ISA IRQ 8) to lapic 0 vector 50 Event timer "RTC" frequency 32768 Hz quality 0 ACPI timer: 1/1 1/1 1/1 1/1 1/1 1/1 1/1 1/1 1/1 1/1 -> 10 Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 acpi_timer0: <32-bit timer at 3.579545MHz> port 0x8008-0x800b on acpi0 acpi_ec0: port 0x62,0x66 on acpi0 pci_link0: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 10 11 Validation 0 255 N 0 10 11 After Disable 0 255 N 0 10 11 pci_link1: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 10 11 Validation 0 255 N 0 10 11 After Disable 0 255 N 0 10 11 pci_link2: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 10 11 Validation 0 255 N 0 10 11 After Disable 0 255 N 0 10 11 pci_link3: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 10 11 Validation 0 255 N 0 10 11 After Disable 0 255 N 0 10 11 pci_link4: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 10 11 Validation 0 255 N 0 10 11 After Disable 0 255 N 0 10 11 pci_link5: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 9 Validation 0 255 N 0 9 After Disable 0 255 N 0 9 pci_link6: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 10 11 Validation 0 255 N 0 10 11 After Disable 0 255 N 0 10 11 pci_link7: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 10 11 Validation 0 255 N 0 10 11 After Disable 0 255 N 0 10 11 pcib0: port 0xcf8-0xcff on acpi0 pcib0: decoding 4 range 0-0xcf7 pcib0: decoding 4 range 0xd00-0xffff pcib0: decoding 3 range 0xa0000-0xbffff pcib0: decoding 3 range 0xc0000000-0xfedfffff pcib0: Length mismatch for 3 range: 11ff000 vs 11fefff pcib0: decoding 3 range 0xfee01000-0xffffffff pcib0: decoding 3 range 0xd3000-0xdffff pci0: on pcib0 pci0: domain=0, physical bus=0 found-> vendor=0x1002, dev=0x7910, revid=0x00 domain=0, bus=0, slot=0, func=0 class=06-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0006, statreg=0x2220, cachelnsz=0 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) found-> vendor=0x1002, dev=0x7912, revid=0x00 domain=0, bus=0, slot=1, func=0 class=06-04-00, hdrtype=0x01, mfdev=0 cmdreg=0x0007, statreg=0x0230, cachelnsz=0 (dwords) lattimer=0x40 (1920 ns), mingnt=0x0c (3000 ns), maxlat=0x00 (0 ns) found-> vendor=0x1002, dev=0x7914, revid=0x00 domain=0, bus=0, slot=4, func=0 class=06-04-00, hdrtype=0x01, mfdev=0 cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x04 (1000 ns), maxlat=0x00 (0 ns) powerspec 3 supports D0 D3 current D0 MSI supports 1 message found-> vendor=0x1002, dev=0x7915, revid=0x00 domain=0, bus=0, slot=5, func=0 class=06-04-00, hdrtype=0x01, mfdev=0 cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x04 (1000 ns), maxlat=0x00 (0 ns) powerspec 3 supports D0 D3 current D0 MSI supports 1 message found-> vendor=0x1002, dev=0x4380, revid=0x00 domain=0, bus=0, slot=18, func=0 class=01-01-8f, hdrtype=0x00, mfdev=0 cmdreg=0x0007, statreg=0x0230, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=10 powerspec 2 supports D0 D3 current D0 map[10]: type I/O Port, range 32, base 0x9000, size 3, enabled pcib0: allocated type 4 (0x9000-0x9007) for rid 10 of pci0:0:18:0 map[14]: type I/O Port, range 32, base 0x9008, size 2, enabled pcib0: allocated type 4 (0x9008-0x900b) for rid 14 of pci0:0:18:0 map[18]: type I/O Port, range 32, base 0x9010, size 3, enabled pcib0: allocated type 4 (0x9010-0x9017) for rid 18 of pci0:0:18:0 map[1c]: type I/O Port, range 32, base 0x5018, size 2, enabled pcib0: allocated type 4 (0x5018-0x501b) for rid 1c of pci0:0:18:0 map[20]: type I/O Port, range 32, base 0x5020, size 4, enabled pcib0: allocated type 4 (0x5020-0x502f) for rid 20 of pci0:0:18:0 map[24]: type Memory, range 32, base 0xcc409000, size 10, enabled pcib0: allocated type 3 (0xcc409000-0xcc4093ff) for rid 24 of pci0:0:18:0 pcib0: matched entry for 0.18.INTA pcib0: slot 18 INTA hardwired to IRQ 16 found-> vendor=0x1002, dev=0x4387, revid=0x00 domain=0, bus=0, slot=19, func=0 class=0c-03-10, hdrtype=0x00, mfdev=1 cmdreg=0x0007, statreg=0x02a0, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=11 map[10]: type Memory, range 32, base 0xcc401000, size 12, enabled pcib0: allocated type 3 (0xcc401000-0xcc401fff) for rid 10 of pci0:0:19:0 pcib0: matched entry for 0.19.INTA pcib0: slot 19 INTA hardwired to IRQ 23 found-> vendor=0x1002, dev=0x4388, revid=0x00 domain=0, bus=0, slot=19, func=1 class=0c-03-10, hdrtype=0x00, mfdev=0 cmdreg=0x0007, statreg=0x02a0, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=b, irq=5 map[10]: type Memory, range 32, base 0xcc402000, size 12, enabled pcib0: allocated type 3 (0xcc402000-0xcc402fff) for rid 10 of pci0:0:19:1 pcib0: matched entry for 0.19.INTB pcib0: slot 19 INTB hardwired to IRQ 17 found-> vendor=0x1002, dev=0x4389, revid=0x00 domain=0, bus=0, slot=19, func=2 class=0c-03-10, hdrtype=0x00, mfdev=0 cmdreg=0x0007, statreg=0x02a0, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=c, irq=5 map[10]: type Memory, range 32, base 0xcc403000, size 12, enabled pcib0: allocated type 3 (0xcc403000-0xcc403fff) for rid 10 of pci0:0:19:2 pcib0: matched entry for 0.19.INTC pcib0: slot 19 INTC hardwired to IRQ 17 found-> vendor=0x1002, dev=0x438a, revid=0x00 domain=0, bus=0, slot=19, func=3 class=0c-03-10, hdrtype=0x00, mfdev=0 cmdreg=0x0007, statreg=0x02a0, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=b, irq=5 map[10]: type Memory, range 32, base 0xcc404000, size 12, enabled pcib0: allocated type 3 (0xcc404000-0xcc404fff) for rid 10 of pci0:0:19:3 pcib0: matched entry for 0.19.INTB pcib0: slot 19 INTB hardwired to IRQ 17 found-> vendor=0x1002, dev=0x438b, revid=0x00 domain=0, bus=0, slot=19, func=4 class=0c-03-10, hdrtype=0x00, mfdev=0 cmdreg=0x0007, statreg=0x02a0, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=c, irq=5 map[10]: type Memory, range 32, base 0xcc405000, size 12, enabled pcib0: allocated type 3 (0xcc405000-0xcc405fff) for rid 10 of pci0:0:19:4 pcib0: matched entry for 0.19.INTC pcib0: slot 19 INTC hardwired to IRQ 17 found-> vendor=0x1002, dev=0x4386, revid=0x00 domain=0, bus=0, slot=19, func=5 class=0c-03-20, hdrtype=0x00, mfdev=0 cmdreg=0x0007, statreg=0x02b0, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=d, irq=11 powerspec 2 supports D0 D1 D2 D3 current D0 map[10]: type Memory, range 32, base 0xcc406000, size 8, enabled pcib0: allocated type 3 (0xcc406000-0xcc4060ff) for rid 10 of pci0:0:19:5 pcib0: matched entry for 0.19.INTD pcib0: slot 19 INTD hardwired to IRQ 23 found-> vendor=0x1002, dev=0x4385, revid=0x14 domain=0, bus=0, slot=20, func=0 class=0c-05-00, hdrtype=0x00, mfdev=1 cmdreg=0x0003, statreg=0x0230, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) map[10]: type I/O Port, range 32, base 0x8200, size 4, enabled pcib0: allocated type 4 (0x8200-0x820f) for rid 10 of pci0:0:20:0 found-> vendor=0x1002, dev=0x438c, revid=0x00 domain=0, bus=0, slot=20, func=1 class=01-01-82, hdrtype=0x00, mfdev=0 cmdreg=0x0005, statreg=0x0220, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=10 pcib0: allocated type 4 (0x1f0-0x1f7) for rid 10 of pci0:0:20:1 pcib0: allocated type 4 (0x3f6-0x3f6) for rid 14 of pci0:0:20:1 pcib0: allocated type 4 (0x170-0x177) for rid 18 of pci0:0:20:1 pcib0: allocated type 4 (0x376-0x376) for rid 1c of pci0:0:20:1 map[20]: type I/O Port, range 32, base 0x5040, size 4, enabled pcib0: allocated type 4 (0x5040-0x504f) for rid 20 of pci0:0:20:1 pcib0: matched entry for 0.20.INTA pcib0: slot 20 INTA hardwired to IRQ 16 found-> vendor=0x1002, dev=0x4383, revid=0x00 domain=0, bus=0, slot=20, func=2 class=04-03-00, hdrtype=0x00, mfdev=0 cmdreg=0x0006, statreg=0x0410, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=10 powerspec 2 supports D0 D3 current D0 map[10]: type Memory, range 64, base 0xcc408000, size 14, enabled pcib0: matched entry for 0.20.INTA pcib0: slot 20 INTA hardwired to IRQ 16 found-> vendor=0x1002, dev=0x438d, revid=0x00 domain=0, bus=0, slot=20, func=3 class=06-01-00, hdrtype=0x00, mfdev=1 cmdreg=0x000f, statreg=0x0220, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) found-> vendor=0x1002, dev=0x4384, revid=0x00 domain=0, bus=0, slot=20, func=4 class=06-04-01, hdrtype=0x01, mfdev=1 cmdreg=0x0027, statreg=0x02a0, cachelnsz=0 (dwords) lattimer=0x40 (1920 ns), mingnt=0x04 (1000 ns), maxlat=0x00 (0 ns) found-> vendor=0x1022, dev=0x1100, revid=0x00 domain=0, bus=0, slot=24, func=0 class=06-00-00, hdrtype=0x00, mfdev=1 cmdreg=0x0000, statreg=0x0010, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) found-> vendor=0x1022, dev=0x1101, revid=0x00 domain=0, bus=0, slot=24, func=1 class=06-00-00, hdrtype=0x00, mfdev=1 cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) found-> vendor=0x1022, dev=0x1102, revid=0x00 domain=0, bus=0, slot=24, func=2 class=06-00-00, hdrtype=0x00, mfdev=1 cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) found-> vendor=0x1022, dev=0x1103, revid=0x00 domain=0, bus=0, slot=24, func=3 class=06-00-00, hdrtype=0x00, mfdev=1 cmdreg=0x0000, statreg=0x0010, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) pcib1: at device 1.0 on pci0 pcib0: allocated type 4 (0x4000-0x4fff) for rid 1c of pcib1 pcib0: allocated type 3 (0xcc200000-0xcc3fffff) for rid 20 of pcib1 pcib0: allocated type 3 (0xc0000000-0xc7ffffff) for rid 24 of pcib1 pcib1: domain 0 pcib1: secondary bus 1 pcib1: subordinate bus 1 pcib1: I/O decode 0x4000-0x4fff pcib1: memory decode 0xcc200000-0xcc3fffff pcib1: prefetched decode 0xc0000000-0xc7ffffff pci1: on pcib1 pci1: domain=0, physical bus=1 found-> vendor=0x1002, dev=0x791f, revid=0x00 domain=0, bus=1, slot=5, func=0 class=03-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=b, irq=11 powerspec 2 supports D0 D1 D2 D3 current D0 MSI supports 1 message, 64 bit map[10]: type Prefetchable Memory, range 64, base 0xc0000000, size 27, enabled pcib1: allocated prefetch range (0xc0000000-0xc7ffffff) for rid 10 of pci0:1:5:0 map[18]: type Memory, range 64, base 0xcc200000, size 16, enabled pcib1: allocated memory range (0xcc200000-0xcc20ffff) for rid 18 of pci0:1:5:0 map[20]: type I/O Port, range 32, base 0x4000, size 8, enabled pcib1: allocated I/O port range (0x4000-0x40ff) for rid 20 of pci0:1:5:0 map[24]: type Memory, range 32, base 0xcc300000, size 20, enabled pcib1: allocated memory range (0xcc300000-0xcc3fffff) for rid 24 of pci0:1:5:0 pcib1: matched entry for 1.5.INTB pcib1: slot 5 INTB hardwired to IRQ 19 vgapci0: port 0x4000-0x40ff mem 0xc0000000-0xc7ffffff,0xcc200000-0xcc20ffff,0xcc300000-0xcc3fffff irq 19 at device 5.0 on pci1 pcib2: at device 4.0 on pci0 pcib0: allocated type 3 (0xcc000000-0xcc0fffff) for rid 20 of pcib2 pcib2: domain 0 pcib2: secondary bus 16 pcib2: subordinate bus 16 pcib2: memory decode 0xcc000000-0xcc0fffff pcib2: no prefetched decode pcib2: could not get PCI interrupt routing table for \\_SB_.C08B.C24F - AE_NOT_FOUND pci16: on pcib2 pci16: domain=0, physical bus=16 found-> vendor=0x14e4, dev=0x1713, revid=0x02 domain=0, bus=16, slot=0, func=0 class=02-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0006, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=10 powerspec 3 supports D0 D3 current D0 MSI supports 1 message, 64 bit map[10]: type Memory, range 64, base 0xcc000000, size 16, enabled pcib2: allocated memory range (0xcc000000-0xcc00ffff) for rid 10 of pci0:16:0:0 pcib0: matched entry for 0.4.INTA pcib0: slot 4 INTA hardwired to IRQ 16 pcib2: slot 0 INTA is routed to irq 16 bge0: mem 0xcc000000-0xcc00ffff irq 16 at device 0.0 on pci16 bge0: attempting to allocate 1 MSI vectors (1 supported) msi: routing MSI IRQ 256 to local APIC 0 vector 51 bge0: using IRQ 256 for MSI bge0: CHIP ID 0x0000c002; ASIC REV 0x0c; CHIP REV 0xc0; PCI-E miibus0: on bge0 brgphy0: PHY 1 on miibus0 brgphy0: OUI 0x0050ef, model 0x0004, rev. 0 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow bge0: bpf attached bge0: Ethernet address: 00:1a:4b:89:4b:4e pcib3: at device 5.0 on pci0 pcib0: allocated type 4 (0x2000-0x3fff) for rid 1c of pcib3 pcib0: allocated type 3 (0xc8000000-0xcbffffff) for rid 20 of pcib3 pcib3: domain 0 pcib3: secondary bus 32 pcib3: subordinate bus 32 pcib3: I/O decode 0x2000-0x3fff pcib3: memory decode 0xc8000000-0xcbffffff pcib3: no prefetched decode pcib3: could not get PCI interrupt routing table for \\_SB_.C08B.C254 - AE_NOT_FOUND pci32: on pcib3 pci32: domain=0, physical bus=32 ahci0: port 0x9000-0x9007,0x9008-0x900b,0x9010-0x9017,0x5018-0x501b,0x5020-0x502f mem 0xcc409000-0xcc4093ff irq 16 at device 18.0 on pci0 ioapic0: routing intpin 16 (PCI IRQ 16) to lapic 0 vector 52 ahci0: AHCI v1.10 with 4 3Gbps ports, Port Multiplier not supported ahci0: Caps: 64bit NCQ SNTF MPS ALP AL CLO 3Gbps PMD SSC PSC 32cmd CCC 4ports ahci0: Caps2: ahcich0: at channel 0 on ahci0 ahcich0: Caps: ahcich1: not probed (disabled) ahcich2: not probed (disabled) ahcich3: not probed (disabled) ohci0: mem 0xcc401000-0xcc401fff irq 23 at device 19.0 on pci0 ioapic0: routing intpin 23 (PCI IRQ 23) to lapic 0 vector 53 usbus0 on ohci0 usbus0: bpf attached ohci0: usbpf: Attached ohci1: mem 0xcc402000-0xcc402fff irq 17 at device 19.1 on pci0 ioapic0: routing intpin 17 (PCI IRQ 17) to lapic 0 vector 54 usbus1 on ohci1 usbus1: bpf attached ohci1: usbpf: Attached ohci2: mem 0xcc403000-0xcc403fff irq 17 at device 19.2 on pci0 usbus2 on ohci2 usbus2: bpf attached ohci2: usbpf: Attached ohci3: mem 0xcc404000-0xcc404fff irq 17 at device 19.3 on pci0 usbus3 on ohci3 usbus3: bpf attached ohci3: usbpf: Attached ohci4: mem 0xcc405000-0xcc405fff irq 17 at device 19.4 on pci0 usbus4 on ohci4 usbus4: bpf attached ohci4: usbpf: Attached ehci0: mem 0xcc406000-0xcc4060ff irq 23 at device 19.5 on pci0 ehci0: AMD SB600/700 quirk applied ehci0: Dropped interrupts workaround enabled usbus5: EHCI version 1.0 usbus5 on ehci0 usbus5: bpf attached ehci0: usbpf: Attached pci0: at device 20.0 (no driver attached) atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x5040-0x504f irq 16 at device 20.1 on pci0 ata0: at channel 0 on atapci0 ioapic0: routing intpin 14 (ISA IRQ 14) to lapic 0 vector 55 hdac0: irq 16 at device 20.2 on pci0 hdac0: HDA Driver Revision: 20120126_0002 hdac0: Config options: on=0x00000000 off=0x00000000 pcib0: allocated type 3 (0xcc100000-0xcc103fff) for rid 10 of hdac0 hdac0: Lazy allocation of 0x4000 bytes rid 0x10 type 3 at 0xcc100000 hdac0: Caps: OSS 4, ISS 4, BSS 0, NSDO 1, 64bit, CORB 256, RIRB 256 isab0: at device 20.3 on pci0 isa0: on isab0 pcib4: at device 20.4 on pci0 pcib4: failed to allocate initial memory window: 0xcc100000-0xcc1fffff pcib4: domain 0 pcib4: secondary bus 2 pcib4: subordinate bus 3 pcib4: no prefetched decode pcib4: Subtractively decoded bridge. pci2: on pcib4 pci2: domain=0, physical bus=2 found-> vendor=0x1180, dev=0x0476, revid=0xb6 domain=0, bus=2, slot=4, func=0 class=06-07-00, hdrtype=0x02, mfdev=1 cmdreg=0x0007, statreg=0x0210, cachelnsz=0 (dwords) lattimer=0x40 (1920 ns), mingnt=0x80 (32000 ns), maxlat=0x07 (1750 ns) intpin=a, irq=10 powerspec 2 supports D0 D1 D2 D3 current D0 map[10]: type Memory, range 32, base 0xcc100000, size 12, enabled pcib4: failed to allocate initial memory window (0xcc100000-0xcc1fffff,0x100000) pcib4: matched entry for 2.4.INTA pcib4: slot 4 INTA hardwired to IRQ 20 cbb0: irq 20 at device 4.0 on pci2 pcib0: allocated type 3 (0xcc500000-0xcc5fffff) for rid 20 of pcib4 pcib4: allocated initial memory window of 0xcc500000-0xcc5fffff pcib4: allocated memory range (0xcc500000-0xcc500fff) for rid 10 of cbb0 cbb0: Lazy allocation of 0x1000 bytes rid 0x10 type 3 at 0xcc500000 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 ioapic0: routing intpin 20 (PCI IRQ 20) to lapic 0 vector 56 cbb0: PCI Configuration space: 0x00: 0x04761180 0x02100007 0x060700b6 0x00824000 0x10: 0xcc500000 0x020000dc 0x20030302 0xfffff000 0x20: 0x00000000 0xfffff000 0x00000000 0xfffffffc 0x30: 0x00000000 0xfffffffc 0x00000000 0x07000114 0x40: 0x30c2103c 0x00000001 0x00000000 0x00000000 0x50: 0x00000000 0x00000000 0x00000000 0x00000000 0x60: 0x00000000 0x00000000 0x00000000 0x00000000 0x70: 0x00000000 0x00000000 0x00000000 0x00000000 0x80: 0x30a00001 0x00000000 0x04630463 0x00000000 0x90: 0x00000000 0x00000000 0x00000000 0x00000000 0xa0: 0x00000008 0x00000000 0x00000000 0x00000000 0xb0: 0x00000000 0xbe000000 0x00003000 0x00000000 0xc0: 0x30c2103c 0x00000000 0x00000000 0x00000000 0xd0: 0x00000000 0x00000000 0x00000000 0xfe0a0001 0xe0: 0x24c04000 0x00000000 0x00000000 0x00000000 0xf0: 0x00000000 0x00000000 0x00000000 0x00000000 battery0: on acpi0 battery1: on acpi0 acpi_acad0: on acpi0 acpi_button0: on acpi0 acpi_lid0: on acpi0 acpi_tz0: on acpi0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 atkbd: the current kbd controller command byte 0065 atkbd: keyboard ID 0x41ab (2) kbd0 at atkbd0 kbd0: atkbd0, AT 101/102 (2), config:0x0, flags:0x3d0000 ioapic0: routing intpin 1 (ISA IRQ 1) to lapic 0 vector 57 atkbd0: [GIANT-LOCKED] psm0: unable to allocate IRQ psmcpnp0: irq 12 on acpi0 psm0: current command byte:0065 psm0: irq 12 on atkbdc0 ioapic0: routing intpin 12 (ISA IRQ 12) to lapic 0 vector 58 psm0: [GIANT-LOCKED] psm0: model IntelliMouse, device ID 3-00, 3 buttons psm0: config:00004000, flags:00000008, packet size:4 psm0: syncmask:08, syncbits:00 acpi0: wakeup code va 0xffffff80cd86b000 pa 0x90000 pcib0: allocated type 3 (0xa0000-0xa07ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa0800-0xa0fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa1000-0xa17ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa1800-0xa1fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa2000-0xa27ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa2800-0xa2fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa3000-0xa37ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa3800-0xa3fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa4000-0xa47ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa4800-0xa4fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa5000-0xa57ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa5800-0xa5fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa6000-0xa67ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa6800-0xa6fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa7000-0xa77ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa7800-0xa7fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa8000-0xa87ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa8800-0xa8fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa9000-0xa97ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa9800-0xa9fff) for rid 0 of orm0 pcib0: allocated type 3 (0xaa000-0xaa7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xaa800-0xaafff) for rid 0 of orm0 pcib0: allocated type 3 (0xab000-0xab7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xab800-0xabfff) for rid 0 of orm0 pcib0: allocated type 3 (0xac000-0xac7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xac800-0xacfff) for rid 0 of orm0 pcib0: allocated type 3 (0xad000-0xad7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xad800-0xadfff) for rid 0 of orm0 pcib0: allocated type 3 (0xae000-0xae7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xae800-0xaefff) for rid 0 of orm0 pcib0: allocated type 3 (0xaf000-0xaf7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xaf800-0xaffff) for rid 0 of orm0 pcib0: allocated type 3 (0xb0000-0xb07ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb0800-0xb0fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb1000-0xb17ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb1800-0xb1fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb2000-0xb27ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb2800-0xb2fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb3000-0xb37ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb3800-0xb3fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb4000-0xb47ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb4800-0xb4fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb5000-0xb57ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb5800-0xb5fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb6000-0xb67ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb6800-0xb6fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb7000-0xb77ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb7800-0xb7fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb8000-0xb87ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb8800-0xb8fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb9000-0xb97ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb9800-0xb9fff) for rid 0 of orm0 pcib0: allocated type 3 (0xba000-0xba7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xba800-0xbafff) for rid 0 of orm0 pcib0: allocated type 3 (0xbb000-0xbb7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xbb800-0xbbfff) for rid 0 of orm0 pcib0: allocated type 3 (0xbc000-0xbc7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xbc800-0xbcfff) for rid 0 of orm0 pcib0: allocated type 3 (0xbd000-0xbd7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xbd800-0xbdfff) for rid 0 of orm0 pcib0: allocated type 3 (0xbe000-0xbe7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xbe800-0xbefff) for rid 0 of orm0 pcib0: allocated type 3 (0xbf000-0xbf7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xbf800-0xbffff) for rid 0 of orm0 pcib0: allocated type 3 (0xd3000-0xd37ff) for rid 1 of orm0 pcib0: allocated type 3 (0xd3800-0xd3fff) for rid 1 of orm0 pcib0: allocated type 3 (0xd4000-0xd47ff) for rid 1 of orm0 pcib0: allocated type 3 (0xd4800-0xd4fff) for rid 1 of orm0 pcib0: allocated type 3 (0xd5000-0xd57ff) for rid 1 of orm0 pcib0: allocated type 3 (0xd5800-0xd5fff) for rid 1 of orm0 pcib0: allocated type 3 (0xd6000-0xd67ff) for rid 1 of orm0 pcib0: allocated type 3 (0xd6800-0xd6fff) for rid 1 of orm0 pcib0: allocated type 3 (0xd7000-0xd77ff) for rid 1 of orm0 pcib0: allocated type 3 (0xd7800-0xd7fff) for rid 1 of orm0 pcib0: allocated type 3 (0xd8000-0xd87ff) for rid 1 of orm0 pcib0: allocated type 3 (0xd8800-0xd8fff) for rid 1 of orm0 pcib0: allocated type 3 (0xd9000-0xd97ff) for rid 1 of orm0 pcib0: allocated type 3 (0xd9800-0xd9fff) for rid 1 of orm0 pcib0: allocated type 3 (0xda000-0xda7ff) for rid 1 of orm0 pcib0: allocated type 3 (0xda800-0xdafff) for rid 1 of orm0 pcib0: allocated type 3 (0xdb000-0xdb7ff) for rid 1 of orm0 pcib0: allocated type 3 (0xdb800-0xdbfff) for rid 1 of orm0 pcib0: allocated type 3 (0xdc000-0xdc7ff) for rid 1 of orm0 pcib0: allocated type 3 (0xdc800-0xdcfff) for rid 1 of orm0 pcib0: allocated type 3 (0xdd000-0xdd7ff) for rid 1 of orm0 pcib0: allocated type 3 (0xdd800-0xddfff) for rid 1 of orm0 pcib0: allocated type 3 (0xde000-0xde7ff) for rid 1 of orm0 pcib0: allocated type 3 (0xde800-0xdefff) for rid 1 of orm0 pcib0: allocated type 3 (0xdf000-0xdf7ff) for rid 1 of orm0 pcib0: allocated type 3 (0xdf800-0xdffff) for rid 1 of orm0 ahc_isa_probe 0: ioport 0xc00 alloc failed ahc_isa_probe 1: ioport 0x1c00 alloc failed ahc_isa_probe 2: ioport 0x2c00 alloc failed ahc_isa_probe 3: ioport 0x3c00 alloc failed ahc_isa_probe 4: ioport 0x4c00 alloc failed ahc_isa_probe 5: ioport 0x5c00 alloc failed ahc_isa_probe 6: ioport 0x6c00 alloc failed ahc_isa_probe 7: ioport 0x7c00 alloc failed ahc_isa_probe 8: ioport 0x8c00 alloc failed ahc_isa_probe 9: ioport 0x9c00 alloc failed ahc_isa_probe 10: ioport 0xac00 alloc failed ahc_isa_probe 11: ioport 0xbc00 alloc failed ahc_isa_probe 12: ioport 0xcc00 alloc failed ahc_isa_probe 13: ioport 0xdc00 alloc failed ahc_isa_probe 14: ioport 0xec00 alloc failed isa_probe_children: disabling PnP devices atkbdc: atkbdc0 already exists; skipping it atrtc: atrtc0 already exists; skipping it attimer: attimer0 already exists; skipping it sc: sc0 already exists; skipping it isa_probe_children: probing non-PnP devices orm0: at iomem 0xd0000-0xd0fff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sc0: fb0, kbd1, terminal emulator: scteken (teken terminal) vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 pcib0: allocated type 4 (0x3c0-0x3df) for rid 0 of vga0 pcib0: allocated type 3 (0xa0000-0xbffff) for rid 0 of vga0 fdc0 failed to probe at port 0x3f0 irq 6 drq 2 on isa0 ppc0 failed to probe at irq 7 on isa0 pcib0: allocated type 4 (0x3f8-0x3ff) for rid 0 of uart0 uart0 failed to probe at port 0x3f8-0x3ff irq 4 on isa0 pcib0: allocated type 4 (0x2f8-0x2ff) for rid 0 of uart1 uart1 failed to probe at port 0x2f8-0x2ff irq 3 on isa0 wbwd0 failed to probe on isa0 isa_probe_children: probing PnP devices acpi_throttle0: on cpu0 acpi_throttle0: P_CNT from P_BLK 0x8010 powernow0: on cpu0 acpi_throttle1: on cpu1 acpi_throttle1: failed to attach P_CNT device_attach: acpi_throttle1 attach returned 6 powernow1: on cpu1 Device configuration finished. procfs registered lapic: Divisor 2, Frequency 99750240 Hz Timecounters tick every 1.000 msec vlan: initialized, using hash tables with chaining lo0: bpf attached hdacc0: at cad 0 on hdac0 hdacc0: Root Node at nid=0: 1 subnodes 1-1 hdaa0: at nid 1 on hdacc0 hdaa0: Audio Function Group at nid=1: 30 subnodes 2-31 hdaa0: NumGPIO=4 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1 hdaa0: GPIO0: disabled hdaa0: GPIO1: disabled hdaa0: GPIO2: disabled hdaa0: GPIO3: disabled hdaa0: WARNING: nid=2 has cnid outside of the AFG range j=0 entnum=4 index=0 res=0x00000401 hdaa0: Original pins configuration: hdaa0: nid 0x as seq device conn jack loc color misc hdaa0: 5 92174110 1 0 Speaker Fixed Analog 0x12 Green 1 hdaa0: 6 0421201f 1 15 Headphones Jack 1/8 Right Grey 0 hdaa0: 7 410710f0 15 0 Line-out None Analog Rear Black 0 hdaa0: 8 04a12020 2 0 Mic Jack 1/8 Right Grey 0 hdaa0: 9 0181302e 2 14 Line-in Jack 1/8 Rear Blue 0 hdaa0: 10 4145f0f0 15 0 SPDIF-out None Optical Rear Other 0 hdaa0: 22 995711f0 15 0 Digital-out Fixed Analog Onboard Black 1 hdaa0: 23 5993e0f0 15 0 AUX None ATAPI Onboard White 0 hdaa0: 24 f0a79159 5 9 Mic Both Analog Other Pink 1 hdaa0: 25 593310f0 15 0 CD None ATAPI Onboard Black 0 hdaa0: Patched pins configuration: hdaa0: nid 0x as seq device conn jack loc color misc hdaa0: 5 92174110 1 0 Speaker Fixed Analog 0x12 Green 1 hdaa0: 6 0421201f 1 15 Headphones Jack 1/8 Right Grey 0 hdaa0: 7 410710f0 15 0 Line-out None Analog Rear Black 0 DISA hdaa0: 8 04a12020 2 0 Mic Jack 1/8 Right Grey 0 hdaa0: 9 0181302e 2 14 Line-in Jack 1/8 Rear Blue 0 hdaa0: 10 4145f0f0 15 0 SPDIF-out None Optical Rear Other 0 DISA hdaa0: 22 995711f0 15 0 Digital-out Fixed Analog Onboard Black 1 hdaa0: 23 5993e0f0 15 0 AUX None ATAPI Onboard White 0 DISA hdaa0: 24 f0a79159 5 9 Mic Both Analog Other Pink 1 hdaa0: 25 593310f0 15 0 CD None ATAPI Onboard Black 0 DISA hdaa0: 4 associations found: hdaa0: Association 0 (1) out: hdaa0: Pin nid=5 seq=0 hdaa0: Pin nid=6 seq=15 hdaa0: Association 1 (2) in: hdaa0: Pin nid=8 seq=0 hdaa0: Pin nid=9 seq=14 hdaa0: Association 2 (5) in: hdaa0: Pin nid=24 seq=9 hdaa0: Association 3 (15) out: hdaa0: Pin nid=22 seq=0 hdaa0: Tracing association 0 (1) hdaa0: Pin 5 traced to DAC 3 hdaa0: Pin 6 traced to DAC 3 and hpredir 0 hdaa0: Association 0 (1) trace succeeded hdaa0: Tracing association 1 (2) hdaa0: Pin 8 traced to ADC 4 hdaa0: Pin 9 traced to ADC 4 hdaa0: Association 1 (2) trace succeeded hdaa0: Tracing association 2 (5) hdaa0: Association 2 (5) trace failed hdaa0: Tracing association 3 (15) hdaa0: Unable to trace pin 22 seq 0 with min nid 0 hdaa0: Association 3 (15) trace failed hdaa0: Looking for additional DAC for association 0 (1) hdaa0: Looking for additional ADC for association 1 (2) hdaa0: Tracing input monitor hdaa0: Tracing nid 12 to out hdaa0: Tracing other input monitors hdaa0: Tracing nid 8 to out hdaa0: nid 8 is input monitor hdaa0: Tracing nid 9 to out hdaa0: nid 9 is input monitor hdaa0: Tracing beeper hdaa0: nid 16 traced to out hdaa0: Headphones redirection for association 0 nid=6 using unsolicited responses. hdaa0: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref hdaa0: hdaa0: +-------------------+ hdaa0: | DUMPING HDA NODES | hdaa0: +-------------------+ hdaa0: hdaa0: Default Parameter hdaa0: ----------------- hdaa0: Stream cap: 0x00000001 hdaa0: PCM hdaa0: PCM cap: 0x000e007f hdaa0: 16 20 24 bits, 8 11 16 22 32 44 48 KHz hdaa0: IN amp: 0x00270300 hdaa0: OUT amp: 0x80053f3d hdaa0: hdaa0: nid: 2 [DISABLED] hdaa0: Name: audio output hdaa0: Widget cap: 0x00030311 hdaa0: DIGITAL STEREO hdaa0: Stream cap: 0x00000005 hdaa0: AC3 PCM hdaa0: PCM cap: 0x00020060 hdaa0: 16 bits, 44 48 KHz hdaa0: connections: 2 hdaa0: | hdaa0: + [DISABLED] <- nid=1 [GHOST!] [UNKNOWN] (selected) hdaa0: + <- nid=4 [audio input] hdaa0: hdaa0: nid: 3 hdaa0: Name: audio output hdaa0: Widget cap: 0x00000441 hdaa0: PWR PROC STEREO hdaa0: Association: 0 (0x00008001) hdaa0: OSS: pcm (pcm) hdaa0: Stream cap: 0x00000001 hdaa0: PCM hdaa0: PCM cap: 0x000e007f hdaa0: 16 20 24 bits, 8 11 16 22 32 44 48 KHz hdaa0: hdaa0: nid: 4 hdaa0: Name: audio input hdaa0: Widget cap: 0x00100511 hdaa0: PWR STEREO hdaa0: Association: 1 (0x00004001) hdaa0: Stream cap: 0x00000001 hdaa0: PCM hdaa0: PCM cap: 0x0006007f hdaa0: 16 20 bits, 8 11 16 22 32 44 48 KHz hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=21 [audio selector] hdaa0: hdaa0: nid: 5 hdaa0: Name: pin: Speaker (Fixed) hdaa0: Widget cap: 0x00400187 hdaa0: UNSOL STEREO hdaa0: Association: 0 (0x00000001) hdaa0: Pin cap: 0x0001173f hdaa0: ISC TRQD PDC HP OUT IN VREF[ 50 80 GROUND HIZ ] EAPD hdaa0: Pin config: 0x92174110 hdaa0: Pin control: 0x00000040 OUT hdaa0: EAPD: 0x00000002 hdaa0: Output amp: 0x80053f3d hdaa0: mute=1 step=63 size=5 offset=61 hdaa0: Input amp: 0x00270300 hdaa0: mute=0 step=3 size=39 offset=0 hdaa0: connections: 2 hdaa0: | hdaa0: + [DISABLED] <- nid=3 [audio output] hdaa0: + <- nid=14 [audio mixer] (selected) hdaa0: hdaa0: nid: 6 hdaa0: Name: pin: Headphones (Grey Jack) hdaa0: Widget cap: 0x00400185 hdaa0: UNSOL STEREO hdaa0: Association: 0 (0x00008000) hdaa0: Pin cap: 0x0000001f hdaa0: ISC TRQD PDC HP OUT hdaa0: Pin config: 0x0421201f hdaa0: Pin control: 0x000000c0 HP OUT hdaa0: Output amp: 0x80053f3d hdaa0: mute=1 step=63 size=5 offset=61 hdaa0: connections: 2 hdaa0: | hdaa0: + [DISABLED] <- nid=3 [audio output] hdaa0: + <- nid=14 [audio mixer] (selected) hdaa0: hdaa0: nid: 7 [DISABLED] hdaa0: Name: pin: Line-out (None) hdaa0: Widget cap: 0x00400104 hdaa0: Pin cap: 0x00000010 hdaa0: OUT hdaa0: Pin config: 0x410710f0 hdaa0: Pin control: 0x00000000 hdaa0: Output amp: 0x80053f3d hdaa0: mute=1 step=63 size=5 offset=61 hdaa0: connections: 1 hdaa0: | hdaa0: + [DISABLED] <- nid=15 [audio mixer] [DISABLED] hdaa0: hdaa0: nid: 8 hdaa0: Name: pin: Mic (Grey Jack) hdaa0: Widget cap: 0x00400083 hdaa0: UNSOL STEREO hdaa0: Association: 1 (0x00000001) hdaa0: OSS: mic (mic) hdaa0: Pin cap: 0x00001727 hdaa0: ISC TRQD PDC IN VREF[ 50 80 GROUND HIZ ] hdaa0: Pin config: 0x04a12020 hdaa0: Pin control: 0x00000024 IN VREFs hdaa0: Input amp: 0x00270300 hdaa0: mute=0 step=3 size=39 offset=0 hdaa0: hdaa0: nid: 9 hdaa0: Name: pin: Line-in (Blue Jack) hdaa0: Widget cap: 0x00400187 hdaa0: UNSOL STEREO hdaa0: Association: 1 (0x00004000) hdaa0: OSS: line (line) hdaa0: Pin cap: 0x00001737 hdaa0: ISC TRQD PDC OUT IN VREF[ 50 80 GROUND HIZ ] hdaa0: Pin config: 0x0181302e hdaa0: Pin control: 0x00000024 IN VREFs hdaa0: Output amp: 0x80053f3d hdaa0: mute=1 step=63 size=5 offset=61 hdaa0: Input amp: 0x00270300 hdaa0: mute=0 step=3 size=39 offset=0 hdaa0: connections: 2 hdaa0: | hdaa0: + [DISABLED] <- nid=3 [audio output] (selected) hdaa0: + [DISABLED] <- nid=14 [audio mixer] hdaa0: hdaa0: nid: 10 [DISABLED] hdaa0: Name: pin: SPDIF-out (None) hdaa0: Widget cap: 0x00400301 hdaa0: DIGITAL STEREO hdaa0: Pin cap: 0x00000010 hdaa0: OUT hdaa0: Pin config: 0x4145f0f0 hdaa0: Pin control: 0x00000000 hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=2 [audio output] [DISABLED] hdaa0: hdaa0: nid: 11 [DISABLED] hdaa0: Name: audio selector hdaa0: Widget cap: 0x00300101 hdaa0: STEREO hdaa0: connections: 6 hdaa0: | hdaa0: + <- nid=3 [audio output] (selected) hdaa0: + <- nid=12 [audio mixer] hdaa0: + <- nid=9 [pin: Line-in (Blue Jack)] hdaa0: + <- nid=14 [audio mixer] hdaa0: + <- nid=5 [pin: Speaker (Fixed)] hdaa0: + <- nid=24 [pin: Mic (Both)] [DISABLED] hdaa0: hdaa0: nid: 12 hdaa0: Name: audio mixer hdaa0: Widget cap: 0x00200101 hdaa0: STEREO hdaa0: Association: 1 (0x00000001) hdaa0: OSS: mic hdaa0: connections: 2 hdaa0: | hdaa0: + <- nid=30 [audio selector] hdaa0: + [DISABLED] <- nid=31 [audio selector] [DISABLED] hdaa0: hdaa0: nid: 13 hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010c hdaa0: Association: -2 (0x00000000) hdaa0: OSS: speaker hdaa0: Output amp: 0x800b0f0f hdaa0: mute=1 step=15 size=11 offset=15 hdaa0: connections: 2 hdaa0: | hdaa0: + <- nid=16 [beep widget] (selected) hdaa0: + [DISABLED] <- nid=22 [pin: Digital-out (Fixed)] [DISABLED] hdaa0: hdaa0: nid: 14 hdaa0: Name: audio mixer hdaa0: Widget cap: 0x00200101 hdaa0: STEREO hdaa0: Association: 0 (0x00008001) hdaa0: OSS: pcm, speaker, line, mic hdaa0: connections: 8 hdaa0: | hdaa0: + <- nid=13 [audio selector] hdaa0: + <- nid=17 [audio selector] hdaa0: + <- nid=18 [audio selector] hdaa0: + <- nid=19 [audio selector] hdaa0: + [DISABLED] <- nid=26 [audio selector] [DISABLED] hdaa0: + [DISABLED] <- nid=27 [audio selector] [DISABLED] hdaa0: + [DISABLED] <- nid=28 [audio selector] [DISABLED] hdaa0: + [DISABLED] <- nid=29 [audio selector] [DISABLED] hdaa0: hdaa0: nid: 15 [DISABLED] hdaa0: Name: audio mixer hdaa0: Widget cap: 0x00200100 hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=11 [audio selector] [DISABLED] hdaa0: hdaa0: nid: 16 hdaa0: Name: beep widget hdaa0: Widget cap: 0x00700000 hdaa0: Association: -2 (0x00000000) hdaa0: OSS: speaker (speaker) hdaa0: hdaa0: nid: 17 hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Association: 0 (0x00008001) hdaa0: OSS: pcm hdaa0: Output amp: 0x80051f17 hdaa0: mute=1 step=31 size=5 offset=23 hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=3 [audio output] hdaa0: hdaa0: nid: 18 hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Association: -2 (0x00000000) hdaa0: OSS: mic hdaa0: Output amp: 0x80051f17 hdaa0: mute=1 step=31 size=5 offset=23 hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=8 [pin: Mic (Grey Jack)] hdaa0: hdaa0: nid: 19 hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Association: -2 (0x00000000) hdaa0: OSS: line hdaa0: Output amp: 0x80051f17 hdaa0: mute=1 step=31 size=5 offset=23 hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=9 [pin: Line-in (Blue Jack)] hdaa0: hdaa0: nid: 20 [DISABLED] hdaa0: Name: power widget hdaa0: Widget cap: 0x00500500 hdaa0: PWR hdaa0: connections: 13 hdaa0: | hdaa0: + <- nid=13 [audio selector] (selected) hdaa0: + <- nid=14 [audio mixer] hdaa0: + <- nid=15 [audio mixer] [DISABLED] hdaa0: + <- nid=16 [beep widget] hdaa0: + <- nid=19 [audio selector] hdaa0: + <- nid=20 [power widget] [DISABLED] hdaa0: + <- nid=21 [audio selector] hdaa0: + <- nid=22 [pin: Digital-out (Fixed)] [DISABLED] hdaa0: + <- nid=23 [pin: AUX (None)] [DISABLED] hdaa0: + <- nid=24 [pin: Mic (Both)] [DISABLED] hdaa0: + <- nid=25 [pin: CD (None)] [DISABLED] hdaa0: + <- nid=26 [audio selector] [DISABLED] hdaa0: + <- nid=29 [audio selector] [DISABLED] hdaa0: hdaa0: nid: 21 hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Association: 1 (0x00004001) hdaa0: OSS: line, mic hdaa0: Output amp: 0x80050f00 hdaa0: mute=1 step=15 size=5 offset=0 hdaa0: connections: 8 hdaa0: | hdaa0: + <- nid=12 [audio mixer] hdaa0: + <- nid=9 [pin: Line-in (Blue Jack)] (selected) hdaa0: + [DISABLED] <- nid=14 [audio mixer] hdaa0: + [DISABLED] <- nid=15 [audio mixer] [DISABLED] hdaa0: + [DISABLED] <- nid=25 [pin: CD (None)] [DISABLED] hdaa0: + [DISABLED] <- nid=5 [pin: Speaker (Fixed)] hdaa0: + [DISABLED] <- nid=24 [pin: Mic (Both)] [DISABLED] hdaa0: + [DISABLED] <- nid=23 [pin: AUX (None)] [DISABLED] hdaa0: hdaa0: nid: 22 [DISABLED] hdaa0: Name: pin: Digital-out (Fixed) hdaa0: Widget cap: 0x00400000 hdaa0: Pin cap: 0x00000020 hdaa0: IN hdaa0: Pin config: 0x995711f0 hdaa0: Pin control: 0x00000000 hdaa0: hdaa0: nid: 23 [DISABLED] hdaa0: Name: pin: AUX (None) hdaa0: Widget cap: 0x00400081 hdaa0: UNSOL STEREO hdaa0: Pin cap: 0x00000027 hdaa0: ISC TRQD PDC IN hdaa0: Pin config: 0x5993e0f0 hdaa0: Pin control: 0x00000000 hdaa0: hdaa0: nid: 24 [DISABLED] hdaa0: Name: pin: Mic (Both) hdaa0: Widget cap: 0x00400187 hdaa0: UNSOL STEREO hdaa0: Pin cap: 0x00001737 hdaa0: ISC TRQD PDC OUT IN VREF[ 50 80 GROUND HIZ ] hdaa0: Pin config: 0xf0a79159 hdaa0: Pin control: 0x00000000 hdaa0: Output amp: 0x80053f3d hdaa0: mute=1 step=63 size=5 offset=61 hdaa0: Input amp: 0x00270300 hdaa0: mute=0 step=3 size=39 offset=0 hdaa0: connections: 2 hdaa0: | hdaa0: + [DISABLED] <- nid=3 [audio output] (selected) hdaa0: + <- nid=14 [audio mixer] hdaa0: hdaa0: nid: 25 [DISABLED] hdaa0: Name: pin: CD (None) hdaa0: Widget cap: 0x00400001 hdaa0: STEREO hdaa0: Pin cap: 0x00000020 hdaa0: IN hdaa0: Pin config: 0x593310f0 hdaa0: Pin control: 0x00000000 hdaa0: hdaa0: nid: 26 [DISABLED] hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Output amp: 0x80051f17 hdaa0: mute=1 step=31 size=5 offset=23 hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=5 [pin: Speaker (Fixed)] hdaa0: hdaa0: nid: 27 [DISABLED] hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Output amp: 0x80051f17 hdaa0: mute=1 step=31 size=5 offset=23 hdaa0: connections: 1 hdaa0: | hdaa0: + [DISABLED] <- nid=23 [pin: AUX (None)] [DISABLED] hdaa0: hdaa0: nid: 28 [DISABLED] hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Output amp: 0x80051f17 hdaa0: mute=1 step=31 size=5 offset=23 hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=24 [pin: Mic (Both)] [DISABLED] hdaa0: hdaa0: nid: 29 [DISABLED] hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Output amp: 0x80051f17 hdaa0: mute=1 step=31 size=5 offset=23 hdaa0: connections: 1 hdaa0: | hdaa0: + [DISABLED] <- nid=25 [pin: CD (None)] [DISABLED] hdaa0: hdaa0: nid: 30 hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Association: 1 (0x00000001) hdaa0: OSS: mic hdaa0: Output amp: 0x80000000 hdaa0: mute=1 step=0 size=0 offset=0 hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=8 [pin: Mic (Grey Jack)] hdaa0: hdaa0: nid: 31 [DISABLED] hdaa0: Name: audio selector hdaa0: Widget cap: 0x0030010d hdaa0: STEREO hdaa0: Output amp: 0x80000000 hdaa0: mute=1 step=0 size=0 offset=0 hdaa0: connections: 1 hdaa0: | hdaa0: + <- nid=24 [pin: Mic (Both)] [DISABLED] hdaa0: pcm0: at nid 5,6 and 8,9 on hdaa0 pcm0: +--------------------------------------+ pcm0: | DUMPING PCM Playback/Record Channels | pcm0: +--------------------------------------+ pcm0: pcm0: Playback: pcm0: pcm0: Stream cap: 0x00000001 pcm0: PCM pcm0: PCM cap: 0x000e007f pcm0: 16 20 24 bits, 8 11 16 22 32 44 48 KHz pcm0: DAC: 3 pcm0: pcm0: Record: pcm0: pcm0: Stream cap: 0x00000001 pcm0: PCM pcm0: PCM cap: 0x0006007f pcm0: 16 20 bits, 8 11 16 22 32 44 48 KHz pcm0: DAC: 4 pcm0: pcm0: +-------------------------------+ pcm0: | DUMPING Playback/Record Paths | pcm0: +-------------------------------+ pcm0: pcm0: Playback: pcm0: pcm0: nid=5 [pin: Speaker (Fixed)] pcm0: | pcm0: + <- nid=14 [audio mixer] [src: pcm, speaker, line, mic] pcm0: | pcm0: + <- nid=13 [audio selector] [src: speaker] pcm0: | pcm0: + <- nid=16 [beep widget] [src: speaker] pcm0: + <- nid=17 [audio selector] [src: pcm] pcm0: | pcm0: + <- nid=3 [audio output] [src: pcm] pcm0: + <- nid=18 [audio selector] [src: mic] pcm0: | pcm0: + <- nid=8 [pin: Mic (Grey Jack)] [src: mic] pcm0: + <- nid=19 [audio selector] [src: line] pcm0: | pcm0: + <- nid=9 [pin: Line-in (Blue Jack)] [src: line] pcm0: pcm0: nid=6 [pin: Headphones (Grey Jack)] pcm0: | pcm0: + <- nid=14 [audio mixer] [src: pcm, speaker, line, mic] pcm0: | pcm0: + <- nid=13 [audio selector] [src: speaker] pcm0: | pcm0: + <- nid=16 [beep widget] [src: speaker] pcm0: + <- nid=17 [audio selector] [src: pcm] pcm0: | pcm0: + <- nid=3 [audio output] [src: pcm] pcm0: + <- nid=18 [audio selector] [src: mic] pcm0: | pcm0: + <- nid=8 [pin: Mic (Grey Jack)] [src: mic] pcm0: + <- nid=19 [audio selector] [src: line] pcm0: | pcm0: + <- nid=9 [pin: Line-in (Blue Jack)] [src: line] pcm0: pcm0: Record: pcm0: pcm0: nid=4 [audio input] pcm0: | pcm0: + <- nid=21 [audio selector] [src: line, mic] pcm0: | pcm0: + <- nid=12 [audio mixer] [src: mic] pcm0: | pcm0: + <- nid=30 [audio selector] [src: mic] pcm0: | pcm0: + <- nid=8 [pin: Mic (Grey Jack)] [src: mic] pcm0: + <- nid=9 [pin: Line-in (Blue Jack)] [src: line] pcm0: pcm0: +-------------------------+ pcm0: | DUMPING Volume Controls | pcm0: +-------------------------+ pcm0: pcm0: Master Volume (OSS: vol): -91/3dB pcm0: | pcm0: +- ctl 1 (nid 5 in ): -91/3dB (64 steps) + mute pcm0: +- ctl 3 (nid 6 in ): -91/3dB (64 steps) + mute pcm0: +- ctl 8 (nid 13 out): -45/0dB (16 steps) + mute pcm0: +- ctl 9 (nid 17 out): -34/12dB (32 steps) + mute pcm0: +- ctl 10 (nid 18 out): -34/12dB (32 steps) + mute pcm0: +- ctl 11 (nid 19 out): -34/12dB (32 steps) + mute pcm0: pcm0: PCM Volume (OSS: pcm): -34/12dB pcm0: | pcm0: +- ctl 9 (nid 17 out): -34/12dB (32 steps) + mute pcm0: pcm0: Microphone Volume (OSS: mic): 0/30dB pcm0: | pcm0: +- ctl 5 (nid 8 out): 0/30dB (4 steps) pcm0: +- ctl 10 (nid 18 out): -34/12dB (32 steps) + mute pcm0: +- ctl 12 (nid 21 out): 0/22dB (16 steps) + mute pcm0: +- ctl 19 (nid 30 out): mute pcm0: pcm0: Line-in Volume (OSS: line): 0/30dB pcm0: | pcm0: +- ctl 7 (nid 9 out): 0/30dB (4 steps) pcm0: +- ctl 11 (nid 19 out): -34/12dB (32 steps) + mute pcm0: +- ctl 12 (nid 21 out): 0/22dB (16 steps) + mute pcm0: pcm0: Speaker/Beep Volume (OSS: speaker): -45/0dB pcm0: | pcm0: +- ctl 8 (nid 13 out): -45/0dB (16 steps) + mute pcm0: pcm0: Recording Level (OSS: rec): 0/22dB pcm0: | pcm0: +- ctl 12 (nid 21 out): 0/22dB (16 steps) + mute pcm0: +- ctl 19 (nid 30 out): mute pcm0: pcm0: Input Monitoring Level (OSS: igain): -34/0dB pcm0: | pcm0: +- ctl 8 (nid 13 out): -45/0dB (16 steps) + mute pcm0: +- ctl 10 (nid 18 out): -34/12dB (32 steps) + mute pcm0: +- ctl 11 (nid 19 out): -34/12dB (32 steps) + mute pcm0: pcm0: Mixer "vol": pcm0: Mixer "pcm": pcm0: Mixer "speaker": pcm0: Mixer "line": pcm0: Mixer "mic": pcm0: Mixer "rec": pcm0: Mixer "igain": pcm0: Mixer "ogain": pcm0: clone manager: deadline=750ms flags=0x8000001e pcm0: sndbuf_setmap 6080000, 10000; 0xffffff80cd87e000 -> 6080000 pcm0: sndbuf_setmap 60c0000, 10000; 0xffffff80cd8be000 -> 60c0000 hdacc1: at cad 1 on hdac0 hdacc1: Root Node at nid=0: 1 subnodes 1-1 unknown: at nid 1 on hdacc1 (no driver attached) usbus0: 12Mbps Full Speed USB v1.0 usbus1: 12Mbps Full Speed USB v1.0 usbus2: 12Mbps Full Speed USB v1.0 usbus3: 12Mbps Full Speed USB v1.0 usbus4: 12Mbps Full Speed USB v1.0 usbus5: 480Mbps High Speed USB v2.0 acpi_tz0: _AC3: temperature 77.0 >= setpoint 40.0 acpi_tz0: _AC2: temperature 77.0 >= setpoint 50.0 acpi_tz0: _AC1: temperature 77.0 >= setpoint 60.0 acpi_tz0: _AC0: temperature 77.0 >= setpoint 70.0 acpi_tz0: switched from NONE to _AC0: 77.0C ugen0.1: at usbus0 uhub0: on usbus0 ugen1.1: at usbus1 uhub1: on usbus1 ugen2.1: at usbus2 uhub2: on usbus2 ugen3.1: at usbus3 uhub3: on usbus3 ugen4.1: at usbus4 uhub4: on usbus4 ugen5.1: at usbus5 uhub5: on usbus5 ahcich0: AHCI reset... ahcich0: SATA connect time=1800us status=00000113 ahcich0: AHCI reset: device found ata0: reset tp1 mask=03 ostat0=50 ostat1=00 ahcich0: AHCI reset: device ready after 100ms (aprobe0:ahcich0:0:0:0): SIGNATURE: 0000 ata0: stat0=0x00 err=0x01 lsb=0x14 msb=0xeb ata0: stat1=0x00 err=0x00 lsb=0x00 msb=0x00 ata0: reset tp2 stat0=00 stat1=00 devices=0x10000 (aprobe1:ata0:0:0:0): SIGNATURE: eb14 battery0: battery initialization start battery1: battery initialization start acpi_acad0: acline initialization start acpi_acad0: On Line acpi_acad0: acline initialization done, tried 1 times acpi_tz0: _AC3: temperature 77.0 >= setpoint 40.0 acpi_tz0: _AC2: temperature 77.0 >= setpoint 50.0 acpi_tz0: _AC1: temperature 77.0 >= setpoint 60.0 acpi_tz0: _AC3: temperature 77.0 >= setpoint 40.0 acpi_tz0: _AC2: temperature 77.0 >= setpoint 50.0 acpi_tz0: _AC1: temperature 77.0 >= setpoint 60.0 battery0: battery initialization done, tried 1 times uhub0: 2 ports with 2 removable, self powered uhub1: 2 ports with 2 removable, self powered uhub2: 2 ports with 2 removable, self powered uhub3: 2 ports with 2 removable, self powered uhub4: 2 ports with 2 removable, self powered (probe0:ctl2cam0:0:1:0): Error 6, Unretryable error pass0 at ahcich0 bus 0 scbus0 target 0 lun 0 pass0: GEOM: new disk cd0 ATA-7 SATA 1.x device pass0: Serial Number 5MA83WKD pass0: 150.000MB/s transfers ((cd0:ata0:0:0:0): SCSI status error (cd0:ata0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd0:ata0:0:0:0): CAM status: SCSI Status Error (cd0:ata0:0:0:0): SCSI status: Check Condition (cd0:ata0:0:0:0): SCSI sense: NOT READY asc:3a,1 (Medium not present - tray closed) (cd0:ata0:0:0:0): Error 6, Unretryable error cd0 at ata0 bus 0 scbus1 target 0 lun 0 cd0: Removable CD-ROM SCSI-0 device cd0: Serial Number HE58 101390 cd0: 16.700MB/s transfers (WDMA2, ATAPI 12bytes, PIO 65534bytes) cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed SATA 1.x, UDMA5, PIO 8192bytes) pass1 at ata0 bus 0 scbus1 target 0 lun 0 pass1: Removable CD-ROM SCSI-0 device pass1: Serial Number HE58 101390 pass1: 16.700MB/s transfers (WDMA2, ATAPI 12bytes, PIO 65534bytes) ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0: ATA-7 SATA 1.x device ada0: Serial Number 5MA83WKD ada0: 150.000MB/s transfers (SATA 1.x, UDMA5, PIO 8192bytes) ada0: 152627MB (312581808 512 byte sectors: 16H 63S/T 16383C) ada0: Previously was known as ad4 (cd0:ata0:0:0:0): SCSI status error (cd0:ata0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd0:ata0:0:0:0): CAM status: SCSI Status Error (cd0:ata0:0:0:0): SCSI status: Check Condition (cd0:ata0:0:0:0): SCSI sense: NOT READY asc:3a,1 (Medium not present - tray closed) (cd0:ata0:0:0:0): Error 6, Unretryable error SMP: AP CPU #1 Launched! cpu1 AP: ID: 0x01000000 VER: 0x80050010 LDR: 0x00000000 DFR: 0xffffffff lint0: 0x00010700 lint1: 0x00000400 TPR: 0x00000000 SVR: 0x000001ff timer: 0x000100ef therm: 0x00010000 err: 0x000000f0 pmc: 0x00010400 TSC timecounter discards lower 7 bit(s) Timecounter "TSC-low" frequency 15586291 Hz quality -100 WARNING: WITNESS option enabled, expect reduced performance. (cd0:ata0:0:0:0): SCSI status error (cd0:ata0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd0:ata0:0:0:0): CAM status: SCSI Status Error (cd0:ata0:0:0:0): SCSI status: Check Condition (cd0:ata0:0:0:0): SCSI sense: NOT READY asc:3a,1 (Medium not present - tray closed) (cd0:ata0:0:0:0): Error 6, Unretryable error (cd0:ata0:0:0:0): SCSI status error (cd0:ata0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd0:ata0:0:0:0): CAM status: SCSI Status Error (cd0:ata0:0:0:0): SCSI status: Check Condition (cd0:ata0:0:0:0): SCSI sense: NOT READY asc:3a,1 (Medium not present - tray closed) (cd0:ata0:0:0:0): Error 6, Unretryable error GEOM: new disk ada0 Root mount waiting for: usbus5 uhub5: 10 ports with 10 removable, self powered Trying to mount root from ufs:/dev/ad4s1a [rw]... start_init: trying /sbin/init acpi_tz0: _AC3: temperature 71.0 >= setpoint 40.0 acpi_tz0: _AC2: temperature 71.0 >= setpoint 50.0 acpi_tz0: _AC1: temperature 71.0 >= setpoint 60.0 -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 From owner-freebsd-current@FreeBSD.ORG Thu May 3 16:17:44 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4303A1065675; Thu, 3 May 2012 16:17:44 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id F39DE8FC0A; Thu, 3 May 2012 16:17:43 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 6779D7300A; Thu, 3 May 2012 18:37:36 +0200 (CEST) Date: Thu, 3 May 2012 18:37:36 +0200 From: Luigi Rizzo To: net@freebsd.org, current@freebsd.org Message-ID: <20120503163736.GA4920@onelab2.iet.unipi.it> References: <20120419133018.GA91364@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120419133018.GA91364@onelab2.iet.unipi.it> User-Agent: Mutt/1.4.2.3i Cc: Subject: Re: Some performance measurements on the FreeBSD network stack X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 16:17:44 -0000 On Thu, Apr 19, 2012 at 03:30:18PM +0200, Luigi Rizzo wrote: > I have been running some performance tests on UDP sockets, > using the netsend program in tools/tools/netrate/netsend > and instrumenting the source code and the kernel do return in > various points of the path. Here are some results which > I hope you find interesting. ... I have summarized the info on this thread in the camera ready version of an upcoming Usenix paper, which you can find here: http://info.iet.unipi.it/~luigi/papers/20120503-netmap-atc12.pdf cheers luigi From owner-freebsd-current@FreeBSD.ORG Thu May 3 16:24:29 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DB7E51065677; Thu, 3 May 2012 16:24:29 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id E75D88FC0C; Thu, 3 May 2012 16:24:28 +0000 (UTC) Received: by eekd17 with SMTP id d17so639557eek.13 for ; Thu, 03 May 2012 09:24:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=reply-to:from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:content-transfer-encoding:x-mailer :thread-index:content-language; bh=y/Wk57otpV9B6GISLYgcWSvou9kxLcd/XtAwj+JdFaQ=; b=ZkcgigvcArswmkRsN5lG5UwKFN6Mn5Us5sbOrMQxPen/PxcXkBqTy0ulPcirvaSSV8 erSBKKek/d94ygvBB1Kgu1wEUi++onGshH3A8yp7KRzSv+Qzxrrlrnkuv/qiOdBokf3D MR+xqZ2kC6RaOsvjCJHxV49Novkw6zTLkJ5J3/OMm9rU+TBEdPpCBUI+S3MtRhdhIqEw 5vuejnxmjcaRzDIQgtplb73rQz27LURf2fIYPPfgXJrSL8H5dLwmrd7WE2BPyRqXd8r6 615UC8do7jNPm+LxmKWQvtpQIZ2F4ZeFKcmqJHUZeLO3kpAS6BFZi3YZnhbypwlGPHtx 1law== Received: by 10.213.25.220 with SMTP id a28mr428495ebc.88.1336062262470; Thu, 03 May 2012 09:24:22 -0700 (PDT) Received: from rimwks1w7x64 ([164.215.95.17]) by mx.google.com with ESMTPS id r44sm27684927eef.2.2012.05.03.09.24.18 (version=SSLv3 cipher=OTHER); Thu, 03 May 2012 09:24:21 -0700 (PDT) From: rozhuk.im@gmail.com To: "'Attilio Rao'" , "'Steven Atreju'" References: <20120502182557.GA93838@onelab2.iet.unipi.it> <20120502215249.GT633@sherwood.local> <20120503102844.GU633@sherwood.local> In-Reply-To: Date: Fri, 4 May 2012 01:24:11 +0900 Message-ID: <4fa2b135.c4600e0a.153f.03f9@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 thread-index: Ac0pGs90ju5hdBweRg2lwkSX0/opcQALSi1A Content-Language: ru X-Mailman-Approved-At: Thu, 03 May 2012 16:27:44 +0000 Cc: current@freebsd.org, 'Luigi Rizzo' , "'K. Macy'" , net@freebsd.org Subject: RE: fast bcopy... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Rozhuk.IM@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 16:24:30 -0000 > > guess this is a good time to thank the FreeBSD hackers for that FPU > > stack FILD/FISTP idea! > > I'll append the copy related notes of our doc/memperf.txt. > > Thanks, >=20 > I made an implementation of fpu unwinding and mmx copy to see if they > were really making a difference years ago (reimplementing bcopy, > memcopy, etc.). Codecs, such as Ffdshow often contain their own functions to work with = memory. From owner-freebsd-current@FreeBSD.ORG Thu May 3 16:53:43 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 288F1106566C for ; Thu, 3 May 2012 16:53:43 +0000 (UTC) (envelope-from bschmidt@techwires.net) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1A0C88FC1A for ; Thu, 3 May 2012 16:53:41 +0000 (UTC) Received: by bkvi17 with SMTP id i17so2157765bkv.13 for ; Thu, 03 May 2012 09:53:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:subject:date:user-agent:cc:mime-version:content-type :message-id:x-gm-message-state; bh=VplpBaQaz3xbxMIJBQoY8jBMjG4qj5HfUV2360/mDXw=; b=PUwfY/TZZf3EmFdQfrWhYFJL3/2IW3gRZksIKANtb8+PZ5PUQF94oUg8/39an57SQB 2cLAgMX4cVQRSFJ+PaP0sz0pVhUlbQN+qmbxF9AwEhY1ybRO5Lpn38eDd3gXCT0SFuBJ ZP/z6/KdIZxPjsbs3SZsGczFLgF6km81jyxzg08jkBcP6Fp1hGfsvuc7ynBrSK4zZIb1 CCXB8ooUNGBr7tBE98mwtf+R8Zmf0lkQ80llpDfpafwK8DeY/+iEloo/8n87uI0dTvpo 4d1C5iNjiM/nGg5IEHzZnYecOqiVLwlMPsMrw7GL85A7YFEsD2eC4Y9uxQQP33iaCyeY cnug== Received: by 10.204.141.25 with SMTP id k25mr934691bku.72.1336064020804; Thu, 03 May 2012 09:53:40 -0700 (PDT) Received: from amy.lab.techwires.net (dslb-094-217-143-073.pools.arcor-ip.net. [94.217.143.73]) by mx.google.com with ESMTPS id n17sm11904912bkw.5.2012.05.03.09.53.27 (version=SSLv3 cipher=OTHER); Thu, 03 May 2012 09:53:40 -0700 (PDT) Sender: Bernhard Schmidt From: Bernhard Schmidt To: freebsd-wireless@freebsd.org Date: Thu, 3 May 2012 18:53:52 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.0-STABLE; KDE/4.7.4; amd64; ; ) MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_ggroP1S39UUHyDC" Message-Id: <201205031853.53102.bschmidt@freebsd.org> X-Gm-Message-State: ALoCoQm2O7oed4lT5n3CCYZCwtmXurEAl2NbWXVG39KgQ30TxxWqSQpC0wNLs2gZ2GDFRxJ6Uxuw Cc: freebsd-net@freebsd.org, freebsd-current@freebsd.org Subject: [CFT] Ralink RT2860, RT2870, RT3060, RT3090 support X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 16:53:43 -0000 --Boundary-00=_ggroP1S39UUHyDC Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi folks, As some of you might know there has been some work going on porting support for new Ralink chipsets from OpenBSD. Several different drivers where floating around but nothing seemed to be decent enough to be committed. ray@ and I had been working on cleaning up one of those to get it into a good enough shape, but abandoned this approach as it resulted in more work than starting from scratch. So, attached diff [1] is a from-scratch effort to port over support for the new chipsets. It doesn't contain fancy stuff like 802.11n support as of yet (this will be worked one once the legacy stuff is in HEAD), nonetheless it showed pretty decent performance during the basic sta/adhoc/hostap tests I've done. I'd appreciate testing and feedback ;) The diff requires HEAD due to the firmware being available only there, though, if there are enough requests, I might consider looking into getting it merged to 9. (Simply pulling sys/modules/ralfw/ and sys/contrib/dev/ral/ from HEAD might be enough I guess.) [1] http://techwires.net/~bschmidt/rt2860.diff -- Bernhard --Boundary-00=_ggroP1S39UUHyDC Content-Type: text/x-patch; charset="UTF-8"; name="rt2860.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="rt2860.diff" Index: sys/conf/files =================================================================== --- sys/conf/files (revision 234847) +++ sys/conf/files (working copy) @@ -1759,6 +1759,7 @@ dev/puc/pucdata.c optional puc pci dev/quicc/quicc_core.c optional quicc dev/ral/rt2560.c optional ral dev/ral/rt2661.c optional ral +dev/ral/rt2860.c optional ral dev/ral/if_ral_pci.c optional ral pci rt2561fw.c optional rt2561fw | ralfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rt2561.fw:rt2561fw -mrt2561 -c${.TARGET}" \ Index: sys/modules/ral/Makefile =================================================================== --- sys/modules/ral/Makefile (revision 234847) +++ sys/modules/ral/Makefile (working copy) @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../dev/ral KMOD= if_ral -SRCS= rt2560.c rt2661.c if_ral_pci.c +SRCS= rt2560.c rt2661.c rt2860.c if_ral_pci.c SRCS+= device_if.h bus_if.h pci_if.h .include Index: sys/dev/ral/rt2860.c =================================================================== --- sys/dev/ral/rt2860.c (revision 0) +++ sys/dev/ral/rt2860.c (working copy) @@ -0,0 +1,4110 @@ +/* $FreeBSD$ */ +/* $OpenBSD: rt2860.c,v 1.65 2010/10/23 14:24:54 damien Exp $ */ + +/*- + * Copyright (c) 2007-2010 Damien Bergamini + * Copyright (c) 2012 Bernhard Schmidt + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/*- + * Ralink Technology RT2860/RT3090/RT3390/RT3562 chipset driver + * http://www.ralinktech.com/ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#define RAL_DEBUG +#ifdef RAL_DEBUG +#define DPRINTF(x) do { if (sc->sc_debug > 0) printf x; } while (0) +#define DPRINTFN(n, x) do { if (sc->sc_debug >= (n)) printf x; } while (0) +int rt2860_debug = 0; +#else +#define DPRINTF(x) +#define DPRINTFN(n, x) +#endif + +static struct ieee80211vap *rt2860_vap_create(struct ieee80211com *, + const char [IFNAMSIZ], int, enum ieee80211_opmode, + int, const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); +static void rt2860_vap_delete(struct ieee80211vap *); +static void rt2860_dma_map_addr(void *, bus_dma_segment_t *, int, int); +static int rt2860_alloc_tx_ring(struct rt2860_softc *, + struct rt2860_tx_ring *); +static void rt2860_reset_tx_ring(struct rt2860_softc *, + struct rt2860_tx_ring *); +static void rt2860_free_tx_ring(struct rt2860_softc *, + struct rt2860_tx_ring *); +static int rt2860_alloc_tx_pool(struct rt2860_softc *); +static void rt2860_free_tx_pool(struct rt2860_softc *); +static int rt2860_alloc_rx_ring(struct rt2860_softc *, + struct rt2860_rx_ring *); +static void rt2860_reset_rx_ring(struct rt2860_softc *, + struct rt2860_rx_ring *); +static void rt2860_free_rx_ring(struct rt2860_softc *, + struct rt2860_rx_ring *); +static void rt2860_updatestats(struct rt2860_softc *); +static void rt2860_newassoc(struct ieee80211_node *, int); +static void rt2860_node_free(struct ieee80211_node *); +#ifdef IEEE80211_HT +static int rt2860_ampdu_rx_start(struct ieee80211com *, + struct ieee80211_node *, uint8_t); +static void rt2860_ampdu_rx_stop(struct ieee80211com *, + struct ieee80211_node *, uint8_t); +#endif +static int rt2860_newstate(struct ieee80211vap *, enum ieee80211_state, + int); +static uint16_t rt3090_efuse_read_2(struct rt2860_softc *, uint16_t); +static uint16_t rt2860_eeprom_read_2(struct rt2860_softc *, uint16_t); +static void rt2860_intr_coherent(struct rt2860_softc *); +static void rt2860_drain_stats_fifo(struct rt2860_softc *); +static void rt2860_tx_intr(struct rt2860_softc *, int); +static void rt2860_rx_intr(struct rt2860_softc *); +static void rt2860_tbtt_intr(struct rt2860_softc *); +static void rt2860_gp_intr(struct rt2860_softc *); +static int rt2860_tx(struct rt2860_softc *, struct mbuf *, + struct ieee80211_node *); +static int rt2860_raw_xmit(struct ieee80211_node *, struct mbuf *, + const struct ieee80211_bpf_params *); +static int rt2860_tx_raw(struct rt2860_softc *, struct mbuf *, + struct ieee80211_node *, + const struct ieee80211_bpf_params *params); +static void rt2860_start(struct ifnet *); +static void rt2860_start_locked(struct ifnet *); +static void rt2860_watchdog(void *); +static int rt2860_ioctl(struct ifnet *, u_long, caddr_t); +static void rt2860_mcu_bbp_write(struct rt2860_softc *, uint8_t, uint8_t); +static uint8_t rt2860_mcu_bbp_read(struct rt2860_softc *, uint8_t); +static void rt2860_rf_write(struct rt2860_softc *, uint8_t, uint32_t); +static uint8_t rt3090_rf_read(struct rt2860_softc *, uint8_t); +static void rt3090_rf_write(struct rt2860_softc *, uint8_t, uint8_t); +static int rt2860_mcu_cmd(struct rt2860_softc *, uint8_t, uint16_t, int); +static void rt2860_enable_mrr(struct rt2860_softc *); +static void rt2860_set_txpreamble(struct rt2860_softc *); +static void rt2860_set_basicrates(struct rt2860_softc *, + const struct ieee80211_rateset *); +static void rt2860_scan_start(struct ieee80211com *); +static void rt2860_scan_end(struct ieee80211com *); +static void rt2860_set_channel(struct ieee80211com *); +static void rt2860_select_chan_group(struct rt2860_softc *, int); +static void rt2860_set_chan(struct rt2860_softc *, u_int); +static void rt3090_set_chan(struct rt2860_softc *, u_int); +static int rt3090_rf_init(struct rt2860_softc *); +static void rt3090_rf_wakeup(struct rt2860_softc *); +static int rt3090_filter_calib(struct rt2860_softc *, uint8_t, uint8_t, + uint8_t *); +static void rt3090_rf_setup(struct rt2860_softc *); +static void rt2860_set_leds(struct rt2860_softc *, uint16_t); +static void rt2860_set_gp_timer(struct rt2860_softc *, int); +static void rt2860_set_bssid(struct rt2860_softc *, const uint8_t *); +static void rt2860_set_macaddr(struct rt2860_softc *, const uint8_t *); +static void rt2860_update_promisc(struct ifnet *); +static void rt2860_updateslot(struct ifnet *); +static void rt2860_updateprot(struct ifnet *); +static int rt2860_updateedca(struct ieee80211com *); +#ifdef HW_CRYPTO +static int rt2860_set_key(struct ieee80211com *, struct ieee80211_node *, + struct ieee80211_key *); +static void rt2860_delete_key(struct ieee80211com *, + struct ieee80211_node *, struct ieee80211_key *); +#endif +static int8_t rt2860_rssi2dbm(struct rt2860_softc *, uint8_t, uint8_t); +static const char *rt2860_get_rf(uint8_t); +static int rt2860_read_eeprom(struct rt2860_softc *, + uint8_t macaddr[IEEE80211_ADDR_LEN]); +static int rt2860_bbp_init(struct rt2860_softc *); +static int rt2860_txrx_enable(struct rt2860_softc *); +static void rt2860_init(void *); +static void rt2860_init_locked(struct rt2860_softc *); +static void rt2860_stop(void *); +static void rt2860_stop_locked(struct rt2860_softc *); +static int rt2860_load_microcode(struct rt2860_softc *); +#ifdef NOT_YET +static void rt2860_calib(struct rt2860_softc *); +#endif +static void rt3090_set_rx_antenna(struct rt2860_softc *, int); +static void rt2860_switch_chan(struct rt2860_softc *, + struct ieee80211_channel *); +static int rt2860_setup_beacon(struct rt2860_softc *, + struct ieee80211vap *); +static void rt2860_enable_tsf_sync(struct rt2860_softc *); + +static const struct { + uint32_t reg; + uint32_t val; +} rt2860_def_mac[] = { + RT2860_DEF_MAC +}; + +static const struct { + uint8_t reg; + uint8_t val; +} rt2860_def_bbp[] = { + RT2860_DEF_BBP +}; + +static const struct rfprog { + uint8_t chan; + uint32_t r1, r2, r3, r4; +} rt2860_rf2850[] = { + RT2860_RF2850 +}; + +struct { + uint8_t n, r, k; +} rt3090_freqs[] = { + RT3070_RF3052 +}; + +static const struct { + uint8_t reg; + uint8_t val; +} rt3090_def_rf[] = { + RT3070_DEF_RF +}; + +int +rt2860_attach(device_t dev, int id) +{ + struct rt2860_softc *sc = device_get_softc(dev); + struct ieee80211com *ic; + struct ifnet *ifp; + uint32_t tmp; + int error, ntries, qid; + uint8_t bands; + uint8_t macaddr[IEEE80211_ADDR_LEN]; + + sc->sc_dev = dev; + + ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211); + if (ifp == NULL) { + device_printf(sc->sc_dev, "can not if_alloc()\n"); + return ENOMEM; + } + ic = ifp->if_l2com; + + mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF | MTX_RECURSE); + + callout_init_mtx(&sc->watchdog_ch, &sc->sc_mtx, 0); + + /* wait for NIC to initialize */ + for (ntries = 0; ntries < 100; ntries++) { + tmp = RAL_READ(sc, RT2860_ASIC_VER_ID); + if (tmp != 0 && tmp != 0xffffffff) + break; + DELAY(10); + } + if (ntries == 100) { + device_printf(sc->sc_dev, + "timeout waiting for NIC to initialize\n"); + error = EIO; + goto fail1; + } + sc->mac_ver = tmp >> 16; + sc->mac_rev = tmp & 0xffff; + + if (sc->mac_ver != 0x2860 && + (id == 0x0681 || id == 0x0781 || id == 0x1059)) + sc->sc_flags |= RT2860_ADVANCED_PS; + + /* retrieve RF rev. no and various other things from EEPROM */ + rt2860_read_eeprom(sc, macaddr); + device_printf(sc->sc_dev, + "MAC/BBP RT%X (rev 0x%04X), RF %s (MIMO %dT%dR)\n", + sc->mac_ver, sc->mac_rev, rt2860_get_rf(sc->rf_rev), + sc->ntxchains, sc->nrxchains); + + /* + * Allocate Tx (4 EDCAs + HCCA + Mgt) and Rx rings. + */ + for (qid = 0; qid < 6; qid++) { + if ((error = rt2860_alloc_tx_ring(sc, &sc->txq[qid])) != 0) { + device_printf(sc->sc_dev, + "could not allocate Tx ring %d\n", qid); + goto fail2; + } + } + + if ((error = rt2860_alloc_rx_ring(sc, &sc->rxq)) != 0) { + device_printf(sc->sc_dev, "could not allocate Rx ring\n"); + goto fail2; + } + + if ((error = rt2860_alloc_tx_pool(sc)) != 0) { + device_printf(sc->sc_dev, "could not allocate Tx pool\n"); + goto fail3; + } + + /* mgmt ring is broken on RT2860C, use EDCA AC VO ring instead */ + sc->mgtqid = (sc->mac_ver == 0x2860 && sc->mac_rev == 0x0100) ? + WME_AC_VO : 5; + + ifp->if_softc = sc; + if_initname(ifp, device_get_name(dev), device_get_unit(dev)); + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_init = rt2860_init; + ifp->if_ioctl = rt2860_ioctl; + ifp->if_start = rt2860_start; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; + IFQ_SET_READY(&ifp->if_snd); + + ic->ic_ifp = ifp; + ic->ic_opmode = IEEE80211_M_STA; + ic->ic_phytype = IEEE80211_T_OFDM; /* not only, but not used */ + + /* set device capabilities */ + ic->ic_caps = + IEEE80211_C_STA /* station mode */ + | IEEE80211_C_IBSS /* ibss, nee adhoc, mode */ + | IEEE80211_C_HOSTAP /* hostap mode */ + | IEEE80211_C_MONITOR /* monitor mode */ + | IEEE80211_C_AHDEMO /* adhoc demo mode */ + | IEEE80211_C_WDS /* 4-address traffic works */ + | IEEE80211_C_MBSS /* mesh point link mode */ + | IEEE80211_C_SHPREAMBLE /* short preamble supported */ + | IEEE80211_C_SHSLOT /* short slot time supported */ + | IEEE80211_C_WPA /* capable of WPA1+WPA2 */ + | IEEE80211_C_BGSCAN /* capable of bg scanning */ + | IEEE80211_C_WME /* 802.11e */ + ; + + bands = 0; + setbit(&bands, IEEE80211_MODE_11B); + setbit(&bands, IEEE80211_MODE_11G); + if (sc->rf_rev == RT2860_RF_2750 || sc->rf_rev == RT2860_RF_2850) + setbit(&bands, IEEE80211_MODE_11A); + ieee80211_init_channels(ic, NULL, &bands); + + ieee80211_ifattach(ic, macaddr); + + ic->ic_wme.wme_update = rt2860_updateedca; + ic->ic_scan_start = rt2860_scan_start; + ic->ic_scan_end = rt2860_scan_end; + ic->ic_set_channel = rt2860_set_channel; + ic->ic_updateslot = rt2860_updateslot; + ic->ic_update_promisc = rt2860_update_promisc; + ic->ic_raw_xmit = rt2860_raw_xmit; + sc->sc_node_free = ic->ic_node_free; + ic->ic_node_free = rt2860_node_free; + ic->ic_newassoc = rt2860_newassoc; + + ic->ic_vap_create = rt2860_vap_create; + ic->ic_vap_delete = rt2860_vap_delete; + + ieee80211_radiotap_attach(ic, + &sc->sc_txtap.wt_ihdr, sizeof(sc->sc_txtap), + RT2860_TX_RADIOTAP_PRESENT, + &sc->sc_rxtap.wr_ihdr, sizeof(sc->sc_rxtap), + RT2860_RX_RADIOTAP_PRESENT); + +#ifdef RAL_DEBUG + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "debug", CTLFLAG_RW, &sc->sc_debug, 0, "debug msgs"); +#endif + if (bootverbose) + ieee80211_announce(ic); + + return 0; + +fail3: rt2860_free_rx_ring(sc, &sc->rxq); +fail2: while (--qid >= 0) + rt2860_free_tx_ring(sc, &sc->txq[qid]); +fail1: mtx_destroy(&sc->sc_mtx); + if_free(ifp); + return error; +} + +int +rt2860_detach(void *xsc) +{ + struct rt2860_softc *sc = xsc; + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + int qid; + + RAL_LOCK(sc); + rt2860_stop_locked(sc); + RAL_UNLOCK(sc); + + ieee80211_ifdetach(ic); + + for (qid = 0; qid < 6; qid++) + rt2860_free_tx_ring(sc, &sc->txq[qid]); + rt2860_free_rx_ring(sc, &sc->rxq); + rt2860_free_tx_pool(sc); + + if_free(ifp); + + mtx_destroy(&sc->sc_mtx); + + return 0; +} + +void +rt2860_shutdown(void *xsc) +{ + struct rt2860_softc *sc = xsc; + + rt2860_stop(sc); +} + +void +rt2860_suspend(void *xsc) +{ + struct rt2860_softc *sc = xsc; + + rt2860_stop(sc); +} + +void +rt2860_resume(void *xsc) +{ + struct rt2860_softc *sc = xsc; + struct ifnet *ifp = sc->sc_ifp; + + if (ifp->if_flags & IFF_UP) + rt2860_init(sc); +} + +static struct ieee80211vap * +rt2860_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) +{ + struct ifnet *ifp = ic->ic_ifp; + struct rt2860_vap *rvp; + struct ieee80211vap *vap; + + switch (opmode) { + case IEEE80211_M_STA: + case IEEE80211_M_IBSS: + case IEEE80211_M_AHDEMO: + case IEEE80211_M_MONITOR: + case IEEE80211_M_HOSTAP: + case IEEE80211_M_MBSS: + /* XXXRP: TBD */ + if (!TAILQ_EMPTY(&ic->ic_vaps)) { + if_printf(ifp, "only 1 vap supported\n"); + return NULL; + } + if (opmode == IEEE80211_M_STA) + flags |= IEEE80211_CLONE_NOBEACONS; + break; + case IEEE80211_M_WDS: + if (TAILQ_EMPTY(&ic->ic_vaps) || + ic->ic_opmode != IEEE80211_M_HOSTAP) { + if_printf(ifp, "wds only supported in ap mode\n"); + return NULL; + } + /* + * Silently remove any request for a unique + * bssid; WDS vap's always share the local + * mac address. + */ + flags &= ~IEEE80211_CLONE_BSSID; + break; + default: + if_printf(ifp, "unknown opmode %d\n", opmode); + return NULL; + } + rvp = malloc(sizeof(struct rt2860_vap), M_80211_VAP, M_NOWAIT | M_ZERO); + if (rvp == NULL) + return NULL; + vap = &rvp->ral_vap; + ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac); + + /* override state transition machine */ + rvp->ral_newstate = vap->iv_newstate; + vap->iv_newstate = rt2860_newstate; +#if 0 + vap->iv_update_beacon = rt2860_beacon_update; +#endif + + /* HW supports up to 255 STAs (0-254) in HostAP and IBSS modes */ + vap->iv_max_aid = min(IEEE80211_AID_MAX, RT2860_WCID_MAX); + + ieee80211_ratectl_init(vap); + /* complete setup */ + ieee80211_vap_attach(vap, ieee80211_media_change, ieee80211_media_status); + if (TAILQ_FIRST(&ic->ic_vaps) == vap) + ic->ic_opmode = opmode; + return vap; +} + +static void +rt2860_vap_delete(struct ieee80211vap *vap) +{ + struct rt2860_vap *rvp = RT2860_VAP(vap); + + ieee80211_ratectl_deinit(vap); + ieee80211_vap_detach(vap); + free(rvp, M_80211_VAP); +} + +static void +rt2860_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error) +{ + if (error != 0) + return; + + KASSERT(nseg == 1, ("too many DMA segments, %d should be 1", nseg)); + + *(bus_addr_t *)arg = segs[0].ds_addr; +} + + +static int +rt2860_alloc_tx_ring(struct rt2860_softc *sc, struct rt2860_tx_ring *ring) +{ + int size, error; + + size = RT2860_TX_RING_COUNT * sizeof (struct rt2860_txd); + + error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 16, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + size, 1, size, 0, NULL, NULL, &ring->desc_dmat); + if (error != 0) { + device_printf(sc->sc_dev, "could not create desc DMA map\n"); + goto fail; + } + + error = bus_dmamem_alloc(ring->desc_dmat, (void **)&ring->txd, + BUS_DMA_NOWAIT | BUS_DMA_ZERO, &ring->desc_map); + if (error != 0) { + device_printf(sc->sc_dev, "could not allocate DMA memory\n"); + goto fail; + } + + error = bus_dmamap_load(ring->desc_dmat, ring->desc_map, ring->txd, + size, rt2860_dma_map_addr, &ring->paddr, 0); + if (error != 0) { + device_printf(sc->sc_dev, "could not load desc DMA map\n"); + goto fail; + } + + bus_dmamap_sync(ring->desc_dmat, ring->desc_map, BUS_DMASYNC_PREWRITE); + + error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, + RT2860_MAX_SCATTER, MCLBYTES, 0, NULL, NULL, &ring->data_dmat); + if (error != 0) { + device_printf(sc->sc_dev, "could not create data DMA tag\n"); + goto fail; + } + + return 0; + +fail: rt2860_free_tx_ring(sc, ring); + return error; +} + +void +rt2860_reset_tx_ring(struct rt2860_softc *sc, struct rt2860_tx_ring *ring) +{ + struct rt2860_tx_data *data; + int i; + + for (i = 0; i < RT2860_TX_RING_COUNT; i++) { + if ((data = ring->data[i]) == NULL) + continue; /* nothing mapped in this slot */ + + if (data->m != NULL) { + bus_dmamap_sync(ring->data_dmat, data->map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(ring->data_dmat, data->map); + m_freem(data->m); + data->m = NULL; + } + if (data->ni != NULL) { + ieee80211_free_node(data->ni); + data->ni = NULL; + } + + SLIST_INSERT_HEAD(&sc->data_pool, data, next); + ring->data[i] = NULL; + } + + ring->queued = 0; + ring->cur = ring->next = 0; +} + +void +rt2860_free_tx_ring(struct rt2860_softc *sc, struct rt2860_tx_ring *ring) +{ + struct rt2860_tx_data *data; + int i; + + if (ring->txd != NULL) { + bus_dmamap_sync(ring->desc_dmat, ring->desc_map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(ring->desc_dmat, ring->desc_map); + bus_dmamem_free(ring->desc_dmat, ring->txd, ring->desc_map); + } + if (ring->desc_dmat != NULL) + bus_dma_tag_destroy(ring->desc_dmat); + + for (i = 0; i < RT2860_TX_RING_COUNT; i++) { + if ((data = ring->data[i]) == NULL) + continue; /* nothing mapped in this slot */ + + if (data->m != NULL) { + bus_dmamap_sync(ring->data_dmat, data->map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(ring->data_dmat, data->map); + m_freem(data->m); + } + if (data->ni != NULL) + ieee80211_free_node(data->ni); + + SLIST_INSERT_HEAD(&sc->data_pool, data, next); + } +} + +/* + * Allocate a pool of TX Wireless Information blocks. + */ +int +rt2860_alloc_tx_pool(struct rt2860_softc *sc) +{ + caddr_t vaddr; + bus_addr_t paddr; + int i, size, error; + + size = RT2860_TX_POOL_COUNT * RT2860_TXWI_DMASZ; + + /* init data_pool early in case of failure.. */ + SLIST_INIT(&sc->data_pool); + + error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + size, 1, size, 0, NULL, NULL, &sc->txwi_dmat); + if (error != 0) { + device_printf(sc->sc_dev, "could not create txwi DMA tag\n"); + goto fail; + } + + error = bus_dmamem_alloc(sc->txwi_dmat, (void **)&sc->txwi_vaddr, + BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->txwi_map); + if (error != 0) { + device_printf(sc->sc_dev, "could not allocate DMA memory\n"); + goto fail; + } + + error = bus_dmamap_load(sc->txwi_dmat, sc->txwi_map, + sc->txwi_vaddr, size, rt2860_dma_map_addr, &paddr, 0); + if (error != 0) { + device_printf(sc->sc_dev, "could not load txwi DMA map\n"); + goto fail; + } + + bus_dmamap_sync(sc->txwi_dmat, sc->txwi_map, BUS_DMASYNC_PREWRITE); + + vaddr = sc->txwi_vaddr; + for (i = 0; i < RT2860_TX_POOL_COUNT; i++) { + struct rt2860_tx_data *data = &sc->data[i]; + + error = bus_dmamap_create(sc->txwi_dmat, 0, &data->map); + if (error != 0) { + device_printf(sc->sc_dev, "could not create DMA map\n"); + goto fail; + } + data->txwi = (struct rt2860_txwi *)vaddr; + data->paddr = paddr; + vaddr += RT2860_TXWI_DMASZ; + paddr += RT2860_TXWI_DMASZ; + + SLIST_INSERT_HEAD(&sc->data_pool, data, next); + } + + return 0; + +fail: rt2860_free_tx_pool(sc); + return error; +} + +void +rt2860_free_tx_pool(struct rt2860_softc *sc) +{ + if (sc->txwi_vaddr != NULL) { + bus_dmamap_sync(sc->txwi_dmat, sc->txwi_map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->txwi_dmat, sc->txwi_map); + bus_dmamem_free(sc->txwi_dmat, sc->txwi_vaddr, sc->txwi_map); + } + if (sc->txwi_dmat != NULL) + bus_dma_tag_destroy(sc->txwi_dmat); + + while (!SLIST_EMPTY(&sc->data_pool)) { + struct rt2860_tx_data *data; + data = SLIST_FIRST(&sc->data_pool); + bus_dmamap_destroy(sc->txwi_dmat, data->map); + SLIST_REMOVE_HEAD(&sc->data_pool, next); + } +} + +int +rt2860_alloc_rx_ring(struct rt2860_softc *sc, struct rt2860_rx_ring *ring) +{ + bus_addr_t physaddr; + int i, size, error; + + size = RT2860_RX_RING_COUNT * sizeof (struct rt2860_rxd); + + error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 16, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + size, 1, size, 0, NULL, NULL, &ring->desc_dmat); + if (error != 0) { + device_printf(sc->sc_dev, "could not create desc DMA tag\n"); + goto fail; + } + + error = bus_dmamem_alloc(ring->desc_dmat, (void **)&ring->rxd, + BUS_DMA_NOWAIT | BUS_DMA_ZERO, &ring->desc_map); + if (error != 0) { + device_printf(sc->sc_dev, "could not allocate DMA memory\n"); + goto fail; + } + + error = bus_dmamap_load(ring->desc_dmat, ring->desc_map, ring->rxd, + size, rt2860_dma_map_addr, &ring->paddr, 0); + if (error != 0) { + device_printf(sc->sc_dev, "could not load desc DMA map\n"); + goto fail; + } + + error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, + 1, MCLBYTES, 0, NULL, NULL, &ring->data_dmat); + if (error != 0) { + device_printf(sc->sc_dev, "could not create data DMA tag\n"); + goto fail; + } + + for (i = 0; i < RT2860_RX_RING_COUNT; i++) { + struct rt2860_rx_data *data = &ring->data[i]; + struct rt2860_rxd *rxd = &ring->rxd[i]; + + error = bus_dmamap_create(ring->data_dmat, 0, &data->map); + if (error != 0) { + device_printf(sc->sc_dev, "could not create DMA map\n"); + goto fail; + } + + data->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + if (data->m == NULL) { + device_printf(sc->sc_dev, + "could not allocate rx mbuf\n"); + error = ENOMEM; + goto fail; + } + + error = bus_dmamap_load(ring->data_dmat, data->map, + mtod(data->m, void *), MCLBYTES, rt2860_dma_map_addr, + &physaddr, 0); + if (error != 0) { + device_printf(sc->sc_dev, + "could not load rx buf DMA map"); + goto fail; + } + + rxd->sdp0 = htole32(physaddr); + rxd->sdl0 = htole16(MCLBYTES); + } + + bus_dmamap_sync(ring->desc_dmat, ring->desc_map, BUS_DMASYNC_PREWRITE); + + return 0; + +fail: rt2860_free_rx_ring(sc, ring); + return error; +} + +void +rt2860_reset_rx_ring(struct rt2860_softc *sc, struct rt2860_rx_ring *ring) +{ + int i; + + for (i = 0; i < RT2860_RX_RING_COUNT; i++) + ring->rxd[i].sdl0 &= ~htole16(RT2860_RX_DDONE); + + bus_dmamap_sync(ring->desc_dmat, ring->desc_map, BUS_DMASYNC_PREWRITE); + + ring->cur = 0; +} + +void +rt2860_free_rx_ring(struct rt2860_softc *sc, struct rt2860_rx_ring *ring) +{ + int i; + + if (ring->rxd != NULL) { + bus_dmamap_sync(ring->desc_dmat, ring->desc_map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(ring->desc_dmat, ring->desc_map); + bus_dmamem_free(ring->desc_dmat, ring->rxd, ring->desc_map); + } + if (ring->desc_dmat != NULL) + bus_dma_tag_destroy(ring->desc_dmat); + + for (i = 0; i < RT2860_RX_RING_COUNT; i++) { + struct rt2860_rx_data *data = &ring->data[i]; + + if (data->m != NULL) { + bus_dmamap_sync(ring->data_dmat, data->map, + BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(ring->data_dmat, data->map); + m_freem(data->m); + } + if (data->map != NULL) + bus_dmamap_destroy(ring->data_dmat, data->map); + } + if (ring->data_dmat != NULL) + bus_dma_tag_destroy(ring->data_dmat); +} + +static void +rt2860_updatestats(struct rt2860_softc *sc) +{ + struct ieee80211com *ic = sc->sc_ifp->if_l2com; + + /* + * In IBSS or HostAP modes (when the hardware sends beacons), the + * MAC can run into a livelock and start sending CTS-to-self frames + * like crazy if protection is enabled. Fortunately, we can detect + * when such a situation occurs and reset the MAC. + */ + if (ic->ic_curmode != IEEE80211_M_STA) { + /* check if we're in a livelock situation.. */ + uint32_t tmp = RAL_READ(sc, RT2860_DEBUG); + if ((tmp & (1 << 29)) && (tmp & (1 << 7 | 1 << 5))) { + /* ..and reset MAC/BBP for a while.. */ + DPRINTF(("CTS-to-self livelock detected\n")); + RAL_WRITE(sc, RT2860_MAC_SYS_CTRL, RT2860_MAC_SRST); + RAL_BARRIER_WRITE(sc); + DELAY(1); + RAL_WRITE(sc, RT2860_MAC_SYS_CTRL, + RT2860_MAC_RX_EN | RT2860_MAC_TX_EN); + } + } +} + +static void +rt2860_newassoc(struct ieee80211_node *ni, int isnew) +{ + struct ieee80211com *ic = ni->ni_ic; + struct rt2860_softc *sc = ic->ic_ifp->if_softc; + uint8_t wcid; + + wcid = IEEE80211_AID(ni->ni_associd); + if (isnew && ni->ni_associd != 0) { + sc->wcid2ni[wcid] = ni; + + /* init WCID table entry */ + RAL_WRITE_REGION_1(sc, RT2860_WCID_ENTRY(wcid), + ni->ni_macaddr, IEEE80211_ADDR_LEN); + } + DPRINTF(("new assoc isnew=%d addr=%s WCID=%d\n", + isnew, ether_sprintf(ni->ni_macaddr), wcid)); +} + +static void +rt2860_node_free(struct ieee80211_node *ni) +{ + struct ieee80211com *ic = ni->ni_ic; + struct rt2860_softc *sc = ic->ic_ifp->if_softc; + uint8_t wcid; + + if (ni->ni_associd != 0) { + wcid = IEEE80211_AID(ni->ni_associd); + + /* clear Rx WCID search table entry */ + RAL_SET_REGION_4(sc, RT2860_WCID_ENTRY(wcid), 0, 2); + } + sc->sc_node_free(ni); +} + +#ifdef IEEE80211_HT +static int +rt2860_ampdu_rx_start(struct ieee80211com *ic, struct ieee80211_node *ni, + uint8_t tid) +{ + struct rt2860_softc *sc = ic->ic_softc; + uint8_t wcid = ((struct rt2860_node *)ni)->wcid; + uint32_t tmp; + + /* update BA session mask */ + tmp = RAL_READ(sc, RT2860_WCID_ENTRY(wcid) + 4); + tmp |= (1 << tid) << 16; + RAL_WRITE(sc, RT2860_WCID_ENTRY(wcid) + 4, tmp); + return 0; +} + +static void +rt2860_ampdu_rx_stop(struct ieee80211com *ic, struct ieee80211_node *ni, + uint8_t tid) +{ + struct rt2860_softc *sc = ic->ic_softc; + uint8_t wcid = ((struct rt2860_node *)ni)->wcid; + uint32_t tmp; + + /* update BA session mask */ + tmp = RAL_READ(sc, RT2860_WCID_ENTRY(wcid) + 4); + tmp &= ~((1 << tid) << 16); + RAL_WRITE(sc, RT2860_WCID_ENTRY(wcid) + 4, tmp); +} +#endif + +int +rt2860_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) +{ + struct rt2860_vap *rvp = RT2860_VAP(vap); + struct ieee80211com *ic = vap->iv_ic; + struct rt2860_softc *sc = ic->ic_ifp->if_softc; + uint32_t tmp; + int error; + + if (vap->iv_state == IEEE80211_S_RUN) { + /* turn link LED off */ + rt2860_set_leds(sc, RT2860_LED_RADIO); + } + + if (nstate == IEEE80211_S_INIT && vap->iv_state == IEEE80211_S_RUN) { + /* abort TSF synchronization */ + tmp = RAL_READ(sc, RT2860_BCN_TIME_CFG); + RAL_WRITE(sc, RT2860_BCN_TIME_CFG, + tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN | + RT2860_TBTT_TIMER_EN)); + } + + rt2860_set_gp_timer(sc, 0); + + error = rvp->ral_newstate(vap, nstate, arg); + if (error != 0) + return (error); + + if (nstate == IEEE80211_S_RUN) { + struct ieee80211_node *ni = vap->iv_bss; + + if (ic->ic_opmode != IEEE80211_M_MONITOR) { + rt2860_enable_mrr(sc); + rt2860_set_txpreamble(sc); + rt2860_set_basicrates(sc, &ni->ni_rates); + rt2860_set_bssid(sc, ni->ni_bssid); + } + + if (vap->iv_opmode == IEEE80211_M_HOSTAP || + vap->iv_opmode == IEEE80211_M_IBSS || + vap->iv_opmode == IEEE80211_M_MBSS) { + error = rt2860_setup_beacon(sc, vap); + if (error != 0) + return error; + } + + if (ic->ic_opmode != IEEE80211_M_MONITOR) { + rt2860_enable_tsf_sync(sc); + rt2860_set_gp_timer(sc, 500); + } + + /* turn link LED on */ + rt2860_set_leds(sc, RT2860_LED_RADIO | + (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan) ? + RT2860_LED_LINK_2GHZ : RT2860_LED_LINK_5GHZ)); + } + return error; +} + +/* Read 16-bit from eFUSE ROM (>=RT3071 only.) */ +static uint16_t +rt3090_efuse_read_2(struct rt2860_softc *sc, uint16_t addr) +{ + uint32_t tmp; + uint16_t reg; + int ntries; + + addr *= 2; + /*- + * Read one 16-byte block into registers EFUSE_DATA[0-3]: + * DATA0: F E D C + * DATA1: B A 9 8 + * DATA2: 7 6 5 4 + * DATA3: 3 2 1 0 + */ + tmp = RAL_READ(sc, RT3070_EFUSE_CTRL); + tmp &= ~(RT3070_EFSROM_MODE_MASK | RT3070_EFSROM_AIN_MASK); + tmp |= (addr & ~0xf) << RT3070_EFSROM_AIN_SHIFT | RT3070_EFSROM_KICK; + RAL_WRITE(sc, RT3070_EFUSE_CTRL, tmp); + for (ntries = 0; ntries < 500; ntries++) { + tmp = RAL_READ(sc, RT3070_EFUSE_CTRL); + if (!(tmp & RT3070_EFSROM_KICK)) + break; + DELAY(2); + } + if (ntries == 500) + return 0xffff; + + if ((tmp & RT3070_EFUSE_AOUT_MASK) == RT3070_EFUSE_AOUT_MASK) + return 0xffff; /* address not found */ + + /* determine to which 32-bit register our 16-bit word belongs */ + reg = RT3070_EFUSE_DATA3 - (addr & 0xc); + tmp = RAL_READ(sc, reg); + + return (addr & 2) ? tmp >> 16 : tmp & 0xffff; +} + +/* + * Read 16 bits at address 'addr' from the serial EEPROM (either 93C46, + * 93C66 or 93C86). + */ +static uint16_t +rt2860_eeprom_read_2(struct rt2860_softc *sc, uint16_t addr) +{ + uint32_t tmp; + uint16_t val; + int n; + + /* clock C once before the first command */ + RT2860_EEPROM_CTL(sc, 0); + + RT2860_EEPROM_CTL(sc, RT2860_S); + RT2860_EEPROM_CTL(sc, RT2860_S | RT2860_C); + RT2860_EEPROM_CTL(sc, RT2860_S); + + /* write start bit (1) */ + RT2860_EEPROM_CTL(sc, RT2860_S | RT2860_D); + RT2860_EEPROM_CTL(sc, RT2860_S | RT2860_D | RT2860_C); + + /* write READ opcode (10) */ + RT2860_EEPROM_CTL(sc, RT2860_S | RT2860_D); + RT2860_EEPROM_CTL(sc, RT2860_S | RT2860_D | RT2860_C); + RT2860_EEPROM_CTL(sc, RT2860_S); + RT2860_EEPROM_CTL(sc, RT2860_S | RT2860_C); + + /* write address (A5-A0 or A7-A0) */ + n = ((RAL_READ(sc, RT2860_PCI_EECTRL) & 0x30) == 0) ? 5 : 7; + for (; n >= 0; n--) { + RT2860_EEPROM_CTL(sc, RT2860_S | + (((addr >> n) & 1) << RT2860_SHIFT_D)); + RT2860_EEPROM_CTL(sc, RT2860_S | + (((addr >> n) & 1) << RT2860_SHIFT_D) | RT2860_C); + } + + RT2860_EEPROM_CTL(sc, RT2860_S); + + /* read data Q15-Q0 */ + val = 0; + for (n = 15; n >= 0; n--) { + RT2860_EEPROM_CTL(sc, RT2860_S | RT2860_C); + tmp = RAL_READ(sc, RT2860_PCI_EECTRL); + val |= ((tmp & RT2860_Q) >> RT2860_SHIFT_Q) << n; + RT2860_EEPROM_CTL(sc, RT2860_S); + } + + RT2860_EEPROM_CTL(sc, 0); + + /* clear Chip Select and clock C */ + RT2860_EEPROM_CTL(sc, RT2860_S); + RT2860_EEPROM_CTL(sc, 0); + RT2860_EEPROM_CTL(sc, RT2860_C); + + return val; +} + +static __inline uint16_t +rt2860_srom_read(struct rt2860_softc *sc, uint8_t addr) +{ + /* either eFUSE ROM or EEPROM */ + return sc->sc_srom_read(sc, addr); +} + +static void +rt2860_intr_coherent(struct rt2860_softc *sc) +{ + uint32_t tmp; + + /* DMA finds data coherent event when checking the DDONE bit */ + + DPRINTF(("Tx/Rx Coherent interrupt\n")); + + /* restart DMA engine */ + tmp = RAL_READ(sc, RT2860_WPDMA_GLO_CFG); + tmp &= ~(RT2860_TX_WB_DDONE | RT2860_RX_DMA_EN | RT2860_TX_DMA_EN); + RAL_WRITE(sc, RT2860_WPDMA_GLO_CFG, tmp); + + (void)rt2860_txrx_enable(sc); +} + +static void +rt2860_drain_stats_fifo(struct rt2860_softc *sc) +{ + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211_node *ni; + uint32_t stat; + int retrycnt; + uint8_t wcid, mcs, pid; + + /* drain Tx status FIFO (maxsize = 16) */ + while ((stat = RAL_READ(sc, RT2860_TX_STAT_FIFO)) & RT2860_TXQ_VLD) { + DPRINTFN(4, ("tx stat 0x%08x\n", stat)); + + wcid = (stat >> RT2860_TXQ_WCID_SHIFT) & 0xff; + ni = sc->wcid2ni[wcid]; + + /* if no ACK was requested, no feedback is available */ + if (!(stat & RT2860_TXQ_ACKREQ) || wcid == 0xff || ni == NULL) + continue; + + /* update per-STA AMRR stats */ + if (stat & RT2860_TXQ_OK) { + /* + * Check if there were retries, ie if the Tx success + * rate is different from the requested rate. Note + * that it works only because we do not allow rate + * fallback from OFDM to CCK. + */ + mcs = (stat >> RT2860_TXQ_MCS_SHIFT) & 0x7f; + pid = (stat >> RT2860_TXQ_PID_SHIFT) & 0xf; + if (mcs + 1 != pid) + retrycnt = 1; + else + retrycnt = 0; + ieee80211_ratectl_tx_complete(ni->ni_vap, ni, + IEEE80211_RATECTL_TX_SUCCESS, &retrycnt, NULL); + } else { + ieee80211_ratectl_tx_complete(ni->ni_vap, ni, + IEEE80211_RATECTL_TX_FAILURE, &retrycnt, NULL); + ifp->if_oerrors++; + } + } +} + +static void +rt2860_tx_intr(struct rt2860_softc *sc, int qid) +{ + struct ifnet *ifp = sc->sc_ifp; + struct rt2860_tx_ring *ring = &sc->txq[qid]; + uint32_t hw; + + rt2860_drain_stats_fifo(sc); + + hw = RAL_READ(sc, RT2860_TX_DTX_IDX(qid)); + while (ring->next != hw) { + struct rt2860_tx_data *data = ring->data[ring->next]; + + if (data != NULL) { + bus_dmamap_sync(ring->data_dmat, data->map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(ring->data_dmat, data->map); + if (data->m->m_flags & M_TXCB) { + ieee80211_process_callback(data->ni, data->m, + 0); + } + m_freem(data->m); + ieee80211_free_node(data->ni); + data->m = NULL; + data->ni = NULL; + + SLIST_INSERT_HEAD(&sc->data_pool, data, next); + ring->data[ring->next] = NULL; + + ifp->if_opackets++; + } + ring->queued--; + ring->next = (ring->next + 1) % RT2860_TX_RING_COUNT; + } + + sc->sc_tx_timer = 0; + if (ring->queued < RT2860_TX_RING_COUNT) + sc->qfullmsk &= ~(1 << qid); + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + rt2860_start_locked(ifp); +} + +/* + * Return the Rx chain with the highest RSSI for a given frame. + */ +static __inline uint8_t +rt2860_maxrssi_chain(struct rt2860_softc *sc, const struct rt2860_rxwi *rxwi) +{ + uint8_t rxchain = 0; + + if (sc->nrxchains > 1) { + if (rxwi->rssi[1] > rxwi->rssi[rxchain]) + rxchain = 1; + if (sc->nrxchains > 2) + if (rxwi->rssi[2] > rxwi->rssi[rxchain]) + rxchain = 2; + } + return rxchain; +} + +static void +rt2860_rx_intr(struct rt2860_softc *sc) +{ + struct rt2860_rx_radiotap_header *tap; + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + struct ieee80211_frame *wh; + struct ieee80211_node *ni; + struct mbuf *m, *m1; + bus_addr_t physaddr; + uint32_t hw; + uint16_t phy; + uint8_t ant; + int8_t rssi, nf; + int error; + + hw = RAL_READ(sc, RT2860_FS_DRX_IDX) & 0xfff; + while (sc->rxq.cur != hw) { + struct rt2860_rx_data *data = &sc->rxq.data[sc->rxq.cur]; + struct rt2860_rxd *rxd = &sc->rxq.rxd[sc->rxq.cur]; + struct rt2860_rxwi *rxwi; + + bus_dmamap_sync(sc->rxq.desc_dmat, sc->rxq.desc_map, + BUS_DMASYNC_POSTREAD); + + if (__predict_false(!(rxd->sdl0 & htole16(RT2860_RX_DDONE)))) { + DPRINTF(("RXD DDONE bit not set!\n")); + break; /* should not happen */ + } + + if (__predict_false(rxd->flags & + htole32(RT2860_RX_CRCERR | RT2860_RX_ICVERR))) { + ifp->if_ierrors++; + goto skip; + } + +#ifdef HW_CRYPTO + if (__predict_false(rxd->flags & htole32(RT2860_RX_MICERR))) { + /* report MIC failures to net80211 for TKIP */ + ic->ic_stats.is_rx_locmicfail++; + ieee80211_michael_mic_failure(ic, 0/* XXX */); + ifp->if_ierrors++; + goto skip; + } +#endif + + m1 = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + if (__predict_false(m1 == NULL)) { + ifp->if_ierrors++; + goto skip; + } + + bus_dmamap_sync(sc->rxq.data_dmat, data->map, + BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->rxq.data_dmat, data->map); + + error = bus_dmamap_load(sc->rxq.data_dmat, data->map, + mtod(m1, void *), MCLBYTES, rt2860_dma_map_addr, + &physaddr, 0); + if (__predict_false(error != 0)) { + m_freem(m1); + + /* try to reload the old mbuf */ + error = bus_dmamap_load(sc->rxq.data_dmat, data->map, + mtod(data->m, void *), MCLBYTES, + rt2860_dma_map_addr, &physaddr, 0); + if (__predict_false(error != 0)) { + panic("%s: could not load old rx mbuf", + device_get_name(sc->sc_dev)); + } + /* physical address may have changed */ + rxd->sdp0 = htole32(physaddr); + ifp->if_ierrors++; + goto skip; + } + + /* + * New mbuf successfully loaded, update Rx ring and continue + * processing. + */ + m = data->m; + data->m = m1; + rxd->sdp0 = htole32(physaddr); + + rxwi = mtod(m, struct rt2860_rxwi *); + + /* finalize mbuf */ + m->m_pkthdr.rcvif = ifp; + m->m_data = (caddr_t)(rxwi + 1); + m->m_pkthdr.len = m->m_len = le16toh(rxwi->len) & 0xfff; + + wh = mtod(m, struct ieee80211_frame *); +#ifdef HW_CRYPTO + if (wh->i_fc[1] & IEEE80211_FC1_WEP) { + /* frame is decrypted by hardware */ + wh->i_fc[1] &= ~IEEE80211_FC1_WEP; + } +#endif + + /* HW may insert 2 padding bytes after 802.11 header */ + if (rxd->flags & htole32(RT2860_RX_L2PAD)) { + u_int hdrlen = ieee80211_hdrsize(wh); + ovbcopy(wh, (caddr_t)wh + 2, hdrlen); + m->m_data += 2; + wh = mtod(m, struct ieee80211_frame *); + } + + ant = rt2860_maxrssi_chain(sc, rxwi); + rssi = rt2860_rssi2dbm(sc, rxwi->rssi[ant], ant); + nf = RT2860_NOISE_FLOOR; + + if (ieee80211_radiotap_active(ic)) { + tap = &sc->sc_rxtap; + tap->wr_flags = 0; + tap->wr_antenna = ant; + tap->wr_antsignal = nf + rssi; + tap->wr_antnoise = nf; + /* in case it can't be found below */ + tap->wr_rate = 2; + phy = le16toh(rxwi->phy); + switch (phy & RT2860_PHY_MODE) { + case RT2860_PHY_CCK: + switch ((phy & RT2860_PHY_MCS) & ~RT2860_PHY_SHPRE) { + case 0: tap->wr_rate = 2; break; + case 1: tap->wr_rate = 4; break; + case 2: tap->wr_rate = 11; break; + case 3: tap->wr_rate = 22; break; + } + if (phy & RT2860_PHY_SHPRE) + tap->wr_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; + break; + case RT2860_PHY_OFDM: + switch (phy & RT2860_PHY_MCS) { + case 0: tap->wr_rate = 12; break; + case 1: tap->wr_rate = 18; break; + case 2: tap->wr_rate = 24; break; + case 3: tap->wr_rate = 36; break; + case 4: tap->wr_rate = 48; break; + case 5: tap->wr_rate = 72; break; + case 6: tap->wr_rate = 96; break; + case 7: tap->wr_rate = 108; break; + } + break; + } + } + + RAL_UNLOCK(sc); + wh = mtod(m, struct ieee80211_frame *); + + /* send the frame to the 802.11 layer */ + ni = ieee80211_find_rxnode(ic, + (struct ieee80211_frame_min *)wh); + if (ni != NULL) { + (void)ieee80211_input(ni, m, rssi - nf, nf); + ieee80211_free_node(ni); + } else + (void)ieee80211_input_all(ic, m, rssi - nf, nf); + + RAL_LOCK(sc); + +skip: rxd->sdl0 &= ~htole16(RT2860_RX_DDONE); + + bus_dmamap_sync(sc->rxq.desc_dmat, sc->rxq.desc_map, + BUS_DMASYNC_PREWRITE); + + sc->rxq.cur = (sc->rxq.cur + 1) % RT2860_RX_RING_COUNT; + } + + /* tell HW what we have processed */ + RAL_WRITE(sc, RT2860_RX_CALC_IDX, + (sc->rxq.cur - 1) % RT2860_RX_RING_COUNT); +} + +static void +rt2860_tbtt_intr(struct rt2860_softc *sc) +{ +#if 0 + struct ieee80211com *ic = &sc->sc_ic; + +#ifndef IEEE80211_STA_ONLY + if (ic->ic_opmode == IEEE80211_M_HOSTAP) { + /* one less beacon until next DTIM */ + if (ic->ic_dtim_count == 0) + ic->ic_dtim_count = ic->ic_dtim_period - 1; + else + ic->ic_dtim_count--; + + /* update dynamic parts of beacon */ + rt2860_setup_beacon(sc); + + /* flush buffered multicast frames */ + if (ic->ic_dtim_count == 0) + ieee80211_notify_dtim(ic); + } +#endif + /* check if protection mode has changed */ + if ((sc->sc_ic_flags ^ ic->ic_flags) & IEEE80211_F_USEPROT) { + rt2860_updateprot(ic); + sc->sc_ic_flags = ic->ic_flags; + } +#endif +} + +static void +rt2860_gp_intr(struct rt2860_softc *sc) +{ + struct ieee80211com *ic = sc->sc_ifp->if_l2com; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + + DPRINTFN(2, ("GP timeout state=%d\n", vap->iv_state)); + + if (vap->iv_state == IEEE80211_S_RUN) + rt2860_updatestats(sc); +} + +void +rt2860_intr(void *arg) +{ + struct rt2860_softc *sc = arg; + uint32_t r; + + RAL_LOCK(sc); + + r = RAL_READ(sc, RT2860_INT_STATUS); + if (__predict_false(r == 0xffffffff)) { + RAL_UNLOCK(sc); + return; /* device likely went away */ + } + if (r == 0) { + RAL_UNLOCK(sc); + return; /* not for us */ + } + + /* acknowledge interrupts */ + RAL_WRITE(sc, RT2860_INT_STATUS, r); + + if (r & RT2860_TX_RX_COHERENT) + rt2860_intr_coherent(sc); + + if (r & RT2860_MAC_INT_2) /* TX status */ + rt2860_drain_stats_fifo(sc); + + if (r & RT2860_TX_DONE_INT5) + rt2860_tx_intr(sc, 5); + + if (r & RT2860_RX_DONE_INT) + rt2860_rx_intr(sc); + + if (r & RT2860_TX_DONE_INT4) + rt2860_tx_intr(sc, 4); + + if (r & RT2860_TX_DONE_INT3) + rt2860_tx_intr(sc, 3); + + if (r & RT2860_TX_DONE_INT2) + rt2860_tx_intr(sc, 2); + + if (r & RT2860_TX_DONE_INT1) + rt2860_tx_intr(sc, 1); + + if (r & RT2860_TX_DONE_INT0) + rt2860_tx_intr(sc, 0); + + if (r & RT2860_MAC_INT_0) /* TBTT */ + rt2860_tbtt_intr(sc); + + if (r & RT2860_MAC_INT_3) /* Auto wakeup */ + /* TBD wakeup */; + + if (r & RT2860_MAC_INT_4) /* GP timer */ + rt2860_gp_intr(sc); + + RAL_UNLOCK(sc); +} + +static int +rt2860_tx(struct rt2860_softc *sc, struct mbuf *m, struct ieee80211_node *ni) +{ + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + struct ieee80211vap *vap = ni->ni_vap; + struct rt2860_tx_ring *ring; + struct rt2860_tx_data *data; + struct rt2860_txd *txd; + struct rt2860_txwi *txwi; + struct ieee80211_frame *wh; + const struct ieee80211_txparam *tp; + struct ieee80211_key *k; + struct mbuf *m1; + bus_dma_segment_t segs[RT2860_MAX_SCATTER]; + bus_dma_segment_t *seg; + u_int hdrlen; + uint16_t qos, dur; + uint8_t type, qsel, mcs, pid, tid, qid; + int i, nsegs, ntxds, pad, rate, ridx, error; + + /* the data pool contains at least one element, pick the first */ + data = SLIST_FIRST(&sc->data_pool); + + wh = mtod(m, struct ieee80211_frame *); + + if (wh->i_fc[1] & IEEE80211_FC1_WEP) { + k = ieee80211_crypto_encap(ni, m); + if (k == NULL) { + m_freem(m); + return ENOBUFS; + } + + /* packet header may have moved, reset our local pointer */ + wh = mtod(m, struct ieee80211_frame *); + } + + hdrlen = ieee80211_anyhdrsize(wh); + type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; + + tp = &vap->iv_txparms[ieee80211_chan2mode(ni->ni_chan)]; + if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { + rate = tp->mcastrate; + } else if (m->m_flags & M_EAPOL) { + rate = tp->mgmtrate; + } else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) { + rate = tp->ucastrate; + } else { + (void) ieee80211_ratectl_rate(ni, NULL, 0); + rate = ni->ni_txrate; + } + rate &= IEEE80211_RATE_VAL; + + qid = M_WME_GETAC(m); + if (IEEE80211_QOS_HAS_SEQ(wh)) { + qos = ((const struct ieee80211_qosframe *)wh)->i_qos[0]; + tid = qos & IEEE80211_QOS_TID; + } else { + qos = 0; + tid = 0; + } + ring = &sc->txq[qid]; + ridx = ic->ic_rt->rateCodeToIndex[rate]; + + /* get MCS code from rate index */ + mcs = rt2860_rates[ridx].mcs; + + /* setup TX Wireless Information */ + txwi = data->txwi; + txwi->flags = 0; + /* let HW generate seq numbers for non-QoS frames */ + txwi->xflags = qos ? 0 : RT2860_TX_NSEQ; + if (type == IEEE80211_FC0_TYPE_DATA) + txwi->wcid = IEEE80211_AID(ni->ni_associd); + else + txwi->wcid = 0xff; + txwi->len = htole16(m->m_pkthdr.len); + if (rt2860_rates[ridx].phy == IEEE80211_T_DS) { + txwi->phy = htole16(RT2860_PHY_CCK); + if (ridx != RT2860_RIDX_CCK1 && + (ic->ic_flags & IEEE80211_F_SHPREAMBLE)) + mcs |= RT2860_PHY_SHPRE; + } else + txwi->phy = htole16(RT2860_PHY_OFDM); + txwi->phy |= htole16(mcs); + + /* + * We store the MCS code into the driver-private PacketID field. + * The PacketID is latched into TX_STAT_FIFO when Tx completes so + * that we know at which initial rate the frame was transmitted. + * We add 1 to the MCS code because setting the PacketID field to + * 0 means that we don't want feedback in TX_STAT_FIFO. + */ + pid = (mcs + 1) & 0xf; + txwi->len |= htole16(pid << RT2860_TX_PID_SHIFT); + + /* check if RTS/CTS or CTS-to-self protection is required */ + if (!IEEE80211_IS_MULTICAST(wh->i_addr1) && + (m->m_pkthdr.len + IEEE80211_CRC_LEN > vap->iv_rtsthreshold || + ((ic->ic_flags & IEEE80211_F_USEPROT) && + rt2860_rates[ridx].phy == IEEE80211_T_OFDM))) + txwi->txop = RT2860_TX_TXOP_HT; + else + txwi->txop = RT2860_TX_TXOP_BACKOFF; + + if (!IEEE80211_IS_MULTICAST(wh->i_addr1) && + (!qos || (qos & IEEE80211_QOS_ACKPOLICY) != + IEEE80211_QOS_ACKPOLICY_NOACK)) { + txwi->xflags |= RT2860_TX_ACK; + + if (ic->ic_flags & IEEE80211_F_SHPREAMBLE) + dur = rt2860_rates[ridx].sp_ack_dur; + else + dur = rt2860_rates[ridx].lp_ack_dur; + *(uint16_t *)wh->i_dur = htole16(dur); + } + /* ask MAC to insert timestamp into probe responses */ + if ((wh->i_fc[0] & + (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_MASK)) == + (IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_PROBE_RESP)) + /* NOTE: beacons do not pass through tx_data() */ + txwi->flags |= RT2860_TX_TS; + + if (ieee80211_radiotap_active_vap(vap)) { + struct rt2860_tx_radiotap_header *tap = &sc->sc_txtap; + + tap->wt_flags = 0; + tap->wt_rate = rate; + if (mcs & RT2860_PHY_SHPRE) + tap->wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; + + ieee80211_radiotap_tx(vap, m); + } + + if (hdrlen & 3) + pad = 4 - (hdrlen & 3); + else + pad = 0; + + /* copy and trim 802.11 header */ + memcpy(txwi + 1, wh, hdrlen); + m_adj(m, hdrlen); + + error = bus_dmamap_load_mbuf_sg(ring->data_dmat, data->map, m, segs, + &nsegs, 0); + if (__predict_false(error != 0 && error != EFBIG)) { + device_printf(sc->sc_dev, "can't map mbuf (error %d)\n", + error); + m_freem(m); + return error; + } + if (__predict_true(error == 0)) { + /* determine how many TXDs are required */ + ntxds = 1 + (nsegs / 2); + + if (ring->queued + ntxds >= RT2860_TX_RING_COUNT) { + /* not enough free TXDs, force mbuf defrag */ + bus_dmamap_unload(ring->data_dmat, data->map); + error = EFBIG; + } + } + if (__predict_false(error != 0)) { + m1 = m_defrag(m, M_DONTWAIT); + if (m1 == NULL) { + device_printf(sc->sc_dev, + "could not defragment mbuf\n"); + m_freem(m); + return ENOBUFS; + } + m = m1; + + error = bus_dmamap_load_mbuf_sg(ring->data_dmat, data->map, m, + segs, &nsegs, 0); + if (__predict_false(error != 0)) { + device_printf(sc->sc_dev, "can't map mbuf (error %d)\n", + error); + m_freem(m); + return error; + } + + /* determine how many TXDs are now required */ + ntxds = 1 + (nsegs / 2); + + if (ring->queued + ntxds >= RT2860_TX_RING_COUNT) { + /* this is a hopeless case, drop the mbuf! */ + bus_dmamap_unload(ring->data_dmat, data->map); + m_freem(m); + return ENOBUFS; + } + } + + qsel = (qid < WME_NUM_AC) ? RT2860_TX_QSEL_EDCA : RT2860_TX_QSEL_MGMT; + + /* first segment is TXWI + 802.11 header */ + txd = &ring->txd[ring->cur]; + txd->sdp0 = htole32(data->paddr); + txd->sdl0 = htole16(sizeof (struct rt2860_txwi) + hdrlen + pad); + txd->flags = qsel; + + /* setup payload segments */ + seg = &segs[0]; + for (i = nsegs; i >= 2; i -= 2) { + txd->sdp1 = htole32(seg->ds_addr); + txd->sdl1 = htole16(seg->ds_len); + seg++; + ring->cur = (ring->cur + 1) % RT2860_TX_RING_COUNT; + /* grab a new Tx descriptor */ + txd = &ring->txd[ring->cur]; + txd->sdp0 = htole32(seg->ds_addr); + txd->sdl0 = htole16(seg->ds_len); + txd->flags = qsel; + seg++; + } + /* finalize last segment */ + if (i > 0) { + txd->sdp1 = htole32(seg->ds_addr); + txd->sdl1 = htole16(seg->ds_len | RT2860_TX_LS1); + } else { + txd->sdl0 |= htole16(RT2860_TX_LS0); + txd->sdl1 = 0; + } + + /* remove from the free pool and link it into the SW Tx slot */ + SLIST_REMOVE_HEAD(&sc->data_pool, next); + data->m = m; + data->ni = ni; + ring->data[ring->cur] = data; + + bus_dmamap_sync(sc->txwi_dmat, sc->txwi_map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(ring->data_dmat, data->map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(ring->desc_dmat, ring->desc_map, BUS_DMASYNC_PREWRITE); + + DPRINTFN(4, ("sending frame qid=%d wcid=%d nsegs=%d ridx=%d\n", + qid, txwi->wcid, nsegs, ridx)); + + ring->cur = (ring->cur + 1) % RT2860_TX_RING_COUNT; + ring->queued += ntxds; + if (ring->queued >= RT2860_TX_RING_COUNT) + sc->qfullmsk |= 1 << qid; + + /* kick Tx */ + RAL_WRITE(sc, RT2860_TX_CTX_IDX(qid), ring->cur); + + return 0; +} + +static int +rt2860_raw_xmit(struct ieee80211_node *ni, struct mbuf *m, + const struct ieee80211_bpf_params *params) +{ + struct ieee80211com *ic = ni->ni_ic; + struct ifnet *ifp = ic->ic_ifp; + struct rt2860_softc *sc = ifp->if_softc; + int error; + + RAL_LOCK(sc); + + /* prevent management frames from being sent if we're not ready */ + if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { + RAL_UNLOCK(sc); + m_freem(m); + ieee80211_free_node(ni); + return ENETDOWN; + } + if (params == NULL) { + /* + * Legacy path; interpret frame contents to decide + * precisely how to send the frame. + */ + error = rt2860_tx(sc, m, ni); + } else { + /* + * Caller supplied explicit parameters to use in + * sending the frame. + */ + error = rt2860_tx_raw(sc, m, ni, params); + } + if (error != 0) { + /* NB: m is reclaimed on tx failure */ + ieee80211_free_node(ni); + ifp->if_oerrors++; + } + sc->sc_tx_timer = 5; + RAL_UNLOCK(sc); + return error; +} + +static int +rt2860_tx_raw(struct rt2860_softc *sc, struct mbuf *m, + struct ieee80211_node *ni, const struct ieee80211_bpf_params *params) +{ + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + struct ieee80211vap *vap = ni->ni_vap; + struct rt2860_tx_ring *ring; + struct rt2860_tx_data *data; + struct rt2860_txd *txd; + struct rt2860_txwi *txwi; + struct ieee80211_frame *wh; + struct mbuf *m1; + bus_dma_segment_t segs[RT2860_MAX_SCATTER]; + bus_dma_segment_t *seg; + u_int hdrlen; + uint16_t dur; + uint8_t type, qsel, mcs, pid, tid, qid; + int i, nsegs, ntxds, rate, ridx, error; + + /* the data pool contains at least one element, pick the first */ + data = SLIST_FIRST(&sc->data_pool); + + wh = mtod(m, struct ieee80211_frame *); + hdrlen = ieee80211_hdrsize(wh); + type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; + + /* Choose a TX rate index. */ + rate = params->ibp_rate0; + ridx = ic->ic_rt->rateCodeToIndex[rate]; + if (ridx == (uint8_t)-1) { + /* XXX fall back to mcast/mgmt rate? */ + m_freem(m); + return EINVAL; + } + + qid = params->ibp_pri & 3; + tid = 0; + ring = &sc->txq[qid]; + + /* get MCS code from rate index */ + mcs = rt2860_rates[ridx].mcs; + + /* setup TX Wireless Information */ + txwi = data->txwi; + txwi->flags = 0; + /* let HW generate seq numbers for non-QoS frames */ + txwi->xflags = params->ibp_pri & 3 ? 0 : RT2860_TX_NSEQ; + txwi->wcid = 0xff; + txwi->len = htole16(m->m_pkthdr.len); + if (rt2860_rates[ridx].phy == IEEE80211_T_DS) { + txwi->phy = htole16(RT2860_PHY_CCK); + if (ridx != RT2860_RIDX_CCK1 && + (ic->ic_flags & IEEE80211_F_SHPREAMBLE)) + mcs |= RT2860_PHY_SHPRE; + } else + txwi->phy = htole16(RT2860_PHY_OFDM); + txwi->phy |= htole16(mcs); + + /* + * We store the MCS code into the driver-private PacketID field. + * The PacketID is latched into TX_STAT_FIFO when Tx completes so + * that we know at which initial rate the frame was transmitted. + * We add 1 to the MCS code because setting the PacketID field to + * 0 means that we don't want feedback in TX_STAT_FIFO. + */ + pid = (mcs + 1) & 0xf; + txwi->len |= htole16(pid << RT2860_TX_PID_SHIFT); + + /* check if RTS/CTS or CTS-to-self protection is required */ + if (params->ibp_flags & IEEE80211_BPF_RTS || + params->ibp_flags & IEEE80211_BPF_CTS) + txwi->txop = RT2860_TX_TXOP_HT; + else + txwi->txop = RT2860_TX_TXOP_BACKOFF; + if ((params->ibp_flags & IEEE80211_BPF_NOACK) == 0) { + txwi->xflags |= RT2860_TX_ACK; + + if (ic->ic_flags & IEEE80211_F_SHPREAMBLE) + dur = rt2860_rates[ridx].sp_ack_dur; + else + dur = rt2860_rates[ridx].lp_ack_dur; + *(uint16_t *)wh->i_dur = htole16(dur); + } + /* ask MAC to insert timestamp into probe responses */ + if ((wh->i_fc[0] & + (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_MASK)) == + (IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_PROBE_RESP)) + /* NOTE: beacons do not pass through tx_data() */ + txwi->flags |= RT2860_TX_TS; + + if (ieee80211_radiotap_active_vap(vap)) { + struct rt2860_tx_radiotap_header *tap = &sc->sc_txtap; + + tap->wt_flags = 0; + tap->wt_rate = rate; + if (mcs & RT2860_PHY_SHPRE) + tap->wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; + + ieee80211_radiotap_tx(vap, m); + } + + /* copy and trim 802.11 header */ + memcpy(txwi + 1, wh, hdrlen); + m_adj(m, hdrlen); + + error = bus_dmamap_load_mbuf_sg(ring->data_dmat, data->map, m, segs, + &nsegs, 0); + if (__predict_false(error != 0 && error != EFBIG)) { + device_printf(sc->sc_dev, "can't map mbuf (error %d)\n", + error); + m_freem(m); + return error; + } + if (__predict_true(error == 0)) { + /* determine how many TXDs are required */ + ntxds = 1 + (nsegs / 2); + + if (ring->queued + ntxds >= RT2860_TX_RING_COUNT) { + /* not enough free TXDs, force mbuf defrag */ + bus_dmamap_unload(ring->data_dmat, data->map); + error = EFBIG; + } + } + if (__predict_false(error != 0)) { + m1 = m_defrag(m, M_DONTWAIT); + if (m1 == NULL) { + device_printf(sc->sc_dev, + "could not defragment mbuf\n"); + m_freem(m); + return ENOBUFS; + } + m = m1; + + error = bus_dmamap_load_mbuf_sg(ring->data_dmat, data->map, m, + segs, &nsegs, 0); + if (__predict_false(error != 0)) { + device_printf(sc->sc_dev, "can't map mbuf (error %d)\n", + error); + m_freem(m); + return error; + } + + /* determine how many TXDs are now required */ + ntxds = 1 + (nsegs / 2); + + if (ring->queued + ntxds >= RT2860_TX_RING_COUNT) { + /* this is a hopeless case, drop the mbuf! */ + bus_dmamap_unload(ring->data_dmat, data->map); + m_freem(m); + return ENOBUFS; + } + } + + qsel = (qid < WME_NUM_AC) ? RT2860_TX_QSEL_EDCA : RT2860_TX_QSEL_MGMT; + + /* first segment is TXWI + 802.11 header */ + txd = &ring->txd[ring->cur]; + txd->sdp0 = htole32(data->paddr); + txd->sdl0 = htole16(sizeof (struct rt2860_txwi) + hdrlen); + txd->flags = qsel; + + /* setup payload segments */ + seg = &segs[0]; + for (i = nsegs; i >= 2; i -= 2) { + txd->sdp1 = htole32(seg->ds_addr); + txd->sdl1 = htole16(seg->ds_len); + seg++; + ring->cur = (ring->cur + 1) % RT2860_TX_RING_COUNT; + /* grab a new Tx descriptor */ + txd = &ring->txd[ring->cur]; + txd->sdp0 = htole32(seg->ds_addr); + txd->sdl0 = htole16(seg->ds_len); + txd->flags = qsel; + seg++; + } + /* finalize last segment */ + if (i > 0) { + txd->sdp1 = htole32(seg->ds_addr); + txd->sdl1 = htole16(seg->ds_len | RT2860_TX_LS1); + } else { + txd->sdl0 |= htole16(RT2860_TX_LS0); + txd->sdl1 = 0; + } + + /* remove from the free pool and link it into the SW Tx slot */ + SLIST_REMOVE_HEAD(&sc->data_pool, next); + data->m = m; + data->ni = ni; + ring->data[ring->cur] = data; + + bus_dmamap_sync(sc->txwi_dmat, sc->txwi_map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(ring->data_dmat, data->map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(ring->desc_dmat, ring->desc_map, BUS_DMASYNC_PREWRITE); + + DPRINTFN(4, ("sending frame qid=%d wcid=%d nsegs=%d ridx=%d\n", + qid, txwi->wcid, nsegs, ridx)); + + ring->cur = (ring->cur + 1) % RT2860_TX_RING_COUNT; + ring->queued += ntxds; + if (ring->queued >= RT2860_TX_RING_COUNT) + sc->qfullmsk |= 1 << qid; + + /* kick Tx */ + RAL_WRITE(sc, RT2860_TX_CTX_IDX(qid), ring->cur); + + return 0; +} + +static void +rt2860_start(struct ifnet *ifp) +{ + struct rt2860_softc *sc = ifp->if_softc; + + RAL_LOCK(sc); + rt2860_start_locked(ifp); + RAL_UNLOCK(sc); +} + +static void +rt2860_start_locked(struct ifnet *ifp) +{ + struct rt2860_softc *sc = ifp->if_softc; + struct ieee80211_node *ni; + struct mbuf *m; + + RAL_LOCK_ASSERT(sc); + + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || + (ifp->if_drv_flags & IFF_DRV_OACTIVE)) + return; + + for (;;) { + if (SLIST_EMPTY(&sc->data_pool) || sc->qfullmsk != 0) { + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + break; + } + IFQ_DRV_DEQUEUE(&ifp->if_snd, m); + if (m == NULL) + break; + ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; + if (rt2860_tx(sc, m, ni) != 0) { + ieee80211_free_node(ni); + ifp->if_oerrors++; + continue; + } + sc->sc_tx_timer = 5; + } +} + +static void +rt2860_watchdog(void *arg) +{ + struct rt2860_softc *sc = arg; + struct ifnet *ifp = sc->sc_ifp; + + RAL_LOCK_ASSERT(sc); + + KASSERT(ifp->if_drv_flags & IFF_DRV_RUNNING, ("not running")); + + if (sc->sc_invalid) /* card ejected */ + return; + + if (sc->sc_tx_timer > 0 && --sc->sc_tx_timer == 0) { + if_printf(ifp, "device timeout\n"); + rt2860_stop_locked(sc); + rt2860_init_locked(sc); + ifp->if_oerrors++; + return; + } + callout_reset(&sc->watchdog_ch, hz, rt2860_watchdog, sc); +} + +static int +rt2860_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +{ + struct rt2860_softc *sc = ifp->if_softc; + struct ieee80211com *ic = ifp->if_l2com; + struct ifreq *ifr = (struct ifreq *)data; + int error = 0, startall = 0; + + switch (cmd) { + case SIOCSIFFLAGS: + RAL_LOCK(sc); + if (ifp->if_flags & IFF_UP) { + if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { + rt2860_init_locked(sc); + startall = 1; + } else + rt2860_update_promisc(ifp); + } else { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + rt2860_stop_locked(sc); + } + RAL_UNLOCK(sc); + if (startall) + ieee80211_start_all(ic); + break; + case SIOCGIFMEDIA: + error = ifmedia_ioctl(ifp, ifr, &ic->ic_media, cmd); + break; + case SIOCSIFADDR: + error = ether_ioctl(ifp, cmd, data); + break; + default: + error = EINVAL; + break; + } + return error; +} + +/* + * Reading and writing from/to the BBP is different from RT2560 and RT2661. + * We access the BBP through the 8051 microcontroller unit which means that + * the microcode must be loaded first. + */ +void +rt2860_mcu_bbp_write(struct rt2860_softc *sc, uint8_t reg, uint8_t val) +{ + int ntries; + + for (ntries = 0; ntries < 100; ntries++) { + if (!(RAL_READ(sc, RT2860_H2M_BBPAGENT) & RT2860_BBP_CSR_KICK)) + break; + DELAY(1); + } + if (ntries == 100) { + device_printf(sc->sc_dev, + "could not write to BBP through MCU\n"); + return; + } + + RAL_WRITE(sc, RT2860_H2M_BBPAGENT, RT2860_BBP_RW_PARALLEL | + RT2860_BBP_CSR_KICK | reg << 8 | val); + RAL_BARRIER_WRITE(sc); + + rt2860_mcu_cmd(sc, RT2860_MCU_CMD_BBP, 0, 0); + DELAY(1000); +} + +uint8_t +rt2860_mcu_bbp_read(struct rt2860_softc *sc, uint8_t reg) +{ + uint32_t val; + int ntries; + + for (ntries = 0; ntries < 100; ntries++) { + if (!(RAL_READ(sc, RT2860_H2M_BBPAGENT) & RT2860_BBP_CSR_KICK)) + break; + DELAY(1); + } + if (ntries == 100) { + device_printf(sc->sc_dev, + "could not read from BBP through MCU\n"); + return 0; + } + + RAL_WRITE(sc, RT2860_H2M_BBPAGENT, RT2860_BBP_RW_PARALLEL | + RT2860_BBP_CSR_KICK | RT2860_BBP_CSR_READ | reg << 8); + RAL_BARRIER_WRITE(sc); + + rt2860_mcu_cmd(sc, RT2860_MCU_CMD_BBP, 0, 0); + DELAY(1000); + + for (ntries = 0; ntries < 100; ntries++) { + val = RAL_READ(sc, RT2860_H2M_BBPAGENT); + if (!(val & RT2860_BBP_CSR_KICK)) + return val & 0xff; + DELAY(1); + } + device_printf(sc->sc_dev, "could not read from BBP through MCU\n"); + + return 0; +} + +/* + * Write to one of the 4 programmable 24-bit RF registers. + */ +static void +rt2860_rf_write(struct rt2860_softc *sc, uint8_t reg, uint32_t val) +{ + uint32_t tmp; + int ntries; + + for (ntries = 0; ntries < 100; ntries++) { + if (!(RAL_READ(sc, RT2860_RF_CSR_CFG0) & RT2860_RF_REG_CTRL)) + break; + DELAY(1); + } + if (ntries == 100) { + device_printf(sc->sc_dev, "could not write to RF\n"); + return; + } + + /* RF registers are 24-bit on the RT2860 */ + tmp = RT2860_RF_REG_CTRL | 24 << RT2860_RF_REG_WIDTH_SHIFT | + (val & 0x3fffff) << 2 | (reg & 3); + RAL_WRITE(sc, RT2860_RF_CSR_CFG0, tmp); +} + +static uint8_t +rt3090_rf_read(struct rt2860_softc *sc, uint8_t reg) +{ + uint32_t tmp; + int ntries; + + for (ntries = 0; ntries < 100; ntries++) { + if (!(RAL_READ(sc, RT3070_RF_CSR_CFG) & RT3070_RF_KICK)) + break; + DELAY(1); + } + if (ntries == 100) { + device_printf(sc->sc_dev, "could not read RF register\n"); + return 0xff; + } + tmp = RT3070_RF_KICK | reg << 8; + RAL_WRITE(sc, RT3070_RF_CSR_CFG, tmp); + + for (ntries = 0; ntries < 100; ntries++) { + tmp = RAL_READ(sc, RT3070_RF_CSR_CFG); + if (!(tmp & RT3070_RF_KICK)) + break; + DELAY(1); + } + if (ntries == 100) { + device_printf(sc->sc_dev, "could not read RF register\n"); + return 0xff; + } + return tmp & 0xff; +} + +void +rt3090_rf_write(struct rt2860_softc *sc, uint8_t reg, uint8_t val) +{ + uint32_t tmp; + int ntries; + + for (ntries = 0; ntries < 10; ntries++) { + if (!(RAL_READ(sc, RT3070_RF_CSR_CFG) & RT3070_RF_KICK)) + break; + DELAY(10); + } + if (ntries == 10) { + device_printf(sc->sc_dev, "could not write to RF\n"); + return; + } + + tmp = RT3070_RF_WRITE | RT3070_RF_KICK | reg << 8 | val; + RAL_WRITE(sc, RT3070_RF_CSR_CFG, tmp); +} + +/* + * Send a command to the 8051 microcontroller unit. + */ +int +rt2860_mcu_cmd(struct rt2860_softc *sc, uint8_t cmd, uint16_t arg, int wait) +{ + int slot, ntries; + uint32_t tmp; + uint8_t cid; + + for (ntries = 0; ntries < 100; ntries++) { + if (!(RAL_READ(sc, RT2860_H2M_MAILBOX) & RT2860_H2M_BUSY)) + break; + DELAY(2); + } + if (ntries == 100) + return EIO; + + cid = wait ? cmd : RT2860_TOKEN_NO_INTR; + RAL_WRITE(sc, RT2860_H2M_MAILBOX, RT2860_H2M_BUSY | cid << 16 | arg); + RAL_BARRIER_WRITE(sc); + RAL_WRITE(sc, RT2860_HOST_CMD, cmd); + + if (!wait) + return 0; + /* wait for the command to complete */ + for (ntries = 0; ntries < 200; ntries++) { + tmp = RAL_READ(sc, RT2860_H2M_MAILBOX_CID); + /* find the command slot */ + for (slot = 0; slot < 4; slot++, tmp >>= 8) + if ((tmp & 0xff) == cid) + break; + if (slot < 4) + break; + DELAY(100); + } + if (ntries == 200) { + /* clear command and status */ + RAL_WRITE(sc, RT2860_H2M_MAILBOX_STATUS, 0xffffffff); + RAL_WRITE(sc, RT2860_H2M_MAILBOX_CID, 0xffffffff); + return ETIMEDOUT; + } + /* get command status (1 means success) */ + tmp = RAL_READ(sc, RT2860_H2M_MAILBOX_STATUS); + tmp = (tmp >> (slot * 8)) & 0xff; + DPRINTF(("MCU command=0x%02x slot=%d status=0x%02x\n", + cmd, slot, tmp)); + /* clear command and status */ + RAL_WRITE(sc, RT2860_H2M_MAILBOX_STATUS, 0xffffffff); + RAL_WRITE(sc, RT2860_H2M_MAILBOX_CID, 0xffffffff); + return (tmp == 1) ? 0 : EIO; +} + +static void +rt2860_enable_mrr(struct rt2860_softc *sc) +{ +#define CCK(mcs) (mcs) +#define OFDM(mcs) (1 << 3 | (mcs)) + RAL_WRITE(sc, RT2860_LG_FBK_CFG0, + OFDM(6) << 28 | /* 54->48 */ + OFDM(5) << 24 | /* 48->36 */ + OFDM(4) << 20 | /* 36->24 */ + OFDM(3) << 16 | /* 24->18 */ + OFDM(2) << 12 | /* 18->12 */ + OFDM(1) << 8 | /* 12-> 9 */ + OFDM(0) << 4 | /* 9-> 6 */ + OFDM(0)); /* 6-> 6 */ + + RAL_WRITE(sc, RT2860_LG_FBK_CFG1, + CCK(2) << 12 | /* 11->5.5 */ + CCK(1) << 8 | /* 5.5-> 2 */ + CCK(0) << 4 | /* 2-> 1 */ + CCK(0)); /* 1-> 1 */ +#undef OFDM +#undef CCK +} + +static void +rt2860_set_txpreamble(struct rt2860_softc *sc) +{ + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + uint32_t tmp; + + tmp = RAL_READ(sc, RT2860_AUTO_RSP_CFG); + tmp &= ~RT2860_CCK_SHORT_EN; + if (ic->ic_flags & IEEE80211_F_SHPREAMBLE) + tmp |= RT2860_CCK_SHORT_EN; + RAL_WRITE(sc, RT2860_AUTO_RSP_CFG, tmp); +} + +void +rt2860_set_basicrates(struct rt2860_softc *sc, + const struct ieee80211_rateset *rs) +{ +#define RV(r) ((r) & IEEE80211_RATE_VAL) + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + uint32_t mask = 0; + uint8_t rate; + int i; + + for (i = 0; i < rs->rs_nrates; i++) { + rate = rs->rs_rates[i]; + + if (!(rate & IEEE80211_RATE_BASIC)) + continue; + + mask |= 1 << ic->ic_rt->rateCodeToIndex[RV(rate)]; + } + + RAL_WRITE(sc, RT2860_LEGACY_BASIC_RATE, mask); +#undef RV +} + +static void +rt2860_scan_start(struct ieee80211com *ic) +{ + struct ifnet *ifp = ic->ic_ifp; + struct rt2860_softc *sc = ifp->if_softc; + uint32_t tmp; + + tmp = RAL_READ(sc, RT2860_BCN_TIME_CFG); + RAL_WRITE(sc, RT2860_BCN_TIME_CFG, + tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN | + RT2860_TBTT_TIMER_EN)); + rt2860_set_gp_timer(sc, 0); + rt2860_set_bssid(sc, ifp->if_broadcastaddr); +} + +static void +rt2860_scan_end(struct ieee80211com *ic) +{ + struct ifnet *ifp = ic->ic_ifp; + struct rt2860_softc *sc = ifp->if_softc; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + + rt2860_enable_tsf_sync(sc); + /* XXX keep local copy */ + rt2860_set_bssid(sc, vap->iv_bss->ni_bssid); + rt2860_set_gp_timer(sc, 500); +} + +static void +rt2860_set_channel(struct ieee80211com *ic) +{ + struct ifnet *ifp = ic->ic_ifp; + struct rt2860_softc *sc = ifp->if_softc; + + RAL_LOCK(sc); + rt2860_set_chan(sc, ieee80211_chan2ieee(ic, ic->ic_curchan)); + RAL_UNLOCK(sc); +} + +static void +rt2860_select_chan_group(struct rt2860_softc *sc, int group) +{ + uint32_t tmp; + uint8_t agc; + + rt2860_mcu_bbp_write(sc, 62, 0x37 - sc->lna[group]); + rt2860_mcu_bbp_write(sc, 63, 0x37 - sc->lna[group]); + rt2860_mcu_bbp_write(sc, 64, 0x37 - sc->lna[group]); + rt2860_mcu_bbp_write(sc, 86, 0x00); + + if (group == 0) { + if (sc->ext_2ghz_lna) { + rt2860_mcu_bbp_write(sc, 82, 0x62); + rt2860_mcu_bbp_write(sc, 75, 0x46); + } else { + rt2860_mcu_bbp_write(sc, 82, 0x84); + rt2860_mcu_bbp_write(sc, 75, 0x50); + } + } else { + if (sc->ext_5ghz_lna) { + rt2860_mcu_bbp_write(sc, 82, 0xf2); + rt2860_mcu_bbp_write(sc, 75, 0x46); + } else { + rt2860_mcu_bbp_write(sc, 82, 0xf2); + rt2860_mcu_bbp_write(sc, 75, 0x50); + } + } + + tmp = RAL_READ(sc, RT2860_TX_BAND_CFG); + tmp &= ~(RT2860_5G_BAND_SEL_N | RT2860_5G_BAND_SEL_P); + tmp |= (group == 0) ? RT2860_5G_BAND_SEL_N : RT2860_5G_BAND_SEL_P; + RAL_WRITE(sc, RT2860_TX_BAND_CFG, tmp); + + /* enable appropriate Power Amplifiers and Low Noise Amplifiers */ + tmp = RT2860_RFTR_EN | RT2860_TRSW_EN | RT2860_LNA_PE0_EN; + if (sc->nrxchains > 1) + tmp |= RT2860_LNA_PE1_EN; + if (sc->mac_ver == 0x3593 && sc->nrxchains > 2) + tmp |= RT3593_LNA_PE2_EN; + if (group == 0) { /* 2GHz */ + tmp |= RT2860_PA_PE_G0_EN; + if (sc->ntxchains > 1) + tmp |= RT2860_PA_PE_G1_EN; + if (sc->mac_ver == 0x3593 && sc->ntxchains > 2) + tmp |= RT3593_PA_PE_G2_EN; + } else { /* 5GHz */ + tmp |= RT2860_PA_PE_A0_EN; + if (sc->ntxchains > 1) + tmp |= RT2860_PA_PE_A1_EN; + if (sc->mac_ver == 0x3593 && sc->ntxchains > 2) + tmp |= RT3593_PA_PE_A2_EN; + } + RAL_WRITE(sc, RT2860_TX_PIN_CFG, tmp); + + if (sc->mac_ver == 0x3593) { + tmp = RAL_READ(sc, RT2860_GPIO_CTRL); + if (sc->sc_flags & RT2860_PCIE) { + tmp &= ~0x01010000; + if (group == 0) + tmp |= 0x00010000; + } else { + tmp &= ~0x00008080; + if (group == 0) + tmp |= 0x00000080; + } + tmp = (tmp & ~0x00001000) | 0x00000010; + RAL_WRITE(sc, RT2860_GPIO_CTRL, tmp); + } + + /* set initial AGC value */ + if (group == 0) { /* 2GHz band */ + if (sc->mac_ver >= 0x3071) + agc = 0x1c + sc->lna[0] * 2; + else + agc = 0x2e + sc->lna[0]; + } else { /* 5GHz band */ + agc = 0x32 + (sc->lna[group] * 5) / 3; + } + rt2860_mcu_bbp_write(sc, 66, agc); + + DELAY(1000); +} + +static void +rt2860_set_chan(struct rt2860_softc *sc, u_int chan) +{ + const struct rfprog *rfprog = rt2860_rf2850; + uint32_t r2, r3, r4; + int8_t txpow1, txpow2; + u_int i; + + /* find the settings for this channel (we know it exists) */ + for (i = 0; rfprog[i].chan != chan; i++); + + r2 = rfprog[i].r2; + if (sc->ntxchains == 1) + r2 |= 1 << 12; /* 1T: disable Tx chain 2 */ + if (sc->nrxchains == 1) + r2 |= 1 << 15 | 1 << 4; /* 1R: disable Rx chains 2 & 3 */ + else if (sc->nrxchains == 2) + r2 |= 1 << 4; /* 2R: disable Rx chain 3 */ + + /* use Tx power values from EEPROM */ + txpow1 = sc->txpow1[i]; + txpow2 = sc->txpow2[i]; + if (chan > 14) { + if (txpow1 >= 0) + txpow1 = txpow1 << 1 | 1; + else + txpow1 = (7 + txpow1) << 1; + if (txpow2 >= 0) + txpow2 = txpow2 << 1 | 1; + else + txpow2 = (7 + txpow2) << 1; + } + r3 = rfprog[i].r3 | txpow1 << 7; + r4 = rfprog[i].r4 | sc->freq << 13 | txpow2 << 4; + + rt2860_rf_write(sc, RT2860_RF1, rfprog[i].r1); + rt2860_rf_write(sc, RT2860_RF2, r2); + rt2860_rf_write(sc, RT2860_RF3, r3); + rt2860_rf_write(sc, RT2860_RF4, r4); + + DELAY(200); + + rt2860_rf_write(sc, RT2860_RF1, rfprog[i].r1); + rt2860_rf_write(sc, RT2860_RF2, r2); + rt2860_rf_write(sc, RT2860_RF3, r3 | 1); + rt2860_rf_write(sc, RT2860_RF4, r4); + + DELAY(200); + + rt2860_rf_write(sc, RT2860_RF1, rfprog[i].r1); + rt2860_rf_write(sc, RT2860_RF2, r2); + rt2860_rf_write(sc, RT2860_RF3, r3); + rt2860_rf_write(sc, RT2860_RF4, r4); +} + +static void +rt3090_set_chan(struct rt2860_softc *sc, u_int chan) +{ + int8_t txpow1, txpow2; + uint8_t rf; + int i; + + /* RT3090 is 2GHz only */ + KASSERT(chan >= 1 && chan <= 14, ("chan %d not support", chan)); + + /* find the settings for this channel (we know it exists) */ + for (i = 0; rt2860_rf2850[i].chan != chan; i++); + + /* use Tx power values from EEPROM */ + txpow1 = sc->txpow1[i]; + txpow2 = sc->txpow2[i]; + + rt3090_rf_write(sc, 2, rt3090_freqs[i].n); + rf = rt3090_rf_read(sc, 3); + rf = (rf & ~0x0f) | rt3090_freqs[i].k; + rt3090_rf_write(sc, 3, rf); + rf = rt3090_rf_read(sc, 6); + rf = (rf & ~0x03) | rt3090_freqs[i].r; + rt3090_rf_write(sc, 6, rf); + + /* set Tx0 power */ + rf = rt3090_rf_read(sc, 12); + rf = (rf & ~0x1f) | txpow1; + rt3090_rf_write(sc, 12, rf); + + /* set Tx1 power */ + rf = rt3090_rf_read(sc, 13); + rf = (rf & ~0x1f) | txpow2; + rt3090_rf_write(sc, 13, rf); + + rf = rt3090_rf_read(sc, 1); + rf &= ~0xfc; + if (sc->ntxchains == 1) + rf |= RT3070_TX1_PD | RT3070_TX2_PD; + else if (sc->ntxchains == 2) + rf |= RT3070_TX2_PD; + if (sc->nrxchains == 1) + rf |= RT3070_RX1_PD | RT3070_RX2_PD; + else if (sc->nrxchains == 2) + rf |= RT3070_RX2_PD; + rt3090_rf_write(sc, 1, rf); + + /* set RF offset */ + rf = rt3090_rf_read(sc, 23); + rf = (rf & ~0x7f) | sc->freq; + rt3090_rf_write(sc, 23, rf); + + /* program RF filter */ + rf = rt3090_rf_read(sc, 24); /* Tx */ + rf = (rf & ~0x3f) | sc->rf24_20mhz; + rt3090_rf_write(sc, 24, rf); + rf = rt3090_rf_read(sc, 31); /* Rx */ + rf = (rf & ~0x3f) | sc->rf24_20mhz; + rt3090_rf_write(sc, 31, rf); + + /* enable RF tuning */ + rf = rt3090_rf_read(sc, 7); + rt3090_rf_write(sc, 7, rf | RT3070_TUNE); +} + +static int +rt3090_rf_init(struct rt2860_softc *sc) +{ +#define N(a) (sizeof (a) / sizeof ((a)[0])) + uint32_t tmp; + uint8_t rf, bbp; + int i; + + rf = rt3090_rf_read(sc, 30); + /* toggle RF R30 bit 7 */ + rt3090_rf_write(sc, 30, rf | 0x80); + DELAY(1000); + rt3090_rf_write(sc, 30, rf & ~0x80); + + tmp = RAL_READ(sc, RT3070_LDO_CFG0); + tmp &= ~0x1f000000; + if (sc->patch_dac && sc->mac_rev < 0x0211) + tmp |= 0x0d000000; /* 1.35V */ + else + tmp |= 0x01000000; /* 1.2V */ + RAL_WRITE(sc, RT3070_LDO_CFG0, tmp); + + /* patch LNA_PE_G1 */ + tmp = RAL_READ(sc, RT3070_GPIO_SWITCH); + RAL_WRITE(sc, RT3070_GPIO_SWITCH, tmp & ~0x20); + + /* initialize RF registers to default value */ + for (i = 0; i < N(rt3090_def_rf); i++) { + rt3090_rf_write(sc, rt3090_def_rf[i].reg, + rt3090_def_rf[i].val); + } + + /* select 20MHz bandwidth */ + rt3090_rf_write(sc, 31, 0x14); + + rf = rt3090_rf_read(sc, 6); + rt3090_rf_write(sc, 6, rf | 0x40); + + if (sc->mac_ver != 0x3593) { + /* calibrate filter for 20MHz bandwidth */ + sc->rf24_20mhz = 0x1f; /* default value */ + rt3090_filter_calib(sc, 0x07, 0x16, &sc->rf24_20mhz); + + /* select 40MHz bandwidth */ + bbp = rt2860_mcu_bbp_read(sc, 4); + rt2860_mcu_bbp_write(sc, 4, (bbp & ~0x08) | 0x10); + rf = rt3090_rf_read(sc, 31); + rt3090_rf_write(sc, 31, rf | 0x20); + + /* calibrate filter for 40MHz bandwidth */ + sc->rf24_40mhz = 0x2f; /* default value */ + rt3090_filter_calib(sc, 0x27, 0x19, &sc->rf24_40mhz); + + /* go back to 20MHz bandwidth */ + bbp = rt2860_mcu_bbp_read(sc, 4); + rt2860_mcu_bbp_write(sc, 4, bbp & ~0x18); + } + if (sc->mac_rev < 0x0211) + rt3090_rf_write(sc, 27, 0x03); + + tmp = RAL_READ(sc, RT3070_OPT_14); + RAL_WRITE(sc, RT3070_OPT_14, tmp | 1); + + if (sc->rf_rev == RT3070_RF_3020) + rt3090_set_rx_antenna(sc, 0); + + bbp = rt2860_mcu_bbp_read(sc, 138); + if (sc->mac_ver == 0x3593) { + if (sc->ntxchains == 1) + bbp |= 0x60; /* turn off DAC1 and DAC2 */ + else if (sc->ntxchains == 2) + bbp |= 0x40; /* turn off DAC2 */ + if (sc->nrxchains == 1) + bbp &= ~0x06; /* turn off ADC1 and ADC2 */ + else if (sc->nrxchains == 2) + bbp &= ~0x04; /* turn off ADC2 */ + } else { + if (sc->ntxchains == 1) + bbp |= 0x20; /* turn off DAC1 */ + if (sc->nrxchains == 1) + bbp &= ~0x02; /* turn off ADC1 */ + } + rt2860_mcu_bbp_write(sc, 138, bbp); + + rf = rt3090_rf_read(sc, 1); + rf &= ~(RT3070_RX0_PD | RT3070_TX0_PD); + rf |= RT3070_RF_BLOCK | RT3070_RX1_PD | RT3070_TX1_PD; + rt3090_rf_write(sc, 1, rf); + + rf = rt3090_rf_read(sc, 15); + rt3090_rf_write(sc, 15, rf & ~RT3070_TX_LO2); + + rf = rt3090_rf_read(sc, 17); + rf &= ~RT3070_TX_LO1; + if (sc->mac_rev >= 0x0211 && !sc->ext_2ghz_lna) + rf |= 0x20; /* fix for long range Rx issue */ + if (sc->txmixgain_2ghz >= 2) + rf = (rf & ~0x7) | sc->txmixgain_2ghz; + rt3090_rf_write(sc, 17, rf); + + rf = rt3090_rf_read(sc, 20); + rt3090_rf_write(sc, 20, rf & ~RT3070_RX_LO1); + + rf = rt3090_rf_read(sc, 21); + rt3090_rf_write(sc, 21, rf & ~RT3070_RX_LO2); + + return 0; +#undef N +} + +void +rt3090_rf_wakeup(struct rt2860_softc *sc) +{ + uint32_t tmp; + uint8_t rf; + + if (sc->mac_ver == 0x3593) { + /* enable VCO */ + rf = rt3090_rf_read(sc, 1); + rt3090_rf_write(sc, 1, rf | RT3593_VCO); + + /* initiate VCO calibration */ + rf = rt3090_rf_read(sc, 3); + rt3090_rf_write(sc, 3, rf | RT3593_VCOCAL); + + /* enable VCO bias current control */ + rf = rt3090_rf_read(sc, 6); + rt3090_rf_write(sc, 6, rf | RT3593_VCO_IC); + + /* initiate res calibration */ + rf = rt3090_rf_read(sc, 2); + rt3090_rf_write(sc, 2, rf | RT3593_RESCAL); + + /* set reference current control to 0.33 mA */ + rf = rt3090_rf_read(sc, 22); + rf &= ~RT3593_CP_IC_MASK; + rf |= 1 << RT3593_CP_IC_SHIFT; + rt3090_rf_write(sc, 22, rf); + + /* enable RX CTB */ + rf = rt3090_rf_read(sc, 46); + rt3090_rf_write(sc, 46, rf | RT3593_RX_CTB); + + rf = rt3090_rf_read(sc, 20); + rf &= ~(RT3593_LDO_RF_VC_MASK | RT3593_LDO_PLL_VC_MASK); + rt3090_rf_write(sc, 20, rf); + } else { + /* enable RF block */ + rf = rt3090_rf_read(sc, 1); + rt3090_rf_write(sc, 1, rf | RT3070_RF_BLOCK); + + /* enable VCO bias current control */ + rf = rt3090_rf_read(sc, 7); + rt3090_rf_write(sc, 7, rf | 0x30); + + rf = rt3090_rf_read(sc, 9); + rt3090_rf_write(sc, 9, rf | 0x0e); + + /* enable RX CTB */ + rf = rt3090_rf_read(sc, 21); + rt3090_rf_write(sc, 21, rf | RT3070_RX_CTB); + + /* fix Tx to Rx IQ glitch by raising RF voltage */ + rf = rt3090_rf_read(sc, 27); + rf &= ~0x77; + if (sc->mac_rev < 0x0211) + rf |= 0x03; + rt3090_rf_write(sc, 27, rf); + } + if (sc->patch_dac && sc->mac_rev < 0x0211) { + tmp = RAL_READ(sc, RT3070_LDO_CFG0); + tmp = (tmp & ~0x1f000000) | 0x0d000000; + RAL_WRITE(sc, RT3070_LDO_CFG0, tmp); + } +} + +int +rt3090_filter_calib(struct rt2860_softc *sc, uint8_t init, uint8_t target, + uint8_t *val) +{ + uint8_t rf22, rf24; + uint8_t bbp55_pb, bbp55_sb, delta; + int ntries; + + /* program filter */ + rf24 = rt3090_rf_read(sc, 24); + rf24 = (rf24 & 0xc0) | init; /* initial filter value */ + rt3090_rf_write(sc, 24, rf24); + + /* enable baseband loopback mode */ + rf22 = rt3090_rf_read(sc, 22); + rt3090_rf_write(sc, 22, rf22 | RT3070_BB_LOOPBACK); + + /* set power and frequency of passband test tone */ + rt2860_mcu_bbp_write(sc, 24, 0x00); + for (ntries = 0; ntries < 100; ntries++) { + /* transmit test tone */ + rt2860_mcu_bbp_write(sc, 25, 0x90); + DELAY(1000); + /* read received power */ + bbp55_pb = rt2860_mcu_bbp_read(sc, 55); + if (bbp55_pb != 0) + break; + } + if (ntries == 100) + return ETIMEDOUT; + + /* set power and frequency of stopband test tone */ + rt2860_mcu_bbp_write(sc, 24, 0x06); + for (ntries = 0; ntries < 100; ntries++) { + /* transmit test tone */ + rt2860_mcu_bbp_write(sc, 25, 0x90); + DELAY(1000); + /* read received power */ + bbp55_sb = rt2860_mcu_bbp_read(sc, 55); + + delta = bbp55_pb - bbp55_sb; + if (delta > target) + break; + + /* reprogram filter */ + rf24++; + rt3090_rf_write(sc, 24, rf24); + } + if (ntries < 100) { + if (rf24 != init) + rf24--; /* backtrack */ + *val = rf24; + rt3090_rf_write(sc, 24, rf24); + } + + /* restore initial state */ + rt2860_mcu_bbp_write(sc, 24, 0x00); + + /* disable baseband loopback mode */ + rf22 = rt3090_rf_read(sc, 22); + rt3090_rf_write(sc, 22, rf22 & ~RT3070_BB_LOOPBACK); + + return 0; +} + +static void +rt3090_rf_setup(struct rt2860_softc *sc) +{ + uint8_t bbp; + int i; + + if (sc->mac_rev >= 0x0211) { + /* enable DC filter */ + rt2860_mcu_bbp_write(sc, 103, 0xc0); + + /* improve power consumption */ + bbp = rt2860_mcu_bbp_read(sc, 31); + rt2860_mcu_bbp_write(sc, 31, bbp & ~0x03); + } + + RAL_WRITE(sc, RT2860_TX_SW_CFG1, 0); + if (sc->mac_rev < 0x0211) { + RAL_WRITE(sc, RT2860_TX_SW_CFG2, + sc->patch_dac ? 0x2c : 0x0f); + } else + RAL_WRITE(sc, RT2860_TX_SW_CFG2, 0); + + /* initialize RF registers from ROM */ + for (i = 0; i < 10; i++) { + if (sc->rf[i].reg == 0 || sc->rf[i].reg == 0xff) + continue; + rt3090_rf_write(sc, sc->rf[i].reg, sc->rf[i].val); + } +} + +static void +rt2860_set_leds(struct rt2860_softc *sc, uint16_t which) +{ + rt2860_mcu_cmd(sc, RT2860_MCU_CMD_LEDS, + which | (sc->leds & 0x7f), 0); +} + +/* + * Hardware has a general-purpose programmable timer interrupt that can + * periodically raise MAC_INT_4. + */ +static void +rt2860_set_gp_timer(struct rt2860_softc *sc, int ms) +{ + uint32_t tmp; + + /* disable GP timer before reprogramming it */ + tmp = RAL_READ(sc, RT2860_INT_TIMER_EN); + RAL_WRITE(sc, RT2860_INT_TIMER_EN, tmp & ~RT2860_GP_TIMER_EN); + + if (ms == 0) + return; + + tmp = RAL_READ(sc, RT2860_INT_TIMER_CFG); + ms *= 16; /* Unit: 64us */ + tmp = (tmp & 0xffff) | ms << RT2860_GP_TIMER_SHIFT; + RAL_WRITE(sc, RT2860_INT_TIMER_CFG, tmp); + + /* enable GP timer */ + tmp = RAL_READ(sc, RT2860_INT_TIMER_EN); + RAL_WRITE(sc, RT2860_INT_TIMER_EN, tmp | RT2860_GP_TIMER_EN); +} + +static void +rt2860_set_bssid(struct rt2860_softc *sc, const uint8_t *bssid) +{ + RAL_WRITE(sc, RT2860_MAC_BSSID_DW0, + bssid[0] | bssid[1] << 8 | bssid[2] << 16 | bssid[3] << 24); + RAL_WRITE(sc, RT2860_MAC_BSSID_DW1, + bssid[4] | bssid[5] << 8); +} + +static void +rt2860_set_macaddr(struct rt2860_softc *sc, const uint8_t *addr) +{ + RAL_WRITE(sc, RT2860_MAC_ADDR_DW0, + addr[0] | addr[1] << 8 | addr[2] << 16 | addr[3] << 24); + RAL_WRITE(sc, RT2860_MAC_ADDR_DW1, + addr[4] | addr[5] << 8 | 0xff << 16); +} + +static void +rt2860_updateslot(struct ifnet *ifp) +{ + struct rt2860_softc *sc = ifp->if_softc; + struct ieee80211com *ic = ifp->if_l2com; + uint32_t tmp; + + tmp = RAL_READ(sc, RT2860_BKOFF_SLOT_CFG); + tmp &= ~0xff; + tmp |= (ic->ic_flags & IEEE80211_F_SHSLOT) ? 9 : 20; + RAL_WRITE(sc, RT2860_BKOFF_SLOT_CFG, tmp); +} + +static void +rt2860_updateprot(struct ifnet *ifp) +{ + struct rt2860_softc *sc = ifp->if_softc; + struct ieee80211com *ic = ifp->if_l2com; + uint32_t tmp; + + tmp = RT2860_RTSTH_EN | RT2860_PROT_NAV_SHORT | RT2860_TXOP_ALLOW_ALL; + /* setup protection frame rate (MCS code) */ + tmp |= IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan) ? + rt2860_rates[RT2860_RIDX_OFDM6].mcs : + rt2860_rates[RT2860_RIDX_CCK11].mcs; + + /* CCK frames don't require protection */ + RAL_WRITE(sc, RT2860_CCK_PROT_CFG, tmp); + + if (ic->ic_flags & IEEE80211_F_USEPROT) { + if (ic->ic_protmode == IEEE80211_PROT_RTSCTS) + tmp |= RT2860_PROT_CTRL_RTS_CTS; + else if (ic->ic_protmode == IEEE80211_PROT_CTSONLY) + tmp |= RT2860_PROT_CTRL_CTS; + } + RAL_WRITE(sc, RT2860_OFDM_PROT_CFG, tmp); +} + +static void +rt2860_update_promisc(struct ifnet *ifp) +{ + struct rt2860_softc *sc = ifp->if_softc; + uint32_t tmp; + + tmp = RAL_READ(sc, RT2860_RX_FILTR_CFG); + tmp &= ~RT2860_DROP_NOT_MYBSS; + if (!(ifp->if_flags & IFF_PROMISC)) + tmp |= RT2860_DROP_NOT_MYBSS; + RAL_WRITE(sc, RT2860_RX_FILTR_CFG, tmp); +} + +static int +rt2860_updateedca(struct ieee80211com *ic) +{ + struct rt2860_softc *sc = ic->ic_ifp->if_softc; + const struct wmeParams *wmep; + int aci; + + wmep = ic->ic_wme.wme_chanParams.cap_wmeParams; + + /* update MAC TX configuration registers */ + for (aci = 0; aci < WME_NUM_AC; aci++) { + RAL_WRITE(sc, RT2860_EDCA_AC_CFG(aci), + wmep[aci].wmep_logcwmax << 16 | + wmep[aci].wmep_logcwmin << 12 | + wmep[aci].wmep_aifsn << 8 | + wmep[aci].wmep_txopLimit); + } + + /* update SCH/DMA registers too */ + RAL_WRITE(sc, RT2860_WMM_AIFSN_CFG, + wmep[WME_AC_VO].wmep_aifsn << 12 | + wmep[WME_AC_VI].wmep_aifsn << 8 | + wmep[WME_AC_BK].wmep_aifsn << 4 | + wmep[WME_AC_BE].wmep_aifsn); + RAL_WRITE(sc, RT2860_WMM_CWMIN_CFG, + wmep[WME_AC_VO].wmep_logcwmin << 12 | + wmep[WME_AC_VI].wmep_logcwmin << 8 | + wmep[WME_AC_BK].wmep_logcwmin << 4 | + wmep[WME_AC_BE].wmep_logcwmin); + RAL_WRITE(sc, RT2860_WMM_CWMAX_CFG, + wmep[WME_AC_VO].wmep_logcwmax << 12 | + wmep[WME_AC_VI].wmep_logcwmax << 8 | + wmep[WME_AC_BK].wmep_logcwmax << 4 | + wmep[WME_AC_BE].wmep_logcwmax); + RAL_WRITE(sc, RT2860_WMM_TXOP0_CFG, + wmep[WME_AC_BK].wmep_txopLimit << 16 | + wmep[WME_AC_BE].wmep_txopLimit); + RAL_WRITE(sc, RT2860_WMM_TXOP1_CFG, + wmep[WME_AC_VO].wmep_txopLimit << 16 | + wmep[WME_AC_VI].wmep_txopLimit); + + return 0; +} + +#ifdef HW_CRYPTO +static int +rt2860_set_key(struct ieee80211com *ic, struct ieee80211_node *ni, + struct ieee80211_key *k) +{ + struct rt2860_softc *sc = ic->ic_softc; + bus_size_t base; + uint32_t attr; + uint8_t mode, wcid, iv[8]; + + /* defer setting of WEP keys until interface is brought up */ + if ((ic->ic_if.if_flags & (IFF_UP | IFF_RUNNING)) != + (IFF_UP | IFF_RUNNING)) + return 0; + + /* map net80211 cipher to RT2860 security mode */ + switch (k->k_cipher) { + case IEEE80211_CIPHER_WEP40: + mode = RT2860_MODE_WEP40; + break; + case IEEE80211_CIPHER_WEP104: + mode = RT2860_MODE_WEP104; + break; + case IEEE80211_CIPHER_TKIP: + mode = RT2860_MODE_TKIP; + break; + case IEEE80211_CIPHER_CCMP: + mode = RT2860_MODE_AES_CCMP; + break; + default: + return EINVAL; + } + + if (k->k_flags & IEEE80211_KEY_GROUP) { + wcid = 0; /* NB: update WCID0 for group keys */ + base = RT2860_SKEY(0, k->k_id); + } else { + wcid = ((struct rt2860_node *)ni)->wcid; + base = RT2860_PKEY(wcid); + } + + if (k->k_cipher == IEEE80211_CIPHER_TKIP) { + RAL_WRITE_REGION_1(sc, base, k->k_key, 16); +#ifndef IEEE80211_STA_ONLY + if (ic->ic_opmode == IEEE80211_M_HOSTAP) { + RAL_WRITE_REGION_1(sc, base + 16, &k->k_key[16], 8); + RAL_WRITE_REGION_1(sc, base + 24, &k->k_key[24], 8); + } else +#endif + { + RAL_WRITE_REGION_1(sc, base + 16, &k->k_key[24], 8); + RAL_WRITE_REGION_1(sc, base + 24, &k->k_key[16], 8); + } + } else + RAL_WRITE_REGION_1(sc, base, k->k_key, k->k_len); + + if (!(k->k_flags & IEEE80211_KEY_GROUP) || + (k->k_flags & IEEE80211_KEY_TX)) { + /* set initial packet number in IV+EIV */ + if (k->k_cipher == IEEE80211_CIPHER_WEP40 || + k->k_cipher == IEEE80211_CIPHER_WEP104) { + uint32_t val = arc4random(); + /* skip weak IVs from Fluhrer/Mantin/Shamir */ + if (val >= 0x03ff00 && (val & 0xf8ff00) == 0x00ff00) + val += 0x000100; + iv[0] = val; + iv[1] = val >> 8; + iv[2] = val >> 16; + iv[3] = k->k_id << 6; + iv[4] = iv[5] = iv[6] = iv[7] = 0; + } else { + if (k->k_cipher == IEEE80211_CIPHER_TKIP) { + iv[0] = k->k_tsc >> 8; + iv[1] = (iv[0] | 0x20) & 0x7f; + iv[2] = k->k_tsc; + } else /* CCMP */ { + iv[0] = k->k_tsc; + iv[1] = k->k_tsc >> 8; + iv[2] = 0; + } + iv[3] = k->k_id << 6 | IEEE80211_WEP_EXTIV; + iv[4] = k->k_tsc >> 16; + iv[5] = k->k_tsc >> 24; + iv[6] = k->k_tsc >> 32; + iv[7] = k->k_tsc >> 40; + } + RAL_WRITE_REGION_1(sc, RT2860_IVEIV(wcid), iv, 8); + } + + if (k->k_flags & IEEE80211_KEY_GROUP) { + /* install group key */ + attr = RAL_READ(sc, RT2860_SKEY_MODE_0_7); + attr &= ~(0xf << (k->k_id * 4)); + attr |= mode << (k->k_id * 4); + RAL_WRITE(sc, RT2860_SKEY_MODE_0_7, attr); + } else { + /* install pairwise key */ + attr = RAL_READ(sc, RT2860_WCID_ATTR(wcid)); + attr = (attr & ~0xf) | (mode << 1) | RT2860_RX_PKEY_EN; + RAL_WRITE(sc, RT2860_WCID_ATTR(wcid), attr); + } + return 0; +} + +static void +rt2860_delete_key(struct ieee80211com *ic, struct ieee80211_node *ni, + struct ieee80211_key *k) +{ + struct rt2860_softc *sc = ic->ic_softc; + uint32_t attr; + uint8_t wcid; + + if (k->k_flags & IEEE80211_KEY_GROUP) { + /* remove group key */ + attr = RAL_READ(sc, RT2860_SKEY_MODE_0_7); + attr &= ~(0xf << (k->k_id * 4)); + RAL_WRITE(sc, RT2860_SKEY_MODE_0_7, attr); + + } else { + /* remove pairwise key */ + wcid = ((struct rt2860_node *)ni)->wcid; + attr = RAL_READ(sc, RT2860_WCID_ATTR(wcid)); + attr &= ~0xf; + RAL_WRITE(sc, RT2860_WCID_ATTR(wcid), attr); + } +} +#endif + +static int8_t +rt2860_rssi2dbm(struct rt2860_softc *sc, uint8_t rssi, uint8_t rxchain) +{ + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + struct ieee80211_channel *c = ic->ic_curchan; + int delta; + + if (IEEE80211_IS_CHAN_5GHZ(c)) { + u_int chan = ieee80211_chan2ieee(ic, c); + delta = sc->rssi_5ghz[rxchain]; + + /* determine channel group */ + if (chan <= 64) + delta -= sc->lna[1]; + else if (chan <= 128) + delta -= sc->lna[2]; + else + delta -= sc->lna[3]; + } else + delta = sc->rssi_2ghz[rxchain] - sc->lna[0]; + + return -12 - delta - rssi; +} + +/* + * Add `delta' (signed) to each 4-bit sub-word of a 32-bit word. + * Used to adjust per-rate Tx power registers. + */ +static __inline uint32_t +b4inc(uint32_t b32, int8_t delta) +{ + int8_t i, b4; + + for (i = 0; i < 8; i++) { + b4 = b32 & 0xf; + b4 += delta; + if (b4 < 0) + b4 = 0; + else if (b4 > 0xf) + b4 = 0xf; + b32 = b32 >> 4 | b4 << 28; + } + return b32; +} + +static const char * +rt2860_get_rf(uint8_t rev) +{ + switch (rev) { + case RT2860_RF_2820: return "RT2820"; + case RT2860_RF_2850: return "RT2850"; + case RT2860_RF_2720: return "RT2720"; + case RT2860_RF_2750: return "RT2750"; + case RT3070_RF_3020: return "RT3020"; + case RT3070_RF_2020: return "RT2020"; + case RT3070_RF_3021: return "RT3021"; + case RT3070_RF_3022: return "RT3022"; + case RT3070_RF_3052: return "RT3052"; + case RT3070_RF_3320: return "RT3320"; + case RT3070_RF_3053: return "RT3053"; + default: return "unknown"; + } +} + +static int +rt2860_read_eeprom(struct rt2860_softc *sc, uint8_t macaddr[IEEE80211_ADDR_LEN]) +{ + int8_t delta_2ghz, delta_5ghz; + uint32_t tmp; + uint16_t val; + int ridx, ant, i; + + /* check whether the ROM is eFUSE ROM or EEPROM */ + sc->sc_srom_read = rt2860_eeprom_read_2; + if (sc->mac_ver >= 0x3071) { + tmp = RAL_READ(sc, RT3070_EFUSE_CTRL); + DPRINTF(("EFUSE_CTRL=0x%08x\n", tmp)); + if (tmp & RT3070_SEL_EFUSE) + sc->sc_srom_read = rt3090_efuse_read_2; + } + + /* read EEPROM version */ + val = rt2860_srom_read(sc, RT2860_EEPROM_VERSION); + DPRINTF(("EEPROM rev=%d, FAE=%d\n", val & 0xff, val >> 8)); + + /* read MAC address */ + val = rt2860_srom_read(sc, RT2860_EEPROM_MAC01); + macaddr[0] = val & 0xff; + macaddr[1] = val >> 8; + val = rt2860_srom_read(sc, RT2860_EEPROM_MAC23); + macaddr[2] = val & 0xff; + macaddr[3] = val >> 8; + val = rt2860_srom_read(sc, RT2860_EEPROM_MAC45); + macaddr[4] = val & 0xff; + macaddr[5] = val >> 8; + + /* read country code */ + val = rt2860_srom_read(sc, RT2860_EEPROM_COUNTRY); + DPRINTF(("EEPROM region code=0x%04x\n", val)); + + /* read vendor BBP settings */ + for (i = 0; i < 8; i++) { + val = rt2860_srom_read(sc, RT2860_EEPROM_BBP_BASE + i); + sc->bbp[i].val = val & 0xff; + sc->bbp[i].reg = val >> 8; + DPRINTF(("BBP%d=0x%02x\n", sc->bbp[i].reg, sc->bbp[i].val)); + } + if (sc->mac_ver >= 0x3071) { + /* read vendor RF settings */ + for (i = 0; i < 10; i++) { + val = rt2860_srom_read(sc, RT3071_EEPROM_RF_BASE + i); + sc->rf[i].val = val & 0xff; + sc->rf[i].reg = val >> 8; + DPRINTF(("RF%d=0x%02x\n", sc->rf[i].reg, + sc->rf[i].val)); + } + } + + /* read RF frequency offset from EEPROM */ + val = rt2860_srom_read(sc, RT2860_EEPROM_FREQ_LEDS); + sc->freq = ((val & 0xff) != 0xff) ? val & 0xff : 0; + DPRINTF(("EEPROM freq offset %d\n", sc->freq & 0xff)); + if ((val >> 8) != 0xff) { + /* read LEDs operating mode */ + sc->leds = val >> 8; + sc->led[0] = rt2860_srom_read(sc, RT2860_EEPROM_LED1); + sc->led[1] = rt2860_srom_read(sc, RT2860_EEPROM_LED2); + sc->led[2] = rt2860_srom_read(sc, RT2860_EEPROM_LED3); + } else { + /* broken EEPROM, use default settings */ + sc->leds = 0x01; + sc->led[0] = 0x5555; + sc->led[1] = 0x2221; + sc->led[2] = 0xa9f8; + } + DPRINTF(("EEPROM LED mode=0x%02x, LEDs=0x%04x/0x%04x/0x%04x\n", + sc->leds, sc->led[0], sc->led[1], sc->led[2])); + + /* read RF information */ + val = rt2860_srom_read(sc, RT2860_EEPROM_ANTENNA); + if (val == 0xffff) { + DPRINTF(("invalid EEPROM antenna info, using default\n")); + if (sc->mac_ver == 0x3593) { + /* default to RF3053 3T3R */ + sc->rf_rev = RT3070_RF_3053; + sc->ntxchains = 3; + sc->nrxchains = 3; + } else if (sc->mac_ver >= 0x3071) { + /* default to RF3020 1T1R */ + sc->rf_rev = RT3070_RF_3020; + sc->ntxchains = 1; + sc->nrxchains = 1; + } else { + /* default to RF2820 1T2R */ + sc->rf_rev = RT2860_RF_2820; + sc->ntxchains = 1; + sc->nrxchains = 2; + } + } else { + sc->rf_rev = (val >> 8) & 0xf; + sc->ntxchains = (val >> 4) & 0xf; + sc->nrxchains = val & 0xf; + } + DPRINTF(("EEPROM RF rev=0x%02x chains=%dT%dR\n", + sc->rf_rev, sc->ntxchains, sc->nrxchains)); + + /* check if RF supports automatic Tx access gain control */ + val = rt2860_srom_read(sc, RT2860_EEPROM_CONFIG); + DPRINTF(("EEPROM CFG 0x%04x\n", val)); + /* check if driver should patch the DAC issue */ + if ((val >> 8) != 0xff) + sc->patch_dac = (val >> 15) & 1; + if ((val & 0xff) != 0xff) { + sc->ext_5ghz_lna = (val >> 3) & 1; + sc->ext_2ghz_lna = (val >> 2) & 1; + /* check if RF supports automatic Tx access gain control */ + sc->calib_2ghz = sc->calib_5ghz = 0; /* XXX (val >> 1) & 1 */; + /* check if we have a hardware radio switch */ + sc->rfswitch = val & 1; + } + if (sc->sc_flags & RT2860_ADVANCED_PS) { + /* read PCIe power save level */ + val = rt2860_srom_read(sc, RT2860_EEPROM_PCIE_PSLEVEL); + if ((val & 0xff) != 0xff) { + sc->pslevel = val & 0x3; + val = rt2860_srom_read(sc, RT2860_EEPROM_REV); + if ((val & 0xff80) != 0x9280) + sc->pslevel = MIN(sc->pslevel, 1); + DPRINTF(("EEPROM PCIe PS Level=%d\n", sc->pslevel)); + } + } + + /* read power settings for 2GHz channels */ + for (i = 0; i < 14; i += 2) { + val = rt2860_srom_read(sc, + RT2860_EEPROM_PWR2GHZ_BASE1 + i / 2); + sc->txpow1[i + 0] = (int8_t)(val & 0xff); + sc->txpow1[i + 1] = (int8_t)(val >> 8); + + val = rt2860_srom_read(sc, + RT2860_EEPROM_PWR2GHZ_BASE2 + i / 2); + sc->txpow2[i + 0] = (int8_t)(val & 0xff); + sc->txpow2[i + 1] = (int8_t)(val >> 8); + } + /* fix broken Tx power entries */ + for (i = 0; i < 14; i++) { + if (sc->txpow1[i] < 0 || sc->txpow1[i] > 31) + sc->txpow1[i] = 5; + if (sc->txpow2[i] < 0 || sc->txpow2[i] > 31) + sc->txpow2[i] = 5; + DPRINTF(("chan %d: power1=%d, power2=%d\n", + rt2860_rf2850[i].chan, sc->txpow1[i], sc->txpow2[i])); + } + /* read power settings for 5GHz channels */ + for (i = 0; i < 40; i += 2) { + val = rt2860_srom_read(sc, + RT2860_EEPROM_PWR5GHZ_BASE1 + i / 2); + sc->txpow1[i + 14] = (int8_t)(val & 0xff); + sc->txpow1[i + 15] = (int8_t)(val >> 8); + + val = rt2860_srom_read(sc, + RT2860_EEPROM_PWR5GHZ_BASE2 + i / 2); + sc->txpow2[i + 14] = (int8_t)(val & 0xff); + sc->txpow2[i + 15] = (int8_t)(val >> 8); + } + /* fix broken Tx power entries */ + for (i = 0; i < 40; i++) { + if (sc->txpow1[14 + i] < -7 || sc->txpow1[14 + i] > 15) + sc->txpow1[14 + i] = 5; + if (sc->txpow2[14 + i] < -7 || sc->txpow2[14 + i] > 15) + sc->txpow2[14 + i] = 5; + DPRINTF(("chan %d: power1=%d, power2=%d\n", + rt2860_rf2850[14 + i].chan, sc->txpow1[14 + i], + sc->txpow2[14 + i])); + } + + /* read Tx power compensation for each Tx rate */ + val = rt2860_srom_read(sc, RT2860_EEPROM_DELTAPWR); + delta_2ghz = delta_5ghz = 0; + if ((val & 0xff) != 0xff && (val & 0x80)) { + delta_2ghz = val & 0xf; + if (!(val & 0x40)) /* negative number */ + delta_2ghz = -delta_2ghz; + } + val >>= 8; + if ((val & 0xff) != 0xff && (val & 0x80)) { + delta_5ghz = val & 0xf; + if (!(val & 0x40)) /* negative number */ + delta_5ghz = -delta_5ghz; + } + DPRINTF(("power compensation=%d (2GHz), %d (5GHz)\n", + delta_2ghz, delta_5ghz)); + + for (ridx = 0; ridx < 5; ridx++) { + uint32_t reg; + + val = rt2860_srom_read(sc, RT2860_EEPROM_RPWR + ridx * 2); + reg = val; + val = rt2860_srom_read(sc, RT2860_EEPROM_RPWR + ridx * 2 + 1); + reg |= (uint32_t)val << 16; + + sc->txpow20mhz[ridx] = reg; + sc->txpow40mhz_2ghz[ridx] = b4inc(reg, delta_2ghz); + sc->txpow40mhz_5ghz[ridx] = b4inc(reg, delta_5ghz); + + DPRINTF(("ridx %d: power 20MHz=0x%08x, 40MHz/2GHz=0x%08x, " + "40MHz/5GHz=0x%08x\n", ridx, sc->txpow20mhz[ridx], + sc->txpow40mhz_2ghz[ridx], sc->txpow40mhz_5ghz[ridx])); + } + + /* read factory-calibrated samples for temperature compensation */ + val = rt2860_srom_read(sc, RT2860_EEPROM_TSSI1_2GHZ); + sc->tssi_2ghz[0] = val & 0xff; /* [-4] */ + sc->tssi_2ghz[1] = val >> 8; /* [-3] */ + val = rt2860_srom_read(sc, RT2860_EEPROM_TSSI2_2GHZ); + sc->tssi_2ghz[2] = val & 0xff; /* [-2] */ + sc->tssi_2ghz[3] = val >> 8; /* [-1] */ + val = rt2860_srom_read(sc, RT2860_EEPROM_TSSI3_2GHZ); + sc->tssi_2ghz[4] = val & 0xff; /* [+0] */ + sc->tssi_2ghz[5] = val >> 8; /* [+1] */ + val = rt2860_srom_read(sc, RT2860_EEPROM_TSSI4_2GHZ); + sc->tssi_2ghz[6] = val & 0xff; /* [+2] */ + sc->tssi_2ghz[7] = val >> 8; /* [+3] */ + val = rt2860_srom_read(sc, RT2860_EEPROM_TSSI5_2GHZ); + sc->tssi_2ghz[8] = val & 0xff; /* [+4] */ + sc->step_2ghz = val >> 8; + DPRINTF(("TSSI 2GHz: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x " + "0x%02x 0x%02x step=%d\n", sc->tssi_2ghz[0], sc->tssi_2ghz[1], + sc->tssi_2ghz[2], sc->tssi_2ghz[3], sc->tssi_2ghz[4], + sc->tssi_2ghz[5], sc->tssi_2ghz[6], sc->tssi_2ghz[7], + sc->tssi_2ghz[8], sc->step_2ghz)); + /* check that ref value is correct, otherwise disable calibration */ + if (sc->tssi_2ghz[4] == 0xff) + sc->calib_2ghz = 0; + + val = rt2860_srom_read(sc, RT2860_EEPROM_TSSI1_5GHZ); + sc->tssi_5ghz[0] = val & 0xff; /* [-4] */ + sc->tssi_5ghz[1] = val >> 8; /* [-3] */ + val = rt2860_srom_read(sc, RT2860_EEPROM_TSSI2_5GHZ); + sc->tssi_5ghz[2] = val & 0xff; /* [-2] */ + sc->tssi_5ghz[3] = val >> 8; /* [-1] */ + val = rt2860_srom_read(sc, RT2860_EEPROM_TSSI3_5GHZ); + sc->tssi_5ghz[4] = val & 0xff; /* [+0] */ + sc->tssi_5ghz[5] = val >> 8; /* [+1] */ + val = rt2860_srom_read(sc, RT2860_EEPROM_TSSI4_5GHZ); + sc->tssi_5ghz[6] = val & 0xff; /* [+2] */ + sc->tssi_5ghz[7] = val >> 8; /* [+3] */ + val = rt2860_srom_read(sc, RT2860_EEPROM_TSSI5_5GHZ); + sc->tssi_5ghz[8] = val & 0xff; /* [+4] */ + sc->step_5ghz = val >> 8; + DPRINTF(("TSSI 5GHz: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x " + "0x%02x 0x%02x step=%d\n", sc->tssi_5ghz[0], sc->tssi_5ghz[1], + sc->tssi_5ghz[2], sc->tssi_5ghz[3], sc->tssi_5ghz[4], + sc->tssi_5ghz[5], sc->tssi_5ghz[6], sc->tssi_5ghz[7], + sc->tssi_5ghz[8], sc->step_5ghz)); + /* check that ref value is correct, otherwise disable calibration */ + if (sc->tssi_5ghz[4] == 0xff) + sc->calib_5ghz = 0; + + /* read RSSI offsets and LNA gains from EEPROM */ + val = rt2860_srom_read(sc, RT2860_EEPROM_RSSI1_2GHZ); + sc->rssi_2ghz[0] = val & 0xff; /* Ant A */ + sc->rssi_2ghz[1] = val >> 8; /* Ant B */ + val = rt2860_srom_read(sc, RT2860_EEPROM_RSSI2_2GHZ); + if (sc->mac_ver >= 0x3071) { + /* + * On RT3090 chips (limited to 2 Rx chains), this ROM + * field contains the Tx mixer gain for the 2GHz band. + */ + if ((val & 0xff) != 0xff) + sc->txmixgain_2ghz = val & 0x7; + DPRINTF(("tx mixer gain=%u (2GHz)\n", sc->txmixgain_2ghz)); + } else + sc->rssi_2ghz[2] = val & 0xff; /* Ant C */ + sc->lna[2] = val >> 8; /* channel group 2 */ + + val = rt2860_srom_read(sc, RT2860_EEPROM_RSSI1_5GHZ); + sc->rssi_5ghz[0] = val & 0xff; /* Ant A */ + sc->rssi_5ghz[1] = val >> 8; /* Ant B */ + val = rt2860_srom_read(sc, RT2860_EEPROM_RSSI2_5GHZ); + sc->rssi_5ghz[2] = val & 0xff; /* Ant C */ + sc->lna[3] = val >> 8; /* channel group 3 */ + + val = rt2860_srom_read(sc, RT2860_EEPROM_LNA); + if (sc->mac_ver >= 0x3071) + sc->lna[0] = RT3090_DEF_LNA; + else /* channel group 0 */ + sc->lna[0] = val & 0xff; + sc->lna[1] = val >> 8; /* channel group 1 */ + + /* fix broken 5GHz LNA entries */ + if (sc->lna[2] == 0 || sc->lna[2] == 0xff) { + DPRINTF(("invalid LNA for channel group %d\n", 2)); + sc->lna[2] = sc->lna[1]; + } + if (sc->lna[3] == 0 || sc->lna[3] == 0xff) { + DPRINTF(("invalid LNA for channel group %d\n", 3)); + sc->lna[3] = sc->lna[1]; + } + + /* fix broken RSSI offset entries */ + for (ant = 0; ant < 3; ant++) { + if (sc->rssi_2ghz[ant] < -10 || sc->rssi_2ghz[ant] > 10) { + DPRINTF(("invalid RSSI%d offset: %d (2GHz)\n", + ant + 1, sc->rssi_2ghz[ant])); + sc->rssi_2ghz[ant] = 0; + } + if (sc->rssi_5ghz[ant] < -10 || sc->rssi_5ghz[ant] > 10) { + DPRINTF(("invalid RSSI%d offset: %d (5GHz)\n", + ant + 1, sc->rssi_5ghz[ant])); + sc->rssi_5ghz[ant] = 0; + } + } + + return 0; +} + +int +rt2860_bbp_init(struct rt2860_softc *sc) +{ +#define N(a) (sizeof (a) / sizeof ((a)[0])) + int i, ntries; + + /* wait for BBP to wake up */ + for (ntries = 0; ntries < 20; ntries++) { + uint8_t bbp0 = rt2860_mcu_bbp_read(sc, 0); + if (bbp0 != 0 && bbp0 != 0xff) + break; + } + if (ntries == 20) { + device_printf(sc->sc_dev, + "timeout waiting for BBP to wake up\n"); + return ETIMEDOUT; + } + + /* initialize BBP registers to default values */ + for (i = 0; i < N(rt2860_def_bbp); i++) { + rt2860_mcu_bbp_write(sc, rt2860_def_bbp[i].reg, + rt2860_def_bbp[i].val); + } + + /* fix BBP84 for RT2860E */ + if (sc->mac_ver == 0x2860 && sc->mac_rev != 0x0101) + rt2860_mcu_bbp_write(sc, 84, 0x19); + + if (sc->mac_ver >= 0x3071) { + rt2860_mcu_bbp_write(sc, 79, 0x13); + rt2860_mcu_bbp_write(sc, 80, 0x05); + rt2860_mcu_bbp_write(sc, 81, 0x33); + } else if (sc->mac_ver == 0x2860 && sc->mac_rev == 0x0100) { + rt2860_mcu_bbp_write(sc, 69, 0x16); + rt2860_mcu_bbp_write(sc, 73, 0x12); + } + + return 0; +#undef N +} + +static int +rt2860_txrx_enable(struct rt2860_softc *sc) +{ + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + uint32_t tmp; + int ntries; + + /* enable Tx/Rx DMA engine */ + RAL_WRITE(sc, RT2860_MAC_SYS_CTRL, RT2860_MAC_TX_EN); + RAL_BARRIER_READ_WRITE(sc); + for (ntries = 0; ntries < 200; ntries++) { + tmp = RAL_READ(sc, RT2860_WPDMA_GLO_CFG); + if ((tmp & (RT2860_TX_DMA_BUSY | RT2860_RX_DMA_BUSY)) == 0) + break; + DELAY(1000); + } + if (ntries == 200) { + device_printf(sc->sc_dev, "timeout waiting for DMA engine\n"); + return ETIMEDOUT; + } + + DELAY(50); + + tmp |= RT2860_RX_DMA_EN | RT2860_TX_DMA_EN | + RT2860_WPDMA_BT_SIZE64 << RT2860_WPDMA_BT_SIZE_SHIFT; + RAL_WRITE(sc, RT2860_WPDMA_GLO_CFG, tmp); + + /* set Rx filter */ + tmp = RT2860_DROP_CRC_ERR | RT2860_DROP_PHY_ERR; + if (ic->ic_opmode != IEEE80211_M_MONITOR) { + tmp |= RT2860_DROP_UC_NOME | RT2860_DROP_DUPL | + RT2860_DROP_CTS | RT2860_DROP_BA | RT2860_DROP_ACK | + RT2860_DROP_VER_ERR | RT2860_DROP_CTRL_RSV | + RT2860_DROP_CFACK | RT2860_DROP_CFEND; + if (ic->ic_opmode == IEEE80211_M_STA) + tmp |= RT2860_DROP_RTS | RT2860_DROP_PSPOLL; + } + RAL_WRITE(sc, RT2860_RX_FILTR_CFG, tmp); + + RAL_WRITE(sc, RT2860_MAC_SYS_CTRL, + RT2860_MAC_RX_EN | RT2860_MAC_TX_EN); + + return 0; +} + +static void +rt2860_init(void *arg) +{ + struct rt2860_softc *sc = arg; + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + + RAL_LOCK(sc); + rt2860_init_locked(sc); + RAL_UNLOCK(sc); + + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + ieee80211_start_all(ic); +} + +static void +rt2860_init_locked(struct rt2860_softc *sc) +{ +#define N(a) (sizeof (a) / sizeof ((a)[0])) + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + uint32_t tmp; + uint8_t bbp1, bbp3; + int i, qid, ridx, ntries, error; + + RAL_LOCK_ASSERT(sc); + + if (sc->rfswitch) { + /* hardware has a radio switch on GPIO pin 2 */ + if (!(RAL_READ(sc, RT2860_GPIO_CTRL) & (1 << 2))) { + device_printf(sc->sc_dev, + "radio is disabled by hardware switch\n"); +#ifdef notyet + rt2860_stop_locked(sc); + return; +#endif + } + } + RAL_WRITE(sc, RT2860_PWR_PIN_CFG, RT2860_IO_RA_PE); + + /* disable DMA */ + tmp = RAL_READ(sc, RT2860_WPDMA_GLO_CFG); + tmp &= 0xff0; + RAL_WRITE(sc, RT2860_WPDMA_GLO_CFG, tmp); + + /* PBF hardware reset */ + RAL_WRITE(sc, RT2860_SYS_CTRL, 0xe1f); + RAL_BARRIER_WRITE(sc); + RAL_WRITE(sc, RT2860_SYS_CTRL, 0xe00); + + if ((error = rt2860_load_microcode(sc)) != 0) { + device_printf(sc->sc_dev, "could not load 8051 microcode\n"); + rt2860_stop_locked(sc); + return; + } + + rt2860_set_macaddr(sc, IF_LLADDR(ifp)); + + /* init Tx power for all Tx rates (from EEPROM) */ + for (ridx = 0; ridx < 5; ridx++) { + if (sc->txpow20mhz[ridx] == 0xffffffff) + continue; + RAL_WRITE(sc, RT2860_TX_PWR_CFG(ridx), sc->txpow20mhz[ridx]); + } + + for (ntries = 0; ntries < 100; ntries++) { + tmp = RAL_READ(sc, RT2860_WPDMA_GLO_CFG); + if ((tmp & (RT2860_TX_DMA_BUSY | RT2860_RX_DMA_BUSY)) == 0) + break; + DELAY(1000); + } + if (ntries == 100) { + device_printf(sc->sc_dev, "timeout waiting for DMA engine\n"); + rt2860_stop_locked(sc); + return; + } + tmp &= 0xff0; + RAL_WRITE(sc, RT2860_WPDMA_GLO_CFG, tmp); + + /* reset Rx ring and all 6 Tx rings */ + RAL_WRITE(sc, RT2860_WPDMA_RST_IDX, 0x1003f); + + /* PBF hardware reset */ + RAL_WRITE(sc, RT2860_SYS_CTRL, 0xe1f); + RAL_BARRIER_WRITE(sc); + RAL_WRITE(sc, RT2860_SYS_CTRL, 0xe00); + + RAL_WRITE(sc, RT2860_PWR_PIN_CFG, RT2860_IO_RA_PE | RT2860_IO_RF_PE); + + RAL_WRITE(sc, RT2860_MAC_SYS_CTRL, RT2860_BBP_HRST | RT2860_MAC_SRST); + RAL_BARRIER_WRITE(sc); + RAL_WRITE(sc, RT2860_MAC_SYS_CTRL, 0); + + for (i = 0; i < N(rt2860_def_mac); i++) + RAL_WRITE(sc, rt2860_def_mac[i].reg, rt2860_def_mac[i].val); + if (sc->mac_ver >= 0x3071) { + /* set delay of PA_PE assertion to 1us (unit of 0.25us) */ + RAL_WRITE(sc, RT2860_TX_SW_CFG0, + 4 << RT2860_DLY_PAPE_EN_SHIFT); + } + + if (!(RAL_READ(sc, RT2860_PCI_CFG) & RT2860_PCI_CFG_PCI)) { + sc->sc_flags |= RT2860_PCIE; + /* PCIe has different clock cycle count than PCI */ + tmp = RAL_READ(sc, RT2860_US_CYC_CNT); + tmp = (tmp & ~0xff) | 0x7d; + RAL_WRITE(sc, RT2860_US_CYC_CNT, tmp); + } + + /* wait while MAC is busy */ + for (ntries = 0; ntries < 100; ntries++) { + if (!(RAL_READ(sc, RT2860_MAC_STATUS_REG) & + (RT2860_RX_STATUS_BUSY | RT2860_TX_STATUS_BUSY))) + break; + DELAY(1000); + } + if (ntries == 100) { + device_printf(sc->sc_dev, "timeout waiting for MAC\n"); + rt2860_stop_locked(sc); + return; + } + + /* clear Host to MCU mailbox */ + RAL_WRITE(sc, RT2860_H2M_BBPAGENT, 0); + RAL_WRITE(sc, RT2860_H2M_MAILBOX, 0); + + rt2860_mcu_cmd(sc, RT2860_MCU_CMD_RFRESET, 0, 0); + DELAY(1000); + + if ((error = rt2860_bbp_init(sc)) != 0) { + rt2860_stop_locked(sc); + return; + } + + /* clear RX WCID search table */ + RAL_SET_REGION_4(sc, RT2860_WCID_ENTRY(0), 0, 512); + /* clear pairwise key table */ + RAL_SET_REGION_4(sc, RT2860_PKEY(0), 0, 2048); + /* clear IV/EIV table */ + RAL_SET_REGION_4(sc, RT2860_IVEIV(0), 0, 512); + /* clear WCID attribute table */ + RAL_SET_REGION_4(sc, RT2860_WCID_ATTR(0), 0, 256); + /* clear shared key table */ + RAL_SET_REGION_4(sc, RT2860_SKEY(0, 0), 0, 8 * 32); + /* clear shared key mode */ + RAL_SET_REGION_4(sc, RT2860_SKEY_MODE_0_7, 0, 4); + + /* init Tx rings (4 EDCAs + HCCA + Mgt) */ + for (qid = 0; qid < 6; qid++) { + RAL_WRITE(sc, RT2860_TX_BASE_PTR(qid), sc->txq[qid].paddr); + RAL_WRITE(sc, RT2860_TX_MAX_CNT(qid), RT2860_TX_RING_COUNT); + RAL_WRITE(sc, RT2860_TX_CTX_IDX(qid), 0); + } + + /* init Rx ring */ + RAL_WRITE(sc, RT2860_RX_BASE_PTR, sc->rxq.paddr); + RAL_WRITE(sc, RT2860_RX_MAX_CNT, RT2860_RX_RING_COUNT); + RAL_WRITE(sc, RT2860_RX_CALC_IDX, RT2860_RX_RING_COUNT - 1); + + /* setup maximum buffer sizes */ + RAL_WRITE(sc, RT2860_MAX_LEN_CFG, 1 << 12 | + (MCLBYTES - sizeof (struct rt2860_rxwi) - 2)); + + for (ntries = 0; ntries < 100; ntries++) { + tmp = RAL_READ(sc, RT2860_WPDMA_GLO_CFG); + if ((tmp & (RT2860_TX_DMA_BUSY | RT2860_RX_DMA_BUSY)) == 0) + break; + DELAY(1000); + } + if (ntries == 100) { + device_printf(sc->sc_dev, "timeout waiting for DMA engine\n"); + rt2860_stop_locked(sc); + return; + } + tmp &= 0xff0; + RAL_WRITE(sc, RT2860_WPDMA_GLO_CFG, tmp); + + /* disable interrupts mitigation */ + RAL_WRITE(sc, RT2860_DELAY_INT_CFG, 0); + + /* write vendor-specific BBP values (from EEPROM) */ + for (i = 0; i < 8; i++) { + if (sc->bbp[i].reg == 0 || sc->bbp[i].reg == 0xff) + continue; + rt2860_mcu_bbp_write(sc, sc->bbp[i].reg, sc->bbp[i].val); + } + + /* select Main antenna for 1T1R devices */ + if (sc->rf_rev == RT3070_RF_2020 || + sc->rf_rev == RT3070_RF_3020 || + sc->rf_rev == RT3070_RF_3320) + rt3090_set_rx_antenna(sc, 0); + + /* send LEDs operating mode to microcontroller */ + rt2860_mcu_cmd(sc, RT2860_MCU_CMD_LED1, sc->led[0], 0); + rt2860_mcu_cmd(sc, RT2860_MCU_CMD_LED2, sc->led[1], 0); + rt2860_mcu_cmd(sc, RT2860_MCU_CMD_LED3, sc->led[2], 0); + + if (sc->mac_ver >= 0x3071) + rt3090_rf_init(sc); + + rt2860_mcu_cmd(sc, RT2860_MCU_CMD_SLEEP, 0x02ff, 1); + rt2860_mcu_cmd(sc, RT2860_MCU_CMD_WAKEUP, 0, 1); + + if (sc->mac_ver >= 0x3071) + rt3090_rf_wakeup(sc); + + /* disable non-existing Rx chains */ + bbp3 = rt2860_mcu_bbp_read(sc, 3); + bbp3 &= ~(1 << 3 | 1 << 4); + if (sc->nrxchains == 2) + bbp3 |= 1 << 3; + else if (sc->nrxchains == 3) + bbp3 |= 1 << 4; + rt2860_mcu_bbp_write(sc, 3, bbp3); + + /* disable non-existing Tx chains */ + bbp1 = rt2860_mcu_bbp_read(sc, 1); + if (sc->ntxchains == 1) + bbp1 = (bbp1 & ~(1 << 3 | 1 << 4)); + else if (sc->mac_ver == 0x3593 && sc->ntxchains == 2) + bbp1 = (bbp1 & ~(1 << 4)) | 1 << 3; + else if (sc->mac_ver == 0x3593 && sc->ntxchains == 3) + bbp1 = (bbp1 & ~(1 << 3)) | 1 << 4; + rt2860_mcu_bbp_write(sc, 1, bbp1); + + if (sc->mac_ver >= 0x3071) + rt3090_rf_setup(sc); + + /* select default channel */ + rt2860_switch_chan(sc, ic->ic_curchan); + + /* reset RF from MCU */ + rt2860_mcu_cmd(sc, RT2860_MCU_CMD_RFRESET, 0, 0); + + /* set RTS threshold */ + tmp = RAL_READ(sc, RT2860_TX_RTS_CFG); + tmp &= ~0xffff00; + tmp |= IEEE80211_RTS_DEFAULT << 8; + RAL_WRITE(sc, RT2860_TX_RTS_CFG, tmp); + + /* setup initial protection mode */ + rt2860_updateprot(ifp); + + /* turn radio LED on */ + rt2860_set_leds(sc, RT2860_LED_RADIO); + + /* enable Tx/Rx DMA engine */ + if ((error = rt2860_txrx_enable(sc)) != 0) { + rt2860_stop_locked(sc); + return; + } + + /* clear pending interrupts */ + RAL_WRITE(sc, RT2860_INT_STATUS, 0xffffffff); + /* enable interrupts */ + RAL_WRITE(sc, RT2860_INT_MASK, 0x3fffc); + + if (sc->sc_flags & RT2860_ADVANCED_PS) + rt2860_mcu_cmd(sc, RT2860_MCU_CMD_PSLEVEL, sc->pslevel, 0); + + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + + callout_reset(&sc->watchdog_ch, hz, rt2860_watchdog, sc); +#undef N +} + +static void +rt2860_stop(void *arg) +{ + struct rt2860_softc *sc = arg; + + RAL_LOCK(sc); + rt2860_stop_locked(sc); + RAL_UNLOCK(sc); +} + +static void +rt2860_stop_locked(struct rt2860_softc *sc) +{ + struct ifnet *ifp = sc->sc_ifp; + uint32_t tmp; + int qid; + + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + rt2860_set_leds(sc, 0); /* turn all LEDs off */ + + callout_stop(&sc->watchdog_ch); + sc->sc_tx_timer = 0; + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); + + /* disable interrupts */ + RAL_WRITE(sc, RT2860_INT_MASK, 0); + + /* disable GP timer */ + rt2860_set_gp_timer(sc, 0); + + /* disable Rx */ + tmp = RAL_READ(sc, RT2860_MAC_SYS_CTRL); + tmp &= ~(RT2860_MAC_RX_EN | RT2860_MAC_TX_EN); + RAL_WRITE(sc, RT2860_MAC_SYS_CTRL, tmp); + + /* reset adapter */ + RAL_WRITE(sc, RT2860_MAC_SYS_CTRL, RT2860_BBP_HRST | RT2860_MAC_SRST); + RAL_BARRIER_WRITE(sc); + RAL_WRITE(sc, RT2860_MAC_SYS_CTRL, 0); + + /* reset Tx and Rx rings (and reclaim TXWIs) */ + sc->qfullmsk = 0; + for (qid = 0; qid < 6; qid++) + rt2860_reset_tx_ring(sc, &sc->txq[qid]); + rt2860_reset_rx_ring(sc, &sc->rxq); +} + +int +rt2860_load_microcode(struct rt2860_softc *sc) +{ + const struct firmware *fp; + int ntries, error; + + RAL_LOCK_ASSERT(sc); + + RAL_UNLOCK(sc); + fp = firmware_get("rt2860fw"); + RAL_LOCK(sc); + if (fp == NULL) { + device_printf(sc->sc_dev, + "unable to receive rt2860fw firmware image\n"); + return EINVAL; + } + + /* set "host program ram write selection" bit */ + RAL_WRITE(sc, RT2860_SYS_CTRL, RT2860_HST_PM_SEL); + /* write microcode image */ + RAL_WRITE_REGION_1(sc, RT2860_FW_BASE, fp->data, fp->datasize); + /* kick microcontroller unit */ + RAL_WRITE(sc, RT2860_SYS_CTRL, 0); + RAL_BARRIER_WRITE(sc); + RAL_WRITE(sc, RT2860_SYS_CTRL, RT2860_MCU_RESET); + + RAL_WRITE(sc, RT2860_H2M_BBPAGENT, 0); + RAL_WRITE(sc, RT2860_H2M_MAILBOX, 0); + + /* wait until microcontroller is ready */ + RAL_BARRIER_READ_WRITE(sc); + for (ntries = 0; ntries < 1000; ntries++) { + if (RAL_READ(sc, RT2860_SYS_CTRL) & RT2860_MCU_READY) + break; + DELAY(1000); + } + if (ntries == 1000) { + device_printf(sc->sc_dev, + "timeout waiting for MCU to initialize\n"); + error = ETIMEDOUT; + } else + error = 0; + + firmware_put(fp, FIRMWARE_UNLOAD); + return error; +} + +/* + * This function is called periodically to adjust Tx power based on + * temperature variation. + */ +#ifdef NOT_YET +static void +rt2860_calib(struct rt2860_softc *sc) +{ + struct ieee80211com *ic = &sc->sc_ic; + const uint8_t *tssi; + uint8_t step, bbp49; + int8_t ridx, d; + + /* read current temperature */ + bbp49 = rt2860_mcu_bbp_read(sc, 49); + + if (IEEE80211_IS_CHAN_2GHZ(ic->ic_bss->ni_chan)) { + tssi = &sc->tssi_2ghz[4]; + step = sc->step_2ghz; + } else { + tssi = &sc->tssi_5ghz[4]; + step = sc->step_5ghz; + } + + if (bbp49 < tssi[0]) { /* lower than reference */ + /* use higher Tx power than default */ + for (d = 0; d > -4 && bbp49 <= tssi[d - 1]; d--); + } else if (bbp49 > tssi[0]) { /* greater than reference */ + /* use lower Tx power than default */ + for (d = 0; d < +4 && bbp49 >= tssi[d + 1]; d++); + } else { + /* use default Tx power */ + d = 0; + } + d *= step; + + DPRINTF(("BBP49=0x%02x, adjusting Tx power by %d\n", bbp49, d)); + + /* write adjusted Tx power values for each Tx rate */ + for (ridx = 0; ridx < 5; ridx++) { + if (sc->txpow20mhz[ridx] == 0xffffffff) + continue; + RAL_WRITE(sc, RT2860_TX_PWR_CFG(ridx), + b4inc(sc->txpow20mhz[ridx], d)); + } +} +#endif + +static void +rt3090_set_rx_antenna(struct rt2860_softc *sc, int aux) +{ + uint32_t tmp; + + if (aux) { + tmp = RAL_READ(sc, RT2860_PCI_EECTRL); + RAL_WRITE(sc, RT2860_PCI_EECTRL, tmp & ~RT2860_C); + tmp = RAL_READ(sc, RT2860_GPIO_CTRL); + RAL_WRITE(sc, RT2860_GPIO_CTRL, (tmp & ~0x0808) | 0x08); + } else { + tmp = RAL_READ(sc, RT2860_PCI_EECTRL); + RAL_WRITE(sc, RT2860_PCI_EECTRL, tmp | RT2860_C); + tmp = RAL_READ(sc, RT2860_GPIO_CTRL); + RAL_WRITE(sc, RT2860_GPIO_CTRL, tmp & ~0x0808); + } +} + +static void +rt2860_switch_chan(struct rt2860_softc *sc, struct ieee80211_channel *c) +{ + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + u_int chan, group; + + chan = ieee80211_chan2ieee(ic, c); + if (chan == 0 || chan == IEEE80211_CHAN_ANY) + return; + + if (sc->mac_ver >= 0x3071) + rt3090_set_chan(sc, chan); + else + rt2860_set_chan(sc, chan); + + /* determine channel group */ + if (chan <= 14) + group = 0; + else if (chan <= 64) + group = 1; + else if (chan <= 128) + group = 2; + else + group = 3; + + /* XXX necessary only when group has changed! */ + rt2860_select_chan_group(sc, group); + + DELAY(1000); +} + +static int +rt2860_setup_beacon(struct rt2860_softc *sc, struct ieee80211vap *vap) +{ + struct ieee80211com *ic = vap->iv_ic; + struct ieee80211_beacon_offsets bo; + struct rt2860_txwi txwi; + struct mbuf *m; + int ridx; + + if ((m = ieee80211_beacon_alloc(vap->iv_bss, &bo)) == NULL) + return ENOBUFS; + + memset(&txwi, 0, sizeof txwi); + txwi.wcid = 0xff; + txwi.len = htole16(m->m_pkthdr.len); + /* send beacons at the lowest available rate */ + ridx = IEEE80211_IS_CHAN_5GHZ(ic->ic_bsschan) ? + RT2860_RIDX_OFDM6 : RT2860_RIDX_CCK1; + txwi.phy = htole16(rt2860_rates[ridx].mcs); + if (rt2860_rates[ridx].phy == IEEE80211_T_OFDM) + txwi.phy |= htole16(RT2860_PHY_OFDM); + txwi.txop = RT2860_TX_TXOP_HT; + txwi.flags = RT2860_TX_TS; + txwi.xflags = RT2860_TX_NSEQ; + + RAL_WRITE_REGION_1(sc, RT2860_BCN_BASE(0), + (uint8_t *)&txwi, sizeof txwi); + RAL_WRITE_REGION_1(sc, RT2860_BCN_BASE(0) + sizeof txwi, + mtod(m, uint8_t *), m->m_pkthdr.len); + + m_freem(m); + + return 0; +} + +static void +rt2860_enable_tsf_sync(struct rt2860_softc *sc) +{ + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + uint32_t tmp; + + tmp = RAL_READ(sc, RT2860_BCN_TIME_CFG); + + tmp &= ~0x1fffff; + tmp |= vap->iv_bss->ni_intval * 16; + tmp |= RT2860_TSF_TIMER_EN | RT2860_TBTT_TIMER_EN; + if (vap->iv_opmode == IEEE80211_M_STA) { + /* + * Local TSF is always updated with remote TSF on beacon + * reception. + */ + tmp |= 1 << RT2860_TSF_SYNC_MODE_SHIFT; + } + else if (vap->iv_opmode == IEEE80211_M_IBSS || + vap->iv_opmode == IEEE80211_M_MBSS) { + tmp |= RT2860_BCN_TX_EN; + /* + * Local TSF is updated with remote TSF on beacon reception + * only if the remote TSF is greater than local TSF. + */ + tmp |= 2 << RT2860_TSF_SYNC_MODE_SHIFT; + } else if (vap->iv_opmode == IEEE80211_M_HOSTAP) { + tmp |= RT2860_BCN_TX_EN; + /* SYNC with nobody */ + tmp |= 3 << RT2860_TSF_SYNC_MODE_SHIFT; + } + + RAL_WRITE(sc, RT2860_BCN_TIME_CFG, tmp); +} Property changes on: sys/dev/ral/rt2860.c ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: sys/dev/ral/rt2860reg.h =================================================================== --- sys/dev/ral/rt2860reg.h (revision 0) +++ sys/dev/ral/rt2860reg.h (working copy) @@ -0,0 +1,1255 @@ +/* $OpenBSD: rt2860reg.h,v 1.30 2010/05/10 18:17:10 damien Exp $ */ + +/*- + * Copyright (c) 2007 + * Damien Bergamini + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + + +#define RT2860_NOISE_FLOOR -95 + +/* PCI registers */ +#define RT2860_PCI_CFG 0x0000 +#define RT2860_PCI_EECTRL 0x0004 +#define RT2860_PCI_MCUCTRL 0x0008 +#define RT2860_PCI_SYSCTRL 0x000c +#define RT2860_PCIE_JTAG 0x0010 + +#define RT3090_AUX_CTRL 0x010c + +#define RT3070_OPT_14 0x0114 + +/* SCH/DMA registers */ +#define RT2860_INT_STATUS 0x0200 +#define RT2860_INT_MASK 0x0204 +#define RT2860_WPDMA_GLO_CFG 0x0208 +#define RT2860_WPDMA_RST_IDX 0x020c +#define RT2860_DELAY_INT_CFG 0x0210 +#define RT2860_WMM_AIFSN_CFG 0x0214 +#define RT2860_WMM_CWMIN_CFG 0x0218 +#define RT2860_WMM_CWMAX_CFG 0x021c +#define RT2860_WMM_TXOP0_CFG 0x0220 +#define RT2860_WMM_TXOP1_CFG 0x0224 +#define RT2860_GPIO_CTRL 0x0228 +#define RT2860_MCU_CMD_REG 0x022c +#define RT2860_TX_BASE_PTR(qid) (0x0230 + (qid) * 16) +#define RT2860_TX_MAX_CNT(qid) (0x0234 + (qid) * 16) +#define RT2860_TX_CTX_IDX(qid) (0x0238 + (qid) * 16) +#define RT2860_TX_DTX_IDX(qid) (0x023c + (qid) * 16) +#define RT2860_RX_BASE_PTR 0x0290 +#define RT2860_RX_MAX_CNT 0x0294 +#define RT2860_RX_CALC_IDX 0x0298 +#define RT2860_FS_DRX_IDX 0x029c +#define RT2860_USB_DMA_CFG 0x02a0 /* RT2870 only */ +#define RT2860_US_CYC_CNT 0x02a4 + +/* PBF registers */ +#define RT2860_SYS_CTRL 0x0400 +#define RT2860_HOST_CMD 0x0404 +#define RT2860_PBF_CFG 0x0408 +#define RT2860_MAX_PCNT 0x040c +#define RT2860_BUF_CTRL 0x0410 +#define RT2860_MCU_INT_STA 0x0414 +#define RT2860_MCU_INT_ENA 0x0418 +#define RT2860_TXQ_IO(qid) (0x041c + (qid) * 4) +#define RT2860_RX0Q_IO 0x0424 +#define RT2860_BCN_OFFSET0 0x042c +#define RT2860_BCN_OFFSET1 0x0430 +#define RT2860_TXRXQ_STA 0x0434 +#define RT2860_TXRXQ_PCNT 0x0438 +#define RT2860_PBF_DBG 0x043c +#define RT2860_CAP_CTRL 0x0440 + +/* RT3070 registers */ +#define RT3070_RF_CSR_CFG 0x0500 +#define RT3070_EFUSE_CTRL 0x0580 +#define RT3070_EFUSE_DATA0 0x0590 +#define RT3070_EFUSE_DATA1 0x0594 +#define RT3070_EFUSE_DATA2 0x0598 +#define RT3070_EFUSE_DATA3 0x059c +#define RT3090_OSC_CTRL 0x05a4 +#define RT3070_LDO_CFG0 0x05d4 +#define RT3070_GPIO_SWITCH 0x05dc + +/* MAC registers */ +#define RT2860_ASIC_VER_ID 0x1000 +#define RT2860_MAC_SYS_CTRL 0x1004 +#define RT2860_MAC_ADDR_DW0 0x1008 +#define RT2860_MAC_ADDR_DW1 0x100c +#define RT2860_MAC_BSSID_DW0 0x1010 +#define RT2860_MAC_BSSID_DW1 0x1014 +#define RT2860_MAX_LEN_CFG 0x1018 +#define RT2860_BBP_CSR_CFG 0x101c +#define RT2860_RF_CSR_CFG0 0x1020 +#define RT2860_RF_CSR_CFG1 0x1024 +#define RT2860_RF_CSR_CFG2 0x1028 +#define RT2860_LED_CFG 0x102c + +/* undocumented registers */ +#define RT2860_DEBUG 0x10f4 + +/* MAC Timing control registers */ +#define RT2860_XIFS_TIME_CFG 0x1100 +#define RT2860_BKOFF_SLOT_CFG 0x1104 +#define RT2860_NAV_TIME_CFG 0x1108 +#define RT2860_CH_TIME_CFG 0x110c +#define RT2860_PBF_LIFE_TIMER 0x1110 +#define RT2860_BCN_TIME_CFG 0x1114 +#define RT2860_TBTT_SYNC_CFG 0x1118 +#define RT2860_TSF_TIMER_DW0 0x111c +#define RT2860_TSF_TIMER_DW1 0x1120 +#define RT2860_TBTT_TIMER 0x1124 +#define RT2860_INT_TIMER_CFG 0x1128 +#define RT2860_INT_TIMER_EN 0x112c +#define RT2860_CH_IDLE_TIME 0x1130 + +/* MAC Power Save configuration registers */ +#define RT2860_MAC_STATUS_REG 0x1200 +#define RT2860_PWR_PIN_CFG 0x1204 +#define RT2860_AUTO_WAKEUP_CFG 0x1208 + +/* MAC TX configuration registers */ +#define RT2860_EDCA_AC_CFG(aci) (0x1300 + (aci) * 4) +#define RT2860_EDCA_TID_AC_MAP 0x1310 +#define RT2860_TX_PWR_CFG(ridx) (0x1314 + (ridx) * 4) +#define RT2860_TX_PIN_CFG 0x1328 +#define RT2860_TX_BAND_CFG 0x132c +#define RT2860_TX_SW_CFG0 0x1330 +#define RT2860_TX_SW_CFG1 0x1334 +#define RT2860_TX_SW_CFG2 0x1338 +#define RT2860_TXOP_THRES_CFG 0x133c +#define RT2860_TXOP_CTRL_CFG 0x1340 +#define RT2860_TX_RTS_CFG 0x1344 +#define RT2860_TX_TIMEOUT_CFG 0x1348 +#define RT2860_TX_RTY_CFG 0x134c +#define RT2860_TX_LINK_CFG 0x1350 +#define RT2860_HT_FBK_CFG0 0x1354 +#define RT2860_HT_FBK_CFG1 0x1358 +#define RT2860_LG_FBK_CFG0 0x135c +#define RT2860_LG_FBK_CFG1 0x1360 +#define RT2860_CCK_PROT_CFG 0x1364 +#define RT2860_OFDM_PROT_CFG 0x1368 +#define RT2860_MM20_PROT_CFG 0x136c +#define RT2860_MM40_PROT_CFG 0x1370 +#define RT2860_GF20_PROT_CFG 0x1374 +#define RT2860_GF40_PROT_CFG 0x1378 +#define RT2860_EXP_CTS_TIME 0x137c +#define RT2860_EXP_ACK_TIME 0x1380 + +/* MAC RX configuration registers */ +#define RT2860_RX_FILTR_CFG 0x1400 +#define RT2860_AUTO_RSP_CFG 0x1404 +#define RT2860_LEGACY_BASIC_RATE 0x1408 +#define RT2860_HT_BASIC_RATE 0x140c +#define RT2860_HT_CTRL_CFG 0x1410 +#define RT2860_SIFS_COST_CFG 0x1414 +#define RT2860_RX_PARSER_CFG 0x1418 + +/* MAC Security configuration registers */ +#define RT2860_TX_SEC_CNT0 0x1500 +#define RT2860_RX_SEC_CNT0 0x1504 +#define RT2860_CCMP_FC_MUTE 0x1508 + +/* MAC HCCA/PSMP configuration registers */ +#define RT2860_TXOP_HLDR_ADDR0 0x1600 +#define RT2860_TXOP_HLDR_ADDR1 0x1604 +#define RT2860_TXOP_HLDR_ET 0x1608 +#define RT2860_QOS_CFPOLL_RA_DW0 0x160c +#define RT2860_QOS_CFPOLL_A1_DW1 0x1610 +#define RT2860_QOS_CFPOLL_QC 0x1614 + +/* MAC Statistics Counters */ +#define RT2860_RX_STA_CNT0 0x1700 +#define RT2860_RX_STA_CNT1 0x1704 +#define RT2860_RX_STA_CNT2 0x1708 +#define RT2860_TX_STA_CNT0 0x170c +#define RT2860_TX_STA_CNT1 0x1710 +#define RT2860_TX_STA_CNT2 0x1714 +#define RT2860_TX_STAT_FIFO 0x1718 + +/* RX WCID search table */ +#define RT2860_WCID_ENTRY(wcid) (0x1800 + (wcid) * 8) + +#define RT2860_FW_BASE 0x2000 +#define RT2870_FW_BASE 0x3000 + +/* Pair-wise key table */ +#define RT2860_PKEY(wcid) (0x4000 + (wcid) * 32) + +/* IV/EIV table */ +#define RT2860_IVEIV(wcid) (0x6000 + (wcid) * 8) + +/* WCID attribute table */ +#define RT2860_WCID_ATTR(wcid) (0x6800 + (wcid) * 4) + +/* Shared Key Table */ +#define RT2860_SKEY(vap, kidx) (0x6c00 + (vap) * 128 + (kidx) * 32) + +/* Shared Key Mode */ +#define RT2860_SKEY_MODE_0_7 0x7000 +#define RT2860_SKEY_MODE_8_15 0x7004 +#define RT2860_SKEY_MODE_16_23 0x7008 +#define RT2860_SKEY_MODE_24_31 0x700c + +/* Shared Memory between MCU and host */ +#define RT2860_H2M_MAILBOX 0x7010 +#define RT2860_H2M_MAILBOX_CID 0x7014 +#define RT2860_H2M_MAILBOX_STATUS 0x701c +#define RT2860_H2M_BBPAGENT 0x7028 +#define RT2860_BCN_BASE(vap) (0x7800 + (vap) * 512) + + +/* possible flags for RT2860_PCI_CFG */ +#define RT2860_PCI_CFG_USB (1 << 17) +#define RT2860_PCI_CFG_PCI (1 << 16) + +/* possible flags for register RT2860_PCI_EECTRL */ +#define RT2860_C (1 << 0) +#define RT2860_S (1 << 1) +#define RT2860_D (1 << 2) +#define RT2860_SHIFT_D 2 +#define RT2860_Q (1 << 3) +#define RT2860_SHIFT_Q 3 + +/* possible flags for registers INT_STATUS/INT_MASK */ +#define RT2860_TX_COHERENT (1 << 17) +#define RT2860_RX_COHERENT (1 << 16) +#define RT2860_MAC_INT_4 (1 << 15) +#define RT2860_MAC_INT_3 (1 << 14) +#define RT2860_MAC_INT_2 (1 << 13) +#define RT2860_MAC_INT_1 (1 << 12) +#define RT2860_MAC_INT_0 (1 << 11) +#define RT2860_TX_RX_COHERENT (1 << 10) +#define RT2860_MCU_CMD_INT (1 << 9) +#define RT2860_TX_DONE_INT5 (1 << 8) +#define RT2860_TX_DONE_INT4 (1 << 7) +#define RT2860_TX_DONE_INT3 (1 << 6) +#define RT2860_TX_DONE_INT2 (1 << 5) +#define RT2860_TX_DONE_INT1 (1 << 4) +#define RT2860_TX_DONE_INT0 (1 << 3) +#define RT2860_RX_DONE_INT (1 << 2) +#define RT2860_TX_DLY_INT (1 << 1) +#define RT2860_RX_DLY_INT (1 << 0) + +/* possible flags for register WPDMA_GLO_CFG */ +#define RT2860_HDR_SEG_LEN_SHIFT 8 +#define RT2860_BIG_ENDIAN (1 << 7) +#define RT2860_TX_WB_DDONE (1 << 6) +#define RT2860_WPDMA_BT_SIZE_SHIFT 4 +#define RT2860_WPDMA_BT_SIZE16 0 +#define RT2860_WPDMA_BT_SIZE32 1 +#define RT2860_WPDMA_BT_SIZE64 2 +#define RT2860_WPDMA_BT_SIZE128 3 +#define RT2860_RX_DMA_BUSY (1 << 3) +#define RT2860_RX_DMA_EN (1 << 2) +#define RT2860_TX_DMA_BUSY (1 << 1) +#define RT2860_TX_DMA_EN (1 << 0) + +/* possible flags for register DELAY_INT_CFG */ +#define RT2860_TXDLY_INT_EN (1 << 31) +#define RT2860_TXMAX_PINT_SHIFT 24 +#define RT2860_TXMAX_PTIME_SHIFT 16 +#define RT2860_RXDLY_INT_EN (1 << 15) +#define RT2860_RXMAX_PINT_SHIFT 8 +#define RT2860_RXMAX_PTIME_SHIFT 0 + +/* possible flags for register GPIO_CTRL */ +#define RT2860_GPIO_D_SHIFT 8 +#define RT2860_GPIO_O_SHIFT 0 + +/* possible flags for register USB_DMA_CFG */ +#define RT2860_USB_TX_BUSY (1 << 31) +#define RT2860_USB_RX_BUSY (1 << 30) +#define RT2860_USB_EPOUT_VLD_SHIFT 24 +#define RT2860_USB_TX_EN (1 << 23) +#define RT2860_USB_RX_EN (1 << 22) +#define RT2860_USB_RX_AGG_EN (1 << 21) +#define RT2860_USB_TXOP_HALT (1 << 20) +#define RT2860_USB_TX_CLEAR (1 << 19) +#define RT2860_USB_PHY_WD_EN (1 << 16) +#define RT2860_USB_PHY_MAN_RST (1 << 15) +#define RT2860_USB_RX_AGG_LMT(x) ((x) << 8) /* in unit of 1KB */ +#define RT2860_USB_RX_AGG_TO(x) ((x) & 0xff) /* in unit of 33ns */ + +/* possible flags for register US_CYC_CNT */ +#define RT2860_TEST_EN (1 << 24) +#define RT2860_TEST_SEL_SHIFT 16 +#define RT2860_BT_MODE_EN (1 << 8) +#define RT2860_US_CYC_CNT_SHIFT 0 + +/* possible flags for register SYS_CTRL */ +#define RT2860_HST_PM_SEL (1 << 16) +#define RT2860_CAP_MODE (1 << 14) +#define RT2860_PME_OEN (1 << 13) +#define RT2860_CLKSELECT (1 << 12) +#define RT2860_PBF_CLK_EN (1 << 11) +#define RT2860_MAC_CLK_EN (1 << 10) +#define RT2860_DMA_CLK_EN (1 << 9) +#define RT2860_MCU_READY (1 << 7) +#define RT2860_ASY_RESET (1 << 4) +#define RT2860_PBF_RESET (1 << 3) +#define RT2860_MAC_RESET (1 << 2) +#define RT2860_DMA_RESET (1 << 1) +#define RT2860_MCU_RESET (1 << 0) + +/* possible values for register HOST_CMD */ +#define RT2860_MCU_CMD_SLEEP 0x30 +#define RT2860_MCU_CMD_WAKEUP 0x31 +#define RT2860_MCU_CMD_LEDS 0x50 +#define RT2860_MCU_CMD_LED_RSSI 0x51 +#define RT2860_MCU_CMD_LED1 0x52 +#define RT2860_MCU_CMD_LED2 0x53 +#define RT2860_MCU_CMD_LED3 0x54 +#define RT2860_MCU_CMD_RFRESET 0x72 +#define RT2860_MCU_CMD_ANTSEL 0x73 +#define RT2860_MCU_CMD_BBP 0x80 +#define RT2860_MCU_CMD_PSLEVEL 0x83 + +/* possible flags for register PBF_CFG */ +#define RT2860_TX1Q_NUM_SHIFT 21 +#define RT2860_TX2Q_NUM_SHIFT 16 +#define RT2860_NULL0_MODE (1 << 15) +#define RT2860_NULL1_MODE (1 << 14) +#define RT2860_RX_DROP_MODE (1 << 13) +#define RT2860_TX0Q_MANUAL (1 << 12) +#define RT2860_TX1Q_MANUAL (1 << 11) +#define RT2860_TX2Q_MANUAL (1 << 10) +#define RT2860_RX0Q_MANUAL (1 << 9) +#define RT2860_HCCA_EN (1 << 8) +#define RT2860_TX0Q_EN (1 << 4) +#define RT2860_TX1Q_EN (1 << 3) +#define RT2860_TX2Q_EN (1 << 2) +#define RT2860_RX0Q_EN (1 << 1) + +/* possible flags for register BUF_CTRL */ +#define RT2860_WRITE_TXQ(qid) (1 << (11 - (qid))) +#define RT2860_NULL0_KICK (1 << 7) +#define RT2860_NULL1_KICK (1 << 6) +#define RT2860_BUF_RESET (1 << 5) +#define RT2860_READ_TXQ(qid) (1 << (3 - (qid)) +#define RT2860_READ_RX0Q (1 << 0) + +/* possible flags for registers MCU_INT_STA/MCU_INT_ENA */ +#define RT2860_MCU_MAC_INT_8 (1 << 24) +#define RT2860_MCU_MAC_INT_7 (1 << 23) +#define RT2860_MCU_MAC_INT_6 (1 << 22) +#define RT2860_MCU_MAC_INT_4 (1 << 20) +#define RT2860_MCU_MAC_INT_3 (1 << 19) +#define RT2860_MCU_MAC_INT_2 (1 << 18) +#define RT2860_MCU_MAC_INT_1 (1 << 17) +#define RT2860_MCU_MAC_INT_0 (1 << 16) +#define RT2860_DTX0_INT (1 << 11) +#define RT2860_DTX1_INT (1 << 10) +#define RT2860_DTX2_INT (1 << 9) +#define RT2860_DRX0_INT (1 << 8) +#define RT2860_HCMD_INT (1 << 7) +#define RT2860_N0TX_INT (1 << 6) +#define RT2860_N1TX_INT (1 << 5) +#define RT2860_BCNTX_INT (1 << 4) +#define RT2860_MTX0_INT (1 << 3) +#define RT2860_MTX1_INT (1 << 2) +#define RT2860_MTX2_INT (1 << 1) +#define RT2860_MRX0_INT (1 << 0) + +/* possible flags for register TXRXQ_PCNT */ +#define RT2860_RX0Q_PCNT_MASK 0xff000000 +#define RT2860_TX2Q_PCNT_MASK 0x00ff0000 +#define RT2860_TX1Q_PCNT_MASK 0x0000ff00 +#define RT2860_TX0Q_PCNT_MASK 0x000000ff + +/* possible flags for register CAP_CTRL */ +#define RT2860_CAP_ADC_FEQ (1 << 31) +#define RT2860_CAP_START (1 << 30) +#define RT2860_MAN_TRIG (1 << 29) +#define RT2860_TRIG_OFFSET_SHIFT 16 +#define RT2860_START_ADDR_SHIFT 0 + +/* possible flags for register RF_CSR_CFG */ +#define RT3070_RF_KICK (1 << 17) +#define RT3070_RF_WRITE (1 << 16) + +/* possible flags for register EFUSE_CTRL */ +#define RT3070_SEL_EFUSE (1 << 31) +#define RT3070_EFSROM_KICK (1 << 30) +#define RT3070_EFSROM_AIN_MASK 0x03ff0000 +#define RT3070_EFSROM_AIN_SHIFT 16 +#define RT3070_EFSROM_MODE_MASK 0x000000c0 +#define RT3070_EFUSE_AOUT_MASK 0x0000003f + +/* possible flags for register MAC_SYS_CTRL */ +#define RT2860_RX_TS_EN (1 << 7) +#define RT2860_WLAN_HALT_EN (1 << 6) +#define RT2860_PBF_LOOP_EN (1 << 5) +#define RT2860_CONT_TX_TEST (1 << 4) +#define RT2860_MAC_RX_EN (1 << 3) +#define RT2860_MAC_TX_EN (1 << 2) +#define RT2860_BBP_HRST (1 << 1) +#define RT2860_MAC_SRST (1 << 0) + +/* possible flags for register MAC_BSSID_DW1 */ +#define RT2860_MULTI_BCN_NUM_SHIFT 18 +#define RT2860_MULTI_BSSID_MODE_SHIFT 16 + +/* possible flags for register MAX_LEN_CFG */ +#define RT2860_MIN_MPDU_LEN_SHIFT 16 +#define RT2860_MAX_PSDU_LEN_SHIFT 12 +#define RT2860_MAX_PSDU_LEN8K 0 +#define RT2860_MAX_PSDU_LEN16K 1 +#define RT2860_MAX_PSDU_LEN32K 2 +#define RT2860_MAX_PSDU_LEN64K 3 +#define RT2860_MAX_MPDU_LEN_SHIFT 0 + +/* possible flags for registers BBP_CSR_CFG/H2M_BBPAGENT */ +#define RT2860_BBP_RW_PARALLEL (1 << 19) +#define RT2860_BBP_PAR_DUR_112_5 (1 << 18) +#define RT2860_BBP_CSR_KICK (1 << 17) +#define RT2860_BBP_CSR_READ (1 << 16) +#define RT2860_BBP_ADDR_SHIFT 8 +#define RT2860_BBP_DATA_SHIFT 0 + +/* possible flags for register RF_CSR_CFG0 */ +#define RT2860_RF_REG_CTRL (1 << 31) +#define RT2860_RF_LE_SEL1 (1 << 30) +#define RT2860_RF_LE_STBY (1 << 29) +#define RT2860_RF_REG_WIDTH_SHIFT 24 +#define RT2860_RF_REG_0_SHIFT 0 + +/* possible flags for register RF_CSR_CFG1 */ +#define RT2860_RF_DUR_5 (1 << 24) +#define RT2860_RF_REG_1_SHIFT 0 + +/* possible flags for register LED_CFG */ +#define RT2860_LED_POL (1 << 30) +#define RT2860_Y_LED_MODE_SHIFT 28 +#define RT2860_G_LED_MODE_SHIFT 26 +#define RT2860_R_LED_MODE_SHIFT 24 +#define RT2860_LED_MODE_OFF 0 +#define RT2860_LED_MODE_BLINK_TX 1 +#define RT2860_LED_MODE_SLOW_BLINK 2 +#define RT2860_LED_MODE_ON 3 +#define RT2860_SLOW_BLK_TIME_SHIFT 16 +#define RT2860_LED_OFF_TIME_SHIFT 8 +#define RT2860_LED_ON_TIME_SHIFT 0 + +/* possible flags for register XIFS_TIME_CFG */ +#define RT2860_BB_RXEND_EN (1 << 29) +#define RT2860_EIFS_TIME_SHIFT 20 +#define RT2860_OFDM_XIFS_TIME_SHIFT 16 +#define RT2860_OFDM_SIFS_TIME_SHIFT 8 +#define RT2860_CCK_SIFS_TIME_SHIFT 0 + +/* possible flags for register BKOFF_SLOT_CFG */ +#define RT2860_CC_DELAY_TIME_SHIFT 8 +#define RT2860_SLOT_TIME 0 + +/* possible flags for register NAV_TIME_CFG */ +#define RT2860_NAV_UPD (1 << 31) +#define RT2860_NAV_UPD_VAL_SHIFT 16 +#define RT2860_NAV_CLR_EN (1 << 15) +#define RT2860_NAV_TIMER_SHIFT 0 + +/* possible flags for register CH_TIME_CFG */ +#define RT2860_EIFS_AS_CH_BUSY (1 << 4) +#define RT2860_NAV_AS_CH_BUSY (1 << 3) +#define RT2860_RX_AS_CH_BUSY (1 << 2) +#define RT2860_TX_AS_CH_BUSY (1 << 1) +#define RT2860_CH_STA_TIMER_EN (1 << 0) + +/* possible values for register BCN_TIME_CFG */ +#define RT2860_TSF_INS_COMP_SHIFT 24 +#define RT2860_BCN_TX_EN (1 << 20) +#define RT2860_TBTT_TIMER_EN (1 << 19) +#define RT2860_TSF_SYNC_MODE_SHIFT 17 +#define RT2860_TSF_SYNC_MODE_DIS 0 +#define RT2860_TSF_SYNC_MODE_STA 1 +#define RT2860_TSF_SYNC_MODE_IBSS 2 +#define RT2860_TSF_SYNC_MODE_HOSTAP 3 +#define RT2860_TSF_TIMER_EN (1 << 16) +#define RT2860_BCN_INTVAL_SHIFT 0 + +/* possible flags for register TBTT_SYNC_CFG */ +#define RT2860_BCN_CWMIN_SHIFT 20 +#define RT2860_BCN_AIFSN_SHIFT 16 +#define RT2860_BCN_EXP_WIN_SHIFT 8 +#define RT2860_TBTT_ADJUST_SHIFT 0 + +/* possible flags for register INT_TIMER_CFG */ +#define RT2860_GP_TIMER_SHIFT 16 +#define RT2860_PRE_TBTT_TIMER_SHIFT 0 + +/* possible flags for register INT_TIMER_EN */ +#define RT2860_GP_TIMER_EN (1 << 1) +#define RT2860_PRE_TBTT_INT_EN (1 << 0) + +/* possible flags for register MAC_STATUS_REG */ +#define RT2860_RX_STATUS_BUSY (1 << 1) +#define RT2860_TX_STATUS_BUSY (1 << 0) + +/* possible flags for register PWR_PIN_CFG */ +#define RT2860_IO_ADDA_PD (1 << 3) +#define RT2860_IO_PLL_PD (1 << 2) +#define RT2860_IO_RA_PE (1 << 1) +#define RT2860_IO_RF_PE (1 << 0) + +/* possible flags for register AUTO_WAKEUP_CFG */ +#define RT2860_AUTO_WAKEUP_EN (1 << 15) +#define RT2860_SLEEP_TBTT_NUM_SHIFT 8 +#define RT2860_WAKEUP_LEAD_TIME_SHIFT 0 + +/* possible flags for register TX_PIN_CFG */ +#define RT3593_LNA_PE_G2_POL (1 << 31) +#define RT3593_LNA_PE_A2_POL (1 << 30) +#define RT3593_LNA_PE_G2_EN (1 << 29) +#define RT3593_LNA_PE_A2_EN (1 << 28) +#define RT3593_LNA_PE2_EN (RT3593_LNA_PE_A2_EN | RT3593_LNA_PE_G2_EN) +#define RT3593_PA_PE_G2_POL (1 << 27) +#define RT3593_PA_PE_A2_POL (1 << 26) +#define RT3593_PA_PE_G2_EN (1 << 25) +#define RT3593_PA_PE_A2_EN (1 << 24) +#define RT2860_TRSW_POL (1 << 19) +#define RT2860_TRSW_EN (1 << 18) +#define RT2860_RFTR_POL (1 << 17) +#define RT2860_RFTR_EN (1 << 16) +#define RT2860_LNA_PE_G1_POL (1 << 15) +#define RT2860_LNA_PE_A1_POL (1 << 14) +#define RT2860_LNA_PE_G0_POL (1 << 13) +#define RT2860_LNA_PE_A0_POL (1 << 12) +#define RT2860_LNA_PE_G1_EN (1 << 11) +#define RT2860_LNA_PE_A1_EN (1 << 10) +#define RT2860_LNA_PE1_EN (RT2860_LNA_PE_A1_EN | RT2860_LNA_PE_G1_EN) +#define RT2860_LNA_PE_G0_EN (1 << 9) +#define RT2860_LNA_PE_A0_EN (1 << 8) +#define RT2860_LNA_PE0_EN (RT2860_LNA_PE_A0_EN | RT2860_LNA_PE_G0_EN) +#define RT2860_PA_PE_G1_POL (1 << 7) +#define RT2860_PA_PE_A1_POL (1 << 6) +#define RT2860_PA_PE_G0_POL (1 << 5) +#define RT2860_PA_PE_A0_POL (1 << 4) +#define RT2860_PA_PE_G1_EN (1 << 3) +#define RT2860_PA_PE_A1_EN (1 << 2) +#define RT2860_PA_PE_G0_EN (1 << 1) +#define RT2860_PA_PE_A0_EN (1 << 0) + +/* possible flags for register TX_BAND_CFG */ +#define RT2860_5G_BAND_SEL_N (1 << 2) +#define RT2860_5G_BAND_SEL_P (1 << 1) +#define RT2860_TX_BAND_SEL (1 << 0) + +/* possible flags for register TX_SW_CFG0 */ +#define RT2860_DLY_RFTR_EN_SHIFT 24 +#define RT2860_DLY_TRSW_EN_SHIFT 16 +#define RT2860_DLY_PAPE_EN_SHIFT 8 +#define RT2860_DLY_TXPE_EN_SHIFT 0 + +/* possible flags for register TX_SW_CFG1 */ +#define RT2860_DLY_RFTR_DIS_SHIFT 16 +#define RT2860_DLY_TRSW_DIS_SHIFT 8 +#define RT2860_DLY_PAPE_DIS SHIFT 0 + +/* possible flags for register TX_SW_CFG2 */ +#define RT2860_DLY_LNA_EN_SHIFT 24 +#define RT2860_DLY_LNA_DIS_SHIFT 16 +#define RT2860_DLY_DAC_EN_SHIFT 8 +#define RT2860_DLY_DAC_DIS_SHIFT 0 + +/* possible flags for register TXOP_THRES_CFG */ +#define RT2860_TXOP_REM_THRES_SHIFT 24 +#define RT2860_CF_END_THRES_SHIFT 16 +#define RT2860_RDG_IN_THRES 8 +#define RT2860_RDG_OUT_THRES 0 + +/* possible flags for register TXOP_CTRL_CFG */ +#define RT2860_EXT_CW_MIN_SHIFT 16 +#define RT2860_EXT_CCA_DLY_SHIFT 8 +#define RT2860_EXT_CCA_EN (1 << 7) +#define RT2860_LSIG_TXOP_EN (1 << 6) +#define RT2860_TXOP_TRUN_EN_MIMOPS (1 << 4) +#define RT2860_TXOP_TRUN_EN_TXOP (1 << 3) +#define RT2860_TXOP_TRUN_EN_RATE (1 << 2) +#define RT2860_TXOP_TRUN_EN_AC (1 << 1) +#define RT2860_TXOP_TRUN_EN_TIMEOUT (1 << 0) + +/* possible flags for register TX_RTS_CFG */ +#define RT2860_RTS_FBK_EN (1 << 24) +#define RT2860_RTS_THRES_SHIFT 8 +#define RT2860_RTS_RTY_LIMIT_SHIFT 0 + +/* possible flags for register TX_TIMEOUT_CFG */ +#define RT2860_TXOP_TIMEOUT_SHIFT 16 +#define RT2860_RX_ACK_TIMEOUT_SHIFT 8 +#define RT2860_MPDU_LIFE_TIME_SHIFT 4 + +/* possible flags for register TX_RTY_CFG */ +#define RT2860_TX_AUTOFB_EN (1 << 30) +#define RT2860_AGG_RTY_MODE_TIMER (1 << 29) +#define RT2860_NAG_RTY_MODE_TIMER (1 << 28) +#define RT2860_LONG_RTY_THRES_SHIFT 16 +#define RT2860_LONG_RTY_LIMIT_SHIFT 8 +#define RT2860_SHORT_RTY_LIMIT_SHIFT 0 + +/* possible flags for register TX_LINK_CFG */ +#define RT2860_REMOTE_MFS_SHIFT 24 +#define RT2860_REMOTE_MFB_SHIFT 16 +#define RT2860_TX_CFACK_EN (1 << 12) +#define RT2860_TX_RDG_EN (1 << 11) +#define RT2860_TX_MRQ_EN (1 << 10) +#define RT2860_REMOTE_UMFS_EN (1 << 9) +#define RT2860_TX_MFB_EN (1 << 8) +#define RT2860_REMOTE_MFB_LT_SHIFT 0 + +/* possible flags for registers *_PROT_CFG */ +#define RT2860_RTSTH_EN (1 << 26) +#define RT2860_TXOP_ALLOW_GF40 (1 << 25) +#define RT2860_TXOP_ALLOW_GF20 (1 << 24) +#define RT2860_TXOP_ALLOW_MM40 (1 << 23) +#define RT2860_TXOP_ALLOW_MM20 (1 << 22) +#define RT2860_TXOP_ALLOW_OFDM (1 << 21) +#define RT2860_TXOP_ALLOW_CCK (1 << 20) +#define RT2860_TXOP_ALLOW_ALL (0x3f << 20) +#define RT2860_PROT_NAV_SHORT (1 << 18) +#define RT2860_PROT_NAV_LONG (2 << 18) +#define RT2860_PROT_CTRL_RTS_CTS (1 << 16) +#define RT2860_PROT_CTRL_CTS (2 << 16) + +/* possible flags for registers EXP_{CTS,ACK}_TIME */ +#define RT2860_EXP_OFDM_TIME_SHIFT 16 +#define RT2860_EXP_CCK_TIME_SHIFT 0 + +/* possible flags for register RX_FILTR_CFG */ +#define RT2860_DROP_CTRL_RSV (1 << 16) +#define RT2860_DROP_BAR (1 << 15) +#define RT2860_DROP_BA (1 << 14) +#define RT2860_DROP_PSPOLL (1 << 13) +#define RT2860_DROP_RTS (1 << 12) +#define RT2860_DROP_CTS (1 << 11) +#define RT2860_DROP_ACK (1 << 10) +#define RT2860_DROP_CFEND (1 << 9) +#define RT2860_DROP_CFACK (1 << 8) +#define RT2860_DROP_DUPL (1 << 7) +#define RT2860_DROP_BC (1 << 6) +#define RT2860_DROP_MC (1 << 5) +#define RT2860_DROP_VER_ERR (1 << 4) +#define RT2860_DROP_NOT_MYBSS (1 << 3) +#define RT2860_DROP_UC_NOME (1 << 2) +#define RT2860_DROP_PHY_ERR (1 << 1) +#define RT2860_DROP_CRC_ERR (1 << 0) + +/* possible flags for register AUTO_RSP_CFG */ +#define RT2860_CTRL_PWR_BIT (1 << 7) +#define RT2860_BAC_ACK_POLICY (1 << 6) +#define RT2860_CCK_SHORT_EN (1 << 4) +#define RT2860_CTS_40M_REF_EN (1 << 3) +#define RT2860_CTS_40M_MODE_EN (1 << 2) +#define RT2860_BAC_ACKPOLICY_EN (1 << 1) +#define RT2860_AUTO_RSP_EN (1 << 0) + +/* possible flags for register SIFS_COST_CFG */ +#define RT2860_OFDM_SIFS_COST_SHIFT 8 +#define RT2860_CCK_SIFS_COST_SHIFT 0 + +/* possible flags for register TXOP_HLDR_ET */ +#define RT2860_TXOP_ETM1_EN (1 << 25) +#define RT2860_TXOP_ETM0_EN (1 << 24) +#define RT2860_TXOP_ETM_THRES_SHIFT 16 +#define RT2860_TXOP_ETO_EN (1 << 8) +#define RT2860_TXOP_ETO_THRES_SHIFT 1 +#define RT2860_PER_RX_RST_EN (1 << 0) + +/* possible flags for register TX_STAT_FIFO */ +#define RT2860_TXQ_MCS_SHIFT 16 +#define RT2860_TXQ_WCID_SHIFT 8 +#define RT2860_TXQ_ACKREQ (1 << 7) +#define RT2860_TXQ_AGG (1 << 6) +#define RT2860_TXQ_OK (1 << 5) +#define RT2860_TXQ_PID_SHIFT 1 +#define RT2860_TXQ_VLD (1 << 0) + +/* possible flags for register WCID_ATTR */ +#define RT2860_MODE_NOSEC 0 +#define RT2860_MODE_WEP40 1 +#define RT2860_MODE_WEP104 2 +#define RT2860_MODE_TKIP 3 +#define RT2860_MODE_AES_CCMP 4 +#define RT2860_MODE_CKIP40 5 +#define RT2860_MODE_CKIP104 6 +#define RT2860_MODE_CKIP128 7 +#define RT2860_RX_PKEY_EN (1 << 0) + +/* possible flags for register H2M_MAILBOX */ +#define RT2860_H2M_BUSY (1 << 24) +#define RT2860_TOKEN_NO_INTR 0xff + + +/* possible flags for MCU command RT2860_MCU_CMD_LEDS */ +#define RT2860_LED_RADIO (1 << 13) +#define RT2860_LED_LINK_2GHZ (1 << 14) +#define RT2860_LED_LINK_5GHZ (1 << 15) + + +/* possible flags for RT3020 RF register 1 */ +#define RT3070_RF_BLOCK (1 << 0) +#define RT3070_RX0_PD (1 << 2) +#define RT3070_TX0_PD (1 << 3) +#define RT3070_RX1_PD (1 << 4) +#define RT3070_TX1_PD (1 << 5) +#define RT3070_RX2_PD (1 << 6) +#define RT3070_TX2_PD (1 << 7) + +/* possible flags for RT3020 RF register 7 */ +#define RT3070_TUNE (1 << 0) + +/* possible flags for RT3020 RF register 15 */ +#define RT3070_TX_LO2 (1 << 3) + +/* possible flags for RT3020 RF register 17 */ +#define RT3070_TX_LO1 (1 << 3) + +/* possible flags for RT3020 RF register 20 */ +#define RT3070_RX_LO1 (1 << 3) + +/* possible flags for RT3020 RF register 21 */ +#define RT3070_RX_LO2 (1 << 3) +#define RT3070_RX_CTB (1 << 7) + +/* possible flags for RT3020 RF register 22 */ +#define RT3070_BB_LOOPBACK (1 << 0) + +/* possible flags for RT3053 RF register 1 */ +#define RT3593_VCO (1 << 0) + +/* possible flags for RT3053 RF register 2 */ +#define RT3593_RESCAL (1 << 7) + +/* possible flags for RT3053 RF register 3 */ +#define RT3593_VCOCAL (1 << 7) + +/* possible flags for RT3053 RF register 6 */ +#define RT3593_VCO_IC (1 << 6) + +/* possible flags for RT3053 RF register 20 */ +#define RT3593_LDO_PLL_VC_MASK 0x0e +#define RT3593_LDO_RF_VC_MASK 0xe0 + +/* possible flags for RT3053 RF register 22 */ +#define RT3593_CP_IC_MASK 0xe0 +#define RT3593_CP_IC_SHIFT 5 + +/* possible flags for RT3053 RF register 46 */ +#define RT3593_RX_CTB (1 << 5) + +#define RT3090_DEF_LNA 10 + +/* RT2860 TX descriptor */ +struct rt2860_txd { + uint32_t sdp0; /* Segment Data Pointer 0 */ + uint16_t sdl1; /* Segment Data Length 1 */ +#define RT2860_TX_BURST (1 << 15) +#define RT2860_TX_LS1 (1 << 14) /* SDP1 is the last segment */ + + uint16_t sdl0; /* Segment Data Length 0 */ +#define RT2860_TX_DDONE (1 << 15) +#define RT2860_TX_LS0 (1 << 14) /* SDP0 is the last segment */ + + uint32_t sdp1; /* Segment Data Pointer 1 */ + uint8_t reserved[3]; + uint8_t flags; +#define RT2860_TX_QSEL_SHIFT 1 +#define RT2860_TX_QSEL_MGMT (0 << 1) +#define RT2860_TX_QSEL_HCCA (1 << 1) +#define RT2860_TX_QSEL_EDCA (2 << 1) +#define RT2860_TX_WIV (1 << 0) +} __packed; + +/* RT2870 TX descriptor */ +struct rt2870_txd { + uint16_t len; + uint8_t pad; + uint8_t flags; +} __packed; + +/* TX Wireless Information */ +struct rt2860_txwi { + uint8_t flags; +#define RT2860_TX_MPDU_DSITY_SHIFT 5 +#define RT2860_TX_AMPDU (1 << 4) +#define RT2860_TX_TS (1 << 3) +#define RT2860_TX_CFACK (1 << 2) +#define RT2860_TX_MMPS (1 << 1) +#define RT2860_TX_FRAG (1 << 0) + + uint8_t txop; +#define RT2860_TX_TXOP_HT 0 +#define RT2860_TX_TXOP_PIFS 1 +#define RT2860_TX_TXOP_SIFS 2 +#define RT2860_TX_TXOP_BACKOFF 3 + + uint16_t phy; +#define RT2860_PHY_MODE 0xc000 +#define RT2860_PHY_CCK (0 << 14) +#define RT2860_PHY_OFDM (1 << 14) +#define RT2860_PHY_HT (2 << 14) +#define RT2860_PHY_HT_GF (3 << 14) +#define RT2860_PHY_SGI (1 << 8) +#define RT2860_PHY_BW40 (1 << 7) +#define RT2860_PHY_MCS 0x7f +#define RT2860_PHY_SHPRE (1 << 3) + + uint8_t xflags; +#define RT2860_TX_BAWINSIZE_SHIFT 2 +#define RT2860_TX_NSEQ (1 << 1) +#define RT2860_TX_ACK (1 << 0) + + uint8_t wcid; /* Wireless Client ID */ + uint16_t len; +#define RT2860_TX_PID_SHIFT 12 + + uint32_t iv; + uint32_t eiv; +} __packed; + +/* RT2860 RX descriptor */ +struct rt2860_rxd { + uint32_t sdp0; + uint16_t sdl1; /* unused */ + uint16_t sdl0; +#define RT2860_RX_DDONE (1 << 15) +#define RT2860_RX_LS0 (1 << 14) + + uint32_t sdp1; /* unused */ + uint32_t flags; +#define RT2860_RX_DEC (1 << 16) +#define RT2860_RX_AMPDU (1 << 15) +#define RT2860_RX_L2PAD (1 << 14) +#define RT2860_RX_RSSI (1 << 13) +#define RT2860_RX_HTC (1 << 12) +#define RT2860_RX_AMSDU (1 << 11) +#define RT2860_RX_MICERR (1 << 10) +#define RT2860_RX_ICVERR (1 << 9) +#define RT2860_RX_CRCERR (1 << 8) +#define RT2860_RX_MYBSS (1 << 7) +#define RT2860_RX_BC (1 << 6) +#define RT2860_RX_MC (1 << 5) +#define RT2860_RX_UC2ME (1 << 4) +#define RT2860_RX_FRAG (1 << 3) +#define RT2860_RX_NULL (1 << 2) +#define RT2860_RX_DATA (1 << 1) +#define RT2860_RX_BA (1 << 0) +} __packed; + +/* RT2870 RX descriptor */ +struct rt2870_rxd { + /* single 32-bit field */ + uint32_t flags; +} __packed; + +/* RX Wireless Information */ +struct rt2860_rxwi { + uint8_t wcid; + uint8_t keyidx; +#define RT2860_RX_UDF_SHIFT 5 +#define RT2860_RX_BSS_IDX_SHIFT 2 + + uint16_t len; +#define RT2860_RX_TID_SHIFT 12 + + uint16_t seq; + uint16_t phy; + uint8_t rssi[3]; + uint8_t reserved1; + uint8_t snr[2]; + uint16_t reserved2; +} __packed; + + +/* first DMA segment contains TXWI + 802.11 header + 32-bit padding */ +#define RT2860_TXWI_DMASZ \ + (sizeof (struct rt2860_txwi) + \ + sizeof (struct ieee80211_frame) + 6 + \ + sizeof (uint16_t)) + +#define RT2860_RF1 0 +#define RT2860_RF2 2 +#define RT2860_RF3 1 +#define RT2860_RF4 3 + +#define RT2860_RF_2820 1 /* 2T3R */ +#define RT2860_RF_2850 2 /* dual-band 2T3R */ +#define RT2860_RF_2720 3 /* 1T2R */ +#define RT2860_RF_2750 4 /* dual-band 1T2R */ +#define RT3070_RF_3020 5 /* 1T1R */ +#define RT3070_RF_2020 6 /* b/g */ +#define RT3070_RF_3021 7 /* 1T2R */ +#define RT3070_RF_3022 8 /* 2T2R */ +#define RT3070_RF_3052 9 /* dual-band 2T2R */ +#define RT3070_RF_3320 11 /* 1T1R */ +#define RT3070_RF_3053 13 /* dual-band 3T3R */ + +/* USB commands for RT2870 only */ +#define RT2870_RESET 1 +#define RT2870_WRITE_2 2 +#define RT2870_WRITE_REGION_1 6 +#define RT2870_READ_REGION_1 7 +#define RT2870_EEPROM_READ 9 + +#define RT2860_EEPROM_DELAY 1 /* minimum hold time (microsecond) */ + +#define RT2860_EEPROM_VERSION 0x01 +#define RT2860_EEPROM_MAC01 0x02 +#define RT2860_EEPROM_MAC23 0x03 +#define RT2860_EEPROM_MAC45 0x04 +#define RT2860_EEPROM_PCIE_PSLEVEL 0x11 +#define RT2860_EEPROM_REV 0x12 +#define RT2860_EEPROM_ANTENNA 0x1a +#define RT2860_EEPROM_CONFIG 0x1b +#define RT2860_EEPROM_COUNTRY 0x1c +#define RT2860_EEPROM_FREQ_LEDS 0x1d +#define RT2860_EEPROM_LED1 0x1e +#define RT2860_EEPROM_LED2 0x1f +#define RT2860_EEPROM_LED3 0x20 +#define RT2860_EEPROM_LNA 0x22 +#define RT2860_EEPROM_RSSI1_2GHZ 0x23 +#define RT2860_EEPROM_RSSI2_2GHZ 0x24 +#define RT2860_EEPROM_RSSI1_5GHZ 0x25 +#define RT2860_EEPROM_RSSI2_5GHZ 0x26 +#define RT2860_EEPROM_DELTAPWR 0x28 +#define RT2860_EEPROM_PWR2GHZ_BASE1 0x29 +#define RT2860_EEPROM_PWR2GHZ_BASE2 0x30 +#define RT2860_EEPROM_TSSI1_2GHZ 0x37 +#define RT2860_EEPROM_TSSI2_2GHZ 0x38 +#define RT2860_EEPROM_TSSI3_2GHZ 0x39 +#define RT2860_EEPROM_TSSI4_2GHZ 0x3a +#define RT2860_EEPROM_TSSI5_2GHZ 0x3b +#define RT2860_EEPROM_PWR5GHZ_BASE1 0x3c +#define RT2860_EEPROM_PWR5GHZ_BASE2 0x53 +#define RT2860_EEPROM_TSSI1_5GHZ 0x6a +#define RT2860_EEPROM_TSSI2_5GHZ 0x6b +#define RT2860_EEPROM_TSSI3_5GHZ 0x6c +#define RT2860_EEPROM_TSSI4_5GHZ 0x6d +#define RT2860_EEPROM_TSSI5_5GHZ 0x6e +#define RT2860_EEPROM_RPWR 0x6f +#define RT2860_EEPROM_BBP_BASE 0x78 +#define RT3071_EEPROM_RF_BASE 0x82 + +#define RT2860_RIDX_CCK1 0 +#define RT2860_RIDX_CCK11 3 +#define RT2860_RIDX_OFDM6 4 +#define RT2860_RIDX_MAX 11 +static const struct rt2860_rate { + uint8_t rate; + uint8_t mcs; + enum ieee80211_phytype phy; + uint8_t ctl_ridx; + uint16_t sp_ack_dur; + uint16_t lp_ack_dur; +} rt2860_rates[] = { + { 2, 0, IEEE80211_T_DS, 0, 314, 314 }, + { 4, 1, IEEE80211_T_DS, 1, 258, 162 }, + { 11, 2, IEEE80211_T_DS, 2, 223, 127 }, + { 22, 3, IEEE80211_T_DS, 3, 213, 117 }, + { 12, 0, IEEE80211_T_OFDM, 4, 60, 60 }, + { 18, 1, IEEE80211_T_OFDM, 4, 52, 52 }, + { 24, 2, IEEE80211_T_OFDM, 6, 48, 48 }, + { 36, 3, IEEE80211_T_OFDM, 6, 44, 44 }, + { 48, 4, IEEE80211_T_OFDM, 8, 44, 44 }, + { 72, 5, IEEE80211_T_OFDM, 8, 40, 40 }, + { 96, 6, IEEE80211_T_OFDM, 8, 40, 40 }, + { 108, 7, IEEE80211_T_OFDM, 8, 40, 40 } +}; + +/* + * Control and status registers access macros. + */ +#define RAL_READ(sc, reg) \ + bus_space_read_4((sc)->sc_st, (sc)->sc_sh, (reg)) + +#define RAL_WRITE(sc, reg, val) \ + bus_space_write_4((sc)->sc_st, (sc)->sc_sh, (reg), (val)) + +#define RAL_BARRIER_WRITE(sc) \ + bus_space_barrier((sc)->sc_st, (sc)->sc_sh, 0, 0x1800, \ + BUS_SPACE_BARRIER_WRITE) + +#define RAL_BARRIER_READ_WRITE(sc) \ + bus_space_barrier((sc)->sc_st, (sc)->sc_sh, 0, 0x1800, \ + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE) + +#define RAL_WRITE_REGION_1(sc, offset, datap, count) \ + bus_space_write_region_1((sc)->sc_st, (sc)->sc_sh, (offset), \ + (datap), (count)) + +#define RAL_SET_REGION_4(sc, offset, val, count) \ + bus_space_set_region_4((sc)->sc_st, (sc)->sc_sh, (offset), \ + (val), (count)) + +/* + * EEPROM access macro. + */ +#define RT2860_EEPROM_CTL(sc, val) do { \ + RAL_WRITE((sc), RT2860_PCI_EECTRL, (val)); \ + RAL_BARRIER_READ_WRITE((sc)); \ + DELAY(RT2860_EEPROM_DELAY); \ +} while (/* CONSTCOND */0) + +/* + * Default values for MAC registers; values taken from the reference driver. + */ +#define RT2860_DEF_MAC \ + { RT2860_BCN_OFFSET0, 0xf8f0e8e0 }, \ + { RT2860_LEGACY_BASIC_RATE, 0x0000013f }, \ + { RT2860_HT_BASIC_RATE, 0x00008003 }, \ + { RT2860_MAC_SYS_CTRL, 0x00000000 }, \ + { RT2860_BKOFF_SLOT_CFG, 0x00000209 }, \ + { RT2860_TX_SW_CFG0, 0x00000000 }, \ + { RT2860_TX_SW_CFG1, 0x00080606 }, \ + { RT2860_TX_LINK_CFG, 0x00001020 }, \ + { RT2860_TX_TIMEOUT_CFG, 0x000a2090 }, \ + { RT2860_LED_CFG, 0x7f031e46 }, \ + { RT2860_WMM_AIFSN_CFG, 0x00002273 }, \ + { RT2860_WMM_CWMIN_CFG, 0x00002344 }, \ + { RT2860_WMM_CWMAX_CFG, 0x000034aa }, \ + { RT2860_MAX_PCNT, 0x1f3fbf9f }, \ + { RT2860_TX_RTY_CFG, 0x47d01f0f }, \ + { RT2860_AUTO_RSP_CFG, 0x00000013 }, \ + { RT2860_CCK_PROT_CFG, 0x05740003 }, \ + { RT2860_OFDM_PROT_CFG, 0x05740003 }, \ + { RT2860_GF20_PROT_CFG, 0x01744004 }, \ + { RT2860_GF40_PROT_CFG, 0x03f44084 }, \ + { RT2860_MM20_PROT_CFG, 0x01744004 }, \ + { RT2860_MM40_PROT_CFG, 0x03f54084 }, \ + { RT2860_TXOP_CTRL_CFG, 0x0000583f }, \ + { RT2860_TXOP_HLDR_ET, 0x00000002 }, \ + { RT2860_TX_RTS_CFG, 0x00092b20 }, \ + { RT2860_EXP_ACK_TIME, 0x002400ca }, \ + { RT2860_XIFS_TIME_CFG, 0x33a41010 }, \ + { RT2860_PWR_PIN_CFG, 0x00000003 } + +/* XXX only a few registers differ from above, try to merge? */ +#define RT2870_DEF_MAC \ + { RT2860_BCN_OFFSET0, 0xf8f0e8e0 }, \ + { RT2860_LEGACY_BASIC_RATE, 0x0000013f }, \ + { RT2860_HT_BASIC_RATE, 0x00008003 }, \ + { RT2860_MAC_SYS_CTRL, 0x00000000 }, \ + { RT2860_BKOFF_SLOT_CFG, 0x00000209 }, \ + { RT2860_TX_SW_CFG0, 0x00000000 }, \ + { RT2860_TX_SW_CFG1, 0x00080606 }, \ + { RT2860_TX_LINK_CFG, 0x00001020 }, \ + { RT2860_TX_TIMEOUT_CFG, 0x000a2090 }, \ + { RT2860_LED_CFG, 0x7f031e46 }, \ + { RT2860_WMM_AIFSN_CFG, 0x00002273 }, \ + { RT2860_WMM_CWMIN_CFG, 0x00002344 }, \ + { RT2860_WMM_CWMAX_CFG, 0x000034aa }, \ + { RT2860_MAX_PCNT, 0x1f3fbf9f }, \ + { RT2860_TX_RTY_CFG, 0x47d01f0f }, \ + { RT2860_AUTO_RSP_CFG, 0x00000013 }, \ + { RT2860_CCK_PROT_CFG, 0x05740003 }, \ + { RT2860_OFDM_PROT_CFG, 0x05740003 }, \ + { RT2860_PBF_CFG, 0x00f40006 }, \ + { RT2860_WPDMA_GLO_CFG, 0x00000030 }, \ + { RT2860_GF20_PROT_CFG, 0x01744004 }, \ + { RT2860_GF40_PROT_CFG, 0x03f44084 }, \ + { RT2860_MM20_PROT_CFG, 0x01744004 }, \ + { RT2860_MM40_PROT_CFG, 0x03f44084 }, \ + { RT2860_TXOP_CTRL_CFG, 0x0000583f }, \ + { RT2860_TXOP_HLDR_ET, 0x00000002 }, \ + { RT2860_TX_RTS_CFG, 0x00092b20 }, \ + { RT2860_EXP_ACK_TIME, 0x002400ca }, \ + { RT2860_XIFS_TIME_CFG, 0x33a41010 }, \ + { RT2860_PWR_PIN_CFG, 0x00000003 } + +/* + * Default values for BBP registers; values taken from the reference driver. + */ +#define RT2860_DEF_BBP \ + { 65, 0x2c }, \ + { 66, 0x38 }, \ + { 69, 0x12 }, \ + { 70, 0x0a }, \ + { 73, 0x10 }, \ + { 81, 0x37 }, \ + { 82, 0x62 }, \ + { 83, 0x6a }, \ + { 84, 0x99 }, \ + { 86, 0x00 }, \ + { 91, 0x04 }, \ + { 92, 0x00 }, \ + { 103, 0x00 }, \ + { 105, 0x05 }, \ + { 106, 0x35 } + +/* + * Default settings for RF registers; values derived from the reference driver. + */ +#define RT2860_RF2850 \ + { 1, 0x100bb3, 0x1301e1, 0x05a014, 0x001402 }, \ + { 2, 0x100bb3, 0x1301e1, 0x05a014, 0x001407 }, \ + { 3, 0x100bb3, 0x1301e2, 0x05a014, 0x001402 }, \ + { 4, 0x100bb3, 0x1301e2, 0x05a014, 0x001407 }, \ + { 5, 0x100bb3, 0x1301e3, 0x05a014, 0x001402 }, \ + { 6, 0x100bb3, 0x1301e3, 0x05a014, 0x001407 }, \ + { 7, 0x100bb3, 0x1301e4, 0x05a014, 0x001402 }, \ + { 8, 0x100bb3, 0x1301e4, 0x05a014, 0x001407 }, \ + { 9, 0x100bb3, 0x1301e5, 0x05a014, 0x001402 }, \ + { 10, 0x100bb3, 0x1301e5, 0x05a014, 0x001407 }, \ + { 11, 0x100bb3, 0x1301e6, 0x05a014, 0x001402 }, \ + { 12, 0x100bb3, 0x1301e6, 0x05a014, 0x001407 }, \ + { 13, 0x100bb3, 0x1301e7, 0x05a014, 0x001402 }, \ + { 14, 0x100bb3, 0x1301e8, 0x05a014, 0x001404 }, \ + { 36, 0x100bb3, 0x130266, 0x056014, 0x001408 }, \ + { 38, 0x100bb3, 0x130267, 0x056014, 0x001404 }, \ + { 40, 0x100bb2, 0x1301a0, 0x056014, 0x001400 }, \ + { 44, 0x100bb2, 0x1301a0, 0x056014, 0x001408 }, \ + { 46, 0x100bb2, 0x1301a1, 0x056014, 0x001402 }, \ + { 48, 0x100bb2, 0x1301a1, 0x056014, 0x001406 }, \ + { 52, 0x100bb2, 0x1301a2, 0x056014, 0x001404 }, \ + { 54, 0x100bb2, 0x1301a2, 0x056014, 0x001408 }, \ + { 56, 0x100bb2, 0x1301a3, 0x056014, 0x001402 }, \ + { 60, 0x100bb2, 0x1301a4, 0x056014, 0x001400 }, \ + { 62, 0x100bb2, 0x1301a4, 0x056014, 0x001404 }, \ + { 64, 0x100bb2, 0x1301a4, 0x056014, 0x001408 }, \ + { 100, 0x100bb2, 0x1301ac, 0x05e014, 0x001400 }, \ + { 102, 0x100bb2, 0x1701ac, 0x15e014, 0x001404 }, \ + { 104, 0x100bb2, 0x1701ac, 0x15e014, 0x001408 }, \ + { 108, 0x100bb3, 0x17028c, 0x15e014, 0x001404 }, \ + { 110, 0x100bb3, 0x13028d, 0x05e014, 0x001400 }, \ + { 112, 0x100bb3, 0x13028d, 0x05e014, 0x001406 }, \ + { 116, 0x100bb3, 0x13028e, 0x05e014, 0x001408 }, \ + { 118, 0x100bb3, 0x13028f, 0x05e014, 0x001404 }, \ + { 120, 0x100bb1, 0x1300e0, 0x05e014, 0x001400 }, \ + { 124, 0x100bb1, 0x1300e0, 0x05e014, 0x001404 }, \ + { 126, 0x100bb1, 0x1300e0, 0x05e014, 0x001406 }, \ + { 128, 0x100bb1, 0x1300e0, 0x05e014, 0x001408 }, \ + { 132, 0x100bb1, 0x1300e1, 0x05e014, 0x001402 }, \ + { 134, 0x100bb1, 0x1300e1, 0x05e014, 0x001404 }, \ + { 136, 0x100bb1, 0x1300e1, 0x05e014, 0x001406 }, \ + { 140, 0x100bb1, 0x1300e2, 0x05e014, 0x001400 }, \ + { 149, 0x100bb1, 0x1300e2, 0x05e014, 0x001409 }, \ + { 151, 0x100bb1, 0x1300e3, 0x05e014, 0x001401 }, \ + { 153, 0x100bb1, 0x1300e3, 0x05e014, 0x001403 }, \ + { 157, 0x100bb1, 0x1300e3, 0x05e014, 0x001407 }, \ + { 159, 0x100bb1, 0x1300e3, 0x05e014, 0x001409 }, \ + { 161, 0x100bb1, 0x1300e4, 0x05e014, 0x001401 }, \ + { 165, 0x100bb1, 0x1300e4, 0x05e014, 0x001405 }, \ + { 167, 0x100bb1, 0x1300f4, 0x05e014, 0x001407 }, \ + { 169, 0x100bb1, 0x1300f4, 0x05e014, 0x001409 }, \ + { 171, 0x100bb1, 0x1300f5, 0x05e014, 0x001401 }, \ + { 173, 0x100bb1, 0x1300f5, 0x05e014, 0x001403 } + +#define RT3070_RF3052 \ + { 0xf1, 2, 2 }, \ + { 0xf1, 2, 7 }, \ + { 0xf2, 2, 2 }, \ + { 0xf2, 2, 7 }, \ + { 0xf3, 2, 2 }, \ + { 0xf3, 2, 7 }, \ + { 0xf4, 2, 2 }, \ + { 0xf4, 2, 7 }, \ + { 0xf5, 2, 2 }, \ + { 0xf5, 2, 7 }, \ + { 0xf6, 2, 2 }, \ + { 0xf6, 2, 7 }, \ + { 0xf7, 2, 2 }, \ + { 0xf8, 2, 4 }, \ + { 0x56, 0, 4 }, \ + { 0x56, 0, 6 }, \ + { 0x56, 0, 8 }, \ + { 0x57, 0, 0 }, \ + { 0x57, 0, 2 }, \ + { 0x57, 0, 4 }, \ + { 0x57, 0, 8 }, \ + { 0x57, 0, 10 }, \ + { 0x58, 0, 0 }, \ + { 0x58, 0, 4 }, \ + { 0x58, 0, 6 }, \ + { 0x58, 0, 8 }, \ + { 0x5b, 0, 8 }, \ + { 0x5b, 0, 10 }, \ + { 0x5c, 0, 0 }, \ + { 0x5c, 0, 4 }, \ + { 0x5c, 0, 6 }, \ + { 0x5c, 0, 8 }, \ + { 0x5d, 0, 0 }, \ + { 0x5d, 0, 2 }, \ + { 0x5d, 0, 4 }, \ + { 0x5d, 0, 8 }, \ + { 0x5d, 0, 10 }, \ + { 0x5e, 0, 0 }, \ + { 0x5e, 0, 4 }, \ + { 0x5e, 0, 6 }, \ + { 0x5e, 0, 8 }, \ + { 0x5f, 0, 0 }, \ + { 0x5f, 0, 9 }, \ + { 0x5f, 0, 11 }, \ + { 0x60, 0, 1 }, \ + { 0x60, 0, 5 }, \ + { 0x60, 0, 7 }, \ + { 0x60, 0, 9 }, \ + { 0x61, 0, 1 }, \ + { 0x61, 0, 3 }, \ + { 0x61, 0, 5 }, \ + { 0x61, 0, 7 }, \ + { 0x61, 0, 9 } + +#define RT3070_DEF_RF \ + { 4, 0x40 }, \ + { 5, 0x03 }, \ + { 6, 0x02 }, \ + { 7, 0x70 }, \ + { 9, 0x0f }, \ + { 10, 0x41 }, \ + { 11, 0x21 }, \ + { 12, 0x7b }, \ + { 14, 0x90 }, \ + { 15, 0x58 }, \ + { 16, 0xb3 }, \ + { 17, 0x92 }, \ + { 18, 0x2c }, \ + { 19, 0x02 }, \ + { 20, 0xba }, \ + { 21, 0xdb }, \ + { 24, 0x16 }, \ + { 25, 0x01 }, \ + { 29, 0x1f } + +#define RT3572_DEF_RF \ + { 0, 0x70 }, \ + { 1, 0x81 }, \ + { 2, 0xf1 }, \ + { 3, 0x02 }, \ + { 4, 0x4c }, \ + { 5, 0x05 }, \ + { 6, 0x4a }, \ + { 7, 0xd8 }, \ + { 9, 0xc3 }, \ + { 10, 0xf1 }, \ + { 11, 0xb9 }, \ + { 12, 0x70 }, \ + { 13, 0x65 }, \ + { 14, 0xa0 }, \ + { 15, 0x53 }, \ + { 16, 0x4c }, \ + { 17, 0x23 }, \ + { 18, 0xac }, \ + { 19, 0x93 }, \ + { 20, 0xb3 }, \ + { 21, 0xd0 }, \ + { 22, 0x00 }, \ + { 23, 0x3c }, \ + { 24, 0x16 }, \ + { 25, 0x15 }, \ + { 26, 0x85 }, \ + { 27, 0x00 }, \ + { 28, 0x00 }, \ + { 29, 0x9b }, \ + { 30, 0x09 }, \ + { 31, 0x10 } Property changes on: sys/dev/ral/rt2860reg.h ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: sys/dev/ral/rt2860var.h =================================================================== --- sys/dev/ral/rt2860var.h (revision 0) +++ sys/dev/ral/rt2860var.h (working copy) @@ -0,0 +1,210 @@ +/* $OpenBSD: rt2860var.h,v 1.20 2010/09/07 16:21:42 deraadt Exp $ */ + +/*- + * Copyright (c) 2007 + * Damien Bergamini + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#define RT2860_TX_RING_COUNT 64 +#define RT2860_RX_RING_COUNT 128 +#define RT2860_TX_POOL_COUNT (RT2860_TX_RING_COUNT * 2) + +#define RT2860_MAX_SCATTER ((RT2860_TX_RING_COUNT * 2) - 1) + +/* HW supports up to 255 STAs */ +#define RT2860_WCID_MAX 254 +#define RT2860_AID2WCID(aid) ((aid) & 0xff) + +struct rt2860_rx_radiotap_header { + struct ieee80211_radiotap_header wr_ihdr; + uint64_t wr_tsf; + uint8_t wr_flags; + uint8_t wr_rate; + uint16_t wr_chan_freq; + uint16_t wr_chan_flags; + uint8_t wr_antenna; + int8_t wr_antsignal; + int8_t wr_antnoise; +} __packed; + +#define RT2860_RX_RADIOTAP_PRESENT \ + ((1 << IEEE80211_RADIOTAP_TSFT) | \ + (1 << IEEE80211_RADIOTAP_FLAGS) | \ + (1 << IEEE80211_RADIOTAP_RATE) | \ + (1 << IEEE80211_RADIOTAP_CHANNEL) | \ + (1 << IEEE80211_RADIOTAP_ANTENNA) | \ + (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | \ + (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE)) + +struct rt2860_tx_radiotap_header { + struct ieee80211_radiotap_header wt_ihdr; + uint8_t wt_flags; + uint8_t wt_rate; + uint16_t wt_chan_freq; + uint16_t wt_chan_flags; +} __packed; + +#define RT2860_TX_RADIOTAP_PRESENT \ + ((1 << IEEE80211_RADIOTAP_FLAGS) | \ + (1 << IEEE80211_RADIOTAP_RATE) | \ + (1 << IEEE80211_RADIOTAP_CHANNEL)) + +struct rt2860_tx_data { + struct rt2860_txwi *txwi; + struct mbuf *m; + struct ieee80211_node *ni; + bus_dmamap_t map; + bus_addr_t paddr; + SLIST_ENTRY(rt2860_tx_data) next; +}; + +struct rt2860_tx_ring { + struct rt2860_txd *txd; + bus_addr_t paddr; + bus_dma_tag_t desc_dmat; + bus_dmamap_t desc_map; + bus_dma_tag_t data_dmat; + bus_dma_segment_t seg; + struct rt2860_tx_data *data[RT2860_TX_RING_COUNT]; + int cur; + int next; + int queued; +}; + +struct rt2860_rx_data { + struct mbuf *m; + bus_dmamap_t map; +}; + +struct rt2860_rx_ring { + struct rt2860_rxd *rxd; + bus_addr_t paddr; + bus_dma_tag_t desc_dmat; + bus_dmamap_t desc_map; + bus_dma_tag_t data_dmat; + bus_dma_segment_t seg; + unsigned int cur; /* must be unsigned */ + struct rt2860_rx_data data[RT2860_RX_RING_COUNT]; +}; + +struct rt2860_node { + struct ieee80211_node ni; + uint8_t wcid; + uint8_t ridx[IEEE80211_RATE_MAXSIZE]; + uint8_t ctl_ridx[IEEE80211_RATE_MAXSIZE]; +}; + +struct rt2860_vap { + struct ieee80211vap ral_vap; + + int (*ral_newstate)(struct ieee80211vap *, + enum ieee80211_state, int); +}; +#define RT2860_VAP(vap) ((struct rt2860_vap *)(vap)) + +struct rt2860_softc { + struct ifnet *sc_ifp; + device_t sc_dev; + bus_space_tag_t sc_st; + bus_space_handle_t sc_sh; + + struct mtx sc_mtx; + + struct callout watchdog_ch; + + int sc_invalid; + int sc_debug; +/* + * The same in both up to here + * ------------------------------------------------ + */ + + uint16_t (*sc_srom_read)(struct rt2860_softc *, + uint16_t); + void (*sc_node_free)(struct ieee80211_node *); + + int sc_flags; +#define RT2860_ENABLED (1 << 0) +#define RT2860_ADVANCED_PS (1 << 1) +#define RT2860_PCIE (1 << 2) + + struct ieee80211_node *wcid2ni[RT2860_WCID_MAX]; + + struct rt2860_tx_ring txq[6]; + struct rt2860_rx_ring rxq; + + SLIST_HEAD(, rt2860_tx_data) data_pool; + struct rt2860_tx_data data[RT2860_TX_POOL_COUNT]; + bus_dma_tag_t txwi_dmat; + bus_dmamap_t txwi_map; + bus_dma_segment_t txwi_seg; + caddr_t txwi_vaddr; + + int sc_tx_timer; + int mgtqid; + uint8_t qfullmsk; + + uint16_t mac_ver; + uint16_t mac_rev; + uint8_t rf_rev; + uint8_t freq; + uint8_t ntxchains; + uint8_t nrxchains; + uint8_t pslevel; + int8_t txpow1[54]; + int8_t txpow2[54]; + int8_t rssi_2ghz[3]; + int8_t rssi_5ghz[3]; + uint8_t lna[4]; + uint8_t rf24_20mhz; + uint8_t rf24_40mhz; + uint8_t patch_dac; + uint8_t rfswitch; + uint8_t ext_2ghz_lna; + uint8_t ext_5ghz_lna; + uint8_t calib_2ghz; + uint8_t calib_5ghz; + uint8_t txmixgain_2ghz; + uint8_t txmixgain_5ghz; + uint8_t tssi_2ghz[9]; + uint8_t tssi_5ghz[9]; + uint8_t step_2ghz; + uint8_t step_5ghz; + struct { + uint8_t reg; + uint8_t val; + } bbp[8], rf[10]; + uint8_t leds; + uint16_t led[3]; + uint32_t txpow20mhz[5]; + uint32_t txpow40mhz_2ghz[5]; + uint32_t txpow40mhz_5ghz[5]; + + struct rt2860_rx_radiotap_header sc_rxtap; + int sc_rxtap_len; + struct rt2860_tx_radiotap_header sc_txtap; + int sc_txtap_len; +}; + +int rt2860_attach(device_t, int); +int rt2860_detach(void *); +void rt2860_shutdown(void *); +void rt2860_suspend(void *); +void rt2860_resume(void *); +void rt2860_intr(void *); + +#define RAL_LOCK(sc) mtx_lock(&(sc)->sc_mtx) +#define RAL_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) +#define RAL_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) Property changes on: sys/dev/ral/rt2860var.h ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: sys/dev/ral/if_ral_pci.c =================================================================== --- sys/dev/ral/if_ral_pci.c (revision 234847) +++ sys/dev/ral/if_ral_pci.c (working copy) @@ -21,7 +21,7 @@ __FBSDID("$FreeBSD$"); /* - * PCI/Cardbus front-end for the Ralink RT2560/RT2561/RT2561S/RT2661 driver. + * PCI/Cardbus front-end for the Ralink RT2xxx wireless driver. */ #include @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include MODULE_DEPEND(ral, pci, 1, 1, 1); MODULE_DEPEND(ral, firmware, 1, 1, 1); @@ -74,6 +75,12 @@ static const struct ral_pci_ident ral_pci_ids[] = { 0x1814, 0x0301, "Ralink Technology RT2561S" }, { 0x1814, 0x0302, "Ralink Technology RT2561" }, { 0x1814, 0x0401, "Ralink Technology RT2661" }, + { 0x1814, 0x0601, "Ralink Technology RT2860 PCI" }, + { 0x1814, 0x0681, "Ralink Technology RT2860 PCIe" }, + { 0x1814, 0x0701, "Ralink Technology RT2870 PCI" }, + { 0x1814, 0x0781, "Ralink Technology RT2870 PCIe" }, + { 0x1814, 0x3060, "Ralink Technology RT3060 PCI" }, + { 0x1814, 0x3090, "Ralink Technology RT3090 PCIe" }, { 0, 0, NULL } }; @@ -101,12 +108,20 @@ static struct ral_opns { rt2661_suspend, rt2661_resume, rt2661_intr +}, ral_rt2860_opns = { + rt2860_attach, + rt2860_detach, + rt2860_shutdown, + rt2860_suspend, + rt2860_resume, + rt2860_intr }; struct ral_pci_softc { union { struct rt2560_softc sc_rt2560; struct rt2661_softc sc_rt2661; + struct rt2860_softc sc_rt2860; } u; struct ral_opns *sc_opns; @@ -180,8 +195,28 @@ ral_pci_attach(device_t dev) /* enable bus-mastering */ pci_enable_busmaster(dev); - psc->sc_opns = (pci_get_device(dev) == 0x0201) ? &ral_rt2560_opns : - &ral_rt2661_opns; + switch (pci_get_device(dev)) { + case 0x0201: + psc->sc_opns = &ral_rt2560_opns; + break; + case 0x0301: + case 0x0302: + case 0x0401: + psc->sc_opns = &ral_rt2661_opns; + break; + case 0x0601: + case 0x0681: + case 0x0701: + case 0x0781: + case 0x3060: + case 0x3090: + psc->sc_opns = &ral_rt2860_opns; + break; + default: + device_printf(dev, "ERROR: Unknown card 0x%04x\n", + pci_get_device(dev)); + return (ENXIO); + } psc->mem_rid = RAL_PCI_BAR0; psc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &psc->mem_rid, --Boundary-00=_ggroP1S39UUHyDC-- From owner-freebsd-current@FreeBSD.ORG Thu May 3 18:18:14 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E0E6106564A; Thu, 3 May 2012 18:18:14 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pz0-f49.google.com (mail-pz0-f49.google.com [209.85.210.49]) by mx1.freebsd.org (Postfix) with ESMTP id 3C3158FC08; Thu, 3 May 2012 18:18:14 +0000 (UTC) Received: by dadm1 with SMTP id m1so2156310dad.8 for ; Thu, 03 May 2012 11:18:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=YKr2oFQRGQPVSFyFIqfxB5af9PQEIpqJqdOpa2x2Zhk=; b=zQRivqR7HhgVYO5He7XhcOEjOtSd4/NmmgPRPWcLfbw3EMb90r/GeVt4kQUhqUQ4Bv Fcc29g8pkLeOsASOHAuuvwPFaUv4i6dH706KcKJ7p868y8viRJqQ0NWo9xcuHjPPUppP 9cQx+M4nnIX2Iso3Zkh+F66FsnvYWefr/C9QkAvCAD8vKAOfYeeP6qwjHmLSzb0wCbPA W5VZlyyltbsoqkAaNIx3QZWJuhOpNFWauKTSN/iONx3pDPOlq/QFNiaPcaye1Q1nMcC9 pO8nuqbFhemrAzO+MpwS/fTrorSOMBi46QnrAe5dVf4smnKJu5icBr/1+55kMrtbFAjK 9kQQ== MIME-Version: 1.0 Received: by 10.68.130.67 with SMTP id oc3mr10371720pbb.68.1336069093901; Thu, 03 May 2012 11:18:13 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.101.9 with HTTP; Thu, 3 May 2012 11:18:13 -0700 (PDT) In-Reply-To: <201205031853.53102.bschmidt@freebsd.org> References: <201205031853.53102.bschmidt@freebsd.org> Date: Thu, 3 May 2012 11:18:13 -0700 X-Google-Sender-Auth: jpgQmh-GQ3bx-v5gphI3ItfCs1E Message-ID: From: Adrian Chadd To: Bernhard Schmidt Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net@freebsd.org, freebsd-wireless@freebsd.org, freebsd-current@freebsd.org Subject: Re: [CFT] Ralink RT2860, RT2870, RT3060, RT3090 support X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 18:18:14 -0000 Hi, First off, let me say "thankyou" to you, ray@ and all the people who have chipped away at this little problem. I look very forward to having rt2xxx 802.11n support, as do many users on the forums. :) I haven't yet done a pass or two to see what the state of the locking/concurrency handling is. Don't let that stop you from committing it though, I'm sure we can find/fix whatever issues creep up post-commit. Thanks again! Adrian From owner-freebsd-current@FreeBSD.ORG Thu May 3 18:46:22 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11082106564A for ; Thu, 3 May 2012 18:46:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id D82958FC08 for ; Thu, 3 May 2012 18:46:21 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3A787B9AC; Thu, 3 May 2012 14:46:21 -0400 (EDT) From: John Baldwin To: Anton Shterenlikht Date: Thu, 3 May 2012 14:46:18 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <20120426224215.GA79891@mech-cluster241.men.bris.ac.uk> <20120501113526.GA4735@mech-cluster241.men.bris.ac.uk> <20120503153519.GA14465@mech-cluster241.men.bris.ac.uk> In-Reply-To: <20120503153519.GA14465@mech-cluster241.men.bris.ac.uk> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201205031446.18914.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 03 May 2012 14:46:21 -0400 (EDT) Cc: freebsd-current@freebsd.org Subject: Re: updating from r231158 to 234465: mounting from ufs:/dev/ad4s1a failed with error 19 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 18:46:22 -0000 On Thursday, May 03, 2012 11:35:19 am Anton Shterenlikht wrote: > On Tue, May 01, 2012 at 12:35:26PM +0100, Anton Shterenlikht wrote: > > On Mon, Apr 30, 2012 at 08:43:14AM -0400, John Baldwin wrote: > > > > > > > > I also see: > > > > > > > > ata0: stat0=0x00 err=0x01 lsb=0x14 msb=0exb > > > > ata0: stat1=0x00 err=0x00 lsb=0x00 msb=0x00 > > > > ata0: reset tp2 stat0=00 stat1=00 devices=0x10000 > > > > > > Hmmm, I don't know how to grok these lines, but does your disk work at all now > > > with any kernel? It may be that your disk has died (or a cable, etc.) and it > > > just happened to coincide with your upgrade? > > > > I reverted back to r231158, built world and generic > > kernel (minus all modules, i.e. "option MODULES_OVERRIDE="). > > This works, see the verbose boot dmesg at the end. > > > > I think I'll just do a binary search. > > I traced it to r233677. > The only change from 233676 to 233677 is > in /sys/dev/pci/pci.c > > My kernel is GENERIC with no modules > and with various bits removed, e.g. all raid devices > and PCI network devices, which I definitely > haven't got on this laptop. > > Below is the verbose boot with r233676. > Apparently at the beginning there's also > the previous unsuccessful boot with r233677. > Is this a new feature? I didn't know the > previous dmesg is preserved after a reboot. > Anyway, you can see clearly the error with r233677. > > I guess this is something to do with > ata -> ada change? I don't think so. Please try just this change: Index: pci.c =================================================================== --- pci.c (revision 234928) +++ pci.c (working copy) @@ -2822,10 +2822,14 @@ pci_add_map(device_t bus, device_t dev, int reg, s * from the parent. */ resource_list_delete(rl, type, reg); - } else { + start = 0; + device_printf(bus, + "pci%d:%d:%d:%d bar %#x failed to allocate", + pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), + pci_get_function(dev), reg); + } else start = rman_get_start(res); - pci_write_bar(dev, pm, start); - } + pci_write_bar(dev, pm, start); return (barlen); } -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Thu May 3 19:11:38 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D34AD1065687; Thu, 3 May 2012 19:11:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id A74488FC0C; Thu, 3 May 2012 19:11:38 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 26A0FB915; Thu, 3 May 2012 15:11:38 -0400 (EDT) From: John Baldwin To: Erik Cederstrand Date: Thu, 3 May 2012 14:47:00 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <20120426093548.GR2358@deviant.kiev.zoral.com.ua> <201205020756.47783.jhb@freebsd.org> <5140DD3A-63A1-42B0-A464-317E54C4185F@cederstrand.dk> In-Reply-To: <5140DD3A-63A1-42B0-A464-317E54C4185F@cederstrand.dk> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201205031447.00299.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 03 May 2012 15:11:38 -0400 (EDT) Cc: Gary Palmer , freebsd-current@freebsd.org Subject: Re: [RFC] Un-staticise the toolchain X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 19:11:38 -0000 On Thursday, May 03, 2012 5:18:15 am Erik Cederstrand wrote: > Den 02/05/2012 kl. 13.56 skrev John Baldwin: > >> > >> Static version: > >> * 0.09 ms spent execve'ing /usr/bin/make > >> * The rest is mostly sysctl calls > >> > >> Dynamic version: > >> * 0.09 ms spent execve'ing ./dynamicmake and /libexec/ld-elf.so.1 > >> * 0.18 ms spent loading libc.so.7 (incl. reading /etc/libmap.conf and /var/run/ld-elf.so.hints) > >> * 0.11 ms spent calling sysarch(0x81,0x7fffffffXXXX) (static version also does this but only uses 0.01 ms. No idea why) > >> * The rest is mostly sysctl and sigprocmask calls > > > > Keep in mind that the first time each system call is invoked, the runtime > > linker has to resolve the symbol. You can force the linker to do all > > that when the object is loaded instead by setting LD_BIND_NOW=yes in the > > environment of dynamicmake. If that makes the sysarch() call take 0.01 > > ms, then you know that the extra 0.10 ms is because of rtld doing the > > lookup of sysarch() on the first sysarch() call. > > Thanks for the suggestion. There is only a single sysarch() call in each version so I'm not sure that would help. Anyway, setting LD_BIND_NOW in the dynamic case just made the sysarch() call 0.20 ms slower without speeding up anything else. Hummm, that's odd that it was even slower. -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Thu May 3 20:00:05 2012 Return-Path: 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 E2445106564A for ; Thu, 3 May 2012 20:00:05 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id AD1FB8FC12 for ; Thu, 3 May 2012 20:00:05 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so3200599pbb.13 for ; Thu, 03 May 2012 13:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=r6qLBpBk7YeBaJgbcJhmTn0zu/ITc/6X6SXyGufNjjk=; b=W7jQ+6zqvP/Wepxnw2GgXCzCygkRymhdHWlcH++q6xggutWhcrmqnAy+hHPZD+IO/Y LOUtYP5qeicYmb8vxMjrP5yXJsFIha1Baft6tjBynnabGMKUlnjfa893VkrLxSJO+8KA LIns2kisBpW2xCqiAbA98A+ltdVoVBcGAwL/G3UTzxlnv8stbA5IxMDyehglXdvt1ZRU FPXPfAeP5dAU+6JlzgJ/OlnlfkCrheYHpaLK31tH4dgEU0EKSZh9bEfW7VhTaqox/cDQ cNOUjdQyCyGqUH0e0IcIrYnAKlYAIRvsPn/UQrrLOJ4KwTo153BffXg1UL0uHsnL2Qul MHMA== MIME-Version: 1.0 Received: by 10.68.202.167 with SMTP id kj7mr11095783pbc.9.1336075205555; Thu, 03 May 2012 13:00:05 -0700 (PDT) Received: by 10.68.2.74 with HTTP; Thu, 3 May 2012 13:00:05 -0700 (PDT) Date: Thu, 3 May 2012 13:00:05 -0700 Message-ID: From: Maksim Yevmenkin To: current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: [patch]: RFC changing order for khelp modules X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 20:00:06 -0000 hello, would anyone object to the following patch? == --- sys/module_khelp.h (revision 582) +++ sys/module_khelp.h (working copy) @@ -83,7 +83,7 @@ .priv = &kmd_##hname \ }; \ DECLARE_MODULE(hname, h_##hname, SI_SUB_PROTO_IFATTACHDOMAIN, \ - SI_ORDER_ANY); \ + SI_ORDER_MIDDLE); \ MODULE_VERSION(hname, version) #define KHELP_DECLARE_MOD_UMA(hname, hdata, hhooks, version, size, ctor, dtor) \ @@ -102,7 +102,7 @@ .priv = &kmd_##hname \ }; \ DECLARE_MODULE(hname, h_##hname, SI_SUB_PROTO_IFATTACHDOMAIN, \ - SI_ORDER_ANY); \ + SI_ORDER_MIDDLE); \ MODULE_VERSION(hname, version) == the issue i stumbled upon is that when i compile in all available tcp congestion control algorithms into the kernel (instead of using them as modules) a couple of those fail to initialize and register because they fail to find h_ertt khelp module (which is also complied in) thanks, max From owner-freebsd-current@FreeBSD.ORG Thu May 3 20:34:58 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB3D6106566B for ; Thu, 3 May 2012 20:34:58 +0000 (UTC) (envelope-from andy@neu.net) Received: from mail.neu.net (unknown [IPv6:2607:fc50:0:d300:216:3eff:fe54:f1c6]) by mx1.freebsd.org (Postfix) with ESMTP id 6AF1E8FC16 for ; Thu, 3 May 2012 20:34:58 +0000 (UTC) Received: from neu.net (neu.net [199.48.129.194]) by mail.neu.net (8.14.5/8.14.5) with ESMTP id q43KYoQ8020774 for ; Thu, 3 May 2012 16:34:56 -0400 (EDT) (envelope-from andy@neu.net) Date: Thu, 3 May 2012 16:34:50 -0400 (EDT) From: AN To: freebsd-current@freebsd.org In-Reply-To: <20120503120027.D14051065672@hub.freebsd.org> Message-ID: References: <20120503120027.D14051065672@hub.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Spam-Status: No, score=-0.0 required=5.0 tests=T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.neu.net Subject: make installworld fails X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 20:34:58 -0000 Thu May 3 16:25:27 EDT 2012 FreeBSD FBSD10 10.0-CURRENT FreeBSD 10.0-CURRENT #13 r234872: Tue May 1 13:09:55 EDT 2012 root@FBSD10:/usr/obj/usr/src/sys/MYKERNEL amd64 # svn up Updated to revision 234981 I did build world/kernel, after booting into single user mode and trying make installworld I get the following error: /usr/src/Makefile Line:219 check date and time I have seen this failure before, previously I was able to open the make file and comment out the date and time check, but this time the file seems corrupted, I am not able to open the file in vi. What causes this check to fail? Is there any way to detect this possibility before rebboting to single user? # cat /etc/make.conf OVERRIDE_LINUX_BASE_PORT=f10 QT4_OPTIONS= QGTKSTYLE WITH_OPENSSL_PORT=yes # added by use.perl 2012-04-04 01:11:13 PERL_VERSION=5.14.2 MALLOC_PRODUCTION=yes Using system compiler, _not_ Clang. From owner-freebsd-current@FreeBSD.ORG Thu May 3 23:44:33 2012 Return-Path: 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 BED69106566B for ; Thu, 3 May 2012 23:44:33 +0000 (UTC) (envelope-from areilly@bigpond.net.au) Received: from nschwmtas03p.mx.bigpond.com (nschwmtas03p.mx.bigpond.com [61.9.189.143]) by mx1.freebsd.org (Postfix) with ESMTP id 455D88FC08 for ; Thu, 3 May 2012 23:44:32 +0000 (UTC) Received: from nschwotgx04p.mx.bigpond.com ([124.188.162.192]) by nschwmtas03p.mx.bigpond.com with ESMTP id <20120503234425.CSGZ11739.nschwmtas03p.mx.bigpond.com@nschwotgx04p.mx.bigpond.com>; Thu, 3 May 2012 23:44:25 +0000 Received: from johnny.reilly.home ([124.188.162.192]) by nschwotgx04p.mx.bigpond.com with ESMTP id <20120503234425.PIO1687.nschwotgx04p.mx.bigpond.com@johnny.reilly.home>; Thu, 3 May 2012 23:44:25 +0000 Date: Fri, 4 May 2012 09:44:15 +1000 From: Andrew Reilly To: Luigi Rizzo Message-ID: <20120503234356.GD26284@johnny.reilly.home> References: <20120502182557.GA93838@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120502182557.GA93838@onelab2.iet.unipi.it> User-Agent: Mutt/1.4.2.3i X-SIH-MSG-ID: rBwwFtX4TAD0zmQs0WyzOwJxyArnqyN48Z4QX81loRIGTUDBp8DXQdrHK+ZRvN+vxC5PJhiGNGUkaa7hTY3Rs9uK Cc: current@freebsd.org, net@frebsd.org Subject: Re: fast bcopy... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 23:44:33 -0000 On Wed, May 02, 2012 at 08:25:57PM +0200, Luigi Rizzo wrote: > as part of my netmap investigations, i was looking at how > expensive are memory copies, and here are a couple of findings > (first one is obvious, the second one less so) Most C compilers (well, the ones I regularly use) inline small, constant-length memcpy operations of the sort you're describing here. I would expect techniques like that to beat any amount of hand-tuning in a elf-linkage bcopy subroutine. Sure, you want a good implementation for your variable-length copies, and data layout and alignment is tremendously important these days, so there's no single silver bullet here. Cheers, -- Andrew From owner-freebsd-current@FreeBSD.ORG Fri May 4 03:29:45 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A2F22106564A for ; Fri, 4 May 2012 03:29:45 +0000 (UTC) (envelope-from erichfreebsdlist@ovitrap.com) Received: from alogreentechnologies.com (alogreentechnologies.com [67.212.226.44]) by mx1.freebsd.org (Postfix) with ESMTP id 55F1C8FC0C for ; Fri, 4 May 2012 03:29:45 +0000 (UTC) Received: from amd620.ovitrap.com ([49.128.188.2]) (authenticated bits=0) by alogreentechnologies.com (8.13.1/8.13.1) with ESMTP id q443TT8q019824 for ; Thu, 3 May 2012 21:29:34 -0600 From: Erich Dollansky To: freebsd-current@freebsd.org Date: Fri, 4 May 2012 10:29:24 +0700 User-Agent: KMail/1.13.7 (FreeBSD/8.3-STABLE; KDE/4.7.4; amd64; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201205041029.24565.erichfreebsdlist@ovitrap.com> Subject: X220 and all.14.5.patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 03:29:45 -0000 Hi, I just applied this patch and tried to compile getting this error: /usr/src/sys/dev/drm/i915_mem.c:216: warning: no previous prototype for 'i915_mem_release' [-Wmissing-prototypes] /usr/src/sys/dev/drm/i915_mem.c:246: warning: no previous prototype for 'i915_mem_takedown' [-Wmissing-prototypes] /usr/src/sys/dev/drm/i915_mem.c: In function 'get_heap': /usr/src/sys/dev/drm/i915_mem.c:266: error: 'drm_i915_private_t' has no member named 'agp_heap' /usr/src/sys/dev/drm/i915_mem.c: At top level: /usr/src/sys/dev/drm/i915_mem.c:276: warning: no previous prototype for 'i915_mem_alloc' [-Wmissing-prototypes] /usr/src/sys/dev/drm/i915_mem.c:314: warning: no previous prototype for 'i915_mem_free' [-Wmissing-prototypes] /usr/src/sys/dev/drm/i915_mem.c:342: warning: no previous prototype for 'i915_mem_init_heap' [-Wmissing-prototypes] /usr/src/sys/dev/drm/i915_mem.c:366: warning: no previous prototype for 'i915_mem_destroy_heap' [-Wmissing-prototypes] *** [i915_mem.o] Error code 1 I found this: http://pastebin.com/ySPxJNUF and http://www.linux.org.ru/news/bsd/7658822/page6 which is a bit like Greek for me. It would be easy to fix the prototype errors. Does anybody know what agp_heap is all about? The machine: FreeBSD X220.ovitrap.com 10.0-CURRENT FreeBSD 10.0-CURRENT #4: Wed May 2 06:59:48 WIT 2012 erich@X220.ovitrap.com:/usr/obj/usr/src/sys/X220 amd64 Erich From owner-freebsd-current@FreeBSD.ORG Fri May 4 03:50:12 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7DFD1106564A for ; Fri, 4 May 2012 03:50:12 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id 57E078FC14 for ; Fri, 4 May 2012 03:50:12 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id q443o5Kt025803; Fri, 4 May 2012 03:50:05 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.143] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id p8fq3yrh2f69ctwaxeyprf7wa2; Fri, 04 May 2012 03:50:05 +0000 (UTC) (envelope-from tim@kientzle.com) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: Tim Kientzle In-Reply-To: Date: Thu, 3 May 2012 20:49:58 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20120503120027.D14051065672@hub.freebsd.org> To: AN X-Mailer: Apple Mail (2.1257) Cc: freebsd-current@freebsd.org Subject: Re: make installworld fails X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 03:50:12 -0000 On May 3, 2012, at 1:34 PM, AN wrote: > Thu May 3 16:25:27 EDT 2012 >=20 > FreeBSD FBSD10 10.0-CURRENT FreeBSD 10.0-CURRENT #13 r234872: Tue May = 1 13:09:55 EDT 2012 root@FBSD10:/usr/obj/usr/src/sys/MYKERNEL amd64 >=20 > # svn up > Updated to revision 234981 >=20 > I did build world/kernel, after booting into single user mode and = trying make installworld I get the following error: >=20 > /usr/src/Makefile Line:219 check date and time >=20 > I have seen this failure before, previously I was able to open the = make file and comment out the date and time check, but this time the = file seems corrupted, I am not able to open the file in vi. >=20 > What causes this check to fail? Is there any way to detect this = possibility before rebboting to single user? Try looking very critically at the system date and time: $ date This check is comparing the system time to the timestamps of the files on disks to try to detect whether your system clock is correct. Since the 'make' program relies on comparing timestamps, you can get very strange results if your system clock is not consistent. You can use the date utility to set the system clock to the approximately correct time (it doesn't need to be very exact). If you have networking, you can use "ntpdate pool.ntp.org" to set the clock from the network. Tim From owner-freebsd-current@FreeBSD.ORG Fri May 4 05:12:49 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ED665106566C for ; Fri, 4 May 2012 05:12:49 +0000 (UTC) (envelope-from tuchinsky@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id B325E8FC0C for ; Fri, 4 May 2012 05:12:49 +0000 (UTC) Received: by obcni5 with SMTP id ni5so4422551obc.13 for ; Thu, 03 May 2012 22:12:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=vXT97JbkWYnb8QGDGRzJ1L52JUn2YQV5OJVpCaHCPEE=; b=GUTT/U9QWkOgdnROc6TKWZ5LAOgY75INrrBBtyohixWY6BDqEFXMy+k8stsuRaKjng vbsHrPwz28kQ/o6HciQJlP0WUL1iBhBTmfGCeimjUTYCxj3jR0Eyqs/hryt3v7xYaA6E JwcunvCiv20/GQHApDVHsRtdphheCuGYmkb/0k1Y93gnQ1yt+6jehsPkPtRWVVjcPDVq urg0ynJjwgiGUwqOY/eIeVVnoRbsKcrKSf8mUwiDh3VoHULaMeU8sc8mCVk7oyd8OWpD CHVR57S5bHqJMkrthfnPGfKb1ck2iKy9q7jaGOz48QZRs1kf3W+BcSVAsppWoWpPS93m gEgA== MIME-Version: 1.0 Received: by 10.60.14.136 with SMTP id p8mr6391933oec.68.1336108369068; Thu, 03 May 2012 22:12:49 -0700 (PDT) Received: by 10.60.64.69 with HTTP; Thu, 3 May 2012 22:12:49 -0700 (PDT) In-Reply-To: <201205041029.24565.erichfreebsdlist@ovitrap.com> References: <201205041029.24565.erichfreebsdlist@ovitrap.com> Date: Fri, 4 May 2012 09:12:49 +0400 Message-ID: From: Artem Tuchinsky To: Erich Dollansky Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org Subject: Re: X220 and all.14.5.patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 05:12:50 -0000 it's russian, not greek :) and this is my posts. Try to remove /usr/src and checkout clean source before applying patch, it helped me. And check FAQ, paragraphs 7 and 8 - http://wiki.freebsd.org/Intel_GPU sorry for my bad english 2012/5/4 Erich Dollansky : > Hi, > > I just applied this patch and tried to compile getting this error: > > /usr/src/sys/dev/drm/i915_mem.c:216: warning: no previous prototype for '= i915_mem_release' [-Wmissing-prototypes] > /usr/src/sys/dev/drm/i915_mem.c:246: warning: no previous prototype for '= i915_mem_takedown' [-Wmissing-prototypes] > /usr/src/sys/dev/drm/i915_mem.c: In function 'get_heap': > /usr/src/sys/dev/drm/i915_mem.c:266: error: 'drm_i915_private_t' has no m= ember named 'agp_heap' > /usr/src/sys/dev/drm/i915_mem.c: At top level: > /usr/src/sys/dev/drm/i915_mem.c:276: warning: no previous prototype for '= i915_mem_alloc' [-Wmissing-prototypes] > /usr/src/sys/dev/drm/i915_mem.c:314: warning: no previous prototype for '= i915_mem_free' [-Wmissing-prototypes] > /usr/src/sys/dev/drm/i915_mem.c:342: warning: no previous prototype for '= i915_mem_init_heap' [-Wmissing-prototypes] > /usr/src/sys/dev/drm/i915_mem.c:366: warning: no previous prototype for '= i915_mem_destroy_heap' [-Wmissing-prototypes] > *** [i915_mem.o] Error code 1 > > I found this: > > http://pastebin.com/ySPxJNUF > > and > > http://www.linux.org.ru/news/bsd/7658822/page6 > > which is a bit like Greek for me. > > It would be easy to fix the prototype errors. Does anybody know what agp_= heap is all about? > > The machine: > > FreeBSD X220.ovitrap.com 10.0-CURRENT FreeBSD 10.0-CURRENT #4: Wed May = =C2=A02 06:59:48 WIT 2012 =C2=A0 =C2=A0 erich@X220.ovitrap.com:/usr/obj/usr= /src/sys/X220 =C2=A0amd64 > > Erich --=20 wBR, Tuchinsky Artem From owner-freebsd-current@FreeBSD.ORG Fri May 4 06:26:02 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4BB5B1065670 for ; Fri, 4 May 2012 06:26:02 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 0C1AE8FC12 for ; Fri, 4 May 2012 06:26:01 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 9742F7300A; Fri, 4 May 2012 08:45:48 +0200 (CEST) Date: Fri, 4 May 2012 08:45:48 +0200 From: Luigi Rizzo To: Andrew Reilly Message-ID: <20120504064548.GB12241@onelab2.iet.unipi.it> References: <20120502182557.GA93838@onelab2.iet.unipi.it> <20120503234356.GD26284@johnny.reilly.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120503234356.GD26284@johnny.reilly.home> User-Agent: Mutt/1.4.2.3i Cc: current@freebsd.org, net@frebsd.org Subject: Re: fast bcopy... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 06:26:02 -0000 On Fri, May 04, 2012 at 09:44:15AM +1000, Andrew Reilly wrote: > On Wed, May 02, 2012 at 08:25:57PM +0200, Luigi Rizzo wrote: > > as part of my netmap investigations, i was looking at how > > expensive are memory copies, and here are a couple of findings > > (first one is obvious, the second one less so) > > Most C compilers (well, the ones I regularly use) inline small, > constant-length memcpy operations of the sort you're describing > here. I would expect techniques like that to beat any amount of > hand-tuning in a elf-linkage bcopy subroutine. > > Sure, you want a good implementation for your variable-length > copies, and data layout and alignment is tremendously important > these days, so there's no single silver bullet here. The two things i was addressing on my message cannot be solved by a compiler: the memcpy/bcopy has variable length in the places i was looking at, and the compiler cannot infer that it is allowed to extend the copy to full words or cache lines instead of stopping at the exact boundary. I don't even dare anymore to hand-optimize code: too many times i have been beaten by the compiler. cheers luigi From owner-freebsd-current@FreeBSD.ORG Fri May 4 08:40:07 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F3EC41065670 for ; Fri, 4 May 2012 08:40:06 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id AAD398FC15 for ; Fri, 4 May 2012 08:40:06 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) for freebsd-current@freebsd.org with esmtp (envelope-from ) id <1SQE3U-0004cZ-H8>; Fri, 04 May 2012 10:40:00 +0200 Received: from munin.geoinf.fu-berlin.de ([130.133.86.110]) by inpost2.zedat.fu-berlin.de (Exim 4.69) for freebsd-current@freebsd.org with esmtpsa (envelope-from ) id <1SQE3U-0003jo-Dz>; Fri, 04 May 2012 10:40:00 +0200 Message-ID: <4FA395E8.9050606@zedat.fu-berlin.de> Date: Fri, 04 May 2012 10:40:08 +0200 From: "Hartmann, O." Organization: FU Berlin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120427 Thunderbird/12.0 MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Originating-IP: 130.133.86.110 Subject: OpenLDAP: core dump with latest CLANG buildworld. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 08:40:07 -0000 On all FreeBSD 10-CURRENt boxes, built with CLANG, there is no OpenLDAP anymore since yesterday's buildworld! OpenLDAP (slapd), the most recent build from the ports (recompiled everything in hope to fix the problem) coredumps immediately after it tries to start. Examination of the cause with slapd -d256 doesn't work. On those boxes working isn't possible at the moment, FreeBSD has still its trouble with no OpenLDAP present, even if nscd is configured for caching. It takes ages to login as root or those accounts supposed to be locally. Recompiling everything prerequisit for OpenLDAP/SASL revealed that even now databases/db5 isn't compiling with CLANG anymore (which has before the last LLVM update). What happened? Why is CLANG (3.1?) now so picky about some __atomic_... statements? Thanks for the help and patience, O. Hartmann From owner-freebsd-current@FreeBSD.ORG Fri May 4 08:49:05 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E732B106564A for ; Fri, 4 May 2012 08:49:05 +0000 (UTC) (envelope-from erichfreebsdlist@ovitrap.com) Received: from alogreentechnologies.com (alogreentechnologies.com [67.212.226.44]) by mx1.freebsd.org (Postfix) with ESMTP id BCD478FC0C for ; Fri, 4 May 2012 08:49:05 +0000 (UTC) Received: from amd620.ovitrap.com ([49.128.188.2]) (authenticated bits=0) by alogreentechnologies.com (8.13.1/8.13.1) with ESMTP id q448n1aR023419; Fri, 4 May 2012 02:49:03 -0600 From: Erich Dollansky To: Artem Tuchinsky Date: Fri, 4 May 2012 15:48:59 +0700 User-Agent: KMail/1.13.7 (FreeBSD/8.3-STABLE; KDE/4.7.4; amd64; ; ) References: <201205041029.24565.erichfreebsdlist@ovitrap.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201205041548.59645.erichfreebsdlist@ovitrap.com> Cc: freebsd-current@freebsd.org Subject: Re: X220 and all.14.5.patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 08:49:06 -0000 Hi. On Friday 04 May 2012 12:12:49 Artem Tuchinsky wrote: > it's russian, not greek :) and this is my posts. Try to remove I know. I am also a sky. > /usr/src and checkout clean source before applying patch, it helped I did this on a freshly installed machine. But I will do again. > me. And check FAQ, paragraphs 7 and 8 - > http://wiki.freebsd.org/Intel_GPU I did not do this. > > sorry for my bad english It is not so bad compared to some people from London. Erich > > 2012/5/4 Erich Dollansky : > > Hi, > > > > I just applied this patch and tried to compile getting this error: > > > > /usr/src/sys/dev/drm/i915_mem.c:216: warning: no previous prototype for 'i915_mem_release' [-Wmissing-prototypes] > > /usr/src/sys/dev/drm/i915_mem.c:246: warning: no previous prototype for 'i915_mem_takedown' [-Wmissing-prototypes] > > /usr/src/sys/dev/drm/i915_mem.c: In function 'get_heap': > > /usr/src/sys/dev/drm/i915_mem.c:266: error: 'drm_i915_private_t' has no member named 'agp_heap' > > /usr/src/sys/dev/drm/i915_mem.c: At top level: > > /usr/src/sys/dev/drm/i915_mem.c:276: warning: no previous prototype for 'i915_mem_alloc' [-Wmissing-prototypes] > > /usr/src/sys/dev/drm/i915_mem.c:314: warning: no previous prototype for 'i915_mem_free' [-Wmissing-prototypes] > > /usr/src/sys/dev/drm/i915_mem.c:342: warning: no previous prototype for 'i915_mem_init_heap' [-Wmissing-prototypes] > > /usr/src/sys/dev/drm/i915_mem.c:366: warning: no previous prototype for 'i915_mem_destroy_heap' [-Wmissing-prototypes] > > *** [i915_mem.o] Error code 1 > > > > I found this: > > > > http://pastebin.com/ySPxJNUF > > > > and > > > > http://www.linux.org.ru/news/bsd/7658822/page6 > > > > which is a bit like Greek for me. > > > > It would be easy to fix the prototype errors. Does anybody know what agp_heap is all about? > > > > The machine: > > > > FreeBSD X220.ovitrap.com 10.0-CURRENT FreeBSD 10.0-CURRENT #4: Wed May 2 06:59:48 WIT 2012 erich@X220.ovitrap.com:/usr/obj/usr/src/sys/X220 amd64 > > > > Erich > > > > -- > wBR, Tuchinsky Artem > > From owner-freebsd-current@FreeBSD.ORG Fri May 4 11:51:36 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 263CC106564A; Fri, 4 May 2012 11:51:36 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id CE0248FC14; Fri, 4 May 2012 11:51:35 +0000 (UTC) Received: from ncsd.bris.ac.uk ([137.222.10.59] helo=ncs.bris.ac.uk) by dirg.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1SQH2s-0004M5-7V; Fri, 04 May 2012 12:51:34 +0100 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncs.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1SQH2s-0000yV-0E; Fri, 04 May 2012 12:51:34 +0100 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5) with ESMTP id q44BpXbE029247; Fri, 4 May 2012 12:51:33 +0100 (BST) (envelope-from mexas@bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5/Submit) id q44BpXoY029246; Fri, 4 May 2012 12:51:33 +0100 (BST) (envelope-from mexas@bris.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bris.ac.uk using -f Date: Fri, 4 May 2012 12:51:33 +0100 From: Anton Shterenlikht To: John Baldwin Message-ID: <20120504115133.GA27547@mech-cluster241.men.bris.ac.uk> Mail-Followup-To: John Baldwin , Anton Shterenlikht , freebsd-current@freebsd.org References: <20120426224215.GA79891@mech-cluster241.men.bris.ac.uk> <20120501113526.GA4735@mech-cluster241.men.bris.ac.uk> <20120503153519.GA14465@mech-cluster241.men.bris.ac.uk> <201205031446.18914.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201205031446.18914.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@freebsd.org, Anton Shterenlikht Subject: Re: updating from r231158 to 234465: mounting from ufs:/dev/ad4s1a failed with error 19 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 11:51:36 -0000 On Thu, May 03, 2012 at 02:46:18PM -0400, John Baldwin wrote: > On Thursday, May 03, 2012 11:35:19 am Anton Shterenlikht wrote: > > On Tue, May 01, 2012 at 12:35:26PM +0100, Anton Shterenlikht wrote: > > > On Mon, Apr 30, 2012 at 08:43:14AM -0400, John Baldwin wrote: > > > > > > > > > > I also see: > > > > > > > > > > ata0: stat0=0x00 err=0x01 lsb=0x14 msb=0exb > > > > > ata0: stat1=0x00 err=0x00 lsb=0x00 msb=0x00 > > > > > ata0: reset tp2 stat0=00 stat1=00 devices=0x10000 > > > > > > > > Hmmm, I don't know how to grok these lines, but does your disk work at > all now > > > > with any kernel? It may be that your disk has died (or a cable, etc.) > and it > > > > just happened to coincide with your upgrade? > > > > > > I reverted back to r231158, built world and generic > > > kernel (minus all modules, i.e. "option MODULES_OVERRIDE="). > > > This works, see the verbose boot dmesg at the end. > > > > > > I think I'll just do a binary search. > > > > I traced it to r233677. > > The only change from 233676 to 233677 is > > in /sys/dev/pci/pci.c > > > > My kernel is GENERIC with no modules > > and with various bits removed, e.g. all raid devices > > and PCI network devices, which I definitely > > haven't got on this laptop. > > > > Below is the verbose boot with r233676. > > Apparently at the beginning there's also > > the previous unsuccessful boot with r233677. > > Is this a new feature? I didn't know the > > previous dmesg is preserved after a reboot. > > Anyway, you can see clearly the error with r233677. > > > > I guess this is something to do with > > ata -> ada change? > > I don't think so. > > Please try just this change: > > Index: pci.c > =================================================================== > --- pci.c (revision 234928) > +++ pci.c (working copy) > @@ -2822,10 +2822,14 @@ pci_add_map(device_t bus, device_t dev, int reg, s > * from the parent. > */ > resource_list_delete(rl, type, reg); > - } else { > + start = 0; > + device_printf(bus, > + "pci%d:%d:%d:%d bar %#x failed to allocate", > + pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), > + pci_get_function(dev), reg); > + } else > start = rman_get_start(res); > - pci_write_bar(dev, pm, start); > - } > + pci_write_bar(dev, pm, start); > return (barlen); > } > That helped, thank you. -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 From owner-freebsd-current@FreeBSD.ORG Fri May 4 12:15:10 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 854D51065674 for ; Fri, 4 May 2012 12:15:10 +0000 (UTC) (envelope-from erichfreebsdlist@ovitrap.com) Received: from alogreentechnologies.com (alogreentechnologies.com [67.212.226.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5808C8FC17 for ; Fri, 4 May 2012 12:15:10 +0000 (UTC) Received: from amd620.ovitrap.com ([49.128.188.2]) (authenticated bits=0) by alogreentechnologies.com (8.13.1/8.13.1) with ESMTP id q44CEsDQ002790; Fri, 4 May 2012 06:15:04 -0600 From: Erich Dollansky To: freebsd-current@freebsd.org Date: Fri, 4 May 2012 18:48:42 +0700 User-Agent: KMail/1.13.7 (FreeBSD/8.3-STABLE; KDE/4.7.4; amd64; ; ) References: <201205041029.24565.erichfreebsdlist@ovitrap.com> In-Reply-To: MIME-Version: 1.0 Message-Id: <201205041848.42577.erichfreebsdlist@ovitrap.com> Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Artem Tuchinsky Subject: Re: X220 and all.14.5.patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 12:15:10 -0000 Hi, one thing I noticed: How does your /etc/make.conf look like? Mine is here: # added by use.perl 2012-05-02 14:49:54 PERL_VERSION=5.12.4 WITH_NEW_XORG When I tried to compile the kernel of 9.0 or 10.0 on a plain 9.0 installation, I never succeeded. I got this machine usable only after I compiled its kernel on a 8.3 machine with an old configuration. Does this ring a bell for you> Erich On Friday 04 May 2012 12:12:49 Artem Tuchinsky wrote: > it's russian, not greek :) and this is my posts. Try to remove > /usr/src and checkout clean source before applying patch, it helped > me. And check FAQ, paragraphs 7 and 8 - > http://wiki.freebsd.org/Intel_GPU > > sorry for my bad english > > 2012/5/4 Erich Dollansky : > > Hi, > > > > I just applied this patch and tried to compile getting this error: > > > > /usr/src/sys/dev/drm/i915_mem.c:216: warning: no previous prototype for 'i915_mem_release' [-Wmissing-prototypes] > > /usr/src/sys/dev/drm/i915_mem.c:246: warning: no previous prototype for 'i915_mem_takedown' [-Wmissing-prototypes] > > /usr/src/sys/dev/drm/i915_mem.c: In function 'get_heap': > > /usr/src/sys/dev/drm/i915_mem.c:266: error: 'drm_i915_private_t' has no member named 'agp_heap' > > /usr/src/sys/dev/drm/i915_mem.c: At top level: > > /usr/src/sys/dev/drm/i915_mem.c:276: warning: no previous prototype for 'i915_mem_alloc' [-Wmissing-prototypes] > > /usr/src/sys/dev/drm/i915_mem.c:314: warning: no previous prototype for 'i915_mem_free' [-Wmissing-prototypes] > > /usr/src/sys/dev/drm/i915_mem.c:342: warning: no previous prototype for 'i915_mem_init_heap' [-Wmissing-prototypes] > > /usr/src/sys/dev/drm/i915_mem.c:366: warning: no previous prototype for 'i915_mem_destroy_heap' [-Wmissing-prototypes] > > *** [i915_mem.o] Error code 1 > > > > I found this: > > > > http://pastebin.com/ySPxJNUF > > > > and > > > > http://www.linux.org.ru/news/bsd/7658822/page6 > > > > which is a bit like Greek for me. > > > > It would be easy to fix the prototype errors. Does anybody know what agp_heap is all about? > > > > The machine: > > > > FreeBSD X220.ovitrap.com 10.0-CURRENT FreeBSD 10.0-CURRENT #4: Wed May 2 06:59:48 WIT 2012 erich@X220.ovitrap.com:/usr/obj/usr/src/sys/X220 amd64 > > > > Erich > > > > -- > wBR, Tuchinsky Artem > _______________________________________________ > 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-current@FreeBSD.ORG Fri May 4 15:15:45 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7F3D41065670 for ; Fri, 4 May 2012 15:15:45 +0000 (UTC) (envelope-from tuchinsky@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4365E8FC17 for ; Fri, 4 May 2012 15:15:45 +0000 (UTC) Received: by obcni5 with SMTP id ni5so5289179obc.13 for ; Fri, 04 May 2012 08:15:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fAtDo9NXMyDRzv6fj/WKAPKL+ZNMj2cC2Sgv1Zh26js=; b=PDVcGIO/dFw+vsTkgocr71CXpd7H6aEYF4NnyH2luA+8/1WBiOuokn84QA1MchWHzK vq40cHsjn5hV+dB+5ek7BOfXIVB5V89eOA4Dz10wAZS/gVUwRCu4O+1C76W5ZsxX5X2k jeM53bDhQWsrcVFrvXtZ64mc4vdWWj31AiZuPDfZ6obzwGKhv8TUtM0bY8vgN3VIrrx4 4Xh+RwW8+Srb5m54ELq/VQnxOtN/TolW0+X6TnufadhnKvC0kbYLdvuM5h5ozpOorDcS BH6Ods0iyH5Iwl759l9HpXj1HmcrqnixmwHnwgZ+uAIr1Yuz9+EbRkBlDt+1HieSMvW8 GSlw== MIME-Version: 1.0 Received: by 10.182.52.105 with SMTP id s9mr9020199obo.48.1336144544576; Fri, 04 May 2012 08:15:44 -0700 (PDT) Received: by 10.60.64.69 with HTTP; Fri, 4 May 2012 08:15:44 -0700 (PDT) In-Reply-To: <201205041848.42577.erichfreebsdlist@ovitrap.com> References: <201205041029.24565.erichfreebsdlist@ovitrap.com> <201205041848.42577.erichfreebsdlist@ovitrap.com> Date: Fri, 4 May 2012 19:15:44 +0400 Message-ID: From: Artem Tuchinsky To: Erich Dollansky Content-Type: text/plain; charset=UTF-8 Cc: freebsd-current@freebsd.org Subject: Re: X220 and all.14.5.patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 15:15:45 -0000 my make.conf: [(19:11)(100%)(0):~ ] cat /etc/make.conf | grep -v \# CPUTYPE?=pentium-m CFLAGS=-O2 -fno-strict-aliasing -pipe COPTFLAGS=-O2 -pipe DOC_LANG=en_US.ISO8859-1 ru_RU.KOI8-R WITH_LCD_FILTERING=yes WITHOUT_TTF_BYTECODE_ENABLED=false WITH_TTF_BYTECODE_ENABLED=true PERL_VERSION=5.12.4 QT4_OPTIONS += QGTKSTYLE FORCE_PKG_REGISTER=yes WITH_NEW_XORG=true WITH_KMS=true I use GENERIC kernel with minor changes 2012/5/4 Erich Dollansky : > Hi, > > one thing I noticed: How does your /etc/make.conf look like? > > Mine is here: > > # added by use.perl 2012-05-02 14:49:54 > PERL_VERSION=5.12.4 > WITH_NEW_XORG > > When I tried to compile the kernel of 9.0 or 10.0 on a plain 9.0 installation, I never succeeded. I got this machine usable only after I compiled its kernel on a 8.3 machine with an old configuration. > > Does this ring a bell for you> > > Erich -- wBR, Artem Tuchinsky From owner-freebsd-current@FreeBSD.ORG Fri May 4 15:35:00 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 085C9106566B for ; Fri, 4 May 2012 15:35:00 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id D01808FC15 for ; Fri, 4 May 2012 15:34:59 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4CE30B93B; Fri, 4 May 2012 11:34:59 -0400 (EDT) From: John Baldwin To: Anton Shterenlikht Date: Fri, 4 May 2012 11:07:59 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <20120426224215.GA79891@mech-cluster241.men.bris.ac.uk> <201205031446.18914.jhb@freebsd.org> <20120504115133.GA27547@mech-cluster241.men.bris.ac.uk> In-Reply-To: <20120504115133.GA27547@mech-cluster241.men.bris.ac.uk> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201205041108.00016.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 04 May 2012 11:34:59 -0400 (EDT) Cc: freebsd-current@freebsd.org Subject: Re: updating from r231158 to 234465: mounting from ufs:/dev/ad4s1a failed with error 19 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 15:35:00 -0000 On Friday, May 04, 2012 7:51:33 am Anton Shterenlikht wrote: > On Thu, May 03, 2012 at 02:46:18PM -0400, John Baldwin wrote: > > On Thursday, May 03, 2012 11:35:19 am Anton Shterenlikht wrote: > > > On Tue, May 01, 2012 at 12:35:26PM +0100, Anton Shterenlikht wrote: > > > > On Mon, Apr 30, 2012 at 08:43:14AM -0400, John Baldwin wrote: > > > > > > > > > > > > I also see: > > > > > > > > > > > > ata0: stat0=0x00 err=0x01 lsb=0x14 msb=0exb > > > > > > ata0: stat1=0x00 err=0x00 lsb=0x00 msb=0x00 > > > > > > ata0: reset tp2 stat0=00 stat1=00 devices=0x10000 > > > > > > > > > > Hmmm, I don't know how to grok these lines, but does your disk work at > > all now > > > > > with any kernel? It may be that your disk has died (or a cable, etc.) > > and it > > > > > just happened to coincide with your upgrade? > > > > > > > > I reverted back to r231158, built world and generic > > > > kernel (minus all modules, i.e. "option MODULES_OVERRIDE="). > > > > This works, see the verbose boot dmesg at the end. > > > > > > > > I think I'll just do a binary search. > > > > > > I traced it to r233677. > > > The only change from 233676 to 233677 is > > > in /sys/dev/pci/pci.c > > > > > > My kernel is GENERIC with no modules > > > and with various bits removed, e.g. all raid devices > > > and PCI network devices, which I definitely > > > haven't got on this laptop. > > > > > > Below is the verbose boot with r233676. > > > Apparently at the beginning there's also > > > the previous unsuccessful boot with r233677. > > > Is this a new feature? I didn't know the > > > previous dmesg is preserved after a reboot. > > > Anyway, you can see clearly the error with r233677. > > > > > > I guess this is something to do with > > > ata -> ada change? > > > > I don't think so. > > > > Please try just this change: > > > > Index: pci.c > > =================================================================== > > --- pci.c (revision 234928) > > +++ pci.c (working copy) > > @@ -2822,10 +2822,14 @@ pci_add_map(device_t bus, device_t dev, int reg, s > > * from the parent. > > */ > > resource_list_delete(rl, type, reg); > > - } else { > > + start = 0; > > + device_printf(bus, > > + "pci%d:%d:%d:%d bar %#x failed to allocate", > > + pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), > > + pci_get_function(dev), reg); > > + } else > > start = rman_get_start(res); > > - pci_write_bar(dev, pm, start); > > - } > > + pci_write_bar(dev, pm, start); > > return (barlen); > > } > > > > That helped, thank you. Bizarre, can you get a regular dmesg with that change applied? -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Fri May 4 17:19:46 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD878106566C for ; Fri, 4 May 2012 17:19:46 +0000 (UTC) (envelope-from outbackdingo@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6E6A38FC0C for ; Fri, 4 May 2012 17:19:46 +0000 (UTC) Received: by bkvi17 with SMTP id i17so3353109bkv.13 for ; Fri, 04 May 2012 10:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=4X8bbuktHzvH2dNA0YCJ7UieBl6ki4ZGghNBIv+dHPI=; b=QGno2GH9puUJU+IGjItClKNeyVC0HCxTcpXmlxuqq0W0mzUx/PpXrrm4c5ST31y7ni mWxe0AOB6OAMiagvsDLNexvSYMqx2QL7VJjVo74SjLBoSG/2Ow4JOuB8i1UWS6JdzF/n ptkeU9wLhwfe4gZ10JLyH+sIywp+HDUh4uiRzwISzTBPrC3rAmXimgP2ssTGxGD4jiry ATdwVwQ9eGDSPvfIseF4cOmYFlkz5EE8bcXz1v9BdhDncTh7uj8G5x1JkIkpVUswKd6o /kYRooTCQsp1L0gNYxO2A478Dc6T7N8d+gBWsSMeH7UW0eK/zwGyaGS5NFh/x7Bki1Mp fg4w== MIME-Version: 1.0 Received: by 10.204.133.200 with SMTP id g8mr2362316bkt.110.1336151985255; Fri, 04 May 2012 10:19:45 -0700 (PDT) Received: by 10.204.157.11 with HTTP; Fri, 4 May 2012 10:19:45 -0700 (PDT) Date: Fri, 4 May 2012 13:19:45 -0400 Message-ID: From: Outback Dingo To: freebsd-current Content-Type: text/plain; charset=ISO-8859-1 Subject: make kernel build fails X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 17:19:46 -0000 uname -a FreeBSD 10.0-CURRENT FreeBSD 10.0-CURRENT #4: Fri Apr 20 11:58:36 UTC 2012 root@:/usr/obj/usr/src/sys/GENERIC amd64 when trying a make kernel it errors out with : /usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/arena.h:650: Failed assertion: "((uintptr_t)ptr - ((uintptr_t)run + (uintptr_t)bin_info->reg0_offset)) % bin_info->reg_interval == 0" *** [kernel.debug] Signal 6 or uest.o scif_sas_task_request_state_handlers.o scif_sas_task_request_states.o scif_sas_timer.o syscons_isa.o vga_isa.o kern_clocksource.o link_elf_obj.o ia32_reg.o ia32_signal.o ia32_sigtramp.o ia32_syscall.o ia32_misc.o freebsd32_ioctl.o freebsd32_misc.o freebsd32_syscalls.o freebsd32_sysent.o ia32_sysvec.o imgact_elf32.o memmove.o memset.o x86bios.o x86emu.o OsdEnvironment.o acpi_apm.o madt.o srat.o powernow.o est.o hwpstate.o p4tcc.o atrtc.o clock.o isa.o isa_dma.o nmi.o orm.o pci_bus.o qpi.o busdma_machdep.o dump_machdep.o intr_machdep.o io_apic.o legacy.o local_apic.o mca.o msi.o nexus.o tsc.o config.o env.o hints.o vnode_if.o hack.So vers.o *** [kernel.debug] Signal 10 Stop in /usr/obj/usr/src/sys/GENERIC. *** [buildkernel] Error code 1 Stop in /usr/src. *** [buildkernel] Error code 1 Stop in /usr/src. From owner-freebsd-current@FreeBSD.ORG Fri May 4 20:07:29 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D21C11065672; Fri, 4 May 2012 20:07:27 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id 787FD8FC0C; Fri, 4 May 2012 20:07:27 +0000 (UTC) Received: from ncsc.bris.ac.uk ([137.222.10.41]) by dirg.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1SQOmk-0002aV-5F; Fri, 04 May 2012 21:07:26 +0100 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncsc.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1SQOmj-0002Bq-27; Fri, 04 May 2012 21:07:25 +0100 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5) with ESMTP id q44K7OOS030514; Fri, 4 May 2012 21:07:24 +0100 (BST) (envelope-from mexas@bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5/Submit) id q44K7OGw030513; Fri, 4 May 2012 21:07:24 +0100 (BST) (envelope-from mexas@bris.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bris.ac.uk using -f Date: Fri, 4 May 2012 21:07:24 +0100 From: Anton Shterenlikht To: John Baldwin Message-ID: <20120504200724.GA30502@mech-cluster241.men.bris.ac.uk> Mail-Followup-To: John Baldwin , Anton Shterenlikht , freebsd-current@freebsd.org References: <20120426224215.GA79891@mech-cluster241.men.bris.ac.uk> <201205031446.18914.jhb@freebsd.org> <20120504115133.GA27547@mech-cluster241.men.bris.ac.uk> <201205041108.00016.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201205041108.00016.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@freebsd.org, Anton Shterenlikht Subject: Re: updating from r231158 to 234465: mounting from ufs:/dev/ad4s1a failed with error 19 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 20:07:30 -0000 On Fri, May 04, 2012 at 11:07:59AM -0400, John Baldwin wrote: > On Friday, May 04, 2012 7:51:33 am Anton Shterenlikht wrote: > > On Thu, May 03, 2012 at 02:46:18PM -0400, John Baldwin wrote: > > > On Thursday, May 03, 2012 11:35:19 am Anton Shterenlikht wrote: > > > > On Tue, May 01, 2012 at 12:35:26PM +0100, Anton Shterenlikht wrote: > > > > > On Mon, Apr 30, 2012 at 08:43:14AM -0400, John Baldwin wrote: > > > > > > > > > > > > > > I also see: > > > > > > > > > > > > > > ata0: stat0=0x00 err=0x01 lsb=0x14 msb=0exb > > > > > > > ata0: stat1=0x00 err=0x00 lsb=0x00 msb=0x00 > > > > > > > ata0: reset tp2 stat0=00 stat1=00 devices=0x10000 > > > > > > > > > > > > Hmmm, I don't know how to grok these lines, but does your disk work > at > > > all now > > > > > > with any kernel? It may be that your disk has died (or a cable, > etc.) > > > and it > > > > > > just happened to coincide with your upgrade? > > > > > > > > > > I reverted back to r231158, built world and generic > > > > > kernel (minus all modules, i.e. "option MODULES_OVERRIDE="). > > > > > This works, see the verbose boot dmesg at the end. > > > > > > > > > > I think I'll just do a binary search. > > > > > > > > I traced it to r233677. > > > > The only change from 233676 to 233677 is > > > > in /sys/dev/pci/pci.c > > > > > > > > My kernel is GENERIC with no modules > > > > and with various bits removed, e.g. all raid devices > > > > and PCI network devices, which I definitely > > > > haven't got on this laptop. > > > > > > > > Below is the verbose boot with r233676. > > > > Apparently at the beginning there's also > > > > the previous unsuccessful boot with r233677. > > > > Is this a new feature? I didn't know the > > > > previous dmesg is preserved after a reboot. > > > > Anyway, you can see clearly the error with r233677. > > > > > > > > I guess this is something to do with > > > > ata -> ada change? > > > > > > I don't think so. > > > > > > Please try just this change: > > > > > > Index: pci.c > > > =================================================================== > > > --- pci.c (revision 234928) > > > +++ pci.c (working copy) > > > @@ -2822,10 +2822,14 @@ pci_add_map(device_t bus, device_t dev, int reg, s > > > * from the parent. > > > */ > > > resource_list_delete(rl, type, reg); > > > - } else { > > > + start = 0; > > > + device_printf(bus, > > > + "pci%d:%d:%d:%d bar %#x failed to allocate", > > > + pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), > > > + pci_get_function(dev), reg); > > > + } else > > > start = rman_get_start(res); > > > - pci_write_bar(dev, pm, start); > > > - } > > > + pci_write_bar(dev, pm, start); > > > return (barlen); > > > } > > > > > > > That helped, thank you. > > Bizarre, can you get a regular dmesg with that change applied? Copyright (c) 1992-2012 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 9.9-CURRENT #1 r234928M: Fri May 4 15:12:26 BST 2012 root@mech-aslap239.men.bris.ac.uk:/usr/obj/usr/src/sys/GEN4 amd64 WARNING: WITNESS option enabled, expect reduced performance. CPU: AMD Turion(tm) 64 X2 Mobile Technology TL-60 (1994.95-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0x60f82 Family = f Model = 68 Stepping = 2 Features=0x178bfbff Features2=0x2001 AMD Features=0xea500800 AMD Features2=0x11f real memory = 3221225472 (3072 MB) avail memory = 2954690560 (2817 MB) Event timer "LAPIC" quality 400 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs FreeBSD/SMP: 1 package(s) x 2 core(s) cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ACPI Error: 32/64X address mismatch in Pm2ControlBlock: 0x00008800/0x0000000000008100, using 32 (20120420/tbfadt-474) ioapic0: Changing APIC ID to 2 ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 ctl: CAM Target Layer loaded acpi0: on motherboard acpi0: Power Button (fixed) unknown: I/O range not supported acpi0: reservation of 0, 8000000 (3) failed acpi0: reservation of 100000, fff00000 (3) failed cpu0: on acpi0 cpu1: on acpi0 attimer0: port 0x40-0x43 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 atrtc0: port 0x70-0x71,0x72-0x73 irq 8 on acpi0 Event timer "RTC" frequency 32768 Hz quality 0 Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 acpi_timer0: <32-bit timer at 3.579545MHz> port 0x8008-0x800b on acpi0 acpi_ec0: port 0x62,0x66 on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pcib0: Length mismatch for 3 range: 11ff000 vs 11fefff pci0: on pcib0 pci0: pci0:0:20:2 bar 0x10 failed to allocatepcib1: at device 1.0 on pci0 pci1: on pcib1 vgapci0: port 0x4000-0x40ff mem 0xc0000000-0xc7ffffff,0xcc200000-0xcc20ffff,0xcc300000-0xcc3fffff irq 19 at device 5.0 on pci1 pcib2: at device 4.0 on pci0 pci16: on pcib2 bge0: mem 0xcc000000-0xcc00ffff irq 16 at device 0.0 on pci16 bge0: CHIP ID 0x0000c002; ASIC REV 0x0c; CHIP REV 0xc0; PCI-E miibus0: on bge0 brgphy0: PHY 1 on miibus0 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow bge0: Ethernet address: 00:1a:4b:89:4b:4e pcib3: at device 5.0 on pci0 pci32: on pcib3 ahci0: port 0x9000-0x9007,0x9008-0x900b,0x9010-0x9017,0x5018-0x501b,0x5020-0x502f mem 0xcc409000-0xcc4093ff irq 16 at device 18.0 on pci0 ahci0: AHCI v1.10 with 4 3Gbps ports, Port Multiplier not supported ahcich0: at channel 0 on ahci0 ohci0: mem 0xcc401000-0xcc401fff irq 23 at device 19.0 on pci0 usbus0 on ohci0 ohci1: mem 0xcc402000-0xcc402fff irq 17 at device 19.1 on pci0 usbus1 on ohci1 ohci2: mem 0xcc403000-0xcc403fff irq 17 at device 19.2 on pci0 usbus2 on ohci2 ohci3: mem 0xcc404000-0xcc404fff irq 17 at device 19.3 on pci0 usbus3 on ohci3 ohci4: mem 0xcc405000-0xcc405fff irq 17 at device 19.4 on pci0 usbus4 on ohci4 ehci0: mem 0xcc406000-0xcc4060ff irq 23 at device 19.5 on pci0 ehci0: AMD SB600/700 quirk applied usbus5: EHCI version 1.0 usbus5 on ehci0 pci0: at device 20.0 (no driver attached) atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x5040-0x504f irq 16 at device 20.1 on pci0 ata0: at channel 0 on atapci0 hdac0: irq 16 at device 20.2 on pci0 isab0: at device 20.3 on pci0 isa0: on isab0 pcib4: at device 20.4 on pci0 pcib4: failed to allocate initial memory window: 0xcc100000-0xcc1fffff pci2: on pcib4 pci2: pci0:2:4:0 bar 0x10 failed to allocatecbb0: irq 20 at device 4.0 on pci2 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 battery0: on acpi0 battery1: on acpi0 acpi_acad0: on acpi0 acpi_button0: on acpi0 acpi_lid0: on acpi0 acpi_tz0: on acpi0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model IntelliMouse, device ID 3 orm0: at iomem 0xd0000-0xd0fff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 acpi_throttle0: on cpu0 powernow0: on cpu0 acpi_throttle1: on cpu1 acpi_throttle1: failed to attach P_CNT device_attach: acpi_throttle1 attach returned 6 powernow1: on cpu1 Timecounters tick every 1.000 msec IP Filter: v4.1.28 initialized. Default = block all, Logging = enabled hdacc0: at cad 0 on hdac0 hdaa0: at nid 1 on hdacc0 pcm0: at nid 5,6 and 8,9 on hdaa0 hdacc1: at cad 1 on hdac0 unknown: at nid 1 on hdacc1 (no driver attached) usbus0: 12Mbps Full Speed USB v1.0 usbus1: 12Mbps Full Speed USB v1.0 usbus2: 12Mbps Full Speed USB v1.0 usbus3: 12Mbps Full Speed USB v1.0 usbus4: 12Mbps Full Speed USB v1.0 usbus5: 480Mbps High Speed USB v2.0 ugen0.1: at usbus0 uhub0: on usbus0 ugen1.1: at usbus1 uhub1: on usbus1 ugen2.1: at usbus2 uhub2: on usbus2 ugen3.1: at usbus3 uhub3: on usbus3 ugen4.1: at usbus4 uhub4: on usbus4 ugen5.1: at usbus5 uhub5: on usbus5 uhub0: 2 ports with 2 removable, self powered uhub1: 2 ports with 2 removable, self powered uhub2: 2 ports with 2 removable, self powered uhub3: 2 ports with 2 removable, self powered uhub4: 2 ports with 2 removable, self powered siba_bwn0: mem 0xcc502000-0xcc503fff irq 20 at device 0.0 on cardbus0 bwn0 on siba_bwn0 bwn0: WLAN (chipid 0x4318 rev 9) PHY (analog 3 type 2 rev 7) RADIO (manuf 0x17f ver 0x2050 rev 8) bwn0: DMA (32 bits) ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0: ATA-7 SATA 1.x device ada0: 150.000MB/s transfers (SATA 1.x, UDMA5, PIO 8192bytes) ada0: 152627MB (312581808 512 byte sectors: 16H 63S/T 16383C) ada0: Previously was known as ad4 cd0 at ata0 bus 0 scbus1 target 0 lun 0 cd0: Removable CD-ROM SCSI-0 device cd0: 16.700MB/s transfers (WDMA2, ATAPI 12bytes, PIO 65534bytes) cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed SMP: AP CPU #1 Launched! WARNING: WITNESS option enabled, expect reduced performance. Root mount waiting for: usbus5 uhub5: 10 ports with 10 removable, self powered Trying to mount root from ufs:/dev/ada0s1a [rw]... -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 From owner-freebsd-current@FreeBSD.ORG Fri May 4 21:10:18 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AC441065687 for ; Fri, 4 May 2012 21:10:18 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 40CE48FC0A for ; Fri, 4 May 2012 21:10:18 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:85c1:7fdb:634b:8c2e] (unknown [IPv6:2001:7b8:3a7:0:85c1:7fdb:634b:8c2e]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 7EE0E5C37; Fri, 4 May 2012 23:10:17 +0200 (CEST) Message-ID: <4FA445C4.7060709@andric.com> Date: Fri, 04 May 2012 23:10:28 +0200 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120425 Thunderbird/13.0 MIME-Version: 1.0 To: "Hartmann, O." References: <4FA395E8.9050606@zedat.fu-berlin.de> In-Reply-To: <4FA395E8.9050606@zedat.fu-berlin.de> X-Enigmail-Version: 1.5a1pre Content-Type: multipart/mixed; boundary="------------070304090707020206030608" Cc: freebsd-current@freebsd.org Subject: Re: OpenLDAP: core dump with latest CLANG buildworld. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 21:10:18 -0000 This is a multi-part message in MIME format. --------------070304090707020206030608 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 2012-05-04 10:40, Hartmann, O. wrote:> On all FreeBSD 10-CURRENt boxes, built with CLANG, there is no OpenLDAP > anymore since yesterday's buildworld! > OpenLDAP (slapd), the most recent build from the ports (recompiled > everything in hope to fix the problem) coredumps immediately after it > tries to start. Examination of the cause with slapd -d256 doesn't work. Which version of openldap did you use? I built openldap24-server with its default settings, and it starts up just fine. ... > Recompiling everything prerequisit for OpenLDAP/SASL revealed that even > now databases/db5 isn't compiling with CLANG anymore (which has before > the last LLVM update). > > What happened? Why is CLANG (3.1?) now so picky about some __atomic_... > statements? This is because bdb5 tries to redefine gcc's builtin atomic functions, which are also supported by clang (this is a feature :). It is rather dumb to use names starting with underscores for this, since they are reserved. The same problem occurs if you compile with gcc 4.7 or higher, albeit gcc apparently doesn't think this is serious enough to bail out: ./libtool --mode=compile /usr/local/bin/gcc47 -c -I. -I./../src -D_THREAD_SAFE -O2 -pipe -fno-strict-aliasing ../src/mutex/mut_tas.c libtool: compile: /usr/local/bin/gcc47 -c -I. -I./../src -D_THREAD_SAFE -O2 -pipe -fno-strict-aliasing ../src/mutex/mut_tas.c -fPIC -DPIC -o .libs/mut_tas.o In file included from ./../src/dbinc/mutex_int.h:12:0, from ./../src/dbinc/mutex.h:15, from ./db_int.h:1089, from ../src/mutex/mut_tas.c:11: ./../src/dbinc/atomic.h:179:19: warning: conflicting types for built-in function '__atomic_compare_exchange' [enabled by default] In any case, attached is a simple patch to fix the db5 port. --------------070304090707020206030608 Content-Type: text/x-diff; name="clangports-databases-db5-1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="clangports-databases-db5-1.diff" Index: databases/db5/files/patch-src_dbinc_atomic.h =================================================================== RCS file: databases/db5/files/patch-src_dbinc_atomic.h diff -N databases/db5/files/patch-src_dbinc_atomic.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ databases/db5/files/patch-src_dbinc_atomic.h 4 May 2012 21:07:42 -0000 @@ -0,0 +1,20 @@ +--- ../src/dbinc/atomic.h.orig 2012-02-29 19:48:38.000000000 +0100 ++++ ../src/dbinc/atomic.h 2012-05-04 22:39:32.000000000 +0200 +@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val; + #define atomic_inc(env, p) __atomic_inc(p) + #define atomic_dec(env, p) __atomic_dec(p) + #define atomic_compare_exchange(env, p, o, n) \ +- __atomic_compare_exchange((p), (o), (n)) ++ __atomic_compare_exchange_db((p), (o), (n)) + static inline int __atomic_inc(db_atomic_t *p) + { + int temp; +@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic + * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html + * which configure could be changed to use. + */ +-static inline int __atomic_compare_exchange( ++static inline int __atomic_compare_exchange_db( + db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval) + { + atomic_value_t was; --------------070304090707020206030608-- From owner-freebsd-current@FreeBSD.ORG Fri May 4 21:27:13 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 606241065670 for ; Fri, 4 May 2012 21:27:13 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id 177698FC14 for ; Fri, 4 May 2012 21:27:13 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) for freebsd-current@freebsd.org with esmtp (envelope-from ) id <1SQQ1w-0001sN-2K>; Fri, 04 May 2012 23:27:12 +0200 Received: from e178032166.adsl.alicedsl.de ([85.178.32.166] helo=munin.geoinf.fu-berlin.de) by inpost2.zedat.fu-berlin.de (Exim 4.69) for freebsd-current@freebsd.org with esmtpsa (envelope-from ) id <1SQQ1v-0006EM-Ua>; Fri, 04 May 2012 23:27:12 +0200 Message-ID: <4FA449AE.3050300@zedat.fu-berlin.de> Date: Fri, 04 May 2012 23:27:10 +0200 From: "Hartmann, O." Organization: FU Berlin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120504 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-current@freebsd.org References: <4FA395E8.9050606@zedat.fu-berlin.de> <4FA445C4.7060709@andric.com> In-Reply-To: <4FA445C4.7060709@andric.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Originating-IP: 85.178.32.166 Subject: Re: OpenLDAP: core dump with latest CLANG buildworld. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 21:27:13 -0000 On 05/04/12 23:10, Dimitry Andric wrote: > On 2012-05-04 10:40, Hartmann, O. wrote:> On all FreeBSD 10-CURRENt boxes, built with CLANG, there is no OpenLDAP >> anymore since yesterday's buildworld! >> OpenLDAP (slapd), the most recent build from the ports (recompiled >> everything in hope to fix the problem) coredumps immediately after it >> tries to start. Examination of the cause with slapd -d256 doesn't work. > > Which version of openldap did you use? I built openldap24-server with > its default settings, and it starts up just fine. Hello Dimitry. On all boxes in question (FreeBSD 10.0-CURRENT/amd64) I have running the most recent OpenLDAP (with SASL) 2.4.31 (portsnap on daily basis). Database backend is databases/db5. As I reported, compiled with legacy gcc 4.2.1 it starts up fine, too. But it is worthless since whenever a connection (via TLS) is made to the server (slapd), slapd crashes. I worked yesterday with both boxes and the very same environment (OpenLDAP/SASL 2.4.31, DB5) and rebuild world this morning which made the server going rogue ... Have you tried creating a LDAP DIT with some users? Have you compiled OpenLDAP with gcc or clang? As said, with clang compiled, it crashes when being started. I also recompiled net/openldap-sasl-server and -client via "portmaster -f openldap". It doesn't change much. My configuration uses TLS for secure server communication - I will mention this just in case the OpenSSL commits of yesterday do have an influence. > > > ... >> Recompiling everything prerequisit for OpenLDAP/SASL revealed that even >> now databases/db5 isn't compiling with CLANG anymore (which has before >> the last LLVM update). >> >> What happened? Why is CLANG (3.1?) now so picky about some __atomic_... >> statements? > > This is because bdb5 tries to redefine gcc's builtin atomic functions, > which are also supported by clang (this is a feature :). It is rather > dumb to use names starting with underscores for this, since they are > reserved. > > The same problem occurs if you compile with gcc 4.7 or higher, albeit > gcc apparently doesn't think this is serious enough to bail out: > > ./libtool --mode=compile /usr/local/bin/gcc47 -c -I. -I./../src -D_THREAD_SAFE -O2 -pipe -fno-strict-aliasing ../src/mutex/mut_tas.c > libtool: compile: /usr/local/bin/gcc47 -c -I. -I./../src -D_THREAD_SAFE -O2 -pipe -fno-strict-aliasing ../src/mutex/mut_tas.c -fPIC -DPIC -o .libs/mut_tas.o > In file included from ./../src/dbinc/mutex_int.h:12:0, > from ./../src/dbinc/mutex.h:15, > from ./db_int.h:1089, > from ../src/mutex/mut_tas.c:11: > ./../src/dbinc/atomic.h:179:19: warning: conflicting types for built-in function '__atomic_compare_exchange' [enabled by default] > > In any case, attached is a simple patch to fix the db5 port. Well, LLVM/CLANG 3.0 wasn't so picky about this redefinition, 3.1 is obviously. I never tried gcc 4.7, I should do next time. I will apply the patch. Thanks for it. Does the patch go into databases/db5? From owner-freebsd-current@FreeBSD.ORG Fri May 4 21:29:52 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 299551065674; Fri, 4 May 2012 21:29:52 +0000 (UTC) (envelope-from sendtomatt@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id DD9A58FC0C; Fri, 4 May 2012 21:29:51 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so4749742pbb.13 for ; Fri, 04 May 2012 14:29:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=39bz7u/EaZY5aZzhcrKE5iFs79twB8L5UqFkG47cqco=; b=FT0f2akT8+HkftzHfikTBt7nLdGW+SY0i1YTSQtGouC9G2oXVTg4VcGmlyRO2dw8/h G3r4xtWcGTtlp+0BcfE4fc3zh81vtjxHfjlx9QXBFrEW+1sVc/OtwoQ0R9ROiesCjGZA I0EcTbCCTCU+j2Mq6RDeboOj/Qbk+Fk95mMqM0p3pBASSgnyfl84I7LjxHH+BS4e5KVF Wcp9txkxRKSA8cGrW/IEBlnIGJb3dteF8nk6/b3p0Z/DmoSWxY8ECF7MFVN52bXNjN8K qobYKMtsLFUKhczLmspWAChscMWxBPwD9n5uhwIYz0H/hQy1eU8sJgxhFzDGIMtRuKww 5njg== Received: by 10.68.224.167 with SMTP id rd7mr22521981pbc.129.1336166991577; Fri, 04 May 2012 14:29:51 -0700 (PDT) Received: from flatline.local (70-36-223-239.dsl.dynamic.sonic.net. [70.36.223.239]) by mx.google.com with ESMTPS id y5sm9697853pbk.5.2012.05.04.14.29.48 (version=SSLv3 cipher=OTHER); Fri, 04 May 2012 14:29:49 -0700 (PDT) Message-ID: <4FA44A3C.6080801@gmail.com> Date: Fri, 04 May 2012 14:29:32 -0700 From: matt User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:11.0) Gecko/20120422 Thunderbird/11.0.1 MIME-Version: 1.0 To: Ganael LAPLANCHE References: <4E836C06.9070405@gmail.com> <4E8374A7.90105@gmail.com> <4E9BDF13.4040006@gmail.com> <4F38211D.4070305@mehnert.org> <4F40A2D4.6000000@gmail.com> <4F57A8FC.8090106@gmail.com> <20120308092234.M18590@martymac.org> <4F5AC96A.3050600@gmail.com> <4F5FE9C1.7010901@gmail.com> <4F6020C0.60405@gmail.com> <4F60E258.6030606@gmail.com> <20120319131812.M90515@martymac.org> <4F6782F1.9000909@gmail.com> <20120430115203.M31160@FreeBSD.org> In-Reply-To: <20120430115203.M31160@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Vrachnis Ilias-Dimitrios , freebsd-current@freebsd.org Subject: Re: x220 notes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 21:29:52 -0000 On 04/30/12 04:54, Ganael LAPLANCHE wrote: > On Mon, 19 Mar 2012 12:03:13 -0700, matt wrote > > Hi Matt, > >> I'll have to try again without the patch to see if it's >> Xorg/KMS or FreeBSD base that has changed. > FYI, I've just tried suspend/resume with all.14.5.patch and sources from > 2012/04/28, but I still get a black screen on resume :/ > > Best regards, > > -- > Ganael LAPLANCHE > http://www.martymac.org | http://contribs.martymac.org > FreeBSD: martymac, http://www.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" > Try setting hw.pci.do_power_resume=0 and hw.pci.do_power_suspend=0 in sysctl.conf If that doesn't work for you try setting each to one separately, and together if all fails. Also try setting resume beep and see whether it's getting that far (debug.acpi.resume_beep=1). When mine failed I would get a beep, but it would hang during the beep, making a warbling/modem type sound. The pci options plus a custom kernel conf seemed to fix it, but I am not near that machine right now...I think the pci options were all that were needed, but it may have been the kernel conf as well. I haven't tried the very latest current either, as I filled up my 4g USB...I need to wipe it out and start again, it's not a good environment for buildworld. Sorry for the late response! Matt From owner-freebsd-current@FreeBSD.ORG Fri May 4 21:32:45 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3E79F1065675; Fri, 4 May 2012 21:32:45 +0000 (UTC) (envelope-from sendtomatt@gmail.com) Received: from mail-pz0-f48.google.com (mail-pz0-f48.google.com [209.85.210.48]) by mx1.freebsd.org (Postfix) with ESMTP id E6A548FC1F; Fri, 4 May 2012 21:32:44 +0000 (UTC) Received: by dadz8 with SMTP id z8so507011dad.7 for ; Fri, 04 May 2012 14:32:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=zggD3QEw5AqCQByY3MCF5NGF1g2mcoBnbpOX7UYmhuQ=; b=muehpCr+5fr4zzwWVAoblxruzmjfPpxAy9hytAQy9ePH28mdEka/bTX8RNUQc5FbQ5 99MODjb31PRrIQOfxgOZy5wPopgp3qB4LhYwhrcvig3SnsOOz80DmP0XVnDTltj6qI3V GL+9Eucjpc3gVYVVugYFBN8yWovttxebwV6Cpp4QAzKtuH0BRqWG9TjkR/hwcZ3cZPYo wwUbxWm7FyqOvrWb2mlk+Gy1nwwtLiTH8V/wud8VvlNhJGoUsE/UQHi1GMFoHt07muwn cBP+i9Fl6mdB2Fl/R5q6Ba/YXEbQsa/sp8cereg9Y64FWkiXV6WPnS7S2O1PVLFeUmUD rrSw== Received: by 10.68.129.98 with SMTP id nv2mr22402036pbb.140.1336167164766; Fri, 04 May 2012 14:32:44 -0700 (PDT) Received: from flatline.local (70-36-223-239.dsl.dynamic.sonic.net. [70.36.223.239]) by mx.google.com with ESMTPS id vl10sm9704488pbc.37.2012.05.04.14.32.42 (version=SSLv3 cipher=OTHER); Fri, 04 May 2012 14:32:43 -0700 (PDT) Message-ID: <4FA44AEB.4050704@gmail.com> Date: Fri, 04 May 2012 14:32:27 -0700 From: matt User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:11.0) Gecko/20120422 Thunderbird/11.0.1 MIME-Version: 1.0 To: Adrian Chadd References: <201205031853.53102.bschmidt@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, freebsd-wireless@freebsd.org, freebsd-current@freebsd.org, Bernhard Schmidt Subject: Re: [CFT] Ralink RT2860, RT2870, RT3060, RT3090 support X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 21:32:45 -0000 On 05/03/12 11:18, Adrian Chadd wrote: > Hi, > > First off, let me say "thankyou" to you, ray@ and all the people who > have chipped away at this little problem. I look very forward to > having rt2xxx 802.11n support, as do many users on the forums. :) > > I haven't yet done a pass or two to see what the state of the > locking/concurrency handling is. Don't let that stop you from > committing it though, I'm sure we can find/fix whatever issues creep > up post-commit. > > Thanks again! > > > > Adrian > _______________________________________________ > 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" > Thanks Bernhard! I'm sure there are many people with this chipset that are going to be very happy. It's good that we have something homegrown as well. I'll try to test it this weekend on my rt3090. Matt From owner-freebsd-current@FreeBSD.ORG Fri May 4 21:41:08 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3E610106566B for ; Fri, 4 May 2012 21:41:08 +0000 (UTC) (envelope-from sendtomatt@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0D6168FC15 for ; Fri, 4 May 2012 21:41:08 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so4759085pbb.13 for ; Fri, 04 May 2012 14:41:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=F6vzW+ruhDzgoJpCIO6fjMRrMAS0ufzWFATpmQnGr1E=; b=sVuf+NMdo1r/8oRYztY9mVh+pbiWo30nzvVFsMBAlaor4V0H/oF0G2gqrUHnPUBXHa stHQLgYRwCsK/Y0kN7sc0JWbrAysZQzDcqdQ69LMG5XonJKcFTHd7WQUOOSpdkaRpIns I8g3z+OIUkuqCCcJ0IP7vwyc7ADXosEfslFFc93B3xZDjodfQtr5f9bn+gnslpiE721E KxenjDgFgwZ+rqWJled5EB63YmkfcP9C0emM7IYtkUe5mUkc91k3TJaeybgSlhH5Nv2M 2xPACH/2++/J0hKPcY5otGBMkpA3Zc5VVrttLBTN1ZnVjrcfQRF5DiweIU4KGqcCuoip 9pNg== Received: by 10.68.225.170 with SMTP id rl10mr23025149pbc.76.1336167667813; Fri, 04 May 2012 14:41:07 -0700 (PDT) Received: from flatline.local (70-36-223-239.dsl.dynamic.sonic.net. [70.36.223.239]) by mx.google.com with ESMTPS id qb2sm3377255pbb.54.2012.05.04.14.41.05 (version=SSLv3 cipher=OTHER); Fri, 04 May 2012 14:41:06 -0700 (PDT) Message-ID: <4FA44CE2.3070005@gmail.com> Date: Fri, 04 May 2012 14:40:50 -0700 From: matt User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:11.0) Gecko/20120422 Thunderbird/11.0.1 MIME-Version: 1.0 To: Artem Tuchinsky References: <201205041029.24565.erichfreebsdlist@ovitrap.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Erich Dollansky , freebsd-current@freebsd.org Subject: Re: X220 and all.14.5.patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 21:41:08 -0000 On 05/03/12 22:12, Artem Tuchinsky wrote: > it's russian, not greek :) and this is my posts. Try to remove > /usr/src and checkout clean source before applying patch, it helped > me. And check FAQ, paragraphs 7 and 8 - > http://wiki.freebsd.org/Intel_GPU > > sorry for my bad english > > 2012/5/4 Erich Dollansky: >> Hi, >> >> I just applied this patch and tried to compile getting this error: >> >> /usr/src/sys/dev/drm/i915_mem.c:216: warning: no previous prototype for 'i915_mem_release' [-Wmissing-prototypes] >> /usr/src/sys/dev/drm/i915_mem.c:246: warning: no previous prototype for 'i915_mem_takedown' [-Wmissing-prototypes] >> /usr/src/sys/dev/drm/i915_mem.c: In function 'get_heap': >> /usr/src/sys/dev/drm/i915_mem.c:266: error: 'drm_i915_private_t' has no member named 'agp_heap' >> /usr/src/sys/dev/drm/i915_mem.c: At top level: >> /usr/src/sys/dev/drm/i915_mem.c:276: warning: no previous prototype for 'i915_mem_alloc' [-Wmissing-prototypes] >> /usr/src/sys/dev/drm/i915_mem.c:314: warning: no previous prototype for 'i915_mem_free' [-Wmissing-prototypes] >> /usr/src/sys/dev/drm/i915_mem.c:342: warning: no previous prototype for 'i915_mem_init_heap' [-Wmissing-prototypes] >> /usr/src/sys/dev/drm/i915_mem.c:366: warning: no previous prototype for 'i915_mem_destroy_heap' [-Wmissing-prototypes] >> *** [i915_mem.o] Error code 1 >> >> I found this: >> >> http://pastebin.com/ySPxJNUF >> >> and >> >> http://www.linux.org.ru/news/bsd/7658822/page6 >> >> which is a bit like Greek for me. >> >> It would be easy to fix the prototype errors. Does anybody know what agp_heap is all about? >> >> The machine: >> >> FreeBSD X220.ovitrap.com 10.0-CURRENT FreeBSD 10.0-CURRENT #4: Wed May 2 06:59:48 WIT 2012 erich@X220.ovitrap.com:/usr/obj/usr/src/sys/X220 amd64 >> >> Erich > > Is it possibly that the patch got applied twice? I had some errors a while back that were resulting from an inconsistent mixture of pre-patch, post-patch and double patched files...I deleted /usr/src and followed the patching instructions after doing a fresh csup. There is also (or was) some sed command that fixes some issues in the files that must not be skipped due to cvs tags. Don't forget to rm /usr/obj. Matt From owner-freebsd-current@FreeBSD.ORG Sat May 5 07:52:25 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE55D1065670; Sat, 5 May 2012 07:52:25 +0000 (UTC) (envelope-from sergey.dyatko@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id B319E8FC19; Sat, 5 May 2012 07:52:24 +0000 (UTC) Received: by lagv3 with SMTP id v3so3420193lag.13 for ; Sat, 05 May 2012 00:52:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; bh=qxzOG88O09Rw0uIYmbe6GAC9o/g+baizR/erIdU0Dhg=; b=Ivz0Oy59KtB/6WhDowUHOB9hMzjBByf1/c0MHUaOLrwJkVXNnNI/mImjYsy0XBFySx VXaUVux+/SxU+j3Qkh9RzSXSxdKl6+4hcvLBpVrSo0hBsXnSs1BTR+7onDa4iErsxkQx 0CF7xv8Gf2vSHbK+N2KDIQz5opZ5UUXoVrwilLlO4wBbfDQ6vWD3MdHE6PCA0SUn3IkW iiTU6ZDYfAWUAsjgqGPqD0h6itmX+wpkTWpINbhv59ynHXBCNqK/T+gqK8iSnYDR24Jd E85B/9PPYFs2Zn73Hfot8E2rUsuaDfGoYbPgU8B98yjgWw0lHvl5EuOrW2SKCVhnv39U 4ZCw== Received: by 10.152.130.138 with SMTP id oe10mr1291853lab.5.1336204343379; Sat, 05 May 2012 00:52:23 -0700 (PDT) Received: from laptop (m-s.agava.net. [195.222.84.203]) by mx.google.com with ESMTPS id pv14sm11607341lab.2.2012.05.05.00.52.20 (version=SSLv3 cipher=OTHER); Sat, 05 May 2012 00:52:21 -0700 (PDT) Date: Sat, 5 May 2012 10:52:58 +0300 From: "Sergey V. Dyatko" To: Bernhard Schmidt Message-ID: <20120505105258.28e28803@laptop> In-Reply-To: <201205031853.53102.bschmidt@freebsd.org> References: <201205031853.53102.bschmidt@freebsd.org> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, freebsd-wireless@freebsd.org, freebsd-current@freebsd.org Subject: Re: [CFT] Ralink RT2860, RT2870, RT3060, RT3090 support X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 07:52:25 -0000 On Thu, 3 May 2012 18:53:52 +0200 Bernhard Schmidt wrote: > Hi folks, > > As some of you might know there has been some work going on porting > support for new Ralink chipsets from OpenBSD. Several different > drivers where floating around but nothing seemed to be decent enough > to be committed. ray@ and I had been working on cleaning up one of > those to get it into a good enough shape, but abandoned this approach > as it resulted in more work than starting from scratch. > > So, attached diff [1] is a from-scratch effort to port over support > for the new chipsets. It doesn't contain fancy stuff like 802.11n > support as of yet (this will be worked one once the legacy stuff is > in HEAD), nonetheless it showed pretty decent performance during the > basic sta/adhoc/hostap tests I've done. > > I'd appreciate testing and feedback ;) > at 1st I would say 'Thank You' for all people who working on this :) patch, make, make install, kldload: http://tiger.ipfw.ru/files/rt2860_3090.txt this is FreeBSD 10.0-CURRENT, r234992M: Fri May 4 11:25:53 FET 2012 from time to time on messages: May 5 10:32:47 laptop kernel: ral0: device timeout May 5 10:37:49 laptop kernel: ral0: device timeout May 5 10:42:50 laptop kernel: ral0: device timeout LED... is just glowing, rarely blinks. With patch from Alexander (ray@) it doesn't work [tiger@laptop]~%scp tiger:/storage/FreeBSD-8.2-RELEASE-amd64-dvd1.iso . FreeBSD-8.2-RELEASE-amd64-dvd1.iso 11% 271MB 1.9MB/s 18:19 ETA ^C Killed by signal 2. where 'tiger' is my desktop > The diff requires HEAD due to the firmware being available only there, > though, if there are enough requests, I might consider looking into > getting it merged to 9. (Simply pulling sys/modules/ralfw/ and > sys/contrib/dev/ral/ from HEAD might be enough I guess.) > > [1] http://techwires.net/~bschmidt/rt2860.diff > -- wbr, tiger From owner-freebsd-current@FreeBSD.ORG Sat May 5 08:24:23 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E31111065670 for ; Sat, 5 May 2012 08:24:22 +0000 (UTC) (envelope-from bschmidt@techwires.net) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 6D4E18FC16 for ; Sat, 5 May 2012 08:24:22 +0000 (UTC) Received: by wgbds11 with SMTP id ds11so70444wgb.31 for ; Sat, 05 May 2012 01:24:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id :x-gm-message-state; bh=7zI+MozWr2PwNC6S/D+rWBKo3+Vgtldt8Dyl8hUleGY=; b=N6RpnuIB3wY+e4VeW4GlBIjhWaLY/QsZsdeNaM06mXTo+EZc/Q8hfeZ4+ykn5gCkrl gtitOjSNVFF66W5ZkJrE30O9uD/7NF06RJVML1JeD1vkSJAN4rSotMa0rcqE6umyiLqd tJp39p81qsuKWyzOy83jNhaGj/3xJihuifLyyLsgtaQXBzQGul9RSKBPcPuDpQusjeZB rYCW5N+ShVaAGv1AeVl9TIJzZbww2hVPGSbFFwnG8YLlc1yY96UGFm8tsQp2/97QOI7p gfcF2bhs4Wj953byamHsadvUqfWu34QB7Vo4hbGNhd+JVjLVFgC2pLzDnrHxbY9Qq6zA wV8g== Received: by 10.180.83.198 with SMTP id s6mr19630574wiy.8.1336206261373; Sat, 05 May 2012 01:24:21 -0700 (PDT) Received: from amy.lab.techwires.net (dslb-088-067-196-237.pools.arcor-ip.net. [88.67.196.237]) by mx.google.com with ESMTPS id ca3sm3711961wib.6.2012.05.05.01.24.17 (version=SSLv3 cipher=OTHER); Sat, 05 May 2012 01:24:20 -0700 (PDT) Sender: Bernhard Schmidt From: Bernhard Schmidt To: "Sergey V. Dyatko" Date: Sat, 5 May 2012 10:24:40 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.0-STABLE; KDE/4.7.4; amd64; ; ) References: <201205031853.53102.bschmidt@freebsd.org> <20120505105258.28e28803@laptop> In-Reply-To: <20120505105258.28e28803@laptop> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201205051024.40771.bschmidt@freebsd.org> X-Gm-Message-State: ALoCoQnKbDKEbED8W6noiXnRV+k+/Hs+4U1CpBVhIjwTtlsBkFENF+UfsfQuElpN6gRRfsUD7Rg7 Cc: freebsd-net@freebsd.org, freebsd-wireless@freebsd.org, freebsd-current@freebsd.org Subject: Re: [CFT] Ralink RT2860, RT2870, RT3060, RT3090 support X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 08:24:23 -0000 On Saturday 05 May 2012 09:52:58 Sergey V. Dyatko wrote: > On Thu, 3 May 2012 18:53:52 +0200 > Bernhard Schmidt wrote: > > > Hi folks, > > > > As some of you might know there has been some work going on porting > > support for new Ralink chipsets from OpenBSD. Several different > > drivers where floating around but nothing seemed to be decent enough > > to be committed. ray@ and I had been working on cleaning up one of > > those to get it into a good enough shape, but abandoned this approach > > as it resulted in more work than starting from scratch. > > > > So, attached diff [1] is a from-scratch effort to port over support > > for the new chipsets. It doesn't contain fancy stuff like 802.11n > > support as of yet (this will be worked one once the legacy stuff is > > in HEAD), nonetheless it showed pretty decent performance during the > > basic sta/adhoc/hostap tests I've done. > > > > I'd appreciate testing and feedback ;) > > > at 1st I would say 'Thank You' for all people who working on this :) > > patch, make, make install, kldload: > http://tiger.ipfw.ru/files/rt2860_3090.txt > > this is FreeBSD 10.0-CURRENT, r234992M: Fri May 4 11:25:53 FET 2012 > from time to time on messages: > May 5 10:32:47 laptop kernel: ral0: device timeout > May 5 10:37:49 laptop kernel: ral0: device timeout > May 5 10:42:50 laptop kernel: ral0: device timeout That interval is fishy.. can you try do disable bgscan? ifconfig wlan0 -bgscan > LED... is just glowing, rarely blinks. With patch from Alexander (ray@) > it doesn't work > > [tiger@laptop]~%scp tiger:/storage/FreeBSD-8.2-RELEASE-amd64-dvd1.iso . > FreeBSD-8.2-RELEASE-amd64-dvd1.iso 11% > 271MB 1.9MB/s 18:19 ETA > ^C > Killed by signal 2. > where 'tiger' is my desktop > > > > The diff requires HEAD due to the firmware being available only there, > > though, if there are enough requests, I might consider looking into > > getting it merged to 9. (Simply pulling sys/modules/ralfw/ and > > sys/contrib/dev/ral/ from HEAD might be enough I guess.) > > > > [1] http://techwires.net/~bschmidt/rt2860.diff > > > > > > -- Bernhard From owner-freebsd-current@FreeBSD.ORG Sat May 5 09:55:23 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EF435106566B; Sat, 5 May 2012 09:55:23 +0000 (UTC) (envelope-from royaltiesea177@marston.com) Received: from inetia.pl (213-238-116-102.adsl.inetia.pl [213.238.116.102]) by mx1.freebsd.org (Postfix) with ESMTP id 9EC558FC22; Sat, 5 May 2012 09:55:23 +0000 (UTC) Received: from apache by obhplbijdjodqtfepgj.hendrickauto.com with local (Exim 4.63) (envelope-from <, , , >) id C9H5FF-RQZD2N-3P for , , , ; Sat, 5 May 2012 10:55:22 +0100 To: , , , Date: Sat, 5 May 2012 10:55:22 +0100 From: , , , Message-ID: <3F27FB447273A967979A4A012088DE22@obhplbijdjodqtfepgj.spcollege.edu> X-Priority: 3 X-Mailer: PHPMailer 5.1 (phpmailer.sourceforge.net) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="iso-8859-2" Cc: Subject: Work offer inside X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 09:55:24 -0000 I would like to take this time to welcome you to our hiring process and give you a brief synopsis of the position's benefits and requirements. If you are taking a career break, are on a maternity leave, recently retired or simply looking for some part-time job, this position is for you. Occupation: Flexible schedule 1 to 3 hours per day. We can guarantee a minimum 20 hrs/week occupation Salary: Starting salary is 3000 EUR per month plus commission. Region: Europe Please note that there are no startup fees or deposits to start working for us. To request an application form, schedule your interview and receive more information about this position please reply to Myrtle@employmenteu.com,with your personal identification number for this position IDNO: 3863 From owner-freebsd-current@FreeBSD.ORG Sat May 5 10:50:48 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F13D11065670 for ; Sat, 5 May 2012 10:50:48 +0000 (UTC) (envelope-from bschmidt@techwires.net) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx1.freebsd.org (Postfix) with ESMTP id 72EFF8FC1E for ; Sat, 5 May 2012 10:50:47 +0000 (UTC) Received: by wibhr7 with SMTP id hr7so1734354wib.13 for ; Sat, 05 May 2012 03:50:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:message-id:x-gm-message-state; bh=DpIyN1EJkG2dgQNSdc+pgi7Tv2Y632zQs4UDIGose9o=; b=dYRpGx1ddin0Gx3v4lNnd2wFxkRN+RwtrvvBc7PE61+bj7lmtxM8XGsdl1I+CrNuQJ viv2kr+jZXn/txtrlt9jZWMfnmcBPHTyyNmVTXZw/5uf+dh+uf8zt8SKOK95DXbvCW88 6apau9IEW5IeHZQLjQyz8WATwYUxZkxAYzlvOL3tHpp25zyCgq5JHDNWPJCbzibrwMOZ DQUSWeytRsd+I1XEBSGkezep/YCZ3s5+gvOzbiDsXVTuGT7ytxKuJgW1axtyzjQ8USwg LMlH+INy4eD8Za0aJgUBt6PHehBcK7wbhEq1FBkNS83Z1tP97490Hn/RN32UwVM6PRQ3 xdwA== Received: by 10.180.88.169 with SMTP id bh9mr16806914wib.5.1336215046881; Sat, 05 May 2012 03:50:46 -0700 (PDT) Received: from amy.lab.techwires.net (dslb-088-067-196-237.pools.arcor-ip.net. [88.67.196.237]) by mx.google.com with ESMTPS id fo7sm3275178wib.9.2012.05.05.03.50.44 (version=SSLv3 cipher=OTHER); Sat, 05 May 2012 03:50:46 -0700 (PDT) Sender: Bernhard Schmidt From: Bernhard Schmidt To: freebsd-wireless@freebsd.org Date: Sat, 5 May 2012 12:51:10 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.0-STABLE; KDE/4.7.4; amd64; ; ) References: <201205031853.53102.bschmidt@freebsd.org> <20120505105258.28e28803@laptop> In-Reply-To: <20120505105258.28e28803@laptop> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_eYQpPv8wqFkpfch" Message-Id: <201205051251.10431.bschmidt@freebsd.org> X-Gm-Message-State: ALoCoQlT8Jzaps5JFqHCXTLH/zb+wtFaaJ0QgUNbe7+GdRTC3FPcckXgk9az2GNB4/01OHW8VuhL Cc: freebsd-net@freebsd.org, "Sergey V. Dyatko" , freebsd-current@freebsd.org Subject: Re: [CFT] Ralink RT2860, RT2870, RT3060, RT3090 support X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 10:50:49 -0000 --Boundary-00=_eYQpPv8wqFkpfch Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit On Saturday 05 May 2012 09:52:58 Sergey V. Dyatko wrote: > On Thu, 3 May 2012 18:53:52 +0200 > Bernhard Schmidt wrote: > > > Hi folks, > > > > As some of you might know there has been some work going on porting > > support for new Ralink chipsets from OpenBSD. Several different > > drivers where floating around but nothing seemed to be decent enough > > to be committed. ray@ and I had been working on cleaning up one of > > those to get it into a good enough shape, but abandoned this approach > > as it resulted in more work than starting from scratch. > > > > So, attached diff [1] is a from-scratch effort to port over support > > for the new chipsets. It doesn't contain fancy stuff like 802.11n > > support as of yet (this will be worked one once the legacy stuff is > > in HEAD), nonetheless it showed pretty decent performance during the > > basic sta/adhoc/hostap tests I've done. > > > > I'd appreciate testing and feedback ;) > > > at 1st I would say 'Thank You' for all people who working on this :) > > patch, make, make install, kldload: > http://tiger.ipfw.ru/files/rt2860_3090.txt > > this is FreeBSD 10.0-CURRENT, r234992M: Fri May 4 11:25:53 FET 2012 > from time to time on messages: > May 5 10:32:47 laptop kernel: ral0: device timeout > May 5 10:37:49 laptop kernel: ral0: device timeout > May 5 10:42:50 laptop kernel: ral0: device timeout > > LED... is just glowing, rarely blinks. With patch from Alexander (ray@) > it doesn't work > > [tiger@laptop]~%scp tiger:/storage/FreeBSD-8.2-RELEASE-amd64-dvd1.iso . > FreeBSD-8.2-RELEASE-amd64-dvd1.iso 11% > 271MB 1.9MB/s 18:19 ETA > ^C > Killed by signal 2. > where 'tiger' is my desktop Please apply attached patch (also here [1]) on top of the first one, it fixes channel switching for >= 3070 (called the wrong function, doh..) as well as a bgscan issue. [1] http://techwires.net/~bschmidt/rt2860_1.diff -- Bernhard --Boundary-00=_eYQpPv8wqFkpfch Content-Type: text/x-patch; charset="UTF-8"; name="rt2860_1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="rt2860_1.diff" Index: sys/dev/ral/rt2860.c =================================================================== --- sys/dev/ral/rt2860.c (revision 234847) +++ sys/dev/ral/rt2860.c (working copy) @@ -1605,10 +1605,7 @@ rt2860_tx(struct rt2860_softc *sc, struct mbuf *m, struct ieee80211_node *ni) ieee80211_radiotap_tx(vap, m); } - if (hdrlen & 3) - pad = 4 - (hdrlen & 3); - else - pad = 0; + pad = (hdrlen + 3) & ~3; /* copy and trim 802.11 header */ memcpy(txwi + 1, wh, hdrlen); @@ -1667,7 +1664,7 @@ rt2860_tx(struct rt2860_softc *sc, struct mbuf *m, struct ieee80211_node *ni) /* first segment is TXWI + 802.11 header */ txd = &ring->txd[ring->cur]; txd->sdp0 = htole32(data->paddr); - txd->sdl0 = htole16(sizeof (struct rt2860_txwi) + hdrlen + pad); + txd->sdl0 = htole16(sizeof (struct rt2860_txwi) + pad); txd->flags = qsel; /* setup payload segments */ @@ -1776,7 +1773,7 @@ rt2860_tx_raw(struct rt2860_softc *sc, struct mbuf *m, u_int hdrlen; uint16_t dur; uint8_t type, qsel, mcs, pid, tid, qid; - int i, nsegs, ntxds, rate, ridx, error; + int i, nsegs, ntxds, pad, rate, ridx, error; /* the data pool contains at least one element, pick the first */ data = SLIST_FIRST(&sc->data_pool); @@ -1860,6 +1857,8 @@ rt2860_tx_raw(struct rt2860_softc *sc, struct mbuf *m, ieee80211_radiotap_tx(vap, m); } + pad = (hdrlen + 3) & ~3; + /* copy and trim 802.11 header */ memcpy(txwi + 1, wh, hdrlen); m_adj(m, hdrlen); @@ -1917,7 +1916,7 @@ rt2860_tx_raw(struct rt2860_softc *sc, struct mbuf *m, /* first segment is TXWI + 802.11 header */ txd = &ring->txd[ring->cur]; txd->sdp0 = htole32(data->paddr); - txd->sdl0 = htole16(sizeof (struct rt2860_txwi) + hdrlen); + txd->sdl0 = htole16(sizeof (struct rt2860_txwi) + pad); txd->flags = qsel; /* setup payload segments */ @@ -2336,7 +2335,6 @@ rt2860_scan_start(struct ieee80211com *ic) tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN | RT2860_TBTT_TIMER_EN)); rt2860_set_gp_timer(sc, 0); - rt2860_set_bssid(sc, ifp->if_broadcastaddr); } static void @@ -2346,10 +2344,10 @@ rt2860_scan_end(struct ieee80211com *ic) struct rt2860_softc *sc = ifp->if_softc; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - rt2860_enable_tsf_sync(sc); - /* XXX keep local copy */ - rt2860_set_bssid(sc, vap->iv_bss->ni_bssid); - rt2860_set_gp_timer(sc, 500); + if (vap->iv_state == IEEE80211_S_RUN) { + rt2860_enable_tsf_sync(sc); + rt2860_set_gp_timer(sc, 500); + } } static void @@ -2359,7 +2357,7 @@ rt2860_set_channel(struct ieee80211com *ic) struct rt2860_softc *sc = ifp->if_softc; RAL_LOCK(sc); - rt2860_set_chan(sc, ieee80211_chan2ieee(ic, ic->ic_curchan)); + rt2860_switch_chan(sc, ic->ic_curchan); RAL_UNLOCK(sc); } --Boundary-00=_eYQpPv8wqFkpfch-- From owner-freebsd-current@FreeBSD.ORG Sat May 5 11:48:54 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E28D5106566C; Sat, 5 May 2012 11:48:54 +0000 (UTC) (envelope-from popularb@atainvest.com) Received: from vodafone.it (net-37-116-219-76.cust.dsl.vodafone.it [37.116.219.76]) by mx1.freebsd.org (Postfix) with ESMTP id 862408FC08; Sat, 5 May 2012 11:48:54 +0000 (UTC) Received: from 37.116.219.76 (account , , HELO freebsd.org) by freebsd.org (CommuniGate Pro SMTP 5.2.3) with ESMTPA id 634303487 for ; Sat, 5 May 2012 12:48:54 +0100 From: , , To: , , Date: Sat, 5 May 2012 12:48:54 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1250" Content-Transfer-Encoding: 7bit X-Mailer: rmusp.70 Message-ID: <1686004748.RNA5I823764939@wfanmvwohelxab.sccumxl.org> Cc: Subject: Employment opportunity X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 11:48:55 -0000 I would like to take this time to welcome you to our hiring process and give you a brief synopsis of the position's benefits and requirements. If you are taking a career break, are on a maternity leave, recently retired or simply looking for some part-time job, this position is for you. Occupation: Flexible schedule 1 to 3 hours per day. We can guarantee a minimum 20 hrs/week occupation Salary: Starting salary is 3000 EUR per month plus commission. Region: Europe Please note that there are no startup fees or deposits to start working for us. To request an application form, schedule your interview and receive more information about this position please reply to Dana@employmenteu.com,with your personal identification number for this position IDNO: 8435 From owner-freebsd-current@FreeBSD.ORG Sat May 5 12:26:56 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCE241065676; Sat, 5 May 2012 12:26:56 +0000 (UTC) (envelope-from sergey.dyatko@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 761498FC0C; Sat, 5 May 2012 12:26:55 +0000 (UTC) Received: by lbon10 with SMTP id n10so3529121lbo.13 for ; Sat, 05 May 2012 05:26:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; bh=0XIFRp8+T8dBFkkCqCZ9l0EJwcJQj1P9g9zEgWKOBx0=; b=acaeft1p4YHptBWdwtK2NhzwJ1uxccSkF+dgSvYgDyOFZ6XsXvpTNzWki9NeLctA/t P9F/fkrGRdcWVk+KXy3ii1zc5fVn+kjODaKLFVmMK/g8ZsBHm/zTIujhMXQsSCyIRgQm kK6VLaKK7sEj/6f+NxQBuzvyRjMfiLDafDoKKPczbs8IzGNjYytw8D8LUVPIvPUbh5Z9 SfnNDfnWJStd+DeollT480CY5vGYZUXsYTAup2Ai/DtLsUxfW1aYSYlrHHDPxeeNI/X5 JaZwyuVMz7Fb+DayCjCIEj79LFzUYGeHd60ksquFqCkPrJhg0gHb/ZhC4hs52nZU4cFN W16Q== Received: by 10.152.112.100 with SMTP id ip4mr8960103lab.1.1336220814122; Sat, 05 May 2012 05:26:54 -0700 (PDT) Received: from laptop (m-s.agava.net. [195.222.84.203]) by mx.google.com with ESMTPS id b5sm14946614lbg.15.2012.05.05.05.26.51 (version=SSLv3 cipher=OTHER); Sat, 05 May 2012 05:26:52 -0700 (PDT) Date: Sat, 5 May 2012 15:27:28 +0300 From: "Sergey V. Dyatko" To: Bernhard Schmidt Message-ID: <20120505152728.65d28e98@laptop> In-Reply-To: <201205051251.10431.bschmidt@freebsd.org> References: <201205031853.53102.bschmidt@freebsd.org> <20120505105258.28e28803@laptop> <201205051251.10431.bschmidt@freebsd.org> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, freebsd-wireless@freebsd.org, freebsd-current@freebsd.org Subject: Re: [CFT] Ralink RT2860, RT2870, RT3060, RT3090 support X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 12:26:57 -0000 On Sat, 5 May 2012 12:51:10 +0200 Bernhard Schmidt wrote: > On Saturday 05 May 2012 09:52:58 Sergey V. Dyatko wrote: > > On Thu, 3 May 2012 18:53:52 +0200 > > Bernhard Schmidt wrote: > > > > > Hi folks, > > > > > > As some of you might know there has been some work going on > > > porting support for new Ralink chipsets from OpenBSD. Several > > > different drivers where floating around but nothing seemed to be > > > decent enough to be committed. ray@ and I had been working on > > > cleaning up one of those to get it into a good enough shape, but > > > abandoned this approach as it resulted in more work than starting > > > from scratch. > > > > > > So, attached diff [1] is a from-scratch effort to port over > > > support for the new chipsets. It doesn't contain fancy stuff like > > > 802.11n support as of yet (this will be worked one once the > > > legacy stuff is in HEAD), nonetheless it showed pretty decent > > > performance during the basic sta/adhoc/hostap tests I've done. > > > > > > I'd appreciate testing and feedback ;) > > > > > at 1st I would say 'Thank You' for all people who working on this :) > > > > patch, make, make install, kldload: > > http://tiger.ipfw.ru/files/rt2860_3090.txt > > > > this is FreeBSD 10.0-CURRENT, r234992M: Fri May 4 11:25:53 FET > > 2012 from time to time on messages: > > May 5 10:32:47 laptop kernel: ral0: device timeout > > May 5 10:37:49 laptop kernel: ral0: device timeout > > May 5 10:42:50 laptop kernel: ral0: device timeout > > > > LED... is just glowing, rarely blinks. With patch from Alexander > > (ray@) it doesn't work > > > > [tiger@laptop]~%scp > > tiger:/storage/FreeBSD-8.2-RELEASE-amd64-dvd1.iso . > > FreeBSD-8.2-RELEASE-amd64-dvd1.iso > > 11% 271MB 1.9MB/s 18:19 ETA ^C > > Killed by signal 2. > > where 'tiger' is my desktop > > Please apply attached patch (also here [1]) on top of the first one, > it fixes channel switching for >= 3070 (called the wrong function, > doh..) as well as a bgscan issue. > > [1] http://techwires.net/~bschmidt/rt2860_1.diff > * patch applied without errors * build/install - ok kldload and after ~5 minutes: May 5 15:01:20 laptop kernel: ral0: device timeout May 5 15:06:12 laptop kernel: ral0: device timeout without bgscan I didn't see such messages ~30-40 min -- wbr, tiger From owner-freebsd-current@FreeBSD.ORG Sat May 5 12:50:53 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C3F35106566B for ; Sat, 5 May 2012 12:50:53 +0000 (UTC) (envelope-from bschmidt@techwires.net) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3F4008FC08 for ; Sat, 5 May 2012 12:50:53 +0000 (UTC) Received: by lbon10 with SMTP id n10so3539539lbo.13 for ; Sat, 05 May 2012 05:50:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=9o0W7hfg/QvE+APkx2r2pbJdqHpyGLIl0YGPAMth5RA=; b=XTUyXV3kaI9AFmBHD6v3N32YrKtCMy81d/XmlihjEhZBh8uZkz3oynYYEARY88I0+G e5BUiWBHgTM5io4+JkVXc9zM1DdiKUMcue1+S7uwHKTqL9I6YuaKfXrA+50OQwExeOCY 525Ln2aP6PlCvSIg9QzmLqONnv0Wd3pdiNGyEHWA9Phd5m3yzHhQlsdrHP7Hk1RKFAVe 8tv8iG/9+VRbF+XE8/Fju8l8Hcd205COQs502EzFaXWaxT1afsYHCG4zEM5Ko58TaDGb I7guW1DgiRBZ4UeumxTUf6bFSKeVYCygc4pcdBFrgRoNCXzzIDf00Adwsx6mNqhcewjL iCXw== MIME-Version: 1.0 Received: by 10.152.128.137 with SMTP id no9mr8917830lab.2.1336222252169; Sat, 05 May 2012 05:50:52 -0700 (PDT) Sender: bschmidt@techwires.net Received: by 10.152.122.145 with HTTP; Sat, 5 May 2012 05:50:52 -0700 (PDT) X-Originating-IP: [88.67.196.237] In-Reply-To: <20120505152728.65d28e98@laptop> References: <201205031853.53102.bschmidt@freebsd.org> <20120505105258.28e28803@laptop> <201205051251.10431.bschmidt@freebsd.org> <20120505152728.65d28e98@laptop> Date: Sat, 5 May 2012 14:50:52 +0200 X-Google-Sender-Auth: iYjvtZsDIh3Z3lWjOrgBF9diUSw Message-ID: From: Bernhard Schmidt To: "Sergey V. Dyatko" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQnMeRaEwOOxqnHS1jkiawwq/59jUz5wSgzU5V+icGpx1toZVwcZThBCz4eSNamMDf39f/a0 Cc: freebsd-net@freebsd.org, freebsd-wireless@freebsd.org, freebsd-current@freebsd.org Subject: Re: [CFT] Ralink RT2860, RT2870, RT3060, RT3090 support X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 12:50:53 -0000 On Sat, May 5, 2012 at 2:27 PM, Sergey V. Dyatko wrote: > On Sat, 5 May 2012 12:51:10 +0200 > Bernhard Schmidt wrote: >> Please apply attached patch (also here [1]) on top of the first one, >> it fixes channel switching for >=3D 3070 (called the wrong function, >> doh..) as well as a bgscan issue. >> >> [1] http://techwires.net/~bschmidt/rt2860_1.diff >> > > * patch applied without errors > * build/install - ok > > kldload and after ~5 minutes: > > May =A05 15:01:20 laptop kernel: ral0: device timeout > May =A05 15:06:12 laptop kernel: ral0: device timeout > > without bgscan I didn't see such messages =A0~30-40 min Ok great, so except bgscan you haven't seen any other issue yet? --=20 Bernhard From owner-freebsd-current@FreeBSD.ORG Sat May 5 15:54:59 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D78CA106564A; Sat, 5 May 2012 15:54:59 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id 91D538FC0A; Sat, 5 May 2012 15:54:59 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1SQhJt-0008M8-1q>; Sat, 05 May 2012 17:54:53 +0200 Received: from e178019154.adsl.alicedsl.de ([85.178.19.154] helo=munin.geoinf.fu-berlin.de) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1SQhJs-0002o7-TT>; Sat, 05 May 2012 17:54:53 +0200 Message-ID: <4FA54D4A.4050703@zedat.fu-berlin.de> Date: Sat, 05 May 2012 17:54:50 +0200 From: "Hartmann, O." Organization: FU Berlin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120504 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-questions@freebsd.org, freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Originating-IP: 85.178.19.154 Cc: Subject: OpenLDAP 2.4.31 on FreeBSD 10.0-CURRENT/amd64 broken! X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 15:55:00 -0000 Hello lists. Since Friday, I have on all of our FreeBSD 10.0-CURRENT/amd64 boxes massive trouble with net/openldap24-server (SASL enabled, so it is openldap-sasl-server). Last time OpenLDAP worked was Thursday last week, when obviously a problematic update to the OS was made - it is a wild guess, since I did daily make world and by the end of the day after the last make world things went worse. I'm sorry having no SVN release tag handy. Well, here some facts. 1) The update of net/openldap24-server has been performed earlier this month and has been run successfully (2.4.31). 2) It doesn't matter whether OpenLDAP is compiled with CLANG 3.1 or legacy GCC 4.2.1, compiled with CLANG, slapd(8C) coredumps immediately, compiled with gcc, it starts, but when slapd(8C) gets accessed, it coredumps immediately. A simple "id ohartmann" is enough. 3) I recompiled OpenLDAP 2.4.31 client and server and it requisites via "portmaster -f net/openldap24-server|client. No effect/success. I also recompiled every port used with OpenLDAP: security/pam_ldap and net/nss_ldap. 4) OpenLDAP server uses DB5 based backend. 5) The very same configuration (copied slap.d folder's .ldif files) works fine on FreeBSD 9.0-STABLE/amd64, even compiled with CLANG. This makes me believe this is a FreeBSD 10.0-CURRENT specific bug. 6) Following is a truss output of the following comand issued: /usr/local/libexec/slapd -d32 -o ldap -g ldap -F /usr/local/etc/openldap/slapd.d : [...] connect(8,{ AF_INET 192.168.0.128:389 },16) ERR#61 'Connection refused' shutdown(8,SHUT_RDWR) ERR#54 'Connection reset by pee r' close(8) = 0 (0x0) clock_gettime(13,{1336231852.000000000 }) = 0 (0x0) getpid() = 84297 (0x14949) sendto(3,"<163>May 5 17:30:52 slapd[84297"...,97,0x0,NULL,0x0) = 97 (0x61) sigprocmask(SIG_SETMASK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGF PE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP| SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH |SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0) sigaction(SIGPIPE,{ SIG_DFL SA_RESTART ss_t },{ SIG_IGN 0x0 ss_t }) = 0 (0x0) sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0) 4fa547ac ldif_read_file: checksum error on "/usr/local/etc/openldap/slapd.d//cn= config/olcDatabase={1}hdb.ldif" 4fa547ac hdb_db_open: database "dc=walstatt,dc=dyndns,dc=org": unclean shutdown detected; attempting recovery. 4fa547ad hdb_db_open: database "cn=accesslog": unclean shutdown detected; attemp ting recovery. 4fa547ad slapd starting SIGNAL 11 (SIGSEGV) setgroups(0x1,0x802c7a000,0x802c7c001,0xffffffff,0x0,0x0) ERR#4 'Interrupted sys tem call' process exit, rval = 0 7) Desperately, I tried nearly every variation of the configurable "overlays", even those my configuration doesn't use. But this seems nonesense since OpenLDAP worked before. I'm floating like a dead man in the water and I was wondering if someone else doesn't face this problem. FreeBSD is said to be run in large environments, so at least one should have OpenLDAP as user backend running ... I need some help in this case. Regards, Oliver P.S. Please set me CC, I'm not subscribing list "questions". From owner-freebsd-current@FreeBSD.ORG Sat May 5 16:34:17 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07B92106566C; Sat, 5 May 2012 16:34:17 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3FDB58FC0C; Sat, 5 May 2012 16:34:16 +0000 (UTC) Received: by bkvi17 with SMTP id i17so4039087bkv.13 for ; Sat, 05 May 2012 09:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=N4qEG43OdOblbUFjr6YZGJDjYkKI1zC6A8rb9Kz/5vA=; b=QZ+CuwWds1F8CAnJA2hlyJk4V1S7mozGXMtYbWz14147pqZAackAm6qw6POA9K28u5 NUozG2BixCqoTAYR/Y2EuQ6VoBoXg72cguioPmC4slc3ffGbWo00VH+Ap5DFngNxRo+b 19cZbKb2XiGAyaEoaXQ5NVprYFjX4nhgg4mrgqjQt2T/jJYuxNzmKgqCtIvgGak02WXQ zjf6tEamvOe1bPuBKK8nOBK/uLlrs7On6cuTDZdH+juC3s5jJ2R2s7DIqsSUm5T2CLuI ROpKFQGrQXJ7FEgcOdO92KSoCkHTOulTz0jcnAO7IjuXRpiOdmDJcEJi1LZ4rUtL1saH xnSA== MIME-Version: 1.0 Received: by 10.204.153.15 with SMTP id i15mr3529147bkw.74.1336235654848; Sat, 05 May 2012 09:34:14 -0700 (PDT) Received: by 10.204.171.138 with HTTP; Sat, 5 May 2012 09:34:14 -0700 (PDT) Received: by 10.204.171.138 with HTTP; Sat, 5 May 2012 09:34:14 -0700 (PDT) In-Reply-To: <4FA54D4A.4050703@zedat.fu-berlin.de> References: <4FA54D4A.4050703@zedat.fu-berlin.de> Date: Sat, 5 May 2012 17:34:14 +0100 Message-ID: From: Chris Rees To: "Hartmann, O." Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-current@freebsd.org, freebsd-questions@freebsd.org Subject: Re: OpenLDAP 2.4.31 on FreeBSD 10.0-CURRENT/amd64 broken! X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 16:34:17 -0000 On 5 May 2012 16:55, "Hartmann, O." wrote: > > Hello lists. > > Since Friday, I have on all of our FreeBSD 10.0-CURRENT/amd64 boxes > massive trouble with net/openldap24-server (SASL enabled, so it is > openldap-sasl-server). > > Last time OpenLDAP worked was Thursday last week, when obviously a > problematic update to the OS was made - it is a wild guess, since I did > daily make world and by the end of the day after the last make world > things went worse. I'm sorry having no SVN release tag handy. > > Well, here some facts. > > 1) The update of net/openldap24-server has been performed earlier this > month and has been run successfully (2.4.31). > > 2) It doesn't matter whether OpenLDAP is compiled with CLANG 3.1 or > legacy GCC 4.2.1, compiled with CLANG, slapd(8C) coredumps immediately, > compiled with gcc, it starts, but when slapd(8C) gets accessed, it > coredumps immediately. A simple "id ohartmann" is enough. > > 3) I recompiled OpenLDAP 2.4.31 client and server and it requisites via > "portmaster -f net/openldap24-server|client. No effect/success. I also > recompiled every port used with OpenLDAP: security/pam_ldap and > net/nss_ldap. > > 4) OpenLDAP server uses DB5 based backend. > > 5) The very same configuration (copied slap.d folder's .ldif files) > works fine on FreeBSD 9.0-STABLE/amd64, even compiled with CLANG. This > makes me believe this is a FreeBSD 10.0-CURRENT specific bug. > > 6) Following is a truss output of the following comand issued: > > /usr/local/libexec/slapd -d32 -o ldap -g ldap -F > /usr/local/etc/openldap/slapd.d : > > [...] > connect(8,{ AF_INET 192.168.0.128:389 },16) ERR#61 'Connection refused' > shutdown(8,SHUT_RDWR) ERR#54 'Connection > reset by pee > r' > close(8) = 0 (0x0) > clock_gettime(13,{1336231852.000000000 }) = 0 (0x0) > getpid() = 84297 (0x14949) > sendto(3,"<163>May 5 17:30:52 slapd[84297"...,97,0x0,NULL,0x0) = 97 (0x61) > sigprocmask(SIG_SETMASK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGF > PE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP| > SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH > |SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0) > sigaction(SIGPIPE,{ SIG_DFL SA_RESTART ss_t },{ SIG_IGN 0x0 ss_t }) = 0 > (0x0) > sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0) > 4fa547ac ldif_read_file: checksum error on > "/usr/local/etc/openldap/slapd.d//cn= > config/olcDatabase={1}hdb.ldif" > 4fa547ac hdb_db_open: database "dc=walstatt,dc=dyndns,dc=org": unclean > shutdown > detected; attempting recovery. > 4fa547ad hdb_db_open: database "cn=accesslog": unclean shutdown > detected; attemp > ting recovery. > 4fa547ad slapd starting > SIGNAL 11 (SIGSEGV) > setgroups(0x1,0x802c7a000,0x802c7c001,0xffffffff,0x0,0x0) ERR#4 > 'Interrupted sys > tem call' > process exit, rval = 0 > > > 7) Desperately, I tried nearly every variation of the configurable > "overlays", even those my configuration doesn't use. But this seems > nonesense since OpenLDAP worked before. > > I'm floating like a dead man in the water and I was wondering if someone > else doesn't face this problem. FreeBSD is said to be run in large > environments, so at least one should have OpenLDAP as user backend > running ... > > I need some help in this case. > Why are you running -CURRENT in production? Chris From owner-freebsd-current@FreeBSD.ORG Sat May 5 16:43:46 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0829106566C; Sat, 5 May 2012 16:43:46 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id 587608FC0A; Sat, 5 May 2012 16:43:46 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1SQi5B-00049N-Lu>; Sat, 05 May 2012 18:43:45 +0200 Received: from e178019154.adsl.alicedsl.de ([85.178.19.154] helo=munin.geoinf.fu-berlin.de) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1SQi5B-000504-Gu>; Sat, 05 May 2012 18:43:45 +0200 Message-ID: <4FA558C0.501@zedat.fu-berlin.de> Date: Sat, 05 May 2012 18:43:44 +0200 From: "Hartmann, O." Organization: FU Berlin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120504 Thunderbird/12.0.1 MIME-Version: 1.0 To: Chris Rees References: <4FA54D4A.4050703@zedat.fu-berlin.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Originating-IP: 85.178.19.154 Cc: freebsd-current@freebsd.org, freebsd-questions@freebsd.org Subject: Re: OpenLDAP 2.4.31 on FreeBSD 10.0-CURRENT/amd64 broken! X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 16:43:46 -0000 On 05/05/12 18:34, Chris Rees wrote: > On 5 May 2012 16:55, "Hartmann, O." wrote: >> >> Hello lists. >> >> Since Friday, I have on all of our FreeBSD 10.0-CURRENT/amd64 boxes >> massive trouble with net/openldap24-server (SASL enabled, so it is >> openldap-sasl-server). >> >> Last time OpenLDAP worked was Thursday last week, when obviously a >> problematic update to the OS was made - it is a wild guess, since I did >> daily make world and by the end of the day after the last make world >> things went worse. I'm sorry having no SVN release tag handy. >> >> Well, here some facts. >> >> 1) The update of net/openldap24-server has been performed earlier this >> month and has been run successfully (2.4.31). >> >> 2) It doesn't matter whether OpenLDAP is compiled with CLANG 3.1 or >> legacy GCC 4.2.1, compiled with CLANG, slapd(8C) coredumps immediately, >> compiled with gcc, it starts, but when slapd(8C) gets accessed, it >> coredumps immediately. A simple "id ohartmann" is enough. >> >> 3) I recompiled OpenLDAP 2.4.31 client and server and it requisites via >> "portmaster -f net/openldap24-server|client. No effect/success. I also >> recompiled every port used with OpenLDAP: security/pam_ldap and >> net/nss_ldap. >> >> 4) OpenLDAP server uses DB5 based backend. >> >> 5) The very same configuration (copied slap.d folder's .ldif files) >> works fine on FreeBSD 9.0-STABLE/amd64, even compiled with CLANG. This >> makes me believe this is a FreeBSD 10.0-CURRENT specific bug. >> >> 6) Following is a truss output of the following comand issued: >> >> /usr/local/libexec/slapd -d32 -o ldap -g ldap -F >> /usr/local/etc/openldap/slapd.d : >> >> [...] >> connect(8,{ AF_INET 192.168.0.128:389 },16) ERR#61 'Connection > refused' >> shutdown(8,SHUT_RDWR) ERR#54 'Connection >> reset by pee >> r' >> close(8) = 0 (0x0) >> clock_gettime(13,{1336231852.000000000 }) = 0 (0x0) >> getpid() = 84297 (0x14949) >> sendto(3,"<163>May 5 17:30:52 slapd[84297"...,97,0x0,NULL,0x0) = 97 > (0x61) >> > sigprocmask(SIG_SETMASK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGF >> > PE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP| >> > SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH >> |SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0) >> sigaction(SIGPIPE,{ SIG_DFL SA_RESTART ss_t },{ SIG_IGN 0x0 ss_t }) = 0 >> (0x0) >> sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0) >> 4fa547ac ldif_read_file: checksum error on >> "/usr/local/etc/openldap/slapd.d//cn= >> config/olcDatabase={1}hdb.ldif" >> 4fa547ac hdb_db_open: database "dc=walstatt,dc=dyndns,dc=org": unclean >> shutdown >> detected; attempting recovery. >> 4fa547ad hdb_db_open: database "cn=accesslog": unclean shutdown >> detected; attemp >> ting recovery. >> 4fa547ad slapd starting >> SIGNAL 11 (SIGSEGV) >> setgroups(0x1,0x802c7a000,0x802c7c001,0xffffffff,0x0,0x0) ERR#4 >> 'Interrupted sys >> tem call' >> process exit, rval = 0 >> >> >> 7) Desperately, I tried nearly every variation of the configurable >> "overlays", even those my configuration doesn't use. But this seems >> nonesense since OpenLDAP worked before. >> >> I'm floating like a dead man in the water and I was wondering if someone >> else doesn't face this problem. FreeBSD is said to be run in large >> environments, so at least one should have OpenLDAP as user backend >> running ... >> >> I need some help in this case. >> > > Why are you running -CURRENT in production? > > Chris > _______________________________________________ > 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" Some has to report problems in the field and the new hardware in our science lab benefits from some advantages in FBSD 10, at least LLVM/CLANG 3.1. From owner-freebsd-current@FreeBSD.ORG Sat May 5 16:47:14 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55F011065673 for ; Sat, 5 May 2012 16:47:14 +0000 (UTC) (envelope-from sendtomatt@gmail.com) Received: from mail-pz0-f48.google.com (mail-pz0-f48.google.com [209.85.210.48]) by mx1.freebsd.org (Postfix) with ESMTP id 23C4D8FC17 for ; Sat, 5 May 2012 16:47:14 +0000 (UTC) Received: by dadz8 with SMTP id z8so1531207dad.7 for ; Sat, 05 May 2012 09:47:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=i32AUXMwCdCvEInkZKrC8cCPvpktxM/MogmBWbcKajQ=; b=o2b1wYXd4/tAajvHJ0U+g3uYs13afCI/wzxJMUBKlabxc6XiorfwJQXoatlOHPKt/C 4WE5Nf0sIjVG7FzOOz3oC9uCYhqBZ/blKigucA/D8XSUXEcQ7hKJlcoCFakRpEE4Jqpx y3ylFVLYGm1bRwuE6USCr3TbZ/kz+OalNoCvUJ07p23it/5W3AGDXpJgTqVcufdR/H/W 7tXcn6mSci/BB7YlTXDFzt0JvypHjoQkLqNEyVdD/alvKQxCExzgsLnli97o2VKMfdZ5 vXWmZTFJ/FpQonm5NN6rjkJglx+wZboiKFw/gR7EC3Lm1SnhBZrczkjelBD6vpVl1abO oTrw== Received: by 10.68.238.6 with SMTP id vg6mr1297984pbc.60.1336236428819; Sat, 05 May 2012 09:47:08 -0700 (PDT) Received: from flatline.local (70-36-223-239.dsl.dynamic.sonic.net. [70.36.223.239]) by mx.google.com with ESMTPS id iu6sm7086896pbc.33.2012.05.05.09.47.06 (version=SSLv3 cipher=OTHER); Sat, 05 May 2012 09:47:07 -0700 (PDT) Message-ID: <4FA5597B.9090009@gmail.com> Date: Sat, 05 May 2012 09:46:51 -0700 From: matt User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120504 Thunderbird/12.0.1 MIME-Version: 1.0 To: Tim Kientzle References: <20120503120027.D14051065672@hub.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: AN , freebsd-current@freebsd.org Subject: Re: make installworld fails X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 16:47:14 -0000 On 05/03/12 20:49, Tim Kientzle wrote: > On May 3, 2012, at 1:34 PM, AN wrote: > >> Thu May 3 16:25:27 EDT 2012 >> >> FreeBSD FBSD10 10.0-CURRENT FreeBSD 10.0-CURRENT #13 r234872: Tue May 1 13:09:55 EDT 2012 root@FBSD10:/usr/obj/usr/src/sys/MYKERNEL amd64 >> >> # svn up >> Updated to revision 234981 >> >> I did build world/kernel, after booting into single user mode and trying make installworld I get the following error: >> >> /usr/src/Makefile Line:219 check date and time >> >> I have seen this failure before, previously I was able to open the make file and comment out the date and time check, but this time the file seems corrupted, I am not able to open the file in vi. >> >> What causes this check to fail? Is there any way to detect this possibility before rebboting to single user? > Try looking very critically at the system date and time: > $ date > > This check is comparing the system time to the timestamps of > the files on disks to try to detect whether your system clock > is correct. Since the 'make' program relies on comparing timestamps, > you can get very strange results if your system clock is not consistent. > > You can use the date utility to set the system clock to > the approximately correct time (it doesn't need to be very > exact). If you have networking, you can use "ntpdate pool.ntp.org" > to set the clock from the network. > > Tim > > _______________________________________________ > 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" > Did you run "adjkerntz -i" before mounting disks in single user? Matt From owner-freebsd-current@FreeBSD.ORG Sat May 5 18:38:12 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 209EC1065670 for ; Sat, 5 May 2012 18:38:12 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mouf.net (mouf.net [IPv6:2607:fc50:0:4400:216:3eff:fe69:33b2]) by mx1.freebsd.org (Postfix) with ESMTP id CF0608FC14 for ; Sat, 5 May 2012 18:38:11 +0000 (UTC) Received: from meatwad.mouf.net (cpe-024-162-230-236.nc.res.rr.com [24.162.230.236]) (authenticated bits=0) by mouf.net (8.14.4/8.14.4) with ESMTP id q45IcALO091588 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NOT); Sat, 5 May 2012 14:38:10 -0400 (EDT) (envelope-from swills@FreeBSD.org) Message-ID: <4FA57392.4090704@FreeBSD.org> Date: Sat, 05 May 2012 14:38:10 -0400 From: Steve Wills User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.2) Gecko/20120302 Thunderbird/10.0.2 MIME-Version: 1.0 To: freebsd-current@FreeBSD.org X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mouf.net [204.109.58.86]); Sat, 05 May 2012 14:38:11 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.97.2 at mouf.net X-Virus-Status: Clean Cc: George Neville-Neil Subject: ctfmerge core dump X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 18:38:12 -0000 After updating from -CURRENT as of April 5 to one built today, I now get a core dump running ctfmerge on libc: ctfmerge -L VERSION -g -o libc.so.7 syscall.So fork.So...... Bus error (core dumped) *** [libc.so.7] Error code 138 Anyone else seeing this or have any idea how to avoid it? Let me know if you need more details on my config. Thanks, Steve From owner-freebsd-current@FreeBSD.ORG Sat May 5 19:11:37 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 66D201065672 for ; Sat, 5 May 2012 19:11:37 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id 1E3C88FC08 for ; Sat, 5 May 2012 19:11:37 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1SQkOG-0007sW-4d>; Sat, 05 May 2012 21:11:36 +0200 Received: from e178019154.adsl.alicedsl.de ([85.178.19.154] helo=munin.geoinf.fu-berlin.de) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1SQkOG-0003AH-0k>; Sat, 05 May 2012 21:11:36 +0200 Message-ID: <4FA57B5A.8030203@zedat.fu-berlin.de> Date: Sat, 05 May 2012 21:11:22 +0200 From: "Hartmann, O." Organization: FU Berlin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120504 Thunderbird/12.0.1 MIME-Version: 1.0 To: "Bjoern A. Zeeb" , freebsd-current@freebsd.org References: <4FA54D4A.4050703@zedat.fu-berlin.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Originating-IP: 85.178.19.154 Cc: Subject: Re: OpenLDAP 2.4.31 on FreeBSD 10.0-CURRENT/amd64 broken! X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 19:11:37 -0000 On 05/05/12 20:36, Bjoern A. Zeeb wrote: > On 5. May 2012, at 15:54 , Hartmann, O. wrote: > >> I'm floating like a dead man in the water and I was wondering if someone >> else doesn't face this problem. FreeBSD is said to be run in large >> environments, so at least one should have OpenLDAP as user backend >> running ... > > Ok, I am running the same openldap version on HEAD in production on amd64 and i386. > My HEAD is from about 20120426 1130 UTC and my packages are cleanly build on that > wprld. Here: FreeBSD 10.0-CURRENT #0 r235062: Sat May 5 20:02:26 CEST 2012 I can not say what the last working SVN release tag was, maybe around r234900, I can't say. As I wrote, Thursday last week, ~20120503, a buildworld from 20120502 worked fine. On Thursday 03.05.2012 I did the last source update and buildworld, shutdown the box at home and switched it on on Friday morning before heading to the laboratory - and LDAP failed. At the lab, the box was still working, but I was highly risky in my motivations and recompiled that box with a freshly updates source tree - and it failed, too. I did not follow the tags, sorry. Last I realized flushing into the sources was OpenSSL stuff due to security issues. I use OpenSSL certificates to connect via TLS to the server. There is also usually no core dumped. > > > The differences to what I see with your setups are: > > 1) I am still on db48. > > 2) ? Contrary to you I probably have MALLOC_PRODUCTION set for my builds; > not sure if that makes a difference but if this problem started recently > the jemalloc import could be the cause? You didn't say from when your > last and your latest HEAD was. MALLOC_PRODUCTION is set in /etc/make.conf as well as in /etc/src.conf. /etc/src.conf is this on both failing FBSD 10.0-CUR boxes: WITH_CLANG= YES WITH_CLANG_EXTRAS= YES # WITH_BIND_LARGE_FILE= YES WITH_BIND_SIGCHASE= YES WITH_BIND_LIBS= YES # WITH_IDEA= YES WITH_HESIOD= YES # #WITH_BSD_GREP= YES #WITH_ICONV= YES # WITH_LIBCPLUSPLUS= YES # #WITH_OFED= YES # PORTS_MODULES= x11/nvidia-driver # MALLOC_PRODUCTION= YES Grüße, Oliver > > Gruesse > /bz > From owner-freebsd-current@FreeBSD.ORG Sat May 5 19:43:38 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC2DB1065673; Sat, 5 May 2012 19:43:38 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 3C2928FC17; Sat, 5 May 2012 19:43:38 +0000 (UTC) Received: by wgbds11 with SMTP id ds11so378246wgb.31 for ; Sat, 05 May 2012 12:43:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:reply-to:date:message-id:subject:from:to:content-type; bh=Hj9pkS/yASiw2Jm+JRuARhdwooE0+WMTd2vP0GI36nU=; b=RCTHPJRXiD5DHhwAEkDHYZZdFAm+oz4+aq4HAvOgKttc6BIfZRIs4YjrMTReB6fXmq 1LR6muxEpKsO1Ga2iTZDvVrDHGCAgCXKwZ93kM/O68BNOl7cI5VaVX5vSzF95Al+M6EZ TKJayykZihK43HYoICyCDRGrcc5+lpjiaeG5OqClY2vDHwyHnZ/FC0l48nryCgOAv6KZ zjkpttIUc3qzyDXuNV599Atgm3iHmYzL7C81i4XcM8ve09UgM03YEnRevEYyMJ/l+LHJ enlsyRSN57UkFD4snIIciSGQTezX4qDck+tTUvcNpCfQPIJO/Tv2KMMhOhaN310Kzyxg WXqQ== MIME-Version: 1.0 Received: by 10.216.135.97 with SMTP id t75mr6386862wei.60.1336247016481; Sat, 05 May 2012 12:43:36 -0700 (PDT) Received: by 10.180.97.232 with HTTP; Sat, 5 May 2012 12:43:36 -0700 (PDT) Date: Sat, 5 May 2012 15:43:36 -0400 Message-ID: From: "b. f." To: Steve Wills , freebsd-current@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Re: ctfmerge core dump X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 19:43:38 -0000 Steve Wills wrote: > After updating from -CURRENT as of April 5 to one built today, I now get > a core dump running ctfmerge on libc: > > ctfmerge -L VERSION -g -o libc.so.7 syscall.So fork.So...... > Bus error (core dumped) > *** [libc.so.7] Error code 138 > > Anyone else seeing this or have any idea how to avoid it? Yes, I'm also seeing such problems when attempting to build a r235052 amd64 kernel on r235035 amd64. (This problem did not occur when building a r235035 amd64 world and kernel on r234854 amd64.) ctfmerge succeeds for several kernel modules but fails with kgssapi.ko.debug, linux.ko.debug, or kernel.debug. I'm not yet sure which change has caused this, or how to avoid it. b. From owner-freebsd-current@FreeBSD.ORG Sat May 5 19:58:44 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A79F1106566B for ; Sat, 5 May 2012 19:58:44 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mouf.net (mouf.net [IPv6:2607:fc50:0:4400:216:3eff:fe69:33b2]) by mx1.freebsd.org (Postfix) with ESMTP id 32A4C8FC0A for ; Sat, 5 May 2012 19:58:44 +0000 (UTC) Received: from meatwad.mouf.net (cpe-024-162-230-236.nc.res.rr.com [24.162.230.236]) (authenticated bits=0) by mouf.net (8.14.4/8.14.4) with ESMTP id q45Jwg7E092504 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NOT); Sat, 5 May 2012 15:58:43 -0400 (EDT) (envelope-from swills@FreeBSD.org) Message-ID: <4FA58672.1040201@FreeBSD.org> Date: Sat, 05 May 2012 15:58:42 -0400 From: Steve Wills User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.2) Gecko/20120302 Thunderbird/10.0.2 MIME-Version: 1.0 To: bf1783@gmail.com References: In-Reply-To: X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mouf.net [204.109.58.86]); Sat, 05 May 2012 15:58:43 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.97.2 at mouf.net X-Virus-Status: Clean Cc: freebsd-current@FreeBSD.org, "b. f." Subject: Re: ctfmerge core dump X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 19:58:44 -0000 On 05/05/12 15:43, b. f. wrote: > Steve Wills wrote: >> After updating from -CURRENT as of April 5 to one built today, I now get >> a core dump running ctfmerge on libc: >> >> ctfmerge -L VERSION -g -o libc.so.7 syscall.So fork.So...... >> Bus error (core dumped) >> *** [libc.so.7] Error code 138 >> >> Anyone else seeing this or have any idea how to avoid it? > > Yes, I'm also seeing such problems when attempting to build a r235052 > amd64 kernel on r235035 amd64. (This problem did not occur when > building a r235035 amd64 world and kernel on r234854 amd64.) ctfmerge > succeeds for several kernel modules but fails with kgssapi.ko.debug, > linux.ko.debug, or kernel.debug. I'm not yet sure which change has > caused this, or how to avoid it. > Thanks for the info. I took a look at the dump and see this: % sudo gdb /usr/bin/ctfmerge ctfmerge.core [GDB will not be able to debug user-mode threads: Undefined symbol "td_thr_getxmmregs"] GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... Core was generated by `ctfmerge'. Program terminated with signal 10, Bus error. Reading symbols from /lib/libctf.so.2...done. Loaded symbols for /lib/libctf.so.2 Reading symbols from /usr/lib/libdwarf.so.3...done. Loaded symbols for /usr/lib/libdwarf.so.3 Reading symbols from /usr/lib/libelf.so.1...done. Loaded symbols for /usr/lib/libelf.so.1 Reading symbols from /lib/libz.so.6...done. Loaded symbols for /lib/libz.so.6 Reading symbols from /lib/libthr.so.3...done. Loaded symbols for /lib/libthr.so.3 Reading symbols from /lib/libc.so.7...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x00000000004064b0 in fifo_len (f=0x801c29070) at /usr/src/cddl/usr.bin/ctfmerge/../../../cddl/contrib/opensolaris/tools/ctf/cvt/fifo.c:128 128 for (i = 0, fn = f->f_head; fn; fn = fn->fn_next, i++); (gdb) bt #0 0x00000000004064b0 in fifo_len (f=0x801c29070) at /usr/src/cddl/usr.bin/ctfmerge/../../../cddl/contrib/opensolaris/tools/ctf/cvt/fifo.c:128 #1 0x000000000040622c in worker_thread (wq=0x610ee0) at /usr/src/cddl/usr.bin/ctfmerge/../../../cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c:329 #2 0x0000000801078da9 in thread_start (curthread=0x801c0f800) at /usr/src/lib/libthr/thread/thr_create.c:284 #3 0x0000000000000000 in ?? () Cannot access memory at address 0x7fffff5fb000 (gdb) Not sure what to make of that. Steve From owner-freebsd-current@FreeBSD.ORG Sat May 5 21:08:21 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 178EA1065673; Sat, 5 May 2012 21:08:21 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 38B5C8FC18; Sat, 5 May 2012 21:08:20 +0000 (UTC) Received: by wgbds11 with SMTP id ds11so407442wgb.31 for ; Sat, 05 May 2012 14:08:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=5fjj8vyZ2/9mll+PHF8HDAdJkLlMyL2e+xaAAUfgdW4=; b=fC8ZhbW5/Mv/Uakx1f0AOJGXbBXiiYAB9unK8l5RTotJPhY+8u/gtfbUowyI0bOALU MHn/nNva4SQSLlp9Go4O1grVJHcC8mn0vu/hjUWJ7ZD1BSUnhMx8ITDmzkN5DIM+U+mN bSDmfAbp7a/vNMn1jh3XIaJz4OQYI2ewONnNuPsHOQCJ3Ue4w+aX5D9E5F8vl6pgL5LY BPWSAxCebewJg+mEADiZaHO7K7pVDCKb+PdPC1G2YrQfHidcSOiXMA6FZlYUwGJeCD/2 5UfY7nvtHchPWTVHs4+03GUf7+9UG9FEM4VHUITXsXWnnqY6tEKh0ipW2VwpIzb6DV7L uVCA== MIME-Version: 1.0 Received: by 10.216.133.139 with SMTP id q11mr6574812wei.44.1336252098926; Sat, 05 May 2012 14:08:18 -0700 (PDT) Received: by 10.180.97.232 with HTTP; Sat, 5 May 2012 14:08:18 -0700 (PDT) In-Reply-To: <4FA58672.1040201@FreeBSD.org> References: <4FA58672.1040201@FreeBSD.org> Date: Sat, 5 May 2012 17:08:18 -0400 Message-ID: From: "b. f." To: Steve Wills , davidxu@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current@freebsd.org Subject: Re: ctfmerge core dump X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 21:08:21 -0000 On 5/5/12, Steve Wills wrote: > On 05/05/12 15:43, b. f. wrote: >> Steve Wills wrote: >>> After updating from -CURRENT as of April 5 to one built today, I now get >>> a core dump running ctfmerge on libc: >>> >>> ctfmerge -L VERSION -g -o libc.so.7 syscall.So fork.So...... >>> Bus error (core dumped) >>> *** [libc.so.7] Error code 138 >>> >>> Anyone else seeing this or have any idea how to avoid it? >> >> Yes, I'm also seeing such problems when attempting to build a r235052 >> amd64 kernel on r235035 amd64. (This problem did not occur when >> building a r235035 amd64 world and kernel on r234854 amd64.) ctfmerge >> succeeds for several kernel modules but fails with kgssapi.ko.debug, >> linux.ko.debug, or kernel.debug. I'm not yet sure which change has >> caused this, or how to avoid it. >> > > Thanks for the info. I took a look at the dump and see this: > > % sudo gdb /usr/bin/ctfmerge ctfmerge.core > [GDB will not be able to debug user-mode threads: Undefined symbol > "td_thr_getxmmregs"] > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you > are > welcome to change it and/or distribute copies of it under certain > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "amd64-marcel-freebsd"... > Core was generated by `ctfmerge'. > Program terminated with signal 10, Bus error. > Reading symbols from /lib/libctf.so.2...done. > Loaded symbols for /lib/libctf.so.2 > Reading symbols from /usr/lib/libdwarf.so.3...done. > Loaded symbols for /usr/lib/libdwarf.so.3 > Reading symbols from /usr/lib/libelf.so.1...done. > Loaded symbols for /usr/lib/libelf.so.1 > Reading symbols from /lib/libz.so.6...done. > Loaded symbols for /lib/libz.so.6 > Reading symbols from /lib/libthr.so.3...done. > Loaded symbols for /lib/libthr.so.3 > Reading symbols from /lib/libc.so.7...done. > Loaded symbols for /lib/libc.so.7 > Reading symbols from /libexec/ld-elf.so.1...done. > Loaded symbols for /libexec/ld-elf.so.1 > #0 0x00000000004064b0 in fifo_len (f=0x801c29070) at > /usr/src/cddl/usr.bin/ctfmerge/../../../cddl/contrib/opensolaris/tools/ctf/cvt/fifo.c:128 > 128 for (i = 0, fn = f->f_head; fn; fn = fn->fn_next, i++); > (gdb) bt > #0 0x00000000004064b0 in fifo_len (f=0x801c29070) at > /usr/src/cddl/usr.bin/ctfmerge/../../../cddl/contrib/opensolaris/tools/ctf/cvt/fifo.c:128 > #1 0x000000000040622c in worker_thread (wq=0x610ee0) at > /usr/src/cddl/usr.bin/ctfmerge/../../../cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c:329 > #2 0x0000000801078da9 in thread_start (curthread=0x801c0f800) at > /usr/src/lib/libthr/thread/thr_create.c:284 > #3 0x0000000000000000 in ?? () > Cannot access memory at address 0x7fffff5fb000 > (gdb) > After reverting the recent libthr changes in r234947, I am no longer encountering this problem. b. From owner-freebsd-current@FreeBSD.ORG Sat May 5 23:54:26 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E6E51065673; Sat, 5 May 2012 23:54:26 +0000 (UTC) (envelope-from listlog2011@gmail.com) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E32348FC0C; Sat, 5 May 2012 23:54:25 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q45NsMxA064209; Sat, 5 May 2012 23:54:23 GMT (envelope-from listlog2011@gmail.com) Message-ID: <4FA5BDAD.5090809@gmail.com> Date: Sun, 06 May 2012 07:54:21 +0800 From: David Xu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: bf1783@gmail.com References: <4FA58672.1040201@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Steve Wills , freebsd-current@freebsd.org, "b. f." , davidxu@freebsd.org Subject: Re: ctfmerge core dump X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: davidxu@freebsd.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 23:54:26 -0000 On 2012/5/6 5:08, b. f. wrote: > On 5/5/12, Steve Wills wrote: >> On 05/05/12 15:43, b. f. wrote: >>> Steve Wills wrote: >>>> After updating from -CURRENT as of April 5 to one built today, I now get >>>> a core dump running ctfmerge on libc: >>>> >>>> ctfmerge -L VERSION -g -o libc.so.7 syscall.So fork.So...... >>>> Bus error (core dumped) >>>> *** [libc.so.7] Error code 138 >>>> >>>> Anyone else seeing this or have any idea how to avoid it? >>> Yes, I'm also seeing such problems when attempting to build a r235052 >>> amd64 kernel on r235035 amd64. (This problem did not occur when >>> building a r235035 amd64 world and kernel on r234854 amd64.) ctfmerge >>> succeeds for several kernel modules but fails with kgssapi.ko.debug, >>> linux.ko.debug, or kernel.debug. I'm not yet sure which change has >>> caused this, or how to avoid it. >>> >> Thanks for the info. I took a look at the dump and see this: >> >> % sudo gdb /usr/bin/ctfmerge ctfmerge.core >> [GDB will not be able to debug user-mode threads: Undefined symbol >> "td_thr_getxmmregs"] >> GNU gdb 6.1.1 [FreeBSD] >> Copyright 2004 Free Software Foundation, Inc. >> GDB is free software, covered by the GNU General Public License, and you >> are >> welcome to change it and/or distribute copies of it under certain >> conditions. >> Type "show copying" to see the conditions. >> There is absolutely no warranty for GDB. Type "show warranty" for details. >> This GDB was configured as "amd64-marcel-freebsd"... >> Core was generated by `ctfmerge'. >> Program terminated with signal 10, Bus error. >> Reading symbols from /lib/libctf.so.2...done. >> Loaded symbols for /lib/libctf.so.2 >> Reading symbols from /usr/lib/libdwarf.so.3...done. >> Loaded symbols for /usr/lib/libdwarf.so.3 >> Reading symbols from /usr/lib/libelf.so.1...done. >> Loaded symbols for /usr/lib/libelf.so.1 >> Reading symbols from /lib/libz.so.6...done. >> Loaded symbols for /lib/libz.so.6 >> Reading symbols from /lib/libthr.so.3...done. >> Loaded symbols for /lib/libthr.so.3 >> Reading symbols from /lib/libc.so.7...done. >> Loaded symbols for /lib/libc.so.7 >> Reading symbols from /libexec/ld-elf.so.1...done. >> Loaded symbols for /libexec/ld-elf.so.1 >> #0 0x00000000004064b0 in fifo_len (f=0x801c29070) at >> /usr/src/cddl/usr.bin/ctfmerge/../../../cddl/contrib/opensolaris/tools/ctf/cvt/fifo.c:128 >> 128 for (i = 0, fn = f->f_head; fn; fn = fn->fn_next, i++); >> (gdb) bt >> #0 0x00000000004064b0 in fifo_len (f=0x801c29070) at >> /usr/src/cddl/usr.bin/ctfmerge/../../../cddl/contrib/opensolaris/tools/ctf/cvt/fifo.c:128 >> #1 0x000000000040622c in worker_thread (wq=0x610ee0) at >> /usr/src/cddl/usr.bin/ctfmerge/../../../cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c:329 >> #2 0x0000000801078da9 in thread_start (curthread=0x801c0f800) at >> /usr/src/lib/libthr/thread/thr_create.c:284 >> #3 0x0000000000000000 in ?? () >> Cannot access memory at address 0x7fffff5fb000 >> (gdb) >> > After reverting the recent libthr changes in r234947, I am no longer > encountering this problem. > > b. > I have fixed it in r235068. From owner-freebsd-current@FreeBSD.ORG Sat May 5 23:55:16 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE8E21065687; Sat, 5 May 2012 23:55:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 919308FC16; Sat, 5 May 2012 23:55:16 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:68f7:d8e6:6bfb:e905] (unknown [IPv6:2001:7b8:3a7:0:68f7:d8e6:6bfb:e905]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 0B5635C37; Sun, 6 May 2012 01:55:09 +0200 (CEST) Message-ID: <4FA5BDDC.4050307@FreeBSD.org> Date: Sun, 06 May 2012 01:55:08 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120425 Thunderbird/13.0 MIME-Version: 1.0 To: "Hartmann, O." References: <4FA54D4A.4050703@zedat.fu-berlin.de> In-Reply-To: <4FA54D4A.4050703@zedat.fu-berlin.de> X-Enigmail-Version: 1.5a1pre Content-Type: multipart/mixed; boundary="------------070005000407080202000300" Cc: freebsd-current@freebsd.org, freebsd-questions@freebsd.org, David Xu Subject: Re: OpenLDAP 2.4.31 on FreeBSD 10.0-CURRENT/amd64 broken! X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 23:55:17 -0000 This is a multi-part message in MIME format. --------------070005000407080202000300 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 2012-05-05 17:54, Hartmann, O. wrote: > Since Friday, I have on all of our FreeBSD 10.0-CURRENT/amd64 boxes > massive trouble with net/openldap24-server (SASL enabled, so it is > openldap-sasl-server). > > Last time OpenLDAP worked was Thursday last week, when obviously a > problematic update to the OS was made I managed to reproduce the segfault you are seeing in slapd, which is caused by a problem in libthr.so, introduced in r234947. Please apply the attached diff, rebuild lib/libthr and install it, and then try your slapd tests again. Let us know. :) @David, can you please review this diff? It looks like there was a mistake merging from Perforce, where you also moved the line: sc = SC_LOOKUP(wchan); to the top of the _sleepq_add() function, just before the call to _sleepq_lookup(). If this isn't done, sc may be uninitialized when it is dereferenced later on in the function. --------------070005000407080202000300 Content-Type: text/x-diff; name="libthr-segfault-1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="libthr-segfault-1.diff" Index: lib/libthr/thread/thr_sleepq.c =================================================================== --- lib/libthr/thread/thr_sleepq.c (revision 234994) +++ lib/libthr/thread/thr_sleepq.c (working copy) @@ -113,11 +113,11 @@ _sleepq_add(void *wchan, struct pthread *td) struct sleepqueue_chain *sc; struct sleepqueue *sq; + sc = SC_LOOKUP(wchan); sq = _sleepq_lookup(wchan); if (sq != NULL) { SLIST_INSERT_HEAD(&sq->sq_freeq, td->sleepqueue, sq_flink); } else { - sc = SC_LOOKUP(wchan); sq = td->sleepqueue; LIST_INSERT_HEAD(&sc->sc_queues, sq, sq_hash); sq->sq_wchan = wchan; --------------070005000407080202000300-- From owner-freebsd-current@FreeBSD.ORG Sat May 5 23:57:36 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B35061065679 for ; Sat, 5 May 2012 23:57:36 +0000 (UTC) (envelope-from erichfreebsdlist@ovitrap.com) Received: from alogreentechnologies.com (alogreentechnologies.com [67.212.226.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5719C8FC17 for ; Sat, 5 May 2012 23:57:36 +0000 (UTC) Received: from amd620.ovitrap.com ([49.128.188.2]) (authenticated bits=0) by alogreentechnologies.com (8.13.1/8.13.1) with ESMTP id q45NvORb019213; Sat, 5 May 2012 17:57:26 -0600 From: Erich Dollansky To: Lars Engels Date: Sun, 6 May 2012 06:57:24 +0700 User-Agent: KMail/1.13.7 (FreeBSD/8.3-STABLE; KDE/4.7.4; amd64; ; ) References: <201205041029.24565.erichfreebsdlist@ovitrap.com> <201205041848.42577.erichfreebsdlist@ovitrap.com> <20120505115633.GG65710@e-new.0x20.net> In-Reply-To: <20120505115633.GG65710@e-new.0x20.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Message-Id: <201205060657.24443.erichfreebsdlist@ovitrap.com> Cc: Artem Tuchinsky , freebsd-current@freebsd.org Subject: Re: X220 and all.14.5.patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 23:57:36 -0000 Hi, On Saturday 05 May 2012 18:56:33 Lars Engels wrote: > On Fri, May 04, 2012 at 06:48:42PM +0700, Erich Dollansky wrote: > > Hi, > > > > one thing I noticed: How does your /etc/make.conf look like? > > > > Mine is here: > > > > # added by use.perl 2012-05-02 14:49:54 > > PERL_VERSION=5.12.4 > > WITH_NEW_XORG > ^^^^^^^^^^^^^^^ > > That doesn't anything as long as you don't set a value. > Try > WITH_NEW_XORG=true thank you for the hint. Irony is that I am not that far yet. I have a very slow Internet connection here making things not better. Erich