linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Aurelien Jarno <aurelien@aurel32.net>,
	Palmer Dabbelt <palmer@sifive.com>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 4.19 25/85] tools uapi: fix RISC-V 64-bit support
Date: Mon, 18 Feb 2019 14:42:51 +0100	[thread overview]
Message-ID: <20190218133502.381996968@linuxfoundation.org> (raw)
In-Reply-To: <20190218133459.758004711@linuxfoundation.org>

4.19-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 <aurelien@aurel32.net>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 .../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 <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _UAPI_ASM_RISCV_BITSPERLONG_H
+#define _UAPI_ASM_RISCV_BITSPERLONG_H
+
+#define __BITS_PER_LONG (__SIZEOF_POINTER__ * 8)
+
+#include <asm-generic/bitsperlong.h>
+
+#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 <asm-generic/bitsperlong.h>
 #endif
-- 
2.19.1




  parent reply	other threads:[~2019-02-18 14:41 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-18 13:42 [PATCH 4.19 00/85] 4.19.24-stable review Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 01/85] dt-bindings: eeprom: at24: add "atmel,24c2048" compatible string Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 02/85] eeprom: at24: add support for 24c2048 Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 03/85] blk-mq: fix a hung issue when fsync Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 04/85] ARM: 8789/1: signal: copy registers using __copy_to_user() Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 05/85] ARM: 8790/1: signal: always use __copy_to_user to save iwmmxt context Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 06/85] ARM: 8791/1: vfp: use __copy_to_user() when saving VFP state Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 07/85] ARM: 8792/1: oabi-compat: copy oabi events using __copy_to_user() Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 08/85] ARM: 8793/1: signal: replace __put_user_error with __put_user Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 09/85] ARM: 8794/1: uaccess: Prevent speculative use of the current addr_limit Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 10/85] ARM: 8795/1: spectre-v1.1: use put_user() for __put_user() Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 11/85] ARM: 8796/1: spectre-v1,v1.1: provide helpers for address sanitization Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 12/85] ARM: 8797/1: spectre-v1.1: harden __copy_to_user Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 13/85] ARM: 8810/1: vfp: Fix wrong assignement to ufp_exc Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 14/85] ARM: make lookup_processor_type() non-__init Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 15/85] ARM: split out processor lookup Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 16/85] ARM: clean up per-processor check_bugs method call Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 17/85] ARM: add PROC_VTABLE and PROC_TABLE macros Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 18/85] ARM: spectre-v2: per-CPU vtables to work around big.Little systems Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 19/85] ARM: ensure that processor vtables is not lost after boot Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 20/85] ARM: fix the cockup in the previous patch Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 21/85] drm/amdgpu/sriov:Correct pfvf exchange logic Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 22/85] ACPI: NUMA: Use correct type for printing addresses on i386-PAE Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 23/85] perf report: Fix wrong iteration count in --branch-history Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 24/85] perf test shell: Use a fallback to get the pathname in vfs_getname Greg Kroah-Hartman
