aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2009-01-08 19:58:05 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-08 19:58:05 -0500
commit6943f3da3e64edd95ee2d33abc0a642357746ba6 (patch)
tree156201055ba46d9bea791aa0cf34903756647e5d /arch
parent45536ffc8dcb7798ff4818f54391547e5af19648 (diff)
sparc: move EXPORT_SYMBOL to the symbols definition
Move all applicable EXPORT_SYMBOL()s to the file where the respective symbol is defined. Removed all the includes that are no longer needed in sparc_ksyms_32.c Comment all remaining EXPORT_SYMBOL()s in sparc_ksyms_32.c Two symbols are shared with sparc64 thus the exports were removed from the sparc_ksyms_64.c too, along with the include their ommission made redundant. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Additions by Julian Calaby: * Moved EXPORT_SYMBOL()s for prom functions to their rightful places. * Made some minor cleanups to the includes and comments of sparc_ksyms_32.c * Made another subtraction from sparc_ksyms_64.c * Updated and tidied commit message. * Rebased patch over sparc-2.6.git HEAD. * Ensured that all modified files have the correct includes. Signed-off-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/kernel/auxio_32.c3
-rw-r--r--arch/sparc/kernel/cpu.c2
-rw-r--r--arch/sparc/kernel/idprom.c3
-rw-r--r--arch/sparc/kernel/ioport.c15
-rw-r--r--arch/sparc/kernel/irq_32.c1
-rw-r--r--arch/sparc/kernel/pcic.c6
-rw-r--r--arch/sparc/kernel/process_32.c2
-rw-r--r--arch/sparc/kernel/setup_32.c3
-rw-r--r--arch/sparc/kernel/sparc_ksyms_32.c137
-rw-r--r--arch/sparc/kernel/sparc_ksyms_64.c5
-rw-r--r--arch/sparc/kernel/time_32.c2
-rw-r--r--arch/sparc/kernel/traps_32.c1
-rw-r--r--arch/sparc/mm/generic_32.c1
-rw-r--r--arch/sparc/mm/highmem.c2
-rw-r--r--arch/sparc/mm/init_32.c6
-rw-r--r--arch/sparc/prom/init_32.c4
-rw-r--r--arch/sparc/prom/misc_32.c3
-rw-r--r--arch/sparc/prom/ranges.c3
-rw-r--r--arch/sparc/prom/tree_32.c17
19 files changed, 82 insertions, 134 deletions
diff --git a/arch/sparc/kernel/auxio_32.c b/arch/sparc/kernel/auxio_32.c
index 09c857215a52..45c41232fc4c 100644
--- a/arch/sparc/kernel/auxio_32.c
+++ b/arch/sparc/kernel/auxio_32.c
@@ -76,6 +76,7 @@ unsigned char get_auxio(void)
76 return sbus_readb(auxio_register); 76 return sbus_readb(auxio_register);
77 return 0; 77 return 0;
78} 78}
79EXPORT_SYMBOL(get_auxio);
79 80
80void set_auxio(unsigned char bits_on, unsigned char bits_off) 81void set_auxio(unsigned char bits_on, unsigned char bits_off)
81{ 82{
@@ -102,7 +103,7 @@ void set_auxio(unsigned char bits_on, unsigned char bits_off)
102 }; 103 };
103 spin_unlock_irqrestore(&auxio_lock, flags); 104 spin_unlock_irqrestore(&auxio_lock, flags);
104} 105}
105 106EXPORT_SYMBOL(set_auxio);
106 107
107/* sun4m power control register (AUXIO2) */ 108/* sun4m power control register (AUXIO2) */
108 109
diff --git a/arch/sparc/kernel/cpu.c b/arch/sparc/kernel/cpu.c
index 6c2da2420f76..f0b825505da5 100644
--- a/arch/sparc/kernel/cpu.c
+++ b/arch/sparc/kernel/cpu.c
@@ -5,6 +5,7 @@
5 */ 5 */
6 6
7#include <linux/kernel.h> 7#include <linux/kernel.h>
8#include <linux/module.h>
8#include <linux/init.h> 9#include <linux/init.h>
9#include <linux/smp.h> 10#include <linux/smp.h>
10#include <linux/threads.h> 11#include <linux/threads.h>
@@ -20,6 +21,7 @@
20#include "kernel.h" 21#include "kernel.h"
21 22
22DEFINE_PER_CPU(cpuinfo_sparc, __cpu_data) = { 0 }; 23DEFINE_PER_CPU(cpuinfo_sparc, __cpu_data) = { 0 };
24EXPORT_PER_CPU_SYMBOL(__cpu_data);
23 25
24struct cpu_info { 26struct cpu_info {
25 int psr_vers; 27 int psr_vers;
diff --git a/arch/sparc/kernel/idprom.c b/arch/sparc/kernel/idprom.c
index c16135e0c151..57922f69c3f7 100644
--- a/arch/sparc/kernel/idprom.c
+++ b/arch/sparc/kernel/idprom.c
@@ -8,11 +8,14 @@
8#include <linux/kernel.h> 8#include <linux/kernel.h>
9#include <linux/types.h> 9#include <linux/types.h>
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/module.h>
11 12
12#include <asm/oplib.h> 13#include <asm/oplib.h>
13#include <asm/idprom.h> 14#include <asm/idprom.h>
14 15
15struct idprom *idprom; 16struct idprom *idprom;
17EXPORT_SYMBOL(idprom);
18
16static struct idprom idprom_buffer; 19static struct idprom idprom_buffer;
17 20
18#ifdef CONFIG_SPARC32 21#ifdef CONFIG_SPARC32
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index 7ce14f05eb48..87ea0d03d975 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -120,6 +120,7 @@ void __iomem *ioremap(unsigned long offset, unsigned long size)
120 sprintf(name, "phys_%08x", (u32)offset); 120 sprintf(name, "phys_%08x", (u32)offset);
121 return _sparc_alloc_io(0, offset, size, name); 121 return _sparc_alloc_io(0, offset, size, name);
122} 122}
123EXPORT_SYMBOL(ioremap);
123 124
124/* 125/*
125 * Comlimentary to ioremap(). 126 * Comlimentary to ioremap().
@@ -141,6 +142,7 @@ void iounmap(volatile void __iomem *virtual)
141 kfree(res); 142 kfree(res);
142 } 143 }
143} 144}
145EXPORT_SYMBOL(iounmap);
144 146
145void __iomem *of_ioremap(struct resource *res, unsigned long offset, 147void __iomem *of_ioremap(struct resource *res, unsigned long offset,
146 unsigned long size, char *name) 148 unsigned long size, char *name)
@@ -237,6 +239,7 @@ void sbus_set_sbus64(struct device *dev, int x)
237{ 239{
238 printk("sbus_set_sbus64: unsupported\n"); 240 printk("sbus_set_sbus64: unsupported\n");
239} 241}
242EXPORT_SYMBOL(sbus_set_sbus64);
240 243
241/* 244/*
242 * Allocate a chunk of memory suitable for DMA. 245 * Allocate a chunk of memory suitable for DMA.
@@ -436,6 +439,7 @@ void *pci_alloc_consistent(struct pci_dev *pdev, size_t len, dma_addr_t *pba)
436 *pba = virt_to_phys(va); /* equals virt_to_bus (R.I.P.) for us. */ 439 *pba = virt_to_phys(va); /* equals virt_to_bus (R.I.P.) for us. */
437 return (void *) res->start; 440 return (void *) res->start;
438} 441}
442EXPORT_SYMBOL(pci_alloc_consistent);
439 443
440/* Free and unmap a consistent DMA buffer. 444/* Free and unmap a consistent DMA buffer.
441 * cpu_addr is what was returned from pci_alloc_consistent, 445 * cpu_addr is what was returned from pci_alloc_consistent,
@@ -477,6 +481,7 @@ void pci_free_consistent(struct pci_dev *pdev, size_t n, void *p, dma_addr_t ba)
477 481
478 free_pages(pgp, get_order(n)); 482 free_pages(pgp, get_order(n));
479} 483}
484EXPORT_SYMBOL(pci_free_consistent);
480 485
481/* Map a single buffer of the indicated size for DMA in streaming mode. 486/* Map a single buffer of the indicated size for DMA in streaming mode.
482 * The 32-bit bus address to use is returned. 487 * The 32-bit bus address to use is returned.
@@ -491,6 +496,7 @@ dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size,
491 /* IIep is write-through, not flushing. */ 496 /* IIep is write-through, not flushing. */
492 return virt_to_phys(ptr); 497 return virt_to_phys(ptr);
493} 498}
499EXPORT_SYMBOL(pci_map_single);
494 500
495/* Unmap a single streaming mode DMA translation. The dma_addr and size 501/* Unmap a single streaming mode DMA translation. The dma_addr and size
496 * must match what was provided for in a previous pci_map_single call. All 502 * must match what was provided for in a previous pci_map_single call. All
@@ -508,6 +514,7 @@ void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t ba, size_t size,
508 (size + PAGE_SIZE-1) & PAGE_MASK); 514 (size + PAGE_SIZE-1) & PAGE_MASK);
509 } 515 }
510} 516}
517EXPORT_SYMBOL(pci_unmap_single);
511 518
512/* 519/*
513 * Same as pci_map_single, but with pages. 520 * Same as pci_map_single, but with pages.
@@ -519,6 +526,7 @@ dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page *page,
519 /* IIep is write-through, not flushing. */ 526 /* IIep is write-through, not flushing. */
520 return page_to_phys(page) + offset; 527 return page_to_phys(page) + offset;
521} 528}
529EXPORT_SYMBOL(pci_map_page);
522 530
523void pci_unmap_page(struct pci_dev *hwdev, 531void pci_unmap_page(struct pci_dev *hwdev,
524 dma_addr_t dma_address, size_t size, int direction) 532 dma_addr_t dma_address, size_t size, int direction)
@@ -526,6 +534,7 @@ void pci_unmap_page(struct pci_dev *hwdev,
526 BUG_ON(direction == PCI_DMA_NONE); 534 BUG_ON(direction == PCI_DMA_NONE);
527 /* mmu_inval_dma_area XXX */ 535 /* mmu_inval_dma_area XXX */
528} 536}
537EXPORT_SYMBOL(pci_unmap_page);
529 538
530/* Map a set of buffers described by scatterlist in streaming 539/* Map a set of buffers described by scatterlist in streaming
531 * mode for DMA. This is the scather-gather version of the 540 * mode for DMA. This is the scather-gather version of the
@@ -557,6 +566,7 @@ int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sgl, int nents,
557 } 566 }
558 return nents; 567 return nents;
559} 568}
569EXPORT_SYMBOL(pci_map_sg);
560 570
561/* Unmap a set of streaming mode DMA translations. 571/* Unmap a set of streaming mode DMA translations.
562 * Again, cpu read rules concerning calls here are the same as for 572 * Again, cpu read rules concerning calls here are the same as for
@@ -578,6 +588,7 @@ void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sgl, int nents,
578 } 588 }
579 } 589 }
580} 590}
591EXPORT_SYMBOL(pci_unmap_sg);
581 592
582/* Make physical memory consistent for a single 593/* Make physical memory consistent for a single
583 * streaming mode DMA translation before or after a transfer. 594 * streaming mode DMA translation before or after a transfer.
@@ -597,6 +608,7 @@ void pci_dma_sync_single_for_cpu(struct pci_dev *hwdev, dma_addr_t ba, size_t si
597 (size + PAGE_SIZE-1) & PAGE_MASK); 608 (size + PAGE_SIZE-1) & PAGE_MASK);
598 } 609 }
599} 610}
611EXPORT_SYMBOL(pci_dma_sync_single_for_cpu);
600 612
601void pci_dma_sync_single_for_device(struct pci_dev *hwdev, dma_addr_t ba, size_t size, int direction) 613void pci_dma_sync_single_for_device(struct pci_dev *hwdev, dma_addr_t ba, size_t size, int direction)
602{ 614{
@@ -606,6 +618,7 @@ void pci_dma_sync_single_for_device(struct pci_dev *hwdev, dma_addr_t ba, size_t
606 (size + PAGE_SIZE-1) & PAGE_MASK); 618 (size + PAGE_SIZE-1) & PAGE_MASK);
607 } 619 }
608} 620}
621EXPORT_SYMBOL(pci_dma_sync_single_for_device);
609 622
610/* Make physical memory consistent for a set of streaming 623/* Make physical memory consistent for a set of streaming
611 * mode DMA translations after a transfer. 624 * mode DMA translations after a transfer.
@@ -628,6 +641,7 @@ void pci_dma_sync_sg_for_cpu(struct pci_dev *hwdev, struct scatterlist *sgl, int
628 } 641 }
629 } 642 }
630} 643}
644EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu);
631 645
632void pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist *sgl, int nents, int direction) 646void pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist *sgl, int nents, int direction)
633{ 647{
@@ -644,6 +658,7 @@ void pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist *sgl,
644 } 658 }
645 } 659 }
646} 660}
661EXPORT_SYMBOL(pci_dma_sync_sg_for_device);
647#endif /* CONFIG_PCI */ 662#endif /* CONFIG_PCI */
648 663
649#ifdef CONFIG_PROC_FS 664#ifdef CONFIG_PROC_FS
diff --git a/arch/sparc/kernel/irq_32.c b/arch/sparc/kernel/irq_32.c
index 1eff942fe22f..44dd5ee64339 100644
--- a/arch/sparc/kernel/irq_32.c
+++ b/arch/sparc/kernel/irq_32.c
@@ -294,6 +294,7 @@ void synchronize_irq(unsigned int irq)
294 while (sparc_irq[cpu_irq].flags & SPARC_IRQ_INPROGRESS) 294 while (sparc_irq[cpu_irq].flags & SPARC_IRQ_INPROGRESS)
295 cpu_relax(); 295 cpu_relax();
296} 296}
297EXPORT_SYMBOL(synchronize_irq);
297#endif /* SMP */ 298#endif /* SMP */
298 299
299void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs) 300void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs)
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c
index 75ed98be3edf..85e7037429b9 100644
--- a/arch/sparc/kernel/pcic.c
+++ b/arch/sparc/kernel/pcic.c
@@ -956,6 +956,7 @@ void outsb(unsigned long addr, const void *src, unsigned long count)
956 /* addr += 1; */ 956 /* addr += 1; */
957 } 957 }
958} 958}
959EXPORT_SYMBOL(outsb);
959 960
960void outsw(unsigned long addr, const void *src, unsigned long count) 961void outsw(unsigned long addr, const void *src, unsigned long count)
961{ 962{
@@ -966,6 +967,7 @@ void outsw(unsigned long addr, const void *src, unsigned long count)
966 /* addr += 2; */ 967 /* addr += 2; */
967 } 968 }
968} 969}
970EXPORT_SYMBOL(outsw);
969 971
970void outsl(unsigned long addr, const void *src, unsigned long count) 972void outsl(unsigned long addr, const void *src, unsigned long count)
971{ 973{
@@ -976,6 +978,7 @@ void outsl(unsigned long addr, const void *src, unsigned long count)
976 /* addr += 4; */ 978 /* addr += 4; */
977 } 979 }
978} 980}
981EXPORT_SYMBOL(outsl);
979 982
980void insb(unsigned long addr, void *dst, unsigned long count) 983void insb(unsigned long addr, void *dst, unsigned long count)
981{ 984{
@@ -986,6 +989,7 @@ void insb(unsigned long addr, void *dst, unsigned long count)
986 /* addr += 1; */ 989 /* addr += 1; */
987 } 990 }
988} 991}
992EXPORT_SYMBOL(insb);
989 993
990void insw(unsigned long addr, void *dst, unsigned long count) 994void insw(unsigned long addr, void *dst, unsigned long count)
991{ 995{
@@ -996,6 +1000,7 @@ void insw(unsigned long addr, void *dst, unsigned long count)
996 /* addr += 2; */ 1000 /* addr += 2; */
997 } 1001 }
998} 1002}
1003EXPORT_SYMBOL(insw);
999 1004
1000void insl(unsigned long addr, void *dst, unsigned long count) 1005void insl(unsigned long addr, void *dst, unsigned long count)
1001{ 1006{
@@ -1009,5 +1014,6 @@ void insl(unsigned long addr, void *dst, unsigned long count)
1009 /* addr += 4; */ 1014 /* addr += 4; */
1010 } 1015 }
1011} 1016}
1017EXPORT_SYMBOL(insl);
1012 1018
1013subsys_initcall(pcic_init); 1019subsys_initcall(pcic_init);
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c
index 5a8d8ced33da..f4bee35a1b46 100644
--- a/arch/sparc/kernel/process_32.c
+++ b/arch/sparc/kernel/process_32.c
@@ -44,6 +44,7 @@
44 * Set in pm platform drivers (apc.c and pmc.c) 44 * Set in pm platform drivers (apc.c and pmc.c)
45 */ 45 */
46void (*pm_idle)(void); 46void (*pm_idle)(void);
47EXPORT_SYMBOL(pm_idle);
47 48
48/* 49/*
49 * Power-off handler instantiation for pm.h compliance 50 * Power-off handler instantiation for pm.h compliance
@@ -673,6 +674,7 @@ pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
673 "g1", "g2", "g3", "o0", "o1", "memory", "cc"); 674 "g1", "g2", "g3", "o0", "o1", "memory", "cc");
674 return retval; 675 return retval;
675} 676}
677EXPORT_SYMBOL(kernel_thread);
676 678
677unsigned long get_wchan(struct task_struct *task) 679unsigned long get_wchan(struct task_struct *task)
678{ 680{
diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c
index c96c65d1b58b..998cadb4e7f2 100644
--- a/arch/sparc/kernel/setup_32.c
+++ b/arch/sparc/kernel/setup_32.c
@@ -199,7 +199,9 @@ extern unsigned short ram_flags;
199extern int root_mountflags; 199extern int root_mountflags;
200 200
201char reboot_command[COMMAND_LINE_SIZE]; 201char reboot_command[COMMAND_LINE_SIZE];
202
202enum sparc_cpu sparc_cpu_model; 203enum sparc_cpu sparc_cpu_model;
204EXPORT_SYMBOL(sparc_cpu_model);
203 205
204struct tt_entry *sparc_ttable; 206struct tt_entry *sparc_ttable;
205 207
@@ -391,6 +393,7 @@ void sun_do_break(void)
391 393
392 prom_cmdline(); 394 prom_cmdline();
393} 395}
396EXPORT_SYMBOL(sun_do_break);
394 397
395int stop_a_enabled = 1; 398int stop_a_enabled = 1;
396 399
diff --git a/arch/sparc/kernel/sparc_ksyms_32.c b/arch/sparc/kernel/sparc_ksyms_32.c
index f4ee14de8dbe..8397871365ad 100644
--- a/arch/sparc/kernel/sparc_ksyms_32.c
+++ b/arch/sparc/kernel/sparc_ksyms_32.c
@@ -9,42 +9,12 @@
9 9
10#include <linux/module.h> 10#include <linux/module.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/smp.h>
13#include <linux/types.h>
14#include <linux/sched.h>
15#include <linux/interrupt.h>
16#include <linux/in6.h>
17#include <linux/spinlock.h>
18#include <linux/mm.h>
19#include <linux/syscalls.h>
20#ifdef CONFIG_PCI
21#include <linux/pci.h>
22#endif
23#include <linux/pm.h>
24#ifdef CONFIG_HIGHMEM
25#include <linux/highmem.h>
26#endif
27 12
28#include <asm/oplib.h>
29#include <asm/delay.h>
30#include <asm/system.h>
31#include <asm/auxio.h>
32#include <asm/pgtable.h> 13#include <asm/pgtable.h>
33#include <asm/io.h>
34#include <asm/irq.h>
35#include <asm/idprom.h>
36#include <asm/head.h>
37#include <asm/smp.h>
38#include <asm/ptrace.h>
39#include <asm/uaccess.h> 14#include <asm/uaccess.h>
40#include <asm/checksum.h> 15#include <asm/delay.h>
41#ifdef CONFIG_SBUS 16#include <asm/head.h>
42#include <asm/dma.h> 17#include <asm/dma.h>
43#endif
44#include <asm/io-unit.h>
45#include <asm/bug.h>
46
47extern spinlock_t rtc_lock;
48 18
49struct poll { 19struct poll {
50 int fd; 20 int fd;
@@ -52,29 +22,15 @@ struct poll {
52 short revents; 22 short revents;
53}; 23};
54 24
55/* used by various drivers */ 25/* from entry.S */
56EXPORT_SYMBOL(sparc_cpu_model);
57EXPORT_SYMBOL(kernel_thread);
58
59EXPORT_SYMBOL(sparc_valid_addr_bitmap);
60EXPORT_SYMBOL(phys_base);
61EXPORT_SYMBOL(pfn_base);
62
63/* Per-CPU information table */
64EXPORT_PER_CPU_SYMBOL(__cpu_data);
65
66#ifdef CONFIG_SMP
67/* IRQ implementation. */
68EXPORT_SYMBOL(synchronize_irq);
69#endif
70
71EXPORT_SYMBOL(__udelay); 26EXPORT_SYMBOL(__udelay);
72EXPORT_SYMBOL(__ndelay); 27EXPORT_SYMBOL(__ndelay);
73EXPORT_SYMBOL(rtc_lock);
74EXPORT_SYMBOL(set_auxio);
75EXPORT_SYMBOL(get_auxio);
76EXPORT_SYMBOL(io_remap_pfn_range);
77 28
29/* from head_32.S */
30EXPORT_SYMBOL(__ret_efault);
31EXPORT_SYMBOL(empty_zero_page);
32
33/* Defined using magic */
78#ifndef CONFIG_SMP 34#ifndef CONFIG_SMP
79EXPORT_SYMBOL(BTFIXUP_CALL(___xchg32)); 35EXPORT_SYMBOL(BTFIXUP_CALL(___xchg32));
80#else 36#else
@@ -86,82 +42,7 @@ EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_sgl));
86EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_one)); 42EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_one));
87EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_sgl)); 43EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_sgl));
88EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_one)); 44EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_one));
89
90EXPORT_SYMBOL(BTFIXUP_CALL(pgprot_noncached)); 45EXPORT_SYMBOL(BTFIXUP_CALL(pgprot_noncached));
91 46
92#ifdef CONFIG_SBUS 47/* Exporting a symbol from /init/main.c */
93EXPORT_SYMBOL(sbus_set_sbus64);
94#endif
95#ifdef CONFIG_PCI
96EXPORT_SYMBOL(insb);
97EXPORT_SYMBOL(outsb);
98EXPORT_SYMBOL(insw);
99EXPORT_SYMBOL(outsw);
100EXPORT_SYMBOL(insl);
101EXPORT_SYMBOL(outsl);
102EXPORT_SYMBOL(pci_alloc_consistent);
103EXPORT_SYMBOL(pci_free_consistent);
104EXPORT_SYMBOL(pci_map_single);
105EXPORT_SYMBOL(pci_unmap_single);
106EXPORT_SYMBOL(pci_dma_sync_single_for_cpu);
107EXPORT_SYMBOL(pci_dma_sync_single_for_device);
108EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu);
109EXPORT_SYMBOL(pci_dma_sync_sg_for_device);
110EXPORT_SYMBOL(pci_map_sg);
111EXPORT_SYMBOL(pci_unmap_sg);
112EXPORT_SYMBOL(pci_map_page);
113EXPORT_SYMBOL(pci_unmap_page);
114/* Actually, ioremap/iounmap are not PCI specific. But it is ok for drivers. */
115EXPORT_SYMBOL(ioremap);
116EXPORT_SYMBOL(iounmap);
117#endif
118
119/* in arch/sparc/mm/highmem.c */
120#ifdef CONFIG_HIGHMEM
121EXPORT_SYMBOL(kmap_atomic);
122EXPORT_SYMBOL(kunmap_atomic);
123#endif
124
125/* prom symbols */
126EXPORT_SYMBOL(idprom);
127EXPORT_SYMBOL(prom_root_node);
128EXPORT_SYMBOL(prom_getchild);
129EXPORT_SYMBOL(prom_getsibling);
130EXPORT_SYMBOL(prom_searchsiblings);
131EXPORT_SYMBOL(prom_firstprop);
132EXPORT_SYMBOL(prom_nextprop);
133EXPORT_SYMBOL(prom_getproplen);
134EXPORT_SYMBOL(prom_getproperty);
135EXPORT_SYMBOL(prom_node_has_property);
136EXPORT_SYMBOL(prom_setprop);
137EXPORT_SYMBOL(saved_command_line); 48EXPORT_SYMBOL(saved_command_line);
138EXPORT_SYMBOL(prom_apply_obio_ranges);
139EXPORT_SYMBOL(prom_feval);
140EXPORT_SYMBOL(prom_getbool);
141EXPORT_SYMBOL(prom_getstring);
142EXPORT_SYMBOL(prom_getint);
143EXPORT_SYMBOL(prom_getintdefault);
144EXPORT_SYMBOL(prom_finddevice);
145EXPORT_SYMBOL(romvec);
146EXPORT_SYMBOL(__prom_getchild);
147EXPORT_SYMBOL(__prom_getsibling);
148
149/* sparc library symbols */
150EXPORT_SYMBOL(page_kernel);
151
152/* Cache flushing. */
153EXPORT_SYMBOL(sparc_flush_page_to_ram);
154
155/* For when serial stuff is built as modules. */
156EXPORT_SYMBOL(sun_do_break);
157
158EXPORT_SYMBOL(__ret_efault);
159
160#ifdef CONFIG_DEBUG_BUGVERBOSE
161EXPORT_SYMBOL(do_BUG);
162#endif
163
164/* Sun Power Management Idle Handler */
165EXPORT_SYMBOL(pm_idle);
166
167EXPORT_SYMBOL(empty_zero_page);
diff --git a/arch/sparc/kernel/sparc_ksyms_64.c b/arch/sparc/kernel/sparc_ksyms_64.c
index 09874eaf0fb6..62b5a91cd6b9 100644
--- a/arch/sparc/kernel/sparc_ksyms_64.c
+++ b/arch/sparc/kernel/sparc_ksyms_64.c
@@ -29,7 +29,6 @@
29#include <asm/pgtable.h> 29#include <asm/pgtable.h>
30#include <asm/io.h> 30#include <asm/io.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/idprom.h>
33#include <asm/elf.h> 32#include <asm/elf.h>
34#include <asm/head.h> 33#include <asm/head.h>
35#include <asm/smp.h> 34#include <asm/smp.h>
@@ -67,9 +66,6 @@ extern int __ashrdi3(int, int);
67 66
68extern int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs); 67extern int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs);
69 68
70/* Per-CPU information table */
71EXPORT_PER_CPU_SYMBOL(__cpu_data);
72
73/* used by various drivers */ 69/* used by various drivers */
74#ifdef CONFIG_SMP 70#ifdef CONFIG_SMP
75/* Out of line rw-locking implementation. */ 71/* Out of line rw-locking implementation. */
@@ -134,7 +130,6 @@ EXPORT_SYMBOL(die_if_kernel);
134EXPORT_SYMBOL(kernel_thread); 130EXPORT_SYMBOL(kernel_thread);
135 131
136/* prom symbols */ 132/* prom symbols */
137EXPORT_SYMBOL(idprom);
138EXPORT_SYMBOL(prom_root_node); 133EXPORT_SYMBOL(prom_root_node);
139EXPORT_SYMBOL(prom_getchild); 134EXPORT_SYMBOL(prom_getchild);
140EXPORT_SYMBOL(prom_getsibling); 135EXPORT_SYMBOL(prom_getsibling);
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c
index 00f7383c7657..614ac7b4a9dd 100644
--- a/arch/sparc/kernel/time_32.c
+++ b/arch/sparc/kernel/time_32.c
@@ -48,6 +48,8 @@
48#include "irq.h" 48#include "irq.h"
49 49
50DEFINE_SPINLOCK(rtc_lock); 50DEFINE_SPINLOCK(rtc_lock);
51EXPORT_SYMBOL(rtc_lock);
52
51static int set_rtc_mmss(unsigned long); 53static int set_rtc_mmss(unsigned long);
52static int sbus_do_settimeofday(struct timespec *tv); 54static int sbus_do_settimeofday(struct timespec *tv);
53 55
diff --git a/arch/sparc/kernel/traps_32.c b/arch/sparc/kernel/traps_32.c
index 213645be6e92..358283341b47 100644
--- a/arch/sparc/kernel/traps_32.c
+++ b/arch/sparc/kernel/traps_32.c
@@ -424,6 +424,7 @@ void do_BUG(const char *file, int line)
424 // bust_spinlocks(1); XXX Not in our original BUG() 424 // bust_spinlocks(1); XXX Not in our original BUG()
425 printk("kernel BUG at %s:%d!\n", file, line); 425 printk("kernel BUG at %s:%d!\n", file, line);
426} 426}
427EXPORT_SYMBOL(do_BUG);
427#endif 428#endif
428 429
429/* Since we have our mappings set up, on multiprocessors we can spin them 430/* Since we have our mappings set up, on multiprocessors we can spin them
diff --git a/arch/sparc/mm/generic_32.c b/arch/sparc/mm/generic_32.c
index a289261da9fd..5edcac184eaf 100644
--- a/arch/sparc/mm/generic_32.c
+++ b/arch/sparc/mm/generic_32.c
@@ -95,3 +95,4 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
95 flush_tlb_range(vma, beg, end); 95 flush_tlb_range(vma, beg, end);
96 return error; 96 return error;
97} 97}
98EXPORT_SYMBOL(io_remap_pfn_range);
diff --git a/arch/sparc/mm/highmem.c b/arch/sparc/mm/highmem.c
index 01fc6c254292..752d0c9fb544 100644
--- a/arch/sparc/mm/highmem.c
+++ b/arch/sparc/mm/highmem.c
@@ -62,6 +62,7 @@ void *kmap_atomic(struct page *page, enum km_type type)
62 62
63 return (void*) vaddr; 63 return (void*) vaddr;
64} 64}
65EXPORT_SYMBOL(kmap_atomic);
65 66
66void kunmap_atomic(void *kvaddr, enum km_type type) 67void kunmap_atomic(void *kvaddr, enum km_type type)
67{ 68{
@@ -98,6 +99,7 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
98 99
99 pagefault_enable(); 100 pagefault_enable();
100} 101}
102EXPORT_SYMBOL(kunmap_atomic);
101 103
102/* We may be fed a pagetable here by ptep_to_xxx and others. */ 104/* We may be fed a pagetable here by ptep_to_xxx and others. */
103struct page *kmap_atomic_to_page(void *ptr) 105struct page *kmap_atomic_to_page(void *ptr)
diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c
index fec926021f49..cbb282dab5a7 100644
--- a/arch/sparc/mm/init_32.c
+++ b/arch/sparc/mm/init_32.c
@@ -38,11 +38,16 @@
38DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 38DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
39 39
40unsigned long *sparc_valid_addr_bitmap; 40unsigned long *sparc_valid_addr_bitmap;
41EXPORT_SYMBOL(sparc_valid_addr_bitmap);
41 42
42unsigned long phys_base; 43unsigned long phys_base;
44EXPORT_SYMBOL(phys_base);
45
43unsigned long pfn_base; 46unsigned long pfn_base;
47EXPORT_SYMBOL(pfn_base);
44 48
45unsigned long page_kernel; 49unsigned long page_kernel;
50EXPORT_SYMBOL(page_kernel);
46 51
47struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS+1]; 52struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS+1];
48unsigned long sparc_unmapped_base; 53unsigned long sparc_unmapped_base;
@@ -522,3 +527,4 @@ void sparc_flush_page_to_ram(struct page *page)
522 if (vaddr) 527 if (vaddr)
523 __flush_page_to_ram(vaddr); 528 __flush_page_to_ram(vaddr);
524} 529}
530EXPORT_SYMBOL(sparc_flush_page_to_ram);
diff --git a/arch/sparc/prom/init_32.c b/arch/sparc/prom/init_32.c
index 873217c6d823..6193c33ed4d4 100644
--- a/arch/sparc/prom/init_32.c
+++ b/arch/sparc/prom/init_32.c
@@ -8,16 +8,20 @@
8 8
9#include <linux/kernel.h> 9#include <linux/kernel.h>
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/module.h>
11 12
12#include <asm/openprom.h> 13#include <asm/openprom.h>
13#include <asm/oplib.h> 14#include <asm/oplib.h>
14 15
15struct linux_romvec *romvec; 16struct linux_romvec *romvec;
17EXPORT_SYMBOL(romvec);
18
16enum prom_major_version prom_vers; 19enum prom_major_version prom_vers;
17unsigned int prom_rev, prom_prev; 20unsigned int prom_rev, prom_prev;
18 21
19/* The root node of the prom device tree. */ 22/* The root node of the prom device tree. */
20int prom_root_node; 23int prom_root_node;
24EXPORT_SYMBOL(prom_root_node);
21 25
22/* Pointer to the device tree operations structure. */ 26/* Pointer to the device tree operations structure. */
23struct linux_nodeops *prom_nodeops; 27struct linux_nodeops *prom_nodeops;
diff --git a/arch/sparc/prom/misc_32.c b/arch/sparc/prom/misc_32.c
index cf6c3f6d36c3..4d61c540bb3d 100644
--- a/arch/sparc/prom/misc_32.c
+++ b/arch/sparc/prom/misc_32.c
@@ -8,6 +8,8 @@
8#include <linux/types.h> 8#include <linux/types.h>
9#include <linux/kernel.h> 9#include <linux/kernel.h>
10#include <linux/sched.h> 10#include <linux/sched.h>
11#include <linux/module.h>
12
11#include <asm/openprom.h> 13#include <asm/openprom.h>
12#include <asm/oplib.h> 14#include <asm/oplib.h>
13#include <asm/auxio.h> 15#include <asm/auxio.h>
@@ -44,6 +46,7 @@ prom_feval(char *fstring)
44 restore_current(); 46 restore_current();
45 spin_unlock_irqrestore(&prom_lock, flags); 47 spin_unlock_irqrestore(&prom_lock, flags);
46} 48}
49EXPORT_SYMBOL(prom_feval);
47 50
48/* Drop into the prom, with the chance to continue with the 'go' 51/* Drop into the prom, with the chance to continue with the 'go'
49 * prom command. 52 * prom command.
diff --git a/arch/sparc/prom/ranges.c b/arch/sparc/prom/ranges.c
index 64579a376419..cd5790853ff6 100644
--- a/arch/sparc/prom/ranges.c
+++ b/arch/sparc/prom/ranges.c
@@ -6,6 +6,8 @@
6 */ 6 */
7 7
8#include <linux/init.h> 8#include <linux/init.h>
9#include <linux/module.h>
10
9#include <asm/openprom.h> 11#include <asm/openprom.h>
10#include <asm/oplib.h> 12#include <asm/oplib.h>
11#include <asm/types.h> 13#include <asm/types.h>
@@ -62,6 +64,7 @@ prom_apply_obio_ranges(struct linux_prom_registers *regs, int nregs)
62 if(num_obio_ranges) 64 if(num_obio_ranges)
63 prom_adjust_regs(regs, nregs, promlib_obio_ranges, num_obio_ranges); 65 prom_adjust_regs(regs, nregs, promlib_obio_ranges, num_obio_ranges);
64} 66}
67EXPORT_SYMBOL(prom_apply_obio_ranges);
65 68
66void __init prom_ranges_init(void) 69void __init prom_ranges_init(void)
67{ 70{
diff --git a/arch/sparc/prom/tree_32.c b/arch/sparc/prom/tree_32.c
index 6d8187357331..9d9965cd8bca 100644
--- a/arch/sparc/prom/tree_32.c
+++ b/arch/sparc/prom/tree_32.c
@@ -12,6 +12,7 @@
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/sched.h> 13#include <linux/sched.h>
14#include <linux/ctype.h> 14#include <linux/ctype.h>
15#include <linux/module.h>
15 16
16#include <asm/openprom.h> 17#include <asm/openprom.h>
17#include <asm/oplib.h> 18#include <asm/oplib.h>
@@ -33,6 +34,7 @@ int __prom_getchild(int node)
33 34
34 return cnode; 35 return cnode;
35} 36}
37EXPORT_SYMBOL(__prom_getchild);
36 38
37/* Return the child of node 'node' or zero if no this node has no 39/* Return the child of node 'node' or zero if no this node has no
38 * direct descendent. 40 * direct descendent.
@@ -50,6 +52,7 @@ int prom_getchild(int node)
50 52
51 return cnode; 53 return cnode;
52} 54}
55EXPORT_SYMBOL(prom_getchild);
53 56
54/* Internal version of prom_getsibling that does not alter return values. */ 57/* Internal version of prom_getsibling that does not alter return values. */
55int __prom_getsibling(int node) 58int __prom_getsibling(int node)
@@ -64,6 +67,7 @@ int __prom_getsibling(int node)
64 67
65 return cnode; 68 return cnode;
66} 69}
70EXPORT_SYMBOL(__prom_getsibling);
67 71
68/* Return the next sibling of node 'node' or zero if no more siblings 72/* Return the next sibling of node 'node' or zero if no more siblings
69 * at this level of depth in the tree. 73 * at this level of depth in the tree.
@@ -81,6 +85,7 @@ int prom_getsibling(int node)
81 85
82 return sibnode; 86 return sibnode;
83} 87}
88EXPORT_SYMBOL(prom_getsibling);
84 89
85/* Return the length in bytes of property 'prop' at node 'node'. 90/* Return the length in bytes of property 'prop' at node 'node'.
86 * Return -1 on error. 91 * Return -1 on error.
@@ -99,6 +104,7 @@ int prom_getproplen(int node, const char *prop)
99 spin_unlock_irqrestore(&prom_lock, flags); 104 spin_unlock_irqrestore(&prom_lock, flags);
100 return ret; 105 return ret;
101} 106}
107EXPORT_SYMBOL(prom_getproplen);
102 108
103/* Acquire a property 'prop' at node 'node' and place it in 109/* Acquire a property 'prop' at node 'node' and place it in
104 * 'buffer' which has a size of 'bufsize'. If the acquisition 110 * 'buffer' which has a size of 'bufsize'. If the acquisition
@@ -119,6 +125,7 @@ int prom_getproperty(int node, const char *prop, char *buffer, int bufsize)
119 spin_unlock_irqrestore(&prom_lock, flags); 125 spin_unlock_irqrestore(&prom_lock, flags);
120 return ret; 126 return ret;
121} 127}
128EXPORT_SYMBOL(prom_getproperty);
122 129
123/* Acquire an integer property and return its value. Returns -1 130/* Acquire an integer property and return its value. Returns -1
124 * on failure. 131 * on failure.
@@ -132,6 +139,7 @@ int prom_getint(int node, char *prop)
132 139
133 return -1; 140 return -1;
134} 141}
142EXPORT_SYMBOL(prom_getint);
135 143
136/* Acquire an integer property, upon error return the passed default 144/* Acquire an integer property, upon error return the passed default
137 * integer. 145 * integer.
@@ -145,6 +153,7 @@ int prom_getintdefault(int node, char *property, int deflt)
145 153
146 return retval; 154 return retval;
147} 155}
156EXPORT_SYMBOL(prom_getintdefault);
148 157
149/* Acquire a boolean property, 1=TRUE 0=FALSE. */ 158/* Acquire a boolean property, 1=TRUE 0=FALSE. */
150int prom_getbool(int node, char *prop) 159int prom_getbool(int node, char *prop)
@@ -155,6 +164,7 @@ int prom_getbool(int node, char *prop)
155 if(retval == -1) return 0; 164 if(retval == -1) return 0;
156 return 1; 165 return 1;
157} 166}
167EXPORT_SYMBOL(prom_getbool);
158 168
159/* Acquire a property whose value is a string, returns a null 169/* Acquire a property whose value is a string, returns a null
160 * string on error. The char pointer is the user supplied string 170 * string on error. The char pointer is the user supplied string
@@ -169,6 +179,7 @@ void prom_getstring(int node, char *prop, char *user_buf, int ubuf_size)
169 user_buf[0] = 0; 179 user_buf[0] = 0;
170 return; 180 return;
171} 181}
182EXPORT_SYMBOL(prom_getstring);
172 183
173 184
174/* Does the device at node 'node' have name 'name'? 185/* Does the device at node 'node' have name 'name'?
@@ -204,6 +215,7 @@ int prom_searchsiblings(int node_start, char *nodename)
204 215
205 return 0; 216 return 0;
206} 217}
218EXPORT_SYMBOL(prom_searchsiblings);
207 219
208/* Interal version of nextprop that does not alter return values. */ 220/* Interal version of nextprop that does not alter return values. */
209char * __prom_nextprop(int node, char * oprop) 221char * __prom_nextprop(int node, char * oprop)
@@ -228,6 +240,7 @@ char * prom_firstprop(int node, char *bufer)
228 240
229 return __prom_nextprop(node, ""); 241 return __prom_nextprop(node, "");
230} 242}
243EXPORT_SYMBOL(prom_firstprop);
231 244
232/* Return the property type string after property type 'oprop' 245/* Return the property type string after property type 'oprop'
233 * at node 'node' . Returns empty string if no more 246 * at node 'node' . Returns empty string if no more
@@ -240,6 +253,7 @@ char * prom_nextprop(int node, char *oprop, char *buffer)
240 253
241 return __prom_nextprop(node, oprop); 254 return __prom_nextprop(node, oprop);
242} 255}
256EXPORT_SYMBOL(prom_nextprop);
243 257
244int prom_finddevice(char *name) 258int prom_finddevice(char *name)
245{ 259{
@@ -287,6 +301,7 @@ int prom_finddevice(char *name)
287 } 301 }
288 return node; 302 return node;
289} 303}
304EXPORT_SYMBOL(prom_finddevice);
290 305
291int prom_node_has_property(int node, char *prop) 306int prom_node_has_property(int node, char *prop)
292{ 307{
@@ -299,6 +314,7 @@ int prom_node_has_property(int node, char *prop)
299 } while (*current_property); 314 } while (*current_property);
300 return 0; 315 return 0;
301} 316}
317EXPORT_SYMBOL(prom_node_has_property);
302 318
303/* Set property 'pname' at node 'node' to value 'value' which has a length 319/* Set property 'pname' at node 'node' to value 'value' which has a length
304 * of 'size' bytes. Return the number of bytes the prom accepted. 320 * of 'size' bytes. Return the number of bytes the prom accepted.
@@ -316,6 +332,7 @@ int prom_setprop(int node, const char *pname, char *value, int size)
316 spin_unlock_irqrestore(&prom_lock, flags); 332 spin_unlock_irqrestore(&prom_lock, flags);
317 return ret; 333 return ret;
318} 334}
335EXPORT_SYMBOL(prom_setprop);
319 336
320int prom_inst2pkg(int inst) 337int prom_inst2pkg(int inst)
321{ 338{