From nobody Sun Feb 8 21:32:15 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1579670090; cv=none; d=zohomail.com; s=zohoarc; b=jENNP3dh7uzimqZMZjkgYDPdCGbNPsW1yrE+fG997ntyFk2hV0kFsl/l5sa0BQSp2z646sGSkHxpttEZV56sBRMsmP8WhjcsfSYoxBxPyGKBAQkubohBk/1A1kAA7KyAe3JcPuQuYskk1EQcdyJO5NOEzOWLjxH0nSxQZX4Ze3I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579670090; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SNh7+rTfn8Z7BK3AmJvecuN5Z0Fk2S6VLpA780KKUl0=; b=lL7yzP2WWQ4jBf3j5rph1waCUklLTS6bCcmYnUbdj2M/G0Jk++zeVKEIGXRUQgImQ2EI3BTd/V5/5i0geysRcISzz8+q91yQacveTkzIsVB5+EHCTmTArjad9/gSH6lprAK2GvNxqB3FWPHwaNhsMoWVl+Z9vp5c81Bs2c9mDss= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 157967009015766.57462358987027; Tue, 21 Jan 2020 21:14:50 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iu8L7-00057L-QY; Wed, 22 Jan 2020 05:14:05 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iu5KJ-00067M-5b for xen-devel@lists.xenproject.org; Wed, 22 Jan 2020 02:01:03 +0000 Received: from mail-yw1-xc41.google.com (unknown [2607:f8b0:4864:20::c41]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id fd254654-3cba-11ea-aecd-bc764e2007e4; Wed, 22 Jan 2020 02:00:40 +0000 (UTC) Received: by mail-yw1-xc41.google.com with SMTP id b186so2509850ywc.1 for ; Tue, 21 Jan 2020 18:00:39 -0800 (PST) Received: from bobbye-pc.knology.net ([216.186.244.35]) by smtp.gmail.com with ESMTPSA id q185sm17504248ywh.61.2020.01.21.18.00.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2020 18:00:38 -0800 (PST) X-Inumbo-ID: fd254654-3cba-11ea-aecd-bc764e2007e4 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=ecljCB/QewVVvxelCthHZrjZzvUypArKJmwNJlVKo2I=; b=eP+clRbh/Q195KxOgSf9n6so2Q5UIN1acQ9GAnDKJlmwBTguwFeQK8825Fd4mZduUe Gekg/BbIf3fJ7mFszBdZ3ucZdyplt31av8WuO6BbD9SEL69luA3KqPZDsb8nQQXYEfnu sGTeqckeuRc68AyCDLrwWj4CN2cBDRNmZZN1LmJBk8akdyGOwxFuJWNraoLL7u+4IGE9 3G6xo/nHd+Sw7GRaaIyJfiVhOtq2RDpKNwtF2aEzusJDMG9k70k4jFX1ZA6dFwY1/shM V7F4TIfhq0E3guE0opC7vMsCYD0XNPnrxDF4shnYsEdC4WwC+qSSdqiQIdV8KM1TehDq NOEA== 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=ecljCB/QewVVvxelCthHZrjZzvUypArKJmwNJlVKo2I=; b=EoeNpEeGXFDleaeZORjPr9AmKm3Wsh1zzFqdnhN6HozUX4yznmA35REV3OcjkFlxWl ecnWytWzjvOM1EDlnPDVi0UzJi/7RKMcdeltB8S5co7fNnaPhvPyNjtCxlRIXFOtvhbY 0TCwApCiQeoHuQc70OTJOei9j9SSv8n/VfgIVpFAPljwfjdfrl0hj2ddH3ZW3rpWKqaR EH7VyfRy3Lzti55IggEj1nRDgN5GKq0LUilC48XEgIqJCg8EuU6dhjFby5jmc4vZH7Cx VosR/rTzREzFziQYO//QB7i0a1+WkB7Wi82AnBYZB1zGcHUeVuIn2gyIWCp0SC/Jxb0S D4Kw== X-Gm-Message-State: APjAAAVhdIN4vWgZyiYig+AYszpewZMZRK3M9tQJtA+YtA2j00OlUH4U moRzTCAABRtjmzrgIUh7iLN32ZtdvtkiHg== X-Google-Smtp-Source: APXvYqxAZX0mJ2PaFB95GsPEo21ABHzC0DtcoUvlY/ADeGF13rfx0xfBjATWGiLCRDBK2/HT/C1KXA== X-Received: by 2002:a81:294c:: with SMTP id p73mr800541ywp.477.1579658439060; Tue, 21 Jan 2020 18:00:39 -0800 (PST) From: Bobby Eshleman To: xen-devel@lists.xenproject.org Date: Tue, 21 Jan 2020 19:58:46 -0600 Message-Id: <86cabe821999135cf3b02c29edc249e78afa5078.1579615303.git.bobbyeshleman@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: References: MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 22 Jan 2020 05:14:01 +0000 Subject: [Xen-devel] [RFC XEN PATCH 07/23] riscv: Add asm-offsets.c X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Bobby Eshleman , Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Bobby Eshleman , Dan Robertson , Alistair Francis Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Alistair Francis Signed-off-by: Alistair Francis --- xen/arch/riscv/asm-offsets.c | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 xen/arch/riscv/asm-offsets.c diff --git a/xen/arch/riscv/asm-offsets.c b/xen/arch/riscv/asm-offsets.c new file mode 100644 index 0000000000..4c53f8af84 --- /dev/null +++ b/xen/arch/riscv/asm-offsets.c @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2012 Regents of the University of California + * Copyright (C) 2017 SiFive + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, version 2. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#define COMPILE_OFFSETS + +#include +#include +#include +#include +#include +#include +#include + +#define DEFINE(_sym, _val) = \ + asm volatile ("\n.ascii\"=3D=3D>#define " #_sym " %0 /* " #_val " */<= =3D=3D\"" \ + : : "i" (_val) ) +#define BLANK() = \ + asm volatile ( "\n.ascii\"=3D=3D><=3D=3D\"" : : ) +#define OFFSET(_sym, _str, _mem) = \ + DEFINE(_sym, offsetof(_str, _mem)); + +void asm_offsets(void) +{ + + BLANK(); + OFFSET(INITINFO_stack, struct init_info, stack); +} --=20 2.25.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel