Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2677918imm; Thu, 9 Aug 2018 18:13:20 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyEDVlCughP5lG0Qgi4kCJZFVIQ5SvL3il/23ddI9LZgvTcBp3X+tRIhz6I3QgyPoNXfUqz X-Received: by 2002:a65:5bc4:: with SMTP id o4-v6mr4181635pgr.448.1533863600217; Thu, 09 Aug 2018 18:13:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533863600; cv=none; d=google.com; s=arc-20160816; b=txO8Ibppj/lhLbsztCTOKYy9znFdw6RO1vpAgaL9YLP4FN/ywrSp6EHI66Uq9BQEsD xOdoEzQwPn6g0EKY7lrsVfw7HqH8yTYB1cJjVgTkmCievR/UZdWMaOiwcwNtUgPP+hjX lM/pSZ8pYpXaHjoBToMYwolnrLTiWFJYXdcj05AnIibJhN1gdWKV6YQPuuBxbLd+Mxr0 5C9clfDGG/vDw3V5Ghu+D+JRYub7sIeCUih8JVr1yzO/OGUwJ+E+IebztD0KxkW53q1U vvQN84LvT1Do9/ebTWeno+M1Gf03Zc1/AmPllqCpUvqmV+cE+GbLpvwkQdKyG3t/iilI QZ+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature :arc-authentication-results; bh=xoITewC9Si0Y4zzcf5zfXnr9f3dVkVrC26zOh0ZnN7k=; b=pvh5Mvvx7kppFU7dcE96tJ3yypPSCMeeAKoNB9HhpOFxd+kkEy4IKDPQLW+kRTiRVC 5uUiMr2E/lJFb9YALc2jKX5+vSvO1ihC7rfbe/fhVqQm0OS4dV/kU2QkKocCrf2MveGW 4BYRTJJXz/uEfY1Xty7o1nASfSj8fgE3PB7vvb3v6d5Z2ySDRCFHqYp++wz2QfItrMdd ouKtos+qa+D/qOo7J80A8US228Ve8SJKiDq6ya0y/wpIXNBoIP4fG0jPE/UJhT8ZiiOW OVwLXwq8TjJLv6CFsjxs4eomkpI9CeatF+agEY+xgVWzbz1nzqOsDAddxKBuJGUBJlLm tOkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=hWXqPmox; 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 v63-v6si7793600pgd.658.2018.08.09.18.13.02; Thu, 09 Aug 2018 18:13: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=@sifive.com header.s=google header.b=hWXqPmox; 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 S1727123AbeHJDbX (ORCPT + 99 others); Thu, 9 Aug 2018 23:31:23 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:37450 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726894AbeHJDbX (ORCPT ); Thu, 9 Aug 2018 23:31:23 -0400 Received: by mail-pl0-f66.google.com with SMTP id d5-v6so3295413pll.4 for ; Thu, 09 Aug 2018 18:03:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=xoITewC9Si0Y4zzcf5zfXnr9f3dVkVrC26zOh0ZnN7k=; b=hWXqPmoxUr2aYxoGJt2c7+WL3egk7McNitr6SfRUstGlcA2H8ie2rZRBBnPUiFhvEI GQRSp38gw5lqY1EisYqWI/WM6ANFbdVbS8SDJp+hW4RzUCJcson1VuvkDZU6+ez2jwS4 BKzATwGta+3a5/zu8Ftsk+WKvprIth9D9p/ird1LK6uXna8rguY5TATlSsd3Kp/KL9vj sTURlgcv08xZwriBeafUqwYYQj8WR1ffdGnZAVr8NQgSprh38FSN+6q8TCuF6chf08D9 HlvNHeRNbcGjy3EwZezFjfc/l/n3Z1EX+WhvHEOTh8Wp9OSdomAJLyuT3RdzQNST/bFC 00Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=xoITewC9Si0Y4zzcf5zfXnr9f3dVkVrC26zOh0ZnN7k=; b=a8dJXvhQXBHhLjePo2SHZZeO0lSE5dfRiAvIdTAup683xZbghc1x2HhY15Veg6Mm+j 5ltqNu9TZHU1C75ZXk10p56zz51uPpITINXWak5AjyRQKUOXcukcJ6wmt+HvE+WTVp8y fuaGcs42102Otvvv1F5sk5T4QeN5/qt4gK3LJk+SISg0Nz9jfjHmjFLfPmZIoRQ5lSH/ 3Jkz7QZs4MT0oUVkQi8xjXUFIBcGkJBkJcC9qWkWeyVQVJb2ECyLuOHpwCmSyDfrfTP2 fC+RqcebnAmWhfVu16lBqMyR+D9Hv3zPYCI4iXpvYMXsq1nT7/uViCE2tGqYFO+TqRd8 4RLA== X-Gm-Message-State: AOUpUlH1ce8wiZQNKPV12WcOD8G0lxHHHcOkD2qYgiBj7xY5mgNuN4by uGK8TsdFwRjwikmtg+7bLPzPIw== X-Received: by 2002:a17:902:7587:: with SMTP id j7-v6mr4008123pll.256.1533863036058; Thu, 09 Aug 2018 18:03:56 -0700 (PDT) Received: from localhost ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id l3-v6sm9974822pff.8.2018.08.09.18.03.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Aug 2018 18:03:54 -0700 (PDT) Date: Thu, 09 Aug 2018 18:03:54 -0700 (PDT) X-Google-Original-Date: Thu, 09 Aug 2018 17:33:55 PDT (-0700) Subject: Re: [PATCH v2 2/2] RISC-V: Don't use a global include guard for uapi/asm/syscalls.h In-Reply-To: <20180809212422.GB13675@roeck-us.net> CC: Christoph Hellwig , aou@eecs.berkeley.edu, Arnd Bergmann , tklauser@distanz.ch, Andrew Waterman , dan.carpenter@oracle.com, linux@dominikbrodowski.net, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, marcus@mc.pp.se From: Palmer Dabbelt To: linux@roeck-us.net Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 09 Aug 2018 14:24:22 PDT (-0700), linux@roeck-us.net wrote: > On Thu, Aug 09, 2018 at 01:25:24PM -0700, Palmer Dabbelt wrote: >> This file is expected to be included multiple times in the same file in >> order to allow the __SYSCALL macro to generate system call tables. With >> a global include guard we end up missing __NR_riscv_flush_icache in the >> syscall table, which results in icache flushes that escape the vDSO call >> to not actually do anything. >> >> The fix is to move to per-#define include guards, which allows the >> system call tables to actually be populated. Thanks to Macrus Comstedt >> for finding and fixing the bug! >> >> I also went ahead and fixed the SPDX header to use a //-style comment, >> which I've been told is the canonical way to do it. >> >> Cc: Marcus Comstedt >> Signed-off-by: Palmer Dabbelt > > [Compile-]Tested-by: Guenter Roeck > > on top of linux-next after reverting the version of the patch there. > > I also tried to run the resulting image (defconfig) with qemu (built > from https://github.com/riscv/riscv-qemu.git), but that still doesn't > work. I assume there are still some patches missing ? Do you have the PLIC patches? They'll be necessary to make this all work, and there's a v4 out now that when combined with for-next should get you to userspace. https://lore.kernel.org/lkml/20180809075602.989-1-hch@lst.de/T/#u Also, what is your methodology? I follow https://wiki.qemu.org/Documentation/Platforms/RISCV and could could natively compile and run hello world with an earlier version of Christoph's patch set, which is really only cosmetically different than the v4. I use qemu's master branch as well, which when I tried was exactly 3.0.0-rc3.