All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir.xen@gmail.com>
To: Jan Beulich <JBeulich@suse.com>, xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] ACPI: move tables.c fully into .init.*
Date: Tue, 18 Sep 2012 16:42:47 +0100	[thread overview]
Message-ID: <CC7E5507.3F134%keir.xen@gmail.com> (raw)
In-Reply-To: <5058AEC6020000780009C081@nat28.tlf.novell.com>

On 18/09/2012 16:26, "Jan Beulich" <JBeulich@suse.com> wrote:

> The only non-init item was the space reserved for the initial tables,
> but we can as well dynamically allocate that array.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Really worthwhile, versus having to round up the initial_tables[] allocation
to a whole number of pages?

> --- a/xen/drivers/acpi/Makefile
> +++ b/xen/drivers/acpi/Makefile
> @@ -2,7 +2,7 @@ subdir-y += tables
>  subdir-y += utilities
>  subdir-$(x86) += apei
>  
> -obj-y += tables.o
> +obj-bin-y += tables.init.o
>  obj-y += numa.o
>  obj-y += osl.o
>  obj-y += pmstat.o
> --- a/xen/drivers/acpi/tables.c
> +++ b/xen/drivers/acpi/tables.c
> @@ -25,6 +25,8 @@
>  
>  #include <xen/init.h>
>  #include <xen/kernel.h>
> +#include <xen/mm.h>
> +#include <xen/pfn.h>
>  #include <xen/smp.h>
>  #include <xen/string.h>
>  #include <xen/types.h>
> @@ -41,8 +43,6 @@ mps_inti_flags_polarity[] = { "dfl", "hi
>  static const char *__initdata
>  mps_inti_flags_trigger[] = { "dfl", "edge", "res", "level" };
>  
> -static struct acpi_table_desc initial_tables[ACPI_MAX_TABLES];
> -
>  static int acpi_apic_instance __initdata;
>  
>  void __init acpi_table_print_madt_entry(struct acpi_subtable_header *header)
> @@ -324,6 +324,11 @@ static void __init check_multiple_madt(v
>  
>  int __init acpi_table_init(void)
>  {
> + struct acpi_table_desc *initial_tables =
> +  mfn_to_virt(alloc_boot_pages(PFN_UP(ACPI_MAX_TABLES *
> +          sizeof(*initial_tables)),
> +          1));
> +
> acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, 0);
> check_multiple_madt();
> return 0;
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

  reply	other threads:[~2012-09-18 15:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-18 15:26 [PATCH] ACPI: move tables.c fully into .init.* Jan Beulich
2012-09-18 15:42 ` Keir Fraser [this message]
2012-09-19  7:29   ` Jan Beulich
2012-09-19  7:56     ` Keir Fraser
2012-09-19  8:58       ` Jan Beulich
2012-09-19 11:40         ` Keir Fraser
2012-09-19 12:57           ` Jan Beulich
2012-09-19 14:45             ` Keir Fraser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CC7E5507.3F134%keir.xen@gmail.com \
    --to=keir.xen@gmail.com \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.