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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E828C46467 for ; Wed, 18 Jan 2023 16:43:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229802AbjARQng (ORCPT ); Wed, 18 Jan 2023 11:43:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230344AbjARQnH (ORCPT ); Wed, 18 Jan 2023 11:43:07 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 037BE36FE7; Wed, 18 Jan 2023 08:42:22 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id r21so5355653plg.13; Wed, 18 Jan 2023 08:42:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=KQ5UR3/Xa0Iypn0NjAFlzAel5UzlsAahE0Mxf3hKvNI=; b=HtEWoLc8/L8ms4jJfUX7yuSxC/Ev6BsvXo78m11rO02Mzvft0bqOU5nHJgEf2x1UOF /frnN6FGr41Nzz9l7f4WNhNmhFM+Hfgqp8pt3ow80dUdKeRavboRhpPEoyCbap8j3Fxy wEocSwLplENYxRNL0PmIkZOLr9oWalRRzl2+xOKKJawaoTvVPMks6Qc17rxKKr3B5d0V qss+BaOxZucT4h29rQah3MOgKACtPm5b+WhTWvXH7xQqoz2v7+pDlfBBlECIGW2XTIIG dx5jRtIW6M5uiMLHssv7ZCc8/7Yre8vncxwYpn2gyCTGVEYlUzpml7Flz0KFVJ1gBlwY zwpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KQ5UR3/Xa0Iypn0NjAFlzAel5UzlsAahE0Mxf3hKvNI=; b=BH5nny4P2NZUutfGZwJ/DpBMIgxuWu1N0cTASWfC+VlHsz1VbFsj9AHv2q4JgjPAQe aP1lcc9tsa754mVV4TtJ/LAcjy9ZbEFSfmg1U6qCh7AFsf2bDrH3G9RLA3uV3Bescosl 3gZj0pKu8HhCdvJc/5SW7W5CDIz/fcIpx2209fQRkUF6XdNbfoftMiaO5NPL1oQTI0vm Xu/8voY1aJidL7hlowI+J1UMBode5EnlekvXXUI+ZDrbLxBhMX6GAo4/yrrxWqhuKpbQ 4A8LsGSgQqliPU5qUKTijctPpJbNabBiCP1AMFY2sFMT/236kdAx06mpYK5dQb/LLT00 OQdg== X-Gm-Message-State: AFqh2kprUe6sgfJwAPmPdvff8cOMhAZg33sdUglCX78ETMRePiYAJ9YL NA+JBIQqkre7StsJZ3k3Jms= X-Google-Smtp-Source: AMrXdXueQTctacY4LEDI4404AeLAbKX2kqptjDwyJqnpB1bBvgnsXJapr6+bC4djWGYj98C7/xZDFQ== X-Received: by 2002:a17:90a:88c:b0:226:8d3:7ed6 with SMTP id v12-20020a17090a088c00b0022608d37ed6mr7730465pjc.41.1674060141694; Wed, 18 Jan 2023 08:42:21 -0800 (PST) Received: from localhost (2603-800c-1a02-1bae-a7fa-157f-969a-4cde.res6.spectrum.com. [2603:800c:1a02:1bae:a7fa:157f:969a:4cde]) by smtp.gmail.com with ESMTPSA id t7-20020a17090a024700b00228fe43d959sm1578813pje.5.2023.01.18.08.42.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 08:42:21 -0800 (PST) Sender: Tejun Heo Date: Wed, 18 Jan 2023 06:42:19 -1000 From: Tejun Heo To: Arnd Bergmann Cc: Josef Bacik , Jens Axboe , Arnd Bergmann , Kemeng Shi , Andreas Herrmann , Yu Kuai , Chengming Zhou , Jinke Han , cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] blk-iocost: avoid 64-bit division in ioc_timer_fn Message-ID: References: <20230118080706.3303186-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230118080706.3303186-1-arnd@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 18, 2023 at 09:07:01AM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > The behavior of 'enum' types has changed in gcc-13, so now the > UNBUSY_THR_PCT constant is interpreted as a 64-bit number because > it is defined as part of the same enum definition as some other > constants that do not fit within a 32-bit integer. This in turn > leads to some inefficient code on 32-bit architectures as well > as a link error: > > arm-linux-gnueabi/bin/arm-linux-gnueabi-ld: block/blk-iocost.o: in function `ioc_timer_fn': > blk-iocost.c:(.text+0x68e8): undefined reference to `__aeabi_uldivmod' > arm-linux-gnueabi-ld: blk-iocost.c:(.text+0x6908): undefined reference to `__aeabi_uldivmod' > > Split the enum definition to keep the 64-bit timing constants in > a separate enum type from those constants that can clearly fit > within a smaller type. > > Signed-off-by: Arnd Bergmann Acked-by: Tejun Heo Thanks. -- tejun