Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1426495 > unrolled thread
| Started by | Aleksey Makarov <aleksey.makarov@linaro.org> |
|---|---|
| First post | 2016-06-20 13:10 +0200 |
| Last post | 2016-06-22 01:40 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v4 0/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE Aleksey Makarov <aleksey.makarov@linaro.org> - 2016-06-20 13:10 +0200
[PATCH v4 2/5] ACPI: table upgrade: refactor function definitions Aleksey Makarov <aleksey.makarov@linaro.org> - 2016-06-20 13:10 +0200
[PATCH v4 1/5] ACPI: table upgrade: use cacheable map for tables Aleksey Makarov <aleksey.makarov@linaro.org> - 2016-06-20 13:30 +0200
Re: [PATCH v4 0/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE "Rafael J. Wysocki" <rafael@kernel.org> - 2016-06-22 01:40 +0200
| From | Aleksey Makarov <aleksey.makarov@linaro.org> |
|---|---|
| Date | 2016-06-20 13:10 +0200 |
| Subject | [PATCH v4 0/5] ACPI: ARM64: support for ACPI_TABLE_UPGRADE |
| Message-ID | <rM55T-7aE-3@gated-at.bofh.it> |
Hi Rafael, You said you are ok with the ACPI part of the patches [4]. The patchset has received ACK from Will [5]. Can you consider pulling it please? Thank you Aleksey Makarov 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-20160620 v4: - rebase to next-20160620 - add Acked-by: Will Deacon <will.deacon@arm.com> - add Acked-by: Lv Zheng <lv.zheng@intel.com> for [2/5] v3: https://lkml.kernel.org/g/20160602174910.30428-1-aleksey.makarov@linaro.org -- only [5/5] - change PFN_PHYS(max_pfn) to MEMBLOCK_ALLOC_ACCESSIBLE. (Catalin Marinas) v2: https://lkml.kernel.org/g/1463674518-22477-1-git-send-email-aleksey.makarov@linaro.org - 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 [4]: https://lkml.kernel.org/g/CAJZ5v0is7c833aQkRm-D+TwLM+eUYeKEAdLOOdrEdT-hrC_M1A@mail.gmail.com [5]: https://lkml.kernel.org/g/20160614164116.GF16531@arm.com 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.3
[toc] | [next] | [standalone]
| From | Aleksey Makarov <aleksey.makarov@linaro.org> |
|---|---|
| Date | 2016-06-20 13:10 +0200 |
| Subject | [PATCH v4 2/5] ACPI: table upgrade: refactor function definitions |
| Message-ID | <rM5fB-7t6-35@gated-at.bofh.it> |
| In reply to | #1426495 |
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>
Acked-by: Lv Zheng <lv.zheng@intel.com>
---
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 eb2f3b5..09d2f5b 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 9cab064..fb9d568 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,
@@ -592,7 +591,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) { }
@@ -1009,4 +1007,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.3
[toc] | [prev] | [next] | [standalone]
| From | Aleksey Makarov <aleksey.makarov@linaro.org> |
|---|---|
| Date | 2016-06-20 13:30 +0200 |
| Subject | [PATCH v4 1/5] ACPI: table upgrade: use cacheable map for tables |
| Message-ID | <rM5yV-7zy-1@gated-at.bofh.it> |
| In reply to | #1426495 |
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.3
[toc] | [prev] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rafael@kernel.org> |
|---|---|
| Date | 2016-06-22 01:40 +0200 |
| Message-ID | <rMDqW-3ZI-5@gated-at.bofh.it> |
| In reply to | #1426495 |
On Mon, Jun 20, 2016 at 12:56 PM, Aleksey Makarov <aleksey.makarov@linaro.org> wrote: > Hi Rafael, > > You said you are ok with the ACPI part of the patches [4]. > The patchset has received ACK from Will [5]. Can you consider pulling it please? I've queued this up for v4.8, but can you please base your patches on the Linus' tree next time? Thanks, Rafael
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web