Re: [PATCH 2/4] xen/xlat: Sort structs per file

2024-04-18 Thread Jan Beulich
On 15.04.2024 17:41, Andrew Cooper wrote:
> Signed-off-by: Andrew Cooper 

While I don't mind the change as is, "sort" is ambiguous here in one regard.
Personally I'd prefer if those parts of the change were dropped, but I can
live with the sorting criteria being spelled out in the description:

> @@ -40,13 +40,6 @@
>  
>  ?cpu_offline_action  arch-x86/xen-mca.h
>  ?mc  arch-x86/xen-mca.h
> -?mcinfo_bank arch-x86/xen-mca.h
> -?mcinfo_common   arch-x86/xen-mca.h
> -?mcinfo_extended arch-x86/xen-mca.h
> -?mcinfo_global   arch-x86/xen-mca.h
> -?mcinfo_logical_cpu  arch-x86/xen-mca.h
> -?mcinfo_msr  arch-x86/xen-mca.h
> -?mcinfo_recovery arch-x86/xen-mca.h
>  !mc_fetcharch-x86/xen-mca.h
>  ?mc_info arch-x86/xen-mca.h
>  ?mc_inject_v2arch-x86/xen-mca.h
> @@ -54,6 +47,13 @@
>  ?mc_msrinjectarch-x86/xen-mca.h
>  ?mc_notifydomain arch-x86/xen-mca.h
>  !mc_physcpuinfo  arch-x86/xen-mca.h
> +?mcinfo_bank arch-x86/xen-mca.h
> +?mcinfo_common   arch-x86/xen-mca.h
> +?mcinfo_extended arch-x86/xen-mca.h
> +?mcinfo_global   arch-x86/xen-mca.h
> +?mcinfo_logical_cpu  arch-x86/xen-mca.h
> +?mcinfo_msr  arch-x86/xen-mca.h
> +?mcinfo_recovery arch-x86/xen-mca.h
>  ?page_offline_action arch-x86/xen-mca.h

Imo this sorting was fine (at least one further instance below): Whether
underscore sorts ahead of lower case letters depends on how sorting is done.
I take you assume sorting as per the C locale, when the original sorting was
considering undercores to be separators, i.e. in a different character class
(together with e.g. dash or tilde).

When using C local sorting, I think arch-x86/xen-@arch@.h also would need
moving past arch-x86/xen.h (whereas right now all separators are deemed
equal and hence @ comes ahead of h which in turn is ahead of m).

Jan



Re: [PATCH 2/4] xen/xlat: Sort structs per file

2024-04-15 Thread Stefano Stabellini
On Mon, 15 Apr 2024, Andrew Cooper wrote:
> Signed-off-by: Andrew Cooper 

Reviewed-by: Stefano Stabellini 




[PATCH 2/4] xen/xlat: Sort structs per file

2024-04-15 Thread Andrew Cooper
Signed-off-by: Andrew Cooper 
---
CC: George Dunlap 
CC: Jan Beulich 
CC: Stefano Stabellini 
CC: Julien Grall 
---
 xen/include/xlat.lst | 40 
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/xen/include/xlat.lst b/xen/include/xlat.lst
index e811342bb096..b3befd9cc113 100644
--- a/xen/include/xlat.lst
+++ b/xen/include/xlat.lst
@@ -22,11 +22,11 @@
 # ? - needs checking
 
 ?  dom0_vga_console_info   xen.h
-?  xenctl_bitmap   xen.h
 ?  mmu_update  xen.h
 !  mmuext_op   xen.h
 !  start_info  xen.h
 ?  vcpu_time_info  xen.h
+?  xenctl_bitmap   xen.h
 
 ?  pmu_amd_ctxtarch-x86/pmu.h
 ?  pmu_archarch-x86/pmu.h
@@ -40,13 +40,6 @@
 
 ?  cpu_offline_action  arch-x86/xen-mca.h
 ?  mc  arch-x86/xen-mca.h
