~ubuntu-branches/ubuntu/precise/linux-lowlatency/precise

« back to all changes in this revision

Viewing changes to arch/x86/include/asm/desc.h

  • Committer: Package Import Robot
  • Author(s): Alessio Igor Bogani
  • Date: 2011-10-26 11:13:05 UTC
  • Revision ID: package-import@ubuntu.com-20111026111305-04kado7d1u2er2rl
Tags: 3.2.0-16.25
Add new lowlatency kernel flavour

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
#include <asm/mmu.h>
7
7
 
8
8
#include <linux/smp.h>
 
9
#include <linux/mm_types.h>
9
10
 
10
11
static inline void fill_ldt(struct desc_struct *desc, const struct user_desc *info)
11
12
{
98
99
#define load_TLS(t, cpu)                        native_load_tls(t, cpu)
99
100
#define set_ldt                                 native_set_ldt
100
101
 
 
102
#ifdef CONFIG_X86_32
 
103
#define load_user_cs_desc                       native_load_user_cs_desc
 
104
#endif /*CONFIG_X86_32*/
 
105
 
101
106
#define write_ldt_entry(dt, entry, desc)        native_write_ldt_entry(dt, entry, desc)
102
107
#define write_gdt_entry(dt, entry, desc, type)  native_write_gdt_entry(dt, entry, desc, type)
103
108
#define write_idt_entry(dt, entry, g)           native_write_idt_entry(dt, entry, g)
392
397
        _set_gate(n, GATE_INTERRUPT, addr, 0x3, ist, __KERNEL_CS);
393
398
}
394
399
 
 
400
#ifdef CONFIG_X86_32
 
401
static inline void set_user_cs(struct desc_struct *desc, unsigned long limit)
 
402
{
 
403
        limit = (limit - 1) / PAGE_SIZE;
 
404
        desc->a = limit & 0xffff;
 
405
        desc->b = (limit & 0xf0000) | 0x00c0fb00;
 
406
}
 
407
 
 
408
static inline void native_load_user_cs_desc(int cpu, struct mm_struct *mm)
 
409
{
 
410
        get_cpu_gdt_table(cpu)[GDT_ENTRY_DEFAULT_USER_CS] = (mm)->context.user_cs;
 
411
}
 
412
 
 
413
#define arch_add_exec_range arch_add_exec_range
 
414
#define arch_remove_exec_range arch_remove_exec_range
 
415
#define arch_flush_exec_range arch_flush_exec_range
 
416
extern void arch_add_exec_range(struct mm_struct *mm, unsigned long limit);
 
417
extern void arch_remove_exec_range(struct mm_struct *mm, unsigned long limit);
 
418
extern void arch_flush_exec_range(struct mm_struct *mm);
 
419
#endif /* CONFIG_X86_32 */
 
420
 
395
421
#endif /* _ASM_X86_DESC_H */