Changeset 9f63a83 in mainline for kernel/generic/src


Ignore:
Timestamp:
2007-01-19T12:21:27Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
718d600
Parents:
81cfefa
Message:

Beat the implicit illegal virtual alias created by reusing userspace frames.
In the anonymous and ELF backends, if the architecture has virtually indexed D-cache,
selectively flush cachelines belonging to the frame being freed.
This fixes Ticket #20.

Location:
kernel/generic/src/mm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/backend_anon.c

    r81cfefa r9f63a83  
    5151#include <align.h>
    5252#include <arch.h>
     53
     54#ifdef CONFIG_VIRT_IDX_DCACHE
     55#include <arch/mm/cache.h>
     56#endif
    5357
    5458static int anon_page_fault(as_area_t *area, uintptr_t addr, pf_access_t access);
     
    154158 *
    155159 * @param area Ignored.
    156  * @param page Ignored.
     160 * @param page Virtual address of the page corresponding to the frame.
    157161 * @param frame Frame to be released.
    158162 */
     
    160164{
    161165        frame_free(frame);
     166#ifdef CONFIG_VIRT_IDX_DCACHE
     167        dcache_flush_frame(page, frame);
     168#endif
    162169}
    163170
  • kernel/generic/src/mm/backend_elf.c

    r81cfefa r9f63a83  
    5151#include <arch.h>
    5252
     53#ifdef CONFIG_VIRT_IDX_DCACHE
     54#include <arch/mm/cache.h>
     55#endif
     56
    5357static int elf_page_fault(as_area_t *area, uintptr_t addr, pf_access_t access);
    5458static void elf_frame_free(as_area_t *area, uintptr_t page, uintptr_t frame);
     
    220224                         */
    221225                        frame_free(frame);
     226#ifdef CONFIG_VIRT_IDX_DCACHE
     227                        dcache_flush_frame(page, frame);
     228#endif
    222229                }
    223230        } else {
     
    228235                 */
    229236                frame_free(frame);
     237#ifdef CONFIG_VIRT_IDX_DCACHE
     238                dcache_flush_frame(page, frame);
     239#endif
    230240        }
    231241}
Note: See TracChangeset for help on using the changeset viewer.