From patchwork Sat Nov 21 09:47:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1404391 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=mryi9hPZ; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=J8xQldrl; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-sharedspace-onmicrosoft-com header.b=rHDw+Hju; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cdpbj3wMhz9s1l for ; Sun, 22 Nov 2020 09:53:05 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vUxRFKUBRdq77kEVHKKNiIrVwfquspn0zHzGQSYd7Pk=; b=mryi9hPZ+/26KGlaZ+Sg+9i4k jBspjpy1CPWcZxYW+O4IfeYo8IDcGzp5GJvsBwgR0XofwYnhDYlm8KUJ5LjTCGu830c6a8M2lpEAz aVX+xAH6TOxBjEtlvTe7MFMdQvRJn05F5q0zoLuWzDCgD5cA1w5l2F9Shp9QkOPv36VasmOZtYmYN iLIzv8ojk9s3D2/aGO3UJCaMyQ4Rnx8NZ1js8NduYWks6BWxeaoUhHzIHCslCbbzKXkp8Z0xbpuld X3/8UVj93dgDbwrK7mkase0mKfmXdpuCuNZjSqRBfFNbl6xRQzGEBKl9W0nwW0KwBq/JP5zTUv7hX zL5wDInRg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kgbkW-0005rk-Hx; Sat, 21 Nov 2020 22:52:56 +0000 Received: from esa5.hgst.iphmx.com ([216.71.153.144]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kgbkB-0005jy-GW for opensbi@lists.infradead.org; Sat, 21 Nov 2020 22:52:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1605999155; x=1637535155; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=LtLK3k0QLMjn5mMQDxrwn220I73W5b4f3WFK+mWGldo=; b=J8xQldrlDmivNjHKGMvQD1ct6d42Z6A70x5GToeHpfjJjTXTCkLVERwP q/29vzQuwhOXF31Il0otMVJi/mUsty5DKzLfUbFPi+vA3jD4dbCh+PONu /4KzUOY5g5IYmZ8PcdQVWenLcV1pB5dFrkbJvccunGj6LLfKm3EX6Bo/7 tE0juve9eilAdzF1CeXIYKEWTexJG5ZeotVe60lTEOZxTs2BLadadVF8R 49z7ReGrURjUDvZzSNx/PyjofUeIydkPDl5s7Ck8mOD1jwX2LQEX+IMlF /Archpo+y2NOV+jyyOARvybiTBx/8ASF3ssTx+UC02AHdv1DGWE/BXNQx A==; IronPort-SDR: 917ybOzs4vveTncNKoGzy4U0rElBhSbMfd4m56UascXc12UCIsIXPEdSc5ugx8oFuw8K+eZ4v8 Ik0Fe9xY0e21RKlUTzouL/R3ZxxZ0PXzkkDjjEeL8is7C8oPhXcMT6py2FJpCBrY1mc9DwySjk MK2LYUtW4th33yhWma8fgUTsg+LCUC9Gl3TpqdBozFbPHn7+FUgSMHOvhrzRMj90e6NVjQRrWV 05VrqRbf3rul4WOUPhNv9wA5jFTemihTyyeWPtya1ak1flUIxeuS5NgvdJIBpM1W+UVLu+Fnzx SXA= X-IronPort-AV: E=Sophos;i="5.78,359,1599494400"; d="scan'208";a="153218783" Received: from mail-dm6nam12lp2177.outbound.protection.outlook.com (HELO NAM12-DM6-obe.outbound.protection.outlook.com) ([104.47.59.177]) by ob1.hgst.iphmx.com with ESMTP; 21 Nov 2020 17:48:41 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L134fmuDdXGJMKUeDt/WUYxYccRRHaxBgpXETKNJVo+W0lvJJJjfysSF1BnC8lf43UpTFYqjACGnXv9UYBwZtqlAsxFg3i/6300JrZ+26CXYDD7AW3r0A+A60g7b1HM+l5QXEIkjF7jzNEc1Dzkn900dvkQ5d9uqF+TyUdKYekyG22aTkjRKG5XW9sWg7s8wYzTT4Y+TZtn8prrh9M19XmBg9ZIaaQUFAoL05yGfSBSgjA0jQjvE1MoA5qehp28m84yvqTxShuDo1+G9rOUloh6X5dFy1v9RiAj/j352dIp2V3pSQGaHw5b56DWJ0akk9BFLxAliff56Wj/LapeSgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A51BGd/b3fLVRPxVJF9W9nftgiQUrijg670ChnhRhDg=; b=WuhJEp0dFt6jIuq9SQlkx0VtX7yQsXj99q5kIkH8U3dywNaWxnEX4OQo91Y2NdvzSpw/QoVA3y16FZrzr1lagIgjmeas9SLNOFS3ndqBKdIVH71pYiciivz14R4Q0eERMfCTxn18P/uM0O1pNOV+b+NJa4PLV9jpKi08vW10ZjQ/eQwNG2fqtUq2hYHjYqhtfZEU8OrcUtGbykQCqjHyIVuboHklUyVzUlUKMtr/jldD9gFvY45NqquMm8iWcoo2fk8kfgwm9wCQ2BBwjQPyi7zjSxNok6L1fyVAQQcMy9eAaxAT9W08TBVd27ChFtVzGetof+gapj5y0d+DGTWUlw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A51BGd/b3fLVRPxVJF9W9nftgiQUrijg670ChnhRhDg=; b=rHDw+HjuXJQxOUkxw06RbXHeU1k1Q/ced0jumVh4R7OfmVE7wOdG45ostY949TCeyyZHilXW+cqmSMy12lUgdQdA9Kd9X3h1eHlkLxrkUT7gvi49Ku3J+n0VIOcVx+YXjYUEsnhX2mXpK4/zdNLJ61GZzRdpl7Ou4p7hIhlPo0E= Authentication-Results: wdc.com; dkim=none (message not signed) header.d=none;wdc.com; dmarc=none action=none header.from=wdc.com; Received: from DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) by DM6PR04MB6361.namprd04.prod.outlook.com (2603:10b6:5:1e4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.21; Sat, 21 Nov 2020 09:48:40 +0000 Received: from DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::d035:e2c6:c11:51dd]) by DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::d035:e2c6:c11:51dd%6]) with mapi id 15.20.3589.025; Sat, 21 Nov 2020 09:48:40 +0000 From: Anup Patel To: Atish Patra , Alistair Francis Subject: [PATCH 05/11] include: sbi: Use lower bits for domain memory region permissions Date: Sat, 21 Nov 2020 15:17:50 +0530 Message-Id: <20201121094756.4154728-6-anup.patel@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201121094756.4154728-1-anup.patel@wdc.com> References: <20201121094756.4154728-1-anup.patel@wdc.com> X-Originating-IP: [122.179.16.120] X-ClientProxiedBy: MA1PR01CA0115.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:1::31) To DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from wdc.com (122.179.16.120) by MA1PR01CA0115.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:1::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.20 via Frontend Transport; Sat, 21 Nov 2020 09:48:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7d765a0f-c643-4373-0555-08d88e02a007 X-MS-TrafficTypeDiagnostic: DM6PR04MB6361: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: WDCIPOUTBOUND: EOP-TRUE X-MS-Oob-TLC-OOBClassifiers: OLM:1284; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Hu0hRdkyjvsKn6t59wGJCL4/o+cRhzDarW9OXy3JaTDxF3dyQGGwyfGo2P7Dn4D7bAIz8CtMoRxIf00Muf6FiqR4Rjxxz8nXG6u1/+OcHlf6UKzR0JpnDvbs8NXcMJvr04FPxfrJP4u7D5o9KVugb2kHYdKSPds94rYe1BJs8tgGOczgngRb6Pt3QHmkviIRlQmc2L2lBScgT6gatEZ1SgqkEN5fO+/dUqZAjTFW24+Zoupsjy1HdOdtyssy/iQCM3yrY0rwF9BSl6KvwfeqbyYOcqySlwlkyWgSHCOBf2I8UFKpTTVrl64EPnzGIvMdgqFphznoLRqwF3Xd/GtwUQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR04MB6201.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(346002)(396003)(376002)(39860400002)(44832011)(83380400001)(478600001)(66556008)(8936002)(8886007)(1076003)(55016002)(36756003)(54906003)(66946007)(316002)(66476007)(26005)(110136005)(6636002)(52116002)(2906002)(16526019)(7696005)(86362001)(8676002)(956004)(6666004)(186003)(4326008)(4744005)(5660300002)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: 88+K8V5BCXGbQUC+ZHQcd5jQWpSUY8fm7+BRhAPrfU21ZYm9WQTURrQ2mTxC6Ray5wKgUTwHTIe3INmkfxcM5tR/ewUBRpFJWWdDhVr+NEOyGy8m4D6odN1zhFwJKkNt+CkOBuAWeaKHV4kqx44MUxDqLNxTIBGUo3OLPP5eEFu3fL4jnXAgyG1c2y2MRClZ/eYy/Q7zogS9+n7yoCkhQDh6bbby5P61C3ShuGdDxtHNbNlzLMc1v5M0T6SwhbO3JK+v1svTgvo8Irk4Cl/CxzLzdGItODmrhE3CiQJsyNhljR7IG1zJnJiQOGEe8oF1gcH2Zlb0+j4HFsvOkBhLEqgV3VCwtLt9t9ea9dVytypKB3ySqtB83Hnq1//U6cErovoyl3YinijiaHu8VgF/Phce8NICzd1Nav0JmJdmyFhHR3zgXeis7YEbh/dMmFJHChJ6Ey4IGkX68U9+/n2S9yu9ZkRK04AOBbAmDPQL6Sz5narpHHm+iTYUGSLN1uUghenJGQetcyG/9s2xRPIEoyyKatzZado5TAyskDU2086Oxpuh2QPg0TeswNebftEH/gkG4oJmHeo4CHyFALqg43D4vvIEsVtMYiT6NQivPi73WlY34xGIYpmSM0qZQZwsQFrjt3/1piQWyBIqJG8Osw== X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d765a0f-c643-4373-0555-08d88e02a007 X-MS-Exchange-CrossTenant-AuthSource: DM6PR04MB6201.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2020 09:48:40.3465 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ablBHfLU/9pEGy970rZJc82pE1u4wjYz4J2GgcC9SUSnel9HG9brNrQUkyQ9md+cbNH7sz+WErxw1gq5LYs+5g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB6361 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201121_175235_858527_BD39E5E7 X-CRM114-Status: GOOD ( 13.68 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [216.71.153.144 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anup Patel , Anup Patel , opensbi@lists.infradead.org Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org We should use lower bits for domain memory region access permissions and higher bits for other domain memory region attributes. This helps us use same bit assignment for parsing domain memory region access permissions from device tree. Signed-off-by: Anup Patel Reviewed-by: Alistair Francis Reviewed-by: Atish Patra --- include/sbi/sbi_domain.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/sbi/sbi_domain.h b/include/sbi/sbi_domain.h index 6f90b26..a7cb61e 100644 --- a/include/sbi/sbi_domain.h +++ b/include/sbi/sbi_domain.h @@ -39,8 +39,10 @@ struct sbi_domain_memregion { #define SBI_DOMAIN_MEMREGION_READABLE (1UL << 0) #define SBI_DOMAIN_MEMREGION_WRITEABLE (1UL << 1) #define SBI_DOMAIN_MEMREGION_EXECUTABLE (1UL << 2) -#define SBI_DOMAIN_MEMREGION_MMIO (1UL << 3) -#define SBI_DOMAIN_MEMREGION_MMODE (1UL << 4) +#define SBI_DOMAIN_MEMREGION_MMODE (1UL << 3) +#define SBI_DOMAIN_MEMREGION_ACCESS_MASK (0xfUL) + +#define SBI_DOMAIN_MEMREGION_MMIO (1UL << 31) unsigned long flags; };