From owner-freebsd-current@freebsd.org Sun Jun 18 13:03:25 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C73CFD860C8 for ; Sun, 18 Jun 2017 13:03:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 583816F5CC for ; Sun, 18 Jun 2017 13:03:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v5ID3Jxx049157 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 18 Jun 2017 16:03:19 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v5ID3Jxx049157 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v5ID3J8s049156; Sun, 18 Jun 2017 16:03:19 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 18 Jun 2017 16:03:19 +0300 From: Konstantin Belousov To: Rick Macklem Cc: "freebsd-current@freebsd.org" Subject: Re: adding extern maxbcachebuf to param.h Message-ID: <20170618130319.GH2088@kib.kiev.ua> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 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, 18 Jun 2017 13:03:25 -0000 On Sun, Jun 18, 2017 at 12:36:59PM +0000, Rick Macklem wrote: > My recent commit (r320062) broke the arm build when it added > extern int maxbcachebuf; > to sys/param.h. Although I don't understand the actual failure, I believe > it is caused by arm/arm/elf_note.S including param.h and then using the > ELFNOTE() macro. > > As a temporary fix, I have committed r320070, which removes the definition > from sys/param.h. > This brings me to the question of how best to fix this? > 1 - Just leave it the way it is now, where "extern int maxbcachebuf" isn't defined > in a generic include file and needs to be defined as above before use. > 2 - Add "!defined(LOCORE)" to the definition of it in sys/param.h, which I believe > will also fix the problem. > 3 - Put it in some other sys/*.h file which never gets included in assembler files. > What .h would be appropriate? I think that sys/buf.h is the best match. Hiding the extern under !LOCORE in the sys/param.h is the second solution, but I like moving the definition to buf.h because param.h is widely used and most of the users do not need this symbol.