Re: [PATCH] ia64: fix getpid and set_tid_address fast system calls for pid namespaces

From: Matthew Wilcox <matthew_at_wil.cx>
Date: 2008-03-08 00:51:20
On Fri, Mar 07, 2008 at 04:23:13PM +0300, Pavel Emelyanov wrote:
> @@ -34,6 +35,9 @@
>  	DEFINE(SIGFRAME_SIZE, sizeof (struct sigframe));
>  	DEFINE(UNW_FRAME_INFO_SIZE, sizeof (struct unw_frame_info));
>  
> +	BUILD_BUG_ON(sizeof(struct upid) != 32);
> +	DEFINE(IA64_UPID_SHIFT, 5);
> +
>  	BLANK();
>  
>  	DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));

This might work better with ilog2().  Something like this perhaps?

	BUILD_BUG_ON(!is_power_of_2(sizeof(struct upid)))
	DEFINE(IA64_UPID_SHIFT, ilog2(sizeof(struct upid)))

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sat Mar 08 00:51:56 2008

This archive was generated by hypermail 2.1.8 : 2008-03-08 00:52:14 EST