From patchwork Tue Dec 18 21:28:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 154182 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4202961ljp; Tue, 18 Dec 2018 13:29:28 -0800 (PST) X-Google-Smtp-Source: AFSGD/WyaCs3c5Zmgsm44W/ZAExB3Y3x8aCjjK8Itn4cTcm0oNMwvjapHbRRZj3BhjIQY1IN+WZA X-Received: by 2002:a17:902:108a:: with SMTP id c10mr9117821pla.131.1545168568472; Tue, 18 Dec 2018 13:29:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545168568; cv=none; d=google.com; s=arc-20160816; b=AP64DtXaTFGxKT/+MGulUzlhZWcxwPGPdVC0C9lJKpZnrnsvI3m2og3MbKbwGRLB+Z MGgxVrg4XNz/X0x6gH89xqYEi4aIxNgL624lTYV/+94pUc05NMWRYbrF1E0wlj/eXzPQ uSsWtDNfqSgu4ltbsEhbduShtPD2pcR9Ye/1xAzP+646uGsSu+aB3AKjvHDwJien86Ux yEHz/p+RAS0F/vijb7PI6MIuxLAkaowhdEbyyusuQvdzPn0TOi2NHETcx9prc3lhowQO wj3soVtctCZqPTuvEUvdmVchqa8thSxW72LbaSjrLwBU4b9CsrAqGxqT4MRJ/GUrr5EZ JVHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JDGG/ePDW8fZY0txCpV8Qva5v2tCPJZst6J7AJgbbOs=; b=It0zfrnVehYfHOLqo0DMwfx3Dc82RDnv1cjRsZaxCshfIUBtSthkJsE4Xrygv1RFmw 4Yzp4SB0Wt/bhq7uvI6fL3Ozg6a9yNDKkXOroYwJGX8JZy+sIon3fARDaHv4rL4t1Axq zlYC3Fgi5kItdDDFJBQF/IogdJiDU3dg71rFLjzgUp5OkrOUkG3P1Vy0mEb+vpvTfjWk 0JbCuLp5SKdQYfP/sG94mOo8a54AIL2KHVlUuvAIpLrSuOEAioDueeOidsTXXC+lrvO4 TCHSO9OHSCqxX/0qcmA1AqUZhctXBn8XcJjq25cWIq8khOpnhSRUwdX0IjyCb5YWC3Wf vb6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TM7PWvV5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v35si6642150pgl.130.2018.12.18.13.29.28; Tue, 18 Dec 2018 13:29:28 -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; dkim=pass header.i=@linaro.org header.s=google header.b=TM7PWvV5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727465AbeLRV31 (ORCPT + 31 others); Tue, 18 Dec 2018 16:29:27 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:42217 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726422AbeLRV3Y (ORCPT ); Tue, 18 Dec 2018 16:29:24 -0500 Received: by mail-wr1-f65.google.com with SMTP id q18so17403430wrx.9 for ; Tue, 18 Dec 2018 13:29:23 -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 :mime-version:content-transfer-encoding; bh=JDGG/ePDW8fZY0txCpV8Qva5v2tCPJZst6J7AJgbbOs=; b=TM7PWvV5o0CR7i4LRPK9Tn3w4BQBKVhPkcTjFuo6ay1XVZzNlw6v6hcfZwQIg/WPUO Bobb5NomveaT0M+PIXYhDxdrQf8j1O9PmV23dOcQRMYXT0xnJG+AaesogEw8cftsl8PM jt7UZSVKfU20HhiWEKuhQUGuv6VzZeAwQYlGw= 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:mime-version:content-transfer-encoding; bh=JDGG/ePDW8fZY0txCpV8Qva5v2tCPJZst6J7AJgbbOs=; b=my9VfgMZPhmbKeDR7FiD69ioQPoWlmyoca88NXzGiXQJnHB4FcpNtgSwLdQPtEdWHx qIzi0bUD+tbScUQuDH3Rl6wziz1/iqCJXTgm3Jkzr/GZ1tA4lCv2kN/vzCg+ZGtVgol7 1bJ4Z07QTbSopYud5O1mjFQU7pjUVZbiN6Y1AsIQeb7Eo4W1t6u/SGewa1cqVKmrGPfC o+j6OQD+Ftpz1Ft/Xx8Bdeyz//fipDng5dCcEElKkO/2P+zEj+sOUMkSix/6lp60wv60 v0/V/esu4B26QSLioQkcBVXrQDKhQDtvltIp/KNgDTT06Osi4Bg20mMwlRyRLgK3FipK 9WBw== X-Gm-Message-State: AA+aEWaO5nHCO4Mrmk+0IblqszycHcE/oRdQ2mo5xFZhYZJiSPC7n/NX 5FySLblOWUGUIwattUY/r1vF7oMjy5M= X-Received: by 2002:a5d:6187:: with SMTP id j7mr16277202wru.300.1545168562867; Tue, 18 Dec 2018 13:29:22 -0800 (PST) Received: from localhost.localdomain (105.50.92.92.rev.sfr.net. [92.92.50.105]) by smtp.gmail.com with ESMTPSA id o4sm4153485wrq.66.2018.12.18.13.29.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Dec 2018 13:29:22 -0800 (PST) From: Daniel Lezcano To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= Subject: [PATCH 09/25] clocksource/drivers/imx-gpt: Remove unnecessary irq protection Date: Tue, 18 Dec 2018 22:28:27 +0100 Message-Id: <20181218212844.30445-9-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181218212844.30445-1-daniel.lezcano@linaro.org> References: <20181218212844.30445-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Clément Péron shutdown and oneshot are already protected against irq interruptions Signed-off-by: Clément Péron Signed-off-by: Daniel Lezcano --- drivers/clocksource/timer-imx-gpt.c | 17 ----------------- 1 file changed, 17 deletions(-) -- 2.17.1 diff --git a/drivers/clocksource/timer-imx-gpt.c b/drivers/clocksource/timer-imx-gpt.c index a3d6ccbf4a16..706c0d0ff56c 100644 --- a/drivers/clocksource/timer-imx-gpt.c +++ b/drivers/clocksource/timer-imx-gpt.c @@ -202,15 +202,8 @@ static int v2_set_next_event(unsigned long evt, static int mxc_shutdown(struct clock_event_device *ced) { struct imx_timer *imxtm = to_imx_timer(ced); - unsigned long flags; u32 tcn; - /* - * The timer interrupt generation is disabled at least - * for enough time to call mxc_set_next_event() - */ - local_irq_save(flags); - /* Disable interrupt in GPT module */ imxtm->gpt->gpt_irq_disable(imxtm); @@ -225,21 +218,12 @@ static int mxc_shutdown(struct clock_event_device *ced) printk(KERN_INFO "%s: changing mode\n", __func__); #endif /* DEBUG */ - local_irq_restore(flags); - return 0; } static int mxc_set_oneshot(struct clock_event_device *ced) { struct imx_timer *imxtm = to_imx_timer(ced); - unsigned long flags; - - /* - * The timer interrupt generation is disabled at least - * for enough time to call mxc_set_next_event() - */ - local_irq_save(flags); /* Disable interrupt in GPT module */ imxtm->gpt->gpt_irq_disable(imxtm); @@ -264,7 +248,6 @@ static int mxc_set_oneshot(struct clock_event_device *ced) * mode switching */ imxtm->gpt->gpt_irq_enable(imxtm); - local_irq_restore(flags); return 0; }