diff mbox series

[v2] cxl/region: Only warn about cpu_cache_invalidate_memregion() once

Message ID 20221215183836.24136-1-dave@stgolabs.net
State Accepted
Commit e520d52d7cabf6817b2c56d2681e9618bc5540ae
Headers show
Series [v2] cxl/region: Only warn about cpu_cache_invalidate_memregion() once | expand

Commit Message

Davidlohr Bueso Dec. 15, 2022, 6:38 p.m. UTC
No need for more than once per region.

Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
---
 drivers/cxl/core/region.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dave Jiang Dec. 15, 2022, 7:21 p.m. UTC | #1
On 12/15/2022 11:38 AM, Davidlohr Bueso wrote:
> No need for more than once per region.
> 
> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>

Reviewed-by: Dave Jiang <dave.jiang@intel.com>

> ---
>   drivers/cxl/core/region.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
> index 02f28da519e3..c11a6ab5e48d 100644
> --- a/drivers/cxl/core/region.c
> +++ b/drivers/cxl/core/region.c
> @@ -1967,7 +1967,7 @@ static int cxl_region_invalidate_memregion(struct cxl_region *cxlr)
>   
>   	if (!cpu_cache_has_invalidate_memregion()) {
>   		if (IS_ENABLED(CONFIG_CXL_REGION_INVALIDATION_TEST)) {
> -			dev_warn(
> +			dev_warn_once(
>   				&cxlr->dev,
>   				"Bypassing cpu_cache_invalidate_memregion() for testing!\n");
>   			clear_bit(CXL_REGION_F_INCOHERENT, &cxlr->flags);
Jonathan Cameron Dec. 16, 2022, 11:15 a.m. UTC | #2
On Thu, 15 Dec 2022 10:38:36 -0800
Davidlohr Bueso <dave@stgolabs.net> wrote:

> No need for more than once per region.
> 
> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
> ---
>  drivers/cxl/core/region.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
> index 02f28da519e3..c11a6ab5e48d 100644
> --- a/drivers/cxl/core/region.c
> +++ b/drivers/cxl/core/region.c
> @@ -1967,7 +1967,7 @@ static int cxl_region_invalidate_memregion(struct cxl_region *cxlr)
>  
>  	if (!cpu_cache_has_invalidate_memregion()) {
>  		if (IS_ENABLED(CONFIG_CXL_REGION_INVALIDATION_TEST)) {
> -			dev_warn(
> +			dev_warn_once(
>  				&cxlr->dev,
>  				"Bypassing cpu_cache_invalidate_memregion() for testing!\n");
>  			clear_bit(CXL_REGION_F_INCOHERENT, &cxlr->flags);

Seems sensible.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Dan Williams Dec. 16, 2022, 5:31 p.m. UTC | #3
Davidlohr Bueso wrote:
> No need for more than once per region.

Applied with this fixed up:

s/per region/per module load/
diff mbox series

Patch

diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
index 02f28da519e3..c11a6ab5e48d 100644
--- a/drivers/cxl/core/region.c
+++ b/drivers/cxl/core/region.c
@@ -1967,7 +1967,7 @@  static int cxl_region_invalidate_memregion(struct cxl_region *cxlr)
 
 	if (!cpu_cache_has_invalidate_memregion()) {
 		if (IS_ENABLED(CONFIG_CXL_REGION_INVALIDATION_TEST)) {
-			dev_warn(
+			dev_warn_once(
 				&cxlr->dev,
 				"Bypassing cpu_cache_invalidate_memregion() for testing!\n");
 			clear_bit(CXL_REGION_F_INCOHERENT, &cxlr->flags);