Changeset 454f1da in mainline for kernel/arch/sparc64/src/smp/ipi.c


Ignore:
Timestamp:
2007-03-26T19:35:28Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5d7daff
Parents:
4638401
Message:

Reworked handling of illegal virtual aliases caused by frame reuse.
We moved the incomplete handling from backend's frame method to
backend's page_fault method. The page_fault method is the one that
can create an illegal alias if it writes the userspace frame using
kernel address with a different page color than the page to which is
this frame mapped in userspace. When we detect this, we do D-cache
shootdown on all processors (!!!).

If we add code that accesses userspace memory from kernel address
space, we will have to check for illegal virtual aliases at all such
places.

I tested this on a 4-way simulated E6500 and a real-world Ultra 5,
which has unfortunatelly only one processor.

This solves ticket #26.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/smp/ipi.c

    r4638401 r454f1da  
    4040#include <config.h>
    4141#include <mm/tlb.h>
     42#include <arch/mm/cache.h>
    4243#include <arch/interrupt.h>
    4344#include <arch/trap/interrupt.h>
     
    7980                asi_u64_write(ASI_UDB_INTR_W, ASI_UDB_INTR_W_DATA_1, 0);
    8081                asi_u64_write(ASI_UDB_INTR_W, ASI_UDB_INTR_W_DATA_2, 0);
    81                 asi_u64_write(ASI_UDB_INTR_W, (mid <<
    82                         INTR_VEC_DISPATCH_MID_SHIFT) | ASI_UDB_INTR_W_DISPATCH,
    83                         0);
     82                asi_u64_write(ASI_UDB_INTR_W,
     83                    (mid << INTR_VEC_DISPATCH_MID_SHIFT) |
     84                    ASI_UDB_INTR_W_DISPATCH, 0);
    8485       
    8586                membar();
     
    125126                func = tlb_shootdown_ipi_recv;
    126127                break;
     128#if (defined(CONFIG_SMP) && (defined(CONFIG_VIRT_IDX_DCACHE)))
     129        case IPI_DCACHE_SHOOTDOWN:
     130                func = dcache_shootdown_ipi_recv;
     131                break;
     132#endif
    127133        default:
    128134                panic("Unknown IPI (%d).\n", ipi);
Note: See TracChangeset for help on using the changeset viewer.