You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(6) |
Sep
(2) |
Oct
(43) |
Nov
(4) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(78) |
Feb
(97) |
Mar
(29) |
Apr
(2) |
May
(22) |
Jun
(38) |
Jul
(11) |
Aug
(27) |
Sep
(40) |
Oct
(2) |
Nov
(17) |
Dec
(8) |
2002 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(480) |
May
(456) |
Jun
(12) |
Jul
|
Aug
(1) |
Sep
|
Oct
(18) |
Nov
(3) |
Dec
(6) |
2003 |
Jan
|
Feb
(18) |
Mar
(1) |
Apr
|
May
(6) |
Jun
(147) |
Jul
(7) |
Aug
(3) |
Sep
(235) |
Oct
(10) |
Nov
(2) |
Dec
(1) |
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Kenn H. <ke...@us...> - 2002-05-18 18:12:40
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv13830 Modified Files: cpu_ka46.c Log Message: KA46 (VS4000/60) has been broken for a while, since Dave didn't realize that you can't call printk() before VM is setup. Fixed now... Index: cpu_ka46.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka46.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- cpu_ka46.c 25 Apr 2002 08:46:20 -0000 1.11 +++ cpu_ka46.c 18 May 2002 18:12:35 -0000 1.12 @@ -79,7 +79,6 @@ mv_ka46.sidex = *(unsigned int *)RIGEL_SIDEX_ADDR; __mtpr(PR_ACCS,2); /* Enable floating points */ - printk("ka46: enabled floating point\n"); } void ka46_post_vm_init(void) |
From: Andy P. <at...@us...> - 2002-05-02 14:33:31
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax In directory usw-pr-cvs1:/tmp/cvs-serv27173 Modified Files: 460.config Makefile m76.config Removed Files: defconfig.old defconfig.old.m30 Log Message: update .configs, and add line to clean tools directory Index: 460.config =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/460.config,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- 460.config 9 Apr 2002 13:50:55 -0000 1.1 +++ 460.config 2 May 2002 14:33:26 -0000 1.2 @@ -3,6 +3,8 @@ # CONFIG_VAX=y CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set # # Code maturity level options @@ -26,11 +28,12 @@ CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set CONFIG_ELF_KERNEL=y +CONFIG_KCORE_ELF=y # CONFIG_EXTRA_ELF_COMPILER is not set CONFIG_NET=y CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y +# CONFIG_SYSCTL is not set CONFIG_KCORE_ELF=y # CONFIG_KCORE_AOUT is not set # CONFIG_BINFMT_AOUT is not set @@ -41,17 +44,17 @@ # # Bus support # -# CONFIG_QBUS is not set -# CONFIG_UNIBUS is not set -# CONFIG_VAXBI is not set +CONFIG_QBUS=y +CONFIG_UNIBUS=y +CONFIG_VAXBI=y CONFIG_VSBUS=y CONFIG_VAX_4000HC=y # # Mass storage support # -# CONFIG_MSCP is not set -# CONFIG_TMSCP is not set +CONFIG_MSCP=y +CONFIG_TMSCP=y # # Block devices @@ -66,13 +69,12 @@ # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 -# CONFIG_BLK_DEV_INITRD is not set +CONFIG_BLK_DEV_INITRD=y # # Networking options # -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set +# CONFIG_PACKET is not set # CONFIG_NETLINK is not set # CONFIG_NETFILTER is not set # CONFIG_FILTER is not set @@ -81,6 +83,7 @@ # CONFIG_IP_MULTICAST is not set # CONFIG_IP_ADVANCED_ROUTER is not set CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set CONFIG_IP_PNP_BOOTP=y # CONFIG_IP_PNP_RARP is not set # CONFIG_NET_IPIP is not set @@ -90,6 +93,7 @@ # CONFIG_IPV6 is not set # CONFIG_KHTTPD is not set # CONFIG_ATM is not set +# CONFIG_VLAN_8021Q is not set # # @@ -128,20 +132,23 @@ # # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # -CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_MULTI_LUN is not set CONFIG_SCSI_CONSTANTS=y # # SCSI low-level drivers # # CONFIG_SCSI_VAX_5380 is not set +# CONFIG_SCSI_VAX_53C94 is not set # # Network device support # CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_SLIP is not set +CONFIG_DUMMY=y +CONFIG_SLIP=y +# CONFIG_SLIP_COMPRESSED is not set +# CONFIG_SLIP_SMART is not set CONFIG_PPP=y # @@ -157,22 +164,26 @@ # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set CONFIG_REISERFS_FS=y -# CONFIG_REISERFS_CHECK is not set +CONFIG_REISERFS_CHECK=y +# CONFIG_REISERFS_PROC_INFO is not set # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set # CONFIG_BFS_FS is not set -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -# CONFIG_UMSDOS_FS is not set -CONFIG_VFAT_FS=y +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_FAT_FS is not set # CONFIG_EFS_FS is not set # CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set # CONFIG_CRAMFS is not set +CONFIG_TMPFS=y # CONFIG_RAMFS is not set CONFIG_ISO9660_FS=y CONFIG_JOLIET=y +# CONFIG_ZISOFS is not set # CONFIG_MINIX_FS is not set +# CONFIG_VXFS_FS is not set # CONFIG_NTFS_FS is not set # CONFIG_HPFS_FS is not set CONFIG_PROC_FS=y @@ -183,13 +194,13 @@ CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set # CONFIG_UDF_FS is not set -CONFIG_UFS_FS=y -# CONFIG_UFS_FS_WRITE is not set +# CONFIG_UFS_FS is not set # # Network File Systems # # CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set CONFIG_ROOT_NFS=y @@ -198,21 +209,24 @@ CONFIG_LOCKD=y # CONFIG_SMB_FS is not set # CONFIG_NCP_FS is not set +# CONFIG_ZISOFS_FS is not set +# CONFIG_ZLIB_FS_INFLATE is not set # # Partition Types # CONFIG_PARTITION_ADVANCED=y # CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set +CONFIG_OSF_PARTITION=y # CONFIG_AMIGA_PARTITION is not set # CONFIG_ATARI_PARTITION is not set # CONFIG_MAC_PARTITION is not set CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y +# CONFIG_BSD_DISKLABEL is not set # CONFIG_MINIX_SUBPARTITION is not set # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set # CONFIG_SGI_PARTITION is not set CONFIG_ULTRIX_PARTITION=y # CONFIG_SUN_PARTITION is not set @@ -238,11 +252,13 @@ # CONFIG_NLS_CODEPAGE_865 is not set # CONFIG_NLS_CODEPAGE_866 is not set # CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_CODEPAGE_932 is not set # CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_949 is not set # CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -250,11 +266,12 @@ # CONFIG_NLS_ISO8859_5 is not set # CONFIG_NLS_ISO8859_6 is not set # CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set # CONFIG_NLS_ISO8859_14 is not set # CONFIG_NLS_ISO8859_15 is not set # CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set # CONFIG_NLS_UTF8 is not set # @@ -267,6 +284,7 @@ CONFIG_SERIAL_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTY_COUNT=256 +CONFIG_RTC=y # # Kernel hacking Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/Makefile,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- Makefile 9 Apr 2002 13:50:55 -0000 1.11 +++ Makefile 2 May 2002 14:33:26 -0000 1.12 @@ -153,6 +153,7 @@ archclean: rm -f vmlinux.* vmlinux cd $(TOPDIR)/arch/vax ; rm -f *.out TEST.BIN TEST.SYS header.bin + cd $(TOPDIR)/arch/vax/boot/tools ; rm -f setcmdline showcmdline archmrproper: Index: m76.config =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/m76.config,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- m76.config 9 Apr 2002 13:50:55 -0000 1.1 +++ m76.config 2 May 2002 14:33:26 -0000 1.2 @@ -3,6 +3,8 @@ # CONFIG_VAX=y CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set # # Code maturity level options @@ -26,11 +28,12 @@ CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set CONFIG_ELF_KERNEL=y +CONFIG_KCORE_ELF=y # CONFIG_EXTRA_ELF_COMPILER is not set CONFIG_NET=y CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y +# CONFIG_SYSCTL is not set CONFIG_KCORE_ELF=y # CONFIG_KCORE_AOUT is not set # CONFIG_BINFMT_AOUT is not set @@ -41,17 +44,17 @@ # # Bus support # -# CONFIG_QBUS is not set -# CONFIG_UNIBUS is not set -# CONFIG_VAXBI is not set +CONFIG_QBUS=y +CONFIG_UNIBUS=y +CONFIG_VAXBI=y CONFIG_VSBUS=y -CONFIG_VAX_4000HC=y +# CONFIG_VAX_4000HC is not set # # Mass storage support # -# CONFIG_MSCP is not set -# CONFIG_TMSCP is not set +CONFIG_MSCP=y +CONFIG_TMSCP=y # # Block devices @@ -66,13 +69,12 @@ # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 -# CONFIG_BLK_DEV_INITRD is not set +CONFIG_BLK_DEV_INITRD=y # # Networking options # -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set +# CONFIG_PACKET is not set # CONFIG_NETLINK is not set # CONFIG_NETFILTER is not set # CONFIG_FILTER is not set @@ -81,6 +83,7 @@ # CONFIG_IP_MULTICAST is not set # CONFIG_IP_ADVANCED_ROUTER is not set CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set CONFIG_IP_PNP_BOOTP=y # CONFIG_IP_PNP_RARP is not set # CONFIG_NET_IPIP is not set @@ -90,6 +93,7 @@ # CONFIG_IPV6 is not set # CONFIG_KHTTPD is not set # CONFIG_ATM is not set +# CONFIG_VLAN_8021Q is not set # # @@ -128,20 +132,23 @@ # # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # -CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_MULTI_LUN is not set CONFIG_SCSI_CONSTANTS=y # # SCSI low-level drivers # CONFIG_SCSI_VAX_5380=y +# CONFIG_SCSI_VAX_53C94 is not set # # Network device support # CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_SLIP is not set +CONFIG_DUMMY=y +CONFIG_SLIP=y +# CONFIG_SLIP_COMPRESSED is not set +# CONFIG_SLIP_SMART is not set CONFIG_PPP=y # @@ -157,62 +164,89 @@ # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set CONFIG_REISERFS_FS=y -# CONFIG_REISERFS_CHECK is not set +CONFIG_REISERFS_CHECK=y +# CONFIG_REISERFS_PROC_INFO is not set # CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set # CONFIG_BFS_FS is not set -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_JBD_DEBUG is not set +# CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set # CONFIG_UMSDOS_FS is not set -CONFIG_VFAT_FS=y +# CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set # CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set # CONFIG_CRAMFS is not set +CONFIG_TMPFS=y # CONFIG_RAMFS is not set CONFIG_ISO9660_FS=y CONFIG_JOLIET=y +# CONFIG_ZISOFS is not set # CONFIG_MINIX_FS is not set +# CONFIG_VXFS_FS is not set # CONFIG_NTFS_FS is not set +# CONFIG_NTFS_RW is not set # CONFIG_HPFS_FS is not set CONFIG_PROC_FS=y # CONFIG_DEVFS_FS is not set +# CONFIG_DEVFS_MOUNT is not set +# CONFIG_DEVFS_DEBUG is not set CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set # CONFIG_ROMFS_FS is not set CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set # CONFIG_UDF_FS is not set -CONFIG_UFS_FS=y +# CONFIG_UDF_RW is not set +# CONFIG_UFS_FS is not set # CONFIG_UFS_FS_WRITE is not set # # Network File Systems # # CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set CONFIG_ROOT_NFS=y # CONFIG_NFSD is not set +# CONFIG_NFSD_V3 is not set CONFIG_SUNRPC=y CONFIG_LOCKD=y # CONFIG_SMB_FS is not set # CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set +# CONFIG_ZISOFS_FS is not set +# CONFIG_ZLIB_FS_INFLATE is not set # # Partition Types # CONFIG_PARTITION_ADVANCED=y # CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set +CONFIG_OSF_PARTITION=y # CONFIG_AMIGA_PARTITION is not set # CONFIG_ATARI_PARTITION is not set # CONFIG_MAC_PARTITION is not set CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y +# CONFIG_BSD_DISKLABEL is not set # CONFIG_MINIX_SUBPARTITION is not set # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set # CONFIG_SGI_PARTITION is not set CONFIG_ULTRIX_PARTITION=y # CONFIG_SUN_PARTITION is not set @@ -238,11 +272,13 @@ # CONFIG_NLS_CODEPAGE_865 is not set # CONFIG_NLS_CODEPAGE_866 is not set # CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_CODEPAGE_932 is not set # CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_949 is not set # CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -250,11 +286,12 @@ # CONFIG_NLS_ISO8859_5 is not set # CONFIG_NLS_ISO8859_6 is not set # CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set # CONFIG_NLS_ISO8859_14 is not set # CONFIG_NLS_ISO8859_15 is not set # CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set # CONFIG_NLS_UTF8 is not set # @@ -267,6 +304,7 @@ CONFIG_SERIAL_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTY_COUNT=256 +CONFIG_RTC=y # # Kernel hacking --- defconfig.old DELETED --- --- defconfig.old.m30 DELETED --- |
From: Dave A. <ai...@us...> - 2002-04-28 20:20:05
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kdb In directory usw-pr-cvs1:/tmp/cvs-serv30677/kdb Log Message: Directory /cvsroot/linux-vax/kernel-2.4/arch/vax/kdb added to the repository |
From: Dave A. <ai...@us...> - 2002-04-28 19:43:46
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv31597 Added Files: kdb.h kdbprivate.h Log Message: DA: kdb support --- NEW FILE --- /* * Real include/asm/kdb.h for Vax. * * Minimalist Kernel Debugger * * Copyright (C) 1999 Silicon Graphics, Inc. * Copyright (C) Scott Lurndal (sl...@en...) * Copyright (C) Scott Foehner (sfo...@en...) * Copyright (C) Srinivasa Thirumalachar (sp...@en...) * * See the file LIA-COPYRIGHT for additional information. * * Written March 1999 by Scott Lurndal at Silicon Graphics, Inc. * * Modifications from: * Richard Bass 1999/07/20 * Many bug fixes and enhancements. * Scott Foehner * Port to ia64 * Scott Lurndal 1999/12/12 * v1.0 restructuring. * David Airlie 2002 * VAX Porting Project */ #if !defined(_ASM_KDB_H) #define _ASM_KDB_H #define KDB_ENTER() asm("\tchms $0\n") struct pt_regs; typedef struct pt_regs *kdb_eframe_t; typedef unsigned long kdb_machreg_t; #define kdb_machreg_fmt "0x%lx" #define kdb_machreg_fmt0 "0x%08lx" #define kdb_bfd_vma_fmt "0x%lx" #define kdb_bfd_vma_fmt0 "0x%08lx" #define kdb_elfw_addr_fmt "0x%x" #define kdb_elfw_addr_fmt0 "0x%08x" #endif /* ASM_KDB_H */ --- NEW FILE --- /* * Minimalist Kernel Debugger * * Copyright (C) 1999 Silicon Graphics, Inc. * Copyright (C) Scott Lurndal (sl...@en...) * Copyright (C) Scott Foehner (sfo...@en...) * Copyright (C) Srinivasa Thirumalachar (sp...@en...) * * See the file LIA-COPYRIGHT for additional information. * * Written March 1999 by Scott Lurndal at Silicon Graphics, Inc. * * Modifications from: * Richard Bass 1999/07/20 * Many bug fixes and enhancements. * Scott Foehner * Port to ia64 * Scott Lurndal 1999/12/12 * v1.0 restructuring. * Keith Owens 2000/05/23 * KDB v1.2 */ #if !defined(_ASM_KDBPRIVATE_H) #define _ASM_KDBPRIVATE_H typedef unsigned char kdb_machinst_t; /* * KDB_MAXBPT describes the total number of breakpoints * supported by this architecure. */ #define KDB_MAXBPT 16 /* * KDB_MAXHARDBPT describes the total number of hardware * breakpoint registers that exist. */ #define KDB_MAXHARDBPT 0 /* * Provide space for KDB_MAX_COMMANDS commands. */ #define KDB_MAX_COMMANDS 125 /* * Platform specific environment entries */ #define KDB_PLATFORM_ENV "IDMODE=vax", "BYTESPERWORD=4", "IDCOUNT=16" /* * Define the direction that the stack grows */ #define KDB_STACK_DIRECTION (-1) /* Stack grows down */ /* * Support for ia32 debug registers */ typedef struct _kdbhard_bp { kdb_machreg_t bph_reg; /* Register this breakpoint uses */ unsigned int bph_free:1; /* Register available for use */ unsigned int bph_data:1; /* Data Access breakpoint */ unsigned int bph_write:1; /* Write Data breakpoint */ unsigned int bph_mode:2; /* 0=inst, 1=write, 2=io, 3=read */ unsigned int bph_length:2; /* 0=1, 1=2, 2=BAD, 3=4 (bytes) */ } kdbhard_bp_t; extern kdbhard_bp_t kdb_hardbreaks[/* KDB_MAXHARDBPT */]; #undef KDB_HAVE_LONGJMP #ifdef KDB_HAVE_LONGJMP /* * Support for setjmp/longjmp */ #define JB_BX 0 #define JB_SI 1 #define JB_DI 2 #define JB_BP 3 #define JB_SP 4 #define JB_PC 5 typedef struct __kdb_jmp_buf { unsigned long regs[6]; /* kdba_setjmp assumes fixed offsets here */ } kdb_jmp_buf; extern int kdba_setjmp(kdb_jmp_buf *); extern void kdba_longjmp(kdb_jmp_buf *, int); extern kdb_jmp_buf kdbjmpbuf[]; #endif /* KDB_HAVE_LONGJMP */ #endif /* !_ASM_KDBPRIVATE_H */ |
From: Andy P. <at...@us...> - 2002-04-25 09:43:54
|
Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv2801/include/asm-vax Modified Files: clock.h dz11.h ipc.h ka43.h ka46.h mv.h namei.h semaphore-helper.h semaphore.h vsa.h Added Files: mc146818rtc.h Log Message: RTC clock driver for vaxstations, 2.5 branch. --- NEW FILE --- /* * mc146818.h. macros for /dev/rtc (see drivers/char/rtc.c * and functions in arch/vax/kernel/time.c * * Copyright atp Mar 2002. * * Adapted from asm-mips/mc146818rtc.h for decstations. * * There are two types of "hardware clock" for the VAX family of * systems. These are the TODR (time of day register) used on the * big vaxes, and the standard CMOS clock, which is based on the * familiar dallas chip, used in the desktop vaxes (KA41, 42, etc.. * * This file only addresses the desktop vax CMOS clock. */ #ifndef _ASM_MC146818RTC_H #define _ASM_MC146818RTC_H #include <linux/config.h> #include <asm/mv.h> /* machine vector */ #ifndef RTC_PORT #define RTC_PORT(x) ((x)) #endif /* access macros for the clock page. */ /* -- we should have these in the mv too, perhaps with a * single rtc_ops structure like the mips, which the * mv entry can point at. However at the mo, we only * have a real implementation for the ka4x cmos clock. */ unsigned char ka4x_clock_read(unsigned long addr); void ka4x_clock_write(unsigned char val, unsigned long addr); #define CMOS_READ(addr) ({ \ ka4x_clock_read(addr); \ }) #define CMOS_WRITE(val, addr) ({ \ ka4x_clock_write(val, addr); \ }) #define RTC_ALWAYS_BCD 0 /* for the time being, unless there is a vsbus int for it */ #define RTC_IRQ 0 #endif /* _ASM_MC146818RTC_H */ Index: clock.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/clock.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- clock.h 24 Apr 2002 08:45:16 -0000 1.1.1.1 +++ clock.h 25 Apr 2002 09:43:48 -0000 1.2 @@ -18,5 +18,8 @@ #define ICCS_INTENABLE (0x00000010) /* enable clock interrupts */ #define ICCS_RUN (0x00000001) /* enable counter */ +/* prototypes for clock handling functions in arch/vax/clock.c */ +void generic_clock_init(void); +void ka4x_clock_init(void); #endif /* _VAX_CLOCK_H_ */ Index: dz11.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/dz11.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: ipc.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/ipc.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: ka43.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/ka43.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: ka46.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/ka46.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: mv.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/mv.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- mv.h 24 Apr 2002 08:45:16 -0000 1.1.1.1 +++ mv.h 25 Apr 2002 09:43:48 -0000 1.2 @@ -36,6 +36,9 @@ void (*init_devices)(void); /* Optional */ const char * (*cpu_type_str)(void); + /* clock routines */ + void (*clock_init)(void); /* called by time_init() to set up RTC */ + unsigned int *clock_base; /* address of clock page for vsbus RTC */ }; #endif /* !__ASSEMBLY__ */ Index: namei.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/namei.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: semaphore-helper.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/semaphore-helper.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: semaphore.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/semaphore.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: vsa.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/vsa.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- vsa.h 24 Apr 2002 08:45:16 -0000 1.1.1.1 +++ vsa.h 25 Apr 2002 09:43:48 -0000 1.2 @@ -35,6 +35,9 @@ +#define VSA_CLOCK_BASE 0x200b0000 #define VSA_BASE_REGS 0x20080000 #define VSA_KA55_BASE_REGS 0x25c00000 + + #endif |
From: Andy P. <at...@us...> - 2002-04-25 09:43:53
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv2801/arch/vax/mm Modified Files: extable.c init.c ioremap.c pgalloc.c pgtable.c Log Message: RTC clock driver for vaxstations, 2.5 branch. Index: extable.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/mm/extable.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: init.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/mm/init.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: ioremap.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/mm/ioremap.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: pgalloc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/mm/pgalloc.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: pgtable.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/mm/pgtable.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 |
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv2801/arch/vax/kernel Modified Files: Makefile cpu_ka410.c cpu_ka42.c cpu_ka43.c cpu_ka46.c cpu_ka55.c cpu_ka630.c cpu_ka640.c cpu_ka650.c cpu_ka660.c cpu_vxt.c entry.S interrupt.c interrupt.h process.c ptrace.c reboot.c regdump.c semaphore.c setup.c syscall.c time.c Added Files: clock.c Log Message: RTC clock driver for vaxstations, 2.5 branch. --- NEW FILE --- /* arch/vax/kernel/clock.c * * Copyright atp 2002. license; GPL * * routines to manipulate the real time clock on vaxes * * There are two sorts of battery backed hardware clock. There is the * TODR (time of day register) found on big vaxes, and the familiar * Dallas CMOS clock on the desktop vaxes * * The init routines are called through the machine vector. See * cpu_kaxx.c for details of that. The callers are time_init() and * the rtc clock driver (drivers/char/rtc.c), using macros defined * in asm/mc146818rtc.h * * Prototypes for some of these functions are in asm/mc146818rtc.h * and some in asm/clock.h. (The ones that are used in the mv * initialisation are in clock.h, and the ones used in mc146818rtc.h * are in that file) * */ #include <linux/config.h> #include <asm/io.h> /* For ioremap() */ #include <asm/mtpr.h> #include <asm/mv.h> #include <asm/clock.h> /* for TODR, if anyone feels like implementing it */ #include <asm/vsa.h> #include <linux/mc146818rtc.h> /* includes asm/mc146818rtc.h */ /* - needed for offsets in debug output */ /* this does nothing, and is a placeholder */ void generic_clock_init(void) { return; } /* map the ROM clock page, and put address in mv */ void ka4x_clock_init(void) { mv->clock_base = ioremap(VSA_CLOCK_BASE,1); /* 1 page */ printk("Mapped RTC clock page (v %8lx p %8lx )\n",mv->clock_base,VSA_CLOCK_BASE); printk("RTC date is %2.2d:%2.2d:%4.4d %2.2d:%2.2d:%2.2d\n", CMOS_READ(RTC_DAY_OF_MONTH), CMOS_READ(RTC_MONTH), CMOS_READ(RTC_YEAR), CMOS_READ(RTC_HOURS), CMOS_READ(RTC_MINUTES), CMOS_READ(RTC_SECONDS)); return; } unsigned char ka4x_clock_read(unsigned long offset) { if (mv->clock_base) return ( mv->clock_base[offset] >> 2 ); return 0; } void ka4x_clock_write(unsigned char val, unsigned long offset) { if (mv->clock_base) mv->clock_base[offset] = (val<<2); return; } Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- Makefile 24 Apr 2002 08:52:47 -0000 1.1.1.1 +++ Makefile 25 Apr 2002 09:43:48 -0000 1.2 @@ -18,7 +18,7 @@ init_task.o reboot.o cpu_generic.o \ cpu_ka630.o cpu_ka640.o cpu_ka650.o cpu_ka660.o \ cpu_ka410.o cpu_ka42.o cpu_ka43.o cpu_ka46.o cpu_ka55.o \ - cpu_vxt.o + cpu_vxt.o clock.o OX_OBJS := MX_OBJS := Index: cpu_ka410.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka410.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- cpu_ka410.c 24 Apr 2002 08:52:47 -0000 1.1.1.1 +++ cpu_ka410.c 25 Apr 2002 09:43:48 -0000 1.2 @@ -14,6 +14,8 @@ #include <asm/mtpr.h> #include <asm/mv.h> #include <asm/vaxcpu.h> +#include <asm/clock.h> /* for clock_init routines */ + void ka410_pre_vm_init(void); void ka410_post_vm_init(void); @@ -43,7 +45,9 @@ NULL, /* init_devices */ - ka410_cpu_type_str + ka410_cpu_type_str, + ka4x_clock_init, /* dallas rtc init */ + NULL /* clock base */ } }; Index: cpu_ka42.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka42.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- cpu_ka42.c 24 Apr 2002 08:52:47 -0000 1.1.1.1 +++ cpu_ka42.c 25 Apr 2002 09:43:48 -0000 1.2 @@ -17,7 +17,8 @@ #include <asm/mv.h> #include <asm/vaxcpu.h> #include <asm/vsa.h> - +#include <asm/clock.h> /* for clock_init routines */ + void ka42_init_devices(void); void ka42_pre_vm_init(void); void ka42_post_vm_init(void); @@ -48,7 +49,9 @@ ka42_init_devices, /* init_devices */ - ka42_cpu_type_str + ka42_cpu_type_str, + ka4x_clock_init, /* dallas rtc init */ + NULL /* clock base */ }, 0 /* System ID Extension from ROM */ }; Index: cpu_ka43.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka43.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- cpu_ka43.c 24 Apr 2002 08:52:47 -0000 1.1.1.1 +++ cpu_ka43.c 25 Apr 2002 09:43:48 -0000 1.2 @@ -26,6 +26,8 @@ #include <asm/mm/tlb.h> #include <asm/ka43.h> +#include <asm/clock.h> /* for clock_init routines */ + void ka43_pre_vm_init(void); void ka43_post_vm_init(void); void ka43_cache_disable(volatile unsigned int *creg_addr); @@ -72,7 +74,10 @@ ka43_init_devices, - ka43_cpu_type_str + ka43_cpu_type_str, + ka4x_clock_init, /* dallas rtc init */ + NULL /* clock base */ + }, 0 /* System ID Extension from ROM */ }; Index: cpu_ka46.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka46.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- cpu_ka46.c 24 Apr 2002 08:52:47 -0000 1.1.1.1 +++ cpu_ka46.c 25 Apr 2002 09:43:48 -0000 1.2 @@ -19,6 +19,8 @@ #include <asm/vsa.h> #include <asm/ka46.h> +#include <asm/clock.h> /* for clock_init routines */ + void ka46_pre_vm_init(void); void ka46_post_vm_init(void); void ka46_cache_disable(void); @@ -53,8 +55,9 @@ NULL, /* mcheck - machine check */ ka46_init_devices, /* init_devices */ - - ka46_cpu_type_str + ka46_cpu_type_str, + ka4x_clock_init, /* dallas rtc init */ + NULL /* clock base */ }, 0 /* System ID Extension from ROM */ }; Index: cpu_ka55.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka55.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- cpu_ka55.c 24 Apr 2002 08:52:47 -0000 1.1.1.1 +++ cpu_ka55.c 25 Apr 2002 09:43:48 -0000 1.2 @@ -18,6 +18,8 @@ #include <asm/vaxcpu.h> #include <asm/vsa.h> +#include <asm/clock.h> /* for clock_init routines */ + void ka55_pre_vm_init(void); void ka55_post_vm_init(void); void ka55_prom_putchar(int); @@ -50,7 +52,9 @@ NULL, /* mcheck - machine check */ ka55_init_devices, /* init_devices */ - ka55_cpu_type_str + ka55_cpu_type_str, + generic_clock_init, + NULL, }, 0 /* System ID Extension from ROM */ }; Index: cpu_ka630.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka630.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- cpu_ka630.c 24 Apr 2002 08:52:47 -0000 1.1.1.1 +++ cpu_ka630.c 25 Apr 2002 09:43:48 -0000 1.2 @@ -15,7 +15,8 @@ #include <asm/mv.h> #include <asm/simple_io.h> #include <asm/vaxcpu.h> - +#include <asm/clock.h> /* for clock_init routines */ + void ka630_pre_vm_init(void); void ka630_post_vm_init(void); const char *ka630_cpu_type_str(void); @@ -43,7 +44,9 @@ NULL, /* init_devices */ - ka630_cpu_type_str + ka630_cpu_type_str, + generic_clock_init, + NULL } }; Index: cpu_ka640.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka640.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- cpu_ka640.c 24 Apr 2002 08:52:47 -0000 1.1.1.1 +++ cpu_ka640.c 25 Apr 2002 09:43:48 -0000 1.2 @@ -15,6 +15,7 @@ #include <asm/mv.h> #include <asm/simple_io.h> #include <asm/vaxcpu.h> +#include <asm/clock.h> /* for clock_init routines */ void ka640_pre_vm_init(void); void ka640_post_vm_init(void); @@ -44,7 +45,10 @@ NULL, /* init_devices */ - ka640_cpu_type_str + ka640_cpu_type_str, + generic_clock_init, + NULL + }, 0 /* System ID Extension from ROM */ }; Index: cpu_ka650.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka650.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- cpu_ka650.c 24 Apr 2002 08:52:47 -0000 1.1.1.1 +++ cpu_ka650.c 25 Apr 2002 09:43:48 -0000 1.2 @@ -15,7 +15,8 @@ #include <asm/mv.h> #include <asm/simple_io.h> #include <asm/vaxcpu.h> - +#include <asm/clock.h> /* for clock_init routines */ + void ka650_pre_vm_init(void); void ka650_post_vm_init(void); const char *ka650_cpu_type_str(void); @@ -44,7 +45,9 @@ NULL, /* init_devices */ - ka650_cpu_type_str + ka650_cpu_type_str, + generic_clock_init, + NULL }, 0 /* System ID Extension from ROM */ }; Index: cpu_ka660.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka660.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- cpu_ka660.c 24 Apr 2002 08:52:47 -0000 1.1.1.1 +++ cpu_ka660.c 25 Apr 2002 09:43:48 -0000 1.2 @@ -17,7 +17,8 @@ #include <asm/mv.h> #include <asm/simple_io.h> #include <asm/vaxcpu.h> - +#include <asm/clock.h> /* for clock_init routines */ + void ka660_pre_vm_init(void); void ka660_post_vm_init(void); const char *ka660_cpu_type_str(void); @@ -48,7 +49,9 @@ NULL, /* init_devices */ - ka660_cpu_type_str + ka660_cpu_type_str, + generic_clock_init, + NULL } }; Index: cpu_vxt.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_vxt.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- cpu_vxt.c 24 Apr 2002 08:52:47 -0000 1.1.1.1 +++ cpu_vxt.c 25 Apr 2002 09:43:48 -0000 1.2 @@ -12,6 +12,7 @@ #include <asm/mv.h> #include <asm/simple_io.h> #include <asm/vaxcpu.h> +#include <asm/clock.h> /* for clock_init routines */ void vxt_pre_vm_init(void); void vxt_post_vm_init(void); @@ -43,7 +44,9 @@ NULL, /* init_devices */ - vxt_cpu_type_str + vxt_cpu_type_str, + generic_clock_init, + NULL } }; Index: entry.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/entry.S,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: interrupt.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/interrupt.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: interrupt.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/interrupt.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: process.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/process.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: ptrace.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/ptrace.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: reboot.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/reboot.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: regdump.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/regdump.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: semaphore.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/semaphore.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.5/arch/vax/kernel/setup.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: syscall.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/syscall.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: time.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/time.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- time.c 24 Apr 2002 08:52:48 -0000 1.1.1.1 +++ time.c 25 Apr 2002 09:43:48 -0000 1.2 @@ -8,6 +8,9 @@ * 22-oct-2000: Erik Mouw * Added some simple do_gettimeofday() and do_settimeofday() * functions. Not tested due to lack of disk space. + * + * 24 Apr 2002: atp. Finally got round to doing this properly. + * We now use the CMOS clock. * */ @@ -18,17 +21,35 @@ #include <linux/kernel.h> #include <linux/sched.h> #include <linux/init.h> +#include <linux/time.h> #include <asm/irq.h> #include <asm/mtpr.h> #include <asm/clock.h> +#include <linux/mc146818rtc.h> +spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED; +extern rwlock_t xtime_lock; +/* last time the cmos clock got updated */ +static long last_rtc_update; + +/* protos */ +static int set_rtc_mmss(unsigned long nowtime); static void do_timer_interrupt(int vec_num, void *dev_id, struct pt_regs *regs); +static unsigned long do_gettimeoffset(void); +void time_init(void); +void do_gettimeofday(struct timeval *tv); +void do_settimeofday(struct timeval *tv); +unsigned long get_cmos_time(void); void __init time_init(void) { - xtime.tv_usec = 0; - xtime.tv_sec = 0; + /* initialise the hardware clock */ + mv->clock_init(); + + /* read cmos time */ + xtime.tv_usec = 0; + xtime.tv_sec = get_cmos_time(); if (request_irq(0x30, do_timer_interrupt, 0, "timer", NULL)) { printk("Panic: unable to register timer interrupt handler\n"); @@ -42,13 +63,91 @@ PR_ICCS); } -/* This is the interrupt service routine for the timer interrupt */ +/* + * In order to set the CMOS clock precisely, set_rtc_mmss has to be + * called 500 ms after the second nowtime has started, because when + * nowtime is written into the registers of the CMOS clock, it will + * jump to the next second precisely 500 ms later. Check the Motorola + * MC146818A or Dallas DS12887 data sheet for details. + * + * BUG: This routine does not handle hour overflow properly; it just + * sets the minutes. Usually you'll only notice that after reboot! + */ +static int set_rtc_mmss(unsigned long nowtime) +{ + int retval = 0; + int real_seconds, real_minutes, cmos_minutes; + unsigned char save_control, save_freq_select; + + /* gets recalled with irq locally disabled */ + spin_lock(&rtc_lock); + save_control = CMOS_READ(RTC_CONTROL); /* tell the clock it's being set */ + CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL); + + save_freq_select = CMOS_READ(RTC_FREQ_SELECT); /* stop and reset prescaler */ + CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT); + + cmos_minutes = CMOS_READ(RTC_MINUTES); + if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) + BCD_TO_BIN(cmos_minutes); + + /* + * since we're only adjusting minutes and seconds, + * don't interfere with hour overflow. This avoids + * messing with unknown time zones but requires your + * RTC not to be off by more than 15 minutes + */ + real_seconds = nowtime % 60; + real_minutes = nowtime / 60; + if (((abs(real_minutes - cmos_minutes) + 15)/30) & 1) + real_minutes += 30; /* correct for half hour time zone */ + real_minutes %= 60; + + if (abs(real_minutes - cmos_minutes) < 30) { + if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { + BIN_TO_BCD(real_seconds); + BIN_TO_BCD(real_minutes); + } + CMOS_WRITE(real_seconds,RTC_SECONDS); + CMOS_WRITE(real_minutes,RTC_MINUTES); + } else { + printk(KERN_WARNING + "set_rtc_mmss: can't update from %d to %d\n", + cmos_minutes, real_minutes); + retval = -1; + } + + /* The following flags have to be released exactly in this order, + * otherwise the DS12887 (popular MC146818A clone with integrated + * battery and quartz) will not reset the oscillator and will not + * update precisely 500 ms later. You won't find this mentioned in + * the Dallas Semiconductor data sheets, but who believes data + * sheets anyway ... -- Markus Kuhn + */ + CMOS_WRITE(save_control, RTC_CONTROL); + CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT); + spin_unlock(&rtc_lock); + + return retval; +} + + +/* This is the interrupt service routine for the timer interrupt */ static void do_timer_interrupt(int vec_num, void *dev_id, struct pt_regs *regs) { unsigned int iccs; - iccs = __mfpr(PR_ICCS); + /* + * Here we are in the timer irq handler. We just have irqs locally + * disabled but we don't know if the timer_bh is running on the other + * CPU. We need to avoid to SMP race with it. NOTE: we don' t need + * the irq version of write_lock because as just said we have irq + * locally disabled. -arca + */ + write_lock(&xtime_lock); + + iccs = __mfpr(PR_ICCS); if (iccs & ICCS_ERROR) { printk("Clock overrun\n"); @@ -56,6 +155,21 @@ do_timer(regs); + /* + * If we have an externally synchronized Linux clock, then update + * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be + * called as close as possible to 500 ms before the new second starts. + */ + if ((time_status & STA_UNSYNC) == 0 && + xtime.tv_sec > last_rtc_update + 660 && + xtime.tv_usec >= 500000 - ((unsigned) tick) / 2 && + xtime.tv_usec <= 500000 + ((unsigned) tick) / 2) { + if (set_rtc_mmss(xtime.tv_sec) == 0) + last_rtc_update = xtime.tv_sec; + else + last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */ + } + /* The ARM says we should do this in the clock ISR. It isn't actually required on the KA650, as the ICCS register is not fully implemented. But I don't know about the other @@ -66,13 +180,11 @@ ICCS_TRANSFER | /* Reload ICR from NICR */ ICCS_RUN, /* ... and go again */ PR_ICCS); - + + write_unlock(&xtime_lock); + } - - - - /* * Function to compensate the time offset caused by calling this * function (I think so, yes). This function definatively needs a real @@ -84,9 +196,6 @@ return 0; } - - - /* * do_gettimeofday() and do_settimeofday() * @@ -112,9 +221,6 @@ } } - - - void do_settimeofday(struct timeval *tv) { unsigned long flags; @@ -142,3 +248,46 @@ restore_flags(flags); } + +/* nicked from the i386 port, but we use the same chip, hee hee */ +unsigned long get_cmos_time(void) +{ + unsigned int year, mon, day, hour, min, sec; + int i; + + spin_lock(&rtc_lock); + /* The Linux interpretation of the CMOS clock register contents: + * When the Update-In-Progress (UIP) flag goes from 1 to 0, the + * RTC registers show the second which has precisely just started. + * Let's hope other operating systems interpret the RTC the same way. + */ + /* read RTC exactly on falling edge of update flag */ + for (i = 0 ; i < 1000000 ; i++) /* may take up to 1 second... */ + if (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP) + break; + for (i = 0 ; i < 1000000 ; i++) /* must try at least 2.228 ms */ + if (!(CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP)) + break; + do { /* Isn't this overkill ? UIP above should guarantee consistency */ + sec = CMOS_READ(RTC_SECONDS); + min = CMOS_READ(RTC_MINUTES); + hour = CMOS_READ(RTC_HOURS); + day = CMOS_READ(RTC_DAY_OF_MONTH); + mon = CMOS_READ(RTC_MONTH); + year = CMOS_READ(RTC_YEAR); + } while (sec != CMOS_READ(RTC_SECONDS)); + if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) + { + BCD_TO_BIN(sec); + BCD_TO_BIN(min); + BCD_TO_BIN(hour); + BCD_TO_BIN(day); + BCD_TO_BIN(mon); + BCD_TO_BIN(year); + } + spin_unlock(&rtc_lock); + if ((year += 1900) < 1970) + year += 100; + return mktime(year, mon, day, hour, min, sec); +} + |
From: Andy P. <at...@us...> - 2002-04-25 09:43:53
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/lib In directory usw-pr-cvs1:/tmp/cvs-serv2801/arch/vax/lib Modified Files: checksum.S clear_user.S console.c copy_tofrom_user.S negdi.c string.c string_user.c strncpy_user.S strnlen_user.S Log Message: RTC clock driver for vaxstations, 2.5 branch. Index: checksum.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/lib/checksum.S,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: clear_user.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/lib/clear_user.S,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: console.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/lib/console.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: copy_tofrom_user.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/lib/copy_tofrom_user.S,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: negdi.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/lib/negdi.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: string.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/lib/string.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: string_user.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/lib/string_user.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: strncpy_user.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/lib/strncpy_user.S,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: strnlen_user.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/lib/strnlen_user.S,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 |
From: Andy P. <at...@us...> - 2002-04-25 09:43:52
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/boot In directory usw-pr-cvs1:/tmp/cvs-serv2801/arch/vax/boot Modified Files: cpu_sel.S Log Message: RTC clock driver for vaxstations, 2.5 branch. Index: cpu_sel.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/boot/cpu_sel.S,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- cpu_sel.S 24 Apr 2002 08:52:47 -0000 1.1.1.1 +++ cpu_sel.S 25 Apr 2002 09:43:48 -0000 1.2 @@ -98,6 +98,9 @@ cmpl $CVAX_Q22_SUBTYPE_KA650, r0 beql cvax_q22_ka650 + cmpl $CVAX_Q22_SUBTYPE_KA655, r0 + beql cvax_q22_ka655 + # Type E/P/L 20040004 at console to get SIDEX value and report to # lin...@mi... .globl unsupported_cvax_q22 @@ -110,6 +113,10 @@ rsb cvax_q22_ka650: + moval mv_ka650, mv + rsb + +cvax_q22_ka655: moval mv_ka650, mv rsb |
From: Andy P. <at...@us...> - 2002-04-25 09:43:52
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/boot/tools In directory usw-pr-cvs1:/tmp/cvs-serv2801/arch/vax/boot/tools Modified Files: setcmdline.c Log Message: RTC clock driver for vaxstations, 2.5 branch. Index: setcmdline.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/boot/tools/setcmdline.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setcmdline.c 24 Apr 2002 08:52:47 -0000 1.1.1.1 +++ setcmdline.c 25 Apr 2002 09:43:48 -0000 1.2 @@ -41,6 +41,7 @@ printf("\n\nSetting kernel command line to:\n\t%s\n\n",buffer); write(kern_fd,buffer,strlen(buffer)); + write(kern_fd,"\0",1); } else { lseek(kern_fd,COMMAND_LINE_OFFSET,SEEK_SET); read(kern_fd,buffer,(COMMAND_LINE_SIZE-1)); |
From: Andy P. <at...@us...> - 2002-04-25 09:43:52
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax In directory usw-pr-cvs1:/tmp/cvs-serv2801/arch/vax Modified Files: config.in Log Message: RTC clock driver for vaxstations, 2.5 branch. Index: config.in =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/config.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- config.in 24 Apr 2002 08:52:47 -0000 1.1.1.1 +++ config.in 25 Apr 2002 09:43:47 -0000 1.2 @@ -170,6 +170,8 @@ fi #bool 'Keyboard Support' CONFIG_KEYBOARD #bool 'Mouse Support' CONFIG_MOUSE +tristate 'Enhanced Real Time Clock Support' CONFIG_RTC + endmenu mainmenu_option next_comment |
From: Andy P. <at...@us...> - 2002-04-25 08:46:24
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv20812/arch/vax/kernel Modified Files: Makefile cpu_ka410.c cpu_ka42.c cpu_ka43.c cpu_ka46.c cpu_ka55.c cpu_ka630.c cpu_ka640.c cpu_ka650.c cpu_ka660.c cpu_vxt.c time.c Added Files: clock.c Log Message: Real time clock driver for vaxstations with dallas chip --- NEW FILE --- /* arch/vax/kernel/clock.c * * Copyright atp 2002. license; GPL * * routines to manipulate the real time clock on vaxes * * There are two sorts of battery backed hardware clock. There is the * TODR (time of day register) found on big vaxes, and the familiar * Dallas CMOS clock on the desktop vaxes * * The init routines are called through the machine vector. See * cpu_kaxx.c for details of that. The callers are time_init() and * the rtc clock driver (drivers/char/rtc.c), using macros defined * in asm/mc146818rtc.h * * Prototypes for some of these functions are in asm/mc146818rtc.h * and some in asm/clock.h. (The ones that are used in the mv * initialisation are in clock.h, and the ones used in mc146818rtc.h * are in that file) * */ #include <linux/config.h> #include <asm/io.h> /* For ioremap() */ #include <asm/mtpr.h> #include <asm/mv.h> #include <asm/clock.h> /* for TODR, if anyone feels like implementing it */ #include <asm/vsa.h> #include <linux/mc146818rtc.h> /* includes asm/mc146818rtc.h */ /* - needed for offsets in debug output */ /* this does nothing, and is a placeholder */ void generic_clock_init(void) { return; } /* map the ROM clock page, and put address in mv */ void ka4x_clock_init(void) { mv->clock_base = ioremap(VSA_CLOCK_BASE,1); /* 1 page */ printk("Mapped RTC clock page (v %8lx p %8lx )\n",mv->clock_base,VSA_CLOCK_BASE); printk("RTC date is %2.2d:%2.2d:%4.4d %2.2d:%2.2d:%2.2d\n", CMOS_READ(RTC_DAY_OF_MONTH), CMOS_READ(RTC_MONTH), CMOS_READ(RTC_YEAR), CMOS_READ(RTC_HOURS), CMOS_READ(RTC_MINUTES), CMOS_READ(RTC_SECONDS)); return; } unsigned char ka4x_clock_read(unsigned long offset) { if (mv->clock_base) return ( mv->clock_base[offset] >> 2 ); return 0; } void ka4x_clock_write(unsigned char val, unsigned long offset) { if (mv->clock_base) mv->clock_base[offset] = (val<<2); return; } Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/Makefile,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Makefile 15 Nov 2001 00:27:00 -0000 1.9 +++ Makefile 25 Apr 2002 08:46:20 -0000 1.10 @@ -18,7 +18,7 @@ init_task.o reboot.o cpu_generic.o \ cpu_ka630.o cpu_ka640.o cpu_ka650.o cpu_ka660.o \ cpu_ka410.o cpu_ka42.o cpu_ka43.o cpu_ka46.o cpu_ka55.o \ - cpu_vxt.o + cpu_vxt.o clock.o OX_OBJS := MX_OBJS := Index: cpu_ka410.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka410.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- cpu_ka410.c 26 Jun 2001 18:59:00 -0000 1.2 +++ cpu_ka410.c 25 Apr 2002 08:46:20 -0000 1.3 @@ -14,6 +14,8 @@ #include <asm/mtpr.h> #include <asm/mv.h> #include <asm/vaxcpu.h> +#include <asm/clock.h> /* for clock_init routines */ + void ka410_pre_vm_init(void); void ka410_post_vm_init(void); @@ -43,7 +45,9 @@ NULL, /* init_devices */ - ka410_cpu_type_str + ka410_cpu_type_str, + ka4x_clock_init, /* dallas rtc init */ + NULL /* clock base */ } }; Index: cpu_ka42.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka42.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- cpu_ka42.c 31 Jul 2001 17:28:26 -0000 1.6 +++ cpu_ka42.c 25 Apr 2002 08:46:20 -0000 1.7 @@ -17,7 +17,8 @@ #include <asm/mv.h> #include <asm/vaxcpu.h> #include <asm/vsa.h> - +#include <asm/clock.h> /* for clock_init routines */ + void ka42_init_devices(void); void ka42_pre_vm_init(void); void ka42_post_vm_init(void); @@ -48,7 +49,9 @@ ka42_init_devices, /* init_devices */ - ka42_cpu_type_str + ka42_cpu_type_str, + ka4x_clock_init, /* dallas rtc init */ + NULL /* clock base */ }, 0 /* System ID Extension from ROM */ }; Index: cpu_ka43.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka43.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- cpu_ka43.c 31 Jul 2001 17:28:26 -0000 1.7 +++ cpu_ka43.c 25 Apr 2002 08:46:20 -0000 1.8 @@ -26,6 +26,8 @@ #include <asm/mm/tlb.h> #include <asm/ka43.h> +#include <asm/clock.h> /* for clock_init routines */ + void ka43_pre_vm_init(void); void ka43_post_vm_init(void); void ka43_cache_disable(volatile unsigned int *creg_addr); @@ -72,7 +74,10 @@ ka43_init_devices, - ka43_cpu_type_str + ka43_cpu_type_str, + ka4x_clock_init, /* dallas rtc init */ + NULL /* clock base */ + }, 0 /* System ID Extension from ROM */ }; Index: cpu_ka46.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka46.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- cpu_ka46.c 5 Mar 2002 22:40:47 -0000 1.10 +++ cpu_ka46.c 25 Apr 2002 08:46:20 -0000 1.11 @@ -19,6 +19,8 @@ #include <asm/vsa.h> #include <asm/ka46.h> +#include <asm/clock.h> /* for clock_init routines */ + void ka46_pre_vm_init(void); void ka46_post_vm_init(void); void ka46_cache_disable(void); @@ -53,8 +55,9 @@ NULL, /* mcheck - machine check */ ka46_init_devices, /* init_devices */ - - ka46_cpu_type_str + ka46_cpu_type_str, + ka4x_clock_init, /* dallas rtc init */ + NULL /* clock base */ }, 0 /* System ID Extension from ROM */ }; Index: cpu_ka55.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka55.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- cpu_ka55.c 4 Sep 2001 03:11:38 -0000 1.5 +++ cpu_ka55.c 25 Apr 2002 08:46:20 -0000 1.6 @@ -18,6 +18,8 @@ #include <asm/vaxcpu.h> #include <asm/vsa.h> +#include <asm/clock.h> /* for clock_init routines */ + void ka55_pre_vm_init(void); void ka55_post_vm_init(void); void ka55_prom_putchar(int); @@ -50,7 +52,9 @@ NULL, /* mcheck - machine check */ ka55_init_devices, /* init_devices */ - ka55_cpu_type_str + ka55_cpu_type_str, + generic_clock_init, + NULL, }, 0 /* System ID Extension from ROM */ }; Index: cpu_ka630.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka630.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- cpu_ka630.c 26 Jun 2001 18:59:00 -0000 1.2 +++ cpu_ka630.c 25 Apr 2002 08:46:20 -0000 1.3 @@ -15,7 +15,8 @@ #include <asm/mv.h> #include <asm/simple_io.h> #include <asm/vaxcpu.h> - +#include <asm/clock.h> /* for clock_init routines */ + void ka630_pre_vm_init(void); void ka630_post_vm_init(void); const char *ka630_cpu_type_str(void); @@ -43,7 +44,9 @@ NULL, /* init_devices */ - ka630_cpu_type_str + ka630_cpu_type_str, + generic_clock_init, + NULL } }; Index: cpu_ka640.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka640.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- cpu_ka640.c 26 Jun 2001 18:59:00 -0000 1.2 +++ cpu_ka640.c 25 Apr 2002 08:46:20 -0000 1.3 @@ -15,6 +15,7 @@ #include <asm/mv.h> #include <asm/simple_io.h> #include <asm/vaxcpu.h> +#include <asm/clock.h> /* for clock_init routines */ void ka640_pre_vm_init(void); void ka640_post_vm_init(void); @@ -44,7 +45,10 @@ NULL, /* init_devices */ - ka640_cpu_type_str + ka640_cpu_type_str, + generic_clock_init, + NULL + }, 0 /* System ID Extension from ROM */ }; Index: cpu_ka650.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka650.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- cpu_ka650.c 20 Apr 2002 12:28:40 -0000 1.3 +++ cpu_ka650.c 25 Apr 2002 08:46:20 -0000 1.4 @@ -15,7 +15,8 @@ #include <asm/mv.h> #include <asm/simple_io.h> #include <asm/vaxcpu.h> - +#include <asm/clock.h> /* for clock_init routines */ + void ka650_pre_vm_init(void); void ka650_post_vm_init(void); const char *ka650_cpu_type_str(void); @@ -44,7 +45,9 @@ NULL, /* init_devices */ - ka650_cpu_type_str + ka650_cpu_type_str, + generic_clock_init, + NULL }, 0 /* System ID Extension from ROM */ }; @@ -99,6 +102,6 @@ const char *ka650_cpu_type_str(void) { - return "KA650/5"; + return "KA650"; } Index: cpu_ka660.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka660.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- cpu_ka660.c 26 Jun 2001 18:59:00 -0000 1.2 +++ cpu_ka660.c 25 Apr 2002 08:46:20 -0000 1.3 @@ -17,7 +17,8 @@ #include <asm/mv.h> #include <asm/simple_io.h> #include <asm/vaxcpu.h> - +#include <asm/clock.h> /* for clock_init routines */ + void ka660_pre_vm_init(void); void ka660_post_vm_init(void); const char *ka660_cpu_type_str(void); @@ -48,7 +49,9 @@ NULL, /* init_devices */ - ka660_cpu_type_str + ka660_cpu_type_str, + generic_clock_init, + NULL } }; Index: cpu_vxt.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_vxt.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- cpu_vxt.c 15 Nov 2001 00:27:00 -0000 1.1 +++ cpu_vxt.c 25 Apr 2002 08:46:20 -0000 1.2 @@ -12,6 +12,7 @@ #include <asm/mv.h> #include <asm/simple_io.h> #include <asm/vaxcpu.h> +#include <asm/clock.h> /* for clock_init routines */ void vxt_pre_vm_init(void); void vxt_post_vm_init(void); @@ -43,7 +44,9 @@ NULL, /* init_devices */ - vxt_cpu_type_str + vxt_cpu_type_str, + generic_clock_init, + NULL } }; Index: time.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/time.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- time.c 26 Jan 2001 00:27:00 -0000 1.2 +++ time.c 25 Apr 2002 08:46:20 -0000 1.3 @@ -8,6 +8,9 @@ * 22-oct-2000: Erik Mouw * Added some simple do_gettimeofday() and do_settimeofday() * functions. Not tested due to lack of disk space. + * + * 24 Apr 2002: atp. Finally got round to doing this properly. + * We now use the CMOS clock. * */ @@ -18,17 +21,35 @@ #include <linux/kernel.h> #include <linux/sched.h> #include <linux/init.h> +#include <linux/time.h> #include <asm/irq.h> #include <asm/mtpr.h> #include <asm/clock.h> +#include <linux/mc146818rtc.h> +spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED; +extern rwlock_t xtime_lock; +/* last time the cmos clock got updated */ +static long last_rtc_update; + +/* protos */ +static int set_rtc_mmss(unsigned long nowtime); static void do_timer_interrupt(int vec_num, void *dev_id, struct pt_regs *regs); +static unsigned long do_gettimeoffset(void); +void time_init(void); +void do_gettimeofday(struct timeval *tv); +void do_settimeofday(struct timeval *tv); +unsigned long get_cmos_time(void); void __init time_init(void) { - xtime.tv_usec = 0; - xtime.tv_sec = 0; + /* initialise the hardware clock */ + mv->clock_init(); + + /* read cmos time */ + xtime.tv_usec = 0; + xtime.tv_sec = get_cmos_time(); if (request_irq(0x30, do_timer_interrupt, 0, "timer", NULL)) { printk("Panic: unable to register timer interrupt handler\n"); @@ -42,13 +63,91 @@ PR_ICCS); } -/* This is the interrupt service routine for the timer interrupt */ +/* + * In order to set the CMOS clock precisely, set_rtc_mmss has to be + * called 500 ms after the second nowtime has started, because when + * nowtime is written into the registers of the CMOS clock, it will + * jump to the next second precisely 500 ms later. Check the Motorola + * MC146818A or Dallas DS12887 data sheet for details. + * + * BUG: This routine does not handle hour overflow properly; it just + * sets the minutes. Usually you'll only notice that after reboot! + */ +static int set_rtc_mmss(unsigned long nowtime) +{ + int retval = 0; + int real_seconds, real_minutes, cmos_minutes; + unsigned char save_control, save_freq_select; + + /* gets recalled with irq locally disabled */ + spin_lock(&rtc_lock); + save_control = CMOS_READ(RTC_CONTROL); /* tell the clock it's being set */ + CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL); + + save_freq_select = CMOS_READ(RTC_FREQ_SELECT); /* stop and reset prescaler */ + CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT); + + cmos_minutes = CMOS_READ(RTC_MINUTES); + if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) + BCD_TO_BIN(cmos_minutes); + + /* + * since we're only adjusting minutes and seconds, + * don't interfere with hour overflow. This avoids + * messing with unknown time zones but requires your + * RTC not to be off by more than 15 minutes + */ + real_seconds = nowtime % 60; + real_minutes = nowtime / 60; + if (((abs(real_minutes - cmos_minutes) + 15)/30) & 1) + real_minutes += 30; /* correct for half hour time zone */ + real_minutes %= 60; + + if (abs(real_minutes - cmos_minutes) < 30) { + if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { + BIN_TO_BCD(real_seconds); + BIN_TO_BCD(real_minutes); + } + CMOS_WRITE(real_seconds,RTC_SECONDS); + CMOS_WRITE(real_minutes,RTC_MINUTES); + } else { + printk(KERN_WARNING + "set_rtc_mmss: can't update from %d to %d\n", + cmos_minutes, real_minutes); + retval = -1; + } + + /* The following flags have to be released exactly in this order, + * otherwise the DS12887 (popular MC146818A clone with integrated + * battery and quartz) will not reset the oscillator and will not + * update precisely 500 ms later. You won't find this mentioned in + * the Dallas Semiconductor data sheets, but who believes data + * sheets anyway ... -- Markus Kuhn + */ + CMOS_WRITE(save_control, RTC_CONTROL); + CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT); + spin_unlock(&rtc_lock); + + return retval; +} + + +/* This is the interrupt service routine for the timer interrupt */ static void do_timer_interrupt(int vec_num, void *dev_id, struct pt_regs *regs) { unsigned int iccs; - iccs = __mfpr(PR_ICCS); + /* + * Here we are in the timer irq handler. We just have irqs locally + * disabled but we don't know if the timer_bh is running on the other + * CPU. We need to avoid to SMP race with it. NOTE: we don' t need + * the irq version of write_lock because as just said we have irq + * locally disabled. -arca + */ + write_lock(&xtime_lock); + + iccs = __mfpr(PR_ICCS); if (iccs & ICCS_ERROR) { printk("Clock overrun\n"); @@ -56,6 +155,21 @@ do_timer(regs); + /* + * If we have an externally synchronized Linux clock, then update + * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be + * called as close as possible to 500 ms before the new second starts. + */ + if ((time_status & STA_UNSYNC) == 0 && + xtime.tv_sec > last_rtc_update + 660 && + xtime.tv_usec >= 500000 - ((unsigned) tick) / 2 && + xtime.tv_usec <= 500000 + ((unsigned) tick) / 2) { + if (set_rtc_mmss(xtime.tv_sec) == 0) + last_rtc_update = xtime.tv_sec; + else + last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */ + } + /* The ARM says we should do this in the clock ISR. It isn't actually required on the KA650, as the ICCS register is not fully implemented. But I don't know about the other @@ -66,13 +180,11 @@ ICCS_TRANSFER | /* Reload ICR from NICR */ ICCS_RUN, /* ... and go again */ PR_ICCS); - + + write_unlock(&xtime_lock); + } - - - - /* * Function to compensate the time offset caused by calling this * function (I think so, yes). This function definatively needs a real @@ -84,9 +196,6 @@ return 0; } - - - /* * do_gettimeofday() and do_settimeofday() * @@ -112,9 +221,6 @@ } } - - - void do_settimeofday(struct timeval *tv) { unsigned long flags; @@ -142,3 +248,46 @@ restore_flags(flags); } + +/* nicked from the i386 port, but we use the same chip, hee hee */ +unsigned long get_cmos_time(void) +{ + unsigned int year, mon, day, hour, min, sec; + int i; + + spin_lock(&rtc_lock); + /* The Linux interpretation of the CMOS clock register contents: + * When the Update-In-Progress (UIP) flag goes from 1 to 0, the + * RTC registers show the second which has precisely just started. + * Let's hope other operating systems interpret the RTC the same way. + */ + /* read RTC exactly on falling edge of update flag */ + for (i = 0 ; i < 1000000 ; i++) /* may take up to 1 second... */ + if (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP) + break; + for (i = 0 ; i < 1000000 ; i++) /* must try at least 2.228 ms */ + if (!(CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP)) + break; + do { /* Isn't this overkill ? UIP above should guarantee consistency */ + sec = CMOS_READ(RTC_SECONDS); + min = CMOS_READ(RTC_MINUTES); + hour = CMOS_READ(RTC_HOURS); + day = CMOS_READ(RTC_DAY_OF_MONTH); + mon = CMOS_READ(RTC_MONTH); + year = CMOS_READ(RTC_YEAR); + } while (sec != CMOS_READ(RTC_SECONDS)); + if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) + { + BCD_TO_BIN(sec); + BCD_TO_BIN(min); + BCD_TO_BIN(hour); + BCD_TO_BIN(day); + BCD_TO_BIN(mon); + BCD_TO_BIN(year); + } + spin_unlock(&rtc_lock); + if ((year += 1900) < 1970) + year += 100; + return mktime(year, mon, day, hour, min, sec); +} + |
From: Andy P. <at...@us...> - 2002-04-25 08:46:24
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv20812/include/asm-vax Modified Files: clock.h mv.h vsa.h Added Files: mc146818rtc.h Log Message: Real time clock driver for vaxstations with dallas chip --- NEW FILE --- /* * mc146818.h. macros for /dev/rtc (see drivers/char/rtc.c * and functions in arch/vax/kernel/time.c * * Copyright atp Mar 2002. * * Adapted from asm-mips/mc146818rtc.h for decstations. * * There are two types of "hardware clock" for the VAX family of * systems. These are the TODR (time of day register) used on the * big vaxes, and the standard CMOS clock, which is based on the * familiar dallas chip, used in the desktop vaxes (KA41, 42, etc.. * * This file only addresses the desktop vax CMOS clock. */ #ifndef _ASM_MC146818RTC_H #define _ASM_MC146818RTC_H #include <linux/config.h> #include <asm/mv.h> /* machine vector */ #ifndef RTC_PORT #define RTC_PORT(x) ((x)) #endif /* access macros for the clock page. */ /* -- we should have these in the mv too, perhaps with a * single rtc_ops structure like the mips, which the * mv entry can point at. However at the mo, we only * have a real implementation for the ka4x cmos clock. */ unsigned char ka4x_clock_read(unsigned long addr); void ka4x_clock_write(unsigned char val, unsigned long addr); #define CMOS_READ(addr) ({ \ ka4x_clock_read(addr); \ }) #define CMOS_WRITE(val, addr) ({ \ ka4x_clock_write(val, addr); \ }) #define RTC_ALWAYS_BCD 0 /* for the time being, unless there is a vsbus int for it */ #define RTC_IRQ 0 #endif /* _ASM_MC146818RTC_H */ Index: clock.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/clock.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- clock.h 17 Jan 2001 16:18:52 -0000 1.1 +++ clock.h 25 Apr 2002 08:46:20 -0000 1.2 @@ -18,5 +18,8 @@ #define ICCS_INTENABLE (0x00000010) /* enable clock interrupts */ #define ICCS_RUN (0x00000001) /* enable counter */ +/* prototypes for clock handling functions in arch/vax/clock.c */ +void generic_clock_init(void); +void ka4x_clock_init(void); #endif /* _VAX_CLOCK_H_ */ Index: mv.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mv.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- mv.h 26 Jun 2001 19:01:11 -0000 1.2 +++ mv.h 25 Apr 2002 08:46:20 -0000 1.3 @@ -36,6 +36,9 @@ void (*init_devices)(void); /* Optional */ const char * (*cpu_type_str)(void); + /* clock routines */ + void (*clock_init)(void); /* called by time_init() to set up RTC */ + unsigned int *clock_base; /* address of clock page for vsbus RTC */ }; #endif /* !__ASSEMBLY__ */ Index: vsa.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/vsa.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- vsa.h 4 Feb 2002 22:55:49 -0000 1.6 +++ vsa.h 25 Apr 2002 08:46:20 -0000 1.7 @@ -35,6 +35,9 @@ +#define VSA_CLOCK_BASE 0x200b0000 #define VSA_BASE_REGS 0x20080000 #define VSA_KA55_BASE_REGS 0x25c00000 + + #endif |
From: Andy P. <at...@us...> - 2002-04-25 08:46:24
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax In directory usw-pr-cvs1:/tmp/cvs-serv20812/arch/vax Modified Files: config.in defconfig Log Message: Real time clock driver for vaxstations with dallas chip Index: config.in =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/config.in,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- config.in 9 Apr 2002 13:50:55 -0000 1.11 +++ config.in 25 Apr 2002 08:46:20 -0000 1.12 @@ -170,6 +170,8 @@ fi #bool 'Keyboard Support' CONFIG_KEYBOARD #bool 'Mouse Support' CONFIG_MOUSE +tristate 'Enhanced Real Time Clock Support' CONFIG_RTC + endmenu mainmenu_option next_comment Index: defconfig =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/defconfig,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- defconfig 9 Apr 2002 13:50:55 -0000 1.9 +++ defconfig 25 Apr 2002 08:46:20 -0000 1.10 @@ -304,6 +304,7 @@ CONFIG_SERIAL_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTY_COUNT=256 +CONFIG_RTC=y # # Kernel hacking |
From: Andy P. <at...@us...> - 2002-04-24 09:13:43
|
Update of /cvsroot/linux-vax/kernel-2.5/net/core In directory usw-pr-cvs1:/tmp/cvs-serv17555/core Log Message: Directory /cvsroot/linux-vax/kernel-2.5/net/core added to the repository |
From: Dave A. <ai...@us...> - 2002-04-20 12:28:45
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv9050/kernel Modified Files: cpu_ka650.c Log Message: DA: get simh at least booting Index: cpu_ka650.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka650.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- cpu_ka650.c 26 Jun 2001 18:59:00 -0000 1.2 +++ cpu_ka650.c 20 Apr 2002 12:28:40 -0000 1.3 @@ -99,6 +99,6 @@ const char *ka650_cpu_type_str(void) { - return "KA650"; + return "KA650/5"; } |
From: Dave A. <ai...@us...> - 2002-04-20 12:28:45
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/boot In directory usw-pr-cvs1:/tmp/cvs-serv9050/boot Modified Files: cpu_sel.S Log Message: DA: get simh at least booting Index: cpu_sel.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/boot/cpu_sel.S,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- cpu_sel.S 17 Nov 2001 00:04:59 -0000 1.6 +++ cpu_sel.S 20 Apr 2002 12:28:40 -0000 1.7 @@ -98,6 +98,9 @@ cmpl $CVAX_Q22_SUBTYPE_KA650, r0 beql cvax_q22_ka650 + cmpl $CVAX_Q22_SUBTYPE_KA655, r0 + beql cvax_q22_ka655 + # Type E/P/L 20040004 at console to get SIDEX value and report to # lin...@mi... .globl unsupported_cvax_q22 @@ -110,6 +113,10 @@ rsb cvax_q22_ka650: + moval mv_ka650, mv + rsb + +cvax_q22_ka655: moval mv_ka650, mv rsb |
From: Dave A. <ai...@us...> - 2002-04-15 22:28:13
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/boot/tools In directory usw-pr-cvs1:/tmp/cvs-serv15217/arch/vax/boot/tools Modified Files: setcmdline.c Log Message: DA: no zero termination on the string means couldn't shorten the command line Index: setcmdline.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/boot/tools/setcmdline.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- setcmdline.c 16 Sep 2001 15:19:27 -0000 1.1 +++ setcmdline.c 15 Apr 2002 22:28:06 -0000 1.2 @@ -41,6 +41,7 @@ printf("\n\nSetting kernel command line to:\n\t%s\n\n",buffer); write(kern_fd,buffer,strlen(buffer)); + write(kern_fd,"\0",1); } else { lseek(kern_fd,COMMAND_LINE_OFFSET,SEEK_SET); read(kern_fd,buffer,(COMMAND_LINE_SIZE-1)); |
From: Dave A. <ai...@us...> - 2002-04-13 16:20:42
|
Update of /cvsroot/linux-vax/kernel-2.4/kernel In directory usw-pr-cvs1:/tmp/cvs-serv864/kernel Modified Files: sysctl.c Log Message: DA: 2.4.16 import should have no affect on VAX port apart Index: sysctl.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/kernel/sysctl.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- sysctl.c 9 Apr 2002 16:34:45 -0000 1.2 +++ sysctl.c 13 Apr 2002 16:20:09 -0000 1.3 @@ -270,6 +270,10 @@ &pgt_cache_water, 2*sizeof(int), 0644, NULL, &proc_dointvec}, {VM_PAGE_CLUSTER, "page-cluster", &page_cluster, sizeof(int), 0644, NULL, &proc_dointvec}, + {VM_MIN_READAHEAD, "min-readahead", + &vm_min_readahead,sizeof(int), 0644, NULL, &proc_dointvec}, + {VM_MAX_READAHEAD, "max-readahead", + &vm_max_readahead,sizeof(int), 0644, NULL, &proc_dointvec}, {0} }; |
From: Dave A. <ai...@us...> - 2002-04-13 16:20:42
|
Update of /cvsroot/linux-vax/kernel-2.4 In directory usw-pr-cvs1:/tmp/cvs-serv864 Modified Files: Makefile Log Message: DA: 2.4.16 import should have no affect on VAX port apart Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Makefile,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- Makefile 11 Apr 2002 14:26:55 -0000 1.14 +++ Makefile 13 Apr 2002 16:20:09 -0000 1.15 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 4 -SUBLEVEL = 15 -EXTRAVERSION =-greased-turkey +SUBLEVEL = 16 +EXTRAVERSION = KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) |
From: Dave A. <ai...@us...> - 2002-04-13 16:20:15
|
Update of /cvsroot/linux-vax/kernel-2.4/include/linux In directory usw-pr-cvs1:/tmp/cvs-serv864/include/linux Modified Files: blkdev.h fs.h mm.h sysctl.h Log Message: DA: 2.4.16 import should have no affect on VAX port apart Index: blkdev.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/blkdev.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- blkdev.h 9 Apr 2002 12:44:16 -0000 1.2 +++ blkdev.h 13 Apr 2002 16:20:10 -0000 1.3 @@ -180,10 +180,6 @@ #define PageAlignSize(size) (((size) + PAGE_SIZE -1) & PAGE_MASK) -/* read-ahead in pages.. */ -#define MAX_READAHEAD 31 -#define MIN_READAHEAD 3 - #define blkdev_entry_to_request(entry) list_entry((entry), struct request, queue) #define blkdev_entry_next_request(entry) blkdev_entry_to_request((entry)->next) #define blkdev_entry_prev_request(entry) blkdev_entry_to_request((entry)->prev) Index: fs.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/fs.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- fs.h 9 Apr 2002 12:44:16 -0000 1.2 +++ fs.h 13 Apr 2002 16:20:10 -0000 1.3 @@ -110,6 +110,7 @@ #define MS_BIND 4096 #define MS_REC 16384 #define MS_VERBOSE 32768 +#define MS_ACTIVE (1<<30) #define MS_NOUSER (1<<31) /* Index: mm.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/mm.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- mm.h 9 Apr 2002 12:44:16 -0000 1.2 +++ mm.h 13 Apr 2002 16:20:11 -0000 1.3 @@ -111,6 +111,10 @@ #define VM_SequentialReadHint(v) ((v)->vm_flags & VM_SEQ_READ) #define VM_RandomReadHint(v) ((v)->vm_flags & VM_RAND_READ) +/* read ahead limits */ +extern int vm_min_readahead; +extern int vm_max_readahead; + /* * mapping from the currently active vm_flags protection bits (the * low four bits) to a page protection mask.. Index: sysctl.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/sysctl.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- sysctl.h 9 Apr 2002 12:44:17 -0000 1.2 +++ sysctl.h 13 Apr 2002 16:20:11 -0000 1.3 @@ -139,7 +139,9 @@ VM_PAGECACHE=7, /* struct: Set cache memory thresholds */ VM_PAGERDAEMON=8, /* struct: Control kswapd behaviour */ VM_PGT_CACHE=9, /* struct: Set page table cache parameters */ - VM_PAGE_CLUSTER=10 /* int: set number of pages to swap together */ + VM_PAGE_CLUSTER=10, /* int: set number of pages to swap together */ + VM_MIN_READAHEAD=12, /* Min file readahead */ + VM_MAX_READAHEAD=13 /* Max file readahead */ }; |
From: Dave A. <ai...@us...> - 2002-04-13 16:20:13
|
Update of /cvsroot/linux-vax/kernel-2.4/include/linux/raid In directory usw-pr-cvs1:/tmp/cvs-serv864/include/linux/raid Modified Files: md_k.h Log Message: DA: 2.4.16 import should have no affect on VAX port apart Index: md_k.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/raid/md_k.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- md_k.h 9 Apr 2002 12:44:17 -0000 1.2 +++ md_k.h 13 Apr 2002 16:20:10 -0000 1.3 @@ -91,7 +91,7 @@ /* * default readahead */ -#define MD_READAHEAD MAX_READAHEAD +#define MD_READAHEAD vm_max_readahead static inline int disk_faulty(mdp_disk_t * d) { |
From: Dave A. <ai...@us...> - 2002-04-13 16:20:13
|
Update of /cvsroot/linux-vax/kernel-2.4/mm In directory usw-pr-cvs1:/tmp/cvs-serv864/mm Modified Files: filemap.c Log Message: DA: 2.4.16 import should have no affect on VAX port apart Index: filemap.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/mm/filemap.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- filemap.c 9 Apr 2002 16:37:20 -0000 1.2 +++ filemap.c 13 Apr 2002 16:20:09 -0000 1.3 @@ -47,6 +47,12 @@ unsigned int page_hash_bits; struct page **page_hash_table; +int vm_max_readahead = 31; +int vm_min_readahead = 3; +EXPORT_SYMBOL(vm_max_readahead); +EXPORT_SYMBOL(vm_min_readahead); + + spinlock_t pagecache_lock ____cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED; /* * NOTE: to avoid deadlocking you must never acquire the pagemap_lru_lock @@ -1134,7 +1140,7 @@ static inline int get_max_readahead(struct inode * inode) { if (!inode->i_dev || !max_readahead[MAJOR(inode->i_dev)]) - return MAX_READAHEAD; + return vm_max_readahead; return max_readahead[MAJOR(inode->i_dev)][MINOR(inode->i_dev)]; } @@ -1317,8 +1323,8 @@ if (filp->f_ramax < needed) filp->f_ramax = needed; - if (reada_ok && filp->f_ramax < MIN_READAHEAD) - filp->f_ramax = MIN_READAHEAD; + if (reada_ok && filp->f_ramax < vm_min_readahead) + filp->f_ramax = vm_min_readahead; if (filp->f_ramax > max_readahead) filp->f_ramax = max_readahead; } |
From: Dave A. <ai...@us...> - 2002-04-13 16:20:13
|
Update of /cvsroot/linux-vax/kernel-2.4/fs In directory usw-pr-cvs1:/tmp/cvs-serv864/fs Modified Files: inode.c super.c Log Message: DA: 2.4.16 import should have no affect on VAX port apart Index: inode.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/fs/inode.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- inode.c 9 Apr 2002 13:11:16 -0000 1.2 +++ inode.c 13 Apr 2002 16:20:09 -0000 1.3 @@ -1065,24 +1065,27 @@ if (inode->i_state != I_CLEAR) BUG(); } else { - if (!list_empty(&inode->i_hash) && sb && sb->s_root) { + if (!list_empty(&inode->i_hash)) { if (!(inode->i_state & (I_DIRTY|I_LOCK))) { list_del(&inode->i_list); list_add(&inode->i_list, &inode_unused); } inodes_stat.nr_unused++; spin_unlock(&inode_lock); - return; - } else { - list_del_init(&inode->i_list); + if (!sb || sb->s_flags & MS_ACTIVE) + return; + write_inode_now(inode, 1); + spin_lock(&inode_lock); + inodes_stat.nr_unused--; list_del_init(&inode->i_hash); - inode->i_state|=I_FREEING; - inodes_stat.nr_inodes--; - spin_unlock(&inode_lock); - if (inode->i_data.nrpages) - truncate_inode_pages(&inode->i_data, 0); - clear_inode(inode); } + list_del_init(&inode->i_list); + inode->i_state|=I_FREEING; + inodes_stat.nr_inodes--; + spin_unlock(&inode_lock); + if (inode->i_data.nrpages) + truncate_inode_pages(&inode->i_data, 0); + clear_inode(inode); } destroy_inode(inode); } Index: super.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/fs/super.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- super.c 9 Apr 2002 13:30:18 -0000 1.2 +++ super.c 13 Apr 2002 16:20:09 -0000 1.3 @@ -462,6 +462,7 @@ lock_super(s); if (!type->read_super(s, data, flags & MS_VERBOSE ? 1 : 0)) goto out_fail; + s->s_flags |= MS_ACTIVE; unlock_super(s); /* tell bdcache that we are going to keep this one */ if (bdev) @@ -614,6 +615,7 @@ lock_super(s); if (!fs_type->read_super(s, data, flags & MS_VERBOSE ? 1 : 0)) goto out_fail; + s->s_flags |= MS_ACTIVE; unlock_super(s); get_filesystem(fs_type); path_release(&nd); @@ -695,6 +697,7 @@ lock_super(s); if (!fs_type->read_super(s, data, flags & MS_VERBOSE ? 1 : 0)) goto out_fail; + s->s_flags |= MS_ACTIVE; unlock_super(s); get_filesystem(fs_type); return s; @@ -739,6 +742,7 @@ dput(root); fsync_super(sb); lock_super(sb); + sb->s_flags &= ~MS_ACTIVE; invalidate_inodes(sb); /* bad name - it should be evict_inodes() */ if (sop) { if (sop->write_super && sb->s_dirt) |
From: Dave A. <ai...@us...> - 2002-04-13 16:09:22
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/ppc/kernel In directory usw-pr-cvs1:/tmp/cvs-serv30376/arch/ppc/kernel Modified Files: entry.S misc.S process.c ptrace.c signal.c smp.c Log Message: DA: 2.4.16 PPC changes no affect on VAX port Index: entry.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/kernel/entry.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- entry.S 10 Apr 2002 15:04:06 -0000 1.2 +++ entry.S 13 Apr 2002 16:09:15 -0000 1.3 @@ -1,5 +1,5 @@ /* - * BK Id: SCCS/s.entry.S 1.22 08/15/01 22:43:06 paulus + * BK Id: SCCS/s.entry.S 1.24 11/23/01 16:38:29 paulus */ /* * PowerPC version @@ -216,6 +216,7 @@ SAVE_8GPRS(14, r1) SAVE_10GPRS(22, r1) mflr r20 /* Return to switch caller */ + stw r20,INT_FRAME_SIZE+4(r1) mfmsr r22 li r0,MSR_FP /* Disable floating-point */ #ifdef CONFIG_ALTIVEC @@ -223,10 +224,12 @@ oris r0,r0,MSR_VEC@h /* Disable altivec */ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) #endif /* CONFIG_ALTIVEC */ + and. r0,r0,r22 /* FP or altivec enabled? */ + beq+ 1f andc r22,r22,r0 mtmsr r22 isync - stw r20,_NIP(r1) +1: stw r20,_NIP(r1) stw r22,_MSR(r1) stw r20,_LINK(r1) mfcr r20 @@ -391,9 +394,9 @@ mfmsr r9 stw r9,8(r1) li r0,0 - ori r0,r0,MSR_EE|MSR_SE|MSR_BE + ori r0,r0,MSR_EE|MSR_SE|MSR_BE|MSR_FE0|MSR_FE1 andc r0,r9,r0 - li r10,MSR_IR|MSR_DR|MSR_FE0|MSR_FE1|MSR_FP + li r10,MSR_IR|MSR_DR|MSR_FP andc r9,r0,r10 SYNC /* disable interrupts so SRR0/1 */ mtmsr r0 /* don't get trashed */ Index: misc.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/kernel/misc.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- misc.S 10 Apr 2002 15:04:06 -0000 1.2 +++ misc.S 13 Apr 2002 16:09:15 -0000 1.3 @@ -1,5 +1,5 @@ /* - * BK Id: SCCS/s.misc.S 1.32 10/18/01 17:29:53 trini + * BK Id: SCCS/s.misc.S 1.34 11/23/01 16:38:29 paulus */ /* * This file contains miscellaneous low-level functions. @@ -866,10 +866,8 @@ sc cmpi 0,r3,0 /* parent or child? */ bnelr /* return if parent */ - li r0,0 /* clear out p->thread.regs */ - stw r0,THREAD+PT_REGS(r2) /* since we don't have user ctx */ - addi r1,r2,TASK_UNION_SIZE-STACK_FRAME_OVERHEAD - stw r0,0(r1) + li r0,0 /* make top-level stack frame */ + stwu r0,-16(r1) mtlr r6 /* fn addr in lr */ mr r3,r4 /* load arg and call fn */ blrl Index: process.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/kernel/process.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- process.c 10 Apr 2002 15:04:10 -0000 1.2 +++ process.c 13 Apr 2002 16:09:15 -0000 1.3 @@ -1,5 +1,5 @@ /* - * BK Id: SCCS/s.process.c 1.31 10/02/01 09:51:41 paulus + * BK Id: SCCS/s.process.c 1.34 11/23/01 16:38:29 paulus */ /* * linux/arch/ppc/kernel/process.c @@ -336,9 +336,10 @@ /* for kernel thread, set `current' and stackptr in new task */ childregs->gpr[1] = sp + sizeof(struct pt_regs); childregs->gpr[2] = (unsigned long) p; - } + p->thread.regs = NULL; /* no user register state */ + } else + p->thread.regs = childregs; childregs->gpr[3] = 0; /* Result from fork() */ - p->thread.regs = childregs; sp -= STACK_FRAME_OVERHEAD; childframe = sp; @@ -463,6 +464,27 @@ break; } printk("\n"); +} + +void show_trace_task(struct task_struct *tsk) +{ + unsigned long stack_top = (unsigned long) tsk + THREAD_SIZE; + unsigned long sp, prev_sp; + int count = 0; + + if (tsk == NULL) + return; + sp = (unsigned long) &tsk->thread.ksp; + do { + prev_sp = sp; + sp = *(unsigned long *)sp; + if (sp <= prev_sp || sp >= stack_top || (sp & 3) != 0) + break; + if (count > 0) + printk("[%08lx] ", *(unsigned long *)(sp + 4)); + } while (++count < 16); + if (count > 1) + printk("\n"); } #if 0 Index: ptrace.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/kernel/ptrace.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ptrace.c 10 Apr 2002 15:04:10 -0000 1.2 +++ ptrace.c 13 Apr 2002 16:09:15 -0000 1.3 @@ -1,5 +1,5 @@ /* - * BK Id: SCCS/s.ptrace.c 1.8 07/07/01 17:00:08 paulus + * BK Id: SCCS/s.ptrace.c 1.12 11/23/01 16:38:30 paulus */ /* * linux/arch/ppc/kernel/ptrace.c @@ -132,14 +132,9 @@ ret = ptrace_attach(child); goto out_tsk; } - ret = -ESRCH; - if (!(child->ptrace & PT_PTRACED)) - goto out_tsk; - if (child->state != TASK_STOPPED) { - if (request != PTRACE_KILL) - goto out_tsk; - } - if (child->p_pptr != current) + + ret = ptrace_check_attach(child, request == PTRACE_KILL); + if (ret < 0) goto out_tsk; switch (request) { Index: signal.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/kernel/signal.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- signal.c 10 Apr 2002 15:04:10 -0000 1.2 +++ signal.c 13 Apr 2002 16:09:15 -0000 1.3 @@ -1,5 +1,5 @@ /* - * BK Id: SCCS/s.signal.c 1.7 05/17/01 18:14:22 cort + * BK Id: SCCS/s.signal.c 1.10 11/23/01 16:38:30 paulus */ /* * linux/arch/ppc/kernel/signal.c @@ -180,7 +180,7 @@ siginitset(&new_ka.sa.sa_mask, mask); } - ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); + ret = do_sigaction(sig, (act? &new_ka: NULL), (oact? &old_ka: NULL)); if (!ret && oact) { if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) || @@ -254,6 +254,8 @@ current->blocked = set; recalc_sigpending(current); spin_unlock_irq(¤t->sigmask_lock); + if (regs->msr & MSR_FP) + giveup_fpu(current); rt_sf++; /* Look at next rt_sigframe */ if (rt_sf == (struct rt_sigframe *)(sigctx.regs)) { @@ -263,8 +265,6 @@ * see handle_signal() */ sr = (struct sigregs *) sigctx.regs; - if (regs->msr & MSR_FP ) - giveup_fpu(current); if (copy_from_user(saved_regs, &sr->gp_regs, sizeof(sr->gp_regs))) goto badframe; @@ -298,6 +298,7 @@ if (get_user(prevsp, &sr->gp_regs[PT_R1]) || put_user(prevsp, (unsigned long *) regs->gpr[1])) goto badframe; + current->thread.fpscr = 0; } return ret; @@ -328,6 +329,7 @@ goto badframe; flush_icache_range((unsigned long) &frame->tramp[0], (unsigned long) &frame->tramp[2]); + current->thread.fpscr = 0; /* turn off all fp exceptions */ /* Retrieve rt_sigframe from stack and set up registers for signal handler @@ -379,13 +381,13 @@ current->blocked = set; recalc_sigpending(current); spin_unlock_irq(¤t->sigmask_lock); + if (regs->msr & MSR_FP ) + giveup_fpu(current); sc++; /* Look at next sigcontext */ if (sc == (struct sigcontext_struct *)(sigctx.regs)) { /* Last stacked signal - restore registers */ sr = (struct sigregs *) sigctx.regs; - if (regs->msr & MSR_FP ) - giveup_fpu(current); if (copy_from_user(saved_regs, &sr->gp_regs, sizeof(sr->gp_regs))) goto badframe; @@ -413,6 +415,7 @@ if (get_user(prevsp, &sr->gp_regs[PT_R1]) || put_user(prevsp, (unsigned long *) regs->gpr[1])) goto badframe; + current->thread.fpscr = 0; } return ret; @@ -431,8 +434,8 @@ if (verify_area(VERIFY_WRITE, frame, sizeof(*frame))) goto badframe; - if (regs->msr & MSR_FP) - giveup_fpu(current); + if (regs->msr & MSR_FP) + giveup_fpu(current); if (__copy_to_user(&frame->gp_regs, regs, GP_REGS_SIZE) || __copy_to_user(&frame->fp_regs, current->thread.fpr, ELF_NFPREG * sizeof(double)) @@ -441,6 +444,7 @@ goto badframe; flush_icache_range((unsigned long) &frame->tramp[0], (unsigned long) &frame->tramp[2]); + current->thread.fpscr = 0; /* turn off all fp exceptions */ newsp -= __SIGNAL_FRAMESIZE; if (put_user(regs->gpr[1], (unsigned long *)newsp) Index: smp.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/kernel/smp.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- smp.c 10 Apr 2002 15:04:10 -0000 1.2 +++ smp.c 13 Apr 2002 16:09:15 -0000 1.3 @@ -1,5 +1,5 @@ /* - * BK Id: SCCS/s.smp.c 1.34 10/11/01 12:06:01 trini + * BK Id: SCCS/s.smp.c 1.37 11/23/01 16:38:30 paulus */ /* * Smp support for ppc. @@ -37,8 +37,6 @@ #include <asm/residual.h> #include <asm/time.h> -#include "open_pic.h" - int smp_threads_ready; volatile int smp_commenced; int smp_num_cpus = 1; @@ -324,21 +322,8 @@ struct pt_regs regs; /* create a process for the processor */ - /* we don't care about the values in regs since we'll - never reschedule the forked task. */ - /* We DO care about one bit in the pt_regs we - pass to do_fork. That is the MSR_FP bit in - regs.msr. If that bit is on, then do_fork - (via copy_thread) will call giveup_fpu. - giveup_fpu will get a pointer to our (current's) - last register savearea via current->thread.regs - and using that pointer will turn off the MSR_FP, - MSR_FE0 and MSR_FE1 bits. At this point, this - pointer is pointing to some arbitrary point within - our stack. */ - + /* only regs.msr is actually used, and 0 is OK for it */ memset(®s, 0, sizeof(struct pt_regs)); - if (do_fork(CLONE_VM|CLONE_PID, 0, ®s, 0) < 0) panic("failed fork for CPU %d", i); p = init_task.prev_task; @@ -505,8 +490,6 @@ cpu_callin_map[cpu] = 1; smp_ops->setup_cpu(cpu); - - init_idle(); /* * This cpu is now "online". Only set them online |