From owner-svn-src-projects@FreeBSD.ORG Thu May 12 20:38:57 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C36D7106566C; Thu, 12 May 2011 20:38:57 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 192E78FC14; Thu, 12 May 2011 20:38:56 +0000 (UTC) Received: by qwc9 with SMTP id 9so1315252qwc.13 for ; Thu, 12 May 2011 13:38:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=HuPlVMTCshdKxhMu2+xdufhnogRaRKcl6NvhfOgKzIM=; b=VeX9edTGXKB77gSeBGxfC/zZz1Y+92ah79l9L/Bn7YfmJpsPgCd4AtsisteJZsxrcN EtCYh3IM69PawZVJtc0vKh3Rl4Wkp50/G0w/IpVx/Lw67b3QFW5dk3N/kgDuacDKbA70 aDvgvtnrRW/EG45Ndj+6MfNdj7DeGZL7IxQz0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=kClAVzEtcqOlNtjOrfVo04PNYWkt36TSKEvLX0ED3xzMZ3aQtjmrQc0xyUA942UnoW ertUXWepnm7bxbMALjT4wkBnu5FmfjHXn9WwfaRDQFXhciLKU+46srQx71vtBaMVX4Uj VI365zi8WTzJWPLnt/u03xGmSTJdnV3ooaghg= MIME-Version: 1.0 Received: by 10.229.27.193 with SMTP id j1mr591965qcc.82.1305232735939; Thu, 12 May 2011 13:38:55 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.229.95.140 with HTTP; Thu, 12 May 2011 13:38:55 -0700 (PDT) In-Reply-To: References: <201105080039.p480doiZ021493@svn.freebsd.org> Date: Thu, 12 May 2011 22:38:55 +0200 X-Google-Sender-Auth: T0AJitf18ptSXnc_RLDjSBrjVBg Message-ID: From: Artem Belevich To: Attilio Rao Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-projects@freebsd.org, Oleksandr Tymoshenko , src-committers@freebsd.org, Warner Losh , Bruce Evans Subject: Re: svn commit: r221614 - projects/largeSMP/sys/powerpc/include X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2011 20:38:57 -0000 On Thu, May 12, 2011 at 10:05 PM, Attilio Rao wrote: > I spoke in person with Artem and in the end I just decided to make the > smallest possible subset of changes to fix the _long on 32 bits and > then "completed" (as some of them already exist today) the macro > converting the arguments to u_int stuff: > http://www.freebsd.org/~attilio/largeSMP/mips-atomic2.diff Attilio, Let's get back for a second to the original issue you had that propted you to do atomic ops changes. If I understand you correctly, your code was passing cpuset_t* as an argument to atomic_something_long and that caused compiler to complain that cpuset_t* is not uint32_t*. Could you post definition of cpuset_t ? It's possible that compiler was actually correct. For instance, compiler would be right to complain if cpuset_t is a packed structure, even if that structure is made of a single uint32_t field. > I compiled several kernels for MIPS (with sparse configurations and > they all compile well). > > If you agree with this patch, tonight I'll commit to my tree and add > the mips support for cpuset_t soon, so that it all can be tested. The downside of this patch is that it typecasts everything. Along with potentially false positive warnings it also would force compiler to ignore real errors in the code. I'd prefer to see typecast at the caller level on as-needed basis. *If* it's needed, that is. Even that is not pretty either, especially if there are many places like that. Before we decide what's the best way to deal with this I would like to get to the bottom of the original compilation issue first. I suspect we're still missing something. If you could send me a pointer to your repository and to the steps to reproduce compilation issue, I'll take a closer look at what's happening on MIPS. -Artem