diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-06-18 04:53:12 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-06-18 04:53:19 -0400 |
commit | 646b1db4956ba8bf748b835b5eba211133d91c2e (patch) | |
tree | 061166d873d9da9cf83044a7593ad111787076c5 /arch/sh/kernel | |
parent | 0f2c3de2ba110626515234d5d584fb1b0c0749a2 (diff) | |
parent | 7e27d6e778cd87b6f2415515d7127eba53fe5d02 (diff) |
Merge commit 'v2.6.35-rc3' into perf/core
Merge reason: Go from -rc1 base to -rc3 base, merge in fixes.
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/Makefile | 3 | ||||
-rw-r--r-- | arch/sh/kernel/dwarf.c | 19 | ||||
-rw-r--r-- | arch/sh/kernel/io.c | 22 | ||||
-rw-r--r-- | arch/sh/kernel/io_generic.c | 20 | ||||
-rw-r--r-- | arch/sh/kernel/io_trapped.c | 4 | ||||
-rw-r--r-- | arch/sh/kernel/machvec.c | 17 | ||||
-rw-r--r-- | arch/sh/kernel/return_address.c | 2 |
7 files changed, 56 insertions, 31 deletions
diff --git a/arch/sh/kernel/Makefile b/arch/sh/kernel/Makefile index 650b92f00ee5..e25f3c69525d 100644 --- a/arch/sh/kernel/Makefile +++ b/arch/sh/kernel/Makefile | |||
@@ -12,7 +12,7 @@ endif | |||
12 | CFLAGS_REMOVE_return_address.o = -pg | 12 | CFLAGS_REMOVE_return_address.o = -pg |
13 | 13 | ||
14 | obj-y := clkdev.o debugtraps.o dma-nommu.o dumpstack.o \ | 14 | obj-y := clkdev.o debugtraps.o dma-nommu.o dumpstack.o \ |
15 | idle.o io.o io_generic.o irq.o \ | 15 | idle.o io.o irq.o \ |
16 | irq_$(BITS).o machvec.o nmi_debug.o process.o \ | 16 | irq_$(BITS).o machvec.o nmi_debug.o process.o \ |
17 | process_$(BITS).o ptrace_$(BITS).o \ | 17 | process_$(BITS).o ptrace_$(BITS).o \ |
18 | reboot.o return_address.o \ | 18 | reboot.o return_address.o \ |
@@ -39,6 +39,7 @@ obj-$(CONFIG_DUMP_CODE) += disassemble.o | |||
39 | obj-$(CONFIG_HIBERNATION) += swsusp.o | 39 | obj-$(CONFIG_HIBERNATION) += swsusp.o |
40 | obj-$(CONFIG_DWARF_UNWINDER) += dwarf.o | 40 | obj-$(CONFIG_DWARF_UNWINDER) += dwarf.o |
41 | obj-$(CONFIG_PERF_EVENTS) += perf_event.o perf_callchain.o | 41 | obj-$(CONFIG_PERF_EVENTS) += perf_event.o perf_callchain.o |
42 | obj-$(CONFIG_HAS_IOPORT) += io_generic.o | ||
42 | 43 | ||
43 | obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o | 44 | obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o |
44 | obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) += localtimer.o | 45 | obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) += localtimer.o |
diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c index 886d7d83ace3..49c09c7d5b77 100644 --- a/arch/sh/kernel/dwarf.c +++ b/arch/sh/kernel/dwarf.c | |||
@@ -49,6 +49,8 @@ static DEFINE_SPINLOCK(dwarf_fde_lock); | |||
49 | 49 | ||
50 | static struct dwarf_cie *cached_cie; | 50 | static struct dwarf_cie *cached_cie; |
51 | 51 | ||
52 | static unsigned int dwarf_unwinder_ready; | ||
53 | |||
52 | /** | 54 | /** |
53 | * dwarf_frame_alloc_reg - allocate memory for a DWARF register | 55 | * dwarf_frame_alloc_reg - allocate memory for a DWARF register |
54 | * @frame: the DWARF frame whose list of registers we insert on | 56 | * @frame: the DWARF frame whose list of registers we insert on |
@@ -582,6 +584,13 @@ struct dwarf_frame *dwarf_unwind_stack(unsigned long pc, | |||
582 | unsigned long addr; | 584 | unsigned long addr; |
583 | 585 | ||
584 | /* | 586 | /* |
587 | * If we've been called in to before initialization has | ||
588 | * completed, bail out immediately. | ||
589 | */ | ||
590 | if (!dwarf_unwinder_ready) | ||
591 | return NULL; | ||
592 | |||
593 | /* | ||
585 | * If we're starting at the top of the stack we need get the | 594 | * If we're starting at the top of the stack we need get the |
586 | * contents of a physical register to get the CFA in order to | 595 | * contents of a physical register to get the CFA in order to |
587 | * begin the virtual unwinding of the stack. | 596 | * begin the virtual unwinding of the stack. |
@@ -1167,7 +1176,7 @@ void module_dwarf_cleanup(struct module *mod) | |||
1167 | */ | 1176 | */ |
1168 | static int __init dwarf_unwinder_init(void) | 1177 | static int __init dwarf_unwinder_init(void) |
1169 | { | 1178 | { |
1170 | int err; | 1179 | int err = -ENOMEM; |
1171 | 1180 | ||
1172 | dwarf_frame_cachep = kmem_cache_create("dwarf_frames", | 1181 | dwarf_frame_cachep = kmem_cache_create("dwarf_frames", |
1173 | sizeof(struct dwarf_frame), 0, | 1182 | sizeof(struct dwarf_frame), 0, |
@@ -1181,11 +1190,15 @@ static int __init dwarf_unwinder_init(void) | |||
1181 | mempool_alloc_slab, | 1190 | mempool_alloc_slab, |
1182 | mempool_free_slab, | 1191 | mempool_free_slab, |
1183 | dwarf_frame_cachep); | 1192 | dwarf_frame_cachep); |
1193 | if (!dwarf_frame_pool) | ||
1194 | goto out; | ||
1184 | 1195 | ||
1185 | dwarf_reg_pool = mempool_create(DWARF_REG_MIN_REQ, | 1196 | dwarf_reg_pool = mempool_create(DWARF_REG_MIN_REQ, |
1186 | mempool_alloc_slab, | 1197 | mempool_alloc_slab, |
1187 | mempool_free_slab, | 1198 | mempool_free_slab, |
1188 | dwarf_reg_cachep); | 1199 | dwarf_reg_cachep); |
1200 | if (!dwarf_reg_pool) | ||
1201 | goto out; | ||
1189 | 1202 | ||
1190 | err = dwarf_parse_section(__start_eh_frame, __stop_eh_frame, NULL); | 1203 | err = dwarf_parse_section(__start_eh_frame, __stop_eh_frame, NULL); |
1191 | if (err) | 1204 | if (err) |
@@ -1195,11 +1208,13 @@ static int __init dwarf_unwinder_init(void) | |||
1195 | if (err) | 1208 | if (err) |
1196 | goto out; | 1209 | goto out; |
1197 | 1210 | ||
1211 | dwarf_unwinder_ready = 1; | ||
1212 | |||
1198 | return 0; | 1213 | return 0; |
1199 | 1214 | ||
1200 | out: | 1215 | out: |
1201 | printk(KERN_ERR "Failed to initialise DWARF unwinder: %d\n", err); | 1216 | printk(KERN_ERR "Failed to initialise DWARF unwinder: %d\n", err); |
1202 | dwarf_unwinder_cleanup(); | 1217 | dwarf_unwinder_cleanup(); |
1203 | return -EINVAL; | 1218 | return err; |
1204 | } | 1219 | } |
1205 | early_initcall(dwarf_unwinder_init); | 1220 | early_initcall(dwarf_unwinder_init); |
diff --git a/arch/sh/kernel/io.c b/arch/sh/kernel/io.c index 4770c241c679..5c51b794ba2a 100644 --- a/arch/sh/kernel/io.c +++ b/arch/sh/kernel/io.c | |||
@@ -112,25 +112,3 @@ void memset_io(volatile void __iomem *dst, int c, unsigned long count) | |||
112 | } | 112 | } |
113 | } | 113 | } |
114 | EXPORT_SYMBOL(memset_io); | 114 | EXPORT_SYMBOL(memset_io); |
115 | |||
116 | #ifndef CONFIG_GENERIC_IOMAP | ||
117 | |||
118 | void __iomem *ioport_map(unsigned long port, unsigned int nr) | ||
119 | { | ||
120 | void __iomem *ret; | ||
121 | |||
122 | ret = __ioport_map_trapped(port, nr); | ||
123 | if (ret) | ||
124 | return ret; | ||
125 | |||
126 | return __ioport_map(port, nr); | ||
127 | } | ||
128 | EXPORT_SYMBOL(ioport_map); | ||
129 | |||
130 | void ioport_unmap(void __iomem *addr) | ||
131 | { | ||
132 | sh_mv.mv_ioport_unmap(addr); | ||
133 | } | ||
134 | EXPORT_SYMBOL(ioport_unmap); | ||
135 | |||
136 | #endif /* CONFIG_GENERIC_IOMAP */ | ||
diff --git a/arch/sh/kernel/io_generic.c b/arch/sh/kernel/io_generic.c index e1e1dbd19557..447d78f666f9 100644 --- a/arch/sh/kernel/io_generic.c +++ b/arch/sh/kernel/io_generic.c | |||
@@ -158,3 +158,23 @@ void __iomem *generic_ioport_map(unsigned long addr, unsigned int size) | |||
158 | void generic_ioport_unmap(void __iomem *addr) | 158 | void generic_ioport_unmap(void __iomem *addr) |
159 | { | 159 | { |
160 | } | 160 | } |
161 | |||
162 | #ifndef CONFIG_GENERIC_IOMAP | ||
163 | void __iomem *ioport_map(unsigned long port, unsigned int nr) | ||
164 | { | ||
165 | void __iomem *ret; | ||
166 | |||
167 | ret = __ioport_map_trapped(port, nr); | ||
168 | if (ret) | ||
169 | return ret; | ||
170 | |||
171 | return __ioport_map(port, nr); | ||
172 | } | ||
173 | EXPORT_SYMBOL(ioport_map); | ||
174 | |||
175 | void ioport_unmap(void __iomem *addr) | ||
176 | { | ||
177 | sh_mv.mv_ioport_unmap(addr); | ||
178 | } | ||
179 | EXPORT_SYMBOL(ioport_unmap); | ||
180 | #endif /* CONFIG_GENERIC_IOMAP */ | ||
diff --git a/arch/sh/kernel/io_trapped.c b/arch/sh/kernel/io_trapped.c index 4a8bb4eeb8ad..2947d2bd1291 100644 --- a/arch/sh/kernel/io_trapped.c +++ b/arch/sh/kernel/io_trapped.c | |||
@@ -91,10 +91,14 @@ int register_trapped_io(struct trapped_io *tiop) | |||
91 | tiop->magic = IO_TRAPPED_MAGIC; | 91 | tiop->magic = IO_TRAPPED_MAGIC; |
92 | INIT_LIST_HEAD(&tiop->list); | 92 | INIT_LIST_HEAD(&tiop->list); |
93 | spin_lock_irq(&trapped_lock); | 93 | spin_lock_irq(&trapped_lock); |
94 | #ifdef CONFIG_HAS_IOPORT | ||
94 | if (flags & IORESOURCE_IO) | 95 | if (flags & IORESOURCE_IO) |
95 | list_add(&tiop->list, &trapped_io); | 96 | list_add(&tiop->list, &trapped_io); |
97 | #endif | ||
98 | #ifdef CONFIG_HAS_IOMEM | ||
96 | if (flags & IORESOURCE_MEM) | 99 | if (flags & IORESOURCE_MEM) |
97 | list_add(&tiop->list, &trapped_mem); | 100 | list_add(&tiop->list, &trapped_mem); |
101 | #endif | ||
98 | spin_unlock_irq(&trapped_lock); | 102 | spin_unlock_irq(&trapped_lock); |
99 | 103 | ||
100 | return 0; | 104 | return 0; |
diff --git a/arch/sh/kernel/machvec.c b/arch/sh/kernel/machvec.c index 85cfaf916fdc..9f9bb63616ad 100644 --- a/arch/sh/kernel/machvec.c +++ b/arch/sh/kernel/machvec.c | |||
@@ -118,6 +118,14 @@ void __init sh_mv_setup(void) | |||
118 | sh_mv.mv_##elem = generic_##elem; \ | 118 | sh_mv.mv_##elem = generic_##elem; \ |
119 | } while (0) | 119 | } while (0) |
120 | 120 | ||
121 | #ifdef CONFIG_HAS_IOPORT | ||
122 | |||
123 | #ifdef P2SEG | ||
124 | __set_io_port_base(P2SEG); | ||
125 | #else | ||
126 | __set_io_port_base(0); | ||
127 | #endif | ||
128 | |||
121 | mv_set(inb); mv_set(inw); mv_set(inl); | 129 | mv_set(inb); mv_set(inw); mv_set(inl); |
122 | mv_set(outb); mv_set(outw); mv_set(outl); | 130 | mv_set(outb); mv_set(outw); mv_set(outl); |
123 | 131 | ||
@@ -129,16 +137,13 @@ void __init sh_mv_setup(void) | |||
129 | 137 | ||
130 | mv_set(ioport_map); | 138 | mv_set(ioport_map); |
131 | mv_set(ioport_unmap); | 139 | mv_set(ioport_unmap); |
140 | |||
141 | #endif | ||
142 | |||
132 | mv_set(irq_demux); | 143 | mv_set(irq_demux); |
133 | mv_set(mode_pins); | 144 | mv_set(mode_pins); |
134 | mv_set(mem_init); | 145 | mv_set(mem_init); |
135 | 146 | ||
136 | if (!sh_mv.mv_nr_irqs) | 147 | if (!sh_mv.mv_nr_irqs) |
137 | sh_mv.mv_nr_irqs = NR_IRQS; | 148 | sh_mv.mv_nr_irqs = NR_IRQS; |
138 | |||
139 | #ifdef P2SEG | ||
140 | __set_io_port_base(P2SEG); | ||
141 | #else | ||
142 | __set_io_port_base(0); | ||
143 | #endif | ||
144 | } | 149 | } |
diff --git a/arch/sh/kernel/return_address.c b/arch/sh/kernel/return_address.c index cbf1dd5372b2..5124aeb28c3f 100644 --- a/arch/sh/kernel/return_address.c +++ b/arch/sh/kernel/return_address.c | |||
@@ -24,6 +24,8 @@ void *return_address(unsigned int depth) | |||
24 | struct dwarf_frame *tmp; | 24 | struct dwarf_frame *tmp; |
25 | 25 | ||
26 | tmp = dwarf_unwind_stack(ra, frame); | 26 | tmp = dwarf_unwind_stack(ra, frame); |
27 | if (!tmp) | ||
28 | return NULL; | ||
27 | 29 | ||
28 | if (frame) | 30 | if (frame) |
29 | dwarf_free_frame(frame); | 31 | dwarf_free_frame(frame); |