2019-02-18 13:42 ` Greg Kroah-Hartman [this message]
2019-02-18 13:42 ` [PATCH 4.19 26/85] riscv: fix trace_sys_exit hook Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 27/85] cpufreq: check if policy is inactive early in __cpufreq_get() Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 28/85] drm/bridge: tc358767: add bus flags Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 29/85] drm/bridge: tc358767: add defines for DP1_SRCCTRL & PHY_2LANE Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 30/85] drm/bridge: tc358767: fix single lane configuration Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 31/85] drm/bridge: tc358767: fix initial DP0/1_SRCCTRL value Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 32/85] drm/bridge: tc358767: reject modes which require too much BW Greg Kroah-Hartman
2019-02-18 13:42 ` [PATCH 4.19 33/85] drm/bridge: tc358767: fix output H/V syncs Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 34/85] nvme-pci: use the same attributes when freeing host_mem_desc_bufs Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 35/85] nvme-pci: fix out of bounds access in nvme_cqe_pending Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 36/85] nvme-multipath: zero out ANA log buffer Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 37/85] nvme: pad fake subsys NQN vid and ssvid with zeros Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 38/85] drm/amdgpu: set WRITE_BURST_LENGTH to 64B to workaround SDMA1 hang Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 39/85] ARM: dts: da850-evm: Correct the audio codec regulators Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 40/85] ARM: dts: da850-evm: Correct the sound card name Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 41/85] ARM: dts: da850-lcdk: Correct the audio codec regulators Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 42/85] ARM: dts: da850-lcdk: Correct the sound card name Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 43/85] ARM: dts: kirkwood: Fix polarity of GPIO fan lines Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 44/85] gpio: pl061: handle failed allocations Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 45/85] drm/nouveau: Dont disable polling in fallback mode Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 46/85] drm/nouveau/falcon: avoid touching registers if engine is off Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 47/85] cifs: Limit memory used by lock request calls to a page Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 48/85] kvm: sev: Fail KVM_SEV_INIT if already initialized Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 49/85] CIFS: Do not assume one credit for async responses Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 50/85] gpio: mxc: move gpio noirq suspend/resume to syscore phase Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 51/85] Revert "Input: elan_i2c - add ACPI ID for touchpad in ASUS Aspire F5-573G" Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 52/85] Input: elan_i2c - add ACPI ID for touchpad in Lenovo V330-15ISK Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 53/85] ARM: OMAP5+: Fix inverted nirq pin interrupts with irq_set_type Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 54/85] perf/core: Fix impossible ring-buffer sizes warning Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 55/85] perf/x86: Add check_period PMU callback Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 56/85] ALSA: hda - Add quirk for HP EliteBook 840 G5 Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 57/85] ALSA: usb-audio: Fix implicit fb endpoint setup by quirk Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 58/85] ASoC: hdmi-codec: fix oops on re-probe Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 59/85] tools uapi: fix Alpha support Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 60/85] riscv: Add pte bit to distinguish swap from invalid Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 61/85] x86/kvm/nVMX: read from MSR_IA32_VMX_PROCBASED_CTLS2 only when it is available Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 62/85] kvm: vmx: Fix entry number check for add_atomic_switch_msr() Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 63/85] mmc: sunxi: Filter out unsupported modes declared in the device tree Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 64/85] mmc: block: handle complete_work on separate workqueue Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 65/85] Input: bma150 - register input device after setting private data Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 66/85] Input: elantech - enable 3rd button support on Fujitsu CELSIUS H780 Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 67/85] Revert "nfsd4: return default lease period" Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 68/85] Revert "mm: dont reclaim inodes with many attached pages" Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 69/85] Revert "mm: slowly shrink slabs with a relatively small number of objects" Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 70/85] alpha: fix page fault handling for r16-r18 targets Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 71/85] alpha: Fix Eiger NR_IRQS to 128 Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 72/85] s390/zcrypt: fix specification exception on z196 during ap probe Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 73/85] tracing/uprobes: Fix output for multiple string arguments Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 74/85] x86/platform/UV: Use efi_runtime_lock to serialise BIOS calls Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 75/85] scsi: sd: fix entropy gathering for most rotational disks Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 76/85] signal: Restore the stop PTRACE_EVENT_EXIT Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 77/85] md/raid1: dont clear bitmap bits on interrupted recovery Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 78/85] x86/a.out: Clear the dump structure initially Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 79/85] dm crypt: dont overallocate the integrity tag space Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 80/85] dm thin: fix bug where bio that overwrites thin block ignores FUA Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 81/85] drm: Use array_size() when creating lease Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 82/85] drm/vkms: Fix license inconsistent Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 83/85] drm/i915: Block fbdev HPD processing during suspend Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 84/85] drm/i915: Prevent a race during I915_GEM_MMAP ioctl with WC set Greg Kroah-Hartman
2019-02-18 13:43 ` [PATCH 4.19 85/85] mm: proc: smaps_rollup: fix pss_locked calculation Greg Kroah-Hartman
2019-02-19  5:41 ` [PATCH 4.19 00/85] 4.19.24-stable review Naresh Kamboju
2019-02-19 17:27 ` Guenter Roeck
2019-02-20  0:17 ` shuah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190218133502.381996968@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=aurelien@aurel32.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=palmer@sifive.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).