Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp627934imu; Mon, 5 Nov 2018 06:28:50 -0800 (PST) X-Google-Smtp-Source: AJdET5cPEleDoVKeP5oVRdSB/SSJwYNy5aoBqZYh7X0qhAtFjSkw8QFBg5ejw2Em6tNhmeIxPFzl X-Received: by 2002:a63:ea43:: with SMTP id l3-v6mr20444071pgk.427.1541428130828; Mon, 05 Nov 2018 06:28:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541428130; cv=none; d=google.com; s=arc-20160816; b=iBbYW5YXOFV7kjgVW3k0/GilAzlH2Ly+cUsg4oe1g0UKXhMR0dZbuVosebt+zOfKXc C5N/p5a1GoADHCYqVhLjVsmzZi4TfUmjTYqwOSJfSm90HK3/vafc6RQl0eePFHTrNXR2 uzkWyLvzif0kV4t8LoseENkxC6ilQqsoGkDTPxCYu9jbnE1rzl4zUX9JXUAkHxHlJd4D mU/rOBWmN4ODcKd2wnNP6awiki/RacCmO+LQIGSl0TG6U9sHK/DfY8owSKBQO/mlkoLn UbZsTU0x4IE/zvAegiDk9FmVbthZXUaT5KVGaSuy4rmJwyymlqPsasQFNyXoeyZDdSt+ 4uxw== 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:date:subject:cc:to:from:dkim-signature; bh=hBz67z/mJka6vEpb5Y3a3+XUqviDBoG9e/F7g9R54D8=; b=Kdexj4JL90FjGIzizGgJ8I6KCnGzLBd/AOMPRNmRQBAUYu9Rv1PW4USCEKKMzIp06G rMK08fkdsG1tqSEwtr1Lx7+hQHA+sCyq2V5uSIxpw8k75BPWmDUOsY1Ocdq/cQ8o4H7Q uSXHFqxF0Gh/7fBXAPa4wQmCeYAw1Xcb7E9pAgH+0maRwrwmCHuE7pZGNLocbxVnZSU5 WIjE0wIsyCt4j1H2APSFJOks2frAAYD8qBH0lJeN2/4giJ12qbPMGrqqNS8HeGMh45Er X4z9WEp0eaNLeHb3qQ8/nI192dUjC96VQ6YkMIjyzk0KPGWqPuds4D6VCQ+TIXrNsMyY 96TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YmcXL41y; 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 x8-v6si43832302pge.545.2018.11.05.06.28.34; Mon, 05 Nov 2018 06:28:50 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YmcXL41y; 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 S1730024AbeKEXqU (ORCPT + 99 others); Mon, 5 Nov 2018 18:46:20 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:35882 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726173AbeKEXqU (ORCPT ); Mon, 5 Nov 2018 18:46:20 -0500 Received: by mail-wm1-f67.google.com with SMTP id a8-v6so8240337wmf.1 for ; Mon, 05 Nov 2018 06:26:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hBz67z/mJka6vEpb5Y3a3+XUqviDBoG9e/F7g9R54D8=; b=YmcXL41yZOhgqeGgQlbxWfSZjBCKqUK9pJsIOR+O+4orMpQrZjUD/zO/eTNOVHRw3J H0mD1T1/Kj1xkoCVvI4OuiemC7S5VPanxevRNvGWgarV4ipcCSM/PvH0y5cQa/drxEdP 9FyIEIYRWLoQrGf2FCSbxmCUKnpm3EuBJFs8mHWWbZVaCSxilmNUX9pSwYcP8kIf4pdl D2ENrsIjVuY5zLUTnYpAoZVUDISpvTn0DFHIQxaT6FlzcOb41QMqJwyCQLN5JVE5JyfB +mX+oZlaNJnod/odg9WlXMipw48ZPsqqGHxEnx4Imyk+CkdRWkBbZxtpWPtB0jUqigbq ha5A== 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:mime-version :content-transfer-encoding; bh=hBz67z/mJka6vEpb5Y3a3+XUqviDBoG9e/F7g9R54D8=; b=dZCrt6Q09SBgO+NtfX7txoCFkivS81n52v4nH0kmG6ViHTrWnvVB2AlmiOrDRy4R2E OOygYbvrjkAMPjpZA9R71+My7UJlLMaDYID26yHXYfwb7hnSQK4GXk+y4/QRBQjRhrws WqEG6Akr78eOxoIxj3NuLC3rR8/hjmcgQFHBlOpcgDGNq/Rw52/UpC0pBY+slg31LaHO TEhOU5hSfDOAQI+w2w7NRtyNXtMSAWw7jugIgZJX58k1mQtXZKBsqHkFONVNqObfSfqC jU/Fajaoo73EmZradj7NxMw8Gj+PUGSUxuElzmpGbal5l4nNta4hNQELztET39xj/RsN zFEg== X-Gm-Message-State: AGRZ1gKFsMCN2EGNxe2T9K0s+kOKZzQ11coRgr/WXgaw8kCONgIQnOVA KsjlDbhx0lHPlh5DKLllPcg= X-Received: by 2002:a1c:2d57:: with SMTP id t84-v6mr2591331wmt.9.1541427980445; Mon, 05 Nov 2018 06:26:20 -0800 (PST) Received: from localhost.localdomain (ip-76.net-89-3-178.rev.numericable.fr. [89.3.178.76]) by smtp.gmail.com with ESMTPSA id b8-v6sm30105205wme.1.2018.11.05.06.26.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Nov 2018 06:26:19 -0800 (PST) From: David Abdurachmanov To: palmer@sifive.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: David Abdurachmanov , Arnd Bergmann , Marcin Juszkiewicz , Guenter Roeck Subject: [PATCH] riscv: add asm/unistd.h UAPI header Date: Mon, 5 Nov 2018 15:26:02 +0100 Message-Id: <20181105142602.25750-1-david.abdurachmanov@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Marcin Juszkiewicz reported issues while generating syscall table for riscv using 4.20-rc1. The patch refactors our unistd.h files to match some other architectures. - Add asm/unistd.h UAPI header, which has __ARCH_WANT_NEW_STAT - Remove asm/syscalls.h UAPI header and merge to asm/unistd.h - Adjust kernel asm/unistd.h So now asm/unistd.h UAPI header should show all syscalls for riscv. Before this, Makefile simply put `#include ` into generated asm/unistd.h UAPI header thus user didn't see: - __NR_riscv_flush_icache - __NR_newfstatat - __NR_fstat which are supported by riscv kernel. Signed-off-by: David Abdurachmanov Cc: Arnd Bergmann Cc: Marcin Juszkiewicz Cc: Guenter Roeck Fixes: 67314ec7b025 --- arch/riscv/include/asm/unistd.h | 5 ++-- .../include/uapi/asm/{syscalls.h => unistd.h} | 24 +++++++++++++------ 2 files changed, 19 insertions(+), 10 deletions(-) rename arch/riscv/include/uapi/asm/{syscalls.h => unistd.h} (54%) diff --git a/arch/riscv/include/asm/unistd.h b/arch/riscv/include/asm/unistd.h index eff7aa9aa163..fef96f117b4d 100644 --- a/arch/riscv/include/asm/unistd.h +++ b/arch/riscv/include/asm/unistd.h @@ -13,10 +13,9 @@ /* * There is explicitly no include guard here because this file is expected to - * be included multiple times. See uapi/asm/syscalls.h for more info. + * be included multiple times. */ -#define __ARCH_WANT_NEW_STAT #define __ARCH_WANT_SYS_CLONE + #include -#include diff --git a/arch/riscv/include/uapi/asm/syscalls.h b/arch/riscv/include/uapi/asm/unistd.h similarity index 54% rename from arch/riscv/include/uapi/asm/syscalls.h rename to arch/riscv/include/uapi/asm/unistd.h index 206dc4b0f6ea..5545f498071d 100644 --- a/arch/riscv/include/uapi/asm/syscalls.h +++ b/arch/riscv/include/uapi/asm/unistd.h @@ -1,13 +1,23 @@ -/* SPDX-License-Identifier: GPL-2.0 */ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* - * Copyright (C) 2017-2018 SiFive + * Copyright (C) 2018 David Abdurachmanov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ -/* - * There is explicitly no include guard here because this file is expected to - * be included multiple times in order to define the syscall macros via - * __SYSCALL. - */ +#define __ARCH_WANT_NEW_STAT + +#include /* * Allows the instruction cache to be flushed from userspace. Despite RISC-V -- 2.19.1