From patchwork Tue Jan 15 12:34:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maarten Lankhorst X-Patchwork-Id: 14045 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 99C6B23F81 for ; Tue, 15 Jan 2013 12:34:32 +0000 (UTC) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by fiordland.canonical.com (Postfix) with ESMTP id 50AB3A18365 for ; Tue, 15 Jan 2013 12:34:32 +0000 (UTC) Received: by mail-vc0-f170.google.com with SMTP id fl11so38268vcb.1 for ; Tue, 15 Jan 2013 04:34:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:dkim-signature:x-received:from:to:date:message-id :x-mailer:in-reply-to:references:cc:subject:x-beenthere :x-mailman-version:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-gm-message-state; bh=7n4WOLD4cGAJAph/ZCmJr0LyoB3A2FvgeHQuIbTUyyg=; b=jHbQ/SLijuNKvGq5X0dE2R2ntpQmNXyJh+omICQ3dql27UMdEfOBulgp0m2528PCKj /67vspGl5qk+ydgWQ2Zf+qwr1Zw6PnmoTlC+4bUIbdvhQyeJI+4NKkt6iQjIN6NhJDtN 1kd9Szi6Cr8VEbg9BKjUXThrbM9DJRsJRop8kLPUbtEaD8N01mZE9EDVpDMeoraChCK3 KcBXasjR0ASvyh92+A47pdQvnJ6xUSsDNsza9t/gaQ8HbnzDU/1L/Z2oYDmJyPZrpjEe dclH+c7/uMxyotoCAAiK2k9TvTjoLyCydPhKuJWXp0TDEvzG/cWAnq3/i5P/1XZ9hVyT op4g== X-Received: by 10.52.176.6 with SMTP id ce6mr91812195vdc.57.1358253271794; Tue, 15 Jan 2013 04:34:31 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp109687veb; Tue, 15 Jan 2013 04:34:31 -0800 (PST) X-Received: by 10.204.5.141 with SMTP id 13mr39965041bkv.35.1358253270491; Tue, 15 Jan 2013 04:34:30 -0800 (PST) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id hu5si26885345bkc.114.2013.01.15.04.34.28; Tue, 15 Jan 2013 04:34:30 -0800 (PST) Received-SPF: neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) client-ip=91.189.95.16; Authentication-Results: mx.google.com; spf=neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) smtp.mail=linaro-mm-sig-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@gmail.com Received: from localhost ([127.0.0.1] helo=mombin.canonical.com) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Tv5il-0003Mu-Ne; Tue, 15 Jan 2013 12:34:27 +0000 Received: from mail-wi0-f178.google.com ([209.85.212.178]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Tv5ik-0003Me-KY for linaro-mm-sig@lists.linaro.org; Tue, 15 Jan 2013 12:34:26 +0000 Received: by mail-wi0-f178.google.com with SMTP id hn3so40938wib.5 for ; Tue, 15 Jan 2013 04:34:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=4WPO9BxKFy+ZUQfdEV8RN1rN/+pBFAMfQiz5xbKMShg=; b=Ta+9HwBi+wDEJdF+D72gf0/GJpLMS6GkRLOif6bbw+Ja7N0uuwY+HborM6y3zRIzXn WnfEqRT6AyK5xlofrMlC3D7J3inU4TnxcTnNGNqinJcDLSVzUcUXjESXHj/S6AlMY3qC floRrI3SGlMCho2NtvKlnvUIQSo/kIbLxhx9/RTFEt5jOwoZnvY6o5cOvaqmPcsNqB+p w4CFdTvpV6CkZGBuMAGt6do/g0NgLwgVj7Fp6YjusoKbj095AJfrsDZ41EPqVs835DNL q1q0yKUyv53Q1qi8pjNJiPi0o65gU1TKSpIPdFC2qWcfTgnNePhvi0QF41dHmHNkJTxX KpvQ== X-Received: by 10.180.97.68 with SMTP id dy4mr3452700wib.7.1358253266500; Tue, 15 Jan 2013 04:34:26 -0800 (PST) Received: from localhost (5ED48CEF.cm-7-5c.dynamic.ziggo.nl. [94.212.140.239]) by mx.google.com with ESMTPS id g2sm3615386wiy.0.2013.01.15.04.34.24 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 15 Jan 2013 04:34:25 -0800 (PST) Received: by localhost (sSMTP sendmail emulation); Tue, 15 Jan 2013 13:34:23 +0100 From: Maarten Lankhorst To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org Date: Tue, 15 Jan 2013 13:34:00 +0100 Message-Id: <1358253244-11453-4-git-send-email-maarten.lankhorst@canonical.com> X-Mailer: git-send-email 1.8.0.3 In-Reply-To: <1358253244-11453-1-git-send-email-maarten.lankhorst@canonical.com> References: <1358253244-11453-1-git-send-email-maarten.lankhorst@canonical.com> Cc: Maarten Lankhorst Subject: [Linaro-mm-sig] [PATCH 3/7] sched: allow try_to_wake_up to be used internally outside of core.c X-BeenThere: linaro-mm-sig@lists.linaro.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Unified memory management interest group." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linaro-mm-sig-bounces@lists.linaro.org Errors-To: linaro-mm-sig-bounces@lists.linaro.org X-Gm-Message-State: ALoCoQkoRfu1NouUsNZpgQ0Rg4MC/twpmFpqLBRSMKrsqLdiiwlX2QTknPZ66HLBEg5qq87dDMmj Not exported, since only used by the fence implementation. Signed-off-by: Maarten Lankhorst --- include/linux/wait.h | 1 + kernel/sched/core.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/wait.h b/include/linux/wait.h index 7cb64d4..7aaba95 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -11,6 +11,7 @@ typedef struct __wait_queue wait_queue_t; typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int flags, void *key); int default_wake_function(wait_queue_t *wait, unsigned mode, int flags, void *key); +int try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags); struct __wait_queue { unsigned int flags; diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 257002c..5f23fe3 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1425,7 +1425,7 @@ static void ttwu_queue(struct task_struct *p, int cpu) * Returns %true if @p was woken up, %false if it was already running * or @state didn't match @p's state. */ -static int +int try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags) { unsigned long flags;