Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9978306ybi; Wed, 24 Jul 2019 13:25:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqweL5ODXfIxQGMySRe1Y9aJuPxRx5lnjHk6F+4UyAEnkXuu63yjmu9WSZBtO+da0sxVKWY/ X-Received: by 2002:a17:902:758d:: with SMTP id j13mr85221279pll.197.1563999920791; Wed, 24 Jul 2019 13:25:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563999920; cv=none; d=google.com; s=arc-20160816; b=VqQenhrNBR1JUhqbElyOPRSsYbHNd9SzhogcbznbuCTHRsuL4eAzrEPgzpbf44CO4j TdEB3ZJCIwOnA3Ip1DeA5ZzKRZAu3REbiOtAUONl08T1CZw5qYQeg+0WgwcHrjZEE1V6 dHQB6H6l0eYh12L4BN5dS29RfXUv4hs2xKUCpwjfU0zvP8YBMayvLYJpan7jm4jTRghr X5Lfh8eDj71JyD1U5BXEiQh09i+HeKertgj/r2b2u8uo1gdXbnL9AlOprcEJRkxRIZ2Q ufDMzFTwKGsKQzKkoUwW13qp2VyNAZnpNoNrA5CPx/upwQdgxHU2AIwTSaFcuuheYJET jjOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xxWhJJ20u0cjJ0XD6QwsbxZzP0No/d6WbPD9XhzgsyM=; b=jsP1j7UZX69Z5gFf9HiRJTxYZjtVOd4EvfZWTY67SRvRkbqoRDGibqoYRvN420aif+ vEUACia2JaTOsDDJgPVqnAgE3jtM1kvhWuo5lpdJr5NUC2tO8qjhiwgjakDt//BeBCue bsd7trdMWSNQYbL09udZBHKe9LIqBkOcH6DG38R1mVc9lOSaco4bIHh+rhNoBc7te57X 12mZInfFwEbJPNEZMsmj/bbBDjl3nf79owUeyTcBPDGYKEI1ni9OgOPM6JQs65TAw2lX 5lfJhjtlBN60h06nyWGoEeJcaQXJVxJpkvMMSTMReflcFXnSzNhtWkDhZS4l7WOBTvb1 991g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2AXGLQNy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1si16392172pgb.482.2019.07.24.13.25.05; Wed, 24 Jul 2019 13:25:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2AXGLQNy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390329AbfGXTmO (ORCPT + 99 others); Wed, 24 Jul 2019 15:42:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:43760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389972AbfGXTmL (ORCPT ); Wed, 24 Jul 2019 15:42:11 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6E1E922ADA; Wed, 24 Jul 2019 19:42:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563997329; bh=QiKC/VivQIoxmg3yBRcIcOlipW1TBEmJWn+GEtmyBV0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2AXGLQNyopUMLcu29kDY59dq8DMMN3few12QNkpJwj/sxFshbLCsAklL+RJtEqcC4 eHz2BLlNFdZIFUglKwU6EOxs1FakbyM3edMDyhM57L9U/GPbf+Cg2jJn+6e5Y58ClD GXIGXCbpGYQoQDYcSGnYoIMBOxlUfWYomIOodIaw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Shishkin , Andy Shevchenko , Ammy Yi Subject: [PATCH 5.2 400/413] intel_th: msu: Fix single mode with disabled IOMMU Date: Wed, 24 Jul 2019 21:21:31 +0200 Message-Id: <20190724191803.455107597@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Shishkin commit 918b8646497b5dba6ae82d4a7325f01b258972b9 upstream. Commit 4e0eaf239fb3 ("intel_th: msu: Fix single mode with IOMMU") switched the single mode code to use dma mapping pages obtained from the page allocator, but with IOMMU disabled, that may lead to using SWIOTLB bounce buffers and without additional sync'ing, produces empty trace buffers. Fix this by using a DMA32 GFP flag to the page allocation in single mode, as the device supports full 32-bit DMA addressing. Signed-off-by: Alexander Shishkin Fixes: 4e0eaf239fb3 ("intel_th: msu: Fix single mode with IOMMU") Reviewed-by: Andy Shevchenko Reported-by: Ammy Yi Cc: stable Link: https://lore.kernel.org/r/20190621161930.60785-4-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/hwtracing/intel_th/msu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/hwtracing/intel_th/msu.c +++ b/drivers/hwtracing/intel_th/msu.c @@ -667,7 +667,7 @@ static int msc_buffer_contig_alloc(struc goto err_out; ret = -ENOMEM; - page = alloc_pages(GFP_KERNEL | __GFP_ZERO, order); + page = alloc_pages(GFP_KERNEL | __GFP_ZERO | GFP_DMA32, order); if (!page) goto err_free_sgt;