Received: by 10.223.185.116 with SMTP id b49csp1161406wrg; Fri, 23 Feb 2018 13:04:01 -0800 (PST) X-Google-Smtp-Source: AH8x227loZhDDADcEa2bWV0e/607x0zMdK55Z3mV5ZdayOPjPkbAezrSoHpLyKEkv9HPoi986raf X-Received: by 10.98.71.217 with SMTP id p86mr2965738pfi.81.1519419841322; Fri, 23 Feb 2018 13:04:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519419841; cv=none; d=google.com; s=arc-20160816; b=x1/iJYo7amDPuGapaXfFqcZe9/6j12tZORd60H/WBXI2eoe8+pFDdDuXj2yps3S5Tw SMaS1J8Iih1kphVCAxMcvClaGZuGHrk4JhJGC1nD/leq+eltU32OtF6af4G6pXRadv32 f+xawLB6wAasWMQC3Na2N1K3xi2CY+ifv1W/GuupJa7jGSAl9DGv3D2M/kqDxwCT1Vw+ HoEorRMTOC6fjOiRh4dk463cydJK4M9Ag7Mag4syncVA0Nm3oQGwfo91tH6gW6CtyiFS sIYFoGyDnNsUgt3dtrDP/EDYKStlct/l/ZciovtQMwOq6pNRcxACMe/XRUfFxUGt3aCy vF5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=whEEO7mT50cjwKZIo9xiTj6KdBnTPYuj5Xthhe30S8g=; b=0dSfYfqGh+7xb3fnFDsSMdAD7qaBjADmd/NuYLaG1ifTvgF82fULq6W/jxlCibKoNL rv9uh2H2QwDI7fgnZCIvqKwnOTbVY0IFo0eWDEy8fA6O77RPKbrifA5dmKicKuDbDQyW AHBPQJfpdm3REtAeHmPdngnkxo8w9GoEheiq72ULprAcw1g6Mt4U5f/gai5mfFLFpZ8S j4Y98giZB3sqBLRZ5HztPvYe86dJjgE4ui23J75sBFK2VyHIA0UxlsMpub82J8SGLTGB 1u5PNs9a3HZAmiWT5broNuV8mtGO0CAO/qeJMpLhtqoT24eAy88iK3Z9ChImtqT6mNvh dURw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=J9JI6Hyk; 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 j2-v6si2280536plk.264.2018.02.23.13.03.46; Fri, 23 Feb 2018 13:04:01 -0800 (PST) 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=fail header.i=@gmail.com header.s=20161025 header.b=J9JI6Hyk; 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 S1752575AbeBWVCk (ORCPT + 99 others); Fri, 23 Feb 2018 16:02:40 -0500 Received: from mail-qk0-f195.google.com ([209.85.220.195]:39002 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752178AbeBWVCe (ORCPT ); Fri, 23 Feb 2018 16:02:34 -0500 Received: by mail-qk0-f195.google.com with SMTP id z197so12391930qkb.6; Fri, 23 Feb 2018 13:02:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=whEEO7mT50cjwKZIo9xiTj6KdBnTPYuj5Xthhe30S8g=; b=J9JI6HykkaRg5+hhRmADkpS6tqciV3Tlinj6DhA0/y1wb5mSgkyba0dWiIwtUAUA2n TYC30otuNA9Efg0se9Gv2bjhQ/8PaDYH0u837/QPHNiKQaRjq7Tj0V9k3DcwgY8h5DrW zO7t9mPOCmRZY1Amu2JP6Cfba2MM3CdWPC34BQdRjHK3O4VZ1NrRTqt48tg1iz9egyyl A/wLSiFjq1Dca0y0M6LECpEWhXML6SOpiKsfsRONBXJzRyjYLEga1j9JlIs90B1bgeq8 tKNMbRUuuGpt6wnZymVP+leqtg7sqAIhrCR8o9HktOe+clccwwJxxVZafVGQkWmWKooD MPmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=whEEO7mT50cjwKZIo9xiTj6KdBnTPYuj5Xthhe30S8g=; b=hB0Zvg5n/ekdfP8zzAsIfWcSAAnY5BVFZjwMTHgPgemuDOwTCRrU4t6rCTTk2+DSTb CYTvHLuHCf71X0jyZysHp87kODrvPcnjCVuy3AH02QEDen/vUYDCDAfJpvoCh3hQeLpB NPx/65uqCPIci6UtMdKPwCIAUhWuoYxFZrzf3Z6hdJLi5jOlm88HGko53nimksPSFoeH CDL/HOJNLByPeat8B2We6hwL+w6cHDe1j3tATUGd1K0jXhQmw6pqQ59cc4n4suy2PtTt 0Ffytq7kTNfrZ4oVubxCFFcewywqNHflIIiyzhmJQF4dAjw2F62I90d9YgxUd+5lHIfF /LzA== X-Gm-Message-State: APf1xPBuGimB1+6MwGMDHl0ApqGOl3hEF5M1VyaFIwPHGl0m9QLimUTw DsFbYeeeIkVkqh0gGfLFAxd8U69SpP3/xIJuAQo= X-Received: by 10.55.158.83 with SMTP id h80mr4475772qke.330.1519419753688; Fri, 23 Feb 2018 13:02:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.198.17 with HTTP; Fri, 23 Feb 2018 13:02:33 -0800 (PST) In-Reply-To: <20180223153700.2186058-1-arnd@arndb.de> References: <20180223153700.2186058-1-arnd@arndb.de> From: Arnd Bergmann Date: Fri, 23 Feb 2018 22:02:33 +0100 X-Google-Sender-Auth: RTVrCPkn0NIshFC2AgEw8O8J3Yc Message-ID: Subject: Re: [PATCH] scsi: lpfc: use memcpy_toio instead of writeq To: James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" Cc: Arnd Bergmann , Hannes Reinecke , Johannes Thumshirn , linux-scsi , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 23, 2018 at 4:36 PM, Arnd Bergmann wrote: > @@ -138,12 +137,10 @@ lpfc_sli4_wq_put(struct lpfc_queue *q, union lpfc_wqe *wqe) > if (q->phba->sli3_options & LPFC_SLI4_PHWQ_ENABLED) > bf_set(wqe_wqid, &wqe->generic.wqe_com, q->queue_id); > lpfc_sli_pcimem_bcopy(wqe, temp_wqe, q->entry_size); > - if (q->dpp_enable && q->phba->cfg_enable_dpp) { > + if (q->dpp_enable && q->phba->cfg_enable_dpp) > /* write to DPP aperture taking advatage of Combined Writes */ > - tmp = (uint8_t *)wqe; > - for (i = 0; i < q->entry_size; i += sizeof(uint64_t)) > - writeq(*((uint64_t *)(tmp + i)), q->dpp_regaddr + i); > - } > + memcpy_toio(tmp, q->dpp_regaddr, q->entry_size); > + > /* ensure WQE bcopy and DPP flushed before doorbell write */ > wmb(); > Not sure where we are with the question of whether memcpy_toio is a good replacement or not, but further build testing showed that my patch was completely broken in more than one way: I mixed up the source and destination arguments, and I used the uninitialized 'tmp' instead of 'wqe'. Don't try this patch. Arnd