Received: by 10.213.65.68 with SMTP id h4csp86029imn; Mon, 12 Mar 2018 18:59:59 -0700 (PDT) X-Google-Smtp-Source: AG47ELs4YxWLE80wIxv6r/Na1eT5lfCnGbRHKLPxADfr8WRw6/HlhUMrjnwBmuVYCSZoguW6rmgA X-Received: by 10.99.126.26 with SMTP id z26mr6736397pgc.132.1520906399397; Mon, 12 Mar 2018 18:59:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520906399; cv=none; d=google.com; s=arc-20160816; b=wyvzq61VFlQCZZ2jadBhAcvftr4huMUwn9Awvt9+bvYKj6gStXn3HVcxtn6wXNxhxb 3twiZQWNMIzJHgvm470+udD+yT3V1xodYe2uYsYUe4Rs1s05jxmhW5VZ+X6Hj11zwf8p zqaNDnGo9Vqj2vYC0j4xnLX847CUQ2ryx4t9/DvcMZEkDxWe1xJZ+04+UDg29NBCcz+i fQqvCXiFry1fy7ukFaSwjHKq33+0tX3dkdcwVHS60AnBjQqMGAJtyRmFwq/SpkEOUmvq Nir3WqwRiPZQ7MyhIldhpOKtxPvIE/MkUChUewZ6PCqkPOHF0lNxQhvaHm8hCxPXVriA xpeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=IXJ1+2TvoFtLgfw20GibZGr5ZzYjwoerAw23x3Tkwbk=; b=MjCbp/G+qRrDBpUX0O882w4W+hGZVDmoMZa1azR5zA9xpzMOdzBkl8JLvtIOTLGjNP uDCftkzVv7aZEBdQXt+3pyM0FCmw1TKoJWZ8gWERvRsoXavjV6Y6iRfA3f4JxhUEZYyP 5KGIhbDp7vPjsWfaP1/zMZ0f0B2F9fzsouG0feuylIfk3lckVS80y1xWcJTOXsnlul3H CfmXWu2OaN71BY12UjZiCy5KQkGMC/SDKLgpbyTJ4xCrMmKRmrxr0Ap/cqO4NHm1tmOB pYvknVdryuE8juVgHFXgOInfIA+/eWhFuSdNMnfDXjAzoIqsJOYi8Ih6uzepr4y1eLLj zE9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZzBo3LIt; dkim=pass header.i=@codeaurora.org header.s=default header.b=NiRyJHjG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q4-v6si6823110plr.365.2018.03.12.18.59.44; Mon, 12 Mar 2018 18:59:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZzBo3LIt; dkim=pass header.i=@codeaurora.org header.s=default header.b=NiRyJHjG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932308AbeCMB62 (ORCPT + 99 others); Mon, 12 Mar 2018 21:58:28 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:33206 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751397AbeCMB60 (ORCPT ); Mon, 12 Mar 2018 21:58:26 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2748E60867; Tue, 13 Mar 2018 01:58:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520906306; bh=EKKc7L7mfOrq6iengldmB6PA1qQnZcY/MS2tTOIZrLM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ZzBo3LItV1mGZYyT0wTFNRXrGc1OQ8/vcOoUICkYdub0FtuGE8rELFJ9cDIrWxeDI mwVeybgm1HR67dFFV732GMS67hbOdvqaWdmV7nkGRyL83pGI3zGLL1Zn/a2Mm0e4NG SGlHiXBjWnHYpdZ81Kwp5C1w+o0cE/jexocSyF+4= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.0.105] (cpe-174-109-247-98.nc.res.rr.com [174.109.247.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id EE3EC60390; Tue, 13 Mar 2018 01:58:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520906305; bh=EKKc7L7mfOrq6iengldmB6PA1qQnZcY/MS2tTOIZrLM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=NiRyJHjGEQ1/lQSBiPeasl2SLt7Q8nHPwGiztOrYZOn2bHUqkglp4uEerCbfJgQHj Edl20dTn5kn7Zv+WAdBhja9frPBzYuT2m2bjjtdV5OGuaRya9RUaJaNYoHOhBSWlIj WjoWLJ6qnfa5MMu04xpz/E/YfTTinhNpDQAYhLmo= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org EE3EC60390 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org Subject: Re: [PATCH v3 08/11] nvme-pci: Use PCI p2pmem subsystem to manage the CMB To: Logan Gunthorpe , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm@lists.01.org, linux-block@vger.kernel.org Cc: Stephen Bates , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Benjamin Herrenschmidt , Alex Williamson References: <20180312193525.2855-1-logang@deltatee.com> <20180312193525.2855-9-logang@deltatee.com> <4b08ec0b-76f4-4b67-a38b-5a1940c4c40d@codeaurora.org> From: Sinan Kaya Message-ID: <08950833-d199-fd2b-06f6-9e585c183b86@codeaurora.org> Date: Mon, 12 Mar 2018 21:58:21 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <4b08ec0b-76f4-4b67-a38b-5a1940c4c40d@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/12/2018 9:55 PM, Sinan Kaya wrote: > On 3/12/2018 3:35 PM, Logan Gunthorpe wrote: >> - if (nvmeq->sq_cmds_io) > > I think you should keep the code as it is for the case where > (!nvmeq->sq_cmds_is_io && nvmeq->sq_cmds_io) Never mind. I misunderstood the code. > > You are changing the behavior for NVMe drives with CMB buffers. > You can change the if statement here with the statement above. > >> - memcpy_toio(&nvmeq->sq_cmds_io[tail], cmd, sizeof(*cmd)); >> - else >> - memcpy(&nvmeq->sq_cmds[tail], cmd, sizeof(*cmd)); >> + memcpy(&nvmeq->sq_cmds[tail], cmd, sizeof(*cmd)); >> > > -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.