Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4983892imm; Tue, 18 Sep 2018 02:23:20 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbRFn+ZnK32sG5FlEr4qFhW6kwdqAm/7Ryu2XD7k471XUJzslJQHgirGhucJdWptuBTXgYW X-Received: by 2002:a62:9349:: with SMTP id b70-v6mr30291392pfe.193.1537262600445; Tue, 18 Sep 2018 02:23:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537262600; cv=none; d=google.com; s=arc-20160816; b=FTIwMFG+75cNK4hp7skE0nSd38zdo3SYlQ4DYa/Vz49WUMU4isjdnRgHeImZ+pJn6O CkywSjLBEcN82uSVSCgH0NN3jUVvaDPjF/uUFaqI1DdTRjlSs/7y1i/xvZz+WmFUsp96 niYlTy4ExFE0Q4DVK2EWkKgqQN3Ls8gqX6q0cJBs1FDswpXTHJSFO+RVAXoXhACdP3W8 XUg6CPSmqueuxlro+fV//w2u69nDhbGq2mkGlLk4tWpqJjHIQBlJWj44tRI9uoKZ3d+t dWuaTSiyDLb3jOlsi5M9Dew2zW8f4BNh8sXUwiYWAjaKUI0gKKqqmTwf+zjKYx2ZHAAo hqZw== 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=xILCKLGDFjBBorarrUyjhtvIupooeyobvhfedOgKiyw=; b=OZu+dAZAtNS34/Cunbb0pdMXsP8NIPC61SA/6Jjc+xyG5mdO9wUC/6uJpbNEkPzO06 r0cSxFx5yXvmp14ORq8oVzio8BjqhDEWivacZe4XAwBTWmehhgxliRxPTv+ypH2DfJsq RSJ9Xan8CVgCUidXfn4pcDzrZMRqE1C0GPPDQxjuJgFBZFPlrnRI8OYlEOhSnUbRyey+ Nf8+kTbIBnnE5mDR0+Vs8Xj/lJMXVYBC0Al2J8Gv+R5H+F5qKsFtrQafhLR4UZ+7epfD MlSXh7DxnwVXI/1mATXcgmSp1fr7h0rdqRM0VFS5muevHZhkzpOp27SsWAWAxyU3+z9Z /TSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gXU6r9jq; 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 h65-v6si19055613pfb.70.2018.09.18.02.23.04; Tue, 18 Sep 2018 02:23:20 -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=gXU6r9jq; 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 S1729569AbeIROwh (ORCPT + 99 others); Tue, 18 Sep 2018 10:52:37 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:41651 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727757AbeIROwf (ORCPT ); Tue, 18 Sep 2018 10:52:35 -0400 Received: by mail-pl1-f193.google.com with SMTP id b12-v6so697723plr.8 for ; Tue, 18 Sep 2018 02:20:52 -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=xILCKLGDFjBBorarrUyjhtvIupooeyobvhfedOgKiyw=; b=gXU6r9jq+mgxuOyh9lDBQt3Zhd8facKPvApToJyUk1jV2XTmUmfCg1tOXhZDHuLVoq Fzq5THadxEB8N83djiBm4eFmPxBfTOO306dD2v6oaD9gcd52BKFzp6OM9TXp+rf6fXkx qOk3o4mLznpKTl+Tb0+lJ/izUnvi/1DA6VPgW0E/pAxpJwsTZSXNeLI0hURJSPK8YUDU mdncvVA0/y/g1JmIAY3QedoD+XWbX8+u2m9+UQXNMwYYEUADL2Kil6lldUXBGh92akFX A4THuKXjZqPMWJUQ7sCvUmHFxHd+ryShjK75GuaaTNQbmJ2o9ctrTE0yXKBv8dcI57Nr zsAQ== 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=xILCKLGDFjBBorarrUyjhtvIupooeyobvhfedOgKiyw=; b=ZkuzQ7zKlIhl3f+O9dLj0S6kmOSAG2t1pI3IPGrvB7nvXJf7DGwUsb+0pK/pgzBhBL ovyDryc6p3QSxbLhiwZHDnEsAmftx3b+AsncWBIlw0/ocu3yr3+lYYbM9hjdj8rRHhIL 3bc5X8cJrEKd3y3hzbDXBP1crCQy92V9LotK+1tdW1WGpN4VfW54Yj5pQbUYAjopo/YH Kf5aeK5DcGtpByoKqvuyrnhX6dwln4Pns5cIHUkpVKgFPouMQgYu0al5o+OX5hHXa37G AMFiG3yK0SjGfte9TIpkDbBfHX+YhZj7Q2OC91M2UG7BpfhVsQ3k7+2IkNGR7HW9o1EF OZyQ== X-Gm-Message-State: APzg51DAB3QBnlk8W5azVKYSWmNpNDEf3xEezY1gJApKn8Uw0q+D7xPv SR7zirTkopwlHnv9ZBIdcZg= X-Received: by 2002:a17:902:ac8f:: with SMTP id h15-v6mr28426243plr.161.1537262452083; Tue, 18 Sep 2018 02:20:52 -0700 (PDT) Received: from app09.andestech.com ([118.163.51.199]) by smtp.gmail.com with ESMTPSA id 1-v6sm29932877pfm.145.2018.09.18.02.20.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Sep 2018 02:20:51 -0700 (PDT) From: Zong Li To: palmer@sifive.com, aou@eecs.berkeley.edu Cc: vincentc@andestech.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, zong@andestech.com, Zong Li Subject: [PATCH 2/5] RISC-V: Use swiotlb on RV64 only Date: Tue, 18 Sep 2018 17:19:14 +0800 Message-Id: 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 Only RV64 supports swiotlb. 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..872a280 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_64bit swiotlb_init(1); +#endif #ifdef CONFIG_SMP setup_smp(); -- 2.7.4