Magellan Linux

Contents of /tags/kernel26-xen-2_6_25_r1-fedora9-patches/kernel26-xen/patches-2.6.25-r1/1044-2.6.25-xen-x86_64-percpu-assembly-macros.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 608 - (show annotations) (download)
Fri May 23 12:17:32 2008 UTC (16 years ago) by (unknown author)
File size: 1260 byte(s)
This commit was manufactured by cvs2svn to create tag
'kernel26-xen-2_6_25_r1-fedora9-patches'.
1 From 99a35b361b4efabf50337f9f2a9e548c50e566cb Mon Sep 17 00:00:00 2001
2 From: Eduardo Habkost <ehabkost@redhat.com>
3 Date: Thu, 29 Nov 2007 16:05:08 -0200
4 Subject: [PATCH] x86_64 percpu assembly macros
5
6 Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
7 ---
8 include/asm-x86/percpu.h | 26 +++++++++++++++++++++++++-
9 1 files changed, 25 insertions(+), 1 deletions(-)
10
11 diff --git a/include/asm-x86/percpu.h b/include/asm-x86/percpu.h
12 index 5dcb3bd..3f4522b 100644
13 --- a/include/asm-x86/percpu.h
14 +++ b/include/asm-x86/percpu.h
15 @@ -9,7 +9,31 @@
16 should be just put into a single section and referenced directly
17 from %gs */
18
19 -#ifndef __ASSEMBLY__
20 +#ifdef __ASSEMBLY__
21 +
22 +/*
23 + * PER_CPU finds an address of a per-cpu variable.
24 + *
25 + * Args:
26 + * var - variable name
27 + * reg - 32bit register
28 + *
29 + * The resulting address is stored in the "reg" argument.
30 + *
31 + * Example:
32 + * PER_CPU(cpu_gdt_descr, %ebx)
33 + */
34 +#ifdef CONFIG_SMP
35 +#define PER_CPU(var, reg) \
36 + movq %gs:pda_data_offset, reg; \
37 + lea per_cpu__##var(reg), reg
38 +#else /* ! SMP */
39 +#define PER_CPU(var, reg) \
40 + movl $per_cpu__##var, reg
41 +#define PER_CPU_VAR(var) per_cpu__##var
42 +#endif /* SMP */
43 +
44 +#else /* ...!ASSEMBLY */
45
46 #ifdef CONFIG_SMP
47 #include <asm/pda.h>
48 --
49 1.5.4.1
50