• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/arch/um/sys-i386/

Lines Matching refs:ldt

125  * In skas mode, we hold our own ldt data in UML.
128 * for arch/i386/kernel/ldt.c
140 uml_ldt_t * ldt = &current->mm->context.ldt;
142 if (!ldt->entry_count)
151 mutex_lock(&ldt->lock);
152 if (ldt->entry_count <= LDT_DIRECT_ENTRIES) {
156 if (copy_to_user(ptr, ldt->u.entries, size))
162 for (i=0; i<ldt->entry_count/LDT_ENTRIES_PER_PAGE && bytecount;
167 if (copy_to_user(ptr, ldt->u.pages[i], size)) {
175 mutex_unlock(&ldt->lock);
197 * So, we don't really have a default ldt, but emulate
198 * an empty ldt of common host default ldt size.
208 uml_ldt_t * ldt = &current->mm->context.ldt;
233 mutex_lock(&ldt->lock);
240 ldt->entry_count = 1;
244 if (ldt_info.entry_number >= ldt->entry_count &&
246 for (i=ldt->entry_count/LDT_ENTRIES_PER_PAGE;
250 memcpy(&entry0, ldt->u.entries,
252 ldt->u.pages[i] = (struct ldt_entry *)
254 if (!ldt->u.pages[i]) {
262 memcpy(ldt->u.pages[0], &entry0,
264 memcpy(ldt->u.pages[0]+1, ldt->u.entries+1,
267 ldt->entry_count = (i + 1) * LDT_ENTRIES_PER_PAGE;
270 if (ldt->entry_count <= ldt_info.entry_number)
271 ldt->entry_count = ldt_info.entry_number + 1;
273 if (ldt->entry_count <= LDT_DIRECT_ENTRIES)
274 ldt_p = ldt->u.entries + ldt_info.entry_number;
276 ldt_p = ldt->u.pages[ldt_info.entry_number/LDT_ENTRIES_PER_PAGE] +
293 mutex_unlock(&ldt->lock);
325 struct ldt_entry * ldt;
342 ldt = (struct ldt_entry *)
344 if (ldt == NULL) {
346 "for host ldt\n");
350 ret = modify_ldt(0, ldt, (1<<order)*PAGE_SIZE);
352 printk(KERN_ERR "ldt_get_host_info: couldn't read host ldt\n");
362 if (ldt[i].a != 0 || ldt[i].b != 0)
373 "host ldt list\n");
380 if (ldt[i].a != 0 || ldt[i].b != 0)
386 free_pages((unsigned long)ldt, order);
400 mutex_init(&new_mm->ldt.lock);
405 * We have to initialize a clean ldt.
410 * default-ldt currently is assigned, which normally
419 * Now we try to retrieve info about the ldt, we
420 * inherited from the host. All ldt-entries found
432 new_mm->ldt.entry_count = 0;
460 mutex_lock(&from_mm->ldt.lock);
461 if (from_mm->ldt.entry_count <= LDT_DIRECT_ENTRIES)
462 memcpy(new_mm->ldt.u.entries, from_mm->ldt.u.entries,
463 sizeof(new_mm->ldt.u.entries));
465 i = from_mm->ldt.entry_count / LDT_ENTRIES_PER_PAGE;
472 new_mm->ldt.u.pages[i] =
474 memcpy(new_mm->ldt.u.pages[i],
475 from_mm->ldt.u.pages[i], PAGE_SIZE);
478 new_mm->ldt.entry_count = from_mm->ldt.entry_count;
479 mutex_unlock(&from_mm->ldt.lock);
491 if (!ptrace_ldt && mm->ldt.entry_count > LDT_DIRECT_ENTRIES) {
492 i = mm->ldt.entry_count / LDT_ENTRIES_PER_PAGE;
494 free_page((long) mm->ldt.u.pages[i]);
496 mm->ldt.entry_count = 0;