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: Dave A. <ai...@us...> - 2001-06-17 11:43:49
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/net In directory usw-pr-cvs1:/tmp/cvs-serv6885/drivers/net Modified Files: vaxlance.c Log Message: DA: added autoprobe support for vsbus to dz/vaxlance.. needs a lot of testing on machines that aren't mine Index: vaxlance.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/net/vaxlance.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- vaxlance.c 2001/06/16 14:05:30 1.11 +++ vaxlance.c 2001/06/17 11:43:45 1.12 @@ -997,6 +997,8 @@ /* prom checks */ #if 0 /* If this is dead code, let's remove it... - KPH 2001-03-04 */ + /* not sure if its dead it might just not work on the VAX I have + does anyone know if VAX store test pattern in EEPROM */ /* First, check for test pattern */ if (esar[0x60] != 0xff && esar[0x64] != 0x00 && esar[0x68] != 0x55 && esar[0x6c] != 0xaa) { @@ -1029,17 +1031,38 @@ /* Don't need this any more */ iounmap(esar); - lp->vsbus_int=5; + // lp->vsbus_int=5; +#ifdef CONFIG_VSBUS + { + int num, irq; + autoirq_setup(0); + vsbus_probe_irq_on(); + writereg(&ll->rap, LE_CSR0); + writereg(&ll->rdp, LE_C0_INEA|LE_C0_INIT); + writecsr0(ll, LE_C0_INEA|LE_C0_INIT); + udelay(1000); + num=vsbus_probe_irq_report(); + irq=autoirq_report(0); + if (num) + lp->vsbus_int=num; + } +#endif #ifdef VAX_LANCE_AUTOPROBE_IRQ printk("Autoprobing LANCE interrupt vector..."); - vsbus_enable_int(lp->vsbus_int); - autoirq_setup(0); + autoirq_setup(0); + vsbus_enable_int(lp->vsbus_int); lance_stop(ll); + writereg(&ll->rap, LE_CSR0); + writereg(&ll->rdp, LE_C0_INEA|LE_C0_INIT); +#ifdef CONFIG_VSBUS + /*lp->vsbus_int=vsbus_probe_irq_report();*/ +#endif + /* Shouldn't we really load CSR1/2 with the address of a reasonable init block, just in case the LANCE goes and does something wild with whatever garbage it's currently @@ -1053,7 +1076,7 @@ vsbus_clear_int(lp->vsbus_int); if (dev->irq) - printk(" probed IRQ %d\n", dev->irq); + printk(" probed IRQ %d, vsbus %d\n", dev->irq, lp->vsbus_int); else { dev->irq=0x94; |
From: Dave A. <ai...@us...> - 2001-06-17 11:43:49
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/char In directory usw-pr-cvs1:/tmp/cvs-serv6885/drivers/char Modified Files: dz.c dz.h Log Message: DA: added autoprobe support for vsbus to dz/vaxlance.. needs a lot of testing on machines that aren't mine Index: dz.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/dz.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- dz.c 2001/06/09 14:07:38 1.5 +++ dz.c 2001/06/17 11:43:44 1.6 @@ -66,6 +66,7 @@ #include <asm/irq.h> #ifdef CONFIG_VAX +#include <asm/vsa.h> #include <asm/dz11.h> volatile struct dz11_regs *dz11_addr; #else @@ -398,7 +399,7 @@ if (status & DZ_RDONE) receive_chars (info); /* the receive function */ - vsbus_clear_int(7); + vsbus_clear_int(dz_vsbus_rx_int); } @@ -413,7 +414,7 @@ if (status & DZ_TRDY) transmit_chars (info); - vsbus_clear_int(6); + vsbus_clear_int(dz_vsbus_tx_int); } #else @@ -526,8 +527,8 @@ dz_out (info, DZ_CSR, tmp); #ifdef CONFIG_VAX - vsbus_enable_int(6); - vsbus_enable_int(7); + vsbus_enable_int(dz_vsbus_rx_int); + vsbus_enable_int(dz_vsbus_tx_int); #endif info->xmit_cnt = info->xmit_head = info->xmit_tail = 0; @@ -1434,7 +1435,7 @@ if (! info->port) return 0; #ifdef CONFIG_VAX - printk("ttyS%d at 0x%04x (irq = %d, %d)\n", info->line, info->port, SERIAL_RX, SERIAL_TX); + printk("ttyS%d at 0x%04x\n", info->line, info->port); #else printk("ttyS%d at 0x%04x (irq = %d)\n", info->line, info->port, SERIAL); #endif @@ -1453,29 +1454,45 @@ is updated... in request_irq - to immediatedly obliterate it is unwise. */ restore_flags(flags); -#if 0 +#if CONFIG_VAX { short i; - - + unsigned char num; autoirq_setup(0); - vsbus_enable_int(6); + vsbus_probe_irq_on(); i = dz_in(info, DZ_TCR); dz_out(info, DZ_CSR, DZ_MSE|DZ_TIE); dz_out(info, DZ_TCR, 0); - udelay(100); + udelay(1000); dz_out(info, DZ_TCR, 1); udelay(10000); + dz_out(info, DZ_TCR, i); + num=vsbus_probe_irq_report(); + irq=autoirq_report(0); + if (num) + { + dz_vsbus_tx_int=num; + dz_vsbus_rx_int=num+1; + } + autoirq_setup(0); + + vsbus_enable_int(num); + + i = dz_in(info, DZ_TCR); + dz_out(info, DZ_CSR, DZ_MSE|DZ_TIE); + dz_out(info, DZ_TCR, 0); + udelay(1000); dz_out(info, DZ_TCR, 1); - vsbus_clear_int(6); - irq=autoirq_report(100); + udelay(10000); + dz_out(info, DZ_TCR, i); + vsbus_clear_int(num); + vsbus_disable_int(num); + irq=autoirq_report(100); } - printk("going for IRQ %d\n", irq); -#endif -#ifdef CONFIG_VAX - if (request_irq (SERIAL_TX, dz_interrupt_tx, SA_INTERRUPT, "DZ", lines[0])) + printk("dz.c: using irq rx %d, irq tx %d\n", irq-1, irq); + if (request_irq (irq, dz_interrupt_tx, SA_INTERRUPT, "DZ", lines[0])) panic ("Unable to register DZ interrupt\n"); - if (request_irq (SERIAL_RX, dz_interrupt_rx, SA_INTERRUPT, "DZ", lines[0])) + if (request_irq (irq-1, dz_interrupt_rx, SA_INTERRUPT, "DZ", lines[0])) panic ("Unable to register DZ interrupt\n"); #else if (request_irq (SERIAL, dz_interrupt_rx, SA_INTERRUPT, "DZ", lines[0])) Index: dz.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/dz.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- dz.h 2001/06/09 14:07:38 1.3 +++ dz.h 2001/06/17 11:43:44 1.4 @@ -192,6 +192,9 @@ static int serial_refcount; +#ifdef CONFIG_VAX +static unsigned char dz_vsbus_rx_int, dz_vsbus_tx_int; +#endif /* * tmp_buf is used as a temporary buffer by serial_write. We need to * lock it in case the copy_from_user blocks while swapping in a page, |
From: Dave A. <ai...@us...> - 2001-06-17 11:43:49
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv6885/include/asm-vax Modified Files: vsa.h Log Message: DA: added autoprobe support for vsbus to dz/vaxlance.. needs a lot of testing on machines that aren't mine Index: vsa.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/vsa.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- vsa.h 2001/02/22 22:20:31 1.3 +++ vsa.h 2001/06/17 11:43:45 1.4 @@ -8,16 +8,26 @@ struct vs_cpu { unsigned long vs_hltcod; unsigned long vc_410msr; - unsigned long vc_410cear; /* VS2K */ - unsigned char vc_intmsk; /* Interrupt mask register */ - unsigned char vc_vdcorg; /* Mono display origin */ - unsigned char vc_vdcsel; /* Video interrupt select */ - unsigned char vc_intreq; /* Interrupt request register */ + unsigned long vc_410cear; /* VS2K */ + unsigned char vc_intmsk; /* Interrupt mask register */ + unsigned char vc_vdcorg; /* Mono display origin */ + unsigned char vc_vdcsel; /* Video interrupt select */ + unsigned char vc_intreq; /* Interrupt request register */ #define vc_intclr vc_intreq + unsigned short vc_diagdsp; + unsigned short pad4; + unsigned long vc_parctl; +#define vc_bwf0 vc_parctl + unsigned short pad5; + unsigned short pad6; + unsigned short vc_diagtimu; + unsigned short vc_diagtme; +#define vc_diagtimm vc_diagtme }; extern int vsbus_setup(void); extern int vsbus_enable_int(int bit_nr); +extern int vsbus_disable_int(int bit_nr); extern int vsbus_clear_int(int bit_nr); extern int vsbus_probe_irq(void); |
From: Dave A. <ai...@us...> - 2001-06-17 11:43:49
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/vsbus In directory usw-pr-cvs1:/tmp/cvs-serv6885/drivers/vsbus Modified Files: vsbus.c Log Message: DA: added autoprobe support for vsbus to dz/vaxlance.. needs a lot of testing on machines that aren't mine Index: vsbus.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/vsbus/vsbus.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- vsbus.c 2001/02/26 11:31:35 1.3 +++ vsbus.c 2001/06/17 11:43:45 1.4 @@ -8,6 +8,9 @@ */ #include <asm/vsa.h> #include <asm/io.h> +#include <linux/delay.h> +#include <linux/interrupt.h> +#include <linux/bitops.h> struct vsbus { struct vs_cpu *vs_cpu_ptr; @@ -17,10 +20,22 @@ int vsbus_setup(void) { + unsigned long irqs; + sys_vs.vs_cpu_ptr=(void *)ioremap(VSA_BASE_REGS, 128); - sys_vs.vs_cpu_ptr->vc_intclr=0xFF; + irqs=probe_irq_on(); + sys_vs.vs_cpu_ptr->vc_intmsk=0; + sys_vs.vs_cpu_ptr->vc_intclr=0xFF; + // printk("vsbus: Getting Interrupt Mask\n"); + udelay(100000); + sys_vs.vs_mask=sys_vs.vs_cpu_ptr->vc_intreq; + sys_vs.vs_cpu_ptr->vc_intmsk=0; /*~sys_vs.vs_mask;*/ + + probe_irq_off(irqs); + printk("vsbus: interrupt mask %x\n", sys_vs.vs_mask); + return 0; } @@ -38,7 +53,26 @@ return 0; } -int vsbus_probe_irq(void) +int vsbus_disable_int(int bit_nr) { + sys_vs.vs_cpu_ptr->vc_intmsk&=~(1<<bit_nr); return 0; +} + +int vsbus_probe_irq_on(void) +{ + printk("vsbus: probing set mask ~%2X\n", sys_vs.vs_mask); + sys_vs.vs_cpu_ptr->vc_intmsk = sys_vs.vs_mask; + sys_vs.vs_cpu_ptr->vc_intclr=0xff; + return 0; +} + +unsigned char vsbus_probe_irq_report(void) +{ + unsigned char x, y; + + x=sys_vs.vs_cpu_ptr->vc_intreq; + y = x & ~sys_vs.vs_mask; + printk("vsbus: probe returning %2X, %2X\n", x, ffs(y)); + return ffs(y)-1; } |
From: Andy P. <at...@us...> - 2001-06-16 19:42:15
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax In directory usw-pr-cvs1:/tmp/cvs-serv6505 Modified Files: config.in Log Message: CONFIG_DEBUG_MALLOC is dead Index: config.in =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/config.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- config.in 2001/02/22 22:15:07 1.4 +++ config.in 2001/06/16 19:42:11 1.5 @@ -163,7 +163,8 @@ mainmenu_option next_comment comment 'Kernel hacking' -bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC +# This appears to have died. +#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ bool 'Kernel profiling support' CONFIG_PROFILE if [ "$CONFIG_PROFILE" = "y" ]; then |
From: Andy P. <at...@us...> - 2001-06-16 19:41:48
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv6297 Modified Files: init.c Log Message: added functions free_initrd_mem show_mem to get rid of link errors Index: init.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/init.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- init.c 2001/06/16 14:05:30 1.12 +++ init.c 2001/06/16 19:41:44 1.13 @@ -107,17 +107,6 @@ (&__init_end - &__init_begin) >> 10); } -void si_meminfo(struct sysinfo *val) -{ - val->totalram = totalram_pages; - val->sharedram = 0; - val->freeram = nr_free_pages(); - val->bufferram = atomic_read(&buffermem_pages); - val->totalhigh = 0; - val->freehigh = 0; - val->mem_unit = PAGE_SIZE; - return; -} /* page table stuff */ @@ -184,3 +173,59 @@ return; } +void +show_mem(void) +{ + long i,free = 0,total = 0,reserved = 0; + long shared = 0, cached = 0; + + printk("\nMem-info:\n"); + show_free_areas(); + printk("Free swap: %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10)); + i = max_mapnr; + while (i-- > 0) { + total++; + if (PageReserved(mem_map+i)) + reserved++; + else if (PageSwapCache(mem_map+i)) + cached++; + else if (!page_count(mem_map+i)) + free++; + else + shared += atomic_read(&mem_map[i].count) - 1; + } + printk("%ld pages of RAM\n",total); + printk("%ld free pages\n",free); + printk("%ld reserved pages\n",reserved); + printk("%ld pages shared\n",shared); + printk("%ld pages swap cached\n",cached); + printk("%ld pages in page table cache\n",pgtable_cache_size); + show_buffers(); +} + + +#ifdef CONFIG_BLK_DEV_INITRD +void free_initrd_mem(unsigned long start, unsigned long end) +{ + if (start < end) + printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); + for (; start < end; start += PAGE_SIZE) { + ClearPageReserved(virt_to_page(start)); + set_page_count(virt_to_page(start), 1); + free_page(start); + totalram_pages++; + } +} +#endif + +void si_meminfo(struct sysinfo *val) +{ + val->totalram = totalram_pages; + val->sharedram = 0; + val->freeram = nr_free_pages(); + val->bufferram = atomic_read(&buffermem_pages); + val->totalhigh = 0; + val->freehigh = 0; + val->mem_unit = PAGE_SIZE; + return; +} |
From: Dave A. <ai...@us...> - 2001-06-16 16:58:50
|
Update of /cvsroot/linux-vax/kernel-2.4/mm In directory usw-pr-cvs1:/tmp/cvs-serv16223/mm Modified Files: vmalloc.c Log Message: DA: back out my change to vmalloc unnecessary .. can just zero in pgalloc.h Index: vmalloc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/mm/vmalloc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- vmalloc.c 2001/06/16 13:12:42 1.2 +++ vmalloc.c 2001/06/16 16:58:45 1.3 @@ -108,11 +108,6 @@ if (!page) return -ENOMEM; - /* FIXME: following line added for the Linux/VAX port, the page - need to be empty, as random garbage can look like - real ptes to the processor - DA June 2001 */ - clear_page(page_address(page)); - set_pte(pte, mk_pte(page, prot)); address += PAGE_SIZE; pte++; |
From: Dave A. <ai...@us...> - 2001-06-16 16:58:50
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv16223/include/asm-vax/mm Modified Files: pgalloc.h Log Message: DA: back out my change to vmalloc unnecessary .. can just zero in pgalloc.h Index: pgalloc.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/pgalloc.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- pgalloc.h 2001/06/16 11:33:10 1.5 +++ pgalloc.h 2001/06/16 16:58:45 1.6 @@ -82,6 +82,13 @@ /* Allocate space for the p0/p1 page tables */ /* allocate 192 pages at 4096 bytes each for page tables? */ ret[0].br = (unsigned long)vmalloc(192 * PAGE_SIZE); + if (ret[0].br==0) + { + printk("page_tables:vmalloc failed to allocate a page directory\n"); + BUG(); + return NULL; + } + memset((void *)ret[0].br, 0, 192*PAGE_SIZE); ret[0].lr = ((160*PAGE_SIZE)>>SIZEOF_PTE_LOG2); /* the p1br needs to be set back from the end of the p1 ptes */ ret[1].br = (ret[0].br - 0x800000) + (192*PAGE_SIZE); |
From: Dave A. <ai...@us...> - 2001-06-16 14:26:39
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv6085/include/asm-vax/mm Modified Files: pagelet_pte.h Log Message: DA: commited change to pte_page... sorta needed... Index: pagelet_pte.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/pagelet_pte.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- pagelet_pte.h 2001/06/10 21:46:00 1.4 +++ pagelet_pte.h 2001/06/16 14:26:36 1.5 @@ -130,8 +130,8 @@ return pte; } -#define pte_page(x) (mem_map+(unsigned long)((pte_val(x) >> PAGE_SHIFT))) - +#define pte_page(x) (mem_map+(unsigned long)(((pte_val(x) & PAGE_PFN_MASK) \ + >> (PAGE_SHIFT - PAGELET_SHIFT)))) |
From: Andy P. <at...@us...> - 2001-06-16 14:05:36
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv31609/include/asm-vax Modified Files: dma.h Log Message: implement DMA memory zone for ISA heritage peripherals. Tell vaxlance.c to use memory in DMA zone for now. Index: dma.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/dma.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- dma.h 2001/01/17 16:18:52 1.1 +++ dma.h 2001/06/16 14:05:30 1.2 @@ -1,9 +1,10 @@ #ifndef _VAX_DMA_H #define _VAX_DMA_H 1 -/* FIXME: this is just here to get dma.c to compile.*/ +/* Some peripherals are limited by their PC/ISA designs/heritage. */ -#define MAX_DMA_ADDRESS PAGE_OFFSET +/* max dma address is 16mb used in mm/init.c*/ +#define MAX_DMA_ADDRESS (PAGE_OFFSET+0x1000000) #define MAX_DMA_CHANNELS 8 extern int request_dma(unsigned int dmanr, const char * device_id); /* reserve a DMA channel */ |
From: Andy P. <at...@us...> - 2001-06-16 14:05:34
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv31609/arch/vax/mm Modified Files: init.c Log Message: implement DMA memory zone for ISA heritage peripherals. Tell vaxlance.c to use memory in DMA zone for now. Index: init.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/init.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- init.c 2001/06/07 21:23:51 1.11 +++ init.c 2001/06/16 14:05:30 1.12 @@ -41,8 +41,17 @@ void __init paging_init() { unsigned long zones_size[MAX_NR_ZONES] = { 0, 0, 0 }; - /* max_pfn is the number of hwptes */ - zones_size[ZONE_DMA] = max_pfn; + unsigned int max_dma, max_norm; + + max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; + + /* max_pfn is the number of 4k ptes */ + if (max_pfn < max_dma) { + zones_size[ZONE_DMA] = max_pfn; + } else { + zones_size[ZONE_DMA] = max_dma; + zones_size[ZONE_NORMAL] = max_pfn - max_dma; + } free_area_init(zones_size); } |
From: Andy P. <at...@us...> - 2001-06-16 14:05:34
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/net In directory usw-pr-cvs1:/tmp/cvs-serv31609/drivers/net Modified Files: vaxlance.c Log Message: implement DMA memory zone for ISA heritage peripherals. Tell vaxlance.c to use memory in DMA zone for now. Index: vaxlance.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/net/vaxlance.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- vaxlance.c 2001/03/07 02:15:34 1.10 +++ vaxlance.c 2001/06/16 14:05:30 1.11 @@ -347,7 +347,7 @@ ib->rx_ptr = leptr; #ifdef VAX_LANCE_DEBUG - printk("RX ptr: %8.8lx(%8.8x)\n", leptr, libdesc_offset(brx_ring, 0)); + printk("RX ptr: %8.8lx(%8.8x)\n", leptr, ib->brx_ring); #endif /* Setup tx descriptor pointer */ @@ -357,7 +357,7 @@ ib->tx_ptr = leptr; #ifdef VAX_LANCE_DEBUG - printk("TX ptr: %8.8lx(%8.8x)\n", leptr, libdesc_offset(btx_ring, 0)); + printk("TX ptr: %8.8lx(%8.8x)\n", leptr, ib->btx_ring); printk("TX rings:\n"); #endif @@ -932,7 +932,9 @@ spin_lock_init(&lp->lock); /* Need a block of 64KB */ - dev->mem_start = __get_free_pages(GFP_KERNEL, 4); + /* At present, until we figure out the address extension + * parity control bit, ask for memory in the DMA zone */ + dev->mem_start = __get_free_pages(GFP_DMA, 4); if (!dev->mem_start) { /* Shouldn't we free dev->priv here if dev was non-NULL on entry? */ return -ENOMEM; |
From: Dave A. <ai...@us...> - 2001-06-16 13:12:45
|
Update of /cvsroot/linux-vax/kernel-2.4/mm In directory usw-pr-cvs1:/tmp/cvs-serv17037/mm Modified Files: vmalloc.c Log Message: DA: uggh.. change to non-arch code.. this is needed due to a non-blank page being put into S0 space to store PTEs for Px space, and the garbage looking valid to the processor Index: vmalloc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/mm/vmalloc.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- vmalloc.c 2001/02/25 23:14:48 1.1.1.2 +++ vmalloc.c 2001/06/16 13:12:42 1.2 @@ -107,6 +107,12 @@ page = alloc_page(gfp_mask); if (!page) return -ENOMEM; + + /* FIXME: following line added for the Linux/VAX port, the page + need to be empty, as random garbage can look like + real ptes to the processor - DA June 2001 */ + clear_page(page_address(page)); + set_pte(pte, mk_pte(page, prot)); address += PAGE_SIZE; pte++; |
From: Dave A. <ai...@us...> - 2001-06-16 11:33:15
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv4946 Modified Files: pgalloc.h Log Message: DA: make fork work.. shouldn't clear the pte in ptealloc Index: pgalloc.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/pgalloc.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- pgalloc.h 2001/05/19 12:05:51 1.4 +++ pgalloc.h 2001/06/16 11:33:10 1.5 @@ -248,7 +248,6 @@ if (newpte) { remap_and_clear_pte_page((pgd_t *)pmd, newpte, pte_page); - pte_clear(newpte); /* make sure a page in S0 space is mapped */ } |
From: Dave A. <ai...@us...> - 2001-06-10 22:40:12
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv31544 Modified Files: processor.h Log Message: DA: make the MMAP space for a process start up a 32MB point.. as per Documentation/vax/process.txt, I'm also happy that the initial memory map should be what is contained herein ... Index: processor.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/processor.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- processor.h 2001/02/05 00:01:24 1.7 +++ processor.h 2001/06/10 22:40:09 1.8 @@ -33,9 +33,11 @@ /* This decides where the kernel will search for a free chunk of vm * * space during mmap's. * */ -#define TASK_UNMAPPED_BASE (TASK_SIZE / 3) +/*#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)*/ +/* Put the MMAP base at 32MB into the process memory space... + we currently allocate 48MB per process */ +#define TASK_UNMAPPED_BASE (32*1024*1024) - /* from alpha port */ typedef struct { @@ -65,8 +67,10 @@ * #define INIT_MMAP { &init_mm, PAGE_OFFSET, PAGE_OFFSET+0x10000000, \ * PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, NULL, &init_mm.mmap } */ -#define INIT_MMAP { &init_mm, 0, 0, NULL, \ - PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL } +#define INIT_MMAP { &init_mm, PAGE_OFFSET, PAGE_OFFSET+0x10000000, NULL, \ + PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL } +/*#define INIT_MMAP { &init_mm, 0, 0x10000000, NULL, \ + PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL }*/ #include <asm/ptrace.h> |
From: Dave A. <ai...@us...> - 2001-06-10 21:46:05
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv19288 Modified Files: pagelet_pte.h Log Message: DA: we need to and out below 40000000 in pte_offset... breaks fork otherwise Index: pagelet_pte.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/pagelet_pte.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- pagelet_pte.h 2001/05/27 12:51:25 1.3 +++ pagelet_pte.h 2001/06/10 21:46:00 1.4 @@ -264,6 +264,6 @@ /* find an entry in a pagetable */ #define pte_offset(pmd, address) \ -((pte_t *) ( ((pgd_t *)(pmd))->br + (address >> PAGE_SHIFT)*BYTES_PER_PTE_T)) +((pte_t *) ( ((pgd_t *)(pmd))->br + ((address & 0x3fffffff)>> PAGE_SHIFT)*BYTES_PER_PTE_T)) #endif |
From: Dave A. <ai...@us...> - 2001-06-10 16:08:02
|
Update of /cvsroot/linux-vax/kernel-2.4/Documentation/vax In directory usw-pr-cvs1:/tmp/cvs-serv28761 Added Files: process.txt Log Message: DA: info on process memory in VAX/Linux --- NEW FILE --- Process Memory Space on the VAX =============================== DA June 2001 The VAX has no sparse page tables. The VAX supports two sets of memory space for a process, the P0 and P1 spaces, which are described by page tables held in the system space pointed to by the CPU register p0br, p0lr, p1br, p1lr. The P0 space goes from 0 -> 0x40000000 P1 space goes from 0x40000000 -> 0x80000000 We currently allocate 48MB of memory per process, similiar to the NetBSD schemx. NetBSD allocate as follows, 8MB TEXT - P0 24MB DATA - P0 8MB MMAP - P0 8MB STACK - P1 We go with similiar 40MB in P0 space and 8MB in P1 space. TASK_UNMAPPED_BASE is pointed to 32MB into the P0 space so as to work on similiar principles to NetBSD. |
From: Dave A. <ai...@us...> - 2001-06-10 14:54:36
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv16923 Modified Files: unistd.h Log Message: DA: typo Index: unistd.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/unistd.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- unistd.h 2001/06/10 14:51:14 1.10 +++ unistd.h 2001/06/10 14:54:22 1.11 @@ -371,7 +371,7 @@ #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ type5,arg5, type6, arg6) \ -type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 args) \ +type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \ { \ long _sc_ret; \ { \ |
From: Dave A. <ai...@us...> - 2001-06-10 14:52:19
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv16297/include/asm-vax Modified Files: unistd.h Log Message: DA: add syscall6 macro needed for mmap Index: unistd.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/unistd.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- unistd.h 2001/06/08 21:55:00 1.9 +++ unistd.h 2001/06/10 14:51:14 1.10 @@ -369,6 +369,33 @@ _syscall_return(type); \ } +#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ + type5,arg5, type6, arg6) \ +type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 args) \ +{ \ + long _sc_ret; \ + { \ + register long _sc_0 __asm__("r0"); \ + _sc_0 = __NR_##name; \ + __asm__ __volatile__ ("pushl %7\n\t" \ + "pushl %6\n\t" \ + "pushl %5\n\t" \ + "pushl %4\n\t" \ + "pushl %3\n\t" \ + "pushl %2\n\t" \ + "pushl $0x6\n\t" \ + "movl sp, ap\n\t" \ + "chmk r0 # %0 %1 %2 %3 %4 %5 %6 %7\n\t" \ + : "=r"(_sc_0) \ + : "0"(_sc_0), "m"((long)arg1), "m"((long)arg2), \ + "m"((long)arg3), "m"((long)arg4), \ + "m"((long)arg5), "m"((long)arg6) \ + : _syscall_clobbers); \ + _sc_ret = _sc_0; \ + } \ + _syscall_return(type); \ +} + #ifdef __KERNEL_SYSCALLS__ /* This _must_ be inlined so that it picks up the correct AP value |
From: Dave A. <ai...@us...> - 2001-06-10 12:46:24
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv28185 Modified Files: a.out.h Log Message: DA: STACK_TOP should be TASK_SIZE not TASK_SIZE-1 otherwise all the argc/argv stuff completely breaks... so its back to being TASK_SIZE Index: a.out.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/a.out.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- a.out.h 2001/01/17 16:18:52 1.1 +++ a.out.h 2001/06/10 12:46:19 1.2 @@ -2,7 +2,7 @@ #define _VAX_A_OUT_H_ /* from the i386 port */ -#define STACK_TOP 0x7fffffff /*was TASK_SIZE*/ +#define STACK_TOP TASK_SIZE /* 0x7fffffff */ /*was TASK_SIZE and is TASK_SIZE once again .. - D.A. June 2001.. otherwise argc stuff breaks */ /* this is needed to override a conflicting definition in ../linux/a.out.h */ #define page_size PAGE_SIZE |
From: Dave A. <ai...@us...> - 2001-06-10 10:35:30
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/boot In directory usw-pr-cvs1:/tmp/cvs-serv12088 Modified Files: head.S Log Message: DA: no apostrophes in assemble files if you please Index: head.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/boot/head.S,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- head.S 2001/06/10 10:19:11 1.8 +++ head.S 2001/06/10 10:35:27 1.9 @@ -211,7 +211,7 @@ blssu sysfill # We need to align the IOMAP/VMALLOC tables (well at least the VMALLOC -# tables, but no harm.. we'll waste the space here or later) on a Linux +# tables, but no harm.. well waste the space here or later) on a Linux # PAGE boundary (4K) # we need to check is r7 4k-aligned if not we need to fill zero until it # is, so round up r7 to the next page, add 7 then and with 7, |
From: Dave A. <ai...@us...> - 2001-06-10 10:20:45
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv10564/include/asm-vax/mm Modified Files: pgtable.h Log Message: DA: add a new definition for VMALLOC_START the old one didn't take Linux page alignment into a/c, work out where the vmalloc area starts from the vmallocmap_base SPTE... Index: pgtable.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/pgtable.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- pgtable.h 2001/05/19 12:06:58 1.11 +++ pgtable.h 2001/06/10 10:20:42 1.12 @@ -1,3 +1,4 @@ +/* (c) 2001 Vax Porting Project, atp, kenn, airlied */ #ifndef _VAX_MM_PGTABLE_H #define _VAX_MM_PGTABLE_H @@ -65,16 +66,24 @@ /* macro to get the virtual address represented by an SPTE, given the address of the SPTE */ #define SPTE_TO_VIRT(p) (void *)((((unsigned long)p - (unsigned long)swapper_pg_dir[2].br) << (PAGE_SHIFT-SIZEOF_PTE_LOG2)) + PAGE_OFFSET) - + #ifndef __ASSEMBLY__ /* Other architectures put a virtual hole between the end of mapped physical memory and lowest address that vmalloc() will hand out. This isn't really practical on the VAX, since the system page table must be contiguous, so virtual holes in S0 - space waste precious SPTEs. */ + space waste precious SPTEs. +*/ + /* the previous definition of VMALLOC START relied on the + * VAX phy memory being an exact 4k multiple, + * my VAX has 7f1f hw-pages so isn't aligned on 4K + * workout the VMALLOC_START from the vmallocmap_base and the + * system base register.- + */ #define VMALLOC_OFFSET (SPT_MAX_IOMAP * 1024) -#define VMALLOC_START ((unsigned long) high_memory + VMALLOC_OFFSET) + /*#define VMALLOC_START ((unsigned long) high_memory + VMALLOC_OFFSET)*/ +#define VMALLOC_START (PAGE_OFFSET+((vmallocmap_base-swapper_pg_dir[2].br)<<(PAGELET_SHIFT-2))) #define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (VMALLOC_START + (SPT_MAX_VMALLOC * 1024)) @@ -87,6 +96,9 @@ /* Number of SPTEs in system page table */ extern unsigned int spt_size; + +/* external pointer to vmallocmap_base in head.S */ +extern unsigned long vmallocmap_base; /* zero page used for uninitialized stuff */ /* extern unsigned long empty_zero_page[1024]; */ |
From: Dave A. <ai...@us...> - 2001-06-10 10:19:16
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/boot In directory usw-pr-cvs1:/tmp/cvs-serv10291/arch/vax/boot Modified Files: head.S Log Message: DA: Fixes to align IOMAP/VMALLOC pages on Linux page boundaries.. this isn't important for IOMAP I don't think but VMALLOC gets very pissed unless this is true.. I've aligned both as the same number of SPTE entries would be wasted no matter where the alignment is done, as IOMAP and vmalloc are multiples of PAGE_SIZE Index: head.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/boot/head.S,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- head.S 2001/05/19 12:03:00 1.7 +++ head.S 2001/06/10 10:19:11 1.8 @@ -1,4 +1,5 @@ -# Copyright atp Nov 1998. +# Copyright atp Nov 1998. +# Changes for aligning IOMAP/VMALLOC - Copyright ai...@li... - June 2001 # start of boot. entry point # this assumes vmb has does most of the hard work (ie uvax rom vmb) # save useful registers. jump to c in boot.c @@ -209,6 +210,23 @@ cmpl r6, r7 # one page of PTE Table -> 128 Pages of PTES blssu sysfill +# We need to align the IOMAP/VMALLOC tables (well at least the VMALLOC +# tables, but no harm.. we'll waste the space here or later) on a Linux +# PAGE boundary (4K) +# we need to check is r7 4k-aligned if not we need to fill zero until it +# is, so round up r7 to the next page, add 7 then and with 7, +# check with r6 if the same we are aligned if not put zeros into the +# PTE until we are aligned. - D.A. June 2001 (this stuff is bitchin..) + addl2 $0x7, r7 + bicl2 $7, r7 + cmpl r6, r7 + beql nozerofl +zerofl: + movl $0x00000000, (r5)+ + incl r6 # next PFN + cmpl r6, r7 # one page of PTE Table -> 128 Pages of PTES + blssu zerofl +nozerofl: # Zero out the spare part of the SPT (the entries that will be used # to map I/O space and provide virtual addrs for vmalloc() later) movl r5, iomap_base |
From: Dave A. <ai...@us...> - 2001-06-09 18:00:29
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv17853/include/asm-vax/mm Modified Files: mmu_context.h Log Message: DA: woops .. forgot to set thread p0/p1 br/lr.. probably have somewhere else to do is.. not sure if this is the correct spot .. Index: mmu_context.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/mmu_context.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- mmu_context.h 2001/05/19 12:04:25 1.2 +++ mmu_context.h 2001/06/09 18:00:25 1.3 @@ -1,3 +1,6 @@ +/* Copyright (C) May 2001 - Dave Airlie - Vax project - ai...@li... + derived I'm sure from somewhere ... */ + #ifndef _ASM_VAX_MMU_CONTEXT_H #define _ASM_VAX_MMU_CONTEXT_H @@ -14,19 +17,32 @@ { } +/* + * switch_mm implementation + * copy the thread P0/P1 registers into the corresponding CPU registers + * - not sure if this is complete - D.A. May 2001 + */ + static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk, unsigned cpu) { - if (prev!=next) { - clear_bit(cpu, &prev->cpu_vm_mask); - __mtpr(next->pgd[0].br, PR_P0BR); - __mtpr((next->pgd[0].lr * 8 | 0x04000000), PR_P0LR); - __mtpr(next->pgd[1].br, PR_P1BR); - __mtpr((next->pgd[1].lr * 8), PR_P1LR); - flush_tlb_all(); + if (prev!=next) { + clear_bit(cpu, &prev->cpu_vm_mask); + + tsk->thread.pcb.p0br = (next->pgd[0]).br; + tsk->thread.pcb.p0lr = (next->pgd[0]).lr * 8 | 0x04000000; + tsk->thread.pcb.p1br = (next->pgd[1]).br; + tsk->thread.pcb.p1lr = (next->pgd[1]).lr * 8; + + __mtpr(next->pgd[0].br, PR_P0BR); + __mtpr((next->pgd[0].lr * 8), PR_P0LR); + __mtpr(next->pgd[1].br, PR_P1BR); + __mtpr((next->pgd[1].lr * 8), PR_P1LR); - } - set_bit(cpu, &next->cpu_vm_mask); + flush_tlb_all(); + } + set_bit(cpu, &next->cpu_vm_mask); + } extern inline void activate_mm(struct mm_struct *prev, |
From: Dave A. <ai...@us...> - 2001-06-09 14:07:44
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/char In directory usw-pr-cvs1:/tmp/cvs-serv13105 Modified Files: dz.c dz.h Log Message: DA: changes to dz driver for VS3100 (won't work elsewhere).. I've never seen a chip with separate RX/TX interrupts before .. it seems to work for me ... for vs4000 you might need to change the vsbus int numbers until I write the vsbus autodetect IRQ code.. Index: dz.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/dz.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- dz.c 2001/02/26 02:28:27 1.4 +++ dz.c 2001/06/09 14:07:38 1.5 @@ -39,9 +39,11 @@ #include <linux/param.h> #include <linux/tqueue.h> #include <linux/interrupt.h> - +#include <linux/delay.h> #ifdef CONFIG_VAX -#define SERIAL 0 /* FIXME: this is wrong */ +#define SERIAL_RX 0xB0 /* FIXME: this is wrong */ +#define SERIAL_TX 0xB1 /* FIXME: this is wrong */ +#define SERIAL SERIAL_RX #else #include <asm-mips/wbflush.h> /* for definition of SERIAL */ @@ -328,8 +330,6 @@ { unsigned char tmp; - - if (info->x_char) { /* XON/XOFF chars */ dz_out (info, DZ_TDR, info->x_char); info->icount.tx++; @@ -385,7 +385,9 @@ * It deals with the multiple ports. * ------------------------------------------------------------ */ -static void dz_interrupt (int irq, void *dev, struct pt_regs *regs) +/* VAX has separate RX/TX interrupts */ +#ifdef CONFIG_VAX +static void dz_interrupt_rx (int irq, void *dev, struct pt_regs *regs) { struct dz_serial *info; unsigned short status; @@ -396,10 +398,40 @@ if (status & DZ_RDONE) receive_chars (info); /* the receive function */ + vsbus_clear_int(7); + +} + +static void dz_interrupt_tx (int irq, void *dev, struct pt_regs *regs) +{ + struct dz_serial *info; + unsigned short status; + + status = dz_in ((struct dz_serial *)dev, DZ_CSR); /* get the reason why we just got an irq */ + info = lines[LINE(status)]; /* re-arrange info the proper port */ + if (status & DZ_TRDY) transmit_chars (info); + + vsbus_clear_int(6); + } +#else +static void dz_interrupt (int irq, void *dev, struct pt_regs *regs) +{ + struct dz_serial *info; + unsigned short status; + status = dz_in ((struct dz_serial *)dev, DZ_CSR); /* get the reason why we just got an irq */ + info = lines[LINE(status)]; /* re-arrange info the proper port */ + + if (status & DZ_RDONE) + receive_chars (info); /* the receive function */ + + if (status & DZ_TRDY) + transmit_chars (info); +} +#endif /* * ------------------------------------------------------------------- * Here ends the DZ interrupt routines. @@ -493,6 +525,10 @@ tmp |= (DZ_RIE | DZ_TIE | DZ_MSE); dz_out (info, DZ_CSR, tmp); +#ifdef CONFIG_VAX + vsbus_enable_int(6); + vsbus_enable_int(7); +#endif info->xmit_cnt = info->xmit_head = info->xmit_tail = 0; /* set up the speed */ @@ -674,7 +710,6 @@ if (from_user) { - down (&tmp_buf_sem); while (1) { c = MIN(count, MIN(DZ_XMIT_SIZE - info->xmit_cnt - 1, DZ_XMIT_SIZE - info->xmit_head)); @@ -1265,7 +1300,7 @@ if ((line == DZ_KEYBOARD) || (line == DZ_MOUSE)) return -ENODEV; - + printk("dz opening line %d\n",line); info = lines[line]; info->count++; @@ -1279,8 +1314,6 @@ if (retval) return retval; - - retval = block_til_ready (tty, filp, info); if (retval) return retval; @@ -1296,6 +1329,7 @@ info->session = current->session; info->pgrp = current->pgrp; + return 0; } @@ -1309,7 +1343,7 @@ { int i, flags; struct dz_serial *info; - + int irq; /* Setup base handler, and timer table. */ init_bh (SERIAL_BH, do_serial_bh); @@ -1370,14 +1404,14 @@ info->magic = SERIAL_MAGIC; #ifdef CONFIG_VAX - info->port = (unsigned long) 0x200A0000; + info->port = (unsigned long) dz11_addr; #else if ((mips_machtype == MACH_DS23100) || (mips_machtype == MACH_DS5100)) info->port = (unsigned long) KN01_DZ11_BASE; else info->port = (unsigned long) KN02_DZ11_BASE; #endif - + info->line = i; info->tty = 0; info->close_delay = 50; @@ -1399,10 +1433,12 @@ set up in setup.c to handle this. */ if (! info->port) return 0; - - printk("ttyS%02d at 0x%04x (irq = %d)\n", info->line, info->port, SERIAL); +#ifdef CONFIG_VAX + printk("ttyS%d at 0x%04x (irq = %d, %d)\n", info->line, info->port, SERIAL_RX, SERIAL_TX); +#else + printk("ttyS%d at 0x%04x (irq = %d)\n", info->line, info->port, SERIAL); +#endif } - /* reset the chip */ #ifndef CONFIG_SERIAL_CONSOLE dz_out(info, DZ_CSR, DZ_CLR); @@ -1416,21 +1452,48 @@ /* order matters here... the trick is that flags is updated... in request_irq - to immediatedly obliterate it is unwise. */ - restore_flags(flags); - + restore_flags(flags); +#if 0 + { + short i; - if (request_irq (SERIAL, dz_interrupt, SA_INTERRUPT, "DZ", lines[0])) + + autoirq_setup(0); + vsbus_enable_int(6); + i = dz_in(info, DZ_TCR); + dz_out(info, DZ_CSR, DZ_MSE|DZ_TIE); + dz_out(info, DZ_TCR, 0); + udelay(100); + dz_out(info, DZ_TCR, 1); + udelay(10000); + dz_out(info, DZ_TCR, 1); + vsbus_clear_int(6); + irq=autoirq_report(100); + } + printk("going for IRQ %d\n", irq); +#endif +#ifdef CONFIG_VAX + if (request_irq (SERIAL_TX, dz_interrupt_tx, SA_INTERRUPT, "DZ", lines[0])) panic ("Unable to register DZ interrupt\n"); - + if (request_irq (SERIAL_RX, dz_interrupt_rx, SA_INTERRUPT, "DZ", lines[0])) + panic ("Unable to register DZ interrupt\n"); +#else + if (request_irq (SERIAL, dz_interrupt_rx, SA_INTERRUPT, "DZ", lines[0])) + panic ("Unable to register DZ interrupt\n"); +#endif + return 0; } +__initcall(dz_init); + #ifdef CONFIG_SERIAL_CONSOLE static void dz_console_put_char (unsigned char ch) { unsigned long flags; int loops = 2500; unsigned short tmp = ch; + unsigned short tcr, mask; /* this code sends stuff out to serial device - spinning its wheels and waiting. */ @@ -1440,7 +1503,9 @@ save_flags(flags); cli(); - + mask = 1 << dz_console->line; + tcr = dz_in (dz_console, DZ_TCR); /* read the TX flag */ + dz_out(dz_console, DZ_TCR, mask); /* spin our wheels */ while (((dz_in(dz_console,DZ_CSR) & DZ_TRDY) != DZ_TRDY) && loops--) ; @@ -1448,6 +1513,7 @@ /* Actually transmit the character. */ dz_out (dz_console, DZ_TDR, tmp); + dz_out(dz_console, DZ_TCR, tcr); restore_flags(flags); } /* Index: dz.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/dz.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- dz.h 2001/01/26 00:27:00 1.2 +++ dz.h 2001/06/09 14:07:38 1.3 @@ -116,7 +116,11 @@ #define DZ_TDR 0x18 /* Transmit Data Register */ #endif +#ifdef CONFIG_VAX #define DZ_NB_PORT 4 +#else +#define DZ_NB_PORT 4 +#endif #define DZ_XMIT_SIZE 4096 /* buffer size */ #define WAKEUP_CHARS DZ_XMIT_SIZE/4 @@ -213,7 +217,12 @@ static void dz_stop (struct tty_struct *); static void dz_start (struct tty_struct *); +#ifdef CONFIG_VAX +static void dz_interrupt_rx (int, void *, struct pt_regs *); +static void dz_interrupt_tx (int, void *, struct pt_regs *); +#else static void dz_interrupt (int, void *, struct pt_regs *); +#endif static void do_serial_bh (void); static void do_softint (void *); static void do_serial_hangup (void *); |