Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2061960imm; Tue, 2 Oct 2018 20:13:13 -0700 (PDT) X-Google-Smtp-Source: ACcGV62jA2AtTKXLSDlpomW3roYJbeYkJgunCV3FVPQFqWtsCKztDG+iT+aDqeVEIEL/9DdG7cwg X-Received: by 2002:a17:902:9696:: with SMTP id n22-v6mr19735909plp.212.1538536393592; Tue, 02 Oct 2018 20:13:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538536393; cv=none; d=google.com; s=arc-20160816; b=uNPHT1r8oMpWCAY1OmXDaHrAXR0Ox5HlbvkOp/ztGeljOvWATtR36yl23YeZovA7Hx KdkAyk8nJHhOqa0bgnwvVJvCeZ2cKiwtpZHDwUNX/9xSzbCPRulkO5SBRBXB6ObjEgdP HaLIxq/JZ7xeqwsbV06wBokOJtLqhJcbXYh5IomBO/cEsoroldlBH38LqjhOmD/ri7Y2 5mBZtBZTgwrBJuk5YjKVL+BM4QmaITZsOxI2qjCcJOlcfuSZeIa+jiPcrSc4t/Dn5AL6 nCSaHcHo1P2EhbqCVWn8TCBMWtnuGaxMNi35+iOpI/fkYJYII1RX6ADZPKFNQiIMjcOf 3dqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=h3yrkxkzYRPf3zuwQSSl32LhNKBguaWeQ5y7qsxFEp8=; b=eF27ooAyjkdPwzVow53B59xTXZRlW7nL1bnpGr2Ms5TDG2fIVfG7/nEANZkHLAve06 Msgt6hBk4Wh3j0ALy2LBGc9eR4SU/sa6K9WyPjZTZpNnRiA1ZPnTztxjjRV5CWt6nUvS 12sGMLfa+/UbGkqU/gdPt5ZEo/y+YGrxfJKBz4/NKR0EfpRUskeT5goPz8WCyhzJxpYf iCGQ3oyWwhfaMcpXKpEdvXuMmDTHQzatDfbExrOyQZLXB/bzold9RIaqb7vzsqa5nVjF t3AiM1YkCtnFP3z72t4WYe6IM/5h+Ht4/zkqcfqZrDrtnYd33Juu3NTsamU3ky7zz8kh LngQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QQ89ErE4; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 207-v6si16640218pgf.245.2018.10.02.20.12.58; Tue, 02 Oct 2018 20:13: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=@gmail.com header.s=20161025 header.b=QQ89ErE4; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726725AbeJCJ7J (ORCPT + 99 others); Wed, 3 Oct 2018 05:59:09 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:41330 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726162AbeJCJ7J (ORCPT ); Wed, 3 Oct 2018 05:59:09 -0400 Received: by mail-pl1-f196.google.com with SMTP id q17-v6so2707797plr.8 for ; Tue, 02 Oct 2018 20:12:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=h3yrkxkzYRPf3zuwQSSl32LhNKBguaWeQ5y7qsxFEp8=; b=QQ89ErE4hX1xUN0ZWyZC1rrS5Kk2TQ4a73ZVltUM4BJ8pl++EX2scjJ1rzJ7UZ/X2V YkyFcTva6XZdHsmOabVllxJjdrB0gjOryi0rK5gjqknU1fkyfum3DiTszioyhjC5ezne Pw0bFsFZM+YCBQ41eu7R2zN9ZXsWRjdcmYwWDSvRr1Ctd8XmEn9OuKbJ3AAyz+sf8NjV 5/1HPXl9RlFRG1QFmTZONdjUUBq3X4t/tGp/Y7QxWVEhyEgLVFsZGhSnoJmWmjQ7uZ9T QQ/zklQ2jUGbGI7CqMaTy1hwlDfBzkpFSYakrY5YuipDwwrICz135aMst2DlWQLU2l3R rxgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=h3yrkxkzYRPf3zuwQSSl32LhNKBguaWeQ5y7qsxFEp8=; b=jj68vrRVaOwfYcSZp1Hek4O2Y3seDHCxP8Bzf2szcF1hg9Dc4UNZWVVCH0Cu7+7qGR fsfoobaABkVbPfIK7SoYEYZekQglwGuB1BHzPAlwdgja8CQDNMekpTX+hpPemnxt4HlP xYC1mSZfjsszUF6ZhBBaeDl3lj6BNtlJREsnTNe/NYib7MnSWSLWwpFS4psmPOkgbEq5 38YtDTQH4Xdz2GVGFur5QnuTWbA0o31aEFx+wh/JJ2xPtzg/YacFbvXBX+tjgksy3Hdt iPHyHcn2S2RHUaFFXKRslL1sQacKRrFdfolW/vg+q7XsLvtpf1WPZEEKS+7Rs/A9m/0a nyBA== X-Gm-Message-State: ABuFfoipfjOjK/J49sJ4wo9nTUnhJ7YsZnqvmBWHqrBO/9iqj9sOfh4+ OQZETQXQ6Xbwqkl24nz/U74= X-Received: by 2002:a17:902:be14:: with SMTP id r20-v6mr17912375pls.293.1538536363194; Tue, 02 Oct 2018 20:12:43 -0700 (PDT) Received: from app09.andestech.com (59-120-53-16.HINET-IP.hinet.net. [59.120.53.16]) by smtp.gmail.com with ESMTPSA id v23-v6sm21777747pfm.80.2018.10.02.20.12.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Oct 2018 20:12:42 -0700 (PDT) From: Zong Li To: palmer@sifive.com, aou@eecs.berkeley.edu Cc: hch@infradead.org, zong@andestech.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Zong Li Subject: [PATCH v4 2/5] RISC-V: Add preprocessor directive for swiotlb Date: Wed, 3 Oct 2018 11:09:59 +0800 Message-Id: <0aaabb05426a360f71cbc7a910e2c613d3a3891c.1538535528.git.zongbox@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On RV32, it doesn't select the SWIOTLB, only RV64 support swiotlb now. Signed-off-by: Zong Li --- arch/riscv/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c index aee6031..6de6584 100644 --- a/arch/riscv/kernel/setup.c +++ b/arch/riscv/kernel/setup.c @@ -227,7 +227,10 @@ void __init setup_arch(char **cmdline_p) setup_bootmem(); paging_init(); unflatten_device_tree(); + +#ifdef CONFIG_SWIOTLB swiotlb_init(1); +#endif #ifdef CONFIG_SMP setup_smp(); -- 2.7.4