diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-10 10:19:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-10 10:19:52 -0400 |
commit | a1f0bcccffe508b36f8eb0bd39771d4bedc683a8 (patch) | |
tree | e4ca41552b440c9a69d70bacd4d1c26bdc35b694 /arch/microblaze | |
parent | 70eba4226d9718946941c7be0c8cb66d431e7686 (diff) | |
parent | a047775e7eff511a529bf65f3b3e9c11443789b2 (diff) |
Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze
Pull microblaze updates from Michal Simek.
* 'next' of git://git.monstr.eu/linux-2.6-microblaze:
microblaze: Enable IRQ in arch_cpu_idle
microblaze: Fix uaccess_ok macro
microblaze: Add support for new cpu versions and target architecture
microblaze: Do not select OPT_LIB_ASM by default
microblaze: Fix initrd support
microblaze: Do not use r6 in head.S
microblaze: pci: Remove duplicated header
microblaze: Set the default irq_domain
microblaze: pci: Remove duplicated include from pci-common.c
Diffstat (limited to 'arch/microblaze')
-rw-r--r-- | arch/microblaze/configs/mmu_defconfig | 1 | ||||
-rw-r--r-- | arch/microblaze/include/asm/pci.h | 2 | ||||
-rw-r--r-- | arch/microblaze/include/asm/uaccess.h | 30 | ||||
-rw-r--r-- | arch/microblaze/kernel/cpu/cpuinfo.c | 5 | ||||
-rw-r--r-- | arch/microblaze/kernel/head.S | 20 | ||||
-rw-r--r-- | arch/microblaze/kernel/intc.c | 2 | ||||
-rw-r--r-- | arch/microblaze/kernel/process.c | 5 | ||||
-rw-r--r-- | arch/microblaze/mm/init.c | 9 | ||||
-rw-r--r-- | arch/microblaze/pci/pci-common.c | 1 |
9 files changed, 46 insertions, 29 deletions
diff --git a/arch/microblaze/configs/mmu_defconfig b/arch/microblaze/configs/mmu_defconfig index d2b097a652d9..3649a8b150c0 100644 --- a/arch/microblaze/configs/mmu_defconfig +++ b/arch/microblaze/configs/mmu_defconfig | |||
@@ -17,7 +17,6 @@ CONFIG_MODULE_UNLOAD=y | |||
17 | # CONFIG_BLK_DEV_BSG is not set | 17 | # CONFIG_BLK_DEV_BSG is not set |
18 | CONFIG_PARTITION_ADVANCED=y | 18 | CONFIG_PARTITION_ADVANCED=y |
19 | # CONFIG_EFI_PARTITION is not set | 19 | # CONFIG_EFI_PARTITION is not set |
20 | CONFIG_OPT_LIB_ASM=y | ||
21 | CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 | 20 | CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 |
22 | CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1 | 21 | CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1 |
23 | CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1 | 22 | CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1 |
diff --git a/arch/microblaze/include/asm/pci.h b/arch/microblaze/include/asm/pci.h index 41cc841091b0..d52abb6812fa 100644 --- a/arch/microblaze/include/asm/pci.h +++ b/arch/microblaze/include/asm/pci.h | |||
@@ -153,7 +153,5 @@ extern void __init xilinx_pci_init(void); | |||
153 | static inline void __init xilinx_pci_init(void) { return; } | 153 | static inline void __init xilinx_pci_init(void) { return; } |
154 | #endif | 154 | #endif |
155 | 155 | ||
156 | #include <asm-generic/pci-dma-compat.h> | ||
157 | |||
158 | #endif /* __KERNEL__ */ | 156 | #endif /* __KERNEL__ */ |
159 | #endif /* __ASM_MICROBLAZE_PCI_H */ | 157 | #endif /* __ASM_MICROBLAZE_PCI_H */ |
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h index a1ab5f0009ef..efe59d881789 100644 --- a/arch/microblaze/include/asm/uaccess.h +++ b/arch/microblaze/include/asm/uaccess.h | |||
@@ -90,17 +90,25 @@ static inline int ___range_ok(unsigned long addr, unsigned long size) | |||
90 | 90 | ||
91 | #else | 91 | #else |
92 | 92 | ||
93 | /* | 93 | static inline int access_ok(int type, const void __user *addr, |
94 | * Address is valid if: | 94 | unsigned long size) |
95 | * - "addr", "addr + size" and "size" are all below the limit | 95 | { |
96 | */ | 96 | if (!size) |
97 | #define access_ok(type, addr, size) \ | 97 | goto ok; |
98 | (get_fs().seg >= (((unsigned long)(addr)) | \ | 98 | |
99 | (size) | ((unsigned long)(addr) + (size)))) | 99 | if ((get_fs().seg < ((unsigned long)addr)) || |
100 | 100 | (get_fs().seg < ((unsigned long)addr + size - 1))) { | |
101 | /* || printk("access_ok failed for %s at 0x%08lx (size %d), seg 0x%08x\n", | 101 | pr_debug("ACCESS fail: %s at 0x%08x (size 0x%x), seg 0x%08x\n", |
102 | type?"WRITE":"READ",addr,size,get_fs().seg)) */ | 102 | type ? "WRITE" : "READ ", (u32)addr, (u32)size, |
103 | 103 | (u32)get_fs().seg); | |
104 | return 0; | ||
105 | } | ||
106 | ok: | ||
107 | pr_debug("ACCESS OK: %s at 0x%08x (size 0x%x), seg 0x%08x\n", | ||
108 | type ? "WRITE" : "READ ", (u32)addr, (u32)size, | ||
109 | (u32)get_fs().seg); | ||
110 | return 1; | ||
111 | } | ||
104 | #endif | 112 | #endif |
105 | 113 | ||
106 | #ifdef CONFIG_MMU | 114 | #ifdef CONFIG_MMU |
diff --git a/arch/microblaze/kernel/cpu/cpuinfo.c b/arch/microblaze/kernel/cpu/cpuinfo.c index 0b2299bcb948..410398f6db55 100644 --- a/arch/microblaze/kernel/cpu/cpuinfo.c +++ b/arch/microblaze/kernel/cpu/cpuinfo.c | |||
@@ -37,6 +37,8 @@ const struct cpu_ver_key cpu_ver_lookup[] = { | |||
37 | {"8.20.a", 0x15}, | 37 | {"8.20.a", 0x15}, |
38 | {"8.20.b", 0x16}, | 38 | {"8.20.b", 0x16}, |
39 | {"8.30.a", 0x17}, | 39 | {"8.30.a", 0x17}, |
40 | {"8.40.a", 0x18}, | ||
41 | {"8.40.b", 0x19}, | ||
40 | {NULL, 0}, | 42 | {NULL, 0}, |
41 | }; | 43 | }; |
42 | 44 | ||
@@ -57,6 +59,9 @@ const struct family_string_key family_string_lookup[] = { | |||
57 | {"virtex6", 0xe}, | 59 | {"virtex6", 0xe}, |
58 | /* FIXME There is no key code defined for spartan2 */ | 60 | /* FIXME There is no key code defined for spartan2 */ |
59 | {"spartan2", 0xf0}, | 61 | {"spartan2", 0xf0}, |
62 | {"kintex7", 0x10}, | ||
63 | {"artix7", 0x11}, | ||
64 | {"zynq7000", 0x12}, | ||
60 | {NULL, 0}, | 65 | {NULL, 0}, |
61 | }; | 66 | }; |
62 | 67 | ||
diff --git a/arch/microblaze/kernel/head.S b/arch/microblaze/kernel/head.S index eef84de5e8c8..fcc797feb9db 100644 --- a/arch/microblaze/kernel/head.S +++ b/arch/microblaze/kernel/head.S | |||
@@ -112,16 +112,16 @@ no_fdt_arg: | |||
112 | * copy command line directly to cmd_line placed in data section. | 112 | * copy command line directly to cmd_line placed in data section. |
113 | */ | 113 | */ |
114 | beqid r5, skip /* Skip if NULL pointer */ | 114 | beqid r5, skip /* Skip if NULL pointer */ |
115 | or r6, r0, r0 /* incremment */ | 115 | or r11, r0, r0 /* incremment */ |
116 | ori r4, r0, cmd_line /* load address of command line */ | 116 | ori r4, r0, cmd_line /* load address of command line */ |
117 | tophys(r4,r4) /* convert to phys address */ | 117 | tophys(r4,r4) /* convert to phys address */ |
118 | ori r3, r0, COMMAND_LINE_SIZE - 1 /* number of loops */ | 118 | ori r3, r0, COMMAND_LINE_SIZE - 1 /* number of loops */ |
119 | _copy_command_line: | 119 | _copy_command_line: |
120 | /* r2=r5+r6 - r5 contain pointer to command line */ | 120 | /* r2=r5+r6 - r5 contain pointer to command line */ |
121 | lbu r2, r5, r6 | 121 | lbu r2, r5, r11 |
122 | beqid r2, skip /* Skip if no data */ | 122 | beqid r2, skip /* Skip if no data */ |
123 | sb r2, r4, r6 /* addr[r4+r6]= r2*/ | 123 | sb r2, r4, r11 /* addr[r4+r6]= r2 */ |
124 | addik r6, r6, 1 /* increment counting */ | 124 | addik r11, r11, 1 /* increment counting */ |
125 | bgtid r3, _copy_command_line /* loop for all entries */ | 125 | bgtid r3, _copy_command_line /* loop for all entries */ |
126 | addik r3, r3, -1 /* decrement loop */ | 126 | addik r3, r3, -1 /* decrement loop */ |
127 | addik r5, r4, 0 /* add new space for command line */ | 127 | addik r5, r4, 0 /* add new space for command line */ |
@@ -131,13 +131,13 @@ skip: | |||
131 | 131 | ||
132 | #ifdef NOT_COMPILE | 132 | #ifdef NOT_COMPILE |
133 | /* save bram context */ | 133 | /* save bram context */ |
134 | or r6, r0, r0 /* incremment */ | 134 | or r11, r0, r0 /* incremment */ |
135 | ori r4, r0, TOPHYS(_bram_load_start) /* save bram context */ | 135 | ori r4, r0, TOPHYS(_bram_load_start) /* save bram context */ |
136 | ori r3, r0, (LMB_SIZE - 4) | 136 | ori r3, r0, (LMB_SIZE - 4) |
137 | _copy_bram: | 137 | _copy_bram: |
138 | lw r7, r0, r6 /* r7 = r0 + r6 */ | 138 | lw r7, r0, r11 /* r7 = r0 + r6 */ |
139 | sw r7, r4, r6 /* addr[r4 + r6] = r7*/ | 139 | sw r7, r4, r11 /* addr[r4 + r6] = r7 */ |
140 | addik r6, r6, 4 /* increment counting */ | 140 | addik r11, r11, 4 /* increment counting */ |
141 | bgtid r3, _copy_bram /* loop for all entries */ | 141 | bgtid r3, _copy_bram /* loop for all entries */ |
142 | addik r3, r3, -4 /* descrement loop */ | 142 | addik r3, r3, -4 /* descrement loop */ |
143 | #endif | 143 | #endif |
@@ -303,8 +303,8 @@ jump_over2: | |||
303 | * the exception vectors, using a 4k real==virtual mapping. | 303 | * the exception vectors, using a 4k real==virtual mapping. |
304 | */ | 304 | */ |
305 | /* Use temporary TLB_ID for LMB - clear this temporary mapping later */ | 305 | /* Use temporary TLB_ID for LMB - clear this temporary mapping later */ |
306 | ori r6, r0, MICROBLAZE_LMB_TLB_ID | 306 | ori r11, r0, MICROBLAZE_LMB_TLB_ID |
307 | mts rtlbx,r6 | 307 | mts rtlbx,r11 |
308 | 308 | ||
309 | ori r4,r0,(TLB_WR | TLB_EX) | 309 | ori r4,r0,(TLB_WR | TLB_EX) |
310 | ori r3,r0,(TLB_VALID | TLB_PAGESZ(PAGESZ_4K)) | 310 | ori r3,r0,(TLB_VALID | TLB_PAGESZ(PAGESZ_4K)) |
diff --git a/arch/microblaze/kernel/intc.c b/arch/microblaze/kernel/intc.c index 8778adf72bd3..d85fa3a2b0f8 100644 --- a/arch/microblaze/kernel/intc.c +++ b/arch/microblaze/kernel/intc.c | |||
@@ -172,4 +172,6 @@ void __init init_IRQ(void) | |||
172 | * and commits this patch. ~~gcl */ | 172 | * and commits this patch. ~~gcl */ |
173 | root_domain = irq_domain_add_linear(intc, nr_irq, &xintc_irq_domain_ops, | 173 | root_domain = irq_domain_add_linear(intc, nr_irq, &xintc_irq_domain_ops, |
174 | (void *)intr_mask); | 174 | (void *)intr_mask); |
175 | |||
176 | irq_set_default_host(root_domain); | ||
175 | } | 177 | } |
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c index a55893807274..7d1a9c8b1f3d 100644 --- a/arch/microblaze/kernel/process.c +++ b/arch/microblaze/kernel/process.c | |||
@@ -160,3 +160,8 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpregs) | |||
160 | return 0; /* MicroBlaze has no separate FPU registers */ | 160 | return 0; /* MicroBlaze has no separate FPU registers */ |
161 | } | 161 | } |
162 | #endif /* CONFIG_MMU */ | 162 | #endif /* CONFIG_MMU */ |
163 | |||
164 | void arch_cpu_idle(void) | ||
165 | { | ||
166 | local_irq_enable(); | ||
167 | } | ||
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index 4ec137d13ad7..b38ae3acfeb4 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c | |||
@@ -404,10 +404,11 @@ asmlinkage void __init mmu_init(void) | |||
404 | 404 | ||
405 | #if defined(CONFIG_BLK_DEV_INITRD) | 405 | #if defined(CONFIG_BLK_DEV_INITRD) |
406 | /* Remove the init RAM disk from the available memory. */ | 406 | /* Remove the init RAM disk from the available memory. */ |
407 | /* if (initrd_start) { | 407 | if (initrd_start) { |
408 | mem_pieces_remove(&phys_avail, __pa(initrd_start), | 408 | unsigned long size; |
409 | initrd_end - initrd_start, 1); | 409 | size = initrd_end - initrd_start; |
410 | }*/ | 410 | memblock_reserve(virt_to_phys(initrd_start), size); |
411 | } | ||
411 | #endif /* CONFIG_BLK_DEV_INITRD */ | 412 | #endif /* CONFIG_BLK_DEV_INITRD */ |
412 | 413 | ||
413 | /* Initialize the MMU hardware */ | 414 | /* Initialize the MMU hardware */ |
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index 9ea521e4959e..bdb8ea100e73 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/of.h> | 30 | #include <linux/of.h> |
31 | #include <linux/of_address.h> | 31 | #include <linux/of_address.h> |
32 | #include <linux/of_pci.h> | 32 | #include <linux/of_pci.h> |
33 | #include <linux/pci.h> | ||
34 | #include <linux/export.h> | 33 | #include <linux/export.h> |
35 | 34 | ||
36 | #include <asm/processor.h> | 35 | #include <asm/processor.h> |