diff options
author | jhb <jhb@FreeBSD.org> | 2006-05-12 05:04:46 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-05-12 05:04:46 +0000 |
commit | 0f921e0992f543c4aafd5604a99a6edaa059ff36 (patch) | |
tree | 9e7fa374ce86cf10beca9d2dca94fc077a700745 | |
parent | 95826ec6b414b9b651fe4cf4b08cf9e0e16a11f2 (diff) | |
download | FreeBSD-src-0f921e0992f543c4aafd5604a99a6edaa059ff36.zip FreeBSD-src-0f921e0992f543c4aafd5604a99a6edaa059ff36.tar.gz |
Remove various bits of conditional Alpha code and fixup a few comments.
44 files changed, 19 insertions, 360 deletions
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 049f36c..c67a71d 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -79,13 +79,6 @@ __FBSDID("$FreeBSD$"); #include <machine/clock.h> -#ifdef __alpha__ -#include <machine/alpha_cpu.h> -#include <machine/cpuconf.h> -#include <machine/rpb.h> -extern int ncpus; -#endif /* __alpha__ */ - #if defined(__i386__) || defined(__amd64__) #include <machine/cputypes.h> #include <machine/md_var.h> @@ -185,77 +178,6 @@ linprocfs_domeminfo(PFS_FILL_ARGS) return (0); } -#ifdef __alpha__ -extern struct rpb *hwrpb; -/* - * Filler function for proc/cpuinfo (Alpha version) - */ -static int -linprocfs_docpuinfo(PFS_FILL_ARGS) -{ - u_int64_t type, major; - struct pcs *pcsp; - const char *model, *sysname; - - static const char *cpuname[] = { - "EV3", "EV4", "Simulate", "LCA4", "EV5", "EV45", "EV56", - "EV6", "PCA56", "PCA57", "EV67", "EV68CB", "EV68AL" - }; - - pcsp = LOCATE_PCS(hwrpb, hwrpb->rpb_primary_cpu_id); - type = pcsp->pcs_proc_type; - major = (type & PCS_PROC_MAJOR) >> PCS_PROC_MAJORSHIFT; - if (major < sizeof(cpuname)/sizeof(char *)) { - model = cpuname[major - 1]; - } else { - model = "unknown"; - } - - sysname = alpha_dsr_sysname(); - - sbuf_printf(sb, - "cpu\t\t\t: Alpha\n" - "cpu model\t\t: %s\n" - "cpu variation\t\t: %ld\n" - "cpu revision\t\t: %d\n" - "cpu serial number\t: %s\n" - "system type\t\t: %s\n" - "system variation\t: %s\n" - "system revision\t\t: %d\n" - "system serial number\t: %s\n" - "cycle frequency [Hz]\t: %lu\n" - "timer frequency [Hz]\t: %u\n" - "page size [bytes]\t: %ld\n" - "phys. address bits\t: %ld\n" - "max. addr. space #\t: %ld\n" - "BogoMIPS\t\t: %u.%02u\n" - "kernel unaligned acc\t: %d (pc=%x,va=%x)\n" - "user unaligned acc\t: %d (pc=%x,va=%x)\n" - "platform string\t\t: %s\n" - "cpus detected\t\t: %d\n" - , - model, - pcsp->pcs_proc_var, - *(int *)hwrpb->rpb_revision, - " ", - " ", - "0", - 0, - " ", - hwrpb->rpb_cc_freq, - hz, - hwrpb->rpb_page_size, - hwrpb->rpb_phys_addr_size, - hwrpb->rpb_max_asn, - 0, 0, - 0, 0, 0, - 0, 0, 0, - sysname, - ncpus); - return (0); -} -#endif /* __alpha__ */ - #if defined(__i386__) || defined(__amd64__) /* * Filler function for proc/cpuinfo (i386 & amd64 version) diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c index a0deb5f..b4ef386 100644 --- a/sys/dev/agp/agp.c +++ b/sys/dev/agp/agp.c @@ -90,12 +90,6 @@ agp_flush_cache() #if defined(__i386__) || defined(__amd64__) wbinvd(); #endif -#ifdef __alpha__ - /* FIXME: This is most likely not correct as it doesn't flush CPU - * write caches, but we don't have a facility to do that and - * this is all linux does, too */ - alpha_mb(); -#endif } u_int8_t @@ -507,10 +501,6 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem, /* * Bind the individual pages and flush the chipset's * TLB. - * - * XXX Presumably, this needs to be the pci address on alpha - * (i.e. use alpha_XXX_dmamap()). I don't have access to any - * alpha AGP hardware to check. */ VM_OBJECT_LOCK(mem->am_obj); for (i = 0; i < mem->am_size; i += PAGE_SIZE) { diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c index 510078d..66b5146 100644 --- a/sys/dev/asr/asr.c +++ b/sys/dev/asr/asr.c @@ -146,9 +146,6 @@ #define ASR_IOCTL_COMPAT #endif /* ASR_COMPAT */ #endif /* !BURN_BRIDGES */ - -#elif defined(__alpha__) -#include <alpha/include/pmap.h> #endif #include <machine/vmparam.h> @@ -3715,8 +3712,6 @@ asr_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *t case CPU_686: Info.processorType = PROC_SEXIUM; break; } -#elif defined(__alpha__) - Info.processorType = PROC_ALPHA; #endif Info.osType = OS_BSDI_UNIX; diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index e9cffe1..d76b11b 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -47,9 +47,6 @@ __FBSDID("$FreeBSD$"); #include <machine/resource.h> #include <machine/bus.h> #include <sys/rman.h> -#ifdef __alpha__ -#include <machine/md_var.h> -#endif #include <dev/ata/ata-all.h> #include <ata_if.h> diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c index 38d3c06..e322757 100644 --- a/sys/dev/ata/ata-pci.c +++ b/sys/dev/ata/ata-pci.c @@ -42,9 +42,6 @@ __FBSDID("$FreeBSD$"); #include <machine/stdarg.h> #include <machine/resource.h> #include <machine/bus.h> -#ifdef __alpha__ -#include <machine/md_var.h> -#endif #include <sys/rman.h> #include <dev/pci/pcivar.h> #include <dev/pci/pcireg.h> @@ -288,14 +285,10 @@ ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, } if (type == SYS_RES_IRQ && *rid == ATA_IRQ_RID) { if (ata_legacy(dev)) { -#ifdef __alpha__ - res = alpha_platform_alloc_ide_intr(unit); -#else int irq = (unit == 0 ? 14 : 15); res = BUS_ALLOC_RESOURCE(device_get_parent(dev), child, SYS_RES_IRQ, rid, irq, irq, 1, flags); -#endif } else res = controller->r_irq; @@ -331,12 +324,8 @@ ata_pci_release_resource(device_t dev, device_t child, int type, int rid, return ENOENT; if (ata_legacy(dev)) { -#ifdef __alpha__ - return alpha_platform_release_ide_intr(unit, r); -#else return BUS_RELEASE_RESOURCE(device_get_parent(dev), child, SYS_RES_IRQ, rid, r); -#endif } else return 0; @@ -350,13 +339,8 @@ ata_pci_setup_intr(device_t dev, device_t child, struct resource *irq, void **cookiep) { if (ata_legacy(dev)) { -#ifdef __alpha__ - return alpha_platform_setup_ide_intr(child, irq, function, argument, - cookiep); -#else return BUS_SETUP_INTR(device_get_parent(dev), child, irq, flags, function, argument, cookiep); -#endif } else { struct ata_pci_controller *controller = device_get_softc(dev); @@ -374,11 +358,7 @@ ata_pci_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie) { if (ata_legacy(dev)) { -#ifdef __alpha__ - return alpha_platform_teardown_ide_intr(child, irq, cookie); -#else return BUS_TEARDOWN_INTR(device_get_parent(dev), child, irq, cookie); -#endif } else { struct ata_pci_controller *controller = device_get_softc(dev); diff --git a/sys/dev/atkbdc/atkbd.c b/sys/dev/atkbdc/atkbd.c index 9987787..19bd7a3 100644 --- a/sys/dev/atkbdc/atkbd.c +++ b/sys/dev/atkbdc/atkbd.c @@ -1330,7 +1330,7 @@ init_keyboard(KBDC kbdc, int *type, int flags) } } -#if defined(__alpha__) || defined(__sparc64__) +#if defined(__sparc64__) if (send_kbd_command_and_data( kbdc, KBDC_SET_SCANCODE_SET, 2) != KBD_ACK) { printf("atkbd: can't set translation.\n"); diff --git a/sys/dev/atkbdc/atkbdc.c b/sys/dev/atkbdc/atkbdc.c index 247a116..248ac2f 100644 --- a/sys/dev/atkbdc/atkbdc.c +++ b/sys/dev/atkbdc/atkbdc.c @@ -174,8 +174,6 @@ atkbdc_configure(void) tag = I386_BUS_SPACE_IO; #elif defined(__amd64__) tag = AMD64_BUS_SPACE_IO; -#elif defined(__alpha__) - tag = busspace_isa_io; #elif defined(__ia64__) tag = IA64_BUS_SPACE_IO; #elif defined(__sparc64__) diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c index 1d781bd..fb141ea 100644 --- a/sys/dev/dc/if_dc.c +++ b/sys/dev/dc/if_dc.c @@ -128,9 +128,6 @@ __FBSDID("$FreeBSD$"); #include <dev/pci/pcivar.h> #define DC_USEIOSPACE -#ifdef __alpha__ -#define SRM_MEDIA -#endif #include <dev/dc/if_dcreg.h> @@ -2281,32 +2278,6 @@ dc_attach(device_t dev) callout_init_mtx(&sc->dc_stat_ch, &sc->dc_mtx, 0); -#ifdef SRM_MEDIA - sc->dc_srm_media = 0; - - /* Remember the SRM console media setting */ - if (DC_IS_INTEL(sc)) { - command = pci_read_config(dev, DC_PCI_CFDD, 4); - command &= ~(DC_CFDD_SNOOZE_MODE | DC_CFDD_SLEEP_MODE); - switch ((command >> 8) & 0xff) { - case 3: - sc->dc_srm_media = IFM_10_T; - break; - case 4: - sc->dc_srm_media = IFM_10_T | IFM_FDX; - break; - case 5: - sc->dc_srm_media = IFM_100_TX; - break; - case 6: - sc->dc_srm_media = IFM_100_TX | IFM_FDX; - break; - } - if (sc->dc_srm_media) - sc->dc_srm_media |= IFM_ACTIVE | IFM_ETHER; - } -#endif - /* * Call MI attach routine. */ @@ -3400,19 +3371,7 @@ dc_init(void *xsc) DC_LOCK(sc); dc_init_locked(sc); -#ifdef SRM_MEDIA - if(sc->dc_srm_media) { - struct ifreq ifr; - struct mii_data *mii; - - ifr.ifr_media = sc->dc_srm_media; - sc->dc_srm_media = 0; - DC_UNLOCK(sc); - mii = device_get_softc(sc->dc_miibus); - ifmedia_ioctl(sc->dc_ifp, &ifr, &mii->mii_media, SIOCSIFMEDIA); - } else -#endif - DC_UNLOCK(sc); + DC_UNLOCK(sc); } static void @@ -3684,12 +3643,6 @@ dc_ioctl(struct ifnet *ifp, u_long command, caddr_t data) case SIOCSIFMEDIA: mii = device_get_softc(sc->dc_miibus); error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command); -#ifdef SRM_MEDIA - DC_LOCK(sc); - if (sc->dc_srm_media) - sc->dc_srm_media = 0; - DC_UNLOCK(sc); -#endif break; case SIOCSIFCAP: #ifdef DEVICE_POLLING diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c index aee08fd..ea7451e 100644 --- a/sys/dev/de/if_de.c +++ b/sys/dev/de/if_de.c @@ -4436,15 +4436,6 @@ tulip_attach(tulip_softc_t * const sc) == TULIP_HAVE_ISVSROM ? " (invalid EESPROM checksum)" : ""); TULIP_LOCK(sc); -#if defined(__alpha__) - /* - * In case the SRM console told us about a bogus media, - * we need to check to be safe. - */ - if (sc->tulip_mediums[sc->tulip_media] == NULL) - sc->tulip_media = TULIP_MEDIA_UNKNOWN; -#endif - (*sc->tulip_boardsw->bd_media_probe)(sc); ifmedia_init(&sc->tulip_ifmedia, 0, tulip_ifmedia_change, @@ -4749,9 +4740,6 @@ static int tulip_pci_attach(device_t dev) { tulip_softc_t *sc; -#if defined(__alpha__) - tulip_media_t media = TULIP_MEDIA_UNKNOWN; -#endif int retval, idx; u_int32_t revinfo, cfdainfo; unsigned csroffset = TULIP_PCI_CSROFFSET; @@ -4829,23 +4817,6 @@ tulip_pci_attach(device_t dev) pci_write_config(dev, PCI_CFDA, cfdainfo, 4); DELAY(11*1000); } -#if defined(__alpha__) - /* - * The Alpha SRM console encodes a console set media in the driver - * part of the CFDA register. Note that the Multia presents a - * problem in that its BNC mode is really EXTSIA. So in that case - * force a probe. - */ - switch ((cfdainfo >> 8) & 0xff) { - case 1: media = chipid > TULIP_21040 ? TULIP_MEDIA_AUI : TULIP_MEDIA_AUIBNC; break; - case 2: media = chipid > TULIP_21040 ? TULIP_MEDIA_BNC : TULIP_MEDIA_UNKNOWN; break; - case 3: media = TULIP_MEDIA_10BASET; break; - case 4: media = TULIP_MEDIA_10BASET_FD; break; - case 5: media = TULIP_MEDIA_100BASETX; break; - case 6: media = TULIP_MEDIA_100BASETX_FD; break; - default: media = TULIP_MEDIA_UNKNOWN; break; - } -#endif sc->tulip_unit = unit; sc->tulip_revinfo = revinfo; @@ -4911,9 +4882,6 @@ tulip_pci_attach(device_t dev) if (sc->tulip_features & TULIP_HAVE_SHAREDINTR) intr_rtn = tulip_intr_shared; -#if defined(__alpha__) - sc->tulip_media = media; -#endif tulip_attach(sc); /* Setup interrupt last. */ @@ -4933,13 +4901,6 @@ tulip_pci_attach(device_t dev) return ENXIO; } } - -#if defined(__alpha__) - TULIP_LOCK(sc); - if (sc->tulip_media != TULIP_MEDIA_UNKNOWN) - tulip_linkup(sc, media); - TULIP_UNLOCK(sc); -#endif } return 0; } diff --git a/sys/dev/lge/if_lgereg.h b/sys/dev/lge/if_lgereg.h index 53889f3..4808607 100644 --- a/sys/dev/lge/if_lgereg.h +++ b/sys/dev/lge/if_lgereg.h @@ -607,8 +607,3 @@ struct lge_softc { #define LGE_PSTATE_D3 0x0003 #define LGE_PME_EN 0x0010 #define LGE_PME_STATUS 0x8000 - -#ifdef __alpha__ -#undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va) -#endif diff --git a/sys/dev/nge/if_ngereg.h b/sys/dev/nge/if_ngereg.h index caedfcb..913b1ee 100644 --- a/sys/dev/nge/if_ngereg.h +++ b/sys/dev/nge/if_ngereg.h @@ -731,8 +731,3 @@ struct nge_softc { #define NGE_PSTATE_D3 0x0003 #define NGE_PME_EN 0x0010 #define NGE_PME_STATUS 0x8000 - -#ifdef __alpha__ -#undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va) -#endif diff --git a/sys/dev/pdq/pdq_freebsd.h b/sys/dev/pdq/pdq_freebsd.h index d6932fb..e2ad2b4 100644 --- a/sys/dev/pdq/pdq_freebsd.h +++ b/sys/dev/pdq/pdq_freebsd.h @@ -164,11 +164,7 @@ typedef struct _pdq_os_ctx_t { #define PDQ_OS_CSR_FMT "0x%x" #define PDQ_OS_USEC_DELAY(n) DELAY(n) -#ifdef __alpha__ -#define PDQ_OS_VA_TO_BUSPA(pdq, p) alpha_XXX_dmamap((vm_offset_t)p) -#else #define PDQ_OS_VA_TO_BUSPA(pdq, p) vtophys(p) -#endif #define PDQ_OS_MEMALLOC(n) malloc(n, M_DEVBUF, M_NOWAIT) #define PDQ_OS_MEMFREE(p, n) free((void *) p, M_DEVBUF) diff --git a/sys/dev/pdq/pdqvar.h b/sys/dev/pdq/pdqvar.h index de576ba..5e85ca9 100644 --- a/sys/dev/pdq/pdqvar.h +++ b/sys/dev/pdq/pdqvar.h @@ -165,7 +165,7 @@ typedef struct _pdq_os_ctx_t { struct ifmedia sc_ifmedia; #endif pdq_t *sc_pdq; -#if defined(__alpha__) || defined(__i386__) +#if defined(__i386__) pdq_bus_ioport_t sc_iobase; #endif #if defined(PDQ_IOMAPPED) diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c index 48a9889..5d4e68d 100644 --- a/sys/dev/ppc/ppc.c +++ b/sys/dev/ppc/ppc.c @@ -1681,15 +1681,6 @@ ppc_probe(device_t dev, int rid) IO_LPTSIZE_EXTENDED); } #endif -#ifdef __alpha__ - /* - * There isn't a bios list on alpha. Put it in the usual place. - */ - if (error) { - bus_set_resource(dev, SYS_RES_IOPORT, rid, 0x3bc, - IO_LPTSIZE_NORMAL); - } -#endif /* IO port is mandatory */ diff --git a/sys/dev/sf/if_sfreg.h b/sys/dev/sf/if_sfreg.h index 652f804..9b3826d 100644 --- a/sys/dev/sf/if_sfreg.h +++ b/sys/dev/sf/if_sfreg.h @@ -1056,8 +1056,3 @@ struct sf_softc { #define SF_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sf_mtx, MA_OWNED) #define SF_TIMEOUT 1000 - -#ifdef __alpha__ -#undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va) -#endif diff --git a/sys/dev/sound/isa/gusc.c b/sys/dev/sound/isa/gusc.c index cb1b1ad..36adec4 100644 --- a/sys/dev/sound/isa/gusc.c +++ b/sys/dev/sound/isa/gusc.c @@ -41,9 +41,6 @@ #include <isa/isavar.h> #include <isa/isa_common.h> -#ifdef __alpha__ /* XXX workaround a stupid warning */ -#include <alpha/isa/isavar.h> -#endif SND_DECLARE_FILE("$FreeBSD$"); diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c index 6d355b0..9a2549e 100644 --- a/sys/dev/sym/sym_hipd.c +++ b/sys/dev/sym/sym_hipd.c @@ -137,8 +137,6 @@ typedef u_int32_t u32; #if defined __i386__ || defined __amd64__ #define MEMORY_BARRIER() do { ; } while(0) -#elif defined __alpha__ -#define MEMORY_BARRIER() alpha_mb() #elif defined __powerpc__ #define MEMORY_BARRIER() __asm__ volatile("eieio; sync" : : : "memory") #elif defined __ia64__ diff --git a/sys/dev/syscons/scterm-sc.c b/sys/dev/syscons/scterm-sc.c index aa240aa..e89debb 100644 --- a/sys/dev/syscons/scterm-sc.c +++ b/sys/dev/syscons/scterm-sc.c @@ -178,22 +178,10 @@ static void scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c) { static u_char ansi_col[16] = { -#ifdef __alpha__ - /* - * DEC is evil. They switch the red and blue attributes in - * the palette in the system console. As a simple work-around, - * re-map the ANSI colors appropriately. - */ - FG_BLACK, FG_BLUE, FG_GREEN, FG_CYAN, - FG_RED, FG_MAGENTA, FG_BROWN, FG_LIGHTGREY, - FG_DARKGREY, FG_LIGHTBLUE, FG_LIGHTGREEN, FG_LIGHTCYAN, - FG_LIGHTRED, FG_LIGHTMAGENTA, FG_YELLOW, FG_WHITE -#else FG_BLACK, FG_RED, FG_GREEN, FG_BROWN, FG_BLUE, FG_MAGENTA, FG_CYAN, FG_LIGHTGREY, FG_DARKGREY, FG_LIGHTRED, FG_LIGHTGREEN, FG_YELLOW, FG_LIGHTBLUE, FG_LIGHTMAGENTA, FG_LIGHTCYAN, FG_WHITE -#endif }; static int cattrs[] = { 0, /* block */ diff --git a/sys/dev/syscons/scvgarndr.c b/sys/dev/syscons/scvgarndr.c index 81498ec..5b056d3 100644 --- a/sys/dev/syscons/scvgarndr.c +++ b/sys/dev/syscons/scvgarndr.c @@ -1038,7 +1038,7 @@ draw_pxlmouse_planar(scr_stat *scp, int x, int y) #if defined(__i386__) || defined(__amd64__) *(u_char *)p &= m >> 8; *(u_char *)(p + 1) &= m; -#elif defined(__alpha__) +#else writeb(p, readb(p) & (m >> 8)); writeb(p + 1, readb(p + 1) & (m >> 8)); #endif @@ -1050,7 +1050,7 @@ draw_pxlmouse_planar(scr_stat *scp, int x, int y) m = ~(mouse_and_mask[j] >> xoff); #if defined(__i386__) || defined(__amd64__) *(u_char *)p &= m; -#elif defined(__alpha__) +#else writeb(p, readb(p) & (m >> 8)); #endif p += line_width; @@ -1064,7 +1064,7 @@ draw_pxlmouse_planar(scr_stat *scp, int x, int y) #if defined(__i386__) || defined(__amd64__) *(u_char *)p &= m >> 8; *(u_char *)(p + 1) &= m; -#elif defined(__alpha__) +#else writeb(p, readb(p) & (m >> 8)); writeb(p + 1, readb(p + 1) & (m >> 8)); #endif @@ -1075,7 +1075,7 @@ draw_pxlmouse_planar(scr_stat *scp, int x, int y) m = mouse_or_mask[j] >> xoff; #if defined(__i386__) || defined(__amd64__) *(u_char *)p &= m; -#elif defined(__alpha__) +#else writeb(p, readb(p) & (m >> 8)); #endif p += line_width; diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h index 45e96ae..1cd33b2 100644 --- a/sys/dev/syscons/syscons.h +++ b/sys/dev/syscons/syscons.h @@ -40,8 +40,6 @@ #include <pc98/cbus/sc_machdep.h> #elif defined(__i386__) /* nothing for the moment */ -#elif defined(__alpha__) -/* nothing for the moment */ #endif /* default values for configuration options */ diff --git a/sys/dev/vr/if_vrreg.h b/sys/dev/vr/if_vrreg.h index 1ef3756..7caab56 100644 --- a/sys/dev/vr/if_vrreg.h +++ b/sys/dev/vr/if_vrreg.h @@ -589,9 +589,3 @@ struct vr_softc { #define VR_PSTATE_D3 0x0003 #define VR_PME_EN 0x0010 #define VR_PME_STATUS 0x8000 - - -#ifdef __alpha__ -#undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va) -#endif diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c index 23c7454..f824c4d 100644 --- a/sys/isa/isa_common.c +++ b/sys/isa/isa_common.c @@ -73,9 +73,6 @@ __FBSDID("$FreeBSD$"); #include <isa/isavar.h> #include <isa/isa_common.h> -#ifdef __alpha__ /* XXX workaround a stupid warning */ -#include <alpha/isa/isavar.h> -#endif static int isa_print_child(device_t bus, device_t dev); diff --git a/sys/isa/isa_common.h b/sys/isa/isa_common.h index 65e0ad5..3f29807 100644 --- a/sys/isa/isa_common.h +++ b/sys/isa/isa_common.h @@ -69,13 +69,10 @@ extern struct resource *isa_alloc_resource(device_t bus, device_t child, extern int isa_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r); -/* XXX alphe declares these elsewhere */ -#ifndef __alpha__ extern int isa_setup_intr(device_t bus, device_t child, struct resource *r, int flags, void (*ihand)(void *), void *arg, void **cookiep); extern int isa_teardown_intr(device_t bus, device_t child, struct resource *r, void *cookie); -#endif extern driver_t isa_driver; extern devclass_t isa_devclass; diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index be228d6..22524aa 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -792,11 +792,6 @@ mtx_validate(struct mtx *m) * XXX: When kernacc() does not require Giant we can reenable this check */ #ifdef notyet -/* - * XXX - When kernacc() is fixed on the alpha to handle K0_SEG memory properly - * we can re-enable the kernacc() checks. - */ -#ifndef __alpha__ /* * Can't call kernacc() from early init386(), especially when * initializing Giant mutex, because some stuff in kernacc() @@ -807,7 +802,6 @@ mtx_validate(struct mtx *m) VM_PROT_READ | VM_PROT_WRITE)) panic("Can't read and write to mutex %p", m); #endif -#endif } #endif diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index aec3296..b3cafca 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -81,10 +81,6 @@ __FBSDID("$FreeBSD$"); #include <security/audit/audit.h> -#if defined (__alpha__) && !defined(COMPAT_43) -#error "You *really* need COMPAT_43 on the alpha for longjmp(3)" -#endif - #define ONSIG 32 /* NSIG for osig* syscalls. XXX. */ static int coredump(struct thread *); @@ -905,7 +901,7 @@ osigaction(td, uap) return (error); } -#if !defined(__i386__) && !defined(__alpha__) +#if !defined(__i386__) /* Avoid replicating the same stub everywhere */ int osigreturn(td, uap) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 9c41fed..50f889f 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -109,7 +109,7 @@ static int vfs_knllocked(void *arg); * Enable Giant pushdown based on whether or not the vm is mpsafe in this * build. Without mpsafevm the buffer cache can not run Giant free. */ -#if defined(__alpha__) || defined(__amd64__) || defined(__i386__) || \ +#if defined(__amd64__) || defined(__i386__) || \ defined(__ia64__) || defined(__sparc64__) int mpsafe_vfs = 1; #else diff --git a/sys/net/if.h b/sys/net/if.h index 4e97601..f669017 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -103,9 +103,6 @@ struct if_data { u_long ifi_noproto; /* destined for unsupported protocol */ u_long ifi_hwassist; /* HW offload capabilities */ time_t ifi_epoch; /* uptime at attach or stat reset */ -#ifdef __alpha__ - u_int ifi_timepad; /* time_t is int, not long on alpha */ -#endif struct timeval ifi_lastchange; /* time of last administrative change */ }; diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index 94f1c3e..7698ffd 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -273,9 +273,11 @@ if_simloop(ifp, m, af, hlen) /* Strip away media header */ if (hlen > 0) { m_adj(m, hlen); -#if defined(__alpha__) || defined(__ia64__) || defined(__sparc64__) - /* The alpha doesn't like unaligned data. - * We move data down in the first mbuf */ +#if defined(__ia64__) || defined(__sparc64__) + /* + * Some archs do not like unaligned data, so + * we move data down in the first mbuf. + */ if (mtod(m, vm_offset_t) & 3) { KASSERT(hlen >= 3, ("if_simloop: hlen too small")); bcopy(m->m_data, diff --git a/sys/pci/agp.c b/sys/pci/agp.c index a0deb5f..b4ef386 100644 --- a/sys/pci/agp.c +++ b/sys/pci/agp.c @@ -90,12 +90,6 @@ agp_flush_cache() #if defined(__i386__) || defined(__amd64__) wbinvd(); #endif -#ifdef __alpha__ - /* FIXME: This is most likely not correct as it doesn't flush CPU - * write caches, but we don't have a facility to do that and - * this is all linux does, too */ - alpha_mb(); -#endif } u_int8_t @@ -507,10 +501,6 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem, /* * Bind the individual pages and flush the chipset's * TLB. - * - * XXX Presumably, this needs to be the pci address on alpha - * (i.e. use alpha_XXX_dmamap()). I don't have access to any - * alpha AGP hardware to check. */ VM_OBJECT_LOCK(mem->am_obj); for (i = 0; i < mem->am_size; i += PAGE_SIZE) { diff --git a/sys/pci/if_pcnreg.h b/sys/pci/if_pcnreg.h index 84e4a3f..0b27b18 100644 --- a/sys/pci/if_pcnreg.h +++ b/sys/pci/if_pcnreg.h @@ -531,8 +531,3 @@ struct pcn_softc { #define PCN_PSTATE_D3 0x0003 #define PCN_PME_EN 0x0010 #define PCN_PME_STATUS 0x8000 - -#ifdef __alpha__ -#undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va) -#endif diff --git a/sys/pci/if_sfreg.h b/sys/pci/if_sfreg.h index 652f804..9b3826d 100644 --- a/sys/pci/if_sfreg.h +++ b/sys/pci/if_sfreg.h @@ -1056,8 +1056,3 @@ struct sf_softc { #define SF_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sf_mtx, MA_OWNED) #define SF_TIMEOUT 1000 - -#ifdef __alpha__ -#undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va) -#endif diff --git a/sys/pci/if_stereg.h b/sys/pci/if_stereg.h index eab51640..e1e242a 100644 --- a/sys/pci/if_stereg.h +++ b/sys/pci/if_stereg.h @@ -547,8 +547,3 @@ struct ste_mii_frame { #define STE_MII_READOP 0x02 #define STE_MII_WRITEOP 0x01 #define STE_MII_TURNAROUND 0x02 - -#ifdef __alpha__ -#undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va) -#endif diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c index b06ae6a6..b5e18746 100644 --- a/sys/pci/if_tl.c +++ b/sys/pci/if_tl.c @@ -1441,10 +1441,6 @@ tl_newbuf(sc, c) if (m_new == NULL) return(ENOBUFS); -#ifdef __alpha__ - m_new->m_data += 2; -#endif - c->tl_mbuf = m_new; c->tl_next = NULL; c->tl_ptr->tlist_frsize = MCLBYTES; diff --git a/sys/pci/if_tlreg.h b/sys/pci/if_tlreg.h index 7f3dfb9..0aa50d3 100644 --- a/sys/pci/if_tlreg.h +++ b/sys/pci/if_tlreg.h @@ -589,8 +589,3 @@ struct tl_stats { */ #define EEPROM_CTL_READ 0xA1 /* 0101 0001 */ #define EEPROM_CTL_WRITE 0xA0 /* 0101 0000 */ - -#ifdef __alpha__ -#undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va) -#endif diff --git a/sys/pci/if_vrreg.h b/sys/pci/if_vrreg.h index 1ef3756..7caab56 100644 --- a/sys/pci/if_vrreg.h +++ b/sys/pci/if_vrreg.h @@ -589,9 +589,3 @@ struct vr_softc { #define VR_PSTATE_D3 0x0003 #define VR_PME_EN 0x0010 #define VR_PME_STATUS 0x8000 - - -#ifdef __alpha__ -#undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va) -#endif diff --git a/sys/pci/if_wbreg.h b/sys/pci/if_wbreg.h index 8a5b2cd..44a9d75 100644 --- a/sys/pci/if_wbreg.h +++ b/sys/pci/if_wbreg.h @@ -461,8 +461,3 @@ struct wb_softc { #define WB_PSTATE_D3 0x0003 #define WB_PME_EN 0x0010 #define WB_PME_STATUS 0x8000 - -#ifdef __alpha__ -#undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va) -#endif diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c index 1520c10..bdbc44f 100644 --- a/sys/pci/ncr.c +++ b/sys/pci/ncr.c @@ -278,12 +278,6 @@ __FBSDID("$FreeBSD$"); **========================================================== */ -#ifdef __alpha__ -/* XXX */ -#undef vtophys -#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va) -#endif - #define INB(r) bus_space_read_1(np->bst, np->bsh, offsetof(struct ncr_reg, r)) #define INW(r) bus_space_read_2(np->bst, np->bsh, offsetof(struct ncr_reg, r)) #define INL(r) bus_space_read_4(np->bst, np->bsh, offsetof(struct ncr_reg, r)) diff --git a/sys/sys/_timeval.h b/sys/sys/_timeval.h index 2a51d2f..a35d8a9 100644 --- a/sys/sys/_timeval.h +++ b/sys/sys/_timeval.h @@ -45,11 +45,7 @@ typedef __time_t time_t; * Structure returned by gettimeofday(2) system call, and used in other calls. */ struct timeval { -#ifdef __alpha__ - long tv_sec; /* seconds */ -#else time_t tv_sec; /* seconds */ -#endif suseconds_t tv_usec; /* and microseconds */ }; diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h index f7d81c3..74fd9af 100644 --- a/sys/sys/disklabel.h +++ b/sys/sys/disklabel.h @@ -57,11 +57,6 @@ #define LABELOFFSET 0 /* offset of label in sector */ #endif -#ifdef __alpha__ -#define LABELSECTOR 0 -#define LABELOFFSET 64 -#endif - #define DISKMAGIC ((u_int32_t)0x82564557) /* The disk magic number */ #ifndef MAXPARTITIONS #define MAXPARTITIONS 8 diff --git a/sys/sys/elf64.h b/sys/sys/elf64.h index fc1e545..20379dd 100644 --- a/sys/sys/elf64.h +++ b/sys/sys/elf64.h @@ -50,11 +50,7 @@ typedef uint64_t Elf64_Xword; * typedef is required. */ -#ifdef __alpha__ -typedef Elf64_Off Elf64_Hashelt; -#else typedef Elf64_Word Elf64_Hashelt; -#endif /* Non-standard class-dependent datatype used for abstraction. */ typedef Elf64_Xword Elf64_Size; diff --git a/sys/sys/param.h b/sys/sys/param.h index 91e3596..307823b 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -304,7 +304,7 @@ __END_DECLS * Constraints: PAGE_SIZE <= MAXALLOCSAVE <= 2 ** (MINBUCKET + 14), and * MAXALLOCSIZE must be a power of two. */ -#if defined(__alpha__) || defined(__ia64__) || defined(__sparc64__) +#if defined(__ia64__) || defined(__sparc64__) #define MINBUCKET 5 /* 5 => min allocation of 32 bytes */ #else #define MINBUCKET 4 /* 4 => min allocation of 16 bytes */ diff --git a/sys/sys/signal.h b/sys/sys/signal.h index 1f917a2..bdda7a3 100644 --- a/sys/sys/signal.h +++ b/sys/sys/signal.h @@ -387,7 +387,7 @@ struct sigvec { /* Keep this in one place only */ #if defined(_KERNEL) && defined(COMPAT_43) && \ - !defined(__i386__) && !defined(__alpha__) + !defined(__i386__) struct osigcontext { int _not_used; }; diff --git a/sys/sys/ucontext.h b/sys/sys/ucontext.h index 85a5fd6..baa179e 100644 --- a/sys/sys/ucontext.h +++ b/sys/sys/ucontext.h @@ -54,7 +54,7 @@ typedef struct __ucontext { } ucontext_t; #if defined(_KERNEL) && defined(COMPAT_FREEBSD4) -#if defined(__i386__) || defined(__alpha__) +#if defined(__i386__) struct ucontext4 { sigset_t uc_sigmask; struct mcontext4 uc_mcontext; @@ -62,9 +62,9 @@ struct ucontext4 { stack_t uc_stack; int __spare__[8]; }; -#else /* __i386__ || __alpha__ */ +#else /* __i386__ */ #define ucontext4 ucontext -#endif /* __i386__ || __alpha__ */ +#endif /* __i386__ */ #endif /* _KERNEL */ #ifndef _KERNEL diff --git a/sys/sys/user.h b/sys/sys/user.h index 1acf346..abf880b 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -82,9 +82,6 @@ #define KI_NSPARE_LONG 12 #define KI_NSPARE_PTR 7 -#ifdef __alpha__ -#define KINFO_PROC_SIZE 1088 -#endif #ifdef __amd64__ #define KINFO_PROC_SIZE 1088 #endif |