Module: xenomai-rpm Branch: for-upstream Commit: 973febd9b7a06b737178390e13df51472f6be596 URL: http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=973febd9b7a06b737178390e13df51472f6be596
Author: Philippe Gerum <r...@xenomai.org> Date: Wed Oct 6 08:45:29 2010 +0200 powerpc: upgrade I-pipe support to 2.6.35.7-powerpc-2.11-02 --- ... => adeos-ipipe-2.6.35.7-powerpc-2.11-02.patch} | 119 +++++++++++++------- 1 files changed, 76 insertions(+), 43 deletions(-) diff --git a/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.35.7-powerpc-2.11-01.patch b/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.35.7-powerpc-2.11-02.patch similarity index 99% rename from ksrc/arch/powerpc/patches/adeos-ipipe-2.6.35.7-powerpc-2.11-01.patch rename to ksrc/arch/powerpc/patches/adeos-ipipe-2.6.35.7-powerpc-2.11-02.patch index 698eb33..bfe6db2 100644 --- a/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.35.7-powerpc-2.11-01.patch +++ b/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.35.7-powerpc-2.11-02.patch @@ -54,6 +54,16 @@ index 2031a28..ec96063 100644 config HIGHMEM bool "High memory support" depends on PPC32 +diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile +index b2e3635..371a116 100644 +--- a/arch/powerpc/Makefile ++++ b/arch/powerpc/Makefile +@@ -263,3 +263,5 @@ checkbin: + + CLEAN_FILES += $(TOUT) + ++ ++drivers-$(CONFIG_XENOMAI) += arch/powerpc/xenomai/ diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index fae8192..f11ef26 100644 --- a/arch/powerpc/boot/Makefile @@ -265,7 +275,7 @@ index bd100fc..8fa1901 100644 * or should we not care like we do now ? --BenH. diff --git a/arch/powerpc/include/asm/ipipe.h b/arch/powerpc/include/asm/ipipe.h new file mode 100644 -index 0000000..776b916 +index 0000000..2e7f178 --- /dev/null +++ b/arch/powerpc/include/asm/ipipe.h @@ -0,0 +1,277 @@ @@ -316,10 +326,10 @@ index 0000000..776b916 +#include <asm/paca.h> +#endif + -+#define IPIPE_ARCH_STRING "2.11-01" ++#define IPIPE_ARCH_STRING "2.11-02" +#define IPIPE_MAJOR_NUMBER 2 +#define IPIPE_MINOR_NUMBER 11 -+#define IPIPE_PATCH_NUMBER 1 ++#define IPIPE_PATCH_NUMBER 2 + +#ifdef CONFIG_IPIPE_WANT_PREEMPTIBLE_SWITCH + @@ -548,10 +558,10 @@ index 0000000..776b916 +#endif /* !__ASM_POWERPC_IPIPE_H */ diff --git a/arch/powerpc/include/asm/ipipe_base.h b/arch/powerpc/include/asm/ipipe_base.h new file mode 100644 -index 0000000..eb3867a +index 0000000..145d2cd --- /dev/null +++ b/arch/powerpc/include/asm/ipipe_base.h -@@ -0,0 +1,157 @@ +@@ -0,0 +1,161 @@ +/* -*- linux-c -*- + * include/asm-powerpc/ipipe_base.h + * @@ -623,6 +633,10 @@ index 0000000..eb3867a +#define IPIPE_MSG_IPI_OFFSET (IPIPE_CRITICAL_IPI) + +#define ipipe_processor_id() raw_smp_processor_id() ++ ++#define ipipe_ipi_p(ipi) \ ++ ((ipi) >= IPIPE_SERVICE_IPI0 && (ipi) <= IPIPE_SERVICE_IPI4) ++ +#else /* !CONFIG_SMP */ +#define ipipe_processor_id() 0 +#endif /* CONFIG_SMP */ @@ -2284,10 +2298,10 @@ index 5328709..8c3a2b7 100644 sync diff --git a/arch/powerpc/kernel/ipipe.c b/arch/powerpc/kernel/ipipe.c new file mode 100644 -index 0000000..89c9726 +index 0000000..825dc26 --- /dev/null +++ b/arch/powerpc/kernel/ipipe.c -@@ -0,0 +1,794 @@ +@@ -0,0 +1,760 @@ +/* -*- linux-c -*- + * linux/arch/powerpc/kernel/ipipe.c + * @@ -2350,16 +2364,6 @@ index 0000000..89c9726 + +#ifdef CONFIG_SMP + -+static cpumask_t __ipipe_cpu_sync_map; -+ -+static cpumask_t __ipipe_cpu_lock_map; -+ -+static IPIPE_DEFINE_SPINLOCK(__ipipe_cpu_barrier); -+ -+static atomic_t __ipipe_critical_count = ATOMIC_INIT(0); -+ -+static void (*__ipipe_cpu_sync) (void); -+ +static DEFINE_PER_CPU(struct ipipe_ipi_struct, ipipe_ipi_message); + +unsigned int __ipipe_ipi_irq = NR_IRQS + 1; /* dummy value */ @@ -2368,30 +2372,6 @@ index 0000000..89c9726 +cpumask_t __ipipe_dbrk_pending; /* pending debugger break IPIs */ +#endif + -+/* Always called with hw interrupts off. */ -+ -+void __ipipe_do_critical_sync(unsigned irq, void *cookie) -+{ -+ cpu_set(ipipe_processor_id(), __ipipe_cpu_sync_map); -+ -+ /* -+ * Now we are in sync with the lock requestor running on another -+ * CPU. Enter a spinning wait until he releases the global -+ * lock. -+ */ -+ spin_lock(&__ipipe_cpu_barrier); -+ -+ /* Got it. Now get out. */ -+ -+ if (__ipipe_cpu_sync) -+ /* Call the sync routine if any. */ -+ __ipipe_cpu_sync(); -+ -+ spin_unlock(&__ipipe_cpu_barrier); -+ -+ cpu_clear(ipipe_processor_id(), __ipipe_cpu_sync_map); -+} -+ +void __ipipe_hook_critical_ipi(struct ipipe_domain *ipd) +{ + ipd->irqs[IPIPE_CRITICAL_IPI].acknowledge = NULL; @@ -5140,6 +5120,16 @@ index 0038fb7..e63e062 100644 } static struct uic * __init uic_init_one(struct device_node *node) +diff --git a/drivers/Makefile b/drivers/Makefile +index 91874e0..c146a59 100644 +--- a/drivers/Makefile ++++ b/drivers/Makefile +@@ -113,3 +113,5 @@ obj-$(CONFIG_VLYNQ) += vlynq/ + obj-$(CONFIG_STAGING) += staging/ + obj-y += platform/ + obj-y += ieee802154/ ++ ++obj-$(CONFIG_XENOMAI) += xenomai/ diff --git a/drivers/pci/htirq.c b/drivers/pci/htirq.c index 98abf8b..7cb0a86 100644 --- a/drivers/pci/htirq.c @@ -7406,7 +7396,7 @@ index b14f6a9..e400972 100644 #define arch_read_can_lock(lock) (((void)(lock), 1)) diff --git a/init/Kconfig b/init/Kconfig -index 5cff9a9..6ce2285 100644 +index 5cff9a9..711fc35 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -86,6 +86,7 @@ config CROSS_COMPILE @@ -7417,6 +7407,43 @@ index 5cff9a9..6ce2285 100644 help Append an extra string to the end of your kernel version. This will show up when you type uname, for example. +@@ -1284,3 +1285,36 @@ config PADATA + bool + + source "kernel/Kconfig.locks" ++ ++menu "Real-time sub-system" ++ ++comment "WARNING! You enabled APM, CPU Frequency scaling or ACPI 'processor'" ++ depends on APM || CPU_FREQ || ACPI_PROCESSOR ++comment "option. These options are known to cause troubles with Xenomai." ++ depends on APM || CPU_FREQ || ACPI_PROCESSOR ++ ++comment "NOTE: Xenomai conflicts with PC speaker support." ++ depends on !X86_TSC && X86 && INPUT_PCSPKR ++comment "(menu Device Drivers/Input device support/Miscellaneous devices)" ++ depends on !X86_TSC && X86 && INPUT_PCSPKR ++ ++comment "NOTE: Xenomai needs either X86_LOCAL_APIC enabled or HPET_TIMER disabled." ++ depends on (!X86_LOCAL_APIC || !X86_TSC) && X86 && HPET_TIMER ++comment "(menu Processor type and features)" ++ depends on (!X86_LOCAL_APIC || !X86_TSC) && X86 && HPET_TIMER ++ ++config XENOMAI ++ depends on ((X86_TSC || !X86 || !INPUT_PCSPKR) && (!HPET_TIMER || !X86 || (X86_LOCAL_APIC && X86_TSC))) ++ bool "Xenomai" ++ default y ++ select IPIPE ++ ++ help ++ Xenomai is a real-time extension to the Linux kernel. Note ++ that Xenomai relies on Adeos interrupt pipeline (CONFIG_IPIPE ++ option) to be enabled, so enabling this option selects the ++ CONFIG_IPIPE option. ++ ++source "arch/powerpc/xenomai/Kconfig" ++ ++endmenu diff --git a/init/main.c b/init/main.c index a42fdf4..149d8ea 100644 --- a/init/main.c @@ -7459,7 +7486,7 @@ index a42fdf4..149d8ea 100644 do_initcalls(); } diff --git a/kernel/Makefile b/kernel/Makefile -index 057472f..c456c33 100644 +index 057472f..b9b0b74 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -86,6 +86,7 @@ obj-$(CONFIG_TREE_PREEMPT_RCU) += rcutree.o @@ -7470,6 +7497,12 @@ index 057472f..c456c33 100644 obj-$(CONFIG_SYSCTL) += utsname_sysctl.o obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o +@@ -136,3 +137,5 @@ quiet_cmd_timeconst = TIMEC $@ + targets += timeconst.h + $(obj)/timeconst.h: $(src)/timeconst.pl FORCE + $(call if_changed,timeconst) ++ ++obj-$(CONFIG_XENOMAI) += xenomai/ diff --git a/kernel/exit.c b/kernel/exit.c index ac90425..a491bc3 100644 --- a/kernel/exit.c _______________________________________________ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git