[PATCH 15/21] [PATCH] remove legacy stuff from processor_64.h

2007-12-17 Thread Glauber de Oliveira Costa
This patch removes definitions and macros that are not used anymore from processor_64.h Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/processor_64.h | 14 -- 1 files changed, 0 insertions(+), 14 deletions(-) Index: linux-2.6-x86/include/a

[PATCH 13/21] [PATCH] change bitwise operations to get a void parameter.

2007-12-17 Thread Glauber de Oliveira Costa
This patch changes the bitwise operations in bitops.h to get a void pointers as a parameter. Before this patch, a lot of warnings can be seen. They're gone after it. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/bito

[PATCH 21/21] [PATCH] finish processor.h integration

2007-12-17 Thread Glauber de Oliveira Costa
What's left in processor_32.h and processor_64.h cannot be cleanly integrated. However, it's just a couple of definitions. They are moved to processor.h around ifdefs, and the original files are deleted. Note that there's much less headers included in the final version. Signed-off

[PATCH 14/21] [PATCH] unify x86_cpuinfo struct.

2007-12-17 Thread Glauber de Oliveira Costa
x86_cpuinfo is one more to the family of "not fundamentally different" structs. It's unified in processor.h, with very specific fields enclosed around ifdefs. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/cpu/common.c |6 +- includ

[PATCH 20/21] [PATCH] move i387 definitions to processor.h

2007-12-17 Thread Glauber de Oliveira Costa
This patch moves i387 definitions from processor_32.h and processor_64.h to processor.h. They are different. Very different. And there's appearently nothing we can do about it, so they're enclosed inside ifdefs. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> ---

[PATCH 12/21] [PATCH] unify TASK_ALIGN definitions

2007-12-17 Thread Glauber de Oliveira Costa
This patch moves the TASK_ALIGN constraints to common header. The base of it is the same for x86_64 and i386. The only difference is the presence of vSMP in x86_64. As it's not a worry in i386, we can safely use the same code for both. Signed-off-by: Glauber de Oliveira Costa <[EMAIL P

[PATCH 16/21] [PATCH] unify mm_segment_t definition

2007-12-17 Thread Glauber de Oliveira Costa
This patch moves the mm_segment_t structure definition to processor.h This makes mmsegment.h file useless, and it is deleted. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/mmsegment.h |8 include/asm-x86/processor.h |5 + i

[PATCH 11/21] [PATCH] unify thread struct.

2007-12-17 Thread Glauber de Oliveira Costa
The thread_struct is not fundamentally different between architectures, and this patch puts it in the common header. What's really unique for each of them is enclosed in ifdefs. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/processor.

[PATCH 9/21] [PATCH] unify tss_struct

2007-12-17 Thread Glauber de Oliveira Costa
Although slighly different, the tss_struct is very similar in x86_64 and i386. The really different part, which matchs the hardware vision of it, is now called x86_hw_tss, and each of the architectures provides yours. It's then used as a field in the outter tss_struct. Signed-off-by: Glaub

[PATCH 10/21] [PATCH] provide x86_64 with a load_sp0 function.

2007-12-17 Thread Glauber de Oliveira Costa
se in processor_32.h, it is moved to the common header Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/process_64.c |2 +- arch/x86/kernel/smpboot_64.c |2 +- include/asm-x86/processor.h| 22 +- include/asm-x86/processor_

[PATCH 7/21] [PATCH] unify common parts of processor.h

2007-12-17 Thread Glauber de Oliveira Costa
This patch moves the pieces of processor_32.h and processor_64 that are equal to processor.h. Only what's exactly the same is moved around, the rest not being touched. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/processor.

[PATCH 8/21] [PATCH] unify current_text_addr

2007-12-17 Thread Glauber de Oliveira Costa
current_text_addr() has a different implementation in x86_64 and i386, but it is not fundamentally different. I stick to the i386 implementation, that seem to be a common base, and move it to processor.h Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/proce

[PATCH 5/21] [PATCH] unify paravirt pieces of processor.h

