Re: BUG_ON(!cpus_equal(cpumask, tmp));
From: Srivatsa Vaddagiri (vatsa_at_in.ibm.com)
Date: 04/01/04
- Previous message: Sam Ravnborg: "Re: [PATCH] Makefile patch to create KBUILD_OUPUT if it doesn't exist"
- In reply to: Andy Whitcroft: "Re: BUG_ON(!cpus_equal(cpumask, tmp));"
- Next in thread: Andy Whitcroft: "Re: BUG_ON(!cpus_equal(cpumask, tmp));"
- Reply: Andy Whitcroft: "Re: BUG_ON(!cpus_equal(cpumask, tmp));"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 1 Apr 2004 10:34:13 +0530 To: Andy Whitcroft <apw@shadowen.org>
On Thu, Apr 01, 2004 at 01:31:15AM +0000, Andy Whitcroft wrote:
> spin_lock(&tlbstate_lock);
> +
> + /* Subtle, mask the request mask with the currently online cpu's.
> + * Sample this under the lock; cpus in the the middle of going
> + * offline will wait until there is noone in this critical section
> + * before disabling IPI handling. */
> + cpus_and(tmp, cpumask, cpu_online_map);
> + if(cpus_empty(tmp))
> + return;
Hmm ..Doesn't it need to drop tlbstate_lock before returning?
> + /* Subtle, IPI users assume that they will be able to get IPI's
> + * though to the cpus listed in cpu_online_map. To ensure this
> + * we add the requirement that they check cpu_online_map within
> + * the IPI critical sections. Here we remove ourselves from the
> + * map, then ensure that all other cpus have left the relevant
> + * critical sections since the change. We do this by aquiring
> + * the relevant section locks, if we have them none else is in
> + * them. Once this is done we can go offline. */
> + spin_lock(&tlbstate_lock);
> + spin_unlock(&tlbstate_lock);
> + spin_lock(&tlbstate_lock);
> + spin_unlock(&tlbstate_lock);
The second lock should be call_lock?
-- Thanks and Regards, Srivatsa Vaddagiri, Linux Technology Center, IBM Software Labs, Bangalore, INDIA - 560017 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Sam Ravnborg: "Re: [PATCH] Makefile patch to create KBUILD_OUPUT if it doesn't exist"
- In reply to: Andy Whitcroft: "Re: BUG_ON(!cpus_equal(cpumask, tmp));"
- Next in thread: Andy Whitcroft: "Re: BUG_ON(!cpus_equal(cpumask, tmp));"
- Reply: Andy Whitcroft: "Re: BUG_ON(!cpus_equal(cpumask, tmp));"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]