All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: adeos-main <adeos-main@gna.org>
Cc: Philippe Gerum <rpm@xenomai.org>
Subject: [Adeos-main] [PATCH 4/5] remove legacy code
Date: Sun, 30 Dec 2007 00:13:18 +0100	[thread overview]
Message-ID: <4776D48E.7050002@domain.hid> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 469 bytes --]

This patch gets rid of code that is no longer needed or valid:

 - x86_64 APIC frequency is now delivered via ipipe_request_tickdev
 - __ipipe_tick_irq is maintained via ipipe_update_tick_evtdev also on
   x86_64
 - global_clock_event is no longer needed by ipipe_32.c
 - ipipe_tune_timer was dead code in x86_64 (there was no prototype in
   whatever header), and this arch does not really have a legacy code
   base to maintain, so kill this function

Jan

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: remove-legacy.patch --]
[-- Type: text/x-patch; name="remove-legacy.patch", Size: 4889 bytes --]

---
 arch/x86/kernel/apic_64.c       |    6 ------
 arch/x86/kernel/ipipe_32.c      |    2 --
 arch/x86/kernel/ipipe_64.c      |   10 +---------
 include/asm-x86/ipipe_64.h      |   21 +++++++++++----------
 include/asm-x86/ipipe_base_64.h |    4 ----
 5 files changed, 12 insertions(+), 31 deletions(-)

Index: linux-2.6.24-rc6-xeno/arch/x86/kernel/apic_64.c
===================================================================
--- linux-2.6.24-rc6-xeno.orig/arch/x86/kernel/apic_64.c
+++ linux-2.6.24-rc6-xeno/arch/x86/kernel/apic_64.c
@@ -939,9 +939,6 @@ static void __init calibrate_APIC_clock(
 
 	printk(KERN_INFO "Detected %d.%03d MHz APIC timer.\n",
 		result / 1000 / 1000, result / 1000 % 1000);
-#ifdef CONFIG_IPIPE
-	__ipipe_apic_timer_freq = result;
-#endif
 
 	/* Calculate the scaled math multiplication factor */
 	lapic_clockevent.mult = div_sc(result, NSEC_PER_SEC, 32);
@@ -970,9 +967,6 @@ void __init setup_boot_APIC_clock (void)
 	}
 
 	printk(KERN_INFO "Using local APIC timer interrupts.\n");
-#ifdef CONFIG_IPIPE
-	__ipipe_tick_irq = ipipe_apic_vector_irq(LOCAL_TIMER_VECTOR);
-#endif
 	calibrate_APIC_clock();
 
 	/*
Index: linux-2.6.24-rc6-xeno/arch/x86/kernel/ipipe_64.c
===================================================================
--- linux-2.6.24-rc6-xeno.orig/arch/x86/kernel/ipipe_64.c
+++ linux-2.6.24-rc6-xeno/arch/x86/kernel/ipipe_64.c
@@ -46,8 +46,7 @@
 
 asmlinkage void preempt_schedule_irq(void);
 
-int __ipipe_tick_irq;
-unsigned long __ipipe_apic_timer_freq;
+int __ipipe_tick_irq = TIMER_IRQ;
 
 DEFINE_PER_CPU(struct pt_regs, __ipipe_tick_regs);
 
@@ -102,12 +101,6 @@ int ipipe_get_sysinfo(struct ipipe_sysin
 	return 0;
 }
 
-int ipipe_tune_timer(unsigned long ns, int flags)
-{
-	printk(KERN_WARNING "I-pipe: %s is deprecated - no action taken\n", __FUNCTION__);
-	return -ENOSYS;
-}
-
 asmlinkage unsigned int do_IRQ(struct pt_regs *regs);
 asmlinkage void smp_apic_timer_interrupt(struct pt_regs *regs);
 asmlinkage void smp_spurious_interrupt(struct pt_regs *regs);
@@ -792,7 +785,6 @@ EXPORT_SYMBOL(ipipe_critical_enter);
 EXPORT_SYMBOL(ipipe_critical_exit);
 EXPORT_SYMBOL(ipipe_trigger_irq);
 EXPORT_SYMBOL(ipipe_get_sysinfo);
-EXPORT_SYMBOL(ipipe_tune_timer);
 
 EXPORT_SYMBOL_GPL(irq_desc);
 struct task_struct *__switch_to(struct task_struct *prev_p,
Index: linux-2.6.24-rc6-xeno/include/asm-x86/ipipe_64.h
===================================================================
--- linux-2.6.24-rc6-xeno.orig/include/asm-x86/ipipe_64.h
+++ linux-2.6.24-rc6-xeno/include/asm-x86/ipipe_64.h
@@ -79,13 +79,6 @@ extern unsigned cpu_khz;
 #define ipipe_tsc2ns(t)	(((t) * 1000UL) / (ipipe_cpu_freq() / 1000000UL))
 #define ipipe_tsc2us(t)	((t) / (ipipe_cpu_freq() / 1000000UL))
 
-/*
- * The following interface will be deprecated once generic clockevents
- * are supported by this architecture, at which point
- * ipipe_request_tickdev() should be used instead.
- */
-extern unsigned long __ipipe_apic_timer_freq;
-
 /* Private interface -- Internal use only */
 
 #define __ipipe_check_platform()	do { } while(0)
