OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [LINUX_2_4_26_OR32/] [linux/] [linux-2.4/] [include/] [asm-s390/] [mmu_context.h] - Blame information for rev 1780

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1276 phoenix
/*
2
 *  include/asm-s390/mmu_context.h
3
 *
4
 *  S390 version
5
 *
6
 *  Derived from "include/asm-i386/mmu_context.h"
7
 */
8
 
9
#ifndef __S390_MMU_CONTEXT_H
10
#define __S390_MMU_CONTEXT_H
11
 
12
/*
13
 * get a new mmu context.. S390 don't know about contexts.
14
 */
15
#define init_new_context(tsk,mm)        0
16
 
17
#define destroy_context(mm)             flush_tlb_mm(mm)
18
 
19
static inline void enter_lazy_tlb(struct mm_struct *mm,
20
                                  struct task_struct *tsk, unsigned cpu)
21
{
22
}
23
 
24
static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
25
                             struct task_struct *tsk, unsigned cpu)
26
{
27
        unsigned long pgd;
28
 
29
        if (prev != next) {
30
                pgd = (__pa(next->pgd)&PAGE_MASK) |
31
                      (_SEGMENT_TABLE|USER_STD_MASK);
32
                /* Load page tables */
33
                asm volatile("    lctl  7,7,%0\n"   /* secondary space */
34
                             "    lctl  13,13,%0\n" /* home space */
35
                             : : "m" (pgd) );
36
        }
37
        set_bit(cpu, &next->cpu_vm_mask);
38
}
39
 
40
extern inline void activate_mm(struct mm_struct *prev,
41
                               struct mm_struct *next)
42
{
43
        switch_mm(prev, next, current, smp_processor_id());
44
}
45
 
46
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.