All of lore.kernel.org
 help / color / mirror / Atom feed
* ACPI table overriding via initrd cleanups
@ 2012-10-31 14:35 Thomas Renninger
  2012-10-31 14:35 ` [PATCH 1/3] ACPI: Cleanup acpi_initrd_override declaration and remove ifdefs Thomas Renninger
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Thomas Renninger @ 2012-10-31 14:35 UTC (permalink / raw)
  To: hpa; +Cc: linux-kernel

These are against latest x86-tip.
Only tiny cleanups. Would be great if they can be applied
to x86-tip.

Thanks,

   Thomas


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

* [PATCH 1/3] ACPI: Cleanup acpi_initrd_override declaration and remove ifdefs
  2012-10-31 14:35 ACPI table overriding via initrd cleanups Thomas Renninger
@ 2012-10-31 14:35 ` Thomas Renninger
  2012-10-31 14:35 ` [PATCH 2/3] ACPI: Make acpi_table_checksum static Thomas Renninger
  2012-10-31 14:35 ` [PATCH 3/3] ACPI: Overriding ACPI tables via initrd only works with an initrd Thomas Renninger
  2 siblings, 0 replies; 8+ messages in thread
From: Thomas Renninger @ 2012-10-31 14:35 UTC (permalink / raw)
  To: hpa; +Cc: linux-kernel, Thomas Renninger

Move the acpi_initrd_override() declaration out of CONFIG_ACPI area so that
acpi_initrd_override is also defined if CONFIG_ACPI is not defined.

Move the acpi_initrd_override() call into reserve_initrd() inside the
CONFIG_BLK_DEV_INITRD block.

Now ifdefs around the call in setup.c can be removed.

Cleanup only, no functional change.

Signed-off-by: Thomas Renninger <trenn@suse.de>
---
 arch/x86/kernel/setup.c |    6 ++----
 include/linux/acpi.h    |   16 ++++++++--------
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index e800bc6..db3ba50 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -411,6 +411,8 @@ static void __init reserve_initrd(void)
 	relocate_initrd();
 
 	memblock_free(ramdisk_image, ramdisk_end - ramdisk_image);
+
+	acpi_initrd_override((void *)initrd_start, initrd_end - initrd_start);
 }
 #else
 static void __init reserve_initrd(void)
@@ -956,10 +958,6 @@ void __init setup_arch(char **cmdline_p)
 
 	reserve_initrd();
 
-#if defined(CONFIG_ACPI) && defined(CONFIG_BLK_DEV_INITRD)
-	acpi_initrd_override((void *)initrd_start, initrd_end - initrd_start);
-#endif
-
 	reserve_crashkernel();
 
 	vsmp_init();
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index f70f18d..e4f9445 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -76,14 +76,6 @@ typedef int (*acpi_table_handler) (struct acpi_table_header *table);
 
 typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end);
 
-#ifdef CONFIG_ACPI_INITRD_TABLE_OVERRIDE
-void acpi_initrd_override(void *data, size_t size);
-#else
-static inline void acpi_initrd_override(void *data, size_t size)
-{
-}
-#endif
-
 char * __acpi_map_table (unsigned long phys_addr, unsigned long size);
 void __acpi_unmap_table(char *map, unsigned long size);
 int early_acpi_boot_init(void);
