From owner-freebsd-current@FreeBSD.ORG Thu May 29 21:46:07 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3664A02; Thu, 29 May 2014 21:46:07 +0000 (UTC) Received: from mail-vc0-x22d.google.com (mail-vc0-x22d.google.com [IPv6:2607:f8b0:400c:c03::22d]) (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 2C7032B49; Thu, 29 May 2014 21:46:07 +0000 (UTC) Received: by mail-vc0-f173.google.com with SMTP id il7so1123787vcb.18 for ; Thu, 29 May 2014 14:46:06 -0700 (PDT) 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=3o50HaaHtKvrY5iRiNoreVUY0kFUwGQMp4odehtma6c=; b=H+BEBw/iq0YY+pc+5dOV2HQlBe1xfN5jYPzOUIfR0JSztvy250IbdbK3/RnIYsa1+h VaKkkwfqqxQMmJb1dNREVj7BJo3BSH5lAE0jauAp4o+P2g5nLt2U0OJy7+Eqikqr0j5i mjZmB749x64ZxogMEHc9DSk9NhhnKgGhNNyKMwMgAHwEQAdhjQvFmXPW0UMCQ1HCLM0K Bo7eOL2DUt455Y6kxdgKuVAS1XtyTuYr7Tz23E5wMPuIkes/Mv3OqNlfdddWZYW2UTvf gBgNtV16aa/STb7cR4EFiY8tzA7yTdgttbvZ7O8T95kVJ8fjK+PNiT/nBwzXbQfDqbF5 R3Qg== MIME-Version: 1.0 X-Received: by 10.220.183.4 with SMTP id ce4mr4290065vcb.54.1401399966248; Thu, 29 May 2014 14:46:06 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.220.186.193 with HTTP; Thu, 29 May 2014 14:46:05 -0700 (PDT) In-Reply-To: <201405291729.33471.jhb@freebsd.org> References: <201405291618.55058.jhb@freebsd.org> <201405291729.33471.jhb@freebsd.org> Date: Thu, 29 May 2014 14:46:05 -0700 X-Google-Sender-Auth: g_z_nIUVVRfHUzi7x61iNIwLktg Message-ID: Subject: Re: cpuid_t typedef? (was Re: Processor cores not properly detected/activated?) From: Adrian Chadd To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: Attilio Rao , freebsd-current , Jia-Shiun Li , Alan Somers , Tim Bishop X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 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: Thu, 29 May 2014 21:46:07 -0000 On 29 May 2014 14:29, John Baldwin wrote: > On Thursday, May 29, 2014 5:09:05 pm Adrian Chadd wrote: >> On 29 May 2014 13:18, John Baldwin wrote: >> >> >> anyway. Besides all of this - I'm thinking of just introducing: >> >> >> >> typedef uint32_t cpuid_t; >> >> >> >> .. then once we've converted all the users, we can make NOCPU >> >> something other than 255 (which is the other limiting factor here..) >> >> >> >> Any objections? >> > >> > This one is a bit harder as you'll have to do shims for kinfo_proc, but >> > I think this is fine. You could also just use u_int, but a new foo_t >> > isn't that bad I guess. >> >> I don't think I'd modify any userland-facing ABI/KBI's just yet. I'm >> just worried that 11.0-REL will come out before we have made a decent >> inroads into this and we _can't_ support > 254 CPUs. > > Eh, that's one of the biggies to do actually. Kind of pointless to > update td_oncpu/lastcpu and not fix kinfo_proc at the same time. You'll > just have to add new int fields and populate the old ones with sane values > for CPUs < 255. Ugh. Ok. I was too deep in the trenches of device drivers and other ancillary things doing bad things to char/short with cpu ids when walking things. I totally missed kinfo_proc. I'll go think about it a bit more. -a