From owner-cvs-src@FreeBSD.ORG Fri Mar 16 10:39:19 2007 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 024F716A46E for ; Fri, 16 Mar 2007 10:39:19 +0000 (UTC) (envelope-from roam@ringlet.net) Received: from straylight.ringlet.net (nat100.cnsys.bg [85.95.80.100]) by mx1.freebsd.org (Postfix) with SMTP id 3E60113C4AE for ; Fri, 16 Mar 2007 10:39:18 +0000 (UTC) (envelope-from roam@ringlet.net) Received: (qmail 58396 invoked by uid 1000); 16 Mar 2007 10:17:12 -0000 Date: Fri, 16 Mar 2007 12:17:12 +0200 From: Peter Pentchev To: Kip Macy Message-ID: <20070316101712.GA1243@straylight.m.ringlet.net> Mail-Followup-To: Kip Macy , src-committers@freebsd.org, cvs-src@freebsd.org, cvs-all@freebsd.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zYM0uCDKw75PZbzx" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.14 (2007-02-12) Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/share/man/man4 Makefile src/sys/dev/cxgb cxgb_adapter.h cxgb_config.h cxgb_ioctl.h cxgb_lro.c cxgb_main.c cxgb_osdep.h cxgb_sge.c t3fw-3.2.bin.gz.uu src/sys/dev/cxgb/common cxgb_ael1002.c cxgb_common.h cxgb_firmware_exports.h cxgb X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2007 10:39:19 -0000 --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 15, 2007 at 10:35:49PM -0700, Kip Macy wrote: >=20 >=20 > On 3/15/07, Peter Pentchev wrote: > >On Thu, 15 Mar 2007 at 03:06:32 +0000 (UTC), Kip Macy wrote: > >> > >> kmacy 2007-03-15 03:06:32 UTC > >> > >> FreeBSD src repository > >> > >> Modified files: (Branch: RELENG_6) > >> share/man/man4 Makefile > >> Added files: (Branch: RELENG_6) > >> sys/dev/cxgb cxgb_adapter.h cxgb_config.h cxgb_ioctl.h > >> cxgb_lro.c cxgb_main.c cxgb_osdep.h > >> cxgb_sge.c t3fw-3.2.bin.gz.uu > >> sys/dev/cxgb/common cxgb_ael1002.c cxgb_common.h > >> cxgb_firmware_exports.h cxgb_mc5.c > >> cxgb_mv88e1xxx.c cxgb_regs.h > >> cxgb_sge_defs.h cxgb_t3_cpl.h > >> cxgb_t3_hw.c cxgb_tcb.h cxgb_version.h > >> cxgb_vsc8211.c cxgb_xgmac.c > >> sys/modules/cxgb Makefile > >> Log: > >> MFC Chelsio T3 10 Gigabit Ethernet support > >> > >> Don't hook into build just > > > >Is it possible that the GCC version in 6.x-STABLE is different from > >that in -CURRENT? On my laptop (i386, yesterday's -STABLE) LINT failed > >to build with the following: > > > >/fs/6/usr.src/sys/dev/cxgb/cxgb_sge.c: In function `sge_timer_reclaim': > >/fs/6/usr.src/sys/dev/cxgb/cxgb_sge.c:172: warning: inlining failed in= =20 > >call to 'refill_rspq': function body not available > >/fs/6/usr.src/sys/dev/cxgb/cxgb_sge.c:699: warning: called from here > > > >It seems it simply needed refill_rspq() to be moved up, so that > >the compiler could actually see the function body before first use; > >or is this a bug in GCC? > > > >Anyway, here's a simple patch that fixed the LINT build for me. >=20 > I'm not saying it isn't a problem - but I can't reproduce it on my > system. I see all sorts of inlining complaints from other modules but > not cxgb. Are you sure you don't have a modified make.conf? Actually, yes, I was using a slightly modified make.conf. After playing around for a while it turned out that the "problem" was a CONFIGARGS?=3D-g line, which changed the gcc invocation to -O instead of the default -O2. Again, after playing around with the gcc options a bit, it turns out that -O2 includes -funit-at-a-time, making gcc parse the whole cxgb_sge.c before the compilation, so that it can see the refill_rspq() function body and it can inline it properly. So... I'm not sure what the proper solution ought to be - either figure out a way to add -funit-at-a-time to CFLAGS (which might not work all that well with non-gcc compilers, I guess), or move the function body up as per my original suggestion. G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@cnsys.bg roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 I had to translate this sentence into English because I could not read the = original Sanskrit. --zYM0uCDKw75PZbzx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFF+m6o7Ri2jRYZRVMRAnQkAJ4qXwk/hxfi057Y2BAj2neXbW5p4wCcC/0o d44M+YM5+w12H2uzNxe8amM= =OHs6 -----END PGP SIGNATURE----- --zYM0uCDKw75PZbzx--