From: Sascha Wildner Date: Fri, 21 Aug 2015 16:16:58 +0000 (+0200) Subject: i386 removal, part 37/x: Remove more i386 related small bits and pieces. X-Git-Tag: v4.5.0~779 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/bfc0d4cde33295470320c3319292c629797f354f i386 removal, part 37/x: Remove more i386 related small bits and pieces. --- diff --git a/etc/devd/Makefile b/etc/devd/Makefile index aef1347848..3ce6aa53e9 100644 --- a/etc/devd/Makefile +++ b/etc/devd/Makefile @@ -2,7 +2,7 @@ FILES= uath.conf usb.conf -.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386" +.if ${MACHINE_ARCH} == "x86_64" FILES+= asus.conf .endif diff --git a/sys/bus/cam/scsi/scsi_low.h b/sys/bus/cam/scsi/scsi_low.h index 43a0ee1178..d486eafa74 100644 --- a/sys/bus/cam/scsi/scsi_low.h +++ b/sys/bus/cam/scsi/scsi_low.h @@ -1,5 +1,4 @@ /* $FreeBSD: src/sys/cam/scsi/scsi_low.h,v 1.1.2.4 2001/07/22 00:21:41 non Exp $ */ -/* $DragonFly: src/sys/bus/cam/scsi/scsi_low.h,v 1.12 2006/11/07 19:56:20 dillon Exp $ */ /* $NecBSD: scsi_low.h,v 1.24.10.5 2001/06/26 07:31:46 honda Exp $ */ /* $NetBSD$ */ @@ -598,10 +597,6 @@ struct scsi_low_softc { /* targinfo size */ int sl_targsize; - -#if defined(i386) || defined(__i386__) - u_int sl_irq; /* XXX */ -#endif /* i386 */ }; /************************************************* diff --git a/sys/bus/firewire/fwohci_pci.c b/sys/bus/firewire/fwohci_pci.c index 4da47c2d8f..d896caf9b2 100644 --- a/sys/bus/firewire/fwohci_pci.c +++ b/sys/bus/firewire/fwohci_pci.c @@ -255,12 +255,8 @@ fwohci_pci_attach(device_t self) /* For the moment, put in a message stating what is wrong */ intr = pci_read_config(self, PCIR_INTLINE, 1); - if (intr == 0 || intr == 255) { + if (intr == 0 || intr == 255) device_printf(self, "Invalid irq %d\n", intr); -#ifdef __i386__ - device_printf(self, "Please switch PNP-OS to 'No' in BIOS\n"); -#endif - } if (bootverbose) firewire_debug = bootverbose; diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 01e301b22a..2d9348fb2d 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -336,7 +336,7 @@ typedef void timeout_t (void *); /* timeout function type */ * For the alpha arch, some of these functions are static __inline, and * the others should be. */ -#if defined(__i386__) || defined(__x86_64__) +#if defined(__x86_64__) void setdelayed (void); void setsoftcambio (void); void setsoftcamnet (void); @@ -351,7 +351,7 @@ void splz (void); void splz_check (void); void cpu_mmw_pause_int(int*, int, int, int); void cpu_mmw_pause_long(long*, long, int, int); -#endif /* __i386__ || __x86_64__ */ +#endif /* __x86_64__ */ /* * Various callout lists. diff --git a/usr.bin/ktrdump/ktrdump.c b/usr.bin/ktrdump/ktrdump.c index 784cf2a71e..018dd97cc0 100644 --- a/usr.bin/ktrdump/ktrdump.c +++ b/usr.bin/ktrdump/ktrdump.c @@ -107,8 +107,6 @@ struct reg_save_area { uint64_t rdi, rsi, rdx, rcx, r8, r9; /* XMM registers follow, but we don't use them */ }; -#elif __i386__ -typedef void *machine_va_list; #endif static int cflag; @@ -1377,67 +1375,6 @@ free_valist: *_valist = NULL; return -1; } -#elif __i386__ - -static void -va_list_cleanup(machine_va_list *valist) -{ - if (*valist) - free(*valist); -} - -static int -va_list_from_blob(machine_va_list *valist, const char *fmt, char *blob, size_t blobsize) -{ - const char *f; - char *n; - size_t bytes, sz; - enum argument_class argclass; - - n = NULL; - bytes = 0; - for (f = fmt; *f != '\0'; ++f) { - if (*f != '%') - continue; - sz = conversion_size(f, &argclass); - if (blobsize < sz) { - fprintf(stderr, "not enough data available " - "for format: %s\n", fmt); - goto free_va; - } - if ((argclass == ARGCLASS_INTEGER) && (sz < 4)) { - int i = -1; /* do C integer promotion */ - if (sz == 1) - i = *(char *)blob; - else - i = *(short *)blob; - if (!(n = realloc(n, bytes + 4))) - goto free_va; - memcpy(n + bytes, &i, sizeof(i)); - bytes += 4; - } else { - if (!(n = realloc(n, bytes + sz))) - goto free_va; - memcpy(n + bytes, blob, sz); - bytes += sz; - } - blob += sz; - blobsize -= sz; - - } - if (blobsize) { - fprintf(stderr, "Couldn't consume all data for format %s " - "(%zd bytes left over)\n", fmt, blobsize); - goto free_va; - } - *valist = n; - return 0; -free_va: - if (n) - free(n); - *valist = NULL; - return -1; -} #else #error "Don't know how to get a va_list on this platform" diff --git a/usr.bin/truss/main.c b/usr.bin/truss/main.c index 2d11de7323..5fb812ac51 100644 --- a/usr.bin/truss/main.c +++ b/usr.bin/truss/main.c @@ -76,11 +76,6 @@ struct ex_types { void (*enter_syscall)(struct trussinfo *, int); int (*exit_syscall)(struct trussinfo *, int); } ex_types[] = { -#ifdef __i386__ - { "DragonFly ELF32", i386_syscall_entry, i386_syscall_exit }, - { "FreeBSD ELF32", i386_syscall_entry, i386_syscall_exit }, - { "Linux ELF32", i386_linux_syscall_entry, i386_linux_syscall_exit }, -#endif #ifdef __x86_64__ { "DragonFly ELF64", x86_64_syscall_entry, x86_64_syscall_exit }, { "FreeBSD ELF64", x86_64_syscall_entry, x86_64_syscall_exit }, diff --git a/usr.sbin/installer/dfuibe_installer/flow.h b/usr.sbin/installer/dfuibe_installer/flow.h index 478d3c9206..9d8cd3b1dc 100644 --- a/usr.sbin/installer/dfuibe_installer/flow.h +++ b/usr.sbin/installer/dfuibe_installer/flow.h @@ -41,9 +41,7 @@ #define DISK_MIN 2048 #define HAMMER_MIN 51200 -#if defined(__i386__) -#define SWAP_MAX 32768 -#elif defined(__x86_64__) +#if defined(__x86_64__) #define SWAP_MAX 524288 #endif diff --git a/usr.sbin/ppp/mbuf.c b/usr.sbin/ppp/mbuf.c index 95bd731c51..30b7326003 100644 --- a/usr.sbin/ppp/mbuf.c +++ b/usr.sbin/ppp/mbuf.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.sbin/ppp/mbuf.c,v 1.36.2.5 2002/09/01 02:12:28 brian Exp $ - * $DragonFly: src/usr.sbin/ppp/mbuf.c,v 1.3 2008/05/19 10:19:49 corecode Exp $ */ #include @@ -394,13 +393,10 @@ m_pullup(struct mbuf *bp) cp += bp->m_len; } bp = nbp; - } -#ifndef __i386__ /* Do any other archs not care about alignment ? */ - else if ((bp->m_offset & (sizeof(long) - 1)) != 0) { + } else if ((bp->m_offset & (sizeof(long) - 1)) != 0) { bcopy(MBUF_CTOP(bp), bp + 1, bp->m_len); bp->m_offset = 0; } -#endif } return bp; diff --git a/usr.sbin/ppp/ua.h b/usr.sbin/ppp/ua.h index 80c463d5e2..423b70aa8d 100644 --- a/usr.sbin/ppp/ua.h +++ b/usr.sbin/ppp/ua.h @@ -24,19 +24,9 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.sbin/ppp/ua.h,v 1.3 1999/08/28 01:18:49 peter Exp $ - * $DragonFly: src/usr.sbin/ppp/ua.h,v 1.2 2003/06/17 04:30:01 dillon Exp $ */ -#ifdef __i386__ /* Do any other archs not care about alignment ? */ - -# define ua_htonl(src, tgt) (*(u_int32_t *)(tgt) = htonl(*(u_int32_t *)(src))) -# define ua_ntohl(src, tgt) (*(u_int32_t *)(tgt) = ntohl(*(u_int32_t *)(src))) -# define ua_htons(src, tgt) (*(u_int16_t *)(tgt) = htons(*(u_int16_t *)(src))) -# define ua_ntohs(src, tgt) (*(u_int16_t *)(tgt) = ntohs(*(u_int16_t *)(src))) - -#else /* We care about alignment (or else drop a core !) */ - -# define ua_htonl(src, tgt) \ +#define ua_htonl(src, tgt) \ do { \ u_int32_t __oh; \ memcpy(&__oh, (src), sizeof __oh); \ @@ -46,7 +36,7 @@ *((u_char *)(tgt) + 3) = __oh & 0xff; \ } while (0) -# define ua_ntohl(src, tgt) \ +#define ua_ntohl(src, tgt) \ do { \ u_int32_t __nh; \ __nh = ((u_int32_t)*(u_char *)(src) << 24) | \ @@ -56,7 +46,7 @@ memcpy((tgt), &__nh, sizeof __nh); \ } while (0) -# define ua_htons(src, tgt) \ +#define ua_htons(src, tgt) \ do { \ u_int16_t __oh; \ memcpy(&__oh, (src), sizeof __oh); \ @@ -64,12 +54,10 @@ *((u_char *)(tgt) + 1) = __oh & 0xff; \ } while (0) -# define ua_ntohs(src, tgt) \ +#define ua_ntohs(src, tgt) \ do { \ u_int16_t __nh; \ __nh = ((u_int16_t)*(u_char *)(src) << 8) | \ (u_int16_t)*((u_char *)(src) + 1); \ memcpy((tgt), &__nh, sizeof __nh); \ } while (0) - -#endif