[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [for-4.20][PATCH] xen/arm64: Drop relocate_and_switch_ttbr() stub
- To: Michal Orzel <michal.orzel@xxxxxxx>
- From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Date: Wed, 8 Jan 2025 09:37:11 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- 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=rXv81ywe/bdshr4y01C9FshKxkgV76u/Rmo0oTUFoNk=; b=hdfrL5bS9t39ROn1mgBtLPplI82uODvSfugXSnnTxFHPQJb+PKFzIqC5dbMq8OqWzjoC6xH/+UwafK6MNQQe/s6j/xgEjUwZqc4Kj7sHXmw3AyJYhXBGFXEIZ8n70UC8uVaW4A2X5BU10wZi1VG6ILRqC9L8qn6TH12k4k1VltIF7FJAdt/hZGPMo6oNiSoJ3nfH2S5GjuRdyhZHQ+CXj12FLJvlWGD7T7g8puF0pYmtDQrPSSxnLkTQt6FNWDg3HTtYr+74T+LnxnDHas1zTMHsX6azdkLYI2XIaUylWOEIWvK+wNQf9nH/wNrxcAKZXUL0OChYLHktfc4+clf2VQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KG/Etf0/KQZutg/lLkrzGj3a/17pwvu+JDdKr8XhlBREwyHsEyZOiu1jC2DLl98nsvEDPyrn0TdTzXbyafFUgFMnxUQRAPzm9gA/A7684lqTJPZHLvdzLkOnbbxesPRLpiKWXukt9Om7UHJbLNn/Il08HRsmUrJJGcWsSdNn95Hw1PqPHJUd5AMJvXmJu0qABnoKFdHx0LzTNSSR6bk+DynXggsR8SaeBB5MiHGLZ9+eIxEGgRMyBIveaPFnwDz3jG6RRgm1RFUTawmB5a728BbLF11daVR5dyciwIRWbtQ7nG64+OOf2uztusY8sUDwJLk1UskBjfB5zeaqDDPLyQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "oleksii.kurochko@xxxxxxxxx" <oleksii.kurochko@xxxxxxxxx>
- Delivery-date: Wed, 08 Jan 2025 09:37:19 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Thread-index: AQHbYaL71xynnWB460ejnOn44lZOwbMMnQ8A
- Thread-topic: [for-4.20][PATCH] xen/arm64: Drop relocate_and_switch_ttbr() stub
Hi Michal
> On 8 Jan 2025, at 08:57, Michal Orzel <michal.orzel@xxxxxxx> wrote:
>
> In the original patch e7a80636f16e ("xen/arm: add cache coloring support
> for Xen image"), the stub was added under wrong assumption that DCE
> won't remove the function call if it's not static. This assumption is
> incorrect as we already rely on DCE for cases like this one. Therefore
> drop the stub, that otherwise would be a place potentially prone to
> errors in the future.
>
> Suggested-by: Julien Grall <julien@xxxxxxx>
> Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
Cheers
Bertrand
> ---
> As suggested by Julien, we should have it for 4.20. Leaving a stub like that
> without something like BUG_ON inside can potentially lead to problems in
> the future provided the function misuse slipped through the review process.
> ---
> xen/arch/arm/arm64/mmu/mm.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/xen/arch/arm/arm64/mmu/mm.c b/xen/arch/arm/arm64/mmu/mm.c
> index 26361c4fe4c0..c1efa1348aee 100644
> --- a/xen/arch/arm/arm64/mmu/mm.c
> +++ b/xen/arch/arm/arm64/mmu/mm.c
> @@ -171,8 +171,6 @@ void __init relocate_and_switch_ttbr(uint64_t ttbr)
> */
> update_identity_mapping(false);
> }
> -#else
> -void __init relocate_and_switch_ttbr(uint64_t ttbr) {}
> #endif
>
> void __init switch_ttbr(uint64_t ttbr)
> --
> 2.25.1
>
|