All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: iommu@lists.linux-foundation.org
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Will Deacon <will@kernel.org>,
	linux-kernel@vger.kernel.org,
	Nathan Chancellor <nathan@kernel.org>,
	Claire Chang <tientzu@chromium.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Christoph Hellwig <hch@lst.de>,
	Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH v2 3/4] swiotlb: Emit diagnostic in swiotlb_exit()
Date: Tue, 20 Jul 2021 14:38:25 +0100	[thread overview]
Message-ID: <20210720133826.9075-4-will@kernel.org> (raw)
In-Reply-To: <20210720133826.9075-1-will@kernel.org>

A recent debugging session would have been made a little bit easier if
we had noticed sooner that swiotlb_exit() was being called during boot.

Add a simple diagnostic message to swiotlb_exit() to complement the one
from swiotlb_print_info() during initialisation.

Cc: Claire Chang <tientzu@chromium.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20210705190352.GA19461@willie-the-truck
Suggested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Claire Chang <tientzu@chromium.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Will Deacon <will@kernel.org>
---
 kernel/dma/swiotlb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index 7948f274f9bb..b3c793ed9e64 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -334,6 +334,7 @@ void __init swiotlb_exit(void)
 	if (!mem->nslabs)
 		return;
 
+	pr_info("tearing down default memory pool\n");
 	size = array_size(sizeof(*mem->slots), mem->nslabs);
 	if (mem->late_alloc)
 		free_pages((unsigned long)mem->slots, get_order(size));
-- 
2.32.0.402.g57bb445576-goog

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will@kernel.org>
To: iommu@lists.linux-foundation.org
Cc: linux-kernel@vger.kernel.org, Will Deacon <will@kernel.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Claire Chang <tientzu@chromium.org>,
	Christoph Hellwig <hch@lst.de>,
	Robin Murphy <robin.murphy@arm.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Nathan Chancellor <nathan@kernel.org>
Subject: [PATCH v2 3/4] swiotlb: Emit diagnostic in swiotlb_exit()
Date: Tue, 20 Jul 2021 14:38:25 +0100	[thread overview]
Message-ID: <20210720133826.9075-4-will@kernel.org> (raw)
In-Reply-To: <20210720133826.9075-1-will@kernel.org>

A recent debugging session would have been made a little bit easier if
we had noticed sooner that swiotlb_exit() was being called during boot.

Add a simple diagnostic message to swiotlb_exit() to complement the one
from swiotlb_print_info() during initialisation.

Cc: Claire Chang <tientzu@chromium.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20210705190352.GA19461@willie-the-truck
Suggested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Claire Chang <tientzu@chromium.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Will Deacon <will@kernel.org>
---
 kernel/dma/swiotlb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index 7948f274f9bb..b3c793ed9e64 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -334,6 +334,7 @@ void __init swiotlb_exit(void)
 	if (!mem->nslabs)
 		return;
 
+	pr_info("tearing down default memory pool\n");
 	size = array_size(sizeof(*mem->slots), mem->nslabs);
 	if (mem->late_alloc)
 		free_pages((unsigned long)mem->slots, get_order(size));
-- 
2.32.0.402.g57bb445576-goog


  parent reply	other threads:[~2021-07-20 13:38 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-20 13:38 [PATCH v2 0/4] Fix restricted DMA vs swiotlb_exit() Will Deacon
2021-07-20 13:38 ` Will Deacon
2021-07-20 13:38 ` [PATCH v2 1/4] of: Return success from of_dma_set_restricted_buffer() when !OF_ADDRESS Will Deacon
2021-07-20 13:38   ` Will Deacon
2021-07-20 13:38 ` [PATCH v2 2/4] swiotlb: Convert io_default_tlb_mem to static allocation Will Deacon
2021-07-20 13:38   ` Will Deacon
2021-07-20 13:38 ` Will Deacon [this message]
2021-07-20 13:38   ` [PATCH v2 3/4] swiotlb: Emit diagnostic in swiotlb_exit() Will Deacon
2021-07-20 13:38 ` [PATCH v2 4/4] swiotlb: Free tbl memory " Will Deacon
2021-07-20 13:38   ` Will Deacon
2021-07-31 18:26   ` Guenter Roeck
2021-07-31 18:26     ` Guenter Roeck
2021-08-01  2:29     ` Konrad Rzeszutek Wilk
2021-08-01  2:29       ` Konrad Rzeszutek Wilk
2021-08-01  4:26       ` Guenter Roeck
2021-08-01  4:26         ` Guenter Roeck
2021-07-22 19:22 ` [PATCH v2 0/4] Fix restricted DMA vs swiotlb_exit() Christian Borntraeger
2021-07-22 19:22   ` Christian Borntraeger
2021-07-23  1:12   ` Halil Pasic
2021-07-23  1:12     ` Halil Pasic
2021-07-23  5:51     ` Christian Borntraeger
2021-07-23  5:51       ` Christian Borntraeger
2021-07-23  6:14     ` Christian Borntraeger
2021-07-23  6:14       ` Christian Borntraeger
2021-07-23  8:47       ` Halil Pasic
2021-07-23  8:47         ` Halil Pasic
2021-07-23  8:50         ` Christian Borntraeger
2021-07-23  8:50           ` Christian Borntraeger
2021-07-23 14:01           ` Konrad Rzeszutek Wilk
2021-07-23 14:01             ` Konrad Rzeszutek Wilk
2021-07-23 17:53             ` Christian Borntraeger
2021-07-23 17:53               ` Christian Borntraeger
2021-07-23 22:18               ` Halil Pasic
2021-07-23 22:18                 ` Halil Pasic
2021-07-24  0:29 ` Konrad Rzeszutek Wilk
2021-07-24  0:29   ` Konrad Rzeszutek Wilk

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=20210720133826.9075-4-will@kernel.org \
    --to=will@kernel.org \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=nathan@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=tientzu@chromium.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.