bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enable SMP support


From: Almudena Garcia
Subject: Re: Enable SMP support
Date: Thu, 28 Jun 2018 20:31:18 +0200

Hi, another time:

>  /* More-specific code must define cpu_number() and CPU_NUMBER.  */
>  #define      CX(addr, reg)   addr(,reg,4)
> +#define CPU_NUMBER(reg) /*XXX: we think this is not right, but we wanted to bypass the compiling error. Please review. */

It will have to contain the assembler code to get the CPU number indeed.


We have just added cpu_number() function in this file, fixing a few .S files.
I attach the patch.

Now the compiler gets the gnumach.o, but It returns another linker error.
I attach logs also.


How can I solve this?



2018-06-28 1:12 GMT+02:00 Almudena Garcia <liberamenso10000@gmail.com>:
Yes, the type for processor is needed, see the patch I have now commited.

Ok. I've just to apply your patches and copy my cpu_number() function in kern/cpu_number.h.
The latest compilation problems have disappeared, but there are any errors yet.

>  /* More-specific code must define cpu_number() and CPU_NUMBER.  */
>  #define      CX(addr, reg)   addr(,reg,4)
> +#define CPU_NUMBER(reg) /*XXX: we think this is not right, but we wanted to bypass the compiling error. Please review. */

It will have to contain the assembler code to get the CPU number indeed.

Now we have to add the cpu_number() function in this file.


2018-06-27 23:42 GMT+02:00 Samuel Thibault <samuel.thibault@gnu.org>:
Hello,

Almudena Garcia, le mer. 27 juin 2018 22:37:55 +0200, a ecrit:
> ../kern/sched_prim.h:188:1: warning: parameter names (without types) in function declaration
>  extern void cause_ast_check(processor); /*new*/

Yes, the type for processor is needed, see the patch I have now commited.

>  /* More-specific code must define cpu_number() and CPU_NUMBER.  */
>  #define      CX(addr, reg)   addr(,reg,4)
> +#define CPU_NUMBER(reg) /*XXX: we think this is not right, but we wanted to bypass the compiling error. Please review. */

It will have to contain the assembler code to get the CPU number indeed.

> diff -Naur '--exclude=.git' gnumach/kern/sched_prim.h gnumach-dev/kern/sched_prim.h
> --- gnumach/kern/sched_prim.h 2018-06-27 16:52:47.000000000 -0400
> +++ gnumach-dev/kern/sched_prim.h     2018-06-27 15:36:46.000000000 -0400
> +extern void cause_ast_check(processor); /*new*/

> diff -Naur '--exclude=.git' gnumach/kern/thread.h gnumach-dev/kern/thread.h
> --- gnumach/kern/thread.h     2018-06-27 16:52:47.000000000 -0400
> +++ gnumach-dev/kern/thread.h 2018-06-27 15:36:46.000000000 -0400
> +extern void cause_ast_check(processor); /*new*/

There is no need to declare it twice.  I have just declared it in a
proper place instead.

Samuel


Attachment: smp.patch
Description: Text Data

Attachment: build.log
Description: Text Data

Attachment: fullbuild.log
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]