Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp457855lqb; Wed, 29 May 2024 00:07:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW0/lG/UEpfZO48JH/ulVm00CQpruEne3HRiKD5X8NkED/iNHHmVY6GGumecVyovveoaPY5CiYKC3hwEHBgLLvLzUjMrWD6yRARkIRbTw== X-Google-Smtp-Source: AGHT+IFbTHnJCSBzK1TIji4TALP/n+RYtKzDDkz8aW5uWNAdi5neKb375602qSO57ZjwZ5sRSbC3 X-Received: by 2002:a17:906:694:b0:a5c:e0a7:3d82 with SMTP id a640c23a62f3a-a62646d402amr1373959566b.36.1716966446011; Wed, 29 May 2024 00:07:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716966445; cv=pass; d=google.com; s=arc-20160816; b=BeI89gv71p9ciASe73mbcxRk6pTpsEf++ODoXuiqfhJw5zeERQMyAyMyFjHNwXFvwb LD91drqrkReXtzJQkDQ6HOqzyrSs1+mvF+0W8k4RuuQ9UjKRe+QKVNmSMNnpLhCVaDKg LVt+/2NaMsCwyFT/AkfDQ71chiF0pyKd87MLzDh9XH/9wXj5eGF56TtGFsmB+XWcU7EC 0OADTSlhC23m2/u7k1/PWNC0YW0DqzRVpWhOIBoPs3A5PdXPln5mMDpexnUtx44Og5sp w1a+gjYIGkhaoG4FLPGt0WynKlMEi8mv6XX+aNEam59EiKXOMexUswna//LisYxPJoD0 ERjQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=q422LFFM8npqmy/SvK+VDCtZcY9VUi/rjqe7GV1DfDc=; fh=lz+Fs5p5EaY7fVd2V55lW1uB86GadE2FAtkXlEmoXtY=; b=o2J1t3yQE9kUigYz8tWr5iRS+NRAMrVMUZ1bD9jG5a1rYlNWdwZylg0UtkMGEr2WOo Zp8hkyDK+08k/shi1Qc/c3IVYveWRsDRC+6y4OmcivVhz59Lnmfzquq57bXVi88bBq0r /K0QdzZFrLFcNU1ykgUw3NwYTq1ZEBynLHahTrmLwQgvWHCBXKJLDSM1To/CDeXWuMdR tuqXH4I9sSdBxmQI68hVlaXP9GKfgxSMPPHCIbYcxKaqWdota+RBXupfhBCRGdiQJooF mlpIIFD1B0JXewu1ewPGk7UshVLGCzIW16VBli5ao4Sq9HW/AERRIsTCTkLqBhj7WO4X FHTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=FMeN65ym; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=lYXGsKp9; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-193559-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193559-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a626c801021si597528166b.53.2024.05.29.00.07.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 00:07:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193559-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=FMeN65ym; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=lYXGsKp9; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-193559-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193559-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 69A461F25278 for ; Wed, 29 May 2024 07:07:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5C7641649C6; Wed, 29 May 2024 07:07:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="FMeN65ym"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="lYXGsKp9" Received: from fout4-smtp.messagingengine.com (fout4-smtp.messagingengine.com [103.168.172.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2848D15FA8A; Wed, 29 May 2024 07:07:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.147 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716966437; cv=none; b=fMMboN/tDDPsSg4oi3wkLDjgjjbrCv3tA2opfC/pHs/ELFen/5nq8f4wwz3rLGXubgGYK9nDCaFGFHB6GwCrIY2sDsroGRW0BxmSdbcJRcoNqbCWEmp7Sy17wgb/E8s/SazAPqURvgAsn3meA9sPDArr1QmtRcxsVPhcgXmwsVA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716966437; c=relaxed/simple; bh=X3CFDYvAfwfnJHcIusiW14N73Q9qM1823sV8XQNMeqg=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=rHZPXLNmCTExjPZXoKiBi/EU8Ld1kyAMBGLmhvO4Zevrgm4WWutKjGN8rWbcJV8F6Wf33s9WwHcvZ17+3Ax0h0fCHe4QDHIBLamCTA/Qc7L7w51td6Vcn29eVs89rCYmZs1DX8qMAihZ9C4cAbpAvTz5P4Ho+f0e4Wi+aHLK5Tw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=FMeN65ym; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=lYXGsKp9; arc=none smtp.client-ip=103.168.172.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id 1EF67138014A; Wed, 29 May 2024 03:07:14 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Wed, 29 May 2024 03:07:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1716966434; x=1717052834; bh=q422LFFM8n pqmy/SvK+VDCtZcY9VUi/rjqe7GV1DfDc=; b=FMeN65ym8KXUOemT1mFQ/SpXJs cKdX06tx8lucjEgguMF52a2d3TD0/SpmYXSBRdxXqmwZXdUdwB9xyb+qOa5gheRO 1kmRU0m8En5F7fz50TChE0UjUfGelr2l5M0l5fOhUDHpghyhXAxiyHIGib8ccUQ/ ZEOLogLkKPU5K3Md1oBsgtoEvMRvLnA1G23EL1YentGSCm7XrmQuFBrIQtuDBfKD kH/xw4nryGHDkQEE6owm2LR2Lp1VvWOHnF1lXzWlLzwKdtlUgphgRlBmCO6qzL/K e+SCo4lTHy3hCGSiW27/Ea51H8kGqY5bEMmgC2YoUbJYj78rmDMeWVkKEIhA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1716966434; x=1717052834; bh=q422LFFM8npqmy/SvK+VDCtZcY9V Ui/rjqe7GV1DfDc=; b=lYXGsKp9NqIlwmHhQJqmG8a1+yV+FRFbiA3SM+kMlMDj dI9fcwdITeC53Wt0ftzLyWRFPxoCn0BTsNvDgtXaP5YopIiL7E/rvAVPe81lFAb6 m5k70P2CUK7iMaOxS11mp3yW4DqP8lK5bD/ry2bg9hdwTPLL3STiMTlqLLbGctdc KhQTMzusNggJnLnrWsxkr2JaTJ/rhh73rGPO6YlJacqBi2rs1anHUcchqCdK+Mqw PyHxCnxexbuR7ydgD0PQEBuPJPDaKCSoEq5pR4HV+Df96ba2mfZF0pJm/RJCwvRX JBQxlMAtuCwrp68Md71RoDfctHfN4/5T32pQHnwhrw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdektddguddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id C3D70B6008D; Wed, 29 May 2024 03:07:13 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-491-g033e30d24-fm-20240520.001-g033e30d2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: In-Reply-To: References: <20240528115802.3122955-1-arnd@kernel.org> Date: Wed, 29 May 2024 09:06:17 +0200 From: "Arnd Bergmann" To: "Lixu Zhang" , "Arnd Bergmann" , "srinivas.pandruvada@linux.intel.com" , "Jiri Kosina" , "Benjamin Tissoires" Cc: "linux-input@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/2] HID: intel-ish-hid: fix cache management mistake Content-Type: text/plain On Wed, May 29, 2024, at 08:46, Zhang, Lixu wrote: >> >>-#include >> #include >> #include >> #include >>@@ -175,10 +174,11 @@ static int prepare_dma_bufs(struct ishtp_device >>*dev, >> return -ENOMEM; >> >> fragment->fragment_tbl[i].ddr_adrs = >>cpu_to_le64(dma_addr); >>+ >>+ memcpy(dma_bufs[i], ish_fw->data + offset, fragment- >>>fragment_tbl[i].length); > fragment->fragment_tbl[i].length was used before assignment. > >>+ dma_wmb(); > I tested it on the platform, but it didn't wok. > What behavior do you see instead? If the manual cache flush works around a bug, that would indicate that the device itself is not coherent and the dma_alloc_coherent() in the architecture is broken. Arnd