Bug 7928 - Fix compile error on loongarch
Summary: Fix compile error on loongarch
Status: NEW
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: ARCH(unspecified) (show other bugs) ARCH(unspecified)
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: maqiao
QA Contact: shuming
URL:
Whiteboard:
Keywords:
: 8567 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-01-17 17:22 UTC by lixianglai
Modified: 2024-03-27 11:32 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lixianglai 2024-01-17 17:22:21 UTC
Description of problem:
There are some errors when compiling on loongarch platform:

/home2/lixianglai/Mine/linux-5.10-anolis-community/kernel/sched/core.c:654:53: error: ‘struct rq’ has no member named ‘prev_irq_time’; did you mean ‘prev_steal_time’?
  654 |         irq_delta = irq_time_read(cpu_of(rq)) - rq->prev_irq_time;
      |                                                     ^~~~~~~~~~~~~
      |                                                     prev_steal_time
/home2/lixianglai/Mine/linux-5.10-anolis-community/kernel/sched/core.c:674:13: error: ‘struct rq’ has no member named ‘prev_irq_time’; did you mean ‘prev_steal_time’?
  674 |         rq->prev_irq_time += irq_delta;
      |             ^~~~~~~~~~~~~
      |             prev_steal_time
make[3]: *** [/home2/lixianglai/Mine/linux-5.10-anolis-community/scripts/Makefile.build:286: kernel/sched/core.o] Error 1
make[3]: *** Waiting for unfinished jobs....


/home2/lixianglai/Mine/linux-5.10-anolis-community/kernel/sched/fair.c:1376:6: error: redefinition of ‘sched_check_group_identity_lock’
 1376 | bool sched_check_group_identity_lock(void)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home2/lixianglai/Mine/linux-5.10-anolis-community/kernel/sched/sched.h:5,
                 from /home2/lixianglai/Mine/linux-5.10-anolis-community/kernel/sched/fair.c:23:
/home2/lixianglai/Mine/linux-5.10-anolis-community/include/linux/sched.h:2361:20: note: previous definition of ‘sched_check_group_identity_lock’ with type ‘bool(void)’ {aka ‘_Bool(void)’}
 2361 | static inline bool sched_check_group_identity_lock(void) { return true; }
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC      drivers/video/fbdev/core/fbcvt.o
  AR      block/partitions/built-in.a
  CC      block/scsi_ioctl.o
  CC      drivers/video/fbdev/core/fb_defio.o
/home2/lixianglai/Mine/linux-5.10-anolis-community/kernel/sched/fair.c: In function ‘sched_check_group_identity_lock’:
/home2/lixianglai/Mine/linux-5.10-anolis-community/kernel/sched/fair.c:1378:21: error: ‘sched_core_gi_conflict_mutex’ undeclared (first use in this function)
 1378 |         mutex_lock(&sched_core_gi_conflict_mutex);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home2/lixianglai/Mine/linux-5.10-anolis-community/kernel/sched/fair.c:1378:21: note: each undeclared identifier is reported only once for each function it appears in
/home2/lixianglai/Mine/linux-5.10-anolis-community/kernel/sched/fair.c: At top level:
/home2/lixianglai/Mine/linux-5.10-anolis-community/kernel/sched/fair.c:1384:6: error: redefinition of ‘sched_check_group_identity_unlock’
 1384 | void sched_check_group_identity_unlock(void)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home2/lixianglai/Mine/linux-5.10-anolis-community/include/linux/sched.h:2362:20: note: previous definition of ‘sched_check_group_identity_unlock’ with type ‘void(void)’
 2362 | static inline void sched_check_group_identity_unlock(void) { }
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC      lib/vsprintf.o
  CC [M]  sound/firewire/packets-buffer.o
/home2/lixianglai/Mine/linux-5.10-anolis-community/kernel/sched/fair.c: In function ‘sched_check_group_identity_unlock’:
/home2/lixianglai/Mine/linux-5.10-anolis-community/kernel/sched/fair.c:1386:23: error: ‘sched_core_gi_conflict_mutex’ undeclared (first use in this function)
 1386 |         mutex_unlock(&sched_core_gi_conflict_mutex);

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
There are no error.

Additional info:
Comment 1 小龙 admin 2024-01-18 11:42:26 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/2627
Comment 2 dtcccc alibaba_cloud_group 2024-03-27 11:32:51 UTC
*** Bug 8567 has been marked as a duplicate of this bug. ***