From owner-svn-src-all@freebsd.org Wed Feb 7 22:54:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA856EE14B5; Wed, 7 Feb 2018 22:54:31 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A60683721; Wed, 7 Feb 2018 22:54:31 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 899B52600EC; Wed, 7 Feb 2018 23:54:29 +0100 (CET) Subject: Re: svn commit: r328985 - head/sys/dev/usb/template To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201802071846.w17Ik894055491@repo.freebsd.org> <2147494.gDNdGGi869@ralph.baldwin.cx> From: Hans Petter Selasky Message-ID: <43ece2af-5259-554e-c5f1-6fd947b587eb@selasky.org> Date: Wed, 7 Feb 2018 23:51:33 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <2147494.gDNdGGi869@ralph.baldwin.cx> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Feb 2018 22:54:32 -0000 On 02/07/18 23:25, John Baldwin wrote: > On Wednesday, February 07, 2018 06:46:08 PM Hans Petter Selasky wrote: >> Author: hselasky >> Date: Wed Feb 7 18:46:08 2018 >> New Revision: 328985 >> URL: https://svnweb.freebsd.org/changeset/base/328985 >> >> Log: >> Give USB template SYSUNINIT()'s a uniq name to avoid symbol name collision >> when building stand/usb. Regression after r328194. > > This seems like a bug in the USB bits in stand instead. In the kernel > SYSINIT and SYSUNINIT use separate namespace by appending different suffixes > to the first parameter: > > DATA_SET(sysinit_set,uniquifier ## _sys_init) > > vs. > > DATA_SET(sysuninit_set,uniquifier ## _sys_uninit) > > The bug is in stand/kshim/bsd_kernel.h: > > #define SYSINIT(uniq, subs, order, _func, _data) \ > const struct sysinit UNIQ_NAME(sysinit_##uniq) = { \ > .func = (_func), \ > .data = __DECONST(void *, _data) \ > }; \ > SYSINIT_ENTRY(uniq##_entry, "sysinit", (subs), \ > (order), "const struct sysinit", \ > UNIQ_NAME_STR(sysinit_##uniq), "SYSINIT") > > #define SYSUNINIT(uniq, subs, order, _func, _data) \ > const struct sysinit UNIQ_NAME(sysuninit_##uniq) = { \ > .func = (_func), \ > .data = __DECONST(void *, _data) \ > }; \ > SYSINIT_ENTRY(uniq##_entry, "sysuninit", (subs), \ > (order), "const struct sysuninit", \ > UNIQ_NAME_STR(sysuninit_##uniq), "SYSUNINIT") > > This should be using uniq##_uninit_entry or some such for the first argument > to SYSINIT_ENTRY(). > It can be fixed either way. Feel free to fix the SYSINIT KSHIM macros. You can test by running make in stand/usb/test . --HPS