linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
To: Arnd Bergmann <arnd@arndb.de>, Lixu Zhang <lixu.zhang@intel.com>,
	Arnd Bergmann <arnd@kernel.org>, Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <bentiss@kernel.org>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	 "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] HID: intel-ish-hid: fix cache management mistake
Date: Wed, 29 May 2024 15:25:22 -0700	[thread overview]
Message-ID: <ed3236173ff6fdb1cb6962f388b41e6b90586335.camel@linux.intel.com> (raw)
In-Reply-To: <fcbdc4a5-abee-4de8-9fe8-c8486195b96d@app.fastmail.com>

On Wed, 2024-05-29 at 09:06 +0200, Arnd Bergmann wrote:
> On Wed, May 29, 2024, at 08:46, Zhang, Lixu wrote:
> > > 
> > > -#include <linux/cacheflush.h>
> > > #include <linux/container_of.h>
> > > #include <linux/dev_printk.h>
> > > #include <linux/dma-mapping.h>
> > > @@ -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.

Lixu,

What happens if you remove manual cache flush in your code?
It is possible that boot loader at this time not ready to do fully
coherent ops.

Thanks,
Srinivas



> 
>      Arnd


  reply	other threads:[~2024-05-29 22:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-28 11:57 [PATCH 1/2] HID: intel-ish-hid: fix cache management mistake Arnd Bergmann
2024-05-28 11:57 ` [PATCH 2/2] HID: intel-ish-hid: fix endian-conversion Arnd Bergmann
2024-05-28 12:45   ` Arnd Bergmann
2024-05-28 21:06   ` kernel test robot
2024-05-28 21:17   ` kernel test robot
2024-05-29  7:05   ` Zhang, Lixu
2024-05-29 13:18     ` Arnd Bergmann
2024-05-31  3:49       ` srinivas pandruvada
2024-05-31 16:29         ` Arnd Bergmann
2024-05-29  6:46 ` [PATCH 1/2] HID: intel-ish-hid: fix cache management mistake Zhang, Lixu
2024-05-29  7:06   ` Arnd Bergmann
2024-05-29 22:25     ` srinivas pandruvada [this message]
2024-05-30  7:41       ` Zhang, Lixu
2024-05-31  8:51       ` Zhang, Lixu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ed3236173ff6fdb1cb6962f388b41e6b90586335.camel@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=bentiss@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lixu.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).