Re: [linux-yocto][v5.10/standard/preempt-rt/base][PATCH] fix linux-yocto-rt compile error

2023-10-26 Thread Li Wang via lists.yoctoproject.org

Hi Paul,

1.

the issue is about where the function define: raw_write_seqcount_t_begin?

the update from v5.10.197 to v5.10.198 recently, it remove the function 
define in:


commit a8dd21118b0fa33efd09b713cef79d02e72719e2
Author: Ahmed S. Darwish 
Date:   Sun Dec 6 17:21:42 2020 +0100
    seqlock: Prefix internal seqcount_t-only macros with a "do_"

-static inline void raw_write_seqcount_t_begin(seqcount_t *s)
+static inline void do_raw_write_seqcount_begin(seqcount_t *s)
 {
    kcsan_nestable_atomic_begin();
    s->sequence++;

2.

it should change raw_write_seqcount_t_begin to do_raw_write_seqcount_begin
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git/tree/include/net/sch_generic.h?h=v5.10-rt-next

static inline bool qdisc_run_begin(struct Qdisc *qdisc)
{
...
#ifdef CONFIG_PREEMPT_RT
    do_raw_write_seqcount_begin(s);
...
}

Thank for your careful to correct the potential issue.

I will send V2.

LiWang.

On 10/23/2023 22:15, Paul Gortmaker wrote:

[[linux-yocto][v5.10/standard/preempt-rt/base][PATCH] fix linux-yocto-rt 
compile error] On 22/10/2023 (Sun 19:21) Li Wang via lists.yoctoproject.org 
wrote:


kernel-source/include/net/sch_generic.h:198:17: error: implicit
declaration of function 'raw_write_seqcount_t_begin'; did you mean
'raw_write_seqcount_begin'? [-Werror=implicit-function-declaration]

Your commit seems reasonable, but it is missing one simple step.

Running "git blame" on the unpatched file, which leads to:

It isn't so much about the "blame" -- but knowing where the issure
originated from, so we can direct it to other development streams if
appropriate.

So in doing so I see afe3f03a84d51:

  -
commit afe3f03a84d5119b8a8af700e8360e4e4e2dc33c
Author: Sebastian Andrzej Siewior 
AuthorDate: Tue Sep 8 16:57:11 2020 +0200
Commit: Bruce Ashfield 
CommitDate: Thu Dec 17 12:35:26 2020 -0500

 net: Properly annotate the try-lock for the seqlock
  -

So now we have more questions.

This is an old commit from 2020.  Why is it showing up as compile
breakage today?

Does the commit added to v5.10-yocto match the original in the
linux-stable-rt repo, or did Bruce do a compile tweak for it on the fly
back 3y ago and now upstream fixed the function name to not look like a
typedef?

Are we going to encounter the same issue on v5.15 in another 24 hours?

Your job as submitter is not just to provide the "raw" fix to Bruce, but
to ALSO provide the "how did we get here" story so he has a better idea
of the scope of impact and can perhaps better react in the future by
knowing what happened here so it can be prevented next time.

Thanks,
Paul.
--


Signed-off-by: Li Wang 
---
  include/net/sch_generic.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 72be68652bb8..4574dd262efd 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -195,7 +195,7 @@ static inline bool qdisc_run_begin(struct Qdisc *qdisc)
 * Variant of write_seqcount_t_begin() telling lockdep that a
 * trylock was attempted.
 */
-   raw_write_seqcount_t_begin(s);
+   raw_write_seqcount_begin(s);
seqcount_acquire(>dep_map, 0, 1, _RET_IP_);
return true;
}
--
2.25.1




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13240): 
https://lists.yoctoproject.org/g/linux-yocto/message/13240
Mute This Topic: https://lists.yoctoproject.org/mt/102114616/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [ping]Re: [linux-yocto][v5.10/standard/preempt-rt/base][PATCH] fix linux-yocto-rt compile error

2023-10-25 Thread Bruce Ashfield
ping to answer the questions that Paul asked. ;)

I'm not going to merge this until that happens.

Bruce

On Wed, Oct 25, 2023 at 10:23 PM Wang, Li  wrote:
>
> ping...
>
> Thanks,
> LiWang.
>
> On 10/22/2023 19:21, Li Wang via lists.yoctoproject.org wrote:
> > kernel-source/include/net/sch_generic.h:198:17: error: implicit
> > declaration of function 'raw_write_seqcount_t_begin'; did you mean
> > 'raw_write_seqcount_begin'? [-Werror=implicit-function-declaration]
> >
> > Signed-off-by: Li Wang 
> > ---
> >   include/net/sch_generic.h | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
> > index 72be68652bb8..4574dd262efd 100644
> > --- a/include/net/sch_generic.h
> > +++ b/include/net/sch_generic.h
> > @@ -195,7 +195,7 @@ static inline bool qdisc_run_begin(struct Qdisc *qdisc)
> >* Variant of write_seqcount_t_begin() telling lockdep that a
> >* trylock was attempted.
> >*/
> > - raw_write_seqcount_t_begin(s);
> > + raw_write_seqcount_begin(s);
> >   seqcount_acquire(>dep_map, 0, 1, _RET_IP_);
> >   return true;
> >   }
> >
> > 
> >



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13237): 
https://lists.yoctoproject.org/g/linux-yocto/message/13237
Mute This Topic: https://lists.yoctoproject.org/mt/102192813/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: 
https://lists.yoctoproject.org/g/linux-yocto/leave/6687884/21656/624485779/xyzzy
 [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[ping]Re: [linux-yocto][v5.10/standard/preempt-rt/base][PATCH] fix linux-yocto-rt compile error

2023-10-25 Thread Li Wang via lists.yoctoproject.org

ping...

Thanks,
LiWang.

On 10/22/2023 19:21, Li Wang via lists.yoctoproject.org wrote:

kernel-source/include/net/sch_generic.h:198:17: error: implicit
declaration of function 'raw_write_seqcount_t_begin'; did you mean
'raw_write_seqcount_begin'? [-Werror=implicit-function-declaration]

Signed-off-by: Li Wang 
---
  include/net/sch_generic.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 72be68652bb8..4574dd262efd 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -195,7 +195,7 @@ static inline bool qdisc_run_begin(struct Qdisc *qdisc)
 * Variant of write_seqcount_t_begin() telling lockdep that a
 * trylock was attempted.
 */
-   raw_write_seqcount_t_begin(s);
+   raw_write_seqcount_begin(s);
seqcount_acquire(>dep_map, 0, 1, _RET_IP_);
return true;
}




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13236): 
https://lists.yoctoproject.org/g/linux-yocto/message/13236
Mute This Topic: https://lists.yoctoproject.org/mt/102192813/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [linux-yocto][v5.10/standard/preempt-rt/base][PATCH] fix linux-yocto-rt compile error

2023-10-23 Thread Paul Gortmaker via lists.yoctoproject.org
[[linux-yocto][v5.10/standard/preempt-rt/base][PATCH] fix linux-yocto-rt 
compile error] On 22/10/2023 (Sun 19:21) Li Wang via lists.yoctoproject.org 
wrote:

> kernel-source/include/net/sch_generic.h:198:17: error: implicit
> declaration of function 'raw_write_seqcount_t_begin'; did you mean
> 'raw_write_seqcount_begin'? [-Werror=implicit-function-declaration]

Your commit seems reasonable, but it is missing one simple step.

Running "git blame" on the unpatched file, which leads to:

It isn't so much about the "blame" -- but knowing where the issure
originated from, so we can direct it to other development streams if
appropriate.

So in doing so I see afe3f03a84d51:

 -
commit afe3f03a84d5119b8a8af700e8360e4e4e2dc33c
Author: Sebastian Andrzej Siewior 
AuthorDate: Tue Sep 8 16:57:11 2020 +0200
Commit: Bruce Ashfield 
CommitDate: Thu Dec 17 12:35:26 2020 -0500

net: Properly annotate the try-lock for the seqlock
 -

So now we have more questions.

This is an old commit from 2020.  Why is it showing up as compile
breakage today?

Does the commit added to v5.10-yocto match the original in the
linux-stable-rt repo, or did Bruce do a compile tweak for it on the fly
back 3y ago and now upstream fixed the function name to not look like a
typedef?

Are we going to encounter the same issue on v5.15 in another 24 hours?

Your job as submitter is not just to provide the "raw" fix to Bruce, but
to ALSO provide the "how did we get here" story so he has a better idea
of the scope of impact and can perhaps better react in the future by
knowing what happened here so it can be prevented next time.

Thanks,
Paul.
--

> 
> Signed-off-by: Li Wang 
> ---
>  include/net/sch_generic.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
> index 72be68652bb8..4574dd262efd 100644
> --- a/include/net/sch_generic.h
> +++ b/include/net/sch_generic.h
> @@ -195,7 +195,7 @@ static inline bool qdisc_run_begin(struct Qdisc *qdisc)
>* Variant of write_seqcount_t_begin() telling lockdep that a
>* trylock was attempted.
>*/
> - raw_write_seqcount_t_begin(s);
> + raw_write_seqcount_begin(s);
>   seqcount_acquire(>dep_map, 0, 1, _RET_IP_);
>   return true;
>   }
> -- 
> 2.25.1
> 

> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13222): 
https://lists.yoctoproject.org/g/linux-yocto/message/13222
Mute This Topic: https://lists.yoctoproject.org/mt/102114616/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto][v5.10/standard/preempt-rt/base][PATCH] fix linux-yocto-rt compile error

2023-10-22 Thread Li Wang via lists.yoctoproject.org
kernel-source/include/net/sch_generic.h:198:17: error: implicit
declaration of function 'raw_write_seqcount_t_begin'; did you mean
'raw_write_seqcount_begin'? [-Werror=implicit-function-declaration]

Signed-off-by: Li Wang 
---
 include/net/sch_generic.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 72be68652bb8..4574dd262efd 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -195,7 +195,7 @@ static inline bool qdisc_run_begin(struct Qdisc *qdisc)
 * Variant of write_seqcount_t_begin() telling lockdep that a
 * trylock was attempted.
 */
-   raw_write_seqcount_t_begin(s);
+   raw_write_seqcount_begin(s);
seqcount_acquire(>dep_map, 0, 1, _RET_IP_);
return true;
}
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13220): 
https://lists.yoctoproject.org/g/linux-yocto/message/13220
Mute This Topic: https://lists.yoctoproject.org/mt/102114616/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [linux-yocto][v5.10/standard/preempt-rt/base][PATCH] fix linux-yocto-rt compile error

2023-09-05 Thread Bruce Ashfield
I had just found this myself, as I had a feeling my
initial resolution of the conflict was incorrect.

I've merged your patch and pushed it to the repo.

Bruce

In message: [linux-yocto][v5.10/standard/preempt-rt/base][PATCH] fix 
linux-yocto-rt compile error
on 05/09/2023 Li Wang wrote:

> kernel/cgroup/cpuset.c:2959:28: error: 'cpuset_rwsem' undeclared (first use 
> in this function); did you mean 'cpuset_mutex'?
>  2959 | percpu_down_write(_rwsem);
>   |^~~~
>   |cpuset_mutex
> 
> Signed-off-by: Li Wang 
> ---
>  kernel/cgroup/cpuset.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> index 9aac3392c0ff..fd371215b81f 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -2956,7 +2956,7 @@ static void cpuset_css_free(struct cgroup_subsys_state 
> *css)
>  
>  static void cpuset_bind(struct cgroup_subsys_state *root_css)
>  {
> - percpu_down_write(_rwsem);
> + mutex_lock(_mutex);
>   raw_spin_lock_irq(_lock);
>  
>   if (is_in_v2_mode()) {
> @@ -2969,7 +2969,7 @@ static void cpuset_bind(struct cgroup_subsys_state 
> *root_css)
>   }
>  
>   raw_spin_unlock_irq(_lock);
> - percpu_up_write(_rwsem);
> + mutex_unlock(_mutex);
>  }
>  
>  /*
> -- 
> 2.39.1
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13037): 
https://lists.yoctoproject.org/g/linux-yocto/message/13037
Mute This Topic: https://lists.yoctoproject.org/mt/101185581/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: 
https://lists.yoctoproject.org/g/linux-yocto/leave/6687884/21656/624485779/xyzzy
 [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto][v5.10/standard/preempt-rt/base][PATCH] fix linux-yocto-rt compile error

2023-09-05 Thread Li Wang via lists.yoctoproject.org
kernel/cgroup/cpuset.c:2959:28: error: 'cpuset_rwsem' undeclared (first use in 
this function); did you mean 'cpuset_mutex'?
 2959 | percpu_down_write(_rwsem);
  |^~~~
  |cpuset_mutex

Signed-off-by: Li Wang 
---
 kernel/cgroup/cpuset.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 9aac3392c0ff..fd371215b81f 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -2956,7 +2956,7 @@ static void cpuset_css_free(struct cgroup_subsys_state 
*css)
 
 static void cpuset_bind(struct cgroup_subsys_state *root_css)
 {
-   percpu_down_write(_rwsem);
+   mutex_lock(_mutex);
raw_spin_lock_irq(_lock);
 
if (is_in_v2_mode()) {
@@ -2969,7 +2969,7 @@ static void cpuset_bind(struct cgroup_subsys_state 
*root_css)
}
 
raw_spin_unlock_irq(_lock);
-   percpu_up_write(_rwsem);
+   mutex_unlock(_mutex);
 }
 
 /*
-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13036): 
https://lists.yoctoproject.org/g/linux-yocto/message/13036
Mute This Topic: https://lists.yoctoproject.org/mt/101185581/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-