public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* kmap_atomic
@ 2004-11-22 14:54 Brice Goglin
  2004-11-22 15:39 ` kmap_atomic William Lee Irwin III
  2004-11-23  0:03 ` kmap_atomic Andrew Morton
  0 siblings, 2 replies; 3+ messages in thread
From: Brice Goglin @ 2004-11-22 14:54 UTC (permalink / raw)
  To: Linux Kernel

Hi,

I would like to know if I can use kmap_atomic with KM_USER[01] type
within a non-interrupt context. Looking at comments near kmap_atomic
declarations on sparc or ppc, it seems that this is discouraged.

But lots of code (like filesystem stuff) are currently using it
outside of interrupt context.
Are there special requirements about KM_USER[01] usage in interrupt
or non-interrupt contexts ?
Is it documented somewhere how we can use it ?

What I want to do is just kmap_atomic, copy and kunmap_atomic.

Regards,
-- 
Brice Goglin
================================================
Ph.D Student
Laboratoire de l'Informatique et du Parallélisme
CNRS-ENS Lyon-INRIA-UCB Lyon
France

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

* Re: kmap_atomic
  2004-11-22 14:54 kmap_atomic Brice Goglin
@ 2004-11-22 15:39 ` William Lee Irwin III
  2004-11-23  0:03 ` kmap_atomic Andrew Morton
  1 sibling, 0 replies; 3+ messages in thread
From: William Lee Irwin III @ 2004-11-22 15:39 UTC (permalink / raw)
  To: Brice.Goglin; +Cc: Linux Kernel

On Mon, Nov 22, 2004 at 03:54:24PM +0100, Brice Goglin wrote:
> I would like to know if I can use kmap_atomic with KM_USER[01] type
> within a non-interrupt context. Looking at comments near kmap_atomic
> declarations on sparc or ppc, it seems that this is discouraged.
> But lots of code (like filesystem stuff) are currently using it
> outside of interrupt context.
> Are there special requirements about KM_USER[01] usage in interrupt
> or non-interrupt contexts ?
> Is it documented somewhere how we can use it ?
> What I want to do is just kmap_atomic, copy and kunmap_atomic.

Those comments are stale. This varies by km_type. A given km_type may
only be used in one context. KM_USER0/KM_USER1 are specifically
dedicated to process context copying. KM_IRQ0/KM_IRQ1 are specifically
devoted to interrupt-context copying.


-- wli

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

* Re: kmap_atomic
  2004-11-22 14:54 kmap_atomic Brice Goglin
  2004-11-22 15:39 ` kmap_atomic William Lee Irwin III
@ 2004-11-23  0:03 ` Andrew Morton
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2004-11-23  0:03 UTC (permalink / raw)
  To: Brice.Goglin; +Cc: Brice.Goglin, linux-kernel

Brice Goglin <Brice.Goglin@ens-lyon.fr> wrote:
>
> I would like to know if I can use kmap_atomic with KM_USER[01] type
> within a non-interrupt context.

That is what they are designed for.  Using KM_USER0 and KM_USER1 in
non-interrupt context is correct.


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

end of thread, other threads:[~2004-11-23  0:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-22 14:54 kmap_atomic Brice Goglin
2004-11-22 15:39 ` kmap_atomic William Lee Irwin III
2004-11-23  0:03 ` kmap_atomic Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox