Skip to contentSkip to conversation

Adeos PowerPC port over 2.6.21

Xenomai-core Applied Benjamin ZORES 2 participants 11 messages Jul 30, 2007 – Sep 24, 2007

Subsystems (14)
Memory management PowerPC Kbuild PCI +10 more subsystems
lore
Share & tools
lore
#0 lore raw

Hi,

I've seen that Adeos has been officially ported to PowerPC architecture.
Please find an update of the adeos-ipipe-2.6.20-powerpc-1.6-02 to Linux 2.6.21 (.5) kernel, in case somebody's interested in it.

Ben

arch/powerpc/boot/Makefile +8 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/boot/Makefile linux-2.6.21.5/arch/powerpc/boot/Makefile
@@ -27,6 +27,14 @@
 		   $(shell $(CROSS32CC) -print-file-name=include) -fPIC
 BOOTAFLAGS	:= -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
 
+ifdef CONFIG_IPIPE_TRACE
+# do not trace the boot loader
+nullstring :=
+space      := $(nullstring) # end of the line
+pg_flag     = $(nullstring) -pg # end of the line
+BOOTCFLAGS     := $(subst ${pg_flag},${space},${BOOTCFLAGS})
+endif
+
 ifeq ($(call cc-option-yn, -fstack-protector),y)
 BOOTCFLAGS	+= -fno-stack-protector
 endif
arch/powerpc/Kconfig +2 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/Kconfig linux-2.6.21.5/arch/powerpc/Kconfig
@@ -758,6 +758,8 @@
 
 menu "Kernel options"
 
+source "kernel/ipipe/Kconfig"
+
 config HIGHMEM
 	bool "High memory support"
 	depends on PPC32
arch/powerpc/kernel/cputable.c +2 -2
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/cputable.c linux-2.6.21.5/arch/powerpc/kernel/cputable.c
@@ -1255,7 +1255,7 @@
 #endif /* CONFIG_PPC32 */
 };
 
-struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
+notrace struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
 {
 	struct cpu_spec *s = cpu_specs;
 	struct cpu_spec **cur = &cur_cpu_spec;
@@ -1284,7 +1284,7 @@
 	return NULL;
 }
 
-void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
+notrace void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
 {
 	struct fixup_entry {
 		unsigned long	mask;
arch/powerpc/kernel/entry_32.S +91 -0

139 lines not on this page · raw message

arch/powerpc/kernel/head_32.S +14 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/head_32.S linux-2.6.21.5/arch/powerpc/kernel/head_32.S
@@ -329,6 +329,12 @@
 	EXC_XFER_TEMPLATE(n, hdlr, n, NOCOPY, transfer_to_handler_full,	\
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -413,7 +419,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* External interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* Alignment exception */
 	. = 0x600
@@ -445,7 +455,11 @@
 	EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception)
 
 /* Decrementer */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x900, Decrementer, __ipipe_grab_timer, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE)
 	EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE)
arch/powerpc/kernel/head_44x.S +5 -2
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/head_44x.S linux-2.6.21.5/arch/powerpc/kernel/head_44x.S
@@ -424,8 +424,11 @@
 	/* Instruction Storage Interrupt */
 	INSTRUCTION_STORAGE_EXCEPTION
 
-	/* External Input Interrupt */
-	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, ExternalInput, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
+ 	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	/* Alignment Interrupt */
 	ALIGNMENT_EXCEPTION
arch/powerpc/kernel/head_4xx.S +14 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/head_4xx.S linux-2.6.21.5/arch/powerpc/kernel/head_4xx.S
@@ -228,6 +228,12 @@
 	EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -396,7 +402,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* 0x0500 - External Interrupt Exception */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x0500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* 0x0600 - Alignment Exception */
 	START_EXCEPTION(0x0600, Alignment)
@@ -434,7 +444,11 @@
 	lis	r0,TSR_PIS@h
 	mtspr	SPRN_TSR,r0		/* Clear the PIT exception */
 	addi	r3,r1,STACK_FRAME_OVERHEAD
+#ifdef CONFIG_IPIPE
+	EXC_XFER_IPIPE(0x1000, __ipipe_grab_timer)
+#else /* !CONFIG_IPIPE */
 	EXC_XFER_LITE(0x1000, timer_interrupt)
+#endif /* CONFIG_IPIPE */
 
 #if 0
 /* NOTE:
arch/powerpc/kernel/head_8xx.S +14 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/head_8xx.S linux-2.6.21.5/arch/powerpc/kernel/head_8xx.S
@@ -187,6 +187,12 @@
 	EXC_XFER_TEMPLATE(n, hdlr, n, NOCOPY, transfer_to_handler_full,	\
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+ 
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -238,7 +244,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* External interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* Alignment exception */
 	. = 0x600
@@ -259,7 +269,11 @@
 	EXCEPTION(0x800, FPUnavailable, unknown_exception, EXC_XFER_STD)
 
 /* Decrementer */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x900, Decrementer, __ipipe_grab_timer, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE)
 	EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE)
arch/powerpc/kernel/head_booke.h +16 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/head_booke.h linux-2.6.21.5/arch/powerpc/kernel/head_booke.h
@@ -187,6 +187,12 @@
 	EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -345,6 +351,15 @@
 	addi	r3,r1,STACK_FRAME_OVERHEAD;				      \
 	EXC_XFER_STD(0x0700, program_check_exception)
 
+#ifdef CONFIG_IPIPE
+#define DECREMENTER_EXCEPTION						      \
+	START_EXCEPTION(Decrementer)					      \
+	NORMAL_EXCEPTION_PROLOG;					      \
+	lis     r0,TSR_DIS@h;           /* Setup the DEC interrupt mask */    \
+	mtspr   SPRN_TSR,r0;		/* Clear the DEC interrupt */	      \
+	addi    r3,r1,STACK_FRAME_OVERHEAD;				      \
+	EXC_XFER_IPIPE(0x0900, __ipipe_grab_timer)
+#else /* !CONFIG_IPIPE */
 #define DECREMENTER_EXCEPTION						      \
 	START_EXCEPTION(Decrementer)					      \
 	NORMAL_EXCEPTION_PROLOG;					      \
@@ -352,6 +367,7 @@
 	mtspr   SPRN_TSR,r0;		/* Clear the DEC interrupt */	      \
 	addi    r3,r1,STACK_FRAME_OVERHEAD;				      \
 	EXC_XFER_LITE(0x0900, timer_interrupt)
+#endif /* CONFIG_IPIPE */
 
 #define FP_UNAVAILABLE_EXCEPTION					      \
 	START_EXCEPTION(FloatingPointUnavailable)			      \
arch/powerpc/kernel/head_fsl_booke.S +4 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/head_fsl_booke.S linux-2.6.21.5/arch/powerpc/kernel/head_fsl_booke.S
@@ -529,7 +529,11 @@
 	INSTRUCTION_STORAGE_EXCEPTION
 
 	/* External Input Interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, ExternalInput, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	/* Alignment Interrupt */
 	ALIGNMENT_EXCEPTION
arch/powerpc/kernel/idle.c +3 -2
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/idle.c linux-2.6.21.5/arch/powerpc/kernel/idle.c
@@ -58,6 +58,7 @@
 	while (1) {
 		while (!need_resched() && !cpu_should_die()) {
 			ppc64_runlatch_off();
+			ipipe_suspend_domain();
 
 			if (ppc_md.power_save) {
 				clear_thread_flag(TIF_POLLING_NRFLAG);
@@ -66,13 +67,13 @@
 				 * is ordered w.r.t. need_resched() test.
 				 */
 				smp_mb();
-				local_irq_disable();
+				local_irq_disable_hw();
 
 				/* check again after disabling irqs */
 				if (!need_resched() && !cpu_should_die())
 					ppc_md.power_save();
 
-				local_irq_enable();
+				local_irq_enable_hw();
 				set_thread_flag(TIF_POLLING_NRFLAG);
 
 			} else {
arch/powerpc/kernel/io.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/io.c linux-2.6.21.5/arch/powerpc/kernel/io.c
@@ -120,7 +120,7 @@
 
 #define IO_CHECK_ALIGN(v,a) ((((unsigned long)(v)) & ((a) - 1)) == 0)
 
-void _memset_io(volatile void __iomem *addr, int c, unsigned long n)
+notrace void _memset_io(volatile void __iomem *addr, int c, unsigned long n)
 {
 	void *p = (void __force *)addr;
 	u32 lc = c;
arch/powerpc/kernel/ipipe.c +649 -0

649 lines not on this page · raw message

arch/powerpc/kernel/irq.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/irq.c linux-2.6.21.5/arch/powerpc/kernel/irq.c
@@ -70,7 +70,7 @@
 #endif
 
 int __irq_offset_value;
-static int ppc_spurious_interrupts;
+int ppc_spurious_interrupts;
 
 #ifdef CONFIG_PPC32
 EXPORT_SYMBOL(__irq_offset_value);
arch/powerpc/kernel/Makefile +2 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/Makefile linux-2.6.21.5/arch/powerpc/kernel/Makefile
@@ -57,6 +57,8 @@
 obj-$(CONFIG_MODULES)		+= ppc_ksyms.o
 obj-$(CONFIG_BOOTX_TEXT)	+= btext.o
 obj-$(CONFIG_SMP)		+= smp.o
+obj-$(CONFIG_IPIPE)		+= ipipe.o
+obj-$(CONFIG_IPIPE_TRACE_MCOUNT)	+= mcount.o
 obj-$(CONFIG_KPROBES)		+= kprobes.o
 obj-$(CONFIG_PPC_UDBG_16550)	+= legacy_serial.o udbg_16550.o
 
arch/powerpc/kernel/mcount.S +75 -0

75 lines not on this page · raw message

arch/powerpc/kernel/setup_32.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/setup_32.c linux-2.6.21.5/arch/powerpc/kernel/setup_32.c
@@ -85,7 +85,7 @@
  * from the address that it was linked at, so we must use RELOC/PTRRELOC
  * to access static data (including strings).  -- paulus
  */
-unsigned long __init early_init(unsigned long dt_ptr)
+unsigned long notrace __init early_init(unsigned long dt_ptr)
 {
 	unsigned long offset = reloc_offset();
 	struct cpu_spec *spec;
arch/powerpc/kernel/time.c +12 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/time.c linux-2.6.21.5/arch/powerpc/kernel/time.c
@@ -74,6 +74,8 @@
 #endif
 #include <asm/smp.h>
 
+unsigned long disarm_decr[NR_CPUS];
+
 /* keep track of when we need to update the rtc */
 time_t last_rtc_update;
 #ifdef CONFIG_PPC_ISERIES
@@ -625,7 +627,9 @@
 #endif
 
 	old_regs = set_irq_regs(regs);
+#ifndef CONFIG_IPIPE
 	irq_enter();
+#endif
 
 	profile_tick(CPU_PROFILING);
 	calculate_steal_time();
@@ -651,7 +655,11 @@
 		 * is the case.
 		 */
 		if (!cpu_is_offline(cpu))
+#ifdef CONFIG_IPIPE
+			account_process_time(__ipipe_tick_regs + cpu);
+#else
 			account_process_time(regs);
+#endif
 
 		/*
 		 * No need to check whether cpu is offline here; boot_cpuid
@@ -672,7 +680,8 @@
 	}
 	
 	next_dec = tb_ticks_per_jiffy - ticks;
-	set_dec(next_dec);
+	if ( !disarm_decr[cpu] )
+	    set_dec(next_dec);
 
 #ifdef CONFIG_PPC_ISERIES
 	if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending())
@@ -687,7 +696,9 @@
 	}
 #endif
 
+#ifndef CONFIG_IPIPE
 	irq_exit();
+#endif
 	set_irq_regs(old_regs);
 }
 
arch/powerpc/kernel/traps.c +47 -1

149 lines not on this page · raw message

arch/powerpc/mm/fault.c +3 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/mm/fault.c linux-2.6.21.5/arch/powerpc/mm/fault.c
@@ -160,6 +160,9 @@
 	int trap = TRAP(regs);
  	int is_exec = trap == 0x400;
 
+	if (ipipe_trap_notify(IPIPE_TRAP_ACCESS,regs))
+	    	return 0;
+
 #if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
 	/*
 	 * Fortunately the bit assignments in SRR1 for an instruction
arch/powerpc/platforms/iseries/irq.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/platforms/iseries/irq.c linux-2.6.21.5/arch/powerpc/platforms/iseries/irq.c
@@ -81,7 +81,7 @@
 	} data;
 };
 
-static DEFINE_SPINLOCK(pending_irqs_lock);
+static IPIPE_DEFINE_SPINLOCK(pending_irqs_lock);
 static int num_pending_irqs;
 static int pending_irqs[NR_IRQS];
 
arch/powerpc/platforms/powermac/pic.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/platforms/powermac/pic.c linux-2.6.21.5/arch/powerpc/platforms/powermac/pic.c
@@ -63,7 +63,7 @@
 static int max_real_irqs;
 static u32 level_mask[4];
 
-static DEFINE_SPINLOCK(pmac_pic_lock);
+static IPIPE_DEFINE_SPINLOCK(pmac_pic_lock);
 
 #define NR_MASK_WORDS	((NR_IRQS + 31) / 32)
 static unsigned long ppc_lost_interrupts[NR_MASK_WORDS];
arch/powerpc/platforms/ps3/interrupt.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/platforms/ps3/interrupt.c linux-2.6.21.5/arch/powerpc/platforms/ps3/interrupt.c
@@ -71,7 +71,7 @@
 		u64 unused_2[3];
 	};
 	u64 ipi_debug_brk_mask;
-	spinlock_t lock;
+	ipipe_spinlock_t lock;
 };
 
 /**
arch/powerpc/sysdev/i8259.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/sysdev/i8259.c linux-2.6.21.5/arch/powerpc/sysdev/i8259.c
@@ -23,7 +23,7 @@
 #define cached_A1 (cached_8259[0])
 #define cached_21 (cached_8259[1])
 
-static DEFINE_SPINLOCK(i8259_lock);
+static IPIPE_DEFINE_SPINLOCK(i8259_lock);
 
 static struct device_node *i8259_node;
 static struct irq_host *i8259_host;
arch/powerpc/sysdev/ipic.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/sysdev/ipic.c linux-2.6.21.5/arch/powerpc/sysdev/ipic.c
@@ -30,7 +30,7 @@
 #include "ipic.h"
 
 static struct ipic * primary_ipic;
-static DEFINE_SPINLOCK(ipic_lock);
+static IPIPE_DEFINE_SPINLOCK(ipic_lock);
 
 static struct ipic_info ipic_info[] = {
 	[9] = {
arch/powerpc/sysdev/mpic.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/sysdev/mpic.c linux-2.6.21.5/arch/powerpc/sysdev/mpic.c
@@ -44,7 +44,7 @@
 
 static struct mpic *mpics;
 static struct mpic *mpic_primary;
-static DEFINE_SPINLOCK(mpic_lock);
+static IPIPE_DEFINE_SPINLOCK(mpic_lock);
 
 #ifdef CONFIG_PPC32	/* XXX for now */
 #ifdef CONFIG_IRQ_ALL_CPUS
arch/powerpc/sysdev/tsi108_pci.c +10 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/sysdev/tsi108_pci.c linux-2.6.21.5/arch/powerpc/sysdev/tsi108_pci.c
@@ -249,7 +249,9 @@
 {
 	u_int irp_cfg;
 	int int_line = (irq - IRQ_PCI_INTAD_BASE);
+	unsigned long flags;
 
+	local_irq_save_hw_cond(flags);
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
 	mb();
 	irp_cfg |= (1 << int_line);	/* INTx_DIR = output */
@@ -257,19 +259,23 @@
 	tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL, irp_cfg);
 	mb();
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
+	local_irq_restore_hw_cond(flags);
 }
 
 static void tsi108_pci_int_unmask(u_int irq)
 {
 	u_int irp_cfg;
 	int int_line = (irq - IRQ_PCI_INTAD_BASE);
+	unsigned long flags;
 
+	local_irq_save_hw_cond(flags);
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
 	mb();
 	irp_cfg &= ~(1 << int_line);
 	irp_cfg |= (3 << (8 + (int_line * 2)));
 	tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL, irp_cfg);
 	mb();
+	local_irq_restore_hw_cond(flags);
 }
 
 static void init_pci_source(void)
@@ -360,6 +366,9 @@
 
 static void tsi108_pci_irq_end(u_int irq)
 {
+	unsigned long flags;
+
+	local_irq_save_hw_cond(flags);
 	tsi108_pci_int_unmask(irq);
 
 	/* Enable interrupts from PCI block */
@@ -367,6 +376,7 @@
 			 tsi108_read_reg(TSI108_PCI_OFFSET +
 					 TSI108_PCI_IRP_ENABLE) |
 			 TSI108_PCI_IRP_ENABLE_P_INT);
+	local_irq_restore_hw_cond(flags);
 	mb();
 }
 
drivers/pci/htirq.c +1 -1
diff -Naur linux-2.6.21.5.orig/drivers/pci/htirq.c linux-2.6.21.5/drivers/pci/htirq.c
@@ -21,7 +21,7 @@
  * With multiple simultaneous hypertransport irq devices it might pay
  * to make this more fine grained.  But start with simple, stupid, and correct.
  */
-static DEFINE_SPINLOCK(ht_irq_lock);
+static IPIPE_DEFINE_SPINLOCK(ht_irq_lock);
 
 struct ht_irq_cfg {
 	struct pci_dev *dev;
drivers/serial/mpc52xx_uart.c +34 -0
diff -Naur linux-2.6.21.5.orig/drivers/serial/mpc52xx_uart.c linux-2.6.21.5/drivers/serial/mpc52xx_uart.c
@@ -803,6 +803,40 @@
 #endif
 
 
+#ifdef CONFIG_IPIPE
+
+#include <stdarg.h>
+
+void __ipipe_serial_debug(const char *fmt, ...)
+{
+	struct console *co = MPC52xx_PSC_CONSOLE;
+	unsigned long flags, count;
+	struct uart_port *port;
+	char buf[128];
+	va_list ap;
+
+	if (co->index < 0)
+		return;		/* No console. */
+
+	port = &mpc52xx_uart_ports[co->index];
+
+	if (!port->mapbase)
+		return;		/* Too early. */
+
+	va_start(ap, fmt);
+	vsprintf(buf, fmt, ap);
+	va_end(ap);
+	count = strlen(buf);
+
+	local_irq_save_hw(flags);
+	mpc52xx_console_write(co, buf, count);
+	local_irq_restore_hw(flags);
+}
+
+EXPORT_SYMBOL(__ipipe_serial_debug);
+
+#endif
+
 /* ======================================================================== */
 /* UART Driver                                                              */
 /* ======================================================================== */
include/asm-powerpc/hw_irq.h +132 -10

178 lines not on this page · raw message

include/asm-powerpc/ipipe.h +219 -0

219 lines not on this page · raw message

include/asm-ppc/mmu_context.h +11 -1
diff -Naur linux-2.6.21.5.orig/include/asm-ppc/mmu_context.h linux-2.6.21.5/include/asm-ppc/mmu_context.h
@@ -153,7 +153,10 @@
  */
 static inline void destroy_context(struct mm_struct *mm)
 {
+	unsigned long flags;
+
 	preempt_disable();
+	local_irq_save_hw_cond(flags);
 	if (mm->context.id != NO_CONTEXT) {
 		clear_bit(mm->context.id, context_map);
 		mm->context.id = NO_CONTEXT;
@@ -161,6 +164,7 @@
 		atomic_inc(&nr_free_contexts);
 #endif
 	}
+ 	local_irq_restore_hw_cond(flags);
 	preempt_enable();
 }
 
@@ -193,7 +197,13 @@
  * After we have set current->mm to a new value, this activates
  * the context for the new mm so we see the new mappings.
  */
-#define activate_mm(active_mm, mm)   switch_mm(active_mm, mm, current)
+#define activate_mm(active_mm, mm)   \
+do { \
+	unsigned long flags; \
+	local_irq_save_hw_cond(flags); \
+	switch_mm(active_mm, mm, current); \
+	local_irq_restore_hw_cond(flags);	   \
+} while(0)
 
 extern void mmu_context_init(void);
 
include/linux/hardirq.h +2 -2
diff -Naur linux-2.6.21.5.orig/include/linux/hardirq.h linux-2.6.21.5/include/linux/hardirq.h
@@ -133,7 +133,7 @@
  */
 extern void irq_exit(void);
 
-#define nmi_enter()		do { lockdep_off(); __irq_enter(); } while (0)
-#define nmi_exit()		do { __irq_exit(); lockdep_on(); } while (0)
+#define nmi_enter()		do { if (ipipe_root_domain_p) { lockdep_off(); __irq_enter(); } } while (0)
+#define nmi_exit()		do { if (ipipe_root_domain_p) { __irq_exit(); lockdep_on(); } } while (0)
 
 #endif /* LINUX_HARDIRQ_H */
include/linux/ipipe_base.h +88 -0

88 lines not on this page · raw message

include/linux/ipipe.h +692 -0

692 lines not on this page · raw message

include/linux/ipipe_trace.h +49 -0

49 lines not on this page · raw message

include/linux/irq.h +6 -0
diff -Naur linux-2.6.21.5.orig/include/linux/irq.h linux-2.6.21.5/include/linux/irq.h
@@ -151,6 +151,12 @@
  * Pad this out to 32 bytes for cache and indexing reasons.
  */
 struct irq_desc {
+#ifdef CONFIG_IPIPE
+	void			fastcall (*ipipe_ack)(unsigned int irq,
+						      struct irq_desc *desc);
+	void			fastcall (*ipipe_end)(unsigned int irq,
+						      struct irq_desc *desc);
+#endif /* CONFIG_IPIPE */
 	irq_flow_handler_t	handle_irq;
 	struct irq_chip		*chip;
 	struct msi_desc		*msi_desc;
include/linux/kernel.h +6 -2
diff -Naur linux-2.6.21.5.orig/include/linux/kernel.h linux-2.6.21.5/include/linux/kernel.h
@@ -14,6 +14,7 @@
 #include <linux/compiler.h>
 #include <linux/bitops.h>
 #include <linux/log2.h>
+#include <linux/ipipe_base.h>
 #include <asm/byteorder.h>
 #include <asm/bug.h>
 
@@ -72,9 +73,12 @@
  */
 #ifdef CONFIG_PREEMPT_VOLUNTARY
 extern int cond_resched(void);
-# define might_resched() cond_resched()
+# define might_resched() do { \
+		ipipe_check_context(ipipe_root_domain); \
+		cond_resched(); \
+	} while (0)
 #else
-# define might_resched() do { } while (0)
+# define might_resched() ipipe_check_context(ipipe_root_domain)
 #endif
 
 #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
include/linux/linkage.h +4 -0
diff -Naur linux-2.6.21.5.orig/include/linux/linkage.h linux-2.6.21.5/include/linux/linkage.h
@@ -64,4 +64,8 @@
 #define fastcall
 #endif
 
+#ifndef notrace
+#define notrace		__attribute__((no_instrument_function))
+#endif
+
 #endif
include/linux/mm.h +1 -0
diff -Naur linux-2.6.21.5.orig/include/linux/mm.h linux-2.6.21.5/include/linux/mm.h
@@ -169,6 +169,7 @@
 #define VM_MAPPED_COPY	0x01000000	/* T if mapped copy of data (nommu mmap) */
 #define VM_INSERTPAGE	0x02000000	/* The vma has had "vm_insert_page()" done on it */
 #define VM_ALWAYSDUMP	0x04000000	/* Always include in core dumps */
+#define VM_PINNED	0x08000000	/* Disable faults for the vma */
 
 #ifndef VM_STACK_DEFAULT_FLAGS		/* arch can override this */
 #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
include/linux/preempt.h +8 -4
diff -Naur linux-2.6.21.5.orig/include/linux/preempt.h linux-2.6.21.5/include/linux/preempt.h
@@ -8,6 +8,7 @@
 
 #include <linux/thread_info.h>
 #include <linux/linkage.h>
+#include <linux/ipipe_base.h>
 
 #ifdef CONFIG_DEBUG_PREEMPT
   extern void fastcall add_preempt_count(int val);
@@ -28,18 +29,21 @@
 
 #define preempt_disable() \
 do { \
+	ipipe_check_context(ipipe_root_domain); \
 	inc_preempt_count(); \
 	barrier(); \
 } while (0)
 
 #define preempt_enable_no_resched() \
 do { \
+	ipipe_check_context(ipipe_root_domain); \
 	barrier(); \
 	dec_preempt_count(); \
 } while (0)
 
 #define preempt_check_resched() \
 do { \
+	ipipe_check_context(ipipe_root_domain); \
 	if (unlikely(test_thread_flag(TIF_NEED_RESCHED))) \
 		preempt_schedule(); \
 } while (0)
@@ -53,10 +57,10 @@
 
 #else
 
-#define preempt_disable()		do { } while (0)
-#define preempt_enable_no_resched()	do { } while (0)
-#define preempt_enable()		do { } while (0)
-#define preempt_check_resched()		do { } while (0)
+#define preempt_disable()		ipipe_check_context(ipipe_root_domain)
+#define preempt_enable_no_resched()	ipipe_check_context(ipipe_root_domain)
+#define preempt_enable()		ipipe_check_context(ipipe_root_domain)
+#define preempt_check_resched()		ipipe_check_context(ipipe_root_domain)
 
 #endif
 
include/linux/sched.h +16 -0
diff -Naur linux-2.6.21.5.orig/include/linux/sched.h linux-2.6.21.5/include/linux/sched.h
@@ -54,6 +54,7 @@
 #include <linux/cpumask.h>
 #include <linux/errno.h>
 #include <linux/nodemask.h>
+#include <linux/ipipe.h>
 
 #include <asm/system.h>
 #include <asm/semaphore.h>
@@ -151,6 +152,13 @@
 /* in tsk->state again */
 #define TASK_NONINTERACTIVE	64
 #define TASK_DEAD		128
+#ifdef CONFIG_IPIPE
+#define TASK_ATOMICSWITCH	512
+#define TASK_NOWAKEUP          1024
+#else  /* !CONFIG_IPIPE */
+#define TASK_ATOMICSWITCH	0
+#define TASK_NOWAKEUP          0
+#endif /* CONFIG_IPIPE */
 
 #define __set_task_state(tsk, state_value)		\
 	do { (tsk)->state = (state_value); } while (0)
@@ -1041,6 +1049,9 @@
 
 	atomic_t fs_excl;	/* holding fs exclusive resources */
 	struct rcu_head rcu;
+#ifdef CONFIG_IPIPE
+	void *ptd[IPIPE_ROOT_NPTDKEYS];
+#endif
 
 	/*
 	 * cache last used pipe for splice
@@ -1158,6 +1169,11 @@
 #define PF_SPREAD_SLAB	0x02000000	/* Spread some slab caches over cpuset */
 #define PF_MEMPOLICY	0x10000000	/* Non-default NUMA mempolicy */
 #define PF_MUTEX_TESTER	0x20000000	/* Thread belongs to the rt mutex tester */
+#ifdef CONFIG_IPIPE
+#define PF_EVNOTIFY    0x40000000	/* Notify other domains about internal events */
+#else
+#define PF_EVNOTIFY    0
+#endif /* CONFIG_IPIPE */
 
 /*
  * Only the _current_ task can read/write to tsk->flags, but other
include/linux/smp.h +2 -0
diff -Naur linux-2.6.21.5.orig/include/linux/smp.h linux-2.6.21.5/include/linux/smp.h
@@ -109,6 +109,8 @@
 
 #endif /* !SMP */
 
+#include <linux/ipipe_base.h>
+
 /*
  * smp_processor_id(): get the current CPU ID.
  *
include/linux/spinlock.h +113 -9

133 lines not on this page · raw message

include/linux/spinlock_types.h +14 -0
diff -Naur linux-2.6.21.5.orig/include/linux/spinlock_types.h linux-2.6.21.5/include/linux/spinlock_types.h

Lines of this file are not shown. View the raw message.

init/Kconfig +1 -0
diff -Naur linux-2.6.21.5.orig/init/Kconfig linux-2.6.21.5/init/Kconfig

Lines of this file are not shown. View the raw message.

init/main.c +7 -1
diff -Naur linux-2.6.21.5.orig/init/main.c linux-2.6.21.5/init/main.c

Lines of this file are not shown. View the raw message.

kernel/exit.c +1 -0
diff -Naur linux-2.6.21.5.orig/kernel/exit.c linux-2.6.21.5/kernel/exit.c

Lines of this file are not shown. View the raw message.

kernel/fork.c +10 -1
diff -Naur linux-2.6.21.5.orig/kernel/fork.c linux-2.6.21.5/kernel/fork.c

Lines of this file are not shown. View the raw message.

kernel/ipipe/core.c +1500 -0

1,500 lines not on this page · raw message

kernel/ipipe/Kconfig +6 -0
diff -Naur linux-2.6.21.5.orig/kernel/ipipe/Kconfig linux-2.6.21.5/kernel/ipipe/Kconfig

Lines of this file are not shown. View the raw message.

kernel/ipipe/Kconfig.debug +88 -0

88 lines not on this page · raw message

kernel/ipipe/Makefile +3 -0
diff -Naur linux-2.6.21.5.orig/kernel/ipipe/Makefile linux-2.6.21.5/kernel/ipipe/Makefile

Lines of this file are not shown. View the raw message.

kernel/ipipe/tracer.c +1291 -0

1,291 lines not on this page · raw message

kernel/irq/chip.c +129 -0

129 lines not on this page · raw message

kernel/Makefile +1 -0
diff -Naur linux-2.6.21.5.orig/kernel/Makefile linux-2.6.21.5/kernel/Makefile

Lines of this file are not shown. View the raw message.

kernel/printk.c +73 -0

73 lines not on this page · raw message

kernel/sched.c +64 -3

67 lines not on this page · raw message

kernel/signal.c +1 -0
diff -Naur linux-2.6.21.5.orig/kernel/signal.c linux-2.6.21.5/kernel/signal.c

Lines of this file are not shown. View the raw message.

kernel/spinlock.c +2 -2
diff -Naur linux-2.6.21.5.orig/kernel/spinlock.c linux-2.6.21.5/kernel/spinlock.c

Lines of this file are not shown. View the raw message.

kernel/sys.c +4 -2
diff -Naur linux-2.6.21.5.orig/kernel/sys.c linux-2.6.21.5/kernel/sys.c

Lines of this file are not shown. View the raw message.

lib/bust_spinlocks.c +3 -0
diff -Naur linux-2.6.21.5.orig/lib/bust_spinlocks.c linux-2.6.21.5/lib/bust_spinlocks.c

Lines of this file are not shown. View the raw message.

lib/ioremap.c +2 -2
diff -Naur linux-2.6.21.5.orig/lib/ioremap.c linux-2.6.21.5/lib/ioremap.c

Lines of this file are not shown. View the raw message.

lib/Kconfig.debug +2 -0
diff -Naur linux-2.6.21.5.orig/lib/Kconfig.debug linux-2.6.21.5/lib/Kconfig.debug

Lines of this file are not shown. View the raw message.

lib/smp_processor_id.c +3 -0
diff -Naur linux-2.6.21.5.orig/lib/smp_processor_id.c linux-2.6.21.5/lib/smp_processor_id.c

Lines of this file are not shown. View the raw message.

lib/spinlock_debug.c +18 -0
diff -Naur linux-2.6.21.5.orig/lib/spinlock_debug.c linux-2.6.21.5/lib/spinlock_debug.c

Lines of this file are not shown. View the raw message.

Makefile +4 -0
diff -Naur linux-2.6.21.5.orig/Makefile linux-2.6.21.5/Makefile

Lines of this file are not shown. View the raw message.

mm/memory.c +168 -31

199 lines not on this page · raw message

mm/mlock.c +2 -2
diff -Naur linux-2.6.21.5.orig/mm/mlock.c linux-2.6.21.5/mm/mlock.c

Lines of this file are not shown. View the raw message.

mm/vmalloc.c +1 -0
diff -Naur linux-2.6.21.5.orig/mm/vmalloc.c linux-2.6.21.5/mm/vmalloc.c

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#1 lore raw
Quoted 5 lines · Benjamin ZORES

Hi,

I've seen that Adeos has been officially ported to PowerPC architecture.
Please find an update of the adeos-ipipe-2.6.20-powerpc-1.6-02 to Linux 2.6.21 (.5) kernel, in case somebody's interested in it.

Quoted 7 lines

Ben
------------------------------------------------------------------------

_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core

Hi,

Attached is updated patch to latest 1.6-03 version.

Ben

arch/powerpc/boot/Makefile +8 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/boot/Makefile linux-2.6.21.5/arch/powerpc/boot/Makefile
@@ -27,6 +27,14 @@
 		   $(shell $(CROSS32CC) -print-file-name=include) -fPIC
 BOOTAFLAGS	:= -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
 
+ifdef CONFIG_IPIPE_TRACE
+# do not trace the boot loader
+nullstring :=
+space      := $(nullstring) # end of the line
+pg_flag     = $(nullstring) -pg # end of the line
+BOOTCFLAGS     := $(subst ${pg_flag},${space},${BOOTCFLAGS})
+endif
+
 ifeq ($(call cc-option-yn, -fstack-protector),y)
 BOOTCFLAGS	+= -fno-stack-protector
 endif
arch/powerpc/Kconfig +2 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/Kconfig linux-2.6.21.5/arch/powerpc/Kconfig
@@ -758,6 +758,8 @@
 
 menu "Kernel options"
 
+source "kernel/ipipe/Kconfig"
+
 config HIGHMEM
 	bool "High memory support"
 	depends on PPC32
arch/powerpc/kernel/cputable.c +2 -2
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/cputable.c linux-2.6.21.5/arch/powerpc/kernel/cputable.c
@@ -1255,7 +1255,7 @@
 #endif /* CONFIG_PPC32 */
 };
 
-struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
+notrace struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
 {
 	struct cpu_spec *s = cpu_specs;
 	struct cpu_spec **cur = &cur_cpu_spec;
@@ -1284,7 +1284,7 @@
 	return NULL;
 }
 
-void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
+notrace void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
 {
 	struct fixup_entry {
 		unsigned long	mask;
arch/powerpc/kernel/entry_32.S +91 -0

139 lines not on this page · raw message

arch/powerpc/kernel/head_32.S +14 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/head_32.S linux-2.6.21.5/arch/powerpc/kernel/head_32.S
@@ -329,6 +329,12 @@
 	EXC_XFER_TEMPLATE(n, hdlr, n, NOCOPY, transfer_to_handler_full,	\
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -413,7 +419,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* External interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* Alignment exception */
 	. = 0x600
@@ -445,7 +455,11 @@
 	EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception)
 
 /* Decrementer */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x900, Decrementer, __ipipe_grab_timer, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE)
 	EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE)
arch/powerpc/kernel/head_44x.S +5 -2
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/head_44x.S linux-2.6.21.5/arch/powerpc/kernel/head_44x.S
@@ -424,8 +424,11 @@
 	/* Instruction Storage Interrupt */
 	INSTRUCTION_STORAGE_EXCEPTION
 
-	/* External Input Interrupt */
-	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, ExternalInput, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
+ 	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	/* Alignment Interrupt */
 	ALIGNMENT_EXCEPTION
arch/powerpc/kernel/head_4xx.S +14 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/head_4xx.S linux-2.6.21.5/arch/powerpc/kernel/head_4xx.S
@@ -228,6 +228,12 @@
 	EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -396,7 +402,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* 0x0500 - External Interrupt Exception */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x0500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* 0x0600 - Alignment Exception */
 	START_EXCEPTION(0x0600, Alignment)
@@ -434,7 +444,11 @@
 	lis	r0,TSR_PIS@h
 	mtspr	SPRN_TSR,r0		/* Clear the PIT exception */
 	addi	r3,r1,STACK_FRAME_OVERHEAD
+#ifdef CONFIG_IPIPE
+	EXC_XFER_IPIPE(0x1000, __ipipe_grab_timer)
+#else /* !CONFIG_IPIPE */
 	EXC_XFER_LITE(0x1000, timer_interrupt)
+#endif /* CONFIG_IPIPE */
 
 #if 0
 /* NOTE:
arch/powerpc/kernel/head_8xx.S +14 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/head_8xx.S linux-2.6.21.5/arch/powerpc/kernel/head_8xx.S
@@ -187,6 +187,12 @@
 	EXC_XFER_TEMPLATE(n, hdlr, n, NOCOPY, transfer_to_handler_full,	\
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+ 
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -238,7 +244,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* External interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* Alignment exception */
 	. = 0x600
@@ -259,7 +269,11 @@
 	EXCEPTION(0x800, FPUnavailable, unknown_exception, EXC_XFER_STD)
 
 /* Decrementer */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x900, Decrementer, __ipipe_grab_timer, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE)
 	EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE)
