aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/pci
diff options
context:
space:
mode:
authorMathias Krause <minipli@googlemail.com>2014-08-25 17:26:35 -0400
committerBjorn Helgaas <bhelgaas@google.com>2014-09-22 16:24:41 -0400
commit4ac9cbfa35f2c05ed294a2b3e0bf5d0bb7cba607 (patch)
tree1045570e28d57ebcf5a0fc63fff6026ffcd79ca4 /arch/x86/pci
parent52addcf9d6669fa439387610bc65c92fa0980cef (diff)
x86/PCI: Mark DMI tables as initialization data
The DMI tables are only used in __init code, thereby can be marked as initialization data, too. The same is true for the callback functions referenced from the DMI tables. This moves ~9.6 kB of code and r/o data to the init sections, marking the memory for release after initialization. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/pci')
-rw-r--r--arch/x86/pci/common.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 059a76c29739..7b20bccf3648 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -81,14 +81,14 @@ struct pci_ops pci_root_ops = {
81 */ 81 */
82DEFINE_RAW_SPINLOCK(pci_config_lock); 82DEFINE_RAW_SPINLOCK(pci_config_lock);
83 83
84static int can_skip_ioresource_align(const struct dmi_system_id *d) 84static int __init can_skip_ioresource_align(const struct dmi_system_id *d)
85{ 85{
86 pci_probe |= PCI_CAN_SKIP_ISA_ALIGN; 86 pci_probe |= PCI_CAN_SKIP_ISA_ALIGN;
87 printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident); 87 printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident);
88 return 0; 88 return 0;
89} 89}
90 90
91static const struct dmi_system_id can_skip_pciprobe_dmi_table[] = { 91static const struct dmi_system_id can_skip_pciprobe_dmi_table[] __initconst = {
92/* 92/*
93 * Systems where PCI IO resource ISA alignment can be skipped 93 * Systems where PCI IO resource ISA alignment can be skipped
94 * when the ISA enable bit in the bridge control is not set 94 * when the ISA enable bit in the bridge control is not set
@@ -186,7 +186,7 @@ void pcibios_remove_bus(struct pci_bus *bus)
186 * on the kernel command line (which was parsed earlier). 186 * on the kernel command line (which was parsed earlier).
187 */ 187 */
188 188
189static int set_bf_sort(const struct dmi_system_id *d) 189static int __init set_bf_sort(const struct dmi_system_id *d)
190{ 190{
191 if (pci_bf_sort == pci_bf_sort_default) { 191 if (pci_bf_sort == pci_bf_sort_default) {
192 pci_bf_sort = pci_dmi_bf; 192 pci_bf_sort = pci_dmi_bf;
@@ -195,8 +195,8 @@ static int set_bf_sort(const struct dmi_system_id *d)
195 return 0; 195 return 0;
196} 196}
197 197
198static void read_dmi_type_b1(const struct dmi_header *dm, 198static void __init read_dmi_type_b1(const struct dmi_header *dm,
199 void *private_data) 199 void *private_data)
200{ 200{
201 u8 *d = (u8 *)dm + 4; 201 u8 *d = (u8 *)dm + 4;
202 202
@@ -217,7 +217,7 @@ static void read_dmi_type_b1(const struct dmi_header *dm,
217 } 217 }
218} 218}
219 219
220static int find_sort_method(const struct dmi_system_id *d) 220static int __init find_sort_method(const struct dmi_system_id *d)
221{ 221{
222 dmi_walk(read_dmi_type_b1, NULL); 222 dmi_walk(read_dmi_type_b1, NULL);
223 223
@@ -232,7 +232,7 @@ static int find_sort_method(const struct dmi_system_id *d)
232 * Enable renumbering of PCI bus# ranges to reach all PCI busses (Cardbus) 232 * Enable renumbering of PCI bus# ranges to reach all PCI busses (Cardbus)
233 */ 233 */
234#ifdef __i386__ 234#ifdef __i386__
235static int assign_all_busses(const struct dmi_system_id *d) 235static int __init assign_all_busses(const struct dmi_system_id *d)
236{ 236{
237 pci_probe |= PCI_ASSIGN_ALL_BUSSES; 237 pci_probe |= PCI_ASSIGN_ALL_BUSSES;
238 printk(KERN_INFO "%s detected: enabling PCI bus# renumbering" 238 printk(KERN_INFO "%s detected: enabling PCI bus# renumbering"
@@ -241,7 +241,7 @@ static int assign_all_busses(const struct dmi_system_id *d)
241} 241}
242#endif 242#endif
243 243
244static int set_scan_all(const struct dmi_system_id *d) 244static int __init set_scan_all(const struct dmi_system_id *d)
245{ 245{
246 printk(KERN_INFO "PCI: %s detected, enabling pci=pcie_scan_all\n", 246 printk(KERN_INFO "PCI: %s detected, enabling pci=pcie_scan_all\n",
247 d->ident); 247 d->ident);
@@ -249,7 +249,7 @@ static int set_scan_all(const struct dmi_system_id *d)
249 return 0; 249 return 0;
250} 250}
251 251
252static const struct dmi_system_id pciprobe_dmi_table[] = { 252static const struct dmi_system_id pciprobe_dmi_table[] __initconst = {
253#ifdef __i386__ 253#ifdef __i386__
254/* 254/*
255 * Laptops which need pci=assign-busses to see Cardbus cards 255 * Laptops which need pci=assign-busses to see Cardbus cards
@@ -512,7 +512,7 @@ int __init pcibios_init(void)
512 return 0; 512 return 0;
513} 513}
514 514
515char * __init pcibios_setup(char *str) 515char *__init pcibios_setup(char *str)
516{ 516{
517 if (!strcmp(str, "off")) { 517 if (!strcmp(str, "off")) {
518 pci_probe = 0; 518 pci_probe = 0;