@@ -446,4 +438,12 @@ static inline void arch_reserve_mem_area(acpi_physical_address addr,
 #define acpi_os_set_prepare_sleep(func, pm1a_ctrl, pm1b_ctrl) do { } while (0)
 #endif
 
+#ifdef CONFIG_ACPI_INITRD_TABLE_OVERRIDE
+void acpi_initrd_override(void *data, size_t size);
+#else
+static inline void acpi_initrd_override(void *data, size_t size)
+{
+}
+#endif
+
 #endif	/*_LINUX_ACPI_H*/
-- 
1.7.6.1


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

* [PATCH 2/3] ACPI: Make acpi_table_checksum static
  2012-10-31 14:35 ACPI table overriding via initrd cleanups Thomas Renninger
  2012-10-31 14:35 ` [PATCH 1/3] ACPI: Cleanup acpi_initrd_override declaration and remove ifdefs Thomas Renninger
@ 2012-10-31 14:35 ` Thomas Renninger
  2012-10-31 14:35 ` [PATCH 3/3] ACPI: Overriding ACPI tables via initrd only works with an initrd Thomas Renninger
  2 siblings, 0 replies; 8+ messages in thread
From: Thomas Renninger @ 2012-10-31 14:35 UTC (permalink / raw)
  To: hpa; +Cc: linux-kernel, Fenghua Yu, Thomas Renninger

From: Fenghua Yu <fengguang.wu@intel.com>

Signed-off-by: Thomas Renninger <trenn@suse.de>
---
 drivers/acpi/osl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index a2845ff..a873c4f 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -542,7 +542,7 @@ static u64 acpi_tables_addr;
 static int all_tables_size;
 
 /* Copied from acpica/tbutils.c:acpi_tb_checksum() */
-u8 __init acpi_table_checksum(u8 *buffer, u32 length)
+static u8 __init acpi_table_checksum(u8 *buffer, u32 length)
 {
 	u8 sum = 0;
 	u8 *end = buffer + length;
-- 
1.7.6.1


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

* [PATCH 3/3] ACPI: Overriding ACPI tables via initrd only works with an initrd
  2012-10-31 14:35 ACPI table overriding via initrd cleanups Thomas Renninger
  2012-10-31 14:35 ` [PATCH 1/3] ACPI: Cleanup acpi_initrd_override declaration and remove ifdefs Thomas Renninger
  2012-10-31 14:35 ` [PATCH 2/3] ACPI: Make acpi_table_checksum static Thomas Renninger
@ 2012-10-31 14:35 ` Thomas Renninger
  2012-12-17  9:28   ` Borislav Petkov
  2 siblings, 1 reply; 8+ messages in thread
From: Thomas Renninger @ 2012-10-31 14:35 UTC (permalink / raw)
  To: hpa; +Cc: linux-kernel, Thomas Renninger

Reflect this dependency in Kconfig.
Shorten the config description as suggested by Borislav Petkov

Signed-off-by: Thomas Renninger <trenn@suse.de>
---
 drivers/acpi/Kconfig |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 44cea5d..ca939b4 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -262,7 +262,8 @@ config ACPI_CUSTOM_DSDT
 	default ACPI_CUSTOM_DSDT_FILE != ""
 
 config ACPI_INITRD_TABLE_OVERRIDE
-	bool "ACPI tables can be passed via uncompressed cpio in initrd"
+	bool "ACPI tables override via initrd"
+	depends on BLK_DEV_INITRD
 	default n
 	help
 	  This option provides functionality to override arbitrary ACPI tables
-- 
1.7.6.1


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

* Re: [PATCH 3/3] ACPI: Overriding ACPI tables via initrd only works with an initrd
  2012-10-31 14:35 ` [PATCH 3/3] ACPI: Overriding ACPI tables via initrd only works with an initrd Thomas Renninger
@ 2012-12-17  9:28   ` Borislav Petkov
  2012-12-17 18:08     ` H. Peter Anvin
  0 siblings, 1 reply; 8+ messages in thread
From: Borislav Petkov @ 2012-12-17  9:28 UTC (permalink / raw)
  To: H. Peter Anvin, Ingo Molnar, Thomas Gleixner
  Cc: Thomas Renninger, linux-kernel

Hi guys,

this one sanitizes the Kconfig entry prompt so can we pick it up for
-rc1 or later, please?

Thanks.

On Wed, Oct 31, 2012 at 03:35:47PM +0100, Thomas Renninger wrote:
> Reflect this dependency in Kconfig.
> Shorten the config description as suggested by Borislav Petkov
> 
> Signed-off-by: Thomas Renninger <trenn@suse.de>
> ---
>  drivers/acpi/Kconfig |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
> index 44cea5d..ca939b4 100644
> --- a/drivers/acpi/Kconfig
> +++ b/drivers/acpi/Kconfig
> @@ -262,7 +262,8 @@ config ACPI_CUSTOM_DSDT
>  	default ACPI_CUSTOM_DSDT_FILE != ""
>  
>  config ACPI_INITRD_TABLE_OVERRIDE
> -	bool "ACPI tables can be passed via uncompressed cpio in initrd"
> +	bool "ACPI tables override via initrd"
> +	depends on BLK_DEV_INITRD
>  	default n
>  	help
>  	  This option provides functionality to override arbitrary ACPI tables
> -- 
> 1.7.6.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* Re: [PATCH 3/3] ACPI: Overriding ACPI tables via initrd only works with an initrd
  2012-12-17  9:28   ` Borislav Petkov
@ 2012-12-17 18:08     ` H. Peter Anvin
  2012-12-17 18:14       ` Borislav Petkov
  2012-12-17 22:07       ` Thomas Renninger
  0 siblings, 2 replies; 8+ messages in thread
From: H. Peter Anvin @ 2012-12-17 18:08 UTC (permalink / raw)
  To: Borislav Petkov, Ingo Molnar, Thomas Gleixner, Thomas Renninger,
	linux-kernel

On 12/17/2012 01:28 AM, Borislav Petkov wrote:
> Hi guys,
>
> this one sanitizes the Kconfig entry prompt so can we pick it up for
> -rc1 or later, please?
>

Hm... all these are actually cleanups or fixes for the stuff that is now 
upstream, I believe... as minor fixes I think these can be pushed 
post-rc1 if we don't get to them sooner but it looks like they are all 
needed.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


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

* Re: [PATCH 3/3] ACPI: Overriding ACPI tables via initrd only works with an initrd
  2012-12-17 18:08     ` H. Peter Anvin
@ 2012-12-17 18:14       ` Borislav Petkov
  2012-12-17 22:07       ` Thomas Renninger
  1 sibling, 0 replies; 8+ messages in thread
From: Borislav Petkov @ 2012-12-17 18:14 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Ingo Molnar, Thomas Gleixner, Thomas Renninger, linux-kernel

On Mon, Dec 17, 2012 at 10:08:52AM -0800, H. Peter Anvin wrote:
> Hm... all these are actually cleanups or fixes for the stuff that is
> now upstream, I believe... as minor fixes I think these can be pushed
> post-rc1 if we don't get to them sooner but it looks like they are all
> needed.

/me is nodding in an agreeing manner after a quick glance over them.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* Re: [PATCH 3/3] ACPI: Overriding ACPI tables via initrd only works with an initrd
  2012-12-17 18:08     ` H. Peter Anvin
  2012-12-17 18:14       ` Borislav Petkov
@ 2012-12-17 22:07       ` Thomas Renninger
  1 sibling, 0 replies; 8+ messages in thread
From: Thomas Renninger @ 2012-12-17 22:07 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Borislav Petkov, Ingo Molnar, Thomas Gleixner, linux-kernel

On Monday, December 17, 2012 10:08:52 AM H. Peter Anvin wrote:
> On 12/17/2012 01:28 AM, Borislav Petkov wrote:
> > Hi guys,
> > 
> > this one sanitizes the Kconfig entry prompt so can we pick it up for
> > -rc1 or later, please?
> 
> Hm... all these are actually cleanups or fixes for the stuff that is now
> upstream, I believe... as minor fixes I think these can be pushed
> post-rc1 if we don't get to them sooner but it looks like they are all
> needed.
This and another one are more or less minor cleanups, not
urgently needed.
I can repost them the next days.

Thanks hpa for helping to finally get this feature mainline.
It's a huge enhancement for developing and debugging
ACPI related stuff on Linux.

   Thomas

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

end of thread, other threads:[~2012-12-17 22:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-31 14:35 ACPI table overriding via initrd cleanups Thomas Renninger
2012-10-31 14:35 ` [PATCH 1/3] ACPI: Cleanup acpi_initrd_override declaration and remove ifdefs Thomas Renninger
2012-10-31 14:35 ` [PATCH 2/3] ACPI: Make acpi_table_checksum static Thomas Renninger
2012-10-31 14:35 ` [PATCH 3/3] ACPI: Overriding ACPI tables via initrd only works with an initrd Thomas Renninger
2012-12-17  9:28   ` Borislav Petkov
2012-12-17 18:08     ` H. Peter Anvin
2012-12-17 18:14       ` Borislav Petkov
2012-12-17 22:07       ` Thomas Renninger

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.