diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 20:37:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 20:37:49 -0500 |
commit | 4690dfa8cd66c37fbe99bb8cd5baa86102110776 (patch) | |
tree | 063d1f68298cab19d29a4aa689d755266ae85a7d /arch/microblaze | |
parent | c2e08e7ce5ab25a781197a71c5241742e8c9fdfe (diff) | |
parent | f3aef2510e2bb28cdbf32e5f3b8f04f03336ac81 (diff) |
Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze
* 'next' of git://git.monstr.eu/linux-2.6-microblaze:
microblaze: Wire-up new system calls
microblaze: Remove NO_IRQ from architecture
input: xilinx_ps2: Don't use NO_IRQ
block: xsysace: Don't use NO_IRQ
microblaze: Trivial asm fix
microblaze: Fix debug message in module
microblaze: Remove eprintk macro
microblaze: Send CR before LF for early console
microblaze: Change NO_IRQ to 0
microblaze: Use irq_of_parse_and_map for timer
microblaze: intc: Change variable name
microblaze: Use of_find_compatible_node for timer and intc
microblaze: Add __cmpdi2
microblaze: Synchronize __pa __va macros
Diffstat (limited to 'arch/microblaze')
-rw-r--r-- | arch/microblaze/include/asm/irq.h | 11 | ||||
-rw-r--r-- | arch/microblaze/include/asm/page.h | 11 | ||||
-rw-r--r-- | arch/microblaze/include/asm/setup.h | 6 | ||||
-rw-r--r-- | arch/microblaze/include/asm/unistd.h | 5 | ||||
-rw-r--r-- | arch/microblaze/kernel/early_printk.c | 4 | ||||
-rw-r--r-- | arch/microblaze/kernel/entry.S | 2 | ||||
-rw-r--r-- | arch/microblaze/kernel/intc.c | 52 | ||||
-rw-r--r-- | arch/microblaze/kernel/irq.c | 11 | ||||
-rw-r--r-- | arch/microblaze/kernel/module.c | 2 | ||||
-rw-r--r-- | arch/microblaze/kernel/setup.c | 18 | ||||
-rw-r--r-- | arch/microblaze/kernel/syscall_table.S | 3 | ||||
-rw-r--r-- | arch/microblaze/kernel/timer.c | 21 | ||||
-rw-r--r-- | arch/microblaze/lib/Makefile | 1 | ||||
-rw-r--r-- | arch/microblaze/lib/cmpdi2.c | 26 | ||||
-rw-r--r-- | arch/microblaze/pci/pci-common.c | 4 |
15 files changed, 93 insertions, 84 deletions
diff --git a/arch/microblaze/include/asm/irq.h b/arch/microblaze/include/asm/irq.h index cc54187f3d38..a175132e4496 100644 --- a/arch/microblaze/include/asm/irq.h +++ b/arch/microblaze/include/asm/irq.h | |||
@@ -9,7 +9,14 @@ | |||
9 | #ifndef _ASM_MICROBLAZE_IRQ_H | 9 | #ifndef _ASM_MICROBLAZE_IRQ_H |
10 | #define _ASM_MICROBLAZE_IRQ_H | 10 | #define _ASM_MICROBLAZE_IRQ_H |
11 | 11 | ||
12 | #define NR_IRQS 32 | 12 | |
13 | /* | ||
14 | * Linux IRQ# is currently offset by one to map to the hardware | ||
15 | * irq number. So hardware IRQ0 maps to Linux irq 1. | ||
16 | */ | ||
17 | #define NO_IRQ_OFFSET 1 | ||
18 | #define IRQ_OFFSET NO_IRQ_OFFSET | ||
19 | #define NR_IRQS (32 + IRQ_OFFSET) | ||
13 | #include <asm-generic/irq.h> | 20 | #include <asm-generic/irq.h> |
14 | 21 | ||
15 | /* This type is the placeholder for a hardware interrupt number. It has to | 22 | /* This type is the placeholder for a hardware interrupt number. It has to |
@@ -20,8 +27,6 @@ typedef unsigned long irq_hw_number_t; | |||
20 | 27 | ||
21 | extern unsigned int nr_irq; | 28 | extern unsigned int nr_irq; |
22 | 29 | ||
23 | #define NO_IRQ (-1) | ||
24 | |||
25 | struct pt_regs; | 30 | struct pt_regs; |
26 | extern void do_IRQ(struct pt_regs *regs); | 31 | extern void do_IRQ(struct pt_regs *regs); |
27 | 32 | ||
diff --git a/arch/microblaze/include/asm/page.h b/arch/microblaze/include/asm/page.h index ed9d0f6e2cdb..a25e6b5e2ad4 100644 --- a/arch/microblaze/include/asm/page.h +++ b/arch/microblaze/include/asm/page.h | |||
@@ -174,15 +174,8 @@ extern int page_is_ram(unsigned long pfn); | |||
174 | 174 | ||
175 | #define virt_addr_valid(vaddr) (pfn_valid(virt_to_pfn(vaddr))) | 175 | #define virt_addr_valid(vaddr) (pfn_valid(virt_to_pfn(vaddr))) |
176 | 176 | ||
177 | 177 | # define __pa(x) __virt_to_phys((unsigned long)(x)) | |
178 | # ifndef CONFIG_MMU | 178 | # define __va(x) ((void *)__phys_to_virt((unsigned long)(x))) |
179 | # define __pa(vaddr) ((unsigned long) (vaddr)) | ||
180 | # define __va(paddr) ((void *) (paddr)) | ||
181 | # else /* CONFIG_MMU */ | ||
182 | # define __pa(x) __virt_to_phys((unsigned long)(x)) | ||
183 | # define __va(x) ((void *)__phys_to_virt((unsigned long)(x))) | ||
184 | # endif /* CONFIG_MMU */ | ||
185 | |||
186 | 179 | ||
187 | /* Convert between virtual and physical address for MMU. */ | 180 | /* Convert between virtual and physical address for MMU. */ |
188 | /* Handle MicroBlaze processor with virtual memory. */ | 181 | /* Handle MicroBlaze processor with virtual memory. */ |
diff --git a/arch/microblaze/include/asm/setup.h b/arch/microblaze/include/asm/setup.h index 904e5ef6a11b..6c72ed7eba98 100644 --- a/arch/microblaze/include/asm/setup.h +++ b/arch/microblaze/include/asm/setup.h | |||
@@ -26,12 +26,6 @@ int setup_early_printk(char *opt); | |||
26 | void remap_early_printk(void); | 26 | void remap_early_printk(void); |
27 | void disable_early_printk(void); | 27 | void disable_early_printk(void); |
28 | 28 | ||
29 | #if defined(CONFIG_EARLY_PRINTK) | ||
30 | #define eprintk early_printk | ||
31 | #else | ||
32 | #define eprintk printk | ||
33 | #endif | ||
34 | |||
35 | void heartbeat(void); | 29 | void heartbeat(void); |
36 | void setup_heartbeat(void); | 30 | void setup_heartbeat(void); |
37 | 31 | ||
diff --git a/arch/microblaze/include/asm/unistd.h b/arch/microblaze/include/asm/unistd.h index 7d7092b917ac..d20ffbc86beb 100644 --- a/arch/microblaze/include/asm/unistd.h +++ b/arch/microblaze/include/asm/unistd.h | |||
@@ -391,8 +391,11 @@ | |||
391 | #define __NR_clock_adjtime 373 | 391 | #define __NR_clock_adjtime 373 |
392 | #define __NR_syncfs 374 | 392 | #define __NR_syncfs 374 |
393 | #define __NR_setns 375 | 393 | #define __NR_setns 375 |
394 | #define __NR_sendmmsg 376 | ||
395 | #define __NR_process_vm_readv 377 | ||
396 | #define __NR_process_vm_writev 378 | ||
394 | 397 | ||
395 | #define __NR_syscalls 376 | 398 | #define __NR_syscalls 379 |
396 | 399 | ||
397 | #ifdef __KERNEL__ | 400 | #ifdef __KERNEL__ |
398 | #ifndef __ASSEMBLY__ | 401 | #ifndef __ASSEMBLY__ |
diff --git a/arch/microblaze/kernel/early_printk.c b/arch/microblaze/kernel/early_printk.c index d26d92d47754..8356e47631c4 100644 --- a/arch/microblaze/kernel/early_printk.c +++ b/arch/microblaze/kernel/early_printk.c | |||
@@ -50,9 +50,9 @@ static void early_printk_uartlite_write(struct console *unused, | |||
50 | const char *s, unsigned n) | 50 | const char *s, unsigned n) |
51 | { | 51 | { |
52 | while (*s && n-- > 0) { | 52 | while (*s && n-- > 0) { |
53 | early_printk_uartlite_putc(*s); | ||
54 | if (*s == '\n') | 53 | if (*s == '\n') |
55 | early_printk_uartlite_putc('\r'); | 54 | early_printk_uartlite_putc('\r'); |
55 | early_printk_uartlite_putc(*s); | ||
56 | s++; | 56 | s++; |
57 | } | 57 | } |
58 | } | 58 | } |
@@ -94,9 +94,9 @@ static void early_printk_uart16550_write(struct console *unused, | |||
94 | const char *s, unsigned n) | 94 | const char *s, unsigned n) |
95 | { | 95 | { |
96 | while (*s && n-- > 0) { | 96 | while (*s && n-- > 0) { |
97 | early_printk_uart16550_putc(*s); | ||
98 | if (*s == '\n') | 97 | if (*s == '\n') |
99 | early_printk_uart16550_putc('\r'); | 98 | early_printk_uart16550_putc('\r'); |
99 | early_printk_uart16550_putc(*s); | ||
100 | s++; | 100 | s++; |
101 | } | 101 | } |
102 | } | 102 | } |
diff --git a/arch/microblaze/kernel/entry.S b/arch/microblaze/kernel/entry.S index ca15bc5c7449..66e34a3bfe1b 100644 --- a/arch/microblaze/kernel/entry.S +++ b/arch/microblaze/kernel/entry.S | |||
@@ -468,7 +468,7 @@ C_ENTRY(sys_fork_wrapper): | |||
468 | addi r5, r0, SIGCHLD /* Arg 0: flags */ | 468 | addi r5, r0, SIGCHLD /* Arg 0: flags */ |
469 | lwi r6, r1, PT_R1 /* Arg 1: child SP (use parent's) */ | 469 | lwi r6, r1, PT_R1 /* Arg 1: child SP (use parent's) */ |
470 | addik r7, r1, 0 /* Arg 2: parent context */ | 470 | addik r7, r1, 0 /* Arg 2: parent context */ |
471 | add r8. r0, r0 /* Arg 3: (unused) */ | 471 | add r8, r0, r0 /* Arg 3: (unused) */ |
472 | add r9, r0, r0; /* Arg 4: (unused) */ | 472 | add r9, r0, r0; /* Arg 4: (unused) */ |
473 | brid do_fork /* Do real work (tail-call) */ | 473 | brid do_fork /* Do real work (tail-call) */ |
474 | add r10, r0, r0; /* Arg 5: (unused) */ | 474 | add r10, r0, r0; /* Arg 5: (unused) */ |
diff --git a/arch/microblaze/kernel/intc.c b/arch/microblaze/kernel/intc.c index eb41441c7fd0..44b177e2ab12 100644 --- a/arch/microblaze/kernel/intc.c +++ b/arch/microblaze/kernel/intc.c | |||
@@ -42,8 +42,9 @@ unsigned int nr_irq; | |||
42 | 42 | ||
43 | static void intc_enable_or_unmask(struct irq_data *d) | 43 | static void intc_enable_or_unmask(struct irq_data *d) |
44 | { | 44 | { |
45 | unsigned long mask = 1 << d->irq; | 45 | unsigned long mask = 1 << d->hwirq; |
46 | pr_debug("enable_or_unmask: %d\n", d->irq); | 46 | |
47 | pr_debug("enable_or_unmask: %ld\n", d->hwirq); | ||
47 | out_be32(INTC_BASE + SIE, mask); | 48 | out_be32(INTC_BASE + SIE, mask); |
48 | 49 | ||
49 | /* ack level irqs because they can't be acked during | 50 | /* ack level irqs because they can't be acked during |
@@ -56,20 +57,21 @@ static void intc_enable_or_unmask(struct irq_data *d) | |||
56 | 57 | ||
57 | static void intc_disable_or_mask(struct irq_data *d) | 58 | static void intc_disable_or_mask(struct irq_data *d) |
58 | { | 59 | { |
59 | pr_debug("disable: %d\n", d->irq); | 60 | pr_debug("disable: %ld\n", d->hwirq); |
60 | out_be32(INTC_BASE + CIE, 1 << d->irq); | 61 | out_be32(INTC_BASE + CIE, 1 << d->hwirq); |
61 | } | 62 | } |
62 | 63 | ||
63 | static void intc_ack(struct irq_data *d) | 64 | static void intc_ack(struct irq_data *d) |
64 | { | 65 | { |
65 | pr_debug("ack: %d\n", d->irq); | 66 | pr_debug("ack: %ld\n", d->hwirq); |
66 | out_be32(INTC_BASE + IAR, 1 << d->irq); | 67 | out_be32(INTC_BASE + IAR, 1 << d->hwirq); |
67 | } | 68 | } |
68 | 69 | ||
69 | static void intc_mask_ack(struct irq_data *d) | 70 | static void intc_mask_ack(struct irq_data *d) |
70 | { | 71 | { |
71 | unsigned long mask = 1 << d->irq; | 72 | unsigned long mask = 1 << d->hwirq; |
72 | pr_debug("disable_and_ack: %d\n", d->irq); | 73 | |
74 | pr_debug("disable_and_ack: %ld\n", d->hwirq); | ||
73 | out_be32(INTC_BASE + CIE, mask); | 75 | out_be32(INTC_BASE + CIE, mask); |
74 | out_be32(INTC_BASE + IAR, mask); | 76 | out_be32(INTC_BASE + IAR, mask); |
75 | } | 77 | } |
@@ -91,7 +93,7 @@ unsigned int get_irq(struct pt_regs *regs) | |||
91 | * order to handle multiple interrupt controllers. It currently | 93 | * order to handle multiple interrupt controllers. It currently |
92 | * is hardcoded to check for interrupts only on the first INTC. | 94 | * is hardcoded to check for interrupts only on the first INTC. |
93 | */ | 95 | */ |
94 | irq = in_be32(INTC_BASE + IVR); | 96 | irq = in_be32(INTC_BASE + IVR) + NO_IRQ_OFFSET; |
95 | pr_debug("get_irq: %d\n", irq); | 97 | pr_debug("get_irq: %d\n", irq); |
96 | 98 | ||
97 | return irq; | 99 | return irq; |
@@ -99,7 +101,7 @@ unsigned int get_irq(struct pt_regs *regs) | |||
99 | 101 | ||
100 | void __init init_IRQ(void) | 102 | void __init init_IRQ(void) |
101 | { | 103 | { |
102 | u32 i, j, intr_type; | 104 | u32 i, intr_mask; |
103 | struct device_node *intc = NULL; | 105 | struct device_node *intc = NULL; |
104 | #ifdef CONFIG_SELFMOD_INTC | 106 | #ifdef CONFIG_SELFMOD_INTC |
105 | unsigned int intc_baseaddr = 0; | 107 | unsigned int intc_baseaddr = 0; |
@@ -113,35 +115,24 @@ void __init init_IRQ(void) | |||
113 | 0 | 115 | 0 |
114 | }; | 116 | }; |
115 | #endif | 117 | #endif |
116 | const char * const intc_list[] = { | 118 | intc = of_find_compatible_node(NULL, NULL, "xlnx,xps-intc-1.00.a"); |
117 | "xlnx,xps-intc-1.00.a", | ||
118 | NULL | ||
119 | }; | ||
120 | |||
121 | for (j = 0; intc_list[j] != NULL; j++) { | ||
122 | intc = of_find_compatible_node(NULL, NULL, intc_list[j]); | ||
123 | if (intc) | ||
124 | break; | ||
125 | } | ||
126 | BUG_ON(!intc); | 119 | BUG_ON(!intc); |
127 | 120 | ||
128 | intc_baseaddr = be32_to_cpup(of_get_property(intc, | 121 | intc_baseaddr = be32_to_cpup(of_get_property(intc, "reg", NULL)); |
129 | "reg", NULL)); | ||
130 | intc_baseaddr = (unsigned long) ioremap(intc_baseaddr, PAGE_SIZE); | 122 | intc_baseaddr = (unsigned long) ioremap(intc_baseaddr, PAGE_SIZE); |
131 | nr_irq = be32_to_cpup(of_get_property(intc, | 123 | nr_irq = be32_to_cpup(of_get_property(intc, |
132 | "xlnx,num-intr-inputs", NULL)); | 124 | "xlnx,num-intr-inputs", NULL)); |
133 | 125 | ||
134 | intr_type = | 126 | intr_mask = |
135 | be32_to_cpup(of_get_property(intc, | 127 | be32_to_cpup(of_get_property(intc, "xlnx,kind-of-intr", NULL)); |
136 | "xlnx,kind-of-intr", NULL)); | 128 | if (intr_mask > (u32)((1ULL << nr_irq) - 1)) |
137 | if (intr_type > (u32)((1ULL << nr_irq) - 1)) | ||
138 | printk(KERN_INFO " ERROR: Mismatch in kind-of-intr param\n"); | 129 | printk(KERN_INFO " ERROR: Mismatch in kind-of-intr param\n"); |
139 | 130 | ||
140 | #ifdef CONFIG_SELFMOD_INTC | 131 | #ifdef CONFIG_SELFMOD_INTC |
141 | selfmod_function((int *) arr_func, intc_baseaddr); | 132 | selfmod_function((int *) arr_func, intc_baseaddr); |
142 | #endif | 133 | #endif |
143 | printk(KERN_INFO "%s #0 at 0x%08x, num_irq=%d, edge=0x%x\n", | 134 | printk(KERN_INFO "XPS intc #0 at 0x%08x, num_irq=%d, edge=0x%x\n", |
144 | intc_list[j], intc_baseaddr, nr_irq, intr_type); | 135 | intc_baseaddr, nr_irq, intr_mask); |
145 | 136 | ||
146 | /* | 137 | /* |
147 | * Disable all external interrupts until they are | 138 | * Disable all external interrupts until they are |
@@ -155,8 +146,8 @@ void __init init_IRQ(void) | |||
155 | /* Turn on the Master Enable. */ | 146 | /* Turn on the Master Enable. */ |
156 | out_be32(intc_baseaddr + MER, MER_HIE | MER_ME); | 147 | out_be32(intc_baseaddr + MER, MER_HIE | MER_ME); |
157 | 148 | ||
158 | for (i = 0; i < nr_irq; ++i) { | 149 | for (i = IRQ_OFFSET; i < (nr_irq + IRQ_OFFSET); ++i) { |
159 | if (intr_type & (0x00000001 << i)) { | 150 | if (intr_mask & (0x00000001 << (i - IRQ_OFFSET))) { |
160 | irq_set_chip_and_handler_name(i, &intc_dev, | 151 | irq_set_chip_and_handler_name(i, &intc_dev, |
161 | handle_edge_irq, "edge"); | 152 | handle_edge_irq, "edge"); |
162 | irq_clear_status_flags(i, IRQ_LEVEL); | 153 | irq_clear_status_flags(i, IRQ_LEVEL); |
@@ -165,5 +156,6 @@ void __init init_IRQ(void) | |||
165 | handle_level_irq, "level"); | 156 | handle_level_irq, "level"); |
166 | irq_set_status_flags(i, IRQ_LEVEL); | 157 | irq_set_status_flags(i, IRQ_LEVEL); |
167 | } | 158 | } |
159 | irq_get_irq_data(i)->hwirq = i - IRQ_OFFSET; | ||
168 | } | 160 | } |
169 | } | 161 | } |
diff --git a/arch/microblaze/kernel/irq.c b/arch/microblaze/kernel/irq.c index e5d63a89b9b2..bbebcae72c02 100644 --- a/arch/microblaze/kernel/irq.c +++ b/arch/microblaze/kernel/irq.c | |||
@@ -33,11 +33,12 @@ void __irq_entry do_IRQ(struct pt_regs *regs) | |||
33 | irq_enter(); | 33 | irq_enter(); |
34 | irq = get_irq(regs); | 34 | irq = get_irq(regs); |
35 | next_irq: | 35 | next_irq: |
36 | BUG_ON(irq == -1U); | 36 | BUG_ON(!irq); |
37 | generic_handle_irq(irq); | 37 | /* Substract 1 because of get_irq */ |
38 | generic_handle_irq(irq + IRQ_OFFSET - NO_IRQ_OFFSET); | ||
38 | 39 | ||
39 | irq = get_irq(regs); | 40 | irq = get_irq(regs); |
40 | if (irq != -1U) { | 41 | if (irq) { |
41 | pr_debug("next irq: %d\n", irq); | 42 | pr_debug("next irq: %d\n", irq); |
42 | ++concurrent_irq; | 43 | ++concurrent_irq; |
43 | goto next_irq; | 44 | goto next_irq; |
@@ -52,13 +53,13 @@ next_irq: | |||
52 | intc without any cascades or any connection that's why mapping is 1:1 */ | 53 | intc without any cascades or any connection that's why mapping is 1:1 */ |
53 | unsigned int irq_create_mapping(struct irq_host *host, irq_hw_number_t hwirq) | 54 | unsigned int irq_create_mapping(struct irq_host *host, irq_hw_number_t hwirq) |
54 | { | 55 | { |
55 | return hwirq; | 56 | return hwirq + IRQ_OFFSET; |
56 | } | 57 | } |
57 | EXPORT_SYMBOL_GPL(irq_create_mapping); | 58 | EXPORT_SYMBOL_GPL(irq_create_mapping); |
58 | 59 | ||
59 | unsigned int irq_create_of_mapping(struct device_node *controller, | 60 | unsigned int irq_create_of_mapping(struct device_node *controller, |
60 | const u32 *intspec, unsigned int intsize) | 61 | const u32 *intspec, unsigned int intsize) |
61 | { | 62 | { |
62 | return intspec[0]; | 63 | return intspec[0] + IRQ_OFFSET; |
63 | } | 64 | } |
64 | EXPORT_SYMBOL_GPL(irq_create_of_mapping); | 65 | EXPORT_SYMBOL_GPL(irq_create_of_mapping); |
diff --git a/arch/microblaze/kernel/module.c b/arch/microblaze/kernel/module.c index 142426f631bb..f39257a5abcf 100644 --- a/arch/microblaze/kernel/module.c +++ b/arch/microblaze/kernel/module.c | |||
@@ -100,7 +100,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, | |||
100 | break; | 100 | break; |
101 | 101 | ||
102 | case R_MICROBLAZE_64_NONE: | 102 | case R_MICROBLAZE_64_NONE: |
103 | pr_debug("R_MICROBLAZE_NONE\n"); | 103 | pr_debug("R_MICROBLAZE_64_NONE\n"); |
104 | break; | 104 | break; |
105 | 105 | ||
106 | case R_MICROBLAZE_NONE: | 106 | case R_MICROBLAZE_NONE: |
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c index 0e654a12d37e..604cd9dd1333 100644 --- a/arch/microblaze/kernel/setup.c +++ b/arch/microblaze/kernel/setup.c | |||
@@ -145,32 +145,32 @@ void __init machine_early_init(const char *cmdline, unsigned int ram, | |||
145 | setup_early_printk(NULL); | 145 | setup_early_printk(NULL); |
146 | #endif | 146 | #endif |
147 | 147 | ||
148 | eprintk("Ramdisk addr 0x%08x, ", ram); | 148 | printk("Ramdisk addr 0x%08x, ", ram); |
149 | if (fdt) | 149 | if (fdt) |
150 | eprintk("FDT at 0x%08x\n", fdt); | 150 | printk("FDT at 0x%08x\n", fdt); |
151 | else | 151 | else |
152 | eprintk("Compiled-in FDT at 0x%08x\n", | 152 | printk("Compiled-in FDT at 0x%08x\n", |
153 | (unsigned int)_fdt_start); | 153 | (unsigned int)_fdt_start); |
154 | 154 | ||
155 | #ifdef CONFIG_MTD_UCLINUX | 155 | #ifdef CONFIG_MTD_UCLINUX |
156 | eprintk("Found romfs @ 0x%08x (0x%08x)\n", | 156 | printk("Found romfs @ 0x%08x (0x%08x)\n", |
157 | romfs_base, romfs_size); | 157 | romfs_base, romfs_size); |
158 | eprintk("#### klimit %p ####\n", old_klimit); | 158 | printk("#### klimit %p ####\n", old_klimit); |
159 | BUG_ON(romfs_size < 0); /* What else can we do? */ | 159 | BUG_ON(romfs_size < 0); /* What else can we do? */ |
160 | 160 | ||
161 | eprintk("Moved 0x%08x bytes from 0x%08x to 0x%08x\n", | 161 | printk("Moved 0x%08x bytes from 0x%08x to 0x%08x\n", |
162 | romfs_size, romfs_base, (unsigned)&_ebss); | 162 | romfs_size, romfs_base, (unsigned)&_ebss); |
163 | 163 | ||
164 | eprintk("New klimit: 0x%08x\n", (unsigned)klimit); | 164 | printk("New klimit: 0x%08x\n", (unsigned)klimit); |
165 | #endif | 165 | #endif |
166 | 166 | ||
167 | #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR | 167 | #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR |
168 | if (msr) | 168 | if (msr) |
169 | eprintk("!!!Your kernel has setup MSR instruction but " | 169 | printk("!!!Your kernel has setup MSR instruction but " |
170 | "CPU don't have it %x\n", msr); | 170 | "CPU don't have it %x\n", msr); |
171 | #else | 171 | #else |
172 | if (!msr) | 172 | if (!msr) |
173 | eprintk("!!!Your kernel not setup MSR instruction but " | 173 | printk("!!!Your kernel not setup MSR instruction but " |
174 | "CPU have it %x\n", msr); | 174 | "CPU have it %x\n", msr); |
175 | #endif | 175 | #endif |
176 | 176 | ||
diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S index 8789daa2a346..6a2b294ef6dc 100644 --- a/arch/microblaze/kernel/syscall_table.S +++ b/arch/microblaze/kernel/syscall_table.S | |||
@@ -380,3 +380,6 @@ ENTRY(sys_call_table) | |||
380 | .long sys_clock_adjtime | 380 | .long sys_clock_adjtime |
381 | .long sys_syncfs | 381 | .long sys_syncfs |
382 | .long sys_setns /* 375 */ | 382 | .long sys_setns /* 375 */ |
383 | .long sys_sendmmsg | ||
384 | .long sys_process_vm_readv | ||
385 | .long sys_process_vm_writev | ||
diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c index af74b1113aab..3cb0bf640135 100644 --- a/arch/microblaze/kernel/timer.c +++ b/arch/microblaze/kernel/timer.c | |||
@@ -243,7 +243,7 @@ static int timer_initialized; | |||
243 | 243 | ||
244 | void __init time_init(void) | 244 | void __init time_init(void) |
245 | { | 245 | { |
246 | u32 irq, i = 0; | 246 | u32 irq; |
247 | u32 timer_num = 1; | 247 | u32 timer_num = 1; |
248 | struct device_node *timer = NULL; | 248 | struct device_node *timer = NULL; |
249 | const void *prop; | 249 | const void *prop; |
@@ -258,33 +258,24 @@ void __init time_init(void) | |||
258 | 0 | 258 | 0 |
259 | }; | 259 | }; |
260 | #endif | 260 | #endif |
261 | const char * const timer_list[] = { | 261 | timer = of_find_compatible_node(NULL, NULL, "xlnx,xps-timer-1.00.a"); |
262 | "xlnx,xps-timer-1.00.a", | ||
263 | NULL | ||
264 | }; | ||
265 | |||
266 | for (i = 0; timer_list[i] != NULL; i++) { | ||
267 | timer = of_find_compatible_node(NULL, NULL, timer_list[i]); | ||
268 | if (timer) | ||
269 | break; | ||
270 | } | ||
271 | BUG_ON(!timer); | 262 | BUG_ON(!timer); |
272 | 263 | ||
273 | timer_baseaddr = be32_to_cpup(of_get_property(timer, "reg", NULL)); | 264 | timer_baseaddr = be32_to_cpup(of_get_property(timer, "reg", NULL)); |
274 | timer_baseaddr = (unsigned long) ioremap(timer_baseaddr, PAGE_SIZE); | 265 | timer_baseaddr = (unsigned long) ioremap(timer_baseaddr, PAGE_SIZE); |
275 | irq = be32_to_cpup(of_get_property(timer, "interrupts", NULL)); | 266 | irq = irq_of_parse_and_map(timer, 0); |
276 | timer_num = be32_to_cpup(of_get_property(timer, | 267 | timer_num = be32_to_cpup(of_get_property(timer, |
277 | "xlnx,one-timer-only", NULL)); | 268 | "xlnx,one-timer-only", NULL)); |
278 | if (timer_num) { | 269 | if (timer_num) { |
279 | eprintk(KERN_EMERG "Please enable two timers in HW\n"); | 270 | printk(KERN_EMERG "Please enable two timers in HW\n"); |
280 | BUG(); | 271 | BUG(); |
281 | } | 272 | } |
282 | 273 | ||
283 | #ifdef CONFIG_SELFMOD_TIMER | 274 | #ifdef CONFIG_SELFMOD_TIMER |
284 | selfmod_function((int *) arr_func, timer_baseaddr); | 275 | selfmod_function((int *) arr_func, timer_baseaddr); |
285 | #endif | 276 | #endif |
286 | printk(KERN_INFO "%s #0 at 0x%08x, irq=%d\n", | 277 | printk(KERN_INFO "XPS timer #0 at 0x%08x, irq=%d\n", |
287 | timer_list[i], timer_baseaddr, irq); | 278 | timer_baseaddr, irq); |
288 | 279 | ||
289 | /* If there is clock-frequency property than use it */ | 280 | /* If there is clock-frequency property than use it */ |
290 | prop = of_get_property(timer, "clock-frequency", NULL); | 281 | prop = of_get_property(timer, "clock-frequency", NULL); |
diff --git a/arch/microblaze/lib/Makefile b/arch/microblaze/lib/Makefile index c13067b243c3..844960e8ae18 100644 --- a/arch/microblaze/lib/Makefile +++ b/arch/microblaze/lib/Makefile | |||
@@ -20,6 +20,7 @@ lib-y += uaccess_old.o | |||
20 | 20 | ||
21 | lib-y += ashldi3.o | 21 | lib-y += ashldi3.o |
22 | lib-y += ashrdi3.o | 22 | lib-y += ashrdi3.o |
23 | lib-y += cmpdi2.o | ||
23 | lib-y += divsi3.o | 24 | lib-y += divsi3.o |
24 | lib-y += lshrdi3.o | 25 | lib-y += lshrdi3.o |
25 | lib-y += modsi3.o | 26 | lib-y += modsi3.o |
diff --git a/arch/microblaze/lib/cmpdi2.c b/arch/microblaze/lib/cmpdi2.c new file mode 100644 index 000000000000..a708400ea7b7 --- /dev/null +++ b/arch/microblaze/lib/cmpdi2.c | |||
@@ -0,0 +1,26 @@ | |||
1 | #include <linux/module.h> | ||
2 | |||
3 | #include "libgcc.h" | ||
4 | |||
5 | word_type __cmpdi2(long long a, long long b) | ||
6 | { | ||
7 | const DWunion au = { | ||
8 | .ll = a | ||
9 | }; | ||
10 | const DWunion bu = { | ||
11 | .ll = b | ||
12 | }; | ||
13 | |||
14 | if (au.s.high < bu.s.high) | ||
15 | return 0; | ||
16 | else if (au.s.high > bu.s.high) | ||
17 | return 2; | ||
18 | |||
19 | if ((unsigned int) au.s.low < (unsigned int) bu.s.low) | ||
20 | return 0; | ||
21 | else if ((unsigned int) au.s.low > (unsigned int) bu.s.low) | ||
22 | return 2; | ||
23 | |||
24 | return 1; | ||
25 | } | ||
26 | EXPORT_SYMBOL(__cmpdi2); | ||
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index db841c7b9d5b..0d71b2ed8107 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c | |||
@@ -242,7 +242,7 @@ int pci_read_irq_line(struct pci_dev *pci_dev) | |||
242 | line, pin); | 242 | line, pin); |
243 | 243 | ||
244 | virq = irq_create_mapping(NULL, line); | 244 | virq = irq_create_mapping(NULL, line); |
245 | if (virq != NO_IRQ) | 245 | if (virq) |
246 | irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); | 246 | irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); |
247 | } else { | 247 | } else { |
248 | pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", | 248 | pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", |
@@ -253,7 +253,7 @@ int pci_read_irq_line(struct pci_dev *pci_dev) | |||
253 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, | 253 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, |
254 | oirq.size); | 254 | oirq.size); |
255 | } | 255 | } |
256 | if (virq == NO_IRQ) { | 256 | if (!virq) { |
257 | pr_debug(" Failed to map !\n"); | 257 | pr_debug(" Failed to map !\n"); |
258 | return -1; | 258 | return -1; |
259 | } | 259 | } |