Re: [PATCH] treewide: drop CONFIG_EMBEDDED

2023-08-18 Thread Jesse T
On Fri, Aug 18, 2023 at 7:44 PM Randy Dunlap  wrote:
>
> Hi Jesse,
>
> I replied to your comment a few days ago, but for some reason
> your email to me contains:
> Reply-To: 20230816055010.31534-1-rdun...@infradead.org
> so it wasn't sent directly to you.

Sorry about that I messed up the email headers...
>
> My former reply is below.
>
> On 8/16/23 20:15, Randy Dunlap wrote:
> > Hi Jesse,
> >
> > On 8/16/23 15:45, Jesse Taube wrote:
> >> Hi, Randy
> >>
> >>> diff -- a/init/Kconfig b/init/Kconfig
> >>> --- a/init/Kconfig
> >>> +++ b/init/Kconfig
> >>> @@ -1790,14 +1790,6 @@ config DEBUG_RSEQ
> >>>
> >>> If unsure, say N.
> >>>
> >>> -config EMBEDDED
> >>> -bool "Embedded system"
> >>> -select EXPERT
> >>> -help
> >>> -  This option should be enabled if compiling the kernel for
> >>> -  an embedded system so certain expert options are available
> >>> -  for configuration.
> >>
> >> Wouldn't removing this break many out of tree configs?
> >
> > I'm not familiar with out-of-tree configs.
> > Do you have some examples of some that use CONFIG_EMBEDDED?
> > (not distros)

Buildroot has a few.
It won't immediately break Buildroot and Yocto as they have a set version,
but it could be confusing for anyone updating the kernel.

> >
> >> Should there be a warning here to update change it instead of removal?
> >
> > kconfig doesn't have a warning mechanism AFAIK.
> > Do you have an idea of how this would work?

No, unfortunately. As you said without a warning it would be overlooked so
a change would not be necessary.

A possible solution is to check in a header file with:

#ifdef CONFIG_EMBEDDED
#warning "CONFIG_EMBEDDED has changed to CONFIG_EXPERT"
#endif

Does anyone else have an opinion on this?
Since kconfig doesn't have a warning mechanism the patch seems fine as is.

Thanks,
Jesse Taube
> >
> > We could make a smaller change to init/Kconfig, like so:
> >
> >  config EMBEDDED
> > - bool "Embedded system"
> > + bool "Embedded system (DEPRECATED)"
> >   select EXPERT
> >   help
> > -   This option should be enabled if compiling the kernel for
> > -   an embedded system so certain expert options are available
> > -   for configuration.
> > +   This option is being removed after Linux 6.6.
> > +   Use EXPERT instead of EMBEDDED.
> >
> > but there is no way to produce a warning message. I.e., even with this
> > change, the message will probably be overlooked.
> >
> > ---
> > ~Randy
>
> --
> ~Randy

___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


Re: [PATCH] treewide: drop CONFIG_EMBEDDED

2023-08-18 Thread Randy Dunlap
Hi Jesse,

I replied to your comment a few days ago, but for some reason
your email to me contains:
Reply-To: 20230816055010.31534-1-rdun...@infradead.org
so it wasn't sent directly to you.

My former reply is below.

On 8/16/23 20:15, Randy Dunlap wrote:
> Hi Jesse,
> 
> On 8/16/23 15:45, Jesse Taube wrote:
>> Hi, Randy
>>
>>> diff -- a/init/Kconfig b/init/Kconfig
>>> --- a/init/Kconfig
>>> +++ b/init/Kconfig
>>> @@ -1790,14 +1790,6 @@ config DEBUG_RSEQ
>>>
>>>     If unsure, say N.
>>>
>>> -config EMBEDDED
>>> -    bool "Embedded system"
>>> -    select EXPERT
>>> -    help
>>> -  This option should be enabled if compiling the kernel for
>>> -  an embedded system so certain expert options are available
>>> -  for configuration.
>>
>> Wouldn't removing this break many out of tree configs?
> 
> I'm not familiar with out-of-tree configs.
> Do you have some examples of some that use CONFIG_EMBEDDED?
> (not distros)
> 
>> Should there be a warning here to update change it instead of removal?
> 
> kconfig doesn't have a warning mechanism AFAIK.
> Do you have an idea of how this would work?
> 
> We could make a smaller change to init/Kconfig, like so:
> 
>  config EMBEDDED
> - bool "Embedded system"
> + bool "Embedded system (DEPRECATED)"
>   select EXPERT
>   help
> -   This option should be enabled if compiling the kernel for
> -   an embedded system so certain expert options are available
> -   for configuration.
> +   This option is being removed after Linux 6.6.
> +   Use EXPERT instead of EMBEDDED.
> 
> but there is no way to produce a warning message. I.e., even with this
> change, the message will probably be overlooked.
> 
> ---
> ~Randy

-- 
~Randy

___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


Re: [PATCH 16/20] ARC: entry: Add more common chores to EXCEPTION_PROLOGUE

2023-08-18 Thread Pavel . Kozlov
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.

...
f000.serial: ttyS0 at MMIO 0xf000 (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



___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc