From patchwork Tue Oct 21 18:10:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 39220 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EDB462039B for ; Tue, 21 Oct 2014 18:15:06 +0000 (UTC) Received: by mail-la0-f69.google.com with SMTP id q1sf1110714lam.0 for ; Tue, 21 Oct 2014 11:15:05 -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=nNfwk4Tht38KjyzE0SzzP8HQSbjOFbeep6N1lADceLA=; b=cgAmDpjl0WoA5BJu3kL76FqxcRHfb4mTskJ95B/kdynHh2lwNrY/1Ymdzj/BVJHCny eyrHSkbTkc+kbL+4nuNLOcqBqC3P8z8auofUnVn4o9g3VLtdVki3v/nIpBlDdxc7pCfq dVfNae/FM+CKG0hgjjMPsYNvuWb7LeTxZHVJPhXU4Arj337GasPgl2Q3IaHGorYsilL7 Nn/CFRz4nG0KBidVfaiaTwMnKAwvinSlbyz8IxRBykMtsAHEzPEY7Ul3MAfTIiVgq+tK ML2LR1hZfjgv0fRxJk1wilPwFRtkkDuOT1YgXb4dVzYEPlaYghkNLHqpDESLw4Hi9zRG djhg== X-Gm-Message-State: ALoCoQmWm8E4xxj06KnF/7AYzt0cxFlv26wbJljzIdpDESOvYkRXFl89rZja//psq1AKJtcHLN+5 X-Received: by 10.112.26.82 with SMTP id j18mr693368lbg.16.1413915305807; Tue, 21 Oct 2014 11:15:05 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.11.132 with SMTP id ei4ls87319lad.109.gmail; Tue, 21 Oct 2014 11:15:05 -0700 (PDT) X-Received: by 10.112.77.74 with SMTP id q10mr28078424lbw.66.1413915305291; Tue, 21 Oct 2014 11:15:05 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id t7si20174369laa.104.2014.10.21.11.15.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Oct 2014 11:15:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by mail-la0-f45.google.com with SMTP id q1so1576355lam.18 for ; Tue, 21 Oct 2014 11:15:05 -0700 (PDT) X-Received: by 10.152.5.38 with SMTP id p6mr31744265lap.44.1413915305002; Tue, 21 Oct 2014 11:15:05 -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.112.84.229 with SMTP id c5csp556137lbz; Tue, 21 Oct 2014 11:15:04 -0700 (PDT) X-Received: by 10.52.138.211 with SMTP id qs19mr1486666vdb.13.1413915303829; Tue, 21 Oct 2014 11:15:03 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id zx7si8939038vdb.66.2014.10.21.11.15.03 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 21 Oct 2014 11:15:03 -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 1Xgdvr-00026m-UB; Tue, 21 Oct 2014 18:13:19 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xgdvq-000261-Fz for xen-devel@lists.xensource.com; Tue, 21 Oct 2014 18:13:18 +0000 Received: from [85.158.139.211] by server-17.bemta-5.messagelabs.com id 8A/A1-02704-D32A6445; Tue, 21 Oct 2014 18:13:17 +0000 X-Env-Sender: Stefano.Stabellini@citrix.com X-Msg-Ref: server-10.tower-206.messagelabs.com!1413915194!5642026!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.12.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 10424 invoked from network); 21 Oct 2014 18:13:16 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-10.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 21 Oct 2014 18:13:16 -0000 X-IronPort-AV: E=Sophos;i="5.04,763,1406592000"; d="scan'208";a="184785994" Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.3.181.6; Tue, 21 Oct 2014 14:13:13 -0400 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1Xgdvg-0001jK-A1; Tue, 21 Oct 2014 19:13:08 +0100 From: Stefano Stabellini To: Date: Tue, 21 Oct 2014 19:10:33 +0100 Message-ID: <1413915038-17490-3-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: julien.grall@citrix.com, Ian.Campbell@citrix.com, JBeulich@suse.com, Stefano Stabellini Subject: [Xen-devel] [PATCH v10 3/8] xen/arm: return int from *_dcache_va_range 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.215.45 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: These functions cannot really fail on ARM, but their x86 equivalents can (-EOPNOTSUPP). Change the prototype to return int. Signed-off-by: Stefano Stabellini Reviewed-by: Julien Grall Acked-by: Ian Campbell --- Changes in v9: - remove useless ASSERT; - add a comment on ARM callers assuming that these functions cannot fail. Changes in v6: - do not return int from flush_page_to_ram. --- xen/include/asm-arm/page.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xen/include/asm-arm/page.h b/xen/include/asm-arm/page.h index fb1e710..69e9a61 100644 --- a/xen/include/asm-arm/page.h +++ b/xen/include/asm-arm/page.h @@ -268,16 +268,18 @@ extern size_t cacheline_bytes; /* Functions for flushing medium-sized areas. * if 'range' is large enough we might want to use model-specific * full-cache flushes. */ -static inline void clean_dcache_va_range(const void *p, unsigned long size) +static inline int clean_dcache_va_range(const void *p, unsigned long size) { const void *end; dsb(sy); /* So the CPU issues all writes to the range */ for ( end = p + size; p < end; p += cacheline_bytes ) asm volatile (__clean_dcache_one(0) : : "r" (p)); dsb(sy); /* So we know the flushes happen before continuing */ + /* ARM callers assume that dcache_* functions cannot fail. */ + return 0; } -static inline void clean_and_invalidate_dcache_va_range +static inline int clean_and_invalidate_dcache_va_range (const void *p, unsigned long size) { const void *end; @@ -285,6 +287,8 @@ static inline void clean_and_invalidate_dcache_va_range for ( end = p + size; p < end; p += cacheline_bytes ) asm volatile (__clean_and_invalidate_dcache_one(0) : : "r" (p)); dsb(sy); /* So we know the flushes happen before continuing */ + /* ARM callers assume that dcache_* functions cannot fail. */ + return 0; } /* Macros for flushing a single small item. The predicate is always