From patchwork Fri Apr 15 02:06:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Blanchard X-Patchwork-Id: 8844291 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5C8B39F3A0 for ; Fri, 15 Apr 2016 02:06:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B24F7202FF for ; Fri, 15 Apr 2016 02:06:57 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 764B620270 for ; Fri, 15 Apr 2016 02:06:56 +0000 (UTC) Received: from localhost ([::1]:51660 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqt9r-0003NX-GN for patchwork-qemu-devel@patchwork.kernel.org; Thu, 14 Apr 2016 22:06:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqt9i-0003DA-Hm for qemu-devel@nongnu.org; Thu, 14 Apr 2016 22:06:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqt9h-0006ls-HW for qemu-devel@nongnu.org; Thu, 14 Apr 2016 22:06:46 -0400 Received: from hr2.samba.org ([2a01:4f8:192:486::147:1]:55982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqt9h-0006lP-7N; Thu, 14 Apr 2016 22:06:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42627210; h=Message-ID:Cc:To:From:Date; bh=y65E+vzE1CyxeKijM+xuEDV97TAxB2kswvVj8CKfVZU=; b=UZUrMfz3jtHoeMfWZsqOQ4MnpxGFViYWftDMRNEegVnZHgI/u5mrLCScX74v9WiEC+tU/H6AxvPEeMTh78kfsscz1l4LMU6ZCSY2hFQGy2fj6ZNCZWOVz0GlnAbRR5/ThHcWgGQBz25AS3Kp6VqNkbqo1eSbvb6v5HRy+mxywGA=; Received: from [127.0.0.2] (localhost [127.0.0.1]) by hr2.samba.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim) id 1aqt9S-0001BF-TF; Fri, 15 Apr 2016 02:06:31 +0000 Date: Fri, 15 Apr 2016 12:06:13 +1000 From: Anton Blanchard To: Alexey Kardashevskiy , Michael Ellerman , Paul Mackerras , Benjamin Herrenschmidt , Michael Neuling , David Gibson , Alexander Graf Message-ID: <20160415120613.1bbdc5d5@kryten> In-Reply-To: <20160404211112.66b0756f@kryten> References: <20160404164457.539a55f0@kryten> <57021123.6050506@ozlabs.ru> <20160404204346.1cf44df8@kryten> <20160404211112.66b0756f@kryten> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 2a01:4f8:192:486::147:1 Subject: [Qemu-devel] [PATCH 1/3] powerpc: scan_features() updates incorrect bits X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, linuxppc-dev@lists.ozlabs.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The real LE feature entry in the ibm_pa_feature struct has the wrong number of elements. Instead of checking for byte 5, bit 0, we check for byte 0, bit 0, and we also incorrectly update cpu user feature bit 5. Fixes: 44ae3ab3358e ("powerpc: Free up some CPU feature bits by moving out MMU-related features") Signed-off-by: Anton Blanchard Cc: stable@vger.kernel.org --- arch/powerpc/kernel/prom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 7030b03..9a3a7c6 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -158,7 +158,7 @@ static struct ibm_pa_feature { {CPU_FTR_NOEXECUTE, 0, 0, 0, 6, 0}, {CPU_FTR_NODSISRALIGN, 0, 0, 1, 1, 1}, {0, MMU_FTR_CI_LARGE_PAGE, 0, 1, 2, 0}, - {CPU_FTR_REAL_LE, PPC_FEATURE_TRUE_LE, 5, 0, 0}, + {CPU_FTR_REAL_LE, PPC_FEATURE_TRUE_LE, 0, 5, 0, 0}, /* * If the kernel doesn't support TM (ie. CONFIG_PPC_TRANSACTIONAL_MEM=n), * we don't want to turn on CPU_FTR_TM here, so we use CPU_FTR_TM_COMP