From patchwork Sun Jun 11 23:58:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 774413 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 ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wmD7831cYz9s2s for ; Mon, 12 Jun 2017 10:20:04 +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="kzh5DJVt"; 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 3wmD781qtnzDqQR for ; Mon, 12 Jun 2017 10:20:04 +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="kzh5DJVt"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (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 3wmChv5LZzzDqL4 for ; Mon, 12 Jun 2017 10:00:47 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="kzh5DJVt"; dkim-atps=neutral Received: by mail-pf0-x241.google.com with SMTP id d5so2445304pfe.1 for ; Sun, 11 Jun 2017 17:00:47 -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=taExuHE/OoSri2YJf4R97jkfs6CULhhyOfhJnV6Z92E=; b=kzh5DJVtndSXUyHmav/J4ng6S8/UdYtuQDH5NGEO26xiSZ7bsXmc7lclFODpWYNujX O2AAK8fxnSHTzis3YeqghCxqINeHV28XiaE4Q/5pdkeeouiUf3VyTPl9Pn2j1kBwQ9SC njomy0lwCQf3w5rs0NZ3CWWQAtsBTwPLtlEvLfnUPQJ7tM0BQP4XlWfjC0PBpgDuoQTn zZrdj92LvTrfo/9qvROs6MUXGHHQTc1h/5yrCyc1NGbkuBFIPGWi6iyGUbngI//OvbTs hCpYQbt3RLc1qboXPuBFvLdYWVqHmYOMg9iC57F+X6oF8bbCzfTsKZ2F2PExoL2zkn/Q VrbQ== 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=taExuHE/OoSri2YJf4R97jkfs6CULhhyOfhJnV6Z92E=; b=qPPY7DVqslMyoci7MFKk5UK9jU/V2xqE0/vNur9VIIbu7DvgqIrIi4o7dpe/IUCzdn axokfRQUcsfj8+UGEUEAF+v8M9URSw4AdGlLpBKig+U1REwMCICBsAN1c16mv3tF0yf1 H/SCynZadi98gvy0xbsibsfy+czefstTc8iQEtJZFhfzg/YhDDDbM+iSkF9db/XmyJ/5 IbKHn9lj9po9XG4xJNYTs/bl25ya/32Be6VXanICuYBo6YDjgxQtpcsiTp1PyAv952Pq e4A6j8T0TZuGpDfQSLoEI/v8TcMeE5pl5tGa43t4FQOKIBUAnvRsPSNX+fmGIDkIew0n 0IFQ== X-Gm-Message-State: AODbwcBVWo7JGbJ0+R0vMljp3Ph28nln21jPHNcDClu+aGdZR9YYeqB7 j25aartjfZ30Mva9 X-Received: by 10.98.158.138 with SMTP id f10mr42710015pfk.177.1497225645851; Sun, 11 Jun 2017 17:00:45 -0700 (PDT) Received: from roar.au.ibm.com ([210.185.119.63]) by smtp.gmail.com with ESMTPSA id c14sm14427211pfk.42.2017.06.11.17.00.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jun 2017 17:00:44 -0700 (PDT) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 11/14] powerpc/64s: cpuidle read mostly for common globals Date: Mon, 12 Jun 2017 09:58:32 +1000 Message-Id: <20170611235835.7400-12-npiggin@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170611235835.7400-1-npiggin@gmail.com> References: <20170611235835.7400-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" , Nicholas Piggin , "Shreyas B . Prabhu" Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Ensure these don't get put into bouncing cachelines. Signed-off-by: Nicholas Piggin Reviewed-by: Gautham R. Shenoy Reviewed-by: Vaidyanathan Srinivasan --- 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 50b3c2e0306f..9d03326ac05e 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) {