From: Kenn H. <ke...@us...> - 2005-03-28 16:26:24
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24554/arch/vax/kernel Modified Files: interrupt.c Log Message: Use local_irq_save/restore instead of the deprecated save_and_cli and restore_flags Index: interrupt.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/interrupt.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- interrupt.c 30 Sep 2004 21:19:02 -0000 1.27 +++ interrupt.c 28 Mar 2005 16:26:14 -0000 1.28 @@ -420,13 +420,13 @@ irq_enter(); - save_and_cli(flags); + local_irq_save(flags); dispatch_irq(regs, vec); irq_exit(); - restore_flags(flags); - if (softirq_pending(smp_processor_id())) { + local_irq_restore(flags); + if (local_softirq_pending()) { do_softirq(); } } @@ -450,7 +450,7 @@ void do_irq_excep(struct pt_regs *regs, void *inside_vec, void *excep_info) { struct irqvector *vec; - int cpu; + vec = (struct irqvector *)(inside_vec - offsetof(struct irqvector, excep_info_size)); @@ -471,18 +471,14 @@ } ret_from_sys_call: - cpu = smp_processor_id(); - if (softirq_pending(cpu)) { -// if (softirq_active(cpu)&softirq_mask(cpu)) { + if (local_softirq_pending()) { do_softirq(); goto ret_from_intr; } goto ret_with_reschedule; ret_from_exception: - cpu = smp_processor_id(); - if (softirq_pending(cpu)) { -// if (softirq_active(cpu)&softirq_mask(cpu)) { + if (local_softirq_pending()) { do_softirq(); } @@ -523,17 +519,17 @@ int flags; struct irqvector *vec; - save_and_cli(flags); + local_irq_save(flags); for (i=0, vec=irqvectors; i<NR_IRQVECTORS; i++, vec++) { if (vec->dest_addr == NULL) { vec->dest_addr = (void *)0xffffffff; - restore_flags(flags); + local_irq_restore(flags); return vec; } } - restore_flags(flags); + local_irq_restore(flags); return NULL; } @@ -565,10 +561,10 @@ int flags; extern void irqvec_handler(void); - save_and_cli(flags); + local_irq_save(flags); if (!scb_vec_free(vec_num)) { - restore_flags(flags); + local_irq_restore(flags); printk("hook_scb_vector: SCB vector %04x (%p) already in use\n", vec_num, SCB_VECTOR(vec_num)); return -EBUSY; @@ -594,7 +590,7 @@ flush_icache(); - restore_flags(flags); + local_irq_restore(flags); return 0; } @@ -638,10 +634,10 @@ struct irqvector *vector; unsigned char *inside_vec; - save_and_cli(flags); + local_irq_save(flags); if (scb_vec_free(vec_num)) { - restore_flags(flags); + local_irq_restore(flags); printk("unhook_scb_vector: SCB vector %04x already free\n", vec_num); return; } @@ -657,7 +653,7 @@ offsetof(struct irqvector, inst_jsb)); if (dev_id != vector->action.dev_id) { - restore_flags(flags); + local_irq_restore(flags); printk("unhook_scb_vector: dev_id mismatch (expected %p, currently %p)\n", dev_id, vector->action.dev_id); return; @@ -665,7 +661,7 @@ SCB_VECTOR(vec_num) = vector->orig_scb_vector; - restore_flags(flags); + local_irq_restore(flags); free_irqvector(vector); } @@ -683,13 +679,13 @@ int i; int flags; - save_and_cli(flags); + local_irq_save(flags); for (i = FIRST_ADAPTER_VECTOR; i < NR_IRQS; i++) stray_handlers[i].flags &= ~STRAY_EXCEPTION_FIRED; autoprobing=1; - restore_flags(flags); + local_irq_restore(flags); return 1; } @@ -704,7 +700,7 @@ nr_vecs = 0; vec_found = 0; - save_and_cli(flags); + local_irq_save(flags); for (i = FIRST_ADAPTER_VECTOR; i < NR_IRQS; i++) { if (stray_handlers[i].flags & STRAY_EXCEPTION_FIRED) { @@ -713,7 +709,7 @@ } } autoprobing=0; - restore_flags(flags); + local_irq_restore(flags); if (nr_vecs > 1) { vec_found = -vec_found; |