Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp317706imm; Fri, 10 Aug 2018 11:49:03 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxqbDPGb5HsMyCJ7lSBaLKDOVLSzupp2UA1nhDbpuPzA7KYhutkPYua5rxAOVXBeiSSV33s X-Received: by 2002:a63:bf08:: with SMTP id v8-v6mr7386120pgf.3.1533926943783; Fri, 10 Aug 2018 11:49:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533926943; cv=none; d=google.com; s=arc-20160816; b=II9XVB4/x6Efj8ymlLZjJQZF9rgYb1YesdkfyarWwDfn2Bu0eeq3TC7vE/BNexTX/A +E2E8Dj/9QjPXiPEku1p3DTx98cl4zOCOCRkWM+pZZtuo6fFofjknnnvzzxWtOrJejaD ebv7CG6hMylTWRv62shUsKhDSX7jdvaX2PHHtA25Z2ktc58kqGcVAH4PxrhvM5IvHd7D f+E305WULhGLXY7DPiiOo8JYvUcG6/+wmgCTP2nabaqG5LyL2zquLb0p6C6VXs71TF3U LYrM4qhhLSdHR6j5tTir9UpK4Qb0I4e3uFqJxgDRN75jWLv6+d5DktKiN3XKMedJDu3O LpNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=3s1g1E8pEwR1f3AmZMpJiaiKBZlNWTUsvbDB+ejsKoQ=; b=yCxybhBZhwdv5UwLePsm/CwW+nPgKa4KCt+kIpm5UWkosHzT1jSbdreqgn4hZAZ0Bk X6ZrzSNm/pyo+ffoDDLfbb7BoSL2PyVFIWqaCcqNezcSxEiwwutmhRewwYBl7M2rs8dr JaCuyeGJMlA8Tyv2ws1tWI1bvx+U4/mFSk5qnP9gdbvWshTsOwKNY8p1JStAA8BD8+SZ dWnPFOl30u2lXIisloyj67VtB8SbyZQXpF5VtuyIYplDa7oJJdNmRr1TpnuXRdfvSVVg U3PiTm2QpiiRIn7vNwHDLc8Aa57oL2cDcpkjksPmUZQC4xJPO6bx58pfuIGB2dbhNdAD WP8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="ccgAz+/u"; 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 1-v6si11450984pgj.128.2018.08.10.11.48.49; Fri, 10 Aug 2018 11:49:03 -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=fail header.i=@gmail.com header.s=20161025 header.b="ccgAz+/u"; 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 S1727104AbeHJVSW (ORCPT + 99 others); Fri, 10 Aug 2018 17:18:22 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:37178 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726420AbeHJVSW (ORCPT ); Fri, 10 Aug 2018 17:18:22 -0400 Received: by mail-pg1-f195.google.com with SMTP id n7-v6so4796508pgq.4 for ; Fri, 10 Aug 2018 11:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3s1g1E8pEwR1f3AmZMpJiaiKBZlNWTUsvbDB+ejsKoQ=; b=ccgAz+/u0DgMN1d0+dwvYOVo3/+ITbvAWTYoqPoyv/SE7CnbMdxfkTtTwo3vBAVS+t la6zUzGsEyHfhpU4S7ola1M0MLSXK2jcuN56sioLIgrqHy090JO9oV0zmcQagzFYEMQR krosiItYYQN9XzErrrvJKoxtZDzZhYfKKCp7StW+jf4hOUAt5gtylgrR1Ep0HpZeFWcr G80HmCMpwZUPBugyNxkwvqIPIzMEUXJk23kfX9rplnd2EbkmyxZJ/ETJIKk09HJZK6D0 Nfm/vleK9KGvb5FPhMZVrgxRztzmyfzK24Y9jGrhg7eL2e2ywwi+7NSlFvydaamgtKSn htzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=3s1g1E8pEwR1f3AmZMpJiaiKBZlNWTUsvbDB+ejsKoQ=; b=fWAc5gIWz+dgMgJoY2P0WOCfVAzKCQphSnBcRET31001iWRmqjHaX7FsOXQphwKe3L Uim4c82oMHxAx2/yf/p7aIQJx8fqdsoGn60yjC38k7Xl0dC1bnoAjeBv/rlHWq12NTYw OSfkQaD9IP1AxwMuTYlGcI3UkFjfCuDzDqOQ3QgE2Ud35HzwccXK2x1fpzq5OZtO1o/r JO7FPstv3045lLG5mCPkHGUnzwAlRIwx49uDbtUHlOKsxZn9qzHhy0Zt4Adwj+aSmP9R 8sZMJXP5FcvQVfLH/dEVIlhilprFhzbkRQu7VkHXY53aECrgkxIGNTFOxdTQoOrJuQ25 4eHw== X-Gm-Message-State: AOUpUlHgW+T/Omwh28rxTbPcBbMprEPPAUifiYCWgqJ0FqcctVJM7iTP g+JwpwvbjjuYQmAyCqtK7kA= X-Received: by 2002:a62:d085:: with SMTP id p127-v6mr8228960pfg.119.1533926838346; Fri, 10 Aug 2018 11:47:18 -0700 (PDT) Received: from localhost (108-223-40-66.lightspeed.sntcca.sbcglobal.net. [108.223.40.66]) by smtp.gmail.com with ESMTPSA id o10-v6sm19197262pfk.76.2018.08.10.11.47.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Aug 2018 11:47:17 -0700 (PDT) Date: Fri, 10 Aug 2018 11:47:15 -0700 From: Guenter Roeck To: Palmer Dabbelt Cc: Christoph Hellwig , aou@eecs.berkeley.edu, Andrew Waterman , Arnd Bergmann , linux-kernel@vger.kernel.org, linux@dominikbrodowski.net, dan.carpenter@oracle.com, tklauser@distanz.ch, linux-riscv@lists.infradead.org Subject: Re: [PATCH v3 1/2] RISC-V: Define sys_riscv_flush_icache when SMP=n Message-ID: <20180810184715.GA11259@roeck-us.net> References: <20180810083804.GA20415@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 10, 2018 at 11:27:37AM -0700, Palmer Dabbelt wrote: > On Fri, 10 Aug 2018 01:38:04 PDT (-0700), Christoph Hellwig wrote: > >On Thu, Aug 09, 2018 at 03:19:51PM -0700, Palmer Dabbelt wrote: > >>This would be necessary to make non-SMP builds work, but there is > >>another error in the implementation of our syscall linkage that actually > >>just causes sys_riscv_flush_icache to never build. I've build tested > >>this on allnoconfig and allnoconfig+SMP=y, as well as defconfig like > >>normal. > > > >Would't it make sense to use COND_SYSCALL to stub out the syscall > >for !SMP builds? > > I'm not sure. We can implement the syscall fine in !SMP, it's just that the > vDSO is expected to always eat these calls because in non-SMP mode you can > do a global fence.i by just doing a local fence.i (there's only one hart). > > The original rationale behind not having the syscall in non-SMP mode was to > limit the user ABI, but on looking again that seems like it's just a bit of > extra complexity that doesn't help anything. It's already been demonstrated Doesn't this mean that some userspace code will only run if the kernel was compiled for SMP ? I always thought that was unacceptable. Guenter > that nothing is checking the error because it's been silently slipping past > userspace for six months, so the extra complexity seems like it'll just > cause someone else to have to chase the bug in the future. > > But I'm really OK either way. Is there a precedent for what to do here?