From patchwork Mon Dec 15 18:51:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Bellows X-Patchwork-Id: 42278 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 65BEA2456A for ; Mon, 15 Dec 2014 18:55:07 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id b13sf7643553wgh.5 for ; Mon, 15 Dec 2014 10:55:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=6ziNNEp/GrYWrrRPtxfk4GmJIQ0DKRhaQcfMbpirD6M=; b=PyTbFi4eljmu4cz7DNpkNt1HwCYdFBU9R2uxeH+GRsQetDO2vawYLJqPk7gf04WYd/ byMGqYbAoZlLGXdSqlYXR3KO5O2v7q7B50KRta7P1gmaAVBnFeki/FegQIkKR4s7F0Zt Vd8SEB/3wyf586GA3UdN7fxpzqgQSOJMO+pjInJ9TWsly3Yux26UiTu8SBztJApl4mTT szMdaO7MoBuQBshsckVEdVTb5Zvl8iZ7irNHBoSqBvXwbkzX8j1B+JXpjrG416Yrqqrj BpTQZpV3L8p+/MoIKY9QMot/mJprW1q8T3yT8KmbvTbl2TvmCZr5ufyVar7bEq8Amqq5 1ykQ== X-Gm-Message-State: ALoCoQkWUlJvdDVKYZFm61JzU1M2W4OS/U3JRBHHF++1+g8msUvc2tbpEh2ezSqG+nI8ImFqNYuW X-Received: by 10.112.138.234 with SMTP id qt10mr5003025lbb.4.1418669706597; Mon, 15 Dec 2014 10:55:06 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.166 with SMTP id u6ls799043lag.41.gmail; Mon, 15 Dec 2014 10:55:06 -0800 (PST) X-Received: by 10.112.169.34 with SMTP id ab2mr2609258lbc.77.1418669706363; Mon, 15 Dec 2014 10:55:06 -0800 (PST) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id iy10si11307412lbc.71.2014.12.15.10.55.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Dec 2014 10:55:06 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by mail-lb0-f177.google.com with SMTP id b6so9640852lbj.36 for ; Mon, 15 Dec 2014 10:55:06 -0800 (PST) X-Received: by 10.112.219.37 with SMTP id pl5mr29004731lbc.25.1418669706232; Mon, 15 Dec 2014 10:55:06 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.142.69 with SMTP id ru5csp809315lbb; Mon, 15 Dec 2014 10:55:05 -0800 (PST) X-Received: by 10.140.96.101 with SMTP id j92mr55354148qge.87.1418669704842; Mon, 15 Dec 2014 10:55:04 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id w3si11565156qad.83.2014.12.15.10.55.04 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 15 Dec 2014 10:55:04 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:41471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0anP-0005Pt-Vn for patch@linaro.org; Mon, 15 Dec 2014 13:55:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0akG-0000bn-SP for qemu-devel@nongnu.org; Mon, 15 Dec 2014 13:51:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0akA-0005vO-SQ for qemu-devel@nongnu.org; Mon, 15 Dec 2014 13:51:48 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:63438) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0akA-0005vG-Nh for qemu-devel@nongnu.org; Mon, 15 Dec 2014 13:51:42 -0500 Received: by mail-pa0-f52.google.com with SMTP id eu11so12412839pac.39 for ; Mon, 15 Dec 2014 10:51:42 -0800 (PST) X-Received: by 10.70.5.68 with SMTP id q4mr54275317pdq.116.1418669502175; Mon, 15 Dec 2014 10:51:42 -0800 (PST) Received: from gbellows-linaro.qualcomm.com (rrcs-67-52-129-61.west.biz.rr.com. [67.52.129.61]) by mx.google.com with ESMTPSA id bq7sm9972513pdb.50.2014.12.15.10.51.40 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Dec 2014 10:51:41 -0800 (PST) From: Greg Bellows To: qemu-devel@nongnu.org, serge.fdrv@gmail.com, edgar.iglesias@gmail.com, aggelerf@ethz.ch, peter.maydell@linaro.org Date: Mon, 15 Dec 2014 12:51:12 -0600 Message-Id: <1418669479-23908-9-git-send-email-greg.bellows@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1418669479-23908-1-git-send-email-greg.bellows@linaro.org> References: <1418669479-23908-1-git-send-email-greg.bellows@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.220.52 Cc: Greg Bellows Subject: [Qemu-devel] [PATCH v3 08/15] target-arm: Add feature unset function X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: greg.bellows@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Add an unset_feature() function to compliment the set_feature() function. This will be used to disable functions after they have been enabled during initialization. Signed-off-by: Greg Bellows Reviewed-by: Peter Maydell --- target-arm/cpu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target-arm/cpu.c b/target-arm/cpu.c index d3db279..01afed2 100644 --- a/target-arm/cpu.c +++ b/target-arm/cpu.c @@ -327,6 +327,11 @@ static inline void set_feature(CPUARMState *env, int feature) env->features |= 1ULL << feature; } +static inline void unset_feature(CPUARMState *env, int feature) +{ + env->features &= ~(1ULL << feature); +} + static void arm_cpu_initfn(Object *obj) { CPUState *cs = CPU(obj);