diff options
Diffstat (limited to 'arch')
65 files changed, 287 insertions, 318 deletions
diff --git a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c index 8b02420f732e..692809e4aece 100644 --- a/arch/alpha/kernel/alpha_ksyms.c +++ b/arch/alpha/kernel/alpha_ksyms.c | |||
@@ -6,41 +6,14 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/string.h> | ||
10 | #include <linux/user.h> | ||
11 | #include <linux/elfcore.h> | ||
12 | #include <linux/socket.h> | ||
13 | #include <linux/syscalls.h> | ||
14 | #include <linux/in.h> | ||
15 | #include <linux/in6.h> | ||
16 | #include <linux/pci.h> | ||
17 | #include <linux/screen_info.h> | ||
18 | #include <linux/tty.h> | ||
19 | #include <linux/mm.h> | ||
20 | #include <linux/delay.h> | ||
21 | #include <linux/dma-mapping.h> | ||
22 | |||
23 | #include <asm/io.h> | ||
24 | #include <asm/console.h> | 9 | #include <asm/console.h> |
25 | #include <asm/hwrpb.h> | ||
26 | #include <asm/uaccess.h> | 10 | #include <asm/uaccess.h> |
27 | #include <asm/processor.h> | ||
28 | #include <asm/checksum.h> | 11 | #include <asm/checksum.h> |
29 | #include <linux/interrupt.h> | ||
30 | #include <asm/fpu.h> | 12 | #include <asm/fpu.h> |
31 | #include <asm/irq.h> | ||
32 | #include <asm/machvec.h> | 13 | #include <asm/machvec.h> |
33 | #include <asm/pgalloc.h> | ||
34 | #include <asm/semaphore.h> | ||
35 | #include <asm/tlbflush.h> | ||
36 | #include <asm/cacheflush.h> | ||
37 | #include <asm/vga.h> | ||
38 | 14 | ||
39 | #include <asm/unistd.h> | 15 | #include <asm/unistd.h> |
40 | 16 | ||
41 | extern struct hwrpb_struct *hwrpb; | ||
42 | extern spinlock_t rtc_lock; | ||
43 | |||
44 | /* these are C runtime functions with special calling conventions: */ | 17 | /* these are C runtime functions with special calling conventions: */ |
45 | extern void __divl (void); | 18 | extern void __divl (void); |
46 | extern void __reml (void); | 19 | extern void __reml (void); |
@@ -52,14 +25,9 @@ extern void __divqu (void); | |||
52 | extern void __remqu (void); | 25 | extern void __remqu (void); |
53 | 26 | ||
54 | EXPORT_SYMBOL(alpha_mv); | 27 | EXPORT_SYMBOL(alpha_mv); |
55 | EXPORT_SYMBOL(screen_info); | ||
56 | EXPORT_SYMBOL(perf_irq); | ||
57 | EXPORT_SYMBOL(callback_getenv); | 28 | EXPORT_SYMBOL(callback_getenv); |
58 | EXPORT_SYMBOL(callback_setenv); | 29 | EXPORT_SYMBOL(callback_setenv); |
59 | EXPORT_SYMBOL(callback_save_env); | 30 | EXPORT_SYMBOL(callback_save_env); |
60 | #ifdef CONFIG_ALPHA_GENERIC | ||
61 | EXPORT_SYMBOL(alpha_using_srm); | ||
62 | #endif /* CONFIG_ALPHA_GENERIC */ | ||
63 | 31 | ||
64 | /* platform dependent support */ | 32 | /* platform dependent support */ |
65 | EXPORT_SYMBOL(strcat); | 33 | EXPORT_SYMBOL(strcat); |
@@ -77,47 +45,14 @@ EXPORT_SYMBOL(__constant_c_memset); | |||
77 | EXPORT_SYMBOL(copy_page); | 45 | EXPORT_SYMBOL(copy_page); |
78 | EXPORT_SYMBOL(clear_page); | 46 | EXPORT_SYMBOL(clear_page); |
79 | 47 | ||
80 | EXPORT_SYMBOL(__direct_map_base); | ||
81 | EXPORT_SYMBOL(__direct_map_size); | ||
82 | |||
83 | #ifdef CONFIG_PCI | ||
84 | EXPORT_SYMBOL(pci_alloc_consistent); | ||
85 | EXPORT_SYMBOL(pci_free_consistent); | ||
86 | EXPORT_SYMBOL(pci_map_single); | ||
87 | EXPORT_SYMBOL(pci_map_page); | ||
88 | EXPORT_SYMBOL(pci_unmap_single); | ||
89 | EXPORT_SYMBOL(pci_unmap_page); | ||
90 | EXPORT_SYMBOL(pci_map_sg); | ||
91 | EXPORT_SYMBOL(pci_unmap_sg); | ||
92 | EXPORT_SYMBOL(pci_dma_supported); | ||
93 | EXPORT_SYMBOL(pci_dac_dma_supported); | ||
94 | EXPORT_SYMBOL(pci_dac_page_to_dma); | ||
95 | EXPORT_SYMBOL(pci_dac_dma_to_page); | ||
96 | EXPORT_SYMBOL(pci_dac_dma_to_offset); | ||
97 | EXPORT_SYMBOL(alpha_gendev_to_pci); | ||
98 | #endif | ||
99 | EXPORT_SYMBOL(dma_set_mask); | ||
100 | |||
101 | EXPORT_SYMBOL(dump_thread); | ||
102 | EXPORT_SYMBOL(dump_elf_thread); | ||
103 | EXPORT_SYMBOL(dump_elf_task); | ||
104 | EXPORT_SYMBOL(dump_elf_task_fp); | ||
105 | EXPORT_SYMBOL(hwrpb); | ||
106 | EXPORT_SYMBOL(start_thread); | ||
107 | EXPORT_SYMBOL(alpha_read_fp_reg); | 48 | EXPORT_SYMBOL(alpha_read_fp_reg); |
108 | EXPORT_SYMBOL(alpha_read_fp_reg_s); | 49 | EXPORT_SYMBOL(alpha_read_fp_reg_s); |
109 | EXPORT_SYMBOL(alpha_write_fp_reg); | 50 | EXPORT_SYMBOL(alpha_write_fp_reg); |
110 | EXPORT_SYMBOL(alpha_write_fp_reg_s); | 51 | EXPORT_SYMBOL(alpha_write_fp_reg_s); |
111 | 52 | ||
112 | /* In-kernel system calls. */ | 53 | /* entry.S */ |
113 | EXPORT_SYMBOL(kernel_thread); | 54 | EXPORT_SYMBOL(kernel_thread); |
114 | EXPORT_SYMBOL(sys_dup); | ||
115 | EXPORT_SYMBOL(sys_exit); | ||
116 | EXPORT_SYMBOL(sys_write); | ||
117 | EXPORT_SYMBOL(sys_lseek); | ||
118 | EXPORT_SYMBOL(kernel_execve); | 55 | EXPORT_SYMBOL(kernel_execve); |
119 | EXPORT_SYMBOL(sys_setsid); | ||
120 | EXPORT_SYMBOL(sys_wait4); | ||
121 | 56 | ||
122 | /* Networking helper routines. */ | 57 | /* Networking helper routines. */ |
123 | EXPORT_SYMBOL(csum_tcpudp_magic); | 58 | EXPORT_SYMBOL(csum_tcpudp_magic); |
@@ -134,10 +69,6 @@ EXPORT_SYMBOL(alpha_fp_emul_imprecise); | |||
134 | EXPORT_SYMBOL(alpha_fp_emul); | 69 | EXPORT_SYMBOL(alpha_fp_emul); |
135 | #endif | 70 | #endif |
136 | 71 | ||
137 | #ifdef CONFIG_ALPHA_BROKEN_IRQ_MASK | ||
138 | EXPORT_SYMBOL(__min_ipl); | ||
139 | #endif | ||
140 | |||
141 | /* | 72 | /* |
142 | * The following are specially called from the uaccess assembly stubs. | 73 | * The following are specially called from the uaccess assembly stubs. |
143 | */ | 74 | */ |
@@ -160,27 +91,10 @@ EXPORT_SYMBOL(up); | |||
160 | */ | 91 | */ |
161 | 92 | ||
162 | #ifdef CONFIG_SMP | 93 | #ifdef CONFIG_SMP |
163 | EXPORT_SYMBOL(flush_tlb_mm); | ||
164 | EXPORT_SYMBOL(flush_tlb_range); | ||
165 | EXPORT_SYMBOL(flush_tlb_page); | ||
166 | EXPORT_SYMBOL(smp_imb); | ||
167 | EXPORT_SYMBOL(cpu_data); | ||
168 | EXPORT_SYMBOL(smp_num_cpus); | ||
169 | EXPORT_SYMBOL(smp_call_function); | ||
170 | EXPORT_SYMBOL(smp_call_function_on_cpu); | ||
171 | EXPORT_SYMBOL(_atomic_dec_and_lock); | 94 | EXPORT_SYMBOL(_atomic_dec_and_lock); |
172 | #endif /* CONFIG_SMP */ | 95 | #endif /* CONFIG_SMP */ |
173 | 96 | ||
174 | /* | 97 | /* |
175 | * NUMA specific symbols | ||
176 | */ | ||
177 | #ifdef CONFIG_DISCONTIGMEM | ||
178 | EXPORT_SYMBOL(node_data); | ||
179 | #endif /* CONFIG_DISCONTIGMEM */ | ||
180 | |||
181 | EXPORT_SYMBOL(rtc_lock); | ||
182 | |||
183 | /* | ||
184 | * The following are special because they're not called | 98 | * The following are special because they're not called |
185 | * explicitly (the C compiler or assembler generates them in | 99 | * explicitly (the C compiler or assembler generates them in |
186 | * response to division operations). Fortunately, their | 100 | * response to division operations). Fortunately, their |
@@ -200,8 +114,3 @@ EXPORT_SYMBOL(__remqu); | |||
200 | EXPORT_SYMBOL(memcpy); | 114 | EXPORT_SYMBOL(memcpy); |
201 | EXPORT_SYMBOL(memset); | 115 | EXPORT_SYMBOL(memset); |
202 | EXPORT_SYMBOL(memchr); | 116 | EXPORT_SYMBOL(memchr); |
203 | |||
204 | #ifdef CONFIG_ALPHA_IRONGATE | ||
205 | EXPORT_SYMBOL(irongate_ioremap); | ||
206 | EXPORT_SYMBOL(irongate_iounmap); | ||
207 | #endif | ||
diff --git a/arch/alpha/kernel/core_irongate.c b/arch/alpha/kernel/core_irongate.c index 138d497d1cca..e4a0bcf1d28b 100644 --- a/arch/alpha/kernel/core_irongate.c +++ b/arch/alpha/kernel/core_irongate.c | |||
@@ -404,6 +404,7 @@ irongate_ioremap(unsigned long addr, unsigned long size) | |||
404 | #endif | 404 | #endif |
405 | return (void __iomem *)vaddr; | 405 | return (void __iomem *)vaddr; |
406 | } | 406 | } |
407 | EXPORT_SYMBOL(irongate_ioremap); | ||
407 | 408 | ||
408 | void | 409 | void |
409 | irongate_iounmap(volatile void __iomem *xaddr) | 410 | irongate_iounmap(volatile void __iomem *xaddr) |
@@ -414,3 +415,4 @@ irongate_iounmap(volatile void __iomem *xaddr) | |||
414 | if (addr) | 415 | if (addr) |
415 | return vfree((void *)(PAGE_MASK & addr)); | 416 | return vfree((void *)(PAGE_MASK & addr)); |
416 | } | 417 | } |
418 | EXPORT_SYMBOL(irongate_iounmap); | ||
diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c index 6dd126b8be85..e16aeb6e79ef 100644 --- a/arch/alpha/kernel/irq_alpha.c +++ b/arch/alpha/kernel/irq_alpha.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/irq.h> | 7 | #include <linux/irq.h> |
8 | #include <linux/kernel_stat.h> | 8 | #include <linux/kernel_stat.h> |
9 | #include <linux/module.h> | ||
9 | 10 | ||
10 | #include <asm/machvec.h> | 11 | #include <asm/machvec.h> |
11 | #include <asm/dma.h> | 12 | #include <asm/dma.h> |
@@ -16,6 +17,7 @@ | |||
16 | /* Hack minimum IPL during interrupt processing for broken hardware. */ | 17 | /* Hack minimum IPL during interrupt processing for broken hardware. */ |
17 | #ifdef CONFIG_ALPHA_BROKEN_IRQ_MASK | 18 | #ifdef CONFIG_ALPHA_BROKEN_IRQ_MASK |
18 | int __min_ipl; | 19 | int __min_ipl; |
20 | EXPORT_SYMBOL(__min_ipl); | ||
19 | #endif | 21 | #endif |
20 | 22 | ||
21 | /* | 23 | /* |
@@ -30,6 +32,7 @@ dummy_perf(unsigned long vector, struct pt_regs *regs) | |||
30 | } | 32 | } |
31 | 33 | ||
32 | void (*perf_irq)(unsigned long, struct pt_regs *) = dummy_perf; | 34 | void (*perf_irq)(unsigned long, struct pt_regs *) = dummy_perf; |
35 | EXPORT_SYMBOL(perf_irq); | ||
33 | 36 | ||
34 | /* | 37 | /* |
35 | * The main interrupt entry point. | 38 | * The main interrupt entry point. |
diff --git a/arch/alpha/kernel/pci-noop.c b/arch/alpha/kernel/pci-noop.c index fff5cf93e816..174b729c504b 100644 --- a/arch/alpha/kernel/pci-noop.c +++ b/arch/alpha/kernel/pci-noop.c | |||
@@ -201,6 +201,7 @@ dma_set_mask(struct device *dev, u64 mask) | |||
201 | 201 | ||
202 | return 0; | 202 | return 0; |
203 | } | 203 | } |
204 | EXPORT_SYMBOL(dma_set_mask); | ||
204 | 205 | ||
205 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) | 206 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) |
206 | { | 207 | { |
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c index c468e312e5f8..6e7d1fe6e935 100644 --- a/arch/alpha/kernel/pci_iommu.c +++ b/arch/alpha/kernel/pci_iommu.c | |||
@@ -300,6 +300,7 @@ pci_map_single(struct pci_dev *pdev, void *cpu_addr, size_t size, int dir) | |||
300 | dac_allowed = pdev ? pci_dac_dma_supported(pdev, pdev->dma_mask) : 0; | 300 | dac_allowed = pdev ? pci_dac_dma_supported(pdev, pdev->dma_mask) : 0; |
301 | return pci_map_single_1(pdev, cpu_addr, size, dac_allowed); | 301 | return pci_map_single_1(pdev, cpu_addr, size, dac_allowed); |
302 | } | 302 | } |
303 | EXPORT_SYMBOL(pci_map_single); | ||
303 | 304 | ||
304 | dma_addr_t | 305 | dma_addr_t |
305 | pci_map_page(struct pci_dev *pdev, struct page *page, unsigned long offset, | 306 | pci_map_page(struct pci_dev *pdev, struct page *page, unsigned long offset, |
@@ -314,6 +315,7 @@ pci_map_page(struct pci_dev *pdev, struct page *page, unsigned long offset, | |||
314 | return pci_map_single_1(pdev, (char *)page_address(page) + offset, | 315 | return pci_map_single_1(pdev, (char *)page_address(page) + offset, |
315 | size, dac_allowed); | 316 | size, dac_allowed); |
316 | } | 317 | } |
318 | EXPORT_SYMBOL(pci_map_page); | ||
317 | 319 | ||
318 | /* Unmap a single streaming mode DMA translation. The DMA_ADDR and | 320 | /* Unmap a single streaming mode DMA translation. The DMA_ADDR and |
319 | SIZE must match what was provided for in a previous pci_map_single | 321 | SIZE must match what was provided for in a previous pci_map_single |
@@ -379,6 +381,7 @@ pci_unmap_single(struct pci_dev *pdev, dma_addr_t dma_addr, size_t size, | |||
379 | DBGA2("pci_unmap_single: sg [%lx,%lx] np %ld from %p\n", | 381 | DBGA2("pci_unmap_single: sg [%lx,%lx] np %ld from %p\n", |
380 | dma_addr, size, npages, __builtin_return_address(0)); | 382 | dma_addr, size, npages, __builtin_return_address(0)); |
381 | } | 383 | } |
384 | EXPORT_SYMBOL(pci_unmap_single); | ||
382 | 385 | ||
383 | void | 386 | void |
384 | pci_unmap_page(struct pci_dev *pdev, dma_addr_t dma_addr, | 387 | pci_unmap_page(struct pci_dev *pdev, dma_addr_t dma_addr, |
@@ -386,6 +389,7 @@ pci_unmap_page(struct pci_dev *pdev, dma_addr_t dma_addr, | |||
386 | { | 389 | { |
387 | pci_unmap_single(pdev, dma_addr, size, direction); | 390 | pci_unmap_single(pdev, dma_addr, size, direction); |
388 | } | 391 | } |
392 | EXPORT_SYMBOL(pci_unmap_page); | ||
389 | 393 | ||
390 | /* Allocate and map kernel buffer using consistent mode DMA for PCI | 394 | /* Allocate and map kernel buffer using consistent mode DMA for PCI |
391 | device. Returns non-NULL cpu-view pointer to the buffer if | 395 | device. Returns non-NULL cpu-view pointer to the buffer if |
@@ -427,6 +431,7 @@ try_again: | |||
427 | 431 | ||
428 | return cpu_addr; | 432 | return cpu_addr; |
429 | } | 433 | } |
434 | EXPORT_SYMBOL(pci_alloc_consistent); | ||
430 | 435 | ||
431 | /* Free and unmap a consistent DMA buffer. CPU_ADDR and DMA_ADDR must | 436 | /* Free and unmap a consistent DMA buffer. CPU_ADDR and DMA_ADDR must |
432 | be values that were returned from pci_alloc_consistent. SIZE must | 437 | be values that were returned from pci_alloc_consistent. SIZE must |
@@ -444,7 +449,7 @@ pci_free_consistent(struct pci_dev *pdev, size_t size, void *cpu_addr, | |||
444 | DBGA2("pci_free_consistent: [%x,%lx] from %p\n", | 449 | DBGA2("pci_free_consistent: [%x,%lx] from %p\n", |
445 | dma_addr, size, __builtin_return_address(0)); | 450 | dma_addr, size, __builtin_return_address(0)); |
446 | } | 451 | } |
447 | 452 | EXPORT_SYMBOL(pci_free_consistent); | |
448 | 453 | ||
449 | /* Classify the elements of the scatterlist. Write dma_address | 454 | /* Classify the elements of the scatterlist. Write dma_address |
450 | of each element with: | 455 | of each element with: |
@@ -672,6 +677,7 @@ pci_map_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents, | |||
672 | pci_unmap_sg(pdev, start, out - start, direction); | 677 | pci_unmap_sg(pdev, start, out - start, direction); |
673 | return 0; | 678 | return 0; |
674 | } | 679 | } |
680 | EXPORT_SYMBOL(pci_map_sg); | ||
675 | 681 | ||
676 | /* Unmap a set of streaming mode DMA translations. Again, cpu read | 682 | /* Unmap a set of streaming mode DMA translations. Again, cpu read |
677 | rules concerning calls here are the same as for pci_unmap_single() | 683 | rules concerning calls here are the same as for pci_unmap_single() |
@@ -752,6 +758,7 @@ pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents, | |||
752 | 758 | ||
753 | DBGA("pci_unmap_sg: %ld entries\n", nents - (end - sg)); | 759 | DBGA("pci_unmap_sg: %ld entries\n", nents - (end - sg)); |
754 | } | 760 | } |
761 | EXPORT_SYMBOL(pci_unmap_sg); | ||
755 | 762 | ||
756 | 763 | ||
757 | /* Return whether the given PCI device DMA address mask can be | 764 | /* Return whether the given PCI device DMA address mask can be |
@@ -786,6 +793,7 @@ pci_dma_supported(struct pci_dev *pdev, u64 mask) | |||
786 | 793 | ||
787 | return 0; | 794 | return 0; |
788 | } | 795 | } |
796 | EXPORT_SYMBOL(pci_dma_supported); | ||
789 | 797 | ||
790 | 798 | ||
791 | /* | 799 | /* |
@@ -908,6 +916,7 @@ pci_dac_dma_supported(struct pci_dev *dev, u64 mask) | |||
908 | 916 | ||
909 | return ok; | 917 | return ok; |
910 | } | 918 | } |
919 | EXPORT_SYMBOL(pci_dac_dma_supported); | ||
911 | 920 | ||
912 | dma64_addr_t | 921 | dma64_addr_t |
913 | pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page, | 922 | pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page, |
@@ -917,6 +926,7 @@ pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page, | |||
917 | + __pa(page_address(page)) | 926 | + __pa(page_address(page)) |
918 | + (dma64_addr_t) offset); | 927 | + (dma64_addr_t) offset); |
919 | } | 928 | } |
929 | EXPORT_SYMBOL(pci_dac_page_to_dma); | ||
920 | 930 | ||
921 | struct page * | 931 | struct page * |
922 | pci_dac_dma_to_page(struct pci_dev *pdev, dma64_addr_t dma_addr) | 932 | pci_dac_dma_to_page(struct pci_dev *pdev, dma64_addr_t dma_addr) |
@@ -924,13 +934,14 @@ pci_dac_dma_to_page(struct pci_dev *pdev, dma64_addr_t dma_addr) | |||
924 | unsigned long paddr = (dma_addr & PAGE_MASK) - alpha_mv.pci_dac_offset; | 934 | unsigned long paddr = (dma_addr & PAGE_MASK) - alpha_mv.pci_dac_offset; |
925 | return virt_to_page(__va(paddr)); | 935 | return virt_to_page(__va(paddr)); |
926 | } | 936 | } |
937 | EXPORT_SYMBOL(pci_dac_dma_to_page); | ||
927 | 938 | ||
928 | unsigned long | 939 | unsigned long |
929 | pci_dac_dma_to_offset(struct pci_dev *pdev, dma64_addr_t dma_addr) | 940 | pci_dac_dma_to_offset(struct pci_dev *pdev, dma64_addr_t dma_addr) |
930 | { | 941 | { |
931 | return (dma_addr & ~PAGE_MASK); | 942 | return (dma_addr & ~PAGE_MASK); |
932 | } | 943 | } |
933 | 944 | EXPORT_SYMBOL(pci_dac_dma_to_offset); | |
934 | 945 | ||
935 | /* Helper for generic DMA-mapping functions. */ | 946 | /* Helper for generic DMA-mapping functions. */ |
936 | 947 | ||
@@ -957,6 +968,7 @@ alpha_gendev_to_pci(struct device *dev) | |||
957 | /* This assumes ISA bus master with dma_mask 0xffffff. */ | 968 | /* This assumes ISA bus master with dma_mask 0xffffff. */ |
958 | return NULL; | 969 | return NULL; |
959 | } | 970 | } |
971 | EXPORT_SYMBOL(alpha_gendev_to_pci); | ||
960 | 972 | ||
961 | int | 973 | int |
962 | dma_set_mask(struct device *dev, u64 mask) | 974 | dma_set_mask(struct device *dev, u64 mask) |
@@ -969,3 +981,4 @@ dma_set_mask(struct device *dev, u64 mask) | |||
969 | 981 | ||
970 | return 0; | 982 | return 0; |
971 | } | 983 | } |
984 | EXPORT_SYMBOL(dma_set_mask); | ||
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index b3a8a2980365..3370e6faeae0 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c | |||
@@ -205,6 +205,7 @@ start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp) | |||
205 | regs->ps = 8; | 205 | regs->ps = 8; |
206 | wrusp(sp); | 206 | wrusp(sp); |
207 | } | 207 | } |
208 | EXPORT_SYMBOL(start_thread); | ||
208 | 209 | ||
209 | /* | 210 | /* |
210 | * Free current thread data structures etc.. | 211 | * Free current thread data structures etc.. |
@@ -376,6 +377,7 @@ dump_thread(struct pt_regs * pt, struct user * dump) | |||
376 | dump->regs[EF_A2] = pt->r18; | 377 | dump->regs[EF_A2] = pt->r18; |
377 | memcpy((char *)dump->regs + EF_SIZE, sw->fp, 32 * 8); | 378 | memcpy((char *)dump->regs + EF_SIZE, sw->fp, 32 * 8); |
378 | } | 379 | } |
380 | EXPORT_SYMBOL(dump_thread); | ||
379 | 381 | ||
380 | /* | 382 | /* |
381 | * Fill in the user structure for a ELF core dump. | 383 | * Fill in the user structure for a ELF core dump. |
@@ -424,6 +426,7 @@ dump_elf_thread(elf_greg_t *dest, struct pt_regs *pt, struct thread_info *ti) | |||
424 | useful value of the thread's UNIQUE field. */ | 426 | useful value of the thread's UNIQUE field. */ |
425 | dest[32] = ti->pcb.unique; | 427 | dest[32] = ti->pcb.unique; |
426 | } | 428 | } |
429 | EXPORT_SYMBOL(dump_elf_thread); | ||
427 | 430 | ||
428 | int | 431 | int |
429 | dump_elf_task(elf_greg_t *dest, struct task_struct *task) | 432 | dump_elf_task(elf_greg_t *dest, struct task_struct *task) |
@@ -431,6 +434,7 @@ dump_elf_task(elf_greg_t *dest, struct task_struct *task) | |||
431 | dump_elf_thread(dest, task_pt_regs(task), task_thread_info(task)); | 434 | dump_elf_thread(dest, task_pt_regs(task), task_thread_info(task)); |
432 | return 1; | 435 | return 1; |
433 | } | 436 | } |
437 | EXPORT_SYMBOL(dump_elf_task); | ||
434 | 438 | ||
435 | int | 439 | int |
436 | dump_elf_task_fp(elf_fpreg_t *dest, struct task_struct *task) | 440 | dump_elf_task_fp(elf_fpreg_t *dest, struct task_struct *task) |
@@ -439,6 +443,7 @@ dump_elf_task_fp(elf_fpreg_t *dest, struct task_struct *task) | |||
439 | memcpy(dest, sw->fp, 32 * 8); | 443 | memcpy(dest, sw->fp, 32 * 8); |
440 | return 1; | 444 | return 1; |
441 | } | 445 | } |
446 | EXPORT_SYMBOL(dump_elf_task_fp); | ||
442 | 447 | ||
443 | /* | 448 | /* |
444 | * sys_execve() executes a new program. | 449 | * sys_execve() executes a new program. |
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index a94e6d93e2ee..1aea7c7c683c 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c | |||
@@ -66,6 +66,7 @@ static struct notifier_block alpha_panic_block = { | |||
66 | 66 | ||
67 | 67 | ||
68 | struct hwrpb_struct *hwrpb; | 68 | struct hwrpb_struct *hwrpb; |
69 | EXPORT_SYMBOL(hwrpb); | ||
69 | unsigned long srm_hae; | 70 | unsigned long srm_hae; |
70 | 71 | ||
71 | int alpha_l1i_cacheshape; | 72 | int alpha_l1i_cacheshape; |
@@ -111,6 +112,7 @@ unsigned long alpha_agpgart_size = DEFAULT_AGP_APER_SIZE; | |||
111 | #ifdef CONFIG_ALPHA_GENERIC | 112 | #ifdef CONFIG_ALPHA_GENERIC |
112 | struct alpha_machine_vector alpha_mv; | 113 | struct alpha_machine_vector alpha_mv; |
113 | int alpha_using_srm; | 114 | int alpha_using_srm; |
115 | EXPORT_SYMBOL(alpha_using_srm); | ||
114 | #endif | 116 | #endif |
115 | 117 | ||
116 | static struct alpha_machine_vector *get_sysvec(unsigned long, unsigned long, | 118 | static struct alpha_machine_vector *get_sysvec(unsigned long, unsigned long, |
@@ -137,6 +139,8 @@ struct screen_info screen_info = { | |||
137 | .orig_video_points = 16 | 139 | .orig_video_points = 16 |
138 | }; | 140 | }; |
139 | 141 | ||
142 | EXPORT_SYMBOL(screen_info); | ||
143 | |||
140 | /* | 144 | /* |
141 | * The direct map I/O window, if any. This should be the same | 145 | * The direct map I/O window, if any. This should be the same |
142 | * for all busses, since it's used by virt_to_bus. | 146 | * for all busses, since it's used by virt_to_bus. |
@@ -144,6 +148,8 @@ struct screen_info screen_info = { | |||
144 | 148 | ||
145 | unsigned long __direct_map_base; | 149 | unsigned long __direct_map_base; |
146 | unsigned long __direct_map_size; | 150 | unsigned long __direct_map_size; |
151 | EXPORT_SYMBOL(__direct_map_base); | ||
152 | EXPORT_SYMBOL(__direct_map_size); | ||
147 | 153 | ||
148 | /* | 154 | /* |
149 | * Declare all of the machine vectors. | 155 | * Declare all of the machine vectors. |
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 596780e2c7da..d1ec4f51df1a 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c | |||
@@ -52,6 +52,7 @@ | |||
52 | 52 | ||
53 | /* A collection of per-processor data. */ | 53 | /* A collection of per-processor data. */ |
54 | struct cpuinfo_alpha cpu_data[NR_CPUS]; | 54 | struct cpuinfo_alpha cpu_data[NR_CPUS]; |
55 | EXPORT_SYMBOL(cpu_data); | ||
55 | 56 | ||
56 | /* A collection of single bit ipi messages. */ | 57 | /* A collection of single bit ipi messages. */ |
57 | static struct { | 58 | static struct { |
@@ -74,6 +75,7 @@ EXPORT_SYMBOL(cpu_online_map); | |||
74 | 75 | ||
75 | int smp_num_probed; /* Internal processor count */ | 76 | int smp_num_probed; /* Internal processor count */ |
76 | int smp_num_cpus = 1; /* Number that came online. */ | 77 | int smp_num_cpus = 1; /* Number that came online. */ |
78 | EXPORT_SYMBOL(smp_num_cpus); | ||
77 | 79 | ||
78 | extern void calibrate_delay(void); | 80 | extern void calibrate_delay(void); |
79 | 81 | ||
@@ -790,6 +792,7 @@ smp_call_function_on_cpu (void (*func) (void *info), void *info, int retry, | |||
790 | 792 | ||
791 | return 0; | 793 | return 0; |
792 | } | 794 | } |
795 | EXPORT_SYMBOL(smp_call_function_on_cpu); | ||
793 | 796 | ||
794 | int | 797 | int |
795 | smp_call_function (void (*func) (void *info), void *info, int retry, int wait) | 798 | smp_call_function (void (*func) (void *info), void *info, int retry, int wait) |
@@ -797,6 +800,7 @@ smp_call_function (void (*func) (void *info), void *info, int retry, int wait) | |||
797 | return smp_call_function_on_cpu (func, info, retry, wait, | 800 | return smp_call_function_on_cpu (func, info, retry, wait, |
798 | cpu_online_map); | 801 | cpu_online_map); |
799 | } | 802 | } |
803 | EXPORT_SYMBOL(smp_call_function); | ||
800 | 804 | ||
801 | static void | 805 | static void |
802 | ipi_imb(void *ignored) | 806 | ipi_imb(void *ignored) |
@@ -811,6 +815,7 @@ smp_imb(void) | |||
811 | if (on_each_cpu(ipi_imb, NULL, 1, 1)) | 815 | if (on_each_cpu(ipi_imb, NULL, 1, 1)) |
812 | printk(KERN_CRIT "smp_imb: timed out\n"); | 816 | printk(KERN_CRIT "smp_imb: timed out\n"); |
813 | } | 817 | } |
818 | EXPORT_SYMBOL(smp_imb); | ||
814 | 819 | ||
815 | static void | 820 | static void |
816 | ipi_flush_tlb_all(void *ignored) | 821 | ipi_flush_tlb_all(void *ignored) |
@@ -866,6 +871,7 @@ flush_tlb_mm(struct mm_struct *mm) | |||
866 | 871 | ||
867 | preempt_enable(); | 872 | preempt_enable(); |
868 | } | 873 | } |
874 | EXPORT_SYMBOL(flush_tlb_mm); | ||
869 | 875 | ||
870 | struct flush_tlb_page_struct { | 876 | struct flush_tlb_page_struct { |
871 | struct vm_area_struct *vma; | 877 | struct vm_area_struct *vma; |
@@ -918,6 +924,7 @@ flush_tlb_page(struct vm_area_struct *vma, unsigned long addr) | |||
918 | 924 | ||
919 | preempt_enable(); | 925 | preempt_enable(); |
920 | } | 926 | } |
927 | EXPORT_SYMBOL(flush_tlb_page); | ||
921 | 928 | ||
922 | void | 929 | void |
923 | flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) | 930 | flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) |
@@ -925,6 +932,7 @@ flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long e | |||
925 | /* On the Alpha we always flush the whole user tlb. */ | 932 | /* On the Alpha we always flush the whole user tlb. */ |
926 | flush_tlb_mm(vma->vm_mm); | 933 | flush_tlb_mm(vma->vm_mm); |
927 | } | 934 | } |
935 | EXPORT_SYMBOL(flush_tlb_range); | ||
928 | 936 | ||
929 | static void | 937 | static void |
930 | ipi_flush_icache_page(void *x) | 938 | ipi_flush_icache_page(void *x) |
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c index cf0666523989..d7053eb4ffcf 100644 --- a/arch/alpha/kernel/time.c +++ b/arch/alpha/kernel/time.c | |||
@@ -57,6 +57,7 @@ | |||
57 | static int set_rtc_mmss(unsigned long); | 57 | static int set_rtc_mmss(unsigned long); |
58 | 58 | ||
59 | DEFINE_SPINLOCK(rtc_lock); | 59 | DEFINE_SPINLOCK(rtc_lock); |
60 | EXPORT_SYMBOL(rtc_lock); | ||
60 | 61 | ||
61 | #define TICK_SIZE (tick_nsec / 1000) | 62 | #define TICK_SIZE (tick_nsec / 1000) |
62 | 63 | ||
diff --git a/arch/alpha/mm/numa.c b/arch/alpha/mm/numa.c index b826f58c6e72..e3e3806a6f25 100644 --- a/arch/alpha/mm/numa.c +++ b/arch/alpha/mm/numa.c | |||
@@ -13,12 +13,14 @@ | |||
13 | #include <linux/swap.h> | 13 | #include <linux/swap.h> |
14 | #include <linux/initrd.h> | 14 | #include <linux/initrd.h> |
15 | #include <linux/pfn.h> | 15 | #include <linux/pfn.h> |
16 | #include <linux/module.h> | ||
16 | 17 | ||
17 | #include <asm/hwrpb.h> | 18 | #include <asm/hwrpb.h> |
18 | #include <asm/pgalloc.h> | 19 | #include <asm/pgalloc.h> |
19 | 20 | ||
20 | pg_data_t node_data[MAX_NUMNODES]; | 21 | pg_data_t node_data[MAX_NUMNODES]; |
21 | bootmem_data_t node_bdata[MAX_NUMNODES]; | 22 | bootmem_data_t node_bdata[MAX_NUMNODES]; |
23 | EXPORT_SYMBOL(node_data); | ||
22 | 24 | ||
23 | #undef DEBUG_DISCONTIG | 25 | #undef DEBUG_DISCONTIG |
24 | #ifdef DEBUG_DISCONTIG | 26 | #ifdef DEBUG_DISCONTIG |
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c index da69e660574b..4779f474f911 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c | |||
@@ -178,9 +178,3 @@ EXPORT_SYMBOL(_find_next_zero_bit_be); | |||
178 | EXPORT_SYMBOL(_find_first_bit_be); | 178 | EXPORT_SYMBOL(_find_first_bit_be); |
179 | EXPORT_SYMBOL(_find_next_bit_be); | 179 | EXPORT_SYMBOL(_find_next_bit_be); |
180 | #endif | 180 | #endif |
181 | |||
182 | /* syscalls */ | ||
183 | EXPORT_SYMBOL(sys_write); | ||
184 | EXPORT_SYMBOL(sys_lseek); | ||
185 | EXPORT_SYMBOL(sys_exit); | ||
186 | EXPORT_SYMBOL(sys_wait4); | ||
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 2aa150b57ba1..3b8576111c16 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -188,12 +188,12 @@ static struct map_desc versatile_io_desc[] __initdata = { | |||
188 | .length = SZ_4K, | 188 | .length = SZ_4K, |
189 | .type = MT_DEVICE | 189 | .type = MT_DEVICE |
190 | }, { | 190 | }, { |
191 | .virtual = VERSATILE_PCI_VIRT_BASE, | 191 | .virtual = (unsigned long)VERSATILE_PCI_VIRT_BASE, |
192 | .pfn = __phys_to_pfn(VERSATILE_PCI_BASE), | 192 | .pfn = __phys_to_pfn(VERSATILE_PCI_BASE), |
193 | .length = VERSATILE_PCI_BASE_SIZE, | 193 | .length = VERSATILE_PCI_BASE_SIZE, |
194 | .type = MT_DEVICE | 194 | .type = MT_DEVICE |
195 | }, { | 195 | }, { |
196 | .virtual = VERSATILE_PCI_CFG_VIRT_BASE, | 196 | .virtual = (unsigned long)VERSATILE_PCI_CFG_VIRT_BASE, |
197 | .pfn = __phys_to_pfn(VERSATILE_PCI_CFG_BASE), | 197 | .pfn = __phys_to_pfn(VERSATILE_PCI_CFG_BASE), |
198 | .length = VERSATILE_PCI_CFG_BASE_SIZE, | 198 | .length = VERSATILE_PCI_CFG_BASE_SIZE, |
199 | .type = MT_DEVICE | 199 | .type = MT_DEVICE |
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c index 13bbd08ff841..5cd0b5d9e7eb 100644 --- a/arch/arm/mach-versatile/pci.c +++ b/arch/arm/mach-versatile/pci.c | |||
@@ -40,14 +40,15 @@ | |||
40 | * Cfg 42000000 - 42FFFFFF PCI config | 40 | * Cfg 42000000 - 42FFFFFF PCI config |
41 | * | 41 | * |
42 | */ | 42 | */ |
43 | #define SYS_PCICTL IO_ADDRESS(VERSATILE_SYS_PCICTL) | 43 | #define __IO_ADDRESS(n) ((void __iomem *)(unsigned long)IO_ADDRESS(n)) |
44 | #define PCI_IMAP0 IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x0) | 44 | #define SYS_PCICTL __IO_ADDRESS(VERSATILE_SYS_PCICTL) |
45 | #define PCI_IMAP1 IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x4) | 45 | #define PCI_IMAP0 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x0) |
46 | #define PCI_IMAP2 IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x8) | 46 | #define PCI_IMAP1 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x4) |
47 | #define PCI_SMAP0 IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x10) | 47 | #define PCI_IMAP2 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x8) |
48 | #define PCI_SMAP1 IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x14) | 48 | #define PCI_SMAP0 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x10) |
49 | #define PCI_SMAP2 IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x18) | 49 | #define PCI_SMAP1 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x14) |
50 | #define PCI_SELFID IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0xc) | 50 | #define PCI_SMAP2 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x18) |
51 | #define PCI_SELFID __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0xc) | ||
51 | 52 | ||
52 | #define DEVICE_ID_OFFSET 0x00 | 53 | #define DEVICE_ID_OFFSET 0x00 |
53 | #define CSR_OFFSET 0x04 | 54 | #define CSR_OFFSET 0x04 |
@@ -76,7 +77,7 @@ static int __init versatile_pci_slot_ignore(char *str) | |||
76 | __setup("pci_slot_ignore=", versatile_pci_slot_ignore); | 77 | __setup("pci_slot_ignore=", versatile_pci_slot_ignore); |
77 | 78 | ||
78 | 79 | ||
79 | static unsigned long __pci_addr(struct pci_bus *bus, | 80 | static void __iomem *__pci_addr(struct pci_bus *bus, |
80 | unsigned int devfn, int offset) | 81 | unsigned int devfn, int offset) |
81 | { | 82 | { |
82 | unsigned int busnr = bus->number; | 83 | unsigned int busnr = bus->number; |
@@ -91,14 +92,14 @@ static unsigned long __pci_addr(struct pci_bus *bus, | |||
91 | if (devfn > 255) | 92 | if (devfn > 255) |
92 | BUG(); | 93 | BUG(); |
93 | 94 | ||
94 | return (VERSATILE_PCI_CFG_VIRT_BASE | (busnr << 16) | | 95 | return VERSATILE_PCI_CFG_VIRT_BASE + ((busnr << 16) | |
95 | (PCI_SLOT(devfn) << 11) | (PCI_FUNC(devfn) << 8) | offset); | 96 | (PCI_SLOT(devfn) << 11) | (PCI_FUNC(devfn) << 8) | offset); |
96 | } | 97 | } |
97 | 98 | ||
98 | static int versatile_read_config(struct pci_bus *bus, unsigned int devfn, int where, | 99 | static int versatile_read_config(struct pci_bus *bus, unsigned int devfn, int where, |
99 | int size, u32 *val) | 100 | int size, u32 *val) |
100 | { | 101 | { |
101 | unsigned long addr = __pci_addr(bus, devfn, where); | 102 | void __iomem *addr = __pci_addr(bus, devfn, where & ~3); |
102 | u32 v; | 103 | u32 v; |
103 | int slot = PCI_SLOT(devfn); | 104 | int slot = PCI_SLOT(devfn); |
104 | 105 | ||
@@ -121,13 +122,12 @@ static int versatile_read_config(struct pci_bus *bus, unsigned int devfn, int wh | |||
121 | break; | 122 | break; |
122 | 123 | ||
123 | case 2: | 124 | case 2: |
124 | v = __raw_readl(addr & ~3); | 125 | v = __raw_readl(addr); |
125 | if (addr & 2) v >>= 16; | 126 | if (where & 2) v >>= 16; |
126 | v &= 0xffff; | 127 | v &= 0xffff; |
127 | break; | 128 | break; |
128 | 129 | ||
129 | default: | 130 | default: |
130 | addr &= ~3; | ||
131 | v = __raw_readl(addr); | 131 | v = __raw_readl(addr); |
132 | break; | 132 | break; |
133 | } | 133 | } |
@@ -140,7 +140,7 @@ static int versatile_read_config(struct pci_bus *bus, unsigned int devfn, int wh | |||
140 | static int versatile_write_config(struct pci_bus *bus, unsigned int devfn, int where, | 140 | static int versatile_write_config(struct pci_bus *bus, unsigned int devfn, int where, |
141 | int size, u32 val) | 141 | int size, u32 val) |
142 | { | 142 | { |
143 | unsigned long addr = __pci_addr(bus, devfn, where); | 143 | void __iomem *addr = __pci_addr(bus, devfn, where); |
144 | int slot = PCI_SLOT(devfn); | 144 | int slot = PCI_SLOT(devfn); |
145 | 145 | ||
146 | if (pci_slot_ignore & (1 << slot)) { | 146 | if (pci_slot_ignore & (1 << slot)) { |
@@ -279,7 +279,7 @@ int __init pci_versatile_setup(int nr, struct pci_sys_data *sys) | |||
279 | printk("PCI core found (slot %d)\n",myslot); | 279 | printk("PCI core found (slot %d)\n",myslot); |
280 | 280 | ||
281 | __raw_writel(myslot, PCI_SELFID); | 281 | __raw_writel(myslot, PCI_SELFID); |
282 | local_pci_cfg_base = (void *) VERSATILE_PCI_CFG_VIRT_BASE + (myslot << 11); | 282 | local_pci_cfg_base = VERSATILE_PCI_CFG_VIRT_BASE + (myslot << 11); |
283 | 283 | ||
284 | val = __raw_readl(local_pci_cfg_base + CSR_OFFSET); | 284 | val = __raw_readl(local_pci_cfg_base + CSR_OFFSET); |
285 | val |= PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE; | 285 | val |= PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE; |
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index dedbb449632e..a657a28f08db 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -90,7 +90,7 @@ void vfp_raise_sigfpe(unsigned int sicode, struct pt_regs *regs) | |||
90 | 90 | ||
91 | info.si_signo = SIGFPE; | 91 | info.si_signo = SIGFPE; |
92 | info.si_code = sicode; | 92 | info.si_code = sicode; |
93 | info.si_addr = (void *)(instruction_pointer(regs) - 4); | 93 | info.si_addr = (void __user *)(instruction_pointer(regs) - 4); |
94 | 94 | ||
95 | /* | 95 | /* |
96 | * This is the same as NWFPE, because it's not clear what | 96 | * This is the same as NWFPE, because it's not clear what |
diff --git a/arch/arm26/kernel/armksyms.c b/arch/arm26/kernel/armksyms.c index 07907b6ecb63..93293d04b303 100644 --- a/arch/arm26/kernel/armksyms.c +++ b/arch/arm26/kernel/armksyms.c | |||
@@ -202,14 +202,6 @@ EXPORT_SYMBOL(_find_next_zero_bit_le); | |||
202 | EXPORT_SYMBOL(elf_platform); | 202 | EXPORT_SYMBOL(elf_platform); |
203 | EXPORT_SYMBOL(elf_hwcap); | 203 | EXPORT_SYMBOL(elf_hwcap); |
204 | 204 | ||
205 | /* syscalls */ | ||
206 | EXPORT_SYMBOL(sys_write); | ||
207 | EXPORT_SYMBOL(sys_read); | ||
208 | EXPORT_SYMBOL(sys_lseek); | ||
209 | EXPORT_SYMBOL(sys_open); | ||
210 | EXPORT_SYMBOL(sys_exit); | ||
211 | EXPORT_SYMBOL(sys_wait4); | ||
212 | |||
213 | #ifdef CONFIG_PREEMPT | 205 | #ifdef CONFIG_PREEMPT |
214 | EXPORT_SYMBOL(kernel_flag); | 206 | EXPORT_SYMBOL(kernel_flag); |
215 | #endif | 207 | #endif |
diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c index 3e56b9f4358a..5a247ba71a72 100644 --- a/arch/avr32/kernel/time.c +++ b/arch/avr32/kernel/time.c | |||
@@ -124,15 +124,15 @@ unsigned long long sched_clock(void) | |||
124 | * | 124 | * |
125 | * In UP mode, it is invoked from the (global) timer_interrupt. | 125 | * In UP mode, it is invoked from the (global) timer_interrupt. |
126 | */ | 126 | */ |
127 | static void local_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 127 | static void local_timer_interrupt(int irq, void *dev_id) |
128 | { | 128 | { |
129 | if (current->pid) | 129 | if (current->pid) |
130 | profile_tick(CPU_PROFILING, regs); | 130 | profile_tick(CPU_PROFILING); |
131 | update_process_times(user_mode(regs)); | 131 | update_process_times(user_mode(get_irq_regs())); |
132 | } | 132 | } |
133 | 133 | ||
134 | static irqreturn_t | 134 | static irqreturn_t |
135 | timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 135 | timer_interrupt(int irq, void *dev_id) |
136 | { | 136 | { |
137 | unsigned int count; | 137 | unsigned int count; |
138 | 138 | ||
@@ -157,7 +157,7 @@ timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
157 | * | 157 | * |
158 | * SMP is not supported yet. | 158 | * SMP is not supported yet. |
159 | */ | 159 | */ |
160 | local_timer_interrupt(irq, dev_id, regs); | 160 | local_timer_interrupt(irq, dev_id); |
161 | 161 | ||
162 | return IRQ_HANDLED; | 162 | return IRQ_HANDLED; |
163 | } | 163 | } |
diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c index 7da9c5f7a0eb..4dff1f988900 100644 --- a/arch/avr32/mach-at32ap/extint.c +++ b/arch/avr32/mach-at32ap/extint.c | |||
@@ -102,8 +102,7 @@ struct irq_chip eim_chip = { | |||
102 | .set_type = eim_set_irq_type, | 102 | .set_type = eim_set_irq_type, |
103 | }; | 103 | }; |
104 | 104 | ||
105 | static void demux_eim_irq(unsigned int irq, struct irq_desc *desc, | 105 | static void demux_eim_irq(unsigned int irq, struct irq_desc *desc) |
106 | struct pt_regs *regs) | ||
107 | { | 106 | { |
108 | struct at32_sm *sm = desc->handler_data; | 107 | struct at32_sm *sm = desc->handler_data; |
109 | struct irq_desc *ext_desc; | 108 | struct irq_desc *ext_desc; |
@@ -121,7 +120,7 @@ static void demux_eim_irq(unsigned int irq, struct irq_desc *desc, | |||
121 | 120 | ||
122 | ext_irq = i + sm->eim_first_irq; | 121 | ext_irq = i + sm->eim_first_irq; |
123 | ext_desc = irq_desc + ext_irq; | 122 | ext_desc = irq_desc + ext_irq; |
124 | ext_desc->handle_irq(ext_irq, ext_desc, regs); | 123 | ext_desc->handle_irq(ext_irq, ext_desc); |
125 | } | 124 | } |
126 | 125 | ||
127 | spin_unlock(&sm->lock); | 126 | spin_unlock(&sm->lock); |
diff --git a/arch/avr32/mach-at32ap/intc.c b/arch/avr32/mach-at32ap/intc.c index 74f8c9f2f03d..eb87a18ad7b2 100644 --- a/arch/avr32/mach-at32ap/intc.c +++ b/arch/avr32/mach-at32ap/intc.c | |||
@@ -52,16 +52,19 @@ static struct intc intc0 = { | |||
52 | asmlinkage void do_IRQ(int level, struct pt_regs *regs) | 52 | asmlinkage void do_IRQ(int level, struct pt_regs *regs) |
53 | { | 53 | { |
54 | struct irq_desc *desc; | 54 | struct irq_desc *desc; |
55 | struct pt_regs *old_regs; | ||
55 | unsigned int irq; | 56 | unsigned int irq; |
56 | unsigned long status_reg; | 57 | unsigned long status_reg; |
57 | 58 | ||
58 | local_irq_disable(); | 59 | local_irq_disable(); |
59 | 60 | ||
61 | old_regs = set_irq_regs(regs); | ||
62 | |||
60 | irq_enter(); | 63 | irq_enter(); |
61 | 64 | ||
62 | irq = intc_readl(&intc0, INTCAUSE0 - 4 * level); | 65 | irq = intc_readl(&intc0, INTCAUSE0 - 4 * level); |
63 | desc = irq_desc + irq; | 66 | desc = irq_desc + irq; |
64 | desc->handle_irq(irq, desc, regs); | 67 | desc->handle_irq(irq, desc); |
65 | 68 | ||
66 | /* | 69 | /* |
67 | * Clear all interrupt level masks so that we may handle | 70 | * Clear all interrupt level masks so that we may handle |
@@ -75,6 +78,8 @@ asmlinkage void do_IRQ(int level, struct pt_regs *regs) | |||
75 | sysreg_write(SR, status_reg); | 78 | sysreg_write(SR, status_reg); |
76 | 79 | ||
77 | irq_exit(); | 80 | irq_exit(); |
81 | |||
82 | set_irq_regs(old_regs); | ||
78 | } | 83 | } |
79 | 84 | ||
80 | void __init init_IRQ(void) | 85 | void __init init_IRQ(void) |
diff --git a/arch/i386/Kconfig.cpu b/arch/i386/Kconfig.cpu index 21c9a4e71104..fc4f2abccf06 100644 --- a/arch/i386/Kconfig.cpu +++ b/arch/i386/Kconfig.cpu | |||
@@ -7,6 +7,7 @@ choice | |||
7 | 7 | ||
8 | config M386 | 8 | config M386 |
9 | bool "386" | 9 | bool "386" |
10 | depends on !UML | ||
10 | ---help--- | 11 | ---help--- |
11 | This is the processor type of your CPU. This information is used for | 12 | This is the processor type of your CPU. This information is used for |
12 | optimizing purposes. In order to compile a kernel that can run on | 13 | optimizing purposes. In order to compile a kernel that can run on |
@@ -301,7 +302,7 @@ config X86_USE_PPRO_CHECKSUM | |||
301 | 302 | ||
302 | config X86_USE_3DNOW | 303 | config X86_USE_3DNOW |
303 | bool | 304 | bool |
304 | depends on MCYRIXIII || MK7 || MGEODE_LX | 305 | depends on (MCYRIXIII || MK7 || MGEODE_LX) && !UML |
305 | default y | 306 | default y |
306 | 307 | ||
307 | config X86_OOSTORE | 308 | config X86_OOSTORE |
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index cd082c36ca03..27bceaf5ce40 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -2594,7 +2594,7 @@ static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask) | |||
2594 | } | 2594 | } |
2595 | #endif | 2595 | #endif |
2596 | 2596 | ||
2597 | static struct hw_interrupt_type ht_irq_chip = { | 2597 | static struct irq_chip ht_irq_chip = { |
2598 | .name = "PCI-HT", | 2598 | .name = "PCI-HT", |
2599 | .mask = mask_ht_irq, | 2599 | .mask = mask_ht_irq, |
2600 | .unmask = unmask_ht_irq, | 2600 | .unmask = unmask_ht_irq, |
diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c index 9b9479768d5e..c4d0291b519f 100644 --- a/arch/i386/kernel/microcode.c +++ b/arch/i386/kernel/microcode.c | |||
@@ -656,14 +656,18 @@ static struct attribute_group mc_attr_group = { | |||
656 | 656 | ||
657 | static int mc_sysdev_add(struct sys_device *sys_dev) | 657 | static int mc_sysdev_add(struct sys_device *sys_dev) |
658 | { | 658 | { |
659 | int cpu = sys_dev->id; | 659 | int err, cpu = sys_dev->id; |
660 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; | 660 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; |
661 | 661 | ||
662 | if (!cpu_online(cpu)) | 662 | if (!cpu_online(cpu)) |
663 | return 0; | 663 | return 0; |
664 | |||
664 | pr_debug("Microcode:CPU %d added\n", cpu); | 665 | pr_debug("Microcode:CPU %d added\n", cpu); |
665 | memset(uci, 0, sizeof(*uci)); | 666 | memset(uci, 0, sizeof(*uci)); |
666 | sysfs_create_group(&sys_dev->kobj, &mc_attr_group); | 667 | |
668 | err = sysfs_create_group(&sys_dev->kobj, &mc_attr_group); | ||
669 | if (err) | ||
670 | return err; | ||
667 | 671 | ||
668 | microcode_init_cpu(cpu); | 672 | microcode_init_cpu(cpu); |
669 | return 0; | 673 | return 0; |
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 000cf03751fe..519e63c3c130 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -1083,16 +1083,15 @@ static unsigned long __init setup_memory(void) | |||
1083 | 1083 | ||
1084 | void __init zone_sizes_init(void) | 1084 | void __init zone_sizes_init(void) |
1085 | { | 1085 | { |
1086 | unsigned long max_zone_pfns[MAX_NR_ZONES]; | ||
1087 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); | ||
1088 | max_zone_pfns[ZONE_DMA] = | ||
1089 | virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; | ||
1090 | max_zone_pfns[ZONE_NORMAL] = max_low_pfn; | ||
1086 | #ifdef CONFIG_HIGHMEM | 1091 | #ifdef CONFIG_HIGHMEM |
1087 | unsigned long max_zone_pfns[MAX_NR_ZONES] = { | 1092 | max_zone_pfns[ZONE_HIGHMEM] = highend_pfn; |
1088 | virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT, | ||
1089 | max_low_pfn, | ||
1090 | highend_pfn}; | ||
1091 | add_active_range(0, 0, highend_pfn); | 1093 | add_active_range(0, 0, highend_pfn); |
1092 | #else | 1094 | #else |
1093 | unsigned long max_zone_pfns[MAX_NR_ZONES] = { | ||
1094 | virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT, | ||
1095 | max_low_pfn}; | ||
1096 | add_active_range(0, 0, max_low_pfn); | 1095 | add_active_range(0, 0, max_low_pfn); |
1097 | #endif | 1096 | #endif |
1098 | 1097 | ||
diff --git a/arch/i386/kernel/syscall_table.S b/arch/i386/kernel/syscall_table.S index 7e639f78b0b9..2697e9210e92 100644 --- a/arch/i386/kernel/syscall_table.S +++ b/arch/i386/kernel/syscall_table.S | |||
@@ -318,3 +318,4 @@ ENTRY(sys_call_table) | |||
318 | .long sys_vmsplice | 318 | .long sys_vmsplice |
319 | .long sys_move_pages | 319 | .long sys_move_pages |
320 | .long sys_getcpu | 320 | .long sys_getcpu |
321 | .long sys_epoll_pwait | ||
diff --git a/arch/i386/lib/usercopy.c b/arch/i386/lib/usercopy.c index 08502fc6d0cb..258df6b4d7d7 100644 --- a/arch/i386/lib/usercopy.c +++ b/arch/i386/lib/usercopy.c | |||
@@ -179,7 +179,7 @@ __clear_user(void __user *to, unsigned long n) | |||
179 | EXPORT_SYMBOL(__clear_user); | 179 | EXPORT_SYMBOL(__clear_user); |
180 | 180 | ||
181 | /** | 181 | /** |
182 | * strlen_user: - Get the size of a string in user space. | 182 | * strnlen_user: - Get the size of a string in user space. |
183 | * @s: The string to measure. | 183 | * @s: The string to measure. |
184 | * @n: The maximum valid length | 184 | * @n: The maximum valid length |
185 | * | 185 | * |
diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c index 455597db84df..ddbdb0336f28 100644 --- a/arch/i386/mm/discontig.c +++ b/arch/i386/mm/discontig.c | |||
@@ -356,11 +356,12 @@ void __init numa_kva_reserve(void) | |||
356 | void __init zone_sizes_init(void) | 356 | void __init zone_sizes_init(void) |
357 | { | 357 | { |
358 | int nid; | 358 | int nid; |
359 | unsigned long max_zone_pfns[MAX_NR_ZONES] = { | 359 | unsigned long max_zone_pfns[MAX_NR_ZONES]; |
360 | virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT, | 360 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); |
361 | max_low_pfn, | 361 | max_zone_pfns[ZONE_DMA] = |
362 | highend_pfn | 362 | virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; |
363 | }; | 363 | max_zone_pfns[ZONE_NORMAL] = max_low_pfn; |
364 | max_zone_pfns[ZONE_HIGHMEM] = highend_pfn; | ||
364 | 365 | ||
365 | /* If SRAT has not registered memory, register it now */ | 366 | /* If SRAT has not registered memory, register it now */ |
366 | if (find_max_pfn_with_active_regions() == 0) { | 367 | if (find_max_pfn_with_active_regions() == 0) { |
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c index daf977ff2920..82deaa3a7c48 100644 --- a/arch/ia64/mm/contig.c +++ b/arch/ia64/mm/contig.c | |||
@@ -233,6 +233,7 @@ paging_init (void) | |||
233 | efi_memmap_walk(count_pages, &num_physpages); | 233 | efi_memmap_walk(count_pages, &num_physpages); |
234 | 234 | ||
235 | max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT; | 235 | max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT; |
236 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); | ||
236 | max_zone_pfns[ZONE_DMA] = max_dma; | 237 | max_zone_pfns[ZONE_DMA] = max_dma; |
237 | max_zone_pfns[ZONE_NORMAL] = max_low_pfn; | 238 | max_zone_pfns[ZONE_NORMAL] = max_low_pfn; |
238 | 239 | ||
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index d497b6b0f5b2..96722cb1b49d 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c | |||
@@ -709,6 +709,7 @@ void __init paging_init(void) | |||
709 | max_pfn = mem_data[node].max_pfn; | 709 | max_pfn = mem_data[node].max_pfn; |
710 | } | 710 | } |
711 | 711 | ||
712 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); | ||
712 | max_zone_pfns[ZONE_DMA] = max_dma; | 713 | max_zone_pfns[ZONE_DMA] = max_dma; |
713 | max_zone_pfns[ZONE_NORMAL] = max_pfn; | 714 | max_zone_pfns[ZONE_NORMAL] = max_pfn; |
714 | free_area_init_nodes(max_zone_pfns); | 715 | free_area_init_nodes(max_zone_pfns); |
diff --git a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c index 3f35ab3d2dc2..0e7778be33cc 100644 --- a/arch/m32r/kernel/setup.c +++ b/arch/m32r/kernel/setup.c | |||
@@ -369,10 +369,10 @@ static void c_stop(struct seq_file *m, void *v) | |||
369 | } | 369 | } |
370 | 370 | ||
371 | struct seq_operations cpuinfo_op = { | 371 | struct seq_operations cpuinfo_op = { |
372 | start: c_start, | 372 | .start = c_start, |
373 | next: c_next, | 373 | .next = c_next, |
374 | stop: c_stop, | 374 | .stop = c_stop, |
375 | show: show_cpuinfo, | 375 | .show = show_cpuinfo, |
376 | }; | 376 | }; |
377 | #endif /* CONFIG_PROC_FS */ | 377 | #endif /* CONFIG_PROC_FS */ |
378 | 378 | ||
diff --git a/arch/m32r/kernel/setup_mappi.c b/arch/m32r/kernel/setup_mappi.c index 67dbbdc9d111..6b2d77da0683 100644 --- a/arch/m32r/kernel/setup_mappi.c +++ b/arch/m32r/kernel/setup_mappi.c | |||
@@ -86,7 +86,7 @@ void __init init_IRQ(void) | |||
86 | /* INT0 : LAN controller (RTL8019AS) */ | 86 | /* INT0 : LAN controller (RTL8019AS) */ |
87 | irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; | 87 | irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; |
88 | irq_desc[M32R_IRQ_INT0].chip = &mappi_irq_type; | 88 | irq_desc[M32R_IRQ_INT0].chip = &mappi_irq_type; |
89 | irq_desc[M32R_IRQ_INT0].action = 0; | 89 | irq_desc[M32R_IRQ_INT0].action = NULL; |
90 | irq_desc[M32R_IRQ_INT0].depth = 1; | 90 | irq_desc[M32R_IRQ_INT0].depth = 1; |
91 | icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 91 | icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; |
92 | disable_mappi_irq(M32R_IRQ_INT0); | 92 | disable_mappi_irq(M32R_IRQ_INT0); |
@@ -95,7 +95,7 @@ void __init init_IRQ(void) | |||
95 | /* MFT2 : system timer */ | 95 | /* MFT2 : system timer */ |
96 | irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; | 96 | irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; |
97 | irq_desc[M32R_IRQ_MFT2].chip = &mappi_irq_type; | 97 | irq_desc[M32R_IRQ_MFT2].chip = &mappi_irq_type; |
98 | irq_desc[M32R_IRQ_MFT2].action = 0; | 98 | irq_desc[M32R_IRQ_MFT2].action = NULL; |
99 | irq_desc[M32R_IRQ_MFT2].depth = 1; | 99 | irq_desc[M32R_IRQ_MFT2].depth = 1; |
100 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 100 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; |
101 | disable_mappi_irq(M32R_IRQ_MFT2); | 101 | disable_mappi_irq(M32R_IRQ_MFT2); |
@@ -104,7 +104,7 @@ void __init init_IRQ(void) | |||
104 | /* SIO0_R : uart receive data */ | 104 | /* SIO0_R : uart receive data */ |
105 | irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; | 105 | irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; |
106 | irq_desc[M32R_IRQ_SIO0_R].chip = &mappi_irq_type; | 106 | irq_desc[M32R_IRQ_SIO0_R].chip = &mappi_irq_type; |
107 | irq_desc[M32R_IRQ_SIO0_R].action = 0; | 107 | irq_desc[M32R_IRQ_SIO0_R].action = NULL; |
108 | irq_desc[M32R_IRQ_SIO0_R].depth = 1; | 108 | irq_desc[M32R_IRQ_SIO0_R].depth = 1; |
109 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 109 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; |
110 | disable_mappi_irq(M32R_IRQ_SIO0_R); | 110 | disable_mappi_irq(M32R_IRQ_SIO0_R); |
@@ -112,7 +112,7 @@ void __init init_IRQ(void) | |||
112 | /* SIO0_S : uart send data */ | 112 | /* SIO0_S : uart send data */ |
113 | irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; | 113 | irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; |
114 | irq_desc[M32R_IRQ_SIO0_S].chip = &mappi_irq_type; | 114 | irq_desc[M32R_IRQ_SIO0_S].chip = &mappi_irq_type; |
115 | irq_desc[M32R_IRQ_SIO0_S].action = 0; | 115 | irq_desc[M32R_IRQ_SIO0_S].action = NULL; |
116 | irq_desc[M32R_IRQ_SIO0_S].depth = 1; | 116 | irq_desc[M32R_IRQ_SIO0_S].depth = 1; |
117 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 117 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; |
118 | disable_mappi_irq(M32R_IRQ_SIO0_S); | 118 | disable_mappi_irq(M32R_IRQ_SIO0_S); |
@@ -120,7 +120,7 @@ void __init init_IRQ(void) | |||
120 | /* SIO1_R : uart receive data */ | 120 | /* SIO1_R : uart receive data */ |
121 | irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; | 121 | irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; |
122 | irq_desc[M32R_IRQ_SIO1_R].chip = &mappi_irq_type; | 122 | irq_desc[M32R_IRQ_SIO1_R].chip = &mappi_irq_type; |
123 | irq_desc[M32R_IRQ_SIO1_R].action = 0; | 123 | irq_desc[M32R_IRQ_SIO1_R].action = NULL; |
124 | irq_desc[M32R_IRQ_SIO1_R].depth = 1; | 124 | irq_desc[M32R_IRQ_SIO1_R].depth = 1; |
125 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 125 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; |
126 | disable_mappi_irq(M32R_IRQ_SIO1_R); | 126 | disable_mappi_irq(M32R_IRQ_SIO1_R); |
@@ -128,7 +128,7 @@ void __init init_IRQ(void) | |||
128 | /* SIO1_S : uart send data */ | 128 | /* SIO1_S : uart send data */ |
129 | irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; | 129 | irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; |
130 | irq_desc[M32R_IRQ_SIO1_S].chip = &mappi_irq_type; | 130 | irq_desc[M32R_IRQ_SIO1_S].chip = &mappi_irq_type; |
131 | irq_desc[M32R_IRQ_SIO1_S].action = 0; | 131 | irq_desc[M32R_IRQ_SIO1_S].action = NULL; |
132 | irq_desc[M32R_IRQ_SIO1_S].depth = 1; | 132 | irq_desc[M32R_IRQ_SIO1_S].depth = 1; |
133 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 133 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; |
134 | disable_mappi_irq(M32R_IRQ_SIO1_S); | 134 | disable_mappi_irq(M32R_IRQ_SIO1_S); |
@@ -138,7 +138,7 @@ void __init init_IRQ(void) | |||
138 | /* INT1 : pccard0 interrupt */ | 138 | /* INT1 : pccard0 interrupt */ |
139 | irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED; | 139 | irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED; |
140 | irq_desc[M32R_IRQ_INT1].chip = &mappi_irq_type; | 140 | irq_desc[M32R_IRQ_INT1].chip = &mappi_irq_type; |
141 | irq_desc[M32R_IRQ_INT1].action = 0; | 141 | irq_desc[M32R_IRQ_INT1].action = NULL; |
142 | irq_desc[M32R_IRQ_INT1].depth = 1; | 142 | irq_desc[M32R_IRQ_INT1].depth = 1; |
143 | icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; | 143 | icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; |
144 | disable_mappi_irq(M32R_IRQ_INT1); | 144 | disable_mappi_irq(M32R_IRQ_INT1); |
@@ -146,7 +146,7 @@ void __init init_IRQ(void) | |||
146 | /* INT2 : pccard1 interrupt */ | 146 | /* INT2 : pccard1 interrupt */ |
147 | irq_desc[M32R_IRQ_INT2].status = IRQ_DISABLED; | 147 | irq_desc[M32R_IRQ_INT2].status = IRQ_DISABLED; |
148 | irq_desc[M32R_IRQ_INT2].chip = &mappi_irq_type; | 148 | irq_desc[M32R_IRQ_INT2].chip = &mappi_irq_type; |
149 | irq_desc[M32R_IRQ_INT2].action = 0; | 149 | irq_desc[M32R_IRQ_INT2].action = NULL; |
150 | irq_desc[M32R_IRQ_INT2].depth = 1; | 150 | irq_desc[M32R_IRQ_INT2].depth = 1; |
151 | icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; | 151 | icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; |
152 | disable_mappi_irq(M32R_IRQ_INT2); | 152 | disable_mappi_irq(M32R_IRQ_INT2); |
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c index a9174efe80cb..b60cea4aebaa 100644 --- a/arch/m32r/kernel/signal.c +++ b/arch/m32r/kernel/signal.c | |||
@@ -33,7 +33,7 @@ | |||
33 | int do_signal(struct pt_regs *, sigset_t *); | 33 | int do_signal(struct pt_regs *, sigset_t *); |
34 | 34 | ||
35 | asmlinkage int | 35 | asmlinkage int |
36 | sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, | 36 | sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, |
37 | unsigned long r2, unsigned long r3, unsigned long r4, | 37 | unsigned long r2, unsigned long r3, unsigned long r4, |
38 | unsigned long r5, unsigned long r6, struct pt_regs *regs) | 38 | unsigned long r5, unsigned long r6, struct pt_regs *regs) |
39 | { | 39 | { |
@@ -78,8 +78,8 @@ sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, | |||
78 | struct rt_sigframe | 78 | struct rt_sigframe |
79 | { | 79 | { |
80 | int sig; | 80 | int sig; |
81 | struct siginfo *pinfo; | 81 | struct siginfo __user *pinfo; |
82 | void *puc; | 82 | void __user *puc; |
83 | struct siginfo info; | 83 | struct siginfo info; |
84 | struct ucontext uc; | 84 | struct ucontext uc; |
85 | // struct _fpstate fpstate; | 85 | // struct _fpstate fpstate; |
diff --git a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c index 722e21f556dc..360129174b2b 100644 --- a/arch/m32r/kernel/smp.c +++ b/arch/m32r/kernel/smp.c | |||
@@ -231,7 +231,7 @@ void smp_flush_tlb_all(void) | |||
231 | local_irq_save(flags); | 231 | local_irq_save(flags); |
232 | __flush_tlb_all(); | 232 | __flush_tlb_all(); |
233 | local_irq_restore(flags); | 233 | local_irq_restore(flags); |
234 | smp_call_function(flush_tlb_all_ipi, 0, 1, 1); | 234 | smp_call_function(flush_tlb_all_ipi, NULL, 1, 1); |
235 | preempt_enable(); | 235 | preempt_enable(); |
236 | } | 236 | } |
237 | 237 | ||
diff --git a/arch/m32r/kernel/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c index b567351f3c52..b4e7bcb43540 100644 --- a/arch/m32r/kernel/sys_m32r.c +++ b/arch/m32r/kernel/sys_m32r.c | |||
@@ -31,7 +31,7 @@ | |||
31 | /* | 31 | /* |
32 | * sys_tas() - test-and-set | 32 | * sys_tas() - test-and-set |
33 | */ | 33 | */ |
34 | asmlinkage int sys_tas(int *addr) | 34 | asmlinkage int sys_tas(int __user *addr) |
35 | { | 35 | { |
36 | int oldval; | 36 | int oldval; |
37 | 37 | ||
@@ -90,7 +90,7 @@ sys_pipe(unsigned long r0, unsigned long r1, unsigned long r2, | |||
90 | 90 | ||
91 | error = do_pipe(fd); | 91 | error = do_pipe(fd); |
92 | if (!error) { | 92 | if (!error) { |
93 | if (copy_to_user((void *)r0, (void *)fd, 2*sizeof(int))) | 93 | if (copy_to_user((void __user *)r0, fd, 2*sizeof(int))) |
94 | error = -EFAULT; | 94 | error = -EFAULT; |
95 | } | 95 | } |
96 | return error; | 96 | return error; |
@@ -201,7 +201,7 @@ asmlinkage int sys_ipc(uint call, int first, int second, | |||
201 | } | 201 | } |
202 | } | 202 | } |
203 | 203 | ||
204 | asmlinkage int sys_uname(struct old_utsname * name) | 204 | asmlinkage int sys_uname(struct old_utsname __user * name) |
205 | { | 205 | { |
206 | int err; | 206 | int err; |
207 | if (!name) | 207 | if (!name) |
diff --git a/arch/m32r/kernel/traps.c b/arch/m32r/kernel/traps.c index c1daf2c40c7c..97e0b1c0830e 100644 --- a/arch/m32r/kernel/traps.c +++ b/arch/m32r/kernel/traps.c | |||
@@ -268,7 +268,7 @@ static __inline__ void do_trap(int trapnr, int signr, const char * str, | |||
268 | #define DO_ERROR(trapnr, signr, str, name) \ | 268 | #define DO_ERROR(trapnr, signr, str, name) \ |
269 | asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ | 269 | asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ |
270 | { \ | 270 | { \ |
271 | do_trap(trapnr, signr, 0, regs, error_code, NULL); \ | 271 | do_trap(trapnr, signr, NULL, regs, error_code, NULL); \ |
272 | } | 272 | } |
273 | 273 | ||
274 | #define DO_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \ | 274 | #define DO_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \ |
diff --git a/arch/m68k/kernel/m68k_ksyms.c b/arch/m68k/kernel/m68k_ksyms.c index f9636e84e6a4..6fc69c74fe2e 100644 --- a/arch/m68k/kernel/m68k_ksyms.c +++ b/arch/m68k/kernel/m68k_ksyms.c | |||
@@ -1,61 +1,10 @@ | |||
1 | #include <linux/module.h> | 1 | #include <linux/module.h> |
2 | #include <linux/linkage.h> | ||
3 | #include <linux/sched.h> | ||
4 | #include <linux/mm.h> | ||
5 | #include <linux/user.h> | ||
6 | #include <linux/elfcore.h> | ||
7 | #include <linux/in6.h> | ||
8 | #include <linux/interrupt.h> | ||
9 | |||
10 | #include <asm/setup.h> | ||
11 | #include <asm/machdep.h> | ||
12 | #include <asm/pgalloc.h> | ||
13 | #include <asm/irq.h> | ||
14 | #include <asm/io.h> | ||
15 | #include <asm/semaphore.h> | 2 | #include <asm/semaphore.h> |
16 | #include <asm/checksum.h> | ||
17 | 3 | ||
18 | asmlinkage long long __ashldi3 (long long, int); | 4 | asmlinkage long long __ashldi3 (long long, int); |
19 | asmlinkage long long __ashrdi3 (long long, int); | 5 | asmlinkage long long __ashrdi3 (long long, int); |
20 | asmlinkage long long __lshrdi3 (long long, int); | 6 | asmlinkage long long __lshrdi3 (long long, int); |
21 | asmlinkage long long __muldi3 (long long, long long); | 7 | asmlinkage long long __muldi3 (long long, long long); |
22 | extern char m68k_debug_device[]; | ||
23 | |||
24 | /* platform dependent support */ | ||
25 | |||
26 | EXPORT_SYMBOL(m68k_machtype); | ||
27 | EXPORT_SYMBOL(m68k_cputype); | ||
28 | EXPORT_SYMBOL(m68k_is040or060); | ||
29 | EXPORT_SYMBOL(m68k_realnum_memory); | ||
30 | EXPORT_SYMBOL(m68k_memory); | ||
31 | #ifndef CONFIG_SUN3 | ||
32 | EXPORT_SYMBOL(cache_push); | ||
33 | EXPORT_SYMBOL(cache_clear); | ||
34 | #ifndef CONFIG_SINGLE_MEMORY_CHUNK | ||
35 | EXPORT_SYMBOL(mm_vtop); | ||
36 | EXPORT_SYMBOL(mm_ptov); | ||
37 | EXPORT_SYMBOL(mm_end_of_chunk); | ||
38 | #else | ||
39 | EXPORT_SYMBOL(m68k_memoffset); | ||
40 | #endif /* !CONFIG_SINGLE_MEMORY_CHUNK */ | ||
41 | EXPORT_SYMBOL(__ioremap); | ||
42 | EXPORT_SYMBOL(iounmap); | ||
43 | EXPORT_SYMBOL(kernel_set_cachemode); | ||
44 | #endif /* !CONFIG_SUN3 */ | ||
45 | EXPORT_SYMBOL(m68k_debug_device); | ||
46 | EXPORT_SYMBOL(mach_hwclk); | ||
47 | EXPORT_SYMBOL(mach_get_ss); | ||
48 | EXPORT_SYMBOL(mach_get_rtc_pll); | ||
49 | EXPORT_SYMBOL(mach_set_rtc_pll); | ||
50 | #ifdef CONFIG_INPUT_M68K_BEEP_MODULE | ||
51 | EXPORT_SYMBOL(mach_beep); | ||
52 | #endif | ||
53 | EXPORT_SYMBOL(dump_fpu); | ||
54 | EXPORT_SYMBOL(dump_thread); | ||
55 | EXPORT_SYMBOL(kernel_thread); | ||
56 | #ifdef CONFIG_VME | ||
57 | EXPORT_SYMBOL(vme_brdtype); | ||
58 | #endif | ||
59 | 8 | ||
60 | /* The following are special because they're not called | 9 | /* The following are special because they're not called |
61 | explicitly (the C compiler generates them). Fortunately, | 10 | explicitly (the C compiler generates them). Fortunately, |
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c index 45a46646c1b3..99fc1226f7f8 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c | |||
@@ -187,6 +187,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | |||
187 | set_fs (fs); | 187 | set_fs (fs); |
188 | return pid; | 188 | return pid; |
189 | } | 189 | } |
190 | EXPORT_SYMBOL(kernel_thread); | ||
190 | 191 | ||
191 | void flush_thread(void) | 192 | void flush_thread(void) |
192 | { | 193 | { |
@@ -221,13 +222,13 @@ asmlinkage int m68k_clone(struct pt_regs *regs) | |||
221 | { | 222 | { |
222 | unsigned long clone_flags; | 223 | unsigned long clone_flags; |
223 | unsigned long newsp; | 224 | unsigned long newsp; |
224 | int *parent_tidptr, *child_tidptr; | 225 | int __user *parent_tidptr, *child_tidptr; |
225 | 226 | ||
226 | /* syscall2 puts clone_flags in d1 and usp in d2 */ | 227 | /* syscall2 puts clone_flags in d1 and usp in d2 */ |
227 | clone_flags = regs->d1; | 228 | clone_flags = regs->d1; |
228 | newsp = regs->d2; | 229 | newsp = regs->d2; |
229 | parent_tidptr = (int *)regs->d3; | 230 | parent_tidptr = (int __user *)regs->d3; |
230 | child_tidptr = (int *)regs->d4; | 231 | child_tidptr = (int __user *)regs->d4; |
231 | if (!newsp) | 232 | if (!newsp) |
232 | newsp = rdusp(); | 233 | newsp = rdusp(); |
233 | return do_fork(clone_flags, newsp, regs, 0, | 234 | return do_fork(clone_flags, newsp, regs, 0, |
@@ -311,6 +312,7 @@ int dump_fpu (struct pt_regs *regs, struct user_m68kfp_struct *fpu) | |||
311 | : "memory"); | 312 | : "memory"); |
312 | return 1; | 313 | return 1; |
313 | } | 314 | } |
315 | EXPORT_SYMBOL(dump_fpu); | ||
314 | 316 | ||
315 | /* | 317 | /* |
316 | * fill in the user structure for a core dump.. | 318 | * fill in the user structure for a core dump.. |
@@ -357,11 +359,12 @@ void dump_thread(struct pt_regs * regs, struct user * dump) | |||
357 | /* dump floating point stuff */ | 359 | /* dump floating point stuff */ |
358 | dump->u_fpvalid = dump_fpu (regs, &dump->m68kfp); | 360 | dump->u_fpvalid = dump_fpu (regs, &dump->m68kfp); |
359 | } | 361 | } |
362 | EXPORT_SYMBOL(dump_thread); | ||
360 | 363 | ||
361 | /* | 364 | /* |
362 | * sys_execve() executes a new program. | 365 | * sys_execve() executes a new program. |
363 | */ | 366 | */ |
364 | asmlinkage int sys_execve(char *name, char **argv, char **envp) | 367 | asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __user * __user *envp) |
365 | { | 368 | { |
366 | int error; | 369 | int error; |
367 | char * filename; | 370 | char * filename; |
diff --git a/arch/m68k/kernel/setup.c b/arch/m68k/kernel/setup.c index 42d5b85f3350..9af3ee0e555d 100644 --- a/arch/m68k/kernel/setup.c +++ b/arch/m68k/kernel/setup.c | |||
@@ -42,27 +42,37 @@ | |||
42 | 42 | ||
43 | unsigned long m68k_machtype; | 43 | unsigned long m68k_machtype; |
44 | unsigned long m68k_cputype; | 44 | unsigned long m68k_cputype; |
45 | EXPORT_SYMBOL(m68k_machtype); | ||
46 | EXPORT_SYMBOL(m68k_cputype); | ||
45 | unsigned long m68k_fputype; | 47 | unsigned long m68k_fputype; |
46 | unsigned long m68k_mmutype; | 48 | unsigned long m68k_mmutype; |
47 | #ifdef CONFIG_VME | 49 | #ifdef CONFIG_VME |
48 | unsigned long vme_brdtype; | 50 | unsigned long vme_brdtype; |
51 | EXPORT_SYMBOL(vme_brdtype); | ||
49 | #endif | 52 | #endif |
50 | 53 | ||
51 | int m68k_is040or060; | 54 | int m68k_is040or060; |
55 | EXPORT_SYMBOL(m68k_is040or060); | ||
52 | 56 | ||
53 | extern int end; | 57 | extern int end; |
54 | extern unsigned long availmem; | 58 | extern unsigned long availmem; |
55 | 59 | ||
56 | int m68k_num_memory; | 60 | int m68k_num_memory; |
57 | int m68k_realnum_memory; | 61 | int m68k_realnum_memory; |
62 | EXPORT_SYMBOL(m68k_realnum_memory); | ||
63 | #ifdef CONFIG_SINGLE_MEMORY_CHUNK | ||
58 | unsigned long m68k_memoffset; | 64 | unsigned long m68k_memoffset; |
65 | EXPORT_SYMBOL(m68k_memoffset); | ||
66 | #endif | ||
59 | struct mem_info m68k_memory[NUM_MEMINFO]; | 67 | struct mem_info m68k_memory[NUM_MEMINFO]; |
68 | EXPORT_SYMBOL(m68k_memory); | ||
60 | 69 | ||
61 | static struct mem_info m68k_ramdisk; | 70 | static struct mem_info m68k_ramdisk; |
62 | 71 | ||
63 | static char m68k_command_line[CL_SIZE]; | 72 | static char m68k_command_line[CL_SIZE]; |
64 | 73 | ||
65 | char m68k_debug_device[6] = ""; | 74 | char m68k_debug_device[6] = ""; |
75 | EXPORT_SYMBOL(m68k_debug_device); | ||
66 | 76 | ||
67 | void (*mach_sched_init) (irq_handler_t handler) __initdata = NULL; | 77 | void (*mach_sched_init) (irq_handler_t handler) __initdata = NULL; |
68 | /* machine dependent irq functions */ | 78 | /* machine dependent irq functions */ |
@@ -72,10 +82,14 @@ int (*mach_get_hardware_list) (char *buffer); | |||
72 | /* machine dependent timer functions */ | 82 | /* machine dependent timer functions */ |
73 | unsigned long (*mach_gettimeoffset) (void); | 83 | unsigned long (*mach_gettimeoffset) (void); |
74 | int (*mach_hwclk) (int, struct rtc_time*); | 84 | int (*mach_hwclk) (int, struct rtc_time*); |
85 | EXPORT_SYMBOL(mach_hwclk); | ||
75 | int (*mach_set_clock_mmss) (unsigned long); | 86 | int (*mach_set_clock_mmss) (unsigned long); |
76 | unsigned int (*mach_get_ss)(void); | 87 | unsigned int (*mach_get_ss)(void); |
77 | int (*mach_get_rtc_pll)(struct rtc_pll_info *); | 88 | int (*mach_get_rtc_pll)(struct rtc_pll_info *); |
78 | int (*mach_set_rtc_pll)(struct rtc_pll_info *); | 89 | int (*mach_set_rtc_pll)(struct rtc_pll_info *); |
90 | EXPORT_SYMBOL(mach_get_ss); | ||
91 | EXPORT_SYMBOL(mach_get_rtc_pll); | ||
92 | EXPORT_SYMBOL(mach_set_rtc_pll); | ||
79 | void (*mach_reset)( void ); | 93 | void (*mach_reset)( void ); |
80 | void (*mach_halt)( void ); | 94 | void (*mach_halt)( void ); |
81 | void (*mach_power_off)( void ); | 95 | void (*mach_power_off)( void ); |
@@ -89,6 +103,7 @@ void (*mach_l2_flush) (int); | |||
89 | #endif | 103 | #endif |
90 | #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) | 104 | #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) |
91 | void (*mach_beep)(unsigned int, unsigned int); | 105 | void (*mach_beep)(unsigned int, unsigned int); |
106 | EXPORT_SYMBOL(mach_beep); | ||
92 | #endif | 107 | #endif |
93 | #if defined(CONFIG_ISA) && defined(MULTI_ISA) | 108 | #if defined(CONFIG_ISA) && defined(MULTI_ISA) |
94 | int isa_type; | 109 | int isa_type; |
diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c index 4569406a2e1f..759fa244e6cd 100644 --- a/arch/m68k/kernel/traps.c +++ b/arch/m68k/kernel/traps.c | |||
@@ -326,13 +326,13 @@ static inline int do_040writeback1(unsigned short wbs, unsigned long wba, | |||
326 | 326 | ||
327 | switch (wbs & WBSIZ_040) { | 327 | switch (wbs & WBSIZ_040) { |
328 | case BA_SIZE_BYTE: | 328 | case BA_SIZE_BYTE: |
329 | res = put_user(wbd & 0xff, (char *)wba); | 329 | res = put_user(wbd & 0xff, (char __user *)wba); |
330 | break; | 330 | break; |
331 | case BA_SIZE_WORD: | 331 | case BA_SIZE_WORD: |
332 | res = put_user(wbd & 0xffff, (short *)wba); | 332 | res = put_user(wbd & 0xffff, (short __user *)wba); |
333 | break; | 333 | break; |
334 | case BA_SIZE_LONG: | 334 | case BA_SIZE_LONG: |
335 | res = put_user(wbd, (int *)wba); | 335 | res = put_user(wbd, (int __user *)wba); |
336 | break; | 336 | break; |
337 | } | 337 | } |
338 | 338 | ||
diff --git a/arch/m68k/mm/kmap.c b/arch/m68k/mm/kmap.c index f46f049d29ff..b54ef1726c55 100644 --- a/arch/m68k/mm/kmap.c +++ b/arch/m68k/mm/kmap.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * used by other architectures /Roman Zippel | 7 | * used by other architectures /Roman Zippel |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/module.h> | ||
10 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
11 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
12 | #include <linux/string.h> | 13 | #include <linux/string.h> |
@@ -219,6 +220,7 @@ void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cachefla | |||
219 | 220 | ||
220 | return (void __iomem *)retaddr; | 221 | return (void __iomem *)retaddr; |
221 | } | 222 | } |
223 | EXPORT_SYMBOL(__ioremap); | ||
222 | 224 | ||
223 | /* | 225 | /* |
224 | * Unmap a ioremap()ed region again | 226 | * Unmap a ioremap()ed region again |
@@ -234,6 +236,7 @@ void iounmap(void __iomem *addr) | |||
234 | free_io_area((__force void *)addr); | 236 | free_io_area((__force void *)addr); |
235 | #endif | 237 | #endif |
236 | } | 238 | } |
239 | EXPORT_SYMBOL(iounmap); | ||
237 | 240 | ||
238 | /* | 241 | /* |
239 | * __iounmap unmaps nearly everything, so be careful | 242 | * __iounmap unmaps nearly everything, so be careful |
@@ -360,3 +363,4 @@ void kernel_set_cachemode(void *addr, unsigned long size, int cmode) | |||
360 | 363 | ||
361 | flush_tlb_all(); | 364 | flush_tlb_all(); |
362 | } | 365 | } |
366 | EXPORT_SYMBOL(kernel_set_cachemode); | ||
diff --git a/arch/m68k/mm/memory.c b/arch/m68k/mm/memory.c index a0c095e17222..0f88812822b1 100644 --- a/arch/m68k/mm/memory.c +++ b/arch/m68k/mm/memory.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * Copyright (C) 1995 Hamish Macdonald | 4 | * Copyright (C) 1995 Hamish Macdonald |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/module.h> | ||
7 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
8 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
9 | #include <linux/string.h> | 10 | #include <linux/string.h> |
@@ -157,9 +158,8 @@ unsigned long mm_vtop(unsigned long vaddr) | |||
157 | 158 | ||
158 | return -1; | 159 | return -1; |
159 | } | 160 | } |
160 | #endif | 161 | EXPORT_SYMBOL(mm_vtop); |
161 | 162 | ||
162 | #ifndef CONFIG_SINGLE_MEMORY_CHUNK | ||
163 | unsigned long mm_ptov (unsigned long paddr) | 163 | unsigned long mm_ptov (unsigned long paddr) |
164 | { | 164 | { |
165 | int i = 0; | 165 | int i = 0; |
@@ -185,6 +185,7 @@ unsigned long mm_ptov (unsigned long paddr) | |||
185 | #endif | 185 | #endif |
186 | return -1; | 186 | return -1; |
187 | } | 187 | } |
188 | EXPORT_SYMBOL(mm_ptov); | ||
188 | #endif | 189 | #endif |
189 | 190 | ||
190 | /* invalidate page in both caches */ | 191 | /* invalidate page in both caches */ |
@@ -298,6 +299,7 @@ void cache_clear (unsigned long paddr, int len) | |||
298 | mach_l2_flush(0); | 299 | mach_l2_flush(0); |
299 | #endif | 300 | #endif |
300 | } | 301 | } |
302 | EXPORT_SYMBOL(cache_clear); /* probably can be unexported */ | ||
301 | 303 | ||
302 | 304 | ||
303 | /* | 305 | /* |
@@ -350,6 +352,7 @@ void cache_push (unsigned long paddr, int len) | |||
350 | mach_l2_flush(1); | 352 | mach_l2_flush(1); |
351 | #endif | 353 | #endif |
352 | } | 354 | } |
355 | EXPORT_SYMBOL(cache_push); /* probably can be unexported */ | ||
353 | 356 | ||
354 | #ifndef CONFIG_SINGLE_MEMORY_CHUNK | 357 | #ifndef CONFIG_SINGLE_MEMORY_CHUNK |
355 | int mm_end_of_chunk (unsigned long addr, int len) | 358 | int mm_end_of_chunk (unsigned long addr, int len) |
@@ -361,4 +364,5 @@ int mm_end_of_chunk (unsigned long addr, int len) | |||
361 | return 1; | 364 | return 1; |
362 | return 0; | 365 | return 0; |
363 | } | 366 | } |
367 | EXPORT_SYMBOL(mm_end_of_chunk); | ||
364 | #endif | 368 | #endif |
diff --git a/arch/m68k/mm/sun3kmap.c b/arch/m68k/mm/sun3kmap.c index 7f0d86f3fe73..1af24cb5bfe1 100644 --- a/arch/m68k/mm/sun3kmap.c +++ b/arch/m68k/mm/sun3kmap.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * for more details. | 8 | * for more details. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/module.h> | ||
11 | #include <linux/types.h> | 12 | #include <linux/types.h> |
12 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
13 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
@@ -59,7 +60,7 @@ static inline void do_pmeg_mapin(unsigned long phys, unsigned long virt, | |||
59 | } | 60 | } |
60 | } | 61 | } |
61 | 62 | ||
62 | void *sun3_ioremap(unsigned long phys, unsigned long size, | 63 | void __iomem *sun3_ioremap(unsigned long phys, unsigned long size, |
63 | unsigned long type) | 64 | unsigned long type) |
64 | { | 65 | { |
65 | struct vm_struct *area; | 66 | struct vm_struct *area; |
@@ -101,22 +102,24 @@ void *sun3_ioremap(unsigned long phys, unsigned long size, | |||
101 | virt += seg_pages * PAGE_SIZE; | 102 | virt += seg_pages * PAGE_SIZE; |
102 | } | 103 | } |
103 | 104 | ||
104 | return (void *)ret; | 105 | return (void __iomem *)ret; |
105 | 106 | ||
106 | } | 107 | } |
107 | 108 | ||
108 | 109 | ||
109 | void *__ioremap(unsigned long phys, unsigned long size, int cache) | 110 | void __iomem *__ioremap(unsigned long phys, unsigned long size, int cache) |
110 | { | 111 | { |
111 | 112 | ||
112 | return sun3_ioremap(phys, size, SUN3_PAGE_TYPE_IO); | 113 | return sun3_ioremap(phys, size, SUN3_PAGE_TYPE_IO); |
113 | 114 | ||
114 | } | 115 | } |
116 | EXPORT_SYMBOL(__ioremap); | ||
115 | 117 | ||
116 | void iounmap(void *addr) | 118 | void iounmap(void __iomem *addr) |
117 | { | 119 | { |
118 | vfree((void *)(PAGE_MASK & (unsigned long)addr)); | 120 | vfree((void *)(PAGE_MASK & (unsigned long)addr)); |
119 | } | 121 | } |
122 | EXPORT_SYMBOL(iounmap); | ||
120 | 123 | ||
121 | /* sun3_map_test(addr, val) -- Reads a byte from addr, storing to val, | 124 | /* sun3_map_test(addr, val) -- Reads a byte from addr, storing to val, |
122 | * trapping the potential read fault. Returns 0 if the access faulted, | 125 | * trapping the potential read fault. Returns 0 if the access faulted, |
diff --git a/arch/m68k/sun3/Makefile b/arch/m68k/sun3/Makefile index 4d4f0695d985..be1a8470d636 100644 --- a/arch/m68k/sun3/Makefile +++ b/arch/m68k/sun3/Makefile | |||
@@ -2,6 +2,6 @@ | |||
2 | # Makefile for Linux arch/m68k/sun3 source directory | 2 | # Makefile for Linux arch/m68k/sun3 source directory |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := sun3_ksyms.o sun3ints.o sun3dvma.o sbus.o idprom.o | 5 | obj-y := sun3ints.o sun3dvma.o sbus.o idprom.o |
6 | 6 | ||
7 | obj-$(CONFIG_SUN3) += config.o mmu_emu.o leds.o dvma.o intersil.o | 7 | obj-$(CONFIG_SUN3) += config.o mmu_emu.o leds.o dvma.o intersil.o |
diff --git a/arch/m68k/sun3/idprom.c b/arch/m68k/sun3/idprom.c index 02c1fee6fe74..dca6ab6a4ede 100644 --- a/arch/m68k/sun3/idprom.c +++ b/arch/m68k/sun3/idprom.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Sun3/3x models added by David Monro (davidm@psrg.cs.usyd.edu.au) | 6 | * Sun3/3x models added by David Monro (davidm@psrg.cs.usyd.edu.au) |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/module.h> | ||
9 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
10 | #include <linux/types.h> | 11 | #include <linux/types.h> |
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
@@ -16,6 +17,8 @@ | |||
16 | #include <asm/machines.h> /* Fun with Sun released architectures. */ | 17 | #include <asm/machines.h> /* Fun with Sun released architectures. */ |
17 | 18 | ||
18 | struct idprom *idprom; | 19 | struct idprom *idprom; |
20 | EXPORT_SYMBOL(idprom); | ||
21 | |||
19 | static struct idprom idprom_buffer; | 22 | static struct idprom idprom_buffer; |
20 | 23 | ||
21 | /* Here is the master table of Sun machines which use some implementation | 24 | /* Here is the master table of Sun machines which use some implementation |
diff --git a/arch/m68k/sun3/sun3_ksyms.c b/arch/m68k/sun3/sun3_ksyms.c deleted file mode 100644 index 43e5a9af8abd..000000000000 --- a/arch/m68k/sun3/sun3_ksyms.c +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #include <linux/module.h> | ||
2 | #include <linux/types.h> | ||
3 | #include <asm/dvma.h> | ||
4 | #include <asm/idprom.h> | ||
5 | |||
6 | /* | ||
7 | * Add things here when you find the need for it. | ||
8 | */ | ||
9 | EXPORT_SYMBOL(dvma_map_align); | ||
10 | EXPORT_SYMBOL(dvma_unmap); | ||
11 | EXPORT_SYMBOL(dvma_malloc_align); | ||
12 | EXPORT_SYMBOL(dvma_free); | ||
13 | EXPORT_SYMBOL(idprom); | ||
diff --git a/arch/m68k/sun3/sun3dvma.c b/arch/m68k/sun3/sun3dvma.c index a2bc2da7f8f0..8709677fa025 100644 --- a/arch/m68k/sun3/sun3dvma.c +++ b/arch/m68k/sun3/sun3dvma.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Contains common routines for sun3/sun3x DVMA management. | 6 | * Contains common routines for sun3/sun3x DVMA management. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/module.h> | ||
9 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
10 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
11 | #include <linux/list.h> | 12 | #include <linux/list.h> |
@@ -312,6 +313,7 @@ inline unsigned long dvma_map_align(unsigned long kaddr, int len, int align) | |||
312 | BUG(); | 313 | BUG(); |
313 | return 0; | 314 | return 0; |
314 | } | 315 | } |
316 | EXPORT_SYMBOL(dvma_map_align); | ||
315 | 317 | ||
316 | void dvma_unmap(void *baddr) | 318 | void dvma_unmap(void *baddr) |
317 | { | 319 | { |
@@ -327,7 +329,7 @@ void dvma_unmap(void *baddr) | |||
327 | return; | 329 | return; |
328 | 330 | ||
329 | } | 331 | } |
330 | 332 | EXPORT_SYMBOL(dvma_unmap); | |
331 | 333 | ||
332 | void *dvma_malloc_align(unsigned long len, unsigned long align) | 334 | void *dvma_malloc_align(unsigned long len, unsigned long align) |
333 | { | 335 | { |
@@ -367,6 +369,7 @@ void *dvma_malloc_align(unsigned long len, unsigned long align) | |||
367 | return (void *)vaddr; | 369 | return (void *)vaddr; |
368 | 370 | ||
369 | } | 371 | } |
372 | EXPORT_SYMBOL(dvma_malloc_align); | ||
370 | 373 | ||
371 | void dvma_free(void *vaddr) | 374 | void dvma_free(void *vaddr) |
372 | { | 375 | { |
@@ -374,3 +377,4 @@ void dvma_free(void *vaddr) | |||
374 | return; | 377 | return; |
375 | 378 | ||
376 | } | 379 | } |
380 | EXPORT_SYMBOL(dvma_free); | ||
diff --git a/arch/parisc/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c index 6d57553d8ef8..8f6a0b312f7a 100644 --- a/arch/parisc/kernel/parisc_ksyms.c +++ b/arch/parisc/kernel/parisc_ksyms.c | |||
@@ -69,10 +69,6 @@ EXPORT_SYMBOL(memcpy_toio); | |||
69 | EXPORT_SYMBOL(memcpy_fromio); | 69 | EXPORT_SYMBOL(memcpy_fromio); |
70 | EXPORT_SYMBOL(memset_io); | 70 | EXPORT_SYMBOL(memset_io); |
71 | 71 | ||
72 | #include <asm/unistd.h> | ||
73 | EXPORT_SYMBOL(sys_lseek); | ||
74 | EXPORT_SYMBOL(sys_write); | ||
75 | |||
76 | #include <asm/semaphore.h> | 72 | #include <asm/semaphore.h> |
77 | EXPORT_SYMBOL(__up); | 73 | EXPORT_SYMBOL(__up); |
78 | EXPORT_SYMBOL(__down_interruptible); | 74 | EXPORT_SYMBOL(__down_interruptible); |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 16fe027bbc12..d1c0758c5611 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -307,11 +307,12 @@ void __init paging_init(void) | |||
307 | top_of_ram, total_ram); | 307 | top_of_ram, total_ram); |
308 | printk(KERN_DEBUG "Memory hole size: %ldMB\n", | 308 | printk(KERN_DEBUG "Memory hole size: %ldMB\n", |
309 | (top_of_ram - total_ram) >> 20); | 309 | (top_of_ram - total_ram) >> 20); |
310 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); | ||
310 | #ifdef CONFIG_HIGHMEM | 311 | #ifdef CONFIG_HIGHMEM |
311 | max_zone_pfns[0] = total_lowmem >> PAGE_SHIFT; | 312 | max_zone_pfns[ZONE_DMA] = total_lowmem >> PAGE_SHIFT; |
312 | max_zone_pfns[1] = top_of_ram >> PAGE_SHIFT; | 313 | max_zone_pfns[ZONE_HIGHMEM] = top_of_ram >> PAGE_SHIFT; |
313 | #else | 314 | #else |
314 | max_zone_pfns[0] = top_of_ram >> PAGE_SHIFT; | 315 | max_zone_pfns[ZONE_DMA] = top_of_ram >> PAGE_SHIFT; |
315 | #endif | 316 | #endif |
316 | free_area_init_nodes(max_zone_pfns); | 317 | free_area_init_nodes(max_zone_pfns); |
317 | } | 318 | } |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 43c272075e1a..9da01dc8cfd9 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -617,9 +617,9 @@ void __init do_init_bootmem(void) | |||
617 | 617 | ||
618 | void __init paging_init(void) | 618 | void __init paging_init(void) |
619 | { | 619 | { |
620 | unsigned long max_zone_pfns[MAX_NR_ZONES] = { | 620 | unsigned long max_zone_pfns[MAX_NR_ZONES]; |
621 | lmb_end_of_DRAM() >> PAGE_SHIFT | 621 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); |
622 | }; | 622 | max_zone_pfns[ZONE_DMA] = lmb_end_of_DRAM() >> PAGE_SHIFT; |
623 | free_area_init_nodes(max_zone_pfns); | 623 | free_area_init_nodes(max_zone_pfns); |
624 | } | 624 | } |
625 | 625 | ||
diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c index 410200046af1..c374e53ae03a 100644 --- a/arch/ppc/mm/init.c +++ b/arch/ppc/mm/init.c | |||
@@ -374,11 +374,12 @@ void __init paging_init(void) | |||
374 | end_pfn = start_pfn + (total_memory >> PAGE_SHIFT); | 374 | end_pfn = start_pfn + (total_memory >> PAGE_SHIFT); |
375 | add_active_range(0, start_pfn, end_pfn); | 375 | add_active_range(0, start_pfn, end_pfn); |
376 | 376 | ||
377 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); | ||
377 | #ifdef CONFIG_HIGHMEM | 378 | #ifdef CONFIG_HIGHMEM |
378 | max_zone_pfns[0] = total_lowmem >> PAGE_SHIFT; | 379 | max_zone_pfns[ZONE_DMA] = total_lowmem >> PAGE_SHIFT; |
379 | max_zone_pfns[1] = total_memory >> PAGE_SHIFT; | 380 | max_zone_pfns[ZONE_HIGHMEM] = total_memory >> PAGE_SHIFT; |
380 | #else | 381 | #else |
381 | max_zone_pfns[0] = total_memory >> PAGE_SHIFT; | 382 | max_zone_pfns[ZONE_DMA] = total_memory >> PAGE_SHIFT; |
382 | #endif /* CONFIG_HIGHMEM */ | 383 | #endif /* CONFIG_HIGHMEM */ |
383 | free_area_init_nodes(max_zone_pfns); | 384 | free_area_init_nodes(max_zone_pfns); |
384 | } | 385 | } |
diff --git a/arch/s390/kernel/s390_ksyms.c b/arch/s390/kernel/s390_ksyms.c index 9f19e833a562..90b5ef529eb7 100644 --- a/arch/s390/kernel/s390_ksyms.c +++ b/arch/s390/kernel/s390_ksyms.c | |||
@@ -51,4 +51,3 @@ EXPORT_SYMBOL(csum_fold); | |||
51 | EXPORT_SYMBOL(console_mode); | 51 | EXPORT_SYMBOL(console_mode); |
52 | EXPORT_SYMBOL(console_devno); | 52 | EXPORT_SYMBOL(console_devno); |
53 | EXPORT_SYMBOL(console_irq); | 53 | EXPORT_SYMBOL(console_irq); |
54 | EXPORT_SYMBOL(sys_wait4); | ||
diff --git a/arch/um/Kconfig b/arch/um/Kconfig index d75307589d74..78fb619bdb73 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig | |||
@@ -25,6 +25,19 @@ config PCI | |||
25 | config PCMCIA | 25 | config PCMCIA |
26 | bool | 26 | bool |
27 | 27 | ||
28 | # Yet to do! | ||
29 | config TRACE_IRQFLAGS_SUPPORT | ||
30 | bool | ||
31 | default n | ||
32 | |||
33 | config LOCKDEP_SUPPORT | ||
34 | bool | ||
35 | default y | ||
36 | |||
37 | config STACKTRACE_SUPPORT | ||
38 | bool | ||
39 | default y | ||
40 | |||
28 | config GENERIC_CALIBRATE_DELAY | 41 | config GENERIC_CALIBRATE_DELAY |
29 | bool | 42 | bool |
30 | default y | 43 | default y |
@@ -37,13 +50,15 @@ config IRQ_RELEASE_METHOD | |||
37 | menu "UML-specific options" | 50 | menu "UML-specific options" |
38 | 51 | ||
39 | config MODE_TT | 52 | config MODE_TT |
40 | bool "Tracing thread support" | 53 | bool "Tracing thread support (DEPRECATED)" |
41 | default n | 54 | default n |
42 | help | 55 | help |
43 | This option controls whether tracing thread support is compiled | 56 | This option controls whether tracing thread support is compiled |
44 | into UML. This option is largely obsolete, given that skas0 provides | 57 | into UML. This option is largely obsolete, given that skas0 provides |
45 | skas security and performance without needing to patch the host. | 58 | skas security and performance without needing to patch the host. |
46 | It is safe to say 'N' here. | 59 | It is safe to say 'N' here; saying 'Y' may cause additional problems |
60 | with the resulting binary even if you run UML in SKAS mode, and running | ||
61 | in TT mode is strongly *NOT RECOMMENDED*. | ||
47 | 62 | ||
48 | config STATIC_LINK | 63 | config STATIC_LINK |
49 | bool "Force a static link" | 64 | bool "Force a static link" |
@@ -56,6 +71,9 @@ config STATIC_LINK | |||
56 | for use in a chroot jail. So, if you intend to run UML inside a | 71 | for use in a chroot jail. So, if you intend to run UML inside a |
57 | chroot, and you disable CONFIG_MODE_TT, you probably want to say Y | 72 | chroot, and you disable CONFIG_MODE_TT, you probably want to say Y |
58 | here. | 73 | here. |
74 | Additionally, this option enables using higher memory spaces (up to | ||
75 | 2.75G) for UML - disabling CONFIG_MODE_TT and enabling this option leads | ||
76 | to best results for this. | ||
59 | 77 | ||
60 | config KERNEL_HALF_GIGS | 78 | config KERNEL_HALF_GIGS |
61 | int "Kernel address space size (in .5G units)" | 79 | int "Kernel address space size (in .5G units)" |
@@ -72,10 +90,13 @@ config MODE_SKAS | |||
72 | default y | 90 | default y |
73 | help | 91 | help |
74 | This option controls whether skas (separate kernel address space) | 92 | This option controls whether skas (separate kernel address space) |
75 | support is compiled in. If you have applied the skas patch to the | 93 | support is compiled in. |
76 | host, then you certainly want to say Y here (and consider saying N | 94 | Unless you have specific needs to use TT mode (which applies almost only |
77 | to CONFIG_MODE_TT). Otherwise, it is safe to say Y. Disabling this | 95 | to developers), you should say Y here. |
78 | option will shrink the UML binary slightly. | 96 | SKAS mode will make use of the SKAS3 patch if it is applied on the host |
97 | (and your UML will run in SKAS3 mode), but if no SKAS patch is applied | ||
98 | on the host it will run in SKAS0 mode, which is anyway faster than TT | ||
99 | mode. | ||
79 | 100 | ||
80 | source "arch/um/Kconfig.arch" | 101 | source "arch/um/Kconfig.arch" |
81 | source "mm/Kconfig" | 102 | source "mm/Kconfig" |
diff --git a/arch/um/Kconfig.i386 b/arch/um/Kconfig.i386 index f6eb72d117b9..f191a550a079 100644 --- a/arch/um/Kconfig.i386 +++ b/arch/um/Kconfig.i386 | |||
@@ -16,23 +16,42 @@ config SEMAPHORE_SLEEPERS | |||
16 | bool | 16 | bool |
17 | default y | 17 | default y |
18 | 18 | ||
19 | config HOST_2G_2G | 19 | choice |
20 | bool "2G/2G host address space split" | 20 | prompt "Host memory split" |
21 | default n | 21 | default HOST_VMSPLIT_3G |
22 | help | 22 | ---help--- |
23 | This is needed when the host on which you run has a 2G/2G memory | 23 | This is needed when the host kernel on which you run has a non-default |
24 | split, instead of the customary 3G/1G. | 24 | (like 2G/2G) memory split, instead of the customary 3G/1G. If you did |
25 | 25 | not recompile your own kernel but use the default distro's one, you can | |
26 | Note that to enable such a host | 26 | safely accept the "Default split" option. |
27 | configuration, which makes sense only in some cases, you need special | 27 | |
28 | host patches. | 28 | It can be enabled on recent (>=2.6.16-rc2) vanilla kernels via |
29 | 29 | CONFIG_VM_SPLIT_*, or on previous kernels with special patches (-ck | |
30 | So, if you do not know what to do here, say 'N'. | 30 | patchset by Con Kolivas, or other ones) - option names match closely the |
31 | host CONFIG_VM_SPLIT_* ones. | ||
32 | |||
33 | A lower setting (where 1G/3G is lowest and 3G/1G is higher) will | ||
34 | tolerate even more "normal" host kernels, but an higher setting will be | ||
35 | stricter. | ||
36 | |||
37 | So, if you do not know what to do here, say 'Default split'. | ||
38 | |||
39 | config HOST_VMSPLIT_3G | ||
40 | bool "Default split (3G/1G user/kernel host split)" | ||
41 | config HOST_VMSPLIT_3G_OPT | ||
42 | bool "3G/1G user/kernel host split (for full 1G low memory)" | ||
43 | config HOST_VMSPLIT_2G | ||
44 | bool "2G/2G user/kernel host split" | ||
45 | config HOST_VMSPLIT_1G | ||
46 | bool "1G/3G user/kernel host split" | ||
47 | endchoice | ||
31 | 48 | ||
32 | config TOP_ADDR | 49 | config TOP_ADDR |
33 | hex | 50 | hex |
34 | default 0xc0000000 if !HOST_2G_2G | 51 | default 0xB0000000 if HOST_VMSPLIT_3G_OPT |
35 | default 0x80000000 if HOST_2G_2G | 52 | default 0x78000000 if HOST_VMSPLIT_2G |
53 | default 0x40000000 if HOST_VMSPLIT_1G | ||
54 | default 0xC0000000 | ||
36 | 55 | ||
37 | config 3_LEVEL_PGTABLES | 56 | config 3_LEVEL_PGTABLES |
38 | bool "Three-level pagetables (EXPERIMENTAL)" | 57 | bool "Three-level pagetables (EXPERIMENTAL)" |
diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64 index 11154b6773ec..d278682dd799 100644 --- a/arch/um/Makefile-x86_64 +++ b/arch/um/Makefile-x86_64 | |||
@@ -1,10 +1,10 @@ | |||
1 | # Copyright 2003 - 2004 Pathscale, Inc | 1 | # Copyright 2003 - 2004 Pathscale, Inc |
2 | # Released under the GPL | 2 | # Released under the GPL |
3 | 3 | ||
4 | core-y += arch/um/sys-x86_64/ | 4 | core-y += arch/um/sys-x86_64/ arch/x86_64/crypto/ |
5 | START := 0x60000000 | 5 | START := 0x60000000 |
6 | 6 | ||
7 | _extra_flags_ = -fno-builtin -m64 -mcmodel=kernel | 7 | _extra_flags_ = -fno-builtin -m64 |
8 | 8 | ||
9 | #We #undef __x86_64__ for kernelspace, not for userspace where | 9 | #We #undef __x86_64__ for kernelspace, not for userspace where |
10 | #it's needed for headers to work! | 10 | #it's needed for headers to work! |
diff --git a/arch/um/include/common-offsets.h b/arch/um/include/common-offsets.h index 356390d1f8b9..461175f8b1d9 100644 --- a/arch/um/include/common-offsets.h +++ b/arch/um/include/common-offsets.h | |||
@@ -1,9 +1,16 @@ | |||
1 | /* for use by sys-$SUBARCH/kernel-offsets.c */ | 1 | /* for use by sys-$SUBARCH/kernel-offsets.c */ |
2 | 2 | ||
3 | DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE); | ||
4 | #ifdef CONFIG_MODE_TT | ||
5 | OFFSET(HOST_TASK_EXTERN_PID, task_struct, thread.mode.tt.extern_pid); | ||
6 | #endif | ||
7 | |||
3 | OFFSET(HOST_TASK_REGS, task_struct, thread.regs); | 8 | OFFSET(HOST_TASK_REGS, task_struct, thread.regs); |
4 | OFFSET(HOST_TASK_PID, task_struct, pid); | 9 | OFFSET(HOST_TASK_PID, task_struct, pid); |
10 | |||
5 | DEFINE(UM_KERN_PAGE_SIZE, PAGE_SIZE); | 11 | DEFINE(UM_KERN_PAGE_SIZE, PAGE_SIZE); |
6 | DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC); | 12 | DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC); |
13 | |||
7 | DEFINE_STR(UM_KERN_EMERG, KERN_EMERG); | 14 | DEFINE_STR(UM_KERN_EMERG, KERN_EMERG); |
8 | DEFINE_STR(UM_KERN_ALERT, KERN_ALERT); | 15 | DEFINE_STR(UM_KERN_ALERT, KERN_ALERT); |
9 | DEFINE_STR(UM_KERN_CRIT, KERN_CRIT); | 16 | DEFINE_STR(UM_KERN_CRIT, KERN_CRIT); |
@@ -12,6 +19,10 @@ DEFINE_STR(UM_KERN_WARNING, KERN_WARNING); | |||
12 | DEFINE_STR(UM_KERN_NOTICE, KERN_NOTICE); | 19 | DEFINE_STR(UM_KERN_NOTICE, KERN_NOTICE); |
13 | DEFINE_STR(UM_KERN_INFO, KERN_INFO); | 20 | DEFINE_STR(UM_KERN_INFO, KERN_INFO); |
14 | DEFINE_STR(UM_KERN_DEBUG, KERN_DEBUG); | 21 | DEFINE_STR(UM_KERN_DEBUG, KERN_DEBUG); |
22 | |||
15 | DEFINE(UM_ELF_CLASS, ELF_CLASS); | 23 | DEFINE(UM_ELF_CLASS, ELF_CLASS); |
16 | DEFINE(UM_ELFCLASS32, ELFCLASS32); | 24 | DEFINE(UM_ELFCLASS32, ELFCLASS32); |
17 | DEFINE(UM_ELFCLASS64, ELFCLASS64); | 25 | DEFINE(UM_ELFCLASS64, ELFCLASS64); |
26 | |||
27 | /* For crypto assembler code. */ | ||
28 | DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx)); | ||
diff --git a/arch/um/include/longjmp.h b/arch/um/include/longjmp.h index e93c6d3e893b..e860bc5848e0 100644 --- a/arch/um/include/longjmp.h +++ b/arch/um/include/longjmp.h | |||
@@ -12,7 +12,8 @@ extern void longjmp(jmp_buf, int); | |||
12 | } while(0) | 12 | } while(0) |
13 | 13 | ||
14 | #define UML_SETJMP(buf) ({ \ | 14 | #define UML_SETJMP(buf) ({ \ |
15 | int n, enable; \ | 15 | int n; \ |
16 | volatile int enable; \ | ||
16 | enable = get_signals(); \ | 17 | enable = get_signals(); \ |
17 | n = setjmp(*buf); \ | 18 | n = setjmp(*buf); \ |
18 | if(n != 0) \ | 19 | if(n != 0) \ |
diff --git a/arch/um/include/os.h b/arch/um/include/os.h index 120ca21a513a..6516f6dca96d 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h | |||
@@ -201,6 +201,7 @@ extern int os_getpgrp(void); | |||
201 | 201 | ||
202 | #ifdef UML_CONFIG_MODE_TT | 202 | #ifdef UML_CONFIG_MODE_TT |
203 | extern void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)); | 203 | extern void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)); |
204 | extern void stop(void); | ||
204 | #endif | 205 | #endif |
205 | extern void init_new_thread_signals(void); | 206 | extern void init_new_thread_signals(void); |
206 | extern int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr); | 207 | extern int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr); |
diff --git a/arch/um/include/sysdep-i386/kernel-offsets.h b/arch/um/include/sysdep-i386/kernel-offsets.h index 2c13de321f2f..97ec9d894d75 100644 --- a/arch/um/include/sysdep-i386/kernel-offsets.h +++ b/arch/um/include/sysdep-i386/kernel-offsets.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #include <linux/stddef.h> | 1 | #include <linux/stddef.h> |
2 | #include <linux/sched.h> | 2 | #include <linux/sched.h> |
3 | #include <linux/elf.h> | 3 | #include <linux/elf.h> |
4 | #include <linux/crypto.h> | ||
4 | #include <asm/mman.h> | 5 | #include <asm/mman.h> |
5 | 6 | ||
6 | #define DEFINE(sym, val) \ | 7 | #define DEFINE(sym, val) \ |
@@ -17,9 +18,5 @@ | |||
17 | void foo(void) | 18 | void foo(void) |
18 | { | 19 | { |
19 | OFFSET(HOST_TASK_DEBUGREGS, task_struct, thread.arch.debugregs); | 20 | OFFSET(HOST_TASK_DEBUGREGS, task_struct, thread.arch.debugregs); |
20 | DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE); | ||
21 | #ifdef CONFIG_MODE_TT | ||
22 | OFFSET(HOST_TASK_EXTERN_PID, task_struct, thread.mode.tt.extern_pid); | ||
23 | #endif | ||
24 | #include <common-offsets.h> | 21 | #include <common-offsets.h> |
25 | } | 22 | } |
diff --git a/arch/um/include/sysdep-x86_64/kernel-offsets.h b/arch/um/include/sysdep-x86_64/kernel-offsets.h index 91d129fb3930..a307237b7964 100644 --- a/arch/um/include/sysdep-x86_64/kernel-offsets.h +++ b/arch/um/include/sysdep-x86_64/kernel-offsets.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <linux/sched.h> | 2 | #include <linux/sched.h> |
3 | #include <linux/time.h> | 3 | #include <linux/time.h> |
4 | #include <linux/elf.h> | 4 | #include <linux/elf.h> |
5 | #include <linux/crypto.h> | ||
5 | #include <asm/page.h> | 6 | #include <asm/page.h> |
6 | #include <asm/mman.h> | 7 | #include <asm/mman.h> |
7 | 8 | ||
@@ -18,9 +19,5 @@ | |||
18 | 19 | ||
19 | void foo(void) | 20 | void foo(void) |
20 | { | 21 | { |
21 | DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE); | ||
22 | #ifdef CONFIG_MODE_TT | ||
23 | OFFSET(HOST_TASK_EXTERN_PID, task_struct, thread.mode.tt.extern_pid); | ||
24 | #endif | ||
25 | #include <common-offsets.h> | 22 | #include <common-offsets.h> |
26 | } | 23 | } |
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c index c17eddcf89b3..2c6d090a2e87 100644 --- a/arch/um/kernel/skas/mmu.c +++ b/arch/um/kernel/skas/mmu.c | |||
@@ -60,10 +60,7 @@ static int init_stub_pte(struct mm_struct *mm, unsigned long proc, | |||
60 | #endif | 60 | #endif |
61 | 61 | ||
62 | *pte = mk_pte(virt_to_page(kernel), __pgprot(_PAGE_PRESENT)); | 62 | *pte = mk_pte(virt_to_page(kernel), __pgprot(_PAGE_PRESENT)); |
63 | /* This is wrong for the code page, but it doesn't matter since the | 63 | *pte = pte_mkread(*pte); |
64 | * stub is mapped by hand with the correct permissions. | ||
65 | */ | ||
66 | *pte = pte_mkwrite(*pte); | ||
67 | return(0); | 64 | return(0); |
68 | 65 | ||
69 | out_pmd: | 66 | out_pmd: |
diff --git a/arch/um/kernel/tt/uaccess_user.c b/arch/um/kernel/tt/uaccess_user.c index 6c92bbccb49c..ed1abcf4d057 100644 --- a/arch/um/kernel/tt/uaccess_user.c +++ b/arch/um/kernel/tt/uaccess_user.c | |||
@@ -4,13 +4,13 @@ | |||
4 | * Licensed under the GPL | 4 | * Licensed under the GPL |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <setjmp.h> | ||
8 | #include <string.h> | 7 | #include <string.h> |
9 | #include "user_util.h" | 8 | #include "user_util.h" |
10 | #include "uml_uaccess.h" | 9 | #include "uml_uaccess.h" |
11 | #include "task.h" | 10 | #include "task.h" |
12 | #include "kern_util.h" | 11 | #include "kern_util.h" |
13 | #include "os.h" | 12 | #include "os.h" |
13 | #include "longjmp.h" | ||
14 | 14 | ||
15 | int __do_copy_from_user(void *to, const void *from, int n, | 15 | int __do_copy_from_user(void *to, const void *from, int n, |
16 | void **fault_addr, void **fault_catcher) | 16 | void **fault_addr, void **fault_catcher) |
@@ -80,10 +80,10 @@ int __do_strnlen_user(const char *str, unsigned long n, | |||
80 | struct tt_regs save = TASK_REGS(get_current())->tt; | 80 | struct tt_regs save = TASK_REGS(get_current())->tt; |
81 | int ret; | 81 | int ret; |
82 | unsigned long *faddrp = (unsigned long *)fault_addr; | 82 | unsigned long *faddrp = (unsigned long *)fault_addr; |
83 | sigjmp_buf jbuf; | 83 | jmp_buf jbuf; |
84 | 84 | ||
85 | *fault_catcher = &jbuf; | 85 | *fault_catcher = &jbuf; |
86 | if(sigsetjmp(jbuf, 1) == 0) | 86 | if(UML_SETJMP(&jbuf) == 0) |
87 | ret = strlen(str) + 1; | 87 | ret = strlen(str) + 1; |
88 | else ret = *faddrp - (unsigned long) str; | 88 | else ret = *faddrp - (unsigned long) str; |
89 | 89 | ||
diff --git a/arch/um/os-Linux/tt.c b/arch/um/os-Linux/tt.c index 5461a065bbb9..3dc3a02d6263 100644 --- a/arch/um/os-Linux/tt.c +++ b/arch/um/os-Linux/tt.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <errno.h> | 10 | #include <errno.h> |
11 | #include <stdarg.h> | 11 | #include <stdarg.h> |
12 | #include <stdlib.h> | 12 | #include <stdlib.h> |
13 | #include <setjmp.h> | ||
14 | #include <sys/time.h> | 13 | #include <sys/time.h> |
15 | #include <sys/ptrace.h> | 14 | #include <sys/ptrace.h> |
16 | #include <linux/ptrace.h> | 15 | #include <linux/ptrace.h> |
diff --git a/arch/um/os-Linux/util.c b/arch/um/os-Linux/util.c index 3f5b1514e8a7..56b8a50e8bc2 100644 --- a/arch/um/os-Linux/util.c +++ b/arch/um/os-Linux/util.c | |||
@@ -80,11 +80,18 @@ void setup_machinename(char *machine_out) | |||
80 | struct utsname host; | 80 | struct utsname host; |
81 | 81 | ||
82 | uname(&host); | 82 | uname(&host); |
83 | #if defined(UML_CONFIG_UML_X86) && !defined(UML_CONFIG_64BIT) | 83 | #ifdef UML_CONFIG_UML_X86 |
84 | # ifndef UML_CONFIG_64BIT | ||
84 | if (!strcmp(host.machine, "x86_64")) { | 85 | if (!strcmp(host.machine, "x86_64")) { |
85 | strcpy(machine_out, "i686"); | 86 | strcpy(machine_out, "i686"); |
86 | return; | 87 | return; |
87 | } | 88 | } |
89 | # else | ||
90 | if (!strcmp(host.machine, "i686")) { | ||
91 | strcpy(machine_out, "x86_64"); | ||
92 | return; | ||
93 | } | ||
94 | # endif | ||
88 | #endif | 95 | #endif |
89 | strcpy(machine_out, host.machine); | 96 | strcpy(machine_out, host.machine); |
90 | } | 97 | } |
diff --git a/arch/um/sys-x86_64/ksyms.c b/arch/um/sys-x86_64/ksyms.c index 859273808203..12c593607c59 100644 --- a/arch/um/sys-x86_64/ksyms.c +++ b/arch/um/sys-x86_64/ksyms.c | |||
@@ -14,6 +14,3 @@ EXPORT_SYMBOL(__up_wakeup); | |||
14 | 14 | ||
15 | /*XXX: we need them because they would be exported by x86_64 */ | 15 | /*XXX: we need them because they would be exported by x86_64 */ |
16 | EXPORT_SYMBOL(__memcpy); | 16 | EXPORT_SYMBOL(__memcpy); |
17 | |||
18 | /* Networking helper routines. */ | ||
19 | EXPORT_SYMBOL(ip_compute_csum); | ||
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index 771bcf77daf2..c3cdcab29688 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -1897,7 +1897,7 @@ static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask) | |||
1897 | } | 1897 | } |
1898 | #endif | 1898 | #endif |
1899 | 1899 | ||
1900 | static struct hw_interrupt_type ht_irq_chip = { | 1900 | static struct irq_chip ht_irq_chip = { |
1901 | .name = "PCI-HT", | 1901 | .name = "PCI-HT", |
1902 | .mask = mask_ht_irq, | 1902 | .mask = mask_ht_irq, |
1903 | .unmask = unmask_ht_irq, | 1903 | .unmask = unmask_ht_irq, |
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index 19c72520a868..971dc1181e69 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c | |||
@@ -406,9 +406,12 @@ void __cpuinit zap_low_mappings(int cpu) | |||
406 | #ifndef CONFIG_NUMA | 406 | #ifndef CONFIG_NUMA |
407 | void __init paging_init(void) | 407 | void __init paging_init(void) |
408 | { | 408 | { |
409 | unsigned long max_zone_pfns[MAX_NR_ZONES] = {MAX_DMA_PFN, | 409 | unsigned long max_zone_pfns[MAX_NR_ZONES]; |
410 | MAX_DMA32_PFN, | 410 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); |
411 | end_pfn}; | 411 | max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN; |
412 | max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN; | ||
413 | max_zone_pfns[ZONE_NORMAL] = end_pfn; | ||
414 | |||
412 | memory_present(0, 0, end_pfn); | 415 | memory_present(0, 0, end_pfn); |
413 | sparse_init(); | 416 | sparse_init(); |
414 | free_area_init_nodes(max_zone_pfns); | 417 | free_area_init_nodes(max_zone_pfns); |
diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c index 829a008bd39b..2ee2e003606c 100644 --- a/arch/x86_64/mm/numa.c +++ b/arch/x86_64/mm/numa.c | |||
@@ -338,9 +338,11 @@ static void __init arch_sparse_init(void) | |||
338 | void __init paging_init(void) | 338 | void __init paging_init(void) |
339 | { | 339 | { |
340 | int i; | 340 | int i; |
341 | unsigned long max_zone_pfns[MAX_NR_ZONES] = { MAX_DMA_PFN, | 341 | unsigned long max_zone_pfns[MAX_NR_ZONES]; |
342 | MAX_DMA32_PFN, | 342 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); |
343 | end_pfn}; | 343 | max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN; |
344 | max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN; | ||
345 | max_zone_pfns[ZONE_NORMAL] = end_pfn; | ||
344 | 346 | ||
345 | arch_sparse_init(); | 347 | arch_sparse_init(); |
346 | 348 | ||