* Re: [Linux-ia64] kernel 2.5.69 doesn't compile for UP
2003-05-14 13:31 [Linux-ia64] kernel 2.5.69 doesn't compile for UP Eric Piel
@ 2003-05-14 14:16 ` Matthew Wilcox
2003-05-14 17:32 ` David Mosberger
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Matthew Wilcox @ 2003-05-14 14:16 UTC (permalink / raw)
To: linux-ia64
On Wed, May 14, 2003 at 03:31:08PM +0200, Eric Piel wrote:
> Hello,
> There is a compile error if not compiling for SMP:
> +#ifdef CONFIG_SMP
> if (!tasklist_lock.write_lock)
> +#endif
> read_lock(&tasklist_lock);
Yuck. The right way to do this is read_trylock(&tasklist_lock);
The observant will have noted:
#define write_trylock(lock) ({preempt_disable();_raw_write_trylock(lock) ? \
1 : ({preempt_enable(); 0;});})
/* Where's read_trylock? */
in include/linux/spinlock.h but that doen't justify _not writing it_
when you need it.
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Linux-ia64] kernel 2.5.69 doesn't compile for UP
2003-05-14 13:31 [Linux-ia64] kernel 2.5.69 doesn't compile for UP Eric Piel
2003-05-14 14:16 ` Matthew Wilcox
@ 2003-05-14 17:32 ` David Mosberger
2003-05-14 18:05 ` Matthew Wilcox
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: David Mosberger @ 2003-05-14 17:32 UTC (permalink / raw)
To: linux-ia64
>>>>> On Wed, 14 May 2003 15:16:49 +0100, Matthew Wilcox <willy@debian.org> said:
Matthew> On Wed, May 14, 2003 at 03:31:08PM +0200, Eric Piel wrote:
>> Hello, There is a compile error if not compiling for SMP:
>> +#ifdef CONFIG_SMP if (!tasklist_lock.write_lock) +#endif
>> read_lock(&tasklist_lock);
Matthew> Yuck. The right way to do this is
Matthew> read_trylock(&tasklist_lock); The observant will have
Matthew> noted:
Matthew> /* Where's read_trylock? */
Matthew> in include/linux/spinlock.h but that doen't justify _not
Matthew> writing it_ when you need it.
You want to send me a patch? ;-)
--david
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Linux-ia64] kernel 2.5.69 doesn't compile for UP
2003-05-14 13:31 [Linux-ia64] kernel 2.5.69 doesn't compile for UP Eric Piel
2003-05-14 14:16 ` Matthew Wilcox
2003-05-14 17:32 ` David Mosberger
@ 2003-05-14 18:05 ` Matthew Wilcox
2003-05-14 18:55 ` Andreas Schwab
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Matthew Wilcox @ 2003-05-14 18:05 UTC (permalink / raw)
To: linux-ia64
On Wed, May 14, 2003 at 10:32:14AM -0700, David Mosberger wrote:
> Matthew> Yuck. The right way to do this is
> Matthew> read_trylock(&tasklist_lock); The observant will have
> Matthew> noted:
>
> Matthew> /* Where's read_trylock? */
>
> Matthew> in include/linux/spinlock.h but that doen't justify _not
> Matthew> writing it_ when you need it.
>
> You want to send me a patch? ;-)
Yes, I'd love to ;-) I just need to fix your 2.5.69 patch so it'll compile :-P
$ find -type f |xargs grep compat_sys_setaffinity
./arch/ia64/ia32/ia32_entry.S: data8 compat_sys_setaffinity
Binary file ./arch/ia64/ia32/ia32_entry.o matches
Binary file ./arch/ia64/ia32/built-in.o matches
Seriously, this is an attitude I see way too much of in this port.
Something's broken so it gets kludged inside arch/ia64 (or worse yet,
inside arch/ia64/sn/kernel/sn2/...) rather than fixing it properly.
Maybe it's a relic of the "secret beginnings" of this port, or maybe
people from certain companies have too narrow a focus, but it has to stop.
I think the attitude is starting to change but there's a lot of cruft
built up.
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Linux-ia64] kernel 2.5.69 doesn't compile for UP
2003-05-14 13:31 [Linux-ia64] kernel 2.5.69 doesn't compile for UP Eric Piel
` (2 preceding siblings ...)
2003-05-14 18:05 ` Matthew Wilcox
@ 2003-05-14 18:55 ` Andreas Schwab
2003-05-14 19:30 ` David Mosberger
2003-05-14 23:31 ` David Mosberger
5 siblings, 0 replies; 7+ messages in thread
From: Andreas Schwab @ 2003-05-14 18:55 UTC (permalink / raw)
To: linux-ia64
Matthew Wilcox <willy@debian.org> writes:
|> On Wed, May 14, 2003 at 10:32:14AM -0700, David Mosberger wrote:
|> > Matthew> Yuck. The right way to do this is
|> > Matthew> read_trylock(&tasklist_lock); The observant will have
|> > Matthew> noted:
|> >
|> > Matthew> /* Where's read_trylock? */
|> >
|> > Matthew> in include/linux/spinlock.h but that doen't justify _not
|> > Matthew> writing it_ when you need it.
|> >
|> > You want to send me a patch? ;-)
|>
|> Yes, I'd love to ;-) I just need to fix your 2.5.69 patch so it'll compile :-P
|> $ find -type f |xargs grep compat_sys_setaffinity
|> ./arch/ia64/ia32/ia32_entry.S: data8 compat_sys_setaffinity
|> Binary file ./arch/ia64/ia32/ia32_entry.o matches
|> Binary file ./arch/ia64/ia32/built-in.o matches
--- linux-2.5.69/arch/ia64/ia32/ia32_entry.S.~1~ 2003-05-14 12:14:33.000000000 +0200
+++ linux-2.5.69/arch/ia64/ia32/ia32_entry.S 2003-05-14 12:57:22.000000000 +0200
@@ -439,8 +439,8 @@ ia32_syscall_table:
data8 sys_ni_syscall
data8 sys_ni_syscall
data8 compat_sys_futex /* 240 */
- data8 compat_sys_setaffinity
- data8 compat_sys_getaffinity
+ data8 compat_sys_sched_setaffinity
+ data8 compat_sys_sched_getaffinity
data8 sys_ni_syscall
data8 sys_ni_syscall
data8 sys_ni_syscall /* 245 */
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Linux-ia64] kernel 2.5.69 doesn't compile for UP
2003-05-14 13:31 [Linux-ia64] kernel 2.5.69 doesn't compile for UP Eric Piel
` (3 preceding siblings ...)
2003-05-14 18:55 ` Andreas Schwab
@ 2003-05-14 19:30 ` David Mosberger
2003-05-14 23:31 ` David Mosberger
5 siblings, 0 replies; 7+ messages in thread
From: David Mosberger @ 2003-05-14 19:30 UTC (permalink / raw)
To: linux-ia64
>>>>> On Wed, 14 May 2003 19:05:45 +0100, Matthew Wilcox <willy@debian.org> said:
Matthew> Yes, I'd love to ;-) I just need to fix your 2.5.69 patch
Matthew> so it'll compile :-P $ find -type f |xargs grep
Matthew> compat_sys_setaffinity ./arch/ia64/ia32/ia32_entry.S: data8
The ia32 subsystem does NOT work at the moment, as I mentioned in my
announcement. If you chose to ignore my messages, tough luck.
Matthew> Seriously, this is an attitude I see way too much of in
Matthew> this port. Something's broken so it gets kludged inside
Matthew> arch/ia64 (or worse yet,
It's always nice to hear your opinions.
Matthew> Maybe it's a relic of the "secret beginnings" of this port,
Matthew> or maybe people from certain companies have too narrow a
Matthew> focus, but it has to stop. I think the attitude is
Matthew> starting to change but there's a lot of cruft built up.
Oh, yeah, bring out your conspiracy theories. Yawn.
Perhaps you might want to consider a more obvious scenario? Like,
there is much more work to go around than time/people to do it all and
hence certain things get lower priority?
In fact, why not start with yourself? If you see something that you
absolutely hate, send in a patch to fix it. That's how Linux works.
--david
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Linux-ia64] kernel 2.5.69 doesn't compile for UP
2003-05-14 13:31 [Linux-ia64] kernel 2.5.69 doesn't compile for UP Eric Piel
` (4 preceding siblings ...)
2003-05-14 19:30 ` David Mosberger
@ 2003-05-14 23:31 ` David Mosberger
5 siblings, 0 replies; 7+ messages in thread
From: David Mosberger @ 2003-05-14 23:31 UTC (permalink / raw)
To: linux-ia64
>>>>> On Wed, 14 May 2003 20:55:56 +0200, Andreas Schwab <schwab@suse.de> said:
Andreas> - data8 compat_sys_setaffinity
Andreas> - data8 compat_sys_getaffinity
Andreas> + data8 compat_sys_sched_setaffinity
Andreas> + data8 compat_sys_sched_getaffinity
I applied this patch.
Thanks!
--david
^ permalink raw reply [flat|nested] 7+ messages in thread