From 0c19585b0d2f6817dd9af607650d3f6cae2fd8bc Mon Sep 17 00:00:00 2001 From: Paolo 'Blaisorblade' Giarrusso Date: Wed, 1 Feb 2006 03:06:24 -0800 Subject: [PATCH] uml: typo fixup Trivial innocent cosmetical fixup. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Cc: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-um/ldt-x86_64.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/asm-um') diff --git a/include/asm-um/ldt-x86_64.h b/include/asm-um/ldt-x86_64.h index 175722a..57159f1 100644 --- a/include/asm-um/ldt-x86_64.h +++ b/include/asm-um/ldt-x86_64.h @@ -5,8 +5,8 @@ * Author: Bodo Stroesser */ -#ifndef __ASM_LDT_I386_H -#define __ASM_LDT_I386_H +#ifndef __ASM_LDT_X86_64_H +#define __ASM_LDT_X86_64_H #include "asm/semaphore.h" #include "asm/arch/ldt.h" -- cgit v1.1 From 4cd7ed94428babb0cdbf08cc14c257e223186079 Mon Sep 17 00:00:00 2001 From: Paolo 'Blaisorblade' Giarrusso Date: Wed, 1 Feb 2006 03:06:28 -0800 Subject: [PATCH] uml: skas0-hold-own-ldt fixups for x86-64 In a recent fixup i386 code was copied raw to x86_64 subarch to make it compile again. Here there are some little fixups and resyncs needed for it (mainly for cleanliness sake) - I did an audit and found the rest of the code to be safe. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Cc: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-um/ldt-x86_64.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/asm-um') diff --git a/include/asm-um/ldt-x86_64.h b/include/asm-um/ldt-x86_64.h index 57159f1..96b35aa 100644 --- a/include/asm-um/ldt-x86_64.h +++ b/include/asm-um/ldt-x86_64.h @@ -39,11 +39,13 @@ typedef struct uml_ldt { } uml_ldt_t; /* - * macros stolen from include/asm-i386/desc.h + * macros stolen from include/asm-x86_64/desc.h */ #define LDT_entry_a(info) \ ((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff)) +/* Don't allow setting of the lm bit. It is useless anyways because + * 64bit system calls require __USER_CS. */ #define LDT_entry_b(info) \ (((info)->base_addr & 0xff000000) | \ (((info)->base_addr & 0x00ff0000) >> 16) | \ @@ -54,6 +56,7 @@ typedef struct uml_ldt { ((info)->seg_32bit << 22) | \ ((info)->limit_in_pages << 23) | \ ((info)->useable << 20) | \ + /* ((info)->lm << 21) | */ \ 0x7000) #define LDT_empty(info) (\ @@ -64,6 +67,7 @@ typedef struct uml_ldt { (info)->seg_32bit == 0 && \ (info)->limit_in_pages == 0 && \ (info)->seg_not_present == 1 && \ - (info)->useable == 0 ) + (info)->useable == 0 && \ + (info)->lm == 0) #endif -- cgit v1.1 From 72e5525765ee01d72a9b92fab78ecea883ae7fdd Mon Sep 17 00:00:00 2001 From: Paolo 'Blaisorblade' Giarrusso Date: Wed, 1 Feb 2006 03:06:29 -0800 Subject: [PATCH] uml: avoid "CONFIG_NR_CPUS undeclared" bogus error messages Olaf Hering Olaf reported UML doesn't build for him with a clear analisys of what happened - we're using NR_CPUS in files linked against glibc headers. Seems like it defines CONFIG_SMP but not CONFIG_NR_CPUS, so we get CONFIG_NR_CPUS undeclared. The fix is to move the declaration away from that header file and move it in asm-um headers, and to add that header where needed. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Cc: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-um/smp.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/asm-um') diff --git a/include/asm-um/smp.h b/include/asm-um/smp.h index d879eba..aeda665 100644 --- a/include/asm-um/smp.h +++ b/include/asm-um/smp.h @@ -23,6 +23,8 @@ extern inline void smp_cpus_done(unsigned int maxcpus) { } +extern struct task_struct *idle_threads[NR_CPUS]; + #endif #endif -- cgit v1.1