lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1465275273-22076-3-git-send-email-wxt@rock-chips.com>
Date:	Tue,  7 Jun 2016 12:54:31 +0800
From:	Caesar Wang <wxt@...k-chips.com>
To:	daniel.lezcano@...aro.org, Heiko Stuebner <heiko@...ech.de>
Cc:	dianders@...omium.org, briannorris@...gle.com, smbarber@...gle.com,
	linux-rockchip@...ts.infradead.org,
	Thomas Gleixner <tglx@...utronix.de>, cf@...k-chips.com,
	huangtao@...k-chips.com, Caesar Wang <wxt@...k-chips.com>,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: [PATCH v2 2/4] clocksource: rockchip: add dynamic irq flag to the timer

From: "Huang, Tao" <huangtao@...k-chips.com>

The rockchip timer is broadcast timer. Add CLOCK_EVT_FEAT_DYNIRQ
flag and set cpumask to all possible cpus to save power by avoid
unnecessary wakeups and IPIs.

Signed-off-by: Huang Tao <huangtao@...k-chips.com>
Cc: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Heiko Stuebner <heiko@...ech.de>
Tested-by: Jianqun Xu <jay.xu@...k-chips.com>
Signed-off-by: Caesar Wang <wxt@...k-chips.com>

---

Changes in v2:
- s/cpu_all_mask/cpu_possible_mask/, As Daniel comments on
  https://patchwork.kernel.org/patch/9135053/.

 drivers/clocksource/rockchip_timer.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/rockchip_timer.c b/drivers/clocksource/rockchip_timer.c
index b991b28..b510863 100644
--- a/drivers/clocksource/rockchip_timer.c
+++ b/drivers/clocksource/rockchip_timer.c
@@ -150,12 +150,13 @@ static void __init rk_timer_init(struct device_node *np)
 	}
 
 	ce->name = TIMER_NAME;
-	ce->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT;
+	ce->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT |
+		       CLOCK_EVT_FEAT_DYNIRQ;
 	ce->set_next_event = rk_timer_set_next_event;
 	ce->set_state_shutdown = rk_timer_shutdown;
 	ce->set_state_periodic = rk_timer_set_periodic;
 	ce->irq = irq;
-	ce->cpumask = cpumask_of(0);
+	ce->cpumask = cpu_possible_mask;
 	ce->rating = 250;
 
 	rk_timer_interrupt_clear(ce);
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