arch/powerpc/kernel/head_booke.h +16 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/head_booke.h linux-2.6.21.5/arch/powerpc/kernel/head_booke.h
@@ -187,6 +187,12 @@
 	EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -345,6 +351,15 @@
 	addi	r3,r1,STACK_FRAME_OVERHEAD;				      \
 	EXC_XFER_STD(0x0700, program_check_exception)
 
+#ifdef CONFIG_IPIPE
+#define DECREMENTER_EXCEPTION						      \
+	START_EXCEPTION(Decrementer)					      \
+	NORMAL_EXCEPTION_PROLOG;					      \
+	lis     r0,TSR_DIS@h;           /* Setup the DEC interrupt mask */    \
+	mtspr   SPRN_TSR,r0;		/* Clear the DEC interrupt */	      \
+	addi    r3,r1,STACK_FRAME_OVERHEAD;				      \
+	EXC_XFER_IPIPE(0x0900, __ipipe_grab_timer)
+#else /* !CONFIG_IPIPE */
 #define DECREMENTER_EXCEPTION						      \
 	START_EXCEPTION(Decrementer)					      \
 	NORMAL_EXCEPTION_PROLOG;					      \
@@ -352,6 +367,7 @@
 	mtspr   SPRN_TSR,r0;		/* Clear the DEC interrupt */	      \
 	addi    r3,r1,STACK_FRAME_OVERHEAD;				      \
 	EXC_XFER_LITE(0x0900, timer_interrupt)
+#endif /* CONFIG_IPIPE */
 
 #define FP_UNAVAILABLE_EXCEPTION					      \
 	START_EXCEPTION(FloatingPointUnavailable)			      \
arch/powerpc/kernel/head_fsl_booke.S +4 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/head_fsl_booke.S linux-2.6.21.5/arch/powerpc/kernel/head_fsl_booke.S
@@ -529,7 +529,11 @@
 	INSTRUCTION_STORAGE_EXCEPTION
 
 	/* External Input Interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, ExternalInput, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	/* Alignment Interrupt */
 	ALIGNMENT_EXCEPTION
arch/powerpc/kernel/idle.c +3 -2
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/idle.c linux-2.6.21.5/arch/powerpc/kernel/idle.c
@@ -58,6 +58,7 @@
 	while (1) {
 		while (!need_resched() && !cpu_should_die()) {
 			ppc64_runlatch_off();
+			ipipe_suspend_domain();
 
 			if (ppc_md.power_save) {
 				clear_thread_flag(TIF_POLLING_NRFLAG);
@@ -66,13 +67,13 @@
 				 * is ordered w.r.t. need_resched() test.
 				 */
 				smp_mb();
-				local_irq_disable();
+				local_irq_disable_hw();
 
 				/* check again after disabling irqs */
 				if (!need_resched() && !cpu_should_die())
 					ppc_md.power_save();
 
-				local_irq_enable();
+				local_irq_enable_hw();
 				set_thread_flag(TIF_POLLING_NRFLAG);
 
 			} else {
arch/powerpc/kernel/io.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/io.c linux-2.6.21.5/arch/powerpc/kernel/io.c
@@ -120,7 +120,7 @@
 
 #define IO_CHECK_ALIGN(v,a) ((((unsigned long)(v)) & ((a) - 1)) == 0)
 
-void _memset_io(volatile void __iomem *addr, int c, unsigned long n)
+notrace void _memset_io(volatile void __iomem *addr, int c, unsigned long n)
 {
 	void *p = (void __force *)addr;
 	u32 lc = c;
arch/powerpc/kernel/ipipe.c +649 -0

649 lines not on this page · raw message

arch/powerpc/kernel/irq.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/irq.c linux-2.6.21.5/arch/powerpc/kernel/irq.c
@@ -70,7 +70,7 @@
 #endif
 
 int __irq_offset_value;
-static int ppc_spurious_interrupts;
+int ppc_spurious_interrupts;
 
 #ifdef CONFIG_PPC32
 EXPORT_SYMBOL(__irq_offset_value);
arch/powerpc/kernel/Makefile +2 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/Makefile linux-2.6.21.5/arch/powerpc/kernel/Makefile
@@ -57,6 +57,8 @@
 obj-$(CONFIG_MODULES)		+= ppc_ksyms.o
 obj-$(CONFIG_BOOTX_TEXT)	+= btext.o
 obj-$(CONFIG_SMP)		+= smp.o
+obj-$(CONFIG_IPIPE)		+= ipipe.o
+obj-$(CONFIG_IPIPE_TRACE_MCOUNT)	+= mcount.o
 obj-$(CONFIG_KPROBES)		+= kprobes.o
 obj-$(CONFIG_PPC_UDBG_16550)	+= legacy_serial.o udbg_16550.o
 
arch/powerpc/kernel/mcount.S +75 -0

75 lines not on this page · raw message

arch/powerpc/kernel/setup_32.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/setup_32.c linux-2.6.21.5/arch/powerpc/kernel/setup_32.c
@@ -85,7 +85,7 @@
  * from the address that it was linked at, so we must use RELOC/PTRRELOC
  * to access static data (including strings).  -- paulus
  */
-unsigned long __init early_init(unsigned long dt_ptr)
+unsigned long notrace __init early_init(unsigned long dt_ptr)
 {
 	unsigned long offset = reloc_offset();
 	struct cpu_spec *spec;
arch/powerpc/kernel/time.c +12 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/time.c linux-2.6.21.5/arch/powerpc/kernel/time.c
@@ -74,6 +74,8 @@
 #endif
 #include <asm/smp.h>
 
+unsigned long disarm_decr[NR_CPUS];
+
 /* keep track of when we need to update the rtc */
 time_t last_rtc_update;
 #ifdef CONFIG_PPC_ISERIES
@@ -625,7 +627,9 @@
 #endif
 
 	old_regs = set_irq_regs(regs);
+#ifndef CONFIG_IPIPE
 	irq_enter();
+#endif
 
 	profile_tick(CPU_PROFILING);
 	calculate_steal_time();
@@ -651,7 +655,11 @@
 		 * is the case.
 		 */
 		if (!cpu_is_offline(cpu))
+#ifdef CONFIG_IPIPE
+			account_process_time(__ipipe_tick_regs + cpu);
+#else
 			account_process_time(regs);
+#endif
 
 		/*
 		 * No need to check whether cpu is offline here; boot_cpuid
@@ -672,7 +680,8 @@
 	}
 	
 	next_dec = tb_ticks_per_jiffy - ticks;
-	set_dec(next_dec);
+	if ( !disarm_decr[cpu] )
+	    set_dec(next_dec);
 
 #ifdef CONFIG_PPC_ISERIES
 	if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending())
@@ -687,7 +696,9 @@
 	}
 #endif
 
+#ifndef CONFIG_IPIPE
 	irq_exit();
+#endif
 	set_irq_regs(old_regs);
 }
 
arch/powerpc/kernel/traps.c +47 -1

149 lines not on this page · raw message

arch/powerpc/mm/fault.c +3 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/mm/fault.c linux-2.6.21.5/arch/powerpc/mm/fault.c
@@ -160,6 +160,9 @@
 	int trap = TRAP(regs);
  	int is_exec = trap == 0x400;
 
+	if (ipipe_trap_notify(IPIPE_TRAP_ACCESS,regs))
+	    	return 0;
+
 #if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
 	/*
 	 * Fortunately the bit assignments in SRR1 for an instruction
arch/powerpc/platforms/iseries/irq.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/platforms/iseries/irq.c linux-2.6.21.5/arch/powerpc/platforms/iseries/irq.c
@@ -81,7 +81,7 @@
 	} data;
 };
 
-static DEFINE_SPINLOCK(pending_irqs_lock);
+static IPIPE_DEFINE_SPINLOCK(pending_irqs_lock);
 static int num_pending_irqs;
 static int pending_irqs[NR_IRQS];
 
arch/powerpc/platforms/powermac/pic.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/platforms/powermac/pic.c linux-2.6.21.5/arch/powerpc/platforms/powermac/pic.c
@@ -63,7 +63,7 @@
 static int max_real_irqs;
 static u32 level_mask[4];
 
-static DEFINE_SPINLOCK(pmac_pic_lock);
+static IPIPE_DEFINE_SPINLOCK(pmac_pic_lock);
 
 #define NR_MASK_WORDS	((NR_IRQS + 31) / 32)
 static unsigned long ppc_lost_interrupts[NR_MASK_WORDS];
arch/powerpc/platforms/ps3/interrupt.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/platforms/ps3/interrupt.c linux-2.6.21.5/arch/powerpc/platforms/ps3/interrupt.c
@@ -71,7 +71,7 @@
 		u64 unused_2[3];
 	};
 	u64 ipi_debug_brk_mask;
-	spinlock_t lock;
+	ipipe_spinlock_t lock;
 };
 
 /**
arch/powerpc/sysdev/i8259.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/sysdev/i8259.c linux-2.6.21.5/arch/powerpc/sysdev/i8259.c
@@ -23,7 +23,7 @@
 #define cached_A1 (cached_8259[0])
 #define cached_21 (cached_8259[1])
 
-static DEFINE_SPINLOCK(i8259_lock);
+static IPIPE_DEFINE_SPINLOCK(i8259_lock);
 
 static struct device_node *i8259_node;
 static struct irq_host *i8259_host;
arch/powerpc/sysdev/ipic.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/sysdev/ipic.c linux-2.6.21.5/arch/powerpc/sysdev/ipic.c
@@ -30,7 +30,7 @@
 #include "ipic.h"
 
 static struct ipic * primary_ipic;
-static DEFINE_SPINLOCK(ipic_lock);
+static IPIPE_DEFINE_SPINLOCK(ipic_lock);
 
 static struct ipic_info ipic_info[] = {
 	[9] = {
arch/powerpc/sysdev/mpic.c +18 -3
diff -Naur linux-2.6.21.5.orig/arch/powerpc/sysdev/mpic.c linux-2.6.21.5/arch/powerpc/sysdev/mpic.c
@@ -44,7 +44,7 @@
 
 static struct mpic *mpics;
 static struct mpic *mpic_primary;
-static DEFINE_SPINLOCK(mpic_lock);
+static IPIPE_DEFINE_SPINLOCK(mpic_lock);
 
 #ifdef CONFIG_PPC32	/* XXX for now */
 #ifdef CONFIG_IRQ_ALL_CPUS
@@ -564,19 +564,24 @@
 	unsigned int loops = 100000;
 	struct mpic *mpic = mpic_from_irq(irq);
 	unsigned int src = mpic_irq_to_hw(irq);
+        unsigned long flags;
 
 	DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, irq, src);
 
+        local_irq_save_hw_cond(flags);
+
 	mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI),
 		       mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) &
 		       ~MPIC_VECPRI_MASK);
 	/* make sure mask gets to controller before we return to user */
 	do {
 		if (!loops--) {
-			printk(KERN_ERR "mpic_enable_irq timeout\n");
+			printk(KERN_ERR "mpic_unmask_irq timeout\n");
 			break;
 		}
 	} while(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK);
+
+        local_irq_restore_hw_cond(flags);
 }
 
 static void mpic_mask_irq(unsigned int irq)
@@ -584,9 +589,12 @@
 	unsigned int loops = 100000;
 	struct mpic *mpic = mpic_from_irq(irq);
 	unsigned int src = mpic_irq_to_hw(irq);
+        unsigned long flags;
 
 	DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src);
 
+        local_irq_save_hw_cond(flags);
+
 	mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI),
 		       mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) |
 		       MPIC_VECPRI_MASK);
@@ -594,10 +602,12 @@
 	/* make sure mask gets to controller before we return to user */
 	do {
 		if (!loops--) {
-			printk(KERN_ERR "mpic_enable_irq timeout\n");
+			printk(KERN_ERR "mpic_mask_irq timeout\n");
 			break;
 		}
 	} while(!(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK));
+
+        local_irq_restore_hw_cond(flags);
 }
 
 static void mpic_end_irq(unsigned int irq)
@@ -739,6 +749,7 @@
 	unsigned int src = mpic_irq_to_hw(virq);
 	struct irq_desc *desc = get_irq_desc(virq);
 	unsigned int vecpri, vold, vnew;
+        unsigned long flags;
 
 	DBG("mpic: set_irq_type(mpic:@%p,virq:%d,src:0x%x,type:0x%x)\n",
 	    mpic, virq, src, flow_type);
@@ -763,6 +774,8 @@
 	else
 		vecpri = mpic_type_to_vecpri(mpic, flow_type);
 
+	local_irq_save_hw_cond(flags);
+        
 	vold = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI));
 	vnew = vold & ~(MPIC_INFO(VECPRI_POLARITY_MASK) |
 			MPIC_INFO(VECPRI_SENSE_MASK));
@@ -770,6 +783,8 @@
 	if (vold != vnew)
 		mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), vnew);
 
+	local_irq_restore_hw_cond(flags);
+        
 	return 0;
 }
 
arch/powerpc/sysdev/tsi108_pci.c +10 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/sysdev/tsi108_pci.c linux-2.6.21.5/arch/powerpc/sysdev/tsi108_pci.c
@@ -249,7 +249,9 @@
 {
 	u_int irp_cfg;
 	int int_line = (irq - IRQ_PCI_INTAD_BASE);
+	unsigned long flags;
 
+	local_irq_save_hw_cond(flags);
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
 	mb();
 	irp_cfg |= (1 << int_line);	/* INTx_DIR = output */
@@ -257,19 +259,23 @@
 	tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL, irp_cfg);
 	mb();
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
+	local_irq_restore_hw_cond(flags);
 }
 
 static void tsi108_pci_int_unmask(u_int irq)
 {
 	u_int irp_cfg;
 	int int_line = (irq - IRQ_PCI_INTAD_BASE);
+	unsigned long flags;
 
+	local_irq_save_hw_cond(flags);
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
 	mb();
 	irp_cfg &= ~(1 << int_line);
 	irp_cfg |= (3 << (8 + (int_line * 2)));
 	tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL, irp_cfg);
 	mb();
+	local_irq_restore_hw_cond(flags);
 }
 
 static void init_pci_source(void)
@@ -360,6 +366,9 @@
 
 static void tsi108_pci_irq_end(u_int irq)
 {
+	unsigned long flags;
+
+	local_irq_save_hw_cond(flags);
 	tsi108_pci_int_unmask(irq);
 
 	/* Enable interrupts from PCI block */
@@ -367,6 +376,7 @@
 			 tsi108_read_reg(TSI108_PCI_OFFSET +
 					 TSI108_PCI_IRP_ENABLE) |
 			 TSI108_PCI_IRP_ENABLE_P_INT);
+	local_irq_restore_hw_cond(flags);
 	mb();
 }
 
drivers/pci/htirq.c +1 -1
diff -Naur linux-2.6.21.5.orig/drivers/pci/htirq.c linux-2.6.21.5/drivers/pci/htirq.c
@@ -21,7 +21,7 @@
  * With multiple simultaneous hypertransport irq devices it might pay
  * to make this more fine grained.  But start with simple, stupid, and correct.
  */
