From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 06656A00C4; Fri, 16 Dec 2022 12:57:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E6D3442D22; Fri, 16 Dec 2022 12:57:52 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2043.outbound.protection.outlook.com [40.107.243.43]) by mails.dpdk.org (Postfix) with ESMTP id 3026B42D15 for ; Fri, 16 Dec 2022 12:57:52 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YGza/9S7yT6IBwVodbn12bwqFTdIgEHDf/m9FRtTbQKQ1i3QNj88IJq2JUG+Hw/pqv8uFSZsARFW8Za9af93Dvfzv/LAZx2uGpxiW5Fp8gYdboNlReX+iM3/7E2PQs/uRAeAvTnYV4PkU5p+qNz5vgW0yr6dkzbFBfa+ZI75otHgtQDhuh67NE/sE2QRcSu0FMQSztVOFo5UxQs42LuLGDrHNHrRUngYU83UDTpqKnBZqQqE0xDbywd57gCiIpywfxubKL7AagIXMs1yoZeQEBRaYedmvwvAJ6EvsBSfjXsgEp0i1oTfLXMGOhAm2g5ooXX2dSRUT0rsvTFy9mcEiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Cn9Vd8t2VwRnazi+YnGg+a1twsG2eld8AWHXkuy4ViI=; b=ogcxipoSr9VRrGFoIsNNVi/6WQmVOuAdj342hOk8wM2c65OitaTG0G4ifgB3SLpTNqRhm938+edIh8yhSWTU08BmHVRTKl+Vijclp28J7g97/K7EAuV78OoaGsDpO8hvYSabH2m9F8ZUIieRYhWaTo7xBy+u5sSBwYArTKsyYXpxfJ/L2lP/o7kLAFlo4XcQ2LhoFC/CicD2YrU3eB9whIl6HZCjiy1dRq28/8WT7xQasFAGm+Ztb+0ExHKzlvyTqUisAE4UVsUQsSQXncAI37CyqlfYsoTi2EDukpB+M/XpwcN4hHVHXm0/CpdPMjjQ8oJ1DmS0pjIyPg7QYGFa2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=monjalon.net smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Cn9Vd8t2VwRnazi+YnGg+a1twsG2eld8AWHXkuy4ViI=; b=paC/OjNlCCIJQxFQwDHyO42CVH9PANdcliCGIyIet4MZnO5PZqeEXtfn/avMYxND4aITDBDX3DeDyvLf6VyUMd4BvlLhMhzK4mb2CSqBYpff7N5B8UXJkyxIiodkNRe8cekpxEBkFHSDxcFMksTzxbj6Zf+G2EHnAGo+H3sHm9E= Received: from MW4PR02CA0027.namprd02.prod.outlook.com (2603:10b6:303:16d::32) by DM4PR12MB7597.namprd12.prod.outlook.com (2603:10b6:8:10b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.12; Fri, 16 Dec 2022 11:57:49 +0000 Received: from CO1NAM11FT073.eop-nam11.prod.protection.outlook.com (2603:10b6:303:16d:cafe::c4) by MW4PR02CA0027.outlook.office365.com (2603:10b6:303:16d::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.15 via Frontend Transport; Fri, 16 Dec 2022 11:57:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT073.mail.protection.outlook.com (10.13.174.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5924.12 via Frontend Transport; Fri, 16 Dec 2022 11:57:48 +0000 Received: from telcodpdk.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 16 Dec 2022 05:57:46 -0600 From: Ferruh Yigit To: Thomas Monjalon CC: , David Marchand , Daxue Gao , Christian Ehrhardt Subject: [PATCH dpdk-kmod] linux/igb_uio: fix build with kernel 5.18 Date: Fri, 16 Dec 2022 11:57:32 +0000 Message-ID: <20221216115732.3552650-1-ferruh.yigit@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT073:EE_|DM4PR12MB7597:EE_ X-MS-Office365-Filtering-Correlation-Id: 4e7f46dc-2c7f-4770-ae01-08dadf5cc077 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1N6BA5NXwTpAe+8QgrjPqWGngCiMQ4shDsClFg2d0RpqGD5/alNczaBwOqFgZWq9Vc9eRoOrKtd3i2tOvvWSgPzR2tjqBxjy+7dFDf1xurN96tADYXrnsqX2vDGsauvLHEvxUqEoCxLdSJmFvPpnli+tU2V3k+2+mWuUFhuXqfLFcCPYj9GB9ZqXLlUVJC4mXiE1XPBZwAsUna0QtCd+c4CLd2GwqwC4h4keXVeevRpBIUwNHvKaN7i3P1f5nCAWupNQeUBImPfvbxNqAWLXNkV2JbpVnTR4eKpInPSdkpHYUpiGiwKk+dcgch52JIW4x2ZjAizLp1po+SrWFIIqwllG+4uaFa+C5eVpl/MeeDjIMvxUnAINJcgPJfMOatU1RhK8drWugrA30whjoxtPfYrGxpfAvEWtF/3APAJEuAiXkagnFESYoYKbaT/qAtD4+jzFO3YdHa6N8cSItKK0dKX/9jwjvdnkhwedyCmiJQ+PyQozHAvrSlGu2TX/PWSZ+aisafxt+iOoPDcqZMXtN7PtU4gS1mWm/9KlZ6pUcGAHUlZWmiQXC/ujGviJBWlJFROgz8hC+Athjs/nVP0eEncidLNosEvyOMo6iV1s1ZgfKIsWE7QaZYSiRQg69ApCd1s7iv13//sDXad8QAcLjgVgtTh+xcpAJhZfdqENvEAJzDbsFpECIiQyydptlnlAoF3eq9GgG9/lvnd0Eg4tg4cZ2PeNi5m6FDaCMuWhB58= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(136003)(396003)(346002)(39860400002)(376002)(451199015)(40470700004)(36840700001)(46966006)(82310400005)(2616005)(16526019)(82740400003)(1076003)(336012)(36860700001)(86362001)(47076005)(426003)(40480700001)(83380400001)(40460700003)(356005)(81166007)(36756003)(44832011)(2906002)(316002)(8936002)(41300700001)(70206006)(70586007)(4326008)(5660300002)(8676002)(186003)(26005)(478600001)(7696005)(6666004)(54906003)(6916009)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2022 11:57:48.3681 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4e7f46dc-2c7f-4770-ae01-08dadf5cc077 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT073.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7597 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org In Linux kernel v5.18, "pci-dma-compat.h" wrapper file is removed [1]. Some APIs in that wrapper file were used by igb_uio kernel module and kernel module build fails after mentioned commit. Fixed build for v5.18 by replacing APIs in igb_uio. Replaced APIs are available in Linux v4.4 (minimum Linux kernel version supported by DPDK), so no Linux version check is needed. [1] Commit 7968778914e5 ("PCI: Remove the deprecated "pci-dma-compat.h" API") Bugzilla ID: 1142 Signed-off-by: Ferruh Yigit --- Cc: Daxue Gao Cc: Christian Ehrhardt This also needs to be backported to v19.11 LTS --- linux/igb_uio/igb_uio.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c index 33e0e0286b69..0045e0fb737a 100644 --- a/linux/igb_uio/igb_uio.c +++ b/linux/igb_uio/igb_uio.c @@ -512,18 +512,12 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) goto fail_release_iomem; /* set 64-bit DMA mask */ - err = pci_set_dma_mask(dev, DMA_BIT_MASK(64)); + err = dma_set_mask_and_coherent(&dev->dev, DMA_BIT_MASK(64)); if (err != 0) { dev_err(&dev->dev, "Cannot set DMA mask\n"); goto fail_release_iomem; } - err = pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(64)); - if (err != 0) { - dev_err(&dev->dev, "Cannot set consistent DMA mask\n"); - goto fail_release_iomem; - } - /* fill uio infos */ udev->info.name = "igb_uio"; udev->info.version = "0.1"; -- 2.25.1