linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE
@ 2016-05-19 16:15 Aleksey Makarov
  2016-05-19 16:15 ` [PATCH v2 1/5] ACPI: table upgrade: use cacheable map for tables Aleksey Makarov
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Aleksey Makarov @ 2016-05-19 16:15 UTC (permalink / raw)
  To: Russell King, Rafael J . Wysocki, Len Brown
  Cc: linux-acpi, linux-arm-kernel, linux-kernel, Aleksey Makarov,
	Graeme Gregory, Jon Masters, Zheng, Lv, Mark Rutland

This patchset adds support for ACPI_TABLE_UPGRADE for ARM64

These patches help with:

1). During development of a platform, it is much easier to debug
problems with tables if you can test replacement ones without having to
respin the firmware. In the server world, you usually don't have the
firmware source code, so to get it respun could be days-weeks even if
you are working with the authors closely. We have practically used this
feature on a number of platforms already and it will continue.

2). They empower (advanced) users and developers to work around problems
that they find on platforms. Sure, we want firmware to always be fixed
and working well, but it is better if folks have the tools.

It's also required for parity with x86 functionality on servers as Redhat
use that method in their tooling.

The patchset refactors the code introduced by the patches by Lv Zheng [1],
fixes access to the destination of new ACPI tables as suggested
by Mark Rutland [2] and enables the feature for ARM64

It was first sent by Jon Masters [3] to linaro-acpi in December 2015

Tested on QEMU (arm64 and x86) and ThunderX
Should be applied to next-20160519

v2:
- add Acked-by: Lv Zheng <lv.zheng@intel.com>
- replace the original patch "ACPI: table upgrade: move early_initrd_acpi_init()
  to header file" with the patch "ACPI: table upgrade: refactor function
  definitions".  This new patch is just the original one rewritten following the
  suggestion by Lv Zheng to use initrd_start, inird_end directly in
  acpi_table_initrd_init().  It simplifies things noticeably.
- add Jon's explanations to the cover of the patchset and my explanations
  to "ACPI: ARM64: support for ACPI_TABLE_UPGRADE"
- introduce ARCH_HAS_ACPI_TABLE_UPGRADE in a separate patch (Mark Rutland)
- move arch-specific definition to an arch-specific header in a separate patch
  (Mark Rutland)

v1:
https://lkml.kernel.org/g/1463486765-31827-1-git-send-email-aleksey.makarov@linaro.org

[1] https://lkml.kernel.org/g/cover.1460340514.git.lv.zheng@intel.com
[2] https://lists.linaro.org/pipermail/linaro-acpi/2015-December/006101.html
[3] https://lists.linaro.org/pipermail/linaro-acpi/2015-December/006099.html

Aleksey Makarov (4):
  ACPI: table upgrade: use cacheable map for tables
  ACPI: table upgrade: refactor function definitions
  ACPI: table upgrade: move arch-specific symbol to asm/acpi.h
  ACPI: table upgrade: introduce ARCH_HAS_ACPI_TABLE_UPGRADE

Jon Masters (1):
  ACPI: ARM64: support for ACPI_TABLE_UPGRADE

 arch/arm64/Kconfig            |  1 +
 arch/arm64/include/asm/acpi.h |  2 ++
 arch/arm64/kernel/setup.c     |  6 ++++--
 arch/x86/Kconfig              |  1 +
 arch/x86/include/asm/acpi.h   |  2 ++
 arch/x86/kernel/setup.c       |  9 +--------
 drivers/acpi/Kconfig          |  5 ++++-
 drivers/acpi/tables.c         | 23 +++++++++--------------
 include/linux/acpi.h          |  8 ++++++--
 9 files changed, 30 insertions(+), 27 deletions(-)

-- 
2.8.2

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 1/5] ACPI: table upgrade: use cacheable map for tables
  2016-05-19 16:15 [PATCH v2 0/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE Aleksey Makarov
@ 2016-05-19 16:15 ` Aleksey Makarov
  2016-05-19 16:15 ` [PATCH v2 2/5] ACPI: table upgrade: refactor function definitions Aleksey Makarov
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Aleksey Makarov @ 2016-05-19 16:15 UTC (permalink / raw)
  To: Russell King, Rafael J . Wysocki, Len Brown
  Cc: linux-acpi, linux-arm-kernel, linux-kernel, Aleksey Makarov,
	Graeme Gregory, Jon Masters, Zheng, Lv, Mark Rutland

The new memory allocated in acpi_table_initrd_init() is used to
copy the upgraded tables to it.  So it should be mapped with
early_memunmap() instead of early_ioremap().

This is critical for ARM.

Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
Acked-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/tables.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index a372f9e..f829e6a 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -578,10 +578,10 @@ static void __init acpi_table_initrd_init(void *data, size_t size)
 			clen = size;
 			if (clen > MAP_CHUNK_SIZE - slop)
 				clen = MAP_CHUNK_SIZE - slop;
-			dest_p = early_ioremap(dest_addr & PAGE_MASK,
-						 clen + slop);
+			dest_p = early_memremap(dest_addr & PAGE_MASK,
+						clen + slop);
 			memcpy(dest_p + slop, src_p, clen);
-			early_iounmap(dest_p, clen + slop);
+			early_memunmap(dest_p, clen + slop);
 			src_p += clen;
 			dest_addr += clen;
 			size -= clen;
-- 
2.8.2

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 2/5] ACPI: table upgrade: refactor function definitions
  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 ` Aleksey Makarov
  2016-05-20  0:52   ` Zheng, Lv
  2016-05-19 16:15 ` [PATCH v2 3/5] ACPI: table upgrade: move arch-specific symbol to asm/acpi.h Aleksey Makarov
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Aleksey Makarov @ 2016-05-19 16:15 UTC (permalink / raw)
  To: Russell King, Rafael J . Wysocki, Len Brown
  Cc: linux-acpi, linux-arm-kernel, linux-kernel, Aleksey Makarov,
	Graeme Gregory, Jon Masters, Zheng, Lv, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86

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

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 3/5] ACPI: table upgrade: move arch-specific symbol to asm/acpi.h
  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-19 16:15 ` Aleksey Makarov
  2016-05-19 16:15 ` [PATCH v2 4/5] ACPI: table upgrade: introduce ARCH_HAS_ACPI_TABLE_UPGRADE Aleksey Makarov
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Aleksey Makarov @ 2016-05-19 16:15 UTC (permalink / raw)
  To: Russell King, Rafael J . Wysocki, Len Brown
  Cc: linux-acpi, linux-arm-kernel, linux-kernel, Aleksey Makarov,
	Graeme Gregory, Jon Masters, Zheng, Lv, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86

