From nobody Fri May 31 19:18:10 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 4VrXvl0v2Dz5LCrF; Fri, 31 May 2024 19:18:11 +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 4VrXvk6zPLz4KQQ; Fri, 31 May 2024 19:18:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717183091; 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=a//h7UgvVC75zknVUcGwSfj4jUqDsLBxh1FO7DVycgE=; b=dAvhJj+cAPsUmiJ418SQe49xTqUkI2UaKboLUoVtM4Dz75CovhjNvC9HKJnWBpRpiG0Ep+ LA+YSp/pLJuNmLMui2kbWjrxYy2oGWMsNf50+iqLHFAV9lUh1cMSjjKfNQXF+3MUmT20ba kMX2rfwp57xijmHehm7w3XU/nC1Ac81nOFSm6mcVjXWzZHqAb1a0rKhmSbi03Nk1A2+szo 1KID1ZH49fMwZGuR2ubst889uusBw9N+c5t24fH1k7pVEqB1eg+gUm7FmA7eSyO4/QpzYB yvYoW+zf7jI0IB0G08p/KmL8Dioxde4Jutu9Uv5/0eMmlVCDfWLFNbExM4mfHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717183091; a=rsa-sha256; cv=none; b=cNKbP+sNm6cubtHkCwobvakcTZqJiwUkZhIsY6PMe3lZ9JRfx/wrh12Yn625YR0eKS0W9x 6i676PnnZmYmjArsJHx6f3bs1EegjWL1g5C/g5xxMgT9Cecvw1PtNe6HK8QyZJDf0TuKmG BMX4jXb9tRGU/M6MJBFqqlaEWmtHzZQlToRhmdpTDs8mYaZ/43SLFoCaIalqr9rMQhgtqR XBLJDRoDob1cyLKhw5Wlc/ZRxWU55ffv+oiTRcJ/MPoZhyak1D2wJIm6zTnagVteAXjQ8l 6R3vTCIJVuwFdVBUpAQB6P2MHt34pjfhnyznr7Za4PApTlFE00F+hS75Nkqo9g== 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=1717183091; 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=a//h7UgvVC75zknVUcGwSfj4jUqDsLBxh1FO7DVycgE=; b=OyyZEUFVHu6W8X8PhrIiZO5LRXy5ps8pBgJEIT0T6TMNQ6MH91+xoA6tnKTBMN1j3cXVMw kYErYYupYrfyTvSk96VQ/7Niv7C7HNdwMU2FZm1vPvV9+HRmwFHRl8G/uwclNnKdHp3OR4 TznImuH/GndKE0qqhHqPqcc+PYYmGNiGAOvdYFugJAIfCygqk8MjU3b8r1NzQGjiAgr13T x8LYgDnsB3oPO1XUI7K4pfnHC1OnlyGf/hlYIVJ2vs4HiD/WZXXOz1Ech4yXM+8PtH8ErL YISDC/tAR4aY45pZXUEB0DTlWxVuBjjYLirtlL7zlty6IFArSMrtHTxkDyus4A== 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 4VrXvk6bYCzcSM; Fri, 31 May 2024 19:18:10 +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 44VJIA8H034567; Fri, 31 May 2024 19:18:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44VJIANN034564; Fri, 31 May 2024 19:18:10 GMT (envelope-from git) Date: Fri, 31 May 2024 19:18:10 GMT Message-Id: <202405311918.44VJIANN034564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 164fdee11164 - main - Intel DMAR: remove the 'dev' member 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 164fdee11164e9a43e279f9e45117e7573ddc15f Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=164fdee11164e9a43e279f9e45117e7573ddc15f commit 164fdee11164e9a43e279f9e45117e7573ddc15f Author: Konstantin Belousov AuthorDate: 2024-05-30 14:05:22 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-31 19:10:39 +0000 Intel DMAR: remove the 'dev' member It duplicates iommu.dev, and was forgotten when struct iommu was split out from dmar. Sponsored by: The FreeBSD Foundation Sponsored by: AMD dvanced Micro Devices (AMD) MFC after: 1 week --- sys/x86/iommu/intel_dmar.h | 1 - sys/x86/iommu/intel_drv.c | 1 - sys/x86/iommu/intel_intrmap.c | 4 ++-- sys/x86/iommu/intel_quirks.c | 7 ++++--- sys/x86/iommu/intel_utils.c | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/sys/x86/iommu/intel_dmar.h b/sys/x86/iommu/intel_dmar.h index 8289478aed19..b7f0300e16f0 100644 --- a/sys/x86/iommu/intel_dmar.h +++ b/sys/x86/iommu/intel_dmar.h @@ -123,7 +123,6 @@ struct dmar_msi_data { struct dmar_unit { struct iommu_unit iommu; - device_t dev; uint16_t segment; uint64_t base; diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index 9a2fedf90b6a..0b25620114cd 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -410,7 +410,6 @@ dmar_attach(device_t dev) int i, error; unit = device_get_softc(dev); - unit->dev = dev; unit->iommu.unit = device_get_unit(dev); unit->iommu.dev = dev; dmaru = dmar_find_by_index(unit->iommu.unit); diff --git a/sys/x86/iommu/intel_intrmap.c b/sys/x86/iommu/intel_intrmap.c index 035de24a2d4e..66238b46c25e 100644 --- a/sys/x86/iommu/intel_intrmap.c +++ b/sys/x86/iommu/intel_intrmap.c @@ -271,7 +271,7 @@ dmar_ir_program_irte(struct dmar_unit *unit, u_int idx, uint64_t low, high = DMAR_IRTE2_SVT_RID | DMAR_IRTE2_SQ_RID | DMAR_IRTE2_SID_RID(rid); if (bootverbose) { - device_printf(unit->dev, + device_printf(unit->iommu.dev, "programming irte[%d] rid %#x high %#jx low %#jx\n", idx, rid, (uintmax_t)high, (uintmax_t)low); } @@ -335,7 +335,7 @@ dmar_init_irt(struct dmar_unit *unit) if (!unit->qi_enabled) { unit->ir_enabled = 0; if (bootverbose) - device_printf(unit->dev, + device_printf(unit->iommu.dev, "QI disabled, disabling interrupt remapping\n"); return (0); } diff --git a/sys/x86/iommu/intel_quirks.c b/sys/x86/iommu/intel_quirks.c index fd5c522d588d..751237a3ab54 100644 --- a/sys/x86/iommu/intel_quirks.c +++ b/sys/x86/iommu/intel_quirks.c @@ -108,7 +108,7 @@ dmar_match_quirks(struct dmar_unit *dmar, (nb_quirk->rev_no == rev_no || nb_quirk->rev_no == QUIRK_NB_ALL_REV)) { if (bootverbose) { - device_printf(dmar->dev, + device_printf(dmar->iommu.dev, "NB IOMMU quirk %s\n", nb_quirk->descr); } @@ -116,7 +116,8 @@ dmar_match_quirks(struct dmar_unit *dmar, } } } else { - device_printf(dmar->dev, "cannot find northbridge\n"); + device_printf(dmar->iommu.dev, + "cannot find northbridge\n"); } } if (cpu_quirks != NULL) { @@ -135,7 +136,7 @@ dmar_match_quirks(struct dmar_unit *dmar, (cpu_quirk->stepping == -1 || cpu_quirk->stepping == stepping)) { if (bootverbose) { - device_printf(dmar->dev, + device_printf(dmar->iommu.dev, "CPU IOMMU quirk %s\n", cpu_quirk->descr); } diff --git a/sys/x86/iommu/intel_utils.c b/sys/x86/iommu/intel_utils.c index 356b8d5e6436..a96f65fddfc5 100644 --- a/sys/x86/iommu/intel_utils.c +++ b/sys/x86/iommu/intel_utils.c @@ -136,7 +136,7 @@ domain_set_agaw(struct dmar_domain *domain, int mgaw) return (0); } } - device_printf(domain->dmar->dev, + device_printf(domain->dmar->iommu.dev, "context request mgaw %d: no agaw found, sagaw %x\n", mgaw, sagaw); return (EINVAL);