On Tue, Jan 24, 2023 at 11:01:27AM +0000, Jonathan Cameron wrote: > On Mon, 23 Jan 2023 11:14:00 +0100 Lukas Wunner <lukas@xxxxxxxxx> wrote: > > A synchronous API for DOE has just been introduced. Convert CXL CDAT > > retrieval over to it. > > The clean up here gives opportunities for 'right sizing' at least > the response to reading the header. The others are harder was we > don't know what each one is going to be. > May make more sense as a follow on patch though. Thy will be done: https://lore.kernel.org/linux-pci/49c5299afc660ac33fee9a116ea37df0de938432.1676043318.git.lukas@xxxxxxxxx/ > > - DECLARE_CDAT_DOE_TASK(CDAT_DOE_REQ(entry_handle), t); > > + u32 request = CDAT_DOE_REQ(entry_handle); > > + u32 response[32]; > > As above, this is still a bit random. > Things we might be reading. > DSMAS: 6 dword > DSLBIS: 6 dword > DSIS: 2 dword > DSEMTS: 6 dword > SSLBIS: 4 dword + 2 * entires dwords. This can get huge - as > can include p2p as well as the smaller usp / dsp set. > > Right now we aren't reading from switches though so we can fix > that later (I posted an RFC for switches ages ago, but haven't > gotten back to it since then) > > So for now probably leave this one at the 32 dwords. I found a way to avoid a response buffer altogether. Thanks, Lukas