Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5963327imu; Tue, 13 Nov 2018 14:46:00 -0800 (PST) X-Google-Smtp-Source: AJdET5fXFgX8omLOKtve7rG+52rUmPBdhu1SrgwUaL2nq+6BceqaLzXO51kX90gFiYEa6VH0OeUJ X-Received: by 2002:a63:554b:: with SMTP id f11mr6700168pgm.37.1542149160751; Tue, 13 Nov 2018 14:46:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542149160; cv=none; d=google.com; s=arc-20160816; b=WRhEr7jQrCGat8n/aLtsrwNGurkmG1bbtNyt5xcaCOE4igBGOn3zB6fhT58fpPBsiG ZLMXf7zierhSzDt0jOapCt0/Ruv0i7cxJpwEBpY/VxaaacNM58/46P7C5suXj6lfACi7 vR3tOEcJgrMZ54H6NNbJ0N8CYE5IgGeGqtutl328O4jNob6/CPCSiTqW586rX7EjrLdp C6jCRC7JcbB8o1YCKr1Fmoj4JmgVq6PD1v6dO3Ca3lR3hEiJxXWCkKkkpE3FJtf9wzzM 87U8KqZyC51Nhi9FS333XkrzfOmqgikAmfm3gGlBa/KyRoWWWcdlw4dh+BhmWrIuFBRD NR7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date; bh=O2TI29hMTUP7sl7/a/J5XEPoN2ZOx/gtYTqxNkaiaCw=; b=JLBcF/4QqFPJmqq/vZt2BipiwlnjFjPnkGGBLaAuxHyZGcOPMz9mcHixBcxMpuys6r Pg/djtmHbk6P6QDhPEN1Bu/A9QFFPtooTYH2q7OVRrrjQwSm9MIKhsvpUVFNhu4X4sIQ sUJg9HWzR/WaS/OH9QjmU4fNKycU+qHqDRtzkynJvw/5MShFQVQLmM5sjZgYVnHi8Ush NMOGrGbDMWWbPdTRPQFRWFwzwvIW7fwovepRnVavvld3la9cyAM4zMUjC8WcVR07vlw4 CsmChmWylinIl+8RqEjiEcjfQF3iPLWetb+Ikm9PuqSy6G5y/0K7+9WotHlMQzFrOgvI 0qRQ== 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 t4-v6si23505097plb.237.2018.11.13.14.45.44; Tue, 13 Nov 2018 14:46:00 -0800 (PST) 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 S1731378AbeKNIoV (ORCPT + 99 others); Wed, 14 Nov 2018 03:44:21 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:38758 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbeKNIoV (ORCPT ); Wed, 14 Nov 2018 03:44:21 -0500 Received: (from localhost user: 'macro', uid#1010) by eddie.linux-mips.org with ESMTP id S23993030AbeKMWmRWRA0x (ORCPT ); Tue, 13 Nov 2018 23:42:17 +0100 Date: Tue, 13 Nov 2018 22:42:17 +0000 (GMT) From: "Maciej W. Rozycki" To: Ralf Baechle , Paul Burton cc: Christoph Hellwig , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/3] MIPS: SiByte: Handle PCI DMA with 64-bit memory addressing Message-ID: User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This mini patch series enables correct support for DMA in the presence of memory outside the 32-bit address range with the Broadcom SiByte SOCs and the relevant development boards. There is a quirk in the BCM1250, BCM1125 and BCM1125H SOCs in that their onchip 32-bit PCI host bridge does not support DAC, however the HT link (where available) does support 40-bit addressing as per the HT spec. Therefore the first patch sets the bus mask accordingly, and then the second patch enables swiotlb. See individual change descriptions for additional details; there's also a further discussion alongside. This has been verified with a Broadcom SWARM board equipped with 3200MiB of RAM (2176MiB of which the address decoder in the SOC maps above 4GiB), a pair of DEFPA FDDI adapters and an XHCI USB adapter. There were also some other PCI and PCIe devices present in the system, though not actively used beyond being probed at boot, and none has shown any symptoms of breakage. I have come across commit 9d7a224b463e ("dma-direct: always allow dma mask <= physiscal memory size") and realised we do need ZONE_DMA32 for LittleSur. Hence this v3, adding a third (second in the series) change for LittleSur. Also hopefully I'll have sorted out issues with threading in my MUA with this series update. Please apply. Maciej