diff -rNu linux-bk/Documentation/cli-sti-removal.txt linux/Documentation/cli-sti-removal.txt --- linux-bk/Documentation/cli-sti-removal.txt Mon Jul 22 19:22:42 2002 +++ linux/Documentation/cli-sti-removal.txt Mon Jul 22 19:55:55 2002 @@ -95,7 +95,7 @@ drivers that want to disable local interrupts (interrupts on the current CPU), can use the following four macros: - __cli(), __sti(), __save_flags(flags), __restore_flags(flags) + local_irq_disable(), local_irq_enable(), local_save_flags(flags), local_irq_restore(flags) but beware, their meaning and semantics are much simpler, far from that of cli(), sti(), save_flags(flags) and restore_flags(flags). diff -rNu linux-bk/Documentation/s390/cds.txt linux/Documentation/s390/cds.txt --- linux-bk/Documentation/s390/cds.txt Sun Jun 9 07:28:13 2002 +++ linux/Documentation/s390/cds.txt Mon Jul 22 19:55:53 2002 @@ -885,8 +885,8 @@ Prior to call do_IO() the device driver must assure disabled state, i.e. the I/O mask value in the PSW must be disabled. This can be accomplished by calling -__save_flags( flags). The current PSW flags are preserved and can be restored -by __restore_flags( flags) at a later time. +local_save_flags( flags). The current PSW flags are preserved and can be restored +by local_irq_restore( flags) at a later time. If the device driver violates this rule while running in a uni-processor environment an interrupt might be presented prior to the do_IO() routine diff -rNu linux-bk/arch/alpha/kernel/core_apecs.c linux/arch/alpha/kernel/core_apecs.c --- linux-bk/arch/alpha/kernel/core_apecs.c Sun Jun 9 07:28:21 2002 +++ linux/arch/alpha/kernel/core_apecs.c Mon Jul 22 19:55:05 2002 @@ -131,7 +131,7 @@ unsigned int stat0, value; unsigned int haxr2 = 0; - __save_and_cli(flags); /* avoid getting hit by machine check */ + local_irq_save(flags); /* avoid getting hit by machine check */ DBGC(("conf_read(addr=0x%lx, type1=%d)\n", addr, type1)); @@ -201,7 +201,7 @@ *(vuip)APECS_IOC_HAXR2 = haxr2 & ~1; mb(); } - __restore_flags(flags); + local_irq_restore(flags); return value; } @@ -213,7 +213,7 @@ unsigned int stat0; unsigned int haxr2 = 0; - __save_and_cli(flags); /* avoid getting hit by machine check */ + local_irq_save(flags); /* avoid getting hit by machine check */ /* Reset status register to avoid losing errors. */ stat0 = *(vuip)APECS_IOC_DCSR; @@ -269,7 +269,7 @@ *(vuip)APECS_IOC_HAXR2 = haxr2 & ~1; mb(); } - __restore_flags(flags); + local_irq_restore(flags); } static int diff -rNu linux-bk/arch/alpha/kernel/core_cia.c linux/arch/alpha/kernel/core_cia.c --- linux-bk/arch/alpha/kernel/core_cia.c Sun Jun 9 07:30:32 2002 +++ linux/arch/alpha/kernel/core_cia.c Mon Jul 22 19:55:05 2002 @@ -113,7 +113,7 @@ int cia_cfg = 0; DBGC(("conf_read(addr=0x%lx, type1=%d) ", addr, type1)); - __save_and_cli(flags); + local_irq_save(flags); /* Reset status register to avoid losing errors. */ stat0 = *(vip)CIA_IOC_CIA_ERR; @@ -154,7 +154,7 @@ *(vip)CIA_IOC_CFG; } - __restore_flags(flags); + local_irq_restore(flags); DBGC(("done\n")); return value; @@ -167,7 +167,7 @@ int stat0, cia_cfg = 0; DBGC(("conf_write(addr=0x%lx, type1=%d) ", addr, type1)); - __save_and_cli(flags); + local_irq_save(flags); /* Reset status register to avoid losing errors. */ stat0 = *(vip)CIA_IOC_CIA_ERR; @@ -204,7 +204,7 @@ *(vip)CIA_IOC_CFG; } - __restore_flags(flags); + local_irq_restore(flags); DBGC(("done\n")); } diff -rNu linux-bk/arch/alpha/kernel/core_lca.c linux/arch/alpha/kernel/core_lca.c --- linux-bk/arch/alpha/kernel/core_lca.c Sun Jun 9 07:28:23 2002 +++ linux/arch/alpha/kernel/core_lca.c Mon Jul 22 19:55:05 2002 @@ -132,7 +132,7 @@ unsigned long flags, code, stat0; unsigned int value; - __save_and_cli(flags); + local_irq_save(flags); /* Reset status register to avoid loosing errors. */ stat0 = *(vulp)LCA_IOC_STAT0; @@ -160,7 +160,7 @@ value = 0xffffffff; } - __restore_flags(flags); + local_irq_restore(flags); return value; } @@ -169,7 +169,7 @@ { unsigned long flags, code, stat0; - __save_and_cli(flags); /* avoid getting hit by machine check */ + local_irq_save(flags); /* avoid getting hit by machine check */ /* Reset status register to avoid loosing errors. */ stat0 = *(vulp)LCA_IOC_STAT0; @@ -195,7 +195,7 @@ /* Reset machine check. */ wrmces(0x7); } - __restore_flags(flags); + local_irq_restore(flags); } static int diff -rNu linux-bk/arch/alpha/kernel/core_mcpcia.c linux/arch/alpha/kernel/core_mcpcia.c --- linux-bk/arch/alpha/kernel/core_mcpcia.c Sun Jun 9 07:26:57 2002 +++ linux/arch/alpha/kernel/core_mcpcia.c Mon Jul 22 19:55:05 2002 @@ -97,7 +97,7 @@ cpu = smp_processor_id(); - __save_and_cli(flags); + local_irq_save(flags); DBG_CFG(("conf_read(addr=0x%lx, type1=%d, hose=%d)\n", addr, type1, mid)); @@ -131,7 +131,7 @@ DBG_CFG(("conf_read(): finished\n")); - __restore_flags(flags); + local_irq_restore(flags); return value; } @@ -145,7 +145,7 @@ cpu = smp_processor_id(); - __save_and_cli(flags); /* avoid getting hit by machine check */ + local_irq_save(flags); /* avoid getting hit by machine check */ /* Reset status register to avoid losing errors. */ stat0 = *(vuip)MCPCIA_CAP_ERR(mid); @@ -167,7 +167,7 @@ mb(); DBG_CFG(("conf_write(): finished\n")); - __restore_flags(flags); + local_irq_restore(flags); } static int diff -rNu linux-bk/arch/alpha/kernel/core_t2.c linux/arch/alpha/kernel/core_t2.c --- linux-bk/arch/alpha/kernel/core_t2.c Sun Jun 9 07:26:50 2002 +++ linux/arch/alpha/kernel/core_t2.c Mon Jul 22 19:55:05 2002 @@ -132,7 +132,7 @@ cpu = smp_processor_id(); - __save_and_cli(flags); /* avoid getting hit by machine check */ + local_irq_save(flags); /* avoid getting hit by machine check */ DBG(("conf_read(addr=0x%lx, type1=%d)\n", addr, type1)); @@ -181,7 +181,7 @@ } DBG(("conf_read(): finished\n")); - __restore_flags(flags); + local_irq_restore(flags); return value; } @@ -194,7 +194,7 @@ cpu = smp_processor_id(); - __save_and_cli(flags); /* avoid getting hit by machine check */ + local_irq_save(flags); /* avoid getting hit by machine check */ #if 0 { @@ -234,7 +234,7 @@ mb(); } DBG(("conf_write(): finished\n")); - __restore_flags(flags); + local_irq_restore(flags); } static int diff -rNu linux-bk/arch/alpha/kernel/irq.c linux/arch/alpha/kernel/irq.c --- linux-bk/arch/alpha/kernel/irq.c Sun Jun 9 07:31:17 2002 +++ linux/arch/alpha/kernel/irq.c Mon Jul 22 19:55:06 2002 @@ -85,9 +85,9 @@ do { if (!(action->flags & SA_INTERRUPT)) - __sti(); + local_irq_enable(); else - __cli(); + local_irq_disable(); status |= action->flags; action->handler(irq, action->dev_id, regs); @@ -95,7 +95,7 @@ } while (action); if (status & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); - __cli(); + local_irq_disable(); irq_exit(cpu, irq); diff -rNu linux-bk/arch/alpha/kernel/irq_smp.c linux/arch/alpha/kernel/irq_smp.c --- linux-bk/arch/alpha/kernel/irq_smp.c Sun Jun 9 07:26:57 2002 +++ linux/arch/alpha/kernel/irq_smp.c Mon Jul 22 19:55:05 2002 @@ -85,9 +85,9 @@ show("wait_on_irq", where); count = MAXCOUNT; } - __sti(); + local_irq_enable(); udelay(1); /* make sure to run pending irqs */ - __cli(); + local_irq_disable(); if (irqs_running()) continue; @@ -153,7 +153,7 @@ if (!local_irq_count(cpu)) release_irqlock(cpu); - __sti(); + local_irq_enable(); } /* @@ -171,7 +171,7 @@ unsigned long flags; int cpu = smp_processor_id(); - __save_flags(flags); + local_save_flags(flags); local_enabled = (!(flags & 7)); /* default to local */ retval = 2 + local_enabled; @@ -197,10 +197,10 @@ __global_sti(); break; case 2: - __cli(); + local_irq_disable(); break; case 3: - __sti(); + local_irq_enable(); break; default: printk(KERN_ERR "global_restore_flags: %08lx (%p)\n", diff -rNu linux-bk/arch/alpha/kernel/ns87312.c linux/arch/alpha/kernel/ns87312.c --- linux-bk/arch/alpha/kernel/ns87312.c Sun Jun 9 07:28:55 2002 +++ linux/arch/alpha/kernel/ns87312.c Mon Jul 22 19:55:05 2002 @@ -28,11 +28,11 @@ int data; unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); outb(0, ide_base); /* set the index register for reg #0 */ data = inb(ide_base+1); /* read the current contents */ outb(0, ide_base); /* set the index register for reg #0 */ outb(data | 0x40, ide_base+1); /* turn on IDE */ outb(data | 0x40, ide_base+1); /* turn on IDE, really! */ - __restore_flags(flags); + local_irq_restore(flags); } diff -rNu linux-bk/arch/alpha/kernel/process.c linux/arch/alpha/kernel/process.c --- linux-bk/arch/alpha/kernel/process.c Sun Jun 9 07:28:48 2002 +++ linux/arch/alpha/kernel/process.c Mon Jul 22 19:55:05 2002 @@ -88,7 +88,7 @@ int cpuid = smp_processor_id(); /* No point in taking interrupts anymore. */ - __cli(); + local_irq_disable(); cpup = (struct percpu_struct *) ((unsigned long)hwrpb + hwrpb->processor_offset diff -rNu linux-bk/arch/alpha/kernel/smc37c669.c linux/arch/alpha/kernel/smc37c669.c --- linux-bk/arch/alpha/kernel/smc37c669.c Mon Jul 22 19:22:23 2002 +++ linux/arch/alpha/kernel/smc37c669.c Mon Jul 22 19:55:05 2002 @@ -2486,7 +2486,7 @@ SMC37c669_CONFIG_REGS *SMC_base; unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); if ( ( SMC_base = SMC37c669_detect( index ) ) != NULL ) { #if SMC_DEBUG SMC37c669_config_mode( TRUE ); @@ -2541,12 +2541,12 @@ SMC37c669_config_mode( FALSE ); SMC37c669_display_device_info( ); #endif - __restore_flags(flags); + local_irq_restore(flags); printk( "SMC37c669 Super I/O Controller found @ 0x%lx\n", (unsigned long) SMC_base ); } else { - __restore_flags(flags); + local_irq_restore(flags); #if SMC_DEBUG printk( "No SMC37c669 Super I/O Controller found\n" ); #endif diff -rNu linux-bk/arch/alpha/kernel/smc37c93x.c linux/arch/alpha/kernel/smc37c93x.c --- linux-bk/arch/alpha/kernel/smc37c93x.c Sun Jun 9 07:30:01 2002 +++ linux/arch/alpha/kernel/smc37c93x.c Mon Jul 22 19:55:05 2002 @@ -243,7 +243,7 @@ unsigned long SMCUltraBase; unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); if ((SMCUltraBase = SMCDetectUltraIO()) != 0UL) { #if SMC_DEBUG SMCReportDeviceStatus(SMCUltraBase); @@ -264,13 +264,13 @@ SMCReportDeviceStatus(SMCUltraBase); #endif SMCRunState(SMCUltraBase); - __restore_flags(flags); + local_irq_restore(flags); printk("SMC FDC37C93X Ultra I/O Controller found @ 0x%lx\n", SMCUltraBase); return 1; } else { - __restore_flags(flags); + local_irq_restore(flags); DBG_DEVS(("No SMC FDC37C93X Ultra I/O Controller found\n")); return 0; } diff -rNu linux-bk/arch/alpha/kernel/smp.c linux/arch/alpha/kernel/smp.c --- linux-bk/arch/alpha/kernel/smp.c Sun Jun 9 07:28:29 2002 +++ linux/arch/alpha/kernel/smp.c Mon Jul 22 19:55:05 2002 @@ -175,7 +175,7 @@ current->active_mm = &init_mm; /* Must have completely accurate bogos. */ - __sti(); + local_irq_enable(); /* Wait boot CPU to stop with irq enabled before running calibrate_delay. */ diff -rNu linux-bk/arch/arm/kernel/irq.c linux/arch/arm/kernel/irq.c --- linux-bk/arch/arm/kernel/irq.c Mon Jul 22 19:22:27 2002 +++ linux/arch/arm/kernel/irq.c Mon Jul 22 19:55:11 2002 @@ -190,7 +190,7 @@ spin_unlock(&irq_controller_lock); if (!(action->flags & SA_INTERRUPT)) - __sti(); + local_irq_enable(); status = 0; do { diff -rNu linux-bk/arch/cris/kernel/irq.c linux/arch/cris/kernel/irq.c --- linux-bk/arch/cris/kernel/irq.c Sun Jun 9 07:31:30 2002 +++ linux/arch/cris/kernel/irq.c Mon Jul 22 19:55:01 2002 @@ -266,7 +266,7 @@ action = irq_action[irq]; if (action) { if (!(action->flags & SA_INTERRUPT)) - __sti(); + local_irq_enable(); action = irq_action[irq]; do_random = 0; do { @@ -276,7 +276,7 @@ } while (action); if (do_random & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); - __cli(); + local_irq_disable(); } irq_exit(cpu); diff -rNu linux-bk/arch/i386/kernel/apic.c linux/arch/i386/kernel/apic.c --- linux-bk/arch/i386/kernel/apic.c Mon Jul 22 19:22:42 2002 +++ linux/arch/i386/kernel/apic.c Mon Jul 22 19:55:00 2002 @@ -485,13 +485,13 @@ apic_pm_state.apic_tdcr = apic_read(APIC_TDCR); apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR); - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); disable_local_APIC(); rdmsr(MSR_IA32_APICBASE, l, h); l &= ~MSR_IA32_APICBASE_ENABLE; wrmsr(MSR_IA32_APICBASE, l, h); - __restore_flags(flags); + local_irq_restore(flags); } static void apic_pm_resume(void *data) @@ -499,8 +499,8 @@ unsigned int l, h; unsigned long flags; - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); rdmsr(MSR_IA32_APICBASE, l, h); l &= ~MSR_IA32_APICBASE_BASE; l |= MSR_IA32_APICBASE_ENABLE | APIC_DEFAULT_PHYS_BASE; @@ -523,7 +523,7 @@ apic_write(APIC_LVTERR, apic_pm_state.apic_lvterr); apic_write(APIC_ESR, 0); apic_read(APIC_ESR); - __restore_flags(flags); + local_irq_restore(flags); if (apic_pm_state.perfctr_pmdev) pm_send(apic_pm_state.perfctr_pmdev, PM_RESUME, data); } @@ -804,8 +804,8 @@ unsigned long flags; int delta; - __save_flags(flags); - __sti(); + local_save_flags(flags); + local_irq_enable(); /* * ok, Intel has some smart code in their APIC that knows * if a CPU was in 'hlt' lowpower mode, and this increases @@ -842,7 +842,7 @@ printk("CPU%d\n", smp_processor_id(), t0, t1, delta, slice, clocks); - __restore_flags(flags); + local_irq_restore(flags); } /* @@ -935,7 +935,7 @@ printk("Using local APIC timer interrupts.\n"); using_apic_timer = 1; - __cli(); + local_irq_disable(); calibration_result = calibrate_APIC_clock(); /* @@ -943,7 +943,7 @@ */ setup_APIC_timer((void *)calibration_result); - __sti(); + local_irq_enable(); /* and update all other cpus */ smp_call_function(setup_APIC_timer, (void *)calibration_result, 1, 1); diff -rNu linux-bk/arch/i386/kernel/apm.c linux/arch/i386/kernel/apm.c --- linux-bk/arch/i386/kernel/apm.c Mon Jul 22 19:22:42 2002 +++ linux/arch/i386/kernel/apm.c Mon Jul 22 19:54:59 2002 @@ -514,9 +514,9 @@ */ #define APM_DO_CLI \ if (apm_info.allow_ints) \ - __sti(); \ + local_irq_enable(); \ else \ - __cli(); + local_irq_disable(); #ifdef APM_ZERO_SEGS # define APM_DECL_SEGS \ @@ -570,7 +570,7 @@ APM_DECL_SEGS unsigned long flags; - __save_flags(flags); + local_save_flags(flags); APM_DO_CLI; APM_DO_SAVE_SEGS; /* @@ -590,7 +590,7 @@ : "a" (func), "b" (ebx_in), "c" (ecx_in) : "memory", "cc"); APM_DO_RESTORE_SEGS; - __restore_flags(flags); + local_irq_restore(flags); return *eax & 0xff; } @@ -614,7 +614,7 @@ APM_DECL_SEGS unsigned long flags; - __save_flags(flags); + local_save_flags(flags); APM_DO_CLI; APM_DO_SAVE_SEGS; { @@ -638,7 +638,7 @@ : "memory", "cc"); } APM_DO_RESTORE_SEGS; - __restore_flags(flags); + local_irq_restore(flags); return error; } diff -rNu linux-bk/arch/i386/kernel/cpu/common.c linux/arch/i386/kernel/cpu/common.c --- linux-bk/arch/i386/kernel/cpu/common.c Mon Jul 22 19:22:27 2002 +++ linux/arch/i386/kernel/cpu/common.c Mon Jul 22 19:54:59 2002 @@ -426,7 +426,7 @@ if (test_and_set_bit(nr, &cpu_initialized)) { printk(KERN_WARNING "CPU#%d already initialized!\n", nr); - for (;;) __sti(); + for (;;) local_irq_enable(); } printk(KERN_INFO "Initializing CPU#%d\n", nr); diff -rNu linux-bk/arch/i386/kernel/io_apic.c linux/arch/i386/kernel/io_apic.c --- linux-bk/arch/i386/kernel/io_apic.c Mon Jul 22 19:22:42 2002 +++ linux/arch/i386/kernel/io_apic.c Mon Jul 22 19:55:00 2002 @@ -1219,7 +1219,7 @@ { unsigned int t1 = jiffies; - __sti(); + local_irq_enable(); /* Let ten ticks pass... */ mdelay((10 * 1000) / HZ); diff -rNu linux-bk/arch/i386/kernel/irq.c linux/arch/i386/kernel/irq.c --- linux-bk/arch/i386/kernel/irq.c Mon Jul 22 19:22:42 2002 +++ linux/arch/i386/kernel/irq.c Mon Jul 22 19:55:00 2002 @@ -204,7 +204,7 @@ int status = 1; /* Force the "do bottom halves" bit */ if (!(action->flags & SA_INTERRUPT)) - __sti(); + local_irq_enable(); do { status |= action->flags; @@ -213,7 +213,7 @@ } while (action); if (status & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); - __cli(); + local_irq_disable(); return status; } diff -rNu linux-bk/arch/i386/kernel/mtrr.c linux/arch/i386/kernel/mtrr.c --- linux-bk/arch/i386/kernel/mtrr.c Mon Jul 22 19:22:24 2002 +++ linux/arch/i386/kernel/mtrr.c Mon Jul 22 19:54:59 2002 @@ -381,7 +381,7 @@ static void set_mtrr_prepare_save (struct set_mtrr_context *ctxt) { /* Disable interrupts locally */ - __save_flags (ctxt->flags); __cli (); + local_save_flags (ctxt->flags); local_irq_disable (); if ( mtrr_if != MTRR_IF_INTEL && mtrr_if != MTRR_IF_CYRIX_ARR ) return; @@ -428,7 +428,7 @@ static void set_mtrr_done (struct set_mtrr_context *ctxt) { if ( mtrr_if != MTRR_IF_INTEL && mtrr_if != MTRR_IF_CYRIX_ARR ) { - __restore_flags (ctxt->flags); + local_irq_restore (ctxt->flags); return; } @@ -452,7 +452,7 @@ write_cr4(ctxt->cr4val); /* Re-enable interrupts locally (if enabled previously) */ - __restore_flags (ctxt->flags); + local_irq_restore (ctxt->flags); } /* End Function set_mtrr_done */ /* This function returns the number of variable MTRRs */ @@ -546,7 +546,7 @@ arr = CX86_ARR_BASE + (reg << 1) + reg; /* avoid multiplication by 3 */ /* Save flags and disable interrupts */ - __save_flags (flags); __cli (); + local_save_flags (flags); local_irq_disable (); ccr3 = getCx86 (CX86_CCR3); setCx86 (CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */ @@ -557,7 +557,7 @@ setCx86 (CX86_CCR3, ccr3); /* disable MAPEN */ /* Enable interrupts if it was enabled previously */ - __restore_flags (flags); + local_irq_restore (flags); shift = ((unsigned char *) base)[1] & 0x0f; *base >>= PAGE_SHIFT; diff -rNu linux-bk/arch/i386/kernel/nmi.c linux/arch/i386/kernel/nmi.c --- linux-bk/arch/i386/kernel/nmi.c Mon Jul 22 19:22:42 2002 +++ linux/arch/i386/kernel/nmi.c Mon Jul 22 19:55:00 2002 @@ -78,7 +78,7 @@ printk(KERN_INFO "testing NMI watchdog ... "); memcpy(tmp, irq_stat, sizeof(tmp)); - __sti(); + local_irq_enable(); mdelay((10*1000)/nmi_hz); // wait 10 ticks for (cpu = 0; cpu < NR_CPUS; cpu++) { diff -rNu linux-bk/arch/i386/kernel/process.c linux/arch/i386/kernel/process.c --- linux-bk/arch/i386/kernel/process.c Mon Jul 22 19:22:42 2002 +++ linux/arch/i386/kernel/process.c Mon Jul 22 19:54:59 2002 @@ -89,11 +89,11 @@ void default_idle(void) { if (current_cpu_data.hlt_works_ok && !hlt_counter) { - __cli(); + local_irq_disable(); if (!need_resched()) safe_halt(); else - __sti(); + local_irq_enable(); } } @@ -106,7 +106,7 @@ { int oldval; - __sti(); + local_irq_enable(); /* * Deal with another CPU just having chosen a thread to @@ -290,7 +290,7 @@ { unsigned long flags; - __cli(); + local_irq_disable(); /* Write zero to CMOS register number 0x0f, which the BIOS POST routine will recognize as telling it to do a proper reboot. (Well diff -rNu linux-bk/arch/i386/kernel/smp.c linux/arch/i386/kernel/smp.c --- linux-bk/arch/i386/kernel/smp.c Mon Jul 22 19:22:27 2002 +++ linux/arch/i386/kernel/smp.c Mon Jul 22 19:55:00 2002 @@ -161,8 +161,8 @@ unsigned long cfg; unsigned long flags; - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); /* @@ -186,7 +186,7 @@ */ apic_write_around(APIC_ICR, cfg); - __restore_flags(flags); + local_irq_restore(flags); } static inline void send_IPI_mask_sequence(int mask, int vector) @@ -200,8 +200,8 @@ * should be modified to do 1 message per cluster ID - mbligh */ - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); for (query_cpu = 0; query_cpu < NR_CPUS; ++query_cpu) { query_mask = 1 << query_cpu; @@ -229,7 +229,7 @@ apic_write_around(APIC_ICR, cfg); } } - __restore_flags(flags); + local_irq_restore(flags); } static inline void send_IPI_mask(int mask, int vector) @@ -603,7 +603,7 @@ * Remove this CPU: */ clear_bit(smp_processor_id(), &cpu_online_map); - __cli(); + local_irq_disable(); disable_local_APIC(); if (cpu_data[smp_processor_id()].hlt_works_ok) for(;;) __asm__("hlt"); @@ -618,9 +618,9 @@ { smp_call_function(stop_this_cpu, NULL, 1, 0); - __cli(); + local_irq_disable(); disable_local_APIC(); - __sti(); + local_irq_enable(); } /* diff -rNu linux-bk/arch/i386/kernel/smpboot.c linux/arch/i386/kernel/smpboot.c --- linux-bk/arch/i386/kernel/smpboot.c Mon Jul 22 19:22:42 2002 +++ linux/arch/i386/kernel/smpboot.c Mon Jul 22 19:55:00 2002 @@ -453,7 +453,7 @@ clear_local_APIC(); setup_local_APIC(); - __sti(); + local_irq_enable(); #ifdef CONFIG_MTRR /* diff -rNu linux-bk/arch/i386/pci/direct.c linux/arch/i386/pci/direct.c --- linux-bk/arch/i386/pci/direct.c Sun Jun 9 07:28:04 2002 +++ linux/arch/i386/pci/direct.c Mon Jul 22 19:55:01 2002 @@ -306,7 +306,7 @@ unsigned int tmp; unsigned long flags; - __save_flags(flags); __cli(); + local_save_flags(flags); local_irq_disable(); /* * Check if configuration type 1 works. @@ -318,7 +318,7 @@ if (inl (0xCF8) == 0x80000000 && pci_sanity_check(&pci_direct_conf1)) { outl (tmp, 0xCF8); - __restore_flags(flags); + local_irq_restore(flags); printk(KERN_INFO "PCI: Using configuration type 1\n"); if (!request_region(0xCF8, 8, "PCI conf1")) return NULL; @@ -336,7 +336,7 @@ outb (0x00, 0xCFA); if (inb (0xCF8) == 0x00 && inb (0xCFA) == 0x00 && pci_sanity_check(&pci_direct_conf2)) { - __restore_flags(flags); + local_irq_restore(flags); printk(KERN_INFO "PCI: Using configuration type 2\n"); if (!request_region(0xCF8, 4, "PCI conf2")) return NULL; @@ -344,7 +344,7 @@ } } - __restore_flags(flags); + local_irq_restore(flags); return NULL; } diff -rNu linux-bk/arch/i386/pci/pcbios.c linux/arch/i386/pci/pcbios.c --- linux-bk/arch/i386/pci/pcbios.c Sun Jun 9 07:27:00 2002 +++ linux/arch/i386/pci/pcbios.c Mon Jul 22 19:55:01 2002 @@ -82,7 +82,7 @@ unsigned long entry; /* %edx */ unsigned long flags; - __save_flags(flags); __cli(); + local_save_flags(flags); local_irq_disable(); __asm__("lcall *(%%edi); cld" : "=a" (return_code), "=b" (address), @@ -91,7 +91,7 @@ : "0" (service), "1" (0), "D" (&bios32_indirect)); - __restore_flags(flags); + local_irq_restore(flags); switch (return_code) { case 0: @@ -122,7 +122,7 @@ if ((pcibios_entry = bios32_service(PCI_SERVICE))) { pci_indirect.address = pcibios_entry + PAGE_OFFSET; - __save_flags(flags); __cli(); + local_save_flags(flags); local_irq_disable(); __asm__( "lcall *(%%edi); cld\n\t" "jc 1f\n\t" @@ -135,7 +135,7 @@ : "1" (PCIBIOS_PCI_BIOS_PRESENT), "D" (&pci_indirect) : "memory"); - __restore_flags(flags); + local_irq_restore(flags); status = (eax >> 8) & 0xff; hw_mech = eax & 0xff; diff -rNu linux-bk/arch/ia64/kernel/irq.c linux/arch/ia64/kernel/irq.c --- linux-bk/arch/ia64/kernel/irq.c Mon Jul 22 19:22:24 2002 +++ linux/arch/ia64/kernel/irq.c Mon Jul 22 19:55:07 2002 @@ -284,7 +284,7 @@ # define SYNC_OTHER_CORES(x) udelay(x+1) #else /* - * We have to allow irqs to arrive between __sti and __cli + * We have to allow irqs to arrive between local_irq_enable and local_irq_disable */ # ifdef CONFIG_IA64 # define SYNC_OTHER_CORES(x) __asm__ __volatile__ ("nop 0") @@ -317,9 +317,9 @@ show("wait_on_irq"); count = ~0; } - __sti(); + local_irq_enable(); SYNC_OTHER_CORES(smp_processor_id()); - __cli(); + local_irq_disable(); if (irqs_running()) continue; if (global_irq_lock) @@ -394,16 +394,16 @@ unsigned int flags; #ifdef CONFIG_IA64 - __save_flags(flags); + local_save_flags(flags); if (flags & IA64_PSR_I) { - __cli(); + local_irq_disable(); if (!really_local_irq_count()) get_irqlock(); } #else - __save_flags(flags); + local_save_flags(flags); if (flags & (1 << EFLAGS_IF_SHIFT)) { - __cli(); + local_irq_disable(); if (!really_local_irq_count()) get_irqlock(); } @@ -414,7 +414,7 @@ { if (!really_local_irq_count()) release_irqlock(smp_processor_id()); - __sti(); + local_irq_enable(); } /* @@ -431,7 +431,7 @@ unsigned long flags; int cpu = smp_processor_id(); - __save_flags(flags); + local_save_flags(flags); #ifdef CONFIG_IA64 local_enabled = (flags & IA64_PSR_I) != 0; #else @@ -460,10 +460,10 @@ __global_sti(); break; case 2: - __cli(); + local_irq_disable(); break; case 3: - __sti(); + local_irq_enable(); break; default: printk("global_restore_flags: %08lx (%08lx)\n", @@ -489,7 +489,7 @@ status = 1; /* Force the "do bottom halves" bit */ if (!(action->flags & SA_INTERRUPT)) - __sti(); + local_irq_enable(); do { status |= action->flags; @@ -498,7 +498,7 @@ } while (action); if (status & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); - __cli(); + local_irq_disable(); local_irq_exit(irq); diff -rNu linux-bk/arch/ia64/kernel/smp.c linux/arch/ia64/kernel/smp.c --- linux-bk/arch/ia64/kernel/smp.c Mon Jul 22 19:22:24 2002 +++ linux/arch/ia64/kernel/smp.c Mon Jul 22 19:55:07 2002 @@ -91,7 +91,7 @@ */ clear_bit(smp_processor_id(), &cpu_online_map); max_xtp(); - __cli(); + local_irq_disable(); cpu_halt(); } diff -rNu linux-bk/arch/ia64/sn/kernel/llsc4.c linux/arch/ia64/sn/kernel/llsc4.c --- linux-bk/arch/ia64/sn/kernel/llsc4.c Mon Jul 22 19:22:24 2002 +++ linux/arch/ia64/sn/kernel/llsc4.c Mon Jul 22 19:55:08 2002 @@ -1025,7 +1025,7 @@ if (mycpu == NR_CPUS-1) { printk("\nTight loop of cpu %d sending ints to cpu 0 (every 100 us)\n", mycpu); udelay(IS_RUNNING_ON_SIMULATOR ? 1000 : 1000000); - __cli(); + local_irq_disable(); while (1) { smp_send_reschedule(0); udelay(100); diff -rNu linux-bk/arch/ia64/sn/kernel/sv.c linux/arch/ia64/sn/kernel/sv.c --- linux-bk/arch/ia64/sn/kernel/sv.c Sun Jun 9 07:27:46 2002 +++ linux/arch/ia64/sn/kernel/sv.c Mon Jul 22 19:55:08 2002 @@ -183,7 +183,7 @@ #ifdef SV_DEBUG_INTERRUPT_STATE { unsigned long flags; - __save_flags(flags); + local_save_flags(flags); if(sv->sv_flags & SV_INTS) { if(SV_TEST_INTERRUPTS_ENABLED(flags)) { @@ -279,7 +279,7 @@ #ifdef SV_DEBUG_INTERRUPT_STATE if(sv->sv_flags & SV_INTS) { unsigned long flags; - __save_flags(flags); + local_save_flags(flags); if(SV_TEST_INTERRUPTS_ENABLED(flags)) printk(KERN_ERR "sv_signal: SV_INTS and " "interrupts enabled! (flags: 0x%lx)\n", flags); @@ -296,7 +296,7 @@ #ifdef SV_DEBUG_INTERRUPT_STATE if(sv->sv_flags & SV_INTS) { unsigned long flags; - __save_flags(flags); + local_save_flags(flags); if(SV_TEST_INTERRUPTS_ENABLED(flags)) printk(KERN_ERR "sv_broadcast: SV_INTS and " "interrupts enabled! (flags: 0x%lx)\n", flags); @@ -475,7 +475,7 @@ printk("ITW: thread %d started.\n", id); while(1) { - __save_flags(flags2); + local_save_flags(flags2); if(jiffies % 3) { printk("ITW %2d %5d: irqsaving (%lx)\n", id, it, flags2); spin_lock_irqsave(&int_test_spin, flags); @@ -484,11 +484,11 @@ spin_lock_irq(&int_test_spin); } - __save_flags(flags2); + local_save_flags(flags2); printk("ITW %2d %5d: locked, sv_waiting (%lx).\n", id, it, flags2); sv_wait(&int_test_sv, 0, 0); - __save_flags(flags2); + local_save_flags(flags2); printk("ITW %2d %5d: wait finished (%lx), pausing\n", id, it, flags2); set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(jiffies & 0xf); diff -rNu linux-bk/arch/mips/baget/irq.c linux/arch/mips/baget/irq.c --- linux-bk/arch/mips/baget/irq.c Sun Jun 9 07:30:52 2002 +++ linux/arch/mips/baget/irq.c Mon Jul 22 19:55:03 2002 @@ -186,7 +186,7 @@ action = *(irq + irq_action); if (action) { if (!(action->flags & SA_INTERRUPT)) - __sti(); + local_irq_enable(); action = *(irq + irq_action); do_random = 0; do { @@ -196,7 +196,7 @@ } while (action); if (do_random & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); - __cli(); + local_irq_disable(); } else { printk("do_IRQ: Unregistered IRQ (0x%X) occurred\n", irq); } diff -rNu linux-bk/arch/mips/dec/irq.c linux/arch/mips/dec/irq.c --- linux-bk/arch/mips/dec/irq.c Sun Jun 9 07:30:29 2002 +++ linux/arch/mips/dec/irq.c Mon Jul 22 19:55:02 2002 @@ -136,7 +136,7 @@ action = *(irq + irq_action); if (action) { if (!(action->flags & SA_INTERRUPT)) - __sti(); + local_irq_enable(); action = *(irq + irq_action); do_random = 0; do { @@ -146,7 +146,7 @@ } while (action); if (do_random & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); - __cli(); + local_irq_disable(); unmask_irq(irq); } irq_exit(cpu, irq); diff -rNu linux-bk/arch/mips/gt64120/momenco_ocelot/irq.c linux/arch/mips/gt64120/momenco_ocelot/irq.c --- linux-bk/arch/mips/gt64120/momenco_ocelot/irq.c Sun Jun 9 07:26:31 2002 +++ linux/arch/mips/gt64120/momenco_ocelot/irq.c Mon Jul 22 19:55:04 2002 @@ -147,7 +147,7 @@ * int-handler is not on bootstrap */ clear_cp0_status(ST0_IM | ST0_BEV); - __cli(); + local_irq_disable(); /* Sets the first-level interrupt dispatcher. */ set_except_vector(0, ocelot_handle_int); diff -rNu linux-bk/arch/mips/ite-boards/generic/irq.c linux/arch/mips/ite-boards/generic/irq.c --- linux-bk/arch/mips/ite-boards/generic/irq.c Sun Jun 9 07:30:24 2002 +++ linux/arch/mips/ite-boards/generic/irq.c Mon Jul 22 19:55:02 2002 @@ -271,12 +271,12 @@ //mask_irq(1<handler %x\n", action->handler); disable_it8172_irq(irq); - //if (!(action->flags & SA_INTERRUPT)) __sti(); /* reenable ints */ + //if (!(action->flags & SA_INTERRUPT)) local_irq_enable(); /* reenable ints */ do { action->handler(irq, action->dev_id, regs); action = action->next; } while ( action ); - //__cli(); /* disable ints */ + //local_irq_disable(); /* disable ints */ if (irq_desc[irq].handler) { } diff -rNu linux-bk/arch/mips/ite-boards/generic/time.c linux/arch/mips/ite-boards/generic/time.c --- linux-bk/arch/mips/ite-boards/generic/time.c Sun Jun 9 07:29:20 2002 +++ linux/arch/mips/ite-boards/generic/time.c Mon Jul 22 19:55:02 2002 @@ -168,7 +168,7 @@ unsigned long count; unsigned int flags; - __save_and_cli(flags); + local_irq_save(flags); /* Start counter exactly on falling edge of update flag */ while (CMOS_READ(RTC_REG_A) & RTC_UIP); @@ -184,7 +184,7 @@ count = read_32bit_cp0_register(CP0_COUNT); /* restore interrupts */ - __restore_flags(flags); + local_irq_restore(flags); return (count / HZ); } diff -rNu linux-bk/arch/mips/kernel/irq.c linux/arch/mips/kernel/irq.c --- linux-bk/arch/mips/kernel/irq.c Sun Jun 9 07:27:32 2002 +++ linux/arch/mips/kernel/irq.c Mon Jul 22 19:55:02 2002 @@ -114,7 +114,7 @@ status = 1; /* Force the "do bottom halves" bit */ if (!(action->flags & SA_INTERRUPT)) - __sti(); + local_irq_enable(); do { status |= action->flags; @@ -123,7 +123,7 @@ } while (action); if (status & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); - __cli(); + local_irq_disable(); irq_exit(cpu, irq); diff -rNu linux-bk/arch/mips/kernel/old-irq.c linux/arch/mips/kernel/old-irq.c --- linux-bk/arch/mips/kernel/old-irq.c Sun Jun 9 07:30:22 2002 +++ linux/arch/mips/kernel/old-irq.c Mon Jul 22 19:55:02 2002 @@ -183,7 +183,7 @@ goto out; if (!(action->flags & SA_INTERRUPT)) - __sti(); + local_irq_enable(); action = *(irq + irq_action); do_random = 0; do { @@ -193,7 +193,7 @@ } while (action); if (do_random & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); - __cli(); + local_irq_disable(); unmask_irq (irq); out: @@ -219,7 +219,7 @@ action = *(irq + irq_action); if (action) { if (!(action->flags & SA_INTERRUPT)) - __sti(); + local_irq_enable(); action = *(irq + irq_action); do_random = 0; do { @@ -229,7 +229,7 @@ } while (action); if (do_random & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); - __cli(); + local_irq_disable(); } irq_exit(cpu, irq); diff -rNu linux-bk/arch/mips/kernel/ptrace.c linux/arch/mips/kernel/ptrace.c --- linux-bk/arch/mips/kernel/ptrace.c Sun Jun 9 07:30:01 2002 +++ linux/arch/mips/kernel/ptrace.c Mon Jul 22 19:55:02 2002 @@ -174,10 +174,10 @@ case FPC_EIR: { /* implementation / version register */ unsigned int flags; - __save_flags(flags); + local_save_flags(flags); enable_cp1(); __asm__ __volatile__("cfc1\t%0,$0": "=r" (tmp)); - __restore_flags(flags); + local_irq_restore(flags); break; } default: diff -rNu linux-bk/arch/mips/kernel/smp.c linux/arch/mips/kernel/smp.c --- linux-bk/arch/mips/kernel/smp.c Sun Jun 9 07:27:43 2002 +++ linux/arch/mips/kernel/smp.c Mon Jul 22 19:55:02 2002 @@ -281,9 +281,9 @@ printk("Count spun out. Huh?\n"); count = ~0; } - __sti(); + local_irq_enable(); SYNC_OTHER_CORES(cpu); - __cli(); + local_irq_disable(); if (irqs_running()) continue; if (spin_is_locked(&global_irq_lock)) @@ -335,10 +335,10 @@ { unsigned int flags; - __save_flags(flags); + local_save_flags(flags); if (flags & ST0_IE) { int cpu = smp_processor_id(); - __cli(); + local_irq_disable(); if (!local_irq_count(cpu)) get_irqlock(cpu); } @@ -350,7 +350,7 @@ if (!local_irq_count(cpu)) release_irqlock(cpu); - __sti(); + local_irq_enable(); } /* @@ -367,7 +367,7 @@ unsigned long flags; int cpu = smp_processor_id(); - __save_flags(flags); + local_save_flags(flags); local_enabled = (flags & ST0_IE); /* default to local */ retval = 2 + local_enabled; @@ -393,10 +393,10 @@ __global_sti(); break; case 2: - __cli(); + local_irq_disable(); break; case 3: - __sti(); + local_irq_enable(); break; default: printk("global_restore_flags: %08lx\n", flags); diff -rNu linux-bk/arch/mips/lib/dump_tlb.c linux/arch/mips/lib/dump_tlb.c --- linux-bk/arch/mips/lib/dump_tlb.c Sun Jun 9 07:26:25 2002 +++ linux/arch/mips/lib/dump_tlb.c Mon Jul 22 19:55:03 2002 @@ -102,7 +102,7 @@ unsigned int flags, oldpid; int index; - __save_and_cli(flags); + local_irq_save(flags); oldpid = get_entryhi() & 0xff; BARRIER; set_entryhi((addr & PAGE_MASK) | oldpid); @@ -111,7 +111,7 @@ BARRIER; index = get_index(); set_entryhi(oldpid); - __restore_flags(flags); + local_irq_restore(flags); if (index < 0) { printk("No entry for address 0x%08lx in TLB\n", addr); diff -rNu linux-bk/arch/mips/lib/r3k_dump_tlb.c linux/arch/mips/lib/r3k_dump_tlb.c --- linux-bk/arch/mips/lib/r3k_dump_tlb.c Sun Jun 9 07:27:21 2002 +++ linux/arch/mips/lib/r3k_dump_tlb.c Mon Jul 22 19:55:03 2002 @@ -83,13 +83,13 @@ unsigned int flags, oldpid; int index; - __save_and_cli(flags); + local_irq_save(flags); oldpid = get_entryhi() & 0xff; set_entryhi((addr & PAGE_MASK) | oldpid); tlb_probe(); index = get_index(); set_entryhi(oldpid); - __restore_flags(flags); + local_irq_restore(flags); if (index < 0) { printk("No entry for address 0x%08lx in TLB\n", addr); diff -rNu linux-bk/arch/mips/mips-boards/generic/time.c linux/arch/mips/mips-boards/generic/time.c --- linux-bk/arch/mips/mips-boards/generic/time.c Sun Jun 9 07:30:40 2002 +++ linux/arch/mips/mips-boards/generic/time.c Mon Jul 22 19:55:03 2002 @@ -189,7 +189,7 @@ unsigned long count; unsigned int flags; - __save_and_cli(flags); + local_irq_save(flags); /* Start counter exactly on falling edge of update flag */ while (CMOS_READ(RTC_REG_A) & RTC_UIP); @@ -205,7 +205,7 @@ count = read_32bit_cp0_register(CP0_COUNT); /* restore interrupts */ - __restore_flags(flags); + local_irq_restore(flags); return (count / HZ); } diff -rNu linux-bk/arch/mips/mm/mips32.c linux/arch/mips/mm/mips32.c --- linux-bk/arch/mips/mm/mips32.c Sun Jun 9 07:31:25 2002 +++ linux/arch/mips/mm/mips32.c Mon Jul 22 19:55:03 2002 @@ -161,18 +161,18 @@ { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache(); blast_icache(); blast_scache(); - __restore_flags(flags); + local_irq_restore(flags); } static inline void mips32_flush_cache_all_pc(void) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache(); blast_icache(); - __restore_flags(flags); + local_irq_restore(flags); } static void @@ -198,7 +198,7 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); + local_irq_save(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -208,7 +208,7 @@ blast_scache_page(start); start += PAGE_SIZE; } - __restore_flags(flags); + local_irq_restore(flags); } } } @@ -225,9 +225,9 @@ #ifdef DEBUG_CACHE printk("crange[%d,%08lx,%08lx]", (int)mm->context, start, end); #endif - __save_and_cli(flags); + local_irq_save(flags); blast_dcache(); blast_icache(); - __restore_flags(flags); + local_irq_restore(flags); } } @@ -279,7 +279,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -309,7 +309,7 @@ } else blast_scache_page(page); out: - __restore_flags(flags); + local_irq_restore(flags); } static void mips32_flush_cache_page_pc(struct vm_area_struct *vma, @@ -331,7 +331,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -360,7 +360,7 @@ blast_dcache_page_indexed(page); } out: - __restore_flags(flags); + local_irq_restore(flags); } /* If the addresses passed to these routines are valid, they are @@ -420,7 +420,7 @@ if (size >= dcache_size) { flush_cache_all(); } else { - __save_and_cli(flags); + local_irq_save(flags); a = addr & ~(dc_lsize - 1); end = (addr + size) & ~(dc_lsize - 1); while (1) { @@ -428,7 +428,7 @@ if (a == end) break; a += dc_lsize; } - __restore_flags(flags); + local_irq_restore(flags); } bc_wback_inv(addr, size); } @@ -461,7 +461,7 @@ if (size >= dcache_size) { flush_cache_all(); } else { - __save_and_cli(flags); + local_irq_save(flags); a = addr & ~(dc_lsize - 1); end = (addr + size) & ~(dc_lsize - 1); while (1) { @@ -469,7 +469,7 @@ if (a == end) break; a += dc_lsize; } - __restore_flags(flags); + local_irq_restore(flags); } bc_inv(addr, size); @@ -524,7 +524,7 @@ printk("[tlball]"); #endif - __save_and_cli(flags); + local_irq_save(flags); /* Save old context and create impossible VPN2 value */ old_ctx = (get_entryhi() & 0xff); set_entryhi(KSEG0); @@ -546,7 +546,7 @@ } BARRIER; set_entryhi(old_ctx); - __restore_flags(flags); + local_irq_restore(flags); } void flush_tlb_mm(struct mm_struct *mm) @@ -557,11 +557,11 @@ #ifdef DEBUG_TLB printk("[tlbmm<%d>]", mm->context); #endif - __save_and_cli(flags); + local_irq_save(flags); get_new_mmu_context(mm, asid_cache); if (mm == current->active_mm) set_entryhi(mm->context & 0xff); - __restore_flags(flags); + local_irq_restore(flags); } } @@ -576,7 +576,7 @@ printk("[tlbrange<%02x,%08lx,%08lx>]", (mm->context & 0xff), start, end); #endif - __save_and_cli(flags); + local_irq_save(flags); size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; size = (size + 1) >> 1; if(size <= mips_cpu.tlbsize/2) { @@ -611,7 +611,7 @@ if (mm == current->active_mm) set_entryhi(mm->context & 0xff); } - __restore_flags(flags); + local_irq_restore(flags); } } @@ -626,7 +626,7 @@ #endif newpid = (vma->vm_mm->context & 0xff); page &= (PAGE_MASK << 1); - __save_and_cli(flags); + local_irq_save(flags); oldpid = (get_entryhi() & 0xff); set_entryhi(page | newpid); BARRIER; @@ -645,7 +645,7 @@ finish: BARRIER; set_entryhi(oldpid); - __restore_flags(flags); + local_irq_restore(flags); } } @@ -693,7 +693,7 @@ } #endif - __save_and_cli(flags); + local_irq_save(flags); address &= (PAGE_MASK << 1); set_entryhi(address | (pid)); pgdp = pgd_offset(vma->vm_mm, address); @@ -716,7 +716,7 @@ BARRIER; set_entryhi(pid); BARRIER; - __restore_flags(flags); + local_irq_restore(flags); } void show_regs(struct pt_regs * regs) @@ -752,7 +752,7 @@ unsigned long old_pagemask; unsigned long old_ctx; - __save_and_cli(flags); + local_irq_save(flags); /* Save old context and create impossible VPN2 value */ old_ctx = (get_entryhi() & 0xff); old_pagemask = get_pagemask(); @@ -772,7 +772,7 @@ BARRIER; set_pagemask (old_pagemask); flush_tlb_all(); - __restore_flags(flags); + local_irq_restore(flags); } /* Detect and size the various caches. */ @@ -895,7 +895,7 @@ /* This is such a bitch, you'd think they would make it * easy to do this. Away you daemons of stupidity! */ - __save_and_cli(flags); + local_irq_save(flags); /* Fill each size-multiple cache line with a valid tag. */ pow2 = (64 * 1024); @@ -939,7 +939,7 @@ break; pow2 <<= 1; } - __restore_flags(flags); + local_irq_restore(flags); addr -= begin; printk("Secondary cache sized at %dK linesize %d bytes.\n", (int) (addr >> 10), sc_lsize); diff -rNu linux-bk/arch/mips/mm/r4xx0.c linux/arch/mips/mm/r4xx0.c --- linux-bk/arch/mips/mm/r4xx0.c Sun Jun 9 07:29:25 2002 +++ linux/arch/mips/mm/r4xx0.c Mon Jul 22 19:55:03 2002 @@ -209,7 +209,7 @@ { unsigned int flags; - __save_and_cli(flags); + local_irq_save(flags); *(volatile unsigned int *)KSEG1; __asm__ __volatile__( ".set\tnoreorder\n\t" @@ -236,7 +236,7 @@ "I" (PAGE_SIZE), "i" (Create_Dirty_Excl_D) :"$1","memory"); - __restore_flags(flags); + local_irq_restore(flags); } /* @@ -568,7 +568,7 @@ unsigned long reg1, reg2, reg3, reg4; unsigned int flags; - __save_and_cli(flags); + local_irq_save(flags); __asm__ __volatile__( ".set\tnoreorder\n\t" ".set\tnoat\n\t" @@ -627,7 +627,7 @@ :"0" (to), "1" (from), "I" (PAGE_SIZE), "i" (Create_Dirty_Excl_D)); - __restore_flags(flags); + local_irq_restore(flags); } /* @@ -911,81 +911,81 @@ { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache16(); blast_icache16(); blast_scache16(); - __restore_flags(flags); + local_irq_restore(flags); } static inline void r4k_flush_cache_all_s32d16i16(void) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache16(); blast_icache16(); blast_scache32(); - __restore_flags(flags); + local_irq_restore(flags); } static inline void r4k_flush_cache_all_s64d16i16(void) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache16(); blast_icache16(); blast_scache64(); - __restore_flags(flags); + local_irq_restore(flags); } static inline void r4k_flush_cache_all_s128d16i16(void) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache16(); blast_icache16(); blast_scache128(); - __restore_flags(flags); + local_irq_restore(flags); } static inline void r4k_flush_cache_all_s32d32i32(void) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache32(); blast_icache32(); blast_scache32(); - __restore_flags(flags); + local_irq_restore(flags); } static inline void r4k_flush_cache_all_s64d32i32(void) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache32(); blast_icache32(); blast_scache64(); - __restore_flags(flags); + local_irq_restore(flags); } static inline void r4k_flush_cache_all_s128d32i32(void) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache32(); blast_icache32(); blast_scache128(); - __restore_flags(flags); + local_irq_restore(flags); } static inline void r4k_flush_cache_all_d16i16(void) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache16(); blast_icache16(); - __restore_flags(flags); + local_irq_restore(flags); } static inline void r4k_flush_cache_all_d32i32(void) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache32(); blast_icache32(); - __restore_flags(flags); + local_irq_restore(flags); } static void @@ -1011,7 +1011,7 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); + local_irq_save(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -1021,7 +1021,7 @@ blast_scache16_page(start); start += PAGE_SIZE; } - __restore_flags(flags); + local_irq_restore(flags); } } } @@ -1049,7 +1049,7 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); + local_irq_save(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -1059,7 +1059,7 @@ blast_scache32_page(start); start += PAGE_SIZE; } - __restore_flags(flags); + local_irq_restore(flags); } } } @@ -1086,7 +1086,7 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); + local_irq_save(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -1096,7 +1096,7 @@ blast_scache64_page(start); start += PAGE_SIZE; } - __restore_flags(flags); + local_irq_restore(flags); } } } @@ -1123,7 +1123,7 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); + local_irq_save(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -1133,7 +1133,7 @@ blast_scache128_page(start); start += PAGE_SIZE; } - __restore_flags(flags); + local_irq_restore(flags); } } } @@ -1160,7 +1160,7 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); + local_irq_save(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -1170,7 +1170,7 @@ blast_scache32_page(start); start += PAGE_SIZE; } - __restore_flags(flags); + local_irq_restore(flags); } } } @@ -1197,7 +1197,7 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); + local_irq_save(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -1207,7 +1207,7 @@ blast_scache64_page(start); start += PAGE_SIZE; } - __restore_flags(flags); + local_irq_restore(flags); } } } @@ -1234,7 +1234,7 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); + local_irq_save(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -1244,7 +1244,7 @@ blast_scache128_page(start); start += PAGE_SIZE; } - __restore_flags(flags); + local_irq_restore(flags); } } } @@ -1261,9 +1261,9 @@ #ifdef DEBUG_CACHE printk("crange[%d,%08lx,%08lx]", (int)mm->context, start, end); #endif - __save_and_cli(flags); + local_irq_save(flags); blast_dcache16(); blast_icache16(); - __restore_flags(flags); + local_irq_restore(flags); } } @@ -1279,9 +1279,9 @@ #ifdef DEBUG_CACHE printk("crange[%d,%08lx,%08lx]", (int)mm->context, start, end); #endif - __save_and_cli(flags); + local_irq_save(flags); blast_dcache32(); blast_icache32(); - __restore_flags(flags); + local_irq_restore(flags); } } @@ -1399,7 +1399,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1429,7 +1429,7 @@ } else blast_scache16_page(page); out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_page_s32d16i16(struct vm_area_struct *vma, @@ -1451,7 +1451,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1480,7 +1480,7 @@ } else blast_scache32_page(page); out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_page_s64d16i16(struct vm_area_struct *vma, @@ -1502,7 +1502,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1531,7 +1531,7 @@ } else blast_scache64_page(page); out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_page_s128d16i16(struct vm_area_struct *vma, @@ -1553,7 +1553,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1583,7 +1583,7 @@ } else blast_scache128_page(page); out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_page_s32d32i32(struct vm_area_struct *vma, @@ -1605,7 +1605,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1635,7 +1635,7 @@ } else blast_scache32_page(page); out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_page_s64d32i32(struct vm_area_struct *vma, @@ -1657,7 +1657,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1687,7 +1687,7 @@ } else blast_scache64_page(page); out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_page_s128d32i32(struct vm_area_struct *vma, @@ -1709,7 +1709,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1738,7 +1738,7 @@ } else blast_scache128_page(page); out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_page_d16i16(struct vm_area_struct *vma, @@ -1760,7 +1760,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1789,7 +1789,7 @@ blast_dcache16_page_indexed(page); } out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_page_d32i32(struct vm_area_struct *vma, @@ -1811,7 +1811,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1841,7 +1841,7 @@ blast_dcache32_page_indexed(page); } out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_page_d32i32_r4600(struct vm_area_struct *vma, @@ -1863,7 +1863,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1893,7 +1893,7 @@ blast_dcache32_page_indexed(page ^ dcache_waybit); } out: - __restore_flags(flags); + local_irq_restore(flags); } /* If the addresses passed to these routines are valid, they are @@ -1939,9 +1939,9 @@ { unsigned long flags; - __save_and_cli(flags); /* For R4600 v1.7 bug. */ + local_irq_save(flags); /* For R4600 v1.7 bug. */ blast_dcache32_page((unsigned long)page_address(page)); - __restore_flags(flags); + local_irq_restore(flags); } static void @@ -1993,7 +1993,7 @@ flush_cache_all(); } else { /* Workaround for R4600 bug. See comment above. */ - __save_and_cli(flags); + local_irq_save(flags); *(volatile unsigned long *)KSEG1; a = addr & ~(dc_lsize - 1); @@ -2003,7 +2003,7 @@ if (a == end) break; a += dc_lsize; } - __restore_flags(flags); + local_irq_restore(flags); } bc_wback_inv(addr, size); } @@ -2037,7 +2037,7 @@ flush_cache_all(); } else { /* Workaround for R4600 bug. See comment above. */ - __save_and_cli(flags); + local_irq_save(flags); *(volatile unsigned long *)KSEG1; a = addr & ~(dc_lsize - 1); @@ -2047,7 +2047,7 @@ if (a == end) break; a += dc_lsize; } - __restore_flags(flags); + local_irq_restore(flags); } bc_inv(addr, size); @@ -2094,7 +2094,7 @@ { unsigned int flags; - __save_and_cli(flags); + local_irq_save(flags); /* Clear internal cache refill buffer */ *(volatile unsigned int *)KSEG1; @@ -2102,7 +2102,7 @@ protected_writeback_dcache_line(addr & ~(dc_lsize - 1)); protected_flush_icache_line(addr & ~(ic_lsize - 1)); - __restore_flags(flags); + local_irq_restore(flags); } #undef DEBUG_TLB @@ -2118,7 +2118,7 @@ printk("[tlball]"); #endif - __save_and_cli(flags); + local_irq_save(flags); /* Save old context and create impossible VPN2 value */ old_ctx = (get_entryhi() & 0xff); set_entryhi(KSEG0); @@ -2138,7 +2138,7 @@ } BARRIER; set_entryhi(old_ctx); - __restore_flags(flags); + local_irq_restore(flags); } void flush_tlb_mm(struct mm_struct *mm) @@ -2149,11 +2149,11 @@ #ifdef DEBUG_TLB printk("[tlbmm<%d>]", mm->context); #endif - __save_and_cli(flags); + local_irq_save(flags); get_new_mmu_context(mm, asid_cache); if (mm == current->active_mm) set_entryhi(mm->context & 0xff); - __restore_flags(flags); + local_irq_restore(flags); } } @@ -2170,7 +2170,7 @@ printk("[tlbrange<%02x,%08lx,%08lx>]", (mm->context & 0xff), start, end); #endif - __save_and_cli(flags); + local_irq_save(flags); size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; size = (size + 1) >> 1; if(size <= mips_cpu.tlbsize/2) { @@ -2204,7 +2204,7 @@ if (mm == current->active_mm) set_entryhi(mm->context & 0xff); } - __restore_flags(flags); + local_irq_restore(flags); } } @@ -2219,7 +2219,7 @@ #endif newpid = (vma->vm_mm->context & 0xff); page &= (PAGE_MASK << 1); - __save_and_cli(flags); + local_irq_save(flags); oldpid = (get_entryhi() & 0xff); set_entryhi(page | newpid); BARRIER; @@ -2237,7 +2237,7 @@ finish: BARRIER; set_entryhi(oldpid); - __restore_flags(flags); + local_irq_restore(flags); } } @@ -2286,7 +2286,7 @@ } #endif - __save_and_cli(flags); + local_irq_save(flags); address &= (PAGE_MASK << 1); set_entryhi(address | (pid)); pgdp = pgd_offset(vma->vm_mm, address); @@ -2309,7 +2309,7 @@ BARRIER; set_entryhi(pid); BARRIER; - __restore_flags(flags); + local_irq_restore(flags); } #if 0 @@ -2322,7 +2322,7 @@ pte_t *ptep; int idx; - __save_and_cli(flags); + local_irq_save(flags); address &= (PAGE_MASK << 1); set_entryhi(address | (get_entryhi() & 0xff)); pgdp = pgd_offset(vma->vm_mm, address); @@ -2338,7 +2338,7 @@ else tlb_write_indexed(); BARRIER; - __restore_flags(flags); + local_irq_restore(flags); } #endif @@ -2375,7 +2375,7 @@ unsigned long old_pagemask; unsigned long old_ctx; - __save_and_cli(flags); + local_irq_save(flags); /* Save old context and create impossible VPN2 value */ old_ctx = (get_entryhi() & 0xff); old_pagemask = get_pagemask(); @@ -2395,7 +2395,7 @@ BARRIER; set_pagemask (old_pagemask); flush_tlb_all(); - __restore_flags(flags); + local_irq_restore(flags); } /* Detect and size the various r4k caches. */ @@ -2469,7 +2469,7 @@ /* This is such a bitch, you'd think they would make it * easy to do this. Away you daemons of stupidity! */ - __save_and_cli(flags); + local_irq_save(flags); /* Fill each size-multiple cache line with a valid tag. */ pow2 = (64 * 1024); @@ -2513,7 +2513,7 @@ break; pow2 <<= 1; } - __restore_flags(flags); + local_irq_restore(flags); addr -= begin; printk("Secondary cache sized at %dK linesize %d bytes.\n", (int) (addr >> 10), sc_lsize); diff -rNu linux-bk/arch/mips/mm/r5432.c linux/arch/mips/mm/r5432.c --- linux-bk/arch/mips/mm/r5432.c Sun Jun 9 07:30:24 2002 +++ linux/arch/mips/mm/r5432.c Mon Jul 22 19:55:03 2002 @@ -554,7 +554,7 @@ printk("[tlball]"); #endif - __save_and_cli(flags); + local_irq_save(flags); /* Save old context and create impossible VPN2 value */ old_ctx = (get_entryhi() & 0xff); set_entryhi(KSEG0); @@ -574,7 +574,7 @@ } BARRIER; set_entryhi(old_ctx); - __restore_flags(flags); + local_irq_restore(flags); } void flush_tlb_mm(struct mm_struct *mm) @@ -585,11 +585,11 @@ #ifdef DEBUG_TLB printk("[tlbmm<%d>]", mm->context); #endif - __save_and_cli(flags); + local_irq_save(flags); get_new_mmu_context(mm, asid_cache); if (mm == current->active_mm) set_entryhi(mm->context & 0xff); - __restore_flags(flags); + local_irq_restore(flags); } } @@ -604,7 +604,7 @@ printk("[tlbrange<%02x,%08lx,%08lx>]", (mm->context & 0xff), start, end); #endif - __save_and_cli(flags); + local_irq_save(flags); size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; size = (size + 1) >> 1; if(size <= NTLB_ENTRIES_HALF) { @@ -638,7 +638,7 @@ if (mm == current->active_mm) set_entryhi(mm->context & 0xff); } - __restore_flags(flags); + local_irq_restore(flags); } } @@ -653,7 +653,7 @@ #endif newpid = (vma->vm_mm->context & 0xff); page &= (PAGE_MASK << 1); - __save_and_cli(flags); + local_irq_save(flags); oldpid = (get_entryhi() & 0xff); set_entryhi(page | newpid); BARRIER; @@ -671,7 +671,7 @@ finish: BARRIER; set_entryhi(oldpid); - __restore_flags(flags); + local_irq_restore(flags); } } @@ -720,7 +720,7 @@ } #endif - __save_and_cli(flags); + local_irq_save(flags); address &= (PAGE_MASK << 1); set_entryhi(address | (pid)); pgdp = pgd_offset(vma->vm_mm, address); @@ -743,7 +743,7 @@ BARRIER; set_entryhi(pid); BARRIER; - __restore_flags(flags); + local_irq_restore(flags); } void show_regs(struct pt_regs * regs) @@ -779,7 +779,7 @@ unsigned long old_pagemask; unsigned long old_ctx; - __save_and_cli(flags); + local_irq_save(flags); /* Save old context and create impossible VPN2 value */ old_ctx = (get_entryhi() & 0xff); old_pagemask = get_pagemask(); @@ -799,7 +799,7 @@ BARRIER; set_pagemask (old_pagemask); flush_tlb_all(); - __restore_flags(flags); + local_irq_restore(flags); } /* Detect and size the various r4k caches. */ diff -rNu linux-bk/arch/mips/mm/rm7k.c linux/arch/mips/mm/rm7k.c --- linux-bk/arch/mips/mm/rm7k.c Sun Jun 9 07:26:34 2002 +++ linux/arch/mips/mm/rm7k.c Mon Jul 22 19:55:03 2002 @@ -310,7 +310,7 @@ unsigned long old_ctx; int entry; - __save_and_cli(flags); + local_irq_save(flags); /* Save old context and create impossible VPN2 value */ old_ctx = get_entryhi() & 0xff; set_entryhi(KSEG0); @@ -330,7 +330,7 @@ } BARRIER; set_entryhi(old_ctx); - __restore_flags(flags); + local_irq_restore(flags); } void flush_tlb_mm(struct mm_struct *mm) @@ -338,11 +338,11 @@ if(mm->context != 0) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); get_new_mmu_context(mm, asid_cache); if (mm == current->mm) set_entryhi(mm->context & 0xff); - __restore_flags(flags); + local_irq_restore(flags); } } @@ -353,7 +353,7 @@ unsigned long flags; int size; - __save_and_cli(flags); + local_irq_save(flags); size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; size = (size + 1) >> 1; if (size <= (ntlb_entries() / 2)) { @@ -387,7 +387,7 @@ if(mm == current->mm) set_entryhi(mm->context & 0xff); } - __restore_flags(flags); + local_irq_restore(flags); } } @@ -399,7 +399,7 @@ newpid = (vma->vm_mm->context & 0xff); page &= (PAGE_MASK << 1); - __save_and_cli(flags); + local_irq_save(flags); oldpid = (get_entryhi() & 0xff); set_entryhi(page | newpid); BARRIER; @@ -417,7 +417,7 @@ finish: BARRIER; set_entryhi(oldpid); - __restore_flags(flags); + local_irq_restore(flags); } } @@ -460,7 +460,7 @@ pid = get_entryhi() & 0xff; - __save_and_cli(flags); + local_irq_save(flags); address &= (PAGE_MASK << 1); set_entryhi(address | (pid)); pgdp = pgd_offset(vma->vm_mm, address); @@ -483,7 +483,7 @@ BARRIER; set_entryhi(pid); BARRIER; - __restore_flags(flags); + local_irq_restore(flags); } void show_regs(struct pt_regs * regs) @@ -519,7 +519,7 @@ unsigned long old_pagemask; unsigned long old_ctx; - __save_and_cli(flags); + local_irq_save(flags); /* Save old context and create impossible VPN2 value */ old_ctx = (get_entryhi() & 0xff); old_pagemask = get_pagemask(); @@ -539,7 +539,7 @@ BARRIER; set_pagemask (old_pagemask); flush_tlb_all(); - __restore_flags(flags); + local_irq_restore(flags); } /* Used for loading TLB entries before trap_init() has started, when we @@ -557,7 +557,7 @@ unsigned long old_pagemask; unsigned long old_ctx; - __save_and_cli(flags); + local_irq_save(flags); /* Save old context and create impossible VPN2 value */ old_ctx = (get_entryhi() & 0xff); old_pagemask = get_pagemask(); @@ -582,7 +582,7 @@ BARRIER; set_pagemask (old_pagemask); out: - __restore_flags(flags); + local_irq_restore(flags); return ret; } diff -rNu linux-bk/arch/mips/mm/sb1.c linux/arch/mips/mm/sb1.c --- linux-bk/arch/mips/mm/sb1.c Sun Jun 9 07:26:29 2002 +++ linux/arch/mips/mm/sb1.c Mon Jul 22 19:55:03 2002 @@ -67,7 +67,7 @@ unsigned long old_ctx; int entry; - __save_and_cli(flags); + local_irq_save(flags); /* Save old context and create impossible VPN2 value */ old_ctx = (get_entryhi() & 0xff); set_entrylo0(0); @@ -78,7 +78,7 @@ tlb_write_indexed(); } set_entryhi(old_ctx); - __restore_flags(flags); + local_irq_restore(flags); } diff -rNu linux-bk/arch/mips/philips/nino/irq.c linux/arch/mips/philips/nino/irq.c --- linux-bk/arch/mips/philips/nino/irq.c Sun Jun 9 07:27:00 2002 +++ linux/arch/mips/philips/nino/irq.c Mon Jul 22 19:55:03 2002 @@ -177,7 +177,7 @@ action = *(irq + irq_action); if (action) { if (!(action->flags & SA_INTERRUPT)) - __sti(); + local_irq_enable(); do_random = 0; do { do_random |= action->flags; @@ -187,7 +187,7 @@ if (do_random & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); unmask_irq(irq); - __cli(); + local_irq_disable(); } else { IntClear1 = ~0; IntClear3 = ~0; diff -rNu linux-bk/arch/mips/sgi/kernel/indy_sc.c linux/arch/mips/sgi/kernel/indy_sc.c --- linux-bk/arch/mips/sgi/kernel/indy_sc.c Sun Jun 9 07:31:19 2002 +++ linux/arch/mips/sgi/kernel/indy_sc.c Mon Jul 22 19:55:04 2002 @@ -75,7 +75,7 @@ first_line = SC_INDEX(addr); last_line = SC_INDEX(addr + size - 1); - __save_and_cli(flags); + local_irq_save(flags); if (first_line <= last_line) { indy_sc_wipe(first_line, last_line); goto out; @@ -84,7 +84,7 @@ indy_sc_wipe(first_line, SC_SIZE - SC_LINE); indy_sc_wipe(0, last_line); out: - __restore_flags(flags); + local_irq_restore(flags); } static void indy_sc_enable(void) diff -rNu linux-bk/arch/mips64/kernel/ptrace.c linux/arch/mips64/kernel/ptrace.c --- linux-bk/arch/mips64/kernel/ptrace.c Sun Jun 9 07:28:12 2002 +++ linux/arch/mips64/kernel/ptrace.c Mon Jul 22 19:55:16 2002 @@ -158,10 +158,10 @@ break; case FPC_EIR: { /* implementation / version register */ unsigned int flags; - __save_flags(flags); + local_save_flags(flags); set_cp0_status(ST0_CU1, ST0_CU1); __asm__ __volatile__("cfc1\t%0,$0": "=r" (tmp)); - __restore_flags(flags); + local_irq_restore(flags); break; } default: @@ -418,10 +418,10 @@ break; case FPC_EIR: { /* implementation / version register */ unsigned int flags; - __save_flags(flags); + local_save_flags(flags); set_cp0_status(ST0_CU1, ST0_CU1); __asm__ __volatile__("cfc1\t%0,$0": "=r" (tmp)); - __restore_flags(flags); + local_irq_restore(flags); break; } default: diff -rNu linux-bk/arch/mips64/lib/dump_tlb.c linux/arch/mips64/lib/dump_tlb.c --- linux-bk/arch/mips64/lib/dump_tlb.c Sun Jun 9 07:31:16 2002 +++ linux/arch/mips64/lib/dump_tlb.c Mon Jul 22 19:55:16 2002 @@ -101,7 +101,7 @@ unsigned int flags, oldpid; int index; - __save_and_cli(flags); + local_irq_save(flags); oldpid = get_entryhi() & 0xff; BARRIER; set_entryhi((addr & PAGE_MASK) | oldpid); @@ -110,7 +110,7 @@ BARRIER; index = get_index(); set_entryhi(oldpid); - __restore_flags(flags); + local_irq_restore(flags); if (index < 0) { printk("No entry for address 0x%08lx in TLB\n", addr); diff -rNu linux-bk/arch/mips64/mips-boards/generic/time.c linux/arch/mips64/mips-boards/generic/time.c --- linux-bk/arch/mips64/mips-boards/generic/time.c Sun Jun 9 07:27:48 2002 +++ linux/arch/mips64/mips-boards/generic/time.c Mon Jul 22 19:55:17 2002 @@ -188,7 +188,7 @@ unsigned long count; unsigned int flags; - __save_and_cli(flags); + local_irq_save(flags); /* Start counter exactly on falling edge of update flag */ while (CMOS_READ(RTC_REG_A) & RTC_UIP); @@ -204,7 +204,7 @@ count = read_32bit_cp0_register(CP0_COUNT); /* restore interrupts */ - __restore_flags(flags); + local_irq_restore(flags); return (count / HZ); } diff -rNu linux-bk/arch/mips64/mm/andes.c linux/arch/mips64/mm/andes.c --- linux-bk/arch/mips64/mm/andes.c Sun Jun 9 07:26:52 2002 +++ linux/arch/mips64/mm/andes.c Mon Jul 22 19:55:16 2002 @@ -143,7 +143,7 @@ printk("[tlball]"); #endif - __save_and_cli(flags); + local_irq_save(flags); /* Save old context and create impossible VPN2 value */ old_ctx = get_entryhi() & 0xff; set_entryhi(CKSEG0); @@ -159,7 +159,7 @@ entry++; } set_entryhi(old_ctx); - __restore_flags(flags); + local_irq_restore(flags); } static void andes_flush_tlb_mm(struct mm_struct *mm) @@ -170,11 +170,11 @@ #ifdef DEBUG_TLB printk("[tlbmm<%d>]", mm->context); #endif - __save_and_cli(flags); + local_irq_save(flags); get_new_cpu_mmu_context(mm, smp_processor_id()); if(mm == current->mm) set_entryhi(CPU_CONTEXT(smp_processor_id(), mm) & 0xff); - __restore_flags(flags); + local_irq_restore(flags); } } @@ -192,7 +192,7 @@ printk("[tlbrange<%02x,%08lx,%08lx>]", (mm->context & 0xff), start, end); #endif - __save_and_cli(flags); + local_irq_save(flags); size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; size = (size + 1) >> 1; if(size <= NTLB_ENTRIES_HALF) { @@ -223,7 +223,7 @@ set_entryhi(CPU_CONTEXT(smp_processor_id(), mm) & 0xff); } - __restore_flags(flags); + local_irq_restore(flags); } } @@ -239,7 +239,7 @@ #endif newpid = (CPU_CONTEXT(smp_processor_id(), vma->vm_mm) & 0xff); page &= (PAGE_MASK << 1); - __save_and_cli(flags); + local_irq_save(flags); oldpid = (get_entryhi() & 0xff); set_entryhi(page | newpid); tlb_probe(); @@ -253,7 +253,7 @@ finish: set_entryhi(oldpid); - __restore_flags(flags); + local_irq_restore(flags); } } @@ -275,7 +275,7 @@ if (current->active_mm != vma->vm_mm) return; - __save_and_cli(flags); + local_irq_save(flags); pid = get_entryhi() & 0xff; if((pid != (CPU_CONTEXT(smp_processor_id(), vma->vm_mm) & 0xff)) || @@ -301,7 +301,7 @@ tlb_write_indexed(); } set_entryhi(pid); - __restore_flags(flags); + local_irq_restore(flags); } static void andes_show_regs(struct pt_regs *regs) diff -rNu linux-bk/arch/mips64/mm/r4xx0.c linux/arch/mips64/mm/r4xx0.c --- linux-bk/arch/mips64/mm/r4xx0.c Sun Jun 9 07:26:35 2002 +++ linux/arch/mips64/mm/r4xx0.c Mon Jul 22 19:55:16 2002 @@ -194,7 +194,7 @@ { unsigned int flags; - __save_and_cli(flags); + local_irq_save(flags); *(volatile unsigned int *)KSEG1; __asm__ __volatile__( ".set\tnoreorder\n\t" @@ -217,7 +217,7 @@ :"=r" (page) :"0" (page), "I" (PAGE_SIZE), "i" (Create_Dirty_Excl_D) :"$1", "memory"); - __restore_flags(flags); + local_irq_restore(flags); } /* @@ -473,7 +473,7 @@ unsigned long dummy1, dummy2, reg1, reg2; unsigned int flags; - __save_and_cli(flags); + local_irq_save(flags); __asm__ __volatile__( ".set\tnoreorder\n\t" ".set\tnoat\n\t" @@ -512,7 +512,7 @@ :"=r" (dummy1), "=r" (dummy2), "=&r" (reg1), "=&r" (reg2) :"0" (to), "1" (from), "I" (PAGE_SIZE), "i" (Create_Dirty_Excl_D)); - __restore_flags(flags); + local_irq_restore(flags); } /* @@ -699,81 +699,81 @@ { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache16(); blast_icache16(); blast_scache16(); - __restore_flags(flags); + local_irq_restore(flags); } static inline void r4k_flush_cache_all_s32d16i16(void) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache16(); blast_icache16(); blast_scache32(); - __restore_flags(flags); + local_irq_restore(flags); } static inline void r4k_flush_cache_all_s64d16i16(void) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache16(); blast_icache16(); blast_scache64(); - __restore_flags(flags); + local_irq_restore(flags); } static inline void r4k_flush_cache_all_s128d16i16(void) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache16(); blast_icache16(); blast_scache128(); - __restore_flags(flags); + local_irq_restore(flags); } static inline void r4k_flush_cache_all_s32d32i32(void) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache32(); blast_icache32(); blast_scache32(); - __restore_flags(flags); + local_irq_restore(flags); } static inline void r4k_flush_cache_all_s64d32i32(void) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache32(); blast_icache32(); blast_scache64(); - __restore_flags(flags); + local_irq_restore(flags); } static inline void r4k_flush_cache_all_s128d32i32(void) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache32(); blast_icache32(); blast_scache128(); - __restore_flags(flags); + local_irq_restore(flags); } static inline void r4k_flush_cache_all_d16i16(void) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache16(); blast_icache16(); - __restore_flags(flags); + local_irq_restore(flags); } static inline void r4k_flush_cache_all_d32i32(void) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache32(); blast_icache32(); - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_range_s16d16i16(struct vm_area_struct *vma, @@ -799,7 +799,7 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); + local_irq_save(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -809,7 +809,7 @@ blast_scache16_page(start); start += PAGE_SIZE; } - __restore_flags(flags); + local_irq_restore(flags); } } } @@ -837,7 +837,7 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); + local_irq_save(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -847,7 +847,7 @@ blast_scache32_page(start); start += PAGE_SIZE; } - __restore_flags(flags); + local_irq_restore(flags); } } } @@ -875,7 +875,7 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); + local_irq_save(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -885,7 +885,7 @@ blast_scache64_page(start); start += PAGE_SIZE; } - __restore_flags(flags); + local_irq_restore(flags); } } } @@ -913,7 +913,7 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); + local_irq_save(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -923,7 +923,7 @@ blast_scache128_page(start); start += PAGE_SIZE; } - __restore_flags(flags); + local_irq_restore(flags); } } } @@ -951,7 +951,7 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); + local_irq_save(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -961,7 +961,7 @@ blast_scache32_page(start); start += PAGE_SIZE; } - __restore_flags(flags); + local_irq_restore(flags); } } } @@ -989,7 +989,7 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); + local_irq_save(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -999,7 +999,7 @@ blast_scache64_page(start); start += PAGE_SIZE; } - __restore_flags(flags); + local_irq_restore(flags); } } } @@ -1027,7 +1027,7 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); + local_irq_save(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -1037,7 +1037,7 @@ blast_scache128_page(start); start += PAGE_SIZE; } - __restore_flags(flags); + local_irq_restore(flags); } } } @@ -1054,9 +1054,9 @@ #ifdef DEBUG_CACHE printk("crange[%d,%08lx,%08lx]", (int)mm->context, start, end); #endif - __save_and_cli(flags); + local_irq_save(flags); blast_dcache16(); blast_icache16(); - __restore_flags(flags); + local_irq_restore(flags); } } @@ -1072,9 +1072,9 @@ #ifdef DEBUG_CACHE printk("crange[%d,%08lx,%08lx]", (int)mm->context, start, end); #endif - __save_and_cli(flags); + local_irq_save(flags); blast_dcache32(); blast_icache32(); - __restore_flags(flags); + local_irq_restore(flags); } } @@ -1192,7 +1192,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1221,7 +1221,7 @@ } else blast_scache16_page(page); out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_page_s32d16i16(struct vm_area_struct *vma, @@ -1243,7 +1243,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1271,7 +1271,7 @@ } else blast_scache32_page(page); out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_page_s64d16i16(struct vm_area_struct *vma, @@ -1293,7 +1293,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1322,7 +1322,7 @@ } else blast_scache64_page(page); out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_page_s128d16i16(struct vm_area_struct *vma, @@ -1344,7 +1344,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1374,7 +1374,7 @@ } else blast_scache128_page(page); out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_page_s32d32i32(struct vm_area_struct *vma, @@ -1396,7 +1396,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1427,7 +1427,7 @@ } else blast_scache32_page(page); out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_page_s64d32i32(struct vm_area_struct *vma, @@ -1449,7 +1449,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1480,7 +1480,7 @@ } else blast_scache64_page(page); out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_page_s128d32i32(struct vm_area_struct *vma, @@ -1502,7 +1502,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1531,7 +1531,7 @@ } else blast_scache128_page(page); out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_page_d16i16(struct vm_area_struct *vma, @@ -1553,7 +1553,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1581,7 +1581,7 @@ blast_dcache16_page_indexed(page); } out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_page_d32i32(struct vm_area_struct *vma, @@ -1603,7 +1603,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1633,7 +1633,7 @@ blast_dcache32_page_indexed(page); } out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_cache_page_d32i32_r4600(struct vm_area_struct *vma, @@ -1655,7 +1655,7 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); + local_irq_save(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1685,7 +1685,7 @@ blast_dcache32_page_indexed(page ^ dcache_waybit); } out: - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_page_to_ram_s16(struct page *page) @@ -1712,18 +1712,18 @@ { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache16_page((unsigned long)page_address(page)); - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_page_to_ram_d32(struct page *page) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); blast_dcache32_page((unsigned long)page_address(page)); - __restore_flags(flags); + local_irq_restore(flags); } /* @@ -1746,7 +1746,7 @@ flush_cache_l1(); } else { /* Workaround for R4600 bug. See comment above. */ - __save_and_cli(flags); + local_irq_save(flags); *(volatile unsigned long *)KSEG1; a = addr & ~((unsigned long)dc_lsize - 1); @@ -1756,7 +1756,7 @@ if (a == end) break; a += dc_lsize; } - __restore_flags(flags); + local_irq_restore(flags); } bc_wback_inv(addr, size); } @@ -1788,7 +1788,7 @@ flush_cache_l1(); } else { /* Workaround for R4600 bug. See comment above. */ - __save_and_cli(flags); + local_irq_save(flags); *(volatile unsigned long *)KSEG1; a = addr & ~((unsigned long)dc_lsize - 1); @@ -1798,7 +1798,7 @@ if (a == end) break; a += dc_lsize; } - __restore_flags(flags); + local_irq_restore(flags); } bc_inv(addr, size); @@ -1844,7 +1844,7 @@ { unsigned int flags; - __save_and_cli(flags); + local_irq_save(flags); /* Clear internal cache refill buffer */ *(volatile unsigned int *)KSEG1; @@ -1852,7 +1852,7 @@ protected_writeback_dcache_line(addr & ~(dc_lsize - 1)); protected_flush_icache_line(addr & ~(ic_lsize - 1)); - __restore_flags(flags); + local_irq_restore(flags); } #undef DEBUG_TLB @@ -1871,7 +1871,7 @@ printk("[tlball]"); #endif - __save_and_cli(flags); + local_irq_save(flags); /* Save old context and create impossible VPN2 value */ old_ctx = (get_entryhi() & 0xff); set_entryhi(KSEG0); @@ -1891,7 +1891,7 @@ } BARRIER; set_entryhi(old_ctx); - __restore_flags(flags); + local_irq_restore(flags); } static void r4k_flush_tlb_mm(struct mm_struct *mm) @@ -1902,11 +1902,11 @@ #ifdef DEBUG_TLB printk("[tlbmm<%d>]", mm->context); #endif - __save_and_cli(flags); + local_irq_save(flags); get_new_cpu_mmu_context(mm, smp_processor_id()); if(mm == current->mm) set_entryhi(CPU_CONTEXT(smp_processor_id(), mm) & 0xff); - __restore_flags(flags); + local_irq_restore(flags); } } @@ -1923,7 +1923,7 @@ printk("[tlbrange<%02x,%08lx,%08lx>]", (mm->context & 0xff), start, end); #endif - __save_and_cli(flags); + local_irq_save(flags); size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; size = (size + 1) >> 1; if(size <= NTLB_ENTRIES_HALF) { @@ -1958,7 +1958,7 @@ set_entryhi(CPU_CONTEXT(smp_processor_id(), mm) & 0xff); } - __restore_flags(flags); + local_irq_restore(flags); } } @@ -1973,7 +1973,7 @@ #endif newpid = (CPU_CONTEXT(smp_processor_id(), vma->vm_mm) & 0xff); page &= (PAGE_MASK << 1); - __save_and_cli(flags); + local_irq_save(flags); oldpid = (get_entryhi() & 0xff); set_entryhi(page | newpid); BARRIER; @@ -1991,7 +1991,7 @@ finish: BARRIER; set_entryhi(oldpid); - __restore_flags(flags); + local_irq_restore(flags); } } @@ -2018,7 +2018,7 @@ if (current->active_mm != vma->vm_mm) return; - __save_and_cli(flags); + local_irq_save(flags); pid = (get_entryhi() & 0xff); #ifdef DEBUG_TLB @@ -2052,7 +2052,7 @@ BARRIER; set_entryhi(pid); BARRIER; - __restore_flags(flags); + local_irq_restore(flags); } #if 0 @@ -2065,7 +2065,7 @@ pte_t *ptep; int idx; - __save_and_cli(flags); + local_irq_save(flags); address &= (PAGE_MASK << 1); set_entryhi(address | (get_entryhi() & 0xff)); pgdp = pgd_offset(vma->vm_mm, address); @@ -2081,7 +2081,7 @@ else tlb_write_indexed(); BARRIER; - __restore_flags(flags); + local_irq_restore(flags); } #endif @@ -2171,7 +2171,7 @@ /* This is such a bitch, you'd think they would make it * easy to do this. Away you daemons of stupidity! */ - __save_and_cli(flags); + local_irq_save(flags); /* Fill each size-multiple cache line with a valid tag. */ pow2 = (64 * 1024); @@ -2207,7 +2207,7 @@ break; pow2 <<= 1; } - __restore_flags(flags); + local_irq_restore(flags); addr -= begin; printk("Secondary cache sized at %dK linesize %d\n", (int) (addr >> 10), sc_lsize); diff -rNu linux-bk/arch/mips64/sgi-ip22/ip22-int.c linux/arch/mips64/sgi-ip22/ip22-int.c --- linux-bk/arch/mips64/sgi-ip22/ip22-int.c Sun Jun 9 07:27:20 2002 +++ linux/arch/mips64/sgi-ip22/ip22-int.c Mon Jul 22 19:55:15 2002 @@ -306,7 +306,7 @@ action = *(irq + irq_action); if (action) { if (!(action->flags & SA_INTERRUPT)) - __sti(); + local_irq_enable(); action = *(irq + irq_action); do_random = 0; do { @@ -316,7 +316,7 @@ } while (action); if (do_random & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); - __cli(); + local_irq_disable(); } irq_exit(cpu, irq); diff -rNu linux-bk/arch/mips64/sgi-ip22/ip22-sc.c linux/arch/mips64/sgi-ip22/ip22-sc.c --- linux-bk/arch/mips64/sgi-ip22/ip22-sc.c Sun Jun 9 07:31:23 2002 +++ linux/arch/mips64/sgi-ip22/ip22-sc.c Mon Jul 22 19:55:15 2002 @@ -58,7 +58,7 @@ first_line = SC_INDEX(addr); last_line = SC_INDEX(addr + size - 1); - __save_and_cli(flags); + local_irq_save(flags); if (first_line <= last_line) { indy_sc_wipe(first_line, last_line); goto out; @@ -67,7 +67,7 @@ indy_sc_wipe(first_line, SC_SIZE - SC_LINE); indy_sc_wipe(0, last_line); out: - __restore_flags(flags); + local_irq_restore(flags); } static void inline indy_sc_enable(void) diff -rNu linux-bk/arch/mips64/sgi-ip27/ip27-irq.c linux/arch/mips64/sgi-ip27/ip27-irq.c --- linux-bk/arch/mips64/sgi-ip27/ip27-irq.c Sun Jun 9 07:30:08 2002 +++ linux/arch/mips64/sgi-ip27/ip27-irq.c Mon Jul 22 19:55:16 2002 @@ -175,7 +175,7 @@ action = *(irq + irq_action); if (action) { if (!(action->flags & SA_INTERRUPT)) - __sti(); + local_irq_enable(); do_random = 0; do { do_random |= action->flags; @@ -184,7 +184,7 @@ } while (action); if (do_random & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); - __cli(); + local_irq_disable(); } irq_exit(thiscpu, irq); @@ -506,9 +506,9 @@ show("wait_on_irq"); count = ~0; } - __sti(); + local_irq_enable(); SYNC_OTHER_CORES(cpu); - __cli(); + local_irq_disable(); if (irqs_running()) continue; if (spin_is_locked(&global_irq_lock)) @@ -555,10 +555,10 @@ { unsigned int flags; - __save_flags(flags); + local_save_flags(flags); if (flags & ST0_IE) { int cpu = smp_processor_id(); - __cli(); + local_irq_disable(); if (!local_irq_count(cpu)) get_irqlock(cpu); } @@ -570,7 +570,7 @@ if (!local_irq_count(cpu)) release_irqlock(cpu); - __sti(); + local_irq_enable(); } /* @@ -587,7 +587,7 @@ unsigned long flags; int cpu = smp_processor_id(); - __save_flags(flags); + local_save_flags(flags); local_enabled = (flags & ST0_IE); /* default to local */ retval = 2 + local_enabled; @@ -612,10 +612,10 @@ __global_sti(); break; case 2: - __cli(); + local_irq_disable(); break; case 3: - __sti(); + local_irq_enable(); break; default: printk("global_restore_flags: %08lx\n", flags); diff -rNu linux-bk/arch/ppc/kernel/iSeries_head.S linux/arch/ppc/kernel/iSeries_head.S --- linux-bk/arch/ppc/kernel/iSeries_head.S Sun Jun 9 07:28:24 2002 +++ linux/arch/ppc/kernel/iSeries_head.S Mon Jul 22 19:54:52 2002 @@ -1103,7 +1103,7 @@ /* enable and check for decrementers/lpEvents */ mr r3,r31 - bl __restore_flags + bl local_irq_restore /* Restore r3, r4 and LR */ lwz r3,44(r1) @@ -1292,7 +1292,7 @@ /* enable and check for decrementers/lpEvents */ mr r3,r31 - bl __restore_flags + bl local_irq_restore lwz r3,40(r1) mtlr r3 diff -rNu linux-bk/arch/ppc/kernel/iSeries_misc.S linux/arch/ppc/kernel/iSeries_misc.S --- linux-bk/arch/ppc/kernel/iSeries_misc.S Sun Jun 9 07:26:51 2002 +++ linux/arch/ppc/kernel/iSeries_misc.S Mon Jul 22 19:54:51 2002 @@ -61,16 +61,16 @@ mtmsr r5 /* restore MSR_EE */ blr -/* void __save_flags(unsigned long *flags) */ -_GLOBAL(__save_flags_ptr) +/* void local_save_flags(unsigned long *flags) */ +_GLOBAL(local_save_flags_ptr) mfspr r4,SPRG1 /* Get Paca pointer */ lbz r4,PACAPROCENABLED(r4) stw r4,0(r3) blr -_GLOBAL(__save_flags_ptr_end) +_GLOBAL(local_save_flags_ptr_end) -/* void __restore_flags(unsigned long flags) */ -_GLOBAL(__restore_flags) +/* void local_irq_restore(unsigned long flags) */ +_GLOBAL(local_irq_restore) cmpi 0,r3,0 /* Are we enabling? */ beq 0f /* No - then skip interrupt checks */ @@ -104,19 +104,19 @@ mfspr r4,SPRG1 stb r3,PACAPROCENABLED(r4) blr -_GLOBAL(__restore_flags_end) +_GLOBAL(local_irq_restore_end) -_GLOBAL(__cli) +_GLOBAL(local_irq_disable) mfspr r4,SPRG1 li r3,0 stb r3,PACAPROCENABLED(r4) blr /* Done */ -_GLOBAL(__cli_end) +_GLOBAL(local_irq_disable_end) -_GLOBAL(__sti) +_GLOBAL(local_irq_enable) li r3,1 - b __restore_flags -_GLOBAL(__sti_end) + b local_irq_restore +_GLOBAL(local_irq_enable_end) /* * We were about to enable interrupts but we have to simulate diff -rNu linux-bk/arch/ppc/kernel/idle.c linux/arch/ppc/kernel/idle.c --- linux-bk/arch/ppc/kernel/idle.c Sun Jun 9 07:26:34 2002 +++ linux/arch/ppc/kernel/idle.c Mon Jul 22 19:54:51 2002 @@ -120,7 +120,7 @@ * Disable interrupts to prevent a lost wakeup * when going to sleep. This is necessary even with * RTLinux since we are not guaranteed an interrupt - * didn't come in and is waiting for a __sti() before + * didn't come in and is waiting for a local_irq_enable() before * emulating one. This way, we really do hard disable. * * We assume that we're sti-ed when we come in here. We @@ -163,8 +163,8 @@ u64 tb; /* Poll for I/O events */ - __cli(); - __sti(); + local_irq_disable(); + local_irq_enable(); paca = (struct Paca *)mfspr(SPRG1); if ( paca->xLpPaca.xSharedProc ) { @@ -181,8 +181,8 @@ * Disabling/enabling will check for LpEvents, IPIs * and decrementers */ - __cli(); - __sti(); + local_irq_disable(); + local_irq_enable(); ++yield_count; @@ -193,14 +193,14 @@ HvCall_yieldProcessor( HvCall_YieldTimed, tb ); /* Check here for any of the above pending or timeout expired*/ - __cli(); + local_irq_disable(); /* * The decrementer stops during the yield. Just force * a fake decrementer now and the timer_interrupt * code will straighten it all out */ paca->xLpPaca.xDecrInt = 1; - __sti(); + local_irq_enable(); } } #endif /* CONFIG_PPC_ISERIES */ diff -rNu linux-bk/arch/ppc/kernel/irq.c linux/arch/ppc/kernel/irq.c --- linux-bk/arch/ppc/kernel/irq.c Mon Jul 22 19:22:24 2002 +++ linux/arch/ppc/kernel/irq.c Mon Jul 22 19:54:52 2002 @@ -422,7 +422,7 @@ int status = 0; if (!(action->flags & SA_INTERRUPT)) - __sti(); + local_irq_enable(); do { status |= action->flags; @@ -431,7 +431,7 @@ } while (action); if (status & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); - __cli(); + local_irq_disable(); } /* @@ -637,15 +637,15 @@ show("wait_on_irq"); count = ~0; } - __sti(); + local_irq_enable(); /* - * We have to allow irqs to arrive between __sti and __cli + * We have to allow irqs to arrive between local_irq_enable and local_irq_disable * Some cpus apparently won't cause the interrupt * for several instructions. We hope that isync will * catch this --Troy */ __asm__ __volatile__ ("isync"); - __cli(); + local_irq_disable(); if (irqs_running()) continue; if (global_irq_lock) @@ -736,10 +736,10 @@ { unsigned long flags; - __save_flags(flags); + local_save_flags(flags); if (flags & (1 << 15)) { int cpu = smp_processor_id(); - __cli(); + local_irq_disable(); if (!local_irq_count(cpu)) get_irqlock(cpu); } @@ -751,7 +751,7 @@ if (!local_irq_count(cpu)) release_irqlock(cpu); - __sti(); + local_irq_enable(); } /* @@ -767,7 +767,7 @@ int local_enabled; unsigned long flags; - __save_flags(flags); + local_save_flags(flags); local_enabled = (flags >> 15) & 1; /* default to local */ retval = 2 + local_enabled; @@ -817,10 +817,10 @@ __global_sti(); break; case 2: - __cli(); + local_irq_disable(); break; case 3: - __sti(); + local_irq_enable(); break; default: { diff -rNu linux-bk/arch/ppc/kernel/misc.S linux/arch/ppc/kernel/misc.S --- linux-bk/arch/ppc/kernel/misc.S Mon Jul 22 19:22:26 2002 +++ linux/arch/ppc/kernel/misc.S Mon Jul 22 19:54:52 2002 @@ -207,8 +207,8 @@ bctr #ifndef CONFIG_PPC_ISERIES /* iSeries version is in iSeries_misc.S */ -/* void __save_flags_ptr(unsigned long *flags) */ -_GLOBAL(__save_flags_ptr) +/* void local_save_flags_ptr(unsigned long *flags) */ +_GLOBAL(local_save_flags_ptr) mfmsr r4 stw r4,0(r3) blr @@ -234,10 +234,10 @@ nop nop nop -_GLOBAL(__save_flags_ptr_end) +_GLOBAL(local_save_flags_ptr_end) -/* void __restore_flags(unsigned long flags) */ -_GLOBAL(__restore_flags) +/* void local_irq_restore(unsigned long flags) */ +_GLOBAL(local_irq_restore) /* * Just set/clear the MSR_EE bit through restore/flags but do not * change anything else. This is needed by the RT system and makes @@ -275,9 +275,9 @@ nop nop nop -_GLOBAL(__restore_flags_end) +_GLOBAL(local_irq_restore_end) -_GLOBAL(__cli) +_GLOBAL(local_irq_disable) mfmsr r0 /* Get current interrupt state */ rlwinm r3,r0,16+1,32-1,31 /* Extract old value of 'EE' */ rlwinm r0,r0,0,17,15 /* clear MSR_EE in r0 */ @@ -304,9 +304,9 @@ nop nop nop -_GLOBAL(__cli_end) +_GLOBAL(local_irq_disable_end) -_GLOBAL(__sti) +_GLOBAL(local_irq_enable) mfmsr r3 /* Get current state */ ori r3,r3,MSR_EE /* Turn on 'EE' bit */ SYNC /* Some chip revs have problems here... */ @@ -333,7 +333,7 @@ nop nop nop -_GLOBAL(__sti_end) +_GLOBAL(local_irq_enable_end) #endif /* CONFIG_PPC_ISERIES */ /* diff -rNu linux-bk/arch/ppc/kernel/ppc4xx_setup.c linux/arch/ppc/kernel/ppc4xx_setup.c --- linux-bk/arch/ppc/kernel/ppc4xx_setup.c Mon Jul 22 19:22:27 2002 +++ linux/arch/ppc/kernel/ppc4xx_setup.c Mon Jul 22 19:54:51 2002 @@ -177,7 +177,7 @@ ppc4xx_power_off(void) { printk("System Halted\n"); - __cli(); + local_irq_disable(); while (1) ; } @@ -185,7 +185,7 @@ ppc4xx_halt(void) { printk("System Halted\n"); - __cli(); + local_irq_disable(); while (1) ; } diff -rNu linux-bk/arch/ppc/kernel/ppc_ksyms.c linux/arch/ppc/kernel/ppc_ksyms.c --- linux-bk/arch/ppc/kernel/ppc_ksyms.c Mon Jul 22 19:22:26 2002 +++ linux/arch/ppc/kernel/ppc_ksyms.c Mon Jul 22 19:54:52 2002 @@ -298,14 +298,14 @@ EXPORT_SYMBOL(__delay); #ifndef INLINE_IRQS -EXPORT_SYMBOL(__sti); -EXPORT_SYMBOL(__sti_end); -EXPORT_SYMBOL(__cli); -EXPORT_SYMBOL(__cli_end); -EXPORT_SYMBOL(__save_flags_ptr); -EXPORT_SYMBOL(__save_flags_ptr_end); -EXPORT_SYMBOL(__restore_flags); -EXPORT_SYMBOL(__restore_flags_end); +EXPORT_SYMBOL(local_irq_enable); +EXPORT_SYMBOL(local_irq_enable_end); +EXPORT_SYMBOL(local_irq_disable); +EXPORT_SYMBOL(local_irq_disable_end); +EXPORT_SYMBOL(local_save_flags_ptr); +EXPORT_SYMBOL(local_save_flags_ptr_end); +EXPORT_SYMBOL(local_irq_restore); +EXPORT_SYMBOL(local_irq_restore_end); #endif EXPORT_SYMBOL(timer_interrupt); EXPORT_SYMBOL(irq_desc); diff -rNu linux-bk/arch/ppc/kernel/process.c linux/arch/ppc/kernel/process.c --- linux-bk/arch/ppc/kernel/process.c Mon Jul 22 19:22:26 2002 +++ linux/arch/ppc/kernel/process.c Mon Jul 22 19:54:52 2002 @@ -202,8 +202,8 @@ struct thread_struct *new_thread, *old_thread; unsigned long s; - __save_flags(s); - __cli(); + local_save_flags(s); + local_irq_disable(); #if CHECK_STACK check_stack(prev); check_stack(new); @@ -246,7 +246,7 @@ new_thread = &new->thread; old_thread = ¤t->thread; _switch(old_thread, new_thread); - __restore_flags(s); + local_irq_restore(s); } void show_regs(struct pt_regs * regs) diff -rNu linux-bk/arch/ppc/kernel/smp.c linux/arch/ppc/kernel/smp.c --- linux-bk/arch/ppc/kernel/smp.c Mon Jul 22 19:22:24 2002 +++ linux/arch/ppc/kernel/smp.c Mon Jul 22 19:54:52 2002 @@ -164,7 +164,7 @@ static void stop_this_cpu(void *dummy) { - __cli(); + local_irq_disable(); while (1) ; } @@ -488,9 +488,9 @@ /* FIXME: This doesn't work with hotplug CPUs --RR */ if (!smp_tb_synchronized && num_online_cpus() == 2) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); smp_software_tb_sync(0); - __restore_flags(flags); + local_irq_restore(flags); } } @@ -514,7 +514,7 @@ if (!smp_tb_synchronized && num_online_cpus() == 2) { smp_software_tb_sync(cpu); } - __sti(); + local_irq_enable(); } /* intel needs this */ diff -rNu linux-bk/arch/ppc/platforms/adir_setup.c linux/arch/ppc/platforms/adir_setup.c --- linux-bk/arch/ppc/platforms/adir_setup.c Mon Jul 22 19:22:23 2002 +++ linux/arch/ppc/platforms/adir_setup.c Mon Jul 22 19:54:53 2002 @@ -133,7 +133,7 @@ static void adir_restart(char *cmd) { - __cli(); + local_irq_disable(); /* SRR0 has system reset vector, SRR1 has default MSR value */ /* rfi restores MSR from SRR1 and sets the PC to the SRR0 value */ __asm__ __volatile__ diff -rNu linux-bk/arch/ppc/platforms/ev64260_setup.c linux/arch/ppc/platforms/ev64260_setup.c --- linux-bk/arch/ppc/platforms/ev64260_setup.c Mon Jul 22 19:22:23 2002 +++ linux/arch/ppc/platforms/ev64260_setup.c Mon Jul 22 19:54:52 2002 @@ -286,7 +286,7 @@ static void ev64260_reset_board(void) { - __cli(); + local_irq_disable(); /* Set exception prefix high - to the firmware */ _nmask_and_or_msr(0, MSR_IP); @@ -310,7 +310,7 @@ static void ev64260_halt(void) { - __cli(); + local_irq_disable(); while (1); /* NOTREACHED */ } diff -rNu linux-bk/arch/ppc/platforms/gemini_setup.c linux/arch/ppc/platforms/gemini_setup.c --- linux-bk/arch/ppc/platforms/gemini_setup.c Mon Jul 22 19:22:27 2002 +++ linux/arch/ppc/platforms/gemini_setup.c Mon Jul 22 19:54:53 2002 @@ -305,7 +305,7 @@ void gemini_restart(char *cmd) { - __cli(); + local_irq_disable(); /* make a clean restart, not via the MPIC */ _gemini_reboot(); for(;;); diff -rNu linux-bk/arch/ppc/platforms/iSeries_pic.c linux/arch/ppc/platforms/iSeries_pic.c --- linux-bk/arch/ppc/platforms/iSeries_pic.c Sun Jun 9 07:26:53 2002 +++ linux/arch/ppc/platforms/iSeries_pic.c Mon Jul 22 19:54:52 2002 @@ -65,10 +65,10 @@ lpq = paca->lpQueuePtr; if ( lpq ) { - __save_flags( flags ); - __cli(); + local_save_flags( flags ); + local_irq_disable(); lpEvent_count += ItLpQueue_process( lpq, regs ); - __restore_flags( flags ); + local_irq_restore( flags ); } hardirq_exit( cpu ); diff -rNu linux-bk/arch/ppc/platforms/k2_setup.c linux/arch/ppc/platforms/k2_setup.c --- linux-bk/arch/ppc/platforms/k2_setup.c Mon Jul 22 19:22:23 2002 +++ linux/arch/ppc/platforms/k2_setup.c Mon Jul 22 19:54:53 2002 @@ -205,7 +205,7 @@ static void k2_restart(char *cmd) { - __cli(); + local_irq_disable(); /* SRR0 has system reset vector, SRR1 has default MSR value */ /* rfi restores MSR from SRR1 and sets the PC to the SRR0 value */ __asm__ __volatile__ diff -rNu linux-bk/arch/ppc/platforms/lopec_setup.c linux/arch/ppc/platforms/lopec_setup.c --- linux-bk/arch/ppc/platforms/lopec_setup.c Mon Jul 22 19:22:26 2002 +++ linux/arch/ppc/platforms/lopec_setup.c Mon Jul 22 19:54:52 2002 @@ -84,7 +84,7 @@ reg |= 0x80; *((unsigned char *) LOPEC_SYSSTAT1) = reg; - __cli(); + local_irq_disable(); while(1); #undef LOPEC_SYSSTAT1 } @@ -92,7 +92,7 @@ static void lopec_halt(void) { - __cli(); + local_irq_disable(); while(1); } diff -rNu linux-bk/arch/ppc/platforms/mcpn765_setup.c linux/arch/ppc/platforms/mcpn765_setup.c --- linux-bk/arch/ppc/platforms/mcpn765_setup.c Mon Jul 22 19:22:23 2002 +++ linux/arch/ppc/platforms/mcpn765_setup.c Mon Jul 22 19:54:52 2002 @@ -226,7 +226,7 @@ static void mcpn765_reset_board(void) { - __cli(); + local_irq_disable(); /* Set exception prefix high - to the firmware */ _nmask_and_or_msr(0, MSR_IP); @@ -257,7 +257,7 @@ static void mcpn765_halt(void) { - __cli(); + local_irq_disable(); while (1); /* NOTREACHED */ } diff -rNu linux-bk/arch/ppc/platforms/menf1_setup.c linux/arch/ppc/platforms/menf1_setup.c --- linux-bk/arch/ppc/platforms/menf1_setup.c Mon Jul 22 19:22:23 2002 +++ linux/arch/ppc/platforms/menf1_setup.c Mon Jul 22 19:54:53 2002 @@ -93,7 +93,7 @@ int picr1; struct pci_dev *pdev; - __cli(); + local_irq_disable(); /* * Firmware doesn't like re-entry using Map B (CHRP), so make sure the @@ -130,7 +130,7 @@ static void menf1_halt(void) { - __cli(); + local_irq_disable(); while (1); } diff -rNu linux-bk/arch/ppc/platforms/mvme5100_setup.c linux/arch/ppc/platforms/mvme5100_setup.c --- linux-bk/arch/ppc/platforms/mvme5100_setup.c Mon Jul 22 19:22:23 2002 +++ linux/arch/ppc/platforms/mvme5100_setup.c Mon Jul 22 19:54:53 2002 @@ -199,7 +199,7 @@ static void mvme5100_reset_board(void) { - __cli(); + local_irq_disable(); /* Set exception prefix high - to the firmware */ _nmask_and_or_msr(0, MSR_IP); @@ -223,7 +223,7 @@ static void mvme5100_halt(void) { - __cli(); + local_irq_disable(); while (1); } diff -rNu linux-bk/arch/ppc/platforms/pcore_setup.c linux/arch/ppc/platforms/pcore_setup.c --- linux-bk/arch/ppc/platforms/pcore_setup.c Mon Jul 22 19:22:23 2002 +++ linux/arch/ppc/platforms/pcore_setup.c Mon Jul 22 19:54:52 2002 @@ -138,7 +138,7 @@ static void pcore_restart(char *cmd) { - __cli(); + local_irq_disable(); /* Hard reset */ writeb(0x11, 0xfe000332); while(1); @@ -147,7 +147,7 @@ static void pcore_halt(void) { - __cli(); + local_irq_disable(); /* Turn off user LEDs */ writeb(0x00, 0xfe000300); while (1); diff -rNu linux-bk/arch/ppc/platforms/powerpmc250.c linux/arch/ppc/platforms/powerpmc250.c --- linux-bk/arch/ppc/platforms/powerpmc250.c Mon Jul 22 19:22:23 2002 +++ linux/arch/ppc/platforms/powerpmc250.c Mon Jul 22 19:54:52 2002 @@ -174,7 +174,7 @@ static void powerpmc250_restart(char *cmd) { - __cli(); + local_irq_disable(); /* Hard reset */ writeb(0x11, 0xfe000332); while(1); @@ -183,7 +183,7 @@ static void powerpmc250_halt(void) { - __cli(); + local_irq_disable(); while (1); } diff -rNu linux-bk/arch/ppc/platforms/pplus_setup.c linux/arch/ppc/platforms/pplus_setup.c --- linux-bk/arch/ppc/platforms/pplus_setup.c Mon Jul 22 19:22:27 2002 +++ linux/arch/ppc/platforms/pplus_setup.c Mon Jul 22 19:54:53 2002 @@ -155,7 +155,7 @@ { unsigned long i = 10000; - __cli(); + local_irq_disable(); /* set VIA IDE controller into native mode */ pplus_set_VIA_IDE_native(); @@ -176,7 +176,7 @@ pplus_halt(void) { unsigned long flags; - __cli(); + local_irq_disable(); /* set exception prefix high - to the prom */ save_flags( flags ); restore_flags( flags|MSR_IP ); diff -rNu linux-bk/arch/ppc/platforms/prep_setup.c linux/arch/ppc/platforms/prep_setup.c --- linux-bk/arch/ppc/platforms/prep_setup.c Mon Jul 22 19:22:27 2002 +++ linux/arch/ppc/platforms/prep_setup.c Mon Jul 22 19:54:53 2002 @@ -473,7 +473,7 @@ if (request_irq(0, prep_calibrate_decr_handler, 0, "timer", NULL) != 0) panic("Could not allocate timer IRQ!"); - __sti(); + local_irq_enable(); /* wait for calibrate */ while ( calibrate_steps ) ; @@ -565,7 +565,7 @@ { unsigned long i = 10000; - __cli(); + local_irq_disable(); /* set exception prefix high - to the prom */ _nmask_and_or_msr(0, MSR_IP); @@ -583,7 +583,7 @@ prep_halt(void) { unsigned long flags; - __cli(); + local_irq_disable(); /* set exception prefix high - to the prom */ save_flags( flags ); restore_flags( flags|MSR_IP ); @@ -650,7 +650,7 @@ { if ( _prep_type == _PREP_IBM) { unsigned long flags; - __cli(); + local_irq_disable(); /* set exception prefix high - to the prom */ save_flags( flags ); restore_flags( flags|MSR_IP ); diff -rNu linux-bk/arch/ppc/platforms/prpmc750_setup.c linux/arch/ppc/platforms/prpmc750_setup.c --- linux-bk/arch/ppc/platforms/prpmc750_setup.c Mon Jul 22 19:22:23 2002 +++ linux/arch/ppc/platforms/prpmc750_setup.c Mon Jul 22 19:54:53 2002 @@ -184,7 +184,7 @@ static void prpmc750_restart(char *cmd) { - __cli(); + local_irq_disable(); writeb(PRPMC750_MODRST_MASK, PRPMC750_MODRST_REG); while(1); } @@ -192,7 +192,7 @@ static void prpmc750_halt(void) { - __cli(); + local_irq_disable(); while (1); } diff -rNu linux-bk/arch/ppc/platforms/prpmc800_setup.c linux/arch/ppc/platforms/prpmc800_setup.c --- linux-bk/arch/ppc/platforms/prpmc800_setup.c Mon Jul 22 19:22:23 2002 +++ linux/arch/ppc/platforms/prpmc800_setup.c Mon Jul 22 19:54:53 2002 @@ -178,7 +178,7 @@ static void prpmc800_restart(char *cmd) { - __cli(); + local_irq_disable(); writeb(HARRIER_RSTOUT_MASK, HARRIER_MISC_CSR_REG); while(1); } @@ -186,7 +186,7 @@ static void prpmc800_halt(void) { - __cli(); + local_irq_disable(); while (1); } diff -rNu linux-bk/arch/ppc/platforms/sandpoint_setup.c linux/arch/ppc/platforms/sandpoint_setup.c --- linux-bk/arch/ppc/platforms/sandpoint_setup.c Mon Jul 22 19:22:27 2002 +++ linux/arch/ppc/platforms/sandpoint_setup.c Mon Jul 22 19:54:53 2002 @@ -390,7 +390,7 @@ static void sandpoint_restart(char *cmd) { - __cli(); + local_irq_disable(); /* Set exception prefix high - to the firmware */ _nmask_and_or_msr(0, MSR_IP); @@ -404,7 +404,7 @@ static void sandpoint_power_off(void) { - __cli(); + local_irq_disable(); for(;;); /* No way to shut power off with software */ /* NOTREACHED */ } diff -rNu linux-bk/arch/ppc/platforms/spruce_setup.c linux/arch/ppc/platforms/spruce_setup.c --- linux-bk/arch/ppc/platforms/spruce_setup.c Mon Jul 22 19:22:27 2002 +++ linux/arch/ppc/platforms/spruce_setup.c Mon Jul 22 19:54:52 2002 @@ -158,7 +158,7 @@ static void spruce_restart(char *cmd) { - __cli(); + local_irq_disable(); /* SRR0 has system reset vector, SRR1 has default MSR value */ /* rfi restores MSR from SRR1 and sets the PC to the SRR0 value */ diff -rNu linux-bk/arch/ppc/platforms/zx4500_setup.c linux/arch/ppc/platforms/zx4500_setup.c --- linux-bk/arch/ppc/platforms/zx4500_setup.c Mon Jul 22 19:22:23 2002 +++ linux/arch/ppc/platforms/zx4500_setup.c Mon Jul 22 19:54:52 2002 @@ -191,7 +191,7 @@ static void zx4500_restart(char *cmd) { - __cli(); + local_irq_disable(); out_8((volatile u_char *)ZX4500_CPLD_RESET, ZX4500_CPLD_RESET_XBUS); for (;;); @@ -203,7 +203,7 @@ static void zx4500_power_off(void) { - __cli(); + local_irq_disable(); for(;;); /* No way to shut power off with software */ /* NOTREACHED */ } diff -rNu linux-bk/arch/ppc/xmon/xmon.c linux/arch/ppc/xmon/xmon.c --- linux-bk/arch/ppc/xmon/xmon.c Sun Jun 9 07:26:28 2002 +++ linux/arch/ppc/xmon/xmon.c Mon Jul 22 19:54:54 2002 @@ -243,11 +243,11 @@ xmon_irq(int irq, void *d, struct pt_regs *regs) { unsigned long flags; - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); printf("Keyboard interrupt\n"); xmon(regs); - __restore_flags(flags); + local_irq_restore(flags); } int diff -rNu linux-bk/arch/ppc64/kernel/irq.c linux/arch/ppc64/kernel/irq.c --- linux-bk/arch/ppc64/kernel/irq.c Sun Jun 9 07:29:27 2002 +++ linux/arch/ppc64/kernel/irq.c Mon Jul 22 19:55:10 2002 @@ -382,7 +382,7 @@ int status = 0; if (!(action->flags & SA_INTERRUPT)) - __sti(); + local_irq_enable(); do { status |= action->flags; @@ -391,7 +391,7 @@ } while (action); if (status & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); - __cli(); + local_irq_disable(); } #ifdef CONFIG_SMP @@ -696,9 +696,9 @@ show("get_irqlock"); count = (~0 >> 1); } - __sti(); + local_irq_enable(); barrier(); - __cli(); + local_irq_disable(); } goto again; } @@ -722,10 +722,10 @@ { unsigned long flags; - __save_flags(flags); + local_save_flags(flags); if (flags & (1UL << 15)) { int cpu = smp_processor_id(); - __cli(); + local_irq_disable(); if (!local_irq_count(cpu)) get_irqlock(cpu); } @@ -737,7 +737,7 @@ if (!local_irq_count(cpu)) release_irqlock(cpu); - __sti(); + local_irq_enable(); } /* @@ -753,7 +753,7 @@ int local_enabled; unsigned long flags; - __save_flags(flags); + local_save_flags(flags); local_enabled = (flags >> 15) & 1; /* default to local */ retval = 2 + local_enabled; @@ -778,10 +778,10 @@ __global_sti(); break; case 2: - __cli(); + local_irq_disable(); break; case 3: - __sti(); + local_irq_enable(); break; default: printk("global_restore_flags: %016lx caller %p\n", diff -rNu linux-bk/arch/ppc64/kernel/open_pic.c linux/arch/ppc64/kernel/open_pic.c --- linux-bk/arch/ppc64/kernel/open_pic.c Sun Jun 9 07:30:32 2002 +++ linux/arch/ppc64/kernel/open_pic.c Mon Jul 22 19:55:10 2002 @@ -775,7 +775,7 @@ * SA_INTERRUPT flag and let them execute with all interrupts OFF. * This would have the side effect of either running cross-CPU * functions with interrupts off, or we can re-enable them explicitely - * with a __sti() in smp_call_function_interrupt(), since + * with a local_irq_enable() in smp_call_function_interrupt(), since * smp_call_function() is protected by a spinlock. * Or maybe we shouldn't set the IRQ_PER_CPU flag on cross-CPU * function calls IPI at all but that would make a special case. diff -rNu linux-bk/arch/ppc64/kernel/process.c linux/arch/ppc64/kernel/process.c --- linux-bk/arch/ppc64/kernel/process.c Sun Jun 9 07:26:53 2002 +++ linux/arch/ppc64/kernel/process.c Mon Jul 22 19:55:10 2002 @@ -99,9 +99,9 @@ new_thread = &new->thread; old_thread = ¤t->thread; - __save_and_cli(flags); + local_irq_save(flags); _switch(old_thread, new_thread); - __restore_flags(flags); + local_irq_restore(flags); } void show_regs(struct pt_regs * regs) diff -rNu linux-bk/arch/ppc64/kernel/smp.c linux/arch/ppc64/kernel/smp.c --- linux-bk/arch/ppc64/kernel/smp.c Sun Jun 9 07:31:12 2002 +++ linux/arch/ppc64/kernel/smp.c Mon Jul 22 19:55:10 2002 @@ -427,7 +427,7 @@ static void stop_this_cpu(void *dummy) { - __cli(); + local_irq_disable(); while (1) ; } @@ -707,7 +707,7 @@ while(!smp_commenced) { barrier(); } - __sti(); + local_irq_enable(); } /* intel needs this */ diff -rNu linux-bk/arch/ppc64/kernel/stab.c linux/arch/ppc64/kernel/stab.c --- linux-bk/arch/ppc64/kernel/stab.c Sun Jun 9 07:31:15 2002 +++ linux/arch/ppc64/kernel/stab.c Mon Jul 22 19:55:10 2002 @@ -371,7 +371,7 @@ /* Force previous translations to complete. DRENG */ asm volatile("isync" : : : "memory"); - __save_and_cli(flags); + local_irq_save(flags); if (get_paca()->stab_cache_pointer != 0xff && !STAB_PRESSURE) { int i; unsigned char *segments = get_paca()->xSegments; @@ -417,7 +417,7 @@ } get_paca()->stab_cache_pointer = 0; - __restore_flags(flags); + local_irq_restore(flags); } if (ppc64_stab_preload) diff -rNu linux-bk/arch/ppc64/xmon/xmon.c linux/arch/ppc64/xmon/xmon.c --- linux-bk/arch/ppc64/xmon/xmon.c Sun Jun 9 07:28:44 2002 +++ linux/arch/ppc64/xmon/xmon.c Mon Jul 22 19:55:10 2002 @@ -440,11 +440,11 @@ xmon_irq(int irq, void *d, struct pt_regs *regs) { unsigned long flags; - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); printf("Keyboard interrupt\n"); xmon(regs); - __restore_flags(flags); + local_irq_restore(flags); } int diff -rNu linux-bk/arch/s390/kernel/irq.c linux/arch/s390/kernel/irq.c --- linux-bk/arch/s390/kernel/irq.c Sun Jun 9 07:30:02 2002 +++ linux/arch/s390/kernel/irq.c Mon Jul 22 19:55:19 2002 @@ -161,9 +161,9 @@ show("wait_on_irq"); count = ~0; } - __sti(); + local_irq_enable(); SYNC_OTHER_CORES(cpu); - __cli(); + local_irq_disable(); check_smp_invalidate(cpu); if (atomic_read(&global_irq_count)) continue; @@ -249,10 +249,10 @@ { unsigned long flags; - __save_flags(flags); + local_save_flags(flags); if (flags & (1 << EFLAGS_I_SHIFT)) { int cpu = smp_processor_id(); - __cli(); + local_irq_disable(); if (!in_irq()) get_irqlock(cpu); } @@ -263,7 +263,7 @@ if (!in_irq()) release_irqlock(smp_processor_id()); - __sti(); + local_irq_enable(); } /* @@ -279,7 +279,7 @@ int local_enabled; unsigned long flags; - __save_flags(flags); + local_save_flags(flags); local_enabled = (flags >> EFLAGS_I_SHIFT) & 1; /* default to local */ retval = 2 + local_enabled; @@ -305,10 +305,10 @@ __global_sti(); break; case 2: - __cli(); + local_irq_disable(); break; case 3: - __sti(); + local_irq_enable(); break; default: printk("global_restore_flags: %08lx (%08lx)\n", diff -rNu linux-bk/arch/s390/kernel/setup.c linux/arch/s390/kernel/setup.c --- linux-bk/arch/s390/kernel/setup.c Mon Jul 22 19:22:23 2002 +++ linux/arch/s390/kernel/setup.c Mon Jul 22 19:55:19 2002 @@ -86,7 +86,7 @@ if (test_and_set_bit(nr,&cpu_initialized)) { printk("CPU#%d ALREADY INITIALIZED!!!!!!!!!\n", nr); - for (;;) __sti(); + for (;;) local_irq_enable(); } cpus_initialized++; diff -rNu linux-bk/arch/s390/kernel/traps.c linux/arch/s390/kernel/traps.c --- linux-bk/arch/s390/kernel/traps.c Mon Jul 22 19:22:25 2002 +++ linux/arch/s390/kernel/traps.c Mon Jul 22 19:55:19 2002 @@ -280,7 +280,7 @@ * now safely switch on interrupts. */ if (regs->psw.mask & PSW_PROBLEM_STATE) - __sti(); + local_irq_enable(); if (regs->psw.mask & PSW_PROBLEM_STATE) { struct task_struct *tsk = current; @@ -416,7 +416,7 @@ * now safely switch on interrupts. */ if (regs->psw.mask & PSW_PROBLEM_STATE) - __sti(); + local_irq_enable(); if (regs->psw.mask & PSW_PROBLEM_STATE) get_user(*((__u16 *) opcode), location); @@ -477,7 +477,7 @@ * now safely switch on interrupts. */ if (regs->psw.mask & PSW_PROBLEM_STATE) - __sti(); + local_irq_enable(); if (regs->psw.mask & PSW_PROBLEM_STATE) { get_user(*((__u16 *) opcode), location); @@ -540,7 +540,7 @@ * now safely switch on interrupts. */ if (regs->psw.mask & PSW_PROBLEM_STATE) - __sti(); + local_irq_enable(); if (MACHINE_HAS_IEEE) __asm__ volatile ("stfpc %0\n\t" diff -rNu linux-bk/arch/s390/mm/fault.c linux/arch/s390/mm/fault.c --- linux-bk/arch/s390/mm/fault.c Sun Jun 9 07:31:17 2002 +++ linux/arch/s390/mm/fault.c Mon Jul 22 19:55:19 2002 @@ -199,7 +199,7 @@ * task's user address space, so we can switch on the * interrupts again and then search the VMAs */ - __sti(); + local_irq_enable(); down_read(&mm->mmap_sem); @@ -528,7 +528,7 @@ * now safely switch on interrupts. */ if (regs->psw.mask & PSW_PROBLEM_STATE) - __sti(); + local_irq_enable(); if (subcode & 0x0080) { /* signal bit is set -> a page has been swapped in by VM */ diff -rNu linux-bk/arch/s390x/kernel/irq.c linux/arch/s390x/kernel/irq.c --- linux-bk/arch/s390x/kernel/irq.c Sun Jun 9 07:31:31 2002 +++ linux/arch/s390x/kernel/irq.c Mon Jul 22 19:55:18 2002 @@ -162,9 +162,9 @@ show("wait_on_irq"); count = ~0; } - __sti(); + local_irq_enable(); SYNC_OTHER_CORES(cpu); - __cli(); + local_irq_disable(); check_smp_invalidate(cpu); if (atomic_read(&global_irq_count)) continue; @@ -250,10 +250,10 @@ { unsigned long flags; - __save_flags(flags); + local_save_flags(flags); if (flags & (1UL << EFLAGS_I_SHIFT)) { int cpu = smp_processor_id(); - __cli(); + local_irq_disable(); if (!in_irq()) get_irqlock(cpu); } @@ -264,7 +264,7 @@ if (!in_irq()) release_irqlock(smp_processor_id()); - __sti(); + local_irq_enable(); } /* @@ -280,7 +280,7 @@ int local_enabled; unsigned long flags; - __save_flags(flags); + local_save_flags(flags); local_enabled = (flags >> EFLAGS_I_SHIFT) & 1; /* default to local */ retval = 2 + local_enabled; @@ -306,10 +306,10 @@ __global_sti(); break; case 2: - __cli(); + local_irq_disable(); break; case 3: - __sti(); + local_irq_enable(); break; default: printk("global_restore_flags: %08lx (%08lx)\n", diff -rNu linux-bk/arch/s390x/kernel/setup.c linux/arch/s390x/kernel/setup.c --- linux-bk/arch/s390x/kernel/setup.c Mon Jul 22 19:22:23 2002 +++ linux/arch/s390x/kernel/setup.c Mon Jul 22 19:55:18 2002 @@ -86,7 +86,7 @@ if (test_and_set_bit(nr,&cpu_initialized)) { printk("CPU#%d ALREADY INITIALIZED!!!!!!!!!\n", nr); - for (;;) __sti(); + for (;;) local_irq_enable(); } cpus_initialized++; diff -rNu linux-bk/arch/s390x/kernel/traps.c linux/arch/s390x/kernel/traps.c --- linux-bk/arch/s390x/kernel/traps.c Mon Jul 22 19:22:25 2002 +++ linux/arch/s390x/kernel/traps.c Mon Jul 22 19:55:18 2002 @@ -282,7 +282,7 @@ * now safely switch on interrupts. */ if (regs->psw.mask & PSW_PROBLEM_STATE) - __sti(); + local_irq_enable(); if (regs->psw.mask & PSW_PROBLEM_STATE) { struct task_struct *tsk = current; @@ -419,7 +419,7 @@ * now safely switch on interrupts. */ if (regs->psw.mask & PSW_PROBLEM_STATE) - __sti(); + local_irq_enable(); /* WARNING don't change this check back to */ /* int problem_state=(regs->psw.mask & PSW_PROBLEM_STATE); */ @@ -452,7 +452,7 @@ * now safely switch on interrupts. */ if (regs->psw.mask & PSW_PROBLEM_STATE) - __sti(); + local_irq_enable(); __asm__ volatile ("stfpc %0\n\t" : "=m" (current->thread.fp_regs.fpc)); diff -rNu linux-bk/arch/s390x/mm/fault.c linux/arch/s390x/mm/fault.c --- linux-bk/arch/s390x/mm/fault.c Sun Jun 9 07:28:50 2002 +++ linux/arch/s390x/mm/fault.c Mon Jul 22 19:55:18 2002 @@ -199,7 +199,7 @@ * task's user address space, so we can switch on the * interrupts again and then search the VMAs */ - __sti(); + local_irq_enable(); down_read(&mm->mmap_sem); @@ -440,7 +440,7 @@ * now safely switch on interrupts. */ if (regs->psw.mask & PSW_PROBLEM_STATE) - __sti(); + local_irq_enable(); if (subcode & 0x0080) { /* signal bit is set -> a page has been swapped in by VM */ diff -rNu linux-bk/arch/sh/kernel/irq.c linux/arch/sh/kernel/irq.c --- linux-bk/arch/sh/kernel/irq.c Sun Jun 9 07:28:54 2002 +++ linux/arch/sh/kernel/irq.c Mon Jul 22 19:55:17 2002 @@ -130,7 +130,7 @@ status = 1; /* Force the "do bottom halves" bit */ if (!(action->flags & SA_INTERRUPT)) - __sti(); + local_irq_enable(); do { status |= action->flags; @@ -139,7 +139,7 @@ } while (action); if (status & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); - __cli(); + local_irq_disable(); irq_exit(cpu, irq); diff -rNu linux-bk/arch/sh/kernel/process.c linux/arch/sh/kernel/process.c --- linux-bk/arch/sh/kernel/process.c Sun Jun 9 07:30:57 2002 +++ linux/arch/sh/kernel/process.c Mon Jul 22 19:55:17 2002 @@ -46,13 +46,13 @@ if (need_resched()) break; } else { - __cli(); + local_irq_disable(); while (!need_resched()) { - __sti(); + local_irq_enable(); asm volatile("sleep" : : : "memory"); - __cli(); + local_irq_disable(); } - __sti(); + local_irq_enable(); } schedule(); check_pgt_cache(); diff -rNu linux-bk/arch/sparc/kernel/irq.c linux/arch/sparc/kernel/irq.c --- linux-bk/arch/sparc/kernel/irq.c Sun Jun 9 07:26:53 2002 +++ linux/arch/sparc/kernel/irq.c Mon Jul 22 19:55:06 2002 @@ -231,7 +231,7 @@ /* - * We have to allow irqs to arrive between __sti and __cli + * We have to allow irqs to arrive between local_irq_enable and local_irq_disable */ #define SYNC_OTHER_CORES(x) barrier() @@ -276,9 +276,9 @@ show("get_irqlock"); count = (~0 >> 1); } - __sti(); + local_irq_enable(); SYNC_OTHER_CORES(cpu); - __cli(); + local_irq_disable(); } goto again; } @@ -302,11 +302,11 @@ { unsigned long flags; - __save_flags(flags); + local_save_flags(flags); if ((flags & PSR_PIL) != PSR_PIL) { int cpu = smp_processor_id(); - __cli(); + local_irq_disable(); if (!local_irq_count(cpu)) get_irqlock(cpu); } @@ -318,7 +318,7 @@ if (!local_irq_count(cpu)) release_irqlock(cpu); - __sti(); + local_irq_enable(); } /* @@ -333,7 +333,7 @@ unsigned long flags, retval; unsigned long local_enabled = 0; - __save_flags(flags); + local_save_flags(flags); if ((flags & PSR_PIL) != PSR_PIL) local_enabled = 1; @@ -361,10 +361,10 @@ __global_sti(); break; case 2: - __cli(); + local_irq_disable(); break; case 3: - __sti(); + local_irq_enable(); break; default: { diff -rNu linux-bk/arch/sparc/kernel/pcic.c linux/arch/sparc/kernel/pcic.c --- linux-bk/arch/sparc/kernel/pcic.c Sun Jun 9 07:26:28 2002 +++ linux/arch/sparc/kernel/pcic.c Mon Jul 22 19:55:06 2002 @@ -780,7 +780,7 @@ prom_printf("time_init: unable to attach IRQ%d\n", timer_irq); prom_halt(); } - __sti(); + local_irq_enable(); } static __inline__ unsigned long do_gettimeoffset(void) diff -rNu linux-bk/arch/sparc/kernel/smp.c linux/arch/sparc/kernel/smp.c --- linux-bk/arch/sparc/kernel/smp.c Sun Jun 9 07:28:28 2002 +++ linux/arch/sparc/kernel/smp.c Mon Jul 22 19:55:06 2002 @@ -253,7 +253,7 @@ /* Stopping processors. */ void smp_stop_cpu_irq(void) { - __sti(); + local_irq_enable(); while(1) barrier(); } diff -rNu linux-bk/arch/sparc/kernel/sun4d_irq.c linux/arch/sparc/kernel/sun4d_irq.c --- linux-bk/arch/sparc/kernel/sun4d_irq.c Sun Jun 9 07:26:23 2002 +++ linux/arch/sparc/kernel/sun4d_irq.c Mon Jul 22 19:55:06 2002 @@ -488,14 +488,14 @@ * has copied the firmwares level 14 vector into boot cpu's * trap table, we must fix this now or we get squashed. */ - __save_and_cli(flags); + local_irq_save(flags); patchme_maybe_smp_msg[0] = 0x01000000; /* NOP out the branch */ trap_table->inst_one = lvl14_save[0]; trap_table->inst_two = lvl14_save[1]; trap_table->inst_three = lvl14_save[2]; trap_table->inst_four = lvl14_save[3]; local_flush_cache_all(); - __restore_flags(flags); + local_irq_restore(flags); } #endif } @@ -539,7 +539,7 @@ void __init sun4d_init_IRQ(void) { - __cli(); + local_irq_disable(); BTFIXUPSET_CALL(enable_irq, sun4d_enable_irq, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(disable_irq, sun4d_disable_irq, BTFIXUPCALL_NORM); diff -rNu linux-bk/arch/sparc/kernel/sun4d_smp.c linux/arch/sparc/kernel/sun4d_smp.c --- linux-bk/arch/sparc/kernel/sun4d_smp.c Sun Jun 9 07:27:23 2002 +++ linux/arch/sparc/kernel/sun4d_smp.c Mon Jul 22 19:55:06 2002 @@ -144,7 +144,7 @@ local_flush_cache_all(); local_flush_tlb_all(); - __sti(); /* We don't allow PIL 14 yet */ + local_irq_enable(); /* We don't allow PIL 14 yet */ while(!smp_commenced) barrier(); @@ -182,7 +182,7 @@ if (boot_cpu_id) current_set[0] = NULL; - __sti(); + local_irq_enable(); cpu_present_map = 0; for(i=0; i < linux_num_cpus; i++) cpu_present_map |= (1<inst_one = lvl14_save[0]; trap_table->inst_two = lvl14_save[1]; trap_table->inst_three = lvl14_save[2]; trap_table->inst_four = lvl14_save[3]; local_flush_cache_all(); - __restore_flags(flags); + local_irq_restore(flags); } #endif } @@ -315,7 +315,7 @@ int num_regs; struct resource r; - __cli(); + local_irq_disable(); if((ie_node = prom_searchsiblings(prom_getchild(prom_root_node), "obio")) == 0 || (ie_node = prom_getchild (ie_node)) == 0 || (ie_node = prom_searchsiblings (ie_node, "interrupt")) == 0) { diff -rNu linux-bk/arch/sparc/kernel/sun4m_smp.c linux/arch/sparc/kernel/sun4m_smp.c --- linux-bk/arch/sparc/kernel/sun4m_smp.c Sun Jun 9 07:28:44 2002 +++ linux/arch/sparc/kernel/sun4m_smp.c Mon Jul 22 19:55:06 2002 @@ -127,7 +127,7 @@ local_flush_cache_all(); local_flush_tlb_all(); - __sti(); + local_irq_enable(); } extern int cpu_idle(void *unused); @@ -153,7 +153,7 @@ printk("Entering SMP Mode...\n"); - __sti(); + local_irq_enable(); cpu_present_map = 0; for(i=0; i < linux_num_cpus; i++) diff -rNu linux-bk/arch/sparc/kernel/time.c linux/arch/sparc/kernel/time.c --- linux-bk/arch/sparc/kernel/time.c Mon Jul 22 19:22:24 2002 +++ linux/arch/sparc/kernel/time.c Mon Jul 22 19:55:06 2002 @@ -437,7 +437,7 @@ #endif /* Now that OBP ticker has been silenced, it is safe to enable IRQ. */ - __sti(); + local_irq_enable(); } void __init time_init(void) diff -rNu linux-bk/arch/sparc/mm/srmmu.c linux/arch/sparc/mm/srmmu.c --- linux-bk/arch/sparc/mm/srmmu.c Sun Jun 9 07:26:36 2002 +++ linux/arch/sparc/mm/srmmu.c Mon Jul 22 19:55:07 2002 @@ -657,7 +657,7 @@ FLUSH_BEGIN(mm) flush_user_windows(); - __save_and_cli(flags); + local_irq_save(flags); octx = srmmu_get_context(); srmmu_set_context(mm->context); a = 0x20; b = 0x40; c = 0x60; @@ -681,7 +681,7 @@ "r" (e), "r" (f), "r" (g)); } while(faddr); srmmu_set_context(octx); - __restore_flags(flags); + local_irq_restore(flags); FLUSH_END } @@ -694,7 +694,7 @@ FLUSH_BEGIN(mm) flush_user_windows(); - __save_and_cli(flags); + local_irq_save(flags); octx = srmmu_get_context(); srmmu_set_context(mm->context); a = 0x20; b = 0x40; c = 0x60; @@ -723,7 +723,7 @@ start += SRMMU_PMD_SIZE; } srmmu_set_context(octx); - __restore_flags(flags); + local_irq_restore(flags); FLUSH_END } @@ -736,7 +736,7 @@ FLUSH_BEGIN(mm) flush_user_windows(); - __save_and_cli(flags); + local_irq_save(flags); octx = srmmu_get_context(); srmmu_set_context(mm->context); a = 0x20; b = 0x40; c = 0x60; @@ -762,7 +762,7 @@ "r" (e), "r" (f), "r" (g)); } while(line != page); srmmu_set_context(octx); - __restore_flags(flags); + local_irq_restore(flags); FLUSH_END } diff -rNu linux-bk/arch/sparc64/kernel/irq.c linux/arch/sparc64/kernel/irq.c --- linux-bk/arch/sparc64/kernel/irq.c Mon Jul 22 19:22:25 2002 +++ linux/arch/sparc64/kernel/irq.c Mon Jul 22 19:54:56 2002 @@ -634,9 +634,9 @@ show("get_irqlock"); count = (~0 >> 1); } - __sti(); + local_irq_enable(); SYNC_OTHER_ULTRAS(cpu); - __cli(); + local_irq_disable(); } goto again; } @@ -648,10 +648,10 @@ { unsigned long flags; - __save_flags(flags); + local_save_flags(flags); if(flags == 0) { int cpu = smp_processor_id(); - __cli(); + local_irq_disable(); if (! local_irq_count(cpu)) get_irqlock(cpu); } @@ -663,14 +663,14 @@ if (! local_irq_count(cpu)) release_irqlock(cpu); - __sti(); + local_irq_enable(); } unsigned long __global_save_flags(void) { unsigned long flags, local_enabled, retval; - __save_flags(flags); + local_save_flags(flags); local_enabled = ((flags == 0) ? 1 : 0); retval = 2 + local_enabled; if (! local_irq_count(smp_processor_id())) { @@ -692,10 +692,10 @@ __global_sti(); break; case 2: - __cli(); + local_irq_disable(); break; case 3: - __sti(); + local_irq_enable(); break; default: { diff -rNu linux-bk/arch/sparc64/kernel/smp.c linux/arch/sparc64/kernel/smp.c --- linux-bk/arch/sparc64/kernel/smp.c Mon Jul 22 19:22:25 2002 +++ linux/arch/sparc64/kernel/smp.c Mon Jul 22 19:54:55 2002 @@ -199,7 +199,7 @@ smp_setup_percpu_timer(); - __sti(); + local_irq_enable(); calibrate_delay(); smp_store_cpu_info(cpuid); @@ -243,7 +243,7 @@ int cpucount = 0, i; printk("Entering UltraSMPenguin Mode...\n"); - __sti(); + local_irq_enable(); smp_store_cpu_info(boot_cpu_id); if (linux_num_cpus == 1) { @@ -1222,7 +1222,7 @@ __get_free_pages(GFP_KERNEL, order = get_order(ecache_size)); if (flush_base != 0UL) { - __save_and_cli(flags); + local_irq_save(flags); /* Scan twice the size once just to get the TLB entries * loaded and make sure the second scan measures pure misses. @@ -1271,7 +1271,7 @@ : "g1", "g2", "g3", "g5"); } - __restore_flags(flags); + local_irq_restore(flags); raw = (tick2 - tick1); diff -rNu linux-bk/arch/sparc64/kernel/time.c linux/arch/sparc64/kernel/time.c --- linux-bk/arch/sparc64/kernel/time.c Mon Jul 22 19:22:27 2002 +++ linux/arch/sparc64/kernel/time.c Mon Jul 22 19:54:56 2002 @@ -432,7 +432,7 @@ return; } - __save_and_cli(flags); + local_irq_save(flags); cbus = central_bus; if (cbus != NULL) @@ -610,7 +610,7 @@ set_system_time(); - __restore_flags(flags); + local_irq_restore(flags); } extern void init_timers(void (*func)(int, void *, struct pt_regs *), diff -rNu linux-bk/arch/sparc64/mm/init.c linux/arch/sparc64/mm/init.c --- linux-bk/arch/sparc64/mm/init.c Mon Jul 22 19:22:23 2002 +++ linux/arch/sparc64/mm/init.c Mon Jul 22 19:54:56 2002 @@ -1411,7 +1411,7 @@ */ pt = phys_base | _PAGE_VALID | _PAGE_SZ4MB; pt |= _PAGE_CP | _PAGE_CV | _PAGE_P | _PAGE_L | _PAGE_W; - __save_and_cli(flags); + local_irq_save(flags); if (tlb_type == spitfire) { __asm__ __volatile__( " stxa %1, [%0] %3\n" @@ -1469,7 +1469,7 @@ : "memory"); } } - __restore_flags(flags); + local_irq_restore(flags); /* Now set kernel pgd to upper alias so physical page computations * work. diff -rNu linux-bk/arch/sparc64/prom/misc.c linux/arch/sparc64/prom/misc.c --- linux-bk/arch/sparc64/prom/misc.c Mon Jul 22 19:22:24 2002 +++ linux/arch/sparc64/prom/misc.c Mon Jul 22 19:54:56 2002 @@ -52,7 +52,7 @@ { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); #ifdef CONFIG_SUN_CONSOLE if(!serial_console && prom_palette) @@ -75,7 +75,7 @@ prom_palette (0); #endif - __restore_flags(flags); + local_irq_restore(flags); } #ifdef CONFIG_SMP diff -rNu linux-bk/arch/x86_64/kernel/apic.c linux/arch/x86_64/kernel/apic.c --- linux-bk/arch/x86_64/kernel/apic.c Sun Jun 9 07:27:33 2002 +++ linux/arch/x86_64/kernel/apic.c Mon Jul 22 19:55:15 2002 @@ -474,13 +474,13 @@ apic_pm_state.apic_tmict = apic_read(APIC_TMICT); apic_pm_state.apic_tdcr = apic_read(APIC_TDCR); apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR); - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); disable_local_APIC(); rdmsr(MSR_IA32_APICBASE, l, h); l &= ~MSR_IA32_APICBASE_ENABLE; wrmsr(MSR_IA32_APICBASE, l, h); - __restore_flags(flags); + local_irq_restore(flags); } static void apic_pm_resume(void *data) @@ -488,8 +488,8 @@ unsigned int l, h; unsigned long flags; - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); rdmsr(MSR_IA32_APICBASE, l, h); l &= ~MSR_IA32_APICBASE_BASE; l |= MSR_IA32_APICBASE_ENABLE | APIC_DEFAULT_PHYS_BASE; @@ -512,7 +512,7 @@ apic_write(APIC_LVTERR, apic_pm_state.apic_lvterr); apic_write(APIC_ESR, 0); apic_read(APIC_ESR); - __restore_flags(flags); + local_irq_restore(flags); if (apic_pm_state.perfctr_pmdev) pm_send(apic_pm_state.perfctr_pmdev, PM_RESUME, data); } @@ -785,8 +785,8 @@ unsigned long flags; int delta; - __save_flags(flags); - __sti(); + local_save_flags(flags); + local_irq_enable(); /* * ok, Intel has some smart code in their APIC that knows * if a CPU was in 'hlt' lowpower mode, and this increases @@ -825,7 +825,7 @@ printk("CPU%d\n", smp_processor_id(), t0, t1, delta, slice, clocks); - __restore_flags(flags); + local_irq_restore(flags); } /* @@ -916,7 +916,7 @@ printk("Using local APIC timer interrupts.\n"); using_apic_timer = 1; - __cli(); + local_irq_disable(); calibration_result = calibrate_APIC_clock(); /* @@ -924,7 +924,7 @@ */ setup_APIC_timer((void *)(u64)calibration_result); - __sti(); + local_irq_enable(); /* and update all other cpus */ smp_call_function(setup_APIC_timer, (void *)(u64)calibration_result, 1, 1); diff -rNu linux-bk/arch/x86_64/kernel/irq.c linux/arch/x86_64/kernel/irq.c --- linux-bk/arch/x86_64/kernel/irq.c Mon Jul 22 19:22:23 2002 +++ linux/arch/x86_64/kernel/irq.c Mon Jul 22 19:55:15 2002 @@ -254,7 +254,7 @@ # define SYNC_OTHER_CORES(x) udelay(x+1) #else /* - * We have to allow irqs to arrive between __sti and __cli + * We have to allow irqs to arrive between local_irq_enable and local_irq_disable */ # define SYNC_OTHER_CORES(x) __asm__ __volatile__ ("nop") #endif @@ -282,9 +282,9 @@ show("wait_on_irq"); count = ~0; } - __sti(); + local_irq_enable(); SYNC_OTHER_CORES(cpu); - __cli(); + local_irq_disable(); if (irqs_running()) continue; if (global_irq_lock) @@ -356,10 +356,10 @@ { unsigned long flags; - __save_flags(flags); + local_save_flags(flags); if (flags & (1 << EFLAGS_IF_SHIFT)) { int cpu = smp_processor_id(); - __cli(); + local_irq_disable(); if (!local_irq_count(cpu)) get_irqlock(cpu); } @@ -371,7 +371,7 @@ if (!local_irq_count(cpu)) release_irqlock(cpu); - __sti(); + local_irq_enable(); } /* @@ -388,7 +388,7 @@ unsigned long flags; int cpu = smp_processor_id(); - __save_flags(flags); + local_save_flags(flags); local_enabled = (flags >> EFLAGS_IF_SHIFT) & 1; /* default to local */ retval = 2 + local_enabled; @@ -413,10 +413,10 @@ __global_sti(); break; case 2: - __cli(); + local_irq_disable(); break; case 3: - __sti(); + local_irq_enable(); break; default: printk("global_restore_flags: %08lx (%08lx)\n", @@ -442,7 +442,7 @@ status = 1; /* Force the "do bottom halves" bit */ if (!(action->flags & SA_INTERRUPT)) - __sti(); + local_irq_enable(); do { status |= action->flags; @@ -451,7 +451,7 @@ } while (action); if (status & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); - __cli(); + local_irq_disable(); irq_exit(0, irq); diff -rNu linux-bk/arch/x86_64/kernel/mtrr.c linux/arch/x86_64/kernel/mtrr.c --- linux-bk/arch/x86_64/kernel/mtrr.c Mon Jul 22 19:22:25 2002 +++ linux/arch/x86_64/kernel/mtrr.c Mon Jul 22 19:55:15 2002 @@ -117,8 +117,8 @@ u64 cr0; /* Disable interrupts locally */ - __save_flags(ctxt->flags); - __cli(); + local_save_flags(ctxt->flags); + local_irq_disable(); /* Save value of CR4 and clear Page Global Enable (bit 7) */ if (cpu_has_pge) { @@ -156,7 +156,7 @@ write_cr4 (ctxt->cr4val); /* Re-enable interrupts locally (if enabled previously) */ - __restore_flags(ctxt->flags); + local_irq_restore(ctxt->flags); } diff -rNu linux-bk/arch/x86_64/kernel/process.c linux/arch/x86_64/kernel/process.c --- linux-bk/arch/x86_64/kernel/process.c Mon Jul 22 19:22:25 2002 +++ linux/arch/x86_64/kernel/process.c Mon Jul 22 19:55:15 2002 @@ -89,11 +89,11 @@ void default_idle(void) { if (!hlt_counter) { - __cli(); + local_irq_disable(); if (!need_resched()) safe_halt(); else - __sti(); + local_irq_enable(); } } @@ -106,7 +106,7 @@ { int oldval; - __sti(); + local_irq_enable(); /* * Deal with another CPU just having chosen a thread to diff -rNu linux-bk/arch/x86_64/kernel/smp.c linux/arch/x86_64/kernel/smp.c --- linux-bk/arch/x86_64/kernel/smp.c Mon Jul 22 19:22:25 2002 +++ linux/arch/x86_64/kernel/smp.c Mon Jul 22 19:55:15 2002 @@ -97,8 +97,8 @@ unsigned long cfg; unsigned long flags; - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); /* * Wait for idle. @@ -120,7 +120,7 @@ * Send the IPI. The write to APIC_ICR fires this off. */ apic_write_around(APIC_ICR, cfg); - __restore_flags(flags); + local_irq_restore(flags); } /* @@ -438,7 +438,7 @@ * Remove this CPU: */ clear_bit(smp_processor_id(), &cpu_online_map); - __cli(); + local_irq_disable(); disable_local_APIC(); for(;;) __asm__("hlt"); for (;;); @@ -453,9 +453,9 @@ smp_call_function(stop_this_cpu, NULL, 1, 0); smp_num_cpus = 1; - __cli(); + local_irq_disable(); disable_local_APIC(); - __sti(); + local_irq_enable(); } /* diff -rNu linux-bk/arch/x86_64/kernel/traps.c linux/arch/x86_64/kernel/traps.c --- linux-bk/arch/x86_64/kernel/traps.c Mon Jul 22 19:22:25 2002 +++ linux/arch/x86_64/kernel/traps.c Mon Jul 22 19:55:14 2002 @@ -344,7 +344,7 @@ printk("%s: %04lx\n", str, err & 0xffff); cpu = smp_processor_id(); /* racy, but better than risking deadlock. */ - __cli(); + local_irq_disable(); if (!spin_trylock(&die_lock)) { if (cpu == die_owner) /* nested oops. should stop eventually */; diff -rNu linux-bk/arch/x86_64/pci/direct.c linux/arch/x86_64/pci/direct.c --- linux-bk/arch/x86_64/pci/direct.c Mon Jul 22 19:22:23 2002 +++ linux/arch/x86_64/pci/direct.c Mon Jul 22 19:55:15 2002 @@ -306,7 +306,7 @@ unsigned int tmp; unsigned long flags; - __save_flags(flags); __cli(); + local_save_flags(flags); local_irq_disable(); /* * Check if configuration type 1 works. @@ -318,7 +318,7 @@ if (inl (0xCF8) == 0x80000000 && pci_sanity_check(&pci_direct_conf1)) { outl (tmp, 0xCF8); - __restore_flags(flags); + local_irq_restore(flags); printk(KERN_INFO "PCI: Using configuration type 1\n"); if (!request_region(0xCF8, 8, "PCI conf1")) return NULL; @@ -336,7 +336,7 @@ outb (0x00, 0xCFA); if (inb (0xCF8) == 0x00 && inb (0xCFA) == 0x00 && pci_sanity_check(&pci_direct_conf2)) { - __restore_flags(flags); + local_irq_restore(flags); printk(KERN_INFO "PCI: Using configuration type 2\n"); if (!request_region(0xCF8, 4, "PCI conf2")) return NULL; @@ -344,7 +344,7 @@ } } - __restore_flags(flags); + local_irq_restore(flags); return NULL; } diff -rNu linux-bk/drivers/acpi/processor.c linux/drivers/acpi/processor.c --- linux-bk/drivers/acpi/processor.c Mon Jul 22 19:22:27 2002 +++ linux/drivers/acpi/processor.c Mon Jul 22 19:54:13 2002 @@ -416,7 +416,7 @@ * Interrupts must be disabled during bus mastering calculations and * for C2/C3 transitions. */ - __cli(); + local_irq_disable(); cx = &(pr->power.states[pr->power.state]); @@ -461,7 +461,7 @@ * issues (e.g. floppy DMA transfer overrun/underrun). */ if (pr->power.bm_activity & cx->demotion.threshold.bm) { - __sti(); + local_irq_enable(); next_state = cx->demotion.state; goto end; } @@ -497,7 +497,7 @@ /* Get end time (ticks) */ t2 = inl(acpi_fadt.Xpm_tmr_blk.address); /* Re-enable interrupts */ - __sti(); + local_irq_enable(); /* Compute time (ticks) that we were actually asleep */ sleep_ticks = ticks_elapsed(t1, t2) - cx->latency_ticks - C2_OVERHEAD; break; @@ -516,13 +516,13 @@ /* Enable bus master arbitration */ acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0, ACPI_MTX_DO_NOT_LOCK); /* Re-enable interrupts */ - __sti(); + local_irq_enable(); /* Compute time (ticks) that we were actually asleep */ sleep_ticks = ticks_elapsed(t1, t2) - cx->latency_ticks - C3_OVERHEAD; break; default: - __sti(); + local_irq_enable(); return; } @@ -1170,7 +1170,7 @@ pr->throttling.state = 0; - __cli(); + local_irq_disable(); duty_mask = pr->throttling.state_count - 1; @@ -1192,7 +1192,7 @@ pr->throttling.state = state; - __sti(); + local_irq_enable(); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Throttling state is T%d (%d%% throttling applied)\n", @@ -1225,7 +1225,7 @@ if (state == pr->throttling.state) return_VALUE(0); - __cli(); + local_irq_disable(); /* * Calculate the duty_value and duty_mask. @@ -1267,7 +1267,7 @@ pr->throttling.state = state; - __sti(); + local_irq_enable(); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Throttling state set to T%d (%d%%)\n", state, diff -rNu linux-bk/drivers/char/n_tty.c linux/drivers/char/n_tty.c --- linux-bk/drivers/char/n_tty.c Mon Jul 22 19:22:42 2002 +++ linux/drivers/char/n_tty.c Mon Jul 22 19:54:29 2002 @@ -807,7 +807,7 @@ I_ICRNL(tty) || I_INLCR(tty) || L_ICANON(tty) || I_IXON(tty) || L_ISIG(tty) || L_ECHO(tty) || I_PARMRK(tty)) { - __cli(); // FIXME: is this safe? + local_irq_disable(); // FIXME: is this safe? memset(tty->process_char_map, 0, 256/8); if (I_IGNCR(tty) || I_ICRNL(tty)) @@ -843,7 +843,7 @@ set_bit(SUSP_CHAR(tty), tty->process_char_map); } clear_bit(__DISABLED_CHAR, tty->process_char_map); - __sti(); // FIXME: is this safe? + local_irq_enable(); // FIXME: is this safe? tty->raw = 0; tty->real_raw = 0; } else { diff -rNu linux-bk/drivers/char/tty_io.c linux/drivers/char/tty_io.c --- linux-bk/drivers/char/tty_io.c Mon Jul 22 19:22:42 2002 +++ linux/drivers/char/tty_io.c Mon Jul 22 19:54:29 2002 @@ -460,7 +460,7 @@ { unsigned long flags; - __save_flags(flags); __cli(); // FIXME: is this safe? + local_save_flags(flags); local_irq_disable(); // FIXME: is this safe? if (tty->ldisc.flush_buffer) tty->ldisc.flush_buffer(tty); if (tty->driver.flush_buffer) @@ -468,7 +468,7 @@ if ((test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags)) && tty->ldisc.write_wakeup) (tty->ldisc.write_wakeup)(tty); - __restore_flags(flags); // FIXME: is this safe? + local_irq_restore(flags); // FIXME: is this safe? } wake_up_interruptible(&tty->write_wait); @@ -1900,7 +1900,7 @@ fp = tty->flip.flag_buf + TTY_FLIPBUF_SIZE; tty->flip.buf_num = 0; - __save_flags(flags); __cli(); // FIXME: is this safe? + local_save_flags(flags); local_irq_disable(); // FIXME: is this safe? tty->flip.char_buf_ptr = tty->flip.char_buf; tty->flip.flag_buf_ptr = tty->flip.flag_buf; } else { @@ -1908,13 +1908,13 @@ fp = tty->flip.flag_buf; tty->flip.buf_num = 1; - __save_flags(flags); __cli(); // FIXME: is this safe? + local_save_flags(flags); local_irq_disable(); // FIXME: is this safe? tty->flip.char_buf_ptr = tty->flip.char_buf + TTY_FLIPBUF_SIZE; tty->flip.flag_buf_ptr = tty->flip.flag_buf + TTY_FLIPBUF_SIZE; } count = tty->flip.count; tty->flip.count = 0; - __restore_flags(flags); // FIXME: is this safe? + local_irq_restore(flags); // FIXME: is this safe? tty->ldisc.receive_buf(tty, cp, fp, count); } diff -rNu linux-bk/drivers/char/tty_ioctl.c linux/drivers/char/tty_ioctl.c --- linux-bk/drivers/char/tty_ioctl.c Mon Jul 22 19:22:42 2002 +++ linux/drivers/char/tty_ioctl.c Mon Jul 22 19:54:30 2002 @@ -97,7 +97,7 @@ int canon_change; struct termios old_termios = *tty->termios; - __cli(); // FIXME: is this safe? + local_irq_disable(); // FIXME: is this safe? *tty->termios = *new_termios; unset_locked_termios(tty->termios, &old_termios, tty->termios_locked); canon_change = (old_termios.c_lflag ^ tty->termios->c_lflag) & ICANON; @@ -107,7 +107,7 @@ tty->canon_data = 0; tty->erasing = 0; } - __sti(); // FIXME: is this safe? + local_irq_enable(); // FIXME: is this safe? if (canon_change && !L_ICANON(tty) && tty->read_cnt) /* Get characters left over from canonical mode. */ wake_up_interruptible(&tty->read_wait); diff -rNu linux-bk/drivers/char/vt.c linux/drivers/char/vt.c --- linux-bk/drivers/char/vt.c Mon Jul 22 19:22:42 2002 +++ linux/drivers/char/vt.c Mon Jul 22 19:54:30 2002 @@ -113,8 +113,8 @@ if (hz > 20 && hz < 32767) count = 1193180 / hz; - __save_flags(flags); // FIXME: is this safe? - __cli(); + local_save_flags(flags); // FIXME: is this safe? + local_irq_disable(); del_timer(&sound_timer); if (count) { /* enable counter 2 */ @@ -131,7 +131,7 @@ } } else kd_nosound(0); - __restore_flags(flags); + local_irq_restore(flags); return; } diff -rNu linux-bk/drivers/ide/device.c linux/drivers/ide/device.c --- linux-bk/drivers/ide/device.c Mon Jul 22 19:22:28 2002 +++ linux/drivers/ide/device.c Mon Jul 22 19:54:44 2002 @@ -150,16 +150,16 @@ if (!ata_status(drive, 0, BUSY_STAT)) { unsigned long flags; - __save_flags(flags); + local_save_flags(flags); local_irq_enable(); timeout += jiffies; while (!ata_status(drive, 0, BUSY_STAT)) { if (time_after(jiffies, timeout)) { - __restore_flags(flags); + local_irq_restore(flags); return ata_error(drive, rq, "status timeout"); } } - __restore_flags(flags); + local_irq_restore(flags); } /* diff -rNu linux-bk/drivers/ide/ide-pmac.c linux/drivers/ide/ide-pmac.c --- linux-bk/drivers/ide/ide-pmac.c Mon Jul 22 19:22:28 2002 +++ linux/drivers/ide/ide-pmac.c Mon Jul 22 19:54:45 2002 @@ -419,10 +419,10 @@ OUT_BYTE(SETFEATURES_XFER, IDE_FEATURE_REG); OUT_BYTE(WIN_SETFEATURES, IDE_COMMAND_REG); udelay(1); - __save_flags(flags); + local_save_flags(flags); local_irq_enable(); result = wait_for_ready(drive); - __restore_flags(flags); + local_irq_restore(flags); ata_irq_enable(drive, 1); if (result) printk(KERN_ERR "pmac_ide_do_setfeature disk not ready after SET_FEATURE !\n"); diff -rNu linux-bk/drivers/ide/ide.c linux/drivers/ide/ide.c --- linux-bk/drivers/ide/ide.c Mon Jul 22 19:22:42 2002 +++ linux/drivers/ide/ide.c Mon Jul 22 19:54:45 2002 @@ -288,7 +288,7 @@ u8 err = 0; /* FIXME: --bzolnier */ - __save_flags(flags); + local_save_flags(flags); local_irq_enable(); printk("%s: %s: status=0x%02x", drive->name, msg, drive->status); @@ -337,7 +337,7 @@ #endif printk("\n"); } - __restore_flags (flags); + local_irq_restore (flags); return err; } diff -rNu linux-bk/drivers/ide/main.c linux/drivers/ide/main.c --- linux-bk/drivers/ide/main.c Mon Jul 22 19:22:42 2002 +++ linux/drivers/ide/main.c Mon Jul 22 19:54:44 2002 @@ -1082,18 +1082,18 @@ { unsigned long flags; - __save_flags(flags); // FIXME: is this safe? - __cli(); + local_save_flags(flags); // FIXME: is this safe? + local_irq_disable(); #if 0 if (__MOD_IN_USE(ata_ops(drive)->owner)) { - __restore_flags(flags); // FIXME: is this safe? + local_irq_restore(flags); // FIXME: is this safe? return 1; } #endif if (drive->usage || drive->busy || !ata_ops(drive)) { - __restore_flags(flags); // FIXME: is this safe? + local_irq_restore(flags); // FIXME: is this safe? return 1; } @@ -1102,7 +1102,7 @@ #endif drive->driver = NULL; - __restore_flags(flags); // FIXME: is this safe? + local_irq_restore(flags); // FIXME: is this safe? return 0; } diff -rNu linux-bk/drivers/ide/probe.c linux/drivers/ide/probe.c --- linux-bk/drivers/ide/probe.c Mon Jul 22 19:22:28 2002 +++ linux/drivers/ide/probe.c Mon Jul 22 19:54:44 2002 @@ -733,7 +733,7 @@ ch->straight8 = 0; - __save_flags(flags); + local_save_flags(flags); local_irq_enable(); /* needed for jiffies and irq probing */ /* @@ -852,7 +852,7 @@ if (ch->reset) ata_reset(ch); - __restore_flags(flags); + local_irq_restore(flags); /* * Now setup the PIO transfer modes of the drives on this channel. @@ -869,7 +869,7 @@ return; not_found: - __restore_flags(flags); + local_irq_restore(flags); } /* diff -rNu linux-bk/drivers/input/joystick/a3d.c linux/drivers/input/joystick/a3d.c --- linux-bk/drivers/input/joystick/a3d.c Sun Jun 9 07:26:29 2002 +++ linux/drivers/input/joystick/a3d.c Mon Jul 22 19:54:48 2002 @@ -84,8 +84,8 @@ t = gameport_time(gameport, A3D_MAX_START); s = gameport_time(gameport, A3D_MAX_STROBE); - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); gameport_trigger(gameport); v = gameport_read(gameport); @@ -98,7 +98,7 @@ } } - __restore_flags(flags); + local_irq_restore(flags); return i; } diff -rNu linux-bk/drivers/input/joystick/adi.c linux/drivers/input/joystick/adi.c --- linux-bk/drivers/input/joystick/adi.c Mon Jul 22 19:22:26 2002 +++ linux/drivers/input/joystick/adi.c Mon Jul 22 19:54:48 2002 @@ -152,8 +152,8 @@ s[i] = 0; } - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); gameport_trigger(gameport); v = z = gameport_read(gameport); @@ -172,7 +172,7 @@ } } while (t[0] > 0 || t[1] > 0); - __restore_flags(flags); + local_irq_restore(flags); return; } diff -rNu linux-bk/drivers/input/joystick/analog.c linux/drivers/input/joystick/analog.c --- linux-bk/drivers/input/joystick/analog.c Sun Jun 9 07:28:53 2002 +++ linux/drivers/input/joystick/analog.c Mon Jul 22 19:54:48 2002 @@ -232,11 +232,11 @@ loopout = (ANALOG_LOOP_TIME * port->loop) / 1000; timeout = ANALOG_MAX_TIME * port->speed; - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); gameport_trigger(gameport); GET_TIME(now); - __restore_flags(flags); + local_irq_restore(flags); start = now; this = port->mask; @@ -246,10 +246,10 @@ loop = now; last = this; - __cli(); + local_irq_disable(); this = gameport_read(gameport) & port->mask; GET_TIME(now); - __restore_flags(flags); + local_irq_restore(flags); if ((last ^ this) && (DELTA(loop, now) < loopout)) { data[i] = last ^ this; diff -rNu linux-bk/drivers/input/joystick/cobra.c linux/drivers/input/joystick/cobra.c --- linux-bk/drivers/input/joystick/cobra.c Sun Jun 9 07:30:05 2002 +++ linux/drivers/input/joystick/cobra.c Mon Jul 22 19:54:48 2002 @@ -73,8 +73,8 @@ t[i] = COBRA_MAX_STROBE; } - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); u = gameport_read(gameport); @@ -91,7 +91,7 @@ } } while (t[0] > 0 || t[1] > 0); - __restore_flags(flags); + local_irq_restore(flags); ret = 0; diff -rNu linux-bk/drivers/input/joystick/gamecon.c linux/drivers/input/joystick/gamecon.c --- linux-bk/drivers/input/joystick/gamecon.c Mon Jul 22 19:22:26 2002 +++ linux/drivers/input/joystick/gamecon.c Mon Jul 22 19:54:48 2002 @@ -113,13 +113,13 @@ * Request the pad to transmit data */ - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); for (i = 0; i < GC_N64_REQUEST_LENGTH; i++) { parport_write_data(gc->pd->port, GC_N64_POWER_W | ((GC_N64_REQUEST >> i) & 1 ? GC_N64_OUT : 0)); udelay(GC_N64_DWS); } - __restore_flags(flags); + local_irq_restore(flags); /* * Wait for the pad response to be loaded into the 33-bit register of the adapter @@ -270,8 +270,8 @@ parport_write_data(gc->pd->port, GC_PSX_CLOCK | GC_PSX_POWER); /* Deselect, begin command */ udelay(GC_PSX_DELAY * 2); - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); gc_psx_command(gc, 0x01); /* Access pad */ id = gc_psx_command(gc, 0x42); /* Get device id */ @@ -280,7 +280,7 @@ data[i] = gc_psx_command(gc, 0); } else id = 0; - __restore_flags(flags); + local_irq_restore(flags); parport_write_data(gc->pd->port, GC_PSX_CLOCK | GC_PSX_SELECT | GC_PSX_POWER); diff -rNu linux-bk/drivers/input/joystick/gf2k.c linux/drivers/input/joystick/gf2k.c --- linux-bk/drivers/input/joystick/gf2k.c Sun Jun 9 07:27:34 2002 +++ linux/drivers/input/joystick/gf2k.c Mon Jul 22 19:54:48 2002 @@ -106,8 +106,8 @@ i = 0; - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); gameport_trigger(gameport); v = gameport_read(gameport);; @@ -121,7 +121,7 @@ } } - __restore_flags(flags); + local_irq_restore(flags); return i; } @@ -137,8 +137,8 @@ unsigned long flags; int i, t; - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); i = 0; do { @@ -150,7 +150,7 @@ gameport_trigger(gameport); - __restore_flags(flags); + local_irq_restore(flags); } /* diff -rNu linux-bk/drivers/input/joystick/grip.c linux/drivers/input/joystick/grip.c --- linux-bk/drivers/input/joystick/grip.c Sun Jun 9 07:28:54 2002 +++ linux/drivers/input/joystick/grip.c Mon Jul 22 19:54:48 2002 @@ -98,8 +98,8 @@ t = strobe; i = 0; - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); v = gameport_read(gameport) >> shift; @@ -112,7 +112,7 @@ } } while (i < GRIP_LENGTH_GPP && t > 0); - __restore_flags(flags); + local_irq_restore(flags); if (i < GRIP_LENGTH_GPP) return -1; @@ -140,8 +140,8 @@ status = buf = i = j = 0; t = strobe; - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); v = w = (gameport_read(gameport) >> shift) & 3; @@ -176,7 +176,7 @@ } while (status != 0xf && i < GRIP_MAX_BITS_XT && j < GRIP_MAX_CHUNKS_XT && t > 0); - __restore_flags(flags); + local_irq_restore(flags); return -(status != 0xf); } diff -rNu linux-bk/drivers/input/joystick/guillemot.c linux/drivers/input/joystick/guillemot.c --- linux-bk/drivers/input/joystick/guillemot.c Mon Jul 22 19:22:26 2002 +++ linux/drivers/input/joystick/guillemot.c Mon Jul 22 19:54:48 2002 @@ -98,8 +98,8 @@ t = gameport_time(gameport, GUILLEMOT_MAX_START); s = gameport_time(gameport, GUILLEMOT_MAX_STROBE); - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); gameport_trigger(gameport); v = gameport_read(gameport); @@ -113,7 +113,7 @@ } } - __restore_flags(flags); + local_irq_restore(flags); return i; } diff -rNu linux-bk/drivers/input/joystick/interact.c linux/drivers/input/joystick/interact.c --- linux-bk/drivers/input/joystick/interact.c Sun Jun 9 07:26:58 2002 +++ linux/drivers/input/joystick/interact.c Mon Jul 22 19:54:48 2002 @@ -103,8 +103,8 @@ t = gameport_time(gameport, INTERACT_MAX_START); s = gameport_time(gameport, INTERACT_MAX_STROBE); - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); gameport_trigger(gameport); v = gameport_read(gameport); @@ -120,7 +120,7 @@ } } - __restore_flags(flags); + local_irq_restore(flags); return i; } diff -rNu linux-bk/drivers/input/joystick/sidewinder.c linux/drivers/input/joystick/sidewinder.c --- linux-bk/drivers/input/joystick/sidewinder.c Sun Jun 9 07:31:19 2002 +++ linux/drivers/input/joystick/sidewinder.c Mon Jul 22 19:54:48 2002 @@ -149,8 +149,8 @@ pending = 0; sched = 0; - __save_flags(flags); /* Quiet, please */ - __cli(); + local_save_flags(flags); /* Quiet, please */ + local_irq_disable(); gameport_trigger(gameport); /* Trigger */ v = gameport_read(gameport); @@ -193,7 +193,7 @@ } } - __restore_flags(flags); /* Done - relax */ + local_irq_restore(flags); /* Done - relax */ #ifdef SW_DEBUG { @@ -245,8 +245,8 @@ unsigned long flags; int i, t; - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); i = 0; do { @@ -258,7 +258,7 @@ gameport_trigger(gameport); /* Last trigger */ - __restore_flags(flags); + local_irq_restore(flags); } /* diff -rNu linux-bk/drivers/input/joystick/tmdc.c linux/drivers/input/joystick/tmdc.c --- linux-bk/drivers/input/joystick/tmdc.c Sun Jun 9 07:28:58 2002 +++ linux/drivers/input/joystick/tmdc.c Mon Jul 22 19:54:48 2002 @@ -125,8 +125,8 @@ i[k] = j[k] = 0; } - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); gameport_trigger(gameport); w = gameport_read(gameport) >> 4; @@ -153,7 +153,7 @@ } } while (t[0] > 0 || t[1] > 0); - __restore_flags(flags); + local_irq_restore(flags); return (i[0] == TMDC_MAX_LENGTH) | ((i[1] == TMDC_MAX_LENGTH) << 1); } diff -rNu linux-bk/drivers/net/acenic.c linux/drivers/net/acenic.c --- linux-bk/drivers/net/acenic.c Sun Jun 9 07:29:47 2002 +++ linux/drivers/net/acenic.c Mon Jul 22 19:54:20 2002 @@ -3389,14 +3389,14 @@ * Don't take interrupts on this CPU will bit banging * the %#%#@$ I2C device */ - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); eeprom_start(regs); eeprom_prep(regs, EEPROM_WRITE_SELECT); if (eeprom_check_ack(regs)) { - __restore_flags(flags); + local_irq_restore(flags); printk(KERN_ERR "%s: Unable to sync eeprom\n", dev->name); result = -EIO; goto eeprom_read_error; @@ -3404,7 +3404,7 @@ eeprom_prep(regs, (offset >> 8) & 0xff); if (eeprom_check_ack(regs)) { - __restore_flags(flags); + local_irq_restore(flags); printk(KERN_ERR "%s: Unable to set address byte 0\n", dev->name); result = -EIO; @@ -3413,7 +3413,7 @@ eeprom_prep(regs, offset & 0xff); if (eeprom_check_ack(regs)) { - __restore_flags(flags); + local_irq_restore(flags); printk(KERN_ERR "%s: Unable to set address byte 1\n", dev->name); result = -EIO; @@ -3423,7 +3423,7 @@ eeprom_start(regs); eeprom_prep(regs, EEPROM_READ_SELECT); if (eeprom_check_ack(regs)) { - __restore_flags(flags); + local_irq_restore(flags); printk(KERN_ERR "%s: Unable to set READ_SELECT\n", dev->name); result = -EIO; @@ -3469,7 +3469,7 @@ udelay(ACE_SHORT_DELAY); eeprom_stop(regs); - __restore_flags(flags); + local_irq_restore(flags); out: return result; diff -rNu linux-bk/drivers/net/hamradio/baycom_par.c linux/drivers/net/hamradio/baycom_par.c --- linux-bk/drivers/net/hamradio/baycom_par.c Sun Jun 9 07:31:25 2002 +++ linux/drivers/net/hamradio/baycom_par.c Mon Jul 22 19:54:14 2002 @@ -288,14 +288,14 @@ par96_rx(dev, bc); if (--bc->modem.arb_divider <= 0) { bc->modem.arb_divider = 6; - __sti(); + local_irq_enable(); hdlcdrv_arbitrate(dev, &bc->hdrv); } } - __sti(); + local_irq_enable(); hdlcdrv_transmitter(dev, &bc->hdrv); hdlcdrv_receiver(dev, &bc->hdrv); - __cli(); + local_irq_disable(); } /* --------------------------------------------------------------------- */ diff -rNu linux-bk/drivers/net/hamradio/baycom_ser_fdx.c linux/drivers/net/hamradio/baycom_ser_fdx.c --- linux-bk/drivers/net/hamradio/baycom_ser_fdx.c Sun Jun 9 07:30:30 2002 +++ linux/drivers/net/hamradio/baycom_ser_fdx.c Mon Jul 22 19:54:14 2002 @@ -350,7 +350,7 @@ bc->modem.ser12.txshreg >>= 1; } end_transmit: - __sti(); + local_irq_enable(); if (!bc->modem.ptt && txcount) { hdlcdrv_arbitrate(dev, &bc->hdrv); if (hdlcdrv_ptt(&bc->hdrv)) { @@ -361,7 +361,7 @@ } hdlcdrv_transmitter(dev, &bc->hdrv); hdlcdrv_receiver(dev, &bc->hdrv); - __cli(); + local_irq_disable(); } /* --------------------------------------------------------------------- */ diff -rNu linux-bk/drivers/net/hamradio/baycom_ser_hdx.c linux/drivers/net/hamradio/baycom_ser_hdx.c --- linux-bk/drivers/net/hamradio/baycom_ser_hdx.c Sun Jun 9 07:26:51 2002 +++ linux/drivers/net/hamradio/baycom_ser_hdx.c Mon Jul 22 19:54:14 2002 @@ -416,13 +416,13 @@ } while (!(iir & 1)); if (bc->modem.arb_divider <= 0) { bc->modem.arb_divider = SER12_ARB_DIVIDER(bc); - __sti(); + local_irq_enable(); hdlcdrv_arbitrate(dev, &bc->hdrv); } - __sti(); + local_irq_enable(); hdlcdrv_transmitter(dev, &bc->hdrv); hdlcdrv_receiver(dev, &bc->hdrv); - __cli(); + local_irq_disable(); } /* --------------------------------------------------------------------- */ diff -rNu linux-bk/drivers/net/sgiseeq.c linux/drivers/net/sgiseeq.c --- linux-bk/drivers/net/sgiseeq.c Sun Jun 9 07:31:22 2002 +++ linux/drivers/net/sgiseeq.c Mon Jul 22 19:54:21 2002 @@ -450,7 +450,7 @@ unsigned long flags; int err; - __save_and_cli(flags); + local_irq_save(flags); err = -EAGAIN; if (request_irq(dev->irq, sgiseeq_interrupt, 0, sgiseeqstr, dev)) { @@ -464,7 +464,7 @@ netif_start_queue(dev); out: - __restore_flags(flags); + local_irq_restore(flags); return err; } diff -rNu linux-bk/drivers/net/wireless/orinoco.c linux/drivers/net/wireless/orinoco.c --- linux-bk/drivers/net/wireless/orinoco.c Sun Jun 9 07:30:02 2002 +++ linux/drivers/net/wireless/orinoco.c Mon Jul 22 19:54:18 2002 @@ -534,10 +534,10 @@ TRACE_ENTER(priv->ndev->name); - __cli(); /* FIXME: is this necessary? */ + local_irq_disable(); /* FIXME: is this necessary? */ set_bit(ORINOCO_STATE_DOIRQ, &priv->state); hermes_set_irqmask(hw, irqmask); - __sti(); + local_irq_enable(); TRACE_EXIT(priv->ndev->name); } diff -rNu linux-bk/drivers/s390/char/tubio.h linux/drivers/s390/char/tubio.h --- linux-bk/drivers/s390/char/tubio.h Sun Jun 9 07:26:23 2002 +++ linux/drivers/s390/char/tubio.h Mon Jul 22 19:54:31 2002 @@ -338,11 +338,11 @@ #define spin_trylock_irqsave(lock, flags) \ ({ \ int success; \ - __save_flags(flags); \ - __cli(); \ + local_save_flags(flags); \ + local_irq_disable(); \ success = spin_trylock(lock); \ if (success == 0) \ - __restore_flags(flags); \ + local_irq_restore(flags); \ success; \ }) #endif /* if not spin_trylock_irqsave */ diff -rNu linux-bk/drivers/s390/cio/s390io.c linux/drivers/s390/cio/s390io.c --- linux-bk/drivers/s390/cio/s390io.c Sun Jun 9 07:31:18 2002 +++ linux/drivers/s390/cio/s390io.c Mon Jul 22 19:54:31 2002 @@ -163,11 +163,11 @@ * function we resestablish the old environment. * * Note : as we don't need a system wide lock, therefore - * we shouldn't use cli(), but __cli() as this + * we shouldn't use cli(), but local_irq_disable() as this * affects the current CPU only. */ - __save_flags (flags); - __cli (); + local_save_flags (flags); + local_irq_disable (); /* * disable all interrupts @@ -204,7 +204,7 @@ init_IRQ_complete = 1; - __restore_flags (flags); + local_irq_restore (flags); return; } @@ -578,10 +578,10 @@ * also require to run disabled. * * Note : as no global lock is required, we must not use - * cli(), but __cli() instead. + * cli(), but local_irq_disable() instead. */ - __save_flags (flags); - __cli (); + local_save_flags (flags); + local_irq_disable (); rdc_ccw = &ioinfo[irq]->senseccw; @@ -643,7 +643,7 @@ } - __restore_flags (flags); + local_irq_restore (flags); /* * on success we update the user input parms @@ -720,8 +720,8 @@ int emulated = 0; /* no i/O handler installed */ int retry = 5; /* retry count */ - __save_flags (flags); - __cli (); + local_save_flags (flags); + local_irq_disable (); if (!ioinfo[irq]->ui.flags.ready) { pdevstat = &devstat; @@ -816,7 +816,7 @@ } - __restore_flags (flags); + local_irq_restore (flags); } diff -rNu linux-bk/drivers/s390/net/lcs.c linux/drivers/s390/net/lcs.c --- linux-bk/drivers/s390/net/lcs.c Sun Jun 9 07:27:26 2002 +++ linux/drivers/s390/net/lcs.c Mon Jul 22 19:54:32 2002 @@ -968,7 +968,7 @@ #if LINUX_VERSION_CODE<=KERNEL_VERSION(2,2,16) /* tq_scheduler sometimes leaves interrupts disabled from do * bottom half */ - __sti(); + local_irq_enable(); #endif if (kernel_thread((int (*)(void *)) drvr_globals->kernel_thread_routine, (void *) drvr_globals, SIGCHLD) < 0) { diff -rNu linux-bk/drivers/s390/s390mach.c linux/drivers/s390/s390mach.c --- linux-bk/drivers/s390/s390mach.c Sun Jun 9 07:29:43 2002 +++ linux/drivers/s390/s390mach.c Mon Jul 22 19:54:32 2002 @@ -254,8 +254,8 @@ found = 0; /* init ... */ - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); do { @@ -311,7 +311,7 @@ } while (pmache); - __restore_flags(flags); + local_irq_restore(flags); } while (1); diff -rNu linux-bk/drivers/scsi/qlogicpti.c linux/drivers/scsi/qlogicpti.c --- linux-bk/drivers/scsi/qlogicpti.c Sun Jun 9 07:27:29 2002 +++ linux/drivers/scsi/qlogicpti.c Mon Jul 22 19:54:35 2002 @@ -1456,7 +1456,7 @@ } while (dq != NULL); spin_unlock(qpti->qhost->host_lock); } - __restore_flags(flags); + local_irq_restore(flags); } int qlogicpti_abort(Scsi_Cmnd *Cmnd) diff -rNu linux-bk/drivers/usb/serial/keyspan_pda.S linux/drivers/usb/serial/keyspan_pda.S --- linux-bk/drivers/usb/serial/keyspan_pda.S Sun Jun 9 07:29:50 2002 +++ linux/drivers/usb/serial/keyspan_pda.S Mon Jul 22 19:54:41 2002 @@ -970,9 +970,9 @@ mov r1, #1 ; INbuf size counter start_in__loop: mov a, rx_ring_in - cjne a, rx_ring_out, start_in__still_copying + cjne a, rx_ring_out, start_inlocal_irq_enablell_copying sjmp start_in__kick -start_in__still_copying: +start_inlocal_irq_enablell_copying: inc rx_ring_out mov dpl, rx_ring_out movx a, @dptr diff -rNu linux-bk/drivers/usb/serial/xircom_pgs.S linux/drivers/usb/serial/xircom_pgs.S --- linux-bk/drivers/usb/serial/xircom_pgs.S Sun Jun 9 07:26:59 2002 +++ linux/drivers/usb/serial/xircom_pgs.S Mon Jul 22 19:54:41 2002 @@ -1035,9 +1035,9 @@ mov r1, #1 ; INbuf size counter start_in__loop: mov a, rx_ring_in - cjne a, rx_ring_out, start_in__still_copying + cjne a, rx_ring_out, start_inlocal_irq_enablell_copying sjmp start_in__kick -start_in__still_copying: +start_inlocal_irq_enablell_copying: inc rx_ring_out mov dpl, rx_ring_out movx a, @dptr diff -rNu linux-bk/include/asm-alpha/io.h linux/include/asm-alpha/io.h --- linux-bk/include/asm-alpha/io.h Sun Jun 9 07:28:56 2002 +++ linux/include/asm-alpha/io.h Mon Jul 22 19:55:43 2002 @@ -31,7 +31,7 @@ static inline void __set_hae(unsigned long new_hae) { unsigned long flags; - __save_and_cli(flags); + local_irq_save(flags); alpha_mv.hae_cache = new_hae; *alpha_mv.hae_register = new_hae; @@ -39,7 +39,7 @@ /* Re-read to make sure it was written. */ new_hae = *alpha_mv.hae_register; - __restore_flags(flags); + local_irq_restore(flags); } static inline void set_hae(unsigned long new_hae) diff -rNu linux-bk/include/asm-alpha/smplock.h linux/include/asm-alpha/smplock.h --- linux-bk/include/asm-alpha/smplock.h Sun Jun 9 07:28:49 2002 +++ linux/include/asm-alpha/smplock.h Mon Jul 22 19:55:43 2002 @@ -20,7 +20,7 @@ if (task->lock_depth >= 0) spin_unlock(&kernel_flag); release_irqlock(cpu); - __sti(); + local_irq_enable(); } /* diff -rNu linux-bk/include/asm-alpha/system.h linux/include/asm-alpha/system.h --- linux-bk/include/asm-alpha/system.h Sun Jun 9 07:30:32 2002 +++ linux/include/asm-alpha/system.h Mon Jul 22 19:56:37 2002 @@ -303,16 +303,11 @@ #define getipl() (rdps() & 7) #define setipl(ipl) ((void) swpipl(ipl)) -#define __cli() do { setipl(IPL_MAX); barrier(); } while(0) -#define __sti() do { barrier(); setipl(IPL_MIN); } while(0) -#define __save_flags(flags) ((flags) = rdps()) -#define __save_and_cli(flags) do { (flags) = swpipl(IPL_MAX); barrier(); } while(0) -#define __restore_flags(flags) do { barrier(); setipl(flags); barrier(); } while(0) - -#define local_irq_save(flags) __save_and_cli(flags) -#define local_irq_restore(flags) __restore_flags(flags) -#define local_irq_disable() __cli() -#define local_irq_enable() __sti() +#define local_irq_disable() do { setipl(IPL_MAX); barrier(); } while(0) +#define local_irq_enable() do { barrier(); setipl(IPL_MIN); } while(0) +#define local_save_flags(flags) ((flags) = rdps()) +#define local_irq_save(flags) do { (flags) = swpipl(IPL_MAX); barrier(); } while(0) +#define local_irq_restore(flags) do { barrier(); setipl(flags); barrier(); } while(0) #ifdef CONFIG_SMP @@ -332,11 +327,11 @@ #else /* CONFIG_SMP */ -#define cli() __cli() -#define sti() __sti() -#define save_flags(flags) __save_flags(flags) -#define save_and_cli(flags) __save_and_cli(flags) -#define restore_flags(flags) __restore_flags(flags) +#define cli() local_irq_disable() +#define sti() local_irq_enable() +#define save_flags(flags) local_save_flags(flags) +#define save_and_cli(flags) local_irq_save(flags) +#define restore_flags(flags) local_irq_restore(flags) #endif /* CONFIG_SMP */ diff -rNu linux-bk/include/asm-arm/atomic.h linux/include/asm-arm/atomic.h --- linux-bk/include/asm-arm/atomic.h Mon Jul 22 19:22:24 2002 +++ linux/include/asm-arm/atomic.h Mon Jul 22 19:55:36 2002 @@ -36,36 +36,36 @@ { unsigned long flags; - __save_flags_cli(flags); + local_save_flags_cli(flags); v->counter += i; - __restore_flags(flags); + local_irq_restore(flags); } static inline void atomic_sub(int i, volatile atomic_t *v) { unsigned long flags; - __save_flags_cli(flags); + local_save_flags_cli(flags); v->counter -= i; - __restore_flags(flags); + local_irq_restore(flags); } static inline void atomic_inc(volatile atomic_t *v) { unsigned long flags; - __save_flags_cli(flags); + local_save_flags_cli(flags); v->counter += 1; - __restore_flags(flags); + local_irq_restore(flags); } static inline void atomic_dec(volatile atomic_t *v) { unsigned long flags; - __save_flags_cli(flags); + local_save_flags_cli(flags); v->counter -= 1; - __restore_flags(flags); + local_irq_restore(flags); } static inline int atomic_dec_and_test(volatile atomic_t *v) @@ -73,10 +73,10 @@ unsigned long flags; int val; - __save_flags_cli(flags); + local_save_flags_cli(flags); val = v->counter; v->counter = val -= 1; - __restore_flags(flags); + local_irq_restore(flags); return val == 0; } @@ -86,10 +86,10 @@ unsigned long flags; int val; - __save_flags_cli(flags); + local_save_flags_cli(flags); val = v->counter; v->counter = val += i; - __restore_flags(flags); + local_irq_restore(flags); return val < 0; } @@ -98,9 +98,9 @@ { unsigned long flags; - __save_flags_cli(flags); + local_save_flags_cli(flags); *addr &= ~mask; - __restore_flags(flags); + local_irq_restore(flags); } /* Atomic operations are already serializing on ARM */ diff -rNu linux-bk/include/asm-arm/proc-armo/system.h linux/include/asm-arm/proc-armo/system.h --- linux-bk/include/asm-arm/proc-armo/system.h Sun Jun 9 07:28:49 2002 +++ linux/include/asm-arm/proc-armo/system.h Mon Jul 22 19:55:35 2002 @@ -39,7 +39,7 @@ /* * Save the current interrupt enable state & disable IRQs */ -#define __save_flags_cli(x) \ +#define local_save_flags_cli(x) \ do { \ unsigned long temp; \ __asm__ __volatile__( \ @@ -55,7 +55,7 @@ /* * Enable IRQs */ -#define __sti() \ +#define local_irq_enable() \ do { \ unsigned long temp; \ __asm__ __volatile__( \ @@ -70,7 +70,7 @@ /* * Disable IRQs */ -#define __cli() \ +#define local_irq_disable() \ do { \ unsigned long temp; \ __asm__ __volatile__( \ @@ -103,7 +103,7 @@ /* * save current IRQ & FIQ state */ -#define __save_flags(x) \ +#define local_save_flags(x) \ do { \ __asm__ __volatile__( \ " mov %0, pc @ save_flags\n" \ @@ -114,7 +114,7 @@ /* * restore saved IRQ & FIQ state */ -#define __restore_flags(x) \ +#define local_irq_restore(x) \ do { \ unsigned long temp; \ __asm__ __volatile__( \ diff -rNu linux-bk/include/asm-arm/proc-armv/system.h linux/include/asm-arm/proc-armv/system.h --- linux-bk/include/asm-arm/proc-armv/system.h Mon Jul 22 19:22:28 2002 +++ linux/include/asm-arm/proc-armv/system.h Mon Jul 22 19:55:34 2002 @@ -49,7 +49,7 @@ /* * Save the current interrupt enable state & disable IRQs */ -#define __save_flags_cli(x) \ +#define local_save_flags_cli(x) \ ({ \ unsigned long temp; \ __asm__ __volatile__( \ @@ -64,7 +64,7 @@ /* * Enable IRQs */ -#define __sti() \ +#define local_irq_enable() \ ({ \ unsigned long temp; \ __asm__ __volatile__( \ @@ -79,7 +79,7 @@ /* * Disable IRQs */ -#define __cli() \ +#define local_irq_disable() \ ({ \ unsigned long temp; \ __asm__ __volatile__( \ @@ -124,7 +124,7 @@ /* * save current IRQ & FIQ state */ -#define __save_flags(x) \ +#define local_save_flags(x) \ __asm__ __volatile__( \ "mrs %0, cpsr @ save_flags\n" \ : "=r" (x) \ @@ -134,7 +134,7 @@ /* * restore saved IRQ & FIQ state */ -#define __restore_flags(x) \ +#define local_irq_restore(x) \ __asm__ __volatile__( \ "msr cpsr_c, %0 @ restore_flags\n" \ : \ @@ -168,17 +168,17 @@ switch (size) { #ifdef swp_is_buggy case 1: - __save_flags_cli(flags); + local_save_flags_cli(flags); ret = *(volatile unsigned char *)ptr; *(volatile unsigned char *)ptr = x; - __restore_flags(flags); + local_irq_restore(flags); break; case 4: - __save_flags_cli(flags); + local_save_flags_cli(flags); ret = *(volatile unsigned long *)ptr; *(volatile unsigned long *)ptr = x; - __restore_flags(flags); + local_irq_restore(flags); break; #else case 1: __asm__ __volatile__ ("swpb %0, %1, [%2]" diff -rNu linux-bk/include/asm-arm/system.h linux/include/asm-arm/system.h --- linux-bk/include/asm-arm/system.h Mon Jul 22 19:22:28 2002 +++ linux/include/asm-arm/system.h Mon Jul 22 19:57:02 2002 @@ -76,10 +76,7 @@ } while (0) /* For spinlocks etc */ -#define local_irq_save(x) __save_flags_cli(x) -#define local_irq_restore(x) __restore_flags(x) -#define local_irq_disable() __cli() -#define local_irq_enable() __sti() +#define local_irq_save(x) local_save_flags_cli(x) #ifdef CONFIG_SMP #error SMP not supported @@ -94,12 +91,12 @@ #define smp_rmb() barrier() #define smp_wmb() barrier() -#define cli() __cli() -#define sti() __sti() +#define cli() local_irq_disable() +#define sti() local_irq_enable() #define clf() __clf() #define stf() __stf() -#define save_flags(x) __save_flags(x) -#define restore_flags(x) __restore_flags(x) +#define save_flags(x) local_save_flags(x) +#define restore_flags(x) local_irq_restore(x) #endif /* CONFIG_SMP */ diff -rNu linux-bk/include/asm-cris/softirq.h linux/include/asm-cris/softirq.h --- linux-bk/include/asm-cris/softirq.h Sun Jun 9 07:28:12 2002 +++ linux/include/asm-cris/softirq.h Mon Jul 22 19:55:47 2002 @@ -21,7 +21,7 @@ if (!--local_bh_count(smp_processor_id()) \ && softirq_pending(smp_processor_id())) { \ do_softirq(); \ - __sti(); \ + local_irq_enable(); \ } \ } while (0) diff -rNu linux-bk/include/asm-cris/sv_addr.agh linux/include/asm-cris/sv_addr.agh --- linux-bk/include/asm-cris/sv_addr.agh Sun Jun 9 07:29:20 2002 +++ linux/include/asm-cris/sv_addr.agh Mon Jul 22 19:55:47 2002 @@ -1142,7 +1142,7 @@ #define R_SERIAL0_CTRL__rec_stick_par__BITNR 19 #define R_SERIAL0_CTRL__rec_stick_par__WIDTH 1 #define R_SERIAL0_CTRL__rec_stick_par__normal 0 -#define R_SERIAL0_CTRL__rec_stick_par__stick 1 +#define R_SERIAL0_CTRL__rec_stick_parlocal_irq_enableck 1 #define R_SERIAL0_CTRL__rec_par__BITNR 18 #define R_SERIAL0_CTRL__rec_par__WIDTH 1 #define R_SERIAL0_CTRL__rec_par__even 0 @@ -1172,7 +1172,7 @@ #define R_SERIAL0_CTRL__tr_stick_par__BITNR 11 #define R_SERIAL0_CTRL__tr_stick_par__WIDTH 1 #define R_SERIAL0_CTRL__tr_stick_par__normal 0 -#define R_SERIAL0_CTRL__tr_stick_par__stick 1 +#define R_SERIAL0_CTRL__tr_stick_parlocal_irq_enableck 1 #define R_SERIAL0_CTRL__tr_par__BITNR 10 #define R_SERIAL0_CTRL__tr_par__WIDTH 1 #define R_SERIAL0_CTRL__tr_par__even 0 @@ -1246,7 +1246,7 @@ #define R_SERIAL0_REC_CTRL__rec_stick_par__BITNR 3 #define R_SERIAL0_REC_CTRL__rec_stick_par__WIDTH 1 #define R_SERIAL0_REC_CTRL__rec_stick_par__normal 0 -#define R_SERIAL0_REC_CTRL__rec_stick_par__stick 1 +#define R_SERIAL0_REC_CTRL__rec_stick_parlocal_irq_enableck 1 #define R_SERIAL0_REC_CTRL__rec_par__BITNR 2 #define R_SERIAL0_REC_CTRL__rec_par__WIDTH 1 #define R_SERIAL0_REC_CTRL__rec_par__even 0 @@ -1278,7 +1278,7 @@ #define R_SERIAL0_TR_CTRL__tr_stick_par__BITNR 3 #define R_SERIAL0_TR_CTRL__tr_stick_par__WIDTH 1 #define R_SERIAL0_TR_CTRL__tr_stick_par__normal 0 -#define R_SERIAL0_TR_CTRL__tr_stick_par__stick 1 +#define R_SERIAL0_TR_CTRL__tr_stick_parlocal_irq_enableck 1 #define R_SERIAL0_TR_CTRL__tr_par__BITNR 2 #define R_SERIAL0_TR_CTRL__tr_par__WIDTH 1 #define R_SERIAL0_TR_CTRL__tr_par__even 0 @@ -1434,7 +1434,7 @@ #define R_SERIAL1_CTRL__rec_stick_par__BITNR 19 #define R_SERIAL1_CTRL__rec_stick_par__WIDTH 1 #define R_SERIAL1_CTRL__rec_stick_par__normal 0 -#define R_SERIAL1_CTRL__rec_stick_par__stick 1 +#define R_SERIAL1_CTRL__rec_stick_parlocal_irq_enableck 1 #define R_SERIAL1_CTRL__rec_par__BITNR 18 #define R_SERIAL1_CTRL__rec_par__WIDTH 1 #define R_SERIAL1_CTRL__rec_par__even 0 @@ -1464,7 +1464,7 @@ #define R_SERIAL1_CTRL__tr_stick_par__BITNR 11 #define R_SERIAL1_CTRL__tr_stick_par__WIDTH 1 #define R_SERIAL1_CTRL__tr_stick_par__normal 0 -#define R_SERIAL1_CTRL__tr_stick_par__stick 1 +#define R_SERIAL1_CTRL__tr_stick_parlocal_irq_enableck 1 #define R_SERIAL1_CTRL__tr_par__BITNR 10 #define R_SERIAL1_CTRL__tr_par__WIDTH 1 #define R_SERIAL1_CTRL__tr_par__even 0 @@ -1538,7 +1538,7 @@ #define R_SERIAL1_REC_CTRL__rec_stick_par__BITNR 3 #define R_SERIAL1_REC_CTRL__rec_stick_par__WIDTH 1 #define R_SERIAL1_REC_CTRL__rec_stick_par__normal 0 -#define R_SERIAL1_REC_CTRL__rec_stick_par__stick 1 +#define R_SERIAL1_REC_CTRL__rec_stick_parlocal_irq_enableck 1 #define R_SERIAL1_REC_CTRL__rec_par__BITNR 2 #define R_SERIAL1_REC_CTRL__rec_par__WIDTH 1 #define R_SERIAL1_REC_CTRL__rec_par__even 0 @@ -1570,7 +1570,7 @@ #define R_SERIAL1_TR_CTRL__tr_stick_par__BITNR 3 #define R_SERIAL1_TR_CTRL__tr_stick_par__WIDTH 1 #define R_SERIAL1_TR_CTRL__tr_stick_par__normal 0 -#define R_SERIAL1_TR_CTRL__tr_stick_par__stick 1 +#define R_SERIAL1_TR_CTRL__tr_stick_parlocal_irq_enableck 1 #define R_SERIAL1_TR_CTRL__tr_par__BITNR 2 #define R_SERIAL1_TR_CTRL__tr_par__WIDTH 1 #define R_SERIAL1_TR_CTRL__tr_par__even 0 @@ -1726,7 +1726,7 @@ #define R_SERIAL2_CTRL__rec_stick_par__BITNR 19 #define R_SERIAL2_CTRL__rec_stick_par__WIDTH 1 #define R_SERIAL2_CTRL__rec_stick_par__normal 0 -#define R_SERIAL2_CTRL__rec_stick_par__stick 1 +#define R_SERIAL2_CTRL__rec_stick_parlocal_irq_enableck 1 #define R_SERIAL2_CTRL__rec_par__BITNR 18 #define R_SERIAL2_CTRL__rec_par__WIDTH 1 #define R_SERIAL2_CTRL__rec_par__even 0 @@ -1756,7 +1756,7 @@ #define R_SERIAL2_CTRL__tr_stick_par__BITNR 11 #define R_SERIAL2_CTRL__tr_stick_par__WIDTH 1 #define R_SERIAL2_CTRL__tr_stick_par__normal 0 -#define R_SERIAL2_CTRL__tr_stick_par__stick 1 +#define R_SERIAL2_CTRL__tr_stick_parlocal_irq_enableck 1 #define R_SERIAL2_CTRL__tr_par__BITNR 10 #define R_SERIAL2_CTRL__tr_par__WIDTH 1 #define R_SERIAL2_CTRL__tr_par__even 0 @@ -1830,7 +1830,7 @@ #define R_SERIAL2_REC_CTRL__rec_stick_par__BITNR 3 #define R_SERIAL2_REC_CTRL__rec_stick_par__WIDTH 1 #define R_SERIAL2_REC_CTRL__rec_stick_par__normal 0 -#define R_SERIAL2_REC_CTRL__rec_stick_par__stick 1 +#define R_SERIAL2_REC_CTRL__rec_stick_parlocal_irq_enableck 1 #define R_SERIAL2_REC_CTRL__rec_par__BITNR 2 #define R_SERIAL2_REC_CTRL__rec_par__WIDTH 1 #define R_SERIAL2_REC_CTRL__rec_par__even 0 @@ -1862,7 +1862,7 @@ #define R_SERIAL2_TR_CTRL__tr_stick_par__BITNR 3 #define R_SERIAL2_TR_CTRL__tr_stick_par__WIDTH 1 #define R_SERIAL2_TR_CTRL__tr_stick_par__normal 0 -#define R_SERIAL2_TR_CTRL__tr_stick_par__stick 1 +#define R_SERIAL2_TR_CTRL__tr_stick_parlocal_irq_enableck 1 #define R_SERIAL2_TR_CTRL__tr_par__BITNR 2 #define R_SERIAL2_TR_CTRL__tr_par__WIDTH 1 #define R_SERIAL2_TR_CTRL__tr_par__even 0 @@ -2018,7 +2018,7 @@ #define R_SERIAL3_CTRL__rec_stick_par__BITNR 19 #define R_SERIAL3_CTRL__rec_stick_par__WIDTH 1 #define R_SERIAL3_CTRL__rec_stick_par__normal 0 -#define R_SERIAL3_CTRL__rec_stick_par__stick 1 +#define R_SERIAL3_CTRL__rec_stick_parlocal_irq_enableck 1 #define R_SERIAL3_CTRL__rec_par__BITNR 18 #define R_SERIAL3_CTRL__rec_par__WIDTH 1 #define R_SERIAL3_CTRL__rec_par__even 0 @@ -2048,7 +2048,7 @@ #define R_SERIAL3_CTRL__tr_stick_par__BITNR 11 #define R_SERIAL3_CTRL__tr_stick_par__WIDTH 1 #define R_SERIAL3_CTRL__tr_stick_par__normal 0 -#define R_SERIAL3_CTRL__tr_stick_par__stick 1 +#define R_SERIAL3_CTRL__tr_stick_parlocal_irq_enableck 1 #define R_SERIAL3_CTRL__tr_par__BITNR 10 #define R_SERIAL3_CTRL__tr_par__WIDTH 1 #define R_SERIAL3_CTRL__tr_par__even 0 @@ -2122,7 +2122,7 @@ #define R_SERIAL3_REC_CTRL__rec_stick_par__BITNR 3 #define R_SERIAL3_REC_CTRL__rec_stick_par__WIDTH 1 #define R_SERIAL3_REC_CTRL__rec_stick_par__normal 0 -#define R_SERIAL3_REC_CTRL__rec_stick_par__stick 1 +#define R_SERIAL3_REC_CTRL__rec_stick_parlocal_irq_enableck 1 #define R_SERIAL3_REC_CTRL__rec_par__BITNR 2 #define R_SERIAL3_REC_CTRL__rec_par__WIDTH 1 #define R_SERIAL3_REC_CTRL__rec_par__even 0 @@ -2154,7 +2154,7 @@ #define R_SERIAL3_TR_CTRL__tr_stick_par__BITNR 3 #define R_SERIAL3_TR_CTRL__tr_stick_par__WIDTH 1 #define R_SERIAL3_TR_CTRL__tr_stick_par__normal 0 -#define R_SERIAL3_TR_CTRL__tr_stick_par__stick 1 +#define R_SERIAL3_TR_CTRL__tr_stick_parlocal_irq_enableck 1 #define R_SERIAL3_TR_CTRL__tr_par__BITNR 2 #define R_SERIAL3_TR_CTRL__tr_par__WIDTH 1 #define R_SERIAL3_TR_CTRL__tr_par__even 0 diff -rNu linux-bk/include/asm-cris/system.h linux/include/asm-cris/system.h --- linux-bk/include/asm-cris/system.h Sun Jun 9 07:30:26 2002 +++ linux/include/asm-cris/system.h Mon Jul 22 19:55:47 2002 @@ -62,10 +62,10 @@ #define save_flags(x) __asm__ __volatile__ ("move $ccr,%0" : "=rm" (x) : : "memory"); #define restore_flags(x) __asm__ __volatile__ ("move %0,$ccr\n\tbtstq 5,%0\n\tbpl 1f\n\tnop\n\tpush $r0\n\tmoveq 0,$r0\n\tmove.d $r0,[0x90000000]\n\tpop $r0\n1:\n" : : "r" (x) : "memory"); #else -#define __cli() __asm__ __volatile__ ( "di"); -#define __sti() __asm__ __volatile__ ( "ei" ); -#define __save_flags(x) __asm__ __volatile__ ("move $ccr,%0" : "=rm" (x) : : "memory"); -#define __restore_flags(x) __asm__ __volatile__ ("move %0,$ccr" : : "rm" (x) : "memory"); +#define local_irq_disable() __asm__ __volatile__ ( "di"); +#define local_irq_enable() __asm__ __volatile__ ( "ei" ); +#define local_save_flags(x) __asm__ __volatile__ ("move $ccr,%0" : "=rm" (x) : : "memory"); +#define local_irq_restore(x) __asm__ __volatile__ ("move %0,$ccr" : : "rm" (x) : "memory"); /* For spinlocks etc */ #define local_irq_save(x) __asm__ __volatile__ ("move $ccr,%0\n\tdi" : "=rm" (x) : : "memory"); @@ -76,11 +76,11 @@ #endif -#define cli() __cli() -#define sti() __sti() -#define save_flags(x) __save_flags(x) -#define restore_flags(x) __restore_flags(x) -#define save_and_cli(x) do { __save_flags(x); cli(); } while(0) +#define cli() local_irq_disable() +#define sti() local_irq_enable() +#define save_flags(x) local_save_flags(x) +#define restore_flags(x) local_irq_restore(x) +#define save_and_cli(x) do { local_save_flags(x); cli(); } while(0) static inline unsigned long __xchg(unsigned long x, void * ptr, int size) { diff -rNu linux-bk/include/asm-generic/smplock.h linux/include/asm-generic/smplock.h --- linux-bk/include/asm-generic/smplock.h Mon Jul 22 19:22:42 2002 +++ linux/include/asm-generic/smplock.h Mon Jul 22 19:55:25 2002 @@ -17,7 +17,7 @@ do { \ if (task->lock_depth >= 0) \ spin_unlock(&kernel_flag); \ - __sti(); \ + local_irq_enable(); \ } while (0) /* diff -rNu linux-bk/include/asm-i386/acpi.h linux/include/asm-i386/acpi.h --- linux-bk/include/asm-i386/acpi.h Sun Jun 9 07:31:20 2002 +++ linux/include/asm-i386/acpi.h Mon Jul 22 19:55:44 2002 @@ -48,8 +48,8 @@ #define ACPI_ASM_MACROS #define BREAKPOINT3 -#define ACPI_DISABLE_IRQS() __cli() -#define ACPI_ENABLE_IRQS() __sti() +#define ACPI_DISABLE_IRQS() local_irq_disable() +#define ACPI_ENABLE_IRQS() local_irq_enable() #define ACPI_FLUSH_CPU_CACHE() wbinvd() /* diff -rNu linux-bk/include/asm-i386/system.h linux/include/asm-i386/system.h --- linux-bk/include/asm-i386/system.h Mon Jul 22 19:22:42 2002 +++ linux/include/asm-i386/system.h Mon Jul 22 19:56:20 2002 @@ -311,27 +311,24 @@ #define set_wmb(var, value) do { var = value; wmb(); } while (0) /* interrupt control.. */ -#define __save_flags(x) __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */) -#define __restore_flags(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory", "cc") -#define __cli() __asm__ __volatile__("cli": : :"memory") -#define __sti() __asm__ __volatile__("sti": : :"memory") +#define local_save_flags(x) __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */) +#define local_irq_restore(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory", "cc") +#define local_irq_disable() __asm__ __volatile__("cli": : :"memory") +#define local_irq_enable() __asm__ __volatile__("sti": : :"memory") /* used in the idle loop; sti takes one instruction cycle to complete */ #define safe_halt() __asm__ __volatile__("sti; hlt": : :"memory") /* For spinlocks etc */ #define local_irq_save(x) __asm__ __volatile__("pushfl ; popl %0 ; cli":"=g" (x): /* no input */ :"memory") -#define local_irq_restore(x) __restore_flags(x) -#define local_irq_disable() __cli() -#define local_irq_enable() __sti() /* * Compatibility macros - they will be removed after some time. */ #if !CONFIG_SMP -# define sti() __sti() -# define cli() __cli() -# define save_flags(flags) __save_flags(flags) -# define restore_flags(flags) __restore_flags(flags) +# define sti() local_irq_enable() +# define cli() local_irq_disable() +# define save_flags(flags) local_save_flags(flags) +# define restore_flags(flags) local_irq_restore(flags) #endif /* diff -rNu linux-bk/include/asm-ia64/system.h linux/include/asm-ia64/system.h --- linux-bk/include/asm-ia64/system.h Sun Jun 9 07:29:21 2002 +++ linux/include/asm-ia64/system.h Mon Jul 22 19:57:29 2002 @@ -169,12 +169,10 @@ #define local_irq_enable() __asm__ __volatile__ (";; ssm psr.i;; srlz.d" ::: "memory") -#define __cli() local_irq_disable () -#define __save_flags(flags) __asm__ __volatile__ ("mov %0=psr" : "=r" (flags) :: "memory") -#define __save_and_cli(flags) local_irq_save(flags) -#define save_and_cli(flags) __save_and_cli(flags) -#define __sti() local_irq_enable () -#define __restore_flags(flags) local_irq_restore(flags) +#define local_irq_disable() local_irq_disable () +#define local_save_flags(flags) __asm__ __volatile__ ("mov %0=psr" : "=r" (flags) :: "memory") +#define local_irq_save(flags) local_irq_save(flags) +#define save_and_cli(flags) local_irq_save(flags) #ifdef CONFIG_SMP extern void __global_cli (void); @@ -186,10 +184,10 @@ # define save_flags(flags) ((flags) = __global_save_flags()) # define restore_flags(flags) __global_restore_flags(flags) #else /* !CONFIG_SMP */ -# define cli() __cli() -# define sti() __sti() -# define save_flags(flags) __save_flags(flags) -# define restore_flags(flags) __restore_flags(flags) +# define cli() local_irq_disable() +# define sti() local_irq_enable() +# define save_flags(flags) local_save_flags(flags) +# define restore_flags(flags) local_irq_restore(flags) #endif /* !CONFIG_SMP */ /* diff -rNu linux-bk/include/asm-m68k/smplock.h linux/include/asm-m68k/smplock.h --- linux-bk/include/asm-m68k/smplock.h Sun Jun 9 07:28:28 2002 +++ linux/include/asm-m68k/smplock.h Mon Jul 22 19:55:38 2002 @@ -18,7 +18,7 @@ if (task->lock_depth >= 0) \ spin_unlock(&kernel_flag); \ release_irqlock(cpu); \ - __sti(); \ + local_irq_enable(); \ } while (0) /* diff -rNu linux-bk/include/asm-m68k/system.h linux/include/asm-m68k/system.h --- linux-bk/include/asm-m68k/system.h Sun Jun 9 07:27:44 2002 +++ linux/include/asm-m68k/system.h Mon Jul 22 19:57:41 2002 @@ -49,28 +49,25 @@ /* interrupt control.. */ #if 0 -#define __sti() asm volatile ("andiw %0,%%sr": : "i" (ALLOWINT) : "memory") +#define local_irq_enable() asm volatile ("andiw %0,%%sr": : "i" (ALLOWINT) : "memory") #else #include -#define __sti() ({ \ +#define local_irq_enable() ({ \ if (MACH_IS_Q40 || !local_irq_count(smp_processor_id())) \ asm volatile ("andiw %0,%%sr": : "i" (ALLOWINT) : "memory"); \ }) #endif -#define __cli() asm volatile ("oriw #0x0700,%%sr": : : "memory") -#define __save_flags(x) asm volatile ("movew %%sr,%0":"=d" (x) : : "memory") -#define __restore_flags(x) asm volatile ("movew %0,%%sr": :"d" (x) : "memory") +#define local_irq_disable() asm volatile ("oriw #0x0700,%%sr": : : "memory") +#define local_save_flags(x) asm volatile ("movew %%sr,%0":"=d" (x) : : "memory") +#define local_irq_restore(x) asm volatile ("movew %0,%%sr": :"d" (x) : "memory") /* For spinlocks etc */ -#define local_irq_save(x) ({ __save_flags(x); __cli(); }) -#define local_irq_restore(x) __restore_flags(x) -#define local_irq_disable() __cli() -#define local_irq_enable() __sti() +#define local_irq_save(x) ({ local_save_flags(x); local_irq_disable(); }) -#define cli() __cli() -#define sti() __sti() -#define save_flags(x) __save_flags(x) -#define restore_flags(x) __restore_flags(x) +#define cli() local_irq_disable() +#define sti() local_irq_enable() +#define save_flags(x) local_save_flags(x) +#define restore_flags(x) local_irq_restore(x) #define save_and_cli(flags) do { save_flags(flags); cli(); } while(0) /* diff -rNu linux-bk/include/asm-mips/bitops.h linux/include/asm-mips/bitops.h --- linux-bk/include/asm-mips/bitops.h Sun Jun 9 07:27:15 2002 +++ linux/include/asm-mips/bitops.h Mon Jul 22 19:55:39 2002 @@ -29,10 +29,10 @@ * that dares to use kernel include files alive. */ #define __bi_flags unsigned long flags -#define __bi_cli() __cli() -#define __bi_save_flags(x) __save_flags(x) -#define __bi_save_and_cli(x) __save_and_cli(x) -#define __bi_restore_flags(x) __restore_flags(x) +#define __bi_cli() local_irq_disable() +#define __bi_save_flags(x) local_save_flags(x) +#define __bi_save_and_cli(x) local_irq_save(x) +#define __bi_restore_flags(x) local_irq_restore(x) #else #define __bi_flags #define __bi_cli() diff -rNu linux-bk/include/asm-mips/smplock.h linux/include/asm-mips/smplock.h --- linux-bk/include/asm-mips/smplock.h Sun Jun 9 07:28:43 2002 +++ linux/include/asm-mips/smplock.h Mon Jul 22 19:55:39 2002 @@ -21,7 +21,7 @@ if (task->lock_depth >= 0) \ spin_unlock(&kernel_flag); \ release_irqlock(cpu); \ - __sti(); \ + local_irq_enable(); \ } while (0) /* diff -rNu linux-bk/include/asm-mips/system.h linux/include/asm-mips/system.h --- linux-bk/include/asm-mips/system.h Sun Jun 9 07:29:26 2002 +++ linux/include/asm-mips/system.h Mon Jul 22 19:57:52 2002 @@ -22,7 +22,7 @@ #include extern __inline__ void -__sti(void) +local_irq_enable(void) { __asm__ __volatile__( ".set\tpush\n\t" @@ -46,7 +46,7 @@ * no nops at all. */ extern __inline__ void -__cli(void) +local_irq_disable(void) { __asm__ __volatile__( ".set\tpush\n\t" @@ -66,7 +66,7 @@ : "$1", "memory"); } -#define __save_flags(x) \ +#define local_save_flags(x) \ __asm__ __volatile__( \ ".set\tpush\n\t" \ ".set\treorder\n\t" \ @@ -74,7 +74,7 @@ ".set\tpop\n\t" \ : "=r" (x)) -#define __save_and_cli(x) \ +#define local_irq_save(x) \ __asm__ __volatile__( \ ".set\tpush\n\t" \ ".set\treorder\n\t" \ @@ -92,12 +92,12 @@ : /* no inputs */ \ : "$1", "memory") -#define __restore_flags(flags) \ +#define local_irq_restore(flags) \ do { \ unsigned long __tmp1; \ \ __asm__ __volatile__( \ - ".set\tnoreorder\t\t\t# __restore_flags\n\t" \ + ".set\tnoreorder\t\t\t# local_irq_restore\n\t" \ ".set\tnoat\n\t" \ "mfc0\t$1, $12\n\t" \ "andi\t%0, 1\n\t" \ @@ -129,19 +129,13 @@ #else /* Single processor */ -# define sti() __sti() -# define cli() __cli() -# define save_flags(x) __save_flags(x) -# define save_and_cli(x) __save_and_cli(x) -# define restore_flags(x) __restore_flags(x) +# define sti() local_irq_enable() +# define cli() local_irq_disable() +# define save_flags(x) local_save_flags(x) +# define save_and_cli(x) local_irq_save(x) +# define restore_flags(x) local_irq_restore(x) #endif /* SMP */ - -/* For spinlocks etc */ -#define local_irq_save(x) __save_and_cli(x); -#define local_irq_restore(x) __restore_flags(x); -#define local_irq_disable() __cli(); -#define local_irq_enable() __sti(); /* * These are probably defined overly paranoid ... diff -rNu linux-bk/include/asm-mips64/smplock.h linux/include/asm-mips64/smplock.h --- linux-bk/include/asm-mips64/smplock.h Sun Jun 9 07:28:48 2002 +++ linux/include/asm-mips64/smplock.h Mon Jul 22 19:55:48 2002 @@ -22,7 +22,7 @@ if (task->lock_depth >= 0) spin_unlock(&kernel_flag); release_irqlock(cpu); - __sti(); + local_irq_enable(); } /* diff -rNu linux-bk/include/asm-mips64/system.h linux/include/asm-mips64/system.h --- linux-bk/include/asm-mips64/system.h Sun Jun 9 07:29:25 2002 +++ linux/include/asm-mips64/system.h Mon Jul 22 19:58:02 2002 @@ -16,7 +16,7 @@ #include extern __inline__ void -__sti(void) +local_irq_enable(void) { __asm__ __volatile__( ".set\tnoreorder\n\t" @@ -40,7 +40,7 @@ * no nops at all. */ extern __inline__ void -__cli(void) +local_irq_disable(void) { __asm__ __volatile__( ".set\tnoreorder\n\t" @@ -59,14 +59,14 @@ : "$1", "memory"); } -#define __save_flags(x) \ +#define local_save_flags(x) \ __asm__ __volatile__( \ ".set\tnoreorder\n\t" \ "mfc0\t%0,$12\n\t" \ ".set\treorder" \ : "=r" (x)) -#define __save_and_cli(x) \ +#define local_irq_save(x) \ __asm__ __volatile__( \ ".set\tnoreorder\n\t" \ ".set\tnoat\n\t" \ @@ -83,12 +83,12 @@ : /* no inputs */ \ : "$1", "memory") -#define __restore_flags(flags) \ +#define local_irq_restore(flags) \ do { \ unsigned long __tmp1; \ \ __asm__ __volatile__( \ - ".set\tnoreorder\t\t\t# __restore_flags\n\t" \ + ".set\tnoreorder\t\t\t# local_irq_restore\n\t" \ ".set\tnoat\n\t" \ "mfc0\t$1, $12\n\t" \ "andi\t%0, 1\n\t" \ @@ -120,19 +120,13 @@ #else -#define cli() __cli() -#define sti() __sti() -#define save_flags(x) __save_flags(x) -#define restore_flags(x) __restore_flags(x) -#define save_and_cli(x) __save_and_cli(x) +#define cli() local_irq_disable() +#define sti() local_irq_enable() +#define save_flags(x) local_save_flags(x) +#define restore_flags(x) local_irq_restore(x) +#define save_and_cli(x) local_irq_save(x) #endif /* CONFIG_SMP */ - -/* For spinlocks etc */ -#define local_irq_save(x) __save_and_cli(x); -#define local_irq_restore(x) __restore_flags(x); -#define local_irq_disable() __cli(); -#define local_irq_enable() __sti(); /* * These are probably defined overly paranoid ... diff -rNu linux-bk/include/asm-parisc/smplock.h linux/include/asm-parisc/smplock.h --- linux-bk/include/asm-parisc/smplock.h Sun Jun 9 07:26:52 2002 +++ linux/include/asm-parisc/smplock.h Mon Jul 22 19:55:40 2002 @@ -16,7 +16,7 @@ if (task->lock_depth >= 0) \ spin_unlock(&kernel_flag); \ release_irqlock(cpu); \ - __sti(); \ + local_irq_enable(); \ } while (0) /* diff -rNu linux-bk/include/asm-parisc/system.h linux/include/asm-parisc/system.h --- linux-bk/include/asm-parisc/system.h Sun Jun 9 07:26:52 2002 +++ linux/include/asm-parisc/system.h Mon Jul 22 19:58:16 2002 @@ -62,24 +62,22 @@ #endif /* interrupt control */ -#define __save_flags(x) __asm__ __volatile__("ssm 0, %0" : "=r" (x) : : "memory") -#define __restore_flags(x) __asm__ __volatile__("mtsm %0" : : "r" (x) : "memory") -#define __cli() __asm__ __volatile__("rsm %0,%%r0\n" : : "i" (PSW_I) : "memory" ) -#define __sti() __asm__ __volatile__("ssm %0,%%r0\n" : : "i" (PSW_I) : "memory" ) +#define local_save_flags(x) __asm__ __volatile__("ssm 0, %0" : "=r" (x) : : "memory") +#define local_irq_restore(x) __asm__ __volatile__("mtsm %0" : : "r" (x) : "memory") +#define local_irq_disable() __asm__ __volatile__("rsm %0,%%r0\n" : : "i" (PSW_I) : "memory" ) +#define local_irq_enable() __asm__ __volatile__("ssm %0,%%r0\n" : : "i" (PSW_I) : "memory" ) #define local_irq_save(x) \ __asm__ __volatile__("rsm %1,%0" : "=r" (x) :"i" (PSW_I) : "memory" ) #define local_irq_restore(x) \ __asm__ __volatile__("mtsm %0" : : "r" (x) : "memory" ) -#define local_irq_disable() __cli() -#define local_irq_enable() __sti() #ifdef CONFIG_SMP #else -#define cli() __cli() -#define sti() __sti() -#define save_flags(x) __save_flags(x) -#define restore_flags(x) __restore_flags(x) +#define cli() local_irq_disable() +#define sti() local_irq_enable() +#define save_flags(x) local_save_flags(x) +#define restore_flags(x) local_irq_restore(x) #endif diff -rNu linux-bk/include/asm-ppc/hw_irq.h linux/include/asm-ppc/hw_irq.h --- linux-bk/include/asm-ppc/hw_irq.h Sun Jun 9 07:30:52 2002 +++ linux/include/asm-ppc/hw_irq.h Mon Jul 22 19:55:33 2002 @@ -21,10 +21,10 @@ asm volatile("mfmsr %0" : "=r" (rval)); rval;}) #define mtmsr(v) asm volatile("mtmsr %0" : : "r" (v)) -#define __save_flags(flags) ((flags) = mfmsr()) -#define __restore_flags(flags) mtmsr(flags) +#define local_save_flags(flags) ((flags) = mfmsr()) +#define local_irq_restore(flags) mtmsr(flags) -static inline void __cli(void) +static inline void local_irq_disable(void) { unsigned long msr; msr = mfmsr(); @@ -32,7 +32,7 @@ __asm__ __volatile__("": : :"memory"); } -static inline void __sti(void) +static inline void local_irq_enable(void) { unsigned long msr; __asm__ __volatile__("": : :"memory"); @@ -49,18 +49,18 @@ __asm__ __volatile__("": : :"memory"); } -#define __save_and_cli(flags) __do_save_and_cli(&flags) +#define local_irq_save(flags) __do_save_and_cli(&flags) #else -extern void __sti(void); -extern void __cli(void); -extern void __restore_flags(unsigned long); -extern void __save_flags_ptr(unsigned long *); -extern unsigned long __sti_end, __cli_end, __restore_flags_end, __save_flags_ptr_end; +extern void local_irq_enable(void); +extern void local_irq_disable(void); +extern void local_irq_restore(unsigned long); +extern void local_save_flags_ptr(unsigned long *); +extern unsigned long local_irq_enable_end, local_irq_disable_end, local_irq_restore_end, local_save_flags_ptr_end; -#define __save_flags(flags) __save_flags_ptr((unsigned long *)&flags) -#define __save_and_cli(flags) ({__save_flags(flags);__cli();}) +#define local_save_flags(flags) local_save_flags_ptr((unsigned long *)&flags) +#define local_irq_save(flags) ({local_save_flags(flags);local_irq_disable();}) #endif diff -rNu linux-bk/include/asm-ppc/system.h linux/include/asm-ppc/system.h --- linux-bk/include/asm-ppc/system.h Mon Jul 22 19:22:27 2002 +++ linux/include/asm-ppc/system.h Mon Jul 22 19:58:22 2002 @@ -103,11 +103,11 @@ #ifndef CONFIG_SMP -#define cli() __cli() -#define sti() __sti() -#define save_flags(flags) __save_flags(flags) -#define restore_flags(flags) __restore_flags(flags) -#define save_and_cli(flags) __save_and_cli(flags) +#define cli() local_irq_disable() +#define sti() local_irq_enable() +#define save_flags(flags) local_save_flags(flags) +#define restore_flags(flags) local_irq_restore(flags) +#define save_and_cli(flags) local_irq_save(flags) #else /* CONFIG_SMP */ @@ -121,11 +121,6 @@ #define restore_flags(x) __global_restore_flags(x) #endif /* !CONFIG_SMP */ - -#define local_irq_disable() __cli() -#define local_irq_enable() __sti() -#define local_irq_save(flags) __save_and_cli(flags) -#define local_irq_restore(flags) __restore_flags(flags) static __inline__ unsigned long xchg_u32(volatile void *p, unsigned long val) diff -rNu linux-bk/include/asm-ppc64/hw_irq.h linux/include/asm-ppc64/hw_irq.h --- linux-bk/include/asm-ppc64/hw_irq.h Sun Jun 9 07:29:41 2002 +++ linux/include/asm-ppc64/hw_irq.h Mon Jul 22 19:55:26 2002 @@ -26,18 +26,18 @@ extern void __no_use_set_lost(unsigned long); extern void __no_lpq_restore_flags(unsigned long); -#define __cli() __no_use_cli() -#define __sti() __no_use_sti() -#define __save_flags(flags) ((flags) = __no_use_save_flags()) -#define __restore_flags(flags) __no_use_restore_flags((unsigned long)flags) -#define __save_and_cli(flags) ({__save_flags(flags);__cli();}) +#define local_irq_disable() __no_use_cli() +#define local_irq_enable() __no_use_sti() +#define local_save_flags(flags) ((flags) = __no_use_save_flags()) +#define local_irq_restore(flags) __no_use_restore_flags((unsigned long)flags) +#define local_irq_save(flags) ({local_save_flags(flags);local_irq_disable();}) #else -#define __save_flags(flags) ((flags) = mfmsr()) -#define __restore_flags(flags) __mtmsrd((flags), 1) +#define local_save_flags(flags) ((flags) = mfmsr()) +#define local_irq_restore(flags) __mtmsrd((flags), 1) -static inline void __cli(void) +static inline void local_irq_disable(void) { unsigned long msr; msr = mfmsr(); @@ -45,7 +45,7 @@ __asm__ __volatile__("": : :"memory"); } -static inline void __sti(void) +static inline void local_irq_enable(void) { unsigned long msr; __asm__ __volatile__("": : :"memory"); @@ -62,7 +62,7 @@ __asm__ __volatile__("": : :"memory"); } -#define __save_and_cli(flags) __do_save_and_cli(&flags) +#define local_irq_save(flags) __do_save_and_cli(&flags) #endif /* CONFIG_PPC_ISERIES */ diff -rNu linux-bk/include/asm-ppc64/system.h linux/include/asm-ppc64/system.h --- linux-bk/include/asm-ppc64/system.h Sun Jun 9 07:29:48 2002 +++ linux/include/asm-ppc64/system.h Mon Jul 22 19:58:27 2002 @@ -116,11 +116,11 @@ #ifndef CONFIG_SMP -#define cli() __cli() -#define sti() __sti() -#define save_flags(flags) __save_flags(flags) -#define restore_flags(flags) __restore_flags(flags) -#define save_and_cli(flags) __save_and_cli(flags) +#define cli() local_irq_disable() +#define sti() local_irq_enable() +#define save_flags(flags) local_save_flags(flags) +#define restore_flags(flags) local_irq_restore(flags) +#define save_and_cli(flags) local_irq_save(flags) #else /* CONFIG_SMP */ @@ -134,11 +134,6 @@ #define restore_flags(x) __global_restore_flags(x) #endif /* !CONFIG_SMP */ - -#define local_irq_disable() __cli() -#define local_irq_enable() __sti() -#define local_irq_save(flags) __save_and_cli(flags) -#define local_irq_restore(flags) __restore_flags(flags) static __inline__ int __is_processor(unsigned long pv) { diff -rNu linux-bk/include/asm-s390/smplock.h linux/include/asm-s390/smplock.h --- linux-bk/include/asm-s390/smplock.h Sun Jun 9 07:30:52 2002 +++ linux/include/asm-s390/smplock.h Mon Jul 22 19:55:41 2002 @@ -21,7 +21,7 @@ if (task->lock_depth >= 0) \ spin_unlock(&kernel_flag); \ release_irqlock(cpu); \ - __sti(); \ + local_irq_enable(); \ } while (0) /* diff -rNu linux-bk/include/asm-s390/system.h linux/include/asm-s390/system.h --- linux-bk/include/asm-s390/system.h Mon Jul 22 19:22:25 2002 +++ linux/include/asm-s390/system.h Mon Jul 22 19:58:44 2002 @@ -132,23 +132,23 @@ #define set_wmb(var, value) do { var = value; wmb(); } while (0) /* interrupt control.. */ -#define __sti() ({ \ +#define local_irq_enable() ({ \ __u8 __dummy; \ __asm__ __volatile__ ( \ "stosm 0(%0),0x03" : : "a" (&__dummy) : "memory"); \ }) -#define __cli() ({ \ +#define local_irq_disable() ({ \ __u32 __flags; \ __asm__ __volatile__ ( \ "stnsm 0(%0),0xFC" : : "a" (&__flags) : "memory"); \ __flags; \ }) -#define __save_flags(x) \ +#define local_save_flags(x) \ __asm__ __volatile__("stosm 0(%0),0" : : "a" (&x) : "memory") -#define __restore_flags(x) \ +#define local_irq_restore(x) \ __asm__ __volatile__("ssm 0(%0)" : : "a" (&x) : "memory") #define __load_psw(psw) \ @@ -211,10 +211,7 @@ }) /* For spinlocks etc */ -#define local_irq_save(x) ((x) = __cli()) -#define local_irq_restore(x) __restore_flags(x) -#define local_irq_disable() __cli() -#define local_irq_enable() __sti() +#define local_irq_save(x) ((x) = local_irq_disable()) #ifdef CONFIG_SMP @@ -235,10 +232,10 @@ #else -#define cli() __cli() -#define sti() __sti() -#define save_flags(x) __save_flags(x) -#define restore_flags(x) __restore_flags(x) +#define cli() local_irq_disable() +#define sti() local_irq_enable() +#define save_flags(x) local_save_flags(x) +#define restore_flags(x) local_irq_restore(x) #define ctl_set_bit(cr, bit) __ctl_set_bit(cr, bit) #define ctl_clear_bit(cr, bit) __ctl_clear_bit(cr, bit) diff -rNu linux-bk/include/asm-s390x/smplock.h linux/include/asm-s390x/smplock.h --- linux-bk/include/asm-s390x/smplock.h Sun Jun 9 07:28:49 2002 +++ linux/include/asm-s390x/smplock.h Mon Jul 22 19:55:33 2002 @@ -21,7 +21,7 @@ if (task->lock_depth >= 0) \ spin_unlock(&kernel_flag); \ release_irqlock(cpu); \ - __sti(); \ + local_irq_enable(); \ } while (0) /* diff -rNu linux-bk/include/asm-s390x/system.h linux/include/asm-s390x/system.h --- linux-bk/include/asm-s390x/system.h Mon Jul 22 19:22:25 2002 +++ linux/include/asm-s390x/system.h Mon Jul 22 19:58:49 2002 @@ -144,23 +144,23 @@ #define set_wmb(var, value) do { var = value; wmb(); } while (0) /* interrupt control.. */ -#define __sti() ({ \ +#define local_irq_enable() ({ \ unsigned long __dummy; \ __asm__ __volatile__ ( \ "stosm 0(%0),0x03" : : "a" (&__dummy) : "memory"); \ }) -#define __cli() ({ \ +#define local_irq_disable() ({ \ unsigned long __flags; \ __asm__ __volatile__ ( \ "stnsm 0(%0),0xFC" : : "a" (&__flags) : "memory"); \ __flags; \ }) -#define __save_flags(x) \ +#define local_save_flags(x) \ __asm__ __volatile__("stosm 0(%0),0" : : "a" (&x) : "memory") -#define __restore_flags(x) \ +#define local_irq_restore(x) \ __asm__ __volatile__("ssm 0(%0)" : : "a" (&x) : "memory") #define __load_psw(psw) \ @@ -221,10 +221,7 @@ }) /* For spinlocks etc */ -#define local_irq_save(x) ((x) = __cli()) -#define local_irq_restore(x) __restore_flags(x) -#define local_irq_disable() __cli() -#define local_irq_enable() __sti() +#define local_irq_save(x) ((x) = local_irq_disable()) #ifdef CONFIG_SMP @@ -245,10 +242,10 @@ #else -#define cli() __cli() -#define sti() __sti() -#define save_flags(x) __save_flags(x) -#define restore_flags(x) __restore_flags(x) +#define cli() local_irq_disable() +#define sti() local_irq_enable() +#define save_flags(x) local_save_flags(x) +#define restore_flags(x) local_irq_restore(x) #define ctl_set_bit(cr, bit) __ctl_set_bit(cr, bit) #define ctl_clear_bit(cr, bit) __ctl_clear_bit(cr, bit) diff -rNu linux-bk/include/asm-sh/system.h linux/include/asm-sh/system.h --- linux-bk/include/asm-sh/system.h Sun Jun 9 07:31:22 2002 +++ linux/include/asm-sh/system.h Mon Jul 22 19:58:58 2002 @@ -104,7 +104,7 @@ #define set_wmb(var, value) do { var = value; wmb(); } while (0) /* Interrupt Control */ -static __inline__ void __sti(void) +static __inline__ void local_irq_enable(void) { unsigned long __dummy0, __dummy1; @@ -118,7 +118,7 @@ : "memory"); } -static __inline__ void __cli(void) +static __inline__ void local_irq_disable(void) { unsigned long __dummy; __asm__ __volatile__("stc sr, %0\n\t" @@ -129,10 +129,10 @@ : "memory"); } -#define __save_flags(x) \ +#define local_save_flags(x) \ __asm__("stc sr, %0; and #0xf0, %0" : "=&z" (x) :/**/: "memory" ) -static __inline__ unsigned long __save_and_cli(void) +static __inline__ unsigned long local_irq_save(void) { unsigned long flags, __dummy; @@ -149,34 +149,34 @@ } #ifdef DEBUG_CLI_STI -static __inline__ void __restore_flags(unsigned long x) +static __inline__ void local_irq_restore(unsigned long x) { if ((x & 0x000000f0) != 0x000000f0) - __sti(); + local_irq_enable(); else { unsigned long flags; - __save_flags(flags); + local_save_flags(flags); if (flags == 0) { extern void dump_stack(void); printk(KERN_ERR "BUG!\n"); dump_stack(); - __cli(); + local_irq_disable(); } } } #else -#define __restore_flags(x) do { \ +#define local_irq_restore(x) do { \ if ((x & 0x000000f0) != 0x000000f0) \ - __sti(); \ + local_irq_enable(); \ } while (0) #endif #define really_restore_flags(x) do { \ if ((x & 0x000000f0) != 0x000000f0) \ - __sti(); \ + local_irq_enable(); \ else \ - __cli(); \ + local_irq_disable(); \ } while (0) /* @@ -216,10 +216,7 @@ } while (0) /* For spinlocks etc */ -#define local_irq_save(x) x = __save_and_cli() -#define local_irq_restore(x) __restore_flags(x) -#define local_irq_disable() __cli() -#define local_irq_enable() __sti() +#define local_irq_save(x) x = local_irq_save() #ifdef CONFIG_SMP @@ -234,11 +231,11 @@ #else -#define cli() __cli() -#define sti() __sti() -#define save_flags(x) __save_flags(x) -#define save_and_cli(x) x = __save_and_cli() -#define restore_flags(x) __restore_flags(x) +#define cli() local_irq_disable() +#define sti() local_irq_enable() +#define save_flags(x) local_save_flags(x) +#define save_and_cli(x) x = local_irq_save() +#define restore_flags(x) local_irq_restore(x) #endif diff -rNu linux-bk/include/asm-sparc/smplock.h linux/include/asm-sparc/smplock.h --- linux-bk/include/asm-sparc/smplock.h Sun Jun 9 07:30:03 2002 +++ linux/include/asm-sparc/smplock.h Mon Jul 22 19:55:46 2002 @@ -21,7 +21,7 @@ if (unlikely(task->lock_depth >= 0)) { \ spin_unlock(&kernel_flag); \ release_irqlock(cpu); \ - __sti(); \ + local_irq_enable(); \ } \ } while (0) diff -rNu linux-bk/include/asm-sparc/softirq.h linux/include/asm-sparc/softirq.h --- linux-bk/include/asm-sparc/softirq.h Sun Jun 9 07:26:52 2002 +++ linux/include/asm-sparc/softirq.h Mon Jul 22 19:55:45 2002 @@ -19,7 +19,7 @@ do { if (!--local_bh_count(smp_processor_id()) && \ softirq_pending(smp_processor_id())) { \ do_softirq(); \ - __sti(); \ + local_irq_enable(); \ } \ } while (0) #define in_softirq() (local_bh_count(smp_processor_id()) != 0) diff -rNu linux-bk/include/asm-sparc/spinlock.h linux/include/asm-sparc/spinlock.h --- linux-bk/include/asm-sparc/spinlock.h Sun Jun 9 07:31:12 2002 +++ linux/include/asm-sparc/spinlock.h Mon Jul 22 19:55:46 2002 @@ -58,30 +58,30 @@ #define read_lock(lock) \ do { unsigned long flags; \ - __save_and_cli(flags); \ + local_irq_save(flags); \ _do_read_lock(lock, "read_lock"); \ - __restore_flags(flags); \ + local_irq_restore(flags); \ } while(0) #define read_unlock(lock) \ do { unsigned long flags; \ - __save_and_cli(flags); \ + local_irq_save(flags); \ _do_read_unlock(lock, "read_unlock"); \ - __restore_flags(flags); \ + local_irq_restore(flags); \ } while(0) #define write_lock(lock) \ do { unsigned long flags; \ - __save_and_cli(flags); \ + local_irq_save(flags); \ _do_write_lock(lock, "write_lock"); \ - __restore_flags(flags); \ + local_irq_restore(flags); \ } while(0) #define write_unlock(lock) \ do { unsigned long flags; \ - __save_and_cli(flags); \ + local_irq_save(flags); \ _do_write_unlock(lock); \ - __restore_flags(flags); \ + local_irq_restore(flags); \ } while(0) #else /* !SPIN_LOCK_DEBUG */ @@ -180,9 +180,9 @@ #define read_lock(lock) \ do { unsigned long flags; \ - __save_and_cli(flags); \ + local_irq_save(flags); \ _read_lock(lock); \ - __restore_flags(flags); \ + local_irq_restore(flags); \ } while(0) extern __inline__ void _read_unlock(rwlock_t *rw) @@ -200,9 +200,9 @@ #define read_unlock(lock) \ do { unsigned long flags; \ - __save_and_cli(flags); \ + local_irq_save(flags); \ _read_unlock(lock); \ - __restore_flags(flags); \ + local_irq_restore(flags); \ } while(0) extern __inline__ void write_lock(rwlock_t *rw) diff -rNu linux-bk/include/asm-sparc/system.h linux/include/asm-sparc/system.h --- linux-bk/include/asm-sparc/system.h Sun Jun 9 07:30:54 2002 +++ linux/include/asm-sparc/system.h Mon Jul 22 19:59:05 2002 @@ -164,7 +164,7 @@ : "memory", "cc"); } -extern __inline__ void __cli(void) +extern __inline__ void local_irq_disable(void) { unsigned long tmp; @@ -179,7 +179,7 @@ : "memory"); } -extern __inline__ void __sti(void) +extern __inline__ void local_irq_enable(void) { unsigned long tmp; @@ -241,13 +241,9 @@ return retval; } -#define __save_flags(flags) ((flags) = getipl()) -#define __save_and_cli(flags) ((flags) = read_psr_and_cli()) -#define __restore_flags(flags) setipl((flags)) -#define local_irq_disable() __cli() -#define local_irq_enable() __sti() -#define local_irq_save(flags) __save_and_cli(flags) -#define local_irq_restore(flags) __restore_flags(flags) +#define local_save_flags(flags) ((flags) = getipl()) +#define local_irq_save(flags) ((flags) = read_psr_and_cli()) +#define local_irq_restore(flags) setipl((flags)) #ifdef CONFIG_SMP @@ -266,11 +262,11 @@ #else -#define cli() __cli() -#define sti() __sti() -#define save_flags(x) __save_flags(x) -#define restore_flags(x) __restore_flags(x) -#define save_and_cli(x) __save_and_cli(x) +#define cli() local_irq_disable() +#define sti() local_irq_enable() +#define save_flags(x) local_save_flags(x) +#define restore_flags(x) local_irq_restore(x) +#define save_and_cli(x) local_irq_save(x) #endif diff -rNu linux-bk/include/asm-sparc64/smplock.h linux/include/asm-sparc64/smplock.h --- linux-bk/include/asm-sparc64/smplock.h Sun Jun 9 07:31:22 2002 +++ linux/include/asm-sparc64/smplock.h Mon Jul 22 19:55:43 2002 @@ -29,7 +29,7 @@ if (unlikely(task->lock_depth >= 0)) { \ spin_unlock(&kernel_flag); \ release_irqlock(cpu); \ - __sti(); \ + local_irq_enable(); \ } \ } while (0) diff -rNu linux-bk/include/asm-sparc64/softirq.h linux/include/asm-sparc64/softirq.h --- linux-bk/include/asm-sparc64/softirq.h Sun Jun 9 07:31:31 2002 +++ linux/include/asm-sparc64/softirq.h Mon Jul 22 19:55:43 2002 @@ -16,7 +16,7 @@ do { if (!--local_bh_count(smp_processor_id()) && \ softirq_pending(smp_processor_id())) { \ do_softirq(); \ - __sti(); \ + local_irq_enable(); \ } \ preempt_enable(); \ } while (0) diff -rNu linux-bk/include/asm-sparc64/spinlock.h linux/include/asm-sparc64/spinlock.h --- linux-bk/include/asm-sparc64/spinlock.h Sun Jun 9 07:27:51 2002 +++ linux/include/asm-sparc64/spinlock.h Mon Jul 22 19:55:42 2002 @@ -140,30 +140,30 @@ #define _raw_read_lock(lock) \ do { unsigned long flags; \ - __save_and_cli(flags); \ + local_irq_save(flags); \ _do_read_lock(lock, "read_lock"); \ - __restore_flags(flags); \ + local_irq_restore(flags); \ } while(0) #define _raw_read_unlock(lock) \ do { unsigned long flags; \ - __save_and_cli(flags); \ + local_irq_save(flags); \ _do_read_unlock(lock, "read_unlock"); \ - __restore_flags(flags); \ + local_irq_restore(flags); \ } while(0) #define _raw_write_lock(lock) \ do { unsigned long flags; \ - __save_and_cli(flags); \ + local_irq_save(flags); \ _do_write_lock(lock, "write_lock"); \ - __restore_flags(flags); \ + local_irq_restore(flags); \ } while(0) #define _raw_write_unlock(lock) \ do { unsigned long flags; \ - __save_and_cli(flags); \ + local_irq_save(flags); \ _do_write_unlock(lock); \ - __restore_flags(flags); \ + local_irq_restore(flags); \ } while(0) #endif /* CONFIG_DEBUG_SPINLOCK */ diff -rNu linux-bk/include/asm-sparc64/system.h linux/include/asm-sparc64/system.h --- linux-bk/include/asm-sparc64/system.h Mon Jul 22 19:22:25 2002 +++ linux/include/asm-sparc64/system.h Mon Jul 22 19:59:15 2002 @@ -34,10 +34,10 @@ #define setipl(__new_ipl) \ __asm__ __volatile__("wrpr %0, %%pil" : : "r" (__new_ipl) : "memory") -#define __cli() \ +#define local_irq_disable() \ __asm__ __volatile__("wrpr 15, %%pil" : : : "memory") -#define __sti() \ +#define local_irq_enable() \ __asm__ __volatile__("wrpr 0, %%pil" : : : "memory") #define getipl() \ @@ -62,20 +62,16 @@ retval; \ }) -#define __save_flags(flags) ((flags) = getipl()) -#define __save_and_cli(flags) ((flags) = read_pil_and_cli()) -#define __restore_flags(flags) setipl((flags)) -#define local_irq_disable() __cli() -#define local_irq_enable() __sti() -#define local_irq_save(flags) __save_and_cli(flags) -#define local_irq_restore(flags) __restore_flags(flags) +#define local_save_flags(flags) ((flags) = getipl()) +#define local_irq_save(flags) ((flags) = read_pil_and_cli()) +#define local_irq_restore(flags) setipl((flags)) #ifndef CONFIG_SMP -#define cli() __cli() -#define sti() __sti() -#define save_flags(x) __save_flags(x) -#define restore_flags(x) __restore_flags(x) -#define save_and_cli(x) __save_and_cli(x) +#define cli() local_irq_disable() +#define sti() local_irq_enable() +#define save_flags(x) local_save_flags(x) +#define restore_flags(x) local_irq_restore(x) +#define save_and_cli(x) local_irq_save(x) #else #ifndef __ASSEMBLY__ @@ -150,7 +146,7 @@ do { spin_unlock(&(rq)->lock); \ flushw_all(); \ } while (0) -#define finish_arch_switch(rq) __sti() +#define finish_arch_switch(rq) local_irq_enable() #ifndef CONFIG_DEBUG_SPINLOCK #define CHECK_LOCKS(PREV) do { } while(0) diff -rNu linux-bk/include/asm-x86_64/system.h linux/include/asm-x86_64/system.h --- linux-bk/include/asm-x86_64/system.h Mon Jul 22 19:22:25 2002 +++ linux/include/asm-x86_64/system.h Mon Jul 22 19:59:33 2002 @@ -240,18 +240,16 @@ #define warn_if_not_ulong(x) do { unsigned long foo; (void) (&(x) == &foo); } while (0) /* interrupt control.. */ -#define __save_flags(x) do { warn_if_not_ulong(x); __asm__ __volatile__("# save_flags \n\t pushfq ; popq %q0":"=g" (x): /* no input */ :"memory"); } while (0) -#define __restore_flags(x) __asm__ __volatile__("# restore_flags \n\t pushq %0 ; popfq": /* no output */ :"g" (x):"memory", "cc") -#define __cli() __asm__ __volatile__("cli": : :"memory") -#define __sti() __asm__ __volatile__("sti": : :"memory") +#define local_save_flags(x) do { warn_if_not_ulong(x); __asm__ __volatile__("# save_flags \n\t pushfq ; popq %q0":"=g" (x): /* no input */ :"memory"); } while (0) +#define local_irq_restore(x) __asm__ __volatile__("# restore_flags \n\t pushq %0 ; popfq": /* no output */ :"g" (x):"memory", "cc") +#define local_irq_disable() __asm__ __volatile__("cli": : :"memory") +#define local_irq_enable() __asm__ __volatile__("sti": : :"memory") /* used in the idle loop; sti takes one instruction cycle to complete */ #define safe_halt() __asm__ __volatile__("sti; hlt": : :"memory") /* For spinlocks etc */ #define local_irq_save(x) do { warn_if_not_ulong(x); __asm__ __volatile__("# local_irq_save \n\t pushfq ; popq %0 ; cli":"=g" (x): /* no input */ :"memory"); } while (0) #define local_irq_restore(x) __asm__ __volatile__("# local_irq_restore \n\t pushq %0 ; popfq": /* no output */ :"g" (x):"memory") -#define local_irq_disable() __cli() -#define local_irq_enable() __sti() #ifdef CONFIG_SMP @@ -266,10 +264,10 @@ #else -#define cli() __cli() -#define sti() __sti() -#define save_flags(x) __save_flags(x) -#define restore_flags(x) __restore_flags(x) +#define cli() local_irq_disable() +#define sti() local_irq_enable() +#define save_flags(x) local_save_flags(x) +#define restore_flags(x) local_irq_restore(x) #endif diff -rNu linux-bk/include/linux/bio.h linux/include/linux/bio.h --- linux-bk/include/linux/bio.h Mon Jul 22 19:22:27 2002 +++ linux/include/linux/bio.h Mon Jul 22 19:55:24 2002 @@ -215,7 +215,7 @@ { unsigned long addr; - __save_flags(*flags); + local_save_flags(*flags); /* * could be low @@ -226,7 +226,7 @@ /* * it's a highmem page */ - __cli(); + local_irq_disable(); addr = (unsigned long) kmap_atomic(bio_page(bio), KM_BIO_SRC_IRQ); if (addr & ~PAGE_MASK) @@ -240,7 +240,7 @@ unsigned long ptr = (unsigned long) buffer & PAGE_MASK; kunmap_atomic((void *) ptr, KM_BIO_SRC_IRQ); - __restore_flags(*flags); + local_irq_restore(*flags); } #else diff -rNu linux-bk/init/main.c linux/init/main.c --- linux-bk/init/main.c Mon Jul 22 19:22:42 2002 +++ linux/init/main.c Mon Jul 22 19:56:16 2002 @@ -373,7 +373,7 @@ } kmem_cache_init(); - __sti(); + local_irq_enable(); calibrate_delay(); #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start && !initrd_below_start_ok && diff -rNu linux-bk/kernel/fork.c linux/kernel/fork.c --- linux-bk/kernel/fork.c Mon Jul 22 19:22:28 2002 +++ linux/kernel/fork.c Mon Jul 22 19:56:16 2002 @@ -740,8 +740,8 @@ * total amount of pending timeslices in the system doesnt change, * resulting in more scheduling fairness. */ - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); p->time_slice = (current->time_slice + 1) >> 1; current->time_slice >>= 1; if (!current->time_slice) { @@ -754,7 +754,7 @@ scheduler_tick(0, 0); } p->sleep_timestamp = jiffies; - __restore_flags(flags); + local_irq_restore(flags); /* * Ok, add it to the run-queues and make it diff -rNu linux-bk/kernel/panic.c linux/kernel/panic.c --- linux-bk/kernel/panic.c Mon Jul 22 19:22:42 2002 +++ linux/kernel/panic.c Mon Jul 22 19:56:16 2002 @@ -94,7 +94,7 @@ #if defined(CONFIG_ARCH_S390) disabled_wait(caller); #endif - __sti(); + local_irq_enable(); for(;;) { CHECK_EMERGENCY_SYNC } diff -rNu linux-bk/kernel/sched.c linux/kernel/sched.c --- linux-bk/kernel/sched.c Mon Jul 22 19:22:42 2002 +++ linux/kernel/sched.c Mon Jul 22 19:56:16 2002 @@ -427,11 +427,11 @@ */ void sched_exit(task_t * p) { - __cli(); + local_irq_disable(); current->time_slice += p->time_slice; if (unlikely(current->time_slice > MAX_TIMESLICE)) current->time_slice = MAX_TIMESLICE; - __sti(); + local_irq_enable(); /* * If the child was a (relative-) CPU hog then decrease * the sleep_avg of the parent as well. @@ -1680,8 +1680,8 @@ runqueue_t *idle_rq = cpu_rq(cpu), *rq = cpu_rq(task_cpu(idle)); unsigned long flags; - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); double_rq_lock(idle_rq, rq); idle_rq->curr = idle_rq->idle = idle; @@ -1692,7 +1692,7 @@ set_task_cpu(idle, cpu); double_rq_unlock(idle_rq, rq); set_tsk_need_resched(idle); - __restore_flags(flags); + local_irq_restore(flags); /* Set the preempt count _outside_ the spinlocks! */ #if CONFIG_PREEMPT diff -rNu linux-bk/sound/oss/esssolo1.c linux/sound/oss/esssolo1.c --- linux-bk/sound/oss/esssolo1.c Sun Jun 9 07:27:29 2002 +++ linux/sound/oss/esssolo1.c Mon Jul 22 19:56:01 2002 @@ -235,16 +235,16 @@ int i; unsigned long flags; - /* the __cli stunt is to send the data within the command window */ + /* the local_irq_disable stunt is to send the data within the command window */ for (i = 0; i < 0xffff; i++) { - __save_flags(flags); - __cli(); + local_save_flags(flags); + local_irq_disable(); if (!(inb(s->sbbase+0xc) & 0x80)) { outb(data, s->sbbase+0xc); - __restore_flags(flags); + local_irq_restore(flags); return; } - __restore_flags(flags); + local_irq_restore(flags); } printk(KERN_ERR "esssolo1: write_seq timeout\n"); outb(data, s->sbbase+0xc);