Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp179486pxb; Thu, 12 Aug 2021 13:45:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvVayCKvxsUrO7/TBwbZJhh6y5a3KAESS9SlhJVxQsgzLGAkhfUqv+Vur6g4DvqPKuLq89 X-Received: by 2002:aa7:c042:: with SMTP id k2mr7982901edo.104.1628801108192; Thu, 12 Aug 2021 13:45:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628801108; cv=none; d=google.com; s=arc-20160816; b=V1glto8PcWZ+4IROLO81M4oaKJc4E8IM+Ss1ZxJyhdXq0NgdAStrXOOJC2BcQKi90V dFKNSWVboMEFQryhv80enJDFUzNswfzIpak1zzY9nkAkCLIIkXIuLMXv39epH4HQZTlN LRPIqOFtN7DXv8zoO7hQzRxTDPKZWP9xLuiNoWw5KhYSiuN3RldkTp9myFuOcvmd6KMx VKnXhq27quc0/KQlpj24tSsmyTRI+AXxtnXk/5sVRfARrlwMpgnj+Rc3Be07+PRYchCZ MpUX+ex4QXMBBiKHQQaBO8K4ikgqfrfelu/JGYtML9e8or0yC9rnvouOE7A0DczYR/MX tE6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=Ogxhn2VZZzzS9gmcvoL/kp6A7NKwaNbxJrWjIf/bfCk=; b=t2ZR63yyJLhr++I+ZCdnrOF/Eb9kVfN5IpHI5sIryjQW5i6ncc+BxJraDcguf6pmmt 938e39rgidCRU5f+mbX1hWA945p2d0r50IYfJu8XdMNWUXh12f5J5ZHvX2KDaExbjNNP gXR7zxNK6FsusrktrtPt9+EIZ9u5mCqeBMrUrZgw9QjU2BznOHFgs0cYuy87E66hKzKj Q0mRFbwP4nO3Y4wzFf7MvmVyhdJmYxnDZlyrsUJ2w6AKrj79CFQ+aVRrMrkb1KptbPj3 AKST9/jKmNa28fLwRe1w2G7Ksomtev/gO6DsRt21hkTsd3Cr38B2TxFXxL6IWFEPw8IS M8dA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eb13si4393272edb.470.2021.08.12.13.44.44; Thu, 12 Aug 2021 13:45:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237100AbhHLUW1 (ORCPT + 99 others); Thu, 12 Aug 2021 16:22:27 -0400 Received: from mga03.intel.com ([134.134.136.65]:4154 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236956AbhHLUWZ (ORCPT ); Thu, 12 Aug 2021 16:22:25 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10074"; a="215474039" X-IronPort-AV: E=Sophos;i="5.84,316,1620716400"; d="scan'208";a="215474039" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2021 13:21:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,316,1620716400"; d="scan'208";a="517608642" Received: from silpixa00400314.ir.intel.com (HELO silpixa00400314.ger.corp.intel.com) ([10.237.222.51]) by FMSMGA003.fm.intel.com with ESMTP; 12 Aug 2021 13:21:57 -0700 From: Giovanni Cabiddu To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Marco Chiappero , Giovanni Cabiddu , Fiona Trahe Subject: [PATCH 11/20] crypto: qat - move pf2vf interrupt [en|dis]able to adf_vf_isr.c Date: Thu, 12 Aug 2021 21:21:20 +0100 Message-Id: <20210812202129.18831-12-giovanni.cabiddu@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210812202129.18831-1-giovanni.cabiddu@intel.com> References: <20210812202129.18831-1-giovanni.cabiddu@intel.com> MIME-Version: 1.0 Organization: Intel Research and Development Ireland Ltd - Co. Reg. #308263 - Collinstown Industrial Park, Leixlip, County Kildare - Ireland Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Marco Chiappero Interrupt code to enable interrupts from PF does not belong to the protocol code, so move it to the interrupt handling specific file for better code organization. Signed-off-by: Marco Chiappero Co-developed-by: Giovanni Cabiddu Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe --- drivers/crypto/qat/qat_common/adf_pf2vf_msg.c | 20 ------------------- drivers/crypto/qat/qat_common/adf_vf_isr.c | 20 +++++++++++++++++++ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c b/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c index d42461cb611f..0a927ed91b19 100644 --- a/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c +++ b/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c @@ -11,26 +11,6 @@ #define ADF_DH895XCC_ERRMSK5 (ADF_DH895XCC_EP_OFFSET + 0xDC) #define ADF_DH895XCC_ERRMSK5_VF2PF_U_MASK(vf_mask) (vf_mask >> 16) -void adf_enable_pf2vf_interrupts(struct adf_accel_dev *accel_dev) -{ - struct adf_accel_pci *pci_info = &accel_dev->accel_pci_dev; - struct adf_hw_device_data *hw_data = accel_dev->hw_device; - void __iomem *pmisc_bar_addr = - pci_info->pci_bars[hw_data->get_misc_bar_id(hw_data)].virt_addr; - - ADF_CSR_WR(pmisc_bar_addr, hw_data->get_vintmsk_offset(0), 0x0); -} - -void adf_disable_pf2vf_interrupts(struct adf_accel_dev *accel_dev) -{ - struct adf_accel_pci *pci_info = &accel_dev->accel_pci_dev; - struct adf_hw_device_data *hw_data = accel_dev->hw_device; - void __iomem *pmisc_bar_addr = - pci_info->pci_bars[hw_data->get_misc_bar_id(hw_data)].virt_addr; - - ADF_CSR_WR(pmisc_bar_addr, hw_data->get_vintmsk_offset(0), 0x2); -} - void adf_enable_vf2pf_interrupts(struct adf_accel_dev *accel_dev, u32 vf_mask) { diff --git a/drivers/crypto/qat/qat_common/adf_vf_isr.c b/drivers/crypto/qat/qat_common/adf_vf_isr.c index 4359ca633ea9..aa44e8638fa8 100644 --- a/drivers/crypto/qat/qat_common/adf_vf_isr.c +++ b/drivers/crypto/qat/qat_common/adf_vf_isr.c @@ -29,6 +29,26 @@ struct adf_vf_stop_data { struct work_struct work; }; +void adf_enable_pf2vf_interrupts(struct adf_accel_dev *accel_dev) +{ + struct adf_accel_pci *pci_info = &accel_dev->accel_pci_dev; + struct adf_hw_device_data *hw_data = accel_dev->hw_device; + void __iomem *pmisc_bar_addr = + pci_info->pci_bars[hw_data->get_misc_bar_id(hw_data)].virt_addr; + + ADF_CSR_WR(pmisc_bar_addr, hw_data->get_vintmsk_offset(0), 0x0); +} + +void adf_disable_pf2vf_interrupts(struct adf_accel_dev *accel_dev) +{ + struct adf_accel_pci *pci_info = &accel_dev->accel_pci_dev; + struct adf_hw_device_data *hw_data = accel_dev->hw_device; + void __iomem *pmisc_bar_addr = + pci_info->pci_bars[hw_data->get_misc_bar_id(hw_data)].virt_addr; + + ADF_CSR_WR(pmisc_bar_addr, hw_data->get_vintmsk_offset(0), 0x2); +} + static int adf_enable_msi(struct adf_accel_dev *accel_dev) { struct adf_accel_pci *pci_dev_info = &accel_dev->accel_pci_dev; -- 2.31.1