The constant that defines max phys address where the new upgraded
ACPI table should be allocated is arch-specific.  Move it to
<asm/acpi.h>

Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
---
 arch/x86/include/asm/acpi.h | 2 ++
 drivers/acpi/tables.c       | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index 94c18eb..c24c070 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -170,4 +170,6 @@ static inline pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr)
 }
 #endif
 
+#define ACPI_TABLE_UPGRADE_MAX_PHYS (max_low_pfn_mapped << PAGE_SHIFT)
+
 #endif /* _ASM_X86_ACPI_H */
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index b05df13..9f0ad6e 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -35,6 +35,7 @@
 #include <linux/earlycpio.h>
 #include <linux/memblock.h>
 #include <linux/initrd.h>
+#include <linux/acpi.h>
 #include "internal.h"
 
 #ifdef CONFIG_ACPI_CUSTOM_DSDT
@@ -543,7 +544,7 @@ void __init acpi_table_upgrade(void)
 		return;
 
 	acpi_tables_addr =
-		memblock_find_in_range(0, max_low_pfn_mapped << PAGE_SHIFT,
+		memblock_find_in_range(0, ACPI_TABLE_UPGRADE_MAX_PHYS,
 				       all_tables_size, PAGE_SIZE);
 	if (!acpi_tables_addr) {
 		WARN_ON(1);
-- 
2.8.2

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 4/5] ACPI: table upgrade: introduce ARCH_HAS_ACPI_TABLE_UPGRADE
  2016-05-19 16:15 [PATCH v2 0/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE Aleksey Makarov
                   ` (2 preceding siblings ...)
  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 ` Aleksey Makarov
  2016-05-19 16:15 ` [PATCH v2 5/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE Aleksey Makarov
  2016-05-19 21:22 ` [PATCH v2 0/5] " Rafael J. Wysocki
  5 siblings, 0 replies; 13+ messages in thread
From: Aleksey Makarov @ 2016-05-19 16:15 UTC (permalink / raw)
  To: Russell King, Rafael J . Wysocki, Len Brown
  Cc: linux-acpi, linux-arm-kernel, linux-kernel, Aleksey Makarov,
	Graeme Gregory, Jon Masters, Zheng, Lv, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86

We want to use the table upgrade feature in ARM64.
Introduce a new configuration option that allows that.

Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
---
 arch/x86/Kconfig     | 1 +
 drivers/acpi/Kconfig | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 48ac290..f60fd27 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -22,6 +22,7 @@ config X86
 	select ANON_INODES
 	select ARCH_CLOCKSOURCE_DATA
 	select ARCH_DISCARD_MEMBLOCK
+	select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
 	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
 	select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
 	select ARCH_HAS_DEVMEM_IS_ALLOWED
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index c204344..083da18 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -311,9 +311,12 @@ config ACPI_CUSTOM_DSDT
 	bool
 	default ACPI_CUSTOM_DSDT_FILE != ""
 
+config ARCH_HAS_ACPI_TABLE_UPGRADE
+	def_bool n
+
 config ACPI_TABLE_UPGRADE
 	bool "Allow upgrading ACPI tables via initrd"
-	depends on BLK_DEV_INITRD && X86
+	depends on BLK_DEV_INITRD && ARCH_HAS_ACPI_TABLE_UPGRADE
 	default y
 	help
 	  This option provides functionality to upgrade arbitrary ACPI tables
-- 
2.8.2

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 5/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE
  2016-05-19 16:15 [PATCH v2 0/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE Aleksey Makarov
                   ` (3 preceding siblings ...)
  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 ` Aleksey Makarov
  2016-05-27 17:14   ` Catalin Marinas
  2016-05-19 21:22 ` [PATCH v2 0/5] " Rafael J. Wysocki
  5 siblings, 1 reply; 13+ messages in thread
From: Aleksey Makarov @ 2016-05-19 16:15 UTC (permalink / raw)
  To: Russell King, Rafael J . Wysocki, Len Brown
  Cc: linux-acpi, linux-arm-kernel, linux-kernel, Aleksey Makarov,
	Graeme Gregory, Jon Masters, Zheng, Lv, Mark Rutland,
	Catalin Marinas, Will Deacon

From: Jon Masters <jcm@redhat.com>

This patch adds support for ACPI_TABLE_UPGRADE for ARM64

To access initrd image we need to move initialization
of linear mapping a bit earlier.

The implementation of the feature acpi_table_upgrade()
(drivers/acpi/tables.c) works with initrd data represented as an array
in virtual memory.  It uses some library utility to find the redefined
tables in that array and iterates over it to copy the data to new
allocated memory.  So to access the initrd data via fixmap
we need to rewrite it considerably.

In x86 arch, kernel memory is already mapped by the time when
acpi_table_upgrade() and acpi_boot_table_init() are called so I
think that we can just move this mapping one function earlier too.

Signed-off-by: Jon Masters <jcm@redhat.com>
Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
---
 arch/arm64/Kconfig            | 1 +
 arch/arm64/include/asm/acpi.h | 2 ++
 arch/arm64/kernel/setup.c     | 6 ++++--
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 5d30abf..f4f9f56 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -5,6 +5,7 @@ config ARM64
 	select ACPI_PCI_HOST_GENERIC if ACPI
 	select ACPI_REDUCED_HARDWARE_ONLY if ACPI
 	select ARCH_HAS_DEVMEM_IS_ALLOWED
+	select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
 	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
 	select ARCH_HAS_ELF_RANDOMIZE
 	select ARCH_HAS_GCOV_PROFILE_ALL
diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
index aee323b..d75f6c7 100644
--- a/arch/arm64/include/asm/acpi.h
+++ b/arch/arm64/include/asm/acpi.h
@@ -113,4 +113,6 @@ static inline const char *acpi_get_enable_method(int cpu)
 pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr);
 #endif
 
+#define ACPI_TABLE_UPGRADE_MAX_PHYS PFN_PHYS(max_pfn)
+
 #endif /*_ASM_ACPI_H*/
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index feab2ee..4bce811 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -261,11 +261,13 @@ void __init setup_arch(char **cmdline_p)
 	efi_init();
 	arm64_memblock_init();
 
+	paging_init();
+
+	acpi_table_upgrade();
+
 	/* Parse the ACPI tables for possible boot-time configuration */
 	acpi_boot_table_init();
 
-	paging_init();
-
 	if (acpi_disabled)
 		unflatten_device_tree();
 
-- 
2.8.2

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 0/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE
  2016-05-19 16:15 [PATCH v2 0/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE Aleksey Makarov
                   ` (4 preceding siblings ...)
  2016-05-19 16:15 ` [PATCH v2 5/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE Aleksey Makarov
@ 2016-05-19 21:22 ` Rafael J. Wysocki
  2016-05-27 13:46   ` Aleksey Makarov
  5 siblings, 1 reply; 13+ messages in thread
From: Rafael J. Wysocki @ 2016-05-19 21:22 UTC (permalink / raw)
  To: Aleksey Makarov
  Cc: Russell King, Rafael J . Wysocki, Len Brown,
	ACPI Devel Maling List, linux-arm-kernel,
	Linux Kernel Mailing List, Graeme Gregory, Jon Masters, Zheng,
	Lv, Mark Rutland

On Thu, May 19, 2016 at 6:15 PM, Aleksey Makarov
<aleksey.makarov@linaro.org> wrote:
> This patchset adds support for ACPI_TABLE_UPGRADE for ARM64
>
> These patches help with:
>
> 1). During development of a platform, it is much easier to debug
> problems with tables if you can test replacement ones without having to
> respin the firmware. In the server world, you usually don't have the
> firmware source code, so to get it respun could be days-weeks even if
> you are working with the authors closely. We have practically used this
> feature on a number of platforms already and it will continue.
>
> 2). They empower (advanced) users and developers to work around problems
> that they find on platforms. Sure, we want firmware to always be fixed
> and working well, but it is better if folks have the tools.
>
> It's also required for parity with x86 functionality on servers as Redhat
> use that method in their tooling.
>
> The patchset refactors the code introduced by the patches by Lv Zheng [1],
> fixes access to the destination of new ACPI tables as suggested
> by Mark Rutland [2] and enables the feature for ARM64
>
> It was first sent by Jon Masters [3] to linaro-acpi in December 2015
>
> Tested on QEMU (arm64 and x86) and ThunderX
> Should be applied to next-20160519
>
> v2:
> - add Acked-by: Lv Zheng <lv.zheng@intel.com>
> - replace the original patch "ACPI: table upgrade: move early_initrd_acpi_init()
>   to header file" with the patch "ACPI: table upgrade: refactor function
>   definitions".  This new patch is just the original one rewritten following the
>   suggestion by Lv Zheng to use initrd_start, inird_end directly in
>   acpi_table_initrd_init().  It simplifies things noticeably.
> - add Jon's explanations to the cover of the patchset and my explanations
>   to "ACPI: ARM64: support for ACPI_TABLE_UPGRADE"
> - introduce ARCH_HAS_ACPI_TABLE_UPGRADE in a separate patch (Mark Rutland)
> - move arch-specific definition to an arch-specific header in a separate patch
>   (Mark Rutland)
>
> v1:
> https://lkml.kernel.org/g/1463486765-31827-1-git-send-email-aleksey.makarov@linaro.org
>
> [1] https://lkml.kernel.org/g/cover.1460340514.git.lv.zheng@intel.com
> [2] https://lists.linaro.org/pipermail/linaro-acpi/2015-December/006101.html
> [3] https://lists.linaro.org/pipermail/linaro-acpi/2015-December/006099.html
>
> Aleksey Makarov (4):
>   ACPI: table upgrade: use cacheable map for tables
>   ACPI: table upgrade: refactor function definitions
>   ACPI: table upgrade: move arch-specific symbol to asm/acpi.h
>   ACPI: table upgrade: introduce ARCH_HAS_ACPI_TABLE_UPGRADE
>
> Jon Masters (1):
>   ACPI: ARM64: support for ACPI_TABLE_UPGRADE
>
>  arch/arm64/Kconfig            |  1 +
>  arch/arm64/include/asm/acpi.h |  2 ++
>  arch/arm64/kernel/setup.c     |  6 ++++--
>  arch/x86/Kconfig              |  1 +
>  arch/x86/include/asm/acpi.h   |  2 ++
>  arch/x86/kernel/setup.c       |  9 +--------
>  drivers/acpi/Kconfig          |  5 ++++-
>  drivers/acpi/tables.c         | 23 +++++++++--------------
>  include/linux/acpi.h          |  8 ++++++--
>  9 files changed, 30 insertions(+), 27 deletions(-)

I'm fine with the series.

I can queue up patches [1-4/5] for 4.8, but I'll need an ACK from the
ARM64 maintainers for the [5/5].

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [PATCH v2 2/5] ACPI: table upgrade: refactor function definitions
  2016-05-19 16:15 ` [PATCH v2 2/5] ACPI: table upgrade: refactor function definitions Aleksey Makarov
@ 2016-05-20  0:52   ` Zheng, Lv
  0 siblings, 0 replies; 13+ messages in thread
From: Zheng, Lv @ 2016-05-20  0:52 UTC (permalink / raw)
  To: Aleksey Makarov, Russell King, Rafael J . Wysocki, Len Brown
  Cc: linux-acpi, linux-arm-kernel, linux-kernel, Graeme Gregory,
	Jon Masters, Mark Rutland, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 0/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE
  2016-05-19 21:22 ` [PATCH v2 0/5] " Rafael J. Wysocki
@ 2016-05-27 13:46   ` Aleksey Makarov
  0 siblings, 0 replies; 13+ messages in thread
From: Aleksey Makarov @ 2016-05-27 13:46 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon
  Cc: Rafael J. Wysocki, Russell King, Rafael J . Wysocki, Len Brown,
	ACPI Devel Maling List, linux-arm-kernel,
	Linux Kernel Mailing List, Graeme Gregory, Jon Masters, Zheng,
	Lv, Mark Rutland



On 05/20/2016 12:22 AM, Rafael J. Wysocki wrote:
> On Thu, May 19, 2016 at 6:15 PM, Aleksey Makarov
> <aleksey.makarov@linaro.org> wrote:
>> This patchset adds support for ACPI_TABLE_UPGRADE for ARM64

Hi Catalin, Will,

Can you review these patches and consider ACKing the ARM64 part [5/5]
please?

Thank you
Aleksey Makarov

>>
>> These patches help with:
>>
>> 1). During development of a platform, it is much easier to debug
>> problems with tables if you can test replacement ones without having to
>> respin the firmware. In the server world, you usually don't have the
>> firmware source code, so to get it respun could be days-weeks even if
>> you are working with the authors closely. We have practically used this
>> feature on a number of platforms already and it will continue.
>>
>> 2). They empower (advanced) users and developers to work around problems
>> that they find on platforms. Sure, we want firmware to always be fixed
>> and working well, but it is better if folks have the tools.
>>
>> It's also required for parity with x86 functionality on servers as Redhat
>> use that method in their tooling.
>>
>> The patchset refactors the code introduced by the patches by Lv Zheng [1],
>> fixes access to the destination of new ACPI tables as suggested
>> by Mark Rutland [2] and enables the feature for ARM64
>>
>> It was first sent by Jon Masters [3] to linaro-acpi in December 2015
>>
>> Tested on QEMU (arm64 and x86) and ThunderX
>> Should be applied to next-20160519
>>
>> v2:
>> - add Acked-by: Lv Zheng <lv.zheng@intel.com>
>> - replace the original patch "ACPI: table upgrade: move early_initrd_acpi_init()
>>   to header file" with the patch "ACPI: table upgrade: refactor function
>>   definitions".  This new patch is just the original one rewritten following the
>>   suggestion by Lv Zheng to use initrd_start, inird_end directly in
>>   acpi_table_initrd_init().  It simplifies things noticeably.
>> - add Jon's explanations to the cover of the patchset and my explanations
>>   to "ACPI: ARM64: support for ACPI_TABLE_UPGRADE"
>> - introduce ARCH_HAS_ACPI_TABLE_UPGRADE in a separate patch (Mark Rutland)
>> - move arch-specific definition to an arch-specific header in a separate patch
>>   (Mark Rutland)
>>
>> v1:
>> https://lkml.kernel.org/g/1463486765-31827-1-git-send-email-aleksey.makarov@linaro.org
>>
>> [1] https://lkml.kernel.org/g/cover.1460340514.git.lv.zheng@intel.com
>> [2] https://lists.linaro.org/pipermail/linaro-acpi/2015-December/006101.html
>> [3] https://lists.linaro.org/pipermail/linaro-acpi/2015-December/006099.html
>>
>> Aleksey Makarov (4):
>>   ACPI: table upgrade: use cacheable map for tables
>>   ACPI: table upgrade: refactor function definitions
>>   ACPI: table upgrade: move arch-specific symbol to asm/acpi.h
>>   ACPI: table upgrade: introduce ARCH_HAS_ACPI_TABLE_UPGRADE
>>
>> Jon Masters (1):
>>   ACPI: ARM64: support for ACPI_TABLE_UPGRADE
>>
>>  arch/arm64/Kconfig            |  1 +
>>  arch/arm64/include/asm/acpi.h |  2 ++
>>  arch/arm64/kernel/setup.c     |  6 ++++--
>>  arch/x86/Kconfig              |  1 +
>>  arch/x86/include/asm/acpi.h   |  2 ++
>>  arch/x86/kernel/setup.c       |  9 +--------
>>  drivers/acpi/Kconfig          |  5 ++++-
>>  drivers/acpi/tables.c         | 23 +++++++++--------------
>>  include/linux/acpi.h          |  8 ++++++--
>>  9 files changed, 30 insertions(+), 27 deletions(-)
> 
> I'm fine with the series.
> 
> I can queue up patches [1-4/5] for 4.8, but I'll need an ACK from the
> ARM64 maintainers for the [5/5].
> 
> Thanks,
> Rafael
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 5/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE
  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
  0 siblings, 1 reply; 13+ messages in thread