@@ -125,6 +118,15 @@ static inline unsigned long __ipipe_ffnz
       return ul;
 }
 
+#define ipipe_update_tick_evtdev(evtdev)				\
+	do {								\
+		if (strcmp((evtdev)->name, "lapic") == 0)		\
+			__ipipe_tick_irq =				\
+				ipipe_apic_vector_irq(LOCAL_TIMER_VECTOR); \
+		else							\
+			__ipipe_tick_irq = TIMER_IRQ;			\
+	} while (0)
+
 struct irq_desc;
 
 void __ipipe_ack_edge_irq(unsigned irq, struct irq_desc *desc);
@@ -236,10 +238,9 @@ int __ipipe_check_tickdev(const char *de
 
 #else /* !CONFIG_IPIPE */
 
-#define task_hijacked(p)	0
+#define ipipe_update_tick_evtdev(evtdev)	do { } while (0)
+#define task_hijacked(p)			0
 
 #endif /* CONFIG_IPIPE */
 
-#define ipipe_update_tick_evtdev(evtdev)	do { } while (0)
-
 #endif	/* !__X86_IPIPE_64_H */
Index: linux-2.6.24-rc6-xeno/include/asm-x86/ipipe_base_64.h
===================================================================
--- linux-2.6.24-rc6-xeno.orig/include/asm-x86/ipipe_base_64.h
+++ linux-2.6.24-rc6-xeno/include/asm-x86/ipipe_base_64.h
@@ -182,8 +182,4 @@ static inline unsigned long __ipipe_test
 
 #endif /* !__ASSEMBLY__ */
 
-/* Arch-dependent features */
-
-#define __IPIPE_FEATURE_APIC_TIMER_FREQ  1
-
 #endif	/* !__X86_IPIPE_BASE_64_H */
Index: linux-2.6.24-rc6-xeno/arch/x86/kernel/ipipe_32.c
===================================================================
--- linux-2.6.24-rc6-xeno.orig/arch/x86/kernel/ipipe_32.c
+++ linux-2.6.24-rc6-xeno/arch/x86/kernel/ipipe_32.c
@@ -48,8 +48,6 @@
 #include <mach_ipi.h>
 #endif	/* CONFIG_X86_LOCAL_APIC */
 
-extern struct clock_event_device *global_clock_event;
-
 int __ipipe_tick_irq = TIMER_IRQ;
 
 DEFINE_PER_CPU(struct pt_regs, __ipipe_tick_regs);

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]

             reply	other threads:[~2007-12-29 23:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-29 23:13 Jan Kiszka [this message]
2007-12-30 10:52 ` [Adeos-main] [PATCH 4/5] remove legacy code Philippe Gerum
2007-12-30 17:15   ` Jan Kiszka
2007-12-30 19:55     ` Philippe Gerum
2007-12-30 23:31       ` Jan Kiszka
2007-12-31 16:15         ` Philippe Gerum
2007-12-31 16:34           ` Philippe Gerum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4776D48E.7050002@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=adeos-main@gna.org \
    --cc=rpm@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.