All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] heres a go at an adeos-ipipe-2.6.15-i386-1.1-01.patch
@ 2006-01-05  2:43 Jim Cromie
  2006-01-05 13:53 ` Philippe Gerum
  0 siblings, 1 reply; 12+ messages in thread
From: Jim Cromie @ 2006-01-05  2:43 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 570 bytes --]

hi Phillipe, everyone,

happy 06 !

Out of curiosity, I applied adeos-ipipe-2.6.14-i386-1.1-01.patch on top 
of 15.

the rejects were small, and simple enough looking, that even
a lazy sod like myself might manually fix them, so I did.

whats more, it built clean and booted !
I havent done anything more demanding than ls, df, etc,
but hey, low hanging fruit tastes just as good / even better ;-)

So heres hoping that you've not started this particular thankless task,
and Ive saved your cycles for something more dependent on your 
particular talents.

enjoy.
jimc



[-- Attachment #2: diff.try-15-ipipe-101.20060104.170829.bz2 --]
[-- Type: application/x-bzip, Size: 28567 bytes --]

[-- Attachment #3: try-15-ipipe-101-rejects --]
[-- Type: text/plain, Size: 5057 bytes --]

./arch/i386/kernel/io_apic.c.rej
./include/linux/preempt.h.rej
./init/main.c.rej
./kernel/irq/handle.c.rej
./kernel/Makefile.rej
***************
*** 1313,1322 ****
  	/*
  	 * Add it to the IO-APIC irq-routing table:
  	 */
- 	spin_lock_irqsave(&ioapic_lock, flags);
  	io_apic_write(0, 0x11+2*pin, *(((int *)&entry)+1));
  	io_apic_write(0, 0x10+2*pin, *(((int *)&entry)+0));
- 	spin_unlock_irqrestore(&ioapic_lock, flags);
  
  	enable_8259A_irq(0);
  }
--- 1315,1324 ----
  	/*
  	 * Add it to the IO-APIC irq-routing table:
  	 */
+ 	spin_lock_irqsave_hw(&ioapic_lock, flags);
  	io_apic_write(0, 0x11+2*pin, *(((int *)&entry)+1));
  	io_apic_write(0, 0x10+2*pin, *(((int *)&entry)+0));
+ 	spin_unlock_irqrestore_hw(&ioapic_lock, flags);
  
  	enable_8259A_irq(0);
  }
***************
*** 13,53 ****
    extern void fastcall add_preempt_count(int val);
    extern void fastcall sub_preempt_count(int val);
  #else
- # define add_preempt_count(val)	do { preempt_count() += (val); } while (0)
- # define sub_preempt_count(val)	do { preempt_count() -= (val); } while (0)
  #endif
  
- #define inc_preempt_count() add_preempt_count(1)
- #define dec_preempt_count() sub_preempt_count(1)
  
- #define preempt_count()	(current_thread_info()->preempt_count)
  
  #ifdef CONFIG_PREEMPT
  
  asmlinkage void preempt_schedule(void);
  
- #define preempt_disable() \
- do { \
- 	inc_preempt_count(); \
- 	barrier(); \
  } while (0)
  
- #define preempt_enable_no_resched() \
- do { \
- 	barrier(); \
- 	dec_preempt_count(); \
  } while (0)
  
- #define preempt_check_resched() \
- do { \
- 	if (unlikely(test_thread_flag(TIF_NEED_RESCHED))) \
- 		preempt_schedule(); \
  } while (0)
  
- #define preempt_enable() \
- do { \
- 	preempt_enable_no_resched(); \
- 	preempt_check_resched(); \
  } while (0)
  
  #else
--- 13,70 ----
    extern void fastcall add_preempt_count(int val);
    extern void fastcall sub_preempt_count(int val);
  #else
+ #define add_preempt_count(val)	do { preempt_count() += (val); } while (0)
+ #define sub_preempt_count(val)	do { preempt_count() -= (val); } while (0)
  #endif
  
+ #define inc_preempt_count()	add_preempt_count(1)
+ #define dec_preempt_count()	sub_preempt_count(1)
  
+ #define preempt_count()		(current_thread_info()->preempt_count)
  
  #ifdef CONFIG_PREEMPT
  
  asmlinkage void preempt_schedule(void);
  
+ #ifdef CONFIG_IPIPE
+ 
+ #include <asm/ipipe.h>
+ 
+ extern struct ipipe_domain *ipipe_percpu_domain[], *ipipe_root_domain;
+ 
+ #define ipipe_preempt_guard()	(ipipe_percpu_domain[ipipe_processor_id()] == ipipe_root_domain)
+ #else
+ #define ipipe_preempt_guard()	1
+ #endif
+ 
+ #define preempt_disable()						\
+ do {									\
+ 	if (ipipe_preempt_guard()) {					\
+ 		inc_preempt_count();					\
+ 		barrier();						\
+ 	}								\
  } while (0)
  
+ #define preempt_enable_no_resched()					\
+ do {									\
+ 	if (ipipe_preempt_guard()) {					\
+ 		barrier();						\
+ 		dec_preempt_count();					\
+ 	}								\
  } while (0)
  
+ #define preempt_check_resched()						\
+ do {									\
+ 	if (ipipe_preempt_guard()) {					\
+ 		if (unlikely(test_thread_flag(TIF_NEED_RESCHED)))	\
+ 			preempt_schedule();				\
+ 	}								\
  } while (0)
  
+ #define preempt_enable()						\
+ do {									\
+ 	preempt_enable_no_resched();					\
+ 	preempt_check_resched();					\
  } while (0)
  
  #else
***************
*** 402,407 ****
  	 */
  	schedule();
  
  	cpu_idle();
  } 
  
--- 402,408 ----
  	 */
  	schedule();
  
+  	ipipe_reset_stats();
  	cpu_idle();
  } 
  
***************
*** 117,130 ****
  		/*
  		 * No locking required for CPU-local interrupts:
  		 */
  		desc->handler->ack(irq);
  		action_ret = handle_IRQ_event(irq, regs, desc->action);
  		desc->handler->end(irq);
  		return 1;
  	}
  
  	spin_lock(&desc->lock);
  	desc->handler->ack(irq);
  	/*
  	 * REPLAY is when Linux resends an IRQ that was dropped earlier
  	 * WAITING is used by probe to mark irqs that are being tested
--- 128,145 ----
  		/*
  		 * No locking required for CPU-local interrupts:
  		 */
+ #ifndef CONFIG_IPIPE
  		desc->handler->ack(irq);
+ #endif /* CONFIG_IPIPE */
  		action_ret = handle_IRQ_event(irq, regs, desc->action);
  		desc->handler->end(irq);
  		return 1;
  	}
  
  	spin_lock(&desc->lock);
+ #ifndef CONFIG_IPIPE
  	desc->handler->ack(irq);
+ #endif /* CONFIG_IPIPE */
  	/*
  	 * REPLAY is when Linux resends an IRQ that was dropped earlier
  	 * WAITING is used by probe to mark irqs that are being tested
***************
*** 32,37 ****
  obj-$(CONFIG_GENERIC_HARDIRQS) += irq/
  obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
  obj-$(CONFIG_SECCOMP) += seccomp.o
  
  ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y)
  # According to Alan Modra <alan@domain.hid>, the -fno-omit-frame-pointer is
--- 32,38 ----
  obj-$(CONFIG_GENERIC_HARDIRQS) += irq/
  obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
  obj-$(CONFIG_SECCOMP) += seccomp.o
+ obj-$(CONFIG_IPIPE) += ipipe/
  
  ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y)
  # According to Alan Modra <alan@domain.hid>, the -fno-omit-frame-pointer is

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [Xenomai-core] heres a go at an adeos-ipipe-2.6.15-i386-1.1-01.patch
@ 2006-01-06 21:32 Kent Borg
  2006-01-07  7:52 ` Jim Cromie
  0 siblings, 1 reply; 12+ messages in thread