-static DEFINE_SPINLOCK(ht_irq_lock);
+static IPIPE_DEFINE_SPINLOCK(ht_irq_lock);
 
 struct ht_irq_cfg {
 	struct pci_dev *dev;
drivers/serial/mpc52xx_uart.c +34 -0
diff -Naur linux-2.6.21.5.orig/drivers/serial/mpc52xx_uart.c linux-2.6.21.5/drivers/serial/mpc52xx_uart.c
@@ -803,6 +803,40 @@
 #endif
 
 
+#ifdef CONFIG_IPIPE
+
+#include <stdarg.h>
+
+void __ipipe_serial_debug(const char *fmt, ...)
+{
+	struct console *co = MPC52xx_PSC_CONSOLE;
+	unsigned long flags, count;
+	struct uart_port *port;
+	char buf[128];
+	va_list ap;
+
+	if (co->index < 0)
+		return;		/* No console. */
+
+	port = &mpc52xx_uart_ports[co->index];
+
+	if (!port->mapbase)
+		return;		/* Too early. */
+
+	va_start(ap, fmt);
+	vsprintf(buf, fmt, ap);
+	va_end(ap);
+	count = strlen(buf);
+
+	local_irq_save_hw(flags);
+	mpc52xx_console_write(co, buf, count);
+	local_irq_restore_hw(flags);
+}
+
+EXPORT_SYMBOL(__ipipe_serial_debug);
+
+#endif
+
 /* ======================================================================== */
 /* UART Driver                                                              */
 /* ======================================================================== */
include/asm-powerpc/hw_irq.h +132 -10

178 lines not on this page · raw message

include/asm-powerpc/ipipe.h +219 -0

219 lines not on this page · raw message

include/asm-ppc/mmu_context.h +11 -1
diff -Naur linux-2.6.21.5.orig/include/asm-ppc/mmu_context.h linux-2.6.21.5/include/asm-ppc/mmu_context.h
@@ -153,7 +153,10 @@
  */
 static inline void destroy_context(struct mm_struct *mm)
 {
+	unsigned long flags;
+
 	preempt_disable();
+	local_irq_save_hw_cond(flags);
 	if (mm->context.id != NO_CONTEXT) {
 		clear_bit(mm->context.id, context_map);
 		mm->context.id = NO_CONTEXT;
@@ -161,6 +164,7 @@
 		atomic_inc(&nr_free_contexts);
 #endif
 	}
+ 	local_irq_restore_hw_cond(flags);
 	preempt_enable();
 }
 
@@ -193,7 +197,13 @@
  * After we have set current->mm to a new value, this activates
  * the context for the new mm so we see the new mappings.
  */
-#define activate_mm(active_mm, mm)   switch_mm(active_mm, mm, current)
+#define activate_mm(active_mm, mm)   \
+do { \
+	unsigned long flags; \
+	local_irq_save_hw_cond(flags); \
+	switch_mm(active_mm, mm, current); \
+	local_irq_restore_hw_cond(flags);	   \
+} while(0)
 
 extern void mmu_context_init(void);
 
include/linux/hardirq.h +2 -2
diff -Naur linux-2.6.21.5.orig/include/linux/hardirq.h linux-2.6.21.5/include/linux/hardirq.h
@@ -133,7 +133,7 @@
  */
 extern void irq_exit(void);
 
-#define nmi_enter()		do { lockdep_off(); __irq_enter(); } while (0)
-#define nmi_exit()		do { __irq_exit(); lockdep_on(); } while (0)
+#define nmi_enter()		do { if (ipipe_root_domain_p) { lockdep_off(); __irq_enter(); } } while (0)
+#define nmi_exit()		do { if (ipipe_root_domain_p) { __irq_exit(); lockdep_on(); } } while (0)
 
 #endif /* LINUX_HARDIRQ_H */
include/linux/ipipe_base.h +88 -0

88 lines not on this page · raw message

include/linux/ipipe.h +692 -0

692 lines not on this page · raw message

include/linux/ipipe_trace.h +49 -0

49 lines not on this page · raw message

include/linux/irq.h +6 -0
diff -Naur linux-2.6.21.5.orig/include/linux/irq.h linux-2.6.21.5/include/linux/irq.h
@@ -151,6 +151,12 @@
  * Pad this out to 32 bytes for cache and indexing reasons.
  */
 struct irq_desc {
+#ifdef CONFIG_IPIPE
+	void			fastcall (*ipipe_ack)(unsigned int irq,
+						      struct irq_desc *desc);
+	void			fastcall (*ipipe_end)(unsigned int irq,
+						      struct irq_desc *desc);
+#endif /* CONFIG_IPIPE */
 	irq_flow_handler_t	handle_irq;
 	struct irq_chip		*chip;
 	struct msi_desc		*msi_desc;
include/linux/kernel.h +6 -2
diff -Naur linux-2.6.21.5.orig/include/linux/kernel.h linux-2.6.21.5/include/linux/kernel.h
@@ -14,6 +14,7 @@
 #include <linux/compiler.h>
 #include <linux/bitops.h>
 #include <linux/log2.h>
+#include <linux/ipipe_base.h>
 #include <asm/byteorder.h>
 #include <asm/bug.h>
 
@@ -72,9 +73,12 @@
  */
 #ifdef CONFIG_PREEMPT_VOLUNTARY
 extern int cond_resched(void);
-# define might_resched() cond_resched()
+# define might_resched() do { \
+		ipipe_check_context(ipipe_root_domain); \
+		cond_resched(); \
+	} while (0)
 #else
-# define might_resched() do { } while (0)
+# define might_resched() ipipe_check_context(ipipe_root_domain)
 #endif
 
 #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
include/linux/linkage.h +4 -0
diff -Naur linux-2.6.21.5.orig/include/linux/linkage.h linux-2.6.21.5/include/linux/linkage.h
@@ -64,4 +64,8 @@
 #define fastcall
 #endif
 
+#ifndef notrace
+#define notrace		__attribute__((no_instrument_function))
+#endif
+
 #endif
include/linux/mm.h +1 -0
diff -Naur linux-2.6.21.5.orig/include/linux/mm.h linux-2.6.21.5/include/linux/mm.h
@@ -169,6 +169,7 @@
 #define VM_MAPPED_COPY	0x01000000	/* T if mapped copy of data (nommu mmap) */
 #define VM_INSERTPAGE	0x02000000	/* The vma has had "vm_insert_page()" done on it */
 #define VM_ALWAYSDUMP	0x04000000	/* Always include in core dumps */
+#define VM_PINNED	0x08000000	/* Disable faults for the vma */
 
 #ifndef VM_STACK_DEFAULT_FLAGS		/* arch can override this */
 #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
include/linux/preempt.h +8 -4
diff -Naur linux-2.6.21.5.orig/include/linux/preempt.h linux-2.6.21.5/include/linux/preempt.h
@@ -8,6 +8,7 @@
 
 #include <linux/thread_info.h>
 #include <linux/linkage.h>
+#include <linux/ipipe_base.h>
 
 #ifdef CONFIG_DEBUG_PREEMPT
   extern void fastcall add_preempt_count(int val);
@@ -28,18 +29,21 @@
 
 #define preempt_disable() \
 do { \
+	ipipe_check_context(ipipe_root_domain); \
 	inc_preempt_count(); \
 	barrier(); \
 } while (0)
 
 #define preempt_enable_no_resched() \
 do { \
+	ipipe_check_context(ipipe_root_domain); \
 	barrier(); \
 	dec_preempt_count(); \
 } while (0)
 
 #define preempt_check_resched() \
 do { \
+	ipipe_check_context(ipipe_root_domain); \
 	if (unlikely(test_thread_flag(TIF_NEED_RESCHED))) \
 		preempt_schedule(); \
 } while (0)
@@ -53,10 +57,10 @@
 
 #else
 
-#define preempt_disable()		do { } while (0)
-#define preempt_enable_no_resched()	do { } while (0)
-#define preempt_enable()		do { } while (0)
-#define preempt_check_resched()		do { } while (0)
+#define preempt_disable()		ipipe_check_context(ipipe_root_domain)
+#define preempt_enable_no_resched()	ipipe_check_context(ipipe_root_domain)
+#define preempt_enable()		ipipe_check_context(ipipe_root_domain)
+#define preempt_check_resched()		ipipe_check_context(ipipe_root_domain)
 
 #endif
 
include/linux/sched.h +16 -0
diff -Naur linux-2.6.21.5.orig/include/linux/sched.h linux-2.6.21.5/include/linux/sched.h
@@ -54,6 +54,7 @@
 #include <linux/cpumask.h>
 #include <linux/errno.h>
 #include <linux/nodemask.h>
+#include <linux/ipipe.h>
 
 #include <asm/system.h>
 #include <asm/semaphore.h>
@@ -151,6 +152,13 @@
 /* in tsk->state again */
 #define TASK_NONINTERACTIVE	64
 #define TASK_DEAD		128
+#ifdef CONFIG_IPIPE
+#define TASK_ATOMICSWITCH	512
+#define TASK_NOWAKEUP          1024
+#else  /* !CONFIG_IPIPE */
+#define TASK_ATOMICSWITCH	0
+#define TASK_NOWAKEUP          0
+#endif /* CONFIG_IPIPE */
 
 #define __set_task_state(tsk, state_value)		\
 	do { (tsk)->state = (state_value); } while (0)
@@ -1041,6 +1049,9 @@
 
 	atomic_t fs_excl;	/* holding fs exclusive resources */
 	struct rcu_head rcu;
+#ifdef CONFIG_IPIPE
+	void *ptd[IPIPE_ROOT_NPTDKEYS];
+#endif
 
 	/*
 	 * cache last used pipe for splice
@@ -1158,6 +1169,11 @@
 #define PF_SPREAD_SLAB	0x02000000	/* Spread some slab caches over cpuset */
 #define PF_MEMPOLICY	0x10000000	/* Non-default NUMA mempolicy */
 #define PF_MUTEX_TESTER	0x20000000	/* Thread belongs to the rt mutex tester */
+#ifdef CONFIG_IPIPE
+#define PF_EVNOTIFY    0x40000000	/* Notify other domains about internal events */
+#else
+#define PF_EVNOTIFY    0
+#endif /* CONFIG_IPIPE */
 
 /*
  * Only the _current_ task can read/write to tsk->flags, but other
include/linux/smp.h +2 -0
diff -Naur linux-2.6.21.5.orig/include/linux/smp.h linux-2.6.21.5/include/linux/smp.h
@@ -109,6 +109,8 @@
 
 #endif /* !SMP */
 
+#include <linux/ipipe_base.h>
+
 /*
  * smp_processor_id(): get the current CPU ID.
  *
include/linux/spinlock.h +113 -9

60 lines not on this page · raw message

include/linux/spinlock_types.h +14 -0
diff -Naur linux-2.6.21.5.orig/include/linux/spinlock_types.h linux-2.6.21.5/include/linux/spinlock_types.h

Lines of this file are not shown. View the raw message.

init/Kconfig +1 -0
diff -Naur linux-2.6.21.5.orig/init/Kconfig linux-2.6.21.5/init/Kconfig

Lines of this file are not shown. View the raw message.

init/main.c +7 -1
diff -Naur linux-2.6.21.5.orig/init/main.c linux-2.6.21.5/init/main.c

Lines of this file are not shown. View the raw message.

kernel/exit.c +1 -0
diff -Naur linux-2.6.21.5.orig/kernel/exit.c linux-2.6.21.5/kernel/exit.c

Lines of this file are not shown. View the raw message.

kernel/fork.c +10 -1
diff -Naur linux-2.6.21.5.orig/kernel/fork.c linux-2.6.21.5/kernel/fork.c

Lines of this file are not shown. View the raw message.

kernel/ipipe/core.c +1500 -0

1,500 lines not on this page · raw message

kernel/ipipe/Kconfig +6 -0
diff -Naur linux-2.6.21.5.orig/kernel/ipipe/Kconfig linux-2.6.21.5/kernel/ipipe/Kconfig

Lines of this file are not shown. View the raw message.

kernel/ipipe/Kconfig.debug +88 -0

88 lines not on this page · raw message

kernel/ipipe/Makefile +3 -0
diff -Naur linux-2.6.21.5.orig/kernel/ipipe/Makefile linux-2.6.21.5/kernel/ipipe/Makefile

Lines of this file are not shown. View the raw message.

kernel/ipipe/tracer.c +1291 -0

1,291 lines not on this page · raw message

kernel/irq/chip.c +129 -0

129 lines not on this page · raw message

kernel/Makefile +1 -0
diff -Naur linux-2.6.21.5.orig/kernel/Makefile linux-2.6.21.5/kernel/Makefile

Lines of this file are not shown. View the raw message.

kernel/printk.c +73 -0

73 lines not on this page · raw message

kernel/sched.c +64 -3

67 lines not on this page · raw message

kernel/signal.c +1 -0
diff -Naur linux-2.6.21.5.orig/kernel/signal.c linux-2.6.21.5/kernel/signal.c

Lines of this file are not shown. View the raw message.

kernel/spinlock.c +2 -2
diff -Naur linux-2.6.21.5.orig/kernel/spinlock.c linux-2.6.21.5/kernel/spinlock.c

Lines of this file are not shown. View the raw message.

kernel/sys.c +4 -2
diff -Naur linux-2.6.21.5.orig/kernel/sys.c linux-2.6.21.5/kernel/sys.c

Lines of this file are not shown. View the raw message.

lib/bust_spinlocks.c +3 -0
diff -Naur linux-2.6.21.5.orig/lib/bust_spinlocks.c linux-2.6.21.5/lib/bust_spinlocks.c

Lines of this file are not shown. View the raw message.

lib/ioremap.c +2 -2
diff -Naur linux-2.6.21.5.orig/lib/ioremap.c linux-2.6.21.5/lib/ioremap.c

Lines of this file are not shown. View the raw message.

lib/Kconfig.debug +2 -0
diff -Naur linux-2.6.21.5.orig/lib/Kconfig.debug linux-2.6.21.5/lib/Kconfig.debug

Lines of this file are not shown. View the raw message.

lib/smp_processor_id.c +3 -0
diff -Naur linux-2.6.21.5.orig/lib/smp_processor_id.c linux-2.6.21.5/lib/smp_processor_id.c

Lines of this file are not shown. View the raw message.

lib/spinlock_debug.c +18 -0
diff -Naur linux-2.6.21.5.orig/lib/spinlock_debug.c linux-2.6.21.5/lib/spinlock_debug.c

Lines of this file are not shown. View the raw message.

Makefile +4 -0
diff -Naur linux-2.6.21.5.orig/Makefile linux-2.6.21.5/Makefile

Lines of this file are not shown. View the raw message.

mm/memory.c +168 -31

199 lines not on this page · raw message

mm/mlock.c +2 -2
diff -Naur linux-2.6.21.5.orig/mm/mlock.c linux-2.6.21.5/mm/mlock.c

Lines of this file are not shown. View the raw message.

mm/vmalloc.c +1 -0
diff -Naur linux-2.6.21.5.orig/mm/vmalloc.c linux-2.6.21.5/mm/vmalloc.c

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#2 lore raw
Quoted 9 lines · Benjamin ZORES
Quoted 8 lines · Benjamin ZORES

Hi,

I've seen that Adeos has been officially ported to PowerPC architecture.
Please find an update of the adeos-ipipe-2.6.20-powerpc-1.6-02 to Linux 2.6.21 (.5) kernel, in case somebody's interested in it.

Ben
------------------------------------------------------------------------

Quoted 7 lines
Quoted 4 lines

_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core

Hi,

Attached is updated patch to latest 1.6-03 version.

Attached is updated patch to latest Adeos PowerPC 1.6-04 version.

Regards,

Ben

arch/powerpc/boot/Makefile +8 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/boot/Makefile linux-2.6.21.5/arch/powerpc/boot/Makefile
@@ -27,6 +27,14 @@
 		   $(shell $(CROSS32CC) -print-file-name=include) -fPIC
 BOOTAFLAGS	:= -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
 
+ifdef CONFIG_IPIPE_TRACE
+# do not trace the boot loader
+nullstring :=
+space      := $(nullstring) # end of the line
+pg_flag     = $(nullstring) -pg # end of the line
+BOOTCFLAGS     := $(subst ${pg_flag},${space},${BOOTCFLAGS})
+endif
+
 ifeq ($(call cc-option-yn, -fstack-protector),y)
 BOOTCFLAGS	+= -fno-stack-protector
 endif
arch/powerpc/Kconfig +2 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/Kconfig linux-2.6.21.5/arch/powerpc/Kconfig
@@ -758,6 +758,8 @@
 
 menu "Kernel options"
 
+source "kernel/ipipe/Kconfig"
+
 config HIGHMEM
 	bool "High memory support"
 	depends on PPC32
arch/powerpc/kernel/cputable.c +2 -2
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/cputable.c linux-2.6.21.5/arch/powerpc/kernel/cputable.c
@@ -1255,7 +1255,7 @@
 #endif /* CONFIG_PPC32 */
 };
 
-struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
+notrace struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
 {
 	struct cpu_spec *s = cpu_specs;
 	struct cpu_spec **cur = &cur_cpu_spec;
@@ -1284,7 +1284,7 @@
 	return NULL;
 }
 
-void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
+notrace void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
 {
 	struct fixup_entry {
 		unsigned long	mask;
arch/powerpc/kernel/entry_32.S +91 -0

139 lines not on this page · raw message

arch/powerpc/kernel/head_32.S +14 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/head_32.S linux-2.6.21.5/arch/powerpc/kernel/head_32.S
@@ -329,6 +329,12 @@
 	EXC_XFER_TEMPLATE(n, hdlr, n, NOCOPY, transfer_to_handler_full,	\
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -413,7 +419,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* External interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* Alignment exception */
 	. = 0x600
@@ -445,7 +455,11 @@
 	EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception)
 
 /* Decrementer */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x900, Decrementer, __ipipe_grab_timer, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE)
 	EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE)
arch/powerpc/kernel/head_44x.S +5 -2
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/head_44x.S linux-2.6.21.5/arch/powerpc/kernel/head_44x.S
@@ -424,8 +424,11 @@
 	/* Instruction Storage Interrupt */
 	INSTRUCTION_STORAGE_EXCEPTION
 
-	/* External Input Interrupt */
-	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, ExternalInput, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
+ 	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	/* Alignment Interrupt */
 	ALIGNMENT_EXCEPTION
arch/powerpc/kernel/head_4xx.S +14 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/head_4xx.S linux-2.6.21.5/arch/powerpc/kernel/head_4xx.S
@@ -228,6 +228,12 @@
 	EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -396,7 +402,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* 0x0500 - External Interrupt Exception */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x0500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* 0x0600 - Alignment Exception */
 	START_EXCEPTION(0x0600, Alignment)
@@ -434,7 +444,11 @@
 	lis	r0,TSR_PIS@h
 	mtspr	SPRN_TSR,r0		/* Clear the PIT exception */
 	addi	r3,r1,STACK_FRAME_OVERHEAD
+#ifdef CONFIG_IPIPE
+	EXC_XFER_IPIPE(0x1000, __ipipe_grab_timer)
+#else /* !CONFIG_IPIPE */
 	EXC_XFER_LITE(0x1000, timer_interrupt)
+#endif /* CONFIG_IPIPE */
 
 #if 0
 /* NOTE:
arch/powerpc/kernel/head_8xx.S +14 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/head_8xx.S linux-2.6.21.5/arch/powerpc/kernel/head_8xx.S
@@ -187,6 +187,12 @@
 	EXC_XFER_TEMPLATE(n, hdlr, n, NOCOPY, transfer_to_handler_full,	\
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+ 
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -238,7 +244,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* External interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* Alignment exception */
 	. = 0x600
@@ -259,7 +269,11 @@
 	EXCEPTION(0x800, FPUnavailable, unknown_exception, EXC_XFER_STD)
 
 /* Decrementer */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x900, Decrementer, __ipipe_grab_timer, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE)
 	EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE)
arch/powerpc/kernel/head_booke.h +16 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/head_booke.h linux-2.6.21.5/arch/powerpc/kernel/head_booke.h
@@ -187,6 +187,12 @@
 	EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -345,6 +351,15 @@
 	addi	r3,r1,STACK_FRAME_OVERHEAD;				      \
 	EXC_XFER_STD(0x0700, program_check_exception)
 
+#ifdef CONFIG_IPIPE
+#define DECREMENTER_EXCEPTION						      \
+	START_EXCEPTION(Decrementer)					      \
+	NORMAL_EXCEPTION_PROLOG;					      \
+	lis     r0,TSR_DIS@h;           /* Setup the DEC interrupt mask */    \
+	mtspr   SPRN_TSR,r0;		/* Clear the DEC interrupt */	      \
+	addi    r3,r1,STACK_FRAME_OVERHEAD;				      \
+	EXC_XFER_IPIPE(0x0900, __ipipe_grab_timer)
+#else /* !CONFIG_IPIPE */
 #define DECREMENTER_EXCEPTION						      \
 	START_EXCEPTION(Decrementer)					      \
 	NORMAL_EXCEPTION_PROLOG;					      \
@@ -352,6 +367,7 @@
 	mtspr   SPRN_TSR,r0;		/* Clear the DEC interrupt */	      \
 	addi    r3,r1,STACK_FRAME_OVERHEAD;				      \
 	EXC_XFER_LITE(0x0900, timer_interrupt)
+#endif /* CONFIG_IPIPE */
 
 #define FP_UNAVAILABLE_EXCEPTION					      \
 	START_EXCEPTION(FloatingPointUnavailable)			      \
arch/powerpc/kernel/head_fsl_booke.S +4 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/head_fsl_booke.S linux-2.6.21.5/arch/powerpc/kernel/head_fsl_booke.S
@@ -529,7 +529,11 @@
 	INSTRUCTION_STORAGE_EXCEPTION
 
 	/* External Input Interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, ExternalInput, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	/* Alignment Interrupt */
 	ALIGNMENT_EXCEPTION
arch/powerpc/kernel/idle.c +3 -2
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/idle.c linux-2.6.21.5/arch/powerpc/kernel/idle.c
@@ -58,6 +58,7 @@
 	while (1) {
 		while (!need_resched() && !cpu_should_die()) {
 			ppc64_runlatch_off();
+			ipipe_suspend_domain();
 
 			if (ppc_md.power_save) {
 				clear_thread_flag(TIF_POLLING_NRFLAG);
@@ -66,13 +67,13 @@
 				 * is ordered w.r.t. need_resched() test.
 				 */
 				smp_mb();
-				local_irq_disable();
+				local_irq_disable_hw();
 
 				/* check again after disabling irqs */
 				if (!need_resched() && !cpu_should_die())
 					ppc_md.power_save();
 
-				local_irq_enable();
+				local_irq_enable_hw();
 				set_thread_flag(TIF_POLLING_NRFLAG);
 
 			} else {
arch/powerpc/kernel/io.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/io.c linux-2.6.21.5/arch/powerpc/kernel/io.c
@@ -120,7 +120,7 @@
 
 #define IO_CHECK_ALIGN(v,a) ((((unsigned long)(v)) & ((a) - 1)) == 0)
 
-void _memset_io(volatile void __iomem *addr, int c, unsigned long n)
+notrace void _memset_io(volatile void __iomem *addr, int c, unsigned long n)
 {
 	void *p = (void __force *)addr;
 	u32 lc = c;
arch/powerpc/kernel/ipipe.c +649 -0

649 lines not on this page · raw message

arch/powerpc/kernel/irq.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/irq.c linux-2.6.21.5/arch/powerpc/kernel/irq.c
@@ -70,7 +70,7 @@
 #endif
 
 int __irq_offset_value;
-static int ppc_spurious_interrupts;
+int ppc_spurious_interrupts;
 
 #ifdef CONFIG_PPC32
 EXPORT_SYMBOL(__irq_offset_value);
arch/powerpc/kernel/Makefile +2 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/Makefile linux-2.6.21.5/arch/powerpc/kernel/Makefile
@@ -57,6 +57,8 @@
 obj-$(CONFIG_MODULES)		+= ppc_ksyms.o
 obj-$(CONFIG_BOOTX_TEXT)	+= btext.o
 obj-$(CONFIG_SMP)		+= smp.o
+obj-$(CONFIG_IPIPE)		+= ipipe.o
+obj-$(CONFIG_IPIPE_TRACE_MCOUNT)	+= mcount.o
 obj-$(CONFIG_KPROBES)		+= kprobes.o
 obj-$(CONFIG_PPC_UDBG_16550)	+= legacy_serial.o udbg_16550.o
 
arch/powerpc/kernel/mcount.S +75 -0

75 lines not on this page · raw message

arch/powerpc/kernel/setup_32.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/setup_32.c linux-2.6.21.5/arch/powerpc/kernel/setup_32.c
@@ -85,7 +85,7 @@
  * from the address that it was linked at, so we must use RELOC/PTRRELOC
  * to access static data (including strings).  -- paulus
  */
-unsigned long __init early_init(unsigned long dt_ptr)
+unsigned long notrace __init early_init(unsigned long dt_ptr)
 {
 	unsigned long offset = reloc_offset();
 	struct cpu_spec *spec;
arch/powerpc/kernel/time.c +12 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/kernel/time.c linux-2.6.21.5/arch/powerpc/kernel/time.c
@@ -74,6 +74,8 @@
 #endif
 #include <asm/smp.h>
 
+unsigned long disarm_decr[NR_CPUS];
+
 /* keep track of when we need to update the rtc */
 time_t last_rtc_update;
 #ifdef CONFIG_PPC_ISERIES
@@ -625,7 +627,9 @@
 #endif
 
 	old_regs = set_irq_regs(regs);
+#ifndef CONFIG_IPIPE
 	irq_enter();
+#endif
 
 	profile_tick(CPU_PROFILING);
 	calculate_steal_time();
@@ -651,7 +655,11 @@
 		 * is the case.
 		 */
 		if (!cpu_is_offline(cpu))
+#ifdef CONFIG_IPIPE
+			account_process_time(__ipipe_tick_regs + cpu);
+#else
 			account_process_time(regs);
+#endif
 
 		/*
 		 * No need to check whether cpu is offline here; boot_cpuid
@@ -672,7 +680,8 @@
 	}
 	
 	next_dec = tb_ticks_per_jiffy - ticks;
-	set_dec(next_dec);
+	if ( !disarm_decr[cpu] )
+	    set_dec(next_dec);
 
 #ifdef CONFIG_PPC_ISERIES
 	if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending())
@@ -687,7 +696,9 @@
 	}
 #endif
 
+#ifndef CONFIG_IPIPE
 	irq_exit();
+#endif
 	set_irq_regs(old_regs);
 }
 
arch/powerpc/kernel/traps.c +47 -1

149 lines not on this page · raw message

arch/powerpc/mm/fault.c +3 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/mm/fault.c linux-2.6.21.5/arch/powerpc/mm/fault.c
@@ -160,6 +160,9 @@
 	int trap = TRAP(regs);
  	int is_exec = trap == 0x400;
 
+	if (ipipe_trap_notify(IPIPE_TRAP_ACCESS,regs))
+	    	return 0;
+
 #if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
 	/*
 	 * Fortunately the bit assignments in SRR1 for an instruction
arch/powerpc/platforms/iseries/irq.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/platforms/iseries/irq.c linux-2.6.21.5/arch/powerpc/platforms/iseries/irq.c
@@ -81,7 +81,7 @@
 	} data;
 };
 
-static DEFINE_SPINLOCK(pending_irqs_lock);
+static IPIPE_DEFINE_SPINLOCK(pending_irqs_lock);
 static int num_pending_irqs;
 static int pending_irqs[NR_IRQS];
 
arch/powerpc/platforms/powermac/pic.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/platforms/powermac/pic.c linux-2.6.21.5/arch/powerpc/platforms/powermac/pic.c
@@ -63,7 +63,7 @@
 static int max_real_irqs;
 static u32 level_mask[4];
 
-static DEFINE_SPINLOCK(pmac_pic_lock);
+static IPIPE_DEFINE_SPINLOCK(pmac_pic_lock);
 
 #define NR_MASK_WORDS	((NR_IRQS + 31) / 32)
 static unsigned long ppc_lost_interrupts[NR_MASK_WORDS];
arch/powerpc/platforms/ps3/interrupt.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/platforms/ps3/interrupt.c linux-2.6.21.5/arch/powerpc/platforms/ps3/interrupt.c
@@ -71,7 +71,7 @@
 		u64 unused_2[3];
 	};
 	u64 ipi_debug_brk_mask;
-	spinlock_t lock;
+	ipipe_spinlock_t lock;
 };
 
 /**
arch/powerpc/sysdev/i8259.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/sysdev/i8259.c linux-2.6.21.5/arch/powerpc/sysdev/i8259.c
@@ -23,7 +23,7 @@
 #define cached_A1 (cached_8259[0])
 #define cached_21 (cached_8259[1])
 
-static DEFINE_SPINLOCK(i8259_lock);
+static IPIPE_DEFINE_SPINLOCK(i8259_lock);
 
 static struct device_node *i8259_node;
 static struct irq_host *i8259_host;
arch/powerpc/sysdev/ipic.c +1 -1
diff -Naur linux-2.6.21.5.orig/arch/powerpc/sysdev/ipic.c linux-2.6.21.5/arch/powerpc/sysdev/ipic.c
@@ -30,7 +30,7 @@
 #include "ipic.h"
 
 static struct ipic * primary_ipic;
-static DEFINE_SPINLOCK(ipic_lock);
+static IPIPE_DEFINE_SPINLOCK(ipic_lock);
 
 static struct ipic_info ipic_info[] = {
 	[9] = {
arch/powerpc/sysdev/mpic.c +18 -3
diff -Naur linux-2.6.21.5.orig/arch/powerpc/sysdev/mpic.c linux-2.6.21.5/arch/powerpc/sysdev/mpic.c
@@ -44,7 +44,7 @@
 
 static struct mpic *mpics;
 static struct mpic *mpic_primary;
-static DEFINE_SPINLOCK(mpic_lock);
+static IPIPE_DEFINE_SPINLOCK(mpic_lock);
 
 #ifdef CONFIG_PPC32	/* XXX for now */
 #ifdef CONFIG_IRQ_ALL_CPUS
@@ -564,19 +564,24 @@
 	unsigned int loops = 100000;
 	struct mpic *mpic = mpic_from_irq(irq);
 	unsigned int src = mpic_irq_to_hw(irq);
+        unsigned long flags;
 
 	DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, irq, src);
 
+        local_irq_save_hw_cond(flags);
+
 	mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI),
 		       mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) &
 		       ~MPIC_VECPRI_MASK);
 	/* make sure mask gets to controller before we return to user */
 	do {
 		if (!loops--) {
-			printk(KERN_ERR "mpic_enable_irq timeout\n");
+			printk(KERN_ERR "mpic_unmask_irq timeout (irq %u)\n", irq);
 			break;
 		}
 	} while(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK);
+
+        local_irq_restore_hw_cond(flags);
 }
 
 static void mpic_mask_irq(unsigned int irq)
@@ -584,9 +589,12 @@
 	unsigned int loops = 100000;
 	struct mpic *mpic = mpic_from_irq(irq);
 	unsigned int src = mpic_irq_to_hw(irq);
+        unsigned long flags;
 
 	DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src);
 
+        local_irq_save_hw_cond(flags);
+
 	mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI),
 		       mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) |
 		       MPIC_VECPRI_MASK);
@@ -594,10 +602,12 @@
 	/* make sure mask gets to controller before we return to user */
 	do {
 		if (!loops--) {
-			printk(KERN_ERR "mpic_enable_irq timeout\n");
+			printk(KERN_ERR "mpic_mask_irq timeout (irq=%u)\n", irq);
 			break;
 		}
 	} while(!(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK));
+
+        local_irq_restore_hw_cond(flags);
 }
 
 static void mpic_end_irq(unsigned int irq)
@@ -739,6 +749,7 @@
 	unsigned int src = mpic_irq_to_hw(virq);
 	struct irq_desc *desc = get_irq_desc(virq);
 	unsigned int vecpri, vold, vnew;
+        unsigned long flags;
 
 	DBG("mpic: set_irq_type(mpic:@%p,virq:%d,src:0x%x,type:0x%x)\n",
 	    mpic, virq, src, flow_type);
@@ -763,6 +774,8 @@
 	else
 		vecpri = mpic_type_to_vecpri(mpic, flow_type);
 
+	local_irq_save_hw_cond(flags);
+        
 	vold = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI));
 	vnew = vold & ~(MPIC_INFO(VECPRI_POLARITY_MASK) |
 			MPIC_INFO(VECPRI_SENSE_MASK));
@@ -770,6 +783,8 @@
 	if (vold != vnew)
 		mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), vnew);
 
+	local_irq_restore_hw_cond(flags);
+        
 	return 0;
 }
 
arch/powerpc/sysdev/tsi108_pci.c +10 -0
diff -Naur linux-2.6.21.5.orig/arch/powerpc/sysdev/tsi108_pci.c linux-2.6.21.5/arch/powerpc/sysdev/tsi108_pci.c
@@ -249,7 +249,9 @@
 {
 	u_int irp_cfg;
 	int int_line = (irq - IRQ_PCI_INTAD_BASE);
+	unsigned long flags;
 
+	local_irq_save_hw_cond(flags);
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
 	mb();
 	irp_cfg |= (1 << int_line);	/* INTx_DIR = output */
@@ -257,19 +259,23 @@
 	tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL, irp_cfg);
 	mb();
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
+	local_irq_restore_hw_cond(flags);
 }
 
 static void tsi108_pci_int_unmask(u_int irq)
 {
 	u_int irp_cfg;
 	int int_line = (irq - IRQ_PCI_INTAD_BASE);
+	unsigned long flags;
 
+	local_irq_save_hw_cond(flags);
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
 	mb();
 	irp_cfg &= ~(1 << int_line);
 	irp_cfg |= (3 << (8 + (int_line * 2)));
 	tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL, irp_cfg);
 	mb();
+	local_irq_restore_hw_cond(flags);
 }
 
 static void init_pci_source(void)
@@ -360,6 +366,9 @@
 
 static void tsi108_pci_irq_end(u_int irq)
 {
+	unsigned long flags;
+
+	local_irq_save_hw_cond(flags);
 	tsi108_pci_int_unmask(irq);
 
 	/* Enable interrupts from PCI block */
@@ -367,6 +376,7 @@
 			 tsi108_read_reg(TSI108_PCI_OFFSET +
 					 TSI108_PCI_IRP_ENABLE) |
 			 TSI108_PCI_IRP_ENABLE_P_INT);
+	local_irq_restore_hw_cond(flags);
 	mb();
 }
 
