Kamble, Nitin A
2005-Oct-26 02:19 UTC
[Xen-devel] [PATCH] [VT]long event-channel pending and mask arrays
Keir, I am trying to debug the SMP dom0 boot issue on x86_64. I find the changeset 7402 is breaking SMP. Your patch 7402: ba9706473941520247153e7e31d89899285d09ce is extending the event-channel pending and mask arrays to longs. I think the synch_const_test_bit should also change accordingly. This does not fix the SMP issue yet, but is this the right way to fix it? Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> diff -r e47f04c55eb1612bca605c972943ae166aae22d0 linux-2.6-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h Mon Oct 24 11:57:37 2005 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h Tue Oct 25 19:14:48 2005 @@ -120,7 +120,7 @@ static __inline__ int synch_const_test_bit(int nr, const volatile void * addr) { return ((1UL << (nr & 31)) & - (((const volatile unsigned int *) addr)[nr >> 5])) != 0; + (((const volatile unsigned int *) addr)[nr / BITS_PER_LONG])) != 0; } static __inline__ int synch_var_test_bit(int nr, volatile void * addr) Thanks & Regards, Nitin ------------------------------------------------------------------------ ----------- Open Source Technology Center, Intel Corp _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2005-Oct-27 16:27 UTC
[Xen-devel] Re: [PATCH] [VT]long event-channel pending and mask arrays
On 26 Oct 2005, at 03:19, Kamble, Nitin A wrote:> Keir, > I am trying to debug the SMP dom0 boot issue on x86_64. I find the > changeset 7402 is breaking SMP. > Your patch 7402: ba9706473941520247153e7e31d89899285d09ce is > extending the event-channel pending and mask arrays to longs. > I think the synch_const_test_bit should also change accordingly. This > does not fix the SMP issue yet, but is this the right way to fix it? >sync_const_test_bit does not need to change. Note it casts the bitmap pointer to ''int'' which is 32-bit quantity even on x86/64. So we do want to divide the offset by 32, not BITS_PER_LONG. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kamble, Nitin A
2005-Oct-27 23:33 UTC
[Xen-devel] RE: [PATCH] [VT]long event-channel pending and mask arrays
Keir, You are right. It can be changed to long but it is not necessary. The issue in SMP dom0 for x86_64 got introduced before your SMP code restructuring (merge smpboot.c) rev 7415. The rev 7412 has my fix for SMP dom0/domU. I have tested that fix here which was working fine. That patch is pulled in the tree with many other patches on the same day. With your 7402 patch (long masks) it is breaking SMP dom0 differently. If I checkout the 7412 and then revert the 7402 from it the SMP dom0 works fine. I can try reverting the 7402 changes from the latest tip to see what happens to SMP. Do you have any better ideas?> >sync_const_test_bit does not need to change. Note it casts the bitmap >pointer to ''int'' which is 32-bit quantity even on x86/64. So we do want >to divide the offset by 32, not BITS_PER_LONG. > > -- Keir_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ryan Harper
2005-Oct-27 23:49 UTC
Re: [Xen-devel] RE: [PATCH] [VT]long event-channel pending and mask arrays
* Kamble, Nitin A <nitin.a.kamble@intel.com> [2005-10-27 18:34]:> Keir, > You are right. It can be changed to long but it is not necessary. > > The issue in SMP dom0 for x86_64 got introduced before your SMP code > restructuring (merge smpboot.c) rev 7415. > > The rev 7412 has my fix for SMP dom0/domU. I have tested that fix here > which was working fine. That patch is pulled in the tree with many other > patches on the same day. With your 7402 patch (long masks) it is > breaking SMP dom0 differently. If I checkout the 7412 and then revertI checked out 7401 and added in 7412 and can confirm that x86_64 DOM0 SMP boots. -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx (512) 838-9253 T/L: 678-9253 ryanh@us.ibm.com _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2005-Oct-28 07:20 UTC
[Xen-devel] Re: [PATCH] [VT]long event-channel pending and mask arrays
On 28 Oct 2005, at 00:33, Kamble, Nitin A wrote:> You are right. It can be changed to long but it is not necessary. > > The issue in SMP dom0 for x86_64 got introduced before your SMP code > restructuring (merge smpboot.c) rev 7415. > > The rev 7412 has my fix for SMP dom0/domU. I have tested that fix here > which was working fine. That patch is pulled in the tree with many > other > patches on the same day. With your 7402 patch (long masks) it is > breaking SMP dom0 differently. If I checkout the 7412 and then revert > the 7402 from it the SMP dom0 works fine. I can try reverting the 7402 > changes from the latest tip to see what happens to SMP. Do you have any > better ideas?If there''s a problem with my changeset it is probably going to bite on the latest tip just as much as on 7412. Confirming that and digging around some more sounds sensible. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel