From: zrj Date: Tue, 19 Dec 2017 17:46:42 +0000 (+0200) Subject: kernel: Remove some references to i386. X-Git-Tag: v5.3.0~655 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/0a80a44543b5ffea91e63fae292695da66efde51 kernel: Remove some references to i386. While there, adjust some outdated paths in comments and some minor cleanup. --- diff --git a/sys/bus/isa/x86_64/isa.c b/sys/bus/isa/x86_64/isa.c index 26999907df..453adb7829 100644 --- a/sys/bus/isa/x86_64/isa.c +++ b/sys/bus/isa/x86_64/isa.c @@ -41,7 +41,7 @@ * no representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied * warranty. - * + * * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF @@ -67,7 +67,7 @@ /* * This implementation simply passes the request up to the parent - * bus, which in our case is the special i386 nexus, substituting any + * bus, which in our case is the special x86_64 nexus, substituting any * configured values if the caller defaulted. We can get away with * this because there is no special mapping for ISA resources on an Intel * platform. When porting this code to another architecture, it may be @@ -87,7 +87,7 @@ isa_alloc_resource(device_t bus, device_t child, int type, int *rid, struct isa_device* idev = DEVTOISA(child); struct resource_list *rl = &idev->id_resources; struct resource_list_entry *rle; - + if (!passthrough && !isdefault) { rle = resource_list_find(rl, type, *rid); if (!rle) { @@ -136,7 +136,7 @@ isa_release_resource(device_t bus, device_t child, int type, int rid, /* * We can't use the bus_generic_* versions of these methods because those * methods always pass the bus param as the requesting device, and we need - * to pass the child (the i386 nexus knows about this and is prepared to + * to pass the child (the x86_64 nexus knows about this and is prepared to * deal). */ int diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index e9581022fa..31b8d9f668 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -115,7 +115,7 @@ SYSTEM_LD+= ${CFLAGS} .endif # The max-page-size for gnu ld is 0x200000 on x86_64 -# For the gold linker, it is only 0x1000 on both x86_64 and i386 +# For the gold linker, it is only 0x1000 on both x86_64 # The penalty for changing the gold default for x86_64 is larger binaries # and shared libraries, and forcing them to use more address space than # required. The only application that needs such a large page size is the diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 83d6d7af85..f5b809984f 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -104,10 +104,10 @@ CFLAGS+= -nostdinc ${_ICFLAGS} # need any -I paths for this. Similar defaults for .PATH can't be # set because there are no standard paths for non-headers. # -# NOTE! Traditional architecture paths such as +# NOTE! Traditional platform paths such as # must run through the "machine_base" softlink using -# . An explicit cross-architecture path must -# operate relative to /usr/src/sys using e.g. +# . An explicit cross-platform path must +# operate relative to /usr/src/sys using e.g. # CFLAGS+= -I. -I@ diff --git a/sys/conf/options b/sys/conf/options index f5ebb52119..bdb460c82a 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -104,7 +104,7 @@ UDF opt_dontuse.h AUTOFS opt_dontuse.h # These static filesystems has one slightly bogus static dependency in -# sys/platform/.../i386/autoconf.c. If any of these filesystems are +# sys/platform/.../x86_64/autoconf.c. If any of these filesystems are # statically compiled into the kernel, code for mounting them as root # filesystems will be enabled - but look below. Boot-code is purposely # unavailable for the LKM-based versions. diff --git a/sys/config/VKERNEL64 b/sys/config/VKERNEL64 index f7a2cfa1a9..9d73176ad4 100644 --- a/sys/config/VKERNEL64 +++ b/sys/config/VKERNEL64 @@ -1,8 +1,8 @@ # VKERNEL64 - configuration for a 64-bit virtual kernel -platform vkernel64 # platform architecture (i386, vkernel, etc) +platform vkernel64 machine x86_64 -machine_arch x86_64 # cpu architecture (i386, etc) +machine_arch x86_64 ident VKERNEL64 maxusers 0 diff --git a/sys/dev/raid/hpt27xx/osm.h b/sys/dev/raid/hpt27xx/osm.h index 659428b30e..36be3ef969 100644 --- a/sys/dev/raid/hpt27xx/osm.h +++ b/sys/dev/raid/hpt27xx/osm.h @@ -43,7 +43,7 @@ extern int os_max_cache_size; -#define DMAPOOL_PAGE_SIZE 0x1000 /* PAGE_SIZE (i386/x86_64) */ +#define DMAPOOL_PAGE_SIZE 0x1000 /* PAGE_SIZE (x86_64) */ #define os_max_cache_pages (os_max_cache_size/DMAPOOL_PAGE_SIZE) /* data types */ diff --git a/sys/dev/raid/hptrr/osm.h b/sys/dev/raid/hptrr/osm.h index a2ff5830b3..f841cb2d71 100644 --- a/sys/dev/raid/hptrr/osm.h +++ b/sys/dev/raid/hptrr/osm.h @@ -42,7 +42,7 @@ extern int os_max_cache_size; -#define DMAPOOL_PAGE_SIZE 0x1000 /* PAGE_SIZE (i386/x86_64) */ +#define DMAPOOL_PAGE_SIZE 0x1000 /* PAGE_SIZE (x86_64) */ #define os_max_cache_pages (os_max_cache_size/DMAPOOL_PAGE_SIZE) /* data types */ diff --git a/sys/kern/kern_usched.c b/sys/kern/kern_usched.c index 7abbd8c6b9..8399d8cf52 100644 --- a/sys/kern/kern_usched.c +++ b/sys/kern/kern_usched.c @@ -1,13 +1,13 @@ /* * Copyright (c) 2005 The DragonFly Project. All rights reserved. - * + * * This code is derived from software contributed to The DragonFly Project * by Sergey Glushchenko - * + * * 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 @@ -17,7 +17,7 @@ * 3. Neither the name of The DragonFly Project nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific, prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS @@ -30,7 +30,7 @@ * 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 @@ -39,7 +39,7 @@ #include #include /* struct usched_set_args */ #include /* strcmp() */ -#include +#include #include #include @@ -51,8 +51,8 @@ cpumask_t usched_mastermask = CPUMASK_INITIALIZER_ALLONES; static int setaffinity_lp(struct lwp *lp, cpumask_t *mask); /* - * Called from very low level boot code, i386/i386/machdep.c/init386(). - * We cannot do anything fancy. no malloc's, no nothing other then + * Called from very low level boot code, sys/kern/init_main.c:mi_proc0init(). + * We cannot do anything fancy. no malloc's, no nothing other then * static initialization. */ struct usched * @@ -83,7 +83,7 @@ usched_init(void) * * SYNOPSIS: * Add/remove usched to/from list. - * + * * ARGUMENTS: * usched - pointer to target scheduler * action - addition or removal ? @@ -170,7 +170,7 @@ usched_schedulerclock(struct lwp *lp, sysclock_t periodic, sysclock_t time) * ARGUMENTS: * pid - * cmd - - * data - + * data - * bytes - * RETURN VALUES: * 0 - success @@ -211,7 +211,7 @@ sys_usched_set(struct usched_set_args *uap) /* * If the scheduler for a process is being changed, disassociate - * the old scheduler before switching to the new one. + * the old scheduler before switching to the new one. * * XXX we might have to add an additional ABI call to do a 'full * disassociation' and another ABI call to do a 'full diff --git a/sys/kern/subr_module.c b/sys/kern/subr_module.c index 344b008c65..df21ea596c 100644 --- a/sys/kern/subr_module.c +++ b/sys/kern/subr_module.c @@ -24,7 +24,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/kern/subr_module.c,v 1.6 1999/10/11 15:19:10 peter Exp $ - * $DragonFly: src/sys/kern/subr_module.c,v 1.4 2004/05/26 08:32:41 dillon Exp $ */ #include @@ -126,9 +125,9 @@ preload_search_next_name(caddr_t base) caddr_t curp; u_int32_t *hdr; int next; - + if (preload_metadata != NULL) { - + /* Pick up where we left off last time */ if (base) { /* skip to next field */ @@ -176,8 +175,8 @@ preload_search_info(caddr_t mod, int inf) /* end of module data? */ if (hdr[0] == 0 && hdr[1] == 0) break; - /* - * We give up once we've looped back to what we were looking at + /* + * We give up once we've looped back to what we were looking at * first - this should normally be a MODINFO_NAME field. */ if (type == 0) { @@ -186,10 +185,10 @@ preload_search_info(caddr_t mod, int inf) if (hdr[0] == type) break; } - - /* + + /* * Attribute match? Return pointer to data. - * Consumer may safely assume that size value preceeds + * Consumer may safely assume that size value preceeds * data. */ if (hdr[0] == inf) @@ -220,7 +219,7 @@ preload_delete_name(const char *name) int clearing; int i; char *scanname; - + if (preload_metadata != NULL) { clearing = 0; curp = preload_metadata; @@ -253,7 +252,7 @@ preload_delete_name(const char *name) } } -/* Called from locore on i386. Convert physical pointers to kvm. Sigh. */ +/* Called from hammer_time() on pc64. Convert physical pointers to kvm. Sigh. */ void preload_bootstrap_relocate(vm_offset_t offset) { @@ -261,9 +260,9 @@ preload_bootstrap_relocate(vm_offset_t offset) u_int32_t *hdr; vm_offset_t *ptr; int next; - + if (preload_metadata != NULL) { - + curp = preload_metadata; for (;;) { hdr = (u_int32_t *)curp; diff --git a/sys/kern/subr_unit.c b/sys/kern/subr_unit.c index 1e2d42af3d..a70d9597af 100644 --- a/sys/kern/subr_unit.c +++ b/sys/kern/subr_unit.c @@ -55,13 +55,13 @@ * Memory usage is a very complex function of the the exact allocation * pattern, but always very compact: * * For the very typical case where a single unbroken run of unit - * numbers are allocated 44 bytes are used on i386. + * numbers are allocated 44 bytes are used on x86. * * For a unit number space of 1000 units and the random pattern * in the usermode test program included, the worst case usage - * was 252 bytes on i386 for 500 allocated and 500 free units. + * was 252 bytes on x86 for 500 allocated and 500 free units. * * For a unit number space of 10000 units and the random pattern * in the usermode test program included, the worst case usage - * was 798 bytes on i386 for 5000 allocated and 5000 free units. + * was 798 bytes on x86 for 5000 allocated and 5000 free units. * * The worst case is where every other unit number is allocated and * the the rest are free. In that case 44 + N/4 bytes are used where * N is the number of the highest unit allocated. diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index e7029797ee..137f856ec8 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -58,11 +58,11 @@ static int vn_closefile (struct file *fp); static int vn_ioctl (struct file *fp, u_long com, caddr_t data, struct ucred *cred, struct sysmsg *msg); -static int vn_read (struct file *fp, struct uio *uio, +static int vn_read (struct file *fp, struct uio *uio, struct ucred *cred, int flags); static int vn_kqfilter (struct file *fp, struct knote *kn); static int vn_statfile (struct file *fp, struct stat *sb, struct ucred *cred); -static int vn_write (struct file *fp, struct uio *uio, +static int vn_write (struct file *fp, struct uio *uio, struct ucred *cred, int flags); struct fileops vnode_fileops = { @@ -139,7 +139,7 @@ vn_open(struct nlookupdata *nd, struct file *fp, int fmode, int cmode) * * Setting NLC_CREATE causes a negative hit to store * the negative hit ncp and not return an error. Then - * nc_error or nc_vp may be checked to see if the ncp + * nc_error or nc_vp may be checked to see if the ncp * represents a negative hit. NLC_CREATE also requires * write permission on the governing directory or EPERM * is returned. @@ -182,7 +182,7 @@ again: if (fmode & O_EXCL) { error = EEXIST; } else { - error = cache_vget(&nd->nl_nch, cred, + error = cache_vget(&nd->nl_nch, cred, LK_EXCLUSIVE, &vp); } if (error) @@ -278,7 +278,7 @@ again: /* * Setup the fp so VOP_OPEN can override it. No descriptor has been - * associated with the fp yet so we own it clean. + * associated with the fp yet so we own it clean. * * f_nchandle inherits nl_nch. This used to be necessary only for * directories but now we do it unconditionally so f*() ops @@ -393,7 +393,7 @@ vn_writechk(struct vnode *vp, struct nchandle *nch) } /* - * Check whether the underlying mount is read-only. The mount point + * Check whether the underlying mount is read-only. The mount point * referenced by the namecache may be different from the mount point * used by the underlying vnode in the case of NULLFS, so a separate * check is needed. @@ -467,7 +467,7 @@ sequential_heuristic(struct uio *uio, struct file *fp) * set - set and unlock the f_offset field. * * These routines serve the dual purpose of serializing access to the - * f_offset field (at least on i386) and guaranteeing operational integrity + * f_offset field (at least on x86) and guaranteeing operational integrity * when multiple read()ers and write()ers are present on the same fp. * * MPSAFE @@ -554,7 +554,7 @@ vn_poll_fpf_offset(struct file *fp) */ int vn_rdwr(enum uio_rw rw, struct vnode *vp, caddr_t base, int len, - off_t offset, enum uio_seg segflg, int ioflg, + off_t offset, enum uio_seg segflg, int ioflg, struct ucred *cred, int *aresid) { struct uio auio; @@ -590,7 +590,7 @@ vn_rdwr(enum uio_rw rw, struct vnode *vp, caddr_t base, int len, /* * Package up an I/O request on a vnode into a uio and do it. The I/O * request is split up into smaller chunks and we try to avoid saturating - * the buffer cache while potentially holding a vnode locked, so we + * the buffer cache while potentially holding a vnode locked, so we * check bwillwrite() before calling vn_rdwr(). We also call lwkt_user_yield() * to give other processes a chance to lock the vnode (either other processes * core'ing the same binary, or unrelated processes scanning the directory). @@ -849,8 +849,8 @@ vn_stat(struct vnode *vp, struct stat *sb, struct ucred *cred) } /* - * According to www.opengroup.org, the meaning of st_blksize is - * "a filesystem-specific preferred I/O block size for this + * According to www.opengroup.org, the meaning of st_blksize is + * "a filesystem-specific preferred I/O block size for this * object. In some filesystem types, this may vary from file * to file" * Default to PAGE_SIZE after much discussion. @@ -874,7 +874,7 @@ vn_stat(struct vnode *vp, struct stat *sb, struct ucred *cred) } else { sb->st_blksize = PAGE_SIZE; } - + sb->st_flags = vap->va_flags; error = priv_check_cred(cred, PRIV_VFS_GENERATION, 0); @@ -986,7 +986,7 @@ int vn_lock(struct vnode *vp, int flags) { int error; - + do { error = lockmgr(&vp->v_lock, flags); if (error == 0) diff --git a/sys/platform/pc64/x86_64/ipl_funcs.c b/sys/platform/pc64/x86_64/ipl_funcs.c index 66b7f72097..2b89dc8166 100644 --- a/sys/platform/pc64/x86_64/ipl_funcs.c +++ b/sys/platform/pc64/x86_64/ipl_funcs.c @@ -36,7 +36,7 @@ /* * Bits in the spending bitmap variable must be set atomically because - * spending may be manipulated by interrupts or other cpu's without holding + * spending may be manipulated by interrupts or other cpu's without holding * any locks. * * Note: setbits uses a locked or, making simple cases MP safe. diff --git a/sys/sys/fnv_hash.h b/sys/sys/fnv_hash.h index 4c3ad51d06..6c4475ebed 100644 --- a/sys/sys/fnv_hash.h +++ b/sys/sys/fnv_hash.h @@ -6,7 +6,6 @@ * This file is placed in the public domain by Peter Wemm. * * $FreeBSD: src/sys/sys/fnv_hash.h,v 1.2.2.1 2001/03/21 10:50:59 peter Exp $ - * $DragonFly: src/sys/sys/fnv_hash.h,v 1.3 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_FNV_HASH_H_ @@ -66,7 +65,7 @@ static __inline Fnv64_t fnv_64_str(const char *str, Fnv64_t hval) { const u_int8_t *s = (const u_int8_t *)str; - u_register_t c; /* 32 bit on i386, 64 bit on alpha,ia64 */ + u_register_t c; /* 64 bit on x86_64 */ while ((c = *s++) != 0) { hval *= FNV_64_PRIME; diff --git a/sys/sys/interrupt.h b/sys/sys/interrupt.h index 61051b51e0..384c3bbb85 100644 --- a/sys/sys/interrupt.h +++ b/sys/sys/interrupt.h @@ -85,8 +85,7 @@ typedef void inthand2_t (void *, void *); #define SWI_UNUSED02 (FIRST_SOFTINT + 6) /* - * Corresponding interrupt-pending bits for spending. NOTE: i386 only - * supports 32 software interupts (due to its gd_spending mask). + * Corresponding interrupt-pending bits for spending. */ #define SWI_TTY_PENDING (1 << (SWI_TTY - FIRST_SOFTINT)) #define SWI_UNUSED01_PENDING (1 << (SWI_UNUSED01 - FIRST_SOFTINT)) diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 8302b5bbbb..3db1e2f975 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -87,7 +87,7 @@ extern int ncpus_fit; /* round up to a power of 2 */ extern int ncpus_fit_mask; /* ncpus_fit - 1 */ extern int clocks_running; /* timing/timeout subsystem is operational */ -/* XXX TGEN these don't belong here, they're MD on i386/x86_64 */ +/* XXX TGEN these don't belong here, they're MD on pc64 */ extern u_int cpu_feature; /* CPUID_* features */ extern u_int cpu_feature2; /* CPUID2_* features */ extern u_int cpu_mi_feature; /* CPU_MI_XXX machine-nonspecific features */ diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index ae432cadd9..44f3a90a72 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -839,14 +839,14 @@ RestartScan: pindex = OFF_TO_IDX(offset); /* - * if the page is resident, then gather + * if the page is resident, then gather * information about it. spl protection is - * required to maintain the object + * required to maintain the object * association. And XXX what if the page is * busy? What's the deal with that? * * XXX vm_token - legacy for pmap_ts_referenced - * in i386 and vkernel pmap code. + * in x86 and vkernel pmap code. */ lwkt_gettoken(&vm_token); vm_object_hold(current->object.vm_object); diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 5fdb747f7a..c1f3634bd1 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -335,8 +335,8 @@ vm_page_startup(void) * The amd64 port needs this to indicate which direct map pages * need to be dumped, via calls to dump_add_page()/dump_drop_page(). * - * However, i386 still needs this workspace internally within the - * minidump code. In theory, they are not needed on i386, but are + * However, x86 still needs this workspace internally within the + * minidump code. In theory, they are not needed on x86, but are * included should the sf_buf code decide to use them. */ page_range = phys_avail[i].phys_end / PAGE_SIZE;