All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] x86 : remove definition of DEBUG
@ 2021-01-14 21:28 trix
  2021-01-14 21:43   ` Steven Rostedt
  2021-01-15  7:44 ` [tip: x86/cleanups] x86: Remove " tip-bot2 for Tom Rix
  0 siblings, 2 replies; 5+ messages in thread
From: trix @ 2021-01-14 21:28 UTC (permalink / raw)
  To: tglx, mingo, bp, hpa, rostedt, karolherbst, ppaalanen,
	dave.hansen, luto, peterz, alexandre.chartre, ying-tsun.huang,
	mchehab+huawei, paulmck
  Cc: x86, linux-kernel, nouveau, Tom Rix

From: Tom Rix <trix@redhat.com>

Defining DEBUG should only be done in development.
So remove DEBUG.

Signed-off-by: Tom Rix <trix@redhat.com>
---
v1: merge all 4 in arch/x86/
---
 arch/x86/kernel/cpu/mtrr/generic.c | 1 -
 arch/x86/kernel/cpu/mtrr/mtrr.c    | 2 --
 arch/x86/kernel/pci-iommu_table.c  | 3 ---
 arch/x86/mm/mmio-mod.c             | 2 --
 4 files changed, 8 deletions(-)

diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c
index a29997e6cf9e..b90f3f437765 100644
--- a/arch/x86/kernel/cpu/mtrr/generic.c
+++ b/arch/x86/kernel/cpu/mtrr/generic.c
@@ -3,7 +3,6 @@
  * This only handles 32bit MTRR on 32bit hosts. This is strictly wrong
  * because MTRRs can span up to 40 bits (36bits on most modern x86)
  */
-#define DEBUG
 
 #include <linux/export.h>
 #include <linux/init.h>
diff --git a/arch/x86/kernel/cpu/mtrr/mtrr.c b/arch/x86/kernel/cpu/mtrr/mtrr.c
index 61eb26edc6d2..28c8a23aa42e 100644
--- a/arch/x86/kernel/cpu/mtrr/mtrr.c
+++ b/arch/x86/kernel/cpu/mtrr/mtrr.c
@@ -31,8 +31,6 @@
     System Programming Guide; Section 9.11. (1997 edition - PPro).
 */
 
-#define DEBUG
-
 #include <linux/types.h> /* FIXME: kvm_para.h needs this */
 
 #include <linux/stop_machine.h>
diff --git a/arch/x86/kernel/pci-iommu_table.c b/arch/x86/kernel/pci-iommu_table.c
index 2e9006c1e240..42e92ec62973 100644
--- a/arch/x86/kernel/pci-iommu_table.c
+++ b/arch/x86/kernel/pci-iommu_table.c
@@ -4,9 +4,6 @@
 #include <linux/string.h>
 #include <linux/kallsyms.h>
 