From: Kent Borg @ 2006-01-06 21:32 UTC (permalink / raw)
  To: xenomai

Jim Cromie posted a patch attempt for 2.6.15 (yeah!), and the patch
applied, but it doesn't compile for me:

  [...]
    LD      init/built-in.o
    LD      .tmp_vmlinux1
  arch/i386/kernel/built-in.o: In function `__ipipe_sync_stage':
  : undefined reference to `ret_from_intr'
  arch/i386/kernel/built-in.o: In function `__ipipe_sync_stage':
  : undefined reference to `ret_from_intr'
  make: *** [.tmp_vmlinux1] Error 1
  ~/linux-2.6.15$ 

For a .config I started with the stock Ubuntu 2.6.12-10-686 config
file and then took the defaults for all the oldconfig questions.

Suggestions?


Thanks,

-kb



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-01-08 16:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-05  2:43 [Xenomai-core] heres a go at an adeos-ipipe-2.6.15-i386-1.1-01.patch Jim Cromie
2006-01-05 13:53 ` Philippe Gerum
  -- strict thread matches above, loose matches on Subject: below --
2006-01-06 21:32 Kent Borg
2006-01-07  7:52 ` Jim Cromie
2006-01-07  8:35   ` Hannes Mayer
2006-01-07 11:36   ` Philippe Gerum
2006-01-07 16:42   ` Kent Borg
2006-01-07 19:41     ` Philippe Gerum
2006-01-07 21:44       ` Jim Cromie
2006-01-07 22:16         ` Philippe Gerum
2006-01-08 10:48           ` Philippe Gerum
2006-01-08 16:08       ` Kent Borg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.