From patchwork Fri Nov 21 17:00:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 41329 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 44F8625B55 for ; Fri, 21 Nov 2014 17:01:32 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b57sf3610762eek.9 for ; Fri, 21 Nov 2014 09:01:31 -0800 (PST) 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=4OEpmWfPFy/Def0CF5zLPn00sqyH601NBaO+Y4RGMTs=; b=g5pp2Tfb/Q5hNiRkSFqsHtukuh2s3o5GgdTBOUsTRyG08Th7+89zvBUDH9nC/Titur dOSEXp4DyfTMgKiSiUq9q1sZwcqmsf8GDkptHMGUXU4xmedE3mpyG32x8XTmMCF5wEmj MWjf1xSXamXufQk8I0zLjdpNSQcPN7n1498HULXo2NYX0x0QN7EvsINTOT0DQ51p7v9K J7Xcx6EqiGtS8VExoBKeyVc6I3EgAqMH58n2R3Pfdbbm4IE7uGeAxww+KrdyiB5+L3pD G0PbFFdTyvDXxBzRIajeRJgWAHydqIVAtUQrFJOZ74X7P3xRetPVzAEeoE8lIYZoIlVB 3Ucg== X-Gm-Message-State: ALoCoQl1hCw1+hSxQHC8H7lIILkt9L10upzmcqz+m+Dzl6fwiJJ8LXJGWcP926OPRzf4B5gS/wSp X-Received: by 10.180.98.165 with SMTP id ej5mr1334096wib.1.1416589291572; Fri, 21 Nov 2014 09:01:31 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.137 with SMTP id o9ls187921lal.17.gmail; Fri, 21 Nov 2014 09:01:31 -0800 (PST) X-Received: by 10.112.56.134 with SMTP id a6mr6322262lbq.25.1416589291326; Fri, 21 Nov 2014 09:01:31 -0800 (PST) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id ea3si6346149lbc.123.2014.11.21.09.01.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Nov 2014 09:01:29 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by mail-lb0-f181.google.com with SMTP id l4so4360132lbv.26 for ; Fri, 21 Nov 2014 09:01:29 -0800 (PST) X-Received: by 10.152.37.69 with SMTP id w5mr6146917laj.67.1416589289138; Fri, 21 Nov 2014 09:01:29 -0800 (PST) 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.184.201 with SMTP id ew9csp127031lbc; Fri, 21 Nov 2014 09:01:28 -0800 (PST) X-Received: by 10.66.138.101 with SMTP id qp5mr9138784pab.90.1416589287575; Fri, 21 Nov 2014 09:01:27 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pa9si9271620pac.237.2014.11.21.09.01.26 for ; Fri, 21 Nov 2014 09:01:27 -0800 (PST) Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932617AbaKURB0 (ORCPT + 1 other); Fri, 21 Nov 2014 12:01:26 -0500 Received: from smtp.citrix.com ([66.165.176.89]:45604 "EHLO SMTP.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932568AbaKURBZ (ORCPT ); Fri, 21 Nov 2014 12:01:25 -0500 X-IronPort-AV: E=Sophos;i="5.07,432,1413244800"; d="scan'208";a="193778969" 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; Fri, 21 Nov 2014 12:00:33 -0500 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1XrrZM-0006qq-Dx; Fri, 21 Nov 2014 17:00:28 +0000 From: Stefano Stabellini To: CC: , , , , Stefano Stabellini , Subject: [PATCH 1/2] swiotlb-xen: call xen_dma_sync_single_for_device when appropriate Date: Fri, 21 Nov 2014 17:00:19 +0000 Message-ID: <1416589220-7720-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 Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.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.217.181 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-Post: , List-Help: , List-Archive: List-Unsubscribe: , In xen_swiotlb_sync_single we always call xen_dma_sync_single_for_cpu, even when we should call xen_dma_sync_single_for_device. Fix that. Signed-off-by: Stefano Stabellini CC: konrad.wilk@oracle.com CC: stable@vger.kernel.org --- drivers/xen/swiotlb-xen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 153cf14..810ad41 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -502,7 +502,7 @@ xen_swiotlb_sync_single(struct device *hwdev, dma_addr_t dev_addr, swiotlb_tbl_sync_single(hwdev, paddr, size, dir, target); if (target == SYNC_FOR_DEVICE) - xen_dma_sync_single_for_cpu(hwdev, dev_addr, size, dir); + xen_dma_sync_single_for_device(hwdev, dev_addr, size, dir); if (dir != DMA_FROM_DEVICE) return;