From patchwork Mon Mar 30 05:17:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 46464 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f199.google.com (mail-ig0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 224042159F for ; Mon, 30 Mar 2015 05:17:55 +0000 (UTC) Received: by igcxw6 with SMTP id xw6sf131193824igc.2 for ; Sun, 29 Mar 2015 22:17:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=OhRfRS8H6s9KHrSgrZvAM/fPuM4mp2RNTH2UhMX1gO4=; b=Vw5+GhcTrz9c/yYBOaxv7koD/2WuLmcxFU8rWC760o7Z7KZgJRx71b5ieS3Vc8ofkl 5GvqoMABB2cVC9RERKhApaUqswdqBEDtH8+C5bAuhP3gZFUN9/z1Y6ryMesFJxMZ3Irp NswAYyZt+b8u8Li9qAd31etwpyUg8lqlG7owETyiT3Y1NnbPkJQFOdft1tAKKz6g+1hy XvRrI+rEKGS4BEJ8I2mzOGFQg09Aod08tEVZJm6bSjgqUEG59zNI8+rNJnhf8iqXK7us ls5ZE8qJiRII2f4cNHj0fzAoXujilA8Uyhkz5u+sfA5gbI3VpXtbhddB0NjTJ46i1dr7 uA4A== X-Gm-Message-State: ALoCoQnXKAA5UDukEYCzpwP4GFEq53r4clibG6b7lHs5Ar8z6JgvAiUqufg+kCk+h/efY9SNaBpA X-Received: by 10.42.254.202 with SMTP id nf10mr57708313icb.23.1427692674777; Sun, 29 Mar 2015 22:17:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.38.148 with SMTP id t20ls2252544qgt.98.gmail; Sun, 29 Mar 2015 22:17:54 -0700 (PDT) X-Received: by 10.55.42.17 with SMTP id q17mr63916785qkh.61.1427692674689; Sun, 29 Mar 2015 22:17:54 -0700 (PDT) Received: from mail-qg0-f49.google.com (mail-qg0-f49.google.com. [209.85.192.49]) by mx.google.com with ESMTPS id e75si9427926qka.74.2015.03.29.22.17.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Mar 2015 22:17:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.192.49 as permitted sender) client-ip=209.85.192.49; Received: by qgh3 with SMTP id 3so162844012qgh.2 for ; Sun, 29 Mar 2015 22:17:54 -0700 (PDT) X-Received: by 10.140.129.65 with SMTP id 62mr40436537qhb.11.1427692674577; Sun, 29 Mar 2015 22:17:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.96.155.231 with SMTP id vz7csp1204631qdb; Sun, 29 Mar 2015 22:17:53 -0700 (PDT) X-Received: by 10.70.55.8 with SMTP id n8mr55455864pdp.167.1427692673332; Sun, 29 Mar 2015 22:17:53 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oj13si13174346pdb.149.2015.03.29.22.17.52; Sun, 29 Mar 2015 22:17:53 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752739AbbC3FRk (ORCPT + 27 others); Mon, 30 Mar 2015 01:17:40 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:34051 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752434AbbC3FRg (ORCPT ); Mon, 30 Mar 2015 01:17:36 -0400 Received: by pacwe9 with SMTP id we9so156144964pac.1 for ; Sun, 29 Mar 2015 22:17:35 -0700 (PDT) X-Received: by 10.70.88.237 with SMTP id bj13mr5094230pdb.160.1427692655536; Sun, 29 Mar 2015 22:17:35 -0700 (PDT) Received: from localhost ([122.167.118.120]) by mx.google.com with ESMTPSA id my7sm9080695pbc.0.2015.03.29.22.17.32 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 29 Mar 2015 22:17:34 -0700 (PDT) From: Viresh Kumar To: Ingo Molnar , Peter Zijlstra , Thomas Gleixner Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Viresh Kumar Subject: [PATCH 2/3] timer: Limit the scope of __tvec_bases to init_timers_cpu() Date: Mon, 30 Mar 2015 10:47:18 +0530 Message-Id: X-Mailer: git-send-email 2.3.0.rc0.44.ga94655d In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.192.49 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , per-cpu variable '__tvec_bases' is used for all CPUs except the boot CPU, which uses 'boot_tvec_bases'. Because of this special case, we shouldn't make direct references to __tvec_bases from timer core as there are chances of using the wrong instance for boot CPU. To force that, lets move __tvec_bases to the only routine which can use it directly (to set tvec_bases). Signed-off-by: Viresh Kumar --- kernel/time/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 6e8220ec8a62..40918a5d3e1d 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -93,7 +93,6 @@ struct tvec_base { struct tvec_base boot_tvec_bases; EXPORT_SYMBOL(boot_tvec_bases); static DEFINE_PER_CPU(struct tvec_base *, tvec_bases) = &boot_tvec_bases; -static DEFINE_PER_CPU(struct tvec_base, __tvec_bases); /* Functions below help us manage 'deferrable' flag */ static inline unsigned int tbase_get_deferrable(struct tvec_base *base) @@ -1537,6 +1536,7 @@ static int init_timers_cpu(int cpu) { struct tvec_base *base = per_cpu(tvec_bases, cpu); static char tvec_base_done[NR_CPUS]; + static DEFINE_PER_CPU(struct tvec_base, __tvec_bases); int j; if (!tvec_base_done[cpu]) {