Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp127128pxj; Tue, 15 Jun 2021 21:57:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy70eQGUviptSTfJMKDWRiv6+X3zFPY8UyG186F9CoEvb/5i1zu1vZUbONJcbXOv2a9ZUvr X-Received: by 2002:a05:6402:1ac9:: with SMTP id ba9mr1880738edb.250.1623819465885; Tue, 15 Jun 2021 21:57:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1623819465; cv=pass; d=google.com; s=arc-20160816; b=cyR0Od3emmmjucPXTrmQ7jXFCKyaAFsMcOr3EDnqaYucGRcdV/JJPh3CvSGMV/yrdD QMeI4QvjTvDAJxIZIWqIv85H7m4l45kbGHSnZfI4f5XBO5Wk2CBySHWyd4Nky/4Gfw2/ RydmFc04e7vBTw1MWThw3+t3TPlXMc7K/tA9701ZNJ6WdMzlekqCbzg0oq/Tg4EqKQql QYRDCF9b3gUG2IUE3iDqQdc807GiwywAlsZVfWcAyP+2TEsb88NdtpBhUYX/+ZYkHyKZ FqD5Tltuq0HLBhz9bsxr2oPaBSCm2zp7SNR7hoFQWG/PjzD0QTi6Bi07YkcgJ5DjPfio 8FTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject:dkim-signature; bh=tlDCE+VAmVPr0X9zXk0jKbFUEXXKUSLW447hmlIQf8U=; b=t07Ihe0TjQyHYww247HtE32PSKsQlBkWXZ6FcEJqDQ40eK2DGO9K/mibeNL34OTCx7 9aqVp7Av6LPd2yc4/AK4wEHihjXsKtcn5+v6DCA8rA1op9GU0lG3p1EfdwnAMoZ2FNtE 22vkIZw+BSZ93GItCEAYWEKPCiU2zuFSP+p56BuBjy+hwLYCgG8Rd1DMaka9IDYlXWI5 7FJ5Pbv2z73O8f2u1jcx/6j8O+455UlhK7j+QjsrIOZj2kYyFHH0cxkoXF//hrqs/NZp FEwzfWNplZ8Q39CaY7kKkr31iaEBRh/1610389muBKQP4+IPI/t3hZACWpvqC9kH5yuj JqBQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=U8PzqkI3; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ck2si992282edb.395.2021.06.15.21.57.23; Tue, 15 Jun 2021 21:57:45 -0700 (PDT) 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=@amd.com header.s=selector1 header.b=U8PzqkI3; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230343AbhFPE5P (ORCPT + 99 others); Wed, 16 Jun 2021 00:57:15 -0400 Received: from mail-bn8nam11on2047.outbound.protection.outlook.com ([40.107.236.47]:58752 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229514AbhFPE5M (ORCPT ); Wed, 16 Jun 2021 00:57:12 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W/AzpsSHV6PEvxmUCqIVoaGKjSSnB6dgADNwi9REr6Z84EdoYz1qNBnAau7atZLiRJpUh/3xLM34ss2pQal/S4/HyWIWsfxTR845XqW0e5n0uaPIbff9lo79GIE9mgwA0/CotrWQ1YIW7/mqLTKrRdzGZ0RceyfzyjD6CIBeShtM1RPKnitd0fB8cDiT2IKZC9oGzRx5ekgPK7bHiwnUarTNl/yEIc8H8jYvJ2WpLhW1wQN2VnuLylgeT94QZUYBL0TWzEtfjzKKEbAr6vCyWVFlQnrGWXhAAc7784a7SakGjidjw7ZfI7EBMYMaBfjzBwqaGo8pK+jA/0JhdZOfig== 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-SenderADCheck; bh=tlDCE+VAmVPr0X9zXk0jKbFUEXXKUSLW447hmlIQf8U=; b=A4NpAEV1ZFrwjuE7Wy69SqT7d4tiety8jUlCISwdVTq4P4f7TpJbmylvUWNnzFu/lYL6WBHGqgzggn6GmF6zqboHhGm8ETByCbkQ5bcuTON2mfzqGbYrAjZr8oXWXtCQ0Vb+2mZJWvnYw+rR3WzLhZua8fK5nY8Fbbs2KFG7A+A4cOKimbxp2tDQexPWlohLPJx2QrpMU02De1HzVmGf7I+LWdbKRa6K1qAWVcEqU7z5142mvVpHrK2KRrW8WQxBq+F6BKjblwFr7H58ozVu3azwwL4JW4UPPbRGZO0iCRrLrINEVPazLsQR5bKGZe4VqOz+b32zqu/joiApZfGG4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; 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=tlDCE+VAmVPr0X9zXk0jKbFUEXXKUSLW447hmlIQf8U=; b=U8PzqkI3u8lF0VZSlZqcpPgW+EwVXnkdJzKcwAgZI7dYCRZi+d4MtjklPqfZPpuEyZ6SOovsvXUHyCc881a51xBOQaddO6L9QhNs28SMQAyDW6Afn4SjnWx8hILmipK3+gjh/sIbH1hvJk1g/0K6rhhHPnVR8kw/3T+jXOEGhmo= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=amd.com; Received: from DM4PR12MB5103.namprd12.prod.outlook.com (2603:10b6:5:392::13) by DM6PR12MB5567.namprd12.prod.outlook.com (2603:10b6:5:1ba::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16; Wed, 16 Jun 2021 04:55:05 +0000 Received: from DM4PR12MB5103.namprd12.prod.outlook.com ([fe80::e065:c90b:5f7:7e95]) by DM4PR12MB5103.namprd12.prod.outlook.com ([fe80::e065:c90b:5f7:7e95%6]) with mapi id 15.20.4242.016; Wed, 16 Jun 2021 04:55:05 +0000 Subject: Re: [PATCH v9 1/3] dmaengine: ptdma: Initial driver for the AMD PTDMA To: Vinod Koul Cc: Sanjay R Mehta , gregkh@linuxfoundation.org, dan.j.williams@intel.com, Thomas.Lendacky@amd.com, Shyam-sundar.S-k@amd.com, Nehal-bakulchandra.Shah@amd.com, robh@kernel.org, mchehab+samsung@kernel.org, davem@davemloft.net, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org References: <1622654551-9204-1-git-send-email-Sanju.Mehta@amd.com> <1622654551-9204-2-git-send-email-Sanju.Mehta@amd.com> <94bba5dd-b755-81d0-de30-ce3cdaa3f241@amd.com> From: Sanjay R Mehta Message-ID: <0bc4e249-b8ce-1d92-ddde-b763667a0bcb@amd.com> Date: Wed, 16 Jun 2021 10:24:52 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [223.226.125.202] X-ClientProxiedBy: MA1PR0101CA0064.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:20::26) To DM4PR12MB5103.namprd12.prod.outlook.com (2603:10b6:5:392::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.6] (223.226.125.202) by MA1PR0101CA0064.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:20::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.15 via Frontend Transport; Wed, 16 Jun 2021 04:55:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c0126745-9ecb-488a-2cce-08d93082e832 X-MS-TrafficTypeDiagnostic: DM6PR12MB5567: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:983; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LIJDZit3p1K6Kua8DA5TLOISyUius0bVaEjQgg42MUNbSgSJmouHG/Tr3R3CFqNLxEuBDvS8DHr3Oz8faKrqUgLCF/JDoVC9st/ZMTxye2MI7t1AUgZ0aiVEtiWznF/aZyg/cqkluoogImmTdDl5PpDaxmESfQ40TjcvqSqjR+991X6gnQ4x6yz649fH64HRIHR7uW3lVS15h0vZiWaLuJgfndf0g61UKbSQfmLCTr+RG/bo5ZC65ejyQDaDpl6AR3Hri3hZA3nqHQhL/GQih3vM0btfOrzoddZ/wfFRI14C4fUVFM4l31q+ugNzeUP1N89xprxk1pebTwkp6sJ5Nu+L1W3KSoKhVaqReYxNk5CGGuT1r1rA2ICWzaEsSQvODBOkSp9otUkms4RqrbOFD3ySIRizGiWK0mgZQht22aoN6Osr+Omj+c4tSsLei5r2VaslmaxNk+3I85GomJOEmkRW9SgitriGNeaOQTkvYd6KCQHW+BNFjLiA350mrfYdgKOvjmyjwAvfdHyJQKp7+Fu76NWQ4peUSBGXOZ24j/O8qB/tQY5V+hxFBvjzdaPTKr1JfXs01jgDdRN9nehn6H1dmnCEOWvZuXYteRN9t1j0dKWv3Px6NecygYbcJItfFlMu9vIG20c219du95lf4KBgj63666xnGYuf3O5ocHqQTawizQgezONL0S84v2EU X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB5103.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(346002)(39860400002)(376002)(366004)(396003)(136003)(2906002)(4744005)(16526019)(31696002)(4326008)(36756003)(31686004)(186003)(8676002)(956004)(2616005)(8936002)(6916009)(316002)(66946007)(66476007)(5660300002)(16576012)(6486002)(66556008)(478600001)(6666004)(53546011)(55236004)(38100700002)(26005)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WGtwZEM4eFVERzVjelFJQlZNc0JMK241QlRiaGdTeUFVVE1sdWp6bmYwUWR1?= =?utf-8?B?blJnTE1hSXp6WXRjZXI4ekpIb2g5RXJxWE43a0VGS05KSmxYeDFOcDNyTUh3?= =?utf-8?B?MW9OR1NVV2Q2TWl0S1pjMHB0U1FSdXptV2JlWFMwS0ttQ2VxTTRPNmJtNU5S?= =?utf-8?B?QjNNSUtGRG1MdVhVd205SWpZTnFmOGd1ZUNWU3F1WlFEVTk3bU1TV0xTZXZ3?= =?utf-8?B?eG9qUXpQRzN3ZWVGS1F4Ty9VdGZxRlg2djN1WnpvNmRUdk9IZlRMRDh5dUti?= =?utf-8?B?dE55WlNzSmJEL2pQSG9LUDBHRVFLUFEwbzY5eVBtZ1JkOWp5OFZJTk9YOER4?= =?utf-8?B?ODRleWFONHRWR1E2VnJsVkxBS0xaTWRVZ0lCVUt3MktFcWdDT2xDaUh5bVl5?= =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W1hcXhP?= =?utf-8?B?RXk0YXVqQURoRzI2ckRlM0hRRno4bkNhaVBvRE9Ja3ZPWGtYS0JiY0F5TmE0?= =?utf-8?B?SG5WZURCNXpCVDhoOFNwZXU1VzV4N0NYOUk3d0Y3Nk4wdU1NWnJWVThiUDRV?= =?utf-8?B?TTZZS25ZbjZBTENrTEZTV2FueDZKOUlYYnArN3J5bnl3VUoxWWxtV1k4ejhF?= =?utf-8?B?b1Vmdjl3TmhXb3lJU0w5L2dkckYrRE5JbkU2elYwbUpvTWwzWDNrNVVheUVM?= =?utf-8?B?dmhja2EwQW1EM0tFSUpyekJ5UjNQSjBCMDRFNXFyU3NXbllzdmIzdFNnUzkr?= =?utf-8?B?YjJmYmNuck0wVENYMW9oWHh0M2xBeFV5LzVHU3h2d3grR3R6SzJqNkZtM1Bo?= =?utf-8?B?ZGNTSGxKZW5Za3p6TFkvdmFnUnU2bUxEV0FaQ0N5TmhKcHBQUlhtcGY5a0xq?= =?utf-8?Q?h5N0QOImERoEl+uX+YizHExg4fScJ+h5LLxjUQ2?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c0126745-9ecb-488a-2cce-08d93082e832 X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5103.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2021 04:55:05.2106 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iLYhwJqw8E4NvJNcvlK1gX5+QLYo++JuaQzUtUCV6+BrlFsXjM6tju/Ht1P4MQMncGy3E8pychzKVT0cCaZfsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB5567 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/16/2021 9:45 AM, Vinod Koul wrote: > [CAUTION: External Email] > > On 15-06-21, 16:50, Sanjay R Mehta wrote: > >>>> +static struct pt_device *pt_alloc_struct(struct device *dev) >>>> +{ >>>> + struct pt_device *pt; >>>> + >>>> + pt = devm_kzalloc(dev, sizeof(*pt), GFP_KERNEL); >>>> + >>>> + if (!pt) >>>> + return NULL; >>>> + pt->dev = dev; >>>> + pt->ord = atomic_inc_return(&pt_ordinal); >>> >>> What is the use of this number? >>> >> >> There are eight similar instances of this DMA engine on AMD SOC. >> It is to differentiate each of these instances. > > Are they individual device objects? > Yes, they are individual device objects. > -- > ~Vinod >