All of lore.kernel.org
 help / color / mirror / Atom feed
* I386 cli
@ 2002-10-22 20:01 David Grothe
  2002-10-22 20:08 ` erich
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: David Grothe @ 2002-10-22 20:01 UTC (permalink / raw)
  To: Linux Kernel Mailing List

In 2.5.41every architecture except Intel 386 has a "#define cli 
<something>" in its asm-arch/system.h file.  Is there supposed to be such a 
define in asm-i386/system.h?  If not, where does the "official" definition 
of cli() live for Intel?  Or what is the include file that one needs to 
pick it up?  I can't find it.
Thanks,
Dave


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

* Re: I386 cli
  2002-10-22 20:01 I386 cli David Grothe
@ 2002-10-22 20:08 ` erich
  2002-10-22 20:46   ` Vojtech Pavlik
  2002-10-22 20:48   ` erich
  2002-10-22 20:10 ` Vojtech Pavlik
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 11+ messages in thread
From: erich @ 2002-10-22 20:08 UTC (permalink / raw)
  To: David Grothe; +Cc: Linux Kernel Mailing List


David Grothe <dave@gcom.com> wrote:

> In 2.5.41every architecture except Intel 386 has a "#define cli 
> <something>" in its asm-arch/system.h file.  Is there supposed to be such a 
> define in asm-i386/system.h?  If not, where does the "official" definition 
> of cli() live for Intel?  Or what is the include file that one needs to 
> pick it up?  I can't find it.

I'm sure there is no definition because "cli" is the native assembler
instruction on x86.

--
    Erich Stefan Boleyn     <erich@uruk.org>     http://www.uruk.org/
"Reality is truly stranger than fiction; Probably why fiction is so popular"

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

* Re: I386 cli
  2002-10-22 20:01 I386 cli David Grothe
  2002-10-22 20:08 ` erich
@ 2002-10-22 20:10 ` Vojtech Pavlik
  2002-10-22 20:14 ` Arjan van de Ven
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Vojtech Pavlik @ 2002-10-22 20:10 UTC (permalink / raw)
  To: David Grothe; +Cc: Linux Kernel Mailing List

On Tue, Oct 22, 2002 at 03:01:47PM -0500, David Grothe wrote:
> In 2.5.41every architecture except Intel 386 has a "#define cli 
> <something>" in its asm-arch/system.h file.  Is there supposed to be such a 
> define in asm-i386/system.h?  If not, where does the "official" definition 
> of cli() live for Intel?  Or what is the include file that one needs to 
> pick it up?  I can't find it.

cli() is dead.

-- 
Vojtech Pavlik
SuSE Labs

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

* Re: I386 cli
  2002-10-22 20:01 I386 cli David Grothe
  2002-10-22 20:08 ` erich
  2002-10-22 20:10 ` Vojtech Pavlik
@ 2002-10-22 20:14 ` Arjan van de Ven
  2002-10-22 20:19 ` Sam Ravnborg
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Arjan van de Ven @ 2002-10-22 20:14 UTC (permalink / raw)
  To: David Grothe; +Cc: Linux Kernel Mailing List

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

On Tue, 2002-10-22 at 22:01, David Grothe wrote:
> In 2.5.41every architecture except Intel 386 has a "#define cli 
> <something>" in its asm-arch/system.h file.  Is there supposed to be such a 
> define in asm-i386/system.h?  If not, where does the "official" definition 
> of cli() live for Intel?  Or what is the include file that one needs to 
> pick it up?  I can't find it.

cli no longer exists in the kernel
the other architectures have a broken definition probably that needs to
go away as well.




