Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp7196436imm; Sun, 20 May 2018 21:22:07 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoPw5oV5FF2E7fAeCGD6ToYT3kRyWpjROw+mXh9Ik/2UeWM7bx+Jy9TZW6j2cci5sQffd5r X-Received: by 2002:a17:902:6b0c:: with SMTP id o12-v6mr18624274plk.159.1526876527299; Sun, 20 May 2018 21:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526876527; cv=none; d=google.com; s=arc-20160816; b=fczeqhI16yTE4dIE6NWTBPZVZ0NooxVCdsW/rPNn3WtNsuiP3Bsfa5ZcuVeB8seAg9 OcORnMfDg8xdHLBWdh9VdDaQU+zTzAbyCHSY/+SYE8+FlfwIvIgscfVBf+cAu8WAa53/ lSfUIg5LZHNB8uv7uYvdce8WUtaqlF6ZKnV7NA9raXAM9rO/6VjwILrRwfwHINjcdJA0 38WVypGw5OET4oACiEgfH7SR7PbnGtEnVgTfCBBA9DTvvaIYKennmKCRhXbBJ8r7ZTa0 Pcr5Pg1IIWUB4GrTkK6qMyKiDftO9pwv4IbjHllgMXk2pEy8QRR2YMYVEN4fQ9uWrHtP e0XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=deGfZzv7jdkoE7G0pMOS/lcEy2SlXkdahgJjj7wjrrQ=; b=mbAdH0n2pKx8AJMt2rPOCgbJXKVxNeNfQEjMkzvy4fIvEaufxVi4UGi377UzuOPs7Q WHEeMdlnGvYN6ask5QR9OpI4vwQ7lklh9BKStpyxMvlO9cOcVWn00w8SAN/d9rWNCAKo sI4HWsCuuur0rit/H3Z1NTAParkagFYTyuRtNS+sDFXcUjffbcHJYQDf5A115GVeIFNm ppjgw/xg6Ewn+d32pYwGhC7MoTUCYnhcRKZEo5rIUhWMQN4o1U2XfrbsoYYjU6mi8kJs frPlrRcpYwCKzT5RIQLmzweaAsLynPnngv6n41wZnC/vakheIG9M8iXxsUeob/nMyMcB A1wg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n4-v6si13253093pfk.277.2018.05.20.21.21.53; Sun, 20 May 2018 21:22:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751120AbeEUEVf (ORCPT + 99 others); Mon, 21 May 2018 00:21:35 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:34522 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751019AbeEUEVd (ORCPT ); Mon, 21 May 2018 00:21:33 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4L4J3tj121325 for ; Mon, 21 May 2018 00:21:33 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 2j3hvysf0c-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 21 May 2018 00:21:32 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 21 May 2018 05:21:30 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 21 May 2018 05:21:27 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4L4LRZp44957906; Mon, 21 May 2018 04:21:27 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B1FB2AE055; Mon, 21 May 2018 05:10:42 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 342F4AE045; Mon, 21 May 2018 05:10:40 +0100 (BST) Received: from bangoria.in.ibm.com (unknown [9.109.219.149]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 21 May 2018 05:10:40 +0100 (BST) From: Ravi Bangoria To: mpe@ellerman.id.au, mikey@neuling.org Cc: benh@kernel.crashing.org, paulus@samba.org, naveen.n.rao@linux.vnet.ibm.com, matthew.brown.dev@gmail.com, cyrilbur@gmail.com, anton@samba.org, sandipan@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Ravi Bangoria Subject: [PATCH 3/3] powerpc/sstep: Fix emulate_step test if VSX not present Date: Mon, 21 May 2018 09:51:08 +0530 X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180521042108.8318-1-ravi.bangoria@linux.ibm.com> References: <20180521042108.8318-1-ravi.bangoria@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18052104-0008-0000-0000-000004F8A570 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18052104-0009-0000-0000-00001E8D2B41 Message-Id: <20180521042108.8318-4-ravi.bangoria@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-21_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805210051 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org emulate_step() tests are failing if VSX is not supported or disabled. emulate_step_test: lxvd2x : FAIL emulate_step_test: stxvd2x : FAIL If !CPU_FTR_VSX, emulate_step() failure is expected and testcase should PASS with a valid justification. After patch: emulate_step_test: lxvd2x : PASS (!CPU_FTR_VSX) emulate_step_test: stxvd2x : PASS (!CPU_FTR_VSX) Signed-off-by: Ravi Bangoria --- arch/powerpc/lib/test_emulate_step.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/lib/test_emulate_step.c b/arch/powerpc/lib/test_emulate_step.c index 2534c1447554..6c47daa61614 100644 --- a/arch/powerpc/lib/test_emulate_step.c +++ b/arch/powerpc/lib/test_emulate_step.c @@ -387,10 +387,14 @@ static void __init test_lxvd2x_stxvd2x(void) /* lxvd2x vsr39, r3, r4 */ stepped = emulate_step(®s, TEST_LXVD2X(39, 3, 4)); - if (stepped == 1) + if (stepped == 1 && cpu_has_feature(CPU_FTR_VSX)) { show_result("lxvd2x", "PASS"); - else - show_result("lxvd2x", "FAIL"); + } else { + if (!cpu_has_feature(CPU_FTR_VSX)) + show_result("lxvd2x", "PASS (!CPU_FTR_VSX)"); + else + show_result("lxvd2x", "FAIL"); + } /*** stxvd2x ***/ @@ -404,10 +408,15 @@ static void __init test_lxvd2x_stxvd2x(void) stepped = emulate_step(®s, TEST_STXVD2X(39, 3, 4)); if (stepped == 1 && cached_b[0] == c.b[0] && cached_b[1] == c.b[1] && - cached_b[2] == c.b[2] && cached_b[3] == c.b[3]) + cached_b[2] == c.b[2] && cached_b[3] == c.b[3] && + cpu_has_feature(CPU_FTR_VSX)) { show_result("stxvd2x", "PASS"); - else - show_result("stxvd2x", "FAIL"); + } else { + if (!cpu_has_feature(CPU_FTR_VSX)) + show_result("stxvd2x", "PASS (!CPU_FTR_VSX)"); + else + show_result("stxvd2x", "FAIL"); + } } #else static void __init test_lxvd2x_stxvd2x(void) -- 2.16.2