From nobody Tue Jan 30 20:33:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TPcML4jV0z59W23; Tue, 30 Jan 2024 20:33:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TPcML4C7bz4kCm; Tue, 30 Jan 2024 20:33:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706646830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YBpliP+cNWTE5EPh5H5nfigAQfBUUg/+6u+EpPOagok=; b=LiauAWBw3BnPdW5shrjo5zTk3+/2P+PIPzehhppMww62g+q2/0FoD6ejYlCuiKku8yjlKK /DwUnTZG2vd1v/DkhWXjoMaeHAJ6zTB6vWY/14070rIigYABvKJ1DoZ3kWKQ7b0PVGEst4 /+XVsXGmVtt9Po5+9WB8h1zpJTWFKN9Bv9TrETqJv2MyCWeHbtP+EIvrciicH6yZTwHRlq 0XyqTNK4qkqFkoKi4z4glzkJbDdCwcl7zAlTgl28V0sXnSdHYXseRKTEqoJGQ2mWLdUJIT zG9+hzkRGY0htyCZNg+O3wGvW9WZWj5APH0n2R8lu3n0xw1cJFYMXhcorkIy6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706646830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YBpliP+cNWTE5EPh5H5nfigAQfBUUg/+6u+EpPOagok=; b=ggt2ExPRb58eH4Q6sUMQpiJIpx5PYgeTE5jkakmgyYPzx8vbj0+PvwByxDExJYBv4b0mSx G7739crMDnarw6PSGuHcJkEmvcsKXIM4EMI+WFlFaMH6n/1c3gBbvs4ST/lQwQfjbrilpB UBSP6lNTILwUdinyWdletfVwsl21dCvdmOYjx7FeTFp0J25VphGtfwsg7YuQ6DiTnyAUyv hUDRQhxdwGkitrLI0GPNOv0u+okUCCXSJ/JCChtj5ic2sOwEfb2zKKPul7uuZaPLtE50oK UvGdTrnvVQo/Z2NKMgycvku/vD15D0lJ2ua9D+lFXVM+Okejz/djBlfiCt81lA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706646830; a=rsa-sha256; cv=none; b=trwZAB5EZGXnmVNKBiAXNFD3WHnTNfPN5nk+dDK3TpelXV8H+YDqUhrmh/EZJ1fdZcgORZ bxuRR8u8hNfSreucjqkGa6w7Qf7wvPKsfQWyDPM7J7LZM3CtRGWRanOVaKvdnp19Z3I0vY qncBBx4nD3sCoZfX6suHxRSXEVGzLD+9+ZUirKApwkICdTVDeB0oboKAgiRg1ZIen/uUyv rVLGafkE4y8m6PZoTSKIcUly3P4DdL06580VnfeyQ6GZmY0mijKfTKx1L8BUDp9K6skiTT utFZvQwH0HyWUsWyxXxMzg6aU2DvaWiE2iYcZo3F+teK7M+VHnggqqSEDl8QSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TPcML3FS6zqVl; Tue, 30 Jan 2024 20:33:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40UKXoj3038451; Tue, 30 Jan 2024 20:33:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40UKXouf038448; Tue, 30 Jan 2024 20:33:50 GMT (envelope-from git) Date: Tue, 30 Jan 2024 20:33:50 GMT Message-Id: <202401302033.40UKXouf038448@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 722b40377198 - main - riscv: Remove the unused riscv64_cpu driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 722b40377198e384a808f9561ae7262767068ab2 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=722b40377198e384a808f9561ae7262767068ab2 commit 722b40377198e384a808f9561ae7262767068ab2 Author: Jessica Clarke AuthorDate: 2024-01-30 20:33:30 +0000 Commit: Jessica Clarke CommitDate: 2024-01-30 20:33:30 +0000 riscv: Remove the unused riscv64_cpu driver This is a repeat of 63bf2d735ca3 ("Remove the unused arm64_cpu driver.") for RISC-V, which copied the defunct code from arm64 with no changes beyond substituting riscv64 for arm64, and made no use of it elsewhere. It has thus always been entirely superfluous. Reviewed by: mhorne MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43672 --- sys/riscv/riscv/mp_machdep.c | 76 -------------------------------------------- 1 file changed, 76 deletions(-) diff --git a/sys/riscv/riscv/mp_machdep.c b/sys/riscv/riscv/mp_machdep.c index be5c50485bf4..0e4d18ce47fb 100644 --- a/sys/riscv/riscv/mp_machdep.c +++ b/sys/riscv/riscv/mp_machdep.c @@ -79,10 +79,6 @@ static enum { #endif } cpu_enum_method; -static device_identify_t riscv64_cpu_identify; -static device_probe_t riscv64_cpu_probe; -static device_attach_t riscv64_cpu_attach; - static void ipi_ast(void *); static void ipi_hardclock(void *); static void ipi_preempt(void *); @@ -95,7 +91,6 @@ extern cpuset_t all_harts; #ifdef INVARIANTS static uint32_t cpu_reg[MAXCPU][2]; #endif -static device_t cpu_list[MAXCPU]; void mpentry(u_long hartid); void init_secondary(uint64_t); @@ -115,77 +110,6 @@ static volatile int aps_ready; /* Temporary variables for init_secondary() */ void *dpcpu[MAXCPU - 1]; -static device_method_t riscv64_cpu_methods[] = { - /* Device interface */ - DEVMETHOD(device_identify, riscv64_cpu_identify), - DEVMETHOD(device_probe, riscv64_cpu_probe), - DEVMETHOD(device_attach, riscv64_cpu_attach), - - DEVMETHOD_END -}; - -static driver_t riscv64_cpu_driver = { - "riscv64_cpu", - riscv64_cpu_methods, - 0 -}; - -DRIVER_MODULE(riscv64_cpu, cpu, riscv64_cpu_driver, 0, 0); - -static void -riscv64_cpu_identify(driver_t *driver, device_t parent) -{ - - if (device_find_child(parent, "riscv64_cpu", -1) != NULL) - return; - if (BUS_ADD_CHILD(parent, 0, "riscv64_cpu", -1) == NULL) - device_printf(parent, "add child failed\n"); -} - -static int -riscv64_cpu_probe(device_t dev) -{ - u_int cpuid; - - cpuid = device_get_unit(dev); - if (cpuid >= MAXCPU || cpuid > mp_maxid) - return (EINVAL); - - device_quiet(dev); - return (0); -} - -static int -riscv64_cpu_attach(device_t dev) -{ - const uint32_t *reg; - size_t reg_size; - u_int cpuid; - int i; - - cpuid = device_get_unit(dev); - - if (cpuid >= MAXCPU || cpuid > mp_maxid) - return (EINVAL); - KASSERT(cpu_list[cpuid] == NULL, ("Already have cpu %u", cpuid)); - - reg = cpu_get_cpuid(dev, ®_size); - if (reg == NULL) - return (EINVAL); - - if (bootverbose) { - device_printf(dev, "register <"); - for (i = 0; i < reg_size; i++) - printf("%s%x", (i == 0) ? "" : " ", reg[i]); - printf(">\n"); - } - - /* Set the device to start it later */ - cpu_list[cpuid] = dev; - - return (0); -} - static void release_aps(void *dummy __unused) {