[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/5] xen: Split muldiv64() out of lib.h
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: "Orzel, Michal" <michal.orzel@xxxxxxx>
- Date: Wed, 7 Jan 2026 10:28:43 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UoDb6Q8KguDMR7LN1tfDEbuUdx8ct0CfkvN6WWC19FU=; b=FMo2FkrMpZVXFGt3h666nKnpbx2Lsrxqv8/glRoZ9k1EROhcA2d3VcS/s7kZdYsSPVDmAuskzhocLMMXqxNBnKTWF0hc01vWPmR53m+13u+MHYwH/4DGkh8ULCyzesACkW7+uHRYm+CTpo/V3wfffrd2Lxni6C6XkRi9wVpj0cH6Eve1pGIPueWxFhUjgHjTzgvOMeSSB6pSXUOoBT9AHTNUpWhaEu9zDhQE28ecQDqh2fwFmJdXVKcE5ZzdH6HIWqJBXzw8mLo5hssXsv8pDWNjExTJzNMVFoe2A5OP03mbebSgDi4TztLteuJHqQuw+vmaUreQDi6jMe3C87GRNg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RPWXYHpYGShufnPfGbuxYGQHOoK8VRQvaU8CEIC0BwLAgSyuNqH72oTKwkpa158M/BMe3U047fnBRSn0+RY8BnQh+jYUmNOfbh/V+gvJNyzectBp9undCaO8s+EfrZSNc4bAM+tYZxBSIl+rN1YasHyBQ152xr6OCXToUvFzlJGlWGxGLX2s1WGeQ4nj6FmGu7AA/QW4NqNBl55Xkzy7W/pjBDcFmpZzProRBpfjD744Qwg3di6uKuSvphpabs6Fpwq52ZMqlrqld8LTBrROsmaxuXj+inc5Unnkm65BGN8OHAASfLN8/E5ArIhbW9Xe7AdLkcxjk3ktWyn3acAwyA==
- Cc: Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Julien Grall" <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
- Delivery-date: Wed, 07 Jan 2026 09:28:55 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 30/12/2025 14:50, Andrew Cooper wrote:
> muldiv64() has 7 users across all architectures, and is limited to time
> handling functions. Therefore, move it's declaration out of lib.h into a
> dedicated header.
>
> Rename the library function to generic_muldiv64(), as x86 is going to provide
> an arch_muldiv64() in a subsequent change.
>
> Explain what the function does, including the limitations; x86's version will
> suffer a divide error rather than truncate the result to 64 bits.
>
> Annotate it with attr_const, not that this allows the optimiser to improve any
> of Xen's current users. Add one selftest to check the internal precision,
> putting it in bitops.c for want of any better place to locate it.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
For Arm:
Acked-by: Michal Orzel <michal.orzel@xxxxxxx>
~Michal
|