WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] X86 and IA64: move px external logica

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] X86 and IA64: move px external logical to common place
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 26 Sep 2008 14:50:11 -0700
Delivery-date: Fri, 26 Sep 2008 14:49:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1222434430 -3600
# Node ID cc6fc966c6139491f72d48a06d45f0767faab225
# Parent  583086d5cd26936a2cd96a98e48720a86ca60dd0
X86 and IA64: move px external logical to common place

this patch move the xen/acpi convert routine to common place,
since it can be used by both x86 and ia64 architecture.

Signed-off-by: Yu Ke <ke.yu@xxxxxxxxx>
Signed-off-by: Liu Jinsong <jinsong.liu@xxxxxxxxx>
---
 arch/i386/kernel/acpi/processor_extcntl_xen.c |   46 ++------------------------
 include/acpi/processor.h                      |   43 +++++++++++++++++++++++-
 2 files changed, 46 insertions(+), 43 deletions(-)

diff -r 583086d5cd26 -r cc6fc966c613 
arch/i386/kernel/acpi/processor_extcntl_xen.c
--- a/arch/i386/kernel/acpi/processor_extcntl_xen.c     Thu Sep 25 16:40:13 
2008 +0100
+++ b/arch/i386/kernel/acpi/processor_extcntl_xen.c     Fri Sep 26 14:07:10 
2008 +0100
@@ -99,44 +99,6 @@ static int xen_cx_notifier(struct acpi_p
        ret = HYPERVISOR_platform_op(&op);
        kfree(buf);
        return ret;
-}
-
-static void convert_pct_reg(struct xen_pct_register *xpct,
-       struct acpi_pct_register *apct)
-{
-       xpct->descriptor = apct->descriptor;
-       xpct->length     = apct->length;
-       xpct->space_id   = apct->space_id;
-       xpct->bit_width  = apct->bit_width;
-       xpct->bit_offset = apct->bit_offset;
-       xpct->reserved   = apct->reserved;
-       xpct->address    = apct->address;
-}
-
-static void convert_pss_states(struct xen_processor_px *xpss, 
-       struct acpi_processor_px *apss, int state_count)
-{
-       int i;
-       for(i=0; i<state_count; i++) {
-               xpss->core_frequency     = apss->core_frequency;
-               xpss->power              = apss->power;
-               xpss->transition_latency = apss->transition_latency;
-               xpss->bus_master_latency = apss->bus_master_latency;
-               xpss->control            = apss->control;
-               xpss->status             = apss->status;
-               xpss++;
-               apss++;
-       }
-}
-
-static void convert_psd_pack(struct xen_psd_package *xpsd,
-       struct acpi_psd_package *apsd)
-{
-       xpsd->num_entries    = apsd->num_entries;
-       xpsd->revision       = apsd->revision;
-       xpsd->domain         = apsd->domain;
-       xpsd->coord_type     = apsd->coord_type;
-       xpsd->num_processors = apsd->num_processors;
 }
 
 static int xen_px_notifier(struct acpi_processor *pr, int action)
@@ -179,20 +141,20 @@ static int xen_px_notifier(struct acpi_p
                perf->platform_limit = pr->performance_platform_limit;
 
                /* pct */
-               convert_pct_reg(&perf->control_register, &px->control_register);
-               convert_pct_reg(&perf->status_register, &px->status_register);
+               xen_convert_pct_reg(&perf->control_register, 
&px->control_register);
+               xen_convert_pct_reg(&perf->status_register, 
&px->status_register);
 
                /* pss */
                perf->state_count = px->state_count;
                states = 
kzalloc(px->state_count*sizeof(xen_processor_px_t),GFP_KERNEL);
                if (!states)
                        return -ENOMEM;
-               convert_pss_states(states, px->states, px->state_count);
+               xen_convert_pss_states(states, px->states, px->state_count);
                set_xen_guest_handle(perf->states, states);
 
                /* psd */
                pdomain = &px->domain_info;
-               convert_psd_pack(&perf->domain_info, pdomain);
+               xen_convert_psd_pack(&perf->domain_info, pdomain);
                if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ALL)
                        perf->shared_type = CPUFREQ_SHARED_TYPE_ALL;
                else if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ANY)
diff -r 583086d5cd26 -r cc6fc966c613 include/acpi/processor.h
--- a/include/acpi/processor.h  Thu Sep 25 16:40:13 2008 +0100
+++ b/include/acpi/processor.h  Fri Sep 26 14:07:10 2008 +0100
@@ -422,4 +422,45 @@ static inline int processor_extcntl_prep
 }
 #endif /* CONFIG_PROCESSOR_EXTERNAL_CONTROL */
 
-#endif
+#ifdef CONFIG_XEN
+static inline void xen_convert_pct_reg(struct xen_pct_register *xpct,
+       struct acpi_pct_register *apct)
+{
+       xpct->descriptor = apct->descriptor;
+       xpct->length     = apct->length;
+       xpct->space_id   = apct->space_id;
+       xpct->bit_width  = apct->bit_width;
+       xpct->bit_offset = apct->bit_offset;
+       xpct->reserved   = apct->reserved;
+       xpct->address    = apct->address;
+}
+
+static inline void xen_convert_pss_states(struct xen_processor_px *xpss, 
+       struct acpi_processor_px *apss, int state_count)
+{
+       int i;
+       for(i=0; i<state_count; i++) {
+               xpss->core_frequency     = apss->core_frequency;
+               xpss->power              = apss->power;
+               xpss->transition_latency = apss->transition_latency;
+               xpss->bus_master_latency = apss->bus_master_latency;
+               xpss->control            = apss->control;
+               xpss->status             = apss->status;
+               xpss++;
+               apss++;
+       }
+}
+
+static inline void xen_convert_psd_pack(struct xen_psd_package *xpsd,
+       struct acpi_psd_package *apsd)
+{
+       xpsd->num_entries    = apsd->num_entries;
+       xpsd->revision       = apsd->revision;
+       xpsd->domain         = apsd->domain;
+       xpsd->coord_type     = apsd->coord_type;
+       xpsd->num_processors = apsd->num_processors;
+}
+
+#endif /* CONFIG_XEN */
+
+#endif

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] X86 and IA64: move px external logical to common place, Xen patchbot-linux-2.6.18-xen <=