Commit 9b4651a2 authored by James Simmons's avatar James Simmons

Merge http://linus.bkbits.net/linux-2.5

into maxwell.earthlink.net:/usr/src/linus-2.5
parents 8f681e54 1da3174f
No related merge requests found
......@@ -2,10 +2,10 @@
#### cli()/sti() removal guide, started by Ingo Molnar <mingo@redhat.com>
as of 2.5.28, four popular macros have been removed on SMP, and
as of 2.5.28, five popular macros have been removed on SMP, and
are being phased out on UP:
cli(), sti(), save_flags(flags), restore_flags(flags)
cli(), sti(), save_flags(flags), save_flags_cli(flags), restore_flags(flags)
until now it was possible to protect driver code against interrupt
handlers via a cli(), but from now on other, more lightweight methods
......@@ -86,25 +86,44 @@ the above code has a number of advantages:
cli() on the other hand was used by many drivers, and extended
the critical section to the whole IRQ handler function - creating
serious lock contention.
to make the transition easier, we've still kept the cli(), sti(),
save_flags() and restore_flags() macros defined on UP systems - but
their usage will be phased out until the 2.6 kernel is released.
save_flags(), save_flags_cli() and restore_flags() macros defined
on UP systems - but their usage will be phased out until 2.6 is
released.
drivers that want to disable local interrupts (interrupts on the
current CPU), can use the following four macros:
current CPU), can use the following five macros:
__cli(), __sti(), __save_flags(flags), __restore_flags(flags)
local_irq_disable(), local_irq_enable(), local_irq_save(flags),
local_irq_save_off(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).
that of the old cli(), sti(), save_flags(flags) and restore_flags(flags)
SMP meaning:
local_irq_disable() => turn local IRQs off
local_irq_enable() => turn local IRQs on
local_irq_save(flags) => save the current IRQ state into flags. The
state can be on or off. (on some
architectures there's even more bits in it.)
local_irq_save_off(flags) => save the current IRQ state into flags and
disable interrupts.
local_irq_restore(flags) => restore the IRQ state from flags.
(local_irq_save can save both irqs on and irqs off state, and
local_irq_restore can restore into both irqs on and irqs off state.)
another related change is that synchronize_irq() now takes a parameter:
synchronize_irq(irq). This change too has the purpose of making SMP
synchronization more lightweight - this way you can wait for your own
interrupt handler to finish, no need to wait for other IRQ sources.
to make the transition easier, we've still kept the cli(), sti(),
save_flags() and restore_flags() macros defined on UP systems - but
their usage will be phased out until the 2.6 kernel is released.
why were these changes done? The main reason was the architectural burden
......
......@@ -82,6 +82,13 @@ Note that you do not need to explicitly prevent preemption if you are holding
any locks or interrupts are disabled, since preemption is implicitly disabled
in those cases.
But keep in mind that 'irqs disabled' is a fundamentally unsafe way of
disabling preemption - any spin_unlock() decreasing the preemption count
to 0 might trigger a reschedule. A simple printk() might trigger a reschedule.
So use this implicit preemption-disabling property only if you know that the
affected codepath does not do any of this. Best policy is to use this only for
small, atomic code that you wrote and which calls no complex functions.
Example:
cpucache_t *cc; /* this is per-CPU */
......
......@@ -885,8 +885,8 @@ Usage Notes :
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
......
......@@ -131,7 +131,7 @@ conf_read(unsigned long addr, unsigned char type1)
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 @@ conf_read(unsigned long addr, unsigned char type1)
*(vuip)APECS_IOC_HAXR2 = haxr2 & ~1;
mb();
}
__restore_flags(flags);
local_irq_restore(flags);
return value;
}
......@@ -213,7 +213,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1)
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 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1)
*(vuip)APECS_IOC_HAXR2 = haxr2 & ~1;
mb();
}
__restore_flags(flags);
local_irq_restore(flags);
}
static int
......
......@@ -113,7 +113,7 @@ conf_read(unsigned long addr, unsigned char type1)
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 @@ conf_read(unsigned long addr, unsigned char type1)
*(vip)CIA_IOC_CFG;
}
__restore_flags(flags);
local_irq_restore(flags);
DBGC(("done\n"));
return value;
......@@ -167,7 +167,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1)
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 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1)
*(vip)CIA_IOC_CFG;
}
__restore_flags(flags);
local_irq_restore(flags);
DBGC(("done\n"));
}
......
......@@ -132,7 +132,7 @@ conf_read(unsigned long addr)
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 @@ conf_read(unsigned long addr)
value = 0xffffffff;
}
__restore_flags(flags);
local_irq_restore(flags);
return value;
}
......@@ -169,7 +169,7 @@ conf_write(unsigned long addr, unsigned int value)
{
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 @@ conf_write(unsigned long addr, unsigned int value)
/* Reset machine check. */
wrmces(0x7);
}
__restore_flags(flags);
local_irq_restore(flags);
}
static int
......
......@@ -97,7 +97,7 @@ conf_read(unsigned long addr, unsigned char type1,
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 @@ conf_read(unsigned long addr, unsigned char type1,
DBG_CFG(("conf_read(): finished\n"));
__restore_flags(flags);
local_irq_restore(flags);
return value;
}
......@@ -145,7 +145,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1,
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 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1,
mb();
DBG_CFG(("conf_write(): finished\n"));
__restore_flags(flags);
local_irq_restore(flags);
}
static int
......
......@@ -132,7 +132,7 @@ conf_read(unsigned long addr, unsigned char type1)
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 @@ conf_read(unsigned long addr, unsigned char type1)
}
DBG(("conf_read(): finished\n"));
__restore_flags(flags);
local_irq_restore(flags);
return value;
}
......@@ -194,7 +194,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1)
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 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1)
mb();
}
DBG(("conf_write(): finished\n"));
__restore_flags(flags);
local_irq_restore(flags);
}
static int
......
......@@ -85,9 +85,9 @@ handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
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 @@ handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
} while (action);
if (status & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
__cli();
local_irq_disable();
irq_exit(cpu, irq);
......
......@@ -85,9 +85,9 @@ wait_on_irq(int cpu, void *where)
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 @@ __global_sti(void)
if (!local_irq_count(cpu))
release_irqlock(cpu);
__sti();
local_irq_enable();
}
/*
......@@ -171,7 +171,7 @@ __global_save_flags(void)
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_restore_flags(unsigned long flags)
__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",
......
......@@ -28,11 +28,11 @@ ns87312_enable_ide(long ide_base)
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);
}
......@@ -88,7 +88,7 @@ common_shutdown_1(void *generic_ptr)
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
......
......@@ -2486,7 +2486,7 @@ void __init SMC669_Init ( int index )
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 @@ void __init SMC669_Init ( int index )
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
......
......@@ -243,7 +243,7 @@ int __init SMC93x_Init(void)
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 @@ int __init SMC93x_Init(void)
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;
}
......
......@@ -175,7 +175,7 @@ smp_callin(void)
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. */
......
......@@ -190,7 +190,7 @@ __do_irq(unsigned int irq, struct irqaction *action, struct pt_regs *regs)
spin_unlock(&irq_controller_lock);
if (!(action->flags & SA_INTERRUPT))
__sti();
local_irq_enable();
status = 0;
do {
......
......@@ -266,7 +266,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
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 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
} while (action);
if (do_random & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
__cli();
local_irq_disable();
}
irq_exit(cpu);
......
......@@ -185,10 +185,6 @@ choice 'High Memory Support' \
4GB CONFIG_HIGHMEM4G \
64GB CONFIG_HIGHMEM64G" off
if [ "$CONFIG_HIGHMEM4G" = "y" -o "$CONFIG_HIGHMEM64G" = "y" ]; then
bool 'Use high memory pte support' CONFIG_HIGHPTE
fi
if [ "$CONFIG_HIGHMEM4G" = "y" ]; then
define_bool CONFIG_HIGHMEM y
fi
......
......@@ -485,13 +485,13 @@ static void apic_pm_suspend(void *data)
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 @@ static void apic_pm_resume(void *data)
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 @@ static void apic_pm_resume(void *data)
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 @@ void setup_APIC_timer(void * data)
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 @@ void setup_APIC_timer(void * data)
printk("CPU%d<T0:%d,T1:%d,D:%d,S:%d,C:%d>\n", smp_processor_id(), t0, t1, delta, slice, clocks);
__restore_flags(flags);
local_irq_restore(flags);
}
/*
......@@ -935,7 +935,7 @@ void __init setup_APIC_clocks (void)
printk("Using local APIC timer interrupts.\n");
using_apic_timer = 1;
__cli();
local_irq_disable();
calibration_result = calibrate_APIC_clock();
/*
......@@ -943,7 +943,7 @@ void __init setup_APIC_clocks (void)
*/
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);
......@@ -1099,6 +1099,7 @@ asmlinkage void smp_spurious_interrupt(void)
{
unsigned long v;
irq_enter();
/*
* Check if this really is a spurious interrupt and ACK it
* if it is a vectored one. Just in case...
......@@ -1111,6 +1112,7 @@ asmlinkage void smp_spurious_interrupt(void)
/* see sw-dev-man vol 3, chapter 7.4.13.5 */
printk(KERN_INFO "spurious APIC interrupt on CPU#%d, should never happen.\n",
smp_processor_id());
irq_exit();
}
/*
......@@ -1121,6 +1123,7 @@ asmlinkage void smp_error_interrupt(void)
{
unsigned long v, v1;
irq_enter();
/* First tickle the hardware, only then report what went on. -- REW */
v = apic_read(APIC_ESR);
apic_write(APIC_ESR, 0);
......@@ -1140,6 +1143,7 @@ asmlinkage void smp_error_interrupt(void)
*/
printk (KERN_ERR "APIC error on CPU%d: %02lx(%02lx)\n",
smp_processor_id(), v , v1);
irq_exit();
}
/*
......
......@@ -514,9 +514,9 @@ static void apm_error(char *str, int err)
*/
#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 @@ static u8 apm_bios_call(u32 func, u32 ebx_in, u32 ecx_in,
APM_DECL_SEGS
unsigned long flags;
__save_flags(flags);
local_save_flags(flags);
APM_DO_CLI;
APM_DO_SAVE_SEGS;
/*
......@@ -590,7 +590,7 @@ static u8 apm_bios_call(u32 func, u32 ebx_in, u32 ecx_in,
: "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 @@ static u8 apm_bios_call_simple(u32 func, u32 ebx_in, u32 ecx_in, u32 *eax)
APM_DECL_SEGS
unsigned long flags;
__save_flags(flags);
local_save_flags(flags);
APM_DO_CLI;
APM_DO_SAVE_SEGS;
{
......@@ -638,7 +638,7 @@ static u8 apm_bios_call_simple(u32 func, u32 ebx_in, u32 ecx_in, u32 *eax)
: "memory", "cc");
}
APM_DO_RESTORE_SEGS;
__restore_flags(flags);
local_irq_restore(flags);
return error;
}
......
......@@ -10,12 +10,14 @@
#include <linux/config.h>
#include <linux/irq.h>
#include <linux/tqueue.h>
#include <asm/processor.h>
#include <asm/system.h>
#include <asm/msr.h>
#include <asm/apic.h>
#include <asm/pgtable.h>
#include <asm/tlbflush.h>
#include <asm/hardirq.h>
#ifdef CONFIG_X86_MCE
......@@ -74,7 +76,9 @@ static void (*vendor_thermal_interrupt)(struct pt_regs *regs) = unexpected_therm
asmlinkage void smp_thermal_interrupt(struct pt_regs regs)
{
irq_enter();
vendor_thermal_interrupt(&regs);
irq_exit();
}
/* P4/Xeon Thermal regulation detect and init */
......
......@@ -426,7 +426,7 @@ void __init cpu_init (void)
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);
......
......@@ -186,7 +186,6 @@ ENTRY(ret_from_fork)
# userspace resumption stub bypassing syscall exit tracing
ALIGN
ret_from_intr:
preempt_stop
ret_from_exception:
movl EFLAGS(%esp), %eax # mix EFLAGS and CS
movb CS(%esp), %al
......
......@@ -1219,7 +1219,7 @@ static int __init timer_irq_works(void)
{
unsigned int t1 = jiffies;
__sti();
local_irq_enable();
/* Let ten ticks pass... */
mdelay((10 * 1000) / HZ);
......
......@@ -204,7 +204,7 @@ int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction *
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 @@ int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction *
} while (action);
if (status & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
__cli();
local_irq_disable();
return status;
}
......
......@@ -381,7 +381,7 @@ static int arr3_protected;
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_cache_disable (struct set_mtrr_context *ctxt)
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 @@ static void set_mtrr_done (struct set_mtrr_context *ctxt)
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 @@ static void cyrix_get_arr (unsigned int reg, unsigned long *base,
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 @@ static void cyrix_get_arr (unsigned int reg, unsigned long *base,
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;
......
......@@ -78,7 +78,7 @@ int __init check_nmi_watchdog (void)
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++) {
......
......@@ -89,11 +89,11 @@ void enable_hlt(void)
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 @@ static void poll_idle (void)
{
int oldval;
__sti();
local_irq_enable();
/*
* Deal with another CPU just having chosen a thread to
......@@ -290,7 +290,7 @@ void machine_real_restart(unsigned char *code, int length)
{
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
......
......@@ -161,8 +161,8 @@ static inline void send_IPI_mask_bitmask(int mask, int vector)
unsigned long cfg;
unsigned long flags;
__save_flags(flags);
__cli();
local_save_flags(flags);
local_irq_disable();
/*
......@@ -186,7 +186,7 @@ static inline void send_IPI_mask_bitmask(int mask, int vector)
*/
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 @@ static inline void send_IPI_mask_sequence(int mask, int vector)
* 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 @@ static inline void send_IPI_mask_sequence(int mask, int vector)
apic_write_around(APIC_ICR, cfg);
}
}
__restore_flags(flags);
local_irq_restore(flags);
}
static inline void send_IPI_mask(int mask, int vector)
......@@ -387,7 +387,7 @@ asmlinkage void smp_invalidate_interrupt (void)
clear_bit(cpu, &flush_cpumask);
out:
put_cpu();
put_cpu_no_resched();
}
static void flush_tlb_others (unsigned long cpumask, struct mm_struct *mm,
......@@ -603,7 +603,7 @@ static void stop_this_cpu (void * dummy)
* 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 @@ void smp_send_stop(void)
{
smp_call_function(stop_this_cpu, NULL, 1, 0);
__cli();
local_irq_disable();
disable_local_APIC();
__sti();
local_irq_enable();
}
/*
......
......@@ -453,7 +453,7 @@ void __init smp_callin(void)
clear_local_APIC();
setup_local_APIC();
__sti();
local_irq_enable();
#ifdef CONFIG_MTRR
/*
......
......@@ -215,7 +215,7 @@ void iounmap(void *addr)
struct vm_struct *p;
if (addr <= high_memory)
return;
p = remove_kernel_area(PAGE_MASK & (unsigned long) addr);
p = remove_kernel_area((void *) (PAGE_MASK & (unsigned long) addr));
if (!p) {
printk("__iounmap: bad address %p\n", addr);
return;
......
......@@ -306,7 +306,7 @@ static struct pci_ops * __devinit pci_check_direct(void)
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 @@ static struct pci_ops * __devinit pci_check_direct(void)
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 @@ static struct pci_ops * __devinit pci_check_direct(void)
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 @@ static struct pci_ops * __devinit pci_check_direct(void)
}
}
__restore_flags(flags);
local_irq_restore(flags);
return NULL;
}
......
......@@ -82,7 +82,7 @@ static unsigned long bios32_service(unsigned long service)
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 @@ static unsigned long bios32_service(unsigned long service)
: "0" (service),
"1" (0),
"D" (&bios32_indirect));
__restore_flags(flags);
local_irq_restore(flags);
switch (return_code) {
case 0:
......@@ -122,7 +122,7 @@ static int __devinit check_pcibios(void)
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 @@ static int __devinit check_pcibios(void)
: "1" (PCIBIOS_PCI_BIOS_PRESENT),
"D" (&pci_indirect)
: "memory");
__restore_flags(flags);
local_irq_restore(flags);
status = (eax >> 8) & 0xff;
hw_mech = eax & 0xff;
......
......@@ -284,7 +284,7 @@ static void show(char * str)
# 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 @@ static inline void wait_on_irq(void)
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 @@ void __global_cli(void)
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 @@ void __global_sti(void)
{
if (!really_local_irq_count())
release_irqlock(smp_processor_id());
__sti();
local_irq_enable();
}
/*
......@@ -431,7 +431,7 @@ unsigned long __global_save_flags(void)
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 @@ void __global_restore_flags(unsigned long flags)
__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 @@ int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction *
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 @@ int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction *
} while (action);
if (status & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
__cli();
local_irq_disable();
local_irq_exit(irq);
......
......@@ -91,7 +91,7 @@ stop_this_cpu (void)
*/
clear_bit(smp_processor_id(), &cpu_online_map);
max_xtp();
__cli();
local_irq_disable();
cpu_halt();
}
......
......@@ -1025,7 +1025,7 @@ int_test() {
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);
......
......@@ -183,7 +183,7 @@ signed long sv_wait(sv_t *sv, int sv_wait_flags, unsigned long timeout)
#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 @@ void sv_signal(sv_t *sv)
#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 @@ void sv_broadcast(sv_t *sv)
#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 @@ static int interrupt_test_worker(void *unused)
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 @@ static int interrupt_test_worker(void *unused)
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);
......
......@@ -20,6 +20,7 @@
#include <linux/console.h>
#include <linux/rtc.h>
#include <linux/init.h>
#include <linux/vt_kern.h>
#ifdef CONFIG_ZORRO
#include <linux/zorro.h>
#endif
......@@ -110,9 +111,9 @@ static void amiga_heartbeat(int on);
#endif
static struct console amiga_console_driver = {
name: "debug",
flags: CON_PRINTBUFFER,
index: -1,
.name = "debug",
.flags = CON_PRINTBUFFER,
.index = -1,
};
#ifdef CONFIG_MAGIC_SYSRQ
......@@ -127,8 +128,6 @@ static char amiga_sysrq_xlate[128] =
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"; /* 0x70 - 0x7f */
#endif
extern void (*kd_mksound)(unsigned int, unsigned int);
/*
* Motherboard Resources present in all Amiga models
......@@ -137,10 +136,10 @@ extern void (*kd_mksound)(unsigned int, unsigned int);
static struct {
struct resource _ciab, _ciaa, _custom, _kickstart;
} mb_resources = {
_ciab: { "CIA B", 0x00bfd000, 0x00bfdfff },
_ciaa: { "CIA A", 0x00bfe000, 0x00bfefff },
_custom: { "Custom I/O", 0x00dff000, 0x00dfffff },
_kickstart: { "Kickstart ROM", 0x00f80000, 0x00ffffff }
._ciab = { "CIA B", 0x00bfd000, 0x00bfdfff },
._ciaa = { "CIA A", 0x00bfe000, 0x00bfefff },
._custom = { "Custom I/O", 0x00dff000, 0x00dfffff },
._kickstart = { "Kickstart ROM", 0x00f80000, 0x00ffffff }
};
static struct resource rtc_resource = {
......@@ -389,10 +388,11 @@ void __init config_amiga(void)
request_resource(&iomem_resource, &((struct resource *)&mb_resources)[i]);
mach_sched_init = amiga_sched_init;
#ifdef CONFIG_VT
mach_keyb_init = amiga_keyb_init;
mach_kbdrate = amiga_kbdrate;
mach_kbd_translate = amiga_kbd_translate;
SYSRQ_KEY = 0xff;
#endif
mach_init_IRQ = amiga_init_IRQ;
mach_default_handler = &amiga_default_handler;
mach_request_irq = amiga_request_irq;
......@@ -432,8 +432,11 @@ void __init config_amiga(void)
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp = &dummy_con;
#endif
#ifdef CONFIG_VT
kd_mksound = amiga_mksound;
#endif
#ifdef CONFIG_MAGIC_SYSRQ
SYSRQ_KEY = 0xff;
mach_sysrq_key = 0x5f; /* HELP */
mach_sysrq_shift_state = 0x03; /* SHIFT+ALTGR */
mach_sysrq_shift_mask = 0xff; /* all modifiers except CapsLock */
......
......@@ -5,6 +5,7 @@
#include <linux/tty.h>
#include <linux/console.h>
#include <linux/rtc.h>
#include <linux/vt_kern.h>
#include <asm/setup.h>
#include <asm/bootinfo.h>
......@@ -41,7 +42,6 @@ extern void dn_dummy_reset(void);
extern void dn_dummy_waitbut(void);
extern struct fb_info *dn_fb_init(long *);
extern void dn_dummy_debug_init(void);
extern void (*kd_mksound)(unsigned int, unsigned int);
extern void dn_dummy_video_setup(char *,int *);
extern void dn_process_int(int irq, struct pt_regs *fp);
#ifdef CONFIG_HEARTBEAT
......@@ -165,8 +165,10 @@ void config_apollo(void) {
dn_setup_model();
mach_sched_init=dn_sched_init; /* */
#ifdef CONFIG_VT
mach_keyb_init=dn_keyb_init;
mach_kbdrate=dn_dummy_kbdrate;
#endif
mach_init_IRQ=dn_init_IRQ;
mach_default_handler=NULL;
mach_request_irq = dn_request_irq;
......@@ -187,7 +189,9 @@ void config_apollo(void) {
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp = &dummy_con;
#endif
#ifdef CONFIG_VT
kd_mksound = dn_mksound;
#endif
#ifdef CONFIG_HEARTBEAT
mach_heartbeat = dn_heartbeat;
#endif
......
......@@ -2,6 +2,7 @@
#include <linux/kernel.h>
#include <linux/jiffies.h>
#include <linux/kernel_stat.h>
#include <linux/timer.h>
#include <asm/system.h>
#include <asm/irq.h>
......@@ -9,14 +10,10 @@
#include <asm/page.h>
#include <asm/machdep.h>
#include <asm/apollohw.h>
#include <asm/errno.h>
static irq_handler_t dn_irqs[16];
extern void write_keyb_cmd(u_short length, u_char *cmd);
static char BellOnCommand[] = { 0xFF, 0x21, 0x81 },
BellOffCommand[] = { 0xFF, 0x21, 0x82 };
extern void dn_serial_print (const char *str);
void dn_process_int(int irq, struct pt_regs *fp) {
......@@ -120,6 +117,11 @@ struct fb_info *dn_dummy_fb_init(long *mem_start) {
}
#ifdef CONFIG_VT
extern void write_keyb_cmd(u_short length, u_char *cmd);
static char BellOnCommand[] = { 0xFF, 0x21, 0x81 },
BellOffCommand[] = { 0xFF, 0x21, 0x82 };
static void dn_nosound (unsigned long ignored) {
write_keyb_cmd(sizeof(BellOffCommand),BellOffCommand);
......@@ -141,6 +143,8 @@ void dn_mksound( unsigned int count, unsigned int ticks ) {
else
write_keyb_cmd(sizeof(BellOffCommand),BellOffCommand);
}
#endif /* CONFIG_VT */
void dn_dummy_video_setup(char *options,int *ints) {
......
......@@ -11,10 +11,12 @@ O_TARGET := atari.o
export-objs := atari_ksyms.o
obj-y := config.o time.o debug.o atakeyb.o ataints.o stdma.o \
atasound.o joystick.o stram.o atari_ksyms.o
obj-y := config.o time.o debug.o ataints.o stdma.o \
atasound.o stram.o atari_ksyms.o
ifdef CONFIG_PCI
obj-$(CONFIG_VT) += atakeyb.o joystick.o
ifeq ($(CONFIG_PCI),y)
obj-$(CONFIG_HADES) += hades-pci.o
endif
......
......@@ -622,22 +622,22 @@ int show_atari_interrupts(struct seq_file *p, void *v)
if (vectors[IRQ_SOURCE_TO_VECTOR(i)] == bad_interrupt)
continue;
if (i < STMFP_SOURCE_BASE)
seq_printf(p,, "auto %2d: %10u ",
seq_printf(p, "auto %2d: %10u ",
i, kstat.irqs[0][i]);
else
seq_printf(p,, "vec $%02x: %10u ",
seq_printf(p, "vec $%02x: %10u ",
IRQ_SOURCE_TO_VECTOR(i),
kstat.irqs[0][i]);
if (irq_handler[i].handler != atari_call_irq_list) {
seq_printf(p,, "%s\n", irq_param[i].devname);
seq_printf(p, "%s\n", irq_param[i].devname);
}
else {
irq_node_t *p;
for( p = (irq_node_t *)irq_handler[i].dev_id; p; p = p->next ) {
seq_printf(p,, "%s\n", p->devname);
if (p->next)
seq_puts(p,, " " );
irq_node_t *n;
for( n = (irq_node_t *)irq_handler[i].dev_id; n; n = n->next ) {
seq_printf(p, "%s\n", n->devname);
if (n->next)
seq_puts(p, " " );
}
}
}
......
......@@ -31,6 +31,7 @@
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/vt_kern.h>
#include <asm/bootinfo.h>
#include <asm/setup.h>
......@@ -100,7 +101,6 @@ static char atari_sysrq_xlate[128] =
"0.\r\000\000\000\000\000\000\000\000\000\000\000\000\000"; /* 0x70 - 0x7f */
#endif
extern void (*kd_mksound)(unsigned int, unsigned int);
/* I've moved hwreg_present() and hwreg_present_bywrite() out into
* mm/hwtest.c, to avoid having multiple copies of the same routine
......@@ -254,13 +254,12 @@ void __init config_atari(void)
to 4GB. */
mach_sched_init = atari_sched_init;
#ifdef CONFIG_VT
mach_keyb_init = atari_keyb_init;
mach_kbdrate = atari_kbdrate;
mach_kbd_translate = atari_kbd_translate;
#ifdef CONFIG_MAGIC_SYSRQ
SYSRQ_KEY = 0xff;
#endif
mach_kbd_leds = atari_kbd_leds;
#endif
mach_init_IRQ = atari_init_IRQ;
mach_request_irq = atari_request_irq;
mach_free_irq = atari_free_irq;
......@@ -278,8 +277,11 @@ void __init config_atari(void)
conswitchp = &dummy_con;
#endif
mach_max_dma_address = 0xffffff;
#ifdef CONFIG_VT
kd_mksound = atari_mksound;
#endif
#ifdef CONFIG_MAGIC_SYSRQ
SYSRQ_KEY = 0xff;
mach_sysrq_key = 98; /* HELP */
mach_sysrq_shift_state = 8; /* Alt */
mach_sysrq_shift_mask = 0xff; /* all modifiers except CapsLock */
......
......@@ -31,9 +31,9 @@ int atari_SCC_init_done = 0;
int atari_SCC_reset_done = 0;
static struct console atari_console_driver = {
name: "debug",
flags: CON_PRINTBUFFER,
index: -1,
.name = "debug",
.flags = CON_PRINTBUFFER,
.index = -1,
};
......
......@@ -334,12 +334,12 @@ static void __init hades_conf_device(unsigned char bus, unsigned char device_fn)
}
static struct pci_ops hades_pci_ops = {
read_byte: hades_read_config_byte
read_word: hades_read_config_word
read_dword: hades_read_config_dword
write_byte: hades_write_config_byte
write_word: hades_write_config_word
write_dword: hades_write_config_dword
.read_byte = hades_read_config_byte,
.read_word = hades_read_config_word,
.read_dword = hades_read_config_dword,
.write_byte = hades_write_config_byte,
.write_word = hades_write_config_word,
.write_dword = hades_write_config_dword
};
/*
......
......@@ -22,8 +22,8 @@
#define MAJOR_NR JOYSTICK_MAJOR
#define ANALOG_JOY(n) (!(n & 0x80))
#define DIGITAL_JOY(n) (n & 0x80)
#define DEVICE_NR(n) (MINOR(n) & 0x7f)
#define DIGITAL_JOY(n) (minor(n) & 0x80)
#define DEVICE_NR(n) (minor(n) & 0x7f)
static struct joystick_status joystick[2];
......@@ -120,11 +120,11 @@ static unsigned int joystick_poll(struct file *file, poll_table *wait)
}
struct file_operations atari_joystick_fops = {
read: read_joystick,
write: write_joystick,
poll: joystick_poll,
open: open_joystick,
release: release_joystick,
.read = read_joystick,
.write = write_joystick,
.poll = joystick_poll,
.open = open_joystick,
.release = release_joystick,
};
int __init atari_joystick_init(void)
......
......@@ -1044,8 +1044,8 @@ static int stram_release( struct inode *inode, struct file *filp )
static struct block_device_operations stram_fops = {
open: stram_open,
release: stram_release,
.open = stram_open,
.release = stram_release,
};
int __init stram_device_init(void)
......
......@@ -22,6 +22,7 @@
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/major.h>
#include <linux/genhd.h>
#include <linux/rtc.h>
#include <asm/bootinfo.h>
......@@ -132,8 +133,10 @@ void __init config_bvme6000(void)
mach_max_dma_address = 0xffffffff;
mach_sched_init = bvme6000_sched_init;
#ifdef CONFIG_VT
mach_keyb_init = bvme6000_keyb_init;
mach_kbdrate = bvme6000_kbdrate;
#endif
mach_init_IRQ = bvme6000_init_IRQ;
mach_gettimeoffset = bvme6000_gettimeoffset;
mach_hwclk = bvme6000_hwclk;
......
......@@ -161,9 +161,9 @@ static int rtc_release(struct inode *inode, struct file *file)
*/
static struct file_operations rtc_fops = {
ioctl: rtc_ioctl,
open: rtc_open,
release: rtc_release,
.ioctl = rtc_ioctl,
.open = rtc_open,
.release = rtc_release,
};
static struct miscdevice rtc_dev=
......
......@@ -374,11 +374,9 @@ if [ "$CONFIG_SERIAL_EXTENDED" = "y" ]; then
bool ' Support the Bell Technologies HUB6 card' CONFIG_HUB6
fi
if [ "$CONFIG_VME" = "n" ]; then
define_bool CONFIG_VT y
if [ "$CONFIG_VT" = "y" ]; then
bool 'Support for console on virtual terminal' CONFIG_VT_CONSOLE
fi
bool 'Virtual terminal' CONFIG_VT
if [ "$CONFIG_VT" = "y" ]; then
bool 'Support for console on virtual terminal' CONFIG_VT_CONSOLE
fi
if [ "$CONFIG_ATARI" = "y" ]; then
......@@ -391,7 +389,7 @@ if [ "$CONFIG_AMIGA" = "y" ]; then
define_bool CONFIG_BUSMOUSE y
fi
fi
if [ "$CONFIG_ATARI" = "y" ]; then
if [ "$CONFIG_ATARI" = "y" -a "$CONFIG_VT" = "y" ]; then
tristate 'Atari mouse support' CONFIG_ATARIMOUSE
if [ "$CONFIG_ATARIMOUSE" != "n" ]; then
define_bool CONFIG_BUSMOUSE y
......@@ -413,16 +411,16 @@ if [ "$CONFIG_AMIGA" = "y" ]; then
if [ "$CONFIG_AMIGA_PCMCIA" = "y" ]; then
tristate 'Hisoft Whippet PCMCIA serial support' CONFIG_WHIPPET_SERIAL
fi
tristate 'Multiface Card III serial support' CONFIG_MULTIFACE_III_TTY
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'Commodore A2232 serial support (EXPERIMENTAL)' CONFIG_A2232
fi
fi
if [ "$CONFIG_PARPORT" = "n" ]; then
if [ "$CONFIG_ZORRO" = "y" ]; then
tristate 'GVP IO-Extender support' CONFIG_GVPIOEXT
dep_tristate ' GVP IO-Extender parallel printer support' CONFIG_GVPIOEXT_LP $CONFIG_GVPIOEXT
dep_tristate ' GVP IO-Extender PLIP support' CONFIG_GVPIOEXT_PLIP $CONFIG_GVPIOEXT
tristate 'Multiface Card III serial support' CONFIG_MULTIFACE_III_TTY
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'Commodore A2232 serial support (EXPERIMENTAL)' CONFIG_A2232
fi
fi
fi
if [ "$CONFIG_MAC" = "y" ]; then
......@@ -465,21 +463,7 @@ else
define_bool CONFIG_SUN_MOUSE n
define_bool CONFIG_SBUS n
fi
if [ "$CONFIG_AMIGA" = "y" -o "$CONFIG_ATARI" = "y" -o \
"$CONFIG_MAC" = "y" -o "$CONFIG_HP300" = "y" -o \
"$CONFIG_SUN3" = "y" -o "$CONFIG_SUN3X" = "y" ]; then
if [ "$CONFIG_ATARI_MFPSER" = "y" -o "$CONFIG_ATARI_SCC" = "y" -o \
"$CONFIG_ATARI_MIDI" = "y" -o "$CONFIG_MAC_SCC" = "y" -o \
"$CONFIG_AMIGA_BUILTIN_SERIAL" = "y" -o \
"$CONFIG_GVPIOEXT" = "y" -o "$CONFIG_MULTIFACE_III_TTY" = "y" -o \
"$CONFIG_HPDCA" = "y" -o "$CONFIG_SUN3X_ZS" = "y" -o \
"$CONFIG_SERIAL" = "y" ]; then
bool 'Support for serial port console' CONFIG_SERIAL_CONSOLE
fi
fi
if [ "$CONFIG_VME" = "y" ]; then
define_bool CONFIG_SERIAL_CONSOLE y
if [ "$CONFIG_MVME147" = "y" ]; then
bool 'SCC support for MVME147 serial ports' CONFIG_MVME147_SCC
fi
......@@ -493,10 +477,24 @@ if [ "$CONFIG_VME" = "y" ]; then
fi
if [ "$CONFIG_APOLLO" = "y" ]; then
bool 'Support for DN serial port (dummy)' CONFIG_DN_SERIAL
bool 'Support for serial port console' CONFIG_SERIAL_CONSOLE
define_tristate CONFIG_SERIAL $CONFIG_DN_SERIAL
fi
if [ "$CONFIG_AMIGA" = "y" -o "$CONFIG_ATARI" = "y" -o \
"$CONFIG_MAC" = "y" -o "$CONFIG_HP300" = "y" -o \
"$CONFIG_SUN3" = "y" -o "$CONFIG_SUN3X" = "y" -o \
"$CONFIG_VME" = "y" -o "$CONFIG_APOLLO" = "y" ]; then
if [ "$CONFIG_ATARI_MFPSER" = "y" -o "$CONFIG_ATARI_SCC" = "y" -o \
"$CONFIG_ATARI_MIDI" = "y" -o "$CONFIG_MAC_SCC" = "y" -o \
"$CONFIG_AMIGA_BUILTIN_SERIAL" = "y" -o \
"$CONFIG_GVPIOEXT" = "y" -o "$CONFIG_MULTIFACE_III_TTY" = "y" -o \
"$CONFIG_HPDCA" = "y" -o "$CONFIG_SUN3X_ZS" = "y" -o \
"$CONFIG_SERIAL" = "y" -o "$CONFIG_MVME147_SCC" = "y" -o \
"$CONFIG_SERIAL167" = "y" -o "$CONFIG_MVME162_SCC" = "y" -o \
"$CONFIG_BVME6000_SCC" = "y" -o "$CONFIG_DN_SERIAL" = "y" ]; then
bool 'Support for serial port console' CONFIG_SERIAL_CONSOLE
fi
fi
bool 'Support for user serial device modules' CONFIG_USERIAL
bool 'Watchdog Timer Support' CONFIG_WATCHDOG
if [ "$CONFIG_WATCHDOG" != "n" ]; then
......@@ -530,7 +528,7 @@ endmenu
source fs/Config.in
if [ "$CONFIG_VME" = "n" ]; then
if [ "$CONFIG_VT" = "y" ]; then
mainmenu_option next_comment
comment 'Console drivers'
source drivers/video/Config.in
......
......@@ -381,9 +381,9 @@ fpsp_done:
.Lnotkern:
SAVE_ALL_INT
GET_CURRENT(%d0)
tstl %curptr@(TASK_NEEDRESCHED)
tstb %curptr@(TASK_NEEDRESCHED)
jne ret_from_exception | deliver signals,
| reschedule etc..
| reschedule etc..
RESTORE_ALL
|
......
......@@ -29,10 +29,9 @@ extern int show_hp300_interrupts(struct seq_file *, void *);
#ifdef CONFIG_VT
extern int hp300_keyb_init(void);
#else
/* Dummy function for when there is no keyboard. */
int __init hp300_keyb_init(void)
static int hp300_kbdrate(struct kbd_repeat *k)
{
return 0;
}
#endif
......@@ -46,15 +45,6 @@ static void hp300_pulse(int x)
}
#endif
static int hp300_kbdrate(struct kbd_repeat *k)
{
return 0;
}
static void hp300_kbd_leds(unsigned int leds)
{
}
static void hp300_get_model(char *model)
{
strcpy(model, "HP9000/300");
......@@ -63,9 +53,10 @@ static void hp300_get_model(char *model)
void __init config_hp300(void)
{
mach_sched_init = hp300_sched_init;
#ifdef CONFIG_VT
mach_keyb_init = hp300_keyb_init;
mach_kbdrate = hp300_kbdrate;
mach_kbd_leds = hp300_kbd_leds;
#endif
mach_init_IRQ = hp300_init_IRQ;
mach_request_irq = hp300_request_irq;
mach_free_irq = hp300_free_irq;
......
......@@ -22,6 +22,7 @@
#include <asm/system.h>
#include <asm/traps.h>
#include <asm/ptrace.h>
#include <asm/errno.h>
#include "ints.h"
/* Each ipl has a linked list of interrupt service routines.
......@@ -142,7 +143,9 @@ void hp300_free_irq(unsigned int irq, void *dev_id)
}
/* remove the entry after t: */
t->next->flags = IRQ_FLG_STD;
t->next->dev_id = t->next->devname = t->next->handler = NULL;
t->next->dev_id = NULL;
t->next->devname = NULL;
t->next->handler = NULL;
t->next = t->next->next;
spin_unlock_irqrestore(&irqlist_lock, flags);
......
......@@ -75,7 +75,7 @@ _060_isp_done:
.Lnotkern:
SAVE_ALL_INT
GET_CURRENT(%d0)
tstl %curptr@(TASK_NEEDRESCHED)
tstb %curptr@(TASK_NEEDRESCHED)
jne ret_from_exception | deliver signals,
| reschedule etc..
RESTORE_ALL
......
......@@ -68,21 +68,11 @@ ENTRY(trap)
addql #4,%sp
jra ret_from_exception
ENTRY(reschedule)
| save top of frame
movel %sp,%curptr@(TASK_THREAD+THREAD_ESP0)
pea ret_from_exception
jmp schedule
| After a fork we jump here directly from resume,
| so that %d1 contains the previous task
| Theoretically only needed on SMP, but let's watch
| what happens in schedule_tail() in future...
| schedule_tail is only used with CONFIG_SMP
ENTRY(ret_from_fork)
movel %d1,%sp@-
#ifdef CONFIG_SMP
jsr schedule_tail
addql #4,%sp
#endif
jra ret_from_exception
badsys:
......@@ -128,38 +118,54 @@ ENTRY(system_call)
| save top of frame
movel %sp,%curptr@(TASK_THREAD+THREAD_ESP0)
btst #PT_TRACESYS_BIT,%curptr@(TASK_PTRACE+PT_TRACESYS_OFF)
tstb %curptr@(TASK_SYSCALL_TRACE)
jne do_trace
cmpl #NR_syscalls,%d0
jcc badsys
jbsr @(sys_call_table,%d0:l:4)@(0)
movel %d0,%sp@(PT_D0) | save the return value
|oriw #0x0700,%sr
movel %curptr@(TASK_WORK),%d0
jne syscall_exit_work
1: RESTORE_ALL
syscall_exit_work:
btst #5,%sp@(PT_SR) | check if returning to kernel
bnes 1b | if so, skip resched, signals
tstw %d0
jeq do_signal_return
tstb %d0
jne do_delayed_trace
pea resume_userspace
jmp schedule
ret_from_exception:
btst #5,%sp@(PT_SR) | check if returning to kernel
bnes 2f | if so, skip resched, signals
bnes 1f | if so, skip resched, signals
| only allow interrupts when we are really the last one on the
| kernel stack, otherwise stack overflow can occur during
| heavy interrupt load
andw #ALLOWINT,%sr
tstl %curptr@(TASK_NEEDRESCHED)
jne reschedule
#if 0
cmpl #task,%curptr | task[0] cannot have signals
jeq 2f
#endif
| check for delayed trace
bclr #PT_DTRACE_BIT,%curptr@(TASK_PTRACE+PT_DTRACE_OFF)
jne do_delayed_trace
5:
tstl %curptr@(TASK_STATE) | state
jne reschedule
tstl %curptr@(TASK_SIGPENDING)
jne Lsignal_return
2: RESTORE_ALL
resume_userspace:
movel %curptr@(TASK_WORK),%d0
lsrl #8,%d0
jne exit_work
1: RESTORE_ALL
exit_work:
| save top of frame
movel %sp,%curptr@(TASK_THREAD+THREAD_ESP0)
tstb %d0
jeq do_signal_return
Lsignal_return:
pea resume_userspace
jmp schedule
do_signal_return:
|andw #ALLOWINT,%sr
subql #4,%sp | dummy return address
SAVE_SWITCH_STACK
pea %sp@(SWITCH_STACK_SIZE)
......@@ -168,7 +174,7 @@ Lsignal_return:
addql #8,%sp
RESTORE_SWITCH_STACK
addql #4,%sp
RESTORE_ALL
jbra resume_userspace
do_delayed_trace:
bclr #7,%sp@(PT_SR) | clear trace bit in SR
......@@ -178,13 +184,13 @@ do_delayed_trace:
jbsr send_sig
addql #8,%sp
addql #4,%sp
jra 5b
jbra resume_userspace
#if 0
#if CONFIG_AMIGA
ami_inthandler:
addql #1,irq_stat+8 | local_irq_count
addql #1,irq_stat+CPUSTAT_LOCAL_IRQ_COUNT
SAVE_ALL_INT
GET_CURRENT(%d0)
......@@ -216,14 +222,14 @@ ENTRY(nmi_handler)
inthandler:
SAVE_ALL_INT
GET_CURRENT(%d0)
addql #1,irq_stat+8 | local_irq_count
addql #1,irq_stat+CPUSTAT_LOCAL_IRQ_COUNT
| put exception # in d0
bfextu %sp@(PT_VECTOR){#4,#10},%d0
movel %sp,%sp@-
movel %d0,%sp@- | put vector # on stack
#if defined(MACH_Q40_ONLY) && defined(CONFIG_BLK_DEV_FD)
btstb #4,0xff000000 | Q40 floppy needs very special treatment ...
btstb #4,0xff000000 | Q40 floppy needs very special treatment ...
jbeq 1f
btstb #3,0xff000004
jbeq 1f
......@@ -231,11 +237,11 @@ inthandler:
jbra 3f
1:
#endif
jbsr process_int| process the IRQ
jbsr process_int | process the IRQ
3: addql #8,%sp | pop parameters off stack
ret_from_interrupt:
subql #1,irq_stat+8 | local_irq_count
subql #1,irq_stat+CPUSTAT_LOCAL_IRQ_COUNT
jeq 1f
2:
RESTORE_ALL
......@@ -248,11 +254,8 @@ ret_from_interrupt:
jhi 2b
#endif
/* check if we need to do software interrupts */
movel irq_stat,%d0 | softirq_active
andl irq_stat+4,%d0 | softirq_mask
tstl irq_stat+CPUSTAT_SOFTIRQ_PENDING
jeq ret_from_exception
pea ret_from_exception
jra do_softirq
......@@ -460,7 +463,7 @@ sys_call_table:
.long sys_ni_syscall /* old gtty syscall holder */
.long sys_access
.long sys_nice
.long sys_ni_syscall /* 35 */ /* old ftime syscall holder */
.long sys_ni_syscall /* 35 */ /* old ftime syscall holder */
.long sys_sync
.long sys_kill
.long sys_rename
......@@ -477,7 +480,7 @@ sys_call_table:
.long sys_geteuid16
.long sys_getegid16 /* 50 */
.long sys_acct
.long sys_umount /* recycled never used phys() */
.long sys_umount /* recycled never used phys() */
.long sys_ni_syscall /* old lock syscall holder */
.long sys_ioctl
.long sys_fcntl /* 55 */
......@@ -535,10 +538,10 @@ sys_call_table:
.long sys_newlstat
.long sys_newfstat
.long sys_ni_syscall
.long sys_ni_syscall /* iopl for i386 */ /* 110 */
.long sys_ni_syscall /* 110 */ /* iopl for i386 */
.long sys_vhangup
.long sys_ni_syscall /* obsolete idle() syscall */
.long sys_ni_syscall /* vm86old for i386 */
.long sys_ni_syscall /* obsolete idle() syscall */
.long sys_ni_syscall /* vm86old for i386 */
.long sys_wait4
.long sys_swapoff /* 115 */
.long sys_sysinfo
......@@ -548,7 +551,7 @@ sys_call_table:
.long sys_clone /* 120 */
.long sys_setdomainname
.long sys_newuname
.long sys_cacheflush /* modify_ldt for i386 */
.long sys_cacheflush /* modify_ldt for i386 */
.long sys_adjtimex
.long sys_mprotect /* 125 */
.long sys_sigprocmask
......@@ -562,7 +565,7 @@ sys_call_table:
.long sys_bdflush
.long sys_sysfs /* 135 */
.long sys_personality
.long sys_ni_syscall /* for afs_syscall */
.long sys_ni_syscall /* for afs_syscall */
.long sys_setfsuid16
.long sys_setfsgid16
.long sys_llseek /* 140 */
......@@ -580,7 +583,7 @@ sys_call_table:
.long sys_mlockall
.long sys_munlockall
.long sys_sched_setparam
.long sys_sched_getparam /* 155 */
.long sys_sched_getparam /* 155 */
.long sys_sched_setscheduler
.long sys_sched_getscheduler
.long sys_sched_yield
......@@ -613,8 +616,8 @@ sys_call_table:
.long sys_capset /* 185 */
.long sys_sigaltstack
.long sys_sendfile
.long sys_ni_syscall /* streams1 */
.long sys_ni_syscall /* streams2 */
.long sys_ni_syscall /* streams1 */
.long sys_ni_syscall /* streams2 */
.long sys_vfork /* 190 */
.long sys_getrlimit
.long sys_mmap2
......@@ -642,12 +645,25 @@ sys_call_table:
.long sys_setgid
.long sys_setfsuid /* 215 */
.long sys_setfsgid
.long sys_ni_syscall
.long sys_pivot_root
.long sys_ni_syscall
.long sys_ni_syscall
.long sys_getdents64 /* 220 */
.long sys_gettid
.long sys_tkill
.long sys_setxattr
.long sys_lsetxattr
.long sys_fsetxattr /* 225 */
.long sys_getxattr
.long sys_lgetxattr
.long sys_fgetxattr
.long sys_listxattr
.long sys_llistxattr /* 230 */
.long sys_flistxattr
.long sys_removexattr
.long sys_lremovexattr
.long sys_fremovexattr
.long sys_futex /* 235 */
.rept NR_syscalls-(.-sys_call_table)/4
.long sys_ni_syscall
......
......@@ -312,6 +312,9 @@
#ifdef CONFIG_Q40
.globl q40_mem_cptr
#endif
#ifdef CONFIG_HP300
.globl hp300_phys_ram_base
#endif
CPUTYPE_040 = 1 /* indicates an 040 */
CPUTYPE_060 = 2 /* indicates an 060 */
......@@ -596,6 +599,64 @@ ENTRY(_start)
__INIT
ENTRY(__start)
#ifdef CONFIG_HP300
/* This is a hack. The HP NetBSD bootloader loads us at an arbitrary
address (apparently 0xff002000 in practice) which is not good if we need
to be able to map this to VA 0x1000. We could do it with pagetables but
a better solution seems to be to relocate the kernel in physical memory
before we start.
So, we copy the entire kernel image (code+data+bss) down to the 16MB
boundary that marks the start of RAM. This is slightly tricky because
we must not overwrite the copying code itself. :-) */
/* 15/5/98. The start address of physical RAM changes depending on how much
RAM is present. This is actually a blessing in disguise as it provides
a way for us to work out the RAM size rather than hardwiring it. */
lea %pc@(_start),%a0
movel %a0,%d6
and #0xffff0000, %d6
lea %pc@(hp300_phys_ram_base),%a0
movel %d6, %a0@
movel %pc@(L(custom)),%a3
moveb #0xfe,%d7
moveb %d7,%a3@(0x1ffff)
lea %pc@(Lcopystart),%a0
lea %pc@(Lcopyend),%a1
movel %d6,%a2 /* Start of physical RAM */
1: moveb %a0@+,%d0
moveb %d0,%a2@+
cmpl %a0,%a1
jbne 1b
movel %d6,%a2
moveb #0xfd,%d7
moveb %d7,%a3@(0x1ffff)
lea %pc@(_stext),%a0
lea %pc@(_end),%a1
jmp %a2@
Lcopystart:
moveb #0xf7,%d7
moveb %d7,%a3@(0x1ffff)
movel %d6,%a2 /* Start of kernel */
add #0x1000,%a2
1: moveb %a0@+,%d0
moveb %d0,%a2@+
cmpl %a0,%a1
jbne 1b
moveb #0,%d7
moveb %d7,%a3@(0x1ffff)
movel %d6,%a0
addl #Lstart1,%a0
jmp %a0@
Lcopyend:
Lstart1:
moveb #0x3f,%d7
moveb %d7,%a3@(0x1ffff)
#endif /* CONFIG_HP300 */
/*
* Setup initial stack pointer
*/
......@@ -605,6 +666,7 @@ ENTRY(__start)
* Record the CPU and machine type.
*/
#ifndef CONFIG_HP300
get_bi_record BI_MACHTYPE
lea %pc@(m68k_machtype),%a1
movel %a0@,%a1@
......@@ -620,6 +682,23 @@ ENTRY(__start)
get_bi_record BI_CPUTYPE
lea %pc@(m68k_cputype),%a1
movel %a0@,%a1@
#else /* CONFIG_HP300 */
/* FIXME HP300 doesn't use bootinfo yet */
movel #MACH_HP300,%d4
lea %pc@(m68k_machtype),%a0
movel %d4,%a0@
movel #FPU_68881,%d0
lea %pc@(m68k_fputype),%a0
movel %d0,%a0@
movel #MMU_68030,%d0
lea %pc@(m68k_mmutype),%a0
movel %d0,%a0@
movel #CPU_68030,%d0
lea %pc@(m68k_cputype),%a0
movel %d0,%a0@
leds(0x1)
#endif /* CONFIG_HP300 */
#ifdef CONFIG_MAC
/*
......@@ -893,6 +972,9 @@ L(nocon):
putc '\n'
putc 'A'
#ifdef CONFIG_HP300
leds(0x2)
#endif /* CONFIG_HP300 */
dputn %pc@(L(cputype))
dputn %pc@(m68k_supervisor_cachemode)
dputn %pc@(m68k_pgtable_cachemode)
......@@ -1461,8 +1543,8 @@ L(cache_done):
/*
* Setup initial stack pointer
*/
lea init_task_union,%curptr
lea 0x2000(%curptr),%sp
lea init_task,%curptr
lea init_thread_union+THREAD_SIZE,%sp
putc 'K'
......@@ -1490,6 +1572,7 @@ func_start get_bi_record,%d1
movel ARG1,%d0
lea %pc@(_end),%a0
#ifndef CONFIG_HP300
1: tstw %a0@(BIR_TAG)
jeq 3f
cmpw %a0@(BIR_TAG),%d0
......@@ -1503,6 +1586,7 @@ func_start get_bi_record,%d1
3: moveq #-1,%d0
lea %a0@(BIR_SIZE),%a0
4:
#endif /* CONFIG_HP300 */
func_return get_bi_record
......@@ -3270,14 +3354,16 @@ console_clear_loop:
/* Calculate font size */
#if defined(FONT_8x8)
lea %pc@(font_vga_8x8), %a0
#elif defined(FONT_8x16)
#if defined(FONT_8x8) && defined(CONFIG_FONT_8x8)
lea %pc@(font_vga_8x8),%a0
#elif defined(FONT_8x16) && defined(CONFIG_FONT_8x16)
lea %pc@(font_vga_8x16),%a0
#elif defined(FONT_6x11)
#elif defined(FONT_6x11) && defined(CONFIG_FONT_6x11)
lea %pc@(font_vga_6x11),%a0
#else /* (FONT_8x8) default */
lea %pc@(font_vga_8x8), %a0
#elif defined(CONFIG_FONT_8x8) /* default */
lea %pc@(font_vga_8x8),%a0
#else /* no compiled-in font */
lea 0,%a0
#endif
/*
......@@ -3286,6 +3372,8 @@ console_clear_loop:
*/
lea %pc@(L(console_font)),%a1
movel %a0,%a1@ /* store pointer to struct fbcon_font_desc in Lconsole_font */
tstl %a0
jeq 1f
/*
* Calculate global maxs
......@@ -3313,7 +3401,7 @@ console_clear_loop:
/*
* Initialization is complete
*/
moveml %sp@+,%a0-%a4/%d0-%d7
1: moveml %sp@+,%a0-%a4/%d0-%d7
rts
L(console_put_stats):
......@@ -3399,6 +3487,8 @@ console_scroll:
lea %pc@(L(mac_rowbytes)),%a0
movel %a0@,%d5
movel %pc@(L(console_font)),%a0
tstl %a0
jeq 1f
mulul %a0@(FBCON_FONT_DESC_HEIGHT),%d5 /* account for # scan lines per character */
addal %d5,%a2
......@@ -3453,13 +3543,15 @@ console_scroll_clear_loop:
movel %d0,%a1@+
dbra %d6,console_scroll_clear_loop
moveml %sp@+,%a0-%a4/%d0-%d7
1: moveml %sp@+,%a0-%a4/%d0-%d7
rts
func_start console_putc,%a0/%a1/%d0-%d7
is_not_mac(console_exit)
tstl %pc@(L(console_font))
jeq console_exit
/* Output character in d7 on console.
*/
......@@ -3731,7 +3823,12 @@ L(showtest):
__INITDATA
.align 4
#if defined(CONFIG_ATARI) || defined(CONFIG_AMIGA) || defined(CONFIG_HP300)
#ifdef CONFIG_HP300
hp300_phys_ram_base:
#endif
#if defined(CONFIG_ATARI) || defined(CONFIG_AMIGA) || \
defined(CONFIG_HP300) || defined(CONFIG_APOLLO)
L(custom):
L(iobase):
.long 0
......@@ -3822,8 +3919,6 @@ L(mac_sccbase):
LSRB0 = 0x10412
LTHRB0 = 0x10416
LCPUCTRL = 0x10100
L(iobase):
.long 0
#endif
__FINIT
......
......@@ -25,8 +25,11 @@ int main(void)
DEFINE(TASK_STATE, offsetof(struct task_struct, state));
DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
#error DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, work.sigpending));
#error DEFINE(TASK_NEEDRESCHED, offsetof(struct task_struct, work.need_resched));
DEFINE(TASK_WORK, offsetof(struct task_struct, thread.work));
DEFINE(TASK_NEEDRESCHED, offsetof(struct task_struct, thread.work.need_resched));
DEFINE(TASK_SYSCALL_TRACE, offsetof(struct task_struct, thread.work.syscall_trace));
DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, thread.work.sigpending));
DEFINE(TASK_NOTIFY_RESUME, offsetof(struct task_struct, thread.work.notify_resume));
DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
DEFINE(TASK_MM, offsetof(struct task_struct, mm));
DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
......@@ -66,6 +69,12 @@ int main(void)
/* offsets into the kernel_stat struct */
DEFINE(STAT_IRQ, offsetof(struct kernel_stat, irqs));
/* offsets into the irq_cpustat_t struct */
DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t, __softirq_pending));
DEFINE(CPUSTAT_LOCAL_IRQ_COUNT, offsetof(irq_cpustat_t, __local_irq_count));
DEFINE(CPUSTAT_LOCAL_BH_COUNT, offsetof(irq_cpustat_t, __local_bh_count));
DEFINE(CPUSTAT_SYSCALL_COUNT, offsetof(irq_cpustat_t, __syscall_count));
/* offsets into the bi_record struct */
DEFINE(BIR_TAG, offsetof(struct bi_record, tag));
DEFINE(BIR_SIZE, offsetof(struct bi_record, size));
......
......@@ -24,6 +24,7 @@
#include <linux/user.h>
#include <linux/a.out.h>
#include <linux/reboot.h>
#include <linux/init_task.h>
#include <asm/uaccess.h>
#include <asm/system.h>
......@@ -33,7 +34,7 @@
#include <asm/pgtable.h>
/*
* Initial task structure. Make this a per-architecture thing,
* Initial task/thread structure. Make this a per-architecture thing,
* because different architectures tend to have different
* alignment requirements and potentially different initial
* setup.
......@@ -43,13 +44,33 @@ static struct files_struct init_files = INIT_FILES;
static struct signal_struct init_signals = INIT_SIGNALS;
struct mm_struct init_mm = INIT_MM(init_mm);
union task_union init_task_union
__attribute__((section("init_task"), aligned(THREAD_SIZE)))
= { task: INIT_TASK(init_task_union.task) };
union thread_union init_thread_union
__attribute__((section(".data.init_task"), aligned(THREAD_SIZE)))
= { INIT_THREAD_INFO(init_task) };
/* initial task structure */
struct task_struct init_task = INIT_TASK(init_task);
asmlinkage void ret_from_fork(void);
/*
* Return saved PC from a blocked thread
*/
unsigned long thread_saved_pc(struct task_struct *tsk)
{
extern void scheduling_functions_start_here(void);
extern void scheduling_functions_end_here(void);
struct switch_stack *sw = (struct switch_stack *)tsk->thread.ksp;
/* Check whether the thread is blocked in resume() */
if (sw->retpc > (unsigned long)scheduling_functions_start_here &&
sw->retpc < (unsigned long)scheduling_functions_end_here)
return ((unsigned long *)sw->a6)[1];
else
return sw->retpc;
}
/*
* The idle loop on an m68k..
*/
......@@ -133,23 +154,26 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
register long retval __asm__ ("d0");
register long clone_arg __asm__ ("d1") = flags | CLONE_VM;
retval = __NR_clone;
__asm__ __volatile__
("clrl %%d2\n\t"
"trap #0\n\t" /* Linux/m68k system call */
"tstl %0\n\t" /* child or parent */
"jne 1f\n\t" /* parent - jump */
"lea %%sp@(%c7),%6\n\t" /* reload current */
"movel %6@,%6\n\t"
"movel %3,%%sp@-\n\t" /* push argument */
"jsr %4@\n\t" /* call fn */
"movel %0,%%d1\n\t" /* pass exit value */
"movel %2,%0\n\t" /* exit */
"movel %2,%%d0\n\t" /* exit */
"trap #0\n"
"1:"
: "=d" (retval)
: "0" (__NR_clone), "i" (__NR_exit),
: "+d" (retval)
: "i" (__NR_clone), "i" (__NR_exit),
"r" (arg), "a" (fn), "d" (clone_arg), "r" (current),
"i" (-THREAD_SIZE)
: "d0", "d2");
: "d2");
pid = retval;
}
......@@ -366,7 +390,7 @@ unsigned long get_wchan(struct task_struct *p)
if (!p || p == current || p->state == TASK_RUNNING)
return 0;
stack_page = (unsigned long)p;
stack_page = (unsigned long)(p->thread_info);
fp = ((struct switch_stack *)p->thread.ksp)->a6;
do {
if (fp < stack_page+sizeof(struct task_struct) ||
......
......@@ -98,12 +98,13 @@ void ptrace_disable(struct task_struct *child)
/* make sure the single step bit is not set. */
tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16);
put_reg(child, PT_SR, tmp);
child->thread.work.delayed_trace = 0;
child->thread.work.syscall_trace = 0;
}
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
unsigned long flags;
int ret;
lock_kernel();
......@@ -243,14 +244,16 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
ret = -EIO;
if ((unsigned long) data > _NSIG)
break;
if (request == PTRACE_SYSCALL)
child->ptrace |= PT_TRACESYS;
else
child->ptrace &= ~PT_TRACESYS;
if (request == PTRACE_SYSCALL) {
child->thread.work.syscall_trace = ~0;
} else {
child->thread.work.syscall_trace = 0;
}
child->exit_code = data;
/* make sure the single step bit is not set. */
tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16);
put_reg(child, PT_SR, tmp);
child->thread.work.delayed_trace = 0;
wake_up_process(child);
ret = 0;
break;
......@@ -271,6 +274,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
/* make sure the single step bit is not set. */
tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16);
put_reg(child, PT_SR, tmp);
child->thread.work.delayed_trace = 0;
wake_up_process(child);
break;
}
......@@ -281,9 +285,10 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
ret = -EIO;
if ((unsigned long) data > _NSIG)
break;
child->ptrace &= ~PT_TRACESYS;
child->thread.work.syscall_trace = 0;
tmp = get_reg(child, PT_SR) | (TRACE_BITS << 16);
put_reg(child, PT_SR, tmp);
child->thread.work.delayed_trace = 1;
child->exit_code = data;
/* give it a chance to run. */
......@@ -354,7 +359,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
break;
}
out_tsk:
free_task_struct(child);
put_task_struct(child);
out:
unlock_kernel();
return ret;
......@@ -362,8 +367,8 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
asmlinkage void syscall_trace(void)
{
if ((current->ptrace & (PT_PTRACED|PT_TRACESYS))
!= (PT_PTRACED|PT_TRACESYS))
if (!current->thread.work.delayed_trace &&
!current->thread.work.syscall_trace)
return;
current->exit_code = SIGTRAP;
current->state = TASK_STOPPED;
......
......@@ -34,6 +34,7 @@
#endif
#ifdef CONFIG_ATARI
#include <asm/atarihw.h>
#include <asm/atari_stram.h>
#endif
#ifdef CONFIG_SUN3X
#include <asm/dvma.h>
......@@ -71,11 +72,12 @@ char m68k_debug_device[6] = "";
void (*mach_sched_init) (void (*handler)(int, void *, struct pt_regs *)) __initdata = NULL;
/* machine dependent keyboard functions */
#ifdef CONFIG_VT
int (*mach_keyb_init) (void) __initdata = NULL;
int (*mach_kbdrate) (struct kbd_repeat *) = NULL;
void (*mach_kbd_leds) (unsigned int) = NULL;
int (*mach_kbd_translate)(unsigned char scancode, unsigned char *keycode, char raw_mode) = NULL;
unsigned int SYSRQ_KEY;
#endif
/* machine dependent irq functions */
void (*mach_init_IRQ) (void) __initdata = NULL;
void (*(*mach_default_handler)[]) (int, void *, struct pt_regs *) = NULL;
......@@ -103,13 +105,14 @@ void (*mach_l2_flush) (int) = NULL;
#endif
#ifdef CONFIG_MAGIC_SYSRQ
unsigned int SYSRQ_KEY;
int mach_sysrq_key = -1;
int mach_sysrq_shift_state = 0;
int mach_sysrq_shift_mask = 0;
char *mach_sysrq_xlate = NULL;
#endif
#if defined(CONFIG_ISA)
#if defined(CONFIG_ISA) && defined(MULTI_ISA)
int isa_type;
int isa_sex;
#endif
......@@ -217,8 +220,20 @@ void __init setup_arch(char **cmdline_p)
int i;
char *p, *q;
/* The bootinfo is located right after the kernel bss */
m68k_parse_bootinfo((const struct bi_record *)&_end);
if (!MACH_IS_HP300) {
/* The bootinfo is located right after the kernel bss */
m68k_parse_bootinfo((const struct bi_record *)&_end);
} else {
/* FIXME HP300 doesn't use bootinfo yet */
extern unsigned long hp300_phys_ram_base;
unsigned long hp300_mem_size = 0xffffffff-hp300_phys_ram_base;
m68k_cputype = CPU_68030;
m68k_fputype = FPU_68882;
m68k_memory[0].addr = hp300_phys_ram_base;
/* 0.5M fudge factor */
m68k_memory[0].size = hp300_mem_size-512*1024;
m68k_num_memory++;
}
if (CPU_IS_040)
m68k_is040or060 = 4;
......@@ -371,7 +386,7 @@ void __init setup_arch(char **cmdline_p)
#ifdef CONFIG_ATARI
if (MACH_IS_ATARI)
atari_stram_reserve_pages(availmem);
atari_stram_reserve_pages((void *)availmem);
#endif
#ifdef CONFIG_SUN3X
if (MACH_IS_SUN3X) {
......@@ -387,7 +402,7 @@ void __init setup_arch(char **cmdline_p)
paging_init();
/* set ISA defs early as possible */
#if defined(CONFIG_ISA)
#if defined(CONFIG_ISA) && defined(MULTI_ISA)
#if defined(CONFIG_Q40)
if (MACH_IS_Q40) {
isa_type = Q40_ISA;
......@@ -494,10 +509,10 @@ static void c_stop(struct seq_file *m, void *v)
{
}
struct seq_operations cpuinfo_op = {
start: c_start,
next: c_next,
stop: c_stop,
show: show_cpuinfo,
.start = c_start,
.next = c_next,
.stop = c_stop,
.show = show_cpuinfo,
};
int get_hardware_list(char *buffer)
......@@ -513,7 +528,6 @@ int get_hardware_list(char *buffer)
strcpy(model, "Unknown m68k");
len += sprintf(buffer+len, "Model:\t\t%s\n", model);
len += get_cpuinfo(buffer+len);
for (mem = 0, i = 0; i < m68k_num_memory; i++)
mem += m68k_memory[i].size;
len += sprintf(buffer+len, "System Memory:\t%ldK\n", mem>>10);
......
......@@ -792,10 +792,10 @@ static void setup_frame (int sig, struct k_sigaction *ka,
regs->stkadj = fsize;
}
err |= __put_user((current->exec_domain
&& current->exec_domain->signal_invmap
err |= __put_user((current_thread_info()->exec_domain
&& current_thread_info()->exec_domain->signal_invmap
&& sig < 32
? current->exec_domain->signal_invmap[sig]
? current_thread_info()->exec_domain->signal_invmap[sig]
: sig),
&frame->sig);
......@@ -870,10 +870,10 @@ static void setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info,
regs->stkadj = fsize;
}
err |= __put_user((current->exec_domain
&& current->exec_domain->signal_invmap
err |= __put_user((current_thread_info()->exec_domain
&& current_thread_info()->exec_domain->signal_invmap
&& sig < 32
? current->exec_domain->signal_invmap[sig]
? current_thread_info()->exec_domain->signal_invmap[sig]
: sig),
&frame->sig);
err |= __put_user(&frame->info, &frame->pinfo);
......
......@@ -224,7 +224,7 @@ static inline void access_error060 (struct frame *fp)
unsigned long addr = fp->un.fmt4.effaddr;
if (fslw & MMU060_MA)
addr = (addr + 7) & -8;
addr = (addr + PAGE_SIZE - 1) & PAGE_MASK;
errorcode = 1;
if (fslw & MMU060_DESC_ERR) {
......@@ -258,16 +258,12 @@ static inline unsigned long probe040(int iswrite, unsigned long addr, int wbs)
set_fs(MAKE_MM_SEG(wbs));
asm volatile (".chip 68040");
if (iswrite)
asm volatile ("ptestw (%0)" : : "a" (addr));
asm volatile (".chip 68040; ptestw (%0); .chip 68k" : : "a" (addr));
else
asm volatile ("ptestr (%0)" : : "a" (addr));
asm volatile (".chip 68040; ptestr (%0); .chip 68k" : : "a" (addr));
asm volatile ("movec %%mmusr,%0" : "=r" (mmusr));
asm volatile (".chip 68k");
asm volatile (".chip 68040; movec %%mmusr,%0; .chip 68k" : "=r" (mmusr));
set_fs(old_fs);
......@@ -455,6 +451,7 @@ extern inline void bus_error030 (struct frame *fp)
unsigned char buserr_type = sun3_get_buserr ();
unsigned long addr, errorcode;
unsigned short ssw = fp->un.fmtb.ssw;
extern unsigned long _sun3_map_test_start, _sun3_map_test_end;
#if DEBUG
if (ssw & (FC | FB))
......@@ -494,6 +491,13 @@ extern inline void bus_error030 (struct frame *fp)
printk ("Instruction fault at %#010lx\n",
fp->ptregs.pc);
if (ssw & DF) {
/* was this fault incurred testing bus mappings? */
if((fp->ptregs.pc >= (unsigned long)&_sun3_map_test_start) &&
(fp->ptregs.pc <= (unsigned long)&_sun3_map_test_end)) {
send_fault_sig(&fp->ptregs);
return;
}
printk ("Data %s fault at %#010lx in %s (pc=%#lx)\n",
ssw & RW ? "read" : "write",
fp->un.fmtb.daddr,
......@@ -820,8 +824,9 @@ extern struct module kernel_module;
static inline int kernel_text_address(unsigned long addr)
{
#ifdef CONFIG_MODULES
struct module *mod;
int retval = 0;
#endif
extern char _stext, _etext;
if (addr >= (unsigned long) &_stext &&
......@@ -833,14 +838,12 @@ static inline int kernel_text_address(unsigned long addr)
/* mod_bound tests for addr being inside the vmalloc'ed
* module area. Of course it'd be better to test only
* for the .text subset... */
if (mod_bound(addr, 0, mod)) {
retval = 1;
break;
}
if (mod_bound(addr, 0, mod))
return 1;
}
#endif
return retval;
return 0;
}
void show_trace(unsigned long *stack)
......
......@@ -19,8 +19,8 @@
#include <asm/macints.h>
#include <asm/mac_baboon.h>
/* #define DEBUG_BABOON /**/
/* #define DEBUG_IRQS /**/
/* #define DEBUG_BABOON */
/* #define DEBUG_IRQS */
int baboon_present,baboon_active;
volatile struct baboon *baboon;
......
......@@ -21,6 +21,7 @@
#include <linux/delay.h>
/* keyb */
#include <linux/init.h>
#include <linux/vt_kern.h>
#define BOOTINFO_COMPAT_1_0
#include <asm/setup.h>
......@@ -47,6 +48,8 @@
struct mac_booter_data mac_bi_data = {0,};
int mac_bisize = sizeof mac_bi_data;
struct mac_hw_present mac_hw_present;
/* New m68k bootinfo stuff and videobase */
extern int m68k_num_memory;
......@@ -75,7 +78,6 @@ extern void oss_init(void);
extern void psc_init(void);
extern void baboon_init(void);
extern void (*kd_mksound)(unsigned int, unsigned int);
extern void mac_mksound(unsigned int, unsigned int);
extern void nubus_sweep_video(void);
......@@ -84,8 +86,6 @@ extern void nubus_sweep_video(void);
extern void mac_debug_init(void);
extern void mac_debugging_long(int, long);
extern void (*kd_mksound)(unsigned int, unsigned int);
extern int mackbd_init_hw(void);
extern void mackbd_leds(unsigned int leds);
extern int mackbd_translate(unsigned char keycode, unsigned char *keycodep, char raw_mode);
......@@ -206,7 +206,7 @@ void __init config_mac(void)
if (!MACH_IS_MAC) {
printk("ERROR: no Mac, but config_mac() called!! \n");
}
#ifdef CONFIG_VT
#ifdef CONFIG_INPUT_ADBHID
mach_keyb_init = mac_hid_init_hw;
......@@ -227,8 +227,10 @@ void __init config_mac(void)
mach_keyb_init = mackbd_init_hw;
mach_kbd_leds = mackbd_leds;
mach_kbd_translate = mackbd_translate;
#ifdef CONFIG_MAGIC_SYSRQ
mach_sysrq_xlate = mackbd_sysrq_xlate;
SYSRQ_KEY = 0x69;
#endif /* CONFIG_MAGIC_SYSRQ */
#endif /* CONFIG_INPUT_ADBHID */
#endif /* CONFIG_VT */
......@@ -253,12 +255,16 @@ void __init config_mac(void)
mach_reset = mac_reset;
mach_halt = mac_poweroff;
mach_power_off = mac_poweroff;
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp = &dummy_con;
#endif
mach_max_dma_address = 0xffffffff;
#if 0
mach_debug_init = mac_debug_init;
#endif
#ifdef CONFIG_VT
kd_mksound = mac_mksound;
#endif
#ifdef CONFIG_HEARTBEAT
#if 0
mach_heartbeat = mac_heartbeat;
......
......@@ -36,7 +36,7 @@ extern unsigned long mac_videobase;
extern unsigned long mac_videodepth;
extern unsigned long mac_rowbytes;
extern void mac_serial_print(char *);
extern void mac_serial_print(const char *);
#define DEBUG_HEADS
#undef DEBUG_SCREEN
......@@ -137,7 +137,7 @@ void mac_debugging_long(int pos, long addr)
* TODO: serial debug code
*/
struct SCC
struct mac_SCC
{
u_char cha_b_ctrl;
u_char char_dummy1;
......@@ -148,7 +148,7 @@ struct SCC
u_char cha_a_data;
};
# define scc (*((volatile struct SCC*)mac_bi_data.sccbase))
# define scc (*((volatile struct mac_SCC*)mac_bi_data.sccbase))
/* Flag that serial port is already initialized and used */
int mac_SCC_init_done = 0;
......@@ -159,9 +159,9 @@ int mac_SCC_reset_done = 0;
static int scc_port = -1;
static struct console mac_console_driver = {
name: "debug",
flags: CON_PRINTBUFFER,
index: -1,
.name = "debug",
.flags = CON_PRINTBUFFER,
.index = -1,
};
/*
......@@ -235,20 +235,6 @@ void mac_scca_console_write (struct console *co, const char *str,
}
}
#if defined(CONFIG_SERIAL_CONSOLE) || defined(DEBUG_SERIAL)
int mac_sccb_console_wait_key(struct console *co)
{
int i;
do {
for( i = uSEC; i > 0; --i )
barrier();
} while( !(scc.cha_b_ctrl & 0x01) ); /* wait for rx buf filled */
for( i = uSEC; i > 0; --i )
barrier();
return( scc.cha_b_data );
}
#endif
/* The following two functions do a quick'n'dirty initialization of the MFP or
* SCC serial ports. They're used by the debugging interface, kgdb, and the
......@@ -390,9 +376,6 @@ void __init mac_debug_init(void)
/* Mac printer port */
mac_init_scc_port( B9600|CS8, 1 );
mac_console_driver.write = mac_sccb_console_write;
#ifdef CONFIG_SERIAL_CONSOLE
mac_console_driver.wait_key = mac_sccb_console_wait_key;
#endif
scc_port = 1;
}
#endif
......
......@@ -131,6 +131,7 @@
#include <asm/mac_via.h>
#include <asm/mac_psc.h>
#include <asm/hwtest.h>
#include <asm/errno.h>
#include <asm/macints.h>
......
......@@ -229,8 +229,8 @@ static long via_read_time(void)
do {
if (++ct > 10) {
printk("via_read_time: couldn't get valid time, "
"last read = 0x%08X and 0x%08X\n", last_result.idata,
result.idata);
"last read = 0x%08lx and 0x%08lx\n",
last_result.idata, result.idata);
break;
}
......
......@@ -152,22 +152,25 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
* make sure we exit gracefully rather than endlessly redo
* the fault.
*/
survive:
fault = handle_mm_fault(mm, vma, address, write);
#ifdef DEBUG
printk("handle_mm_fault returns %d\n",fault);
#endif
if (fault < 0)
goto out_of_memory;
if (!fault)
switch (fault) {
case 1:
current->min_flt++;
break;
case 2:
current->maj_flt++;
break;
case 0:
goto bus_err;
default:
goto out_of_memory;
}
/* There seems to be a missing invalidate somewhere in do_no_page.
* Until I found it, this one cures the problem and makes
* 1.2 run on the 68040 (Martin Apel).
*/
#warning should be obsolete now...
if (CPU_IS_040_OR_060)
flush_tlb_page(vma, address);
up_read(&mm->mmap_sem);
return 0;
......@@ -176,6 +179,13 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
* us unable to handle the page fault gracefully.
*/
out_of_memory:
up_read(&mm->mmap_sem);
if (current->pid == 1) {
yield();
down_read(&mm->mmap_sem);
goto survive;
}
printk("VM: killing process %s\n", current->comm);
if (user_mode(regs))
do_exit(SIGKILL);
......
......@@ -36,17 +36,11 @@
mmu_gather_t mmu_gathers[NR_CPUS];
/*
* BAD_PAGE is the page that is used for page faults when linux
* is out-of-memory. Older versions of linux just did a
* do_exit(), but using this instead means there is less risk
* for a process dying in kernel mode, possibly leaving an inode
* unused etc..
*
* ZERO_PAGE is a special page that is used for zero-initialized
* data and COW.
*/
unsigned long empty_zero_page;
void *empty_zero_page;
void show_mem(void)
{
......
......@@ -77,14 +77,14 @@ pmd_t *get_pointer_table (void)
* virtual address space to be noncacheable.
*/
if (mask == 0) {
unsigned long page;
void *page;
ptable_desc *new;
if (!(page = get_free_page (GFP_KERNEL)))
if (!(page = (void *)get_free_page(GFP_KERNEL)))
return 0;
flush_tlb_kernel_page(page);
nocache_page (page);
nocache_page(page);
new = PD_PTABLE(page);
PD_MARKBITS(new) = 0xfe;
......@@ -119,7 +119,7 @@ int free_pointer_table (pmd_t *ptable)
if (PD_MARKBITS(dp) == 0xff) {
/* all tables in page are free, free page */
list_del(dp);
cache_page (page);
cache_page((void *)page);
free_page (page);
return 1;
} else if (ptable_list.next != dp) {
......@@ -186,10 +186,6 @@ unsigned long mm_vtop(unsigned long vaddr)
voff -= m68k_memory[i].size;
} while (++i < m68k_num_memory);
/* As a special case allow `__pa(high_memory)'. */
if (voff == 0)
return m68k_memory[i-1].addr + m68k_memory[i-1].size;
/* As a special case allow `__pa(high_memory)'. */
if (voff == 0)
return m68k_memory[i-1].addr + m68k_memory[i-1].size;
......
......@@ -52,9 +52,9 @@ static pte_t * __init kernel_page_table(void)
ptablep = (pte_t *)alloc_bootmem_low_pages(PAGE_SIZE);
clear_page(ptablep);
__flush_page_to_ram((unsigned long) ptablep);
flush_tlb_kernel_page((unsigned long) ptablep);
nocache_page ((unsigned long)ptablep);
__flush_page_to_ram(ptablep);
flush_tlb_kernel_page(ptablep);
nocache_page(ptablep);
return ptablep;
}
......@@ -87,15 +87,15 @@ static pmd_t * __init kernel_ptr_table(void)
#endif
}
if (((unsigned long)(last_pgtable + PTRS_PER_PMD) & ~PAGE_MASK) == 0) {
last_pgtable += PTRS_PER_PMD;
if (((unsigned long)last_pgtable & ~PAGE_MASK) == 0) {
last_pgtable = (pmd_t *)alloc_bootmem_low_pages(PAGE_SIZE);
clear_page(last_pgtable);
__flush_page_to_ram((unsigned long)last_pgtable);
flush_tlb_kernel_page((unsigned long)last_pgtable);
nocache_page((unsigned long)last_pgtable);
} else
last_pgtable += PTRS_PER_PMD;
__flush_page_to_ram(last_pgtable);
flush_tlb_kernel_page(last_pgtable);
nocache_page(last_pgtable);
}
return last_pgtable;
}
......@@ -262,8 +262,8 @@ void __init paging_init(void)
* initialize the bad page table and bad page to point
* to a couple of allocated pages
*/
empty_zero_page = (unsigned long)alloc_bootmem_pages(PAGE_SIZE);
memset((void *)empty_zero_page, 0, PAGE_SIZE);
empty_zero_page = alloc_bootmem_pages(PAGE_SIZE);
memset(empty_zero_page, 0, PAGE_SIZE);
/*
* Set up SFC/DFC registers
......
......@@ -21,6 +21,8 @@
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/major.h>
#include <linux/genhd.h>
#include <linux/rtc.h>
#include <asm/bootinfo.h>
#include <asm/system.h>
......@@ -100,8 +102,10 @@ void __init config_mvme147(void)
{
mach_max_dma_address = 0x01000000;
mach_sched_init = mvme147_sched_init;
#ifdef CONFIG_VT
mach_keyb_init = mvme147_keyb_init;
mach_kbdrate = mvme147_kbdrate;
#endif
mach_init_IRQ = mvme147_init_IRQ;
mach_gettimeoffset = mvme147_gettimeoffset;
mach_hwclk = mvme147_hwclk;
......
......@@ -22,6 +22,8 @@
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/major.h>
#include <linux/genhd.h>
#include <linux/rtc.h>
#include <asm/bootinfo.h>
#include <asm/system.h>
......@@ -142,13 +144,17 @@ void __init config_mvme16x(void)
mach_max_dma_address = 0xffffffff;
mach_sched_init = mvme16x_sched_init;
#ifdef CONFIG_VT
mach_keyb_init = mvme16x_keyb_init;
mach_kbdrate = mvme16x_kbdrate;
#endif
mach_init_IRQ = mvme16x_init_IRQ;
mach_gettimeoffset = mvme16x_gettimeoffset;
mach_hwclk = mvme16x_hwclk;
mach_set_clock_mmss = mvme16x_set_clock_mmss;
#ifdef CONFIG_VT
/* kd_mksound = mvme16x_mksound; */
#endif
mach_reset = mvme16x_reset;
mach_free_irq = mvme16x_free_irq;
mach_process_int = mvme16x_process_int;
......
......@@ -150,9 +150,9 @@ static int rtc_release(struct inode *inode, struct file *file)
*/
static struct file_operations rtc_fops = {
ioctl: rtc_ioctl,
open: rtc_open,
release: rtc_release,
.ioctl = rtc_ioctl,
.open = rtc_open,
.release = rtc_release,
};
static struct miscdevice rtc_dev=
......
......@@ -23,6 +23,7 @@
#include <linux/major.h>
#include <linux/serial_reg.h>
#include <linux/rtc.h>
#include <linux/vt_kern.h>
#include <asm/io.h>
#include <asm/rtc.h>
......@@ -61,7 +62,6 @@ void q40_halt(void);
extern void q40_waitbut(void);
void q40_set_vectors (void);
extern void (*kd_mksound)(unsigned int, unsigned int);
void q40_mksound(unsigned int /*freq*/, unsigned int /*ticks*/ );
extern char *saved_command_line;
......@@ -72,9 +72,9 @@ static void q40_mem_console_write(struct console *co, const char *b,
extern int ql_ticks;
static struct console q40_console_driver = {
name: "debug",
flags: CON_PRINTBUFFER,
index: -1,
.name = "debug",
.flags = CON_PRINTBUFFER,
.index = -1,
};
......@@ -162,42 +162,6 @@ static void q40_get_model(char *model)
sprintf(model, "Q40");
}
/* pasted code to make parport_pc happy */
extern __inline__ int __get_order(unsigned long size)
{
int order;
size = (size-1) >> (PAGE_SHIFT-1);
order = -1;
do {
size >>= 1;
order++;
} while (size);
return order;
}
void *pci_alloc_consistent(void *hwdev, size_t size,
dma_addr_t *dma_handle)
{
void *ret;
int gfp = GFP_ATOMIC;
ret = (void *)__get_free_pages(gfp, __get_order(size));
if (ret != NULL) {
memset(ret, 0, size);
*dma_handle = virt_to_bus(ret);
}
return ret;
}
void pci_free_consistent(void *hwdev, size_t size,
void *vaddr, dma_addr_t dma_handle)
{
free_pages((unsigned long)vaddr, __get_order(size));
}
/* end pasted code */
/* No hardware options on Q40? */
static int q40_get_hardware_list(char *buffer)
......@@ -221,8 +185,10 @@ void __init config_q40(void)
{
mach_sched_init = q40_sched_init;
#ifdef CONFIG_VT
mach_keyb_init = q40kbd_init_hw;
mach_kbd_translate = q40kbd_translate;
#endif
mach_init_IRQ = q40_init_IRQ;
mach_gettimeoffset = q40_gettimeoffset;
mach_hwclk = q40_hwclk;
......@@ -238,7 +204,9 @@ void __init config_q40(void)
mach_default_handler = &q40_sys_default_handler;
mach_get_model = q40_get_model;
mach_get_hardware_list = q40_get_hardware_list;
#ifdef CONFIG_VT
kd_mksound = q40_mksound;
#endif
#ifdef CONFIG_MAGIC_SYSRQ
mach_sysrq_key = 0x54;
......@@ -247,7 +215,9 @@ void __init config_q40(void)
mach_heartbeat = q40_heartbeat;
#endif
mach_halt = q40_halt;
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp = &dummy_con;
#endif
/* disable a few things that SMSQ might have left enabled */
q40_disable_irqs();
......
......@@ -151,7 +151,9 @@ void __init config_sun3(void)
mach_default_handler = &sun3_default_handler;
mach_request_irq = sun3_request_irq;
mach_free_irq = sun3_free_irq;
#ifdef CONFIG_VT
// mach_keyb_init = sun3_keyb_init;
#endif
enable_irq = sun3_enable_irq;
disable_irq = sun3_disable_irq;
mach_process_int = sun3_process_int;
......@@ -162,7 +164,7 @@ void __init config_sun3(void)
mach_hwclk = sun3_hwclk;
mach_halt = sun3_halt;
mach_get_hardware_list = sun3_get_hardware_list;
#if !defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_FB)
#if !defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_DUMMY_CONSOLE)
conswitchp = &dummy_con;
#endif
......@@ -175,8 +177,9 @@ void __init config_sun3(void)
sun3_bootmem_alloc(memory_start, memory_end);
#ifdef CONFIG_SUN3X_ZS
sun_serial_setup();
#endif
}
void __init sun3_sched_init(void (*timer_routine)(int, void *, struct pt_regs *))
......
......@@ -61,9 +61,11 @@ void __init config_sun3x(void)
mach_get_irq_list = show_sun3_interrupts;
mach_max_dma_address = 0xffffffff; /* we can DMA anywhere, whee */
#ifdef CONFIG_VT
mach_keyb_init = sun3x_keyb_init;
mach_kbdrate = sun3x_kbdrate;
mach_kbd_leds = sun3x_kbd_leds;
#endif
mach_default_handler = &sun3_default_handler;
mach_sched_init = sun3x_sched_init;
......
......@@ -186,7 +186,7 @@ static void do_IRQ(int irq, struct pt_regs * regs)
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 @@ static void do_IRQ(int irq, struct pt_regs * regs)
} 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);
}
......
......@@ -136,7 +136,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
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 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
} while (action);
if (do_random & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
__cli();
local_irq_disable();
unmask_irq(irq);
}
irq_exit(cpu, irq);
......
......@@ -147,7 +147,7 @@ void __init init_IRQ(void)
* 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);
......
......@@ -271,12 +271,12 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
//mask_irq(1<<irq);
//printk("action->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)
{
}
......
......@@ -168,7 +168,7 @@ static unsigned long __init cal_r4koff(void)
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 @@ static unsigned long __init cal_r4koff(void)
count = read_32bit_cp0_register(CP0_COUNT);
/* restore interrupts */
__restore_flags(flags);
local_irq_restore(flags);
return (count / HZ);
}
......
......@@ -114,7 +114,7 @@ int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction *
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 @@ int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction *
} while (action);
if (status & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
__cli();
local_irq_disable();
irq_exit(cpu, irq);
......
......@@ -183,7 +183,7 @@ asmlinkage void i8259_do_irq(int irq, struct pt_regs *regs)
goto out;
if (!(action->flags & SA_INTERRUPT))
__sti();
local_irq_enable();
action = *(irq + irq_action);
do_random = 0;
do {
......@@ -193,7 +193,7 @@ asmlinkage void i8259_do_irq(int irq, struct pt_regs *regs)
} while (action);
if (do_random & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
__cli();
local_irq_disable();
unmask_irq (irq);
out:
......@@ -219,7 +219,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
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 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
} while (action);
if (do_random & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
__cli();
local_irq_disable();
}
irq_exit(cpu, irq);
......
......@@ -174,10 +174,10 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
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:
......
......@@ -281,9 +281,9 @@ static inline void wait_on_irq(int cpu)
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 @@ void __global_cli(void)
{
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 @@ void __global_sti(void)
if (!local_irq_count(cpu))
release_irqlock(cpu);
__sti();
local_irq_enable();
}
/*
......@@ -367,7 +367,7 @@ unsigned long __global_save_flags(void)
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 @@ void __global_restore_flags(unsigned long flags)
__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);
......
......@@ -102,7 +102,7 @@ dump_tlb_addr(unsigned long addr)
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 @@ dump_tlb_addr(unsigned long addr)
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);
......
......@@ -83,13 +83,13 @@ dump_tlb_addr(unsigned long addr)
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);
......
......@@ -189,7 +189,7 @@ static unsigned long __init cal_r4koff(void)
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 @@ static unsigned long __init cal_r4koff(void)
count = read_32bit_cp0_register(CP0_COUNT);
/* restore interrupts */
__restore_flags(flags);
local_irq_restore(flags);
return (count / HZ);
}
......
......@@ -161,18 +161,18 @@ static inline void mips32_flush_cache_all_sc(void)
{
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 @@ mips32_flush_cache_range_sc(struct vm_area_struct *vma,
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 @@ mips32_flush_cache_range_sc(struct vm_area_struct *vma,
blast_scache_page(start);
start += PAGE_SIZE;
}
__restore_flags(flags);
local_irq_restore(flags);
}
}
}
......@@ -225,9 +225,9 @@ static void mips32_flush_cache_range_pc(struct vm_area_struct *vma,
#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 @@ static void mips32_flush_cache_page_sc(struct vm_area_struct *vma,
#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 @@ static void mips32_flush_cache_page_sc(struct vm_area_struct *vma,
} 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 @@ static void mips32_flush_cache_page_pc(struct vm_area_struct *vma,
#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 @@ static void mips32_flush_cache_page_pc(struct vm_area_struct *vma,
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 @@ mips32_dma_cache_wback_inv_pc(unsigned long addr, unsigned long size)
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 @@ mips32_dma_cache_wback_inv_pc(unsigned long addr, unsigned long size)
if (a == end) break;
a += dc_lsize;
}
__restore_flags(flags);
local_irq_restore(flags);
}
bc_wback_inv(addr, size);
}
......@@ -461,7 +461,7 @@ mips32_dma_cache_inv_pc(unsigned long addr, unsigned long size)
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 @@ mips32_dma_cache_inv_pc(unsigned long addr, unsigned long size)
if (a == end) break;
a += dc_lsize;
}
__restore_flags(flags);
local_irq_restore(flags);
}
bc_inv(addr, size);
......@@ -524,7 +524,7 @@ void flush_tlb_all(void)
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 @@ void flush_tlb_all(void)
}
BARRIER;
set_entryhi(old_ctx);
__restore_flags(flags);
local_irq_restore(flags);
}
void flush_tlb_mm(struct mm_struct *mm)
......@@ -557,11 +557,11 @@ void flush_tlb_mm(struct mm_struct *mm)
#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 @@ void flush_tlb_range(struct mm_struct *mm, unsigned long start,
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 @@ void flush_tlb_range(struct mm_struct *mm, unsigned long start,
if (mm == current->active_mm)
set_entryhi(mm->context & 0xff);
}
__restore_flags(flags);
local_irq_restore(flags);
}
}
......@@ -626,7 +626,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
#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 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
finish:
BARRIER;
set_entryhi(oldpid);
__restore_flags(flags);
local_irq_restore(flags);
}
}
......@@ -693,7 +693,7 @@ void update_mmu_cache(struct vm_area_struct * vma,
}
#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 @@ void update_mmu_cache(struct vm_area_struct * vma,
BARRIER;
set_entryhi(pid);
BARRIER;
__restore_flags(flags);
local_irq_restore(flags);
}
void show_regs(struct pt_regs * regs)
......@@ -752,7 +752,7 @@ void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
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 @@ void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
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 @@ static int __init probe_scache(unsigned long config)
/* 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 @@ static int __init probe_scache(unsigned long config)
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);
......
This diff is collapsed.
......@@ -554,7 +554,7 @@ void flush_tlb_all(void)
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 @@ void flush_tlb_all(void)
}
BARRIER;
set_entryhi(old_ctx);
__restore_flags(flags);
local_irq_restore(flags);
}
void flush_tlb_mm(struct mm_struct *mm)
......@@ -585,11 +585,11 @@ void flush_tlb_mm(struct mm_struct *mm)
#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 @@ void flush_tlb_range(struct mm_struct *mm, unsigned long start,
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 @@ void flush_tlb_range(struct mm_struct *mm, unsigned long start,
if (mm == current->active_mm)
set_entryhi(mm->context & 0xff);
}
__restore_flags(flags);
local_irq_restore(flags);
}
}
......@@ -653,7 +653,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
#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 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
finish:
BARRIER;
set_entryhi(oldpid);
__restore_flags(flags);
local_irq_restore(flags);
}
}
......@@ -720,7 +720,7 @@ void update_mmu_cache(struct vm_area_struct * vma,
}
#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 @@ void update_mmu_cache(struct vm_area_struct * vma,
BARRIER;
set_entryhi(pid);
BARRIER;
__restore_flags(flags);
local_irq_restore(flags);
}
void show_regs(struct pt_regs * regs)
......@@ -779,7 +779,7 @@ void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
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 @@ void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
BARRIER;
set_pagemask (old_pagemask);
flush_tlb_all();
__restore_flags(flags);
local_irq_restore(flags);
}
/* Detect and size the various r4k caches. */
......
......@@ -310,7 +310,7 @@ void flush_tlb_all(void)
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 @@ void flush_tlb_all(void)
}
BARRIER;
set_entryhi(old_ctx);
__restore_flags(flags);
local_irq_restore(flags);
}
void flush_tlb_mm(struct mm_struct *mm)
......@@ -338,11 +338,11 @@ void flush_tlb_mm(struct mm_struct *mm)
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 @@ void flush_tlb_range(struct mm_struct *mm, unsigned long start,
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 @@ void flush_tlb_range(struct mm_struct *mm, unsigned long start,
if(mm == current->mm)
set_entryhi(mm->context & 0xff);
}
__restore_flags(flags);
local_irq_restore(flags);
}
}
......@@ -399,7 +399,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
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 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
finish:
BARRIER;
set_entryhi(oldpid);
__restore_flags(flags);
local_irq_restore(flags);
}
}
......@@ -460,7 +460,7 @@ void update_mmu_cache(struct vm_area_struct * vma,
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 @@ void update_mmu_cache(struct vm_area_struct * vma,
BARRIER;
set_entryhi(pid);
BARRIER;
__restore_flags(flags);
local_irq_restore(flags);
}
void show_regs(struct pt_regs * regs)
......@@ -519,7 +519,7 @@ void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
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 @@ void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
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 @@ __init int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
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 @@ __init int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
BARRIER;
set_pagemask (old_pagemask);
out:
__restore_flags(flags);
local_irq_restore(flags);
return ret;
}
......
......@@ -67,7 +67,7 @@ void flush_tlb_all(void)
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 @@ void flush_tlb_all(void)
tlb_write_indexed();
}
set_entryhi(old_ctx);
__restore_flags(flags);
local_irq_restore(flags);
}
......
......@@ -177,7 +177,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
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 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
if (do_random & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
unmask_irq(irq);
__cli();
local_irq_disable();
} else {
IntClear1 = ~0;
IntClear3 = ~0;
......
......@@ -75,7 +75,7 @@ static void indy_sc_wback_invalidate(unsigned long addr, unsigned long size)
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 @@ static void indy_sc_wback_invalidate(unsigned long addr, unsigned long size)
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)
......
......@@ -158,10 +158,10 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data)
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 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
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:
......
......@@ -101,7 +101,7 @@ dump_tlb_addr(unsigned long addr)
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 @@ dump_tlb_addr(unsigned long addr)
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);
......
......@@ -188,7 +188,7 @@ static unsigned long __init cal_r4koff(void)
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 @@ static unsigned long __init cal_r4koff(void)
count = read_32bit_cp0_register(CP0_COUNT);
/* restore interrupts */
__restore_flags(flags);
local_irq_restore(flags);
return (count / HZ);
}
......
......@@ -143,7 +143,7 @@ andes_flush_tlb_all(void)
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 @@ andes_flush_tlb_all(void)
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 @@ static void andes_flush_tlb_mm(struct mm_struct *mm)
#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 @@ andes_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
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 @@ andes_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
set_entryhi(CPU_CONTEXT(smp_processor_id(), mm) &
0xff);
}
__restore_flags(flags);
local_irq_restore(flags);
}
}
......@@ -239,7 +239,7 @@ andes_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
#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 @@ andes_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
finish:
set_entryhi(oldpid);
__restore_flags(flags);
local_irq_restore(flags);
}
}
......@@ -275,7 +275,7 @@ static void andes_update_mmu_cache(struct vm_area_struct * vma,
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 @@ static void andes_update_mmu_cache(struct vm_area_struct * vma,
tlb_write_indexed();
}
set_entryhi(pid);
__restore_flags(flags);
local_irq_restore(flags);
}
static void andes_show_regs(struct pt_regs *regs)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment