[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 2/4] xen: change <asm/bug.h> to <xen/bug.h>


  • To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 8 Mar 2023 16:27:19 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=TM3Zv1SzQkBx0fR6jPQIbDNmcU4Ogxcs7V6Qd7eVixI=; b=gNzYg3akT/sNuJLKX8zF9Gmj0ZTp6AS4Z5Rw7DfPwjSDYh3IfxegYUC0u37Ifk7v6nSqZTJuhBKKZ4wQAEeqyyf5Mkr3YjP9QwsX73qafrzFn3jcHrcQqo6FVMWkVQrt8Lksrh2RlqckRieLK8j3HukgC6YrvgwtL3Lnb+//HvxZsLdaaIJfEvISQYocJ+uTpBF8r6Na/X9IRW39py88Dlh0A9xCajk1y5nIDsm0hF5dZj6iI8M+nbQchHpXL8GBUdZso1zLJUQMta9ytrmM1EikF1ezAq0C0f37h4t9F8C7SWldKwjdyQ6sc8LowHOonqH+tXqaR6KOH86dqPnAKA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c8GQF30Rfi6IDp1sRqGhqMhNNHnbar1thAYeCKaMkfTs0OBze8ajZrm/U2/SMQd/++3ZRZ57j5wKqdJDaSmKq12Y3AG+tlZqd9CXH65+jApHAG7j/xYTSSjzesReSyVSy7a9YciVpC8DbP8TOL1NOlYb5BwkGMvoT65DLSZqqt2HlSPltp6da3OFyLjFT4+SpEQ6R7zibXcp6XHpRZNc3Nto6FJro/h8bpdicEyH5UYX6PwqygGOj/YRoJzRbxPOUbTQOVcT1DO6ucz+52qwXHrF2nF+k3LZIdDqL/vVO/aj5olsSt7CWgSQ6qvIS37BrZwddCfn6DB3zCYodlVnwg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Julien Grall <julien@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Gianluca Guida <gianluca@xxxxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 08 Mar 2023 15:27:29 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.03.2023 16:50, Oleksii Kurochko wrote:
> --- a/xen/arch/arm/include/asm/bug.h
> +++ b/xen/arch/arm/include/asm/bug.h
> @@ -1,6 +1,8 @@
>  #ifndef __ARM_BUG_H__
>  #define __ARM_BUG_H__
>  
> +#include <xen/types.h>
> +
>  #if defined(CONFIG_ARM_32)
>  # include <asm/arm32/bug.h>
>  #elif defined(CONFIG_ARM_64)
> @@ -9,10 +11,16 @@
>  # error "unknown ARM variant"
>  #endif
>  
> +#undef BUG_DISP_WIDTH
> +#undef BUG_LINE_LO_WIDTH
> +#undef BUG_LINE_HI_WIDTH

Why? For Arm ...

>  #define BUG_DISP_WIDTH    24
>  #define BUG_LINE_LO_WIDTH (31 - BUG_DISP_WIDTH)
>  #define BUG_LINE_HI_WIDTH (31 - BUG_DISP_WIDTH)

... you could purge these as unused, even in a standalone prereq patch.
And on x86 ...

> --- a/xen/arch/x86/include/asm/bug.h
> +++ b/xen/arch/x86/include/asm/bug.h
> @@ -1,19 +1,18 @@
>  #ifndef __X86_BUG_H__
>  #define __X86_BUG_H__
>  
> +#undef BUG_DISP_WIDTH
> +#undef BUG_LINE_LO_WIDTH
> +#undef BUG_LINE_HI_WIDTH
> +
>  #define BUG_DISP_WIDTH    24
>  #define BUG_LINE_LO_WIDTH (31 - BUG_DISP_WIDTH)
>  #define BUG_LINE_HI_WIDTH (31 - BUG_DISP_WIDTH)

... there's no reason to #undef just to the #define again to the same
values. All of this would be removed in a subsequent patch anyway, and
it's less code churn (with code nevertheless being correct) if you get
rid of the #define-s right away (as iirc you had it in an earlier
version). If you agree then with these adjustments
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.