From patchwork Sat Mar 7 11:14:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hao X-Patchwork-Id: 447562 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 75E7414010F for ; Sat, 7 Mar 2015 22:16:39 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=I24mKF/Y; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42A811A068E for ; Sat, 7 Mar 2015 22:16:39 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=I24mKF/Y; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-yh0-x22e.google.com (mail-yh0-x22e.google.com [IPv6:2607:f8b0:4002:c01::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id C0F081A0198 for ; Sat, 7 Mar 2015 22:15:23 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass reason="2048-bit key; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=I24mKF/Y; dkim-adsp=pass; dkim-atps=neutral Received: by yhaf73 with SMTP id f73so7296866yha.12 for ; Sat, 07 Mar 2015 03:15:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=IACwiVCWKYJr1RsUzhf9OlWksisnozBJ/AvjFsGyW/w=; b=I24mKF/YW3Axlm0BLW7LV9icDhLt4sB7ljqIOTTFkErAPGCdPuQIy15llI2GQqCdUX vKX9SJcA2htVjMLRKvhN/5YlvxMjmwaZOIV/6HXs7zDBqOJtlFGNyRy1ZTeKJv7YhEUm 8eaF9lnPE77lWIX1ibWQo+1OzDpuTe1HxdQLYSv8EW6fyVqnjraVUC9TbPIZ+g2+PCvF J7X9O72tRRAKHWzFw7Uln/x5VnHvXX5kimzMnG+gMr4+HnOHhSSS5rKPUvkJE2TfvsIJ VG0L8cxwhBIBOltNYoOMWfs+Z9rhUU7v1qmoViYXGz7N5ojsdTNUceH2oNJEdvo3v+Rm T9kg== X-Received: by 10.236.25.196 with SMTP id z44mr17351149yhz.19.1425726921441; Sat, 07 Mar 2015 03:15:21 -0800 (PST) Received: from pek-khao-d1.corp.ad.wrs.com ([106.120.101.38]) by mx.google.com with ESMTPSA id 10sm10438755yhx.14.2015.03.07.03.15.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Mar 2015 03:15:20 -0800 (PST) From: Kevin Hao To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH] powerpc: book3e_64: fix the align size for paca_struct Date: Sat, 7 Mar 2015 19:14:53 +0800 Message-Id: <1425726893-30605-1-git-send-email-haokexin@gmail.com> X-Mailer: git-send-email 2.1.0 Cc: Scott Wood , Paul Mackerras X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" All the cache line size of the current book3e 64bit SoCs are 64 bytes. So we should use this size to align the member of paca_struct. With this change we save 192 bytes. Also change it to __aligned(size) since it is preferred over __attribute__((aligned(size))). Before: /* size: 1920, cachelines: 30, members: 46 */ /* sum members: 1667, holes: 6, sum holes: 141 */ /* padding: 112 */ After: /* size: 1728, cachelines: 27, members: 46 */ /* sum members: 1667, holes: 4, sum holes: 13 */ /* padding: 48 */ Signed-off-by: Kevin Hao --- arch/powerpc/include/asm/paca.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h index e5f22c6c4bf9..70bd4381f8e6 100644 --- a/arch/powerpc/include/asm/paca.h +++ b/arch/powerpc/include/asm/paca.h @@ -106,9 +106,9 @@ struct paca_struct { #endif /* CONFIG_PPC_STD_MMU_64 */ #ifdef CONFIG_PPC_BOOK3E - u64 exgen[8] __attribute__((aligned(0x80))); + u64 exgen[8] __aligned(0x40); /* Keep pgd in the same cacheline as the start of extlb */ - pgd_t *pgd __attribute__((aligned(0x80))); /* Current PGD */ + pgd_t *pgd __aligned(0x40); /* Current PGD */ pgd_t *kernel_pgd; /* Kernel PGD */ /* Shared by all threads of a core -- points to tcd of first thread */