Skip to contentSkip to conversation

cramfs: add cramfs Linear XIP

PATCH Carsten Otte 1 participant 1 message Jun 9, 2007 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 4 lines · Justin Treon
Quoted 2 lines · --- Carsten Otte

The nice thing about this approach is: we use page->count and rmap, both already exist and are perfectly suited for our purpose. The downside: We need mem_map[] struct page entries behind all memory segments. Nowerdays we can easily create those via vmem_map/sparsemem.

Can you give an example of the proper way to use sparsemem in this case?

We use vmem_map on 390:
- __segment_load[arch/s390/mm/extmem.c] calls add_shared_memory() to create struct page entries behind a segment
- segment_unload (same file) calls remove_shared_memory() to remove parts of the mem_map array again
- arch/s390/mm/vmem.c implements both callbacks

As far as I know, this can also be archived with sparsemem. Unfortunately I don't have an example for sparsemem at hand, I would try to use sparse_add_one_section()[mm/sparse.c].

sorry,
Carsten