Skip to contentSkip to conversation

mtrr/state.c unused?

DISCUSSION Borislav Petkov 5 participants 6 messages Feb 3, 2010 – Feb 4, 2010 x86

lore
Share & tools
lore
#0 lore raw

It looks like <arch/x86/kernel/cpu/mtrr/state.c> is not used by anything in the kernel.

Besides cleanups, the only relevant patch in the git history is:

commit 2ec1df4130c60d1eb49dc0fa0ed15858fede6b05

Author: Thomas Gleixner <[email protected]>
Date:   Thu Oct 11 11:16:28 2007 +0200

i386: move kernel/cpu/mtrr

which adds it. Hmm...

A

git log -i --pickaxe-all -Sset_mtrr_prepare_save

for example, shows that

commit 9a6b344ea967efa0bb5ca4cb5405f840652b66c4

Author: Harvey Harrison <[email protected]>
Date:   Mon Feb 4 16:48:01 2008 +0100

x86: remove long dead cyrix mtrr code

has removed the last callers of those helpers and they're now unused. They should go if we don't need them anymore.

Signature · 6 lines
Regards/Gruss,
Boris.

--
Advanced Micro Devices, Inc.
Operating Systems Research Center
#1 lore raw
Quoted 2 lines · Borislav Petkov

It looks like <arch/x86/kernel/cpu/mtrr/state.c> is not used by anything in the kernel.

Good catch - i dont see it used either. Mind sending a patch?

Quoted 11 lines

Besides cleanups, the only relevant patch in the git history is:

commit 2ec1df4130c60d1eb49dc0fa0ed15858fede6b05

Author: Thomas Gleixner <[email protected]>
Date:   Thu Oct 11 11:16:28 2007 +0200

i386: move kernel/cpu/mtrr

which adds it. Hmm...

Might be a dead code artifact from the original unification.

Thanks,

Ingo

#2 lore raw
Quoted 7 lines · Ingo Molnar
Quoted 2 lines · Borislav Petkov

It looks like <arch/x86/kernel/cpu/mtrr/state.c> is not used by anything in the kernel.

Good catch - i dont see it used either. Mind sending a patch?

Yep, here we go:

--

Quoted 1 line

From 059e59699f15c824c35a85774c377ffcae6bffdf Mon Sep 17 00:00:00 2001

From: Borislav Petkov <[email protected]>
Date: Thu, 4 Feb 2010 09:36:03 +0100
Subject: [PATCH] x86, mtrr: Remove unused mtrr/state.c

The last reference to the helpers in <arch/x86/kernel/cpu/mtrr/state.c> went away with 9a6b344ea967efa0bb5ca4cb5405f840652b66c4 leaving unused code. Remove it.

---
 arch/x86/kernel/cpu/mtrr/Makefile |    2 +-
 arch/x86/kernel/cpu/mtrr/state.c  |   94 -------------------------------------
 2 files changed, 1 insertions(+), 95 deletions(-)
 delete mode 100644 arch/x86/kernel/cpu/mtrr/state.c
arch/x86/kernel/cpu/mtrr/Makefile +1 -1
index f4361b5..ad9e5ed 100644
@@ -1,3 +1,3 @@
-obj-y		:= main.o if.o generic.o state.o cleanup.o
+obj-y		:= main.o if.o generic.o cleanup.o
 obj-$(CONFIG_X86_32) += amd.o cyrix.o centaur.o
 
arch/x86/kernel/cpu/mtrr/state.c deleted +0 -94

94 lines not on this page · raw message

Signature · 5 lines
1.6.6

-- 
Regards/Gruss,
    Boris.
#3 lore raw

[tip:x86/cleanups] x86, mtrr: Remove unused mtrr/state.c

Commit-ID:  34d2819f20782feb60f9434470ecfb200875fd41
Gitweb:     http://git.kernel.org/tip/34d2819f20782feb60f9434470ecfb200875fd41
Author:     Borislav Petkov <[email protected]>
AuthorDate: Thu, 4 Feb 2010 09:51:28 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Thu, 4 Feb 2010 10:01:38 +0100

x86, mtrr: Remove unused mtrr/state.c

The last reference to the helpers in <arch/x86/kernel/cpu/mtrr/state.c> went away with 9a6b344ea967efa0bb5ca4cb5405f840652b66c4 leaving unused code. Remove it.

LKML-Reference: <[email protected]>

---
 arch/x86/kernel/cpu/mtrr/Makefile |    2 +-
 arch/x86/kernel/cpu/mtrr/state.c  |   94 -------------------------------------
 2 files changed, 1 insertions(+), 95 deletions(-)
arch/x86/kernel/cpu/mtrr/Makefile +1 -1
index f4361b5..ad9e5ed 100644
@@ -1,3 +1,3 @@
-obj-y		:= main.o if.o generic.o state.o cleanup.o
+obj-y		:= main.o if.o generic.o cleanup.o
 obj-$(CONFIG_X86_32) += amd.o cyrix.o centaur.o
 
arch/x86/kernel/cpu/mtrr/state.c deleted +0 -94

94 lines not on this page · raw message

#4 lore raw
In reply to Ingo Molnar
Quoted 6 lines · Ingo Molnar

Might be a dead code artifact from the original unification.

Thanks,

       Ingo

I dimly recall there was another user at the time, not that I've actually gone back and looked
however.

Cheers,

Harvey

#5 lore raw
Quoted 5 lines · Harvey Harrison

I dimly recall there was another user at the time, not that I've actually gone back and looked
however.

Doesn't really matter, there isn't one now.

-hpa

Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.