diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-05-07 05:17:13 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-07 05:17:34 -0400 |
commit | 44347d947f628060b92449702071bfe1d31dfb75 (patch) | |
tree | c6ed74610d5b3295df4296659f80f5feb94b28cc /arch/microblaze | |
parent | d94fc523f3c35bd8013f04827e94756cbc0212f4 (diff) | |
parent | 413f81eba35d6ede9289b0c8a920c013a84fac71 (diff) |
Merge branch 'linus' into tracing/core
Merge reason: tracing/core was on a .30-rc1 base and was missing out on
on a handful of tracing fixes present in .30-rc5-almost.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/microblaze')
31 files changed, 74 insertions, 75 deletions
diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index 0dcbb9832974..aaadfa701da3 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile | |||
@@ -26,21 +26,19 @@ ifeq (,$(findstring spartan2,$(CONFIG_XILINX_MICROBLAZE0_FAMILY))) | |||
26 | endif | 26 | endif |
27 | CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_DIV) += -mno-xl-soft-div | 27 | CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_DIV) += -mno-xl-soft-div |
28 | CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_BARREL) += -mxl-barrel-shift | 28 | CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_BARREL) += -mxl-barrel-shift |
29 | CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP) += -mxl-pattern-compare | 29 | CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare |
30 | 30 | ||
31 | CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER)) | 31 | CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER)) |
32 | 32 | ||
33 | # The various CONFIG_XILINX cpu features options are integers 0/1/2... | 33 | # The various CONFIG_XILINX cpu features options are integers 0/1/2... |
34 | # rather than bools y/n | 34 | # rather than bools y/n |
35 | CFLAGS += $(CPUFLAGS-1) | ||
36 | CFLAGS += $(CPUFLAGS-2) | ||
37 | 35 | ||
38 | # r31 holds current when in kernel mode | 36 | # r31 holds current when in kernel mode |
39 | CFLAGS += -ffixed-r31 | 37 | CFLAGS_KERNEL += -ffixed-r31 $(CPUFLAGS-1) $(CPUFLAGS-2) |
40 | 38 | ||
41 | LDFLAGS_BLOB := --format binary --oformat elf32-microblaze | 39 | LDFLAGS_BLOB := --format binary --oformat elf32-microblaze |
42 | 40 | ||
43 | LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) | 41 | LIBGCC := $(shell $(CC) $(CFLAGS_KERNEL) -print-libgcc-file-name) |
44 | 42 | ||
45 | head-y := arch/microblaze/kernel/head.o | 43 | head-y := arch/microblaze/kernel/head.o |
46 | libs-y += arch/microblaze/lib/ $(LIBGCC) | 44 | libs-y += arch/microblaze/lib/ $(LIBGCC) |
diff --git a/arch/microblaze/include/asm/auxvec.h b/arch/microblaze/include/asm/auxvec.h index e69de29bb2d1..8b137891791f 100644 --- a/arch/microblaze/include/asm/auxvec.h +++ b/arch/microblaze/include/asm/auxvec.h | |||
@@ -0,0 +1 @@ | |||
diff --git a/arch/microblaze/include/asm/cache.h b/arch/microblaze/include/asm/cache.h index c4c64b43c074..c209c47509d5 100644 --- a/arch/microblaze/include/asm/cache.h +++ b/arch/microblaze/include/asm/cache.h | |||
@@ -37,9 +37,4 @@ void _invalidate_dcache(unsigned int addr); | |||
37 | #define __disable_dcache() _disable_dcache() | 37 | #define __disable_dcache() _disable_dcache() |
38 | #define __invalidate_dcache(addr) _invalidate_dcache(addr) | 38 | #define __invalidate_dcache(addr) _invalidate_dcache(addr) |
39 | 39 | ||
40 | /* FIXME - I don't think this is right */ | ||
41 | #ifdef CONFIG_XILINX_UNCACHED_SHADOW | ||
42 | #define UNCACHED_SHADOW_MASK (CONFIG_XILINX_ERAM_SIZE) | ||
43 | #endif | ||
44 | |||
45 | #endif /* _ASM_MICROBLAZE_CACHE_H */ | 40 | #endif /* _ASM_MICROBLAZE_CACHE_H */ |
diff --git a/arch/microblaze/include/asm/cputable.h b/arch/microblaze/include/asm/cputable.h index e69de29bb2d1..8b137891791f 100644 --- a/arch/microblaze/include/asm/cputable.h +++ b/arch/microblaze/include/asm/cputable.h | |||
@@ -0,0 +1 @@ | |||
diff --git a/arch/microblaze/include/asm/entry.h b/arch/microblaze/include/asm/entry.h index 7f57e42ee467..e4c3aef884df 100644 --- a/arch/microblaze/include/asm/entry.h +++ b/arch/microblaze/include/asm/entry.h | |||
@@ -29,7 +29,9 @@ DECLARE_PER_CPU(unsigned int, KM); /* Kernel/user mode */ | |||
29 | DECLARE_PER_CPU(unsigned int, ENTRY_SP); /* Saved SP on kernel entry */ | 29 | DECLARE_PER_CPU(unsigned int, ENTRY_SP); /* Saved SP on kernel entry */ |
30 | DECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */ | 30 | DECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */ |
31 | DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */ | 31 | DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */ |
32 | DECLARE_PER_CPU(unsigned int, SYSCALL_SAVE); /* Saved syscall number */ | ||
33 | # endif /* __ASSEMBLY__ */ | 32 | # endif /* __ASSEMBLY__ */ |
34 | 33 | ||
34 | /* noMMU hasn't any space for args */ | ||
35 | # define STATE_SAVE_ARG_SPACE (0) | ||
36 | |||
35 | #endif /* _ASM_MICROBLAZE_ENTRY_H */ | 37 | #endif /* _ASM_MICROBLAZE_ENTRY_H */ |
diff --git a/arch/microblaze/include/asm/exceptions.h b/arch/microblaze/include/asm/exceptions.h index 4cdd2159f470..24ca540e77c0 100644 --- a/arch/microblaze/include/asm/exceptions.h +++ b/arch/microblaze/include/asm/exceptions.h | |||
@@ -61,6 +61,9 @@ | |||
61 | asmlinkage void full_exception(struct pt_regs *regs, unsigned int type, | 61 | asmlinkage void full_exception(struct pt_regs *regs, unsigned int type, |
62 | int fsr, int addr); | 62 | int fsr, int addr); |
63 | 63 | ||
64 | void die(const char *str, struct pt_regs *fp, long err); | ||
65 | void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr); | ||
66 | |||
64 | #if defined(CONFIG_XMON) | 67 | #if defined(CONFIG_XMON) |
65 | extern void xmon(struct pt_regs *regs); | 68 | extern void xmon(struct pt_regs *regs); |
66 | extern int xmon_bpt(struct pt_regs *regs); | 69 | extern int xmon_bpt(struct pt_regs *regs); |
diff --git a/arch/microblaze/include/asm/ftrace.h b/arch/microblaze/include/asm/ftrace.h new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/arch/microblaze/include/asm/ftrace.h | |||
@@ -0,0 +1 @@ | |||
diff --git a/arch/microblaze/include/asm/hw_irq.h b/arch/microblaze/include/asm/hw_irq.h index e69de29bb2d1..8b137891791f 100644 --- a/arch/microblaze/include/asm/hw_irq.h +++ b/arch/microblaze/include/asm/hw_irq.h | |||
@@ -0,0 +1 @@ | |||
diff --git a/arch/microblaze/include/asm/io.h b/arch/microblaze/include/asm/io.h index cfab0342588d..8b5853ee6b5c 100644 --- a/arch/microblaze/include/asm/io.h +++ b/arch/microblaze/include/asm/io.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <asm/byteorder.h> | 12 | #include <asm/byteorder.h> |
13 | #include <asm/page.h> | 13 | #include <asm/page.h> |
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <asm/page.h> | ||
16 | 15 | ||
17 | #define IO_SPACE_LIMIT (0xFFFFFFFF) | 16 | #define IO_SPACE_LIMIT (0xFFFFFFFF) |
18 | 17 | ||
diff --git a/arch/microblaze/include/asm/of_platform.h b/arch/microblaze/include/asm/of_platform.h index 187c0eedaece..37491276c6ca 100644 --- a/arch/microblaze/include/asm/of_platform.h +++ b/arch/microblaze/include/asm/of_platform.h | |||
@@ -36,16 +36,6 @@ static const struct of_device_id of_default_bus_ids[] = { | |||
36 | {}, | 36 | {}, |
37 | }; | 37 | }; |
38 | 38 | ||
39 | /* Platform drivers register/unregister */ | ||
40 | static inline int of_register_platform_driver(struct of_platform_driver *drv) | ||
41 | { | ||
42 | return of_register_driver(drv, &of_platform_bus_type); | ||
43 | } | ||
44 | static inline void of_unregister_platform_driver(struct of_platform_driver *drv) | ||
45 | { | ||
46 | of_unregister_driver(drv); | ||
47 | } | ||
48 | |||
49 | /* Platform devices and busses creation */ | 39 | /* Platform devices and busses creation */ |
50 | extern struct of_device *of_platform_device_create(struct device_node *np, | 40 | extern struct of_device *of_platform_device_create(struct device_node *np, |
51 | const char *bus_id, | 41 | const char *bus_id, |
diff --git a/arch/microblaze/include/asm/processor.h b/arch/microblaze/include/asm/processor.h index d8e15434ba21..9329029d2614 100644 --- a/arch/microblaze/include/asm/processor.h +++ b/arch/microblaze/include/asm/processor.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <asm/setup.h> | 15 | #include <asm/setup.h> |
16 | #include <asm/registers.h> | 16 | #include <asm/registers.h> |
17 | #include <asm/segment.h> | 17 | #include <asm/segment.h> |
18 | #include <asm/entry.h> | ||
19 | #include <asm/current.h> | ||
18 | 20 | ||
19 | # ifndef __ASSEMBLY__ | 21 | # ifndef __ASSEMBLY__ |
20 | /* from kernel/cpu/mb.c */ | 22 | /* from kernel/cpu/mb.c */ |
@@ -26,6 +28,12 @@ extern const struct seq_operations cpuinfo_op; | |||
26 | 28 | ||
27 | # endif /* __ASSEMBLY__ */ | 29 | # endif /* __ASSEMBLY__ */ |
28 | 30 | ||
31 | #define task_pt_regs(tsk) \ | ||
32 | (((struct pt_regs *)(THREAD_SIZE + task_stack_page(tsk))) - 1) | ||
33 | |||
34 | /* Do necessary setup to start up a newly executed thread. */ | ||
35 | void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp); | ||
36 | |||
29 | /* | 37 | /* |
30 | * User space process size: memory size | 38 | * User space process size: memory size |
31 | * | 39 | * |
@@ -55,16 +63,6 @@ struct task_struct; | |||
55 | struct thread_struct { }; | 63 | struct thread_struct { }; |
56 | # define INIT_THREAD { } | 64 | # define INIT_THREAD { } |
57 | 65 | ||
58 | /* Do necessary setup to start up a newly executed thread. */ | ||
59 | static inline void start_thread(struct pt_regs *regs, | ||
60 | unsigned long pc, | ||
61 | unsigned long usp) | ||
62 | { | ||
63 | regs->pc = pc; | ||
64 | regs->r1 = usp; | ||
65 | regs->kernel_mode = 0; | ||
66 | } | ||
67 | |||
68 | /* Free all resources held by a thread. */ | 66 | /* Free all resources held by a thread. */ |
69 | static inline void release_thread(struct task_struct *dead_task) | 67 | static inline void release_thread(struct task_struct *dead_task) |
70 | { | 68 | { |
@@ -84,9 +82,6 @@ extern unsigned long get_wchan(struct task_struct *p); | |||
84 | */ | 82 | */ |
85 | extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); | 83 | extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); |
86 | 84 | ||
87 | # define task_pt_regs(tsk) \ | ||
88 | (((struct pt_regs *)(THREAD_SIZE + task_stack_page(tsk))) - 1) | ||
89 | |||
90 | # define KSTK_EIP(tsk) (0) | 85 | # define KSTK_EIP(tsk) (0) |
91 | # define KSTK_ESP(tsk) (0) | 86 | # define KSTK_ESP(tsk) (0) |
92 | 87 | ||
diff --git a/arch/microblaze/include/asm/ptrace.h b/arch/microblaze/include/asm/ptrace.h index f1f03486428a..55015bce5e47 100644 --- a/arch/microblaze/include/asm/ptrace.h +++ b/arch/microblaze/include/asm/ptrace.h | |||
@@ -52,10 +52,10 @@ struct pt_regs { | |||
52 | microblaze_reg_t ear; | 52 | microblaze_reg_t ear; |
53 | microblaze_reg_t esr; | 53 | microblaze_reg_t esr; |
54 | microblaze_reg_t fsr; | 54 | microblaze_reg_t fsr; |
55 | int kernel_mode; | 55 | int pt_mode; |
56 | }; | 56 | }; |
57 | 57 | ||
58 | #define kernel_mode(regs) ((regs)->kernel_mode) | 58 | #define kernel_mode(regs) ((regs)->pt_mode) |
59 | #define user_mode(regs) (!kernel_mode(regs)) | 59 | #define user_mode(regs) (!kernel_mode(regs)) |
60 | 60 | ||
61 | #define instruction_pointer(regs) ((regs)->pc) | 61 | #define instruction_pointer(regs) ((regs)->pc) |
diff --git a/arch/microblaze/include/asm/socket.h b/arch/microblaze/include/asm/socket.h index f919b6b540ac..825936860314 100644 --- a/arch/microblaze/include/asm/socket.h +++ b/arch/microblaze/include/asm/socket.h | |||
@@ -63,4 +63,7 @@ | |||
63 | 63 | ||
64 | #define SO_MARK 36 | 64 | #define SO_MARK 36 |
65 | 65 | ||
66 | #define SO_TIMESTAMPING 37 | ||
67 | #define SCM_TIMESTAMPING SO_TIMESTAMPING | ||
68 | |||
66 | #endif /* _ASM_MICROBLAZE_SOCKET_H */ | 69 | #endif /* _ASM_MICROBLAZE_SOCKET_H */ |
diff --git a/arch/microblaze/include/asm/unistd.h b/arch/microblaze/include/asm/unistd.h index d9d3903fde3f..b5e2f5fa5c53 100644 --- a/arch/microblaze/include/asm/unistd.h +++ b/arch/microblaze/include/asm/unistd.h | |||
@@ -378,8 +378,10 @@ | |||
378 | #define __NR_sendmsg 360 /* new */ | 378 | #define __NR_sendmsg 360 /* new */ |
379 | #define __NR_recvmsg 361 /* new */ | 379 | #define __NR_recvmsg 361 /* new */ |
380 | #define __NR_accept04 362 /* new */ | 380 | #define __NR_accept04 362 /* new */ |
381 | #define __NR_preadv 363 /* new */ | ||
382 | #define __NR_pwritev 364 /* new */ | ||
381 | 383 | ||
382 | #define __NR_syscalls 363 | 384 | #define __NR_syscalls 365 |
383 | 385 | ||
384 | #ifdef __KERNEL__ | 386 | #ifdef __KERNEL__ |
385 | #ifndef __ASSEMBLY__ | 387 | #ifndef __ASSEMBLY__ |
diff --git a/arch/microblaze/include/asm/user.h b/arch/microblaze/include/asm/user.h index e69de29bb2d1..8b137891791f 100644 --- a/arch/microblaze/include/asm/user.h +++ b/arch/microblaze/include/asm/user.h | |||
@@ -0,0 +1 @@ | |||
diff --git a/arch/microblaze/include/asm/vga.h b/arch/microblaze/include/asm/vga.h index e69de29bb2d1..8b137891791f 100644 --- a/arch/microblaze/include/asm/vga.h +++ b/arch/microblaze/include/asm/vga.h | |||
@@ -0,0 +1 @@ | |||
diff --git a/arch/microblaze/kernel/asm-offsets.c b/arch/microblaze/kernel/asm-offsets.c index 38e1a2e8ad0c..aabd9e9423a6 100644 --- a/arch/microblaze/kernel/asm-offsets.c +++ b/arch/microblaze/kernel/asm-offsets.c | |||
@@ -57,7 +57,7 @@ int main(int argc, char *argv[]) | |||
57 | DEFINE(PT_R29, offsetof(struct pt_regs, r29)); | 57 | DEFINE(PT_R29, offsetof(struct pt_regs, r29)); |
58 | DEFINE(PT_R30, offsetof(struct pt_regs, r30)); | 58 | DEFINE(PT_R30, offsetof(struct pt_regs, r30)); |
59 | DEFINE(PT_R31, offsetof(struct pt_regs, r31)); | 59 | DEFINE(PT_R31, offsetof(struct pt_regs, r31)); |
60 | DEFINE(PT_MODE, offsetof(struct pt_regs, kernel_mode)); | 60 | DEFINE(PT_MODE, offsetof(struct pt_regs, pt_mode)); |
61 | BLANK(); | 61 | BLANK(); |
62 | 62 | ||
63 | /* Magic offsets for PTRACE PEEK/POKE etc */ | 63 | /* Magic offsets for PTRACE PEEK/POKE etc */ |
diff --git a/arch/microblaze/kernel/cpu/cache.c b/arch/microblaze/kernel/cpu/cache.c index be9fecca4f91..af866a450125 100644 --- a/arch/microblaze/kernel/cpu/cache.c +++ b/arch/microblaze/kernel/cpu/cache.c | |||
@@ -100,7 +100,6 @@ void _enable_dcache(void) | |||
100 | 100 | ||
101 | void _disable_dcache(void) | 101 | void _disable_dcache(void) |
102 | { | 102 | { |
103 | if (cpuinfo.use_dcache) { | ||
104 | #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR | 103 | #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR |
105 | __asm__ __volatile__ (" \ | 104 | __asm__ __volatile__ (" \ |
106 | msrclr r0, %0; \ | 105 | msrclr r0, %0; \ |
@@ -119,12 +118,10 @@ void _disable_dcache(void) | |||
119 | : "i" (MSR_DCE) \ | 118 | : "i" (MSR_DCE) \ |
120 | : "memory", "r12"); | 119 | : "memory", "r12"); |
121 | #endif | 120 | #endif |
122 | } | ||
123 | } | 121 | } |
124 | 122 | ||
125 | void _invalidate_dcache(unsigned int addr) | 123 | void _invalidate_dcache(unsigned int addr) |
126 | { | 124 | { |
127 | if (cpuinfo.use_dcache) | ||
128 | __asm__ __volatile__ (" \ | 125 | __asm__ __volatile__ (" \ |
129 | wdc %0, r0" \ | 126 | wdc %0, r0" \ |
130 | : \ | 127 | : \ |
diff --git a/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c b/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c index cf7424a6bb87..153f57c57b6d 100644 --- a/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c +++ b/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c | |||
@@ -30,6 +30,13 @@ void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu) | |||
30 | int temp; /* for saving temp value */ | 30 | int temp; /* for saving temp value */ |
31 | get_pvr(&pvr); | 31 | get_pvr(&pvr); |
32 | 32 | ||
33 | CI(ver_code, VERSION); | ||
34 | if (!ci->ver_code) { | ||
35 | printk(KERN_ERR "ERROR: MB has broken PVR regs " | ||
36 | "-> use DTS setting\n"); | ||
37 | return; | ||
38 | } | ||
39 | |||
33 | temp = PVR_USE_BARREL(pvr) | PVR_USE_MSR_INSTR(pvr) |\ | 40 | temp = PVR_USE_BARREL(pvr) | PVR_USE_MSR_INSTR(pvr) |\ |
34 | PVR_USE_PCMP_INSTR(pvr) | PVR_USE_DIV(pvr); | 41 | PVR_USE_PCMP_INSTR(pvr) | PVR_USE_DIV(pvr); |
35 | if (ci->use_instr != temp) | 42 | if (ci->use_instr != temp) |
@@ -60,8 +67,6 @@ void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu) | |||
60 | 67 | ||
61 | CI(mmu, USE_MMU); | 68 | CI(mmu, USE_MMU); |
62 | 69 | ||
63 | CI(ver_code, VERSION); | ||
64 | |||
65 | CI(use_icache, USE_ICACHE); | 70 | CI(use_icache, USE_ICACHE); |
66 | CI(icache_tagbits, ICACHE_ADDR_TAG_BITS); | 71 | CI(icache_tagbits, ICACHE_ADDR_TAG_BITS); |
67 | CI(icache_write, ICACHE_ALLOW_WR); | 72 | CI(icache_write, ICACHE_ALLOW_WR); |
diff --git a/arch/microblaze/kernel/cpu/cpuinfo.c b/arch/microblaze/kernel/cpu/cpuinfo.c index 4a740dfcf6da..a10bea119b94 100644 --- a/arch/microblaze/kernel/cpu/cpuinfo.c +++ b/arch/microblaze/kernel/cpu/cpuinfo.c | |||
@@ -71,7 +71,7 @@ void __init setup_cpuinfo(void) | |||
71 | __func__); | 71 | __func__); |
72 | set_cpuinfo_static(&cpuinfo, cpu); | 72 | set_cpuinfo_static(&cpuinfo, cpu); |
73 | break; | 73 | break; |
74 | /* FIXME I found weird behavior with MB 7.00.a/b | 74 | /* FIXME I found weird behavior with MB 7.00.a/b 7.10.a |
75 | * please do not use FULL PVR with MMU */ | 75 | * please do not use FULL PVR with MMU */ |
76 | case 1: | 76 | case 1: |
77 | printk(KERN_INFO "%s: Using full CPU PVR support\n", | 77 | printk(KERN_INFO "%s: Using full CPU PVR support\n", |
diff --git a/arch/microblaze/kernel/cpu/mb.c b/arch/microblaze/kernel/cpu/mb.c index 3b6212bdc8dc..4dcfccdbc364 100644 --- a/arch/microblaze/kernel/cpu/mb.c +++ b/arch/microblaze/kernel/cpu/mb.c | |||
@@ -115,8 +115,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
115 | cpuinfo.hw_debug ? "yes" : "no"); | 115 | cpuinfo.hw_debug ? "yes" : "no"); |
116 | 116 | ||
117 | count += seq_printf(m, | 117 | count += seq_printf(m, |
118 | "PVR-USR1:\t%x\n" | 118 | "PVR-USR1:\t%02x\n" |
119 | "PVR-USR2:\t%x\n", | 119 | "PVR-USR2:\t%08x\n", |
120 | cpuinfo.pvr_user1, | 120 | cpuinfo.pvr_user1, |
121 | cpuinfo.pvr_user2); | 121 | cpuinfo.pvr_user2); |
122 | 122 | ||
diff --git a/arch/microblaze/kernel/early_printk.c b/arch/microblaze/kernel/early_printk.c index 62cc78993f44..4b0f0fdb9ca0 100644 --- a/arch/microblaze/kernel/early_printk.c +++ b/arch/microblaze/kernel/early_printk.c | |||
@@ -36,7 +36,7 @@ static void early_printk_putc(char c) | |||
36 | 36 | ||
37 | unsigned retries = 10000; | 37 | unsigned retries = 10000; |
38 | /* read status bit - 0x8 offset */ | 38 | /* read status bit - 0x8 offset */ |
39 | while (retries-- && (in_be32(base_addr + 8) & (1 << 3))) | 39 | while (--retries && (in_be32(base_addr + 8) & (1 << 3))) |
40 | ; | 40 | ; |
41 | 41 | ||
42 | /* Only attempt the iowrite if we didn't timeout */ | 42 | /* Only attempt the iowrite if we didn't timeout */ |
diff --git a/arch/microblaze/kernel/of_device.c b/arch/microblaze/kernel/of_device.c index 717edf4ad0b4..9a0f7632c47c 100644 --- a/arch/microblaze/kernel/of_device.c +++ b/arch/microblaze/kernel/of_device.c | |||
@@ -13,7 +13,6 @@ void of_device_make_bus_id(struct of_device *dev) | |||
13 | { | 13 | { |
14 | static atomic_t bus_no_reg_magic; | 14 | static atomic_t bus_no_reg_magic; |
15 | struct device_node *node = dev->node; | 15 | struct device_node *node = dev->node; |
16 | char *name = dev->dev.bus_id; | ||
17 | const u32 *reg; | 16 | const u32 *reg; |
18 | u64 addr; | 17 | u64 addr; |
19 | int magic; | 18 | int magic; |
@@ -25,9 +24,8 @@ void of_device_make_bus_id(struct of_device *dev) | |||
25 | if (reg) { | 24 | if (reg) { |
26 | addr = of_translate_address(node, reg); | 25 | addr = of_translate_address(node, reg); |
27 | if (addr != OF_BAD_ADDR) { | 26 | if (addr != OF_BAD_ADDR) { |
28 | snprintf(name, BUS_ID_SIZE, | 27 | dev_set_name(&dev->dev, "%llx.%s", |
29 | "%llx.%s", (unsigned long long)addr, | 28 | (unsigned long long)addr, node->name); |
30 | node->name); | ||
31 | return; | 29 | return; |
32 | } | 30 | } |
33 | } | 31 | } |
@@ -37,7 +35,7 @@ void of_device_make_bus_id(struct of_device *dev) | |||
37 | * counter (and pray...) | 35 | * counter (and pray...) |
38 | */ | 36 | */ |
39 | magic = atomic_add_return(1, &bus_no_reg_magic); | 37 | magic = atomic_add_return(1, &bus_no_reg_magic); |
40 | snprintf(name, BUS_ID_SIZE, "%s.%d", node->name, magic - 1); | 38 | dev_set_name(&dev->dev, "%s.%d", node->name, magic - 1); |
41 | } | 39 | } |
42 | EXPORT_SYMBOL(of_device_make_bus_id); | 40 | EXPORT_SYMBOL(of_device_make_bus_id); |
43 | 41 | ||
@@ -58,7 +56,7 @@ struct of_device *of_device_alloc(struct device_node *np, | |||
58 | dev->dev.archdata.of_node = np; | 56 | dev->dev.archdata.of_node = np; |
59 | 57 | ||
60 | if (bus_id) | 58 | if (bus_id) |
61 | strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE); | 59 | dev_set_name(&dev->dev, bus_id); |
62 | else | 60 | else |
63 | of_device_make_bus_id(dev); | 61 | of_device_make_bus_id(dev); |
64 | 62 | ||
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c index 60e9ed7d3132..07d4fa339eda 100644 --- a/arch/microblaze/kernel/process.c +++ b/arch/microblaze/kernel/process.c | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | void show_regs(struct pt_regs *regs) | 19 | void show_regs(struct pt_regs *regs) |
20 | { | 20 | { |
21 | printk(KERN_INFO " Registers dump: mode=%X\r\n", regs->kernel_mode); | 21 | printk(KERN_INFO " Registers dump: mode=%X\r\n", regs->pt_mode); |
22 | printk(KERN_INFO " r1=%08lX, r2=%08lX, r3=%08lX, r4=%08lX\n", | 22 | printk(KERN_INFO " r1=%08lX, r2=%08lX, r3=%08lX, r4=%08lX\n", |
23 | regs->r1, regs->r2, regs->r3, regs->r4); | 23 | regs->r1, regs->r2, regs->r3, regs->r4); |
24 | printk(KERN_INFO " r5=%08lX, r6=%08lX, r7=%08lX, r8=%08lX\n", | 24 | printk(KERN_INFO " r5=%08lX, r6=%08lX, r7=%08lX, r8=%08lX\n", |
@@ -37,8 +37,6 @@ void show_regs(struct pt_regs *regs) | |||
37 | regs->r29, regs->r30, regs->r31, regs->pc); | 37 | regs->r29, regs->r30, regs->r31, regs->pc); |
38 | printk(KERN_INFO " msr=%08lX, ear=%08lX, esr=%08lX, fsr=%08lX\n", | 38 | printk(KERN_INFO " msr=%08lX, ear=%08lX, esr=%08lX, fsr=%08lX\n", |
39 | regs->msr, regs->ear, regs->esr, regs->fsr); | 39 | regs->msr, regs->ear, regs->esr, regs->fsr); |
40 | while (1) | ||
41 | ; | ||
42 | } | 40 | } |
43 | 41 | ||
44 | void (*pm_idle)(void); | 42 | void (*pm_idle)(void); |
@@ -115,8 +113,7 @@ void flush_thread(void) | |||
115 | { | 113 | { |
116 | } | 114 | } |
117 | 115 | ||
118 | /* FIXME - here will be a proposed change -> remove nr parameter */ | 116 | int copy_thread(unsigned long clone_flags, unsigned long usp, |
119 | int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | ||
120 | unsigned long unused, | 117 | unsigned long unused, |
121 | struct task_struct *p, struct pt_regs *regs) | 118 | struct task_struct *p, struct pt_regs *regs) |
122 | { | 119 | { |
@@ -164,7 +161,6 @@ static void kernel_thread_helper(int (*fn)(void *), void *arg) | |||
164 | int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) | 161 | int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) |
165 | { | 162 | { |
166 | struct pt_regs regs; | 163 | struct pt_regs regs; |
167 | int ret; | ||
168 | 164 | ||
169 | memset(®s, 0, sizeof(regs)); | 165 | memset(®s, 0, sizeof(regs)); |
170 | /* store them in non-volatile registers */ | 166 | /* store them in non-volatile registers */ |
@@ -172,12 +168,10 @@ int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) | |||
172 | regs.r6 = (unsigned long)arg; | 168 | regs.r6 = (unsigned long)arg; |
173 | local_save_flags(regs.msr); | 169 | local_save_flags(regs.msr); |
174 | regs.pc = (unsigned long)kernel_thread_helper; | 170 | regs.pc = (unsigned long)kernel_thread_helper; |
175 | regs.kernel_mode = 1; | 171 | regs.pt_mode = 1; |
176 | 172 | ||
177 | ret = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, | 173 | return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, |
178 | ®s, 0, NULL, NULL); | 174 | ®s, 0, NULL, NULL); |
179 | |||
180 | return ret; | ||
181 | } | 175 | } |
182 | 176 | ||
183 | unsigned long get_wchan(struct task_struct *p) | 177 | unsigned long get_wchan(struct task_struct *p) |
@@ -185,3 +179,12 @@ unsigned long get_wchan(struct task_struct *p) | |||
185 | /* TBD (used by procfs) */ | 179 | /* TBD (used by procfs) */ |
186 | return 0; | 180 | return 0; |
187 | } | 181 | } |
182 | |||
183 | /* Set up a thread for executing a new program */ | ||
184 | void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp) | ||
185 | { | ||
186 | set_fs(USER_DS); | ||
187 | regs->pc = pc; | ||
188 | regs->r1 = usp; | ||
189 | regs->pt_mode = 0; | ||
190 | } | ||
diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c index 475b1fac5cfd..34c48718061a 100644 --- a/arch/microblaze/kernel/prom.c +++ b/arch/microblaze/kernel/prom.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <asm/system.h> | 39 | #include <asm/system.h> |
40 | #include <asm/mmu.h> | 40 | #include <asm/mmu.h> |
41 | #include <asm/pgtable.h> | 41 | #include <asm/pgtable.h> |
42 | #include <linux/pci.h> | ||
43 | #include <asm/sections.h> | 42 | #include <asm/sections.h> |
44 | #include <asm/pci-bridge.h> | 43 | #include <asm/pci-bridge.h> |
45 | 44 | ||
diff --git a/arch/microblaze/kernel/ptrace.c b/arch/microblaze/kernel/ptrace.c index 3171e39e3220..b86aa623e36d 100644 --- a/arch/microblaze/kernel/ptrace.c +++ b/arch/microblaze/kernel/ptrace.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <linux/signal.h> | 32 | #include <linux/signal.h> |
33 | 33 | ||
34 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
35 | #include <linux/ptrace.h> | ||
36 | #include <asm/processor.h> | 35 | #include <asm/processor.h> |
37 | #include <linux/uaccess.h> | 36 | #include <linux/uaccess.h> |
38 | #include <asm/asm-offsets.h> | 37 | #include <asm/asm-offsets.h> |
diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c index ff347b98863a..40d36931e363 100644 --- a/arch/microblaze/kernel/signal.c +++ b/arch/microblaze/kernel/signal.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <linux/uaccess.h> | 37 | #include <linux/uaccess.h> |
38 | #include <asm/pgtable.h> | 38 | #include <asm/pgtable.h> |
39 | #include <asm/pgalloc.h> | 39 | #include <asm/pgalloc.h> |
40 | #include <linux/signal.h> | ||
41 | #include <linux/syscalls.h> | 40 | #include <linux/syscalls.h> |
42 | #include <asm/cacheflush.h> | 41 | #include <asm/cacheflush.h> |
43 | #include <asm/syscalls.h> | 42 | #include <asm/syscalls.h> |
@@ -179,7 +178,9 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *rval_p) | |||
179 | 178 | ||
180 | asmlinkage int sys_sigreturn(struct pt_regs *regs) | 179 | asmlinkage int sys_sigreturn(struct pt_regs *regs) |
181 | { | 180 | { |
182 | struct sigframe *frame = (struct sigframe *)regs->r1; | 181 | struct sigframe *frame = |
182 | (struct sigframe *)(regs->r1 + STATE_SAVE_ARG_SPACE); | ||
183 | |||
183 | sigset_t set; | 184 | sigset_t set; |
184 | int rval; | 185 | int rval; |
185 | 186 | ||
@@ -210,7 +211,9 @@ badframe: | |||
210 | 211 | ||
211 | asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) | 212 | asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) |
212 | { | 213 | { |
213 | struct rt_sigframe *frame = (struct rt_sigframe *)regs->r1; | 214 | struct rt_sigframe *frame = |
215 | (struct rt_sigframe *)(regs->r1 + STATE_SAVE_ARG_SPACE); | ||
216 | |||
214 | sigset_t set; | 217 | sigset_t set; |
215 | stack_t st; | 218 | stack_t st; |
216 | int rval; | 219 | int rval; |
@@ -337,7 +340,8 @@ static void setup_frame(int sig, struct k_sigaction *ka, | |||
337 | goto give_sigsegv; | 340 | goto give_sigsegv; |
338 | 341 | ||
339 | /* Set up registers for signal handler */ | 342 | /* Set up registers for signal handler */ |
340 | regs->r1 = (unsigned long) frame; | 343 | regs->r1 = (unsigned long) frame - STATE_SAVE_ARG_SPACE; |
344 | |||
341 | /* Signal handler args: */ | 345 | /* Signal handler args: */ |
342 | regs->r5 = signal; /* Arg 0: signum */ | 346 | regs->r5 = signal; /* Arg 0: signum */ |
343 | regs->r6 = (unsigned long) &frame->sc; /* arg 1: sigcontext */ | 347 | regs->r6 = (unsigned long) &frame->sc; /* arg 1: sigcontext */ |
@@ -415,7 +419,8 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
415 | goto give_sigsegv; | 419 | goto give_sigsegv; |
416 | 420 | ||
417 | /* Set up registers for signal handler */ | 421 | /* Set up registers for signal handler */ |
418 | regs->r1 = (unsigned long) frame; | 422 | regs->r1 = (unsigned long) frame - STATE_SAVE_ARG_SPACE; |
423 | |||
419 | /* Signal handler args: */ | 424 | /* Signal handler args: */ |
420 | regs->r5 = signal; /* arg 0: signum */ | 425 | regs->r5 = signal; /* arg 0: signum */ |
421 | regs->r6 = (unsigned long) &frame->info; /* arg 1: siginfo */ | 426 | regs->r6 = (unsigned long) &frame->info; /* arg 1: siginfo */ |
diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c index d90b548fb1bb..ba0568c2cc1c 100644 --- a/arch/microblaze/kernel/sys_microblaze.c +++ b/arch/microblaze/kernel/sys_microblaze.c | |||
@@ -29,9 +29,7 @@ | |||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/err.h> | 30 | #include <linux/err.h> |
31 | #include <linux/fs.h> | 31 | #include <linux/fs.h> |
32 | #include <linux/ipc.h> | ||
33 | #include <linux/semaphore.h> | 32 | #include <linux/semaphore.h> |
34 | #include <linux/syscalls.h> | ||
35 | #include <linux/uaccess.h> | 33 | #include <linux/uaccess.h> |
36 | #include <linux/unistd.h> | 34 | #include <linux/unistd.h> |
37 | 35 | ||
diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S index 529b0dbf4fe9..3bb42ec924c2 100644 --- a/arch/microblaze/kernel/syscall_table.S +++ b/arch/microblaze/kernel/syscall_table.S | |||
@@ -363,3 +363,5 @@ ENTRY(sys_call_table) | |||
363 | .long sys_sendmsg /* 360 */ | 363 | .long sys_sendmsg /* 360 */ |
364 | .long sys_recvmsg | 364 | .long sys_recvmsg |
365 | .long sys_ni_syscall | 365 | .long sys_ni_syscall |
366 | .long sys_ni_syscall | ||
367 | .long sys_ni_syscall | ||
diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c index 05a497eefd78..bdfa2f9f0c81 100644 --- a/arch/microblaze/kernel/timer.c +++ b/arch/microblaze/kernel/timer.c | |||
@@ -176,7 +176,7 @@ static __init void microblaze_clockevent_init(void) | |||
176 | clockevents_register_device(&clockevent_microblaze_timer); | 176 | clockevents_register_device(&clockevent_microblaze_timer); |
177 | } | 177 | } |
178 | 178 | ||
179 | static cycle_t microblaze_read(void) | 179 | static cycle_t microblaze_read(struct clocksource *cs) |
180 | { | 180 | { |
181 | /* reading actual value of timer 1 */ | 181 | /* reading actual value of timer 1 */ |
182 | return (cycle_t) (in_be32(TIMER_BASE + TCR1)); | 182 | return (cycle_t) (in_be32(TIMER_BASE + TCR1)); |
diff --git a/arch/microblaze/kernel/traps.c b/arch/microblaze/kernel/traps.c index fbdc533c61e3..293ef486013a 100644 --- a/arch/microblaze/kernel/traps.c +++ b/arch/microblaze/kernel/traps.c | |||
@@ -34,7 +34,7 @@ static int kstack_depth_to_print = 24; | |||
34 | 34 | ||
35 | static int __init kstack_setup(char *s) | 35 | static int __init kstack_setup(char *s) |
36 | { | 36 | { |
37 | kstack_depth_to_print = strict_strtoul(s, 0, 0); | 37 | kstack_depth_to_print = strict_strtoul(s, 0, NULL); |
38 | 38 | ||
39 | return 1; | 39 | return 1; |
40 | } | 40 | } |