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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A994BC31E46 for ; Wed, 12 Jun 2019 10:59:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7EC7B2080A for ; Wed, 12 Jun 2019 10:59:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="c+ee9vXe"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="5D2vjrT7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7EC7B2080A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-ID:In-Reply-To: References:Message-ID:Date:Subject:To:From:Reply-To:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hSDeFf7vmOaAUqhyNY6k/4Ic0ZuAhfSLEYP8gDZM9UE=; b=c+ee9vXeLHiQVA /9w8CJ51gvMXSWVMUYeJpH3268rwbWHs6ye/JARb/StT0J2Jx263FUyMQYdVyC2FgrJ8JMZCz5j1w mwL3A6fGqm+y3lqWLKYM9W0i1bYS21htI4wV9yAwe1s7SqK1jrZ2NojvkGAe1hzIcl0AGx0S2f84s +uFfbWhThCgWK1oqhQzyOZhcbbVdlwTQhKCxMl9dz7sER4q1ZIEyY6pxzk5Qb0QkImcdGrAFGjkEY bnuKjSN/AaNc2/v/URylq8pkOHfbg12q7X798zxf/ZjEwpnzh0t8J6wMUGcxZHsSNfbIAfWZDDcCu 48kUHXYOhbnCV3hNKXKg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hb0y5-0005m0-HK; Wed, 12 Jun 2019 10:59:01 +0000 Received: from mail-eopbgr140048.outbound.protection.outlook.com ([40.107.14.48] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hb0y1-0005hz-Aa for linux-arm-kernel@lists.infradead.org; Wed, 12 Jun 2019 10:58:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Xcp+cCzrvr1L1Y3g/ZOjI4rjJKJnTitnnFBsYnd4tTc=; b=5D2vjrT7ELZ4PSO1CIC+gb6xItFFrgxUGjg7j8qv0In9NeKeCOP+p6foCRqJ5EmFmZ3kVF2pNXIHHw8tDnK9HemsnX4+Y2Z7RdY/VmBB5ENLaNATTZYIJBCyQ2IrviygPoXlSx7JtbDUqbSRb+lwsd3sikdwVo+zxUyyaAf2n14= Received: from DB8PR08MB4105.eurprd08.prod.outlook.com (20.179.12.12) by DB8PR08MB3963.eurprd08.prod.outlook.com (20.179.10.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.14; Wed, 12 Jun 2019 10:58:52 +0000 Received: from DB8PR08MB4105.eurprd08.prod.outlook.com ([fe80::b4db:b3ed:75ff:167]) by DB8PR08MB4105.eurprd08.prod.outlook.com ([fe80::b4db:b3ed:75ff:167%3]) with mapi id 15.20.1965.017; Wed, 12 Jun 2019 10:58:52 +0000 From: Steve Capper To: Catalin Marinas Subject: Re: [PATCH v2 08/12] arm64: mm: Logic to make offset_ttbr1 conditional Thread-Topic: [PATCH v2 08/12] arm64: mm: Logic to make offset_ttbr1 conditional Thread-Index: AQHVFXAfaxebuXEqpEyNVdQ5jZ056aaVA8yAgALs6oA= Date: Wed, 12 Jun 2019 10:58:52 +0000 Message-ID: <20190612105841.GA1763@capper-debian.cambridge.arm.com> References: <20190528161026.13193-1-steve.capper@arm.com> <20190528161026.13193-9-steve.capper@arm.com> <20190610141813.GA10165@c02tf0j2hf1t.cambridge.arm.com> In-Reply-To: <20190610141813.GA10165@c02tf0j2hf1t.cambridge.arm.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mutt/1.10.1 (2018-07-13) x-originating-ip: [217.140.106.32] x-clientproxiedby: DM5PR18CA0065.namprd18.prod.outlook.com (2603:10b6:3:22::27) To DB8PR08MB4105.eurprd08.prod.outlook.com (2603:10a6:10:b0::12) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Steve.Capper@arm.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1a0b794d-0d6c-4be2-19dc-08d6ef24f4b7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:DB8PR08MB3963; x-ms-traffictypediagnostic: DB8PR08MB3963: nodisclaimer: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 0066D63CE6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(136003)(366004)(39860400002)(376002)(52314003)(199004)(189003)(7736002)(256004)(81166006)(8676002)(81156014)(8936002)(5660300002)(68736007)(71190400001)(71200400001)(186003)(6436002)(4326008)(54906003)(6862004)(14454004)(6246003)(53936002)(6486002)(25786009)(316002)(52116002)(1076003)(3846002)(72206003)(6116002)(6636002)(11346002)(66066001)(6506007)(6512007)(76176011)(229853002)(386003)(478600001)(99286004)(486006)(44832011)(476003)(66476007)(64756008)(66446008)(102836004)(66556008)(58126008)(305945005)(33656002)(73956011)(66946007)(446003)(26005)(86362001)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB8PR08MB3963; H:DB8PR08MB4105.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: +OEudA56wAemrt7QgLMln9mlsXI0E+rA0mh8W+WJxwLZetvjE4gT6whmlbGPudlxTESgtm71E2Ff8wvuAXtBMpVcYouBWUIzj5a03wKru56zK7ovmeRfEsftVUZ2DTDsSwg97qLyq2fJL3N25pdF2d9suPGQ+kzOhM6nOQTNDfBLi9PI2d2KfiW+abDxHPZuaem3R/x2sk5EXCotVu042hvjh5TfN+/3U9SFYVigShGOJnodL2niSshiSYU8pz/hXWHCLHrefoedavsqOq20Qd3B2rEZuwgBILQzCvu4lXeq8b6gX+zjQqX3gWHdBRWKPUINuBoZnQCDEdfNulO5lhuSjfc36KC/zOO6Wh4EuN+M5UgXXdn97QHzlzoMG+w88QUNzpXLCxDq8NuN4TtcxZu2n0mhKoaittS6JYBxEcE= Content-ID: <95E897001FA79049B2F55EF37ED0ED8F@eurprd08.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1a0b794d-0d6c-4be2-19dc-08d6ef24f4b7 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jun 2019 10:58:52.6943 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Steve.Capper@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB3963 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190612_035857_385449_22DBAF15 X-CRM114-Status: GOOD ( 13.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "crecklin@redhat.com" , "ard.biesheuvel@linaro.org" , Marc Zyngier , "bhsharma@redhat.com" , Will Deacon , nd , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jun 10, 2019 at 03:18:13PM +0100, Catalin Marinas wrote: > Hi Steve, > Hi Catalin, > On Tue, May 28, 2019 at 05:10:22PM +0100, Steve Capper wrote: > > diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h > > index 039fbd822ec6..a42c392ed1e1 100644 > > --- a/arch/arm64/include/asm/assembler.h > > +++ b/arch/arm64/include/asm/assembler.h > > @@ -548,6 +548,14 @@ USER(\label, ic ivau, \tmp2) // invalidate I line PoU > > .macro offset_ttbr1, ttbr > > #ifdef CONFIG_ARM64_USER_VA_BITS_52 > > orr \ttbr, \ttbr, #TTBR1_BADDR_4852_OFFSET > > +#endif > > + > > +#ifdef CONFIG_ARM64_USER_KERNEL_VA_BITS_52 > > +alternative_if_not ARM64_HAS_52BIT_VA > > + orr \ttbr, \ttbr, #TTBR1_BADDR_4852_OFFSET > > +alternative_else > > + nop > > +alternative_endif > > #endif > > .endm > > As a nitpick, you could write alternative_else_not_endif instead of the > last three lines. > Thanks yeah that makes it easier to read. > Anyway, we use offset_ttbr1 in a few early cases via > idmap_cpu_replace_ttbr1 where the alternative framework hasn't got the > chance to patch the instructions. I suggest you open-code the feature > check in here, I don't think we use this on any fast path. > Apologies for not spotting that, okay, I'll query the vabits_actual inside idmap_cpu_replace_ttbr1. Cheers, -- Steve _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel