From patchwork Mon Apr 14 16:23:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 28339 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f199.google.com (mail-vc0-f199.google.com [209.85.220.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0214820534 for ; Mon, 14 Apr 2014 16:26:24 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id lh14sf28843833vcb.6 for ; Mon, 14 Apr 2014 09:26:24 -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=xAKfN6iF40xTG0ZLb6OuW9YTbkz3P/hgxMenIB1OmuU=; b=hZrZp9oLG02rv0i+C7CMeAFfsH68wrBZFwEgvMqyEJ6Z54PBiB+ql/juG6VASXGxzd RC9DTkDU3/kKEpIklmvpBShR92FSQCbRhGXZQSGhK2Bfvlc7BL3a+vLQops1IN1HEZVf Rk3e8DMbVQIBIF/51RM2mjDhIsO3GMKunEBQCsI+JkUB/aUqGzcABRDP6IJzWq+aVRM0 /UXVnxmCLccJwMDefFPmBqVd6ksrG8QzviaG9eESsLaoj5F/Za3pS3j2O3WHV3wSwQk2 KPy+OCU7utxK08FgWleJEqHCfcdjghUbXcjgrWT8Ih51d4C9Z6H/rWqE3b3av2YbVHsG cRUA== X-Gm-Message-State: ALoCoQnxV8EmmH3D61x3VU8YxAaPneJXpQJ7os2nwteaJ9aMKn3pNYrMTqBsAoebbINiuvE+dD99 X-Received: by 10.58.88.136 with SMTP id bg8mr22334433veb.21.1397492784772; Mon, 14 Apr 2014 09:26:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.92.163 with SMTP id b32ls2694405qge.22.gmail; Mon, 14 Apr 2014 09:26:24 -0700 (PDT) X-Received: by 10.52.34.4 with SMTP id v4mr714110vdi.42.1397492784558; Mon, 14 Apr 2014 09:26:24 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id dm2si2834631vec.111.2014.04.14.09.26.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:26:24 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id oz11so7604957veb.6 for ; Mon, 14 Apr 2014 09:26:24 -0700 (PDT) X-Received: by 10.221.29.137 with SMTP id ry9mr37436914vcb.6.1397492784465; Mon, 14 Apr 2014 09:26:24 -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.220.221.72 with SMTP id ib8csp162800vcb; Mon, 14 Apr 2014 09:26:24 -0700 (PDT) X-Received: by 10.68.222.105 with SMTP id ql9mr45270441pbc.4.1397492783730; Mon, 14 Apr 2014 09:26:23 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b4si9153264pbl.259.2014.04.14.09.26.23; Mon, 14 Apr 2014 09:26:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755607AbaDNQ0N (ORCPT + 26 others); Mon, 14 Apr 2014 12:26:13 -0400 Received: from mail-pd0-f171.google.com ([209.85.192.171]:46997 "EHLO mail-pd0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754857AbaDNQZ4 (ORCPT ); Mon, 14 Apr 2014 12:25:56 -0400 Received: by mail-pd0-f171.google.com with SMTP id r10so8250165pdi.16 for ; Mon, 14 Apr 2014 09:25:55 -0700 (PDT) X-Received: by 10.66.193.202 with SMTP id hq10mr44827597pac.57.1397492755689; Mon, 14 Apr 2014 09:25:55 -0700 (PDT) Received: from localhost ([122.167.126.16]) by mx.google.com with ESMTPSA id yj6sm8399270pab.19.2014.04.14.09.25.52 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:25:55 -0700 (PDT) From: Viresh Kumar To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, Arvind.Chauhan@arm.com, linaro-networking@linaro.org, Viresh Kumar Subject: [PATCH 17/38] tick-common: call tick_install_replacement() from tick_check_new_device() Date: Mon, 14 Apr 2014 21:53:39 +0530 Message-Id: <1673b3362965e31fb45482f5df9e59bfcc2e3f53.1397492345.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e 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=neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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: , Part of tick_check_new_device() is exactly same as what's being done by tick_install_replacement(). And so we can actually call tick_install_replacement() directly from tick_check_new_device() instead of replicating code. Signed-off-by: Viresh Kumar --- kernel/time/tick-common.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index c2aa441..bb9a218 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c @@ -272,9 +272,7 @@ bool tick_check_preferred(struct clock_event_device *curdev, */ void tick_check_new_device(struct clock_event_device *newdev) { - int cpu = smp_processor_id(); - struct tick_device *td = tick_get_device(cpu); - struct clock_event_device *curdev = td->evtdev; + struct clock_event_device *curdev = tick_get_cpu_device()->evtdev; /* Preference decision */ if (!tick_check_preferred(curdev, newdev)) @@ -292,10 +290,8 @@ void tick_check_new_device(struct clock_event_device *newdev) clockevents_shutdown(curdev); curdev = NULL; } - clockevents_exchange_device(curdev, newdev); - tick_setup_device(td, newdev, cpu); - if (newdev->features & CLOCK_EVT_FEAT_ONESHOT) - tick_oneshot_notify(); + + tick_install_replacement(newdev); return; out_bc: