From patchwork Sat Feb 8 12:58:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 183229 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1949295ile; Sat, 8 Feb 2020 05:04:17 -0800 (PST) X-Google-Smtp-Source: APXvYqyXgYMU5XsDOCJWAZv73H32FhLDQZu2SLVdEjvI5GhMYvuNUcHr81lqmkXJc31xVfhQHnH8 X-Received: by 2002:a05:620a:909:: with SMTP id v9mr3235479qkv.138.1581167057864; Sat, 08 Feb 2020 05:04:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581167057; cv=none; d=google.com; s=arc-20160816; b=EDs2IytlYd/hbMvaYATRBjjmWsHzpl2EEjI2InJg48ak0iNUtRZRyjsv6Nyilm3qzx IcAop6M4qC0Rm15etrAv63GvxSI18zK1njmZb1a9JZV0csDNsI2vtLw6MIeDFWXxYGJF dr53lZq1KWCwschxyi1bQtTzue/zt67U5YW/idJlEewFpV0z/v3E54gtxmeYnyT9ty5H zdRef6dWWo6BUG8R1Ssf0S/HHFXYftbUysXoJujqCGgRvbyfbYxpmTuUXloJoIpRVSZE tEvihuxJYBa4WB+yF4Ecv9+LNHdtkMYT4gV4cuMNm8AScYxojenV7Q2J+lTdfTiS4DcK kEhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Xngl1cCVNWBf5Cw2CDK8Z2YQwTs9m5X5G+obWGPZ0QA=; b=asP5ksG2r1Ky4wMgLxWj3LsOEsV6nzbqLvSelp/X9BBjZBeUgufk8X8h+Iz1Zv5ICR bjuod6lq/JN8b6q6pjqGCnjOYUscpDSlDs3jaLaa/LJFjdhFeIMGbXFrEP/2Bccg7rzc QWQgk1HhDchql4Bedrzt6vjyOQoWy/qO4bviuT56j6n5fW270TXx0/lEqQPf6EVy1ucM Lyz1pfBD1dI8ARdYqMhmGk/FDr2cDIgSB3al+g7LmGTmOGfe0TzBfnVaXXzo3TJSSmiX U/Mvo+1gc4w6pZbc4SmCVWMqZUCkZzg5S3yEVfRvfVN2SO9can3aJcBU63SBDSwAlFIx iSGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="LWk7/n+p"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w6si1460447qto.220.2020.02.08.05.04.17 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 08 Feb 2020 05:04:17 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="LWk7/n+p"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0PmT-0003dP-Cg for patch@linaro.org; Sat, 08 Feb 2020 08:04:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41354) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0Pgm-0000OW-8V for qemu-devel@nongnu.org; Sat, 08 Feb 2020 07:58:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0Pgl-0004cL-4q for qemu-devel@nongnu.org; Sat, 08 Feb 2020 07:58:24 -0500 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:43667) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j0Pgk-0004bd-VC for qemu-devel@nongnu.org; Sat, 08 Feb 2020 07:58:23 -0500 Received: by mail-wr1-x443.google.com with SMTP id z9so2005071wrs.10 for ; Sat, 08 Feb 2020 04:58:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Xngl1cCVNWBf5Cw2CDK8Z2YQwTs9m5X5G+obWGPZ0QA=; b=LWk7/n+pQ2K9hZ6tRT6LiceM3s6pSMhAvCYxDFMThl1whClL/r76NN8WLMhL2iVhc9 0ACHrMdAj9QrNNldc2fwWnR6B6ozWr7/yWznfyjnpuv5EnGHoXP/4YJreiW06u7Dif9X vG5ya3O3SiUlyIlo3NxFhnEqPTtvh/6EhKoMzn8EV2Bb2jELNgfhCUYReP0OtVqVH2wP E9njuPVvrP8E4lvB+j1LUZ2jQ1kRtdWu95vcZLxZ/TBHiiSu81e1VbiqWpzu1YL8JL5a R78IAEchsbjYHBD1/KsPqyKe+xJ6MeYK2Wnek9cGaQ8OKijVEOYr6k9MAryJW2qEpRB+ vztQ== 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=Xngl1cCVNWBf5Cw2CDK8Z2YQwTs9m5X5G+obWGPZ0QA=; b=VxqkYJw3UnxNKcNITemFv1j5aeanvcSrynB2LNBnJL2eyoF8Lx++frhrqueOIOO9IZ MVRG8mLOIkwOhDlrV9N5O+T/56QBnm/E7opEAzPAGKCbEFaFCA28AmDkRaGgih7PMbRh wPtbSvvZIvq82hIv2mSsNfQ9xd7k9IHN+pwSIQFUkaJsnTDC5UOgnVdJfuGfeAzn6Feq SWDYUuJSSWCjPdJs5TLf2F/nHeplWBea0sH8EFYZpQtE9++8L+r+n5ds/pN+NMilsl3D LxObe2jEW17Vr0bKkU+zPiFBxWsEmVLrY3dy5bsZj2EwnCXcCQNPmSRLfsdxZHy8b2Ic OMEQ== X-Gm-Message-State: APjAAAVZk/gmKFHeDuka9uIXaIcfEsHhFxKwOjHjN43phcUlqAkhVetT hJShjyenbHM0rdaaK4AxVKW6BF8aIblaXw== X-Received: by 2002:a5d:6ac4:: with SMTP id u4mr5299408wrw.318.1581166701812; Sat, 08 Feb 2020 04:58:21 -0800 (PST) Received: from localhost.localdomain ([82.3.55.76]) by smtp.gmail.com with ESMTPSA id p5sm7490534wrt.79.2020.02.08.04.58.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2020 04:58:21 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 04/20] target/arm: Move LOR regdefs to file scope Date: Sat, 8 Feb 2020 12:58:00 +0000 Message-Id: <20200208125816.14954-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200208125816.14954-1-richard.henderson@linaro.org> References: <20200208125816.14954-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" For static const regdefs, file scope is preferred. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target/arm/helper.c | 57 +++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 28 deletions(-) -- 2.20.1 diff --git a/target/arm/helper.c b/target/arm/helper.c index bfd6c0d04b..e4f17c7e83 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -6334,6 +6334,35 @@ static CPAccessResult access_lor_other(CPUARMState *env, return access_lor_ns(env); } +/* + * A trivial implementation of ARMv8.1-LOR leaves all of these + * registers fixed at 0, which indicates that there are zero + * supported Limited Ordering regions. + */ +static const ARMCPRegInfo lor_reginfo[] = { + { .name = "LORSA_EL1", .state = ARM_CP_STATE_AA64, + .opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 0, + .access = PL1_RW, .accessfn = access_lor_other, + .type = ARM_CP_CONST, .resetvalue = 0 }, + { .name = "LOREA_EL1", .state = ARM_CP_STATE_AA64, + .opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 1, + .access = PL1_RW, .accessfn = access_lor_other, + .type = ARM_CP_CONST, .resetvalue = 0 }, + { .name = "LORN_EL1", .state = ARM_CP_STATE_AA64, + .opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 2, + .access = PL1_RW, .accessfn = access_lor_other, + .type = ARM_CP_CONST, .resetvalue = 0 }, + { .name = "LORC_EL1", .state = ARM_CP_STATE_AA64, + .opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 3, + .access = PL1_RW, .accessfn = access_lor_other, + .type = ARM_CP_CONST, .resetvalue = 0 }, + { .name = "LORID_EL1", .state = ARM_CP_STATE_AA64, + .opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 7, + .access = PL1_R, .accessfn = access_lorid, + .type = ARM_CP_CONST, .resetvalue = 0 }, + REGINFO_SENTINEL +}; + #ifdef TARGET_AARCH64 static CPAccessResult access_pauth(CPUARMState *env, const ARMCPRegInfo *ri, bool isread) @@ -7568,34 +7597,6 @@ void register_cp_regs_for_features(ARMCPU *cpu) } if (cpu_isar_feature(aa64_lor, cpu)) { - /* - * A trivial implementation of ARMv8.1-LOR leaves all of these - * registers fixed at 0, which indicates that there are zero - * supported Limited Ordering regions. - */ - static const ARMCPRegInfo lor_reginfo[] = { - { .name = "LORSA_EL1", .state = ARM_CP_STATE_AA64, - .opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 0, - .access = PL1_RW, .accessfn = access_lor_other, - .type = ARM_CP_CONST, .resetvalue = 0 }, - { .name = "LOREA_EL1", .state = ARM_CP_STATE_AA64, - .opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 1, - .access = PL1_RW, .accessfn = access_lor_other, - .type = ARM_CP_CONST, .resetvalue = 0 }, - { .name = "LORN_EL1", .state = ARM_CP_STATE_AA64, - .opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 2, - .access = PL1_RW, .accessfn = access_lor_other, - .type = ARM_CP_CONST, .resetvalue = 0 }, - { .name = "LORC_EL1", .state = ARM_CP_STATE_AA64, - .opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 3, - .access = PL1_RW, .accessfn = access_lor_other, - .type = ARM_CP_CONST, .resetvalue = 0 }, - { .name = "LORID_EL1", .state = ARM_CP_STATE_AA64, - .opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 7, - .access = PL1_R, .accessfn = access_lorid, - .type = ARM_CP_CONST, .resetvalue = 0 }, - REGINFO_SENTINEL - }; define_arm_cp_regs(cpu, lor_reginfo); }