[PATCH 2/3] x86/apic: Drop enum apic_delivery_modes

Andrew Cooper posted 3 patches 2 years, 1 month ago
Only 1 patches received!
[PATCH 2/3] x86/apic: Drop enum apic_delivery_modes
Posted by Andrew Cooper 2 years, 1 month ago
The type is not used any more.

Replace the constants with plain defines so they can live outside of an
__ASSEMBLY__ block, allowing for more cleanup in subsequent changes.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 arch/x86/include/asm/apicdef.h | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/arch/x86/include/asm/apicdef.h b/arch/x86/include/asm/apicdef.h
index 4b125e5b3187..ddcbf00db19d 100644
--- a/arch/x86/include/asm/apicdef.h
+++ b/arch/x86/include/asm/apicdef.h
@@ -20,6 +20,13 @@
  */
 #define IO_APIC_SLOT_SIZE		1024
 
+#define APIC_DELIVERY_MODE_FIXED	0
+#define APIC_DELIVERY_MODE_LOWESTPRIO	1
+#define APIC_DELIVERY_MODE_SMI		2
+#define APIC_DELIVERY_MODE_NMI		4
+#define APIC_DELIVERY_MODE_INIT		5
+#define APIC_DELIVERY_MODE_EXTINT	7
+
 #define	APIC_ID		0x20
 
 #define	APIC_LVR	0x30
