Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3491153pxf; Mon, 5 Apr 2021 13:37:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgWf7xefyjYR6H+A6krmpl6V0LwyocQRzgp4nv3qilJngGRIVhMTsNyy0X+HuXl94a10lr X-Received: by 2002:a17:906:3190:: with SMTP id 16mr2012784ejy.355.1617655045742; Mon, 05 Apr 2021 13:37:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617655045; cv=none; d=google.com; s=arc-20160816; b=qjVMAUMFh0wO+VwroTM1ACH6RsPMN9YmkCeyuVyABu22VqiKQ0/sdWBiG2l+oe5Nkk xPr0nYXx6E2rb1q64bnUCkGZm+5eA5APtRoHNY5EnOMtkRMWzSGd9wl2AtVxmCKx6gBg AuMkiNCXUICeCT9+bjHty/Vo0RjwJbSN2VVp2uVicqyK2Td5sML3Mv4ukVVT5gLYvGMf 7Zw1IZeKUFcWBtQJw4y0FujzN5z0v66BxBqWh9z9ORsAmFMQjl4M9X008wG3tZWJspop /zYDd5IOVTYIu/EW4cG3R9Xco5M1itEU0sT/oeA6aTSuNsDtKF0sZP4aI50hVS9bqwmX hfNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=4fSfaShOhJJCs8r4i+cCU95K6pSP9J9eia0Ma5j4ZXA=; b=XkmwLOl6mnADPMFDBboS07+DOADXulvU9eam/eylEViQp5YZGtJ3O6kCTFRYAViLFS Z1qFrDAaVCUubVprVRINOXwvPkdi1WC70ZNIV6LlA/DLOjptbxdq4bFkMahkEMTOpzMf bS1iiGt8aLZjwUSjJBGL4fdbMaTheXDQkLzTr/nGrFla1bDVEe1r+4Tck6QmtsG/Ewjb u6WPV5kSHmLU++Vca9BOKFq60dQObvaW1jGZLauvIXyB29uQrzYFUVwqqLNy9S7TbcCn NYWBNUGWO5smkB1tT+dYYWuKisZusXQG6WeW7CgQvtvmlAnsuu/lKkiJDpi27BVMR3Tc Kp1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@me.com header.s=1a1hai header.b=M0QDyFix; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=me.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a15si14971770edr.346.2021.04.05.13.37.01; Mon, 05 Apr 2021 13:37:25 -0700 (PDT) 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; dkim=pass header.i=@me.com header.s=1a1hai header.b=M0QDyFix; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=me.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239929AbhDEMK2 (ORCPT + 99 others); Mon, 5 Apr 2021 08:10:28 -0400 Received: from pv50p00im-ztdg10021801.me.com ([17.58.6.56]:38423 "EHLO pv50p00im-ztdg10021801.me.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234148AbhDEMK0 (ORCPT ); Mon, 5 Apr 2021 08:10:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1617624619; bh=4fSfaShOhJJCs8r4i+cCU95K6pSP9J9eia0Ma5j4ZXA=; h=Content-Type:Mime-Version:Subject:From:Date:Message-Id:To; b=M0QDyFixUUI1vvqOSaytNyewqEpDI4fk1J5j6+1937+h1ZgJ3MgdmCbQTO5ZRmMKW 58lML7CGCWckEOQgE06AVJ2Tb3cmC9gjll1wuU0r+/eDK1u4pVAmFDxEb60aF8zDsz /kxxN37vSTGVfawFUbezLU2xG+yeSzuf92i1poFM+s+eIy0/7A1YqL9Gk3aj9GJu4G Fsxes4s5H5iGG7fdL+QHFyXUxetjiBrrAQZ/ZkWz/Cb0E1nZvUF+b9Q6kYIhmDs9bd pnK0Sn1/+inPOCACginlCtZohrKfPdCR4Ouq4PsatfdBzn6MbdrEbOevwMQyIfqdMa Ki6zix9NtBN7w== Received: from 192.168.1.3 (unknown [120.245.2.39]) by pv50p00im-ztdg10021801.me.com (Postfix) with ESMTPSA id 8DA52360261; Mon, 5 Apr 2021 12:10:11 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: [PATCH v2] powerpc/traps: Enhance readability for trap types From: Xiongwei Song In-Reply-To: <1617262858.ls37f2d81f.astroid@bobo.none> Date: Mon, 5 Apr 2021 20:10:07 +0800 Cc: Michael Ellerman , Segher Boessenkool , aik@ozlabs.ru, akpm@linux-foundation.org, alistair@popple.id.au, aneesh.kumar@linux.ibm.com, atrajeev@linux.vnet.ibm.com, benh@kernel.crashing.org, Christophe Leroy , haren@linux.ibm.com, jniethe5@gmail.com, john.ogness@linutronix.de, kan.liang@linux.intel.com, kjain@linux.ibm.com, kvm-ppc@vger.kernel.org, leobras.c@gmail.com, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, maddy@linux.ibm.com, mikey@neuling.org, msuchanek@suse.de, oleg@redhat.com, paulus@samba.org, peterx@redhat.com, peterz@infradead.org, pmladek@suse.com, ravi.bangoria@linux.ibm.com, rppt@kernel.org, Xiongwei Song Content-Transfer-Encoding: 7bit Message-Id: References: <20210330150425.10145-1-sxwjean@me.com> <875z17y79i.fsf@mpe.ellerman.id.au> <20210331212550.GD13863@gate.crashing.org> <87im5620f3.fsf@mpe.ellerman.id.au> <1617262858.ls37f2d81f.astroid@bobo.none> To: Nicholas Piggin X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-04-05_08:2021-04-01,2021-04-05 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2009150000 definitions=main-2104050084 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Regards, Xiongwei > On Apr 1, 2021, at 4:01 PM, Nicholas Piggin wrote: > > Excerpts from Michael Ellerman's message of April 1, 2021 12:39 pm: >> Segher Boessenkool writes: >>> On Wed, Mar 31, 2021 at 08:58:17PM +1100, Michael Ellerman wrote: >>>> So perhaps: >>>> >>>> EXC_SYSTEM_RESET >>>> EXC_MACHINE_CHECK >>>> EXC_DATA_STORAGE >>>> EXC_DATA_SEGMENT >>>> EXC_INST_STORAGE >>>> EXC_INST_SEGMENT >>>> EXC_EXTERNAL_INTERRUPT >>>> EXC_ALIGNMENT >>>> EXC_PROGRAM_CHECK >>>> EXC_FP_UNAVAILABLE >>>> EXC_DECREMENTER >>>> EXC_HV_DECREMENTER >>>> EXC_SYSTEM_CALL >>>> EXC_HV_DATA_STORAGE >>>> EXC_PERF_MONITOR >>> >>> These are interrupt (vectors), not exceptions. It doesn't matter all >>> that much, but confusing things more isn't useful either! There can be >>> multiple exceptions that all can trigger the same interrupt. >> >> Yeah I know, but I think that ship has already sailed as far as the >> naming we have in the kernel. > > It has, but there are also several other ships also sailing in different > directions. It could be worse though, at least they are not sideways in > the Suez. > >> We have over 250 uses of "exc", and several files called "exception" >> something. >> >> Using "interrupt" can also be confusing because Linux uses that to mean >> "external interrupt". >> >> But I dunno, maybe INT or VEC is clearer? .. or TRAP :) > > We actually already have defines that follow Segher's suggestion, it's > just that they're hidden away in a KVM header. > > #define BOOK3S_INTERRUPT_SYSTEM_RESET 0x100 > #define BOOK3S_INTERRUPT_MACHINE_CHECK 0x200 > #define BOOK3S_INTERRUPT_DATA_STORAGE 0x300 > #define BOOK3S_INTERRUPT_DATA_SEGMENT 0x380 > #define BOOK3S_INTERRUPT_INST_STORAGE 0x400 > #define BOOK3S_INTERRUPT_INST_SEGMENT 0x480 > #define BOOK3S_INTERRUPT_EXTERNAL 0x500 > #define BOOK3S_INTERRUPT_EXTERNAL_HV 0x502 > #define BOOK3S_INTERRUPT_ALIGNMENT 0x600 > > It would take just a small amount of work to move these to general > powerpc header, add #ifdefs for Book E/S where the numbers differ, > and remove the BOOK3S_ prefix. > > I don't mind INTERRUPT_ but INT_ would be okay too. VEC_ actually > doesn't match what Book E does (which is some weirdness to map some > of them to match Book S but not all, arguably we should clean that > up too and just use vector numbers consistently, but the INTERRUPT_ > prefix would still be valid if we did that). > > BookE KVM entry will still continue to use a different convention > there so I would leave all those KVM defines in place for now, we > might do another pass on them later. Thanks for the comments. > > Thanks, > Nick