* Build breakage if !SYSFS
@ 2007-10-16 13:02 Ralf Baechle
2007-10-16 17:40 ` Dhaval Giani
0 siblings, 1 reply; 5+ messages in thread
From: Ralf Baechle @ 2007-10-16 13:02 UTC (permalink / raw)
To: linux-kernel, Dhaval Giani; +Cc: linux-mips
Changeset 5cb350baf580017da38199625b7365b1763d7180 causes build breakage
if sysfs support is disabled:
kernel/built-in.o: In function `uids_kobject_init':
(.init.text+0x1488): undefined reference to `kernel_subsys'
kernel/built-in.o: In function `uids_kobject_init':
(.init.text+0x1490): undefined reference to `kernel_subsys'
kernel/built-in.o: In function `uids_kobject_init':
(.init.text+0x1480): undefined reference to `kernel_subsys'
kernel/built-in.o: In function `uids_kobject_init':
(.init.text+0x1494): undefined reference to `kernel_subsys'
This breaks for example mipssim_defconfig.
Ralf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Build breakage if !SYSFS
2007-10-16 13:02 Build breakage if !SYSFS Ralf Baechle
@ 2007-10-16 17:40 ` Dhaval Giani
2007-10-16 19:00 ` Ralf Baechle
0 siblings, 1 reply; 5+ messages in thread
From: Dhaval Giani @ 2007-10-16 17:40 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-kernel, linux-mips, Srivatsa Vaddagiri
On Tue, Oct 16, 2007 at 02:02:31PM +0100, Ralf Baechle wrote:
> Changeset 5cb350baf580017da38199625b7365b1763d7180 causes build breakage
> if sysfs support is disabled:
>
> kernel/built-in.o: In function `uids_kobject_init':
> (.init.text+0x1488): undefined reference to `kernel_subsys'
> kernel/built-in.o: In function `uids_kobject_init':
> (.init.text+0x1490): undefined reference to `kernel_subsys'
> kernel/built-in.o: In function `uids_kobject_init':
> (.init.text+0x1480): undefined reference to `kernel_subsys'
> kernel/built-in.o: In function `uids_kobject_init':
> (.init.text+0x1494): undefined reference to `kernel_subsys'
>
> This breaks for example mipssim_defconfig.
>
> Ralf
Hi Ralf,
Can you try this and confirm if it works?
--
When CONFIG_SYSFS is not set, CONFIG_FAIR_USER_SCHED fails to build
with
kernel/built-in.o: In function `uids_kobject_init':
(.init.text+0x1488): undefined reference to `kernel_subsys'
kernel/built-in.o: In function `uids_kobject_init':
(.init.text+0x1490): undefined reference to `kernel_subsys'
kernel/built-in.o: In function `uids_kobject_init':
(.init.text+0x1480): undefined reference to `kernel_subsys'
kernel/built-in.o: In function `uids_kobject_init':
(.init.text+0x1494): undefined reference to `kernel_subsys'
This patch fixes this build error.
Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
---
include/linux/sched.h | 2 ++
kernel/user.c | 23 +++++++++++++++--------
2 files changed, 17 insertions(+), 8 deletions(-)
Index: current/include/linux/sched.h
===================================================================
--- current.orig/include/linux/sched.h
+++ current/include/linux/sched.h
@@ -602,10 +602,12 @@ struct user_struct {
#ifdef CONFIG_FAIR_USER_SCHED
struct task_group *tg;
+#ifdef CONFIG_SYSFS
struct kset kset;
struct subsys_attribute user_attr;
struct work_struct work;
#endif
+#endif
};
#ifdef CONFIG_FAIR_USER_SCHED
Index: current/kernel/user.c
===================================================================
--- current.orig/kernel/user.c
+++ current/kernel/user.c
@@ -87,9 +87,6 @@ static inline struct user_struct *uid_ha
#ifdef CONFIG_FAIR_USER_SCHED
-static struct kobject uids_kobject; /* represents /sys/kernel/uids directory */
-static DEFINE_MUTEX(uids_mutex);
-
static void sched_destroy_user(struct user_struct *up)
{
sched_destroy_group(up->tg);
@@ -111,6 +108,19 @@ static void sched_switch_user(struct tas
sched_move_task(p);
}
+#else /* CONFIG_FAIR_USER_SCHED */
+
+static void sched_destroy_user(struct user_struct *up) { }
+static int sched_create_user(struct user_struct *up) { return 0; }
+static void sched_switch_user(struct task_struct *p) { }
+
+#endif /* CONFIG_FAIR_USER_SCHED */
+
+#if defined(CONFIG_FAIR_USER_SCHED) && defined(CONFIG_SYSFS)
+
+static struct kobject uids_kobject; /* represents /sys/kernel/uids directory */
+static DEFINE_MUTEX(uids_mutex);
+
static inline void uids_mutex_lock(void)
{
mutex_lock(&uids_mutex);
@@ -257,11 +267,8 @@ static inline void free_user(struct user
schedule_work(&up->work);
}
-#else /* CONFIG_FAIR_USER_SCHED */
+#else /* CONFIG_FAIR_USER_SCHED && CONFIG_SYSFS */
-static void sched_destroy_user(struct user_struct *up) { }
-static int sched_create_user(struct user_struct *up) { return 0; }
-static void sched_switch_user(struct task_struct *p) { }
static inline int user_kobject_create(struct user_struct *up) { return 0; }
static inline void uids_mutex_lock(void) { }
static inline void uids_mutex_unlock(void) { }
@@ -280,7 +287,7 @@ static inline void free_user(struct user
kmem_cache_free(uid_cachep, up);
}
-#endif /* CONFIG_FAIR_USER_SCHED */
+#endif
/*
* Locate the user_struct for the passed UID. If found, take a ref on it. The
--
regards,
Dhaval
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Build breakage if !SYSFS
2007-10-16 17:40 ` Dhaval Giani
@ 2007-10-16 19:00 ` Ralf Baechle
2007-10-17 5:16 ` [PATCH] Fix build " Dhaval Giani
0 siblings, 1 reply; 5+ messages in thread
From: Ralf Baechle @ 2007-10-16 19:00 UTC (permalink / raw)
To: Dhaval Giani; +Cc: linux-kernel, linux-mips, Srivatsa Vaddagiri
On Tue, Oct 16, 2007 at 11:10:16PM +0530, Dhaval Giani wrote:
> On Tue, Oct 16, 2007 at 02:02:31PM +0100, Ralf Baechle wrote:
> > Changeset 5cb350baf580017da38199625b7365b1763d7180 causes build breakage
> > if sysfs support is disabled:
> >
> > kernel/built-in.o: In function `uids_kobject_init':
> > (.init.text+0x1488): undefined reference to `kernel_subsys'
> > kernel/built-in.o: In function `uids_kobject_init':
> > (.init.text+0x1490): undefined reference to `kernel_subsys'
> > kernel/built-in.o: In function `uids_kobject_init':
> > (.init.text+0x1480): undefined reference to `kernel_subsys'
> > kernel/built-in.o: In function `uids_kobject_init':
> > (.init.text+0x1494): undefined reference to `kernel_subsys'
> >
> > This breaks for example mipssim_defconfig.
> >
> > Ralf
>
> Hi Ralf,
>
> Can you try this and confirm if it works?
Yes, this solves the issue.
Thanks,
Ralf
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Fix build breakage if !SYSFS
2007-10-16 19:00 ` Ralf Baechle
@ 2007-10-17 5:16 ` Dhaval Giani
2007-10-17 14:09 ` Ingo Molnar
0 siblings, 1 reply; 5+ messages in thread
From: Dhaval Giani @ 2007-10-17 5:16 UTC (permalink / raw)
To: Ralf Baechle, torvalds
Cc: linux-kernel, linux-mips, Srivatsa Vaddagiri, Ingo Molnar,
Andrew Morton
On Tue, Oct 16, 2007 at 08:00:44PM +0100, Ralf Baechle wrote:
> On Tue, Oct 16, 2007 at 11:10:16PM +0530, Dhaval Giani wrote:
>
> > On Tue, Oct 16, 2007 at 02:02:31PM +0100, Ralf Baechle wrote:
> > > Changeset 5cb350baf580017da38199625b7365b1763d7180 causes build breakage
> > > if sysfs support is disabled:
> > >
> > > kernel/built-in.o: In function `uids_kobject_init':
> > > (.init.text+0x1488): undefined reference to `kernel_subsys'
> > > kernel/built-in.o: In function `uids_kobject_init':
> > > (.init.text+0x1490): undefined reference to `kernel_subsys'
> > > kernel/built-in.o: In function `uids_kobject_init':
> > > (.init.text+0x1480): undefined reference to `kernel_subsys'
> > > kernel/built-in.o: In function `uids_kobject_init':
> > > (.init.text+0x1494): undefined reference to `kernel_subsys'
> > >
> > > This breaks for example mipssim_defconfig.
> > >
> > > Ralf
> >
> > Hi Ralf,
> >
> > Can you try this and confirm if it works?
>
> Yes, this solves the issue.
Hi,
Could you please include this patch to fix the build breakage?
thanks
Dhaval
--
When CONFIG_SYSFS is not set, CONFIG_FAIR_USER_SCHED fails to build
with
kernel/built-in.o: In function `uids_kobject_init':
(.init.text+0x1488): undefined reference to `kernel_subsys'
kernel/built-in.o: In function `uids_kobject_init':
(.init.text+0x1490): undefined reference to `kernel_subsys'
kernel/built-in.o: In function `uids_kobject_init':
(.init.text+0x1480): undefined reference to `kernel_subsys'
kernel/built-in.o: In function `uids_kobject_init':
(.init.text+0x1494): undefined reference to `kernel_subsys'
This patch fixes this build error.
Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
---
include/linux/sched.h | 2 ++
kernel/user.c | 23 +++++++++++++++--------
2 files changed, 17 insertions(+), 8 deletions(-)
Index: current/include/linux/sched.h
===================================================================
--- current.orig/include/linux/sched.h
+++ current/include/linux/sched.h
@@ -602,10 +602,12 @@ struct user_struct {
#ifdef CONFIG_FAIR_USER_SCHED
struct task_group *tg;
+#ifdef CONFIG_SYSFS
struct kset kset;
struct subsys_attribute user_attr;
struct work_struct work;
#endif
+#endif
};
#ifdef CONFIG_FAIR_USER_SCHED
Index: current/kernel/user.c
===================================================================
--- current.orig/kernel/user.c
+++ current/kernel/user.c
@@ -87,9 +87,6 @@ static inline struct user_struct *uid_ha
#ifdef CONFIG_FAIR_USER_SCHED
-static struct kobject uids_kobject; /* represents /sys/kernel/uids directory */
-static DEFINE_MUTEX(uids_mutex);
-
static void sched_destroy_user(struct user_struct *up)
{
sched_destroy_group(up->tg);
@@ -111,6 +108,19 @@ static void sched_switch_user(struct tas
sched_move_task(p);
}
+#else /* CONFIG_FAIR_USER_SCHED */
+
+static void sched_destroy_user(struct user_struct *up) { }
+static int sched_create_user(struct user_struct *up) { return 0; }
+static void sched_switch_user(struct task_struct *p) { }
+
+#endif /* CONFIG_FAIR_USER_SCHED */
+
+#if defined(CONFIG_FAIR_USER_SCHED) && defined(CONFIG_SYSFS)
+
+static struct kobject uids_kobject; /* represents /sys/kernel/uids directory */
+static DEFINE_MUTEX(uids_mutex);
+
static inline void uids_mutex_lock(void)
{
mutex_lock(&uids_mutex);
@@ -257,11 +267,8 @@ static inline void free_user(struct user
schedule_work(&up->work);
}
-#else /* CONFIG_FAIR_USER_SCHED */
+#else /* CONFIG_FAIR_USER_SCHED && CONFIG_SYSFS */
-static void sched_destroy_user(struct user_struct *up) { }
-static int sched_create_user(struct user_struct *up) { return 0; }
-static void sched_switch_user(struct task_struct *p) { }
static inline int user_kobject_create(struct user_struct *up) { return 0; }
static inline void uids_mutex_lock(void) { }
static inline void uids_mutex_unlock(void) { }
@@ -280,7 +287,7 @@ static inline void free_user(struct user
kmem_cache_free(uid_cachep, up);
}
-#endif /* CONFIG_FAIR_USER_SCHED */
+#endif
/*
* Locate the user_struct for the passed UID. If found, take a ref on it. The
--
regards,
Dhaval
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix build breakage if !SYSFS
2007-10-17 5:16 ` [PATCH] Fix build " Dhaval Giani
@ 2007-10-17 14:09 ` Ingo Molnar
0 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2007-10-17 14:09 UTC (permalink / raw)
To: Dhaval Giani
Cc: Ralf Baechle, torvalds, linux-kernel, linux-mips,
Srivatsa Vaddagiri, Andrew Morton
* Dhaval Giani <dhaval@linux.vnet.ibm.com> wrote:
> Could you please include this patch to fix the build breakage?
thanks - i've added this to the scheduler patch-queue.
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-10-17 14:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-16 13:02 Build breakage if !SYSFS Ralf Baechle
2007-10-16 17:40 ` Dhaval Giani
2007-10-16 19:00 ` Ralf Baechle
2007-10-17 5:16 ` [PATCH] Fix build " Dhaval Giani
2007-10-17 14:09 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox