From patchwork Fri Feb 15 14:45:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10815049 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 969C8139A for ; Fri, 15 Feb 2019 14:46:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8755B2F800 for ; Fri, 15 Feb 2019 14:46:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B5922F807; Fri, 15 Feb 2019 14:46:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 259272F800 for ; Fri, 15 Feb 2019 14:46:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727212AbfBOOqI (ORCPT ); Fri, 15 Feb 2019 09:46:08 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:34776 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729828AbfBOOqH (ORCPT ); Fri, 15 Feb 2019 09:46:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=EHWMeKcx9wnViTN9ihf7C7jkTSiQjOUf9Ygq4DjgD68=; b=MUFjJhePSTNbviuLt/tzzQlegp 6C9Yny9pX5Am+pFoqCjYBamJtvFxF6VSGg+uAHsh/OJSQ6jCVcELcnUrK0xLdXNmyR55fEhmNLfNr nBgr9WyvK54spzUaipd9NFC68oneY9FOpYTXwpiE55/Kf4Y8gj+xtP4qBte35QMr/M8Ho5iELjX48 e+CyhgSxIGwifBPgn7Cw885m8yz9s1g0q4sBWaqQG1+m8Ss0Ku3D7olkf1Xl9mocUXCzheBDn4t7P BJ2HJkbtFg8jn0vfC1k2dBaYNX4aiML7B/tIyhRdDyq45PYYCnwYAf2p4/FvqYqKcSm8PF2RQjLvE 8JHgpukg==; Received: from [91.112.108.175] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gueke-0005PN-22; Fri, 15 Feb 2019 14:46:04 +0000 From: Christoph Hellwig To: "David S. Miller" , Helge Deller Cc: Robin Murphy , iommu@lists.linux-foundation.org, sparclinux@vger.kernel.org, linux-parisc@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] ccio: allow large DMA masks Date: Fri, 15 Feb 2019 15:45:55 +0100 Message-Id: <20190215144559.8777-2-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190215144559.8777-1-hch@lst.de> References: <20190215144559.8777-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no harm in setting a 64-bit mask even if we don't need it, and the current ccio code is one of the few place in the kernel still rejecting larger than required DMA masks. Signed-off-by: Christoph Hellwig --- drivers/parisc/ccio-dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index 8d2fc84119c6..24a68fb7b2f9 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c @@ -710,8 +710,8 @@ ccio_dma_supported(struct device *dev, u64 mask) return 0; } - /* only support 32-bit devices (ie PCI/GSC) */ - return (int)(mask == 0xffffffffUL); + /* only support 32-bit or better devices (ie PCI/GSC) */ + return (int)(mask >= 0xffffffffUL); } /**