mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
misc: nvscic2c-pcie: Drop usage of enum pci_epc_irq_type from Linux 6.8
The enum pci_epc_irq_type is dropped from Linux 6.8 with
commit 74955cb8ccc385 ("PCI: endpoint: Drop PCI_EPC_IRQ_XXX definitions")
Use alternative definition from mainline.
Bug 4448428
Change-Id: Ic248ee2522f171c311ac1086c2792bcf3ad6ed64
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3062520
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
6533bf9268
commit
932f9757ab
@@ -1,8 +1,10 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
// Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
// Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||||
|
|
||||||
#define pr_fmt(fmt) "nvscic2c-pcie: comm-channel: " fmt
|
#define pr_fmt(fmt) "nvscic2c-pcie: comm-channel: " fmt
|
||||||
|
|
||||||
|
#include <nvidia/conftest.h>
|
||||||
|
|
||||||
#include <linux/atomic.h>
|
#include <linux/atomic.h>
|
||||||
#include <linux/dma-fence.h>
|
#include <linux/dma-fence.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
@@ -215,7 +217,11 @@ send_msg(struct comm_channel_ctx_t *comm_ctx, struct comm_msg *msg)
|
|||||||
|
|
||||||
if (peer_cpu == NVCPU_X86_64) {
|
if (peer_cpu == NVCPU_X86_64) {
|
||||||
/* comm-channel irq verctor always take from index 0 */
|
/* comm-channel irq verctor always take from index 0 */
|
||||||
|
#if defined(PCI_EPC_IRQ_TYPE_ENUM_PRESENT) /* Dropped from Linux 6.8 */
|
||||||
ret = pci_client_raise_irq(comm_ctx->pci_client_h, PCI_EPC_IRQ_MSI, 0);
|
ret = pci_client_raise_irq(comm_ctx->pci_client_h, PCI_EPC_IRQ_MSI, 0);
|
||||||
|
#else
|
||||||
|
ret = pci_client_raise_irq(comm_ctx->pci_client_h, PCI_IRQ_MSI, 0);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
/* notify peer for each write.*/
|
/* notify peer for each write.*/
|
||||||
writel(0x1, syncpt->peer_mem.pva);
|
writel(0x1, syncpt->peer_mem.pva);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
// Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
// Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||||
|
|
||||||
#define pr_fmt(fmt) "nvscic2c-pcie: endpoint: " fmt
|
#define pr_fmt(fmt) "nvscic2c-pcie: endpoint: " fmt
|
||||||
|
|
||||||
@@ -501,8 +501,13 @@ ioctl_notify_remote_impl(struct endpoint_t *endpoint)
|
|||||||
return -ENOLINK;
|
return -ENOLINK;
|
||||||
|
|
||||||
if (peer_cpu == NVCPU_X86_64) {
|
if (peer_cpu == NVCPU_X86_64) {
|
||||||
|
#if defined(PCI_EPC_IRQ_TYPE_ENUM_PRESENT) /* Dropped from Linux 6.8 */
|
||||||
ret = pci_client_raise_irq(endpoint->pci_client_h, PCI_EPC_IRQ_MSI,
|
ret = pci_client_raise_irq(endpoint->pci_client_h, PCI_EPC_IRQ_MSI,
|
||||||
endpoint->msi_irq);
|
endpoint->msi_irq);
|
||||||
|
#else
|
||||||
|
ret = pci_client_raise_irq(endpoint->pci_client_h, PCI_IRQ_MSI,
|
||||||
|
endpoint->msi_irq);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Ordering between message/data and host1x syncpoints is not
|
* Ordering between message/data and host1x syncpoints is not
|
||||||
|
|||||||
@@ -810,7 +810,11 @@ pci_client_get_edma_rx_desc_iova(void *pci_client_h)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
#if defined(PCI_EPC_IRQ_TYPE_ENUM_PRESENT) /* Dropped from Linux 6.8 */
|
||||||
pci_client_raise_irq(void *pci_client_h, enum pci_epc_irq_type type, u16 num)
|
pci_client_raise_irq(void *pci_client_h, enum pci_epc_irq_type type, u16 num)
|
||||||
|
#else
|
||||||
|
pci_client_raise_irq(void *pci_client_h, int type, u16 num)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct pci_client_t *pci_client_ctx = (struct pci_client_t *)pci_client_h;
|
struct pci_client_t *pci_client_ctx = (struct pci_client_t *)pci_client_h;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
#ifndef __PCI_CLIENT_H__
|
#ifndef __PCI_CLIENT_H__
|
||||||
#define __PCI_CLIENT_H__
|
#define __PCI_CLIENT_H__
|
||||||
|
|
||||||
|
#include <nvidia/conftest.h>
|
||||||
|
|
||||||
#include <uapi/misc/nvscic2c-pcie-ioctl.h>
|
#include <uapi/misc/nvscic2c-pcie-ioctl.h>
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
@@ -133,5 +135,9 @@ pci_client_get_edma_rx_desc_iova(void *pci_client_h);
|
|||||||
|
|
||||||
/* pci client raise irq to rp */
|
/* pci client raise irq to rp */
|
||||||
int
|
int
|
||||||
|
#if defined(PCI_EPC_IRQ_TYPE_ENUM_PRESENT) /* Dropped from Linux 6.8 */
|
||||||
pci_client_raise_irq(void *pci_client_h, enum pci_epc_irq_type type, u16 num);
|
pci_client_raise_irq(void *pci_client_h, enum pci_epc_irq_type type, u16 num);
|
||||||
|
#else
|
||||||
|
pci_client_raise_irq(void *pci_client_h, int type, u16 num);
|
||||||
|
#endif
|
||||||
#endif // __PCI_CLIENT_H__
|
#endif // __PCI_CLIENT_H__
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
* PCIe DMA EPF test framework for Tegra PCIe
|
* PCIe DMA EPF test framework for Tegra PCIe
|
||||||
*
|
*
|
||||||
* Copyright (C) 2021-2023 NVIDIA Corporation. All rights reserved.
|
* Copyright (C) 2021-2024 NVIDIA Corporation. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <nvidia/conftest.h>
|
#include <nvidia/conftest.h>
|
||||||
@@ -73,7 +73,11 @@ static void edma_lib_test_raise_irq(void *p)
|
|||||||
{
|
{
|
||||||
struct pcie_epf_dma *epfnv = (struct pcie_epf_dma *)p;
|
struct pcie_epf_dma *epfnv = (struct pcie_epf_dma *)p;
|
||||||
|
|
||||||
|
#if defined(PCI_EPC_IRQ_TYPE_ENUM_PRESENT) /* Dropped from Linux 6.8 */
|
||||||
lpci_epc_raise_irq(epfnv->epc, epfnv->epf->func_no, PCI_EPC_IRQ_MSI, 1);
|
lpci_epc_raise_irq(epfnv->epc, epfnv->epf->func_no, PCI_EPC_IRQ_MSI, 1);
|
||||||
|
#else
|
||||||
|
lpci_epc_raise_irq(epfnv->epc, epfnv->epf->func_no, PCI_IRQ_MSI, 1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* debugfs to perform eDMA lib transfers and do CRC check */
|
/* debugfs to perform eDMA lib transfers and do CRC check */
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epc_event_ops_struct_has_core_deinit
|
|||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_disable_pcie_error_reporting
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_disable_pcie_error_reporting
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_enable_pcie_error_reporting
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_enable_pcie_error_reporting
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epf_driver_struct_probe_has_id_arg
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epf_driver_struct_probe_has_id_arg
|
||||||
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epc_irq_type_enum_present
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += register_shrinker_has_fmt_arg
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += register_shrinker_has_fmt_arg
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += shrinker_alloc
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += shrinker_alloc
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_card_jack_new_has_no_snd_soc_jack_pins
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_card_jack_new_has_no_snd_soc_jack_pins
|
||||||
|
|||||||
@@ -7300,7 +7300,20 @@ compile_test() {
|
|||||||
|
|
||||||
compile_check_conftest "$CODE" "NV_PCI_EPF_DRIVER_STRUCT_PROBE_HAS_ID_ARG" "" "functions"
|
compile_check_conftest "$CODE" "NV_PCI_EPF_DRIVER_STRUCT_PROBE_HAS_ID_ARG" "" "functions"
|
||||||
;;
|
;;
|
||||||
|
pci_epc_irq_type_enum_present)
|
||||||
|
#
|
||||||
|
# Determine if the pci_epc_irq_type enum present or not.
|
||||||
|
#
|
||||||
|
# In Linux v6.8, the enum pci_epc_irq_type is dropped from
|
||||||
|
# commit 74955cb8ccc385 ("PCI: endpoint: Drop PCI_EPC_IRQ_XXX definitions")
|
||||||
|
#
|
||||||
|
CODE="
|
||||||
|
#include <linux/pci-epc.h>
|
||||||
|
enum pci_epc_irq_type irq_type;
|
||||||
|
"
|
||||||
|
|
||||||
|
compile_check_conftest "$CODE" "PCI_EPC_IRQ_TYPE_ENUM_PRESENT" "" "types"
|
||||||
|
;;
|
||||||
register_shrinker_has_fmt_arg)
|
register_shrinker_has_fmt_arg)
|
||||||
#
|
#
|
||||||
# Determine if the 'register_shrinker' function
|
# Determine if the 'register_shrinker' function
|
||||||
|
|||||||
Reference in New Issue
Block a user