Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3372645pxb; Mon, 25 Jan 2021 14:24:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwgjvtsKEupuX5LGxfc0mYay5SexzxBJgM+JcIm0J9Br9nSNslOlOAYHDWmpo3bcdBhBmBE X-Received: by 2002:a17:906:944a:: with SMTP id z10mr1618414ejx.96.1611613451421; Mon, 25 Jan 2021 14:24:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611613451; cv=none; d=google.com; s=arc-20160816; b=lUfM2dHse3MF4cEoQMPcq7tbqb4hSS2dR8W59AIXj/e8d6jQmnZzdvIbqd2YV6Vn2a meQ7xsysNl8GG17dIFGSvPf9BB2nHbc5/EHZ+z9d+VNEcajus11UAsBwVj8t8ExXRsop wAkLJ44lS6zAgU3MwOmhqBA7QUUtBLsOo2/ynpg0/OHbAQ4gA+VF/xLsR1U5q+Too5/Q QBEXyQOAksXLvvY2Q5ZAisbCCxS5nDbU1EYssYT5oqA0jH/3EtOgHFDrY4Gz7qJJ3oLI EGeEOPpmVsHFTHkWEyyBJV/t6l2gm1YAzPQINk+xvmX99V2itrpmWfzuebiYsRR7lYnL prDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=S5wgAWPh8SVz6w6ga9s6VW5hGSITBbviF2A5p67j6+4=; b=ub9+A+BZ59Eb80zngbCOA1MGMIxMnFxn5ojoDF5IhG+nJG8IXA+tS7L+wYL/wuOtju yus/FSsFZ6NlZO290CdzJPSd9cvwkgYvb8qsz79OQPNZfLNoVBvTxVfeEQG3JSwxURr8 uHlDoTZHg6OJXExor0LaPTKrmT1Yqph5E5UILPbfoEQIxAxQriyH7mMl4dc/FfakFUoD JBttLMm0zGiaSZPIJ5gS75+TIIVVDsmhVpVtwCnAxNq2fJS09fk2l/YAxOjJCGyhbCAB 6drmtS63ahJVKXLkS6XSsvtc/RH2Z1VduLZy7ndSkKqdCxw2rKh3Xk00/qqFLOMQRzhg JMpQ== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cs10si6262835ejc.200.2021.01.25.14.23.46; Mon, 25 Jan 2021 14:24:11 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732332AbhAYWWN (ORCPT + 99 others); Mon, 25 Jan 2021 17:22:13 -0500 Received: from szxga03-in.huawei.com ([45.249.212.189]:2876 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732207AbhAYWWG (ORCPT ); Mon, 25 Jan 2021 17:22:06 -0500 Received: from DGGEMM403-HUB.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4DPknF0Jh8z5KT1; Tue, 26 Jan 2021 06:19:45 +0800 (CST) Received: from dggpemm100010.china.huawei.com (7.185.36.24) by DGGEMM403-HUB.china.huawei.com (10.3.20.211) with Microsoft SMTP Server (TLS) id 14.3.498.0; Tue, 26 Jan 2021 06:21:15 +0800 Received: from dggemi761-chm.china.huawei.com (10.1.198.147) by dggpemm100010.china.huawei.com (7.185.36.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2106.2; Tue, 26 Jan 2021 06:21:14 +0800 Received: from dggemi761-chm.china.huawei.com ([10.9.49.202]) by dggemi761-chm.china.huawei.com ([10.9.49.202]) with mapi id 15.01.2106.006; Tue, 26 Jan 2021 06:21:14 +0800 From: "Song Bao Hua (Barry Song)" To: Jason Gunthorpe , "Wangzhou (B)" CC: Greg Kroah-Hartman , Arnd Bergmann , Zhangfei Gao , "linux-accelerators@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "linux-mm@kvack.org" , "Liguozhu (Kenneth)" , "chensihang (A)" Subject: RE: [RFC PATCH v2] uacce: Add uacce_ctrl misc device Thread-Topic: [RFC PATCH v2] uacce: Add uacce_ctrl misc device Thread-Index: AQHW8vWniUnMS+RFOU2UJJCa8sDlvKo39q+AgADtcaA= Date: Mon, 25 Jan 2021 22:21:14 +0000 Message-ID: <96b655ade2534a65974a378bb68383ee@hisilicon.com> References: <1611563696-235269-1-git-send-email-wangzhou1@hisilicon.com> <20210125154717.GW4605@ziepe.ca> In-Reply-To: <20210125154717.GW4605@ziepe.ca> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.126.203.227] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogSmFzb24gR3VudGhvcnBl IFttYWlsdG86amdnQHppZXBlLmNhXQ0KPiBTZW50OiBUdWVzZGF5LCBKYW51YXJ5IDI2LCAyMDIx IDQ6NDcgQU0NCj4gVG86IFdhbmd6aG91IChCKSA8d2FuZ3pob3UxQGhpc2lsaWNvbi5jb20+DQo+ IENjOiBHcmVnIEtyb2FoLUhhcnRtYW4gPGdyZWdraEBsaW51eGZvdW5kYXRpb24ub3JnPjsgQXJu ZCBCZXJnbWFubg0KPiA8YXJuZEB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