Patchwork [3.5.y.z,extended,stable] Patch "x86/Sandy Bridge: mark arrays in __init functions as" has been added to staging queue

login
register
mail settings
Submitter Herton Ronaldo Krzesinski
Date Feb. 4, 2013, 9:46 p.m.
Message ID <1360014377-3554-1-git-send-email-herton.krzesinski@canonical.com>
Download mbox | patch
Permalink /patch/218081/
State New
Headers show

Comments

Herton Ronaldo Krzesinski - Feb. 4, 2013, 9:46 p.m.
This is a note to let you know that I have just added a patch titled

    x86/Sandy Bridge: mark arrays in __init functions as

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Herton

------

From dae82d14eb76a42ca69510273093c243208273f1 Mon Sep 17 00:00:00 2001
From: "H. Peter Anvin" <hpa@linux.intel.com>
Date: Sun, 13 Jan 2013 20:36:39 -0800
Subject: [PATCH] x86/Sandy Bridge: mark arrays in __init functions as
 __initconst

commit ab3cd8670e0b3fcde7f029e1503ed3c5138e9571 upstream.

Mark static arrays as __initconst so they get removed when the init
sections are flushed.

Reported-by: Mathias Krause <minipli@googlemail.com>
Link: http://lkml.kernel.org/r/75F4BEE6-CB0E-4426-B40B-697451677738@googlemail.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
---
 arch/x86/kernel/setup.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--
1.7.9.5

Patch

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 36cf7fa..8ac6c8a 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -617,7 +617,7 @@  static bool __init snb_gfx_workaround_needed(void)
 {
 	int i;
 	u16 vendor, devid;
-	static const u16 snb_ids[] = {
+	static const __initconst u16 snb_ids[] = {
 		0x0102,
 		0x0112,
 		0x0122,
@@ -649,7 +649,7 @@  static bool __init snb_gfx_workaround_needed(void)
  */
 static void __init trim_snb_memory(void)
 {
-	static const unsigned long bad_pages[] = {
+	static const __initconst unsigned long bad_pages[] = {
 		0x20050000,
 		0x20110000,
 		0x20130000,