From: Catalin Marinas @ 2016-05-27 17:14 UTC (permalink / raw)
  To: Aleksey Makarov
  Cc: Russell King, Rafael J . Wysocki, Len Brown, Mark Rutland,
	Graeme Gregory, Jon Masters, Will Deacon, linux-kernel,
	linux-acpi, Zheng, Lv, linux-arm-kernel

On Thu, May 19, 2016 at 07:15:16PM +0300, Aleksey Makarov wrote:
> diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
> index aee323b..d75f6c7 100644
> --- a/arch/arm64/include/asm/acpi.h
> +++ b/arch/arm64/include/asm/acpi.h
> @@ -113,4 +113,6 @@ static inline const char *acpi_get_enable_method(int cpu)
>  pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr);
>  #endif
>  
> +#define ACPI_TABLE_UPGRADE_MAX_PHYS PFN_PHYS(max_pfn)
> +
>  #endif /*_ASM_ACPI_H*/
> diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
> index feab2ee..4bce811 100644
> --- a/arch/arm64/kernel/setup.c
> +++ b/arch/arm64/kernel/setup.c
> @@ -261,11 +261,13 @@ void __init setup_arch(char **cmdline_p)
>  	efi_init();
>  	arm64_memblock_init();
>  
> +	paging_init();
> +
> +	acpi_table_upgrade();
> +
>  	/* Parse the ACPI tables for possible boot-time configuration */
>  	acpi_boot_table_init();
>  
> -	paging_init();
> -
>  	if (acpi_disabled)
>  		unflatten_device_tree();

