[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y8gha8kL5yG3RQ2w@slm.duckdns.org>
Date: Wed, 18 Jan 2023 06:42:19 -1000
From: Tejun Heo <tj@...nel.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Josef Bacik <josef@...icpanda.com>, Jens Axboe <axboe@...nel.dk>,
Arnd Bergmann <arnd@...db.de>,
Kemeng Shi <shikemeng@...wei.com>,
Andreas Herrmann <aherrmann@...e.de>,
Yu Kuai <yukuai3@...wei.com>,
Chengming Zhou <zhouchengming@...edance.com>,
Jinke Han <hanjinke.666@...edance.com>,
cgroups@...r.kernel.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] blk-iocost: avoid 64-bit division in ioc_timer_fn
On Wed, Jan 18, 2023 at 09:07:01AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> 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 <arnd@...db.de>
Acked-by: Tejun Heo <tj@...nel.org>
Thanks.
--
tejun
Powered by blists - more mailing lists