linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Christoph Hellwig <hch@lst.de>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: pci-usb/pci-sata broken with LPAE config after "reduce use of block bounce buffers"
Date: Thu, 30 Jan 2020 13:39:58 +0530	[thread overview]
Message-ID: <4a41bd0d-6491-3822-172a-fbca8a6abba5@ti.com> (raw)
In-Reply-To: <20200130075833.GC30735@lst.de>

Hi Christoph,

On 30/01/20 1:28 pm, Christoph Hellwig wrote:
> On Fri, Nov 15, 2019 at 04:29:31PM +0530, Kishon Vijay Abraham I wrote:
>> Hi Christoph,
>>
>> I think we are encountering a case where the connected PCIe card (like PCIe USB
>> card) supports 64-bit addressing and the ARM core supports 64-bit addressing
>> but the PCIe controller in the SoC to which PCIe card is connected supports
>> only 32-bits.
>>
>> Here dma APIs can provide an address above the 32 bit region to the PCIe card.
>> However this will fail when the card tries to access the provided address via
>> the PCIe controller.
> 
> What kernel version do you test?  The classic arm version of dma_capable
> doesn't take the bus dma mask into account.  In Linux 5.5 I switched
> ARM to use the generic version in
> 
> 130c1ccbf55 ("dma-direct: unify the dma_capable definitions")
> 
> so with that this case is supposed to work, without that it doesn't
> have much of a chance.

I got into a new issue in 5.5 kernel with NVMe card wherein I get the
below warn dump. This is different from the issue I initially posted
seen with USB and SATA cards (I was getting a data mismatch then). With
5.5 kernel I don't see those issues anymore in USB card. I only see the
below warn dump with NVMe card.

nvme 0000:01:00.0: overflow 0x000000027b3be000+270336 of DMA mask
ffffffffffffffff bus limit ffffffff
------------[ cut here ]------------
WARNING: CPU: 0 PID: 26 at kernel/dma/direct.c:35 report_addr+0xf0/0xf4
Modules linked in:
CPU: 0 PID: 26 Comm: kworker/u4:1 Not tainted 5.5.0-00002-g1383adf7b819 #2
Hardware name: Generic DRA74X (Flattened Device Tree)
Workqueue: writeback wb_workfn (flush-259:0)
(unwind_backtrace) from [<c020b494>] (show_stack+0x10/0x14)
(show_stack) from [<c0a2ae24>] (dump_stack+0x94/0xa8)
(dump_stack) from [<c022bbd8>] (__warn+0xbc/0xd8)
(__warn) from [<c022bc54>] (warn_slowpath_fmt+0x60/0xb8)
(warn_slowpath_fmt) from [<c0299928>] (report_addr+0xf0/0xf4)
(report_addr) from [<c0299ab8>] (dma_direct_map_page+0x18c/0x19c)
(dma_direct_map_page) from [<c0299b2c>] (dma_direct_map_sg+0x64/0xb4)
(dma_direct_map_sg) from [<c071b12c>] (nvme_queue_rq+0x778/0x9ec)
(nvme_queue_rq) from [<c050c8c8>] (__blk_mq_try_issue_directly+0x130/0x1bc)
(__blk_mq_try_issue_directly) from [<c050d1b8>]
(blk_mq_request_issue_directly+0x48/0x78)
(blk_mq_request_issue_directly) from [<c050d22c>]
(blk_mq_try_issue_list_directly+0x44/0xb8)
(blk_mq_try_issue_list_directly) from [<c0511620>]
(blk_mq_sched_insert_requests+0xe0/0x154)
(blk_mq_sched_insert_requests) from [<c050d13c>]
(blk_mq_flush_plug_list+0x150/0x184)
(blk_mq_flush_plug_list) from [<c0502ec4>] (blk_flush_plug_list+0xc8/0xe4)
(blk_flush_plug_list) from [<c050cc44>] (blk_mq_make_request+0x24c/0x3f0)
(blk_mq_make_request) from [<c0501acc>] (generic_make_request+0xb0/0x2d4)
(generic_make_request) from [<c0501d34>] (submit_bio+0x44/0x180)
(submit_bio) from [<c039ad10>] (mpage_writepages+0xac/0xe8)
(mpage_writepages) from [<c02f96dc>] (do_writepages+0x44/0xdc)
(do_writepages) from [<c0384830>] (__writeback_single_inode+0x2c/0x1bc)
(__writeback_single_inode) from [<c0384b98>]
(writeback_sb_inodes+0x1d8/0x404)
(writeback_sb_inodes) from [<c0384e1c>] (__writeback_inodes_wb+0x58/0x9c)
(__writeback_inodes_wb) from [<c0384ff4>] (wb_writeback+0x194/0x1d8)
(wb_writeback) from [<c0386104>] (wb_workfn+0x244/0x33c)
(wb_workfn) from [<c0244ff8>] (process_one_work+0x204/0x458)
(process_one_work) from [<c0245290>] (worker_thread+0x44/0x598)
(worker_thread) from [<c024ab30>] (kthread+0x14c/0x150)
(kthread) from [<c02010d8>] (ret_from_fork+0x14/0x3c)

Thanks
Kishon

  reply	other threads:[~2020-01-30  8:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15 10:59 pci-usb/pci-sata broken with LPAE config after "reduce use of block bounce buffers" Kishon Vijay Abraham I
2019-11-15 13:06 ` Christoph Hellwig
2019-11-15 14:18   ` Kishon Vijay Abraham I
2019-11-16 16:35     ` Christoph Hellwig
2019-11-18 17:21       ` Robin Murphy
2019-11-25  5:43         ` Kishon Vijay Abraham I
2020-01-27 13:10           ` Kishon Vijay Abraham I
2020-01-27 13:22             ` Robin Murphy
2020-01-29  6:24               ` Kishon Vijay Abraham I
2020-01-30  7:58 ` Christoph Hellwig
2020-01-30  8:09   ` Kishon Vijay Abraham I [this message]
2020-01-30 16:42     ` Christoph Hellwig
2020-01-31 11:44       ` Kishon Vijay Abraham I
2020-02-03 14:21         ` Christoph Hellwig
2020-02-05  5:15           ` Kishon Vijay Abraham I
2020-02-05  7:47             ` Christoph Hellwig
2020-02-05  8:32               ` Kishon Vijay Abraham I
2020-02-05  8:48                 ` Christoph Hellwig
2020-02-05  9:18                   ` Kishon Vijay Abraham I
2020-02-05  9:19                     ` Christoph Hellwig
2020-02-05  9:33                       ` Kishon Vijay Abraham I
2020-02-05 16:05                         ` Christoph Hellwig
2020-02-17 14:23                           ` Christoph Hellwig
2020-02-18 12:15                             ` Kishon Vijay Abraham I
2020-04-02 12:01                               ` Kishon Vijay Abraham I

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=4a41bd0d-6491-3822-172a-fbca8a6abba5@ti.com \
    --to=kishon@ti.com \
    --cc=hch@lst.de \
    --cc=linux-pci@vger.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).