diff mbox

[34.3/71] x86/gpu: Sprinkle const, __init and __initconst to stolen memory quirks

Message ID 1399576782-15256-3-git-send-email-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjala May 8, 2014, 7:19 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

gen8_stolen_size() is missing __init, so add it.

Also all the intel_stolen_funcs structures can be marked
__initconst.

intel_stolen_ids[] can also be made const if we replace the
__initdata with __initconst.

Cc: Ingo Molnar <mingo@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 arch/x86/kernel/early-quirks.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Comments

Daniel Vetter May 12, 2014, 5:42 p.m. UTC | #1
On Thu, May 08, 2014 at 10:19:42PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> gen8_stolen_size() is missing __init, so add it.
> 
> Also all the intel_stolen_funcs structures can be marked
> __initconst.
> 
> intel_stolen_ids[] can also be made const if we replace the
> __initdata with __initconst.
> 
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

All three patches in the chv stolen reservation series merged to
drm-intel-next queue, thanks.
-Daniel

> ---
>  arch/x86/kernel/early-quirks.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
> index 8323575..f96098f 100644
> --- a/arch/x86/kernel/early-quirks.c
> +++ b/arch/x86/kernel/early-quirks.c
> @@ -418,7 +418,7 @@ static size_t __init gen6_stolen_size(int num, int slot, int func)
>  	return gmch_ctrl << 25; /* 32 MB units */
>  }
>  
> -static size_t gen8_stolen_size(int num, int slot, int func)
> +static size_t __init gen8_stolen_size(int num, int slot, int func)
>  {
>  	u16 gmch_ctrl;
>  
> @@ -454,47 +454,47 @@ struct intel_stolen_funcs {
>  	u32 (*base)(int num, int slot, int func, size_t size);
>  };
>  
> -static const struct intel_stolen_funcs i830_stolen_funcs = {
> +static const struct intel_stolen_funcs i830_stolen_funcs __initconst = {
>  	.base = i830_stolen_base,
>  	.size = i830_stolen_size,
>  };
>  
> -static const struct intel_stolen_funcs i845_stolen_funcs = {
> +static const struct intel_stolen_funcs i845_stolen_funcs __initconst = {
>  	.base = i845_stolen_base,
>  	.size = i830_stolen_size,
>  };
>  
> -static const struct intel_stolen_funcs i85x_stolen_funcs = {
> +static const struct intel_stolen_funcs i85x_stolen_funcs __initconst = {
>  	.base = i85x_stolen_base,
>  	.size = gen3_stolen_size,
>  };
>  
> -static const struct intel_stolen_funcs i865_stolen_funcs = {
> +static const struct intel_stolen_funcs i865_stolen_funcs __initconst = {
>  	.base = i865_stolen_base,
>  	.size = gen3_stolen_size,
>  };
>  
> -static const struct intel_stolen_funcs gen3_stolen_funcs = {
> +static const struct intel_stolen_funcs gen3_stolen_funcs __initconst = {
>  	.base = intel_stolen_base,
>  	.size = gen3_stolen_size,
>  };
>  
> -static const struct intel_stolen_funcs gen6_stolen_funcs = {
> +static const struct intel_stolen_funcs gen6_stolen_funcs __initconst = {
>  	.base = intel_stolen_base,
>  	.size = gen6_stolen_size,
>  };
>  
> -static const struct intel_stolen_funcs gen8_stolen_funcs = {
> +static const struct intel_stolen_funcs gen8_stolen_funcs __initconst = {
>  	.base = intel_stolen_base,
>  	.size = gen8_stolen_size,
>  };
>  
> -static const struct intel_stolen_funcs chv_stolen_funcs = {
> +static const struct intel_stolen_funcs chv_stolen_funcs __initconst = {
>  	.base = intel_stolen_base,
>  	.size = chv_stolen_size,
>  };
>  
> -static struct pci_device_id intel_stolen_ids[] __initdata = {
> +static const struct pci_device_id intel_stolen_ids[] __initconst = {
>  	INTEL_I830_IDS(&i830_stolen_funcs),
>  	INTEL_I845G_IDS(&i845_stolen_funcs),
>  	INTEL_I85X_IDS(&i85x_stolen_funcs),
> -- 
> 1.8.3.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index 8323575..f96098f 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -418,7 +418,7 @@  static size_t __init gen6_stolen_size(int num, int slot, int func)
 	return gmch_ctrl << 25; /* 32 MB units */
 }
 
-static size_t gen8_stolen_size(int num, int slot, int func)
+static size_t __init gen8_stolen_size(int num, int slot, int func)
 {
 	u16 gmch_ctrl;
 
@@ -454,47 +454,47 @@  struct intel_stolen_funcs {
 	u32 (*base)(int num, int slot, int func, size_t size);
 };
 
-static const struct intel_stolen_funcs i830_stolen_funcs = {
+static const struct intel_stolen_funcs i830_stolen_funcs __initconst = {
 	.base = i830_stolen_base,
 	.size = i830_stolen_size,
 };
 
-static const struct intel_stolen_funcs i845_stolen_funcs = {
+static const struct intel_stolen_funcs i845_stolen_funcs __initconst = {
 	.base = i845_stolen_base,
 	.size = i830_stolen_size,
 };
 
-static const struct intel_stolen_funcs i85x_stolen_funcs = {
+static const struct intel_stolen_funcs i85x_stolen_funcs __initconst = {
 	.base = i85x_stolen_base,
 	.size = gen3_stolen_size,
 };
 
-static const struct intel_stolen_funcs i865_stolen_funcs = {
+static const struct intel_stolen_funcs i865_stolen_funcs __initconst = {
 	.base = i865_stolen_base,
 	.size = gen3_stolen_size,
 };
 
-static const struct intel_stolen_funcs gen3_stolen_funcs = {
+static const struct intel_stolen_funcs gen3_stolen_funcs __initconst = {
 	.base = intel_stolen_base,
 	.size = gen3_stolen_size,
 };
 
-static const struct intel_stolen_funcs gen6_stolen_funcs = {
+static const struct intel_stolen_funcs gen6_stolen_funcs __initconst = {
 	.base = intel_stolen_base,
 	.size = gen6_stolen_size,
 };
 
-static const struct intel_stolen_funcs gen8_stolen_funcs = {
+static const struct intel_stolen_funcs gen8_stolen_funcs __initconst = {
 	.base = intel_stolen_base,
 	.size = gen8_stolen_size,
 };
 
-static const struct intel_stolen_funcs chv_stolen_funcs = {
+static const struct intel_stolen_funcs chv_stolen_funcs __initconst = {
 	.base = intel_stolen_base,
 	.size = chv_stolen_size,
 };
 
-static struct pci_device_id intel_stolen_ids[] __initdata = {
+static const struct pci_device_id intel_stolen_ids[] __initconst = {
 	INTEL_I830_IDS(&i830_stolen_funcs),
 	INTEL_I845G_IDS(&i845_stolen_funcs),
 	INTEL_I85X_IDS(&i85x_stolen_funcs),