linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Zheng, Lv" <lv.zheng@intel.com>
To: Aleksey Makarov <aleksey.makarov@linaro.org>,
	Russell King <linux@arm.linux.org.uk>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>
Cc: "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Graeme Gregory <graeme.gregory@linaro.org>,
	Jon Masters <jcm@redhat.com>, Mark Rutland <mark.rutland@arm.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>
Subject: RE: [PATCH v2 2/5] ACPI: table upgrade: refactor function definitions
Date: Fri, 20 May 2016 00:52:14 +0000	[thread overview]
Message-ID: <1AE640813FDE7649BE1B193DEA596E883BBA461D@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1463674518-22477-3-git-send-email-aleksey.makarov@linaro.org>

Hi,

Looks real good now. :)
If there is a next version, feel free to add:
Acked-by: Lv Zheng <lv.zheng@intel.com>

Thanks and best regards
-Lv

> From: Aleksey Makarov [mailto:aleksey.makarov@linaro.org]
> Subject: [PATCH v2 2/5] ACPI: table upgrade: refactor function definitions
> 
> Refer initrd_start, initrd_end directly from drivers/acpi/tables.c.
> This allows to use the table upgrade feature in architectures
> other than x86.  Also this simplifies header files.
> 
> The patch renames acpi_table_initrd_init() to acpi_table_upgrade()
> (what reflects the purpose of the function) and removes the unneeded
> wraps early_acpi_table_init() and early_initrd_acpi_init().
> 
> Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
> ---
>  arch/x86/kernel/setup.c |  9 +--------
>  drivers/acpi/tables.c   | 14 ++++----------
>  include/linux/acpi.h    |  8 ++++++--
>  3 files changed, 11 insertions(+), 20 deletions(-)
> 
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index c4e7b39..aac91be 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -399,10 +399,6 @@ static void __init reserve_initrd(void)
>  	memblock_free(ramdisk_image, ramdisk_end - ramdisk_image);
>  }
> 
> -static void __init early_initrd_acpi_init(void)
> -{
> -	early_acpi_table_init((void *)initrd_start, initrd_end - initrd_start);
> -}
>  #else
>  static void __init early_reserve_initrd(void)
>  {
> @@ -410,9 +406,6 @@ static void __init early_reserve_initrd(void)
>  static void __init reserve_initrd(void)
>  {
>  }
> -static void __init early_initrd_acpi_init(void)
> -{
> -}
>  #endif /* CONFIG_BLK_DEV_INITRD */
> 
>  static void __init parse_setup_data(void)
> @@ -1146,7 +1139,7 @@ void __init setup_arch(char **cmdline_p)
> 
>  	reserve_initrd();
> 
> -	early_initrd_acpi_init();
> +	acpi_table_upgrade();
> 
>  	vsmp_init();
> 
> diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
> index f829e6a..b05df13 100644
> --- a/drivers/acpi/tables.c
> +++ b/drivers/acpi/tables.c
> @@ -34,6 +34,7 @@
>  #include <linux/bootmem.h>
>  #include <linux/earlycpio.h>
>  #include <linux/memblock.h>
> +#include <linux/initrd.h>
>  #include "internal.h"
> 
>  #ifdef CONFIG_ACPI_CUSTOM_DSDT
> @@ -481,8 +482,10 @@ static DECLARE_BITMAP(acpi_initrd_installed,
> NR_ACPI_INITRD_TABLES);
> 
>  #define MAP_CHUNK_SIZE   (NR_FIX_BTMAPS << PAGE_SHIFT)
> 
> -static void __init acpi_table_initrd_init(void *data, size_t size)
> +void __init acpi_table_upgrade(void)
>  {
> +	void *data = (void *)initrd_start;
> +	size_t size = initrd_end - initrd_start;
>  	int sig, no, table_nr = 0, total_offset = 0;
>  	long offset = 0;
>  	struct acpi_table_header *table;
> @@ -696,10 +699,6 @@ next_table:
>  	}
>  }
>  #else
> -static void __init acpi_table_initrd_init(void *data, size_t size)
> -{
> -}
> -
>  static acpi_status
>  acpi_table_initrd_override(struct acpi_table_header *existing_table,
>  			   acpi_physical_address *address,
> @@ -742,11 +741,6 @@ acpi_os_table_override(struct acpi_table_header
> *existing_table,
>  	return AE_OK;
>  }
> 
> -void __init early_acpi_table_init(void *data, size_t size)
> -{
> -	acpi_table_initrd_init(data, size);
> -}
> -
>  /*
>   * acpi_table_init()
>   *
> diff --git a/include/linux/acpi.h b/include/linux/acpi.h
> index 288fac5..ef2ad26 100644
> --- a/include/linux/acpi.h
> +++ b/include/linux/acpi.h
> @@ -208,7 +208,6 @@ void acpi_boot_table_init (void);
>  int acpi_mps_check (void);
>  int acpi_numa_init (void);
> 
> -void early_acpi_table_init(void *data, size_t size);
>  int acpi_table_init (void);
>  int acpi_table_parse(char *id, acpi_tbl_table_handler handler);
>  int __init acpi_parse_entries(char *id, unsigned long table_size,
> @@ -588,7 +587,6 @@ static inline const char *acpi_dev_name(struct
> acpi_device *adev)
>  	return NULL;
>  }
> 
> -static inline void early_acpi_table_init(void *data, size_t size) { }
>  static inline void acpi_early_init(void) { }
>  static inline void acpi_subsystem_init(void) { }
> 
> @@ -997,4 +995,10 @@ static inline struct fwnode_handle
> *acpi_get_next_subnode(struct device *dev,
>  #define acpi_probe_device_table(t)	({ int __r = 0; __r;})
>  #endif
> 
> +#ifdef CONFIG_ACPI_TABLE_UPGRADE
> +void acpi_table_upgrade(void);
> +#else
> +static inline void acpi_table_upgrade(void) { }
> +#endif
> +
>  #endif	/*_LINUX_ACPI_H*/
> --
> 2.8.2

  reply	other threads:[~2016-05-20  0:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-19 16:15 [PATCH v2 0/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE Aleksey Makarov
2016-05-19 16:15 ` [PATCH v2 1/5] ACPI: table upgrade: use cacheable map for tables Aleksey Makarov
2016-05-19 16:15 ` [PATCH v2 2/5] ACPI: table upgrade: refactor function definitions Aleksey Makarov
2016-05-20  0:52   ` Zheng, Lv [this message]
2016-05-19 16:15 ` [PATCH v2 3/5] ACPI: table upgrade: move arch-specific symbol to asm/acpi.h Aleksey Makarov
2016-05-19 16:15 ` [PATCH v2 4/5] ACPI: table upgrade: introduce ARCH_HAS_ACPI_TABLE_UPGRADE Aleksey Makarov
2016-05-19 16:15 ` [PATCH v2 5/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE Aleksey Makarov
2016-05-27 17:14   ` Catalin Marinas
2016-06-02 17:49     ` [PATCH v3 " Aleksey Makarov
2016-06-14 15:51       ` Aleksey Makarov
2016-06-14 16:41         ` Will Deacon
2016-05-19 21:22 ` [PATCH v2 0/5] " Rafael J. Wysocki
2016-05-27 13:46   ` Aleksey Makarov

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=1AE640813FDE7649BE1B193DEA596E883BBA461D@SHSMSX101.ccr.corp.intel.com \
    --to=lv.zheng@intel.com \
    --cc=aleksey.makarov@linaro.org \
    --cc=graeme.gregory@linaro.org \
    --cc=hpa@zytor.com \
    --cc=jcm@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).