Skip to contentSkip to conversation

pci changes

DISCUSSION John Marvin 3 participants 3 messages Dec 4, 2000

lore
Share & tools
lore
#0 lore raw
Quoted 3 lines

Alan wants to put some of our independnt parts in too. I'm just sorting out the stack direction and location issues in the way Linus wants it done.

Well, here are some of the issues I would like to see addressed:

1) When I last checked, the stack growth fix only fixed one of the locations that cared about stack direction. There were others that were not fixed. Are you going to fix them?

2) The current fix duplicated machine independent code (expand_stack and find_vma), modified them, and placed them into the machine dependent code. The problem with that is that whenever changes are made to expand_stack and/or find_vma, we have to notice that and port the fixes, since whoever makes the changes is not likely to notice our special versions. I was hoping that we could get some support for stacks that grow up in the machine independent code so that they are visible.

3) I hope that we will have some control of the stack location in the machine dependent code. I would like to be able to place the stack near the top of memory, and have the location based on the stack size limit (rlim[RLIMIT_STACK].rlim_max).

4) The top of memory for user space is currently 0xc0000000, but I hope to change that to 0xffffe000 in the next month or two.

5) To make it clear "why" the code is different, I was hoping that any #ifdef's in the machine independent code for stack grows up changes would be something like #ifdef STACK_GROWS_UP, rather than #ifdef parisc. Then STACK_GROWS_UP would be set for parisc. This way, when people are making changes to the code, they will understand what the different code is for, rather than wondering why parisc has that code change. Also, it would help all those other future architectures with stacks that grow up when they port Linux :-).

I would appreciate it if you would keep us informed regarding discussions between you and Linus regarding this issue.

John Marvin
[email protected]

#1 lore raw
Quoted 9 lines · John Marvin
Quoted 3 lines

Alan wants to put some of our independnt parts in too. I'm just sorting out the stack direction and location issues in the way Linus wants it done.

Well, here are some of the issues I would like to see addressed:

1) When I last checked, the stack growth fix only fixed one of the locations that cared about stack direction. There were others that were not fixed. Are you going to fix them?

I've fixed the ones which I noticed. You've pointed out some in your other mail which I hadn't, I'll look for them.

Quoted 8 lines

2) The current fix duplicated machine independent code (expand_stack and find_vma), modified them, and placed them into the machine dependent code. The problem with that is that whenever changes are made to expand_stack and/or find_vma, we have to notice that and port the fixes, since whoever makes the changes is not likely to notice our special versions. I was hoping that we could get some support for stacks that grow up in the machine independent code so that they are visible.

ok, that's ugly. i'll try and fix those too.

Quoted 4 lines

3) I hope that we will have some control of the stack location in the machine dependent code. I would like to be able to place the stack near the top of memory, and have the location based on the stack size limit (rlim[RLIMIT_STACK].rlim_max).

i think we can arrange that.

Quoted 8 lines

5) To make it clear "why" the code is different, I was hoping that any #ifdef's in the machine independent code for stack grows up changes would be something like #ifdef STACK_GROWS_UP, rather than #ifdef parisc. Then STACK_GROWS_UP would be set for parisc. This way, when people are making changes to the code, they will understand what the different code is for, rather than wondering why parisc has that code change. Also, it would help all those other future architectures with stacks that grow up when they port Linux :-).

it's #ifdef ARCH_STACK_GROWSUP. it's defined (or not..) in <asm/pgtable.h> along with similar VM constants.

Quoted 2 lines

I would appreciate it if you would keep us informed regarding discussions between you and Linus regarding this issue.

sure. so far there's only been a mail from Alan to Linus asking for a ruling on an appropriate way to handle this, and Linus is in favour of a per-arch define.

Signature · 1 line
Revolutions do not require corporate support.
#2 lore raw
In reply to John Marvin
Quoted 8 lines

2) The current fix duplicated machine independent code (expand_stack and find_vma), modified them, and placed them into the machine dependent code. The problem with that is that whenever changes are made to expand_stack and/or find_vma, we have to notice that and port the fixes, since whoever makes the changes is not likely to notice our special versions. I was hoping that we could get some support for stacks that grow up in the machine independent code so that they are visible.

Duplicating them is right for the 2.4 path, fixing the generic code is probably right post 2.4

Quoted 4 lines

3) I hope that we will have some control of the stack location in the machine dependent code. I would like to be able to place the stack near the top of memory, and have the location based on the stack size limit (rlim[RLIMIT_STACK].rlim_max).

Yep

Quoted 2 lines

4) The top of memory for user space is currently 0xc0000000, but I hope to change that to 0xffffe000 in the next month or two.

Just frob the numbers, that isnt a big issue.

Quoted 4 lines

5) To make it clear "why" the code is different, I was hoping that any #ifdef's in the machine independent code for stack grows up changes would be something like #ifdef STACK_GROWS_UP, rather than #ifdef parisc. Then STACK_GROWS_UP would be set for parisc. This

That is what Linus said when I asked him hppa v STACK_GROWS_UP v duplicating all the code

Quoted 2 lines

I would appreciate it if you would keep us informed regarding discussions between you and Linus regarding this issue.

I will do