-
-#define DEBUG 1
-
 static struct iommu_table_entry * __init
 find_dependents_of(struct iommu_table_entry *start,
 		   struct iommu_table_entry *finish,
diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c
index bd7aff5c51f7..cd768dafca9e 100644
--- a/arch/x86/mm/mmio-mod.c
+++ b/arch/x86/mm/mmio-mod.c
@@ -10,8 +10,6 @@
 
 #define pr_fmt(fmt) "mmiotrace: " fmt
 
-#define DEBUG 1
-
 #include <linux/moduleparam.h>
 #include <linux/debugfs.h>
 #include <linux/slab.h>
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] x86 : remove definition of DEBUG
@ 2021-01-14 21:43   ` Steven Rostedt
  0 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2021-01-14 21:43 UTC (permalink / raw)
  To: trix
  Cc: tglx, mingo, bp, hpa, karolherbst, ppaalanen, dave.hansen, luto,
	peterz, alexandre.chartre, ying-tsun.huang, mchehab+huawei,
	paulmck, x86, linux-kernel, nouveau

On Thu, 14 Jan 2021 13:28:27 -0800
trix@redhat.com wrote:

> diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c
> index bd7aff5c51f7..cd768dafca9e 100644
> --- a/arch/x86/mm/mmio-mod.c
> +++ b/arch/x86/mm/mmio-mod.c
> @@ -10,8 +10,6 @@
>  
>  #define pr_fmt(fmt) "mmiotrace: " fmt
>  
> -#define DEBUG 1

Seems to only be used for printing the pr_debug() functions.

> -
>  #include <linux/moduleparam.h>
>  #include <linux/debugfs.h>
>  #include <linux/slab.h>

Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] x86 : remove definition of DEBUG
@ 2021-01-14 21:43   ` Steven Rostedt
  0 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2021-01-14 21:43 UTC (permalink / raw)
  To: trix-H+wXaHxf7aLQT0dZR+AlfA
  Cc: x86-DgEjT+Ai2ygdnm+yROfE0A,
	alexandre.chartre-QHcLZuEGTsvQT0dZR+AlfA,
	paulmck-DgEjT+Ai2ygdnm+yROfE0A, peterz-wEGCiKHe2LqWVfeAwA7xHQ,
	nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	dave.hansen-VuQAYsv1563Yd54FQh9/CA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	mchehab+huawei-DgEjT+Ai2ygdnm+yROfE0A,
	ppaalanen-Re5JQEeQqe8AvxtiuMwx3w, mingo-H+wXaHxf7aLQT0dZR+AlfA,
	bp-Gina5bIWoIWzQB+pC5nmwQ, luto-DgEjT+Ai2ygdnm+yROfE0A,
	hpa-YMNOUZJC4hwAvxtiuMwx3w, tglx-hfZtesqFncYOwBW4kG4KsQ,
	ying-tsun.huang-5C7GfCeVMHo

On Thu, 14 Jan 2021 13:28:27 -0800
trix-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org wrote:

> diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c
> index bd7aff5c51f7..cd768dafca9e 100644
> --- a/arch/x86/mm/mmio-mod.c
> +++ b/arch/x86/mm/mmio-mod.c
> @@ -10,8 +10,6 @@
>  
>  #define pr_fmt(fmt) "mmiotrace: " fmt
>  
> -#define DEBUG 1

Seems to only be used for printing the pr_debug() functions.

> -
>  #include <linux/moduleparam.h>
>  #include <linux/debugfs.h>
>  #include <linux/slab.h>

Acked-by: Steven Rostedt (VMware) <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>

-- Steve

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [tip: x86/cleanups] x86: Remove definition of DEBUG
  2021-01-14 21:28 [PATCH v2] x86 : remove definition of DEBUG trix
  2021-01-14 21:43   ` Steven Rostedt
@ 2021-01-15  7:44 ` tip-bot2 for Tom Rix
  2021-01-16 13:21   ` Borislav Petkov
  1 sibling, 1 reply; 5+ messages in thread
From: tip-bot2 for Tom Rix @ 2021-01-15  7:44 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Tom Rix, Borislav Petkov, Steven Rostedt (VMware), x86, linux-kernel

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     b86cb29287be07041b81f5611e37ae9ffabff876
Gitweb:        https://git.kernel.org/tip/b86cb29287be07041b81f5611e37ae9ffabff876
Author:        Tom Rix <trix@redhat.com>
AuthorDate:    Thu, 14 Jan 2021 13:28:27 -08:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Fri, 15 Jan 2021 08:23:10 +01:00

x86: Remove definition of DEBUG

Defining DEBUG should only be done in development. So remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Link: https://lkml.kernel.org/r/20210114212827.47584-1-trix@redhat.com
---
 arch/x86/kernel/cpu/mtrr/generic.c | 1 -
 arch/x86/kernel/cpu/mtrr/mtrr.c    | 2 --
 arch/x86/kernel/pci-iommu_table.c  | 3 ---
 arch/x86/mm/mmio-mod.c             | 2 --
 4 files changed, 8 deletions(-)

diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c
index 23ad8e9..2cf4465 100644
--- a/arch/x86/kernel/cpu/mtrr/generic.c
+++ b/arch/x86/kernel/cpu/mtrr/generic.c
@@ -3,7 +3,6 @@
  * This only handles 32bit MTRR on 32bit hosts. This is strictly wrong
  * because MTRRs can span up to 40 bits (36bits on most modern x86)
  */
-#define DEBUG
 
 #include <linux/export.h>
 #include <linux/init.h>
diff --git a/arch/x86/kernel/cpu/mtrr/mtrr.c b/arch/x86/kernel/cpu/mtrr/mtrr.c
index 61eb26e..28c8a23 100644
--- a/arch/x86/kernel/cpu/mtrr/mtrr.c
+++ b/arch/x86/kernel/cpu/mtrr/mtrr.c
@@ -31,8 +31,6 @@
     System Programming Guide; Section 9.11. (1997 edition - PPro).
 */
 
-#define DEBUG
-
 #include <linux/types.h> /* FIXME: kvm_para.h needs this */
 
 #include <linux/stop_machine.h>
diff --git a/arch/x86/kernel/pci-iommu_table.c b/arch/x86/kernel/pci-iommu_table.c
index 2e9006c..42e92ec 100644
--- a/arch/x86/kernel/pci-iommu_table.c
+++ b/arch/x86/kernel/pci-iommu_table.c
@@ -4,9 +4,6 @@
 #include <linux/string.h>
 #include <linux/kallsyms.h>
 
-
-#define DEBUG 1
-
 static struct iommu_table_entry * __init
 find_dependents_of(struct iommu_table_entry *start,
 		   struct iommu_table_entry *finish,
diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c
index bd7aff5..cd768da 100644
--- a/arch/x86/mm/mmio-mod.c
+++ b/arch/x86/mm/mmio-mod.c
@@ -10,8 +10,6 @@
 
 #define pr_fmt(fmt) "mmiotrace: " fmt
 
-#define DEBUG 1
-
 #include <linux/moduleparam.h>
 #include <linux/debugfs.h>
 #include <linux/slab.h>

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [tip: x86/cleanups] x86: Remove definition of DEBUG
  2021-01-15  7:44 ` [tip: x86/cleanups] x86: Remove " tip-bot2 for Tom Rix
