Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp450474ybi; Tue, 2 Jul 2019 23:21:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxcmoJ5DUkeMiH/hG/0F2hJ2t8k2BZGjLDC86L//Msr+AnvKhvQ5zhKi+1SiL+22CxumqII X-Received: by 2002:a17:902:e40f:: with SMTP id ci15mr40354775plb.103.1562134869127; Tue, 02 Jul 2019 23:21:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562134869; cv=none; d=google.com; s=arc-20160816; b=wNh+tzqnEhaAXoOBm/kLI2szueLcHkLzawDj7nqwWLd+CQqzS5TTxA2o0U2aUZSl0r kmx+PaOkZ0HFhvgoJacNwx0FYiN/z+TAudqzWeLhrqHCHEOZQtU+SHwPLiSjcMM7a0Ub KqSpMuyLXjHMMWXJr3iZSJwWJC0ErH+IIJoai4fZmrry+0lZfHCJZttuRwnlPLuSQ0y0 9RGJbqMeeVVi1TN3IMUc7qZlmFbe16MDm+lQQI7R+I69J6hQNpAlrhhjNm7jUDP1JhL/ plDLY0Qjw7k8DEn/4tZ6izDWzfoEyEa261zEjZOqrpmdKn+XisG9vIHpMNI3FZNUNMX1 bJsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject; bh=PkbnwcN3HbDPfID/7W4MXMk0dwd/iU7XBh5uhEQU32o=; b=VBXiAoJd3FUn+DCIAXpqkqxSoT4lYX9QzSmNJN8GG2RCQtZVgh5WBco6FMq7fe9lGh ODiB41jf0dFzlMi0BRzPZZqBr2uPqVTrlo4wrdAd5H1KGnPppU0ui7EAZXWc7+3VxnME ACZBHI0YKnhglU/y1PRZjsT5TeF1aELfEJg1/Y5Mvym3ixq+DQsLnDuLq4VE3kXU8b7J tLafPpuho9g6ihU3L3YkvY4z3tjb95cpvY0+wyGHfXlR+QO5TW34BSsJnDAurCzvG/+2 ZJLEjZnUQsO0thr+P0ImKM5/6EB7Bd4GJzsZFyqfyKfgOXcFLXnANq4qfPIoPpFBS/hX dy7A== 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 b9si1366418pls.201.2019.07.02.23.20.53; Tue, 02 Jul 2019 23:21:09 -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 S1727008AbfGCGU2 (ORCPT + 99 others); Wed, 3 Jul 2019 02:20:28 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:61496 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725927AbfGCGU1 (ORCPT ); Wed, 3 Jul 2019 02:20:27 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x636HJTh059160 for ; Wed, 3 Jul 2019 02:20:26 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0b-001b2d01.pphosted.com with ESMTP id 2tgm3edmmw-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 03 Jul 2019 02:20:26 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 3 Jul 2019 07:20:24 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 3 Jul 2019 07:20:22 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x636KLda59965480 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 3 Jul 2019 06:20:21 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AD62EAE04D; Wed, 3 Jul 2019 06:20:21 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3FE4DAE061; Wed, 3 Jul 2019 06:20:19 +0000 (GMT) Received: from [9.85.75.18] (unknown [9.85.75.18]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 3 Jul 2019 06:20:18 +0000 (GMT) Subject: Re: [PATCH] powerpc/hw_breakpoint: move instruction stepping out of hw_breakpoint_handler() To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Ravi Bangoria References: From: Ravi Bangoria Date: Wed, 3 Jul 2019 11:50:17 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 19070306-0020-0000-0000-0000034FB580 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19070306-0021-0000-0000-000021A34A66 Message-Id: <57148696-b9a5-d3c1-1e29-82673c558927@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-07-03_02:,, 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 mlxscore=0 impostorscore=0 mlxlogscore=665 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907030076 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/28/19 9:25 PM, Christophe Leroy wrote: > On 8xx, breakpoints stop after executing the instruction, so > stepping/emulation is not needed. Move it into a sub-function and > remove the #ifdefs. > > Signed-off-by: Christophe Leroy > --- Reviewed-by: Ravi Bangoria Just one neat below... [...] > -#ifndef CONFIG_PPC_8xx > - /* Do not emulate user-space instructions, instead single-step them */ > - if (user_mode(regs)) { > - current->thread.last_hit_ubp = bp; > - regs->msr |= MSR_SE; > + if (!IS_ENABLED(CONFIG_PPC_8xx) && !stepping_handler(regs, bp, info->address)) May be split this line. It's 86 chars long and checkpatch.pl is warning about this: WARNING: line over 80 characters #257: FILE: arch/powerpc/kernel/hw_breakpoint.c:282: + if (!IS_ENABLED(CONFIG_PPC_8xx) && !stepping_handler(regs, bp, info->address))