From patchwork Mon Jan 6 10:03:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 11318899 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 42CC91395 for ; Mon, 6 Jan 2020 10:04:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 177BC20731 for ; Mon, 6 Jan 2020 10:04:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PZ1/oFAy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726446AbgAFKD7 (ORCPT ); Mon, 6 Jan 2020 05:03:59 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:52974 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726340AbgAFKD6 (ORCPT ); Mon, 6 Jan 2020 05:03:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578305037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KVFxRbez22q9Gf2bVcqgToctJQkjnrtfbjDduZGgw1E=; b=PZ1/oFAyhzeWw9zoi5cIMDGoKUXbDBPc79/GkFZMUJ3UMrSuuAaD6Rgcmf1UuNUMSdlQfT KkfyT4YeGotG2MLkfZCnIpDd16gTJ01UDZMptt6jK1tmQeG+p6AdJzEjfbgcl8lmtLzqr1 y6PnTb3azAhdbaoNzrG9YgsQBX6yQJ0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-194-Jry93YcuPnaq8rozuMQdSA-1; Mon, 06 Jan 2020 05:03:54 -0500 X-MC-Unique: Jry93YcuPnaq8rozuMQdSA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AFDFE800D48; Mon, 6 Jan 2020 10:03:53 +0000 (UTC) Received: from kamzik.brq.redhat.com (unknown [10.43.2.160]) by smtp.corp.redhat.com (Postfix) with ESMTP id AD78863BCA; Mon, 6 Jan 2020 10:03:52 +0000 (UTC) From: Andrew Jones To: kvm@vger.kernel.org, pbonzini@redhat.com Cc: Alexander Graf Subject: [PULL kvm-unit-tests 03/17] arm/arm64: PL031: Fix check_rtc_irq Date: Mon, 6 Jan 2020 11:03:33 +0100 Message-Id: <20200106100347.1559-4-drjones@redhat.com> In-Reply-To: <20200106100347.1559-1-drjones@redhat.com> References: <20200106100347.1559-1-drjones@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Since QEMU commit 83ad95957c7e ("pl031: Expose RTCICR as proper WC register") the PL031 test gets into an infinite loop. Now we must write bit zero of RTCICR to clear the IRQ status. Before, writing anything to RTCICR would work. As '1' is a member of 'anything' writing it should work for old QEMU as well. Cc: Alexander Graf Signed-off-by: Andrew Jones Reviewed-by: Alexander Graf --- arm/pl031.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arm/pl031.c b/arm/pl031.c index a6adf6845f55..86035fa407e6 100644 --- a/arm/pl031.c +++ b/arm/pl031.c @@ -143,8 +143,8 @@ static void irq_handler(struct pt_regs *regs) report(readl(&pl031->ris) == 1, " RTC RIS == 1"); report(readl(&pl031->mis) == 1, " RTC MIS == 1"); - /* Writing any value should clear IRQ status */ - writel(0x80000000ULL, &pl031->icr); + /* Writing one to bit zero should clear IRQ status */ + writel(1, &pl031->icr); report(readl(&pl031->ris) == 0, " RTC RIS == 0"); report(readl(&pl031->mis) == 0, " RTC MIS == 0");