[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-ia64-devel]PATCH] Remove duplicate check is_running_on_xen
On Mon, 2007-01-15 at 13:33 +0800, Xu, Anthony wrote: > > Remove duplicate check is_running_on_xen Hi Anthony, I'm not sure I understand why the xen functions, for example xen_get_psr(), need to support both bare metal and paravirtualized since the caller always checks for is_running_on_xen. The current code seems overly paranoid. Would is make more sense to rename these to __xen_get_psr() and eliminate the running_on_xen check in the assembly? Then we could still use the native bare metal calls when running a Xen kernel on bare metal. Am I missing some reason why xen_get_psr() would ever get called on bare metal? Thanks, Alex > diff -r 29780963b34f linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S > --- a/linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S Mon Jan 15 > 04:27:37 2007 +0800 > +++ b/linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S Mon Jan 15 > 05:02:05 2007 +0800 > @@ -11,12 +11,9 @@ GLOBAL_ENTRY(xen_get_psr) > GLOBAL_ENTRY(xen_get_psr) > movl r8=running_on_xen;; > ld4 r8=[r8];; > - cmp.eq p7,p0=r8,r0;; > -(p7) mov r8=psr;; > -(p7) br.ret.sptk.many rp > - ;; > - XEN_HYPER_GET_PSR > - ;; > + cmp.eq p7,p6=r8,r0;; > +(p7) mov r8=psr > +(p6) XEN_HYPER_GET_PSR > br.ret.sptk.many rp > ;; > END(xen_get_psr) ... > linux-2.6-xen-sparse/include/asm-ia64/xen/privop.h > --- a/linux-2.6-xen-sparse/include/asm-ia64/xen/privop.h Mon > Jan 15 04:27:37 2007 +0800 > +++ b/linux-2.6-xen-sparse/include/asm-ia64/xen/privop.h Mon > Jan 15 05:08:12 2007 +0800 > @@ -203,24 +203,16 @@ extern void xen_ptcga(unsigned long addr > \ > switch(regnum) > { \ > case > _IA64_REG_PSR: \ > - ia64_intri_res = > (is_running_on_xen()) ? \ > - xen_get_psr() : \ > - __ia64_getreg(regnum); \ > + ia64_intri_res = > xen_get_psr(); \ > break; \ -- Alex Williamson HP Open Source & Linux Org. _______________________________________________ Xen-ia64-devel mailing list Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ia64-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |