Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3646280pxv; Mon, 19 Jul 2021 05:33:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+mDMRcQQgUiavu+DFJlrsDqcoQ+NXfi2jliMNwHVNc4uGRbCXdKVRMQBdMmc91f2/kg9G X-Received: by 2002:a6b:7b44:: with SMTP id m4mr18615446iop.72.1626697987042; Mon, 19 Jul 2021 05:33:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626697987; cv=none; d=google.com; s=arc-20160816; b=HW2mkDowecn+fSvAszrXKnCTod0I5FZzx+Pzt0NXOOd6K/TYWSO5ze/qtEaBm8vESD ijBLa3N0CaQqjr8074uN/lE4ksoS9iFSZdAQo2Ql8xI8mWAqJadI7Li8RGDd5EOhbZzf yj15m2zNYuSRS2cVimvF2s7+ZynZIu4eOljtDomemUTj8Dra9yY1nldsyMDuZfcPFmfp L5zrg1H9utRF2OtVqSdpIXagXTKVZF0Z/6RPcpLsz68QV4gfAbwLlcffrrzSNA51QcJU jpSGld3aKAZz/dGxyZklcj/obF7JP+egq4sn9qm9JTH/wAxXfcQbPihFnTYp1c13aaFq Stnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QrUH58sQcuxGVxExN76ot/pf5VAtWneWsgWYrSaL7Qc=; b=rGWC6giKaFg94fuI4pS1Fim8JhYODJ3GsiIBUvlEaqbrzcWIWYRAc22cgNL6CofZtf gX5Anys07fgG31VHqN5F7CE1QsTP7ijBKMpgiu0edxjVtFgsWwxGVdjsnvKwst74FcrY pE3avHUhXBvaBG8bvUCAK6m92bjdP3JXI5mo9Oi48JVSlKy0T0MRjXUd2/PdwS9tHeN4 UAJEXe5/fNOp4S5Rb00dYwYO3xCxBTa7FDdhjK/rqJLuMopdsnhTIvCaL9OA4Ecf1LMp m+jHoZrT6OrPBQJGtEH0Ofq42bI57ZuHjByfUwdDzvWow2dzxvMjOGu3Jm/qfoz2vzQP 4HPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C0bcDBI1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g4si5729675ile.131.2021.07.19.05.32.55; Mon, 19 Jul 2021 05:33:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C0bcDBI1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236855AbhGSLvN (ORCPT + 99 others); Mon, 19 Jul 2021 07:51:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:60046 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236571AbhGSLvI (ORCPT ); Mon, 19 Jul 2021 07:51:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 70DE461164; Mon, 19 Jul 2021 12:31:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626697908; bh=yTpl5rcN0Uj3hX5cptg4+vqh8gdxrnseOI6Ag6FWF+0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C0bcDBI1qxITK4XurWDSE3hixNdXYW4Y674XU7jgE6jTdfKgFLnmjVPUiHwH+JFT+ S6VmN4bFoV+u5cy0aVAH79MVYIjj4G1Q8lSr5DRaRv1VY50SLC+lKrdGVvv6Xy9Zhu rtQNPVWc2vyRIEpW1bzHUsLnI9aWmzxGHmbuhdF0jq6Hns8nJ7tOaTDWr+dhJubx1/ SJMuq+A+upzMvSfTUOskKEfFxv8xH1l2dtEG3nZn7JPjDS5/52jkticX48C8wZXF1f WHNbot0IL3dTuepRoM7KXlUU6lM40DrDZYbHqeoWcrUPcvK0X4QFyFqk+Di+L1oiNo sY2L1wiUGVblg== From: Will Deacon To: iommu@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org, Will Deacon , Guenter Roeck , Claire Chang , Christoph Hellwig , Robin Murphy , Konrad Rzeszutek Wilk , Nathan Chancellor Subject: [PATCH 1/5] of: Return success from of_dma_set_restricted_buffer() when !OF_ADDRESS Date: Mon, 19 Jul 2021 13:30:50 +0100 Message-Id: <20210719123054.6844-2-will@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210719123054.6844-1-will@kernel.org> References: <20210719123054.6844-1-will@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_OF_ADDRESS=n, of_dma_set_restricted_buffer() returns -ENODEV and breaks the boot for sparc[64] machines. Return 0 instead, since the function is essentially a glorified NOP in this configuration. Cc: Claire Chang Cc: Konrad Rzeszutek Wilk Reported-by: Guenter Roeck Suggested-by: Robin Murphy Tested-by: Guenter Roeck Link: https://lore.kernel.org/r/20210702030807.GA2685166@roeck-us.net Fixes: fec9b625095f ("of: Add plumbing for restricted DMA pool") Signed-off-by: Will Deacon --- drivers/of/of_private.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h index 376462798f7e..f557bd22b0cf 100644 --- a/drivers/of/of_private.h +++ b/drivers/of/of_private.h @@ -173,7 +173,8 @@ static inline int of_dma_get_range(struct device_node *np, static inline int of_dma_set_restricted_buffer(struct device *dev, struct device_node *np) { - return -ENODEV; + /* Do nothing, successfully. */ + return 0; } #endif -- 2.32.0.402.g57bb445576-goog