Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83182
b: refs/heads/master
c: b8bec82
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed Feb 5, 2008
1 parent 2c8d51c commit 44ac22b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6b7e967484f4197d799e14b844b78118e93192c6
refs/heads/master: b8bec829c90d45a2d115a52f3a928ce841afc3d4
30 changes: 21 additions & 9 deletions trunk/arch/um/sys-i386/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ int do_set_thread_area(struct user_desc *info)
cpu = get_cpu();
ret = os_set_thread_area(info, userspace_pid[cpu]);
put_cpu();

if (ret)
printk(KERN_ERR "PTRACE_SET_THREAD_AREA failed, err = %d, "
"index = %d\n", ret, info->entry_number);

return ret;
}

Expand All @@ -37,6 +42,11 @@ int do_get_thread_area(struct user_desc *info)
cpu = get_cpu();
ret = os_get_thread_area(info, userspace_pid[cpu]);
put_cpu();

if (ret)
printk(KERN_ERR "PTRACE_GET_THREAD_AREA failed, err = %d, "
"index = %d\n", ret, info->entry_number);

return ret;
}

Expand Down Expand Up @@ -356,10 +366,9 @@ int ptrace_get_thread_area(struct task_struct *child, int idx,
return ret;
}


/*
* XXX: This part is probably common to i386 and x86-64. Don't create a common
* file for now, do that when implementing x86-64 support.
* This code is really i386-only, but it detects and logs x86_64 GDT indexes
* if a 32-bit UML is running on a 64-bit host.
*/
static int __init __setup_host_supports_tls(void)
{
Expand All @@ -368,13 +377,16 @@ static int __init __setup_host_supports_tls(void)
printk(KERN_INFO "Host TLS support detected\n");
printk(KERN_INFO "Detected host type: ");
switch (host_gdt_entry_tls_min) {
case GDT_ENTRY_TLS_MIN_I386:
printk("i386\n");
break;
case GDT_ENTRY_TLS_MIN_X86_64:
printk("x86_64\n");
break;
case GDT_ENTRY_TLS_MIN_I386:
printk(KERN_CONT "i386");
break;
case GDT_ENTRY_TLS_MIN_X86_64:
printk(KERN_CONT "x86_64");
break;
}
printk(KERN_CONT " (GDT indexes %d to %d)\n",
host_gdt_entry_tls_min,
host_gdt_entry_tls_min + GDT_ENTRY_TLS_ENTRIES);
} else
printk(KERN_ERR " Host TLS support NOT detected! "
"TLS support inside UML will not work\n");
Expand Down

0 comments on commit 44ac22b

Please sign in to comment.