From patchwork Thu Jul 2 14:07:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hajime Tazaki X-Patchwork-Id: 1321480 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=oKnmITDf; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=BjV9ggak; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49yKhf2y3rz9sPF for ; Fri, 3 Jul 2020 00:09:06 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ev13io4BoF4mfWDVVWgJkh+r+Ekl97MOI/ZzFe2QKKQ=; b=oKnmITDfAHcT6zkWhYAevUOJf XUocB/KkJE8/w4L2XMr8sDezs4jZsoQDYa/uMpbgNbQ7AHIpO/W1msjaYCRtaFMcyK+ACRpiZyVGq vt2r7VrDRVv8HBGk9a9ZUkkabiFWeOI9YvJ1CpjIFNnerdH1k8vP4gSucMRuxNDI1eig8DsfC22/7 UGiol8FDTZXrsFlqgP1EhJIqZJX0A4MAafbyOJMeyvdfhtZd6ijX314gji4mA90LiByAK3eIVVhgC NxqqBKyECe4HYeUEyEPjbkCq7gvZXkYY2p4km8TN2xNZjZ6NFL6RA5F/J47QgKzcMXg+e1haIOBy2 aQA6TogMg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqztf-0005DX-6o; Thu, 02 Jul 2020 14:09:03 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqztc-0005CH-Es for linux-um@lists.infradead.org; Thu, 02 Jul 2020 14:09:01 +0000 Received: by mail-pj1-x1043.google.com with SMTP id k5so3017426pjg.3 for ; Thu, 02 Jul 2020 07:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QwdAwomAk2ltg1grbV+9NQkaDdoDFru+sqVSXHRR9r4=; b=BjV9ggak1qS7sx7q9gGxO75x9GkcaqisDOfzuFdC77jOO0bdV1ekcIV8P5Ix1Dl+DU 0f9ZfY3AUy6GGYDUANh0rdiGQmKpyWKrXfJJlJmrq+HwUcmv4z3CbCxkClngJupcWYG7 Aoe9b6spsx6Y2YsTCAJDqQAMnqbFgwraa+IozcweWKM662A/RDJXbdamfEwYT3wpXE/B SzaAExupi+jxiFOKE4Id2mTB+OI/RJK2STlh9VGUhlO+xx41bn26UnwM0IZ8ZTJlzPbz Yt+CvRHqp2g6EvH5ffeKVHmjQwNQrTCVp5iYBMN15Ef5YVyarlexn3TaXS212o5oHkCY 6yRw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=QwdAwomAk2ltg1grbV+9NQkaDdoDFru+sqVSXHRR9r4=; b=SEuQ9s5EUdqt4gujdO6xE+uLzLSZ+RDnnxVzz9mOVbWsKd+izS7UI0snq24+RM7F0T 5ir3mYbEqtQNeyJGZFnmRMcW72FPNEiJ0k/+jB3o2vvl/33e66QqUNlpG9ZNjE8UKScC 1k2Vo8MDKMTzu1DR8tWlP5kcaDUoemQn4otLng6QYmosH4GrDCrqiHKC4JFObq6SoLAn yx/AbU0Znej80WcZw4onapNQpYA08gPF/ZvQ356Q1MnZYzpG325Pgpz9+135M3O+CZeR lgHPj1KIHc2s9m2dKCZ7JM8DossEW4gSdhQnTOYefhWsoBMHfWWIaa3VQWnH069bhj43 ootQ== X-Gm-Message-State: AOAM5302yOnzCmrz1LZ79ubuGbw3ctssh1DZ6FoxiAuhx6Dyk1Am3MbA VRI289AoyeQ6UseFbJyeImv+vL8/lS4= X-Google-Smtp-Source: ABdhPJzeYk5OStImCc6jXwI7wK2f4JubzcH2A4ddZYtKMmjeNqvf4JHDCZgKZ8gbIuX3X5pfsqmeBg== X-Received: by 2002:a17:902:a412:: with SMTP id p18mr26270151plq.341.1593698938073; Thu, 02 Jul 2020 07:08:58 -0700 (PDT) Received: from earth-mac.local (219x123x138x129.ap219.ftth.ucom.ne.jp. [219.123.138.129]) by smtp.gmail.com with ESMTPSA id o128sm9313973pfg.127.2020.07.02.07.08.57 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Jul 2020 07:08:57 -0700 (PDT) Received: by earth-mac.local (Postfix, from userid 501) id B14FC202D31D23; Thu, 2 Jul 2020 23:08:55 +0900 (JST) From: Hajime Tazaki To: linux-um@lists.infradead.org Subject: [RFC v5 09/21] um: nommu: host interface Date: Thu, 2 Jul 2020 23:07:03 +0900 Message-Id: X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200702_100900_601527_210365B9 X-CRM114-Status: GOOD ( 11.64 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1043 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [thehajime[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Octavian Purdila , linux-kernel-library@freelists.org, linux-arch@vger.kernel.org, Hajime Tazaki , Akira Moroo Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This patch introduces the host operations that define the interface between the LKL and the host. These operations must be provided either by a host library or by the application itself. Signed-off-by: Hajime Tazaki --- arch/um/include/asm/host_ops.h | 9 ++++++++ arch/um/nommu/include/uapi/asm/host_ops.h | 25 +++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 arch/um/include/asm/host_ops.h create mode 100644 arch/um/nommu/include/uapi/asm/host_ops.h diff --git a/arch/um/include/asm/host_ops.h b/arch/um/include/asm/host_ops.h new file mode 100644 index 000000000000..f52423cc4ced --- /dev/null +++ b/arch/um/include/asm/host_ops.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_LKL_HOST_OPS_H +#define _ASM_LKL_HOST_OPS_H + +#include + +extern struct lkl_host_operations *lkl_ops; + +#endif diff --git a/arch/um/nommu/include/uapi/asm/host_ops.h b/arch/um/nommu/include/uapi/asm/host_ops.h new file mode 100644 index 000000000000..d3dad11b459e --- /dev/null +++ b/arch/um/nommu/include/uapi/asm/host_ops.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef __UM_NOMMU_UAPI_HOST_OPS_H +#define __UM_NOMMU_UAPI_HOST_OPS_H + +/* Defined in {posix,nt}-host.c */ +struct lkl_mutex; +struct lkl_sem; +typedef unsigned long lkl_thread_t; +struct lkl_jmp_buf { + unsigned long buf[128]; +}; + +/** + * lkl_host_operations - host operations used by the Linux kernel + * + * These operations must be provided by a host library or by the application + * itself. + * + */ +struct lkl_host_operations { +}; + +void lkl_bug(const char *fmt, ...); + +#endif