drivers/pci/htirq.c +1 -1
diff -Naur linux-2.6.21.5.orig/drivers/pci/htirq.c linux-2.6.21.5/drivers/pci/htirq.c
@@ -21,7 +21,7 @@
  * With multiple simultaneous hypertransport irq devices it might pay
  * to make this more fine grained.  But start with simple, stupid, and correct.
  */
-static DEFINE_SPINLOCK(ht_irq_lock);
+static IPIPE_DEFINE_SPINLOCK(ht_irq_lock);
 
 struct ht_irq_cfg {
 	struct pci_dev *dev;
drivers/serial/mpc52xx_uart.c +34 -0
diff -Naur linux-2.6.21.5.orig/drivers/serial/mpc52xx_uart.c linux-2.6.21.5/drivers/serial/mpc52xx_uart.c
@@ -803,6 +803,40 @@
 #endif
 
 
+#ifdef CONFIG_IPIPE
+
+#include <stdarg.h>
+
+void __ipipe_serial_debug(const char *fmt, ...)
+{
+	struct console *co = MPC52xx_PSC_CONSOLE;
+	unsigned long flags, count;
+	struct uart_port *port;
+	char buf[128];
+	va_list ap;
+
+	if (co->index < 0)
+		return;		/* No console. */
+
+	port = &mpc52xx_uart_ports[co->index];
+
+	if (!port->mapbase)
+		return;		/* Too early. */
+
+	va_start(ap, fmt);
+	vsprintf(buf, fmt, ap);
+	va_end(ap);
+	count = strlen(buf);
+
+	local_irq_save_hw(flags);
+	mpc52xx_console_write(co, buf, count);
+	local_irq_restore_hw(flags);
+}
+
+EXPORT_SYMBOL(__ipipe_serial_debug);
+
+#endif
+
 /* ======================================================================== */
 /* UART Driver                                                              */
 /* ======================================================================== */
include/asm-powerpc/hw_irq.h +133 -11

183 lines not on this page · raw message

include/asm-powerpc/ipipe.h +219 -0

219 lines not on this page · raw message

include/asm-ppc/mmu_context.h +11 -1
diff -Naur linux-2.6.21.5.orig/include/asm-ppc/mmu_context.h linux-2.6.21.5/include/asm-ppc/mmu_context.h
@@ -153,7 +153,10 @@
  */
 static inline void destroy_context(struct mm_struct *mm)
 {
+	unsigned long flags;
+
 	preempt_disable();
+	local_irq_save_hw_cond(flags);
 	if (mm->context.id != NO_CONTEXT) {
 		clear_bit(mm->context.id, context_map);
 		mm->context.id = NO_CONTEXT;
@@ -161,6 +164,7 @@
 		atomic_inc(&nr_free_contexts);
 #endif
 	}
+ 	local_irq_restore_hw_cond(flags);
 	preempt_enable();
 }
 
@@ -193,7 +197,13 @@
  * After we have set current->mm to a new value, this activates
  * the context for the new mm so we see the new mappings.
  */
-#define activate_mm(active_mm, mm)   switch_mm(active_mm, mm, current)
+#define activate_mm(active_mm, mm)   \
+do { \
+	unsigned long flags; \
+	local_irq_save_hw_cond(flags); \
+	switch_mm(active_mm, mm, current); \
+	local_irq_restore_hw_cond(flags);	   \
+} while(0)
 
 extern void mmu_context_init(void);
 
include/linux/hardirq.h +2 -2
diff -Naur linux-2.6.21.5.orig/include/linux/hardirq.h linux-2.6.21.5/include/linux/hardirq.h
@@ -133,7 +133,7 @@
  */
 extern void irq_exit(void);
 
-#define nmi_enter()		do { lockdep_off(); __irq_enter(); } while (0)
-#define nmi_exit()		do { __irq_exit(); lockdep_on(); } while (0)
+#define nmi_enter()		do { if (ipipe_root_domain_p) { lockdep_off(); __irq_enter(); } } while (0)
+#define nmi_exit()		do { if (ipipe_root_domain_p) { __irq_exit(); lockdep_on(); } } while (0)
 
 #endif /* LINUX_HARDIRQ_H */
include/linux/ipipe_base.h +88 -0

88 lines not on this page · raw message

include/linux/ipipe.h +692 -0

692 lines not on this page · raw message

include/linux/ipipe_trace.h +49 -0

49 lines not on this page · raw message

include/linux/irq.h +6 -0
diff -Naur linux-2.6.21.5.orig/include/linux/irq.h linux-2.6.21.5/include/linux/irq.h
@@ -151,6 +151,12 @@
  * Pad this out to 32 bytes for cache and indexing reasons.
  */
 struct irq_desc {
+#ifdef CONFIG_IPIPE
+	void			fastcall (*ipipe_ack)(unsigned int irq,
+						      struct irq_desc *desc);
+	void			fastcall (*ipipe_end)(unsigned int irq,
+						      struct irq_desc *desc);
+#endif /* CONFIG_IPIPE */
 	irq_flow_handler_t	handle_irq;
 	struct irq_chip		*chip;
 	struct msi_desc		*msi_desc;
include/linux/kernel.h +6 -2
diff -Naur linux-2.6.21.5.orig/include/linux/kernel.h linux-2.6.21.5/include/linux/kernel.h
@@ -14,6 +14,7 @@
 #include <linux/compiler.h>
 #include <linux/bitops.h>
 #include <linux/log2.h>
+#include <linux/ipipe_base.h>
 #include <asm/byteorder.h>
 #include <asm/bug.h>
 
@@ -72,9 +73,12 @@
  */
 #ifdef CONFIG_PREEMPT_VOLUNTARY
 extern int cond_resched(void);
-# define might_resched() cond_resched()
+# define might_resched() do { \
+		ipipe_check_context(ipipe_root_domain); \
+		cond_resched(); \
+	} while (0)
 #else
-# define might_resched() do { } while (0)
+# define might_resched() ipipe_check_context(ipipe_root_domain)
 #endif
 
 #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
include/linux/linkage.h +4 -0
diff -Naur linux-2.6.21.5.orig/include/linux/linkage.h linux-2.6.21.5/include/linux/linkage.h
@@ -64,4 +64,8 @@
 #define fastcall
 #endif
 
+#ifndef notrace
+#define notrace		__attribute__((no_instrument_function))
+#endif
+
 #endif
include/linux/mm.h +1 -0
diff -Naur linux-2.6.21.5.orig/include/linux/mm.h linux-2.6.21.5/include/linux/mm.h
@@ -169,6 +169,7 @@
 #define VM_MAPPED_COPY	0x01000000	/* T if mapped copy of data (nommu mmap) */
 #define VM_INSERTPAGE	0x02000000	/* The vma has had "vm_insert_page()" done on it */
 #define VM_ALWAYSDUMP	0x04000000	/* Always include in core dumps */
+#define VM_PINNED	0x08000000	/* Disable faults for the vma */
 
 #ifndef VM_STACK_DEFAULT_FLAGS		/* arch can override this */
 #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
include/linux/preempt.h +8 -4
diff -Naur linux-2.6.21.5.orig/include/linux/preempt.h linux-2.6.21.5/include/linux/preempt.h
@@ -8,6 +8,7 @@
 
 #include <linux/thread_info.h>
 #include <linux/linkage.h>
+#include <linux/ipipe_base.h>
 
 #ifdef CONFIG_DEBUG_PREEMPT
   extern void fastcall add_preempt_count(int val);
@@ -28,18 +29,21 @@
 
 #define preempt_disable() \
 do { \
+	ipipe_check_context(ipipe_root_domain); \
 	inc_preempt_count(); \
 	barrier(); \
 } while (0)
 
 #define preempt_enable_no_resched() \
 do { \
+	ipipe_check_context(ipipe_root_domain); \
 	barrier(); \
 	dec_preempt_count(); \
 } while (0)
 
 #define preempt_check_resched() \
 do { \
+	ipipe_check_context(ipipe_root_domain); \
 	if (unlikely(test_thread_flag(TIF_NEED_RESCHED))) \
 		preempt_schedule(); \
 } while (0)
@@ -53,10 +57,10 @@
 
 #else
 
-#define preempt_disable()		do { } while (0)
-#define preempt_enable_no_resched()	do { } while (0)
-#define preempt_enable()		do { } while (0)
-#define preempt_check_resched()		do { } while (0)
+#define preempt_disable()		ipipe_check_context(ipipe_root_domain)
+#define preempt_enable_no_resched()	ipipe_check_context(ipipe_root_domain)
+#define preempt_enable()		ipipe_check_context(ipipe_root_domain)
+#define preempt_check_resched()		ipipe_check_context(ipipe_root_domain)
 
 #endif
 
include/linux/sched.h +16 -0
diff -Naur linux-2.6.21.5.orig/include/linux/sched.h linux-2.6.21.5/include/linux/sched.h
@@ -54,6 +54,7 @@
 #include <linux/cpumask.h>
 #include <linux/errno.h>
 #include <linux/nodemask.h>
+#include <linux/ipipe.h>
 
 #include <asm/system.h>
 #include <asm/semaphore.h>
@@ -151,6 +152,13 @@
 /* in tsk->state again */
 #define TASK_NONINTERACTIVE	64
 #define TASK_DEAD		128
+#ifdef CONFIG_IPIPE
+#define TASK_ATOMICSWITCH	512
+#define TASK_NOWAKEUP          1024
+#else  /* !CONFIG_IPIPE */
+#define TASK_ATOMICSWITCH	0
+#define TASK_NOWAKEUP          0
+#endif /* CONFIG_IPIPE */
 
 #define __set_task_state(tsk, state_value)		\
 	do { (tsk)->state = (state_value); } while (0)
@@ -1041,6 +1049,9 @@
 
 	atomic_t fs_excl;	/* holding fs exclusive resources */
 	struct rcu_head rcu;
+#ifdef CONFIG_IPIPE
+	void *ptd[IPIPE_ROOT_NPTDKEYS];
+#endif
 
 	/*
 	 * cache last used pipe for splice
@@ -1158,6 +1169,11 @@
 #define PF_SPREAD_SLAB	0x02000000	/* Spread some slab caches over cpuset */
 #define PF_MEMPOLICY	0x10000000	/* Non-default NUMA mempolicy */
 #define PF_MUTEX_TESTER	0x20000000	/* Thread belongs to the rt mutex tester */
+#ifdef CONFIG_IPIPE
+#define PF_EVNOTIFY    0x40000000	/* Notify other domains about internal events */
+#else
+#define PF_EVNOTIFY    0
+#endif /* CONFIG_IPIPE */
 
 /*
  * Only the _current_ task can read/write to tsk->flags, but other
include/linux/smp.h +2 -0
diff -Naur linux-2.6.21.5.orig/include/linux/smp.h linux-2.6.21.5/include/linux/smp.h
@@ -109,6 +109,8 @@
 
 #endif /* !SMP */
 
+#include <linux/ipipe_base.h>
+
 /*
  * smp_processor_id(): get the current CPU ID.
  *
include/linux/spinlock.h +117 -9

55 lines not on this page · raw message

include/linux/spinlock_types.h +14 -0
diff -Naur linux-2.6.21.5.orig/include/linux/spinlock_types.h linux-2.6.21.5/include/linux/spinlock_types.h

Lines of this file are not shown. View the raw message.

init/Kconfig +1 -0
diff -Naur linux-2.6.21.5.orig/init/Kconfig linux-2.6.21.5/init/Kconfig

Lines of this file are not shown. View the raw message.

init/main.c +7 -1
diff -Naur linux-2.6.21.5.orig/init/main.c linux-2.6.21.5/init/main.c

Lines of this file are not shown. View the raw message.

kernel/exit.c +1 -0
diff -Naur linux-2.6.21.5.orig/kernel/exit.c linux-2.6.21.5/kernel/exit.c

Lines of this file are not shown. View the raw message.

kernel/fork.c +10 -1
diff -Naur linux-2.6.21.5.orig/kernel/fork.c linux-2.6.21.5/kernel/fork.c

Lines of this file are not shown. View the raw message.

kernel/ipipe/core.c +1517 -0

1,517 lines not on this page · raw message

kernel/ipipe/Kconfig +6 -0
diff -Naur linux-2.6.21.5.orig/kernel/ipipe/Kconfig linux-2.6.21.5/kernel/ipipe/Kconfig

Lines of this file are not shown. View the raw message.

kernel/ipipe/Kconfig.debug +88 -0

88 lines not on this page · raw message

kernel/ipipe/Makefile +3 -0
diff -Naur linux-2.6.21.5.orig/kernel/ipipe/Makefile linux-2.6.21.5/kernel/ipipe/Makefile

Lines of this file are not shown. View the raw message.

kernel/ipipe/tracer.c +1292 -0

1,292 lines not on this page · raw message

kernel/irq/chip.c +129 -0

129 lines not on this page · raw message

kernel/Makefile +1 -0
diff -Naur linux-2.6.21.5.orig/kernel/Makefile linux-2.6.21.5/kernel/Makefile

Lines of this file are not shown. View the raw message.

kernel/printk.c +73 -0

73 lines not on this page · raw message

kernel/sched.c +64 -3

67 lines not on this page · raw message

kernel/signal.c +1 -0
diff -Naur linux-2.6.21.5.orig/kernel/signal.c linux-2.6.21.5/kernel/signal.c

Lines of this file are not shown. View the raw message.

kernel/spinlock.c +2 -2
diff -Naur linux-2.6.21.5.orig/kernel/spinlock.c linux-2.6.21.5/kernel/spinlock.c

Lines of this file are not shown. View the raw message.

kernel/sys.c +4 -2
diff -Naur linux-2.6.21.5.orig/kernel/sys.c linux-2.6.21.5/kernel/sys.c

Lines of this file are not shown. View the raw message.

lib/bust_spinlocks.c +3 -0
diff -Naur linux-2.6.21.5.orig/lib/bust_spinlocks.c linux-2.6.21.5/lib/bust_spinlocks.c

Lines of this file are not shown. View the raw message.

lib/ioremap.c +2 -2
diff -Naur linux-2.6.21.5.orig/lib/ioremap.c linux-2.6.21.5/lib/ioremap.c

Lines of this file are not shown. View the raw message.

lib/Kconfig.debug +2 -0
diff -Naur linux-2.6.21.5.orig/lib/Kconfig.debug linux-2.6.21.5/lib/Kconfig.debug

Lines of this file are not shown. View the raw message.

lib/smp_processor_id.c +3 -0
diff -Naur linux-2.6.21.5.orig/lib/smp_processor_id.c linux-2.6.21.5/lib/smp_processor_id.c

Lines of this file are not shown. View the raw message.

lib/spinlock_debug.c +18 -0
diff -Naur linux-2.6.21.5.orig/lib/spinlock_debug.c linux-2.6.21.5/lib/spinlock_debug.c

Lines of this file are not shown. View the raw message.

Makefile +4 -0
diff -Naur linux-2.6.21.5.orig/Makefile linux-2.6.21.5/Makefile

Lines of this file are not shown. View the raw message.

mm/memory.c +168 -31

199 lines not on this page · raw message

mm/mlock.c +2 -2
diff -Naur linux-2.6.21.5.orig/mm/mlock.c linux-2.6.21.5/mm/mlock.c

Lines of this file are not shown. View the raw message.

mm/vmalloc.c +1 -0
diff -Naur linux-2.6.21.5.orig/mm/vmalloc.c linux-2.6.21.5/mm/vmalloc.c

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#3 lore raw

Benjamin,

Quoted 7 lines · Benjamin ZORES
Quoted 6 lines · Benjamin ZORES
Quoted 5 lines · Benjamin ZORES

Hi,

I've seen that Adeos has been officially ported to PowerPC architecture. Please find an update of the adeos-ipipe-2.6.20-powerpc-1.6-02 to Linux 2.6.21 (.5) kernel, in case somebody's interested in it.

Sorry for the delay in replying, I was caught on the dark 64bit side of the powerpc world. I won't do this again, I mean, delaying, not 64bit fiddling. Ok, maybe I'll do, but I will apologize again. Merged in both branches. Thanks a lot,

Quoted 20 lines
Quoted 11 lines
Quoted 8 lines

Ben
------------------------------------------------------------------------

_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core

Hi,

Attached is updated patch to latest 1.6-03 version.

Attached is updated patch to latest Adeos PowerPC 1.6-04 version.

Regards,

Ben
_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core

Signature · 1 line
Philippe.
#4 lore raw
Quoted 10 lines · Philippe Gerum

Benjamin,

Quoted 6 lines · Benjamin ZORES
Quoted 4 lines · Benjamin ZORES
Quoted 2 lines · Benjamin ZORES

Hi,

Quoted 9 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

I've seen that Adeos has been officially ported to PowerPC architecture.
Please find an update of the adeos-ipipe-2.6.20-powerpc-1.6-02 to Linux 2.6.21 (.5) kernel, in case somebody's interested in it.

Sorry for the delay in replying, I was caught on the dark 64bit side of the powerpc world. I won't do this again, I mean, delaying, not 64bit fiddling. Ok, maybe I'll do, but I will apologize again. Merged in both branches. Thanks a lot,

Hi,

It's definitely not a problem.
I work in OSS too so I know what delaying answers on ML means ;-) I'm just glad it has been commited.

Thx

#5 lore raw
In reply to Benjamin ZORES
Quoted 11 lines · Benjamin ZORES
Quoted 10 lines · Benjamin ZORES
Quoted 9 lines · Benjamin ZORES

Hi,

I've seen that Adeos has been officially ported to PowerPC architecture.
Please find an update of the adeos-ipipe-2.6.20-powerpc-1.6-02 to Linux 2.6.21 (.5) kernel, in case somebody's interested in it.

Ben
------------------------------------------------------------------------

Quoted 8 lines
Quoted 7 lines
Quoted 4 lines

_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core

Hi,

Attached is updated patch to latest 1.6-03 version.

Attached is updated patch to latest Adeos PowerPC 1.6-04 version.

Hi,

Attached is latest Adeos PowerPC 1.7-00 version for 2.6.21.

Ben

arch/powerpc/boot/Makefile +8 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/boot/Makefile linux-2.6.21.7/arch/powerpc/boot/Makefile
@@ -27,6 +27,14 @@
 		   $(shell $(CROSS32CC) -print-file-name=include) -fPIC
 BOOTAFLAGS	:= -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
 
+ifdef CONFIG_IPIPE_TRACE
+# do not trace the boot loader
+nullstring :=
+space      := $(nullstring) # end of the line
+pg_flag     = $(nullstring) -pg # end of the line
+BOOTCFLAGS     := $(subst ${pg_flag},${space},${BOOTCFLAGS})
+endif
+
 ifeq ($(call cc-option-yn, -fstack-protector),y)
 BOOTCFLAGS	+= -fno-stack-protector
 endif
arch/powerpc/Kconfig +2 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/Kconfig linux-2.6.21.7/arch/powerpc/Kconfig
@@ -758,6 +758,8 @@
 
 menu "Kernel options"
 
+source "kernel/ipipe/Kconfig"
+
 config HIGHMEM
 	bool "High memory support"
 	depends on PPC32
arch/powerpc/kernel/cputable.c +2 -2
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/cputable.c linux-2.6.21.7/arch/powerpc/kernel/cputable.c
@@ -1255,7 +1255,7 @@
 #endif /* CONFIG_PPC32 */
 };
 
-struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
+notrace struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
 {
 	struct cpu_spec *s = cpu_specs;
 	struct cpu_spec **cur = &cur_cpu_spec;
@@ -1284,7 +1284,7 @@
 	return NULL;
 }
 
-void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
+notrace void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
 {
 	struct fixup_entry {
 		unsigned long	mask;
arch/powerpc/kernel/entry_32.S +91 -0

139 lines not on this page · raw message

arch/powerpc/kernel/head_32.S +14 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_32.S linux-2.6.21.7/arch/powerpc/kernel/head_32.S
@@ -329,6 +329,12 @@
 	EXC_XFER_TEMPLATE(n, hdlr, n, NOCOPY, transfer_to_handler_full,	\
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -413,7 +419,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* External interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* Alignment exception */
 	. = 0x600
@@ -445,7 +455,11 @@
 	EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception)
 
 /* Decrementer */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x900, Decrementer, __ipipe_grab_timer, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE)
 	EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE)
arch/powerpc/kernel/head_44x.S +5 -2
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_44x.S linux-2.6.21.7/arch/powerpc/kernel/head_44x.S
@@ -424,8 +424,11 @@
 	/* Instruction Storage Interrupt */
 	INSTRUCTION_STORAGE_EXCEPTION
 
-	/* External Input Interrupt */
-	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, ExternalInput, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
+ 	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	/* Alignment Interrupt */
 	ALIGNMENT_EXCEPTION
arch/powerpc/kernel/head_4xx.S +14 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_4xx.S linux-2.6.21.7/arch/powerpc/kernel/head_4xx.S
@@ -228,6 +228,12 @@
 	EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -396,7 +402,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* 0x0500 - External Interrupt Exception */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x0500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* 0x0600 - Alignment Exception */
 	START_EXCEPTION(0x0600, Alignment)
@@ -434,7 +444,11 @@
 	lis	r0,TSR_PIS@h
 	mtspr	SPRN_TSR,r0		/* Clear the PIT exception */
 	addi	r3,r1,STACK_FRAME_OVERHEAD
+#ifdef CONFIG_IPIPE
+	EXC_XFER_IPIPE(0x1000, __ipipe_grab_timer)
+#else /* !CONFIG_IPIPE */
 	EXC_XFER_LITE(0x1000, timer_interrupt)
+#endif /* CONFIG_IPIPE */
 
 #if 0
 /* NOTE:
arch/powerpc/kernel/head_8xx.S +14 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_8xx.S linux-2.6.21.7/arch/powerpc/kernel/head_8xx.S
@@ -187,6 +187,12 @@
 	EXC_XFER_TEMPLATE(n, hdlr, n, NOCOPY, transfer_to_handler_full,	\
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+ 
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -238,7 +244,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* External interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* Alignment exception */
 	. = 0x600
@@ -259,7 +269,11 @@
 	EXCEPTION(0x800, FPUnavailable, unknown_exception, EXC_XFER_STD)
 
 /* Decrementer */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x900, Decrementer, __ipipe_grab_timer, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE)
 	EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE)
arch/powerpc/kernel/head_booke.h +16 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_booke.h linux-2.6.21.7/arch/powerpc/kernel/head_booke.h
@@ -187,6 +187,12 @@
 	EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -345,6 +351,15 @@
 	addi	r3,r1,STACK_FRAME_OVERHEAD;				      \
 	EXC_XFER_STD(0x0700, program_check_exception)
 
+#ifdef CONFIG_IPIPE
+#define DECREMENTER_EXCEPTION						      \
+	START_EXCEPTION(Decrementer)					      \
+	NORMAL_EXCEPTION_PROLOG;					      \
+	lis     r0,TSR_DIS@h;           /* Setup the DEC interrupt mask */    \
+	mtspr   SPRN_TSR,r0;		/* Clear the DEC interrupt */	      \
+	addi    r3,r1,STACK_FRAME_OVERHEAD;				      \
+	EXC_XFER_IPIPE(0x0900, __ipipe_grab_timer)
+#else /* !CONFIG_IPIPE */
 #define DECREMENTER_EXCEPTION						      \
 	START_EXCEPTION(Decrementer)					      \
 	NORMAL_EXCEPTION_PROLOG;					      \
@@ -352,6 +367,7 @@
 	mtspr   SPRN_TSR,r0;		/* Clear the DEC interrupt */	      \
 	addi    r3,r1,STACK_FRAME_OVERHEAD;				      \
 	EXC_XFER_LITE(0x0900, timer_interrupt)
+#endif /* CONFIG_IPIPE */
 
 #define FP_UNAVAILABLE_EXCEPTION					      \
 	START_EXCEPTION(FloatingPointUnavailable)			      \
arch/powerpc/kernel/head_fsl_booke.S +4 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_fsl_booke.S linux-2.6.21.7/arch/powerpc/kernel/head_fsl_booke.S
@@ -529,7 +529,11 @@
 	INSTRUCTION_STORAGE_EXCEPTION
 
 	/* External Input Interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, ExternalInput, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	/* Alignment Interrupt */
 	ALIGNMENT_EXCEPTION
arch/powerpc/kernel/idle.c +3 -2
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/idle.c linux-2.6.21.7/arch/powerpc/kernel/idle.c
@@ -58,6 +58,7 @@
 	while (1) {
 		while (!need_resched() && !cpu_should_die()) {
 			ppc64_runlatch_off();
+			ipipe_suspend_domain();
 
 			if (ppc_md.power_save) {
 				clear_thread_flag(TIF_POLLING_NRFLAG);
@@ -66,13 +67,13 @@
 				 * is ordered w.r.t. need_resched() test.
 				 */
 				smp_mb();
-				local_irq_disable();
+				local_irq_disable_hw();
 
 				/* check again after disabling irqs */
 				if (!need_resched() && !cpu_should_die())
 					ppc_md.power_save();
 
-				local_irq_enable();
+				local_irq_enable_hw();
 				set_thread_flag(TIF_POLLING_NRFLAG);
 
 			} else {
arch/powerpc/kernel/io.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/io.c linux-2.6.21.7/arch/powerpc/kernel/io.c
@@ -120,7 +120,7 @@
 
 #define IO_CHECK_ALIGN(v,a) ((((unsigned long)(v)) & ((a) - 1)) == 0)
 
-void _memset_io(volatile void __iomem *addr, int c, unsigned long n)
+notrace void _memset_io(volatile void __iomem *addr, int c, unsigned long n)
 {
 	void *p = (void __force *)addr;
 	u32 lc = c;
arch/powerpc/kernel/ipipe.c +703 -0

703 lines not on this page · raw message

arch/powerpc/kernel/irq.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/irq.c linux-2.6.21.7/arch/powerpc/kernel/irq.c
@@ -70,7 +70,7 @@
 #endif
 
 int __irq_offset_value;
-static int ppc_spurious_interrupts;
+int ppc_spurious_interrupts;
 
 #ifdef CONFIG_PPC32
 EXPORT_SYMBOL(__irq_offset_value);
arch/powerpc/kernel/Makefile +2 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/Makefile linux-2.6.21.7/arch/powerpc/kernel/Makefile
@@ -57,6 +57,8 @@
 obj-$(CONFIG_MODULES)		+= ppc_ksyms.o
 obj-$(CONFIG_BOOTX_TEXT)	+= btext.o
 obj-$(CONFIG_SMP)		+= smp.o
+obj-$(CONFIG_IPIPE)		+= ipipe.o
+obj-$(CONFIG_IPIPE_TRACE_MCOUNT)	+= mcount.o
 obj-$(CONFIG_KPROBES)		+= kprobes.o
 obj-$(CONFIG_PPC_UDBG_16550)	+= legacy_serial.o udbg_16550.o
 
arch/powerpc/kernel/mcount.S +75 -0

75 lines not on this page · raw message

arch/powerpc/kernel/setup_32.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/setup_32.c linux-2.6.21.7/arch/powerpc/kernel/setup_32.c
@@ -85,7 +85,7 @@
  * from the address that it was linked at, so we must use RELOC/PTRRELOC
  * to access static data (including strings).  -- paulus
  */
-unsigned long __init early_init(unsigned long dt_ptr)
+unsigned long notrace __init early_init(unsigned long dt_ptr)
 {
 	unsigned long offset = reloc_offset();
 	struct cpu_spec *spec;
arch/powerpc/kernel/time.c +12 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/time.c linux-2.6.21.7/arch/powerpc/kernel/time.c
@@ -74,6 +74,8 @@
 #endif
 #include <asm/smp.h>
 
+unsigned long disarm_decr[NR_CPUS];
+
 /* keep track of when we need to update the rtc */
 time_t last_rtc_update;
 #ifdef CONFIG_PPC_ISERIES
@@ -625,7 +627,9 @@
 #endif
 
 	old_regs = set_irq_regs(regs);
+#ifndef CONFIG_IPIPE
 	irq_enter();
+#endif
 
 	profile_tick(CPU_PROFILING);
 	calculate_steal_time();
@@ -651,7 +655,11 @@
 		 * is the case.
 		 */
 		if (!cpu_is_offline(cpu))
+#ifdef CONFIG_IPIPE
+			account_process_time(&__raw_get_cpu_var(__ipipe_tick_regs));
+#else
 			account_process_time(regs);
+#endif
 
 		/*
 		 * No need to check whether cpu is offline here; boot_cpuid
@@ -672,7 +680,8 @@
 	}
 	
 	next_dec = tb_ticks_per_jiffy - ticks;
-	set_dec(next_dec);
+	if ( !disarm_decr[cpu] )
+	    set_dec(next_dec);
 
 #ifdef CONFIG_PPC_ISERIES
 	if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending())
@@ -687,7 +696,9 @@
 	}
 #endif
 
+#ifndef CONFIG_IPIPE
 	irq_exit();
+#endif
 	set_irq_regs(old_regs);
 }
 
arch/powerpc/kernel/traps.c +47 -1

149 lines not on this page · raw message

arch/powerpc/mm/fault.c +3 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/mm/fault.c linux-2.6.21.7/arch/powerpc/mm/fault.c
@@ -160,6 +160,9 @@
 	int trap = TRAP(regs);
  	int is_exec = trap == 0x400;
 
+	if (ipipe_trap_notify(IPIPE_TRAP_ACCESS,regs))
+	    	return 0;
+
 #if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
 	/*
 	 * Fortunately the bit assignments in SRR1 for an instruction
arch/powerpc/platforms/iseries/irq.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/platforms/iseries/irq.c linux-2.6.21.7/arch/powerpc/platforms/iseries/irq.c
@@ -81,7 +81,7 @@
 	} data;
 };
 
-static DEFINE_SPINLOCK(pending_irqs_lock);
+static IPIPE_DEFINE_SPINLOCK(pending_irqs_lock);
 static int num_pending_irqs;
 static int pending_irqs[NR_IRQS];
 
arch/powerpc/platforms/powermac/pic.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/platforms/powermac/pic.c linux-2.6.21.7/arch/powerpc/platforms/powermac/pic.c
@@ -63,7 +63,7 @@
 static int max_real_irqs;
 static u32 level_mask[4];
 
-static DEFINE_SPINLOCK(pmac_pic_lock);
+static IPIPE_DEFINE_SPINLOCK(pmac_pic_lock);
 
 #define NR_MASK_WORDS	((NR_IRQS + 31) / 32)
 static unsigned long ppc_lost_interrupts[NR_MASK_WORDS];
arch/powerpc/platforms/ps3/interrupt.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/platforms/ps3/interrupt.c linux-2.6.21.7/arch/powerpc/platforms/ps3/interrupt.c
@@ -71,7 +71,7 @@
 		u64 unused_2[3];
 	};
 	u64 ipi_debug_brk_mask;
-	spinlock_t lock;
+	ipipe_spinlock_t lock;
 };
 
 /**
arch/powerpc/sysdev/i8259.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/sysdev/i8259.c linux-2.6.21.7/arch/powerpc/sysdev/i8259.c
@@ -23,7 +23,7 @@
 #define cached_A1 (cached_8259[0])
 #define cached_21 (cached_8259[1])
 
-static DEFINE_SPINLOCK(i8259_lock);
+static IPIPE_DEFINE_SPINLOCK(i8259_lock);
 
 static struct device_node *i8259_node;
 static struct irq_host *i8259_host;
arch/powerpc/sysdev/ipic.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/sysdev/ipic.c linux-2.6.21.7/arch/powerpc/sysdev/ipic.c
@@ -30,7 +30,7 @@
 #include "ipic.h"
 
 static struct ipic * primary_ipic;
-static DEFINE_SPINLOCK(ipic_lock);
+static IPIPE_DEFINE_SPINLOCK(ipic_lock);
 
 static struct ipic_info ipic_info[] = {
 	[9] = {
arch/powerpc/sysdev/mpic.c +18 -4
diff -Naur linux-2.6.21.7.orig/arch/powerpc/sysdev/mpic.c linux-2.6.21.7/arch/powerpc/sysdev/mpic.c
@@ -44,7 +44,7 @@
 
 static struct mpic *mpics;
 static struct mpic *mpic_primary;
-static DEFINE_SPINLOCK(mpic_lock);
+static IPIPE_DEFINE_SPINLOCK(mpic_lock);
 
 #ifdef CONFIG_PPC32	/* XXX for now */
 #ifdef CONFIG_IRQ_ALL_CPUS
@@ -564,19 +564,24 @@
 	unsigned int loops = 100000;
 	struct mpic *mpic = mpic_from_irq(irq);
 	unsigned int src = mpic_irq_to_hw(irq);
+	unsigned long flags;
 
 	DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, irq, src);
 
+	local_irq_save_hw_cond(flags);
+
 	mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI),
 		       mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) &
 		       ~MPIC_VECPRI_MASK);
 	/* make sure mask gets to controller before we return to user */
 	do {
 		if (!loops--) {
-			printk(KERN_ERR "mpic_enable_irq timeout\n");
+			printk(KERN_ERR "mpic_unmask_irq timeout (irq %u)\n", irq);
 			break;
 		}
 	} while(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK);
+
+	local_irq_restore_hw_cond(flags);
 }
 
 static void mpic_mask_irq(unsigned int irq)
@@ -584,20 +589,24 @@
 	unsigned int loops = 100000;
 	struct mpic *mpic = mpic_from_irq(irq);
 	unsigned int src = mpic_irq_to_hw(irq);
+	unsigned long flags;
 
 	DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src);
 
+	local_irq_save_hw_cond(flags);
+
 	mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI),
 		       mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) |
 		       MPIC_VECPRI_MASK);
-
 	/* make sure mask gets to controller before we return to user */
 	do {
 		if (!loops--) {
-			printk(KERN_ERR "mpic_enable_irq timeout\n");
+			printk(KERN_ERR "mpic_mask_irq timeout (irq=%u)\n", irq);
 			break;
 		}
 	} while(!(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK));
+
+	local_irq_restore_hw_cond(flags);
 }
 
 static void mpic_end_irq(unsigned int irq)
@@ -739,6 +748,7 @@
 	unsigned int src = mpic_irq_to_hw(virq);
 	struct irq_desc *desc = get_irq_desc(virq);
 	unsigned int vecpri, vold, vnew;
+	unsigned long flags;
 
 	DBG("mpic: set_irq_type(mpic:@%p,virq:%d,src:0x%x,type:0x%x)\n",
 	    mpic, virq, src, flow_type);
@@ -763,6 +773,8 @@
 	else
 		vecpri = mpic_type_to_vecpri(mpic, flow_type);
 
+	local_irq_save_hw_cond(flags);
+
 	vold = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI));
 	vnew = vold & ~(MPIC_INFO(VECPRI_POLARITY_MASK) |
 			MPIC_INFO(VECPRI_SENSE_MASK));
@@ -770,6 +782,8 @@
 	if (vold != vnew)
 		mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), vnew);
 
+	local_irq_restore_hw_cond(flags);
+
 	return 0;
 }
 
arch/powerpc/sysdev/tsi108_pci.c +10 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/sysdev/tsi108_pci.c linux-2.6.21.7/arch/powerpc/sysdev/tsi108_pci.c
@@ -249,7 +249,9 @@
 {
 	u_int irp_cfg;
 	int int_line = (irq - IRQ_PCI_INTAD_BASE);
+	unsigned long flags;
 
+	local_irq_save_hw_cond(flags);
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
 	mb();
 	irp_cfg |= (1 << int_line);	/* INTx_DIR = output */
@@ -257,19 +259,23 @@
 	tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL, irp_cfg);
 	mb();
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
+	local_irq_restore_hw_cond(flags);
 }
 
 static void tsi108_pci_int_unmask(u_int irq)
 {
 	u_int irp_cfg;
 	int int_line = (irq - IRQ_PCI_INTAD_BASE);
+	unsigned long flags;
 
+	local_irq_save_hw_cond(flags);
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
 	mb();
 	irp_cfg &= ~(1 << int_line);
 	irp_cfg |= (3 << (8 + (int_line * 2)));
 	tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL, irp_cfg);
 	mb();
+	local_irq_restore_hw_cond(flags);
 }
 
 static void init_pci_source(void)
@@ -360,6 +366,9 @@
 
 static void tsi108_pci_irq_end(u_int irq)
 {
+	unsigned long flags;
+
+	local_irq_save_hw_cond(flags);
 	tsi108_pci_int_unmask(irq);
 
 	/* Enable interrupts from PCI block */
@@ -367,6 +376,7 @@
 			 tsi108_read_reg(TSI108_PCI_OFFSET +
 					 TSI108_PCI_IRP_ENABLE) |
 			 TSI108_PCI_IRP_ENABLE_P_INT);
+	local_irq_restore_hw_cond(flags);
 	mb();
 }
 
drivers/pci/htirq.c +1 -1
diff -Naur linux-2.6.21.7.orig/drivers/pci/htirq.c linux-2.6.21.7/drivers/pci/htirq.c
@@ -21,7 +21,7 @@
  * With multiple simultaneous hypertransport irq devices it might pay
  * to make this more fine grained.  But start with simple, stupid, and correct.
  */
-static DEFINE_SPINLOCK(ht_irq_lock);
+static IPIPE_DEFINE_SPINLOCK(ht_irq_lock);
 
 struct ht_irq_cfg {
 	struct pci_dev *dev;
drivers/serial/mpc52xx_uart.c +34 -0
diff -Naur linux-2.6.21.7.orig/drivers/serial/mpc52xx_uart.c linux-2.6.21.7/drivers/serial/mpc52xx_uart.c
@@ -803,6 +803,40 @@
 #endif
 
 
+#ifdef CONFIG_IPIPE
+
+#include <stdarg.h>
+
+void __ipipe_serial_debug(const char *fmt, ...)
+{
+	struct console *co = MPC52xx_PSC_CONSOLE;
+	unsigned long flags, count;
+	struct uart_port *port;
+	char buf[128];
+	va_list ap;
+
+	if (co->index < 0)
+		return;		/* No console. */
+
+	port = &mpc52xx_uart_ports[co->index];
+
+	if (!port->mapbase)
+		return;		/* Too early. */
+
+	va_start(ap, fmt);
+	vsprintf(buf, fmt, ap);
+	va_end(ap);
+	count = strlen(buf);
+
+	local_irq_save_hw(flags);
+	mpc52xx_console_write(co, buf, count);
+	local_irq_restore_hw(flags);
+}
+
+EXPORT_SYMBOL(__ipipe_serial_debug);
+
+#endif
+
 /* ======================================================================== */
 /* UART Driver                                                              */
 /* ======================================================================== */
include/asm-powerpc/hw_irq.h +132 -11

182 lines not on this page · raw message

include/asm-powerpc/ipipe_base.h +102 -0

102 lines not on this page · raw message

include/asm-powerpc/ipipe.h +182 -0

182 lines not on this page · raw message

include/asm-ppc/mmu_context.h +11 -1
diff -Naur linux-2.6.21.7.orig/include/asm-ppc/mmu_context.h linux-2.6.21.7/include/asm-ppc/mmu_context.h
@@ -153,7 +153,10 @@
  */
 static inline void destroy_context(struct mm_struct *mm)
 {
+	unsigned long flags;
+
 	preempt_disable();
+	local_irq_save_hw_cond(flags);
 	if (mm->context.id != NO_CONTEXT) {
 		clear_bit(mm->context.id, context_map);
 		mm->context.id = NO_CONTEXT;
@@ -161,6 +164,7 @@
 		atomic_inc(&nr_free_contexts);
 #endif
 	}
+ 	local_irq_restore_hw_cond(flags);
 	preempt_enable();
 }
 
@@ -193,7 +197,13 @@
  * After we have set current->mm to a new value, this activates
  * the context for the new mm so we see the new mappings.
  */
-#define activate_mm(active_mm, mm)   switch_mm(active_mm, mm, current)
+#define activate_mm(active_mm, mm)   \
+do { \
+	unsigned long flags; \
+	local_irq_save_hw_cond(flags); \
+	switch_mm(active_mm, mm, current); \
+	local_irq_restore_hw_cond(flags);	   \
+} while(0)
 
 extern void mmu_context_init(void);
 
include/linux/hardirq.h +2 -2
diff -Naur linux-2.6.21.7.orig/include/linux/hardirq.h linux-2.6.21.7/include/linux/hardirq.h
@@ -133,7 +133,7 @@
  */
 extern void irq_exit(void);
 
-#define nmi_enter()		do { lockdep_off(); __irq_enter(); } while (0)
-#define nmi_exit()		do { __irq_exit(); lockdep_on(); } while (0)
+#define nmi_enter()		do { if (ipipe_root_domain_p) { lockdep_off(); __irq_enter(); } } while (0)
+#define nmi_exit()		do { if (ipipe_root_domain_p) { __irq_exit(); lockdep_on(); } } while (0)
 
 #endif /* LINUX_HARDIRQ_H */
include/linux/ipipe_base.h +83 -0

83 lines not on this page · raw message

include/linux/ipipe.h +556 -0

556 lines not on this page · raw message

include/linux/ipipe_percpu.h +61 -0

61 lines not on this page · raw message

include/linux/ipipe_trace.h +65 -0

65 lines not on this page · raw message

include/linux/irq.h +6 -0
diff -Naur linux-2.6.21.7.orig/include/linux/irq.h linux-2.6.21.7/include/linux/irq.h
@@ -151,6 +151,12 @@
  * Pad this out to 32 bytes for cache and indexing reasons.
  */
 struct irq_desc {
+#ifdef CONFIG_IPIPE
+	void			fastcall (*ipipe_ack)(unsigned int irq,
+						      struct irq_desc *desc);
+	void			fastcall (*ipipe_end)(unsigned int irq,
+						      struct irq_desc *desc);
+#endif /* CONFIG_IPIPE */
 	irq_flow_handler_t	handle_irq;
 	struct irq_chip		*chip;
 	struct msi_desc		*msi_desc;
include/linux/kernel.h +6 -2
diff -Naur linux-2.6.21.7.orig/include/linux/kernel.h linux-2.6.21.7/include/linux/kernel.h
@@ -14,6 +14,7 @@
 #include <linux/compiler.h>
 #include <linux/bitops.h>
 #include <linux/log2.h>
+#include <linux/ipipe_base.h>
 #include <asm/byteorder.h>
 #include <asm/bug.h>
 
@@ -72,9 +73,12 @@
  */
 #ifdef CONFIG_PREEMPT_VOLUNTARY
 extern int cond_resched(void);
-# define might_resched() cond_resched()
+# define might_resched() do { \
+		ipipe_check_context(ipipe_root_domain); \
+		cond_resched(); \
+	} while (0)
 #else
-# define might_resched() do { } while (0)
+# define might_resched() ipipe_check_context(ipipe_root_domain)
 #endif
 
 #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
include/linux/linkage.h +4 -0
diff -Naur linux-2.6.21.7.orig/include/linux/linkage.h linux-2.6.21.7/include/linux/linkage.h
@@ -64,4 +64,8 @@
 #define fastcall
 #endif
 
+#ifndef notrace
+#define notrace		__attribute__((no_instrument_function))
+#endif
+
 #endif
include/linux/mm.h +1 -0
diff -Naur linux-2.6.21.7.orig/include/linux/mm.h linux-2.6.21.7/include/linux/mm.h
@@ -169,6 +169,7 @@
 #define VM_MAPPED_COPY	0x01000000	/* T if mapped copy of data (nommu mmap) */
 #define VM_INSERTPAGE	0x02000000	/* The vma has had "vm_insert_page()" done on it */
 #define VM_ALWAYSDUMP	0x04000000	/* Always include in core dumps */
+#define VM_PINNED	0x08000000	/* Disable faults for the vma */
 
 #ifndef VM_STACK_DEFAULT_FLAGS		/* arch can override this */
 #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
include/linux/preempt.h +8 -4
diff -Naur linux-2.6.21.7.orig/include/linux/preempt.h linux-2.6.21.7/include/linux/preempt.h
@@ -8,6 +8,7 @@
 
 #include <linux/thread_info.h>
 #include <linux/linkage.h>
+#include <linux/ipipe_base.h>
 
 #ifdef CONFIG_DEBUG_PREEMPT
   extern void fastcall add_preempt_count(int val);
@@ -28,18 +29,21 @@
 
 #define preempt_disable() \
 do { \
+	ipipe_check_context(ipipe_root_domain); \
 	inc_preempt_count(); \
 	barrier(); \
 } while (0)
 
 #define preempt_enable_no_resched() \
 do { \
+	ipipe_check_context(ipipe_root_domain); \
 	barrier(); \
 	dec_preempt_count(); \
 } while (0)
 
 #define preempt_check_resched() \
 do { \
+	ipipe_check_context(ipipe_root_domain); \
 	if (unlikely(test_thread_flag(TIF_NEED_RESCHED))) \
 		preempt_schedule(); \
 } while (0)
@@ -53,10 +57,10 @@
 
 #else
 
-#define preempt_disable()		do { } while (0)
-#define preempt_enable_no_resched()	do { } while (0)
-#define preempt_enable()		do { } while (0)
-#define preempt_check_resched()		do { } while (0)
+#define preempt_disable()		ipipe_check_context(ipipe_root_domain)
+#define preempt_enable_no_resched()	ipipe_check_context(ipipe_root_domain)
+#define preempt_enable()		ipipe_check_context(ipipe_root_domain)
+#define preempt_check_resched()		ipipe_check_context(ipipe_root_domain)
 
 #endif
 
include/linux/sched.h +16 -0
diff -Naur linux-2.6.21.7.orig/include/linux/sched.h linux-2.6.21.7/include/linux/sched.h
@@ -54,6 +54,7 @@
 #include <linux/cpumask.h>
 #include <linux/errno.h>
 #include <linux/nodemask.h>
+#include <linux/ipipe.h>
 
 #include <asm/system.h>
 #include <asm/semaphore.h>
@@ -151,6 +152,13 @@
 /* in tsk->state again */
 #define TASK_NONINTERACTIVE	64
 #define TASK_DEAD		128
+#ifdef CONFIG_IPIPE
+#define TASK_ATOMICSWITCH	512
+#define TASK_NOWAKEUP          1024
+#else  /* !CONFIG_IPIPE */
+#define TASK_ATOMICSWITCH	0
+#define TASK_NOWAKEUP          0
+#endif /* CONFIG_IPIPE */
 
 #define __set_task_state(tsk, state_value)		\
 	do { (tsk)->state = (state_value); } while (0)
@@ -1041,6 +1049,9 @@
 
 	atomic_t fs_excl;	/* holding fs exclusive resources */
 	struct rcu_head rcu;
+#ifdef CONFIG_IPIPE
+	void *ptd[IPIPE_ROOT_NPTDKEYS];
+#endif
 
 	/*
 	 * cache last used pipe for splice
@@ -1159,6 +1170,11 @@
 #define PF_SPREAD_SLAB	0x02000000	/* Spread some slab caches over cpuset */
 #define PF_MEMPOLICY	0x10000000	/* Non-default NUMA mempolicy */
 #define PF_MUTEX_TESTER	0x20000000	/* Thread belongs to the rt mutex tester */
+#ifdef CONFIG_IPIPE
+#define PF_EVNOTIFY    0x40000000	/* Notify other domains about internal events */
+#else
+#define PF_EVNOTIFY    0
+#endif /* CONFIG_IPIPE */
 
 /*
  * Only the _current_ task can read/write to tsk->flags, but other
include/linux/smp.h +2 -0
diff -Naur linux-2.6.21.7.orig/include/linux/smp.h linux-2.6.21.7/include/linux/smp.h
@@ -109,6 +109,8 @@
 
 #endif /* !SMP */
 
+#include <linux/ipipe_base.h>
+
 /*
  * smp_processor_id(): get the current CPU ID.
  *
include/linux/spinlock.h +117 -10

127 lines not on this page · raw message

include/linux/spinlock_types.h +14 -0
diff -Naur linux-2.6.21.7.orig/include/linux/spinlock_types.h linux-2.6.21.7/include/linux/spinlock_types.h

Lines of this file are not shown. View the raw message.

init/Kconfig +1 -0
diff -Naur linux-2.6.21.7.orig/init/Kconfig linux-2.6.21.7/init/Kconfig

Lines of this file are not shown. View the raw message.

init/main.c +8 -2
diff -Naur linux-2.6.21.7.orig/init/main.c linux-2.6.21.7/init/main.c

Lines of this file are not shown. View the raw message.

kernel/exit.c +1 -0
diff -Naur linux-2.6.21.7.orig/kernel/exit.c linux-2.6.21.7/kernel/exit.c

Lines of this file are not shown. View the raw message.

kernel/fork.c +10 -1
diff -Naur linux-2.6.21.7.orig/kernel/fork.c linux-2.6.21.7/kernel/fork.c

Lines of this file are not shown. View the raw message.

kernel/ipipe/core.c +1484 -0

1,484 lines not on this page · raw message

kernel/ipipe/Kconfig +13 -0
diff -Naur linux-2.6.21.7.orig/kernel/ipipe/Kconfig linux-2.6.21.7/kernel/ipipe/Kconfig

Lines of this file are not shown. View the raw message.

kernel/ipipe/Kconfig.debug +88 -0

88 lines not on this page · raw message

kernel/ipipe/Makefile +3 -0
diff -Naur linux-2.6.21.7.orig/kernel/ipipe/Makefile linux-2.6.21.7/kernel/ipipe/Makefile

Lines of this file are not shown. View the raw message.

kernel/ipipe/tracer.c +1294 -0

1,294 lines not on this page · raw message

kernel/irq/chip.c +129 -0

129 lines not on this page · raw message

kernel/Makefile +1 -0
diff -Naur linux-2.6.21.7.orig/kernel/Makefile linux-2.6.21.7/kernel/Makefile

Lines of this file are not shown. View the raw message.

kernel/printk.c +78 -0

78 lines not on this page · raw message

kernel/sched.c +64 -3

67 lines not on this page · raw message

kernel/signal.c +1 -0
diff -Naur linux-2.6.21.7.orig/kernel/signal.c linux-2.6.21.7/kernel/signal.c

Lines of this file are not shown. View the raw message.

kernel/spinlock.c +2 -2
diff -Naur linux-2.6.21.7.orig/kernel/spinlock.c linux-2.6.21.7/kernel/spinlock.c

Lines of this file are not shown. View the raw message.

kernel/sys.c +4 -2
diff -Naur linux-2.6.21.7.orig/kernel/sys.c linux-2.6.21.7/kernel/sys.c

Lines of this file are not shown. View the raw message.

lib/bust_spinlocks.c +4 -1
diff -Naur linux-2.6.21.7.orig/lib/bust_spinlocks.c linux-2.6.21.7/lib/bust_spinlocks.c

Lines of this file are not shown. View the raw message.

lib/ioremap.c +2 -2
diff -Naur linux-2.6.21.7.orig/lib/ioremap.c linux-2.6.21.7/lib/ioremap.c

Lines of this file are not shown. View the raw message.

lib/Kconfig.debug +2 -0
diff -Naur linux-2.6.21.7.orig/lib/Kconfig.debug linux-2.6.21.7/lib/Kconfig.debug

Lines of this file are not shown. View the raw message.

lib/smp_processor_id.c +3 -0
diff -Naur linux-2.6.21.7.orig/lib/smp_processor_id.c linux-2.6.21.7/lib/smp_processor_id.c

Lines of this file are not shown. View the raw message.

lib/spinlock_debug.c +18 -0
diff -Naur linux-2.6.21.7.orig/lib/spinlock_debug.c linux-2.6.21.7/lib/spinlock_debug.c

Lines of this file are not shown. View the raw message.

Makefile +4 -0
diff -Naur linux-2.6.21.7.orig/Makefile linux-2.6.21.7/Makefile

Lines of this file are not shown. View the raw message.

mm/memory.c +190 -33

223 lines not on this page · raw message

mm/mlock.c +2 -2
diff -Naur linux-2.6.21.7.orig/mm/mlock.c linux-2.6.21.7/mm/mlock.c

Lines of this file are not shown. View the raw message.

mm/vmalloc.c +1 -0
diff -Naur linux-2.6.21.7.orig/mm/vmalloc.c linux-2.6.21.7/mm/vmalloc.c

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#6 lore raw
Quoted 4 lines · Benjamin ZORES

Hi,

Attached is latest Adeos PowerPC 1.7-00 version for 2.6.21.

Merged, thanks.

Signature · 1 line
Philippe.
#7 lore raw
Quoted 11 lines · Philippe Gerum
Quoted 5 lines · Benjamin ZORES

Hi,

Attached is latest Adeos PowerPC 1.7-00 version for 2.6.21.

Merged, thanks.

Attached latest Adeos PowerPC 1.7-03 version for 2.6.21. Works flawlessy with 2.4-rc3 so far.
Please merge.

Ben

arch/powerpc/boot/Makefile +8 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/boot/Makefile linux-2.6.21.7/arch/powerpc/boot/Makefile
@@ -27,6 +27,14 @@
 		   $(shell $(CROSS32CC) -print-file-name=include) -fPIC
 BOOTAFLAGS	:= -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
 
+ifdef CONFIG_IPIPE_TRACE
+# do not trace the boot loader
+nullstring :=
+space      := $(nullstring) # end of the line
+pg_flag     = $(nullstring) -pg # end of the line
+BOOTCFLAGS     := $(subst ${pg_flag},${space},${BOOTCFLAGS})
+endif
+
 ifeq ($(call cc-option-yn, -fstack-protector),y)
 BOOTCFLAGS	+= -fno-stack-protector
 endif
arch/powerpc/Kconfig +2 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/Kconfig linux-2.6.21.7/arch/powerpc/Kconfig
@@ -758,6 +758,8 @@
 
 menu "Kernel options"
 
+source "kernel/ipipe/Kconfig"
+
 config HIGHMEM
 	bool "High memory support"
 	depends on PPC32
arch/powerpc/kernel/cputable.c +2 -2
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/cputable.c linux-2.6.21.7/arch/powerpc/kernel/cputable.c
@@ -1255,7 +1255,7 @@
 #endif /* CONFIG_PPC32 */
 };
 
-struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
+notrace struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
 {
 	struct cpu_spec *s = cpu_specs;
 	struct cpu_spec **cur = &cur_cpu_spec;
@@ -1284,7 +1284,7 @@
 	return NULL;
 }
 
-void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
+notrace void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
 {
 	struct fixup_entry {
 		unsigned long	mask;
arch/powerpc/kernel/entry_32.S +91 -0

139 lines not on this page · raw message

arch/powerpc/kernel/head_32.S +14 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_32.S linux-2.6.21.7/arch/powerpc/kernel/head_32.S
@@ -329,6 +329,12 @@
 	EXC_XFER_TEMPLATE(n, hdlr, n, NOCOPY, transfer_to_handler_full,	\
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -413,7 +419,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* External interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* Alignment exception */
 	. = 0x600
@@ -445,7 +455,11 @@
 	EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception)
 
 /* Decrementer */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x900, Decrementer, __ipipe_grab_timer, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE)
 	EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE)
arch/powerpc/kernel/head_44x.S +5 -2
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_44x.S linux-2.6.21.7/arch/powerpc/kernel/head_44x.S
@@ -424,8 +424,11 @@
 	/* Instruction Storage Interrupt */
 	INSTRUCTION_STORAGE_EXCEPTION
 
-	/* External Input Interrupt */
-	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, ExternalInput, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
+ 	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	/* Alignment Interrupt */
 	ALIGNMENT_EXCEPTION
arch/powerpc/kernel/head_4xx.S +14 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_4xx.S linux-2.6.21.7/arch/powerpc/kernel/head_4xx.S
@@ -228,6 +228,12 @@
 	EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -396,7 +402,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* 0x0500 - External Interrupt Exception */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x0500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* 0x0600 - Alignment Exception */
 	START_EXCEPTION(0x0600, Alignment)
@@ -434,7 +444,11 @@
 	lis	r0,TSR_PIS@h
 	mtspr	SPRN_TSR,r0		/* Clear the PIT exception */
 	addi	r3,r1,STACK_FRAME_OVERHEAD
+#ifdef CONFIG_IPIPE
+	EXC_XFER_IPIPE(0x1000, __ipipe_grab_timer)
+#else /* !CONFIG_IPIPE */
 	EXC_XFER_LITE(0x1000, timer_interrupt)
+#endif /* CONFIG_IPIPE */
 
 #if 0
 /* NOTE:
arch/powerpc/kernel/head_8xx.S +14 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_8xx.S linux-2.6.21.7/arch/powerpc/kernel/head_8xx.S
@@ -187,6 +187,12 @@
 	EXC_XFER_TEMPLATE(n, hdlr, n, NOCOPY, transfer_to_handler_full,	\
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+ 
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -238,7 +244,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* External interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* Alignment exception */
 	. = 0x600
@@ -259,7 +269,11 @@
 	EXCEPTION(0x800, FPUnavailable, unknown_exception, EXC_XFER_STD)
 
 /* Decrementer */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x900, Decrementer, __ipipe_grab_timer, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE)
 	EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE)
arch/powerpc/kernel/head_booke.h +16 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_booke.h linux-2.6.21.7/arch/powerpc/kernel/head_booke.h
@@ -187,6 +187,12 @@
 	EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -345,6 +351,15 @@
 	addi	r3,r1,STACK_FRAME_OVERHEAD;				      \
 	EXC_XFER_STD(0x0700, program_check_exception)
 
