Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2420686imj; Mon, 18 Feb 2019 05:48:33 -0800 (PST) X-Google-Smtp-Source: AHgI3IYncvfLXBqrHIM9yujnxAYSs68BiaxoKpZ1pUioQZLISc6zO2ySjwkitDBYlN4kN4WQvPoo X-Received: by 2002:a65:6151:: with SMTP id o17mr19005380pgv.285.1550497712938; Mon, 18 Feb 2019 05:48:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550497712; cv=none; d=google.com; s=arc-20160816; b=TPdMuwJbEvM99YoDK9RNGVWdvAcbhZNGG2wGA1zzr12gYNX9ApI6mHAoZtDCkHfd3S bvcvu//zVGijMhBnCS8G7wYgHOdKgKrHdZUYyCTCWZ80FZVeZTgzq2mL6wVSAYbRlsn1 veMcC46Ct7t7pFVABysPU0zrPkjQcp63FONmJ7iuMc9Cl2fJGP9OULugQEJGr6u1t4e/ mEZ7xnw4p2W8jIYhDtyAw1O7cvgAZFBTh7MIaMvPasK29qOmc19W5WEs64RFhycH33Ti YQmgatgQsAXe+/FF+tIn0OaJdSceFBCIUbTJzACWWcT6JSINrhaOVyFPQrmh+IBczmIw ojUw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=l4evQpCmR7/LVk9OlftWfol4kXKP2zY2admlyZJ8sPk=; b=HXx5TGfseqZvn0AFcuu3OfFVjYans3av/4nK4FAqoDm7ZhYwqkodDVlYxLASSkZ5KF IUnt62AS6vN3/8IiDISWMYjme9aAsyihPN/i4NsDqkrSvzJOAOPifqUYJcXg0xdpQ+6k c3UeeDT/wtJCokAXzjsvPie9GFXEO8vwwYq934QI3zaEFgWBbnqGErx1UizGuvKt0v8R xOvFbIKROYiGAkq+8PvBomN+EuqRB/dJ+xFQJZCMp3GFlK2R/fONLNKgDvs91bonGAKs KzmaXOcLSQHdmYTscsof/i8Df+LdVsXTMk+whLz+KRYon45GFb38TyV1gBoxzpgU5REe EpaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=muggqsfE; 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 z188si9623857pgb.330.2019.02.18.05.48.17; Mon, 18 Feb 2019 05:48:32 -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=@kernel.org header.s=default header.b=muggqsfE; 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 S1731209AbfBRNpB (ORCPT + 99 others); Mon, 18 Feb 2019 08:45:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:50908 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729609AbfBRNpA (ORCPT ); Mon, 18 Feb 2019 08:45:00 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1F453218FC; Mon, 18 Feb 2019 13:44:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550497499; bh=Qx1jQMpo2lgcbwhZZ1BCR/E+e6pz1/DI7HVFxMx9Du0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=muggqsfEc1pbSISkC5lchttbMV0SusTljLckPbuYglFSNuhLnmWm3IWNx1gksot2s 0y7ZqHLBt/veOHMnKB14mgkJcnAhQYYJT3XWeeE4ItcmFcZca6sdpg10ZeJn2xRRfl xbcBMSym/zhQXiJgGLjeWtWLs9qsp0R2Gpg7A5p4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aurelien Jarno , Palmer Dabbelt , Sasha Levin Subject: [PATCH 4.20 10/92] tools uapi: fix RISC-V 64-bit support Date: Mon, 18 Feb 2019 14:42:13 +0100 Message-Id: <20190218133455.600529004@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218133454.668268457@linuxfoundation.org> References: <20190218133454.668268457@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit d0df00e30e4bf9bc27ddbd092ad683ff6121b360 ] The BPF library is not built on 64-bit RISC-V, as the BPF feature is not detected. Looking more in details, feature/test-bpf.c fails to build with the following error: | In file included from /tmp/linux-4.19.12/tools/include/uapi/asm/bitsperlong.h:17, | from /tmp/linux-4.19.12/tools/include/uapi/asm-generic/unistd.h:2, | from /usr/include/riscv64-linux-gnu/asm/unistd.h:1, | from test-bpf.c:2: | /tmp/linux-4.19.12/tools/include/asm-generic/bitsperlong.h:14:2: error: #error Inconsistent word size. Check asm/bitsperlong.h | #error Inconsistent word size. Check asm/bitsperlong.h | ^~~~~ The UAPI from the tools directory is missing RISC-V support, therefore bitsperlong.h from asm-generic is used, defaulting to 32 bits. Fix that by adding tools/arch/riscv/include/uapi/asm/bitsperlong.h as a copy of arch/riscv/include/uapi/asm/bitsperlong.h and by updating tools/include/uapi/asm/bitsperlong.h. Signed-off-by: Aurelien Jarno Signed-off-by: Palmer Dabbelt Signed-off-by: Sasha Levin --- .../arch/riscv/include/uapi/asm/bitsperlong.h | 25 +++++++++++++++++++ tools/include/uapi/asm/bitsperlong.h | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 tools/arch/riscv/include/uapi/asm/bitsperlong.h diff --git a/tools/arch/riscv/include/uapi/asm/bitsperlong.h b/tools/arch/riscv/include/uapi/asm/bitsperlong.h new file mode 100644 index 000000000000..0b3cb52fd29d --- /dev/null +++ b/tools/arch/riscv/include/uapi/asm/bitsperlong.h @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2012 ARM Ltd. + * Copyright (C) 2015 Regents of the University of California + * + * 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 . + */ + +#ifndef _UAPI_ASM_RISCV_BITSPERLONG_H +#define _UAPI_ASM_RISCV_BITSPERLONG_H + +#define __BITS_PER_LONG (__SIZEOF_POINTER__ * 8) + +#include + +#endif /* _UAPI_ASM_RISCV_BITSPERLONG_H */ diff --git a/tools/include/uapi/asm/bitsperlong.h b/tools/include/uapi/asm/bitsperlong.h index 8dd6aefdafa4..fd92ce8388fc 100644 --- a/tools/include/uapi/asm/bitsperlong.h +++ b/tools/include/uapi/asm/bitsperlong.h @@ -13,6 +13,8 @@ #include "../../arch/mips/include/uapi/asm/bitsperlong.h" #elif defined(__ia64__) #include "../../arch/ia64/include/uapi/asm/bitsperlong.h" +#elif defined(__riscv) +#include "../../arch/riscv/include/uapi/asm/bitsperlong.h" #else #include #endif -- 2.19.1