From patchwork Wed Jul 23 13:37:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 34158 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 886002061E for ; Wed, 23 Jul 2014 13:40:39 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id g18sf7637958oah.2 for ; Wed, 23 Jul 2014 06:40:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=4ORK0NiZIBT1p+KRSTF3bvIaX9BGyHsoHZeJq8vMisI=; b=g1Eng4WERVCCxSglwvXC9zZGSAZMPvezXRp0jM+SstCtMOCYOHNDlm4zoe/MRW5FxE dzF3whHzuuaTLozW6A6acin60Ps8Jjx1VB5lDo/plI01+pz8hohpTcTatVR0QiIs31oz tX18FX74LjOGEkdlmOq7ZNqGzHFJ5p9VwL2k38AF9S2MnwASkC3zBBolyn3S2V79Ad2h LXp/j2zbYpX5M5Y1v4ndZJGlyWcEMTp3grD3IBFIV8dbsAFPY607YUza3x09vZ5Eywvz L/n+VXbTDga/YVj8jTgyBuGUZ6UjB2H7o5B0vMs1S7qPLRoSK+0eYyJeFm8bEKoyOQsD cMoA== X-Gm-Message-State: ALoCoQm8l3TQnoAT5NZt90hRlnlmHFwfZO/EgoD0vG/s3TFOgAmntPhi1PjBOy0jkekFZliHQEAk X-Received: by 10.42.208.72 with SMTP id gb8mr898025icb.24.1406122838977; Wed, 23 Jul 2014 06:40:38 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.100.214 with SMTP id s80ls351963qge.99.gmail; Wed, 23 Jul 2014 06:40:38 -0700 (PDT) X-Received: by 10.221.42.135 with SMTP id ty7mr2411461vcb.14.1406122838811; Wed, 23 Jul 2014 06:40:38 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id jg2si2020421vdb.25.2014.07.23.06.40.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Jul 2014 06:40:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id hy4so2091769vcb.22 for ; Wed, 23 Jul 2014 06:40:37 -0700 (PDT) X-Received: by 10.220.50.8 with SMTP id x8mr2397273vcf.18.1406122837469; Wed, 23 Jul 2014 06:40:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp280525vcb; Wed, 23 Jul 2014 06:40:37 -0700 (PDT) X-Received: by 10.42.15.19 with SMTP id j19mr2963521ica.59.1406122836756; Wed, 23 Jul 2014 06:40:36 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id f20si6190084icc.101.2014.07.23.06.40.36 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 23 Jul 2014 06:40:36 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X9wkX-0002s6-Rx; Wed, 23 Jul 2014 13:38:29 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X9wkV-0002rl-Pu for xen-devel@lists.xenproject.org; Wed, 23 Jul 2014 13:38:27 +0000 Received: from [85.158.139.211:64666] by server-6.bemta-5.messagelabs.com id 7F/F7-06284-3DABFC35; Wed, 23 Jul 2014 13:38:27 +0000 X-Env-Sender: Stefano.Stabellini@citrix.com X-Msg-Ref: server-2.tower-206.messagelabs.com!1406122704!17128405!2 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 6141 invoked from network); 23 Jul 2014 13:38:26 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-2.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 23 Jul 2014 13:38:26 -0000 X-IronPort-AV: E=Sophos;i="5.01,717,1400025600"; d="scan'208";a="155401374" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 23 Jul 2014 13:38:23 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.3.181.6; Wed, 23 Jul 2014 09:38:23 -0400 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1X9wkR-00042c-7A; Wed, 23 Jul 2014 14:38:23 +0100 From: Stefano Stabellini To: Date: Wed, 23 Jul 2014 14:37:22 +0100 Message-ID: <1406122643-12028-1-git-send-email-stefano.stabellini@eu.citrix.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian.Campbell@citrix.com, anup.patel@linaro.org, stefano.stabellini@eu.citrix.com, george.dunlap@eu.citrix.com, julien.grall@linaro.org, JBeulich@suse.com, pranavkumar@linaro.org Subject: [Xen-devel] [PATCH v2 1/2] xen: export do_yield as vcpu_yield X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stefano.stabellini@eu.citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: Signed-off-by: Stefano Stabellini CC: george.dunlap@eu.citrix.com CC: JBeulich@suse.com Changes in v2: - do not change paramters and return value of do_yield. Acked-by: George Dunlap --- xen/common/schedule.c | 6 +++--- xen/include/xen/sched.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/common/schedule.c b/xen/common/schedule.c index e9eb0bc..9a49769 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -795,7 +795,7 @@ static long do_poll(struct sched_poll *sched_poll) } /* Voluntarily yield the processor for this allocation. */ -static long do_yield(void) +long vcpu_yield(void) { struct vcpu * v=current; spinlock_t *lock = vcpu_schedule_lock_irq(v); @@ -888,7 +888,7 @@ long do_sched_op_compat(int cmd, unsigned long arg) { case SCHEDOP_yield: { - ret = do_yield(); + ret = vcpu_yield(); break; } @@ -925,7 +925,7 @@ ret_t do_sched_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) { case SCHEDOP_yield: { - ret = do_yield(); + ret = vcpu_yield(); break; } diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 2f876f5..be932cf 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -634,6 +634,7 @@ int sched_id(void); void sched_tick_suspend(void); void sched_tick_resume(void); void vcpu_wake(struct vcpu *v); +long vcpu_yield(void); void vcpu_sleep_nosync(struct vcpu *v); void vcpu_sleep_sync(struct vcpu *v);