Re: [PATCH 4/4] optimize and simplify get_cycles_sync()

2007-03-09 Thread Joerg Roedel
On Tue, Mar 06, 2007 at 04:25:41PM -0800, Andrew Morton wrote: On Wed, 28 Feb 2007 15:25:54 +0100 Joerg Roedel [EMAIL PROTECTED] wrote: From: Joerg Roedel [EMAIL PROTECTED] This patch simplifies the get_cycles_sync() function by removing the #ifdefs from it. Further it introduces

[PATCH 0/4 TRY#3] improve alternative instruction code and optimize get_cycles_sync

2007-03-09 Thread Joerg Roedel
: * rebased to current linus git tree * replaced RDTSCP usage in get_cycles_sync with the opcode to make it compile with older binutils -- Joerg Roedel Operating System Research Center AMD Saxony LLC Co. KG - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

[PATCH 1/4 TRY#3] i386: extend alternative instructions framework

2007-03-09 Thread Joerg Roedel
From: Joerg Roedel [EMAIL PROTECTED] This patch extends the alternative instructions framework to support 2 alternative instructions. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] -- Joerg Roedel Operating System Research Center AMD Saxony LLC Co. KG diff --git a/arch/i386/kernel

[PATCH 2/4 TRY#3] x86_64: changes to x86_64 architecture for alternative instruction improvements

2007-03-09 Thread Joerg Roedel
From: Joerg Roedel [EMAIL PROTECTED] In this patch updates the x86_64 architecture to work with the changes to alternative instructions in i386 Signed-off-by: Joerg Roedel [EMAIL PROTECTED] -- Joerg Roedel Operating System Research Center AMD Saxony LLC Co. KG diff --git a/arch/x86_64/lib

[PATCH 3/4 TRY#3] i386: add the X86_FEATURE_SYNC_RDTSC flag

2007-03-09 Thread Joerg Roedel
From: Joerg Roedel [EMAIL PROTECTED] This patch adds the X86_FEATURE_SYNC_RDTSC to the i386 architecture. This is very helpfull to simplify the get_cycles_sync() function and remove the #ifdefs from it. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] -- Joerg Roedel Operating System Research

[PATCH 4/4 TRY#3] optimize and simplify get_cycles_sync()

2007-03-09 Thread Joerg Roedel
From: Joerg Roedel [EMAIL PROTECTED] This patch simplifies the get_cycles_sync() function by removing the #ifdefs from it. Further it introduces an optimization for AMD processors. There the RDTSCP instruction is used instead of CPUID;RDTSC which is helpfull if the kernel runs as a KVM guest

Re: [PATCH 4/4 TRY#3] optimize and simplify get_cycles_sync()

2007-03-12 Thread Joerg Roedel
On Fri, Mar 09, 2007 at 08:10:03PM +0200, Avi Kivity wrote: Joerg Roedel wrote: From: Joerg Roedel [EMAIL PROTECTED] This patch simplifies the get_cycles_sync() function by removing the #ifdefs from it. Further it introduces an optimization for AMD processors. There the RDTSCP instruction

Re: [discuss] [PATCH 4/4 TRY#3] optimize and simplify get_cycles_sync()

2007-03-12 Thread Joerg Roedel
On Mon, Mar 12, 2007 at 02:09:18PM +0100, Andi Kleen wrote: On Monday 12 March 2007 14:02, Joerg Roedel wrote: On Fri, Mar 09, 2007 at 08:10:03PM +0200, Avi Kivity wrote: Joerg Roedel wrote: From: Joerg Roedel [EMAIL PROTECTED] This patch simplifies the get_cycles_sync() function

Re: [discuss] [PATCH 4/4 TRY#3] optimize and simplify get_cycles_sync()

2007-03-12 Thread Joerg Roedel
On Mon, Mar 12, 2007 at 02:29:43PM +0100, Michael Matz wrote: Hi Joerg, On Mon, 12 Mar 2007, Joerg Roedel wrote: +#define RDTSCP .byte 0x0f, 0x01, 0xf9 +alternative_io_two(cpuid\nrdtsc, + rdtsc, X86_FEATURE_SYNC_RDTSC

Re: [PATCH 4/4 TRY#3] optimize and simplify get_cycles_sync()

2007-03-12 Thread Joerg Roedel
On Mon, Mar 12, 2007 at 06:08:11PM +0200, Avi Kivity wrote: Joerg Roedel wrote: On Fri, Mar 09, 2007 at 08:10:03PM +0200, Avi Kivity wrote: Joerg Roedel wrote: From: Joerg Roedel [EMAIL PROTECTED] This patch simplifies the get_cycles_sync() function by removing the #ifdefs from

[PATCH] x86_64: fix cpu MHz reporting on constant_tsc cpus

2007-03-13 Thread Joerg Roedel
From: Mark Langsdorf [EMAIL PROTECTED] From: Joerg Roedel [EMAIL PROTECTED] This patch fixes the reporting of cpu_mhz in /proc/cpuinfo on CPUs with a constant TSC rate and a kernel with disabled cpufreq. Signed-off-by: Mark Langsdorf [EMAIL PROTECTED] Signed-off-by: Joerg Roedel [EMAIL PROTECTED

Re: [discuss] [PATCH] x86_64: fix cpu MHz reporting on constant_tsc cpus

2007-03-15 Thread Joerg Roedel
On Thu, Mar 15, 2007 at 12:01:09AM +0100, Andi Kleen wrote: On Tuesday 13 March 2007 11:00, Joerg Roedel wrote: From: Mark Langsdorf [EMAIL PROTECTED] From: Joerg Roedel [EMAIL PROTECTED] This patch fixes the reporting of cpu_mhz in /proc/cpuinfo on CPUs with a constant TSC rate

Re: [2.6.20-get13] KVM-12 won't build

2007-02-16 Thread Joerg Roedel
mismatch make[1]: *** [kvmctl.o] Error 1 I don't see a kvm-13 on the KVM website. You will find the kvm-13 release in the SourceForge download area of KVM[1]. Kvm-12 is still required for 2.6.20 kernels. Joerg [1] http://sourceforge.net/project/showfiles.php?group_id=180599 -- Joerg

[PATCH] KVM SVM: intercept SMI to handle it at host level

2007-02-16 Thread Joerg Roedel
From: Joerg Roedel [EMAIL PROTECTED] This patch changes the SVM code to intercept SMIs and handle it outside the guest. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] -- Joerg Roedel Operating System Research Center AMD Saxony LLC Co. KG diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index

[PATCH 0/3] extend alternative instruction framework to support more than one alternative

2007-02-19 Thread Joerg Roedel
is scanned and the first matching entry wins. The patches should apply cleanly to recent Linus git kernels. Regards, Joerg -- Joerg Roedel Operating System Research Center AMD Saxony LLC Co. KG - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL

[PATCH 3/3] optimize get_cycles_sync for Linux as KVM guest

2007-02-19 Thread Joerg Roedel
From: Joerg Roedel [EMAIL PROTECTED] This patch modifies the get_cycles_sync() function on i386 and x86_64 to use the RDTSCP (if it is available) instruction to synchronize with the CPU core and not CPUID. This is especially usefull when running Linux as a KVM guest because CPUID is intercepted

Re: [discuss] [PATCH 1/3] x86_64: additions to the i386 alternative extensions to support x86_64 architecture

2007-02-19 Thread Joerg Roedel
[Patch 2/3] of course. -- Joerg Roedel Operating System Research Center AMD Saxony LLC Co. KG - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read

[PATCH 1/3] i386: extend alternative instruction framwork

2007-02-19 Thread Joerg Roedel
From: Joerg Roedel [EMAIL PROTECTED] This patch extends the alternative instruction framework to support an arbitrary number of alternatives on the i386 architecture. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] -- Joerg Roedel Operating System Research Center AMD Saxony LLC Co. KG diff

[PATCH 1/3] x86_64: additions to the i386 alternative extensions to support x86_64 architecture

2007-02-19 Thread Joerg Roedel
From: Joerg Roedel [EMAIL PROTECTED] This patch adds the necessary changes to extend the i386 alternative instruction framework extension on the x86_64 architecture. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] -- Joerg Roedel Operating System Research Center AMD Saxony LLC Co. KG diff --git

[PATCH] riscom8: fix use of deprecated functions

2007-03-25 Thread Joerg Roedel
From: Joerg Roedel [EMAIL PROTECTED] This patch replaces the deprecated functions in drivers/char/riscom8.c and fixes the compile warnings they produced. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c index 7014525..54cb8cb 100644

Re: [PATCH] riscom8: fix use of deprecated functions

2007-03-26 Thread Joerg Roedel
On Mon, Mar 26, 2007 at 10:52:09PM +0400, Alexey Dobriyan wrote: On Sun, Mar 25, 2007 at 10:36:02PM +0200, Joerg Roedel wrote: This patch replaces the deprecated functions in drivers/char/riscom8.c and fixes the compile warnings they produced. That's not the point of exercise. Make it SMP

Re: [discuss] [PATCH 1/3] x86_64: additions to the i386 alternative extensions to support x86_64 architecture

2007-02-20 Thread Joerg Roedel
On Mon, Feb 19, 2007 at 10:29:22PM +0100, Andi Kleen wrote: On Monday 19 February 2007 20:07, Joerg Roedel wrote: From: Joerg Roedel [EMAIL PROTECTED] This patch adds the necessary changes to extend the i386 alternative instruction framework extension on the x86_64 architecture. Looks

Re: [kvm-devel] [PATCH 10/13] KVM: Wire up hypercall handlers to a central arch-independent location

2007-02-22 Thread Joerg Roedel
= 0x5a5a; break; default: BUG(); Is it a good idea to call BUG() on an undefined hypercall? I assume its better to inform the guest that is has issued an illegal call... Joerg -- Joerg Roedel Operating System Research Center AMD Saxony LLC Co. KG

[PATCH 0/4] improve alternative instruction code and optimize get_cycles_sync

2007-02-28 Thread Joerg Roedel
() function. The optimization changes this function to use RDTSCP instead of CPUID;RDTSC if this instruction is available. Don't use CPUID there is really important if the kernel runs as a KVM guest, because this instruction is intercepted and causes an expensive VMEXIT. -- Joerg Roedel Operating System

[PATCH 1/4] i386: extend alternative instructions framework

2007-02-28 Thread Joerg Roedel
From: Joerg Roedel [EMAIL PROTECTED] This patch extends the alternative instructions framework to support 2 alternative instructions. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] -- Joerg Roedel Operating System Research Center AMD Saxony LLC Co. KG diff --git a/arch/i386/kernel

[PATCH 2/4] x86_64: changes to x86_64 architecture for alternative instruction improvements

2007-02-28 Thread Joerg Roedel
From: Joerg Roedel [EMAIL PROTECTED] In this patch updates the x86_64 architecture to work with the changes to alternative instructions in i386 Signed-off-by: Joerg Roedel [EMAIL PROTECTED] -- Joerg Roedel Operating System Research Center AMD Saxony LLC Co. KG diff --git a/arch/x86_64/lib

[PATCH 4/4] optimize and simplify get_cycles_sync()

2007-02-28 Thread Joerg Roedel
From: Joerg Roedel [EMAIL PROTECTED] This patch simplifies the get_cycles_sync() function by removing the #ifdefs from it. Further it introduces an optimization for AMD processors. There the RDTSCP instruction is used instead of CPUID;RDTSC which is helpfull if the kernel runs as a KVM guest

[PATCH 3/4] i386: add the X86_FEATURE_SYNC_RDTSC flag

2007-02-28 Thread Joerg Roedel
From: Joerg Roedel [EMAIL PROTECTED] This patch adds the X86_FEATURE_SYNC_RDTSC to the i386 architecture. This is very helpfull to simplify the get_cycles_sync() function and remove the #ifdefs from it. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] -- Joerg Roedel Operating System Research

[PATCH] remove constant_tsc reporting from /proc/cpuinfo' power flags

2007-03-01 Thread Joerg Roedel
From: Joerg Roedel [EMAIL PROTECTED] This patch removes the reporting of the constant_tsc flag from the power management field in /proc/cpuinfo. The NULL value there was replaced by because the former would result in a printout of [8] if the flag is set. Signed-off-by: Joerg Roedel [EMAIL

[PATCH 0/2] add reporting of SVM flags to /proc/cpuinfo

2007-03-05 Thread Joerg Roedel
This small patch series introduces the reporting of the SVM revision, the number of ASIDs and the flags in /proc/cpuinfo on SVM capable AMD processors. The patches are for i386 and for x86_64 architectures. -- Joerg Roedel Operating System Research Center AMD Saxony LLC Co. KG

[PATCH 1/2] x86_64: add reporting of SVM flags to /proc/cpuinfo

2007-03-05 Thread Joerg Roedel
From: Joerg Roedel [EMAIL PROTECTED] This patch adds the advanced SVM reporting to /proc/cpuinfo on the x86_64 architecture. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] -- Joerg Roedel Operating System Research Center AMD Saxony LLC Co. KG diff --git a/arch/x86_64/kernel/setup.c b/arch

[PATCH 2/2] i386: add reporting of SVM flags to /proc/cpuinfo

2007-03-05 Thread Joerg Roedel
From: Joerg Roedel [EMAIL PROTECTED] This patch adds the advanced SVM reporting in /proc/cpuinfo to the i386 architecture. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] -- Joerg Roedel Operating System Research Center AMD Saxony LLC Co. KG diff --git a/arch/i386/kernel/cpu/amd.c b/arch/i386

Re: [PATCH 1/2] x86_64: add reporting of SVM flags to /proc/cpuinfo

2007-03-05 Thread Joerg Roedel
On Mon, Mar 05, 2007 at 05:46:27PM +0300, Michael Tokarev wrote: Joerg Roedel wrote: +++ b/arch/x86_64/kernel/setup.c + static char *x86_svm_flags[] = { + npt, + lbrv, + svmlock, + }; A nitpick: static const char *const x86_svm_flags

Re: [PATCH 1/2] x86_64: add reporting of SVM flags to /proc/cpuinfo

2007-03-06 Thread Joerg Roedel
On Mon, Mar 05, 2007 at 04:25:31PM +0100, Andi Kleen wrote: On Monday 05 March 2007 15:39, Joerg Roedel wrote: From: Joerg Roedel [EMAIL PROTECTED] This patch adds the advanced SVM reporting to /proc/cpuinfo on the x86_64 architecture. Adding more fields to /proc/cpuinfo is always

Re: [linux-dvb] [PATCH] Userspace tuner

2007-09-14 Thread Joerg Roedel
On Fri, Sep 14, 2007 at 11:57:59AM +0400, Manu Abraham wrote: What do you think about IOMMU? Just because AMD or INTEL want to invent some whizzy new technology it doesn't say anything about the TV card development and retail business. Intel and AMD have teams of Linux engineers

Re: [linux-dvb] [PATCH] Userspace tuner

2007-09-14 Thread Joerg Roedel
On Fri, Sep 14, 2007 at 04:00:30PM +0400, Manu Abraham wrote: Joerg Roedel wrote: On Fri, Sep 14, 2007 at 11:57:59AM +0400, Manu Abraham wrote: What do you think about IOMMU? Just because AMD or INTEL want to invent some whizzy new technology it doesn't say anything about the TV card

Re: [linux-dvb] [PATCH] Userspace tuner

2007-09-14 Thread Joerg Roedel
On Fri, Sep 14, 2007 at 08:56:40PM +0400, Manu Abraham wrote: I do understand that (an earlier reply from Grant Grundler on the same [1], while working on something else), but that wasn't exactly what i was getting at. The bridges are in fact tied up with a certain CPU class. Though your

Re: [kvm-devel] [PATCH 1/8] KVM: PVDMA Host: Handle reqeusts for guest DMA mappings

2007-11-12 Thread Joerg Roedel
On Wed, Nov 07, 2007 at 04:21:02PM +0200, Amit Shah wrote: @@ -1649,6 +1913,15 @@ int kvm_emulate_hypercall(struct kvm_vcpu *vcpu) } switch (nr) { + case KVM_PV_DMA_MAP: + ret = pv_map_hypercall(vcpu, a0, a1); + break; + case KVM_PV_DMA_UNMAP:

Re: [kvm-devel] [PATCH 3/8] KVM: PVDMA Guest: Guest-side routines for paravirtualized DMA

2007-11-12 Thread Joerg Roedel
On Mon, Nov 12, 2007 at 12:50:01PM +0200, Muli Ben-Yehuda wrote: On Wed, Nov 07, 2007 at 04:21:04PM +0200, Amit Shah wrote: We make the dma_mapping_ops structure to point to our structure so that every DMA access goes through us. (This is the reason this only works for 64-bit guest.

[PATCH 3/3] x86_64: use __PAGE_KERNEL_EXEC in ioremap_64.c

2007-12-02 Thread Joerg Roedel
This patch replaces the manual permission setup for pages in ioremap_64.c with the pre-defined __PAGE_KERNEL_EXEC value. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- arch/x86/mm/ioremap_64.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/ioremap_64.c

[PATCH 0/3] x86_64: some minor paging cleanups

2007-12-02 Thread Joerg Roedel
This small series of patches cleans up the definition and use of the _PAGE_* and __PAGE_KERNEL* permissions for the x86_64 code in the x86 architecture a little bit. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More

[PATCH 1/3] x86_64: define all _PAGE_* in terms of _PAGE_BIT_*

2007-12-02 Thread Joerg Roedel
This patch defines the _PAGE_* paging attributes in pgtable_64.h in terms of the former defined _PAGE_BIT_* values. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- include/asm-x86/pgtable_64.h | 27 +++ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git

[PATCH 2/3] x86_64: use __PAGE_KERNEL* instead of _KERNPG_TABLE for 2MB PTEs in memory initialization

2007-12-02 Thread Joerg Roedel
This minor cleanup replaces _KERNPG_TABLE with the __PAGE_KERNEL* for 2MB PTEs in the x86_64 memory initialization code. The __PAGE_KERNEL* defines are more appropriate for PTEs. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- arch/x86/mm/init_64.c |4 ++-- 1 files changed, 2 insertions

Re: [PATCH 1/3] x86_64: define all _PAGE_* in terms of _PAGE_BIT_*

2007-12-04 Thread Joerg Roedel
On Tue, Dec 04, 2007 at 01:38:09PM +0100, Ingo Molnar wrote: * Joerg Roedel [EMAIL PROTECTED] wrote: +#define _PAGE_PRESENT (_AC(1,UL)_PAGE_BIT_PRESENT) please run patches through scripts/checkpatch.pl, it gives: total: 10 errors, 0 warnings, 42 lines checked (please send

[PATCH 2/3] x86_64: use __PAGE_KERNEL* instead of _KERNPG_TABLE for 2MB PTEs in memory initialization

2007-12-04 Thread Joerg Roedel
This minor cleanup replaces _KERNPG_TABLE with the __PAGE_KERNEL* for 2MB PTEs in the x86_64 memory initialization code. The __PAGE_KERNEL* defines are more appropriate for PTEs. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- arch/x86/mm/init_64.c |4 ++-- 1 files changed, 2 insertions

[PATCH 0/3] x86_64: some minor paging cleanups

2007-12-04 Thread Joerg Roedel
This small series of patches cleans up the definition and use of the _PAGE_* and __PAGE_KERNEL* permissions for the x86_64 code in the x86 architecture a little bit. The scripts are checked by checkpatch.pl now. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the

[PATCH 1/3] x86_64: define all _PAGE_* in terms of _PAGE_BIT_*

2007-12-04 Thread Joerg Roedel
This patch defines the _PAGE_* paging attributes in pgtable_64.h in terms of the former defined _PAGE_BIT_* values. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- include/asm-x86/pgtable_64.h | 27 +++ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git

[PATCH 3/3] x86_64: use __PAGE_KERNEL_EXEC in ioremap_64.c

2007-12-04 Thread Joerg Roedel
This patch replaces the manual permission setup for pages in ioremap_64.c with the pre-defined __PAGE_KERNEL_EXEC value. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- arch/x86/mm/ioremap_64.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/ioremap_64.c

Re: [PATCH 1/3] x86_64: define all _PAGE_* in terms of _PAGE_BIT_*

2007-12-05 Thread Joerg Roedel
On Tue, Dec 04, 2007 at 10:07:54PM +0100, Ingo Molnar wrote: * Joerg Roedel [EMAIL PROTECTED] wrote: On Tue, Dec 04, 2007 at 01:38:09PM +0100, Ingo Molnar wrote: * Joerg Roedel [EMAIL PROTECTED] wrote: +#define _PAGE_PRESENT (_AC(1,UL)_PAGE_BIT_PRESENT) please run

[PATCH] x86_64: some whitespace cleanups in paging code

2007-12-05 Thread Joerg Roedel
This patch does some whitespace cleanups in the paging code to fix some checkpatch.pl warnings of my formerly merged cleanup patches. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- arch/x86/mm/init_64.c|2 +- include/asm-x86/pgtable_64.h | 22 +++--- 2 files

Re: [PATCH] x86_64: some whitespace cleanups in paging code

2007-12-05 Thread Joerg Roedel
On Wed, Dec 05, 2007 at 05:37:24PM +0100, Heiko Carstens wrote: On Wed, Dec 05, 2007 at 03:40:12PM +0100, Joerg Roedel wrote: This patch does some whitespace cleanups in the paging code to fix some checkpatch.pl warnings of my formerly merged cleanup patches

Re: [PATCH 1/3] x86_64: define all _PAGE_* in terms of _PAGE_BIT_*

2007-12-05 Thread Joerg Roedel
On Wed, Dec 05, 2007 at 12:27:58PM +0100, Ingo Molnar wrote: * Joerg Roedel [EMAIL PROTECTED] wrote: please run patches through scripts/checkpatch.pl, it gives: total: 10 errors, 0 warnings, 42 lines checked (please send a followup cleanup patch - i picked up your

Re: [kvm-devel] Performance overhead of get_cycles_sync

2007-12-11 Thread Joerg Roedel
On Tue, Dec 11, 2007 at 03:27:17PM +0100, Ingo Molnar wrote: * Dor Laor [EMAIL PROTECTED] wrote: Here [include/asm-x86/tsc.h]: /* Like get_cycles, but make sure the CPU is synchronized. */ static __always_inline cycles_t get_cycles_sync(void) { unsigned long long ret;

Whats the purpose of get_cycles_sync()

2007-10-30 Thread Joerg Roedel
Hi, I would like to answer what the special purpose of the get_cycles_sync() function is in the x86 architecture. In special I ask myself why this function has to be *sync*? I mean, the sync should guarantee here that the CPU does not execute the RDTSC instruction out-of-order, thats clear. But

Re: Whats the purpose of get_cycles_sync()

2007-10-31 Thread Joerg Roedel
Hi Andi, On Tue, Oct 30, 2007 at 09:21:02PM +0100, Andi Kleen wrote: Joerg Roedel [EMAIL PROTECTED] writes: I would like to answer what the special purpose of the get_cycles_sync() function is in the x86 architecture. In special I ask myself why this function has to be *sync*? Vojtech

Re: Whats the purpose of get_cycles_sync()

2007-10-31 Thread Joerg Roedel
Hi Vojtech, On Tue, Oct 30, 2007 at 11:02:09PM +0100, Vojtech Pavlik wrote: The K8's still guarantee that subsequent RDTSCs return increasing values, even if the processor reorders them. What could have been happening then was that the RDTSC instruction might have been reordered by the CPU

[PATCH 0/2] x86: MCE optimization and cleanups

2007-10-19 Thread Joerg Roedel
This patchset includes two patches. 1. Checks for the MCA fetures as early as possible and signedness fixup. 2. Minor coding style cleanup. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at

[PATCH 1/2] x86: MCE optimization/refactoring

2007-10-19 Thread Joerg Roedel
Egger [EMAIL PROTECTED] Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- arch/x86/kernel/cpu/mcheck/k7.c |6 +- arch/x86/kernel/cpu/mcheck/mce.c | 12 ++-- arch/x86/kernel/cpu/mcheck/mce.h |2 +- arch/x86/kernel/cpu/mcheck/p5.c |4 arch/x86/kernel/cpu/mcheck/p6.c

[PATCH 2/2] x86: mce minor indent cleanup

2007-10-19 Thread Joerg Roedel
remove one indent level Signed-off-by: Christoph Egger [EMAIL PROTECTED] Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- arch/x86/kernel/cpu/mcheck/mce.c | 40 +++--- 1 files changed, 20 insertions(+), 20 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck

Re: [PATCH] x86: rename iommu.h to gart.h

2007-10-19 Thread Joerg Roedel
On Fri, Oct 19, 2007 at 02:40:25PM +0200, Muli Ben-Yehuda wrote: On Fri, Oct 19, 2007 at 02:38:11PM +0200, Joerg Roedel wrote: This patch renames the include file asm-x86/iommu.h to asm-x86/gart.h to make clear to which IOMMU implementation it belongs. The patch also adds GART

[PATCH] x86: rename iommu.h to gart.h

2007-10-19 Thread Joerg Roedel
This patch renames the include file asm-x86/iommu.h to asm-x86/gart.h to make clear to which IOMMU implementation it belongs. The patch also adds GART to the Kconfig line. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- arch/x86/kernel/aperture_64.c |2 +- arch/x86/kernel/early

[PATCH 2/4] x86 gart: rename CONFIG_IOMMU to CONFIG_GART_IOMMU

2007-10-23 Thread Joerg Roedel
This patch renames the IOMMU config option to GART_IOMMU because in fact it means the GART and not general support for an IOMMU on x86. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- arch/x86/kernel/Makefile_64|2 +- arch/x86/kernel/early-quirks.c |2 +- arch/x86/kernel/pci-dma_64

[PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread Joerg Roedel
This patch renames the 4 symbols iommu_hole_init(), iommu_aperture, iommu_aperture_allowed, iommu_aperture_disabled. It replaces the iommu_ with gart_ in the symbol name. All these symbols are only used for the GART implementation of IOMMUs. Signed-off-by: Joerg Roedel [EMAIL PROTECTED

[PATCH 3/4] x86 gart: make some variables and functions static

2007-10-23 Thread Joerg Roedel
This patch makes some functions and variables static in pci-gart_64.c which are not used somewhere else. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- arch/x86/kernel/pci-gart_64.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/pci-gart_64.c b

[PATCH 0/4] x86: some GART cleanups

2007-10-23 Thread Joerg Roedel
This series of patches contains cleanups for the GART IOMMU implementation in Linux. It mostly renames symbols to make clear that they belong only to the GART and not to the implementations for other IOMMUs. It also makes some unnecessary exported functions static in the GART implementation. -

[PATCH 1/4] x86 gart: rename iommu.h to gart.h

2007-10-23 Thread Joerg Roedel
This patch renames the include file asm-x86/iommu.h to asm-x86/gart.h to make clear to which IOMMU implementation it belongs. The patch also adds GART to the Kconfig line. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- arch/x86/kernel/aperture_64.c |2 +- arch/x86/kernel/early

Re: [PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread Joerg Roedel
On Tue, Oct 23, 2007 at 07:43:47PM +0200, Andi Kleen wrote: On Tuesday 23 October 2007 19:41:33 Joerg Roedel wrote: This patch renames the 4 symbols iommu_hole_init(), iommu_aperture, iommu_aperture_allowed, iommu_aperture_disabled. It replaces the iommu_ with gart_ in the symbol name

Re: [PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread Joerg Roedel
On Tue, Oct 23, 2007 at 08:10:54PM +0200, Andi Kleen wrote: On Tuesday 23 October 2007 20:04:36 H. Peter Anvin wrote: Dave Jones wrote: On Tue, Oct 23, 2007 at 07:47:11PM +0200, Joerg Roedel wrote: On Tue, Oct 23, 2007 at 07:43:47PM +0200, Andi Kleen wrote: On Tuesday 23 October

[PATCH 1/4] x86 gart: rename iommu.h to gart.h

2007-10-24 Thread Joerg Roedel
This patch renames the include file asm-x86/iommu.h to asm-x86/gart.h to make clear to which IOMMU implementation it belongs. The patch also adds GART to the Kconfig line. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] Acked-by: Muli Ben-Yehuda [EMAIL PROTECTED] --- arch/x86/kernel/aperture_64.c

[PATCH 3/4] x86 gart: make some variables and functions static

2007-10-24 Thread Joerg Roedel
This patch makes some functions and variables static in pci-gart_64.c which are not used somewhere else. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] Acked-by: Muli Ben-Yehuda [EMAIL PROTECTED] --- arch/x86/kernel/pci-gart_64.c |8 1 files changed, 4 insertions(+), 4 deletions

[PATCH 2/4] x86 gart: rename CONFIG_IOMMU to CONFIG_GART_IOMMU

2007-10-24 Thread Joerg Roedel
This patch renames the IOMMU config option to GART_IOMMU because in fact it means the GART and not general support for an IOMMU on x86. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] Acked-by: Muli Ben-Yehuda [EMAIL PROTECTED] --- arch/x86/kernel/Makefile_64|2 +- arch/x86/kernel/early

[PATCH 0/4] x86: some GART cleanups

2007-10-24 Thread Joerg Roedel
- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-24 Thread Joerg Roedel
This patch renames the 4 symbols iommu_hole_init(), iommu_aperture, iommu_aperture_allowed, iommu_aperture_disabled. All these symbols are only used for the GART implementation of IOMMUs. It adds and additional gart_ prefix to them. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- arch/x86

[PATCH 0/4] x86: some GART cleanups

2007-10-24 Thread Joerg Roedel
This series of patches contains cleanups for the GART IOMMU implementation in Linux. It mostly renames symbols to make clear that they belong only to the GART and not to the implementations for other IOMMUs. It also makes some unnecessary exported functions static in the GART implementation. The

Re: [PATCH 12/19] x86, irq: Add data structure to keep AMD specific irq remapping information

2012-09-25 Thread Joerg Roedel
On Sun, Aug 26, 2012 at 08:21:26PM +0200, Sebastian Andrzej Siewior wrote: On Mon, Aug 20, 2012 at 03:55:58PM +0200, Joerg Roedel wrote: --- a/arch/x86/include/asm/hw_irq.h +++ b/arch/x86/include/asm/hw_irq.h @@ -101,6 +101,7 @@ static inline void set_io_apic_irq_attr(struct

Re: [PATCH 10/19] x86, io_apic: Introduce function pointer for setup_timer_IRQ0_pin

2012-09-25 Thread Joerg Roedel
On Sun, Aug 26, 2012 at 08:16:03PM +0200, Sebastian Andrzej Siewior wrote: On Mon, Aug 20, 2012 at 03:55:56PM +0200, Joerg Roedel wrote: diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c index 827f8a1..71824fc 100644 --- a/drivers/iommu/irq_remapping.c +++ b

Re: [PATCH 15/19] x86, irq: Move irq_remapped() check into free_remapped_irq

2012-09-25 Thread Joerg Roedel
On Sun, Aug 26, 2012 at 08:27:55PM +0200, Sebastian Andrzej Siewior wrote: On Mon, Aug 20, 2012 at 03:56:01PM +0200, Joerg Roedel wrote: --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -2981,8 +2981,8 @@ void destroy_irq(unsigned int irq

Re: [PATCH 16/19] x86, irq: Introduce setup_remapped_irq()

2012-09-25 Thread Joerg Roedel
On Sun, Aug 26, 2012 at 08:30:30PM +0200, Sebastian Andrzej Siewior wrote: On Mon, Aug 20, 2012 at 03:56:02PM +0200, Joerg Roedel wrote: --- a/arch/x86/include/asm/irq_remapping.h +++ b/arch/x86/include/asm/irq_remapping.h @@ -44,6 +44,9 @@ extern void compose_remapped_msi_msg(struct

Re: [PATCH 17/19] x86, msi: Introduce x86_msi.compose_msi_msg call-back

2012-09-25 Thread Joerg Roedel
On Sun, Aug 26, 2012 at 08:41:40PM +0200, Sebastian Andrzej Siewior wrote: On Mon, Aug 20, 2012 at 03:56:03PM +0200, Joerg Roedel wrote: This call-back points to the right function for initializing the msi_msg structure. So you pull out the compose_remapped_msi_msg() out of msi_compose_msg

Re: [PATCH 18/19] x86, io_apic: Introduce eoi_ioapic_pin call-back

2012-09-25 Thread Joerg Roedel
On Sun, Aug 26, 2012 at 08:52:33PM +0200, Sebastian Andrzej Siewior wrote: Basically you shuffle the code from up there, down there and call from behind a function pointer. There are two things different this time: - no version check = 0x20 I belive this is obsolete since this runs only on

[PATCH 09/19] x86, io_apic: Move irq_remapping_enabled checks out of check_timer()

2012-09-26 Thread Joerg Roedel
Move these checks to IRQ remapping code by introducing the panic_on_irq_remap() function. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/irq_remapping.h |5 + arch/x86/kernel/apic/io_apic.c |6 ++ drivers/iommu/irq_remapping.c|6

[PATCH 16/19] x86, irq: Introduce setup_remapped_irq()

2012-09-26 Thread Joerg Roedel
This function does irq-remapping specific interrupt setup like modifying the chip defaults. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/irq_remapping.h |9 + arch/x86/kernel/apic/io_apic.c | 13 +++-- drivers/iommu/irq_remapping.c

[PATCH 01/19] x86, apic: Move irq_remapping_enabled checks into IRQ-remapping code

2012-09-26 Thread Joerg Roedel
Move the three easy to move checks in the x86' apic.c file into the IRQ-remapping code. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kernel/apic/apic.c |9 +++-- drivers/iommu/irq_remapping.c | 11 +-- 2 files changed, 12 insertions(+), 8 deletions(-) diff

[PATCH 00/19 v3] Improve IRQ remapping abstraction in x86 core code

2012-09-26 Thread Joerg Roedel
Hi, here is the third version of the patch-set to improve the abstraction of interrupt remapping in the x86 core code. A more detailed description can be found in the original post at: https://lkml.org/lkml/2012/8/7/317 Changes from v2-v3: * Rebased to v3.6-rc7 * Worked

[PATCH 15/19] x86, irq: Move irq_remapped() check into free_remapped_irq

2012-09-26 Thread Joerg Roedel
The function is called unconditionally now in IO-APIC code removing another irq_remapped() check from x86 core code. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kernel/apic/io_apic.c |4 ++-- drivers/iommu/irq_remapping.c |5 - 2 files changed, 6 insertions(+), 3

[PATCH 05/19] x86, hpet: Introduce x86_msi_ops.setup_hpet_msi

2012-09-26 Thread Joerg Roedel
This function pointer can be overwritten by the IRQ remapping code. The irq_remapping_enabled check can be removed from default_setup_hpet_msi. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/hpet.h |5 +++-- arch/x86/include/asm/x86_init.h |1 + arch/x86

[PATCH 19/19] x86, irq: Move irq_remapped out of x86 core code

2012-09-26 Thread Joerg Roedel
The irq_remapped function is only used in IOMMU code after the last patch. So move its definition there too. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/irq_remapping.h | 10 -- drivers/iommu/irq_remapping.c|5 + 2 files changed, 5

[PATCH 06/19] x86, msi: Use IRQ remapping specific setup_msi_irqs routine

2012-09-26 Thread Joerg Roedel
Use seperate routines to setup MSI IRQs for both irq_remapping_enabled cases. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/irq_remapping.h | 12 --- arch/x86/include/asm/pci.h |2 ++ arch/x86/kernel/apic/io_apic.c | 26

[PATCH 04/19] x86, io_apic: Introduce x86_io_apic_ops.print_entries for debugging

2012-09-26 Thread Joerg Roedel
This call-back is used to dump IO-APIC entries for debugging purposes into the kernel log. VT-d needs a special routine for this and will overwrite the default. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/io_apic.h |3 + arch/x86/include/asm/x86_init.h

[PATCH 02/19] x86, apic: Mask IO-APIC and PIC unconditionally on LAPIC resume

2012-09-26 Thread Joerg Roedel
IO-APIC and PIC use the same resume routines when IRQ remapping is enabled or disabled. So it should be safe to mask the other APICs for the IRQ-remapping-disabled case too. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kernel/apic/apic.c | 19 +-- 1 file

[PATCH 18/19] x86, io_apic: Introduce eoi_ioapic_pin call-back

2012-09-26 Thread Joerg Roedel
This callback replaces the old __eoi_ioapic_pin function which needs a special path for interrupt remapping. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/io_apic.h |5 + arch/x86/include/asm/x86_init.h |1 + arch/x86/kernel/apic/io_apic.c | 20

[PATCH 13/19] x86, io-apic: Move CONFIG_IRQ_REMAP code out of x86 core

2012-09-26 Thread Joerg Roedel
Move all the code to either to the header file asm/irq_remapping.h or to drivers/iommu/. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/hw_irq.h|1 + arch/x86/include/asm/io_apic.h |5 arch/x86/include/asm/irq_remapping.h | 17

[PATCH 10/19] x86, io_apic: Remove irq_remapping_enabled check in setup_timer_IRQ0_pin

2012-09-26 Thread Joerg Roedel
This function is only called when irq-remapping is disabled. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kernel/apic/io_apic.c |3 --- 1 file changed, 3 deletions(-) diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 360f62b..d5cd6e1 100644

[PATCH 11/19] x86, irq: Move irq_remapping_enabled declaration to iommu code

2012-09-26 Thread Joerg Roedel
Remove the last left-over from this flag from x86 code. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/irq_remapping.h |4 drivers/iommu/dmar.c |2 ++ drivers/iommu/intel-iommu.c |2 ++ drivers/iommu/irq_remapping.h

[PATCH 14/19] x86, io-apic: Remove !irq_remapped() check from __target_IO_APIC_irq()

2012-09-26 Thread Joerg Roedel
This function is only called from default_ioapic_set_affinity() which is only used when interrupt remapping is disabled since the introduction of the set_affinity function pointer. So the check will always evaluate as true and can be removed. Signed-off-by: Joerg Roedel joerg.roe...@amd.com

[PATCH 07/19] x86, io_apic: Introduce set_affinity function pointer

2012-09-26 Thread Joerg Roedel
With interrupt remapping a special function is used to change the affinity of an IO-APIC interrupt. Abstract this with a function pointer. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/io_apic.h |4 arch/x86/include/asm/irq_remapping.h |9

[PATCH 03/19] x86, io_apic: Introduce x86_io_apic_ops.disable()

2012-09-26 Thread Joerg Roedel
as necessary by interrupt remapping. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/io_apic.h |2 ++ arch/x86/include/asm/x86_init.h |9 + arch/x86/kernel/apic/io_apic.c | 41 ++- arch/x86/kernel/x86_init.c |9

[PATCH 08/19] x86, io_apic: Convert setup_ioapic_entry to function pointer

2012-09-26 Thread Joerg Roedel
This pointer is changed to a different function when IRQ remapping is enabled. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/io_apic.h |5 + arch/x86/include/asm/x86_init.h |5 + arch/x86/kernel/apic/io_apic.c | 14 +- arch/x86/kernel

[PATCH 12/19] x86, irq: Add data structure to keep AMD specific irq remapping information

2012-09-26 Thread Joerg Roedel
Add a data structure to store information the IOMMU driver can use to get from a 'struct irq_cfg' to the remapping entry. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/hw_irq.h | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/x86

[PATCH 17/19] x86, msi: Introduce x86_msi.compose_msi_msg call-back

2012-09-26 Thread Joerg Roedel
. Otherwise the default function is called. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/io_apic.h |4 +++ arch/x86/include/asm/x86_init.h |4 +++ arch/x86/kernel/apic/io_apic.c | 59 --- arch/x86/kernel/x86_init.c |1

  1   2   3   4   5   6   7   8   9   10   >