diff options
| author | ad <ad@NetBSD.org> | 2008-11-12 12:35:50 +0000 |
|---|---|---|
| committer | ad <ad@NetBSD.org> | 2008-11-12 12:35:50 +0000 |
| commit | 0efea177e37295fed654875d875160c47500d6bd (patch) | |
| tree | 9d0589344a5d07b9a511a2e81ebbd701744d03b5 | |
| parent | 0f81d3e0a26c2833cd085c472a4a77c325486b75 (diff) | |
Remove LKMs and switch to the module framework, pass 1.
Proposed on tech-kern@.
722 files changed, 1336 insertions, 16913 deletions
diff --git a/distrib/sets/comments b/distrib/sets/comments index 97ee0725403..0fc21cb47c9 100644 --- a/distrib/sets/comments +++ b/distrib/sets/comments @@ -1,4 +1,3 @@ -base-adosfs-lkm loadable kernel module for Amiga DOS file system support base-adosfs-root Root file system support for Amiga DOS file system support base-amd-bin auto-mounter daemon base-amd-examples example configuration files for the auto-mounter daemon and utilities @@ -12,7 +11,6 @@ base-c-bin utilities for the C programming language base-c-usr /usr file system directories required by C programming language utilities base-calendar-bin calendar(1) displays lines from the calendar database matching certain dates base-calendar-share database of important dates for calendar(1) -base-coda-lkm loadable kernel modules for the CODA distributed file system base-cron-bin the cron daemon and related utilities base-cron-root root file system directories required by the cron daemon base-crypto-bin cryptographic utilities @@ -24,9 +22,7 @@ base-debug-bin debugging utilities base-dhclient-root root file system support for DHCP client software base-dhcpd-bin DHCP server base-dhcpd-examples example configuration files for DHCP server -base-efs-lkm loadable kernel module for efs file system base-efs-root root file system support for efs file system -base-ext2fs-lkm loadable kernel module for ext2fs file system base-ext2fs-root root file system support for ext2fs file system base-filecorefs-root root file system support for the Acorn FILECORE file system base-fstab-examples various example file system tables @@ -42,7 +38,6 @@ base-htmldoc-share HTML documentation base-i18n-root directories for internationalisation support base-i18n-shlib shared library modules for internationalisation support base-ipf-bin IPfilter utilities -base-ipf-lkm loadable kernel module for IPfilter base-ipf-root directories for IPfilter base-isdn-bin utilities and daemons for ISDN network connectivity base-isdn-examples directories for the ISDN example files @@ -96,7 +91,6 @@ base-mailwrapper-bin the mailwrapper(8) program for multiple mailer support base-man-bin utilities for reading online manual pages base-man-share shared data files for the online manual pages base-miscfs-examples example configuration files for miscellaneous file systems -base-miscfs-lkm loadable kernel modules for miscellaneous file systems base-miscfs-root root file system support for miscellaneous file systems base-net-shlib shared libraries for network programming base-netutil-bin networking utilities @@ -107,13 +101,11 @@ base-nfsclient-root root file system support for network file system client util base-nfsserver-bin network file system server program base-nis-bin progams and utilities for the NIS network information system base-nis-root root file system support for the NIS network information system -base-ntfs-lkm loadable kernel module for Windows NTFS file system support base-ntfs-root root file system support for the Windows NT file system base-ntp-bin utilities for network time protocol support base-ntp-root basic directories for network time protocol support base-objc-usr /usr file system support for the Objective C programming language base-pf-bin utilities for the PF packet filter -base-pf-lkm loadable kernel module for the PF packet filter base-pf-root directories for the PF packet filter base-pkgutil-bin package system utilities base-postfix-bin the Postfix mailer @@ -121,7 +113,6 @@ base-postfix-examples example configuration files for the Postfix mailer base-postfix-root root file system support for the Postfix mailer base-postfix-usr /usr file system support for the Postfix mailer base-ppp-bin utilities for the PPP point-to-point remote access protocol -base-ppp-lkm object files for loadable kernel modules for the PPP point-to-point remote access protocol base-psd-share directory structure for the Programmer's Supplementary Documentation base-rcs-bin utilities for the RCS Revision Control System base-reference-share directory structure for miscellaneous reference documents @@ -142,7 +133,6 @@ base-sup-bin utilities for the SUP software update protocol base-sup-examples example configuration files for the SUP software update protocol base-sys-devlinks device node symbolic links base-sys-examples example configuration files for kernel functionality -base-sys-lkm system support for loadable kernel modules base-sys-root required root file system structure base-sys-share required /usr/share file system structure base-sys-shlib shared libraries for basic system functionality @@ -188,7 +178,6 @@ base-util_locale-id Indonesian language support for standard utilities base-util_locale-it Italian language support for standard utilities base-util_locale-ja Japanese language support for standard utilities base-util_locale-sv Swedish language support for standard utilities -base-vfs-lkm loadable kernel modules for filesystems comp-c-bin compilers and tools for the C programming language comp-c-catman formatted manual pages comp-c-include header files for the C programming language diff --git a/distrib/sets/deps b/distrib/sets/deps index 7ad328e05a3..2573e22e697 100644 --- a/distrib/sets/deps +++ b/distrib/sets/deps @@ -18,7 +18,6 @@ base-crypto-root base-sys-root base-crypto-shlib base-sys-usr base-cxx-usr base-c-usr base-debug-bin base-sys-usr -base-dev-lkm base-sys-usr base-dhclient-root base-sys-root base-dhcpd-bin base-sys-share base-dhcpd-bin base-sys-usr @@ -38,7 +37,6 @@ base-hesiod-bin base-sys-usr base-htmldoc-share base-sys-share base-i18n-root base-sys-usr base-i18n-shlib base-i18n-root -base-ipf-lkm base-sys-usr base-isdn-bin base-sys-usr base-isdn-examples base-sys-share base-krb5-bin base-sys-usr @@ -95,7 +93,6 @@ base-man-bin base-sys-usr base-man-share base-sys-share base-miscfs-examples base-sys-share base-miscfs-root base-sys-root -base-net-lkm base-sys-usr base-net-shlib base-sys-usr base-netutil-bin base-sys-usr base-netutil-examples base-sys-share @@ -115,7 +112,6 @@ base-postfix-examples base-sys-share base-postfix-root base-sys-root base-postfix-usr base-sys-usr base-ppp-bin base-sys-usr -base-ppp-lkm base-sys-usr base-psd-share base-sys-share base-rcs-bin base-sys-usr base-reference-share base-termcap-share @@ -139,7 +135,6 @@ base-smm-share base-sys-share base-sup-bin base-sys-usr base-sup-examples base-sys-share base-sys-examples base-sys-share -base-sys-lkm base-sys-usr base-sys-share base-sys-root base-sys-shlib base-sys-usr base-sys-usr base-sys-root @@ -186,7 +181,6 @@ base-util_locale-id base-locale-id base-util_locale-it base-locale-it base-util_locale-ja base-locale-ja base-util_locale-sv base-locale-sv -base-vfs-lkm base-sys-usr base-x11-root base-sys-root comp-c-bin base-sys-usr comp-c-catman base-man-share diff --git a/distrib/sets/descrs b/distrib/sets/descrs index 6f5b4e86925..62efc990fa7 100644 --- a/distrib/sets/descrs +++ b/distrib/sets/descrs @@ -1,4 +1,3 @@ -base-adosfs-lkm loadable kernel module for Amiga DOS file system support base-adosfs-root Root file system support for Amiga DOS file system support base-amd-bin auto-mounter daemon base-amd-examples example configuration files for the auto-mounter daemon and utilities @@ -12,7 +11,6 @@ base-c-bin utilities for the C programming language base-c-usr /usr file system directories required by C programming language utilities base-calendar-bin calendar(1) displays lines from the calendar database matching certain dates base-calendar-share database of important dates for calendar(1) -base-coda-lkm loadable kernel modules for the CODA distributed file system base-cron-bin the cron daemon and related utilities base-cron-root root file system directories required by the cron daemon base-crypto-bin cryptographic utilities @@ -24,9 +22,7 @@ base-debug-bin debugging utilities base-dhclient-root root file system support for DHCP client software base-dhcpd-bin DHCP server base-dhcpd-examples example configuration files for DHCP server -base-efs-lkm loadable kernel module for efs file system base-efs-root root file system support for efs file system -base-ext2fs-lkm loadable kernel module for ext2fs file system base-ext2fs-root root file system support for ext2fs file system base-filecorefs-root root file system support for the Acorn FILECORE file system base-fstab-examples various example file system tables @@ -42,7 +38,6 @@ base-htmldoc-share HTML documentation base-i18n-root directories for internationalisation support base-i18n-shlib shared library modules for internationalisation support base-ipf-bin utilities for IPfilter -base-ipf-lkm loadable kernel module for IPfilter base-ipf-root directories for IPfilter base-isdn-bin utilities and daemons for ISDN network connectivity base-isdn-examples directories for the ISDN example files @@ -105,7 +100,6 @@ base-mailwrapper-bin the mailwrapper(8) program for multiple mailer support base-man-bin utilities for reading online manual pages base-man-share shared data files for the online manual pages base-miscfs-examples example configuration files for miscellaneous file systems -base-miscfs-lkm loadable kernel modules for miscellaneous file systems base-miscfs-root root file system support for miscellaneous file systems base-net-shlib shared libraries for network programming base-netutil-bin networking utilities @@ -116,13 +110,11 @@ base-nfsclient-root root file system support for network file system client util base-nfsserver-bin network file system server program base-nis-bin progams and utilities for the NIS network information system base-nis-root root file system support for the NIS network information system -base-ntfs-lkm loadable kernel module for Windows NTFS file system support base-ntfs-root root file system support for the Windows NT file system base-ntp-bin utilities for network time protocol support base-ntp-root basic directories for network time protocol support base-objc-usr /usr file system support for the Objective C programming language base-pf-bin utilities for the PF packet filter -base-pf-lkm loadable kernel module for the PF packet filter base-pf-root directories for the PF packet filter base-pkgutil-bin package system utilities base-postfix-bin the Postfix mailer @@ -130,7 +122,6 @@ base-postfix-examples example configuration files for the Postfix mailer base-postfix-root root file system support for the Postfix mailer base-postfix-usr /usr file system support for the Postfix mailer base-ppp-bin utilities for the PPP point-to-point remote access protocol -base-ppp-lkm object files for loadable kernel modules for the PPP point-to-point remote access protocol base-psd-share directory structure for the Programmer's Supplementary Documentation base-rcs-bin utilities for the RCS Revision Control System base-reference-share directory structure for miscellaneous reference documents @@ -147,7 +138,6 @@ base-sup-bin utilities for the SUP software update protocol base-sup-examples example configuration files for the SUP software update protocol base-sys-devlinks device node symbolic links base-sys-examples example configuration files for kernel functionality -base-sys-lkm system support for loadable kernel modules base-sys-root required root file system structure base-sys-share required /usr/share file system structure base-sys-shlib shared libraries for basic system functionality @@ -196,7 +186,6 @@ base-util_locale-id Indonesian language support for standard utilities base-util_locale-it Italian language support for standard utilities base-util_locale-ja Japanese language support for standard utilities base-util_locale-sv Swedish language support for standard utilities -base-vfs-lkm loadable kernel modules for filesystems comp-c-bin comp-c-bin This package includes compilers and tools for the C programming language: comp-c-bin c89, c99, cc, gcc - C compilers diff --git a/distrib/sets/lists/base/ad.mips b/distrib/sets/lists/base/ad.mips index 157dae527b3..61b9f1a266d 100644 --- a/distrib/sets/lists/base/ad.mips +++ b/distrib/sets/lists/base/ad.mips @@ -1,2 +1,2 @@ -# $NetBSD: ad.mips,v 1.8 2004/01/11 10:24:58 lukem Exp $ -./usr/lkm/ldscript base-sys-usr +# $NetBSD: ad.mips,v 1.9 2008/11/12 12:35:50 ad Exp $ +./usr/lkm/ldscript base-obsolete obsolete diff --git a/distrib/sets/lists/base/lkm.mi b/distrib/sets/lists/base/lkm.mi index b72852a6fe0..6b1c0ce1fc2 100644 --- a/distrib/sets/lists/base/lkm.mi +++ b/distrib/sets/lists/base/lkm.mi @@ -1,10 +1,14 @@ -# $NetBSD: lkm.mi,v 1.29 2008/09/23 07:56:59 hannken Exp $ +# $NetBSD: lkm.mi,v 1.30 2008/11/12 12:35:50 ad Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # ./stand/@MACHINE@ base-kernel-modules ./stand/@MACHINE@/@OSRELEASE@ base-kernel-modules ./@MODULEDIR@ base-kernel-modules +./@MODULEDIR@/accf_data base-kernel-modules +./@MODULEDIR@/accf_data/accf_data.kmod base-kernel-modules +./@MODULEDIR@/accf_http base-kernel-modules +./@MODULEDIR@/accf_http/accf_http.kmod base-kernel-modules ./@MODULEDIR@/adosfs base-kernel-modules ./@MODULEDIR@/adosfs/adosfs.kmod base-kernel-modules ./@MODULEDIR@/cd9660 base-kernel-modules @@ -65,35 +69,35 @@ ./@MODULEDIR@/umapfs/umapfs.kmod base-kernel-modules ./@MODULEDIR@/union base-kernel-modules ./@MODULEDIR@/union/union.kmod base-kernel-modules -./usr/lkm/adosfs.o base-vfs-lkm -./usr/lkm/bsdcomp.o base-ppp-lkm -./usr/lkm/cd9660.o base-vfs-lkm -./usr/lkm/coda.o base-vfs-lkm -./usr/lkm/coda5.o base-vfs-lkm -./usr/lkm/deflate.o base-ppp-lkm -./usr/lkm/efs.o base-vfs-lkm -./usr/lkm/ext2fs.o base-vfs-lkm -./usr/lkm/fdesc.o base-vfs-lkm -./usr/lkm/filecorefs.o base-vfs-lkm -./usr/lkm/hfs.o base-vfs-lkm +./usr/lkm/adosfs.o base-obsolete obsolete +./usr/lkm/bsdcomp.o base-obsolete obsolete +./usr/lkm/cd9660.o base-obsolete obsolete +./usr/lkm/coda.o base-obsolete obsolete +./usr/lkm/coda5.o base-obsolete obsolete +./usr/lkm/deflate.o base-obsolete obsolete +./usr/lkm/efs.o base-obsolete obsolete +./usr/lkm/ext2fs.o base-obsolete obsolete +./usr/lkm/fdesc.o base-obsolete obsolete +./usr/lkm/filecorefs.o base-obsolete obsolete +./usr/lkm/hfs.o base-obsolete obsolete ./usr/lkm/hfsp.o base-obsolete obsolete -./usr/lkm/if_ipl.o base-ipf-lkm ipfilter -./usr/lkm/lfs.o base-vfs-lkm -./usr/lkm/kernfs.o base-vfs-lkm -./usr/lkm/mfs.o base-vfs-lkm -./usr/lkm/msdosfs.o base-vfs-lkm -./usr/lkm/ntfs.o base-vfs-lkm -./usr/lkm/nullfs.o base-vfs-lkm -./usr/lkm/overlay.o base-vfs-lkm -./usr/lkm/pf.o base-pf-lkm pf -./usr/lkm/portal.o base-vfs-lkm -./usr/lkm/procfs.o base-vfs-lkm -./usr/lkm/ptyfs.o base-vfs-lkm -./usr/lkm/puffs.o base-vfs-lkm puffs -./usr/lkm/smbfs.o base-vfs-lkm -./usr/lkm/tap.o base-net-lkm -./usr/lkm/tmpfs.o base-vfs-lkm -./usr/lkm/udf.o base-vfs-lkm -./usr/lkm/umapfs.o base-vfs-lkm -./usr/lkm/union.o base-vfs-lkm -./usr/lkm/vnd.o base-dev-lkm +./usr/lkm/if_ipl.o base-obsolete obsolete +./usr/lkm/lfs.o base-obsolete obsolete +./usr/lkm/kernfs.o base-obsolete obsolete +./usr/lkm/mfs.o base-obsolete obsolete +./usr/lkm/msdosfs.o base-obsolete obsolete +./usr/lkm/ntfs.o base-obsolete obsolete +./usr/lkm/nullfs.o base-obsolete obsolete +./usr/lkm/overlay.o base-obsolete obsolete +./usr/lkm/pf.o base-obsolete obsolete +./usr/lkm/portal.o base-obsolete obsolete +./usr/lkm/procfs.o base-obsolete obsolete +./usr/lkm/ptyfs.o base-obsolete obsolete +./usr/lkm/puffs.o base-obsolete obsolete +./usr/lkm/smbfs.o base-obsolete obsolete +./usr/lkm/tap.o base-obsolete obsolete +./usr/lkm/tmpfs.o base-obsolete obsolete +./usr/lkm/udf.o base-obsolete obsolete +./usr/lkm/umapfs.o base-obsolete obsolete +./usr/lkm/union.o base-obsolete obsolete +./usr/lkm/vnd.o base-obsolete obsolete diff --git a/distrib/sets/lists/base/md.alpha b/distrib/sets/lists/base/md.alpha index b48f92f71f6..6ab22d46178 100644 --- a/distrib/sets/lists/base/md.alpha +++ b/distrib/sets/lists/base/md.alpha @@ -1,10 +1,10 @@ -# $NetBSD: md.alpha,v 1.35 2005/08/20 20:15:57 abs Exp $ +# $NetBSD: md.alpha,v 1.36 2008/11/12 12:35:50 ad Exp $ ./usr/bin/fdformat base-util-bin ./usr/lib/libalpha.so base-sys-shlib ./usr/lib/libalpha.so.0 base-sys-shlib ./usr/lib/libalpha.so.0.0 base-sys-shlib -./usr/lkm/dummy_pci.o base-sys-lkm -./usr/lkm/wi_pcmcia.o base-sys-lkm +./usr/lkm/dummy_pci.o base-obsolete obsolete +./usr/lkm/wi_pcmcia.o base-obsolete obsolete ./usr/mdec/boot base-sysutil-bin ./usr/mdec/bootxx base-obsolete obsolete ./usr/mdec/bootxx.old base-obsolete obsolete diff --git a/distrib/sets/lists/base/md.amd64 b/distrib/sets/lists/base/md.amd64 index 59022940ac5..c462ab3af73 100644 --- a/distrib/sets/lists/base/md.amd64 +++ b/distrib/sets/lists/base/md.amd64 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.27 2008/11/08 19:01:05 wiz Exp $ +# $NetBSD: md.amd64,v 1.28 2008/11/12 12:35:50 ad Exp $ ./@MODULEDIR@/adosfs base-kernel-modules ./@MODULEDIR@/adosfs/adosfs.kmod base-kernel-modules ./@MODULEDIR@/azalia base-kernel-modules @@ -293,14 +293,14 @@ ./usr/lib/libx86_64.so.0 base-sys-shlib pic ./usr/lib/libx86_64.so.0.0 base-sys-shlib pic ./usr/libexec/ld.elf_so-i386 base-sys-shlib compat,pic -./usr/lkm/aps.o base-sys-lkm -./usr/lkm/compat_linux.o base-sys-lkm -./usr/lkm/exec_linux_elf.o base-sys-lkm -./usr/lkm/finsio.o base-sys-lkm -./usr/lkm/itesio.o base-sys-lkm -./usr/lkm/nsclpcsio.o base-sys-lkm -./usr/lkm/smsc.o base-sys-lkm -./usr/lkm/ug.o base-sys-lkm +./usr/lkm/aps.o base-obsolete obsolete +./usr/lkm/compat_linux.o base-obsolete obsolete +./usr/lkm/exec_linux_elf.o base-obsolete obsolete +./usr/lkm/finsio.o base-obsolete obsolete +./usr/lkm/itesio.o base-obsolete obsolete +./usr/lkm/nsclpcsio.o base-obsolete obsolete +./usr/lkm/smsc.o base-obsolete obsolete +./usr/lkm/ug.o base-obsolete obsolete ./usr/mdec/biosboot base-obsolete obsolete ./usr/mdec/biosboot.sym base-obsolete obsolete ./usr/mdec/biosboot_com0.sym base-obsolete obsolete diff --git a/distrib/sets/lists/base/md.i386 b/distrib/sets/lists/base/md.i386 index e862db66a2a..9972d9595ad 100644 --- a/distrib/sets/lists/base/md.i386 +++ b/distrib/sets/lists/base/md.i386 @@ -1,4 +1,4 @@ -# $NetBSD: md.i386,v 1.130 2008/10/31 20:24:51 mrg Exp $ +# $NetBSD: md.i386,v 1.131 2008/11/12 12:35:50 ad Exp $ ./@MODULEDIR@/adosfs base-kernel-modules ./@MODULEDIR@/adosfs/adosfs.kmod base-kernel-modules ./@MODULEDIR@/azalia base-kernel-modules @@ -92,24 +92,24 @@ ./usr/lib/libpmc.so.0 base-sys-shlib pic ./usr/lib/libpmc.so.0.0 base-sys-shlib pic ./usr/libexec/ld.so base-sys-shlib -./usr/lkm/aps.o base-sys-lkm -./usr/lkm/compat_freebsd.o base-sys-lkm -./usr/lkm/compat_linux.o base-sys-lkm -./usr/lkm/compat_pecoff.o base-sys-lkm -./usr/lkm/compat_svr4.o base-sys-lkm -./usr/lkm/dummy_pci.o base-sys-lkm -./usr/lkm/exec_freebsd_aout.o base-sys-lkm -./usr/lkm/exec_freebsd_elf.o base-sys-lkm -./usr/lkm/exec_linux_elf.o base-sys-lkm -./usr/lkm/exec_pecoff.o base-sys-lkm -./usr/lkm/exec_svr4_elf.o base-sys-lkm -./usr/lkm/finsio.o base-sys-lkm -./usr/lkm/itesio.o base-sys-lkm -./usr/lkm/nsclpcsio.o base-sys-lkm -./usr/lkm/powernow.o base-sys-lkm -./usr/lkm/smsc.o base-sys-lkm -./usr/lkm/ug.o base-sys-lkm -./usr/lkm/wi_pcmcia.o base-sys-lkm +./usr/lkm/aps.o base-obsolete obsolete +./usr/lkm/compat_freebsd.o base-obsolete obsolete +./usr/lkm/compat_linux.o base-obsolete obsolete +./usr/lkm/compat_pecoff.o base-obsolete obsolete +./usr/lkm/compat_svr4.o base-obsolete obsolete +./usr/lkm/dummy_pci.o base-obsolete obsolete +./usr/lkm/exec_freebsd_aout.o base-obsolete obsolete +./usr/lkm/exec_freebsd_elf.o base-obsolete obsolete +./usr/lkm/exec_linux_elf.o base-obsolete obsolete +./usr/lkm/exec_pecoff.o base-obsolete obsolete +./usr/lkm/exec_svr4_elf.o base-obsolete obsolete +./usr/lkm/finsio.o base-obsolete obsolete +./usr/lkm/itesio.o base-obsolete obsolete +./usr/lkm/nsclpcsio.o base-obsolete obsolete +./usr/lkm/powernow.o base-obsolete obsolete +./usr/lkm/smsc.o base-obsolete obsolete +./usr/lkm/ug.o base-obsolete obsolete +./usr/lkm/wi_pcmcia.o base-obsolete obsolete ./usr/mdec/biosboot base-obsolete obsolete ./usr/mdec/biosboot.sym base-obsolete obsolete ./usr/mdec/biosboot_com0.sym base-obsolete obsolete diff --git a/distrib/sets/lists/base/md.mac68k b/distrib/sets/lists/base/md.mac68k index ee56a958d73..d8c9303577e 100644 --- a/distrib/sets/lists/base/md.mac68k +++ b/distrib/sets/lists/base/md.mac68k @@ -1,3 +1,3 @@ -# $NetBSD: md.mac68k,v 1.38 2004/01/11 10:24:58 lukem Exp $ +# $NetBSD: md.mac68k,v 1.39 2008/11/12 12:35:50 ad Exp $ ./sbin/pdisk base-sysutil-root -./usr/lkm/iwmfd.o base-sys-lkm +./usr/lkm/iwmfd.o base-obsolete obsolete diff --git a/distrib/sets/lists/base/md.sparc64 b/distrib/sets/lists/base/md.sparc64 index a629c4d5574..845543dd29a 100644 --- a/distrib/sets/lists/base/md.sparc64 +++ b/distrib/sets/lists/base/md.sparc64 @@ -1,4 +1,4 @@ -# $NetBSD: md.sparc64,v 1.24 2008/10/31 06:41:28 mrg Exp $ +# $NetBSD: md.sparc64,v 1.25 2008/11/12 12:35:50 ad Exp $ ./sbin/edlabel base-sysutil-root ./usr/bin/fdformat base-util-bin ./usr/lib/sparc base-compat-lib compat @@ -224,15 +224,15 @@ ./usr/lib/sparc/security/pam_skey.so.1 base-compat-shlib compat,pic ./usr/lib/sparc/security/pam_ssh.so.1 base-compat-shlib compat,pic ./usr/lib/sparc/security/pam_unix.so.1 base-compat-shlib compat,pic -./usr/lkm/compat_netbsd32.o base-netbsd32-lkm -./usr/lkm/compat_sunos32.o base-sunos32-lkm -./usr/lkm/compat_svr4.o base-svr4-lkm -./usr/lkm/compat_svr4_32.o base-svr4_32-lkm -./usr/lkm/exec_elf.o base-netbsd-lkm -./usr/lkm/exec_netbsd32_aout.o base-netbsd32-lkm -./usr/lkm/exec_netbsd32_elf.o base-netbsd32-lkm -./usr/lkm/exec_sunos32_aout.o base-sunos32-lkm -./usr/lkm/exec_svr4_32_elf.o base-svr4_32-lkm +./usr/lkm/compat_netbsd32.o base-obsolete obsolete +./usr/lkm/compat_sunos32.o base-obsolete obsolete +./usr/lkm/compat_svr4.o base-obsolete obsolete +./usr/lkm/compat_svr4_32.o base-obsolete obsolete +./usr/lkm/exec_elf.o base-obsolete obsolete +./usr/lkm/exec_netbsd32_aout.o base-obsolete obsolete +./usr/lkm/exec_netbsd32_elf.o base-obsolete obsolete +./usr/lkm/exec_sunos32_aout.o base-obsolete obsolete +./usr/lkm/exec_svr4_32_elf.o base-obsolete obsolete ./usr/mdec/binstall base-sysutil-bin ./usr/mdec/bootblk base-sysutil-bin ./usr/mdec/installboot base-obsolete obsolete diff --git a/distrib/sets/lists/base/mi b/distrib/sets/lists/base/mi index cf70e664a6f..2099248d487 100644 --- a/distrib/sets/lists/base/mi +++ b/distrib/sets/lists/base/mi @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.781 2008/11/07 15:18:24 joerg Exp $ +# $NetBSD: mi,v 1.782 2008/11/12 12:35:50 ad Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -212,7 +212,7 @@ ./sbin/mbrlabel base-sysutil-root ./sbin/mknod base-sysutil-root ./sbin/modload base-sysutil-root -./sbin/modstat base-sysutil-root modular +./sbin/modstat base-sysutil-root ./sbin/modunload base-sysutil-root ./sbin/mount base-sysutil-root ./sbin/mount_ados base-adosfs-root @@ -772,7 +772,6 @@ ./usr/bin/lam base-util-bin ./usr/bin/last base-util-bin ./usr/bin/lastcomm base-util-bin -# needed by modload for now ./usr/bin/ld comp-util-bin bfd ./usr/bin/ldapadd base-ldap-bin ldap ./usr/bin/ldapcompare base-ldap-bin ldap @@ -822,7 +821,7 @@ ./usr/bin/mkfifo base-util-bin ./usr/bin/mklocale base-locale-bin ./usr/bin/mktemp base-util-bin -./usr/bin/modstat base-util-bin !modular +./usr/bin/modstat base-obsolete obsolete ./usr/bin/more base-util-bin ./usr/bin/mset base-tn3270-bin ./usr/bin/msgs base-util-bin @@ -1280,7 +1279,7 @@ ./usr/libexec/uucpd base-obsolete obsolete ./usr/libexec/uugetty base-obsolete obsolete ./usr/libexec/virecover base-util-bin -./usr/lkm base-sys-usr +./usr/lkm base-obsolete obsolete ./usr/mdec base-sys-usr ./usr/sbin base-sys-usr ./usr/sbin/ac base-sysutil-bin diff --git a/distrib/sets/lists/base/rescue.mi b/distrib/sets/lists/base/rescue.mi index 9156187e3de..e0b5ac40201 100644 --- a/distrib/sets/lists/base/rescue.mi +++ b/distrib/sets/lists/base/rescue.mi @@ -1,4 +1,4 @@ -# $NetBSD: rescue.mi,v 1.27 2008/01/03 20:47:57 jdc Exp $ +# $NetBSD: rescue.mi,v 1.28 2008/11/12 12:35:50 ad Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -73,6 +73,7 @@ ./rescue/mkdir base-rescue-root ./rescue/mknod base-rescue-root ./rescue/modload base-rescue-root +./rescue/modstat base-rescue-root ./rescue/modunload base-rescue-root ./rescue/more base-rescue-root ./rescue/mount base-rescue-root diff --git a/distrib/sets/lists/comp/mi b/distrib/sets/lists/comp/mi index 3b0aeee2a78..d49aa638bab 100644 --- a/distrib/sets/lists/comp/mi +++ b/distrib/sets/lists/comp/mi @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1204 2008/11/10 04:06:16 dogcow Exp $ +# $NetBSD: mi,v 1.1205 2008/11/12 12:35:50 ad Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1958,7 +1958,7 @@ ./usr/include/sys/ksem.h comp-c-include ./usr/include/sys/ksyms.h comp-c-include ./usr/include/sys/ktrace.h comp-c-include -./usr/include/sys/lkm.h comp-c-include +./usr/include/sys/lkm.h comp-obsolete obsolete ./usr/include/sys/localedef.h comp-c-include ./usr/include/sys/lock.h comp-c-include ./usr/include/sys/lockf.h comp-c-include @@ -2650,7 +2650,7 @@ ./usr/libdata/debug/sbin/mbrlabel.debug comp-sysutil-debug debug ./usr/libdata/debug/sbin/mknod.debug comp-sysutil-debug debug ./usr/libdata/debug/sbin/modload.debug comp-sysutil-debug debug -./usr/libdata/debug/sbin/modstat.debug comp-sysutil-debug modular,debug +./usr/libdata/debug/sbin/modstat.debug comp-sysutil-debug debug ./usr/libdata/debug/sbin/modunload.debug comp-sysutil-debug debug ./usr/libdata/debug/sbin/mount.debug comp-sysutil-debug debug ./usr/libdata/debug/sbin/mount_ados.debug comp-adosfs-debug debug @@ -2895,7 +2895,7 @@ ./usr/libdata/debug/usr/bin/mklocale.debug comp-locale-debug debug ./usr/libdata/debug/usr/bin/mkstr.debug comp-c-debug debug ./usr/libdata/debug/usr/bin/mktemp.debug comp-util-debug debug -./usr/libdata/debug/usr/bin/modstat.debug comp-util-debug !modular,debug +./usr/libdata/debug/usr/bin/modstat.debug comp-obolete obsolete ./usr/libdata/debug/usr/bin/mset.debug comp-tn3270-debug debug ./usr/libdata/debug/usr/bin/msgattrib.debug comp-c-debug debug ./usr/libdata/debug/usr/bin/msgc.debug comp-c-debug debug @@ -19611,7 +19611,7 @@ ./usr/share/mk/bsd.kernobj.mk comp-util-share share ./usr/share/mk/bsd.kinc.mk comp-util-share share ./usr/share/mk/bsd.klinks.mk comp-util-share share -./usr/share/mk/bsd.kmod.mk comp-util-share share +./usr/share/mk/bsd.kmod.mk comp-obsolete obsolete ./usr/share/mk/bsd.kmodule.mk comp-util-share share ./usr/share/mk/bsd.lib.mk comp-util-share share ./usr/share/mk/bsd.links.mk comp-util-share share diff --git a/distrib/sets/lists/etc/mi b/distrib/sets/lists/etc/mi index 795cd7b02f9..527e7cd39f0 100644 --- a/distrib/sets/lists/etc/mi +++ b/distrib/sets/lists/etc/mi @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.200 2008/06/18 09:06:26 yamt Exp $ +# $NetBSD: mi,v 1.201 2008/11/12 12:35:51 ad Exp $ # # Note: end-user configuration files that are moved to another location # should not be marked "obsolete"; they should just be removed from @@ -71,7 +71,7 @@ ./etc/inetd.conf etc-netutil-etc ./etc/iscsi/auths etc-iscsi-etc iscsi ./etc/iscsi/targets etc-iscsi-etc iscsi -./etc/lkm.conf etc-sys-etc +./etc/lkm.conf etc-obsolete obsolete ./etc/localtime etc-sys-etc ./etc/locate.conf etc-sys-etc ./etc/login.conf etc-sys-etc @@ -206,9 +206,9 @@ ./etc/rc.d/kdc etc-krb5-rc ./etc/rc.d/kerberos etc-obsolete obsolete ./etc/rc.d/ldconfig etc-sys-rc -./etc/rc.d/lkm1 etc-sys-rc -./etc/rc.d/lkm2 etc-sys-rc -./etc/rc.d/lkm3 etc-sys-rc +./etc/rc.d/lkm1 etc-obsolete obsolete +./etc/rc.d/lkm2 etc-obsolete obsolete +./etc/rc.d/lkm3 etc-obsolete obsolete ./etc/rc.d/local etc-sys-rc ./etc/rc.d/lpd etc-lpr-rc ./etc/rc.d/mixerctl etc-audio-rc @@ -279,7 +279,7 @@ ./etc/rc.d/yppasswdd etc-nis-rc ./etc/rc.d/ypserv etc-nis-rc ./etc/rc.d/ypset etc-obsolete obsolete -./etc/rc.lkm etc-sys-rc +./etc/rc.lkm etc-obsolete obsolete ./etc/rc.local etc-sys-rc ./etc/rc.shutdown etc-sys-rc ./etc/rc.subr etc-sys-rc diff --git a/distrib/sets/lists/man/mi b/distrib/sets/lists/man/mi index 4584e8130b7..89b4fa29612 100644 --- a/distrib/sets/lists/man/mi +++ b/distrib/sets/lists/man/mi @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1111 2008/11/03 00:47:42 jnemeth Exp $ +# $NetBSD: mi,v 1.1112 2008/11/12 12:35:51 ad Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1122,7 +1122,7 @@ ./usr/share/man/cat4/ld.0 man-sys-catman .cat ./usr/share/man/cat4/le.0 man-sys-catman .cat ./usr/share/man/cat4/lii.0 man-sys-catman .cat -./usr/share/man/cat4/lkm.0 man-sys-catman .cat +./usr/share/man/cat4/lkm.0 man-obsolete obsolete ./usr/share/man/cat4/lm.0 man-sys-catman .cat ./usr/share/man/cat4/lmc.0 man-sys-catman .cat ./usr/share/man/cat4/lmtemp.0 man-sys-catman .cat @@ -1758,7 +1758,7 @@ ./usr/share/man/cat5/ld.so.conf.0 man-sys-catman .cat ./usr/share/man/cat5/ldap_table.0 man-postfix-catman postfix,.cat ./usr/share/man/cat5/link.0 man-sys-catman .cat -./usr/share/man/cat5/lkm.conf.0 man-sys-catman .cat +./usr/share/man/cat5/lkm.conf.0 man-obsolete obsolete ./usr/share/man/cat5/locale.alias.0 man-sys-catman .cat ./usr/share/man/cat5/locate.conf.0 man-sys-catman .cat ./usr/share/man/cat5/login.access.0 man-sys-catman pam,.cat @@ -3618,7 +3618,7 @@ ./usr/share/man/html4/ld.html man-sys-htmlman html ./usr/share/man/html4/le.html man-sys-htmlman html ./usr/share/man/html4/lii.html man-sys-htmlman html -./usr/share/man/html4/lkm.html man-sys-htmlman html +./usr/share/man/html4/lkm.html man-obsolete obsolete ./usr/share/man/html4/lm.html man-sys-htmlman html ./usr/share/man/html4/lmc.html man-sys-htmlman html ./usr/share/man/html4/lmtemp.html man-sys-htmlman html @@ -4200,7 +4200,7 @@ ./usr/share/man/html5/ld.so.conf.html man-sys-htmlman html ./usr/share/man/html5/ldap_table.html man-postfix-htmlman postfix,html ./usr/share/man/html5/link.html man-sys-htmlman html -./usr/share/man/html5/lkm.conf.html man-sys-htmlman html +./usr/share/man/html5/lkm.conf.html man-obsolete obsolete ./usr/share/man/html5/locale.alias.html man-sys-htmlman html ./usr/share/man/html5/locate.conf.html man-sys-htmlman html ./usr/share/man/html5/login.access.html man-sys-htmlman pam,html @@ -5960,7 +5960,7 @@ ./usr/share/man/man4/ld.4 man-sys-man .man ./usr/share/man/man4/le.4 man-sys-man .man ./usr/share/man/man4/lii.4 man-sys-man .man -./usr/share/man/man4/lkm.4 man-sys-man .man +./usr/share/man/man4/lkm.4 man-obsolete obsolete ./usr/share/man/man4/lm.4 man-sys-man .man ./usr/share/man/man4/lmc.4 man-sys-man .man ./usr/share/man/man4/lmtemp.4 man-sys-man .man @@ -6596,7 +6596,7 @@ ./usr/share/man/man5/ld.so.conf.5 man-sys-man .man ./usr/share/man/man5/ldap_table.5 man-postfix-man postfix,.man ./usr/share/man/man5/link.5 man-sys-man .man -./usr/share/man/man5/lkm.conf.5 man-sys-man .man +./usr/share/man/man5/lkm.conf.5 man-obsolete obsolete ./usr/share/man/man5/locale.alias.5 man-sys-man .man ./usr/share/man/man5/locate.conf.5 man-sys-man .man ./usr/share/man/man5/login.access.5 man-sys-man .man,pam diff --git a/distrib/sets/lists/tests/mi b/distrib/sets/lists/tests/mi index 32204079748..dae7ea9d952 100644 --- a/distrib/sets/lists/tests/mi +++ b/distrib/sets/lists/tests/mi @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.23 2008/05/05 19:33:09 jmmv Exp $ +# $NetBSD: mi,v 1.24 2008/11/12 12:35:51 ad Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -65,7 +65,7 @@ ./usr/libdata/debug/usr/tests/fs/tmpfs tests-fs-debug ./usr/libdata/debug/usr/tests/fs/tmpfs/h_tools.debug tests-fs-debug debug ./usr/libdata/debug/usr/tests/modules tests-sys-debug -./usr/libdata/debug/usr/tests/modules/t_modctl.debug tests-sys-debug debug,modular +./usr/libdata/debug/usr/tests/modules/t_modctl.debug tests-sys-debug debug ./usr/libdata/debug/usr/tests/net tests-net-debug ./usr/libdata/debug/usr/tests/net/sys tests-net-debug ./usr/libdata/debug/usr/tests/net/sys/t_connect.debug tests-net-debug debug @@ -388,11 +388,11 @@ ./usr/tests/games/t_factor tests-games-tests ./usr/tests/modules tests-sys-tests ./usr/tests/modules/Atffile tests-sys-tests -./usr/tests/modules/k_helper tests-sys-tests modular -./usr/tests/modules/k_helper/k_helper.kmod tests-sys-tests modular +./usr/tests/modules/k_helper tests-sys-tests +./usr/tests/modules/k_helper/k_helper.kmod tests-sys-tests ./usr/tests/modules/k_helper.o tests-obsolete obsolete -./usr/tests/modules/t_modctl tests-sys-tests modular -./usr/tests/modules/t_modload tests-sys-tests modular +./usr/tests/modules/t_modctl tests-sys-tests +./usr/tests/modules/t_modload tests-sys-tests ./usr/tests/net tests-net-tests ./usr/tests/net/Atffile tests-net-tests ./usr/tests/net/sys tests-net-tests diff --git a/distrib/sets/sets.subr b/distrib/sets/sets.subr index 103591d4c6c..f6dc7735e83 100644 --- a/distrib/sets/sets.subr +++ b/distrib/sets/sets.subr @@ -1,4 +1,4 @@ -# $NetBSD: sets.subr,v 1.73 2008/11/09 23:07:22 mrg Exp $ +# $NetBSD: sets.subr,v 1.74 2008/11/12 12:35:50 ad Exp $ # # @@ -49,7 +49,6 @@ MKVARS="\ MKMAN \ MKMANPAGES \ MKMANZ \ - MKMODULAR \ MKNLS \ MKNVI \ MKPAM \ @@ -229,7 +228,7 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g" # In each file, a record consists of a path and a System Package name, # separated by whitespace. E.g., # -# # $NetBSD: sets.subr,v 1.73 2008/11/09 23:07:22 mrg Exp $ +# # $NetBSD: sets.subr,v 1.74 2008/11/12 12:35:50 ad Exp $ # . base-sys-root [keyword[,...]] # ./altroot base-sys-root # ./bin base-sys-root @@ -276,7 +275,6 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g" # man ${MKMAN} != no # manpages ${MKMANPAGES} != no # manz ${MKMANZ} != no -# modular ${MKMODULAR} != no # nls ${MKNLS} != no # nvi ${MKNVI} != no # pam ${MKPAM} != no diff --git a/distrib/syspkg/sets/base/Makefile b/distrib/syspkg/sets/base/Makefile index 27c2158361d..63cd179991d 100644 --- a/distrib/syspkg/sets/base/Makefile +++ b/distrib/syspkg/sets/base/Makefile @@ -1,6 +1,5 @@ -# $NetBSD: Makefile,v 1.9 2006/10/27 15:09:46 tnozaki Exp $ +# $NetBSD: Makefile,v 1.10 2008/11/12 12:35:51 ad Exp $ -SUBDIR+=base-adosfs-lkm SUBDIR+=base-adosfs-root SUBDIR+=base-amd-bin SUBDIR+=base-amd-examples @@ -12,7 +11,6 @@ SUBDIR+=base-bind-root SUBDIR+=base-bootserver-bin SUBDIR+=base-c-bin SUBDIR+=base-c-usr -SUBDIR+=base-coda-lkm SUBDIR+=base-cron-bin SUBDIR+=base-cron-root SUBDIR+=base-crypto-bin @@ -24,7 +22,6 @@ SUBDIR+=base-debug-bin SUBDIR+=base-dhclient-root SUBDIR+=base-dhcpd-bin SUBDIR+=base-dhcpd-examples -SUBDIR+=base-ext2fs-lkm SUBDIR+=base-ext2fs-root SUBDIR+=base-filecorefs-root SUBDIR+=base-games-root @@ -36,7 +33,6 @@ SUBDIR+=base-groff-share SUBDIR+=base-hesiod-bin SUBDIR+=base-htmldoc-share SUBDIR+=base-i18n-shlib -SUBDIR+=base-ipf-lkm SUBDIR+=base-isdn-bin SUBDIR+=base-krb5-bin SUBDIR+=base-krb5-examples @@ -95,7 +91,6 @@ SUBDIR+=base-mailwrapper-bin SUBDIR+=base-man-bin SUBDIR+=base-man-share SUBDIR+=base-miscfs-examples -SUBDIR+=base-miscfs-lkm SUBDIR+=base-miscfs-root SUBDIR+=base-net-shlib SUBDIR+=base-netutil-bin @@ -106,7 +101,6 @@ SUBDIR+=base-nfsclient-root SUBDIR+=base-nfsserver-bin SUBDIR+=base-nis-bin SUBDIR+=base-nis-root -SUBDIR+=base-ntfs-lkm SUBDIR+=base-ntfs-root SUBDIR+=base-ntp-bin SUBDIR+=base-objc-usr @@ -133,7 +127,6 @@ SUBDIR+=base-sup-bin SUBDIR+=base-sup-examples SUBDIR+=base-sys-devlinks SUBDIR+=base-sys-examples -SUBDIR+=base-sys-lkm SUBDIR+=base-sys-root SUBDIR+=base-sys-share SUBDIR+=base-sys-shlib diff --git a/distrib/syspkg/sets/base/base-adosfs-lkm/COMMENT b/distrib/syspkg/sets/base/base-adosfs-lkm/COMMENT deleted file mode 100644 index 1c26327695b..00000000000 --- a/distrib/syspkg/sets/base/base-adosfs-lkm/COMMENT +++ /dev/null @@ -1 +0,0 @@ -loadable kernel module for Amiga DOS file system support diff --git a/distrib/syspkg/sets/base/base-adosfs-lkm/DESCR b/distrib/syspkg/sets/base/base-adosfs-lkm/DESCR deleted file mode 100644 index 1c26327695b..00000000000 --- a/distrib/syspkg/sets/base/base-adosfs-lkm/DESCR +++ /dev/null @@ -1 +0,0 @@ -loadable kernel module for Amiga DOS file system support diff --git a/distrib/syspkg/sets/base/base-adosfs-lkm/Makefile b/distrib/syspkg/sets/base/base-adosfs-lkm/Makefile deleted file mode 100644 index 84f059142e5..00000000000 --- a/distrib/syspkg/sets/base/base-adosfs-lkm/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2004/06/30 03:37:37 jmc Exp $ - -PKGBASE=base-adosfs-lkm -TINY_VERSION=0 - -.include "../../../mk/bsd.syspkg.mk" diff --git a/distrib/syspkg/sets/base/base-coda-lkm/COMMENT b/distrib/syspkg/sets/base/base-coda-lkm/COMMENT deleted file mode 100644 index 206ce47782a..00000000000 --- a/distrib/syspkg/sets/base/base-coda-lkm/COMMENT +++ /dev/null @@ -1 +0,0 @@ -loadable kernel modules for the CODA distributed file system diff --git a/distrib/syspkg/sets/base/base-coda-lkm/DESCR b/distrib/syspkg/sets/base/base-coda-lkm/DESCR deleted file mode 100644 index 206ce47782a..00000000000 --- a/distrib/syspkg/sets/base/base-coda-lkm/DESCR +++ /dev/null @@ -1 +0,0 @@ -loadable kernel modules for the CODA distributed file system diff --git a/distrib/syspkg/sets/base/base-coda-lkm/Makefile b/distrib/syspkg/sets/base/base-coda-lkm/Makefile deleted file mode 100644 index 68bbcc741de..00000000000 --- a/distrib/syspkg/sets/base/base-coda-lkm/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2004/06/30 03:37:37 jmc Exp $ - -PKGBASE=base-coda-lkm -TINY_VERSION=0 - -.include "../../../mk/bsd.syspkg.mk" diff --git a/distrib/syspkg/sets/base/base-ext2fs-lkm/COMMENT b/distrib/syspkg/sets/base/base-ext2fs-lkm/COMMENT deleted file mode 100644 index 649518e0bdf..00000000000 --- a/distrib/syspkg/sets/base/base-ext2fs-lkm/COMMENT +++ /dev/null @@ -1 +0,0 @@ -loadable kernel module for ext2fs file system diff --git a/distrib/syspkg/sets/base/base-ext2fs-lkm/DESCR b/distrib/syspkg/sets/base/base-ext2fs-lkm/DESCR deleted file mode 100644 index 649518e0bdf..00000000000 --- a/distrib/syspkg/sets/base/base-ext2fs-lkm/DESCR +++ /dev/null @@ -1 +0,0 @@ -loadable kernel module for ext2fs file system diff --git a/distrib/syspkg/sets/base/base-ext2fs-lkm/Makefile b/distrib/syspkg/sets/base/base-ext2fs-lkm/Makefile deleted file mode 100644 index 76a22c7052d..00000000000 --- a/distrib/syspkg/sets/base/base-ext2fs-lkm/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2004/06/30 03:37:38 jmc Exp $ - -PKGBASE=base-ext2fs-lkm -TINY_VERSION=0 - -.include "../../../mk/bsd.syspkg.mk" diff --git a/distrib/syspkg/sets/base/base-ipf-lkm/COMMENT b/distrib/syspkg/sets/base/base-ipf-lkm/COMMENT deleted file mode 100644 index 40c9b6e378f..00000000000 --- a/distrib/syspkg/sets/base/base-ipf-lkm/COMMENT +++ /dev/null @@ -1 +0,0 @@ -loadable kernel module for IPfilter diff --git a/distrib/syspkg/sets/base/base-ipf-lkm/DESCR b/distrib/syspkg/sets/base/base-ipf-lkm/DESCR deleted file mode 100644 index 40c9b6e378f..00000000000 --- a/distrib/syspkg/sets/base/base-ipf-lkm/DESCR +++ /dev/null @@ -1 +0,0 @@ -loadable kernel module for IPfilter diff --git a/distrib/syspkg/sets/base/base-ipf-lkm/Makefile b/distrib/syspkg/sets/base/base-ipf-lkm/Makefile deleted file mode 100644 index 5b4bdd9db55..00000000000 --- a/distrib/syspkg/sets/base/base-ipf-lkm/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2004/06/30 03:37:38 jmc Exp $ - -PKGBASE=base-ipf-lkm -TINY_VERSION=0 - -.include "../../../mk/bsd.syspkg.mk" diff --git a/distrib/syspkg/sets/base/base-miscfs-lkm/COMMENT b/distrib/syspkg/sets/base/base-miscfs-lkm/COMMENT deleted file mode 100644 index 04f508993c2..00000000000 --- a/distrib/syspkg/sets/base/base-miscfs-lkm/COMMENT +++ /dev/null @@ -1 +0,0 @@ -loadable kernel modules for miscellaneous file systems diff --git a/distrib/syspkg/sets/base/base-miscfs-lkm/DESCR b/distrib/syspkg/sets/base/base-miscfs-lkm/DESCR deleted file mode 100644 index 04f508993c2..00000000000 --- a/distrib/syspkg/sets/base/base-miscfs-lkm/DESCR +++ /dev/null @@ -1 +0,0 @@ -loadable kernel modules for miscellaneous file systems diff --git a/distrib/syspkg/sets/base/base-miscfs-lkm/Makefile b/distrib/syspkg/sets/base/base-miscfs-lkm/Makefile deleted file mode 100644 index 64f19d46410..00000000000 --- a/distrib/syspkg/sets/base/base-miscfs-lkm/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2004/06/30 03:37:40 jmc Exp $ - -PKGBASE=base-miscfs-lkm -TINY_VERSION=0 - -.include "../../../mk/bsd.syspkg.mk" diff --git a/distrib/syspkg/sets/base/base-ntfs-lkm/COMMENT b/distrib/syspkg/sets/base/base-ntfs-lkm/COMMENT deleted file mode 100644 index 064a6de284c..00000000000 --- a/distrib/syspkg/sets/base/base-ntfs-lkm/COMMENT +++ /dev/null @@ -1 +0,0 @@ -loadable kernel module for Windows NTFS file system support diff --git a/distrib/syspkg/sets/base/base-ntfs-lkm/DESCR b/distrib/syspkg/sets/base/base-ntfs-lkm/DESCR deleted file mode 100644 index 064a6de284c..00000000000 --- a/distrib/syspkg/sets/base/base-ntfs-lkm/DESCR +++ /dev/null @@ -1 +0,0 @@ -loadable kernel module for Windows NTFS file system support diff --git a/distrib/syspkg/sets/base/base-ntfs-lkm/Makefile b/distrib/syspkg/sets/base/base-ntfs-lkm/Makefile deleted file mode 100644 index 30634478352..00000000000 --- a/distrib/syspkg/sets/base/base-ntfs-lkm/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2004/06/30 03:37:40 jmc Exp $ - -PKGBASE=base-ntfs-lkm -TINY_VERSION=0 - -.include "../../../mk/bsd.syspkg.mk" diff --git a/distrib/syspkg/sets/base/base-sys-lkm/COMMENT b/distrib/syspkg/sets/base/base-sys-lkm/COMMENT deleted file mode 100644 index a1f962a368e..00000000000 --- a/distrib/syspkg/sets/base/base-sys-lkm/COMMENT +++ /dev/null @@ -1 +0,0 @@ -system support for loadable kernel modules diff --git a/distrib/syspkg/sets/base/base-sys-lkm/DESCR b/distrib/syspkg/sets/base/base-sys-lkm/DESCR deleted file mode 100644 index a1f962a368e..00000000000 --- a/distrib/syspkg/sets/base/base-sys-lkm/DESCR +++ /dev/null @@ -1 +0,0 @@ -system support for loadable kernel modules diff --git a/distrib/syspkg/sets/base/base-sys-lkm/Makefile b/distrib/syspkg/sets/base/base-sys-lkm/Makefile deleted file mode 100644 index 89b1b3bb63f..00000000000 --- a/distrib/syspkg/sets/base/base-sys-lkm/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2004/06/30 03:37:41 jmc Exp $ - -PKGBASE=base-sys-lkm -TINY_VERSION=0 - -.include "../../../mk/bsd.syspkg.mk" @@ -1,4 +1,4 @@ -# $NetBSD: TODO,v 1.14 2005/09/27 20:15:15 hubertf Exp $ +# $NetBSD: TODO,v 1.15 2008/11/12 12:35:52 ad Exp $ THINGS TO BE DONE: @@ -34,7 +34,6 @@ High Kernel: swap to file of dynamic size; see apollo nfs: kernel support for lockd(8), lockf(3) - clean up support for LKM and protections checking (cgd) User programs: rwall nfs-mountees on shutdown @@ -83,7 +82,6 @@ This is a list of suggested smaller projects (in no particular order): + investigate which userland utilities and daemons would benefit from kqueue, and rewrite them + better testing in general; in particular, more regression tests -+ better LKM version checking + add a native scheme interpreter + add platform support for TenDRA compiler suite + merge moused(8) with wsmoused(8) as a new work mode (i.e. serial) diff --git a/doc/TODO.kqueue b/doc/TODO.kqueue index 2f6f7bf48b7..71f842671ce 100644 --- a/doc/TODO.kqueue +++ b/doc/TODO.kqueue @@ -1,4 +1,4 @@ -# $NetBSD: TODO.kqueue,v 1.7 2007/12/31 14:09:13 ad Exp $ +# $NetBSD: TODO.kqueue,v 1.8 2008/11/12 12:35:52 ad Exp $ items todo: - dir watched - what happens if something is mounted over it? @@ -12,9 +12,6 @@ items todo: - kqfilter entry points for: - smb_trantcp - dev/pci/bktr/bktr_os.c ??? doesn't poll? - - kfilter_(un)register: not used by kernel code ATM, make conditional - on option LKM? - - Test-compile the following ports: - amigappc XXX not compilable even on trunk diff --git a/etc/MAKEDEV.tmpl b/etc/MAKEDEV.tmpl index 985dc656595..5ad07d0b979 100644 --- a/etc/MAKEDEV.tmpl +++ b/etc/MAKEDEV.tmpl @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: MAKEDEV.tmpl,v 1.113 2008/09/14 13:59:54 jmcneill Exp $ +# $NetBSD: MAKEDEV.tmpl,v 1.114 2008/11/12 12:35:52 ad Exp $ # # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -246,7 +246,6 @@ # ite* terminal emulator interface to HP300 graphics devices # joy* joystick device # kttcp kernel ttcp helper device -# lkm loadable kernel modules interface # lockstat kernel locking statistics # magma* Magma multiport serial/parallel cards # midi* MIDI @@ -708,7 +707,7 @@ all) makedev bpf makedev tun0 tun1 tun2 tun3 makedev ipl pf crypto random - makedev lkm lockstat clockctl cpuctl + makedev lockstat clockctl cpuctl makedev atabus0 atabus1 atabus2 atabus3 makedev tap tap0 tap1 tap2 tap3 makedev gpio gpio0 gpio1 gpio2 gpio3 gpio4 gpio5 gpio6 gpio7 @@ -1249,10 +1248,6 @@ speaker) mkdev speaker c %spkr_chr% 0 ;; -lkm) - mkdev lkm c %lkm_chr% 0 640 $g_kmem - ;; - lockstat) mkdev lockstat c %lockstat_chr% 0 ;; diff --git a/etc/Makefile b/etc/Makefile index 20409f30da6..a833d3cb764 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.360 2008/11/09 23:02:28 mrg Exp $ +# $NetBSD: Makefile,v 1.361 2008/11/12 12:35:52 ad Exp $ # from: @(#)Makefile 8.7 (Berkeley) 5/25/95 # Environment variables without default values: @@ -90,11 +90,11 @@ BINGRP= wheel UTMPGRP= utmp BIN1+= audit-packages.conf bootptab changelist csh.cshrc csh.login \ csh.logout daily daily.conf dm.conf envsys.conf floppytab ftpchroot \ - ftpusers gettytab group hosts hosts.lpd inetd.conf lkm.conf \ + ftpusers gettytab group hosts hosts.lpd inetd.conf \ locate.conf login.conf mailer.conf man.conf monthly monthly.conf \ mrouted.conf named.conf netconfig networks newsyslog.conf \ nsswitch.conf ntp.conf passwd.conf phones printcap profile protocols \ - rbootd.conf rc rc.conf rc.lkm rc.local rc.subr rc.shutdown remote rpc \ + rbootd.conf rc rc.conf rc.local rc.subr rc.shutdown remote rpc \ security security.conf services shells shrc sysctl.conf syslog.conf \ weekly weekly.conf wscons.conf diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 77d3e2259db..682c334ffa4 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -1,4 +1,4 @@ -# $NetBSD: rc.conf,v 1.95 2008/07/27 19:31:03 joerg Exp $ +# $NetBSD: rc.conf,v 1.96 2008/11/12 12:35:52 ad Exp $ # # /etc/defaults/rc.conf -- # default configuration of /etc/rc.conf @@ -98,9 +98,6 @@ cgd=YES # One-time actions and programs on boot-up. # -lkm=NO # Run /etc/rc.lkm. /usr needs to be part of /, or - # part of critical_filesystems_local. - savecore=YES savecore_flags="-z" savecore_dir="/var/crash" per_user_tmp=NO # per-user /tmp directories diff --git a/etc/lkm.conf b/etc/lkm.conf deleted file mode 100644 index 5bfddcab402..00000000000 --- a/etc/lkm.conf +++ /dev/null @@ -1,6 +0,0 @@ -# $NetBSD: lkm.conf,v 1.2 1997/07/14 11:55:46 drochner Exp $ -# -# see lkm.conf(5) for details. path will look in /lkm and /usr/lkm. -# -# path options entry postinstall output when -#/lkm/if_ipl.o - - - - - diff --git a/etc/mtree/NetBSD.dist b/etc/mtree/NetBSD.dist index e7e700218ec..bddbb1e88fd 100644 --- a/etc/mtree/NetBSD.dist +++ b/etc/mtree/NetBSD.dist @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist,v 1.385 2008/10/30 21:45:55 christos Exp $ +# $NetBSD: NetBSD.dist,v 1.386 2008/11/12 12:35:52 ad Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -557,7 +557,6 @@ ./usr/libexec/ching ./usr/libexec/lpr ./usr/libexec/postfix -./usr/lkm ./usr/mdec ./usr/pkg ignore optional ./usr/sbin diff --git a/etc/mtree/special b/etc/mtree/special index 630f7064563..895bc4ad7cd 100644 --- a/etc/mtree/special +++ b/etc/mtree/special @@ -1,4 +1,4 @@ -# $NetBSD: special,v 1.121 2008/06/20 17:05:26 peter Exp $ +# $NetBSD: special,v 1.122 2008/11/12 12:35:52 ad Exp $ # @(#)special 8.2 (Berkeley) 1/23/94 # # This file may be overwritten on upgrades. @@ -92,7 +92,6 @@ ./etc/iscsi/auths type=file mode=0600 ./etc/iscsi/targets type=file mode=0644 ./etc/ld.so.conf type=file mode=0644 optional -./etc/lkm.conf type=file mode=0644 optional ./etc/localtime type=link mode=0755 ./etc/locate.conf type=file mode=0644 optional ./etc/login.conf type=file mode=0644 optional @@ -219,9 +218,6 @@ ./etc/rc.d/isdnd type=file mode=0555 ./etc/rc.d/kdc type=file mode=0555 ./etc/rc.d/ldconfig type=file mode=0555 -./etc/rc.d/lkm1 type=file mode=0555 -./etc/rc.d/lkm2 type=file mode=0555 -./etc/rc.d/lkm3 type=file mode=0555 ./etc/rc.d/local type=file mode=0555 ./etc/rc.d/lpd type=file mode=0555 ./etc/rc.d/mixerctl type=file mode=0555 @@ -289,7 +285,6 @@ ./etc/rc.d/ypbind type=file mode=0555 ./etc/rc.d/yppasswdd type=file mode=0555 ./etc/rc.d/ypserv type=file mode=0555 -./etc/rc.lkm type=file mode=0644 ./etc/rc.local type=file mode=0644 optional ./etc/rc.shutdown type=file mode=0644 ./etc/rc.shutdown.local type=file mode=0644 optional diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index c4768f8e24c..6025f9332f2 100755 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.68 2008/06/18 09:06:26 yamt Exp $ +# $NetBSD: Makefile,v 1.69 2008/11/12 12:35:52 ad Exp $ .include <bsd.own.mk> @@ -18,7 +18,7 @@ CONFIGFILES=\ identd ifwatchd inetd ipfilter ipfs ipmon ipnat ipsec \ irdaattach iscsi_target isdnd \ kdc \ - ldconfig lkm1 lkm2 lkm3 local lpd \ + ldconfig local lpd \ mixerctl mopd motd mountall mountcritlocal mountcritremote \ mountd moused mrouted \ named ndbootd network newsyslog nfsd nfslocking ntpd ntpdate \ diff --git a/etc/rc.d/hostapd b/etc/rc.d/hostapd index c78a234241e..d5bdb69d146 100755 --- a/etc/rc.d/hostapd +++ b/etc/rc.d/hostapd @@ -1,10 +1,10 @@ #!/bin/sh # -# $NetBSD: hostapd,v 1.3 2006/06/02 01:06:16 rpaulo Exp $ +# $NetBSD: hostapd,v 1.4 2008/11/12 12:35:52 ad Exp $ # # PROVIDE: hostapd -# REQUIRE: mountcritremote beforemountlkm +# REQUIRE: mountcritremote $_rc_subr_loaded . /etc/rc.subr diff --git a/etc/rc.d/ipfilter b/etc/rc.d/ipfilter index 7194ecd9158..4fc208c57e0 100755 --- a/etc/rc.d/ipfilter +++ b/etc/rc.d/ipfilter @@ -1,10 +1,10 @@ #!/bin/sh # -# $NetBSD: ipfilter,v 1.15 2007/04/06 14:20:17 apb Exp $ +# $NetBSD: ipfilter,v 1.16 2008/11/12 12:35:52 ad Exp $ # # PROVIDE: ipfilter -# REQUIRE: root beforenetlkm mountcritlocal tty +# REQUIRE: root mountcritlocal tty $_rc_subr_loaded . /etc/rc.subr diff --git a/etc/rc.d/ipsec b/etc/rc.d/ipsec index e6406a7f1e1..0b357810630 100755 --- a/etc/rc.d/ipsec +++ b/etc/rc.d/ipsec @@ -1,14 +1,12 @@ #!/bin/sh # -# $NetBSD: ipsec,v 1.9 2007/04/06 14:20:17 apb Exp $ +# $NetBSD: ipsec,v 1.10 2008/11/12 12:35:52 ad Exp $ # # PROVIDE: ipsec -# REQUIRE: root beforenetlkm mountcritlocal tty +# REQUIRE: root mountcritlocal tty # BEFORE: DAEMON -# it does not really require beforenetlkm. - $_rc_subr_loaded . /etc/rc.subr name="ipsec" diff --git a/etc/rc.d/iscsi_target b/etc/rc.d/iscsi_target index ca47e5e28ad..3aff046464f 100755 --- a/etc/rc.d/iscsi_target +++ b/etc/rc.d/iscsi_target @@ -1,10 +1,10 @@ #!/bin/sh # -# $NetBSD: iscsi_target,v 1.1 2006/02/08 19:02:59 agc Exp $ +# $NetBSD: iscsi_target,v 1.2 2008/11/12 12:35:52 ad Exp $ # # PROVIDE: iscsi_target -# REQUIRE: NETWORKING mountall beforemountlkm quota +# REQUIRE: NETWORKING mountall quota $_rc_subr_loaded . /etc/rc.subr diff --git a/etc/rc.d/lkm1 b/etc/rc.d/lkm1 deleted file mode 100755 index 07ce8117fcf..00000000000 --- a/etc/rc.d/lkm1 +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# -# $NetBSD: lkm1,v 1.8 2004/08/13 18:08:03 mycroft Exp $ -# - -# PROVIDE: beforenetlkm -# REQUIRE: root bootconf - -$_rc_subr_loaded . /etc/rc.subr - -name="lkm1" -rcvar="lkm" -start_cmd="lkm1_start" -stop_cmd="lkm1_stop" - -lkm1_start() -{ -# load kernel modules specified in /etc/lkm.conf if the /usr -# filesystem is already present with "/" or can be mounted now -# - if [ -f /etc/rc.lkm ]; then - mount /usr >/dev/null 2>&1 - if [ -x /usr/bin/ld ]; then - lkmstage=BEFORENET - set start ; . /etc/rc.lkm - fi - fi - - /etc/rc.d/sysdb devdb -} - -lkm1_stop() -{ - if [ -f /etc/rc.lkm ] && [ -x /usr/bin/ld ]; then - lkmstage=BEFORENET - set stop ; . /etc/rc.lkm - fi -} - -load_rc_config lkm -run_rc_command "$1" diff --git a/etc/rc.d/lkm2 b/etc/rc.d/lkm2 deleted file mode 100755 index c42db7f7bf7..00000000000 --- a/etc/rc.d/lkm2 +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# -# $NetBSD: lkm2,v 1.6 2004/08/13 18:08:03 mycroft Exp $ -# - -# PROVIDE: beforemountlkm -# REQUIRE: syslogd - -$_rc_subr_loaded . /etc/rc.subr - -name="lkm2" -rcvar="lkm" -start_cmd="lkm2_start" -stop_cmd="lkm2_stop" - -# load kernel modules specified in /etc/lkm.conf -# -lkm2_start() -{ - if [ -r /etc/rc.lkm ]; then - lkmstage=BEFOREMOUNT - set start ; . /etc/rc.lkm - else - warn "/etc/rc.lkm not found; LKMs not loaded." - fi - - /etc/rc.d/sysdb devdb -} - -lkm2_stop() -{ - if [ -r /etc/rc.lkm ]; then - lkmstage=BEFOREMOUNT - set stop ; . /etc/rc.lkm - fi -} - -load_rc_config lkm -run_rc_command "$1" diff --git a/etc/rc.d/lkm3 b/etc/rc.d/lkm3 deleted file mode 100755 index d8b21d53104..00000000000 --- a/etc/rc.d/lkm3 +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# $NetBSD: lkm3,v 1.8 2004/08/13 18:08:03 mycroft Exp $ -# - -# PROVIDE: aftermountlkm -# REQUIRE: mountall -# BEFORE: DAEMON - -$_rc_subr_loaded . /etc/rc.subr - -name="lkm3" -rcvar="lkm" -start_cmd="do_lkm3 start" -stop_cmd="do_lkm3 stop" - -do_lkm3() -{ - # (un)load kernel modules specified in /etc/lkm.conf - # - if [ -f /etc/rc.lkm ]; then - lkmstage=AFTERMOUNT - set $1 ; . /etc/rc.lkm - fi - - /etc/rc.d/sysdb devdb -} - -load_rc_config lkm -run_rc_command "$1" diff --git a/etc/rc.d/mountall b/etc/rc.d/mountall index 44375630d93..209ee62cfc9 100755 --- a/etc/rc.d/mountall +++ b/etc/rc.d/mountall @@ -1,10 +1,9 @@ #!/bin/sh # -# $NetBSD: mountall,v 1.4 2004/08/13 18:08:03 mycroft Exp $ +# $NetBSD: mountall,v 1.5 2008/11/12 12:35:52 ad Exp $ # # PROVIDE: mountall -# REQUIRE: beforemountlkm $_rc_subr_loaded . /etc/rc.subr diff --git a/etc/rc.d/mountd b/etc/rc.d/mountd index b40cbb89afd..05d27e10744 100755 --- a/etc/rc.d/mountd +++ b/etc/rc.d/mountd @@ -1,10 +1,10 @@ #!/bin/sh # -# $NetBSD: mountd,v 1.12 2004/08/13 18:08:03 mycroft Exp $ +# $NetBSD: mountd,v 1.13 2008/11/12 12:35:52 ad Exp $ # # PROVIDE: mountd -# REQUIRE: NETWORKING mountall beforemountlkm rpcbind quota +# REQUIRE: NETWORKING mountall rpcbind quota $_rc_subr_loaded . /etc/rc.subr diff --git a/etc/rc.d/pf b/etc/rc.d/pf index 87382dd8f4e..70d8cd44631 100644 --- a/etc/rc.d/pf +++ b/etc/rc.d/pf @@ -1,10 +1,10 @@ #!/bin/sh # -# $NetBSD: pf,v 1.7 2007/04/06 14:20:18 apb Exp $ +# $NetBSD: pf,v 1.8 2008/11/12 12:35:52 ad Exp $ # # PROVIDE: pf -# REQUIRE: root beforenetlkm mountcritlocal tty network dhclient +# REQUIRE: root mountcritlocal tty network dhclient # BEFORE: NETWORKING $_rc_subr_loaded . /etc/rc.subr diff --git a/etc/rc.d/pf_boot b/etc/rc.d/pf_boot index c22ae690dbb..bc1a58ea94d 100755 --- a/etc/rc.d/pf_boot +++ b/etc/rc.d/pf_boot @@ -1,10 +1,10 @@ #!/bin/sh # -# $NetBSD: pf_boot,v 1.2 2007/04/06 14:20:19 apb Exp $ +# $NetBSD: pf_boot,v 1.3 2008/11/12 12:35:52 ad Exp $ # # PROVIDE: pf_boot -# REQUIRE: root beforenetlkm mountcritlocal tty +# REQUIRE: root mountcritlocal tty # BEFORE: network $_rc_subr_loaded . /etc/rc.subr diff --git a/etc/rc.d/securelevel b/etc/rc.d/securelevel index 0e1c8a606c5..84288640dd5 100755 --- a/etc/rc.d/securelevel +++ b/etc/rc.d/securelevel @@ -1,10 +1,10 @@ #!/bin/sh # -# $NetBSD: securelevel,v 1.6 2004/10/11 15:00:51 christos Exp $ +# $NetBSD: securelevel,v 1.7 2008/11/12 12:35:52 ad Exp $ # # PROVIDE: securelevel -# REQUIRE: aftermountlkm ipnat mountd +# REQUIRE: ipnat mountd # BEFORE: DAEMON $_rc_subr_loaded . /etc/rc.subr diff --git a/etc/rc.lkm b/etc/rc.lkm deleted file mode 100644 index 6c54fa0d49d..00000000000 --- a/etc/rc.lkm +++ /dev/null @@ -1,106 +0,0 @@ -# $NetBSD: rc.lkm,v 1.9 2005/03/04 21:11:23 cube Exp $ -# -# this script loads or unloads LKMs (loadable kernel modules). - -if [ -s /etc/lkm.conf ]; then - case "$1" in - start) - (while read path options entry postinstall output when; do - flags='' - - case $path in - \#*|"") - continue - ;; - /*) - ;; - *) - if [ -f "/lkm/$path" ]; then - path="/lkm/$path" - elif [ -f "/usr/lkm/$path" ]; then - path="/usr/lkm/$path" - else - echo "couldn't find module $path" - fi - ;; - esac - - case $options in - -) - ;; - *) - flags="$flags $options" - ;; - esac - - case $entry in - -) - ;; - *) - flags="$flags -e $entry" - ;; - esac - - case $postinstall in - -) - ;; - *) - flags="$flags -p $postinstall" - ;; - esac - - case $output in - -) - ;; - *) - if [ "$output" = TEMP ]; then - flags="$flags -o /tmp/lkm.$$" - else - flags="$flags -o $output" - fi - ;; - esac - - case $when in - -) - when=BEFORENET - ;; - [A-Z]*) - ;; - *) - echo "invalid \"when\" field \`${when}' in /etc/lkm.conf - $path not loaded!" - continue - ;; - esac - - if [ "$when" != "$lkmstage" ]; then - continue - fi - - echo -n "${path##*/}: " - modload $flags $path - rm -f /tmp/lkm.$$ - done) < /etc/lkm.conf - ;; - stop) - (while read path options entry postinstall output when; do - case $path in - \#*|"") - continue - ;; - /*) - name=${path##*/} - name=${name%.o} - ;; - *) - name=${path%.o} - ;; - esac - - if [ "$when" = "$lkmstage" ]; then - modunload -n ${name} - fi - done) < /etc/lkm.conf - ;; - esac -fi diff --git a/regress/include/okheaders/symbolcheck.c b/regress/include/okheaders/symbolcheck.c index d7e109c9f93..ee85322d0ca 100644 --- a/regress/include/okheaders/symbolcheck.c +++ b/regress/include/okheaders/symbolcheck.c @@ -73,7 +73,6 @@ #include <sys/ksem.h> #include <sys/ksyms.h> #include <sys/ktrace.h> -#include <sys/lkm.h> #include <sys/localedef.h> #include <sys/lock.h> #include <sys/lockf.h> diff --git a/rescue/list b/rescue/list index 2a3e6d74891..b6f0aec07bf 100644 --- a/rescue/list +++ b/rescue/list @@ -1,4 +1,4 @@ -# $NetBSD: list,v 1.33 2008/10/29 23:55:28 christos Exp $ +# $NetBSD: list,v 1.34 2008/11/12 12:35:53 ad Exp $ SRCDIRS bin @@ -65,6 +65,7 @@ PROG lmcconfig PROG mbrlabel PROG mknod PROG modload +PROG modstat PROG modunload PROG mount PROG mount_ados diff --git a/sbin/Makefile b/sbin/Makefile index bd3c67e1638..dad28ca819d 100644 --- a/sbin/Makefile +++ b/sbin/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.112 2008/07/27 19:31:03 joerg Exp $ +# $NetBSD: Makefile,v 1.113 2008/11/12 12:35:53 ad Exp $ # @(#)Makefile 8.5 (Berkeley) 3/31/94 # Not ported: XNSrouted enpload scsiformat startslip @@ -9,15 +9,11 @@ SUBDIR= amrctl apmlabel atactl badsect bioctl brconfig ccdconfig \ disklabel dkctl dkscan_bsdlabel dmesg \ drvctl edlabel fastboot fdisk fsck fsirand gpt ifconfig init ldconfig \ - mbrlabel mknod modload modunload mount newbtconf nologin \ + mbrlabel mknod modload modstat modunload mount newbtconf nologin \ pdisk ping pppoectl raidctl reboot rcorder rndctl route routed \ savecore scan_ffs scsictl shutdown slattach svhlabel swapctl sysctl \ ttyflags umount veriexecctl wdogctl wsconsctl -.if ${MKMODULAR} != "no" -SUBDIR+= modstat -.endif - # support for various file systems SUBDIR+= newfs_ext2fs fsck_ext2fs SUBDIR+= newfs fsck_ffs fsdb dump restore clri tunefs diff --git a/sbin/modload/Makefile b/sbin/modload/Makefile index 8808046e442..9899683d84a 100644 --- a/sbin/modload/Makefile +++ b/sbin/modload/Makefile @@ -1,27 +1,10 @@ -# $NetBSD: Makefile,v 1.13 2008/03/02 11:20:59 jmmv Exp $ +# $NetBSD: Makefile,v 1.14 2008/11/12 12:35:53 ad Exp $ .include <bsd.own.mk> -.if ${MKMODULAR} != "no" # new module framework - PROG= modload SRCS= main.c MAN= modload.8 LDADD= -lprop -.else # LKMS - -PROG= modload -SRCS= modload.c -MAN= modload.8 - -.if (${OBJECT_FMT} == "ELF") -SRCS+= elf.c -.else -SRCS+= a.out.c -CFLAGS+=-DUSE_AOUT -.endif - -.endif - .include <bsd.prog.mk> diff --git a/sbin/modload/a.out.c b/sbin/modload/a.out.c deleted file mode 100644 index f99d4be5b46..00000000000 --- a/sbin/modload/a.out.c +++ /dev/null @@ -1,244 +0,0 @@ -/* $NetBSD: a.out.c,v 1.6 2005/02/06 06:17:36 perry Exp $ */ - -/* - * Copyright (c) 1993 Terrence R. Lambert. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Terrence R. Lambert. - * 4. The name Terrence R. Lambert may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__RCSID("$NetBSD: a.out.c,v 1.6 2005/02/06 06:17:36 perry Exp $"); - -#include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/lkm.h> - -#include <a.out.h> -#include <err.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <fcntl.h> - -#include "modload.h" - -/* - * Expected linker options: - * - * -A executable to link against - * -e entry point - * -o output file - * -T address to link to in hex (assumes it's a page boundry) - * <target> object file - */ - -#define LINKCMD "ld -A %s -e _%s -o %s -T %p %s" - -void -a_out_linkcmd(char **cmdp, - const char *kernel, - const char *entry, - const char *outfile, - const void *address, - const char *object, - const char *ldscript) /* XXX ignored on a.out */ -{ - asprintf(cmdp, LINKCMD, kernel, entry, outfile, address, object); -} - -static int -a_out_read_header(int fd, struct exec *info_buf) -{ - ssize_t n; - - n = read(fd, info_buf, sizeof(*info_buf)); - if (n < 0) - err(1, "failed reading %lu bytes", (u_long)sizeof(*info_buf)); - if (n != sizeof(*info_buf)) { - if (debug) - fprintf(stderr, "failed to read %lu bytes", - (u_long)sizeof(*info_buf)); - return -1; - } - - /* - * Magic number... - */ - if (N_BADMAG(*info_buf)) - errx(4, "not an a.out format file"); - return 0; -} - -int -a_out_mod_sizes(int fd, - size_t *modsize, - int *strtablen, - struct lmc_resrv *resrvp, - struct stat * sp) -{ - struct exec info_buf; - - if (a_out_read_header(fd, &info_buf) < 0) - return -1; - - /* - * Calculate the size of the module - */ - *modsize = info_buf.a_text + info_buf.a_data + info_buf.a_bss; - - *strtablen = sp->st_size - N_STROFF(info_buf); - - if (symtab) { - /* - * XXX TODO: grovel through symbol table looking for - * just the symbol table stuff from the new module, - * and skip the stuff from the kernel. - */ - resrvp->sym_size = info_buf.a_syms + *strtablen; - resrvp->sym_symsize = info_buf.a_syms; - } else - resrvp->sym_size = resrvp->sym_symsize = 0; - - return (0); -} - -void * -a_out_mod_load(int fd) -{ - struct exec info_buf; - size_t b; - ssize_t n; - char buf[10 * BUFSIZ]; - - /* - * Get the load module post load size... do this by reading the - * header and doing page counts. - */ - if (a_out_read_header(fd, &info_buf) < 0) - return NULL; - - /* - * Seek to the text offset to start loading... - */ - if (lseek(fd, N_TXTOFF(info_buf), 0) == -1) - err(12, "lseek"); - - /* - * Transfer the relinked module to kernel memory in chunks of - * MODIOBUF size at a time. - */ - b = info_buf.a_text + info_buf.a_data; - while (b) { - n = read(fd, buf, MIN(b, sizeof(buf))); - if (n < 0) - err(1, "while reading from prelinked module"); - if (n == 0) - errx(1, "EOF while reading from prelinked module"); - - loadbuf(buf, n); - b -= n; - } - return (void *)info_buf.a_entry; -} - -void -a_out_mod_symload(int strtablen) -{ - struct exec info_buf; - struct lmc_loadbuf ldbuf; - struct nlist *nlp; - char buf[10 * BUFSIZ]; - char *symbuf; - int bytesleft, sz; - int numsyms; /* XXX unused? */ - - if (a_out_read_header(modfd, &info_buf) < 0) - return; - - /* - * Seek to the symbol table to start loading it... - */ - if (lseek(modfd, N_SYMOFF(info_buf), SEEK_SET) == -1) - err(12, "lseek"); - - /* - * Transfer the symbol table entries. First, read them all in, - * then adjust their string table pointers, then - * copy in bulk. Then copy the string table itself. - */ - - symbuf = malloc(info_buf.a_syms); - if (symbuf == 0) - err(13, "malloc"); - - if (read(modfd, symbuf, info_buf.a_syms) != info_buf.a_syms) - err(14, "read"); - numsyms = info_buf.a_syms / sizeof(struct nlist); - - for (nlp = (struct nlist *)symbuf; - (char *)nlp < symbuf + info_buf.a_syms; nlp++) { - int strx; - - strx = nlp->n_un.n_strx; - if (strx != 0) { - /* - * If a valid name, set the name ptr to point at the - * loaded address for the string in the string table. - */ - if (strx > strtablen) - nlp->n_un.n_name = 0; - else - nlp->n_un.n_name = (char *)(strx + - resrv.sym_addr + info_buf.a_syms); - } - } - /* - * we've fixed the symbol table entries, now load them - */ - for (bytesleft = info_buf.a_syms; bytesleft > 0; bytesleft -= sz) { - sz = MIN(bytesleft, MODIOBUF); - ldbuf.cnt = sz; - ldbuf.data = symbuf; - if (ioctl(devfd, LMLOADSYMS, &ldbuf) == -1) - err(11, "error transferring sym buffer"); - symbuf += sz; - } - - free(symbuf - info_buf.a_syms); - /* and now read the string table and load it. */ - for (bytesleft = strtablen; bytesleft > 0; bytesleft -= sz) { - sz = MIN(bytesleft, MODIOBUF); - read(modfd, buf, sz); - ldbuf.cnt = sz; - ldbuf.data = buf; - if (ioctl(devfd, LMLOADSYMS, &ldbuf) == -1) - err(11, "error transferring stringtable buffer"); - } -} diff --git a/sbin/modload/elf.c b/sbin/modload/elf.c deleted file mode 100644 index 565cf7b84e4..00000000000 --- a/sbin/modload/elf.c +++ /dev/null @@ -1,509 +0,0 @@ -/* $NetBSD: elf.c,v 1.19 2006/07/08 05:49:01 ross Exp $ */ - -/* - * Copyright (c) 1998 Johan Danielsson <joda@pdc.kth.se> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__RCSID("$NetBSD: elf.c,v 1.19 2006/07/08 05:49:01 ross Exp $"); - -#include <sys/param.h> - -#if defined(__alpha__) || defined(__arch64__) || defined(__x86_64__) -#ifndef _LP64 -#error Temporary sanity check failed. Tell ross@netbsd.org -#endif -#endif - -#ifdef _LP64 -#define ELFSIZE 64 -#else -#define ELFSIZE 32 -#endif -#include <sys/exec_elf.h> -#ifndef ELF_HDR_SIZE -#define ELF_HDR_SIZE sizeof(Elf_Ehdr) -#endif -#include <sys/lkm.h> - -#include <err.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <fcntl.h> - -#include "modload.h" - -char *strtab; - -static void -read_section_header(int fd, Elf_Ehdr *ehdr, int num, Elf_Shdr *shdr) -{ - - if (lseek(fd, ehdr->e_shoff + num * ehdr->e_shentsize, SEEK_SET) < 0) - err(1, "lseek"); - if (read(fd, shdr, sizeof(*shdr)) != sizeof(*shdr)) - err(1, "read"); -} - -struct elf_section { - char *name; /* name of section; points into string table */ - unsigned long type; /* type of section */ - void *addr; /* load address of section */ - off_t offset; /* offset in file */ - size_t size; /* size of section */ - size_t align; - struct elf_section *next; -}; - -/* adds the section `s' at the correct (sorted by address) place in - the list pointed to by head; *head may be NULL */ -static void -add_section(struct elf_section **head, struct elf_section *s) -{ - struct elf_section *p, **q; - q = head; - p = *head; - - while (1) { - if (p == NULL || p->addr > s->addr) { - s->next = p; - *q = s; - return; - } - q = &p->next; - p = p->next; - } -} - -/* make a linked list of all sections containing ALLOCatable data */ -static void -read_sections(int fd, Elf_Ehdr *ehdr, char *shstrtab, struct elf_section **head) -{ - int i; - Elf_Shdr shdr; - *head = NULL; - /* scan through section headers */ - for (i = 0; i < ehdr->e_shnum; i++) { - struct elf_section *s; - read_section_header(fd, ehdr, i, &shdr); - if (shdr.sh_size == 0) - continue; - if (((shdr.sh_flags & SHF_ALLOC) == 0) - && (shdr.sh_type != SHT_STRTAB) - && (shdr.sh_type != SHT_SYMTAB) - && (shdr.sh_type != SHT_DYNSYM)) { - /* skip non-ALLOC sections */ - continue; - } - s = malloc(sizeof(*s)); - if (s == NULL) - errx(1, "failed to allocate %lu bytes", (u_long)sizeof(*s)); - s->name = shstrtab + shdr.sh_name; - s->type = shdr.sh_type; - s->addr = (void *)shdr.sh_addr; - s->offset = shdr.sh_offset; - s->size = shdr.sh_size; - s->align = shdr.sh_addralign; - add_section(head, s); - } -} - -/* get the symbol table sections and free the rest of them */ -static void -get_symtab(struct elf_section **symtb) -{ - struct elf_section *head, *cur, *prev; - - head = NULL; - prev = NULL; - cur = *symtb; - while (cur) { - if ((cur->type == SHT_SYMTAB) || (cur->type == SHT_DYNSYM)) { - if (head == NULL) { - head = cur; - } - if (prev != NULL) { - prev->next = cur; - } - prev = cur; - cur = cur->next; - } else { - struct elf_section *p = cur; - cur = cur->next; - p->next = NULL; - free(p); - } - } - if (prev) { - prev->next = NULL; - } - *symtb = head; -} - -/* free a list of section headers */ -static void -free_sections(struct elf_section *head) -{ - - while (head) { - struct elf_section *p = head; - head = head->next; - free(p); - } -} - -/* read section header's string table */ -static char * -read_shstring_table(int fd, Elf_Ehdr *ehdr) -{ - Elf_Shdr shdr; - char *shstrtab; - read_section_header(fd, ehdr, ehdr->e_shstrndx, &shdr); - shstrtab = malloc(shdr.sh_size); - if (shstrtab == NULL) - errx(1, "failed to allocate %lu bytes", (u_long)shdr.sh_size); - if (lseek(fd, shdr.sh_offset, SEEK_SET) < 0) - err(1, "lseek"); - if (read(fd, shstrtab, shdr.sh_size) != shdr.sh_size) - err(1, "read"); - return shstrtab; -} - -/* read string table */ -static char * -read_string_table(int fd, struct elf_section *head, int *strtablen) -{ - char *string_table=NULL; - - while (head) { - if ((strcmp(head->name, ".strtab") == 0 ) - && (head->type == SHT_STRTAB)) { - string_table = malloc(head->size); - if (string_table == NULL) - errx(1, "failed to allocate %lu bytes", - (u_long)head->size); - if (lseek(fd, head->offset, SEEK_SET) < 0) - err(1, "lseek"); - if (read(fd, string_table, head->size) != head->size) - err(1, "read"); - *strtablen = head->size; - break; - } else { - head = head->next; - } - } - return string_table; -} - -static int -read_elf_header(int fd, Elf_Ehdr *ehdr) -{ - ssize_t n; - - n = read(fd, ehdr, sizeof(*ehdr)); - if (n < 0) - err(1, "failed reading %lu bytes", (u_long)sizeof(*ehdr)); - if (n != sizeof(*ehdr)) { - if (debug) - warnx("failed to read %lu bytes", (u_long)sizeof(*ehdr)); - return -1; - } - if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0 || - ehdr->e_ident[EI_CLASS] != ELFCLASS) - errx(4, "not in ELF%u format", ELFSIZE); - if (ehdr->e_ehsize != ELF_HDR_SIZE) - errx(4, "file has ELF%u identity, but wrong header size", - ELFSIZE); - - return 0; -} - -/* offset of data segment; this is horrible, but keeps the size of the - module to a minimum */ -static ssize_t data_offset; - -/* return size needed by the module */ -int -elf_mod_sizes(int fd, - size_t *modsize, - int *strtablen, - struct lmc_resrv *resrvp, - struct stat *sp) -{ - Elf_Ehdr ehdr; - ssize_t off = 0; - size_t data_hole = 0; - char *shstrtab, *strtb; - struct elf_section *head, *s; - - if (read_elf_header(fd, &ehdr) < 0) - return -1; - shstrtab = read_shstring_table(fd, &ehdr); - read_sections(fd, &ehdr, shstrtab, &head); - - for (s = head; s; s = s->next) { - if ((s->type == SHT_STRTAB) && (s->type == SHT_SYMTAB) - && (s->type == SHT_DYNSYM)) { - continue; - } - if (debug) - fprintf(stderr, - "%s: addr = %p size = %#lx align = %#lx\n", - s->name, s->addr, (u_long)s->size, (u_long)s->align); - /* XXX try to get rid of the hole before the data - section that GNU-ld likes to put there */ - if (strcmp(s->name, ".data") == 0 && s->addr > (void *)off) { -#define ROUND(V, S) (((V) + (S) - 1) & ~((S) - 1)) - data_offset = ROUND(off, s->align); - if (debug) - fprintf(stderr, ".data section forced to " - "offset %p (was %p)\n", - (void *)data_offset, - s->addr); - /* later remove size of compressed hole from off */ - data_hole = (ssize_t)s->addr - data_offset; - } - off = (ssize_t)s->addr + s->size; - } - off -= data_hole; - - /* XXX round to pagesize? */ - *modsize = ROUND(off, sysconf(_SC_PAGESIZE)); - free(shstrtab); - - /* get string table length */ - strtb = read_string_table(fd, head, strtablen); - free(strtb); - - /* get symbol table sections */ - resrvp->sym_symsize = 0; - if (symtab) { - struct elf_section *st; - - get_symtab(&head); - for(st = head; st; st = st->next) - resrvp->sym_symsize += st->size; - resrvp->sym_size = resrvp->sym_symsize + *strtablen; - } else - resrvp->sym_size = 0; - free_sections(head); - - return (0); -} - -/* - * Expected linker options: - * - * -R executable to link against - * -e entry point - * -o output file - * -Ttext address to link text segment to in hex (assumes it's - * a page boundary) - * -Tdata address to link data segment to in hex - * <target> object file - * -T ldscript linker script (on some archs) - */ - -#define LINKCMD "ld -R %s -e %s -o %s -Ttext %p %s" -#define LINKCMD2 "ld -R %s -e %s -o %s -Ttext %p -Tdata %p %s" -#define LINKSCRIPTCMD "ld -T %s -R %s -e %s -o %s -Ttext %p %s" -#define LINKSCRIPTCMD2 "ld -T %s -R %s -e %s -o %s -Ttext %p -Tdata %p %s" - -/* make a link command; XXX if data_offset above is non-zero, force - data address to be at start of text + offset */ -void -elf_linkcmd(char **cmdp, - const char *kernel, - const char *entry, - const char *outfile, - const void *address, - const char *object, - const char *ldscript) -{ - if (ldscript == NULL) { - if (data_offset == 0) - asprintf(cmdp, LINKCMD, kernel, entry, - outfile, address, object); - else - asprintf(cmdp, LINKCMD2, kernel, entry, - outfile, address, - (const char *)address + data_offset, - object); - } else { - if (data_offset == 0) - asprintf(cmdp, LINKSCRIPTCMD, ldscript, kernel, - entry, outfile, address, object); - else - asprintf(cmdp, LINKSCRIPTCMD2, ldscript, kernel, - entry, outfile, address, - (const char *)address + data_offset, - object); - } - - if (cmdp == NULL) - err(1, "malloc"); -} - -/* load a pre-linked module; returns entry point */ -void * -elf_mod_load(int fd) -{ - Elf_Ehdr ehdr; - size_t zero_size = 0; - size_t b; - ssize_t n; - char *shstrtab; - struct elf_section *head, *s; - char buf[10 * BUFSIZ]; - void *addr = NULL; - - if (read_elf_header(fd, &ehdr) < 0) - return NULL; - - shstrtab = read_shstring_table(fd, &ehdr); - read_sections(fd, &ehdr, shstrtab, &head); - - for (s = head; s; s = s->next) { - if ((s->type != SHT_STRTAB) && (s->type != SHT_SYMTAB) - && (s->type != SHT_DYNSYM)) { - if (debug) - fprintf(stderr, "loading `%s': addr = %p, " - "size = %#lx\n", - s->name, s->addr, (u_long)s->size); - if (s->type == SHT_NOBITS) { - /* skip some space */ - zero_size += s->size; - } else { - if (addr != NULL) { - /* if there is a gap in the prelinked - module, transfer some empty - space... */ - zero_size += (char *)s->addr - - (char *)addr; - } - if (zero_size) { - loadspace(zero_size); - zero_size = 0; - } - b = s->size; - if (lseek(fd, s->offset, SEEK_SET) == -1) - err(1, "lseek"); - while (b) { - n = read(fd, buf, MIN(b, sizeof(buf))); - if (n == 0) - errx(1, "unexpected EOF"); - if (n < 0) - err(1, "read"); - loadbuf(buf, n); - b -= n; - } - addr = (char *)s->addr + s->size; - } - } - } - if (zero_size) - loadspace(zero_size); - - free_sections(head); - free(shstrtab); - return (void *)ehdr.e_entry; -} - -void -elf_mod_symload(int strtablen) -{ - Elf_Ehdr ehdr; - char *shstrtab; - struct elf_section *head, *s; - char *symbuf, *strbuf; - - /* - * Seek to the text offset to start loading... - */ - if (lseek(modfd, 0, SEEK_SET) == -1) - err(12, "lseek"); - if (read_elf_header(modfd, &ehdr) < 0) - return; - - shstrtab = read_shstring_table(modfd, &ehdr); - read_sections(modfd, &ehdr, shstrtab, &head); - - for (s = head; s; s = s->next) { - struct elf_section *p = s; - - if ((p->type == SHT_SYMTAB) || (p->type == SHT_DYNSYM)) { - if (debug) - fprintf(stderr, "loading `%s': addr = %p, " - "size = %#lx\n", - s->name, s->addr, (u_long)s->size); - /* - * Seek to the file offset to start loading it... - */ - if (lseek(modfd, p->offset, SEEK_SET) == -1) - err(12, "lseek"); - symbuf = malloc(p->size); - if (symbuf == 0) - err(13, "malloc"); - if (read(modfd, symbuf, p->size) != p->size) - err(14, "read"); - - loadsym(symbuf, p->size); - free(symbuf); - } - } - - for (s = head; s; s = s->next) { - struct elf_section *p = s; - - if ((p->type == SHT_STRTAB) - && (strcmp(p->name, ".strtab") == 0 )) { - if (debug) - fprintf(stderr, "loading `%s': addr = %p, " - "size = %#lx\n", - s->name, s->addr, (u_long)s->size); - /* - * Seek to the file offset to start loading it... - */ - if (lseek(modfd, p->offset, SEEK_SET) == -1) - err(12, "lseek"); - strbuf = malloc(p->size); - if (strbuf == 0) - err(13, "malloc"); - if (read(modfd, strbuf, p->size) != p->size) - err(14, "read"); - - loadsym(strbuf, p->size); - free(strbuf); - } - } - - free(shstrtab); - free_sections(head); - return; -} diff --git a/sbin/modload/main.c b/sbin/modload/main.c index c058dbca78a..35cad41da0f 100644 --- a/sbin/modload/main.c +++ b/sbin/modload/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.3 2008/04/28 20:23:09 martin Exp $ */ +/* $NetBSD: main.c,v 1.4 2008/11/12 12:35:53 ad Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: main.c,v 1.3 2008/04/28 20:23:09 martin Exp $"); +__RCSID("$NetBSD: main.c,v 1.4 2008/11/12 12:35:53 ad Exp $"); #endif /* !lint */ #include <sys/module.h> @@ -45,13 +45,14 @@ __RCSID("$NetBSD: main.c,v 1.3 2008/04/28 20:23:09 martin Exp $"); int main(int, char **); static void parse_bool_param(prop_dictionary_t, const char *, - const char *); + const char *); static void parse_int_param(prop_dictionary_t, const char *, - const char *); + const char *); static void parse_param(prop_dictionary_t, const char *, - void (*)(prop_dictionary_t, const char *, const char *)); + void (*)(prop_dictionary_t, const char *, + const char *)); static void parse_string_param(prop_dictionary_t, const char *, - const char *); + const char *); static void usage(void) __dead; int @@ -114,10 +115,9 @@ main(int argc, char **argv) exit(EXIT_SUCCESS); } -static -void +static void parse_bool_param(prop_dictionary_t props, const char *name, - const char *value) + const char *value) { bool boolvalue; @@ -138,10 +138,9 @@ parse_bool_param(prop_dictionary_t props, const char *name, prop_dictionary_set(props, name, prop_bool_create(boolvalue)); } -static -void +static void parse_int_param(prop_dictionary_t props, const char *name, - const char *value) + const char *value) { int64_t intvalue; @@ -155,10 +154,9 @@ parse_int_param(prop_dictionary_t props, const char *name, prop_number_create_integer(intvalue)); } -static -void +static void parse_param(prop_dictionary_t props, const char *origstr, - void (*fmt_handler)(prop_dictionary_t, const char *, const char *)) + void (*fmt_handler)(prop_dictionary_t, const char *, const char *)) { char *name, *value; @@ -176,10 +174,9 @@ parse_param(prop_dictionary_t props, const char *origstr, free(name); } -static -void +static void parse_string_param(prop_dictionary_t props, const char *name, - const char *value) + const char *value) { assert(name != NULL); diff --git a/sbin/modload/modload.8 b/sbin/modload/modload.8 index 1ed860b642c..5ae71fbf3a2 100644 --- a/sbin/modload/modload.8 +++ b/sbin/modload/modload.8 @@ -1,4 +1,4 @@ -.\" $NetBSD: modload.8,v 1.26 2006/03/24 00:38:23 reed Exp $ +.\" $NetBSD: modload.8,v 1.27 2008/11/12 12:35:53 ad Exp $ .\" .\" Copyright (c) 1993 Christopher G. Demetriou .\" All rights reserved. @@ -32,7 +32,7 @@ .\" .\" <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>> .\" -.Dd March 23, 2006 +.Dd November 12, 2008 .Dt MODLOAD 8 .Os .Sh NAME @@ -40,100 +40,58 @@ .Nd load a kernel module .Sh SYNOPSIS .Nm -.Op Fl dfnsSv -.Op Fl A Ar kernel -.Op Fl e Ar entry -.Op Fl p Ar postinstall -.Op Fl o Ar output_file -.Op Fl T Ar linker_script -.Ar input_file +.Op Fl b Ar name=val +.Op Fl f +.Op Fl i Ar name=val +.Op Fl s Ar name=val +.Ar module .Sh DESCRIPTION The .Nm -utility loads a loadable kernel module into a running system. -The input file is an object file (.o file). +utility loads a kernel module specified by the +.Ar module +paramamter into the running system. +.Pp +The current working directory is first searched for the module object file. +If not found there, the default system module areas are searched. .Pp The options to .Nm are as follows: .Bl -tag -width indent -.It Fl d -Debug. -Used to debug -.Nm -itself. +.It Fl b +Pass the module a boolean property with the name +.Ar name . +.Ar val +may be either +.Dv true +or +.Dv false. +.It Fl i +Pass the module an integer property with the name +.Ar name +and integral value +.Ar val . .It Fl f -This forces load of the module, even if it doesn't match the -currently running kernel. -When LKM is loaded, the kernel normally checks if the LKM is -compatible with the running kernel. -This option disables this check. -.Em Note -an incompatible LKM can cause system instability, including data +When a module is loaded, the kernel checks if the module is compatible +with the running kernel and will refuse to load modules that are +potentially incompatible. +This option disables compatibility checks. +.Em Note : +an incompatible module can cause system instability, including data loss or corruption. -Don't use this option unless you are sure what you are doing. -.It Fl n -Do everything, except calling the module entry point (and any -post-install program). -.It Fl v -Print comments about the loading process. .It Fl s -Load the symbol table. -.It Fl S -Do not remove the temporary object file. -By default, the -.Xr ld 1 -output is removed after being loaded into the kernel. -.It Fl A Ar kernel -Specify the file that is passed to the linker -to resolve module references to external symbols. -The symbol file must be for the currently running -kernel or the module is likely to crash the system. -.It Fl e Ar entry -Specify the module entry point. -This is passed by -.Nm -to -.Xr ld 1 -when the module is linked. -The default module entry point name is `xxxinit'. -If `xxxinit' cannot be found, an attempt to -use `\*[Lt]module_name\*[Gt]_lkmentry' will be made, where -\*[Lt]module_name\*[Gt] is the filename being loaded without the `.o'. -.It Fl p Ar postinstall -Specify the name of a shell script or program that will -be executed if the module is successfully loaded. -It is always passed the module id (in decimal) and module -type (in hexadecimal) as the first two arguments. -For loadable drivers, the third argument is the character major device number -and the fourth argument is the block major device number. -For a loadable system call, the third argument is the system call number. -.It Fl o Ar output_file -Specify the name of the output file that is produced by the linker. -.It Fl T Ar linker_script -Specify the name of the linker script use to link against the kernel. -.El -.Sh FILES -.Bl -tag -width /usr/include/sys/lkm.h -compact -.It Pa /netbsd -default file passed to the linker to resolve external -references in the module -.It Pa /usr/include/sys/lkm.h -file containing definitions of module types -.\" .It Pa output file. -.\" default output file name +Pass the module a string property with the name +.Ar name +and string value +.Ar val . .El .Sh DIAGNOSTICS The .Nm utility exits with a status of 0 on success and with a nonzero status if an error occurs. -.Pp -Mismatched LKM and kernel versions will be reported to the console -and to the system message buffer. .Sh SEE ALSO -.Xr ld 1 , -.Xr lkm 4 , .Xr modstat 8 , .Xr modunload 8 .Sh HISTORY @@ -142,11 +100,3 @@ The command was designed to be similar in functionality to the corresponding command in .Tn "SunOS 4.1.3" . -.Sh AUTHORS -.An Terrence R. Lambert -.Aq terry@cs.weber.edu . -.Sh BUGS -Loading the symbol table is expensive in terms of space: -it presently duplicates all the kernel symbols for each lkm loaded -with -.Fl s . diff --git a/sbin/modload/modload.c b/sbin/modload/modload.c deleted file mode 100644 index b51a932c291..00000000000 --- a/sbin/modload/modload.c +++ /dev/null @@ -1,528 +0,0 @@ -/* $NetBSD: modload.c,v 1.51 2005/06/27 01:00:05 christos Exp $ */ - -/* - * Copyright (c) 1993 Terrence R. Lambert. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Terrence R. Lambert. - * 4. The name Terrence R. Lambert may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -#ifndef lint -__RCSID("$NetBSD: modload.c,v 1.51 2005/06/27 01:00:05 christos Exp $"); -#endif /* not lint */ - -#include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/lkm.h> -#include <sys/stat.h> -#include <sys/file.h> -#include <sys/sysctl.h> -#include <machine/cpu.h> -#include <err.h> -#include <errno.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <nlist.h> -#include "pathnames.h" - -#include "modload.h" - -#ifndef DFLT_ENTRY -#define DFLT_ENTRY "xxxinit" -#endif /* !DFLT_ENTRY */ -#ifndef DFLT_ENTRYEXT -#define DFLT_ENTRYEXT "_lkmentry" -#endif /* !DFLT_ENTRYEXT */ - -int debug = 0; -int verbose = 0; -u_long force = 0; -char *out = NULL; -int symtab = 0; -int Sflag; - -static void cleanup(void); - -/* prelink the module */ -static int -prelink(const char *kernel, - const char *entry, - const char *outfile, - const void *address, - const char *object, - const char *ldscript) -{ - char *cmd; - int error = 0; - - linkcmd(&cmd, kernel, entry, outfile, address, - object, ldscript); - - if (debug) - fprintf(stderr, "%s\n", cmd); - - switch (system(cmd)) { - case 0: /* SUCCESS! */ - break; - case 1: /* uninformative error */ - /* - * Someone needs to fix the return values from the NetBSD - * ld program -- it's totally uninformative. - * - * No such file (4 on SunOS) - * Can't write output (2 on SunOS) - * Undefined symbol (1 on SunOS) - * etc. - */ - case 127: /* can't load shell */ - case 32512: - default: - error = 1; - break; - } - - free(cmd); - - return error; -} - -static void -usage(void) -{ - - fprintf(stderr, "usage:\n"); - fprintf(stderr, "modload [-dfnsSv] " - "[-A <kernel>] [-e <entry>] [-p <postinstall>]\n"); - fprintf(stderr, - " [-o <output file>] [-T <linker_script>] <input file>\n"); - exit(1); -} - -int fileopen = 0; -#define DEV_OPEN 0x01 -#define MOD_OPEN 0x02 -#define PART_RESRV 0x04 -#define OUTFILE_CREAT 0x08 - -int devfd, modfd; -struct lmc_resrv resrv; - -static void -cleanup(void) -{ - - if (fileopen & PART_RESRV) { - /* - * Free up kernel memory - */ - if (ioctl(devfd, LMUNRESRV, 0) == -1) - warn("can't release slot 0x%08x memory", resrv.slot); - } - - if (fileopen & DEV_OPEN) - close(devfd); - - if (fileopen & MOD_OPEN) - close(modfd); - - if (fileopen & OUTFILE_CREAT) - unlink(out); -} - -static int -verify_entry(const char *entry, char *filename) -{ - struct nlist names[2]; - int n; - char *s; - - memset(names, 0, sizeof(names)); - asprintf(&s, "_%s", entry); - if (!s) - err(1, "malloc"); -#ifdef _AOUT_INCLUDE_ - names[0].n_un.n_name = s; -#else - names[0].n_name = s; -#endif - - n = nlist(filename, names); - if (n == -1) - err(1, "nlist %s", filename); - return n; -} - -/* - * Transfer data to kernel memory in chunks - * of MODIOBUF size at a time. - */ -void -loadbuf(void *buf, size_t len) -{ - struct lmc_loadbuf ldbuf; - size_t n; - char *p = buf; - - while(len) { - n = MIN(len, MODIOBUF); - ldbuf.cnt = n; - ldbuf.data = p; - if (ioctl(devfd, LMLOADBUF, &ldbuf) == -1) - err(11, "error loading buffer"); - len -= n; - p += n; - } -} - -/* Transfer some empty space. */ -void -loadspace(size_t len) -{ - char buf[MODIOBUF]; - size_t n; - memset(buf, 0, sizeof(buf)); - while(len) { - n = MIN(len, sizeof(buf)); - loadbuf(buf, n); - len -= n; - } -} - -/* - * Transfer symbol table to kernel memory in chunks - * of MODIOBUF size at a time. - */ -void -loadsym(void *buf, size_t len) -{ - struct lmc_loadbuf ldbuf; - size_t n; - char *p = buf; - - while(len) { - n = MIN(len, MODIOBUF); - ldbuf.cnt = n; - ldbuf.data = p; - if(ioctl(devfd, LMLOADSYMS, &ldbuf) == -1) - err(11, "error loading buffer"); - len -= n; - p += n; - } -} - -int -main(int argc, char **argv) -{ - int c; - const char *kname = NULL; - const char *entry = DFLT_ENTRY; - char *post = NULL; - const char *ldscript = NULL; - char *modobj; - char modout[MAXPATHLEN], *p; - struct stat stb; - int strtablen; - size_t modsize; /* XXX */ - void *modentry; /* XXX */ - int noready = 0; - - while ((c = getopt(argc, argv, "dfnvse:p:o:A:ST:")) != -1) { - switch (c) { - case 'd': - debug = 1; - break; /* debug */ - case 'f': - force = 1; - break; /* force load */ - case 'v': - verbose = 1; - break; /* verbose */ - case 'A': - kname = optarg; - break; /* kernel */ - case 'e': - entry = optarg; - break; /* entry point */ - case 'p': - post = optarg; - break; /* postinstall */ - case 'o': - out = optarg; - break; /* output file */ - case 'T': - ldscript = optarg; - break; /* linker script */ - case 'n': - noready = 1; - break; - case 's': - symtab = 1; - break; - case 'S': - Sflag = 1; - break; - case '?': - usage(); - /* NOTREACHED */ - default: - printf("default!\n"); - break; - } - } - argc -= optind; - argv += optind; - - if (argc != 1) - usage(); - - modobj = argv[0]; - - atexit(cleanup); - - if (ldscript == NULL && access(_PATH_LDSCRIPT, R_OK) == 0) - ldscript = _PATH_LDSCRIPT; - - /* - * Open the virtual device device driver for exclusive use (needed - * to write the new module to it as our means of getting it in the - * kernel). - */ - if ((devfd = open(_PATH_LKM, O_RDWR, 0)) == -1) - err(3, _PATH_LKM); - fileopen |= DEV_OPEN; - - if (strlcpy(modout, modobj, sizeof(modout)) >= sizeof(modout)) - errx(1, "program name is too big for buffer"); - - p = strrchr(modout, '.'); - if (!p || strcmp(p, ".o")) - errx(2, "module object must end in .o"); - *p = '\0'; - if (out == NULL) - out = modout; - - /* - * Verify that the entry point for the module exists. - */ - if (verify_entry(entry, modobj)) { - /* - * Try <modobj>_init if entry is DFLT_ENTRY. - */ - if (strcmp(entry, DFLT_ENTRY) == 0) { - char *nentry; - if ((p = strrchr(modout, '/'))) - p++; - else - p = modout; - asprintf(&nentry, "%s%s", p, DFLT_ENTRYEXT); - if (!nentry) - err(1, "malloc"); - entry = nentry; - if (verify_entry(entry, modobj)) - errx(1, "entry point _%s not found in %s", - entry, modobj); - } else - errx(1, "entry point _%s not found in %s", entry, - modobj); - } - - /* - * Check if /dev/ksyms can be used. - */ - if (kname == NULL) { - int fd = open(_PATH_KSYMS, O_RDONLY); - if (fd < 0) { - warn("%s", _PATH_KSYMS); - } else { - close(fd); - kname = _PATH_KSYMS; - } - } - - /* - * Determine name of kernel to use - */ - if (kname == NULL) { -#ifdef CPU_BOOTED_KERNEL - /* 130 is 128 + '/' + '\0' */ - static char booted_kernel[130]; - int mib[2], rc; - size_t len; - struct stat st; - - mib[0] = CTL_MACHDEP; - mib[1] = CPU_BOOTED_KERNEL; - booted_kernel[0] = '/'; - booted_kernel[1] = '\0'; - len = sizeof(booted_kernel) - 2; - rc = sysctl(&mib[0], 2, &booted_kernel[1], &len, NULL, 0); - booted_kernel[sizeof(booted_kernel) - 1] = '\0'; - kname = (booted_kernel[1] == '/') ? - &booted_kernel[1] : &booted_kernel[0]; - if (rc != -1) - rc = stat(kname, &st); - if (rc == -1 || !S_ISREG(st.st_mode)) -#endif /* CPU_BOOTED_KERNEL */ - kname = _PATH_UNIX; - } - /* - * Prelink to get file size - */ - if (prelink(kname, entry, out, 0, modobj, ldscript)) - errx(1, "can't prelink `%s' creating `%s'", modobj, out); - if (Sflag == 0) - fileopen |= OUTFILE_CREAT; - - /* - * Pre-open the 0-linked module to get the size information - */ - if ((modfd = open(out, O_RDONLY, 0)) == -1) - err(4, "%s", out); - fileopen |= MOD_OPEN; - - /* - * stat for filesize to figure out string table size - */ - if (fstat(modfd, &stb) == -1) - err(3, "fstat `%s'", out); - - /* - * work out various sizes and fill in resrv bits - */ - if (mod_sizes(modfd, &modsize, &strtablen, &resrv, &stb) != 0) - err(1, "can't get module sizes"); - - /* - * Close the dummy module -- we have our sizing information. - */ - close(modfd); - fileopen &= ~MOD_OPEN; - - /* - * Reserve the required amount of kernel memory -- this may fail - * to be successful. - */ - resrv.size = modsize; /* size in bytes */ - resrv.name = modout; /* objname w/o ".o" */ - resrv.slot = -1; /* returned */ - resrv.addr = 0; /* returned */ - - if (verbose) - warnx("reserving %lu bytes of memory", (unsigned long)modsize); - if (ioctl(devfd, LMRESERV, &resrv) == -1) - err(9, "can't reserve memory"); - - fileopen |= PART_RESRV; - - if (force) { - if (ioctl(devfd, LMFORCE, &force) == -1) - err(10, "can't force load"); - - warnx("Forced load of LKM '%s'. MAY CAUSE SYSTEM INSTABILITY.", - modout); - } - - /* - * Relink at kernel load address - */ - if (prelink(kname, entry, out, (void *)resrv.addr, modobj, ldscript)) - errx(1, "can't link `%s' creating `%s' bound to %p", - modobj, out, (void *)resrv.addr); - - /* - * Open the relinked module to load it... - */ - if ((modfd = open(out, O_RDONLY, 0)) == -1) - err(4, "%s", out); - fileopen |= MOD_OPEN; - - modentry = mod_load(modfd); - if (debug) - fprintf(stderr, "modentry = %p\n", modentry); - - if (symtab) - mod_symload(strtablen); - - /* - * Save ourselves before disaster (potentitally) strikes... - */ - sync(); - - if (noready) - return 0; - - /* - * Trigger the module as loaded by calling the entry procedure; - * this will do all necessary table fixup to ensure that state - * is maintained on success, or blow everything back to ground - * zero on failure. - */ - if (ioctl(devfd, LMREADY, &modentry) == -1) - err(14, "error initializing module"); - - /* - * Success! - */ - fileopen &= ~PART_RESRV; /* loaded */ - printf("Module loaded as ID %d\n", resrv.slot); - - /* - * Execute the post-install program, if specified. - */ - if (post) { - struct lmc_stat sbuf; - char id[16], type[16]; - - sbuf.id = resrv.slot; - if (ioctl(devfd, LMSTAT, &sbuf) == -1) - err(15, "error fetching module stats for post-install"); - (void)snprintf(id, sizeof(id), "%d", sbuf.id); - (void)snprintf(type, sizeof(type), "0x%x", sbuf.type); - if (sbuf.type == LM_DEV) { - char arg3[16], arg4[16]; - int bmajor = LKM_BLOCK_MAJOR(sbuf.offset); - int cmajor = LKM_CHAR_MAJOR(sbuf.offset); - (void)snprintf(arg3, sizeof(arg3), "%d", cmajor); - (void)snprintf(arg4, sizeof(arg4), "%d", bmajor); - execl(post, post, id, type, arg3, arg4, NULL); - } else { - char arg3[16]; - (void)snprintf(arg3, sizeof(arg3), "%ld", - (long)sbuf.offset); - execl(post, post, id, type, arg3, NULL); - } - err(16, "can't exec `%s'", post); - } - - exit (0); -} diff --git a/sbin/modload/modload.h b/sbin/modload/modload.h deleted file mode 100644 index f9056ce1546..00000000000 --- a/sbin/modload/modload.h +++ /dev/null @@ -1,74 +0,0 @@ -/* $NetBSD: modload.h,v 1.6 2004/02/11 18:42:37 jdolecek Exp $ */ - -/* - * Copyright (c) 1993 Terrence R. Lambert. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Terrence R. Lambert. - * 4. The name Terrence R. Lambert may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef __modload_h__ -#define __modload_h__ - -int elf_mod_sizes(int, size_t *, int *, struct lmc_resrv *, struct stat *); -void *elf_mod_load(int); -void elf_linkcmd(char **, const char *, const char *, const char *, - const void *, const char *, const char *); -void elf_mod_symload(int); - -int a_out_mod_sizes(int, size_t *, int *, struct lmc_resrv *, - struct stat *); -void *a_out_mod_load(int); -void a_out_linkcmd(char **, const char *, const char *, const char *, - const void *, const char *, const char *); -void a_out_mod_symload(int); - -#ifndef USE_AOUT -#define mod_sizes elf_mod_sizes -#define mod_load elf_mod_load -#define mod_symload elf_mod_symload -#define linkcmd elf_linkcmd -#else -#define mod_sizes a_out_mod_sizes -#define mod_load a_out_mod_load -#define mod_symload a_out_mod_symload -#define linkcmd a_out_linkcmd -#endif - -void loadbuf(void *, size_t); -void loadspace(size_t); -void loadsym(void *, size_t); - -extern int debug; -extern int devfd; -extern int modfd; -extern int symtab; -extern int verbose; -extern struct lmc_resrv resrv; - -#endif /* __modload_h__ */ diff --git a/sbin/modload/pathnames.h b/sbin/modload/pathnames.h deleted file mode 100644 index bac00c6461c..00000000000 --- a/sbin/modload/pathnames.h +++ /dev/null @@ -1,6 +0,0 @@ -/* $NetBSD: pathnames.h,v 1.3 2002/10/10 01:57:10 simonb Exp $ */ - -#include <paths.h> - -#define _PATH_LKM "/dev/lkm" -#define _PATH_LDSCRIPT "/usr/lkm/ldscript" diff --git a/sbin/modstat/modstat.8 b/sbin/modstat/modstat.8 index 422f672ff9e..fb1cd15859a 100644 --- a/sbin/modstat/modstat.8 +++ b/sbin/modstat/modstat.8 @@ -1,4 +1,4 @@ -.\" $NetBSD: modstat.8,v 1.1 2008/01/16 12:34:57 ad Exp $ +.\" $NetBSD: modstat.8,v 1.2 2008/11/12 12:35:53 ad Exp $ .\" .\" Copyright (c) 1993 Christopher G. Demetriou .\" All rights reserved. @@ -32,7 +32,7 @@ .\" .\" <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>> .\" -.Dd January 16, 2008 +.Dd November 12, 2008 .Dt MODSTAT 8 .Os .Sh NAME diff --git a/sbin/modunload/Makefile b/sbin/modunload/Makefile index d396a848ff4..d1479bb316b 100644 --- a/sbin/modunload/Makefile +++ b/sbin/modunload/Makefile @@ -1,52 +1,7 @@ -# $NetBSD: Makefile,v 1.12 2008/02/10 08:21:25 jmmv Exp $ -# -# Makefile for modunload -# -# 25 May 93 Terry Lambert Original -# -# Copyright (c) 1993 Terrence R. Lambert. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed by Terrence R. Lambert. -# 4. The name Terrence R. Lambert may not be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. - -.include <bsd.own.mk> - -.if ${MKMODULAR} != "no" # new module framework, remove copyright ^^ +# $NetBSD: Makefile,v 1.13 2008/11/12 12:35:53 ad Exp $ PROG= modunload SRCS= main.c MAN= modunload.8 -.else # LKMS - -PROG= modunload -MAN= modunload.8 - -.endif - .include <bsd.prog.mk> diff --git a/sbin/modunload/modunload.8 b/sbin/modunload/modunload.8 index 8250dcd7382..e66bc8105e4 100644 --- a/sbin/modunload/modunload.8 +++ b/sbin/modunload/modunload.8 @@ -1,4 +1,4 @@ -.\" $NetBSD: modunload.8,v 1.15 2003/09/06 20:12:41 wiz Exp $ +.\" $NetBSD: modunload.8,v 1.16 2008/11/12 12:35:53 ad Exp $ .\" .\" Copyright (c) 1993 Christopher G. Demetriou .\" All rights reserved. @@ -32,7 +32,7 @@ .\" .\" <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>> .\" -.Dd September 6, 2003 +.Dd November 12, 2008 .Dt MODUNLOAD 8 .Os .Sh NAME @@ -40,41 +40,21 @@ .Nd unload a kernel module .Sh SYNOPSIS .Nm -.Op Fl i Ar id -.Op Fl n Ar name -.Nm -.Op Ar id Ns \&| Ns Ar name +.Ar name .Sh DESCRIPTION The .Nm utility unloads a loadable kernel module from a running system. -The -.Ar id -or +.Pp .Ar name -is the ID or name of the module as shown by +is name of the module to be unloaded, as shown by .Xr modstat 8 . -.Pp -One of the following options may be specified: -.Bl -tag -width indent -.It Fl i Ar id -Unload the module with the ID -.Ar id . -.It Fl n Ar name -Unload the module with the name -.Ar name . -.El -.Pp -If the option is not specified, the provided argument -is used as module ID if it's numeric. -If the argument is not numeric, it's used as module name. .Sh DIAGNOSTICS The .Nm utility exits with a status of 0 on success and with a nonzero status if an error occurs. .Sh SEE ALSO -.Xr lkm 4 , .Xr modload 8 , .Xr modstat 8 .Sh HISTORY @@ -83,8 +63,3 @@ The command was designed to be similar in functionality to the corresponding command in .Tn "SunOS 4.1.3" . -.Sh AUTHORS -.Bl -tag -.An Terrence R. Lambert -.Aq terry@cs.weber.edu . -.El diff --git a/sbin/modunload/modunload.c b/sbin/modunload/modunload.c deleted file mode 100644 index 48064884896..00000000000 --- a/sbin/modunload/modunload.c +++ /dev/null @@ -1,157 +0,0 @@ -/* $NetBSD: modunload.c,v 1.13 2005/02/05 14:35:25 xtraeme Exp $ */ - -/* - * Copyright (c) 1993 Terrence R. Lambert. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Terrence R. Lambert. - * 4. The name Terrence R. Lambert may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -#ifndef lint -__RCSID("$NetBSD: modunload.c,v 1.13 2005/02/05 14:35:25 xtraeme Exp $"); -#endif /* not lint */ - -#include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <errno.h> -#include <stdio.h> -#include <stdlib.h> -#include <err.h> -#include <string.h> -#include <a.out.h> -#include <unistd.h> -#include "pathnames.h" - -void cleanup(void); -void usage(void); - -void -usage(void) -{ - - fprintf(stderr, "usage:\n"); - fprintf(stderr, "modunload [-i <module id>] [-n <module name>]\n"); - exit(1); -} - -int devfd; - -void -cleanup(void) -{ - - close(devfd); -} - -int -main(int argc, char *argv[]) -{ - int c; - int modnum = -1; - char *modname = NULL; - char *endptr; - struct lmc_unload ulbuf; - - while ((c = getopt(argc, argv, "i:n:")) != -1) { - switch (c) { - case 'i': - modnum = strtol(optarg, &endptr, 0); - if (*endptr != '\0') - errx(1, "not a valid number"); - break; /* number */ - case 'n': - modname = optarg; - break; /* name */ - case '?': - usage(); - default: - printf("default!\n"); - break; - } - } - argc -= optind; - argv += optind; - - /* - * If there is one argument remaining and neither -i nor -n - * was given, try to guess what it is - if it's number, - * take it as index of module to unload, otherwise take - * it as module name to unload. - */ - if (argc == 1 && (modnum == -1 && modname == NULL) - && strlen(argv[0]) > 0) { - long num; - - errno = 0; - num = strtol(argv[0], &endptr, 10); - - /* If valid number, use as index, otherwise as name */ - if (*endptr == '\0' && errno != ERANGE) - modnum = num; - else - modname = argv[0]; - argc = 0; - } - - if (argc != 0 || (modnum == -1 && modname == NULL)) - usage(); - - - /* - * Open the virtual device device driver for exclusive use (needed - * to ioctl() to retrive the loaded module(s) status). - */ - if ((devfd = open(_PATH_LKM, O_RDWR, 0)) == -1) - err(2, _PATH_LKM); - - atexit(cleanup); - - /* - * Unload the requested module. - */ - ulbuf.name = modname; - ulbuf.id = modnum; - - if (ioctl(devfd, LMUNLOAD, &ulbuf) == -1) { - switch (errno) { - case EINVAL: /* out of range */ - errx(3, "id out of range"); - case ENOENT: /* no such entry */ - errx(3, "no such module"); - default: /* other error (EFAULT, etc) */ - err(5, "LMUNLOAD"); - } - } - - return 0; -} diff --git a/sbin/modunload/pathnames.h b/sbin/modunload/pathnames.h deleted file mode 100644 index 96b86f1343d..00000000000 --- a/sbin/modunload/pathnames.h +++ /dev/null @@ -1,5 +0,0 @@ -/* $NetBSD: pathnames.h,v 1.2 1995/03/18 14:56:51 cgd Exp $ */ - -#include <paths.h> - -#define _PATH_LKM "/dev/lkm" diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 7ffba07460f..fa1f4c1b0bd 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.483 2008/11/02 23:47:41 jnemeth Exp $ +# $NetBSD: Makefile,v 1.484 2008/11/12 12:35:53 ad Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 acpidalb.4 \ @@ -30,7 +30,7 @@ MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 acpidalb.4 \ iso.4 isp.4 isv.4 itesio.4 iteide.4 iwi.4 iwn.4 ixpide.4 \ jme.4 jmide.4 joy.4 \ kloader.4 kse.4 ksyms.4 kttcp.4 \ - lc.4 ld.4 lii.4 lkm.4 lo.4 lxtphy.4 \ + lc.4 ld.4 lii.4 lo.4 lxtphy.4 \ mainbus.4 makphy.4 mbe.4 mca.4 mcclock.4 md.4 mfb.4 mfi.4 mhzc.4 \ midi.4 mii.4 mk48txx.4 mlx.4 mly.4 mpt.4 mpu.4 mtd.4 mtio.4 \ multicast.4 \ diff --git a/share/man/man4/ksyms.4 b/share/man/man4/ksyms.4 index 6754b285af1..7a4b15531f0 100644 --- a/share/man/man4/ksyms.4 +++ b/share/man/man4/ksyms.4 @@ -1,4 +1,4 @@ -.\" $NetBSD: ksyms.4,v 1.5 2008/04/30 13:10:54 martin Exp $ +.\" $NetBSD: ksyms.4,v 1.6 2008/11/12 12:35:53 ad Exp $ .\" .\" Copyright (c) 2003 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -24,7 +24,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 29, 2003 +.Dd November 12, 2008 .Dt KSYMS 4 .Os .Sh NAME @@ -121,7 +121,3 @@ The .Nm driver first appeared in .Nx 2.0 . -.Sh BUGS -No LKM modules can be loaded or unloaded while -.Pa /dev/ksyms -is open. diff --git a/share/man/man4/lkm.4 b/share/man/man4/lkm.4 deleted file mode 100644 index 03aaa1e2faa..00000000000 --- a/share/man/man4/lkm.4 +++ /dev/null @@ -1,171 +0,0 @@ -.\" $NetBSD: lkm.4,v 1.21 2004/11/09 12:09:58 wiz Exp $ -.\" -.\" Copyright (c) 1993 Christopher G. Demetriou -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed for the -.\" NetBSD Project. See http://www.NetBSD.org/ for -.\" information about NetBSD. -.\" 4. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.\" <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>> -.\" -.Dd September 4, 1993 -.Dt LKM 4 -.Os -.Sh NAME -.Nm lkm -.Nd Loadable Kernel Modules interface -.Sh SYNOPSIS -.Cd "options LKM" -.Sh DESCRIPTION -Loadable kernel modules allow the system administrator to -dynamically add and remove functionality from a running system. -This ability also helps software developers to develop -new parts of the kernel without constantly rebooting to -test their changes. -.Pp -Various types of modules can be loaded into the system. -There are several defined module types, listed below, which can -be added to the system in a predefined way. -In addition, there is a generic type, for which the module itself -handles loading and unloading. -.Pp -The -.Nm -interface is used by performing -.Xr ioctl 2 -calls on the -.Pa /dev/lkm -device. -Normally all operations involving -Loadable Kernel Modules are handled by the -.Xr modload 8 , -.Xr modunload 8 , -and -.Xr modstat 8 -programs. -Users should never have to interact with -.Pa /dev/lkm -directly. -.Sh MODULE TYPES -.Ss System Call modules -System calls may be replaced by loading -new ones via the -.Nm -interface. -All system calls may be replaced, but special care should be taken -with the -.Xr ioctl 2 -system call, as it is used to load and -unload modules. -.Pp -When a system call module is unloaded, -the system call which -was replaced by the loadable module -is returned to its rightful place -in the system call table by LKM code. -.Ss Virtual File System modules -Virtual file systems may be added via the -.Nm -interface. -.Ss Device Driver modules -New block and character device -drivers may be loaded into the system with -.Li "options LKM" . -A problem with loading a device driver is that the driver's device -nodes must exist for the devices to be accessed. -They are usually created by instructing -.Xr modload 8 -to run an appropriate program when the driver has been successfully loaded. -.Ss Emulation modules -Emulation modules allow to load an emulation support for foreign -operating systems. -.Ss Execution Interpreters -Execution Interpreters allow to load support for execution of new type -of binaries, not normally supported by kernel. -This also allows to load -support for executing foreign system binaries. -Execution Interpreters normally depend on -Emulation modules, in that appropriate Emulation module has to -be loaded before Execution Interpreter can be. -.Ss Miscellaneous modules -Miscellaneous modules are modules for which there are not currently -well-defined or well-used interfaces for extension. -They are provided for extension, and the user is expected to -write their own loader to handle the kernel pointer/table -manipulation to "wire in" their loaded module (and "unwire" -it on unload). -An example of a "miscellaneous module" might be a loader for -card-specific VGA drivers or alternate terminal emulations in -an appropriately layered console driver. -.Sh NOTES -.Ss Security considerations -Loaded kernel modules can do anything with kernel structures. -There is no memory protection between modules and the rest of the kernel. -Hence, a potential attacker controlling -.Pa /dev/lkm -can do anything they want with the system. -.Pp -To avoid associated security risks, new LKMs cannot be loaded when -.Pa securelevel -is higher than zero. -.Ss Module might crash system -Loading and using a buggy module is likely to crash operating system - -since the module becomes part of kernel, a code error is much more -fatal than for userland programs. -If you are doing kernel development, -this would hopefully end up happening -less frequently than changing, recompiling, installing, and -rebooting would normally occur. -This should speed development -considerably for a lot of the in-kernel work that is currently -taking place. -.Sh FILES -.Bl -tag -width /usr/include/sys/lkm.h -compact -.It Pa /dev/lkm -.Nm -interface device -.It Pa /usr/include/sys/lkm.h -file containing definitions of module types -.It Pa lkm/* -subdirectory -.Pa lkm -within kernel source tree contains many LKMs which are suitable as a base -for new ones -.El -.Sh SEE ALSO -.Xr modload 8 , -.Xr modstat 8 , -.Xr modunload 8 -.Sh HISTORY -The -.Nm -facility was designed to be similar in functionality -to the loadable kernel modules facility provided by -.Tn "SunOS 4.1.3" . -.Sh AUTHORS -.An Terrence R. Lambert -.Aq terry@cs.weber.edu diff --git a/share/man/man4/lmc.4 b/share/man/man4/lmc.4 index 96d9a48a578..2f980bc7710 100644 --- a/share/man/man4/lmc.4 +++ b/share/man/man4/lmc.4 @@ -53,7 +53,7 @@ .\" * PLEASE DO NOT "UN-IFDEF" THIS FILE! * .\" * * * * * * * * * * * * * * * * * * * * * .\" -.\" $NetBSD: lmc.4,v 1.14 2006/12/23 06:58:20 wiz Exp $ +.\" $NetBSD: lmc.4,v 1.15 2008/11/12 12:35:53 ad Exp $ .\" .Dd April 11, 2006 .Dt LMC 4 @@ -149,20 +149,6 @@ neither SPPP nor Netgraph are configured into the kernel. .if \n[allos] .Ss NetBSD & OpenBSD Synopsis .if (\n[nbsd] : \n[obsd]) \{\ This driver is built into the GENERIC kernel so it should "just work". -The driver can be loaded into a running kernel with -.Xr modload 8 . -.Bd -unfilled -offset indent -compact -.Ic modload if_lmc.o -.Ed -The kernel must be built with support for Loadable Kernel Modules, -.Xr lkm 8 . -.Bd -unfilled -offset indent -compact -.if \n[nbsd] .Cd options LKM -.if \n[obsd] .Cd option LKM -.Ed -.Ic securelevel -must be 0 to load modules; see -.Xr init 8 . .Pp The driver can be built into a kernel by adding the following to .Pa /sys/arch/ARCH/conf/YOURKERNEL : @@ -1300,8 +1286,6 @@ to the distant input signal. .if \n[nbsd] .Xr init 8 , .if \n[obsd] .Xr init 8 , .if \n[fbsd] .Xr kldload 8 , -.if \n[nbsd] .Xr lkm 8 , -.if \n[obsd] .Xr lkm 8 , .Xr lmcconfig 8 , .if \n[nbsd] .Xr modload 8 , .if \n[obsd] .Xr modload 8 , diff --git a/share/man/man4/options.4 b/share/man/man4/options.4 index 5fa4348a528..75b8d2df8dc 100644 --- a/share/man/man4/options.4 +++ b/share/man/man4/options.4 @@ -1,4 +1,4 @@ -.\" $NetBSD: options.4,v 1.370 2008/11/11 00:08:52 reed Exp $ +.\" $NetBSD: options.4,v 1.371 2008/11/12 12:35:53 ad Exp $ .\" .\" Copyright (c) 1996 .\" Perry E. Metzger. All rights reserved. @@ -30,7 +30,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" -.Dd September 11, 2008 +.Dd November 12, 2008 .Os .Dt OPTIONS 4 .Sh NAME @@ -1141,13 +1141,6 @@ Synonym of .El .Ss Miscellaneous Options .Bl -ohang -.It Cd options LKM -Enable loadable kernel modules. -See -.Xr lkm 4 -for details. -.Em NOTE : -not available on all architectures. .It Cd options MEMORY_DISK_DYNAMIC This option makes the .Xr md 4 @@ -1182,15 +1175,7 @@ Do not include the interface to a userland memory disk server process. Per default, this option is set to 1, including the support code. Useful for install media kernels. .It Cd options MODULAR -Enables the new framework for kernel modules, which will eventually -replace LKMs. -This adds an in-kernel linker and loader, and requires userland support -to be useful. -See the -.Sy MKMODULAR -variable in -.Xr mk.conf 5 -for more details. +Enables the framework for kernel modules. .It Cd options VND_COMPRESSION Enables the .Xr vnd 4 @@ -2807,7 +2792,6 @@ bolded .Xr ddb 4 , .Xr inet 4 , .Xr iso 4 , -.Xr lkm 4 , .Xr md 4 , .Xr ns 4 , .Xr pcibios 4 , diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile index 3fe1c54e67d..f1b35ca7bd2 100644 --- a/share/man/man5/Makefile +++ b/share/man/man5/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.60 2008/02/18 10:37:19 elad Exp $ +# $NetBSD: Makefile,v 1.61 2008/11/12 12:35:53 ad Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # missing: dump.5 plot.5 @@ -8,7 +8,7 @@ MAN= a.out.5 acct.5 ar.5 boot.cfg.5 \ ethers.5 forward.5 \ fs.5 fstab.5 genassym.cf.5 group.5 hesiod.conf.5 \ hosts.5 hosts.equiv.5 ifaliases.5 ifconfig.if.5 intro.5 \ - ipsec.conf.5 ld.so.conf.5 link.5 lkm.conf.5 locale.alias.5 \ + ipsec.conf.5 ld.so.conf.5 link.5 locale.alias.5 \ locate.conf.5 login.conf.5 mixerctl.conf.5 mk.conf.5 monthly.conf.5 \ motd.5 netconfig.5 netgroup.5 networks.5 nologin.5 \ nsswitch.conf.5 pam.conf.5 passwd.5 passwd.conf.5 phones.5 \ diff --git a/share/man/man5/lkm.conf.5 b/share/man/man5/lkm.conf.5 deleted file mode 100644 index 733ddb9b8e8..00000000000 --- a/share/man/man5/lkm.conf.5 +++ /dev/null @@ -1,115 +0,0 @@ -.\" $NetBSD: lkm.conf.5,v 1.8 2008/05/29 14:51:25 mrg Exp $ -.\" -.\" Copyright (c) 1996 Matthew R. Green -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.Dd November 8, 2000 -.Dt LKM.CONF 5 -.Os -.Sh NAME -.Nm lkm.conf -.Nd loadable kernel module configuration file -.Sh DESCRIPTION -The -.Nm -file specifies loadable kernel modules, see -.Xr lkm 4 , -that are to be loaded a boot time. -The -.Nm -file is processed by -.Pa /etc/rc.lkm -at system boot time, if it exists. -.Pp -Each line of the file is of the form -.Dl path options entry postinstall output when -.Pp -Except for the -.Em path , -all other fields can be "-" to indicate empty. -.Pp -The -.Em path -is either an absolute pathname, or the name of a file in -.Pa /lkm -or -.Pa /usr/lkm -that is the LKM to be loaded. -.Pp -The -.Em options -are some combination of the -d and -v options to -.Xr modload 8 . -.Pp -The -.Em entry -is the C symbol to call to initialize the module, defaulting to -.Fn xxxinit . -.Pp -The -.Em postinstall -script is run after the LKM is installed. -.Pp -The output of the -.Xr ld 1 -command is stored in -.Em output . -.Pp -The -.Em when -field specifies at which time in the startup process the LKM is loaded. -There are three predefined values which correspond to three points in -the processing of the system startup script -.Pa /etc/rc : -.Bl -tag -width XXX -.It BEFORENET -Before networking is started. This works only if the -.Pa /usr -file system can already be mounted at this time. -.It BEFOREMOUNT -Before all file systems listed in -.Pa /etc/fstab -are mounted (the -.Pa /usr -and -.Pa /var -file systems are already present). -.It AFTERMOUNT -After all file systems are mounted. -.El -.Pp -A "-" entry defaults to BEFORENET. -.Sh FILES -.Pa /etc/lkm.conf , -.Pa /etc/rc , -.Pa /etc/rc.d/lkm , -.Pa /etc/rc.lkm -.Sh SEE ALSO -.Xr lkm 4 , -.Xr modload 8 -.Sh HISTORY -The -.Nm -file appeared in -.Nx 1.3 . diff --git a/share/man/man5/mk.conf.5 b/share/man/man5/mk.conf.5 index 50b7fe9094b..59f570fc65b 100644 --- a/share/man/man5/mk.conf.5 +++ b/share/man/man5/mk.conf.5 @@ -1,4 +1,4 @@ -.\" $NetBSD: mk.conf.5,v 1.42 2008/11/09 23:02:29 mrg Exp $ +.\" $NetBSD: mk.conf.5,v 1.43 2008/11/12 12:35:53 ad Exp $ .\" .\" Copyright (c) 1999-2003 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 10, 2008 +.Dd November 12, 2008 .Dt MK.CONF 5 .Os .\" turn off hyphenation @@ -392,7 +392,7 @@ most of the compilation tools, will be built and installed. .YorN Indicates whether the .Xr ipf 4 -programs, headers and LKM will be built and installed. +programs, headers and other components will be built and installed. .DFLTy . .It Sy MKISCSI @@ -468,21 +468,6 @@ Indicates whether manual pages should be compressed with at installation time. .DFLTn . -.It Sy MKMODULAR -.YorN -Indicates whether support for the new kernel modules framework should be -built. -This will install new versions of -.Xr modload 8 , -.Xr modstat 8 -and -.Xr modunload 8 -that will not work with the ones used to manage LKMs. -You will also need a kernel built with -.Cd options MODULAR -for this to be useful. -.DFLTn -. .It Sy MKNLS .YorN Indicates whether Native Language System (NLS) locale zone files will be diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index d7e35b8cfe0..ca919732ad7 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -1,4 +1,4 @@ -.\" $NetBSD: rc.conf.5,v 1.121 2008/11/11 00:18:48 reed Exp $ +.\" $NetBSD: rc.conf.5,v 1.122 2008/11/12 12:35:53 ad Exp $ .\" .\" Copyright (c) 1996 Matthew R. Green .\" All rights reserved. @@ -309,12 +309,6 @@ from the output of .Xr dmesg 8 . Passes .Sy dmesg_flags . -.It Sy lkm -.Sq YES -or -.Sq NO . -Runs -.Pa /etc/rc.lkm . .It Sy mixerctl .Sq YES or diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index d5ce1f7c67b..3f57e4fc8ce 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -1,4 +1,4 @@ -.\" $NetBSD: hier.7,v 1.81 2008/05/22 12:51:43 lukem Exp $ +.\" $NetBSD: hier.7,v 1.82 2008/11/12 12:35:53 ad Exp $ .\" .\" Copyright (c) 1990, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -461,8 +461,6 @@ system daemons \*[Am] system utilities (executed by other programs) UUCP binaries and scripts (historically placed; to be moved) .El .Pp -.It Sy lkm/ -loadable kernel modules .It Sy mdec/ boot blocks, etc. .It Sy obj/ @@ -547,8 +545,6 @@ text files used by various games .It Sy i18n/ internationalization databases; see .Xr iconv 3 -.It Sy lkm/ -documentation on the loadable kernel modules interface .It Sy locale/ locale databases and gettext message catalogs; see .Xr setlocale 3 @@ -935,24 +931,6 @@ machine independent stand alone kernel library compression library .El .Pp -.It Sy lkm/ -loadable kernel modules -.Pp -.Bl -tag -width "gdbscripts/" -compact -.It Sy compat/ -LKM support compatibility modules; currently unsupported. -.It Sy netinet/ -LKM support networking modules -.Pp -.Bl -tag -width "if_ipl/" -compact -.It Sy if_ipl/ -LKM for IP-Filter -.El -.Pp -.It Sy vfs/ -LKM support for file systems. -.El -.Pp .It Sy miscfs/ miscellaneous file systems .Pp diff --git a/share/man/man7/sysctl.7 b/share/man/man7/sysctl.7 index c8971545ee1..b43f70a74c0 100644 --- a/share/man/man7/sysctl.7 +++ b/share/man/man7/sysctl.7 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysctl.7,v 1.16 2008/10/07 09:36:17 rmind Exp $ +.\" $NetBSD: sysctl.7,v 1.17 2008/11/12 12:35:53 ad Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -1999,7 +1999,7 @@ PCBs), and .It Li security.models .Nx supports pluggable security models. -Every security model used, whether if loaded as an LKM or built with the system, +Every security model used, whether if loaded as a module or built with the system, is required to add an entry to this node with at least one element, .Dq name , indicating the name of the security model. diff --git a/share/man/man8/MAKEDEV.8 b/share/man/man8/MAKEDEV.8 index 9878e557b98..f37b08bd9f8 100644 --- a/share/man/man8/MAKEDEV.8 +++ b/share/man/man8/MAKEDEV.8 @@ -6,7 +6,7 @@ .\" *** DO NOT EDIT - any changes will be lost!!! .\" *** ------------------------------------------------------------------ .\" -.\" $NetBSD: MAKEDEV.8,v 1.32 2008/09/06 19:22:26 jmcneill Exp $ +.\" $NetBSD: MAKEDEV.8,v 1.33 2008/11/12 12:35:53 ad Exp $ .\" .\" Copyright (c) 2001, 2003, 2007, 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -751,9 +751,6 @@ Joystick device, see . It Ar kttcp Kernel ttcp helper device, see .Xr \&kttcp 4 -. It Ar lkm -Loadable kernel modules interface, see -.Xr \&lkm 4 . It Ar lockstat Kernel locking statistics . It Ar magma# diff --git a/share/man/man8/compat_pecoff.8 b/share/man/man8/compat_pecoff.8 index 87673af64e6..c37e5a05375 100644 --- a/share/man/man8/compat_pecoff.8 +++ b/share/man/man8/compat_pecoff.8 @@ -1,4 +1,4 @@ -.\" $NetBSD: compat_pecoff.8,v 1.12 2005/06/20 13:25:25 peter Exp $ +.\" $NetBSD: compat_pecoff.8,v 1.13 2008/11/12 12:35:54 ad Exp $ .\" .\" Copyright (c) 2000 The PEACE Project. .\" All rights reserved. @@ -121,14 +121,7 @@ system call, just like other binary compatibility options. It is activated by enabling the .Dv COMPAT_PECOFF kernel option (see -.Xr options 4 ) , -or enabling -.Pa /usr/lkm/compat_pecoff.o -and -.Pa /usr/lkm/exec_pecoff.o -with -.Xr modload 8 . -.Pp +.Xr options 4 ) . The dynamic loader is the .Tn PE/COFF version of diff --git a/share/man/man9/accept_filter.9 b/share/man/man9/accept_filter.9 index 83b2bacd4a4..fe8a45c36af 100644 --- a/share/man/man9/accept_filter.9 +++ b/share/man/man9/accept_filter.9 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD: src/share/man/man9/accept_filter.9,v 1.13 2004/06/16 08:33:57 ru Exp $ .\" " -.Dd August 10, 2008 +.Dd November 12, 2008 .Os .Dt ACCEPT_FILTER 9 .Sh NAME @@ -39,7 +39,6 @@ .Fd #define ACCEPT_FILTER_MOD .In sys/param.h .In sys/kernel.h -.In sys/lkm.h .In sys/sysctl.h .In sys/signalvar.h .In sys/socketvar.h @@ -90,7 +89,7 @@ The accept filters currently provided with .Xr accf_http 9 ) are implemented as pseudo-devices, but an accept filter may use any supported means of initializing and registering itself at system startup -or later, including the LKM or module frameworks if they are supported +or later, including the module framework if supported by the running kernel. .Pp The fields of diff --git a/share/man/man9/ioctl.9 b/share/man/man9/ioctl.9 index 0c7ca5579aa..b35931ef564 100644 --- a/share/man/man9/ioctl.9 +++ b/share/man/man9/ioctl.9 @@ -1,4 +1,4 @@ -.\" $NetBSD: ioctl.9,v 1.25 2008/05/02 21:46:19 martin Exp $ +.\" $NetBSD: ioctl.9,v 1.26 2008/11/12 12:35:54 ad Exp $ .\" .\" Copyright (c) 1999 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -145,8 +145,6 @@ a (pseudo) interface ISA joystick interface .It 'k' Sun-compatible (and other) keyboards -.It 'K' -.Xr lkm 4 .It 'l' leo devices (atari) .It 'm' diff --git a/share/man/man9/kauth.9 b/share/man/man9/kauth.9 index 6adbf420a63..07a8a8b3977 100644 --- a/share/man/man9/kauth.9 +++ b/share/man/man9/kauth.9 @@ -1,4 +1,4 @@ -.\" $NetBSD: kauth.9,v 1.71 2008/09/23 22:40:46 pooka Exp $ +.\" $NetBSD: kauth.9,v 1.72 2008/11/12 12:35:54 ad Exp $ .\" .\" Copyright (c) 2005, 2006 Elad Efrat <elad@NetBSD.org> .\" All rights reserved. @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 24, 2008 +.Dd November 12, 2008 .Dt KAUTH 9 .Os .Sh NAME @@ -203,8 +203,8 @@ is allowed. .El .It Dv KAUTH_SYSTEM_FILEHANDLE Check if filehandle operations allowed. -.It Dv KAUTH_SYSTEM_LKM -Check if an LKM request is allowed. +.It Dv KAUTH_SYSTEM_MODULE +Check if a module request is allowed. .Pp .Ar arg1 is the command. diff --git a/share/man/man9/malloc.9 b/share/man/man9/malloc.9 index 73e4fcc1f52..b25520e06ed 100644 --- a/share/man/man9/malloc.9 +++ b/share/man/man9/malloc.9 @@ -1,4 +1,4 @@ -.\" $NetBSD: malloc.9,v 1.42 2008/04/30 13:10:58 martin Exp $ +.\" $NetBSD: malloc.9,v 1.43 2008/11/12 12:35:54 ad Exp $ .\" .\" Copyright (c) 1996, 2003 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd March 24, 2008 +.Dd November 12, 2008 .Dt MALLOC 9 .Os .Sh NAME @@ -279,18 +279,6 @@ The function attaches the malloc type .Fa type to the kernel memory allocator. -This is intended for use by LKMs; malloc types included in modules -statically-linked into the kernel are automatically registered with -the kernel memory allocator. -However, it is possible to define malloc types without automatically -registering them using -.Fn MALLOC_JUSTDEFINE -or -.Fn MALLOC_JUSTDEFINE_LIMIT . -Apart from not automatically registering to the kernel a boot time, -these functions are equivalent to their counterparts. -They can be used when a separate LKM codepath for initialization is -not desired. .Pp The .Fn malloc_type_detach diff --git a/share/man/man9/pci.9 b/share/man/man9/pci.9 index 5ac9b850cc1..925c4317cf7 100644 --- a/share/man/man9/pci.9 +++ b/share/man/man9/pci.9 @@ -1,4 +1,4 @@ -.\" $NetBSD: pci.9,v 1.26 2008/05/11 14:15:53 he Exp $ +.\" $NetBSD: pci.9,v 1.27 2008/11/12 12:35:54 ad Exp $ .\" .\" Copyright (c) 2001, 2003 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -284,8 +284,7 @@ The argument is filled in if the device is matched. .Fn pci_find_device returns 1 if the device is matched, and zero otherwise. -This function is specifically for use by LKMs (see -.Xr lkm 4 ) +This function is specifically for use by kernel modules and its use otherwise is strongly discouraged. .It Fn pci_get_capability "pc" "tag" "capid" "offsetp" "valuep" Parse the device capability list in configuration space looking for diff --git a/share/man/man9/secmodel.9 b/share/man/man9/secmodel.9 index 08373b83d22..2669b13f90c 100644 --- a/share/man/man9/secmodel.9 +++ b/share/man/man9/secmodel.9 @@ -1,4 +1,4 @@ -.\" $NetBSD: secmodel.9,v 1.12 2008/05/28 00:29:12 snj Exp $ +.\" $NetBSD: secmodel.9,v 1.13 2008/11/12 12:35:54 ad Exp $ .\" .\" Copyright (c) 2006 Elad Efrat <elad@NetBSD.org> .\" All rights reserved. @@ -77,8 +77,8 @@ It allows us to maintain the existing security model (based on a single superuser and above-superuser restrictions known as securelevel) but easily decouple it from the system, given we want to use a different one. .Pp -The different security model can be implemented in the kernel or loaded as an -LKM, base its decisions on available information, dispatch the decision to a +The different security model can be implemented in the kernel or loaded as a +module, base its decisions on available information, dispatch the decision to a userspace daemon, or even to a centralized network authorization server. .Ss The kauth(9) KPI Before writing a new security model, one should be familiar with the @@ -148,7 +148,7 @@ compiled in it, a function called .Fn secmodel_start can be added to call the model's start routine. .Pp -If the security model is to be built and used as an LKM, another function +If the security model is to be built and used as a module, another function called .Fn secmodel_\*[Lt]model\*[Gt]_stop , to stop the security model in case the module is to be unloaded. @@ -162,7 +162,7 @@ All "knobs" for the model should be located under the new node, as well as a mandatory "name" variable, indicating a descriptive human-readable name for the model. .Pp -If the module is to be used as an LKM, explicit calls to the setup +If the module is to be used as a module, explicit calls to the setup routine and .Fn sysctl_teardown are to be used to create and destroy the @@ -182,7 +182,7 @@ the model intends to implement. .It Finally, a security model should register itself when loaded using .Fn secmodel_register -and deregister it when unloaded (if used as an LKM) using +and deregister it when unloaded (if used as a module) using .Fn secmodel_deregister . .El .Pp diff --git a/share/man/man9/sysctl.9 b/share/man/man9/sysctl.9 index cded4f19fb0..95d9a94ed63 100644 --- a/share/man/man9/sysctl.9 +++ b/share/man/man9/sysctl.9 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysctl.9,v 1.12 2008/08/15 21:10:14 wiz Exp $ +.\" $NetBSD: sysctl.9,v 1.13 2008/11/12 12:35:54 ad Exp $ .\" .\" Copyright (c) 2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -596,7 +596,7 @@ autoconfiguration -- when devices are being probed at boot time device attachment -- when a PC-Card, USB, or other device is plugged in or attached .It -LKM initialization -- when an LKM is being loaded +module initialization -- when a module is being loaded .It .Dq run-time -- when a process creates a node via the @@ -618,7 +618,7 @@ any tree that is marked with at its root, and no nodes can be added at all if the main tree's root is so marked. .Pp -Nodes added by device drivers, LKMs, and at device insertion time can +Nodes added by device drivers, modules, and at device insertion time can be added to (and removed from) .Dq read-only parent nodes. diff --git a/share/man/man9/sysmon_envsys.9 b/share/man/man9/sysmon_envsys.9 index 642722dccc2..fbe62ec00c8 100644 --- a/share/man/man9/sysmon_envsys.9 +++ b/share/man/man9/sysmon_envsys.9 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysmon_envsys.9,v 1.19 2008/04/30 13:10:58 martin Exp $ +.\" $NetBSD: sysmon_envsys.9,v 1.20 2008/11/12 12:35:54 ad Exp $ .\" .\" Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -615,9 +615,6 @@ framework is implemented within the files: .Pa sys/dev/sysmon/sysmon_envsys_tables.c .Pp .Pa sys/dev/sysmon/sysmon_envsys_util.c -.Pp -There's an example LKM driver that shows how the framework works in: -.Pa sys/lkm/misc/envsys2/lkminit_envsys2.c . .Sh SEE ALSO .Xr envsys 4 , .Xr envstat 8 diff --git a/share/mk/Makefile b/share/mk/Makefile index e69016f9101..3df3157eaa1 100644 --- a/share/mk/Makefile +++ b/share/mk/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.41 2008/05/02 14:20:50 ad Exp $ +# $NetBSD: Makefile,v 1.42 2008/11/12 12:35:54 ad Exp $ # @(#)Makefile 8.1 (Berkeley) 6/8/93 NOOBJ= # defined @@ -8,8 +8,7 @@ NOOBJ= # defined .if ${MKSHARE} != "no" FILES= bsd.README bsd.doc.mk bsd.dep.mk bsd.endian.mk bsd.files.mk \ bsd.gcc.mk bsd.hostlib.mk bsd.hostprog.mk bsd.inc.mk bsd.info.mk \ - bsd.init.mk bsd.kernobj.mk bsd.kinc.mk bsd.klinks.mk bsd.kmod.mk \ - bsd.kmodule.mk \ + bsd.init.mk bsd.kernobj.mk bsd.kinc.mk bsd.klinks.mk bsd.kmodule.mk \ bsd.lib.mk bsd.links.mk bsd.man.mk bsd.nls.mk bsd.obj.mk bsd.own.mk \ bsd.prog.mk bsd.rpc.mk bsd.shlib.mk bsd.subdir.mk bsd.sys.mk \ bsd.test.mk bsd.x11.mk sys.mk diff --git a/share/mk/bsd.README b/share/mk/bsd.README index 7c100323dd1..9dab65a62cf 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.238 2008/11/09 23:07:22 mrg Exp $ +# $NetBSD: bsd.README,v 1.239 2008/11/12 12:35:54 ad Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the make "include" files for the NetBSD @@ -235,17 +235,6 @@ MKMAN If "no", don't build or install the man or catman pages, MKMANZ If not "no", compress manual pages at installation time. Default: no -MKMODULAR If "no", don't build the versions of modload(8), modstat(8) - and modunload(8) that use the new modules framework present - in the kernel (enabled separately using 'options MODULAR' - int the configuration file). Also don't build any other - stuff that may rely on this support, such as tests or kernel - modules. - Note: This flag will disappear when the new modules framework - is complete enough to replace the old LKM, effectively - switching it to "yes" by default. - Default: no - MKNLS If "no", don't build or install the NLS files and locale definition files. Default: yes diff --git a/share/mk/bsd.kmod.mk b/share/mk/bsd.kmod.mk deleted file mode 100644 index b0f8e1fdccc..00000000000 --- a/share/mk/bsd.kmod.mk +++ /dev/null @@ -1,136 +0,0 @@ -# $NetBSD: bsd.kmod.mk,v 1.89 2008/10/19 22:05:21 apb Exp $ - -.include <bsd.init.mk> -.include <bsd.klinks.mk> - -##### Basic targets -clean: cleankmod -realinstall: kmodinstall - -KERN= $S/kern - -CFLAGS+= -ffreestanding ${COPTS} -CPPFLAGS+= -nostdinc -I. -I${.CURDIR} -isystem $S -isystem $S/arch -CPPFLAGS+= -isystem ${S}/../common/include -CPPFLAGS+= -D_KERNEL -D_LKM - -# XXX until the kernel is fixed again... -.if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC) -CFLAGS+= -fno-strict-aliasing -Wno-pointer-sign -.endif - -_YKMSRCS= ${SRCS:M*.[ly]:C/\..$/.c/} ${YHEADER:D${SRCS:M*.y:.y=.h}} -DPSRCS+= ${_YKMSRCS} -CLEANFILES+= ${_YKMSRCS} -CLEANFILES+= tmp.o - -.if \ - ${MACHINE_CPU} == "arm" || \ - ${MACHINE_CPU} == "hppa" || \ - ${MACHINE_CPU} == "powerpc" -CLEANFILES+= ${KMOD}_tramp.o ${KMOD}_tramp.S tmp.S ${KMOD}_tmp.o -.endif - -OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.o/g} -PROG?= ${KMOD}.o -MAN?= ${KMOD}.4 - -##### Build rules -realall: ${PROG} - -${OBJS} ${LOBJS}: ${DPSRCS} - -.if \ - ${MACHINE_CPU} == "arm" || \ - ${MACHINE_CPU} == "hppa" || \ - ${MACHINE_CPU} == "powerpc" -${KMOD}_tmp.o: ${OBJS} ${DPADD} - ${_MKTARGET_COMPILE} - ${LD} -r -o tmp.o ${OBJS} - mv tmp.o ${.TARGET} - -${KMOD}_tramp.S: ${KMOD}_tmp.o $S/lkm/arch/${MACHINE_CPU}/lkmtramp.awk - ${_MKTARGET_CREATE} - ${OBJDUMP} --syms --reloc ${KMOD}_tmp.o | \ - ${TOOL_AWK} -f $S/lkm/arch/${MACHINE_CPU}/lkmtramp.awk \ - > tmp.S - mv tmp.S ${.TARGET} - -${PROG}: ${KMOD}_tmp.o ${KMOD}_tramp.o - ${_MKTARGET_LINK} - ${LD} -r \ - `${OBJDUMP} --syms --reloc ${KMOD}_tmp.o | \ - ${TOOL_AWK} -f $S/lkm/arch/${MACHINE_CPU}/lkmwrap.awk` \ - -o tmp.o ${KMOD}_tmp.o ${KMOD}_tramp.o -.if exists($S/lkm/arch/${MACHINE_CPU}/lkmhide.awk) - ${OBJCOPY} \ - `${NM} tmp.o | \ - ${TOOL_AWK} -f $S/lkm/arch/${MACHINE_CPU}/lkmhide.awk` \ - tmp.o tmp1.o - mv tmp1.o tmp.o -.endif - mv tmp.o ${.TARGET} -.else -${PROG}: ${OBJS} ${DPADD} - ${_MKTARGET_LINK} - ${LD} -r -o tmp.o ${OBJS} - mv tmp.o ${.TARGET} -.endif - -##### Install rules -.if !target(kmodinstall) -_PROG:= ${DESTDIR}${KMODDIR}/${PROG} # installed path - -.if ${MKUPDATE} == "no" -${_PROG}! ${PROG} # install rule -.if !defined(BUILD) && !make(all) && !make(${PROG}) -${_PROG}! .MADE # no build at install -.endif -.else -${_PROG}: ${PROG} # install rule -.if !defined(BUILD) && !make(all) && !make(${PROG}) -${_PROG}: .MADE # no build at install -.endif -.endif - ${_MKTARGET_INSTALL} - ${INSTALL_FILE} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ - ${.ALLSRC} ${.TARGET} - -kmodinstall:: ${_PROG} -.PHONY: kmodinstall -.PRECIOUS: ${_PROG} # keep if install fails - -.undef _PROG -.endif # !target(kmodinstall) - -##### Clean rules -cleankmod: .PHONY - rm -f a.out [Ee]rrs mklog core *.core \ - ${PROG} ${OBJS} ${LOBJS} ${CLEANFILES} - -##### Custom rules -lint: ${LOBJS} -.if defined(LOBJS) && !empty(LOBJS) - ${LINT} ${LINTFLAGS} ${LDFLAGS:C/-L[ ]*/-L/Wg:M-L*} ${LOBJS} ${LDADD} -.endif - -.if !target(load) -load: ${PROG} - /sbin/modload ${KMOD_LOADFLAGS} -o ${KMOD} ${PROG} -.endif -.PHONY: load - -.if !target(unload) -unload: - /sbin/modunload -n ${KMOD} -.endif -.PHONY: unload - -##### Pull in related .mk logic -.include <bsd.man.mk> -.include <bsd.links.mk> -.include <bsd.sys.mk> -.include <bsd.dep.mk> - -.-include "$S/arch/${MACHINE_CPU}/include/Makefile.inc" -.-include "$S/arch/${MACHINE}/include/Makefile.inc" diff --git a/share/mk/bsd.kmodule.mk b/share/mk/bsd.kmodule.mk index 1d289f081a9..304673a65a9 100644 --- a/share/mk/bsd.kmodule.mk +++ b/share/mk/bsd.kmodule.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.kmodule.mk,v 1.14 2008/11/05 00:54:25 elad Exp $ +# $NetBSD: bsd.kmodule.mk,v 1.15 2008/11/12 12:35:54 ad Exp $ # We are not building this with PIE MKPIE=no @@ -73,7 +73,7 @@ ${_PROG}: .MADE # no build at install ${INSTALL_DIR} $$d; \ done ${INSTALL_DIR} ${KMODULEDIR} - ${INSTALL_FILE} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ + ${INSTALL_FILE} -o ${KMODULEOWN} -g ${KMODULEGRP} -m ${KMODULEMODE} \ ${.ALLSRC} ${.TARGET} kmodinstall:: ${_PROG} diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index a266c7e8791..595451cf699 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.546 2008/11/11 16:09:53 cube Exp $ +# $NetBSD: bsd.own.mk,v 1.547 2008/11/12 12:35:54 ad Exp $ .if !defined(_BSD_OWN_MK_) _BSD_OWN_MK_=1 @@ -431,11 +431,6 @@ NLSGRP?= wheel NLSOWN?= root NLSMODE?= ${NONBINMODE} -KMODDIR?= /usr/lkm -KMODGRP?= wheel -KMODOWN?= root -KMODMODE?= ${NONBINMODE} - KMODULEGRP?= wheel KMODULEOWN?= root KMODULEMODE?= ${NONBINMODE} @@ -660,7 +655,7 @@ ${var}?= yes # .for var in \ MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKDEBUG MKDEBUGLIB \ - MKMANZ MKMODULAR MKOBJDIRS \ + MKMANZ MKOBJDIRS \ MKPCC MKPCCCMDS \ MKSOFTFLOAT MKSTRIPIDENT \ MKUNPRIVED MKUPDATE MKX11 diff --git a/sys/Makefile b/sys/Makefile index 7e80943a343..c7769f502e5 100644 --- a/sys/Makefile +++ b/sys/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.71 2008/07/31 01:11:53 mrg Exp $ +# $NetBSD: Makefile,v 1.72 2008/11/12 12:35:54 ad Exp $ SUBDIR= altq arch compat dev fs miscfs \ net net80211 netatalk netbt netipsec netinet netinet6 \ @@ -7,11 +7,11 @@ SUBDIR= altq arch compat dev fs miscfs \ # interrupt implementation depends on the kernel within the port .if (${MACHINE} != "evbppc") -SUBDIR+=lkm modules +SUBDIR+=modules .endif # Speedup stubs for some subtrees that don't need to run these rules -includes-lkm: +includes-modules: @true .if make(obj) diff --git a/sys/arch/acorn26/acorn26/cons_machdep.c b/sys/arch/acorn26/acorn26/cons_machdep.c index 7610d5c6443..717631e4d91 100644 --- a/sys/arch/acorn26/acorn26/cons_machdep.c +++ b/sys/arch/acorn26/acorn26/cons_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: cons_machdep.c,v 1.7 2007/03/05 15:42:23 he Exp $ */ +/* $NetBSD: cons_machdep.c,v 1.8 2008/11/12 12:35:54 ad Exp $ */ /*- * Copyright (c) 1998 Ben Harris * All rights reserved. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cons_machdep.c,v 1.7 2007/03/05 15:42:23 he Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cons_machdep.c,v 1.8 2008/11/12 12:35:54 ad Exp $"); #include <sys/param.h> #include <sys/syslog.h> @@ -66,7 +66,7 @@ consinit() #ifdef DDB db_machine_init(); #endif /* DDB */ -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init(bootconfig.esym - bootconfig.ssym, (char*)MEMC_PHYS_BASE + bootconfig.ssym, (char*)MEMC_PHYS_BASE + bootconfig.esym); diff --git a/sys/arch/acorn26/acorn26/start.c b/sys/arch/acorn26/acorn26/start.c index e6d9166cbb0..eadba946786 100644 --- a/sys/arch/acorn26/acorn26/start.c +++ b/sys/arch/acorn26/acorn26/start.c @@ -1,4 +1,4 @@ -/* $NetBSD: start.c,v 1.8 2007/03/05 17:52:26 he Exp $ */ +/* $NetBSD: start.c,v 1.9 2008/11/12 12:35:54 ad Exp $ */ /*- * Copyright (c) 1998, 2000 Ben Harris * All rights reserved. @@ -31,7 +31,7 @@ #include <sys/param.h> -__KERNEL_RCSID(0, "$NetBSD: start.c,v 1.8 2007/03/05 17:52:26 he Exp $"); +__KERNEL_RCSID(0, "$NetBSD: start.c,v 1.9 2008/11/12 12:35:54 ad Exp $"); #include <sys/msgbuf.h> #include <sys/user.h> @@ -144,7 +144,7 @@ start(initbootconfig) panic("Bootloader mislaid the data segment"); #endif -#if !NKSYMS && !defined(DDB) && !defined(LKM) +#if !NKSYMS && !defined(DDB) && !defined(MODULAR) /* Throw away the symbol table to gain space. */ if (bootconfig.freebase == bootconfig.esym) { bootconfig.freebase = bootconfig.ssym; diff --git a/sys/arch/acorn26/conf/FOURMEG b/sys/arch/acorn26/conf/FOURMEG index 8fa2b261e36..bfdff6f0ed6 100644 --- a/sys/arch/acorn26/conf/FOURMEG +++ b/sys/arch/acorn26/conf/FOURMEG @@ -1,4 +1,4 @@ -# $NetBSD: FOURMEG,v 1.29 2006/10/02 03:28:29 chs Exp $ +# $NetBSD: FOURMEG,v 1.30 2008/11/12 12:35:54 ad Exp $ # FOURMEG arm26 configuration -- something small @@ -96,7 +96,6 @@ options SYSVSHM # System V-like shared memory # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) #options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options BUFPAGES=1 diff --git a/sys/arch/acorn26/conf/GENERIC b/sys/arch/acorn26/conf/GENERIC index 198e286b3d6..9eb29d7288a 100644 --- a/sys/arch/acorn26/conf/GENERIC +++ b/sys/arch/acorn26/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.55 2008/08/10 15:31:20 tls Exp $ +# $NetBSD: GENERIC,v 1.56 2008/11/12 12:35:55 ad Exp $ # # GENERIC machine description file # @@ -126,7 +126,6 @@ options P1003_1B_SEMAPHORE # p1003.1b semaphore support # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) #options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options NTP # Kernel PLL for ntpd(8). diff --git a/sys/arch/acorn26/conf/INSTALL b/sys/arch/acorn26/conf/INSTALL index 3aad05fb3d5..8b6f5a79b40 100644 --- a/sys/arch/acorn26/conf/INSTALL +++ b/sys/arch/acorn26/conf/INSTALL @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.22 2008/07/31 07:40:59 simonb Exp $ +# $NetBSD: INSTALL,v 1.23 2008/11/12 12:35:55 ad Exp $ # INSTALL configuration, used to generate installation media @@ -94,7 +94,6 @@ options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. # Miscellaneous kernel options #options KTRACE # system call tracing, a la ktrace(1) #options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options BUFPAGES=2 diff --git a/sys/arch/acorn26/conf/majors.acorn26 b/sys/arch/acorn26/conf/majors.acorn26 index 63991cd6e6e..51fef85dbec 100644 --- a/sys/arch/acorn26/conf/majors.acorn26 +++ b/sys/arch/acorn26/conf/majors.acorn26 @@ -1,4 +1,4 @@ -# $NetBSD: majors.acorn26,v 1.19 2007/12/31 15:31:44 ad Exp $ +# $NetBSD: majors.acorn26,v 1.20 2008/11/12 12:35:55 ad Exp $ # # Device majors for acorn26 # @@ -33,7 +33,6 @@ device-major raid char 26 block 7 raid device-major clockctl char 27 clockctl device-major cgd char 29 block 8 cgd device-major ksyms char 30 ksyms -device-major lkm char 31 lkm device-major wsfont char 32 wsfont device-major nsmb char 98 nsmb diff --git a/sys/arch/acorn32/acorn32/rpc_machdep.c b/sys/arch/acorn32/acorn32/rpc_machdep.c index caea781fe88..2270e171b4c 100644 --- a/sys/arch/acorn32/acorn32/rpc_machdep.c +++ b/sys/arch/acorn32/acorn32/rpc_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: rpc_machdep.c,v 1.72 2008/11/11 06:46:40 dyoung Exp $ */ +/* $NetBSD: rpc_machdep.c,v 1.73 2008/11/12 12:35:55 ad Exp $ */ /* * Copyright (c) 2000-2002 Reinoud Zandijk. @@ -54,7 +54,7 @@ #include <sys/param.h> -__KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.72 2008/11/11 06:46:40 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.73 2008/11/12 12:35:55 ad Exp $"); #include <sys/systm.h> #include <sys/kernel.h> @@ -1043,7 +1043,7 @@ initarm(void *cookie) rpc_sa110_cc_setup(); #endif /* CPU_SA110 */ -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init(bootconfig.ksym_end - bootconfig.ksym_start, (void *) bootconfig.ksym_start, (void *) bootconfig.ksym_end); #endif diff --git a/sys/arch/acorn32/conf/EB7500ATX b/sys/arch/acorn32/conf/EB7500ATX index 4aabdd1a250..c86474ccd02 100644 --- a/sys/arch/acorn32/conf/EB7500ATX +++ b/sys/arch/acorn32/conf/EB7500ATX @@ -1,4 +1,4 @@ -# $NetBSD: EB7500ATX,v 1.33 2008/07/31 07:40:59 simonb Exp $ +# $NetBSD: EB7500ATX,v 1.34 2008/11/12 12:35:55 ad Exp $ # # EB7500ATX --- NetBSD/acorn32 complete configuration # @@ -22,7 +22,7 @@ include "arch/acorn32/conf/std.acorn32" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "EB7500ATX-$Revision: 1.33 $" +#ident "EB7500ATX-$Revision: 1.34 $" # estimated number of users maxusers 32 @@ -140,7 +140,6 @@ options MEMORY_DISK_HOOKS # boottime setup of ramdisk # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -options LKM # loadable kernel modules options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options USERCONF # userconf(4) support diff --git a/sys/arch/acorn32/conf/GENERIC b/sys/arch/acorn32/conf/GENERIC index f4ab8012f40..9d3b140618d 100644 --- a/sys/arch/acorn32/conf/GENERIC +++ b/sys/arch/acorn32/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.88 2008/08/10 15:31:20 tls Exp $ +# $NetBSD: GENERIC,v 1.89 2008/11/12 12:35:55 ad Exp $ # # GENERIC --- NetBSD/acorn32 complete configuration # @@ -22,7 +22,7 @@ include "arch/acorn32/conf/std.acorn32" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.88 $" +#ident "GENERIC-$Revision: 1.89 $" # estimated number of users maxusers 32 @@ -144,7 +144,6 @@ options MEMORY_DISK_HOOKS # boottime setup of ramdisk # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -options LKM # loadable kernel modules options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options USERCONF # userconf(4) support diff --git a/sys/arch/acorn32/conf/INSTALL b/sys/arch/acorn32/conf/INSTALL index 9758a86e1a8..34a8c3d2aed 100644 --- a/sys/arch/acorn32/conf/INSTALL +++ b/sys/arch/acorn32/conf/INSTALL @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.49 2008/07/31 07:40:59 simonb Exp $ +# $NetBSD: INSTALL,v 1.50 2008/11/12 12:35:55 ad Exp $ # # INSTALL -- NetBSD/acorn32 install configuration # @@ -22,7 +22,7 @@ include "arch/acorn32/conf/std.acorn32" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "INSTALL-$Revision: 1.49 $" +#ident "INSTALL-$Revision: 1.50 $" # estimated number of users maxusers 32 @@ -131,7 +131,6 @@ options MEMORY_DISK_IS_ROOT # use memory disk as root # Miscellaneous kernel options #options KTRACE # system call tracing, a la ktrace(1) #options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options USERCONF # userconf(4) support diff --git a/sys/arch/acorn32/conf/LOWMEM_WSCONS b/sys/arch/acorn32/conf/LOWMEM_WSCONS index 49ec9bb0872..452a92b1315 100644 --- a/sys/arch/acorn32/conf/LOWMEM_WSCONS +++ b/sys/arch/acorn32/conf/LOWMEM_WSCONS @@ -1,4 +1,4 @@ -# $NetBSD: LOWMEM_WSCONS,v 1.49 2008/05/30 20:10:01 tsutsui Exp $ +# $NetBSD: LOWMEM_WSCONS,v 1.50 2008/11/12 12:35:55 ad Exp $ # # LOWMEM_WSCONS -- RiscPC config with wscons for SMALL machines # @@ -111,7 +111,6 @@ options MEMORY_DISK_HOOKS # boottime setup of ramdisk # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -options LKM # loadable kernel modules options KMEMSTATS # kernel memory statistics options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/acorn32/conf/NC b/sys/arch/acorn32/conf/NC index c5bb7f4d168..39dd3660cfe 100644 --- a/sys/arch/acorn32/conf/NC +++ b/sys/arch/acorn32/conf/NC @@ -1,4 +1,4 @@ -# $NetBSD: NC,v 1.47 2008/05/30 20:10:01 tsutsui Exp $ +# $NetBSD: NC,v 1.48 2008/11/12 12:35:55 ad Exp $ # # NC - with wscons # @@ -105,7 +105,6 @@ options MEMORY_DISK_HOOKS # boottime setup of ramdisk # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules options KMEMSTATS # kernel memory statistics options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/acorn32/conf/majors.acorn32 b/sys/arch/acorn32/conf/majors.acorn32 index 583e87d658f..9c7e3defabd 100644 --- a/sys/arch/acorn32/conf/majors.acorn32 +++ b/sys/arch/acorn32/conf/majors.acorn32 @@ -1,4 +1,4 @@ -# $NetBSD: majors.acorn32,v 1.23 2007/12/31 15:31:45 ad Exp $ +# $NetBSD: majors.acorn32,v 1.24 2008/11/12 12:35:55 ad Exp $ # # Device majors for acorn32 # @@ -33,7 +33,6 @@ device-major ss char 29 ss device-major bpf char 32 bpfilter device-major tun char 33 tun device-major filedesc char 34 -device-major lkm char 35 lkm device-major audio char 36 audio device-major ipl char 46 ipfilter diff --git a/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c b/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c index 677bc44fd26..350cd30e7ee 100644 --- a/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c +++ b/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: eb7500atx_machdep.c,v 1.10 2008/11/11 06:46:40 dyoung Exp $ */ +/* $NetBSD: eb7500atx_machdep.c,v 1.11 2008/11/12 12:35:55 ad Exp $ */ /* * Copyright (c) 2000-2002 Reinoud Zandijk. @@ -54,7 +54,7 @@ #include <sys/param.h> -__KERNEL_RCSID(0, "$NetBSD: eb7500atx_machdep.c,v 1.10 2008/11/11 06:46:40 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: eb7500atx_machdep.c,v 1.11 2008/11/12 12:35:55 ad Exp $"); #include <sys/systm.h> #include <sys/kernel.h> @@ -956,7 +956,7 @@ initarm(void *cookie) bootconfig.vram[0].address, bootconfig.vram[0].pages * bootconfig.pagesize); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init(bootconfig.ksym_end - bootconfig.ksym_start, (void *) bootconfig.ksym_start, (void *) bootconfig.ksym_end); #endif diff --git a/sys/arch/algor/algor/machdep.c b/sys/arch/algor/algor/machdep.c index 56b47daedf0..e72eba4b2f0 100644 --- a/sys/arch/algor/algor/machdep.c +++ b/sys/arch/algor/algor/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.39 2008/11/11 06:46:40 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.40 2008/11/12 12:35:55 ad Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -106,7 +106,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.39 2008/11/11 06:46:40 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.40 2008/11/12 12:35:55 ad Exp $"); #include "opt_algor_p4032.h" #include "opt_algor_p5064.h" @@ -574,7 +574,7 @@ mach_init(int argc, char *argv[], char *envp[]) /* * Initialize debuggers, and break into them, if appropriate. */ -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* * XXX Loader doesn't give us symbols the way we like. Need * XXX dbsym(1) support for ELF. diff --git a/sys/arch/algor/conf/P4032 b/sys/arch/algor/conf/P4032 index ea338544c86..ed92d8c4f34 100644 --- a/sys/arch/algor/conf/P4032 +++ b/sys/arch/algor/conf/P4032 @@ -1,4 +1,4 @@ -# $NetBSD: P4032,v 1.48 2008/09/27 20:45:07 he Exp $ +# $NetBSD: P4032,v 1.49 2008/11/12 12:35:55 ad Exp $ # # Algorithmics P-4032 kernel. # @@ -7,7 +7,7 @@ include "arch/algor/conf/std.algor" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "P4032-$Revision: 1.48 $" +#ident "P4032-$Revision: 1.49 $" maxusers 32 @@ -87,7 +87,6 @@ options SYSVSHM #options SHMMAXPGS=1024 # 1024 pages is the default # Loadable Kernel Modules -options LKM # Disable kernel security. #options INSECURE diff --git a/sys/arch/algor/conf/P5064 b/sys/arch/algor/conf/P5064 index c5f85acd2a0..21ec8eaa2a4 100644 --- a/sys/arch/algor/conf/P5064 +++ b/sys/arch/algor/conf/P5064 @@ -1,4 +1,4 @@ -# $NetBSD: P5064,v 1.54 2008/07/31 07:40:59 simonb Exp $ +# $NetBSD: P5064,v 1.55 2008/11/12 12:35:55 ad Exp $ # # Algorithmics P-5064 kernel. # @@ -7,7 +7,7 @@ include "arch/algor/conf/std.algor" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "P5064-$Revision: 1.54 $" +#ident "P5064-$Revision: 1.55 $" maxusers 32 @@ -82,7 +82,6 @@ options SYSVSHM #options SHMMAXPGS=1024 # 1024 pages is the default # Loadable Kernel Modules -options LKM # Disable kernel security. #options INSECURE diff --git a/sys/arch/algor/conf/P6032 b/sys/arch/algor/conf/P6032 index 679d20a630c..8d3e1d60b4e 100644 --- a/sys/arch/algor/conf/P6032 +++ b/sys/arch/algor/conf/P6032 @@ -1,4 +1,4 @@ -# $NetBSD: P6032,v 1.47 2008/07/31 07:40:59 simonb Exp $ +# $NetBSD: P6032,v 1.48 2008/11/12 12:35:55 ad Exp $ # # Algorithmics P-6032 kernel. # @@ -7,7 +7,7 @@ include "arch/algor/conf/std.algor" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "P6032-$Revision: 1.47 $" +#ident "P6032-$Revision: 1.48 $" maxusers 32 @@ -82,7 +82,6 @@ options SYSVSHM #options SHMMAXPGS=1024 # 1024 pages is the default # Loadable Kernel Modules -options LKM # Disable kernel security. #options INSECURE diff --git a/sys/arch/algor/conf/majors.algor b/sys/arch/algor/conf/majors.algor index e6d796863ec..232248deb72 100644 --- a/sys/arch/algor/conf/majors.algor +++ b/sys/arch/algor/conf/majors.algor @@ -1,4 +1,4 @@ -# $NetBSD: majors.algor,v 1.18 2007/12/31 15:31:45 ad Exp $ +# $NetBSD: majors.algor,v 1.19 2008/11/12 12:35:55 ad Exp $ # # Device majors for algor # @@ -19,7 +19,6 @@ device-major st char 12 block 2 st device-major cd char 13 block 3 cd device-major ch char 14 ch -device-major lkm char 16 lkm device-major audio char 24 audio device-major wsdisplay char 25 wsdisplay diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c index 04b7b3937e4..64827b4ec28 100644 --- a/sys/arch/alpha/alpha/machdep.c +++ b/sys/arch/alpha/alpha/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.308 2008/11/11 06:46:40 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.309 2008/11/12 12:35:55 ad Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.308 2008/11/11 06:46:40 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.309 2008/11/12 12:35:55 ad Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -182,7 +182,7 @@ u_int8_t dec_3000_scsiid[2], dec_3000_scsifast[2]; struct platform platform; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* start and end of kernel symbol table */ void *ksym_start, *ksym_end; #endif @@ -421,7 +421,7 @@ nobootinfo: * stack). */ kernstart = trunc_page((vaddr_t)kernel_text) - 2 * PAGE_SIZE; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksym_start = (void *)bootinfo.ssym; ksym_end = (void *)bootinfo.esym; kernend = (vaddr_t)round_page((vaddr_t)ksym_end); @@ -767,7 +767,7 @@ nobootinfo: /* * Initialize debuggers, and break into them if appropriate. */ -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init((int)((u_int64_t)ksym_end - (u_int64_t)ksym_start), ksym_start, ksym_end); #endif diff --git a/sys/arch/alpha/conf/BASIL b/sys/arch/alpha/conf/BASIL index cceb5a4b5ee..f298c67b010 100644 --- a/sys/arch/alpha/conf/BASIL +++ b/sys/arch/alpha/conf/BASIL @@ -1,4 +1,4 @@ -# $NetBSD: BASIL,v 1.49 2008/05/30 20:10:01 tsutsui Exp $ +# $NetBSD: BASIL,v 1.50 2008/11/12 12:35:55 ad Exp $ # # basil.shagadelic.org -- thorpej's API UP1000 @@ -6,7 +6,7 @@ include "arch/alpha/conf/std.alpha" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "BASIL-$Revision: 1.49 $" +#ident "BASIL-$Revision: 1.50 $" maxusers 64 @@ -100,7 +100,6 @@ options SYSVSHM #options SHMMAXPGS=1024 # 1024 pages is the default # Loadable Kernel Modules -options LKM # Disable kernel security. #options INSECURE diff --git a/sys/arch/alpha/conf/FRAU-FARBISSINA b/sys/arch/alpha/conf/FRAU-FARBISSINA index e6f0d2dffb0..c963f63e1bb 100644 --- a/sys/arch/alpha/conf/FRAU-FARBISSINA +++ b/sys/arch/alpha/conf/FRAU-FARBISSINA @@ -1,4 +1,4 @@ -# $NetBSD: FRAU-FARBISSINA,v 1.53 2008/05/30 20:10:01 tsutsui Exp $ +# $NetBSD: FRAU-FARBISSINA,v 1.54 2008/11/12 12:35:55 ad Exp $ # # frau-farbissina.shagadelic.org -- thorpej's AlphaServer 1200 MP hacking # box @@ -7,7 +7,7 @@ include "arch/alpha/conf/std.alpha" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "FRAU-FARBISSINA-$Revision: 1.53 $" +#ident "FRAU-FARBISSINA-$Revision: 1.54 $" maxusers 64 @@ -97,7 +97,6 @@ options SYSVSHM #options SHMMAXPGS=1024 # 1024 pages is the default # Loadable Kernel Modules -options LKM # Disable kernel security. #options INSECURE diff --git a/sys/arch/alpha/conf/GENERIC b/sys/arch/alpha/conf/GENERIC index c519ff3a27d..90d67a51d87 100644 --- a/sys/arch/alpha/conf/GENERIC +++ b/sys/arch/alpha/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.325 2008/08/10 15:31:20 tls Exp $ +# $NetBSD: GENERIC,v 1.326 2008/11/12 12:35:56 ad Exp $ # # This machine description file is used to generate the default NetBSD # kernel. @@ -19,7 +19,7 @@ include "arch/alpha/conf/std.alpha" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -ident "GENERIC-$Revision: 1.325 $" +ident "GENERIC-$Revision: 1.326 $" maxusers 32 @@ -170,7 +170,6 @@ options SYSVSHM options P1003_1B_SEMAPHORE # Loadable Kernel Modules -options LKM # Disable kernel security. #options INSECURE diff --git a/sys/arch/alpha/conf/majors.alpha b/sys/arch/alpha/conf/majors.alpha index c0c80b7990c..0bdfb8b8645 100644 --- a/sys/arch/alpha/conf/majors.alpha +++ b/sys/arch/alpha/conf/majors.alpha @@ -1,4 +1,4 @@ -# $NetBSD: majors.alpha,v 1.22 2007/12/31 15:31:45 ad Exp $ +# $NetBSD: majors.alpha,v 1.23 2008/11/12 12:35:56 ad Exp $ # # Device majors for alpha # @@ -19,7 +19,6 @@ device-major st char 12 block 2 st device-major cd char 13 block 3 cd device-major ch char 14 ch device-major zstty char 15 zstty -device-major lkm char 16 lkm device-major prom char 23 device-major audio char 24 audio diff --git a/sys/arch/amd64/amd64/kobj_machdep.c b/sys/arch/amd64/amd64/kobj_machdep.c index f8d222687b3..8d3e8a2bdfb 100644 --- a/sys/arch/amd64/amd64/kobj_machdep.c +++ b/sys/arch/amd64/amd64/kobj_machdep.c @@ -1,9 +1,12 @@ -/* $NetBSD: kobj_machdep.c,v 1.3 2008/04/28 20:23:12 martin Exp $ */ +/* $NetBSD: kobj_machdep.c,v 1.4 2008/11/12 12:35:56 ad Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * + * This code is derived from software developed for The NetBSD Foundation + * by Andrew Doran. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -52,7 +55,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.3 2008/04/28 20:23:12 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.4 2008/11/12 12:35:56 ad Exp $"); #define ELFSIZE ARCH_ELFSIZE @@ -110,8 +113,7 @@ kobj_reloc(kobj_t ko, uintptr_t relocbase, const void *data, val = addr + addend; if (addr == 0) return -1; - if (*where != val) - *where = val; + *where = val; break; case R_X86_64_PC32: /* S + A - P */ @@ -120,8 +122,7 @@ kobj_reloc(kobj_t ko, uintptr_t relocbase, const void *data, val32 = (Elf32_Addr)(addr + addend - (Elf64_Addr)where); if (addr == 0) return -1; - if (*where32 != val32) - *where32 = val32; + *where32 = val32; break; case R_X86_64_32S: /* S + A sign extend */ @@ -130,32 +131,21 @@ kobj_reloc(kobj_t ko, uintptr_t relocbase, const void *data, where32 = (Elf32_Addr *)where; if (addr == 0) return -1; - if (*where32 != val32) - *where32 = val32; + *where32 = val32; break; - case R_X86_64_COPY: /* none */ - /* - * There shouldn't be copy relocations in kernel - * objects. - */ - printf("kobj_reloc: unexpected R_COPY relocation\n"); - return -1; - case R_X86_64_GLOB_DAT: /* S */ case R_X86_64_JUMP_SLOT:/* XXX need addend + offset */ addr = kobj_sym_lookup(ko, symidx); if (addr == 0) return -1; - if (*where != addr) - *where = addr; + *where = addr; break; case R_X86_64_RELATIVE: /* B + A */ addr = relocbase + addend; val = addr; - if (*where != val) - *where = val; + *where = val; break; default: diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index 97c468c0215..18003770eaf 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.107 2008/11/12 01:33:44 cegger Exp $ */ +/* $NetBSD: machdep.c,v 1.108 2008/11/12 12:35:56 ad Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008 @@ -112,7 +112,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.107 2008/11/12 01:33:44 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.108 2008/11/12 12:35:56 ad Exp $"); /* #define XENDEBUG_LOW */ @@ -260,9 +260,9 @@ paddr_t idt_paddr; vaddr_t lo32_vaddr; paddr_t lo32_paddr; -vaddr_t lkm_start, lkm_end; -static struct vm_map lkm_map_store; -extern struct vm_map *lkm_map; +vaddr_t module_start, module_end; +static struct vm_map module_map_store; +extern struct vm_map *module_map; vaddr_t kern_end; struct vm_map *mb_map = NULL; @@ -359,9 +359,9 @@ cpu_startup(void) mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr, nmbclusters * mclbytes, VM_MAP_INTRSAFE, false, NULL); - uvm_map_setup(&lkm_map_store, lkm_start, lkm_end, 0); - lkm_map_store.pmap = pmap_kernel(); - lkm_map = &lkm_map_store; + uvm_map_setup(&module_map_store, module_start, module_end, 0); + module_map_store.pmap = pmap_kernel(); + module_map = &module_map_store; format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free)); printf("avail memory = %s\n", pbuf); @@ -1329,7 +1329,7 @@ init_x86_64_msgbuf(void) static void init_x86_64_ksyms(void) { -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) extern int end; extern int *esym; #ifndef XEN @@ -1587,8 +1587,8 @@ init_x86_64(paddr_t first_avail) first_avail = round_page(first_avail); kern_end = KERNBASE + first_avail; - lkm_start = kern_end; - lkm_end = KERNBASE + NKL2_KIMG_ENTRIES * NBPD_L2; + module_start = kern_end; + module_end = KERNBASE + NKL2_KIMG_ENTRIES * NBPD_L2; /* * Now, load the memory clusters (which have already been diff --git a/sys/arch/amd64/amd64/mem.c b/sys/arch/amd64/amd64/mem.c index 33e7a897710..9554965c124 100644 --- a/sys/arch/amd64/amd64/mem.c +++ b/sys/arch/amd64/amd64/mem.c @@ -1,4 +1,4 @@ -/* $NetBSD: mem.c,v 1.15 2008/09/25 10:40:48 ad Exp $ */ +/* $NetBSD: mem.c,v 1.16 2008/11/12 12:35:56 ad Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -102,7 +102,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.15 2008/09/25 10:40:48 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.16 2008/11/12 12:35:56 ad Exp $"); #include "opt_compat_netbsd.h" @@ -129,8 +129,8 @@ void *zeropage; static kmutex_t mm_lock; extern int start, end, __data_start; extern vaddr_t kern_end; -extern vaddr_t lkm_start, lkm_end; -extern struct vm_map *lkm_map; +extern vaddr_t module_start, module_end; +extern struct vm_map *module_map; dev_type_open(mmopen); dev_type_read(mmrw); @@ -209,8 +209,8 @@ mmrw(dev_t dev, struct uio *uio, int flags) if (v < (vaddr_t)&__data_start && uio->uio_rw == UIO_WRITE) return EFAULT; - } else if (v >= lkm_start && v < lkm_end) { - if (!uvm_map_checkprot(lkm_map, v, v + c, + } else if (v >= module_start && v < module_end) { + if (!uvm_map_checkprot(module_map, v, v + c, uio->uio_rw == UIO_READ ? VM_PROT_READ: VM_PROT_WRITE)) return EFAULT; diff --git a/sys/arch/amd64/conf/GENERIC b/sys/arch/amd64/conf/GENERIC index 3163d918f12..e75bcc59f4c 100644 --- a/sys/arch/amd64/conf/GENERIC +++ b/sys/arch/amd64/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.231 2008/10/19 11:34:31 joerg Exp $ +# $NetBSD: GENERIC,v 1.232 2008/11/12 12:35:56 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.231 $" +#ident "GENERIC-$Revision: 1.232 $" maxusers 64 # estimated number of users @@ -66,7 +66,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options MODULAR # new style module framework options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/amd64/conf/XEN3_DOM0 b/sys/arch/amd64/conf/XEN3_DOM0 index e91493f6e42..e12aeb52229 100644 --- a/sys/arch/amd64/conf/XEN3_DOM0 +++ b/sys/arch/amd64/conf/XEN3_DOM0 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOM0,v 1.33 2008/10/21 10:13:23 cegger Exp $ +# $NetBSD: XEN3_DOM0,v 1.34 2008/11/12 12:35:56 ad Exp $ include "arch/amd64/conf/std.xen" @@ -35,7 +35,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel diff --git a/sys/arch/amd64/conf/XEN3_DOMU b/sys/arch/amd64/conf/XEN3_DOMU index c7da6f3938b..c47a9af0407 100644 --- a/sys/arch/amd64/conf/XEN3_DOMU +++ b/sys/arch/amd64/conf/XEN3_DOMU @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOMU,v 1.13 2008/08/10 08:53:29 cegger Exp $ +# $NetBSD: XEN3_DOMU,v 1.14 2008/11/12 12:35:56 ad Exp $ include "arch/amd64/conf/std.xen" @@ -34,7 +34,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel diff --git a/sys/arch/amd64/conf/majors.amd64 b/sys/arch/amd64/conf/majors.amd64 index f8f3a9a2241..b7f765645f5 100644 --- a/sys/arch/amd64/conf/majors.amd64 +++ b/sys/arch/amd64/conf/majors.amd64 @@ -1,4 +1,4 @@ -# $NetBSD: majors.amd64,v 1.20 2008/07/15 06:50:02 cegger Exp $ +# $NetBSD: majors.amd64,v 1.21 2008/11/12 12:35:56 ad Exp $ # # Device majors for amd64 # @@ -30,7 +30,6 @@ device-major bpf char 23 bpfilter device-major md char 24 block 17 md device-major spkr char 27 spkr -device-major lkm char 28 lkm device-major cy char 38 cy device-major mcd char 39 block 7 mcd diff --git a/sys/arch/amiga/amiga/machdep.c b/sys/arch/amiga/amiga/machdep.c index 50eb5e3ceca..4daa2e33076 100644 --- a/sys/arch/amiga/amiga/machdep.c +++ b/sys/arch/amiga/amiga/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.209 2008/07/02 17:28:54 ad Exp $ */ +/* $NetBSD: machdep.c,v 1.210 2008/11/12 12:35:56 ad Exp $ */ /* * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. @@ -85,7 +85,7 @@ #include "opt_panicbutton.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.209 2008/07/02 17:28:54 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.210 2008/11/12 12:35:56 ad Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -229,7 +229,7 @@ consinit() */ cninit(); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) { extern int end[]; extern int *esym; @@ -1466,7 +1466,7 @@ cpu_exec_aout_makecmds(l, epp) return(error); } -#ifdef LKM +#ifdef MODULAR int _spllkm6(void); int _spllkm7(void); diff --git a/sys/arch/amiga/conf/DRACO b/sys/arch/amiga/conf/DRACO index 74ddb5fbc7c..9b93eda9d96 100644 --- a/sys/arch/amiga/conf/DRACO +++ b/sys/arch/amiga/conf/DRACO @@ -1,4 +1,4 @@ -# $NetBSD: DRACO,v 1.127 2008/09/24 17:27:49 tsutsui Exp $ +# $NetBSD: DRACO,v 1.128 2008/11/12 12:35:56 ad Exp $ # # This file was automatically created. # Changes will be lost when make is run in this directory. @@ -28,7 +28,7 @@ include "arch/amiga/conf/std.amiga" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.127 $" +#ident "GENERIC-$Revision: 1.128 $" maxusers 8 @@ -162,7 +162,6 @@ options P1003_1B_SEMAPHORE # p1003.1b semaphore support # options KTRACE # system call tracing support -options LKM # Loadable kernel modules #options INSECURE # disable kernel security levels options SCSIVERBOSE # human readable SCSI error messages options USERCONF # userconf(4) support diff --git a/sys/arch/amiga/conf/GENERIC b/sys/arch/amiga/conf/GENERIC index db1c9497975..714e4c85d2d 100644 --- a/sys/arch/amiga/conf/GENERIC +++ b/sys/arch/amiga/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.256 2008/09/24 17:27:49 tsutsui Exp $ +# $NetBSD: GENERIC,v 1.257 2008/11/12 12:35:56 ad Exp $ # # This file was automatically created. # Changes will be lost when make is run in this directory. @@ -28,7 +28,7 @@ include "arch/amiga/conf/std.amiga" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.256 $" +#ident "GENERIC-$Revision: 1.257 $" maxusers 8 @@ -174,7 +174,6 @@ options P1003_1B_SEMAPHORE # p1003.1b semaphore support # options KTRACE # system call tracing support -options LKM # Loadable kernel modules #options INSECURE # disable kernel security levels options SCSIVERBOSE # human readable SCSI error messages options USERCONF # userconf(4) support diff --git a/sys/arch/amiga/conf/GENERIC.in b/sys/arch/amiga/conf/GENERIC.in index 501e8afe765..bc011c23888 100644 --- a/sys/arch/amiga/conf/GENERIC.in +++ b/sys/arch/amiga/conf/GENERIC.in @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC.in,v 1.69 2008/09/24 17:26:37 tsutsui Exp $ +# $NetBSD: GENERIC.in,v 1.70 2008/11/12 12:35:56 ad Exp $ # # GENERIC machine description file # @@ -56,7 +56,7 @@ include "arch/amiga/conf/std.amiga" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.69 $" +#ident "GENERIC-$Revision: 1.70 $" m4_ifdef(`INSTALL_CONFIGURATION', `m4_dnl makeoptions COPTS="-Os" @@ -224,7 +224,6 @@ options P1003_1B_SEMAPHORE # p1003.1b semaphore support m4_ifdef(`INSTALL_CONFIGURATION', `', `m4_dnl options KTRACE # system call tracing support -options LKM # Loadable kernel modules ')m4_dnl #options INSECURE # disable kernel security levels options SCSIVERBOSE # human readable SCSI error messages diff --git a/sys/arch/amiga/conf/majors.amiga b/sys/arch/amiga/conf/majors.amiga index a5b1e9a289c..643ceeb4406 100644 --- a/sys/arch/amiga/conf/majors.amiga +++ b/sys/arch/amiga/conf/majors.amiga @@ -1,4 +1,4 @@ -# $NetBSD: majors.amiga,v 1.20 2007/12/31 15:31:48 ad Exp $ +# $NetBSD: majors.amiga,v 1.21 2008/11/12 12:35:56 ad Exp $ # # Device majors for amiga # @@ -27,7 +27,6 @@ device-major st char 20 block 5 st device-major filedesc char 21 device-major bpf char 22 bpfilter device-major tun char 23 tun -device-major lkm char 24 lkm device-major msc char 31 msc device-major com char 32 com diff --git a/sys/arch/amigappc/conf/NULL b/sys/arch/amigappc/conf/NULL index 4b9c6407ea5..232426531f8 100644 --- a/sys/arch/amigappc/conf/NULL +++ b/sys/arch/amigappc/conf/NULL @@ -1,4 +1,4 @@ -# $NetBSD: NULL,v 1.24 2006/08/26 20:26:44 christos Exp $ +# $NetBSD: NULL,v 1.25 2008/11/12 12:35:56 ad Exp $ # # This file was automatically created. Changes will be # lost when running make in this directory. @@ -103,7 +103,6 @@ options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. #Support for various kernel options #options KTRACE # system call tracing support -#options LKM # Loadable kernel modules #options INSECURE # disable kernel security levels #options SCSIVERBOSE # human readable SCSI error messages #options NTP # NTP phase/frequency locked loop diff --git a/sys/arch/arc/arc/machdep.c b/sys/arch/arc/arc/machdep.c index bedffa5e49c..d9a8ff269e0 100644 --- a/sys/arch/arc/arc/machdep.c +++ b/sys/arch/arc/arc/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.113 2008/11/11 06:46:40 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.114 2008/11/12 12:35:56 ad Exp $ */ /* $OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $ */ /* @@ -78,7 +78,7 @@ /* from: Utah Hdr: machdep.c 1.63 91/04/24 */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.113 2008/11/11 06:46:40 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.114 2008/11/12 12:35:56 ad Exp $"); #include "fs_mfs.h" #include "opt_ddb.h" @@ -233,7 +233,7 @@ mach_init(int argc, char *argv[], u_int bim, void *bip) paddr_t kernstartpfn, kernendpfn, first, last; char *kernend; vaddr_t v; -#if NKSYMS > 0 || defined(DDB) || defined(LKM) +#if NKSYMS > 0 || defined(DDB) || defined(MODULAR) char *ssym = NULL; char *esym = NULL; struct btinfo_symtab *bi_syms; @@ -255,7 +255,7 @@ mach_init(int argc, char *argv[], u_int bim, void *bip) bootinfo_msg = "no bootinfo found. (old bootblocks?)\n"; /* clear the BSS segment in kernel code */ -#if NKSYM > 0 || defined(DDB) || defined(LKM) +#if NKSYM > 0 || defined(DDB) || defined(MODULAR) bi_syms = lookup_bootinfo(BTINFO_SYMTAB); /* check whether there is valid bootinfo symtab info */ @@ -413,7 +413,7 @@ mach_init(int argc, char *argv[], u_int bim, void *bip) kernend += round_page(mfs_initminiroot(kernend)); #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* init symbols if present */ if (esym) ksyms_init(esym - ssym, ssym, esym); diff --git a/sys/arch/arc/conf/ARCTIC b/sys/arch/arc/conf/ARCTIC index d4193367e9f..d5a682fb1bd 100644 --- a/sys/arch/arc/conf/ARCTIC +++ b/sys/arch/arc/conf/ARCTIC @@ -1,4 +1,4 @@ -# $NetBSD: ARCTIC,v 1.48 2007/10/17 19:53:27 garbled Exp $ +# $NetBSD: ARCTIC,v 1.49 2008/11/12 12:35:56 ad Exp $ # $OpenBSD: ARCTIC,v 1.12 1999/08/29 12:14:03 niklas Exp $ # # configuration file for DeskStation @@ -30,7 +30,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing #options SHMMAXPGS=1024 # 1024 pages is the default -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/arc/conf/GENERIC b/sys/arch/arc/conf/GENERIC index 9f939110bcd..cde29118918 100644 --- a/sys/arch/arc/conf/GENERIC +++ b/sys/arch/arc/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.157 2008/09/15 04:42:58 tsutsui Exp $ +# $NetBSD: GENERIC,v 1.158 2008/11/12 12:35:56 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/arc/conf/std.arc" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.157 $" +#ident "GENERIC-$Revision: 1.158 $" maxusers 32 # estimated number of users @@ -54,7 +54,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/arc/conf/M403 b/sys/arch/arc/conf/M403 index f0eaebb9433..67074c3bb74 100644 --- a/sys/arch/arc/conf/M403 +++ b/sys/arch/arc/conf/M403 @@ -1,4 +1,4 @@ -# $NetBSD: M403,v 1.45 2007/10/17 19:53:27 garbled Exp $ +# $NetBSD: M403,v 1.46 2008/11/12 12:35:57 ad Exp $ # # configuration file for MIPS Magnum 4000 system # @@ -24,7 +24,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing #options SHMMAXPGS=1024 # 1024 pages is the default -options LKM # loadable kernel modules #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) #options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel diff --git a/sys/arch/arc/conf/MIMORI b/sys/arch/arc/conf/MIMORI index fd5edc8644d..1985400ac17 100644 --- a/sys/arch/arc/conf/MIMORI +++ b/sys/arch/arc/conf/MIMORI @@ -1,4 +1,4 @@ -# $NetBSD: MIMORI,v 1.49 2007/10/17 19:53:28 garbled Exp $ +# $NetBSD: MIMORI,v 1.50 2008/11/12 12:35:57 ad Exp $ # NetBSD: GENERIC,v 1.31 2000/06/09 05:33:02 soda Exp # # MIMORI -- My NEC RISCstation 2250 (ur) @@ -25,7 +25,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing #options SHMMAXPGS=1024 # 1024 pages is the default -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/arc/conf/PICA b/sys/arch/arc/conf/PICA index 6d5cb4081ea..78580233d46 100644 --- a/sys/arch/arc/conf/PICA +++ b/sys/arch/arc/conf/PICA @@ -1,4 +1,4 @@ -# $NetBSD: PICA,v 1.61 2007/10/17 19:53:28 garbled Exp $ +# $NetBSD: PICA,v 1.62 2008/11/12 12:35:57 ad Exp $ # # configuration file for ACER PICA system # @@ -24,7 +24,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing #options SHMMAXPGS=1024 # 1024 pages is the default -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/arc/conf/RPC44 b/sys/arch/arc/conf/RPC44 index cdede6759eb..33940a7504a 100644 --- a/sys/arch/arc/conf/RPC44 +++ b/sys/arch/arc/conf/RPC44 @@ -1,4 +1,4 @@ -# $NetBSD: RPC44,v 1.31 2007/12/31 15:31:49 ad Exp $ +# $NetBSD: RPC44,v 1.32 2008/11/12 12:35:57 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/arc/conf/std.arc" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.31 $" +#ident "GENERIC-$Revision: 1.32 $" maxusers 32 # estimated number of users @@ -45,7 +45,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing #options SHMMAXPGS=1024 # 1024 pages is the default -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/arc/conf/majors.arc b/sys/arch/arc/conf/majors.arc index 97cb4d2bb54..df9a78fd824 100644 --- a/sys/arch/arc/conf/majors.arc +++ b/sys/arch/arc/conf/majors.arc @@ -1,4 +1,4 @@ -# $NetBSD: majors.arc,v 1.21 2007/12/31 15:31:49 ad Exp $ +# $NetBSD: majors.arc,v 1.22 2008/11/12 12:35:57 ad Exp $ # # Device majors for arc # @@ -45,7 +45,6 @@ device-major isdnbchan char 39 isdnbchan device-major isdntrc char 40 isdntrc device-major isdntel char 41 isdntel -device-major lkm char 51 lkm device-major clockctl char 52 clockctl device-major cgd char 54 block 10 cgd device-major ksyms char 55 ksyms diff --git a/sys/arch/arm/arm32/pmap.c b/sys/arch/arm/arm32/pmap.c index 5ec695b1f17..bf0853499da 100644 --- a/sys/arch/arm/arm32/pmap.c +++ b/sys/arch/arm/arm32/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.189 2008/11/04 07:21:24 matt Exp $ */ +/* $NetBSD: pmap.c,v 1.190 2008/11/12 12:35:57 ad Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -212,7 +212,7 @@ #include <machine/param.h> #include <arm/arm32/katelib.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.189 2008/11/04 07:21:24 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.190 2008/11/12 12:35:57 ad Exp $"); #ifdef PMAP_DEBUG @@ -5797,7 +5797,7 @@ pmap_devmap_find_va(vaddr_t va, vsize_t size) * These routines are called when the CPU type is identified to set up * the PTE prototypes, cache modes, etc. * - * The variables are always here, just in case LKMs need to reference + * The variables are always here, just in case modules need to reference * them (though, they shouldn't). */ diff --git a/sys/arch/arm/at91/at91bus.c b/sys/arch/arm/at91/at91bus.c index 06436c72b6d..12d04683301 100644 --- a/sys/arch/arm/at91/at91bus.c +++ b/sys/arch/arm/at91/at91bus.c @@ -1,4 +1,4 @@ -/* $NetBSD: at91bus.c,v 1.2 2008/07/03 01:15:38 matt Exp $ */ +/* $NetBSD: at91bus.c,v 1.3 2008/11/12 12:35:57 ad Exp $ */ /* * Copyright (c) 2007 Embedtronics Oy @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: at91bus.c,v 1.2 2008/07/03 01:15:38 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: at91bus.c,v 1.3 2008/11/12 12:35:57 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -564,7 +564,7 @@ at91bus_setup(BootConfig *mem) ipkdb_connect(0); #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* Firmware doesn't load symbols. */ ksyms_init(0, NULL, NULL); #endif diff --git a/sys/arch/arm/conf/majors.arm32 b/sys/arch/arm/conf/majors.arm32 index 8f6c913f401..baa5793b717 100644 --- a/sys/arch/arm/conf/majors.arm32 +++ b/sys/arch/arm/conf/majors.arm32 @@ -1,4 +1,4 @@ -# $NetBSD: majors.arm32,v 1.28 2007/12/31 15:31:49 ad Exp $ +# $NetBSD: majors.arm32,v 1.29 2008/11/12 12:35:57 ad Exp $ # # Device majors for arm32 # @@ -37,7 +37,6 @@ device-major ses char 30 ses device-major bpf char 32 bpfilter device-major tun char 33 tun device-major filedesc char 34 -device-major lkm char 35 lkm device-major audio char 36 audio device-major vidcconsole char 37 vidcconsole diff --git a/sys/arch/arm/ofw/ofwgencfg_machdep.c b/sys/arch/arm/ofw/ofwgencfg_machdep.c index a8a26301c36..a3bafc33f90 100644 --- a/sys/arch/arm/ofw/ofwgencfg_machdep.c +++ b/sys/arch/arm/ofw/ofwgencfg_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofwgencfg_machdep.c,v 1.13 2008/08/29 19:08:29 matt Exp $ */ +/* $NetBSD: ofwgencfg_machdep.c,v 1.14 2008/11/12 12:35:57 ad Exp $ */ /* * Copyright 1997 @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ofwgencfg_machdep.c,v 1.13 2008/08/29 19:08:29 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofwgencfg_machdep.c,v 1.14 2008/11/12 12:35:57 ad Exp $"); #include "opt_ddb.h" @@ -202,7 +202,7 @@ initarm(void *cookie) /* Set-up the IRQ system. */ irq_init(); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init(0, NULL, NULL); /* XXX */ #endif diff --git a/sys/arch/atari/atari/machdep.c b/sys/arch/atari/atari/machdep.c index 68e92833e98..3d251dc2d0d 100644 --- a/sys/arch/atari/atari/machdep.c +++ b/sys/arch/atari/atari/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.151 2008/11/11 06:46:40 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.152 2008/11/12 12:35:57 ad Exp $ */ /* * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.151 2008/11/11 06:46:40 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.152 2008/11/12 12:35:57 ad Exp $"); #include "opt_ddb.h" #include "opt_compat_netbsd.h" @@ -198,7 +198,7 @@ consinit(void) */ cninit(); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) { extern int end; extern int *esym; diff --git a/sys/arch/atari/conf/majors.atari b/sys/arch/atari/conf/majors.atari index 9bf5ccdd747..075a88967ce 100644 --- a/sys/arch/atari/conf/majors.atari +++ b/sys/arch/atari/conf/majors.atari @@ -1,4 +1,4 @@ -# $NetBSD: majors.atari,v 1.20 2007/12/31 15:31:50 ad Exp $ +# $NetBSD: majors.atari,v 1.21 2008/11/12 12:35:57 ad Exp $ # # Device majors for atari # @@ -23,7 +23,6 @@ device-major fd char 16 block 2 fd | fdisa | hdfd device-major vnd char 17 block 0 vnd device-major filedesc char 18 device-major bpf char 19 bpfilter -device-major lkm char 20 lkm device-major ses char 26 ses device-major ccd char 27 block 13 ccd diff --git a/sys/arch/bebox/conf/GENERIC b/sys/arch/bebox/conf/GENERIC index 7018db23031..febbae2905a 100644 --- a/sys/arch/bebox/conf/GENERIC +++ b/sys/arch/bebox/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.112 2008/08/10 15:31:20 tls Exp $ +# $NetBSD: GENERIC,v 1.113 2008/11/12 12:35:57 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/bebox/conf/std.bebox" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.112 $" +#ident "GENERIC-$Revision: 1.113 $" maxusers 32 @@ -40,7 +40,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel diff --git a/sys/arch/bebox/conf/majors.bebox b/sys/arch/bebox/conf/majors.bebox index 8e2940f1473..f75bf6fae74 100644 --- a/sys/arch/bebox/conf/majors.bebox +++ b/sys/arch/bebox/conf/majors.bebox @@ -1,4 +1,4 @@ -# $NetBSD: majors.bebox,v 1.20 2007/12/31 15:31:50 ad Exp $ +# $NetBSD: majors.bebox,v 1.21 2008/11/12 12:35:57 ad Exp $ # # Device majors for bebox # @@ -31,7 +31,6 @@ device-major md char 24 block 17 md device-major joy char 26 joy device-major spkr char 27 spkr -device-major lkm char 28 lkm device-major mms char 35 mms device-major lms char 36 lms diff --git a/sys/arch/cats/cats/cats_machdep.c b/sys/arch/cats/cats/cats_machdep.c index 190e156e525..d76cfb07dba 100644 --- a/sys/arch/cats/cats/cats_machdep.c +++ b/sys/arch/cats/cats/cats_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: cats_machdep.c,v 1.61 2008/11/11 06:46:40 dyoung Exp $ */ +/* $NetBSD: cats_machdep.c,v 1.62 2008/11/12 12:35:57 ad Exp $ */ /* * Copyright (c) 1997,1998 Mark Brinicombe. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cats_machdep.c,v 1.61 2008/11/11 06:46:40 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cats_machdep.c,v 1.62 2008/11/12 12:35:57 ad Exp $"); #include "opt_ddb.h" #include "opt_pmap_debug.h" @@ -882,7 +882,7 @@ initarm(void *arm_bootargs) footbridge_intr_init(); printf("done.\n"); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) #ifdef __ELF__ /* ok this is really rather sick, in ELF what happens is that the * ELF symbol table is added after the text section. diff --git a/sys/arch/cats/conf/GENERIC b/sys/arch/cats/conf/GENERIC index 87dfce606d5..fbf7cb966f1 100644 --- a/sys/arch/cats/conf/GENERIC +++ b/sys/arch/cats/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.124 2008/09/20 14:56:57 chris Exp $ +# $NetBSD: GENERIC,v 1.125 2008/11/12 12:35:57 ad Exp $ # # GENERIC machine description file # @@ -157,7 +157,6 @@ options P1003_1B_SEMAPHORE # p1003.1b semaphore support # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics options SCSIVERBOSE # Verbose SCSI errors options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/cats/conf/INSTALL b/sys/arch/cats/conf/INSTALL index a07d9f45985..e385adbe532 100644 --- a/sys/arch/cats/conf/INSTALL +++ b/sys/arch/cats/conf/INSTALL @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.67 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: INSTALL,v 1.68 2008/11/12 12:35:57 ad Exp $ # # CATSINST -- CHALTECH CATS Install kernel # @@ -115,7 +115,6 @@ options MEMORY_DISK_SERVER=0 # no userspace memory disk support # Miscellaneous kernel options #options KTRACE # system call tracing, a la ktrace(1) #options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors #options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/cesfic/cesfic/machdep.c b/sys/arch/cesfic/cesfic/machdep.c index 2781670ba65..72bc9d3dd0e 100644 --- a/sys/arch/cesfic/cesfic/machdep.c +++ b/sys/arch/cesfic/cesfic/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.43 2008/11/11 06:46:40 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.44 2008/11/12 12:35:57 ad Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.43 2008/11/11 06:46:40 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.44 2008/11/12 12:35:57 ad Exp $"); #include "opt_bufcache.h" #include "opt_ddb.h" @@ -272,7 +272,7 @@ consinit() zscons.cn_getc = zs_kgdb_cngetc; } #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init(0, 0, 0); #endif #ifdef DDB diff --git a/sys/arch/cesfic/conf/GENERIC b/sys/arch/cesfic/conf/GENERIC index dbbf45c1f18..4dace19ab7b 100644 --- a/sys/arch/cesfic/conf/GENERIC +++ b/sys/arch/cesfic/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.50 2008/08/10 15:31:20 tls Exp $ +# $NetBSD: GENERIC,v 1.51 2008/11/12 12:35:57 ad Exp $ # # GENERIC machine description file # @@ -59,7 +59,6 @@ options COMPAT_40 # NetBSD 4.0 compatibility. #options P1003_1B_SEMAPHORE # p1003.1b semaphore support options KTRACE # system call tracing support #options NKMEMCLUSTERS=1024 # 4K pages in kernel malloc pool -#options LKM # Loadable kernel modules options COMPAT_SUNOS options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. diff --git a/sys/arch/cesfic/conf/majors.cesfic b/sys/arch/cesfic/conf/majors.cesfic index 73ded6bcf27..81797cb14a1 100644 --- a/sys/arch/cesfic/conf/majors.cesfic +++ b/sys/arch/cesfic/conf/majors.cesfic @@ -1,4 +1,4 @@ -# $NetBSD: majors.cesfic,v 1.19 2007/12/31 15:31:51 ad Exp $ +# $NetBSD: majors.cesfic,v 1.20 2008/11/12 12:35:58 ad Exp $ # # Device majors for cesfic # @@ -17,7 +17,6 @@ device-major zstty char 10 zstty device-major filedesc char 11 device-major bpf char 12 bpfilter device-major tun char 13 tun -device-major lkm char 14 lkm device-major md char 15 block 3 md device-major raid char 16 block 5 raid device-major sd char 17 block 6 sd diff --git a/sys/arch/cobalt/cobalt/machdep.c b/sys/arch/cobalt/cobalt/machdep.c index 0d5013e7061..7d71688e54c 100644 --- a/sys/arch/cobalt/cobalt/machdep.c +++ b/sys/arch/cobalt/cobalt/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.99 2008/11/11 06:46:40 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.100 2008/11/12 12:35:58 ad Exp $ */ /*- * Copyright (c) 2006 Izumi Tsutsui. All rights reserved. @@ -50,7 +50,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.99 2008/11/11 06:46:40 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.100 2008/11/12 12:35:58 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -86,7 +86,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.99 2008/11/11 06:46:40 dyoung Exp $"); #include "ksyms.h" -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) #include <machine/db_machdep.h> #include <ddb/db_extern.h> #define ELFSIZE DB_ELFSIZE @@ -152,7 +152,7 @@ mach_init(unsigned int memsize, u_int bim, char *bip) u_long first, last; extern char edata[], end[]; const char *bi_msg; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) int nsym = 0; char *ssym = 0; struct btinfo_symtab *bi_syms; @@ -165,7 +165,7 @@ mach_init(unsigned int memsize, u_int bim, char *bip) if (memcmp(((Elf_Ehdr *)end)->e_ident, ELFMAG, SELFMAG) == 0 && ((Elf_Ehdr *)end)->e_ident[EI_CLASS] == ELFCLASS) { esym = end; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) esym += ((Elf_Ehdr *)end)->e_entry; #endif kernend = (char *)mips_round_page(esym); @@ -209,7 +209,7 @@ mach_init(unsigned int memsize, u_int bim, char *bip) } else bi_msg = "invalid bootinfo (standalone boot?)\n"; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) bi_syms = lookup_bootinfo(BTINFO_SYMTAB); /* Load symbol table if present */ @@ -284,7 +284,7 @@ mach_init(unsigned int memsize, u_int bim, char *bip) decode_bootstring(); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* init symbols if present */ if ((bi_syms != NULL) && (esym != NULL)) ksyms_init(esym - ssym, ssym, esym); diff --git a/sys/arch/cobalt/conf/GENERIC b/sys/arch/cobalt/conf/GENERIC index 2878611c707..8297ccaad38 100644 --- a/sys/arch/cobalt/conf/GENERIC +++ b/sys/arch/cobalt/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.119 2008/10/30 16:27:15 tsutsui Exp $ +# $NetBSD: GENERIC,v 1.120 2008/11/12 12:35:58 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/cobalt/conf/std.cobalt" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.119 $" +#ident "GENERIC-$Revision: 1.120 $" maxusers 32 @@ -32,7 +32,6 @@ options SYSVMSG # System V message queues options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options NTP # network time protocol options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/cobalt/conf/INSTALL b/sys/arch/cobalt/conf/INSTALL index 94949280ca0..609fe18fdcc 100644 --- a/sys/arch/cobalt/conf/INSTALL +++ b/sys/arch/cobalt/conf/INSTALL @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.37 2008/10/30 16:27:16 tsutsui Exp $ +# $NetBSD: INSTALL,v 1.38 2008/11/12 12:35:58 ad Exp $ # # INSTALL -- installation and rescue kernel. # @@ -10,7 +10,7 @@ include "arch/cobalt/conf/std.cobalt" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "INSTALL-$Revision: 1.37 $" +#ident "INSTALL-$Revision: 1.38 $" makeoptions COPTS="-Os -mmemcpy" makeoptions CPUFLAGS="-march=vr5000 -mabi=32" @@ -28,7 +28,6 @@ maxusers 32 #options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default #options P1003_1B_SEMAPHORE # p1003.1b semaphore support -#options LKM # loadable kernel modules #options NTP # network time protocol #options USERCONF # userconf(4) support options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/cobalt/conf/majors.cobalt b/sys/arch/cobalt/conf/majors.cobalt index f006b2fe8f0..10427c37964 100644 --- a/sys/arch/cobalt/conf/majors.cobalt +++ b/sys/arch/cobalt/conf/majors.cobalt @@ -1,4 +1,4 @@ -# $NetBSD: majors.cobalt,v 1.24 2008/10/12 04:36:36 tsutsui Exp $ +# $NetBSD: majors.cobalt,v 1.25 2008/11/12 12:35:58 ad Exp $ # # Device majors for cobalt # @@ -20,7 +20,6 @@ device-major ptc char 13 pty device-major log char 14 device-major filedesc char 15 device-major rnd char 16 rnd -device-major lkm char 17 lkm device-major bpf char 18 bpfilter device-major tun char 19 tun device-major ipl char 20 ipfilter diff --git a/sys/arch/dreamcast/conf/majors.dreamcast b/sys/arch/dreamcast/conf/majors.dreamcast index 3c1a471b783..19f31db72a4 100644 --- a/sys/arch/dreamcast/conf/majors.dreamcast +++ b/sys/arch/dreamcast/conf/majors.dreamcast @@ -1,4 +1,4 @@ -# $NetBSD: majors.dreamcast,v 1.20 2007/12/31 15:31:52 ad Exp $ +# $NetBSD: majors.dreamcast,v 1.21 2008/11/12 12:35:58 ad Exp $ # # Device majors for dreamcast # @@ -28,7 +28,6 @@ device-major filedesc char 22 device-major bpf char 23 bpfilter device-major md char 24 block 17 md -device-major lkm char 28 lkm device-major tun char 40 tun device-major vnd char 41 block 14 vnd diff --git a/sys/arch/dreamcast/dreamcast/machdep.c b/sys/arch/dreamcast/dreamcast/machdep.c index 79862640e1c..537cc8e406a 100644 --- a/sys/arch/dreamcast/dreamcast/machdep.c +++ b/sys/arch/dreamcast/dreamcast/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.37 2008/11/11 06:46:41 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.38 2008/11/12 12:35:58 ad Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.37 2008/11/11 06:46:41 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.38 2008/11/12 12:35:58 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -139,7 +139,7 @@ dreamcast_startup(void) pmap_bootstrap(); /* Debugger. */ -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init(0, NULL, NULL); #endif #if defined(KGDB) && (NSCIF > 0) diff --git a/sys/arch/evbarm/adi_brh/brh_machdep.c b/sys/arch/evbarm/adi_brh/brh_machdep.c index cbd1a450619..b1dc2c6daed 100644 --- a/sys/arch/evbarm/adi_brh/brh_machdep.c +++ b/sys/arch/evbarm/adi_brh/brh_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: brh_machdep.c,v 1.29 2008/11/11 06:46:41 dyoung Exp $ */ +/* $NetBSD: brh_machdep.c,v 1.30 2008/11/12 12:35:58 ad Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: brh_machdep.c,v 1.29 2008/11/11 06:46:41 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: brh_machdep.c,v 1.30 2008/11/12 12:35:58 ad Exp $"); #include "opt_ddb.h" #include "opt_pmap_debug.h" @@ -803,7 +803,7 @@ initarm(void *arg) printf("done.\n"); #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* Firmware doesn't load symbols. */ ksyms_init(0, NULL, NULL); #endif diff --git a/sys/arch/evbarm/armadillo/armadillo9_machdep.c b/sys/arch/evbarm/armadillo/armadillo9_machdep.c index 16de9d3d288..1f072f28ad5 100644 --- a/sys/arch/evbarm/armadillo/armadillo9_machdep.c +++ b/sys/arch/evbarm/armadillo/armadillo9_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: armadillo9_machdep.c,v 1.12 2008/11/11 06:46:41 dyoung Exp $ */ +/* $NetBSD: armadillo9_machdep.c,v 1.13 2008/11/12 12:35:58 ad Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. @@ -110,7 +110,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: armadillo9_machdep.c,v 1.12 2008/11/11 06:46:41 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: armadillo9_machdep.c,v 1.13 2008/11/12 12:35:58 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -881,7 +881,7 @@ initarm(void *arg) boothowto = BOOTHOWTO; #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* Firmware doesn't load symbols. */ ksyms_init(0, NULL, NULL); #endif diff --git a/sys/arch/evbarm/conf/ADI_BRH b/sys/arch/evbarm/conf/ADI_BRH index 8458ad9724f..811013fa8e2 100644 --- a/sys/arch/evbarm/conf/ADI_BRH +++ b/sys/arch/evbarm/conf/ADI_BRH @@ -1,4 +1,4 @@ -# $NetBSD: ADI_BRH,v 1.43 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: ADI_BRH,v 1.44 2008/11/12 12:35:58 ad Exp $ # # ADI_BRH -- ADI Engineering "Big Red Head" i80200 Evaluation Board # @@ -119,7 +119,6 @@ options SHMMAXPGS=1024 # 1024 pages is the default # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/ARMADILLO210 b/sys/arch/evbarm/conf/ARMADILLO210 index 41dae6a5a00..964f6819ce1 100644 --- a/sys/arch/evbarm/conf/ARMADILLO210 +++ b/sys/arch/evbarm/conf/ARMADILLO210 @@ -1,4 +1,4 @@ -# $NetBSD: ARMADILLO210,v 1.8 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: ARMADILLO210,v 1.9 2008/11/12 12:35:58 ad Exp $ # # ARMADILLO210 -- Atmark Techno, Armadillo-210 # @@ -111,7 +111,6 @@ options CONUNIT=1 # Console port number # Miscellaneous kernel options #options KTRACE # system call tracing, a la ktrace(1) #options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors #options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/ARMADILLO9 b/sys/arch/evbarm/conf/ARMADILLO9 index f6aa57624a7..fbc486ce2d3 100644 --- a/sys/arch/evbarm/conf/ARMADILLO9 +++ b/sys/arch/evbarm/conf/ARMADILLO9 @@ -1,4 +1,4 @@ -# $NetBSD: ARMADILLO9,v 1.21 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: ARMADILLO9,v 1.22 2008/11/12 12:35:58 ad Exp $ # # ARMADILLO9 -- Atmark Techno, Armadillo-9 # @@ -110,7 +110,6 @@ options CONUNIT=0 # Console port number # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) #options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors #options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/BEAGLEBOARD b/sys/arch/evbarm/conf/BEAGLEBOARD index d0681172b43..7ef6630fbcf 100644 --- a/sys/arch/evbarm/conf/BEAGLEBOARD +++ b/sys/arch/evbarm/conf/BEAGLEBOARD @@ -1,5 +1,5 @@ # -# $NetBSD: BEAGLEBOARD,v 1.2 2008/10/22 17:38:59 matt Exp $ +# $NetBSD: BEAGLEBOARD,v 1.3 2008/11/12 12:35:58 ad Exp $ # # BEAGLEBOARD -- TI OMAP 3530 Eval Board Kernel # @@ -123,7 +123,6 @@ options SYSVSHM # System V-like memory sharing # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors #options MIIVERBOSE # Verbose MII autoconfuration messages diff --git a/sys/arch/evbarm/conf/CP3100 b/sys/arch/evbarm/conf/CP3100 index 73ca3ade387..5838a329f41 100644 --- a/sys/arch/evbarm/conf/CP3100 +++ b/sys/arch/evbarm/conf/CP3100 @@ -1,4 +1,4 @@ -# $NetBSD: CP3100,v 1.9 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: CP3100,v 1.10 2008/11/12 12:35:58 ad Exp $ # # CP3100 -- Certance CP3100 Kernel # @@ -124,7 +124,6 @@ options CONSPEED=115200 # Console speed # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors #options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/GEMINI b/sys/arch/evbarm/conf/GEMINI index 9248754a7f8..18fb5727b71 100644 --- a/sys/arch/evbarm/conf/GEMINI +++ b/sys/arch/evbarm/conf/GEMINI @@ -113,7 +113,6 @@ options SYSVSHM # System V-like memory sharing # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors #options MIIVERBOSE # Verbose MII autoconfuration messages diff --git a/sys/arch/evbarm/conf/GEMINI_MASTER b/sys/arch/evbarm/conf/GEMINI_MASTER index 2f20e959acd..1318614ed38 100644 --- a/sys/arch/evbarm/conf/GEMINI_MASTER +++ b/sys/arch/evbarm/conf/GEMINI_MASTER @@ -113,7 +113,6 @@ options MEMORY_DISK_DYNAMIC # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors #options MIIVERBOSE # Verbose MII autoconfuration messages diff --git a/sys/arch/evbarm/conf/GEMINI_SLAVE b/sys/arch/evbarm/conf/GEMINI_SLAVE index e2c0762b225..db1e8e63e38 100644 --- a/sys/arch/evbarm/conf/GEMINI_SLAVE +++ b/sys/arch/evbarm/conf/GEMINI_SLAVE @@ -112,7 +112,6 @@ options MEMORY_DISK_DYNAMIC # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors #options MIIVERBOSE # Verbose MII autoconfuration messages diff --git a/sys/arch/evbarm/conf/GUMSTIX b/sys/arch/evbarm/conf/GUMSTIX index 388ef3d856b..e165ee18038 100644 --- a/sys/arch/evbarm/conf/GUMSTIX +++ b/sys/arch/evbarm/conf/GUMSTIX @@ -1,4 +1,4 @@ -# $NetBSD: GUMSTIX,v 1.29 2008/10/19 11:34:31 joerg Exp $ +# $NetBSD: GUMSTIX,v 1.30 2008/11/12 12:35:58 ad Exp $ # # GUMSTIX -- Gumstix. Inc. gumstix platforms kernel # @@ -135,7 +135,6 @@ options P1003_1B_SEMAPHORE # p1003.1b semaphore support options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics options PCMCIAVERBOSE # verbose PCMCIA configuration messages #options USBVERBOSE # verbose USB device autoconfig messages diff --git a/sys/arch/evbarm/conf/HDL_G b/sys/arch/evbarm/conf/HDL_G index 140dcb0ce70..b2fa537a537 100644 --- a/sys/arch/evbarm/conf/HDL_G +++ b/sys/arch/evbarm/conf/HDL_G @@ -1,4 +1,4 @@ -# $NetBSD: HDL_G,v 1.11 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: HDL_G,v 1.12 2008/11/12 12:35:58 ad Exp $ # # HDL_G -- I-O DATA HDL-G Kernel # @@ -120,7 +120,6 @@ options P1003_1B_SEMAPHORE # p1003.1b semaphore support # Miscellaneous kernel options options KTRACE # system call tracing via ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/IMX31LITE b/sys/arch/evbarm/conf/IMX31LITE index 97092c5bcb0..7aec4f4795b 100644 --- a/sys/arch/evbarm/conf/IMX31LITE +++ b/sys/arch/evbarm/conf/IMX31LITE @@ -1,4 +1,4 @@ -# $NetBSD: IMX31LITE,v 1.4 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: IMX31LITE,v 1.5 2008/11/12 12:35:58 ad Exp $ # # IMX31LITE -- Freescale IMX31LITE Evaluation Board Kernel # @@ -115,7 +115,6 @@ options SHMMAXPGS=1024 # 1024 pages is the default # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options MIIVERBOSE # Verbose MII autoconfuration messages diff --git a/sys/arch/evbarm/conf/INTEGRATOR b/sys/arch/evbarm/conf/INTEGRATOR index ece4276a784..9694d05614e 100644 --- a/sys/arch/evbarm/conf/INTEGRATOR +++ b/sys/arch/evbarm/conf/INTEGRATOR @@ -1,4 +1,4 @@ -# $NetBSD: INTEGRATOR,v 1.52 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: INTEGRATOR,v 1.53 2008/11/12 12:35:58 ad Exp $ # # GENERIC -- ARM Integrator board Generic kernel # @@ -114,7 +114,6 @@ options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics options SCSIVERBOSE # Verbose SCSI errors options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/IQ31244 b/sys/arch/evbarm/conf/IQ31244 index 7bf578db52f..dab27385c79 100644 --- a/sys/arch/evbarm/conf/IQ31244 +++ b/sys/arch/evbarm/conf/IQ31244 @@ -1,4 +1,4 @@ -# $NetBSD: IQ31244,v 1.40 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: IQ31244,v 1.41 2008/11/12 12:35:58 ad Exp $ # # IQ31244 -- Intel IQ31244 Evaluation Board Kernel # @@ -117,7 +117,6 @@ options SHMMAXPGS=1024 # 1024 pages is the default # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/IQ80310 b/sys/arch/evbarm/conf/IQ80310 index 4c5db7756b0..b0ebee76f92 100644 --- a/sys/arch/evbarm/conf/IQ80310 +++ b/sys/arch/evbarm/conf/IQ80310 @@ -1,4 +1,4 @@ -# $NetBSD: IQ80310,v 1.61 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: IQ80310,v 1.62 2008/11/12 12:35:58 ad Exp $ # # IQ80310 -- Intel IQ80310 Evaluation Board Kernel # @@ -119,7 +119,6 @@ options SHMMAXPGS=1024 # 1024 pages is the default # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/IQ80321 b/sys/arch/evbarm/conf/IQ80321 index cfa0f7320f5..11e32331d18 100644 --- a/sys/arch/evbarm/conf/IQ80321 +++ b/sys/arch/evbarm/conf/IQ80321 @@ -1,4 +1,4 @@ -# $NetBSD: IQ80321,v 1.56 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: IQ80321,v 1.57 2008/11/12 12:35:58 ad Exp $ # # IQ80321 -- Intel IQ80321 Evaluation Board Kernel # @@ -117,7 +117,6 @@ options SHMMAXPGS=1024 # 1024 pages is the default # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/IXDP425 b/sys/arch/evbarm/conf/IXDP425 index 8e1d891cf78..7b7e293f90b 100644 --- a/sys/arch/evbarm/conf/IXDP425 +++ b/sys/arch/evbarm/conf/IXDP425 @@ -1,4 +1,4 @@ -# $NetBSD: IXDP425,v 1.24 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: IXDP425,v 1.25 2008/11/12 12:35:58 ad Exp $ # # IXDP425 -- Intel IXDP425/IXCDP1100 Development Platform # @@ -122,7 +122,6 @@ options CONUNIT=0 # Console port number # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/IXM1200 b/sys/arch/evbarm/conf/IXM1200 index 19bd87344bd..dec799068da 100644 --- a/sys/arch/evbarm/conf/IXM1200 +++ b/sys/arch/evbarm/conf/IXM1200 @@ -1,4 +1,4 @@ -# $NetBSD: IXM1200,v 1.35 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: IXM1200,v 1.36 2008/11/12 12:35:58 ad Exp $ # # IXM1200 -- Intel IXM1200 Evaluation Board Kernel # @@ -116,7 +116,6 @@ options SHMMAXPGS=1024 # 1024 pages is the default # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/LUBBOCK b/sys/arch/evbarm/conf/LUBBOCK index b5aba3007e0..8c06ada44c9 100644 --- a/sys/arch/evbarm/conf/LUBBOCK +++ b/sys/arch/evbarm/conf/LUBBOCK @@ -113,7 +113,6 @@ options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics options PCMCIAVERBOSE # verbose PCMCIA configuration messages #options SCSIVERBOSE # Verbose SCSI errors diff --git a/sys/arch/evbarm/conf/MPCSA_GENERIC b/sys/arch/evbarm/conf/MPCSA_GENERIC index 33612fba75c..005bb64acbf 100644 --- a/sys/arch/evbarm/conf/MPCSA_GENERIC +++ b/sys/arch/evbarm/conf/MPCSA_GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: MPCSA_GENERIC,v 1.5 2008/10/07 12:43:31 pgoyette Exp $ +# $NetBSD: MPCSA_GENERIC,v 1.6 2008/11/12 12:35:58 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/evbarm/conf/std.mpcsa" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.5 $" +#ident "GENERIC-$Revision: 1.6 $" maxusers 32 # estimated number of users @@ -68,7 +68,6 @@ options SYSVSHM # System V-like memory sharing #options SHMMAXPGS=2048 # 2048 pages is the default options P1003_1B_SEMAPHORE # p1003.1b semaphore support -#options LKM # loadable kernel modules #options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/evbarm/conf/NAPPI b/sys/arch/evbarm/conf/NAPPI index df871125e75..7f241feb387 100644 --- a/sys/arch/evbarm/conf/NAPPI +++ b/sys/arch/evbarm/conf/NAPPI @@ -1,4 +1,4 @@ -# $NetBSD: NAPPI,v 1.29 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: NAPPI,v 1.30 2008/11/12 12:35:58 ad Exp $ # # NAPPI -- Netwise APlication Platform Board Kernel # @@ -110,7 +110,6 @@ options SHMMAXPGS=1024 # 1024 pages is the default # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/NSLU2 b/sys/arch/evbarm/conf/NSLU2 index 24a2852dc8a..c12154bf079 100644 --- a/sys/arch/evbarm/conf/NSLU2 +++ b/sys/arch/evbarm/conf/NSLU2 @@ -1,4 +1,4 @@ -# $NetBSD: NSLU2,v 1.11 2008/05/30 20:10:01 tsutsui Exp $ +# $NetBSD: NSLU2,v 1.12 2008/11/12 12:35:58 ad Exp $ # # Linksys NSLU2 "Slug" NAS Device # @@ -121,7 +121,6 @@ options CONUNIT=0 # Console port number # Miscellaneous kernel options #options KTRACE # system call tracing, a la ktrace(1) #options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors #options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/OSK5912 b/sys/arch/evbarm/conf/OSK5912 index 88602e0cc22..c20e1c7819f 100644 --- a/sys/arch/evbarm/conf/OSK5912 +++ b/sys/arch/evbarm/conf/OSK5912 @@ -111,7 +111,6 @@ options SYSVSHM # System V-like memory sharing # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors #options MIIVERBOSE # Verbose MII autoconfuration messages diff --git a/sys/arch/evbarm/conf/SMDK2410 b/sys/arch/evbarm/conf/SMDK2410 index 11c6010f389..d8553b90a5f 100644 --- a/sys/arch/evbarm/conf/SMDK2410 +++ b/sys/arch/evbarm/conf/SMDK2410 @@ -1,4 +1,4 @@ -# $NetBSD: SMDK2410,v 1.34 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: SMDK2410,v 1.35 2008/11/12 12:35:58 ad Exp $ # # SMDK2410 -- Samsung's S3C2410 evaluation board. # @@ -126,7 +126,6 @@ options SYSVSHM # System V-like memory sharing # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) #XXX: options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics options SCSIVERBOSE # Verbose SCSI errors options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/SMDK2800 b/sys/arch/evbarm/conf/SMDK2800 index 700a9f9a450..22e7f186e2b 100644 --- a/sys/arch/evbarm/conf/SMDK2800 +++ b/sys/arch/evbarm/conf/SMDK2800 @@ -1,4 +1,4 @@ -# $NetBSD: SMDK2800,v 1.35 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: SMDK2800,v 1.36 2008/11/12 12:35:58 ad Exp $ # # SMDK2800 -- Samsung's S3C2800 evaluation board. # @@ -115,7 +115,6 @@ options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) #XXX: options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics options SCSIVERBOSE # Verbose SCSI errors options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/TEAMASA_NPWR b/sys/arch/evbarm/conf/TEAMASA_NPWR index 2368d0603f9..c9486f2b5fe 100644 --- a/sys/arch/evbarm/conf/TEAMASA_NPWR +++ b/sys/arch/evbarm/conf/TEAMASA_NPWR @@ -1,4 +1,4 @@ -# $NetBSD: TEAMASA_NPWR,v 1.57 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: TEAMASA_NPWR,v 1.58 2008/11/12 12:35:58 ad Exp $ # # TEAMASA_NPWR -- Team ASA, Inc. Npwr -- XScale/IOP310-based # server appliance. @@ -124,7 +124,6 @@ options SHMMAXPGS=1024 # 1024 pages is the default # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics options SCSIVERBOSE # Verbose SCSI errors options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/TEAMASA_NPWR_FC b/sys/arch/evbarm/conf/TEAMASA_NPWR_FC index 6148a1844b0..18237583abb 100644 --- a/sys/arch/evbarm/conf/TEAMASA_NPWR_FC +++ b/sys/arch/evbarm/conf/TEAMASA_NPWR_FC @@ -1,4 +1,4 @@ -# $NetBSD: TEAMASA_NPWR_FC,v 1.22 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: TEAMASA_NPWR_FC,v 1.23 2008/11/12 12:35:58 ad Exp $ # # TeamASA NPWR-FC, i80321-based SBC # @@ -118,7 +118,6 @@ options SHMMAXPGS=1024 # 1024 pages is the default # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/TISDP2420 b/sys/arch/evbarm/conf/TISDP2420 index 2380c40f58b..67541698679 100644 --- a/sys/arch/evbarm/conf/TISDP2420 +++ b/sys/arch/evbarm/conf/TISDP2420 @@ -1,5 +1,5 @@ # -# $NetBSD: TISDP2420,v 1.6 2008/10/21 23:45:06 matt Exp $ +# $NetBSD: TISDP2420,v 1.7 2008/11/12 12:35:58 ad Exp $ # # TISDP2420 -- TI OMAP 2420 Eval Board Kernel # @@ -123,7 +123,6 @@ options SYSVSHM # System V-like memory sharing # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors #options MIIVERBOSE # Verbose MII autoconfuration messages diff --git a/sys/arch/evbarm/conf/TISDP2430 b/sys/arch/evbarm/conf/TISDP2430 index 60e3ea3b500..daa8287b15a 100644 --- a/sys/arch/evbarm/conf/TISDP2430 +++ b/sys/arch/evbarm/conf/TISDP2430 @@ -1,5 +1,5 @@ # -# $NetBSD: TISDP2430,v 1.6 2008/10/30 04:27:35 matt Exp $ +# $NetBSD: TISDP2430,v 1.7 2008/11/12 12:35:58 ad Exp $ # # TISDP2430 -- TI OMAP 2430 Eval Board Kernel # @@ -122,7 +122,6 @@ options SYSVSHM # System V-like memory sharing # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors #options MIIVERBOSE # Verbose MII autoconfuration messages diff --git a/sys/arch/evbarm/conf/TS7200 b/sys/arch/evbarm/conf/TS7200 index eff0070dd21..470589277a1 100644 --- a/sys/arch/evbarm/conf/TS7200 +++ b/sys/arch/evbarm/conf/TS7200 @@ -1,4 +1,4 @@ -# $NetBSD: TS7200,v 1.33 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: TS7200,v 1.34 2008/11/12 12:35:58 ad Exp $ # # GENERIC -- Generic kernel # @@ -112,7 +112,6 @@ options SHMMAXPGS=1024 # 1024 pages is the default # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors #options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/TWINTAIL b/sys/arch/evbarm/conf/TWINTAIL index 301ddc205f2..45f3fb07e60 100644 --- a/sys/arch/evbarm/conf/TWINTAIL +++ b/sys/arch/evbarm/conf/TWINTAIL @@ -1,4 +1,4 @@ -# $NetBSD: TWINTAIL,v 1.25 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: TWINTAIL,v 1.26 2008/11/12 12:35:58 ad Exp $ # # TWINTAIL -- Genetec corp. G4255EB-X002 Evaluation Board Kernel # @@ -117,7 +117,6 @@ options COMPAT_16 # NetBSD 1.6 compatibility. # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics options PCMCIAVERBOSE # verbose PCMCIA configuration messages options USBVERBOSE # verbose USB device autoconfig messages diff --git a/sys/arch/evbarm/conf/VIPER b/sys/arch/evbarm/conf/VIPER index f65d94accdf..630dc540ef8 100644 --- a/sys/arch/evbarm/conf/VIPER +++ b/sys/arch/evbarm/conf/VIPER @@ -1,4 +1,4 @@ -# $NetBSD: VIPER,v 1.13 2008/05/30 20:10:01 tsutsui Exp $ +# $NetBSD: VIPER,v 1.14 2008/11/12 12:35:58 ad Exp $ # # Arcom Viper # @@ -112,7 +112,6 @@ options SHMMAXPGS=1024 # 1024 pages is the default # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors #options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/conf/ZAO425 b/sys/arch/evbarm/conf/ZAO425 index 8997a3d0dd1..fecafde1577 100644 --- a/sys/arch/evbarm/conf/ZAO425 +++ b/sys/arch/evbarm/conf/ZAO425 @@ -1,4 +1,4 @@ -# $NetBSD: ZAO425,v 1.32 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: ZAO425,v 1.33 2008/11/12 12:35:58 ad Exp $ # # ZAO425 -- Intel IXP425 # @@ -122,7 +122,6 @@ options CONUNIT=0 # Console port number # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/evbarm/gumstix/gumstix_machdep.c b/sys/arch/evbarm/gumstix/gumstix_machdep.c index feb6f9f41ed..bd2b2288864 100644 --- a/sys/arch/evbarm/gumstix/gumstix_machdep.c +++ b/sys/arch/evbarm/gumstix/gumstix_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: gumstix_machdep.c,v 1.10 2008/11/11 06:46:41 dyoung Exp $ */ +/* $NetBSD: gumstix_machdep.c,v 1.11 2008/11/12 12:35:59 ad Exp $ */ /* * Copyright (C) 2005, 2006, 2007 WIDE Project and SOUM Corporation. * All rights reserved. @@ -387,9 +387,9 @@ static const struct pmap_devmap gumstix_devmap[] = { VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, { - GUMSTIX_CLKMAN_VBASE, - _A(PXA2X0_CLKMAN_BASE), - _S(PXA2X0_CLKMAN_SIZE), + GUMSTIX_CMODULARAN_VBASE, + _A(PXA2X0_CMODULARAN_BASE), + _S(PXA2X0_CMODULARAN_SIZE), VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, { @@ -461,7 +461,7 @@ initarm(void *arg) pmap_devmap_bootstrap((vaddr_t)read_ttb(), gumstix_devmap); /* start 32.768kHz OSC */ - ioreg_write(GUMSTIX_CLKMAN_VBASE + CLKMAN_OSCC, OSCC_OON); + ioreg_write(GUMSTIX_CMODULARAN_VBASE + CMODULARAN_OSCC, OSCC_OON); /* Get ready for splfoo() */ pxa2x0_intr_bootstrap(GUMSTIX_INTCTL_VBASE); @@ -860,7 +860,7 @@ initarm(void *arg) } #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* Firmware doesn't load symbols. */ ddb_init(0, NULL, NULL); #endif @@ -983,7 +983,7 @@ void consinit(void) { static int consinit_called = 0; - uint32_t ckenreg = ioreg_read(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN); + uint32_t ckenreg = ioreg_read(GUMSTIX_CMODULARAN_VBASE + CMODULARAN_CKEN); if (consinit_called != 0) return; @@ -1001,7 +1001,7 @@ consinit(void) { if (0 == comcnattach(&pxa2x0_a4x_bs_tag, PXA2X0_FFUART_BASE, comcnspeed, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comcnmode)) { - ioreg_write(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN, + ioreg_write(GUMSTIX_CMODULARAN_VBASE + CMODULARAN_CKEN, ckenreg|CKEN_FFUART); return; @@ -1018,7 +1018,7 @@ consinit(void) { if (0 == comcnattach(&pxa2x0_a4x_bs_tag, PXA2X0_STUART_BASE, comcnspeed, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comcnmode)) { - ioreg_write(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN, + ioreg_write(GUMSTIX_CMODULARAN_VBASE + CMODULARAN_CKEN, ckenreg|CKEN_STUART); return; } @@ -1034,7 +1034,7 @@ consinit(void) { if (0 == comcnattach(&pxa2x0_a4x_bs_tag, PXA2X0_BTUART_BASE, comcnspeed, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comcnmode)) { - ioreg_write(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN, + ioreg_write(GUMSTIX_CMODULARAN_VBASE + CMODULARAN_CKEN, ckenreg|CKEN_BTUART); return; } @@ -1050,7 +1050,7 @@ consinit(void) { if (0 == comcnattach(&pxa2x0_a4x_bs_tag, PXA2X0_HWUART_BASE, comcnspeed, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comcnmode)) { - ioreg_write(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN, + ioreg_write(GUMSTIX_CMODULARAN_VBASE + CMODULARAN_CKEN, ckenreg|CKEN_HWUART); return; } @@ -1067,7 +1067,7 @@ kgdb_port_init(void) { #if (NCOM > 0) && defined(COM_PXA2X0) paddr_t paddr = 0; - uint32_t ckenreg = ioreg_read(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN); + uint32_t ckenreg = ioreg_read(GUMSTIX_CMODULARAN_VBASE + CMODULARAN_CKEN); if (0 == strcmp(kgdb_devname, "ffuart")) { paddr = PXA2X0_FFUART_BASE; @@ -1087,7 +1087,7 @@ kgdb_port_init(void) 0 == com_kgdb_attach(&pxa2x0_a4x_bs_tag, paddr, kgdb_devrate, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comkgdbmode)) { - ioreg_write(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN, ckenreg); + ioreg_write(GUMSTIX_CMODULARAN_VBASE + CMODULARAN_CKEN, ckenreg); } diff --git a/sys/arch/evbarm/hdl_g/hdlg_machdep.c b/sys/arch/evbarm/hdl_g/hdlg_machdep.c index bb7ae2cf277..1d261fba78e 100644 --- a/sys/arch/evbarm/hdl_g/hdlg_machdep.c +++ b/sys/arch/evbarm/hdl_g/hdlg_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: hdlg_machdep.c,v 1.7 2008/11/11 06:46:41 dyoung Exp $ */ +/* $NetBSD: hdlg_machdep.c,v 1.8 2008/11/12 12:35:59 ad Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hdlg_machdep.c,v 1.7 2008/11/11 06:46:41 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hdlg_machdep.c,v 1.8 2008/11/12 12:35:59 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -649,7 +649,7 @@ initarm(void *arg) boothowto = BOOTHOWTO; #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* Firmware doesn't load symbols. */ ksyms_init(0, NULL, NULL); #endif diff --git a/sys/arch/evbarm/integrator/integrator_machdep.c b/sys/arch/evbarm/integrator/integrator_machdep.c index be1dd2b3a55..f746985ccca 100644 --- a/sys/arch/evbarm/integrator/integrator_machdep.c +++ b/sys/arch/evbarm/integrator/integrator_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: integrator_machdep.c,v 1.59 2008/11/11 06:46:41 dyoung Exp $ */ +/* $NetBSD: integrator_machdep.c,v 1.60 2008/11/12 12:35:59 ad Exp $ */ /* * Copyright (c) 2001,2002 ARM Ltd @@ -68,7 +68,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: integrator_machdep.c,v 1.59 2008/11/11 06:46:41 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: integrator_machdep.c,v 1.60 2008/11/12 12:35:59 ad Exp $"); #include "opt_ddb.h" #include "opt_pmap_debug.h" @@ -779,7 +779,7 @@ initarm(void *arg) printf("done.\n"); #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* Firmware doesn't load symbols. */ ksyms_init(0, NULL, NULL); #endif diff --git a/sys/arch/evbarm/iq80310/iq80310_machdep.c b/sys/arch/evbarm/iq80310/iq80310_machdep.c index 7fa2fa84c94..34cae84147c 100644 --- a/sys/arch/evbarm/iq80310/iq80310_machdep.c +++ b/sys/arch/evbarm/iq80310/iq80310_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: iq80310_machdep.c,v 1.71 2008/11/11 06:46:41 dyoung Exp $ */ +/* $NetBSD: iq80310_machdep.c,v 1.72 2008/11/12 12:35:59 ad Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iq80310_machdep.c,v 1.71 2008/11/11 06:46:41 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iq80310_machdep.c,v 1.72 2008/11/12 12:35:59 ad Exp $"); #include "opt_ddb.h" #include "opt_pmap_debug.h" @@ -765,7 +765,7 @@ initarm(void *arg) printf("done.\n"); #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* Firmware doesn't load symbols. */ ksyms_init(0, NULL, NULL); #endif diff --git a/sys/arch/evbarm/iq80321/iq80321_machdep.c b/sys/arch/evbarm/iq80321/iq80321_machdep.c index 0881aaf912a..55b4d292399 100644 --- a/sys/arch/evbarm/iq80321/iq80321_machdep.c +++ b/sys/arch/evbarm/iq80321/iq80321_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: iq80321_machdep.c,v 1.40 2008/11/11 06:46:41 dyoung Exp $ */ +/* $NetBSD: iq80321_machdep.c,v 1.41 2008/11/12 12:35:59 ad Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iq80321_machdep.c,v 1.40 2008/11/11 06:46:41 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iq80321_machdep.c,v 1.41 2008/11/12 12:35:59 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -784,7 +784,7 @@ initarm(void *arg) boothowto = BOOTHOWTO; #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* Firmware doesn't load symbols. */ ksyms_init(0, NULL, NULL); #endif diff --git a/sys/arch/evbarm/ixdp425/ixdp425_machdep.c b/sys/arch/evbarm/ixdp425/ixdp425_machdep.c index fba8bc11cd1..6d3a2ad5d8d 100644 --- a/sys/arch/evbarm/ixdp425/ixdp425_machdep.c +++ b/sys/arch/evbarm/ixdp425/ixdp425_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: ixdp425_machdep.c,v 1.18 2008/11/11 06:46:41 dyoung Exp $ */ +/* $NetBSD: ixdp425_machdep.c,v 1.19 2008/11/12 12:35:59 ad Exp $ */ /* * Copyright (c) 2003 * Ichiro FUKUHARA <ichiro@ichiro.org>. @@ -70,7 +70,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ixdp425_machdep.c,v 1.18 2008/11/11 06:46:41 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixdp425_machdep.c,v 1.19 2008/11/12 12:35:59 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -765,7 +765,7 @@ initarm(void *arg) boothowto = BOOTHOWTO; #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* Firmware doesn't load symbols. */ ksyms_init(0, NULL, NULL); #endif diff --git a/sys/arch/evbarm/ixm1200/ixm1200_machdep.c b/sys/arch/evbarm/ixm1200/ixm1200_machdep.c index 1b2009fc544..30183a6929e 100644 --- a/sys/arch/evbarm/ixm1200/ixm1200_machdep.c +++ b/sys/arch/evbarm/ixm1200/ixm1200_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: ixm1200_machdep.c,v 1.35 2008/11/11 06:46:41 dyoung Exp $ */ +/* $NetBSD: ixm1200_machdep.c,v 1.36 2008/11/12 12:35:59 ad Exp $ */ /* * Copyright (c) 2002, 2003 @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ixm1200_machdep.c,v 1.35 2008/11/11 06:46:41 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixm1200_machdep.c,v 1.36 2008/11/12 12:35:59 ad Exp $"); #include "opt_ddb.h" #include "opt_pmap_debug.h" @@ -89,7 +89,7 @@ __KERNEL_RCSID(0, "$NetBSD: ixm1200_machdep.c,v 1.35 2008/11/11 06:46:41 dyoung #include "ksyms.h" -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) #include <machine/db_machdep.h> #include <ddb/db_sym.h> #include <ddb/db_extern.h> @@ -360,7 +360,7 @@ initarm(void *arg) u_int kerneldatasize, symbolsize; vaddr_t l1pagetable; vaddr_t freemempos; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) Elf_Shdr *sh; #endif @@ -394,7 +394,7 @@ initarm(void *arg) pmap_debug(-1); #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) if (! memcmp(&end, "\177ELF", 4)) { sh = (Elf_Shdr *)((char *)&end + ((Elf_Ehdr *)&end)->e_shoff); loop = ((Elf_Ehdr *)&end)->e_shnum; @@ -741,7 +741,7 @@ initarm(void *arg) printf("bootstrap done.\n"); #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init(symbolsize, ((int *)&end), ((char *)&end) + symbolsize); #endif diff --git a/sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c b/sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c index 0d46cd1c1f9..e95aa1e6a19 100644 --- a/sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c +++ b/sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: npwr_fc_machdep.c,v 1.7 2008/11/11 06:46:41 dyoung Exp $ */ +/* $NetBSD: npwr_fc_machdep.c,v 1.8 2008/11/12 12:35:59 ad Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: npwr_fc_machdep.c,v 1.7 2008/11/11 06:46:41 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npwr_fc_machdep.c,v 1.8 2008/11/12 12:35:59 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -766,7 +766,7 @@ initarm(void *arg) boothowto = BOOTHOWTO; #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* Firmware doesn't load symbols. */ ksyms_init(0, NULL, NULL); #endif diff --git a/sys/arch/evbarm/nslu2/nslu2_machdep.c b/sys/arch/evbarm/nslu2/nslu2_machdep.c index fd38977f0c7..4592cd3b429 100644 --- a/sys/arch/evbarm/nslu2/nslu2_machdep.c +++ b/sys/arch/evbarm/nslu2/nslu2_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: nslu2_machdep.c,v 1.8 2008/11/11 06:46:41 dyoung Exp $ */ +/* $NetBSD: nslu2_machdep.c,v 1.9 2008/11/12 12:35:59 ad Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -100,7 +100,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nslu2_machdep.c,v 1.8 2008/11/11 06:46:41 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nslu2_machdep.c,v 1.9 2008/11/12 12:35:59 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -833,7 +833,7 @@ initarm(void *arg) boothowto = BOOTHOWTO; #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* Firmware doesn't load symbols. */ ksyms_init(0, NULL, NULL); #endif diff --git a/sys/arch/evbarm/smdk2xx0/smdk2410_machdep.c b/sys/arch/evbarm/smdk2xx0/smdk2410_machdep.c index 33f74c693f1..b1ac3f8c5c1 100644 --- a/sys/arch/evbarm/smdk2xx0/smdk2410_machdep.c +++ b/sys/arch/evbarm/smdk2xx0/smdk2410_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: smdk2410_machdep.c,v 1.19 2008/11/11 06:46:41 dyoung Exp $ */ +/* $NetBSD: smdk2410_machdep.c,v 1.20 2008/11/12 12:35:59 ad Exp $ */ /* * Copyright (c) 2002, 2003 Fujitsu Component Limited @@ -105,7 +105,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: smdk2410_machdep.c,v 1.19 2008/11/11 06:46:41 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smdk2410_machdep.c,v 1.20 2008/11/12 12:35:59 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -365,7 +365,7 @@ cpu_reboot(int howto, char *bootstr) #define GPIO_VBASE _V(0) #define INTCTL_VBASE _V(1) -#define CLKMAN_VBASE _V(2) +#define CMODULARAN_VBASE _V(2) #define UART_VBASE _V(3) #ifdef MEMORY_DISK_DYNAMIC #define MEMORY_DISK_VADDR _V(4) @@ -386,9 +386,9 @@ static const struct pmap_devmap smdk2410_devmap[] = { VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, { - CLKMAN_VBASE, - _A(S3C2410_CLKMAN_BASE), - _S(S3C24X0_CLKMAN_SIZE), + CMODULARAN_VBASE, + _A(S3C2410_CMODULARAN_BASE), + _S(S3C24X0_CMODULARAN_SIZE), VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, { /* UART registers for UART0, 1, 2. */ @@ -918,7 +918,7 @@ initarm(void *arg) } #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* Firmware doesn't load symbols. */ ksyms_init(0, NULL, NULL); #endif @@ -945,7 +945,7 @@ consinit(void) consinit_done = 1; - s3c24x0_clock_freq2(CLKMAN_VBASE, NULL, NULL, &pclk); + s3c24x0_clock_freq2(CMODULARAN_VBASE, NULL, NULL, &pclk); #if NSSCOM > 0 #ifdef SSCOM0CONSOLE @@ -1000,7 +1000,7 @@ kgdb_port_init(void) unit = 1; if (unit >= 0) { - s3c24x0_clock_freq2(CLKMAN_VBASE, NULL, NULL, &pclk); + s3c24x0_clock_freq2(CMODULARAN_VBASE, NULL, NULL, &pclk); s3c2410_sscom_kgdb_attach(&s3c2xx0_bs_tag, unit, kgdb_rate, pclk, kgdb_sscom_mode); diff --git a/sys/arch/evbarm/smdk2xx0/smdk2800_machdep.c b/sys/arch/evbarm/smdk2xx0/smdk2800_machdep.c index b318edc0263..b7ee24f2372 100644 --- a/sys/arch/evbarm/smdk2xx0/smdk2800_machdep.c +++ b/sys/arch/evbarm/smdk2xx0/smdk2800_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: smdk2800_machdep.c,v 1.27 2008/11/11 06:46:41 dyoung Exp $ */ +/* $NetBSD: smdk2800_machdep.c,v 1.28 2008/11/12 12:35:59 ad Exp $ */ /* * Copyright (c) 2002, 2003, 2005 Fujitsu Component Limited @@ -106,7 +106,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: smdk2800_machdep.c,v 1.27 2008/11/11 06:46:41 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smdk2800_machdep.c,v 1.28 2008/11/12 12:35:59 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -835,7 +835,7 @@ initarm(void *arg) } #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* Firmware doesn't load symbols. */ ksyms_init(0, NULL, NULL); #endif @@ -864,7 +864,7 @@ consinit(void) pmap_devmap_register(smdk2800_devmap); - s3c2800_clock_freq2(ioreg_vaddr(S3C2800_CLKMAN_BASE), NULL, NULL, &pclk); + s3c2800_clock_freq2(ioreg_vaddr(S3C2800_CMODULARAN_BASE), NULL, NULL, &pclk); #if NSSCOM > 0 #ifdef SSCOM0CONSOLE @@ -919,7 +919,7 @@ kgdb_port_init(void) unit = 1; if (unit >= 0) { - s3c2800_clock_freq2(ioreg_vaddr(S3C2800_CLKMAN_BASE), + s3c2800_clock_freq2(ioreg_vaddr(S3C2800_CMODULARAN_BASE), NULL, NULL, &pclk); s3c2800_sscom_kgdb_attach(&s3c2xx0_bs_tag, diff --git a/sys/arch/evbarm/tsarm/tsarm_machdep.c b/sys/arch/evbarm/tsarm/tsarm_machdep.c index cbf58af126d..16acdbe1d00 100644 --- a/sys/arch/evbarm/tsarm/tsarm_machdep.c +++ b/sys/arch/evbarm/tsarm/tsarm_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: tsarm_machdep.c,v 1.8 2008/11/11 06:46:41 dyoung Exp $ */ +/* $NetBSD: tsarm_machdep.c,v 1.9 2008/11/12 12:35:59 ad Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tsarm_machdep.c,v 1.8 2008/11/11 06:46:41 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tsarm_machdep.c,v 1.9 2008/11/12 12:35:59 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -801,7 +801,7 @@ initarm(void *arg) boothowto = BOOTHOWTO; #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* Firmware doesn't load symbols. */ ksyms_init(0, NULL, NULL); #endif diff --git a/sys/arch/evbmips/adm5120/machdep.c b/sys/arch/evbmips/adm5120/machdep.c index b5800f178b6..1122eb4ca81 100644 --- a/sys/arch/evbmips/adm5120/machdep.c +++ b/sys/arch/evbmips/adm5120/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.7 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.8 2008/11/12 12:35:59 ad Exp $ */ /*- * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko. @@ -107,7 +107,7 @@ */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.7 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.8 2008/11/12 12:35:59 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -140,7 +140,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.7 2008/11/11 06:46:42 dyoung Exp $"); #include "ksyms.h" -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) #include <machine/db_machdep.h> #include <ddb/db_extern.h> #endif @@ -447,7 +447,7 @@ mach_init(int argc, char **argv, void *a2, void *a3) /* * Initialize debuggers, and break into them, if appropriate. */ -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init(0, 0, 0); #endif #ifdef DDB diff --git a/sys/arch/evbmips/alchemy/machdep.c b/sys/arch/evbmips/alchemy/machdep.c index adaa48de7af..258d7cb8a2b 100644 --- a/sys/arch/evbmips/alchemy/machdep.c +++ b/sys/arch/evbmips/alchemy/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.38 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.39 2008/11/12 12:35:59 ad Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -107,7 +107,7 @@ */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.38 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.39 2008/11/12 12:35:59 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -137,7 +137,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.38 2008/11/11 06:46:42 dyoung Exp $"); #include "ksyms.h" -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) #include <machine/db_machdep.h> #include <ddb/db_extern.h> #endif @@ -373,7 +373,7 @@ mach_init(int argc, char **argv, yamon_env_var *envp, u_long memsize) /* * Initialize debuggers, and break into them, if appropriate. */ -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init(0, 0, 0); #endif #ifdef DDB diff --git a/sys/arch/evbmips/atheros/machdep.c b/sys/arch/evbmips/atheros/machdep.c index f831867de95..0b06be58613 100644 --- a/sys/arch/evbmips/atheros/machdep.c +++ b/sys/arch/evbmips/atheros/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.14 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.15 2008/11/12 12:35:59 ad Exp $ */ /* * Copyright (c) 2006 Urbana-Champaign Independent Media Center. @@ -147,7 +147,7 @@ */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.14 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.15 2008/11/12 12:35:59 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -171,7 +171,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.14 2008/11/11 06:46:42 dyoung Exp $"); #include "ksyms.h" -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) #include <machine/db_machdep.h> #include <ddb/db_extern.h> #endif @@ -339,7 +339,7 @@ mach_init(void) /* * Initialize debuggers, and break into them, if appropriate. */ -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init(0, 0, 0); #endif diff --git a/sys/arch/evbmips/conf/ALCHEMY b/sys/arch/evbmips/conf/ALCHEMY index a163f567998..f2f831b2c16 100644 --- a/sys/arch/evbmips/conf/ALCHEMY +++ b/sys/arch/evbmips/conf/ALCHEMY @@ -1,11 +1,11 @@ -# $NetBSD: ALCHEMY,v 1.20 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: ALCHEMY,v 1.21 2008/11/12 12:35:59 ad Exp $ # # Kernel config for the Alchemy Semiconductor (AMD) PB1000, PB1500, # DBAu1000 and DBAu1500 evaluation boards. include "arch/evbmips/conf/std.alchemy" -#ident "ALCHEMY-$Revision: 1.20 $" +#ident "ALCHEMY-$Revision: 1.21 $" maxusers 32 @@ -38,7 +38,6 @@ options SYSVMSG # System V message queues options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules options NTP # network time protocol # Debugging options diff --git a/sys/arch/evbmips/conf/AP30 b/sys/arch/evbmips/conf/AP30 index a14bccc7892..657fa5feca4 100644 --- a/sys/arch/evbmips/conf/AP30 +++ b/sys/arch/evbmips/conf/AP30 @@ -1,10 +1,10 @@ -# $NetBSD: AP30,v 1.10 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: AP30,v 1.11 2008/11/12 12:35:59 ad Exp $ include "arch/evbmips/conf/std.atheros" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "AP30-$Revision: 1.10 $" +#ident "AP30-$Revision: 1.11 $" maxusers 32 @@ -35,7 +35,6 @@ options SOSEND_NO_LOAN #options SYSVSEM # System V semaphores #options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules options NTP # network time protocol # Debugging options diff --git a/sys/arch/evbmips/conf/MALTA b/sys/arch/evbmips/conf/MALTA index 263655b2235..98b62778c01 100644 --- a/sys/arch/evbmips/conf/MALTA +++ b/sys/arch/evbmips/conf/MALTA @@ -1,10 +1,10 @@ -# $NetBSD: MALTA,v 1.48 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: MALTA,v 1.49 2008/11/12 12:35:59 ad Exp $ include "arch/evbmips/conf/std.malta" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "MALTA-$Revision: 1.48 $" +#ident "MALTA-$Revision: 1.49 $" maxusers 32 @@ -26,7 +26,6 @@ options SYSVMSG # System V message queues options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules options NTP # network time protocol # Debugging options diff --git a/sys/arch/evbmips/conf/MERAKI b/sys/arch/evbmips/conf/MERAKI index 7e38b2c1098..213c89ce49a 100644 --- a/sys/arch/evbmips/conf/MERAKI +++ b/sys/arch/evbmips/conf/MERAKI @@ -1,10 +1,10 @@ -# $NetBSD: MERAKI,v 1.6 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: MERAKI,v 1.7 2008/11/12 12:35:59 ad Exp $ include "arch/evbmips/conf/std.meraki" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "AP30-$Revision: 1.6 $" +#ident "AP30-$Revision: 1.7 $" maxusers 32 @@ -35,7 +35,6 @@ options SOSEND_NO_LOAN #options SYSVSEM # System V semaphores #options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules options NTP # network time protocol # Debugging options diff --git a/sys/arch/evbmips/conf/WGT624V3 b/sys/arch/evbmips/conf/WGT624V3 index eecf60d29a1..b8b5bfe5a8d 100644 --- a/sys/arch/evbmips/conf/WGT624V3 +++ b/sys/arch/evbmips/conf/WGT624V3 @@ -1,10 +1,10 @@ -# $NetBSD: WGT624V3,v 1.3 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: WGT624V3,v 1.4 2008/11/12 12:35:59 ad Exp $ include "arch/evbmips/conf/std.atheros" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "AP30-$Revision: 1.3 $" +#ident "AP30-$Revision: 1.4 $" maxusers 32 @@ -36,7 +36,6 @@ options SOSEND_NO_LOAN #options SYSVSEM # System V semaphores #options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules options NTP # network time protocol # Debugging options diff --git a/sys/arch/evbmips/conf/majors.evbmips b/sys/arch/evbmips/conf/majors.evbmips index 9b086f7ae5c..5d62c073a34 100644 --- a/sys/arch/evbmips/conf/majors.evbmips +++ b/sys/arch/evbmips/conf/majors.evbmips @@ -1,4 +1,4 @@ -# $NetBSD: majors.evbmips,v 1.23 2007/12/31 15:31:53 ad Exp $ +# $NetBSD: majors.evbmips,v 1.24 2008/11/12 12:35:59 ad Exp $ # # Device majors for evbmips # @@ -19,7 +19,6 @@ device-major st char 12 block 2 st device-major cd char 13 block 3 cd device-major ch char 14 ch -device-major lkm char 16 lkm device-major sbjcn char 17 jtagconsole device-major sbscn char 17 sbscn & !jtagconsole diff --git a/sys/arch/evbmips/malta/machdep.c b/sys/arch/evbmips/malta/machdep.c index 8cac9ac006c..a789c603b99 100644 --- a/sys/arch/evbmips/malta/machdep.c +++ b/sys/arch/evbmips/malta/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.29 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.30 2008/11/12 12:35:59 ad Exp $ */ /* * Copyright 2001, 2002 Wasabi Systems, Inc. @@ -112,7 +112,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.29 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.30 2008/11/12 12:35:59 ad Exp $"); #include "opt_ddb.h" #include "opt_execfmt.h" @@ -136,7 +136,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.29 2008/11/11 06:46:42 dyoung Exp $"); #include "ksyms.h" -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) #include <machine/db_machdep.h> #include <ddb/db_extern.h> #endif @@ -329,7 +329,7 @@ mach_init(int argc, char **argv, yamon_env_var *envp, u_long memsize) /* * Initialize debuggers, and break into them, if appropriate. */ -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init(0, 0, 0); #endif diff --git a/sys/arch/evbppc/conf/EV64260 b/sys/arch/evbppc/conf/EV64260 index 540c05c1da9..abc05c0b779 100644 --- a/sys/arch/evbppc/conf/EV64260 +++ b/sys/arch/evbppc/conf/EV64260 @@ -1,4 +1,4 @@ -# $NetBSD: EV64260,v 1.36 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: EV64260,v 1.37 2008/11/12 12:35:59 ad Exp $ # # MVP -- Motorola's Multiprocessing Verification Platform # @@ -46,7 +46,6 @@ options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules #options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/evbppc/conf/EXPLORA451 b/sys/arch/evbppc/conf/EXPLORA451 index 64b41af4c2a..18a440bd984 100644 --- a/sys/arch/evbppc/conf/EXPLORA451 +++ b/sys/arch/evbppc/conf/EXPLORA451 @@ -1,4 +1,4 @@ -# $NetBSD: EXPLORA451,v 1.35 2008/07/31 07:41:00 simonb Exp $ +# $NetBSD: EXPLORA451,v 1.36 2008/11/12 12:35:59 ad Exp $ # # GENERIC -- everything that's currently supported # @@ -35,7 +35,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing #options SHMMAXPGS=2048 # 2048 pages is the default -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/evbppc/conf/OPENBLOCKS200 b/sys/arch/evbppc/conf/OPENBLOCKS200 index 150a6ff18be..744edd46aea 100644 --- a/sys/arch/evbppc/conf/OPENBLOCKS200 +++ b/sys/arch/evbppc/conf/OPENBLOCKS200 @@ -1,4 +1,4 @@ -# $NetBSD: OPENBLOCKS200,v 1.19 2008/07/31 07:41:01 simonb Exp $ +# $NetBSD: OPENBLOCKS200,v 1.20 2008/11/12 12:35:59 ad Exp $ # # GENERIC -- everything that's currently supported # @@ -30,7 +30,6 @@ options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules #options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/evbppc/conf/OPENBLOCKS266 b/sys/arch/evbppc/conf/OPENBLOCKS266 index 5aed75f31e1..f3749275d41 100644 --- a/sys/arch/evbppc/conf/OPENBLOCKS266 +++ b/sys/arch/evbppc/conf/OPENBLOCKS266 @@ -1,4 +1,4 @@ -# $NetBSD: OPENBLOCKS266,v 1.41 2008/07/31 07:41:01 simonb Exp $ +# $NetBSD: OPENBLOCKS266,v 1.42 2008/11/12 12:35:59 ad Exp $ # # GENERIC -- everything that's currently supported # @@ -7,7 +7,7 @@ include "arch/evbppc/conf/std.obs405" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "OPENBLOCKS266-$Revision: 1.41 $" +#ident "OPENBLOCKS266-$Revision: 1.42 $" maxusers 32 @@ -25,7 +25,6 @@ options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support -#options LKM # loadable kernel modules #options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/evbppc/conf/PMPPC b/sys/arch/evbppc/conf/PMPPC index 8e958569a36..7f7216ef391 100644 --- a/sys/arch/evbppc/conf/PMPPC +++ b/sys/arch/evbppc/conf/PMPPC @@ -1,4 +1,4 @@ -# $NetBSD: PMPPC,v 1.5 2008/07/31 07:41:01 simonb Exp $ +# $NetBSD: PMPPC,v 1.6 2008/11/12 12:35:59 ad Exp $ # # PMPPC # @@ -24,7 +24,6 @@ options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/evbppc/conf/VIRTEX_DFC b/sys/arch/evbppc/conf/VIRTEX_DFC index 768b23d0331..8dae187d347 100644 --- a/sys/arch/evbppc/conf/VIRTEX_DFC +++ b/sys/arch/evbppc/conf/VIRTEX_DFC @@ -1,4 +1,4 @@ -# $NetBSD: VIRTEX_DFC,v 1.3 2008/07/31 07:41:01 simonb Exp $ +# $NetBSD: VIRTEX_DFC,v 1.4 2008/11/12 12:36:00 ad Exp $ # # VIRTEX_DFC # @@ -42,7 +42,6 @@ options KTRACE # system call tracing via ktrace(1) #options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules #options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/evbppc/conf/VIRTEX_GSRD1 b/sys/arch/evbppc/conf/VIRTEX_GSRD1 index a8f547e33c2..16b4aab5795 100644 --- a/sys/arch/evbppc/conf/VIRTEX_GSRD1 +++ b/sys/arch/evbppc/conf/VIRTEX_GSRD1 @@ -1,4 +1,4 @@ -# $NetBSD: VIRTEX_GSRD1,v 1.3 2008/07/31 07:41:01 simonb Exp $ +# $NetBSD: VIRTEX_GSRD1,v 1.4 2008/11/12 12:36:00 ad Exp $ # # VIRTEX_GSRD1 # @@ -36,7 +36,6 @@ options UVMHIST #options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules #options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/evbppc/conf/VIRTEX_GSRD2 b/sys/arch/evbppc/conf/VIRTEX_GSRD2 index 282483d6e7e..09928bd8637 100644 --- a/sys/arch/evbppc/conf/VIRTEX_GSRD2 +++ b/sys/arch/evbppc/conf/VIRTEX_GSRD2 @@ -1,4 +1,4 @@ -# $NetBSD: VIRTEX_GSRD2,v 1.4 2008/07/31 07:41:01 simonb Exp $ +# $NetBSD: VIRTEX_GSRD2,v 1.5 2008/11/12 12:36:00 ad Exp $ # # VIRTEX_GSRD2 # @@ -44,7 +44,6 @@ options CONS_ADDR=0x010000 # offset in OPB window #options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules #options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/evbppc/conf/WALNUT b/sys/arch/evbppc/conf/WALNUT index 5860d3c90ce..71f8a55ef88 100644 --- a/sys/arch/evbppc/conf/WALNUT +++ b/sys/arch/evbppc/conf/WALNUT @@ -1,4 +1,4 @@ -# $NetBSD: WALNUT,v 1.37 2008/07/31 07:41:01 simonb Exp $ +# $NetBSD: WALNUT,v 1.38 2008/11/12 12:36:00 ad Exp $ # # GENERIC -- everything that's currently supported # @@ -30,7 +30,6 @@ options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/evbppc/conf/majors.evbppc b/sys/arch/evbppc/conf/majors.evbppc index 665cfe008f7..306d90d9f9e 100644 --- a/sys/arch/evbppc/conf/majors.evbppc +++ b/sys/arch/evbppc/conf/majors.evbppc @@ -1,4 +1,4 @@ -# $NetBSD: majors.evbppc,v 1.27 2007/12/31 15:31:53 ad Exp $ +# $NetBSD: majors.evbppc,v 1.28 2008/11/12 12:36:00 ad Exp $ # # Device majors for evbppc # (When possible, make entries the same as macppc) @@ -33,7 +33,6 @@ device-major md char 27 block 9 md # char 28 device-major vcoda char 29 vcoda device-major wd char 30 block 10 wd -device-major lkm char 31 lkm device-major filedesc char 32 # char 33 device-major scsibus char 34 scsibus diff --git a/sys/arch/evbppc/ev64260/machdep.c b/sys/arch/evbppc/ev64260/machdep.c index f3aff83506d..a5197147b1d 100644 --- a/sys/arch/evbppc/ev64260/machdep.c +++ b/sys/arch/evbppc/ev64260/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.21 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.22 2008/11/12 12:36:00 ad Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.21 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.22 2008/11/12 12:36:00 ad Exp $"); #include "opt_marvell.h" #include "opt_ev64260.h" @@ -231,7 +231,7 @@ initppc(startkernel, endkernel, args, btinfo) */ pmap_bootstrap(startkernel, endkernel); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) { extern void *startsym, *endsym; ksyms_init((int)((u_int)endsym - (u_int)startsym), diff --git a/sys/arch/evbppc/explora/machdep.c b/sys/arch/evbppc/explora/machdep.c index 75826a370c0..ff049f4069d 100644 --- a/sys/arch/evbppc/explora/machdep.c +++ b/sys/arch/evbppc/explora/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.24 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.25 2008/11/12 12:36:00 ad Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.24 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.25 2008/11/12 12:36:00 ad Exp $"); #include "opt_explora.h" #include "ksyms.h" @@ -60,7 +60,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.24 2008/11/11 06:46:42 dyoung Exp $"); #include <powerpc/spr.h> #include <powerpc/ibm4xx/dcr403cgx.h> -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) #include <machine/db_machdep.h> #include <ddb/db_extern.h> #endif @@ -264,7 +264,7 @@ bootstrap(u_int startkernel, u_int endkernel) */ pmap_bootstrap(startkernel, endkernel); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init(0, NULL, NULL); #endif diff --git a/sys/arch/evbppc/obs405/obs200_machdep.c b/sys/arch/evbppc/obs405/obs200_machdep.c index c6c43b35725..3c6e5287562 100644 --- a/sys/arch/evbppc/obs405/obs200_machdep.c +++ b/sys/arch/evbppc/obs405/obs200_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: obs200_machdep.c,v 1.6 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: obs200_machdep.c,v 1.7 2008/11/12 12:36:00 ad Exp $ */ /* Original: machdep.c,v 1.3 2005/01/17 17:24:09 shige Exp */ /* @@ -68,7 +68,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: obs200_machdep.c,v 1.6 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: obs200_machdep.c,v 1.7 2008/11/12 12:36:00 ad Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -108,7 +108,7 @@ char bootpath[256]; extern paddr_t msgbuf_paddr; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) void *startsym, *endsym; #endif @@ -161,7 +161,7 @@ initppc(u_int startkernel, u_int endkernel, char *args, void *info_block) printf(" Chip Pin Strapping Register = 0x%08x\n", psr); #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init((int)((u_int)endsym - (u_int)startsym), startsym, endsym); #endif #ifdef DDB diff --git a/sys/arch/evbppc/obs405/obs266_machdep.c b/sys/arch/evbppc/obs405/obs266_machdep.c index 5128862cf3f..57d95c81803 100644 --- a/sys/arch/evbppc/obs405/obs266_machdep.c +++ b/sys/arch/evbppc/obs405/obs266_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: obs266_machdep.c,v 1.7 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: obs266_machdep.c,v 1.8 2008/11/12 12:36:00 ad Exp $ */ /* Original: md_machdep.c,v 1.3 2005/01/24 18:47:37 shige Exp $ */ /* @@ -68,7 +68,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: obs266_machdep.c,v 1.7 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: obs266_machdep.c,v 1.8 2008/11/12 12:36:00 ad Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -108,7 +108,7 @@ char bootpath[256]; extern paddr_t msgbuf_paddr; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) void *startsym, *endsym; #endif @@ -155,7 +155,7 @@ initppc(u_int startkernel, u_int endkernel, char *args, void *info_block) openbios_board_print(); #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init((int)((u_int)endsym - (u_int)startsym), startsym, endsym); #endif #ifdef DDB diff --git a/sys/arch/evbppc/pmppc/machdep.c b/sys/arch/evbppc/pmppc/machdep.c index 5ab830b61bd..25cf4c2b3d1 100644 --- a/sys/arch/evbppc/pmppc/machdep.c +++ b/sys/arch/evbppc/pmppc/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.4 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.5 2008/11/12 12:36:00 ad Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.4 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.5 2008/11/12 12:36:00 ad Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -244,7 +244,7 @@ initppc(u_int startkernel, u_int endkernel, u_int args, void *btinfo) */ pmap_bootstrap(startkernel, endkernel); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) #ifdef SYMTAB_SPACE ksyms_init(0, NULL, NULL); #else diff --git a/sys/arch/evbppc/virtex/machdep.c b/sys/arch/evbppc/virtex/machdep.c index e9d091116ba..8c45ee29273 100644 --- a/sys/arch/evbppc/virtex/machdep.c +++ b/sys/arch/evbppc/virtex/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.7 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.8 2008/11/12 12:36:00 ad Exp $ */ /* * Copyright (c) 2006 Jachym Holecek @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.7 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.8 2008/11/12 12:36:00 ad Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -105,7 +105,7 @@ char bootpath[256]; paddr_t msgbuf_paddr; vaddr_t msgbuf_vaddr; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) void *startsym, *endsym; #endif @@ -246,7 +246,7 @@ initppc(u_int startkernel, u_int endkernel) uvm_setpagesize(); pmap_bootstrap(startkernel, endkernel); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init((int)((u_int)endsym - (u_int)startsym), startsym, endsym); #endif #ifdef DDB diff --git a/sys/arch/evbppc/walnut/machdep.c b/sys/arch/evbppc/walnut/machdep.c index d2cc86bb1c9..77ea0b6e5f4 100644 --- a/sys/arch/evbppc/walnut/machdep.c +++ b/sys/arch/evbppc/walnut/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.37 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.38 2008/11/12 12:36:00 ad Exp $ */ /* * Copyright 2001, 2002 Wasabi Systems, Inc. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.37 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.38 2008/11/12 12:36:00 ad Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -136,7 +136,7 @@ char bootpath[256]; paddr_t msgbuf_paddr; vaddr_t msgbuf_vaddr; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) void *startsym, *endsym; #endif @@ -321,7 +321,7 @@ initppc(u_int startkernel, u_int endkernel, char *args, void *info_block) printf(" pci_speed = %u\n", board_data.pci_speed); #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init((int)((u_int)endsym - (u_int)startsym), startsym, endsym); #endif #ifdef DDB diff --git a/sys/arch/evbsh3/conf/majors.evbsh3 b/sys/arch/evbsh3/conf/majors.evbsh3 index 84555aa18bb..ef2f3bf368c 100644 --- a/sys/arch/evbsh3/conf/majors.evbsh3 +++ b/sys/arch/evbsh3/conf/majors.evbsh3 @@ -1,4 +1,4 @@ -# $NetBSD: majors.evbsh3,v 1.17 2007/12/31 15:31:53 ad Exp $ +# $NetBSD: majors.evbsh3,v 1.18 2008/11/12 12:36:00 ad Exp $ # # Device majors for evbsh3 # @@ -29,7 +29,6 @@ device-major filedesc char 22 device-major bpf char 23 bpfilter device-major md char 24 block 17 md -device-major lkm char 28 lkm device-major tun char 40 tun device-major vnd char 41 block 14 vnd diff --git a/sys/arch/evbsh3/evbsh3/machdep.c b/sys/arch/evbsh3/evbsh3/machdep.c index 3e8dc86859f..15102f0ad04 100644 --- a/sys/arch/evbsh3/evbsh3/machdep.c +++ b/sys/arch/evbsh3/evbsh3/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.61 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.62 2008/11/12 12:36:00 ad Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.61 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.62 2008/11/12 12:36:00 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -270,7 +270,7 @@ initSH3(void *pc) /* XXX return address */ /* Initialize pmap and start to address translation */ pmap_bootstrap(); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init(0, NULL, NULL); #endif diff --git a/sys/arch/ews4800mips/conf/GENERIC b/sys/arch/ews4800mips/conf/GENERIC index 76f04e08cbc..509189eeb54 100644 --- a/sys/arch/ews4800mips/conf/GENERIC +++ b/sys/arch/ews4800mips/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.25 2008/08/10 15:31:20 tls Exp $ +# $NetBSD: GENERIC,v 1.26 2008/11/12 12:36:00 ad Exp $ # # GENERIC machine description file # This machine description file is used to generate the default NetBSD @@ -25,7 +25,7 @@ include "arch/ews4800mips/conf/std.ews4800mips" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.25 $" +#ident "GENERIC-$Revision: 1.26 $" maxusers 16 @@ -53,7 +53,6 @@ options SEMMNI=10 # number of semaphore identifiers options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/ews4800mips/conf/majors.ews4800mips b/sys/arch/ews4800mips/conf/majors.ews4800mips index 00780ea2ef3..ad373ecd10f 100644 --- a/sys/arch/ews4800mips/conf/majors.ews4800mips +++ b/sys/arch/ews4800mips/conf/majors.ews4800mips @@ -1,4 +1,4 @@ -# $NetBSD: majors.ews4800mips,v 1.3 2007/12/31 15:31:54 ad Exp $ +# $NetBSD: majors.ews4800mips,v 1.4 2008/11/12 12:36:00 ad Exp $ # # Device majors for ews4800mips # @@ -11,7 +11,6 @@ device-major filedesc char 4 device-major log char 5 device-major ptc char 6 pty device-major pts char 7 pty -device-major lkm char 8 lkm device-major zstty char 9 zstty device-major md char 12 block 6 md diff --git a/sys/arch/hp300/conf/GENERIC b/sys/arch/hp300/conf/GENERIC index 9949c5f8fa2..dac0f90860f 100644 --- a/sys/arch/hp300/conf/GENERIC +++ b/sys/arch/hp300/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.147 2008/08/10 15:31:20 tls Exp $ +# $NetBSD: GENERIC,v 1.148 2008/11/12 12:36:00 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/hp300/conf/std.hp300" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.147 $" +#ident "GENERIC-$Revision: 1.148 $" maxusers 32 # estimated number of users @@ -46,7 +46,6 @@ options FPSP # floating point interface for 68040 # Standard system options options KTRACE # system call tracing support -options LKM # Loadable kernel modules #options INSECURE # disable kernel security level options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/hp300/conf/INSTALL b/sys/arch/hp300/conf/INSTALL index f183e4d64fe..927170f71ee 100644 --- a/sys/arch/hp300/conf/INSTALL +++ b/sys/arch/hp300/conf/INSTALL @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.36 2008/07/31 07:41:01 simonb Exp $ +# $NetBSD: INSTALL,v 1.37 2008/11/12 12:36:00 ad Exp $ # # INSTALL machine description file # @@ -66,7 +66,6 @@ options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. #options SEMMNU=30 # number of undo structures in system #options SYSVMSG # System V-style message queues #options KTRACE # system call tracing support -#options LKM # Loadable kernel modules #options SCSIVERBOSE # Verbose SCSI errors # Filesystems diff --git a/sys/arch/hp300/conf/majors.hp300 b/sys/arch/hp300/conf/majors.hp300 index 9ee13b224dc..22efc1bfe33 100644 --- a/sys/arch/hp300/conf/majors.hp300 +++ b/sys/arch/hp300/conf/majors.hp300 @@ -1,4 +1,4 @@ -# $NetBSD: majors.hp300,v 1.21 2007/12/31 15:31:54 ad Exp $ +# $NetBSD: majors.hp300,v 1.22 2008/11/12 12:36:00 ad Exp $ # # Device majors for hp300 # @@ -27,7 +27,6 @@ device-major st char 20 block 7 st device-major filedesc char 21 device-major bpf char 22 bpfilter device-major tun char 23 tun -device-major lkm char 24 lkm # device major 31 was apci (superseded by MI com) device-major md char 32 block 14 md diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c index 3a55c2ee880..98ec5df4087 100644 --- a/sys/arch/hp300/hp300/machdep.c +++ b/sys/arch/hp300/hp300/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.201 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.202 2008/11/12 12:36:00 ad Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.201 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.202 2008/11/12 12:36:00 ad Exp $"); #include "opt_ddb.h" #include "opt_compat_netbsd.h" @@ -289,7 +289,7 @@ consinit(void) if (bootinfo_va == 0) printf("WARNING: boot loader did not provide bootinfo\n"); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) { extern int end; extern int *esym; diff --git a/sys/arch/hp700/conf/GENERIC b/sys/arch/hp700/conf/GENERIC index dbbed1d5d64..0ff2ab68a87 100644 --- a/sys/arch/hp700/conf/GENERIC +++ b/sys/arch/hp700/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.83 2008/08/10 15:31:21 tls Exp $ +# $NetBSD: GENERIC,v 1.84 2008/11/12 12:36:00 ad Exp $ # # GENERIC machine description file # @@ -23,7 +23,7 @@ include "arch/hp700/conf/std.hp700" options INCLUDE_CONFIG_FILE # embed config file in kernel binary options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel -#ident "GENERIC-$Revision: 1.83 $" +#ident "GENERIC-$Revision: 1.84 $" maxusers 32 # estimated number of users @@ -59,7 +59,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules # Enable experimental buffer queue strategy for better responsiveness under # high disk I/O load. Use it with caution - it's not proven to be stable yet. diff --git a/sys/arch/hp700/conf/majors.hp700 b/sys/arch/hp700/conf/majors.hp700 index 39ef9ee96c5..816450605a4 100644 --- a/sys/arch/hp700/conf/majors.hp700 +++ b/sys/arch/hp700/conf/majors.hp700 @@ -1,4 +1,4 @@ -# $NetBSD: majors.hp700,v 1.22 2007/12/31 15:31:54 ad Exp $ +# $NetBSD: majors.hp700,v 1.23 2008/11/12 12:36:00 ad Exp $ # # Device majors for hp700 # @@ -22,7 +22,6 @@ device-major uk char 15 uk device-major filedesc char 16 device-major bpf char 17 bpfilter device-major tun char 18 tun -device-major lkm char 19 lkm device-major rnd char 20 rnd device-major ipl char 21 ipfilter device-major pdc char 22 diff --git a/sys/arch/hp700/hp700/machdep.c b/sys/arch/hp700/hp700/machdep.c index 90c1b6e6451..f8cbb1d1789 100644 --- a/sys/arch/hp700/hp700/machdep.c +++ b/sys/arch/hp700/hp700/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.49 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.50 2008/11/12 12:36:00 ad Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.49 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.50 2008/11/12 12:36:00 ad Exp $"); #include "opt_cputype.h" #include "opt_ddb.h" @@ -815,7 +815,7 @@ do { \ #endif /* NCOM > 0 */ #endif /* KGDB */ -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) if ((bi_sym = lookup_bootinfo(BTINFO_SYMTAB)) != NULL) ksyms_init(bi_sym->nsym, (int *)bi_sym->ssym, (int *)bi_sym->esym); diff --git a/sys/arch/hpcarm/conf/IPAQ b/sys/arch/hpcarm/conf/IPAQ index b63c76c58d4..a2a22dd6af9 100644 --- a/sys/arch/hpcarm/conf/IPAQ +++ b/sys/arch/hpcarm/conf/IPAQ @@ -1,4 +1,4 @@ -# $NetBSD: IPAQ,v 1.54 2008/07/31 07:41:01 simonb Exp $ +# $NetBSD: IPAQ,v 1.55 2008/11/12 12:36:01 ad Exp $ # # iPAQ H3600 -- Windows-CE based PDA # @@ -107,7 +107,6 @@ options SHMMAXPGS=1024 # 1024 pages is the default # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -options LKM # loadable kernel modules options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options USERCONF # userconf(4) support diff --git a/sys/arch/hpcarm/conf/JORNADA720 b/sys/arch/hpcarm/conf/JORNADA720 index a9a1888b63f..5766dbbc0fd 100644 --- a/sys/arch/hpcarm/conf/JORNADA720 +++ b/sys/arch/hpcarm/conf/JORNADA720 @@ -1,4 +1,4 @@ -# $NetBSD: JORNADA720,v 1.70 2008/07/31 07:41:01 simonb Exp $ +# $NetBSD: JORNADA720,v 1.71 2008/11/12 12:36:01 ad Exp $ # # JORNADA -- Windows-CE based jornada 720 # @@ -7,7 +7,7 @@ include "arch/hpcarm/conf/std.hpcarm" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.70 $" +#ident "GENERIC-$Revision: 1.71 $" # estimated number of users maxusers 32 @@ -111,7 +111,6 @@ options SHMMAXPGS=1024 # 1024 pages is the default # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -options LKM # loadable kernel modules options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options USERCONF # userconf(4) support diff --git a/sys/arch/hpcarm/conf/JORNADA820 b/sys/arch/hpcarm/conf/JORNADA820 index 535f2b699de..3fdc9d0c1cd 100644 --- a/sys/arch/hpcarm/conf/JORNADA820 +++ b/sys/arch/hpcarm/conf/JORNADA820 @@ -1,4 +1,4 @@ -# $NetBSD: JORNADA820,v 1.12 2008/07/31 07:41:01 simonb Exp $ +# $NetBSD: JORNADA820,v 1.13 2008/11/12 12:36:01 ad Exp $ # # JORNADA -- Windows-CE based jornada 820 # @@ -7,7 +7,7 @@ include "arch/hpcarm/conf/std.hpcarm" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.12 $" +#ident "GENERIC-$Revision: 1.13 $" # estimated number of users maxusers 32 @@ -109,7 +109,6 @@ options SHMMAXPGS=1024 # 1024 pages is the default # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -options LKM # loadable kernel modules options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options USERCONF # userconf(4) support diff --git a/sys/arch/hpcarm/conf/majors.hpcarm b/sys/arch/hpcarm/conf/majors.hpcarm index 3307fbbf04a..587e637b544 100644 --- a/sys/arch/hpcarm/conf/majors.hpcarm +++ b/sys/arch/hpcarm/conf/majors.hpcarm @@ -1,4 +1,4 @@ -# $NetBSD: majors.hpcarm,v 1.8 2007/12/31 15:31:54 ad Exp $ +# $NetBSD: majors.hpcarm,v 1.9 2008/11/12 12:36:01 ad Exp $ # # Device majors for hpcarm # @@ -37,7 +37,6 @@ device-major ses char 30 ses device-major bpf char 32 bpfilter device-major tun char 33 tun device-major filedesc char 34 -device-major lkm char 35 lkm device-major audio char 36 audio device-major vidcconsole char 37 vidcconsole diff --git a/sys/arch/hpcarm/hpcarm/hpc_machdep.c b/sys/arch/hpcarm/hpcarm/hpc_machdep.c index 101444ad845..e1bb32c544a 100644 --- a/sys/arch/hpcarm/hpcarm/hpc_machdep.c +++ b/sys/arch/hpcarm/hpcarm/hpc_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: hpc_machdep.c,v 1.87 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: hpc_machdep.c,v 1.88 2008/11/12 12:36:01 ad Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hpc_machdep.c,v 1.87 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpc_machdep.c,v 1.88 2008/11/12 12:36:01 ad Exp $"); #include "opt_ddb.h" #include "opt_pmap_debug.h" @@ -59,7 +59,7 @@ __KERNEL_RCSID(0, "$NetBSD: hpc_machdep.c,v 1.87 2008/11/11 06:46:42 dyoung Exp #include <sys/conf.h> /* XXX for consinit related hacks */ #include <sys/device.h> -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) #include <machine/db_machdep.h> #include <ddb/db_sym.h> #include <ddb/db_extern.h> @@ -303,7 +303,7 @@ initarm(int argc, char **argv, struct bootinfo *bi) vaddr_t freemempos; vsize_t pt_size; int loop, i; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) Elf_Shdr *sh; #endif @@ -335,7 +335,7 @@ initarm(int argc, char **argv, struct bootinfo *bi) kerneldatasize = (uint32_t)&end - (uint32_t)KERNEL_TEXT_BASE; symbolsize = 0; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) if (!memcmp(&end, "\177ELF", 4)) { sh = (Elf_Shdr *)((char *)&end + ((Elf_Ehdr *)&end)->e_shoff); loop = ((Elf_Ehdr *)&end)->e_shnum; @@ -706,7 +706,7 @@ initarm(int argc, char **argv, struct bootinfo *bi) #ifdef DDB db_machine_init(); #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init(symbolsize, ((int *)&end), ((char *)&end) + symbolsize); #endif diff --git a/sys/arch/hpcmips/conf/GENERIC b/sys/arch/hpcmips/conf/GENERIC index 217c34e5727..73ef69d8874 100644 --- a/sys/arch/hpcmips/conf/GENERIC +++ b/sys/arch/hpcmips/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.203 2008/08/10 15:31:21 tls Exp $ +# $NetBSD: GENERIC,v 1.204 2008/11/12 12:36:01 ad Exp $ # # GENERIC machine description file # @@ -24,7 +24,7 @@ include "arch/hpcmips/conf/std.hpcmips.tx39" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.203 $" +#ident "GENERIC-$Revision: 1.204 $" maxusers 16 @@ -133,7 +133,6 @@ options COMPAT_30 # NetBSD 3.0 compatibility. options COMPAT_40 # NetBSD 4.0 compatibility. options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. -options LKM # loadable kernel modules #options NFS_BOOT_DHCP options NFS_BOOT_BOOTP diff --git a/sys/arch/hpcmips/conf/majors.hpcmips b/sys/arch/hpcmips/conf/majors.hpcmips index 98234f63674..2fe48e1abf1 100644 --- a/sys/arch/hpcmips/conf/majors.hpcmips +++ b/sys/arch/hpcmips/conf/majors.hpcmips @@ -1,4 +1,4 @@ -# $NetBSD: majors.hpcmips,v 1.26 2007/12/31 15:31:55 ad Exp $ +# $NetBSD: majors.hpcmips,v 1.27 2008/11/12 12:36:01 ad Exp $ # # Device majors for hpcmips # @@ -50,7 +50,6 @@ device-major isdnbchan char 43 isdnbchan device-major isdntrc char 44 isdntrc device-major isdntel char 45 isdntel device-major clockctl char 46 clockctl -device-major lkm char 47 lkm device-major audio char 48 audio device-major cgd char 50 block 10 cgd device-major apmdev char 51 apmdev diff --git a/sys/arch/hpcmips/hpcmips/machdep.c b/sys/arch/hpcmips/hpcmips/machdep.c index 0a5466f4075..5471e235402 100644 --- a/sys/arch/hpcmips/hpcmips/machdep.c +++ b/sys/arch/hpcmips/hpcmips/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.97 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.98 2008/11/12 12:36:01 ad Exp $ */ /*- * Copyright (c) 1999 Shin Takemura, All rights reserved. @@ -108,7 +108,7 @@ */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.97 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.98 2008/11/12 12:36:01 ad Exp $"); #include "opt_vr41xx.h" #include "opt_tx39xx.h" @@ -156,7 +156,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.97 2008/11/11 06:46:42 dyoung Exp $"); #include "ksyms.h" -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) #include <machine/db_machdep.h> #include <ddb/db_sym.h> #include <ddb/db_extern.h> @@ -261,7 +261,7 @@ mach_init(int argc, char *argv[], struct bootinfo *bi) #endif extern struct user *proc0paddr; extern char edata[], end[]; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) extern void *esym; #endif void *kernend; @@ -269,7 +269,7 @@ mach_init(int argc, char *argv[], struct bootinfo *bi) int i; /* clear the BSS segment */ -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) size_t symbolsz = 0; Elf_Ehdr *eh = (void *)end; if (memcmp(eh->e_ident, ELFMAG, SELFMAG) == 0 && @@ -293,7 +293,7 @@ mach_init(int argc, char *argv[], struct bootinfo *bi) kernend = (void *)mips_round_page(esym); bzero(edata, end - edata); } else -#endif /* NKSYMS || defined(DDB) || defined(LKM) */ +#endif /* NKSYMS || defined(DDB) || defined(MODULAR) */ { kernend = (void *)mips_round_page(end); memset(edata, 0, (char *)kernend - edata); @@ -447,7 +447,7 @@ mach_init(int argc, char *argv[], struct bootinfo *bi) } #endif /* MFS */ -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* init symbols if present */ if (esym) ksyms_init(symbolsz, &end, esym); diff --git a/sys/arch/hpcsh/conf/GENERIC b/sys/arch/hpcsh/conf/GENERIC index aec8e0dcd93..86d770c4580 100644 --- a/sys/arch/hpcsh/conf/GENERIC +++ b/sys/arch/hpcsh/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.83 2008/10/28 00:05:04 uwe Exp $ +# $NetBSD: GENERIC,v 1.84 2008/11/12 12:36:01 ad Exp $ # # GENERIC machine description file # @@ -72,7 +72,6 @@ options KTRACE # system call tracing via ktrace(1) #options SYSVSHM # System V-like memory sharing #options P1003_1B_SEMAPHORE # p1003.1b semaphore support -#options LKM # loadable kernel modules options USERCONF # userconf(4) support options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/hpcsh/conf/majors.hpcsh b/sys/arch/hpcsh/conf/majors.hpcsh index fc2a4045a6c..40989fe150f 100644 --- a/sys/arch/hpcsh/conf/majors.hpcsh +++ b/sys/arch/hpcsh/conf/majors.hpcsh @@ -1,4 +1,4 @@ -# $NetBSD: majors.hpcsh,v 1.21 2007/12/31 15:31:55 ad Exp $ +# $NetBSD: majors.hpcsh,v 1.22 2008/11/12 12:36:01 ad Exp $ # # Device majors for hpcsh # @@ -40,7 +40,6 @@ device-major biconsdev char 33 biconsdev device-major clockctl char 34 clockctl device-major cgd char 36 block 10 cgd device-major ksyms char 37 ksyms -device-major lkm char 38 lkm device-major wsfont char 39 wsfont device-major apmdev char 40 apmdev device-major audio char 42 audio diff --git a/sys/arch/hpcsh/hpcsh/machdep.c b/sys/arch/hpcsh/hpcsh/machdep.c index 4f7fd61496e..786edd43581 100644 --- a/sys/arch/hpcsh/hpcsh/machdep.c +++ b/sys/arch/hpcsh/hpcsh/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.62 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.63 2008/11/12 12:36:01 ad Exp $ */ /*- * Copyright (c) 2001, 2002, 2004 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.62 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.63 2008/11/12 12:36:01 ad Exp $"); #include "opt_md.h" #include "opt_ddb.h" @@ -74,7 +74,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.62 2008/11/11 06:46:42 dyoung Exp $"); #include "ksyms.h" -#if NKSYMS || defined(LKM) || defined(DDB) || defined(KGDB) +#if NKSYMS || defined(MODULAR) || defined(DDB) || defined(KGDB) #include <machine/db_machdep.h> #include <ddb/db_sym.h> #include <ddb/db_extern.h> @@ -292,7 +292,7 @@ machine_startup(int argc, char *argv[], struct bootinfo *bi) /* Initialize pmap and start to address translation */ pmap_bootstrap(); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) if (symbolsize) { ksyms_init(symbolsize, &end, end + symbolsize); _DPRINTF("symbol size = %d byte\n", symbolsize); diff --git a/sys/arch/i386/conf/ALL b/sys/arch/i386/conf/ALL index 039ef4e148e..fc04291514a 100644 --- a/sys/arch/i386/conf/ALL +++ b/sys/arch/i386/conf/ALL @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.183 2008/10/13 12:20:37 pgoyette Exp $ +# $NetBSD: ALL,v 1.184 2008/11/12 12:36:01 ad Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.183 $" +#ident "ALL-$Revision: 1.184 $" maxusers 32 # estimated number of users @@ -87,7 +87,6 @@ options SYSVSHM # System V-like memory sharing options SHMMAXPGS=2048 # 2048 pages is the default options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options MODULAR # new modules framework options USERCONF # userconf(4) support diff --git a/sys/arch/i386/conf/GENERIC b/sys/arch/i386/conf/GENERIC index cae583f4aca..7f889bf10e6 100644 --- a/sys/arch/i386/conf/GENERIC +++ b/sys/arch/i386/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.915 2008/10/29 11:56:53 joerg Exp $ +# $NetBSD: GENERIC,v 1.916 2008/11/12 12:36:01 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.915 $" +#ident "GENERIC-$Revision: 1.916 $" maxusers 64 # estimated number of users @@ -95,7 +95,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options MODULAR # new style module framework options APM_NO_IDLE # needed for SMP diff --git a/sys/arch/i386/conf/GENERIC_PS2TINY b/sys/arch/i386/conf/GENERIC_PS2TINY index cf94eb5d95c..bb5f58c5c36 100644 --- a/sys/arch/i386/conf/GENERIC_PS2TINY +++ b/sys/arch/i386/conf/GENERIC_PS2TINY @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC_PS2TINY,v 1.53 2008/07/31 07:41:01 simonb Exp $ +# $NetBSD: GENERIC_PS2TINY,v 1.54 2008/11/12 12:36:01 ad Exp $ # # GENERIC-style kernel config for IBM PS/2 with MCA bus. It only contains # IBM PS/2 related stuff and has been generally trimmed down somewhat, @@ -51,7 +51,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/i386/conf/GENERIC_TINY b/sys/arch/i386/conf/GENERIC_TINY index f3a6b40e0ac..1c94428651e 100644 --- a/sys/arch/i386/conf/GENERIC_TINY +++ b/sys/arch/i386/conf/GENERIC_TINY @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC_TINY,v 1.114 2008/05/13 13:43:47 ad Exp $ +# $NetBSD: GENERIC_TINY,v 1.115 2008/11/12 12:36:01 ad Exp $ # # GENERIC_TINY -- suitable default for 4M machines # No EISA, PCI, or SCSI. @@ -48,7 +48,6 @@ options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT options NMBCLUSTERS=256 -#options LKM # loadable kernel modules #options USERCONF # userconf(4) support options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/i386/conf/INSTALL_FLOPPY b/sys/arch/i386/conf/INSTALL_FLOPPY index 0a0dbfaa1fd..41b2a6c09cf 100644 --- a/sys/arch/i386/conf/INSTALL_FLOPPY +++ b/sys/arch/i386/conf/INSTALL_FLOPPY @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL_FLOPPY,v 1.2 2008/11/04 14:21:39 joerg Exp $ +# $NetBSD: INSTALL_FLOPPY,v 1.3 2008/11/12 12:36:01 ad Exp $ # # INSTALL - Installation kernel. # @@ -58,7 +58,6 @@ options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT #options SYSVSHM # System V-like memory sharing #options SHMMAXPGS=2048 # 2048 pages is the default -#options LKM # loadable kernel modules options USERCONF # userconf(4) support options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/i386/conf/INSTALL_TINY b/sys/arch/i386/conf/INSTALL_TINY index 458c8510534..4fd28521493 100644 --- a/sys/arch/i386/conf/INSTALL_TINY +++ b/sys/arch/i386/conf/INSTALL_TINY @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL_TINY,v 1.120 2008/05/13 13:43:47 ad Exp $ +# $NetBSD: INSTALL_TINY,v 1.121 2008/11/12 12:36:02 ad Exp $ # # This kernel should be derived from INSTALL (which is derived # from GENERIC) with some features commented out. @@ -52,7 +52,6 @@ options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT #options SYSVSHM # System V-like memory sharing #options SHMMAXPGS=2048 # 2048 pages is the default -#options LKM # loadable kernel modules #options USERCONF # userconf(4) support options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/i386/conf/NET4501 b/sys/arch/i386/conf/NET4501 index 1f68ca74ee7..f375201d649 100644 --- a/sys/arch/i386/conf/NET4501 +++ b/sys/arch/i386/conf/NET4501 @@ -1,4 +1,4 @@ -# $NetBSD: NET4501,v 1.62 2008/04/30 15:29:12 ad Exp $ +# $NetBSD: NET4501,v 1.63 2008/11/12 12:36:02 ad Exp $ # # NET4501 -- kernel configuration for a Soekris Engineering net4501 # single-board computer. @@ -10,7 +10,7 @@ include "arch/i386/conf/std.i386" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "NET4501-$Revision: 1.62 $" +#ident "NET4501-$Revision: 1.63 $" maxusers 32 # estimated number of users @@ -63,7 +63,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing #options SHMMAXPGS=2048 # 2048 pages is the default -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/i386/conf/XBOX b/sys/arch/i386/conf/XBOX index 94eb458f61f..1bb0acc404e 100644 --- a/sys/arch/i386/conf/XBOX +++ b/sys/arch/i386/conf/XBOX @@ -1,4 +1,4 @@ -# $NetBSD: XBOX,v 1.14 2008/04/30 15:29:12 ad Exp $ +# $NetBSD: XBOX,v 1.15 2008/11/12 12:36:02 ad Exp $ # # XBOX -- A basic Microsoft XBox kernel config file. # @@ -24,7 +24,6 @@ options INSECURE # disable kernel security levels - X needs this options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT options NTP # NTP phase/frequency locked loop options KTRACE # system call tracing via ktrace(1) -options LKM # loadable kernel modules options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel # Diagnostic/debugging support options diff --git a/sys/arch/i386/conf/XEN2_DOM0 b/sys/arch/i386/conf/XEN2_DOM0 index 6b48f910a16..4e162e7b031 100644 --- a/sys/arch/i386/conf/XEN2_DOM0 +++ b/sys/arch/i386/conf/XEN2_DOM0 @@ -1,4 +1,4 @@ -# $NetBSD: XEN2_DOM0,v 1.53 2008/10/29 11:56:53 joerg Exp $ +# $NetBSD: XEN2_DOM0,v 1.54 2008/11/12 12:36:02 ad Exp $ include "arch/xen/conf/std.xen" @@ -44,7 +44,6 @@ options SYSVSHM # System V-like memory sharing #options SHMMAXPGS=2048 # 2048 pages is the default options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel diff --git a/sys/arch/i386/conf/XEN2_DOMU b/sys/arch/i386/conf/XEN2_DOMU index f8da937b99a..500be572e2f 100644 --- a/sys/arch/i386/conf/XEN2_DOMU +++ b/sys/arch/i386/conf/XEN2_DOMU @@ -1,4 +1,4 @@ -# $NetBSD: XEN2_DOMU,v 1.19 2008/08/04 03:55:47 tls Exp $ +# $NetBSD: XEN2_DOMU,v 1.20 2008/11/12 12:36:02 ad Exp $ include "arch/xen/conf/std.xen" @@ -41,7 +41,6 @@ options SYSVSHM # System V-like memory sharing #options SHMMAXPGS=2048 # 2048 pages is the default options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel diff --git a/sys/arch/i386/conf/majors.i386 b/sys/arch/i386/conf/majors.i386 index 7159a3b0001..e1606f3362b 100644 --- a/sys/arch/i386/conf/majors.i386 +++ b/sys/arch/i386/conf/majors.i386 @@ -1,4 +1,4 @@ -# $NetBSD: majors.i386,v 1.36 2007/12/31 15:31:57 ad Exp $ +# $NetBSD: majors.i386,v 1.37 2008/11/12 12:36:02 ad Exp $ # # Device majors for i386 # @@ -31,7 +31,6 @@ device-major md char 24 block 17 md device-major joy char 26 joy device-major spkr char 27 spkr -device-major lkm char 28 lkm # next three are obsolete #device-major omms char 35 omms diff --git a/sys/arch/i386/i386/kobj_machdep.c b/sys/arch/i386/i386/kobj_machdep.c index 91e0964f3af..0931a1b73e2 100644 --- a/sys/arch/i386/i386/kobj_machdep.c +++ b/sys/arch/i386/i386/kobj_machdep.c @@ -1,9 +1,12 @@ -/* $NetBSD: kobj_machdep.c,v 1.5 2008/05/01 14:48:19 ad Exp $ */ +/* $NetBSD: kobj_machdep.c,v 1.6 2008/11/12 12:36:02 ad Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * + * This code is derived from software developed for The NetBSD Foundation + * by Andrew Doran. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -52,7 +55,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.5 2008/05/01 14:48:19 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.6 2008/11/12 12:36:02 ad Exp $"); #define ELFSIZE ARCH_ELFSIZE @@ -109,14 +112,6 @@ kobj_reloc(kobj_t ko, uintptr_t relocbase, const void *data, addr += addend - (Elf_Addr)where; break; - case R_386_COPY: /* none */ - /* - * There shouldn't be copy relocations in kernel - * objects. - */ - printf("kobj_reloc: unexpected R_COPY relocation\n"); - return -1; - case R_386_GLOB_DAT: /* S */ addr = kobj_sym_lookup(ko, symidx); if (addr == 0) diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 1b6e1b78d06..28d4e0f6d9a 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.648 2008/11/12 01:14:01 cegger Exp $ */ +/* $NetBSD: machdep.c,v 1.649 2008/11/12 12:36:02 ad Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.648 2008/11/12 01:14:01 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.649 2008/11/12 12:36:02 ad Exp $"); #include "opt_beep.h" #include "opt_compat_ibcs2.h" @@ -1386,7 +1386,7 @@ init386_pte0(void) static void init386_ksyms(void) { -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) extern int end; struct btinfo_symtab *symtab; diff --git a/sys/arch/i386/i386/powernow_k7.c b/sys/arch/i386/i386/powernow_k7.c index 10129d3b238..5c28b3986c3 100644 --- a/sys/arch/i386/i386/powernow_k7.c +++ b/sys/arch/i386/i386/powernow_k7.c @@ -1,4 +1,4 @@ -/* $NetBSD: powernow_k7.c,v 1.31 2008/05/10 16:12:32 ad Exp $ */ +/* $NetBSD: powernow_k7.c,v 1.32 2008/11/12 12:36:02 ad Exp $ */ /* $OpenBSD: powernow-k7.c,v 1.24 2006/06/16 05:58:50 gwk Exp $ */ /*- @@ -59,7 +59,7 @@ /* AMD POWERNOW K7 driver */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: powernow_k7.c,v 1.31 2008/05/10 16:12:32 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: powernow_k7.c,v 1.32 2008/11/12 12:36:02 ad Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -76,7 +76,7 @@ __KERNEL_RCSID(0, "$NetBSD: powernow_k7.c,v 1.31 2008/05/10 16:12:32 ad Exp $"); #include <x86/include/isa_machdep.h> #include <x86/include/powernow.h> -#ifdef _LKM +#ifdef _MODULE static struct sysctllog *sysctllog; #define SYSCTLLOG &sysctllog #else @@ -481,7 +481,7 @@ k7_powernow_init(void) void k7_powernow_destroy(void) { -#ifdef _LKM +#ifdef _MODULE sysctl_teardown(SYSCTLLOG); if (freq_names) diff --git a/sys/arch/i386/i386/vm_machdep.c b/sys/arch/i386/i386/vm_machdep.c index 8f912b6045e..b04ed387b78 100644 --- a/sys/arch/i386/i386/vm_machdep.c +++ b/sys/arch/i386/i386/vm_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.139 2008/05/27 14:25:11 ad Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.140 2008/11/12 12:36:02 ad Exp $ */ /*- * Copyright (c) 1982, 1986 The Regents of the University of California. @@ -80,7 +80,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.139 2008/05/27 14:25:11 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.140 2008/11/12 12:36:02 ad Exp $"); #include "opt_user_ldt.h" #include "opt_mtrr.h" @@ -266,7 +266,7 @@ cpu_lwp_free2(struct lwp *l) } #if (defined(EXEC_AOUT) || defined(EXEC_COFF) || defined(EXEC_ECOFF) || \ - defined(EXEC_MACHO) || defined(LKM)) && defined(COREDUMP) + defined(EXEC_MACHO) || defined(MODULAR)) && defined(COREDUMP) /* * Dump the machine specific segment at the start of a core dump. */ diff --git a/sys/arch/ia64/conf/majors.ia64 b/sys/arch/ia64/conf/majors.ia64 index 012eeb900ff..04130545eef 100644 --- a/sys/arch/ia64/conf/majors.ia64 +++ b/sys/arch/ia64/conf/majors.ia64 @@ -1,4 +1,4 @@ -# $NetBSD: majors.ia64,v 1.4 2007/12/31 15:31:57 ad Exp $ +# $NetBSD: majors.ia64,v 1.5 2008/11/12 12:36:02 ad Exp $ # # Device majors for ia64 # @@ -31,7 +31,6 @@ device-major md char 24 block 17 md device-major joy char 26 joy device-major spkr char 27 spkr -device-major lkm char 28 lkm # next three are obsolete #device-major omms char 35 omms diff --git a/sys/arch/ia64/ia64/machdep.c b/sys/arch/ia64/ia64/machdep.c index bb0379728fc..a5c20635db8 100644 --- a/sys/arch/ia64/ia64/machdep.c +++ b/sys/arch/ia64/ia64/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.10 2008/10/15 06:51:18 wrstuden Exp $ */ +/* $NetBSD: machdep.c,v 1.11 2008/11/12 12:36:02 ad Exp $ */ /*- * Copyright (c) 2003,2004 Marcel Moolenaar @@ -122,7 +122,7 @@ char machine[] = MACHINE; /* from <machine/param.h> */ char machine_arch[] = MACHINE_ARCH; /* from <machine/param.h> */ -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* start and end of kernel symbol table */ void *ksym_start, *ksym_end; vaddr_t ia64_unwindtab; @@ -749,7 +749,7 @@ ia64_init() /* * Initialize debuggers, and break into them if appropriate. */ -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init((int)((u_int64_t)ksym_end - (u_int64_t)ksym_start), ksym_start, ksym_end); #endif diff --git a/sys/arch/ibmnws/conf/majors.ibmnws b/sys/arch/ibmnws/conf/majors.ibmnws index 9e241d11ef5..54cd89eec2a 100644 --- a/sys/arch/ibmnws/conf/majors.ibmnws +++ b/sys/arch/ibmnws/conf/majors.ibmnws @@ -1,4 +1,4 @@ -# $NetBSD: majors.ibmnws,v 1.12 2007/12/31 15:31:57 ad Exp $ +# $NetBSD: majors.ibmnws,v 1.13 2008/11/12 12:36:02 ad Exp $ # # Device majors for ibmnws # @@ -26,7 +26,6 @@ device-major filedesc char 22 device-major bpf char 23 bpfilter device-major md char 24 block 17 md -device-major lkm char 28 lkm device-major tun char 40 tun device-major vnd char 41 block 14 vnd diff --git a/sys/arch/iyonix/conf/GENERIC b/sys/arch/iyonix/conf/GENERIC index 67f293d6c9a..9121fd830d4 100644 --- a/sys/arch/iyonix/conf/GENERIC +++ b/sys/arch/iyonix/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.51 2008/09/07 12:01:26 tron Exp $ +# $NetBSD: GENERIC,v 1.52 2008/11/12 12:36:02 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/iyonix/conf/std.iyonix" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.51 $" +#ident "GENERIC-$Revision: 1.52 $" maxusers 32 # estimated number of users @@ -59,7 +59,6 @@ options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/iyonix/iyonix/iyonix_machdep.c b/sys/arch/iyonix/iyonix/iyonix_machdep.c index 9793fc2f12b..ffd34224de8 100644 --- a/sys/arch/iyonix/iyonix/iyonix_machdep.c +++ b/sys/arch/iyonix/iyonix/iyonix_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: iyonix_machdep.c,v 1.9 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: iyonix_machdep.c,v 1.10 2008/11/12 12:36:02 ad Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iyonix_machdep.c,v 1.9 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iyonix_machdep.c,v 1.10 2008/11/12 12:36:02 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -812,7 +812,7 @@ initarm(void *arg) boothowto = BOOTHOWTO; #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* Firmware doesn't load symbols. */ ksyms_init(0, NULL, NULL); #endif diff --git a/sys/arch/landisk/conf/GENERIC b/sys/arch/landisk/conf/GENERIC index 203791c16c2..3279ae41f75 100644 --- a/sys/arch/landisk/conf/GENERIC +++ b/sys/arch/landisk/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.16 2008/08/10 15:31:21 tls Exp $ +# $NetBSD: GENERIC,v 1.17 2008/11/12 12:36:02 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/landisk/conf/std.landisk" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.16 $" +#ident "GENERIC-$Revision: 1.17 $" maxusers 16 # estimated number of users @@ -59,7 +59,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/landisk/conf/majors.landisk b/sys/arch/landisk/conf/majors.landisk index 31c6b6c336f..9f6c04a1331 100644 --- a/sys/arch/landisk/conf/majors.landisk +++ b/sys/arch/landisk/conf/majors.landisk @@ -1,4 +1,4 @@ -# $NetBSD: majors.landisk,v 1.3 2007/12/31 15:31:58 ad Exp $ +# $NetBSD: majors.landisk,v 1.4 2008/11/12 12:36:02 ad Exp $ # # Device majors for landisk # @@ -28,7 +28,6 @@ device-major filedesc char 22 device-major bpf char 23 bpfilter device-major md char 24 block 17 md -device-major lkm char 28 lkm device-major tun char 40 tun device-major vnd char 41 block 14 vnd diff --git a/sys/arch/landisk/landisk/machdep.c b/sys/arch/landisk/landisk/machdep.c index 5db10c68c6e..351908af25e 100644 --- a/sys/arch/landisk/landisk/machdep.c +++ b/sys/arch/landisk/landisk/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.7 2008/11/11 06:46:42 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.8 2008/11/12 12:36:02 ad Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.7 2008/11/11 06:46:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.8 2008/11/12 12:36:02 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -115,7 +115,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.7 2008/11/11 06:46:42 dyoung Exp $"); #include <sh3/dev/scifvar.h> #endif -#if NKSYMS || defined(LKM) || defined(DDB) +#if NKSYMS || defined(MODULAR) || defined(DDB) #include <machine/db_machdep.h> #include <ddb/db_sym.h> #include <ddb/db_extern.h> @@ -227,7 +227,7 @@ landisk_startup(int howto, void *bi) pmap_bootstrap(); /* Debugger. */ -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) if (symbolsize != 0) { ksyms_init(symbolsize, &end, end + symbolsize); } diff --git a/sys/arch/luna68k/conf/GENERIC b/sys/arch/luna68k/conf/GENERIC index 98e8882de38..8c8ad3dbcab 100644 --- a/sys/arch/luna68k/conf/GENERIC +++ b/sys/arch/luna68k/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.84 2008/08/10 15:31:21 tls Exp $ +# $NetBSD: GENERIC,v 1.85 2008/11/12 12:36:02 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/luna68k/conf/std.luna68k" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.84 $" +#ident "GENERIC-$Revision: 1.85 $" maxusers 8 @@ -39,7 +39,6 @@ options KTRACE #options SYSVSEM # System V semaphores #options SYSVSHM # System V shared memory #options P1003_1B_SEMAPHORE # p1003.1b semaphore support -#options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel diff --git a/sys/arch/luna68k/conf/majors.luna68k b/sys/arch/luna68k/conf/majors.luna68k index 15952afd9b3..5c967300fca 100644 --- a/sys/arch/luna68k/conf/majors.luna68k +++ b/sys/arch/luna68k/conf/majors.luna68k @@ -1,4 +1,4 @@ -# $NetBSD: majors.luna68k,v 1.18 2007/12/31 15:31:58 ad Exp $ +# $NetBSD: majors.luna68k,v 1.19 2008/11/12 12:36:02 ad Exp $ # # Device majors for luna68k # @@ -27,7 +27,6 @@ device-major filedesc char 20 device-major bpf char 21 bpfilter device-major tun char 22 tun device-major ipl char 23 ipfilter -device-major lkm char 24 lkm device-major scsibus char 31 scsibus device-major raid char 32 block 14 raid diff --git a/sys/arch/luna68k/luna68k/machdep.c b/sys/arch/luna68k/luna68k/machdep.c index 0f267788b08..57d9deab1fb 100644 --- a/sys/arch/luna68k/luna68k/machdep.c +++ b/sys/arch/luna68k/luna68k/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.56 2008/11/11 06:46:43 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.57 2008/11/12 12:36:02 ad Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.56 2008/11/11 06:46:43 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.57 2008/11/12 12:36:02 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -214,7 +214,7 @@ consinit() ws_cnattach(); } -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) { extern char end[]; extern int *esym; diff --git a/sys/arch/mac68k/conf/GENERIC b/sys/arch/mac68k/conf/GENERIC index 99d0fc25bbb..1813994be86 100644 --- a/sys/arch/mac68k/conf/GENERIC +++ b/sys/arch/mac68k/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.191 2008/08/10 15:31:21 tls Exp $ +# $NetBSD: GENERIC,v 1.192 2008/11/12 12:36:02 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/mac68k/conf/std.mac68k" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.191 $" +#ident "GENERIC-$Revision: 1.192 $" maxusers 16 # estimated number of users @@ -49,7 +49,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/mac68k/conf/SMALLRAM b/sys/arch/mac68k/conf/SMALLRAM index 69ca2bb012f..980223a2d57 100644 --- a/sys/arch/mac68k/conf/SMALLRAM +++ b/sys/arch/mac68k/conf/SMALLRAM @@ -1,4 +1,4 @@ -# $NetBSD: SMALLRAM,v 1.32 2008/08/08 13:59:24 hauke Exp $ +# $NetBSD: SMALLRAM,v 1.33 2008/11/12 12:36:03 ad Exp $ # # This is an example of how to configure a small, efficient kernel for # a system with limited RAM. Even so it's capable of doing quite a @@ -26,7 +26,6 @@ no options FPU_EMULATE no options INSECURE -no options LKM no options SYSCTL_INCLUDE_DESCR no options KMEMSTATS diff --git a/sys/arch/mac68k/conf/majors.mac68k b/sys/arch/mac68k/conf/majors.mac68k index e8804522dca..404c334edf5 100644 --- a/sys/arch/mac68k/conf/majors.mac68k +++ b/sys/arch/mac68k/conf/majors.mac68k @@ -1,4 +1,4 @@ -# $NetBSD: majors.mac68k,v 1.20 2008/05/22 19:49:43 hauke Exp $ +# $NetBSD: majors.mac68k,v 1.21 2008/11/12 12:36:03 ad Exp $ # # Device majors for mac68k # @@ -26,7 +26,6 @@ device-major filedesc char 21 device-major bpf char 22 bpfilter device-major aed char 23 aed device-major tun char 24 tun -device-major lkm char 25 lkm device-major md char 32 block 13 md device-major ss char 33 ss diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c index 45fe85ac5c1..8d05eeafef3 100644 --- a/sys/arch/mac68k/mac68k/machdep.c +++ b/sys/arch/mac68k/mac68k/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.323 2008/11/11 06:46:43 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.324 2008/11/12 12:36:03 ad Exp $ */ /* * Copyright (c) 1982, 1990 The Regents of the University of California. @@ -107,7 +107,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.323 2008/11/11 06:46:43 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.324 2008/11/12 12:36:03 ad Exp $"); #include "opt_adb.h" #include "opt_ddb.h" @@ -377,7 +377,7 @@ consinit(void) #if NZSC > 0 && defined(KGDB) zs_kgdb_init(); #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* * Initialize kernel debugger, if compiled in. */ diff --git a/sys/arch/mac68k/obio/iwm_fd.c b/sys/arch/mac68k/obio/iwm_fd.c index 998e65e2196..b39e54f1b17 100644 --- a/sys/arch/mac68k/obio/iwm_fd.c +++ b/sys/arch/mac68k/obio/iwm_fd.c @@ -1,4 +1,4 @@ -/* $NetBSD: iwm_fd.c,v 1.43 2008/06/15 10:46:14 tsutsui Exp $ */ +/* $NetBSD: iwm_fd.c,v 1.44 2008/11/12 12:36:03 ad Exp $ */ /* * Copyright (c) 1997, 1998 Hauke Fath. All rights reserved. @@ -32,9 +32,9 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iwm_fd.c,v 1.43 2008/06/15 10:46:14 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iwm_fd.c,v 1.44 2008/11/12 12:36:03 ad Exp $"); -#ifdef _LKM +#ifdef _MODULE #define IWMCF_DRIVE 0 #else #include "locators.h" @@ -97,7 +97,7 @@ static int checkTrack(diskPosition_t *, int); static int initCylinderCache(fd_softc_t *); static void invalidateCylinderCache(fd_softc_t *); -#ifdef _LKM +#ifdef _MODULE static int probe_fd(void); int fd_mod_init(void); void fd_mod_free(void); @@ -223,12 +223,12 @@ enum { * {device}_cd * references all found devices of a type. */ -#ifndef _LKM +#ifndef _MODULE extern struct cfdriver iwm_cd; extern struct cfdriver fd_cd; -#endif /* defined _LKM */ +#endif /* defined _MODULE */ /* IWM floppy disk controller */ CFATTACH_DECL(iwm, sizeof(iwm_softc_t), @@ -274,7 +274,7 @@ int iwm_match(struct device *parent, struct cfdata *match, void *auxp) { int matched; -#ifdef _LKM +#ifdef _MODULE int iwmErr; #endif extern u_long IOBase; /* from mac68k/machdep.c */ @@ -296,7 +296,7 @@ iwm_match(struct device *parent, struct cfdata *match, void *auxp) printf("iwm: IWMBase mapped to 0x%lx in VM.\n", IWMBase); } -#ifdef _LKM +#ifdef _MODULE iwmErr = iwmInit(); if (TRACE_CONFIG) printf("initIWM() says %d.\n", iwmErr); @@ -511,7 +511,7 @@ fd_print(void *auxp, const char *controller) } -#ifdef _LKM +#ifdef _MODULE static iwm_softc_t *iwm; @@ -614,7 +614,7 @@ probe_fd(void) return err; } -#endif /* defined _LKM */ +#endif /* defined _MODULE */ /** @@ -640,7 +640,7 @@ fdopen(dev_t dev, int flags, int devType, struct lwp *l) int partitionMask; int fdType, fdUnit; int ierr, err; -#ifndef _LKM +#ifndef _MODULE iwm_softc_t *iwm = device_lookup_private(&iwm_cd, 0); /* XXX */ #endif info = NULL; /* XXX shut up egcs */ @@ -774,7 +774,7 @@ fdclose(dev_t dev, int flags, int devType, struct lwp *l) { fd_softc_t *fd; int partitionMask, fdUnit, fdType; -#ifndef _LKM +#ifndef _MODULE iwm_softc_t *iwm = device_lookup_private(&iwm_cd, 0); #endif @@ -818,7 +818,7 @@ fdioctl(dev_t dev, u_long cmd, void *data, int flags, struct lwp *l) { int result, fdUnit, fdType; fd_softc_t *fd; -#ifndef _LKM +#ifndef _MODULE iwm_softc_t *iwm = device_lookup_private(&iwm_cd, 0); #endif @@ -981,7 +981,7 @@ fdstrategy(struct buf *bp) int sectSize, transferSize; diskPosition_t physDiskLoc; fd_softc_t *fd; -#ifndef _LKM +#ifndef _MODULE iwm_softc_t *iwm = device_lookup_private(&iwm_cd, 0); #endif @@ -1274,7 +1274,7 @@ fdstart_Read(fd_softc_t *fd) int i; diskPosition_t *pos; sectorHdr_t *shdr; -#ifndef _LKM +#ifndef _MODULE iwm_softc_t *iwm = device_lookup_private(&iwm_cd, 0); /* XXX */ #endif @@ -1390,7 +1390,7 @@ fdstart_Flush(fd_softc_t *fd) int i, dcnt; diskPosition_t *pos; sectorHdr_t *shdr; -#ifndef _LKM +#ifndef _MODULE iwm_softc_t *iwm = device_lookup_private(&iwm_cd, 0); /* XXX */ #endif dcnt = 0; @@ -1520,7 +1520,7 @@ static int fdstart_IOErr(fd_softc_t *fd) { int state; -#ifndef _LKM +#ifndef _MODULE iwm_softc_t *iwm = device_lookup_private(&iwm_cd, 0); /* XXX */ #endif @@ -1886,7 +1886,7 @@ seek(fd_softc_t *fd, int style) diskPosition_t *loc; sectorHdr_t hdr; char action[32]; -#ifndef _LKM +#ifndef _MODULE iwm_softc_t *iwm = device_lookup_private(&iwm_cd, 0); /* XXX */ #endif diff --git a/sys/arch/macppc/conf/GENERIC b/sys/arch/macppc/conf/GENERIC index 1bd8a713c01..ecbd1c92a10 100644 --- a/sys/arch/macppc/conf/GENERIC +++ b/sys/arch/macppc/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.271 2008/10/07 12:43:32 pgoyette Exp $ +# $NetBSD: GENERIC,v 1.272 2008/11/12 12:36:03 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/macppc/conf/std.macppc" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.271 $" +#ident "GENERIC-$Revision: 1.272 $" maxusers 32 @@ -40,7 +40,6 @@ options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/macppc/conf/MAMBO b/sys/arch/macppc/conf/MAMBO index deb01bf2ce1..bbaba6b2850 100644 --- a/sys/arch/macppc/conf/MAMBO +++ b/sys/arch/macppc/conf/MAMBO @@ -6,7 +6,7 @@ include "arch/macppc/conf/std.macppc.g5" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.5 $" +#ident "GENERIC-$Revision: 1.6 $" maxusers 32 @@ -29,7 +29,6 @@ options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/macppc/conf/POWERMAC_G5 b/sys/arch/macppc/conf/POWERMAC_G5 index 131f085404d..d09c781617f 100644 --- a/sys/arch/macppc/conf/POWERMAC_G5 +++ b/sys/arch/macppc/conf/POWERMAC_G5 @@ -26,7 +26,6 @@ options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/mipsco/conf/GENERIC b/sys/arch/mipsco/conf/GENERIC index 8ee79f4e1c0..4526dffa765 100644 --- a/sys/arch/mipsco/conf/GENERIC +++ b/sys/arch/mipsco/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.70 2008/08/10 15:31:21 tls Exp $ +# $NetBSD: GENERIC,v 1.71 2008/11/12 12:36:03 ad Exp $ # # GENERIC machine description file # @@ -32,7 +32,6 @@ options SYSVMSG # System V message queues options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support -#options LKM # loadable kernel modules #options NTP # network time protocol options HZ=25 options USERCONF # userconf(4) support diff --git a/sys/arch/mipsco/conf/RC3230 b/sys/arch/mipsco/conf/RC3230 index c4a7c48b016..0df6c671973 100644 --- a/sys/arch/mipsco/conf/RC3230 +++ b/sys/arch/mipsco/conf/RC3230 @@ -1,5 +1,5 @@ # -# $NetBSD: RC3230,v 1.34 2008/05/30 20:10:02 tsutsui Exp $ +# $NetBSD: RC3230,v 1.35 2008/11/12 12:36:03 ad Exp $ # include "arch/mipsco/conf/std.mipsco" @@ -15,7 +15,6 @@ options SYSVMSG # System V message queues options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules #options NTP # network time protocol options HZ=25 options USERCONF # userconf(4) support diff --git a/sys/arch/mipsco/conf/majors.mipsco b/sys/arch/mipsco/conf/majors.mipsco index 72d3a6b115a..752687653fd 100644 --- a/sys/arch/mipsco/conf/majors.mipsco +++ b/sys/arch/mipsco/conf/majors.mipsco @@ -1,4 +1,4 @@ -# $NetBSD: majors.mipsco,v 1.18 2007/12/31 15:31:59 ad Exp $ +# $NetBSD: majors.mipsco,v 1.19 2008/11/12 12:36:03 ad Exp $ # # Device majors for mipsco # @@ -23,7 +23,6 @@ device-major tun char 25 tun device-major log char 33 -device-major lkm char 45 lkm device-major ipl char 46 ipfilter device-major rnd char 47 rnd device-major filedesc char 48 diff --git a/sys/arch/mipsco/mipsco/machdep.c b/sys/arch/mipsco/mipsco/machdep.c index e3351bc7488..429b8bbf460 100644 --- a/sys/arch/mipsco/mipsco/machdep.c +++ b/sys/arch/mipsco/mipsco/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.59 2008/11/11 06:46:43 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.60 2008/11/12 12:36:04 ad Exp $ */ /* * Copyright (c) 1992, 1993 @@ -76,7 +76,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.59 2008/11/11 06:46:43 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.60 2008/11/12 12:36:04 ad Exp $"); /* from: Utah Hdr: machdep.c 1.63 91/04/24 */ @@ -240,7 +240,7 @@ mach_init(argc, argv, envp, bim, bip) int i, howto; extern char edata[], end[]; const char *bi_msg; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) int nsym = 0; char *ssym = 0; char *esym = 0; @@ -265,7 +265,7 @@ mach_init(argc, argv, envp, bim, bip) kernend = (void *)mips_round_page(end); memset(edata, 0, end - edata); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) bi_syms = lookup_bootinfo(BTINFO_SYMTAB); /* Load sysmbol table if present */ @@ -329,7 +329,7 @@ mach_init(argc, argv, envp, bim, bip) } -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* init symbols if present */ if (esym) ksyms_init(esym - ssym, ssym, esym); diff --git a/sys/arch/mmeye/conf/GENERIC b/sys/arch/mmeye/conf/GENERIC index 386fc80b0d4..0b49b717720 100644 --- a/sys/arch/mmeye/conf/GENERIC +++ b/sys/arch/mmeye/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.95 2008/08/10 15:31:21 tls Exp $ +# $NetBSD: GENERIC,v 1.96 2008/11/12 12:36:04 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/mmeye/conf/std.mmeye" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.95 $" +#ident "GENERIC-$Revision: 1.96 $" maxusers 16 # estimated number of users @@ -47,7 +47,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing options P1003_1B_SEMAPHORE # p1003.1b semaphore support -#options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/mmeye/conf/MMTA b/sys/arch/mmeye/conf/MMTA index 39ab394679a..c353f883f58 100644 --- a/sys/arch/mmeye/conf/MMTA +++ b/sys/arch/mmeye/conf/MMTA @@ -1,4 +1,4 @@ -# $NetBSD: MMTA,v 1.38 2008/02/29 14:42:32 jmmv Exp $ +# $NetBSD: MMTA,v 1.39 2008/11/12 12:36:04 ad Exp $ # # GENERIC -- everything that's currently supported # @@ -34,7 +34,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) #options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel diff --git a/sys/arch/mmeye/conf/MMTAICE b/sys/arch/mmeye/conf/MMTAICE index eb3ddaa10de..3227963b988 100644 --- a/sys/arch/mmeye/conf/MMTAICE +++ b/sys/arch/mmeye/conf/MMTAICE @@ -1,4 +1,4 @@ -# $NetBSD: MMTAICE,v 1.40 2008/02/29 14:42:32 jmmv Exp $ +# $NetBSD: MMTAICE,v 1.41 2008/11/12 12:36:04 ad Exp $ # # GENERIC -- everything that's currently supported # @@ -64,7 +64,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/mmeye/conf/MMTAROMNEW b/sys/arch/mmeye/conf/MMTAROMNEW index 381dc365683..27c989936ee 100644 --- a/sys/arch/mmeye/conf/MMTAROMNEW +++ b/sys/arch/mmeye/conf/MMTAROMNEW @@ -1,4 +1,4 @@ -# $NetBSD: MMTAROMNEW,v 1.39 2008/02/29 14:42:32 jmmv Exp $ +# $NetBSD: MMTAROMNEW,v 1.40 2008/11/12 12:36:04 ad Exp $ # # GENERIC -- everything that's currently supported # @@ -43,7 +43,6 @@ options HZ=10 # clock interrupt generates every 1/10 sec #options SYSVSHM # System V-like memory sharing #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/mmeye/conf/majors.mmeye b/sys/arch/mmeye/conf/majors.mmeye index 180b4da824d..a11fff7aa59 100644 --- a/sys/arch/mmeye/conf/majors.mmeye +++ b/sys/arch/mmeye/conf/majors.mmeye @@ -1,4 +1,4 @@ -# $NetBSD: majors.mmeye,v 1.18 2007/12/31 15:32:00 ad Exp $ +# $NetBSD: majors.mmeye,v 1.19 2008/11/12 12:36:04 ad Exp $ # # Device majors for mmeye # @@ -26,7 +26,6 @@ device-major filedesc char 22 device-major bpf char 23 bpfilter device-major md char 24 block 17 md -device-major lkm char 28 lkm device-major tun char 40 tun device-major vnd char 41 block 14 vnd diff --git a/sys/arch/mmeye/mmeye/machdep.c b/sys/arch/mmeye/mmeye/machdep.c index a49d7af756c..65ffff24eb1 100644 --- a/sys/arch/mmeye/mmeye/machdep.c +++ b/sys/arch/mmeye/mmeye/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.44 2008/11/11 06:46:43 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.45 2008/11/12 12:36:04 ad Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.44 2008/11/11 06:46:43 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.45 2008/11/12 12:36:04 ad Exp $"); #include "opt_ddb.h" #include "opt_memsize.h" @@ -240,7 +240,7 @@ initSH3(void *pc) /* XXX return address */ consinit(); kernend = atop(round_page(SH3_P1SEG_TO_PHYS(end))); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* XXX Currently symbol table size is not passed to the kernel. */ kernend += atop(0x40000); /* XXX */ #endif @@ -258,7 +258,7 @@ initSH3(void *pc) /* XXX return address */ /* Initialize pmap and start to address translation */ pmap_bootstrap(); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init(1, end, end + 0x40000); /* XXX */ #endif /* diff --git a/sys/arch/mvme68k/conf/majors.mvme68k b/sys/arch/mvme68k/conf/majors.mvme68k index 8d9f4ca485d..9a6c5ae66df 100644 --- a/sys/arch/mvme68k/conf/majors.mvme68k +++ b/sys/arch/mvme68k/conf/majors.mvme68k @@ -1,4 +1,4 @@ -# $NetBSD: majors.mvme68k,v 1.18 2007/12/31 15:32:00 ad Exp $ +# $NetBSD: majors.mvme68k,v 1.19 2008/11/12 12:36:04 ad Exp $ # # Device majors for mvme68k # @@ -24,7 +24,6 @@ device-major st char 20 block 7 st device-major filedesc char 21 device-major bpf char 22 bpfilter device-major tun char 23 tun -device-major lkm char 24 lkm device-major ses char 30 ses device-major ch char 31 ch diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c index 5e8908b9998..e97a4aef6cc 100644 --- a/sys/arch/mvme68k/mvme68k/machdep.c +++ b/sys/arch/mvme68k/mvme68k/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.130 2008/11/11 06:46:43 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.131 2008/11/12 12:36:04 ad Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.130 2008/11/11 06:46:43 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.131 2008/11/12 12:36:04 ad Exp $"); #include "opt_ddb.h" #include "opt_m060sp.h" @@ -109,7 +109,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.130 2008/11/11 06:46:43 dyoung Exp $") #include "ksyms.h" -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) #include <sys/exec_elf.h> #endif @@ -438,7 +438,7 @@ consinit(void) */ cninit(); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) { extern char end[]; extern int *esym; diff --git a/sys/arch/mvmeppc/conf/majors.mvmeppc b/sys/arch/mvmeppc/conf/majors.mvmeppc index 065b8458261..914a269b617 100644 --- a/sys/arch/mvmeppc/conf/majors.mvmeppc +++ b/sys/arch/mvmeppc/conf/majors.mvmeppc @@ -1,4 +1,4 @@ -# $NetBSD: majors.mvmeppc,v 1.18 2007/12/31 15:32:00 ad Exp $ +# $NetBSD: majors.mvmeppc,v 1.19 2008/11/12 12:36:04 ad Exp $ # # Device majors for mvmeppc # @@ -26,7 +26,6 @@ device-major filedesc char 22 device-major bpf char 23 bpfilter device-major md char 24 block 17 md -device-major lkm char 28 lkm device-major tun char 40 tun device-major vnd char 41 block 14 vnd diff --git a/sys/arch/netwinder/conf/GENERIC b/sys/arch/netwinder/conf/GENERIC index f6599cf11dc..806700441d8 100644 --- a/sys/arch/netwinder/conf/GENERIC +++ b/sys/arch/netwinder/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.93 2008/08/10 15:31:21 tls Exp $ +# $NetBSD: GENERIC,v 1.94 2008/11/12 12:36:04 ad Exp $ # # GENERIC machine description file # @@ -154,7 +154,6 @@ options P1003_1B_SEMAPHORE # p1003.1b semaphore support # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors options PCIVERBOSE # Verbose PCI descriptions diff --git a/sys/arch/netwinder/netwinder/netwinder_machdep.c b/sys/arch/netwinder/netwinder/netwinder_machdep.c index f7a624b37f1..68d9ef926c5 100644 --- a/sys/arch/netwinder/netwinder/netwinder_machdep.c +++ b/sys/arch/netwinder/netwinder/netwinder_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: netwinder_machdep.c,v 1.67 2008/11/11 06:46:43 dyoung Exp $ */ +/* $NetBSD: netwinder_machdep.c,v 1.68 2008/11/12 12:36:04 ad Exp $ */ /* * Copyright (c) 1997,1998 Mark Brinicombe. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: netwinder_machdep.c,v 1.67 2008/11/11 06:46:43 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netwinder_machdep.c,v 1.68 2008/11/12 12:36:04 ad Exp $"); #include "opt_ddb.h" #include "opt_pmap_debug.h" @@ -855,7 +855,7 @@ initarm(void *arg) if (nwbootinfo.bi_pagesize == 0xdeadbeef) printf("WARNING: NeTTrom boot info corrupt\n"); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* Firmware doesn't load symbols. */ ksyms_init(0, NULL, NULL); #endif diff --git a/sys/arch/news68k/conf/GENERIC b/sys/arch/news68k/conf/GENERIC index 6ab3fd05205..4f2d234dfaa 100644 --- a/sys/arch/news68k/conf/GENERIC +++ b/sys/arch/news68k/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.94 2008/08/10 15:31:21 tls Exp $ +# $NetBSD: GENERIC,v 1.95 2008/11/12 12:36:04 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/news68k/conf/std.news68k" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.94 $" +#ident "GENERIC-$Revision: 1.95 $" maxusers 8 @@ -38,7 +38,6 @@ options SYSVMSG # System V message queues options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel diff --git a/sys/arch/news68k/conf/GENERIC_TINY b/sys/arch/news68k/conf/GENERIC_TINY index 93d1d29ef3e..fc97490eada 100644 --- a/sys/arch/news68k/conf/GENERIC_TINY +++ b/sys/arch/news68k/conf/GENERIC_TINY @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC_TINY,v 1.61 2008/07/31 07:41:02 simonb Exp $ +# $NetBSD: GENERIC_TINY,v 1.62 2008/11/12 12:36:04 ad Exp $ # news68k GENERIC config file for low memory machines; # @@ -6,7 +6,7 @@ include "arch/news68k/conf/std.news68k" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC_TINY-$Revision: 1.61 $" +#ident "GENERIC_TINY-$Revision: 1.62 $" maxusers 4 @@ -22,7 +22,6 @@ options SYSVMSG # System V message queues options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support options PIPE_SOCKETPAIR # smaller, but slower pipe(2) #options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel diff --git a/sys/arch/news68k/conf/INSTALL b/sys/arch/news68k/conf/INSTALL index 428b8234b14..437e135eff8 100644 --- a/sys/arch/news68k/conf/INSTALL +++ b/sys/arch/news68k/conf/INSTALL @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.46 2008/11/08 10:24:23 he Exp $ +# $NetBSD: INSTALL,v 1.47 2008/11/12 12:36:04 ad Exp $ # config for bootable floppy kernel # @@ -25,7 +25,6 @@ options MEMORY_DISK_ROOT_SIZE=3000 # 1.50 Megabytes #options SYSVMSG # System V message queues #options SYSVSEM # System V semaphores #options SYSVSHM # System V shared memory -#options LKM # loadable kernel modules options USERCONF # userconf(4) support options PIPE_SOCKETPAIR # smaller, but slower pipe(2) #options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel diff --git a/sys/arch/news68k/conf/LIBERO b/sys/arch/news68k/conf/LIBERO index 5c5d5c34766..2ff788f739d 100644 --- a/sys/arch/news68k/conf/LIBERO +++ b/sys/arch/news68k/conf/LIBERO @@ -1,4 +1,4 @@ -# $NetBSD: LIBERO,v 1.48 2008/04/27 06:26:04 tsutsui Exp $ +# $NetBSD: LIBERO,v 1.49 2008/11/12 12:36:04 ad Exp $ # NEWS1750 config file; # @@ -20,7 +20,6 @@ options KTRACE # system call tracing support options SYSVMSG # System V message queues options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory -options LKM # loadable kernel modules #options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) #options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel diff --git a/sys/arch/news68k/conf/NEWS1200 b/sys/arch/news68k/conf/NEWS1200 index b2bbeb6b4bd..ce27f6e4953 100644 --- a/sys/arch/news68k/conf/NEWS1200 +++ b/sys/arch/news68k/conf/NEWS1200 @@ -1,4 +1,4 @@ -# $NetBSD: NEWS1200,v 1.44 2008/07/31 07:41:02 simonb Exp $ +# $NetBSD: NEWS1200,v 1.45 2008/11/12 12:36:04 ad Exp $ # news1200 config file # @@ -18,7 +18,6 @@ options KTRACE # system call tracing support options SYSVMSG # System V message queues options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) #options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel diff --git a/sys/arch/news68k/conf/majors.news68k b/sys/arch/news68k/conf/majors.news68k index 7f88e5918a0..cf8fc302e6d 100644 --- a/sys/arch/news68k/conf/majors.news68k +++ b/sys/arch/news68k/conf/majors.news68k @@ -1,4 +1,4 @@ -# $NetBSD: majors.news68k,v 1.19 2007/12/31 15:32:01 ad Exp $ +# $NetBSD: majors.news68k,v 1.20 2008/11/12 12:36:04 ad Exp $ # # Device majors for news68k # @@ -21,7 +21,6 @@ device-major tun char 25 tun device-major log char 33 -device-major lkm char 45 lkm device-major ipl char 46 ipfilter device-major rnd char 47 rnd device-major filedesc char 48 diff --git a/sys/arch/news68k/news68k/machdep.c b/sys/arch/news68k/news68k/machdep.c index 7e38b6876c3..b70b849352f 100644 --- a/sys/arch/news68k/news68k/machdep.c +++ b/sys/arch/news68k/news68k/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.73 2008/11/11 06:46:43 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.74 2008/11/12 12:36:04 ad Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.73 2008/11/11 06:46:43 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.74 2008/11/12 12:36:04 ad Exp $"); #include "opt_ddb.h" #include "opt_compat_netbsd.h" @@ -1084,7 +1084,7 @@ consinit(void) (*cn_tab->cn_init)(cn_tab); break; } -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init((int)esym - (int)&end - sizeof(Elf32_Ehdr), (void *)&end, esym); #endif diff --git a/sys/arch/newsmips/conf/GENERIC b/sys/arch/newsmips/conf/GENERIC index 8bb71d3b405..a798b204b90 100644 --- a/sys/arch/newsmips/conf/GENERIC +++ b/sys/arch/newsmips/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.104 2008/08/10 15:31:21 tls Exp $ +# $NetBSD: GENERIC,v 1.105 2008/11/12 12:36:04 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/newsmips/conf/std.newsmips" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.104 $" +#ident "GENERIC-$Revision: 1.105 $" maxusers 16 @@ -38,7 +38,6 @@ options SYSVMSG # System V message queues options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options NTP # network time protocol options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/newsmips/conf/majors.newsmips b/sys/arch/newsmips/conf/majors.newsmips index 5c9232bbfd1..02b570fe328 100644 --- a/sys/arch/newsmips/conf/majors.newsmips +++ b/sys/arch/newsmips/conf/majors.newsmips @@ -1,4 +1,4 @@ -# $NetBSD: majors.newsmips,v 1.19 2007/12/31 15:32:02 ad Exp $ +# $NetBSD: majors.newsmips,v 1.20 2008/11/12 12:36:04 ad Exp $ # # Device majors for newsmips # @@ -21,7 +21,6 @@ device-major tun char 25 tun device-major log char 33 -device-major lkm char 45 lkm device-major ipl char 46 ipfilter device-major rnd char 47 rnd device-major filedesc char 48 diff --git a/sys/arch/newsmips/newsmips/machdep.c b/sys/arch/newsmips/newsmips/machdep.c index 5855d540a2b..26e2d0bcead 100644 --- a/sys/arch/newsmips/newsmips/machdep.c +++ b/sys/arch/newsmips/newsmips/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.99 2008/11/11 06:46:43 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.100 2008/11/12 12:36:04 ad Exp $ */ /* * Copyright (c) 1992, 1993 @@ -76,7 +76,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.99 2008/11/11 06:46:43 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.100 2008/11/12 12:36:04 ad Exp $"); /* from: Utah Hdr: machdep.c 1.63 91/04/24 */ @@ -222,7 +222,7 @@ mach_init(int x_boothowto, int x_bootdev, int x_bootname, int x_maxmem) struct btinfo_magic *bi_magic; struct btinfo_bootarg *bi_arg; struct btinfo_systype *bi_systype; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) struct btinfo_symtab *bi_sym; int nsym = 0; char *ssym, *esym; @@ -240,7 +240,7 @@ mach_init(int x_boothowto, int x_bootdev, int x_bootname, int x_maxmem) x_bootdev = bi_arg->bootdev; x_maxmem = bi_arg->maxmem; } -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) bi_sym = lookup_bootinfo(BTINFO_SYMTAB); if (bi_sym) { nsym = bi_sym->nsym; @@ -304,7 +304,7 @@ mach_init(int x_boothowto, int x_bootdev, int x_bootname, int x_maxmem) *(int *)(MIPS_PHYS_TO_KSEG1(MACH_BOOTSW_ADDR)) = x_boothowto; kernend = (char *)mips_round_page(end); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) if (nsym) kernend = (char *)mips_round_page(esym); #endif @@ -339,7 +339,7 @@ mach_init(int x_boothowto, int x_bootdev, int x_bootname, int x_maxmem) */ newsmips_bus_dma_init(); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) if (nsym) ksyms_init(esym - ssym, ssym, esym); #endif diff --git a/sys/arch/next68k/conf/GENERIC b/sys/arch/next68k/conf/GENERIC index 4553353436d..967b709b9e8 100644 --- a/sys/arch/next68k/conf/GENERIC +++ b/sys/arch/next68k/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.113 2008/08/10 15:31:21 tls Exp $ +# $NetBSD: GENERIC,v 1.114 2008/11/12 12:36:04 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/next68k/conf/std.next68k" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.113 $" +#ident "GENERIC-$Revision: 1.114 $" # Needs to be set per system. i.e change these as you see fit maxusers 16 @@ -39,7 +39,6 @@ options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # POSIX semaphore support #options SHMMAXPGS=1024 # 1024 pages is the default -options LKM # loadable kernel modules options INSECURE # disable kernel security level options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/next68k/conf/SLAB b/sys/arch/next68k/conf/SLAB index df6dacc94d7..65395b65c30 100644 --- a/sys/arch/next68k/conf/SLAB +++ b/sys/arch/next68k/conf/SLAB @@ -1,4 +1,4 @@ -# $NetBSD: SLAB,v 1.35 2008/05/30 20:10:02 tsutsui Exp $ +# $NetBSD: SLAB,v 1.36 2008/11/12 12:36:04 ad Exp $ # # deberg's development machine # @@ -19,7 +19,6 @@ options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # POSIX semaphore support #options SHMMAXPGS=1024 # 1024 pages is the default -options LKM # loadable kernel modules options INSECURE # disable kernel security level options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/next68k/conf/majors.next68k b/sys/arch/next68k/conf/majors.next68k index 5d3aac64faf..20edaecd136 100644 --- a/sys/arch/next68k/conf/majors.next68k +++ b/sys/arch/next68k/conf/majors.next68k @@ -1,4 +1,4 @@ -# $NetBSD: majors.next68k,v 1.20 2007/12/31 15:32:02 ad Exp $ +# $NetBSD: majors.next68k,v 1.21 2008/11/12 12:36:04 ad Exp $ # # Device majors for next68k # @@ -24,7 +24,6 @@ device-major filedesc char 21 device-major bpf char 22 bpfilter device-major tun char 24 tun -device-major lkm char 25 lkm device-major md char 32 block 13 md device-major ss char 33 ss diff --git a/sys/arch/next68k/next68k/machdep.c b/sys/arch/next68k/next68k/machdep.c index f29e7e3438e..263c799b49c 100644 --- a/sys/arch/next68k/next68k/machdep.c +++ b/sys/arch/next68k/next68k/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.86 2008/11/11 06:46:43 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.87 2008/11/12 12:36:05 ad Exp $ */ /* * Copyright (c) 1998 Darrin B. Jewell @@ -79,7 +79,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.86 2008/11/11 06:46:43 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.87 2008/11/12 12:36:05 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -286,7 +286,7 @@ consinit(void) #if defined(KGDB) && (NZSC > 0) zs_kgdb_init(); #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* Initialize kernel symbol table, if compiled in. */ ksyms_init(nsym, ssym, esym); #endif diff --git a/sys/arch/ofppc/conf/GENERIC b/sys/arch/ofppc/conf/GENERIC index 2dc033f64dd..7e7ee833920 100644 --- a/sys/arch/ofppc/conf/GENERIC +++ b/sys/arch/ofppc/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.118 2008/08/10 15:31:21 tls Exp $ +# $NetBSD: GENERIC,v 1.119 2008/11/12 12:36:05 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/ofppc/conf/std.ofppc" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.118 $" +#ident "GENERIC-$Revision: 1.119 $" maxusers 32 @@ -44,7 +44,6 @@ options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/ofppc/conf/GENERIC.MP b/sys/arch/ofppc/conf/GENERIC.MP index 9bf30c63014..1eacd5a211a 100644 --- a/sys/arch/ofppc/conf/GENERIC.MP +++ b/sys/arch/ofppc/conf/GENERIC.MP @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC.MP,v 1.2 2008/07/31 07:41:03 simonb Exp $ +# $NetBSD: GENERIC.MP,v 1.3 2008/11/12 12:36:05 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/ofppc/conf/std.ofppc" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.2 $" +#ident "GENERIC-$Revision: 1.3 $" maxusers 32 @@ -49,7 +49,6 @@ options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/playstation2/conf/majors.playstation2 b/sys/arch/playstation2/conf/majors.playstation2 index 3d4662223c0..8466ed80624 100644 --- a/sys/arch/playstation2/conf/majors.playstation2 +++ b/sys/arch/playstation2/conf/majors.playstation2 @@ -1,4 +1,4 @@ -# $NetBSD: majors.playstation2,v 1.19 2007/12/31 15:32:03 ad Exp $ +# $NetBSD: majors.playstation2,v 1.20 2008/11/12 12:36:05 ad Exp $ # # Device majors for playstation2 # @@ -11,7 +11,6 @@ device-major filedesc char 4 device-major log char 5 device-major ptc char 6 pty device-major pts char 7 pty -device-major lkm char 8 lkm device-major wd char 10 block 1 wd diff --git a/sys/arch/pmax/conf/GENERIC b/sys/arch/pmax/conf/GENERIC index da15d6c7e20..6217b06e7f5 100644 --- a/sys/arch/pmax/conf/GENERIC +++ b/sys/arch/pmax/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.158 2008/08/10 15:31:21 tls Exp $ +# $NetBSD: GENERIC,v 1.159 2008/11/12 12:36:05 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/pmax/conf/std.pmax" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.158 $" +#ident "GENERIC-$Revision: 1.159 $" maxusers 64 @@ -56,7 +56,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/pmax/conf/INSTALL b/sys/arch/pmax/conf/INSTALL index 4e8eb12dbc5..2de216b1262 100644 --- a/sys/arch/pmax/conf/INSTALL +++ b/sys/arch/pmax/conf/INSTALL @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.64 2008/07/31 07:41:03 simonb Exp $ +# $NetBSD: INSTALL,v 1.65 2008/11/12 12:36:05 ad Exp $ # # Distribution install kernel (any model) # netbsd: cut-down kernel for miniroots. @@ -37,7 +37,6 @@ options DEC_3MAXPLUS # 5000/240 (kn03), 5000/260 (kn05) #options DIAGNOSTIC # extra kernel debugging checks #options DEBUG # extra kernel debugging support #options KTRACE # system call tracing support -#options LKM # loadable kernel modules options USERCONF # userconf(4) support options PIPE_SOCKETPAIR # smaller, but slower pipe(2) #options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel diff --git a/sys/arch/pmax/conf/majors.pmax b/sys/arch/pmax/conf/majors.pmax index e385659a8ad..2cef5076137 100644 --- a/sys/arch/pmax/conf/majors.pmax +++ b/sys/arch/pmax/conf/majors.pmax @@ -1,4 +1,4 @@ -# $NetBSD: majors.pmax,v 1.19 2007/12/31 15:32:03 ad Exp $ +# $NetBSD: majors.pmax,v 1.20 2008/11/12 12:36:05 ad Exp $ # # Device majors for pmax # @@ -40,7 +40,6 @@ device-major wsmouse char 90 wsmouse device-major ipl char 91 ipfilter device-major rnd char 92 rnd device-major tun char 93 tun -device-major lkm char 94 lkm device-major scsibus char 95 scsibus device-major raid char 96 block 32 raid device-major md char 97 block 17 md diff --git a/sys/arch/pmax/pmax/machdep.c b/sys/arch/pmax/pmax/machdep.c index a0986e7fc2e..decd683d51f 100644 --- a/sys/arch/pmax/pmax/machdep.c +++ b/sys/arch/pmax/pmax/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.224 2008/11/11 06:46:43 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.225 2008/11/12 12:36:05 ad Exp $ */ /* * Copyright (c) 1992, 1993 @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.224 2008/11/11 06:46:43 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.225 2008/11/12 12:36:05 ad Exp $"); #include "fs_mfs.h" #include "opt_ddb.h" @@ -113,7 +113,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.224 2008/11/11 06:46:43 dyoung Exp $") #define _PMAX_BUS_DMA_PRIVATE #include <machine/bus.h> -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) #include <sys/exec_aout.h> /* XXX backwards compatilbity for DDB */ #include <machine/db_machdep.h> #include <ddb/db_extern.h> @@ -202,7 +202,7 @@ mach_init(argc, argv, code, cv, bim, bip) u_long first, last; int i; char *kernend; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) void *ssym = 0; struct btinfo_symtab *bi_syms; struct exec *aout; /* XXX backwards compatilbity for DDB */ @@ -225,7 +225,7 @@ mach_init(argc, argv, code, cv, bim, bip) bootinfo_msg = "invalid bootinfo pointer (old bootblocks?)\n"; /* clear the BSS segment */ -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) bi_syms = lookup_bootinfo(BTINFO_SYMTAB); aout = (struct exec *)edata; @@ -330,7 +330,7 @@ mach_init(argc, argv, code, cv, bim, bip) kernend += round_page(mfs_initminiroot(kernend)); #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* init symbols if present */ if (esym) ksyms_init((char *)esym - (char *)ssym, ssym, esym); diff --git a/sys/arch/powerpc/conf/majors.powerpc b/sys/arch/powerpc/conf/majors.powerpc index dbb8a62661f..dabd08ebcd5 100644 --- a/sys/arch/powerpc/conf/majors.powerpc +++ b/sys/arch/powerpc/conf/majors.powerpc @@ -1,4 +1,4 @@ -# $NetBSD: majors.powerpc,v 1.2 2007/12/31 15:32:04 ad Exp $ +# $NetBSD: majors.powerpc,v 1.3 2008/11/12 12:36:05 ad Exp $ # # Device majors for shared PowerPC # @@ -35,7 +35,6 @@ device-major aed char 28 aed device-major vcoda char 29 vcoda device-major wd char 30 block 10 wd -device-major lkm char 31 lkm device-major filedesc char 32 device-major nvram char 33 nvram device-major scsibus char 34 scsibus diff --git a/sys/arch/powerpc/oea/ofwoea_machdep.c b/sys/arch/powerpc/oea/ofwoea_machdep.c index ad01c7ce2d3..4d5a40dd0df 100644 --- a/sys/arch/powerpc/oea/ofwoea_machdep.c +++ b/sys/arch/powerpc/oea/ofwoea_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofwoea_machdep.c,v 1.14 2008/04/28 20:23:32 martin Exp $ */ +/* $NetBSD: ofwoea_machdep.c,v 1.15 2008/11/12 12:36:05 ad Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.14 2008/04/28 20:23:32 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.15 2008/11/12 12:36:05 ad Exp $"); #include "opt_ppcarch.h" #include "opt_compat_netbsd.h" @@ -110,7 +110,7 @@ struct pmap ofw_pmap; struct ofw_translations ofmap[32]; char bootpath[256]; char model_name[64]; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) void *startsym, *endsym; #endif #ifdef TIMEBASE_FREQ @@ -147,7 +147,7 @@ ofwoea_initppc(u_int startkernel, u_int endkernel, char *args) if ((oeacpufeat & OEACPU_NOBAT) == 0) ofwoea_batinit(); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* get info of kernel symbol table from bootloader */ memcpy(&startsym, args + strlen(args) + 1, sizeof(startsym)); memcpy(&endsym, args + strlen(args) + 1 + sizeof(startsym), @@ -238,7 +238,7 @@ ofwoea_initppc(u_int startkernel, u_int endkernel, char *args) restore_ofmap(ofmap, ofmaplen); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init((int)((u_int)endsym - (u_int)startsym), startsym, endsym); #endif diff --git a/sys/arch/powerpc/oea/prep_machdep.c b/sys/arch/powerpc/oea/prep_machdep.c index f2f457cbfa6..eeab08686c9 100644 --- a/sys/arch/powerpc/oea/prep_machdep.c +++ b/sys/arch/powerpc/oea/prep_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: prep_machdep.c,v 1.3 2008/04/28 20:23:32 martin Exp $ */ +/* $NetBSD: prep_machdep.c,v 1.4 2008/11/12 12:36:05 ad Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: prep_machdep.c,v 1.3 2008/04/28 20:23:32 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: prep_machdep.c,v 1.4 2008/11/12 12:36:05 ad Exp $"); #include <sys/param.h> #include <sys/extent.h> @@ -60,7 +60,7 @@ __KERNEL_RCSID(0, "$NetBSD: prep_machdep.c,v 1.3 2008/04/28 20:23:32 martin Exp #include "ksyms.h" -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) extern void *endsym, *startsym; #endif extern struct mem_region physmemr[2], availmemr[2]; @@ -165,7 +165,7 @@ prep_initppc(u_long startkernel, u_long endkernel, u_int args) /* Initialize pmap module */ pmap_bootstrap(startkernel, endkernel); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init((int)((u_long)endsym - (u_long)startsym), startsym, endsym); #endif diff --git a/sys/arch/prep/conf/GENERIC b/sys/arch/prep/conf/GENERIC index 1aefc937e9b..f3bc32a23b8 100644 --- a/sys/arch/prep/conf/GENERIC +++ b/sys/arch/prep/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.145 2008/08/10 15:31:21 tls Exp $ +# $NetBSD: GENERIC,v 1.146 2008/11/12 12:36:05 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/prep/conf/std.prep" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.145 $" +#ident "GENERIC-$Revision: 1.146 $" maxusers 32 @@ -44,7 +44,6 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/prep/conf/majors.prep b/sys/arch/prep/conf/majors.prep index 0ac3571296a..08d6e0d139d 100644 --- a/sys/arch/prep/conf/majors.prep +++ b/sys/arch/prep/conf/majors.prep @@ -1,4 +1,4 @@ -# $NetBSD: majors.prep,v 1.20 2007/12/31 15:32:04 ad Exp $ +# $NetBSD: majors.prep,v 1.21 2008/11/12 12:36:05 ad Exp $ # # Device majors for prep # @@ -31,7 +31,6 @@ device-major md char 24 block 17 md device-major joy char 26 joy device-major spkr char 27 spkr -device-major lkm char 28 prep device-major nvram char 33 nvram diff --git a/sys/arch/rs6000/conf/GENERIC b/sys/arch/rs6000/conf/GENERIC index 8d1639238a0..237e93cca73 100644 --- a/sys/arch/rs6000/conf/GENERIC +++ b/sys/arch/rs6000/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.6 2008/08/10 15:31:21 tls Exp $ +# $NetBSD: GENERIC,v 1.7 2008/11/12 12:36:05 ad Exp $ # # GENERIC machine description file # @@ -24,7 +24,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary #makeoptions COPTS="-O2 -mno-powerpc -mno-power" # wheeee -#ident "GENERIC-$Revision: 1.6 $" +#ident "GENERIC-$Revision: 1.7 $" maxusers 32 @@ -49,7 +49,6 @@ options SYSVSHM # System V-like memory sharing #options SHMMAXPGS=1024 # 1024 pages is the default options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/rs6000/rs6000/machdep.c b/sys/arch/rs6000/rs6000/machdep.c index 0be296ec746..11a28347453 100644 --- a/sys/arch/rs6000/rs6000/machdep.c +++ b/sys/arch/rs6000/rs6000/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.3 2008/11/11 06:46:43 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.4 2008/11/12 12:36:05 ad Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.3 2008/11/11 06:46:43 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.4 2008/11/12 12:36:05 ad Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -118,7 +118,7 @@ struct mem_region physmemr[OFMEMREGIONS], availmemr[OFMEMREGIONS]; paddr_t avail_end; /* XXX temporary */ extern register_t iosrtable[16]; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) extern void *endsym, *startsym; #endif @@ -380,7 +380,7 @@ initppc(u_long startkernel, u_long endkernel, u_int args, void *btinfo) consinit(); setled(0x41000000); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init((int)((u_long)endsym - (u_long)startsym), startsym, endsym); #endif diff --git a/sys/arch/sandpoint/sandpoint/machdep.c b/sys/arch/sandpoint/sandpoint/machdep.c index 48a438d6409..f825d35a64f 100644 --- a/sys/arch/sandpoint/sandpoint/machdep.c +++ b/sys/arch/sandpoint/sandpoint/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.43 2008/11/11 06:46:43 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.44 2008/11/12 12:36:05 ad Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.43 2008/11/11 06:46:43 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.44 2008/11/12 12:36:05 ad Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -110,7 +110,7 @@ paddr_t avail_end; struct pic_ops *isa_pic = NULL; extern int primary_pic; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) extern void *startsym, *endsym; #endif @@ -196,7 +196,7 @@ initppc(u_int startkernel, u_int endkernel, u_int args, void *btinfo) /* Initialize pmap module */ pmap_bootstrap(startkernel, endkernel); -#if 0 /* NKSYMS || defined(DDB) || defined(LKM) */ +#if 0 /* NKSYMS || defined(DDB) || defined(MODULAR) */ ksyms_init((int)((u_int)endsym - (u_int)startsym), startsym, endsym); #endif #ifdef IPKDB diff --git a/sys/arch/sbmips/conf/GENERIC b/sys/arch/sbmips/conf/GENERIC index 55e9e935a1e..26a535b2514 100644 --- a/sys/arch/sbmips/conf/GENERIC +++ b/sys/arch/sbmips/conf/GENERIC @@ -1,10 +1,10 @@ -# $NetBSD: GENERIC,v 1.70 2008/10/25 10:08:25 he Exp $ +# $NetBSD: GENERIC,v 1.71 2008/11/12 12:36:05 ad Exp $ include "arch/sbmips/conf/std.sbmips" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.70 $" +#ident "GENERIC-$Revision: 1.71 $" #options LOCKDEBUG # XXX XXX XXX XXX #options DEBUG # extra kernel debugging support @@ -23,7 +23,6 @@ options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules #options NTP # network time protocol # Debugging options diff --git a/sys/arch/sbmips/sbmips/machdep.c b/sys/arch/sbmips/sbmips/machdep.c index ec5c331fee5..ab6d2b3ed18 100644 --- a/sys/arch/sbmips/sbmips/machdep.c +++ b/sys/arch/sbmips/sbmips/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.39 2008/11/11 06:46:43 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.40 2008/11/12 12:36:05 ad Exp $ */ /* * Copyright 2000, 2001 @@ -58,7 +58,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.39 2008/11/11 06:46:43 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.40 2008/11/12 12:36:05 ad Exp $"); #include "opt_ddb.h" #include "opt_execfmt.h" @@ -102,7 +102,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.39 2008/11/11 06:46:43 dyoung Exp $"); #include "ksyms.h" -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) #include <machine/db_machdep.h> #include <ddb/db_access.h> #include <ddb/db_sym.h> @@ -116,7 +116,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.39 2008/11/11 06:46:43 dyoung Exp $"); #include <dev/cons.h> -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* start and end of kernel symbol table */ void *ksym_start, *ksym_end; #endif @@ -192,7 +192,7 @@ mach_init(long fwhandle, long magic, long bootdata, long reserved) } kernend = (void *)mips_round_page(end); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) if (magic == BOOTINFO_MAGIC) { ksym_start = (void *)bootinfo.ssym; ksym_end = (void *)bootinfo.esym; @@ -330,7 +330,7 @@ mach_init(long fwhandle, long magic, long bootdata, long reserved) /* * Initialize debuggers, and break into them, if appropriate. */ -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init(((uintptr_t)ksym_end - (uintptr_t)ksym_start), ksym_start, ksym_end); #endif diff --git a/sys/arch/sgimips/conf/GENERIC32_IP2x b/sys/arch/sgimips/conf/GENERIC32_IP2x index 15e60313421..1d021aa77c0 100644 --- a/sys/arch/sgimips/conf/GENERIC32_IP2x +++ b/sys/arch/sgimips/conf/GENERIC32_IP2x @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC32_IP2x,v 1.75 2008/08/15 15:17:18 tsutsui Exp $ +# $NetBSD: GENERIC32_IP2x,v 1.76 2008/11/12 12:36:05 ad Exp $ # # GENERIC32_IP2x machine description file # @@ -29,7 +29,7 @@ makeoptions TEXTADDR=0x88069000 # entry point options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC32-IP2x-$Revision: 1.75 $" +#ident "GENERIC32-IP2x-$Revision: 1.76 $" maxusers 32 @@ -56,7 +56,6 @@ options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support -#options LKM # loadable kernel modules (XXX: working?) options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sgimips/conf/GENERIC32_IP3x b/sys/arch/sgimips/conf/GENERIC32_IP3x index 07d9881b1a2..c8e347b42b5 100644 --- a/sys/arch/sgimips/conf/GENERIC32_IP3x +++ b/sys/arch/sgimips/conf/GENERIC32_IP3x @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC32_IP3x,v 1.76 2008/08/23 15:13:47 tsutsui Exp $ +# $NetBSD: GENERIC32_IP3x,v 1.77 2008/11/12 12:36:05 ad Exp $ # # GENERIC32_IP3x machine description file # @@ -28,7 +28,7 @@ makeoptions TEXTADDR="0x80069000" # entry point options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC32_IP3x-$Revision: 1.76 $" +#ident "GENERIC32_IP3x-$Revision: 1.77 $" maxusers 32 @@ -49,7 +49,6 @@ options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support -#options LKM # loadable kernel modules (XXX: working?) options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sgimips/conf/majors.sgimips b/sys/arch/sgimips/conf/majors.sgimips index f980d8eecf3..a1d4d96ef16 100644 --- a/sys/arch/sgimips/conf/majors.sgimips +++ b/sys/arch/sgimips/conf/majors.sgimips @@ -1,4 +1,4 @@ -# $NetBSD: majors.sgimips,v 1.20 2007/12/31 15:32:05 ad Exp $ +# $NetBSD: majors.sgimips,v 1.21 2008/11/12 12:36:06 ad Exp $ # # Device majors for sgimips # @@ -22,7 +22,6 @@ device-major ctty char 21 device-major pts char 22 pty device-major ptc char 23 pty device-major log char 24 -device-major lkm char 25 lkm device-major filedesc char 26 device-major bpf char 27 bpfilter device-major tun char 28 tun diff --git a/sys/arch/sgimips/sgimips/machdep.c b/sys/arch/sgimips/sgimips/machdep.c index aed857417c7..49dc45c6933 100644 --- a/sys/arch/sgimips/sgimips/machdep.c +++ b/sys/arch/sgimips/sgimips/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.122 2008/11/11 06:46:43 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.123 2008/11/12 12:36:06 ad Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.122 2008/11/11 06:46:43 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.123 2008/11/12 12:36:06 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -91,7 +91,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.122 2008/11/11 06:46:43 dyoung Exp $") #include "ksyms.h" -#if NKSYMS || defined(DDB) || defined(LKM) || defined(KGDB) +#if NKSYMS || defined(DDB) || defined(MODULAR) || defined(KGDB) #include <machine/db_machdep.h> #include <ddb/db_access.h> #include <ddb/db_sym.h> @@ -255,7 +255,7 @@ mach_init(int argc, char *argv[], u_int magic, void *bip) vaddr_t kernend; int kernstartpfn, kernendpfn; int i, rv; -#if NKSYMS > 0 || defined(DDB) || defined(LKM) +#if NKSYMS > 0 || defined(DDB) || defined(MODULAR) int nsym = 0; char *ssym = NULL; char *esym = NULL; @@ -302,7 +302,7 @@ mach_init(int argc, char *argv[], u_int magic, void *bip) } else bootinfo_msg = "no bootinfo found. (old bootblocks?)\n"; -#if NKSYM > 0 || defined(DDB) || defined(LKM) +#if NKSYM > 0 || defined(DDB) || defined(MODULAR) bi_syms = lookup_bootinfo(BTINFO_SYMTAB); /* check whether there is valid bootinfo symtab info */ @@ -482,7 +482,7 @@ mach_init(int argc, char *argv[], u_int magic, void *bip) for (i = 0; i < argc; i++) aprint_debug("argv[%d] = %s\n", i, argv[i]); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* init symbols if present */ if (esym) ksyms_init(nsym, ssym, esym); @@ -490,7 +490,7 @@ mach_init(int argc, char *argv[], u_int magic, void *bip) else ksyms_init(0, NULL, NULL); #endif /* SYMTAB_SPACE */ -#endif /* NKSYMS || defined(DDB) || defined(LKM) */ +#endif /* NKSYMS || defined(DDB) || defined(MODULAR) */ #if defined(KGDB) || defined(DDB) /* Set up DDB hook to turn off watchdog on entry */ diff --git a/sys/arch/shark/conf/GENERIC b/sys/arch/shark/conf/GENERIC index 982398959ee..fa7c4b62b49 100644 --- a/sys/arch/shark/conf/GENERIC +++ b/sys/arch/shark/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.81 2008/08/10 15:31:22 tls Exp $ +# $NetBSD: GENERIC,v 1.82 2008/11/12 12:36:06 ad Exp $ # # Generic Shark configuration. # @@ -7,7 +7,7 @@ include "arch/shark/conf/std.shark" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.81 $" +#ident "GENERIC-$Revision: 1.82 $" # estimated number of users maxusers 32 @@ -150,7 +150,6 @@ options INSECURE # disable kernel securelevel # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics, XXX temp required -options LKM # loadable kernel modules options KMEMSTATS # kernel memory statistics, XXX temp required options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/shark/conf/INSTALL b/sys/arch/shark/conf/INSTALL index 96f5a7f7018..a69ad912e61 100644 --- a/sys/arch/shark/conf/INSTALL +++ b/sys/arch/shark/conf/INSTALL @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.38 2008/07/31 07:41:07 simonb Exp $ +# $NetBSD: INSTALL,v 1.39 2008/11/12 12:36:06 ad Exp $ # # Shark installation kernel # @@ -123,7 +123,6 @@ options INSECURE # disable kernel securelevel # Miscellaneous kernel options #options KTRACE # system call tracing, a la ktrace(1) #options IRQSTATS # manage IRQ statistics, XXX temp required -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics, XXX temp required options USERCONF # userconf(4) support options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/shark/conf/OFWGENCFG b/sys/arch/shark/conf/OFWGENCFG index 34db62a085d..93c976593b0 100644 --- a/sys/arch/shark/conf/OFWGENCFG +++ b/sys/arch/shark/conf/OFWGENCFG @@ -1,4 +1,4 @@ -# $NetBSD: OFWGENCFG,v 1.31 2008/05/30 20:10:03 tsutsui Exp $ +# $NetBSD: OFWGENCFG,v 1.32 2008/11/12 12:36:06 ad Exp $ # # OFWGENCFG: 'generic' configuration for Open Firmware boards. # @@ -101,7 +101,6 @@ options SHMMAXPGS=1024 # 1024 pages is the default # Miscellaneous kernel options options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics -#options LKM # loadable kernel modules options KMEMSTATS # kernel memory statistics options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/shark/conf/majors.shark b/sys/arch/shark/conf/majors.shark index 5605a4bb92e..a9fe87bc2c1 100644 --- a/sys/arch/shark/conf/majors.shark +++ b/sys/arch/shark/conf/majors.shark @@ -1,4 +1,4 @@ -# $NetBSD: majors.shark,v 1.25 2007/12/31 15:32:05 ad Exp $ +# $NetBSD: majors.shark,v 1.26 2008/11/12 12:36:06 ad Exp $ # # Device majors for shark # @@ -31,7 +31,6 @@ device-major cd char 26 block 26 cd device-major bpf char 32 bpfilter device-major tun char 33 tun device-major filedesc char 34 -device-major lkm char 35 lkm device-major audio char 36 audio device-major opms char 40 opms diff --git a/sys/arch/shark/shark/shark_machdep.c b/sys/arch/shark/shark/shark_machdep.c index 615dac1a40e..06e81962293 100644 --- a/sys/arch/shark/shark/shark_machdep.c +++ b/sys/arch/shark/shark/shark_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: shark_machdep.c,v 1.30 2008/04/17 00:03:36 macallan Exp $ */ +/* $NetBSD: shark_machdep.c,v 1.31 2008/11/12 12:36:06 ad Exp $ */ /* * Copyright 1997 @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: shark_machdep.c,v 1.30 2008/04/17 00:03:36 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: shark_machdep.c,v 1.31 2008/11/12 12:36:06 ad Exp $"); #include "opt_ddb.h" @@ -299,7 +299,7 @@ initarm(void *arg) if (fiq_claim(&shark_fiqhandler)) panic("Cannot claim FIQ vector."); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) #ifdef __ELF__ ksyms_init(0, NULL, NULL); /* XXX */ #else @@ -311,7 +311,7 @@ initarm(void *arg) ksyms_init(kernexec->a_syms, &end, esym); } #endif /* __ELF__ */ -#endif /* NKSYMS || defined(DDB) || defined(LKM) */ +#endif /* NKSYMS || defined(DDB) || defined(MODULAR) */ #ifdef DDB db_machine_init(); diff --git a/sys/arch/sparc/conf/BILL-THE-CAT b/sys/arch/sparc/conf/BILL-THE-CAT index 68fd722e8c4..9230e774d53 100644 --- a/sys/arch/sparc/conf/BILL-THE-CAT +++ b/sys/arch/sparc/conf/BILL-THE-CAT @@ -1,4 +1,4 @@ -# $NetBSD: BILL-THE-CAT,v 1.42 2007/10/17 19:57:10 garbled Exp $ +# $NetBSD: BILL-THE-CAT,v 1.43 2008/11/12 12:36:06 ad Exp $ # From: NetBSD: GENERIC,v 1.84 1999/06/06 13:00:03 mrg Exp include "arch/sparc/conf/std.sparc" @@ -55,7 +55,6 @@ options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default ## Loadable kernel module support; still under development. -options LKM options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sparc/conf/GENERIC b/sys/arch/sparc/conf/GENERIC index 23b2f135753..18a72cdeae7 100644 --- a/sys/arch/sparc/conf/GENERIC +++ b/sys/arch/sparc/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.205 2008/08/10 15:31:22 tls Exp $ +# $NetBSD: GENERIC,v 1.206 2008/11/12 12:36:06 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/sparc/conf/std.sparc" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.205 $" +#ident "GENERIC-$Revision: 1.206 $" maxusers 32 @@ -77,7 +77,6 @@ options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support ## Loadable kernel module support; still under development. -options LKM options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sparc/conf/INSTALL b/sys/arch/sparc/conf/INSTALL index 83401ab25f5..0c3f9f33008 100644 --- a/sys/arch/sparc/conf/INSTALL +++ b/sys/arch/sparc/conf/INSTALL @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.62 2008/07/31 07:41:07 simonb Exp $ +# $NetBSD: INSTALL,v 1.63 2008/11/12 12:36:06 ad Exp $ # # from: NetBSD: GENERIC,v 1.84 1999/06/06 13:00:03 mrg Exp # @@ -71,7 +71,6 @@ config netbsd root on ? type ? #options SHMMAXPGS=1024 # 1024 pages is the default ## Loadable kernel module support; still under development. -#options LKM options USERCONF # userconf(4) support options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sparc/conf/KRUPS b/sys/arch/sparc/conf/KRUPS index 5a72a8139e0..fb6d06599a6 100644 --- a/sys/arch/sparc/conf/KRUPS +++ b/sys/arch/sparc/conf/KRUPS @@ -1,4 +1,4 @@ -# $NetBSD: KRUPS,v 1.45 2007/12/31 15:32:06 ad Exp $ +# $NetBSD: KRUPS,v 1.46 2008/11/12 12:36:06 ad Exp $ # From: NetBSD: GENERIC,v 1.197 2006/12/04 23:43:35 elad Exp # # Krups (JavaStation-NC) machine description file @@ -8,7 +8,7 @@ include "arch/sparc/conf/std.sparc" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "KRUPS-$Revision: 1.45 $" +#ident "KRUPS-$Revision: 1.46 $" maxusers 32 @@ -64,7 +64,6 @@ options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support ## Loadable kernel module support; still under development. -#options LKM #options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sparc/conf/MRCOFFEE b/sys/arch/sparc/conf/MRCOFFEE index e8237af9dab..b9040204b47 100644 --- a/sys/arch/sparc/conf/MRCOFFEE +++ b/sys/arch/sparc/conf/MRCOFFEE @@ -1,4 +1,4 @@ -# $NetBSD: MRCOFFEE,v 1.23 2007/12/31 15:32:06 ad Exp $ +# $NetBSD: MRCOFFEE,v 1.24 2008/11/12 12:36:06 ad Exp $ # From: NetBSD: GENERIC,v 1.197 2006/12/04 23:43:35 elad Exp # # Mr.Coffee (JavaStation 1) machine description file @@ -12,7 +12,7 @@ include "arch/sparc/conf/std.sparc" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "MRCOFFEE-$Revision: 1.23 $" +#ident "MRCOFFEE-$Revision: 1.24 $" maxusers 32 @@ -69,7 +69,6 @@ options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support ## Loadable kernel module support; still under development. -options LKM options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sparc/conf/TADPOLE3GX b/sys/arch/sparc/conf/TADPOLE3GX index 381719b561d..fb9de7aad74 100644 --- a/sys/arch/sparc/conf/TADPOLE3GX +++ b/sys/arch/sparc/conf/TADPOLE3GX @@ -1,4 +1,4 @@ -# $NetBSD: TADPOLE3GX,v 1.42 2007/10/17 19:57:11 garbled Exp $ +# $NetBSD: TADPOLE3GX,v 1.43 2008/11/12 12:36:06 ad Exp $ include "arch/sparc/conf/std.sparc" @@ -67,7 +67,6 @@ options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default ## Loadable kernel module support; still under development. -options LKM options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sparc/conf/majors.sparc b/sys/arch/sparc/conf/majors.sparc index c76765ca6c4..ca8b1a0fab0 100644 --- a/sys/arch/sparc/conf/majors.sparc +++ b/sys/arch/sparc/conf/majors.sparc @@ -1,4 +1,4 @@ -# $NetBSD: majors.sparc,v 1.29 2007/12/31 15:32:06 ad Exp $ +# $NetBSD: majors.sparc,v 1.30 2008/11/12 12:36:06 ad Exp $ # # Device majors for sparc # @@ -97,7 +97,6 @@ device-major bpp char 107 bpp device-major tcx char 109 tcx device-major vnd char 110 block 8 vnd device-major tun char 111 tun -device-major lkm char 112 lkm device-major rnd char 119 rnd device-major scsibus char 120 scsibus diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c index 58ac606a5ae..3ecee12a813 100644 --- a/sys/arch/sparc/sparc/autoconf.c +++ b/sys/arch/sparc/sparc/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.229 2008/07/17 14:39:26 cegger Exp $ */ +/* $NetBSD: autoconf.c,v 1.230 2008/11/12 12:36:06 ad Exp $ */ /* * Copyright (c) 1996 @@ -48,7 +48,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.229 2008/07/17 14:39:26 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.230 2008/11/12 12:36:06 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -119,7 +119,7 @@ extern int kgdb_debug_panic; #endif extern void *bootinfo; -#if !NKSYMS && !defined(DDB) && !defined(LKM) +#if !NKSYMS && !defined(DDB) && !defined(MODULAR) void bootinfo_relocate(void *); #endif @@ -263,7 +263,7 @@ void bootstrap(void) { extern struct user *proc0paddr; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) struct btinfo_symtab *bi_sym; #else extern int end[]; @@ -288,7 +288,7 @@ bootstrap(void) } #endif /* SUN4M || SUN4D */ -#if !NKSYMS && !defined(DDB) && !defined(LKM) +#if !NKSYMS && !defined(DDB) && !defined(MODULAR) /* * We want to reuse the memory where the symbols were stored * by the loader. Relocate the bootinfo array which is loaded @@ -314,7 +314,7 @@ bootstrap(void) initmsgbuf((void *)KERNBASE, 8192); #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) if ((bi_sym = lookup_bootinfo(BTINFO_SYMTAB)) != NULL) { if (bi_sym->ssym < KERNBASE) { /* Assume low-loading boot loader */ @@ -1867,7 +1867,7 @@ lookup_bootinfo(int type) return (NULL); } -#if !NKSYMS && !defined(DDB) && !defined(LKM) +#if !NKSYMS && !defined(DDB) && !defined(MODULAR) /* * Move bootinfo from the current kernel top to the proposed * location. As a side-effect, `kernel_top' is adjusted to point @@ -1929,4 +1929,4 @@ bootinfo_relocate(void *newloc) bootinfo = newloc; kernel_top = (char *)newloc + ALIGN(bi_size); } -#endif /* !NKSYMS && !defined(DDB) && !defined(LKM) */ +#endif /* !NKSYMS && !defined(DDB) && !defined(MODULAR) */ diff --git a/sys/arch/sparc64/conf/GENERIC b/sys/arch/sparc64/conf/GENERIC index ab1b4b83a6f..2b0008b7a6c 100644 --- a/sys/arch/sparc64/conf/GENERIC +++ b/sys/arch/sparc64/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.104 2008/10/29 17:29:45 jkunz Exp $ +# $NetBSD: GENERIC,v 1.105 2008/11/12 12:36:06 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/sparc64/conf/std.sparc64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.104 $" +#ident "GENERIC-$Revision: 1.105 $" maxusers 64 @@ -65,7 +65,6 @@ options P1003_1B_SEMAPHORE # p1003.1b semaphore support ## Loadable kernel module support; still under development. -options LKM options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sparc64/conf/NONPLUS64 b/sys/arch/sparc64/conf/NONPLUS64 index eaea689daac..5f55f0ffac5 100644 --- a/sys/arch/sparc64/conf/NONPLUS64 +++ b/sys/arch/sparc64/conf/NONPLUS64 @@ -1,8 +1,8 @@ -# $NetBSD: NONPLUS64,v 1.25 2008/05/30 20:10:03 tsutsui Exp $ +# $NetBSD: NONPLUS64,v 1.26 2008/11/12 12:36:06 ad Exp $ include "arch/sparc64/conf/std.sparc64" -#ident "NONPLUS64-$Revision: 1.25 $" +#ident "NONPLUS64-$Revision: 1.26 $" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary @@ -48,7 +48,6 @@ options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default ## Loadable kernel module support; still under development. -options LKM options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sparc64/conf/majors.sparc64 b/sys/arch/sparc64/conf/majors.sparc64 index 419594934bd..fc83506ccb2 100644 --- a/sys/arch/sparc64/conf/majors.sparc64 +++ b/sys/arch/sparc64/conf/majors.sparc64 @@ -1,4 +1,4 @@ -# $NetBSD: majors.sparc64,v 1.28 2007/12/31 15:32:06 ad Exp $ +# $NetBSD: majors.sparc64,v 1.29 2008/11/12 12:36:06 ad Exp $ # # Device majors for sparc64 # @@ -94,7 +94,6 @@ device-major bpp char 107 bpp device-major tcx char 109 tcx device-major vnd char 110 block 8 vnd device-major tun char 111 tun -device-major lkm char 112 lkm device-major rnd char 119 rnd device-major scsibus char 120 scsibus diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c index 84017a5efe9..f089f380d7c 100644 --- a/sys/arch/sparc64/sparc64/autoconf.c +++ b/sys/arch/sparc64/sparc64/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.156 2008/10/21 06:07:14 macallan Exp $ */ +/* $NetBSD: autoconf.c,v 1.157 2008/11/12 12:36:06 ad Exp $ */ /* * Copyright (c) 1996 @@ -48,7 +48,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.156 2008/10/21 06:07:14 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.157 2008/11/12 12:36:06 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -251,7 +251,7 @@ bootstrap(void *o0, void *bootargs, void *bootsize, void *o3, void *ofw) void *bi; long bmagic; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) struct btinfo_symtab *bi_sym; #endif struct btinfo_count *bi_count; @@ -311,7 +311,7 @@ die_old_boot_loader: panic("Kernel end address is not found in bootinfo.\n"); } -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) LOOKUP_BOOTINFO(bi_sym, BTINFO_SYMTAB); ksyms_init(bi_sym->nsym, (int *)(u_long)bi_sym->ssym, (int *)(u_long)bi_sym->esym); diff --git a/sys/arch/sparc64/sparc64/netbsd32_machdep.c b/sys/arch/sparc64/sparc64/netbsd32_machdep.c index 8c434954db6..2487b1f9af4 100644 --- a/sys/arch/sparc64/sparc64/netbsd32_machdep.c +++ b/sys/arch/sparc64/sparc64/netbsd32_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.85 2008/10/15 06:51:19 wrstuden Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.86 2008/11/12 12:36:06 ad Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.85 2008/10/15 06:51:19 wrstuden Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.86 2008/11/12 12:36:06 ad Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -215,7 +215,7 @@ netbsd32_sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *mask) */ sf.sf_signo = sig; sf.sf_code = (u_int)ksi->ksi_trap; -#if defined(COMPAT_SUNOS) || defined(LKM) +#if defined(COMPAT_SUNOS) || defined(MODULAR) sf.sf_scp = (u_long)&fp->sf_sc; #endif sf.sf_addr = 0; /* XXX */ diff --git a/sys/arch/sparc64/sparc64/svr4_32_machdep.c b/sys/arch/sparc64/sparc64/svr4_32_machdep.c index fda59f88fad..0f6500b23b4 100644 --- a/sys/arch/sparc64/sparc64/svr4_32_machdep.c +++ b/sys/arch/sparc64/sparc64/svr4_32_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_32_machdep.c,v 1.34 2008/04/28 20:23:37 martin Exp $ */ +/* $NetBSD: svr4_32_machdep.c,v 1.35 2008/11/12 12:36:06 ad Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -30,9 +30,9 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: svr4_32_machdep.c,v 1.34 2008/04/28 20:23:37 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_32_machdep.c,v 1.35 2008/11/12 12:36:06 ad Exp $"); -#ifndef _LKM +#ifdef _KERNEL_OPT #include "opt_ddb.h" #endif diff --git a/sys/arch/sparc64/sparc64/svr4_machdep.c b/sys/arch/sparc64/sparc64/svr4_machdep.c index 1d1aa547eec..13b41a2505d 100644 --- a/sys/arch/sparc64/sparc64/svr4_machdep.c +++ b/sys/arch/sparc64/sparc64/svr4_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_machdep.c,v 1.50 2008/04/28 20:23:37 martin Exp $ */ +/* $NetBSD: svr4_machdep.c,v 1.51 2008/11/12 12:36:06 ad Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -30,9 +30,9 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: svr4_machdep.c,v 1.50 2008/04/28 20:23:37 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_machdep.c,v 1.51 2008/11/12 12:36:06 ad Exp $"); -#ifndef _LKM +#ifdef _KERNEL_OPT #include "opt_ddb.h" #endif diff --git a/sys/arch/sun2/conf/DISKLESS b/sys/arch/sun2/conf/DISKLESS index 5cdf943e6d0..d3ce6419635 100644 --- a/sys/arch/sun2/conf/DISKLESS +++ b/sys/arch/sun2/conf/DISKLESS @@ -1,4 +1,4 @@ -# $NetBSD: DISKLESS,v 1.38 2008/04/26 02:43:07 tsutsui Exp $ +# $NetBSD: DISKLESS,v 1.39 2008/11/12 12:36:06 ad Exp $ # DISKLESS Sun2 (2/120, 2/170, 2/50, ...) # Supports root on: ie0, ec0 @@ -7,7 +7,7 @@ include "arch/sun2/conf/std.sun2" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "DISKLESS-$Revision: 1.38 $" +#ident "DISKLESS-$Revision: 1.39 $" makeoptions COPTS="-Os" # optimize for size @@ -22,7 +22,6 @@ options KTRACE # system call tracing options SYSVMSG # System V message queues options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory -#options LKM # loadable kernel modules #options INSECURE # disable kernel security level options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sun2/conf/FOURMEG b/sys/arch/sun2/conf/FOURMEG index 44a46042083..c6185bf7a5c 100644 --- a/sys/arch/sun2/conf/FOURMEG +++ b/sys/arch/sun2/conf/FOURMEG @@ -1,4 +1,4 @@ -# $NetBSD: FOURMEG,v 1.42 2008/04/26 02:43:07 tsutsui Exp $ +# $NetBSD: FOURMEG,v 1.43 2008/11/12 12:36:07 ad Exp $ # FOURMEG Sun2 (2/120, 2/170, 2/50, ...) # Supports root on: ie0, sd*, ... @@ -7,7 +7,7 @@ include "arch/sun2/conf/std.sun2" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "FOURMEG-$Revision: 1.42 $" +#ident "FOURMEG-$Revision: 1.43 $" makeoptions COPTS="-Os" # optimize for size @@ -22,7 +22,6 @@ options KTRACE # system call tracing #options SYSVMSG # System V message queues #options SYSVSEM # System V semaphores #options SYSVSHM # System V shared memory -#options LKM # loadable kernel modules #options INSECURE # disable kernel security level options USERCONF # userconf(4) support options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sun2/conf/GENERIC b/sys/arch/sun2/conf/GENERIC index 3674516b571..e2b3fc8c34c 100644 --- a/sys/arch/sun2/conf/GENERIC +++ b/sys/arch/sun2/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.70 2008/08/10 15:31:22 tls Exp $ +# $NetBSD: GENERIC,v 1.71 2008/11/12 12:36:07 ad Exp $ # # GENERIC machine description file # @@ -25,7 +25,7 @@ include "arch/sun2/conf/std.sun2" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.70 $" +#ident "GENERIC-$Revision: 1.71 $" makeoptions COPTS="-Os" # optimize for size @@ -41,7 +41,6 @@ options SYSVMSG # System V message queues options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules #options INSECURE # disable kernel security level #options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sun2/conf/INSTALL b/sys/arch/sun2/conf/INSTALL index 04ed52fafde..c1e226d8d0c 100644 --- a/sys/arch/sun2/conf/INSTALL +++ b/sys/arch/sun2/conf/INSTALL @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.35 2008/04/26 03:08:59 tsutsui Exp $ +# $NetBSD: INSTALL,v 1.36 2008/11/12 12:36:07 ad Exp $ # INSTALL Sun2 (2/120, 2/170, 2/50, ...) @@ -6,7 +6,7 @@ include "arch/sun2/conf/std.sun2" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "INSTALL-$Revision: 1.35 $" +#ident "INSTALL-$Revision: 1.36 $" makeoptions COPTS="-Os" # optimize for size @@ -21,7 +21,6 @@ maxusers 2 #options SYSVMSG # System V message queues #options SYSVSEM # System V semaphores #options SYSVSHM # System V shared memory -#options LKM # loadable kernel modules #options INSECURE # disable kernel security level options PIPE_SOCKETPAIR # smaller, but slower pipe(2) #options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel diff --git a/sys/arch/sun2/conf/RAMDISK b/sys/arch/sun2/conf/RAMDISK index 9b4c3c28449..97486648606 100644 --- a/sys/arch/sun2/conf/RAMDISK +++ b/sys/arch/sun2/conf/RAMDISK @@ -1,4 +1,4 @@ -# $NetBSD: RAMDISK,v 1.41 2008/06/02 09:04:50 he Exp $ +# $NetBSD: RAMDISK,v 1.42 2008/11/12 12:36:07 ad Exp $ # RAMDISK: Root/swap on ramdisk # This kernel is used to: @@ -26,7 +26,6 @@ maxusers 2 #options SYSVMSG # System V message queues #options SYSVSEM # System V semaphores #options SYSVSHM # System V shared memory -#options LKM # loadable kernel modules #options INSECURE # disable kernel security level options USERCONF # userconf(4) support options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sun2/conf/VME b/sys/arch/sun2/conf/VME index 69882375a27..140a06fa751 100644 --- a/sys/arch/sun2/conf/VME +++ b/sys/arch/sun2/conf/VME @@ -1,4 +1,4 @@ -# $NetBSD: VME,v 1.32 2008/01/11 11:45:24 tsutsui Exp $ +# $NetBSD: VME,v 1.33 2008/11/12 12:36:07 ad Exp $ # VME Sun2 (2/50, 2/130, 2/160...) # Supports root on: ie0, sd*, ... @@ -7,7 +7,7 @@ include "arch/sun2/conf/std.sun2" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "VME-$Revision: 1.32 $" +#ident "VME-$Revision: 1.33 $" # Machines to be supported by this kernel #options FPU_EMULATE @@ -25,7 +25,6 @@ options SYSVSEM # System V semaphores #options SEMMNU=30 # number of undo structures in system options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default -options LKM # loadable kernel modules #options INSECURE # disable kernel security level options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sun2/conf/majors.sun2 b/sys/arch/sun2/conf/majors.sun2 index 8bb51d5e1cf..15d898a8036 100644 --- a/sys/arch/sun2/conf/majors.sun2 +++ b/sys/arch/sun2/conf/majors.sun2 @@ -1,4 +1,4 @@ -# $NetBSD: majors.sun2,v 1.18 2007/12/31 15:32:07 ad Exp $ +# $NetBSD: majors.sun2,v 1.19 2008/11/12 12:36:07 ad Exp $ # # Device majors for sun2 # @@ -44,7 +44,6 @@ device-major ch char 59 ch device-major ss char 60 ss device-major uk char 61 uk -device-major lkm char 72 lkm device-major rnd char 80 rnd device-major scsibus char 81 scsibus diff --git a/sys/arch/sun2/sun2/locore2.c b/sys/arch/sun2/sun2/locore2.c index 9b65086505a..831c4df5ade 100644 --- a/sys/arch/sun2/sun2/locore2.c +++ b/sys/arch/sun2/sun2/locore2.c @@ -1,4 +1,4 @@ -/* $NetBSD: locore2.c,v 1.18 2008/04/28 20:23:37 martin Exp $ */ +/* $NetBSD: locore2.c,v 1.19 2008/11/12 12:36:08 ad Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: locore2.c,v 1.18 2008/04/28 20:23:37 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locore2.c,v 1.19 2008/11/12 12:36:08 ad Exp $"); #include "opt_ddb.h" @@ -104,7 +104,7 @@ void _bootstrap(void); static void _verify_hardware(void); static void _vm_init(void); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) static void _save_symtab(void); /* @@ -172,7 +172,7 @@ _vm_init(void) * if DDB is not part of this kernel, ignore the symbols. */ esym = end + 4; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* This will advance esym past the symbols. */ _save_symtab(); #endif diff --git a/sys/arch/sun2/sun2/machdep.c b/sys/arch/sun2/sun2/machdep.c index dc7e9416d3c..3dbf68a9b04 100644 --- a/sys/arch/sun2/sun2/machdep.c +++ b/sys/arch/sun2/sun2/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.54 2008/11/11 06:46:44 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.55 2008/11/12 12:36:08 ad Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -153,7 +153,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.54 2008/11/11 06:46:44 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.55 2008/11/12 12:36:08 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -296,7 +296,7 @@ cpu_startup(void) msgbufaddr = (void *)((char *)v + MSGBUFOFF); initmsgbuf(msgbufaddr, MSGBUFSIZE); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) { extern int nsym; extern char *ssym, *esym; diff --git a/sys/arch/sun3/conf/DISKLESS b/sys/arch/sun3/conf/DISKLESS index fe9849d75e9..e9cb3cd4bf2 100644 --- a/sys/arch/sun3/conf/DISKLESS +++ b/sys/arch/sun3/conf/DISKLESS @@ -1,4 +1,4 @@ -# $NetBSD: DISKLESS,v 1.58 2008/04/05 22:08:41 tsutsui Exp $ +# $NetBSD: DISKLESS,v 1.59 2008/11/12 12:36:08 ad Exp $ # DISKLESS - Root and swap on NFS # Desktop machines only (3/50, 3/60, 3/110) @@ -24,7 +24,6 @@ maxusers 2 #options SYSVSEM # System V semaphores #options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules #options INSECURE # disable kernel security level options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sun3/conf/DISKLESS3X b/sys/arch/sun3/conf/DISKLESS3X index 1bdb017cb99..aec3bc848fa 100644 --- a/sys/arch/sun3/conf/DISKLESS3X +++ b/sys/arch/sun3/conf/DISKLESS3X @@ -1,4 +1,4 @@ -# $NetBSD: DISKLESS3X,v 1.45 2008/04/05 22:08:41 tsutsui Exp $ +# $NetBSD: DISKLESS3X,v 1.46 2008/11/12 12:36:08 ad Exp $ # DISKLESS - Root and swap on NFS # Desktop machines only (3/80) @@ -24,7 +24,6 @@ maxusers 2 #options SYSVSEM # System V semaphores #options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules #options INSECURE # disable kernel security level options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sun3/conf/GENERIC b/sys/arch/sun3/conf/GENERIC index 79e32014b1a..86faea2bcc9 100644 --- a/sys/arch/sun3/conf/GENERIC +++ b/sys/arch/sun3/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.145 2008/08/10 15:31:22 tls Exp $ +# $NetBSD: GENERIC,v 1.146 2008/11/12 12:36:08 ad Exp $ # # GENERIC machine description file # @@ -25,7 +25,7 @@ include "arch/sun3/conf/std.sun3" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.145 $" +#ident "GENERIC-$Revision: 1.146 $" makeoptions COPTS="-Os" # bootloader has size limit (~2MB) @@ -42,7 +42,6 @@ options SYSVMSG # System V message queues options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules #options INSECURE # disable kernel security level #options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sun3/conf/GENERIC3X b/sys/arch/sun3/conf/GENERIC3X index d681dcc4873..2fb6003bd14 100644 --- a/sys/arch/sun3/conf/GENERIC3X +++ b/sys/arch/sun3/conf/GENERIC3X @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC3X,v 1.102 2008/08/15 15:02:25 tsutsui Exp $ +# $NetBSD: GENERIC3X,v 1.103 2008/11/12 12:36:08 ad Exp $ # GENERIC Sun3X (3/80, 3/470) # Supports root on: ie0, le0, sd*, ... @@ -7,7 +7,7 @@ include "arch/sun3/conf/std.sun3x" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC3X-$Revision: 1.102 $" +#ident "GENERIC3X-$Revision: 1.103 $" makeoptions COPTS="-Os" # bootloader has size limit (~2MB) @@ -24,7 +24,6 @@ options SYSVMSG # System V message queues options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options LKM # loadable kernel modules #options INSECURE # disable kernel security level #options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sun3/conf/INSTALL b/sys/arch/sun3/conf/INSTALL index 832393fb234..c1f8059677d 100644 --- a/sys/arch/sun3/conf/INSTALL +++ b/sys/arch/sun3/conf/INSTALL @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.42 2008/07/31 07:41:07 simonb Exp $ +# $NetBSD: INSTALL,v 1.43 2008/11/12 12:36:08 ad Exp $ # # INSTALL - Installation kernel for the Sun3 # @@ -26,7 +26,6 @@ maxusers 2 #options SYSVSEM # System V semaphores #options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules #options INSECURE # disable kernel security level options USERCONF # userconf(4) support options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sun3/conf/INSTALL3X b/sys/arch/sun3/conf/INSTALL3X index 1004703c3f7..ab7530dd39c 100644 --- a/sys/arch/sun3/conf/INSTALL3X +++ b/sys/arch/sun3/conf/INSTALL3X @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL3X,v 1.41 2008/07/31 07:41:07 simonb Exp $ +# $NetBSD: INSTALL3X,v 1.42 2008/11/12 12:36:08 ad Exp $ # # INSTALL3X - Installation kernel for the Sun3X # @@ -26,7 +26,6 @@ maxusers 2 #options SYSVSEM # System V semaphores #options SYSVSHM # System V shared memory #options SHMMAXPGS=1024 # 1024 pages is the default -#options LKM # loadable kernel modules #options INSECURE # disable kernel security level options USERCONF # userconf(4) support options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/sun3/conf/majors.sun3 b/sys/arch/sun3/conf/majors.sun3 index a2d6e734606..29158d0b1e9 100644 --- a/sys/arch/sun3/conf/majors.sun3 +++ b/sys/arch/sun3/conf/majors.sun3 @@ -1,4 +1,4 @@ -# $NetBSD: majors.sun3,v 1.18 2007/12/31 15:32:07 ad Exp $ +# $NetBSD: majors.sun3,v 1.19 2008/11/12 12:36:08 ad Exp $ # # Device majors for sun3/sun3x # @@ -52,7 +52,6 @@ device-major ch char 59 ch device-major ss char 60 ss device-major uk char 61 uk -device-major lkm char 72 lkm device-major rnd char 80 rnd device-major scsibus char 81 scsibus diff --git a/sys/arch/sun3/sun3/locore2.c b/sys/arch/sun3/sun3/locore2.c index d398f5410c4..4ea78b320fe 100644 --- a/sys/arch/sun3/sun3/locore2.c +++ b/sys/arch/sun3/sun3/locore2.c @@ -1,4 +1,4 @@ -/* $NetBSD: locore2.c,v 1.91 2008/04/28 20:23:38 martin Exp $ */ +/* $NetBSD: locore2.c,v 1.92 2008/11/12 12:36:08 ad Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: locore2.c,v 1.91 2008/04/28 20:23:38 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locore2.c,v 1.92 2008/11/12 12:36:08 ad Exp $"); #include "opt_ddb.h" @@ -106,7 +106,7 @@ void _bootstrap(void); static void _verify_hardware(void); static void _vm_init(void); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) static void _save_symtab(void); /* @@ -187,7 +187,7 @@ _vm_init(void) * if DDB is not part of this kernel, ignore the symbols. */ esym = end + 4; -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) /* This will advance esym past the symbols. */ _save_symtab(); #endif diff --git a/sys/arch/sun3/sun3/machdep.c b/sys/arch/sun3/sun3/machdep.c index 23605ecfd3a..e87ea0985eb 100644 --- a/sys/arch/sun3/sun3/machdep.c +++ b/sys/arch/sun3/sun3/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.186 2008/11/11 06:46:44 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.187 2008/11/12 12:36:08 ad Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -78,7 +78,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.186 2008/11/11 06:46:44 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.187 2008/11/12 12:36:08 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -179,7 +179,7 @@ consinit(void) */ cninit(); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) { extern int nsym; extern char *ssym, *esym; diff --git a/sys/arch/sun3/sun3x/machdep.c b/sys/arch/sun3/sun3x/machdep.c index 38b4c2c32af..658895fc3c3 100644 --- a/sys/arch/sun3/sun3x/machdep.c +++ b/sys/arch/sun3/sun3x/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.112 2008/11/11 06:46:44 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.113 2008/11/12 12:36:08 ad Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -75,7 +75,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.112 2008/11/11 06:46:44 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.113 2008/11/12 12:36:08 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -180,7 +180,7 @@ consinit(void) */ cninit(); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) { extern int nsym; extern char *ssym, *esym; diff --git a/sys/arch/vax/conf/GENERIC b/sys/arch/vax/conf/GENERIC index 8465a8634be..61cf6217a59 100644 --- a/sys/arch/vax/conf/GENERIC +++ b/sys/arch/vax/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.167 2008/08/12 17:54:47 hans Exp $ +# $NetBSD: GENERIC,v 1.168 2008/11/12 12:36:09 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/vax/conf/std.vax" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.167 $" +#ident "GENERIC-$Revision: 1.168 $" # Here are all different supported CPU types listed. #options VAX8800 # VAX 8500, 8530, 8550, 8700, 8800 @@ -157,7 +157,6 @@ options COMPAT_IBCS2 # DEC SVR.3 compatilibity #options NO_INSN_EMULATE # CPU does not lack some hardware instructions. options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. -options LKM options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/vax/conf/INSTALL b/sys/arch/vax/conf/INSTALL index aff2d1f8c92..d780db5dc88 100644 --- a/sys/arch/vax/conf/INSTALL +++ b/sys/arch/vax/conf/INSTALL @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.50 2008/07/31 07:41:07 simonb Exp $ +# $NetBSD: INSTALL,v 1.51 2008/11/12 12:36:09 ad Exp $ # # INSTALL kernel; all supported devices but nothing fancy. # @@ -101,7 +101,6 @@ options COMPAT_40 # NetBSD 4.0 compatibility. #options COMPAT_ULTRIX options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. -#options LKM options USERCONF # userconf(4) support options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/vax/conf/majors.vax b/sys/arch/vax/conf/majors.vax index ab5aa699776..801bee31f47 100644 --- a/sys/arch/vax/conf/majors.vax +++ b/sys/arch/vax/conf/majors.vax @@ -1,4 +1,4 @@ -# $NetBSD: majors.vax,v 1.21 2007/12/31 15:32:08 ad Exp $ +# $NetBSD: majors.vax,v 1.22 2008/11/12 12:36:09 ad Exp $ # # Device majors for vax # @@ -36,7 +36,6 @@ device-major gen char 25 vax8600 | vax8200 | vaxany device-major lpa char 26 lpa device-major ps char 27 ps -device-major lkm char 28 lkm device-major ad char 29 ad device-major rx char 30 block 12 rx device-major ik char 31 ik diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c index c67a0f1ac14..799682bcedd 100644 --- a/sys/arch/vax/vax/machdep.c +++ b/sys/arch/vax/vax/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.168 2008/11/11 06:46:44 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.169 2008/11/12 12:36:09 ad Exp $ */ /* * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. @@ -83,7 +83,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.168 2008/11/11 06:46:44 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.169 2008/11/12 12:36:09 ad Exp $"); #include "opt_ddb.h" #include "opt_compat_netbsd.h" @@ -320,7 +320,7 @@ consinit(void) iospace_inited = 1; #endif cninit(); -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) if (symtab_start != NULL && symtab_nsyms != 0 && symtab_end != NULL) { ksyms_init(symtab_nsyms, symtab_start, symtab_end); } diff --git a/sys/arch/vax/vax/pmap.c b/sys/arch/vax/vax/pmap.c index f882aa8bc0b..d3b7d0bf4fd 100644 --- a/sys/arch/vax/vax/pmap.c +++ b/sys/arch/vax/vax/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.160 2008/04/24 15:35:27 ad Exp $ */ +/* $NetBSD: pmap.c,v 1.161 2008/11/12 12:36:09 ad Exp $ */ /* * Copyright (c) 1994, 1998, 1999, 2003 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.160 2008/04/24 15:35:27 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.161 2008/11/12 12:36:09 ad Exp $"); #include "opt_ddb.h" #include "opt_cputype.h" @@ -237,8 +237,8 @@ calc_kvmsize(vsize_t usrptsize) #if VAX46 || VAX49 kvmsize += 0x800000; /* 8 MB framebuffer */ #endif -#ifdef LKM - /* LKMs are allocated out of kernel_map */ +#ifdef MODULAR + /* Modules are allocated out of kernel_map */ #define MAXLKMSIZ 0x100000 /* XXX */ kvmsize += MAXLKMSIZ; #endif diff --git a/sys/arch/x68k/conf/GENERIC b/sys/arch/x68k/conf/GENERIC index 75f543e010b..9819c5cb1f0 100644 --- a/sys/arch/x68k/conf/GENERIC +++ b/sys/arch/x68k/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.141 2008/08/10 15:31:22 tls Exp $ +# $NetBSD: GENERIC,v 1.142 2008/11/12 12:36:09 ad Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/x68k/conf/std.x68k" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.141 $" +#ident "GENERIC-$Revision: 1.142 $" maxusers 8 @@ -79,7 +79,6 @@ options SYSVSHM # System V shared memory options P1003_1B_SEMAPHORE # p1003.1b semaphore support ## Loadable kernel module support -#options LKM options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/x68k/conf/INSTALL b/sys/arch/x68k/conf/INSTALL index 2ce788d48b5..4098c5e29fb 100644 --- a/sys/arch/x68k/conf/INSTALL +++ b/sys/arch/x68k/conf/INSTALL @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.80 2008/07/31 07:41:08 simonb Exp $ +# $NetBSD: INSTALL,v 1.81 2008/11/12 12:36:09 ad Exp $ # # INSTALL -- installation kernel. @@ -8,7 +8,7 @@ include "arch/x68k/conf/std.x68k" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "INSTALL-$Revision: 1.80 $" +#ident "INSTALL-$Revision: 1.81 $" makeoptions COPTS="-Os" # Optimise for space. Implies -O2 @@ -73,7 +73,6 @@ options RTC_OFFSET=-540 # hardware clock is this many mins. west of GMT #options SHMMAXPGS=1024 # 1024 pages is the default ## Loadable kernel module support -#options LKM options USERCONF # userconf(4) support options PIPE_SOCKETPAIR # smaller, but slower pipe(2) diff --git a/sys/arch/x68k/conf/majors.x68k b/sys/arch/x68k/conf/majors.x68k index cc5af2194e9..bb884e97b8d 100644 --- a/sys/arch/x68k/conf/majors.x68k +++ b/sys/arch/x68k/conf/majors.x68k @@ -1,4 +1,4 @@ -# $NetBSD: majors.x68k,v 1.19 2007/12/31 15:32:08 ad Exp $ +# $NetBSD: majors.x68k,v 1.20 2008/11/12 12:36:09 ad Exp $ # # Device majors for x68k # @@ -27,7 +27,6 @@ device-major st char 20 block 5 st device-major filedesc char 21 device-major bpf char 22 bpfilter device-major sram char 23 sram -device-major lkm char 24 lkm device-major tun char 31 tun device-major pow char 32 pow diff --git a/sys/arch/x68k/x68k/machdep.c b/sys/arch/x68k/x68k/machdep.c index a1255225dc7..41952db75f7 100644 --- a/sys/arch/x68k/x68k/machdep.c +++ b/sys/arch/x68k/x68k/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.151 2008/11/11 06:46:44 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.152 2008/11/12 12:36:09 ad Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.151 2008/11/11 06:46:44 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.152 2008/11/12 12:36:09 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -115,7 +115,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.151 2008/11/11 06:46:44 dyoung Exp $") #include "ksyms.h" -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) #include <sys/exec_elf.h> #endif @@ -227,7 +227,7 @@ consinit(void) #ifdef KGDB zs_kgdb_init(); /* XXX */ #endif -#if NKSYMS || defined(DDB) || defined(LKM) +#if NKSYMS || defined(DDB) || defined(MODULAR) ksyms_init((int)esym - (int)&end - sizeof(Elf32_Ehdr), (void *)&end, esym); #endif diff --git a/sys/arch/x86/x86/powernow_k8.c b/sys/arch/x86/x86/powernow_k8.c index bd1a7a5902a..946a3f8c96c 100644 --- a/sys/arch/x86/x86/powernow_k8.c +++ b/sys/arch/x86/x86/powernow_k8.c @@ -1,4 +1,4 @@ -/* $NetBSD: powernow_k8.c,v 1.23 2008/05/11 23:05:45 cegger Exp $ */ +/* $NetBSD: powernow_k8.c,v 1.24 2008/11/12 12:36:09 ad Exp $ */ /* $OpenBSD: powernow-k8.c,v 1.8 2006/06/16 05:58:50 gwk Exp $ */ /*- @@ -59,7 +59,7 @@ /* AMD POWERNOW K8 driver */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: powernow_k8.c,v 1.23 2008/05/11 23:05:45 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: powernow_k8.c,v 1.24 2008/11/12 12:36:09 ad Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -84,7 +84,7 @@ __KERNEL_RCSID(0, "$NetBSD: powernow_k8.c,v 1.23 2008/05/11 23:05:45 cegger Exp mcb.msr_type = MSR_AMDK7_FIDVID_CTL; \ msr_cpu_broadcast(&mcb); -#ifdef _LKM +#ifdef _MODULE static struct sysctllog *sysctllog; #define SYSCTLLOG &sysctllog #else @@ -485,7 +485,7 @@ k8_powernow_init_main(void) void k8_powernow_destroy(void) { -#ifdef _LKM +#ifdef _MODULE sysctl_teardown(SYSCTLLOG); if (k8pnow_current_state) diff --git a/sys/arch/x86/x86/x86_machdep.c b/sys/arch/x86/x86/x86_machdep.c index 856dfe75997..e2032a1b9d9 100644 --- a/sys/arch/x86/x86/x86_machdep.c +++ b/sys/arch/x86/x86/x86_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: x86_machdep.c,v 1.23 2008/05/09 21:25:43 joerg Exp $ */ +/* $NetBSD: x86_machdep.c,v 1.24 2008/11/12 12:36:09 ad Exp $ */ /*- * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi, @@ -30,10 +30,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "opt_modular.h" - #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.23 2008/05/09 21:25:43 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.24 2008/11/12 12:36:09 ad Exp $"); #include <sys/types.h> #include <sys/param.h> diff --git a/sys/arch/zaurus/conf/GENERIC b/sys/arch/zaurus/conf/GENERIC index 51d94d6bfbd..31f6e4fac22 100644 --- a/sys/arch/zaurus/conf/GENERIC +++ b/sys/arch/zaurus/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.13 2008/08/10 15:31:22 tls Exp $ +# $NetBSD: GENERIC,v 1.14 2008/11/12 12:36:09 ad Exp $ # # GENERIC machine description file # @@ -109,7 +109,6 @@ options P1003_1B_SEMAPHORE # p1003.1b semaphore support # Miscellaneous kernel options #options KTRACE # system call tracing via ktrace(1) -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors #options MIIVERBOSE # Verbose MII autoconfuration messages diff --git a/sys/arch/zaurus/conf/GENERIC.HOSTUSB b/sys/arch/zaurus/conf/GENERIC.HOSTUSB index 91e6f897e36..4dcd25f8538 100644 --- a/sys/arch/zaurus/conf/GENERIC.HOSTUSB +++ b/sys/arch/zaurus/conf/GENERIC.HOSTUSB @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC.HOSTUSB,v 1.2 2008/07/31 07:41:08 simonb Exp $ +# $NetBSD: GENERIC.HOSTUSB,v 1.3 2008/11/12 12:36:09 ad Exp $ # # GENERIC machine description file # @@ -109,7 +109,6 @@ options P1003_1B_SEMAPHORE # p1003.1b semaphore support # Miscellaneous kernel options #options KTRACE # system call tracing via ktrace(1) -#options LKM # loadable kernel modules #options KMEMSTATS # kernel memory statistics #options SCSIVERBOSE # Verbose SCSI errors #options MIIVERBOSE # Verbose MII autoconfuration messages diff --git a/sys/arch/zaurus/conf/majors.zaurus b/sys/arch/zaurus/conf/majors.zaurus index bc852272450..3d3579ac4c4 100644 --- a/sys/arch/zaurus/conf/majors.zaurus +++ b/sys/arch/zaurus/conf/majors.zaurus @@ -1,4 +1,4 @@ -# $NetBSD: majors.zaurus,v 1.2 2007/12/31 15:32:09 ad Exp $ +# $NetBSD: majors.zaurus,v 1.3 2008/11/12 12:36:09 ad Exp $ # # Device majors for zaurus # @@ -37,7 +37,6 @@ device-major ses char 30 ses device-major bpf char 32 bpfilter device-major tun char 33 tun device-major filedesc char 34 -device-major lkm char 35 lkm device-major audio char 36 audio device-major vidcconsole char 37 vidcconsole diff --git a/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c b/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c index d2f8e782e40..a66041a8116 100644 --- a/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c +++ b/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c @@ -1,4 +1,4 @@ -/* $NetBSD: zbsdmod.c,v 1.2 2008/04/11 16:43:49 nonaka Exp $ */ +/* $NetBSD: zbsdmod.c,v 1.3 2008/11/12 12:36:09 ad Exp $ */ /* $OpenBSD: zbsdmod.c,v 1.7 2005/05/02 02:45:29 uwe Exp $ */ /* @@ -264,7 +264,7 @@ elf32bsdboot(void) } /* - * Initialize the LKM. + * Initialize the module. */ int init_module(void) diff --git a/sys/compat/aoutm68k/aoutm68k_syscall.h b/sys/compat/aoutm68k/aoutm68k_syscall.h index 049ee89c910..845615cdd27 100644 --- a/sys/compat/aoutm68k/aoutm68k_syscall.h +++ b/sys/compat/aoutm68k/aoutm68k_syscall.h @@ -1,4 +1,4 @@ -/* $NetBSD: aoutm68k_syscall.h,v 1.33 2008/06/21 19:59:09 he Exp $ */ +/* $NetBSD: aoutm68k_syscall.h,v 1.34 2008/11/12 12:36:09 ad Exp $ */ /* * System call numbers. @@ -746,19 +746,6 @@ /* syscall: "poll" ret: "int" args: "struct pollfd *" "u_int" "int" */ #define AOUTM68K_SYS_poll 209 -#if defined(LKM) || !defined(_KERNEL) -#else /* !LKM */ - /* 210 is excluded lkmnosys */ - /* 211 is excluded lkmnosys */ - /* 212 is excluded lkmnosys */ - /* 213 is excluded lkmnosys */ - /* 214 is excluded lkmnosys */ - /* 215 is excluded lkmnosys */ - /* 216 is excluded lkmnosys */ - /* 217 is excluded lkmnosys */ - /* 218 is excluded lkmnosys */ - /* 219 is excluded lkmnosys */ -#endif /* !LKM */ #if defined(SYSVSEM) || !defined(_KERNEL) #if defined(COMPAT_14) || !defined(_KERNEL) /* syscall: "__semctl" ret: "int" args: "int" "int" "int" "union __semun *" */ diff --git a/sys/compat/aoutm68k/aoutm68k_syscallargs.h b/sys/compat/aoutm68k/aoutm68k_syscallargs.h index 06cd988c3fd..9af700fa936 100644 --- a/sys/compat/aoutm68k/aoutm68k_syscallargs.h +++ b/sys/compat/aoutm68k/aoutm68k_syscallargs.h @@ -1,4 +1,4 @@ -/* $NetBSD: aoutm68k_syscallargs.h,v 1.31 2008/06/21 19:59:09 he Exp $ */ +/* $NetBSD: aoutm68k_syscallargs.h,v 1.32 2008/11/12 12:36:09 ad Exp $ */ /* * System call argument lists. @@ -498,9 +498,6 @@ struct sys_getpgid_args; struct sys_reboot_args; struct sys_poll_args; -#if defined(LKM) || !defined(_KERNEL) -#else /* !LKM */ -#endif /* !LKM */ #if defined(SYSVSEM) || !defined(_KERNEL) #if defined(COMPAT_14) || !defined(_KERNEL) @@ -1150,11 +1147,6 @@ int sys_reboot(struct lwp *, const struct sys_reboot_args *, register_t *); int sys_poll(struct lwp *, const struct sys_poll_args *, register_t *); -#if defined(LKM) || !defined(_KERNEL) -int sys_lkmnosys(struct lwp *, const void *, register_t *); - -#else /* !LKM */ -#endif /* !LKM */ #if defined(SYSVSEM) || !defined(_KERNEL) #if defined(COMPAT_14) || !defined(_KERNEL) int compat_14_sys___semctl(struct lwp *, const struct compat_14_sys___semctl_args *, register_t *); diff --git a/sys/compat/aoutm68k/aoutm68k_syscalls.c b/sys/compat/aoutm68k/aoutm68k_syscalls.c index 06b2851d249..fc97f4ab131 100644 --- a/sys/compat/aoutm68k/aoutm68k_syscalls.c +++ b/sys/compat/aoutm68k/aoutm68k_syscalls.c @@ -1,4 +1,4 @@ -/* $NetBSD: aoutm68k_syscalls.c,v 1.30 2008/06/21 19:59:09 he Exp $ */ +/* $NetBSD: aoutm68k_syscalls.c,v 1.31 2008/11/12 12:36:09 ad Exp $ */ /* * System call names. @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aoutm68k_syscalls.c,v 1.30 2008/06/21 19:59:09 he Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aoutm68k_syscalls.c,v 1.31 2008/11/12 12:36:09 ad Exp $"); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) @@ -417,29 +417,16 @@ const char *const aoutm68k_syscallnames[] = { /* 207 */ "getpgid", /* 208 */ "reboot", /* 209 */ "poll", -#if defined(LKM) || !defined(_KERNEL) - /* 210 */ "lkmnosys", - /* 211 */ "lkmnosys", - /* 212 */ "lkmnosys", - /* 213 */ "lkmnosys", - /* 214 */ "lkmnosys", - /* 215 */ "lkmnosys", - /* 216 */ "lkmnosys", - /* 217 */ "lkmnosys", - /* 218 */ "lkmnosys", - /* 219 */ "lkmnosys", -#else /* !LKM */ - /* 210 */ "#210 (excluded lkmnosys)", - /* 211 */ "#211 (excluded lkmnosys)", - /* 212 */ "#212 (excluded lkmnosys)", - /* 213 */ "#213 (excluded lkmnosys)", - /* 214 */ "#214 (excluded lkmnosys)", - /* 215 */ "#215 (excluded lkmnosys)", - /* 216 */ "#216 (excluded lkmnosys)", - /* 217 */ "#217 (excluded lkmnosys)", - /* 218 */ "#218 (excluded lkmnosys)", - /* 219 */ "#219 (excluded lkmnosys)", -#endif /* !LKM */ + /* 210 */ "#210 (unimplemented)", + /* 211 */ "#211 (unimplemented)", + /* 212 */ "#212 (unimplemented)", + /* 213 */ "#213 (unimplemented)", + /* 214 */ "#214 (unimplemented)", + /* 215 */ "#215 (unimplemented)", + /* 216 */ "#216 (unimplemented)", + /* 217 */ "#217 (unimplemented)", + /* 218 */ "#218 (unimplemented)", + /* 219 */ "#219 (unimplemented)", #if defined(SYSVSEM) || !defined(_KERNEL) #if defined(COMPAT_14) || !defined(_KERNEL) /* 220 */ "__semctl", diff --git a/sys/compat/aoutm68k/aoutm68k_sysent.c b/sys/compat/aoutm68k/aoutm68k_sysent.c index 1f12fcdd747..79384b9d4b0 100644 --- a/sys/compat/aoutm68k/aoutm68k_sysent.c +++ b/sys/compat/aoutm68k/aoutm68k_sysent.c @@ -1,4 +1,4 @@ -/* $NetBSD: aoutm68k_sysent.c,v 1.35 2008/06/21 19:59:09 he Exp $ */ +/* $NetBSD: aoutm68k_sysent.c,v 1.36 2008/11/12 12:36:09 ad Exp $ */ /* * System call switch table. @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aoutm68k_sysent.c,v 1.35 2008/06/21 19:59:09 he Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aoutm68k_sysent.c,v 1.36 2008/11/12 12:36:09 ad Exp $"); #if defined(_KERNEL_OPT) #include "opt_ktrace.h" @@ -691,49 +691,26 @@ struct sysent aoutm68k_sysent[] = { (sy_call_t *)sys_reboot }, /* 208 = reboot */ { ns(struct sys_poll_args), 0, (sy_call_t *)sys_poll }, /* 209 = poll */ -#if defined(LKM) || !defined(_KERNEL) { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 210 = lkmnosys */ + sys_nosys }, /* 210 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 211 = lkmnosys */ + sys_nosys }, /* 211 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 212 = lkmnosys */ + sys_nosys }, /* 212 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 213 = lkmnosys */ + sys_nosys }, /* 213 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 214 = lkmnosys */ + sys_nosys }, /* 214 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 215 = lkmnosys */ + sys_nosys }, /* 215 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 216 = lkmnosys */ + sys_nosys }, /* 216 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 217 = lkmnosys */ + sys_nosys }, /* 217 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 218 = lkmnosys */ + sys_nosys }, /* 218 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 219 = lkmnosys */ -#else /* !LKM */ - { 0, 0, 0, - sys_nosys }, /* 210 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 211 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 212 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 213 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 214 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 215 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 216 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 217 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 218 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 219 = excluded lkmnosys */ -#endif /* !LKM */ + sys_nosys }, /* 219 = unimplemented */ #if defined(SYSVSEM) || !defined(_KERNEL) #if defined(COMPAT_14) || !defined(_KERNEL) { ns(struct compat_14_sys___semctl_args), 0, diff --git a/sys/compat/aoutm68k/syscalls.master b/sys/compat/aoutm68k/syscalls.master index 6b45c6127a6..a166c20e79e 100644 --- a/sys/compat/aoutm68k/syscalls.master +++ b/sys/compat/aoutm68k/syscalls.master @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.28 2008/06/21 19:58:27 he Exp $ + $NetBSD: syscalls.master,v 1.29 2008/11/12 12:36:09 ad Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -565,32 +565,16 @@ 208 NOARGS { int sys_reboot(int opt, char *bootstr); } 209 NOARGS { int sys_poll(struct pollfd *fds, u_int nfds, \ int timeout); } -; -; Syscalls 210-219 are reserved for dynamically loaded syscalls -; -#if defined(LKM) || !defined(_KERNEL) -210 NODEF { int sys_lkmnosys(void); } -211 NODEF { int sys_lkmnosys(void); } -212 NODEF { int sys_lkmnosys(void); } -213 NODEF { int sys_lkmnosys(void); } -214 NODEF { int sys_lkmnosys(void); } -215 NODEF { int sys_lkmnosys(void); } -216 NODEF { int sys_lkmnosys(void); } -217 NODEF { int sys_lkmnosys(void); } -218 NODEF { int sys_lkmnosys(void); } -219 NODEF { int sys_lkmnosys(void); } -#else /* !LKM */ -210 EXCL lkmnosys -211 EXCL lkmnosys -212 EXCL lkmnosys -213 EXCL lkmnosys -214 EXCL lkmnosys -215 EXCL lkmnosys -216 EXCL lkmnosys -217 EXCL lkmnosys -218 EXCL lkmnosys -219 EXCL lkmnosys -#endif /* !LKM */ +210 UNIMPL +211 UNIMPL +212 UNIMPL +213 UNIMPL +214 UNIMPL +215 UNIMPL +216 UNIMPL +217 UNIMPL +218 UNIMPL +219 UNIMPL ; System calls 220-300 are reserved for use by NetBSD #if defined(SYSVSEM) || !defined(_KERNEL) #if defined(COMPAT_14) || !defined(_KERNEL) diff --git a/sys/compat/darwin/darwin_ptrace.c b/sys/compat/darwin/darwin_ptrace.c index a631574b877..f2572dcbdd2 100644 --- a/sys/compat/darwin/darwin_ptrace.c +++ b/sys/compat/darwin/darwin_ptrace.c @@ -1,4 +1,4 @@ -/* $NetBSD: darwin_ptrace.c,v 1.17 2008/04/28 20:23:41 martin Exp $ */ +/* $NetBSD: darwin_ptrace.c,v 1.18 2008/11/12 12:36:09 ad Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -30,9 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: darwin_ptrace.c,v 1.17 2008/04/28 20:23:41 martin Exp $"); - -#include "opt_ptrace.h" +__KERNEL_RCSID(0, "$NetBSD: darwin_ptrace.c,v 1.18 2008/11/12 12:36:09 ad Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -59,150 +57,14 @@ __KERNEL_RCSID(0, "$NetBSD: darwin_ptrace.c,v 1.17 2008/04/28 20:23:41 martin Ex int darwin_sys_ptrace(struct lwp *l, const struct darwin_sys_ptrace_args *uap, register_t *retval) { -#if defined(PTRACE) || defined(_LKM) /* { syscallarg(int) req; syscallarg(pid_t) pid; syscallarg(void *) addr; syscallarg(int) data; } */ - int req = SCARG(uap, req); - struct proc *p = l->l_proc; - struct darwin_emuldata *ded = NULL; - struct proc *t; /* target process */ - struct sys_ptrace_args bsd_ua; - int error; - -#ifdef _LKM -#define sys_ptrace (*sysent[SYS_ptrace].sy_call) - if (sys_ptrace == sys_nosys) - return ENOSYS; -#endif - - /* XXXAD locking */ - SCARG(&bsd_ua, req) = SCARG(uap, req); - SCARG(&bsd_ua, pid) = SCARG(uap, pid); - SCARG(&bsd_ua, addr) = SCARG(uap, addr); - SCARG(&bsd_ua, data) = SCARG(uap, data); - - - ded = (struct darwin_emuldata *)p->p_emuldata; - - switch (req) { - case DARWIN_PT_ATTACHEXC: - if ((t = pfind(SCARG(uap, pid))) == NULL) - return ESRCH; - - if (t->p_emul != &emul_darwin) - return ESRCH; - ded = t->p_emuldata; - - if (ded->ded_flags & DARWIN_DED_SIGEXC) - return EBUSY; - - ded->ded_flags |= DARWIN_DED_SIGEXC; - - SCARG(&bsd_ua, req) = PT_ATTACH; - if ((error = sys_ptrace(l, &bsd_ua, retval)) != 0) - ded->ded_flags &= ~DARWIN_DED_SIGEXC; - - return error; - break; - - case DARWIN_PT_SIGEXC: - if ((p->p_slflag & PSL_TRACED) == 0) - return EBUSY; - - ded->ded_flags |= DARWIN_DED_SIGEXC; - break; - - case DARWIN_PT_DETACH: { - int had_sigexc = 0; - - if ((t = pfind(SCARG(uap, pid))) == NULL) - return (ESRCH); - if ((t->p_emul == &emul_darwin) && - (t->p_slflag & PSL_TRACED) && - (t->p_pptr == p)) { - ded = t->p_emuldata; - if (ded->ded_flags & DARWIN_DED_SIGEXC) { - had_sigexc = 1; - ded->ded_flags &= ~DARWIN_DED_SIGEXC; - } - } - - /* - * If the process is not marked as stopped, - * sys_ptrace sanity checks will return EBUSY. - */ - mutex_enter(proc_lock); - mutex_enter(t->p_lock); - proc_stop(t, 0, SIGSTOP); - mutex_exit(t->p_lock); - mutex_exit(proc_lock); - - if ((error = sys_ptrace(l, &bsd_ua, retval)) != 0) { - mutex_enter(proc_lock); - mutex_enter(t->p_lock); - proc_unstop(t); - mutex_exit(t->p_lock); - mutex_exit(proc_lock); - if (had_sigexc) - ded->ded_flags |= DARWIN_DED_SIGEXC; - } - - break; - } - - case DARWIN_PT_THUPDATE: { - int signo = SCARG(uap, data); - - if ((t = pfind(SCARG(uap, pid))) == NULL) - return ESRCH; - - /* Checks from native ptrace */ - if (!ISSET(t->p_slflag, PSL_TRACED)) - return EPERM; - - if (ISSET(t->p_slflag, PSL_FSTRACE)) - return EBUSY; - - if (t->p_pptr != p) - return EBUSY; - -#if 0 - if (t->p_stat != SSTOP || !ISSET(t->p_sflag, PS_WAITED)) - return EBUSY; -#endif - if ((signo < 0) || (signo > NSIG)) - return EINVAL; - - t->p_xstat = signo; - if (signo != 0) - sigaddset(&p->p_sigpend.sp_set, signo); - - break; - } - - case DARWIN_PT_READ_U: - case DARWIN_PT_WRITE_U: - case DARWIN_PT_STEP: - case DARWIN_PT_FORCEQUOTA: - case DARWIN_PT_DENY_ATTACH: - printf("darwin_sys_ptrace: unimplemented command %d\n", req); - break; - - /* The other ptrace commands are the same on NetBSD */ - default: - return sys_ptrace(l, &bsd_ua, retval); - break; - } - - return 0; -#else - return ENOSYS; -#endif /* PTRACE || _LKM */ + return ENOSYS; /* code was badly broken */ } int diff --git a/sys/compat/freebsd/freebsd_ptrace.c b/sys/compat/freebsd/freebsd_ptrace.c index b70579be2e7..33427123bcf 100644 --- a/sys/compat/freebsd/freebsd_ptrace.c +++ b/sys/compat/freebsd/freebsd_ptrace.c @@ -1,4 +1,4 @@ -/* $NetBSD: freebsd_ptrace.c,v 1.17 2007/12/20 23:02:47 dsl Exp $ */ +/* $NetBSD: freebsd_ptrace.c,v 1.18 2008/11/12 12:36:10 ad Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -71,11 +71,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: freebsd_ptrace.c,v 1.17 2007/12/20 23:02:47 dsl Exp $"); - -#if defined(_KERNEL_OPT) -#include "opt_ptrace.h" -#endif +__KERNEL_RCSID(0, "$NetBSD: freebsd_ptrace.c,v 1.18 2008/11/12 12:36:10 ad Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -85,6 +81,7 @@ __KERNEL_RCSID(0, "$NetBSD: freebsd_ptrace.c,v 1.17 2007/12/20 23:02:47 dsl Exp #include <sys/uio.h> #include <sys/user.h> #include <sys/mount.h> +#include <sys/syscall.h> #include <sys/syscallargs.h> #include <compat/sys/signal.h> @@ -103,7 +100,6 @@ __KERNEL_RCSID(0, "$NetBSD: freebsd_ptrace.c,v 1.17 2007/12/20 23:02:47 dsl Exp int freebsd_sys_ptrace(struct lwp *l, const struct freebsd_sys_ptrace_args *uap, register_t *retval) { -#if defined(PTRACE) || defined(_LKM) /* { syscallarg(int) req; syscallarg(pid_t) pid; @@ -111,9 +107,7 @@ freebsd_sys_ptrace(struct lwp *l, const struct freebsd_sys_ptrace_args *uap, reg syscallarg(int) data; } */ struct sys_ptrace_args npa; -#ifdef _LKM - sy_call_t sys_ptrace = sysent[SYS_ptrace].sy_call; -#endif + sy_call_t *fn = sysent[SYS_ptrace].sy_call; switch (SCARG(uap, req)) { #ifdef PT_STEP @@ -122,7 +116,7 @@ freebsd_sys_ptrace(struct lwp *l, const struct freebsd_sys_ptrace_args *uap, reg SCARG(&npa, pid) = SCARG(uap, pid); SCARG(&npa, addr) = SCARG(uap, addr); SCARG(&npa, data) = SCARG(uap, data); - return sys_ptrace(l, &npa, retval); + return (*fn)(l, &npa, retval); #endif case FREEBSD_PT_TRACE_ME: case FREEBSD_PT_READ_I: @@ -132,7 +126,7 @@ freebsd_sys_ptrace(struct lwp *l, const struct freebsd_sys_ptrace_args *uap, reg case FREEBSD_PT_CONTINUE: case FREEBSD_PT_KILL: /* These requests are compatible with NetBSD */ - return sys_ptrace(l, (const void *)uap, retval); + return (*fn)(l, (const void *)uap, retval); #if 0 /* @@ -161,14 +155,14 @@ freebsd_sys_ptrace(struct lwp *l, const struct freebsd_sys_ptrace_args *uap, reg SCARG(&npa, req) = PT_GETREGS; SCARG(&npa, pid) = SCARG(uap, pid); SCARG(&npa, addr) = (void *)&nrp->regs; - if ((error = sys_ptrace(l, &npa, retval)) != 0) + if ((error = (*fn)(l, &npa, retval)) != 0) return error; #endif #ifdef PT_GETFPREGS SCARG(&npa, req) = PT_GETFPREGS; SCARG(&npa, pid) = SCARG(uap, pid); SCARG(&npa, addr) = (void *)&nrp->fpregs; - if ((error = sys_ptrace(l, &npa, retval)) != 0) + if ((error = (*fn)(l, &npa, retval)) != 0) return error; #endif netbsd_to_freebsd_ptrace_regs(&nrp->regs, &nrp->fpregs, &fr); @@ -188,14 +182,14 @@ freebsd_sys_ptrace(struct lwp *l, const struct freebsd_sys_ptrace_args *uap, reg SCARG(&npa, req) = PT_SETREGS; SCARG(&npa, pid) = SCARG(uap, pid); SCARG(&npa, addr) = (void *)&nrp->regs; - if ((error = sys_ptrace(l, &npa, retval)) != 0) + if ((error = (*fn)(l, &npa, retval)) != 0) return error; #endif #ifdef PT_SETFPREGS SCARG(&npa, req) = PT_SETFPREGS; SCARG(&npa, pid) = SCARG(uap, pid); SCARG(&npa, addr) = (void *)&nrp->fpregs; - if ((error = sys_ptrace(l, &npa, retval)) != 0) + if ((error = (*fn)(l, &npa, retval)) != 0) return error; #endif return 0; @@ -210,7 +204,4 @@ freebsd_sys_ptrace(struct lwp *l, const struct freebsd_sys_ptrace_args *uap, reg #ifdef DIAGNOSTIC panic("freebsd_ptrace: impossible"); #endif -#else - return (ENOSYS); -#endif /* PTRACE || _LKM */ } diff --git a/sys/compat/linux/arch/i386/linux_machdep.h b/sys/compat/linux/arch/i386/linux_machdep.h index 68c8a32a4f6..de0c2e98f9b 100644 --- a/sys/compat/linux/arch/i386/linux_machdep.h +++ b/sys/compat/linux/arch/i386/linux_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_machdep.h,v 1.35 2008/10/26 17:57:49 christos Exp $ */ +/* $NetBSD: linux_machdep.h,v 1.36 2008/11/12 12:36:10 ad Exp $ */ /*- * Copyright (c) 1995, 2000 The NetBSD Foundation, Inc. @@ -280,7 +280,7 @@ struct linux_desc_struct { #define LINUX_VMWARE_LAST 237 /* - * Range of ioctls to just pass on, so that LKMs (like VMWare) can + * Range of ioctls to just pass on, so that modules (like VMWare) can * handle them. */ #define LINUX_IOCTL_MIN_PASS LINUX_VMWARE_NONE diff --git a/sys/compat/linux/arch/mips/linux_machdep.h b/sys/compat/linux/arch/mips/linux_machdep.h index 092903b22e2..3b526b3397b 100644 --- a/sys/compat/linux/arch/mips/linux_machdep.h +++ b/sys/compat/linux/arch/mips/linux_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_machdep.h,v 1.9 2008/04/28 20:23:43 martin Exp $ */ +/* $NetBSD: linux_machdep.h,v 1.10 2008/11/12 12:36:10 ad Exp $ */ /*- * Copyright (c) 1995, 2000, 2001 The NetBSD Foundation, Inc. @@ -186,7 +186,7 @@ struct linux_rt_sigframe #define LINUX_VMWARE_LAST 237 /* - * Range of ioctls to just pass on, so that LKMs (like VMWare) can + * Range of ioctls to just pass on, so that modules (like VMWare) can * handle them. * * From Linux's include/linux/vt.h diff --git a/sys/compat/linux/arch/mips/linux_ptrace.c b/sys/compat/linux/arch/mips/linux_ptrace.c index 9f3a3a7dccf..239126f1fe1 100644 --- a/sys/compat/linux/arch/mips/linux_ptrace.c +++ b/sys/compat/linux/arch/mips/linux_ptrace.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ptrace.c,v 1.8 2008/04/28 20:23:43 martin Exp $ */ +/* $NetBSD: linux_ptrace.c,v 1.9 2008/11/12 12:36:10 ad Exp $ */ /*- * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc. @@ -30,8 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.8 2008/04/28 20:23:43 martin Exp $"); -#include "opt_ptrace.h" +__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.9 2008/11/12 12:36:10 ad Exp $"); #include <sys/param.h> #include <sys/malloc.h> diff --git a/sys/compat/linux/arch/powerpc/linux_machdep.h b/sys/compat/linux/arch/powerpc/linux_machdep.h index ec3a6d32fe4..a11f93f3baf 100644 --- a/sys/compat/linux/arch/powerpc/linux_machdep.h +++ b/sys/compat/linux/arch/powerpc/linux_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_machdep.h,v 1.9 2008/04/28 20:23:43 martin Exp $ */ +/* $NetBSD: linux_machdep.h,v 1.10 2008/11/12 12:36:10 ad Exp $ */ /*- * Copyright (c) 1995, 2000, 2001 The NetBSD Foundation, Inc. @@ -214,7 +214,7 @@ struct linux_rt_sigframe #define LINUX_VMWARE_LAST 237 /* - * Range of ioctls to just pass on, so that LKMs (like VMWare) can + * Range of ioctls to just pass on, so that modules (like VMWare) can * handle them. * * From Linux's include/linux/vt.h diff --git a/sys/compat/linux/arch/powerpc/linux_ptrace.c b/sys/compat/linux/arch/powerpc/linux_ptrace.c index 2ec4a79bf55..b007fe6b0d5 100644 --- a/sys/compat/linux/arch/powerpc/linux_ptrace.c +++ b/sys/compat/linux/arch/powerpc/linux_ptrace.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ptrace.c,v 1.19 2008/04/28 20:23:43 martin Exp $ */ +/* $NetBSD: linux_ptrace.c,v 1.20 2008/11/12 12:36:10 ad Exp $ */ /*- * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc. @@ -30,9 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.19 2008/04/28 20:23:43 martin Exp $"); - -#include "opt_ptrace.h" +__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.20 2008/11/12 12:36:10 ad Exp $"); #include <sys/param.h> #include <sys/malloc.h> diff --git a/sys/compat/linux/common/linux_misc.c b/sys/compat/linux/common/linux_misc.c index 7712e6697fa..3c2b96b0341 100644 --- a/sys/compat/linux/common/linux_misc.c +++ b/sys/compat/linux/common/linux_misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_misc.c,v 1.201 2008/06/24 11:18:15 ad Exp $ */ +/* $NetBSD: linux_misc.c,v 1.202 2008/11/12 12:36:10 ad Exp $ */ /*- * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc. @@ -57,11 +57,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.201 2008/06/24 11:18:15 ad Exp $"); - -#if defined(_KERNEL_OPT) -#include "opt_ptrace.h" -#endif +__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.202 2008/11/12 12:36:10 ad Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1040,13 +1036,9 @@ linux_sys_ptrace(struct lwp *l, const struct linux_sys_ptrace_args *uap, registe syscallarg(T) addr; syscallarg(T) data; } */ -#if defined(PTRACE) || defined(_LKM) const int *ptr; int request; int error; -#ifdef _LKM -#define sys_ptrace (*sysent[SYS_ptrace].sy_call) -#endif ptr = linux_ptrace_request_map; request = SCARG(uap, request); @@ -1062,13 +1054,13 @@ linux_sys_ptrace(struct lwp *l, const struct linux_sys_ptrace_args *uap, registe /* * Linux ptrace(PTRACE_CONT, pid, 0, 0) means actually * to continue where the process left off previously. - * The same thing is achieved by addr == (void *) 1 + * The same thing is achieved by addr == (void *) 1 * on NetBSD, so rewrite 'addr' appropriately. */ if (request == LINUX_PTRACE_CONT && SCARG(uap, addr)==0) SCARG(&pta, addr) = (void *) 1; - error = sys_ptrace(l, &pta, retval); + error = sysent[SYS_ptrace].sy_call(l, &pta, retval); if (error) return error; switch (request) { @@ -1088,9 +1080,6 @@ linux_sys_ptrace(struct lwp *l, const struct linux_sys_ptrace_args *uap, registe ptr++; return LINUX_SYS_PTRACE_ARCH(l, uap, retval); -#else - return ENOSYS; -#endif /* PTRACE || _LKM */ } int diff --git a/sys/compat/linux/common/linux_sysctl.c b/sys/compat/linux/common/linux_sysctl.c index 4c990917642..23839c1775d 100644 --- a/sys/compat/linux/common/linux_sysctl.c +++ b/sys/compat/linux/common/linux_sysctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_sysctl.c,v 1.36 2008/06/18 12:24:18 tsutsui Exp $ */ +/* $NetBSD: linux_sysctl.c,v 1.37 2008/11/12 12:36:10 ad Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.36 2008/06/18 12:24:18 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.37 2008/11/12 12:36:10 ad Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -65,9 +65,6 @@ char linux_release[128] = "2.0.38"; char linux_version[128] = "#0 Sun Nov 11 11:11:11 MET 2000"; #endif -#ifndef _LKM -static -#endif struct sysctlnode linux_sysctl_root = { .sysctl_flags = SYSCTL_VERSION| CTLFLAG_ROOT|CTLTYPE_NODE|CTLFLAG_READWRITE, diff --git a/sys/compat/linux32/common/linux32_misc.c b/sys/compat/linux32/common/linux32_misc.c index e1b2a654b46..0fb49b0d216 100644 --- a/sys/compat/linux32/common/linux32_misc.c +++ b/sys/compat/linux32/common/linux32_misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_misc.c,v 1.12 2008/06/18 22:58:21 njoly Exp $ */ +/* $NetBSD: linux32_misc.c,v 1.13 2008/11/12 12:36:10 ad Exp $ */ /*- * Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc. @@ -32,11 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_misc.c,v 1.12 2008/06/18 22:58:21 njoly Exp $"); - -#if defined(_KERNEL_OPT) -#include "opt_ptrace.h" -#endif +__KERNEL_RCSID(0, "$NetBSD: linux32_misc.c,v 1.13 2008/11/12 12:36:10 ad Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -103,7 +99,6 @@ linux32_sys_ptrace(struct lwp *l, const struct linux32_sys_ptrace_args *uap, reg syscallarg(T) addr; syscallarg(T) data; } */ -#if defined(PTRACE) || defined(_LKM) const int *ptr; int request; int error; @@ -128,7 +123,7 @@ linux32_sys_ptrace(struct lwp *l, const struct linux32_sys_ptrace_args *uap, reg if (request == LINUX_PTRACE_CONT && SCARG(uap, addr)==0) SCARG(&pta, addr) = (void *) 1; - error = sys_ptrace(l, &pta, retval); + error = sysent[SYS_ptrace].sy_call(l, &pta, retval); if (error) return error; switch (request) { @@ -148,7 +143,4 @@ linux32_sys_ptrace(struct lwp *l, const struct linux32_sys_ptrace_args *uap, reg ptr++; return EIO; -#else - return ENOSYS; -#endif /* PTRACE || _LKM */ } diff --git a/sys/compat/linux32/common/linux32_sysctl.c b/sys/compat/linux32/common/linux32_sysctl.c index acdb3cd6005..fd0fad70f5d 100644 --- a/sys/compat/linux32/common/linux32_sysctl.c +++ b/sys/compat/linux32/common/linux32_sysctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_sysctl.c,v 1.9 2008/01/07 16:12:53 ad Exp $ */ +/* $NetBSD: linux32_sysctl.c,v 1.10 2008/11/12 12:36:10 ad Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -31,7 +31,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_sysctl.c,v 1.9 2008/01/07 16:12:53 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_sysctl.c,v 1.10 2008/11/12 12:36:10 ad Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -105,9 +105,6 @@ SYSCTL_SETUP(sysctl_emul_linux32_setup, "sysctl emul.linux32 subtree setup") EMUL_LINUX32_KERN_VERSION, CTL_EOL); } -#ifndef _LKM -static -#endif struct sysctlnode linux32_sysctl_root = { .sysctl_flags = SYSCTL_VERSION| CTLFLAG_ROOT|CTLTYPE_NODE|CTLFLAG_READWRITE, diff --git a/sys/compat/ndis/nbcompat.h b/sys/compat/ndis/nbcompat.h index 94bb50c7d7b..4981b263a82 100644 --- a/sys/compat/ndis/nbcompat.h +++ b/sys/compat/ndis/nbcompat.h @@ -2,7 +2,7 @@ #define _NBCOMPAT_H_ #include <sys/systm.h> -#include <sys/lkm.h> +#include <sys/module.h> #include <sys/cdefs.h> #include <sys/queue.h> #include <sys/mutex.h> @@ -83,7 +83,6 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); typedef vaddr_t vm_offset_t; typedef vsize_t vm_size_t; typedef uint16_t linker_file_t; -typedef struct lkm_table * module_t; /* Write our own versions of some FreeBSD functions */ struct ndis_resource; diff --git a/sys/compat/netbsd32/netbsd32_conv.h b/sys/compat/netbsd32/netbsd32_conv.h index 075d98a6e04..422fe7b4f3d 100644 --- a/sys/compat/netbsd32/netbsd32_conv.h +++ b/sys/compat/netbsd32/netbsd32_conv.h @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_conv.h,v 1.19 2008/06/02 14:12:08 njoly Exp $ */ +/* $NetBSD: netbsd32_conv.h,v 1.20 2008/11/12 12:36:10 ad Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -32,7 +32,7 @@ /* * Though COMPAT_OLDSOCK is needed only for COMPAT_43, SunOS, Linux, * HP-UX, FreeBSD, Ultrix, OSF1, we define it unconditionally so that - * this would be LKM-safe. + * this would be module-safe. */ #define COMPAT_OLDSOCK /* used by <sys/socket.h> */ diff --git a/sys/compat/netbsd32/netbsd32_netbsd.c b/sys/compat/netbsd32/netbsd32_netbsd.c index 53b223f2fe8..f674867642f 100644 --- a/sys/compat/netbsd32/netbsd32_netbsd.c +++ b/sys/compat/netbsd32/netbsd32_netbsd.c @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_netbsd.c,v 1.145 2008/10/15 06:51:19 wrstuden Exp $ */ +/* $NetBSD: netbsd32_netbsd.c,v 1.146 2008/11/12 12:36:10 ad Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.145 2008/10/15 06:51:19 wrstuden Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.146 2008/11/12 12:36:10 ad Exp $"); #if defined(_KERNEL_OPT) #include "opt_ddb.h" @@ -37,7 +37,6 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.145 2008/10/15 06:51:19 wrstud #include "opt_sysv.h" #include "opt_nfsserver.h" #include "opt_syscall_debug.h" -#include "opt_ptrace.h" #include "opt_sa.h" #include "fs_lfs.h" @@ -47,7 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.145 2008/10/15 06:51:19 wrstud /* * Though COMPAT_OLDSOCK is needed only for COMPAT_43, SunOS, Linux, * HP-UX, FreeBSD, Ultrix, OSF1, we define it unconditionally so that - * this would be LKM-safe. + * this would be module-safe. */ #define COMPAT_OLDSOCK /* used by <sys/socket.h> */ @@ -424,7 +423,6 @@ netbsd32_setuid(struct lwp *l, const struct netbsd32_setuid_args *uap, register_ int netbsd32_ptrace(struct lwp *l, const struct netbsd32_ptrace_args *uap, register_t *retval) { -#if defined(PTRACE) || defined(_LKM) /* { syscallarg(int) req; syscallarg(pid_t) pid; @@ -437,14 +435,8 @@ netbsd32_ptrace(struct lwp *l, const struct netbsd32_ptrace_args *uap, register_ NETBSD32TO64_UAP(pid); NETBSD32TOP_UAP(addr, void *); NETBSD32TO64_UAP(data); -#ifdef _LKM + return (*sysent[SYS_ptrace].sy_call)(l, &ua, retval); -#else - return sys_ptrace(l, &ua, retval); -#endif -#else - return (ENOSYS); -#endif /* PTRACE || _LKM */ } int diff --git a/sys/compat/netbsd32/netbsd32_syscall.h b/sys/compat/netbsd32/netbsd32_syscall.h index 438306d3741..7bdb59a044e 100644 --- a/sys/compat/netbsd32/netbsd32_syscall.h +++ b/sys/compat/netbsd32/netbsd32_syscall.h @@ -1,10 +1,10 @@ -/* $NetBSD: netbsd32_syscall.h,v 1.78 2008/10/15 06:51:19 wrstuden Exp $ */ +/* $NetBSD: netbsd32_syscall.h,v 1.79 2008/11/12 12:36:10 ad Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.69.4.3 2008/09/28 21:14:14 skrll Exp + * created from NetBSD: syscalls.master,v 1.70 2008/10/15 06:51:20 wrstuden Exp */ #ifndef _NETBSD32_SYS_SYSCALL_H_ @@ -596,19 +596,6 @@ /* syscall: "netbsd32_poll" ret: "int" args: "netbsd32_pollfdp_t" "u_int" "int" */ #define NETBSD32_SYS_netbsd32_poll 209 -#if defined(LKM) || !defined(_KERNEL) -#else /* !LKM || !_KERNEL */ - /* 210 is excluded lkmnosys */ - /* 211 is excluded lkmnosys */ - /* 212 is excluded lkmnosys */ - /* 213 is excluded lkmnosys */ - /* 214 is excluded lkmnosys */ - /* 215 is excluded lkmnosys */ - /* 216 is excluded lkmnosys */ - /* 217 is excluded lkmnosys */ - /* 218 is excluded lkmnosys */ - /* 219 is excluded lkmnosys */ -#endif /* !LKM || !_KERNEL */ #if defined(SYSVSEM) || !defined(_KERNEL) /* syscall: "compat_14_netbsd32___semctl" ret: "int" args: "int" "int" "int" "netbsd32_semunu_t" */ #define NETBSD32_SYS_compat_14_netbsd32___semctl 220 diff --git a/sys/compat/netbsd32/netbsd32_syscallargs.h b/sys/compat/netbsd32/netbsd32_syscallargs.h index 3b720560269..7262100a93d 100644 --- a/sys/compat/netbsd32/netbsd32_syscallargs.h +++ b/sys/compat/netbsd32/netbsd32_syscallargs.h @@ -1,10 +1,10 @@ -/* $NetBSD: netbsd32_syscallargs.h,v 1.78 2008/10/15 06:51:20 wrstuden Exp $ */ +/* $NetBSD: netbsd32_syscallargs.h,v 1.79 2008/11/12 12:36:10 ad Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.69.4.3 2008/09/28 21:14:14 skrll Exp + * created from NetBSD: syscalls.master,v 1.70 2008/10/15 06:51:20 wrstuden Exp */ #ifndef _NETBSD32_SYS_SYSCALLARGS_H_ @@ -1120,9 +1120,6 @@ struct netbsd32_poll_args { syscallarg(int) timeout; }; check_syscall_args(netbsd32_poll) -#if defined(LKM) || !defined(_KERNEL) -#else /* !LKM || !_KERNEL */ -#endif /* !LKM || !_KERNEL */ #if defined(SYSVSEM) || !defined(_KERNEL) struct compat_14_netbsd32___semctl_args { @@ -2460,11 +2457,6 @@ int netbsd32_reboot(struct lwp *, const struct netbsd32_reboot_args *, register_ int netbsd32_poll(struct lwp *, const struct netbsd32_poll_args *, register_t *); -#if defined(LKM) || !defined(_KERNEL) -int sys_lkmnosys(struct lwp *, const void *, register_t *); - -#else /* !LKM || !_KERNEL */ -#endif /* !LKM || !_KERNEL */ #if defined(SYSVSEM) || !defined(_KERNEL) int compat_14_netbsd32___semctl(struct lwp *, const struct compat_14_netbsd32___semctl_args *, register_t *); diff --git a/sys/compat/netbsd32/netbsd32_syscalls.c b/sys/compat/netbsd32/netbsd32_syscalls.c index a4dbf3d510b..c9de6a68b48 100644 --- a/sys/compat/netbsd32/netbsd32_syscalls.c +++ b/sys/compat/netbsd32/netbsd32_syscalls.c @@ -1,14 +1,14 @@ -/* $NetBSD: netbsd32_syscalls.c,v 1.77 2008/10/15 06:51:20 wrstuden Exp $ */ +/* $NetBSD: netbsd32_syscalls.c,v 1.78 2008/11/12 12:36:10 ad Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.69.4.3 2008/09/28 21:14:14 skrll Exp + * created from NetBSD: syscalls.master,v 1.70 2008/10/15 06:51:20 wrstuden Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.77 2008/10/15 06:51:20 wrstuden Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.78 2008/11/12 12:36:10 ad Exp $"); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) @@ -264,29 +264,16 @@ const char *const netbsd32_syscallnames[] = { /* 207 */ "netbsd32_getpgid", /* 208 */ "netbsd32_reboot", /* 209 */ "netbsd32_poll", -#if defined(LKM) || !defined(_KERNEL) - /* 210 */ "lkmnosys", - /* 211 */ "lkmnosys", - /* 212 */ "lkmnosys", - /* 213 */ "lkmnosys", - /* 214 */ "lkmnosys", - /* 215 */ "lkmnosys", - /* 216 */ "lkmnosys", - /* 217 */ "lkmnosys", - /* 218 */ "lkmnosys", - /* 219 */ "lkmnosys", -#else /* !LKM || !_KERNEL */ - /* 210 */ "#210 (excluded lkmnosys)", - /* 211 */ "#211 (excluded lkmnosys)", - /* 212 */ "#212 (excluded lkmnosys)", - /* 213 */ "#213 (excluded lkmnosys)", - /* 214 */ "#214 (excluded lkmnosys)", - /* 215 */ "#215 (excluded lkmnosys)", - /* 216 */ "#216 (excluded lkmnosys)", - /* 217 */ "#217 (excluded lkmnosys)", - /* 218 */ "#218 (excluded lkmnosys)", - /* 219 */ "#219 (excluded lkmnosys)", -#endif /* !LKM || !_KERNEL */ + /* 210 */ "#210 (unimplemented)", + /* 211 */ "#211 (unimplemented)", + /* 212 */ "#212 (unimplemented)", + /* 213 */ "#213 (unimplemented)", + /* 214 */ "#214 (unimplemented)", + /* 215 */ "#215 (unimplemented)", + /* 216 */ "#216 (unimplemented)", + /* 217 */ "#217 (unimplemented)", + /* 218 */ "#218 (unimplemented)", + /* 219 */ "#219 (unimplemented)", #if defined(SYSVSEM) || !defined(_KERNEL) /* 220 */ "compat_14_netbsd32___semctl", /* 221 */ "netbsd32_semget", diff --git a/sys/compat/netbsd32/netbsd32_sysent.c b/sys/compat/netbsd32/netbsd32_sysent.c index ef06d544425..db05917685e 100644 --- a/sys/compat/netbsd32/netbsd32_sysent.c +++ b/sys/compat/netbsd32/netbsd32_sysent.c @@ -1,14 +1,14 @@ -/* $NetBSD: netbsd32_sysent.c,v 1.77 2008/10/15 06:51:20 wrstuden Exp $ */ +/* $NetBSD: netbsd32_sysent.c,v 1.78 2008/11/12 12:36:10 ad Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.69.4.3 2008/09/28 21:14:14 skrll Exp + * created from NetBSD: syscalls.master,v 1.70 2008/10/15 06:51:20 wrstuden Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysent.c,v 1.77 2008/10/15 06:51:20 wrstuden Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysent.c,v 1.78 2008/11/12 12:36:10 ad Exp $"); #if defined(_KERNEL_OPT) #include "opt_nfsserver.h" @@ -550,49 +550,26 @@ struct sysent netbsd32_sysent[] = { (sy_call_t *)netbsd32_reboot }, /* 208 = netbsd32_reboot */ { ns(struct netbsd32_poll_args), 0, (sy_call_t *)netbsd32_poll }, /* 209 = netbsd32_poll */ -#if defined(LKM) || !defined(_KERNEL) { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 210 = lkmnosys */ + sys_nosys }, /* 210 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 211 = lkmnosys */ + sys_nosys }, /* 211 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 212 = lkmnosys */ + sys_nosys }, /* 212 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 213 = lkmnosys */ + sys_nosys }, /* 213 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 214 = lkmnosys */ + sys_nosys }, /* 214 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 215 = lkmnosys */ + sys_nosys }, /* 215 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 216 = lkmnosys */ + sys_nosys }, /* 216 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 217 = lkmnosys */ + sys_nosys }, /* 217 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 218 = lkmnosys */ + sys_nosys }, /* 218 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 219 = lkmnosys */ -#else /* !LKM || !_KERNEL */ - { 0, 0, 0, - sys_nosys }, /* 210 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 211 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 212 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 213 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 214 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 215 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 216 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 217 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 218 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 219 = excluded lkmnosys */ -#endif /* !LKM || !_KERNEL */ + sys_nosys }, /* 219 = unimplemented */ #if defined(SYSVSEM) || !defined(_KERNEL) { ns(struct compat_14_netbsd32___semctl_args), 0, (sy_call_t *)compat_14(netbsd32___semctl) },/* 220 = compat_14_netbsd32___semctl */ diff --git a/sys/compat/netbsd32/syscalls.master b/sys/compat/netbsd32/syscalls.master index 68504d2affa..d17baa3ab6f 100644 --- a/sys/compat/netbsd32/syscalls.master +++ b/sys/compat/netbsd32/syscalls.master @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.70 2008/10/15 06:51:20 wrstuden Exp $ + $NetBSD: syscalls.master,v 1.71 2008/11/12 12:36:10 ad Exp $ ; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -309,32 +309,16 @@ 207 STD { int netbsd32_getpgid(pid_t pid); } 208 STD { int netbsd32_reboot(int opt, netbsd32_charp bootstr); } 209 STD { int netbsd32_poll(netbsd32_pollfdp_t fds, u_int nfds, int timeout); } -; -; Syscalls 210-219 are reserved for dynamically loaded syscalls -; -#if defined(LKM) || !defined(_KERNEL) -210 NODEF { int sys_lkmnosys(void); } -211 NODEF { int sys_lkmnosys(void); } -212 NODEF { int sys_lkmnosys(void); } -213 NODEF { int sys_lkmnosys(void); } -214 NODEF { int sys_lkmnosys(void); } -215 NODEF { int sys_lkmnosys(void); } -216 NODEF { int sys_lkmnosys(void); } -217 NODEF { int sys_lkmnosys(void); } -218 NODEF { int sys_lkmnosys(void); } -219 NODEF { int sys_lkmnosys(void); } -#else /* !LKM || !_KERNEL */ -210 EXCL lkmnosys -211 EXCL lkmnosys -212 EXCL lkmnosys -213 EXCL lkmnosys -214 EXCL lkmnosys -215 EXCL lkmnosys -216 EXCL lkmnosys -217 EXCL lkmnosys -218 EXCL lkmnosys -219 EXCL lkmnosys -#endif /* !LKM || !_KERNEL */ +210 UNIMPL +211 UNIMPL +212 UNIMPL +213 UNIMPL +214 UNIMPL +215 UNIMPL +216 UNIMPL +217 UNIMPL +218 UNIMPL +219 UNIMPL ; System calls 220-300 are reserved for use by NetBSD #if defined(SYSVSEM) || !defined(_KERNEL) 220 COMPAT_14 { int netbsd32___semctl(int semid, int semnum, int cmd, netbsd32_semunu_t arg); } diff --git a/sys/compat/sunos/sunos_misc.c b/sys/compat/sunos/sunos_misc.c index dfae00fdb87..f52414b235f 100644 --- a/sys/compat/sunos/sunos_misc.c +++ b/sys/compat/sunos/sunos_misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: sunos_misc.c,v 1.161 2008/08/07 20:15:32 plunky Exp $ */ +/* $NetBSD: sunos_misc.c,v 1.162 2008/11/12 12:36:10 ad Exp $ */ /* * Copyright (c) 1992, 1993 @@ -50,11 +50,10 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sunos_misc.c,v 1.161 2008/08/07 20:15:32 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunos_misc.c,v 1.162 2008/11/12 12:36:10 ad Exp $"); #if defined(_KERNEL_OPT) #include "opt_nfsserver.h" -#include "opt_ptrace.h" #include "fs_nfs.h" #endif @@ -974,7 +973,6 @@ sunos_sys_setrlimit(struct lwp *l, const struct sunos_sys_setrlimit_args *uap, r return compat_43_sys_setrlimit(l, &ua_43, retval); } -#if defined(PTRACE) || defined(_LKM) /* for the m68k machines */ #ifndef PT_GETFPREGS #define PT_GETFPREGS -1 @@ -990,20 +988,16 @@ static const int sreq2breq[] = { PT_GETREGS, PT_SETREGS, PT_GETFPREGS, PT_SETFPREGS }; static const int nreqs = sizeof(sreq2breq) / sizeof(sreq2breq[0]); -#endif /* PTRACE || _LKM */ int sunos_sys_ptrace(struct lwp *l, const struct sunos_sys_ptrace_args *uap, register_t *retval) { -#if defined(PTRACE) || defined(_LKM) struct sys_ptrace_args pa; int req; -#ifdef _LKM #define sys_ptrace sysent[SYS_ptrace].sy_call if (sys_ptrace == sys_nosys) return ENOSYS; -#endif req = SCARG(uap, req); @@ -1020,9 +1014,6 @@ sunos_sys_ptrace(struct lwp *l, const struct sunos_sys_ptrace_args *uap, registe SCARG(&pa, data) = SCARG(uap, data); return sys_ptrace(l, &pa, retval); -#else - return ENOSYS; -#endif /* PTRACE || _LKM */ } /* diff --git a/sys/compat/sunos32/sunos32_misc.c b/sys/compat/sunos32/sunos32_misc.c index ea36fcc2714..d86b652367f 100644 --- a/sys/compat/sunos32/sunos32_misc.c +++ b/sys/compat/sunos32/sunos32_misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: sunos32_misc.c,v 1.62 2008/08/07 20:15:32 plunky Exp $ */ +/* $NetBSD: sunos32_misc.c,v 1.63 2008/11/12 12:36:11 ad Exp $ */ /* from :NetBSD: sunos_misc.c,v 1.107 2000/12/01 19:25:10 jdolecek Exp */ /* @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.62 2008/08/07 20:15:32 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.63 2008/11/12 12:36:11 ad Exp $"); #define COMPAT_SUNOS 1 @@ -85,7 +85,6 @@ __KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.62 2008/08/07 20:15:32 plunky Exp #include "opt_nfsserver.h" #include "opt_compat_43.h" #include "opt_compat_netbsd.h" -#include "opt_ptrace.h" #include "fs_nfs.h" #endif @@ -1278,7 +1277,6 @@ sunos32_sys_setrlimit(struct lwp *l, const struct sunos32_sys_setrlimit_args *ua return compat_43_netbsd32_osetrlimit(l, &ua_43, retval); } -#if defined(PTRACE) || defined(_LKM) /* for the m68k machines */ #ifndef PT_GETFPREGS #define PT_GETFPREGS -1 @@ -1294,12 +1292,10 @@ static const int sreq2breq[] = { PT_GETREGS, PT_SETREGS, PT_GETFPREGS, PT_SETFPREGS }; static const int nreqs = sizeof(sreq2breq) / sizeof(sreq2breq[0]); -#endif int sunos32_sys_ptrace(struct lwp *l, const struct sunos32_sys_ptrace_args *uap, register_t *retval) { -#if defined(PTRACE) || defined(_LKM) /* { syscallarg(int) req; syscallarg(pid_t) pid; @@ -1310,11 +1306,9 @@ sunos32_sys_ptrace(struct lwp *l, const struct sunos32_sys_ptrace_args *uap, reg struct netbsd32_ptrace_args pa; int req; -#ifdef _LKM #define sys_ptrace sysent[SYS_ptrace].sy_call if (sys_ptrace == sys_nosys) return ENOSYS; -#endif req = SCARG(uap, req); if ((unsigned int)req >= nreqs) @@ -1330,9 +1324,6 @@ sunos32_sys_ptrace(struct lwp *l, const struct sunos32_sys_ptrace_args *uap, reg SCARG(&pa, data) = SCARG(uap, data); return netbsd32_ptrace(l, &pa, retval); -#else - return (ENOSYS); -#endif /* PTRACE || _LKM */ } /* diff --git a/sys/compat/sys/socket.h b/sys/compat/sys/socket.h index c698167caa6..32594aa7ca6 100644 --- a/sys/compat/sys/socket.h +++ b/sys/compat/sys/socket.h @@ -1,4 +1,4 @@ -/* $NetBSD: socket.h,v 1.9 2007/08/20 04:49:41 skd Exp $ */ +/* $NetBSD: socket.h,v 1.10 2008/11/12 12:36:11 ad Exp $ */ /* * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 @@ -42,7 +42,7 @@ #include "opt_compat_43.h" #if defined(COMPAT_43) || defined(COMPAT_LINUX) || defined(COMPAT_SVR4) || \ - defined(COMPAT_ULTRIX) || defined(LKM) + defined(COMPAT_ULTRIX) || defined(MODULAR) #define COMPAT_OSOCK #endif diff --git a/sys/conf/files b/sys/conf/files index 1e27bf16311..5732f88df6a 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.924 2008/10/15 06:51:20 wrstuden Exp $ +# $NetBSD: files,v 1.925 2008/11/12 12:36:11 ad Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 @@ -24,7 +24,6 @@ defflag KTRACE defflag MBUFTRACE defflag PTRACE defflag COREDUMP -defflag opt_modular.h MODULAR defparam DEFCORENAME defparam HZ @@ -1357,7 +1356,8 @@ file kern/bufq_readprio.c bufq_readprio | new_bufq_strategy file kern/core_elf32.c coredump & exec_elf32 file kern/core_elf64.c coredump & exec_elf64 file kern/core_netbsd.c coredump & (exec_aout | exec_coff | - exec_ecoff | exec_macho | lkm) + exec_ecoff | exec_macho | + modular) file kern/cnmagic.c file kern/exec_aout.c exec_aout file kern/exec_conf.c @@ -1384,8 +1384,7 @@ file kern/kern_fork.c file kern/kern_idle.c file kern/kern_kthread.c file kern/kern_ktrace.c ktrace -file kern/kern_ksyms.c ksyms | ddb | lkm needs-flag -file kern/kern_lkm.c lkm +file kern/kern_ksyms.c ksyms | ddb | modular needs-flag file kern/kern_lock.c file kern/kern_lwp.c file kern/kern_malloc.c @@ -1509,9 +1508,9 @@ file miscfs/fifofs/fifo_vnops.c file miscfs/genfs/genfs_io.c file miscfs/genfs/genfs_vfsops.c file miscfs/genfs/genfs_vnops.c -file miscfs/genfs/layer_subr.c nullfs | overlay | umapfs | lkm -file miscfs/genfs/layer_vfsops.c nullfs | overlay | umapfs | lkm -file miscfs/genfs/layer_vnops.c nullfs | overlay | umapfs | lkm +file miscfs/genfs/layer_subr.c nullfs | overlay | umapfs +file miscfs/genfs/layer_vfsops.c nullfs | overlay | umapfs +file miscfs/genfs/layer_vnops.c nullfs | overlay | umapfs file miscfs/specfs/spec_vnops.c file miscfs/syncfs/sync_subr.c file miscfs/syncfs/sync_vnops.c diff --git a/sys/dev/ata/ataconf.h b/sys/dev/ata/ataconf.h index b337393f872..479964e7668 100644 --- a/sys/dev/ata/ataconf.h +++ b/sys/dev/ata/ataconf.h @@ -1,4 +1,4 @@ -/* $NetBSD: ataconf.h,v 1.1 2006/09/07 12:34:42 itohy Exp $ */ +/* $NetBSD: ataconf.h,v 1.2 2008/11/12 12:36:11 ad Exp $ */ /* * Written in 2006 by ITOH Yasufumi. @@ -8,9 +8,9 @@ #ifndef _DEV_ATA_ATACONF_H_ #define _DEV_ATA_ATACONF_H_ -#if !defined(_KERNEL_OPT) || defined(LKM) +#if !defined(_KERNEL_OPT) || defined(MODULAR) -/* compile-in everything for LKM or LKM-enabled kernel */ +/* compile-in everything for module or module-enabled kernel */ # define NATA_DMA 1 # define NATA_UDMA 1 # define NATA_PIOBM 1 diff --git a/sys/dev/ic/an.c b/sys/dev/ic/an.c index e5b78b5092c..11e9932cc2a 100644 --- a/sys/dev/ic/an.c +++ b/sys/dev/ic/an.c @@ -1,4 +1,4 @@ -/* $NetBSD: an.c,v 1.53 2008/11/07 00:20:02 dyoung Exp $ */ +/* $NetBSD: an.c,v 1.54 2008/11/12 12:36:11 ad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: an.c,v 1.53 2008/11/07 00:20:02 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: an.c,v 1.54 2008/11/12 12:36:11 ad Exp $"); #include "bpfilter.h" @@ -347,7 +347,7 @@ an_attach(struct an_softc *sc) /* * Setup sysctl(3) MIB, hw.an.* * - * TBD condition CTLFLAG_PERMANENT on being an LKM or not + * TBD condition CTLFLAG_PERMANENT on being a module or not */ SYSCTL_SETUP(sysctl_an, "sysctl an(4) subtree setup") { diff --git a/sys/dev/ic/ath_netbsd.c b/sys/dev/ic/ath_netbsd.c index d1c4d41836d..b9ddca387dd 100644 --- a/sys/dev/ic/ath_netbsd.c +++ b/sys/dev/ic/ath_netbsd.c @@ -1,4 +1,4 @@ -/* $NetBSD: ath_netbsd.c,v 1.15 2008/07/09 19:47:24 joerg Exp $ */ +/* $NetBSD: ath_netbsd.c,v 1.16 2008/11/12 12:36:11 ad Exp $ */ /*- * Copyright (c) 2003, 2004 David Young @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ath_netbsd.c,v 1.15 2008/07/09 19:47:24 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ath_netbsd.c,v 1.16 2008/11/12 12:36:11 ad Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -74,7 +74,7 @@ device_printf(device_t dev, const char *fmt, ...) /* * Setup sysctl(3) MIB, hw.ath.*. * - * TBD condition CTLFLAG_PERMANENT on being an LKM or not + * TBD condition CTLFLAG_PERMANENT on being a module or not */ SYSCTL_SETUP(sysctl_ath, "sysctl ath subtree setup") { diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c index bcad107b9c8..85058471c49 100644 --- a/sys/dev/ic/rtw.c +++ b/sys/dev/ic/rtw.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtw.c,v 1.105 2008/11/07 00:20:03 dyoung Exp $ */ +/* $NetBSD: rtw.c,v 1.106 2008/11/12 12:36:11 ad Exp $ */ /*- * Copyright (c) 2004, 2005, 2006, 2007 David Young. All rights * reserved. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rtw.c,v 1.105 2008/11/07 00:20:03 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtw.c,v 1.106 2008/11/12 12:36:11 ad Exp $"); #include "bpfilter.h" @@ -135,7 +135,7 @@ static void rtw_txring_fixup(struct rtw_softc *sc, const char *fn, int ln); /* * Setup sysctl(3) MIB, hw.rtw.* * - * TBD condition CTLFLAG_PERMANENT on being an LKM or not + * TBD condition CTLFLAG_PERMANENT on being a module or not */ SYSCTL_SETUP(sysctl_rtw, "sysctl rtw(4) subtree setup") { diff --git a/sys/dev/ic/wi.c b/sys/dev/ic/wi.c index e58e248c09d..c0d0ffd9699 100644 --- a/sys/dev/ic/wi.c +++ b/sys/dev/ic/wi.c @@ -1,4 +1,4 @@ -/* $NetBSD: wi.c,v 1.227 2008/11/07 00:20:03 dyoung Exp $ */ +/* $NetBSD: wi.c,v 1.228 2008/11/12 12:36:11 ad Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -99,7 +99,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.227 2008/11/07 00:20:03 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.228 2008/11/12 12:36:11 ad Exp $"); #define WI_HERMES_AUTOINC_WAR /* Work around data write autoinc bug. */ #define WI_HERMES_STATS_WAR /* Work around stats counter bug. */ @@ -272,11 +272,11 @@ wi_card_ident[] = { { 0, NULL, 0 }, }; -#ifndef _LKM +#ifndef _MODULE /* * Setup sysctl(3) MIB, hw.wi.* * - * TBD condition CTLFLAG_PERMANENT on being an LKM or not + * TBD condition CTLFLAG_PERMANENT on being a module or not */ SYSCTL_SETUP(sysctl_wi, "sysctl wi(4) subtree setup") { diff --git a/sys/dev/ieee1394/firewire.c b/sys/dev/ieee1394/firewire.c index 66f48499612..6155a983149 100644 --- a/sys/dev/ieee1394/firewire.c +++ b/sys/dev/ieee1394/firewire.c @@ -1,4 +1,4 @@ -/* $NetBSD: firewire.c,v 1.21 2008/05/10 13:56:54 jmcneill Exp $ */ +/* $NetBSD: firewire.c,v 1.22 2008/11/12 12:36:11 ad Exp $ */ /*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: firewire.c,v 1.21 2008/05/10 13:56:54 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: firewire.c,v 1.22 2008/11/12 12:36:11 ad Exp $"); #if defined(__FreeBSD__) #include <sys/param.h> @@ -122,7 +122,7 @@ MALLOC_DEFINE(M_FWXFER, "fw_xfer", "XFER/FireWire"); /* * Setup sysctl(3) MIB, hw.ieee1394if.* * - * TBD condition CTLFLAG_PERMANENT on being an LKM or not + * TBD condition CTLFLAG_PERMANENT on being a module or not */ SYSCTL_SETUP(sysctl_ieee1394if, "sysctl ieee1394if(4) subtree setup") { diff --git a/sys/dev/ieee1394/fwmem.c b/sys/dev/ieee1394/fwmem.c index 8842b0adc0b..4f0cb4f1a9b 100644 --- a/sys/dev/ieee1394/fwmem.c +++ b/sys/dev/ieee1394/fwmem.c @@ -1,4 +1,4 @@ -/* $NetBSD: fwmem.c,v 1.8 2007/12/11 11:34:08 lukem Exp $ */ +/* $NetBSD: fwmem.c,v 1.9 2008/11/12 12:36:11 ad Exp $ */ /*- * Copyright (c) 2002-2003 * Hidetoshi Shimokawa. All rights reserved. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fwmem.c,v 1.8 2007/12/11 11:34:08 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fwmem.c,v 1.9 2008/11/12 12:36:11 ad Exp $"); #if defined(__FreeBSD__) __FBSDID("$FreeBSD: src/sys/dev/firewire/fwmem.c,v 1.34 2007/06/06 14:31:36 simokawa Exp $"); #endif @@ -115,7 +115,7 @@ static int sysctl_fwmem_verify_speed(SYSCTLFN_PROTO); /* * Setup sysctl(3) MIB, hw.fwmem.* * - * TBD condition CTLFLAG_PERMANENT on being an LKM or not + * TBD condition CTLFLAG_PERMANENT on being a module or not */ SYSCTL_SETUP(sysctl_fwmem, "sysctl fwmem subtree setup") { diff --git a/sys/dev/ieee1394/fwohci.c b/sys/dev/ieee1394/fwohci.c index ef636a7c91a..02cbb7fd638 100644 --- a/sys/dev/ieee1394/fwohci.c +++ b/sys/dev/ieee1394/fwohci.c @@ -1,4 +1,4 @@ -/* $NetBSD: fwohci.c,v 1.114 2008/05/10 13:56:54 jmcneill Exp $ */ +/* $NetBSD: fwohci.c,v 1.115 2008/11/12 12:36:11 ad Exp $ */ /*- * Copyright (c) 2003 Hidetoshi Shimokawa @@ -37,7 +37,7 @@ * */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fwohci.c,v 1.114 2008/05/10 13:56:54 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fwohci.c,v 1.115 2008/11/12 12:36:11 ad Exp $"); #define ATRQ_CH 0 #define ATRS_CH 1 @@ -123,7 +123,7 @@ TUNABLE_INT("hw.firewire.phydma_enable", &firewire_phydma_enable); /* * Setup sysctl(3) MIB, hw.fwohci.* * - * TBD condition CTLFLAG_PERMANENT on being an LKM or not + * TBD condition CTLFLAG_PERMANENT on being a module or not */ SYSCTL_SETUP(sysctl_fwohci, "sysctl fwohci(4) subtree setup") { diff --git a/sys/dev/ieee1394/if_fwip.c b/sys/dev/ieee1394/if_fwip.c index 3163400d615..335b52439a7 100644 --- a/sys/dev/ieee1394/if_fwip.c +++ b/sys/dev/ieee1394/if_fwip.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_fwip.c,v 1.16 2008/11/07 00:20:07 dyoung Exp $ */ +/* $NetBSD: if_fwip.c,v 1.17 2008/11/12 12:36:11 ad Exp $ */ /*- * Copyright (c) 2004 * Doug Rabson @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_fwip.c,v 1.16 2008/11/07 00:20:07 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_fwip.c,v 1.17 2008/11/12 12:36:11 ad Exp $"); #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" @@ -158,7 +158,7 @@ MALLOC_DEFINE(M_FWIP, "if_fwip", "IP over IEEE1394 interface"); /* * Setup sysctl(3) MIB, hw.fwip.* * - * TBD condition CTLFLAG_PERMANENT on being an LKM or not + * TBD condition CTLFLAG_PERMANENT on being a module or not */ SYSCTL_SETUP(sysctl_fwip, "sysctl fwip(4) subtree setup") { diff --git a/sys/dev/ieee1394/sbp.c b/sys/dev/ieee1394/sbp.c index 1a49edde241..a605186945c 100644 --- a/sys/dev/ieee1394/sbp.c +++ b/sys/dev/ieee1394/sbp.c @@ -1,4 +1,4 @@ -/* $NetBSD: sbp.c,v 1.21 2008/03/29 16:22:53 kiyohara Exp $ */ +/* $NetBSD: sbp.c,v 1.22 2008/11/12 12:36:11 ad Exp $ */ /*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sbp.c,v 1.21 2008/03/29 16:22:53 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sbp.c,v 1.22 2008/11/12 12:36:11 ad Exp $"); #if defined(__FreeBSD__) #include <sys/param.h> @@ -201,7 +201,7 @@ static int sysctl_sbp_verify_tags(SYSCTLFN_PROTO); /* * Setup sysctl(3) MIB, hw.sbp.* * - * TBD condition CTLFLAG_PERMANENT on being an LKM or not + * TBD condition CTLFLAG_PERMANENT on being a module or not */ SYSCTL_SETUP(sysctl_sbp, "sysctl sbp(4) subtree setup") { diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index 7b3db4b7733..e3cd23ef9ef 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.69.2.6 2005/03/31 04:24:36 wpaul Exp $"); #endif #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: if_ndis.c,v 1.19 2008/11/07 00:20:07 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ndis.c,v 1.20 2008/11/12 12:36:11 ad Exp $"); #endif #ifdef __FreeBSD__ @@ -59,7 +59,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ndis.c,v 1.19 2008/11/07 00:20:07 dyoung Exp $"); #ifdef __FreeBSD__ #include <sys/module.h> #else /* __NetBSD__ */ -#include <sys/lkm.h> +#include <sys/module.h> #endif #include <sys/proc.h> diff --git a/sys/dev/if_ndis/if_ndis_pci.c b/sys/dev/if_ndis/if_ndis_pci.c index b04497769f1..3ab9a511353 100644 --- a/sys/dev/if_ndis/if_ndis_pci.c +++ b/sys/dev/if_ndis/if_ndis_pci.c @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ndis_pci.c,v 1.10 2008/04/08 06:12:21 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ndis_pci.c,v 1.11 2008/11/12 12:36:12 ad Exp $"); #ifdef __FreeBSD__ __FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis_pci.c,v 1.8.2.3 2005/03/31 04:24:36 wpaul Exp $"); #endif @@ -39,11 +39,7 @@ __FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis_pci.c,v 1.8.2.3 2005/03/31 04:24 #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#ifdef __FreeBSD__ #include <sys/module.h> -#else -#include <sys/lkm.h> -#endif #include <sys/socket.h> #include <sys/queue.h> #include <sys/sysctl.h> diff --git a/sys/dev/isa/nsclpcsio_isa.c b/sys/dev/isa/nsclpcsio_isa.c index bca408a921d..c29a1cadd03 100644 --- a/sys/dev/isa/nsclpcsio_isa.c +++ b/sys/dev/isa/nsclpcsio_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: nsclpcsio_isa.c,v 1.27 2008/04/04 13:10:41 xtraeme Exp $ */ +/* $NetBSD: nsclpcsio_isa.c,v 1.28 2008/11/12 12:36:12 ad Exp $ */ /* * Copyright (c) 2002 @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nsclpcsio_isa.c,v 1.27 2008/04/04 13:10:41 xtraeme Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nsclpcsio_isa.c,v 1.28 2008/11/12 12:36:12 ad Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -41,15 +41,15 @@ __KERNEL_RCSID(0, "$NetBSD: nsclpcsio_isa.c,v 1.27 2008/04/04 13:10:41 xtraeme E #include <sys/gpio.h> #include <sys/bus.h> -/* Don't use gpio for now in the LKM */ -#ifdef _LKM +/* Don't use gpio for now in the module */ +#ifdef _MODULE #undef NGPIO #endif #include <dev/isa/isareg.h> #include <dev/isa/isavar.h> -#ifndef _LKM +#ifndef _MODULE #include "gpio.h" #endif #if NGPIO > 0 diff --git a/sys/dev/pci/if_lmc.c b/sys/dev/pci/if_lmc.c index b6a9ce9f418..35779b854b1 100644 --- a/sys/dev/pci/if_lmc.c +++ b/sys/dev/pci/if_lmc.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_lmc.c,v 1.44 2008/11/07 00:20:07 dyoung Exp $ */ +/* $NetBSD: if_lmc.c,v 1.45 2008/11/12 12:36:12 ad Exp $ */ /*- * Copyright (c) 2002-2006 David Boggs. <boggs@boggs.palo-alto.ca.us> @@ -142,7 +142,7 @@ #if defined(__NetBSD__) # include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_lmc.c,v 1.44 2008/11/07 00:20:07 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_lmc.c,v 1.45 2008/11/12 12:36:12 ad Exp $"); # include <sys/param.h> /* OS version */ /* -DLKM is passed on the compiler command line */ # include "opt_inet.h" /* INET6, INET */ @@ -161,7 +161,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_lmc.c,v 1.44 2008/11/07 00:20:07 dyoung Exp $"); # # include <sys/systm.h> # include <sys/kernel.h> -# include <sys/lkm.h> +# include <sys/module.h> # include <sys/mbuf.h> # include <sys/socket.h> # include <sys/sockio.h> @@ -216,7 +216,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_lmc.c,v 1.44 2008/11/07 00:20:07 dyoung Exp $"); # include <sys/kernel.h> # include <sys/conf.h> # include <sys/exec.h> -# include <sys/lkm.h> +# include <sys/module.h> # include <sys/mbuf.h> # include <sys/socket.h> # include <sys/sockio.h> @@ -7372,7 +7372,7 @@ struct cfattach lmc_ca = .ca_activate = NULL, }; -# if defined(LKM) +# if defined(_MODULE) struct cfdriver lmc_cd = { @@ -7479,7 +7479,7 @@ int if_lmc_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) return error; } -# endif /* LKM */ +# endif /* _MODULE */ #endif /* __OpenBSD__ */ diff --git a/sys/dev/pci/if_lmc.h b/sys/dev/pci/if_lmc.h index 4abb0d055d7..f2afe37df80 100644 --- a/sys/dev/pci/if_lmc.h +++ b/sys/dev/pci/if_lmc.h @@ -1,5 +1,5 @@ /*- - * $NetBSD: if_lmc.h,v 1.14 2008/09/08 23:36:54 gmcgarry Exp $ + * $NetBSD: if_lmc.h,v 1.15 2008/11/12 12:36:12 ad Exp $ * * Copyright (c) 2002-2006 David Boggs. (boggs@boggs.palo-alto.ca.us) * All rights reserved. @@ -1680,18 +1680,13 @@ static void fbsd_dmamap_load(void *, bus_dma_segment_t *, int, int); static int nbsd_match(struct device *, struct cfdata *, void *); static void nbsd_attach(struct device *, struct device *, void *); static int nbsd_detach(struct device *, int); -# if defined(LKM) -int if_lmc_lkmentry(struct lkm_table *, int, int); -# endif #endif /* __NetBSD__ */ #if defined(__OpenBSD__) static int obsd_match(struct device *, void *, void *); static void obsd_attach(struct device *, struct device *, void *); static int obsd_detach(struct device *, int); -# if defined(LKM) int if_lmc_lkmentry(struct lkm_table *, int, int); -# endif #endif /* __OpenBSD__ */ #if defined(__bsdi__) diff --git a/sys/dev/pci/n8/common/config.c b/sys/dev/pci/n8/common/config.c index 294eb9f3657..b506f8e5bcf 100644 --- a/sys/dev/pci/n8/common/config.c +++ b/sys/dev/pci/n8/common/config.c @@ -32,7 +32,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -static char const n8_id[] = "$Id: config.c,v 1.1 2008/10/30 12:02:14 darran Exp $"; +static char const n8_id[] = "$Id: config.c,v 1.2 2008/11/12 12:36:16 ad Exp $"; /*****************************************************************************/ /** @file config.c * @brief NSP2000 Device Driver Configuration Manager. @@ -172,8 +172,7 @@ static char const n8_id[] = "$Id: config.c,v 1.1 2008/10/30 12:02:14 darran Exp #include <sys/mbuf.h> #include <sys/device.h> #include <sys/queue.h> - -#include <sys/lkm.h> +#include <sys/module.h> #include <sys/bus.h> #include <uvm/uvm_extern.h> diff --git a/sys/dev/pci/n8/nsp.c b/sys/dev/pci/n8/nsp.c index a0a9032440d..f0a7d4b5e16 100644 --- a/sys/dev/pci/n8/nsp.c +++ b/sys/dev/pci/n8/nsp.c @@ -77,8 +77,7 @@ #include <sys/mbuf.h> #include <sys/device.h> #include <sys/queue.h> - -#include <sys/lkm.h> +#include <sys/module.h> #include <sys/bus.h> #include <uvm/uvm_extern.h> @@ -111,7 +110,7 @@ static void nsp_attach(struct device *parent, struct device *self, void *aux); static int nsp_detach(device_t dev, int flags); -#ifdef _LKM +#ifdef _MODULE CFATTACH_DECL(nsp2000, sizeof(struct nsp_softc), nsp_probe, nsp_attach, nsp_detach, NULL); int nsp2000_lkmentry(struct lkm_table *lkmtp, int cmd, int ver); @@ -149,7 +148,7 @@ nsp2000_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) LKM_DISPATCH(lkmtp, cmd, NULL, lkm_nofunc, lkm_nofunc, lkm_nofunc); } -#else /* _LKM */ +#else /* _MODULE */ CFATTACH_DECL(nsp, sizeof(struct nsp_softc), nsp_probe, nsp_attach, nsp_detach, NULL); #endif diff --git a/sys/dev/pcmcia/if_wi_pcmcia.c b/sys/dev/pcmcia/if_wi_pcmcia.c index ccf31bcbd51..7dbe7caac4e 100644 --- a/sys/dev/pcmcia/if_wi_pcmcia.c +++ b/sys/dev/pcmcia/if_wi_pcmcia.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_wi_pcmcia.c,v 1.79 2008/04/28 20:23:56 martin Exp $ */ +/* $NetBSD: if_wi_pcmcia.c,v 1.80 2008/11/12 12:36:16 ad Exp $ */ /*- * Copyright (c) 2001, 2004 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_wi_pcmcia.c,v 1.79 2008/04/28 20:23:56 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wi_pcmcia.c,v 1.80 2008/11/12 12:36:16 ad Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -64,7 +64,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_wi_pcmcia.c,v 1.79 2008/04/28 20:23:56 martin Exp #include <dev/pcmcia/pcmciavar.h> #include <dev/pcmcia/pcmciadevs.h> -#ifdef _LKM +#ifdef _MODULE #define WI_PCMCIA_SPECTRUM24T_FW 1 #else #include <opt_if_wi_pcmcia.h> diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index acd048afd01..8ecf9b44a82 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $NetBSD: vnd.c,v 1.187 2008/09/24 07:57:30 ad Exp $ */ +/* $NetBSD: vnd.c,v 1.188 2008/11/12 12:36:11 ad Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc. @@ -130,7 +130,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.187 2008/09/24 07:57:30 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.188 2008/11/12 12:36:11 ad Exp $"); #if defined(_KERNEL_OPT) #include "fs_nfs.h" @@ -194,7 +194,7 @@ struct vndxfer { #define VNDLABELDEV(dev) \ (MAKEDISKDEV(major((dev)), vndunit((dev)), RAW_PART)) -/* called by main() at boot time (XXX: and the LKM driver) */ +/* called by main() at boot time */ void vndattach(int); static void vndclear(struct vnd_softc *, int); diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 558b8fab4f9..7744a015a22 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.371 2008/10/28 15:33:10 tsutsui Exp $ */ +/* $NetBSD: init_main.c,v 1.372 2008/11/12 12:36:16 ad Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.371 2008/10/28 15:33:10 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.372 2008/11/12 12:36:16 ad Exp $"); #include "opt_ddb.h" #include "opt_ipsec.h" @@ -186,9 +186,6 @@ __KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.371 2008/10/28 15:33:10 tsutsui Exp #include <sys/rnd.h> #endif #include <sys/pipe.h> -#ifdef LKM -#include <sys/lkm.h> -#endif #if NVERIEXEC > 0 #include <sys/verified_exec.h> #endif /* NVERIEXEC > 0 */ diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index 224cae469fc..1ab785f7a55 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -1,4 +1,4 @@ -/* $NetBSD: init_sysent.c,v 1.229 2008/10/16 20:12:23 wrstuden Exp $ */ +/* $NetBSD: init_sysent.c,v 1.230 2008/11/12 12:36:16 ad Exp $ */ /* * System call switch table. @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: init_sysent.c,v 1.229 2008/10/16 20:12:23 wrstuden Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_sysent.c,v 1.230 2008/11/12 12:36:16 ad Exp $"); #include "opt_nfsserver.h" #include "opt_ntp.h" @@ -579,49 +579,26 @@ struct sysent sysent[] = { (sy_call_t *)sys_reboot }, /* 208 = reboot */ { ns(struct sys_poll_args), 0, (sy_call_t *)sys_poll }, /* 209 = poll */ -#if defined(LKM) || !defined(_KERNEL) { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 210 = lkmnosys */ + sys_nosys }, /* 210 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 211 = lkmnosys */ + sys_nosys }, /* 211 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 212 = lkmnosys */ + sys_nosys }, /* 212 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 213 = lkmnosys */ + sys_nosys }, /* 213 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 214 = lkmnosys */ + sys_nosys }, /* 214 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 215 = lkmnosys */ + sys_nosys }, /* 215 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 216 = lkmnosys */ + sys_nosys }, /* 216 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 217 = lkmnosys */ + sys_nosys }, /* 217 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 218 = lkmnosys */ + sys_nosys }, /* 218 = unimplemented */ { 0, 0, 0, - (sy_call_t *)sys_lkmnosys }, /* 219 = lkmnosys */ -#else /* !LKM */ - { 0, 0, 0, - sys_nosys }, /* 210 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 211 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 212 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 213 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 214 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 215 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 216 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 217 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 218 = excluded lkmnosys */ - { 0, 0, 0, - sys_nosys }, /* 219 = excluded lkmnosys */ -#endif /* !LKM */ + sys_nosys }, /* 219 = unimplemented */ #if defined(SYSVSEM) || !defined(_KERNEL) { ns(struct compat_14_sys___semctl_args), 0, (sy_call_t *)compat_14(sys___semctl) },/* 220 = compat_14___semctl */ diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 41ec0c6265a..43f90179dca 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exec.c,v 1.280 2008/10/21 20:52:11 matt Exp $ */ +/* $NetBSD: kern_exec.c,v 1.281 2008/11/12 12:36:16 ad Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.280 2008/10/21 20:52:11 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.281 2008/11/12 12:36:16 ad Exp $"); #include "opt_ktrace.h" #include "opt_syscall_debug.h" @@ -132,7 +132,6 @@ static int nexecs; u_int exec_maxhdrsz; /* must not be static - netbsd32 needs it */ -#ifdef LKM /* list of supported emulations */ static LIST_HEAD(emlist_head, emul_entry) el_head = LIST_HEAD_INITIALIZER(el_head); @@ -155,7 +154,6 @@ struct execsw_entry { struct execsw_entry *next; const struct execsw *es; }; -#endif /* LKM */ #ifdef SYSCALL_DEBUG extern const char * const syscallnames[]; @@ -236,7 +234,6 @@ const struct emul emul_netbsd = { startlwp, }; -#ifdef LKM /* * Exec lock. Used to control access to execsw[] structures. * This must not be static so that netbsd32 can access it, too. @@ -244,7 +241,6 @@ const struct emul emul_netbsd = { krwlock_t exec_lock; static void link_es(struct execsw_entry **, const struct execsw *); -#endif /* LKM */ static kmutex_t sigobject_lock; @@ -572,9 +568,7 @@ execve1(struct lwp *l, const char *path, char * const *args, pack.ep_esch = NULL; pack.ep_pax_flags = 0; -#ifdef LKM rw_enter(&exec_lock, RW_READER); -#endif /* see if we can run it. */ if ((error = check_exec(l, &pack)) != 0) { @@ -1091,9 +1085,7 @@ execve1(struct lwp *l, const char *path, char * const *args, /* Allow new references from the debugger/procfs. */ rw_exit(&p->p_reflock); -#ifdef LKM rw_exit(&exec_lock); -#endif mutex_enter(proc_lock); @@ -1149,9 +1141,7 @@ execve1(struct lwp *l, const char *path, char * const *args, if (pack.ep_interp != NULL) vrele(pack.ep_interp); -#ifdef LKM rw_exit(&exec_lock); -#endif clrflg: lwp_lock(l); @@ -1165,9 +1155,7 @@ execve1(struct lwp *l, const char *path, char * const *args, exec_abort: PNBUF_PUT(pathbuf); rw_exit(&p->p_reflock); -#ifdef LKM rw_exit(&exec_lock); -#endif /* * the old process doesn't exist anymore. exit gracefully. @@ -1240,7 +1228,6 @@ copyargs(struct lwp *l, struct exec_package *pack, struct ps_strings *arginfo, return 0; } -#ifdef LKM /* * Find an emulation of given name in list of emulations. * Needs to be called with the exec_lock held. @@ -1556,45 +1543,6 @@ exec_init(int init_boot) return 0; } -#endif - -#ifndef LKM -/* - * Simplified exec_init() for kernels without LKMs. Only initialize - * exec_maxhdrsz and execsw[]. - */ -int -exec_init(int init_boot) -{ - int i; - -#ifdef DIAGNOSTIC - if (!init_boot) - panic("exec_init(): called with init_boot == 0"); -#endif - - /* do one-time initializations */ - nexecs = nexecs_builtin; - execsw = kmem_alloc(nexecs * sizeof(struct execsw *), KM_SLEEP); - - pool_init(&exec_pool, NCARGS, 0, 0, PR_NOALIGN|PR_NOTOUCH, - "execargs", &exec_palloc, IPL_NONE); - pool_sethardlimit(&exec_pool, maxexec, "should not happen", 0); - - /* - * Fill in execsw[] and figure out the maximum size of an exec header. - */ - exec_maxhdrsz = 0; - for(i=0; i < nexecs; i++) { - execsw[i] = &execsw_builtin[i]; - if (execsw_builtin[i].es_hdrsz > exec_maxhdrsz) - exec_maxhdrsz = execsw_builtin[i].es_hdrsz; - } - - return 0; - -} -#endif /* !LKM */ static int exec_sigcode_map(struct proc *p, const struct emul *e) diff --git a/sys/kern/kern_ksyms.c b/sys/kern/kern_ksyms.c index d3b1461ef28..b6e09a9f47e 100644 --- a/sys/kern/kern_ksyms.c +++ b/sys/kern/kern_ksyms.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_ksyms.c,v 1.41 2008/10/24 13:55:42 christos Exp $ */ +/* $NetBSD: kern_ksyms.c,v 1.42 2008/11/12 12:36:16 ad Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.41 2008/10/24 13:55:42 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.42 2008/11/12 12:36:16 ad Exp $"); #ifdef _KERNEL #include "opt_ddb.h" @@ -316,6 +316,7 @@ findsym(const char *name, struct ksyms_symtab *table) void ksymsattach(int arg) { + if (baseidx == 0) ptree_gen(0, &kernel_symtab); } @@ -351,7 +352,6 @@ addsymtab(const char *name, void *symstart, size_t symsize, tab->sd_maxsym = NULL; tab->sd_usroffset = 0; tab->sd_gone = false; - tab->sd_malloc = false; /* XXXLKM */ #ifdef KSYMS_DEBUG printf("newstart %p sym %p ksyms_symsz %d str %p strsz %d send %p\n", newstart, symstart, symsize, strstart, strsize, @@ -488,6 +488,8 @@ ksyms_init_explicit(void *ehdr, void *symstart, size_t symsize, void *strstart, size_t strsize) { + mutex_init(&ksyms_lock, MUTEX_DEFAULT, IPL_NONE); + if (!ksyms_verify(symstart, strstart)) return; @@ -507,7 +509,7 @@ ksyms_init_explicit(void *ehdr, void *symstart, size_t symsize, */ int ksyms_getval_unlocked(const char *mod, const char *sym, unsigned long *val, - int type) + int type) { struct ksyms_symtab *st; Elf_Sym *es; @@ -554,7 +556,6 @@ ksyms_getval(const char *mod, const char *sym, unsigned long *val, int type) return rc; } - /* * Get "mod" and "symbol" associated with an address. * Returns 0 if success or ENOENT if no such entry. @@ -616,252 +617,6 @@ ksyms_getname(const char **mod, const char **sym, vaddr_t v, int f) } /* - * Temporary work structure for dynamic loaded symbol tables. - * - * XXX REMOVE WHEN LKMS GO. - */ -struct syminfo { - size_t cursyms; - size_t curnamep; - size_t maxsyms; - size_t maxnamep; - Elf_Sym *syms; - char *symnames; -}; - -/* - * Add a symbol to the temporary save area for symbols. - * - * XXX REMOVE WHEN LKMS GO. - */ -static void -addsym(struct syminfo *info, const Elf_Sym *sym, const char *name, - const char *mod) -{ - int len, mlen; - -#ifdef KSYMS_DEBUG - if (ksyms_debug & FOLLOW_MORE_CALLS) - printf("addsym: name %s val %lx\n", name, (long)sym->st_value); -#endif - len = strlen(name) + 1; - if (mod) - mlen = 1 + strlen(mod); - else - mlen = 0; - if (info->cursyms == info->maxsyms || - (len + mlen + info->curnamep) > info->maxnamep) { - printf("addsym: too many symbols, skipping '%s'\n", name); - return; - } - strlcpy(&info->symnames[info->curnamep], name, - info->maxnamep - info->curnamep); - if (mlen) { - info->symnames[info->curnamep + len - 1] = '.'; - strlcpy(&info->symnames[info->curnamep + len], mod, - info->maxnamep - (info->curnamep + len)); - len += mlen; - } - info->syms[info->cursyms] = *sym; - info->syms[info->cursyms].st_name = info->curnamep; - info->curnamep += len; - if (len > ksyms_maxlen) - ksyms_maxlen = len; - info->cursyms++; -} - -/* - * XXX REMOVE WHEN LKMS GO. - */ -static int -specialsym(const char *symname) -{ - - return !strcmp(symname, "_bss_start") || - !strcmp(symname, "__bss_start") || - !strcmp(symname, "_bss_end__") || - !strcmp(symname, "__bss_end__") || - !strcmp(symname, "_edata") || - !strcmp(symname, "_end") || - !strcmp(symname, "__end") || - !strcmp(symname, "__end__") || - !strncmp(symname, "__start_link_set_", 17) || - !strncmp(symname, "__stop_link_set_", 16); -} - -/* - * Adds a symbol table. - * "name" is the module name, "start" and "size" is where the symbol table - * is located, and "type" is in which binary format the symbol table is. - * New memory for keeping the symbol table is allocated in this function. - * Returns 0 if success and EEXIST if the module name is in use. - * - * XXX REMOVE WHEN LKMS GO. - */ -int -ksyms_addsymtab(const char *mod, void *symstart, vsize_t symsize, - char *strstart, vsize_t strsize) -{ - Elf_Sym *sym = symstart; - struct ksyms_symtab *st; - unsigned long rval; - int i; - char *name; - struct syminfo info; - -#ifdef KSYMS_DEBUG - if (ksyms_debug & FOLLOW_CALLS) - printf("ksyms_addsymtab: mod %s symsize %lx strsize %lx\n", - mod, symsize, strsize); -#endif - - mutex_enter(&ksyms_lock); - - /* Check if this symtab already loaded */ - TAILQ_FOREACH(st, &ksyms_symtabs, sd_queue) { - if (st->sd_gone) - continue; - if (strcmp(mod, st->sd_name) == 0) { - mutex_exit(&ksyms_lock); - return EEXIST; - } - } - - /* - * XXX - Only add a symbol if it do not exist already. - * This is because of a flaw in the current LKM implementation, - * these loops will be removed once the in-kernel linker is in place. - */ - memset(&info, 0, sizeof(info)); - for (i = 0; i < symsize/sizeof(Elf_Sym); i++) { - char * const symname = strstart + sym[i].st_name; - if (sym[i].st_name == 0) - continue; /* Just ignore */ - - /* check validity of the symbol */ - /* XXX - save local symbols if DDB */ - if (ELF_ST_BIND(sym[i].st_info) != STB_GLOBAL) - continue; - - /* Check if the symbol exists */ - if (ksyms_getval_unlocked(NULL, symname, &rval, KSYMS_EXTERN) - == 0) { - /* Check (and complain) about differing values */ - if (sym[i].st_value != rval && - sym[i].st_shndx != SHN_UNDEF) { - if (specialsym(symname)) { - info.maxsyms++; - info.maxnamep += strlen(symname) + 1 + - strlen(mod) + 1; - } else { - printf("%s: symbol '%s' redeclared with" - " different value (%lx != %lx)\n", - mod, symname, - rval, (long)sym[i].st_value); - } - } - } else { - /* - * Count this symbol - */ - info.maxsyms++; - info.maxnamep += strlen(symname) + 1; - } - } - - /* - * Now that we know the sizes, malloc the structures. - */ - info.syms = malloc(sizeof(Elf_Sym)*info.maxsyms, M_DEVBUF, M_WAITOK); - info.symnames = malloc(info.maxnamep, M_DEVBUF, M_WAITOK); - - /* - * Now that we have the symbols, actually fill in the structures. - */ - for (i = 0; i < symsize/sizeof(Elf_Sym); i++) { - char * const symname = strstart + sym[i].st_name; - if (sym[i].st_name == 0) - continue; /* Just ignore */ - - /* check validity of the symbol */ - /* XXX - save local symbols if DDB */ - if (ELF_ST_BIND(sym[i].st_info) != STB_GLOBAL) - continue; - - /* Check if the symbol exists */ - if (ksyms_getval_unlocked(NULL, symname, &rval, KSYMS_EXTERN) - == 0) { - if ((sym[i].st_value != rval) && specialsym(symname)) { - addsym(&info, &sym[i], symname, mod); - } - } else - /* Ok, save this symbol */ - addsym(&info, &sym[i], symname, NULL); - } - - st = kmem_zalloc(sizeof(*st), KM_SLEEP); - i = strlen(mod) + 1; - name = malloc(i, M_DEVBUF, M_WAITOK); - strlcpy(name, mod, i); - st->sd_name = name; - st->sd_symstart = info.syms; - st->sd_symsize = sizeof(Elf_Sym)*info.maxsyms; - st->sd_strstart = info.symnames; - st->sd_strsize = info.maxnamep; - st->sd_malloc = true; - - /* Make them absolute references */ - sym = st->sd_symstart; - for (i = 0; i < st->sd_symsize/sizeof(Elf_Sym); i++) - sym[i].st_shndx = SHN_ABS; - - /* ksymsread() is unlocked, so membar. */ - membar_producer(); - TAILQ_INSERT_TAIL(&ksyms_symtabs, st, sd_queue); - ksyms_sizes_calc(); - mutex_exit(&ksyms_lock); - - return 0; -} - -/* - * Remove a symbol table specified by name. - * Returns 0 if success, EBUSY if device open and ENOENT if no such name. - * - * XXX REMOVE WHEN LKMS GO. - */ -int -ksyms_delsymtab(const char *mod) -{ - struct ksyms_symtab *st; - - mutex_enter(&ksyms_lock); - TAILQ_FOREACH(st, &ksyms_symtabs, sd_queue) { - if (st->sd_gone) - continue; - if (strcmp(mod, st->sd_name) != 0) - continue; - if (ksyms_isopen) { - st->sd_gone = true; - mutex_exit(&ksyms_lock); - return 0; - } - TAILQ_REMOVE(&ksyms_symtabs, st, sd_queue); - ksyms_sizes_calc(); - mutex_exit(&ksyms_lock); - KASSERT(st->sd_malloc); - free(st->sd_symstart, M_DEVBUF); - free(st->sd_strstart, M_DEVBUF); - /* XXXUNCONST LINTED - const castaway */ - free(__UNCONST(st->sd_name), M_DEVBUF); - kmem_free(st, sizeof(*st)); - return 0; - } - mutex_exit(&ksyms_lock); - return ENOENT; -} - -/* * Add a symbol table from a loadable module. */ void @@ -890,7 +645,6 @@ ksyms_modunload(const char *name) continue; if (strcmp(name, st->sd_name) != 0) continue; - KASSERT(!st->sd_malloc); /* XXXLKM */ st->sd_gone = true; if (!ksyms_isopen) { TAILQ_REMOVE(&ksyms_symtabs, st, sd_queue); @@ -1091,12 +845,6 @@ ksymsclose(dev_t dev, int oflags, int devtype, struct lwp *l) if (st->sd_gone) { TAILQ_REMOVE(&ksyms_symtabs, st, sd_queue); kmem_free(st, sizeof(*st)); - if (st->sd_malloc) { /* XXXLKM */ - free(st->sd_symstart, M_DEVBUF); - free(st->sd_strstart, M_DEVBUF); - /* XXXUNCONST LINTED - const castaway */ - free(__UNCONST(st->sd_name), M_DEVBUF); - } resize = true; } } diff --git a/sys/kern/kern_lkm.c b/sys/kern/kern_lkm.c deleted file mode 100644 index a004e2df17b..00000000000 --- a/sys/kern/kern_lkm.c +++ /dev/null @@ -1,1159 +0,0 @@ -/* $NetBSD: kern_lkm.c,v 1.98 2007/12/20 23:03:08 dsl Exp $ */ - -/* - * Copyright (c) 1994 Christopher G. Demetriou - * Copyright (c) 1992 Terrence R. Lambert. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Terrence R. Lambert. - * 4. The name Terrence R. Lambert may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* - * XXX it's not really safe to unload *any* of the types which are - * currently loadable; e.g. you could unload a syscall which was being - * blocked in, etc. In the long term, a solution should be come up - * with, but "not right now." -- cgd - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_lkm.c,v 1.98 2007/12/20 23:03:08 dsl Exp $"); - -#include "opt_ddb.h" -#include "opt_malloclog.h" - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/ioctl.h> -#include <sys/tty.h> -#include <sys/file.h> -#include <sys/proc.h> -#include <sys/uio.h> -#include <sys/kernel.h> -#include <sys/vnode.h> -#include <sys/malloc.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/syscallargs.h> -#include <sys/conf.h> -#include <sys/ksyms.h> -#include <sys/device.h> -#include <sys/once.h> -#include <sys/kauth.h> - -#include <sys/lkm.h> -#include <sys/syscall.h> -#ifdef DDB -#include <machine/db_machdep.h> -#include <ddb/db_sym.h> -#endif - -#include <uvm/uvm_extern.h> - -struct vm_map *lkm_map; - -#define LKM_SPACE_ALLOC(size, exec) \ - uvm_km_alloc(lkm_map, (size), 0, \ - UVM_KMF_WIRED | ((exec) ? UVM_KMF_EXEC : 0)) -#define LKM_SPACE_FREE(addr, size) \ - uvm_km_free(lkm_map, (addr), (size), UVM_KMF_WIRED) - -#if !defined(DEBUG) && defined(LKMDEBUG) -# define DEBUG -#endif - -#ifdef DEBUG -# define LKMDB_INFO 0x01 -# define LKMDB_LOAD 0x02 -int lkmdebug = 0; -#endif - -#define LKM_ALLOC 0x01 - -#define LKMS_IDLE 0x00 -#define LKMS_RESERVED 0x01 -#define LKMS_LOADING 0x02 -#define LKMS_UNLOADING 0x08 - -static int lkm_v = 0; -static int lkm_state = LKMS_IDLE; - -static TAILQ_HEAD(lkms_head, lkm_table) lkmods = /* table of loaded modules */ - TAILQ_HEAD_INITIALIZER(lkmods); -static struct lkm_table *curp; /* global for in-progress ops */ - -static struct lkm_table *lkmlookup(int, char *, int, int *); -static struct lkm_table *lkmalloc(void); -static void lkmfree(void); -static void lkmunreserve(int); -static int _lkm_syscall(struct lkm_table *, int); -static int _lkm_vfs(struct lkm_table *, int); -static int _lkm_dev(struct lkm_table *, int); -#ifdef STREAMS -static int _lkm_strmod(struct lkm_table *, int); -#endif -static int _lkm_exec(struct lkm_table *, int); -static int _lkm_compat(struct lkm_table *, int); -static int _lkm_drv(struct lkm_table *, int); - -static int _lkm_checkver(struct lkm_table *); - -dev_type_open(lkmopen); -dev_type_close(lkmclose); -dev_type_ioctl(lkmioctl); - -const struct cdevsw lkm_cdevsw = { - lkmopen, lkmclose, noread, nowrite, lkmioctl, - nostop, notty, nopoll, nommap, nokqfilter, D_OTHER, -}; - -static ONCE_DECL(lkm_init_once); - -static int -lkm_init(void) -{ - /* - * If machine-dependent code hasn't initialized the lkm_map - * then just use kernel_map. - */ - if (lkm_map == NULL) - lkm_map = kernel_map; - - return 0; -} - -/*ARGSUSED*/ -int -lkmopen(dev_t dev, int flag, int devtype, struct lwp *l) -{ - int error; - - RUN_ONCE(&lkm_init_once, lkm_init); - - if (minor(dev) != 0) - return (ENXIO); /* bad minor # */ - - /* - * Use of the loadable kernel module device must be exclusive; we - * may try to remove this restriction later, but it's really no - * hardship. - */ - while (lkm_v & LKM_ALLOC) { - if (flag & FNONBLOCK) /* don't hang */ - return (EBUSY); - /* - * Sleep pending unlock; we use tsleep() to allow - * an alarm out of the open. - */ - error = tsleep((void *)&lkm_v, TTIPRI|PCATCH, "lkmopn", 0); - if (error) - return (error); - } - lkm_v |= LKM_ALLOC; - - return (0); /* pseudo-device open */ -} - -/* - * Look up for a LKM in the list. - */ -static struct lkm_table * -lkmlookup(int i, char *name, int need_copyin, int *error) -{ - struct lkm_table *p; - char istr[MAXLKMNAME]; - - /* - * p being NULL here implies the list is empty, so any lookup is - * invalid (name based or otherwise). Since the list of modules is - * kept sorted by id, lowest to highest, the id of the last entry - * will be the highest in use. - */ - p = TAILQ_LAST(&lkmods, lkms_head); - if (p == NULL || i > p->id) { - *error = EINVAL; - return (NULL); - } - - if (i < 0) { /* unload by name */ - /* - * Copy name and lookup id from all loaded - * modules. May fail. - */ - if (need_copyin) { - *error = copyinstr(name, istr, MAXLKMNAME - 1, NULL); - if (*error) - return (NULL); - } else - strncpy(istr, name, MAXLKMNAME - 1); - istr[MAXLKMNAME - 1] = '\0'; - - TAILQ_FOREACH(p, &lkmods, link) { - if (strcmp(istr, p->private.lkm_any->lkm_name) == 0) - break; - } - } else - TAILQ_FOREACH(p, &lkmods, link) - if (i == p->id) - break; - - if (p == NULL) - *error = ENOENT; - - return (p); -} - -/* - * Allocates memory for a new LKM table entry and inserts in the list. - * Returns NULL on failure. - */ -static struct lkm_table * -lkmalloc(void) -{ - struct lkm_table *p, *ret; - int id = 0; - - ret = malloc(sizeof(struct lkm_table), M_DEVBUF, M_NOWAIT); - if (ret == NULL) - return (NULL); - ret->refcnt = 0; - ret->forced = 0; - - /* find the first unused id */ - TAILQ_FOREACH(p, &lkmods, link) { - if (id != p->id) - break; - id++; - } - ret->id = id; - - if (p == NULL) - TAILQ_INSERT_TAIL(&lkmods, ret, link); - else - TAILQ_INSERT_BEFORE(p, ret, link); - - return (ret); -} - -/* - * Frees the current LKM table entry. - */ -static void -lkmfree(void) -{ - TAILQ_REMOVE(&lkmods, curp, link); - free(curp, M_DEVBUF); - curp = NULL; -} - -/* - * Unreserve the memory associated with the current loaded module; done on - * a coerced close of the lkm device (close on premature exit of modload) - * or explicitly by modload as a result of a link failure. - */ -static void -lkmunreserve(int delsymtab) -{ - - if (lkm_state == LKMS_IDLE) - return; - - if (curp && curp->syms) { - if (delsymtab) - ksyms_delsymtab(curp->private.lkm_any->lkm_name); - LKM_SPACE_FREE(curp->syms, curp->sym_size); - curp->syms = 0; - } - /* - * Actually unreserve the memory - */ - if (curp && curp->area) { - LKM_SPACE_FREE(curp->area, curp->size); - curp->area = 0; - } - - if (curp && curp->forced) - curp->forced = 0; - - lkm_state = LKMS_IDLE; -} - -int -lkmclose(dev_t dev, int flag, int mode, struct lwp *l) -{ - - if (!(lkm_v & LKM_ALLOC)) { -#ifdef DEBUG - if (lkmdebug & LKMDB_INFO) - printf("LKM: close before open!\n"); -#endif /* DEBUG */ - return (EBADF); - } - - /* do this before waking the herd... */ - if (curp != NULL && curp->refcnt == 0) { - /* - * If we close before setting used, we have aborted - * by way of error or by way of close-on-exit from - * a premature exit of "modload". - */ - lkmunreserve(1); /* coerce state to LKM_IDLE */ - lkmfree(); - } - - lkm_v &= ~LKM_ALLOC; - wakeup((void *)&lkm_v); /* thundering herd "problem" here */ - - return (0); /* pseudo-device closed */ -} - -/*ARGSUSED*/ -int -lkmioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) -{ - int i, error = 0; - struct lmc_resrv *resrvp; - struct lmc_loadbuf *loadbufp; - struct lmc_unload *unloadp; - struct lmc_stat *statp; - - switch(cmd) { - case LMRESERV: /* reserve pages for a module */ - if (kauth_authorize_system(l->l_cred, KAUTH_SYSTEM_LKM, - 0, (void *)cmd, NULL, NULL)) - return EPERM; - - if ((flag & FWRITE) == 0) /* only allow this if writing */ - return EPERM; - - resrvp = (struct lmc_resrv *)data; - - curp = lkmalloc(); - if (curp == NULL) { - error = ENOMEM; - break; - } - resrvp->slot = curp->id; /* return slot */ - - /* - * Get memory for module - */ - curp->size = resrvp->size; - curp->area = LKM_SPACE_ALLOC(curp->size, 1); - curp->offset = 0; /* load offset */ - - resrvp->addr = curp->area; /* ret kernel addr */ - - if (resrvp->sym_size) { - curp->sym_size = resrvp->sym_size; - curp->sym_symsize = resrvp->sym_symsize; - curp->syms = (u_long)LKM_SPACE_ALLOC(curp->sym_size, 0); - curp->sym_offset = 0; - resrvp->sym_addr = curp->syms; /* ret symbol addr */ - } else { - curp->sym_size = 0; - curp->syms = 0; - curp->sym_offset = 0; - resrvp->sym_addr = 0; - } - -#ifdef DEBUG - if (lkmdebug & LKMDB_INFO) { - printf("LKM: LMRESERV (actual = 0x%08lx)\n", - curp->area); - printf("LKM: LMRESERV (syms = 0x%08lx)\n", - curp->syms); - printf("LKM: LMRESERV (adjusted = 0x%08lx)\n", - trunc_page(curp->area)); - } -#endif /* DEBUG */ - lkm_state = LKMS_RESERVED; - break; - - case LMLOADBUF: /* Copy in; stateful, follows LMRESERV */ - if (kauth_authorize_system(l->l_cred, KAUTH_SYSTEM_LKM, - 0, (void *)cmd, NULL, NULL)) - return EPERM; - - if ((flag & FWRITE) == 0) /* only allow this if writing */ - return EPERM; - - loadbufp = (struct lmc_loadbuf *)data; - i = loadbufp->cnt; - if ((lkm_state != LKMS_RESERVED && lkm_state != LKMS_LOADING) - || i < 0 - || i > MODIOBUF - || i > curp->size - curp->offset) { - error = ENOMEM; - break; - } - - /* copy in buffer full of data */ - error = copyin(loadbufp->data, - (char *)curp->area + curp->offset, i); - if (error) - break; - -#ifdef PMAP_NEED_PROCWR - pmap_procwr(&proc0, curp->area + curp->offset, i); -#endif - if ((curp->offset + i) < curp->size) { - lkm_state = LKMS_LOADING; -#ifdef DEBUG - if (lkmdebug & LKMDB_LOAD) - printf("LKM: LMLOADBUF (loading @ %ld of %ld, i = %d)\n", - curp->offset, curp->size, i); -#endif /* DEBUG */ - } - curp->offset += i; - break; - - case LMLOADSYMS: /* Copy in; stateful, follows LMRESERV*/ - if ((flag & FWRITE) == 0) /* only allow this if writing */ - return EPERM; - - loadbufp = (struct lmc_loadbuf *)data; - i = loadbufp->cnt; - if ((lkm_state != LKMS_LOADING) - || i < 0 - || i > MODIOBUF - || i > curp->sym_size - curp->sym_offset) { - error = ENOMEM; - break; - } - - /* copy in buffer full of data*/ - if ((error = copyin(loadbufp->data, - (char *)(curp->syms) + curp->sym_offset, - i)) != 0) - break; - - if ((curp->sym_offset + i) < curp->sym_size) { - lkm_state = LKMS_LOADING; -#ifdef DEBUG - if (lkmdebug & LKMDB_LOAD) - printf( "LKM: LMLOADSYMS (loading @ %ld of %ld, i = %d)\n", - curp->sym_offset, curp->sym_size, i); -#endif /* DEBUG*/ - } - curp->sym_offset += i; - break; - - case LMUNRESRV: /* discard reserved pages for a module */ - if (kauth_authorize_system(l->l_cred, KAUTH_SYSTEM_LKM, - 0, (void *)cmd, NULL, NULL)) - return EPERM; - - if ((flag & FWRITE) == 0) /* only allow this if writing */ - return EPERM; - - lkmunreserve(0); /* coerce state to LKM_IDLE */ - if (curp != NULL) - lkmfree(); -#ifdef DEBUG - if (lkmdebug & LKMDB_INFO) - printf("LKM: LMUNRESERV\n"); -#endif /* DEBUG */ - break; - - case LMREADY: /* module loaded: call entry */ - if (kauth_authorize_system(l->l_cred, KAUTH_SYSTEM_LKM, - 0, (void *)cmd, NULL, NULL)) - return EPERM; - - if ((flag & FWRITE) == 0) /* only allow this if writing */ - return EPERM; - - if (lkm_state != LKMS_LOADING) { -#ifdef DEBUG - if (lkmdebug & LKMDB_INFO) - printf("lkm_state is %02x\n", lkm_state); -#endif /* DEBUG */ - return ENXIO; - } - - if (curp->size - curp->offset > 0) { - /* The remainder must be bss, so we clear it */ - memset((char *)curp->area + curp->offset, 0, - curp->size - curp->offset); - } - -#ifdef DDB - /* - * Temporarily load the symbol table before the entry - * routine is called, so that the symbols are available - * for DDB backtrace and breakpoints. - */ - if (curp->syms && curp->sym_offset >= curp->sym_size) { - error = ksyms_addsymtab("/lkmtemp/", - (char *)curp->syms, curp->sym_symsize, - (char *)curp->syms + curp->sym_symsize, - curp->sym_size - curp->sym_symsize); - - if (error) - goto rdyfail; - -#ifdef DEBUG - if (lkmdebug & LKMDB_INFO) - printf( "DDB symbols added!\n" ); -#endif - } -#endif /* DDB */ - - curp->entry = (int (*)(struct lkm_table *, int, int)) - (*((long *) (data))); - - /* call entry(load)... (assigns "private" portion) */ - error = (*(curp->entry))(curp, LKM_E_LOAD, LKM_VERSION); - - if (curp->syms && curp->sym_offset >= curp->sym_size) { -#ifdef DDB - ksyms_delsymtab("/lkmtemp/"); -#endif - - if (!error) { - error = ksyms_addsymtab(curp->private.lkm_any->lkm_name, - (char *)curp->syms, curp->sym_symsize, - (char *)curp->syms + curp->sym_symsize, - curp->sym_size - curp->sym_symsize); - } - } - - if (error) { -#ifdef DDB - rdyfail: -#endif - /* - * Module may refuse loading or may have a - * version mismatch... - */ - lkm_state = LKMS_UNLOADING; /* for lkmunreserve */ - lkmunreserve(0); /* free memory */ - lkmfree(); /* free slot */ -#ifdef DEBUG - if (lkmdebug & LKMDB_INFO) - printf("lkm entry point failed with error %d\n", - error); -#endif /* DEBUG */ - break; - } - curp->refcnt++; - -#ifdef DEBUG - if (lkmdebug & LKMDB_INFO) - printf("LKM: LMREADY\n"); -#endif /* DEBUG */ - lkm_state = LKMS_IDLE; - break; - - case LMUNLOAD: /* unload a module */ - if (kauth_authorize_system(l->l_cred, KAUTH_SYSTEM_LKM, - 0, (void *)cmd, NULL, NULL)) - return EPERM; - - if ((flag & FWRITE) == 0) /* only allow this if writing */ - return EPERM; - - unloadp = (struct lmc_unload *)data; - - curp = lkmlookup(unloadp->id, unloadp->name, 1, &error); - if (curp == NULL) - break; - - /* call entry(unload) */ - if ((*(curp->entry))(curp, LKM_E_UNLOAD, LKM_VERSION)) { - error = EBUSY; - break; - } - - lkm_state = LKMS_UNLOADING; /* non-idle for lkmunreserve */ - lkmunreserve(1); /* free memory */ - lkmfree(); /* free slot */ - break; - - case LMSTAT: /* stat a module by id/name */ - /* allow readers and writers to stat */ - - statp = (struct lmc_stat *)data; - - if ((curp = lkmlookup(statp->id, statp->name, 0, &error)) == NULL) - break; - - if ((error = (*curp->entry)(curp, LKM_E_STAT, LKM_VERSION))) - break; - - /* - * Copy out stat information for this module... - */ - statp->id = curp->id; - statp->offset = curp->private.lkm_any->lkm_offset; - statp->type = curp->private.lkm_any->lkm_type; - statp->area = curp->area; - statp->size = curp->size / 1024; - statp->private = (unsigned long)curp->private.lkm_any; - statp->ver = LKM_VERSION; - copystr(curp->private.lkm_any->lkm_name, - statp->name, - MAXLKMNAME - 2, - (size_t *)0); - - break; - -#ifdef LMFORCE - case LMFORCE: /* stateful, optionally follows LMRESERV */ - if (kauth_authorize_system(l->l_cred, KAUTH_SYSTEM_LKM, - 0, (void *)cmd, NULL, NULL)) - return EPERM; - - if ((flag & FWRITE) == 0) /* only allow this if writing */ - return EPERM; - - if (lkm_state != LKMS_RESERVED) { - error = EPERM; - break; - } - - curp->forced = (*(u_long *)data != 0); - break; -#endif /* LMFORCE */ - - default: /* bad ioctl()... */ - error = ENOTTY; - break; - } - - return (error); -} - -/* - * Acts like "nosys" but can be identified in sysent for dynamic call - * number assignment for a limited number of calls. - * - * Place holder for system call slots reserved for loadable modules. - */ -int -sys_lkmnosys(struct lwp *l, const void *v, register_t *retval) -{ - - return (sys_nosys(l, v, retval)); -} - -/* - * A placeholder function for load/unload/stat calls; simply returns zero. - * Used where people don't want to specify a special function. - */ -int -lkm_nofunc(struct lkm_table *lkmtp, int cmd) -{ - - return (0); -} - -int -lkmexists(struct lkm_table *lkmtp) -{ - struct lkm_table *p; - - /* see if name exists... */ - TAILQ_FOREACH(p, &lkmods, link) { - if (strcmp(lkmtp->private.lkm_any->lkm_name, - p->private.lkm_any->lkm_name) == 0 && (p->refcnt != 0)) - return (1); /* already loaded... */ - } - - return (0); /* module not loaded... */ -} - -/* - * For the loadable system call described by the structure pointed to - * by lkmtp, load/unload/stat it depending on the cmd requested. - */ -static int -_lkm_syscall(struct lkm_table *lkmtp, int cmd) -{ - struct lkm_syscall *args = lkmtp->private.lkm_syscall; - int i; - int error = 0; - - switch(cmd) { - case LKM_E_LOAD: - /* don't load twice! */ - if (lkmexists(lkmtp)) - return (EEXIST); - - if ((i = args->mod.lkm_offset) == -1) { /* auto */ - /* - * Search the table looking for a slot... - */ - for (i = 0; i < SYS_MAXSYSCALL; i++) - if (sysent[i].sy_call == sys_lkmnosys) - break; /* found it! */ - /* out of allocable slots? */ - if (i == SYS_MAXSYSCALL) { - error = ENFILE; - break; - } - } else { /* assign */ - if (i < 0 || i >= SYS_MAXSYSCALL) { - error = EINVAL; - break; - } - } - - /* save old */ - memcpy(&args->lkm_oldent, &sysent[i], sizeof(struct sysent)); - - /* replace with new */ - memcpy(&sysent[i], args->lkm_sysent, sizeof(struct sysent)); - - /* done! */ - args->mod.lkm_offset = i; /* slot in sysent[] */ - - break; - - case LKM_E_UNLOAD: - /* current slot... */ - i = args->mod.lkm_offset; - - /* replace current slot contents with old contents */ - memcpy(&sysent[i], &args->lkm_oldent, sizeof(struct sysent)); - - break; - - case LKM_E_STAT: /* no special handling... */ - break; - } - - return (error); -} - -/* - * For the loadable virtual file system described by the structure pointed - * to by lkmtp, load/unload/stat it depending on the cmd requested. - */ -static int -_lkm_vfs(struct lkm_table *lkmtp, int cmd) -{ - struct lkm_vfs *args = lkmtp->private.lkm_vfs; - int error = 0; - - switch(cmd) { - case LKM_E_LOAD: - /* don't load twice! */ - if (lkmexists(lkmtp)) - return (EEXIST); - - /* Establish the file system. */ - if ((error = vfs_attach(args->lkm_vfsops)) != 0) - return (error); - - /* done! */ - break; - - case LKM_E_UNLOAD: - /* Disestablish the file system. */ - if ((error = vfs_detach(args->lkm_vfsops)) != 0) - return (error); - break; - - case LKM_E_STAT: /* no special handling... */ - break; - } - - return (error); -} - -/* - * For the loadable device driver described by the structure pointed to - * by lkmtp, load/unload/stat it depending on the cmd requested. - */ -static int -_lkm_dev(struct lkm_table *lkmtp, int cmd) -{ - struct lkm_dev *args = lkmtp->private.lkm_dev; - int error; - - switch(cmd) { - case LKM_E_LOAD: - /* don't load twice! */ - if (lkmexists(lkmtp)) - return (EEXIST); - - error = devsw_attach(args->lkm_devname, - args->lkm_bdev, &args->lkm_bdevmaj, - args->lkm_cdev, &args->lkm_cdevmaj); - if (error != 0) - return (error); - - args->mod.lkm_offset = - LKM_MAKEMAJOR(args->lkm_bdevmaj, args->lkm_cdevmaj); - break; - - case LKM_E_UNLOAD: - devsw_detach(args->lkm_bdev, args->lkm_cdev); - args->lkm_bdevmaj = -1; - args->lkm_cdevmaj = -1; - break; - - case LKM_E_STAT: /* no special handling... */ - break; - } - - return (0); -} - -#ifdef STREAMS -/* - * For the loadable streams module described by the structure pointed to - * by lkmtp, load/unload/stat it depending on the cmd requested. - */ -static int -_lkm_strmod(struct lkm_table *lkmtp, int cmd) -{ - struct lkm_strmod *args = lkmtp->private.lkm_strmod; - int i; - int error = 0; - - switch(cmd) { - case LKM_E_LOAD: - /* don't load twice! */ - if (lkmexists(lkmtp)) - return (EEXIST); - break; - - case LKM_E_UNLOAD: - break; - - case LKM_E_STAT: /* no special handling... */ - break; - } - - return (error); -} -#endif /* STREAMS */ - -/* - * For the loadable execution class described by the structure pointed to - * by lkmtp, load/unload/stat it depending on the cmd requested. - */ -static int -_lkm_exec(struct lkm_table *lkmtp, int cmd) -{ - struct lkm_exec *args = lkmtp->private.lkm_exec; - int error = 0; - - switch(cmd) { - case LKM_E_LOAD: - /* don't load twice! */ - if (lkmexists(lkmtp)) - return (EEXIST); - - /* this would also fill in the emulation pointer in - * args->lkm_execsw */ - error = exec_add(args->lkm_execsw, args->lkm_emul); - break; - - case LKM_E_UNLOAD: - error = exec_remove(args->lkm_execsw); - break; - - case LKM_E_STAT: /* no special handling... */ - break; - } - - return (error); -} - -/* - * For the loadable compat/emulation class described by the structure pointed to - * by lkmtp, load/unload/stat it depending on the cmd requested. - */ -static int -_lkm_compat(struct lkm_table *lkmtp, int cmd) -{ - struct lkm_compat *args = lkmtp->private.lkm_compat; - int error = 0; - - switch(cmd) { - case LKM_E_LOAD: - /* don't load twice! */ - if (lkmexists(lkmtp)) - return (EEXIST); - - error = emul_register(args->lkm_compat, 0); - break; - - case LKM_E_UNLOAD: - error = emul_unregister(args->lkm_compat->e_name); - break; - - case LKM_E_STAT: /* no special handling... */ - break; - } - - return (error); -} - -static int -drvlkm_load(struct cfdriver **cd, const struct cfattachlkminit *cai, - struct cfdata *cf) -{ - const struct cfattachlkminit *cfai; - int i, error, j; - - for (i = 0; cd[i]; i++) { - error = config_cfdriver_attach(cd[i]); - if (!error) - continue; - if (error != EEXIST) { - printf("%s: unable to register driver\n", - cd[i]->cd_name); - /* XXX roll back previous attachments */ - goto out; - } - printf("driver %s already present\n", cd[i]->cd_name); - /* - * get existing drivers out of the list so we won't try - * to detach them - */ - for (j = i; cd[j]; j++) - cd[j] = cd[j + 1]; - i--; /* continue at same index */ - } - - for (cfai = cai; cfai->cfai_name; cfai++) { - for (i = 0; cfai->cfai_list[i]; i++) { - error = config_cfattach_attach(cfai->cfai_name, - cfai->cfai_list[i]); - if (!error) - continue; - if (error != EEXIST) { - printf("%s: unable to register cfattach\n", - cfai->cfai_list[i]->ca_name); - /* XXX roll back previous attachments */ - goto out; - } - printf("driver attachment %s for %s already present\n", - cfai->cfai_list[i]->ca_name, cfai->cfai_name); - /* - * get existing attachments out of the list so we - * won't try to detach them - */ - for (j = i; cfai->cfai_list[j]; j++) - cfai->cfai_list[j] = cfai->cfai_list[j + 1]; - i--; /* continue at same index */ - } - } - - error = config_cfdata_attach(cf, 1); - /* XXX roll back cfdriver / cfattach attachments in error case */ - -out: - return (error); -} - -static int -drvlkm_unload(struct cfdriver **cd, const struct cfattachlkminit *cai, - struct cfdata *cf) -{ - const struct cfattachlkminit *cfai; - int i, error; - - error = config_cfdata_detach(cf); - if (error) - return (error); - - for (cfai = cai; cfai->cfai_name; cfai++) { - for (i = 0; cfai->cfai_list[i]; i++) { - error = config_cfattach_detach(cfai->cfai_name, - cfai->cfai_list[i]); - if (error) { - printf("%s: unable to deregister cfattach\n", - cfai->cfai_list[i]->ca_name); - return (error); - } - } - } - - for (i = 0; cd[i]; i++) { - error = config_cfdriver_detach(cd[i]); - if (error) { - printf("%s: unable to deregister cfdriver\n", - cd[i]->cd_name); - return (error); - } - } - - return (0); -} - -static int -_lkm_drv(struct lkm_table *lkmtp, int cmd) -{ - struct lkm_drv *args = lkmtp->private.lkm_drv; - int error = 0; - - switch(cmd) { - case LKM_E_LOAD: - /* don't load twice! */ - if (lkmexists(lkmtp)) - return (EEXIST); - - error = drvlkm_load(args->lkm_cd, - args->lkm_cai, - args->lkm_cf); - break; - - case LKM_E_UNLOAD: - error = drvlkm_unload(args->lkm_cd, - args->lkm_cai, - args->lkm_cf); - break; - - case LKM_E_STAT: /* no special handling... */ - break; - } - - return (error); -} - -/* - * This code handles the per-module type "wiring-in" of loadable modules - * into existing kernel tables. For "LM_MISC" modules, wiring and unwiring - * is assumed to be done in their entry routines internal to the module - * itself. - */ -int -lkmdispatch(struct lkm_table *lkmtp, int cmd) -{ - int error = 0; /* default = success */ -#ifdef DEBUG - if (lkmdebug & LKMDB_INFO) - printf( "lkmdispatch: %p %d\n", lkmtp, cmd ); -#endif - - /* If loading, check the LKM is compatible */ - if (cmd == LKM_E_LOAD) { - if (_lkm_checkver(lkmtp)) - return (EPROGMISMATCH); - } - - switch(lkmtp->private.lkm_any->lkm_type) { - case LM_SYSCALL: - error = _lkm_syscall(lkmtp, cmd); - break; - - case LM_VFS: - error = _lkm_vfs(lkmtp, cmd); - break; - - case LM_DEV: - error = _lkm_dev(lkmtp, cmd); - break; - -#ifdef STREAMS - case LM_STRMOD: - { - struct lkm_strmod *args = lkmtp->private.lkm_strmod; - } - break; - -#endif /* STREAMS */ - - case LM_EXEC: - error = _lkm_exec(lkmtp, cmd); - break; - - case LM_COMPAT: - error = _lkm_compat(lkmtp, cmd); - break; - - case LM_MISC: /* ignore content -- no "misc-specific" procedure */ - break; - - case LM_DRV: - error = _lkm_drv(lkmtp, cmd); - break; - - default: - error = ENXIO; /* unknown type */ - break; - } - - return (error); -} - -/* - * Check LKM version against current kernel. - */ -static int -_lkm_checkver(struct lkm_table *lkmtp) -{ - struct lkm_any *mod = lkmtp->private.lkm_any; - - if (mod->lkm_modver != LKM_VERSION) { - printf("LKM '%s': LKM version mismatch - LKM %d, kernel %d\n", - mod->lkm_name, mod->lkm_modver, LKM_VERSION); - return (1); - } - - if (lkmtp->forced) { - printf("LKM '%s': forced load, skipping compatibility checks\n", - mod->lkm_name); - return (0); - } - - if (mod->lkm_sysver != __NetBSD_Version__) { - printf("LKM '%s': kernel version mismatch - LKM %d, kernel %d\n", - mod->lkm_name, mod->lkm_sysver, __NetBSD_Version__); - return (2); - } - - /* - * Following might eventually be changed to take into account envdep, - * if it's non-NULL. - */ - if (strcmp(mod->lkm_envver, _LKM_ENV_VERSION) != 0) { - const char *kenv = _LKM_ENV_VERSION; - const char *envver = mod->lkm_envver; - - if (kenv[0] == ',') - kenv++; - if (envver[0] == ',') - envver++; - - printf("LKM '%s': environment compile options mismatch - LKM '%s', kernel '%s'\n", - mod->lkm_name, envver, kenv); - return (3); - } - - /* - * Basic parameters match, LKM is hopefully compatible. - * Cross fingers and approve. - */ - return (0); -} diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 30fb4cb90d6..fa3f84a8cf6 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_lock.c,v 1.146 2008/07/02 14:47:34 matt Exp $ */ +/* $NetBSD: kern_lock.c,v 1.147 2008/11/12 12:36:16 ad Exp $ */ /*- * Copyright (c) 2002, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.146 2008/07/02 14:47:34 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.147 2008/11/12 12:36:16 ad Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -55,7 +55,6 @@ bool kernel_lock_dodebug; __cpu_simple_lock_t kernel_lock[CACHE_LINE_SIZE / sizeof(__cpu_simple_lock_t)] __aligned(CACHE_LINE_SIZE); -#if defined(DEBUG) || defined(LKM) void assert_sleepable(void) { @@ -83,7 +82,6 @@ assert_sleepable(void) (void *)RETURN_ADDRESS); } } -#endif /* defined(DEBUG) || defined(LKM) */ /* * Functions for manipulating the kernel_lock. We put them here diff --git a/sys/kern/kern_module.c b/sys/kern/kern_module.c index a0def37ffbb..d334eb9f688 100644 --- a/sys/kern/kern_module.c +++ b/sys/kern/kern_module.c @@ -1,9 +1,12 @@ -/* $NetBSD: kern_module.c,v 1.24 2008/10/22 11:19:15 ad Exp $ */ +/* $NetBSD: kern_module.c,v 1.25 2008/11/12 12:36:16 ad Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * + * This code is derived from software developed for The NetBSD Foundation + * by Andrew Doran. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,10 +33,8 @@ * Kernel module support. */ -#include "opt_modular.h" - #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.24 2008/10/22 11:19:15 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.25 2008/11/12 12:36:16 ad Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -49,9 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.24 2008/10/22 11:19:15 ad Exp $"); #include <machine/stdarg.h> -#ifndef LKM /* XXX */ -struct vm_map *lkm_map; -#endif +struct vm_map *module_map; struct modlist module_list = TAILQ_HEAD_INITIALIZER(module_list); struct modlist module_bootlist = TAILQ_HEAD_INITIALIZER(module_bootlist); @@ -97,10 +96,11 @@ module_error(const char *fmt, ...) void module_init(void) { - extern struct vm_map *lkm_map; + extern struct vm_map *module_map; - if (lkm_map == NULL) - lkm_map = kernel_map; + if (module_map == NULL) { + module_map = kernel_map; + } mutex_init(&module_lock, MUTEX_DEFAULT, IPL_NONE); #ifdef MODULAR /* XXX */ module_init_md(); diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index d9ce9391f78..b381c04d662 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sysctl.c,v 1.218 2008/10/23 20:41:14 christos Exp $ */ +/* $NetBSD: kern_sysctl.c,v 1.219 2008/11/12 12:36:16 ad Exp $ */ /*- * Copyright (c) 2003, 2007, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.218 2008/10/23 20:41:14 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.219 2008/11/12 12:36:16 ad Exp $"); #include "opt_defcorename.h" #include "ksyms.h" @@ -1994,7 +1994,7 @@ sysctl_createv(struct sysctllog **log, int cflags, * initialize lock state -- we need locks if the main tree has * been marked as complete, but since we could be called from * either there, or from a device driver (say, at device - * insertion), or from an lkm (at lkm load time, say), we + * insertion), or from a module (at module load time, say), we * don't really want to "wait"... */ sysctl_lock(true); diff --git a/sys/kern/subr_autoconf.c b/sys/kern/subr_autoconf.c index f9a87cd8016..202b0b463c1 100644 --- a/sys/kern/subr_autoconf.c +++ b/sys/kern/subr_autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.163 2008/09/07 22:36:36 cube Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.164 2008/11/12 12:36:16 ad Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.163 2008/09/07 22:36:36 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.164 2008/11/12 12:36:16 ad Exp $"); #include "opt_ddb.h" #include "drvctl.h" @@ -800,7 +800,7 @@ rescan_with_cfdata(const struct cfdata *cf) /* - * "alldevs" is likely longer than an LKM's cfdata, so make it + * "alldevs" is likely longer than a modules's cfdata, so make it * the outer loop. */ for (d = deviter_first(&di, 0); d != NULL; d = deviter_next(&di)) { diff --git a/sys/kern/subr_kobj.c b/sys/kern/subr_kobj.c index 31a70be8414..ecb5b626226 100644 --- a/sys/kern/subr_kobj.c +++ b/sys/kern/subr_kobj.c @@ -1,9 +1,12 @@ -/* $NetBSD: subr_kobj.c,v 1.24 2008/10/20 20:07:35 ad Exp $ */ +/* $NetBSD: subr_kobj.c,v 1.25 2008/11/12 12:36:16 ad Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * + * This code is derived from software developed for The NetBSD Foundation + * by Andrew Doran. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -59,10 +62,8 @@ * TODO: adjust kmem_alloc() calls to avoid needless fragmentation. */ -#include "opt_modular.h" - #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: subr_kobj.c,v 1.24 2008/10/20 20:07:35 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_kobj.c,v 1.25 2008/11/12 12:36:16 ad Exp $"); #define ELFSIZE ARCH_ELFSIZE @@ -80,7 +81,7 @@ __KERNEL_RCSID(0, "$NetBSD: subr_kobj.c,v 1.24 2008/10/20 20:07:35 ad Exp $"); #include <sys/vnode.h> #include <sys/fcntl.h> #include <sys/ksyms.h> -#include <sys/lkm.h> +#include <sys/module.h> #include <sys/exec.h> #include <sys/exec_elf.h> @@ -88,7 +89,6 @@ __KERNEL_RCSID(0, "$NetBSD: subr_kobj.c,v 1.24 2008/10/20 20:07:35 ad Exp $"); #include <uvm/uvm_extern.h> - typedef struct { void *addr; Elf_Off size; @@ -118,7 +118,7 @@ typedef enum kobjtype { } kobjtype_t; struct kobj { - char ko_name[MAXLKMNAME]; + char ko_name[MAXMODNAME]; kobjtype_t ko_type; void *ko_source; ssize_t ko_memsize; @@ -152,7 +152,7 @@ static void kobj_free(kobj_t, void *, size_t); static void kobj_close(kobj_t); static int kobj_load(kobj_t); -extern struct vm_map *lkm_map; +extern struct vm_map *module_map; /* * kobj_load_file: @@ -503,7 +503,7 @@ kobj_load(kobj_t ko) if (ko->ko_type == KT_MEMORY) { mapbase += (vaddr_t)ko->ko_source; } else { - mapbase = uvm_km_alloc(lkm_map, round_page(mapsize), + mapbase = uvm_km_alloc(module_map, round_page(mapsize), 0, UVM_KMF_WIRED | UVM_KMF_EXEC); if (mapbase == 0) { error = ENOMEM; @@ -674,7 +674,7 @@ kobj_unload(kobj_t ko) } } if (ko->ko_address != 0 && ko->ko_type != KT_MEMORY) { - uvm_km_free(lkm_map, ko->ko_address, round_page(ko->ko_size), + uvm_km_free(module_map, ko->ko_address, round_page(ko->ko_size), UVM_KMF_WIRED); } if (ko->ko_ksyms == true) { @@ -737,7 +737,8 @@ kobj_affix(kobj_t ko, const char *name) /* * Now that we know the name, register the symbol table. - * Do after global relocations because ksyms will pack it. + * Do after global relocations because ksyms will pack + * the table. */ ksyms_modload(ko->ko_name, ko->ko_symtab, ko->ko_symcnt * sizeof(Elf_Sym), ko->ko_strtab, ko->ko_strtabsz); diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index d39ab082b66..8032fcf244f 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -1,4 +1,4 @@ -/* $NetBSD: syscalls.c,v 1.220 2008/10/16 20:12:23 wrstuden Exp $ */ +/* $NetBSD: syscalls.c,v 1.221 2008/11/12 12:36:16 ad Exp $ */ /* * System call names. @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: syscalls.c,v 1.220 2008/10/16 20:12:23 wrstuden Exp $"); +__KERNEL_RCSID(0, "$NetBSD: syscalls.c,v 1.221 2008/11/12 12:36:16 ad Exp $"); #if defined(_KERNEL_OPT) #include "opt_nfsserver.h" @@ -277,29 +277,16 @@ const char *const syscallnames[] = { /* 207 */ "getpgid", /* 208 */ "reboot", /* 209 */ "poll", -#if defined(LKM) || !defined(_KERNEL) - /* 210 */ "lkmnosys", - /* 211 */ "lkmnosys", - /* 212 */ "lkmnosys", - /* 213 */ "lkmnosys", - /* 214 */ "lkmnosys", - /* 215 */ "lkmnosys", - /* 216 */ "lkmnosys", - /* 217 */ "lkmnosys", - /* 218 */ "lkmnosys", - /* 219 */ "lkmnosys", -#else /* !LKM */ - /* 210 */ "#210 (excluded lkmnosys)", - /* 211 */ "#211 (excluded lkmnosys)", - /* 212 */ "#212 (excluded lkmnosys)", - /* 213 */ "#213 (excluded lkmnosys)", - /* 214 */ "#214 (excluded lkmnosys)", - /* 215 */ "#215 (excluded lkmnosys)", - /* 216 */ "#216 (excluded lkmnosys)", - /* 217 */ "#217 (excluded lkmnosys)", - /* 218 */ "#218 (excluded lkmnosys)", - /* 219 */ "#219 (excluded lkmnosys)", -#endif /* !LKM */ + /* 210 */ "#210 (unimplemented)", + /* 211 */ "#211 (unimplemented)", + /* 212 */ "#212 (unimplemented)", + /* 213 */ "#213 (unimplemented)", + /* 214 */ "#214 (unimplemented)", + /* 215 */ "#215 (unimplemented)", + /* 216 */ "#216 (unimplemented)", + /* 217 */ "#217 (unimplemented)", + /* 218 */ "#218 (unimplemented)", + /* 219 */ "#219 (unimplemented)", #if defined(SYSVSEM) || !defined(_KERNEL) /* 220 */ "compat_14___semctl", /* 221 */ "semget", diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 5d1b251a71e..b81b61701d9 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.211 2008/10/16 19:30:49 pooka Exp $ + $NetBSD: syscalls.master,v 1.212 2008/11/12 12:36:16 ad Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -426,29 +426,16 @@ ; ; Syscalls 210-219 are reserved for dynamically loaded syscalls ; -#if defined(LKM) || !defined(_KERNEL) -210 NODEF { int sys_lkmnosys(void); } -211 NODEF { int sys_lkmnosys(void); } -212 NODEF { int sys_lkmnosys(void); } -213 NODEF { int sys_lkmnosys(void); } -214 NODEF { int sys_lkmnosys(void); } -215 NODEF { int sys_lkmnosys(void); } -216 NODEF { int sys_lkmnosys(void); } -217 NODEF { int sys_lkmnosys(void); } -218 NODEF { int sys_lkmnosys(void); } -219 NODEF { int sys_lkmnosys(void); } -#else /* !LKM */ -210 EXCL lkmnosys -211 EXCL lkmnosys -212 EXCL lkmnosys -213 EXCL lkmnosys -214 EXCL lkmnosys -215 EXCL lkmnosys -216 EXCL lkmnosys -217 EXCL lkmnosys -218 EXCL lkmnosys -219 EXCL lkmnosys -#endif /* !LKM */ +210 UNIMPL +211 UNIMPL +212 UNIMPL +213 UNIMPL +214 UNIMPL +215 UNIMPL +216 UNIMPL +217 UNIMPL +218 UNIMPL +219 UNIMPL ; System calls 220-300 are reserved for use by NetBSD #if defined(SYSVSEM) || !defined(_KERNEL) 220 COMPAT_14 { int sys___semctl(int semid, int semnum, int cmd, \ diff --git a/sys/kern/uipc_accf.c b/sys/kern/uipc_accf.c index 3ce0d54bfb2..5aa9501ca5d 100644 --- a/sys/kern/uipc_accf.c +++ b/sys/kern/uipc_accf.c @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_accf.c,v 1.6 2008/10/15 08:25:28 ad Exp $ */ +/* $NetBSD: uipc_accf.c,v 1.7 2008/11/12 12:36:16 ad Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uipc_accf.c,v 1.6 2008/10/15 08:25:28 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_accf.c,v 1.7 2008/11/12 12:36:16 ad Exp $"); #define ACCEPT_FILTER_MOD @@ -69,7 +69,6 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_accf.c,v 1.6 2008/10/15 08:25:28 ad Exp $"); #include <sys/lock.h> #include <sys/kmem.h> #include <sys/mbuf.h> -#include <sys/lkm.h> #include <sys/rwlock.h> #include <sys/protosw.h> #include <sys/sysctl.h> @@ -113,6 +112,8 @@ accept_filt_add(struct accept_filter *filt) { struct accept_filter *p; + accept_filter_init(); + rw_enter(&accept_filter_lock, RW_WRITER); LIST_FOREACH(p, &accept_filtlsthd, accf_next) { if (strcmp(p->accf_name, filt->accf_name) == 0) { @@ -186,34 +187,6 @@ accept_filter_init(void) } int -accept_filt_generic_mod_event(struct lkm_table *lkmtp, int event, void *data) -{ - struct accept_filter *accfp = (struct accept_filter *) data; - int error; - - switch (event) { - case LKM_E_LOAD: - accept_filter_init(); - error = accept_filt_add(accfp); - break; - - case LKM_E_UNLOAD: - error = accept_filt_del(accfp); - break; - - case LKM_E_STAT: - error = 0; - break; - - default: - error = EOPNOTSUPP; - break; - } - - return error; -} - -int accept_filt_getopt(struct socket *so, struct sockopt *sopt) { struct accept_filter_arg afa; diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index f9820b5bfed..c5e1bc86152 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.c,v 1.376 2008/10/22 11:16:29 ad Exp $ */ +/* $NetBSD: vfs_syscalls.c,v 1.377 2008/11/12 12:36:16 ad Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.376 2008/10/22 11:16:29 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.377 2008/11/12 12:36:16 ad Exp $"); #include "opt_compat_netbsd.h" #include "opt_compat_43.h" @@ -523,7 +523,6 @@ do_sys_mount(struct lwp *l, struct vfsops *vfsops, const char *type, /* No length supplied, use default for filesystem */ data_len = vfsops->vfs_min_mount_data; if (data_len > VFS_MAX_MOUNT_DATA) { - /* maybe a force loaded old LKM */ error = EINVAL; goto done; } diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index d27a0115b6d..1fb0d1365cc 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_vnops.c,v 1.160 2008/08/27 06:28:09 christos Exp $ */ +/* $NetBSD: vfs_vnops.c,v 1.161 2008/11/12 12:36:16 ad Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -37,9 +37,8 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.160 2008/08/27 06:28:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.161 2008/11/12 12:36:16 ad Exp $"); -#include "fs_union.h" #include "veriexec.h" #include <sys/param.h> @@ -72,9 +71,7 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.160 2008/08/27 06:28:09 christos Exp #include <fs/union/union.h> #endif -#if defined(LKM) || defined(UNION) int (*vn_union_readdir_hook) (struct vnode **, struct file *, struct lwp *); -#endif #include <sys/verified_exec.h> @@ -403,7 +400,6 @@ unionread: if (error) return (error); -#if defined(UNION) || defined(LKM) if (count == auio.uio_resid && vn_union_readdir_hook) { struct vnode *ovp = vp; @@ -413,7 +409,6 @@ unionread: if (vp != ovp) goto unionread; } -#endif /* UNION || LKM */ if (count == auio.uio_resid && (vp->v_vflag & VV_ROOT) && (vp->v_mount->mnt_flag & MNT_UNION)) { diff --git a/sys/lkm/Makefile b/sys/lkm/Makefile deleted file mode 100644 index 275bc65d054..00000000000 --- a/sys/lkm/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile,v 1.9 2005/12/11 12:24:46 christos Exp $ - -SUBDIR= arch compat dev exec misc net netinet syscall vfs - -.include <bsd.subdir.mk> diff --git a/sys/lkm/Makefile.inc b/sys/lkm/Makefile.inc deleted file mode 100644 index eaa73f35040..00000000000 --- a/sys/lkm/Makefile.inc +++ /dev/null @@ -1,16 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.14 2007/05/28 12:06:24 tls Exp $ - -.if !defined(__SYS_LKM_MAKEFILE_INC) -__SYS_LKM_MAKEFILE_INC= 1 - -NOMAN= # defined - - -.include <bsd.own.mk> - -CPPFLAGS+=-I${NETBSDSRCDIR}/common/include -USE_FORT = no - -WARNS?= 1 - -.endif # __SYS_LKM_MAKEFILE_INC diff --git a/sys/lkm/TODO b/sys/lkm/TODO deleted file mode 100644 index b06aa267780..00000000000 --- a/sys/lkm/TODO +++ /dev/null @@ -1,17 +0,0 @@ -$NetBSD: TODO,v 1.8 2003/05/03 18:11:43 wiz Exp $ - -Always a lot to do. :) - -o Learn how loadable devices can configure themselves, like the interrupt, - DMA, probing, attaching, etc. Then start adding some of those to the - lkm tree. - -o Test compat and exec modules on more platforms, make necessary MD - changes to sys/arch/ or sys/compat/ code to make those modules actually - usable. - -o decide if it is even useful to make ffs into a loadable module. - [for diskless boots, sure, why not] - -o what about nfs? Server and client should both be loadable I suppose. - [good luck...] diff --git a/sys/lkm/arch/Makefile b/sys/lkm/arch/Makefile deleted file mode 100644 index 36c33cd6db8..00000000000 --- a/sys/lkm/arch/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# $NetBSD: Makefile,v 1.1 1999/03/26 22:31:19 scottr Exp $ - -.if exists(${MACHINE}) -SUBDIR+= ${MACHINE} -.endif - -.include <bsd.subdir.mk> diff --git a/sys/lkm/arch/Makefile.inc b/sys/lkm/arch/Makefile.inc deleted file mode 100644 index e790d829ab0..00000000000 --- a/sys/lkm/arch/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.1 1999/03/26 22:31:19 scottr Exp $ - -S!= cd ${.CURDIR}/../../..;pwd - -.include "../Makefile.inc" diff --git a/sys/lkm/arch/arm/lkmhide.awk b/sys/lkm/arch/arm/lkmhide.awk deleted file mode 100644 index 4375d965d77..00000000000 --- a/sys/lkm/arch/arm/lkmhide.awk +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: lkmhide.awk,v 1.2 2005/12/11 12:24:46 christos Exp $ - -substr($NF, 1, 7) == "__wrap_" { - print " --localize-symbol "$NF; -} diff --git a/sys/lkm/arch/arm/lkmtramp.awk b/sys/lkm/arch/arm/lkmtramp.awk deleted file mode 100644 index 188017598aa..00000000000 --- a/sys/lkm/arch/arm/lkmtramp.awk +++ /dev/null @@ -1,16 +0,0 @@ -# $NetBSD: lkmtramp.awk,v 1.2 2005/12/11 12:24:46 christos Exp $ -# -BEGIN { - print "#include <machine/asm.h>" -} - -$2 == "R_ARM_PC24" { - if (x[$3] != "") - next; - if ($3 == "\.text") - next; - print "ENTRY(__wrap_"$3")" - print "\tldr\tpc,1f" - print "1:\t.word\t__real_"$3 - x[$3]="."; -} diff --git a/sys/lkm/arch/arm/lkmwrap.awk b/sys/lkm/arch/arm/lkmwrap.awk deleted file mode 100644 index ca7842517e5..00000000000 --- a/sys/lkm/arch/arm/lkmwrap.awk +++ /dev/null @@ -1,10 +0,0 @@ -# $NetBSD: lkmwrap.awk,v 1.2 2005/12/11 12:24:46 christos Exp $ - -$2 == "R_ARM_PC24" { - if (x[$3] != "") - next; - if ($3 == "\.text") - next - printf " --wrap "$3; - x[$3]="."; -} diff --git a/sys/lkm/arch/hppa/lkmhide.awk b/sys/lkm/arch/hppa/lkmhide.awk deleted file mode 100644 index 604ed924811..00000000000 --- a/sys/lkm/arch/hppa/lkmhide.awk +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: lkmhide.awk,v 1.1 2008/03/01 12:40:08 skrll Exp $ - -substr($NF, 1, 7) == "__wrap_" { - print " --localize-symbol "$NF; -} diff --git a/sys/lkm/arch/hppa/lkmtramp.awk b/sys/lkm/arch/hppa/lkmtramp.awk deleted file mode 100644 index d5e0dacb0be..00000000000 --- a/sys/lkm/arch/hppa/lkmtramp.awk +++ /dev/null @@ -1,21 +0,0 @@ -# $NetBSD: lkmtramp.awk,v 1.1 2008/03/01 12:40:08 skrll Exp $ -# -BEGIN { - print "#include <machine/asm.h>" -} - -$2 == "R_PARISC_PCREL17F" { - if (x[$3] != "") - next; - if ($3 == "\.text") - next; - print "LEAF_ENTRY(__wrap_"$3")" - - print "\tldil\tL%__real_"$3",%r1" - print "\tldo\tR%__real_"$3"(%r1),%r1" - print "\tbv,n\t%r0(%r1)" - print "\tnop" - - print "EXIT(__wrap_"$3")" - x[$3]="."; -} diff --git a/sys/lkm/arch/hppa/lkmwrap.awk b/sys/lkm/arch/hppa/lkmwrap.awk deleted file mode 100644 index bec60ca52f9..00000000000 --- a/sys/lkm/arch/hppa/lkmwrap.awk +++ /dev/null @@ -1,10 +0,0 @@ -# $NetBSD: lkmwrap.awk,v 1.1 2008/03/01 12:40:08 skrll Exp $ - -$2 == "R_PARISC_PCREL17F" { - if (x[$3] != "") - next; - if ($3 == "\.text") - next - printf " --wrap "$3; - x[$3]="."; -} diff --git a/sys/lkm/arch/i386/Makefile b/sys/lkm/arch/i386/Makefile deleted file mode 100644 index 27b17278d44..00000000000 --- a/sys/lkm/arch/i386/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile,v 1.1 2006/01/11 00:18:29 xtraeme Exp $ - -SUBDIR= powernow - -.include <bsd.subdir.mk> diff --git a/sys/lkm/arch/i386/Makefile.inc b/sys/lkm/arch/i386/Makefile.inc deleted file mode 100644 index 23775bda34d..00000000000 --- a/sys/lkm/arch/i386/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.1 2006/01/11 00:18:29 xtraeme Exp $ - -S!= cd ${.CURDIR}/../../../..;pwd - -.include "../../Makefile.inc" diff --git a/sys/lkm/arch/i386/powernow/Makefile b/sys/lkm/arch/i386/powernow/Makefile deleted file mode 100644 index 5a19c88bd6b..00000000000 --- a/sys/lkm/arch/i386/powernow/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# $NetBSD: Makefile,v 1.3 2006/08/27 10:10:55 xtraeme Exp $ -# -# Makefile for loadable AMD PowerNow K[78] device driver kernel module -# - -.include "../Makefile.inc" - -.PATH: $S/arch/x86/x86 -.PATH: $S/arch/i386/i386 - -CFILES= lkminit_powernow.c powernow_common.c powernow_k7.c \ - powernow_k8.c -SRCS= ${CFILES} - -WARNS= 3 - -KMOD= powernow -MAN= - -# Enable this one to show debug output -# CPPFLAGS+= -DPOWERNOW_DEBUG - -CLEANFILES+= *~ ${KMOD} - -.include <bsd.kmod.mk> diff --git a/sys/lkm/arch/i386/powernow/lkminit_powernow.c b/sys/lkm/arch/i386/powernow/lkminit_powernow.c deleted file mode 100644 index b154c879800..00000000000 --- a/sys/lkm/arch/i386/powernow/lkminit_powernow.c +++ /dev/null @@ -1,133 +0,0 @@ -/* $NetBSD: lkminit_powernow.c,v 1.12 2008/01/05 04:50:05 dan Exp $ */ - -/* - * Derived from: - * - * Copyright (c) 1993 Terrence R. Lambert. - * Copyright (c) 2005 Olaf 'Rhialto' Seibert. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Terrence R. Lambert. - * 4. The name Terrence R. Lambert may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_powernow.c,v 1.12 2008/01/05 04:50:05 dan Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/lkm.h> -#include <sys/errno.h> -#include <sys/cpu.h> -#include <machine/specialreg.h> -#include <x86/powernow.h> - -int powernow_lkmentry(struct lkm_table *, int, int); -static int powernow_mod_handle(struct lkm_table *, int); - -MOD_MISC("powernow"); - -static uint32_t pn_family = 0; - -/* - * This function is called each time the module is loaded or unloaded. - * Since we are a miscellaneous module, we have to provide whatever - * code is necessary to patch ourselves into the area we are being - * loaded to change. - * - * The stat information is basically common to all modules, so there - * is no real issue involved with stat; we will leave it lkm_nofunc(), - * since we don't have to do anything about it. - */ -static int -powernow_mod_handle(struct lkm_table *lkmtp, int cmd) -{ - int err = 0; /* default = success */ - - switch (cmd) { - case LKM_E_LOAD: - /* - * Don't load twice! (lkmexists() is exported by kern_lkm.c) - */ - if (lkmexists(lkmtp)) - return EEXIST; - - if (powernow_probe(curcpu())) { - pn_family = CPUID2FAMILY(curcpu()->ci_signature); - if (pn_family == 6) - k7_powernow_init(); - else if (pn_family == 15) - k8_powernow_init(); - else - err = ENODEV; - } else - err = ENODEV; - break; /* Success */ - - case LKM_E_UNLOAD: - if (pn_family == 6) - k7_powernow_destroy(); - else if (pn_family == 15) - k8_powernow_destroy(); - - break; /* Success */ - - default: /* we only understand load/unload */ - err = EINVAL; - break; - } - - return err; -} - - -/* - * External entry point; should generally match name of .o file + '_lkmentry'. - * The arguments are always the same for all loaded modules. The "load", - * "unload", and "stat" functions in "DISPATCH" will be called under - * their respective circumstances. If no function is desired, lkm_nofunc() - * should be supplied. They are called with the same arguments (cmd is - * included to allow the use of a single function, ver is included for - * version matching between modules and the kernel loader for the modules). - * - * Since we expect to link in the kernel and add external symbols to - * the kernel symbol name space in a future version, generally all - * functions used in the implementation of a particular module should - * be static unless they are expected to be seen in other modules or - * to resolve unresolved symbols alread existing in the kernel (the - * second case is not likely to ever occur). - * - * The entry point should return 0 unless it is refusing load (in which - * case it should return an errno from errno.h). - */ -int -powernow_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - DISPATCH(lkmtp, cmd, ver, powernow_mod_handle, - powernow_mod_handle, lkm_nofunc) -} diff --git a/sys/lkm/arch/mac68k/Makefile b/sys/lkm/arch/mac68k/Makefile deleted file mode 100644 index 5d0e9d782d3..00000000000 --- a/sys/lkm/arch/mac68k/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile,v 1.1 1999/03/26 22:27:59 scottr Exp $ - -SUBDIR= iwm - -.include <bsd.subdir.mk> diff --git a/sys/lkm/arch/mac68k/Makefile.inc b/sys/lkm/arch/mac68k/Makefile.inc deleted file mode 100644 index b70ed8ff223..00000000000 --- a/sys/lkm/arch/mac68k/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.1 1999/03/26 22:27:59 scottr Exp $ - -S!= cd ${.CURDIR}/../../../..;pwd - -.include "../../Makefile.inc" diff --git a/sys/lkm/arch/mac68k/iwm/Makefile b/sys/lkm/arch/mac68k/iwm/Makefile deleted file mode 100644 index 004b2b6195f..00000000000 --- a/sys/lkm/arch/mac68k/iwm/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# $NetBSD: Makefile,v 1.6 2008/10/25 22:27:38 apb Exp $ -# -# Makefile for loadable iwm device driver kernel module -# - -.include "../Makefile.inc" - -.PATH: $S/arch/mac68k/obio - -CFILES= iwm_mod.c iwm_fd.c -SFILES= iwm.s - -SRCS= ${CFILES} ${SFILES} - -KMOD= iwmfd - -MAN= - -CLEANFILES+= *~ ${KMOD} - -#WARNS= 1 -#CPPFLAGS= -DDIAGNOSTIC -DDDB -DDEBUG -nostdinc -Dmc68020 -Dmac68k -CPPFLAGS= -DDIAGNOSTIC -DDDB -nostdinc -Dmc68020 -Dmac68k -CFLAGS= -g -O -m68020-40 - -AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE -I$S/arch - -iwm.o: iwm.s - ${CPP} ${AFLAGS} ${CPPFLAGS} ${.IMPSRC} | ${TOOL_SED} -e 's/^#.*//' | \ - ${AS} -o ${.TARGET} - -.include <bsd.kmod.mk> diff --git a/sys/lkm/arch/mac68k/iwm/README.iwm b/sys/lkm/arch/mac68k/iwm/README.iwm deleted file mode 100644 index 2421ea487d9..00000000000 --- a/sys/lkm/arch/mac68k/iwm/README.iwm +++ /dev/null @@ -1,85 +0,0 @@ -# $NetBSD: README.iwm,v 1.4 2005/12/11 12:24:46 christos Exp $ - -From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE> -Subject: NetBSD/mac68k IWM floppy driver - - -## Contents - -This is a short overview over the package's contents. - -The sources in this archive implement a floppy disk driver for -NetBSD/mac68k. The driver can be built as a LKM (Loadable Kernel -Module) as well as an integral part of the kernel. As the name "iwmfd" -tries to point out, it currently supports 800K DD disks formatted in -Apple's proprietary GCR. - -Sorry, no MFM, no HD disks. - - -## Where does it go? - -cd to /usr/src and untar the archive. - -Most of the contents go to "./sys/arch/mac68k/lkm/iwm", some files go -to "./sys/arch/mac68k/dev" and "./sys/arch/mac68k/conf". -The file "1-3-2-iwm.diff", located in "./sys/arch", contains diffs to -files in the mac68k subtree and should be applied as "patch <1-3-2-iwm.diff" -from the "./sys/arch" direectory. - -To run the driver lkm, you need to have a custom kernel with patches -(at least) in mac68k/machdep.c and configured with the option LKM. -For debugging, you'd also want DDB, DEBUG, DIAGNOSTIC and INSECURE, -and maybe UCONSOLE (see the example kernel config file). - -INSECURE runs the kernel in secure level #0 when in multi-user and allows -root to attach an LKM to it. - - -## How do I run it? - -I assume you have built a custom kernel that defines the IWM I/O address -and was configured with LKM. - -Go to "./sys/arch/mac68k/lkm/iwm", do a make depend && make. -After building the LKM (make links && make depend && make), you can type -'make load' as root to attach the LKM to the kernel for testing, if it -was configured with INSECURE (see above). - -Then put the iwmfd.o file into /usr/lkm, create an entry in /etc/lkm.conf -for it (basically "iwmfd.o - - - - -", see man lkm.conf), make sure loading -LKMs during startup is enabled in /etc/rc.conf, and reboot. - -It helps if you have something sensible on your 800K floppy. Suntar 2.xx -(available on any info-mac mirror, try archie) is capable of writing a tar -archive to a raw 800k disk (it will complain, but you can ignore that); -you may want to put some text files onto the disk. - - -## Getting technical - -A Loadable Kernel Module is an object file that can be attached to a -running kernel (see lkm(4), lkm.conf(5), modload(8), modunload(8)). -The LKM code sees all the kernel's global symbols (functions, global -variables); it can patch tables and variables and thus substitute kernel -facilities (e.g. system calls, file systems, device drivers) with its -own functionality. - -In fact, I found it harder to understand what a device driver is and how it -fits into the kernel that to turn an existing ( and - hopefully - well -understood) device driver into a loadable module. - -The biggest change concerns the autoconfig framework: Noone calls the -xxx{match,attach,print} functions so they can as well be scrapped. The -device initialization part of their functionality, though, has to be kept -and should be called when the module is loaded (see fdProbe(), iwmProbe() -in fd.c, called from iwmModule.c) and unloaded. - -Terry Lambert's LKM framework contains templates for file systems and -system calls as well as for block and for character device drivers. -Unfortunately, it lacks examples for the latter, and as we are talking -about a disk driver which has to supply (patch) a character device switch -as well as a block device switch, we have to roll our own. It's not that -difficult, though... see {load,unload}Module() in iwmModule.c for the patch -code. - diff --git a/sys/lkm/arch/mac68k/iwm/README.technote b/sys/lkm/arch/mac68k/iwm/README.technote deleted file mode 100644 index 68807e07560..00000000000 --- a/sys/lkm/arch/mac68k/iwm/README.technote +++ /dev/null @@ -1,293 +0,0 @@ -# $NetBSD: README.technote,v 1.4 2005/12/11 12:24:46 christos Exp $ - - -The IWM chip (the Mac floppy controller) is a descendant of the Apple -][ disk controller and quite different from the everyday FDC. Instead -of configuring your FDC, sending a command and sleep()ing until it -completes, you have to do everything by hand. - -That means: Sit on the floppy's head, look for a header ID and read & -decode the header. If it indicates the sector you want, read the -sector data and decode it while you're reading (a fairly complex -scheme, and one of apple's best kept secrets, too). Continue at will; -similarly for writing. - -Now, did you miss the word "interrupt"? -- There is none. The IWM runs -entirely in polled mode, all interrupts disabled. The MacOS .Sony -driver polls one serial port during disk I/O to maintain LocalTalk -connectivity; other than that, the machine is locked. - - - - -IWM Registers: -============== - - -1. IWM register selection - -Q6 Q7 Register ------------------------------------------------------------------------------ -off off Read from data register -off on Read from handshake register -on off Read from status register -on on Write to mode register -- drive is off - Write to data register -- drive is on - - -2. IWM mode register - -Bit Function ------------------------------------------------------------------------------ -7 reserved -6 reserved -5 reserved -4 clock speed: 0 = 7 MHz (Apple II) - 1 = 8 MHz (Mac) -3 bit cell time: 0 = 2 usec/bit (3.5") (*) - 1 = 4 usec/bit (5.25") -2 motor-off timer: 0 = motor off delayed by 1 sec (5.25") - 1 = no delay (3.5") -1 handshake protocol: 0 = synchronous/software timing (5.25") - 1 = asynchronous/IWM timing (3.5") -0 latch mode: 0 = read data valid for 7 usec (5.25") - 1 = read data valid for full byte time (3.5") - - -3. IWM status register - -Bit Function ------------------------------------------------------------------------------ -7 sense input: 5.25" write protect line - 3.5" general status line -6 reserved HD media format? -5 drive enabled 1 = drive is on -4 clock speed: 0 = 7 MHz (Apple II) - 1 = 8 MHz (Mac) -3 bit cell time: 0 = 2 usec/bit (3.5") (*) - 1 = 4 usec/bit (5.25") -2 motor-off timer: 0 = motor off delayed by 1 sec (5.25") - 1 = no delay (3.5") -1 handshake protocol: 0 = synchronous/software timing (5.25") - 1 = asynchronous/IWM timing (3.5") -0 latch mode: 0 = read data valid for 7 usec (5.25") - 1 = read data valid for full byte time (3.5") - - -4. IWM handshake register - -Bit Function ------------------------------------------------------------------------------ -7 IWM state: 0 = busy - 1 = ready for data -6 underrun: 0 = write underrun (data not delivered in time) - 1 = no error -5 reserved -4 reserved -3 reserved -2 reserved -1 reserved -0 reserved - - ---- -(*) inverse to "iwmstuff"!! Is this really the bit cell time? - Valid reads from a Macintosh Sony drive have a '1' here. - - - - - - -SWIM registers: -=============== - -(coming soon...) - - - - -Floppy drive registers: -======================= - - -1. Status bits: - -The result of the query for 'Param' is returned in Bit 7 of q7L, which is -usually checked by a bmi/bpl branch. - - -CA1 CA0 SEL CA2 Param Register Function (q7L, Bit 7) ------------------------------------------------------------------------------ -off off off off 0x00 DIRTN direction of head step: - 0 = inward (greater track no) - 1 = outward (smaller track no) -off off off on 0x01 RDDATA0 Reading sets up drive to read - data from lower head -off off on off 0x02 CSTIN Disk inserted: - 0 = disk in drive - 1 = drive empty -off off on on 0x03 RDDATA1 Reading sets up drive to read - data from upper head -off on off off 0x04 STEP Disk head is stepping (1) - 0 = yes, still stepping - 1 = no, drive ready -off on off on 0x05 ----- Not used -off on on off 0x06 WRTPRT Disk is locked: - 0 = write-protected - 1 = write-enabled -off on on on 0x07 ----- Not used -on off off off 0x08 MOTORON Drive motor state: - 0 = on - 1 = off -on off off on 0x09 SIDES Number of sides: - 0 = single-sided drive - 1 = double-sided drive -on off on off 0x0A TK0 Track 00 switch: - 0 = head is at track 00 - 1 = head is elsewhere -on off on on 0x0B ????? Head loaded/drive ready: - 0 = ready - 1 = not ready -on on off off 0x0C ????? (Disk switched?) -on on off on 0x0D ------ Not used -on on on off 0x0E TACH Tachometer (60 pulses/rev) -on on on on 0x0F DRVIN Drive installed: (2) - 0 = drive is connected - 1 = no drive - -(1) After step is done, wait ca. 30 µs before issuing next step command; -otherwise steps tend to get lost. - -(2) The SWIM & SuperDrive apparently use DRVIN (0x0F) to distinguish between -DD and HD disk media and check for an installed drive with 0x0D. - - -2. Control bits: - - -CA1 CA0 SEL CA2 Param Register Function ------------------------------------------------------------------------------ -off off off off 0x00 DIRTN Set direction of head step - to inward (greater track no) -off off off on 0x01 Set direction of head step - to outward (smaller track no) -off off on off 0x02 ----- Not used -off off on on 0x03 (Reset disk switched flag?) -off on off off 0x04 STEP Step disk head -off on off on 0x05 ----- Not used -off on on off 0x06 ----- Not used -off on on on 0x07 ----- Not used -on off off off 0x08 MOTORON Turn drive motor on -on off off on 0x09 Turn drive motor off -on off on off 0x0A ----- Not used -on off on on 0x0B ----- Not used -on on off off 0x0C EJECT Eject disk -on on off on 0x0D " -on on on off 0x0E ------ Not used -on on on on 0x0F ------ Not used - -Disk commands are formed by the CA1, CA0, SEL lines. For a given command -code CA2 acts as a parameter bit. - - - -Reading a GCR sector header -=========================== - -A sector header on a Macintosh 400/800K GCR disk consists of - -o a three byte lead-in: '0xD5 0xAA 0x96' -o current track byte, sector byte and side bit, encoded in four bytes plus - a one byte checksum -o a two byte lead-out: '0xDE 0xAA' - -The lead-in and lead-out tokens are evaluated 'as is'; the content area -is subject to further processing. - - -1. Remapping - -The byte values that the IWM can write to / read from disk reliably are -subject to several constraints: - -o They may not equal any reserved values (header markers) -o Bit 7 == 1 for hardware synchronization -o No more than one pair of consecutive zero bits -o At least one pair of consecutive one bits - -These constraints leave 64 valid bytes in the range of 0x95..0xFF. -For convenience, this range is mapped to a continuous range of -0x00..0x3F -- this rule applies to all user data on the disk. - - -2. Contents - -For byte 1, the current sector number, the offered range is large enough; no -further processing is needed. The same applies to byte 3 (function?). -Byte 0 & 2 hold the side bit and the current track number; some further -massage is needed to extract their values. - -o Byte 1: Bits 6&7 are dropped, Bits 0..5 leave a range of 0..63. -o Byte 2: Bits 0&1 become bits 6&7 of Byte 1. Bits 2..5 (range 0..0x0F) - hold further information: - 2 - ? - 3 - ? - 4 - ? - 5 - 0 = side 0, 1 = side 1 - - -3. Checksum - -The checksum of the header content area is evaluated by XORing bytes 0..3; -the result must equal byte 4. (Alternatively the result of XORing all five -bytes can be checked against zero.) - - - -Reading GCR sector contents -=========================== - -(to be done) - - - -Disk Zone Mapping -================= - -The first 12 sectors for an 800K disk map to side 0, track 0, sectors 0-11, -similar to the corresponding sectors on the 400K disk. The next 12 sectors for -the 800K disk map to side 1 in a similar manner--side 1, track 0, sectors 0-11. -Logical sectors 24-36 map to side 0, track 1, sectors 0-11, and so on. The -following table demonstrates this: - -Side Track Sectors Physical Logical - Per Track Sectors Sectors - - 0 0 12 0-11 0-11 - 1 0 12 0-11 12-23 - 0 1 12 0-11 24-35 - 1 1 12 0-11 36-47 - ... - 1 15 12 0-11 372-383 - 0 16 11 0-10 384-394 - 1 16 11 0-10 395-405 - 0 17 11 0-10 405-415 - ... - 1 31 11 0-10 725-735 - 0 32 10 0-9 736-745 - 1 32 10 0-9 746-755 - 0 33 10 0-9 756-765 - ... - 1 47 10 0-9 1046-1055 - 0 48 9 0-8 1056-1064 - 1 48 9 0-8 1065-1073 - 0 49 9 0-8 1074-1082 - ... - 1 63 9 0-8 1335-1343 - 0 64 8 0-7 1344-1351 - 1 64 8 0-7 1352-1359 - 0 65 8 0-7 1360-1367 - ... - 1 79 8 0-7 1592-1599 - diff --git a/sys/lkm/arch/mac68k/iwm/TODO b/sys/lkm/arch/mac68k/iwm/TODO deleted file mode 100644 index 17df2b08edc..00000000000 --- a/sys/lkm/arch/mac68k/iwm/TODO +++ /dev/null @@ -1,71 +0,0 @@ -$NetBSD: TODO,v 1.4 2005/12/11 12:24:46 christos Exp $ - - -981126 - -o Change file naming pattern: Other drivers (adb, if) use a prefix. - We could use - - iwm.s (was: iwm.s) - iwm_regs.s (was: iwmRegs.s) - iwm_fd.c (was: fd.c) - iwm_fdvar.h (was: fdvar.h) - iwm_reg.h (was: iwmreg.h) - - and "swim_*" when it comes to it... - The lkm sources would then be - - iwm_mod.c (was: iwmModule.c) - iwm_mod.h (was: fdmod.h) - -o location: Is obio fine, or should the driver files be placed in dev? - -o LKM location: Is /sys/arch/mac68k/lkm appropriate or should the - lkm rather go to sys/lkm? - - -980607 - -o Do statistics in fdstart() about retries and errors. - -o send-pr because disklabel(8) displays transition times in milliseconds - whereas <sys/disklabel.h> has them in microseconds (us). - - -980606 - -o The Performa 630, a CLASS_Q2 machine according to mac68k/mac68k/machdep.c, - fails to attach (initialize) the IWM. Apparently the driver tickles - the right spot, though: Booting with an inserted disk lets the driver - "find" two (unsupported) HD drives. What IWM chip does that box have? - [SWIM II] - Has Apple changed the IWM register layout with introducing - manual-insertion floppy drives? - [Yes; All 040 Macs need System 7 which does not fit on an 800k disk, - so the 800k code is legacy and need not be present at boot time.] - - -980602 - -o send-pr because static array fscknames[] cannot be disabled in - <sys/disklabel.h> - [FIXED as of 11/98 by J. Thorpe] - -o send-pr because <bsd.kmod.mk> tries to unload a kernel module - under a different name than it was loaded and fails miserably. - [bin/4701] - -o finish manpage - -o Just how much KNF can I take (CAPITALIZATION, __P() noise) ? - - -Old stuff - -o Consistent motor on/off management -o Order of responsibilities for iwm_softc_t <-> fd_softc_t -o Service SCC during floppy access -o Implement track buffer -o Support SWIM mode (720K/1440K MFM) -o Check for IWM/SWIM (original 800k Mac II's) -o Test driver with 2 drives diff --git a/sys/lkm/arch/mac68k/iwm/iwm_mod.c b/sys/lkm/arch/mac68k/iwm/iwm_mod.c deleted file mode 100644 index 404ae6b7da7..00000000000 --- a/sys/lkm/arch/mac68k/iwm/iwm_mod.c +++ /dev/null @@ -1,86 +0,0 @@ -/* $NetBSD: iwm_mod.c,v 1.9 2005/12/11 12:24:46 christos Exp $ */ - -/* - * Copyright (c) 1997, 1998 Hauke Fath. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Sony (floppy disk) driver for Macintosh m68k, module entry. - * This is derived from Terry Lambert's LKM examples. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iwm_mod.c,v 1.9 2005/12/11 12:24:46 christos Exp $"); - -#include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -/* The module entry */ -int iwmfd_lkmentry(struct lkm_table *lkmtp, int cmd, int ver); - -static int iwmfd_load(struct lkm_table *lkmtp, int cmd); -static int iwmfd_unload(struct lkm_table *lkmtp, int cmd); - -extern int fd_mod_init(void); -extern void fd_mod_free(void); - -extern const struct bdevsw fd_bdevsw; -extern const struct cdevsw fd_cdevsw; - -MOD_DEV("iwmfd", "fd", &fd_bdevsw, -1, &fd_cdevsw, -1) - -/* - * iwmfd_lkmentry - * - * External entry point; should generally match name of .o file. - */ -int -iwmfd_lkmentry (struct lkm_table *lkmtp, int cmd, int ver) -{ - - DISPATCH(lkmtp, cmd, ver, iwmfd_load, iwmfd_unload, lkm_nofunc); -} - -static int -iwmfd_load(struct lkm_table *lkmtp, int cmd) -{ - - return fd_mod_init(); -} - -static int -iwmfd_unload(struct lkm_table *lkmtp, int cmd) -{ - - fd_mod_free(); - return (0); -} diff --git a/sys/lkm/arch/powerpc/lkmhide.awk b/sys/lkm/arch/powerpc/lkmhide.awk deleted file mode 100644 index df7de7e1c68..00000000000 --- a/sys/lkm/arch/powerpc/lkmhide.awk +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: lkmhide.awk,v 1.1 2003/04/23 18:34:21 matt Exp $ - -substr($NF, 1, 7) == "__wrap_" { - print " --localize-symbol "$NF; -} diff --git a/sys/lkm/arch/powerpc/lkmtramp.awk b/sys/lkm/arch/powerpc/lkmtramp.awk deleted file mode 100644 index 56c430bb103..00000000000 --- a/sys/lkm/arch/powerpc/lkmtramp.awk +++ /dev/null @@ -1,35 +0,0 @@ -# $NetBSD: lkmtramp.awk,v 1.3 2005/12/11 12:24:47 christos Exp $ -# -BEGIN { - print "#include <machine/asm.h>" -} - -/^SYMBOL TABLE:/ { - doing_symbols = 1; - next; -} - -/^RELOCATION RECORDS/ { - doing_symbols = 0; - doing_relocs = 1; - next; -} - -$2 == "*UND*" { - if (doing_symbols) - x[$4] = "+"; - next; -} - -$2 == "R_PPC_REL24" { - if (!doing_relocs) - next; - if (x[$3] != "+") - next; - print "\nENTRY(__wrap_"$3")" - print "\tlis\t0,__real_"$3"@h" - print "\tori\t0,0,__real_"$3"@l" - print "\tmtctr\t0" - print "\tbctr" - x[$3]="."; -} diff --git a/sys/lkm/arch/powerpc/lkmwrap.awk b/sys/lkm/arch/powerpc/lkmwrap.awk deleted file mode 100644 index f73cd7b1436..00000000000 --- a/sys/lkm/arch/powerpc/lkmwrap.awk +++ /dev/null @@ -1,27 +0,0 @@ -# $NetBSD: lkmwrap.awk,v 1.3 2005/12/11 12:24:47 christos Exp $ -# -/^SYMBOL TABLE:/ { - doing_symbols = 1; - next; -} - -/^RELOCATION RECORDS/ { - doing_symbols = 0; - doing_relocs = 1; - next; -} - -$2 == "*UND*" { - if (doing_symbols) - x[$4] = "+"; - next; -} - -$2 == "R_PPC_REL24" { - if (!doing_relocs) - next; - if (x[$3] != "+") - next; - printf " --wrap "$3; - x[$3]="."; -} diff --git a/sys/lkm/compat/Makefile b/sys/lkm/compat/Makefile deleted file mode 100644 index 13c390e9433..00000000000 --- a/sys/lkm/compat/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# $NetBSD: Makefile,v 1.26 2007/12/31 13:39:03 ad Exp $ - -.if (${MACHINE_ARCH} == "sparc64") -SUBDIR+= netbsd32 sunos32 svr4 svr4_32 -.endif - -.if (${MACHINE} == "i386") -SUBDIR+= freebsd linux svr4 pecoff -.endif - -.if (${MACHINE} == "amd64") -SUBDIR+= linux -.endif - -# These are untested, but do compile. Once they are tested, -# move them above. - -.if !make(install) - -.if (${MACHINE} == "alpha") -SUBDIR+= linux osf1 -.endif - -.if (${MACHINE} == "i386") -SUBDIR+= ibcs2 -.endif - -.if (${MACHINE_ARCH} == "m68k") -SUBDIR+= aoutm68k sunos svr4 -.endif - -.if (${MACHINE_ARCH} == "mipsel") -SUBDIR+= ultrix -.endif - -.if (${MACHINE_ARCH} == "sparc") -SUBDIR+= sunos svr4 -.endif - -.if (${MACHINE} == "sgimips") -SUBDIR+= irix -.endif - -.if (${MACHINE_ARCH} == "vax") -SUBDIR+= ibcs2 ultrix -.endif - -.endif # !make(install) - -.include <bsd.subdir.mk> diff --git a/sys/lkm/compat/Makefile.inc b/sys/lkm/compat/Makefile.inc deleted file mode 100644 index f9b399b6425..00000000000 --- a/sys/lkm/compat/Makefile.inc +++ /dev/null @@ -1,35 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.20 2007/04/22 08:30:01 dsl Exp $ - -.if !target(assym.h) -S!= cd ${.CURDIR}/../../..;pwd - -NOMAN= # defined - -.include <bsd.own.mk> - -DPSRCS+= assym.h -CLEANFILES+= assym.h - -.if (${MACHINE_ARCH} == "powerpc") -.if (${MACHINE} == "macppc" || ${MACHINE} == "ofppc" || ${MACHINE} == "prep") -# use oea -GENASSYM_DIR= $S/arch/${MACHINE_ARCH}/oea -CPPFLAGS+= -DPPC_OEA -.endif -.endif - -.if exists($S/arch/${MACHINE}/${MACHINE}/genassym.cf) -GENASSYM_DIR?= $S/arch/${MACHINE}/${MACHINE} -.elif exists($S/arch/${MACHINE_CPU}/${MACHINE_CPU}/genassym.cf) -GENASSYM_DIR?= $S/arch/${MACHINE_CPU}/${MACHINE_CPU} -.else -GENASSYM_DIR?= -.endif - -assym.h: ${GENASSYM_DIR}/genassym.cf - ${TOOL_GENASSYM} -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \ - < ${GENASSYM_DIR}/genassym.cf > assym.h.tmp && \ - mv -f assym.h.tmp assym.h - -.include "../Makefile.inc" -.endif diff --git a/sys/lkm/compat/aoutm68k/Makefile b/sys/lkm/compat/aoutm68k/Makefile deleted file mode 100644 index 771ee911a7b..00000000000 --- a/sys/lkm/compat/aoutm68k/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -# $NetBSD: Makefile,v 1.9 2005/12/11 12:24:47 christos Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/aoutm68k - -CPPFLAGS+= -DSYSVSEM -DSYSVMSG -DSYSVSHM -DCOMPAT_AOUT_M68K -DCOMPAT_43 -CPPFLAGS+= -nostdinc -AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE -D_KERNEL \ - -I. -I${S} - -KMOD= compat_aoutm68k - -SRCS= lkminit_emul.c -SRCS+= aoutm68k_exec.c aoutm68k_stat.c aoutm68k_sysent.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/compat/aoutm68k/lkminit_emul.c b/sys/lkm/compat/aoutm68k/lkminit_emul.c deleted file mode 100644 index b32992dd3aa..00000000000 --- a/sys/lkm/compat/aoutm68k/lkminit_emul.c +++ /dev/null @@ -1,87 +0,0 @@ -/* $NetBSD: lkminit_emul.c,v 1.9 2008/04/28 20:24:06 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.9 2008/04/28 20:24:06 martin Exp $"); - -#include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/exec_aout.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> -#include <sys/proc.h> -#include <sys/signalvar.h> - -/* - * This module is different to other compat modules - it adds the - * execsw[] entry as well. As the compat_aoutm68k is emulation more of - * executable format support, it's probably better to be placed here - * than under lkm/exec/. - */ - -extern const struct emul emul_netbsd_aoutm68k; - -int compat_aoutm68k_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_netbsd_aoutm68k = - /* Native a.out */ - { sizeof(struct exec), - exec_aout_makecmds, - { NULL }, - &emul_netbsd_aoutm68k, - EXECSW_PRIO_FIRST, /* Note: this differs from exec_conf.c entry */ - 0, - copyargs, - NULL, - coredump_netbsd }; - -/* - * declare the executable format - */ -MOD_EXEC("compat_aoutm68k", -1, &exec_netbsd_aoutm68k, "aoutm68k"); - -/* - * entry point - */ -int -compat_aoutm68k_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); -} diff --git a/sys/lkm/compat/freebsd/Makefile b/sys/lkm/compat/freebsd/Makefile deleted file mode 100644 index b2b99e814a2..00000000000 --- a/sys/lkm/compat/freebsd/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# $NetBSD: Makefile,v 1.21 2007/04/22 08:30:01 dsl Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/freebsd - -CPPFLAGS+= -DSYSVSEM -DSYSVMSG -DSYSVSHM -DCOMPAT_FREEBSD -DKTRACE -CPPFLAGS+= -nostdinc -AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE \ - -I. -I${S} - -KMOD= compat_freebsd - -# common source files -SRCS+= lkminit_emul.c -SRCS+= freebsd_exec.c freebsd_file.c freebsd_fork.c \ - freebsd_ioctl.c freebsd_ipc.c freebsd_misc.c \ - freebsd_sched.c freebsd_syscalls.c \ - freebsd_sysctl.c freebsd_sysent.c - -# XXXX - temporary, not applicable for kernel with COMPAT_43, OSSAUDIO -#.PATH: $S/compat/common $S/compat/ossaudio -#SRCS+= uipc_syscalls_43.c vfs_syscalls_43.c kern_resource_43.c \ -# kern_info_43.c ossaudio.c -#SRCS+= kern_info_09.c kern_sig_43.c kern_sig_13.c sysv_msg_14.c vm_43.c \ -# sysv_shm_14.c kern_exit_43.c vm_12.c vfs_syscalls_12.c sysv_sem_14.c \ -# sysv_ipc_14.c - -# MD source files -.if ${MACHINE} == "i386" -.PATH: $S/arch/i386/i386 -SRCS+= freebsd_machdep.c freebsd_sigcode.S freebsd_syscall.c -.endif - -.include <bsd.kmod.mk> diff --git a/sys/lkm/compat/freebsd/lkminit_emul.c b/sys/lkm/compat/freebsd/lkminit_emul.c deleted file mode 100644 index 78502c16dff..00000000000 --- a/sys/lkm/compat/freebsd/lkminit_emul.c +++ /dev/null @@ -1,64 +0,0 @@ -/* $NetBSD: lkminit_emul.c,v 1.10 2008/04/28 20:24:06 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.10 2008/04/28 20:24:06 martin Exp $"); - -#include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -extern const struct emul emul_freebsd; -int compat_freebsd_lkmentry(struct lkm_table *, int, int); - -/* - * declare the emulation - */ -MOD_COMPAT("compat_freebsd", -1, &emul_freebsd); - -/* - * entry point - */ -int -compat_freebsd_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); -} diff --git a/sys/lkm/compat/ibcs2/Makefile b/sys/lkm/compat/ibcs2/Makefile deleted file mode 100644 index b4d74efd928..00000000000 --- a/sys/lkm/compat/ibcs2/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# $NetBSD: Makefile,v 1.9 2005/12/11 12:24:47 christos Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/ibcs2 $S/arch/${MACHINE}/${MACHINE} - -CPPFLAGS+= -DCOMPAT_SVR4 -DSYSVSEM -DSYSVMSG -DSYSVSHM \ - -DSVR4_COMPAT_SOLARIS2 -DCOMPAT_IBCS2 -AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE \ - -I. -I${S} - -KMOD= compat_ibcs2 - -# common source files -SRCS+= lkminit_emul.c -SRCS+= ibcs2_errno.c ibcs2_exec.c ibcs2_fcntl.c ibcs2_ioctl.c ibcs2_ipc.c \ - ibcs2_misc.c ibcs2_signal.c ibcs2_socksys.c ibcs2_stat.c \ - ibcs2_syscalls.c ibcs2_sysent.c - -# MD source -.if ${MACHINE} == "i386" -.PATH: $S/arch/i386/i386 -SRCS+= ibcs2_sigcode.S ibcs2_machdep.c ibcs2_syscall.c -.endif - -.include <bsd.kmod.mk> diff --git a/sys/lkm/compat/ibcs2/lkminit_emul.c b/sys/lkm/compat/ibcs2/lkminit_emul.c deleted file mode 100644 index 5a4f61f94d2..00000000000 --- a/sys/lkm/compat/ibcs2/lkminit_emul.c +++ /dev/null @@ -1,62 +0,0 @@ -/* $NetBSD: lkminit_emul.c,v 1.7 2008/04/28 20:24:06 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.7 2008/04/28 20:24:06 martin Exp $"); - -#include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/proc.h> -#include <sys/lkm.h> - -extern const struct emul emul_ibcs2; - -int compat_ibcs2_lkmentry(struct lkm_table *, int, int); - -/* - * declare the emulation - */ -MOD_COMPAT("compat_ibcs2", -1, &emul_ibcs2); - -/* - * entry point - */ -int -compat_ibcs2_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); -} diff --git a/sys/lkm/compat/irix/Makefile b/sys/lkm/compat/irix/Makefile deleted file mode 100644 index b6655abe954..00000000000 --- a/sys/lkm/compat/irix/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# $NetBSD: Makefile,v 1.1 2002/11/30 13:41:40 jdolecek Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/irix $S/arch/${MACHINE}/${MACHINE} $S/arch/${MACHINE_CPU}/${MACHINE_CPU} $S/compat/common - -CPPFLAGS+= -DCOMPAT_IRIX -DSYSVSEM -DSYSVMSG -DSYSVSHM -nostdinc -AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE \ - -I. -I${S} - -KMOD= compat_irix - -# common source files -SRCS+= lkminit_emul.c -SRCS+= irix_dirent.c irix_errno.c irix_exec.c \ - irix_fcntl.c irix_ioctl.c irix_kmem.c irix_misc.c irix_mman.c \ - irix_mount.c irix_prctl.c irix_resource.c irix_signal.c \ - irix_stat.c irix_swap.c irix_syscalls.c irix_sysctl.c \ - irix_sysent.c irix_sysmp.c irix_syssgi.c irix_systeminfo.c \ - irix_usema.c - -# items pulled from compat/svr4 -.PATH: $S/compat/svr4 -SRCS+= svr4_fcntl.c svr4_filio.c svr4_ioctl.c svr4_ipc.c svr4_misc.c \ - svr4_net.c svr4_signal.c svr4_signo.c svr4_socket.c \ - svr4_sockio.c svr4_stat.c svr4_stream.c svr4_termios.c svr4_ttold.c - -# MD files -SRCS+= irix_syscall.c -SRCS+= svr4_machdep.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/compat/irix/lkminit_emul.c b/sys/lkm/compat/irix/lkminit_emul.c deleted file mode 100644 index d9f768532cf..00000000000 --- a/sys/lkm/compat/irix/lkminit_emul.c +++ /dev/null @@ -1,88 +0,0 @@ -/* $NetBSD: lkminit_emul.c,v 1.6 2008/04/28 20:24:06 martin Exp $ */ - -/*- - * Copyright (c) 2002, 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.6 2008/04/28 20:24:06 martin Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/lkm.h> - -#include <compat/irix/irix_sysctl.h> - -extern const struct emul emul_irix; - -int compat_irix_lkmentry(struct lkm_table *, int, int); - -/* - * declare the emulation - */ -MOD_COMPAT("compat_irix", -1, &emul_irix); - -/* - * take care of emulation specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_emul_irix_log; - -/* - * entry point - */ -int -compat_irix_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc); -} - -int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_emul_irix_setup(&_emul_irix_log); - return (0); -} - -int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_emul_irix_log); - return (0); -} diff --git a/sys/lkm/compat/linux/Makefile b/sys/lkm/compat/linux/Makefile deleted file mode 100644 index c9843902aab..00000000000 --- a/sys/lkm/compat/linux/Makefile +++ /dev/null @@ -1,72 +0,0 @@ -# $NetBSD: Makefile,v 1.35 2008/10/17 20:19:24 njoly Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/linux/arch/${MACHINE_ARCH} -.PATH: $S/compat/linux/common $S/compat/linux -.PATH: $S/arch/${MACHINE_ARCH}/${MACHINE_ARCH} - -CPPFLAGS+= -DNWSDISPLAY=1 -DSYSVSEM -DSYSVMSG -DSYSVSHM -DCOMPAT_LINUX -CPPFLAGS+= -nostdinc -DKTRACE -DNSEQUENCER=1 -DINET6 -AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE -D_KERNEL \ - -I. -I${S} -DCOMPAT_LINUX -D_LKM - -KMOD= compat_linux - -# common source -SRCS+= lkminit_emul.c -SRCS+= linux_cdrom.c linux_errno.c linux_exec.c linux_file.c \ - linux_ioctl.c linux_ipc.c linux_misc.c linux_pipe.c \ - linux_sched.c linux_signal.c linux_signo.c \ - linux_socket.c linux_termios.c linux_time.c linux_uselib.c -SRCS+= linux_machdep.c linux_syscalls.c linux_sysent.c -SRCS+= linux_fdio.c linux_hdio.c linux_blkio.c linux_sysctl.c -SRCS+= linux_sg.c linux_mtio.c - -# XXXX - temporary, not applicable for kernel with COMPAT_43, OSSAUDIO -#.PATH: $S/compat/common $S/compat/ossaudio -#SRCS+= vfs_syscalls_43.c kern_resource_43.c kern_info_43.c ossaudio.c - -# architecture or machine dependant files -.if ${MACHINE} == "i386" -.PATH: $S/arch/x86/x86 -SRCS+= linux_break.c linux_llseek.c linux_misc_notalpha.c linux_oldolduname.c \ - linux_oldselect.c linux_sig_notalpha.c linux_socketcall.c \ - linux_ipccall.c linux_oldmmap.c linux_olduname.c linux_file64.c \ - linux_sigaction.c -SRCS+= linux_syscall.c linux_trap.c -SRCS+= linux_sigcode.S -.endif - -.if ${MACHINE} == "amd64" -.PATH: $S/compat/linux/arch/${MACHINE} -.PATH: $S/arch/${MACHINE}/${MACHINE} -.PATH: $S/arch/x86/x86 -SRCS+= linux_file64.c linux_futex.c linux_misc_notalpha.c linux_sig_notalpha.c -SRCS+= linux_syscall.c linux_trap.c -SRCS+= linux_sigcode.S -.endif - -.if ${MACHINE_ARCH} == "m68k" -SRCS+= linux_ipccall.c linux_llseek.c linux_misc_notalpha.c \ - linux_oldselect.c linux_sig_notalpha.c linux_sigaction.c \ - linux_socketcall.c linux_oldmmap.c linux_file64.c linux_uid16.c -SRCS+= linux_sig_machdep.S -.endif - -.if ${MACHINE_ARCH} == "alpha" -CPPFLAGS+= -Dalpha -SRCS+= linux_olduname.c linux_sigaction.c linux_syscall.c -SRCS+= linux_sigcode.s -.endif - -.if ${MACHINE_ARCH} == "powerpc" -CPPFLAGS+= -Dpowerpc -SRCS+= linux_ipccall.c linux_misc_notalpha.c linux_sig_notalpha.c \ - linux_socketcall.c linux_llseek.c linux_olduname.c linux_file64.c \ - linux_sigaction.c -SRCS+= linux_exec_powerpc.c linux_sp_wrap_powerpc.S -SRCS+= linux_sigcode.S linux_trap.c -.endif - -.include <bsd.kmod.mk> diff --git a/sys/lkm/compat/linux/lkminit_emul.c b/sys/lkm/compat/linux/lkminit_emul.c deleted file mode 100644 index b21e4a9e704..00000000000 --- a/sys/lkm/compat/linux/lkminit_emul.c +++ /dev/null @@ -1,96 +0,0 @@ -/* $NetBSD: lkminit_emul.c,v 1.8 2008/04/28 20:24:06 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.8 2008/04/28 20:24:06 martin Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/proc.h> -#include <sys/lkm.h> - -#include <compat/linux/common/linux_sysctl.h> - -extern const struct emul emul_linux; - -int compat_linux_lkmentry(struct lkm_table *, int, int); - -/* - * declare the emulation - */ -MOD_COMPAT("compat_linux", -1, &emul_linux); - -/* - * take care of emulation specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_compat_linux_log, *_emul_linux_log; -extern struct sysctlnode linux_sysctl_root; - -/* - * entry point - */ -int -compat_linux_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc); -} - -int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - linux_sysctl_setup(&_compat_linux_log); /* we "own" this entire tree */ - sysctl_emul_linux_setup(&_emul_linux_log); - return (0); -} - -int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_emul_linux_log); - sysctl_teardown(&_compat_linux_log); - sysctl_free(&linux_sysctl_root); /* we "own" this entire tree */ - return (0); -} diff --git a/sys/lkm/compat/netbsd32/Makefile b/sys/lkm/compat/netbsd32/Makefile deleted file mode 100644 index 79215809a09..00000000000 --- a/sys/lkm/compat/netbsd32/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -# $NetBSD: Makefile,v 1.8 2001/12/12 11:44:46 lukem Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/netbsd32 $S/arch/${MACHINE}/${MACHINE} - -CPPFLAGS+= -DSYSVSEM -DSYSVMSG -DSYSVSHM -DCOMPAT_NETBSD32 -CPPFLAGS+= -DCOMPAT_10 -DCOMPAT_12 -DCOMPAT_13 -DCOMPAT_43 -CPPFLAGS+= -DEXEC_AOUT -DEXEC_ELF32 # for netbsd32_exec.c -CPPFLAGS+= -nostdinc -AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE -D_KERNEL \ - -I. -I${S} - -KMOD= compat_netbsd32 - -# common source files -SRCS+= lkminit_emul.c -SRCS+= netbsd32_compat_09.c netbsd32_compat_10.c netbsd32_compat_12.c \ - netbsd32_compat_13.c netbsd32_compat_14.c netbsd32_compat_43.c \ - netbsd32_core.c netbsd32_netbsd.c netbsd32_execve.c netbsd32_fs.c \ - netbsd32_ioctl.c netbsd32_ipc.c netbsd32_select.c netbsd32_signal.c \ - netbsd32_socket.c netbsd32_sysctl.c netbsd32_time.c netbsd32_wait.c \ - netbsd32_syscalls.c netbsd32_sysent.c - -.if (${MACHINE} == "sparc64") -SRCS+= netbsd32_machdep.c netbsd32_sigcode.s -.endif - -.include <bsd.kmod.mk> diff --git a/sys/lkm/compat/netbsd32/lkminit_emul.c b/sys/lkm/compat/netbsd32/lkminit_emul.c deleted file mode 100644 index 662efb505ed..00000000000 --- a/sys/lkm/compat/netbsd32/lkminit_emul.c +++ /dev/null @@ -1,95 +0,0 @@ -/* $NetBSD: lkminit_emul.c,v 1.10 2008/04/28 20:24:06 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.10 2008/04/28 20:24:06 martin Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <compat/netbsd32/netbsd32.h> - -extern const struct emul emul_netbsd32; - -int compat_netbsd32_lkmentry(struct lkm_table *, int, int); - -/* - * declare the emulation - */ -MOD_COMPAT("compat_netbsd32", -1, &emul_netbsd32); - -/* - * take care of emulation specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_emul_netbsd32_log; - -/* - * entry point - */ -int -compat_netbsd32_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc); -} - -int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - netbsd32_sysctl_emul_setup(&_emul_netbsd32_log); - return (0); -} - -int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_emul_netbsd32_log); - return (0); -} diff --git a/sys/lkm/compat/osf1/Makefile b/sys/lkm/compat/osf1/Makefile deleted file mode 100644 index 6277e5a1172..00000000000 --- a/sys/lkm/compat/osf1/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -# $NetBSD: Makefile,v 1.8 2002/04/10 04:21:27 mycroft Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/osf1 $S/arch/${MACHINE_ARCH}/${MACHINE_ARCH} - -CPPFLAGS+= -DSYSVSEM -DSYSVMSG -DSYSVSHM -DCOMPAT_OSF1 -CPPFLAGS+= -nostdinc -AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE -D_KERNEL \ - -I. -I${S} - -KMOD= compat_osf1 - -# common source files -SRCS= lkminit_emul.c -SRCS+= osf1_cvt.c osf1_errno.c osf1_signo.c osf1_descrip.c \ - osf1_exec.c osf1_file.c osf1_generic.c osf1_ioctl.c osf1_misc.c \ - osf1_mmap.c osf1_mount.c osf1_prot.c osf1_resource.c osf1_signal.c \ - osf1_socket.c osf1_syscalls.c osf1_sysent.c osf1_sysv_ipc.c \ - osf1_time.c - -# MD source files -.if ${MACHINE_ARCH} == "alpha" -SRCS+= osf1_syscall.c -SRCS+= osf1_sigcode.s -.endif - -.include <bsd.kmod.mk> diff --git a/sys/lkm/compat/osf1/lkminit_emul.c b/sys/lkm/compat/osf1/lkminit_emul.c deleted file mode 100644 index b49b6627f50..00000000000 --- a/sys/lkm/compat/osf1/lkminit_emul.c +++ /dev/null @@ -1,65 +0,0 @@ -/* $NetBSD: lkminit_emul.c,v 1.9 2008/04/28 20:24:06 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.9 2008/04/28 20:24:06 martin Exp $"); - -#include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -extern const struct emul emul_osf1; - -int compat_osf1_lkmentry(struct lkm_table *, int, int); - -/* - * declare the emulation - */ -MOD_COMPAT("compat_osf1", -1, &emul_osf1); - -/* - * entry point - */ -int -compat_osf1_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); -} diff --git a/sys/lkm/compat/pecoff/Makefile b/sys/lkm/compat/pecoff/Makefile deleted file mode 100644 index 8147c65d697..00000000000 --- a/sys/lkm/compat/pecoff/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# $NetBSD: Makefile,v 1.6 2007/11/10 09:43:13 dsl Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/pecoff - -CPPFLAGS+= -DCOMPAT_PECOFF -DSYSVMSG -DSYSVSHM - -KMOD= compat_pecoff - -SRCS+= lkminit_emul.c -SRCS+= pecoff_exec.c -SRCS+= pecoff_emul.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/compat/pecoff/lkminit_emul.c b/sys/lkm/compat/pecoff/lkminit_emul.c deleted file mode 100644 index 06fb6d01e82..00000000000 --- a/sys/lkm/compat/pecoff/lkminit_emul.c +++ /dev/null @@ -1,81 +0,0 @@ -/* $NetBSD: lkminit_emul.c,v 1.6 2008/04/28 20:24:06 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.6 2008/04/28 20:24:06 martin Exp $"); - -#include <sys/param.h> -#include <sys/syscall.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/proc.h> -#include <sys/lkm.h> - -#include <compat/pecoff/pecoff_exec.h> -extern struct sysent sysent[]; /* sys/kern/init_sysent.c */ -extern struct sysent pecoff_sysent[]; /* sys/compat/pecoff/pecoff_sysent.c*/ - -int compat_pecoff_lkmload(struct lkm_table *lkmtp, int cmd); -int compat_pecoff_lkmentry (struct lkm_table *, int, int); - -/* - * declare the emulation - */ -MOD_COMPAT("compat_pecoff", -1, &emul_pecoff); - -int -compat_pecoff_lkmload(struct lkm_table *lkmtp, int cmd) -{ - /* - * Copy some syscall entries. - */ - pecoff_sysent[SYS_compat_10_oshmsys] = sysent[SYS_compat_10_oshmsys]; - pecoff_sysent[SYS_shmat] = sysent[SYS_shmat]; - pecoff_sysent[SYS_shmdt] = sysent[SYS_shmdt]; - pecoff_sysent[SYS_shmget] = sysent[SYS_shmget]; - pecoff_sysent[SYS___shmctl13] = sysent[SYS___shmctl13]; - return 0; -} - -/* - * entry point - */ -int -compat_pecoff_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, compat_pecoff_lkmload, - lkm_nofunc, lkm_nofunc); -} diff --git a/sys/lkm/compat/sunos/Makefile b/sys/lkm/compat/sunos/Makefile deleted file mode 100644 index 5af1d56a7e8..00000000000 --- a/sys/lkm/compat/sunos/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# $NetBSD: Makefile,v 1.9 2002/02/10 15:41:58 mrg Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/sunos $S/arch/${MACHINE}/${MACHINE} $S/arch/${MACHINE_ARCH}/${MACHINE_ARCH} $S/compat/common - -CPPFLAGS+= -DCOMPAT_SUNOS -DSYSVSEM -DSYSVMSG -DSYSVSHM -nostdinc -AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE \ - -I. -I${S} - -KMOD= compat_sunos - -# common source files -SRCS+= lkminit_emul.c -SRCS+= sunos_exec.c sunos_ioctl.c sunos_misc.c sunos_syscalls.c sunos_sysent.c - -# MD files -.if ${MACHINE_ARCH} == "m68k" -SRCS+= sunos_sigcode.s -.endif - -.if (${MACHINE} == "sparc64" || ${MACHINE} == "sparc") -SRCS+= sunos_machdep.c sunos_sigcode.s -.endif - -.include <bsd.kmod.mk> diff --git a/sys/lkm/compat/sunos/lkminit_emul.c b/sys/lkm/compat/sunos/lkminit_emul.c deleted file mode 100644 index 58b5615f472..00000000000 --- a/sys/lkm/compat/sunos/lkminit_emul.c +++ /dev/null @@ -1,61 +0,0 @@ -/* $NetBSD: lkminit_emul.c,v 1.9 2008/04/28 20:24:06 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.9 2008/04/28 20:24:06 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/lkm.h> - -extern const struct emul emul_sunos; - -int compat_sunos_lkmentry(struct lkm_table *, int, int); - -/* - * declare the emulation - */ -MOD_COMPAT("compat_sunos", -1, &emul_sunos); - -/* - * entry point - */ -int -compat_sunos_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); -} diff --git a/sys/lkm/compat/sunos32/Makefile b/sys/lkm/compat/sunos32/Makefile deleted file mode 100644 index a7a94fb7e93..00000000000 --- a/sys/lkm/compat/sunos32/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# $NetBSD: Makefile,v 1.6 2005/12/11 12:24:47 christos Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/sunos32 $S/arch/${MACHINE_ARCH}/${MACHINE_ARCH} - -CPPFLAGS+= -DCOMPAT_SUNOS -DCOMPAT_43 -DCOMPAT_NETBSD32 -CPPFLAGS+= -DSYSVSEM -DSYSVMSG -DSYSVSHM -nostdinc -AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE \ - -I. -I${S} - -KMOD= compat_sunos32 - -# common source files -SRCS+= lkminit_emul.c -SRCS+= sunos32_exec.c sunos32_ioctl.c sunos32_misc.c sunos32_syscalls.c sunos32_sysent.c - -.if (${MACHINE} == "sparc64") -SRCS+= sunos32_machdep.c sunos_sigcode.s -.endif - -.include <bsd.kmod.mk> diff --git a/sys/lkm/compat/sunos32/lkminit_emul.c b/sys/lkm/compat/sunos32/lkminit_emul.c deleted file mode 100644 index ec6a8e8127b..00000000000 --- a/sys/lkm/compat/sunos32/lkminit_emul.c +++ /dev/null @@ -1,61 +0,0 @@ -/* $NetBSD: lkminit_emul.c,v 1.7 2008/04/28 20:24:06 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.7 2008/04/28 20:24:06 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/lkm.h> - -extern const struct emul emul_sunos; - -int compat_sunos32_lkmentry(struct lkm_table *, int, int); - -/* - * declare the emulation - */ -MOD_COMPAT("compat_sunos32", -1, &emul_sunos); - -/* - * entry point - */ -int -compat_sunos32_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); -} diff --git a/sys/lkm/compat/svr4/Makefile b/sys/lkm/compat/svr4/Makefile deleted file mode 100644 index 9227a25909a..00000000000 --- a/sys/lkm/compat/svr4/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# $NetBSD: Makefile,v 1.13 2007/04/22 08:30:01 dsl Exp $ - -.include "../Makefile.inc" -USE_32= -.include "../svr4/Makefile.common" - -# common source files -SRCS+= lkminit_emul.c -SRCS+= svr4_errno.c svr4_exec.c svr4_fcntl.c svr4_filio.c svr4_ioctl.c \ - svr4_ipc.c svr4_lwp.c svr4_misc.c svr4_net.c svr4_resource.c \ - svr4_signal.c svr4_socket.c svr4_sockio.c svr4_stat.c svr4_stream.c \ - svr4_syscalls.c svr4_sysent.c svr4_termios.c svr4_ttold.c -SRCS+= svr4_machdep.c - -# XXXX - temporary, not applicable for kernel with COMPAT_43 -#.PATH: $S/compat/common -#SRCS+= uipc_syscalls_43.c vfs_syscalls_43.c - -.if ${MACHINE} == "i386" -SRCS+= svr4_sigcode.S svr4_syscall.c -.endif - -.if ${MACHINE} == "sparc" -SRCS+= svr4_sigcode.s -.endif - -.if ${MACHINE} == "sparc64" -.if ${MACHINE_ARCH} == "sparc64" -SRCS+= svr4_sigcode64.s -.else -SRCS+= svr4_32_sigcode.s -.endif -.endif - -.include <bsd.kmod.mk> diff --git a/sys/lkm/compat/svr4/Makefile.common b/sys/lkm/compat/svr4/Makefile.common deleted file mode 100644 index 6ca5bc9c366..00000000000 --- a/sys/lkm/compat/svr4/Makefile.common +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile.common,v 1.5 2002/06/02 23:46:49 thorpej Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/svr4 $S/arch/${MACHINE}/${MACHINE} $S/arch/${MACHINE_ARCH}/${MACHINE_ARCH} - -CPPFLAGS+= -DCOMPAT_SVR4${USE_32} -DSYSVSEM -DSYSVMSG -DSYSVSHM \ - -DSVR4_COMPAT_SOLARIS2 -AFLAGS= -x assembler-with-cpp -traditional-cpp -D_KERNEL -D_LKM \ - -D_LOCORE -I. -I${S} - -KMOD= compat_svr4${USE_32} diff --git a/sys/lkm/compat/svr4/lkminit_emul.c b/sys/lkm/compat/svr4/lkminit_emul.c deleted file mode 100644 index 2b2d1cc82fb..00000000000 --- a/sys/lkm/compat/svr4/lkminit_emul.c +++ /dev/null @@ -1,101 +0,0 @@ -/* $NetBSD: lkminit_emul.c,v 1.12 2008/04/28 20:24:06 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.12 2008/04/28 20:24:06 martin Exp $"); - -#include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/proc.h> -#include <sys/lkm.h> - -extern const struct emul emul_svr4; - -int compat_svr4_lkmentry(struct lkm_table *, int, int); - -static int svr4_init(struct lkm_table *lkmtp, int cmd); -static int svr4_done(struct lkm_table *lkmtp, int cmd); - -/* - * declare the emulation - */ -MOD_COMPAT("compat_svr4", -1, &emul_svr4); - -/* - * entry point - */ -int -compat_svr4_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, svr4_init, svr4_done, lkm_nofunc); -} - -static int -svr4_init(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ -#ifdef i386 - /* - * XXX Yeah, this is ugly. - * Ideally, there would be some compat init/done routine, called - * by both this code and i386/machdep.c. However, that seems like - * overkill given that only svr4 compat needs an initialization. - */ -#define IDTVEC(name) __CONCAT(X, name) - extern void IDTVEC(svr4_fasttrap)(void); - - setgate(&idt[0xd2], &IDTVEC(svr4_fasttrap), 0, SDT_SYS386TGT, - SEL_UPL, GSEL(GCODE_SEL, SEL_KPL)); -#endif - - return (0); -} - -static int -svr4_done(struct lkm_table *lkmtp, int cmd) -{ -#ifdef i386 - /* XXX is this right? Wouldn't this cause null pointer dereference - * if some userland code would use the gate after the LKM is unloaded? - */ - setgate(&idt[0xd2], NULL, 0, SDT_SYS386TGT, - SEL_UPL, GSEL(GCODE_SEL, SEL_KPL)); -#endif - - return (0); -} diff --git a/sys/lkm/compat/svr4_32/Makefile b/sys/lkm/compat/svr4_32/Makefile deleted file mode 100644 index 5ee98742a50..00000000000 --- a/sys/lkm/compat/svr4_32/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# $NetBSD: Makefile,v 1.3 2005/12/11 12:24:47 christos Exp $ - -.include "../Makefile.inc" -USE_32=_32 -.PATH: $S/compat/svr4_32 -CPPFLAGS+=-DCOMPAT_NETBSD32 -.include "../svr4/Makefile.common" - -# common source files -SRCS+= lkminit_emul.c -SRCS+= svr4_32_exec.c svr4_32_fcntl.c svr4_32_ioctl.c svr4_32_ipc.c \ - svr4_32_lwp.c svr4_32_misc.c svr4_32_net.c svr4_32_resource.c \ - svr4_32_signal.c svr4_32_socket.c svr4_32_sockio.c svr4_32_stat.c \ - svr4_32_stream.c svr4_32_syscalls.c svr4_32_sysent.c svr4_32_termios.c \ -# ? -# svr4_errno.c -# svr4_filio.c -# svr4_ttold.c - -.if ${MACHINE} == "sparc64" -SRCS+= svr4_32_sigcode.s svr4_32_machdep.c -CPPFLAGS+= -D_LP64 -AFLAGS+= -D_LP64 -.endif - -.include <bsd.kmod.mk> diff --git a/sys/lkm/compat/svr4_32/lkminit_emul.c b/sys/lkm/compat/svr4_32/lkminit_emul.c deleted file mode 100644 index 7b6d6da3239..00000000000 --- a/sys/lkm/compat/svr4_32/lkminit_emul.c +++ /dev/null @@ -1,62 +0,0 @@ -/* $NetBSD: lkminit_emul.c,v 1.6 2008/04/28 20:24:06 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.6 2008/04/28 20:24:06 martin Exp $"); - -#include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/proc.h> -#include <sys/lkm.h> - -extern const struct emul emul_svr4_32; - -int compat_svr4_32_lkmentry(struct lkm_table *, int, int); - -/* - * declare the emulation - */ -MOD_COMPAT("compat_svr4_32", -1, &emul_svr4_32); - -/* - * entry point - */ -int -compat_svr4_32_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); -} diff --git a/sys/lkm/compat/ultrix/Makefile b/sys/lkm/compat/ultrix/Makefile deleted file mode 100644 index 8d8a5ae6c22..00000000000 --- a/sys/lkm/compat/ultrix/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# $NetBSD: Makefile,v 1.6 2001/12/12 11:44:47 lukem Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/ultrix $S/arch/${MACHINE}/${MACHINE} - -CPPFLAGS+= -DSYSVSEM -DSYSVMSG -DSYSVSHM -DCOMPAT_ULTRIX -CPPFLAGS+= -nostdinc -AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE -D_KERNEL \ - -I. -I${S} - -KMOD= compat_ultrix - -# common source files -SRCS+= lkminit_emul.c -SRCS+= ultrix_fs.c ultrix_ioctl.c ultrix_misc.c ultrix_pathname.c \ - ultrix_syscalls.c ultrix_sysent.c - -.if ${MACHINE_CPU} == "mips" -CPPFLAGS+= -DMIPS1 -DMIPS3 -.endif - -.include <bsd.kmod.mk> diff --git a/sys/lkm/compat/ultrix/lkminit_emul.c b/sys/lkm/compat/ultrix/lkminit_emul.c deleted file mode 100644 index 48fc0ebf483..00000000000 --- a/sys/lkm/compat/ultrix/lkminit_emul.c +++ /dev/null @@ -1,65 +0,0 @@ -/* $NetBSD: lkminit_emul.c,v 1.8 2008/04/28 20:24:06 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.8 2008/04/28 20:24:06 martin Exp $"); - -#include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -extern const struct emul emul_ultrix; - -int compat_ultrix_lkmentry(struct lkm_table *, int, int); - -/* - * declare the emulation - */ -MOD_COMPAT("compat_ultrix", -1, &emul_ultrix); - -/* - * entry point - */ -int -compat_ultrix_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); -} diff --git a/sys/lkm/dev/Makefile b/sys/lkm/dev/Makefile deleted file mode 100644 index 665675d7161..00000000000 --- a/sys/lkm/dev/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.5 2008/05/01 21:51:20 xtraeme Exp $ - -SUBDIR= vnd - -.if ${MACHINE} == "i386" || ${MACHINE} == "amd64" -SUBDIR+= isa -.endif - -.if ${MACHINE} == "i386" || ${MACHINE} == "alpha" -SUBDIR+= pci pcmcia -.endif - -.include <bsd.subdir.mk> diff --git a/sys/lkm/dev/Makefile.inc b/sys/lkm/dev/Makefile.inc deleted file mode 100644 index 295ef3aab41..00000000000 --- a/sys/lkm/dev/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.2 2006/05/07 20:48:01 christos Exp $ - -.include "../Makefile.inc" diff --git a/sys/lkm/dev/isa/Makefile b/sys/lkm/dev/isa/Makefile deleted file mode 100644 index a97826fbd9d..00000000000 --- a/sys/lkm/dev/isa/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# $NetBSD: Makefile,v 1.6 2008/05/01 21:51:20 xtraeme Exp $ - -SUBDIR= aps finsio itesio nsclpcsio smsc ug -# -# lm(4) not enabled as this might need a different I/O port. -# -#SUBDIR+= lm - -.include <bsd.subdir.mk> diff --git a/sys/lkm/dev/isa/Makefile.inc b/sys/lkm/dev/isa/Makefile.inc deleted file mode 100644 index 8a09e2b6eab..00000000000 --- a/sys/lkm/dev/isa/Makefile.inc +++ /dev/null @@ -1,33 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.11 2008/10/25 22:27:38 apb Exp $ - -.include "../Makefile.inc" - -TEMPL_DIR?= ${.CURDIR}/../common -TEMPL_FILE?= lkm_isa.c.tmpl - -LKM_ISA_IO_PORT?= -1 -LKM_ISA_SIZE?= 0 -LKM_ISA_IOMEM?= -1 -LKM_ISA_IOSIZE?= 0 -LKM_ISA_IRQ?= -1 -LKM_ISA_DRQ?= -1 -LKM_ISA_DRQ2?= -1 -LKM_ISA_DRVNAME_CA?= ${LKM_ISA_DRVNAME} - -NOMAN= # defined -WARNS= 4 -CLEANFILES+= ${TEMPL_FILE:S/.tmpl//} *~ ${KMOD} - -DPSRCS+= ${TEMPL_FILE:S/.tmpl//} - -${TEMPL_FILE:S/.tmpl//}: - ${TOOL_SED} -e "s|@LKM_ISA_IO_PORT@|${LKM_ISA_IO_PORT}|g" \ - -e "s|@LKM_ISA_SIZE@|${LKM_ISA_SIZE}|g" \ - -e "s|@LKM_ISA_IOMEM@|${LKM_ISA_IOMEM}|g" \ - -e "s|@LKM_ISA_IOSIZE@|${LKM_ISA_IOSIZE}|g" \ - -e "s|@LKM_ISA_IRQ@|${LKM_ISA_IRQ}|g" \ - -e "s|@LKM_ISA_DRQ@|${LKM_ISA_DRQ}|g" \ - -e "s|@LKM_ISA_DRQ2@|${LKM_ISA_DRQ2}|g" \ - -e "s|@LKM_ISA_DRVNAME@|${LKM_ISA_DRVNAME}|g" \ - -e "s|@LKM_ISA_DRVNAME_CA@|${LKM_ISA_DRVNAME_CA}|g" \ - ${TEMPL_DIR}/${TEMPL_FILE} > ${.OBJDIR}/${TEMPL_FILE:S/.tmpl//} diff --git a/sys/lkm/dev/isa/aps/Makefile b/sys/lkm/dev/isa/aps/Makefile deleted file mode 100644 index 7171da9c182..00000000000 --- a/sys/lkm/dev/isa/aps/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2008/04/05 19:03:57 xtraeme Exp $ - -S= ${.CURDIR}/../../../.. -.PATH: $S/dev/isa $S/dev/ic - -KMOD= aps -SRCS= real-aps.c lkm_isa.c -BUILDSYMLINKS+= aps.c real-aps.c - -LKM_ISA_IO_PORT= 0x1600 -LKM_ISA_DRVNAME= aps - -.include <bsd.kmod.mk> diff --git a/sys/lkm/dev/isa/common/lkm_isa.c.tmpl b/sys/lkm/dev/isa/common/lkm_isa.c.tmpl deleted file mode 100644 index fb390c9b714..00000000000 --- a/sys/lkm/dev/isa/common/lkm_isa.c.tmpl +++ /dev/null @@ -1,67 +0,0 @@ -/* $NetBSD: lkm_isa.c.tmpl,v 1.2 2008/04/26 20:10:15 xtraeme Exp $ */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/kernel.h> -#include <sys/device.h> -#include <sys/lkm.h> - -/* - * Common template for ISA drivers. - */ - -CFDRIVER_DECL(@LKM_ISA_DRVNAME@, DV_DULL, NULL); -extern struct cfattach @LKM_ISA_DRVNAME_CA@_ca; - -/* The ISA devices use 7 locators. */ -static int isaloc[] = { - @LKM_ISA_IO_PORT@, /* port */ - @LKM_ISA_SIZE@, /* size */ - @LKM_ISA_IOMEM@, /* iomem */ - @LKM_ISA_IOSIZE@, /* iosize */ - @LKM_ISA_IRQ@, /* irq */ - @LKM_ISA_DRQ@, /* drq */ - @LKM_ISA_DRQ2@, /* drq2 */ -}; - -static struct cfparent isaparent = { - "isa", "isa", DVUNIT_ANY -}; - -static struct cfdata @LKM_ISA_DRVNAME@_cfdata[] = { - { "@LKM_ISA_DRVNAME@", - "@LKM_ISA_DRVNAME_CA@", - 0, - FSTATE_NOTFOUND, - isaloc, - 0, - &isaparent }, - { .cf_pspec = NULL } -}; - -static struct cfdriver *@LKM_ISA_DRVNAME@_cfdrivers[] = { - &@LKM_ISA_DRVNAME@_cd, - NULL -}; - -static struct cfattach *@LKM_ISA_DRVNAME@_cfattachs[] = { - &@LKM_ISA_DRVNAME_CA@_ca, - NULL -}; - -static const struct cfattachlkminit @LKM_ISA_DRVNAME@_cfattachinit[] = { - { "@LKM_ISA_DRVNAME@", @LKM_ISA_DRVNAME@_cfattachs }, - { .cfai_list = NULL } -}; - -int @LKM_ISA_DRVNAME@_lkmentry(struct lkm_table *, int, int); - -MOD_DRV("@LKM_ISA_DRVNAME@", @LKM_ISA_DRVNAME@_cfdrivers, - @LKM_ISA_DRVNAME@_cfattachinit, @LKM_ISA_DRVNAME@_cfdata); - -int -@LKM_ISA_DRVNAME@_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - - DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); -} diff --git a/sys/lkm/dev/isa/finsio/Makefile b/sys/lkm/dev/isa/finsio/Makefile deleted file mode 100644 index 545aecb6903..00000000000 --- a/sys/lkm/dev/isa/finsio/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2008/04/05 19:03:57 xtraeme Exp $ - -S= ${.CURDIR}/../../../.. -.PATH: $S/dev/isa - -KMOD= finsio -SRCS+= lkm_isa.c finsio_isa.c - -LKM_ISA_IO_PORT= 0x4e -LKM_ISA_DRVNAME= finsio - -.include <bsd.kmod.mk> diff --git a/sys/lkm/dev/isa/itesio/Makefile b/sys/lkm/dev/isa/itesio/Makefile deleted file mode 100644 index e7847b5f199..00000000000 --- a/sys/lkm/dev/isa/itesio/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2008/04/05 19:03:57 xtraeme Exp $ - -S= ${.CURDIR}/../../../.. -.PATH: $S/dev/isa - -KMOD= itesio -SRCS+= lkm_isa.c itesio_isa.c - -LKM_ISA_IO_PORT= 0x2e -LKM_ISA_DRVNAME= itesio - -.include <bsd.kmod.mk> diff --git a/sys/lkm/dev/isa/lm/Makefile b/sys/lkm/dev/isa/lm/Makefile deleted file mode 100644 index e0766fbc0cc..00000000000 --- a/sys/lkm/dev/isa/lm/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.3 2008/04/05 19:03:57 xtraeme Exp $ - -S= ${.CURDIR}/../../../.. -.PATH: $S/dev/isa $S/dev/ic - -KMOD= lm -SRCS= lm_isa.c nslm7x.c lkm_isa.c - -LKM_ISA_IO_PORT= 0x290 # Change this to another port if desired -LKM_ISA_DRVNAME= lm -LKM_ISA_DRVNAME_CA= lm_isa - -.include <bsd.kmod.mk> diff --git a/sys/lkm/dev/isa/nsclpcsio/Makefile b/sys/lkm/dev/isa/nsclpcsio/Makefile deleted file mode 100644 index dd5cdebd703..00000000000 --- a/sys/lkm/dev/isa/nsclpcsio/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2008/04/05 19:03:57 xtraeme Exp $ - -S= ${.CURDIR}/../../../.. -.PATH: $S/dev/isa - -KMOD= nsclpcsio -SRCS= nsclpcsio_isa.c lkm_isa.c - -LKM_ISA_DRVNAME= nsclpcsio -LKM_ISA_DRVNAME_CA= nsclpcsio_isa - -.include <bsd.kmod.mk> diff --git a/sys/lkm/dev/isa/smsc/Makefile b/sys/lkm/dev/isa/smsc/Makefile deleted file mode 100644 index 5a1d0ef3a1e..00000000000 --- a/sys/lkm/dev/isa/smsc/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.5 2008/04/05 19:03:57 xtraeme Exp $ - -S= ${.CURDIR}/../../../.. -.PATH: $S/dev/isa - -KMOD= smsc -SRCS= real-smsc.c lkm_isa.c -BUILDSYMLINKS+= smsc.c real-smsc.c - -LKM_ISA_IO_PORT= 0x02e -LKM_ISA_DRVNAME= smsc - -.include <bsd.kmod.mk> diff --git a/sys/lkm/dev/isa/ug/Makefile b/sys/lkm/dev/isa/ug/Makefile deleted file mode 100644 index 358eacc8b90..00000000000 --- a/sys/lkm/dev/isa/ug/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.3 2008/04/05 19:03:57 xtraeme Exp $ - -S= ${.CURDIR}/../../../.. -.PATH: $S/dev/isa - -KMOD= ug -SRCS+= lkm_isa.c ug_isa.c - -LKM_ISA_IO_PORT= 0xe0 -LKM_ISA_DRVNAME= ug -LKM_ISA_DRVNAME_CA= ug_isa - -.include <bsd.kmod.mk> diff --git a/sys/lkm/dev/pci/Makefile b/sys/lkm/dev/pci/Makefile deleted file mode 100644 index 56faaa47066..00000000000 --- a/sys/lkm/dev/pci/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2005/12/11 12:24:47 christos Exp $ - -SUBDIR= dummy_pci - -.include <bsd.subdir.mk> diff --git a/sys/lkm/dev/pci/Makefile.inc b/sys/lkm/dev/pci/Makefile.inc deleted file mode 100644 index d3b5cbd3a79..00000000000 --- a/sys/lkm/dev/pci/Makefile.inc +++ /dev/null @@ -1,2 +0,0 @@ - -.include "../Makefile.inc" diff --git a/sys/lkm/dev/pci/dummy_pci/Makefile b/sys/lkm/dev/pci/dummy_pci/Makefile deleted file mode 100644 index 92b4d441383..00000000000 --- a/sys/lkm/dev/pci/dummy_pci/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2005/12/11 12:24:47 christos Exp $ - -S= ${.CURDIR}/../../../.. - -KMOD= dummy_pci -SRCS= dummy_pci_drv.c dummy_pci_lkm.c -NOMAN= #yes - -#CPPFLAGS+= -DDIAGNOSTIC -DLOCKDEBUG -CPPFLAGS+= -DDIAGNOSTIC -DDEBUG -WARNS= 2 - -.include <bsd.kmod.mk> diff --git a/sys/lkm/dev/pci/dummy_pci/dummy_pci_drv.c b/sys/lkm/dev/pci/dummy_pci/dummy_pci_drv.c deleted file mode 100644 index 22a443d4ef5..00000000000 --- a/sys/lkm/dev/pci/dummy_pci/dummy_pci_drv.c +++ /dev/null @@ -1,40 +0,0 @@ -/* $NetBSD: dummy_pci_drv.c,v 1.3 2008/07/09 13:15:40 joerg Exp $ */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/kernel.h> -#include <sys/device.h> - -#include <dev/pci/pcivar.h> - -struct mist_softc { -}; - -static int mist_match(device_t, cfdata_t, void *); -static void mist_attach(device_t, device_t, void *); -static int mist_detach(device_t, int); - -CFATTACH_DECL_NEW(mist, sizeof(struct mist_softc), - mist_match, mist_attach, mist_detach, NULL); - -int -mist_match(device_t parent, cfdata_t match, void *aux) -{ - - return (1); -} - -static void -mist_attach(device_t parent, device_t self, void *aux) -{ - - aprint_naive(": dummy catch-all PCI device\n"); - aprint_normal(": dummy catch-all PCI device\n"); -} - -static int -mist_detach(device_t self, int flags) -{ - - return (0); -} diff --git a/sys/lkm/dev/pci/dummy_pci/dummy_pci_lkm.c b/sys/lkm/dev/pci/dummy_pci/dummy_pci_lkm.c deleted file mode 100644 index 72803b561e4..00000000000 --- a/sys/lkm/dev/pci/dummy_pci/dummy_pci_lkm.c +++ /dev/null @@ -1,43 +0,0 @@ -/* $NetBSD: dummy_pci_lkm.c,v 1.3 2005/12/11 12:24:47 christos Exp $ */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/kernel.h> -#include <sys/device.h> -#include <sys/lkm.h> - -CFDRIVER_DECL(mist, DV_DULL, NULL); -extern struct cfattach mist_ca; - -static int pciloc[] = { -1, -1 }; /* device, function */ -static struct cfparent pciparent = { - "pci", "pci", DVUNIT_ANY -}; -static struct cfdata mist_cfdata[] = { - {"mist", "mist", 0, FSTATE_STAR, pciloc, 0, &pciparent}, - { 0 } -}; - -static struct cfdriver *mist_cfdrivers[] = { - &mist_cd, - NULL -}; -static struct cfattach *mist_cfattachs[] = { - &mist_ca, - NULL -}; -static const struct cfattachlkminit mist_cfattachinit[] = { - { "mist", mist_cfattachs }, - { NULL } -}; - -int dummy_pci_lkmentry(struct lkm_table *, int, int); -MOD_DRV("dummy_pci", mist_cfdrivers, mist_cfattachinit, - mist_cfdata); - -int -dummy_pci_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - - DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); -} diff --git a/sys/lkm/dev/pcmcia/Makefile b/sys/lkm/dev/pcmcia/Makefile deleted file mode 100644 index f2e8ae332b3..00000000000 --- a/sys/lkm/dev/pcmcia/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2005/12/11 12:24:48 christos Exp $ - -SUBDIR= wi_pcmcia - -.include <bsd.subdir.mk> diff --git a/sys/lkm/dev/pcmcia/Makefile.inc b/sys/lkm/dev/pcmcia/Makefile.inc deleted file mode 100644 index d3b5cbd3a79..00000000000 --- a/sys/lkm/dev/pcmcia/Makefile.inc +++ /dev/null @@ -1,2 +0,0 @@ - -.include "../Makefile.inc" diff --git a/sys/lkm/dev/pcmcia/wi_pcmcia/Makefile b/sys/lkm/dev/pcmcia/wi_pcmcia/Makefile deleted file mode 100644 index c223f6a5d52..00000000000 --- a/sys/lkm/dev/pcmcia/wi_pcmcia/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2005/12/11 12:24:48 christos Exp $ - -S= ${.CURDIR}/../../../.. - -KMOD= wi_pcmcia -SRCS= wi_pcmcia_lkm.c -NOMAN= #yes -WARNS= 2 - -#CPPFLAGS+= -DDIAGNOSTIC -DLOCKDEBUG -CPPFLAGS+= -DDIAGNOSTIC -DDEBUG - -.PATH: $S/dev/pcmcia $S/dev/ic -SRCS+= if_wi_pcmcia.c - -# if the "wi" driver backend is already in the -# kernel (as "wi at pci"), comment out / uncomment -SRCS+= wi.c -#CPPFLAGS+= -DWI_DRIVER_IS_PRESENT - -.include <bsd.kmod.mk> diff --git a/sys/lkm/dev/pcmcia/wi_pcmcia/bpfilter.h b/sys/lkm/dev/pcmcia/wi_pcmcia/bpfilter.h deleted file mode 100644 index 1dc01eb4072..00000000000 --- a/sys/lkm/dev/pcmcia/wi_pcmcia/bpfilter.h +++ /dev/null @@ -1,5 +0,0 @@ -/* $NetBSD: bpfilter.h,v 1.2 2005/12/11 12:24:48 christos Exp $ */ - -/* This is a hack. */ - -#define NBPFILTER 0 diff --git a/sys/lkm/dev/pcmcia/wi_pcmcia/wi_pcmcia_lkm.c b/sys/lkm/dev/pcmcia/wi_pcmcia/wi_pcmcia_lkm.c deleted file mode 100644 index 866e50c873c..00000000000 --- a/sys/lkm/dev/pcmcia/wi_pcmcia/wi_pcmcia_lkm.c +++ /dev/null @@ -1,48 +0,0 @@ -/* $NetBSD: wi_pcmcia_lkm.c,v 1.3 2005/12/11 12:24:48 christos Exp $ */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/kernel.h> -#include <sys/device.h> -#include <sys/lkm.h> - -#ifndef WI_DRIVER_IS_PRESENT -CFDRIVER_DECL(wi, DV_DULL, NULL); -#endif - -extern struct cfdriver wi_cd; -extern struct cfattach wi_pcmcia_ca; -extern struct cfiattrdata pcmciacf_iattrdata; - -static int pcmcialoc[] = { -1, -1 }; /* function, irq */ -static struct cfparent pcmciaparent = { - "pcmcia", "pcmcia", DVUNIT_ANY -}; -static struct cfdata wi_pcmcia_cfdata[] = { - {"wi", "wi_pcmcia", 0, FSTATE_STAR, pcmcialoc, 0, &pcmciaparent}, - { 0 } -}; - -static struct cfdriver *wi_pcmcia_cfdrivers[] = { - &wi_cd, - NULL -}; -static struct cfattach *wi_pcmcia_cfattachs[] = { - &wi_pcmcia_ca, - NULL -}; -static const struct cfattachlkminit wi_pcmcia_cfattachinit[] = { - { "wi", wi_pcmcia_cfattachs }, - { NULL } -}; - -int wi_pcmcia_lkmentry(struct lkm_table *, int, int); -MOD_DRV("wi_pcmcia", wi_pcmcia_cfdrivers, wi_pcmcia_cfattachinit, - wi_pcmcia_cfdata); - -int -wi_pcmcia_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - - DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); -} diff --git a/sys/lkm/dev/vnd/Makefile b/sys/lkm/dev/vnd/Makefile deleted file mode 100644 index 5c3549cbc03..00000000000 --- a/sys/lkm/dev/vnd/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2005/12/11 12:24:48 christos Exp $ - -.include "../Makefile.inc" - -.PATH: $S/kern - -KMOD= vnd - -SRCS= lkminit_vnd.c real-vnd.c - -BUILDSYMLINKS+=${S}/dev/vnd.c real-vnd.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/dev/vnd/lkminit_vnd.c b/sys/lkm/dev/vnd/lkminit_vnd.c deleted file mode 100644 index 86707ad6cd4..00000000000 --- a/sys/lkm/dev/vnd/lkminit_vnd.c +++ /dev/null @@ -1,103 +0,0 @@ -/* $NetBSD: lkminit_vnd.c,v 1.10 2008/06/13 14:22:22 cegger Exp $ */ - -/* - * Copyright (c) 2002 Matthew R. Green - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vnd.c,v 1.10 2008/06/13 14:22:22 cegger Exp $"); - -#include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> -#include <sys/device.h> - -CFDRIVER_DECL(vnd, DV_DISK, NULL); - -extern struct cfattach vnd_ca; -extern const struct bdevsw vnd_bdevsw; -extern const struct cdevsw vnd_cdevsw; -extern void vndattach (int); -extern int vnd_destroy (struct device *); - -static int vnd_lkm(struct lkm_table *lkmtp, int cmd); -int vnd_lkmentry(struct lkm_table *lkmtp, int cmd, int ver); - -MOD_DEV("vnd", "vnd", &vnd_bdevsw, -1, &vnd_cdevsw, -1); - -static int -vnd_lkm(struct lkm_table *lkmtp, int cmd) -{ - int error = 0, i; - device_t dev; - - if (cmd == LKM_E_LOAD) { - error = config_cfdriver_attach(&vnd_cd); - if (error) { - aprint_error("%s: unable to register cfdriver\n", - vnd_cd.cd_name); - return error; - } - - vndattach(0); - } else if (cmd == LKM_E_UNLOAD) { - for (i = 0; i < vnd_cd.cd_ndevs; i++) { - dev = device_lookup(&vnd_cd, i); - if (dev != NULL && - (error = vnd_destroy(dev)) != 0) - return 0; - } - - if ((error = config_cfattach_detach(vnd_cd.cd_name, - &vnd_ca)) != 0) { - aprint_error("%s: unable to deregister cfattach\n", - vnd_cd.cd_name); - return error; - } - - if ((error = config_cfdriver_detach(&vnd_cd)) != 0) { - aprint_error("%s: unable to deregister cfdriver\n", - vnd_cd.cd_name); - return error; - } - } - return (error); -} - -int -vnd_lkmentry (lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, vnd_lkm, vnd_lkm, lkm_nofunc); -} diff --git a/sys/lkm/exec/Makefile b/sys/lkm/exec/Makefile deleted file mode 100644 index 9d3927f7ea4..00000000000 --- a/sys/lkm/exec/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# $NetBSD: Makefile,v 1.16 2008/01/05 10:24:11 he Exp $ - -.if ${MACHINE} == "amd64" -SUBDIR+= linux_elf -.endif - -.if ${MACHINE} == "i386" -SUBDIR+= freebsd_aout freebsd_elf linux_elf svr4_elf pecoff -.endif - -.if ${MACHINE_ARCH} == "sparc64" -SUBDIR+= elf netbsd32_aout netbsd32_elf sunos32_aout svr4_32_elf -.endif - -# These are untested, but do compile. Once they are tested, -# move them above. - -.if !make(install) - -.if ${MACHINE} == "alpha" -SUBDIR+= linux_aout linux_elf osf1_ecoff -.endif - -.if ${MACHINE} == "i386" -SUBDIR+= aout ibcs2_coff ibcs2_elf ibcs2_xout linux_aout -.endif - -.if ${MACHINE_ARCH} == "m68k" -SUBDIR+= linux_aout linux_elf sunos_aout m68k4k -.endif - -.if ${MACHINE_ARCH} == "sparc" -SUBDIR+= aout sunos_aout svr4_elf -.endif - -.if ${MACHINE_ARCH} == "vax" -SUBDIR+= vax1k -.endif - -.endif # !make(install) - -.include <bsd.kinc.mk> diff --git a/sys/lkm/exec/Makefile.inc b/sys/lkm/exec/Makefile.inc deleted file mode 100644 index d34058f10e3..00000000000 --- a/sys/lkm/exec/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.3 2001/12/12 12:06:46 lukem Exp $ - -S!= cd ${.CURDIR}/../../..;pwd - -.include "../Makefile.inc" diff --git a/sys/lkm/exec/aout/Makefile b/sys/lkm/exec/aout/Makefile deleted file mode 100644 index 81222efdb15..00000000000 --- a/sys/lkm/exec/aout/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2002/05/30 18:53:14 thorpej Exp $ - -.include "../Makefile.inc" - -.PATH: $S/kern - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_AOUT - -KMOD= exec_a.out - -SRCS= lkminit_exec.c -SRCS+= exec_aout.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/aout/lkminit_exec.c b/sys/lkm/exec/aout/lkminit_exec.c deleted file mode 100644 index 33d32b9f38e..00000000000 --- a/sys/lkm/exec/aout/lkminit_exec.c +++ /dev/null @@ -1,78 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.8 2008/04/28 20:24:06 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.8 2008/04/28 20:24:06 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -int exec_aout_lkmentry(struct lkm_table *, int, int); - -extern const struct emul emul_netbsd; /* XXX */ - -static struct execsw exec_aout = - /* Native a.out */ - { sizeof(struct exec), - exec_aout_makecmds, - { NULL }, - &emul_netbsd, - EXECSW_PRIO_ANY, - 0, - copyargs, - setregs, - coredump_netbsd, - exec_setup_stack }; - -/* - * declare the exec - */ -MOD_EXEC("exec_aout", -1, &exec_aout, "aout"); - -/* - * entry point - */ -int -exec_aout_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/elf/Makefile b/sys/lkm/exec/elf/Makefile deleted file mode 100644 index e5af0c6715f..00000000000 --- a/sys/lkm/exec/elf/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $NetBSD: Makefile,v 1.5 2002/05/30 18:53:15 thorpej Exp $ - -.include "../Makefile.inc" - -.PATH: $S/kern - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_ELF32 -DELFSIZE=32 - -KMOD= exec_elf - -SRCS= lkminit_exec.c -SRCS+= exec_elf32.c core_elf32.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/elf/lkminit_exec.c b/sys/lkm/exec/elf/lkminit_exec.c deleted file mode 100644 index 37bf0ca99ed..00000000000 --- a/sys/lkm/exec/elf/lkminit_exec.c +++ /dev/null @@ -1,81 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.10 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.10 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/exec_elf.h> -#include <sys/signalvar.h> - -int exec_elf_lkmentry(struct lkm_table *, int, int); - -extern const struct emul emul_netbsd; /* XXX */ -extern int netbsd_elf32_probe(struct lwp *, struct exec_package *, void *, - char *, vaddr_t *); - -static struct execsw exec_elf = - /* Native Elf32 */ - { sizeof (Elf32_Ehdr), - exec_elf32_makecmds, - { netbsd_elf32_probe }, - &emul_netbsd, - EXECSW_PRIO_ANY, - howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)), - elf32_copyargs, - NULL, - coredump_elf32, - exec_setup_stack }; /* XXX XXX XXX */ - -/* - * declare the exec - */ -MOD_EXEC("exec_elf", -1, &exec_elf, "elf"); - -/* - * entry point - */ -int -exec_elf_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/freebsd_aout/Makefile b/sys/lkm/exec/freebsd_aout/Makefile deleted file mode 100644 index 5517db35f75..00000000000 --- a/sys/lkm/exec/freebsd_aout/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -# $NetBSD: Makefile,v 1.5 2002/05/30 18:53:16 thorpej Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/freebsd -.PATH: $S/compat/common - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_AOUT - -KMOD= exec_freebsd_aout - -SRCS= lkminit_exec.c -SRCS+= freebsd_exec_aout.c -SRCS+= compat_exec.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/freebsd_aout/lkminit_exec.c b/sys/lkm/exec/freebsd_aout/lkminit_exec.c deleted file mode 100644 index 74867d3fc0b..00000000000 --- a/sys/lkm/exec/freebsd_aout/lkminit_exec.c +++ /dev/null @@ -1,81 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/exec_aout.h> -#include <sys/exec_elf.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -#include <compat/freebsd/freebsd_exec.h> - -int exec_freebsd_aout_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_freebsd_aout = - /* FreeBSD a.out (native word size) */ - { FREEBSD_AOUT_HDR_SIZE, - exec_freebsd_aout_makecmds, - { NULL }, - NULL, - EXECSW_PRIO_ANY, - 0, - copyargs, - NULL, - coredump_netbsd, - exec_setup_stack }; - - -/* - * declare the exec - */ -MOD_EXEC("exec_freebsd_aout", -1, &exec_freebsd_aout, "freebsd"); - -/* - * entry point - */ -int -exec_freebsd_aout_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/freebsd_elf/Makefile b/sys/lkm/exec/freebsd_elf/Makefile deleted file mode 100644 index 9fe88cdbaa3..00000000000 --- a/sys/lkm/exec/freebsd_elf/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $NetBSD: Makefile,v 1.7 2007/05/12 10:45:01 dsl Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/freebsd - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_ELF32 - -KMOD= exec_freebsd_elf - -SRCS= lkminit_exec.c -SRCS+= freebsd_exec_elf32.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/freebsd_elf/lkminit_exec.c b/sys/lkm/exec/freebsd_elf/lkminit_exec.c deleted file mode 100644 index 024a20ca43a..00000000000 --- a/sys/lkm/exec/freebsd_elf/lkminit_exec.c +++ /dev/null @@ -1,83 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.13 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.13 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -#include <machine/elf_machdep.h> -#define ELFSIZE 32 -#include <sys/exec_elf.h> - -#include <compat/freebsd/freebsd_exec.h> - -int exec_freebsd_elf_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_freebsd_elf = - /* FreBSD Elf32 (probe not 64-bit safe) */ - { sizeof (Elf32_Ehdr), - exec_elf32_makecmds, - { ELFNAME2(freebsd,probe) }, - NULL, - EXECSW_PRIO_ANY, - howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof(Elf32_Addr)), - elf32_copyargs, - NULL, - coredump_elf32, - exec_setup_stack }; - - -/* - * declare the exec - */ -MOD_EXEC("exec_freebsd_elf", -1, &exec_freebsd_elf, "freebsd"); - -/* - * entry point - */ -int -exec_freebsd_elf_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/ibcs2_coff/Makefile b/sys/lkm/exec/ibcs2_coff/Makefile deleted file mode 100644 index 94f594c7cac..00000000000 --- a/sys/lkm/exec/ibcs2_coff/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $NetBSD: Makefile,v 1.6 2005/12/11 12:24:48 christos Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/ibcs2 - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_COFF - -KMOD= exec_ibcs2_coff - -SRCS= lkminit_exec.c -SRCS+= ibcs2_exec_coff.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/ibcs2_coff/lkminit_exec.c b/sys/lkm/exec/ibcs2_coff/lkminit_exec.c deleted file mode 100644 index 0d8c825e0c7..00000000000 --- a/sys/lkm/exec/ibcs2_coff/lkminit_exec.c +++ /dev/null @@ -1,80 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/exec_coff.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -#include <compat/ibcs2/ibcs2_exec.h> -#include <machine/ibcs2_machdep.h> - -int exec_ibcs2_coff_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_ibcs2_coff = - /* iBCS2 COFF (native word size) */ - { COFF_HDR_SIZE, - exec_ibcs2_coff_makecmds, - { NULL }, - NULL, - EXECSW_PRIO_ANY, - 0, - copyargs, - NULL, - coredump_netbsd, - exec_setup_stack }; - -/* - * declare the exec - */ -MOD_EXEC("exec_ibcs2_coff", -1, &exec_ibcs2_coff, "ibcs2"); - -/* - * entry point - */ -int -exec_ibcs2_coff_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/ibcs2_elf/Makefile b/sys/lkm/exec/ibcs2_elf/Makefile deleted file mode 100644 index e1d19857a21..00000000000 --- a/sys/lkm/exec/ibcs2_elf/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2002/05/30 18:53:18 thorpej Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/ibcs2 - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_ELF32 - -KMOD= exec_ibcs2_elf - -SRCS= lkminit_exec.c -SRCS+= ibcs2_exec_elf32.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/ibcs2_elf/lkminit_exec.c b/sys/lkm/exec/ibcs2_elf/lkminit_exec.c deleted file mode 100644 index 06eeced4feb..00000000000 --- a/sys/lkm/exec/ibcs2_elf/lkminit_exec.c +++ /dev/null @@ -1,82 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.12 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.12 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -#include <machine/elf_machdep.h> -#define ELFSIZE 32 -#include <sys/exec_elf.h> - -#include <compat/ibcs2/ibcs2_exec.h> - -int exec_ibcs2_elf_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_ibcs2_elf = - /* SCO Elf32 */ - { sizeof (Elf32_Ehdr), - exec_elf32_makecmds, - { ELFNAME2(ibcs2,probe) }, - &emul_ibcs2, - EXECSW_PRIO_ANY, - howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)), - elf32_copyargs, - NULL, - coredump_elf32, - exec_setup_stack }; - -/* - * declare the exec - */ -MOD_EXEC("exec_ibcs2_elf", -1, &exec_ibcs2_elf, "ibcs2"); - -/* - * entry point - */ -int -exec_ibcs2_elf_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/ibcs2_xout/Makefile b/sys/lkm/exec/ibcs2_xout/Makefile deleted file mode 100644 index 6bb87d66f4d..00000000000 --- a/sys/lkm/exec/ibcs2_xout/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2002/05/30 18:53:18 thorpej Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/ibcs2 - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_ELF32 -DEXEC_ELF64 - -KMOD= exec_ibcs2_xout - -SRCS= lkminit_exec.c -SRCS+= ibcs2_exec_xout.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/ibcs2_xout/lkminit_exec.c b/sys/lkm/exec/ibcs2_xout/lkminit_exec.c deleted file mode 100644 index 515dee6f5a2..00000000000 --- a/sys/lkm/exec/ibcs2_xout/lkminit_exec.c +++ /dev/null @@ -1,79 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -#include <compat/ibcs2/ibcs2_exec.h> -#include <machine/ibcs2_machdep.h> - -int exec_ibcs2_xout_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_ibcs2_xout = - /* iBCS2 x.out (native word size) */ - { XOUT_HDR_SIZE, - exec_ibcs2_xout_makecmds, - { NULL }, - NULL, - EXECSW_PRIO_ANY, - 0, - copyargs, - NULL, - coredump_netbsd, - exec_setup_stack }; - -/* - * declare the exec - */ -MOD_EXEC("exec_ibcs2_xout", -1, &exec_ibcs2_xout, "ibcs2"); - -/* - * entry point - */ -int -exec_ibcs2_xout_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/linux_aout/Makefile b/sys/lkm/exec/linux_aout/Makefile deleted file mode 100644 index 05ca634cafb..00000000000 --- a/sys/lkm/exec/linux_aout/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# $NetBSD: Makefile,v 1.8 2005/12/11 12:24:48 christos Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/linux/common -.PATH: $S/compat/linux/arch/${MACHINE_ARCH} - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_AOUT -DCOMPAT_LINUX - -KMOD= exec_linux_aout - -SRCS= lkminit_exec.c -SRCS+= linux_exec_aout.c - -.if ${MACHINE} == "i386" -SRCS+= linux_exec_machdep.c -.endif - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/linux_aout/lkminit_exec.c b/sys/lkm/exec/linux_aout/lkminit_exec.c deleted file mode 100644 index 54bcee4423e..00000000000 --- a/sys/lkm/exec/linux_aout/lkminit_exec.c +++ /dev/null @@ -1,80 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/exec_aout.h> -#include <sys/exec_elf.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -#include <compat/linux/common/linux_exec.h> - -int exec_linux_aout_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_linux_aout = - /* Linux a.out (native word size) */ - { LINUX_AOUT_HDR_SIZE, - exec_linux_aout_makecmds, - { NULL }, - NULL, - EXECSW_PRIO_ANY, - LINUX_AOUT_AUX_ARGSIZ, - linux_aout_copyargs, - NULL, - coredump_netbsd, - linux_exec_setup_stack }; - -/* - * declare the exec - */ -MOD_EXEC("exec_linux_aout", -1, &exec_linux_aout, "linux"); - -/* - * entry point - */ -int -exec_linux_aout_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/linux_elf/Makefile b/sys/lkm/exec/linux_elf/Makefile deleted file mode 100644 index 4f5a2fc1dc5..00000000000 --- a/sys/lkm/exec/linux_elf/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# $NetBSD: Makefile,v 1.10 2007/10/19 18:52:13 njoly Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/linux/common -.PATH: $S/compat/linux/arch/${MACHINE} -.PATH: $S/compat/linux/arch/${MACHINE_ARCH} - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_ELF32 -DEXEC_ELF64 - -KMOD= exec_linux_elf - -SRCS= lkminit_exec.c - -.if ${MACHINE} == "amd64" || ${MACHINE} == "i386" -SRCS+= linux_exec_machdep.c -.endif - -.if ${MACHINE} == "alpha" || ${MACHINE} == "amd64" || ${MACHINE} == "sparc64" -CPPFLAGS+= -DELFSIZE=64 -SRCS+= linux_exec_elf64.c -.else -CPPFLAGS+= -DELFSIZE=32 -SRCS+= linux_exec_elf32.c -.endif - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/linux_elf/lkminit_exec.c b/sys/lkm/exec/linux_elf/lkminit_exec.c deleted file mode 100644 index 989b8eb92af..00000000000 --- a/sys/lkm/exec/linux_elf/lkminit_exec.c +++ /dev/null @@ -1,81 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.13 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.13 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -#include <machine/elf_machdep.h> -#include <sys/exec_elf.h> - -#include <compat/linux/common/linux_exec.h> - -int exec_linux_elf_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_linux_elf = - /* Linux Elf */ - { sizeof (Elf_Ehdr), - ELFNAME2(exec,makecmds), - { ELFNAME2(linux,probe) }, - NULL, /* will be set by exec_add() */ - EXECSW_PRIO_ANY, - LINUX_ELF_AUX_ARGSIZ, - ELFNAME2(linux,copyargs), - NULL, - ELFNAMEEND(coredump), - linux_exec_setup_stack }; - -/* - * declare the exec - */ -MOD_EXEC("exec_linux_elf", -1, &exec_linux_elf, "linux"); - -/* - * entry point - */ -int -exec_linux_elf_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/m68k4k/Makefile b/sys/lkm/exec/m68k4k/Makefile deleted file mode 100644 index f8917848f9a..00000000000 --- a/sys/lkm/exec/m68k4k/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2002/05/30 18:53:19 thorpej Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/m68k4k - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_AOUT - -KMOD= exec_m68k4k - -SRCS= lkminit_exec.c -SRCS+= m68k4k_exec.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/m68k4k/lkminit_exec.c b/sys/lkm/exec/m68k4k/lkminit_exec.c deleted file mode 100644 index e329b1f10ef..00000000000 --- a/sys/lkm/exec/m68k4k/lkminit_exec.c +++ /dev/null @@ -1,78 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -#include <compat/m68k4k/m68k4k_exec.h> - -int exec_m68k4k_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_m68k4k = - /* NetBSD a.out for m68k4k */ - { sizeof(struct exec), - exec_m68k4k_makecmds, - { NULL }, - NULL, - EXECSW_PRIO_ANY, - 0, - copyargs, - NULL, - coredump_netbsd, - exec_setup_stack }; - -/* - * declare the exec - */ -MOD_EXEC("exec_m68k4k", -1, &exec_m68k4k, "netbsd"); - -/* - * entry point - */ -int -exec_m68k4k_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/netbsd32_aout/Makefile b/sys/lkm/exec/netbsd32_aout/Makefile deleted file mode 100644 index 110f0c7dc79..00000000000 --- a/sys/lkm/exec/netbsd32_aout/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2002/05/30 18:53:20 thorpej Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/netbsd32 - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_AOUT -DCOMPAT_NETBSD32 - -KMOD= exec_netbsd32_aout - -SRCS= lkminit_exec.c -SRCS+= netbsd32_exec_aout.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/netbsd32_aout/lkminit_exec.c b/sys/lkm/exec/netbsd32_aout/lkminit_exec.c deleted file mode 100644 index 5a5c7f049b2..00000000000 --- a/sys/lkm/exec/netbsd32_aout/lkminit_exec.c +++ /dev/null @@ -1,79 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -#include <sys/exec_aout.h> -#include <compat/netbsd32/netbsd32_exec.h> - -int exec_netbsd32_aout_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_netbsd32_aout = - /* 32-bit NetBSD a.out on 64-bit */ - { sizeof(struct netbsd32_exec), - exec_netbsd32_makecmds, - { NULL }, - NULL, - EXECSW_PRIO_FIRST, - 0, - netbsd32_copyargs, - NULL, - coredump_netbsd, - exec_setup_stack }; - -/* - * declare the exec - */ -MOD_EXEC("exec_netbsd32_aout", -1, &exec_netbsd32_aout, "netbsd32"); - -/* - * entry point - */ -int -exec_netbsd32_aout_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/netbsd32_elf/Makefile b/sys/lkm/exec/netbsd32_elf/Makefile deleted file mode 100644 index 660b07f82a9..00000000000 --- a/sys/lkm/exec/netbsd32_elf/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $NetBSD: Makefile,v 1.6 2005/12/11 12:24:48 christos Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/netbsd32 - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_ELF32 -DCOMPAT_NETBSD32 - -KMOD= exec_netbsd32_elf - -SRCS= lkminit_exec.c -SRCS+= netbsd32_exec_elf32.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/netbsd32_elf/lkminit_exec.c b/sys/lkm/exec/netbsd32_elf/lkminit_exec.c deleted file mode 100644 index 1237eaef5af..00000000000 --- a/sys/lkm/exec/netbsd32_elf/lkminit_exec.c +++ /dev/null @@ -1,82 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.11 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.11 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -#include <machine/elf_machdep.h> -#define ELFSIZE 32 -#include <sys/exec_elf.h> - -#include <compat/netbsd32/netbsd32_exec.h> - -int exec_netbsd32_elf_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_netbsd32_elf = - /* Elf32 NetBSD on 64-bit */ - { sizeof (Elf32_Ehdr), - exec_elf32_makecmds, - { ELFNAME2(netbsd32,probe) }, - NULL, - EXECSW_PRIO_FIRST, - howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)), - netbsd32_elf32_copyargs, - NULL, - coredump_elf32, - exec_setup_stack }; - -/* - * declare the exec - */ -MOD_EXEC("exec_netbsd32_elf", -1, &exec_netbsd32_elf, "netbsd32"); - -/* - * entry point - */ -int -exec_netbsd32_elf_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/osf1_ecoff/Makefile b/sys/lkm/exec/osf1_ecoff/Makefile deleted file mode 100644 index 272ce74e804..00000000000 --- a/sys/lkm/exec/osf1_ecoff/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2002/05/30 18:53:21 thorpej Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/osf1 - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_ECOFF - -KMOD= exec_osf1_ecoff - -SRCS= lkminit_exec.c -SRCS+= osf1_exec_ecoff.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/osf1_ecoff/lkminit_exec.c b/sys/lkm/exec/osf1_ecoff/lkminit_exec.c deleted file mode 100644 index 23d6bc587af..00000000000 --- a/sys/lkm/exec/osf1_ecoff/lkminit_exec.c +++ /dev/null @@ -1,81 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.10 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.10 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/exec_ecoff.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -#include <compat/osf1/osf1.h> -#include <compat/osf1/osf1_exec.h> - -int exec_osf1_ecoff_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_osf1_ecoff = - /* OSF/1 (Digital Unix) ECOFF */ - { ECOFF_HDR_SIZE, - exec_ecoff_makecmds, - { .ecoff_probe_func = osf1_exec_ecoff_probe }, - NULL, - EXECSW_PRIO_ANY, - howmany(OSF1_MAX_AUX_ENTRIES * sizeof (struct osf1_auxv) + - 2 * (MAXPATHLEN + 1), sizeof (char *)), /* exec & loader names */ - osf1_copyargs, - cpu_exec_ecoff_setregs, - coredump_netbsd, - exec_setup_stack }; - -/* - * declare the exec - */ -MOD_EXEC("exec_osf1_ecoff", -1, &exec_osf1_ecoff, "osf1"); - -/* - * entry point - */ -int -exec_osf1_ecoff_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/pecoff/Makefile b/sys/lkm/exec/pecoff/Makefile deleted file mode 100644 index f392818ed34..00000000000 --- a/sys/lkm/exec/pecoff/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $NetBSD: Makefile,v 1.6 2008/03/10 01:22:05 dholland Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/pecoff - -CPPFLAGS+= -nostdinc -D_KERNEL -DCOMPAT_PECOFF - -KMOD= exec_pecoff - -SRCS= lkminit_exec.c -SRCS+= pecoff_exec.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/pecoff/lkminit_exec.c b/sys/lkm/exec/pecoff/lkminit_exec.c deleted file mode 100644 index 44722fcedf8..00000000000 --- a/sys/lkm/exec/pecoff/lkminit_exec.c +++ /dev/null @@ -1,79 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.8 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.8 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -#include <sys/exec_coff.h> -#include <compat/pecoff/pecoff_exec.h> - -int exec_pecoff_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_pecoff = - /* Win32/WinCE PE/COFF (native word size) */ - { PECOFF_HDR_SIZE, - exec_pecoff_makecmds, - { NULL }, - NULL, /* will be set by exec_add() */ - EXECSW_PRIO_ANY, - howmany(sizeof(struct pecoff_args), sizeof(char *)), - pecoff_copyargs, - NULL, - coredump_netbsd, - exec_setup_stack }; - -/* - * declare the exec - */ -MOD_EXEC("exec_pecoff", -1, &exec_pecoff, "pecoff"); - -/* - * entry point - */ -int -exec_pecoff_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/sunos32_aout/Makefile b/sys/lkm/exec/sunos32_aout/Makefile deleted file mode 100644 index ffd5e28bae7..00000000000 --- a/sys/lkm/exec/sunos32_aout/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $NetBSD: Makefile,v 1.6 2005/12/11 12:24:48 christos Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/sunos32 - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_AOUT -DCOMPAT_NETBSD32 - -KMOD= exec_sunos32_aout - -SRCS= lkminit_exec.c -SRCS+= sunos32_exec_aout.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/sunos32_aout/lkminit_exec.c b/sys/lkm/exec/sunos32_aout/lkminit_exec.c deleted file mode 100644 index e945571c916..00000000000 --- a/sys/lkm/exec/sunos32_aout/lkminit_exec.c +++ /dev/null @@ -1,79 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -#include <compat/netbsd32/netbsd32_exec.h> -#include <compat/sunos32/sunos32_exec.h> - -int exec_sunos32_aout_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_sunos32_aout = - /* 32-bit SunOS a.out on 64-bit */ - { SUNOS32_AOUT_HDR_SIZE, - exec_sunos32_aout_makecmds, - { NULL }, - NULL, - EXECSW_PRIO_ANY, - 0, - netbsd32_copyargs, - NULL, - coredump_netbsd, - exec_setup_stack }; - -/* - * declare the exec - */ -MOD_EXEC("exec_sunos32_aout", -1, &exec_sunos32_aout, "sunos32"); - -/* - * entry point - */ -int -exec_sunos32_aout_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/sunos_aout/Makefile b/sys/lkm/exec/sunos_aout/Makefile deleted file mode 100644 index e463d020e05..00000000000 --- a/sys/lkm/exec/sunos_aout/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2002/05/30 18:53:23 thorpej Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/sunos - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_AOUT - -KMOD= exec_sunos_aout - -SRCS= lkminit_exec.c -SRCS+= sunos_exec_aout.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/sunos_aout/lkminit_exec.c b/sys/lkm/exec/sunos_aout/lkminit_exec.c deleted file mode 100644 index 3b496a81980..00000000000 --- a/sys/lkm/exec/sunos_aout/lkminit_exec.c +++ /dev/null @@ -1,78 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -#include <compat/sunos/sunos_exec.h> - -int exec_sunos_aout_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_sunos_aout = - /* SunOS a.out (native word size) */ - { SUNOS_AOUT_HDR_SIZE, - exec_sunos_aout_makecmds, - { NULL }, - NULL, - EXECSW_PRIO_ANY, - 0, - copyargs, - NULL, - coredump_netbsd, - exec_setup_stack }; - -/* - * declare the exec - */ -MOD_EXEC("exec_sunos_aout", -1, &exec_sunos_aout, "sunos"); - -/* - * entry point - */ -int -exec_sunos_aout_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/svr4_32_elf/Makefile b/sys/lkm/exec/svr4_32_elf/Makefile deleted file mode 100644 index ecabe3a92f8..00000000000 --- a/sys/lkm/exec/svr4_32_elf/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $NetBSD: Makefile,v 1.6 2005/12/11 12:24:49 christos Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/svr4_32 - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_ELF32 -DCOMPAT_NETBSD32 - -KMOD= exec_svr4_32_elf - -SRCS= lkminit_exec.c -SRCS+= svr4_32_exec_elf32.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/svr4_32_elf/lkminit_exec.c b/sys/lkm/exec/svr4_32_elf/lkminit_exec.c deleted file mode 100644 index 55c8a5de1b1..00000000000 --- a/sys/lkm/exec/svr4_32_elf/lkminit_exec.c +++ /dev/null @@ -1,83 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.10 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.10 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -#include <machine/elf_machdep.h> -#define ELFSIZE 32 -#include <sys/exec_elf.h> - -#include <compat/svr4_32/svr4_32_types.h> -#include <compat/svr4_32/svr4_32_exec.h> - -int exec_svr4_32_elf_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_svr4_32_elf = - /* SVR4 Elf32 on 64-bit */ - { sizeof (Elf_Ehdr), - exec_elf32_makecmds, - { ELFNAME2(svr4_32,probe) }, - NULL, - EXECSW_PRIO_ANY, - SVR4_32_AUX_ARGSIZ, - svr4_32_copyargs, - NULL, - coredump_elf32, - exec_setup_stack }; - -/* - * declare the exec - */ -MOD_EXEC("exec_svr4_32_elf", -1, &exec_svr4_32_elf, "svr4_32"); - -/* - * entry point - */ -int -exec_svr4_32_elf_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/svr4_elf/Makefile b/sys/lkm/exec/svr4_elf/Makefile deleted file mode 100644 index fa468978842..00000000000 --- a/sys/lkm/exec/svr4_elf/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# $NetBSD: Makefile,v 1.8 2007/05/12 10:45:01 dsl Exp $ - -.include "../Makefile.inc" - -.if ${MACHINE} == sparc64 && ${MACHINE_ARCH} == sparc64 -ELFSIZE=64 -.else -ELFSIZE=32 -.endif - -.PATH: $S/compat/svr4 - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_ELF${ELFSIZE} \ - -DELFSIZE=${ELFSIZE} - -KMOD= exec_svr4_elf - -SRCS= lkminit_exec.c -SRCS+= svr4_exec_elf${ELFSIZE}.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/svr4_elf/lkminit_exec.c b/sys/lkm/exec/svr4_elf/lkminit_exec.c deleted file mode 100644 index 0b1ab0cfc9a..00000000000 --- a/sys/lkm/exec/svr4_elf/lkminit_exec.c +++ /dev/null @@ -1,97 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.13 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.13 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -#include <machine/elf_machdep.h> -#ifndef ELFSIZE -#define ELFSIZE 32 -#endif -#include <sys/exec_elf.h> - -#include <compat/svr4/svr4_exec.h> - -int exec_svr4_elf_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_svr4_elf = -#if ELFSIZE == 32 - /* SVR4 Elf32 */ - { sizeof (Elf_Ehdr), - exec_elf32_makecmds, - { ELFNAME2(svr4,probe) }, - NULL, - EXECSW_PRIO_ANY, - howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)), - elf32_copyargs, - NULL, - coredump_elf32, - exec_setup_stack }; -#else - /* SVR4 Elf64 */ - { sizeof (Elf64_Ehdr), - exec_elf64_makecmds, - { ELFNAME2(svr4,probe) }, - NULL, - EXECSW_PRIO_ANY, - howmany(ELF_AUX_ENTRIES * sizeof(Aux64Info), sizeof (Elf64_Addr)), - elf64_copyargs, - NULL, - coredump_elf64 }; -#endif - -/* - * declare the exec - */ -MOD_EXEC("exec_svr4_elf", -1, &exec_svr4_elf, "svr4"); - -/* - * entry point - */ -int -exec_svr4_elf_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/ultrix_ecoff/Makefile b/sys/lkm/exec/ultrix_ecoff/Makefile deleted file mode 100644 index 9bbf3c217b1..00000000000 --- a/sys/lkm/exec/ultrix_ecoff/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -# $NetBSD: Makefile,v 1.9 2005/12/11 12:24:49 christos Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/ultrix - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_ECOFF - -KMOD= exec_ultrix_ecoff - -SRCS= lkminit_exec.c -SRCS+= ultrix_exec_ecoff.c - -BUILDSYMLINKS+=${S}/arch/mips/include mips - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/ultrix_ecoff/lkminit_exec.c b/sys/lkm/exec/ultrix_ecoff/lkminit_exec.c deleted file mode 100644 index a160f1232fb..00000000000 --- a/sys/lkm/exec/ultrix_ecoff/lkminit_exec.c +++ /dev/null @@ -1,79 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/exec_ecoff.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -#include <compat/ultrix/ultrix_exec.h> - -int exec_ultrix_ecoff_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_ultrix_ecoff = - /* Ultrix ECOFF */ - { ECOFF_HDR_SIZE, - exec_ecoff_makecmds, - { .ecoff_probe_func = ultrix_exec_ecoff_probe }, - NULL, - EXECSW_PRIO_LAST, /* XXX probe func alw. succeeds */ - 0, - copyargs, - cpu_exec_ecoff_setregs, - coredump_netbsd, - exec_setup_stack }; - -/* - * declare the exec - */ -MOD_EXEC("exec_ultrix_ecoff", -1, &exec_ultrix_ecoff, "ultrix"); - -/* - * entry point - */ -int -exec_ultrix_ecoff_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/exec/vax1k/Makefile b/sys/lkm/exec/vax1k/Makefile deleted file mode 100644 index afbaf551070..00000000000 --- a/sys/lkm/exec/vax1k/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $NetBSD: Makefile,v 1.5 2002/05/30 18:53:26 thorpej Exp $ - -.include "../Makefile.inc" - -.PATH: $S/compat/vax1k - -CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_AOUT - -KMOD= exec_vax1k - -SRCS= lkminit_exec.c -SRCS+= vax1k_exec.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/exec/vax1k/lkminit_exec.c b/sys/lkm/exec/vax1k/lkminit_exec.c deleted file mode 100644 index 61775cb4115..00000000000 --- a/sys/lkm/exec/vax1k/lkminit_exec.c +++ /dev/null @@ -1,78 +0,0 @@ -/* $NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.9 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/proc.h> -#include <sys/lkm.h> -#include <sys/signalvar.h> - -#include <compat/vax1k/vax1k_exec.h> - -int exec_vax1k_lkmentry(struct lkm_table *, int, int); - -static struct execsw exec_vax1k = - /* NetBSD vax1k a.out */ - { sizeof(struct exec), - exec_vax1k_makecmds, - { NULL }, - NULL, - EXECSW_PRIO_ANY, - 0, - copyargs, - NULL, - coredump_netbsd, - exec_setup_stack }; - -/* - * declare the exec - */ -MOD_EXEC("exec_vax1k", -1, &exec_vax1k, "netbsd"); - -/* - * entry point - */ -int -exec_vax1k_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - DISPATCH(lkmtp, cmd, ver, - lkm_nofunc, - lkm_nofunc, - lkm_nofunc); -} diff --git a/sys/lkm/kauth/Makefile b/sys/lkm/kauth/Makefile deleted file mode 100644 index e69de29bb2d..00000000000 --- a/sys/lkm/kauth/Makefile +++ /dev/null diff --git a/sys/lkm/kauth/Makefile.inc b/sys/lkm/kauth/Makefile.inc deleted file mode 100644 index e69de29bb2d..00000000000 --- a/sys/lkm/kauth/Makefile.inc +++ /dev/null diff --git a/sys/lkm/kauth/secmodel_bsd44/Makefile b/sys/lkm/kauth/secmodel_bsd44/Makefile deleted file mode 100644 index e69de29bb2d..00000000000 --- a/sys/lkm/kauth/secmodel_bsd44/Makefile +++ /dev/null diff --git a/sys/lkm/kauth/secmodel_bsd44/secmodel_bsd44_lkminit.c b/sys/lkm/kauth/secmodel_bsd44/secmodel_bsd44_lkminit.c deleted file mode 100644 index a121e3c1542..00000000000 --- a/sys/lkm/kauth/secmodel_bsd44/secmodel_bsd44_lkminit.c +++ /dev/null @@ -1,79 +0,0 @@ -/* $NetBSD: secmodel_bsd44_lkminit.c,v 1.2 2007/11/21 22:49:07 elad Exp $ */ - -/*- - * Copyright (c) 2007 Elad Efrat <elad@NetBSD.org> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: secmodel_bsd44_lkminit.c,v 1.2 2007/11/21 22:49:07 elad Exp $"); - -#include <sys/param.h> -#include <sys/lkm.h> -#include <sys/sysctl.h> -#include <sys/kauth.h> - -#include <secmodel/bsd44/bsd44.h> -#include <secmodel/bsd44/suser.h> -#include <secmodel/securelevel/securelevel.h> - -int secmodel_bsd44_lkm_lkmentry(struct lkm_table *lkmtp, int, int); -static int secmodel_bsd44_lkm_load(struct lkm_table *, int); -static int secmodel_bsd44_lkm_unload(struct lkm_table *, int); - -MOD_MISC("secmodel_bsd44_lkm"); - -static struct sysctllog *_secmodel_bsd44_lkm_log; - -static int -secmodel_bsd44_lkm_load(struct lkm_table *lkmtp, int cmd) -{ - if(lkmexists(lkmtp)) - return (EEXIST); - - secmodel_bsd44_start(); - sysctl_security_bsd44_setup(&_secmodel_bsd44_lkm_log); - sysctl_security_securelevel_setup(&_secmodel_bsd44_lkm_log); - - return (0); -} - -static int -secmodel_bsd44_lkm_unload(struct lkm_table *lkmtp, int cmd) -{ - secmodel_bsd44_stop(); - sysctl_teardown(&_secmodel_bsd44_lkm_log); - - /* XXX synchronize listener exit... */ - - return (0); -} - -int -secmodel_bsd44_lkm_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - DISPATCH(lkmtp, cmd, ver, secmodel_bsd44_lkm_load, - secmodel_bsd44_lkm_unload, lkm_nofunc) -} diff --git a/sys/lkm/misc/Makefile b/sys/lkm/misc/Makefile deleted file mode 100644 index 387ee76a275..00000000000 --- a/sys/lkm/misc/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# $NetBSD: Makefile,v 1.1 2000/12/11 13:48:11 jdolecek Exp $ - -# directory 'example' is explicitly not included - the module should not be -# built nor installed by default - -SUBDIR+= # empty - -.include <bsd.kinc.mk> diff --git a/sys/lkm/misc/Makefile.inc b/sys/lkm/misc/Makefile.inc deleted file mode 100644 index ef9a9aeb245..00000000000 --- a/sys/lkm/misc/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.1 2000/12/11 13:48:11 jdolecek Exp $ - -S!= cd ${.CURDIR}/../../..;pwd - -.include "../Makefile.inc" diff --git a/sys/lkm/misc/envsys2/Makefile b/sys/lkm/misc/envsys2/Makefile deleted file mode 100644 index 25f760ea1df..00000000000 --- a/sys/lkm/misc/envsys2/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.1 2007/07/20 14:21:00 xtraeme Exp $ -# -# Makefile for the envsys2 test LKM. -# - -SRCS= lkminit_envsys2.c -WARNS= 4 -KMOD= envsys2 - -CLEANFILES+= *~ ${KMOD} - -.include <bsd.kmod.mk> diff --git a/sys/lkm/misc/envsys2/lkminit_envsys2.c b/sys/lkm/misc/envsys2/lkminit_envsys2.c deleted file mode 100644 index 842c0dc228f..00000000000 --- a/sys/lkm/misc/envsys2/lkminit_envsys2.c +++ /dev/null @@ -1,381 +0,0 @@ -/* $NetBSD: lkminit_envsys2.c,v 1.10 2007/11/16 08:00:16 xtraeme Exp $ */ - -/*- - * Copyright (c) 2007 Juan Romero Pardines. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This is a virtual driver for sysmon_envsys(9). That shows in how - * the framework works and to verify correct operation of the framework. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_envsys2.c,v 1.10 2007/11/16 08:00:16 xtraeme Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/lkm.h> -#include <sys/errno.h> -#include <dev/sysmon/sysmonvar.h> - -/* - * The list of sensors. - */ -enum sensors { - SENSOR_CPUTEMP = 0, - SENSOR_CPUFAN, - SENSOR_VCORE, - SENSOR_EXTERNAL_VOLTAGE, - SENSOR_VCORE_RESISTANCE, - SENSOR_CURRENT_POWER, - SENSOR_CURRENT_POTENCY, - SENSOR_BATTERY0_CAPACITY, - SENSOR_BATTERY0_CAPSTATE, - SENSOR_BATTERY0_CHARGESTATE, - SENSOR_BATTERY1_CAPACITY, - SENSOR_BATTERY1_CAPSTATE, - SENSOR_BATTERY1_CHARGESTATE, - SENSOR_POWER_LED, - SENSOR_TECHNOLOGY, - SENSOR_MASTER_DISK, - SENSOR_DUP_CPUTEMP, - SENSOR_DUP_TECHNOLOGY, - SENSOR_EMPTY_DESC, - SENSOR_INVALID_UNITS, - SENSOR_MAXSENSORS /* must be last */ -}; - -struct envsys2_softc { - struct sysmon_envsys *sc_sme; - envsys_data_t sc_sensor[SENSOR_MAXSENSORS]; -}; - -/* - * Required stuff for the LKM part. - */ -int envsys2_lkmentry(struct lkm_table *, int, int); -static int envsys2_mod_handle(struct lkm_table *, int); -MOD_MISC("envsys2"); - -/* - * Required stuff by sysmon_envsys(9). - */ -static void envsys2_refresh(struct sysmon_envsys *, envsys_data_t *); -static void envsys2_initsensors(struct envsys2_softc *); -static struct envsys2_softc e2_sc; - -/* - * This function assigns sensor description and units type for - * all sensors. If we don't assign a valid state (ENVSYS_SVALID), - * its state will be unknown and the value won't be visible on - * envstat(8). - */ -static void -envsys2_initsensors(struct envsys2_softc *sc) -{ - /* - * Initialize the sensors with units and description. - * And optionally with monitoring flags. - */ -#define INITSENSOR(idx, unit, string) \ - do { \ - sc->sc_sensor[idx].units = unit; \ - (void)strlcpy(sc->sc_sensor[idx].desc, string, \ - sizeof(sc->sc_sensor->desc)); \ - } while (/* CONSTCOND */ 0) - - /* - * We want to monitor for critical state in the CPU Temp sensor. - */ - INITSENSOR(SENSOR_CPUTEMP, ENVSYS_STEMP, "CPU Temp"); - sc->sc_sensor[SENSOR_CPUTEMP].monitor = true; - sc->sc_sensor[SENSOR_CPUTEMP].flags = ENVSYS_FMONCRITICAL; - - /* - * We want to monitor for a critical under state in the CPU Fan - * sensor, so that we know if the fan is not working or stopped. - */ - INITSENSOR(SENSOR_CPUFAN, ENVSYS_SFANRPM, "CPU Fan"); - sc->sc_sensor[SENSOR_CPUFAN].monitor = true; - sc->sc_sensor[SENSOR_CPUFAN].flags = ENVSYS_FMONCRITUNDER; - - /* - * We want to monitor for a critical over state in the VCore - * sensor, so that we know if there's overvoltage on it. - */ - INITSENSOR(SENSOR_VCORE, ENVSYS_SVOLTS_DC, "VCore"); - sc->sc_sensor[SENSOR_VCORE].monitor = true; - sc->sc_sensor[SENSOR_VCORE].flags = ENVSYS_FMONCRITOVER; - - INITSENSOR(SENSOR_EXTERNAL_VOLTAGE, ENVSYS_SVOLTS_AC, - "External Voltage"); - INITSENSOR(SENSOR_VCORE_RESISTANCE, ENVSYS_SOHMS, "VCore Resistance"); - INITSENSOR(SENSOR_CURRENT_POWER, ENVSYS_SWATTS, "Current power"); - INITSENSOR(SENSOR_CURRENT_POTENCY, ENVSYS_SAMPS, "Current potency"); - INITSENSOR(SENSOR_BATTERY0_CAPACITY, ENVSYS_SWATTHOUR, - "Battery0 capacity"); - - /* - * We want to monitor for state changes in battery capacity - * sensors, so that its state has been changed, we will be notified. - */ - INITSENSOR(SENSOR_BATTERY0_CAPSTATE, ENVSYS_BATTERY_CAPACITY, - "Battery0 state"); - sc->sc_sensor[SENSOR_BATTERY0_CAPSTATE].monitor = true; - sc->sc_sensor[SENSOR_BATTERY0_CAPSTATE].flags = ENVSYS_FMONSTCHANGED; - - INITSENSOR(SENSOR_BATTERY0_CHARGESTATE, ENVSYS_BATTERY_CHARGE, - "Battery0 charging"); - - /* - * Same than Battery0, but this uses Ah. - */ - INITSENSOR(SENSOR_BATTERY1_CAPACITY, ENVSYS_SAMPHOUR, - "Battery1 capacity"); - - INITSENSOR(SENSOR_BATTERY1_CAPSTATE, ENVSYS_BATTERY_CAPACITY, - "Battery1 state"); - sc->sc_sensor[SENSOR_BATTERY1_CAPSTATE].monitor = true; - sc->sc_sensor[SENSOR_BATTERY1_CAPSTATE].flags = ENVSYS_FMONSTCHANGED; - - INITSENSOR(SENSOR_BATTERY1_CHARGESTATE, ENVSYS_BATTERY_CHARGE, - "Battery1 charging"); - - INITSENSOR(SENSOR_POWER_LED, ENVSYS_INDICATOR, "Power Led"); - - /* - * We don't want to be able to set a critical limit in userland, - * so we must enable the monitoring flag in the sensor. - */ - INITSENSOR(SENSOR_TECHNOLOGY, ENVSYS_INTEGER, "Technology"); - sc->sc_sensor[SENSOR_TECHNOLOGY].flags = ENVSYS_FMONNOTSUPP; - - /* - * We want to monitor the state in the drive sensor, so - * that we know if it's not online or in normal operation. - */ - INITSENSOR(SENSOR_MASTER_DISK, ENVSYS_DRIVE, "Master disk"); - sc->sc_sensor[SENSOR_MASTER_DISK].monitor = true; - sc->sc_sensor[SENSOR_MASTER_DISK].flags = ENVSYS_FMONSTCHANGED; - - /* - * Let's add two sensors with duplicate descriptions - * (they won't be attached). - * - */ - INITSENSOR(SENSOR_DUP_CPUTEMP, ENVSYS_STEMP, "CPU Temp"); - INITSENSOR(SENSOR_DUP_TECHNOLOGY, ENVSYS_INTEGER, "Technology"); - /* - * Another one with empty description (it won't be attached). - */ - INITSENSOR(SENSOR_EMPTY_DESC, ENVSYS_STEMP, ""); - /* - * And finally another sensor with invalid units type - * (it won't be attached). - */ - INITSENSOR(SENSOR_INVALID_UNITS, -1, "Invalid units"); -} - -/* - * This is the function that envsys2 uses to retrieve new data from - * the sensors registered in our driver. - * - * Note that we must use always the index specified on edata->sensor, - * otherwise we might be refreshing the sensor more times than it - * should. - */ -static void -envsys2_refresh(struct sysmon_envsys *sme, envsys_data_t *edata) -{ - switch (edata->sensor) { - case SENSOR_CPUTEMP: - /* CPU Temp, use 38C */ - edata->value_cur = 38 * 1000000 + 273150000; - break; - case SENSOR_CPUFAN: - /* CPU Fan, use 2560 RPM */ - edata->value_cur = 2560; - break; - case SENSOR_VCORE: - /* Vcore in DC, use 1.232V */ - edata->value_cur = 1232 * 1000; - break; - case SENSOR_EXTERNAL_VOLTAGE: - /* External Voltage in AC, use 223.2V */ - edata->value_cur = 2232 * 100000; - break; - case SENSOR_VCORE_RESISTANCE: - /* VCore resistance, use 12 Ohms */ - edata->value_cur = 1200 * 10000; - break; - case SENSOR_CURRENT_POWER: - /* Current power, use 30W */ - edata->value_cur = 30000000; - break; - case SENSOR_CURRENT_POTENCY: - /* Current potency, use 0.500A */ - edata->value_cur = 500 * 1000; - break; - case SENSOR_BATTERY0_CAPACITY: - /* - * Battery0 in Wh. - * - * Battery sensors (Ah/Wh) need at least data in - * value_cur and value_max to compute the percentage. - * - * Also the value_max member must be enabled, otherwise - * it won't be valid. - */ - edata->value_cur = 2420000; - edata->value_max = 3893000; - /* enable value_max and percentage display */ - edata->flags |= (ENVSYS_FVALID_MAX | ENVSYS_FPERCENT); - break; - case SENSOR_BATTERY0_CAPSTATE: - edata->value_cur = ENVSYS_BATTERY_CAPACITY_NORMAL; - break; - case SENSOR_BATTERY0_CHARGESTATE: - edata->value_cur = 1; - break; - case SENSOR_BATTERY1_CAPACITY: - /* Battery1 in Ah */ - edata->value_cur = 1890000; - edata->value_max= 4000000; - edata->flags |= (ENVSYS_FVALID_MAX | ENVSYS_FPERCENT); - break; - case SENSOR_BATTERY1_CAPSTATE: - edata->value_cur = ENVSYS_BATTERY_CAPACITY_CRITICAL; - break; - case SENSOR_BATTERY1_CHARGESTATE: - edata->value_cur = 0; - break; - case SENSOR_POWER_LED: - /* - * sensor with indicator units, only need to be marked - * as valid and use a value of 1 or 0. - */ - edata->value_cur = 1; - break; - case SENSOR_TECHNOLOGY: - /* Technology, no comments */ - edata->value_cur = 2007; - break; - case SENSOR_MASTER_DISK: - /* Master disk, use the common DRIVE_ONLINE. */ - edata->value_cur = ENVSYS_DRIVE_ONLINE; - break; - default: - edata->state = ENVSYS_SINVALID; - break; - } - - /* - * Data provided was right, so mark the sensor as valid otherwise - * its state will be unknown. - */ - edata->state = ENVSYS_SVALID; -} - -static int -envsys2_mod_handle(struct lkm_table *lkmtp, int cmd) -{ - struct envsys2_softc *sc = &e2_sc; - int i, err = 0; - - switch (cmd) { - case LKM_E_LOAD: - /* - * Don't load twice! (lkmexists() is exported by kern_lkm.c) - */ - if (lkmexists(lkmtp)) - return EEXIST; - - /* - * Allocate and initialize the sysmon_envsys object. - */ - sc->sc_sme = sysmon_envsys_create(); - - /* - * Initialize the sensors with required values: units and desc. - */ - envsys2_initsensors(sc); - - /* - * Attach the sensors and ignore the ones that weren't - * accepted: two sensors with duplicate description, another - * one with empty description and the last one with invalid - * units type. - */ - for (i = 0; i < SENSOR_MAXSENSORS; i++) { - if (sysmon_envsys_sensor_attach(sc->sc_sme, - &sc->sc_sensor[i])) { - printf("envsys2: failed to add sensor%d\n", i); - continue; - } - } - - /* - * Now register our driver to sysmon_envsys(9). - */ - sc->sc_sme->sme_name = "envsys2"; - sc->sc_sme->sme_cookie = sc; - sc->sc_sme->sme_refresh = envsys2_refresh; - sc->sc_sme->sme_events_timeout = 60; /* 60 seconds */ - - err = sysmon_envsys_register(sc->sc_sme); - if (err) { - printf("envsys2: unable to register with sysmon " - "(%d)\n", err); - /* - * Was there an error? free resources used by - * sysmon_envsys_create(). - */ - sysmon_envsys_destroy(sc->sc_sme); - } - break; - - case LKM_E_UNLOAD: - /* - * Unregister our driver with the sysmon_envsys(9) - * framework. This will remove all events currently - * assigned, sensors attached and the object will be - * freed via sysmon_envsys_destroy() at last. - */ - sysmon_envsys_unregister(sc->sc_sme); - break; - - default: /* we only understand load/unload */ - err = EINVAL; - break; - } - - return err; -} - -int -envsys2_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - DISPATCH(lkmtp, cmd, ver, envsys2_mod_handle, - envsys2_mod_handle, lkm_nofunc) -} diff --git a/sys/lkm/misc/example/Makefile b/sys/lkm/misc/example/Makefile deleted file mode 100644 index 5e1c77f125f..00000000000 --- a/sys/lkm/misc/example/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# $NetBSD: Makefile,v 1.3 2001/12/12 12:06:46 lukem Exp $ - -KMOD= misc_example - -SRCS= lkminit_misc.c example_misc.c - -SUBDIR+= test - -.include <bsd.kmod.mk> -.include <bsd.subdir.mk> diff --git a/sys/lkm/misc/example/README b/sys/lkm/misc/example/README deleted file mode 100644 index d9ce1bf8e16..00000000000 --- a/sys/lkm/misc/example/README +++ /dev/null @@ -1,88 +0,0 @@ -# -# Copyright (c) 1993 Terrence R. Lambert. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed by Terrence R. Lambert. -# 4. The name Terrence R. Lambert may not be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $NetBSD: README,v 1.1 2000/12/11 13:48:11 jdolecek Exp $ -# - -1.0 Overview - - This is the README file for the sample miscellaneous module - that mimics the loaded system call. - - A miscellaneous module may be used to load any data or - program into the kernel that can be made available by - modifying a table, pointer, or other kernel data to inform - the kernel that the module should be used instead of the - previous code/data path. - - Generally, it is assumed that a loadable module is one of - a set of similar modules (such as a file system or console - terminal emulation), and that the reference is through a - table (such as vfssw[]), and that a "special" value is - assigned to the slots which are allowed to be replaced. - This is not enforced, so you may use the "miscellaneous" - module any way you see fit. - - As with the loadable system calls, it may be desirable to - allow the module loader to replace an *existing* entry to - try out changes to kernel code without rebuilding and - booting from the new kernel. - - -2.0 Directions - - To test the module, do the following: - - make load - - A load message (the copyright) will be printed on the console. - - cd test - make load - - The system call prints a message on the console when called. - This message will be printed when running "make load" in - the "test" subdirectory. - - -3.0 Recovering resources - - The miscellaneous module consumes 8 pages of memory when - loaded; it can be freed up by unloading it. To unload it, - type the following from the directory this file is in: - - cd module - make unload - - The miscellaneous module will be unloaded by name. - - -4.0 END OF DOCUMENT diff --git a/sys/lkm/misc/example/example_misc.c b/sys/lkm/misc/example/example_misc.c deleted file mode 100644 index 7bd8bd1b332..00000000000 --- a/sys/lkm/misc/example/example_misc.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * misccall.c - * - * 05 Jun 93 Terry Lambert Split out of newsyscall.c - * - * Copyright (c) 1993 Terrence R. Lambert. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Terrence R. Lambert. - * 4. The name Terrence R. Lambert may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $NetBSD: example_misc.c,v 1.5 2007/12/19 20:31:39 dsl Exp $ - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: example_misc.c,v 1.5 2007/12/19 20:31:39 dsl Exp $"); - -#include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/systm.h> - -int misccall(struct lwp *, void *, register_t *); - -/* - * This is the actual code for system call... it can be static because - * we've externed it up above... the only plae it needs to be referenced - * is the sysent we are interested in. - * - * To write your own system call using this as a template, you could strip - * out this code and use the rest as a prototype module, changing only the - * function names and the number of arguments to the call in the module - * specific "sysent". - * - * You would have to use the "-R" option of "ld" to ensure a linkable file - * if you were to do this, since you would need to combine multiple ".o" - * files into a single ".o" file for use by "modload". - */ -int -misccall(l, uap, retval) - struct lwp *l; - void *uap; - register_t retval[]; -{ - /* - * Our new system call simply prints a message; it takes no - * arguments. - */ - - printf( "\nI am a loaded system call using the miscellaneous\n"); - printf( "module loader interface and a kernel printf!\n"); - printf( "I will print this message each time I am called!\n"); - - return( 0); /* success (or error code from errno.h)*/ -} - -/* - * EOF -- This file has not been truncated. - */ diff --git a/sys/lkm/misc/example/lkminit_misc.c b/sys/lkm/misc/example/lkminit_misc.c deleted file mode 100644 index efb7a09c871..00000000000 --- a/sys/lkm/misc/example/lkminit_misc.c +++ /dev/null @@ -1,191 +0,0 @@ -/* $NetBSD: lkminit_misc.c,v 1.7 2007/12/19 20:31:39 dsl Exp $ */ - -/* - * Makefile for miscmod - * - * 05 Jun 93 Terry Lambert Split mycall.c out - * 25 May 93 Terry Lambert Original - * - * Copyright (c) 1993 Terrence R. Lambert. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Terrence R. Lambert. - * 4. The name Terrence R. Lambert may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_misc.c,v 1.7 2007/12/19 20:31:39 dsl Exp $"); - -#include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> -#include <sys/syscall.h> - - -int misccall(struct lwp *, void *, register_t *); -int misc_example_lkmentry(struct lkm_table *lkmtp, int, int); - -static int miscmod_handle(struct lkm_table *, int); - -/* - * These two entries define our system call and module information. We - * have 0 arguments to our system call. - */ -static struct sysent newent = { - 0, 0, 0, misccall /* # of args, args size, fn pointer*/ -}; - -/* - * Miscellaneous modules must have their own save areas... - */ -static struct sysent oldent; /* save are for old callslot entry*/ - -MOD_MISC( "miscmod"); - - -/* - * This function is called each time the module is loaded or unloaded. - * Since we are a miscellaneous module, we have to provide whatever - * code is necessary to patch ourselves into the area we are being - * loaded to change. - * - * For the system call table, we duplicate the code in the kern_lkm.c - * file for patching into the system call table. We can tell what - * has been allocated, etc. by virtue of the fact that we know the - * criteria used by the system call loader interface. We still - * kick out the copyright to the console here (to give an example). - * - * The stat information is basically common to all modules, so there - * is no real issue involved with stat; we will leave it lkm_nofunc(), - * since we don't have to do anything about it. - */ -static int -miscmod_handle( lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - int i; - struct lkm_misc *args = lkmtp->private.lkm_misc; - int err = 0; /* default = success*/ - extern int sys_lkmnosys(struct lwp *, void *, register_t *); - - switch( cmd) { - case LKM_E_LOAD: - - /* - * Don't load twice! (lkmexists() is exported by kern_lkm.c) - */ - if( lkmexists( lkmtp)) - return( EEXIST); - - /* - * This is where we would express a slot preference if - * we had one; since we don't, we will simply duplicate - * the "auto" code and forget the other. - */ - - /* - * Search the table looking for a slot... - */ - for (i = 0; i < SYS_MAXSYSCALL; i++) - if ((void *)sysent[i].sy_call == sys_lkmnosys) - break; /* found it!*/ - /* out of allocable slots?*/ - if (i == SYS_MAXSYSCALL) { - err = ENFILE; - break; - } - - /* save old -- we must provide our own data area*/ - bcopy( &sysent[ i], &oldent, sizeof( struct sysent)); - - /* replace with new*/ - bcopy( &newent, &sysent[ i], sizeof( struct sysent)); - - /* done!*/ - args->mod.lkm_offset = i; /* slot in sysent[]*/ - - - /* if we make it to here, print copyright on console*/ - printf( "\nSample Loaded miscellaneous module (system call)\n"); - printf( "Copyright (c) 1993\n"); - printf( "Terrence R. Lambert\n"); - printf( "All rights reserved\n"); - - break; /* Success*/ - - case LKM_E_UNLOAD: - /* current slot...*/ - i = args->mod.lkm_offset; - - /* replace current slot contents with old contents*/ - bcopy( &oldent, &sysent[ i], sizeof( struct sysent)); - - break; /* Success*/ - - default: /* we only understand load/unload*/ - err = EINVAL; - break; - } - - return(err); -} - - -/* - * External entry point; should generally match name of .o file + '_lkmentry'. - * The arguments are always the same for all loaded modules. The "load", - * "unload", and "stat" functions in "DISPATCH" will be called under - * their respective circumstances. If no function is desired, lkm_nofunc() - * should be supplied. They are called with the same arguments (cmd is - * included to allow the use of a single function, ver is included for - * version matching between modules and the kernel loader for the modules). - * - * Since we expect to link in the kernel and add external symbols to - * the kernel symbol name space in a future version, generally all - * functions used in the implementation of a particular module should - * be static unless they are expected to be seen in other modules or - * to resolve unresolved symbols alread existing in the kernel (the - * second case is not likely to ever occur). - * - * The entry point should return 0 unless it is refusing load (in which - * case it should return an errno from errno.h). - */ -int -misc_example_lkmentry( lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd, ver; -{ - DISPATCH(lkmtp,cmd,ver,miscmod_handle,miscmod_handle,lkm_nofunc) -} diff --git a/sys/lkm/misc/example/test/Makefile b/sys/lkm/misc/example/test/Makefile deleted file mode 100644 index 768d7044d99..00000000000 --- a/sys/lkm/misc/example/test/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2001/12/12 01:50:14 tv Exp $ - -PROG= testmisc -NOMAN= # defined - -load: - @echo "This test program will call the sample system call;" - @echo "the "offset requested will be shown as 'Off' in the" - @echo "status display below. If no modules are loaded, an" - @echo "error '3' will be reported." - @echo - @echo "The sample system call will display a message on the" - @echo "system console each time it is run." - @echo - @echo - modstat -n misc_example - @echo - @./testmisc - -unload: - @echo "This test program will cause an error '3' if the call" - @echo "has been successfully unloaded by building 'unload' in" - @echo "the 'module' subdirectory." - @echo - modstat -n misc_example - -.include <bsd.prog.mk> diff --git a/sys/lkm/misc/example/test/testmisc.c b/sys/lkm/misc/example/test/testmisc.c deleted file mode 100644 index e665cf1c3da..00000000000 --- a/sys/lkm/misc/example/test/testmisc.c +++ /dev/null @@ -1,64 +0,0 @@ -/* $NetBSD: testmisc.c,v 1.4 2007/02/04 22:34:57 elad Exp $ */ - -/* - * testmisc.c - * - * Test program to call the sample loaded miscellaneous system call. - * - * 05 Jun 93 Terry Lambert Original - * - * - * Copyright (c) 1993 Terrence R. Lambert. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Terrence R. Lambert. - * 4. The name Terrence R. Lambert may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__RCSID("$NetBSD: testmisc.c,v 1.4 2007/02/04 22:34:57 elad Exp $"); - -#include <stdio.h> -#include <stdlib.h> - -int -main() -{ - char buf[ 80]; - int err = 0; - - printf( "Table offset as reported by modstat: "); - if (fgets(buf, sizeof(buf), stdin) == NULL) { - printf("[ABORT]\n"); - exit(1); - } - - if (err = syscall( atoi(buf) /* no arguments*/)) - perror("syscall"); - - exit(err); -} diff --git a/sys/lkm/misc/skel/Makefile b/sys/lkm/misc/skel/Makefile deleted file mode 100644 index e69de29bb2d..00000000000 --- a/sys/lkm/misc/skel/Makefile +++ /dev/null diff --git a/sys/lkm/misc/skel/lkminit_skel.c b/sys/lkm/misc/skel/lkminit_skel.c deleted file mode 100644 index 254928c7366..00000000000 --- a/sys/lkm/misc/skel/lkminit_skel.c +++ /dev/null @@ -1,47 +0,0 @@ -/* $NetBSD: lkminit_skel.c,v 1.2 2007/02/05 17:36:12 elad Exp $ */ - -/* This code is in the public domain. */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_skel.c,v 1.2 2007/02/05 17:36:12 elad Exp $"); - -#include <sys/param.h> -#include <sys/lkm.h> - -int skel_lkmentry(struct lkm_table *lkmtp, int, int); -static int skelmod_handle(struct lkm_table *, int); - -/* The module name, as appears in 'modstat' (and used in 'modunload'). */ -MOD_MISC("skelmod"); - -static int -skelmod_handle(struct lkm_table *lkmtp, int cmd) -{ - int error = 0; - - switch (cmd) { - case LKM_E_LOAD: - if (lkmexists(lkmtp)) - return (EEXIST); - - printf("hello world\n"); - - break; - - case LKM_E_UNLOAD: - printf("goodbye world\n"); - break; - - default: - error = EINVAL; - break; - } - - return (error); -} - -int -skel_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - DISPATCH(lkmtp, cmd, ver, skelmod_handle, skelmod_handle, lkm_nofunc) -} diff --git a/sys/lkm/net/Makefile b/sys/lkm/net/Makefile deleted file mode 100644 index 6c28f476c66..00000000000 --- a/sys/lkm/net/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# $NetBSD: Makefile,v 1.8 2005/12/11 12:24:49 christos Exp $ - -.include <bsd.own.mk> - -SUBDIR= bsdcomp deflate tap - -.if (${MKPF} != "no") -SUBDIR+= pf -.endif - -.include <bsd.subdir.mk> diff --git a/sys/lkm/net/Makefile.inc b/sys/lkm/net/Makefile.inc deleted file mode 100644 index 2d630c8bfaa..00000000000 --- a/sys/lkm/net/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.3 2005/12/11 12:24:49 christos Exp $ - -S!= cd ${.CURDIR}/../../..;pwd - -.include "../Makefile.inc" diff --git a/sys/lkm/net/bsdcomp/Makefile b/sys/lkm/net/bsdcomp/Makefile deleted file mode 100644 index 4827b59cb8b..00000000000 --- a/sys/lkm/net/bsdcomp/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# $NetBSD: Makefile,v 1.6 2008/03/10 01:22:05 dholland Exp $ - -.include "../Makefile.inc" - -.PATH: $S/net - -CPPFLAGS+=-DDO_BSD_COMPRESS=1 -KMOD= bsdcomp -SRCS= lkminit_bsdcomp.c bsd-comp.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/net/bsdcomp/lkminit_bsdcomp.c b/sys/lkm/net/bsdcomp/lkminit_bsdcomp.c deleted file mode 100644 index 20f81adbcf6..00000000000 --- a/sys/lkm/net/bsdcomp/lkminit_bsdcomp.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * lkminit_bsdcomp.c - * - * written by Iain Hibbert <plunky@rya-online.net> - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_bsdcomp.c,v 1.3 2005/12/11 12:24:49 christos Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> -#include <sys/mbuf.h> - -#define PACKETPTR struct mbuf * -#include <net/ppp_defs.h> -#include <net/ppp-comp.h> - -extern struct compressor *ppp_compressors[]; -extern struct compressor ppp_bsd_compress; - -static int bsdcomp_handle(struct lkm_table *lkmtp, int cmd); -int bsdcomp_lkmentry(struct lkm_table *lkmtp, int cmd, int ver); - -MOD_MISC("bsdcomp") -static int -bsdcomp_handle(struct lkm_table *lkmtp, int cmd) -{ - int i = 0; - - switch (cmd) { - case LKM_E_LOAD: - /* - * Load the compressor into the master table in the first - * available slot, unless we already have a CI_BSD_COMPRESS - * type listed. Leave a space at the end, its a NULL - * terminated list. - */ - while (ppp_compressors[i]) { - if (ppp_compressors[i]->compress_proto - == CI_BSD_COMPRESS) - return EEXIST; /* either me, or the - * in-kernel version */ - - if (++i == PPP_COMPRESSORS_MAX - 1) - return ENFILE; /* no room */ - } - - ppp_compressors[i] = &ppp_bsd_compress; - break; - - case LKM_E_UNLOAD: - - /* - * Find the first instance of CI_BSD_COMPRESS in the table, - * and * unload it. If this instance was not mine, Somebody has - * been Playing With Fire, and will likely Get Burnt. - */ - while (ppp_compressors[i]->compress_proto != CI_BSD_COMPRESS) - i++; - - while (ppp_compressors[i] && i < (PPP_COMPRESSORS_MAX - 1)) { - ppp_compressors[i] = ppp_compressors[i + 1]; - i++; - } - ppp_compressors[i] = NULL; - break; - - case LKM_E_STAT: - break; - - default: - return EINVAL; - } - - return 0; /* success */ -} - -/* - * the module entry point. - */ -int -bsdcomp_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - DISPATCH(lkmtp, cmd, ver, bsdcomp_handle, bsdcomp_handle, - bsdcomp_handle) -} diff --git a/sys/lkm/net/deflate/Makefile b/sys/lkm/net/deflate/Makefile deleted file mode 100644 index a955b77ec66..00000000000 --- a/sys/lkm/net/deflate/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2008/03/10 01:22:05 dholland Exp $ - -.include "../Makefile.inc" - -.PATH: $S/net - -CPPFLAGS+=-DDO_DEFLATE=1 -KMOD= deflate -SRCS= lkminit_deflate.c ppp-deflate.c zlib.c - -.include <bsd.kmod.mk> - -.include "../Makefile.inc" diff --git a/sys/lkm/net/deflate/lkminit_deflate.c b/sys/lkm/net/deflate/lkminit_deflate.c deleted file mode 100644 index f734def469a..00000000000 --- a/sys/lkm/net/deflate/lkminit_deflate.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * lkminit_deflate.c - * - * written by Iain Hibbert <plunky@rya-online.net> - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_deflate.c,v 1.3 2005/12/11 12:24:49 christos Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> -#include <sys/mbuf.h> - -#define PACKETPTR struct mbuf * -#include <net/ppp_defs.h> -#include <net/ppp-comp.h> - -extern struct compressor *ppp_compressors[]; -extern struct compressor ppp_deflate; -extern struct compressor ppp_deflate_draft; - -static int deflate_handle(struct lkm_table * lkmtp, int cmd); -int deflate_lkmentry(struct lkm_table * lkmtp, int cmd, int ver); - -MOD_MISC("deflate") - -static int -deflate_handle(struct lkm_table *lkmtp, int cmd) -{ - int i = 0; - static int qty; /* how many compressors we loaded */ - - switch (cmd) { - case LKM_E_LOAD: - /* - * Load the compressor into the first available slot in the - * kernel compressors table, unless there is a CI_DEFLATE - * compressor already listed. The table is a NULL terminated - * list, so leave a space at the end. - */ - while (ppp_compressors[i]) { - if (ppp_compressors[i]->compress_proto == CI_DEFLATE) - return EEXIST; /* either me, or the - * in-kernel version */ - - if (++i == PPP_COMPRESSORS_MAX - 1) - return ENFILE; /* no room */ - } - ppp_compressors[i] = &ppp_deflate; - qty = 1; - - /* - * and add deflate_draft if we have any room left - */ - if (++i < PPP_COMPRESSORS_MAX - 1) { - ppp_compressors[i] = &ppp_deflate_draft; - qty = 2; - } - break; - - case LKM_E_UNLOAD: - - /* - * Find the first instance of CI_DEFLATE in the table, and - * unload it. If this instance was not mine, Somebody has been - * Playing With Fire, and will likely Get Burnt. - */ - while (ppp_compressors[i]->compress_proto != CI_DEFLATE) - i++; - - while (ppp_compressors[i] && i < (PPP_COMPRESSORS_MAX - qty)) { - ppp_compressors[i] = ppp_compressors[i + qty]; - i++; - } - ppp_compressors[i] = NULL; - break; - - case LKM_E_STAT: - break; - - default: - return EINVAL; - } - - return 0; /* success */ -} - -/* - * the module entry point. - */ -int -deflate_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - DISPATCH(lkmtp, cmd, ver, deflate_handle, deflate_handle, - deflate_handle) -} diff --git a/sys/lkm/net/pf/Makefile b/sys/lkm/net/pf/Makefile deleted file mode 100644 index 2b2dcf3ea9a..00000000000 --- a/sys/lkm/net/pf/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -# $NetBSD: Makefile,v 1.7 2008/06/18 09:06:27 yamt Exp $ - -.include "../Makefile.inc" - -CPPFLAGS+= -I$S/dist/pf -I$S -DINET6 -DINET -KMOD= pf -SRCS= if_compat.c if_pflog.c \ - pf_real.c pf_if.c pf_ioctl.c pf_mtag.c pf_norm.c pf_osfp.c \ - pf_ruleset.c pf_table.c pf_lkm.c \ - tcp_rndiss.c - -.PATH: $S/dist/pf/net $S/dist/pf/netinet - -BUILDSYMLINKS+= $S/dist/pf/net/pf.c pf_real.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/net/pf/bpfilter.h b/sys/lkm/net/pf/bpfilter.h deleted file mode 100644 index b8d54a0b2fa..00000000000 --- a/sys/lkm/net/pf/bpfilter.h +++ /dev/null @@ -1,3 +0,0 @@ -/* $NetBSD: bpfilter.h,v 1.3 2005/12/11 12:24:49 christos Exp $ */ - -#define NBPFILTER 8 diff --git a/sys/lkm/net/pf/pf.h b/sys/lkm/net/pf/pf.h deleted file mode 100644 index d904510f920..00000000000 --- a/sys/lkm/net/pf/pf.h +++ /dev/null @@ -1,3 +0,0 @@ -/* $NetBSD: pf.h,v 1.2 2005/12/11 12:24:49 christos Exp $ */ - -#define NPF 1 diff --git a/sys/lkm/net/pf/pf_lkm.c b/sys/lkm/net/pf/pf_lkm.c deleted file mode 100644 index a8f77b57755..00000000000 --- a/sys/lkm/net/pf/pf_lkm.c +++ /dev/null @@ -1,87 +0,0 @@ -/* $NetBSD: pf_lkm.c,v 1.4 2008/04/28 20:24:07 martin Exp $ */ - -/* - * Copyright (c) 2004 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to the NetBSD Foundation - * by Peter Postma and Joel Wilsson. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pf_lkm.c,v 1.4 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/kernel.h> -#include <sys/lkm.h> - -#include <net/if.h> -#include <net/if_types.h> - -#include <netinet/in.h> -#include <netinet/in_systm.h> -#include <netinet/ip.h> -#include <netinet/ip_var.h> - -int pf_lkmentry(struct lkm_table *, int, int); -static int pf_lkmload(struct lkm_table *, int); -static int pf_lkmunload(struct lkm_table *, int); - -extern void pfattach(int); -extern void pfdetach(void); -extern void pflogattach(int); -extern void pflogdetach(void); - -extern const struct cdevsw pf_cdevsw; - -MOD_DEV("pf", "pf", NULL, -1, &pf_cdevsw, -1); - -int -pf_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - LKM_DISPATCH(lkmtp, cmd, ver, pf_lkmload, pf_lkmunload, lkm_nofunc); -} - -static int -pf_lkmload(struct lkm_table *lkmtp, int cmd) -{ - if (lkmexists(lkmtp)) - return (EEXIST); - - pfattach(1); - pflogattach(1); - - return (0); -} - -static int -pf_lkmunload(struct lkm_table *lkmtp, int cmd) -{ - pfdetach(); - pflogdetach(); - - return (0); -} diff --git a/sys/lkm/net/pf/pflog.h b/sys/lkm/net/pf/pflog.h deleted file mode 100644 index f8e6df6e985..00000000000 --- a/sys/lkm/net/pf/pflog.h +++ /dev/null @@ -1,3 +0,0 @@ -/* $NetBSD: pflog.h,v 1.2 2005/12/11 12:24:49 christos Exp $ */ - -#define NPFLOG 1 diff --git a/sys/lkm/net/pf/pfsync.h b/sys/lkm/net/pf/pfsync.h deleted file mode 100644 index 3234908be03..00000000000 --- a/sys/lkm/net/pf/pfsync.h +++ /dev/null @@ -1,3 +0,0 @@ -/* $NetBSD: pfsync.h,v 1.2 2005/12/11 12:24:49 christos Exp $ */ - -#define NPFSYNC 1 diff --git a/sys/lkm/net/tap/Makefile b/sys/lkm/net/tap/Makefile deleted file mode 100644 index 0359411378f..00000000000 --- a/sys/lkm/net/tap/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.3 2005/12/11 12:24:49 christos Exp $ - -.include "../Makefile.inc" - -.PATH: ${S}/net - -SRCS= if_tap_lkm.c if_tap.c -KMOD= tap -WARNS= 3 - -CPPFLAGS+= -DNBPFILTER=1 - -.include <bsd.kmod.mk> diff --git a/sys/lkm/net/tap/if_tap_lkm.c b/sys/lkm/net/tap/if_tap_lkm.c deleted file mode 100644 index 1d2b3132cea..00000000000 --- a/sys/lkm/net/tap/if_tap_lkm.c +++ /dev/null @@ -1,188 +0,0 @@ -/* $NetBSD: if_tap_lkm.c,v 1.7 2008/06/13 14:25:06 cegger Exp $ */ - -/* - * Copyright (c) 2003, 2004, 2005 The NetBSD Foundation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * tap is a NetBSD Loadable Kernel Module that demonstrates the use of - * several kernel mechanisms, mostly in the networking subsytem. - * - * 1. it is example LKM, with the standard LKM management routines and - * 2. example Ethernet driver. - * 3. example of use of autoconf stuff inside a LKM. - * 4. example clonable network interface. - * 5. example sysctl interface use from a LKM. - * 6. example LKM character device, with read, write, ioctl, poll - * and kqueue available. - * 7. example cloning device, using the MOVEFD semantics. - * - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_tap_lkm.c,v 1.7 2008/06/13 14:25:06 cegger Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/kernel.h> -#include <sys/malloc.h> -#include <sys/conf.h> -#include <sys/device.h> -#include <sys/ksyms.h> -#include <sys/lkm.h> -#include <sys/sysctl.h> - -#include <net/if.h> - -/* autoconf(9) structures */ - -CFDRIVER_DECL(tap, DV_DULL, NULL); - -/* LKM management routines */ - -int tap_lkmentry(struct lkm_table *, int, int); -static int tap_lkmload(struct lkm_table *, int); -static int tap_lkmunload(struct lkm_table *, int); - -void tapattach(int); -int tapdetach(void); -int tap_clone_destroyer(struct device *); -SYSCTL_SETUP_PROTO(sysctl_tap_setup); - -extern struct cfattach tap_ca; -extern const struct cdevsw tap_cdevsw; -extern struct if_clone tap_cloners; -static struct sysctllog *tap_log; - -/* - * The type of the module is actually userland-oriented. For a - * traditional Ethernet driver, MOD_MISC would be enough since - * the userland manipulates interfaces through operations on - * sockets. - * - * Here MOD_DEV is chosen because a direct access interface is - * exposed, and the easiest way to achieve this is through a - * regular device node. - */ - -MOD_DEV("tap", "tap", NULL, -1, &tap_cdevsw, -1); - -/* We don't have anything to do on 'modstat' */ -int -tap_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - DISPATCH(lkmtp, cmd, ver, - tap_lkmload, tap_lkmunload, lkm_nofunc); -} - -/* - * autoconf(9) is a rather complicated piece of work, but in the end - * it is rather flexible, so you can easily add a device somewhere in - * the tree, and make almost anything attach to something known. - * - * Here the idea is taken from Jason R. Thorpe's ataraid(4) pseudo- - * device. Instead of needing a declaration in the kernel - * configuration, we teach autoconf(9) the availability of the - * pseudo-device at run time. - * - * Once our autoconf(9) structures are committed to the kernel's - * arrays, we can attach a device. It is done through config_attach - * for a real device, but for a pseudo-device it is a bit different - * and one has to use config_pseudo_attach. - * - * And since we want the user to be responsible for creating device, - * we use the interface cloning mechanism, and advertise our interface - * to the kernel. - */ -static int -tap_lkmload(struct lkm_table *lkmtp, int cmd) -{ - int error = 0; - - error = config_cfdriver_attach(&tap_cd); - if (error) { - aprint_error("%s: unable to register cfdriver\n", - tap_cd.cd_name); - goto out; - } - - /* XXX: no way to detect an error for config_cfattach_attach() */ - tapattach(1); - - sysctl_tap_setup(&tap_log); -out: - return error; -} - -/* - * Cleaning up is the most critical part of a LKM, since a module is not - * actually made to be loadable, but rather "unloadable". If it is only - * to be loaded, you'd better link it to the kernel in the first place. - * - * The interface cloning mechanism is really simple, with only two void - * returning functions. It will always do its job. You should note though - * that if an instance of tap can't be detached, the module won't - * unload and you won't be able to create interfaces anymore. - * - * We have to make sure the devices really exist, because they can be - * destroyed through ifconfig, hence the test whether cd_devs[i] is NULL - * or not. - * - * The cd_devs array is somehow the downside of the whole autoconf(9) - * mechanism, since if you only create 'tap150', you'll get an array of - * 150 elements which 149 of them are NULL. - */ -static int -tap_lkmunload(struct lkm_table *lkmtp, int cmd) -{ - int error, i; - device_t dev; - - if_clone_detach(&tap_cloners); - - for (i = 0; i < tap_cd.cd_ndevs; i++) { - dev = device_lookup(&tap_cd, i); - if (dev != NULL && - (error = tap_clone_destroyer(dev)) != 0) - return error; - } - - sysctl_teardown(&tap_log); - - if ((error = config_cfattach_detach(tap_cd.cd_name, - &tap_ca)) != 0) { - aprint_error("%s: unable to deregister cfattach\n", - tap_cd.cd_name); - return error; - } - - if ((error = config_cfdriver_detach(&tap_cd)) != 0) { - aprint_error("%s: unable to deregister cfdriver\n", - tap_cd.cd_name); - return error; - } - - return 0; -} diff --git a/sys/lkm/netinet/Makefile b/sys/lkm/netinet/Makefile deleted file mode 100644 index d4766066ce9..00000000000 --- a/sys/lkm/netinet/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2005/12/11 12:24:49 christos Exp $ - -.include <bsd.own.mk> - -.if (${MKIPFILTER} != "no") -SUBDIR= if_ipl -.endif - -.include <bsd.subdir.mk> diff --git a/sys/lkm/netinet/Makefile.inc b/sys/lkm/netinet/Makefile.inc deleted file mode 100644 index df6b75cbb55..00000000000 --- a/sys/lkm/netinet/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.4 2001/12/12 12:06:46 lukem Exp $ - -S!= cd ${.CURDIR}/../../..;pwd - -.include "../Makefile.inc" diff --git a/sys/lkm/netinet/if_ipl/Makefile b/sys/lkm/netinet/if_ipl/Makefile deleted file mode 100644 index 1dc096620b3..00000000000 --- a/sys/lkm/netinet/if_ipl/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.19 2005/12/11 12:24:49 christos Exp $ - -.include "../Makefile.inc" - -CPPFLAGS+= -DIPFILTER_LOG -I$S/dist/ipf -DINET -DUSE_INET6 -DIPFILTER_LKM -KMOD= if_ipl -SRCS= ip_fil_netbsd.c fil.c mln_ipl.c ip_nat.c ip_frag.c ip_state.c \ - ip_proxy.c ip_auth.c ip_log.c - -.PATH: ${NETBSDSRCDIR}/sys/dist/ipf/netinet - -.include <bsd.kmod.mk> diff --git a/sys/lkm/netinet/if_ipl/mln_ipl.c b/sys/lkm/netinet/if_ipl/mln_ipl.c deleted file mode 100644 index 20ebfd43487..00000000000 --- a/sys/lkm/netinet/if_ipl/mln_ipl.c +++ /dev/null @@ -1,120 +0,0 @@ -/* $NetBSD: mln_ipl.c,v 1.40 2008/04/28 20:24:07 martin Exp $ */ - -/* - * Copyright (c) 2004 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to the NetBSD Foundation - * by Peter Postma. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mln_ipl.c,v 1.40 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/kernel.h> -#include <sys/lkm.h> - -#include <net/if.h> -#include <net/if_types.h> - -#include <netinet/in.h> -#include <netinet/in_systm.h> -#include <netinet/ip.h> -#include <netinet/ip_var.h> - -#include <netinet/ipl.h> -#include <netinet/ip_compat.h> -#include <netinet/ip_fil.h> - -int if_ipl_lkmentry(struct lkm_table *, int, int); -static int if_ipl_lkmload(struct lkm_table *, int); -static int if_ipl_lkmunload(struct lkm_table *, int); - -extern const struct cdevsw ipl_cdevsw; - -MOD_DEV(IPL_VERSION, "ipl", NULL, -1, &ipl_cdevsw, -1); - -int -if_ipl_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - LKM_DISPATCH(lkmtp, cmd, ver, if_ipl_lkmload, if_ipl_lkmunload, - lkm_nofunc); -} - -static int -if_ipl_lkmload(struct lkm_table *lkmtp, int cmd) -{ - const char *defpass; - int error; - - if (lkmexists(lkmtp)) - return (EEXIST); - - error = ipfattach(); - if (error == 0) { - if (FR_ISPASS(fr_pass)) - defpass = "pass"; - else if (FR_ISBLOCK(fr_pass)) - defpass = "block"; - else - defpass = "no-match -> block"; - - printf("%s initialized. Default = %s all, Logging = %s%s\n", - ipfilter_version, defpass, -#ifdef IPFILTER_LOG - "enabled", -#else - "disabled", -#endif -#ifdef IPFILTER_COMPILED - " (COMPILED)" -#else - "" -#endif - ); - - fr_running = 1; - } - - return (error); -} - -static int -if_ipl_lkmunload(struct lkm_table *lkmtp, int cmd) -{ - int error = 0; - - if (fr_running > 0) { - error = ipfdetach(); - if (error == 0) - fr_running = -1; - } - if (error == 0) - printf("%s unloaded\n", ipfilter_version); - - return (error); -} diff --git a/sys/lkm/syscall/Makefile b/sys/lkm/syscall/Makefile deleted file mode 100644 index 26d424ab594..00000000000 --- a/sys/lkm/syscall/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# $NetBSD: Makefile,v 1.1 2000/12/11 13:48:12 jdolecek Exp $ - -# directory 'example' is explicitly not included - the module should not be -# built nor installed by default - -SUBDIR+= # empty - -.include <bsd.kinc.mk> diff --git a/sys/lkm/syscall/Makefile.inc b/sys/lkm/syscall/Makefile.inc deleted file mode 100644 index 9017b4c61e3..00000000000 --- a/sys/lkm/syscall/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.3 2001/12/12 12:06:47 lukem Exp $ - -S!= cd ${.CURDIR}/../../..;pwd - -.include "../Makefile.inc" diff --git a/sys/lkm/syscall/example/Makefile b/sys/lkm/syscall/example/Makefile deleted file mode 100644 index 268b36c1e0b..00000000000 --- a/sys/lkm/syscall/example/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.3 2001/12/12 11:56:06 lukem Exp $ - -.include "../Makefile.inc" - -KMOD= syscall_example - -SRCS= lkminit_syscall.c -SRCS+= example_syscall.c - -SUBDIR+= test - -.include <bsd.kmod.mk> -.include <bsd.subdir.mk> diff --git a/sys/lkm/syscall/example/README b/sys/lkm/syscall/example/README deleted file mode 100644 index 249efafac2f..00000000000 --- a/sys/lkm/syscall/example/README +++ /dev/null @@ -1,95 +0,0 @@ -# -# Copyright (c) 1993 Terrence R. Lambert. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed by Terrence R. Lambert. -# 4. The name Terrence R. Lambert may not be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $NetBSD: README,v 1.1 2000/12/11 13:48:12 jdolecek Exp $ -# - -1.0 Overview - - This is the README file for the sample loaded system call. - - -2.0 Directions - - To test the module, do the following: - - make load - - A load message (the copyright) will be printed on the console. - - cd test - make load - - The system call prints a message on the console when called. - This message will be printed when running "make load" in - the "test" subdirectory. - - -3.0 Recovering resources - - The system call consumes 8 pages of memory when loaded; it - can be freed up by unloading it. To unload it, type the - following from the directory this file is in: - - cd module - make unload - - The system call will be unloaded by name. - -4.0 System call modules - - System calls as loadable modules use one of two approaches. - - If the system call slot is unspecified (-1), it will attempt - to locate (and allocate) the next free call slot that points - to the address of the "lkmnosys" function (an alias for the - "nosys" function). It replaces this with the user's call; - the user can tell which slot was allocated using the "modstat" - command (the call slot is indicated by the value of "Off"). - - If the system call slot is specified, it will replace that - specific call (assuming it is in range of the entries in the - sysent[] table). Care should be taken when replacing system - calls. Good candiates are calls which the user is attempting - to repair or make POSIX compliant. It is possible to replace - all calls, although care should be taken with the "ioctl()" - call, as it is the interface for the lkm loader. - - When unloaded, the system call module replaces the previous - contents of the call slot it was loaded in. If this was an - allocable slot, it is now reallocable; if it was a particular - call slot, the previous function is restored. - - The directory ./sample/syscall contains a sample implementation - of a loadable system call. - - -5.0 END OF DOCUMENT diff --git a/sys/lkm/syscall/example/example_syscall.c b/sys/lkm/syscall/example/example_syscall.c deleted file mode 100644 index f20bd12e7e4..00000000000 --- a/sys/lkm/syscall/example/example_syscall.c +++ /dev/null @@ -1,77 +0,0 @@ -/* $NetBSD: example_syscall.c,v 1.6 2007/12/19 20:31:39 dsl Exp $ */ - -/* - * example_syscall.c - * - * 05 Jun 93 Terry Lambert Split out of newsyscall.c - * - * Copyright (c) 1993 Terrence R. Lambert. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Terrence R. Lambert. - * 4. The name Terrence R. Lambert may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: example_syscall.c,v 1.6 2007/12/19 20:31:39 dsl Exp $"); - -#include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/systm.h> - -int example_syscall(struct lwp *, void *, register_t *); - -/* - * This is the actual code for system call... it can be static because - * we've externed it up above... the only plae it needs to be referenced - * is the sysent we are interested in. - * - * To write your own system call using this as a template, you could strip - * out this code and use the rest as a prototype module, changing only the - * function names and the number of arguments to the call in the module - * specific "sysent". - * - * You would have to use the "-R" option of "ld" to ensure a linkable file - * if you were to do this, since you would need to combine multiple ".o" - * files into a single ".o" file for use by "modload". - */ -int -example_syscall(l, uap, retval) - struct lwp *l; - void *uap; - register_t retval[]; -{ - /* - * Our new system call simply prints a message; it takes no - * arguments. - */ - - printf( "I am a loaded system call using the kernel printf!\n"); - printf( "I will print this message each time I am called!\n"); - - return (0); /* success (or error code from errno.h)*/ -} diff --git a/sys/lkm/syscall/example/lkminit_syscall.c b/sys/lkm/syscall/example/lkminit_syscall.c deleted file mode 100644 index ddc6a595429..00000000000 --- a/sys/lkm/syscall/example/lkminit_syscall.c +++ /dev/null @@ -1,115 +0,0 @@ -/* $NetBSD: lkminit_syscall.c,v 1.8 2007/12/19 20:31:39 dsl Exp $ */ - -/* - * Makefile for newsyscall - * - * 05 Jun 93 Terry Lambert Split example_syscall.c out - * 25 May 93 Terry Lambert Original - * - * Copyright (c) 1993 Terrence R. Lambert. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Terrence R. Lambert. - * 4. The name Terrence R. Lambert may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_syscall.c,v 1.8 2007/12/19 20:31:39 dsl Exp $"); - -#include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - - -int example_syscall(struct lwp *, void *, register_t *); -int syscall_example_lkmentry(struct lkm_table *, int, int); - -static int syscall_load(struct lkm_table *, int); - -/* - * These two entries define our system call and module information. We - * have 0 arguments to our system call. - */ -static struct sysent newent = { - /* # of args, args size, MP-safe, fn. pointer */ - 0, 0, 0, example_syscall -}; - -MOD_SYSCALL( "syscall_example", -1, &newent) - -/* - * This function is called each time the module is loaded. Technically, - * we could have made this "lkm_nofunc" in the "DISPATCH" in - * "syscall_example_lkmentry()", - * but it's a convenient place to kick a copyright out to the console. - */ -static int -syscall_load( lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - /* print copyright on console*/ - printf("Sample Loaded system call\n"); - printf("Copyright (c) 1993 Terrence R. Lambert\n"); - printf("All rights reserved\n"); - - return (0); -} - - -/* - * External entry point; should generally match name of .o file + '_lkmentry'. - * The arguments are always the same for all loaded modules. The "load", - * "unload", and "stat" functions in "DISPATCH" will be called under - * their respective circumstances. If no function is desired, lkm_nofunc() - * should be supplied. They are called with the same arguments (cmd is - * included to allow the use of a single function, ver is included for - * version matching between modules and the kernel loader for the modules). - * - * Since we expect to link in the kernel and add external symbols to - * the kernel symbol name space in a future version, generally all - * functions used in the implementation of a particular module should - * be static unless they are expected to be seen in other modules or - * to resolve unresolved symbols alread existing in the kernel (the - * second case is not likely to ever occur). - * - * The entry point should return 0 unless it is refusing load (in which - * case it should return an errno from errno.h). - */ -int -syscall_example_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd, ver; -{ - DISPATCH(lkmtp,cmd,ver,syscall_load,lkm_nofunc,lkm_nofunc) -} diff --git a/sys/lkm/syscall/example/test/Makefile b/sys/lkm/syscall/example/test/Makefile deleted file mode 100644 index 741313d67c0..00000000000 --- a/sys/lkm/syscall/example/test/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2001/12/12 01:50:15 tv Exp $ - -PROG= testsyscall -NOMAN= # defined - -load: - @echo "This test program will call the sample system call;" - @echo "the "offset requested will be shown as 'Off' in the" - @echo "status display below. If no modules are loaded, an" - @echo "error '3' will be reported." - @echo - @echo "The sample system call will display a message on the" - @echo "system console each time it is run." - @echo - @echo - modstat -n syscall_example - @echo - @./testsyscall - -unload: - @echo "This test program will cause an error '3' if the call" - @echo "has been successfully unloaded by building 'unload' in" - @echo "the 'module' subdirectory." - @echo - modstat -n syscall_example - -.include <bsd.prog.mk> diff --git a/sys/lkm/syscall/example/test/testsyscall.c b/sys/lkm/syscall/example/test/testsyscall.c deleted file mode 100644 index 5d56238ff1f..00000000000 --- a/sys/lkm/syscall/example/test/testsyscall.c +++ /dev/null @@ -1,65 +0,0 @@ -/* $NetBSD: testsyscall.c,v 1.4 2006/07/05 14:33:20 drochner Exp $ */ - -/* - * testsyscall.c - * - * Test program to call the sample loaded system call. - * - * 23 May 93 Terry Lambert Original - * - * - * Copyright (c) 1993 Terrence R. Lambert. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Terrence R. Lambert. - * 4. The name Terrence R. Lambert may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__RCSID("$NetBSD: testsyscall.c,v 1.4 2006/07/05 14:33:20 drochner Exp $"); - -#include <stdio.h> -#include <stdlib.h> - -int -main() -{ - char buf[80]; - int err = 0; - - printf( "Table offset as reported by modstat: "); - if(fgets(buf, sizeof(buf), stdin) == NULL) { - printf("[ABORT]\n"); - exit(1); - } - - printf("Calling syscall #%d ...\n", atoi(buf)); - if(err = syscall(atoi(buf) /* no arguments*/)) - perror("syscall"); - - exit(err); -} diff --git a/sys/lkm/vfs/Makefile b/sys/lkm/vfs/Makefile deleted file mode 100644 index 7335050f0ac..00000000000 --- a/sys/lkm/vfs/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# $NetBSD: Makefile,v 1.20 2007/06/29 23:30:31 rumble Exp $ - -.include <bsd.own.mk> - -SUBDIR+= adosfs -SUBDIR+= cd9660 -SUBDIR+= coda -SUBDIR+= coda5 -SUBDIR+= efs -SUBDIR+= filecorefs -SUBDIR+= hfs -SUBDIR+= miscfs -SUBDIR+= msdosfs -SUBDIR+= ntfs -SUBDIR+= ptyfs -SUBDIR+= smbfs -SUBDIR+= tmpfs -SUBDIR+= ufs -SUBDIR+= udf - -.if (${MKPUFFS} != "no") -SUBDIR+= puffs -.endif - -.include <bsd.subdir.mk> diff --git a/sys/lkm/vfs/Makefile.inc b/sys/lkm/vfs/Makefile.inc deleted file mode 100644 index 24501ff8dac..00000000000 --- a/sys/lkm/vfs/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.3 1998/03/28 23:58:44 thorpej Exp $ - -S!= cd ${.CURDIR}/../../..;pwd - -.include "../Makefile.inc" diff --git a/sys/lkm/vfs/adosfs/Makefile b/sys/lkm/vfs/adosfs/Makefile deleted file mode 100644 index a6442f74b39..00000000000 --- a/sys/lkm/vfs/adosfs/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.6 2002/12/23 17:23:13 jdolecek Exp $ - -.include "../Makefile.inc" - -.PATH: $S/fs/adosfs ${.CURDIR}/.. - -KMOD= adosfs - -SRCS= lkminit_vfs.c -SRCS+= adlookup.c adutil.c advfsops.c advnops.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/adosfs/lkminit_vfs.c b/sys/lkm/vfs/adosfs/lkminit_vfs.c deleted file mode 100644 index 86fa8ee50e4..00000000000 --- a/sys/lkm/vfs/adosfs/lkminit_vfs.c +++ /dev/null @@ -1,113 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.10 2008/06/28 15:50:20 rumble Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.10 2008/06/28 15:50:20 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <fs/adosfs/adosfs.h> - -int adosfs_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops adosfs_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("adosfs", -1, &adosfs_vfsops); - -/* - * take care of fs specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_adosfs_log; - -/* - * entry point - */ -int -adosfs_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc) -} - -static int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_createv(&_adosfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "vfs", NULL, - NULL, 0, NULL, 0, - CTL_VFS, CTL_EOL); - sysctl_createv(&_adosfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "adosfs", - SYSCTL_DESCR("AmigaDOS file system"), - NULL, 0, NULL, 0, - CTL_VFS, 16, CTL_EOL); - /* - * XXX the "16" above could be dynamic, thereby eliminating - * one more instance of the "number to vfs" mapping problem, - * but "16" is the order as taken from sys/mount.h - */ - return (0); -} - -static int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_adosfs_log); - return (0); -} diff --git a/sys/lkm/vfs/cd9660/Makefile b/sys/lkm/vfs/cd9660/Makefile deleted file mode 100644 index cb50223945f..00000000000 --- a/sys/lkm/vfs/cd9660/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2002/12/23 17:52:04 jdolecek Exp $ - -.include "../Makefile.inc" - -.PATH: $S/fs/cd9660 ${.CURDIR}/../.. - -KMOD= cd9660 - -SRCS= lkminit_vfs.c -SRCS+= cd9660_bmap.c cd9660_lookup.c cd9660_rrip.c cd9660_vfsops.c -SRCS+= cd9660_node.c cd9660_vnops.c cd9660_util.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/cd9660/lkminit_vfs.c b/sys/lkm/vfs/cd9660/lkminit_vfs.c deleted file mode 100644 index efb79449f21..00000000000 --- a/sys/lkm/vfs/cd9660/lkminit_vfs.c +++ /dev/null @@ -1,118 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.7 2008/06/28 15:50:20 rumble Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.7 2008/06/28 15:50:20 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <fs/cd9660/iso.h> -#include <fs/cd9660/cd9660_extern.h> - -int cd9660_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops cd9660_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("cd9660", -1, &cd9660_vfsops); - -/* - * take care of fs specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_cd9660_log; - -/* - * entry point - */ -int -cd9660_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc) -} - -static int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_createv(&_cd9660_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, CTLTYPE_NODE, "vfs", NULL, - NULL, 0, NULL, 0, - CTL_VFS, CTL_EOL); - sysctl_createv(&_cd9660_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, CTLTYPE_NODE, "cd9660", - SYSCTL_DESCR("ISO-9660 file system"), - NULL, 0, NULL, 0, - CTL_VFS, 14, CTL_EOL); - sysctl_createv(&_cd9660_log, 0, NULL, NULL, - CTLFLAG_PERMANENT|CTLFLAG_READWRITE, - CTLTYPE_INT, "utf8_joliet", - SYSCTL_DESCR("Encode Joliet filenames to UTF-8"), - NULL, 0, &cd9660_utf8_joliet, 0, - CTL_VFS, 14, CD9660_UTF8_JOLIET, CTL_EOL); - /* - * XXX the "14" above could be dynamic, thereby eliminating - * one more instance of the "number to vfs" mapping problem, - * but "14" is the order as taken from sys/mount.h - */ - return (0); -} - -static int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_cd9660_log); - return (0); -} diff --git a/sys/lkm/vfs/coda/Makefile b/sys/lkm/vfs/coda/Makefile deleted file mode 100644 index b4aab736802..00000000000 --- a/sys/lkm/vfs/coda/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.5 2001/12/12 12:06:47 lukem Exp $ - -.include "../Makefile.inc" - -.PATH: $S/coda ${.CURDIR}/.. - -KMOD= coda - -SRCS= lkminit_vfs.c -SRCS+= coda_namecache.c coda_psdev.c coda_subr.c coda_venus.c -SRCS+= coda_vfsops.c coda_vnops.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/coda/lkminit_vfs.c b/sys/lkm/vfs/coda/lkminit_vfs.c deleted file mode 100644 index ec73db74344..00000000000 --- a/sys/lkm/vfs/coda/lkminit_vfs.c +++ /dev/null @@ -1,127 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.12 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.12 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <coda/coda.h> -#include <coda/coda_vfsops.h> - -#ifdef CODA_COMPAT_5 -int coda5_lkmentry(struct lkm_table *, int, int); -#else -int coda_lkmentry(struct lkm_table *, int, int); -#endif - -static int coda_dispatch_vfs(struct lkm_table *, int, int); -static int coda_dispatch_dev(struct lkm_table *, int, int); - -/* - * The VFS part of module. - */ -static int -coda_dispatch_vfs(struct lkm_table *lkmtp, int cmd, int ver) -{ - extern struct vfsops coda_vfsops; - - /* - * declare the filesystem - */ - MOD_VFS("coda", -1, &coda_vfsops); - lkmtp->private.lkm_any = (void *) &_module; /* XXX */ - - DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); -} - -/* - * The device part. - */ -static int -coda_dispatch_dev(struct lkm_table *lkmtp, int cmd, int ver) -{ - /* - * declare up/down call device - */ - extern const struct cdevsw vcoda_cdevsw; - - MOD_DEV("vcoda", "vcoda", NULL, -1, &vcoda_cdevsw, -1); - lkmtp->private.lkm_any = (void *) &_module; /* XXX */ - - DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); -} - -/* - * entry point - */ -int -#ifdef CODA_COMPAT_5 -coda5_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -#else -coda_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -#endif -{ - int error = 0; - static struct sysctllog *_coda_log; - - switch (cmd) { - case LKM_E_LOAD: - error = coda_dispatch_dev(lkmtp, cmd, ver); - if (error) - break; - error = coda_dispatch_vfs(lkmtp, cmd, ver); - if (!error) - sysctl_vfs_coda_setup(&_coda_log); - break; - case LKM_E_UNLOAD: - sysctl_teardown(&_coda_log); - error = coda_dispatch_vfs(lkmtp, cmd, ver); - if (error) - break; - error = coda_dispatch_dev(lkmtp, cmd, ver); - break; - case LKM_E_STAT: - error = lkmdispatch(lkmtp, cmd); - break; - } - return error; - -} diff --git a/sys/lkm/vfs/coda5/Makefile b/sys/lkm/vfs/coda5/Makefile deleted file mode 100644 index c470ac3df28..00000000000 --- a/sys/lkm/vfs/coda5/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# $NetBSD: Makefile,v 1.7 2005/12/11 12:24:49 christos Exp $ - -.include "../Makefile.inc" - -.PATH.c: $S/coda ${.CURDIR}/../coda - -KMOD= coda5 - -SRCS= lkminit_vfs.c -SRCS+= coda_namecache.c coda_psdev.c coda_subr.c coda_venus.c -SRCS+= coda_vfsops.c coda_vnops.c - -CPPFLAGS+= -DCODA_COMPAT_5 - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/efs/Makefile b/sys/lkm/vfs/efs/Makefile deleted file mode 100644 index 2c36739c837..00000000000 --- a/sys/lkm/vfs/efs/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2007/09/13 21:46:54 rumble Exp $ - -.include "../Makefile.inc" - -.PATH: $S/fs/efs ${.CURDIR}/.. - -KMOD= efs - -SRCS= lkminit_vfs.c -SRCS+= efs_genfs.c efs_ihash.c efs_subr.c efs_vfsops.c efs_vnops.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/efs/lkminit_vfs.c b/sys/lkm/vfs/efs/lkminit_vfs.c deleted file mode 100644 index f1bc4dbf83d..00000000000 --- a/sys/lkm/vfs/efs/lkminit_vfs.c +++ /dev/null @@ -1,68 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.2 2008/04/28 20:24:07 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.2 2008/04/28 20:24:07 martin Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <fs/efs/efs.h> - -int efs_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question. - */ -extern struct vfsops efs_vfsops; - -/* - * Declare the filesystem. - */ -MOD_VFS("efs", -1, &efs_vfsops); - -/* - * Entry point. - */ -int -efs_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - - DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); -} diff --git a/sys/lkm/vfs/filecorefs/Makefile b/sys/lkm/vfs/filecorefs/Makefile deleted file mode 100644 index 857245894b4..00000000000 --- a/sys/lkm/vfs/filecorefs/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2002/12/23 17:30:38 jdolecek Exp $ - -.include "../Makefile.inc" - -.PATH: $S/fs/filecorefs ${.CURDIR}/.. - -KMOD= filecorefs - -SRCS= lkminit_vfs.c -SRCS+= filecore_bmap.c filecore_lookup.c filecore_node.c filecore_utils.c \ - filecore_vfsops.c filecore_vnops.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/filecorefs/lkminit_vfs.c b/sys/lkm/vfs/filecorefs/lkminit_vfs.c deleted file mode 100644 index 551fb399cc1..00000000000 --- a/sys/lkm/vfs/filecorefs/lkminit_vfs.c +++ /dev/null @@ -1,114 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.8 2008/06/28 15:50:20 rumble Exp $ */ - -/*- - * Copyright (c) 2001 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.8 2008/06/28 15:50:20 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <fs/filecorefs/filecore.h> -#include <fs/filecorefs/filecore_extern.h> - -int filecorefs_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops filecore_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("filecorefs", -1, &filecore_vfsops); - -/* - * take care of fs specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_filecorefs_log; - -/* - * entry point - */ -int -filecorefs_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc) -} - -static int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_createv(&_filecorefs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "vfs", NULL, - NULL, 0, NULL, 0, - CTL_VFS, CTL_EOL); - sysctl_createv(&_filecorefs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "filecore", - SYSCTL_DESCR("Acorn FILECORE file system"), - NULL, 0, NULL, 0, - CTL_VFS, 19, CTL_EOL); - /* - * XXX the "19" above could be dynamic, thereby eliminating - * one more instance of the "number to vfs" mapping problem, - * but "19" is the order as taken from sys/mount.h - */ - return (0); -} - -static int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_filecorefs_log); - return (0); -} diff --git a/sys/lkm/vfs/hfs/Makefile b/sys/lkm/vfs/hfs/Makefile deleted file mode 100644 index cc7b5e1b74c..00000000000 --- a/sys/lkm/vfs/hfs/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.1.1.1 2007/03/06 11:27:15 dillo Exp $ - -.include "../Makefile.inc" - -.PATH: $S/fs/hfs ${.CURDIR}/.. - -KMOD= hfs - -SRCS= lkminit_vfs.c -SRCS+= hfs_nhash.c hfs_subr.c hfs_vfsops.c hfs_vnops.c libhfs.c -SRCS+= unicode.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/hfs/lkminit_vfs.c b/sys/lkm/vfs/hfs/lkminit_vfs.c deleted file mode 100644 index eb1f316ed98..00000000000 --- a/sys/lkm/vfs/hfs/lkminit_vfs.c +++ /dev/null @@ -1,68 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.2 2008/04/28 20:24:08 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.2 2008/04/28 20:24:08 martin Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <fs/hfs/hfs.h> - -int hfs_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question. - */ -extern struct vfsops hfs_vfsops; - -/* - * Declare the filesystem. - */ -MOD_VFS("hfs", -1, &hfs_vfsops); - -/* - * Entry point. - */ -int -hfs_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - - DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); -} diff --git a/sys/lkm/vfs/miscfs/Makefile b/sys/lkm/vfs/miscfs/Makefile deleted file mode 100644 index 102982852c6..00000000000 --- a/sys/lkm/vfs/miscfs/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile,v 1.8 2005/12/11 12:24:49 christos Exp $ - -SUBDIR= fdesc kernfs nullfs overlay portal procfs umapfs union - -.include <bsd.subdir.mk> diff --git a/sys/lkm/vfs/miscfs/Makefile.inc b/sys/lkm/vfs/miscfs/Makefile.inc deleted file mode 100644 index d671d739283..00000000000 --- a/sys/lkm/vfs/miscfs/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.3 1998/03/28 23:58:45 thorpej Exp $ - -S!= cd ${.CURDIR}/../../../..;pwd - -.include "../../Makefile.inc" diff --git a/sys/lkm/vfs/miscfs/fdesc/Makefile b/sys/lkm/vfs/miscfs/fdesc/Makefile deleted file mode 100644 index 5798b275ea0..00000000000 --- a/sys/lkm/vfs/miscfs/fdesc/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.7 2001/12/12 12:06:48 lukem Exp $ - -.include "../Makefile.inc" - -.PATH: $S/miscfs/fdesc ${.CURDIR}/../.. - -KMOD= fdesc - -SRCS= lkminit_vfs.c -SRCS+= fdesc_vfsops.c fdesc_vnops.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/miscfs/fdesc/lkminit_vfs.c b/sys/lkm/vfs/miscfs/fdesc/lkminit_vfs.c deleted file mode 100644 index 29327f21c09..00000000000 --- a/sys/lkm/vfs/miscfs/fdesc/lkminit_vfs.c +++ /dev/null @@ -1,113 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.11 2008/06/28 15:50:20 rumble Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.11 2008/06/28 15:50:20 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <miscfs/fdesc/fdesc.h> - -int fdesc_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops fdesc_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("fdesc", -1, &fdesc_vfsops); - -/* - * take care of fs specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_fdesc_log; - -/* - * entry point - */ -int -fdesc_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc) -} - -int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_createv(&_fdesc_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "vfs", NULL, - NULL, 0, NULL, 0, - CTL_VFS, CTL_EOL); - sysctl_createv(&_fdesc_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "fdesc", - SYSCTL_DESCR("File-descriptor file system"), - NULL, 0, NULL, 0, - CTL_VFS, 7, CTL_EOL); - /* - * XXX the "7" above could be dynamic, thereby eliminating one - * more instance of the "number to vfs" mapping problem, but - * "7" is the order as taken from sys/mount.h - */ - return (0); -} - -int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_fdesc_log); - return (0); -} diff --git a/sys/lkm/vfs/miscfs/kernfs/Makefile b/sys/lkm/vfs/miscfs/kernfs/Makefile deleted file mode 100644 index 25a4ca01a6a..00000000000 --- a/sys/lkm/vfs/miscfs/kernfs/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.12 2005/12/11 12:24:50 christos Exp $ - -.include "../Makefile.inc" - -.PATH: $S/miscfs/kernfs ${.CURDIR}/../.. - -KMOD= kernfs - -SRCS= lkminit_vfs.c -SRCS+= kernfs_vfsops.c kernfs_vnops.c kernfs_subr.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/miscfs/kernfs/lkminit_vfs.c b/sys/lkm/vfs/miscfs/kernfs/lkminit_vfs.c deleted file mode 100644 index c6dbe65b4cb..00000000000 --- a/sys/lkm/vfs/miscfs/kernfs/lkminit_vfs.c +++ /dev/null @@ -1,113 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.11 2008/06/28 15:50:20 rumble Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.11 2008/06/28 15:50:20 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <miscfs/kernfs/kernfs.h> - -int kernfs_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops kernfs_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("kernfs", -1, &kernfs_vfsops); - -/* - * take care of fs specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_kernfs_log; - -/* - * entry point - */ -int -kernfs_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc) -} - -int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_createv(&_kernfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "vfs", NULL, - NULL, 0, NULL, 0, - CTL_VFS, CTL_EOL); - sysctl_createv(&_kernfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "kernfs", - SYSCTL_DESCR("/kern file system"), - NULL, 0, NULL, 0, - CTL_VFS, 11, CTL_EOL); - /* - * XXX the "11" above could be dynamic, thereby eliminating one - * more instance of the "number to vfs" mapping problem, but - * "11" is the order as taken from sys/mount.h - */ - return (0); -} - -int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_kernfs_log); - return (0); -} diff --git a/sys/lkm/vfs/miscfs/nullfs/Makefile b/sys/lkm/vfs/miscfs/nullfs/Makefile deleted file mode 100644 index 5083db161df..00000000000 --- a/sys/lkm/vfs/miscfs/nullfs/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.8 2001/12/12 12:06:48 lukem Exp $ - -.include "../Makefile.inc" - -.PATH: $S/miscfs/nullfs $S/miscfs/genfs ${.CURDIR}/../.. - -KMOD= nullfs - -SRCS= lkminit_vfs.c -SRCS+= null_vfsops.c null_vnops.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/miscfs/nullfs/lkminit_vfs.c b/sys/lkm/vfs/miscfs/nullfs/lkminit_vfs.c deleted file mode 100644 index 3b40e139744..00000000000 --- a/sys/lkm/vfs/miscfs/nullfs/lkminit_vfs.c +++ /dev/null @@ -1,114 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.12 2008/06/28 15:50:20 rumble Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.com>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.12 2008/06/28 15:50:20 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <sys/vnode.h> -#include <miscfs/nullfs/null.h> - -int nullfs_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops nullfs_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("nullfs", -1, &nullfs_vfsops); - -/* - * take care of fs specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_nullfs_log; - -/* - * entry point - */ -int -nullfs_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc) -} - -static int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_createv(&_nullfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "vfs", NULL, - NULL, 0, NULL, 0, - CTL_VFS, CTL_EOL); - sysctl_createv(&_nullfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "null", - SYSCTL_DESCR("Loopback file system"), - NULL, 0, NULL, 0, - CTL_VFS, 9, CTL_EOL); - /* - * XXX the "9" above could be dynamic, thereby eliminating - * one more instance of the "number to vfs" mapping problem, - * but "9" is the order as taken from sys/mount.h - */ - return (0); -} - -static int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_nullfs_log); - return (0); -} diff --git a/sys/lkm/vfs/miscfs/overlay/Makefile b/sys/lkm/vfs/miscfs/overlay/Makefile deleted file mode 100644 index c5268164d20..00000000000 --- a/sys/lkm/vfs/miscfs/overlay/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.3 2001/12/12 12:06:48 lukem Exp $ - -.include "../Makefile.inc" - -.PATH: $S/miscfs/overlay $S/miscfs/genfs ${.CURDIR}/../.. - -KMOD= overlay - -SRCS= lkminit_vfs.c -SRCS+= overlay_vfsops.c overlay_vnops.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/miscfs/overlay/lkminit_vfs.c b/sys/lkm/vfs/miscfs/overlay/lkminit_vfs.c deleted file mode 100644 index 62e98675536..00000000000 --- a/sys/lkm/vfs/miscfs/overlay/lkminit_vfs.c +++ /dev/null @@ -1,107 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.9 2008/06/28 15:50:20 rumble Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.com>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.9 2008/06/28 15:50:20 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <sys/vnode.h> -#include <miscfs/overlay/overlay.h> - -int overlay_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops overlay_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("overlay", -1, &overlay_vfsops); - -/* - * take care of fs specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_overlay_log; - -/* - * entry point - */ -int -overlay_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc) -} - -static int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_createv(&_overlay_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, CTLTYPE_NODE, "vfs", NULL, - NULL, 0, NULL, 0, - CTL_VFS, CTL_EOL); - sysctl_createv(&_overlay_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, CTLTYPE_NODE, "overlay", - SYSCTL_DESCR("Overlay file system"), - NULL, 0, NULL, 0, - CTL_VFS, CTL_CREATE, CTL_EOL); - return (0); -} - -static int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_overlay_log); - return (0); -} diff --git a/sys/lkm/vfs/miscfs/portal/Makefile b/sys/lkm/vfs/miscfs/portal/Makefile deleted file mode 100644 index 41f08fe7121..00000000000 --- a/sys/lkm/vfs/miscfs/portal/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.7 2001/12/12 12:06:49 lukem Exp $ - -.include "../Makefile.inc" - -.PATH: $S/miscfs/portal ${.CURDIR}/../.. - -KMOD= portal - -SRCS= lkminit_vfs.c -SRCS+= portal_vfsops.c portal_vnops.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/miscfs/portal/lkminit_vfs.c b/sys/lkm/vfs/miscfs/portal/lkminit_vfs.c deleted file mode 100644 index f8f83437568..00000000000 --- a/sys/lkm/vfs/miscfs/portal/lkminit_vfs.c +++ /dev/null @@ -1,113 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.11 2008/06/28 15:50:20 rumble Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.11 2008/06/28 15:50:20 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <miscfs/portal/portal.h> - -int portal_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops portal_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("portal", -1, &portal_vfsops); - -/* - * take care of fs specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_portal_log; - -/* - * entry point - */ -int -portal_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc) -} - -static int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_createv(&_portal_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "vfs", NULL, - NULL, 0, NULL, 0, - CTL_VFS, CTL_EOL); - sysctl_createv(&_portal_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "portal", - SYSCTL_DESCR("Portal daemon file system"), - NULL, 0, NULL, 0, - CTL_VFS, 8, CTL_EOL); - /* - * XXX the "8" above could be dynamic, thereby eliminating one - * more instance of the "number to vfs" mapping problem, but - * "8" is the order as taken from sys/mount.h - */ - return (0); -} - -static int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_portal_log); - return (0); -} diff --git a/sys/lkm/vfs/miscfs/procfs/Makefile b/sys/lkm/vfs/miscfs/procfs/Makefile deleted file mode 100644 index 3c1d3bd06d6..00000000000 --- a/sys/lkm/vfs/miscfs/procfs/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -# $NetBSD: Makefile,v 1.17 2003/01/03 13:22:23 christos Exp $ - -.include "../Makefile.inc" - -.PATH: $S/miscfs/procfs ${.CURDIR}/../.. $S/arch/${MACHINE}/${MACHINE} \ - $S/arch/${MACHINE_CPU}/${MACHINE_CPU} - -KMOD= procfs - -SRCS= lkminit_vfs.c -SRCS+= procfs_ctl.c procfs_note.c procfs_status.c procfs_subr.c -SRCS+= procfs_vfsops.c procfs_vnops.c procfs_cmdline.c procfs_linux.c -SRCS+= procfs_machdep.c procfs_map.c procfs_regs.c procfs_fpregs.c -SRCS+= procfs_mem.c procfs_fd.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/miscfs/procfs/lkminit_vfs.c b/sys/lkm/vfs/miscfs/procfs/lkminit_vfs.c deleted file mode 100644 index bd8111070fc..00000000000 --- a/sys/lkm/vfs/miscfs/procfs/lkminit_vfs.c +++ /dev/null @@ -1,113 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.11 2008/06/28 15:50:20 rumble Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.11 2008/06/28 15:50:20 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <miscfs/procfs/procfs.h> - -int procfs_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops procfs_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("procfs", -1, &procfs_vfsops); - -/* - * take care of fs specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_procfs_log; - -/* - * entry point - */ -int -procfs_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc) -} - -static int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_createv(&_procfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "vfs", NULL, - NULL, 0, NULL, 0, - CTL_VFS, CTL_EOL); - sysctl_createv(&_procfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "procfs", - SYSCTL_DESCR("Process file system"), - NULL, 0, NULL, 0, - CTL_VFS, 12, CTL_EOL); - /* - * XXX the "12" above could be dynamic, thereby eliminating - * one more instance of the "number to vfs" mapping problem, - * but "12" is the order as taken from sys/mount.h - */ - return (0); -} - -static int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_procfs_log); - return (0); -} diff --git a/sys/lkm/vfs/miscfs/umapfs/Makefile b/sys/lkm/vfs/miscfs/umapfs/Makefile deleted file mode 100644 index ca8d7bf3547..00000000000 --- a/sys/lkm/vfs/miscfs/umapfs/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.7 2001/12/12 12:06:49 lukem Exp $ - -.include "../Makefile.inc" - -.PATH: $S/miscfs/umapfs ${.CURDIR}/../.. - -KMOD= umapfs - -SRCS= lkminit_vfs.c -SRCS+= umap_vfsops.c umap_vnops.c umap_subr.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/miscfs/umapfs/lkminit_vfs.c b/sys/lkm/vfs/miscfs/umapfs/lkminit_vfs.c deleted file mode 100644 index 0144e6bc56e..00000000000 --- a/sys/lkm/vfs/miscfs/umapfs/lkminit_vfs.c +++ /dev/null @@ -1,114 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.12 2008/06/28 15:50:20 rumble Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.12 2008/06/28 15:50:20 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <sys/vnode.h> -#include <miscfs/umapfs/umap.h> - -int umapfs_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops umapfs_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("umapfs", -1, &umapfs_vfsops); - -/* - * take care of fs specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_umapfs_log; - -/* - * entry point - */ -int -umapfs_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc) -} - -static int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_createv(&_umapfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "vfs", NULL, - NULL, 0, NULL, 0, - CTL_VFS, CTL_EOL); - sysctl_createv(&_umapfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "umap", - SYSCTL_DESCR("UID/GID remapping file system"), - NULL, 0, NULL, 0, - CTL_VFS, 10, CTL_EOL); - /* - * XXX the "10" above could be dynamic, thereby eliminating - * one more instance of the "number to vfs" mapping problem, - * but "10" is the order as taken from sys/mount.h - */ - return (0); -} - -static int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_umapfs_log); - return (0); -} diff --git a/sys/lkm/vfs/miscfs/union/Makefile b/sys/lkm/vfs/miscfs/union/Makefile deleted file mode 100644 index 79b2fbfa024..00000000000 --- a/sys/lkm/vfs/miscfs/union/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.11 2003/03/16 08:26:49 jdolecek Exp $ - -.include "../Makefile.inc" - -.PATH: $S/fs/union ${.CURDIR}/../.. - -KMOD= union - -SRCS= lkminit_vfs.c -SRCS+= union_vfsops.c union_vnops.c union_subr.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/miscfs/union/lkminit_vfs.c b/sys/lkm/vfs/miscfs/union/lkminit_vfs.c deleted file mode 100644 index 67b981bb2e7..00000000000 --- a/sys/lkm/vfs/miscfs/union/lkminit_vfs.c +++ /dev/null @@ -1,114 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.12 2008/06/28 15:50:20 rumble Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.12 2008/06/28 15:50:20 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> -#include <sys/namei.h> - -#include <fs/union/union.h> - -int union_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops union_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("union", -1, &union_vfsops); - -/* - * take care of fs specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_union_log; - -/* - * entry point - */ -int -union_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc) -} - -int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_createv(&_union_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "vfs", NULL, - NULL, 0, NULL, 0, - CTL_VFS, CTL_EOL); - sysctl_createv(&_union_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "union", - SYSCTL_DESCR("Union file system"), - NULL, 0, NULL, 0, - CTL_VFS, 15, CTL_EOL); - /* - * XXX the "15" above could be dynamic, thereby eliminating - * one more instance of the "number to vfs" mapping problem, - * but "15" is the order as taken from sys/mount.h - */ - return (0); -} - -int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_union_log); - return (0); -} diff --git a/sys/lkm/vfs/msdosfs/Makefile b/sys/lkm/vfs/msdosfs/Makefile deleted file mode 100644 index cef0a800e9e..00000000000 --- a/sys/lkm/vfs/msdosfs/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.10 2002/12/26 12:31:25 jdolecek Exp $ - -.include "../Makefile.inc" - -.PATH: $S/fs/msdosfs ${.CURDIR}/.. - -KMOD= msdosfs - -SRCS= lkminit_vfs.c -SRCS+= msdosfs_conv.c msdosfs_denode.c msdosfs_fat.c msdosfs_lookup.c -SRCS+= msdosfs_vfsops.c msdosfs_vnops.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/msdosfs/lkminit_vfs.c b/sys/lkm/vfs/msdosfs/lkminit_vfs.c deleted file mode 100644 index 4489517d1d4..00000000000 --- a/sys/lkm/vfs/msdosfs/lkminit_vfs.c +++ /dev/null @@ -1,114 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.11 2008/06/28 15:50:20 rumble Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.11 2008/06/28 15:50:20 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <fs/msdosfs/bpb.h> -#include <fs/msdosfs/msdosfsmount.h> - -int msdosfs_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops msdosfs_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("msdosfs", -1, &msdosfs_vfsops); - -/* - * take care of fs specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_msdosfs_log; - -/* - * entry point - */ -int -msdosfs_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc) -} - -static int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_createv(&_msdosfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "vfs", NULL, - NULL, 0, NULL, 0, - CTL_VFS, CTL_EOL); - sysctl_createv(&_msdosfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "msdosfs", - SYSCTL_DESCR("MS-DOS file system"), - NULL, 0, NULL, 0, - CTL_VFS, 4, CTL_EOL); - /* - * XXX the "4" above could be dynamic, thereby eliminating one - * more instance of the "number to vfs" mapping problem, but - * "4" is the order as taken from sys/mount.h - */ - return (0); -} - -static int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_msdosfs_log); - return (0); -} diff --git a/sys/lkm/vfs/ntfs/Makefile b/sys/lkm/vfs/ntfs/Makefile deleted file mode 100644 index 67b17f8edde..00000000000 --- a/sys/lkm/vfs/ntfs/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.5 2002/12/23 17:38:21 jdolecek Exp $ - -.include "../Makefile.inc" - -.PATH: $S/fs/ntfs ${.CURDIR}/.. - -KMOD= ntfs - -SRCS= lkminit_vfs.c -SRCS+= ntfs_compr.c ntfs_ihash.c ntfs_subr.c ntfs_vfsops.c ntfs_vnops.c -SRCS+= ntfs_conv.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/ntfs/lkminit_vfs.c b/sys/lkm/vfs/ntfs/lkminit_vfs.c deleted file mode 100644 index b47f772fac5..00000000000 --- a/sys/lkm/vfs/ntfs/lkminit_vfs.c +++ /dev/null @@ -1,114 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.11 2008/06/28 15:50:20 rumble Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.11 2008/06/28 15:50:20 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <fs/ntfs/ntfs.h> -#include <fs/ntfs/ntfs_vfsops.h> - -int ntfs_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops ntfs_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("ntfs", -1, &ntfs_vfsops); - -/* - * take care of fs specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_ntfs_log; - -/* - * entry point - */ -int -ntfs_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc) -} - -static int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_createv(&_ntfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "vfs", NULL, - NULL, 0, NULL, 0, - CTL_VFS, CTL_EOL); - sysctl_createv(&_ntfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "ntfs", - SYSCTL_DESCR("NTFS file system"), - NULL, 0, NULL, 0, - CTL_VFS, 20, CTL_EOL); - /* - * XXX the "20" above could be dynamic, thereby eliminating - * one more instance of the "number to vfs" mapping problem, - * but "20" is the order as taken from sys/mount.h - */ - return (0); -} - -static int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_ntfs_log); - return (0); -} diff --git a/sys/lkm/vfs/ptyfs/Makefile b/sys/lkm/vfs/ptyfs/Makefile deleted file mode 100644 index 2fb9cd41512..00000000000 --- a/sys/lkm/vfs/ptyfs/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2005/12/11 12:24:50 christos Exp $ - -.include "../Makefile.inc" - -.PATH: $S/fs/ptyfs ${.CURDIR}/../.. $S/arch/${MACHINE}/${MACHINE} \ - $S/arch/${MACHINE_CPU}/${MACHINE_CPU} - -KMOD= ptyfs - -SRCS= lkminit_vfs.c -SRCS+= ptyfs_vfsops.c ptyfs_vnops.c ptyfs_subr.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/ptyfs/lkminit_vfs.c b/sys/lkm/vfs/ptyfs/lkminit_vfs.c deleted file mode 100644 index b1fbb43965d..00000000000 --- a/sys/lkm/vfs/ptyfs/lkminit_vfs.c +++ /dev/null @@ -1,106 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.4 2008/06/28 15:50:20 rumble Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.4 2008/06/28 15:50:20 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <fs/ptyfs/ptyfs.h> - -int ptyfs_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops ptyfs_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("ptyfs", -1, &ptyfs_vfsops); - -/* - * take care of fs specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_ptyfs_log; - -/* - * entry point - */ -int -ptyfs_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc) -} - -static int -load(struct lkm_table *lkmtp, int cmd) -{ - - sysctl_createv(&_ptyfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "vfs", NULL, - NULL, 0, NULL, 0, - CTL_VFS, CTL_EOL); - sysctl_createv(&_ptyfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "ptyfs", - SYSCTL_DESCR("Pty file system"), - NULL, 0, NULL, 0, - CTL_VFS, 23, CTL_EOL); - /* - * XXX the "23" above could be dynamic, thereby eliminating - * one more instance of the "number to vfs" mapping problem, - * but "23" is the order as taken from sys/mount.h - */ - return (0); -} - -static int -unload(struct lkm_table *lkmtp, int cmd) -{ - - sysctl_teardown(&_ptyfs_log); - return (0); -} diff --git a/sys/lkm/vfs/puffs/Makefile b/sys/lkm/vfs/puffs/Makefile deleted file mode 100644 index d52adfe1a86..00000000000 --- a/sys/lkm/vfs/puffs/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2007/11/12 12:31:15 pooka Exp $ - -.include "../Makefile.inc" - -.PATH: $S/fs/puffs ${.CURDIR}/.. - -KMOD= puffs - -SRCS= lkminit_vfs.c -SRCS+= puffs_node.c puffs_msgif.c puffs_subr.c puffs_vfsops.c puffs_vnops.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/puffs/lkminit_vfs.c b/sys/lkm/vfs/puffs/lkminit_vfs.c deleted file mode 100644 index 9aec3721c09..00000000000 --- a/sys/lkm/vfs/puffs/lkminit_vfs.c +++ /dev/null @@ -1,79 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.4 2008/04/28 20:24:08 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Lubomir Kundrak <lkundrak@skosi.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.4 2008/04/28 20:24:08 martin Exp $"); - -#include <sys/param.h> -#include <sys/lkm.h> - -static int puffs_dispatch_vfs(struct lkm_table *, int, int); -int puffs_lkmentry(struct lkm_table *, int, int); - -/* - * The VFS part of module. - */ -static int -puffs_dispatch_vfs(struct lkm_table *lkmtp, int cmd, int ver) -{ - extern struct vfsops puffs_vfsops; - - /* - * declare the filesystem - */ - MOD_VFS("puffs", -1, &puffs_vfsops); - lkmtp->private.lkm_any = (void *) &_module; /* XXX */ - - DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); -} - -/* - * entry point - */ -int -puffs_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - int error = 0; - - switch (cmd) { - case LKM_E_UNLOAD: - case LKM_E_LOAD: - error = puffs_dispatch_vfs(lkmtp, cmd, ver); - break; - case LKM_E_STAT: - error = lkmdispatch(lkmtp, cmd); - break; - } - return error; -} diff --git a/sys/lkm/vfs/smbfs/Makefile b/sys/lkm/vfs/smbfs/Makefile deleted file mode 100644 index 92ab1101b95..00000000000 --- a/sys/lkm/vfs/smbfs/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.1 2003/04/02 09:45:43 jdolecek Exp $ - -.include "../Makefile.inc" - -.PATH: $S/fs/smbfs - -KMOD= smbfs - -SRCS= lkminit_vfs.c -SRCS+= smbfs_io.c smbfs_kq.c smbfs_node.c smbfs_smb.c smbfs_subr.c \ - smbfs_vfsops.c smbfs_vnops.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/smbfs/lkminit_vfs.c b/sys/lkm/vfs/smbfs/lkminit_vfs.c deleted file mode 100644 index 97c90be00bb..00000000000 --- a/sys/lkm/vfs/smbfs/lkminit_vfs.c +++ /dev/null @@ -1,122 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.8 2008/06/28 15:50:21 rumble Exp $ */ - -/*- - * Copyright (c) 2003 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Jaromir Dolecek. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.8 2008/06/28 15:50:21 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <netsmb/smb.h> -#include <netsmb/smb_conn.h> - -#include <fs/smbfs/smbfs.h> -#include <fs/smbfs/smbfs_subr.h> - -int smbfs_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops smbfs_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("smbfs", -1, &smbfs_vfsops); - -/* - * take care of fs specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_smbfs_log; - -/* - * entry point - */ -int -smbfs_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc) -} - -int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - const struct sysctlnode *smb = NULL; - - sysctl_createv(&_smbfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "vfs", NULL, - NULL, 0, NULL, 0, - CTL_VFS, CTL_EOL); - sysctl_createv(&_smbfs_log, 0, NULL, &smb, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "samba", - SYSCTL_DESCR("SMB/CIFS remote file system"), - NULL, 0, NULL, 0, - CTL_VFS, CTL_CREATE, CTL_EOL); - - if (smb != NULL) { - sysctl_createv(&_smbfs_log, 0, &smb, NULL, - CTLFLAG_PERMANENT|CTLFLAG_IMMEDIATE, - CTLTYPE_INT, "version", - SYSCTL_DESCR("smbfs version"), - NULL, SMBFS_VERSION, NULL, 0, - CTL_CREATE, CTL_EOL); - } - return (0); -} - -int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_smbfs_log); - return (0); -} diff --git a/sys/lkm/vfs/tmpfs/Makefile b/sys/lkm/vfs/tmpfs/Makefile deleted file mode 100644 index e35b2f97d3c..00000000000 --- a/sys/lkm/vfs/tmpfs/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.1 2006/11/05 22:42:14 jmmv Exp $ - -.include "../Makefile.inc" - -.PATH: $S/fs/tmpfs ${.CURDIR}/.. - -KMOD= tmpfs - -SRCS= lkminit_vfs.c -SRCS+= tmpfs_fifoops.c tmpfs_pool.c tmpfs_specops.c tmpfs_subr.c -SRCS+= tmpfs_vfsops.c tmpfs_vnops.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/tmpfs/lkminit_vfs.c b/sys/lkm/vfs/tmpfs/lkminit_vfs.c deleted file mode 100644 index 89c604f1307..00000000000 --- a/sys/lkm/vfs/tmpfs/lkminit_vfs.c +++ /dev/null @@ -1,68 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.2 2008/04/28 20:24:08 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.2 2008/04/28 20:24:08 martin Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <fs/tmpfs/tmpfs.h> - -int tmpfs_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question. - */ -extern struct vfsops tmpfs_vfsops; - -/* - * Declare the filesystem. - */ -MOD_VFS("tmpfs", -1, &tmpfs_vfsops); - -/* - * Entry point. - */ -int -tmpfs_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - - DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); -} diff --git a/sys/lkm/vfs/udf/Makefile b/sys/lkm/vfs/udf/Makefile deleted file mode 100644 index 2616bb7a333..00000000000 --- a/sys/lkm/vfs/udf/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2008/05/14 16:49:48 reinoud Exp $ - -.include "../Makefile.inc" - -.PATH: $S/fs/udf ${.CURDIR}/.. - -KMOD= udf - -SRCS= lkminit_vfs.c -SRCS+= udf_osta.c udf_subr.c udf_vfsops.c udf_vnops.c \ - udf_readwrite.c udf_strat_bootstrap.c udf_strat_direct.c \ - udf_strat_sequential.c udf_strat_rmw.c udf_allocation.c - -CFLAGS+= -DLKM -CFLAGS+= -DPOOL_DIAGNOSTICS -CFLAGS+= -DUDF_READWRITE - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/udf/lkminit_vfs.c b/sys/lkm/vfs/udf/lkminit_vfs.c deleted file mode 100644 index 876a4687fbb..00000000000 --- a/sys/lkm/vfs/udf/lkminit_vfs.c +++ /dev/null @@ -1,73 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.3 2008/04/28 20:24:08 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.3 2008/04/28 20:24:08 martin Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <fs/udf/udf_mount.h> - -int udf_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops udf_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("udf", -1, &udf_vfsops); - -/* - * entry point - */ -int -udf_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); -} - - diff --git a/sys/lkm/vfs/ufs/Makefile b/sys/lkm/vfs/ufs/Makefile deleted file mode 100644 index e33661c9cf6..00000000000 --- a/sys/lkm/vfs/ufs/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2002/12/03 14:34:33 jdolecek Exp $ - -SUBDIR= ext2fs lfs mfs - -.include <bsd.subdir.mk> diff --git a/sys/lkm/vfs/ufs/Makefile.inc b/sys/lkm/vfs/ufs/Makefile.inc deleted file mode 100644 index d671d739283..00000000000 --- a/sys/lkm/vfs/ufs/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.3 1998/03/28 23:58:45 thorpej Exp $ - -S!= cd ${.CURDIR}/../../../..;pwd - -.include "../../Makefile.inc" diff --git a/sys/lkm/vfs/ufs/ext2fs/Makefile b/sys/lkm/vfs/ufs/ext2fs/Makefile deleted file mode 100644 index a5ef5837d45..00000000000 --- a/sys/lkm/vfs/ufs/ext2fs/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $NetBSD: Makefile,v 1.7 2005/12/11 12:24:50 christos Exp $ - -.include "../Makefile.inc" - -.PATH: $S/ufs/ext2fs ${.CURDIR}/../.. - -KMOD= ext2fs - -SRCS= lkminit_vfs.c -SRCS+= ext2fs_alloc.c ext2fs_balloc.c ext2fs_bmap.c ext2fs_bswap.c -SRCS+= ext2fs_inode.c ext2fs_lookup.c ext2fs_readwrite.c ext2fs_subr.c -SRCS+= ext2fs_vfsops.c ext2fs_vnops.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/ufs/ext2fs/lkminit_vfs.c b/sys/lkm/vfs/ufs/ext2fs/lkminit_vfs.c deleted file mode 100644 index 11e06e60cb2..00000000000 --- a/sys/lkm/vfs/ufs/ext2fs/lkminit_vfs.c +++ /dev/null @@ -1,113 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.9 2008/06/28 15:50:21 rumble Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.9 2008/06/28 15:50:21 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <ufs/ext2fs/ext2fs_extern.h> - -int ext2fs_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops ext2fs_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("ext2fs", -1, &ext2fs_vfsops); - -/* - * take care of fs specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_ext2fs_log; - -/* - * entry point - */ -int -ext2fs_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc) -} - -int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_createv(&_ext2fs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "vfs", NULL, - NULL, 0, NULL, 0, - CTL_VFS, CTL_EOL); - sysctl_createv(&_ext2fs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "ext2fs", - SYSCTL_DESCR("Linux EXT2FS file system"), - NULL, 0, NULL, 0, - CTL_VFS, 17, CTL_EOL); - /* - * XXX the "17" above could be dynamic, thereby eliminating - * one more instance of the "number to vfs" mapping problem, - * but "17" is the order as taken from sys/mount.h - */ - return (0); -} - -int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_ext2fs_log); - return (0); -} diff --git a/sys/lkm/vfs/ufs/ffs/Makefile b/sys/lkm/vfs/ufs/ffs/Makefile deleted file mode 100644 index 31de0fe49d4..00000000000 --- a/sys/lkm/vfs/ufs/ffs/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.7 2001/12/12 12:06:50 lukem Exp $ - -.include "../Makefile.inc" - -.PATH: $S/ufs/ffs ${.CURDIR}/../.. - -KMOD= ffs - -SRCS= lkminit_vfs.c -SRCS+= ffs_alloc.c ffs_balloc.c ffs_inode.c ffs_subr.c ffs_tables.c -SRCS+= ffs_vfsops.c ffs_vnops.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/ufs/ffs/lkminit_vfs.c b/sys/lkm/vfs/ufs/ffs/lkminit_vfs.c deleted file mode 100644 index 5aa3e681896..00000000000 --- a/sys/lkm/vfs/ufs/ffs/lkminit_vfs.c +++ /dev/null @@ -1,143 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.11 2008/06/28 15:50:21 rumble Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.11 2008/06/28 15:50:21 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <ufs/ffs/ffs_extern.h> - -int ffs_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops ffs_vfsops; - -/* - * take care of fs specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_ffs_log; - -extern int ffs_log_changeopt; - -/* - * declare the filesystem - */ -MOD_VFS("ffs", -1, &ffs_vfsops); - -/* - * entry point - */ -int -ffs_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc) -} - -int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_createv(&_ffs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "vfs", NULL, - NULL, 0, NULL, 0, - CTL_VFS, CTL_EOL); - sysctl_createv(&_ffs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "ffs", - SYSCTL_DESCR("Berkeley Fast File System"), - NULL, 0, NULL, 0, - CTL_VFS, 1, CTL_EOL); - - /* - * @@@ should we even bother with these first three? - */ - sysctl_createv(&_ffs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT|CTLFLAG_READWRITE, - CTLTYPE_INT, "doclusterread", NULL, - sysctl_notavail, 0, NULL, 0, - CTL_VFS, 1, FFS_CLUSTERREAD, CTL_EOL); - sysctl_createv(&_ffs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT|CTLFLAG_READWRITE, - CTLTYPE_INT, "doclusterwrite", NULL, - sysctl_notavail, 0, NULL, 0, - CTL_VFS, 1, FFS_CLUSTERWRITE, CTL_EOL); - sysctl_createv(&_ffs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT|CTLFLAG_READWRITE, - CTLTYPE_INT, "doreallocblks", NULL, - sysctl_notavail, 0, NULL, 0, - CTL_VFS, 1, FFS_REALLOCBLKS, CTL_EOL); -#if 0 - sysctl_createv(&_ffs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT|CTLFLAG_READWRITE, - CTLTYPE_INT, "doasyncfree", - SYSCTL_DESCR("Release dirty blocks asynchronously"), - NULL, 0, &doasyncfree, 0, - CTL_VFS, 1, FFS_ASYNCFREE, CTL_EOL); -#endif - sysctl_createv(&_ffs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT|CTLFLAG_READWRITE, - CTLTYPE_INT, "log_changeopt", - SYSCTL_DESCR("Log changes in optimization strategy"), - NULL, 0, &ffs_log_changeopt, 0, - CTL_VFS, 1, FFS_LOG_CHANGEOPT, CTL_EOL); - return (0); -} - -int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_ffs_log); - return (0); -} diff --git a/sys/lkm/vfs/ufs/lfs/Makefile b/sys/lkm/vfs/ufs/lfs/Makefile deleted file mode 100644 index 2312028f642..00000000000 --- a/sys/lkm/vfs/ufs/lfs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# $NetBSD: Makefile,v 1.11 2005/12/11 12:24:50 christos Exp $ - -.include "../Makefile.inc" - -.PATH: $S/ufs/lfs $S/ufs/ufs - -lfs_vnops.o: ufs_readwrite.c - -COPTS+= -DLFS -Dufs_mkdir=lfs_ufs_mkdir -Dufs_makeinode=lfs_ufs_makeinode \ - -Dufs_strategy=lfs_ufs_strategy -Dufs_whiteout=lfs_ufs_whiteout \ - -Dufs_link=lfs_ufs_link -Dufs_rename=lfs_ufs_rename -KMOD= lfs - -SRCS= lkminit_vfs.c -SRCS+= lfs_vfsops.c lfs_vnops.c lfs_subr.c -SRCS+= lfs_alloc.c lfs_balloc.c lfs_bio.c lfs_cksum.c lfs_debug.c -SRCS+= lfs_inode.c lfs_segment.c lfs_syscalls.c -SRCS+= ufs_vnops.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/ufs/lfs/lkminit_vfs.c b/sys/lkm/vfs/ufs/lfs/lkminit_vfs.c deleted file mode 100644 index cf74379a5fc..00000000000 --- a/sys/lkm/vfs/ufs/lfs/lkminit_vfs.c +++ /dev/null @@ -1,157 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.16 2008/06/28 15:50:21 rumble Exp $ */ - -/*- - * Copyright (c) 2000 The NetBSD Foundation, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.16 2008/06/28 15:50:21 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#ifndef LFS -# define LFS -#endif - -#include <sys/syscall.h> -#include <sys/syscallargs.h> - -#include <ufs/lfs/lfs_extern.h> - -int lfs_lkmentry(struct lkm_table *, int, int); - -static int lfs_load(struct lkm_table *, int); -static int lfs_unload(struct lkm_table *, int); -static struct sysctllog *_lfs_log; - -#define LFS_SYSENT_CNT 4 -static const struct { - int sysno; - struct sysent sysent; -} lfs_sysents[LFS_SYSENT_CNT] = { - { SYS_lfs_bmapv, - { 3, sizeof(struct sys_lfs_bmapv_args), 0, - (sy_call_t *)sys_lfs_bmapv } }, - { SYS_lfs_markv, - { 3, sizeof(struct sys_lfs_markv_args), 0, - (sy_call_t *)sys_lfs_markv } }, - { SYS_lfs_segclean, - { 2, sizeof(struct sys_lfs_segclean_args), 0, - (sy_call_t *)sys_lfs_segclean } }, - { SYS_lfs_segwait, - { 2, sizeof(struct sys_lfs_segwait_args), 0, - (sy_call_t *)sys_lfs_segwait } }, -}; -static struct sysent lfs_osysent[LFS_SYSENT_CNT]; - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops lfs_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("lfs", -1, &lfs_vfsops); - -extern void lfs_sysctl_setup(struct sysctllog *); - -/* - * entry point - */ -int -lfs_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, lfs_load, lfs_unload, lkm_nofunc); -} - -/* - * Insert lfs sycalls entries into sysent[]. - */ -static int -lfs_load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - int i; - - /* first check if the entries are empty */ - for(i=0; i < LFS_SYSENT_CNT; i++) { - if (sysent[lfs_sysents[i].sysno].sy_call != sys_nosys) { - printf("LKM lfs_load(): lfs syscall %d already used\n", - lfs_sysents[i].sysno); - return EEXIST; - } - } - - /* now, put in the lfs syscalls */ - for(i=0; i < LFS_SYSENT_CNT; i++) { - lfs_osysent[i] = sysent[lfs_sysents[i].sysno]; - sysent[lfs_sysents[i].sysno] = lfs_sysents[i].sysent; - } - - lfs_sysctl_setup(_lfs_log); - - return 0; -} - -/* - * Remove lfs sycalls entries from sysent[]. - */ -static int -lfs_unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - int i; - - sysctl_teardown(&_lfs_log); - - /* reset lfs syscall entries back to nosys */ - for(i=0; i < LFS_SYSENT_CNT; i++) { - if (sysent[lfs_sysents[i].sysno].sy_call != - lfs_sysents[i].sysent.sy_call) { - panic("LKM lfs_unload(): syscall %d not lfs syscall", - lfs_sysents[i].sysno); - } - - sysent[lfs_sysents[i].sysno] = lfs_osysent[i]; - } - - return 0; -} diff --git a/sys/lkm/vfs/ufs/mfs/Makefile b/sys/lkm/vfs/ufs/mfs/Makefile deleted file mode 100644 index f71e24252d7..00000000000 --- a/sys/lkm/vfs/ufs/mfs/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.7 2001/12/12 12:06:50 lukem Exp $ - -.include "../Makefile.inc" - -.PATH: $S/ufs/mfs ${.CURDIR}/../.. - -KMOD= mfs - -SRCS= lkminit_vfs.c -SRCS+= mfs_vfsops.c mfs_vnops.c - -.include <bsd.kmod.mk> diff --git a/sys/lkm/vfs/ufs/mfs/lkminit_vfs.c b/sys/lkm/vfs/ufs/mfs/lkminit_vfs.c deleted file mode 100644 index 5610db5015f..00000000000 --- a/sys/lkm/vfs/ufs/mfs/lkminit_vfs.c +++ /dev/null @@ -1,115 +0,0 @@ -/* $NetBSD: lkminit_vfs.c,v 1.11 2008/06/28 15:50:21 rumble Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Michael Graff <explorer@flame.org>. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.11 2008/06/28 15:50:21 rumble Exp $"); - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/ioctl.h> -#include <sys/systm.h> -#include <sys/conf.h> -#include <sys/mount.h> -#include <sys/exec.h> -#include <sys/lkm.h> -#include <sys/file.h> -#include <sys/errno.h> - -#include <ufs/mfs/mfs_extern.h> - -int mfs_lkmentry(struct lkm_table *, int, int); - -/* - * This is the vfsops table for the file system in question - */ -extern struct vfsops mfs_vfsops; - -/* - * declare the filesystem - */ -MOD_VFS("mfs", -1, &mfs_vfsops); - -/* - * take care of fs specific sysctl nodes - */ -static int load(struct lkm_table *, int); -static int unload(struct lkm_table *, int); -static struct sysctllog *_mfs_log; - -/* - * entry point - */ - -int -mfs_lkmentry(lkmtp, cmd, ver) - struct lkm_table *lkmtp; - int cmd; - int ver; -{ - - DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc) -} - -int -load(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_createv(&_mfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_NODE, "vfs", NULL, - NULL, 0, NULL, 0, - CTL_VFS, CTL_EOL); - sysctl_createv(&_mfs_log, 0, NULL, NULL, - CTLFLAG_PERMANENT|CTLFLAG_ALIAS, - CTLTYPE_NODE, "mfs", - SYSCTL_DESCR("Memory based file system"), - NULL, 1, NULL, 0, - CTL_VFS, 3, CTL_EOL); - /* - * XXX the "1" and the "3" above could be dynamic, thereby - * eliminating one more instance of the "number to vfs" - * mapping problem, but they are in order as taken from - * sys/mount.h - */ - return (0); -} - -int -unload(lkmtp, cmd) - struct lkm_table *lkmtp; - int cmd; -{ - - sysctl_teardown(&_mfs_log); - return (0); -} diff --git a/sys/modules/Makefile b/sys/modules/Makefile index cbaf8f5ab14..117cb5ed403 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -1,6 +1,8 @@ -# $NetBSD: Makefile,v 1.10 2008/09/23 07:56:59 hannken Exp $ +# $NetBSD: Makefile,v 1.11 2008/11/12 12:36:28 ad Exp $ -SUBDIR= miniroot +SUBDIR= accf_data +SUBDIR+= accf_http +SUBDIR+= miniroot SUBDIR+= fss SUBDIR+= putter diff --git a/sys/modules/accf_data/Makefile b/sys/modules/accf_data/Makefile new file mode 100644 index 00000000000..0fc4811658e --- /dev/null +++ b/sys/modules/accf_data/Makefile @@ -0,0 +1,10 @@ +# $NetBSD: Makefile,v 1.1 2008/11/12 12:36:28 ad Exp $ + +.include "../Makefile.inc" + +.PATH: ${S}/netinet + +KMOD= accf_data +SRCS= accf_data.c + +.include <bsd.kmodule.mk> diff --git a/sys/modules/accf_http/Makefile b/sys/modules/accf_http/Makefile new file mode 100644 index 00000000000..5e0909e38c4 --- /dev/null +++ b/sys/modules/accf_http/Makefile @@ -0,0 +1,10 @@ +# $NetBSD: Makefile,v 1.1 2008/11/12 12:36:28 ad Exp $ + +.include "../Makefile.inc" + +.PATH: ${S}/netinet + +KMOD= accf_http +SRCS= accf_http.c + +.include <bsd.kmodule.mk> diff --git a/sys/net/if_etherip.h b/sys/net/if_etherip.h index 4fec3e1836c..b36d188efaa 100644 --- a/sys/net/if_etherip.h +++ b/sys/net/if_etherip.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_etherip.h,v 1.9 2008/10/24 21:41:04 dyoung Exp $ */ +/* $NetBSD: if_etherip.h,v 1.10 2008/11/12 12:36:28 ad Exp $ */ /* * Copyright (c) 2006, Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> @@ -34,7 +34,7 @@ #include <sys/queue.h> -#if defined(_KERNEL) && !defined(_LKM) +#ifdef _KERNEL_OPT #include "opt_inet.h" #endif diff --git a/sys/net/if_gif.h b/sys/net/if_gif.h index d1be4921cce..cbdbc1b0537 100644 --- a/sys/net/if_gif.h +++ b/sys/net/if_gif.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_gif.h,v 1.18 2007/07/14 21:02:40 ad Exp $ */ +/* $NetBSD: if_gif.h,v 1.19 2008/11/12 12:36:28 ad Exp $ */ /* $KAME: if_gif.h,v 1.23 2001/07/27 09:21:42 itojun Exp $ */ /* @@ -39,7 +39,7 @@ #include <sys/queue.h> -#if defined(_KERNEL) && !defined(_LKM) +#ifdef _KERNEL_OPT #include "opt_inet.h" #endif diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c index d4106d89ff6..ab0b0c0d66b 100644 --- a/sys/net/if_tap.c +++ b/sys/net/if_tap.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_tap.c,v 1.50 2008/11/07 00:20:13 dyoung Exp $ */ +/* $NetBSD: if_tap.c,v 1.51 2008/11/12 12:36:28 ad Exp $ */ /* * Copyright (c) 2003, 2004, 2008 The NetBSD Foundation. @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.50 2008/11/07 00:20:13 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.51 2008/11/12 12:36:28 ad Exp $"); #if defined(_KERNEL_OPT) #include "bpfilter.h" @@ -72,7 +72,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.50 2008/11/07 00:20:13 dyoung Exp $"); * sysctl node management * * It's not really possible to use a SYSCTL_SETUP block with - * current LKM implementation, so it is easier to just define + * current module implementation, so it is easier to just define * our own function. * * The handler function is a "helper" in Andrew Brown's sysctl @@ -1230,7 +1230,7 @@ tap_kqread(struct knote *kn, long hint) * (called a link set) which is used at init_sysctl() time to cycle * through all those functions to create the kernel's sysctl tree. * - * It is not (currently) possible to use link sets in a LKM, so the + * It is not possible to use link sets in a module, so the * easiest is to simply call our own setup routine at load time. * * In the SYSCTL_SETUP blocks you find in the kernel, nodes have the diff --git a/sys/net/netisr.h b/sys/net/netisr.h index 2e5631b2cc5..cf732e3cc7e 100644 --- a/sys/net/netisr.h +++ b/sys/net/netisr.h @@ -1,4 +1,4 @@ -/* $NetBSD: netisr.h,v 1.38 2008/10/14 17:15:20 pooka Exp $ */ +/* $NetBSD: netisr.h,v 1.39 2008/11/12 12:36:28 ad Exp $ */ /* * Copyright (c) 1980, 1986, 1989, 1993 @@ -48,13 +48,13 @@ #if defined(_KERNEL) -#if !defined(_LKM) +#if defined(_KERNEL_OPT) #include "opt_inet.h" #include "opt_atalk.h" #include "opt_iso.h" #include "opt_natm.h" #include "arp.h" -#endif /* !defined(_LKM) */ +#endif /* defined(_KERNEL_OPT) */ #if !defined(_LOCORE) diff --git a/sys/net80211/ieee80211_netbsd.c b/sys/net80211/ieee80211_netbsd.c index 1c95d9ad2e1..0972434116c 100644 --- a/sys/net80211/ieee80211_netbsd.c +++ b/sys/net80211/ieee80211_netbsd.c @@ -1,4 +1,4 @@ -/* $NetBSD: ieee80211_netbsd.c,v 1.16 2008/01/31 22:07:22 christos Exp $ */ +/* $NetBSD: ieee80211_netbsd.c,v 1.17 2008/11/12 12:36:28 ad Exp $ */ /*- * Copyright (c) 2003-2005 Sam Leffler, Errno Consulting * All rights reserved. @@ -30,7 +30,7 @@ #ifdef __FreeBSD__ __FBSDID("$FreeBSD: src/sys/net80211/ieee80211_freebsd.c,v 1.8 2005/08/08 18:46:35 sam Exp $"); #else -__KERNEL_RCSID(0, "$NetBSD: ieee80211_netbsd.c,v 1.16 2008/01/31 22:07:22 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee80211_netbsd.c,v 1.17 2008/11/12 12:36:28 ad Exp $"); #endif /* @@ -458,7 +458,7 @@ cleanup: /* * Setup sysctl(3) MIB, net.ieee80211.* * - * TBD condition CTLFLAG_PERMANENT on being an LKM or not + * TBD condition CTLFLAG_PERMANENT on being a module or not */ SYSCTL_SETUP(sysctl_ieee80211, "sysctl ieee80211 subtree setup") { diff --git a/sys/net80211/ieee80211_rssadapt.c b/sys/net80211/ieee80211_rssadapt.c index 12c9219757e..dcd749d1476 100644 --- a/sys/net80211/ieee80211_rssadapt.c +++ b/sys/net80211/ieee80211_rssadapt.c @@ -1,4 +1,4 @@ -/* $NetBSD: ieee80211_rssadapt.c,v 1.15 2008/06/24 10:33:46 gmcgarry Exp $ */ +/* $NetBSD: ieee80211_rssadapt.c,v 1.16 2008/11/12 12:36:28 ad Exp $ */ /*- * Copyright (c) 2003, 2004 David Young. All rights reserved. * @@ -31,7 +31,7 @@ #include <sys/cdefs.h> #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: ieee80211_rssadapt.c,v 1.15 2008/06/24 10:33:46 gmcgarry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee80211_rssadapt.c,v 1.16 2008/11/12 12:36:28 ad Exp $"); #endif #include <sys/param.h> @@ -142,7 +142,7 @@ sysctl_ieee80211_rssadapt_expavgctl(SYSCTLFN_ARGS) /* * Setup sysctl(3) MIB, net.ieee80211.* * - * TBD condition CTLFLAG_PERMANENT on being an LKM or not + * TBD condition CTLFLAG_PERMANENT on being a module or not */ SYSCTL_SETUP(sysctl_ieee80211_rssadapt, "sysctl ieee80211 rssadapt subtree setup") diff --git a/sys/netinet/accf_data.c b/sys/netinet/accf_data.c index b435c5397f8..aebad5bcabb 100644 --- a/sys/netinet/accf_data.c +++ b/sys/netinet/accf_data.c @@ -1,4 +1,4 @@ -/* $NetBSD: accf_data.c,v 1.2 2008/10/14 13:05:44 ad Exp $ */ +/* $NetBSD: accf_data.c,v 1.3 2008/11/12 12:36:28 ad Exp $ */ /*- * Copyright (c) 2000 Alfred Perlstein <alfred@FreeBSD.org> @@ -27,19 +27,21 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: accf_data.c,v 1.2 2008/10/14 13:05:44 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: accf_data.c,v 1.3 2008/11/12 12:36:28 ad Exp $"); #define ACCEPT_FILTER_MOD #include <sys/param.h> #include <sys/kernel.h> -#include <sys/lkm.h> +#include <sys/module.h> #include <sys/sysctl.h> #include <sys/signalvar.h> #include <sys/socketvar.h> #include <netinet/accept_filter.h> +MODULE(MODULE_CLASS_MISC, accf_data, NULL); + /* accept filter that holds a socket until data arrives */ static void sohasdata(struct socket *so, void *arg, int waitflag); @@ -49,40 +51,30 @@ static struct accept_filter accf_data_filter = { .accf_callback = sohasdata, }; -void accf_dataattach(int); -void accf_dataattach(int num) +/* XXX pseudo-device */ +void accf_dataattach(int); + +void +accf_dataattach(int junk) { - accept_filt_generic_mod_event(NULL, LKM_E_LOAD, &accf_data_filter); -} -/* - * This code is to make DATA ready accept filer as LKM. - * To compile as LKM we need to move this set of code into - * another file and include this file for compilation when - * making LKM - */ +} -#ifdef _LKM -static int accf_data_handle(struct lkm_table * lkmtp, int cmd); -int accf_data_lkmentry(struct lkm_table * lkmtp, int cmd, int ver); +static int +accf_data_modcmd(modcmd_t cmd, void *arg) +{ -MOD_MISC("accf_data"); + switch (cmd) { + case MODULE_CMD_INIT: + return accept_filt_add(&accf_data_filter); -static int accf_data_handle(struct lkm_table * lkmtp, int cmd) -{ - return accept_filt_generic_mod_event(lkmtp, cmd, &accf_data_filter); -} + case MODULE_CMD_FINI: + return accept_filt_del(&accf_data_filter); -/* - * the module entry point. - */ -int -accf_data_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - DISPATCH(lkmtp, cmd, ver, accf_data_handle, accf_data_handle, - accf_data_handle) + default: + return ENOTTY; + } } -#endif static void sohasdata(struct socket *so, void *arg, int waitflag) diff --git a/sys/netinet/accf_http.c b/sys/netinet/accf_http.c index b61bf9eb7cc..86efbbb9f79 100644 --- a/sys/netinet/accf_http.c +++ b/sys/netinet/accf_http.c @@ -1,4 +1,4 @@ -/* $NetBSD: accf_http.c,v 1.2 2008/10/14 13:05:44 ad Exp $ */ +/* $NetBSD: accf_http.c,v 1.3 2008/11/12 12:36:28 ad Exp $ */ /*- * Copyright (c) 2000 Paycounter, Inc. @@ -28,14 +28,14 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: accf_http.c,v 1.2 2008/10/14 13:05:44 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: accf_http.c,v 1.3 2008/11/12 12:36:28 ad Exp $"); #define ACCEPT_FILTER_MOD #include <sys/param.h> #include <sys/kernel.h> #include <sys/mbuf.h> -#include <sys/lkm.h> +#include <sys/module.h> #include <sys/signalvar.h> #include <sys/sysctl.h> #include <sys/socket.h> @@ -43,6 +43,8 @@ __KERNEL_RCSID(0, "$NetBSD: accf_http.c,v 1.2 2008/10/14 13:05:44 ad Exp $"); #include <netinet/accept_filter.h> +MODULE(MODULE_CLASS_MISC, accf_http, NULL); + /* check for GET/HEAD */ static void sohashttpget(struct socket *so, void *arg, int waitflag); /* check for HTTP/1.0 or HTTP/1.1 */ @@ -70,30 +72,49 @@ static struct accept_filter accf_http_filter = { static int parse_http_version = 1; -SYSCTL_SETUP(sysctl_net_inet_accf__http_setup, "sysctl net.inet.accf.http subtree setup") +/* XXX pseudo-device */ +void accf_httpattach(int); + +void +accf_httpattach(int junk) +{ + +} + +static int +accf_http_modcmd(modcmd_t cmd, void *arg) { - sysctl_createv(clog, 0, NULL, NULL, + static struct sysctllog *clog; + int error; + + switch (cmd) { + case MODULE_CMD_INIT: + error = accept_filt_add(&accf_http_filter); + if (error != 0) { + return error; + } + sysctl_createv(&clog, 0, NULL, NULL, CTLFLAG_PERMANENT, CTLTYPE_NODE, "net", NULL, NULL, 0, NULL, 0, CTL_NET, CTL_EOL); - sysctl_createv(clog, 0, NULL, NULL, + sysctl_createv(&clog, 0, NULL, NULL, CTLFLAG_PERMANENT, CTLTYPE_NODE, "inet", NULL, NULL, 0, NULL, 0, CTL_NET, PF_INET, CTL_EOL); - sysctl_createv(clog, 0, NULL, NULL, + sysctl_createv(&clog, 0, NULL, NULL, CTLFLAG_PERMANENT, CTLTYPE_NODE, "accf", NULL, NULL, 0, NULL, 0, CTL_NET, PF_INET, SO_ACCEPTFILTER, CTL_EOL); - sysctl_createv(clog, 0, NULL, NULL, + sysctl_createv(&clog, 0, NULL, NULL, CTLFLAG_PERMANENT, CTLTYPE_NODE, "http", SYSCTL_DESCR("HTTP accept filter"), NULL, 0, NULL, 0, CTL_NET, PF_INET, SO_ACCEPTFILTER, ACCF_HTTP, CTL_EOL); - sysctl_createv(clog, 0, NULL, NULL, + sysctl_createv(&clog, 0, NULL, NULL, CTLFLAG_PERMANENT|CTLFLAG_READWRITE, CTLTYPE_INT, "parsehttpversion", SYSCTL_DESCR("Parse http version so that non " @@ -101,43 +122,20 @@ SYSCTL_SETUP(sysctl_net_inet_accf__http_setup, "sysctl net.inet.accf.http subtre NULL, 0, &parse_http_version, 0, CTL_NET, PF_INET, SO_ACCEPTFILTER, ACCF_HTTP, ACCFCTL_PARSEVER, CTL_EOL); -} - -void accf_httpattach(int); -void accf_httpattach(int num) -{ - accept_filt_generic_mod_event(NULL, LKM_E_LOAD, &accf_http_filter); -} - -/* - * This code is to make HTTP ready accept filer as LKM. - * To compile as LKM we need to move this set of code into - * another file and include this file for compilation when - * making LKM - */ - -#ifdef _LKM -static int accf_http_handle(struct lkm_table * lkmtp, int cmd); -int accf_http_lkmentry(struct lkm_table * lkmtp, int cmd, int ver); - -MOD_MISC("accf_http"); + return 0; -static int accf_http_handle(struct lkm_table * lkmtp, int cmd) -{ - - return accept_filt_generic_mod_event(lkmtp, cmd, &accf_http_filter); -} + case MODULE_CMD_FINI: + error = accept_filt_del(&accf_http_filter); + if (error != 0) { + return error; + } + sysctl_teardown(&clog); + return 0; -/* - * the module entry point. - */ -int -accf_http_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) -{ - DISPATCH(lkmtp, cmd, ver, accf_http_handle, accf_http_handle, - accf_http_handle) + default: + return ENOTTY; + } } -#endif #ifdef ACCF_HTTP_DEBUG #define DPRINT(fmt, args...) \ diff --git a/sys/netinet/ip_ecn.h b/sys/netinet/ip_ecn.h index 63bccc2e347..a9612efa55a 100644 --- a/sys/netinet/ip_ecn.h +++ b/sys/netinet/ip_ecn.h @@ -1,4 +1,4 @@ -/* $NetBSD: ip_ecn.h,v 1.11 2005/12/10 23:36:23 elad Exp $ */ +/* $NetBSD: ip_ecn.h,v 1.12 2008/11/12 12:36:28 ad Exp $ */ /* $KAME: ip_ecn.h,v 1.6 2001/05/03 14:51:48 itojun Exp $ */ /* @@ -39,7 +39,7 @@ #define _NETINET_IP_ECN_H_ #if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(__NetBSD__) -#if defined(_KERNEL) && !defined(_LKM) +#if defined(_KERNEL_OPT) #include "opt_inet.h" #endif #endif diff --git a/sys/netipsec/ipsec.h b/sys/netipsec/ipsec.h index 1924841b98c..0429216de64 100644 --- a/sys/netipsec/ipsec.h +++ b/sys/netipsec/ipsec.h @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec.h,v 1.22 2008/04/23 06:09:05 thorpej Exp $ */ +/* $NetBSD: ipsec.h,v 1.23 2008/11/12 12:36:28 ad Exp $ */ /* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.h,v 1.2.4.2 2004/02/14 22:23:23 bms Exp $ */ /* $KAME: ipsec.h,v 1.53 2001/11/20 08:32:38 itojun Exp $ */ @@ -38,7 +38,7 @@ #ifndef _NETIPSEC_IPSEC_H_ #define _NETIPSEC_IPSEC_H_ -#if defined(_KERNEL) && !defined(_LKM) && !defined(KLD_MODULE) +#if defined(_KERNEL_OPT) #include "opt_inet.h" #include "opt_ipsec.h" #endif diff --git a/sys/secmodel/bsd44/secmodel_bsd44_suser.c b/sys/secmodel/bsd44/secmodel_bsd44_suser.c index ac88cce78c2..91162d041a4 100644 --- a/sys/secmodel/bsd44/secmodel_bsd44_suser.c +++ b/sys/secmodel/bsd44/secmodel_bsd44_suser.c @@ -1,4 +1,4 @@ -/* $NetBSD: secmodel_bsd44_suser.c,v 1.59 2008/10/22 11:16:29 ad Exp $ */ +/* $NetBSD: secmodel_bsd44_suser.c,v 1.60 2008/11/12 12:36:28 ad Exp $ */ /*- * Copyright (c) 2006 Elad Efrat <elad@NetBSD.org> * All rights reserved. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: secmodel_bsd44_suser.c,v 1.59 2008/10/22 11:16:29 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: secmodel_bsd44_suser.c,v 1.60 2008/11/12 12:36:28 ad Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -351,7 +351,6 @@ secmodel_bsd44_suser_system_cb(kauth_cred_t cred, kauth_action_t action, break; case KAUTH_SYSTEM_CHSYSFLAGS: - case KAUTH_SYSTEM_LKM: case KAUTH_SYSTEM_SETIDCORE: /* * Decisions here are root-agnostic. @@ -360,8 +359,6 @@ secmodel_bsd44_suser_system_cb(kauth_cred_t cred, kauth_action_t action, * determined as root. Needs to be re-factored * anyway. Infects ufs, ext2fs, tmpfs, and rump. * - * LKM - Subject to permissions on /dev/lkm for now. - * * SETIDCORE - Should be used only after the caller was * determined as someone who can modify sysctl * data. For us, this means root. diff --git a/sys/secmodel/securelevel/secmodel_securelevel.c b/sys/secmodel/securelevel/secmodel_securelevel.c index fa94a5e4467..1a59358269b 100644 --- a/sys/secmodel/securelevel/secmodel_securelevel.c +++ b/sys/secmodel/securelevel/secmodel_securelevel.c @@ -1,4 +1,4 @@ -/* $NetBSD: secmodel_securelevel.c,v 1.8 2008/01/23 15:04:41 elad Exp $ */ +/* $NetBSD: secmodel_securelevel.c,v 1.9 2008/11/12 12:36:28 ad Exp $ */ /*- * Copyright (c) 2006 Elad Efrat <elad@NetBSD.org> * All rights reserved. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: secmodel_securelevel.c,v 1.8 2008/01/23 15:04:41 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: secmodel_securelevel.c,v 1.9 2008/11/12 12:36:28 ad Exp $"); #ifdef _KERNEL_OPT #include "opt_insecure.h" @@ -200,7 +200,6 @@ secmodel_securelevel_system_cb(kauth_cred_t cred, } break; - case KAUTH_SYSTEM_LKM: case KAUTH_SYSTEM_MODULE: if (securelevel > 0) result = KAUTH_RESULT_DENY; diff --git a/sys/sys/Makefile b/sys/sys/Makefile index eb62d0c204b..65cd055c79a 100644 --- a/sys/sys/Makefile +++ b/sys/sys/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.114 2008/10/19 22:05:23 apb Exp $ +# $NetBSD: Makefile,v 1.115 2008/11/12 12:36:28 ad Exp $ .include <bsd.sys.mk> @@ -18,7 +18,7 @@ INCS= acct.h agpio.h aio.h ansi.h ataio.h atomic.h audioio.h \ ieee754.h inttypes.h ioccom.h ioctl.h ioctl_compat.h iostat.h ipc.h \ joystick.h \ kcore.h kgdb.h kmem.h ksem.h ksyms.h ktrace.h \ - lkm.h localedef.h lock.h lockf.h lwp.h lwpctl.h \ + localedef.h lock.h lockf.h lwp.h lwpctl.h \ malloc.h mallocvar.h mbuf.h md4.h md5.h midiio.h \ mman.h module.h mount.h mqueue.h msg.h msgbuf.h mtio.h mutex.h \ namei.h null.h \ diff --git a/sys/sys/device.h b/sys/sys/device.h index 4e2b528921f..89fffebae09 100644 --- a/sys/sys/device.h +++ b/sys/sys/device.h @@ -1,4 +1,4 @@ -/* $NetBSD: device.h,v 1.113 2008/11/06 03:40:04 dyoung Exp $ */ +/* $NetBSD: device.h,v 1.114 2008/11/12 12:36:28 ad Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -350,7 +350,7 @@ struct cfattachinit { }; /* * the same, but with a non-constant list so it can be modified - * for LKM bookkeeping + * for module bookkeeping */ struct cfattachlkminit { const char *cfai_name; /* driver name */ diff --git a/sys/sys/exec.h b/sys/sys/exec.h index 240f8def437..ab4b4d85158 100644 --- a/sys/sys/exec.h +++ b/sys/sys/exec.h @@ -1,4 +1,4 @@ -/* $NetBSD: exec.h,v 1.124 2008/07/02 17:28:57 ad Exp $ */ +/* $NetBSD: exec.h,v 1.125 2008/11/12 12:36:28 ad Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -259,14 +259,12 @@ int cpu_coredump(struct lwp *, void *, struct core *); int cpu_coredump32(struct lwp *, void *, struct core32 *); -#ifdef LKM int emul_register (const struct emul *, int); int emul_unregister (const char *); const struct emul *emul_search(const char *); int exec_add (struct execsw *, const char *); int exec_remove (const struct execsw *); -#endif /* LKM */ void new_vmcmd(struct exec_vmcmd_set *, int (*)(struct lwp *, struct exec_vmcmd *), diff --git a/sys/sys/exec_elf.h b/sys/sys/exec_elf.h index d48cb134d28..891a824ecde 100644 --- a/sys/sys/exec_elf.h +++ b/sys/sys/exec_elf.h @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf.h,v 1.95 2008/04/28 20:24:10 martin Exp $ */ +/* $NetBSD: exec_elf.h,v 1.96 2008/11/12 12:36:28 ad Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -914,7 +914,7 @@ typedef struct { Elf32_Half vs_vers; } Elf32_Versym; -#ifndef _LKM +#ifdef _KERNEL_OPT #include "opt_execfmt.h" #endif diff --git a/sys/sys/exec_macho.h b/sys/sys/exec_macho.h index 7b17f3cb273..ff698c10529 100644 --- a/sys/sys/exec_macho.h +++ b/sys/sys/exec_macho.h @@ -1,4 +1,4 @@ -/* $NetBSD: exec_macho.h,v 1.20 2008/04/28 20:24:10 martin Exp $ */ +/* $NetBSD: exec_macho.h,v 1.21 2008/11/12 12:36:28 ad Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -242,7 +242,7 @@ struct exec_macho_emul_arg { int dynamic; }; -#ifndef _LKM +#ifdef _KERNEL_OPT #include "opt_execfmt.h" #endif diff --git a/sys/sys/ioctl.h b/sys/sys/ioctl.h index 8e42754a439..93bf4da3d51 100644 --- a/sys/sys/ioctl.h +++ b/sys/sys/ioctl.h @@ -1,4 +1,4 @@ -/* $NetBSD: ioctl.h,v 1.34 2005/12/11 12:25:20 christos Exp $ */ +/* $NetBSD: ioctl.h,v 1.35 2008/11/12 12:36:28 ad Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993, 1994 @@ -63,7 +63,7 @@ struct ttysize { /* * Passthrough ioctl commands. These are passed through to devices - * as they are, it is expected that the device (an LKM, for example), + * as they are, it is expected that the device (a module, for example), * will know how to deal with them. One for each emulation, so that * no namespace clashes will occur between them, for devices that * may be dealing with specific ioctls for multiple emulations. @@ -112,6 +112,6 @@ __END_DECLS #if defined(USE_OLD_TTY) || defined(COMPAT_43) || defined(COMPAT_SUNOS) || \ defined(COMPAT_SVR4) || defined(COMPAT_FREEBSD) || defined(COMPAT_OSF1) || \ - defined(COMPAT_IBCS2) || defined(LKM) + defined(COMPAT_IBCS2) || defined(MODULAR) #include <sys/ioctl_compat.h> #endif diff --git a/sys/sys/kauth.h b/sys/sys/kauth.h index 6755106b0fc..3dfa9d9323e 100644 --- a/sys/sys/kauth.h +++ b/sys/sys/kauth.h @@ -1,4 +1,4 @@ -/* $NetBSD: kauth.h,v 1.52 2008/02/28 17:07:49 elad Exp $ */ +/* $NetBSD: kauth.h,v 1.53 2008/11/12 12:36:28 ad Exp $ */ /*- * Copyright (c) 2005, 2006 Elad Efrat <elad@NetBSD.org> @@ -86,7 +86,6 @@ enum { KAUTH_SYSTEM_CPU, KAUTH_SYSTEM_DEBUG, KAUTH_SYSTEM_FILEHANDLE, - KAUTH_SYSTEM_LKM, KAUTH_SYSTEM_MKNOD, KAUTH_SYSTEM_MOUNT, KAUTH_SYSTEM_PSET, diff --git a/sys/sys/ksyms.h b/sys/sys/ksyms.h index 10127b3d854..4542e303d90 100644 --- a/sys/sys/ksyms.h +++ b/sys/sys/ksyms.h @@ -1,4 +1,4 @@ -/* $NetBSD: ksyms.h,v 1.17 2008/10/24 13:55:42 christos Exp $ */ +/* $NetBSD: ksyms.h,v 1.18 2008/11/12 12:36:28 ad Exp $ */ /* * Copyright (c) 2001, 2003 Anders Magnusson (ragge@ludd.luth.se). @@ -46,7 +46,6 @@ struct ksyms_symtab { int sd_symsize; /* Size in bytes of symbol table */ int sd_strsize; /* Size of string table */ bool sd_gone; /* dead but around for open() */ - bool sd_malloc; /* XXX REMOVE WHEN LKMS GO */ }; /* diff --git a/sys/sys/lkm.h b/sys/sys/lkm.h deleted file mode 100644 index cfe29e21dd2..00000000000 --- a/sys/sys/lkm.h +++ /dev/null @@ -1,420 +0,0 @@ -/* $NetBSD: lkm.h,v 1.43 2008/01/02 17:52:02 ad Exp $ */ - -/* - * Header file used by loadable kernel modules and loadable kernel module - * utilities. - * - * 23 Jan 93 Terry Lambert Original - * - * Copyright (c) 1992 Terrence R. Lambert. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Terrence R. Lambert. - * 4. The name Terrence R. Lambert may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef _SYS_LKM_H_ -#define _SYS_LKM_H_ - -#include <sys/queue.h> - -/* - * Supported module types - */ -typedef enum loadmod { - LM_SYSCALL, - LM_VFS, - LM_DEV, - LM_STRMOD, - LM_EXEC, - LM_COMPAT, - LM_MISC, - LM_DRV -} MODTYPE; - -#define MODTYPE_NAMES \ - "SYSCALL", \ - "VFS", \ - "DEV", \ - "STRMOD", \ - "EXEC", \ - "COMPAT", \ - "MISC", \ - "DRV" - -/* - * Version of module interface. Bump if kernel structures or API affecting - * LKM modules change, unless the kernel version is bumped at the - * same time too. - */ -#define LKM_VERSION 2 - -#define MAXLKMNAME 32 - -/****************************************************************************/ - -#ifdef _KERNEL - -/* - * Any module (to get type and name info without knowing type) - */ -struct lkm_any { - MODTYPE lkm_type; - const char *lkm_name; - u_long lkm_offset; - u_int lkm_modver; - u_int lkm_sysver; - const char *lkm_envver; -}; - - -/* - * Loadable system call - */ -struct lkm_syscall { - struct lkm_any mod; - struct sysent *lkm_sysent; - struct sysent lkm_oldent; /* save area for unload */ -}; - -/* - * Loadable file system - */ -struct lkm_vfs { - struct lkm_any mod; - struct vfsops *lkm_vfsops; -}; - -/* - * Loadable device driver - */ -struct lkm_dev { - struct lkm_any mod; - const char *lkm_devname; - const struct bdevsw *lkm_bdev; - int lkm_bdevmaj; - const struct cdevsw *lkm_cdev; - int lkm_cdevmaj; -}; - -#ifdef STREAMS -/* - * Loadable streams module - */ -struct lkm_strmod { - struct lkm_any mod; - /* - * Removed: future release - */ -}; -#endif - -/* - * Exec loader - */ -struct lkm_exec { - struct lkm_any mod; - struct execsw *lkm_execsw; - const char *lkm_emul; -}; - -/* - * Compat (emulation) loader - */ -struct lkm_compat { - struct lkm_any mod; - const struct emul *lkm_compat; -}; - -/* - * Miscellaneous module (complex load/unload, potentially complex stat) - */ -struct lkm_misc { - struct lkm_any mod; -}; - -/* - * Driver module - */ -struct lkm_drv { - struct lkm_any mod; - struct cfdriver **lkm_cd; - const struct cfattachlkminit *lkm_cai; - struct cfdata *lkm_cf; -}; - -/* - * Generic reference ala XEvent to allow single entry point in the xxxinit() - * routine. - */ -union lkm_generic { - struct lkm_any *lkm_any; - struct lkm_syscall *lkm_syscall; - struct lkm_vfs *lkm_vfs; - struct lkm_dev *lkm_dev; -#ifdef STREAMS - struct lkm_strmod *lkm_strmod; -#endif - struct lkm_exec *lkm_exec; - struct lkm_compat *lkm_compat; - struct lkm_misc *lkm_misc; - struct lkm_drv *lkm_drv; -}; - -/* - * Per module information structure - */ -struct lkm_table { - char refcnt; /* Reference count */ - char forced; /* Forced load, skipping compatibility check */ - - int (*entry)(struct lkm_table *, int, int);/* entry function */ - union lkm_generic private; /* module private data */ - - u_long size; - u_long offset; - u_long area; - - /* ddb support */ - u_long syms; /* start of symbol table */ - u_long sym_size; /* size of symbol table (syms+strings) */ - u_long sym_offset; /* offset of next symbol chunk */ - u_long sym_symsize; /* size of symbol part only */ - - int id; /* Identifier */ - TAILQ_ENTRY(lkm_table) link; -}; - - -#define LKM_E_LOAD 1 -#define LKM_E_UNLOAD 2 -#define LKM_E_STAT 3 - - -#define MOD_SYSCALL(name,callslot,sysentp) \ - static struct lkm_syscall _module = { \ - { LM_SYSCALL, name, callslot, \ - LKM_VERSION, __NetBSD_Version__, _LKM_ENV_VERSION }, \ - sysentp \ - }; - -#define MOD_VFS(name,vfsslot,vfsopsp) \ - static struct lkm_vfs _module = { \ - { LM_VFS, name, (u_long)vfsslot, \ - LKM_VERSION, __NetBSD_Version__, _LKM_ENV_VERSION }, \ - vfsopsp \ - }; - -#define MOD_DEV(name,devname,bdevp,bdevm,cdevp,cdevm) \ - static struct lkm_dev _module = { \ - { LM_DEV, name, (u_long)-1, \ - LKM_VERSION, __NetBSD_Version__, _LKM_ENV_VERSION }, \ - devname, \ - bdevp, \ - bdevm, \ - cdevp, \ - cdevm, \ - }; - -#define MOD_COMPAT(name,compatslot,emulp) \ - static struct lkm_compat _module = { \ - { LM_COMPAT, name, (u_long)compatslot, \ - LKM_VERSION, __NetBSD_Version__, _LKM_ENV_VERSION }, \ - emulp \ - }; - -#define MOD_EXEC(name,execslot,execsw,emul) \ - static struct lkm_exec _module = { \ - { LM_EXEC, name, (u_long)execslot, \ - LKM_VERSION, __NetBSD_Version__, _LKM_ENV_VERSION }, \ - execsw, \ - emul \ - }; - -#define MOD_MISC(name) \ - static struct lkm_misc _module = { \ - { LM_MISC, name, (u_long)-1, \ - LKM_VERSION, __NetBSD_Version__, _LKM_ENV_VERSION }, \ - }; - -#define MOD_DRV(name,drvs,atts,cfdata) \ - static struct lkm_drv _module = { \ - { LM_DRV, name, (u_long)-1, \ - LKM_VERSION, __NetBSD_Version__, _LKM_ENV_VERSION }, \ - drvs, atts, cfdata \ - }; - -/* - * Environment encoding, for LKM<->kernel compatibility check. - */ -#ifdef DEBUG -#define _LKM_E_DEBUG ",DEBUG" -#else -#define _LKM_E_DEBUG "" -#endif - -#ifdef MALLOCLOG -#define _LKM_E_MALLOCLOG ",MALLOCLOG" -#else -#define _LKM_E_MALLOCLOG "" -#endif - -#define _LKM_ENV_VERSION _LKM_E_DEBUG _LKM_E_MALLOCLOG - -int lkm_nofunc(struct lkm_table *, int); -int lkmexists(struct lkm_table *); -int lkmdispatch(struct lkm_table *, int); - -/* - * LKM_DISPATCH -- body function for use in module entry point function; - * generally, the function body will consist entirely of a single - * LKM_DISPATCH line. - * - * If load/unload/stat are called on each corresponding entry instance. - * If no function is desired for load/stat/unload, lkm_nofunc() should - * be specified. "cmd" is passed to each function so that a single - * function can be used if desired. - */ -#define LKM_DISPATCH(lkmtp, cmd, envdep, load, unload, stat) \ - switch (cmd) { \ - int error; \ - case LKM_E_LOAD: \ - lkmtp->private.lkm_any = (void *)&_module; \ - if ((error = lkmdispatch(lkmtp, cmd)) != 0) \ - return error; \ - if ((error = load(lkmtp, cmd)) != 0) \ - (void)lkmdispatch(lkmtp, LKM_E_UNLOAD); \ - return error; \ - break; \ - case LKM_E_UNLOAD: \ - if ((error = unload(lkmtp, cmd)) != 0) \ - return error; \ - return lkmdispatch(lkmtp, cmd); \ - break; \ - case LKM_E_STAT: \ - if ((error = stat(lkmtp, cmd)) != 0) \ - return error; \ - return lkmdispatch(lkmtp, cmd); \ - break; \ - } \ - return (0); - -/* remap the old macro for backward source compatibility */ -#define DISPATCH(lkmtp, cmd, ver, att, det, stat) \ - LKM_DISPATCH(lkmtp, cmd, NULL, att, det, stat) - -extern struct vm_map *lkm_map; - -#endif /* _KERNEL */ - -/****************************************************************************/ - -/* - * IOCTL's recognized by /dev/lkm - */ -#define LMLOADBUF _IOW('K', 1, struct lmc_loadbuf) -#define LMUNRESRV _IO('K', 2) -#define LMREADY _IOW('K', 3, u_long) -#define LMRESERV _IOWR('K', 4, struct lmc_resrv) - -#define LMLOAD _IOW('K', 9, struct lmc_load) -#define LMUNLOAD _IOWR('K', 10, struct lmc_unload) -#define LMSTAT _IOWR('K', 11, struct lmc_stat) -#define LMLOADSYMS _IOW('K', 12, struct lmc_loadbuf) -#define LMFORCE _IOW('K', 13, u_long) - -#define MODIOBUF 512 /* # of bytes at a time to loadbuf */ - -/* - * IOCTL arguments - */ - - -/* - * Reserve a page-aligned block of kernel memory for the module - */ -struct lmc_resrv { - u_long size; /* IN: size of module to reserve */ - char *name; /* IN: name (must be provided */ - int slot; /* OUT: allocated slot (module ID) */ - u_long addr; /* OUT: Link-to address */ - /* ddb support */ - u_long xxx_unused1; /* unused */ - u_long sym_size; /* IN: total size of symbol table */ - u_long xxx_unused2; /* unused */ - u_long sym_symsize; /* IN: size of symbol portion of symtable */ - u_long sym_addr; /* OUT: address of symbol table */ -}; - -/* - * Copy a buffer at a time into the allocated area in the kernel; writes - * are assumed to occur contiguously. - */ -struct lmc_loadbuf { - int cnt; /* IN: # of chars pointed to by data */ - char *data; /* IN: pointer to data buffer */ -}; - - -/* - * Load a module (assumes it's been mmapped to address before call) - */ -struct lmc_load { - void * address; /* IN: user space mmap address */ - int status; /* OUT: status of operation */ - int id; /* OUT: module ID if loaded */ -}; - -/* - * Unload a module (by name/id) - */ -struct lmc_unload { - int id; /* IN: module ID to unload */ - char *name; /* IN: module name to unload if id -1 */ - int status; /* OUT: status of operation */ -}; - - -/* - * Get module information for a given id (or name if id == -1). - */ -struct lmc_stat { - int id; /* IN: module ID to unload */ - char name[MAXLKMNAME]; /* IN/OUT: name of module */ - u_long offset; /* OUT: target table offset */ - MODTYPE type; /* OUT: type of module */ - u_long area; /* OUT: kernel load addr */ - u_long size; /* OUT: module size (pages) */ - u_long private; /* OUT: module private data */ - int ver; /* OUT: lkm compile version */ -}; - -#define LKM_MAKEMAJOR(b, c) ((((b) & 0xffff) << 16) | ((c) & 0xffff)) -#define LKM_BLOCK_MAJOR(v) (int)((int16_t)(((uint32_t)(v) >> 16) & 0xffff)) -#define LKM_CHAR_MAJOR(v) (int)((int16_t)((v) & 0xffff)) - -#endif /* !_SYS_LKM_H_ */ diff --git a/sys/sys/lwp.h b/sys/sys/lwp.h index d3f721a88f1..9cce3730537 100644 --- a/sys/sys/lwp.h +++ b/sys/sys/lwp.h @@ -1,4 +1,4 @@ -/* $NetBSD: lwp.h,v 1.114 2008/10/21 12:22:00 ad Exp $ */ +/* $NetBSD: lwp.h,v 1.115 2008/11/12 12:36:28 ad Exp $ */ /*- * Copyright (c) 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -327,7 +327,7 @@ void lwp_whatis(uintptr_t, void (*)(const char *, ...)); /* - * Lock an LWP. XXXLKM + * Lock an LWP. XXX _MODULE */ static inline void lwp_lock(lwp_t *l) @@ -345,7 +345,7 @@ lwp_lock(lwp_t *l) } /* - * Unlock an LWP. XXXLKM + * Unlock an LWP. XXX _MODULE */ static inline void lwp_unlock(lwp_t *l) @@ -387,7 +387,8 @@ int lwp_create(lwp_t *, struct proc *, vaddr_t, bool, int, void *, size_t, void (*)(void *), void *, lwp_t **, int); /* - * We should provide real stubs for the below that LKMs can use. + * XXX _MODULE + * We should provide real stubs for the below that modules can use. */ static inline void diff --git a/sys/sys/shm.h b/sys/sys/shm.h index b8a96877380..269a4a7fff0 100644 --- a/sys/sys/shm.h +++ b/sys/sys/shm.h @@ -1,4 +1,4 @@ -/* $NetBSD: shm.h,v 1.45 2008/04/28 20:24:11 martin Exp $ */ +/* $NetBSD: shm.h,v 1.46 2008/11/12 12:36:28 ad Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -80,7 +80,7 @@ #endif /* Segment low boundry address multiple */ -#if defined(_KERNEL) || defined(_STANDALONE) || defined(_LKM) +#if defined(_KERNEL) || defined(_STANDALONE) || defined(_MODULE) #define SHMLBA PAGE_SIZE #else /* diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index b0e4987c948..10e9d3e47b4 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: socketvar.h,v 1.116 2008/10/14 13:45:26 ad Exp $ */ +/* $NetBSD: socketvar.h,v 1.117 2008/11/12 12:36:28 ad Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -65,9 +65,6 @@ #include <sys/queue.h> #include <sys/mutex.h> #include <sys/condvar.h> -#ifdef ACCEPT_FILTER_MOD -#include <sys/lkm.h> -#endif #if !defined(_KERNEL) struct uio; @@ -543,7 +540,6 @@ struct accept_filter *accept_filt_get(char *); SYSCTL_DECL(_net_inet_accf); #endif void accept_filter_init(void); -int accept_filt_generic_mod_event(struct lkm_table *lkmtp, int event, void *data); #endif #endif /* _KERNEL */ diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index 2459dbe73f4..4a4309552db 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -1,4 +1,4 @@ -/* $NetBSD: syscall.h,v 1.217 2008/10/16 20:12:23 wrstuden Exp $ */ +/* $NetBSD: syscall.h,v 1.218 2008/11/12 12:36:28 ad Exp $ */ /* * System call numbers. @@ -618,19 +618,6 @@ /* syscall: "poll" ret: "int" args: "struct pollfd *" "u_int" "int" */ #define SYS_poll 209 -#if defined(LKM) || !defined(_KERNEL) -#else /* !LKM */ - /* 210 is excluded lkmnosys */ - /* 211 is excluded lkmnosys */ - /* 212 is excluded lkmnosys */ - /* 213 is excluded lkmnosys */ - /* 214 is excluded lkmnosys */ - /* 215 is excluded lkmnosys */ - /* 216 is excluded lkmnosys */ - /* 217 is excluded lkmnosys */ - /* 218 is excluded lkmnosys */ - /* 219 is excluded lkmnosys */ -#endif /* !LKM */ #if defined(SYSVSEM) || !defined(_KERNEL) /* syscall: "compat_14___semctl" ret: "int" args: "int" "int" "int" "union __semun *" */ #define SYS_compat_14___semctl 220 diff --git a/sys/sys/syscall_stats.h b/sys/sys/syscall_stats.h index 400b058c7d2..e83c066c461 100644 --- a/sys/sys/syscall_stats.h +++ b/sys/sys/syscall_stats.h @@ -1,4 +1,4 @@ -/* $NetBSD: syscall_stats.h,v 1.3 2008/04/29 06:53:03 martin Exp $ */ +/* $NetBSD: syscall_stats.h,v 1.4 2008/11/12 12:36:28 ad Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #ifndef _SYS_SYCALL_STAT_H_ #define _SYS_SYCALL_STAT_H_ -#ifndef _LKM +#ifdef _KERNEL_OPT #include "opt_syscall_stats.h" #endif diff --git a/sys/sys/syscallargs.h b/sys/sys/syscallargs.h index 11f48b9b3bb..cc74e14850b 100644 --- a/sys/sys/syscallargs.h +++ b/sys/sys/syscallargs.h @@ -1,4 +1,4 @@ -/* $NetBSD: syscallargs.h,v 1.199 2008/10/16 20:12:23 wrstuden Exp $ */ +/* $NetBSD: syscallargs.h,v 1.200 2008/11/12 12:36:28 ad Exp $ */ /* * System call argument lists. @@ -1132,9 +1132,6 @@ struct sys_poll_args { syscallarg(int) timeout; }; check_syscall_args(sys_poll) -#if defined(LKM) || !defined(_KERNEL) -#else /* !LKM */ -#endif /* !LKM */ #if defined(SYSVSEM) || !defined(_KERNEL) struct compat_14_sys___semctl_args { @@ -2693,11 +2690,6 @@ int sys_reboot(struct lwp *, const struct sys_reboot_args *, register_t *); int sys_poll(struct lwp *, const struct sys_poll_args *, register_t *); -#if defined(LKM) || !defined(_KERNEL) -int sys_lkmnosys(struct lwp *, const void *, register_t *); - -#else /* !LKM */ -#endif /* !LKM */ #if defined(SYSVSEM) || !defined(_KERNEL) int compat_14_sys___semctl(struct lwp *, const struct compat_14_sys___semctl_args *, register_t *); diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index a183231f12c..20adffc7e54 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -1,4 +1,4 @@ -/* $NetBSD: sysctl.h,v 1.177 2008/08/27 08:53:55 christos Exp $ */ +/* $NetBSD: sysctl.h,v 1.178 2008/11/12 12:36:28 ad Exp $ */ /* * Copyright (c) 1989, 1993 @@ -1057,7 +1057,7 @@ extern struct ctldebug debug15, debug16, debug17, debug18, debug19; oldlenp, newp, newlen, \ oname, l, node -#ifdef _LKM +#ifdef _MODULE #define SYSCTL_SETUP_PROTO(name) \ void name(struct sysctllog **) @@ -1077,7 +1077,7 @@ extern struct ctldebug debug15, debug16, debug17, debug18, debug19; void name(struct sysctllog **clog) #endif /* !SYSCTL_DEBUG_SETUP */ -#else /* !_LKM */ +#else /* !_MODULE */ #define SYSCTL_SETUP_PROTO(name) #ifdef SYSCTL_DEBUG_SETUP @@ -1096,7 +1096,7 @@ extern struct ctldebug debug15, debug16, debug17, debug18, debug19; #endif /* !SYSCTL_DEBUG_SETUP */ typedef void (*sysctl_setup_func)(struct sysctllog **); -#endif /* !_LKM */ +#endif /* !_MODULE */ /* * Internal sysctl function calling convention: diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 6d0c689549a..f96c5fb0512 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -1,4 +1,4 @@ -/* $NetBSD: systm.h,v 1.228 2008/09/23 22:20:24 pooka Exp $ */ +/* $NetBSD: systm.h,v 1.229 2008/11/12 12:36:28 ad Exp $ */ /*- * Copyright (c) 1982, 1988, 1991, 1993 @@ -466,7 +466,7 @@ void kernel_lock_init(void); void _kernel_lock(int); void _kernel_unlock(int, int *); -#if defined(MULTIPROCESSOR) || defined(_LKM) +#if defined(MULTIPROCESSOR) || defined(_MODULE) #define KERNEL_LOCK(count, lwp) \ do { \ if ((count) != 0) \ diff --git a/sys/sys/tty.h b/sys/sys/tty.h index 9e636c9edb3..a98139d4db1 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -1,4 +1,4 @@ -/* $NetBSD: tty.h,v 1.82 2008/05/25 19:22:21 ad Exp $ */ +/* $NetBSD: tty.h,v 1.83 2008/11/12 12:36:29 ad Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -308,7 +308,7 @@ void clfree(struct clist *); #endif #if defined(COMPAT_43) || defined(COMPAT_SUNOS) || defined(COMPAT_SVR4) || \ - defined(COMPAT_FREEBSD) || defined(COMPAT_OSF1) || defined(LKM) + defined(COMPAT_FREEBSD) || defined(COMPAT_OSF1) || defined(MODULAR) # define COMPAT_OLDTTY int ttcompat(struct tty *, u_long, void *, int, struct lwp *); #endif diff --git a/tests/modules/Makefile b/tests/modules/Makefile index 52309bcc7b3..8cc10cf9a6c 100644 --- a/tests/modules/Makefile +++ b/tests/modules/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2008/05/01 15:38:17 jmmv Exp $ +# $NetBSD: Makefile,v 1.4 2008/11/12 12:36:29 ad Exp $ .include <bsd.own.mk> @@ -9,8 +9,6 @@ TESTSDIR= ${TESTSBASE}/modules # creates the 'modules' subdirectory unconditionally, which if left empty # will confuse atf-run. Therefore we must install, at the very least, the # Atffile into it. -.if ${MKMODULAR} != no - TESTS_C= t_modctl LDADD= -lprop @@ -18,7 +16,5 @@ TESTS_SH= t_modload SUBDIR= k_helper -.endif - .include <bsd.subdir.mk> .include <bsd.test.mk> diff --git a/usr.bin/Makefile b/usr.bin/Makefile index c4ce7de464b..37d03121515 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.171 2008/10/29 16:49:33 christos Exp $ +# $NetBSD: Makefile,v 1.172 2008/11/12 12:36:29 ad Exp $ # from: @(#)Makefile 8.3 (Berkeley) 1/7/94 .include <bsd.own.mk> @@ -43,10 +43,6 @@ SUBDIR+= compile_et kdestroy kgetcred kinit klist mk_cmds string2key SUBDIR+= hxtool verify_krb5_conf gss krb5-config .endif -.if (!(${MKMODULAR} != "no")) -SUBDIR+= modstat -.endif - .if (${MKSKEY} != "no") SUBDIR+= skey skeyinfo skeyinit .endif diff --git a/usr.bin/modstat/Makefile b/usr.bin/modstat/Makefile deleted file mode 100644 index d7395bf2295..00000000000 --- a/usr.bin/modstat/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# $NetBSD: Makefile,v 1.8 2007/05/28 12:06:29 tls Exp $ -# -# Makefile for modstat -# -# 25 May 93 Terry Lambert Original -# -# Copyright (c) 1993 Terrence R. Lambert. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed by Terrence R. Lambert. -# 4. The name Terrence R. Lambert may not be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $NetBSD: Makefile,v 1.8 2007/05/28 12:06:29 tls Exp $ -# - -USE_FORT?= yes # setuid -WARNS?=4 -PROG= modstat -MAN= modstat.8 -BINGRP= kmem -BINMODE=2555 - -.include <bsd.prog.mk> diff --git a/usr.bin/modstat/modstat.8 b/usr.bin/modstat/modstat.8 deleted file mode 100644 index 3dd5196150e..00000000000 --- a/usr.bin/modstat/modstat.8 +++ /dev/null @@ -1,103 +0,0 @@ -.\" $NetBSD: modstat.8,v 1.15 2007/04/13 18:15:21 plunky Exp $ -.\" -.\" Copyright (c) 1993 Christopher G. Demetriou -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed for the -.\" NetBSD Project. See http://www.NetBSD.org/ for -.\" information about NetBSD. -.\" 4. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.\" <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>> -.\" -.Dd March 23, 2006 -.Dt MODSTAT 8 -.Os -.Sh NAME -.Nm modstat -.Nd display status of loaded kernel modules -.Sh SYNOPSIS -.Nm -.Op Fl i Ar id -.Op Fl n Ar name -.Sh DESCRIPTION -The -.Nm -utility displays the status of any loadable kernel modules -present in the kernel. -.Pp -The options are as follows: -.Bl -tag -width indent -.It Fl i Ar id -Display the status of only the module with this ID. -.It Fl n Ar name -Display the status of only the module with this name. -.El -.Pp -In addition to listing the currently loaded modules' name, -the information reported by -.Nm -includes: -.Pp -.Bl -tag -width Loadaddr -.It Li Type -Type of module, such as -"SYSCALL", "VFS", "DEV", -.\" "STRMOD", -"EXEC", "COMPAT", "MISC", or "(UNKNOWN)". -See -.Xr lkm 4 -for details. -.It Li Id -Module identification number. -.It Li Offset -Target table offset. -.It Li Loadaddr -Address the module loaded at. -.It Li Size -Size in kilobytes (in hex). -.It Li Info -Kernel address of private area. -.It Li Rev -Version of the module interface. -(Not the version of the module itself.) -.El -.Sh EXIT STATUS -The -.Nm -utility exits with a status of 0 on success -and with a nonzero status if an error occurs. -.Sh SEE ALSO -.Xr lkm 4 , -.Xr modload 8 , -.Xr modunload 8 -.Sh HISTORY -The -.Nm -command was designed to be similar in functionality -to the corresponding command in -.Tn "SunOS 4.1.3" . -.Sh AUTHORS -.An Terrence R. Lambert Aq terry@cs.weber.edu diff --git a/usr.bin/modstat/modstat.c b/usr.bin/modstat/modstat.c deleted file mode 100644 index 64883e76a02..00000000000 --- a/usr.bin/modstat/modstat.c +++ /dev/null @@ -1,206 +0,0 @@ -/* $NetBSD: modstat.c,v 1.23 2007/12/15 19:44:52 perry Exp $ */ - -/* - * Copyright (c) 1993 Terrence R. Lambert. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Terrence R. Lambert. - * 4. The name Terrence R. Lambert may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -#ifndef lint -__RCSID("$NetBSD: modstat.c,v 1.23 2007/12/15 19:44:52 perry Exp $"); -#endif - -#include <sys/param.h> -#include <sys/conf.h> -#include <sys/file.h> -#include <sys/ioctl.h> -#include <sys/lkm.h> -#include <sys/mount.h> - -#include <a.out.h> -#include <err.h> -#include <errno.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> - -#include "pathnames.h" - -static void cleanup(void); -static int dostat(int, const char *); -static void usage(void) __dead; - - -static const char *type_names[] = { - MODTYPE_NAMES -}; - -static size_t tn_nentries = sizeof(type_names) / sizeof(type_names[0]); -static int devfd; - -#define POINTERSIZE ((int)(2 * sizeof(void*))) - -static void -usage(void) -{ - - (void)fprintf(stderr, "Usage: %s [-i <module id>] [-n <module name>]\n", - getprogname()); - exit(1); -} - -static int -dostat(int modnum, const char *modname) -{ - struct lmc_stat sbuf; - long offset; - char offset_string[32]; - - if (modname != NULL) - (void)strlcpy(sbuf.name, modname, sizeof sbuf.name); - - sbuf.id = modnum; - - if (ioctl(devfd, LMSTAT, &sbuf) == -1) { - switch (errno) { - case EINVAL: /* out of range */ - return 2; - case ENOENT: /* no such entry */ - return 1; - default: /* other error (EFAULT, etc) */ - warn("LMSTAT"); - return 4; - } - } - - /* - * Decode this stat buffer... - */ - offset = (long)sbuf.offset; - if (sbuf.type == LM_DEV) - (void) snprintf(offset_string, sizeof(offset_string), - "%3d/%-3d", - LKM_BLOCK_MAJOR(offset), - LKM_CHAR_MAJOR(offset)); - else if (offset < 0) - (void) strlcpy(offset_string, " -", sizeof (offset_string)); - else - (void) snprintf(offset_string, sizeof (offset_string), " %3ld", - offset); - - (void)printf("%-7s %3d %7s %0*lx %04lx %0*lx %3ld %s\n", - (sbuf.type < tn_nentries) ? type_names[sbuf.type] : "(UNKNOWN)", - sbuf.id, /* module id */ - offset_string, /* offset into modtype struct */ - POINTERSIZE, - (long)sbuf.area, /* address module loaded at */ - (long)sbuf.size, /* size in KB */ - POINTERSIZE, - (long)sbuf.private, /* kernel address of private area */ - (long)sbuf.ver, /* Version of module interface */ - sbuf.name /* name from private area */ - ); - - /* - * Done (success). - */ - return 0; -} - -static void -cleanup(void) -{ - - (void)close(devfd); -} - -int -main(int argc, char *argv[]) -{ - int c; - int modnum = -1; - char *modname = NULL; - gid_t egid = getegid(); - - setegid(getgid()); - while ((c = getopt(argc, argv, "i:n:")) != -1) { - switch (c) { - case 'i': - modnum = atoi(optarg); - break; /* number */ - case 'n': - modname = optarg; - break; /* name */ - case '?': - default: - usage(); - } - } - argc -= optind; - argv += optind; - - if (argc != 0) - usage(); - - /* - * Open the virtual device device driver for exclusive use (needed - * to ioctl() to retrive the loaded module(s) status). - */ - (void)setegid(egid); - if ((devfd = open(_PATH_LKM, O_RDONLY, 0)) == -1) - err(2, "%s", _PATH_LKM); - - /* get rid of our privileges now */ - (void)setgid(getgid()); - - (void)atexit(cleanup); - - (void)printf("Type Id Offset %-*s Size %-*s Rev Module Name\n", - POINTERSIZE, "Loadaddr", - POINTERSIZE, "Info"); - - /* - * Oneshot? - */ - if (modnum != -1 || modname != NULL) { - if (dostat(modnum, modname)) - return(3); - return(0); - } - - /* - * Start at 0 and work up until "EINVAL". - */ - for (modnum = 0; dostat(modnum, NULL) < 2; modnum++) - continue; - - return(0); -} diff --git a/usr.bin/modstat/pathnames.h b/usr.bin/modstat/pathnames.h deleted file mode 100644 index 2b928ea6913..00000000000 --- a/usr.bin/modstat/pathnames.h +++ /dev/null @@ -1,5 +0,0 @@ -/* $NetBSD: pathnames.h,v 1.2 1998/01/09 08:06:06 perry Exp $ */ - -#include <paths.h> - -#define _PATH_LKM "/dev/lkm" |
