* Status of MIPS on 3.0.0-rc6 kernel @ 2011-07-14 11:08 Roland Vossen 2011-07-14 11:51 ` Jonas Gorski 0 siblings, 1 reply; 6+ messages in thread From: Roland Vossen @ 2011-07-14 11:08 UTC (permalink / raw) To: Jonas Gorski Cc: Geert Uytterhoeven, devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, linux-mips Hi Jonas, The (defconfig) mips kernel fails to build, with the error message: arch/mips/kernel/i8259.c:240: error: unknown field 'resume' specified in initializer I read on https://lkml.org/lkml/2011/6/1/37 that Geert Uytterhoeven encountered the same issue on June 1st. Do you know if there are still known problems building a 3.0.0-rc6 MIPS kernel ? Thanks, Roland. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Status of MIPS on 3.0.0-rc6 kernel 2011-07-14 11:08 Status of MIPS on 3.0.0-rc6 kernel Roland Vossen @ 2011-07-14 11:51 ` Jonas Gorski 2011-07-14 19:51 ` Rafael J. Wysocki 0 siblings, 1 reply; 6+ messages in thread From: Jonas Gorski @ 2011-07-14 11:51 UTC (permalink / raw) To: Roland Vossen Cc: Geert Uytterhoeven, devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, linux-mips, Rafael J. Wysocki On 14 July 2011 13:08, Roland Vossen <rvossen@broadcom.com> wrote: > Hi Jonas, > > The (defconfig) mips kernel fails to build, with the error message: > > arch/mips/kernel/i8259.c:240: error: unknown field 'resume' specified in > initializer > > I read on https://lkml.org/lkml/2011/6/1/37 that Geert Uytterhoeven > encountered the same issue on June 1st. > > Do you know if there are still known problems building a 3.0.0-rc6 MIPS > kernel ? You probably could have found that out yourself quite easily [1] ;-) This is actually still a problem in rc7. Commit 2e711c04dbbf7a7732a3f7073b1fc285d12b369d ("PM: Remove sysdev suspend, resume and shutdown operations") broke it. It's probably easily fixable by just removing the offending .resume/.shutdown lines (and their referenced functions), but I don't know the code (or PM) enough to know if some replacement is missing there. Regards, Jonas [1] <https://lkml.org/lkml/2011/7/7/267> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Status of MIPS on 3.0.0-rc6 kernel 2011-07-14 11:51 ` Jonas Gorski @ 2011-07-14 19:51 ` Rafael J. Wysocki 2011-07-15 12:30 ` Roland Vossen 0 siblings, 1 reply; 6+ messages in thread From: Rafael J. Wysocki @ 2011-07-14 19:51 UTC (permalink / raw) To: Jonas Gorski Cc: Roland Vossen, Geert Uytterhoeven, devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, linux-mips On Thursday, July 14, 2011, Jonas Gorski wrote: > On 14 July 2011 13:08, Roland Vossen <rvossen@broadcom.com> wrote: > > Hi Jonas, > > > > The (defconfig) mips kernel fails to build, with the error message: > > > > arch/mips/kernel/i8259.c:240: error: unknown field 'resume' specified in > > initializer > > > > I read on https://lkml.org/lkml/2011/6/1/37 that Geert Uytterhoeven > > encountered the same issue on June 1st. > > > > Do you know if there are still known problems building a 3.0.0-rc6 MIPS > > kernel ? > > You probably could have found that out yourself quite easily [1] ;-) > > This is actually still a problem in rc7. Commit > 2e711c04dbbf7a7732a3f7073b1fc285d12b369d ("PM: Remove sysdev suspend, > resume and shutdown operations") broke it. > It's probably easily fixable by just removing the offending > .resume/.shutdown lines (and their referenced functions), but I don't > know the code (or PM) enough to know if some replacement is missing > there. Please check if the appended patch helps. Thanks, Rafael --- From: Rafael J. Wysocki <rjw@sisk.pl> Subject: MIPS: Convert i8259.c to using syscore_ops The code in arch/mips/kernel/i8259.c still hasn't been converted to using struct syscore_ops instead of a sysdev for resume and shutdown. As a result, this code doesn't build any more after suspend, resume and shutdown callbacks have been removed from struct sysdev_class. Fix this problem by converting i8259.c to using syscore_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> --- arch/mips/kernel/i8259.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) Index: linux-2.6/arch/mips/kernel/i8259.c =================================================================== --- linux-2.6.orig/arch/mips/kernel/i8259.c +++ linux-2.6/arch/mips/kernel/i8259.c @@ -14,7 +14,7 @@ #include <linux/interrupt.h> #include <linux/kernel.h> #include <linux/spinlock.h> -#include <linux/sysdev.h> +#include <linux/syscore_ops.h> #include <linux/irq.h> #include <asm/i8259.h> @@ -215,14 +215,13 @@ spurious_8259A_irq: } } -static int i8259A_resume(struct sys_device *dev) +static void i8259A_resume(void) { if (i8259A_auto_eoi >= 0) init_8259A(i8259A_auto_eoi); - return 0; } -static int i8259A_shutdown(struct sys_device *dev) +static void i8259A_shutdown(void) { /* Put the i8259A into a quiescent state that * the kernel initialization code can get it @@ -232,26 +231,17 @@ static int i8259A_shutdown(struct sys_de outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */ } - return 0; } -static struct sysdev_class i8259_sysdev_class = { - .name = "i8259", +static struct syscore_ops i8259_syscore_ops = { .resume = i8259A_resume, .shutdown = i8259A_shutdown, }; -static struct sys_device device_i8259A = { - .id = 0, - .cls = &i8259_sysdev_class, -}; - static int __init i8259A_init_sysfs(void) { - int error = sysdev_class_register(&i8259_sysdev_class); - if (!error) - error = sysdev_register(&device_i8259A); - return error; + register_syscore_ops(&i8259_syscore_ops); + return 0; } device_initcall(i8259A_init_sysfs); ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Status of MIPS on 3.0.0-rc6 kernel 2011-07-14 19:51 ` Rafael J. Wysocki @ 2011-07-15 12:30 ` Roland Vossen 2011-07-15 21:53 ` [PATCH] MIPS: Convert i8259.c to using syscore_ops (was: Re: Status of MIPS on 3.0.0-rc6 kernel) Rafael J. Wysocki 2011-07-15 21:53 ` Rafael J. Wysocki 0 siblings, 2 replies; 6+ messages in thread From: Roland Vossen @ 2011-07-15 12:30 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Jonas Gorski, Geert Uytterhoeven, devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org > Please check if the appended patch helps. It does, I am able to build a big endian MIPS kernel now. Can you notify me if you submit this patch ? Thanks, Roland. > > Thanks, > Rafael > > --- > From: Rafael J. Wysocki<rjw@sisk.pl> > Subject: MIPS: Convert i8259.c to using syscore_ops > > The code in arch/mips/kernel/i8259.c still hasn't been converted to > using struct syscore_ops instead of a sysdev for resume and shutdown. > As a result, this code doesn't build any more after suspend, resume > and shutdown callbacks have been removed from struct sysdev_class. > Fix this problem by converting i8259.c to using syscore_ops. > > Signed-off-by: Rafael J. Wysocki<rjw@sisk.pl> > --- > arch/mips/kernel/i8259.c | 22 ++++++---------------- > 1 file changed, 6 insertions(+), 16 deletions(-) > > Index: linux-2.6/arch/mips/kernel/i8259.c > =================================================================== > --- linux-2.6.orig/arch/mips/kernel/i8259.c > +++ linux-2.6/arch/mips/kernel/i8259.c > @@ -14,7 +14,7 @@ > #include<linux/interrupt.h> > #include<linux/kernel.h> > #include<linux/spinlock.h> > -#include<linux/sysdev.h> > +#include<linux/syscore_ops.h> > #include<linux/irq.h> > > #include<asm/i8259.h> > @@ -215,14 +215,13 @@ spurious_8259A_irq: > } > } > > -static int i8259A_resume(struct sys_device *dev) > +static void i8259A_resume(void) > { > if (i8259A_auto_eoi>= 0) > init_8259A(i8259A_auto_eoi); > - return 0; > } > > -static int i8259A_shutdown(struct sys_device *dev) > +static void i8259A_shutdown(void) > { > /* Put the i8259A into a quiescent state that > * the kernel initialization code can get it > @@ -232,26 +231,17 @@ static int i8259A_shutdown(struct sys_de > outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ > outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */ > } > - return 0; > } > > -static struct sysdev_class i8259_sysdev_class = { > - .name = "i8259", > +static struct syscore_ops i8259_syscore_ops = { > .resume = i8259A_resume, > .shutdown = i8259A_shutdown, > }; > > -static struct sys_device device_i8259A = { > - .id = 0, > - .cls =&i8259_sysdev_class, > -}; > - > static int __init i8259A_init_sysfs(void) > { > - int error = sysdev_class_register(&i8259_sysdev_class); > - if (!error) > - error = sysdev_register(&device_i8259A); > - return error; > + register_syscore_ops(&i8259_syscore_ops); > + return 0; > } > > device_initcall(i8259A_init_sysfs); > ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] MIPS: Convert i8259.c to using syscore_ops (was: Re: Status of MIPS on 3.0.0-rc6 kernel) 2011-07-15 12:30 ` Roland Vossen @ 2011-07-15 21:53 ` Rafael J. Wysocki 2011-07-15 21:53 ` Rafael J. Wysocki 1 sibling, 0 replies; 6+ messages in thread From: Rafael J. Wysocki @ 2011-07-15 21:53 UTC (permalink / raw) To: Ralf Baechle Cc: Roland Vossen, Jonas Gorski, Geert Uytterhoeven, devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, Linux PM mailing list On Friday, July 15, 2011, Roland Vossen wrote: > > Please check if the appended patch helps. > > It does, I am able to build a big endian MIPS kernel now. Can you notify > me if you submit this patch ? Well, it's been submitted already. :-) Ralf, the appended patch is necessary to fix build on MIPS due to a missing conversion to syscore_ops. Please take it to your tree or let me know if you want me to push it myself. Thanks, Rafael --- From: Rafael J. Wysocki <rjw@sisk.pl> Subject: MIPS: Convert i8259.c to using syscore_ops The code in arch/mips/kernel/i8259.c still hasn't been converted to using struct syscore_ops instead of a sysdev for resume and shutdown. As a result, this code doesn't build any more after suspend, resume and shutdown callbacks have been removed from struct sysdev_class. Fix this problem by converting i8259.c to using syscore_ops. Reported-and-tested-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> --- arch/mips/kernel/i8259.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) Index: linux-2.6/arch/mips/kernel/i8259.c =================================================================== --- linux-2.6.orig/arch/mips/kernel/i8259.c +++ linux-2.6/arch/mips/kernel/i8259.c @@ -14,7 +14,7 @@ #include <linux/interrupt.h> #include <linux/kernel.h> #include <linux/spinlock.h> -#include <linux/sysdev.h> +#include <linux/syscore_ops.h> #include <linux/irq.h> #include <asm/i8259.h> @@ -215,14 +215,13 @@ spurious_8259A_irq: } } -static int i8259A_resume(struct sys_device *dev) +static void i8259A_resume(void) { if (i8259A_auto_eoi >= 0) init_8259A(i8259A_auto_eoi); - return 0; } -static int i8259A_shutdown(struct sys_device *dev) +static void i8259A_shutdown(void) { /* Put the i8259A into a quiescent state that * the kernel initialization code can get it @@ -232,26 +231,17 @@ static int i8259A_shutdown(struct sys_de outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */ } - return 0; } -static struct sysdev_class i8259_sysdev_class = { - .name = "i8259", +static struct syscore_ops i8259_syscore_ops = { .resume = i8259A_resume, .shutdown = i8259A_shutdown, }; -static struct sys_device device_i8259A = { - .id = 0, - .cls = &i8259_sysdev_class, -}; - static int __init i8259A_init_sysfs(void) { - int error = sysdev_class_register(&i8259_sysdev_class); - if (!error) - error = sysdev_register(&device_i8259A); - return error; + register_syscore_ops(&i8259_syscore_ops); + return 0; } device_initcall(i8259A_init_sysfs); ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] MIPS: Convert i8259.c to using syscore_ops (was: Re: Status of MIPS on 3.0.0-rc6 kernel) 2011-07-15 12:30 ` Roland Vossen 2011-07-15 21:53 ` [PATCH] MIPS: Convert i8259.c to using syscore_ops (was: Re: Status of MIPS on 3.0.0-rc6 kernel) Rafael J. Wysocki @ 2011-07-15 21:53 ` Rafael J. Wysocki 1 sibling, 0 replies; 6+ messages in thread From: Rafael J. Wysocki @ 2011-07-15 21:53 UTC (permalink / raw) To: Ralf Baechle Cc: linux-mips@linux-mips.org, Roland Vossen, linux-kernel@vger.kernel.org, Geert Uytterhoeven, Jonas Gorski, devel@linuxdriverproject.org, Linux PM mailing list On Friday, July 15, 2011, Roland Vossen wrote: > > Please check if the appended patch helps. > > It does, I am able to build a big endian MIPS kernel now. Can you notify > me if you submit this patch ? Well, it's been submitted already. :-) Ralf, the appended patch is necessary to fix build on MIPS due to a missing conversion to syscore_ops. Please take it to your tree or let me know if you want me to push it myself. Thanks, Rafael --- From: Rafael J. Wysocki <rjw@sisk.pl> Subject: MIPS: Convert i8259.c to using syscore_ops The code in arch/mips/kernel/i8259.c still hasn't been converted to using struct syscore_ops instead of a sysdev for resume and shutdown. As a result, this code doesn't build any more after suspend, resume and shutdown callbacks have been removed from struct sysdev_class. Fix this problem by converting i8259.c to using syscore_ops. Reported-and-tested-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> --- arch/mips/kernel/i8259.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) Index: linux-2.6/arch/mips/kernel/i8259.c =================================================================== --- linux-2.6.orig/arch/mips/kernel/i8259.c +++ linux-2.6/arch/mips/kernel/i8259.c @@ -14,7 +14,7 @@ #include <linux/interrupt.h> #include <linux/kernel.h> #include <linux/spinlock.h> -#include <linux/sysdev.h> +#include <linux/syscore_ops.h> #include <linux/irq.h> #include <asm/i8259.h> @@ -215,14 +215,13 @@ spurious_8259A_irq: } } -static int i8259A_resume(struct sys_device *dev) +static void i8259A_resume(void) { if (i8259A_auto_eoi >= 0) init_8259A(i8259A_auto_eoi); - return 0; } -static int i8259A_shutdown(struct sys_device *dev) +static void i8259A_shutdown(void) { /* Put the i8259A into a quiescent state that * the kernel initialization code can get it @@ -232,26 +231,17 @@ static int i8259A_shutdown(struct sys_de outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */ } - return 0; } -static struct sysdev_class i8259_sysdev_class = { - .name = "i8259", +static struct syscore_ops i8259_syscore_ops = { .resume = i8259A_resume, .shutdown = i8259A_shutdown, }; -static struct sys_device device_i8259A = { - .id = 0, - .cls = &i8259_sysdev_class, -}; - static int __init i8259A_init_sysfs(void) { - int error = sysdev_class_register(&i8259_sysdev_class); - if (!error) - error = sysdev_register(&device_i8259A); - return error; + register_syscore_ops(&i8259_syscore_ops); + return 0; } device_initcall(i8259A_init_sysfs); ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-07-15 21:53 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-07-14 11:08 Status of MIPS on 3.0.0-rc6 kernel Roland Vossen 2011-07-14 11:51 ` Jonas Gorski 2011-07-14 19:51 ` Rafael J. Wysocki 2011-07-15 12:30 ` Roland Vossen 2011-07-15 21:53 ` [PATCH] MIPS: Convert i8259.c to using syscore_ops (was: Re: Status of MIPS on 3.0.0-rc6 kernel) Rafael J. Wysocki 2011-07-15 21:53 ` Rafael J. Wysocki
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.