Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3610496pxb; Mon, 24 Jan 2022 13:28:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzyxhRYLf9LfItaemY5Yjd2tf/2lMOvYVjK6/LN6EXBKpn36PXNZz56JEx+falUePfXgc1I X-Received: by 2002:a17:902:bc82:b0:148:eb68:f6dd with SMTP id bb2-20020a170902bc8200b00148eb68f6ddmr16105279plb.98.1643059733526; Mon, 24 Jan 2022 13:28:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643059733; cv=none; d=google.com; s=arc-20160816; b=CAX1UN0XToIHYN6K6FyeVYPVoeiV2Z7VlejQ4MUHqxIOI7BzqIhzB8K7ele55ioqLG 5MiQbmdsuxQxwgzBwlHZj3WVEgKd9s5SVaOEeDxQd/3SR0bX4CDN6HaTXcs4S/jIBw+T +JhGiw/L3XN8U6rYq5J0kF7rldmHqQPBsBY2iTEVvWH1SUw04vjekDwRAm+moDiKA4Ur ZX/bqKi/9lVb9oKRGgtcWKGTWy5zybET8x/ahvgi4xNq6CUbm1xn/D0n3SxLkBAHdm3E XwGL+V0KThHlG7jco/TmBnoasGNaALGqgHtkN3yHjWBcLLB9BNN+0HI3W57Zhx3GTmAt fqiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Q8t61AYmKrxLv1PelpKGCsLjWs+XnyC+/XdHxrBHT6Y=; b=yAYbJYc5yzKyU7Ji96mJ7pCr+7oc6K+YkGXdSwKr+EcGjh0Hm9u1Y3mUKpVp3jG9az Y/C53/+fgnm7uLb3vjQZ7TTuPXX3rAr99Wsl7HE+oKijIIQ12SwiZ/tnk2N6q83B9sHH ucua/3RZoKvg+6xf5rKdENH/NlUV3x/d6XpJzi6xn9xZrZzW+saEDxRU28dzoten2+1E ih0h02hr35d8C8/70lUSx5qV7EAk+EO2CY+wFdB2FLy+ukO0U1X2T1C1lwQLQtpQR3zT kXnVSuwi7F5biB4OSbBYhyxXsnwEZHoAm7O5ngeLtihE/AaF9mNisXDML+JZ6O82ZdT0 xAow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h7GZumRp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j9si15415317plx.86.2022.01.24.13.28.39; Mon, 24 Jan 2022 13:28:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h7GZumRp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352899AbiAXVHg (ORCPT + 99 others); Mon, 24 Jan 2022 16:07:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1390178AbiAXUpD (ORCPT ); Mon, 24 Jan 2022 15:45:03 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8279C06138E; Mon, 24 Jan 2022 11:55:00 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 55BE760989; Mon, 24 Jan 2022 19:55:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E2E1C340E5; Mon, 24 Jan 2022 19:54:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643054099; bh=KuJpflFQSegupwZxZ5OZ91OVC0jVZr/s65fvB8KorQc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h7GZumRpUpyLpt2s41trLYGjETyB9EgLCI+rfyjH75caoZ+aBebafAGx/atOjhV9l 8sMR4cX6JmrtufxPMiwYyIHhoCaEQEk8ur9gu48POdt5LoTa63T2dA7pjxSmrV8+3V Avizt1S9yP+i0EyL4X+P+49jBRh/FerUKA4jr7tg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Suravee Suthikulpanit , Joerg Roedel , Sasha Levin Subject: [PATCH 5.10 277/563] iommu/amd: Remove iommu_init_ga() Date: Mon, 24 Jan 2022 19:40:42 +0100 Message-Id: <20220124184034.018563907@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184024.407936072@linuxfoundation.org> References: <20220124184024.407936072@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Suravee Suthikulpanit [ Upstream commit eb03f2d2f6a4da25d286613717d10add9ce9f175 ] Since the function has been simplified and only call iommu_init_ga_log(), remove the function and replace with iommu_init_ga_log() instead. Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20210820202957.187572-4-suravee.suthikulpanit@amd.com Fixes: 8bda0cfbdc1a ("iommu/amd: Detect and initialize guest vAPIC log") Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin --- drivers/iommu/amd/init.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index 28de889aa5164..c82f8ab4783c0 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -830,9 +830,9 @@ static int iommu_ga_log_enable(struct amd_iommu *iommu) return 0; } -#ifdef CONFIG_IRQ_REMAP static int iommu_init_ga_log(struct amd_iommu *iommu) { +#ifdef CONFIG_IRQ_REMAP u64 entry; if (!AMD_IOMMU_GUEST_IR_VAPIC(amd_iommu_guest_ir)) @@ -862,18 +862,9 @@ static int iommu_init_ga_log(struct amd_iommu *iommu) err_out: free_ga_log(iommu); return -EINVAL; -} -#endif /* CONFIG_IRQ_REMAP */ - -static int iommu_init_ga(struct amd_iommu *iommu) -{ - int ret = 0; - -#ifdef CONFIG_IRQ_REMAP - ret = iommu_init_ga_log(iommu); +#else + return 0; #endif /* CONFIG_IRQ_REMAP */ - - return ret; } static int __init alloc_cwwb_sem(struct amd_iommu *iommu) @@ -1860,7 +1851,7 @@ static int __init iommu_init_pci(struct amd_iommu *iommu) if (iommu_feature(iommu, FEATURE_PPR) && alloc_ppr_log(iommu)) return -ENOMEM; - ret = iommu_init_ga(iommu); + ret = iommu_init_ga_log(iommu); if (ret) return ret; -- 2.34.1