So ACPI_TABLE_UPGRADE_MAX_PHYS is defined in terms of max_pfn and
presumably used by acpi_table_upgrade(). max_pfn is only initialised in
the arm64 bootmem_init() called just below the last line of context in
the hunk above.

-- 
Catalin

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v3 5/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE
  2016-05-27 17:14   ` Catalin Marinas
@ 2016-06-02 17:49     ` Aleksey Makarov
  2016-06-14 15:51       ` Aleksey Makarov
  0 siblings, 1 reply; 13+ messages in thread
From: Aleksey Makarov @ 2016-06-02 17:49 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: Will Deacon, Rafael J . Wysocki, Len Brown, linux-acpi,
	linux-arm-kernel, linux-kernel, Aleksey Makarov, Graeme Gregory,
	Jon Masters, Zheng, Lv, Mark Rutland

From: Jon Masters <jcm@redhat.com>

This patch adds support for ACPI_TABLE_UPGRADE for ARM64

To access initrd image we need to move initialization
of linear mapping a bit earlier.

The implementation of the feature acpi_table_upgrade()
(drivers/acpi/tables.c) works with initrd data represented as an array
in virtual memory.  It uses some library utility to find the redefined
tables in that array and iterates over it to copy the data to new
allocated memory.  So to access the initrd data via fixmap
we need to rewrite it considerably.

In x86 arch, kernel memory is already mapped by the time when
acpi_table_upgrade() and acpi_boot_table_init() are called so I
think that we can just move this mapping one function earlier too.

Signed-off-by: Jon Masters <jcm@redhat.com>
Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
---
 arch/arm64/Kconfig            | 1 +
 arch/arm64/include/asm/acpi.h | 2 ++
 arch/arm64/kernel/setup.c     | 6 ++++--
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 87c48ad..baee459 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -5,6 +5,7 @@ config ARM64
 	select ACPI_REDUCED_HARDWARE_ONLY if ACPI
 	select ACPI_MCFG if ACPI
 	select ARCH_HAS_DEVMEM_IS_ALLOWED
+	select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
 	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
 	select ARCH_HAS_ELF_RANDOMIZE
 	select ARCH_HAS_GCOV_PROFILE_ALL
diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
index aee323b..c7aefc5 100644
--- a/arch/arm64/include/asm/acpi.h
+++ b/arch/arm64/include/asm/acpi.h
@@ -113,4 +113,6 @@ static inline const char *acpi_get_enable_method(int cpu)
 pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr);
 #endif
 
+#define ACPI_TABLE_UPGRADE_MAX_PHYS MEMBLOCK_ALLOC_ACCESSIBLE
+
 #endif /*_ASM_ACPI_H*/
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index feab2ee..4bce811 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -261,11 +261,13 @@ void __init setup_arch(char **cmdline_p)
 	efi_init();
 	arm64_memblock_init();
 
+	paging_init();
+
+	acpi_table_upgrade();
+
 	/* Parse the ACPI tables for possible boot-time configuration */
 	acpi_boot_table_init();
 
-	paging_init();
-
 	if (acpi_disabled)
 		unflatten_device_tree();
 
-- 
2.8.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v3 5/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE
  2016-06-02 17:49     ` [PATCH v3 " Aleksey Makarov
@ 2016-06-14 15:51       ` Aleksey Makarov
  2016-06-14 16:41         ` Will Deacon
  0 siblings, 1 reply; 13+ messages in thread
From: Aleksey Makarov @ 2016-06-14 15:51 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon
  Cc: Rafael J . Wysocki, Len Brown, linux-acpi, linux-arm-kernel,
	linux-kernel, Graeme Gregory, Jon Masters, Zheng, Lv,
	Mark Rutland


On 06/02/2016 08:49 PM, Aleksey Makarov wrote:
> From: Jon Masters <jcm@redhat.com>
> 
> This patch adds support for ACPI_TABLE_UPGRADE for ARM64

Hi Catalin, Will,

Can you review this v3 patch please?  I changed PFN_PHYS(max_pfn) to
MEMBLOCK_ALLOC_ACCESSIBLE.

Thank you
Aleksey Makarov

> To access initrd image we need to move initialization
> of linear mapping a bit earlier.
> 
> The implementation of the feature acpi_table_upgrade()
> (drivers/acpi/tables.c) works with initrd data represented as an array
> in virtual memory.  It uses some library utility to find the redefined
> tables in that array and iterates over it to copy the data to new
> allocated memory.  So to access the initrd data via fixmap
> we need to rewrite it considerably.
> 
> In x86 arch, kernel memory is already mapped by the time when
> acpi_table_upgrade() and acpi_boot_table_init() are called so I
> think that we can just move this mapping one function earlier too.
> 
> Signed-off-by: Jon Masters <jcm@redhat.com>
> Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
> ---
>  arch/arm64/Kconfig            | 1 +
>  arch/arm64/include/asm/acpi.h | 2 ++
>  arch/arm64/kernel/setup.c     | 6 ++++--
>  3 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 87c48ad..baee459 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -5,6 +5,7 @@ config ARM64
>  	select ACPI_REDUCED_HARDWARE_ONLY if ACPI
>  	select ACPI_MCFG if ACPI
>  	select ARCH_HAS_DEVMEM_IS_ALLOWED
> +	select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
>  	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
>  	select ARCH_HAS_ELF_RANDOMIZE
>  	select ARCH_HAS_GCOV_PROFILE_ALL
> diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
> index aee323b..c7aefc5 100644
> --- a/arch/arm64/include/asm/acpi.h
> +++ b/arch/arm64/include/asm/acpi.h
> @@ -113,4 +113,6 @@ static inline const char *acpi_get_enable_method(int cpu)
>  pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr);
>  #endif
>  
> +#define ACPI_TABLE_UPGRADE_MAX_PHYS MEMBLOCK_ALLOC_ACCESSIBLE
> +
>  #endif /*_ASM_ACPI_H*/
> diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
> index feab2ee..4bce811 100644
> --- a/arch/arm64/kernel/setup.c
> +++ b/arch/arm64/kernel/setup.c
> @@ -261,11 +261,13 @@ void __init setup_arch(char **cmdline_p)
>  	efi_init();
>  	arm64_memblock_init();
>  
> +	paging_init();
> +
> +	acpi_table_upgrade();
> +
>  	/* Parse the ACPI tables for possible boot-time configuration */
>  	acpi_boot_table_init();
>  
> -	paging_init();
> -
>  	if (acpi_disabled)
>  		unflatten_device_tree();
>  
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3 5/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE
  2016-06-14 15:51       ` Aleksey Makarov
@ 2016-06-14 16:41         ` Will Deacon
  0 siblings, 0 replies; 13+ messages in thread