@ 2021-01-16 13:21   ` Borislav Petkov
  0 siblings, 0 replies; 5+ messages in thread
From: Borislav Petkov @ 2021-01-16 13:21 UTC (permalink / raw)
  To: x86-ml
  Cc: linux-tip-commits, Tom Rix, Steven Rostedt (VMware), x86, linux-kernel

On Fri, Jan 15, 2021 at 07:44:58AM -0000, tip-bot2 for Tom Rix wrote:
> The following commit has been merged into the x86/cleanups branch of tip:
> 
> Commit-ID:     b86cb29287be07041b81f5611e37ae9ffabff876
> Gitweb:        https://git.kernel.org/tip/b86cb29287be07041b81f5611e37ae9ffabff876
> Author:        Tom Rix <trix@redhat.com>
> AuthorDate:    Thu, 14 Jan 2021 13:28:27 -08:00
> Committer:     Borislav Petkov <bp@suse.de>
> CommitterDate: Fri, 15 Jan 2021 08:23:10 +01:00
> 
> x86: Remove definition of DEBUG
> 
> Defining DEBUG should only be done in development. So remove it.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> Link: https://lkml.kernel.org/r/20210114212827.47584-1-trix@redhat.com
> ---
>  arch/x86/kernel/cpu/mtrr/generic.c | 1 -
>  arch/x86/kernel/cpu/mtrr/mtrr.c    | 2 --

Btw, this removes the MTRR ranges output from dmesg - something which
we have had since forever. If you guys think it is still important for
debugging purposes, I can resurrect it by making all those pr_info.

This thing:

MTRR default type: uncachable
MTRR fixed ranges enabled:
  00000-9FFFF write-back
  A0000-BFFFF write-through
  C0000-FFFFF write-protect
MTRR variable ranges enabled:
  0 base 000000000000 mask FFFF80000000 write-back
  1 base 000080000000 mask FFFFC0000000 write-back
  2 base 0000C0000000 mask FFFFE0000000 write-back
  3 disabled
  4 disabled
  5 disabled
  6 disabled
  7 disabled
TOM2: 0000000820000000 aka 33280M

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-16 17:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14 21:28 [PATCH v2] x86 : remove definition of DEBUG trix
2021-01-14 21:43 ` Steven Rostedt
2021-01-14 21:43   ` Steven Rostedt
2021-01-15  7:44 ` [tip: x86/cleanups] x86: Remove " tip-bot2 for Tom Rix
2021-01-16 13:21   ` Borislav Petkov

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.