From nobody Sun May 19 03:02:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1707501683; cv=none; d=zohomail.com; s=zohoarc; b=F0vXOl6j/BBGXfdjKKtG9jb5RPwCtfqcx97/SpM95VH0/3TCgbxUKtDZ7m+5eBtzPlENOxHZj/uNqk/ytZtdi7he+FFTVo5xXe26kjGh5vq6AVqTL7wnaYzwTBVCBnjd/vqFmtJNjYh2cS/pLYilQL+5uOO468DDOlPVsb+S0io= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707501683; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8B0Pj3x9NNKyskGfWUDgYAd1f6cJ4ZaavTN0FBUQZB0=; b=cu75oaYGxwpQat0BVzzR9ZxFD13O31+H0Uho0MZU0f7b+iZyJSK6ukHgbT3JspTM2iGGHE6tsdFZGMf/hEfcB3U8i1zJ7yhLdQjedspUndc4ccHUJMHxZzGRLYNfgDZyqRVjPs/kNPTYOc6xG7AbI6S2xIdPOyenQVIoAdMp828= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1707501683658514.5528247317105; Fri, 9 Feb 2024 10:01:23 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.678781.1056301 (Exim 4.92) (envelope-from ) id 1rYVBK-0007Dd-CN; Fri, 09 Feb 2024 18:00:58 +0000 Received: by outflank-mailman (output) from mailman id 678781.1056301; Fri, 09 Feb 2024 18:00:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rYVBK-0007CX-5R; Fri, 09 Feb 2024 18:00:58 +0000 Received: by outflank-mailman (input) for mailman id 678781; Fri, 09 Feb 2024 18:00:57 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rYVBJ-0007AX-06 for xen-devel@lists.xenproject.org; Fri, 09 Feb 2024 18:00:57 +0000 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [2a00:1450:4864:20::530]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 2b4587ba-c775-11ee-98f5-efadbce2ee36; Fri, 09 Feb 2024 19:00:54 +0100 (CET) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-56001d49cc5so1574177a12.2 for ; Fri, 09 Feb 2024 10:00:54 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id fd1-20020a056402388100b00561103f29fbsm984503edb.75.2024.02.09.10.00.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 10:00:52 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 2b4587ba-c775-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707501653; x=1708106453; 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=8B0Pj3x9NNKyskGfWUDgYAd1f6cJ4ZaavTN0FBUQZB0=; b=hVJR1BqBFs+33LuACE+BtHluv4asgv0Ii/hfFeuXPieavH8xQ90r4/p7jQyitCAj6j 03CXLm5zD7s89cCV0UmwNP9XAtfx8ufnXnFC52nSBR30mFGn8m81whnEia/KVJiKduL8 f5rfYy4KSYx+G0m2bORWWEB8Y4uBgXv5LGt5FRvks+uKztwoKkt13nDoI3OyLBvqtFXQ yFAsFWVmouLEXwvIwTciPHBBVnAi5vIouo+bQ090GSzaU6QaNsO5TyLX90h2guN+65ym evHVe2C1N9wgVjknBhoQlHEHsbW2hRdHclGx7PKGLI79gJWEl3zYLMbq3/UBjTwi58kN +YNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707501653; x=1708106453; 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=8B0Pj3x9NNKyskGfWUDgYAd1f6cJ4ZaavTN0FBUQZB0=; b=nOu+JehDBDcdanz65c4oRk3obYkkzGhGTbf87JEfjjRO3nTPWNz4ftRe2R/QVtNNly MMDFoxhi8BnBx5Lb9XTek1ujAuEJe0H7gwxx08iW7O8m8fkN9IqKyQxhq+xrytjSUa78 eAXKkErcVxWrOxdIj+d8jpN1yBwaixhw2UmOhCo4vzezIiuVp7luORAmRDuZHmQRerrJ UryMZGRIEhCsTuvTyKKJpVNU04FKSDb1zIkfW5J4pS6ELruCPq0w3Jk8EjNe6sQLUFEB 1uI846sP4dbPxGR/xmKFYRdrFHW6FE5BohsyAskPDuYM8fizdbw4GWUyZCRKgrUfoVRD lBjw== X-Gm-Message-State: AOJu0YyD15moGf6cFDTKKjvXS2WAKpevQsSqRFrGXgXvOXOggeJJTdV0 dRE1MS2qzHEPpnI3sHe4e4Y/9hrDK7beNycWPcFfjwR5P9pjPCAWdlvxuVOy X-Google-Smtp-Source: AGHT+IG7YVXB7f4PptTAFpGa8e2Ebe1L2b/BYhzaG1OzjD3gFAhpsghcd0eV447A5hEkZZ+cTgF6yw== X-Received: by 2002:a05:6402:148a:b0:561:c35:dad7 with SMTP id e10-20020a056402148a00b005610c35dad7mr2005215edv.32.1707501653167; Fri, 09 Feb 2024 10:00:53 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVJq/ORgYEshu0agU36A7K2vaCtwYElOyG89uaAaZbIGprzWaCHQZSxuiaWXmvYNC53dDnvYqCoRA5D/DMmtg47GnJuanhYSEj3pySLOrY3r6CTI82SQ6TwgQ== From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Doug Goldstein , Stefano Stabellini Subject: [PATCH v8 1/7] automation: ensure values in EXTRA_FIXED_RANDCONFIG are separated by new line Date: Fri, 9 Feb 2024 19:00:43 +0100 Message-ID: <8b6f208f0b4327392cfddbfa6809117cc7686750.1707499278.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1707501685837100009 Content-Type: text/plain; charset="utf-8" Kconfig tool expects each configuration to be on a new line. The current version of the build script puts all of ${EXTRA_FIXED_RANDCONFI= G} in a single line and configs are seperated by spaces. As a result, only the first configuration in ${EXTRA_FIXED_RANDCONFIG} will be used. Signed-off-by: Oleksii Kurochko --- Changes in V8: - Nothing changed. Only rebase --- Changes in V7: - Nothing changed. Only rebase --- Changes in V6: - The patch was introduced in this version of patch series. --- automation/scripts/build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/automation/scripts/build b/automation/scripts/build index b3c71fb6fb..13b043923d 100755 --- a/automation/scripts/build +++ b/automation/scripts/build @@ -14,7 +14,7 @@ if [[ "${RANDCONFIG}" =3D=3D "y" ]]; then =20 # Append job-specific fixed configuration if [[ -n "${EXTRA_FIXED_RANDCONFIG}" ]]; then - echo "${EXTRA_FIXED_RANDCONFIG}" >> xen/tools/kconfig/allrandom.co= nfig + sed "s/ /\n/g" <<< "${EXTRA_FIXED_RANDCONFIG}" > xen/tools/kconfig= /allrandom.config fi =20 make -j$(nproc) -C xen KCONFIG_ALLCONFIG=3Dtools/kconfig/allrandom.con= fig randconfig @@ -28,9 +28,11 @@ else echo "CONFIG_DEBUG=3D${debug}" >> xen/.config =20 if [[ -n "${EXTRA_XEN_CONFIG}" ]]; then - echo "${EXTRA_XEN_CONFIG}" >> xen/.config + sed "s/ /\n/g" <<< "${EXTRA_XEN_CONFIG}" >> xen/.config fi =20 + cat xen/.config + make -j$(nproc) -C xen olddefconfig fi =20 --=20 2.43.0 From nobody Sun May 19 03:02:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1707501672; cv=none; d=zohomail.com; s=zohoarc; b=cK4Ft0MBtrVUCPBekAI9s8hLEwW/hgylK+Kc3R90qNfv0qk+qCkpsWm5tl6xWITBsxz08Dg9ZYhE5UxEjShrLv9sifAAxQs08xwFf4nj/tuw1GBrrNgj9Qyo8fOqidsQspDT1olIDiqIR6oEuKZ6G6PDRTZn0q0+PYni54Lw71U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707501672; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2FAxJg0gmB5DWDjQyTT6C98jISHS9vZdHw6mxETNKmo=; b=VIeFLAxGgA6lQ7/mbJMuN3Ima/l1rBg64bvTXyVknOPCCM+hphwV8PukHd6W+4QHUzzLUwlxBAEMO+BVaNDckMESolUELvs2eTtQrRyj5blKIzPv/DVebe1S+IHS31ngxUlBMdZKm+YXadhncajxmLvmrRaIa0o/mNU+Vx1bZs0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1707501672841680.9561593508354; Fri, 9 Feb 2024 10:01:12 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.678782.1056314 (Exim 4.92) (envelope-from ) id 1rYVBL-0007eL-Hp; Fri, 09 Feb 2024 18:00:59 +0000 Received: by outflank-mailman (output) from mailman id 678782.1056314; Fri, 09 Feb 2024 18:00:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rYVBL-0007eE-DJ; Fri, 09 Feb 2024 18:00:59 +0000 Received: by outflank-mailman (input) for mailman id 678782; Fri, 09 Feb 2024 18:00:57 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rYVBJ-0007AX-Nd for xen-devel@lists.xenproject.org; Fri, 09 Feb 2024 18:00:57 +0000 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [2a00:1450:4864:20::233]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 2c0f6149-c775-11ee-98f5-efadbce2ee36; Fri, 09 Feb 2024 19:00:56 +0100 (CET) Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2d066b82658so17478961fa.3 for ; Fri, 09 Feb 2024 10:00:56 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id fd1-20020a056402388100b00561103f29fbsm984503edb.75.2024.02.09.10.00.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 10:00:53 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 2c0f6149-c775-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707501655; x=1708106455; 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=2FAxJg0gmB5DWDjQyTT6C98jISHS9vZdHw6mxETNKmo=; b=E27mnS4bZ1BDoOq5d3Dg2Dc+ocZRlrmtvuoMKCToE/lbvm9r8W6BOGfH0UfZ49kbP5 sl1/h+hGtvdc6CDaDKaqDbaZ7NdPS3eb2w/LAZLERLgS8QSHceUV7XEAno39EbwWAz/Y oI4R9NWNQ28FsDVZpOP/8mda5dUzM3DY+IZ+8g3RyYQHOWSncXAJSWIQoF4C8XgShI1h sQNrf+QP83I7Od+xiwsJtBkQg1TCTX1Hxm/29Ut7C+kOCf7BRh4ea7EOUDwhtin9UW+N yjcMwvkD5R5VIj7ukMlA5fMQqzBGvQZw4ua5tq7jQdqAL3AYwUKNIBeWVykP9K87IYTd kaRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707501655; x=1708106455; 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=2FAxJg0gmB5DWDjQyTT6C98jISHS9vZdHw6mxETNKmo=; b=lZyKt/p0BxpuEU5RbmGQiFunTFlbUqlmOcm5xTxRbh9MTqAiWv0DS+luj4XzZC2tf3 EdgI3PZkG41olls/66mR5RAsCEZkvWKB3qhRFesogHRulX9pbM/uD3EqR+nFVXD6ak7C azJTTZUD8BsVNBeFLntZ/gOCphlpaIGecY0vpN4Uico9skKnaw3gw5mSZGJkOwkOQLk/ nZ+vHVKGQcKGViFiixWHtS3aokY7eaEMgyjHHlmxKBgDolNe4ccTyvt77UlKvGHfIhIy JAYzzU6IIZPoSBU+7E7V2ZyTWowFITkAKtIXGQvW9HpM5rXSGQH1/mxDVoHLpfrwhNqw z3LQ== X-Gm-Message-State: AOJu0Yxs9r2AlDunwz+Qoejf2pYADzzyc8+5DctKUFdoM7ibYzc2xJU/ 5Oc2UKfJQg38hLLQHF6E2A2pagT9oFeyuc6/RzCkMBZeiBmuzUsQzmLYObX5 X-Google-Smtp-Source: AGHT+IFbSuQHrFD+pCaWosSAT51WKM2wswg64lILWQSiNhb+QTAe+Zz7P5j3ad0mIicMH3BJdo6Qeg== X-Received: by 2002:a2e:9888:0:b0:2d0:a2ad:bb5 with SMTP id b8-20020a2e9888000000b002d0a2ad0bb5mr1691612ljj.44.1707501654857; Fri, 09 Feb 2024 10:00:54 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCU2UNPXe/bQPGqfYVR+SWxZqR7Zi8dQvlVA1YR82f6V8MlZ84d6/8d410wm+zJH0xq9zzODG8LCTm+bzx6fbU7UQQRCXjVZ0tDE/77AZUqwDTDa5nH/MhdxWA== From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Doug Goldstein , Stefano Stabellini Subject: [PATCH v8 2/7] automation: introduce fixed randconfig for RISC-V Date: Fri, 9 Feb 2024 19:00:44 +0100 Message-ID: <3f662e3b4ded36d982ff04ed5cdfdd8e36f83594.1707499278.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1707501673858100001 Content-Type: text/plain; charset="utf-8" This patch introduces the file riscv-fixed-randconfig.yaml, which includes all configurations that should be disabled for randconfig builds. Suggested-by: Stefano Stabellini Signed-off-by: Oleksii Kurochko --- The patch were introduced after discussion in a topic: https://lore.kernel.org/xen-devel/cover.1701966261.git.oleksii.kurochko@gm= ail.com/ --- Changes in V8: - Nothing changed. Only rebase --- Changes in V7: - Nothing changed. Only rebase --- Changes in V6: - The patch was introduced in this version of patch series. --- automation/gitlab-ci/build.yaml | 8 ++++---- automation/gitlab-ci/riscv-fixed-randconfig.yaml | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 automation/gitlab-ci/riscv-fixed-randconfig.yaml diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.y= aml index 6d2cb18b88..376eb17f9c 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -512,6 +512,8 @@ alpine-3.18-gcc-debug-arm64-boot-cpupools: CONFIG_BOOT_TIME_CPUPOOLS=3Dy =20 # RISC-V 64 cross-build +include: 'automation/gitlab-ci/riscv-fixed-randconfig.yaml' + archlinux-current-gcc-riscv64: extends: .gcc-riscv64-cross-build variables: @@ -532,8 +534,7 @@ archlinux-current-gcc-riscv64-randconfig: CONTAINER: archlinux:current-riscv64 KBUILD_DEFCONFIG: tiny64_defconfig RANDCONFIG: y - EXTRA_FIXED_RANDCONFIG: - CONFIG_COVERAGE=3Dn + EXTRA_FIXED_RANDCONFIG: !reference [.riscv-fixed-randconfig, variables= , EXTRA_FIXED_RANDCONFIG] =20 archlinux-current-gcc-riscv64-debug-randconfig: extends: .gcc-riscv64-cross-build-debug @@ -541,8 +542,7 @@ archlinux-current-gcc-riscv64-debug-randconfig: CONTAINER: archlinux:current-riscv64 KBUILD_DEFCONFIG: tiny64_defconfig RANDCONFIG: y - EXTRA_FIXED_RANDCONFIG: - CONFIG_COVERAGE=3Dn + EXTRA_FIXED_RANDCONFIG: !reference [.riscv-fixed-randconfig, variables= , EXTRA_FIXED_RANDCONFIG] =20 # Power cross-build debian-bullseye-gcc-ppc64le: diff --git a/automation/gitlab-ci/riscv-fixed-randconfig.yaml b/automation/= gitlab-ci/riscv-fixed-randconfig.yaml new file mode 100644 index 0000000000..f1282b40c9 --- /dev/null +++ b/automation/gitlab-ci/riscv-fixed-randconfig.yaml @@ -0,0 +1,7 @@ +.riscv-fixed-randconfig: + variables: + EXTRA_FIXED_RANDCONFIG: + CONFIG_COVERAGE=3Dn + CONFIG_EXPERT=3Dy + CONFIG_GRANT_TABLE=3Dn + CONFIG_MEM_ACCESS=3Dn --=20 2.43.0 From nobody Sun May 19 03:02:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1707501678; cv=none; d=zohomail.com; s=zohoarc; b=W2SpzkTcfleziRWpvxgxXKMCbhiNv51nOCj2JEAMGiqs0rkuag3WTWNba2Rf5tEkZyvsAFpqYrNKN+/H2TUxGFTFV5SsYXTnjWi5f9U371olbhGp8zdKqpuBXIRjoZmTn0JZXu5MhSoyQg+tBSr0KSj7D2oPMkSn8YqxRv646AU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707501678; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=dDTJW+iXXU/pmzqRlWGMRI2OkRV6YQ3UWt7y5c2dJ2o=; b=mqhZOJON4YBGZxxrIYnJiHTnPuimMYXYzQuSN1M+CmVbF4zq4fPhA5i8NdS7/qGvb9sj/wG8RpblJBefOx3qegRdKUKqFOXmd2hpUNfAo8tkU38/asBxX8I+swBjMvzSefCoxTboXOono/WnBAfOtLvcBIRhZtJnIQYm1ptNGvs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 170750167850932.28853518543008; Fri, 9 Feb 2024 10:01:18 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.678783.1056318 (Exim 4.92) (envelope-from ) id 1rYVBL-0007hx-SI; Fri, 09 Feb 2024 18:00:59 +0000 Received: by outflank-mailman (output) from mailman id 678783.1056318; Fri, 09 Feb 2024 18:00:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rYVBL-0007h7-Mf; Fri, 09 Feb 2024 18:00:59 +0000 Received: by outflank-mailman (input) for mailman id 678783; Fri, 09 Feb 2024 18:00:58 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rYVBK-0007AX-Nw for xen-devel@lists.xenproject.org; Fri, 09 Feb 2024 18:00:58 +0000 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [2a00:1450:4864:20::231]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 2c7e2771-c775-11ee-98f5-efadbce2ee36; Fri, 09 Feb 2024 19:00:56 +0100 (CET) Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2d0e20b7375so5703001fa.2 for ; Fri, 09 Feb 2024 10:00:56 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id fd1-20020a056402388100b00561103f29fbsm984503edb.75.2024.02.09.10.00.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 10:00:55 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 2c7e2771-c775-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707501656; x=1708106456; 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=dDTJW+iXXU/pmzqRlWGMRI2OkRV6YQ3UWt7y5c2dJ2o=; b=EIUakyFiLdSVq/sWfKoNBlnT7tFZchSqvfm2C7aEkZm3ki4EpOOlphHBBriNoXU9xq vUeQY21nqMsPeW3ZCSBR+ioBPMaD8jtati7RO1SX98q8DHH3F3nbmBZ43JXgUSHqTdPS A4Js4UHI4BLi0a72hMIze8jPxkFpLbgw3V4Zt+L+phOQKTjO8FE+RH8AiE18sSW061de 3y2UPa43y7dWK8LbNvzsJVeDq4Ye+GCVyRr+UXZO+DwslV3v0qIUhyNPz/ClnN2HXth7 /E2OaspXRfyriZ9O9WKzY3+ga8lfaUvO0ncOFC8CTIY2BENqRSQHQxSWtME9C4f0LJ54 wJ6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707501656; x=1708106456; 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=dDTJW+iXXU/pmzqRlWGMRI2OkRV6YQ3UWt7y5c2dJ2o=; b=YQMKYpEbLoPMTIB803B0X88CuAQsj6YRCxa0H6iiJ3kXo+Yzx8eISaBwZZi5qOUk3N EY/ecIuK3EYEe5xqJ+83wJRG569ykrqXfjfIklnGBp8VXgF8dPL0/JotA/48YWMu4fCY eprEPt2B8Mal78O6oA6bKAWHqF+KXEv4MbQ7gWijaT6j+QcCbtWh9VVhzfcdol3DRK0t Xi0Aw0sDO7kwaFX0XRi0gSRNBaBNtGcCF4xiqZUoBZCGwTcaRs9qD6835o8hGtVEWbHN 60TN7xhShRhzYd8PRWXWf5Bi0op4UGjb9xbK9YzD880ddTJImzRB9SknyhuE5cygoaIz hN3Q== X-Gm-Message-State: AOJu0YxfHzcGDflwiyXPDefhMDDudITX0agaXmsCVLu0PCqzjaeJkXKM 78thgR7jqiHTQFzQMfvYcjqTYUsi+DH/fPy+QspeBsZtAE5Wf3PPokhi1iBo X-Google-Smtp-Source: AGHT+IGFHZ+cyVVb2L4PXW3RObTBtjdUa76Y9tfpmFyQ15SpxFnJRcY7kMAciBx9g1Gmhpoh26N8PQ== X-Received: by 2002:a2e:9b58:0:b0:2d0:9fac:bdff with SMTP id o24-20020a2e9b58000000b002d09facbdffmr1844374ljj.38.1707501655965; Fri, 09 Feb 2024 10:00:55 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUUH3gne00j+NV48jUiaBFjkD6wtBIFi6UDcL+hC2C9BHR0akOBxRpJk06JaF27iQgDmJYSoKiw271l71n38cPcehtHkDw4GZeN4/o0UZoZgiwYUkuGOc1SUnN3Stf2IaofQtbDzaPYd7Y6ZxGgICYhuMNzD3aaqZunBY9mfvY5oAliHqO16bNb1OPdX+e7TGhlvcPybwopcD4QWABy7Bhpib587TZh5KdDOdHo7SdTczil7JdsBtxzu58zcRsIzI2g5DZ4wsIUkg9MEwRiyRPbMDbRp/gKsuRTF0EMutMoCI6PGIoytQXrveu/NZc+Fle8nnXLnZbXbVJb+8GauwM48vLahZ/f5CmoNpnodJ2mPnnzlgziBc9jr0hYXijxMvOi From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Tamas K Lengyel , Alexandru Isaila , Petre Pircalabu , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Shawn Anastasio , Jan Beulich Subject: [PATCH v8 3/7] xen/asm-generic: introduce stub header monitor.h Date: Fri, 9 Feb 2024 19:00:45 +0100 Message-ID: <84568b0c24a5ec96244f3f34537e9a148367facf.1707499278.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1707501680008100001 Content-Type: text/plain; charset="utf-8" The header is shared between several archs so it is moved to asm-generic. Switch partly Arm and PPC to asm-generic/monitor.h and only arch_monitor_get_capabilities() left in arch-specific/monitor.h. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich Acked-by: Tamas K Lengyel Acked-by: Julien Grall --- Changes in V8: - Add Acked-by: Tamas K Lengyel --- Changes in V7: - Drop definition of arch_monitor_domctl_event for PPC. - define arch_monitor_domctl_event in asm-generic/monitor.h. - add "define HAS_ARCH_MONITOR_DOMCTL_EVENT" in arm/.../monitor.h as it ha= s arch specific implementation. --- Changes in V6: - Rebase only. --- Changes in V5: - Switched partly Arm and PPC to asm-generic monitor.h only arch_monitor_get_capabilities() left in arch-specific/monitor.h. - Updated the commit message. --- Changes in V4: - Removed the double blank line. - Added Acked-by: Jan Beulich . - Update the commit message --- Changes in V3: - Use forward-declaration of struct domain instead of " #include ". - Add ' include ' - Drop PPC's monitor.h. --- Changes in V2: - remove inclusion of "+#include " - add "struct xen_domctl_monitor_op;" - remove one of SPDX tags. --- xen/arch/arm/include/asm/monitor.h | 25 +----------- xen/arch/ppc/include/asm/monitor.h | 28 +------------ xen/arch/ppc/stubs.c | 8 ---- xen/include/asm-generic/monitor.h | 64 ++++++++++++++++++++++++++++++ 4 files changed, 67 insertions(+), 58 deletions(-) create mode 100644 xen/include/asm-generic/monitor.h diff --git a/xen/arch/arm/include/asm/monitor.h b/xen/arch/arm/include/asm/= monitor.h index 7567be66bd..77a3c1a36c 100644 --- a/xen/arch/arm/include/asm/monitor.h +++ b/xen/arch/arm/include/asm/monitor.h @@ -25,34 +25,13 @@ #include #include =20 -static inline -void arch_monitor_allow_userspace(struct domain *d, bool allow_userspace) -{ -} +#define HAS_ARCH_MONITOR_DOMCTL_EVENT =20 -static inline -int arch_monitor_domctl_op(struct domain *d, struct xen_domctl_monitor_op = *mop) -{ - /* No arch-specific monitor ops on ARM. */ - return -EOPNOTSUPP; -} +#include =20 int arch_monitor_domctl_event(struct domain *d, struct xen_domctl_monitor_op *mop); =20 -static inline -int arch_monitor_init_domain(struct domain *d) -{ - /* No arch-specific domain initialization on ARM. */ - return 0; -} - -static inline -void arch_monitor_cleanup_domain(struct domain *d) -{ - /* No arch-specific domain cleanup on ARM. */ -} - static inline uint32_t arch_monitor_get_capabilities(struct domain *d) { uint32_t capabilities =3D 0; diff --git a/xen/arch/ppc/include/asm/monitor.h b/xen/arch/ppc/include/asm/= monitor.h index e5b0282bf1..89000dacc6 100644 --- a/xen/arch/ppc/include/asm/monitor.h +++ b/xen/arch/ppc/include/asm/monitor.h @@ -6,33 +6,7 @@ #include #include =20 -static inline -void arch_monitor_allow_userspace(struct domain *d, bool allow_userspace) -{ -} - -static inline -int arch_monitor_domctl_op(struct domain *d, struct xen_domctl_monitor_op = *mop) -{ - /* No arch-specific monitor ops on PPC. */ - return -EOPNOTSUPP; -} - -int arch_monitor_domctl_event(struct domain *d, - struct xen_domctl_monitor_op *mop); - -static inline -int arch_monitor_init_domain(struct domain *d) -{ - /* No arch-specific domain initialization on PPC. */ - return 0; -} - -static inline -void arch_monitor_cleanup_domain(struct domain *d) -{ - /* No arch-specific domain cleanup on PPC. */ -} +#include =20 static inline uint32_t arch_monitor_get_capabilities(struct domain *d) { diff --git a/xen/arch/ppc/stubs.c b/xen/arch/ppc/stubs.c index a96e45626d..da193839bd 100644 --- a/xen/arch/ppc/stubs.c +++ b/xen/arch/ppc/stubs.c @@ -95,14 +95,6 @@ void arch_get_domain_info(const struct domain *d, BUG_ON("unimplemented"); } =20 -/* monitor.c */ - -int arch_monitor_domctl_event(struct domain *d, - struct xen_domctl_monitor_op *mop) -{ - BUG_ON("unimplemented"); -} - /* smp.c */ =20 void arch_flush_tlb_mask(const cpumask_t *mask) diff --git a/xen/include/asm-generic/monitor.h b/xen/include/asm-generic/mo= nitor.h new file mode 100644 index 0000000000..1ade289099 --- /dev/null +++ b/xen/include/asm-generic/monitor.h @@ -0,0 +1,64 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * include/asm-generic/monitor.h + * + * Arch-specific monitor_op domctl handler. + * + * Copyright (c) 2015 Tamas K Lengyel (tamas@tklengyel.com) + * Copyright (c) 2016, Bitdefender S.R.L. + * + */ + +#ifndef __ASM_GENERIC_MONITOR_H__ +#define __ASM_GENERIC_MONITOR_H__ + +#include +#include + +struct domain; +struct xen_domctl_monitor_op; + +static inline +void arch_monitor_allow_userspace(struct domain *d, bool allow_userspace) +{ +} + +static inline +int arch_monitor_domctl_op(struct domain *d, struct xen_domctl_monitor_op = *mop) +{ + /* No arch-specific monitor ops on GENERIC. */ + return -EOPNOTSUPP; +} + +#ifndef HAS_ARCH_MONITOR_DOMCTL_EVENT +static inline +int arch_monitor_domctl_event(struct domain *d, + struct xen_domctl_monitor_op *mop) +{ + BUG_ON("unimplemented"); +} +#endif + +static inline +int arch_monitor_init_domain(struct domain *d) +{ + /* No arch-specific domain initialization on GENERIC. */ + return 0; +} + +static inline +void arch_monitor_cleanup_domain(struct domain *d) +{ + /* No arch-specific domain cleanup on GENERIC. */ +} + +#endif /* __ASM_GENERIC_MONITOR_H__ */ + +/* + * Local variables: + * mode: C + * c-file-style: BSD + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ --=20 2.43.0 From nobody Sun May 19 03:02:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1707501680; cv=none; d=zohomail.com; s=zohoarc; b=ZfV4KFJeUHbwkW1ITdzHB5/NeKruMpCw0XUcjQ7H9wDL6OppmDZW1AmG12b+GLBJ78hDX6tlvPBFV/nVOs0YHWqzoogtFbddNrxxM0Fqj5MSIIBcjOX/b8VvnTPPBoJFn53a4ciGbJYHouq+agArmBbUjR/d46OjoA6Q09Hhu0Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707501680; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=enFGeu4zcdTjkPATANnCevJL8MNitOguXGYXr6w8aDE=; b=NUV2EPlCSqkt8+vBvgF561BECErAtfewFuo7rLIYfLf9YGUFrWwsaTjT3bCFGDSZBtATLr1bOPxK6NJqn0VMAu/+dkRrnYkutqPtQlAlmZWDbeP5grxMeBaVYviXvCQk2mpQmyl4XRviL8+M7FOJa9HCmnfOYv1Trcm3tNKSUMU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 170750168016474.73523441012708; Fri, 9 Feb 2024 10:01:20 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.678784.1056326 (Exim 4.92) (envelope-from ) id 1rYVBM-0007rJ-Cj; Fri, 09 Feb 2024 18:01:00 +0000 Received: by outflank-mailman (output) from mailman id 678784.1056326; Fri, 09 Feb 2024 18:01:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rYVBM-0007mT-32; Fri, 09 Feb 2024 18:01:00 +0000 Received: by outflank-mailman (input) for mailman id 678784; Fri, 09 Feb 2024 18:00:59 +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 1rYVBL-0007U9-6Q for xen-devel@lists.xenproject.org; Fri, 09 Feb 2024 18:00:59 +0000 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [2a00:1450:4864:20::531]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 2d6343f5-c775-11ee-8a4b-1f161083a0e0; Fri, 09 Feb 2024 19:00:58 +0100 (CET) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-561519f8698so603693a12.0 for ; Fri, 09 Feb 2024 10:00:58 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id fd1-20020a056402388100b00561103f29fbsm984503edb.75.2024.02.09.10.00.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 10:00:56 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 2d6343f5-c775-11ee-8a4b-1f161083a0e0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707501657; x=1708106457; 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=enFGeu4zcdTjkPATANnCevJL8MNitOguXGYXr6w8aDE=; b=lWzkJE1/eBHbrk0JVrrYzlB1xrw/XxdQapp+y5EQvqxEd0mAf8LG3A8FS2kgfG5Cgl bnL+Dsetmn+1YXbRYTbDAQWaSYGryAkS16pNiTi8tihKp3pdAwFI+B6x5GW5Ohk+k5AD roOZqBJJJ/CcGs+P2BcT8A1Wz+wm2Gb6bdQfOd9Mkk9NHAufGmEsMwxp6x9cm187haQ3 Oqpi9Xw+M+mDdTsIAxgVAPUQZSPs6M/D0z0XeV7MpeDk2+1f9dSbDd0WRhAXsffUUFaA r1UBZzirKlpQ3ASTZW8P2f7Z4aTvpFDsPcvi67P2hOesghVDfavvfe83n7rp1txlFdDD cPcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707501657; x=1708106457; 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=enFGeu4zcdTjkPATANnCevJL8MNitOguXGYXr6w8aDE=; b=OOE7/phfUcHi4HBqoS5K4AePa7q2ndB/1Bkv5M3RLP0OsRP/NcJcFw6lRFuMiaztY8 ZuTs64A5NuqJNl7AoSBj+S1Ce4aEK2+UuvMVmmw0o7t6EdmIJrwXBDKVoq14azlHM6g0 mjmgMeia+gWwYpYVht8k4FifJKz4VakdWkGwKfKk4F15kE+Kuy04pdqwsSiBisw6mNWe dVITSgohStnCxA3XYYbORbg2GOTIal7tY9NchKZc06ETSg8q8ZhbziJwdzI/N/Fq+R1w G1g1PlvuT4rUe82vVBXZkniz1ZZdttTFwwwDu/xUn08RoRBJ4bZChKnWAqEN2WKO4BPe IQ4w== X-Gm-Message-State: AOJu0Ywfj0md9IaZeQEN5DJIrLArrYqo++/KRgCgi2YdqCU2tqBef2oo RG+SKKKWWnvixQOYh8ZvH9IhSMlAkDcRkx+JeghWm/lY/FhHUus/WKp6p6fY X-Google-Smtp-Source: AGHT+IFYFhz9toHU1yUGZQf/W/6R7wMN3qe/PwM2zpmugwrVd6BkNnTFjWyNy6TK0+lm/sJAdQDYyw== X-Received: by 2002:aa7:d4d5:0:b0:560:269c:214f with SMTP id t21-20020aa7d4d5000000b00560269c214fmr2020823edr.19.1707501657084; Fri, 09 Feb 2024 10:00:57 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCW020EtyrHen7sM4ysquTcqWN2lu/YXqgBtqrhn12PZMbnUApXKGPJoyceKy8+JP5xggN32sxpKIJEa2WEjmkXghB8tQrmvNfk97NjuvDlc9sUsFrW5TqpIekjRRltkgJANojZC+d/M8AFo7eCqEP5CwWt9BJSswaDSGtiy7ZxV6eHW8XMYJzlw5Y+K29XngggJQlay437ulOOnMxbnPqZt7N6NgIWwAq7MJqo7tBZBy7VjXwYOlB0h8pepc391WS6ErYNyBZkaDkquAGt6bYOm21mabVakYwSLfGsrz+2/z/8K776zOaf2+BZPDZvwlHGr+uyyVcGC83tTnSxGxPVKHCp3mphuyUm1Ikiu8OQyQG//CtSndxmzts1LTJUJh1lcpCvATu4zNFESpWU/d54AB99fnRbwPZk/1Dhc68hDUChAvrKotRg4xBzyjmEm0tzNZHarxgMGXm7tz6BIur6wxNng4O+2Qv8JMpY= From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Shawn Anastasio , Tamas K Lengyel , Alexandru Isaila , Petre Pircalabu , Alistair Francis , Bob Eshleman , Connor Davis , Jan Beulich Subject: [PATCH v8 4/7] xen/asm-generic: ifdef inclusion of Date: Fri, 9 Feb 2024 19:00:46 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1707501681886100003 Content-Type: text/plain; charset="utf-8" ifdefing inclusion of in allows to avoid generation of empty header for the case when !CONFIG_MEM_ACCESS. For Arm it was explicitly added inclusion of for p2m.c and traps.c because they require some functions from whi= ch aren't available in case of !CONFIG_MEM_ACCESS. Suggested-by: Jan Beulich Signed-off-by: Oleksii Kurochko Acked-by: Tamas K Lengyel Acked-by: Julien Grall --- Changes in V8: - Add Acked-by: Tamas K Lengyel --- Changes in V7: - Nothing changed. Only rebase --- Changes in V6: - Remove the way how CONFIG_MEM_ACCESS is disabled for PPC and RISC-V. - Disable the config in ppc64_defconfig and tiny64_defconfig (RISC-V). --- Changes in V5: - Added dependencies for "Config MEM_ACCESS" to be sure that randconfig wi= ll not turn on the config. --- Changes in V4: - Nothing changed. Only rebase. --- Changes in V3: - Remove unnecessary comment. --- xen/arch/arm/p2m.c | 1 + xen/arch/arm/traps.c | 1 + xen/arch/ppc/configs/ppc64_defconfig | 1 + xen/arch/ppc/include/asm/mem_access.h | 5 ----- xen/arch/riscv/configs/tiny64_defconfig | 1 + xen/include/xen/mem_access.h | 2 ++ 6 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 xen/arch/ppc/include/asm/mem_access.h diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index b991b76ce4..2465c266e9 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include =20 diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 9c10e8f78c..8ddca643d4 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/arch/ppc/configs/ppc64_defconfig b/xen/arch/ppc/configs/pp= c64_defconfig index f7cc075e45..48a053237a 100644 --- a/xen/arch/ppc/configs/ppc64_defconfig +++ b/xen/arch/ppc/configs/ppc64_defconfig @@ -6,6 +6,7 @@ # CONFIG_HYPFS is not set # CONFIG_GRANT_TABLE is not set # CONFIG_SPECULATIVE_HARDEN_ARRAY is not set +# CONFIG_MEM_ACCESS is not set =20 CONFIG_PPC64=3Dy CONFIG_DEBUG=3Dy diff --git a/xen/arch/ppc/include/asm/mem_access.h b/xen/arch/ppc/include/a= sm/mem_access.h deleted file mode 100644 index e7986dfdbd..0000000000 --- a/xen/arch/ppc/include/asm/mem_access.h +++ /dev/null @@ -1,5 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ASM_PPC_MEM_ACCESS_H__ -#define __ASM_PPC_MEM_ACCESS_H__ - -#endif /* __ASM_PPC_MEM_ACCESS_H__ */ diff --git a/xen/arch/riscv/configs/tiny64_defconfig b/xen/arch/riscv/confi= gs/tiny64_defconfig index 3c9a2ff941..09defe236b 100644 --- a/xen/arch/riscv/configs/tiny64_defconfig +++ b/xen/arch/riscv/configs/tiny64_defconfig @@ -6,6 +6,7 @@ # CONFIG_HYPFS is not set # CONFIG_GRANT_TABLE is not set # CONFIG_SPECULATIVE_HARDEN_ARRAY is not set +# CONFIG_MEM_ACCESS is not set =20 CONFIG_RISCV_64=3Dy CONFIG_DEBUG=3Dy diff --git a/xen/include/xen/mem_access.h b/xen/include/xen/mem_access.h index 4e4811680d..87d93b31f6 100644 --- a/xen/include/xen/mem_access.h +++ b/xen/include/xen/mem_access.h @@ -33,7 +33,9 @@ */ struct vm_event_st; =20 +#ifdef CONFIG_MEM_ACCESS #include +#endif =20 /* * Additional access types, which are used to further restrict --=20 2.43.0 From nobody Sun May 19 03:02:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1707501689; cv=none; d=zohomail.com; s=zohoarc; b=Ax3PYpi1asUrVBP32FrMvI/nJtwZPABCjcR6XRcJ1c/VdP7suf9hGUrEl3LnnRy+y3OuGAM4UiFqlsS94bZ5ccEqoGnbrvsJSnygQfQBy4dbXROjxMOx3ZLODFHOrUABfM/re3cTOI8l7QLG3yzFcVirxvfWfgwIaf5B/EYZOyc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707501689; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=vOVmqMl/hPpGvSwcX+N7nK/RY+xiJRv2+tQc7IlhjtY=; b=huc/g9SrcMTPeLqy52pP1yW3p4Dyldz7RezlJ/MPfKtv6HPacl+wi+9u5IeGEPOpJl6AhqenFZpCa2fu2KOMPKgt0/sDGi0fofJMIQQJpHEqLyBlJNVWx1GVJeJzXxXDbXuX14ozVbR0zhMR0fxF3L9J5xYgNlMR+tM2e2b0e3U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1707501689301425.59704915968484; Fri, 9 Feb 2024 10:01:29 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.678785.1056343 (Exim 4.92) (envelope-from ) id 1rYVBN-0008O3-U8; Fri, 09 Feb 2024 18:01:01 +0000 Received: by outflank-mailman (output) from mailman id 678785.1056343; Fri, 09 Feb 2024 18:01:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rYVBN-0008Nq-QM; Fri, 09 Feb 2024 18:01:01 +0000 Received: by outflank-mailman (input) for mailman id 678785; Fri, 09 Feb 2024 18:01:00 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rYVBM-0007AX-Nh for xen-devel@lists.xenproject.org; Fri, 09 Feb 2024 18:01:00 +0000 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [2a00:1450:4864:20::531]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 2ddff2de-c775-11ee-98f5-efadbce2ee36; Fri, 09 Feb 2024 19:00:59 +0100 (CET) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-55a5e7fa471so1616253a12.1 for ; Fri, 09 Feb 2024 10:00:59 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id fd1-20020a056402388100b00561103f29fbsm984503edb.75.2024.02.09.10.00.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 10:00:57 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 2ddff2de-c775-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707501658; x=1708106458; 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=vOVmqMl/hPpGvSwcX+N7nK/RY+xiJRv2+tQc7IlhjtY=; b=Idrm/AYIkfpGgJW6TYYHdiw/pDE3ZYx0GrWFGdULZyEfk9nLF5hhkl9EAK/prfXFQm hMcB1X/GPV7CqTmIpndbaPL5qRcyISWW0UaxaAUcHh63drVZpf4yd312kGnY2iZM7v8x sw4CpKNl4cH2f6iEQ4m54AdMEbx4KD5QmmYjVw8qGTllQFHzivUtk6L7BSofHP3atlzX tzc8Tz0Zmj8OUtrm/jEFR8vF60N4hZ/XWenS2yKET5N19P826V6jVlg6QfM6GcC3rZUp AJ+dZGpPT7803us1XDg3jRTsu0jkaLllxt8C6/hsS02Wr9Vr2inJx+XEr8mjrbZn3ftR DpOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707501658; x=1708106458; 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=vOVmqMl/hPpGvSwcX+N7nK/RY+xiJRv2+tQc7IlhjtY=; b=W6g5Jv3ysciWJEAvNxq3SMYW0zgsDuDq3Q8VwDk65yCUtp7ZWetQhItx0+pqDGhGhm VR4zWFFePWAx5YPX4TGMgppjYh5Z3UGMI5ERg7LBXcz2T+DsHleGgzZWVjoXOPMJqYgW ZqXtBw+IPo5Qke56At6ynIsUbYGE7lE/7KctuNFp6rDjwe3FndfT7NHt+6b0A2ehOkax /R5ETEq6gRnj7PZcd9ElAVnAzIPku3DGASSrtZRQXABFrtJdc3kLFhL/Z65lp3dM1rOV /gopH4hNcNH/ToIoqoG0PGBrVFU4tTmxyqFQ5iCSRYxdEnYf7YOH84wK3MABj2exQGAa bRJQ== X-Gm-Message-State: AOJu0YyEymcsMQ+zsqv85zEj1PeycLBOoY7h6t+rfM8O/BvT6tU4m+2n FQ+oU4FN7AQ/B8z2hcuLNy40VZf+ui37wNKyKtiC6ZHn/kzPM0hIhRp32WG7 X-Google-Smtp-Source: AGHT+IGZNhtlYMhLN+J3mwCuT+VlPUB2Wjdy1BQurwwsaXJBlp4ljXSYf5RPXU8CDNNMBxOHwgV+6g== X-Received: by 2002:a05:6402:784:b0:55f:ec52:73c4 with SMTP id d4-20020a056402078400b0055fec5273c4mr1966265edy.34.1707501658375; Fri, 09 Feb 2024 10:00:58 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXNBSTd3EyIu7gvwXGI3lavhZQHbrnmmpBNhyJw51rTjTslLUNeFbc8AGpni/IrW6EYgoT3AAP/JdD4/bZDkBci240carThCRmd4TrdB3kel+XrUwUAf/XI1l8uqTU4zV18I2qh1txcoAMFDHm2t5I0xn5+OTdXOLtgqDKa4GgaHgAXm4XNlegFjZeIbDGUJT+VL4TNHGt7Cm+kGKlsSK3q/RQ183fHfNMcFw== 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 v8 5/7] xen/asm-generic: introduce generic device.h Date: Fri, 9 Feb 2024 19:00:47 +0100 Message-ID: <4ecb5e5f4a1dbf585ac7a9ebe40b5fd8e4709182.1707499278.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1707501691246100001 Content-Type: text/plain; charset="utf-8" Arm, PPC and RISC-V introduce the same things in asm/device.h, so generic device.h was introduced. Arm's device.h was taken as a base with the following changes: - #ifdef ACPI related things. - Rename #ifdef guards. - Add SPDX tag. - #ifdef CONFIG_HAS_DEVICE_TREE related things. - #ifdef-ing iommu related things with CONFIG_HAS_PASSTHROUGH. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V8: - drop #ifdef HAS_PCI around DEV_PCI in enum device_type to be consistent = with DEVICE_PCI_HOSTBRIDGE - drop the comment above enum device_type, after DEV_PCI is alaways presen= t in enum device_type, so there is no need anymore in comment and DEV_TYPE_MAX. - drop #ifdef HAS_PCI around dev_is_pci() as DEV_PCI is alwayds define now. - rename args _name, _namestr, _class to name, namestr, class. - drop unnessary backslash after .class =3D class in defines ACPI_DEVICE_S= TART() and DT_DEVICE_START() - update the commit message=20 --- Changes in V7: - keeping DEVICE_PCI_HOSTBRIDGE available for every build based on the rep= ly: https://lore.kernel.org/xen-devel/926a5c12-7f02-42ec-92a8-1c82d060c710@= xen.org/ - add comment above enum device_type.h with explanation about DEV_TYPE_MAX= . =20 - separate patch "[PATCH v6 9/9] xen/asm-generic: introduce generic devic= e.h" into 3 patches. --- Changes in V6: - Rebase only. --- Changes in V5: - Removed generated file: xen/include/headers++.chk.new - Removed pointless #ifdef CONFIG_HAS_DEVICE_TREE ... #endif for PPC as CONFIG_HAS_DEVICE_TREE will be always used for PPC. --- Changes in V4: - Updated the commit message - Switched Arm and PPC to asm-generic version of device.h - Replaced HAS_PCI with CONFIG_HAS_PCI - ifdef-ing iommu filed of dev_archdata struct with CONFIG_HAS_PASSTHROUGH - ifdef-ing iommu_fwspec of device struct with CONFIG_HAS_PASSTHROUGH - ifdef-ing DT related things with CONFIG_HAS_DEVICE_TREE - Updated the commit message ( remove a note with question about if device.h should be in asm-generic or not ) - Replaced DEVICE_IC with DEVICE_INTERRUPT_CONTROLLER - Rationalized usage of CONFIG_HAS_* in device.h - Fixed indents for ACPI_DEVICE_START and ACPI_DEVICE_END --- Changes in V3: - ifdef device tree related things. - update the commit message --- Changes in V2: - take ( as common ) device.h from Arm as PPC and RISC-V use it as a base. - #ifdef PCI related things. - #ifdef ACPI related things. - rename DEVICE_GIC to DEVIC_IC. - rename #ifdef guards. - switch Arm and PPC to generic device.h - add SPDX tag - update the commit message --- xen/include/asm-generic/device.h | 149 +++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 xen/include/asm-generic/device.h diff --git a/xen/include/asm-generic/device.h b/xen/include/asm-generic/dev= ice.h new file mode 100644 index 0000000000..6e56658271 --- /dev/null +++ b/xen/include/asm-generic/device.h @@ -0,0 +1,149 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_GENERIC_DEVICE_H__ +#define __ASM_GENERIC_DEVICE_H__ + +#include + +enum device_type +{ +#ifdef CONFIG_HAS_DEVICE_TREE + DEV_DT, +#endif + DEV_PCI +}; + +enum device_class +{ + DEVICE_SERIAL, + DEVICE_IOMMU, + DEVICE_INTERRUPT_CONTROLLER, + DEVICE_PCI_HOSTBRIDGE, + /* Use for error */ + DEVICE_UNKNOWN, +}; + +struct dev_archdata { +#ifdef CONFIG_HAS_PASSTHROUGH + void *iommu; /* IOMMU private data */ +#endif +}; + +/* struct device - The basic device structure */ +struct device +{ + enum device_type type; +#ifdef CONFIG_HAS_DEVICE_TREE + struct dt_device_node *of_node; /* Used by drivers imported from Linux= */ +#endif + struct dev_archdata archdata; +#ifdef CONFIG_HAS_PASSTHROUGH + struct iommu_fwspec *iommu_fwspec; /* per-device IOMMU instance data */ +#endif +}; + +typedef struct device device_t; + +#ifdef CONFIG_HAS_DEVICE_TREE + +#include + +#define dev_is_dt(dev) ((dev)->type =3D=3D DEV_DT) + +/** + * device_init - Initialize a device + * @dev: device to initialize + * @class: class of the device (serial, network...) + * @data: specific data for initializing the device + * + * Return 0 on success. + */ +int device_init(struct dt_device_node *dev, enum device_class class, + const void *data); + +/** + * device_get_type - Get the type of the device + * @dev: device to match + * + * Return the device type on success or DEVICE_ANY on failure + */ +enum device_class device_get_class(const struct dt_device_node *dev); + +#define DT_DEVICE_START(name_, namestr_, class_) \ +static const struct device_desc __dev_desc_##name_ __used \ +__section(".dev.info") =3D { \ + .name =3D namestr_, \ + .class =3D class_, + +#define DT_DEVICE_END \ +}; + +#else /* !CONFIG_HAS_DEVICE_TREE */ +#define dev_is_dt(dev) ((void)(dev), false) +#endif /* CONFIG_HAS_DEVICE_TREE */ + +#define dev_is_pci(dev) ((dev)->type =3D=3D DEV_PCI) + +struct device_desc { + /* Device name */ + const char *name; + /* Device class */ + enum device_class class; + +#ifdef CONFIG_HAS_DEVICE_TREE + + /* List of devices supported by this driver */ + const struct dt_device_match *dt_match; + /* + * Device initialization. + * + * -EAGAIN is used to indicate that device probing is deferred. + */ + int (*init)(struct dt_device_node *dev, const void *data); + +#endif +}; + +#ifdef CONFIG_ACPI + +struct acpi_device_desc { + /* Device name */ + const char *name; + /* Device class */ + enum device_class class; + /* type of device supported by the driver */ + const int class_type; + /* Device initialization */ + int (*init)(const void *data); +}; + +/** + * acpi_device_init - Initialize a device + * @class: class of the device (serial, network...) + * @data: specific data for initializing the device + * + * Return 0 on success. + */ +int acpi_device_init(enum device_class class, + const void *data, int class_type); + +#define ACPI_DEVICE_START(name_, namestr_, class_) \ +static const struct acpi_device_desc __dev_desc_##name_ __used \ +__section(".adev.info") =3D { \ + .name =3D namestr_, \ + .class =3D class_, + +#define ACPI_DEVICE_END \ +}; + +#endif /* CONFIG_ACPI */ + +#endif /* __ASM_GENERIC_DEVICE_H__ */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ --=20 2.43.0 From nobody Sun May 19 03:02:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1707501683; cv=none; d=zohomail.com; s=zohoarc; b=UE5GHtwsBu5kYKfZ8FsoDM98yh7A25uzVfviDkivmybE1yd9EojsqtNezU7LCtWdMPMH1eCuaFAmFd7kx82yucBZLs0ltjK+9pmNaZ5jc9qCJn+7wy8UiZgOdDacY10Y9JGVYs3T8pmaeC6VNaMEe9CiKS7K5/dewvq9paeEYy8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707501683; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=JZxnCL12H+ZDFR5vLYR2Fa8H1VelnALrYXWhEz3aNg4=; b=FrR1Oztgk0LPkN8pVW/8RdFNYje4CVjI1zSaj/Cj42Ms+EUsV7S5o+QU5B1Hmzoq7lE13pyDg3KNrjw+s6TZkNB9vUjtM22qZX06gQxymP5JPswHkRBq1INdtSHVt435eS8bg+CATpXNHm+y/EEqzY+raH+1fHMYuOxRJ72a5C0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1707501683139193.49247343724085; Fri, 9 Feb 2024 10:01:23 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.678786.1056350 (Exim 4.92) (envelope-from ) id 1rYVBO-0008UO-Fa; Fri, 09 Feb 2024 18:01:02 +0000 Received: by outflank-mailman (output) from mailman id 678786.1056350; Fri, 09 Feb 2024 18:01:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rYVBO-0008Sa-7q; Fri, 09 Feb 2024 18:01:02 +0000 Received: by outflank-mailman (input) for mailman id 678786; Fri, 09 Feb 2024 18:01:01 +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 1rYVBN-0007U9-6o for xen-devel@lists.xenproject.org; Fri, 09 Feb 2024 18:01:01 +0000 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [2a00:1450:4864:20::535]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 2eb5f52c-c775-11ee-8a4b-1f161083a0e0; Fri, 09 Feb 2024 19:01:00 +0100 (CET) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-560c696ccffso4008420a12.1 for ; Fri, 09 Feb 2024 10:01:00 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id fd1-20020a056402388100b00561103f29fbsm984503edb.75.2024.02.09.10.00.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 10:00:58 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 2eb5f52c-c775-11ee-8a4b-1f161083a0e0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707501659; x=1708106459; 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=JZxnCL12H+ZDFR5vLYR2Fa8H1VelnALrYXWhEz3aNg4=; b=N6FuLSU318UjDePVp4JLJu6GT/2hhh2apCe9NgTUVd0UjSSudeJCfua2CmdNr6i1ch KbXvwj1AQgetQUCZkDAG0klJPSLbe8VMkQ6PyRSLsOKXaETFsSWwyqWud3cfWwlyLZuA yZRlpScPN+VG7oFyycYizcKA91Tu3Jk5BJPMt2vgbitE7DStTNOMYDcvHUZgUjh26z18 GwNoPG7f+G3oswwoDeCv82z2/3ldrNLRN1XddFc3BjYMQ8BcfcuQnt4DJO9MWVTN7CFk yNf5C+jlXAoxu5BWvTiCDpM9hJvv3ltpUPhwrdmd4xEvWfGtGxg1AKCjTYymAxX5miX9 DKVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707501659; x=1708106459; 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=JZxnCL12H+ZDFR5vLYR2Fa8H1VelnALrYXWhEz3aNg4=; b=qr09f4NVEjrYHmIqZvZ2iN+1MVhK4Lo5avln1cMJHYEWxJjcSWLBWQ+pQnEdAaB0bm zYZGEAF4Ac8EBP9T2P28Gr6v1ZBnnqNDGkxDWoFGCRAxLCTYVbVGvc5ZvU2c1hmAcddp JeI9IoSx663gtNV4qZx1zHUopGR+7ipq2CD/8NsVNzkpinkd+mkWYfiy6hU6M/k1TwxE x4UtznmAYZexqxLIsVwVDCifc+6MWgzWTYWKITjmltsh36KqVdXE7M/DwdqKnKUuiE4u FMWYlP64UmUUexR/kwohMvHRwf4RiJEY/51ZNjH2y9V//jFtSZyy76Ug6e8tcKpaH5Dx V5CQ== X-Gm-Message-State: AOJu0YzZ7dMbn/YW4bSZY2D6NBTvFSvNKJvnAwaBZCM2frRLB+wG9L0J Aq95o79W/fuqcz/LGXD/mnyznr9GYBsUoohg4+3EJ3BR9UKUK+1HMwLJyRQS X-Google-Smtp-Source: AGHT+IGW1gnVN8wsBtZuIzYKExcTmqqfEH1F9xffamnzp5f18zkBRyLMCfeGTgTtHd+FxfHWMDTdSg== X-Received: by 2002:a05:6402:3410:b0:55f:5197:6314 with SMTP id k16-20020a056402341000b0055f51976314mr1764168edc.18.1707501659252; Fri, 09 Feb 2024 10:00:59 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVfF3SdaH0Hp4Jo9YeYcEvD7pVnwVeVJuG1jZmmx8lgUsmz+i3i1ZTu0HGjlH/cg2uiXiCeCn5o8z6wNqAIlnnvoIdXt0nyvj7wESsm3GQClePV3re9qKFxWtHwZuMhpSFtFSf2ebV1F13JWfqHQA/qVS0hjVqCIwG2F5fGkqp4G82gzINpKtK1CK38FVsHl7cC5JyO6TtvUrnqgD1xj4wfiiE= From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk Subject: [PATCH v8 6/7] xen/arm: switch Arm to use asm-generic/device.h Date: Fri, 9 Feb 2024 19:00:48 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1707501684797100007 Content-Type: text/plain; charset="utf-8" The following changes were done as a result of switching to asm-generic/device.h: * DEVICE_GIC was renamed to DEVICE_INTERRUPT_CONTROLLER according to definition of enum device_class in asm-generic/device.h. * acpi-related things in Arm code were guarded by #ifdef CONFIG_ACPI as struct acpi_device_desc was guarded in asm-generic, also functions acpi_device_init() was guarded too as they are using structure acpi_device_desc inside. * drop arm/include/asm/device.h and update arm/include/asm/Makefile to use asm-generic/device.h instead. Signed-off-by: Oleksii Kurochko Reviewed-by: Julien Grall --- Changes in V8: - update the commit message --- Changes in V7: - newly introduced patch which is based on the previous version of the pat= ch: [PATCH v6 9/9] xen/asm-generic: introduce generic device.h --- xen/arch/arm/device.c | 5 ++ xen/arch/arm/domain_build.c | 2 +- xen/arch/arm/gic-v2.c | 4 +- xen/arch/arm/gic-v3.c | 6 +- xen/arch/arm/gic.c | 4 +- xen/arch/arm/include/asm/Makefile | 1 + xen/arch/arm/include/asm/device.h | 124 ------------------------------ 7 files changed, 14 insertions(+), 132 deletions(-) delete mode 100644 xen/arch/arm/include/asm/device.h diff --git a/xen/arch/arm/device.c b/xen/arch/arm/device.c index 1f631d3274..3e02cff008 100644 --- a/xen/arch/arm/device.c +++ b/xen/arch/arm/device.c @@ -16,7 +16,10 @@ #include =20 extern const struct device_desc _sdevice[], _edevice[]; + +#ifdef CONFIG_ACPI extern const struct acpi_device_desc _asdevice[], _aedevice[]; +#endif =20 int __init device_init(struct dt_device_node *dev, enum device_class class, const void *data) @@ -45,6 +48,7 @@ int __init device_init(struct dt_device_node *dev, enum d= evice_class class, return -EBADF; } =20 +#ifdef CONFIG_ACPI int __init acpi_device_init(enum device_class class, const void *data, int= class_type) { const struct acpi_device_desc *desc; @@ -61,6 +65,7 @@ int __init acpi_device_init(enum device_class class, cons= t void *data, int class =20 return -EBADF; } +#endif =20 enum device_class device_get_class(const struct dt_device_node *dev) { diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 46161848dc..085d88671e 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -1651,7 +1651,7 @@ static int __init handle_node(struct domain *d, struc= t kernel_info *kinfo, * Replace these nodes with our own. Note that the original may be * used_by DOMID_XEN so this check comes first. */ - if ( device_get_class(node) =3D=3D DEVICE_GIC ) + if ( device_get_class(node) =3D=3D DEVICE_INTERRUPT_CONTROLLER ) return make_gic_node(d, kinfo->fdt, node); if ( dt_match_node(timer_matches, node) ) return make_timer_node(kinfo); diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c index cf392bfd1c..5d6885e389 100644 --- a/xen/arch/arm/gic-v2.c +++ b/xen/arch/arm/gic-v2.c @@ -1366,7 +1366,7 @@ static const struct dt_device_match gicv2_dt_match[] = __initconst =3D { /* sentinel */ }, }; =20 -DT_DEVICE_START(gicv2, "GICv2", DEVICE_GIC) +DT_DEVICE_START(gicv2, "GICv2", DEVICE_INTERRUPT_CONTROLLER) .dt_match =3D gicv2_dt_match, .init =3D gicv2_dt_preinit, DT_DEVICE_END @@ -1381,7 +1381,7 @@ static int __init gicv2_acpi_preinit(const void *data) return 0; } =20 -ACPI_DEVICE_START(agicv2, "GICv2", DEVICE_GIC) +ACPI_DEVICE_START(agicv2, "GICv2", DEVICE_INTERRUPT_CONTROLLER) .class_type =3D ACPI_MADT_GIC_VERSION_V2, .init =3D gicv2_acpi_preinit, ACPI_DEVICE_END diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c index bf0e5c1b75..1cb1360606 100644 --- a/xen/arch/arm/gic-v3.c +++ b/xen/arch/arm/gic-v3.c @@ -1909,7 +1909,7 @@ static const struct dt_device_match gicv3_dt_match[] = __initconst =3D { /* sentinel */ }, }; =20 -DT_DEVICE_START(gicv3, "GICv3", DEVICE_GIC) +DT_DEVICE_START(gicv3, "GICv3", DEVICE_INTERRUPT_CONTROLLER) .dt_match =3D gicv3_dt_match, .init =3D gicv3_dt_preinit, DT_DEVICE_END @@ -1924,12 +1924,12 @@ static int __init gicv3_acpi_preinit(const void *da= ta) return 0; } =20 -ACPI_DEVICE_START(agicv3, "GICv3", DEVICE_GIC) +ACPI_DEVICE_START(agicv3, "GICv3", DEVICE_INTERRUPT_CONTROLLER) .class_type =3D ACPI_MADT_GIC_VERSION_V3, .init =3D gicv3_acpi_preinit, ACPI_DEVICE_END =20 -ACPI_DEVICE_START(agicv4, "GICv4", DEVICE_GIC) +ACPI_DEVICE_START(agicv4, "GICv4", DEVICE_INTERRUPT_CONTROLLER) .class_type =3D ACPI_MADT_GIC_VERSION_V4, .init =3D gicv3_acpi_preinit, ACPI_DEVICE_END diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index d922ea67aa..b5a9c8266c 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -234,7 +234,7 @@ static void __init gic_dt_preinit(void) if ( !dt_get_parent(node) ) continue; =20 - rc =3D device_init(node, DEVICE_GIC, NULL); + rc =3D device_init(node, DEVICE_INTERRUPT_CONTROLLER, NULL); if ( !rc ) { /* NOTE: Only one GIC is supported */ @@ -262,7 +262,7 @@ static void __init gic_acpi_preinit(void) =20 dist =3D container_of(header, struct acpi_madt_generic_distributor, he= ader); =20 - if ( acpi_device_init(DEVICE_GIC, NULL, dist->version) ) + if ( acpi_device_init(DEVICE_INTERRUPT_CONTROLLER, NULL, dist->version= ) ) panic("Unable to find compatible GIC in the ACPI table\n"); } #else diff --git a/xen/arch/arm/include/asm/Makefile b/xen/arch/arm/include/asm/M= akefile index 505cb49090..4a4036c951 100644 --- a/xen/arch/arm/include/asm/Makefile +++ b/xen/arch/arm/include/asm/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only generic-y +=3D altp2m.h +generic-y +=3D device.h generic-y +=3D hardirq.h generic-y +=3D iocap.h generic-y +=3D paging.h diff --git a/xen/arch/arm/include/asm/device.h b/xen/arch/arm/include/asm/d= evice.h deleted file mode 100644 index b5d451e087..0000000000 --- a/xen/arch/arm/include/asm/device.h +++ /dev/null @@ -1,124 +0,0 @@ -#ifndef __ASM_ARM_DEVICE_H -#define __ASM_ARM_DEVICE_H - -enum device_type -{ - DEV_DT, - DEV_PCI, -}; - -struct dev_archdata { - void *iommu; /* IOMMU private data */ -}; - -/* struct device - The basic device structure */ -struct device -{ - enum device_type type; -#ifdef CONFIG_HAS_DEVICE_TREE - struct dt_device_node *of_node; /* Used by drivers imported from Linux= */ -#endif - struct dev_archdata archdata; - struct iommu_fwspec *iommu_fwspec; /* per-device IOMMU instance data */ -}; - -typedef struct device device_t; - -#include - -#define dev_is_pci(dev) ((dev)->type =3D=3D DEV_PCI) -#define dev_is_dt(dev) ((dev)->type =3D=3D DEV_DT) - -enum device_class -{ - DEVICE_SERIAL, - DEVICE_IOMMU, - DEVICE_GIC, - DEVICE_PCI_HOSTBRIDGE, - /* Use for error */ - DEVICE_UNKNOWN, -}; - -struct device_desc { - /* Device name */ - const char *name; - /* Device class */ - enum device_class class; - /* List of devices supported by this driver */ - const struct dt_device_match *dt_match; - /* - * Device initialization. - * - * -EAGAIN is used to indicate that device probing is deferred. - */ - int (*init)(struct dt_device_node *dev, const void *data); -}; - -struct acpi_device_desc { - /* Device name */ - const char *name; - /* Device class */ - enum device_class class; - /* type of device supported by the driver */ - const int class_type; - /* Device initialization */ - int (*init)(const void *data); -}; - -/** - * acpi_device_init - Initialize a device - * @class: class of the device (serial, network...) - * @data: specific data for initializing the device - * - * Return 0 on success. - */ -int acpi_device_init(enum device_class class, - const void *data, int class_type); - -/** - * device_init - Initialize a device - * @dev: device to initialize - * @class: class of the device (serial, network...) - * @data: specific data for initializing the device - * - * Return 0 on success. - */ -int device_init(struct dt_device_node *dev, enum device_class class, - const void *data); - -/** - * device_get_type - Get the type of the device - * @dev: device to match - * - * Return the device type on success or DEVICE_ANY on failure - */ -enum device_class device_get_class(const struct dt_device_node *dev); - -#define DT_DEVICE_START(_name, _namestr, _class) \ -static const struct device_desc __dev_desc_##_name __used \ -__section(".dev.info") =3D { \ - .name =3D _namestr, \ - .class =3D _class, \ - -#define DT_DEVICE_END \ -}; - -#define ACPI_DEVICE_START(_name, _namestr, _class) \ -static const struct acpi_device_desc __dev_desc_##_name __used \ -__section(".adev.info") =3D { \ - .name =3D _namestr, \ - .class =3D _class, \ - -#define ACPI_DEVICE_END \ -}; - -#endif /* __ASM_ARM_DEVICE_H */ - -/* - * Local variables: - * mode: C - * c-file-style: "BSD" - * c-basic-offset: 4 - * indent-tabs-mode: nil - * End: - */ --=20 2.43.0 From nobody Sun May 19 03:02:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1707501682; cv=none; d=zohomail.com; s=zohoarc; b=fy9l3BoGIBXyioKwHLRd4h/uK5bUnE6KN4pVJ7yEa0VrsC6+WZaiWdQx7NFHmZZdQ0BvQ6uq4UOJgJ4JHTsghCXpittX0B6T44sWFMwNPG3tc2fudE/hLycfWSr+cSQVlkflgMJuRnIHa6JP8DR7xBOD2zfd8x8OS70wHyeyXFg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707501682; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=7zSKxQR6kP5WdiwzAdOSjjJwHaQkMg7XYEJePcorDtE=; b=JSy77bvUZFDVMHRB1833ubtQb+LVIqiHMqO44c4uNVlRFJsvqKiQD11yPR5fKk2SltnzKn6bLOvv97RcoUPvz3i3O173nHU7WxnGJZn5bitrGGu4wMSfGOOORwyJbFSQhNenk/2q4tDIVzkN/CiIuEC/6NB5ZM0Je0+wieaaWTc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1707501682601282.6603564711935; Fri, 9 Feb 2024 10:01:22 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.678787.1056364 (Exim 4.92) (envelope-from ) id 1rYVBQ-0000XG-6L; Fri, 09 Feb 2024 18:01:04 +0000 Received: by outflank-mailman (output) from mailman id 678787.1056364; Fri, 09 Feb 2024 18:01: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 1rYVBQ-0000W1-1a; Fri, 09 Feb 2024 18:01:04 +0000 Received: by outflank-mailman (input) for mailman id 678787; Fri, 09 Feb 2024 18:01:03 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rYVBO-0007AX-Rd for xen-devel@lists.xenproject.org; Fri, 09 Feb 2024 18:01:02 +0000 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [2a00:1450:4864:20::533]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 2f2a28ce-c775-11ee-98f5-efadbce2ee36; Fri, 09 Feb 2024 19:01:01 +0100 (CET) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-55a5e7fa471so1616287a12.1 for ; Fri, 09 Feb 2024 10:01:01 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id fd1-20020a056402388100b00561103f29fbsm984503edb.75.2024.02.09.10.00.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 10:00:59 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 2f2a28ce-c775-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707501660; x=1708106460; 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=7zSKxQR6kP5WdiwzAdOSjjJwHaQkMg7XYEJePcorDtE=; b=e7fpMLN5yYexyw2OYS91p/mZWEZbijXxpJP0vfpegj1CfsDG6mp6yBkmtU7YewqIdU xdstB7qVzx/qVzsUcLsp+I0q5NqkooccHXdkq/1X9hPKUh9vdkr9/IlbMRdZ3gQaV6qV olB1eNLLK0cXvTG7855zKxJDCuN3so4ImHE7+N97g/e+ovKrZ0bpbV5urPn+1ME03f6y bhEfW9R4QWEiSBUwcs/7v1nbo2cR+OKXq5NnUq4+/10L4pC3h4PWQxjBgT+zUytaGJBB nnbefpdzhFaLeU3AHIT0aochgPWAI2AAP9CwdQFxjvhhhAFK4fd0SKz9+3qKwcR15zQU gKTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707501660; x=1708106460; 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=7zSKxQR6kP5WdiwzAdOSjjJwHaQkMg7XYEJePcorDtE=; b=pI/KPXRGVvakDWIXIdH40bI8Ny9uGps9mH8nvtf4FMUjjb3eRlsg/yqX1SUC2RdTDZ YuWl/ZkfKhSVi2HrSbGMRbb2X53liIGklXVgGy3gZlDiY+QQGSQBSZ2Z5U/XB9d5E4Ku RHVKz0FqU5WYATZXcWfPG+KWQOhyyrZlPko3iucbeXJtYNB6eG0nER9Q5TM+hGjxrgm0 q6cb/A+reMxtVKV12OFxmAvkseGXP0y1QVnKI/KV/0fXb1gwcQUVqZ+BPoPqcUR77MRc JRgM3TeJfS2F5wlEUA4Wd+kRt+8elFje4XCweico93K0BPW3EGoJ5iV7+xYytekFUpNu OZcg== X-Gm-Message-State: AOJu0YxoL5G/Z64mSMAGSyj1zSVzy15BWzBOjo4jh6qs5uHbErbRfItZ aNfbXdH1pE7VTnmD83+b2a2w1DMvvJ3OJHPoF/e97PUQEyPc/fpugsEROabU X-Google-Smtp-Source: AGHT+IFc6L4aoReIcUQhz63N8frIOcSmyo05U0y2uM2pvWezG7stFnF+wJT2FYx1hW0trc4A8v2d5g== X-Received: by 2002:aa7:c653:0:b0:560:1652:e7cb with SMTP id z19-20020aa7c653000000b005601652e7cbmr1823428edr.16.1707501660563; Fri, 09 Feb 2024 10:01:00 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCV2XfEhF2CITrZWAeUUDnRihfsVEoFhTeQGycPMEtkmXn9i7lvJyqFe8+PpuUYDgOTj1Tl9SGQGh72urX/KEKYbgmPzIYhb76sjP94Z7FALQg== From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Shawn Anastasio Subject: [PATCH v8 7/7] xen/ppc: switch PPC to use asm-generic/device.h Date: Fri, 9 Feb 2024 19:00:49 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1707501683845100005 Content-Type: text/plain; charset="utf-8" Signed-off-by: Oleksii Kurochko --- Changes in V7: - newly introduced patch which is based on the previous version of the pat= ch: [PATCH v6 9/9] xen/asm-generic: introduce generic device.h --- xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/device.h | 53 ------------------------------- 2 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 xen/arch/ppc/include/asm/device.h diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/M= akefile index 3fd893f3e0..ced02e26ed 100644 --- a/xen/arch/ppc/include/asm/Makefile +++ b/xen/arch/ppc/include/asm/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only generic-y +=3D altp2m.h +generic-y +=3D device.h generic-y +=3D div64.h generic-y +=3D hardirq.h generic-y +=3D hypercall.h diff --git a/xen/arch/ppc/include/asm/device.h b/xen/arch/ppc/include/asm/d= evice.h deleted file mode 100644 index 8253e61d51..0000000000 --- a/xen/arch/ppc/include/asm/device.h +++ /dev/null @@ -1,53 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ASM_PPC_DEVICE_H__ -#define __ASM_PPC_DEVICE_H__ - -enum device_type -{ - DEV_DT, - DEV_PCI, -}; - -struct device { - enum device_type type; -#ifdef CONFIG_HAS_DEVICE_TREE - struct dt_device_node *of_node; /* Used by drivers imported from Linux= */ -#endif -}; - -enum device_class -{ - DEVICE_SERIAL, - DEVICE_IOMMU, - DEVICE_PCI_HOSTBRIDGE, - /* Use for error */ - DEVICE_UNKNOWN, -}; - -struct device_desc { - /* Device name */ - const char *name; - /* Device class */ - enum device_class class; - /* List of devices supported by this driver */ - const struct dt_device_match *dt_match; - /* - * Device initialization. - * - * -EAGAIN is used to indicate that device probing is deferred. - */ - int (*init)(struct dt_device_node *dev, const void *data); -}; - -typedef struct device device_t; - -#define DT_DEVICE_START(name_, namestr_, class_) \ -static const struct device_desc __dev_desc_##name_ __used \ -__section(".dev.info") =3D { \ - .name =3D namestr_, \ - .class =3D class_, \ - -#define DT_DEVICE_END \ -}; - -#endif /* __ASM_PPC_DEVICE_H__ */ --=20 2.43.0