git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support to multi-threading and pthread interface (POSIX.1-2008) (#23)
[lunaix-os.git]
/
lunaix-os
/
kernel
/
mm
/
mmio.c
diff --git
a/lunaix-os/kernel/mm/mmio.c
b/lunaix-os/kernel/mm/mmio.c
index 43cc9e166ad2c0d2f288c997dfc2ec63c0a2fb69..ccb57d7b0f248255c30129e495bb36f2860cbcf1 100644
(file)
--- a/
lunaix-os/kernel/mm/mmio.c
+++ b/
lunaix-os/kernel/mm/mmio.c
@@
-9,8
+9,7
@@
ioremap(ptr_t paddr, u32_t size)
void* ptr = vmap(paddr, size, PG_PREM_RW | PG_DISABLE_CACHE, 0);
if (ptr) {
void* ptr = vmap(paddr, size, PG_PREM_RW | PG_DISABLE_CACHE, 0);
if (ptr) {
- pmm_mark_chunk_occupied(KERNEL_PID,
- paddr >> PG_SIZE_BITS,
+ pmm_mark_chunk_occupied(paddr >> PG_SIZE_BITS,
CEIL(size, PG_SIZE_BITS),
PP_FGLOCKED);
}
CEIL(size, PG_SIZE_BITS),
PP_FGLOCKED);
}
@@
-23,6
+22,6
@@
iounmap(ptr_t vaddr, u32_t size)
{
for (size_t i = 0; i < size; i += PG_SIZE) {
ptr_t paddr = vmm_del_mapping(VMS_SELF, vaddr + i);
{
for (size_t i = 0; i < size; i += PG_SIZE) {
ptr_t paddr = vmm_del_mapping(VMS_SELF, vaddr + i);
- pmm_free_page(
KERNEL_PID,
paddr);
+ pmm_free_page(paddr);
}
}
\ No newline at end of file
}
}
\ No newline at end of file