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: 417537 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id BE9D11400D5 for ; Thu, 4 Dec 2014 07:12:40 +1100 (AEDT) Received: from localhost ([::1]:43192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwGHu-0007lu-Rx for incoming@patchwork.ozlabs.org; Wed, 03 Dec 2014 15:12:38 -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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=hklxeO8REqzHPRUQ9sfYAIJezX30VO6DTogk4wLA2Hc=; b=MHNKHZZVaMOeJXzrmB3U0Yc0YXlSEQ8NM8cBFURp2W4ueAsLVYYjAhdEHiwR38vk0l bbjMGs5bN/1kyScQ0PtdwrsUm6SeKOwbPNeA0r44N6Jslvl8YpydUvLElr2+Rmaj0s8l ESkZ1yQtw4ZamFuup6xLjZa5rXuKcAz2A/Bi54eCN569SDnkp56dEllUR7AbSr5qxun4 Hja4IjtrQSEhipGByXxL4lR3D2MZkqZ4srGelKRjbrRukIH93UEdlvKJ/SbVCVIbC2Ps MWQUT/1gyTx1sDp8du97jkA5QNAjW+PXKNbfCvKpKo90tpI/8UxyoXhMppPkAfRAdB2c TzWA== X-Gm-Message-State: ALoCoQkZPq2Diu2ep1FlPWAVBrXWvxdix6uEBXIX8IOr8+pLjTkyO8aajT6XcX9/2koiTVRPEji5 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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);