Date: Fri, 11 Jun 2004 20:01:39 GMT From: Julian Elischer <julian@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 54654 for review Message-ID: <200406112001.i5BK1d37026877@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=54654 Change 54654 by julian@julian_ref on 2004/06/11 20:01:30 IFC (and merge in changes originally from here). Affected files ... .. //depot/projects/nsched/sys/alpha/alpha/machdep.c#2 integrate .. //depot/projects/nsched/sys/amd64/amd64/machdep.c#4 integrate .. //depot/projects/nsched/sys/boot/i386/boot0/boot0.S#3 integrate .. //depot/projects/nsched/sys/compat/linux/linux_misc.c#2 integrate .. //depot/projects/nsched/sys/compat/linux/linux_uid16.c#2 integrate .. //depot/projects/nsched/sys/conf/NOTES#5 integrate .. //depot/projects/nsched/sys/conf/options#6 integrate .. //depot/projects/nsched/sys/dev/ata/ata-lowlevel.c#5 integrate .. //depot/projects/nsched/sys/dev/bktr/bktr_mem.c#3 integrate .. //depot/projects/nsched/sys/dev/cy/cy.c#4 integrate .. //depot/projects/nsched/sys/dev/digi/digi.c#4 integrate .. //depot/projects/nsched/sys/dev/drm/drm.h#2 integrate .. //depot/projects/nsched/sys/dev/drm/drmP.h#2 integrate .. //depot/projects/nsched/sys/dev/drm/drm_drv.h#2 integrate .. //depot/projects/nsched/sys/dev/drm/drm_linux_list.h#1 branch .. //depot/projects/nsched/sys/dev/drm/drm_os_freebsd.h#2 integrate .. //depot/projects/nsched/sys/dev/drm/drm_pciids.h#1 branch .. //depot/projects/nsched/sys/dev/drm/drm_sarea.h#2 integrate .. //depot/projects/nsched/sys/dev/drm/mga.h#2 integrate .. //depot/projects/nsched/sys/dev/drm/mga_drm.h#2 integrate .. //depot/projects/nsched/sys/dev/drm/r128.h#2 integrate .. //depot/projects/nsched/sys/dev/drm/r128_drm.h#2 integrate .. //depot/projects/nsched/sys/dev/drm/r128_state.c#2 integrate .. //depot/projects/nsched/sys/dev/drm/radeon.h#2 integrate .. //depot/projects/nsched/sys/dev/drm/radeon_drm.h#2 integrate .. //depot/projects/nsched/sys/dev/drm/radeon_drv.h#2 integrate .. //depot/projects/nsched/sys/dev/drm/radeon_mem.c#2 integrate .. //depot/projects/nsched/sys/dev/drm/radeon_state.c#2 integrate .. //depot/projects/nsched/sys/dev/drm/sis.h#2 integrate .. //depot/projects/nsched/sys/dev/drm/sis_drv.c#2 integrate .. //depot/projects/nsched/sys/dev/drm/sis_mm.c#2 integrate .. //depot/projects/nsched/sys/dev/drm/tdfx.h#2 integrate .. //depot/projects/nsched/sys/dev/esp/esp_sbus.c#2 integrate .. //depot/projects/nsched/sys/dev/esp/ncr53c9x.c#2 integrate .. //depot/projects/nsched/sys/dev/esp/ncr53c9xvar.h#2 integrate .. //depot/projects/nsched/sys/dev/rp/rp.c#3 integrate .. //depot/projects/nsched/sys/dev/si/si.c#3 integrate .. //depot/projects/nsched/sys/dev/sio/sio.c#5 integrate .. //depot/projects/nsched/sys/dev/sx/sx.c#3 integrate .. //depot/projects/nsched/sys/dev/twe/twe.c#3 integrate .. //depot/projects/nsched/sys/dev/twe/twe_freebsd.c#2 integrate .. //depot/projects/nsched/sys/dev/twe/twevar.h#3 integrate .. //depot/projects/nsched/sys/dev/usb/ucom.c#4 integrate .. //depot/projects/nsched/sys/i386/i386/machdep.c#8 integrate .. //depot/projects/nsched/sys/ia64/ia64/machdep.c#2 integrate .. //depot/projects/nsched/sys/ia64/ia64/pmap.c#4 integrate .. //depot/projects/nsched/sys/kern/kern_descrip.c#4 integrate .. //depot/projects/nsched/sys/kern/kern_kse.c#12 integrate .. //depot/projects/nsched/sys/kern/kern_prot.c#3 integrate .. //depot/projects/nsched/sys/kern/kern_resource.c#4 integrate .. //depot/projects/nsched/sys/kern/kern_sig.c#6 integrate .. //depot/projects/nsched/sys/kern/kern_sysctl.c#3 integrate .. //depot/projects/nsched/sys/kern/kern_thread.c#21 integrate .. //depot/projects/nsched/sys/kern/kern_xxx.c#3 integrate .. //depot/projects/nsched/sys/kern/tty.c#4 integrate .. //depot/projects/nsched/sys/kern/tty_compat.c#4 integrate .. //depot/projects/nsched/sys/kern/tty_pty.c#4 integrate .. //depot/projects/nsched/sys/kern/uipc_mbuf.c#5 integrate .. //depot/projects/nsched/sys/kern/uipc_syscalls.c#6 integrate .. //depot/projects/nsched/sys/kern/vfs_syscalls.c#6 integrate .. //depot/projects/nsched/sys/net/bpf.c#3 integrate .. //depot/projects/nsched/sys/net/raw_cb.c#3 integrate .. //depot/projects/nsched/sys/netinet/igmp.c#3 integrate .. //depot/projects/nsched/sys/netinet/ip_divert.c#3 integrate .. //depot/projects/nsched/sys/pc98/i386/machdep.c#3 integrate .. //depot/projects/nsched/sys/pc98/pc98/sio.c#5 integrate .. //depot/projects/nsched/sys/sys/ioctl.h#3 integrate .. //depot/projects/nsched/sys/sys/signal.h#3 integrate .. //depot/projects/nsched/sys/vm/vm_mmap.c#4 integrate Differences ... ==== //depot/projects/nsched/sys/alpha/alpha/machdep.c#2 (text+ko) ==== @@ -88,7 +88,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.219 2004/04/01 20:56:43 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.220 2004/06/11 11:16:17 phk Exp $"); #include "opt_compat.h" #include "opt_ddb.h" @@ -1180,7 +1180,7 @@ SIGISMEMBER(psp->ps_sigonstack, sig)) { sip = (osiginfo_t *)((caddr_t)td->td_sigstk.ss_sp + td->td_sigstk.ss_size - rndfsize); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else @@ -1304,7 +1304,7 @@ SIGISMEMBER(psp->ps_sigonstack, sig)) { sfp = (struct sigframe4 *)((caddr_t)td->td_sigstk.ss_sp + td->td_sigstk.ss_size - rndfsize); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else @@ -1428,7 +1428,7 @@ SIGISMEMBER(psp->ps_sigonstack, sig)) { sfp = (struct sigframe *)((caddr_t)td->td_sigstk.ss_sp + td->td_sigstk.ss_size - rndfsize); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else @@ -1543,7 +1543,7 @@ return (EINVAL); PROC_LOCK(p); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) /* * Restore the user-supplied information */ @@ -1633,7 +1633,7 @@ alpha_pal_wrusp(uc.uc_mcontext.mc_regs[R_SP]); PROC_LOCK(p); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) if (uc.uc_mcontext.mc_onstack & 1) td->td_sigstk.ss_flags |= SS_ONSTACK; else @@ -1709,7 +1709,7 @@ alpha_pal_wrusp(uc.uc_mcontext.mc_regs[R_SP]); PROC_LOCK(p); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) if (uc.uc_mcontext.mc_onstack & 1) td->td_sigstk.ss_flags |= SS_ONSTACK; else ==== //depot/projects/nsched/sys/amd64/amd64/machdep.c#4 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.609 2004/06/10 20:30:55 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.610 2004/06/11 11:16:18 phk Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -262,7 +262,7 @@ SIGISMEMBER(psp->ps_sigonstack, sig)) { sp = td->td_sigstk.ss_sp + td->td_sigstk.ss_size - sizeof(struct sigframe); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else @@ -403,7 +403,7 @@ bcopy(&ucp->uc_mcontext.mc_rdi, regs, sizeof(*regs)); PROC_LOCK(p); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) if (ucp->uc_mcontext.mc_onstack & 1) td->td_sigstk.ss_flags |= SS_ONSTACK; else ==== //depot/projects/nsched/sys/boot/i386/boot0/boot0.S#3 (text+ko) ==== @@ -13,7 +13,7 @@ * warranties of merchantability and fitness for a particular * purpose. * - * $FreeBSD: src/sys/boot/i386/boot0/boot0.S,v 1.8 2004/05/14 20:28:31 ru Exp $ + * $FreeBSD: src/sys/boot/i386/boot0/boot0.S,v 1.9 2004/06/11 09:45:18 phk Exp $ */ /* A 512-byte boot manager. */ @@ -94,15 +94,11 @@ main: #ifdef SIO /* - * Initialize the serial port. - * Must save DX (contains drive number) + * Initialize the serial port. bioscom preserves the driver number in DX. */ - pushw %dx # Save - xorw %dx,%dx # Port: COM1 movb COMSPEED,%al # defined by Makefile movb $0x00,%ah # BIOS: Set COM Port - int $0x14 # Parameters - popw %dx # Restore + call bioscom #endif /* SIO */ /* * Check what flags were loaded with us, specifically, Use a predefined Drive. @@ -199,23 +195,21 @@ callw putx # item /* * Now that we've printed the drive (if we needed to), display a prompt. - * Get ready for the input by noting the time. */ main.7: movw $prompt,%si # Display callw putstr # prompt movb _OPT(%bp),%dl # Display decw %si # default callw putkey # key -main.7_1: +/* + * Start of input loop. Beep and take note of time + */ +main.10: movb $ASCII_BEL,%al # Signal + callw putchr # beep! xorb %ah,%ah # BIOS: Get int $0x1a # system time -#ifndef SIO movw %dx,%di # Ticks when - addw _TICKS(%bp),%di # timeout -#else /* SIO */ - movw %dx,%si # Ticks when - addw _TICKS(%bp),%si # timeout -#endif /* SIO */ + addw _TICKS(%bp),%di # timeout /* * Busy loop, looking for keystrokes but * keeping one eye on the time. @@ -226,19 +220,14 @@ int $0x16 # for keypress jnz main.11 # Have one #else /* SIO */ - xorw %dx,%dx # Use COM1 movb $0x03,%ah # BIOS: Read COM - int $0x14 # Status + call bioscom testb $0x01,%ah # Check line status jnz main.11 # (bit 1 indicates input) #endif /* SIO */ xorb %ah,%ah # BIOS: Get int $0x1a # system time -#ifndef SIO cmpw %di,%dx # Timeout? -#else /* SIO */ - cmpw %si,%dx # Timeout? -#endif /* SIO */ jb main.8 # No /* * If timed out or defaulting, come here. @@ -246,18 +235,6 @@ main.9: movb _OPT(%bp),%al # Load default jmp main.12 # Join common code /* - * User's last try was bad, beep in displeasure. - * Since nothing was printed, just continue on as if the user - * hadn't done anything. This gives the effect of the user getting a beep - * for all bad keystrokes but no action until either the timeout - * occurs or the user hits a good key. - */ -main.10: movb $ASCII_BEL,%al # Signal - callw putchr # error -#ifdef SIO - jmp main.7_1 # Go back -#endif /* SIO */ -/* * Get the keystroke. */ main.11: @@ -267,7 +244,7 @@ movb %ah,%al # Scan code #else /* SIO */ movb $0x02,%ah # BIOS: Receive - int $0x14 # COM Byte + call bioscom #endif /* SIO */ /* * If it's CR act as if timed out. @@ -384,22 +361,25 @@ jmp putstr # Continue putstr.2: andb $~0x80,%al # Clear MSB +#ifndef SIO putchr: -#ifndef SIO pushw %bx # Save movw $0x7,%bx # Page:attribute movb $0xe,%ah # BIOS: Display int $0x10 # character popw %bx # Restore + retw # To caller #else /* SIO */ +putchr: + movb $0x01,%ah # BIOS: Send + xorw %cx,%cx # No timeout +bioscom: pushw %dx # Save xorw %dx,%dx # Use COM1 - xorw %cx,%cx # No timeout - movb $0x01,%ah # BIOS: Send int $0x14 # Character popw %dx # Restore + retw # To caller #endif /* SIO */ - retw # To caller /* One-sector disk I/O routine */ @@ -426,13 +406,8 @@ /* Menu strings */ -#ifndef SIO item: .ascii " "; .byte ' '|0x80 prompt: .ascii "\nDefault:"; .byte ' '|0x80 -#else /* SIO */ -item: .ascii " "; .byte ' '|0x80 -prompt: .ascii "\nDef:"; .byte ' '|0x80 -#endif /* SIO */ crlf: .ascii "\r"; .byte '\n'|0x80 /* Partition type tables */ ==== //depot/projects/nsched/sys/compat/linux/linux_misc.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.153 2004/03/17 19:59:59 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.154 2004/06/11 11:16:18 phk Exp $"); #include "opt_mac.h" @@ -1299,7 +1299,7 @@ /* * The FreeBSD native getpid(2), getgid(2) and getuid(2) also modify - * td->td_retval[1] when COMPAT_43 or COMPAT_SUNOS is defined. This + * td->td_retval[1] when COMPAT_43 is defined. This * globbers registers that are assumed to be preserved. The following * lightweight syscalls fixes this. See also linux_getgid16() and * linux_getuid16() in linux_uid16.c. ==== //depot/projects/nsched/sys/compat/linux/linux_uid16.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_uid16.c,v 1.12 2003/10/21 11:00:33 tjr Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_uid16.c,v 1.13 2004/06/11 11:16:18 phk Exp $"); #include <sys/param.h> #include <sys/lock.h> @@ -190,7 +190,7 @@ /* * The FreeBSD native getgid(2) and getuid(2) also modify td->td_retval[1] - * when COMPAT_43 or COMPAT_SUNOS is defined. This globbers registers that + * when COMPAT_43 is defined. This globbers registers that * are assumed to be preserved. The following lightweight syscalls fixes * this. See also linux_getpid(2), linux_getgid(2) and linux_getuid(2) in * linux_misc.c ==== //depot/projects/nsched/sys/conf/NOTES#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1229 2004/06/10 05:43:36 scottl Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1230 2004/06/11 11:16:19 phk Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -210,12 +210,6 @@ # options COMPAT_43 -# -# Be compatible with SunOS. The COMPAT_43 option above pulls in most -# (all?) of the changes that this option turns on. -# -options COMPAT_SUNOS - # Enable FreeBSD4 compatibility syscalls options COMPAT_FREEBSD4 ==== //depot/projects/nsched/sys/conf/options#6 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.451 2004/05/20 10:37:11 pjd Exp $ +# $FreeBSD: src/sys/conf/options,v 1.452 2004/06/11 11:16:19 phk Exp $ # # On the handling of kernel options # @@ -52,7 +52,6 @@ CODA_COMPAT_5 opt_coda.h COMPAT_43 opt_compat.h COMPAT_FREEBSD4 opt_compat.h -COMPAT_SUNOS opt_compat.h COMPILING_LINT opt_global.h CONSPEED opt_comconsole.h CY_PCI_FASTINTR ==== //depot/projects/nsched/sys/dev/ata/ata-lowlevel.c#5 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.37 2004/06/01 11:34:46 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.38 2004/06/11 07:39:15 sos Exp $"); #include "opt_ata.h" #include <sys/param.h> @@ -532,7 +532,7 @@ ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_MASTER); DELAY(10); ostat0 = ATA_IDX_INB(ch, ATA_STATUS); - if ((ostat0 & 0xf8) != 0xf8 && ostat0 != 0xa5 && ostat0 != 0x7f) { + if ((ostat0 & 0xf8) != 0xf8 && ostat0 != 0xa5) { stat0 = ATA_S_BUSY; mask |= 0x01; } @@ -543,7 +543,7 @@ /* in some setups we dont want to test for a slave */ if (!(ch->flags & ATA_NO_SLAVE)) { - if ((ostat1 & 0xf8) != 0xf8 && ostat1 != 0xa5 && ostat1 != 0x7f) { + if ((ostat1 & 0xf8) != 0xf8 && ostat1 != 0xa5) { stat1 = ATA_S_BUSY; mask |= 0x02; } @@ -637,15 +637,10 @@ DELAY(100000); } - if (stat0 & ATA_S_BUSY) - mask &= ~0x01; - if (stat1 & ATA_S_BUSY) - mask &= ~0x02; - if (bootverbose) ata_printf(ch, -1, - "reset tp2 mask=%02x stat0=%02x stat1=%02x devices=0x%b\n", - mask, stat0, stat1, ch->devices, + "reset tp2 stat0=%02x stat1=%02x devices=0x%b\n", + stat0, stat1, ch->devices, "\20\4ATAPI_SLAVE\3ATAPI_MASTER\2ATA_SLAVE\1ATA_MASTER"); } ==== //depot/projects/nsched/sys/dev/bktr/bktr_mem.c#3 (text+ko) ==== @@ -1,9 +1,5 @@ - - -#include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/bktr/bktr_mem.c,v 1.8 2004/05/30 20:08:27 phk Exp $"); /* - * This is prt of the Driver for Video Capture Cards (Frame grabbers) + * This is part of the Driver for Video Capture Cards (Frame grabbers) * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 * chipset. * Copyright Roger Hardiman. @@ -47,6 +43,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD: src/sys/dev/bktr/bktr_mem.c,v 1.10 2004/06/11 18:47:44 schweikh Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -55,12 +53,12 @@ #include <dev/bktr/bktr_mem.h> struct memory_pointers { - int addresses_stored; - vm_offset_t dma_prog; - vm_offset_t odd_dma_prog; - vm_offset_t vbidata; - vm_offset_t vbibuffer; - vm_offset_t buf; + int addresses_stored; + vm_offset_t dma_prog; + vm_offset_t odd_dma_prog; + vm_offset_t vbidata; + vm_offset_t vbibuffer; + vm_offset_t buf; } memory_pointers; static struct memory_pointers memory_list[BKTR_MEM_MAX_DEVICES]; @@ -72,39 +70,37 @@ switch (type) { case MOD_LOAD: + printf("bktr_mem: memory holder loaded\n"); + /* + * bzero((caddr_t)memory_list, sizeof(memory_list)); + * causes a panic. So use a simple for loop for now. + */ { - printf("bktr_mem: memory holder loaded\n"); -/* - * bzero causes a panic. - bzero((caddr_t)memory_list, sizeof(memory_list)); - * So use a simple for loop for now. -*/ - {int x; - unsigned char *d = (unsigned char *)memory_list; - for (x=0; x< sizeof(memory_list); x++) { - d[x]=0; - } + int x; + unsigned char *d; + + d = (unsigned char *)memory_list; + for (x = 0; x < sizeof(memory_list); x++) + d[x] = 0; } return 0; - } case MOD_UNLOAD: - { printf("bktr_mem: memory holder cannot be unloaded\n"); return EBUSY; - } default: break; } - return 0; -}; + return (0); +} /*************************************************************/ int -bktr_has_stored_addresses(int unit) { +bktr_has_stored_addresses(int unit) +{ - if ((unit < 0) || (unit >= BKTR_MEM_MAX_DEVICES)) { - printf("bktr_mem: Unit number %d invalid\n",unit); + if (unit < 0 || unit >= BKTR_MEM_MAX_DEVICES) { + printf("bktr_mem: Unit number %d invalid\n", unit); return 0; } @@ -114,64 +110,83 @@ /*************************************************************/ void -bktr_store_address(int unit, int type, vm_offset_t addr) { +bktr_store_address(int unit, int type, vm_offset_t addr) +{ - if ((unit < 0) || (unit >= BKTR_MEM_MAX_DEVICES)) { - printf("bktr_mem: Unit number %d invalid for memory type %d, address 0x%x\n" - ,unit,type,addr); + if (unit < 0 || unit >= BKTR_MEM_MAX_DEVICES) { + printf("bktr_mem: Unit number %d invalid for memory type %d, address 0x%x\n", + unit, type, addr); return; } switch (type) { - case BKTR_MEM_DMA_PROG: memory_list[unit].dma_prog = addr; - memory_list[unit].addresses_stored = 1; - break; - case BKTR_MEM_ODD_DMA_PROG: memory_list[unit].odd_dma_prog = addr; - memory_list[unit].addresses_stored = 1; - break; - case BKTR_MEM_VBIDATA: memory_list[unit].vbidata = addr; - memory_list[unit].addresses_stored = 1; - break; - case BKTR_MEM_VBIBUFFER: memory_list[unit].vbibuffer = addr; - memory_list[unit].addresses_stored = 1; - break; - case BKTR_MEM_BUF: memory_list[unit].buf = addr; - memory_list[unit].addresses_stored = 1; - break; - default: printf("bktr_mem: Invalid memory type %d for bktr%d, address 0x%xn", - type,unit,addr); - break; + case BKTR_MEM_DMA_PROG: + memory_list[unit].dma_prog = addr; + memory_list[unit].addresses_stored = 1; + break; + case BKTR_MEM_ODD_DMA_PROG: + memory_list[unit].odd_dma_prog = addr; + memory_list[unit].addresses_stored = 1; + break; + case BKTR_MEM_VBIDATA: + memory_list[unit].vbidata = addr; + memory_list[unit].addresses_stored = 1; + break; + case BKTR_MEM_VBIBUFFER: + memory_list[unit].vbibuffer = addr; + memory_list[unit].addresses_stored = 1; + break; + case BKTR_MEM_BUF: + memory_list[unit].buf = addr; + memory_list[unit].addresses_stored = 1; + break; + default: + printf("bktr_mem: Invalid memory type %d for bktr%d, address 0x%xn", + type, unit, addr); + break; } } /*************************************************************/ vm_offset_t -bktr_retrieve_address(int unit, int type) { +bktr_retrieve_address(int unit, int type) +{ - if ((unit < 0) || (unit >= BKTR_MEM_MAX_DEVICES)) { - printf("bktr_mem: Unit number %d too large for memory type %d\n",unit,type); - return NULL; + if (unit < 0 || unit >= BKTR_MEM_MAX_DEVICES) { + printf("bktr_mem: Unit number %d too large for memory type %d\n", + unit, type); + return (0); } switch (type) { - case BKTR_MEM_DMA_PROG: return memory_list[unit].dma_prog; - case BKTR_MEM_ODD_DMA_PROG: return memory_list[unit].odd_dma_prog; - case BKTR_MEM_VBIDATA: return memory_list[unit].vbidata; - case BKTR_MEM_VBIBUFFER: return memory_list[unit].vbibuffer; - case BKTR_MEM_BUF: return memory_list[unit].buf; - default: printf("bktr_mem: Invalid memory type %d for bktr%d",type,unit); - return NULL; + case BKTR_MEM_DMA_PROG: + return memory_list[unit].dma_prog; + case BKTR_MEM_ODD_DMA_PROG: + return memory_list[unit].odd_dma_prog; + case BKTR_MEM_VBIDATA: + return memory_list[unit].vbidata; + case BKTR_MEM_VBIBUFFER: + return memory_list[unit].vbibuffer; + case BKTR_MEM_BUF: + return memory_list[unit].buf; + default: + printf("bktr_mem: Invalid memory type %d for bktr%d", + type, unit); + return (0); } } /*************************************************************/ static moduledata_t bktr_mem_mod = { - "bktr_mem", - bktr_mem_modevent, - 0 + "bktr_mem", + bktr_mem_modevent, + 0 }; -/* The load order is First and module type is Driver to make sure bktr_mem - loads (and initialises) before bktr when both are loaded together */ + +/* + * The load order is First and module type is Driver to make sure bktr_mem + * loads (and initialises) before bktr when both are loaded together. + */ DECLARE_MODULE(bktr_mem, bktr_mem_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(bktr_mem, 1); ==== //depot/projects/nsched/sys/dev/cy/cy.c#4 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/cy/cy.c,v 1.150 2004/06/04 21:55:49 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cy/cy.c,v 1.151 2004/06/11 11:16:20 phk Exp $"); #include "opt_compat.h" @@ -1539,7 +1539,7 @@ int mynor; int s; struct tty *tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) int oldcmd; struct termios term; #endif @@ -1580,7 +1580,7 @@ } } tp = com->tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) term = tp->t_termios; oldcmd = cmd; error = ttsetcompat(tp, &cmd, data, &term); ==== //depot/projects/nsched/sys/dev/digi/digi.c#4 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/digi/digi.c,v 1.45 2004/06/04 21:55:49 phk Exp $ + * $FreeBSD: src/sys/dev/digi/digi.c,v 1.46 2004/06/11 11:16:20 phk Exp $ */ /*- @@ -1072,7 +1072,7 @@ struct digi_softc *sc; struct digi_p *port; struct tty *tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) int oldcmd; struct termios term; #endif @@ -1226,7 +1226,7 @@ } tp = port->tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) term = tp->t_termios; oldcmd = cmd; error = ttsetcompat(tp, &cmd, data, &term); ==== //depot/projects/nsched/sys/dev/drm/drm.h#2 (text+ko) ==== @@ -32,7 +32,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * - * $FreeBSD: src/sys/dev/drm/drm.h,v 1.6 2003/11/12 20:56:30 anholt Exp $ + * $FreeBSD: src/sys/dev/drm/drm.h,v 1.7 2004/06/11 03:26:59 anholt Exp $ */ @@ -137,6 +137,18 @@ unsigned int age; } drm_tex_region_t; +/** + * Hardware lock. + * + * The lock structure is a simple cache-line aligned integer. To avoid + * processor bus contention on a multiprocessor system, there should not be any + * other data stored in the same cache line. + */ +typedef struct drm_hw_lock { + __volatile__ unsigned int lock; /**< lock variable */ + char padding[60]; /**< Pad to cache line */ +} drm_hw_lock_t; + /** * DRM_IOCTL_VERSION ioctl argument type. ==== //depot/projects/nsched/sys/dev/drm/drmP.h#2 (text+ko) ==== @@ -28,7 +28,7 @@ * Rickard E. (Rik) Faith <faith@valinux.com> * Gareth Hughes <gareth@valinux.com> * - * $FreeBSD: src/sys/dev/drm/drmP.h,v 1.9 2004/01/06 04:34:52 anholt Exp $ + * $FreeBSD: src/sys/dev/drm/drmP.h,v 1.10 2004/06/11 03:26:59 anholt Exp $ */ #ifndef _DRM_P_H_ @@ -197,11 +197,6 @@ drm_freelist_t freelist; } drm_buf_entry_t; -typedef struct drm_hw_lock { - __volatile__ unsigned int lock; - char padding[60]; /* Pad to cache line */ -} drm_hw_lock_t; - typedef TAILQ_HEAD(drm_file_list, drm_file) drm_file_list_t; struct drm_file { TAILQ_ENTRY(drm_file) link; ==== //depot/projects/nsched/sys/dev/drm/drm_drv.h#2 (text+ko) ==== @@ -28,7 +28,7 @@ * Rickard E. (Rik) Faith <faith@valinux.com> * Gareth Hughes <gareth@valinux.com> * - * $FreeBSD: src/sys/dev/drm/drm_drv.h,v 1.23 2004/03/03 08:27:33 obrien Exp $ + * $FreeBSD: src/sys/dev/drm/drm_drv.h,v 1.24 2004/06/11 03:26:59 anholt Exp $ */ /* @@ -79,16 +79,16 @@ #endif #ifndef DRIVER_PREINIT -#define DRIVER_PREINIT() +#define DRIVER_PREINIT(dev) do {} while (0) #endif #ifndef DRIVER_POSTINIT -#define DRIVER_POSTINIT() +#define DRIVER_POSTINIT(dev) do {} while (0) #endif #ifndef DRIVER_PRERELEASE #define DRIVER_PRERELEASE() #endif #ifndef DRIVER_PRETAKEDOWN -#define DRIVER_PRETAKEDOWN() +#define DRIVER_PRETAKEDOWN(dev) #endif #ifndef DRIVER_POSTCLEANUP #define DRIVER_POSTCLEANUP() @@ -212,7 +212,9 @@ #ifdef __FreeBSD__ static struct cdevsw DRM(cdevsw) = { +#if __FreeBSD_version >= 502103 .d_version = D_VERSION, +#endif .d_open = DRM( open ), .d_close = DRM( close ), .d_read = DRM( read ), @@ -220,14 +222,21 @@ .d_poll = DRM( poll ), .d_mmap = DRM( mmap ), .d_name = DRIVER_NAME, +#if __FreeBSD_version >= 502103 .d_flags = D_TRACKCLOSE | D_NEEDGIANT, +#else + .d_maj = 145, + .d_flags = D_TRACKCLOSE, +#endif #if __FreeBSD_version < 500000 .d_bmaj = -1 #endif }; +#include "dev/drm/drm_pciids.h" + static drm_pci_id_list_t DRM(pciidlist)[] = { - DRIVER_PCI_IDS + DRM(PCI_IDS) }; static int DRM(probe)(device_t dev) @@ -511,7 +520,7 @@ DRM_DEBUG( "\n" ); - DRIVER_PRETAKEDOWN(); + DRIVER_PRETAKEDOWN(dev); #if __HAVE_IRQ if (dev->irq_enabled) DRM(irq_uninstall)( dev ); @@ -626,7 +635,7 @@ int retcode; #endif DRM_DEBUG( "\n" ); - DRIVER_PREINIT(); + DRIVER_PREINIT(dev); #ifdef __FreeBSD__ unit = device_get_unit(nbdev); @@ -704,7 +713,7 @@ DRIVER_DATE, unit ); - DRIVER_POSTINIT(); + DRIVER_POSTINIT(dev); return 0; ==== //depot/projects/nsched/sys/dev/drm/drm_os_freebsd.h#2 (text+ko) ==== @@ -28,7 +28,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * - * $FreeBSD: src/sys/dev/drm/drm_os_freebsd.h,v 1.18 2004/03/03 06:19:03 obrien Exp $ + * $FreeBSD: src/sys/dev/drm/drm_os_freebsd.h,v 1.19 2004/06/11 03:26:59 anholt Exp $ */ #include <sys/param.h> @@ -78,6 +78,8 @@ #include <sys/mutex.h> #endif +#include "dev/drm/drm_linux_list.h" + #if __FreeBSD_version >= 400006 #define __REALLY_HAVE_AGP __HAVE_AGP #endif @@ -310,6 +312,11 @@ MALLOC_DECLARE(malloctype); #undef malloctype +#if __FreeBSD_version < 502109 +#define bus_alloc_resource_any(dev, type, rid, flags) \ + bus_alloc_resource(dev, type, rid, 0ul, ~0ul, 1, flags) +#endif + #if __FreeBSD_version >= 480000 #define cpu_to_le32(x) htole32(x) #define le32_to_cpu(x) le32toh(x) ==== //depot/projects/nsched/sys/dev/drm/drm_sarea.h#2 (text+ko) ==== @@ -2,7 +2,7 @@ * \file drm_sarea.h * \brief SAREA definitions * - * \author Michel Dänzer <michel@daenzer.net> + * \author Michel D�zer <michel@daenzer.net> */ /* @@ -28,15 +28,29 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * - * $FreeBSD: src/sys/dev/drm/drm_sarea.h,v 1.2 2003/08/19 02:57:31 anholt Exp $ + * $FreeBSD: src/sys/dev/drm/drm_sarea.h,v 1.3 2004/06/11 03:26:59 anholt Exp $ */ #ifndef _DRM_SAREA_H_ #define _DRM_SAREA_H_ +#include "dev/drm/drm.h" + +/* SAREA area needs to be at least a page */ +#if defined(__alpha__) +#define SAREA_MAX 0x2000 +#elif defined(__ia64__) +#define SAREA_MAX 0x10000 /* 64kB */ +#else +/* Intel 830M driver needs at least 8k SAREA */ +#define SAREA_MAX 0x2000 +#endif + /** Maximum number of drawables in the SAREA */ #define SAREA_MAX_DRAWABLES 256 +#define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000 + /** SAREA drawable */ typedef struct drm_sarea_drawable { unsigned int stamp; ==== //depot/projects/nsched/sys/dev/drm/mga.h#2 (text+ko) ==== @@ -26,7 +26,7 @@ * Authors: * Gareth Hughes <gareth@valinux.com> * - * $FreeBSD: src/sys/dev/drm/mga.h,v 1.4 2003/10/24 01:48:16 anholt Exp $ + * $FreeBSD: src/sys/dev/drm/mga.h,v 1.5 2004/06/11 03:26:59 anholt Exp $ */ #ifndef __MGA_H__ @@ -66,12 +66,6 @@ [DRM_IOCTL_NR(DRM_IOCTL_MGA_BLIT)] = { mga_dma_blit, 1, 0 }, \ [DRM_IOCTL_NR(DRM_IOCTL_MGA_GETPARAM)]= { mga_getparam, 1, 0 }, -#define DRIVER_PCI_IDS \ - {0x102b, 0x0521, 0, "Matrox G200 (AGP)"}, \ - {0x102b, 0x0525, 0, "Matrox G400/G450 (AGP)"}, \ - {0x102b, 0x2527, 0, "Matrox G550 (AGP)"}, \ - {0, 0, 0, NULL} - #define __HAVE_COUNTERS 3 #define __HAVE_COUNTER6 _DRM_STAT_IRQ #define __HAVE_COUNTER7 _DRM_STAT_PRIMARY @@ -79,7 +73,7 @@ /* Driver customization: */ -#define DRIVER_PRETAKEDOWN() do { \ +#define DRIVER_PRETAKEDOWN( dev ) do { \ mga_do_cleanup_dma( dev ); \ } while (0) ==== //depot/projects/nsched/sys/dev/drm/mga_drm.h#2 (text+ko) ==== @@ -31,7 +31,7 @@ * Rewritten by: * Gareth Hughes <gareth@valinux.com> * >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406112001.i5BK1d37026877>