From patchwork Fri Jan 20 14:09:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Sionneau X-Patchwork-Id: 13109929 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74712C5320B for ; Fri, 20 Jan 2023 14:11:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 42BF06B0089; Fri, 20 Jan 2023 09:10:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2152B6B008C; Fri, 20 Jan 2023 09:10:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BFD886B0089; Fri, 20 Jan 2023 09:10:37 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 63CE96B0095 for ; Fri, 20 Jan 2023 09:10:37 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 333A6160E7F for ; Fri, 20 Jan 2023 14:10:37 +0000 (UTC) X-FDA: 80375362914.15.22E9104 Received: from fx305.security-mail.net (smtpout30.security-mail.net [85.31.212.35]) by imf18.hostedemail.com (Postfix) with ESMTP id BF0C21C001C for ; Fri, 20 Jan 2023 14:10:34 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=kalray.eu header.s=sec-sig-email header.b="jTc/rTBC"; dkim=fail ("body hash did not verify") header.d=kalray.eu header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=YUYYebIR; dmarc=pass (policy=quarantine) header.from=kalray.eu; spf=pass (imf18.hostedemail.com: domain of ysionneau@kalray.eu designates 85.31.212.35 as permitted sender) smtp.mailfrom=ysionneau@kalray.eu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1674223835; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=0GUIPTPkINoYyOVX9aMLuFY5xx1IR1v3SSgz7OuGSW8=; b=48c0SC7rPQMw/QuGhu3UGFK4kCVbx5YojrXYGkA2j4dYxHTJhsCIBAGfCSTJ5uPxrj7D65 JEZBVLVjY8/2T/4F0s/HDTmnnn5Qr0w2jXRpHsjy0jFWs5DrtqYOw6vvphrmwf577Xzt5A aB0UpnLOql+dhnpsIKd0LWt7s15kGNw= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=kalray.eu header.s=sec-sig-email header.b="jTc/rTBC"; dkim=fail ("body hash did not verify") header.d=kalray.eu header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=YUYYebIR; dmarc=pass (policy=quarantine) header.from=kalray.eu; spf=pass (imf18.hostedemail.com: domain of ysionneau@kalray.eu designates 85.31.212.35 as permitted sender) smtp.mailfrom=ysionneau@kalray.eu ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1674223835; a=rsa-sha256; cv=none; b=wwfD6XBKU8nytswHPJ7EKr7bMn2M4PZ7gjUdB8E3ZnjG9ZaHtwuX3Pl1+mzBEZeJjw0q6q XL35/eC5y6vM2W3slzf3GdZHYtan0dtHCb9IaPSDs1ZbbRaK/G7ObgnkAoB1WJrEmlLChz 8UT8j8Tp1o4PQyuWHLSjUg+HyZ2RIUg= Received: from localhost (fx305.security-mail.net [127.0.0.1]) by fx305.security-mail.net (Postfix) with ESMTP id 39A8830F97A for ; Fri, 20 Jan 2023 15:10:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kalray.eu; s=sec-sig-email; t=1674223833; bh=tjQ30Z9ergbd5QQmn2LPAl2FE9a2esEgGsVsX8Hkh0Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jTc/rTBCEGrNObrQ1VuIPhvM+JDxJxum53Fpozf/cuZsMbKKRFSN+90aFZ0PYZbCa ET/Xk4+PIXCIU3jngpQhpQNaxwio19JkL9ttezZdG2o50PLw6YEEAYMcJMqptBT8+d kEx+kQyvPAJPs0sLdCge/umQFwSM0bqPC6prtk04= Received: from fx305 (fx305.security-mail.net [127.0.0.1]) by fx305.security-mail.net (Postfix) with ESMTP id C949C30FA8E; Fri, 20 Jan 2023 15:10:31 +0100 (CET) Received: from zimbra2.kalray.eu (unknown [217.181.231.53]) by fx305.security-mail.net (Postfix) with ESMTPS id A9ACD30FA1A; Fri, 20 Jan 2023 15:10:30 +0100 (CET) Received: from zimbra2.kalray.eu (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTPS id 5776727E0443; Fri, 20 Jan 2023 15:10:30 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id 3E57027E043E; Fri, 20 Jan 2023 15:10:30 +0100 (CET) Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 4wpPab-7nMmx; Fri, 20 Jan 2023 15:10:30 +0100 (CET) Received: from junon.lin.mbt.kalray.eu (unknown [192.168.37.161]) by zimbra2.kalray.eu (Postfix) with ESMTPSA id B43BA27E043D; Fri, 20 Jan 2023 15:10:29 +0100 (CET) X-Virus-Scanned: E-securemail Secumail-id: <15316.63caa0d6.a66ff.0> DKIM-Filter: OpenDKIM Filter v2.10.3 zimbra2.kalray.eu 3E57027E043E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kalray.eu; s=32AE1B44-9502-11E5-BA35-3734643DEF29; t=1674223830; bh=7ihbYuWX1g/NOZf5apPInAkKPctju2YordzLcMMvd+8=; h=From:To:Date:Message-Id:MIME-Version; b=YUYYebIRIJ5bk8n/CH4YvMdtNpTm9QVYSikQs07+iRmxxq3rubrDIth9BkffMcReC s/DZFrr3fFNMHE0WuwO9jyrorHXjMRuprOkFWk9k7sCTRKtwBpoZVgMyehGNcXP0g1 2ygHrIFYBeDLTMm7y6M6ROAh2tifNdoeEu7Qcwv4= From: Yann Sionneau To: Arnd Bergmann , Jonathan Corbet , Thomas Gleixner , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Will Deacon , Peter Zijlstra , Boqun Feng , Mark Rutland , Eric Biederman , Kees Cook , Oleg Nesterov , Ingo Molnar , Waiman Long , "Aneesh Kumar K.V" , Andrew Morton , Nick Piggin , Paul Moore , Eric Paris , Christian Brauner , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jules Maselbas , Yann Sionneau , Guillaume Thouvenin , Clement Leger , Vincent Chardon , Marc =?utf-8?b?UG91bGhp?= =?utf-8?b?w6hz?= , Julian Vetter , Samuel Jones , Ashley Lesdalons , Thomas Costis , Marius Gligor , Jonathan Borne , Julien Villette , Luc Michel , Louis Morhet , Julien Hascoet , Jean-Christophe Pince , Guillaume Missonnier , Alex Michon , Huacai Chen , WANG Xuerui , Shaokun Zhang , John Garry , Guangbin Huang , Bharat Bhushan , Bibo Mao , Atish Patra , "Jason A. Donenfeld" , Qi Liu , Jiaxun Yang , Catalin Marinas , Mark Brown , Janosch Frank , Alexey Dobriyan Cc: Benjamin Mugnier , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-audit@redhat.com, linux-riscv@lists.infradead.org, bpf@vger.kernel.org Subject: [RFC PATCH v2 12/31] kvx: Add other common headers Date: Fri, 20 Jan 2023 15:09:43 +0100 Message-ID: <20230120141002.2442-13-ysionneau@kalray.eu> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230120141002.2442-1-ysionneau@kalray.eu> References: <20230120141002.2442-1-ysionneau@kalray.eu> MIME-Version: 1.0 X-ALTERMIMEV2_out: done X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: BF0C21C001C X-Stat-Signature: 76ip9fd4zagm3wd8a3e9gz4gc1fuzd98 X-HE-Tag: 1674223834-383718 X-HE-Meta: U2FsdGVkX19lhCuDCDiP0r8VUdl2myJ91gxaCYFWsu+4QHmJGaJYjwysKn5wcPDioio30BL5nHlI/ay70Gz05SYUIgd0ZmrAOaQc0bs0Vx5Qxjgoc3dIWelmarAQBNy+/Al9+63UektfaAm0s/UhnLJDuiqgYsTJ/rYa8PsaibiEBeSfjFi8aIS90GeL7qVnOKkLW4AMm6m90GczcNN8EXpsEcnT/9/vs6teZwFP8uFle0GNqJqQHVS1pYFmKSfYznIoT8yncZhUlnFhhCKUyEFMz5xTZaZ8/lF0k6tWcEudpQgOfPm4KPz+kMvZqQNbDwAXePjOvnuE4DBJaqFziKF82b0lkc1sclyyIHK9kXesrmT9+bIkjXjnza+n9+59uw7l85hSp6az6mL/hd0iuMOocZ1DgxVERzSRgRYlyeG4fGAJfNEOTXfSBgASdBbbH57glhDB41D3orsnDlnxJTZleJYV0Efju8JxVbsisoqKnkIf5hiZB9gw0kshpGqfaNApQyPJdpPnASdH9ccK26XYjJIXmggVKeqT4aHkgWBl9OsJ6ndDDpzcLiO0h4nTsYhpcqx81qY5DWuoyHYllfLiKvQ1rvxeaed00u1z7vrKlMRO9uvrUiTYuhdrGNMs4bm1POMZVpq4a+2MVgDeKWese8DjBy4bw1fKYZ3t0DIb9TlhiBZqhyDORcuYIMJWQalx88ZwpbTKH59Wsv70O09mUSsEExUHYBVpom1lEL30xkK+agAK6D6SuxR4TO0mxLDe1Fy1/q9hrAo/ijMktiaFojwZOjcaT7OUQO2Zg3V7bN8y7UrxSWkClVQct8fqAtNzOIafBytfcTCp76AI58dgu054M8b0DaaRVfAM/1KWdT71wodB8hD9OupcCSFBagGekhTyHFoSXe+YF/L1/FknwFvOFYbXiwW7g8v/XiLkTHg3jmTCeUn8VKaWK5x6hmAkZuJrqqc/uqUTqB7 SB9M8Eqb ZAOHzaDUy1jdNlypNK9qALd5IzYaf0vNQv8DVBrtBCQh4wmSgM/OSpLlShQ4LU0pxXXEENeULqKmUSO5rgu6nNMKH4nBWwdffCbh0C21gBjpVK5yjcGErmqW7SLVhmFVDKNZu68v0ajuneKYC0uwnzeIWcs6NYjSCA9eQj7FuMl2YzeED67NiUYdlTR9pdIuFmfls52VpnR6cjGVXPI4HIO2Pf2jm9X4yVICm3hsJWdBg2/J36Mf7UkiS5rS5D5aYuQdn6GCe3lc5H9ll+3nVHCsxpEXv6PD7A0t3HRfXLI0Md2oMxVzb2ig3nrIKpX5NmaaZpadLNKD7PCGy9Ze5X/EbLZBOVDVke8rDRxiWPlMeASl40w3DWgQfvlfcTsvrrvfkpP7uQfoirKFEsG8YaHIFLp9rYgfmR/ixnq1kXVwMNZkJrqsJcnGknm4il6tKxHhS5mbXnxVo3aIpg1KoSwVSvu+4Y6548/RQv6zcgZBKDbgh5lvdD68JmxaVeD6JGQ9uY83Vfvj+JXh+1WYeuvbIa2OZyt8W2fUcdv9grSvK4Z9Wb7xgX5E16zSIhjH7LeO5ikxGHB2OpV1ccsqcsynb2GU+9YfJg/Cobu8TIOcPxo09duGcDukZrw9AN3NAwXMx2N0w7Cg7HGwItx0kX0fWEYxbi1w2sFG8/4dcgW+5IVqqsvFGS8CjkRknnME6BBS+Zzg/I8IiraLs7WaVOEaC1eq/xfNa7hTiYs+C8LqV6bnMT6ShBwzckw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Add some other common headers for basic kvx support. Co-developed-by: Clement Leger Signed-off-by: Clement Leger Co-developed-by: Julian Vetter Signed-off-by: Julian Vetter Co-developed-by: Vincent Chardon Signed-off-by: Vincent Chardon Co-developed-by: Yann Sionneau Signed-off-by: Yann Sionneau --- Notes: V1 -> V2: no changes arch/kvx/include/asm/asm-prototypes.h | 14 ++++++++ arch/kvx/include/asm/clocksource.h | 17 +++++++++ arch/kvx/include/asm/linkage.h | 13 +++++++ arch/kvx/include/asm/pci.h | 36 +++++++++++++++++++ arch/kvx/include/asm/sections.h | 18 ++++++++++ arch/kvx/include/asm/spinlock.h | 16 +++++++++ arch/kvx/include/asm/spinlock_types.h | 17 +++++++++ arch/kvx/include/asm/stackprotector.h | 47 +++++++++++++++++++++++++ arch/kvx/include/asm/timex.h | 20 +++++++++++ arch/kvx/include/asm/types.h | 12 +++++++ arch/kvx/include/uapi/asm/bitsperlong.h | 14 ++++++++ arch/kvx/include/uapi/asm/byteorder.h | 12 +++++++ tools/include/uapi/asm/bitsperlong.h | 2 ++ 13 files changed, 238 insertions(+) create mode 100644 arch/kvx/include/asm/asm-prototypes.h create mode 100644 arch/kvx/include/asm/clocksource.h create mode 100644 arch/kvx/include/asm/linkage.h create mode 100644 arch/kvx/include/asm/pci.h create mode 100644 arch/kvx/include/asm/sections.h create mode 100644 arch/kvx/include/asm/spinlock.h create mode 100644 arch/kvx/include/asm/spinlock_types.h create mode 100644 arch/kvx/include/asm/stackprotector.h create mode 100644 arch/kvx/include/asm/timex.h create mode 100644 arch/kvx/include/asm/types.h create mode 100644 arch/kvx/include/uapi/asm/bitsperlong.h create mode 100644 arch/kvx/include/uapi/asm/byteorder.h diff --git a/arch/kvx/include/asm/asm-prototypes.h b/arch/kvx/include/asm/asm-prototypes.h new file mode 100644 index 000000000000..af032508e30c --- /dev/null +++ b/arch/kvx/include/asm/asm-prototypes.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2017-2023 Kalray Inc. + * Author(s): Clement Leger + */ + +#ifndef _ASM_KVX_ASM_PROTOTYPES_H +#define _ASM_KVX_ASM_PROTOTYPES_H + +#include + +#include + +#endif /* _ASM_KVX_ASM_PROTOTYPES_H */ diff --git a/arch/kvx/include/asm/clocksource.h b/arch/kvx/include/asm/clocksource.h new file mode 100644 index 000000000000..4df7c66ffbb5 --- /dev/null +++ b/arch/kvx/include/asm/clocksource.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2017-2023 Kalray Inc. + * Author(s): Yann Sionneau + * Clement Leger + */ + +#ifndef _ASM_KVX_CLOCKSOURCE_H +#define _ASM_KVX_CLOCKSOURCE_H + +#include + +struct arch_clocksource_data { + void __iomem *regs; +}; + +#endif /* _ASM_KVX_CLOCKSOURCE_H */ diff --git a/arch/kvx/include/asm/linkage.h b/arch/kvx/include/asm/linkage.h new file mode 100644 index 000000000000..84e1cacf67c2 --- /dev/null +++ b/arch/kvx/include/asm/linkage.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2017-2023 Kalray Inc. + * Author(s): Yann Sionneau + */ + +#ifndef __ASM_KVX_LINKAGE_H +#define __ASM_KVX_LINKAGE_H + +#define __ALIGN .align 4 +#define __ALIGN_STR ".align 4" + +#endif diff --git a/arch/kvx/include/asm/pci.h b/arch/kvx/include/asm/pci.h new file mode 100644 index 000000000000..d5bbaaf041b5 --- /dev/null +++ b/arch/kvx/include/asm/pci.h @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2017-2023 Kalray Inc. + * Author(s): Vincent Chardon + * Clement Leger + */ + +#ifndef __ASM_KVX_PCI_H_ +#define __ASM_KVX_PCI_H_ + +#include +#include +#include + +#define ARCH_GENERIC_PCI_MMAP_RESOURCE 1 +#define HAVE_PCI_MMAP 1 + +extern int isa_dma_bridge_buggy; + +/* Can be used to override the logic in pci_scan_bus for skipping + * already-configured bus numbers - to be used for buggy BIOSes + * or architectures with incomplete PCI setup by the loader. + */ +#define pcibios_assign_all_busses() 0 + +#define PCIBIOS_MIN_IO 0UL +#define PCIBIOS_MIN_MEM 0UL + +#ifdef CONFIG_PCI_DOMAINS +static inline int pci_proc_domain(struct pci_bus *bus) +{ + return pci_domain_nr(bus); +} +#endif /* CONFIG_PCI_DOMAINS */ + +#endif /* _ASM_KVX_PCI_H */ diff --git a/arch/kvx/include/asm/sections.h b/arch/kvx/include/asm/sections.h new file mode 100644 index 000000000000..0777675ef264 --- /dev/null +++ b/arch/kvx/include/asm/sections.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2017-2023 Kalray Inc. + * Author(s): Clement Leger + */ + +#ifndef _ASM_KVX_SECTIONS_H +#define _ASM_KVX_SECTIONS_H + +#include + +extern char __rodata_start[], __rodata_end[]; +extern char __initdata_start[], __initdata_end[]; +extern char __inittext_start[], __inittext_end[]; +extern char __exception_start[], __exception_end[]; +extern char __rm_firmware_regs_start[]; + +#endif diff --git a/arch/kvx/include/asm/spinlock.h b/arch/kvx/include/asm/spinlock.h new file mode 100644 index 000000000000..ed32fdba1e19 --- /dev/null +++ b/arch/kvx/include/asm/spinlock.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2017-2023 Kalray Inc. + * Author(s): Clement Leger + */ + +#ifndef _ASM_KVX_SPINLOCK_H +#define _ASM_KVX_SPINLOCK_H + +#include +#include + +/* See include/linux/spinlock.h */ +#define smp_mb__after_spinlock() smp_mb() + +#endif diff --git a/arch/kvx/include/asm/spinlock_types.h b/arch/kvx/include/asm/spinlock_types.h new file mode 100644 index 000000000000..929a7df16ef3 --- /dev/null +++ b/arch/kvx/include/asm/spinlock_types.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2017-2023 Kalray Inc. + * Author(s): Clement Leger + */ + +#ifndef _ASM_KVX_SPINLOCK_TYPES_H +#define _ASM_KVX_SPINLOCK_TYPES_H + +#if !defined(__LINUX_SPINLOCK_TYPES_RAW_H) && !defined(__ASM_SPINLOCK_H) +# error "please don't include this file directly" +#endif + +#include +#include + +#endif /* _ASM_KVX_SPINLOCK_TYPES_H */ diff --git a/arch/kvx/include/asm/stackprotector.h b/arch/kvx/include/asm/stackprotector.h new file mode 100644 index 000000000000..2c190bbb5efc --- /dev/null +++ b/arch/kvx/include/asm/stackprotector.h @@ -0,0 +1,47 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * derived from arch/mips/include/asm/stackprotector.h + * + * Copyright (C) 2017-2023 Kalray Inc. + * Author(s): Clement Leger + */ + +/* + * GCC stack protector support. + * + * Stack protector works by putting predefined pattern at the start of + * the stack frame and verifying that it hasn't been overwritten when + * returning from the function. The pattern is called stack canary + * and gcc expects it to be defined by a global variable called + * "__stack_chk_guard" on KVX. This unfortunately means that on SMP + * we cannot have a different canary value per task. + */ + +#ifndef __ASM_STACKPROTECTOR_H +#define __ASM_STACKPROTECTOR_H + +#include +#include + +extern unsigned long __stack_chk_guard; + +/* + * Initialize the stackprotector canary value. + * + * NOTE: this must only be called from functions that never return, + * and it must always be inlined. + */ +static __always_inline void boot_init_stack_canary(void) +{ + unsigned long canary; + + /* Try to get a semi random initial value. */ + get_random_bytes(&canary, sizeof(canary)); + canary ^= LINUX_VERSION_CODE; + canary &= CANARY_MASK; + + current->stack_canary = canary; + __stack_chk_guard = current->stack_canary; +} + +#endif /* _ASM_STACKPROTECTOR_H */ diff --git a/arch/kvx/include/asm/timex.h b/arch/kvx/include/asm/timex.h new file mode 100644 index 000000000000..51e346faa887 --- /dev/null +++ b/arch/kvx/include/asm/timex.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2017-2023 Kalray Inc. + * Author(s): Clement Leger + */ + +#ifndef _ASM_KVX_TIMEX_H +#define _ASM_KVX_TIMEX_H + +#define get_cycles get_cycles + +#include +#include + +static inline cycles_t get_cycles(void) +{ + return kvx_sfr_get(PM0); +} + +#endif /* _ASM_KVX_TIMEX_H */ diff --git a/arch/kvx/include/asm/types.h b/arch/kvx/include/asm/types.h new file mode 100644 index 000000000000..1e6c024ee892 --- /dev/null +++ b/arch/kvx/include/asm/types.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2017-2023 Kalray Inc. + * Author(s): Clement Leger + */ + +#ifndef _ASM_KVX_TYPES_H +#define _ASM_KVX_TYPES_H + +#include + +#endif /* _ASM_KVX_TYPES_H */ diff --git a/arch/kvx/include/uapi/asm/bitsperlong.h b/arch/kvx/include/uapi/asm/bitsperlong.h new file mode 100644 index 000000000000..02a91596d567 --- /dev/null +++ b/arch/kvx/include/uapi/asm/bitsperlong.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ +/* + * Copyright (C) 2017-2023 Kalray Inc. + * Author(s): Clement Leger + */ + +#ifndef _UAPI_ASM_KVX_BITSPERLONG_H +#define _UAPI_ASM_KVX_BITSPERLONG_H + +#define __BITS_PER_LONG 64 + +#include + +#endif /* _UAPI_ASM_KVX_BITSPERLONG_H */ diff --git a/arch/kvx/include/uapi/asm/byteorder.h b/arch/kvx/include/uapi/asm/byteorder.h new file mode 100644 index 000000000000..b7d827daec73 --- /dev/null +++ b/arch/kvx/include/uapi/asm/byteorder.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ +/* + * Copyright (C) 2017-2023 Kalray Inc. + * Author(s): Clement Leger + */ + +#ifndef _ASM_KVX_BYTEORDER_H +#define _ASM_KVX_BYTEORDER_H + +#include + +#endif /* _ASM_KVX_BYTEORDER_H */ diff --git a/tools/include/uapi/asm/bitsperlong.h b/tools/include/uapi/asm/bitsperlong.h index da5206517158..40272ffa9c32 100644 --- a/tools/include/uapi/asm/bitsperlong.h +++ b/tools/include/uapi/asm/bitsperlong.h @@ -19,6 +19,8 @@ #include "../../../arch/alpha/include/uapi/asm/bitsperlong.h" #elif defined(__loongarch__) #include "../../../arch/loongarch/include/uapi/asm/bitsperlong.h" +#elif defined(__kvx__) +#include "../../../arch/kvx/include/uapi/asm/bitsperlong.h" #else #include #endif