From patchwork Thu May 8 15:54:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 29847 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f198.google.com (mail-pd0-f198.google.com [209.85.192.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 053BD20534 for ; Thu, 8 May 2014 15:56:42 +0000 (UTC) Received: by mail-pd0-f198.google.com with SMTP id w10sf10321975pde.9 for ; Thu, 08 May 2014 08:56:41 -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:date:from:to:in-reply-to:message-id :references:user-agent: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=SkxljpUuMg4RG/DAmGpwEeAh848hAqYdYuC7ELG5arc=; b=a9nPulnXQeoT2yOzWkCA1HdD+gPIu7Yaet7OJKUVeLwio5V1W8aK3XyGerC0xA5dNo XplWsVgjnA5jvYuZZddppqkX0GLsLt3VT5ahZ693sVF3oMEPwZO9LrxAvWiBGYJrSqIH DR7wTujI7zXS8wzcgjaO95fhQKDZhi6ojVXhnVFZ4+AdwzFc+oOJ7T5LQgXPdJoViPnj +1+j02Erau3cwlxQBpQgOFOcq7aHH92RmFMEFtFh2VxV0OTzXqn/JMC4H/yP71zaF6iq Pd7KPhS69wdKfzQRoFnMpyr6PJJ6zoBmo5jOSgqbpiTpy1XNCT3lv5jqI1JJ1IYuHghh ueQQ== X-Gm-Message-State: ALoCoQmzX6nSxp0emOvNT60NyZ5JmE3+FpO3BxyV0sCZ4bVdfAvjxmE8UUbs4srDBGQdok5nwLki X-Received: by 10.66.180.77 with SMTP id dm13mr7917280pac.43.1399564601888; Thu, 08 May 2014 08:56:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.89.70 with SMTP id u64ls3859758qgd.80.gmail; Thu, 08 May 2014 08:56:41 -0700 (PDT) X-Received: by 10.221.27.8 with SMTP id ro8mr3749971vcb.30.1399564601726; Thu, 08 May 2014 08:56:41 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id tr2si250046vdc.24.2014.05.08.08.56.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 May 2014 08:56:41 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id db11so3555123veb.29 for ; Thu, 08 May 2014 08:56:41 -0700 (PDT) X-Received: by 10.58.186.207 with SMTP id fm15mr3741207vec.4.1399564601584; Thu, 08 May 2014 08:56:41 -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.220.221.72 with SMTP id ib8csp3647vcb; Thu, 8 May 2014 08:56:41 -0700 (PDT) X-Received: by 10.224.68.2 with SMTP id t2mr6063564qai.71.1399564601001; Thu, 08 May 2014 08:56:41 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id c32si689413qgd.144.2014.05.08.08.56.40 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 08 May 2014 08:56:40 -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 1WiQeo-0002M6-Tu; Thu, 08 May 2014 15:54:50 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WiQen-0002Lw-BZ for xen-devel@lists.xenproject.org; Thu, 08 May 2014 15:54:49 +0000 Received: from [85.158.139.211:3561] by server-2.bemta-5.messagelabs.com id F4/ED-12074-8C8AB635; Thu, 08 May 2014 15:54:48 +0000 X-Env-Sender: Stefano.Stabellini@citrix.com X-Msg-Ref: server-6.tower-206.messagelabs.com!1399564486!3110189!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 14848 invoked from network); 8 May 2014 15:54:47 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-6.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 8 May 2014 15:54:47 -0000 X-IronPort-AV: E=Sophos; i="4.97,1010,1389744000"; d="scan'208"; a="129026333" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 08 May 2014 15:54:44 +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; Thu, 8 May 2014 11:54:32 -0400 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1WiQeP-0005aU-KJ; Thu, 08 May 2014 16:54:25 +0100 Date: Thu, 8 May 2014 16:54:02 +0100 From: Stefano Stabellini X-X-Sender: sstabellini@kaball.uk.xensource.com To: David Vrabel In-Reply-To: <1399543764-29054-3-git-send-email-david.vrabel@citrix.com> Message-ID: References: <1399543764-29054-1-git-send-email-david.vrabel@citrix.com> <1399543764-29054-3-git-send-email-david.vrabel@citrix.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-DLP: MIA2 Cc: xen-devel@lists.xenproject.org, Boris Ostrovsky , Stefano Stabellini Subject: Re: [Xen-devel] [PATCH 2/2] arm, arm64/xen: introduce HYPERVISOR_suspend 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=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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: On Thu, 8 May 2014, David Vrabel wrote: > From: Stefano Stabellini > > Introduce HYPERVISOR_suspend: it is a call to sched_op with an > additional argument that is always 0 on arm and arm64. Given that the third argument is not actually mandatory, we can have a simpler arm side patch: --- arm,arm64/xen: introduce HYPERVISOR_suspend Introduce HYPERVISOR_suspend. Also introduce a few additional empty stubs for Xen arch specific functions called by drivers/xen/manage.c. Signed-off-by: Stefano Stabellini Signed-off-by: David Vrabel diff --git a/arch/arm/include/asm/xen/hypercall.h b/arch/arm/include/asm/xen/hypercall.h index 7658150..712b50e 100644 --- a/arch/arm/include/asm/xen/hypercall.h +++ b/arch/arm/include/asm/xen/hypercall.h @@ -34,6 +34,7 @@ #define _ASM_ARM_XEN_HYPERCALL_H #include +#include long privcmd_call(unsigned call, unsigned long a1, unsigned long a2, unsigned long a3, @@ -50,6 +51,15 @@ int HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args); int HYPERVISOR_tmem_op(void *arg); int HYPERVISOR_multicall(struct multicall_entry *calls, uint32_t nr); +static inline int +HYPERVISOR_suspend(unsigned long start_info_mfn) +{ + struct sched_shutdown r = { .reason = SHUTDOWN_suspend }; + + /* start_info_mfn is unused on ARM */ + return HYPERVISOR_sched_op(SCHEDOP_shutdown, &r); +} + static inline void MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va, unsigned int new_val, unsigned long flags) diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index b96723e..1a7087b 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c @@ -339,6 +339,14 @@ static int __init xen_pm_init(void) } late_initcall(xen_pm_init); + +/* empty stubs */ +void xen_arch_pre_suspend(void) { } +void xen_arch_post_suspend(int suspend_cancelled) { } +void xen_timer_resume(void) { } +void xen_arch_resume(void) { } + + /* In the hypervisor.S file. */ EXPORT_SYMBOL_GPL(HYPERVISOR_event_channel_op); EXPORT_SYMBOL_GPL(HYPERVISOR_grant_table_op);