ia32_install_shared_page (struct vm_area_struct *vma, unsigned long address, int no_share)
{
# define NUM_SHARED_PAGES (PAGE_SIZE > IA32_PAGE_SIZE ? 1 : 2)
- struct page *pg = ia32_shared_page[NUM_SHARED__PAGES * smp_processor_id()
+ struct page *pg = ia32_shared_page[NUM_SHARED_PAGES * smp_processor_id()
+ (address - vma->vm_start)/PAGE_SIZE];
get_page(pg);
static inline void
load_TLS (struct thread_struct *t, unsigned int cpu)
{
- extern struct desc_struct *cpu_gdt_table[NR_CPUS];
+ extern unsigned long *cpu_gdt_table[NR_CPUS];
- cpu_gdt_table[cpu][GDT_ENTRY_TLS_MIN + 0] = t->tls_array[0];
- cpu_gdt_table[cpu][GDT_ENTRY_TLS_MIN + 1] = t->tls_array[1];
- cpu_gdt_table[cpu][GDT_ENTRY_TLS_MIN + 2] = t->tls_array[2];
+ memcpy(cpu_gdt_table[cpu] + GDT_ENTRY_TLS_MIN + 0, &t->tls_array[0], sizeof(long));
+ memcpy(cpu_gdt_table[cpu] + GDT_ENTRY_TLS_MIN + 1, &t->tls_array[1], sizeof(long));
+ memcpy(cpu_gdt_table[cpu] + GDT_ENTRY_TLS_MIN + 2, &t->tls_array[2], sizeof(long));
}
struct ia32_user_desc {