From patchwork Sat Feb 2 15:13:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 14418 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id D12864C17CE for ; Sat, 2 Feb 2013 15:13:08 +0000 (UTC) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by fiordland.canonical.com (Postfix) with ESMTP id 81B6BA18BFB for ; Sat, 2 Feb 2013 15:13:08 +0000 (UTC) Received: by mail-vc0-f171.google.com with SMTP id p1so3081729vcq.30 for ; Sat, 02 Feb 2013 07:13:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=+UO/x70lZs3WCZauRnptK4X7di0Xyj7UkPMo2wM6jP0=; b=IpkjeKHz1nRx74NZEoV2oc4+Yp8ZIQpsiCyMwqU84Z1g4fA+2vxpfI3eDm9Nnf7DY4 Ft8z8Lyfr7z/0WvjMXjBSoGlgu2s2eG/Zu+AETRjiXCZv6cFRVQhZWp2vyeJlHhpt1kh 1poQAWmKBkc2lLEPTeZ7DrHk61JThbnDMKRRkuSvRQK8IwnBZvzoIX0O+scN8YB3oAIW 1JhF2vtgVqSKsFnprCd8xYrJUsCiS0zNn/JbdSkUC3KGEposg8yv8q90wnapsJfgZI5L kYZd1MMO2mGQ8hLn8f9UeJYyC+TWHW1I2EX1B6lug348TlGfkNlNkqWexOPzp4y3eR97 KLNg== X-Received: by 10.52.21.146 with SMTP id v18mr12646266vde.79.1359817987893; Sat, 02 Feb 2013 07:13:07 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.252.8 with SMTP id zo8csp12577vec; Sat, 2 Feb 2013 07:13:07 -0800 (PST) X-Received: by 10.180.109.195 with SMTP id hu3mr2788300wib.31.1359817986295; Sat, 02 Feb 2013 07:13:06 -0800 (PST) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id o8si1726350wix.7.2013.02.02.07.13.04 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 02 Feb 2013 07:13:06 -0800 (PST) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Authentication-Results: mx.google.com; spf=neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1U1em6-0006uc-KT; Sat, 02 Feb 2013 15:13:02 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Jonathan Gray , Brad Smith , Andrzej Zaborowski Subject: [PATCH for-1.4] hw/pxa2xx: Fix transposed crn/crm values for pxa2xx cp14 perf regs Date: Sat, 2 Feb 2013 15:13:02 +0000 Message-Id: <1359817982-26547-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-Gm-Message-State: ALoCoQmC0vzERqBAZnYeNT5KR4lJc0krGWoi2mfHCe4bJWJnOcpHIWu2XvhmKqhzShbMOVHmkjDZ When the pxa2xx performance counter related cp14 registers were converted from a switch-statement implementation to the new table driven cpregs format in commit dc2a9045c, the crn and crm values for all these registers were accidentally transposed. Fix this mistake, which was causing OpenBSD for Zaurus to fail to boot. Reported-by: Jonathan Gray Signed-off-by: Peter Maydell --- This is 1.4 material as it is a regression. I hadn't noticed this before because my Linux test image for zaurus doesn't seem to touch these registers. hw/pxa2xx.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/pxa2xx.c b/hw/pxa2xx.c index 373d061..d303320 100644 --- a/hw/pxa2xx.c +++ b/hw/pxa2xx.c @@ -343,23 +343,23 @@ static int pxa2xx_cpccnt_read(CPUARMState *env, const ARMCPRegInfo *ri, } static const ARMCPRegInfo pxa_cp_reginfo[] = { - /* cp14 crn==1: perf registers */ - { .name = "CPPMNC", .cp = 14, .crn = 1, .crm = 0, .opc1 = 0, .opc2 = 0, + /* cp14 crm==1: perf registers */ + { .name = "CPPMNC", .cp = 14, .crn = 0, .crm = 1, .opc1 = 0, .opc2 = 0, .access = PL1_RW, .readfn = pxa2xx_cppmnc_read, .writefn = pxa2xx_cppmnc_write }, { .name = "CPCCNT", .cp = 14, .crn = 1, .crm = 1, .opc1 = 0, .opc2 = 0, .access = PL1_RW, .readfn = pxa2xx_cpccnt_read, .writefn = arm_cp_write_ignore }, - { .name = "CPINTEN", .cp = 14, .crn = 1, .crm = 4, .opc1 = 0, .opc2 = 0, + { .name = "CPINTEN", .cp = 14, .crn = 4, .crm = 1, .opc1 = 0, .opc2 = 0, .access = PL1_RW, .type = ARM_CP_CONST, .resetvalue = 0 }, - { .name = "CPFLAG", .cp = 14, .crn = 1, .crm = 5, .opc1 = 0, .opc2 = 0, + { .name = "CPFLAG", .cp = 14, .crn = 5, .crm = 1, .opc1 = 0, .opc2 = 0, .access = PL1_RW, .type = ARM_CP_CONST, .resetvalue = 0 }, - { .name = "CPEVTSEL", .cp = 14, .crn = 1, .crm = 8, .opc1 = 0, .opc2 = 0, + { .name = "CPEVTSEL", .cp = 14, .crn = 8, .crm = 1, .opc1 = 0, .opc2 = 0, .access = PL1_RW, .type = ARM_CP_CONST, .resetvalue = 0 }, - /* cp14 crn==2: performance count registers */ - { .name = "CPPMN0", .cp = 14, .crn = 2, .crm = 0, .opc1 = 0, .opc2 = 0, + /* cp14 crm==2: performance count registers */ + { .name = "CPPMN0", .cp = 14, .crn = 0, .crm = 2, .opc1 = 0, .opc2 = 0, .access = PL1_RW, .type = ARM_CP_CONST, .resetvalue = 0 }, - { .name = "CPPMN1", .cp = 14, .crn = 2, .crm = 1, .opc1 = 0, .opc2 = 0, + { .name = "CPPMN1", .cp = 14, .crn = 1, .crm = 2, .opc1 = 0, .opc2 = 0, .access = PL1_RW, .type = ARM_CP_CONST, .resetvalue = 0 }, { .name = "CPPMN2", .cp = 14, .crn = 2, .crm = 2, .opc1 = 0, .opc2 = 0, .access = PL1_RW, .type = ARM_CP_CONST, .resetvalue = 0 },