Skip to contentSkip to conversation

kmap_atomic

DISCUSSION Brice Goglin 3 participants 3 messages Nov 22, 2004 – Nov 23, 2004

lore
Share & tools
lore
#0 lore raw

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,

Signature · 6 lines
Brice Goglin
================================================
Ph.D Student
Laboratoire de l'Informatique et du Parallélisme
CNRS-ENS Lyon-INRIA-UCB Lyon
France
#1 lore raw
Quoted 9 lines · Brice Goglin

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

#2 lore raw
In reply to Brice Goglin
Quoted 3 lines · Brice Goglin

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.