[prev in list] [next in list] [prev in thread] [next in thread] 

List:       9fans
Subject:    Re: [9fans] kernel - kmap/KADDR ?
From:       Russ Cox <russcox () gmail ! com>
Date:       2004-11-28 0:54:46
Message-ID: ee9e417a0411271654304afe6d () mail ! gmail ! com
[Download RAW message or body]

>    I'm confused about the usage of kmap and KADDR in the code.  I
> had assumed that kmap() was used to map a page into kernel memory,
> and kunmap() was used to unmap that page.  I just noticed that the
> KADDR() macro is used in the port code in a similar way.  The
> port code calls KADDR on a physical addr, and then starts reading
> and writing the returned address.

KADDR is only used to access the physical memory occupied
by the kernel and its data.  Kmap/kunmap are used to access the
whole of physical memory.  So they're not redundant, and that's
why there's no unmap for KADDR.

Kmap/kunmap are exactly what you think they are.

Russ

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic