From patchwork Wed Oct 7 17:45:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kyle mcmartin X-Patchwork-Id: 52318 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n97HqcnA013382 for ; Wed, 7 Oct 2009 17:52:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759694AbZJGRqd (ORCPT ); Wed, 7 Oct 2009 13:46:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759698AbZJGRqd (ORCPT ); Wed, 7 Oct 2009 13:46:33 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:33666 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759692AbZJGRqc (ORCPT ); Wed, 7 Oct 2009 13:46:32 -0400 Received: from kyle by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MvaaI-0002cd-37; Wed, 07 Oct 2009 17:45:54 +0000 Date: Wed, 7 Oct 2009 13:45:54 -0400 From: Kyle McMartin To: Andreas Mohr Cc: Arjan van de Ven , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: Re: 2.6.32-rc3: floating-point build failure (undefined reference to `__udivdi3' in menu governor) Message-ID: <20091007174553.GC11702@bombadil.infradead.org> References: <20091007104125.GA1449@rhlx01.hs-esslingen.de> <4ACCA44B.3070706@linux.intel.com> <20091007173457.GA25415@rhlx01.hs-esslingen.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20091007173457.GA25415@rhlx01.hs-esslingen.de> User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff --git a/include/linux/kernel.h b/include/linux/kernel.h index d3cd23f..4936eb6 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -51,6 +51,9 @@ extern const char linux_proc_banner[]; #define DIV_ROUND_CLOSEST(x, divisor)( \ { \ typeof(divisor) __divisor = divisor; \ + if (__builtin_types_compatible_p(typeof(divisor), unsigned long long) && \ + __builtin_popcountll(__divisor) == 1) \ + (((x) + ((__divisor) / 2) << __builtin_ffsll(__divisor))); \ (((x) + ((__divisor) / 2)) / (__divisor)); \ } \ )