Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp713053pxf; Thu, 1 Apr 2021 11:33:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx056EslozVzTLcWJxJSj6eda9EXNoSa/SEVCO1klqH0wIBXp+GngymonEJ5LJF6J91RtC7 X-Received: by 2002:a05:6e02:1a45:: with SMTP id u5mr8138839ilv.4.1617301979856; Thu, 01 Apr 2021 11:32:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617301979; cv=none; d=google.com; s=arc-20160816; b=OcPj6ER4YtwjBarctPlF21CEFbHs5fqm3+CgMyDZGomlrEalQ7UhykDRr48qkntefp tcu68LQDaTruNn0E0dhKC7rcF0SgJNv8zzCpYviIErYlaNfRXwbDjDhb9gNMUTGvbdL+ ZSyUqiz/iHF4KCfkaZ7VtSvSqaZT76uYA5i9JL06Lqi1qx/Lc569OeM18kugZjxnpq65 NYsGDLvyTZdtKKMsrrXXsUmK2q4VDWWwbvrLwHWKGawWgEsvXyskc1uK9YVAs7GTiowj 4v1PaFZB/lqBIYrH81S7cVKBCNWHPx6mpcZvF+Jm8z3wo5dwYfT60PhUBo8KmTjmLgHi 9cmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=yNO+GRqMVlItcau5ftQQoX2JmlSAK+GmeYsGlzl1DdI=; b=qgUa2gHMFgGza3+sKXhFNlDQdxVH/nagvWR1fi1UB3xEqBhy6I/gb96Uu3aC6veiRI zL28BxLFhhZnJDJE+rHG3uQ6whMWC+oYQnb0dCRXkq1MF8S9Qs0SktIKIy7NOJANin5v sFRXWY4GceVVFyRjv/sRpNK44kWz51ZIkcJRRNfpXZ5DdZ+/ZYkWvUWFyASgptl+V9rA fzJuj7LynqWA/a8bJXkXYfAmrOgichWFQueKXIf5Thv24Zc9T/5KxMszpGGk3p2g4lMx 25ab40pp1TaSCorp51c9acHpjkseBsDDbPESgf87DrodyzfnwR9lMv13kGX4D2fd+eqt MimA== 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 w9si5861125jad.47.2021.04.01.11.32.45; Thu, 01 Apr 2021 11:32:59 -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; 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 S240616AbhDASbB (ORCPT + 99 others); Thu, 1 Apr 2021 14:31:01 -0400 Received: from gate.crashing.org ([63.228.1.57]:48323 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237652AbhDASIg (ORCPT ); Thu, 1 Apr 2021 14:08:36 -0400 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 131GBa12032064; Thu, 1 Apr 2021 11:11:36 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 131GBVOu032063; Thu, 1 Apr 2021 11:11:31 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 1 Apr 2021 11:11:31 -0500 From: Segher Boessenkool To: Xiongwei Song Cc: Michael Ellerman , Xiongwei Song , benh@kernel.crashing.org, paulus@samba.org, oleg@redhat.com, npiggin@gmail.com, christophe.leroy@csgroup.eu, msuchanek@suse.de, aneesh.kumar@linux.ibm.com, ravi.bangoria@linux.ibm.com, mikey@neuling.org, haren@linux.ibm.com, alistair@popple.id.au, jniethe5@gmail.com, peterz@infradead.org, leobras.c@gmail.com, akpm@linux-foundation.org, rppt@kernel.org, peterx@redhat.com, atrajeev@linux.vnet.ibm.com, maddy@linux.ibm.com, kjain@linux.ibm.com, kan.liang@linux.intel.com, aik@ozlabs.ru, pmladek@suse.com, john.ogness@linutronix.de, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org Subject: Re: [PATCH v2] powerpc/traps: Enhance readability for trap types Message-ID: <20210401161131.GE13863@gate.crashing.org> References: <20210330150425.10145-1-sxwjean@me.com> <875z17y79i.fsf@mpe.ellerman.id.au> <20210331212550.GD13863@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.3i Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 01, 2021 at 10:55:58AM +0800, Xiongwei Song wrote: > Segher Boessenkool 于2021年4月1日周四 上午6:15写道: > > > 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. > > > > When looking at the reference manual of e500 and e600 from NXP > official, they call them as interrupts.While looking at the "The > Programming Environments" > that is also from NXP, they call them exceptions. Looks like there is > no explicit distinction between interrupts and exceptions. The architecture documents have always called it interrupts. The PEM says it calls them exceptions instead, but they are called interrupts in the architecture (and the PEM says that, too). > Here is the "The Programming Environments" link: > https://www.nxp.com.cn/docs/en/user-guide/MPCFPE_AD_R1.pdf That document is 24 years old. The architecture is still published, new versions regularly. > As far as I know, the values of interrupts or exceptions above are defined > explicitly in reference manual or the programming environments. They are defined in the architecture. > Could > you please provide more details about multiple exceptions with the same > interrupts? The simplest example is 700, program interrupt. There are many causes for it, including all the exceptions in FPSCR: VX, ZX, OX, UX, XX, and VX is actually divided into nine separate cases itself. There also are the various causes of privileged instruction type program interrupts, and the trap type program interrupt, but the FEX ones are most obvious here. Segher