aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel
diff options
context:
space:
mode:
authorIvan Kokshaysky <ink@jurassic.park.msu.ru>2007-04-17 01:53:17 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-17 19:36:27 -0400
commit1b75b05b73cdefd1d10074e9dad60812f9731a5e (patch)
treea477c79aa402cd2e2600dc99a7d772e6bf84c5c1 /arch/alpha/kernel
parent8a93258ce302c2b597289770cb7de8dba7c6c219 (diff)
alpha: fixes for specific machine types
Files: arch/alpha/kernel/core_mcpcia.c arch/alpha/kernel/sys_rawhide.c include/asm-alpha/core_mcpcia.h Determine correct hose configuration; RAWHIDE family can have 2 or 4 hoses, so make sure non-existent hoses are ignored. arch/alpha/kernel/err_titan.c Supply a needed #include <asm/irq_regs.h> arch/alpha/kernel/module.c Add some useful output to the relocation overflow messages. arch/alpha/kernel/sys_noritake.c Supply necessary noritake_end_irq() to correct interrupt handling. This fixes a problem first noted by hangs during boot probing with a DE500-BA TULIP NIC present. arch/alpha/kernel/sys_sio.c Correct saving of original PIRQ register (PCI IRQ routing); change default PIRQ setting to leave PCI IRQs 9 and 14 free to be used for sound (Multia) and IDE (any), respectively. include/asm-alpha/io.h Supply the "isa_virt_to_bus" routine. Signed-off-by: Jay Estabrook <jay.estabrook@hp.com> Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/alpha/kernel')
-rw-r--r--arch/alpha/kernel/core_mcpcia.c2
-rw-r--r--arch/alpha/kernel/err_titan.c1
-rw-r--r--arch/alpha/kernel/module.c8
-rw-r--r--arch/alpha/kernel/sys_noritake.c9
-rw-r--r--arch/alpha/kernel/sys_rawhide.c15
-rw-r--r--arch/alpha/kernel/sys_sio.c14
6 files changed, 37 insertions, 12 deletions
diff --git a/arch/alpha/kernel/core_mcpcia.c b/arch/alpha/kernel/core_mcpcia.c
index 8d019071190a..381fec0af52e 100644
--- a/arch/alpha/kernel/core_mcpcia.c
+++ b/arch/alpha/kernel/core_mcpcia.c
@@ -40,8 +40,6 @@
40# define DBG_CFG(args) 40# define DBG_CFG(args)
41#endif 41#endif
42 42
43#define MCPCIA_MAX_HOSES 4
44
45/* 43/*
46 * Given a bus, device, and function number, compute resulting 44 * Given a bus, device, and function number, compute resulting
47 * configuration space address and setup the MCPCIA_HAXR2 register 45 * configuration space address and setup the MCPCIA_HAXR2 register
diff --git a/arch/alpha/kernel/err_titan.c b/arch/alpha/kernel/err_titan.c
index febe71c6869f..543d96d7fa2b 100644
--- a/arch/alpha/kernel/err_titan.c
+++ b/arch/alpha/kernel/err_titan.c
@@ -16,6 +16,7 @@
16#include <asm/smp.h> 16#include <asm/smp.h>
17#include <asm/err_common.h> 17#include <asm/err_common.h>
18#include <asm/err_ev6.h> 18#include <asm/err_ev6.h>
19#include <asm/irq_regs.h>
19 20
20#include "err_impl.h" 21#include "err_impl.h"
21#include "proto.h" 22#include "proto.h"
diff --git a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c
index aac6d4b22f7a..bd03dc94c72b 100644
--- a/arch/alpha/kernel/module.c
+++ b/arch/alpha/kernel/module.c
@@ -285,12 +285,12 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab,
285 reloc_overflow: 285 reloc_overflow:
286 if (ELF64_ST_TYPE (sym->st_info) == STT_SECTION) 286 if (ELF64_ST_TYPE (sym->st_info) == STT_SECTION)
287 printk(KERN_ERR 287 printk(KERN_ERR
288 "module %s: Relocation overflow vs section %d\n", 288 "module %s: Relocation (type %lu) overflow vs section %d\n",
289 me->name, sym->st_shndx); 289 me->name, r_type, sym->st_shndx);
290 else 290 else
291 printk(KERN_ERR 291 printk(KERN_ERR
292 "module %s: Relocation overflow vs %s\n", 292 "module %s: Relocation (type %lu) overflow vs %s\n",
293 me->name, strtab + sym->st_name); 293 me->name, r_type, strtab + sym->st_name);
294 return -ENOEXEC; 294 return -ENOEXEC;
295 } 295 }
296 } 296 }
diff --git a/arch/alpha/kernel/sys_noritake.c b/arch/alpha/kernel/sys_noritake.c
index de6ba3432e8a..eb2a1d63f484 100644
--- a/arch/alpha/kernel/sys_noritake.c
+++ b/arch/alpha/kernel/sys_noritake.c
@@ -66,6 +66,13 @@ noritake_startup_irq(unsigned int irq)
66 return 0; 66 return 0;
67} 67}
68 68
69static void
70noritake_end_irq(unsigned int irq)
71{
72 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
73 noritake_enable_irq(irq);
74}
75
69static struct hw_interrupt_type noritake_irq_type = { 76static struct hw_interrupt_type noritake_irq_type = {
70 .typename = "NORITAKE", 77 .typename = "NORITAKE",
71 .startup = noritake_startup_irq, 78 .startup = noritake_startup_irq,
@@ -73,7 +80,7 @@ static struct hw_interrupt_type noritake_irq_type = {
73 .enable = noritake_enable_irq, 80 .enable = noritake_enable_irq,
74 .disable = noritake_disable_irq, 81 .disable = noritake_disable_irq,
75 .ack = noritake_disable_irq, 82 .ack = noritake_disable_irq,
76 .end = noritake_enable_irq, 83 .end = noritake_end_irq,
77}; 84};
78 85
79static void 86static void
diff --git a/arch/alpha/kernel/sys_rawhide.c b/arch/alpha/kernel/sys_rawhide.c
index 581d08c70b92..672cb2df53df 100644
--- a/arch/alpha/kernel/sys_rawhide.c
+++ b/arch/alpha/kernel/sys_rawhide.c
@@ -52,6 +52,9 @@ rawhide_update_irq_hw(int hose, int mask)
52 *(vuip)MCPCIA_INT_MASK0(MCPCIA_HOSE2MID(hose)); 52 *(vuip)MCPCIA_INT_MASK0(MCPCIA_HOSE2MID(hose));
53} 53}
54 54
55#define hose_exists(h) \
56 (((h) < MCPCIA_MAX_HOSES) && (cached_irq_masks[(h)] != 0))
57
55static inline void 58static inline void
56rawhide_enable_irq(unsigned int irq) 59rawhide_enable_irq(unsigned int irq)
57{ 60{
@@ -59,6 +62,9 @@ rawhide_enable_irq(unsigned int irq)
59 62
60 irq -= 16; 63 irq -= 16;
61 hose = irq / 24; 64 hose = irq / 24;
65 if (!hose_exists(hose)) /* if hose non-existent, exit */
66 return;
67
62 irq -= hose * 24; 68 irq -= hose * 24;
63 mask = 1 << irq; 69 mask = 1 << irq;
64 70
@@ -76,6 +82,9 @@ rawhide_disable_irq(unsigned int irq)
76 82
77 irq -= 16; 83 irq -= 16;
78 hose = irq / 24; 84 hose = irq / 24;
85 if (!hose_exists(hose)) /* if hose non-existent, exit */
86 return;
87
79 irq -= hose * 24; 88 irq -= hose * 24;
80 mask = ~(1 << irq) | hose_irq_masks[hose]; 89 mask = ~(1 << irq) | hose_irq_masks[hose];
81 90
@@ -93,6 +102,9 @@ rawhide_mask_and_ack_irq(unsigned int irq)
93 102
94 irq -= 16; 103 irq -= 16;
95 hose = irq / 24; 104 hose = irq / 24;
105 if (!hose_exists(hose)) /* if hose non-existent, exit */
106 return;
107
96 irq -= hose * 24; 108 irq -= hose * 24;
97 mask1 = 1 << irq; 109 mask1 = 1 << irq;
98 mask = ~mask1 | hose_irq_masks[hose]; 110 mask = ~mask1 | hose_irq_masks[hose];
@@ -169,6 +181,9 @@ rawhide_init_irq(void)
169 181
170 mcpcia_init_hoses(); 182 mcpcia_init_hoses();
171 183
184 /* Clear them all; only hoses that exist will be non-zero. */
185 for (i = 0; i < MCPCIA_MAX_HOSES; i++) cached_irq_masks[i] = 0;
186
172 for (hose = hose_head; hose; hose = hose->next) { 187 for (hose = hose_head; hose; hose = hose->next) {
173 unsigned int h = hose->index; 188 unsigned int h = hose->index;
174 unsigned int mask = hose_irq_masks[h]; 189 unsigned int mask = hose_irq_masks[h];
diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
index a654014d202a..14b5a753aba5 100644
--- a/arch/alpha/kernel/sys_sio.c
+++ b/arch/alpha/kernel/sys_sio.c
@@ -84,12 +84,16 @@ alphabook1_init_arch(void)
84static void __init 84static void __init
85sio_pci_route(void) 85sio_pci_route(void)
86{ 86{
87#if defined(ALPHA_RESTORE_SRM_SETUP) 87 unsigned int orig_route_tab;
88 /* First, read and save the original setting. */ 88
89 /* First, ALWAYS read and print the original setting. */
89 pci_bus_read_config_dword(pci_isa_hose->bus, PCI_DEVFN(7, 0), 0x60, 90 pci_bus_read_config_dword(pci_isa_hose->bus, PCI_DEVFN(7, 0), 0x60,
90 &saved_config.orig_route_tab); 91 &orig_route_tab);
91 printk("%s: PIRQ original 0x%x new 0x%x\n", __FUNCTION__, 92 printk("%s: PIRQ original 0x%x new 0x%x\n", __FUNCTION__,
92 saved_config.orig_route_tab, alpha_mv.sys.sio.route_tab); 93 orig_route_tab, alpha_mv.sys.sio.route_tab);
94
95#if defined(ALPHA_RESTORE_SRM_SETUP)
96 saved_config.orig_route_tab = orig_route_tab;
93#endif 97#endif
94 98
95 /* Now override with desired setting. */ 99 /* Now override with desired setting. */
@@ -334,7 +338,7 @@ struct alpha_machine_vector avanti_mv __initmv = {
334 .pci_swizzle = common_swizzle, 338 .pci_swizzle = common_swizzle,
335 339
336 .sys = { .sio = { 340 .sys = { .sio = {
337 .route_tab = 0x0b0a0e0f, 341 .route_tab = 0x0b0a050f, /* leave 14 for IDE, 9 for SND */
338 }} 342 }}
339}; 343};
340ALIAS_MV(avanti) 344ALIAS_MV(avanti)