Skip to contentSkip to conversation

x86 : remove definition of DEBUG

PATCH Applied [email protected] 4 participants 4 messages Jan 14, 2021 – Jan 16, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 x86 : remove definition of DEBUG

From: Tom Rix <[email protected]>

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

---
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(-)
arch/x86/kernel/cpu/mtrr/generic.c +0 -1
index a29997e6cf9e..b90f3f437765 100644
@@ -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>
arch/x86/kernel/cpu/mtrr/mtrr.c +0 -2
index 61eb26edc6d2..28c8a23aa42e 100644
@@ -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>
arch/x86/kernel/pci-iommu_table.c +0 -3
index 2e9006c1e240..42e92ec62973 100644
@@ -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,
arch/x86/mm/mmio-mod.c +0 -2
index bd7aff5c51f7..cd768dafca9e 100644
@@ -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>
Signature · 1 line
2.27.0
maintainer Acked-by on v2 1/1
#1 lore raw

arch/x86/mm/mmio-mod.c line 13

Quoted 9 lines · On Thu, 14 Jan 2021 13:28:27 -0800 [email protected]…
arch/x86/mm/mmio-mod.c +0 -1
index bd7aff5c51f7..cd768dafca9e 100644
@@ -10,8 +10,6 @@
 
 #define pr_fmt(fmt) "mmiotrace: " fmt
 
-#define DEBUG 1

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

arch/x86/mm/mmio-mod.c line 15

Quoted 4 lines
arch/x86/mm/mmio-mod.c +0 -1
-
 #include <linux/moduleparam.h>
 #include <linux/debugfs.h>
 #include <linux/slab.h>

-- Steve

merge bot Applied
#2 lore raw

[tip: x86/cleanups] x86: Remove definition of DEBUG

In reply to [email protected]
The following commit has been merged into the x86/cleanups branch of tip:

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 <[email protected]>
AuthorDate:    Thu, 14 Jan 2021 13:28:27 -08:00
Committer:     Borislav Petkov <[email protected]>
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.

---
 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(-)
arch/x86/kernel/cpu/mtrr/generic.c +0 -1
index 23ad8e9..2cf4465 100644
@@ -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>
arch/x86/kernel/cpu/mtrr/mtrr.c +0 -2
index 61eb26e..28c8a23 100644
@@ -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>
arch/x86/kernel/pci-iommu_table.c +0 -3
index 2e9006c..42e92ec 100644
@@ -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,
arch/x86/mm/mmio-mod.c +0 -2
index bd7aff5..cd768da 100644
@@ -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>
maintainer
#3 lore raw

Re: [tip: x86/cleanups] x86: Remove definition of DEBUG

Quoted 13 lines · 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 <[email protected]>
AuthorDate:    Thu, 14 Jan 2021 13:28:27 -08:00
Committer:     Borislav Petkov <[email protected]>
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.

Quoted 7 lines
---
 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

Signature · 4 lines
Regards/Gruss,
    Boris.

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