2007-12-17 Thread Glauber de Oliveira Costa
This patch unifies the paravirt pieces of processor.h The functionality present in 32 bit, but not (yet) in 64-bit, like load_sp0 is _not_ done here, and let to a different patch. With this unification, we get paravirt for free in x86_64 processor.h Signed-off-by: Glauber de Oliveira Costa

[PATCH 6/21] [PATCH] move the definition of set_iopl_mask to common header

2007-12-17 Thread Glauber de Oliveira Costa
This patch moves the definition of set_iopl_mask to processor.h, instead of letting it at processor_32.h. For x86_64, nothing is done, as we don't really need such a function. However, having it on both arches saves us from putting an ifdef in the pv_cpu_ops struct. Signed-off-by: Glaub

[PATCH 4/21] [PATCH] move load_cr3 to a common place.

2007-12-17 Thread Glauber de Oliveira Costa
There are currently two definitions of load_cr3, that essentially do the same thing. This patch moves them all to processor.h. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/mmu_context_64.h |5 - include/asm-x86/processor.h |7 +++ i

[PATCH 2/21] [PATCH] get rid of _MASK flags

2007-12-17 Thread Glauber de Oliveira Costa
There's no need for the *_MASK flags (TF_MASK, IF_MASK, etc), found in processor.h (both _32 and _64). They have a one-to-one mapping with the EFLAGS value. This patch removes the definitions, and use the already exisant X86_EFLAGS_ version when applicable. Signed-off-by: Glauber de Oli

[PATCH 1/21] move tsc definitions to were they belong

2007-12-17 Thread Glauber de Oliveira Costa
This patch wipes out the definitions of tsc_disable from processor_32.h and move it to tsc.h, were it belongs Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/processor_32.h |7 --- include/asm-x86/tsc.h |6 ++ 2 files chan

[PATCH 3/21] [PATCH] move desc_empty to where they belong

2007-12-17 Thread Glauber de Oliveira Costa
This patch moves the (duplicated) desc_empty implementation to desc.h, where the descriptor things belong. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc.h |6 ++ include/asm-x86/processor_32.h |6 -- include/asm-x86/processo

[PATCH 0/21] Integrate processor.h

2007-12-17 Thread Glauber de Oliveira Costa
Hi, This series integrate the processor.h header. There are a lot of things that are deeply architectural differences between architectures, but I've done my best to come to a settlement. With this series, I am very close to have selectable paravirt for x86_64, It applies ontop of today's x86 gi

Re: [PATCH 1/4] x86: clean up asm-x86/page*.h

2007-12-14 Thread Glauber de Oliveira Costa
4, and print it with llx for both i386 and x86_64. The problem here is that pgd_val may be 32-bit with non-PAE configs, IIRC. So maybe we can #define the print string, and put it inside the ifdefs. Along the lines of printk("pgd: " PGD_STR ...) For this particular warning, it is in

[PATCH] avoid ifdefs in desc.h, getting rid of pack_ldt and pack_tss

2007-12-13 Thread Glauber de Oliveira Costa
Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc.h | 58 +++- 1 files changed, 18 insertions(+), 40 deletions(-) diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h index 8849666..161a6d6 100644 --- a

Re: [PATCH] avoid ifdefs in desc.h, getting rid of pack_ldt and pack_tss

2007-12-13 Thread Glauber de Oliveira Costa
H. Peter Anvin wrote: Ingo Molnar wrote: Well, "no functional changes" is not quite the same thing as "no object code changes". yeah, true, but the safest way to ensure no functional changes is to get identical object code. In sched-devel.git i include obj comparisons to cleanup patches as a

Re: [PATCH] avoid ifdefs in desc.h, getting rid of pack_ldt and pack_tss

2007-12-13 Thread Glauber de Oliveira Costa
Tom Spink wrote: On Dec 13, 2007 9:26 PM, H. Peter Anvin <[EMAIL PROTECTED]> wrote: Ingo Molnar wrote: could we _please_ use basic tools as vmlinux size comparison and objcompare when unifying, to make sure it's a 100% identity conversion? case in point, the patch claims: No functional chang

[PATCH] avoid ifdefs in desc.h, getting rid of pack_ldt and pack_tss

