aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 03:11:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 03:11:46 -0400
commit1ea4f4f8405cc1ceec23f2d261bc3775785e6712 (patch)
treea43ced12b9acf357623088d479fa69f3f00d2997 /arch/xtensa/kernel
parentdea77ccdc93448d81e495a57bc1c1e97be4fdfe8 (diff)
parent70cefe765433529fc894fd1995a1d5883cb33e05 (diff)
Merge tag 'xtensa-next-20121008' of git://github.com/czankel/xtensa-linux
Pull Xtensa patchset from Chris Zankel: "The Xtensa tree has been broken for some time now, and this patchset brings it back to life. It has been part of the linux-next tree for some time. Most changes are inside the xtensa subdirectory; the other changes mostly add another rule to already existing #ifdefs to exclude Xtensa, where required. The only 'common' change is to add two more sections ('.xt.prop' and '.xt.lit') to the white list in modpost." * tag 'xtensa-next-20121008' of git://github.com/czankel/xtensa-linux: (27 commits) xtensa: Setup CROSS_COMPILE at the top xtensa: drop CONFIG_EMBEDDED_RAMDISK xtensa: fix TIOCGSERIAL and TIOCSSERIAL definitions xtensa: provide dummy gcc intrinsics xtensa: add missing symbol exports parport: disable for xtensa arch xtensa: rename MISC SR definition to avoid name clashes hisax: disable build for big-endian xtensa xtensa: fix CODA build xtensa: fix parallel make xtensa: ISS: drop unused io.c xtensa: ISS: exit simulator in case of halt or poweroff xtensa: ISS: change keyboard polling rate xtensa: ISS: add platform_pcibios_init xtensa: ISS: add dummy serial.h for ISS platform xtensa: change default platform clock frequency to 10MHz xtensa: add ARCH_WANT_OPTIONAL_GPIOLIB to xtensa config xtensa: set NO_IOPORT to 'n' by default xtensa: adopt generic io routines xtensa: fix ioremap ...
Diffstat (limited to 'arch/xtensa/kernel')
-rw-r--r--arch/xtensa/kernel/Makefile3
-rw-r--r--arch/xtensa/kernel/io.c75
-rw-r--r--arch/xtensa/kernel/irq.c4
-rw-r--r--arch/xtensa/kernel/pci-dma.c4
-rw-r--r--arch/xtensa/kernel/pci.c2
-rw-r--r--arch/xtensa/kernel/platform.c4
-rw-r--r--arch/xtensa/kernel/setup.c12
-rw-r--r--arch/xtensa/kernel/vmlinux.lds.S5
-rw-r--r--arch/xtensa/kernel/xtensa_ksyms.c25
9 files changed, 36 insertions, 98 deletions
diff --git a/arch/xtensa/kernel/Makefile b/arch/xtensa/kernel/Makefile
index 59fc3fe15572..f36cef5a62ff 100644
--- a/arch/xtensa/kernel/Makefile
+++ b/arch/xtensa/kernel/Makefile
@@ -6,7 +6,7 @@ extra-y := head.o vmlinux.lds
6 6
7obj-y := align.o entry.o irq.o coprocessor.o process.o ptrace.o \ 7obj-y := align.o entry.o irq.o coprocessor.o process.o ptrace.o \
8 setup.o signal.o syscall.o time.o traps.o vectors.o platform.o \ 8 setup.o signal.o syscall.o time.o traps.o vectors.o platform.o \
9 pci-dma.o io.o 9 pci-dma.o
10 10
11obj-$(CONFIG_KGDB) += xtensa-stub.o 11obj-$(CONFIG_KGDB) += xtensa-stub.o
12obj-$(CONFIG_PCI) += pci.o 12obj-$(CONFIG_PCI) += pci.o
@@ -24,6 +24,7 @@ obj-$(CONFIG_MODULES) += xtensa_ksyms.o module.o
24# Replicate rules in scripts/Makefile.build 24# Replicate rules in scripts/Makefile.build
25 25
26sed-y = -e 's/\*(\(\.[a-z]*it\|\.ref\|\)\.text)/*(\1.literal \1.text)/g' \ 26sed-y = -e 's/\*(\(\.[a-z]*it\|\.ref\|\)\.text)/*(\1.literal \1.text)/g' \
27 -e 's/\.text\.unlikely/.literal.unlikely .text.unlikely/g' \
27 -e 's/\*(\(\.text\.[a-z]*\))/*(\1.literal \1)/g' 28 -e 's/\*(\(\.text\.[a-z]*\))/*(\1.literal \1)/g'
28 29
29quiet_cmd__cpp_lds_S = LDS $@ 30quiet_cmd__cpp_lds_S = LDS $@
diff --git a/arch/xtensa/kernel/io.c b/arch/xtensa/kernel/io.c
deleted file mode 100644
index 5b65269b1d2f..000000000000
--- a/arch/xtensa/kernel/io.c
+++ /dev/null
@@ -1,75 +0,0 @@
1/*
2 * arch/xtensa/io.c
3 *
4 * IO primitives
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 * Copied from sparc.
12 *
13 * Chris Zankel <chris@zankel.net>
14 *
15 */
16
17#include <asm/io.h>
18#include <asm/byteorder.h>
19
20void outsb(unsigned long addr, const void *src, unsigned long count) {
21 while (count) {
22 count -= 1;
23 writeb(*(const char *)src, addr);
24 src += 1;
25 addr += 1;
26 }
27}
28
29void outsw(unsigned long addr, const void *src, unsigned long count) {
30 while (count) {
31 count -= 2;
32 writew(*(const short *)src, addr);
33 src += 2;
34 addr += 2;
35 }
36}
37
38void outsl(unsigned long addr, const void *src, unsigned long count) {
39 while (count) {
40 count -= 4;
41 writel(*(const long *)src, addr);
42 src += 4;
43 addr += 4;
44 }
45}
46
47void insb(unsigned long addr, void *dst, unsigned long count) {
48 while (count) {
49 count -= 1;
50 *(unsigned char *)dst = readb(addr);
51 dst += 1;
52 addr += 1;
53 }
54}
55
56void insw(unsigned long addr, void *dst, unsigned long count) {
57 while (count) {
58 count -= 2;
59 *(unsigned short *)dst = readw(addr);
60 dst += 2;
61 addr += 2;
62 }
63}
64
65void insl(unsigned long addr, void *dst, unsigned long count) {
66 while (count) {
67 count -= 4;
68 /*
69 * XXX I am sure we are in for an unaligned trap here.
70 */
71 *(unsigned long *)dst = readl(addr);
72 dst += 4;
73 addr += 4;
74 }
75}
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c
index 4340ee076bd5..98e77c3ef1c3 100644
--- a/arch/xtensa/kernel/irq.c
+++ b/arch/xtensa/kernel/irq.c
@@ -84,12 +84,12 @@ static void xtensa_irq_unmask(struct irq_data *d)
84static void xtensa_irq_enable(struct irq_data *d) 84static void xtensa_irq_enable(struct irq_data *d)
85{ 85{
86 variant_irq_enable(d->irq); 86 variant_irq_enable(d->irq);
87 xtensa_irq_unmask(d->irq); 87 xtensa_irq_unmask(d);
88} 88}
89 89
90static void xtensa_irq_disable(struct irq_data *d) 90static void xtensa_irq_disable(struct irq_data *d)
91{ 91{
92 xtensa_irq_mask(d->irq); 92 xtensa_irq_mask(d);
93 variant_irq_disable(d->irq); 93 variant_irq_disable(d->irq);
94} 94}
95 95
diff --git a/arch/xtensa/kernel/pci-dma.c b/arch/xtensa/kernel/pci-dma.c
index 2783fda76ddc..2d9cc6dbfd78 100644
--- a/arch/xtensa/kernel/pci-dma.c
+++ b/arch/xtensa/kernel/pci-dma.c
@@ -21,6 +21,7 @@
21#include <linux/string.h> 21#include <linux/string.h>
22#include <linux/pci.h> 22#include <linux/pci.h>
23#include <linux/gfp.h> 23#include <linux/gfp.h>
24#include <linux/module.h>
24#include <asm/io.h> 25#include <asm/io.h>
25#include <asm/cacheflush.h> 26#include <asm/cacheflush.h>
26 27
@@ -62,6 +63,7 @@ dma_alloc_coherent(struct device *dev,size_t size,dma_addr_t *handle,gfp_t flag)
62 63
63 return (void*)uncached; 64 return (void*)uncached;
64} 65}
66EXPORT_SYMBOL(dma_alloc_coherent);
65 67
66void dma_free_coherent(struct device *hwdev, size_t size, 68void dma_free_coherent(struct device *hwdev, size_t size,
67 void *vaddr, dma_addr_t dma_handle) 69 void *vaddr, dma_addr_t dma_handle)
@@ -73,6 +75,7 @@ void dma_free_coherent(struct device *hwdev, size_t size,
73 75
74 free_pages(addr, get_order(size)); 76 free_pages(addr, get_order(size));
75} 77}
78EXPORT_SYMBOL(dma_free_coherent);
76 79
77 80
78void consistent_sync(void *vaddr, size_t size, int direction) 81void consistent_sync(void *vaddr, size_t size, int direction)
@@ -92,3 +95,4 @@ void consistent_sync(void *vaddr, size_t size, int direction)
92 break; 95 break;
93 } 96 }
94} 97}
98EXPORT_SYMBOL(consistent_sync);
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c
index 54354de38a70..126c18839409 100644
--- a/arch/xtensa/kernel/pci.c
+++ b/arch/xtensa/kernel/pci.c
@@ -333,7 +333,7 @@ __pci_mmap_set_pgprot(struct pci_dev *dev, struct vm_area_struct *vma,
333 int prot = pgprot_val(vma->vm_page_prot); 333 int prot = pgprot_val(vma->vm_page_prot);
334 334
335 /* Set to write-through */ 335 /* Set to write-through */
336 prot &= ~_PAGE_NO_CACHE; 336 prot = (prot & _PAGE_CA_MASK) | _PAGE_CA_WT;
337#if 0 337#if 0
338 if (!write_combine) 338 if (!write_combine)
339 prot |= _PAGE_WRITETHRU; 339 prot |= _PAGE_WRITETHRU;
diff --git a/arch/xtensa/kernel/platform.c b/arch/xtensa/kernel/platform.c
index 1b91a97f1d84..97230e46cbe7 100644
--- a/arch/xtensa/kernel/platform.c
+++ b/arch/xtensa/kernel/platform.c
@@ -40,8 +40,8 @@ _F(int, pcibios_fixup, (void), { return 0; });
40#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT 40#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
41_F(void, calibrate_ccount, (void), 41_F(void, calibrate_ccount, (void),
42{ 42{
43 printk ("ERROR: Cannot calibrate cpu frequency! Assuming 100MHz.\n"); 43 pr_err("ERROR: Cannot calibrate cpu frequency! Assuming 10MHz.\n");
44 ccount_per_jiffy = 100 * (1000000UL/HZ); 44 ccount_per_jiffy = 10 * (1000000UL/HZ);
45}); 45});
46#endif 46#endif
47 47
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index 17e746f7be60..270360d9806c 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -60,8 +60,6 @@ struct rtc_ops *rtc_ops;
60#ifdef CONFIG_BLK_DEV_INITRD 60#ifdef CONFIG_BLK_DEV_INITRD
61extern void *initrd_start; 61extern void *initrd_start;
62extern void *initrd_end; 62extern void *initrd_end;
63extern void *__initrd_start;
64extern void *__initrd_end;
65int initrd_is_mapped = 0; 63int initrd_is_mapped = 0;
66extern int initrd_below_start_ok; 64extern int initrd_below_start_ok;
67#endif 65#endif
@@ -79,10 +77,6 @@ static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE;
79 77
80sysmem_info_t __initdata sysmem; 78sysmem_info_t __initdata sysmem;
81 79
82#ifdef CONFIG_BLK_DEV_INITRD
83int initrd_is_mapped;
84#endif
85
86#ifdef CONFIG_MMU 80#ifdef CONFIG_MMU
87extern void init_mmu(void); 81extern void init_mmu(void);
88#else 82#else
@@ -197,12 +191,6 @@ static int __init parse_bootparam(const bp_tag_t* tag)
197 191
198void __init init_arch(bp_tag_t *bp_start) 192void __init init_arch(bp_tag_t *bp_start)
199{ 193{
200
201#ifdef CONFIG_BLK_DEV_INITRD
202 initrd_start = &__initrd_start;
203 initrd_end = &__initrd_end;
204#endif
205
206 sysmem.nr_banks = 0; 194 sysmem.nr_banks = 0;
207 195
208#ifdef CONFIG_CMDLINE_BOOL 196#ifdef CONFIG_CMDLINE_BOOL
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S
index ee2e2089483d..255154f820b7 100644
--- a/arch/xtensa/kernel/vmlinux.lds.S
+++ b/arch/xtensa/kernel/vmlinux.lds.S
@@ -222,11 +222,6 @@ SECTIONS
222 . = ALIGN(0x10); 222 . = ALIGN(0x10);
223 .bootstrap : { *(.bootstrap.literal .bootstrap.text .bootstrap.data) } 223 .bootstrap : { *(.bootstrap.literal .bootstrap.text .bootstrap.data) }
224 224
225 . = ALIGN(0x1000);
226 __initrd_start = .;
227 .initrd : { *(.initrd) }
228 __initrd_end = .;
229
230 .ResetVector.text XCHAL_RESET_VECTOR_VADDR : 225 .ResetVector.text XCHAL_RESET_VECTOR_VADDR :
231 { 226 {
232 *(.ResetVector.text) 227 *(.ResetVector.text)
diff --git a/arch/xtensa/kernel/xtensa_ksyms.c b/arch/xtensa/kernel/xtensa_ksyms.c
index c9a7c5b74a0d..a8b9f1fd1e17 100644
--- a/arch/xtensa/kernel/xtensa_ksyms.c
+++ b/arch/xtensa/kernel/xtensa_ksyms.c
@@ -39,8 +39,12 @@
39EXPORT_SYMBOL(memset); 39EXPORT_SYMBOL(memset);
40EXPORT_SYMBOL(memcpy); 40EXPORT_SYMBOL(memcpy);
41EXPORT_SYMBOL(memmove); 41EXPORT_SYMBOL(memmove);
42EXPORT_SYMBOL(__strncpy_user);
43EXPORT_SYMBOL(clear_page);
44EXPORT_SYMBOL(copy_page);
42 45
43EXPORT_SYMBOL(kernel_thread); 46EXPORT_SYMBOL(kernel_thread);
47EXPORT_SYMBOL(empty_zero_page);
44 48
45/* 49/*
46 * gcc internal math functions 50 * gcc internal math functions
@@ -56,6 +60,7 @@ extern unsigned int __udivsi3(unsigned int, unsigned int);
56extern unsigned int __umodsi3(unsigned int, unsigned int); 60extern unsigned int __umodsi3(unsigned int, unsigned int);
57extern unsigned long long __umoddi3(unsigned long long, unsigned long long); 61extern unsigned long long __umoddi3(unsigned long long, unsigned long long);
58extern unsigned long long __udivdi3(unsigned long long, unsigned long long); 62extern unsigned long long __udivdi3(unsigned long long, unsigned long long);
63extern int __ucmpdi2(int, int);
59 64
60EXPORT_SYMBOL(__ashldi3); 65EXPORT_SYMBOL(__ashldi3);
61EXPORT_SYMBOL(__ashrdi3); 66EXPORT_SYMBOL(__ashrdi3);
@@ -68,11 +73,31 @@ EXPORT_SYMBOL(__udivsi3);
68EXPORT_SYMBOL(__umodsi3); 73EXPORT_SYMBOL(__umodsi3);
69EXPORT_SYMBOL(__udivdi3); 74EXPORT_SYMBOL(__udivdi3);
70EXPORT_SYMBOL(__umoddi3); 75EXPORT_SYMBOL(__umoddi3);
76EXPORT_SYMBOL(__ucmpdi2);
77
78void __xtensa_libgcc_window_spill(void)
79{
80 BUG();
81}
82EXPORT_SYMBOL(__xtensa_libgcc_window_spill);
83
84unsigned long __sync_fetch_and_and_4(unsigned long *p, unsigned long v)
85{
86 BUG();
87}
88EXPORT_SYMBOL(__sync_fetch_and_and_4);
89
90unsigned long __sync_fetch_and_or_4(unsigned long *p, unsigned long v)
91{
92 BUG();
93}
94EXPORT_SYMBOL(__sync_fetch_and_or_4);
71 95
72#ifdef CONFIG_NET 96#ifdef CONFIG_NET
73/* 97/*
74 * Networking support 98 * Networking support
75 */ 99 */
100EXPORT_SYMBOL(csum_partial);
76EXPORT_SYMBOL(csum_partial_copy_generic); 101EXPORT_SYMBOL(csum_partial_copy_generic);
77#endif /* CONFIG_NET */ 102#endif /* CONFIG_NET */
78 103