Re: [kvm-unit-tests PATCH v2 01/23] lib: Move acpi header and implementation to lib

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

 



On Fri, May 06, 2022 at 09:55:43PM +0100, Nikos Nikoleris wrote:
> This change is in preparation of using ACPI in arm64 systems booting
> with EFI.
> 
> Signed-off-by: Nikos Nikoleris <nikos.nikoleris@xxxxxxx>
> ---
>  x86/Makefile.common  | 2 +-
>  lib/x86/asm/setup.h  | 2 +-
>  lib/{x86 => }/acpi.h | 4 ++--
>  lib/{x86 => }/acpi.c | 0

I like that diffstat that git-format-patch -M creates when only
moving, but not changing a file. I'd prefer we take the opportunity
to update the file's coding style though and then confirm we didn't
introduce any changes with a whitespace ignoring diff.

>  x86/s3.c             | 2 +-
>  x86/vmexit.c         | 2 +-
>  6 files changed, 6 insertions(+), 6 deletions(-)
>  rename lib/{x86 => }/acpi.h (99%)
>  rename lib/{x86 => }/acpi.c (100%)
> 
> diff --git a/x86/Makefile.common b/x86/Makefile.common
> index b903988..4cdba79 100644
> --- a/x86/Makefile.common
> +++ b/x86/Makefile.common
> @@ -2,6 +2,7 @@
>  
>  all: directories test_cases
>  
> +cflatobjs += lib/acpi.o
>  cflatobjs += lib/pci.o
>  cflatobjs += lib/pci-edu.o
>  cflatobjs += lib/alloc.o
> @@ -18,7 +19,6 @@ cflatobjs += lib/x86/apic.o
>  cflatobjs += lib/x86/atomic.o
>  cflatobjs += lib/x86/desc.o
>  cflatobjs += lib/x86/isr.o
> -cflatobjs += lib/x86/acpi.o
>  cflatobjs += lib/x86/stack.o
>  cflatobjs += lib/x86/fault_test.o
>  cflatobjs += lib/x86/delay.o
> diff --git a/lib/x86/asm/setup.h b/lib/x86/asm/setup.h
> index 24d4fa9..f46462c 100644
> --- a/lib/x86/asm/setup.h
> +++ b/lib/x86/asm/setup.h
> @@ -4,7 +4,7 @@
>  unsigned long setup_tss(u8 *stacktop);
>  
>  #ifdef CONFIG_EFI
> -#include "x86/acpi.h"
> +#include "acpi.h"
>  #include "x86/apic.h"
>  #include "x86/processor.h"
>  #include "x86/smp.h"
> diff --git a/lib/x86/acpi.h b/lib/acpi.h
> similarity index 99%
> rename from lib/x86/acpi.h
> rename to lib/acpi.h
> index 67ba389..1e89840 100644
> --- a/lib/x86/acpi.h
> +++ b/lib/acpi.h
> @@ -1,5 +1,5 @@
> -#ifndef _X86_ACPI_H_
> -#define _X86_ACPI_H_
> +#ifndef _ACPI_H_
> +#define _ACPI_H_
>  
>  #include "libcflat.h"
>  
> diff --git a/lib/x86/acpi.c b/lib/acpi.c
> similarity index 100%
> rename from lib/x86/acpi.c
> rename to lib/acpi.c
> diff --git a/x86/s3.c b/x86/s3.c
> index 6e41d0c..378d37a 100644
> --- a/x86/s3.c
> +++ b/x86/s3.c
> @@ -1,5 +1,5 @@
>  #include "libcflat.h"
> -#include "x86/acpi.h"
> +#include "acpi.h"
>  #include "asm/io.h"
>  
>  static u32* find_resume_vector_addr(void)
> diff --git a/x86/vmexit.c b/x86/vmexit.c
> index 4adec78..2bac049 100644
> --- a/x86/vmexit.c
> +++ b/x86/vmexit.c
> @@ -1,9 +1,9 @@
> +#include "acpi.h"
>  #include "libcflat.h"

I prefer libcflat.h on top.

>  #include "smp.h"
>  #include "pci.h"
>  #include "x86/vm.h"
>  #include "x86/desc.h"
> -#include "x86/acpi.h"
>  #include "x86/apic.h"
>  #include "x86/isr.h"
>  
> -- 
> 2.25.1
> 

Thanks,
drew




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux