diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-11-06 13:32:39 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-11-06 13:32:39 +0000 |
commit | 808b6c18e97fdca2eadeada2d6daece42b1b75ff (patch) | |
tree | d926917cfc95852cb4772f5ac3b0d678cc3c24a9 /sys/arch/arm64 | |
parent | 66b835e7375752630ae70a5a17193129c0b59567 (diff) |
Clean up arm64's autoconf code. There have been quite a few unused
variables and includes. While there get rid of the boot_file support
and (void) casts.
ok kettenis@
Diffstat (limited to 'sys/arch/arm64')
-rw-r--r-- | sys/arch/arm64/arm64/autoconf.c | 45 | ||||
-rw-r--r-- | sys/arch/arm64/arm64/machdep.c | 7 |
2 files changed, 12 insertions, 40 deletions
diff --git a/sys/arch/arm64/arm64/autoconf.c b/sys/arch/arm64/arm64/autoconf.c index d0094f045db..18be08a483b 100644 --- a/sys/arch/arm64/arm64/autoconf.c +++ b/sys/arch/arm64/arm64/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.10 2019/01/09 13:18:50 yasuoka Exp $ */ +/* $OpenBSD: autoconf.c,v 1.11 2020/11/06 13:32:38 patrick Exp $ */ /* * Copyright (c) 2009 Miodrag Vallat. * @@ -16,27 +16,23 @@ */ #include <sys/param.h> -#include <sys/systm.h> -#include <sys/conf.h> #include <sys/device.h> #include <sys/disklabel.h> #include <sys/reboot.h> -#include <sys/socket.h> #include <sys/hibernate.h> +#include <sys/systm.h> #include <uvm/uvm.h> +#if defined(NFSCLIENT) #include <net/if.h> #include <net/if_types.h> #include <netinet/in.h> #include <netinet/if_ether.h> +#endif #include <machine/bootconfig.h> extern void dumpconf(void); -void parsepmonbp(void); - -struct device *bootdv = NULL; -enum devclass bootdev_class = DV_DULL; void unmap_startup(void) @@ -53,10 +49,10 @@ unmap_startup(void) void cpu_configure(void) { - (void)splhigh(); + splhigh(); softintr_init(); - (void)config_rootfound("mainbus", NULL); + config_rootfound("mainbus", NULL); unmap_startup(); @@ -67,26 +63,12 @@ cpu_configure(void) void diskconf(void) { - size_t len; - char *p; - dev_t tmpdev = NODEV; - int part = 0; +#if defined(NFSCLIENT) extern uint8_t *bootmac; - - if (*boot_file != '\0') - printf("bootfile: %s\n", boot_file); - - if (bootdv == NULL) { - - // boot_file is of the format <device>:/bsd we want the device part - if ((p = strchr(boot_file, ':')) != NULL) - len = p - boot_file; - else - len = strlen(boot_file); - bootdv = parsedisk(boot_file, len, 0, &tmpdev); - if (tmpdev != NODEV) - part = DISKPART(tmpdev); - } + dev_t tmpdev = NODEV; +#endif + struct device *bootdv = NULL; + int part = 0; #if defined(NFSCLIENT) if (bootmac) { @@ -104,11 +86,6 @@ diskconf(void) } #endif - if (bootdv != NULL) - printf("boot device: %s\n", bootdv->dv_xname); - else - printf("boot device: lookup %s failed \n", boot_file); - setroot(bootdv, part, RB_USERREQ); dumpconf(); diff --git a/sys/arch/arm64/arm64/machdep.c b/sys/arch/arm64/arm64/machdep.c index 0b533c08d1d..707288bbbb4 100644 --- a/sys/arch/arm64/arm64/machdep.c +++ b/sys/arch/arm64/arm64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.54 2020/09/11 09:27:10 mpi Exp $ */ +/* $OpenBSD: machdep.c,v 1.55 2020/11/06 13:32:38 patrick Exp $ */ /* * Copyright (c) 2014 Patrick Wildt <patrick@blueri.se> * @@ -56,8 +56,6 @@ #endif char *boot_args = NULL; -char *boot_file = ""; - uint8_t *bootmac = NULL; extern uint64_t esym; @@ -1157,8 +1155,6 @@ process_kernel_args(void) if (*cp == 0) return; - boot_file = bootargs; - /* Skip the kernel image filename */ while (*cp != ' ' && *cp != 0) cp++; @@ -1171,7 +1167,6 @@ process_kernel_args(void) boot_args = cp; - printf("bootfile: %s\n", boot_file); printf("bootargs: %s\n", boot_args); /* Setup pointer to boot flags */ |