Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3786071ybi; Mon, 29 Jul 2019 12:35:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqw689Om82a0lEGUU3Q0gfqey3rHLywfI+XZVPAB5yBFkkOkhO78ukjB8Xl/7WOgwgsschlz X-Received: by 2002:a17:902:2bcb:: with SMTP id l69mr112600249plb.155.1564428934144; Mon, 29 Jul 2019 12:35:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564428934; cv=none; d=google.com; s=arc-20160816; b=X9vdAlLrCDjeX2EW8vct+fPjtSIG46KA6IlCS2WLNgJR3oDcmKZKogy5JvC2Svf1A4 hkHWn4xJV52Ms1AlviMQNAGECewdvmNPNd36M8IHp2z2CKuBpCvPdIAIBWNYQy3UbPlT 3wXxpidyi1EiKzD5WFISwHygj+OK9De/dgajkronmgxYjn9zJACCLboLbTc4x2NtS/4f L8jQUx5fBcPELCCloiUvsgLMrDBnlK5b4f2EaqQ0eksaVSuCPAYdExd3jG2n3C//xF9U Js2KPI5GXCyHhbutLVFQ/Rgv2KMGkQW84ou6cvMUt1e+vgaFiMnqLRrzYK+mSTbjXQQm mBZg== 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=b7Uq2Pltj6Rxd0HD65/9J+EJRaUXr/e24mUSRW6JbNE=; b=Tpwklg5/7uIjuZAZNW5d8TWurusT+YaVEvJ/yk98PX/LTMwG8xMqidkOKMNNB/SrbJ 3/iet3rShKPqKSME93Ele4NVDC2H1A8cmvH3thJPH/QtQfxIcU25QNz3HT4sdPtFO1S3 yyZ4GInJ1y23q6rQTA4NT1sSmTfT5VJUMbtkdSYTWZPBeHPyGJMaD9ow5/MKbW56iAUb 51KSFwwKFN0Qj5kWBKtER2FTF3aRK6wTPRsVEzXqDE0dAiwn7cxUnHHPtYPbCJFBkmaY VUSsHPM5mdvZtns9rSV40LWSoWh30q3+E0n0gEqG7Z00jYbXEU2l7V+Z1hYNKZK2wg07 B6yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WtdbKwpj; 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 99si24922465plc.31.2019.07.29.12.35.19; Mon, 29 Jul 2019 12:35:34 -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=WtdbKwpj; 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 S1729584AbfG2Tca (ORCPT + 99 others); Mon, 29 Jul 2019 15:32:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:45934 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729269AbfG2Tc1 (ORCPT ); Mon, 29 Jul 2019 15:32:27 -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 DF0FC2070B; Mon, 29 Jul 2019 19:32:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428746; bh=9kmPyRcMmFGN7pr4iXMbqPLPyqE6JzneAeKulfpo9v4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WtdbKwpjX0Of74+Hnie2CY5Tg14XfVs1DpR/XymuhMbmpec7NJHYCCw7XWEMtdShD pZ6+oZmROp3VZub8V/GRNLzVRyWjnM60yQIamWWlAwSxx+cfmLBCV1jtyxRg0FRCC+ MNGgN3a0tFQ1dkP1DYXibukcFCEXCYYSSuxhLtMQ= 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 4.14 172/293] intel_th: msu: Fix single mode with disabled IOMMU Date: Mon, 29 Jul 2019 21:21:03 +0200 Message-Id: <20190729190837.690914993@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@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 @@ -640,7 +640,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;