patches/0008-amd64-failed-to-build-due-to-undefined-pda-structur.patch
author Florian Westphal <fw@strlen.de>
Thu, 09 Apr 2009 12:07:21 +0200
changeset 2 d1f6d8b6f81c
permissions -rw-r--r--
Linux 2.6.29 for NSC 0.5.0.

From d64cc45d2ce0596cecf2a712ca10f968cb4d72d8 Mon Sep 17 00:00:00 2001
From: Florian Westphal <fw@strlen.de>
Date: Thu, 26 Mar 2009 22:57:56 +0100
Subject: [PATCH] amd64: failed to build due to undefined pda structure

---
 arch/x86/include/asm/hardirq_64.h |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/arch/x86/include/asm/hardirq_64.h b/arch/x86/include/asm/hardirq_64.h
index b5a6b5d..43443dc 100644
--- a/arch/x86/include/asm/hardirq_64.h
+++ b/arch/x86/include/asm/hardirq_64.h
@@ -1,6 +1,7 @@
 #ifndef _ASM_X86_HARDIRQ_64_H
 #define _ASM_X86_HARDIRQ_64_H
-
+/* For CONFIG_NSC, just ignore this stuff... Fall back... */
+#ifndef CONFIG_NSC
 #include <linux/threads.h>
 #include <linux/irq.h>
 #include <asm/pda.h>
@@ -21,5 +22,25 @@
 #define or_softirq_pending(x)  or_pda(__softirq_pending, (x))
 
 extern void ack_bad_irq(unsigned int irq);
+#else // NSC
+
+#include <linux/threads.h>
+#include <linux/irq.h>
+
+typedef struct {
+	unsigned int __softirq_pending;
+	unsigned long idle_timestamp;
+	unsigned int __nmi_count;       /* arch dependent */
+	unsigned int apic_timer_irqs;   /* arch dependent */
+} ____cacheline_aligned irq_cpustat_t;
+
+DECLARE_PER_CPU(irq_cpustat_t, irq_stat);
+extern irq_cpustat_t irq_stat[];
+
+#define __ARCH_IRQ_STAT
+#define __IRQ_STAT(cpu, member) (per_cpu(irq_stat, cpu).member)
+
+#include <linux/irq_cpustat.h>
 
+#endif // CONFIG_NSC
 #endif /* _ASM_X86_HARDIRQ_64_H */
-- 
1.6.0.6