From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jeremy Fitzhardinge <jeremy@xensource.com>,
Chris Wright <chrisw@sous-sol.org>,
Steven Rostedt <srostedt@redhat.com>
Subject: [PATCH 3/5] xen: nuke dead code in enlighten.c
Date: Thu, 02 Oct 2008 11:05:32 -0400 [thread overview]
Message-ID: <20081002151104.635936668@goodmis.org> (raw)
In-Reply-To: 20081002150529.087488257@goodmis.org
[-- Attachment #1: xen-nuke-enlighten-dead-code.patch --]
[-- Type: text/plain, Size: 2268 bytes --]
The kernel is no place to hold dead code.
No reason for #if 0 in the kernel proper.
Note, the walk function being deleted is only referenced in the
#if 0 code.
CC: Jeremy Fitzhardinge <jeremy@xensource.com>
CC: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
arch/x86/xen/enlighten.c | 42 ------------------------------------------
1 file changed, 42 deletions(-)
Index: linux-compile.git/arch/x86/xen/enlighten.c
===================================================================
--- linux-compile.git.orig/arch/x86/xen/enlighten.c 2008-10-02 10:34:41.000000000 -0400
+++ linux-compile.git/arch/x86/xen/enlighten.c 2008-10-02 10:34:59.000000000 -0400
@@ -1451,39 +1451,6 @@ static void *m2v(phys_addr_t maddr)
return __ka(m2p(maddr));
}
-#ifdef CONFIG_X86_64
-static void walk(pgd_t *pgd, unsigned long addr)
-{
- unsigned l4idx = pgd_index(addr);
- unsigned l3idx = pud_index(addr);
- unsigned l2idx = pmd_index(addr);
- unsigned l1idx = pte_index(addr);
- pgd_t l4;
- pud_t l3;
- pmd_t l2;
- pte_t l1;
-
- xen_raw_printk("walk %p, %lx -> %d %d %d %d\n",
- pgd, addr, l4idx, l3idx, l2idx, l1idx);
-
- l4 = pgd[l4idx];
- xen_raw_printk(" l4: %016lx\n", l4.pgd);
- xen_raw_printk(" %016lx\n", pgd_val(l4));
-
- l3 = ((pud_t *)(m2v(l4.pgd)))[l3idx];
- xen_raw_printk(" l3: %016lx\n", l3.pud);
- xen_raw_printk(" %016lx\n", pud_val(l3));
-
- l2 = ((pmd_t *)(m2v(l3.pud)))[l2idx];
- xen_raw_printk(" l2: %016lx\n", l2.pmd);
- xen_raw_printk(" %016lx\n", pmd_val(l2));
-
- l1 = ((pte_t *)(m2v(l2.pmd)))[l1idx];
- xen_raw_printk(" l1: %016lx\n", l1.pte);
- xen_raw_printk(" %016lx\n", pte_val(l1));
-}
-#endif
-
static void set_page_prot(void *addr, pgprot_t prot)
{
unsigned long pfn = __pa(addr) >> PAGE_SHIFT;
@@ -1747,15 +1714,6 @@ asmlinkage void __init xen_start_kernel(
xen_raw_console_write("about to get started...\n");
-#if 0
- xen_raw_printk("&boot_params=%p __pa(&boot_params)=%lx __va(__pa(&boot_params))=%lx\n",
- &boot_params, __pa_symbol(&boot_params),
- __va(__pa_symbol(&boot_params)));
-
- walk(pgd, &boot_params);
- walk(pgd, __va(__pa(&boot_params)));
-#endif
-
/* Start the world */
#ifdef CONFIG_X86_32
i386_start_kernel();
--
next prev parent reply other threads:[~2008-10-02 15:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-02 15:05 [PATCH 0/5] Clean up patches Steven Rostedt
2008-10-02 15:05 ` [PATCH 1/5] xen: clean up label Steven Rostedt
2008-10-02 15:05 ` [PATCH 2/5] xen: remove unused function warnings Steven Rostedt
2008-10-02 15:05 ` Steven Rostedt [this message]
2008-10-02 15:05 ` [PATCH 4/5] sound: update snd_assert macro Steven Rostedt
2008-10-03 9:10 ` Takashi Iwai
2008-10-03 14:24 ` Steven Rostedt
2008-10-02 15:05 ` [PATCH 5/5] xen: nuke the ballon files Steven Rostedt
2008-10-02 15:34 ` Jeremy Fitzhardinge
2008-10-02 17:59 ` Steven Rostedt
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=20081002151104.635936668@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=chrisw@sous-sol.org \
--cc=jeremy@xensource.com \
--cc=linux-kernel@vger.kernel.org \
--cc=srostedt@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox