From patchwork Thu Sep 14 14:56:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksii Kurochko X-Patchwork-Id: 13385603 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 91081EEAA4F for ; Thu, 14 Sep 2023 15:12:15 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.602424.939092 (Exim 4.92) (envelope-from ) id 1qgo0i-0001n4-NX; Thu, 14 Sep 2023 15:12:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 602424.939092; Thu, 14 Sep 2023 15:12:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qgo0i-0001mx-Ku; Thu, 14 Sep 2023 15:12:04 +0000 Received: by outflank-mailman (input) for mailman id 602424; Thu, 14 Sep 2023 15:12:03 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qgnmV-0002W4-NX for xen-devel@lists.xenproject.org; Thu, 14 Sep 2023 14:57:23 +0000 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [2a00:1450:4864:20::229]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 01e14105-530f-11ee-8787-cb3800f73035; Thu, 14 Sep 2023 16:57:21 +0200 (CEST) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2b9c907bc68so17355891fa.2 for ; Thu, 14 Sep 2023 07:57:21 -0700 (PDT) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id a14-20020a2e860e000000b002b6ffa50896sm309828lji.128.2023.09.14.07.57.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 07:57:20 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 01e14105-530f-11ee-8787-cb3800f73035 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694703441; x=1695308241; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1gqkhvANInIWgDmOoOPJUCId3lz6JPHGNXOuOXwQD0U=; b=oZAP/o6tA7U+vthV+pyrVxTuZjqHO9w506Q3wRghSyFIQYEDIAJD4Sfj1fRF+YG7jq q/my5WA1uCl3q2UgjFPK6DnUzc6LNz/UoO1Ylu8TAzcMFYjPp23io2o+4jJbIudkPir2 jH1wSVT2WH5OsBR9XsXYhNcGzHHpZfcvroTb7rzrbzkwah85tYE51B06VCkvMdPpDUcJ NBIzUTAsIkC6esgNu5Cgh70lidPgOT4ub/r4otZ/OiXqBZXj6kzJk1Cl3MmwdqA+SmS7 tTta2ESa9ZRJ2l1hqoewAQVJj/QcR2JqSGVz4hfg6HcLCM/r/3vpkBSiRj43+OXQw/lq Aaag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694703441; x=1695308241; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1gqkhvANInIWgDmOoOPJUCId3lz6JPHGNXOuOXwQD0U=; b=jvSdGYfDj1oOZiUiSACoixvinOBYrCjM+Dm0anW6oXp88BWdt0tqFPap0eb6uL7eLm 0E2WRVorpHTMLXDWmfCtM6V0esDSvtVNYx+eG22x5zk+JVv3siq7CJmyzBwSvRRC9agR LfmlLFHBUW/BunykwKwICzNi7LwP8ryvnvoUGxBL5MD8bI/PPbxEab6niobcxfWuWRKX gieI7BbiomjzIX2FNdBkxGN6OriFpquAkCTGITjG9DBot/VMRgOEjvsjPo/Vx6ADglSW UQOpenEsu2pbzJavNn9o8zj2K6l4TX1jX8tpxO5RAK7+/vkJQ6WxMYhKc4YuCudRULpR 1xqg== X-Gm-Message-State: AOJu0YyNqqrtnxVu6angTigio0XIHGkDe4LXdfinv94NnqhzqD+PUkg5 GJ5vsi0XlRZhCzDKTzlRrkFJ6nDg4VQ= X-Google-Smtp-Source: AGHT+IHSLICORFafw9BuEY1nMokrIyXeJugx5OEqDLKMY8O6saI+9vYKCLyW18Rzq5eC+iJwY4lGNA== X-Received: by 2002:a2e:9b4d:0:b0:2bc:ba71:ddf2 with SMTP id o13-20020a2e9b4d000000b002bcba71ddf2mr5298747ljj.15.1694703440811; Thu, 14 Sep 2023 07:57:20 -0700 (PDT) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH v1 17/29] xen/asm-generic: introduce stub header percpu.h Date: Thu, 14 Sep 2023 17:56:38 +0300 Message-ID: <521647680aa5010629ded799010c8f9e5d22cde3.1694702259.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 The patch introduces header stub necessry for full Xen build. Signed-off-by: Oleksii Kurochko --- xen/include/asm-generic/percpu.h | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 xen/include/asm-generic/percpu.h diff --git a/xen/include/asm-generic/percpu.h b/xen/include/asm-generic/percpu.h new file mode 100644 index 0000000000..d1069adb61 --- /dev/null +++ b/xen/include/asm-generic/percpu.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_GENERIC_PERCPU_H__ +#define __ASM_GENERIC_PERCPU_H__ + +#ifndef __ASSEMBLY__ + +#include + +extern char __per_cpu_start[], __per_cpu_data_end[]; +extern unsigned long __per_cpu_offset[NR_CPUS]; +void percpu_init_areas(void); + +#define per_cpu(var, cpu) \ + (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu])) + +#define this_cpu(var) \ + (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[get_processor_id()])) + +#define per_cpu_ptr(var, cpu) \ + (*RELOC_HIDE(var, __per_cpu_offset[cpu])) +#define this_cpu_ptr(var) \ + (*RELOC_HIDE(var, get_processor_id())) + +#endif + +#endif /* __ASM_GENERIC_PERCPU_H__ */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */