* RE: missing entries in fsys.S
2006-02-15 14:33 missing entries in fsys.S Stephane Eranian
@ 2006-02-15 16:15 ` Chen, Kenneth W
2006-02-15 16:28 ` Stephane Eranian
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Chen, Kenneth W @ 2006-02-15 16:15 UTC (permalink / raw)
To: linux-ia64
Stephane Eranian wrote on Wednesday, February 15, 2006 6:34 AM
> It appears that Linus's 2.6 git tree is missing some entryies in fsys.S.
> I don't know abot your particular GIT tree. In any case, here is a patch
> to fix this.
That's what the .space directive is for when I added it a couple of weeks
ago. It automatically fills in zero so lazy people like me can save a few
key strokes. I guess the name __NR_syscall_last is not intuitive, it meant
to be last_non_zero entry for fsys table.
- Ken
See this posting:
http://www.gelato.unsw.edu.au/archives/linux-ia64/0602/16862.html
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: missing entries in fsys.S
2006-02-15 14:33 missing entries in fsys.S Stephane Eranian
2006-02-15 16:15 ` Chen, Kenneth W
@ 2006-02-15 16:28 ` Stephane Eranian
2006-02-15 19:16 ` Chen, Kenneth W
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Stephane Eranian @ 2006-02-15 16:28 UTC (permalink / raw)
To: linux-ia64
Ken,
On Wed, Feb 15, 2006 at 08:15:44AM -0800, Chen, Kenneth W wrote:
> Stephane Eranian wrote on Wednesday, February 15, 2006 6:34 AM
> > It appears that Linus's 2.6 git tree is missing some entryies in fsys.S.
> > I don't know abot your particular GIT tree. In any case, here is a patch
> > to fix this.
>
> That's what the .space directive is for when I added it a couple of weeks
> ago. It automatically fills in zero so lazy people like me can save a few
> key strokes. I guess the name __NR_syscall_last is not intuitive, it meant
> to be last_non_zero entry for fsys table.
>
Obviously, I missed that patch. I agree with you that it is tedious
to track new syscalls. Your trick is nice. I would certainly renamed
the syscall_last to NR_fsyscalls_lat or something like this.
Thanks.
--
-Stephane
^ permalink raw reply [flat|nested] 7+ messages in thread* RE: missing entries in fsys.S
2006-02-15 14:33 missing entries in fsys.S Stephane Eranian
2006-02-15 16:15 ` Chen, Kenneth W
2006-02-15 16:28 ` Stephane Eranian
@ 2006-02-15 19:16 ` Chen, Kenneth W
2006-02-15 19:40 ` Luck, Tony
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Chen, Kenneth W @ 2006-02-15 19:16 UTC (permalink / raw)
To: linux-ia64
Stephane Eranian wrote on Wednesday, February 15, 2006 8:28 AM
> I would certainly renamed
> the syscall_last to NR_fsyscalls_lat or something like this.
How does the following patch look? Is it better?
[patch] beautify coding style for zeroing end of fsyscall_table entries.
Remove misleading __NR_syscall_last and add more comments.
Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
--- linux-2.6.16-rc3/arch/ia64/kernel/fsys.S.orig 2006-02-15 11:39:52.221926956 -0800
+++ linux-2.6.16-rc3/arch/ia64/kernel/fsys.S 2006-02-15 12:05:28.789290945 -0800
@@ -878,8 +878,10 @@ fsyscall_table:
data8 0 // timer_delete
data8 0 // clock_settime
data8 fsys_clock_gettime // clock_gettime
- #define __NR_syscall_last 1255
- .space 8*(NR_syscalls + 1024 - __NR_syscall_last), 0
+ // fill in zeros for the remaining entries
+ .zero:
+ .space fsyscall_table + 8*NR_syscalls - .zero, 0
- .org fsyscall_table + 8*NR_syscalls // guard against failures to increase NR_syscalls
+ // guard against failures to increase NR_syscalls
+ .org fsyscall_table + 8*NR_syscalls
^ permalink raw reply [flat|nested] 7+ messages in thread* RE: missing entries in fsys.S
2006-02-15 14:33 missing entries in fsys.S Stephane Eranian
` (2 preceding siblings ...)
2006-02-15 19:16 ` Chen, Kenneth W
@ 2006-02-15 19:40 ` Luck, Tony
2006-02-15 19:58 ` Chen, Kenneth W
2006-02-15 20:04 ` Luck, Tony
5 siblings, 0 replies; 7+ messages in thread
From: Luck, Tony @ 2006-02-15 19:40 UTC (permalink / raw)
To: linux-ia64
+ // guard against failures to increase NR_syscalls
+ .org fsyscall_table + 8*NR_syscalls
Is this redundant ... with the .space directive I don't think
that this can ever trip ... can it?
-Tony
^ permalink raw reply [flat|nested] 7+ messages in thread* RE: missing entries in fsys.S
2006-02-15 14:33 missing entries in fsys.S Stephane Eranian
` (3 preceding siblings ...)
2006-02-15 19:40 ` Luck, Tony
@ 2006-02-15 19:58 ` Chen, Kenneth W
2006-02-15 20:04 ` Luck, Tony
5 siblings, 0 replies; 7+ messages in thread
From: Chen, Kenneth W @ 2006-02-15 19:58 UTC (permalink / raw)
To: linux-ia64
Luck, Tony wrote on Wednesday, February 15, 2006 11:40 AM
> + // guard against failures to increase NR_syscalls
> + .org fsyscall_table + 8*NR_syscalls
>
> Is this redundant ... with the .space directive I don't think
> that this can ever trip ... can it?
Sadly gnu assembler gives only warning if .space's count argument
is zero or negative.
I agree that this is redundant given that we already check the
size in sys_call_table (entry.S). So this can be removed. Tony,
do you want me to send you another patch or you can just massage it?
- Ken
^ permalink raw reply [flat|nested] 7+ messages in thread* RE: missing entries in fsys.S
2006-02-15 14:33 missing entries in fsys.S Stephane Eranian
` (4 preceding siblings ...)
2006-02-15 19:58 ` Chen, Kenneth W
@ 2006-02-15 20:04 ` Luck, Tony
5 siblings, 0 replies; 7+ messages in thread
From: Luck, Tony @ 2006-02-15 20:04 UTC (permalink / raw)
To: linux-ia64
> Sadly gnu assembler gives only warning if .space's count argument
> is zero or negative.
>
> I agree that this is redundant given that we already check the
> size in sys_call_table (entry.S). So this can be removed. Tony,
> do you want me to send you another patch or you can just massage it?
I think that the .org thing only gives a warning too.
I'll massage the patch (gives me a chance to try out the "git squash"
code that I'm working on).
-Tony
^ permalink raw reply [flat|nested] 7+ messages in thread