From patchwork Fri May 17 13:23:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 17030 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f200.google.com (mail-qc0-f200.google.com [209.85.216.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 92FCB238F0 for ; Fri, 17 May 2013 13:24:53 +0000 (UTC) Received: by mail-qc0-f200.google.com with SMTP id n10sf636028qcx.7 for ; Fri, 17 May 2013 06:24:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=axz9zS1TWPWfUEm7tqyerwu1bkm1NuU+eWAGUL62zzI=; b=I/J9ttNl/SOIFNncKT+S/2nNWfO9e4Nc879mhSdPGnP8f8Z4zkl1Q+95Ae481xcHAe p43ONe7uLQvJcXp9nSgaQaBIECGzj5ZRCnDw4IuERUrzHEmM1b9U2tQOWNv1mlLISCiR YIqeGPq+O6NQO/oIRMHLiqlyMO8mMNa8+m2OM4azh0sKVDMEX2vZPoJxqAjH3o28RfNr wwqZeIaJim6vnHH7oEf6AtYpGOuQt2A6rzA5gmkGueTbRVi4/nyfS1DURTw1b2E+G05P SMRsR9wnZWgRwhtlsS7s33Qz87VBBp/AWMXXUYp2mbqFo0Amn5s3iAxuWbgJlCatw8/Z FCqg== X-Received: by 10.236.119.106 with SMTP id m70mr13207917yhh.52.1368797052143; Fri, 17 May 2013 06:24:12 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.103.132 with SMTP id fw4ls1633960qeb.17.gmail; Fri, 17 May 2013 06:24:12 -0700 (PDT) X-Received: by 10.52.245.100 with SMTP id xn4mr10401487vdc.46.1368797051978; Fri, 17 May 2013 06:24:11 -0700 (PDT) Received: from mail-ve0-x22d.google.com (mail-ve0-x22d.google.com [2607:f8b0:400c:c01::22d]) by mx.google.com with ESMTPS id iz8si5804850vdb.149.2013.05.17.06.24.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 May 2013 06:24:11 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22d is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::22d; Received: by mail-ve0-f173.google.com with SMTP id cy12so4019301veb.32 for ; Fri, 17 May 2013 06:24:11 -0700 (PDT) X-Received: by 10.52.20.210 with SMTP id p18mr25081050vde.42.1368797051743; Fri, 17 May 2013 06:24:11 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.126.138 with SMTP id c10csp109547vcs; Fri, 17 May 2013 06:24:11 -0700 (PDT) X-Received: by 10.14.216.201 with SMTP id g49mr99358013eep.42.1368797047614; Fri, 17 May 2013 06:24:07 -0700 (PDT) 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 z5si16679997eee.118.2013.05.17.06.24.06 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 17 May 2013 06:24:07 -0700 (PDT) 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; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1UdKdZ-00071Z-Qn; Fri, 17 May 2013 14:23:57 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Juan Quintela , Andre Przywara , kvmarm@lists.cs.columbia.edu Subject: [PATCH 1/7] target-arm: Allow special cpregs to have flags set Date: Fri, 17 May 2013 14:23:51 +0100 Message-Id: <1368797037-26976-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1368797037-26976-1-git-send-email-peter.maydell@linaro.org> References: <1368797037-26976-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQlj1K2XTinV683VfGlSK1QBo04Ua7sGVPeK3mjJbR2my9M8DSsgLAuTsIolqfPKJpTYct0i X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22d is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Relax the "is this a valid ARMCPRegInfo type value?" check to permit "special" cpregs to have flags other than ARM_CP_SPECIAL set. At the moment none of the other flags are relevant for special regs, but the migration related flag we're about to introduce can apply here too. Signed-off-by: Peter Maydell --- target-arm/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 5438444..737c00c 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -456,7 +456,7 @@ static inline bool cptype_valid(int cptype) { return ((cptype & ~ARM_CP_FLAG_MASK) == 0) || ((cptype & ARM_CP_SPECIAL) && - (cptype <= ARM_LAST_SPECIAL)); + ((cptype & ~ARM_CP_FLAG_MASK) <= ARM_LAST_SPECIAL)); } /* Access rights: