From nobody Sun Dec 22 02:18:29 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=1727369708; cv=none; d=zohomail.com; s=zohoarc; b=MlLP3VnHmLwl6q7hCH1f1V23ASZo0+BaYh/i/fN7oRUH38GN+8Smzec0Srwx/j6RFeA5lkPpi7QlpsYyR/VDiQurWuCBvot5BJ6QfT6M+X3C7UQvLFTtv0fUIgJG05rAgPaea88uthtf2jUUMCSbGS2yiCcKxk79mQ7lV/TwXK4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727369708; 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=/Me01IlmWn5ZXb/VKWHt5wAOgVcX8vvbwAiPhcFzwz0=; b=LVuJHR5n0zkgIgvdzwVqAjQ7XJAwy86uPcgaozAX/9Sv98YEYTr0/Vore0eeE4CKAPqNPClBA/v1smh3JV/vjIIAP5Qf0temylHiKrYRmn+gMzrxKD/NmLVzFvF8RI57TIWfaH/2SE4XAPPGCMJMUxWIJmzvnuLnj9Rk6By1O4Q= 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 1727369708322601.628780265262; Thu, 26 Sep 2024 09:55:08 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.805752.1216959 (Exim 4.92) (envelope-from ) id 1strlC-0001iR-AH; Thu, 26 Sep 2024 16:54:34 +0000 Received: by outflank-mailman (output) from mailman id 805752.1216959; Thu, 26 Sep 2024 16:54:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1strlC-0001iF-5e; Thu, 26 Sep 2024 16:54:34 +0000 Received: by outflank-mailman (input) for mailman id 805752; Thu, 26 Sep 2024 16:54:33 +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 1strlB-0001SU-6H for xen-devel@lists.xenproject.org; Thu, 26 Sep 2024 16:54:33 +0000 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [2a00:1450:4864:20::632]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 0072edca-7c28-11ef-a0ba-8be0dac302b0; Thu, 26 Sep 2024 18:54:32 +0200 (CEST) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a93c1cc74fdso38881966b.3 for ; Thu, 26 Sep 2024 09:54:32 -0700 (PDT) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a93c2979e00sm16981566b.158.2024.09.26.09.54.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 09:54:30 -0700 (PDT) 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: 0072edca-7c28-11ef-a0ba-8be0dac302b0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727369671; x=1727974471; 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=/Me01IlmWn5ZXb/VKWHt5wAOgVcX8vvbwAiPhcFzwz0=; b=TsEpjwmIy/fiRv+OxB8HeW8p79G75MGcaw7mtYn024YB9wCyqncHMQ3w2jGx+K0WRr 96XAj5HbvsXqza6NCqmNk/89w6vsnL9CkxsFvSz6qB6Mac28+PUbhaTf/noi8xxvSUN+ zfNMiThN67jBNBekZhvfsnEamSqLfCw87zoh8L//X3IE/fs9zqnYVJbxO/tpjy8K+dU9 4tMiN4xfC4TRbN3r53IKA1TXpzdeB02ciyoJVqAvSj92xeKJ3nn0s4L3Dbv6vaz0lbRF jkfa9HcS7KsvI+t8SANopO/CFfWyRBhDnkW0z3NPESmIuLZJniWPkNHoG6s9r/4ZdPA/ +v8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727369671; x=1727974471; 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=/Me01IlmWn5ZXb/VKWHt5wAOgVcX8vvbwAiPhcFzwz0=; b=WZi/k4s2X0UzMaD+h//rHeLvIT2KpGnFzYHz8pvmgK9QRHFWdNjgU8ywO6EoBFSjt7 4i/FLMMBAO6+kZfTb5MtijkHLyDZX9AbC1PNN9kZUM1yGKitpfHIRUlCDXw6yManPaeu YcqTlULz+6TwuxInoT3WcxF1XLdl6eN1WSkPMUc8NncJLfRD2yM1u2/kLW0Dq13Iz8Fo M+A+wEFmH8R/JOGuVYuEYIokQsqIDmaO0mvAg9ZjhD5dXsSjYZS7qwHjIN0dA5UtpicK UoEC8Zer2b9IopepLB3/lKKDHCenNO9NX6oaSm3c20mpljrirtvACTo0ixaWGJqF5Kk8 IQbQ== X-Gm-Message-State: AOJu0YwTn1IuSSvi8VGq/zL5X+805JrWXYf0vIJRV2SgzeAYbPQA0LzY 7on5aYZ7aXNvd/VbsJQ/CnZRXdBDc9WM0oeIGw2LvUYgUnJMiNvook+xlQ== X-Google-Smtp-Source: AGHT+IENxhW8Z6GwOSQEBYUaU5Ssy8Dm29D6OtuPMVh8LwjaxL6cuq1Jq2ETxT/5xAHcm5tHy+QvDA== X-Received: by 2002:a17:907:60cc:b0:a86:7a84:abb7 with SMTP id a640c23a62f3a-a93c4915538mr16959066b.20.1727369671152; Thu, 26 Sep 2024 09:54:31 -0700 (PDT) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Andrew Cooper , Jan Beulich , Julien Grall , Stefano Stabellini Subject: [PATCH v4 2/6] xen: define ACPI and DT device info sections macros Date: Thu, 26 Sep 2024 18:54:21 +0200 Message-ID: X-Mailer: git-send-email 2.46.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1727369708993116600 Content-Type: text/plain; charset="utf-8" Introduce macros to define device information sections based on the configuration of ACPI or device tree support. These sections are required for common code of device initialization and getting an information about a device. These macros are expected to be used across different architectures (Arm, PPC, RISC-V), so they are moved to the common xen/xen.lds.h, based on their original definition in Arm. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V4: - rename ADEV_INFO to ACPI_DEV_INFO. - refactor ADEV_INFO and DT_DEV_INFO: add alignment and DECL_SECTION. --- Changes in V3: - drop SEC* at the end of ACPI AND DT device info section mancros. - refactor ADEV_INFO and DT_DEV_INFO macros. --- xen/include/xen/xen.lds.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/xen/include/xen/xen.lds.h b/xen/include/xen/xen.lds.h index 8135732756..cec86d0781 100644 --- a/xen/include/xen/xen.lds.h +++ b/xen/include/xen/xen.lds.h @@ -120,6 +120,14 @@ =20 /* List of constructs other than *_SECTIONS in alphabetical order. */ =20 +#define ACPI_DEV_INFO(secname) \ + . =3D ALIGN(POINTER_ALIGN); \ + DECL_SECTION(secname) { \ + _asdevice =3D .; \ + *(secname) \ + _aedevice =3D .; \ + } :text + #define BUGFRAMES \ __start_bug_frames_0 =3D .; \ *(.bug_frames.0) \ @@ -137,6 +145,14 @@ *(.bug_frames.3) \ __stop_bug_frames_3 =3D .; =20 +#define DT_DEV_INFO(secname) \ + . =3D ALIGN(POINTER_ALIGN); \ + DECL_SECTION(secname) { \ + _sdevice =3D .; \ + *(secname) \ + _edevice =3D .; \ + } :text + #ifdef CONFIG_HYPFS #define HYPFS_PARAM \ . =3D ALIGN(POINTER_ALIGN); \ --=20 2.46.1