Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753516AbbHMQ2h (ORCPT ); Thu, 13 Aug 2015 12:28:37 -0400 Received: from mail-io0-f175.google.com ([209.85.223.175]:33236 "EHLO mail-io0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752584AbbHMQ2g (ORCPT ); Thu, 13 Aug 2015 12:28:36 -0400 MIME-Version: 1.0 In-Reply-To: <20150813061109.29409.qmail@ns.horizon.com> References: <20150813061109.29409.qmail@ns.horizon.com> Date: Thu, 13 Aug 2015 09:28:35 -0700 X-Google-Sender-Auth: zR3c9LP12ZcWeBvq1ypiZCVBUck Message-ID: Subject: Re: enabling libgcc for 64-bit divisions, was Re: PROBLEM: XFS on ARM corruption 'Structure needs cl From: Linus Torvalds To: George Spelvin Cc: Christoph Hellwig , "linux-arm-kernel@lists.infradead.org" , Linux Kernel Mailing List , Andrew Lutomirski Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 816 Lines: 22 On Wed, Aug 12, 2015 at 11:11 PM, George Spelvin wrote: > > Agreed. But some x86 code I'm working on now, I have a *lot* of > asm("divl") calls because even do_div isn't great for 64/32->32 division. Yeah. I'm not convinced that "64/32->32" is all that generic, though. If the dividend in 64-bit, there's no fundamental type-based guarantee that things will fit. So your case is rather special, and depends (intimately) on knowing the actual ranges and how they interact. That's not a generic situation like "do_div()". Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/