[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: I386 cli
  2002-10-22 20:01 I386 cli David Grothe
                   ` (2 preceding siblings ...)
  2002-10-22 20:14 ` Arjan van de Ven
@ 2002-10-22 20:19 ` Sam Ravnborg
  2002-10-22 21:27   ` David Grothe
  2002-10-22 20:29 ` Alan Cox
  2002-10-23 12:02 ` Richard B. Johnson
  5 siblings, 1 reply; 11+ messages in thread
From: Sam Ravnborg @ 2002-10-22 20:19 UTC (permalink / raw)
  To: David Grothe, Ingo Molnar; +Cc: Linux Kernel Mailing List

On Tue, Oct 22, 2002 at 03:01:47PM -0500, David Grothe wrote:
> In 2.5.41every architecture except Intel 386 has a "#define cli 
> <something>" in its asm-arch/system.h file.  Is there supposed to be such a 
> define in asm-i386/system.h?  If not, where does the "official" definition 
> of cli() live for Intel?  Or what is the include file that one needs to 
> pick it up?  I can't find it.

I would advise you to read: Documentation/cli-sti-removal.txt
[I recall someone mentioned this documents were slightly out-dated - Ingo?]

The short version is that cli() is no loger valid, drivers using it does not compile.

	Sam

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

* Re: I386 cli
  2002-10-22 20:01 I386 cli David Grothe
                   ` (3 preceding siblings ...)
  2002-10-22 20:19 ` Sam Ravnborg
@ 2002-10-22 20:29 ` Alan Cox
  2002-10-23 12:02 ` Richard B. Johnson
  5 siblings, 0 replies; 11+ messages in thread
From: Alan Cox @ 2002-10-22 20:29 UTC (permalink / raw)
  To: David Grothe; +Cc: Linux Kernel Mailing List

On Tue, 2002-10-22 at 21:01, David Grothe wrote:
> In 2.5.41every architecture except Intel 386 has a "#define cli 
> <something>" in its asm-arch/system.h file.  Is there supposed to be such a 
> define in asm-i386/system.h?  If not, where does the "official" definition 
> of cli() live for Intel?  Or what is the include file that one needs to 
> pick it up?  I can't find it.

The old style cli/global irq lock stuff has been exterminated. There is
no direct equivalent any more. 


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

* Re: I386 cli
  2002-10-22 20:08 ` erich
@ 2002-10-22 20:46   ` Vojtech Pavlik
  2002-10-22 20:55     ` erich
  2002-10-22 20:48   ` erich
  1 sibling, 1 reply; 11+ messages in thread
From: Vojtech Pavlik @ 2002-10-22 20:46 UTC (permalink / raw)
  To: erich; +Cc: David Grothe, Linux Kernel Mailing List

On Tue, Oct 22, 2002 at 01:08:43PM -0700, erich@uruk.org wrote:

> David Grothe <dave@gcom.com> wrote:
> 
> > In 2.5.41every architecture except Intel 386 has a "#define cli 
> > <something>" in its asm-arch/system.h file.  Is there supposed to be such a 
> > define in asm-i386/system.h?  If not, where does the "official" definition 
> > of cli() live for Intel?  Or what is the include file that one needs to 
> > pick it up?  I can't find it.
> 
> I'm sure there is no definition because "cli" is the native assembler
> instruction on x86.

Wrong reason. Furthermore, cli(), meaning 'global interrupt disable,
across all processors', is not doable with a single instruction anyway.
It's not defined, because it should not be used - usually the usage of
cli() means a bug.

-- 
Vojtech Pavlik
SuSE Labs

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

* Re: I386 cli
  2002-10-22 20:08 ` erich
  2002-10-22 20:46   ` Vojtech Pavlik
@ 2002-10-22 20:48   ` erich
  1 sibling, 0 replies; 11+ messages in thread
From: erich @ 2002-10-22 20:48 UTC (permalink / raw)
  To: Linux Kernel Mailing List


erich@uruk.org wrote:

> David Grothe <dave@gcom.com> wrote:
> 
> > In 2.5.41every architecture except Intel 386 has a "#define cli 
> > <something>" in its asm-arch/system.h file.  Is there supposed to be such a 
> > define in asm-i386/system.h?  If not, where does the "official" definition 
> > of cli() live for Intel?  Or what is the include file that one needs to 
> > pick it up?  I can't find it.
> 
> I'm sure there is no definition because "cli" is the native assembler
> instruction on x86.

Whoops, foot-in-mouth...  those were C level definitions, not assembler
macros.

--
    Erich Stefan Boleyn     <erich@uruk.org>     http://www.uruk.org/
"Reality is truly stranger than fiction; Probably why fiction is so popular"

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

* Re: I386 cli
  2002-10-22 20:46   ` Vojtech Pavlik
@ 2002-10-22 20:55     ` erich
  0 siblings, 0 replies; 11+ messages in thread
From: erich @ 2002-10-22 20:55 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Linux Kernel Mailing List


Vojtech Pavlik <vojtech@suse.cz> wrote:

...
> > I'm sure there is no definition because "cli" is the native assembler
> > instruction on x86.
> 
> Wrong reason. Furthermore, cli(), meaning 'global interrupt disable,
> across all processors', is not doable with a single instruction anyway.
> It's not defined, because it should not be used - usually the usage of
> cli() means a bug.

Yeah, I noticed I made a thinko here by not looking at the file itself,
and assuming it was just a direct assembler hack...  essentially the
C-level variant of what is called in most OSes "splhi/spllo" rather
than "cli/sti", probably because that was how it was originally
used.

Good that it's finally getting purged.

--
    Erich Stefan Boleyn     <erich@uruk.org>     http://www.uruk.org/
"Reality is truly stranger than fiction; Probably why fiction is so popular"

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

* Re: I386 cli
  2002-10-22 20:19 ` Sam Ravnborg
@ 2002-10-22 21:27   ` David Grothe
  0 siblings, 0 replies; 11+ messages in thread
From: David Grothe @ 2002-10-22 21:27 UTC (permalink / raw)
  To: Sam Ravnborg, Ingo Molnar; +Cc: Linux Kernel Mailing List

Thanks, Sam.  That's the answer that I was looking for.  Wish I had thought 
to look in the Documentation directory first so as not to have to bother you.
-- Dave

At 10:19 PM 10/22/2002 Tuesday, Sam Ravnborg wrote:

>I would advise you to read: Documentation/cli-sti-removal.txt
>[I recall someone mentioned this documents were slightly out-dated - Ingo?]
>
>The short version is that cli() is no loger valid, drivers using it does 
>not compile.
>
>         Sam


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

* Re: I386 cli
  2002-10-22 20:01 I386 cli David Grothe
                   ` (4 preceding siblings ...)
  2002-10-22 20:29 ` Alan Cox
@ 2002-10-23 12:02 ` Richard B. Johnson
  5 siblings, 0 replies; 11+ messages in thread
From: Richard B. Johnson @ 2002-10-23 12:02 UTC (permalink / raw)
  To: David Grothe; +Cc: Linux Kernel Mailing List

On Tue, 22 Oct 2002, David Grothe wrote:

> In 2.5.41every architecture except Intel 386 has a "#define cli 
> <something>" in its asm-arch/system.h file.  Is there supposed to be such a 
> define in asm-i386/system.h?  If not, where does the "official" definition 
> of cli() live for Intel?  Or what is the include file that one needs to 
> pick it up?  I can't find it.
> Thanks,
> Dave

Grep for 'spin_lock'.  You can't just use `cli` alone. It won't protect
the critical section. You probably need:

	spin_lock_irqsave(&lock, flags);
        //.... critical section
	spin_unlock_irqrestore(&lock, flags);


Cheers,
Dick Johnson
Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).
   Bush : The Fourth Reich of America



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

end of thread, other threads:[~2002-10-23 11:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-22 20:01 I386 cli David Grothe
2002-10-22 20:08 ` erich
2002-10-22 20:46   ` Vojtech Pavlik
2002-10-22 20:55     ` erich
2002-10-22 20:48   ` erich
2002-10-22 20:10 ` Vojtech Pavlik
2002-10-22 20:14 ` Arjan van de Ven
2002-10-22 20:19 ` Sam Ravnborg
2002-10-22 21:27   ` David Grothe
2002-10-22 20:29 ` Alan Cox
2002-10-23 12:02 ` Richard B. Johnson

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.