From owner-freebsd-x11@freebsd.org Fri Jan 15 10:28:41 2016 Return-Path: Delivered-To: freebsd-x11@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 40E40A834CB for ; Fri, 15 Jan 2016 10:28:41 +0000 (UTC) (envelope-from n.pajkovsky@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C7EF81F41 for ; Fri, 15 Jan 2016 10:28:40 +0000 (UTC) (envelope-from n.pajkovsky@gmail.com) Received: by mail-wm0-x22f.google.com with SMTP id f206so14520856wmf.0 for ; Fri, 15 Jan 2016 02:28:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=n5o/U26I3Hd+qO/Sga3QWDj7VmPEU2q5HRki0v5Ibv4=; b=tv0wiUpmCIQyzU7mVdH9D0O6v4MIWnkcVhrDR6cQVO9zFu2qPL8npT/oBIdCyoCIwo xM1L70FRSy4A3KmgFsXPm5M4xnVp8rSDRNLTbRbsE5wGOXmUOnabWghfMBUQChGsnpPa 8DCcjHVc4EyCQCKJWWY0TTCEsdW6hDZKx2g6GtSKQh3TMVpsiqPTnoFOrjWES8bI/QAq SK2jHFwl/3/JrygEugMWrWWJLYQ6O9g84qrMJpAVpYXnXT0hSQpR8Z0SyeDhpGwsbKvJ NEYgGbEhyMtWMdPjXu1rLFiXp0lwG9yBDRHwilYKru7ULq4fAnwvSrsm0ZwgUvQnAoMj 9OIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type :content-transfer-encoding; bh=n5o/U26I3Hd+qO/Sga3QWDj7VmPEU2q5HRki0v5Ibv4=; b=m1iPKO8aS0Axb3tnkMTy9x8/t7cFeorU0fdMvwXdkgsArmU7o4Lxe8cN2cJS199249 TdCyYBAyym9mWdSarBPr4oi9Rl755CWOKKWQuyI0hg9nNhaGrml5u4IvQFgURCzSPBam BJWDhiYp3PoGkXZ2h8JrgSDLFNcdoka/LHqIhHqaK0InIWPisU6EkrhJH9g7ckMQpSRV 2qThx5HyZBMIf8SyN/knj8cFD6A/Qqxs7z+sL5SluZ1nKTOzI3uS7tRqaGTmHhk1Jvyq pMjEg7GgMehtHY8m3jG7DUU/KIyejCSlH1hwzxrY2dKFWYHDLVhrrOa+JfOuEcTUS7io 0C/g== X-Gm-Message-State: ALoCoQkDtf40QWTxnQ6J8RbYpTrWqq5O2Nw2z28bZOQwZr6atPU+/yZtxl6QcQ8OKrZ5mXOEUGH8INIgywg380JkJ3qon9f0rw== X-Received: by 10.194.62.11 with SMTP id u11mr10496946wjr.172.1452853719319; Fri, 15 Jan 2016 02:28:39 -0800 (PST) Received: from localhost (gw-brno.gooddata.com. [194.213.40.134]) by smtp.gmail.com with ESMTPSA id gl10sm9954195wjb.30.2016.01.15.02.28.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jan 2016 02:28:37 -0800 (PST) From: Nikola Pajkovsky To: =?utf-8?Q?Jean-S=C3=A9bastien_P=C3=A9dron?= Cc: Nikola Pajkovsky , freebsd-x11@freebsd.org Subject: Re: build-able drm-i915-update-38 References: <87oacpdguk.fsf@gooddata.com> <5696A19A.2030009@dumbbell.fr> <864mehduk6.fsf@freebsd.lan> <5698AB9C.9070005@dumbbell.fr> Date: Fri, 15 Jan 2016 11:28:37 +0100 In-Reply-To: <5698AB9C.9070005@dumbbell.fr> (=?utf-8?Q?=22Jean-S=C3=A9bast?= =?utf-8?Q?ien_P=C3=A9dron=22's?= message of "Fri, 15 Jan 2016 09:19:40 +0100") Message-ID: <87twmfxhka.fsf@gooddata.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2016 10:28:41 -0000 Jean-S=C3=A9bastien P=C3=A9dron writes: > On 13/01/2016 22:43, Nikola Pajkovsky wrote: >>> I rebuild a full kernel from scratch and it does build fine here. There >>> is no "unused variable" warning for me. Do you build a non-debug kernel >>> perhaps? I don't plan to build-test such a kernel now, I'll do it when >>> the patch is finished. >>=20 >> Oh, everytime? I have found out, that > > I use "make buildkernel -DKERNFAST" so only the modifed files are > recompiled. I just rebuild the kernel from scratch this time to > double-check if I missed a warning. I sill don't know those tricks, because I had installed freebsd couple weeks ago ;) >> $ cd sys/modules/drm2 >> $ make -j9 >> $ make DESTDIR=3D/boot/ KMODDIR=3Dkernel.i915 install >>=20 >> is engough (only after I have fully built and booted kernel) > > Yes, this works fine, but this doesn't use many defaults set by GENERIC, > such as debugging options or 32-bit support on 64-bit archs. > > The problem you hit is likely because I build a debug kernel (the > variable is used) and not you (only the declaration remains). ok, I will try that. >> gen6_ggtt_bind_object() >> const int max_entries =3D dev_priv->mm.gtt->gtt_total_entries - firs= t_entry; >> BUG_ON(i > max_entries); >>=20 >> Seems like BUG_ON is noop, which should not be. > > BUG_ON() is a KASSERT() which is defined to nothing on a non-debug > kernel. The variable should be declared in: > > #if defined(INVARIANTS) > ... > #endif BUG_ON() is defined in linux.git/include/asm-generic/bug.h as #ifndef HAVE_ARCH_BUG #define BUG() do { \ printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \ panic("BUG!"); \ } while (0) #endif #ifndef HAVE_ARCH_BUG_ON #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while(0) #endif and HAVE_ARCH_BUG is defined for x86, hence, BUG_ON must be *on* always, even in kernel w/o debugging options. > If you are still willing to send a pull request, you're welcome to do > so! I know the change is small, so if you don't feel like cloning an > entire repository just for that, I understand and I will fix it. > > Unlike what I said in my previous email, the pull request should be > against the drm-i915-update-38 branch. I will have to look at it bit deeper to get it fix. --=20 Nikola