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: 9786279 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2CF7260384 for ; Wed, 14 Jun 2017 13:04:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 195E228644 for ; Wed, 14 Jun 2017 13:04:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E46C28650; Wed, 14 Jun 2017 13:04:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEDE928644 for ; Wed, 14 Jun 2017 13:04:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752549AbdFNNDP (ORCPT ); Wed, 14 Jun 2017 09:03:15 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:36675 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752476AbdFNNDN (ORCPT ); Wed, 14 Jun 2017 09:03:13 -0400 Received: by mail-pf0-f193.google.com with SMTP id y7so26689180pfd.3; Wed, 14 Jun 2017 06:03:12 -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=V02TEmVp9MNhHdvf6+/RFgEnHC0TtSUXED36h22EwfEnDx3wZItwpy/gMg9PjDyYr4 OHYVzOFbiQ0PlBYAAoM695g2xDLviTQQCspHlOniiQMf4kg57O1fL+odjnrsLOuN2KSx whcqavtYIXDB/bsOLMH/2tBsQQQF+NvMShj6kJeu6UU3nkAj+bd/OQUiEfUqaQao10cQ t2W67/WUdisivFf3B22RBbNIQWpKjeTh127YwRH5D8KNbuNBym7Zy9OY+h+9sT8MLXfd KFYjlikjDqclwxeg5fZPTgcQ70/Z7gY19Nse7P7S4h/hq3PxeRC+7q0fwke42fIZCs02 pgIg== X-Gm-Message-State: AKS2vOxokmYhNgkU3r2TgiPluY6FfQPd1mZOlBo1InX/rbKVUj+9cd0/ Za48wrCVW4WfiQ== 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 Cc: Nicholas Piggin , Michael Ellerman , Vaidyanathan Srinivasan , "Gautham R . Shenoy" , "Rafael J . Wysocki" , Daniel Lezcano , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.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> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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) {