From: Benjamin Herrenschmidt <benh-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
To: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Paul Mackerras <paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org,
takata-TMSiXQfHlQjsTix1lMzHGQ@public.gmane.org,
linux-m32r-rQhvJZKUsGBRYuoOT4C5/9i2O/JbrIOy@public.gmane.org,
Linux-Arch <linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 1/2] Add thread_info_cache_init() to all archs
Date: Fri, 18 Apr 2008 13:58:06 +1000 [thread overview]
Message-ID: <1208491086.6958.381.camel@pasglop> (raw)
In-Reply-To: <20080413191338.9776ebd0.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
> > > otoh, if only one .c file will ever call this function then I think that
> > > all problems are solved by
> > >
> > > a) moving the above ifdeffery into the .c file
> > > b) adding a comment explaining which arch file must provide the override
> > > c) directly including that file from within the .c file.
> >
> > I can definitely do that. I have no problem either way. I can add to all
> > archs too, it's just that whatever way I choose, some people won't be
> > happy with it :-)
> >
> > Anyway, I'll move the ifdeferry to init/main.c then.
>
> Thanks ;)
>
> I'm still wounded by my recent encounter with set_softirq_pending()
> and or_softirq_pending().
Well, looking there, I saw we already used weak symbols for that so what
about the patch below ? If you're ok, I'll re-send with appropriate sob
& adapted powerpc part.
Cheers,
Ben.
Index: linux-work/init/main.c
===================================================================
--- linux-work.orig/init/main.c 2008-03-26 10:39:25.000000000 +1100
+++ linux-work/init/main.c 2008-04-18 13:10:35.000000000 +1000
@@ -504,6 +504,10 @@ void __init __attribute__((weak)) smp_se
{
}
+void __init __attribute__((weak) thread_info_cache_init(void)
+{
+}
+
asmlinkage void __init start_kernel(void)
{
char * command_line;
@@ -623,6 +627,7 @@ asmlinkage void __init start_kernel(void
if (efi_enabled)
efi_enter_virtual_mode();
#endif
+ thread_info_cache_init();
fork_init(num_physpages);
proc_caches_init();
buffer_init();
Index: linux-work/include/linux/sched.h
===================================================================
--- linux-work.orig/include/linux/sched.h 2008-04-02 09:47:56.000000000 +1100
+++ linux-work/include/linux/sched.h 2008-04-18 13:11:10.000000000 +1000
@@ -1893,6 +1893,8 @@ static inline unsigned long *end_of_stac
#endif
+extern void thread_info_cache_init(void);
+
/* set thread flags in other task's structures
* - see asm/thread_info.h for TIF_xxxx flags available
*/
WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@ozlabs.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
linuxppc-dev@ozlabs.org, takata@linux-m32r.org,
linux-m32r@ml.linux-m32r.org,
Linux-Arch <linux-arch@vger.kernel.org>
Subject: Re: [PATCH 1/2] Add thread_info_cache_init() to all archs
Date: Fri, 18 Apr 2008 13:58:06 +1000 [thread overview]
Message-ID: <1208491086.6958.381.camel@pasglop> (raw)
Message-ID: <20080418035806.hqglkLDjK7Ty7tDebsFVK7rPcES-OjlQ5KGAqICuk8c@z> (raw)
In-Reply-To: <20080413191338.9776ebd0.akpm@linux-foundation.org>
> > > otoh, if only one .c file will ever call this function then I think that
> > > all problems are solved by
> > >
> > > a) moving the above ifdeffery into the .c file
> > > b) adding a comment explaining which arch file must provide the override
> > > c) directly including that file from within the .c file.
> >
> > I can definitely do that. I have no problem either way. I can add to all
> > archs too, it's just that whatever way I choose, some people won't be
> > happy with it :-)
> >
> > Anyway, I'll move the ifdeferry to init/main.c then.
>
> Thanks ;)
>
> I'm still wounded by my recent encounter with set_softirq_pending()
> and or_softirq_pending().
Well, looking there, I saw we already used weak symbols for that so what
about the patch below ? If you're ok, I'll re-send with appropriate sob
& adapted powerpc part.
Cheers,
Ben.
Index: linux-work/init/main.c
===================================================================
--- linux-work.orig/init/main.c 2008-03-26 10:39:25.000000000 +1100
+++ linux-work/init/main.c 2008-04-18 13:10:35.000000000 +1000
@@ -504,6 +504,10 @@ void __init __attribute__((weak)) smp_se
{
}
+void __init __attribute__((weak) thread_info_cache_init(void)
+{
+}
+
asmlinkage void __init start_kernel(void)
{
char * command_line;
@@ -623,6 +627,7 @@ asmlinkage void __init start_kernel(void
if (efi_enabled)
efi_enter_virtual_mode();
#endif
+ thread_info_cache_init();
fork_init(num_physpages);
proc_caches_init();
buffer_init();
Index: linux-work/include/linux/sched.h
===================================================================
--- linux-work.orig/include/linux/sched.h 2008-04-02 09:47:56.000000000 +1100
+++ linux-work/include/linux/sched.h 2008-04-18 13:11:10.000000000 +1000
@@ -1893,6 +1893,8 @@ static inline unsigned long *end_of_stac
#endif
+extern void thread_info_cache_init(void);
+
/* set thread flags in other task's structures
* - see asm/thread_info.h for TIF_xxxx flags available
*/
WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@ozlabs.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Linux-Arch <linux-arch@vger.kernel.org>,
linux-m32r@ml.linux-m32r.org, takata@linux-m32r.org,
linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH 1/2] Add thread_info_cache_init() to all archs
Date: Fri, 18 Apr 2008 13:58:06 +1000 [thread overview]
Message-ID: <1208491086.6958.381.camel@pasglop> (raw)
In-Reply-To: <20080413191338.9776ebd0.akpm@linux-foundation.org>
> > > otoh, if only one .c file will ever call this function then I think that
> > > all problems are solved by
> > >
> > > a) moving the above ifdeffery into the .c file
> > > b) adding a comment explaining which arch file must provide the override
> > > c) directly including that file from within the .c file.
> >
> > I can definitely do that. I have no problem either way. I can add to all
> > archs too, it's just that whatever way I choose, some people won't be
> > happy with it :-)
> >
> > Anyway, I'll move the ifdeferry to init/main.c then.
>
> Thanks ;)
>
> I'm still wounded by my recent encounter with set_softirq_pending()
> and or_softirq_pending().
Well, looking there, I saw we already used weak symbols for that so what
about the patch below ? If you're ok, I'll re-send with appropriate sob
& adapted powerpc part.
Cheers,
Ben.
Index: linux-work/init/main.c
===================================================================
--- linux-work.orig/init/main.c 2008-03-26 10:39:25.000000000 +1100
+++ linux-work/init/main.c 2008-04-18 13:10:35.000000000 +1000
@@ -504,6 +504,10 @@ void __init __attribute__((weak)) smp_se
{
}
+void __init __attribute__((weak) thread_info_cache_init(void)
+{
+}
+
asmlinkage void __init start_kernel(void)
{
char * command_line;
@@ -623,6 +627,7 @@ asmlinkage void __init start_kernel(void
if (efi_enabled)
efi_enter_virtual_mode();
#endif
+ thread_info_cache_init();
fork_init(num_physpages);
proc_caches_init();
buffer_init();
Index: linux-work/include/linux/sched.h
===================================================================
--- linux-work.orig/include/linux/sched.h 2008-04-02 09:47:56.000000000 +1100
+++ linux-work/include/linux/sched.h 2008-04-18 13:11:10.000000000 +1000
@@ -1893,6 +1893,8 @@ static inline unsigned long *end_of_stac
#endif
+extern void thread_info_cache_init(void);
+
/* set thread flags in other task's structures
* - see asm/thread_info.h for TIF_xxxx flags available
*/
next prev parent reply other threads:[~2008-04-18 3:58 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-10 3:22 [PATCH 1/2] Add thread_info_cache_init() to all archs Benjamin Herrenschmidt
2008-04-10 3:22 ` Benjamin Herrenschmidt
2008-04-10 3:22 ` Benjamin Herrenschmidt
2008-04-10 3:22 ` Benjamin Herrenschmidt
[not found] ` <20080410032354.90CB1DDF0F-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
2008-04-10 21:46 ` Benjamin Herrenschmidt
2008-04-10 21:46 ` Benjamin Herrenschmidt
2008-04-14 0:19 ` Andrew Morton
2008-04-14 0:19 ` Andrew Morton
2008-04-14 0:19 ` Andrew Morton
2008-04-14 0:19 ` Andrew Morton
2008-04-14 0:38 ` Benjamin Herrenschmidt
2008-04-14 0:38 ` Benjamin Herrenschmidt
2008-04-14 2:13 ` Andrew Morton
2008-04-14 2:13 ` Andrew Morton
2008-04-14 2:13 ` Andrew Morton
[not found] ` <20080413191338.9776ebd0.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2008-04-18 3:58 ` Benjamin Herrenschmidt [this message]
2008-04-18 3:58 ` Benjamin Herrenschmidt
2008-04-18 3:58 ` Benjamin Herrenschmidt
2008-04-18 4:19 ` Andrew Morton
2008-04-18 4:19 ` Andrew Morton
2008-04-18 4:19 ` Andrew Morton
[not found] ` <20080417211905.8ff769fa.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2008-04-18 4:38 ` Michael Ellerman
2008-04-18 4:38 ` Michael Ellerman
2008-04-18 6:44 ` Benjamin Herrenschmidt
2008-04-18 6:44 ` Benjamin Herrenschmidt
2008-04-18 6:44 ` Benjamin Herrenschmidt
2008-05-21 17:56 ` Benjamin Herrenschmidt
2008-05-21 17:56 ` Benjamin Herrenschmidt
2008-05-21 18:41 ` Andrew Morton
2008-05-21 18:41 ` Andrew Morton
2008-05-21 19:06 ` Sam Ravnborg
2008-05-21 19:06 ` Sam Ravnborg
2008-05-21 20:38 ` Benjamin Herrenschmidt
2008-05-21 20:38 ` Benjamin Herrenschmidt
2008-05-21 19:44 ` Benjamin Herrenschmidt
2008-05-21 19:44 ` Benjamin Herrenschmidt
2008-05-21 20:52 ` Andrew Morton
2008-05-21 20:52 ` Andrew Morton
2008-04-18 4:21 ` Kyle McMartin
2008-04-18 4:21 ` Kyle McMartin
-- strict thread matches above, loose matches on Subject: below --
2008-04-10 23:36 Benjamin Herrenschmidt
2008-04-10 23:36 ` Benjamin Herrenschmidt
2008-04-10 23:36 ` Benjamin Herrenschmidt
2008-04-10 23:36 ` Benjamin Herrenschmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1208491086.6958.381.camel@pasglop \
--to=benh-mnsaurcq41sdnm+yrofe0a@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-m32r-rQhvJZKUsGBRYuoOT4C5/9i2O/JbrIOy@public.gmane.org \
--cc=linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
--cc=paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
--cc=takata-TMSiXQfHlQjsTix1lMzHGQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.