Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10753263ybi; Thu, 25 Jul 2019 04:45:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/HN/U3pfIWw8poHb9RKfLX4Nb5MvRTiNBwdFOsZXjniCqNX1AEmIhnjBCJjBx3sid0J6y X-Received: by 2002:a17:90a:c391:: with SMTP id h17mr93118323pjt.131.1564055113941; Thu, 25 Jul 2019 04:45:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564055113; cv=none; d=google.com; s=arc-20160816; b=mDQmbBs1KheQUVxKtamlA6a+aczcTxGYZDxjQ9o69yhFgV2XI/ZPuCQkv7FfL2/51o eM72tSiYBVNGV44MH6C8hAsXYb9ap817CkzoGpk1xBasCHhg8qv2s6i9uOLwuPtlEoHe vD6K3hQF1W/fMXwjto0RiBjDEGiGMy8CqNoU9UK9A98mEu0Lv//ithxLhBZRBsea0xwS ZFo3P0maSebpZuvV9qtAsAznRiKunIMOXRTRsONHDbs96xn5Z/UfNmbG9pfuPNyE9VBT 79Z1wpVKNw7vshBkg/k1EcETuZ4p049jWYo5GMhU2EgzfkMtwJWjbAqGNthBeu+8mHni OH4A== 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=kT5oz8QKqQ3HKLBxSCDknF8NMYamva0fVPYqRG/s4jU=; b=ZIFrCGPcI9YR1xEH4O+qqkAhWdBebAQtYOgHtjf9LjClYSehKcpCjUrj6tLZImd/4C u333QHHC7U7Ml8ja/ipREbT9T2gaQ4louqb+1m3OP9W1Wl3eHCp56HC3NgvD71fEFJjI esJtEQaBOOdUq5C3vFtbwjYinbvo4l8B4y2BH5605g5z5Kqic/IjYIGGkrIJhpwZTkWd pR7C9cYy27hcLc2FaejwdlH1CnR9UXtIu29o9C/rnjz15EbXjw4wFdtsNiNCHteXso6+ SldA3d5WhwRvaUEnCOauRiLa5f3SzdekLQ+BBfALd0pCg7ozp1eaayqU72st+ezRsjw2 GHtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BISc9SQi; 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 65si10926438pgj.19.2019.07.25.04.44.58; Thu, 25 Jul 2019 04:45:13 -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=BISc9SQi; 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 S1728735AbfGYFqn (ORCPT + 99 others); Thu, 25 Jul 2019 01:46:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:34322 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388109AbfGYFqg (ORCPT ); Thu, 25 Jul 2019 01:46:36 -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 8E55B20828; Thu, 25 Jul 2019 05:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564033596; bh=GfGjMnWLUUSxT6IFd61blMI2JbmrwLzDJpqgTbFUelA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BISc9SQi1zGPbUJjSZoM2uXMVapgdAiR2XxCBH3T1jfnYRb9e0/RDISGlOuYW/piC Z2vagxvGkJtIyO1SId0Fh5xEfa+gnZFY2+5fhIi4apUq6J9ZLUNP3SPnUY5rUg6qyV Q3F9QtEN3gJqeYzHO8bfjJxya/yjpm1AvuWaTfFI= 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.19 263/271] intel_th: msu: Fix single mode with disabled IOMMU Date: Wed, 24 Jul 2019 21:22:12 +0200 Message-Id: <20190724191717.758704850@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191655.268628197@linuxfoundation.org> References: <20190724191655.268628197@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 @@ -632,7 +632,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;