public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel.Kozlov@synopsys.com
To: Vineet Gupta <vgupta@kernel.org>, linux-snps-arc@lists.infradead.org
Cc: linux-kernel@vger.kernel.org,
	Shahab Vahedi <Shahab.Vahedi@synopsys.com>,
	Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Subject: Re: [PATCH 16/20] ARC: entry: Add more common chores to EXCEPTION_PROLOGUE
Date: Fri, 18 Aug 2023 16:56:52 +0400	[thread overview]
Message-ID: <20230818125652.3981-1-kozlov@synopsys.com> (raw)
In-Reply-To: <20230815004813.555115-17-vgupta@kernel.org>

Hi Vineet,

> Subject: [PATCH 16/20] ARC: entry: Add more common chores to
>         EXCEPTION_PROLOGUE
> 
> THe high level structure of most ARC exception handlers is
>  1. save regfile with EXCEPTION_PROLOGUE
>  2. setup r0: EFA (not part of pt_regs)
>  3. setup r1: pointer to pt_regs (SP)
>  4. drop down to pure kernel mode (from exception)
>  5. call the Linux "C" handler
> 
> Remove the boiler plate code by moving #2, #3, #4 into #1.
> 
> The exceptions to most exceptions are syscall Trap and Machine check
> which don't do some of above for various reasons, so call a newly
> introduced variant EXCEPTION_PROLOGUE_KEEP_AE (same as original
> EXCEPTION_PROLOGUE)

I'm observing the ARC700 (nSIM) system freeze after this patch.

...
f0000000.serial: ttyS0 at MMIO 0xf0000000 (irq = 24, base_baud = 3125000) is a 16550A
printk: console [ttyS0] enabled
printk: console [ttyS0] enabled
printk: bootconsole [uart8250] disabled
printk: bootconsole [uart8250] disabled
NET: Registered PF_PACKET protocol family
NET: Registered PF_KEY protocol family
clk: Disabling unused clocks
Freeing unused kernel image (initmem) memory: 2856K
This architecture does not have kernel memory protection.
Run /init as init process

> @@ -128,11 +123,6 @@ ENTRY(EV_PrivilegeV)
> 
>          EXCEPTION_PROLOGUE
> 
> -       lr  r0, [efa]
> -       mov r1, sp
> -
> -       FAKE_RET_FROM_EXCPN
> -
>          bl  do_privilege_fault
>          b   ret_from_exception

The same update is also required for the call_do_page_fault wrapper for ARcompact. 

Regards,
Pavel



  reply	other threads:[~2023-08-18 12:59 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-15  0:47 [PATCH 00/20] ARC updates Vineet Gupta
2023-08-15  0:47 ` [PATCH 01/20] ARC: uaccess: remove arc specific out-of-line handles for -Os Vineet Gupta
2023-08-15  0:47 ` [PATCH 02/20] ARC: uaccess: use optimized generic __strnlen_user/__strncpy_from_user Vineet Gupta
2023-08-15  0:47 ` [PATCH 03/20] ARC: uaccess: elide unaliged handling if hardware supports Vineet Gupta
2023-08-15  0:47 ` [PATCH 04/20] ARCv2: memset: don't prefetch for len == 0 which happens a alot Vineet Gupta
2023-08-15  0:47 ` [PATCH 05/20] ARC: boot log: eliminate struct cpuinfo_arc #1: mm Vineet Gupta
2023-08-15  0:47 ` [PATCH 06/20] ARC: boot log: eliminate struct cpuinfo_arc #2: cache Vineet Gupta
2023-08-15  0:48 ` [PATCH 07/20] ARC: boot log: eliminate struct cpuinfo_arc #3: don't export Vineet Gupta
2023-08-15  0:48 ` [PATCH 08/20] ARC: boot log: eliminate struct cpuinfo_arc #4: boot log per ISA Vineet Gupta
2023-08-15  0:48 ` [PATCH 09/20] ARC: entry: use gp to cache task pointer (vs. r25) Vineet Gupta
2023-08-15  0:48 ` [PATCH 10/20] ARC: kernel stack: INIT_THREAD need not setup @init_stack in @ksp Vineet Gupta
2023-08-15  0:48 ` [PATCH 11/20] ARC: __switch_to: asm with dwarf ops (vs. inline asm) Vineet Gupta
2023-08-15  0:48 ` [PATCH 12/20] ARC: __switch_to: move ksp to thread_info from thread_struct Vineet Gupta
2023-08-15  0:48 ` [PATCH 13/20] ARC: entry: rework (non-functional) Vineet Gupta
2023-08-15  0:48 ` [PATCH 14/20] ARC: entry: ARcompact EV_ProtV to use r10 directly Vineet Gupta
2023-08-15  0:48 ` [PATCH 15/20] ARC: entry: EV_MachineCheck dont re-read ECR Vineet Gupta
2023-08-15  0:48 ` [PATCH 16/20] ARC: entry: Add more common chores to EXCEPTION_PROLOGUE Vineet Gupta
2023-08-18 12:56   ` Pavel.Kozlov [this message]
2023-08-19 23:13     ` Vineet Gupta
2023-08-19 23:14     ` [PATCH v2 " Vineet Gupta
2023-08-15  0:48 ` [PATCH 17/20] ARC: entry: replace 8 byte OR with 4 byte BSET Vineet Gupta
2023-08-15  0:48 ` [PATCH 18/20] ARC: entry: replace 8 byte ADD.ne with 4 byte ADD2.ne Vineet Gupta
2023-08-15  0:48 ` [PATCH 19/20] ARCv2: entry: rearrange pt_regs slightly Vineet Gupta
2023-08-15  0:48 ` [PATCH 20/20] ARC: pt_regs: create seperate type for ecr Vineet Gupta
2023-08-15  6:03   ` kernel test robot
2023-08-18  3:35     ` [PATCH v2 " Vineet Gupta
2023-08-17 12:09   ` [PATCH " Pavel.Kozlov
2023-08-18  3:37     ` Vineet Gupta
2023-08-22 14:07 ` [PATCH 00/20] ARC updates Pavel Kozlov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230818125652.3981-1-kozlov@synopsys.com \
    --to=pavel.kozlov@synopsys.com \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=Shahab.Vahedi@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=vgupta@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox