Re: 回复: [PATCH 2/2] uio:powerpc:mpc85xx: l2-cache-sram uio driver implementation

2022-06-14 Thread Christophe Leroy
Le 14/06/2022 à 08:09, Wenhu Wang a écrit : >>> + >>> +static const struct vm_operations_struct uio_cache_sram_vm_ops = { >>> +#ifdef CONFIG_HAVE_IOREMAP_PROT >> >> Same here. >> > > I tried to eliminate it in mainline > See: [PATCH v2] mm: eliminate ifdef of HAVE_IOREMAP_PROT in .c files > http

Re: [PATCH 2/2] uio:powerpc:mpc85xx: l2-cache-sram uio driver implementation

2022-06-14 Thread Christophe Leroy
Le 14/06/2022 à 16:40, Wenhu Wang a écrit : I looked at that patch. I don't think you can just drop the #ifdef in function __access_remote_vm() in mm/memory.c You have to replace it with something like:   if (!IS_ENABLED(CONFIG_HAVE_IOREMAP_PROT))

Re: [PATCH 2/2] uio:powerpc:mpc85xx: l2-cache-sram uio driver implementation

2022-06-14 Thread Christoph Hellwig
UIO seems like the wrong kind of interface for this. Why isn't this a simple character device?

Re: [PATCH 2/2] uio:powerpc:mpc85xx: l2-cache-sram uio driver implementation

2022-06-14 Thread Wenhu Wang
>>> >>> I looked at that patch. >>> >>> I don't think you can just drop the #ifdef in function >>> __access_remote_vm() in mm/memory.c >>> >>> You have to replace it with something like: >>> >>>  if (!IS_ENABLED(CONFIG_HAVE_IOREMAP_PROT)) >>>  break; >>> >> >> >>Another thing in that pa

Re: [PATCH 2/2] uio:powerpc:mpc85xx: l2-cache-sram uio driver implementation

2022-06-14 Thread Wenhu Wang
>On Tue, Jun 14, 2022 at 07:53:46AM +, Wenhu Wang wrote: >> >> >> + >> >> >> +struct mpc85xx_l2ctlr { >> >> >> + u32 ctl;/* 0x000 - L2 control */ >> >> > >> >> >What is the endian of these u32 values? You map them directly to >> >> >memory, so they must be specified some wa

Re: [PATCH 2/2] uio:powerpc:mpc85xx: l2-cache-sram uio driver implementation

2022-06-14 Thread Greg KH
On Tue, Jun 14, 2022 at 07:53:46AM +, Wenhu Wang wrote: > >> >> + > >> >> +struct mpc85xx_l2ctlr { > >> >> + u32 ctl;/* 0x000 - L2 control */ > >> > > >> >What is the endian of these u32 values? You map them directly to > >> >memory, so they must be specified some way, righ

Re: [PATCH 2/2] uio:powerpc:mpc85xx: l2-cache-sram uio driver implementation

2022-06-14 Thread Wenhu Wang
>> >> + >> >> +struct mpc85xx_l2ctlr { >> >> + u32 ctl;/* 0x000 - L2 control */ >> > >> >What is the endian of these u32 values? You map them directly to >> >memory, so they must be specified some way, right? Please make it >> >obvious what they are. >> > >> >> Surely, the val

Re: 回复: [PATCH 2/2] uio:powerpc:mpc85xx: l2-cache-sram uio driver implementation

2022-06-14 Thread Christophe Leroy
Le 14/06/2022 à 09:18, Christophe Leroy a écrit : Le 14/06/2022 à 08:09, Wenhu Wang a écrit : +static const struct vm_operations_struct uio_cache_sram_vm_ops = { +#ifdef CONFIG_HAVE_IOREMAP_PROT Same here. I tried to eliminate it in mainline See: [PATCH v2] mm: eliminate ifdef of HAVE_

Re: 回复: [PATCH 2/2] uio:powerpc:mpc85xx: l2-cache-sram uio driver implementation

2022-06-14 Thread Christophe Leroy
Le 14/06/2022 à 08:09, Wenhu Wang a écrit : >>> +static const struct vm_operations_struct uio_cache_sram_vm_ops = { >>> +#ifdef CONFIG_HAVE_IOREMAP_PROT >> >> Same here. >> > > I tried to eliminate it in mainline > See: [PATCH v2] mm: eliminate ifdef of HAVE_IOREMAP_PROT in .c files > https://lk

Re: 回复: [PATCH 2/2] uio:powerpc:mpc85xx: l2-cache-sram uio driver implementation

2022-06-14 Thread Christophe Leroy
Le 14/06/2022 à 08:34, Greg KH a écrit : > On Tue, Jun 14, 2022 at 06:09:35AM +, Wenhu Wang wrote: >>> >>> Odd indentation, did you use checkpatch.pl on your patch? >>> >> >> Actually, I checked with the scripts, and there was no warning here. >> I also checked in text editors and vim, if I t

Re: 回复: [PATCH 2/2] uio:powerpc:mpc85xx: l2-cache-sram uio driver implementation

2022-06-13 Thread Greg KH
>收件人: Wang Wenhu > >抄送: christophe.le...@csgroup.eu ; > >m...@ellerman.id.au ; linuxppc-dev@lists.ozlabs.org > >; linux-ker...@vger.kernel.org > > > >主题: Re: [PATCH 2/2] uio:powerpc:mpc85xx: l2-cache-sram uio driver > >implementation > >  > >On Thu, Jun

回复: [PATCH 2/2] uio:powerpc:mpc85xx: l2-cache-sram uio driver implementation

2022-06-13 Thread Wenhu Wang
ists.ozlabs.org >; linux-ker...@vger.kernel.org > >主题: Re: [PATCH 2/2] uio:powerpc:mpc85xx: l2-cache-sram uio driver >implementation >  >On Thu, Jun 09, 2022 at 03:28:55AM -0700, Wang Wenhu wrote: >> The l2-cache could be optionally configured as SRAM partly or fully. &g

[PATCH 2/2] uio:powerpc:mpc85xx: l2-cache-sram uio driver implementation

2022-06-10 Thread Wang Wenhu
The l2-cache could be optionally configured as SRAM partly or fully. Users can make use of it as a block of independent memory that offers special usage, such as for debuging or other cratical status info storage which keeps consistently even when the whole system crashed. The hardware related con

Re: [PATCH 2/2] uio:powerpc:mpc85xx: l2-cache-sram uio driver implementation

2022-06-09 Thread Greg KH
On Thu, Jun 09, 2022 at 03:28:55AM -0700, Wang Wenhu wrote: > The l2-cache could be optionally configured as SRAM partly or fully. > Users can make use of it as a block of independent memory that offers > special usage, such as for debuging or other cratical status info > storage which keeps consis