Received: by 10.223.164.202 with SMTP id h10csp4169241wrb; Mon, 20 Nov 2017 11:00:20 -0800 (PST) X-Google-Smtp-Source: AGs4zMYeMYa3GvCvkoxDFapMk91saXMzkzC/5mMQyM43MX8RtH5binnfw4nZ4HHiKqq0t09MoJe5 X-Received: by 10.84.193.36 with SMTP id e33mr3098683pld.313.1511204420662; Mon, 20 Nov 2017 11:00:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511204420; cv=none; d=google.com; s=arc-20160816; b=NjNmMjjo3UZQXxdjvu0VqPEXFJrap7VdaO84NMx+bvShk1WtJyi1AfoGZCSnPdh1XJ IP3lQyHsUVOP2rCGavWjXTprtF92bLFjA7T1sKmiGb+zqK9JSroBq16Qsgc5NrGOvU3b Bjl0XwaW26O4uQJwqFE1dUG0Qsa7rXmEIb45UErPI0dnxn7tzgXj3NvwTOULGmxdwCfM M7DJ12/QkvdPUfF+Btj/GrTdi6ZAfLdgSBvT8JEBhr171CXOPp5xvLeTTHpuMIkPPElL HiHb4C7o0/N37YOKZ4EqH5H2vId4jZAn54xYYNRzWYKezjbDtwti8bgBXTj+EmHoGcMN w3oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:from:cc:message-id:date:subject :arc-authentication-results; bh=gjT9rB5sdp28pnY+SJVanzlSd4NyW7hzCuFUjZD8KSI=; b=1LKNM63EX9Y0pk6hFnND5RRUgX4ZkSEd9smNzdbju/g3Roj6URD2mu2plKn+mH92t3 lSPRCh/W9sOj8ZIpApSZDJQLO0Z/GkQYm9whHcTYtrD466CAPWsT2Hp9KxxHqIaOiykM G6Qtvh9hMJmHFm5jOwmGhC0C5GA5Be2FHjQZU9CjGkcirXNUIKp1oh6sopyvts1l9Vuo 8jFYoRRLYLgDAaK7WsV3+LB9j8tVjMo3wP1oOHFSXpPWOVjq1kg/TkIlhA/2IMLYkSmv mcAdN/LQqoQ2f5AwTc6c+UgMUFDj+T9QHw4pklqCf23AFKjTGI68dx5cDMX8X0A7sFUU pjFQ== ARC-Authentication-Results: i=1; mx.google.com; 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 c22si5112804plo.509.2017.11.20.11.00.10; Mon, 20 Nov 2017 11:00:20 -0800 (PST) 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; 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 S1752159AbdKTS56 (ORCPT + 67 others); Mon, 20 Nov 2017 13:57:58 -0500 Received: from mail-pg0-f51.google.com ([74.125.83.51]:41880 "EHLO mail-pg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751637AbdKTS55 (ORCPT ); Mon, 20 Nov 2017 13:57:57 -0500 Received: by mail-pg0-f51.google.com with SMTP id p9so8087951pgc.8 for ; Mon, 20 Nov 2017 10:57:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:cc:from:to; bh=gjT9rB5sdp28pnY+SJVanzlSd4NyW7hzCuFUjZD8KSI=; b=Hth+Qov6COSaOE/8qJAhNBC4iHFpM4nbkDoNIuM2DsBgee0jaD3XGIq+yYt709sUtV 0fwrhKXrZz9ndMWx7EQY75R32uQv2+V/MuRBVzKfwfq8lDZJ1M5mbrrnLUbSM1B/8g/H NU26wwU8J3knHpWIw7aRoDr9cwbpUqt0fzDXbxPEeWGIgWtqbJ8ZPmyid0X7yFrYjnHA wORzXezocNudSt66mMuX6XginQff1Ey4gSfeEDsjuVGR0Lzlm9EdKDgGWegNd8k2VRX6 74FQJYkD680GeIlJgwCWoF9r0hyR0qCDpybgF/ZQn3CVLhvaJ9xVbTSaj2CGB+ozaIYQ VGhA== X-Gm-Message-State: AJaThX5cGH58elp0S3o/PebyuDQsfEt4dHUKjwWFAulPGEgBxOO09ZMN xPt/31Y6/LgyR7JbBFp5OIxpwgvXSJM= X-Received: by 10.84.179.3 with SMTP id a3mr14863487plc.25.1511204276961; Mon, 20 Nov 2017 10:57:56 -0800 (PST) Received: from localhost ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id p21sm28297145pfk.185.2017.11.20.10.57.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Nov 2017 10:57:56 -0800 (PST) Subject: RISC-V: User-Visible ABI Cleanup Date: Mon, 20 Nov 2017 10:57:41 -0800 Message-Id: <20171120185745.30795-1-palmer@sifive.com> X-Mailer: git-send-email 2.13.6 Cc: patches@groups.riscv.org From: Palmer Dabbelt To: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch set contains all the user-visible ABI changes that we currently know about. There might be a few more as we get through the glibc upstreaming process, though. Most of the changes are pretty minor: * Some VDSO symbols that weren't defined were versioned, which doesn't make any sense. * We were missing some common VDSO entries. * The instruction cache is flushed when making a dirty page executable. * A system call (and VDSO entry) has been added to flush the instruction cache. There's one big, implicit ABI change here: 'fence.i' is no longer meaningful to execute from Linux userspace, instead users are expected to call the new VDSO entry. There's a lot more info in the commit, but the short version is: * 'fence.i' performs an instruction cache flush on the local hart. * There's no way for userspace to map threads to harts, so there's no way to perform global instrucion cache flushes. * The supervisor can't trap 'fence.i', so the only other way to maintain correct behavior would be to flush the instruction cache before returning to userspace. We don't want to take the performance hit of flushing the instruction cache every time we return to userspace, so we're breaking the ABI to mandate that users call the VDSO entry instead of using 'fence.i'. Since we haven't had a tarball release of Linux yet, I think this ABI break is still kosher. Of course, we won't do this once there's been a release :). Sorry this was a bit late, but I'm really hoping to get this into 4.15 so we don't end up with a broken ABI in our first kernel release. [PATCH 1/4] RISC-V: Remove __vdso_cmpxchg{32,64} symbol versions [PATCH 2/4] RISC-V: Add VDSO entries for [PATCH 3/4] RISC-V: Flush I$ when making a dirty page executable [PATCH 4/4] RISC-V: Allow userspace to flush the instruction cache From 1584466812562577885@xxx Sun Nov 19 04:21:44 +0000 2017 X-GM-THRID: 1582451757077353071 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread