From patchwork Wed Oct 22 16:40:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 39327 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 00E83202DB for ; Wed, 22 Oct 2014 16:45:14 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id 10sf2302902lbg.1 for ; Wed, 22 Oct 2014 09:45:13 -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=D/iYLVisL+XwaWpNAagZWKn/nE8XDlQYxt6Bljewbxo=; b=e67ZsxiH3hqUwCZBoqol2lCBPqmPWvpejlteaj/Xdv4ObDhA4SVNrHtpalpY6qEuWn DN/yfuAqWayfI+G+yyIYZLC6FPMcaZdtkv/IM5x04Qg0T0bleaUjKUwd/I1MUtbh3uSP YzIWVSL/x5sol6d/XfxHs79m+eKO5rFxncg3VGSIXMCYv6X596otCdcfeT/+7yld91Uv nyZunIrIq9zy8j0OKKvY43+wtIVIxfgyLnzHPJHX3URoDL6v6xRJl2w8p5pyCJUp+mge uwvl/bTj++k8HqFTt5F6a39QvPjJnpaAoGsqLGEXO9bIZ7+kAfAMk34kHix6fAd7bKVO QEyQ== X-Gm-Message-State: ALoCoQkBk4fKmpt8AxCUg4uyFqLV83w9pqCfOLRQHoJFLDsLtQjP7yssTU7Ua6Vzq7sSCe4ulaVV X-Received: by 10.112.217.102 with SMTP id ox6mr323207lbc.19.1413996313847; Wed, 22 Oct 2014 09:45:13 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.2 with SMTP id ku2ls236887lac.2.gmail; Wed, 22 Oct 2014 09:45:13 -0700 (PDT) X-Received: by 10.153.7.107 with SMTP id db11mr43045242lad.35.1413996313661; Wed, 22 Oct 2014 09:45:13 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id kr10si24023749lac.72.2014.10.22.09.45.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Oct 2014 09:45:13 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id gq15so3204570lab.40 for ; Wed, 22 Oct 2014 09:45:13 -0700 (PDT) X-Received: by 10.152.116.102 with SMTP id jv6mr31613666lab.40.1413996313563; Wed, 22 Oct 2014 09:45:13 -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 c5csp110856lbz; Wed, 22 Oct 2014 09:45:12 -0700 (PDT) X-Received: by 10.52.29.131 with SMTP id k3mr8735294vdh.2.1413996305545; Wed, 22 Oct 2014 09:45:05 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id h9si25530340qah.91.2014.10.22.09.45.03 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 22 Oct 2014 09:45:04 -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 1Xgz0K-00048s-Mq; Wed, 22 Oct 2014 16:43:20 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xgz0I-00048G-Lj for xen-devel@lists.xensource.com; Wed, 22 Oct 2014 16:43:18 +0000 Received: from [85.158.143.35] by server-1.bemta-4.messagelabs.com id 31/56-02952-5AED7445; Wed, 22 Oct 2014 16:43:17 +0000 X-Env-Sender: Stefano.Stabellini@citrix.com X-Msg-Ref: server-10.tower-21.messagelabs.com!1413996193!12015823!3 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 28588 invoked from network); 22 Oct 2014 16:43:17 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-10.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 22 Oct 2014 16:43:17 -0000 X-IronPort-AV: E=Sophos;i="5.04,769,1406592000"; d="scan'208";a="185164553" Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.3.181.6; Wed, 22 Oct 2014 12:43:10 -0400 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1Xgz05-0001kp-A2; Wed, 22 Oct 2014 17:43:05 +0100 From: Stefano Stabellini To: Date: Wed, 22 Oct 2014 17:40:32 +0100 Message-ID: <1413996037-2747-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: MIA1 Cc: julien.grall@citrix.com, Ian.Campbell@citrix.com, JBeulich@suse.com, Stefano Stabellini Subject: [Xen-devel] [PATCH v11 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.53 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