|
From: Andy P. <at...@us...> - 2002-04-10 18:31:37
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/mips/baget
In directory usw-pr-cvs1:/tmp/cvs-serv16972/mips/baget
Modified Files:
Makefile baget.c bagetIRQ.S balo.c balo_supp.S irq.c
ld.script.balo print.c setup.c time.c vacserial.c
Log Message:
synch 2.4.15
Index: Makefile
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips/baget/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- Makefile 14 Jan 2001 19:28:36 -0000 1.1.1.1
+++ Makefile 10 Apr 2002 14:38:03 -0000 1.2
@@ -1,4 +1,3 @@
-# $Id$
#
# Makefile for the Baget specific kernel interface routines
# under Linux.
@@ -12,22 +11,12 @@
all: baget.a
O_TARGET := baget.a
-O_OBJS := baget.o print.o setup.o time.o irq.o bagetIRQ.o reset.o wbflush.o
-ifeq ($(CONFIG_SERIAL),y)
- OX_OBJS += vacserial.o
-else
- ifeq ($(CONFIG_SERIAL),m)
- MX_OBJS += vacserial.o
- endif
-endif
-ifeq ($(CONFIG_VAC_RTC),y)
- OX_OBJS += vacrtc.o
-else
- ifeq ($(CONFIG_VAC_RTC),m)
- MX_OBJS += vacrtc.o
- endif
-endif
+export-objs := vacserial.o vacrtc.o
+obj-y := baget.o print.o setup.o time.o irq.o bagetIRQ.o \
+ reset.o wbflush.o
+obj-$(CONFIG_SERIAL) += vacserial.o
+obj-$(CONFIG_VAC_RTC) += vacrtc.o
bagetIRQ.o : bagetIRQ.S
$(CC) $(CFLAGS) -c -o $@ $<
Index: baget.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips/baget/baget.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: bagetIRQ.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips/baget/bagetIRQ.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: balo.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips/baget/balo.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: balo_supp.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips/baget/balo_supp.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: irq.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips/baget/irq.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- irq.c 25 Feb 2001 23:15:17 -0000 1.1.1.2
+++ irq.c 10 Apr 2002 14:38:03 -0000 1.2
@@ -4,8 +4,6 @@
* Copyright (C) 1998 Vladimir Roganov & Gleb Raiko
* Code (mostly sleleton and comments) derived from DECstation IRQ
* handling.
- *
- * $Id$
*/
#include <linux/errno.h>
#include <linux/init.h>
@@ -180,7 +178,7 @@
int do_random, cpu;
cpu = smp_processor_id();
- irq_enter(cpu);
+ irq_enter(cpu, irq);
kstat.irqs[cpu][irq]++;
mask_irq(irq);
@@ -199,10 +197,10 @@
add_interrupt_randomness(irq);
__cli();
} else {
- printk("do_IRQ: Unregistered IRQ (0x%X) occured\n", irq);
+ printk("do_IRQ: Unregistered IRQ (0x%X) occurred\n", irq);
}
unmask_irq(irq);
- irq_exit(cpu);
+ irq_exit(cpu, irq);
/* unmasking and bottom half handling is done magically for us. */
}
@@ -358,13 +356,6 @@
}
printk("Trying to free free IRQ%d\n",irq);
}
-
-static int baget_irq_canonicalize(int irq)
-{
- return irq;
-}
-
-int (*irq_cannonicalize)(int irq) = baget_irq_canonicalize;
unsigned long probe_irq_on (void)
{
Index: ld.script.balo
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips/baget/ld.script.balo,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ld.script.balo 14 Jan 2001 19:28:40 -0000 1.1.1.1
+++ ld.script.balo 10 Apr 2002 14:38:03 -0000 1.2
@@ -31,6 +31,7 @@
_ftext = . ;
*(.text)
*(.rodata)
+ *(.rodata.*)
*(.rodata1)
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
Index: print.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips/baget/print.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: setup.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips/baget/setup.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- setup.c 14 Jan 2001 19:28:42 -0000 1.1.1.1
+++ setup.c 10 Apr 2002 14:38:04 -0000 1.2
@@ -14,7 +14,7 @@
#include <asm/baget/baget.h>
-extern long mips_memory_upper;
+long int vac_memory_upper;
#define CACHEABLE_STR(val) ((val) ? "not cached" : "cached")
#define MIN(a,b) (((a)<(b)) ? (a):(b))
@@ -172,7 +172,7 @@
static void __init vac_init(void)
{
- unsigned short mem_limit = ((mips_memory_upper-KSEG0) >> 16);
+ unsigned short mem_limit = (vac_memory_upper >> 16);
switch(vac_inw(VAC_ID)) {
case 0x1AC0:
Index: time.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips/baget/time.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- time.c 14 Jan 2001 19:28:42 -0000 1.1.1.1
+++ time.c 10 Apr 2002 14:38:04 -0000 1.2
@@ -1,4 +1,4 @@
-/* $Id$
+/*
* time.c: Baget/MIPS specific time handling details
*
* Copyright (C) 1998 Gleb Raiko & Vladimir Roganov
@@ -13,7 +13,7 @@
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/timex.h>
-#include <linux/kernel_stat.h>
+#include <linux/spinlock.h>
#include <asm/bootinfo.h>
#include <asm/io.h>
@@ -23,11 +23,14 @@
#include <asm/baget/baget.h>
+extern rwlock_t xtime_lock;
+
/*
* To have precision clock, we need to fix available clock frequency
*/
#define FREQ_NOM 79125 /* Baget frequency ratio */
#define FREQ_DEN 10000
+
static inline int timer_intr_valid(void)
{
static unsigned long long ticks, valid_ticks;
@@ -47,8 +50,8 @@
void static timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
{
if (timer_intr_valid()) {
- sti();
- do_timer(regs);
+ sti();
+ do_timer(regs);
}
}
@@ -76,21 +79,20 @@
void do_gettimeofday(struct timeval *tv)
{
- unsigned long flags;
+ unsigned long flags;
- save_and_cli(flags);
- *tv = xtime;
- restore_flags(flags);
+ read_lock_irqsave (&xtime_lock, flags);
+ *tv = xtime;
+ read_unlock_irqrestore (&xtime_lock, flags);
}
void do_settimeofday(struct timeval *tv)
{
- unsigned long flags;
-
- save_and_cli(flags);
- xtime = *tv;
- time_state = TIME_BAD;
- time_maxerror = MAXPHASE;
- time_esterror = MAXPHASE;
- restore_flags(flags);
-}
+ write_lock_irq (&xtime_lock);
+ xtime = *tv;
+ time_adjust = 0; /* stop active adjtime() */
+ time_status |= STA_UNSYNC;
+ time_maxerror = NTP_PHASE_LIMIT;
+ time_esterror = NTP_PHASE_LIMIT;
+ write_unlock_irq (&xtime_lock);
+}
Index: vacserial.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips/baget/vacserial.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- vacserial.c 25 Feb 2001 23:15:18 -0000 1.1.1.2
+++ vacserial.c 10 Apr 2002 14:38:04 -0000 1.2
@@ -1,4 +1,4 @@
-/* $Id$
+/*
* vacserial.c: VAC UART serial driver
* This code stealed and adopted from linux/drivers/char/serial.c
* See that for author info
@@ -1300,7 +1300,7 @@
goto check_and_exit;
}
- new_serial.irq = irq_cannonicalize(new_serial.irq);
+ new_serial.irq = new_serial.irq;
if ((new_serial.irq >= NR_IRQS) || (new_serial.port > 0xffff) ||
(new_serial.baud_base == 0) || (new_serial.type < PORT_UNKNOWN) ||
@@ -1417,12 +1417,10 @@
static int set_modem_info(struct async_struct * info, unsigned int cmd,
unsigned int *value)
{
- int error;
unsigned int arg;
- error = get_user(arg, value);
- if (error)
- return error;
+ if (get_user(arg, value))
+ return -EFAULT;
switch (cmd) {
default:
return -EINVAL;
@@ -2426,7 +2424,7 @@
state->icount.rx = state->icount.tx = 0;
state->icount.frame = state->icount.parity = 0;
state->icount.overrun = state->icount.brk = 0;
- state->irq = irq_cannonicalize(state->irq);
+ state->irq = state->irq;
if (check_region(state->port,8))
continue;
if (state->flags & ASYNC_BOOT_AUTOCONF)
|