From nobody Wed Apr 27 22:09:02 2022 X-Original-To: dev-commits-src-main@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 65DAF1991DBE; Wed, 27 Apr 2022 22:09:03 +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 4KpXvz1DqJz3vRN; Wed, 27 Apr 2022 22:09:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651097343; 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=Vj2pFRjRYzAykuaBk4kEKhs6dGhJF9LcjczBA2HymU4=; b=e6mLNTQgOxf8N4EOhD0qRp73MHCo7xbyW5pAJUKoxYj4oWI3958yi/4q0Ohul8fhIllU1+ vuHgSrOLRogh+ASRla7xlyF+hHcKXso4QEReU0YPKN3oBPW35LcTctYt21LT8kpxRzKBWe GpYt9ecNRsu8va5hz88kAFO0zWq7iwzIBw0YQEbq/6GnSYi425CzTG262DZTqzVvlEetzR 2XgFLD3Y6IEKGKQUuGgMxbvA0UmGnvfa4gLVujlSmJXrnu/8xbsBuk//3+hXhwGSeGLk5z CKJDop1WFc2DqSbfezc7mcl1ew0TLA3IP2MODyu+a9osbLJJhFZST/yQxcW7iw== 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 E7F6F4614; Wed, 27 Apr 2022 22:09:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23RM923P064673; Wed, 27 Apr 2022 22:09:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23RM92dg064672; Wed, 27 Apr 2022 22:09:02 GMT (envelope-from git) Date: Wed, 27 Apr 2022 22:09:02 GMT Message-Id: <202204272209.23RM92dg064672@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e4a38f5407d1 - main - powerpc pseries xics: Use devclass_find to lookup xicp devclass. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4a38f5407d14972b5de750ef067165d6975b4f4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651097343; 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=Vj2pFRjRYzAykuaBk4kEKhs6dGhJF9LcjczBA2HymU4=; b=TGjX2RKwU4S0WxCkJyshfdVNHhtLMlEgZ+hSs+fr3Zbw/Hiwq4KLmJVBMkP0OkjFwR4lCJ VVeJ/zL8bzdWuUUMho7Ewr+ocTvCAPE4cr42HY9mUZw4j+6bLRxWmMSRhjJ5aYYueBwTxn FaRcBBH7eKiPMrKJewKQb1u4sPkiK0rrRhYYaqVqjqNoRLFqaSp970oSsqwMcw7pY87bSQ YRhPPpxFy5hJXNgzEk0IiFPRwG3EzFNd2Ab9JRTOocQ0rq2uWlaIoA+63k640XZygVSxAd Gn7oBhfWD9k2nAUUjVqpfJAGOvZ7VsKocbTk/Y9WP59oCf4+yNc/PHaCkshhrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651097343; a=rsa-sha256; cv=none; b=FVLpwZTqgfvKyaPPHu8ZkYgumF14nIrv+PKnCoB7rZtoFkz7aW5D1puGAFpu/GlsbOSR6I CWSBovME3pCiPkkyaCzWzafmGNYPzOyKLOp2VNniNm8MUb8qzzrPabGccFtRA37MKaC6KP Y6UlW0Dbn2OXW8aKmN1hazkny8laLXbVOpPpi8BGmBOYOaCUroneWopRLYF8vtBwP1nqB2 msH3j/n+4QF8qGUGScXXmfoVwJLSKFeJHo6tLfujimLqdOTDWC6FnUl3z2R3LEz6a4Uewh +JlCOHJmerlJJlHjyKpnxDY36zv4OouIfBTfJ9lil73NSuzxOT8hLdc5rDVhIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e4a38f5407d14972b5de750ef067165d6975b4f4 commit e4a38f5407d14972b5de750ef067165d6975b4f4 Author: John Baldwin AuthorDate: 2022-04-27 22:08:47 +0000 Commit: John Baldwin CommitDate: 2022-04-27 22:08:47 +0000 powerpc pseries xics: Use devclass_find to lookup xicp devclass. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D35083 --- sys/powerpc/pseries/xics.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/powerpc/pseries/xics.c b/sys/powerpc/pseries/xics.c index 393b88976554..b3ddf3f0bf15 100644 --- a/sys/powerpc/pseries/xics.c +++ b/sys/powerpc/pseries/xics.c @@ -167,11 +167,13 @@ EARLY_DRIVER_MODULE(xics, ofwbus, xics_driver, xics_devclass, 0, 0, static struct resource * xicp_mem_for_cpu(int cpu) { + devclass_t dc; device_t dev; struct xicp_softc *sc; int i; - for (i = 0; (dev = devclass_get_device(xicp_devclass, i)) != NULL; i++){ + dc = devclass_find(xicp_driver.name); + for (i = 0; (dev = devclass_get_device(dc, i)) != NULL; i++){ sc = device_get_softc(dev); if (cpu >= sc->cpu_range[0] && cpu < sc->cpu_range[1]) return (sc->mem[cpu - sc->cpu_range[0]]);