+#ifdef CONFIG_IPIPE
+#define DECREMENTER_EXCEPTION						      \
+	START_EXCEPTION(Decrementer)					      \
+	NORMAL_EXCEPTION_PROLOG;					      \
+	lis     r0,TSR_DIS@h;           /* Setup the DEC interrupt mask */    \
+	mtspr   SPRN_TSR,r0;		/* Clear the DEC interrupt */	      \
+	addi    r3,r1,STACK_FRAME_OVERHEAD;				      \
+	EXC_XFER_IPIPE(0x0900, __ipipe_grab_timer)
+#else /* !CONFIG_IPIPE */
 #define DECREMENTER_EXCEPTION						      \
 	START_EXCEPTION(Decrementer)					      \
 	NORMAL_EXCEPTION_PROLOG;					      \
@@ -352,6 +367,7 @@
 	mtspr   SPRN_TSR,r0;		/* Clear the DEC interrupt */	      \
 	addi    r3,r1,STACK_FRAME_OVERHEAD;				      \
 	EXC_XFER_LITE(0x0900, timer_interrupt)
+#endif /* CONFIG_IPIPE */
 
 #define FP_UNAVAILABLE_EXCEPTION					      \
 	START_EXCEPTION(FloatingPointUnavailable)			      \
arch/powerpc/kernel/head_fsl_booke.S +4 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_fsl_booke.S linux-2.6.21.7/arch/powerpc/kernel/head_fsl_booke.S
@@ -529,7 +529,11 @@
 	INSTRUCTION_STORAGE_EXCEPTION
 
 	/* External Input Interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, ExternalInput, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	/* Alignment Interrupt */
 	ALIGNMENT_EXCEPTION
arch/powerpc/kernel/idle.c +3 -2
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/idle.c linux-2.6.21.7/arch/powerpc/kernel/idle.c
@@ -58,6 +58,7 @@
 	while (1) {
 		while (!need_resched() && !cpu_should_die()) {
 			ppc64_runlatch_off();
+			ipipe_suspend_domain();
 
 			if (ppc_md.power_save) {
 				clear_thread_flag(TIF_POLLING_NRFLAG);
@@ -66,13 +67,13 @@
 				 * is ordered w.r.t. need_resched() test.
 				 */
 				smp_mb();
-				local_irq_disable();
+				local_irq_disable_hw();
 
 				/* check again after disabling irqs */
 				if (!need_resched() && !cpu_should_die())
 					ppc_md.power_save();
 
-				local_irq_enable();
+				local_irq_enable_hw();
 				set_thread_flag(TIF_POLLING_NRFLAG);
 
 			} else {
arch/powerpc/kernel/io.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/io.c linux-2.6.21.7/arch/powerpc/kernel/io.c
@@ -120,7 +120,7 @@
 
 #define IO_CHECK_ALIGN(v,a) ((((unsigned long)(v)) & ((a) - 1)) == 0)
 
-void _memset_io(volatile void __iomem *addr, int c, unsigned long n)
+notrace void _memset_io(volatile void __iomem *addr, int c, unsigned long n)
 {
 	void *p = (void __force *)addr;
 	u32 lc = c;
arch/powerpc/kernel/ipipe.c +728 -0

728 lines not on this page · raw message

arch/powerpc/kernel/irq.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/irq.c linux-2.6.21.7/arch/powerpc/kernel/irq.c
@@ -70,7 +70,7 @@
 #endif
 
 int __irq_offset_value;
-static int ppc_spurious_interrupts;
+int ppc_spurious_interrupts;
 
 #ifdef CONFIG_PPC32
 EXPORT_SYMBOL(__irq_offset_value);
arch/powerpc/kernel/Makefile +2 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/Makefile linux-2.6.21.7/arch/powerpc/kernel/Makefile
@@ -57,6 +57,8 @@
 obj-$(CONFIG_MODULES)		+= ppc_ksyms.o
 obj-$(CONFIG_BOOTX_TEXT)	+= btext.o
 obj-$(CONFIG_SMP)		+= smp.o
+obj-$(CONFIG_IPIPE)		+= ipipe.o
+obj-$(CONFIG_IPIPE_TRACE_MCOUNT)	+= mcount.o
 obj-$(CONFIG_KPROBES)		+= kprobes.o
 obj-$(CONFIG_PPC_UDBG_16550)	+= legacy_serial.o udbg_16550.o
 
arch/powerpc/kernel/mcount.S +75 -0

75 lines not on this page · raw message

arch/powerpc/kernel/process.c +2 -2
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/process.c linux-2.6.21.7/arch/powerpc/kernel/process.c
@@ -326,7 +326,7 @@
 	}
 #endif
 
-	local_irq_save(flags);
+	local_irq_save_hw(flags);
 
 	account_system_vtime(current);
 	account_process_vtime(current);
@@ -334,7 +334,7 @@
 
 	last = _switch(old_thread, new_thread);
 
-	local_irq_restore(flags);
+	local_irq_restore_hw(flags);
 
 	return last;
 }
arch/powerpc/kernel/setup_32.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/setup_32.c linux-2.6.21.7/arch/powerpc/kernel/setup_32.c
@@ -85,7 +85,7 @@
  * from the address that it was linked at, so we must use RELOC/PTRRELOC
  * to access static data (including strings).  -- paulus
  */
-unsigned long __init early_init(unsigned long dt_ptr)
+unsigned long notrace __init early_init(unsigned long dt_ptr)
 {
 	unsigned long offset = reloc_offset();
 	struct cpu_spec *spec;
arch/powerpc/kernel/time.c +12 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/time.c linux-2.6.21.7/arch/powerpc/kernel/time.c
@@ -74,6 +74,8 @@
 #endif
 #include <asm/smp.h>
 
+unsigned long disarm_decr[NR_CPUS];
+
 /* keep track of when we need to update the rtc */
 time_t last_rtc_update;
 #ifdef CONFIG_PPC_ISERIES
@@ -625,7 +627,9 @@
 #endif
 
 	old_regs = set_irq_regs(regs);
+#ifndef CONFIG_IPIPE
 	irq_enter();
+#endif
 
 	profile_tick(CPU_PROFILING);
 	calculate_steal_time();
@@ -651,7 +655,11 @@
 		 * is the case.
 		 */
 		if (!cpu_is_offline(cpu))
+#ifdef CONFIG_IPIPE
+			account_process_time(&__raw_get_cpu_var(__ipipe_tick_regs));
+#else
 			account_process_time(regs);
+#endif
 
 		/*
 		 * No need to check whether cpu is offline here; boot_cpuid
@@ -672,7 +680,8 @@
 	}
 	
 	next_dec = tb_ticks_per_jiffy - ticks;
-	set_dec(next_dec);
+	if ( !disarm_decr[cpu] )
+	    set_dec(next_dec);
 
 #ifdef CONFIG_PPC_ISERIES
 	if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending())
@@ -687,7 +696,9 @@
 	}
 #endif
 
+#ifndef CONFIG_IPIPE
 	irq_exit();
+#endif
 	set_irq_regs(old_regs);
 }
 
arch/powerpc/kernel/traps.c +47 -1

149 lines not on this page · raw message

arch/powerpc/mm/fault.c +3 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/mm/fault.c linux-2.6.21.7/arch/powerpc/mm/fault.c
@@ -160,6 +160,9 @@
 	int trap = TRAP(regs);
  	int is_exec = trap == 0x400;
 
+	if (ipipe_trap_notify(IPIPE_TRAP_ACCESS,regs))
+	    	return 0;
+
 #if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
 	/*
 	 * Fortunately the bit assignments in SRR1 for an instruction
arch/powerpc/platforms/iseries/irq.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/platforms/iseries/irq.c linux-2.6.21.7/arch/powerpc/platforms/iseries/irq.c
@@ -81,7 +81,7 @@
 	} data;
 };
 
-static DEFINE_SPINLOCK(pending_irqs_lock);
+static IPIPE_DEFINE_SPINLOCK(pending_irqs_lock);
 static int num_pending_irqs;
 static int pending_irqs[NR_IRQS];
 
arch/powerpc/platforms/powermac/pic.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/platforms/powermac/pic.c linux-2.6.21.7/arch/powerpc/platforms/powermac/pic.c
@@ -63,7 +63,7 @@
 static int max_real_irqs;
 static u32 level_mask[4];
 
-static DEFINE_SPINLOCK(pmac_pic_lock);
+static IPIPE_DEFINE_SPINLOCK(pmac_pic_lock);
 
 #define NR_MASK_WORDS	((NR_IRQS + 31) / 32)
 static unsigned long ppc_lost_interrupts[NR_MASK_WORDS];
arch/powerpc/platforms/ps3/interrupt.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/platforms/ps3/interrupt.c linux-2.6.21.7/arch/powerpc/platforms/ps3/interrupt.c
@@ -71,7 +71,7 @@
 		u64 unused_2[3];
 	};
 	u64 ipi_debug_brk_mask;
-	spinlock_t lock;
+	ipipe_spinlock_t lock;
 };
 
 /**
arch/powerpc/sysdev/i8259.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/sysdev/i8259.c linux-2.6.21.7/arch/powerpc/sysdev/i8259.c
@@ -23,7 +23,7 @@
 #define cached_A1 (cached_8259[0])
 #define cached_21 (cached_8259[1])
 
-static DEFINE_SPINLOCK(i8259_lock);
+static IPIPE_DEFINE_SPINLOCK(i8259_lock);
 
 static struct device_node *i8259_node;
 static struct irq_host *i8259_host;
arch/powerpc/sysdev/ipic.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/sysdev/ipic.c linux-2.6.21.7/arch/powerpc/sysdev/ipic.c
@@ -30,7 +30,7 @@
 #include "ipic.h"
 
 static struct ipic * primary_ipic;
-static DEFINE_SPINLOCK(ipic_lock);
+static IPIPE_DEFINE_SPINLOCK(ipic_lock);
 
 static struct ipic_info ipic_info[] = {
 	[9] = {
arch/powerpc/sysdev/mpic.c +18 -4
diff -Naur linux-2.6.21.7.orig/arch/powerpc/sysdev/mpic.c linux-2.6.21.7/arch/powerpc/sysdev/mpic.c
@@ -44,7 +44,7 @@
 
 static struct mpic *mpics;
 static struct mpic *mpic_primary;
-static DEFINE_SPINLOCK(mpic_lock);
+static IPIPE_DEFINE_SPINLOCK(mpic_lock);
 
 #ifdef CONFIG_PPC32	/* XXX for now */
 #ifdef CONFIG_IRQ_ALL_CPUS
@@ -564,19 +564,24 @@
 	unsigned int loops = 100000;
 	struct mpic *mpic = mpic_from_irq(irq);
 	unsigned int src = mpic_irq_to_hw(irq);
+	unsigned long flags;
 
 	DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, irq, src);
 
+	local_irq_save_hw_cond(flags);
+
 	mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI),
 		       mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) &
 		       ~MPIC_VECPRI_MASK);
 	/* make sure mask gets to controller before we return to user */
 	do {
 		if (!loops--) {
-			printk(KERN_ERR "mpic_enable_irq timeout\n");
+			printk(KERN_ERR "mpic_unmask_irq timeout (irq %u)\n", irq);
 			break;
 		}
 	} while(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK);
+
+	local_irq_restore_hw_cond(flags);
 }
 
 static void mpic_mask_irq(unsigned int irq)
@@ -584,20 +589,24 @@
 	unsigned int loops = 100000;
 	struct mpic *mpic = mpic_from_irq(irq);
 	unsigned int src = mpic_irq_to_hw(irq);
+	unsigned long flags;
 
 	DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src);
 
+	local_irq_save_hw_cond(flags);
+
 	mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI),
 		       mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) |
 		       MPIC_VECPRI_MASK);
-
 	/* make sure mask gets to controller before we return to user */
 	do {
 		if (!loops--) {
-			printk(KERN_ERR "mpic_enable_irq timeout\n");
+			printk(KERN_ERR "mpic_mask_irq timeout (irq=%u)\n", irq);
 			break;
 		}
 	} while(!(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK));
+
+	local_irq_restore_hw_cond(flags);
 }
 
 static void mpic_end_irq(unsigned int irq)
@@ -739,6 +748,7 @@
 	unsigned int src = mpic_irq_to_hw(virq);
 	struct irq_desc *desc = get_irq_desc(virq);
 	unsigned int vecpri, vold, vnew;
+	unsigned long flags;
 
 	DBG("mpic: set_irq_type(mpic:@%p,virq:%d,src:0x%x,type:0x%x)\n",
 	    mpic, virq, src, flow_type);
@@ -763,6 +773,8 @@
 	else
 		vecpri = mpic_type_to_vecpri(mpic, flow_type);
 
+	local_irq_save_hw_cond(flags);
+
 	vold = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI));
 	vnew = vold & ~(MPIC_INFO(VECPRI_POLARITY_MASK) |
 			MPIC_INFO(VECPRI_SENSE_MASK));
@@ -770,6 +782,8 @@
 	if (vold != vnew)
 		mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), vnew);
 
+	local_irq_restore_hw_cond(flags);
+
 	return 0;
 }
 
arch/powerpc/sysdev/tsi108_pci.c +10 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/sysdev/tsi108_pci.c linux-2.6.21.7/arch/powerpc/sysdev/tsi108_pci.c
@@ -249,7 +249,9 @@
 {
 	u_int irp_cfg;
 	int int_line = (irq - IRQ_PCI_INTAD_BASE);
+	unsigned long flags;
 
+	local_irq_save_hw_cond(flags);
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
 	mb();
 	irp_cfg |= (1 << int_line);	/* INTx_DIR = output */
@@ -257,19 +259,23 @@
 	tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL, irp_cfg);
 	mb();
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
+	local_irq_restore_hw_cond(flags);
 }
 
 static void tsi108_pci_int_unmask(u_int irq)
 {
 	u_int irp_cfg;
 	int int_line = (irq - IRQ_PCI_INTAD_BASE);
+	unsigned long flags;
 
+	local_irq_save_hw_cond(flags);
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
 	mb();
 	irp_cfg &= ~(1 << int_line);
 	irp_cfg |= (3 << (8 + (int_line * 2)));
 	tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL, irp_cfg);
 	mb();
+	local_irq_restore_hw_cond(flags);
 }
 
 static void init_pci_source(void)
@@ -360,6 +366,9 @@
 
 static void tsi108_pci_irq_end(u_int irq)
 {
+	unsigned long flags;
+
+	local_irq_save_hw_cond(flags);
 	tsi108_pci_int_unmask(irq);
 
 	/* Enable interrupts from PCI block */
@@ -367,6 +376,7 @@
 			 tsi108_read_reg(TSI108_PCI_OFFSET +
 					 TSI108_PCI_IRP_ENABLE) |
 			 TSI108_PCI_IRP_ENABLE_P_INT);
+	local_irq_restore_hw_cond(flags);
 	mb();
 }
 
drivers/pci/htirq.c +1 -1
diff -Naur linux-2.6.21.7.orig/drivers/pci/htirq.c linux-2.6.21.7/drivers/pci/htirq.c
@@ -21,7 +21,7 @@
  * With multiple simultaneous hypertransport irq devices it might pay
  * to make this more fine grained.  But start with simple, stupid, and correct.
  */
-static DEFINE_SPINLOCK(ht_irq_lock);
+static IPIPE_DEFINE_SPINLOCK(ht_irq_lock);
 
 struct ht_irq_cfg {
 	struct pci_dev *dev;
drivers/serial/mpc52xx_uart.c +34 -0
diff -Naur linux-2.6.21.7.orig/drivers/serial/mpc52xx_uart.c linux-2.6.21.7/drivers/serial/mpc52xx_uart.c
@@ -803,6 +803,40 @@
 #endif
 
 
+#ifdef CONFIG_IPIPE
+
+#include <stdarg.h>
+
+void __ipipe_serial_debug(const char *fmt, ...)
+{
+	struct console *co = MPC52xx_PSC_CONSOLE;
+	unsigned long flags, count;
+	struct uart_port *port;
+	char buf[128];
+	va_list ap;
+
+	if (co->index < 0)
+		return;		/* No console. */
+
+	port = &mpc52xx_uart_ports[co->index];
+
+	if (!port->mapbase)
+		return;		/* Too early. */
+
+	va_start(ap, fmt);
+	vsprintf(buf, fmt, ap);
+	va_end(ap);
+	count = strlen(buf);
+
+	local_irq_save_hw(flags);
+	mpc52xx_console_write(co, buf, count);
+	local_irq_restore_hw(flags);
+}
+
+EXPORT_SYMBOL(__ipipe_serial_debug);
+
+#endif
+
 /* ======================================================================== */
 /* UART Driver                                                              */
 /* ======================================================================== */
include/asm-powerpc/hw_irq.h +132 -11

182 lines not on this page · raw message

include/asm-powerpc/ipipe_base.h +140 -0

140 lines not on this page · raw message

include/asm-powerpc/ipipe.h +182 -0

182 lines not on this page · raw message

include/asm-ppc/mmu_context.h +11 -1
diff -Naur linux-2.6.21.7.orig/include/asm-ppc/mmu_context.h linux-2.6.21.7/include/asm-ppc/mmu_context.h
@@ -153,7 +153,10 @@
  */
 static inline void destroy_context(struct mm_struct *mm)
 {
+	unsigned long flags;
+
 	preempt_disable();
+	local_irq_save_hw_cond(flags);
 	if (mm->context.id != NO_CONTEXT) {
 		clear_bit(mm->context.id, context_map);
 		mm->context.id = NO_CONTEXT;
@@ -161,6 +164,7 @@
 		atomic_inc(&nr_free_contexts);
 #endif
 	}
+ 	local_irq_restore_hw_cond(flags);
 	preempt_enable();
 }
 
@@ -193,7 +197,13 @@
  * After we have set current->mm to a new value, this activates
  * the context for the new mm so we see the new mappings.
  */
-#define activate_mm(active_mm, mm)   switch_mm(active_mm, mm, current)
+#define activate_mm(active_mm, mm)   \
+do { \
+	unsigned long flags; \
+	local_irq_save_hw_cond(flags); \
+	switch_mm(active_mm, mm, current); \
+	local_irq_restore_hw_cond(flags);	   \
+} while(0)
 
 extern void mmu_context_init(void);
 
include/linux/hardirq.h +2 -2
diff -Naur linux-2.6.21.7.orig/include/linux/hardirq.h linux-2.6.21.7/include/linux/hardirq.h
@@ -133,7 +133,7 @@
  */
 extern void irq_exit(void);
 
-#define nmi_enter()		do { lockdep_off(); __irq_enter(); } while (0)
-#define nmi_exit()		do { __irq_exit(); lockdep_on(); } while (0)
+#define nmi_enter()		do { if (ipipe_root_domain_p) { lockdep_off(); __irq_enter(); } } while (0)
+#define nmi_exit()		do { if (ipipe_root_domain_p) { __irq_exit(); lockdep_on(); } ] while (0)
 
 #endif /* LINUX_HARDIRQ_H */
include/linux/ipipe_base.h +77 -0

77 lines not on this page · raw message

include/linux/ipipe_compat.h +54 -0

54 lines not on this page · raw message

include/linux/ipipe.h +557 -0

557 lines not on this page · raw message

include/linux/ipipe_percpu.h +69 -0

69 lines not on this page · raw message

include/linux/ipipe_trace.h +65 -0

65 lines not on this page · raw message

include/linux/irq.h +6 -0
diff -Naur linux-2.6.21.7.orig/include/linux/irq.h linux-2.6.21.7/include/linux/irq.h
@@ -151,6 +151,12 @@
  * Pad this out to 32 bytes for cache and indexing reasons.
  */
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

include/linux/kernel.h +6 -2
diff -Naur linux-2.6.21.7.orig/include/linux/kernel.h linux-2.6.21.7/include/linux/kernel.h

Lines of this file are not shown. View the raw message.

include/linux/linkage.h +4 -0
diff -Naur linux-2.6.21.7.orig/include/linux/linkage.h linux-2.6.21.7/include/linux/linkage.h

Lines of this file are not shown. View the raw message.

include/linux/mm.h +1 -0
diff -Naur linux-2.6.21.7.orig/include/linux/mm.h linux-2.6.21.7/include/linux/mm.h

Lines of this file are not shown. View the raw message.

include/linux/preempt.h +8 -4
diff -Naur linux-2.6.21.7.orig/include/linux/preempt.h linux-2.6.21.7/include/linux/preempt.h

Lines of this file are not shown. View the raw message.

include/linux/sched.h +16 -0
diff -Naur linux-2.6.21.7.orig/include/linux/sched.h linux-2.6.21.7/include/linux/sched.h

Lines of this file are not shown. View the raw message.

include/linux/smp.h +2 -0
diff -Naur linux-2.6.21.7.orig/include/linux/smp.h linux-2.6.21.7/include/linux/smp.h

Lines of this file are not shown. View the raw message.

include/linux/spinlock.h +117 -9

126 lines not on this page · raw message

include/linux/spinlock_types.h +14 -0
diff -Naur linux-2.6.21.7.orig/include/linux/spinlock_types.h linux-2.6.21.7/include/linux/spinlock_types.h

Lines of this file are not shown. View the raw message.

init/Kconfig +1 -0
diff -Naur linux-2.6.21.7.orig/init/Kconfig linux-2.6.21.7/init/Kconfig

Lines of this file are not shown. View the raw message.

init/main.c +8 -2
diff -Naur linux-2.6.21.7.orig/init/main.c linux-2.6.21.7/init/main.c

Lines of this file are not shown. View the raw message.

kernel/exit.c +1 -0
diff -Naur linux-2.6.21.7.orig/kernel/exit.c linux-2.6.21.7/kernel/exit.c

Lines of this file are not shown. View the raw message.

kernel/fork.c +10 -1
diff -Naur linux-2.6.21.7.orig/kernel/fork.c linux-2.6.21.7/kernel/fork.c

Lines of this file are not shown. View the raw message.

kernel/ipipe/core.c +1513 -0

1,513 lines not on this page · raw message

kernel/ipipe/Kconfig +25 -0
diff -Naur linux-2.6.21.7.orig/kernel/ipipe/Kconfig linux-2.6.21.7/kernel/ipipe/Kconfig

Lines of this file are not shown. View the raw message.

kernel/ipipe/Kconfig.debug +88 -0

88 lines not on this page · raw message

kernel/ipipe/Makefile +3 -0
diff -Naur linux-2.6.21.7.orig/kernel/ipipe/Makefile linux-2.6.21.7/kernel/ipipe/Makefile

Lines of this file are not shown. View the raw message.

kernel/ipipe/tracer.c +1294 -0

1,294 lines not on this page · raw message

kernel/irq/chip.c +129 -0

129 lines not on this page · raw message

kernel/Makefile +1 -0
diff -Naur linux-2.6.21.7.orig/kernel/Makefile linux-2.6.21.7/kernel/Makefile

Lines of this file are not shown. View the raw message.

kernel/printk.c +78 -0

78 lines not on this page · raw message

kernel/sched.c +64 -3

67 lines not on this page · raw message

kernel/signal.c +1 -0
diff -Naur linux-2.6.21.7.orig/kernel/signal.c linux-2.6.21.7/kernel/signal.c

Lines of this file are not shown. View the raw message.

kernel/spinlock.c +2 -2
diff -Naur linux-2.6.21.7.orig/kernel/spinlock.c linux-2.6.21.7/kernel/spinlock.c

Lines of this file are not shown. View the raw message.

kernel/sys.c +4 -2
diff -Naur linux-2.6.21.7.orig/kernel/sys.c linux-2.6.21.7/kernel/sys.c

Lines of this file are not shown. View the raw message.

lib/bust_spinlocks.c +3 -0
diff -Naur linux-2.6.21.7.orig/lib/bust_spinlocks.c linux-2.6.21.7/lib/bust_spinlocks.c

Lines of this file are not shown. View the raw message.

lib/ioremap.c +2 -2
diff -Naur linux-2.6.21.7.orig/lib/ioremap.c linux-2.6.21.7/lib/ioremap.c

Lines of this file are not shown. View the raw message.

lib/Kconfig.debug +2 -0
diff -Naur linux-2.6.21.7.orig/lib/Kconfig.debug linux-2.6.21.7/lib/Kconfig.debug

Lines of this file are not shown. View the raw message.

lib/smp_processor_id.c +3 -0
diff -Naur linux-2.6.21.7.orig/lib/smp_processor_id.c linux-2.6.21.7/lib/smp_processor_id.c

Lines of this file are not shown. View the raw message.

lib/spinlock_debug.c +18 -0
diff -Naur linux-2.6.21.7.orig/lib/spinlock_debug.c linux-2.6.21.7/lib/spinlock_debug.c

Lines of this file are not shown. View the raw message.

Makefile +4 -0
diff -Naur linux-2.6.21.7.orig/Makefile linux-2.6.21.7/Makefile

Lines of this file are not shown. View the raw message.

mm/memory.c +190 -33

223 lines not on this page · raw message

mm/mlock.c +2 -2
diff -Naur linux-2.6.21.7.orig/mm/mlock.c linux-2.6.21.7/mm/mlock.c

Lines of this file are not shown. View the raw message.

mm/vmalloc.c +1 -0
diff -Naur linux-2.6.21.7.orig/mm/vmalloc.c linux-2.6.21.7/mm/vmalloc.c

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#8 lore raw
Quoted 9 lines · Benjamin ZORES
Quoted 8 lines · Philippe Gerum
Quoted 5 lines · Benjamin ZORES

Hi,

Attached is latest Adeos PowerPC 1.7-00 version for 2.6.21.

Quoted 6 lines
Quoted 3 lines

Merged, thanks.

Attached latest Adeos PowerPC 1.7-03 version for 2.6.21. Works flawlessy with 2.4-rc3 so far.
Please merge.

Attached version 1.7-04.

Ben

arch/powerpc/boot/Makefile +8 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/boot/Makefile linux-2.6.21.7/arch/powerpc/boot/Makefile
@@ -27,6 +27,14 @@
 		   $(shell $(CROSS32CC) -print-file-name=include) -fPIC
 BOOTAFLAGS	:= -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
 
+ifdef CONFIG_IPIPE_TRACE
+# do not trace the boot loader
+nullstring :=
+space      := $(nullstring) # end of the line
+pg_flag     = $(nullstring) -pg # end of the line
+BOOTCFLAGS     := $(subst ${pg_flag},${space},${BOOTCFLAGS})
+endif
+
 ifeq ($(call cc-option-yn, -fstack-protector),y)
 BOOTCFLAGS	+= -fno-stack-protector
 endif
arch/powerpc/Kconfig +2 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/Kconfig linux-2.6.21.7/arch/powerpc/Kconfig
@@ -758,6 +758,8 @@
 
 menu "Kernel options"
 
+source "kernel/ipipe/Kconfig"
+
 config HIGHMEM
 	bool "High memory support"
 	depends on PPC32
arch/powerpc/kernel/cputable.c +2 -2
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/cputable.c linux-2.6.21.7/arch/powerpc/kernel/cputable.c
@@ -1255,7 +1255,7 @@
 #endif /* CONFIG_PPC32 */
 };
 
-struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
+notrace struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
 {
 	struct cpu_spec *s = cpu_specs;
 	struct cpu_spec **cur = &cur_cpu_spec;
@@ -1284,7 +1284,7 @@
 	return NULL;
 }
 
-void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
+notrace void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
 {
 	struct fixup_entry {
 		unsigned long	mask;
arch/powerpc/kernel/entry_32.S +91 -0

139 lines not on this page · raw message

arch/powerpc/kernel/head_32.S +14 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_32.S linux-2.6.21.7/arch/powerpc/kernel/head_32.S
@@ -329,6 +329,12 @@
 	EXC_XFER_TEMPLATE(n, hdlr, n, NOCOPY, transfer_to_handler_full,	\
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -413,7 +419,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* External interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* Alignment exception */
 	. = 0x600
@@ -445,7 +455,11 @@
 	EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception)
 
 /* Decrementer */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x900, Decrementer, __ipipe_grab_timer, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE)
 	EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE)
arch/powerpc/kernel/head_44x.S +5 -2
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_44x.S linux-2.6.21.7/arch/powerpc/kernel/head_44x.S
@@ -424,8 +424,11 @@
 	/* Instruction Storage Interrupt */
 	INSTRUCTION_STORAGE_EXCEPTION
 
-	/* External Input Interrupt */
-	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, ExternalInput, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
+ 	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	/* Alignment Interrupt */
 	ALIGNMENT_EXCEPTION
arch/powerpc/kernel/head_4xx.S +14 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_4xx.S linux-2.6.21.7/arch/powerpc/kernel/head_4xx.S
@@ -228,6 +228,12 @@
 	EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -396,7 +402,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* 0x0500 - External Interrupt Exception */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x0500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* 0x0600 - Alignment Exception */
 	START_EXCEPTION(0x0600, Alignment)
@@ -434,7 +444,11 @@
 	lis	r0,TSR_PIS@h
 	mtspr	SPRN_TSR,r0		/* Clear the PIT exception */
 	addi	r3,r1,STACK_FRAME_OVERHEAD
+#ifdef CONFIG_IPIPE
+	EXC_XFER_IPIPE(0x1000, __ipipe_grab_timer)
+#else /* !CONFIG_IPIPE */
 	EXC_XFER_LITE(0x1000, timer_interrupt)
+#endif /* CONFIG_IPIPE */
 
 #if 0
 /* NOTE:
arch/powerpc/kernel/head_8xx.S +14 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_8xx.S linux-2.6.21.7/arch/powerpc/kernel/head_8xx.S
@@ -187,6 +187,12 @@
 	EXC_XFER_TEMPLATE(n, hdlr, n, NOCOPY, transfer_to_handler_full,	\
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+ 
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -238,7 +244,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* External interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* Alignment exception */
 	. = 0x600
@@ -259,7 +269,11 @@
 	EXCEPTION(0x800, FPUnavailable, unknown_exception, EXC_XFER_STD)
 
 /* Decrementer */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x900, Decrementer, __ipipe_grab_timer, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE)
 	EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE)
arch/powerpc/kernel/head_booke.h +16 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_booke.h linux-2.6.21.7/arch/powerpc/kernel/head_booke.h
@@ -187,6 +187,12 @@
 	EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -345,6 +351,15 @@
 	addi	r3,r1,STACK_FRAME_OVERHEAD;				      \
 	EXC_XFER_STD(0x0700, program_check_exception)
 
+#ifdef CONFIG_IPIPE
+#define DECREMENTER_EXCEPTION						      \
+	START_EXCEPTION(Decrementer)					      \
+	NORMAL_EXCEPTION_PROLOG;					      \
+	lis     r0,TSR_DIS@h;           /* Setup the DEC interrupt mask */    \
+	mtspr   SPRN_TSR,r0;		/* Clear the DEC interrupt */	      \
+	addi    r3,r1,STACK_FRAME_OVERHEAD;				      \
+	EXC_XFER_IPIPE(0x0900, __ipipe_grab_timer)
+#else /* !CONFIG_IPIPE */
 #define DECREMENTER_EXCEPTION						      \
 	START_EXCEPTION(Decrementer)					      \
 	NORMAL_EXCEPTION_PROLOG;					      \
@@ -352,6 +367,7 @@
 	mtspr   SPRN_TSR,r0;		/* Clear the DEC interrupt */	      \
 	addi    r3,r1,STACK_FRAME_OVERHEAD;				      \
 	EXC_XFER_LITE(0x0900, timer_interrupt)
+#endif /* CONFIG_IPIPE */
 
 #define FP_UNAVAILABLE_EXCEPTION					      \
 	START_EXCEPTION(FloatingPointUnavailable)			      \
arch/powerpc/kernel/head_fsl_booke.S +4 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_fsl_booke.S linux-2.6.21.7/arch/powerpc/kernel/head_fsl_booke.S
@@ -529,7 +529,11 @@
 	INSTRUCTION_STORAGE_EXCEPTION
 
 	/* External Input Interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, ExternalInput, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	/* Alignment Interrupt */
 	ALIGNMENT_EXCEPTION
arch/powerpc/kernel/idle.c +3 -2
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/idle.c linux-2.6.21.7/arch/powerpc/kernel/idle.c
@@ -58,6 +58,7 @@
 	while (1) {
 		while (!need_resched() && !cpu_should_die()) {
 			ppc64_runlatch_off();
+			ipipe_suspend_domain();
 
 			if (ppc_md.power_save) {
 				clear_thread_flag(TIF_POLLING_NRFLAG);
@@ -66,13 +67,13 @@
 				 * is ordered w.r.t. need_resched() test.
 				 */
 				smp_mb();
-				local_irq_disable();
+				local_irq_disable_hw();
 
 				/* check again after disabling irqs */
 				if (!need_resched() && !cpu_should_die())
 					ppc_md.power_save();
 
-				local_irq_enable();
+				local_irq_enable_hw();
 				set_thread_flag(TIF_POLLING_NRFLAG);
 
 			} else {
arch/powerpc/kernel/io.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/io.c linux-2.6.21.7/arch/powerpc/kernel/io.c
@@ -120,7 +120,7 @@
 
 #define IO_CHECK_ALIGN(v,a) ((((unsigned long)(v)) & ((a) - 1)) == 0)
 
-void _memset_io(volatile void __iomem *addr, int c, unsigned long n)
+notrace void _memset_io(volatile void __iomem *addr, int c, unsigned long n)
 {
 	void *p = (void __force *)addr;
 	u32 lc = c;
arch/powerpc/kernel/ipipe.c +728 -0

728 lines not on this page · raw message

arch/powerpc/kernel/irq.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/irq.c linux-2.6.21.7/arch/powerpc/kernel/irq.c
@@ -70,7 +70,7 @@
 #endif
 
 int __irq_offset_value;
-static int ppc_spurious_interrupts;
+int ppc_spurious_interrupts;
 
 #ifdef CONFIG_PPC32
 EXPORT_SYMBOL(__irq_offset_value);
arch/powerpc/kernel/Makefile +2 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/Makefile linux-2.6.21.7/arch/powerpc/kernel/Makefile
@@ -57,6 +57,8 @@
 obj-$(CONFIG_MODULES)		+= ppc_ksyms.o
 obj-$(CONFIG_BOOTX_TEXT)	+= btext.o
 obj-$(CONFIG_SMP)		+= smp.o
+obj-$(CONFIG_IPIPE)		+= ipipe.o
+obj-$(CONFIG_IPIPE_TRACE_MCOUNT)	+= mcount.o
 obj-$(CONFIG_KPROBES)		+= kprobes.o
 obj-$(CONFIG_PPC_UDBG_16550)	+= legacy_serial.o udbg_16550.o
 
arch/powerpc/kernel/mcount.S +75 -0

75 lines not on this page · raw message

arch/powerpc/kernel/process.c +2 -2
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/process.c linux-2.6.21.7/arch/powerpc/kernel/process.c
@@ -326,7 +326,7 @@
 	}
 #endif
 
-	local_irq_save(flags);
+	local_irq_save_hw(flags);
 
 	account_system_vtime(current);
 	account_process_vtime(current);
@@ -334,7 +334,7 @@
 
 	last = _switch(old_thread, new_thread);
 
-	local_irq_restore(flags);
+	local_irq_restore_hw(flags);
 
 	return last;
 }
arch/powerpc/kernel/setup_32.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/setup_32.c linux-2.6.21.7/arch/powerpc/kernel/setup_32.c
@@ -85,7 +85,7 @@
  * from the address that it was linked at, so we must use RELOC/PTRRELOC
  * to access static data (including strings).  -- paulus
  */
-unsigned long __init early_init(unsigned long dt_ptr)
+unsigned long notrace __init early_init(unsigned long dt_ptr)
 {
 	unsigned long offset = reloc_offset();
 	struct cpu_spec *spec;
arch/powerpc/kernel/time.c +12 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/time.c linux-2.6.21.7/arch/powerpc/kernel/time.c
@@ -74,6 +74,8 @@
 #endif
 #include <asm/smp.h>
 
+unsigned long disarm_decr[NR_CPUS];
+
 /* keep track of when we need to update the rtc */
 time_t last_rtc_update;
 #ifdef CONFIG_PPC_ISERIES
@@ -625,7 +627,9 @@
 #endif
 
 	old_regs = set_irq_regs(regs);
+#ifndef CONFIG_IPIPE
 	irq_enter();
+#endif
 
 	profile_tick(CPU_PROFILING);
 	calculate_steal_time();
@@ -651,7 +655,11 @@
 		 * is the case.
 		 */
 		if (!cpu_is_offline(cpu))
+#ifdef CONFIG_IPIPE
+			account_process_time(&__raw_get_cpu_var(__ipipe_tick_regs));
+#else
 			account_process_time(regs);
+#endif
 
 		/*
 		 * No need to check whether cpu is offline here; boot_cpuid
@@ -672,7 +680,8 @@
 	}
 	
 	next_dec = tb_ticks_per_jiffy - ticks;
-	set_dec(next_dec);
+	if ( !disarm_decr[cpu] )
+	    set_dec(next_dec);
 
 #ifdef CONFIG_PPC_ISERIES
 	if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending())
@@ -687,7 +696,9 @@
 	}
 #endif
 
+#ifndef CONFIG_IPIPE
 	irq_exit();
+#endif
 	set_irq_regs(old_regs);
 }
 
arch/powerpc/kernel/traps.c +47 -1

149 lines not on this page · raw message

arch/powerpc/mm/fault.c +3 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/mm/fault.c linux-2.6.21.7/arch/powerpc/mm/fault.c
@@ -160,6 +160,9 @@
 	int trap = TRAP(regs);
  	int is_exec = trap == 0x400;
 
+	if (ipipe_trap_notify(IPIPE_TRAP_ACCESS,regs))
+	    	return 0;
+
 #if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
 	/*
 	 * Fortunately the bit assignments in SRR1 for an instruction
arch/powerpc/platforms/iseries/irq.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/platforms/iseries/irq.c linux-2.6.21.7/arch/powerpc/platforms/iseries/irq.c
@@ -81,7 +81,7 @@
 	} data;
 };
 
-static DEFINE_SPINLOCK(pending_irqs_lock);
+static IPIPE_DEFINE_SPINLOCK(pending_irqs_lock);
 static int num_pending_irqs;
 static int pending_irqs[NR_IRQS];
 
arch/powerpc/platforms/powermac/pic.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/platforms/powermac/pic.c linux-2.6.21.7/arch/powerpc/platforms/powermac/pic.c
@@ -63,7 +63,7 @@
 static int max_real_irqs;
 static u32 level_mask[4];
 
-static DEFINE_SPINLOCK(pmac_pic_lock);
+static IPIPE_DEFINE_SPINLOCK(pmac_pic_lock);
 
 #define NR_MASK_WORDS	((NR_IRQS + 31) / 32)
 static unsigned long ppc_lost_interrupts[NR_MASK_WORDS];
arch/powerpc/platforms/ps3/interrupt.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/platforms/ps3/interrupt.c linux-2.6.21.7/arch/powerpc/platforms/ps3/interrupt.c
@@ -71,7 +71,7 @@
 		u64 unused_2[3];
 	};
 	u64 ipi_debug_brk_mask;
-	spinlock_t lock;
+	ipipe_spinlock_t lock;
 };
 
 /**
arch/powerpc/sysdev/i8259.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/sysdev/i8259.c linux-2.6.21.7/arch/powerpc/sysdev/i8259.c
@@ -23,7 +23,7 @@
 #define cached_A1 (cached_8259[0])
 #define cached_21 (cached_8259[1])
 
-static DEFINE_SPINLOCK(i8259_lock);
+static IPIPE_DEFINE_SPINLOCK(i8259_lock);
 
 static struct device_node *i8259_node;
 static struct irq_host *i8259_host;
arch/powerpc/sysdev/ipic.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/sysdev/ipic.c linux-2.6.21.7/arch/powerpc/sysdev/ipic.c
@@ -30,7 +30,7 @@
 #include "ipic.h"
 
 static struct ipic * primary_ipic;
-static DEFINE_SPINLOCK(ipic_lock);
+static IPIPE_DEFINE_SPINLOCK(ipic_lock);
 
 static struct ipic_info ipic_info[] = {
 	[9] = {
arch/powerpc/sysdev/mpic.c +18 -4
diff -Naur linux-2.6.21.7.orig/arch/powerpc/sysdev/mpic.c linux-2.6.21.7/arch/powerpc/sysdev/mpic.c
@@ -44,7 +44,7 @@
 
 static struct mpic *mpics;
 static struct mpic *mpic_primary;
-static DEFINE_SPINLOCK(mpic_lock);
+static IPIPE_DEFINE_SPINLOCK(mpic_lock);
 
 #ifdef CONFIG_PPC32	/* XXX for now */
 #ifdef CONFIG_IRQ_ALL_CPUS
@@ -564,19 +564,24 @@
 	unsigned int loops = 100000;
 	struct mpic *mpic = mpic_from_irq(irq);
 	unsigned int src = mpic_irq_to_hw(irq);
+	unsigned long flags;
 
 	DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, irq, src);
 
+	local_irq_save_hw_cond(flags);
+
 	mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI),
 		       mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) &
 		       ~MPIC_VECPRI_MASK);
 	/* make sure mask gets to controller before we return to user */
 	do {
 		if (!loops--) {
-			printk(KERN_ERR "mpic_enable_irq timeout\n");
+			printk(KERN_ERR "mpic_unmask_irq timeout (irq %u)\n", irq);
 			break;
 		}
 	} while(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK);
+
+	local_irq_restore_hw_cond(flags);
 }
 
 static void mpic_mask_irq(unsigned int irq)
@@ -584,20 +589,24 @@
 	unsigned int loops = 100000;
 	struct mpic *mpic = mpic_from_irq(irq);
 	unsigned int src = mpic_irq_to_hw(irq);
+	unsigned long flags;
 
 	DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src);
 
+	local_irq_save_hw_cond(flags);
+
 	mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI),
 		       mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) |
 		       MPIC_VECPRI_MASK);
-
 	/* make sure mask gets to controller before we return to user */
 	do {
 		if (!loops--) {
-			printk(KERN_ERR "mpic_enable_irq timeout\n");
+			printk(KERN_ERR "mpic_mask_irq timeout (irq=%u)\n", irq);
 			break;
 		}
 	} while(!(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK));
+
+	local_irq_restore_hw_cond(flags);
 }
 
 static void mpic_end_irq(unsigned int irq)
@@ -739,6 +748,7 @@
 	unsigned int src = mpic_irq_to_hw(virq);
 	struct irq_desc *desc = get_irq_desc(virq);
 	unsigned int vecpri, vold, vnew;
+	unsigned long flags;
 
 	DBG("mpic: set_irq_type(mpic:@%p,virq:%d,src:0x%x,type:0x%x)\n",
 	    mpic, virq, src, flow_type);
@@ -763,6 +773,8 @@
 	else
 		vecpri = mpic_type_to_vecpri(mpic, flow_type);
 
+	local_irq_save_hw_cond(flags);
+
 	vold = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI));
 	vnew = vold & ~(MPIC_INFO(VECPRI_POLARITY_MASK) |
 			MPIC_INFO(VECPRI_SENSE_MASK));
@@ -770,6 +782,8 @@
 	if (vold != vnew)
 		mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), vnew);
 
+	local_irq_restore_hw_cond(flags);
+
 	return 0;
 }
 
arch/powerpc/sysdev/tsi108_pci.c +10 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/sysdev/tsi108_pci.c linux-2.6.21.7/arch/powerpc/sysdev/tsi108_pci.c
@@ -249,7 +249,9 @@
 {
 	u_int irp_cfg;
 	int int_line = (irq - IRQ_PCI_INTAD_BASE);
+	unsigned long flags;
 
+	local_irq_save_hw_cond(flags);
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
 	mb();
 	irp_cfg |= (1 << int_line);	/* INTx_DIR = output */
@@ -257,19 +259,23 @@
 	tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL, irp_cfg);
 	mb();
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
+	local_irq_restore_hw_cond(flags);
 }
 
 static void tsi108_pci_int_unmask(u_int irq)
 {
 	u_int irp_cfg;
 	int int_line = (irq - IRQ_PCI_INTAD_BASE);
+	unsigned long flags;
 
+	local_irq_save_hw_cond(flags);
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
 	mb();
 	irp_cfg &= ~(1 << int_line);
 	irp_cfg |= (3 << (8 + (int_line * 2)));
 	tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL, irp_cfg);
 	mb();
+	local_irq_restore_hw_cond(flags);
 }
 
 static void init_pci_source(void)
@@ -360,6 +366,9 @@
 
 static void tsi108_pci_irq_end(u_int irq)
 {
+	unsigned long flags;
+
+	local_irq_save_hw_cond(flags);
 	tsi108_pci_int_unmask(irq);
 
 	/* Enable interrupts from PCI block */
@@ -367,6 +376,7 @@
 			 tsi108_read_reg(TSI108_PCI_OFFSET +
 					 TSI108_PCI_IRP_ENABLE) |
 			 TSI108_PCI_IRP_ENABLE_P_INT);
+	local_irq_restore_hw_cond(flags);
 	mb();
 }
 
drivers/pci/htirq.c +1 -1
diff -Naur linux-2.6.21.7.orig/drivers/pci/htirq.c linux-2.6.21.7/drivers/pci/htirq.c
@@ -21,7 +21,7 @@
  * With multiple simultaneous hypertransport irq devices it might pay
  * to make this more fine grained.  But start with simple, stupid, and correct.
  */
-static DEFINE_SPINLOCK(ht_irq_lock);
+static IPIPE_DEFINE_SPINLOCK(ht_irq_lock);
 
 struct ht_irq_cfg {
 	struct pci_dev *dev;
drivers/serial/mpc52xx_uart.c +34 -0
diff -Naur linux-2.6.21.7.orig/drivers/serial/mpc52xx_uart.c linux-2.6.21.7/drivers/serial/mpc52xx_uart.c
@@ -803,6 +803,40 @@
 #endif
 
 
+#ifdef CONFIG_IPIPE
+
+#include <stdarg.h>
+
+void __ipipe_serial_debug(const char *fmt, ...)
+{
+	struct console *co = MPC52xx_PSC_CONSOLE;
+	unsigned long flags, count;
+	struct uart_port *port;
+	char buf[128];
+	va_list ap;
+
+	if (co->index < 0)
+		return;		/* No console. */
+
+	port = &mpc52xx_uart_ports[co->index];
+
+	if (!port->mapbase)
+		return;		/* Too early. */
+
+	va_start(ap, fmt);
+	vsprintf(buf, fmt, ap);
+	va_end(ap);
+	count = strlen(buf);
+
+	local_irq_save_hw(flags);
+	mpc52xx_console_write(co, buf, count);
+	local_irq_restore_hw(flags);
+}
+
+EXPORT_SYMBOL(__ipipe_serial_debug);
+
+#endif
+
 /* ======================================================================== */
 /* UART Driver                                                              */
 /* ======================================================================== */
include/asm-powerpc/hw_irq.h +132 -11

182 lines not on this page · raw message

include/asm-powerpc/ipipe_base.h +146 -0

146 lines not on this page · raw message

include/asm-powerpc/ipipe.h +182 -0

182 lines not on this page · raw message

include/asm-ppc/mmu_context.h +11 -1
diff -Naur linux-2.6.21.7.orig/include/asm-ppc/mmu_context.h linux-2.6.21.7/include/asm-ppc/mmu_context.h
@@ -153,7 +153,10 @@
  */
 static inline void destroy_context(struct mm_struct *mm)
 {
+	unsigned long flags;
+
 	preempt_disable();
+	local_irq_save_hw_cond(flags);
 	if (mm->context.id != NO_CONTEXT) {
 		clear_bit(mm->context.id, context_map);
 		mm->context.id = NO_CONTEXT;
@@ -161,6 +164,7 @@
 		atomic_inc(&nr_free_contexts);
 #endif
 	}
+ 	local_irq_restore_hw_cond(flags);
 	preempt_enable();
 }
 
@@ -193,7 +197,13 @@
  * After we have set current->mm to a new value, this activates
  * the context for the new mm so we see the new mappings.
  */
-#define activate_mm(active_mm, mm)   switch_mm(active_mm, mm, current)
+#define activate_mm(active_mm, mm)   \
+do { \
+	unsigned long flags; \
+	local_irq_save_hw_cond(flags); \
+	switch_mm(active_mm, mm, current); \
+	local_irq_restore_hw_cond(flags);	   \
+} while(0)
 
 extern void mmu_context_init(void);
 
include/linux/hardirq.h +2 -2
diff -Naur linux-2.6.21.7.orig/include/linux/hardirq.h linux-2.6.21.7/include/linux/hardirq.h
@@ -133,7 +133,7 @@
  */
 extern void irq_exit(void);
 
-#define nmi_enter()		do { lockdep_off(); __irq_enter(); } while (0)
-#define nmi_exit()		do { __irq_exit(); lockdep_on(); } while (0)
+#define nmi_enter()		do { if (ipipe_root_domain_p) { lockdep_off(); __irq_enter(); } } while (0)
+#define nmi_exit()		do { if (ipipe_root_domain_p) { __irq_exit(); lockdep_on(); } ] while (0)
 
 #endif /* LINUX_HARDIRQ_H */
include/linux/ipipe_base.h +77 -0

77 lines not on this page · raw message

include/linux/ipipe_compat.h +54 -0

54 lines not on this page · raw message

include/linux/ipipe.h +557 -0

557 lines not on this page · raw message

include/linux/ipipe_percpu.h +69 -0

69 lines not on this page · raw message

include/linux/ipipe_trace.h +65 -0

61 lines not on this page · raw message

include/linux/irq.h +6 -0
diff -Naur linux-2.6.21.7.orig/include/linux/irq.h linux-2.6.21.7/include/linux/irq.h

Lines of this file are not shown. View the raw message.

include/linux/kernel.h +6 -2
diff -Naur linux-2.6.21.7.orig/include/linux/kernel.h linux-2.6.21.7/include/linux/kernel.h

Lines of this file are not shown. View the raw message.

include/linux/linkage.h +4 -0
diff -Naur linux-2.6.21.7.orig/include/linux/linkage.h linux-2.6.21.7/include/linux/linkage.h

Lines of this file are not shown. View the raw message.

include/linux/mm.h +1 -0
diff -Naur linux-2.6.21.7.orig/include/linux/mm.h linux-2.6.21.7/include/linux/mm.h

Lines of this file are not shown. View the raw message.

include/linux/preempt.h +8 -4
diff -Naur linux-2.6.21.7.orig/include/linux/preempt.h linux-2.6.21.7/include/linux/preempt.h

Lines of this file are not shown. View the raw message.

include/linux/sched.h +16 -0
diff -Naur linux-2.6.21.7.orig/include/linux/sched.h linux-2.6.21.7/include/linux/sched.h

Lines of this file are not shown. View the raw message.

include/linux/smp.h +2 -0
diff -Naur linux-2.6.21.7.orig/include/linux/smp.h linux-2.6.21.7/include/linux/smp.h

Lines of this file are not shown. View the raw message.

include/linux/spinlock.h +117 -9

126 lines not on this page · raw message

include/linux/spinlock_types.h +14 -0
diff -Naur linux-2.6.21.7.orig/include/linux/spinlock_types.h linux-2.6.21.7/include/linux/spinlock_types.h

Lines of this file are not shown. View the raw message.

init/Kconfig +1 -0
diff -Naur linux-2.6.21.7.orig/init/Kconfig linux-2.6.21.7/init/Kconfig

Lines of this file are not shown. View the raw message.

init/main.c +8 -2
diff -Naur linux-2.6.21.7.orig/init/main.c linux-2.6.21.7/init/main.c

Lines of this file are not shown. View the raw message.

kernel/exit.c +1 -0
diff -Naur linux-2.6.21.7.orig/kernel/exit.c linux-2.6.21.7/kernel/exit.c

Lines of this file are not shown. View the raw message.

kernel/fork.c +10 -1
diff -Naur linux-2.6.21.7.orig/kernel/fork.c linux-2.6.21.7/kernel/fork.c

Lines of this file are not shown. View the raw message.

kernel/ipipe/core.c +1513 -0

1,513 lines not on this page · raw message

kernel/ipipe/Kconfig +25 -0
diff -Naur linux-2.6.21.7.orig/kernel/ipipe/Kconfig linux-2.6.21.7/kernel/ipipe/Kconfig

Lines of this file are not shown. View the raw message.

kernel/ipipe/Kconfig.debug +88 -0

88 lines not on this page · raw message

kernel/ipipe/Makefile +3 -0
diff -Naur linux-2.6.21.7.orig/kernel/ipipe/Makefile linux-2.6.21.7/kernel/ipipe/Makefile

Lines of this file are not shown. View the raw message.

kernel/ipipe/tracer.c +1294 -0

1,294 lines not on this page · raw message

kernel/irq/chip.c +129 -0

129 lines not on this page · raw message

kernel/Makefile +1 -0
diff -Naur linux-2.6.21.7.orig/kernel/Makefile linux-2.6.21.7/kernel/Makefile

Lines of this file are not shown. View the raw message.

kernel/printk.c +78 -0

78 lines not on this page · raw message

kernel/sched.c +64 -3

67 lines not on this page · raw message

kernel/signal.c +1 -0
diff -Naur linux-2.6.21.7.orig/kernel/signal.c linux-2.6.21.7/kernel/signal.c

Lines of this file are not shown. View the raw message.

kernel/spinlock.c +2 -2
diff -Naur linux-2.6.21.7.orig/kernel/spinlock.c linux-2.6.21.7/kernel/spinlock.c

Lines of this file are not shown. View the raw message.

kernel/sys.c +4 -2
diff -Naur linux-2.6.21.7.orig/kernel/sys.c linux-2.6.21.7/kernel/sys.c

Lines of this file are not shown. View the raw message.

lib/bust_spinlocks.c +3 -0
diff -Naur linux-2.6.21.7.orig/lib/bust_spinlocks.c linux-2.6.21.7/lib/bust_spinlocks.c

Lines of this file are not shown. View the raw message.

lib/ioremap.c +2 -2
diff -Naur linux-2.6.21.7.orig/lib/ioremap.c linux-2.6.21.7/lib/ioremap.c

Lines of this file are not shown. View the raw message.

lib/Kconfig.debug +2 -0
diff -Naur linux-2.6.21.7.orig/lib/Kconfig.debug linux-2.6.21.7/lib/Kconfig.debug

Lines of this file are not shown. View the raw message.

lib/smp_processor_id.c +3 -0
diff -Naur linux-2.6.21.7.orig/lib/smp_processor_id.c linux-2.6.21.7/lib/smp_processor_id.c

Lines of this file are not shown. View the raw message.

lib/spinlock_debug.c +18 -0
diff -Naur linux-2.6.21.7.orig/lib/spinlock_debug.c linux-2.6.21.7/lib/spinlock_debug.c

Lines of this file are not shown. View the raw message.

Makefile +4 -0
diff -Naur linux-2.6.21.7.orig/Makefile linux-2.6.21.7/Makefile

Lines of this file are not shown. View the raw message.

mm/memory.c +190 -33

223 lines not on this page · raw message

mm/mlock.c +2 -2
diff -Naur linux-2.6.21.7.orig/mm/mlock.c linux-2.6.21.7/mm/mlock.c

Lines of this file are not shown. View the raw message.

mm/vmalloc.c +1 -0
diff -Naur linux-2.6.21.7.orig/mm/vmalloc.c linux-2.6.21.7/mm/vmalloc.c

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#9 lore raw
Quoted 10 lines · Benjamin ZORES
Quoted 9 lines · Benjamin ZORES
Quoted 8 lines · Philippe Gerum
Quoted 5 lines · Benjamin ZORES

Hi,

Attached is latest Adeos PowerPC 1.7-00 version for 2.6.21.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Merged, thanks.

Attached latest Adeos PowerPC 1.7-03 version for 2.6.21. Works flawlessy with 2.4-rc3 so far.
Please merge.

Attached version 1.7-04.

Merged, thanks.

Quoted 6 lines

Ben

_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core

Signature · 1 line
Philippe.
#10 lore raw
Quoted 23 lines · Philippe Gerum
Quoted 21 lines · Benjamin ZORES
Quoted 19 lines · Benjamin ZORES
Quoted 13 lines · Philippe Gerum
Quoted 6 lines · Benjamin ZORES

Hi,

Attached is latest Adeos PowerPC 1.7-00 version for 2.6.21.

Merged, thanks.

Attached latest Adeos PowerPC 1.7-03 version for 2.6.21. Works flawlessy with 2.4-rc3 so far.
Please merge.

Quoted 7 lines
Quoted 3 lines

Attached version 1.7-04.

Merged, thanks.

Attached is updated Adeos PowerPC 1.7-05 for 2.6.21. Please merge.

Ben

arch/powerpc/boot/Makefile +8 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/boot/Makefile linux-2.6.21.7/arch/powerpc/boot/Makefile
@@ -27,6 +27,14 @@
 		   $(shell $(CROSS32CC) -print-file-name=include) -fPIC
 BOOTAFLAGS	:= -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
 
+ifdef CONFIG_IPIPE_TRACE
+# do not trace the boot loader
+nullstring :=
+space      := $(nullstring) # end of the line
+pg_flag     = $(nullstring) -pg # end of the line
+BOOTCFLAGS     := $(subst ${pg_flag},${space},${BOOTCFLAGS})
+endif
+
 ifeq ($(call cc-option-yn, -fstack-protector),y)
 BOOTCFLAGS	+= -fno-stack-protector
 endif
arch/powerpc/Kconfig +2 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/Kconfig linux-2.6.21.7/arch/powerpc/Kconfig
@@ -758,6 +758,8 @@
 
 menu "Kernel options"
 
+source "kernel/ipipe/Kconfig"
+
 config HIGHMEM
 	bool "High memory support"
 	depends on PPC32
arch/powerpc/kernel/cputable.c +2 -2
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/cputable.c linux-2.6.21.7/arch/powerpc/kernel/cputable.c
@@ -1255,7 +1255,7 @@
 #endif /* CONFIG_PPC32 */
 };
 
-struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
+notrace struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
 {
 	struct cpu_spec *s = cpu_specs;
 	struct cpu_spec **cur = &cur_cpu_spec;
@@ -1284,7 +1284,7 @@
 	return NULL;
 }
 
-void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
+notrace void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
 {
 	struct fixup_entry {
 		unsigned long	mask;
arch/powerpc/kernel/entry_32.S +91 -0

139 lines not on this page · raw message

arch/powerpc/kernel/head_32.S +14 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_32.S linux-2.6.21.7/arch/powerpc/kernel/head_32.S
@@ -329,6 +329,12 @@
 	EXC_XFER_TEMPLATE(n, hdlr, n, NOCOPY, transfer_to_handler_full,	\
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -413,7 +419,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* External interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* Alignment exception */
 	. = 0x600
@@ -445,7 +455,11 @@
 	EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception)
 
 /* Decrementer */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x900, Decrementer, __ipipe_grab_timer, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE)
 	EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE)
arch/powerpc/kernel/head_44x.S +5 -2
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_44x.S linux-2.6.21.7/arch/powerpc/kernel/head_44x.S
@@ -424,8 +424,11 @@
 	/* Instruction Storage Interrupt */
 	INSTRUCTION_STORAGE_EXCEPTION
 
-	/* External Input Interrupt */
-	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, ExternalInput, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
+ 	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	/* Alignment Interrupt */
 	ALIGNMENT_EXCEPTION
arch/powerpc/kernel/head_4xx.S +14 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_4xx.S linux-2.6.21.7/arch/powerpc/kernel/head_4xx.S
@@ -228,6 +228,12 @@
 	EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -396,7 +402,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* 0x0500 - External Interrupt Exception */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x0500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* 0x0600 - Alignment Exception */
 	START_EXCEPTION(0x0600, Alignment)
@@ -434,7 +444,11 @@
 	lis	r0,TSR_PIS@h
 	mtspr	SPRN_TSR,r0		/* Clear the PIT exception */
 	addi	r3,r1,STACK_FRAME_OVERHEAD
+#ifdef CONFIG_IPIPE
+	EXC_XFER_IPIPE(0x1000, __ipipe_grab_timer)
+#else /* !CONFIG_IPIPE */
 	EXC_XFER_LITE(0x1000, timer_interrupt)
+#endif /* CONFIG_IPIPE */
 
 #if 0
 /* NOTE:
arch/powerpc/kernel/head_8xx.S +14 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_8xx.S linux-2.6.21.7/arch/powerpc/kernel/head_8xx.S
@@ -187,6 +187,12 @@
 	EXC_XFER_TEMPLATE(n, hdlr, n, NOCOPY, transfer_to_handler_full,	\
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+ 
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -238,7 +244,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* External interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* Alignment exception */
 	. = 0x600
@@ -259,7 +269,11 @@
 	EXCEPTION(0x800, FPUnavailable, unknown_exception, EXC_XFER_STD)
 
 /* Decrementer */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x900, Decrementer, __ipipe_grab_timer, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE)
 	EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE)
arch/powerpc/kernel/head_booke.h +16 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_booke.h linux-2.6.21.7/arch/powerpc/kernel/head_booke.h
@@ -187,6 +187,12 @@
 	EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -345,6 +351,15 @@
 	addi	r3,r1,STACK_FRAME_OVERHEAD;				      \
 	EXC_XFER_STD(0x0700, program_check_exception)
 
+#ifdef CONFIG_IPIPE
+#define DECREMENTER_EXCEPTION						      \
+	START_EXCEPTION(Decrementer)					      \
+	NORMAL_EXCEPTION_PROLOG;					      \
+	lis     r0,TSR_DIS@h;           /* Setup the DEC interrupt mask */    \
+	mtspr   SPRN_TSR,r0;		/* Clear the DEC interrupt */	      \
+	addi    r3,r1,STACK_FRAME_OVERHEAD;				      \
+	EXC_XFER_IPIPE(0x0900, __ipipe_grab_timer)
+#else /* !CONFIG_IPIPE */
 #define DECREMENTER_EXCEPTION						      \
 	START_EXCEPTION(Decrementer)					      \
 	NORMAL_EXCEPTION_PROLOG;					      \
@@ -352,6 +367,7 @@
 	mtspr   SPRN_TSR,r0;		/* Clear the DEC interrupt */	      \
 	addi    r3,r1,STACK_FRAME_OVERHEAD;				      \
 	EXC_XFER_LITE(0x0900, timer_interrupt)
+#endif /* CONFIG_IPIPE */
 
 #define FP_UNAVAILABLE_EXCEPTION					      \
 	START_EXCEPTION(FloatingPointUnavailable)			      \
arch/powerpc/kernel/head_fsl_booke.S +4 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/head_fsl_booke.S linux-2.6.21.7/arch/powerpc/kernel/head_fsl_booke.S
@@ -529,7 +529,11 @@
 	INSTRUCTION_STORAGE_EXCEPTION
 
 	/* External Input Interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, ExternalInput, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	/* Alignment Interrupt */
 	ALIGNMENT_EXCEPTION
arch/powerpc/kernel/idle.c +3 -2
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/idle.c linux-2.6.21.7/arch/powerpc/kernel/idle.c
@@ -58,6 +58,7 @@
 	while (1) {
 		while (!need_resched() && !cpu_should_die()) {
 			ppc64_runlatch_off();
+			ipipe_suspend_domain();
 
 			if (ppc_md.power_save) {
 				clear_thread_flag(TIF_POLLING_NRFLAG);
@@ -66,13 +67,13 @@
 				 * is ordered w.r.t. need_resched() test.
 				 */
 				smp_mb();
-				local_irq_disable();
+				local_irq_disable_hw();
 
 				/* check again after disabling irqs */
 				if (!need_resched() && !cpu_should_die())
 					ppc_md.power_save();
 
-				local_irq_enable();
+				local_irq_enable_hw();
 				set_thread_flag(TIF_POLLING_NRFLAG);
 
 			} else {
arch/powerpc/kernel/io.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/io.c linux-2.6.21.7/arch/powerpc/kernel/io.c
@@ -120,7 +120,7 @@
 
 #define IO_CHECK_ALIGN(v,a) ((((unsigned long)(v)) & ((a) - 1)) == 0)
 
-void _memset_io(volatile void __iomem *addr, int c, unsigned long n)
+notrace void _memset_io(volatile void __iomem *addr, int c, unsigned long n)
 {
 	void *p = (void __force *)addr;
 	u32 lc = c;
arch/powerpc/kernel/ipipe.c +728 -0

728 lines not on this page · raw message

arch/powerpc/kernel/irq.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/irq.c linux-2.6.21.7/arch/powerpc/kernel/irq.c
@@ -70,7 +70,7 @@
 #endif
 
 int __irq_offset_value;
-static int ppc_spurious_interrupts;
+int ppc_spurious_interrupts;
 
 #ifdef CONFIG_PPC32
 EXPORT_SYMBOL(__irq_offset_value);
arch/powerpc/kernel/Makefile +2 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/Makefile linux-2.6.21.7/arch/powerpc/kernel/Makefile
@@ -57,6 +57,8 @@
 obj-$(CONFIG_MODULES)		+= ppc_ksyms.o
 obj-$(CONFIG_BOOTX_TEXT)	+= btext.o
 obj-$(CONFIG_SMP)		+= smp.o
+obj-$(CONFIG_IPIPE)		+= ipipe.o
+obj-$(CONFIG_IPIPE_TRACE_MCOUNT)	+= mcount.o
 obj-$(CONFIG_KPROBES)		+= kprobes.o
 obj-$(CONFIG_PPC_UDBG_16550)	+= legacy_serial.o udbg_16550.o
 
arch/powerpc/kernel/mcount.S +75 -0

75 lines not on this page · raw message

arch/powerpc/kernel/process.c +2 -2
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/process.c linux-2.6.21.7/arch/powerpc/kernel/process.c
@@ -326,7 +326,7 @@
 	}
 #endif
 
-	local_irq_save(flags);
+	local_irq_save_hw(flags);
 
 	account_system_vtime(current);
 	account_process_vtime(current);
@@ -334,7 +334,7 @@
 
 	last = _switch(old_thread, new_thread);
 
-	local_irq_restore(flags);
+	local_irq_restore_hw(flags);
 
 	return last;
 }
arch/powerpc/kernel/setup_32.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/setup_32.c linux-2.6.21.7/arch/powerpc/kernel/setup_32.c
@@ -85,7 +85,7 @@
  * from the address that it was linked at, so we must use RELOC/PTRRELOC
  * to access static data (including strings).  -- paulus
  */
-unsigned long __init early_init(unsigned long dt_ptr)
+unsigned long notrace __init early_init(unsigned long dt_ptr)
 {
 	unsigned long offset = reloc_offset();
 	struct cpu_spec *spec;
arch/powerpc/kernel/time.c +12 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/kernel/time.c linux-2.6.21.7/arch/powerpc/kernel/time.c
@@ -74,6 +74,8 @@
 #endif
 #include <asm/smp.h>
 
+unsigned long disarm_decr[NR_CPUS];
+
 /* keep track of when we need to update the rtc */
 time_t last_rtc_update;
 #ifdef CONFIG_PPC_ISERIES
@@ -625,7 +627,9 @@
 #endif
 
 	old_regs = set_irq_regs(regs);
+#ifndef CONFIG_IPIPE
 	irq_enter();
+#endif
 
 	profile_tick(CPU_PROFILING);
 	calculate_steal_time();
@@ -651,7 +655,11 @@
 		 * is the case.
 		 */
 		if (!cpu_is_offline(cpu))
+#ifdef CONFIG_IPIPE
+			account_process_time(&__raw_get_cpu_var(__ipipe_tick_regs));
+#else
 			account_process_time(regs);
+#endif
 
 		/*
 		 * No need to check whether cpu is offline here; boot_cpuid
@@ -672,7 +680,8 @@
 	}
 	
 	next_dec = tb_ticks_per_jiffy - ticks;
-	set_dec(next_dec);
+	if ( !disarm_decr[cpu] )
+	    set_dec(next_dec);
 
 #ifdef CONFIG_PPC_ISERIES
 	if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending())
@@ -687,7 +696,9 @@
 	}
 #endif
 
+#ifndef CONFIG_IPIPE
 	irq_exit();
+#endif
 	set_irq_regs(old_regs);
 }
 
arch/powerpc/kernel/traps.c +47 -1

149 lines not on this page · raw message

arch/powerpc/mm/fault.c +3 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/mm/fault.c linux-2.6.21.7/arch/powerpc/mm/fault.c
@@ -160,6 +160,9 @@
 	int trap = TRAP(regs);
  	int is_exec = trap == 0x400;
 
+	if (ipipe_trap_notify(IPIPE_TRAP_ACCESS,regs))
+	    	return 0;
+
 #if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
 	/*
 	 * Fortunately the bit assignments in SRR1 for an instruction
arch/powerpc/platforms/iseries/irq.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/platforms/iseries/irq.c linux-2.6.21.7/arch/powerpc/platforms/iseries/irq.c
@@ -81,7 +81,7 @@
 	} data;
 };
 
-static DEFINE_SPINLOCK(pending_irqs_lock);
+static IPIPE_DEFINE_SPINLOCK(pending_irqs_lock);
 static int num_pending_irqs;
 static int pending_irqs[NR_IRQS];
 
arch/powerpc/platforms/powermac/pic.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/platforms/powermac/pic.c linux-2.6.21.7/arch/powerpc/platforms/powermac/pic.c
@@ -63,7 +63,7 @@
 static int max_real_irqs;
 static u32 level_mask[4];
 
-static DEFINE_SPINLOCK(pmac_pic_lock);
+static IPIPE_DEFINE_SPINLOCK(pmac_pic_lock);
 
 #define NR_MASK_WORDS	((NR_IRQS + 31) / 32)
 static unsigned long ppc_lost_interrupts[NR_MASK_WORDS];
arch/powerpc/platforms/ps3/interrupt.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/platforms/ps3/interrupt.c linux-2.6.21.7/arch/powerpc/platforms/ps3/interrupt.c
@@ -71,7 +71,7 @@
 		u64 unused_2[3];
 	};
 	u64 ipi_debug_brk_mask;
-	spinlock_t lock;
+	ipipe_spinlock_t lock;
 };
 
 /**
arch/powerpc/sysdev/i8259.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/sysdev/i8259.c linux-2.6.21.7/arch/powerpc/sysdev/i8259.c
@@ -23,7 +23,7 @@
 #define cached_A1 (cached_8259[0])
 #define cached_21 (cached_8259[1])
 
-static DEFINE_SPINLOCK(i8259_lock);
+static IPIPE_DEFINE_SPINLOCK(i8259_lock);
 
 static struct device_node *i8259_node;
 static struct irq_host *i8259_host;
arch/powerpc/sysdev/ipic.c +1 -1
diff -Naur linux-2.6.21.7.orig/arch/powerpc/sysdev/ipic.c linux-2.6.21.7/arch/powerpc/sysdev/ipic.c
@@ -30,7 +30,7 @@
 #include "ipic.h"
 
 static struct ipic * primary_ipic;
-static DEFINE_SPINLOCK(ipic_lock);
+static IPIPE_DEFINE_SPINLOCK(ipic_lock);
 
 static struct ipic_info ipic_info[] = {
 	[9] = {
arch/powerpc/sysdev/mpic.c +18 -4
diff -Naur linux-2.6.21.7.orig/arch/powerpc/sysdev/mpic.c linux-2.6.21.7/arch/powerpc/sysdev/mpic.c
@@ -44,7 +44,7 @@
 
 static struct mpic *mpics;
 static struct mpic *mpic_primary;
-static DEFINE_SPINLOCK(mpic_lock);
+static IPIPE_DEFINE_SPINLOCK(mpic_lock);
 
 #ifdef CONFIG_PPC32	/* XXX for now */
 #ifdef CONFIG_IRQ_ALL_CPUS
@@ -564,19 +564,24 @@
 	unsigned int loops = 100000;
 	struct mpic *mpic = mpic_from_irq(irq);
 	unsigned int src = mpic_irq_to_hw(irq);
+	unsigned long flags;
 
 	DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, irq, src);
 
+	local_irq_save_hw_cond(flags);
+
 	mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI),
 		       mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) &
 		       ~MPIC_VECPRI_MASK);
 	/* make sure mask gets to controller before we return to user */
 	do {
 		if (!loops--) {
-			printk(KERN_ERR "mpic_enable_irq timeout\n");
+			printk(KERN_ERR "mpic_unmask_irq timeout (irq %u)\n", irq);
 			break;
 		}
 	} while(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK);
+
+	local_irq_restore_hw_cond(flags);
 }
 
 static void mpic_mask_irq(unsigned int irq)
@@ -584,20 +589,24 @@
 	unsigned int loops = 100000;
 	struct mpic *mpic = mpic_from_irq(irq);
 	unsigned int src = mpic_irq_to_hw(irq);
+	unsigned long flags;
 
 	DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src);
 
+	local_irq_save_hw_cond(flags);
+
 	mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI),
 		       mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) |
 		       MPIC_VECPRI_MASK);
-
 	/* make sure mask gets to controller before we return to user */
 	do {
 		if (!loops--) {
-			printk(KERN_ERR "mpic_enable_irq timeout\n");
+			printk(KERN_ERR "mpic_mask_irq timeout (irq=%u)\n", irq);
 			break;
 		}
 	} while(!(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK));
+
+	local_irq_restore_hw_cond(flags);
 }
 
 static void mpic_end_irq(unsigned int irq)
@@ -739,6 +748,7 @@
 	unsigned int src = mpic_irq_to_hw(virq);
 	struct irq_desc *desc = get_irq_desc(virq);
 	unsigned int vecpri, vold, vnew;
+	unsigned long flags;
 
 	DBG("mpic: set_irq_type(mpic:@%p,virq:%d,src:0x%x,type:0x%x)\n",
 	    mpic, virq, src, flow_type);
@@ -763,6 +773,8 @@
 	else
 		vecpri = mpic_type_to_vecpri(mpic, flow_type);
 
+	local_irq_save_hw_cond(flags);
+
 	vold = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI));
 	vnew = vold & ~(MPIC_INFO(VECPRI_POLARITY_MASK) |
 			MPIC_INFO(VECPRI_SENSE_MASK));
@@ -770,6 +782,8 @@
 	if (vold != vnew)
 		mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), vnew);
 
+	local_irq_restore_hw_cond(flags);
+
 	return 0;
 }
 
arch/powerpc/sysdev/tsi108_pci.c +10 -0
diff -Naur linux-2.6.21.7.orig/arch/powerpc/sysdev/tsi108_pci.c linux-2.6.21.7/arch/powerpc/sysdev/tsi108_pci.c
@@ -249,7 +249,9 @@
 {
 	u_int irp_cfg;
 	int int_line = (irq - IRQ_PCI_INTAD_BASE);
+	unsigned long flags;
 
+	local_irq_save_hw_cond(flags);
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
 	mb();
 	irp_cfg |= (1 << int_line);	/* INTx_DIR = output */
@@ -257,19 +259,23 @@
 	tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL, irp_cfg);
 	mb();
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
+	local_irq_restore_hw_cond(flags);
 }
 
 static void tsi108_pci_int_unmask(u_int irq)
 {
 	u_int irp_cfg;
 	int int_line = (irq - IRQ_PCI_INTAD_BASE);
+	unsigned long flags;
 
+	local_irq_save_hw_cond(flags);
 	irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL);
 	mb();
 	irp_cfg &= ~(1 << int_line);
 	irp_cfg |= (3 << (8 + (int_line * 2)));
 	tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL, irp_cfg);
 	mb();
+	local_irq_restore_hw_cond(flags);
 }
 
 static void init_pci_source(void)
@@ -360,6 +366,9 @@
 
 static void tsi108_pci_irq_end(u_int irq)
 {
+	unsigned long flags;
+
+	local_irq_save_hw_cond(flags);
 	tsi108_pci_int_unmask(irq);
 
 	/* Enable interrupts from PCI block */
@@ -367,6 +376,7 @@
 			 tsi108_read_reg(TSI108_PCI_OFFSET +
 					 TSI108_PCI_IRP_ENABLE) |
 			 TSI108_PCI_IRP_ENABLE_P_INT);
+	local_irq_restore_hw_cond(flags);
 	mb();
 }
 
drivers/pci/htirq.c +1 -1
diff -Naur linux-2.6.21.7.orig/drivers/pci/htirq.c linux-2.6.21.7/drivers/pci/htirq.c
@@ -21,7 +21,7 @@
  * With multiple simultaneous hypertransport irq devices it might pay
  * to make this more fine grained.  But start with simple, stupid, and correct.
  */
-static DEFINE_SPINLOCK(ht_irq_lock);
+static IPIPE_DEFINE_SPINLOCK(ht_irq_lock);
 
 struct ht_irq_cfg {
 	struct pci_dev *dev;
drivers/serial/mpc52xx_uart.c +34 -0
diff -Naur linux-2.6.21.7.orig/drivers/serial/mpc52xx_uart.c linux-2.6.21.7/drivers/serial/mpc52xx_uart.c
@@ -803,6 +803,40 @@
 #endif
 
 
+#ifdef CONFIG_IPIPE
+
+#include <stdarg.h>
+
+void __ipipe_serial_debug(const char *fmt, ...)
+{
+	struct console *co = MPC52xx_PSC_CONSOLE;
+	unsigned long flags, count;
+	struct uart_port *port;
+	char buf[128];
+	va_list ap;
+
+	if (co->index < 0)
+		return;		/* No console. */
+
+	port = &mpc52xx_uart_ports[co->index];
+
+	if (!port->mapbase)
+		return;		/* Too early. */
+
+	va_start(ap, fmt);
+	vsprintf(buf, fmt, ap);
+	va_end(ap);
+	count = strlen(buf);
+
+	local_irq_save_hw(flags);
+	mpc52xx_console_write(co, buf, count);
+	local_irq_restore_hw(flags);
+}
+
+EXPORT_SYMBOL(__ipipe_serial_debug);
+
+#endif
+
 /* ======================================================================== */
 /* UART Driver                                                              */
 /* ======================================================================== */
include/asm-powerpc/hw_irq.h +132 -11

182 lines not on this page · raw message

include/asm-powerpc/ipipe_base.h +146 -0

146 lines not on this page · raw message

include/asm-powerpc/ipipe.h +182 -0

182 lines not on this page · raw message

include/asm-ppc/mmu_context.h +11 -1
diff -Naur linux-2.6.21.7.orig/include/asm-ppc/mmu_context.h linux-2.6.21.7/include/asm-ppc/mmu_context.h
@@ -153,7 +153,10 @@
  */
 static inline void destroy_context(struct mm_struct *mm)
 {
+	unsigned long flags;
+
 	preempt_disable();
+	local_irq_save_hw_cond(flags);
 	if (mm->context.id != NO_CONTEXT) {
 		clear_bit(mm->context.id, context_map);
 		mm->context.id = NO_CONTEXT;
@@ -161,6 +164,7 @@
 		atomic_inc(&nr_free_contexts);
 #endif
 	}
+ 	local_irq_restore_hw_cond(flags);
 	preempt_enable();
 }
 
@@ -193,7 +197,13 @@
  * After we have set current->mm to a new value, this activates
  * the context for the new mm so we see the new mappings.
  */
-#define activate_mm(active_mm, mm)   switch_mm(active_mm, mm, current)
+#define activate_mm(active_mm, mm)   \
+do { \
+	unsigned long flags; \
+	local_irq_save_hw_cond(flags); \
+	switch_mm(active_mm, mm, current); \
+	local_irq_restore_hw_cond(flags);	   \
+} while(0)
 
 extern void mmu_context_init(void);
 
include/linux/hardirq.h +2 -2
diff -Naur linux-2.6.21.7.orig/include/linux/hardirq.h linux-2.6.21.7/include/linux/hardirq.h
@@ -133,7 +133,7 @@
  */
 extern void irq_exit(void);
 
-#define nmi_enter()		do { lockdep_off(); __irq_enter(); } while (0)
-#define nmi_exit()		do { __irq_exit(); lockdep_on(); } while (0)
+#define nmi_enter()		do { if (ipipe_root_domain_p) { lockdep_off(); __irq_enter(); } } while (0)
+#define nmi_exit()		do { if (ipipe_root_domain_p) { __irq_exit(); lockdep_on(); } ] while (0)
 
 #endif /* LINUX_HARDIRQ_H */
include/linux/ipipe_base.h +77 -0

77 lines not on this page · raw message

include/linux/ipipe_compat.h +54 -0

54 lines not on this page · raw message

include/linux/ipipe.h +557 -0

557 lines not on this page · raw message

include/linux/ipipe_percpu.h +69 -0

69 lines not on this page · raw message

include/linux/ipipe_trace.h +65 -0

61 lines not on this page · raw message

include/linux/irq.h +6 -0
diff -Naur linux-2.6.21.7.orig/include/linux/irq.h linux-2.6.21.7/include/linux/irq.h

Lines of this file are not shown. View the raw message.

include/linux/kernel.h +6 -2
diff -Naur linux-2.6.21.7.orig/include/linux/kernel.h linux-2.6.21.7/include/linux/kernel.h

Lines of this file are not shown. View the raw message.

include/linux/linkage.h +4 -0
diff -Naur linux-2.6.21.7.orig/include/linux/linkage.h linux-2.6.21.7/include/linux/linkage.h

Lines of this file are not shown. View the raw message.

include/linux/mm.h +1 -0
diff -Naur linux-2.6.21.7.orig/include/linux/mm.h linux-2.6.21.7/include/linux/mm.h

Lines of this file are not shown. View the raw message.

include/linux/preempt.h +8 -4
diff -Naur linux-2.6.21.7.orig/include/linux/preempt.h linux-2.6.21.7/include/linux/preempt.h

Lines of this file are not shown. View the raw message.

include/linux/sched.h +16 -0
diff -Naur linux-2.6.21.7.orig/include/linux/sched.h linux-2.6.21.7/include/linux/sched.h

Lines of this file are not shown. View the raw message.

include/linux/smp.h +2 -0
diff -Naur linux-2.6.21.7.orig/include/linux/smp.h linux-2.6.21.7/include/linux/smp.h

Lines of this file are not shown. View the raw message.

include/linux/spinlock.h +117 -9

126 lines not on this page · raw message

include/linux/spinlock_types.h +14 -0
diff -Naur linux-2.6.21.7.orig/include/linux/spinlock_types.h linux-2.6.21.7/include/linux/spinlock_types.h

Lines of this file are not shown. View the raw message.

init/Kconfig +1 -0
diff -Naur linux-2.6.21.7.orig/init/Kconfig linux-2.6.21.7/init/Kconfig

Lines of this file are not shown. View the raw message.

init/main.c +8 -2
diff -Naur linux-2.6.21.7.orig/init/main.c linux-2.6.21.7/init/main.c

Lines of this file are not shown. View the raw message.

kernel/exit.c +1 -0
diff -Naur linux-2.6.21.7.orig/kernel/exit.c linux-2.6.21.7/kernel/exit.c

Lines of this file are not shown. View the raw message.

kernel/fork.c +10 -1
diff -Naur linux-2.6.21.7.orig/kernel/fork.c linux-2.6.21.7/kernel/fork.c

Lines of this file are not shown. View the raw message.

kernel/ipipe/core.c +1513 -0

1,513 lines not on this page · raw message

kernel/ipipe/Kconfig +25 -0
diff -Naur linux-2.6.21.7.orig/kernel/ipipe/Kconfig linux-2.6.21.7/kernel/ipipe/Kconfig

Lines of this file are not shown. View the raw message.

kernel/ipipe/Kconfig.debug +88 -0

88 lines not on this page · raw message

kernel/ipipe/Makefile +3 -0
diff -Naur linux-2.6.21.7.orig/kernel/ipipe/Makefile linux-2.6.21.7/kernel/ipipe/Makefile

Lines of this file are not shown. View the raw message.

kernel/ipipe/tracer.c +1294 -0

1,294 lines not on this page · raw message

kernel/irq/chip.c +129 -0

129 lines not on this page · raw message

kernel/Makefile +1 -0
diff -Naur linux-2.6.21.7.orig/kernel/Makefile linux-2.6.21.7/kernel/Makefile

Lines of this file are not shown. View the raw message.

kernel/printk.c +78 -0

78 lines not on this page · raw message

kernel/sched.c +64 -3

67 lines not on this page · raw message

kernel/signal.c +1 -0
diff -Naur linux-2.6.21.7.orig/kernel/signal.c linux-2.6.21.7/kernel/signal.c

Lines of this file are not shown. View the raw message.

kernel/spinlock.c +2 -2
diff -Naur linux-2.6.21.7.orig/kernel/spinlock.c linux-2.6.21.7/kernel/spinlock.c

Lines of this file are not shown. View the raw message.

kernel/sys.c +4 -2
diff -Naur linux-2.6.21.7.orig/kernel/sys.c linux-2.6.21.7/kernel/sys.c

Lines of this file are not shown. View the raw message.

lib/bust_spinlocks.c +3 -0
diff -Naur linux-2.6.21.7.orig/lib/bust_spinlocks.c linux-2.6.21.7/lib/bust_spinlocks.c

Lines of this file are not shown. View the raw message.

lib/ioremap.c +2 -2
diff -Naur linux-2.6.21.7.orig/lib/ioremap.c linux-2.6.21.7/lib/ioremap.c

Lines of this file are not shown. View the raw message.

lib/Kconfig.debug +2 -0
diff -Naur linux-2.6.21.7.orig/lib/Kconfig.debug linux-2.6.21.7/lib/Kconfig.debug

Lines of this file are not shown. View the raw message.

lib/smp_processor_id.c +3 -0
diff -Naur linux-2.6.21.7.orig/lib/smp_processor_id.c linux-2.6.21.7/lib/smp_processor_id.c

Lines of this file are not shown. View the raw message.

lib/spinlock_debug.c +18 -0
diff -Naur linux-2.6.21.7.orig/lib/spinlock_debug.c linux-2.6.21.7/lib/spinlock_debug.c

Lines of this file are not shown. View the raw message.

Makefile +4 -0
diff -Naur linux-2.6.21.7.orig/Makefile linux-2.6.21.7/Makefile

Lines of this file are not shown. View the raw message.

mm/memory.c +190 -33

223 lines not on this page · raw message

mm/mlock.c +2 -2
diff -Naur linux-2.6.21.7.orig/mm/mlock.c linux-2.6.21.7/mm/mlock.c

Lines of this file are not shown. View the raw message.

mm/vmalloc.c +1 -0
diff -Naur linux-2.6.21.7.orig/mm/vmalloc.c linux-2.6.21.7/mm/vmalloc.c

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.