From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fw.osdl.org ([65.172.181.6]:44227 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S268674AbUIHFY5 (ORCPT ); Wed, 8 Sep 2004 01:24:57 -0400 Date: Tue, 7 Sep 2004 22:22:50 -0700 From: Andrew Morton Subject: Re: [PATCH] [ppc64] Fix compat cpu affinity on big endian 64bit Message-Id: <20040907222250.62bc6ff9.akpm@osdl.org> In-Reply-To: <20040908004040.GD25278@krispykreme> References: <20040904204850.48b7cfbd.pj@sgi.com> <20040904211749.3f713a8a.pj@sgi.com> <20040904215205.0a067ab8.pj@sgi.com> <20040906182330.GA79122@muc.de> <20040906141142.663941fb.pj@sgi.com> <20040908002408.GA25278@krispykreme> <20040908003359.GC25278@krispykreme> <20040908004040.GD25278@krispykreme> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit To: Anton Blanchard Cc: torvalds@osdl.org, pj@sgi.com, ak@muc.de, linux-arch@vger.kernel.org List-ID: Anton Blanchard wrote: > > Add compat sched affinity code. We can argue about how > USE_COMPAT_ULONG_CPUMASK works now that the non compat interface has changed. > > The old non compat behaviour was to require a bitmap long enough in both > setaffinity and getaffinity, now its only required in getaffinity. I > could do the same for the 32bit interfaces. > > Signed-off-by: Anton Blanchard > > diff -puN kernel/compat.c~compat_sys_sched_affinity kernel/compat.c > --- gr_work/kernel/compat.c~compat_sys_sched_affinity 2004-09-06 04:19:06.327399153 -0500 > +++ gr_work-anton/kernel/compat.c 2004-09-07 19:36:09.127584076 -0500 > @@ -412,16 +412,43 @@ compat_sys_wait4(compat_pid_t pid, compa > } > } > > +/* > + * for maximum compatability, we allow programs to use a single (compat) > + * unsigned long bitmask if all cpus will fit. If not, you have to have > + * at least the kernel size available. > + */ > +#define USE_COMPAT_ULONG_CPUMASK (NR_CPUS <= BITS_PER_COMPAT_LONG) umm, wanna send along a patch which defines BITS_PER_COMPAT_LONG?