From patchwork Mon Nov 9 10:06:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 56206 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp91577lbb; Mon, 9 Nov 2015 02:09:44 -0800 (PST) X-Received: by 10.66.140.39 with SMTP id rd7mr39489692pab.86.1447063784628; Mon, 09 Nov 2015 02:09:44 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yj5si21507803pbc.32.2015.11.09.02.09.44; Mon, 09 Nov 2015 02:09:44 -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.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753252AbbKIKJg (ORCPT + 28 others); Mon, 9 Nov 2015 05:09:36 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:33496 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751903AbbKIKHY (ORCPT ); Mon, 9 Nov 2015 05:07:24 -0500 Received: by wmec201 with SMTP id c201so71017611wme.0 for ; Mon, 09 Nov 2015 02:07:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OeRZbVOhy8A69NdO/jS0hLIVcXFFrwpi/ArCaXQbdNQ=; b=ikse7gM8q69jwXEjAjCKpIk+yd8lQnbWkv1u3eRuks8ZO3SdJbHyVBmFxmCkPngPt7 4DO75DEGa8RnjW/K5SAq8i+O0PPs6ohzmZOFJ8Ys42v2tTxqIvfoU7F/GI1fEm0tJ3PP wFNw1vfGYypXtEKrVYf3/eMH+4WPuk03e5BJz3sa3jxFiOjunP2EOG0+lrBridXG6tQx TZncbKORC52al93mYtbM6z6Pxq6ImmJl2LJy+CzJZ0W8O72GCTpyCGcHtqb2SRPSFCjw Ifb9lsYB51+2s/ipzhHFf8xw0WJQ4j5gZNGE4CmmoKwt975H09MWEjqQ0pugI/t1Evrd k5MA== 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=VaiMWfvHbVI7QBgKh5I62eTO+tGlYiZSYKVatWq9VlQcuGolat7suHLdIPzRC66ogn wpoQa46vbyhQASJUrA621LcibZmYUOMjpZG9zoyKV42B9rv9GQTji/orH5sMafSNgWvw 0p2g5jOMRSVqI9Kqg3QgLVd3TFmv7x7B75WVfHbzWn4FKT63iOA0XJj8GSExLZqHjtGB ymnee+boU+CdQFEKrfBRgjSXcYbprzkQVnAraESMSwA2pPrIYT7GrZGt+nVqgv6cpmCj g+k59lBMJA9j0IX0jX+rQADpqFjmACvmXZ/TFzHYuzz4cvehqXz4J/vMl8MQEjIXci8M cfkA== X-Gm-Message-State: ALoCoQkO0IMoVM9GHmVJ47PXljT3doQkZnMOw0HxtFk5TjC+S/m7iV7pMuDnqTCysHEl8wnOBMOp X-Received: by 10.28.138.148 with SMTP id m142mr26085341wmd.2.1447063643352; Mon, 09 Nov 2015 02:07:23 -0800 (PST) Received: from localhost.localdomain (sju31-1-78-210-255-2.fbx.proxad.net. [78.210.255.2]) by smtp.gmail.com with ESMTPSA id t126sm13384201wmd.23.2015.11.09.02.07.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Nov 2015 02:07:22 -0800 (PST) From: Daniel Lezcano To: daniel.lezcano@linaro.org Cc: ysato@users.sourceforge.jp, tglx@linutronix.de, linux-kernel@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp (moderated list:H8/300 ARCHITECTURE) Subject: [PATCH 09/15] clocksource/drivers/h8300_timer8: Remove irq and lock legacy code Date: Mon, 9 Nov 2015 11:06:47 +0100 Message-Id: <1447063614-4662-9-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1447063614-4662-1-git-send-email-daniel.lezcano@linaro.org> References: <1447063614-4662-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)