From patchwork Tue Feb 26 14:54:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 159220 Delivered-To: patches@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp3304036jad; Tue, 26 Feb 2019 06:54:41 -0800 (PST) X-Received: by 2002:a19:e05e:: with SMTP id g30mr1651222lfj.167.1551192880743; Tue, 26 Feb 2019 06:54:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551192880; cv=none; d=google.com; s=arc-20160816; b=itM5JOG7cD1EnmU51tme2mRYikSxiui002D4M66ErR7XMc7iGo7AB6bkfDpV0FGeJJ CEQRXOjOqcHLaYeOmF1eU0azmHx/u7Uvua6FBH6T9P85K6gD2XNpQIf9jIL9xAHpnJhX dhTtjii2fJdLqrLUTsqe7x5c55nfN4Wqjj2chRo7kvg0X8ekoSDy8Y/9SHzjkkhjIIdt P0qStD+44geDwSe04y2lfz9ISex/OSnkN7vanEIog1tPDLsX46ZcC+dEgQhx1uRpsTNX SckiOXoGYV2Y5eG/Qx7NDJaWHb7PWxa4NVb36rAvK40jKikcysVaMicZT8cg7IJjIGcr /3Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7Kl3KIsTbVNnLIJETkqUkswPckk4QEkcaiOEMLrmE0U=; b=r2dkb8Bk/A9uBwac3jPHAGyJE8cC1aNQEieLF/jBBmLDHHBz2425RLLyT+w5cMtvja RakhDvRWjqi1JyjNZXwgeiUkFOO/PtICiw1C0ylCFOR/gXWoza7SCNdfeINtGP1LAznj y2v8lidz9tbRTuDRDC0EFXiOQlgn7MaW/8KSpxGGd9TNjmXD1KE03ohvCNwVaB/46J/m fqLmoYl6JGac0HrQUuV5J2Te16RWZpuCGSEf3yEt4c/Qcu4NA+5gVPvqFU1yTb7LzvwX OiaVg0VpAQCJj2D9mzXN7sdI94jLu26EdRxDfcJz8tT8y0E41QU7g9xulAah7+lotdHc +2/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n7uIvug2; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id 4sor7363224ljs.30.2019.02.26.06.54.40 for (Google Transport Security); Tue, 26 Feb 2019 06:54:40 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n7uIvug2; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org 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=7Kl3KIsTbVNnLIJETkqUkswPckk4QEkcaiOEMLrmE0U=; b=n7uIvug2vs/kr0RJhQcdk7BSHrob5nvRXyL0xNSxYnHFnnMKjuMDRuby6EvZhP8bIQ sEYAZFh2urn9DNVCLN5raj4+lCcuGxSZHrQSdsISgzZi+LnkU7Y9EAiAT0yLLDsNv/91 yJK71O7bWyCWWNnL5495Puaw0fpepx6aL4venBxoepro1Y72A1ytEOBcfjDqI48F+zmU Oh1P6GO0N+LiCwNlB7ssEj9oyJ9A9Oa1ROLwtEV+BbUuGmXb+kMWjx22hoV7q+XLdaOA 3CjmUKkM6RiMFGcf6nXNVb/hmr2vZCCmETUMiDFJ59GXm/VtpI8sEPIBPKj33vsL/sPW sPTg== 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; bh=7Kl3KIsTbVNnLIJETkqUkswPckk4QEkcaiOEMLrmE0U=; b=FLMzElQvqMWjXMTlaKSmWNBqC1yELYWxvcDaVVVfyuOurc+BRebXAJBHzb9i/Kr+eY tlWM63TUp62GYuc3/2eBZuXuLZd/5McZbYKIdibXfz9Tca6G11osxekJAERKe8xyMPD8 DtT/dC7dV7LNaP0ryPQ0PK8SzAZqqNey9V2xZWpWWz7h4Xqlhy5QCcNe9ETjEezul/IG j6oN2KrXMfVXatC450+2eZm404ywPchRSVWyw6rvNs1lhobX7ebOrD5dAPrLbGw1kUIo hCb5LtqN79VgSw+ggHDwDgZ3f5KtYWZYbrNyv/kUERXU9AlFaRX8oInKjIEPuYKPu0Mj 9Q1g== X-Gm-Message-State: AHQUAuajCowWqbR3sPrbOTj7Qdq0XSSksciuDDolVTRR2rgtKy6btv81 uWrFjZVvXCDPdlCgI9hYb3YFihx5 X-Google-Smtp-Source: AHgI3IatimNXxbZ0UlAUMjP41vSG7rroGtk09LV0giyDGyOxLDbucKAoH6kRcU7fitCx8KE+Ma61NQ== X-Received: by 2002:a2e:4285:: with SMTP id h5mr13819746ljf.32.1551192880350; Tue, 26 Feb 2019 06:54:40 -0800 (PST) Return-Path: Received: from uffe-XPS-13-9360.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id t11sm2206554ljj.92.2019.02.26.06.54.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Feb 2019 06:54:39 -0800 (PST) From: Ulf Hansson To: "Rafael J . Wysocki" , linux-pm@vger.kernel.org Cc: Frederic Weisbecker , Thomas Gleixner , Sudeep Holla , Lorenzo Pieralisi , Mark Rutland , Daniel Lezcano , "Raju P . L . S . S . S . N" , Stephen Boyd , Tony Lindgren , Kevin Hilman , Lina Iyer , Ulf Hansson , Viresh Kumar , Vincent Guittot , Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v11 6/8] time: tick-sched: Remove tick_nohz_get_sleep_length() Date: Tue, 26 Feb 2019 15:54:13 +0100 Message-Id: <20190226145415.19411-7-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190226145415.19411-1-ulf.hansson@linaro.org> References: <20190226145415.19411-1-ulf.hansson@linaro.org> From: Daniel Lezcano There are no longer any users of tick_nohz_get_sleep_length(), so let's drop it. Signed-off-by: Daniel Lezcano [Ulf: Clarified information in changelog] Signed-off-by: Ulf Hansson --- Changes in v11: - New patch. --- include/linux/tick.h | 6 ------ kernel/time/tick-sched.c | 39 --------------------------------------- 2 files changed, 45 deletions(-) -- 2.17.1 diff --git a/include/linux/tick.h b/include/linux/tick.h index 5b10a0e4acbb..1a0158736072 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h @@ -124,7 +124,6 @@ extern void tick_nohz_idle_enter(void); extern void tick_nohz_idle_exit(void); extern void tick_nohz_irq_exit(void); extern bool tick_nohz_idle_got_tick(void); -extern ktime_t tick_nohz_get_sleep_length(ktime_t *delta_next); extern ktime_t tick_nohz_get_next_timer(void); extern unsigned long tick_nohz_get_idle_calls(void); extern unsigned long tick_nohz_get_idle_calls_cpu(int cpu); @@ -153,11 +152,6 @@ static inline ktime_t tick_nohz_get_next_timer(void) return tick_nohz_get_next_hrtimer(); } -static inline ktime_t tick_nohz_get_sleep_length(ktime_t *delta_next) -{ - *delta_next = TICK_NSEC; - return *delta_next; -} static inline u64 get_cpu_idle_time_us(int cpu, u64 *unused) { return -1; } static inline u64 get_cpu_iowait_time_us(int cpu, u64 *unused) { return -1; } diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 9966be665074..a376c7db26ce 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -1088,45 +1088,6 @@ ktime_t tick_nohz_get_next_timer(void) return min_t(u64, next_hrtimer, next_timer); } -/** - * tick_nohz_get_sleep_length - return the expected length of the current sleep - * @delta_next: duration until the next event if the tick cannot be stopped - * - * Called from power state control code with interrupts disabled - */ -ktime_t tick_nohz_get_sleep_length(ktime_t *delta_next) -{ - struct clock_event_device *dev = __this_cpu_read(tick_cpu_device.evtdev); - struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched); - int cpu = smp_processor_id(); - /* - * The idle entry time is expected to be a sufficient approximation of - * the current time at this point. - */ - ktime_t now = ts->idle_entrytime; - ktime_t next_event; - - WARN_ON_ONCE(!ts->inidle); - - *delta_next = ktime_sub(dev->next_event, now); - - if (!can_stop_idle_tick(cpu, ts)) - return *delta_next; - - next_event = tick_nohz_next_event(ts, cpu); - if (!next_event) - return *delta_next; - - /* - * If the next highres timer to expire is earlier than next_event, the - * idle governor needs to know that. - */ - next_event = min_t(u64, next_event, - hrtimer_next_event_without(&ts->sched_timer)); - - return ktime_sub(next_event, now); -} - /** * tick_nohz_get_idle_calls_cpu - return the current idle calls counter value * for a particular CPU.