Commit 1b75b05b73cdefd1d10074e9dad60812f9731a5e
Committed by
Linus Torvalds
1 parent
8a93258ce3
Exists in
master
and in
39 other branches
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>
Showing 8 changed files with 40 additions and 12 deletions Side-by-side Diff
arch/alpha/kernel/core_mcpcia.c
arch/alpha/kernel/err_titan.c
arch/alpha/kernel/module.c
... | ... | @@ -285,12 +285,12 @@ |
285 | 285 | reloc_overflow: |
286 | 286 | if (ELF64_ST_TYPE (sym->st_info) == STT_SECTION) |
287 | 287 | printk(KERN_ERR |
288 | - "module %s: Relocation overflow vs section %d\n", | |
289 | - me->name, sym->st_shndx); | |
288 | + "module %s: Relocation (type %lu) overflow vs section %d\n", | |
289 | + me->name, r_type, sym->st_shndx); | |
290 | 290 | else |
291 | 291 | printk(KERN_ERR |
292 | - "module %s: Relocation overflow vs %s\n", | |
293 | - me->name, strtab + sym->st_name); | |
292 | + "module %s: Relocation (type %lu) overflow vs %s\n", | |
293 | + me->name, r_type, strtab + sym->st_name); | |
294 | 294 | return -ENOEXEC; |
295 | 295 | } |
296 | 296 | } |
arch/alpha/kernel/sys_noritake.c
... | ... | @@ -66,6 +66,13 @@ |
66 | 66 | return 0; |
67 | 67 | } |
68 | 68 | |
69 | +static void | |
70 | +noritake_end_irq(unsigned int irq) | |
71 | +{ | |
72 | + if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | |
73 | + noritake_enable_irq(irq); | |
74 | +} | |
75 | + | |
69 | 76 | static struct hw_interrupt_type noritake_irq_type = { |
70 | 77 | .typename = "NORITAKE", |
71 | 78 | .startup = noritake_startup_irq, |
... | ... | @@ -73,7 +80,7 @@ |
73 | 80 | .enable = noritake_enable_irq, |
74 | 81 | .disable = noritake_disable_irq, |
75 | 82 | .ack = noritake_disable_irq, |
76 | - .end = noritake_enable_irq, | |
83 | + .end = noritake_end_irq, | |
77 | 84 | }; |
78 | 85 | |
79 | 86 | static void |
arch/alpha/kernel/sys_rawhide.c
... | ... | @@ -52,6 +52,9 @@ |
52 | 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 | + | |
55 | 58 | static inline void |
56 | 59 | rawhide_enable_irq(unsigned int irq) |
57 | 60 | { |
... | ... | @@ -59,6 +62,9 @@ |
59 | 62 | |
60 | 63 | irq -= 16; |
61 | 64 | hose = irq / 24; |
65 | + if (!hose_exists(hose)) /* if hose non-existent, exit */ | |
66 | + return; | |
67 | + | |
62 | 68 | irq -= hose * 24; |
63 | 69 | mask = 1 << irq; |
64 | 70 | |
... | ... | @@ -76,6 +82,9 @@ |
76 | 82 | |
77 | 83 | irq -= 16; |
78 | 84 | hose = irq / 24; |
85 | + if (!hose_exists(hose)) /* if hose non-existent, exit */ | |
86 | + return; | |
87 | + | |
79 | 88 | irq -= hose * 24; |
80 | 89 | mask = ~(1 << irq) | hose_irq_masks[hose]; |
81 | 90 | |
... | ... | @@ -93,6 +102,9 @@ |
93 | 102 | |
94 | 103 | irq -= 16; |
95 | 104 | hose = irq / 24; |
105 | + if (!hose_exists(hose)) /* if hose non-existent, exit */ | |
106 | + return; | |
107 | + | |
96 | 108 | irq -= hose * 24; |
97 | 109 | mask1 = 1 << irq; |
98 | 110 | mask = ~mask1 | hose_irq_masks[hose]; |
... | ... | @@ -168,6 +180,9 @@ |
168 | 180 | long i; |
169 | 181 | |
170 | 182 | mcpcia_init_hoses(); |
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; | |
171 | 186 | |
172 | 187 | for (hose = hose_head; hose; hose = hose->next) { |
173 | 188 | unsigned int h = hose->index; |
arch/alpha/kernel/sys_sio.c
... | ... | @@ -84,12 +84,16 @@ |
84 | 84 | static void __init |
85 | 85 | sio_pci_route(void) |
86 | 86 | { |
87 | -#if defined(ALPHA_RESTORE_SRM_SETUP) | |
88 | - /* First, read and save the original setting. */ | |
87 | + unsigned int orig_route_tab; | |
88 | + | |
89 | + /* First, ALWAYS read and print the original setting. */ | |
89 | 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 | 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 | 97 | #endif |
94 | 98 | |
95 | 99 | /* Now override with desired setting. */ |
... | ... | @@ -334,7 +338,7 @@ |
334 | 338 | .pci_swizzle = common_swizzle, |
335 | 339 | |
336 | 340 | .sys = { .sio = { |
337 | - .route_tab = 0x0b0a0e0f, | |
341 | + .route_tab = 0x0b0a050f, /* leave 14 for IDE, 9 for SND */ | |
338 | 342 | }} |
339 | 343 | }; |
340 | 344 | ALIAS_MV(avanti) |
include/asm-alpha/core_mcpcia.h
include/asm-alpha/io.h