From: Jan Beulich <jbeulich@suse.com>
To: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
Cc: "Connor Davis" <davisc@ainfosec.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
"George Dunlap" <george.dunlap@citrix.com>,
"Julien Grall" <julien@xen.org>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Connor Davis" <connojdavis@gmail.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v1 01/10] drivers/char: Add support for Xue USB3 debugger
Date: Thu, 23 Jun 2022 11:29:31 +0200 [thread overview]
Message-ID: <8322303f-021a-b520-d2ad-cf8310573df5@suse.com> (raw)
In-Reply-To: <YrM5g3dLRJHTIVYt@mail-itl>
On 22.06.2022 17:47, Marek Marczykowski-Górecki wrote:
> On Wed, Jun 15, 2022 at 04:25:54PM +0200, Jan Beulich wrote:
>> On 07.06.2022 16:30, Marek Marczykowski-Górecki wrote:
>>> + /* ...we found it, so parse the BAR and map the registers */
>>> + bar0 = pci_conf_read32(xue->sbdf, PCI_BASE_ADDRESS_0);
>>> + bar1 = pci_conf_read32(xue->sbdf, PCI_BASE_ADDRESS_1);
>>
>> What if there are multiple?
>
> You mean two 32-bit BARs? I check for that below (refusing to use them).
> Anyway, I don't think that's a thing in USB 3.0 controllers.
No, I mean multiple controllers. When making the remark I didn't know
yet that you'll deal with that in patch 3. A sentence making the
restriction (and its intended resolution) explicit in the description
would help.
>>> + memset(xue, 0, sizeof(*xue));
>>> +
>>> + xue->dbc_ctx = &ctx;
>>> + xue->dbc_erst = &erst;
>>> + xue->dbc_ering.trb = evt_trb;
>>> + xue->dbc_oring.trb = out_trb;
>>> + xue->dbc_iring.trb = in_trb;
>>> + xue->dbc_owork.buf = wrk_buf;
>>> + xue->dbc_str = str_buf;
>>
>> Especially the page-sized entities want allocating dynamically here, as
>> they won't be needed without the command line option requesting the use
>> of this driver.
>
> Are you okay with changing this only in patch 9, where I restructure those
> buffers anyway?
I'm afraid I'll need to make it to patch 9 to answer this question. If
suitable dealt with later, I don't see a fundamental problem, as long
as it's clear then that I will request that this patch be committed in
a batch with that later one, not in isolation.
>>> + serial_register_uart(SERHND_DBGP, &xue_uart_driver, &xue_uart);
>>> +}
>>> +
>>> +void xue_uart_dump(void)
>>> +{
>>> + struct xue_uart *uart = &xue_uart;
>>> + struct xue *xue = &uart->xue;
>>> +
>>> + xue_dump(xue);
>>> +}
>>
>> This function looks to be unused (and lacks a declaration).
>
> It is unused, same as xue_dump(), but is extremely useful when
> debugging. Should I put it behind something like #ifdef XUE_DEBUG,
> accompanied with a comment about its purpose?
Yes, please (or any other suitable means to make the functions
disappear from the final binary). The function here then also ought
to be static, I suppose - you're not adding a declaration anywhere
for it to be usable outside of this source file.
Jan
next prev parent reply other threads:[~2022-06-23 9:30 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-07 14:30 [PATCH v1 00/10] Add Xue - console over USB 3 Debug Capability Marek Marczykowski-Górecki
2022-06-07 14:30 ` [PATCH v1 01/10] drivers/char: Add support for Xue USB3 debugger Marek Marczykowski-Górecki
2022-06-15 14:25 ` Jan Beulich
2022-06-22 15:47 ` Marek Marczykowski-Górecki
2022-06-23 9:29 ` Jan Beulich [this message]
2022-07-03 12:17 ` Marek Marczykowski-Górecki
2022-07-04 6:05 ` Jan Beulich
2022-07-04 9:27 ` Marek Marczykowski-Górecki
2022-07-04 9:36 ` Jan Beulich
2022-06-07 14:30 ` [PATCH v1 02/10] xue: reset XHCI ports when initializing dbc Marek Marczykowski-Górecki
2022-06-15 14:35 ` Jan Beulich
2022-06-07 14:30 ` [PATCH v1 03/10] xue: add support for selecting specific xhci Marek Marczykowski-Górecki
2022-06-15 14:40 ` Jan Beulich
2022-06-07 14:30 ` [PATCH v1 04/10] ehci-dbgp: fix selecting n-th ehci controller Marek Marczykowski-Górecki
2022-06-15 14:42 ` Jan Beulich
2022-06-07 14:30 ` [PATCH v1 05/10] console: support multiple serial console simultaneously Marek Marczykowski-Górecki
2022-06-07 14:30 ` [PATCH v1 06/10] IOMMU: add common API for device reserved memory Marek Marczykowski-Górecki
2022-06-07 14:30 ` [PATCH v1 07/10] IOMMU/VT-d: wire common device reserved memory API Marek Marczykowski-Górecki
2022-06-07 14:30 ` [PATCH v1 08/10] IOMMU/AMD: " Marek Marczykowski-Górecki
2022-06-07 14:30 ` [PATCH v1 09/10] xue: mark DMA buffers as reserved for the device Marek Marczykowski-Górecki
2022-06-07 14:30 ` [PATCH v1 10/10] xue: allow driving the rest of XHCI by a domain while Xen uses DbC Marek Marczykowski-Górecki
2022-06-07 18:48 ` [PATCH v1 00/10] Add Xue - console over USB 3 Debug Capability Tamas K Lengyel
2022-07-06 7:30 ` Henry Wang
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=8322303f-021a-b520-d2ad-cf8310573df5@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=connojdavis@gmail.com \
--cc=davisc@ainfosec.com \
--cc=george.dunlap@citrix.com \
--cc=julien@xen.org \
--cc=marmarek@invisiblethingslab.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.