>  
> +/*
> + * trigger a reschedule on all other CPUs:
> + */
> +extern void smp_send_reschedule_allbutself(void);
> +
> +/*
> + * trigger a reschedule on all other CPUs:
> + */
> +extern void smp_send_reschedule_allbutself(void);
> +

just to make sure the C compiler doesn't forget it ?
or maybe the parser is suffering from memory lapse ? ;)

>  
> -#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
> +#if defined(CONFIG_DEBUG_SPINLOCK_SLEEP) || defined(CONFIG_DEBUG_PREEMPT)

why this change? the change is for spinlock debugging.. why add preempt
to this?


>    void __might_sleep(char *file, int line);
>  # define might_sleep() \
>       do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0)
> @@ -198,6 +198,7 @@ extern void add_taint(unsigned);
>  /* Values used for system_state */
>  extern enum system_states {
>       SYSTEM_BOOTING,
> +     SYSTEM_BOOTING_SCHEDULER_OK,

what is this used for? your patch doesn't add users of this...

>       SYSTEM_RUNNING,
>       SYSTEM_HALT,
>       SYSTEM_POWER_OFF,
> --- linux-2.6.22.orig/init/main.c
> +++ linux-2.6.22/init/main.c
> @@ -438,6 +438,8 @@ static void noinline __init_refok rest_i
>  {
>       int pid;
>  
> +     system_state = SYSTEM_BOOTING_SCHEDULER_OK;
> +
>       kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND);
>       numa_default_policy();
>       pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES);
> --- linux-2.6.22.orig/lib/kernel_lock.c
> +++ linux-2.6.22/lib/kernel_lock.c
> @@ -35,22 +35,25 @@ DECLARE_MUTEX(kernel_sem);
>   * about recursion, both due to the down() and due to the enabling of
>   * preemption. schedule() will re-check the preemption flag after
>   * reacquiring the semaphore.
> + *
> + * Called with interrupts disabled.
>   */
>  int __lockfunc __reacquire_kernel_lock(void)
>  {
>       struct task_struct *task = current;
>       int saved_lock_depth = task->lock_depth;
>  
> +     local_irq_enable();

eh... if interrupts are off here that's a bad bug. Why work around it?

>       BUG_ON(saved_lock_depth < 0);
>  
>       task->lock_depth = -1;
> -     __preempt_enable_no_resched();
>  
>       down(&kernel_sem);
>  
> -     preempt_disable();
>       task->lock_depth = saved_lock_depth;
>  
> +     local_irq_disable();
> +

same here..

>  int __lockfunc __reacquire_kernel_lock(void)
>  {
> -     while (!_raw_spin_trylock(&kernel_flag)) {
> -             if (test_thread_flag(TIF_NEED_RESCHED))
> -                     return -EAGAIN;
> -             cpu_relax();
> -     }
> +     local_irq_enable();
> +     _raw_spin_lock(&kernel_flag);
> +     local_irq_disable();

are you sure you want this semantics change?



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to