lkml.org 
[lkml]   [2002]   [Sep]   [4]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 3 Sep 2002 21:45:09 -0700 (PDT)
FromAndre Hedrick <>
SubjectRe: [RFD]replace save_flags();cli(); with spin_lock_irqsave
well I have a few places where

save_flags();sti() is called.

# define save_and_sti(x)        local_irq_save_on(x)

This is totally funky but until it can we cleared out the annoying
ide__sti() thing is painful.

On Fri, 16 Aug 2002 pwaechtler@mac.com wrote:

> I have a large patch (>130KB) against 2.5.31 converting most of oss 
> sound drivers to
> use spinlocks instead of cli() - so that they compile on SMP systems.
> 
> Most changes are trivial but I think some drivers are simply not SMP 
> safe. I hope I haven't
> break any drivers. Since one can argue that OSS in the kernel gets 
> obsolete and there are
> no maintainers for individual drivers I would  prefer NOT to split the 
> patches for each
> individual driver.
> 
> Some like the GUS driver and the dmabuf.c were more complicated - I had 
> to change the
> locking a lot. Now if I grep through the kernel source with
> 
> /usr/src/linux-2.5.31:>find . -name "*.c"| xargs egrep 'cli[ \t]*\(\)' | 
> wc -l
>     1838
> 
> Is the usage of cli() really obsolete? Will all occurences will be fixed 
> as stated in
> 
> /usr/src/linux-2.5.31/include/linux/interrupt.h
> /*
>   * Temporary defines for UP kernels, until all code gets fixed.
>   */
> #if !CONFIG_SMP
> # define cli()                  local_irq_disable()
> # define sti()                  local_irq_enable()
> # define save_flags(x)          local_irq_save(x)
> # define restore_flags(x)       local_irq_restore(x)
> # define save_and_cli(x)        local_irq_save_off(x)
> #endif
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

Andre Hedrick
LAD Storage Consulting Group

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

\
 
 \ /
  Last update: 2005-03-22 12:28    [from the cache]
©2003-2008