Commit 637a0900 authored by Gilles Chanteperdrix's avatar Gilles Chanteperdrix

Rollback ipipe-08 patch

parent ae3aafc9
......@@ -25,7 +25,7 @@ diff -uNrp 2.6.13/include/linux/hardirq.h 2.6.13-ipipe/include/linux/hardirq.h
static inline void account_user_vtime(struct task_struct *tsk)
diff -uNrp 2.6.13/include/linux/ipipe.h 2.6.13-ipipe/include/linux/ipipe.h
--- 2.6.13/include/linux/ipipe.h 1970-01-01 01:00:00.000000000 +0100
+++ 2.6.13-ipipe/include/linux/ipipe.h 2005-10-19 15:04:12.000000000 +0200
+++ 2.6.13-ipipe/include/linux/ipipe.h 2005-10-11 18:59:55.000000000 +0200
@@ -0,0 +1,746 @@
+/* -*- linux-c -*-
+ * include/linux/ipipe.h
......@@ -150,10 +150,10 @@ diff -uNrp 2.6.13/include/linux/ipipe.h 2.6.13-ipipe/include/linux/ipipe.h
+ struct list_head p_link; /* Link in pipeline */
+
+ struct ipcpudata {
+ unsigned long status;
+ unsigned long irq_pending_hi;
+ unsigned long irq_pending_lo[IPIPE_IRQ_IWORDS];
+ unsigned char irq_hits[IPIPE_NR_IRQS];
+ volatile unsigned long status;
+ volatile unsigned long irq_pending_hi;
+ volatile unsigned long irq_pending_lo[IPIPE_IRQ_IWORDS];
+ volatile unsigned irq_hits[IPIPE_NR_IRQS];
+ } cpudata[IPIPE_NR_CPUS];
+
+ struct {
......@@ -329,8 +329,6 @@ diff -uNrp 2.6.13/include/linux/ipipe.h 2.6.13-ipipe/include/linux/ipipe.h
+
+#ifdef CONFIG_PROC_FS
+void ipipe_init_proc(void);
+#else /* !CONFIG_PROC_FS */
+#define ipipe_init_proc() do { } while(0)
+#endif /* CONFIG_PROC_FS */
+
+void __ipipe_init_stage(struct ipipe_domain *ipd);
......@@ -759,6 +757,8 @@ diff -uNrp 2.6.13/include/linux/ipipe.h 2.6.13-ipipe/include/linux/ipipe.h
+#define spin_unlock_irq_hw(lock) spin_unlock_irq(lock)
+#define spin_lock_irqsave_hw(lock,flags) spin_lock_irqsave(lock, flags)
+#define spin_unlock_irqrestore_hw(lock,flags) spin_unlock_irqrestore(lock, flags)
+#define local_irq_save_hw(flags) local_irq_save(flags)
+#define local_irq_restore_hw(flags) local_irq_restore(flags)
+
+#define local_irq_enable_hw_cond() do { } while(0)
+#define local_irq_disable_hw_cond() do { } while(0)
......@@ -890,7 +890,7 @@ diff -uNrp 2.6.13/init/Kconfig 2.6.13-ipipe/init/Kconfig
This will show up when you type uname, for example.
diff -uNrp 2.6.13/init/main.c 2.6.13-ipipe/init/main.c
--- 2.6.13/init/main.c 2005-08-29 01:41:01.000000000 +0200
+++ 2.6.13-ipipe/init/main.c 2005-10-17 16:55:11.000000000 +0200
+++ 2.6.13-ipipe/init/main.c 2005-10-11 14:12:16.000000000 +0200
@@ -389,8 +389,9 @@ static void noinline rest_init(void)
*/
schedule();
......@@ -914,14 +914,6 @@ diff -uNrp 2.6.13/init/main.c 2.6.13-ipipe/init/main.c
/*
* HACK ALERT! This is early. We're enabling the console before
@@ -598,6 +604,7 @@ static void __init do_basic_setup(void)
#ifdef CONFIG_SYSCTL
sysctl_init();
#endif
+ ipipe_init_proc();
/* Networking initialization needs a process context */
sock_init();
diff -uNrp 2.6.13/kernel/Makefile 2.6.13-ipipe/kernel/Makefile
--- 2.6.13/kernel/Makefile 2005-08-29 01:41:01.000000000 +0200
+++ 2.6.13-ipipe/kernel/Makefile 2005-09-07 13:24:50.000000000 +0200
......@@ -992,8 +984,8 @@ diff -uNrp 2.6.13/kernel/ipipe/Makefile 2.6.13-ipipe/kernel/ipipe/Makefile
+obj-$(CONFIG_IPIPE) += core.o generic.o
diff -uNrp 2.6.13/kernel/ipipe/core.c 2.6.13-ipipe/kernel/ipipe/core.c
--- 2.6.13/kernel/ipipe/core.c 1970-01-01 01:00:00.000000000 +0100
+++ 2.6.13-ipipe/kernel/ipipe/core.c 2005-10-17 16:51:47.000000000 +0200
@@ -0,0 +1,678 @@
+++ 2.6.13-ipipe/kernel/ipipe/core.c 2005-10-11 14:12:16.000000000 +0200
@@ -0,0 +1,679 @@
+/* -*- linux-c -*-
+ * linux/kernel/ipipe/core.c
+ *
......@@ -1651,6 +1643,7 @@ diff -uNrp 2.6.13/kernel/ipipe/core.c 2.6.13-ipipe/kernel/ipipe/core.c
+
+void ipipe_init_proc(void)
+{
+
+ ipipe_proc_root = create_proc_entry("ipipe",S_IFDIR, 0);
+ create_proc_read_entry("version",0444,ipipe_proc_root,&__ipipe_version_info_proc,NULL);
+ __ipipe_add_domain_proc(ipipe_root_domain);
......@@ -1674,8 +1667,8 @@ diff -uNrp 2.6.13/kernel/ipipe/core.c 2.6.13-ipipe/kernel/ipipe/core.c
+EXPORT_SYMBOL(__ipipe_virtual_irq_map);
diff -uNrp 2.6.13/kernel/ipipe/generic.c 2.6.13-ipipe/kernel/ipipe/generic.c
--- 2.6.13/kernel/ipipe/generic.c 1970-01-01 01:00:00.000000000 +0100
+++ 2.6.13-ipipe/kernel/ipipe/generic.c 2005-10-16 23:28:19.000000000 +0200
@@ -0,0 +1,390 @@
+++ 2.6.13-ipipe/kernel/ipipe/generic.c 2005-10-11 14:12:16.000000000 +0200
@@ -0,0 +1,395 @@
+/* -*- linux-c -*-
+ * linux/kernel/ipipe/generic.c
+ *
......@@ -1704,6 +1697,7 @@ diff -uNrp 2.6.13/kernel/ipipe/generic.c 2.6.13-ipipe/kernel/ipipe/generic.c
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/irq.h>
+#ifdef CONFIG_PROC_FS
+#include <linux/proc_fs.h>
+#endif /* CONFIG_PROC_FS */
......@@ -2056,8 +2050,12 @@ diff -uNrp 2.6.13/kernel/ipipe/generic.c 2.6.13-ipipe/kernel/ipipe/generic.c
+
+EXPORT_SYMBOL(ipipe_register_domain);
+EXPORT_SYMBOL(ipipe_unregister_domain);
+EXPORT_SYMBOL(ipipe_virtualize_irq);
+EXPORT_SYMBOL(ipipe_control_irq);
+EXPORT_SYMBOL(ipipe_free_virq);
+EXPORT_SYMBOL(ipipe_init_attr);
+EXPORT_SYMBOL(ipipe_get_sysinfo);
+EXPORT_SYMBOL(ipipe_tune_timer);
+EXPORT_SYMBOL(ipipe_catch_event);
+EXPORT_SYMBOL(ipipe_alloc_ptdkey);
+EXPORT_SYMBOL(ipipe_free_ptdkey);
......@@ -2281,6 +2279,17 @@ diff -uNrp 2.6.13/kernel/signal.c 2.6.13-ipipe/kernel/signal.c
/*
* For SIGKILL, we want to wake it up in the stopped/traced case.
diff -uNrp 2.6.13/kernel/sysctl.c 2.6.13-ipipe/kernel/sysctl.c
--- 2.6.13/kernel/sysctl.c 2005-08-29 01:41:01.000000000 +0200
+++ 2.6.13-ipipe/kernel/sysctl.c 2005-09-07 13:24:50.000000000 +0200
@@ -999,6 +999,7 @@ void __init sysctl_init(void)
#ifdef CONFIG_PROC_FS
register_proc_table(root_table, proc_sys_root);
init_irq_proc();
+ ipipe_init_proc();
#endif
}
diff -uNrp 2.6.13/lib/smp_processor_id.c 2.6.13-ipipe/lib/smp_processor_id.c
--- 2.6.13/lib/smp_processor_id.c 2005-08-29 01:41:01.000000000 +0200
+++ 2.6.13-ipipe/lib/smp_processor_id.c 2005-09-07 13:24:50.000000000 +0200
......@@ -2382,7 +2391,7 @@ diff -uNrp 2.6.13/mm/vmalloc.c 2.6.13-ipipe/mm/vmalloc.c
/* see sw-dev-man vol 3, chapter 7.4.13.5 */
printk(KERN_INFO "spurious APIC interrupt on CPU#%d, should never happen.\n",
--- 2.6.13/arch/i386/kernel/entry.S 2005-08-29 01:41:01.000000000 +0200
+++ 2.6.13-ipipe/arch/i386/kernel/entry.S 2005-10-18 23:08:00.000000000 +0200
+++ 2.6.13-ipipe/arch/i386/kernel/entry.S 2005-10-12 19:25:51.000000000 +0200
@@ -48,6 +48,7 @@
#include <asm/smp.h>
#include <asm/page.h>
......@@ -3187,8 +3196,8 @@ diff -uNrp 2.6.13/mm/vmalloc.c 2.6.13-ipipe/mm/vmalloc.c
return 0;
}
--- 2.6.13/arch/i386/kernel/ipipe-core.c 1970-01-01 01:00:00.000000000 +0100
+++ 2.6.13-ipipe/arch/i386/kernel/ipipe-core.c 2005-10-18 16:37:11.000000000 +0200
@@ -0,0 +1,601 @@
+++ 2.6.13-ipipe/arch/i386/kernel/ipipe-core.c 2005-10-03 11:30:16.000000000 +0200
@@ -0,0 +1,598 @@
+/* -*- linux-c -*-
+ * linux/arch/i386/kernel/ipipe-core.c
+ *
......@@ -3755,30 +3764,31 @@ diff -uNrp 2.6.13/mm/vmalloc.c 2.6.13-ipipe/mm/vmalloc.c
+int ipipe_tune_timer (unsigned long ns, int flags)
+
+{
+ unsigned hz, latch;
+ unsigned long x;
+ unsigned hz, latch;
+ unsigned long x;
+
+ if (flags & IPIPE_RESET_TIMER)
+ latch = LATCH;
+ else {
+ hz = 1000000000 / ns;
+ if (flags & IPIPE_RESET_TIMER)
+ latch = LATCH;
+ else
+ {
+ hz = 1000000000 / ns;
+
+ if (hz < HZ)
+ return -EINVAL;
+ if (hz < HZ)
+ return -EINVAL;
+
+ latch = (CLOCK_TICK_RATE + hz/2) / hz;
+ latch = (CLOCK_TICK_RATE + hz/2) / hz;
+ }
+
+ x = ipipe_critical_enter(NULL); /* Sync with all CPUs */
+ x = ipipe_critical_enter(NULL); /* Sync with all CPUs */
+
+ /* Shamelessly lifted from init_IRQ() in i8259.c */
+ outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */
+ outb_p(latch & 0xff,0x40); /* LSB */
+ outb(latch >> 8,0x40); /* MSB */
+ /* Shamelessly lifted from init_IRQ() in i8259.c */
+ outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */
+ outb_p(latch & 0xff,0x40); /* LSB */
+ outb(latch >> 8,0x40); /* MSB */
+
+ ipipe_critical_exit(x);
+ ipipe_critical_exit(x);
+
+ return 0;
+ return 0;
+}
+
+EXPORT_SYMBOL(__ipipe_sync_stage);
......@@ -3786,12 +3796,8 @@ diff -uNrp 2.6.13/mm/vmalloc.c 2.6.13-ipipe/mm/vmalloc.c
+EXPORT_SYMBOL(ipipe_critical_enter);
+EXPORT_SYMBOL(ipipe_critical_exit);
+EXPORT_SYMBOL(ipipe_trigger_irq);
+EXPORT_SYMBOL(ipipe_virtualize_irq);
+EXPORT_SYMBOL(ipipe_control_irq);
+EXPORT_SYMBOL(ipipe_get_sysinfo);
+EXPORT_SYMBOL(ipipe_tune_timer);
--- 2.6.13/arch/i386/kernel/ipipe-root.c 1970-01-01 01:00:00.000000000 +0100
+++ 2.6.13-ipipe/arch/i386/kernel/ipipe-root.c 2005-10-18 08:57:25.000000000 +0200
+++ 2.6.13-ipipe/arch/i386/kernel/ipipe-root.c 2005-10-06 16:20:19.000000000 +0200
@@ -0,0 +1,607 @@
+/* -*- linux-c -*-
+ * linux/arch/i386/kernel/ipipe-root.c
......@@ -4216,7 +4222,7 @@ diff -uNrp 2.6.13/mm/vmalloc.c 2.6.13-ipipe/mm/vmalloc.c
+{
+ if (__ipipe_event_monitors[vector] == 0 ||
+ __ipipe_dispatch_event(vector,regs) == 0) {
+ __ipipe_exptr handler = __ipipe_std_extable[vector];
+ void (*fastcall handler)(struct pt_regs *, long) = __ipipe_std_extable[vector];
+ handler(regs,error_code);
+ __fixup_if(regs);
+ return 0;
......@@ -4826,8 +4832,8 @@ diff -uNrp 2.6.13/mm/vmalloc.c 2.6.13-ipipe/mm/vmalloc.c
#define shutdown_level_ioapic mask_IO_APIC_irq
#define enable_level_ioapic unmask_IO_APIC_irq
--- 2.6.13/include/asm-i386/ipipe.h 1970-01-01 01:00:00.000000000 +0100
+++ 2.6.13-ipipe/include/asm-i386/ipipe.h 2005-10-18 08:57:41.000000000 +0200
@@ -0,0 +1,193 @@
+++ 2.6.13-ipipe/include/asm-i386/ipipe.h 2005-10-13 11:28:57.000000000 +0200
@@ -0,0 +1,207 @@
+/* -*- linux-c -*-
+ * include/asm-i386/ipipe.h
+ *
......@@ -4858,10 +4864,10 @@ diff -uNrp 2.6.13/mm/vmalloc.c 2.6.13-ipipe/mm/vmalloc.c
+
+#include <irq_vectors.h>
+
+#define IPIPE_ARCH_STRING "1.0-08"
+#define IPIPE_ARCH_STRING "1.0-07"
+#define IPIPE_MAJOR_NUMBER 1
+#define IPIPE_MINOR_NUMBER 0
+#define IPIPE_PATCH_NUMBER 8
+#define IPIPE_PATCH_NUMBER 7
+
+#ifdef CONFIG_X86_LOCAL_APIC
+/* We want to cover the whole IRQ space when the APIC is enabled. */
......@@ -4984,6 +4990,20 @@ diff -uNrp 2.6.13/mm/vmalloc.c 2.6.13-ipipe/mm/vmalloc.c
+ } archdep;
+};
+
+#define ipipe_hw_save_flags_and_sti(x) __asm__ __volatile__("pushfl ; popl %0 ; sti":"=g" (x): /* no input */ :"memory")
+#define local_irq_disable_hw() __asm__ __volatile__("cli": : :"memory")
+#define local_irq_enable_hw() __asm__ __volatile__("sti": : :"memory")
+#define local_irq_save_hw(x) __asm__ __volatile__("pushfl ; popl %0 ; cli":"=g" (x): /* no input */ :"memory")
+#define local_irq_restore_hw(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory", "cc")
+#define local_save_flags_hw(x) __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */)
+#define local_test_iflag_hw(x) ((x) & (1<<9))
+#define irqs_disabled_hw() \
+({ \
+ unsigned long flags; \
+ local_save_flags_hw(flags); \
+ !local_test_iflag_hw(flags); \
+})
+
+#define ipipe_read_tsc(t) __asm__ __volatile__("rdtsc" : "=A" (t))
+#define ipipe_cpu_freq() ({ unsigned long long __freq = cpu_has_tsc?(1000LL * cpu_khz):CLOCK_TICK_RATE; __freq; })
+#define ipipe_tsc2ns(t) (((t) * 1000) / (cpu_khz / 1000))
......@@ -5136,8 +5156,8 @@ diff -uNrp 2.6.13/mm/vmalloc.c 2.6.13-ipipe/mm/vmalloc.c
/*
* This works. Despite all the confusion.
--- 2.6.13/include/asm-i386/system.h 2005-08-29 01:41:01.000000000 +0200
+++ 2.6.13-ipipe/include/asm-i386/system.h 2005-10-17 17:06:14.000000000 +0200
@@ -441,6 +441,49 @@ struct alt_instr {
+++ 2.6.13-ipipe/include/asm-i386/system.h 2005-09-10 12:28:35.000000000 +0200
@@ -441,6 +441,35 @@ struct alt_instr {
#define set_wmb(var, value) do { var = value; wmb(); } while (0)
/* interrupt control.. */
......@@ -5168,34 +5188,15 @@ diff -uNrp 2.6.13/mm/vmalloc.c 2.6.13-ipipe/mm/vmalloc.c
+ __asm__ __volatile__("sti; hlt": : :"memory"); \
+} while(0)
+
+#define ipipe_hw_save_flags_and_sti(x) __asm__ __volatile__("pushfl ; popl %0 ; sti":"=g" (x): /* no input */ :"memory")
+#define local_irq_disable_hw() __asm__ __volatile__("cli": : :"memory")
+#define local_irq_enable_hw() __asm__ __volatile__("sti": : :"memory")
+#define local_irq_save_hw(x) __asm__ __volatile__("pushfl ; popl %0 ; cli":"=g" (x): /* no input */ :"memory")
+#define local_irq_restore_hw(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory", "cc")
+#define local_save_flags_hw(x) __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */)
+#define local_test_iflag_hw(x) ((x) & (1<<9))
+#define irqs_disabled_hw() \
+({ \
+ unsigned long flags; \
+ local_save_flags_hw(flags); \
+ !local_test_iflag_hw(flags); \
+})
+
+#else /* !CONFIG_IPIPE */
+
#define local_save_flags(x) do { typecheck(unsigned long,x); __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */); } while (0)
#define local_irq_restore(x) do { typecheck(unsigned long,x); __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory", "cc"); } while (0)
#define local_irq_disable() __asm__ __volatile__("cli": : :"memory")
@@ -458,6 +501,13 @@ struct alt_instr {
@@ -458,6 +487,8 @@ struct alt_instr {
/* For spinlocks etc */
#define local_irq_save(x) __asm__ __volatile__("pushfl ; popl %0 ; cli":"=g" (x): /* no input */ :"memory")
+#define local_irq_save_hw(flags) local_irq_save(flags)
+#define local_irq_restore_hw(flags) local_irq_restore(flags)
+#define local_irq_enable_hw() local_irq_enable()
+#define local_irq_disable_hw(flags) local_irq_disable()
+
+#endif /* CONFIG_IPIPE */
+
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment