From patchwork Wed Jun 14 13:02:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 775779 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wnn4G5sHXz9s65 for ; Wed, 14 Jun 2017 23:07:58 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ul59rT4U"; 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 3wnn4G4q55zDqM3 for ; Wed, 14 Jun 2017 23:07:58 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ul59rT4U"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (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 3wnmyp47MYzDqLG for ; Wed, 14 Jun 2017 23:03:14 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ul59rT4U"; dkim-atps=neutral Received: by mail-pf0-x243.google.com with SMTP id w12so16684066pfk.0 for ; Wed, 14 Jun 2017 06:03:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IX0M1jeguSeNcrSRka/nf/6JXY8KUXCotPURWTC3CIM=; b=ul59rT4U4IlOUFdWgq2tg/T6FQ+tjRRApqwckH4n2SeFZ21xYdWSpJyKtQM9P0Xdp7 S8Lu6Tx8is4lGb9AGSn2yn1r5Tv5fcoPMEdptSWxVWqOSvqCOxGTCMlPZDUHedDp+djl xIbsuH50+aH4CEc0ekEgkrsWAWiXlrsMpVCb/CO25LmnE8dzTwfr5orqzzvZqBSOH4WO cq5Qo6gdoc5BuQDPnK9UJSdRf91tQ0k3DWlgI7GFg2VFnOmT0gg4txnY/Sk3T3DM7XD/ 9HfnWaJ4UEk8kBFb3RmZg4mc991BNpZKRToPkDTD6XdQcP1eeurzqsV84Y8xhTOioWbj xzgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IX0M1jeguSeNcrSRka/nf/6JXY8KUXCotPURWTC3CIM=; b=K6/qamtHAolNz2b585ABAINsLhrS7op2lBEXslNgdoCpgqXvJgU4wR+Zw8xprZ9z+q LJSvA6PIp0tmXXBnu2Pc8SvSuizP8pkZ+zGey02o8BSKa/xgnOkE2/UbHx+mPJ0yLF7+ GQIB5foBN7BUe3aRarmuqTFObCDIzEwSRLKpiCi7rC0mS385G7ho6u0ZpA2OSyvK/PSy 4Uc4Xml/RHZFpDq0kFJxUWYwdKWm+bx6cyhjX2l00xZJKR5oXYu2YksEd5Icm8BbHxJS uULwT7ASnYS7pnkO9fNWAhCIHFipjEv9f+MjwHELiVeNffswdUjy+HIc9UnzgZIcFD69 Hylg== X-Gm-Message-State: AKS2vOx5t+UGtqzskmodBvpqe2I1+LtDok4brWX9K9eKS3zFb93xaDao t4ouUkteNR9ZSs/c X-Received: by 10.84.218.136 with SMTP id r8mr567964pli.265.1497445392316; Wed, 14 Jun 2017 06:03:12 -0700 (PDT) Received: from roar.au.ibm.com ([210.185.119.63]) by smtp.gmail.com with ESMTPSA id 15sm2215497pfj.59.2017.06.14.06.03.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Jun 2017 06:03:11 -0700 (PDT) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 2/3] cpuidle: powerpc: read mostly for common globals Date: Wed, 14 Jun 2017 23:02:40 +1000 Message-Id: <20170614130241.19865-3-npiggin@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170614130241.19865-1-npiggin@gmail.com> References: <20170614130241.19865-1-npiggin@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Gautham R . Shenoy" , linux-pm@vger.kernel.org, Daniel Lezcano , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, Nicholas Piggin Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Ensure these don't get put into bouncing cachelines. Reviewed-by: Vaidyanathan Srinivasan Reviewed-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin --- drivers/cpuidle/cpuidle-powernv.c | 10 +++++----- drivers/cpuidle/cpuidle-pseries.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c index 77bc50ad9f57..abf2ffcd4a0a 100644 --- a/drivers/cpuidle/cpuidle-powernv.c +++ b/drivers/cpuidle/cpuidle-powernv.c @@ -32,18 +32,18 @@ static struct cpuidle_driver powernv_idle_driver = { .owner = THIS_MODULE, }; -static int max_idle_state; -static struct cpuidle_state *cpuidle_state_table; +static int max_idle_state __read_mostly; +static struct cpuidle_state *cpuidle_state_table __read_mostly; struct stop_psscr_table { u64 val; u64 mask; }; -static struct stop_psscr_table stop_psscr_table[CPUIDLE_STATE_MAX]; +static struct stop_psscr_table stop_psscr_table[CPUIDLE_STATE_MAX] __read_mostly; -static u64 snooze_timeout; -static bool snooze_timeout_en; +static u64 snooze_timeout __read_mostly; +static bool snooze_timeout_en __read_mostly; static int snooze_loop(struct cpuidle_device *dev, struct cpuidle_driver *drv, diff --git a/drivers/cpuidle/cpuidle-pseries.c b/drivers/cpuidle/cpuidle-pseries.c index 7b12bb2ea70f..a404f352d284 100644 --- a/drivers/cpuidle/cpuidle-pseries.c +++ b/drivers/cpuidle/cpuidle-pseries.c @@ -25,10 +25,10 @@ struct cpuidle_driver pseries_idle_driver = { .owner = THIS_MODULE, }; -static int max_idle_state; -static struct cpuidle_state *cpuidle_state_table; -static u64 snooze_timeout; -static bool snooze_timeout_en; +static int max_idle_state __read_mostly; +static struct cpuidle_state *cpuidle_state_table __read_mostly; +static u64 snooze_timeout __read_mostly; +static bool snooze_timeout_en __read_mostly; static inline void idle_loop_prolog(unsigned long *in_purr) {