From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261477AbULIOuU (ORCPT ); Thu, 9 Dec 2004 09:50:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261478AbULIOuU (ORCPT ); Thu, 9 Dec 2004 09:50:20 -0500 Received: from ozlabs.org ([203.10.76.45]:28897 "EHLO ozlabs.org") by vger.kernel.org with ESMTP id S261477AbULIOuM (ORCPT ); Thu, 9 Dec 2004 09:50:12 -0500 Date: Fri, 10 Dec 2004 01:46:36 +1100 From: Anton Blanchard To: akpm@osdl.org Cc: willschm@us.ibm.com, linux-kernel@vger.kernel.org Subject: [PATCH] ppc64: Correct alignment for lppaca in paca_struct Message-ID: <20041209144636.GB24640@krispykreme.ozlabs.ibm.com> References: <20041209143428.GA24640@krispykreme.ozlabs.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041209143428.GA24640@krispykreme.ozlabs.ibm.com> User-Agent: Mutt/1.5.6+20040907i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrew, Sorry, last patch was mangled in some way. I think this is 2.6.10 material, as well as lparcfg it fixes a nasty bug in our shared processor support (some cpus fail to recognise they are in shared processor mode). Anton -- From: Will Schmidt We found that we were failing register_vpa calls in cases where the lppaca structure (part of the PACA) crosses a page boundary. This was causing us (lparcfg specifically) some grief as the xSharedProc bit was not being set. The attached patch changes the alignment of the lppaca structure, and a few comments so we understand why. Signed-off-by: Will Schmidt Signed-off-by: Anton Blanchard diff -puN include/asm-ppc64/paca.h~vpa_align include/asm-ppc64/paca.h --- foobar2/include/asm-ppc64/paca.h~vpa_align 2004-12-10 01:40:32.325580252 +1100 +++ foobar2-anton/include/asm-ppc64/paca.h 2004-12-10 01:41:14.558646921 +1100 @@ -99,11 +99,13 @@ struct paca_struct { u64 exdsi[8]; /* used for linear mapping hash table misses */ /* - * iSeries structues which the hypervisor knows about - Not - * sure if these particularly need to be cacheline aligned. + * iSeries structues which the hypervisor knows about - + * This structure should not cross a page boundary. + * The vpa_init/register_vpa call is now known to fail if the lppaca + * structure crosses a page boundary. * The lppaca is also used on POWER5 pSeries boxes. */ - struct ItLpPaca lppaca __attribute__((aligned(0x80))); + struct ItLpPaca lppaca __attribute__((aligned(0x400))); #ifdef CONFIG_PPC_ISERIES struct ItLpRegSave reg_save; #endif _