2023-07-17 23:33:35

by Thomas Gleixner

[permalink] [raw]
Subject: [patch 54/58] x86/xen/apic: Mark apic __ro_after_init

Nothing can change it post init.

While at it mop up the whitespace damage which causes eyebleed due to an
editor which is highlighting it.

Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Juergen Gross <[email protected]>
---
arch/x86/xen/apic.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

--- a/arch/x86/xen/apic.c
+++ b/arch/x86/xen/apic.c
@@ -123,9 +123,9 @@ static int xen_cpu_present_to_apicid(int
return BAD_APICID;
}

-static struct apic xen_pv_apic = {
- .name = "Xen PV",
- .probe = xen_apic_probe_pv,
+static struct apic xen_pv_apic __ro_after_init = {
+ .name = "Xen PV",
+ .probe = xen_apic_probe_pv,
.acpi_madt_oem_check = xen_madt_oem_check,

/* .delivery_mode and .dest_mode_logical not used by XENPV */
@@ -138,24 +138,24 @@ static struct apic xen_pv_apic = {
.phys_pkg_id = xen_phys_pkg_id, /* detect_ht */

.max_apic_id = UINT_MAX,
- .get_apic_id = xen_get_apic_id,
- .set_apic_id = xen_set_apic_id, /* Can be NULL on 32-bit. */
+ .get_apic_id = xen_get_apic_id,
+ .set_apic_id = xen_set_apic_id, /* Can be NULL on 32-bit. */

.calc_dest_apicid = apic_flat_calc_apicid,

#ifdef CONFIG_SMP
- .send_IPI_mask = xen_send_IPI_mask,
- .send_IPI_mask_allbutself = xen_send_IPI_mask_allbutself,
- .send_IPI_allbutself = xen_send_IPI_allbutself,
- .send_IPI_all = xen_send_IPI_all,
- .send_IPI_self = xen_send_IPI_self,
+ .send_IPI_mask = xen_send_IPI_mask,
+ .send_IPI_mask_allbutself = xen_send_IPI_mask_allbutself,
+ .send_IPI_allbutself = xen_send_IPI_allbutself,
+ .send_IPI_all = xen_send_IPI_all,
+ .send_IPI_self = xen_send_IPI_self,
#endif
.read = xen_apic_read,
.write = xen_apic_write,
.eoi = xen_apic_eoi,

- .icr_read = xen_apic_icr_read,
- .icr_write = xen_apic_icr_write,
+ .icr_read = xen_apic_icr_read,
+ .icr_write = xen_apic_icr_write,
};

static void __init xen_apic_check(void)



2023-07-18 16:13:06

by Thomas Gleixner

[permalink] [raw]
Subject: Re: [patch 54/58] x86/xen/apic: Mark apic __ro_after_init

On Tue, Jul 18 2023 at 17:31, Juergen Gross wrote:
> On 18.07.23 01:15, Thomas Gleixner wrote:
>> + .get_apic_id = xen_get_apic_id,
>> + .set_apic_id = xen_set_apic_id, /* Can be NULL on 32-bit. */
>
> While changing this line, could you please drop the comment here?
>
> 32-bit is irrelevant, as Xen PV is 64-bit only these days.

Sure.

2023-07-18 16:26:18

by Juergen Gross

[permalink] [raw]
Subject: Re: [patch 54/58] x86/xen/apic: Mark apic __ro_after_init

On 18.07.23 01:15, Thomas Gleixner wrote:
> Nothing can change it post init.
>
> While at it mop up the whitespace damage which causes eyebleed due to an
> editor which is highlighting it.
>
> Signed-off-by: Thomas Gleixner <[email protected]>
> Cc: Juergen Gross <[email protected]>
> ---
> arch/x86/xen/apic.c | 24 ++++++++++++------------
> 1 file changed, 12 insertions(+), 12 deletions(-)
>
> --- a/arch/x86/xen/apic.c
> +++ b/arch/x86/xen/apic.c
> @@ -123,9 +123,9 @@ static int xen_cpu_present_to_apicid(int
> return BAD_APICID;
> }
>
> -static struct apic xen_pv_apic = {
> - .name = "Xen PV",
> - .probe = xen_apic_probe_pv,
> +static struct apic xen_pv_apic __ro_after_init = {
> + .name = "Xen PV",
> + .probe = xen_apic_probe_pv,
> .acpi_madt_oem_check = xen_madt_oem_check,
>
> /* .delivery_mode and .dest_mode_logical not used by XENPV */
> @@ -138,24 +138,24 @@ static struct apic xen_pv_apic = {
> .phys_pkg_id = xen_phys_pkg_id, /* detect_ht */
>
> .max_apic_id = UINT_MAX,
> - .get_apic_id = xen_get_apic_id,
> - .set_apic_id = xen_set_apic_id, /* Can be NULL on 32-bit. */
> + .get_apic_id = xen_get_apic_id,
> + .set_apic_id = xen_set_apic_id, /* Can be NULL on 32-bit. */

While changing this line, could you please drop the comment here?

32-bit is irrelevant, as Xen PV is 64-bit only these days.


Juergen


Attachments:
OpenPGP_0xB0DE9DD628BF132F.asc (3.08 kB)
OpenPGP public key
OpenPGP_signature (505.00 B)
OpenPGP digital signature
Download all attachments

2023-07-18 16:31:48

by Juergen Gross

[permalink] [raw]
Subject: Re: [patch 54/58] x86/xen/apic: Mark apic __ro_after_init

On 18.07.23 01:15, Thomas Gleixner wrote:
> Nothing can change it post init.
>
> While at it mop up the whitespace damage which causes eyebleed due to an
> editor which is highlighting it.
>
> Signed-off-by: Thomas Gleixner <[email protected]>
> Cc: Juergen Gross <[email protected]>
> ---
> arch/x86/xen/apic.c | 24 ++++++++++++------------
> 1 file changed, 12 insertions(+), 12 deletions(-)
>
> --- a/arch/x86/xen/apic.c
> +++ b/arch/x86/xen/apic.c
> @@ -123,9 +123,9 @@ static int xen_cpu_present_to_apicid(int
> return BAD_APICID;
> }
>
> -static struct apic xen_pv_apic = {
> - .name = "Xen PV",
> - .probe = xen_apic_probe_pv,
> +static struct apic xen_pv_apic __ro_after_init = {
> + .name = "Xen PV",
> + .probe = xen_apic_probe_pv,
> .acpi_madt_oem_check = xen_madt_oem_check,
>
> /* .delivery_mode and .dest_mode_logical not used by XENPV */
> @@ -138,24 +138,24 @@ static struct apic xen_pv_apic = {

One additional note: you could drop initializing .check_apicid_used and
.ioapic_phys_id_map in xen_pv_apic as well, as those are 32-bit only, too.


Juergen


Attachments:
OpenPGP_0xB0DE9DD628BF132F.asc (3.08 kB)
OpenPGP public key
OpenPGP_signature (505.00 B)
OpenPGP digital signature
Download all attachments