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_