From patchwork Fri Dec 18 14:17:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 58700 Delivered-To: patch@linaro.org Received: by 10.112.89.199 with SMTP id bq7csp1060701lbb; Fri, 18 Dec 2015 06:27:13 -0800 (PST) X-Received: by 10.98.71.203 with SMTP id p72mr5495443pfi.151.1450448833417; Fri, 18 Dec 2015 06:27:13 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gw4si24325917pac.129.2015.12.18.06.27.13; Fri, 18 Dec 2015 06:27:13 -0800 (PST) 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; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964867AbbLROTf (ORCPT + 29 others); Fri, 18 Dec 2015 09:19:35 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:37342 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932502AbbLROT3 (ORCPT ); Fri, 18 Dec 2015 09:19:29 -0500 Received: by mail-wm0-f44.google.com with SMTP id p187so66503698wmp.0 for ; Fri, 18 Dec 2015 06:19:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OeRZbVOhy8A69NdO/jS0hLIVcXFFrwpi/ArCaXQbdNQ=; b=Zo8byk/+lwCLvmONetfXGxd/cfnpqM2X8NQtRALxWBTFJ39+X91Lr/gy8iyqfPjsns NjM0LO51zK8RxwlZ7q/Do9n0vaXY/A2mlWh1fN6odyKFHxZ8FvopbQO9/Ac7VqMjmCDG UCB5NNymZ22WO6jn1DHXvFcWyHvLev7tHai5k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OeRZbVOhy8A69NdO/jS0hLIVcXFFrwpi/ArCaXQbdNQ=; b=cf2pRXLtaW5FWzEUqOPcOQc/367YAc99pYA73j552sxEzTuuABqP4wEfbz+XhGBqWZ ccacd7eEp0oeCBiuSlPbRC58GridntKVOfztjLMbwHGHo02Q/KvYOJAm05PW9h/ycXm0 +p6N0ZxWduIOG5yPXTAa7lA8Hrvgij22TN/y0D2S2gn6QRTv0BdsHHZjK/uXm4riZKoe SCxTzSY5MxO+niIc0FDy2OBQ4BcYzD04UXatr79Tonu+m5BH/Pelr0ovulhwNfWaxzic xgqT9pao6z23Z3yJbKCPkVIRVXT4rfL7HBffe25yqWEQTd4XbFWaQVGrM60A2/oKMOTB MFVQ== X-Gm-Message-State: ALoCoQlHB3wdAPPfR75f8jdcbUpJhn1wILDBBp9ww7GqnVt3qGeyVMtITIng9KBuRvAhpJVjafxW0dzKn5EqDfz8XBXTpssM2A== X-Received: by 10.28.5.5 with SMTP id 5mr3731799wmf.94.1450448368061; Fri, 18 Dec 2015 06:19:28 -0800 (PST) Received: from localhost.localdomain ([78.210.255.2]) by smtp.gmail.com with ESMTPSA id ql10sm15010027wjc.23.2015.12.18.06.19.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Dec 2015 06:19:27 -0800 (PST) From: Daniel Lezcano To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mingo@kernel.org, Yoshinori Sato , uclinux-h8-devel@lists.sourceforge.jp (moderated list:H8/300 ARCHITECTURE) Subject: [PATCH 46/69] clocksource/drivers/h8300_timer8: Remove irq and lock legacy code Date: Fri, 18 Dec 2015 15:17:59 +0100 Message-Id: <1450448302-27429-46-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1450448302-27429-1-git-send-email-daniel.lezcano@linaro.org> References: <5672CB9E.7090707@linaro.org> <1450448302-27429-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The time framawork takes care of disabling the interrupts and takes a lock to prevent races. Remove the legacy code in the driver taking care of the races. Signed-off-by: Daniel Lezcano --- drivers/clocksource/h8300_timer8.c | 16 ---------------- 1 file changed, 16 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/drivers/clocksource/h8300_timer8.c b/drivers/clocksource/h8300_timer8.c index 7111b99..24d91b1 100644 --- a/drivers/clocksource/h8300_timer8.c +++ b/drivers/clocksource/h8300_timer8.c @@ -31,7 +31,6 @@ struct timer8_priv { struct clock_event_device ced; unsigned long mapbase; - raw_spinlock_t lock; unsigned long flags; unsigned int rate; unsigned int tcora; @@ -78,10 +77,8 @@ static irqreturn_t timer8_interrupt(int irq, void *dev_id) static void timer8_set_next(struct timer8_priv *p, unsigned long delta) { - unsigned long flags; unsigned long now; - raw_spin_lock_irqsave(&p->lock, flags); if (delta >= 0x10000) pr_warn("delta out of range\n"); now = timer8_get_counter(p); @@ -91,8 +88,6 @@ static void timer8_set_next(struct timer8_priv *p, unsigned long delta) ctrl_outw(delta, p->mapbase + TCORA); else ctrl_outw(now + 1, p->mapbase + TCORA); - - raw_spin_unlock_irqrestore(&p->lock, flags); } static int timer8_enable(struct timer8_priv *p) @@ -108,9 +103,6 @@ static int timer8_enable(struct timer8_priv *p) static int timer8_start(struct timer8_priv *p) { int ret = 0; - unsigned long flags; - - raw_spin_lock_irqsave(&p->lock, flags); if (!(p->flags & FLAG_STARTED)) ret = timer8_enable(p); @@ -120,20 +112,12 @@ static int timer8_start(struct timer8_priv *p) p->flags |= FLAG_STARTED; out: - raw_spin_unlock_irqrestore(&p->lock, flags); - return ret; } static void timer8_stop(struct timer8_priv *p) { - unsigned long flags; - - raw_spin_lock_irqsave(&p->lock, flags); - ctrl_outw(0x0000, p->mapbase + _8TCR); - - raw_spin_unlock_irqrestore(&p->lock, flags); } static inline struct timer8_priv *ced_to_priv(struct clock_event_device *ced)