lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 20 Feb 2018 19:42:52 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        "H . Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...nel.org>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Eric Biederman <ebiederm@...ssion.com>,
        "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Juergen Gross <jgross@...e.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 2/3] ACPI / x86: boot: Not all platforms require acpi_generic_reduced_hw_init()

On Tue, Feb 20, 2018 at 7:05 PM, Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
> Some ACPI hardware reduced platforms need to initialize certain devices
> defined by the ACPI hardware specification even though in principle
> those devices should not be present in an ACPI hardware reduced platform.
>
> To allow that to happen, make it possible to override the generic
> x86_init callbacks and provide a custom legacy_pic value, add a new
> ->reduced_hw_early_init() callback to struct x86_init_acpi and make
> acpi_reduced_hw_init() use it.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

> ---
>
> - address Rafael's comments
> - requires patches from Juergen Gross
> - supposed to go via tip tree (x86/boot branch)
> - tested on ASuS T100ta (HW reduced) and Intel Broxton based platforms
>
>  arch/x86/include/asm/x86_init.h | 2 ++
>  arch/x86/kernel/acpi/boot.c     | 2 +-
>  arch/x86/kernel/x86_init.c      | 2 ++
>  3 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h
> index 2e2c34d2bb00..5bd45a8f5ae3 100644
> --- a/arch/x86/include/asm/x86_init.h
> +++ b/arch/x86/include/asm/x86_init.h
> @@ -133,9 +133,11 @@ struct x86_hyper_init {
>  /**
>   * struct x86_init_acpi - x86 ACPI init functions
>   * @get_root_pointer:          get RSDP address
> + * @reduced_hw_early_init:     hardware reduced platform early init
>   */
>  struct x86_init_acpi {
>         u64 (*get_root_pointer)(void);
> +       void (*reduced_hw_early_init)(void);
>  };
>
>  /**
> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
> index baa084ecffdb..7a37d9357bc4 100644
> --- a/arch/x86/kernel/acpi/boot.c
> +++ b/arch/x86/kernel/acpi/boot.c
> @@ -1390,7 +1390,7 @@ void __init acpi_generic_reduced_hw_init(void)
>  static void __init acpi_reduced_hw_init(void)
>  {
>         if (acpi_gbl_reduced_hardware)
> -               acpi_generic_reduced_hw_init();
> +               x86_init.acpi.reduced_hw_early_init();
>  }
>
>  /*
> diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
> index 9e4e994a4836..03452b73e2ea 100644
> --- a/arch/x86/kernel/x86_init.c
> +++ b/arch/x86/kernel/x86_init.c
> @@ -8,6 +8,7 @@
>  #include <linux/export.h>
>  #include <linux/pci.h>
>
> +#include <asm/acpi.h>
>  #include <asm/bios_ebda.h>
>  #include <asm/paravirt.h>
>  #include <asm/pci_x86.h>
> @@ -95,6 +96,7 @@ struct x86_init_ops x86_init __initdata = {
>
>         .acpi = {
>                 .get_root_pointer       = u64_x86_init_noop,
> +               .reduced_hw_early_init  = acpi_generic_reduced_hw_init,
>         },
>  };
>
> --
> 2.15.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