From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 23:17:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBE029BC; Mon, 10 Nov 2014 23:17:02 +0000 (UTC) Received: from mail-wg0-x230.google.com (mail-wg0-x230.google.com [IPv6:2a00:1450:400c:c00::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6813FB8C; Mon, 10 Nov 2014 23:17:02 +0000 (UTC) Received: by mail-wg0-f48.google.com with SMTP id m15so10178613wgh.21 for ; Mon, 10 Nov 2014 15:17:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Lpqtfu4rTyneUSTFvrLvTVsiuN4xj65NT18ES3cf9Ec=; b=befDMRlGwaeMP+XWknt+8AZdL28dclh7DAiL6GMEgimt/D2YfdKSSaE/1gqIOlVwBu 9n6p8u/p3IAuIaRt6BOHnTiomd2yVYJ6gl3vgW+B9QDbUoBAvwz1PoekTt9FCn3JwMU/ zfIStnoiE15XhrcIzpIJgqnh9Cz3Sr+fTGj//3ecZu2jzoB9P5B1j+aNW1nO5xIBJLJ2 P22mLKEDBkWZUFZxR69swW+MWUPF5Xlf5r9YwJ8JU11ezFa2OiIWIG6WQFgbMKg2bOg8 aRU04JumB7ESBKTNt5eqlY7uw8bI/qE/fwc2pSS06KfpMcsRWzhP9/dfk1NRGGCE3q5x mhlQ== MIME-Version: 1.0 X-Received: by 10.194.47.226 with SMTP id g2mr47452308wjn.68.1415661420728; Mon, 10 Nov 2014 15:17:00 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.106.136 with HTTP; Mon, 10 Nov 2014 15:17:00 -0800 (PST) In-Reply-To: <3279406.bOBVrcribU@ralph.baldwin.cx> References: <201410181936.s9IJaCwu018930@svn.freebsd.org> <3279406.bOBVrcribU@ralph.baldwin.cx> Date: Mon, 10 Nov 2014 15:17:00 -0800 X-Google-Sender-Auth: xX73eUbZMniolgYkH4kKSJbUybM Message-ID: Subject: Re: svn commit: r273266 - in head: lib/libkvm sys/compat/freebsd32 sys/kern sys/sys From: Adrian Chadd To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , Luigi Rizzo , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Dimitry Andric X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 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: Mon, 10 Nov 2014 23:17:03 -0000 just double-check that the cpu id isn't used to size anything; I've seen it used as an offset into stuff, and NOCPU would've been entry 255 in the array, not -1. Ian pointed this out to me recently and I've only just started digging into it. -adrian On 10 November 2014 12:35, John Baldwin wrote: > On Monday, November 10, 2014 09:13:08 PM Dimitry Andric wrote: >> I noted something similar for kgdb, when compiled with gcc: >> >> cc1: warnings being treated as errors >> /usr/src/gnu/usr.bin/gdb/kgdb/trgt_i386.c: In function >> 'kgdb_trgt_fetch_tss': /usr/src/gnu/usr.bin/gdb/kgdb/trgt_i386.c:142: >> warning: comparison is always false due to limited range of data type >> >> In gnu/usr.bin/gdb/kgdb/kgdb.h, there is: >> >> struct kthr { >> struct kthr *next; >> uintptr_t paddr; >> uintptr_t kaddr; >> uintptr_t kstack; >> uintptr_t pcb; >> int tid; >> int pid; >> u_char cpu; >> }; >> >> The cpu field is assigned from td.td_oncpu (which is an int) in >> kgdb_thr_add_procs(), so I think it should be safe to change it to an >> int too: >> >> Index: gnu/usr.bin/gdb/kgdb/kgdb.h >> =================================================================== >> --- gnu/usr.bin/gdb/kgdb/kgdb.h (revision 274350) >> +++ gnu/usr.bin/gdb/kgdb/kgdb.h (working copy) >> @@ -41,7 +41,7 @@ >> uintptr_t pcb; >> int tid; >> int pid; >> - u_char cpu; >> + int cpu; >> }; >> >> extern struct kthr *curkthr; > > Yes, please commit. > > -- > John Baldwin