From owner-svn-src-head@freebsd.org Sat Apr 30 19:24:51 2016 Return-Path: Delivered-To: svn-src-head@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 A4A9FAD9F2D; Sat, 30 Apr 2016 19:24:51 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-oi0-x22d.google.com (mail-oi0-x22d.google.com [IPv6:2607:f8b0:4003:c06::22d]) (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 6B6181ECE; Sat, 30 Apr 2016 19:24:51 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-oi0-x22d.google.com with SMTP id v145so119388995oie.0; Sat, 30 Apr 2016 12:24:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=skRpxMPj7NIUGEvaN7F/rZfUU7JP05gq1iKhJ6kMJ9o=; b=T5R8tZ5Ikpp8lIy99617eTHXbHOkSeSm4LPLRNwF3OfhCGankLDuUrOjdZqvmh8rYR CHF6XVVSeJKLVPb+Q41prni+SMm8tNMuv7pVt3bzfhR5CVevrR1nu/hsQpvlNa23JFIN ZqcuGxMY+NVTtEno8eYzJcT3/NYzH346zxJTIOdo+uAYHRRyZq3idwDSsXIXtS7uUM5l HeoIseTIy1qcolfXpD3D1x8NUsyKtyoTSRkmMSJXS0pTBtbziAwcP1T9RBEtgQyiKH5b ZrmOxTIHj12/pyjUvy26gImQfBpJW7DWDAiuUJ6m9wO5PZeCPDDH9qZx6zxCHwQWMOpl mj5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=skRpxMPj7NIUGEvaN7F/rZfUU7JP05gq1iKhJ6kMJ9o=; b=iwWr4Pn9ocbZ0/S7FSTsIkk7uuKXDyuKWLsXpjuYTXQRMNNYqbtmIv18trB8hUq2UR 5p9btrn3sMkXXBSsdn0kIpm0iz/hlFX4a033WCFz/GNZP6f0pt0MlNwNXsgfDmoTf/oa jwtbQewz8mV/nGeKr/BJb1yDRNp4q3gF8eIF5vI9+hc2WwfWF1cUkk9/8/YNwgogSm+N C1hzTbS1cz7xF/f2JZBO6+jycOgABL80XvLUjCQQx776BFduDeBs8BDTzjqJ3MFhZoX8 QAGlqatBKITEGMcv9c/6zj/j8PVzyABwXlyR/MJ08t56RB6boyRJu63bKzO7rVS+fwyc Dl6w== X-Gm-Message-State: AOPr4FW16i4IcJiAroT+RJQnXo8MUjYJOz7xQwC/UBdK6uhylbBY5PI8I92DKsP2zg0LuD9CTwybCYBQLTBLjw== MIME-Version: 1.0 X-Received: by 10.157.26.16 with SMTP id a16mr12925696ote.5.1462044290862; Sat, 30 Apr 2016 12:24:50 -0700 (PDT) Received: by 10.182.105.74 with HTTP; Sat, 30 Apr 2016 12:24:50 -0700 (PDT) Received: by 10.182.105.74 with HTTP; Sat, 30 Apr 2016 12:24:50 -0700 (PDT) In-Reply-To: <201604301856.u3UIuZpi026290@repo.freebsd.org> References: <201604301856.u3UIuZpi026290@repo.freebsd.org> Date: Sat, 30 Apr 2016 14:24:50 -0500 Message-ID: Subject: Re: svn commit: r298856 - head/sys/powerpc/powerpc From: Justin Hibbits To: Pedro Giffuni Cc: src-committers , svn-src-head@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Apr 2016 19:24:51 -0000 On Apr 30, 2016 13:56, "Pedro F. Giffuni" wrote: > > Author: pfg > Date: Sat Apr 30 18:56:35 2016 > New Revision: 298856 > URL: https://svnweb.freebsd.org/changeset/base/298856 > > Log: > powerpc: Make use of our rounddown() macro when sys/param.h is available. > > No functional change. > > Modified: > head/sys/powerpc/powerpc/exec_machdep.c > > Modified: head/sys/powerpc/powerpc/exec_machdep.c > ============================================================================== > --- head/sys/powerpc/powerpc/exec_machdep.c Sat Apr 30 18:07:13 2016 (r298855) > +++ head/sys/powerpc/powerpc/exec_machdep.c Sat Apr 30 18:56:35 2016 (r298856) > @@ -162,7 +162,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, > code = siginfo32.si_code; > sfp = (caddr_t)&sf32; > sfpsize = sizeof(sf32); > - rndfsize = ((sizeof(sf32) + 15) / 16) * 16; > + rndfsize = rounddown(sizeof(sf32) + 15, 16); > > /* > * Save user context > @@ -189,9 +189,9 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, > * 64-bit PPC defines a 288 byte scratch region > * below the stack. > */ > - rndfsize = 288 + ((sizeof(sf) + 47) / 48) * 48; > + rndfsize = 288 + rounddown(sizeof(sf) + 47, 48); > #else > - rndfsize = ((sizeof(sf) + 15) / 16) * 16; > + rndfsize = rounddown(sizeof(sf) + 15, 16); > #endif > > /* > I think these should all be roundup(sizeof(sf), (16 or 48)). - Justin