Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3983494pxb; Mon, 8 Feb 2021 05:19:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwTLYOCFfWMeNmGe+8G4JgiD/7EQ/2AVoIOBZ/nVND7u5u/ClnIG9suiacWWqZg4Fu8K3RD X-Received: by 2002:a17:906:3ed1:: with SMTP id d17mr15250424ejj.0.1612790363374; Mon, 08 Feb 2021 05:19:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612790363; cv=none; d=google.com; s=arc-20160816; b=uXWIFcw9Cg+5KcxrQ6A8S/z7TpNHfZq4iZeneuRO7LcaV+qb4YyUapYJ4qhiHAR0GJ C+WEu3432cktDmDvIr5+cJyUpsq0Q3Hv6P9yNkx5gkvp6F/Mpz6pd5S2rM1C9Zq2LhQ4 Fn7Bt0xU5hjdks7bt8G6bg3h9j5bENoPHHGHVRvJgrSDbq9Sr2reD+65Lg98B25Dg1g3 kkCD7Z2vmR7yK+834gOKzOVvcUvMgFVmJCvx88ABRj+sF45d7dPu9hS/Mnv4R+enMFxp 9wXuocMBuPP1+YrNL4wmPirHFqGvb7DpTUS0fwYL23lSz01nkpiCOts3/S/Sp8UcDsnc mpXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=CZ4jYyQhQ7yK9YM/3aOHcwhkOsyFajId1bxw8hA2DjY=; b=IuYLIVUneHB9oM7xg1E2oZ3Snpmnq27f4ZnrfmweF0XbGIcSRwlghYKc1uWAg+ShJm lPP11q8im4gOnnBVe+iTBaeZPgbT5n75oaVFcBud6MEk4Yu15XZR0ZELuiImVoUcAuVW y/BNpW87layq+AYYRjRW7fmu7tSNhydyA7GHcPDjFtzOE/3vqEszTCoR62RLyGTiD+Rs OR/NBQxAgCwZJIn+CAbVTbkl6YpZtpkmqOeRCWvqgRU2US9YD3fYHjXW2PmE/gdRRLCO 4jMuI2NBEb+Y2PE1Ar5/jQywejmKPXMXip69VVgUL5plMN3djisKPGbHzkE5IZ3Eb2QM nM4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w16si11578487edi.602.2021.02.08.05.18.58; Mon, 08 Feb 2021 05:19:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229681AbhBHNQF (ORCPT + 99 others); Mon, 8 Feb 2021 08:16:05 -0500 Received: from mail.loongson.cn ([114.242.206.163]:50680 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229766AbhBHNPr (ORCPT ); Mon, 8 Feb 2021 08:15:47 -0500 Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9CxZO1HOSFg4z0IAA--.11298S2; Mon, 08 Feb 2021 21:14:47 +0800 (CST) From: Tiezhu Yang To: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li Subject: [PATCH] MIPS: Make check condition for SDBBP consistent with EJTAG spec Date: Mon, 8 Feb 2021 21:14:45 +0800 Message-Id: <1612790085-14436-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf9CxZO1HOSFg4z0IAA--.11298S2 X-Coremail-Antispam: 1UD129KBjvdXoWrZw1xZFWDXw48Gw4xKw1rWFg_yoWfZFg_Kr 1Ivws7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TAG Specification [1], a Debug Breakpoint exception occurs when an SDBBP instruction is executed, the CP0_DEBUG bit DBp indicates that a Debug Breakpoint exception occurred, just check bit DBp for SDBBP is more accurate. [1] http://www.t-es-t.hu/download/mips/md00047f.pdf Signed-off-by: Tiezhu Yang --- arch/mips/kernel/genex.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S index bcce32a..6336826 100644 --- a/arch/mips/kernel/genex.S +++ b/arch/mips/kernel/genex.S @@ -349,8 +349,8 @@ NESTED(ejtag_debug_handler, PT_SIZE, sp) MTC0 k0, CP0_DESAVE mfc0 k0, CP0_DEBUG - sll k0, k0, 30 # Check for SDBBP. - bgez k0, ejtag_return + andi k0, k0, 0x2 # Check for SDBBP. + beqz k0, ejtag_return #ifdef CONFIG_SMP 1: PTR_LA k0, ejtag_debug_buffer_spinlock -- 2.1.0