@@ -430,14 +437,5 @@ struct local_apic {
  #define BAD_APICID 0xFFFFu
 #endif
 
-enum apic_delivery_modes {
-	APIC_DELIVERY_MODE_FIXED	= 0,
-	APIC_DELIVERY_MODE_LOWESTPRIO   = 1,
-	APIC_DELIVERY_MODE_SMI		= 2,
-	APIC_DELIVERY_MODE_NMI		= 4,
-	APIC_DELIVERY_MODE_INIT		= 5,
-	APIC_DELIVERY_MODE_EXTINT	= 7,
-};
-
 #endif /* !__ASSEMBLY__ */
 #endif /* _ASM_X86_APICDEF_H */

-- 
2.30.2
Re: [PATCH 2/3] x86/apic: Drop enum apic_delivery_modes
Posted by Steve Wahl 2 years, 1 month ago
On Thu, Nov 02, 2023 at 12:26:20PM +0000, Andrew Cooper wrote:
> The type is not used any more.
> 
> Replace the constants with plain defines so they can live outside of an
> __ASSEMBLY__ block, allowing for more cleanup in subsequent changes.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reveiewed-by: Steve Wahl <steve.wahl@hpe.com>

> ---
>  arch/x86/include/asm/apicdef.h | 16 +++++++---------
>  1 file changed, 7 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/x86/include/asm/apicdef.h b/arch/x86/include/asm/apicdef.h
> index 4b125e5b3187..ddcbf00db19d 100644
> --- a/arch/x86/include/asm/apicdef.h
> +++ b/arch/x86/include/asm/apicdef.h
> @@ -20,6 +20,13 @@
>   */
>  #define IO_APIC_SLOT_SIZE		1024
>  
> +#define APIC_DELIVERY_MODE_FIXED	0
> +#define APIC_DELIVERY_MODE_LOWESTPRIO	1
> +#define APIC_DELIVERY_MODE_SMI		2
> +#define APIC_DELIVERY_MODE_NMI		4
> +#define APIC_DELIVERY_MODE_INIT		5
> +#define APIC_DELIVERY_MODE_EXTINT	7
> +
>  #define	APIC_ID		0x20
>  
>  #define	APIC_LVR	0x30
> @@ -430,14 +437,5 @@ struct local_apic {
>   #define BAD_APICID 0xFFFFu
>  #endif
>  
> -enum apic_delivery_modes {
> -	APIC_DELIVERY_MODE_FIXED	= 0,
> -	APIC_DELIVERY_MODE_LOWESTPRIO   = 1,
> -	APIC_DELIVERY_MODE_SMI		= 2,
> -	APIC_DELIVERY_MODE_NMI		= 4,
> -	APIC_DELIVERY_MODE_INIT		= 5,
> -	APIC_DELIVERY_MODE_EXTINT	= 7,
> -};
> -
>  #endif /* !__ASSEMBLY__ */
>  #endif /* _ASM_X86_APICDEF_H */
> 
> -- 
> 2.30.2
> 

-- 
Steve Wahl, Hewlett Packard Enterprise
[tip: x86/apic] x86/apic: Drop enum apic_delivery_modes
Posted by tip-bot2 for Andrew Cooper 2 years, 1 month ago
The following commit has been merged into the x86/apic branch of tip:

Commit-ID:     855da7cdf974f3902397e5bf9423c7442bdfd75f
Gitweb:        https://git.kernel.org/tip/855da7cdf974f3902397e5bf9423c7442bdfd75f
Author:        Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate:    Thu, 02 Nov 2023 12:26:20 
Committer:     Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Tue, 21 Nov 2023 17:05:06 +01:00

x86/apic: Drop enum apic_delivery_modes

The type is not used any more.

Replace the constants with plain defines so they can live outside of an
__ASSEMBLY__ block, allowing for more cleanup in subsequent changes.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Steve Wahl <steve.wahl@hpe.com>
Link: https://lore.kernel.org/r/20231102-x86-apic-v1-2-bf049a2a0ed6@citrix.com
---
 arch/x86/include/asm/apicdef.h | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/arch/x86/include/asm/apicdef.h b/arch/x86/include/asm/apicdef.h
index 4b125e5..ddcbf00 100644
--- a/arch/x86/include/asm/apicdef.h
+++ b/arch/x86/include/asm/apicdef.h
@@ -20,6 +20,13 @@
  */
 #define IO_APIC_SLOT_SIZE		1024
 
+#define APIC_DELIVERY_MODE_FIXED	0
+#define APIC_DELIVERY_MODE_LOWESTPRIO	1
+#define APIC_DELIVERY_MODE_SMI		2
+#define APIC_DELIVERY_MODE_NMI		4
+#define APIC_DELIVERY_MODE_INIT		5
+#define APIC_DELIVERY_MODE_EXTINT	7
+
 #define	APIC_ID		0x20
 
 #define	APIC_LVR	0x30
@@ -430,14 +437,5 @@ struct local_apic {
  #define BAD_APICID 0xFFFFu
 #endif
 
-enum apic_delivery_modes {
-	APIC_DELIVERY_MODE_FIXED	= 0,
-	APIC_DELIVERY_MODE_LOWESTPRIO   = 1,
-	APIC_DELIVERY_MODE_SMI		= 2,
-	APIC_DELIVERY_MODE_NMI		= 4,
-	APIC_DELIVERY_MODE_INIT		= 5,
-	APIC_DELIVERY_MODE_EXTINT	= 7,
-};
-
 #endif /* !__ASSEMBLY__ */
 #endif /* _ASM_X86_APICDEF_H */
[tip: x86/apic] x86/apic: Drop enum apic_delivery_modes
Posted by tip-bot2 for Andrew Cooper 2 years, 1 month ago
The following commit has been merged into the x86/apic branch of tip:

Commit-ID:     7c9158231f42e574f8290e15ea56d108ca49e583
Gitweb:        https://git.kernel.org/tip/7c9158231f42e574f8290e15ea56d108ca49e583
Author:        Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate:    Thu, 02 Nov 2023 12:26:20 
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 21 Nov 2023 09:37:30 +01:00

x86/apic: Drop enum apic_delivery_modes

The type is not used any more.

Replace the constants with plain defines so they can live outside of an
__ASSEMBLY__ block, allowing for more cleanup in subsequent changes.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Steve Wahl <steve.wahl@hpe.com>
Link: https://lore.kernel.org/r/20231102-x86-apic-v1-2-bf049a2a0ed6@citrix.com


---
 arch/x86/include/asm/apicdef.h | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/arch/x86/include/asm/apicdef.h b/arch/x86/include/asm/apicdef.h
index 4b125e5..ddcbf00 100644
--- a/arch/x86/include/asm/apicdef.h
+++ b/arch/x86/include/asm/apicdef.h
@@ -20,6 +20,13 @@
  */
 #define IO_APIC_SLOT_SIZE		1024
 
+#define APIC_DELIVERY_MODE_FIXED	0
+#define APIC_DELIVERY_MODE_LOWESTPRIO	1
+#define APIC_DELIVERY_MODE_SMI		2
+#define APIC_DELIVERY_MODE_NMI		4
+#define APIC_DELIVERY_MODE_INIT		5
+#define APIC_DELIVERY_MODE_EXTINT	7
+
 #define	APIC_ID		0x20
 
 #define	APIC_LVR	0x30
@@ -430,14 +437,5 @@ struct local_apic {
  #define BAD_APICID 0xFFFFu
 #endif
 
-enum apic_delivery_modes {
-	APIC_DELIVERY_MODE_FIXED	= 0,
-	APIC_DELIVERY_MODE_LOWESTPRIO   = 1,
-	APIC_DELIVERY_MODE_SMI		= 2,
-	APIC_DELIVERY_MODE_NMI		= 4,
-	APIC_DELIVERY_MODE_INIT		= 5,
-	APIC_DELIVERY_MODE_EXTINT	= 7,
-};
-
 #endif /* !__ASSEMBLY__ */
 #endif /* _ASM_X86_APICDEF_H */
  • [PATCH 2/3] x86/apic: Drop enum apic_delivery_modes