Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2309779imm; Thu, 7 Jun 2018 08:33:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLoWBSavxLJgeUm5UxeSEQq1x9JPpMYrXfatxoiubRuMQlm1gXykzPfuUgrMi+j0Bhdp5wo X-Received: by 2002:a62:6406:: with SMTP id y6-v6mr2243285pfb.204.1528385632779; Thu, 07 Jun 2018 08:33:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528385632; cv=none; d=google.com; s=arc-20160816; b=y9f5K/HDBAiWbDz449FKeWhfPbHAp+4sJxhLHewTQ6rVAEZLZihxwMQmEm/MGRvWrE lRr2vpebSozXVKXkfQvQxApf50eW38nBSJfKkNdW/0D3sqQ3HNbU8RB8Zn84v4EyS2SI bYnymERSAXb/ebTXEp/455O48akDIrh8aDdiqWLB6AlAQEulgfjqbFyZsGoYPc/0huON 8jTxH1GEzntI+eVA1FNl4Vf287uHqknVDUxZdSORNCQ6iVzj5iO+oF6iB0FTAh74IwA8 8j7K61GBTW2wxZUXZoZsWCAgnsfOh0Ztyp1AKhD5M3D+UDFy5EDXPka2sOwS0/aLxGuC kMQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=Gl1P+/Dc/W5TKVrTLfbYfslMcyieYRnqCy5GWOFTVdU=; b=XQulb5H+6JkOCipTvFrd1dkrEtpFIz81haO8PM7RhZdusYDMpLMQKk2fjmkvlEsViK I2mi4zMf+0YaG0CfQCUljLZGpSwwCzPtPbvm10DZfeWIT/AHPMXkOQEoTUEmsLLkAZKs A+T8sMhdkcKMh/8fd9hC5aCHsgH7jgtWFn+0NxdmDp4dUB8gKqOxESr1HgXGJHTlmcbM Hlf5Z1X7lKOGbdJIDq8WUJOIgTfYUnovKzfxI9RzWRJBXXL1fMRAB9PK9ys6hXbPWp/R dEPs9HJMtzSv1tyQxTV1OWPX17BjQaiVKo6yefVLnZVOmTN+wVOs021lzjTOVc6blnW2 V7PA== ARC-Authentication-Results: i=1; mx.google.com; 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 y3-v6si22973491pgs.434.2018.06.07.08.33.38; Thu, 07 Jun 2018 08:33:52 -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; 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 S933476AbeFGOwR (ORCPT + 99 others); Thu, 7 Jun 2018 10:52:17 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:40905 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932674AbeFGOwP (ORCPT ); Thu, 7 Jun 2018 10:52:15 -0400 Received: from [148.252.241.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fQvbX-0005Zq-H5; Thu, 07 Jun 2018 15:09:31 +0100 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1fQvb9-000372-GL; Thu, 07 Jun 2018 15:09:07 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Ben Crocker" , "Alex Deucher" Date: Thu, 07 Jun 2018 15:05:21 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 278/410] drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE In-Reply-To: X-SA-Exim-Connect-IP: 148.252.241.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.57-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Ben Crocker commit 2c83029cda55a5e7665c7c6326909427d6a01350 upstream. In radeon_device_init, set the need_dma32 flag for Cedar chips (e.g. FirePro 2270). This fixes, or at least works around, a bug on PowerPC exposed by last year's commits 8e3f1b1d8255105f31556aacf8aeb6071b00d469 (Russell Currey) and 253fd51e2f533552ae35a0c661705da6c4842c1b (Alistair Popple) which enabled the 64-bit DMA iommu bypass. This caused the device to freeze, in some cases unrecoverably, and is the subject of several bug reports internal to Red Hat. Signed-off-by: Ben Crocker Signed-off-by: Alex Deucher Signed-off-by: Ben Hutchings --- drivers/gpu/drm/radeon/radeon_device.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -1339,6 +1339,10 @@ int radeon_device_init(struct radeon_dev if ((rdev->flags & RADEON_IS_PCI) && (rdev->family <= CHIP_RS740)) rdev->need_dma32 = true; +#ifdef CONFIG_PPC64 + if (rdev->family == CHIP_CEDAR) + rdev->need_dma32 = true; +#endif dma_bits = rdev->need_dma32 ? 32 : 40; r = pci_set_dma_mask(rdev->pdev, DMA_BIT_MASK(dma_bits));