From: Will Deacon @ 2016-06-14 16:41 UTC (permalink / raw)
  To: Aleksey Makarov
  Cc: Catalin Marinas, Rafael J . Wysocki, Len Brown, linux-acpi,
	linux-arm-kernel, linux-kernel, Graeme Gregory, Jon Masters,
	Zheng, Lv, Mark Rutland

On Tue, Jun 14, 2016 at 06:51:19PM +0300, Aleksey Makarov wrote:
> 
> On 06/02/2016 08:49 PM, Aleksey Makarov wrote:
> > From: Jon Masters <jcm@redhat.com>
> > 
> > This patch adds support for ACPI_TABLE_UPGRADE for ARM64
> 
> Hi Catalin, Will,
> 
> Can you review this v3 patch please?  I changed PFN_PHYS(max_pfn) to
> MEMBLOCK_ALLOC_ACCESSIBLE.

I'm inclined to agree with Mark that this is something that should be
done by the bootloader (e.g. GRUB) if it's needed, rather than something
we should support in the kernel. Jon pitched the feature as a developer
aid for triaging problems, so it's not like we're in a state where some
widely available machine cannot currently boot Linux without this.

Having said that, the patch isn't exactly invasive and I suspect it's
only a matter of time before we will actually want something like this.
So I've come full circle on this patch:

Acked-by: Will Deacon <will.deacon@arm.com>

Will

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-06-14 16:41 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).