aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2007-03-07 17:57:35 -0500
committerTony Luck <tony.luck@intel.com>2007-03-07 17:57:35 -0500
commite253eb0c082e71082cc980a0c81582c2bc734605 (patch)
tree985f9a758aa1b429d0b057950728ed2572e892e2
parent08e15e81a40e3241ce93b4a43886f3abda184aa6 (diff)
[IA64] fix NULL pointer in ia64/irq_chip-mask/unmask function
This patch fixes boot failure because irq_desc->mask() is NULL. - Added mask/unmask functions to ia64's irq desc function table. - rename hw_interrupt_type to irq_chip. hw_interrupt_type is old name. - Tony: Added same change to arch/ia64/sn/kernel/irq.c as pointed out by Eric Biederman ... mask/unmask functions there can be no-op. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r--arch/ia64/kernel/iosapic.c8
-rw-r--r--arch/ia64/sn/kernel/irq.c14
2 files changed, 19 insertions, 3 deletions
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index d6aab40c6416..dcfbf3e7a9ef 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -446,7 +446,7 @@ iosapic_end_level_irq (unsigned int irq)
446#define iosapic_disable_level_irq mask_irq 446#define iosapic_disable_level_irq mask_irq
447#define iosapic_ack_level_irq nop 447#define iosapic_ack_level_irq nop
448 448
449struct hw_interrupt_type irq_type_iosapic_level = { 449struct irq_chip irq_type_iosapic_level = {
450 .name = "IO-SAPIC-level", 450 .name = "IO-SAPIC-level",
451 .startup = iosapic_startup_level_irq, 451 .startup = iosapic_startup_level_irq,
452 .shutdown = iosapic_shutdown_level_irq, 452 .shutdown = iosapic_shutdown_level_irq,
@@ -454,6 +454,8 @@ struct hw_interrupt_type irq_type_iosapic_level = {
454 .disable = iosapic_disable_level_irq, 454 .disable = iosapic_disable_level_irq,
455 .ack = iosapic_ack_level_irq, 455 .ack = iosapic_ack_level_irq,
456 .end = iosapic_end_level_irq, 456 .end = iosapic_end_level_irq,
457 .mask = mask_irq,
458 .unmask = unmask_irq,
457 .set_affinity = iosapic_set_affinity 459 .set_affinity = iosapic_set_affinity
458}; 460};
459 461
@@ -493,7 +495,7 @@ iosapic_ack_edge_irq (unsigned int irq)
493#define iosapic_disable_edge_irq nop 495#define iosapic_disable_edge_irq nop
494#define iosapic_end_edge_irq nop 496#define iosapic_end_edge_irq nop
495 497
496struct hw_interrupt_type irq_type_iosapic_edge = { 498struct irq_chip irq_type_iosapic_edge = {
497 .name = "IO-SAPIC-edge", 499 .name = "IO-SAPIC-edge",
498 .startup = iosapic_startup_edge_irq, 500 .startup = iosapic_startup_edge_irq,
499 .shutdown = iosapic_disable_edge_irq, 501 .shutdown = iosapic_disable_edge_irq,
@@ -501,6 +503,8 @@ struct hw_interrupt_type irq_type_iosapic_edge = {
501 .disable = iosapic_disable_edge_irq, 503 .disable = iosapic_disable_edge_irq,
502 .ack = iosapic_ack_edge_irq, 504 .ack = iosapic_ack_edge_irq,
503 .end = iosapic_end_edge_irq, 505 .end = iosapic_end_edge_irq,
506 .mask = mask_irq,
507 .unmask = unmask_irq,
504 .set_affinity = iosapic_set_affinity 508 .set_affinity = iosapic_set_affinity
505}; 509};
506 510
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c
index 8c5bee01eaa2..8d2a1bfbfe7c 100644
--- a/arch/ia64/sn/kernel/irq.c
+++ b/arch/ia64/sn/kernel/irq.c
@@ -205,7 +205,17 @@ static void sn_set_affinity_irq(unsigned int irq, cpumask_t mask)
205 (void)sn_retarget_vector(sn_irq_info, nasid, slice); 205 (void)sn_retarget_vector(sn_irq_info, nasid, slice);
206} 206}
207 207
208struct hw_interrupt_type irq_type_sn = { 208static void
209sn_mask_irq(unsigned int irq)
210{
211}
212
213static void
214sn_unmask_irq(unsigned int irq)
215{
216}
217
218struct irq_chip irq_type_sn = {
209 .name = "SN hub", 219 .name = "SN hub",
210 .startup = sn_startup_irq, 220 .startup = sn_startup_irq,
211 .shutdown = sn_shutdown_irq, 221 .shutdown = sn_shutdown_irq,
@@ -213,6 +223,8 @@ struct hw_interrupt_type irq_type_sn = {
213 .disable = sn_disable_irq, 223 .disable = sn_disable_irq,
214 .ack = sn_ack_irq, 224 .ack = sn_ack_irq,
215 .end = sn_end_irq, 225 .end = sn_end_irq,
226 .mask = sn_mask_irq,
227 .unmask = sn_unmask_irq,
216 .set_affinity = sn_set_affinity_irq 228 .set_affinity = sn_set_affinity_irq
217}; 229};
218 230