diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-30 20:37:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-30 20:37:56 -0400 |
commit | 3628aa0657e7bb3548a25fa3ea47510327d35efc (patch) | |
tree | 9735e85a7c184ba242597c97f9f3208bc4ff4690 /arch | |
parent | c897dcf6311ea9c8d24e96cc7f7fe9de58a0a6a2 (diff) |
sparc64: Fix section mis-match errors.
Fix all of the problems spotted by CONFIG_DEBUG_SECTION_MISMATCH under
arch/sparc during a 64-bit defconfig build.
They fall into two categorites:
1) of_device_id is marked as __initdata, and we can never do this
since these objects sit in the device core data structures way
past boot. So even if a driver will never be reloaded, we have
to keep the device ID table around.
Mark such cases const instead.
2) The bootmem alloc/free handling code in mdesc.c was not fully
marked __init as it should be, thus generating a reference
to free_bootmem_late() (which is __init) from non-__init code.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/kernel/auxio_64.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/central.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/ds.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/mdesc.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_fire.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_psycho.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_sabre.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_schizo.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_sun4v.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/power.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/time_64.c | 6 |
11 files changed, 14 insertions, 14 deletions
diff --git a/arch/sparc/kernel/auxio_64.c b/arch/sparc/kernel/auxio_64.c index 2abace076c7d..773091ac71a3 100644 --- a/arch/sparc/kernel/auxio_64.c +++ b/arch/sparc/kernel/auxio_64.c | |||
@@ -93,7 +93,7 @@ void auxio_set_lte(int on) | |||
93 | } | 93 | } |
94 | EXPORT_SYMBOL(auxio_set_lte); | 94 | EXPORT_SYMBOL(auxio_set_lte); |
95 | 95 | ||
96 | static struct of_device_id __initdata auxio_match[] = { | 96 | static const struct of_device_id auxio_match[] = { |
97 | { | 97 | { |
98 | .name = "auxio", | 98 | .name = "auxio", |
99 | }, | 99 | }, |
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c index 136d3718a74a..7eef3f741963 100644 --- a/arch/sparc/kernel/central.c +++ b/arch/sparc/kernel/central.c | |||
@@ -140,7 +140,7 @@ out_free: | |||
140 | goto out; | 140 | goto out; |
141 | } | 141 | } |
142 | 142 | ||
143 | static struct of_device_id __initdata clock_board_match[] = { | 143 | static const struct of_device_id clock_board_match[] = { |
144 | { | 144 | { |
145 | .name = "clock-board", | 145 | .name = "clock-board", |
146 | }, | 146 | }, |
@@ -245,7 +245,7 @@ out_free: | |||
245 | goto out; | 245 | goto out; |
246 | } | 246 | } |
247 | 247 | ||
248 | static struct of_device_id __initdata fhc_match[] = { | 248 | static const struct of_device_id fhc_match[] = { |
249 | { | 249 | { |
250 | .name = "fhc", | 250 | .name = "fhc", |
251 | }, | 251 | }, |
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c index 4a700f4b79ce..3add4de8a1a9 100644 --- a/arch/sparc/kernel/ds.c +++ b/arch/sparc/kernel/ds.c | |||
@@ -1218,7 +1218,7 @@ static int ds_remove(struct vio_dev *vdev) | |||
1218 | return 0; | 1218 | return 0; |
1219 | } | 1219 | } |
1220 | 1220 | ||
1221 | static struct vio_device_id __initdata ds_match[] = { | 1221 | static const struct vio_device_id ds_match[] = { |
1222 | { | 1222 | { |
1223 | .type = "domain-services-port", | 1223 | .type = "domain-services-port", |
1224 | }, | 1224 | }, |
diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c index 6addb914fcc8..56db06432ce9 100644 --- a/arch/sparc/kernel/mdesc.c +++ b/arch/sparc/kernel/mdesc.c | |||
@@ -107,7 +107,7 @@ static struct mdesc_handle * __init mdesc_memblock_alloc(unsigned int mdesc_size | |||
107 | return hp; | 107 | return hp; |
108 | } | 108 | } |
109 | 109 | ||
110 | static void mdesc_memblock_free(struct mdesc_handle *hp) | 110 | static void __init mdesc_memblock_free(struct mdesc_handle *hp) |
111 | { | 111 | { |
112 | unsigned int alloc_size; | 112 | unsigned int alloc_size; |
113 | unsigned long start; | 113 | unsigned long start; |
diff --git a/arch/sparc/kernel/pci_fire.c b/arch/sparc/kernel/pci_fire.c index 3d70f8326efd..d29a32fcc5e4 100644 --- a/arch/sparc/kernel/pci_fire.c +++ b/arch/sparc/kernel/pci_fire.c | |||
@@ -496,7 +496,7 @@ out_err: | |||
496 | return err; | 496 | return err; |
497 | } | 497 | } |
498 | 498 | ||
499 | static struct of_device_id __initdata fire_match[] = { | 499 | static const struct of_device_id fire_match[] = { |
500 | { | 500 | { |
501 | .name = "pci", | 501 | .name = "pci", |
502 | .compatible = "pciex108e,80f0", | 502 | .compatible = "pciex108e,80f0", |
diff --git a/arch/sparc/kernel/pci_psycho.c b/arch/sparc/kernel/pci_psycho.c index 56ee745064de..86ae08d9b6ee 100644 --- a/arch/sparc/kernel/pci_psycho.c +++ b/arch/sparc/kernel/pci_psycho.c | |||
@@ -592,7 +592,7 @@ out_err: | |||
592 | return err; | 592 | return err; |
593 | } | 593 | } |
594 | 594 | ||
595 | static struct of_device_id __initdata psycho_match[] = { | 595 | static const struct of_device_id psycho_match[] = { |
596 | { | 596 | { |
597 | .name = "pci", | 597 | .name = "pci", |
598 | .compatible = "pci108e,8000", | 598 | .compatible = "pci108e,8000", |
diff --git a/arch/sparc/kernel/pci_sabre.c b/arch/sparc/kernel/pci_sabre.c index 2857073342d2..948068a083fc 100644 --- a/arch/sparc/kernel/pci_sabre.c +++ b/arch/sparc/kernel/pci_sabre.c | |||
@@ -581,7 +581,7 @@ out_err: | |||
581 | return err; | 581 | return err; |
582 | } | 582 | } |
583 | 583 | ||
584 | static struct of_device_id __initdata sabre_match[] = { | 584 | static const struct of_device_id sabre_match[] = { |
585 | { | 585 | { |
586 | .name = "pci", | 586 | .name = "pci", |
587 | .compatible = "pci108e,a001", | 587 | .compatible = "pci108e,a001", |
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c index 1d41af73a92f..fecfcb2063c8 100644 --- a/arch/sparc/kernel/pci_schizo.c +++ b/arch/sparc/kernel/pci_schizo.c | |||
@@ -1470,7 +1470,7 @@ static int __devinit schizo_probe(struct platform_device *op) | |||
1470 | * and pci108e,8001. So list the chips in reverse chronological | 1470 | * and pci108e,8001. So list the chips in reverse chronological |
1471 | * order. | 1471 | * order. |
1472 | */ | 1472 | */ |
1473 | static struct of_device_id __initdata schizo_match[] = { | 1473 | static const struct of_device_id schizo_match[] = { |
1474 | { | 1474 | { |
1475 | .name = "pci", | 1475 | .name = "pci", |
1476 | .compatible = "pci108e,a801", | 1476 | .compatible = "pci108e,a801", |
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c index 6cf534681788..b01a06e9ae4e 100644 --- a/arch/sparc/kernel/pci_sun4v.c +++ b/arch/sparc/kernel/pci_sun4v.c | |||
@@ -998,7 +998,7 @@ out_err: | |||
998 | return err; | 998 | return err; |
999 | } | 999 | } |
1000 | 1000 | ||
1001 | static struct of_device_id __initdata pci_sun4v_match[] = { | 1001 | static const struct of_device_id pci_sun4v_match[] = { |
1002 | { | 1002 | { |
1003 | .name = "pci", | 1003 | .name = "pci", |
1004 | .compatible = "SUNW,sun4v-pci", | 1004 | .compatible = "SUNW,sun4v-pci", |
diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c index cd725fe238b2..cb4c0f57c024 100644 --- a/arch/sparc/kernel/power.c +++ b/arch/sparc/kernel/power.c | |||
@@ -52,7 +52,7 @@ static int __devinit power_probe(struct platform_device *op) | |||
52 | return 0; | 52 | return 0; |
53 | } | 53 | } |
54 | 54 | ||
55 | static struct of_device_id __initdata power_match[] = { | 55 | static const struct of_device_id power_match[] = { |
56 | { | 56 | { |
57 | .name = "power", | 57 | .name = "power", |
58 | }, | 58 | }, |
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index 95ec25faba39..2b8d54b2d850 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c | |||
@@ -442,7 +442,7 @@ static int __devinit rtc_probe(struct platform_device *op) | |||
442 | return platform_device_register(&rtc_cmos_device); | 442 | return platform_device_register(&rtc_cmos_device); |
443 | } | 443 | } |
444 | 444 | ||
445 | static struct of_device_id __initdata rtc_match[] = { | 445 | static const struct of_device_id rtc_match[] = { |
446 | { | 446 | { |
447 | .name = "rtc", | 447 | .name = "rtc", |
448 | .compatible = "m5819", | 448 | .compatible = "m5819", |
@@ -487,7 +487,7 @@ static int __devinit bq4802_probe(struct platform_device *op) | |||
487 | return platform_device_register(&rtc_bq4802_device); | 487 | return platform_device_register(&rtc_bq4802_device); |
488 | } | 488 | } |
489 | 489 | ||
490 | static struct of_device_id __initdata bq4802_match[] = { | 490 | static const struct of_device_id bq4802_match[] = { |
491 | { | 491 | { |
492 | .name = "rtc", | 492 | .name = "rtc", |
493 | .compatible = "bq4802", | 493 | .compatible = "bq4802", |
@@ -552,7 +552,7 @@ static int __devinit mostek_probe(struct platform_device *op) | |||
552 | return platform_device_register(&m48t59_rtc); | 552 | return platform_device_register(&m48t59_rtc); |
553 | } | 553 | } |
554 | 554 | ||
555 | static struct of_device_id __initdata mostek_match[] = { | 555 | static const struct of_device_id mostek_match[] = { |
556 | { | 556 | { |
557 | .name = "eeprom", | 557 | .name = "eeprom", |
558 | }, | 558 | }, |