From nobody Sat Sep 07 01:47:58 2024 X-Original-To: dev-commits-src-branches@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 4X0wwG5Rvhz5WSdK; Sat, 07 Sep 2024 01:47:58 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X0wwG31sPz4k21; Sat, 7 Sep 2024 01:47:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725673678; 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=Vhj0bfgoFeq88GTrGWKRJZWKEzIkBEGjO8WaDZdhjr8=; b=un/twUGZy7DhJpenPQ52TppT9HbPaoQqMC+Tinvd7rriBiyV3h3lS6xJ6+ThF9jTrCC4Vm o+RxLZvZws/XecV657njKm/GMQKOKLkB1SBzeAGkkmzQWYDSAZ0kxdVRYjrmCH8NYNkSCE awWyuRdziUnlnuGocACTdm9pgRTC/a4POZ9Ei6nQrz3siK3Ls0kKKx1gmvoQOlFENzCQ15 ZQrpTDdQCoDTFuI57re7pPA61u65eVNBnM0h5JNbqz/fpLN3QfRBEPemk4TiL20RQ63GjU MejLbo21sbd8kxN+mxwHQLVsSSm52+r3ZBnNV2cwYSrJ9+n5gfC0BTFOuvnBUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725673678; a=rsa-sha256; cv=none; b=YMhN3INDEGT2jit5VcnWTSCwbX+B6Vnn+HyxYSYX66DDb63UGLrotZ/xtbR8oSsMftzSWF khbJcQaL7N8/DKEFhLnxuHp0oT3AeOnVyN5OGIGCZnObNkS/wA7X+RxvvJ7BqTAqWZ3/gS RucB8SMZgW1lBklJ3jzhwvJ+Rw9TG4dCjifkur4vbttHySeYPSIiYIbaqlRdqyOJtvzTs1 A9EqLTZI2ZI+zoDfdfn3ebbLgBEG1Yxy9Em1Gh9ENAU1VwZuYohP/EdNE3cu/ex++iwnD2 8fIRtNMgs09QrJLG7TZu2ilR77/N1PgJka0ZI+zgSRd2H4QFpUEM/m4GvnGoXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725673678; 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=Vhj0bfgoFeq88GTrGWKRJZWKEzIkBEGjO8WaDZdhjr8=; b=vsdYSaF5LipmKgXAK+Z+OFR4peADvd7Xk11emnDcvMkxenb8KJ7o3cAaIcF6iUk9W/kBqz Ep7T6UwW6Ryyock+kZ9cKEshsaRzjzfBY1Nu8QeSRhArf9OOQqYuSPm1tsOjPZmrL1XwCI r/43vwm4YkdMJ9k5cWfluimV4smOt/EUPpo6Un6Heq8bjSmlYTUFsDHP5h/a5lRE5RVwVe 4L7mEmZbBhjn3LwuDk9E7SkmhAmD41kTbOXxmpC4+FbaRUCsr8HvuaKccjZ/acuyzimGeQ Spdxa+MtGQQklLkqlo7CsQ70L32VYBe0PIrk4sJMrv7xrguhXEYWer8Ik7lQAg== 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 4X0wwG2dRszGM7; Sat, 7 Sep 2024 01:47:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4871lwNJ041634; Sat, 7 Sep 2024 01:47:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4871lw8V041631; Sat, 7 Sep 2024 01:47:58 GMT (envelope-from git) Date: Sat, 7 Sep 2024 01:47:58 GMT Message-Id: <202409070147.4871lw8V041631@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jessica Clarke Subject: git: 9f224d3ec46e - stable/14 - riscv: Remove the unused riscv64_cpu driver List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 9f224d3ec46ef822165df35990f96c6e7c6b67c8 Auto-Submitted: auto-generated The branch stable/14 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=9f224d3ec46ef822165df35990f96c6e7c6b67c8 commit 9f224d3ec46ef822165df35990f96c6e7c6b67c8 Author: Jessica Clarke AuthorDate: 2024-01-30 20:33:30 +0000 Commit: Jessica Clarke CommitDate: 2024-09-07 00:00:40 +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 (cherry picked from commit 722b40377198e384a808f9561ae7262767068ab2) --- 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 2d68675f21aa..641288e0b235 100644 --- a/sys/riscv/riscv/mp_machdep.c +++ b/sys/riscv/riscv/mp_machdep.c @@ -80,10 +80,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 *); @@ -96,7 +92,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); @@ -116,77 +111,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) {