From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7512BC43461 for ; Tue, 11 May 2021 18:12:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3FE1E6191D for ; Tue, 11 May 2021 18:12:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232016AbhEKSNd (ORCPT ); Tue, 11 May 2021 14:13:33 -0400 Received: from mx2.suse.de ([195.135.220.15]:54184 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231949AbhEKSN3 (ORCPT ); Tue, 11 May 2021 14:13:29 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9D96DAC38; Tue, 11 May 2021 18:12:21 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 27D1CDAF29; Tue, 11 May 2021 20:09:52 +0200 (CEST) Date: Tue, 11 May 2021 20:09:52 +0200 From: David Sterba To: Valdis =?utf-8?Q?Kl=C4=93tnieks?= Cc: Qu Wenruo , David Sterba , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Mason , Josef Bacik Subject: Re: next-20210511 - btrfs build failure on arm Message-ID: <20210511180951.GK7604@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Valdis =?utf-8?Q?Kl=C4=93tnieks?= , Qu Wenruo , David Sterba , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Mason , Josef Bacik References: <564681.1620756482@turing-police> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <564681.1620756482@turing-police> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 11, 2021 at 02:08:02PM -0400, Valdis Klētnieks wrote: > An arm allmodconfig build died with: > > ERROR: modpost: "__aeabi_uldivmod" [fs/btrfs/btrfs.ko] undefined! > > Some digging around with nm and looking at the assembler points at: > > @ /usr/src/linux-next/fs/btrfs/extent_io.c:2676: const int nr_bits = (end + 1 - start) / fs_info->sectorsize_bits; > adds r1, r1, #1 @, tmp552, > adc r0, r0, #0 @, tmp551, > ldr r3, [r5, #1576] @ tmp2, _47->sectorsize_bits > bl __aeabi_uldivmod @ > > Introduced by this commit: > > commit 6512659d8f13015dccfb38a13c6d117d22572019 > Author: Qu Wenruo > Date: Mon May 3 10:08:55 2021 +0800 > > btrfs: submit read time repair only for each corrupted sector > > Looks like that line could use something from include/linux/math.h We got another report already, there's division instead of shift (a mistake), so the expression would require u64/u32 division. The correct one is (end + 1 - start) >> fs_info->sectorsize_bits; and will be fixed in upcoming next.