From patchwork Wed Dec 3 20:06:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Bellows X-Patchwork-Id: 41873 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1411E25E8C for ; Wed, 3 Dec 2014 20:12:58 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id y19sf10019744wgg.3 for ; Wed, 03 Dec 2014 12:12:57 -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=hklxeO8REqzHPRUQ9sfYAIJezX30VO6DTogk4wLA2Hc=; b=FbO2tmGM3fro/kQaPFZUl/3RybrGPXZcCExZ1R10ywBSsC6ludqUaQaLg94VoDFO7S Ia/2RVW5B9bxFNc9QGDQbXI9RahM/KMKTtID7KQXdA8QirB7bnj13+RduBfYN6R2Bttv QK+ixga6iJpDe4BGKg6496zkWZ0EPJqgA/yosppOinCCkkW7Hz0aJdhiRcf/q4kqTHRu 27bAv9hMOutVjR5VS2RrJDFGJkvzR40XSNvxXb+5sAeRy4oCyQVPE6Q+Uhjt852RYISj Wm2xcUjJhIgyaXK5CHCeWBpzOTwirwMehd4XBSGhNcaabMFr16vHVPKFAmPDTLZNhsu0 OeTg== X-Gm-Message-State: ALoCoQlFr07pHo+LvJNMEgAyTrH56p7j3gXyNiW3hT7aoa3UDpMoWV/BW6TMpOXierptHOlHhtsI X-Received: by 10.194.104.227 with SMTP id gh3mr8758wjb.7.1417637577352; Wed, 03 Dec 2014 12:12:57 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.7 with SMTP id 7ls178030laq.88.gmail; Wed, 03 Dec 2014 12:12:57 -0800 (PST) X-Received: by 10.112.167.200 with SMTP id zq8mr5864960lbb.61.1417637577096; Wed, 03 Dec 2014 12:12:57 -0800 (PST) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id b9si23956458lah.61.2014.12.03.12.12.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Dec 2014 12:12:57 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by mail-lb0-f173.google.com with SMTP id z12so12693410lbi.4 for ; Wed, 03 Dec 2014 12:12:57 -0800 (PST) X-Received: by 10.152.43.103 with SMTP id v7mr5917187lal.29.1417637576981; Wed, 03 Dec 2014 12:12:56 -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.184.201 with SMTP id ew9csp731515lbc; Wed, 3 Dec 2014 12:12:56 -0800 (PST) X-Received: by 10.180.76.201 with SMTP id m9mr102264740wiw.52.1417637576379; Wed, 03 Dec 2014 12:12:56 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id gf1si13234173wib.18.2014.12.03.12.12.56 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 03 Dec 2014 12:12:56 -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]:43192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwGIA-0007lu-UH for patch@linaro.org; Wed, 03 Dec 2014 15:12:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwGBz-0006mt-Md for qemu-devel@nongnu.org; Wed, 03 Dec 2014 15:06:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XwGBt-0003Xs-RX for qemu-devel@nongnu.org; Wed, 03 Dec 2014 15:06:31 -0500 Received: from mail-oi0-f52.google.com ([209.85.218.52]:39166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwGBt-0003Xi-O0 for qemu-devel@nongnu.org; Wed, 03 Dec 2014 15:06:25 -0500 Received: by mail-oi0-f52.google.com with SMTP id h136so11258407oig.39 for ; Wed, 03 Dec 2014 12:06:25 -0800 (PST) X-Received: by 10.60.145.167 with SMTP id sv7mr4342349oeb.38.1417637185423; Wed, 03 Dec 2014 12:06:25 -0800 (PST) Received: from gbellows-linaro.bellowshome.net (99-179-1-128.lightspeed.austtx.sbcglobal.net. [99.179.1.128]) by mx.google.com with ESMTPSA id mq4sm11787321obb.22.2014.12.03.12.06.24 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Dec 2014 12:06:24 -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: Wed, 3 Dec 2014 14:06:03 -0600 Message-Id: <1417637167-20640-10-git-send-email-greg.bellows@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1417637167-20640-1-git-send-email-greg.bellows@linaro.org> References: <1417637167-20640-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.218.52 Cc: Greg Bellows Subject: [Qemu-devel] [PATCH 09/13] 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.173 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);