2007-12-13 Thread Glauber de Oliveira Costa
By Andi Kleen's suggestion, this patch removes pack_ldt() and pack_tss() wrappers in favour of a general wrapper. It saves us an ifdef and some lines of code, but more importantly, it's more elegant. No functional change is made. Signed-off-by: Glauber de Oliveira Costa <[EM

Re: [PATCH 0/19 -v4] desc_struct integration

2007-12-13 Thread Glauber de Oliveira Costa
Ingo Molnar wrote: * Glauber de Oliveira Costa <[EMAIL PROTECTED]> wrote: Since the last version of it received no comments on the interfaces, here it goes a version, that I feel ready for inclusion. The comments regarding style, specially the elimination of the #defines in the desc_

[PATCH 11/19] change write_gdt_entry signature.

2007-12-13 Thread Glauber de Oliveira Costa
This patch changes the write_gdt_entry function signature. Instead of the old "a" and "b" parameters, it now receives a pointer to a desc_struct, and the size of the entry being handled. This is because x86_64 can have some 16-byte entries as well as 8-byte ones. Signe

[PATCH 06/19] change write_idt_entry signature

2007-12-13 Thread Glauber de Oliveira Costa
this patch changes write_idt_entry signature. It now takes a gate_desc instead of the a and b parameters. It will allow it to be later unified between i386 and x86_64. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> CC: Zachary Amsden <[EMAIL PROTECTED]> CC: Jeremy

[PATCH 05/19] introduce gate_desc type.

2007-12-13 Thread Glauber de Oliveira Costa
To account for the differences in gate descriptor in i386 and x86_64 a gate_desc type is introduced. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/traps_32.c |3 ++- include/asm-x86/desc_32.h | 15 --- include/asm-x86/desc_64.h

[PATCH 09/19] introduce fill_ldt

2007-12-13 Thread Glauber de Oliveira Costa
This patch introduces fill_ldt(), which populates a ldt descriptor from a user_desc in once, instead of relying in the LDT_entry_a and LDT_entry_b macros Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/ldt.c|3 +-- arch/x86/kernel/process_64.c

[PATCH 12/19] change write_ldt_entry signature

2007-12-13 Thread Glauber de Oliveira Costa
this patch changes the signature of write_ldt_entry. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> CC: Zachary Amsden <[EMAIL PROTECTED]> CC: Jeremy Fitzhardinge --- arch/x86/kernel/ldt.c |3 +-- arch/x86/kernel/paravirt_32.c |2 +- arch/x86/ker

[PATCH 08/19] modify write_ldt function

2007-12-13 Thread Glauber de Oliveira Costa
This patch modifies the write_ldt() function to make use of the new struct desc_struct instead of entry_1 and entry_2 entries Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/ldt.c | 15 +++ 1 files changed, 7 insertions(+), 8 deletions(-)

[PATCH 10/19] provide tss_desc

2007-12-13 Thread Glauber de Oliveira Costa
Provide a new type, tss_desc, to represent the tss descriptor in a unified way accross x86_64 and i386 Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc_defs.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/a

[PATCH 07/19] introduce ldt_desc type.

2007-12-13 Thread Glauber de Oliveira Costa
this patch introduces ldt_desc type to account for the differences in the ldt descriptor in x86_64 and i386 Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc_64.h |2 +- include/asm-x86/desc_defs.h |4 +++- 2 files changed, 4 insertions

[PATCH 04/19] removed unused variable

2007-12-13 Thread Glauber de Oliveira Costa
This variable is not used anywere, and is then removed Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc_64.h |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/include/asm-x86/desc_64.h b/include/asm-x86/desc_64.h index 1

[PATCH 19/19] unify set_tss_desc

2007-12-13 Thread Glauber de Oliveira Costa
This patch unifies the set_tss_desc between i386 and x86_64, which can now have a common implementation. After the old functions are removed from desc_{32,64}.h, nothing important is left, and the files can be removed. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- inclu

[PATCH 17/19] unify paravirt pieces of descriptor handling

2007-12-13 Thread Glauber de Oliveira Costa
With the types used to access descriptors in x86_64 and i386 now being the same, the code that effectively handles them can now be easily shared. This patch moves the paravirt part of desc_32.h into desc.h, and then, we get paravirt support in x86_64 for free. Signed-off-by: Glauber de Oliveira

[PATCH 18/19] move _set_gate and its users to a common location

2007-12-13 Thread Glauber de Oliveira Costa
This patch moves _set_gate and its users to desc.h. We can now use common code for x86_64 and i386. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/traps_32.c | 34 include/asm-x86/desc.h

[PATCH 13/19] move constants to desc_defs.h

2007-12-13 Thread Glauber de Oliveira Costa
this patch moves constant definitions regarding descriptor types from desc_32.h to desc_defs.h. The change from defines to enum to comply with previous versions in desc_defs.h Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc_32.h |8 i

[PATCH 16/19] modify get_desc_base

2007-12-13 Thread Glauber de Oliveira Costa
This patch makes get_desc_base() receive a struct desc_struct, and then uses its internal fields to compute the base address. This is done at both i386 and x86_64, and then it is moved to common header Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/tls.c

[PATCH 14/19] unify non-paravirt parts of desc.h

2007-12-13 Thread Glauber de Oliveira Costa
, constant definitions used in desc_32.h are moved to desc_defs.h Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc.h | 87 ++ include/asm-x86/desc_32.h| 66 include/a

[PATCH 15/19] use the same data type for tls_array.

2007-12-13 Thread Glauber de Oliveira Costa
This patch changes the type of tls_array in x86_64 to a desc_struct. Now, both i386 and x86_64 tls_array have the same type, and code accessing it can be shared. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc_64.h |2 +- include/a

[PATCH 0/19 -v4] desc_struct integration

2007-12-13 Thread Glauber de Oliveira Costa
Since the last version of it received no comments on the interfaces, here it goes a version, that I feel ready for inclusion. The comments regarding style, specially the elimination of the #defines in the desc_struct definition were merged. I also implemented the vmi functions, missing last time.

[PATCH 01/19] unify desc_struct

2007-12-13 Thread Glauber de Oliveira Costa
auber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/apm_32.c |2 +- arch/x86/kernel/cpu/common.c | 28 ++-- arch/x86/kernel/process_64.c |2 +- arch/x86/kernel/traps_32.c |2 +- include/asm-x86/desc_defs.

[PATCH 03/19] change gdt acessor macro name

2007-12-13 Thread Glauber de Oliveira Costa
This patch changes the name of x86_64 macro used to access the per-cpu gdt. It is now equal to the i386 version, which will allow code to be shared. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/setup64.c |2 +- arch/x86/kernel/suspend_64.c

[PATCH 02/19] unify struct desc_ptr

2007-12-13 Thread Glauber de Oliveira Costa
eeded in the C structure definition. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/asm-offsets_32.c |5 ++--- arch/x86/kernel/cpu/common.c |2 +- arch/x86/kernel/doublefault_32.c |2 +- arch/x86/kernel/efi_32.c |4 ++-

Re: [PATCH 19/19] unify set_tss_desc

2007-12-13 Thread Glauber de Oliveira Costa
Andi Kleen wrote: +static inline void pack_tss(tss_desc *tss, unsigned long addr, + unsigned size, unsigned entry) +{ +#ifdef CONFIG_X86_64 + set_tssldt_descriptor(tss, +addr, entry, size); +#else + pack_descriptor(t

[PATCH 13/19] move constants to desc_defs.h

2007-12-12 Thread Glauber de Oliveira Costa
this patch moves constant definitions regarding descriptor types from desc_32.h to desc_defs.h. The change from defines to enum to comply with previous versions in desc_defs.h Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc_32.h |8 i

[PATCH 19/19] unify set_tss_desc

2007-12-12 Thread Glauber de Oliveira Costa
This patch unifies the set_tss_desc between i386 and x86_64, which can now have a common implementation. After the old functions are removed from desc_{32,64}.h, nothing important is left, and the files can be removed. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- inclu

[PATCH 11/19] change write_gdt_entry signature.

2007-12-12 Thread Glauber de Oliveira Costa
This patch changes the write_gdt_entry function signature. Instead of the old "a" and "b" parameters, it now receives a pointer to a desc_struct, and the size of the entry being handled. This is because x86_64 can have some 16-byte entries as well as 8-byte ones. Signe

[PATCH 14/19] unify non-paravirt parts of desc.h

2007-12-12 Thread Glauber de Oliveira Costa
, constant definitions used in desc_32.h are moved to desc_defs.h Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc.h | 87 ++ include/asm-x86/desc_32.h| 66 include/a

[PATCH 12/19] change write_ldt_entry signature

2007-12-12 Thread Glauber de Oliveira Costa
this patch changes the signature of write_ldt_entry. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> CC: Zachary Amsden <[EMAIL PROTECTED]> CC: Jeremy Fitzhardinge --- arch/x86/kernel/ldt.c |3 +-- arch/x86/kernel/paravirt_32.c |2 +- arch/x86/ker

[PATCH 09/19] introduce fill_ldt

2007-12-12 Thread Glauber de Oliveira Costa
This patch introduces fill_ldt(), which populates a ldt descriptor from a user_desc in once, instead of relying in the LDT_entry_a and LDT_entry_b macros Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/ldt.c|3 +-- arch/x86/kernel/process_64.c

[PATCH 17/19] unify paravirt pieces of descriptor handling

2007-12-12 Thread Glauber de Oliveira Costa
With the types used to access descriptors in x86_64 and i386 now being the same, the code that effectively handles them can now be easily shared. This patch moves the paravirt part of desc_32.h into desc.h, and then, we get paravirt support in x86_64 for free. Signed-off-by: Glauber de Oliveira

[PATCH 10/19] provide tss_desc

2007-12-12 Thread Glauber de Oliveira Costa
Provide a new type, tss_desc, to represent the tss descriptor in a unified way accross x86_64 and i386 Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc_defs.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/a

[PATCH 06/19] change write_idt_entry signature

2007-12-12 Thread Glauber de Oliveira Costa
this patch changes write_idt_entry signature. It now takes a gate_desc instead of the a and b parameters. It will allow it to be later unified between i386 and x86_64. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> CC: Zachary Amsden <[EMAIL PROTECTED]> CC: Jeremy

[PATCH 07/19] introduce ldt_desc type.

2007-12-12 Thread Glauber de Oliveira Costa
this patch introduces ldt_desc type to account for the differences in the ldt descriptor in x86_64 and i386 Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc_64.h |2 +- include/asm-x86/desc_defs.h |4 +++- 2 files changed, 4 insertions

[PATCH 18/19] move _set_gate and its users to a common location

2007-12-12 Thread Glauber de Oliveira Costa
This patch moves _set_gate and its users to desc.h. We can now use common code for x86_64 and i386. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/traps_32.c | 34 include/asm-x86/desc.h

[PATCH 16/19] modify get_desc_base

2007-12-12 Thread Glauber de Oliveira Costa
This patch makes get_desc_base() receive a struct desc_struct, and then uses its internal fields to compute the base address. This is done at both i386 and x86_64, and then it is moved to common header Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/tls.c

[PATCH 15/19] use the same data type for tls_array.

2007-12-12 Thread Glauber de Oliveira Costa
This patch changes the type of tls_array in x86_64 to a desc_struct. Now, both i386 and x86_64 tls_array have the same type, and code accessing it can be shared. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc_64.h |2 +- include/a

[PATCH 08/19] modify write_ldt function

2007-12-12 Thread Glauber de Oliveira Costa
This patch modifies the write_ldt() function to make use of the new struct desc_struct instead of entry_1 and entry_2 entries Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/ldt.c | 15 +++ 1 files changed, 7 insertions(+), 8 deletions(-)

[PATCH 04/19] removed unused variable

2007-12-12 Thread Glauber de Oliveira Costa
This variable is not used anywere, and is then removed Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc_64.h |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/include/asm-x86/desc_64.h b/include/asm-x86/desc_64.h index 1

[PATCH 05/19] introduce gate_desc type.

2007-12-12 Thread Glauber de Oliveira Costa
To account for the differences in gate descriptor in i386 and x86_64 a gate_desc type is introduced. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/traps_32.c |3 ++- include/asm-x86/desc_32.h | 15 --- include/asm-x86/desc_64.h

[PATCH 03/19] change gdt acessor macro name

2007-12-12 Thread Glauber de Oliveira Costa
This patch changes the name of x86_64 macro used to access the per-cpu gdt. It is now equal to the i386 version, which will allow code to be shared. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/setup64.c |2 +- arch/x86/kernel/suspend_64.c

[PATCH 02/19] unify struct desc_ptr

2007-12-12 Thread Glauber de Oliveira Costa
eeded in the C structure definition. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/asm-offsets_32.c |5 ++--- arch/x86/kernel/cpu/common.c |2 +- arch/x86/kernel/doublefault_32.c |2 +- arch/x86/kernel/efi_32.c |4 ++-

[PATCH 01/19] unify desc_struct

2007-12-12 Thread Glauber de Oliveira Costa
auber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/apm_32.c |2 +- arch/x86/kernel/cpu/common.c | 28 ++-- arch/x86/kernel/process_64.c |2 +- arch/x86/kernel/traps_32.c |2 +- include/asm-x86/desc_defs.

[PATCH 0/19 - v3] desc_struct integration

2007-12-12 Thread Glauber de Oliveira Costa
Here it goes a new version of the patchset. It addresses the problems raised, namely: * it does not harm make headers_check anymore. (fill_ldt is moved to desc.h) * it fixes the x86_64 spontaneous boot problem * it does not have a warning at get_desc_base() anymore. -- To unsubscribe from this

Re: [PATCH 0/19] desc_struct integration

2007-12-12 Thread Glauber de Oliveira Costa
Ingo Molnar wrote: * Glauber de Oliveira Costa <[EMAIL PROTECTED]> wrote: Ingo Molnar wrote: * Ingo Molnar <[EMAIL PROTECTED]> wrote: Ingo, in the absense of further complaints, could you please push to the x86 tree? yeah, i've added them. the patches cause a spontaneous

Re: [PATCH 0/19] desc_struct integration

2007-12-12 Thread Glauber de Oliveira Costa
Ingo Molnar wrote: * Ingo Molnar <[EMAIL PROTECTED]> wrote: Ingo, in the absense of further complaints, could you please push to the x86 tree? yeah, i've added them. the patches cause a spontaneous reboot on x86 64-bit, around the time when bootup hits user-space. It's due to one of the 25 pa

[PATCH 5/6] tweak io_64.h for paravirt.

2007-12-12 Thread Glauber de Oliveira Costa
We need something here because we can't call in and out instructions directly. However, we have to be careful, because no indirections are allowed in misc_64.c , and paravirt_ops is a kind of one. So just call it directly there Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]

[PATCH 4/6] prepare time related functions for paravirt

2007-12-12 Thread Glauber de Oliveira Costa
. it also allow for a later-on-game time initialization, as done by i386. Paravirt guests can set a function to do their own initialization this way. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> Acked-by: Jeremy Fitzhard

[PATCH 6/6] prepare x86_64 architecture initialization for paravirt

2007-12-12 Thread Glauber de Oliveira Costa
Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> Acked-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]> Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]> --- arch/x86/kernel/e820_64.c|9 +++-- ar

[PATCH 2/6] export cpu_gdt_descr

2007-12-12 Thread Glauber de Oliveira Costa
With paravirualization, hypervisors needs to handle the gdt, that was right to this point only used at very early inialization code. Hypervisors (lguest being the current case) are commonly modules, so make it an export Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-

[PATCH 3/6] turn priviled operation into a macro in head_64.S

2007-12-12 Thread Glauber de Oliveira Costa
under paravirt, read cr2 cannot be issued directly anymore. So wrap it in a macro, defined to the operation itself in case paravirt is off, but to something else if we have paravirt in the game Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt &

[PATCH 0/6] paravirt patches - the non-integration part

2007-12-12 Thread Glauber de Oliveira Costa
Hi, This series corresponds do older patches in the paravirt series that was neither already applied, nor I will touch again. In general, they do not touch code that can be unified (at least, without being the unification a big problem on its own). They passed through this list a lot of times, so

[PATCH 1/6] export math_state_restore

2007-12-12 Thread Glauber de Oliveira Costa
Export math_state_restore symbol, so it can be used for hypervisors. They are commonly loaded as modules (lguest being an example). Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> Acked-by: Jeremy Fitzhardinge <[

[PATCH 19/19] unify set_tss_desc

2007-12-12 Thread Glauber de Oliveira Costa
This patch unifies the set_tss_desc between i386 and x86_64, which can now have a common implementation. After the old functions are removed from desc_{32,64}.h, nothing important is left, and the files can be removed. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- inclu

[PATCH 18/19] move _set_gate and its users to a common location

2007-12-12 Thread Glauber de Oliveira Costa
This patch moves _set_gate and its users to desc.h. We can now use common code for x86_64 and i386. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/traps_32.c | 34 include/asm-x86/desc.h

[PATCH 16/19] modify get_desc_base

2007-12-12 Thread Glauber de Oliveira Costa
This patch makes get_desc_base() receive a struct desc_struct, and then uses its internal fields to compute the base address. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/tls.c |2 +- arch/x86/mm/fault_32.c |2 +- include/asm-x86/desc.h

[PATCH 14/19] unify non-paravirt parts of desc.h

2007-12-12 Thread Glauber de Oliveira Costa
, constant definitions used in desc_32.h are moved to desc_defs.h Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc.h | 87 ++ include/asm-x86/desc_32.h| 66 include/a

[PATCH 17/19] unify paravirt pieces of descriptor handling

2007-12-12 Thread Glauber de Oliveira Costa
With the types used to access descriptors in x86_64 and i386 now being the same, the code that effectively handles them can now be easily shared. This patch moves the paravirt part of desc_32.h into desc.h, and then, we get paravirt support in x86_64 for free. Signed-off-by: Glauber de Oliveira

[PATCH 15/19] use the same data type for tls_array.

2007-12-12 Thread Glauber de Oliveira Costa
This patch changes the type of tls_array in x86_64 to a desc_struct. Now, both i386 and x86_64 tls_array have the same type, and code accessing it can be shared. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc_64.h |2 +- include/a

[PATCH 12/19] change write_ldt_entry signature

2007-12-12 Thread Glauber de Oliveira Costa
this patch changes the signature of write_ldt_entry. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> CC: Zachary Amsden <[EMAIL PROTECTED]> CC: Jeremy Fitzhardinge --- arch/x86/kernel/ldt.c |3 +-- arch/x86/kernel/paravirt_32.c |2 +- arch/x86/ker

[PATCH 13/19] move constants to desc_defs.h

2007-12-12 Thread Glauber de Oliveira Costa
this patch moves constant definitions regarding descriptor types from desc_32.h to desc_defs.h. The change from defines to enum to comply with previous versions in desc_defs.h Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc_32.h |8 i

[PATCH 11/19] change write_gdt_entry signature.

2007-12-12 Thread Glauber de Oliveira Costa
This patch changes the write_gdt_entry function signature. Instead of the old "a" and "b" parameters, it now receives a pointer to a desc_struct, and the size of the entry being handled. This is because x86_64 can have some 16-byte entries as well as 8-byte ones. Signe

[PATCH 09/19] introduce fill_ldt

2007-12-12 Thread Glauber de Oliveira Costa
This patch introduces fill_ldt(), which populates a ldt descriptor from a user_desc in once, instead of relying in the LDT_entry_a and LDT_entry_b macros Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/ldt.c|3 +-- arch/x86/kernel/process_64.c

[PATCH 10/19] provide tss_desc

2007-12-12 Thread Glauber de Oliveira Costa
Provide a new type, tss_desc, to represent the tss descriptor in a unified way accross x86_64 and i386 Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc_defs.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/a

[PATCH 08/19] modify write_ldt function

2007-12-12 Thread Glauber de Oliveira Costa
This patch modifies the write_ldt() function to make use of the new struct desc_struct instead of entry_1 and entry_2 entries Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/ldt.c | 15 +++ 1 files changed, 7 insertions(+), 8 deletions(-)

[PATCH 06/19] change write_idt_entry signature

2007-12-12 Thread Glauber de Oliveira Costa
this patch changes write_idt_entry signature. It now takes a gate_desc instead of the a and b parameters. It will allow it to be later unified between i386 and x86_64. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> CC: Zachary Amsden <[EMAIL PROTECTED]> CC: Jeremy

[PATCH 05/19] introduce gate_desc type.

2007-12-12 Thread Glauber de Oliveira Costa
To account for the differences in gate descriptor in i386 and x86_64 a gate_desc type is introduced. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/traps_32.c |3 ++- include/asm-x86/desc_32.h | 15 --- include/asm-x86/desc_64.h

[PATCH 04/19] removed unused variable

2007-12-12 Thread Glauber de Oliveira Costa
This variable is not used anywere, and is then removed Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc_64.h |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/include/asm-x86/desc_64.h b/include/asm-x86/desc_64.h index 1

[PATCH 07/19] introduce ldt_desc type.

2007-12-12 Thread Glauber de Oliveira Costa
this patch introduces ldt_desc type to account for the differences in the ldt descriptor in x86_64 and i386 Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/desc_64.h |2 +- include/asm-x86/desc_defs.h |4 +++- 2 files changed, 4 insertions

[PATCH 02/19] unify struct desc_ptr

2007-12-12 Thread Glauber de Oliveira Costa
eeded in the C structure definition. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/asm-offsets_32.c |5 ++--- arch/x86/kernel/cpu/common.c |2 +- arch/x86/kernel/doublefault_32.c |2 +- arch/x86/kernel/efi_32.c |4 ++-

[PATCH 03/19] change gdt acessor macro name

2007-12-12 Thread Glauber de Oliveira Costa
This patch changes the name of x86_64 macro used to access the per-cpu gdt. It is now equal to the i386 version, which will allow code to be shared. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/setup64.c |2 +- arch/x86/kernel/suspend_64.c

[PATCH 01/19] unify desc_struct

2007-12-12 Thread Glauber de Oliveira Costa
auber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/apm_32.c |2 +- arch/x86/kernel/cpu/common.c | 28 ++-- arch/x86/kernel/process_64.c |2 +- arch/x86/kernel/traps_32.c |2 +- include/asm-x86/desc_defs.

[PATCH 0/19] desc_struct integration

2007-12-12 Thread Glauber de Oliveira Costa
Since the last version of it received no comments on the interfaces, here it goes a version, that I feel ready for inclusion. The comments regarding style, specially the elimination of the #defines in the desc_struct definition were merged. I also implemented the vmi functions, missing last time.

[PATCH 3/3] [PATCH] remove arch specific segment headers

2007-12-07 Thread Glauber de Oliveira Costa
This file puts the remainder of the arch specificic segment headers in segment.h. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/segment.h| 177 +- include/asm-x86/segment_32.h

[PATCH 0/3] Unify segment headers

2007-12-07 Thread Glauber de Oliveira Costa
Hi, In this patch, I unify segment_32.h and segment_64.h into segment.h They have some common parts, but a considerable ammount of code still has to be around ifdefs. The only patch that is really important to paravirt is the first one, that moves a paravirt definition into the common header. Th

[PATCH 1/3] [PATCH] put get_kernel_rpl in a common location

2007-12-07 Thread Glauber de Oliveira Costa
This macro is useful for both i386 and x86_64, so put it in a common location, where both arches can grab it. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/segment.h|9 + include/asm-x86/segment_32.h |3 --- 2 files changed, 9 inse

[PATCH 2/3] [PATCH] unify common parts of segment.h

2007-12-07 Thread Glauber de Oliveira Costa
Although segment handling in i386 and x86_64 are very different, there's a common part. Put them in segment.h instead of arch specific headers Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/segment.h| 16 include/asm-x86/s

Re: [PATCH 1/19] unify desc_struct

2007-12-06 Thread Glauber de Oliveira Costa
t : 4, avl : 1, l : 1, d : 1, g : 1, base2 :8; }; }; }; Which is fine, it's all the same in the end. Just with more shift rights, and more visual pollution. -- Glauber de Oliveira Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serio

<    1   2   3   4   5   6   >