aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-18 19:07:27 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-18 19:07:27 -0400
commitfbeb1f19229baa9ee80f315e9d24635045455082 (patch)
treedc7bd3f3d9c289293f9ed11d0ff3b506444285b0 /arch
parent5851fadce8824d5d4b8fd02c22ae098401f6489e (diff)
parent0b3d4ef6fe43b75d4b2a6fc4b814cf03aa248e13 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: serial: Fix sh-sci break interrupt/sysrq handling. sh: Fix bogus regs pointer in do_IRQ(). sh: Fix SH-3 cache entry_mask and way_size calculation. sh: Convert struct ioctls to static defines. sh: Define missing __NR_readahead. sh: Fix PCI BAR address-space wraparound.
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/drivers/pci/pci-auto.c6
-rw-r--r--arch/sh/kernel/cpu/init.c20
-rw-r--r--arch/sh/kernel/cpu/sh2/entry.S1
-rw-r--r--arch/sh/kernel/cpu/sh3/entry.S5
-rw-r--r--arch/sh/kernel/cpu/sh4/probe.c13
-rw-r--r--arch/sh/kernel/irq.c15
6 files changed, 30 insertions, 30 deletions
diff --git a/arch/sh/drivers/pci/pci-auto.c b/arch/sh/drivers/pci/pci-auto.c
index ecf16344f94a..224e007736fb 100644
--- a/arch/sh/drivers/pci/pci-auto.c
+++ b/arch/sh/drivers/pci/pci-auto.c
@@ -214,6 +214,12 @@ retry:
214 continue; 214 continue;
215 } 215 }
216 216
217 if (bar_value < *lower_limit || (bar_value + bar_size) >= *upper_limit) {
218 DBG(" unavailable -- skipping, value %x size %x\n",
219 bar_value, bar_size);
220 continue;
221 }
222
217#ifdef CONFIG_PCI_AUTO_UPDATE_RESOURCES 223#ifdef CONFIG_PCI_AUTO_UPDATE_RESOURCES
218 /* Write it out and update our limit */ 224 /* Write it out and update our limit */
219 early_write_config_dword(hose, top_bus, current_bus, pci_devfn, 225 early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
diff --git a/arch/sh/kernel/cpu/init.c b/arch/sh/kernel/cpu/init.c
index 4b339a640b13..726acfcb9b77 100644
--- a/arch/sh/kernel/cpu/init.c
+++ b/arch/sh/kernel/cpu/init.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * CPU init code 4 * CPU init code
5 * 5 *
6 * Copyright (C) 2002 - 2006 Paul Mundt 6 * Copyright (C) 2002 - 2007 Paul Mundt
7 * Copyright (C) 2003 Richard Curnow 7 * Copyright (C) 2003 Richard Curnow
8 * 8 *
9 * This file is subject to the terms and conditions of the GNU General Public 9 * This file is subject to the terms and conditions of the GNU General Public
@@ -48,8 +48,19 @@ static void __init cache_init(void)
48{ 48{
49 unsigned long ccr, flags; 49 unsigned long ccr, flags;
50 50
51 if (current_cpu_data.type == CPU_SH_NONE) 51 /* First setup the rest of the I-cache info */
52 panic("Unknown CPU"); 52 current_cpu_data.icache.entry_mask = current_cpu_data.icache.way_incr -
53 current_cpu_data.icache.linesz;
54
55 current_cpu_data.icache.way_size = current_cpu_data.icache.sets *
56 current_cpu_data.icache.linesz;
57
58 /* And the D-cache too */
59 current_cpu_data.dcache.entry_mask = current_cpu_data.dcache.way_incr -
60 current_cpu_data.dcache.linesz;
61
62 current_cpu_data.dcache.way_size = current_cpu_data.dcache.sets *
63 current_cpu_data.dcache.linesz;
53 64
54 jump_to_P2(); 65 jump_to_P2();
55 ccr = ctrl_inl(CCR); 66 ccr = ctrl_inl(CCR);
@@ -200,6 +211,9 @@ asmlinkage void __init sh_cpu_init(void)
200 /* First, probe the CPU */ 211 /* First, probe the CPU */
201 detect_cpu_and_cache_system(); 212 detect_cpu_and_cache_system();
202 213
214 if (current_cpu_data.type == CPU_SH_NONE)
215 panic("Unknown CPU");
216
203 /* Init the cache */ 217 /* Init the cache */
204 cache_init(); 218 cache_init();
205 219
diff --git a/arch/sh/kernel/cpu/sh2/entry.S b/arch/sh/kernel/cpu/sh2/entry.S
index 7f7d292f36ec..c16dc8fec489 100644
--- a/arch/sh/kernel/cpu/sh2/entry.S
+++ b/arch/sh/kernel/cpu/sh2/entry.S
@@ -165,6 +165,7 @@ ENTRY(exception_handler)
165 165
166interrupt_entry: 166interrupt_entry:
167 mov r9,r4 167 mov r9,r4
168 mov r15,r5
168 mov.l 6f,r9 169 mov.l 6f,r9
169 mov.l 7f,r8 170 mov.l 7f,r8
170 jmp @r8 171 jmp @r8
diff --git a/arch/sh/kernel/cpu/sh3/entry.S b/arch/sh/kernel/cpu/sh3/entry.S
index c19205b0f2c0..f3e827f29a46 100644
--- a/arch/sh/kernel/cpu/sh3/entry.S
+++ b/arch/sh/kernel/cpu/sh3/entry.S
@@ -514,13 +514,16 @@ skip_save:
514 514
515interrupt_exception: 515interrupt_exception:
516 mov.l 1f, r9 516 mov.l 1f, r9
517 mov.l 2f, r4
518 mov.l @r4, r4
517 jmp @r9 519 jmp @r9
518 nop 520 mov r15, r5
519 rts 521 rts
520 nop 522 nop
521 523
522 .align 2 524 .align 2
5231: .long do_IRQ 5251: .long do_IRQ
5262: .long INTEVT
524 527
525 .align 2 528 .align 2
526ENTRY(exception_none) 529ENTRY(exception_none)
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c
index 9d28c88d2f9d..58950de2696d 100644
--- a/arch/sh/kernel/cpu/sh4/probe.c
+++ b/arch/sh/kernel/cpu/sh4/probe.c
@@ -195,13 +195,6 @@ int __init detect_cpu_and_cache_system(void)
195 195
196 } 196 }
197 197
198 /* Setup the rest of the I-cache info */
199 current_cpu_data.icache.entry_mask = current_cpu_data.icache.way_incr -
200 current_cpu_data.icache.linesz;
201
202 current_cpu_data.icache.way_size = current_cpu_data.icache.sets *
203 current_cpu_data.icache.linesz;
204
205 /* And the rest of the D-cache */ 198 /* And the rest of the D-cache */
206 if (current_cpu_data.dcache.ways > 1) { 199 if (current_cpu_data.dcache.ways > 1) {
207 size = sizes[(cvr >> 16) & 0xf]; 200 size = sizes[(cvr >> 16) & 0xf];
@@ -209,12 +202,6 @@ int __init detect_cpu_and_cache_system(void)
209 current_cpu_data.dcache.sets = (size >> 6); 202 current_cpu_data.dcache.sets = (size >> 6);
210 } 203 }
211 204
212 current_cpu_data.dcache.entry_mask = current_cpu_data.dcache.way_incr -
213 current_cpu_data.dcache.linesz;
214
215 current_cpu_data.dcache.way_size = current_cpu_data.dcache.sets *
216 current_cpu_data.dcache.linesz;
217
218 /* 205 /*
219 * Setup the L2 cache desc 206 * Setup the L2 cache desc
220 * 207 *
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c
index 67be2b6e8cd1..9bdd8a00cd4a 100644
--- a/arch/sh/kernel/irq.c
+++ b/arch/sh/kernel/irq.c
@@ -11,7 +11,6 @@
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/kernel_stat.h> 12#include <linux/kernel_stat.h>
13#include <linux/seq_file.h> 13#include <linux/seq_file.h>
14#include <linux/io.h>
15#include <linux/irq.h> 14#include <linux/irq.h>
16#include <asm/processor.h> 15#include <asm/processor.h>
17#include <asm/uaccess.h> 16#include <asm/uaccess.h>
@@ -82,13 +81,9 @@ static union irq_ctx *hardirq_ctx[NR_CPUS] __read_mostly;
82static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly; 81static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly;
83#endif 82#endif
84 83
85asmlinkage int do_IRQ(unsigned long r4, unsigned long r5, 84asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
86 unsigned long r6, unsigned long r7,
87 struct pt_regs __regs)
88{ 85{
89 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
90 struct pt_regs *old_regs = set_irq_regs(regs); 86 struct pt_regs *old_regs = set_irq_regs(regs);
91 int irq;
92#ifdef CONFIG_4KSTACKS 87#ifdef CONFIG_4KSTACKS
93 union irq_ctx *curctx, *irqctx; 88 union irq_ctx *curctx, *irqctx;
94#endif 89#endif
@@ -111,13 +106,7 @@ asmlinkage int do_IRQ(unsigned long r4, unsigned long r5,
111 } 106 }
112#endif 107#endif
113 108
114#ifdef CONFIG_CPU_HAS_INTEVT 109 irq = irq_demux(evt2irq(irq));
115 irq = evt2irq(ctrl_inl(INTEVT));
116#else
117 irq = r4;
118#endif
119
120 irq = irq_demux(irq);
121 110
122#ifdef CONFIG_4KSTACKS 111#ifdef CONFIG_4KSTACKS
123 curctx = (union irq_ctx *)current_thread_info(); 112 curctx = (union irq_ctx *)current_thread_info();