From 53a6e039dedc2e0f85f5899df5437ac3e242b77c Mon Sep 17 00:00:00 2001 From: David van Moolenbroek Date: Tue, 19 Jan 2010 21:24:42 +0000 Subject: [PATCH] remove SYS_MAPDMA --- etc/system.conf | 2 -- include/minix/com.h | 1 - kernel/system.c | 1 - kernel/system.h | 3 --- kernel/system/Makefile | 4 ---- kernel/system/do_mapdma.c | 43 --------------------------------------- lib/syslib/sys_mapdma.c | 19 ----------------- servers/rs/service.c | 1 - 8 files changed, 74 deletions(-) delete mode 100644 kernel/system/do_mapdma.c delete mode 100644 lib/syslib/sys_mapdma.c diff --git a/etc/system.conf b/etc/system.conf index 276f832b4..a8567c11b 100644 --- a/etc/system.conf +++ b/etc/system.conf @@ -90,7 +90,6 @@ service rtl8139 SAFECOPYTO # 32 SETGRANT # 34 PROFBUF # 38 - MAPDMA # 41 SYSCTL # 44 ; pci device 10ec/8139; @@ -474,7 +473,6 @@ service rtl8169 SAFECOPYTO # 32 SETGRANT # 34 PROFBUF # 38 - MAPDMA # 41 SYSCTL # 44 ; pci device 10ec/8129; diff --git a/include/minix/com.h b/include/minix/com.h index 6fa517a93..c9f3d7f3b 100644 --- a/include/minix/com.h +++ b/include/minix/com.h @@ -344,7 +344,6 @@ # define SYS_STIME (KERNEL_CALL + 39) /* sys_stime() */ -# define SYS_MAPDMA (KERNEL_CALL + 42) /* sys_mapdma() */ # define SYS_VMCTL (KERNEL_CALL + 43) /* sys_vmctl() */ # define SYS_SYSCTL (KERNEL_CALL + 44) /* sys_sysctl() */ diff --git a/kernel/system.c b/kernel/system.c index cb0ab8d5d..6a658433c 100644 --- a/kernel/system.c +++ b/kernel/system.c @@ -235,7 +235,6 @@ PRIVATE void initialize(void) map(SYS_READBIOS, do_readbios); /* read from BIOS locations */ map(SYS_IOPENABLE, do_iopenable); /* Enable I/O */ map(SYS_SDEVIO, do_sdevio); /* phys_insb, _insw, _outsb, _outsw */ - map(SYS_MAPDMA, do_mapdma); #endif } diff --git a/kernel/system.h b/kernel/system.h index ac13bb908..4e8489e70 100644 --- a/kernel/system.h +++ b/kernel/system.h @@ -179,7 +179,6 @@ _PROTOTYPE( int do_iopenable, (message *m_ptr) ); _PROTOTYPE( int do_vmctl, (message *m_ptr) ); _PROTOTYPE( int do_setgrant, (message *m_ptr) ); _PROTOTYPE( int do_readbios, (message *m_ptr) ); -_PROTOTYPE( int do_mapdma, (message *m_ptr) ); _PROTOTYPE( int do_safemap, (message *m_ptr) ); _PROTOTYPE( int do_saferevmap, (message *m_ptr) ); @@ -193,7 +192,5 @@ _PROTOTYPE( int do_sprofile, (message *m_ptr) ); _PROTOTYPE( int do_cprofile, (message *m_ptr) ); _PROTOTYPE( int do_profbuf, (message *m_ptr) ); -_PROTOTYPE( int do_mapdma, (message *m_ptr) ); - #endif /* SYSTEM_H */ diff --git a/kernel/system/Makefile b/kernel/system/Makefile index 67bddfb89..595164b27 100644 --- a/kernel/system/Makefile +++ b/kernel/system/Makefile @@ -56,7 +56,6 @@ OBJECTS = \ $(SYSTEM)(do_sprofile.o) \ $(SYSTEM)(do_cprofile.o) \ $(SYSTEM)(do_profbuf.o) \ - $(SYSTEM)(do_mapdma.o) \ $(SYSTEM)(do_vmctl.o) build $(SYSTEM): $(OBJECTS) @@ -178,8 +177,5 @@ $(SYSTEM)(do_cprofile.o): do_cprofile.c $(SYSTEM)(do_profbuf.o): do_profbuf.c $(CC) do_profbuf.c -$(SYSTEM)(do_mapdma.o): do_mapdma.c - $(CC) do_mapdma.c - $(SYSTEM)(do_vmctl.o): do_vmctl.c $(CC) do_vmctl.c diff --git a/kernel/system/do_mapdma.c b/kernel/system/do_mapdma.c deleted file mode 100644 index 449ab0c91..000000000 --- a/kernel/system/do_mapdma.c +++ /dev/null @@ -1,43 +0,0 @@ -/* The kernel call implemented in this file: - * m_type: SYS_MAPDMA - * - * The parameters for this kernel call are: - * m5_l1: CP_SRC_ADDR (virtual address) - * m5_l3: CP_NR_BYTES (size of datastructure) - */ - -#include "../system.h" - -/*==========================================================================* - * do_mapdma * - *==========================================================================*/ -PUBLIC int do_mapdma(m_ptr) -register message *m_ptr; /* pointer to request message */ -{ - int r; - endpoint_t proc_e; - int proc_p; - vir_bytes base, size; - phys_bytes phys_base; - struct proc *proc; - message m; - - proc_e = m_ptr->CP_SRC_ENDPT; - base= m_ptr->CP_SRC_ADDR; - size= m_ptr->CP_NR_BYTES; - - if (!isokendpt(proc_e, &proc_p)) - return(EINVAL); - - proc = proc_addr(proc_p); - - phys_base= umap_virtual(proc, D, base, size); - if (!phys_base) - { - kprintf("do_mapdma: umap_virtual failed\n"); - return EFAULT; - } - - m_ptr->CP_DST_ADDR = phys_base; - return OK; -} diff --git a/lib/syslib/sys_mapdma.c b/lib/syslib/sys_mapdma.c deleted file mode 100644 index d5509e14a..000000000 --- a/lib/syslib/sys_mapdma.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "syslib.h" - -/*===========================================================================* - * sys_mapdma * - *===========================================================================*/ -PUBLIC int sys_mapdma(vir_addr, bytes) -vir_bytes vir_addr; /* address in bytes with segment*/ -vir_bytes bytes; /* number of bytes to be copied */ -{ - message m; - int result; - - m.CP_SRC_ADDR = vir_addr; - m.CP_NR_BYTES = bytes; - - result = _taskcall(SYSTASK, SYS_MAPDMA, &m); - return(result); -} - diff --git a/servers/rs/service.c b/servers/rs/service.c index 695ece7b4..8b1732c37 100644 --- a/servers/rs/service.c +++ b/servers/rs/service.c @@ -737,7 +737,6 @@ struct { "READBIOS", SYS_READBIOS }, { "PROFBUF", SYS_PROFBUF }, { "STIME", SYS_STIME }, - { "MAPDMA", SYS_MAPDMA }, { "VMCTL", SYS_VMCTL }, { "SYSCTL", SYS_SYSCTL }, { NULL, 0 }