From mboxrd@z Thu Jan 1 00:00:00 1970 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 A3F59C5475B for ; Fri, 8 Mar 2024 10:14:36 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.690186.1075975 (Exim 4.92) (envelope-from ) id 1riXF7-0002HS-TK; Fri, 08 Mar 2024 10:14:21 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 690186.1075975; Fri, 08 Mar 2024 10:14:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1riXF7-0002HL-PA; Fri, 08 Mar 2024 10:14:21 +0000 Received: by outflank-mailman (input) for mailman id 690186; Fri, 08 Mar 2024 10:14:20 +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 1riXF6-0002HF-DM for xen-devel@lists.xenproject.org; Fri, 08 Mar 2024 10:14:20 +0000 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [2a00:1450:4864:20::536]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 9fb8ebf4-dd34-11ee-a1ee-f123f15fe8a2; Fri, 08 Mar 2024 11:14:18 +0100 (CET) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-56647babfe6so913861a12.3 for ; Fri, 08 Mar 2024 02:14:18 -0800 (PST) Received: from [192.168.206.239] ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id f27-20020a170906085b00b00a44ef54b6b6sm6715591ejd.58.2024.03.08.02.14.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 02:14:17 -0800 (PST) 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: 9fb8ebf4-dd34-11ee-a1ee-f123f15fe8a2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709892858; x=1710497658; darn=lists.xenproject.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=hRQ6Jn+GB5bFeLy1drOwXVbCMQkuPuur8nXU6OgB4M8=; b=YPrTcYzGySGPLfubMGMvIoHJU3ezQMsCytfKa5U4jxyMSg7tno7tlsEYQejxEZnxYE ZpokT3MtN/U78ETivqAtIcan+l9roGQFdbFamNIKohGy5pGGY1k7IQu0Ct/ET3L1vgsb KsPQ4IuM5eInIEzYGhIFDBK8aGtqZOvB9KhiT0pGkF2zY/SgiAl4XjyMEgGXMI953YQE +Zp/p20gARWqf4frKhP0aUh/ZPtG7ybc6Ntai6VNZ/byIQbl8QK4rNylBd7eUws2E/m7 As2qgYRNOo4rHEevI+DehbmnYpEe96QDuJ5D8DmVDfUjUFJWXaXJPg0ejhDjuK+fgIiW 87Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709892858; x=1710497658; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=hRQ6Jn+GB5bFeLy1drOwXVbCMQkuPuur8nXU6OgB4M8=; b=av0WPuh6EWz052FO4gHwUnzMUagJkxuPYk+G3XAWFqQgL8bKG4r962DAotF1NiK40z TTWLwTMHzFoChqCa0m9c7JChm+j4JJZDsACJc5oKO+i1FkqTfNkG87afpFsZDKKBbxiL VUgVfKdlKCeduNzkBFSG7mTGWKzd454e2oMluy7DmCWpq+htxMw52D2TQf7blg9xtecG aIbDTqfasw38RitBZrS9wCF3d3pCfBpyYawt6iO/dQF1HAucCSQ/GKYQLmgoZN5PPMvi OENk43N3S0sjcT4snisdAx2leZyFptximIjnRXCdp6sqoqy3Ay0IwWp0ApI7tA55RhOv XNQQ== X-Forwarded-Encrypted: i=1; AJvYcCU3lRJuFb1CYzoUv06RNIpbHPErTN+1eHNyaGJlkF361g1D9gKKiI1bMmHdokb8qhSbRmhIw/UkYzfQGSSVFCvPOEUzBGSc/i325AGbQPY= X-Gm-Message-State: AOJu0Ywa311/L0AyxVNPiCdjUWl0kZk3ho1a5n07ATeaGbKyJS7vT1i/ eyHqJpBeiISO2IAOke+OYBSpVypL1+urWx1tm/q/yMnmWtRBOAJG X-Google-Smtp-Source: AGHT+IEZPM49OF6HYMrpuvD4RCAYg5eXoujFXBZeT826+b0JWAoRM+elpa/zZ+SSG6Y3hSUiETLnFA== X-Received: by 2002:a17:906:4712:b0:a45:84e7:b265 with SMTP id y18-20020a170906471200b00a4584e7b265mr8632868ejq.7.1709892857406; Fri, 08 Mar 2024 02:14:17 -0800 (PST) Message-ID: <4b6c9458efc85a57c14c6b6147d47245fece1f88.camel@gmail.com> Subject: Re: [PATCH v5 12/23] xen/riscv: introduce io.h From: Oleksii To: Jan Beulich Cc: Alistair Francis , Bob Eshleman , Connor Davis , Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu , xen-devel@lists.xenproject.org Date: Fri, 08 Mar 2024 11:14:15 +0100 In-Reply-To: <82375df2-f7fd-43a1-9183-f4823fe791ec@suse.com> References: <807c31d5-0c5a-4646-ba90-2f284289069f@suse.com> <2a3e49bf94332c17b50e4f0f745e4b28b16dceb1.camel@gmail.com> <2a05c233-b3c5-417c-bd6b-8b1c21f03c3d@suse.com> <9ec718f3bba178d437035add3c7467011fc3ffc0.camel@gmail.com> <82375df2-f7fd-43a1-9183-f4823fe791ec@suse.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.2 (3.50.2-1.fc39) MIME-Version: 1.0 On Fri, 2024-03-08 at 08:26 +0100, Jan Beulich wrote: > On 07.03.2024 21:54, Oleksii wrote: > > On Thu, 2024-03-07 at 21:49 +0100, Oleksii wrote: > > > On Thu, 2024-03-07 at 18:14 +0100, Jan Beulich wrote: > > > > For plain writes it should at least be "=3DQo" then, yes. > > > Constraints Q is a machine specific constraint, and I am not sure > > > that > > > it makes sense to use "=3Do" only and probably it is a reason why > > > it is > > > enough only "r". Does it make sense? > > Probably for RISC-V can be used: > > RISC-V=E2=80=94config/riscv/constraints.md > > =C2=A0=C2=A0 ... > > =C2=A0=C2=A0 A > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 An address that is held in a gener= al-purpose register. > > =C2=A0=C2=A0 ... >=20 > Just from the description I would have said no, but looking at what > "A" > actually expands to it is indeed RISC-V's counterpart of Arm's "Q". > So > yes, this looks like what amo* want to use, and then as a real > operand, > not just a fake one. I am not sure that I know how to check correctly how "A" expands, but I tried to look at code which will be generated with and without constraints and it is the same: // static inline void __raw_writel(uint32_t val, volatile void __iomem *addr) // { // asm volatile ( "sw %0, 0(%1)" : : "r" (val), "r"(addr) ); // } =20 static inline void __raw_writel(uint32_t val, volatile void __iomem *addr) { asm volatile ( "sw %0, %1" : : "r" (val), "Ao" (*(volatile uint32_t __force *)addr) ); } =20 ffffffffc003d774: aabbd7b7 lui a5,0xaabbd ffffffffc003d778: cdd78793 add a5,a5,-803 # ffffffffaabbccdd ffffffffc003d77c: f8f42423 sw a5,-120(s0) ffffffffc003d780: 0140000f fence w,o =20 >=20 > > AArch64 family=E2=80=94config/aarch64/constraints.md: > > =C2=A0=C2=A0 ... > > =C2=A0=C2=A0 Q > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 A memory address which uses a sing= le base register with no > > =C2=A0=C2=A0 offset > > =C2=A0=C2=A0 ... > > Also 'no offset' explains why it was added 'o' constraint for Arm > > additionally. >=20 > I don't think it does. >=20 > Jan