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...> - 2001-01-23 23:46:26
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv29343 Modified Files: cache.h Log Message: No point in duplicating stuff from <linux/cache.h> Index: cache.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/cache.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** cache.h 2001/01/17 16:18:52 1.1 --- cache.h 2001/01/23 23:46:43 1.2 *************** *** 8,15 **** #define L1_CACHE_BYTES 32 /* a guess */ - #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) - - - #define SMP_CACHE_BYTES L1_CACHE_BYTES - #endif /* _ASM_VAX_CACHE_H */ --- 8,10 ---- |
From: Kenn H. <ke...@us...> - 2001-01-23 23:42:09
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv28620 Modified Files: init.h Log Message: Obsoleted by <linux/init.h> Index: init.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/init.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** init.h 2001/01/23 16:51:27 1.2 --- init.h 2001/01/23 23:42:25 1.3 *************** *** 1,20 **** ! #ifndef _VAX_INIT_H ! #define _VAX_INIT_H ! ! #ifndef MODULE ! #define __init __attribute__ ((__section__ (".text.init"))) ! #define __initdata __attribute__ ((__section__ (".data.init"))) ! #define __initfunc(__arginit) \ ! __arginit __init; \ ! __arginit ! ! /* For assembly routines */ ! #define __INIT .section .text.init,"ax" ! #define __FINIT .previous ! #define __INITDATA .section .data.init,"a" ! #endif ! ! /* This is now defined in linux/cache.h */ ! /* #define __cacheline_aligned __attribute__((__aligned__(32))) */ ! ! #endif --- 1 ---- ! #error "<asm/init.h> should never be used - use <linux/init.h> instead" |
From: Andy P. <at...@us...> - 2001-01-23 16:54:08
|
Update of /cvsroot/linux-vax/kernel-2.4/include/linux In directory usw-pr-cvs1:/tmp/cvs-serv11154/linux Modified Files: elf.h Log Message: Add the VAX ELF ABI machine number to common elf.h (see tools/src/include/elf/common.h) - Still need to add all the applicable VAX relocs. Index: elf.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/elf.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** elf.h 2001/01/14 16:44:01 1.1.1.1 --- elf.h 2001/01/23 16:54:24 1.2 *************** *** 75,78 **** --- 75,80 ---- #define EM_X8664 62 /* AMD x86-64 */ + #define EM_VAX 75 /* Digital Equipment Corp VAX - used to be 780 */ + /* * This is an interim value that we will use until the committee comes |
From: Andy P. <at...@us...> - 2001-01-23 16:51:11
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv10632/asm-vax Modified Files: init.h ptrace.h user.h Added Files: elf.h Log Message: Add elf.h. Define user_regs_struct in ptrace.h --- NEW FILE --- #ifndef __ASM_VAX_ELF_H #define __ASM_VAX_ELF_H /* * ELF register definitions.. * * added atp Jan 2001. * */ #include <asm/ptrace.h> #include <asm/user.h> #include <linux/utsname.h> typedef unsigned long elf_greg_t; /* 15 general registers plus pc */ #define ELF_NGREG 16 typedef elf_greg_t elf_gregset_t[ELF_NGREG]; /* FIXME: fpregs. */ /* * This is used to ensure we don't load something for the wrong architecture. */ #define elf_check_arch(x) ((x)->e_machine == EM_VAX) /* * These are used to set parameters in the core dumps. */ #define ELF_CLASS ELFCLASS32 #define ELF_DATA ELFDATA2LSB #define ELF_ARCH EM_VAX /* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx contains a pointer to a function which might be registered using `atexit'. This provides a mean for the dynamic linker to call DT_FINI functions for shared libraries that have been loaded before the code runs. A value of 0 tells we have no such handler. Alpha uses this as an atexit flag too, and so shall we. */ #define ELF_PLAT_INIT(_r) _r->r0 = 0 #define USE_ELF_CORE_DUMP /* hmm, pagelets.... */ #define ELF_EXEC_PAGESIZE PAGE_SIZE /* This is the location that an ET_DYN program is loaded if exec'ed. Typical use of this is to invoke "./ld.so someprog" to test out a new version of the loader. We need to make sure that it is out of the way of the program that it will "exec", and that there is sufficient room for the brk. */ /* FIXME: A more sensible solution, given our need to keep virtual * address space reasonably contiguous would be good. atp jan 2001 */ #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) /* Wow, the "main" arch needs arch dependent functions too.. :) */ /* regs is struct pt_regs, pr_reg is elf_gregset_t (which is now struct_user_regs, they are different) * - atp at present (jan 2001) struct pt_regs and struct user_regs_struct * (see ptrace.h and user.h) are both the same. So this is a null op really. * However I'm keeping it here for when we need to modify it. */ #define ELF_CORE_COPY_REGS(pr_reg, regs) \ pr_reg[0] = regs->r0; \ pr_reg[1] = regs->r1; \ pr_reg[2] = regs->r2; \ pr_reg[3] = regs->r3; \ pr_reg[4] = regs->r4; \ pr_reg[5] = regs->r5; \ pr_reg[6] = regs->r6; \ pr_reg[7] = regs->r7; \ pr_reg[8] = regs->r8; \ pr_reg[9] = regs->r9; \ pr_reg[10] = regs->r10; \ pr_reg[11] = regs->r11; \ pr_reg[12] = regs->ap; \ pr_reg[13] = regs->fp; \ pr_reg[14] = regs->sp; \ pr_reg[15] = regs->pc; \ pr_reg[16] = regs->psl; /* This yields a mask that user programs can use to figure out what instruction set this CPU supports. This could be done in user space, but it's not easy, and we've already done it here. */ /* FIXME: This needs an addition to the vax mv structure, * if there is any point in testing for subsetting etc..*/ #define ELF_HWCAP (0) /* This yields a string that ld.so will use to load implementation specific libraries for optimization. This is more specific in intent than poking at uname or /proc/cpuinfo. For the moment, we have only optimizations for the Intel generations, but that could change... */ #define ELF_PLATFORM (system_utsname.machine) #ifdef __KERNEL__ #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) #endif #endif Index: init.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/init.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** init.h 2001/01/17 16:18:52 1.1 --- init.h 2001/01/23 16:51:27 1.2 *************** *** 15,19 **** #endif ! #define __cacheline_aligned __attribute__((__aligned__(32))) #endif --- 15,20 ---- #endif ! /* This is now defined in linux/cache.h */ ! /* #define __cacheline_aligned __attribute__((__aligned__(32))) */ #endif Index: ptrace.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/ptrace.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** ptrace.h 2001/01/17 16:18:52 1.1 --- ptrace.h 2001/01/23 16:51:27 1.2 *************** *** 27,30 **** --- 27,35 ---- }; + /* ok, this may need a FIXME: later. user_regs_struct is the + * regs structure expected by userspace. see comment in asm-i386/user.h */ + + typedef struct pt_regs user_regs_struct; + /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ #define PTRACE_GETREGS 12 Index: user.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/user.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** user.h 2001/01/17 16:18:52 1.1 --- user.h 2001/01/23 16:51:27 1.2 *************** *** 50,52 **** #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) ! #endif /* _ALPHA_USER_H */ --- 50,52 ---- #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) ! #endif /* __VAX_USER_H */ |
From: Andy P. <at...@us...> - 2001-01-22 16:46:43
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv12736 Modified Files: processor.h pcb.h Log Message: Changes to clear alpha port cruft from thread_struct and to re-define the INIT_THREAD and INIT_PCB macros. Index: processor.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/processor.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** processor.h 2001/01/20 22:00:20 1.4 --- processor.h 2001/01/22 16:46:55 1.5 *************** *** 51,86 **** /* From alpha port: FIXME: this needs sorting. */ /* I doubt we need flags ?(alpha specific) or fs */ struct thread_struct { struct vax_pcb pcb; - /* - * The fields below are Linux-specific: - * - * bit 1..5: IEEE_TRAP_ENABLE bits (see fpu.h) - * bit 6..8: UAC bits (see sysinfo.h) - * bit 17..21: IEEE_STATUS_MASK bits (see fpu.h) - * bit 63: die_if_kernel recursion lock - */ - unsigned long flags; - - /* Perform syscall argument validation (get/set_fs). */ - mm_segment_t fs; - - /* Breakpoint handling for ptrace. */ - unsigned long bpt_addr[2]; - unsigned int bpt_insn[2]; - int bpt_nsaved; }; ! /* FIXME: */ ! #define INIT_THREAD { (struct pt_regs *) 0, \ ! { 0,{{0},{0},{0},{0},{0},{0},{0},{0},{0},{0}, \ ! {0},{0},{0},{0},{0},{0}}}, \ ! 0, 0, \ ! sizeof(init_stack) + (__u32) &init_stack, \ ! (__pa((__u32) &swapper_pg_dir[0]) + _SEGMENT_TABLE),\ ! 0,0,0, \ ! (mm_segment_t) { 0,1}, \ ! (per_struct) {{{{0,}}},0,0,0,0,{{0,}}} \ ! } /* FIXME: tune this to the VAX memory map */ --- 51,64 ---- /* From alpha port: FIXME: this needs sorting. */ /* I doubt we need flags ?(alpha specific) or fs */ + /* atp Jan 2000 - I'm going to restrict this to + * just the pcb at present. As we need + * more per-thread data, we can add it. + */ struct thread_struct { struct vax_pcb pcb; }; ! /* At present only the pcb is here. */ ! #define INIT_THREAD { INIT_PCB } /* FIXME: tune this to the VAX memory map */ Index: pcb.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/pcb.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pcb.h 2001/01/17 16:18:52 1.1 --- pcb.h 2001/01/22 16:46:55 1.2 *************** *** 35,37 **** --- 35,65 ---- }; + /* Process control block initialiser used in INIT_THREAD*/ + #define INIT_PCB { \ + ksp: 0, \ + esp: 0, \ + ssp: 0, /* null ? */ \ + usp: 0, \ + r0: 0, \ + r1: 0, \ + r2: 0, \ + r3: 0, \ + r4: 0, \ + r5: 0, \ + r6: 0, \ + r7: 0, \ + r8: 0, \ + r9: 0, \ + r10: 0, \ + r11: 0, \ + ap: 0, \ + fp: 0, \ + pc: 0, \ + psl: 0, \ + p0br: 0, \ + p0lr: 0, /* bits 0:21. astlvl is bits 24:26 */ \ + p1br: 0, \ + p1lr: 0 /* pme is bit 31 *: */ \ + } + #endif /* _VAX_PCB_H */ |
From: Kenn H. <ke...@us...> - 2001-01-21 19:54:44
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/vsbus In directory usw-pr-cvs1:/tmp/cvs-serv21095/vsbus Log Message: Directory /cvsroot/linux-vax/kernel-2.4/drivers/vsbus added to the repository |
From: Dave A. <ai...@us...> - 2001-01-20 23:45:17
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/net In directory usw-pr-cvs1:/tmp/cvs-serv30738/drivers/net Modified Files: vaxlance.c Log Message: updated to 2.4 .. not tested of course should compile though.. Index: vaxlance.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/net/vaxlance.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** vaxlance.c 2001/01/17 16:00:11 1.1 --- vaxlance.c 2001/01/20 23:45:25 1.2 *************** *** 215,219 **** volatile struct lance_init_block *init_block; volatile unsigned long *dma_ptr_reg; ! int rx_new, tx_new; int rx_old, tx_old; --- 215,221 ---- volatile struct lance_init_block *init_block; volatile unsigned long *dma_ptr_reg; ! ! spinlock_t lock; ! int rx_new, tx_new; int rx_old, tx_old; *************** *** 223,229 **** unsigned short busmaster_regval; ! struct device *dev; /* Backpointer */ ! struct lance_private *next_module; ! struct timer_list multicast_timer; /* Pointers to the ring buffers as seen from the CPU */ --- 225,231 ---- unsigned short busmaster_regval; ! struct net_device *dev; /* Backpointer */ ! struct lance_private *next_module; ! struct timer_list multicast_timer; /* Pointers to the ring buffers as seen from the CPU */ *************** *** 269,275 **** { volatile struct lance_regs *ll = lp->ll; ! int leptr; ! leptr = lp->init_block; /* FIXME: This function needs a re-write for VAX, --- 271,277 ---- { volatile struct lance_regs *ll = lp->ll; ! unsigned long leptr; ! leptr = (unsigned long)lp->init_block; /* FIXME: This function needs a re-write for VAX, *************** *** 297,303 **** void cp_to_buf(void *to, const void *from, __kernel_size_t len) { - unsigned short *tp, *fp, clen; - unsigned char *rtp, *rfp; - memcpy(to, from, len); } --- 299,302 ---- *************** *** 305,317 **** void cp_from_buf(void *to, unsigned char *from, int len) { - unsigned short *tp, *fp, clen; - unsigned char *rtp, *rfp; - memcpy(to, from, len); } /* Setup the Lance Rx and Tx rings */ ! /* Sets dev->tbusy */ ! static void lance_init_ring(struct device *dev) { struct lance_private *lp = (struct lance_private *) dev->priv; --- 304,312 ---- void cp_from_buf(void *to, unsigned char *from, int len) { memcpy(to, from, len); } /* Setup the Lance Rx and Tx rings */ ! static void lance_init_ring(struct net_device *dev) { struct lance_private *lp = (struct lance_private *) dev->priv; *************** *** 323,327 **** lp->init_block=ib; /* Lock out other processes while setting up hardware */ ! dev->tbusy = 1; lp->rx_new = lp->tx_new = 0; lp->rx_old = lp->tx_old = 0; --- 318,322 ---- lp->init_block=ib; /* Lock out other processes while setting up hardware */ ! netif_stop_queue(dev); lp->rx_new = lp->tx_new = 0; lp->rx_old = lp->tx_old = 0; *************** *** 417,421 **** } ! static int lance_rx(struct device *dev) { struct lance_private *lp = (struct lance_private *) dev->priv; --- 412,416 ---- } ! static int lance_rx(struct net_device *dev) { struct lance_private *lp = (struct lance_private *) dev->priv; *************** *** 500,504 **** } ! static int lance_tx(struct device *dev) { struct lance_private *lp = (struct lance_private *) dev->priv; --- 495,499 ---- } ! static void lance_tx(struct net_device *dev) { struct lance_private *lp = (struct lance_private *) dev->priv; *************** *** 511,514 **** --- 506,511 ---- j = lp->tx_old; + spin_lock(&lp->lock); + for (i = j; i != lp->tx_new; i = j) { td = &ib->btx_ring[i]; *************** *** 535,539 **** load_csrs(lp); init_restart_lance(lp); ! return 0; } /* Buffer errors and underflows turn off the --- 532,536 ---- load_csrs(lp); init_restart_lance(lp); ! goto out; } /* Buffer errors and underflows turn off the *************** *** 551,555 **** load_csrs(lp); init_restart_lance(lp); ! return 0; } } else if ((td->tmd1_bits & LE_T1_POK) == LE_T1_POK) { --- 548,552 ---- load_csrs(lp); init_restart_lance(lp); ! goto out; } } else if ((td->tmd1_bits & LE_T1_POK) == LE_T1_POK) { *************** *** 572,589 **** } lp->tx_old = j; ! return 0; } static void lance_interrupt(const int irq, void *dev_id, struct pt_regs *regs) { ! struct device *dev = (struct device *) dev_id; struct lance_private *lp = (struct lance_private *) dev->priv; volatile struct lance_regs *ll = lp->ll; int csr0; - - if (dev->interrupt) - printk("%s: again\n", dev->name); - - dev->interrupt = 1; writereg(&ll->rap, LE_CSR0); --- 569,586 ---- } lp->tx_old = j; ! out: ! if (netif_queue_stopped(dev) && ! TX_BUFFS_AVAIL > 0) ! netif_wake_queue(dev); ! ! spin_unlock(&lp->lock); } static void lance_interrupt(const int irq, void *dev_id, struct pt_regs *regs) { ! struct net_device *dev = (struct net_device *) dev_id; struct lance_private *lp = (struct lance_private *) dev->priv; volatile struct lance_regs *ll = lp->ll; int csr0; writereg(&ll->rap, LE_CSR0); *************** *** 603,611 **** if (csr0 & LE_C0_TINT) lance_tx(dev); ! ! if ((TX_BUFFS_AVAIL >= 0) && dev->tbusy) { ! dev->tbusy = 0; ! mark_bh(NET_BH); ! } if (csr0 & LE_C0_BABL) lp->stats.tx_errors++; --- 600,604 ---- if (csr0 & LE_C0_TINT) lance_tx(dev); ! if (csr0 & LE_C0_BABL) lp->stats.tx_errors++; *************** *** 633,646 **** load_csrs(lp); init_restart_lance(lp); ! dev->tbusy = 0; } writereg(&ll->rdp, LE_C0_INEA); writereg(&ll->rdp, LE_C0_INEA); - dev->interrupt = 0; } ! struct device *last_dev = 0; ! static int lance_open(struct device *dev) { volatile struct lance_init_block *ib = (struct lance_init_block *) (dev->mem_start); --- 626,638 ---- load_csrs(lp); init_restart_lance(lp); ! netif_wake_queue(dev); } writereg(&ll->rdp, LE_C0_INEA); writereg(&ll->rdp, LE_C0_INEA); } ! struct net_device *last_dev = 0; ! static int lance_open(struct net_device *dev) { volatile struct lance_init_block *ib = (struct lance_init_block *) (dev->mem_start); *************** *** 673,679 **** load_csrs(lp); ! dev->tbusy = 0; ! dev->interrupt = 0; ! dev->start = 1; status = init_restart_lance(lp); --- 665,669 ---- load_csrs(lp); ! netif_start_queue(dev); status = init_restart_lance(lp); *************** *** 687,698 **** } ! static int lance_close(struct device *dev) { struct lance_private *lp = (struct lance_private *) dev->priv; volatile struct lance_regs *ll = lp->ll; ! dev->start = 0; ! dev->tbusy = 1; ! del_timer(&lp->multicast_timer); /* Stop the card */ --- 677,687 ---- } ! static int lance_close(struct net_device *dev) { struct lance_private *lp = (struct lance_private *) dev->priv; volatile struct lance_regs *ll = lp->ll; ! netif_stop_queue(dev); ! del_timer_sync(&lp->multicast_timer); /* Stop the card */ *************** *** 707,711 **** } ! static inline int lance_reset(struct device *dev) { struct lance_private *lp = (struct lance_private *) dev->priv; --- 696,700 ---- } ! static inline int lance_reset(struct net_device *dev) { struct lance_private *lp = (struct lance_private *) dev->priv; *************** *** 720,726 **** load_csrs(lp); dev->trans_start = jiffies; - dev->interrupt = 0; - dev->start = 1; - dev->tbusy = 0; status = init_restart_lance(lp); #ifdef DEBUG_DRIVER --- 709,712 ---- *************** *** 730,775 **** } ! static int lance_start_xmit(struct sk_buff *skb, struct device *dev) { struct lance_private *lp = (struct lance_private *) dev->priv; volatile struct lance_regs *ll = lp->ll; - volatile struct lance_init_block *ib; - unsigned long flags; - int entry, skblen, len; - int status = 0; - static int outs; - int csr0; ! ib = (struct lance_init_block *) (dev->mem_start); ! writereg(&ll->rap, LE_CSR0); ! csr0 = ll->rdp; - /* Transmitter timeout, serious problems */ - if (dev->tbusy) { - int tickssofar = jiffies - dev->trans_start; - - if (tickssofar < 100) { - status = -1; - } else { - printk("%s: transmit timed out, status %04x, reset\n", - dev->name, ll->rdp); - lance_reset(dev); - } - return status; - } - /* Block a timer-based transmit from overlapping. */ - if (test_and_set_bit(0, (void *) &dev->tbusy) != 0) { - printk("Transmitter access conflict.\n"); - return -1; - } skblen = skb->len; ! save_flags(flags); ! cli(); ! if (!TX_BUFFS_AVAIL) { ! restore_flags(flags); ! printk("lance: No Buffs available\n"); ! return -1; ! } len = (skblen <= ETH_ZLEN) ? ETH_ZLEN : skblen; --- 716,739 ---- } ! static void lance_tx_timeout(struct net_device *dev) { struct lance_private *lp = (struct lance_private *) dev->priv; volatile struct lance_regs *ll = lp->ll; ! printk(KERN_ERR "%s: transmit timed out, status %04x, reset\n", ! dev->name, ll->rdp); ! lance_reset(dev); ! netif_wake_queue(dev); ! } ! static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev) ! { ! struct lance_private *lp = (struct lance_private *) dev->priv; ! volatile struct lance_regs *ll = lp->ll; ! volatile struct lance_init_block *ib = (struct lance_init_block *) (dev->mem_start); ! int entry, skblen, len; skblen = skb->len; ! len = (skblen <= ETH_ZLEN) ? ETH_ZLEN : skblen; *************** *** 792,809 **** lp->tx_new = (lp->tx_new + 1) & TX_RING_MOD_MASK; ! outs++; /* Kick the lance: transmit now */ writereg(&ll->rdp, LE_C0_INEA | LE_C0_TDMD); dev->trans_start = jiffies; dev_kfree_skb(skb); - - if (TX_BUFFS_AVAIL) - dev->tbusy = 0; ! restore_flags(flags); ! return status; } ! static struct net_device_stats *lance_get_stats(struct device *dev) { struct lance_private *lp = (struct lance_private *) dev->priv; --- 756,774 ---- lp->tx_new = (lp->tx_new + 1) & TX_RING_MOD_MASK; ! if (TX_BUFFS_AVAIL <= 0) ! netif_stop_queue(dev); ! /* Kick the lance: transmit now */ writereg(&ll->rdp, LE_C0_INEA | LE_C0_TDMD); + + spin_unlock_irq(&lp->lock); + dev->trans_start = jiffies; dev_kfree_skb(skb); ! return 0; } ! static struct net_device_stats *lance_get_stats(struct net_device *dev) { struct lance_private *lp = (struct lance_private *) dev->priv; *************** *** 812,816 **** } ! static void lance_load_multicast(struct device *dev) { volatile struct lance_init_block *ib = (struct lance_init_block *) (dev->mem_start); --- 777,781 ---- } ! static void lance_load_multicast(struct net_device *dev) { volatile struct lance_init_block *ib = (struct lance_init_block *) (dev->mem_start); *************** *** 863,867 **** } ! static void lance_set_multicast(struct device *dev) { struct lance_private *lp = (struct lance_private *) dev->priv; --- 828,832 ---- } ! static void lance_set_multicast(struct net_device *dev) { struct lance_private *lp = (struct lance_private *) dev->priv; *************** *** 871,889 **** ib = (struct lance_init_block *) (dev->mem_start); ! if (!dev->start) ! return; ! ! if (dev->tbusy) { ! mod_timer(&lp->multicast_timer, jiffies + 2); ! return; ! } ! set_bit(0, (void *) &dev->tbusy); ! while (lp->tx_old != lp->tx_new) { ! mod_timer(&lp->multicast_timer, jiffies + 4); ! dev->tbusy = 0; ! return; } writereg(&ll->rap, LE_CSR0); --- 836,849 ---- ib = (struct lance_init_block *) (dev->mem_start); ! if (!netif_running(dev)) ! return; ! if (lp->tx_old != lp->tx_new) { ! mod_timer(&lp->multicast_timer, jiffies + 4); ! netif_wake_queue(dev); ! return; } + netif_stop_queue(dev); writereg(&ll->rap, LE_CSR0); *************** *** 900,915 **** load_csrs(lp); init_restart_lance(lp); ! dev->tbusy = 0; ! mark_bh(NET_BH); } volatile void *base_addr=NULL; ! __initfunc(static int vax_lance_init(struct device *dev, const int type)) { static unsigned version_printed = 0; struct lance_private *lp; volatile struct lance_regs *ll; ! int i; unsigned long esar_base; unsigned char *esar; --- 860,881 ---- load_csrs(lp); init_restart_lance(lp); ! netif_wake_queue(dev); } + static void lance_set_multicast_retry(unsigned long _opaque) + { + struct net_device *dev = (struct net_device *) _opaque; + + lance_set_multicast(dev); + } + volatile void *base_addr=NULL; ! static int __init vax_lance_init(struct net_device *dev, const int type) { static unsigned version_printed = 0; struct lance_private *lp; volatile struct lance_regs *ll; ! int i, ret; unsigned long esar_base; unsigned char *esar; *************** *** 921,925 **** if (vax_lance_debug && version_printed++ == 0) printk(version); ! if (dev == NULL) { dev = init_etherdev(0, sizeof(struct lance_private) + 8); --- 887,891 ---- if (vax_lance_debug && version_printed++ == 0) printk(version); ! #if 0 if (dev == NULL) { dev = init_etherdev(0, sizeof(struct lance_private) + 8); *************** *** 932,945 **** } - /* Make certain the data structures used by the LANCE are aligned. */ dev->priv = (void *) (((unsigned long) dev->priv + 7) & ~7); lp = (struct lance_private *) dev->priv; /* Need to kmalloc a block of 64k */ dev->mem_start=kmalloc(65536, GFP_KERNEL); - printk("mem_start = %p\n", dev->mem_start); dev->mem_start = (((unsigned long) dev->mem_start + 7) & ~7); - printk("mem_start = %p\n", dev->mem_start); dev->mem_end = dev->mem_start + 65536; /* dev->mem_start = base_addr;*/ --- 898,915 ---- } /* Make certain the data structures used by the LANCE are aligned. */ dev->priv = (void *) (((unsigned long) dev->priv + 7) & ~7); + #else + dev = init_etherdev(0, sizeof(struct lance_private)); + if (!dev) + return -ENOMEM; + #endif + lp = (struct lance_private *) dev->priv; + spin_lock_init(&lp->lock); /* Need to kmalloc a block of 64k */ dev->mem_start=kmalloc(65536, GFP_KERNEL); dev->mem_start = (((unsigned long) dev->mem_start + 7) & ~7); dev->mem_end = dev->mem_start + 65536; /* dev->mem_start = base_addr;*/ *************** *** 989,995 **** esar[0x68] != 0x55 && esar[0x6c] != 0xaa) { printk("Ethernet station address prom not found!\n"); ! return -ENODEV; } - printk("Hello 2\n"); /* Check the prom contents */ for (i = 0; i < 8; i++) { --- 959,965 ---- esar[0x68] != 0x55 && esar[0x6c] != 0xaa) { printk("Ethernet station address prom not found!\n"); ! ret = -ENODEV; ! goto err_out; } /* Check the prom contents */ for (i = 0; i < 8; i++) { *************** *** 998,1003 **** esar[0x3c - i * 4] != esar[0x40 + i * 4]) { printk("Something is wrong with the ethernet " ! "station address prom!\n"); ! return -ENODEV; } } --- 968,974 ---- esar[0x3c - i * 4] != esar[0x40 + i * 4]) { printk("Something is wrong with the ethernet " ! "station address prom!\n"); ! ret = -ENODEV; ! goto err_out; } } *************** *** 1012,1017 **** } - #if 1 - #if 0 autoirq_setup(0); --- 983,986 ---- *************** *** 1040,1043 **** --- 1009,1014 ---- dev->stop = &lance_close; dev->hard_start_xmit = &lance_start_xmit; + dev->tx_timeout = &lance_tx_timeout; + dev->watchdog_timeo = 5*HZ; dev->get_stats = &lance_get_stats; dev->set_multicast_list = &lance_set_multicast; *************** *** 1064,1077 **** init_timer(&lp->multicast_timer); lp->multicast_timer.data = (unsigned long) dev; ! lp->multicast_timer.function = ! (void (*)(unsigned long)) &lance_set_multicast; ! ! /* ! #ifdef MODULE ! dev->ifindex = dev_new_index(); ! lp->next_module = root_lance_dev; ! root_lance_dev = lp; ! #endif ! */ #endif /* --- 1035,1047 ---- init_timer(&lp->multicast_timer); lp->multicast_timer.data = (unsigned long) dev; ! lp->multicast_timer.function = &lance_set_multicast_retry; ! ! #ifdef MODULE ! /* ! dev->ifindex = dev_new_index(); ! lp->next_module = root_lance_dev; ! root_lance_dev = lp; ! #endif ! */ #endif /* *************** *** 1090,1099 **** /* vax_lance_test_xmit(dev);*/ return 0; } /* Find all the lance cards on the system and initialize them */ ! __initfunc(int vax_lance_probe(struct device *dev)) { static int called = 0; --- 1060,1075 ---- /* vax_lance_test_xmit(dev);*/ return 0; + + err_out: + unregister_netdev(dev); + kfree(dev); + return ret; } /* Find all the lance cards on the system and initialize them */ ! static int __init dec_lance_probe(void) { + struct net_device *dev = NULL; static int called = 0; *************** *** 1134,1137 **** --- 1110,1114 ---- unsigned char tx_block[30]; + #if 0 static int vax_lance_test_xmit(struct device *dev) { *************** *** 1183,1184 **** --- 1160,1162 ---- return status; } + #endif |
From: Andy P. <at...@us...> - 2001-01-20 22:00:13
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv21285/include/asm-vax Modified Files: processor.h Log Message: integrate 2.2 tree with 2.4. Different task layouts, interrupts and bh handling. bh_active and bh_mask are no more, in_softirq() instead. Header file and C code prototypes differed. Index: processor.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/processor.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** processor.h 2001/01/18 18:49:49 1.3 --- processor.h 2001/01/20 22:00:20 1.4 *************** *** 49,53 **** } mm_segment_t; ! struct thread_struct { struct vax_pcb pcb; --- 49,54 ---- } mm_segment_t; ! /* From alpha port: FIXME: this needs sorting. */ ! /* I doubt we need flags ?(alpha specific) or fs */ struct thread_struct { struct vax_pcb pcb; *************** *** 70,73 **** --- 71,86 ---- int bpt_nsaved; }; + + /* FIXME: */ + #define INIT_THREAD { (struct pt_regs *) 0, \ + { 0,{{0},{0},{0},{0},{0},{0},{0},{0},{0},{0}, \ + {0},{0},{0},{0},{0},{0}}}, \ + 0, 0, \ + sizeof(init_stack) + (__u32) &init_stack, \ + (__pa((__u32) &swapper_pg_dir[0]) + _SEGMENT_TABLE),\ + 0,0,0, \ + (mm_segment_t) { 0,1}, \ + (per_struct) {{{{0,}}},0,0,0,0,{{0,}}} \ + } /* FIXME: tune this to the VAX memory map */ |
From: Andy P. <at...@us...> - 2001-01-20 22:00:12
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv21285/arch/vax/kernel Modified Files: init_task.c interrupt.c interrupt.h softirq.c Log Message: integrate 2.2 tree with 2.4. Different task layouts, interrupts and bh handling. bh_active and bh_mask are no more, in_softirq() instead. Header file and C code prototypes differed. Index: init_task.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/init_task.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** init_task.c 2001/01/17 16:13:57 1.1 --- init_task.c 2001/01/20 22:00:20 1.2 *************** *** 4,8 **** --- 4,10 ---- #include <asm/uaccess.h> #include <asm/pgtable.h> + #include <asm/processor.h> /* INIT_MMAP */ + /* This is copied from i386 for now. I don't know what we'll need to change yet. KPH 2000-04-25 */ *************** *** 12,16 **** static struct files_struct init_files = INIT_FILES; static struct signal_struct init_signals = INIT_SIGNALS; ! struct mm_struct init_mm = INIT_MM; /* --- 14,18 ---- static struct files_struct init_files = INIT_FILES; static struct signal_struct init_signals = INIT_SIGNALS; ! struct mm_struct init_mm = INIT_MM(init_mm); /* *************** *** 25,28 **** */ union task_union init_task_union ! /* __attribute__((__section__(".data.init_task"))) */ = { INIT_TASK }; --- 27,31 ---- */ union task_union init_task_union ! __attribute__((__section__(".data.init_task"))) = ! { INIT_TASK(init_task_union.task) }; Index: interrupt.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/interrupt.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** interrupt.c 2001/01/20 13:51:05 1.2 --- interrupt.c 2001/01/20 22:00:20 1.3 *************** *** 30,35 **** union scb_and_device_vectors __attribute((__aligned__(VPAGE_SIZE))) scb; ! unsigned int local_irq_count[NR_CPUS]; ! unsigned int local_bh_count[NR_CPUS]; /* Statically-defined pool of irqvector structures. This will go once --- 30,39 ---- union scb_and_device_vectors __attribute((__aligned__(VPAGE_SIZE))) scb; ! /* These are now part of the irq_cpustat_t structure defined in ! * include/asm-vax/hardirq.h, accessor functions in include/linux/irq_cpustat.h ! * and variable declaration in linux/kernel/softirq.c ! */ ! /* unsigned int local_irq_count[NR_CPUS]; */ ! /* unsigned int local_bh_count[NR_CPUS]; */ /* Statically-defined pool of irqvector structures. This will go once *************** *** 240,244 **** status = dispatch_irq(regs, vec); if (status) { ! if (bh_active & bh_mask) { /* Not ready for this yet */ /* do_bottom_half(); */ --- 244,248 ---- status = dispatch_irq(regs, vec); if (status) { ! if ( in_softirq() ) { /* Not ready for this yet */ /* do_bottom_half(); */ Index: interrupt.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/interrupt.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** interrupt.h 2001/01/17 16:13:57 1.1 --- interrupt.h 2001/01/20 22:00:20 1.2 *************** *** 59,67 **** /* And declarations of some standard interrupt handlers */ ! extern int accvio_handler(struct pt_regs *regs, void *excep_info); ! extern int page_fault_handler(struct pt_regs *regs, void *excep_info); ! extern int reserved_operand_handler(struct pt_regs *regs, void *excep_info); ! extern int corrected_read_handler(struct pt_regs *regs, void *excep_info); extern int syscall_handler(struct pt_regs *regs, void *excep_info); --- 59,68 ---- /* And declarations of some standard interrupt handlers */ + /* The type for these is declared in asm-vax/irq.h */ ! extern void accvio_handler(struct pt_regs *regs, void *excep_info); ! extern void page_fault_handler(struct pt_regs *regs, void *excep_info); ! extern void reserved_operand_handler(struct pt_regs *regs, void *excep_info); ! extern void corrected_read_handler(struct pt_regs *regs, void *excep_info); extern int syscall_handler(struct pt_regs *regs, void *excep_info); Index: softirq.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/softirq.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** softirq.c 2001/01/17 16:13:57 1.1 --- softirq.c 2001/01/20 22:00:20 1.2 *************** *** 33,45 **** bh_mask &= ~(1 << nr); } ! ! void mark_bh(int nr) ! { ! set_bit(nr, &bh_active); ! } ! void start_bh_atomic(void) { ! local_bh_count[smp_processor_id()]++; barrier(); } --- 33,48 ---- bh_mask &= ~(1 << nr); } ! /* mark_bh now in include/linux/interrupt.h */ ! /*void mark_bh(int nr) ! *{ ! * set_bit(nr, &bh_active); ! *} ! */ ! /* local_bh_count and irq_count are now fields of the ! * irq_stat structure defined in linux/kernel/softirq.c ! */ void start_bh_atomic(void) { ! local_bh_count(smp_processor_id())++; barrier(); } *************** *** 48,52 **** { barrier(); ! local_bh_count[smp_processor_id()]--; } --- 51,55 ---- { barrier(); ! local_bh_count(smp_processor_id())--; } |
From: Andy P. <at...@us...> - 2001-01-20 13:50:59
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv4365/include/asm-vax Modified Files: byteorder.h Log Message: minor fixes to byteorder.h. Fix arch Makefiles for new rules.make. sys_idle is no more, cpu_idle is here. Index: byteorder.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/byteorder.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** byteorder.h 2001/01/20 11:24:50 1.2 --- byteorder.h 2001/01/20 13:51:05 1.3 *************** *** 7,38 **** #ifdef __GNUC__ ! static __inline__ __const__ __u32 ___arch__swab32(__u32 x) { ! __u32 t1, t2; /* assume input is aabbccdd in x*/ ! __asm__("clrl %0\n\t" /* clear t1 */ ! "rotl $8, %2, %1\n\t" /* %1 = bbccddaa */ ! "bisl3 $0xff00ff, %1, %0\n\t" /* %0 = 00cc00aa */ ! "rotl $-8, %2, %1\n\t" /* %1 = ddaabbcc */ ! "bicl2 $0xff00ff, %1\n\t" /* %1 = dd00bb00 */ ! "bisl2 %1, %0\n\t" /* %0 = ddccbbaa */ ! : "=g" (t1), "=g" (t2) : "g" (x) ); return t1; } static __inline__ __const__ __u16 ___arch__swab16(__u16 x) { ! __u32 t1, t2, t3; ! __asm__("clrl %2\n\t" ! "movw %3,%2\n\t" /* %2=0000aabb */ ! "rotl $-8,%2,%0\n\t" /* %0=bb0000aa */ ! "ashl $24,%0,%1\n\t" /* %1=aa000000 */ ! "rotl $8,%1,%0\n\t" /* %0=000000aa */ ! "ashl $8,%2,%1\n\t" /* %1=00aabb00 */ ! "bicl2 $0xfffff00ff, %1\n\t" /* %1=0000bb00 */ ! "addl2 %1,%0\n\t" /* %0=0000bbaa */ ! : "=g" (t1), "=g" (t2), "=g"(t3) : "g" (x)); ! return (__u16) t1; } --- 7,34 ---- #ifdef __GNUC__ ! /* ! * ragge has a 1 insn shorter sequence which will probably replace this one ! * later, depending on the relative instruction costs. ! */ static __inline__ __const__ __u32 ___arch__swab32(__u32 x) { ! __u32 t1; /* assume input is aabbccdd in x*/ ! __asm__("rotl $8, %1, r1\n\t" /* r1 = bbccddaa */ ! "bisl3 $0xff00ff, r1, %0\n\t" /* %0 = 00cc00aa */ ! "rotl $-8, %1, r1\n\t" /* r1 = ddaabbcc */ ! "bicl2 $0xff00ff, r1\n\t" /* r1 = dd00bb00 */ ! "bisl2 r1, %0\n\t" /* %0 = ddccbbaa */ ! : "=g" (t1) : "g" (x) : "r1" ); return t1; } + /* + * according to the resident expert, this is as fast as assembly + */ static __inline__ __const__ __u16 ___arch__swab16(__u16 x) { ! register __u16 __x = (x); ! return (u_int16_t)(__x << 8 | __x >> 8); } |
From: Andy P. <at...@us...> - 2001-01-20 13:50:59
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv4365/arch/vax/mm Modified Files: Makefile Log Message: minor fixes to byteorder.h. Fix arch Makefiles for new rules.make. sys_idle is no more, cpu_idle is here. Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Makefile 2001/01/17 16:13:57 1.1 --- Makefile 2001/01/20 13:51:05 1.2 *************** *** 11,15 **** O_TARGET := mm.o ! O_OBJS := init.o pgtable.o ioremap.o extable.o fault.o OX_OBJS := MX_OBJS := --- 11,15 ---- O_TARGET := mm.o ! obj-y := init.o pgtable.o ioremap.o extable.o fault.o OX_OBJS := MX_OBJS := |
From: Andy P. <at...@us...> - 2001-01-20 13:50:58
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/lib In directory usw-pr-cvs1:/tmp/cvs-serv4365/arch/vax/lib Modified Files: Makefile Log Message: minor fixes to byteorder.h. Fix arch Makefiles for new rules.make. sys_idle is no more, cpu_idle is here. Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/lib/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Makefile 2001/01/17 16:13:57 1.1 --- Makefile 2001/01/20 13:51:05 1.2 *************** *** 11,15 **** L_TARGET := libio.a ! L_OBJS := string.o console.o urem.o udiv.o # GCC builds gcc-2.95.2-linuxvax-20000820 and later have built-in support --- 11,15 ---- L_TARGET := libio.a ! obj-y := string.o console.o urem.o udiv.o # GCC builds gcc-2.95.2-linuxvax-20000820 and later have built-in support |
From: Andy P. <at...@us...> - 2001-01-20 13:50:58
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax In directory usw-pr-cvs1:/tmp/cvs-serv4365/arch/vax Modified Files: Makefile Log Message: minor fixes to byteorder.h. Fix arch Makefiles for new rules.make. sys_idle is no more, cpu_idle is here. Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Makefile 2001/01/20 11:24:49 1.4 --- Makefile 2001/01/20 13:51:05 1.5 *************** *** 28,38 **** CFLAGS := $(CFLAGS) $(CFLAGS_OPT) $(CFLAGS_NSR) - # Taking the lead from the alpha - - .S.s: - $(CPP) $(AFLAGS) -traditional -o $*.o $< - .S.o: - $(CC) $(AFLAGS) -traditional -c -o $*.o $< - --- 28,31 ---- |
From: Andy P. <at...@us...> - 2001-01-20 13:50:58
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv4365/arch/vax/kernel Modified Files: Makefile interrupt.c process.c Log Message: minor fixes to byteorder.h. Fix arch Makefiles for new rules.make. sys_idle is no more, cpu_idle is here. Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Makefile 2001/01/17 16:13:57 1.1 --- Makefile 2001/01/20 13:51:05 1.2 *************** *** 11,15 **** O_TARGET := kernel.o ! O_OBJS := process.o setup.o regdump.o interrupt.o entry.o time.o delay.o \ syscall.o \ init_task.o softirq.o reboot.o cpu_generic.o \ --- 11,16 ---- O_TARGET := kernel.o ! ! obj-y := process.o setup.o regdump.o interrupt.o entry.o time.o delay.o \ syscall.o \ init_task.o softirq.o reboot.o cpu_generic.o \ Index: interrupt.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/interrupt.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** interrupt.c 2001/01/17 16:13:57 1.1 --- interrupt.c 2001/01/20 13:51:05 1.2 *************** *** 19,22 **** --- 19,23 ---- #include <asm/scb.h> #include <asm/pgtable.h> + #include <asm/pgalloc.h> #include <asm/hardirq.h> Index: process.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/process.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** process.c 2001/01/17 16:13:57 1.1 --- process.c 2001/01/20 13:51:05 1.2 *************** *** 5,16 **** #include <asm/mtpr.h> ! asmlinkage int sys_idle(void) { ! if (current->pid != 0) return -EPERM; /* endless idle loop with no priority at all */ ! current->priority = 0; ! current->counter = -100; while(1) { --- 5,23 ---- #include <asm/mtpr.h> ! /* sys_idle seems to have been lost as a specific syscall. ! * and replaced by cpu_idle. I'm renaming this cpu_idle. ! */ ! asmlinkage int cpu_idle(void) { ! ! ! if (current->pid != 0) return -EPERM; /* endless idle loop with no priority at all */ ! init_idle(); ! current->nice = 20; ! current->counter = -100; ! while(1) { |
From: Andy P. <at...@us...> - 2001-01-20 13:47:26
|
Update of /cvsroot/linux-vax/kernel/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv4990 Modified Files: byteorder.h Log Message: integrate ragge's suggestions for byteorder.h Index: byteorder.h =================================================================== RCS file: /cvsroot/linux-vax/kernel/include/asm-vax/byteorder.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** byteorder.h 2001/01/20 12:36:16 1.2 --- byteorder.h 2001/01/20 13:47:32 1.3 *************** *** 7,38 **** #ifdef __GNUC__ ! static __inline__ __const__ __u32 ___arch__swab32(__u32 x) { ! __u32 t1, t2; /* assume input is aabbccdd in x*/ ! __asm__("clrl %0\n\t" /* clear t1 */ ! "rotl $8, %2, %1\n\t" /* %1 = bbccddaa */ ! "bisl3 $0xff00ff, %1, %0\n\t" /* %0 = 00cc00aa */ ! "rotl $-8, %2, %1\n\t" /* %1 = ddaabbcc */ ! "bicl2 $0xff00ff, %1\n\t" /* %1 = dd00bb00 */ ! "bisl2 %1, %0\n\t" /* %0 = ddccbbaa */ ! : "=g" (t1), "=g" (t2) : "g" (x) ); return t1; } static __inline__ __const__ __u16 ___arch__swab16(__u16 x) { ! __u32 t1, t2, t3; ! __asm__("clrl %2\n\t" ! "movw %3,%2\n\t" /* %2=0000aabb */ ! "rotl $-8,%2,%0\n\t" /* %0=bb0000aa */ ! "ashl $24,%0,%1\n\t" /* %1=aa000000 */ ! "rotl $8,%1,%0\n\t" /* %0=000000aa */ ! "ashl $8,%2,%1\n\t" /* %1=00aabb00 */ ! "bicl2 $0xfffff00ff, %1\n\t" /* %1=0000bb00 */ ! "addl2 %1,%0\n\t" /* %0=0000bbaa */ ! : "=g" (t1), "=g" (t2), "=g"(t3) : "g" (x)); ! return (__u16) t1; } --- 7,34 ---- #ifdef __GNUC__ ! /* ! * ragge has a 1 insn shorter sequence which will probably replace this one ! * later, depending on the relative instruction costs. ! */ static __inline__ __const__ __u32 ___arch__swab32(__u32 x) { ! __u32 t1; /* assume input is aabbccdd in x*/ ! __asm__("rotl $8, %1, r1\n\t" /* r1 = bbccddaa */ ! "bisl3 $0xff00ff, r1, %0\n\t" /* %0 = 00cc00aa */ ! "rotl $-8, %1, r1\n\t" /* r1 = ddaabbcc */ ! "bicl2 $0xff00ff, r1\n\t" /* r1 = dd00bb00 */ ! "bisl2 r1, %0\n\t" /* %0 = ddccbbaa */ ! : "=g" (t1) : "g" (x) : "r1" ); return t1; } + /* + * according to the resident expert, this is as fast as assembly + */ static __inline__ __const__ __u16 ___arch__swab16(__u16 x) { ! register __u16 __x = (x); ! return (u_int16_t)(__x << 8 | __x >> 8); } |
From: Andy P. <at...@us...> - 2001-01-20 12:36:12
|
Update of /cvsroot/linux-vax/kernel/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv28266 Modified Files: byteorder.h Log Message: backport of byteorder.h from 2.4 Index: byteorder.h =================================================================== RCS file: /cvsroot/linux-vax/kernel/include/asm-vax/byteorder.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** byteorder.h 2000/03/07 22:12:30 1.1 --- byteorder.h 2001/01/20 12:36:16 1.2 *************** *** 6,9 **** --- 6,50 ---- #include <asm/types.h> + #ifdef __GNUC__ + + static __inline__ __const__ __u32 ___arch__swab32(__u32 x) + { + __u32 t1, t2; /* assume input is aabbccdd in x*/ + + __asm__("clrl %0\n\t" /* clear t1 */ + "rotl $8, %2, %1\n\t" /* %1 = bbccddaa */ + "bisl3 $0xff00ff, %1, %0\n\t" /* %0 = 00cc00aa */ + "rotl $-8, %2, %1\n\t" /* %1 = ddaabbcc */ + "bicl2 $0xff00ff, %1\n\t" /* %1 = dd00bb00 */ + "bisl2 %1, %0\n\t" /* %0 = ddccbbaa */ + : "=g" (t1), "=g" (t2) : "g" (x) ); + return t1; + } + + static __inline__ __const__ __u16 ___arch__swab16(__u16 x) + { + __u32 t1, t2, t3; + __asm__("clrl %2\n\t" + "movw %3,%2\n\t" /* %2=0000aabb */ + "rotl $-8,%2,%0\n\t" /* %0=bb0000aa */ + "ashl $24,%0,%1\n\t" /* %1=aa000000 */ + "rotl $8,%1,%0\n\t" /* %0=000000aa */ + "ashl $8,%2,%1\n\t" /* %1=00aabb00 */ + "bicl2 $0xfffff00ff, %1\n\t" /* %1=0000bb00 */ + "addl2 %1,%0\n\t" /* %0=0000bbaa */ + : "=g" (t1), "=g" (t2), "=g"(t3) : "g" (x)); + return (__u16) t1; + } + + #define __arch__swab32(x) ___arch__swab32(x) + #define __arch__swab16(x) ___arch__swab16(x) + + #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) + # define __BYTEORDER_HAS_U64__ + # define __SWAB_64_THRU_32__ + #endif + + #endif /* __GNUC__ */ + #include <linux/byteorder/little_endian.h> |
From: Andy P. <at...@us...> - 2001-01-20 11:24:43
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/boot In directory usw-pr-cvs1:/tmp/cvs-serv18363/arch/vax/boot Modified Files: Makefile Log Message: New byteorder.h from shengchao li, Start of fixes for arch-vax makefiles Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/boot/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Makefile 2001/01/17 16:13:57 1.1 --- Makefile 2001/01/20 11:24:50 1.2 *************** *** 8,11 **** --- 8,19 ---- # Note 2! The CFLAGS definitions are now in the main makefile... + # Taking the lead from the alpha + + .S.s: + $(CPP) $(AFLAGS) -traditional -o $*.o $< + .S.o: + $(CC) $(AFLAGS) -traditional -c -o $*.o $< + + all: head.o libboot.a |
From: Andy P. <at...@us...> - 2001-01-20 11:24:43
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv18363/include/asm-vax Modified Files: byteorder.h Log Message: New byteorder.h from shengchao li, Start of fixes for arch-vax makefiles Index: byteorder.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/byteorder.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** byteorder.h 2001/01/17 16:18:52 1.1 --- byteorder.h 2001/01/20 11:24:50 1.2 *************** *** 6,9 **** --- 6,50 ---- #include <asm/types.h> + #ifdef __GNUC__ + + static __inline__ __const__ __u32 ___arch__swab32(__u32 x) + { + __u32 t1, t2; /* assume input is aabbccdd in x*/ + + __asm__("clrl %0\n\t" /* clear t1 */ + "rotl $8, %2, %1\n\t" /* %1 = bbccddaa */ + "bisl3 $0xff00ff, %1, %0\n\t" /* %0 = 00cc00aa */ + "rotl $-8, %2, %1\n\t" /* %1 = ddaabbcc */ + "bicl2 $0xff00ff, %1\n\t" /* %1 = dd00bb00 */ + "bisl2 %1, %0\n\t" /* %0 = ddccbbaa */ + : "=g" (t1), "=g" (t2) : "g" (x) ); + return t1; + } + + static __inline__ __const__ __u16 ___arch__swab16(__u16 x) + { + __u32 t1, t2, t3; + __asm__("clrl %2\n\t" + "movw %3,%2\n\t" /* %2=0000aabb */ + "rotl $-8,%2,%0\n\t" /* %0=bb0000aa */ + "ashl $24,%0,%1\n\t" /* %1=aa000000 */ + "rotl $8,%1,%0\n\t" /* %0=000000aa */ + "ashl $8,%2,%1\n\t" /* %1=00aabb00 */ + "bicl2 $0xfffff00ff, %1\n\t" /* %1=0000bb00 */ + "addl2 %1,%0\n\t" /* %0=0000bbaa */ + : "=g" (t1), "=g" (t2), "=g"(t3) : "g" (x)); + return (__u16) t1; + } + + #define __arch__swab32(x) ___arch__swab32(x) + #define __arch__swab16(x) ___arch__swab16(x) + + #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) + # define __BYTEORDER_HAS_U64__ + # define __SWAB_64_THRU_32__ + #endif + + #endif /* __GNUC__ */ + #include <linux/byteorder/little_endian.h> |
From: Andy P. <at...@us...> - 2001-01-20 11:24:43
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax In directory usw-pr-cvs1:/tmp/cvs-serv18363/arch/vax Modified Files: Makefile Log Message: New byteorder.h from shengchao li, Start of fixes for arch-vax makefiles Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Makefile 2001/01/18 18:49:49 1.3 --- Makefile 2001/01/20 11:24:49 1.4 *************** *** 28,33 **** CFLAGS := $(CFLAGS) $(CFLAGS_OPT) $(CFLAGS_NSR) ! AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS) # These flags are used later in _this_ makefile --- 28,39 ---- CFLAGS := $(CFLAGS) $(CFLAGS_OPT) $(CFLAGS_NSR) ! # Taking the lead from the alpha + .S.s: + $(CPP) $(AFLAGS) -traditional -o $*.o $< + .S.o: + $(CC) $(AFLAGS) -traditional -c -o $*.o $< + + # These flags are used later in _this_ makefile |
From: Andy P. <at...@us...> - 2001-01-18 18:49:48
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv28108/include/asm-vax/mm Modified Files: pgtable.h Log Message: updates to include/asm-vax and arch/vax for 2.4 compatibility. Index: pgtable.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/pgtable.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pgtable.h 2001/01/18 15:52:28 1.2 --- pgtable.h 2001/01/18 18:49:49 1.3 *************** *** 320,325 **** { pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; } ! #define pte_page(pte) \ ! ((unsigned long) __va(pte_val(pte) & _PFN_MASK)) #define pmd_page(pmd) \ --- 320,327 ---- { pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; } ! /* &&& */ ! /* #define pte_page(pte) ((unsigned long) __va(pte_val(pte) & _PFN_MASK)) ! */ ! #define pte_page(x) (mem_map+(unsigned long)((pte_val(x) >> PAGE_SHIFT))) #define pmd_page(pmd) \ |
From: Andy P. <at...@us...> - 2001-01-18 18:49:48
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/junk In directory usw-pr-cvs1:/tmp/cvs-serv28108/include/asm-vax/junk Added Files: siginfo.h.vax2.2 smplock.h.vax2.2 spinlock.h.vax2.2 Log Message: updates to include/asm-vax and arch/vax for 2.4 compatibility. --- NEW FILE --- #ifndef _VAX_SIGINFO_H #define _VAX_SIGINFO_H #include <linux/types.h> /* This structure was copied from the Alpha. */ typedef union sigval { int sival_int; void *sival_ptr; } sigval_t; #define SI_MAX_SIZE 128 #define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int)) - 3) typedef struct siginfo { int si_signo; int si_errno; int si_code; union { int _pad[SI_PAD_SIZE]; /* kill() */ struct { pid_t _pid; /* sender's pid */ uid_t _uid; /* sender's uid */ } _kill; /* POSIX.1b timers */ struct { unsigned int _timer1; unsigned int _timer2; } _timer; /* POSIX.1b signals */ struct { pid_t _pid; /* sender's pid */ uid_t _uid; /* sender's uid */ sigval_t _sigval; } _rt; /* SIGCHLD */ struct { pid_t _pid; /* which child */ uid_t _uid; /* sender's uid */ int _status; /* exit code */ clock_t _utime; clock_t _stime; } _sigchld; /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ struct { void *_addr; /* faulting insn/memory ref. */ } _sigfault; /* SIGPOLL */ struct { int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ int _fd; } _sigpoll; } _sifields; } siginfo_t; /* * How these fields are to be accessed. */ #define si_pid _sifields._kill._pid #define si_uid _sifields._kill._uid #define si_status _sifields._sigchld._status #define si_utime _sifields._sigchld._utime #define si_stime _sifields._sigchld._stime #define si_value _sifields._rt._sigval #define si_int _sifields._rt._sigval.sival_int #define si_ptr _sifields._rt._sigval.sival_ptr #define si_addr _sifields._sigfault._addr #define si_band _sifields._sigpoll._band #define si_fd _sifields._sigpoll._fd /* * si_code values * Digital reserves positive values for kernel-generated signals. */ #define SI_USER 0 /* sent by kill, sigsend, raise */ #define SI_KERNEL 0x80 /* sent by the kernel from somewhere */ #define SI_QUEUE -1 /* sent by sigqueue */ #define SI_TIMER -2 /* sent by timer expiration */ #define SI_MESGQ -3 /* sent by real time mesq state change */ #define SI_ASYNCIO -4 /* sent by AIO completion */ #define SI_SIGIO -5 /* sent by queued SIGIO */ #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) /* * SIGILL si_codes */ #define ILL_ILLOPC 1 /* illegal opcode */ #define ILL_ILLOPN 2 /* illegal operand */ #define ILL_ILLADR 3 /* illegal addressing mode */ #define ILL_ILLTRP 4 /* illegal trap */ #define ILL_PRVOPC 5 /* privileged opcode */ #define ILL_PRVREG 6 /* privileged register */ #define ILL_COPROC 7 /* coprocessor error */ #define ILL_BADSTK 8 /* internal stack error */ #define NSIGILL 8 /* * SIGFPE si_codes */ #define FPE_INTDIV 1 /* integer divide by zero */ #define FPE_INTOVF 2 /* integer overflow */ #define FPE_FLTDIV 3 /* floating point divide by zero */ #define FPE_FLTOVF 4 /* floating point overflow */ #define FPE_FLTUND 5 /* floating point underflow */ #define FPE_FLTRES 6 /* floating point inexact result */ #define FPE_FLTINV 7 /* floating point invalid operation */ #define FPE_FLTSUB 8 /* subscript out of range */ #define NSIGFPE 8 /* * SIGSEGV si_codes */ #define SEGV_MAPERR 1 /* address not mapped to object */ #define SEGV_ACCERR 2 /* invalid permissions for mapped object */ #define NSIGSEGV 2 /* * SIGBUS si_codes */ #define BUS_ADRALN 1 /* invalid address alignment */ #define BUS_ADRERR 2 /* non-existant physical address */ #define BUS_OBJERR 3 /* object specific hardware error */ #define NSIGBUS 3 /* * SIGTRAP si_codes */ #define TRAP_BRKPT 1 /* process breakpoint */ #define TRAP_TRACE 2 /* process trace trap */ #define NSIGTRAP /* * SIGCHLD si_codes */ #define CLD_EXITED 1 /* child has exited */ #define CLD_KILLED 2 /* child was killed */ #define CLD_DUMPED 3 /* child terminated abnormally */ #define CLD_TRAPPED 4 /* traced child has trapped */ #define CLD_STOPPED 5 /* child has stopped */ #define CLD_CONTINUED 6 /* stopped child has continued */ #define NSIGCHLD /* * SIGPOLL si_codes */ #define POLL_IN 1 /* data input available */ #define POLL_OUT 2 /* output buffers available */ #define POLL_MSG 3 /* input message available */ #define POLL_ERR 4 /* i/o error */ #define POLL_PRI 5 /* high priority input available */ #define POLL_HUP 6 /* device disconnected */ #define NSIGPOLL 6 /* * sigevent definitions * * It seems likely that SIGEV_THREAD will have to be handled from * userspace, libpthread transmuting it to SIGEV_SIGNAL, which the * thread manager then catches and does the appropriate nonsense. * However, everything is written out here so as to not get lost. */ #define SIGEV_SIGNAL 0 /* notify via signal */ #define SIGEV_NONE 1 /* other notification: meaningless */ #define SIGEV_THREAD 2 /* deliver via thread creation */ #define SIGEV_MAX_SIZE 64 #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 3) typedef struct sigevent { sigval_t sigev_value; int sigev_signo; int sigev_notify; union { int _pad[SIGEV_PAD_SIZE]; struct { void (*_function)(sigval_t); void *_attribute; /* really pthread_attr_t */ } _sigev_thread; } _sigev_un; } sigevent_t; #define sigev_notify_function _sigev_un._sigev_thread._function #define sigev_notify_attributes _sigev_un._sigev_thread._attribute #endif /* _VAX_SIGINFO_H */ --- NEW FILE --- /* * <asm/smplock.h> * * Default SMP lock implementation */ #include <linux/interrupt.h> #include <asm/spinlock.h> extern spinlock_t kernel_flag; /* * Release global kernel lock and global interrupt lock */ #define release_kernel_lock(task, cpu) \ do { \ if (task->lock_depth >= 0) \ spin_unlock(&kernel_flag); \ release_irqlock(cpu); \ __sti(); \ } while (0) /* * Re-acquire the kernel lock */ #define reacquire_kernel_lock(task) \ do { \ if (task->lock_depth >= 0) \ spin_lock(&kernel_flag); \ } while (0) /* * Getting the big kernel lock. * * This cannot happen asynchronously, * so we only need to worry about other * CPU's. */ extern __inline__ void lock_kernel(void) { if (!++current->lock_depth) spin_lock(&kernel_flag); } extern __inline__ void unlock_kernel(void) { if (--current->lock_depth < 0) spin_unlock(&kernel_flag); } --- NEW FILE --- #ifndef _ASM_VAX_SPINLOCK_H #define _ASM_VAX_SPINLOCK_H /* from the mips port. Deal with SMP later. much later.. */ #ifndef __SMP__ /* gcc 2.7.2 can crash initializing an empty structure. For now we try to do though ... */ typedef struct { } spinlock_t; #define SPIN_LOCK_UNLOCKED { } #define spin_lock_init(lock) do { } while(0) #define spin_lock(lock) do { } while(0) #define spin_trylock(lock) do { } while(0) #define spin_unlock_wait(lock) do { } while(0) #define spin_unlock(lock) do { } while(0) #define spin_lock_irq(lock) cli() #define spin_unlock_irq(lock) sti() #define spin_lock_irqsave(lock, flags) save_and_cli(flags) #define spin_unlock_irqrestore(lock, flags) restore_flags(flags) /* * Read-write spinlocks, allowing multiple readers * but only one writer. * * NOTE! it is quite common to have readers in interrupts * but no interrupt writers. For those circumstances we * can "mix" irq-safe locks - any writer needs to get a * irq-safe write-lock, but readers can get non-irqsafe * read-locks. */ typedef struct { } rwlock_t; #define RW_LOCK_UNLOCKED { } #define read_lock(lock) do { } while(0) #define read_unlock(lock) do { } while(0) #define write_lock(lock) do { } while(0) #define write_unlock(lock) do { } while(0) #define read_lock_irq(lock) cli() #define read_unlock_irq(lock) sti() #define write_lock_irq(lock) cli() #define write_unlock_irq(lock) sti() #define read_lock_irqsave(lock, flags) save_and_cli(flags) #define read_unlock_irqrestore(lock, flags) restore_flags(flags) #define write_lock_irqsave(lock, flags) save_and_cli(flags) #define write_unlock_irqrestore(lock, flags) restore_flags(flags) #else #error "Dont set SMP .eq. 1 for the VAX architecture yet" #endif /* SMP */ #endif /* _ASM_VAX_SPINLOCK_H */ |
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv28108/include/asm-vax Modified Files: fcntl.h namei.h processor.h siginfo.h smplock.h spinlock.h stat.h Added Files: div64.h msgbuf.h Log Message: updates to include/asm-vax and arch/vax for 2.4 compatibility. --- NEW FILE --- #ifndef __VAX_DIV64 #define __VAX_DIV64 /* atp jan 2001. Take from asm-s390. * FIXME: replace by quadword divide */ #define do_div(n,base) ({ \ int __res; \ __res = ((unsigned long) n) % (unsigned) base; \ n = ((unsigned long) n) / (unsigned) base; \ __res; }) #endif /* __ASM_VAX_DIV64_H */ --- NEW FILE --- #ifndef __VAX_MSGBUF_H #define __VAX_MSGBUF_H /* * The msqid64_ds structure for VAX architecture. * Note extra padding because this structure is passed back and forth * between kernel and user space. * * Pad space is left for: * - 64-bit time_t to solve y2038 problem * - 2 miscellaneous 32-bit values */ struct msqid64_ds { struct ipc64_perm msg_perm; __kernel_time_t msg_stime; /* last msgsnd time */ unsigned long __unused1; __kernel_time_t msg_rtime; /* last msgrcv time */ unsigned long __unused2; __kernel_time_t msg_ctime; /* last change time */ unsigned long __unused3; unsigned long msg_cbytes; /* current number of bytes on queue */ unsigned long msg_qnum; /* number of messages in queue */ unsigned long msg_qbytes; /* max number of bytes on queue */ __kernel_pid_t msg_lspid; /* pid of last msgsnd */ __kernel_pid_t msg_lrpid; /* last receive pid */ unsigned long __unused4; unsigned long __unused5; }; #endif /* _VAX_MSGBUF_H */ Index: fcntl.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/fcntl.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** fcntl.h 2001/01/17 16:18:52 1.1 --- fcntl.h 2001/01/18 18:49:49 1.2 *************** *** 38,41 **** --- 38,45 ---- #define F_GETSIG 11 /* for sockets. */ + #define F_GETLK64 12 /* using 'struct flock64' */ + #define F_SETLK64 13 + #define F_SETLKW64 14 + /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ *************** *** 50,53 **** --- 54,60 ---- #define F_SHLCK 8 /* or 4 */ + /* for leases */ + #define F_INPROGRESS 16 + /* operations for bsd flock(), also used by the kernel implementation */ #define LOCK_SH 1 /* shared lock */ *************** *** 56,59 **** --- 63,71 ---- blocking */ #define LOCK_UN 8 /* remove lock */ + + #define LOCK_MAND 32 /* This is a mandatory flock */ + #define LOCK_READ 64 /* ... Which allows concurrent read operations */ + #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ + #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ struct flock { Index: namei.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/namei.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** namei.h 2001/01/17 16:18:52 1.1 --- namei.h 2001/01/18 18:49:49 1.2 *************** *** 3,6 **** --- 3,8 ---- * * Included from linux/fs/namei.c + * atp jan 2000 - updated for 2.4 + * */ *************** *** 13,18 **** */ ! #define __prefix_lookup_dentry(name, lookup_flags) \ ! do {} while (0) #endif /* __VAX_NAMEI_H */ --- 15,19 ---- */ ! #define __emul_prefix() NULL #endif /* __VAX_NAMEI_H */ Index: processor.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/processor.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** processor.h 2001/01/18 15:52:28 1.2 --- processor.h 2001/01/18 18:49:49 1.3 *************** *** 144,147 **** --- 144,156 ---- unsigned long get_wchan(struct task_struct *p); + /* temporary - FIXME: */ + + extern inline unsigned long get_wchan(struct task_struct *p) + { + return 0xdeadbeef; /* XXX */ + } + + #define KSTK_EIP(tsk) (0xdeadbeef) + #define KSTK_ESP(tsk) (0xdeadbeef) Index: siginfo.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/siginfo.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** siginfo.h 2001/01/17 16:18:52 1.1 --- siginfo.h 2001/01/18 18:49:49 1.2 *************** *** 1,8 **** ! #ifndef _VAX_SIGINFO_H ! #define _VAX_SIGINFO_H #include <linux/types.h> ! /* This structure was copied from the Alpha. */ typedef union sigval { --- 1,10 ---- ! #ifndef __VAX_SIGINFO_H ! #define __VAX_SIGINFO_H + /* atp jan 2001 - taken from i386 from alpha */ + #include <linux/types.h> ! /* XXX: This structure was copied from the Alpha; is there an iBCS version? */ typedef union sigval { *************** *** 78,92 **** #define si_fd _sifields._sigpoll._fd /* * si_code values * Digital reserves positive values for kernel-generated signals. */ ! #define SI_USER 0 /* sent by kill, sigsend, raise */ ! #define SI_KERNEL 0x80 /* sent by the kernel from somewhere */ ! #define SI_QUEUE -1 /* sent by sigqueue */ ! #define SI_TIMER -2 /* sent by timer expiration */ ! #define SI_MESGQ -3 /* sent by real time mesq state change */ ! #define SI_ASYNCIO -4 /* sent by AIO completion */ ! #define SI_SIGIO -5 /* sent by queued SIGIO */ #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) --- 80,113 ---- #define si_fd _sifields._sigpoll._fd + #ifdef __KERNEL__ + #define __SI_MASK 0xffff0000 + #define __SI_KILL (0 << 16) + #define __SI_TIMER (1 << 16) + #define __SI_POLL (2 << 16) + #define __SI_FAULT (3 << 16) + #define __SI_CHLD (4 << 16) + #define __SI_RT (5 << 16) + #define __SI_CODE(T,N) ((T) << 16 | ((N) & 0xffff)) + #else + #define __SI_KILL 0 + #define __SI_TIMER 0 + #define __SI_POLL 0 + #define __SI_FAULT 0 + #define __SI_CHLD 0 + #define __SI_RT 0 + #define __SI_CODE(T,N) (N) + #endif + /* * si_code values * Digital reserves positive values for kernel-generated signals. */ ! #define SI_USER 0 /* sent by kill, sigsend, raise */ ! #define SI_KERNEL 0x80 /* sent by the kernel from somewhere */ ! #define SI_QUEUE -1 /* sent by sigqueue */ ! #define SI_TIMER __SI_CODE(__SI_TIMER,-2) /* sent by timer expiration */ ! #define SI_MESGQ -3 /* sent by real time mesq state change */ ! #define SI_ASYNCIO -4 /* sent by AIO completion */ ! #define SI_SIGIO -5 /* sent by queued SIGIO */ #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) *************** *** 96,107 **** * SIGILL si_codes */ ! #define ILL_ILLOPC 1 /* illegal opcode */ ! #define ILL_ILLOPN 2 /* illegal operand */ ! #define ILL_ILLADR 3 /* illegal addressing mode */ ! #define ILL_ILLTRP 4 /* illegal trap */ ! #define ILL_PRVOPC 5 /* privileged opcode */ ! #define ILL_PRVREG 6 /* privileged register */ ! #define ILL_COPROC 7 /* coprocessor error */ ! #define ILL_BADSTK 8 /* internal stack error */ #define NSIGILL 8 --- 117,128 ---- * SIGILL si_codes */ ! #define ILL_ILLOPC (__SI_FAULT|1) /* illegal opcode */ ! #define ILL_ILLOPN (__SI_FAULT|2) /* illegal operand */ ! #define ILL_ILLADR (__SI_FAULT|3) /* illegal addressing mode */ ! #define ILL_ILLTRP (__SI_FAULT|4) /* illegal trap */ ! #define ILL_PRVOPC (__SI_FAULT|5) /* privileged opcode */ ! #define ILL_PRVREG (__SI_FAULT|6) /* privileged register */ ! #define ILL_COPROC (__SI_FAULT|7) /* coprocessor error */ ! #define ILL_BADSTK (__SI_FAULT|8) /* internal stack error */ #define NSIGILL 8 *************** *** 109,120 **** * SIGFPE si_codes */ ! #define FPE_INTDIV 1 /* integer divide by zero */ ! #define FPE_INTOVF 2 /* integer overflow */ ! #define FPE_FLTDIV 3 /* floating point divide by zero */ ! #define FPE_FLTOVF 4 /* floating point overflow */ ! #define FPE_FLTUND 5 /* floating point underflow */ ! #define FPE_FLTRES 6 /* floating point inexact result */ ! #define FPE_FLTINV 7 /* floating point invalid operation */ ! #define FPE_FLTSUB 8 /* subscript out of range */ #define NSIGFPE 8 --- 130,141 ---- * SIGFPE si_codes */ ! #define FPE_INTDIV (__SI_FAULT|1) /* integer divide by zero */ ! #define FPE_INTOVF (__SI_FAULT|2) /* integer overflow */ ! #define FPE_FLTDIV (__SI_FAULT|3) /* floating point divide by zero */ ! #define FPE_FLTOVF (__SI_FAULT|4) /* floating point overflow */ ! #define FPE_FLTUND (__SI_FAULT|5) /* floating point underflow */ ! #define FPE_FLTRES (__SI_FAULT|6) /* floating point inexact result */ ! #define FPE_FLTINV (__SI_FAULT|7) /* floating point invalid operation */ ! #define FPE_FLTSUB (__SI_FAULT|8) /* subscript out of range */ #define NSIGFPE 8 *************** *** 122,127 **** * SIGSEGV si_codes */ ! #define SEGV_MAPERR 1 /* address not mapped to object */ ! #define SEGV_ACCERR 2 /* invalid permissions for mapped object */ #define NSIGSEGV 2 --- 143,148 ---- * SIGSEGV si_codes */ ! #define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */ ! #define SEGV_ACCERR (__SI_FAULT|2) /* invalid permissions for mapped object */ #define NSIGSEGV 2 *************** *** 129,135 **** * SIGBUS si_codes */ ! #define BUS_ADRALN 1 /* invalid address alignment */ ! #define BUS_ADRERR 2 /* non-existant physical address */ ! #define BUS_OBJERR 3 /* object specific hardware error */ #define NSIGBUS 3 --- 150,156 ---- * SIGBUS si_codes */ ! #define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */ ! #define BUS_ADRERR (__SI_FAULT|2) /* non-existant physical address */ ! #define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */ #define NSIGBUS 3 *************** *** 137,164 **** * SIGTRAP si_codes */ ! #define TRAP_BRKPT 1 /* process breakpoint */ ! #define TRAP_TRACE 2 /* process trace trap */ ! #define NSIGTRAP /* * SIGCHLD si_codes */ ! #define CLD_EXITED 1 /* child has exited */ ! #define CLD_KILLED 2 /* child was killed */ ! #define CLD_DUMPED 3 /* child terminated abnormally */ ! #define CLD_TRAPPED 4 /* traced child has trapped */ ! #define CLD_STOPPED 5 /* child has stopped */ ! #define CLD_CONTINUED 6 /* stopped child has continued */ ! #define NSIGCHLD /* * SIGPOLL si_codes */ ! #define POLL_IN 1 /* data input available */ ! #define POLL_OUT 2 /* output buffers available */ ! #define POLL_MSG 3 /* input message available */ ! #define POLL_ERR 4 /* i/o error */ ! #define POLL_PRI 5 /* high priority input available */ ! #define POLL_HUP 6 /* device disconnected */ #define NSIGPOLL 6 --- 158,185 ---- * SIGTRAP si_codes */ ! #define TRAP_BRKPT (__SI_FAULT|1) /* process breakpoint */ ! #define TRAP_TRACE (__SI_FAULT|2) /* process trace trap */ ! #define NSIGTRAP 2 /* * SIGCHLD si_codes */ ! #define CLD_EXITED (__SI_CHLD|1) /* child has exited */ ! #define CLD_KILLED (__SI_CHLD|2) /* child was killed */ ! #define CLD_DUMPED (__SI_CHLD|3) /* child terminated abnormally */ ! #define CLD_TRAPPED (__SI_CHLD|4) /* traced child has trapped */ ! #define CLD_STOPPED (__SI_CHLD|5) /* child has stopped */ ! #define CLD_CONTINUED (__SI_CHLD|6) /* stopped child has continued */ ! #define NSIGCHLD 6 /* * SIGPOLL si_codes */ ! #define POLL_IN (__SI_POLL|1) /* data input available */ ! #define POLL_OUT (__SI_POLL|2) /* output buffers available */ ! #define POLL_MSG (__SI_POLL|3) /* input message available */ ! #define POLL_ERR (__SI_POLL|4) /* i/o error */ ! #define POLL_PRI (__SI_POLL|5) /* high priority input available */ ! #define POLL_HUP (__SI_POLL|6) /* device disconnected */ #define NSIGPOLL 6 *************** *** 194,197 **** #define sigev_notify_function _sigev_un._sigev_thread._function #define sigev_notify_attributes _sigev_un._sigev_thread._attribute - #endif /* _VAX_SIGINFO_H */ --- 215,235 ---- #define sigev_notify_function _sigev_un._sigev_thread._function #define sigev_notify_attributes _sigev_un._sigev_thread._attribute + + #ifdef __KERNEL__ + #include <linux/string.h> + + extern inline void copy_siginfo(siginfo_t *to, siginfo_t *from) + { + if (from->si_code < 0) + memcpy(to, from, sizeof(siginfo_t)); + else + /* _sigchld is currently the largest know union member */ + memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld)); + } + + extern int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from); + + #endif /* __KERNEL__ */ + + #endif /* __ASM_VAX_SIGINFO_H */ Index: smplock.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/smplock.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** smplock.h 2001/01/17 16:18:52 1.1 --- smplock.h 2001/01/18 18:49:49 1.2 *************** *** 5,11 **** */ #include <linux/interrupt.h> ! #include <asm/spinlock.h> extern spinlock_t kernel_flag; /* --- 5,13 ---- */ #include <linux/interrupt.h> ! #include <linux/spinlock.h> extern spinlock_t kernel_flag; + + #define kernel_locked() spin_is_locked(&kernel_flag) /* Index: spinlock.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/spinlock.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** spinlock.h 2001/01/17 16:18:52 1.1 --- spinlock.h 2001/01/18 18:49:49 1.2 *************** *** 1,55 **** ! #ifndef _ASM_VAX_SPINLOCK_H ! #define _ASM_VAX_SPINLOCK_H ! /* from the mips port. Deal with SMP later. much later.. */ ! #ifndef __SMP__ ! /* gcc 2.7.2 can crash initializing an empty structure. For now we ! try to do though ... */ ! typedef struct { } spinlock_t; ! #define SPIN_LOCK_UNLOCKED { } ! ! #define spin_lock_init(lock) do { } while(0) ! #define spin_lock(lock) do { } while(0) ! #define spin_trylock(lock) do { } while(0) ! #define spin_unlock_wait(lock) do { } while(0) ! #define spin_unlock(lock) do { } while(0) ! #define spin_lock_irq(lock) cli() ! #define spin_unlock_irq(lock) sti() ! ! #define spin_lock_irqsave(lock, flags) save_and_cli(flags) ! #define spin_unlock_irqrestore(lock, flags) restore_flags(flags) ! ! /* ! * Read-write spinlocks, allowing multiple readers ! * but only one writer. ! * ! * NOTE! it is quite common to have readers in interrupts ! * but no interrupt writers. For those circumstances we ! * can "mix" irq-safe locks - any writer needs to get a ! * irq-safe write-lock, but readers can get non-irqsafe ! * read-locks. ! */ ! typedef struct { } rwlock_t; ! #define RW_LOCK_UNLOCKED { } ! ! #define read_lock(lock) do { } while(0) ! #define read_unlock(lock) do { } while(0) ! #define write_lock(lock) do { } while(0) ! #define write_unlock(lock) do { } while(0) ! #define read_lock_irq(lock) cli() ! #define read_unlock_irq(lock) sti() ! #define write_lock_irq(lock) cli() ! #define write_unlock_irq(lock) sti() ! ! #define read_lock_irqsave(lock, flags) save_and_cli(flags) ! #define read_unlock_irqrestore(lock, flags) restore_flags(flags) ! #define write_lock_irqsave(lock, flags) save_and_cli(flags) ! #define write_unlock_irqrestore(lock, flags) restore_flags(flags) ! ! #else ! ! #error "Dont set SMP .eq. 1 for the VAX architecture yet" ! ! #endif /* SMP */ ! #endif /* _ASM_VAX_SPINLOCK_H */ --- 1,6 ---- ! #ifndef __ASM_VAX_SPINLOCK_H ! #define __ASM_VAX_SPINLOCK_H ! #error "No SMP on VAX yet, please set CONFIG_SMP to n" ! #endif /* __ASM_VAX_SPINLOCK_H */ Index: stat.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/stat.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** stat.h 2001/01/17 16:18:52 1.1 --- stat.h 2001/01/18 18:49:49 1.2 *************** *** 41,43 **** --- 41,79 ---- }; + /* This matches struct stat64 in glibc2.1, hence the absolutely + * insane amounts of padding around dev_t's. + */ + struct stat64 { + unsigned short st_dev; + unsigned char __pad0[6]; + + unsigned long long st_ino; + unsigned int st_mode; + unsigned int st_nlink; + + unsigned long st_uid; + unsigned long st_gid; + + unsigned short st_rdev; + unsigned char __pad3[10]; + + long long st_size; + unsigned long st_blksize; + + unsigned long st_blocks; /* Number 512-byte blocks allocated. */ + unsigned long __pad4; /* future possible st_blocks high bits */ + + unsigned long st_atime; + unsigned long __pad5; + + unsigned long st_mtime; + unsigned long __pad6; + + unsigned long st_ctime; + unsigned long __pad7; /* will be high 32 bits of ctime someday */ + + unsigned long __unused1; + unsigned long __unused2; + }; + #endif /* _VAX_STAT_H */ |
From: Andy P. <at...@us...> - 2001-01-18 18:49:47
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax In directory usw-pr-cvs1:/tmp/cvs-serv28108/arch/vax Modified Files: Makefile config.in Log Message: updates to include/asm-vax and arch/vax for 2.4 compatibility. Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Makefile 2001/01/17 19:37:29 1.2 --- Makefile 2001/01/18 18:49:49 1.3 *************** *** 28,31 **** --- 28,34 ---- CFLAGS := $(CFLAGS) $(CFLAGS_OPT) $(CFLAGS_NSR) + AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS) + + # These flags are used later in _this_ makefile LDFLAGS=-nostartfiles -N -nostdlib -Map test.map --cref -T vmlinux.lds Index: config.in =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/config.in,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** config.in 2001/01/17 16:13:57 1.1 --- config.in 2001/01/18 18:49:49 1.2 *************** *** 22,25 **** --- 22,29 ---- define_bool CONFIG_ELF_KERNEL y define_bool CONFIG_EXTRA_ELF_COMPILER n + # + # if we allow this to be y, then we need to implement things + # like asm-vax/spinlock.h + define_bool CONFIG_SMP n bool 'Networking support' CONFIG_NET *************** *** 27,30 **** --- 31,40 ---- bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT bool 'Sysctl support' CONFIG_SYSCTL + + # ipc needs the proc fs + if [ "$CONFIG_SYSVIPC" = "y" ]; then + define_bool CONFIG_PROC_FS y + fi + endmenu |
From: Andy P. <at...@us...> - 2001-01-18 15:52:27
|
Update of /cvsroot/linux-vax/kernel-2.4/include/linux In directory usw-pr-cvs1:/tmp/cvs-serv5429/include/linux Modified Files: iobuf.h Log Message: Updates to adapt code base from 2.2 to 2.4 tree. Sync up to atp 2.4 tree. Index: iobuf.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/iobuf.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** iobuf.h 2001/01/14 16:45:27 1.1.1.1 --- iobuf.h 2001/01/18 15:52:28 1.2 *************** *** 27,31 **** #define KIO_MAX_ATOMIC_IO 64 /* in kb */ #define KIO_MAX_ATOMIC_BYTES (64 * 1024) ! #define KIO_STATIC_PAGES (KIO_MAX_ATOMIC_IO / (PAGE_SIZE >> 10) + 1) #define KIO_MAX_SECTORS (KIO_MAX_ATOMIC_IO * 2) --- 27,31 ---- #define KIO_MAX_ATOMIC_IO 64 /* in kb */ #define KIO_MAX_ATOMIC_BYTES (64 * 1024) ! #define KIO_STATIC_PAGES ( (KIO_MAX_ATOMIC_IO << 10) / (PAGE_SIZE) + 1) #define KIO_MAX_SECTORS (KIO_MAX_ATOMIC_IO * 2) |
From: Andy P. <at...@us...> - 2001-01-18 15:52:27
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv5429/include/asm-vax/mm Modified Files: page.h pgcompat.h pgtable.h Added Files: mmu_context.h Log Message: Updates to adapt code base from 2.2 to 2.4 tree. Sync up to atp 2.4 tree. --- NEW FILE --- #ifndef _ASM_VAX_MMU_CONTEXT_H #define _ASM_VAX_MMU_CONTEXT_H /* mmu_contexts are part of process control block */ #define init_new_context(tsk,mm) 0 #define destroy_context(mm) flush_tlb_mm(mm) static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu) { } static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk, unsigned cpu) { clear_bit(cpu, &prev->cpu_vm_mask); set_bit(cpu, &next->cpu_vm_mask); } extern inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) { switch_mm(prev, next, current, smp_processor_id()); } #endif Index: page.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/page.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** page.h 2001/01/17 19:37:29 1.2 --- page.h 2001/01/18 15:52:28 1.3 *************** *** 13,16 **** --- 13,39 ---- #define STRICT_MM_TYPECHECKS + #define BUG() do { \ + printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ + __asm__ __volatile__(".word 0x0000"); \ + } while (0) + + #define PAGE_BUG(page) do { \ + BUG(); \ + } while (0) + + /* Pure 2^n version of get_order */ + extern __inline__ int get_order(unsigned long size) + { + int order; + + size = (size-1) >> (PAGE_SHIFT-1); + order = -1; + do { + size >>= 1; + order++; + } while (size); + return order; + } + #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) #define copy_page(to,from) memcpy((void *)(to), (void *)(from), PAGE_SIZE) *************** *** 83,128 **** #define PAGE_ALIGN_PREV(addr) ((addr)&PAGE_MASK) - /* This handles the memory map. (i hope) - * taking the lead from the alpha port the VAX PAGE_OFFSET is - * identified as being the start of kernel S0 (KSEG) space */ - #define __PAGE_OFFSET (0x80000000) #ifndef __ASSEMBLY__ extern int console_loglevel; - /* - * Tell the user there is some problem. Beep too, so we can - * see^H^H^Hhear bugs in early bootup as well! - */ - #define BUG() do { \ - printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ - } while (0) - - #define PAGE_BUG(page) do { \ - BUG(); \ - } while (0) - - /* Pure 2^n version of get_order */ - extern __inline__ int get_order(unsigned long size) - { - int order; - - size = (size-1) >> (PAGE_SHIFT-1); - order = -1; - do { - size >>= 1; - order++; - } while (size); - return order; - } - #endif /* __ASSEMBLY__ */ ! #define PAGE_OFFSET __PAGE_OFFSET #define __pa(x) ((unsigned long) (x) - PAGE_OFFSET) #define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET)) #define MAP_NR(addr) (__pa(addr) >> PAGE_SHIFT) #endif /* __KERNEL__ */ --- 106,127 ---- #define PAGE_ALIGN_PREV(addr) ((addr)&PAGE_MASK) #ifndef __ASSEMBLY__ extern int console_loglevel; #endif /* __ASSEMBLY__ */ ! /* This handles the memory map. (i hope) ! * taking the lead from the alpha port the VAX PAGE_OFFSET is ! * identified as being the start of kernel S0 (KSEG) space */ + #define __PAGE_OFFSET (0x80000000) + #define PAGE_OFFSET __PAGE_OFFSET #define __pa(x) ((unsigned long) (x) - PAGE_OFFSET) #define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET)) #define MAP_NR(addr) (__pa(addr) >> PAGE_SHIFT) + #define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT)) + #define VALID_PAGE(page) ((page - mem_map) < max_mapnr) #endif /* __KERNEL__ */ Index: pgcompat.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/pgcompat.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pgcompat.h 2001/01/17 16:18:52 1.1 --- pgcompat.h 2001/01/18 15:52:28 1.2 *************** *** 26,32 **** */ /* page size definitions */ ! #include <asm/vpage.h> ! #include <asm/page.h> /* for pte_t */ #ifndef __ASSEMBLY__ --- 26,32 ---- */ /* page size definitions */ ! #include <asm/mm/vpage.h> ! #include <asm/mm/page.h> /* for pte_t */ #ifndef __ASSEMBLY__ Index: pgtable.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/pgtable.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pgtable.h 2001/01/17 16:18:52 1.1 --- pgtable.h 2001/01/18 15:52:28 1.2 *************** *** 11,14 **** --- 11,15 ---- #include <asm/mm/virt_trans.h> + /* * The requirement for contiguous pages for page tables means that *************** *** 73,76 **** --- 74,78 ---- #define PTRS_PER_PMD 1 #define PTRS_PER_PGD 128 + /* fix this FIXME: */ #define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) /* *************** *** 82,85 **** --- 84,97 ---- #define __USER_PGD_PTRS ((__PAGE_OFFSET >> PGDIR_SHIFT) & 0x3ff) #define __KERNEL_PGD_PTRS (PTRS_PER_PGD-__USER_PGD_PTRS) + #define FIRST_USER_PGD_NR 0 + + + #define pte_ERROR(e) \ + printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e)) + #define pmd_ERROR(e) \ + printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e)) + #define pgd_ERROR(e) \ + printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e)) + /* *************** *** 334,354 **** extern pgd_t swapper_pg_dir[1024]; - extern inline void update_mmu_cache(struct vm_area_struct * vma, - unsigned long address, pte_t pte) - { - } ! #define SWP_TYPE(entry) (((entry) >> 2) & 0x3f) ! #define SWP_OFFSET(entry) ((entry) >> 8) ! #define SWP_ENTRY(type,offset) (((type) << 2) | ((offset) << 8)) ! ! #define module_map vmalloc ! #define module_unmap vfree ! ! /* kernel/fork.c expects these definitions to be here. They might be ! important on i386, but we don't need it. */ ! #define copy_segments(nr, tsk, mm) do { } while (0) ! #define release_segments(mm) do { } while (0) ! #define forget_segments() do { } while (0) #endif /* !__ASSEMBLY__ */ --- 346,351 ---- extern pgd_t swapper_pg_dir[1024]; ! /* copy_segments and friends now in system.h */ #endif /* !__ASSEMBLY__ */ *************** *** 361,365 **** { unsigned long ptbl = virt_to_phys(ptep) | _PAGE_TABLE | _PAGE_ACCESSED; ! unsigned long *ptr = pmdp->pmd; short i = 16; while (--i >= 0) { --- 358,362 ---- { unsigned long ptbl = virt_to_phys(ptep) | _PAGE_TABLE | _PAGE_ACCESSED; ! unsigned long *ptr = (unsigned long *)pmdp->pmd; short i = 16; while (--i >= 0) { *************** *** 369,372 **** --- 366,387 ---- } + /* + * The VAX doesn't have any external MMU info: the kernel page + * tables contain all the necessary information. + */ + extern inline void update_mmu_cache(struct vm_area_struct * vma, + unsigned long address, pte_t pte) + { + } + + + #define SWP_TYPE(entry) (((entry).val >> 2) & 0x3f) + #define SWP_OFFSET(entry) ((entry).val >> 8) + #define SWP_ENTRY(type,offset) ((swp_entry_t) {((type) << 2) | ((offset) << 8)}) + + #define pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) + #define swp_entry_to_pte(x) ((pte_t) { (x).val }) + + #include <asm-generic/pgtable.h> |