mirror of
https://github.com/drasko/codezero.git
synced 2026-04-17 17:29:04 +02:00
Style cleanup
This commit is contained in:
@@ -88,8 +88,8 @@ struct container *container_find(struct kernel_resources *kres, l4id_t cid)
|
|||||||
* since it uses the current kernel pgd.
|
* since it uses the current kernel pgd.
|
||||||
*/
|
*/
|
||||||
int init_pager(struct pager *pager,
|
int init_pager(struct pager *pager,
|
||||||
struct container *cont,
|
struct container *cont,
|
||||||
pgd_table_t *current_pgd)
|
pgd_table_t *current_pgd)
|
||||||
{
|
{
|
||||||
struct ktcb *task;
|
struct ktcb *task;
|
||||||
struct address_space *space;
|
struct address_space *space;
|
||||||
@@ -110,9 +110,9 @@ int init_pager(struct pager *pager,
|
|||||||
|
|
||||||
/* If first, manually allocate/initalize space */
|
/* If first, manually allocate/initalize space */
|
||||||
if (first) {
|
if (first) {
|
||||||
if (!(space = alloc_space())) {
|
if (!(space = alloc_space()))
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
/* Set up space id */
|
/* Set up space id */
|
||||||
space->spid = id_new(&kernel_resources.space_ids);
|
space->spid = id_new(&kernel_resources.space_ids);
|
||||||
|
|
||||||
@@ -139,28 +139,8 @@ int init_pager(struct pager *pager,
|
|||||||
/* Add the address space to container space list */
|
/* Add the address space to container space list */
|
||||||
address_space_add(task->space);
|
address_space_add(task->space);
|
||||||
|
|
||||||
#if 0
|
printk("%s: Mapping 0x%lx bytes (%lu pages) "
|
||||||
/* Initialize uninitialized capability fields while on dummy */
|
"from 0x%lx to 0x%lx for %s\n",
|
||||||
list_foreach_struct(cap, ¤t->cap_list.caps, list) {
|
|
||||||
/* Initialize owner */
|
|
||||||
cap->owner = task->tid;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize resource id, if possible.
|
|
||||||
* Currently this is a temporary hack where
|
|
||||||
* we allow only container ids and _assume_
|
|
||||||
* that container is pager's own container.
|
|
||||||
*
|
|
||||||
* See capability resource ids for info
|
|
||||||
*/
|
|
||||||
if (cap_rtype(cap) == CAP_RTYPE_CONTAINER)
|
|
||||||
cap->resid = task->container->cid;
|
|
||||||
else
|
|
||||||
cap->resid = CAP_RESID_NONE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
printk("%s: Mapping 0x%lx bytes (%lu pages) from 0x%lx to 0x%lx for %s\n",
|
|
||||||
__KERNELNAME__, pager->memsize,
|
__KERNELNAME__, pager->memsize,
|
||||||
__pfn(page_align_up(pager->memsize)),
|
__pfn(page_align_up(pager->memsize)),
|
||||||
pager->start_lma, pager->start_vma, cont->name);
|
pager->start_lma, pager->start_vma, cont->name);
|
||||||
@@ -305,4 +285,3 @@ int container_init_pagers(struct kernel_resources *kres,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user