-?  mcinfo_bank arch-x86/xen-mca.h
-?  mcinfo_common   arch-x86/xen-mca.h
-?  mcinfo_extended arch-x86/xen-mca.h
-?  mcinfo_global   arch-x86/xen-mca.h
-?  mcinfo_logical_cpu  arch-x86/xen-mca.h
-?  mcinfo_msr  arch-x86/xen-mca.h
-?  mcinfo_recovery arch-x86/xen-mca.h
 !  mc_fetcharch-x86/xen-mca.h
 ?  mc_info arch-x86/xen-mca.h
 ?  mc_inject_v2arch-x86/xen-mca.h
@@ -54,6 +47,13 @@
 ?  mc_msrinjectarch-x86/xen-mca.h
 ?  mc_notifydomain arch-x86/xen-mca.h
 !  mc_physcpuinfo  arch-x86/xen-mca.h
+?  mcinfo_bank arch-x86/xen-mca.h
+?  mcinfo_common   arch-x86/xen-mca.h
+?  mcinfo_extended arch-x86/xen-mca.h
+?  mcinfo_global   arch-x86/xen-mca.h
+?  mcinfo_logical_cpu  arch-x86/xen-mca.h
+?  mcinfo_msr  arch-x86/xen-mca.h
+?  mcinfo_recovery arch-x86/xen-mca.h
 ?  page_offline_action arch-x86/xen-mca.h
 
 ?  argo_addr   argo.h
@@ -85,18 +85,18 @@
 ?  gnttab_cache_flush  grant_table.h
 !  gnttab_copy grant_table.h
 ?  gnttab_dump_table   grant_table.h
+!  gnttab_get_status_framesgrant_table.h
+?  gnttab_get_version  grant_table.h
 ?  gnttab_map_grant_refgrant_table.h
+?  gnttab_set_version  grant_table.h
 !  gnttab_setup_table  grant_table.h
+?  gnttab_swap_grant_ref   grant_table.h
 !  gnttab_transfer grant_table.h
-?  gnttab_unmap_grant_ref  grant_table.h
 ?  gnttab_unmap_and_replacegrant_table.h
-?  gnttab_set_version  grant_table.h
-?  gnttab_get_version  grant_table.h
-!  gnttab_get_status_framesgrant_table.h
-?  grant_entry_v1  grant_table.h
+?  gnttab_unmap_grant_ref  grant_table.h
 ?  grant_entry_header  grant_table.h
+?  grant_entry_v1  grant_table.h
 ?  grant_entry_v2  grant_table.h
-?  gnttab_swap_grant_ref   grant_table.h
 
 !  dm_op_buf   hvm/dm_op.h
 ?  dm_op_create_ioreq_server   hvm/dm_op.h
@@ -134,11 +134,11 @@
 !  add_to_physmap  memory.h
 !  add_to_physmap_batchmemory.h
 !  foreign_memory_map  memory.h
+!  mem_access_op   memory.h
+!  mem_acquire_resourcememory.h
 !  memory_exchange memory.h
 !  memory_map  memory.h
 !  memory_reservation  memory.h
-!  mem_access_op   memory.h
-!  mem_acquire_resourcememory.h
 !  pod_target  memory.h
 !  remove_from_physmap memory.h
 !  reserved_device_memory_map  memory.h
@@ -154,10 +154,10 @@
 ?  physdev_pci_device  physdev.h
 ?  physdev_pci_device_add  physdev.h
 ?  physdev_pci_mmcfg_reserved  physdev.h
-?  physdev_unmap_pirq  physdev.h
 ?  physdev_restore_msi physdev.h
 ?  physdev_set_ioplphysdev.h
 ?  physdev_setup_gsi   physdev.h
+?  physdev_unmap_pirq  physdev.h
 
 !  pct_registerplatform.h
 !  power_register  platform.h
@@ -169,17 +169,17 @@
 ?  processor_pxplatform.h
 !  psd_package platform.h
 ?  xenpf_enter_acpi_sleep  platform.h
-!  xenpf_symdata   platform.h
-?