[PATCH v2] Port GDB to Hurd x86_64.

2024-02-23 Thread Flavio Cruz
This port extends the existing i686 port to support x86_64 by trying to reuse existing code whenever it makes sense. * gdb/amd64-gnu-tdep.c: Adds logic for handling signal frames and position of amd64 registers in the different Hurd structs. The signal code is very similar to i686, except the

Re: [PATCH v3 gnumach] smp: Rearrange IPI sending mechanism

2024-02-23 Thread Damien Zammit
Hi Almu, On 2/24/24 12:24 AM, Almudena Garcia wrote: > I set the code as this way because it's the standard of Intel's guides. > > The guide explain that although most machines turn on the cpu with an unique > SIPI, some machines could require a second SIPI. Even some older machines > could nee

Re: [PATCH v3 gnumach] smp: Rearrange IPI sending mechanism

2024-02-23 Thread Almudena Garcia
I set the code as this way because it's the standard of Intel's guides. The guide explain that although most machines turn on the cpu with an unique SIPI, some machines could require a second SIPI. Even some older machines could need a INIT IPI before the SIPI. It's the reason because i wrote

Re: [PATCH v3 gnumach] smp: Rearrange IPI sending mechanism

2024-02-23 Thread Samuel Thibault
Damien Zammit, le ven. 23 févr. 2024 08:14:53 +, a ecrit: > Wait for ICR then just assert the signal. > Linux and NetBSD does it this way, assume they know better. But also possibly not. IIRC Almudena had good reasons to set the code this way. What problem does this actually solve? Remember

Re: [PATCH gnumach] pmap: Add assert_splsched calls to ensure at SPL7

2024-02-23 Thread Samuel Thibault
Reworked a differnt way :) Damien Zammit, le ven. 23 févr. 2024 08:14:32 +, a ecrit: > --- > i386/intel/pmap.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c > index e43b06c1..cf075a43 100644 > --- a/i386/intel/pmap.c > +++ b/i386/intel/pmap.

Re: [PATCH v2 gnumach] vm_map: Add comment and assert for vm_map_delete

2024-02-23 Thread Samuel Thibault
Applied, thanks! Damien Zammit, le ven. 23 févr. 2024 08:15:11 +, a ecrit: > This will prevent calling vm_map_delete without the map locked > unless ref_count is zero. > --- > vm/vm_map.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/vm/vm_map.c b/vm/vm_map.c > index c237af

Re: [PATCH gnumach] kern: Use _nocheck variants of locks taken at splsched()

2024-02-23 Thread Samuel Thibault
Fixed and applied, thanks! Damien Zammit, le ven. 23 févr. 2024 08:14:10 +, a ecrit: > Fixes assertion errors when LDEBUG is compiled in. > --- > kern/machine.c| 6 -- > kern/sched_prim.c | 38 -- > 2 files changed, 28 insertions(+), 16 deletions(-

Re: [PATCH gnumach] kern/processor: Do not set default_pset.empty on bootstrap

2024-02-23 Thread Samuel Thibault
Applied, thanks! Damien Zammit, le ven. 23 févr. 2024 08:04:13 +, a ecrit: > This is not needed because cpu_up does this when it comes online, > it calls pset_add_processor(). > --- > kern/processor.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/kern/processor.c b/kern/processor

Re: [PATCH gnumach] kern: Use _irq variant of lock and disable interrupts

2024-02-23 Thread Samuel Thibault
Applied, thanks! Damien Zammit, le ven. 23 févr. 2024 08:09:55 +, a ecrit: > During quantum adjustment, disable interrupts and call appropriate lock. > --- > kern/priority.c | 4 ++-- > kern/processor.c | 2 +- > kern/processor.h | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) >

[PATCH v2 gnumach] vm_map: Add comment and assert for vm_map_delete

2024-02-23 Thread Damien Zammit
This will prevent calling vm_map_delete without the map locked unless ref_count is zero. --- vm/vm_map.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/vm/vm_map.c b/vm/vm_map.c index c237afbe..7db76b7b 100644 --- a/vm/vm_map.c +++ b/vm/vm_map.c @@ -551,10 +551,12 @@ void vm_map_deallo

[PATCH v3 gnumach] smp: Rearrange IPI sending mechanism

2024-02-23 Thread Damien Zammit
Wait for ICR then just assert the signal. Linux and NetBSD does it this way, assume they know better. --- i386/i386/smp.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/i386/i386/smp.c b/i386/i386/smp.c index 05e9de67..a758eea3 100644 --- a/i386/i386/smp.c +++ b/i386/i3

[PATCH gnumach] pmap: Add assert_splsched calls to ensure at SPL7

2024-02-23 Thread Damien Zammit
--- i386/intel/pmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c index e43b06c1..cf075a43 100644 --- a/i386/intel/pmap.c +++ b/i386/intel/pmap.c @@ -3114,6 +3114,7 @@ void process_pmap_updates(pmap_t my_pmap) pmap_t pmap;

[PATCH gnumach] kern: Use _nocheck variants of locks taken at splsched()

2024-02-23 Thread Damien Zammit
Fixes assertion errors when LDEBUG is compiled in. --- kern/machine.c| 6 -- kern/sched_prim.c | 38 -- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/kern/machine.c b/kern/machine.c index f757d146..a350fad4 100644 --- a/kern/machine.c

[PATCH gnumach] kern: Use _irq variant of lock and disable interrupts

2024-02-23 Thread Damien Zammit
During quantum adjustment, disable interrupts and call appropriate lock. --- kern/priority.c | 4 ++-- kern/processor.c | 2 +- kern/processor.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kern/priority.c b/kern/priority.c index fe11d0d4..7f28b3d7 100644 --- a/kern/prio

[PATCH gnumach] kern/processor: Do not set default_pset.empty on bootstrap

2024-02-23 Thread Damien Zammit
This is not needed because cpu_up does this when it comes online, it calls pset_add_processor(). --- kern/processor.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kern/processor.c b/kern/processor.c index 33733a59..0e42fa37 100644 --- a/kern/processor.c +++ b/kern/processor.c @@ -76,7 +76,