From: Eric Curtin <ecurtin@redhat.com> To: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk> Cc: Sven Peter <sven@svenpeter.dev>, Hector Martin <marcan@marcan.st>, Alyssa Rosenzweig <alyssa@rosenzweig.io>, Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-nvme@lists.infradead.org Subject: Re: [PATCH] nvme-apple: fix DMA-API warning Date: Wed, 12 Oct 2022 13:10:47 +0100 [thread overview] Message-ID: <CAOgh=FzyV4mVsEujkYKZyZ0m12cnDEuK9GadUqutSFk2Cfj5jQ@mail.gmail.com> (raw) In-Reply-To: <E1oiaBa-00Dz7S-SK@rmk-PC.armlinux.org.uk> On Wed, 12 Oct 2022 at 12:53, Russell King (Oracle) <rmk+kernel@armlinux.org.uk> wrote: > > Fix the following DMA-API warning: > > DMA-API: nvme-apple 27bcc0000.nvme: mapping sg segment longer than device claims to support [len=69632] [max=65536] > WARNING: CPU: 3 PID: 1 at kernel/dma/debug.c:1160 debug_dma_map_sg+0x310/0x3a0 > Modules linked in: tps6598x roles typec rtc_macsmc gpio_macsmc nvme_apple apple_mailbox apple_sart pcie_apple macsmc_rtkit macsmc pinctrl_apple_gpio i2c_apple > CPU: 3 PID: 1 Comm: init Not tainted 6.0.0+ #1081 > Hardware name: Apple Mac mini (M1, 2020) (DT) > pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) > pc : debug_dma_map_sg+0x310/0x3a0 > lr : debug_dma_map_sg+0x310/0x3a0 > ... > Call trace: > debug_dma_map_sg+0x310/0x3a0 > __dma_map_sg_attrs+0x98/0xf4 > dma_map_sg_attrs+0xc/0x1c > apple_nvme_queue_rq+0x218/0x67c [nvme_apple] > blk_mq_dispatch_rq_list+0x198/0x81c > blk_mq_do_dispatch_sched+0x2b0/0x340 > __blk_mq_sched_dispatch_requests+0x104/0x154 > blk_mq_sched_dispatch_requests+0x38/0x70 > __blk_mq_run_hw_queue+0x80/0x130 > __blk_mq_delay_run_hw_queue+0x84/0x90 > blk_mq_run_hw_queue+0x134/0x170 > blk_mq_sched_insert_requests+0xec/0x300 > blk_mq_flush_plug_list+0x104/0x430 > __blk_flush_plug+0xe8/0x130 > blk_finish_plug+0x30/0x1f0 > read_pages+0x1ec/0x334 > page_cache_ra_unbounded+0x158/0x1bc > page_cache_ra_order+0x80/0x2c0 > filemap_fault+0x4bc/0x970 > __do_fault+0x38/0x144 > __handle_mm_fault+0x7c4/0xc60 > handle_mm_fault+0x120/0x2a0 > do_page_fault+0x130/0x47c > do_translation_fault+0xa0/0xb0 > do_mem_abort+0x40/0x90 > el0_da+0x2c/0x80 > el0t_64_sync_handler+0x60/0xb4 > el0t_64_sync+0x168/0x16c > ---[ end trace 0000000000000000 ]--- > > Suggested-by: Sven Peter <sven@svenpeter.dev> > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Seems reasonable, the same as nvme_reset_work, wouldn't be the worst thing in the world if we duplicated the "Don't limit the IOMMU merged segment size" comment from the generic driver for the apple version also if there ends up being a v2. Reviewed-by: Eric Curtin <ecurtin@redhat.com> > --- > drivers/nvme/host/apple.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c > index 5fc5ea196b40..ff8b083dc5c6 100644 > --- a/drivers/nvme/host/apple.c > +++ b/drivers/nvme/host/apple.c > @@ -1039,6 +1039,8 @@ static void apple_nvme_reset_work(struct work_struct *work) > dma_max_mapping_size(anv->dev) >> 9); > anv->ctrl.max_segments = NVME_MAX_SEGS; > > + dma_set_max_seg_size(anv->dev, 0xffffffff); > + > /* > * Enable NVMMU and linear submission queues. > * While we could keep those disabled and pretend this is slightly > -- > 2.30.2 > >
WARNING: multiple messages have this Message-ID (diff)
From: Eric Curtin <ecurtin@redhat.com> To: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk> Cc: Sven Peter <sven@svenpeter.dev>, Hector Martin <marcan@marcan.st>, Alyssa Rosenzweig <alyssa@rosenzweig.io>, Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-nvme@lists.infradead.org Subject: Re: [PATCH] nvme-apple: fix DMA-API warning Date: Wed, 12 Oct 2022 13:10:47 +0100 [thread overview] Message-ID: <CAOgh=FzyV4mVsEujkYKZyZ0m12cnDEuK9GadUqutSFk2Cfj5jQ@mail.gmail.com> (raw) In-Reply-To: <E1oiaBa-00Dz7S-SK@rmk-PC.armlinux.org.uk> On Wed, 12 Oct 2022 at 12:53, Russell King (Oracle) <rmk+kernel@armlinux.org.uk> wrote: > > Fix the following DMA-API warning: > > DMA-API: nvme-apple 27bcc0000.nvme: mapping sg segment longer than device claims to support [len=69632] [max=65536] > WARNING: CPU: 3 PID: 1 at kernel/dma/debug.c:1160 debug_dma_map_sg+0x310/0x3a0 > Modules linked in: tps6598x roles typec rtc_macsmc gpio_macsmc nvme_apple apple_mailbox apple_sart pcie_apple macsmc_rtkit macsmc pinctrl_apple_gpio i2c_apple > CPU: 3 PID: 1 Comm: init Not tainted 6.0.0+ #1081 > Hardware name: Apple Mac mini (M1, 2020) (DT) > pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) > pc : debug_dma_map_sg+0x310/0x3a0 > lr : debug_dma_map_sg+0x310/0x3a0 > ... > Call trace: > debug_dma_map_sg+0x310/0x3a0 > __dma_map_sg_attrs+0x98/0xf4 > dma_map_sg_attrs+0xc/0x1c > apple_nvme_queue_rq+0x218/0x67c [nvme_apple] > blk_mq_dispatch_rq_list+0x198/0x81c > blk_mq_do_dispatch_sched+0x2b0/0x340 > __blk_mq_sched_dispatch_requests+0x104/0x154 > blk_mq_sched_dispatch_requests+0x38/0x70 > __blk_mq_run_hw_queue+0x80/0x130 > __blk_mq_delay_run_hw_queue+0x84/0x90 > blk_mq_run_hw_queue+0x134/0x170 > blk_mq_sched_insert_requests+0xec/0x300 > blk_mq_flush_plug_list+0x104/0x430 > __blk_flush_plug+0xe8/0x130 > blk_finish_plug+0x30/0x1f0 > read_pages+0x1ec/0x334 > page_cache_ra_unbounded+0x158/0x1bc > page_cache_ra_order+0x80/0x2c0 > filemap_fault+0x4bc/0x970 > __do_fault+0x38/0x144 > __handle_mm_fault+0x7c4/0xc60 > handle_mm_fault+0x120/0x2a0 > do_page_fault+0x130/0x47c > do_translation_fault+0xa0/0xb0 > do_mem_abort+0x40/0x90 > el0_da+0x2c/0x80 > el0t_64_sync_handler+0x60/0xb4 > el0t_64_sync+0x168/0x16c > ---[ end trace 0000000000000000 ]--- > > Suggested-by: Sven Peter <sven@svenpeter.dev> > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Seems reasonable, the same as nvme_reset_work, wouldn't be the worst thing in the world if we duplicated the "Don't limit the IOMMU merged segment size" comment from the generic driver for the apple version also if there ends up being a v2. Reviewed-by: Eric Curtin <ecurtin@redhat.com> > --- > drivers/nvme/host/apple.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c > index 5fc5ea196b40..ff8b083dc5c6 100644 > --- a/drivers/nvme/host/apple.c > +++ b/drivers/nvme/host/apple.c > @@ -1039,6 +1039,8 @@ static void apple_nvme_reset_work(struct work_struct *work) > dma_max_mapping_size(anv->dev) >> 9); > anv->ctrl.max_segments = NVME_MAX_SEGS; > > + dma_set_max_seg_size(anv->dev, 0xffffffff); > + > /* > * Enable NVMMU and linear submission queues. > * While we could keep those disabled and pretend this is slightly > -- > 2.30.2 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-10-12 12:11 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-12 11:46 [PATCH] nvme-apple: fix DMA-API warning Russell King (Oracle) 2022-10-12 11:46 ` Russell King (Oracle) 2022-10-12 12:10 ` Eric Curtin [this message] 2022-10-12 12:10 ` Eric Curtin 2022-10-12 15:10 ` Sven Peter 2022-10-12 15:10 ` Sven Peter 2022-10-17 7:20 ` Christoph Hellwig 2022-10-17 7:20 ` Christoph Hellwig
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='CAOgh=FzyV4mVsEujkYKZyZ0m12cnDEuK9GadUqutSFk2Cfj5jQ@mail.gmail.com' \ --to=ecurtin@redhat.com \ --cc=alyssa@rosenzweig.io \ --cc=asahi@lists.linux.dev \ --cc=axboe@fb.com \ --cc=hch@lst.de \ --cc=kbusch@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-nvme@lists.infradead.org \ --cc=marcan@marcan.st \ --cc=rmk+kernel@armlinux.org.uk \ --cc=sagi@grimberg.me \ --cc=sven@svenpeter.dev \ /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: linkBe 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.