public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: mingo@elte.hu, linux-kernel@vger.kernel.org, brgerst@gmail.com
Cc: Tejun Heo <tj@kernel.org>
Subject: [PATCH 06/10] x86: merge irq_regs.h
Date: Wed, 21 Jan 2009 17:46:14 +0900	[thread overview]
Message-ID: <1232527578-1960-7-git-send-email-tj@kernel.org> (raw)
In-Reply-To: <1232527578-1960-1-git-send-email-tj@kernel.org>

From: Brian Gerst <brgerst@gmail.com>

Impact: cleanup, better irq_regs code generation for x86_64

Make 64-bit use the same optimizations as 32-bit.

Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
---
 arch/x86/include/asm/irq_regs.h    |   36 +++++++++++++++++++++++++++++++-----
 arch/x86/include/asm/irq_regs_32.h |   31 -------------------------------
 arch/x86/include/asm/irq_regs_64.h |    1 -
 arch/x86/kernel/irq_64.c           |    3 +++
 4 files changed, 34 insertions(+), 37 deletions(-)
 delete mode 100644 arch/x86/include/asm/irq_regs_32.h
 delete mode 100644 arch/x86/include/asm/irq_regs_64.h

diff --git a/arch/x86/include/asm/irq_regs.h b/arch/x86/include/asm/irq_regs.h
index 89c898a..7784322 100644
--- a/arch/x86/include/asm/irq_regs.h
+++ b/arch/x86/include/asm/irq_regs.h
@@ -1,5 +1,31 @@
-#ifdef CONFIG_X86_32
-# include "irq_regs_32.h"
-#else
-# include "irq_regs_64.h"
-#endif
+/*
+ * Per-cpu current frame pointer - the location of the last exception frame on
+ * the stack, stored in the per-cpu area.
+ *
+ * Jeremy Fitzhardinge <jeremy@goop.org>
+ */
+#ifndef _ASM_X86_IRQ_REGS_H
+#define _ASM_X86_IRQ_REGS_H
+
+#include <asm/percpu.h>
+
+#define ARCH_HAS_OWN_IRQ_REGS
+
+DECLARE_PER_CPU(struct pt_regs *, irq_regs);
+
+static inline struct pt_regs *get_irq_regs(void)
+{
+	return percpu_read(irq_regs);
+}
+
+static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
+{
+	struct pt_regs *old_regs;
+
+	old_regs = get_irq_regs();
+	percpu_write(irq_regs, new_regs);
+
+	return old_regs;
+}
+
+#endif /* _ASM_X86_IRQ_REGS_32_H */
diff --git a/arch/x86/include/asm/irq_regs_32.h b/arch/x86/include/asm/irq_regs_32.h
deleted file mode 100644
index d7ed33e..0000000
--- a/arch/x86/include/asm/irq_regs_32.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Per-cpu current frame pointer - the location of the last exception frame on
- * the stack, stored in the per-cpu area.
- *
- * Jeremy Fitzhardinge <jeremy@goop.org>
- */
-#ifndef _ASM_X86_IRQ_REGS_32_H
-#define _ASM_X86_IRQ_REGS_32_H
-
-#include <asm/percpu.h>
-
-#define ARCH_HAS_OWN_IRQ_REGS
-
-DECLARE_PER_CPU(struct pt_regs *, irq_regs);
-
-static inline struct pt_regs *get_irq_regs(void)
-{
-	return percpu_read(irq_regs);
-}
-
-static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
-{
-	struct pt_regs *old_regs;
-
-	old_regs = get_irq_regs();
-	percpu_write(irq_regs, new_regs);
-
-	return old_regs;
-}
-
-#endif /* _ASM_X86_IRQ_REGS_32_H */
diff --git a/arch/x86/include/asm/irq_regs_64.h b/arch/x86/include/asm/irq_regs_64.h
deleted file mode 100644
index 3dd9c0b..0000000
--- a/arch/x86/include/asm/irq_regs_64.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/irq_regs.h>
diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c
index 1db0524..0b254de 100644
--- a/arch/x86/kernel/irq_64.c
+++ b/arch/x86/kernel/irq_64.c
@@ -22,6 +22,9 @@
 DEFINE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
 EXPORT_PER_CPU_SYMBOL(irq_stat);
 
+DEFINE_PER_CPU(struct pt_regs *, irq_regs);
+EXPORT_PER_CPU_SYMBOL(irq_regs);
+
 /*
  * Probabilistic stack overflow check:
  *
-- 
1.6.0.2


  parent reply	other threads:[~2009-01-21  8:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-21  8:46 [PATCHSET linux-2.6-x86:core/percpu] x86: misc clean up and unify x86_32/64 code paths Tejun Heo
2009-01-21  8:46 ` [PATCH 01/10] x86: update canary handling during switch Tejun Heo
2009-01-21  8:46 ` [PATCH 02/10] x86: clean up gdt_page definition Tejun Heo
2009-01-21  8:46 ` [PATCH 03/10] x86: fix percpu_write with 64-bit constants Tejun Heo
2009-01-21  8:46 ` [PATCH 04/10] x86: set %fs to __KERNEL_PERCPU unconditionally for x86_32 Tejun Heo
2009-01-21  8:46 ` [PATCH 05/10] x86: merge mmu_context.h Tejun Heo
2009-01-21  8:46 ` Tejun Heo [this message]
2009-01-21  8:46 ` [PATCH 07/10] x86: uv cleanup Tejun Heo
2009-01-21  8:46 ` [PATCH 08/10] x86: prepare for tlb merge Tejun Heo
2009-01-21  8:46 ` [PATCH 09/10] x86: make x86_32 use tlb_64.c Tejun Heo
2009-01-21  8:46 ` [PATCH 10/10] x86: rename tlb_64.c to tlb.c Tejun Heo
2009-01-21  9:26 ` [PATCHSET linux-2.6-x86:core/percpu] x86: misc clean up and unify x86_32/64 code paths Ingo Molnar
2009-01-21  9:35   ` Ingo Molnar
2009-01-21 10:43     ` Ingo Molnar
2009-01-21 11:02       ` Ingo Molnar
2009-01-21 11:20         ` Tejun Heo

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=1232527578-1960-7-git-send-email-tj@kernel.org \
    --to=tj@kernel.org \
    --cc=brgerst@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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