Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3442362imu; Sun, 11 Nov 2018 15:11:36 -0800 (PST) X-Google-Smtp-Source: AJdET5ekxW8s2IZTki+pFQT+c+QZfVs/EScE+XJIA+lZLbSv4J3Nruk7rU1/b349VLdqCZ9T/J96 X-Received: by 2002:a63:4815:: with SMTP id v21mr8520167pga.308.1541977896689; Sun, 11 Nov 2018 15:11:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977896; cv=none; d=google.com; s=arc-20160816; b=smBnZRU3DZw0VJ5zdsHKzVuxM5MYmuiKBQ8k/3oeIpJ6fAPSQ68PabLS9lvZnlLcZH UWrVTyp4GgPC8xqCUCHMbsYqmGerBug7HtnjmzlwO0RxKsufY5wxG/Qg09mnIEFWK99J +Irpf5Blw3RQZCq2fkIu8fRh9iCE2/3AWwwXQaHx1fNf/rcJiW/FyziFAqhJFAp1P5YO BxegZxVTrRq6H4VO5RK7hPh8Gu+5kMIR8eF6JYEROG3VpmeuzoBx+q20/SMMmHepUfVk htBk3ZCn6E4vNAp+hyn5mETI5QSrE6GExSsb2Gaspm7J6fdhI4a42YPYLoRwAfQLcJH8 ZynQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VIbCF+O3fvDp839u+54gaJSIZkD/kyrHkPVIsVXKQCg=; b=zMFfkWiIg5P2tjYsHiEKBPmFzKReyNbokAcVGibwOkzZlSoRbHKPpbi6vINjiKJfKA p6mtkqIkq3dMUirWhoMfN6gQgJiUqcMc3tRBheM0lJyDGkYd69AoplQ02ApU7l0ft7q9 ncBER4dk5GrD8GKg9NKJlUu86iVS3okmLmvw/X1ZnZyBI8dIbhoWCH7HAaUH5LmG5hp/ QqeDfBvjr0E70HhZnMWlIZ6XQ/2ZRs9gIYt21quETNOC0oTO8vYrlvNL36ewwFBhKLmJ zXnHkmCme9CF7lI92TgGCeZwsYPIeKkwXC7X0XZaCZnXe5DRgKvxzPHSQRcRATyTwmI3 G0Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Q6TBmW5h; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si16310081pll.361.2018.11.11.15.11.21; Sun, 11 Nov 2018 15:11:36 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=Q6TBmW5h; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390409AbeKLJBF (ORCPT + 99 others); Mon, 12 Nov 2018 04:01:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:50474 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388732AbeKLIV5 (ORCPT ); Mon, 12 Nov 2018 03:21:57 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B3FCA21707; Sun, 11 Nov 2018 22:32:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975520; bh=zrXT3I037duZhQ+X6irVHKiuhdAwMYuGinM7DikGUy0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q6TBmW5hObUXIIM0lku6CCUqLtkSViULP0ao8AXyP8i9rT5Parcbd77LD6HQzjXUi npqtQFP5pZV0pjFJ//uUmhYLirTWdYDFA3K5R6UbqS+Qu79DCdc21GuYFtbZANhzRS LIvPMNyzlSfA9wzwlwTba9lWNIUosDNkluFFeNLk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, John David Anglin , Helge Deller Subject: [PATCH 4.14 011/222] parisc: Fix address in HPMC IVA Date: Sun, 11 Nov 2018 14:21:48 -0800 Message-Id: <20181111221649.002436201@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: John David Anglin commit 1138b6718ff74d2a934459643e3754423d23b5e2 upstream. Helge noticed that the address of the os_hpmc handler was not being correctly calculated in the hpmc macro. As a result, PDCE_CHECK would fail to call os_hpmc: e800009802e00000 0000000000000000 CC_ERR_CHECK_HPMC 37000f7302e00000 8040004000000000 CC_ERR_CPU_CHECK_SUMMARY f600105e02e00000 fffffff0f0c00000 CC_MC_HPMC_MONARCH_SELECTED 140003b202e00000 000000000000000b CC_ERR_HPMC_STATE_ENTRY 5600100b02e00000 00000000000001a0 CC_MC_OS_HPMC_LEN_ERR 5600106402e00000 fffffff0f0438e70 CC_MC_BR_TO_OS_HPMC_FAILED e800009802e00000 0000000000000000 CC_ERR_CHECK_HPMC 37000f7302e00000 8040004000000000 CC_ERR_CPU_CHECK_SUMMARY 4000109f02e00000 0000000000000000 CC_MC_HPMC_INITIATED 4000101902e00000 0000000000000000 CC_MC_MULTIPLE_HPMCS 030010d502e00000 0000000000000000 CC_CPU_STOP The address problem can be seen by dumping the fault vector: 0000000040159000 : 40159000: 63 6f 77 73 stb r15,-2447(dp) 40159004: 20 63 61 6e ldil L%b747000,r3 40159008: 20 66 6c 79 ldil L%-1c3b3000,r3 ... 40159020: 08 00 02 40 nop 40159024: 20 6e 60 02 ldil L%15d000,r3 40159028: 34 63 00 00 ldo 0(r3),r3 4015902c: e8 60 c0 02 bv,n r0(r3) 40159030: 08 00 02 40 nop 40159034: 00 00 00 00 break 0,0 40159038: c0 00 70 00 bb,*< r0,sar,40159840 4015903c: 00 00 00 00 break 0,0 Location 40159038 should contain the physical address of os_hpmc: 000000004015d000 : 4015d000: 08 1a 02 43 copy r26,r3 4015d004: 01 c0 08 a4 mfctl iva,r4 4015d008: 48 85 00 68 ldw 34(r4),r5 This patch moves the address setup into initialize_ivt to resolve the above problem. I tested the change by dumping the HPMC entry after setup: 0000000040209020: 8000240 0000000040209024: 206a2004 0000000040209028: 34630ac0 000000004020902c: e860c002 0000000040209030: 8000240 0000000040209034: 1bdddce6 0000000040209038: 15d000 000000004020903c: 1a0 Signed-off-by: John David Anglin Cc: Signed-off-by: Helge Deller Signed-off-by: Greg Kroah-Hartman --- arch/parisc/kernel/entry.S | 2 +- arch/parisc/kernel/traps.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S @@ -185,7 +185,7 @@ bv,n 0(%r3) nop .word 0 /* checksum (will be patched) */ - .word PA(os_hpmc) /* address of handler */ + .word 0 /* address of handler */ .word 0 /* length of handler */ .endm --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c @@ -836,7 +836,8 @@ void __init initialize_ivt(const void *i if (pdc_instr(&instr) == PDC_OK) ivap[0] = instr; - /* Compute Checksum for HPMC handler */ + /* Setup IVA and compute checksum for HPMC handler */ + ivap[6] = (u32)__pa(os_hpmc); length = os_hpmc_size; ivap[7] = length;