diff options
Diffstat (limited to 'arch/alpha/kernel')
-rw-r--r-- | arch/alpha/kernel/core_mcpcia.c | 2 | ||||
-rw-r--r-- | arch/alpha/kernel/err_titan.c | 1 | ||||
-rw-r--r-- | arch/alpha/kernel/module.c | 8 | ||||
-rw-r--r-- | arch/alpha/kernel/sys_nautilus.c | 6 | ||||
-rw-r--r-- | arch/alpha/kernel/sys_noritake.c | 9 | ||||
-rw-r--r-- | arch/alpha/kernel/sys_rawhide.c | 15 | ||||
-rw-r--r-- | arch/alpha/kernel/sys_sio.c | 14 | ||||
-rw-r--r-- | arch/alpha/kernel/sys_sx164.c | 2 | ||||
-rw-r--r-- | arch/alpha/kernel/sys_titan.c | 3 |
9 files changed, 45 insertions, 15 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_nautilus.c b/arch/alpha/kernel/sys_nautilus.c index e7594a7cf585..920196bcbb61 100644 --- a/arch/alpha/kernel/sys_nautilus.c +++ b/arch/alpha/kernel/sys_nautilus.c | |||
@@ -70,6 +70,12 @@ nautilus_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
70 | /* Preserve the IRQ set up by the console. */ | 70 | /* Preserve the IRQ set up by the console. */ |
71 | 71 | ||
72 | u8 irq; | 72 | u8 irq; |
73 | /* UP1500: AGP INTA is actually routed to IRQ 5, not IRQ 10 as | ||
74 | console reports. Check the device id of AGP bridge to distinguish | ||
75 | UP1500 from UP1000/1100. Note: 'pin' is 2 due to bridge swizzle. */ | ||
76 | if (slot == 1 && pin == 2 && | ||
77 | dev->bus->self && dev->bus->self->device == 0x700f) | ||
78 | return 5; | ||
73 | pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq); | 79 | pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq); |
74 | return irq; | 80 | return irq; |
75 | } | 81 | } |
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 | ||
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 | static struct hw_interrupt_type noritake_irq_type = { | 76 | static 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 | ||
79 | static void | 86 | static 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 | |||
55 | static inline void | 58 | static inline void |
56 | rawhide_enable_irq(unsigned int irq) | 59 | rawhide_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) | |||
84 | static void __init | 84 | static void __init |
85 | sio_pci_route(void) | 85 | sio_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 | }; |
340 | ALIAS_MV(avanti) | 344 | ALIAS_MV(avanti) |
diff --git a/arch/alpha/kernel/sys_sx164.c b/arch/alpha/kernel/sys_sx164.c index 94ad68b7c0ae..41d4ad4c7c44 100644 --- a/arch/alpha/kernel/sys_sx164.c +++ b/arch/alpha/kernel/sys_sx164.c | |||
@@ -132,7 +132,7 @@ sx164_init_arch(void) | |||
132 | 132 | ||
133 | if (amask(AMASK_MAX) != 0 | 133 | if (amask(AMASK_MAX) != 0 |
134 | && alpha_using_srm | 134 | && alpha_using_srm |
135 | && (cpu->pal_revision & 0xffff) == 0x117) { | 135 | && (cpu->pal_revision & 0xffff) <= 0x117) { |
136 | __asm__ __volatile__( | 136 | __asm__ __volatile__( |
137 | "lda $16,8($31)\n" | 137 | "lda $16,8($31)\n" |
138 | "call_pal 9\n" /* Allow PALRES insns in kernel mode */ | 138 | "call_pal 9\n" /* Allow PALRES insns in kernel mode */ |
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c index 29ab7db81c30..f009b7bc0943 100644 --- a/arch/alpha/kernel/sys_titan.c +++ b/arch/alpha/kernel/sys_titan.c | |||
@@ -257,8 +257,7 @@ titan_dispatch_irqs(u64 mask) | |||
257 | */ | 257 | */ |
258 | while (mask) { | 258 | while (mask) { |
259 | /* convert to SRM vector... priority is <63> -> <0> */ | 259 | /* convert to SRM vector... priority is <63> -> <0> */ |
260 | __asm__("ctlz %1, %0" : "=r"(vector) : "r"(mask)); | 260 | vector = 63 - __kernel_ctlz(mask); |
261 | vector = 63 - vector; | ||
262 | mask &= ~(1UL << vector); /* clear it out */ | 261 | mask &= ~(1UL << vector); /* clear it out */ |
263 | vector = 0x900 + (vector << 4); /* convert to SRM vector */ | 262 | vector = 0x900 + (vector << 4); /* convert to SRM vector */ |
264 | 263 | ||