From: zrj Date: Tue, 19 Dec 2017 17:45:11 +0000 (+0200) Subject: i386 removal, part 65/x: Remove some leftovers in kernel. X-Git-Tag: v5.3.0~656 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/ec3c426ee654c335a79c718fe487b9168dda87f7 i386 removal, part 65/x: Remove some leftovers in kernel. --- diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c index aba2abfbfd..41a2963c98 100644 --- a/sys/dev/sound/pcm/feeder_rate.c +++ b/sys/dev/sound/pcm/feeder_rate.c @@ -312,37 +312,7 @@ SYSCTL_PROC(_hw_snd, OID_AUTO, feeder_rate_quality, CTLTYPE_INT | CTLFLAG_RW, */ #define _Z_GCAST(x) ((uint64_t)(x)) -#if defined(__GNUCLIKE_ASM) && defined(__i386__) -/* - * This is where i386 being beaten to a pulp. Fortunately this function is - * rarely being called and if it is, it will decide the best (hopefully) - * fastest way to do the division. If we can ensure that everything is dword - * aligned, letting the compiler to call udivdi3 to do the division can be - * faster compared to this. - * - * amd64 is the clear winner here, no question about it. - */ -static __inline uint32_t -Z_DIV(uint64_t v, uint32_t d) -{ - uint32_t hi, lo, quo, rem; - - hi = v >> 32; - lo = v & 0xffffffff; - - /* - * As much as we can, try to avoid long division like a plague. - */ - if (hi == 0) - quo = lo / d; - else - __asm("divl %2" - : "=a" (quo), "=d" (rem) - : "r" (d), "0" (lo), "1" (hi)); - - return (quo); -} -#else +#ifdef __x86_64__ #define Z_DIV(x, y) ((x) / (y)) #endif diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 8c2ec29d2a..d6f1f78f56 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1560,28 +1560,6 @@ ttyunblock(struct tty *tp) lwkt_reltoken(&tty_token); } -#ifdef notyet -/* Not used by any current (i386) drivers. */ -/* - * Restart after an inter-char delay. - */ -void -ttrstrt(void *tp_arg) -{ - struct tty *tp; - - KASSERT(tp_arg != NULL, ("ttrstrt")); - - tp = tp_arg; - crit_enter(); - lwkt_gettoken(&tty_token); - CLR(tp->t_state, TS_TIMEOUT); - ttstart(tp); - lwkt_reltoken(&tty_token); - crit_exit(); -} -#endif - int ttstart(struct tty *tp) { diff --git a/sys/sys/kerneldump.h b/sys/sys/kerneldump.h index 2e7d29a429..8fd2e702fd 100644 --- a/sys/sys/kerneldump.h +++ b/sys/sys/kerneldump.h @@ -73,7 +73,6 @@ struct kerneldumpheader { #define KERNELDUMPVERSION 1 uint32_t architectureversion; #define KERNELDUMP_AMD64_VERSION 2 -#define KERNELDUMP_I386_VERSION 2 #define KERNELDUMP_TEXT_VERSION 1 uint64_t dumplength; /* excl headers */ uint64_t dumptime; diff --git a/sys/sys/tty.h b/sys/sys/tty.h index 1f85ebc0f3..2cfe20b198 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -259,7 +259,6 @@ int tputchar (int c, struct tty *tp); int ttcompat (struct tty *tp, u_long com, caddr_t data, int flag); int ttioctl (struct tty *tp, u_long com, void *data, int flag); int ttread (struct tty *tp, struct uio *uio, int flag); -void ttrstrt (void *tp); int ttsetcompat (struct tty *tp, u_long *com, caddr_t data, struct termios *term); void ttsetwater (struct tty *tp);