You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
(9) |
Apr
(27) |
May
(5) |
Jun
(8) |
Jul
(50) |
Aug
(286) |
Sep
(2) |
Oct
(43) |
Nov
(4) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(79) |
Feb
(102) |
Mar
(29) |
Apr
(2) |
May
(22) |
Jun
(41) |
Jul
(11) |
Aug
(28) |
Sep
(58) |
Oct
(4) |
Nov
(18) |
Dec
(8) |
2002 |
Jan
(2) |
Feb
(2) |
Mar
(1) |
Apr
(478) |
May
(469) |
Jun
(78) |
Jul
(16) |
Aug
(2) |
Sep
(7) |
Oct
(47) |
Nov
(5) |
Dec
(227) |
2003 |
Jan
(155) |
Feb
(188) |
Mar
(160) |
Apr
(172) |
May
(41) |
Jun
(205) |
Jul
(104) |
Aug
(289) |
Sep
(31) |
Oct
|
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Andy P. <at...@us...> - 2001-09-11 19:28:00
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/boot In directory usw-pr-cvs1:/tmp/cvs-serv24125 Modified Files: startup.c Log Message: Compilation warnings removed. Index: startup.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/boot/startup.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- startup.c 2001/08/19 10:34:42 1.1 +++ startup.c 2001/09/11 19:27:57 1.2 @@ -21,6 +21,7 @@ unsigned int rpb_size = sizeof(struct rpb_struct); char *vax_linux_banner="Linux/VAX (lin...@mi...)\n"; extern void start_kernel(void); +extern void guard_int_stack(void); /* arch/vax/kernel/interrupt.c */ /* This is a transitionary function. When things are finally sorted * the only tasks this function will perform will relate to the interaction @@ -83,10 +84,10 @@ printk("CPU type: %s, SID: %08x\n", mv->cpu_type_str(), vax_cpu.sid); - printk("VM: mapped physical from %x to %x, iomap from %x\n", PAGE_OFFSET, PAGE_OFFSET+(max_hwpfn*512), IOMAP_START); - printk("VM: vmalloc from %x to %x\n", VMALLOC_START, VMALLOC_END); - printk("VM: ptemap from %x to %x for %d processes\n",TASKPTE_START, TASKPTE_END,TASK_MAXUPRC); - printk("calling start_kernel...\n"); + printk("VM: mapped physical from %x to %x, iomap from %lx\n", PAGE_OFFSET, PAGE_OFFSET+(max_hwpfn*512), IOMAP_START); + printk("VM: vmalloc from %lx to %lx\n", VMALLOC_START, VMALLOC_END); + printk("VM: ptemap from %lx to %lx for %d processes\n",TASKPTE_START, TASKPTE_END,TASK_MAXUPRC); + printk("calling start_kernel...\n\n"); start_kernel(); } |
From: Andy P. <at...@us...> - 2001-09-11 19:25:17
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv22582 Modified Files: fault.c init.c ioremap.c Log Message: Cleanup compilation errors. Index: fault.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/fault.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- fault.c 2001/09/06 23:40:41 1.12 +++ fault.c 2001/09/11 19:25:15 1.13 @@ -47,7 +47,7 @@ #define REASON_WRITE (1<<2) #undef VAX_MM_DEBUG -#define VAX_MM_DEBUG_USER_FAULTS +#undef VAX_MM_DEBUG_USER_FAULTS static void do_page_fault(struct accvio_info *info, struct pt_regs *regs) @@ -136,7 +136,7 @@ show_regs(regs); show_cpu_regs(); printk("\nStack dump\n"); - hex_dump((void *)((regs->fp&~0xf)-64), 768); + hex_dump((void *)((regs->fp&~0xf), 512); printk("do_page_fault: sending SIGSEGV\n"); #endif Index: init.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/init.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- init.c 2001/09/02 20:50:16 1.17 +++ init.c 2001/09/11 19:25:15 1.18 @@ -53,8 +53,8 @@ pg0 = (pte_t *)SPT_BASE; /* set up pmd */ - swapper_pg_dir[2].pmd = swapper_pm_dir; - swapper_pg_dir[2].pmd2 = &swapper_pm_dir[1024]; + swapper_pg_dir[2].pmd = (unsigned int)swapper_pm_dir; + swapper_pg_dir[2].pmd2 = (unsigned int)&swapper_pm_dir[1024]; /* FIXME: I _really_ dont like this flag. */ pmd_val(swapper_pm_dir[PGD_SPECIAL]) = (unsigned long)swapper_pg_dir | 0x1; Index: ioremap.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/ioremap.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ioremap.c 2001/05/19 12:03:00 1.5 +++ ioremap.c 2001/09/11 19:25:15 1.6 @@ -142,7 +142,7 @@ return; } - p = GET_HWSPTE_VIRT(addr); + p = (pte_t *)GET_HWSPTE_VIRT(addr); if ((p < iomap_base) && (p >= (iomap_base + SPT_PTES_IOMAP))) { printk("iounmap: virtual addr 0x%08lx not in IOMAP region\n", |
From: Andy P. <at...@us...> - 2001-09-11 19:24:43
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv22363 Modified Files: setup.c Log Message: whoops, back command line change out. Index: setup.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/setup.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- setup.c 2001/09/11 19:23:38 1.14 +++ setup.c 2001/09/11 19:24:40 1.15 @@ -68,7 +68,7 @@ * atp -- have a temporary one. * Shouldn't we use strcpy here? */ - memcpy(command_line, "root=/dev/nfs nfsroot=/home/disk_vax/vaxroot rw debug\0",55); + memcpy(command_line, "root=/dev/nfs nfsroot=/tftpboot/vaxroot rw debug\0",55); *cmdline_p = command_line; /* Save unparsed command line copy for /proc/cmdline */ memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); |
From: Andy P. <at...@us...> - 2001-09-11 19:23:41
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv21502 Modified Files: interrupt.c process.c reboot.c regdump.c setup.c signal.c Log Message: Clean up compilation warnings Index: interrupt.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/interrupt.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- interrupt.c 2001/09/06 23:39:42 1.17 +++ interrupt.c 2001/09/11 19:23:38 1.18 @@ -23,6 +23,8 @@ #include "interrupt.h" /* Local, private definitions */ +int do_signal(sigset_t *oldset, struct pt_regs *regs); /* signal.c */ + unsigned char __attribute((__aligned__(PAGE_SIZE))) interrupt_stack[NR_CPUS][INT_STACK_SIZE]; union scb_and_device_vectors __attribute((__aligned__(PAGE_SIZE))) scb; @@ -294,7 +296,7 @@ void arith_handler(struct pt_regs *regs, void *excep_info) { int code = *(unsigned int *)(excep_info); - printk("Arithmetic Fault at PC=%8lx, %s, (code=%lx)\n",regs->pc,arith_faults[code],code); + printk("Arithmetic Fault at PC=%8lx, %s, (code=%x)\n",regs->pc,arith_faults[code],code); /* FIXME: need to code up the info for user handler */ if (user_mode(regs)) { force_sig(SIGFPE,current); Index: process.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/process.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- process.c 2001/09/02 20:48:39 1.12 +++ process.c 2001/09/11 19:23:38 1.13 @@ -109,12 +109,6 @@ struct new_thread_stack *child_stack; struct pt_regs *child_regs; void *stack_top; - pte_t *spte; - -// /* Place a guard page on page 3 */ -// spte=GET_SPTE_VIRT(p); -// spte+=2; -// set_pte(spte,pte_modify(*spte,PAGE_KRO)); /* stack top is at the end of the task_union - take the pointer, add in the size of task_union, Index: reboot.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/reboot.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- reboot.c 2001/07/31 17:28:26 1.3 +++ reboot.c 2001/09/11 19:23:38 1.4 @@ -17,6 +17,8 @@ #include <asm/mv.h> #include <asm/system.h> /* For HALT */ +extern void show_cpu_regs(void); + void machine_halt(void) { if (mv->halt == NULL) { Index: regdump.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/regdump.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- regdump.c 2001/09/01 12:21:15 1.4 +++ regdump.c 2001/09/11 19:23:38 1.5 @@ -108,7 +108,7 @@ if (i%4 == 0) { printk(" %08lx ", (unsigned long)(p+i)); } - if ((p+i)<PAGE_OFFSET){ + if ((unsigned int)(p+i)<PAGE_OFFSET){ if (get_user(x, p+i)) { printk(" --------"); } else { Index: setup.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/setup.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- setup.c 2001/09/02 20:48:39 1.13 +++ setup.c 2001/09/11 19:23:38 1.14 @@ -68,7 +68,7 @@ * atp -- have a temporary one. * Shouldn't we use strcpy here? */ - memcpy(command_line, "root=/dev/nfs nfsroot=/tftpboot/vaxroot rw debug\0",55); + memcpy(command_line, "root=/dev/nfs nfsroot=/home/disk_vax/vaxroot rw debug\0",55); *cmdline_p = command_line; /* Save unparsed command line copy for /proc/cmdline */ memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); @@ -100,7 +100,7 @@ bootmap_size = init_bootmem(0, max_pfn); - printk("bootmap size = %8.8x\n", bootmap_size); + printk("bootmap size = %8.8lx\n", bootmap_size); /* Available memory is now the region from the end of the bootmem bitmap to the start of the kernel and from the Index: signal.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/signal.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- signal.c 2001/09/06 23:39:42 1.7 +++ signal.c 2001/09/11 19:23:38 1.8 @@ -201,7 +201,6 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc) { unsigned int err = 0; - unsigned long old_usp; /* restore the regs from &sc->regs (same as sc, since regs is first) * (sc is already checked for VERIFY_READ since the sigframe was @@ -449,7 +448,7 @@ regs->pc = (unsigned long) frame->retcode; /* what we enter NOW */ regs->fp = regs->sp; - regs->sp = frame; + regs->sp = (unsigned int)frame; __mtpr(frame,PR_USP); /* and into to the register, ready for REI */ #ifdef DEBUG_SIG @@ -574,7 +573,7 @@ /* Set up registers for signal handler */ regs->pc = (unsigned long) ka->sa.sa_handler; /* what we enter NOW */ - regs->sp = frame; /* what we enter LATER */ + regs->sp = (unsigned int)frame; /* what we enter LATER */ return; |
From: Andy P. <at...@us...> - 2001-09-06 23:42:12
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv5546/mm Modified Files: task.h Log Message: Hopefully last change for task.h gcc now happy. Index: task.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/task.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- task.h 2001/09/02 20:52:51 1.4 +++ task.h 2001/09/06 23:42:09 1.5 @@ -22,7 +22,7 @@ /* TASK_MMAPMAX is the max space in P0 for the mmap() function , contiguous with TASK_TXTMAX - Its basically the amount of memory you give a process to play with */ -#define TASK_MMAPMAX (64*1024*1024) +#define TASK_MMAPMAX (48*1024*1024) /* TASK_STKMAX is the max space for the stack in P1 */ /* Like WSMAX above, the upper limit for this is set by PGD_SPECIAL below. If this |
From: Andy P. <at...@us...> - 2001-09-06 23:40:44
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv5308 Modified Files: fault.c Log Message: Add a new debugging define for debugging user page faults Index: fault.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/fault.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- fault.c 2001/08/31 11:50:57 1.11 +++ fault.c 2001/09/06 23:40:41 1.12 @@ -47,6 +47,7 @@ #define REASON_WRITE (1<<2) #undef VAX_MM_DEBUG +#define VAX_MM_DEBUG_USER_FAULTS static void do_page_fault(struct accvio_info *info, struct pt_regs *regs) @@ -126,15 +127,19 @@ up(&mm->mmap_sem); if (user_mode(regs)) { - printk(KERN_ALERT "Unable to do USER paging request: " - "pid %d, virtual address %08lx, reason mask %08x, " +#ifdef VAX_MM_DEBUG_USER_FAULTS + printk(KERN_ALERT "Unable to do USER paging request: " + "pid %d, virtual address %08lx, reason mask %08x, " "PC %08x, PSL %08x\n", current->pid, address, reason, info->pc, info->psl); show_regs(regs); show_cpu_regs(); + printk("\nStack dump\n"); + hex_dump((void *)((regs->fp&~0xf)-64), 768); printk("do_page_fault: sending SIGSEGV\n"); +#endif force_sig(SIGSEGV, current); return; } |
From: Andy P. <at...@us...> - 2001-09-06 23:39:45
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv4874 Modified Files: interrupt.c interrupt.h signal.c Log Message: Add new fault handlers - change debugging level in signal.c Index: interrupt.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/interrupt.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- interrupt.c 2001/09/02 20:48:39 1.16 +++ interrupt.c 2001/09/06 23:39:42 1.17 @@ -51,8 +51,8 @@ { pte_t p, *q; unsigned char *t, *s; - t = &interrupt_stack[0]; - s = SPT_BASE; + t = (unsigned char *)&interrupt_stack[0]; + s = (unsigned char *)SPT_BASE; /* Do we need more than a page for the int stack? */ if (INT_STACK_SIZE <= PAGE_SIZE) { printk("Interrupt stack too small, must be > PAGE_SIZE\n"); @@ -61,7 +61,7 @@ /* FIXME: kenn - does this want to be a 4k page or a hardware page ? */ /* see include/asm/mm/pgtable.h */ /* q = (((unsigned long) &interrupt_stack[smp_processor_id()])-PAGE_OFFSET)>>PAGELET_SHIFT;*/ - q = GET_HWSPTE_VIRT(&interrupt_stack[smp_processor_id()]); + q = (pte_t *)GET_HWSPTE_VIRT(&interrupt_stack[smp_processor_id()]); /* Set first page of interrupt stack area to kernel read, thus @@ -69,7 +69,7 @@ to expand the interrupt stack before they can do any damage. */ /* if this is a 4k page - need to use set_pte here */ - p = __mk_pte(&interrupt_stack[smp_processor_id()],__pgprot(_PAGE_KR|_PAGE_VALID)); + p = __mk_pte((unsigned long int)&interrupt_stack[smp_processor_id()],__pgprot(_PAGE_KR|_PAGE_VALID)); /* debug hwpte calculations FIXME: remove */ /* asm("movl %0, r2\n" @@ -103,7 +103,7 @@ /* register the machine check handler. */ void register_mcheck_handler(void) { - extern void machine_check_handler(void); + extern void machine_check_handler(struct pt_regs *regs, void *unused); struct irqvector *vector; unsigned char *inside_vec; @@ -174,7 +174,18 @@ printk("Panic: unable to register corrected read handler\n"); machine_halt(); } - + + /* other faults */ + if (register_excep_handler(SCB_RESAM,"reserved addressing mode (resam_handler)", resam_handler, 0, 0)) { + printk("Panic: unable to register reserved addressing mode handler\n"); + machine_halt(); + } + if (register_excep_handler(SCB_ARITH,"arithmetic fault (arith_handler)", arith_handler, 1, 0)) { + printk("Panic: unable to register arithmetic fault handler\n"); + machine_halt(); + } + + } void init_IRQ(void) @@ -230,12 +241,66 @@ machine_halt(); } + +/* This is the handler for reserved addressing mode exceptions. + Eventually this will have to check if the fault was from user + mode or kernel mode and either throw a SIGILL or panic. */ + +void resam_handler(struct pt_regs *regs, void *unused) +{ + unsigned short instr = *(unsigned short *)(regs->pc); + + if ((instr == 0xfeff) || (instr == 0xfdff)) { + printk("\nKernel bugcheck at PC=%08lx\n", regs->pc); + } else { + printk("\nReserved addressing mode fault at PC=%08lx\n", regs->pc); + } + + printk("\nStack dump\n"); + hex_dump((void *)(regs->sp), 256); + show_regs(regs); + show_cpu_regs(); + + if (user_mode(regs)) { + force_sig(SIGILL,current); + return; + } + machine_halt(); +} + /* This is the handler for corrected memory read errors */ void corrected_read_handler(struct pt_regs *regs, void *unused) { printk("Corrected memory read error. " "RAM failing or cache incorrectly initialized?\n"); +} + +/* This is the handler for arithmetic faults */ +char *arith_faults[] = { + "none", + "Integer Overflow", + "Integer Division by Zero", + "Floating Overflow Trap", + "Floating or Decimal Division by Zero Trap", + "Floating Underflow Trap", + "Decimal Overflow", + "Subscript Range", + "Floating Overflow Fault", + "Floating or Decimal Division by Zero Fault", + "Floating Underflow Fault" +}; + +void arith_handler(struct pt_regs *regs, void *excep_info) +{ + int code = *(unsigned int *)(excep_info); + printk("Arithmetic Fault at PC=%8lx, %s, (code=%lx)\n",regs->pc,arith_faults[code],code); + /* FIXME: need to code up the info for user handler */ + if (user_mode(regs)) { + force_sig(SIGFPE,current); + return; + } + } Index: interrupt.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/interrupt.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- interrupt.h 2001/06/26 18:59:00 1.5 +++ interrupt.h 2001/09/06 23:39:42 1.6 @@ -65,3 +65,5 @@ extern void reserved_instr_handler(struct pt_regs *regs, void *excep_info); extern void corrected_read_handler(struct pt_regs *regs, void *excep_info); extern void syscall_handler(struct pt_regs *regs, void *excep_info); +extern void resam_handler(struct pt_regs *regs, void *unused); +extern void arith_handler(struct pt_regs *regs, void *excep_info); Index: signal.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/signal.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- signal.c 2001/09/02 20:48:39 1.6 +++ signal.c 2001/09/06 23:39:42 1.7 @@ -32,7 +32,7 @@ #include <asm/ucontext.h> #include <asm/uaccess.h> -#define DEBUG_SIG 0 +#undef DEBUG_SIG /* FIXME: Check this & fixup other regs, like r0 */ #define RESTART_VAX_SYSCALL(regs) { (regs)->pc -= 4; } |
From: Andy P. <at...@us...> - 2001-09-05 10:16:43
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/net In directory usw-pr-cvs1:/tmp/cvs-serv8689 Modified Files: vaxlance.c Log Message: whoops, left a little debugging thing in there Index: vaxlance.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/net/vaxlance.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- vaxlance.c 2001/08/15 22:24:27 1.15 +++ vaxlance.c 2001/09/05 10:16:40 1.16 @@ -1079,8 +1079,6 @@ dev->irq=0x94; printk("Using LANCE interrupt vector %d\n", dev->irq); #endif - /* tmp atp*/ - dev->irq=0x94; printk("Using LANCE interrupt vector %d\n", dev->irq); dev->open = &lance_open; |
From: Richard B. <rb...@us...> - 2001-09-05 04:03:59
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/net In directory usw-pr-cvs1:/tmp/cvs-serv23015/drivers/net Modified Files: Space.c Log Message: Added lines for Vax SGEC driver Index: Space.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/net/Space.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Space.c 2001/02/26 02:28:27 1.3 +++ Space.c 2001/09/05 04:03:56 1.4 @@ -102,6 +102,7 @@ extern int mac89x0_probe(struct net_device *dev); extern int mc32_probe(struct net_device *dev); extern int vax_lance_probe(struct net_device *); +extern int vax_sgec_probe(struct net_device *); /* Gigabit Ethernet adapters */ extern int yellowfin_probe(struct net_device *dev); @@ -389,6 +390,9 @@ struct devprobe vax_probes[] __initdata = { #ifdef CONFIG_VAX_LANCE {vax_lance_probe, 0}, +#endif +#ifdef CONFIG_VAX_SGEC + {vax_sgec_probe, 0}, #endif }; #endif |
From: Richard B. <rb...@us...> - 2001-09-04 03:17:20
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/net In directory usw-pr-cvs1:/tmp/cvs-serv2755/drivers/net Modified Files: Makefile Added Files: vaxsgec.c Log Message: Added initial support for vax SGEC ethernet driver (still in progress) --- NEW FILE --- /* * SGEC ethernet driver. Reported as EZA0 etc by VAX Console. * * SGEC stands for Second Generation Ethernet Card, and is the * replacement for the LANCE adapters in the MicroVaxen. * * Loosely adapted from vaxlance.c by Dave Airlie * by Richard Banks, Aug 2001 * */ /* NOTE to self - look at code in arch/vax/if/ *ze*, arch/vax/vsa/ *ze*, and dev/ic/ *sgec* */ static char *version = "vaxsgec.c: v0.001 by Richard Banks\n"; static char *sgecstr = "SGEC"; #include <linux/init.h> [...1064 lines suppressed...] return vax_sgec_probe(NULL); } void cleanup_module(void) { struct sgec_private *lp; while (root_sgec_dev) { lp = root_sgec_dev->next_module; unregister_netdev(root_sgec_dev->dev); kfree(root_sgec_dev->dev); root_sgec_dev = lp; } } #endif Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/net/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Makefile 2001/02/26 02:28:27 1.3 +++ Makefile 2001/09/04 03:17:17 1.4 @@ -189,6 +189,7 @@ obj-$(CONFIG_SGI_IOC3_ETH) += ioc3-eth.o obj-$(CONFIG_BAGETLANCE) += bagetlance.o obj-$(CONFIG_VAX_LANCE) += vaxlance.o +obj-$(CONFIG_SGEC) += vaxsgec.o obj-$(CONFIG_DECLANCE) += declance.o obj-$(CONFIG_ATARILANCE) += atarilance.o obj-$(CONFIG_ATARI_BIONET) += atari_bionet.o |
From: Richard B. <rb...@us...> - 2001-09-04 03:17:20
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax In directory usw-pr-cvs1:/tmp/cvs-serv2755/arch/vax Modified Files: config.in Log Message: Added initial support for vax SGEC ethernet driver (still in progress) Index: config.in =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/config.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- config.in 2001/08/14 21:25:43 1.6 +++ config.in 2001/09/04 03:17:17 1.7 @@ -133,6 +133,7 @@ comment 'CCP compressors for PPP are only built as modules.' fi bool 'LANCE ethernet controller support' CONFIG_VAX_LANCE + bool 'SGEC ethernet controller support (EXPERIMENTAL)' CONFIG_SGEC fi endmenu |
From: Richard B. <rb...@us...> - 2001-09-04 03:11:42
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv1783/arch/vax/kernel Modified Files: cpu_ka55.c Log Message: Added support for VS bus initialization Index: cpu_ka55.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka55.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- cpu_ka55.c 2001/06/26 18:59:00 1.4 +++ cpu_ka55.c 2001/09/04 03:11:38 1.5 @@ -16,11 +16,13 @@ #include <asm/mtpr.h> #include <asm/mv.h> #include <asm/vaxcpu.h> +#include <asm/vsa.h> void ka55_pre_vm_init(void); void ka55_post_vm_init(void); void ka55_prom_putchar(int); int ka55_prom_getchar(void); +void ka55_init_devices(void); const char *ka55_cpu_type_str(void); @@ -45,8 +47,8 @@ NULL, /* reboot */ NULL, /* halt */ - NULL, /* init_devices */ NULL, /* mcheck - machine check */ + ka55_init_devices, /* init_devices */ ka55_cpu_type_str }, @@ -95,3 +97,9 @@ return "KA55"; } +void ka55_init_devices(void) +{ +#ifdef CONFIG_VSBUS + vsbus_setup(); +#endif +} |
From: Andy P. <at...@us...> - 2001-09-02 20:52:54
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv507 Modified Files: pgalloc.h task.h Log Message: New task sizes for gcc. Cleanups for pgalloc.c in pgalloc.h Index: pgalloc.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/pgalloc.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- pgalloc.h 2001/09/01 12:22:46 1.12 +++ pgalloc.h 2001/09/02 20:52:51 1.13 @@ -106,7 +106,7 @@ extern pmd_t *pmd_alloc_kernel(pgd_t *pgd, unsigned long address); extern void pmd_free_kernel(pmd_t *pmd); extern void pte_free(pte_t *pte); -extern unsigned long get_pageaddr_from_pte(pte_t *ptep); +extern pte_t *get_pageaddr_from_pte(pte_t *ptep); extern void free_pte_slow(pte_t *pte); extern pte_t *get_pte_slow(void); Index: task.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/task.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- task.h 2001/09/01 12:22:46 1.3 +++ task.h 2001/09/02 20:52:51 1.4 @@ -16,19 +16,19 @@ /* TASK_WSMAX must not be larger than 768MB. In the unlikely event that * you really want to allocate that much to a process, change PGD_SPECIAL below */ -/* TASK_TXTMAX is the maximum program size, including shared libs */ +/* TASK_TXTMAX is the maximum program size */ #define TASK_TXTMAX (16*1024*1024) /* TASK_MMAPMAX is the max space in P0 for the mmap() function , contiguous with TASK_TXTMAX - Its basically the amount of memory you give a process to play with */ -#define TASK_MMAPMAX (24*1024*1024) +#define TASK_MMAPMAX (64*1024*1024) /* TASK_STKMAX is the max space for the stack in P1 */ /* Like WSMAX above, the upper limit for this is set by PGD_SPECIAL below. If this * is above 256MB change PGD_SPECIAL */ -#define TASK_STKMAX (16*1024*1024) +#define TASK_STKMAX (4*1024*1024) #define TASK_WSMAX (TASK_TXTMAX+TASK_MMAPMAX) |
From: Andy P. <at...@us...> - 2001-09-02 20:50:19
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv32483 Modified Files: init.c pgalloc.c Log Message: Clean up pgalloc.c. init.c zeros empty_zero_page Index: init.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/init.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- init.c 2001/08/20 21:29:07 1.16 +++ init.c 2001/09/02 20:50:16 1.17 @@ -119,7 +119,11 @@ { max_mapnr = num_physpages = max_low_pfn; - /* this will put all low memory onto the freelists */ + /* clear the zero-page */ + memset(empty_zero_page, 0, PAGE_SIZE); + + /* this will put all low memory onto the freelists */ + totalram_pages += free_all_bootmem(); high_memory = (void *) __va((max_low_pfn) * PAGE_SIZE); Index: pgalloc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/pgalloc.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- pgalloc.c 2001/09/01 12:19:47 1.7 +++ pgalloc.c 2001/09/02 20:50:16 1.8 @@ -175,8 +175,8 @@ } if (!pmdpage) { printk(KERN_ERR "VAXMM: unable to allocate a pmd for pgd (%8p)\n",pgd ); - free_pmd_fast(get_pageaddr_from_pte(pgd->pmd)); - remap_pte_invalidate(pgd->pmd); + free_pmd_fast((pmd_t *)get_pageaddr_from_pte((pte_t *)pgd->pmd)); + remap_pte_invalidate((pmd_t *)pgd->pmd); return NULL; } @@ -217,14 +217,14 @@ } /* This inverts the remapping done in remap_and_clear */ -unsigned long get_pageaddr_from_pte(pte_t *ptep) +pte_t *get_pageaddr_from_pte(pte_t *ptep) { - unsigned long addr; + pte_t *addr; pte_t *s0pte; s0pte = GET_SPTE_VIRT(ptep); - addr = (unsigned long)(((pte_val(*s0pte)&PAGELET_PFN_MASK)<<PAGELET_SHIFT)|PAGE_OFFSET); + addr = (pte_t *)(((pte_val(*s0pte)&PAGELET_PFN_MASK)<<PAGELET_SHIFT)|PAGE_OFFSET); return addr; } @@ -236,8 +236,8 @@ #ifdef VAX_MM_PGALLOC_DEBUG printk(KERN_DEBUG "VAXMM:pmd_free: freeing pmd %p, pmd2 %p\n",pmd,pmdp); #endif - free_pmd_slow(get_pageaddr_from_pte(pmdp)); - free_pmd_slow(get_pageaddr_from_pte(pmd)); + free_pmd_fast((pmd_t *)get_pageaddr_from_pte((pte_t *)pmdp)); + free_pmd_fast((pmd_t *)get_pageaddr_from_pte((pte_t *)pmd)); /* invalidate the S0 ptes that map this */ remap_pte_invalidate(pmd); remap_pte_invalidate(pmdp); @@ -266,7 +266,7 @@ } /* locate the S0 pte that describes the page pointed to by s0addr */ - + s0pte = GET_SPTE_VIRT(s0addr); /* is it already pointing somewhere? */ @@ -276,10 +276,10 @@ } #endif - page_clear(pte_page); + clear_page(pte_page); /* zap the map */ - set_pte(s0pte,__mk_pte(pte_page,__pgprot(_PAGE_VALID|_PAGE_KW))); + set_pte(s0pte,__mk_pte((unsigned long int)pte_page,__pgprot(_PAGE_VALID|_PAGE_KW))); // print_pte(s0pte); flush_tlb_all(); @@ -380,10 +380,10 @@ if (((adjusted_address) >> PAGELET_SHIFT) < (pgdptr->lr)) { /* fill in any bits missing. Perhaps we should do this when we set up the * SPT in init.c just to be consistent */ - if (pmd_val(*pmd)==NULL) { + if (pmd_val(*pmd)==0) { spt_entry = (pmd - (pmd_t *)(pgdptr->pmd))<< (PAGE_SHIFT+7) | PAGE_OFFSET; spte = GET_SPTE_VIRT(spt_entry); - pmd_val(*pmd) = spte; + pmd_val(*pmd) = (unsigned long int)spte; } return pte_offset(pmd, adjusted_address); } @@ -422,7 +422,7 @@ pmd_t *pmdi; long int direction,ii; - pmd_basep = ((unsigned long)pmd & PTE_TASK_MASK); /* base of the pmd */ + pmd_basep = (pmd_t *)((unsigned long)pmd & PTE_TASK_MASK); /* base of the pmd */ #ifdef VAX_MM_PGALLOC_DEBUG printk(KERN_DEBUG "VAXMM:pte_alloc: pmd_basep %8lx, pmd %8lx, pmd_val %8lx, address %8lx, pmd_index %8lx\n",pmd_basep,pmd,pmd_val(*pmd),address,pmd_index(address)); @@ -451,13 +451,13 @@ if (is_p1){ adjusted_address |= 0x40000000; if (adjusted_address <= (PAGE_OFFSET-TASK_STKMAX)) { - printk(KERN_NOTICE "VAXMM: process %p exceeded TASK_STKMAX (%dMB)\n",current,(TASK_STKMAX>>10)); + printk(KERN_NOTICE "VAXMM: process %p exceeded TASK_STKMAX (%dMB) addr %8lx\n",current,(TASK_STKMAX>>20),adjusted_address); goto give_segv; } pte_number = (adjusted_address - 0x40000000) >> PAGE_SHIFT; } else { if (adjusted_address >= (TASK_WSMAX)) { - printk(KERN_NOTICE "VAXMM: process %p exceeded TASK_WSMAX (%dMB)\n",current,(TASK_WSMAX>>10)); + printk(KERN_NOTICE "VAXMM: process %p exceeded TASK_WSMAX (%dMB) addr %8lx\n",current,(TASK_WSMAX>>20),adjusted_address); goto give_segv; } pte_number = (adjusted_address>>PAGE_SHIFT); @@ -490,12 +490,12 @@ /* The s0 address of the current end page in the page table is * current_last_page * 128 ptes/page * 32 bytes/pte_t + base reg */ - s0addr = (((current_last_page)<<7)*BYTES_PER_PTE_T)+pgdp->br; + s0addr = (pmd_t *) ((((current_last_page)<<7)*BYTES_PER_PTE_T)+pgdp->br); direction = -1; pmdi = pmd_basep+(current_last_page); } else { npages = target_page - current_last_page; - s0addr = (((current_last_page + 1)<<7)*BYTES_PER_PTE_T)+pgdp->br; + s0addr = (pmd_t *) ((((current_last_page + 1)<<7)*BYTES_PER_PTE_T)+pgdp->br); direction = 1; pmdi = pmd_basep+(current_last_page + 1); } @@ -559,14 +559,14 @@ { free_pte_fast(get_pageaddr_from_pte(pte)); /* invalidate the S0 pte that maps this */ - remap_pte_invalidate(pte); + remap_pte_invalidate((pmd_t *)pte); } /* This is only ever called from do_pgt_cache, all the unmapping have been done * before the page has been placed on the pgt cache */ void free_pte_slow(pte_t *pte) { - free_page(pte); + free_page((unsigned long int)pte); } void pte_free_kernel(pte_t *pte) @@ -590,7 +590,7 @@ #else pte_t * pte_offset(pmd_t * dir, unsigned long address) { - return (pmd_val(*dir)+(((address>>PAGE_SHIFT)&(PTRS_PER_PTE-1))<<SIZEOF_PTE_LOG2)); + return (pte_t *)(pmd_val(*dir)+(((address>>PAGE_SHIFT)&(PTRS_PER_PTE-1))<<SIZEOF_PTE_LOG2)); } #endif /* get_pte_kernel_slow. allocate a page of PTEs for the S0 pagetable. |
From: Andy P. <at...@us...> - 2001-09-02 20:48:42
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv31965 Modified Files: interrupt.c process.c setup.c signal.c syscall.c Log Message: fix slab.c bug, due to wrong setting of kernel stack pointer in copy_thread add debugging/machine halts to signal and syscall Index: interrupt.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/interrupt.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- interrupt.c 2001/08/20 21:30:52 1.15 +++ interrupt.c 2001/09/02 20:48:39 1.16 @@ -190,12 +190,17 @@ { printk("\nReserved operand fault at PC=%08lx\n", regs->pc); + printk("\nStack dump\n"); hex_dump((void *)(regs->sp), 256); show_regs(regs); show_cpu_regs(); + if (user_mode(regs)) { + force_sig(SIGILL,current); + return; + } machine_halt(); } @@ -218,6 +223,10 @@ show_regs(regs); show_cpu_regs(); + if (user_mode(regs)) { + force_sig(SIGILL,current); + return; + } machine_halt(); } @@ -345,8 +354,8 @@ /* If the excep_handler field of the irqvector is NULL, then this is an interrupt vector. Dispatch it via the irqaction struct */ - if (vec->excep_handler != NULL) { +// printk("exception: vec=%p handler %p excep_info=%p(%d)\n",vec,vec->excep_handler,excep_info,*(int *)excep_info); do_exception(regs, vec, excep_info); if (vec == scb.scb.chmk) { goto ret_from_sys_call; @@ -377,6 +386,7 @@ } ret_with_reschedule: +// printk("syscall: pid %d need_resched %d sigpending %d state %d\n",current->pid,current->need_resched,current->sigpending,current->state); if (current->need_resched) { schedule(); goto ret_from_sys_call; @@ -385,8 +395,10 @@ /* check for pending signals */ if (current->sigpending != 0) { /* FIXME: do we need to check the IPL here (i386 does a sti here) */ - do_signal(); + /* FIXME: oldset? */ + do_signal(0,regs); } +// printk("syscall: out of c code\n"); done: } Index: process.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/process.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- process.c 2001/08/17 20:36:30 1.11 +++ process.c 2001/09/02 20:48:39 1.12 @@ -109,13 +109,25 @@ struct new_thread_stack *child_stack; struct pt_regs *child_regs; void *stack_top; + pte_t *spte; -/* printk("copy_thread: creating new thread: pid %d, task 0x%08lx, usp 0x%08lx\n", - p->pid, (unsigned long)p, usp); */ - - stack_top = ((union task_union *)p) + 1; - +// /* Place a guard page on page 3 */ +// spte=GET_SPTE_VIRT(p); +// spte+=2; +// set_pte(spte,pte_modify(*spte,PAGE_KRO)); + + /* stack top is at the end of the task_union + - take the pointer, add in the size of task_union, + and then drop by a longword to keep it within the + current union + */ + stack_top = ((union task_union *)p)+1; + stack_top -= 4; + child_stack = (struct new_thread_stack *)(stack_top) - 1; + +// printk("copy_thread: pid %d, task 0x%08lx, kstack_top 0x%8lx, usp 0x%08lx, ksp 0x%08lx\n", +// p->pid, (unsigned long)p, stack_top, usp, child_stack); child_regs = &child_stack->regs; Index: setup.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/setup.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- setup.c 2001/08/21 20:06:42 1.12 +++ setup.c 2001/09/02 20:48:39 1.13 @@ -158,6 +158,8 @@ #ifdef __SMP__ setup_smp(); #endif + + pte_ERROR( *(pte_t *)0x80291d80); } Index: signal.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/signal.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- signal.c 2001/08/27 23:39:28 1.5 +++ signal.c 2001/09/02 20:48:39 1.6 @@ -111,6 +111,8 @@ sigset_t saveset, newset; /* XXX: Don't preclude handling different sized sigset_t's. */ + machine_halt(); + if (sigsetsize != sizeof(sigset_t)) return -EINVAL; @@ -281,6 +283,8 @@ * then frame should be dword aligned here. If it's * not, then the user is trying to mess with us. */ + machine_halt(); + if (((long)frame) & 3) goto badframe; @@ -527,6 +531,7 @@ unsigned long return_ip; int err = 0; + machine_halt(); frame = get_sigframe(ka, regs, sizeof(*frame)); if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) Index: syscall.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/syscall.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- syscall.c 2001/08/19 10:32:58 1.6 +++ syscall.c 2001/09/02 20:48:39 1.7 @@ -78,8 +78,8 @@ nr_args = *user_ap; } -/* printk("Dispatching syscall %d with %d args\n", chmk_arg, nr_args);*/ - +// printk("Dispatching syscall %d with %d args, regs=%8lx\n", chmk_arg, nr_args,regs); + /* We pass all the user-supplied args plus the pointer to the regs to the syscall function. If the syscall is implemented in the core kernel, then it will ignore the additional |
From: Andy P. <at...@us...> - 2001-09-01 12:22:49
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv26817 Modified Files: pgalloc.h task.h Log Message: Change task sizes to be more appropriate for gcc. Change cache size counter to have separate counters for each cache type, and fix stupid do_pgt_cache looping bug. pgtable -> pgd cache. Index: pgalloc.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/pgalloc.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- pgalloc.h 2001/08/23 09:29:15 1.11 +++ pgalloc.h 2001/09/01 12:22:46 1.12 @@ -35,6 +35,7 @@ extern struct pgtable_cache_struct { unsigned long *pgd_cache; unsigned long pgd_slots_used; + unsigned long pgd_cache_sz; unsigned long *pte_cache; unsigned long pgtable_cache_sz; } quicklists; @@ -48,6 +49,7 @@ #define pmd_quicklist ((unsigned long *)0) #define pte_quicklist (quicklists.pte_cache) #define pgtable_cache_size (quicklists.pgtable_cache_sz) +#define pgd_cache_size (quicklists.pgd_cache_sz) #define pgd_slots_used (quicklists.pgd_slots_used) /* @@ -63,7 +65,7 @@ { *(unsigned long *)pgd = (unsigned long) pgd_quicklist; pgd_quicklist = (unsigned long *) pgd; - pgtable_cache_size++; + pgd_cache_size++; } extern __inline__ void free_pgd_slow(pgd_t *pgd) @@ -80,7 +82,7 @@ if ((ret = (unsigned long *)pte_quicklist) != NULL) { pte_quicklist = (unsigned long *)(*ret); - ret[0] = ret[1]; + ret[0] = 0; pgtable_cache_size--; } return (pmd_t *)ret; @@ -119,7 +121,7 @@ if((ret = (unsigned long *)pte_quicklist) != NULL) { pte_quicklist = (unsigned long *)(*ret); - ret[0] = ret[1]; + ret[0] = 0; pgtable_cache_size--; } return (pte_t *)ret; Index: task.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/task.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- task.h 2001/08/21 20:12:42 1.2 +++ task.h 2001/09/01 12:22:46 1.3 @@ -22,13 +22,13 @@ /* TASK_MMAPMAX is the max space in P0 for the mmap() function , contiguous with TASK_TXTMAX - Its basically the amount of memory you give a process to play with */ -#define TASK_MMAPMAX (32*1024*1024) +#define TASK_MMAPMAX (24*1024*1024) /* TASK_STKMAX is the max space for the stack in P1 */ /* Like WSMAX above, the upper limit for this is set by PGD_SPECIAL below. If this * is above 256MB change PGD_SPECIAL */ -#define TASK_STKMAX (8*1024*1024) +#define TASK_STKMAX (16*1024*1024) #define TASK_WSMAX (TASK_TXTMAX+TASK_MMAPMAX) |
From: Andy P. <at...@us...> - 2001-09-01 12:21:18
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv26693 Modified Files: regdump.c Log Message: I find --- less useful than the numbers. Nasty hack to dump more information Index: regdump.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/regdump.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- regdump.c 2001/08/20 21:30:52 1.3 +++ regdump.c 2001/09/01 12:21:15 1.4 @@ -108,11 +108,18 @@ if (i%4 == 0) { printk(" %08lx ", (unsigned long)(p+i)); } + if ((p+i)<PAGE_OFFSET){ if (get_user(x, p+i)) { printk(" --------"); } else { printk(" %08x", x); } + } else { + x= *(p+i); + printk(" %08x", x); + } + + if (i%4 == 3) { printk("\n"); } |
From: Andy P. <at...@us...> - 2001-09-01 12:19:51
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv26247 Modified Files: pgalloc.c Log Message: fix the stupid pgtable->pgd_table cache size counter bug Index: pgalloc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/pgalloc.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- pgalloc.c 2001/08/31 11:50:57 1.6 +++ pgalloc.c 2001/09/01 12:19:47 1.7 @@ -36,7 +36,7 @@ if ((ret = pgd_quicklist) != NULL) { pgd_quicklist = (unsigned long *)(*ret); ret[0] = 0; - pgtable_cache_size--; + pgd_cache_size--; } return (pgd_t *)ret; } |
From: Andy P. <at...@us...> - 2001-08-31 14:10:44
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv2202 Modified Files: pagelet_pgprot.h pagelet_pte.h Log Message: page_chg_mask incorrectly defined, and pte_modify modified. Some things shifted about Index: pagelet_pgprot.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/pagelet_pgprot.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- pagelet_pgprot.h 2001/02/15 01:17:23 1.1 +++ pagelet_pgprot.h 2001/08/31 11:53:29 1.2 @@ -56,10 +56,9 @@ #define _PAGE_TABLE (_PAGE_VALID | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_UW ) #define _KERNPG_TABLE (_PAGE_VALID | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_KW ) -/* UW has fewer bits set than UR */ -#define _PAGE_CHG_MASK (_PFN_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_UR ) +#define _PAGE_CHG_MASK (_PFN_MASK | _PAGE_ACCESSED | _PAGE_DIRTY) -#define PAGE_PROT_MASK (0x1e000000) +/*#define PAGE_PROT_MASK (0x1e000000)*/ #define PAGE_NONE __pgprot(_PAGE_VALID | _PAGE_ACCESSED) #define PAGE_SHARED __pgprot(_PAGE_VALID | _PAGE_ACCESSED | _PAGE_UW ) Index: pagelet_pte.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/pagelet_pte.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- pagelet_pte.h 2001/07/31 17:33:26 1.6 +++ pagelet_pte.h 2001/08/31 11:53:29 1.7 @@ -149,7 +149,7 @@ */ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) { - pte_val(pte) &= PAGELET_MASK; + pte_val(pte) &= _PAGE_CHG_MASK; pte_val(pte) |= pgprot_val(newprot); return pte; } @@ -242,6 +242,7 @@ return pte; } +/* used in arch/vax/mm/pgalloc.c */ static inline pte_t pte_mkinvalid(pte_t pte) { pte_val(pte) &= ~_PAGE_VALID; |
From: Andy P. <at...@us...> - 2001-08-31 14:04:48
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv1856 Modified Files: fault.c pgalloc.c Log Message: Fix double pte invalidate bug Index: fault.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/fault.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- fault.c 2001/08/21 20:09:34 1.10 +++ fault.c 2001/08/31 11:50:57 1.11 @@ -59,7 +59,7 @@ unsigned fixup; #ifdef VAX_MM_DEBUG - printk("mmfault: fault at %8x, pc %8x, psl %8x, reason %8x\n",info->addr, info->pc, info->psl, info->reason); + printk("mmfault: pid %d fault at %8x, pc %8x, psl %8x, reason %8x\n",current->pid,info->addr, info->pc, info->psl, info->reason); printk("mmfault:p0br %8lx, p0lr %8lx, p1br %8lx, p1lr %8lx\n",Xmfpr(PR_P0BR),Xmfpr(PR_P0LR),Xmfpr(PR_P1BR),Xmfpr(PR_P1LR)); #endif /* This check, and the mm != NULL checks later, will be removed @@ -105,6 +105,7 @@ } survive: { + int fault; fault = handle_mm_fault(mm, vma, address, reason & REASON_WRITE); if (!fault) @@ -112,6 +113,7 @@ if (fault < 0) goto out_of_memory; } + up(&mm->mmap_sem); return; @@ -120,6 +122,7 @@ * Fix it, but check if it's kernel or user first.. */ bad_area: + up(&mm->mmap_sem); if (user_mode(regs)) { @@ -127,16 +130,17 @@ "pid %d, virtual address %08lx, reason mask %08x, " "PC %08x, PSL %08x\n", current->pid, address, reason, info->pc, info->psl); - printk("do_page_fault: sending SIGSEGV\n"); + show_regs(regs); + show_cpu_regs(); + + printk("do_page_fault: sending SIGSEGV\n"); force_sig(SIGSEGV, current); - /* signals arent implemented yet */ - /* They are now atp aug 17 2001 */ -// machine_halt(); return; } no_context: + /* Are we prepared to handle this fault as an exception? */ if ((fixup = search_exception_table(regs->pc)) != 0) { regs->pc = fixup; @@ -147,6 +151,7 @@ * Oops. The kernel tried to access some bad page. We'll have to * terminate things with extreme prejudice. */ + printk(KERN_ALERT "Unable to handle kernel paging request at " "virtual address %08lx, reason mask %08x, " "PC %08x, PSL %08x\n", Index: pgalloc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/pgalloc.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- pgalloc.c 2001/08/23 09:27:01 1.5 +++ pgalloc.c 2001/08/31 11:50:57 1.6 @@ -225,7 +225,6 @@ s0pte = GET_SPTE_VIRT(ptep); addr = (unsigned long)(((pte_val(*s0pte)&PAGELET_PFN_MASK)<<PAGELET_SHIFT)|PAGE_OFFSET); -// printk("get_pageaddr: ptep %p, spte %8lx, *spte %8lx, addr %8lx\n",ptep,s0pte,pte_val(*s0pte),addr); return addr; } @@ -249,7 +248,7 @@ * This is like remap_pte_range in memory.c but VAX specific * * s0addr is the address in S0 space that we need to remap the page - * pointed to pte_page to. We also clear the page pointed at by pte_page + * pointed at by pte_page to. We also clear the page pointed at by pte_page */ void remap_and_clear_pte_page(pmd_t *s0addr, pte_t *pte_page) { @@ -301,7 +300,6 @@ s0pte = GET_SPTE_VIRT(s0addr); set_pte(s0pte, pte_mkinvalid(*s0pte)); -// print_pte(s0pte); /* FIXME: these flush_tlb_alls need replacing with flush_tlb_8 */ flush_tlb_all(); // __flush_tlb_one(s0addr); @@ -444,8 +442,6 @@ is_p1=pgdp->segment; -// printk(KERN_DEBUG "ptealloc:pgd %8p, pgd->segment %ld, pgd->br %8lx, pgd->lr %lx, pgd->slot %8lx\n",pgdp,pgdp->segment,pgdp->br,pgdp->lr,pgdp->slot); - /* make an adjusted address + calculate linear page table entry */ adjusted_address = (((pmd-pmd_basep))<<(PAGE_SHIFT+7))+ (address&~PMD_MASK); @@ -566,12 +562,11 @@ remap_pte_invalidate(pte); } -/* we don't allocate any space for pte, just clear the one passed to us */ +/* This is only ever called from do_pgt_cache, all the unmapping have been done + * before the page has been placed on the pgt cache */ void free_pte_slow(pte_t *pte) { - free_page((unsigned long) get_pageaddr_from_pte(pte)); - /* invalidate the S0 pte that maps this */ - remap_pte_invalidate(pte); + free_page(pte); } void pte_free_kernel(pte_t *pte) |
From: Andy P. <at...@us...> - 2001-08-27 23:39:31
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv3881 Modified Files: signal.c Log Message: Add trampoline code to make user signal handlers work. Index: signal.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/signal.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- signal.c 2001/08/17 20:20:41 1.4 +++ signal.c 2001/08/27 23:39:28 1.5 @@ -40,7 +40,7 @@ #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) -int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs); +int do_signal(sigset_t *oldset, struct pt_regs *regs); int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from) { @@ -96,7 +96,7 @@ while (1) { current->state = TASK_INTERRUPTIBLE; schedule(); - if (do_signal(0, &saveset, regs)) + if (do_signal(&saveset, regs)) return -EINTR; } } @@ -128,7 +128,7 @@ while (1) { current->state = TASK_INTERRUPTIBLE; schedule(); - if (do_signal(0, &saveset, regs)) + if (do_signal(&saveset, regs)) return -EINTR; } } @@ -178,12 +178,13 @@ */ struct sigframe { - char *pretcode; + int sig; struct sigcontext sc; unsigned long extramask[_NSIG_WORDS-1]; - unsigned char retcode[8]; /* trampoline code */ + unsigned char retcode[20]; /* trampoline code */ }; +/* FIXME: this dont work ... */ struct rt_sigframe { char *pretcode; struct siginfo *pinfo; @@ -241,7 +242,7 @@ if (((long)frame) & 3) goto badframe; - if (verify_area(VERIFY_READ, frame, sizeof(*frame))) + if (verify_area(VERIFY_READ, frame, sizeof(*frame))) goto badframe; if (__get_user(set.sig[0], &frame->sc.oldmask) || (_NSIG_WORDS > 1 @@ -267,6 +268,8 @@ return 0; } + +/* FIXME: _rt_ stuff is completely unchecked + probably does not work */ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) { struct rt_sigframe *frame = (struct rt_sigframe *)(regs->sp); @@ -342,7 +345,7 @@ } /* make sure the frame is dword-aligned */ - + sp &= ~3; return (void *)(sp - frame_size); @@ -360,14 +363,20 @@ sigset_t *set, struct pt_regs * regs) { struct sigframe *frame; - unsigned long return_ip; int err = 0; frame = get_sigframe(ka, regs, sizeof(*frame)); - + + +#ifdef DEBUG_SIG + printk("setup_frame: pid %d, sig %d, regs %p, frame %p, sigaction %p\n",current->pid,sig,regs,frame,ka); + show_regs(regs); +#endif if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) goto give_sigsegv; + /* write the signal onto the stack */ + err |= __put_user(sig, (unsigned int *)&frame->sig); err |= setup_sigcontext(&frame->sc, regs, set->sig[0]); if (err) goto give_sigsegv; @@ -381,27 +390,127 @@ /* Set up to return from userspace. If provided, use a stub already in userspace. */ + + /* We do this differently to other ports. Each function has a two byte RSM. + * (due to the calling convention). Each sighandler will expect to be + * CALLS'd and will RET from that. So we cant just muck about with PC's on the + * stack like the i386. So we use the trampoline code on the stack a bit more. + * The easiest way to skip around all this is to calls the signal + * handler, and then either calls the restorer, or chmk to sys_sigreturn */ + + /* CALLS $1, */ + err |= __put_user(0xfb, (char *)(frame->retcode+0)); + err |= __put_user(0x01, (char *)(frame->retcode+1)); + /* (absolute address)*/ + err |= __put_user(0x9f, (char *)(frame->retcode+2)); + /* sighandler */ + err |= __put_user(((unsigned long) ka->sa.sa_handler), (unsigned long *)(frame->retcode + 3)); + if (ka->sa.sa_flags & SA_RESTORER) { - return_ip = (unsigned long)ka->sa.sa_restorer; + /* CALLS $0,*/ + err |= __put_user(0xfb, (char *)(frame->retcode+7)); + err |= __put_user(0x00, (char *)(frame->retcode+8)); + /* (absolute address)*/ + err |= __put_user(0x9f, (char *)(frame->retcode+9)); + /* restorer */ + err |= __put_user(((unsigned long) ka->sa.sa_restorer), (unsigned long *)(frame->retcode + 10)); + /* plus a halt */ + err |= __put_user(0x00, (char *)(frame->retcode+14)); } else { - /* trampoline - the desired return ip is the retcode itself */ - return_ip = (unsigned long)&frame->retcode; - /* This is chmk __NR_sigreturn; */ - /* TODO: check byteorder */ - err |= __put_user(0xbc8f, (short *)(frame->retcode+0)); - err |= __put_user(__NR_sigreturn, (short *)(frame->retcode+2)); + /* perform a syscall to sys_sigreturn. First set up the + * argument list to avoid confusing it */ + + /* pushl $0x0 */ + err |= __put_user(0xdd, (char *)(frame->retcode+7)); + err |= __put_user(0x00, (char *)(frame->retcode+8)); + /* movl sp, ap */ + err |= __put_user(0xd0, (char *)(frame->retcode+9)); + err |= __put_user(0x5e, (char *)(frame->retcode+10)); + err |= __put_user(0x5c, (char *)(frame->retcode+11)); + /* chmk __NR_sigreturn; */ + err |= __put_user(0xbc, (char *)(frame->retcode+12)); + err |= __put_user(0x8f, (char *)(frame->retcode+13)); + err |= __put_user(__NR_sigreturn, (short *)(frame->retcode+14)); + /* plus a halt */ + err |= __put_user(0x00, (char *)(frame->retcode+16)); } - err |= __put_user(return_ip, &frame->pretcode); - if (err) goto give_sigsegv; +#ifdef DEBUG_SIG + printk("setup_frame: pid %d, frame->retcode %p, sa_handler %p\n",current->pid,frame->retcode,ka->sa.sa_handler); +#endif /* Set up registers for signal handler */ - - regs->pc = (unsigned long) ka->sa.sa_handler; /* what we enter NOW */ - regs->sp = frame; - + + regs->pc = (unsigned long) frame->retcode; /* what we enter NOW */ + regs->fp = regs->sp; + regs->sp = frame; + __mtpr(frame,PR_USP); /* and into to the register, ready for REI */ + +#ifdef DEBUG_SIG + printk("setup_frame: pid %d, regs->pc %8lx, regs->sp %8lx, regs->ap %8lx\n",current->pid,regs->pc,regs->sp,regs->ap); + { + unsigned char c[4]; + __get_user(c[0], (char *)&frame->sig); + __get_user(c[1], (char *)&frame->sig+1); + __get_user(c[2], (char *)&frame->sig+2); + __get_user(c[3], (char *)&frame->sig+3); + printk("setup_frame: %p %1x %p %1x %p %1x %p %1x\n", + &frame->sig, c[0], + &frame->sig+1, c[1], + &frame->sig+2, c[2], + &frame->sig+3, c[3]); + } + { + unsigned char c[4]; + __get_user(c[0], (char *)frame->retcode); + __get_user(c[1], (char *)frame->retcode+1); + __get_user(c[2], (char *)frame->retcode+2); + __get_user(c[3], (char *)frame->retcode+3); + printk("setup_frame: %p %1x %p %1x %p %1x %p %1x\n", + frame->retcode, c[0], + frame->retcode+1, c[1], + frame->retcode+2, c[2], + frame->retcode+3, c[3]); + } + { + unsigned char c[4]; + __get_user(c[0], (char *)frame->retcode+4); + __get_user(c[1], (char *)frame->retcode+5); + __get_user(c[2], (char *)frame->retcode+6); + __get_user(c[3], (char *)frame->retcode+7); + printk("setup_frame: %p %1x %p %1x %p %1x %p %1x\n", + frame->retcode+4, c[0], + frame->retcode+5, c[1], + frame->retcode+6, c[2], + frame->retcode+7, c[3]); + } + { + unsigned char c[4]; + __get_user(c[0], (char *)frame->retcode+8); + __get_user(c[1], (char *)frame->retcode+9); + __get_user(c[2], (char *)frame->retcode+10); + __get_user(c[3], (char *)frame->retcode+11); + printk("setup_frame: %p %1x %p %1x %p %1x %p %1x\n", + frame->retcode+8, c[0], + frame->retcode+9, c[1], + frame->retcode+10, c[2], + frame->retcode+11, c[3]); + } + { + unsigned char c[4]; + __get_user(c[0], (char *)frame->retcode+12); + __get_user(c[1], (char *)frame->retcode+13); + __get_user(c[2], (char *)frame->retcode+14); + __get_user(c[3], (char *)frame->retcode+15); + printk("setup_frame: %p %1x %p %1x %p %1x %p %1x\n", + frame->retcode+12, c[0], + frame->retcode+13, c[1], + frame->retcode+14, c[2], + frame->retcode+15, c[3]); + } +#endif return; give_sigsegv: @@ -410,6 +519,7 @@ force_sig(SIGSEGV, current); } +/* FIXME: this is bogus */ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *set, struct pt_regs * regs) { @@ -504,7 +614,10 @@ } /* Set up the stack frame */ - if (ka->sa.sa_flags & SA_SIGINFO) +#ifdef DEBUG_SIG + printk("handle_signal: setup_frame(sig=%d,ka=%p,oldset=%d,regs=%p)\n",sig,ka,oldset,regs); +#endif + if (ka->sa.sa_flags & SA_SIGINFO) setup_rt_frame(sig, ka, info, oldset, regs); else setup_frame(sig, ka, oldset, regs); @@ -526,11 +639,11 @@ * want to handle. Thus you cannot kill init even with a SIGKILL even by * mistake. */ -int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs) +int do_signal(sigset_t *oldset, struct pt_regs *regs) { siginfo_t info; struct k_sigaction *ka; - + int canrestart; /* * We want the common case to go fast, which * is why we may in certain cases get here from @@ -540,16 +653,24 @@ if (!user_mode(regs)) return 1; + /* FIXME: */ + canrestart=0; +#ifdef DEBUG_SIG + printk("do_signal: pid %d,canrestart %d, current->sigpending %d,current->blocked %d ", current->pid,canrestart,current->sigpending,current->blocked); +#endif if (!oldset) oldset = ¤t->blocked; + for (;;) { unsigned long signr; spin_lock_irq(¤t->sigmask_lock); signr = dequeue_signal(¤t->blocked, &info); spin_unlock_irq(¤t->sigmask_lock); - +#ifdef DEBUG_SIG + printk(" sig %d\n",signr); +#endif if (!signr) break; @@ -589,6 +710,9 @@ if (ka->sa.sa_handler == SIG_IGN) { if (signr != SIGCHLD) continue; +#ifdef DEBUG_SIG + printk("do_signal: waiting for sigchld\n"); +#endif /* Check for SIGCHLD: it's special. */ while (sys_wait4(-1, NULL, WNOHANG, NULL) > 0) /* nothing */; @@ -597,7 +721,9 @@ if (ka->sa.sa_handler == SIG_DFL) { int exit_code = signr; - +#ifdef DEBUG_SIG + printk("do_signal: invoking default handler for sig %d\n",signr); +#endif /* Init gets no signals it doesn't want. */ if (current->pid == 1) continue; @@ -631,11 +757,16 @@ sigaddset(¤t->pending.signal, signr); recalc_sigpending(current); current->flags |= PF_SIGNALED; +#ifdef DEBUG_SIG + printk("handle_sig: do_exit exit_code=%d\n",exit_code); +#endif do_exit(exit_code); /* NOTREACHED */ } } - +#ifdef DEBUG_SIG + printk("do_signal: handle_signal(canrestart=%d,signr=%d,info=%p,ka->sa.sa_handler=%p)\n",canrestart,signr,info,ka->sa.sa_handler); +#endif /* Whee! Actually deliver the signal. */ handle_signal(canrestart, signr, ka, &info, oldset, regs); return 1; |
From: Andy P. <at...@us...> - 2001-08-23 09:29:18
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv28094 Modified Files: pgalloc.h Log Message: Move some functions from here to pgalloc.c Fixup the freeing of pages from the page cache to use correct addresses Index: pgalloc.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/pgalloc.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- pgalloc.h 2001/08/20 21:34:48 1.10 +++ pgalloc.h 2001/08/23 09:29:15 1.11 @@ -105,11 +105,13 @@ extern void pmd_free_kernel(pmd_t *pmd); extern void pte_free(pte_t *pte); extern unsigned long get_pageaddr_from_pte(pte_t *ptep); +extern void free_pte_slow(pte_t *pte); extern pte_t *get_pte_slow(void); extern pte_t *get_pte_kernel_slow(pmd_t *pmd, unsigned long offset); extern void remap_and_clear_pte_page(pmd_t *s0addr, pte_t *page); extern void remap_pte_invalidate(pmd_t *s0addr); +extern void pte_free_kernel(pte_t *pte); extern __inline__ pte_t *get_pte_fast(void) { @@ -130,16 +132,8 @@ pgtable_cache_size++; } -/* we don't allocate any space for pte, just clear the one passed to us */ -extern __inline__ void free_pte_slow(pte_t *pte) -{ - pte_clear(pte); - free_page((unsigned long)pte); -} - extern __inline__ void page_clear(pte_t *pte) {memset(pte, 0, PAGE_SIZE);} -#define pte_free_kernel(pte) free_pte_fast(pte) #define pgd_free(pgd) free_pgd_fast(pgd) /* atp jun 01, moved these to arch/vax/mm/pgalloc.c */ |
From: Andy P. <at...@us...> - 2001-08-23 09:27:04
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv27320 Modified Files: pgalloc.c Log Message: Include last remaining functions from pgalloc.h that need special treatment. Fixup freeing of pages from pte cache to free correct addresses. Index: pgalloc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/pgalloc.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- pgalloc.c 2001/08/21 20:09:34 1.4 +++ pgalloc.c 2001/08/23 09:27:01 1.5 @@ -566,6 +566,23 @@ remap_pte_invalidate(pte); } +/* we don't allocate any space for pte, just clear the one passed to us */ +void free_pte_slow(pte_t *pte) +{ + free_page((unsigned long) get_pageaddr_from_pte(pte)); + /* invalidate the S0 pte that maps this */ + remap_pte_invalidate(pte); +} + +void pte_free_kernel(pte_t *pte) +{ +#ifdef VAX_MM_PGALLOC_DEBUG + printk(KERN_DEBUG "VAXMM: pte_free_kernel called on pte %8p\n",pte); +#endif + printk(KERN_DEBUG "VAXMM: pte_free_kernel called on pte %8p\n",pte); + free_pte_fast(pte); +} + /* Find an entry in the third-level page table.. */ #ifdef VAX_MM_PGALLOC_DEBUG pte_t * pte_offset(pmd_t * dir, unsigned long address) |
From: Andy P. <at...@us...> - 2001-08-23 09:25:16
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv27208 Modified Files: pgtable.c Log Message: fix do_pgt_cache. Index: pgtable.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/pgtable.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- pgtable.c 2001/07/31 17:28:26 1.6 +++ pgtable.c 2001/08/23 09:25:13 1.7 @@ -29,7 +29,7 @@ } } -/* Note the factor of 8 in the length registers */ +/* Note no factor of 8 in the length registers */ void set_page_dir_kernel(pgd_t * pgdir) { __mtpr( (pgdir[2]).br, PR_SBR); @@ -43,10 +43,10 @@ int freed = 0; if(pgtable_cache_size > high) { do { - if(pgd_quicklist) - free_pgd_slow(get_pgd_fast()), freed++; - if(pmd_quicklist) - free_pmd_slow(get_pmd_fast()), freed++; +// if(pgd_quicklist) +// free_pgd_slow(get_pgd_fast()), freed++; +// if(pmd_quicklist) +// free_pmd_slow(get_pmd_fast()), freed++; if(pte_quicklist) free_pte_slow(get_pte_fast()), freed++; } while(pgtable_cache_size > low); |
From: Andy P. <at...@us...> - 2001-08-21 20:12:45
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv23832/mm Modified Files: task.h Log Message: Change task.h to more sane defaults for WSMAX and so forth Index: task.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/task.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- task.h 2001/07/31 17:33:26 1.1 +++ task.h 2001/08/21 20:12:42 1.2 @@ -15,17 +15,22 @@ /* TASK_WSMAX is the max virtual address space in P0 */ /* TASK_WSMAX must not be larger than 768MB. In the unlikely event that * you really want to allocate that much to a process, change PGD_SPECIAL below */ -#define TASK_WSMAX (40*1024*1024) +/* TASK_TXTMAX is the maximum program size, including shared libs */ +#define TASK_TXTMAX (16*1024*1024) + +/* TASK_MMAPMAX is the max space in P0 for the mmap() function , + contiguous with TASK_TXTMAX - Its basically the amount of memory you + give a process to play with */ +#define TASK_MMAPMAX (32*1024*1024) + /* TASK_STKMAX is the max space for the stack in P1 */ /* Like WSMAX above, the upper limit for this is set by PGD_SPECIAL below. If this * is above 256MB change PGD_SPECIAL */ #define TASK_STKMAX (8*1024*1024) -/* TASK_MMAPMAX is the max space in P0 for the mmap() function , - contiguous with TASK_WSMAX */ -#define TASK_MMAPMAX (8*1024*1024) +#define TASK_WSMAX (TASK_TXTMAX+TASK_MMAPMAX) /* TASK_MAXUPRC is the maximum number of user processes on the system * Think of this like balsetcnt on VMS. @@ -38,11 +43,11 @@ * space during mmap's. */ -#define TASK_UNMAPPED_BASE TASK_WSMAX +#define TASK_UNMAPPED_BASE TASK_TXTMAX /* calculations based on the above for the SPT */ /* NPTE_TASK = the number of HWPTE's needed to map a process */ -#define N_HWPTE_TASK_P0 ((TASK_WSMAX+TASK_MMAPMAX)>>PAGELET_SHIFT) +#define N_HWPTE_TASK_P0 ((TASK_WSMAX)>>PAGELET_SHIFT) #define N_HWPTE_TASK_P1 ((TASK_STKMAX)>>PAGELET_SHIFT) /* There are 4 4096 byte pages in the pmd. = 4x1024 hwptes. */ #define N_HWPTE_TASK_PMD ((4*1024)) @@ -60,7 +65,8 @@ /* The offsets into page table area from the start of this slot, in bytes */ #define P0PTE_OFFSET (N_HWPTE_TASK_PMD<<2) -#define P1PTE_OFFSET ((N_HWPTE_TASK_P0+N_HWPTE_TASK_PMD)<<2) +/* this is the end of the slot, as p1 counts backwards */ +#define P1PTE_OFFSET ((N_HWPTE_TASK_P0+N_HWPTE_TASK_P1+N_HWPTE_TASK_PMD)<<2) #define P0PMD_OFFSET (0) #define P1PMD_OFFSET (PAGE_SIZE*2) |