From patchwork Wed Mar 11 05:54:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 24290 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 737EFDE1A5 for ; Wed, 11 Mar 2009 16:56:50 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from hera.kernel.org (hera.kernel.org [140.211.167.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 37D3BDE1DD for ; Wed, 11 Mar 2009 16:54:18 +1100 (EST) Received: from htj.dyndns.org (IDENT:U2FsdGVkX19ZrV52INwkuHWMrJN5QOKcDX6DCzBOGlc@localhost [127.0.0.1]) by hera.kernel.org (8.14.2/8.14.2) with ESMTP id n2B5rwmc001284 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 11 Mar 2009 05:54:00 GMT Received: from [10.7.8.131] (a131.air [10.7.8.131]) by htj.dyndns.org (Postfix) with ESMTPSA id ACA2B409351F9; Wed, 11 Mar 2009 14:53:57 +0900 (KST) Message-ID: <49B75215.5010707@kernel.org> Date: Wed, 11 Mar 2009 14:54:29 +0900 From: Tejun Heo User-Agent: Thunderbird 2.0.0.19 (X11/20081227) MIME-Version: 1.0 To: "Sachin P. Sant" Subject: [RESEND GIT PATCH tj-percpu] percpu: fix spurious alignment WARN in legacy SMP percpu allocator References: <20090310195534.8f8f3c7a.sfr@canb.auug.org.au> <49B67552.5070307@in.ibm.com> <49B73B15.3040101@in.ibm.com> In-Reply-To: <49B73B15.3040101@in.ibm.com> X-Enigmail-Version: 0.95.7 X-Virus-Scanned: ClamAV 0.93.3/9088/Wed Mar 11 04:02:23 2009 on hera.kernel.org X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hera.kernel.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (hera.kernel.org [127.0.0.1]); Wed, 11 Mar 2009 05:54:02 +0000 (UTC) Cc: Stephen Rothwell , Ingo Molnar , linux-next@vger.kernel.org, LKML , linuxppc-dev@ozlabs.org X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Impact: remove spurious WARN on legacy SMP percpu allocator Commit f2a8205c4ef1af917d175c36a4097ae5587791c8 incorrectly added too tight WARN_ON_ONCE() on alignments for UP and legacy SMP percpu allocator. Commit e317603694bfd17b28a40de9d65e1a4ec12f816e fixed it for UP but legacy SMP allocator was forgotten. Fix it. Signed-off-by: Tejun Heo Reported-by: Sachin P. Sant --- (RESEND: cc'ing Ingo. :-) Oops, that was a stupid omission. This patch should fix it. Ingo, please pull from the following git vector to receive the first first four patches from the use-dynamic-percpu-allocator-by-default patchset (without the actual conversion which can disrupt archs) + this patch. I moved the actual conversion patch into #tj-percpu-exp branch, so the pull should be safe. git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git tj-percpu Thanks. mm/allocpercpu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/allocpercpu.c b/mm/allocpercpu.c index 3653c57..1882923 100644 --- a/mm/allocpercpu.c +++ b/mm/allocpercpu.c @@ -120,7 +120,7 @@ void *__alloc_percpu(size_t size, size_t align) * on it. Larger alignment should only be used for module * percpu sections on SMP for which this path isn't used. */ - WARN_ON_ONCE(align > __alignof__(unsigned long long)); + WARN_ON_ONCE(align > SMP_CACHE_BYTES); if (unlikely(!pdata)) return NULL;