From: 이왕석 <wangseok.lee@samsung.com>
To: Christoph Hellwig <hch@infradead.org>,
Alexander Lobakin <alexandr.lobakin@intel.com>
Cc: "jingoohan1@gmail.com" <jingoohan1@gmail.com>,
"gustavo.pimentel@synopsys.com" <gustavo.pimentel@synopsys.com>,
"lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
"robh@kernel.org" <robh@kernel.org>,
"kw@linux.com" <kw@linux.com>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"jesper.nilsson@axis.com" <jesper.nilsson@axis.com>,
"vkoul@kernel.org" <vkoul@kernel.org>,
"kernel@axis.com" <kernel@axis.com>, 전문기 <moonki.jun@samsung.com>
Subject: Re: [PATCH] PCI: dwc: Modify the check about MSI DMA mask 32-bit
Date: Thu, 31 Mar 2022 14:34:22 +0900 [thread overview]
Message-ID: <20220331053422epcms2p7baddf4e5c80b6ebbd5e6aa9447fa221f@epcms2p7> (raw)
In-Reply-To: <YkR7G/V8E+NKBA2h@infradead.org>
> --------- Original Message ---------
> Sender : Christoph Hellwig <hch@infradead.org>
> Date : 2022-03-31 00:45 (GMT+9)
> Title : Re: [PATCH] PCI: dwc: Modify the check about MSI DMA mask 32-bit
>
> On Wed, Mar 30, 2022 at 11:35:26AM +0200, Alexander Lobakin wrote:
>> I'm not super familiar with the DMA internals, so adding Chris here,
>> maybe he'd like to comment, but anyway, the lower/arch layer must
>> not give the DMA addresses wider than the number of bits passed to
>> dma_set_mask() if that call returned 0.
>
> So, the basic assumption in the kernel is that 32-bit DMA is always
> supported, and dma_set_maks for that should not fail. If the
> system (or root port, internal interconnect) supports less than that
> we'll bounce buffer. But how and why would you hand out addresses
> larger than that? It really is not valid, but I can't even see how
> it could happen.
Hello,
thank you for your review.
Yes, the dma address should not be used in excess of the mask value
set through dma_set_mask().
If I want to use 33+bit dma address on 64bit system, I have to call
dma_set_mask(33+) again after below code in dw_pcie_host_init() is
performed.
This is because dw_pcie_host_init(32) is always called in
dw_pcie_host_init() without any conditions.
Is this right?
Also, if I assign 33+bit dma address before dw_pcie_host_init() to
use 33+bit dma address on 64bit system, dma_set_mask(32) is called
and dma_mask is changed to 32 but dma address is maintained 33+,
so error occurs.
it is not a issue with the dma_set_mask() function, but the
called condition must need to be modified.
Thank you.
next prev parent reply other threads:[~2022-03-31 5:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20220328023009epcms2p309a5dfc2ff29d0a9945f65799963193c@epcms2p3>
2022-03-28 2:30 ` [PATCH] PCI: dwc: Modify the check about MSI DMA mask 32-bit 이왕석
2022-03-28 14:32 ` Alexander Lobakin
2022-03-30 3:52 ` 이왕석
2022-03-30 9:35 ` Alexander Lobakin
2022-03-30 15:45 ` Christoph Hellwig
2022-03-31 5:34 ` 이왕석 [this message]
2022-04-08 2:34 ` Wangseok Lee
2022-04-08 5:06 ` Christoph Hellwig
2022-04-08 5:32 ` Wangseok Lee
2022-04-08 5:39 ` Christoph Hellwig
2022-04-08 15:47 ` Lorenzo Pieralisi
2022-04-11 6:59 ` Wangseok Lee
2022-04-11 7:10 ` Christoph Hellwig
2022-04-11 9:47 ` Wangseok Lee
2022-04-11 12:54 ` Christoph Hellwig
2022-04-13 11:54 ` Robin Murphy
2022-04-18 3:12 ` Wangseok Lee
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=20220331053422epcms2p7baddf4e5c80b6ebbd5e6aa9447fa221f@epcms2p7 \
--to=wangseok.lee@samsung.com \
--cc=alexandr.lobakin@intel.com \
--cc=bhelgaas@google.com \
--cc=gustavo.pimentel@synopsys.com \
--cc=hch@infradead.org \
--cc=jesper.nilsson@axis.com \
--cc=jingoohan1@gmail.com \
--cc=kernel@axis.com \
--cc=kw@linux.com \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=moonki.jun@samsung.com \
--cc=robh@kernel.org \
--cc=vkoul@kernel.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 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).