Messages in this thread Patch in this message | | | Date | Thu, 11 Nov 2004 21:03:09 -0800 | Subject | Re: [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm3-V0.7.25-1 | From | Bill Huey (hui) <> |
| |
On Thu, Nov 11, 2004 at 08:08:45PM -0800, Bill Huey wrote: > Patch to get rudimentary kgdb support working.
Resent with some contamination removed from it.
bill
diff -rwu linux.voluntary.virgin/arch/i386/Kconfig.kgdb linux.voluntary/arch/i386/Kconfig.kgdb --- linux.voluntary.virgin/arch/i386/Kconfig.kgdb 2004-11-11 17:05:32.000000000 -0800 +++ linux.voluntary/arch/i386/Kconfig.kgdb 2004-11-11 19:44:29.000000000 -0800 @@ -1,6 +1,6 @@ config KGDB bool "Include kgdb kernel debugger" - depends on DEBUG_KERNEL && !KPROBES && !PREEMPT_RT + depends on DEBUG_KERNEL && !KPROBES help If you say Y here, the system will be compiled with the debug option (-g) and a debugging stub will be included in the diff -rwu linux.voluntary.virgin/arch/i386/kernel/kgdb_stub.c linux.voluntary/arch/i386/kernel/kgdb_stub.c --- linux.voluntary.virgin/arch/i386/kernel/kgdb_stub.c 2004-11-11 17:05:32.000000000 -0800 +++ linux.voluntary/arch/i386/kernel/kgdb_stub.c 2004-11-11 17:11:13.000000000 -0800 @@ -365,8 +365,8 @@ #ifdef CONFIG_SMP static int in_kgdb_called; -static spinlock_t waitlocks[MAX_NO_CPUS] = - {[0 ... MAX_NO_CPUS - 1] = SPIN_LOCK_UNLOCKED }; +static raw_spinlock_t waitlocks[MAX_NO_CPUS] = + {[0 ... MAX_NO_CPUS - 1] = RAW_SPIN_LOCK_UNLOCKED }; /* * The following array has the thread pointer of each of the "other" * cpus. We make it global so it can be seen by gdb. @@ -374,9 +374,9 @@ volatile int in_kgdb_entry_log[MAX_NO_CPUS]; volatile struct pt_regs *in_kgdb_here_log[MAX_NO_CPUS]; /* -static spinlock_t continuelocks[MAX_NO_CPUS]; +static raw_spinlock_t continuelocks[MAX_NO_CPUS]; */ -spinlock_t kgdb_spinlock = SPIN_LOCK_UNLOCKED; +raw_spinlock_t kgdb_spinlock = RAW_SPIN_LOCK_UNLOCKED; /* waiters on our spinlock plus us */ static atomic_t spinlock_waiters = ATOMIC_INIT(1); static int spinlock_count = 0; @@ -2404,7 +2404,7 @@ void kgdb_tstamp(int line, char *source, int data0, int data1) { - static spinlock_t ts_spin = SPIN_LOCK_UNLOCKED; + static raw_spinlock_t ts_spin = RAW_SPIN_LOCK_UNLOCKED; int flags; kgdb_local_irq_save(flags); spin_lock(&ts_spin); diff -rwu linux.voluntary.virgin/arch/i386/kernel/timers/timer_hpet.c linux.voluntary/arch/i386/kernel/timers/timer_hpet.c --- linux.voluntary.virgin/arch/i386/kernel/timers/timer_hpet.c 2004-11-11 17:05:31.000000000 -0800 +++ linux.voluntary/arch/i386/kernel/timers/timer_hpet.c 2004-11-11 17:11:13.000000000 -0800 @@ -49,7 +49,9 @@ cyc2ns_scale = (1000 << CYC2NS_SCALE_FACTOR)/cpu_mhz; } -static inline unsigned long long cycles_2_ns(unsigned long long cyc) +//static inline +//#error +unsigned long long cycles_2_ns(unsigned long long cyc) { return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR; } diff -rwu linux.voluntary.virgin/arch/i386/lib/kgdb_serial.c linux.voluntary/arch/i386/lib/kgdb_serial.c --- linux.voluntary.virgin/arch/i386/lib/kgdb_serial.c 2004-11-11 17:05:32.000000000 -0800 +++ linux.voluntary/arch/i386/lib/kgdb_serial.c 2004-11-11 17:11:13.000000000 -0800 @@ -104,9 +104,9 @@ * but we will just depend on the uart status to help keep that straight. */ -static spinlock_t uart_interrupt_lock = SPIN_LOCK_UNLOCKED; +static raw_spinlock_t uart_interrupt_lock = RAW_SPIN_LOCK_UNLOCKED; #ifdef CONFIG_SMP -extern spinlock_t kgdb_spinlock; +extern raw_spinlock_t kgdb_spinlock; #endif static int @@ -343,7 +343,7 @@ */ int kgdb_in_isr = 0; int kgdb_in_lsr = 0; -extern spinlock_t kgdb_spinlock; +extern raw_spinlock_t kgdb_spinlock; /* Caller takes needed protections */ @@ -381,7 +381,7 @@ } /* tty_getDebugChar */ static int count = 3; -static spinlock_t one_at_atime = SPIN_LOCK_UNLOCKED; +static raw_spinlock_t one_at_atime = RAW_SPIN_LOCK_UNLOCKED; static int __init kgdb_enable_ints(void) | |