Re: [PATCH 16/20] swsusp: do not use virt_to_page on kernel data address
Hi! > > > Signed-off-by: Vivek Goyal <[EMAIL PROTECTED]> > > > > > +static int swsusp_header_init(void) > > > +{ > > > + swsusp_header = (struct swsusp_header*) __get_free_page(GFP_KERNEL); > > > + if (!swsusp_header) > > > + panic("Could not allocate memory for swsusp_header\n"); > > > + return 0; > > > +} > > > + > > > +core_initcall(swsusp_header_init); > > > > I do not like the panic, but I guess it is okay as we are running > > during boot? (Could you add a comment?) Otherwise ok. > > > > Hi Pavel, > > Yes, it is an initcall and this memory page will be allocated during > boot time. Not very sure what comment to put there. To me it seems > pretty obivious with "core_initcall". I'd put "/* running at boot time, so allocation can't fail */" there (and maybe just replace panic with BUG_ON), but I guess that's not important. ACK. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 16/20] swsusp: do not use virt_to_page on kernel data address
Hi! > > > o virt_to_page() call should be used on kernel linear addresses and not > > > on kernel text and data addresses. Swsusp code uses it on kernel data > > > (statically allocated swsusp_header). > > > > > > o Allocate swsusp_header dynamically so that virt_to_page() can be used > > > safely. > > > > > > o I am changing this because in next few patches, __pa() on x86_64 will > > > no longer support kernel text and data addresses and hibernation > > > breaks. > > > > > > Signed-off-by: Vivek Goyal <[EMAIL PROTECTED]> > > > > (I assume this was tested, too?) > > Yes. I have tested this and it works fine. ACK from me, then. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 16/20] swsusp: do not use virt_to_page on kernel data address
Hi! o virt_to_page() call should be used on kernel linear addresses and not on kernel text and data addresses. Swsusp code uses it on kernel data (statically allocated swsusp_header). o Allocate swsusp_header dynamically so that virt_to_page() can be used safely. o I am changing this because in next few patches, __pa() on x86_64 will no longer support kernel text and data addresses and hibernation breaks. Signed-off-by: Vivek Goyal [EMAIL PROTECTED] (I assume this was tested, too?) Yes. I have tested this and it works fine. ACK from me, then. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 16/20] swsusp: do not use virt_to_page on kernel data address
Hi! Signed-off-by: Vivek Goyal [EMAIL PROTECTED] +static int swsusp_header_init(void) +{ + swsusp_header = (struct swsusp_header*) __get_free_page(GFP_KERNEL); + if (!swsusp_header) + panic(Could not allocate memory for swsusp_header\n); + return 0; +} + +core_initcall(swsusp_header_init); I do not like the panic, but I guess it is okay as we are running during boot? (Could you add a comment?) Otherwise ok. Hi Pavel, Yes, it is an initcall and this memory page will be allocated during boot time. Not very sure what comment to put there. To me it seems pretty obivious with core_initcall. I'd put /* running at boot time, so allocation can't fail */ there (and maybe just replace panic with BUG_ON), but I guess that's not important. ACK. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 16/20] swsusp: do not use virt_to_page on kernel data address
On Wed, Mar 07, 2007 at 11:49:15PM +0100, Pavel Machek wrote: > Hi! > > > o virt_to_page() call should be used on kernel linear addresses and not > > on kernel text and data addresses. Swsusp code uses it on kernel data > > (statically allocated swsusp_header). > > > > o Allocate swsusp_header dynamically so that virt_to_page() can be used > > safely. > > > > o I am changing this because in next few patches, __pa() on x86_64 will > > no longer support kernel text and data addresses and hibernation breaks. > > > > Signed-off-by: Vivek Goyal <[EMAIL PROTECTED]> > > > +static int swsusp_header_init(void) > > +{ > > + swsusp_header = (struct swsusp_header*) __get_free_page(GFP_KERNEL); > > + if (!swsusp_header) > > + panic("Could not allocate memory for swsusp_header\n"); > > + return 0; > > +} > > + > > +core_initcall(swsusp_header_init); > > I do not like the panic, but I guess it is okay as we are running > during boot? (Could you add a comment?) Otherwise ok. > Hi Pavel, Yes, it is an initcall and this memory page will be allocated during boot time. Not very sure what comment to put there. To me it seems pretty obivious with "core_initcall". Thanks Vivek - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 16/20] swsusp: do not use virt_to_page on kernel data address
On Wed, Mar 07, 2007 at 11:50:06PM +0100, Pavel Machek wrote: > Hi! > > > o virt_to_page() call should be used on kernel linear addresses and not > > on kernel text and data addresses. Swsusp code uses it on kernel data > > (statically allocated swsusp_header). > > > > o Allocate swsusp_header dynamically so that virt_to_page() can be used > > safely. > > > > o I am changing this because in next few patches, __pa() on x86_64 will > > no longer support kernel text and data addresses and hibernation breaks. > > > > Signed-off-by: Vivek Goyal <[EMAIL PROTECTED]> > > (I assume this was tested, too?) > Pavel Yes. I have tested this and it works fine. Thanks Vivek - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 16/20] swsusp: do not use virt_to_page on kernel data address
Hi. On Wed, 2007-03-07 at 23:50 +0100, Pavel Machek wrote: > Hi! > > > o virt_to_page() call should be used on kernel linear addresses and not > > on kernel text and data addresses. Swsusp code uses it on kernel data > > (statically allocated swsusp_header). > > > > o Allocate swsusp_header dynamically so that virt_to_page() can be used > > safely. > > > > o I am changing this because in next few patches, __pa() on x86_64 will > > no longer support kernel text and data addresses and hibernation breaks. > > > > Signed-off-by: Vivek Goyal <[EMAIL PROTECTED]> > > (I assume this was tested, too?) Absolutely. Nigel - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 16/20] swsusp: do not use virt_to_page on kernel data address
Hi! > o virt_to_page() call should be used on kernel linear addresses and not > on kernel text and data addresses. Swsusp code uses it on kernel data > (statically allocated swsusp_header). > > o Allocate swsusp_header dynamically so that virt_to_page() can be used > safely. > > o I am changing this because in next few patches, __pa() on x86_64 will > no longer support kernel text and data addresses and hibernation breaks. > > Signed-off-by: Vivek Goyal <[EMAIL PROTECTED]> (I assume this was tested, too?) Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 16/20] swsusp: do not use virt_to_page on kernel data address
Hi! > o virt_to_page() call should be used on kernel linear addresses and not > on kernel text and data addresses. Swsusp code uses it on kernel data > (statically allocated swsusp_header). > > o Allocate swsusp_header dynamically so that virt_to_page() can be used > safely. > > o I am changing this because in next few patches, __pa() on x86_64 will > no longer support kernel text and data addresses and hibernation breaks. > > Signed-off-by: Vivek Goyal <[EMAIL PROTECTED]> > +static int swsusp_header_init(void) > +{ > + swsusp_header = (struct swsusp_header*) __get_free_page(GFP_KERNEL); > + if (!swsusp_header) > + panic("Could not allocate memory for swsusp_header\n"); > + return 0; > +} > + > +core_initcall(swsusp_header_init); I do not like the panic, but I guess it is okay as we are running during boot? (Could you add a comment?) Otherwise ok. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 16/20] swsusp: do not use virt_to_page on kernel data address
Hi! o virt_to_page() call should be used on kernel linear addresses and not on kernel text and data addresses. Swsusp code uses it on kernel data (statically allocated swsusp_header). o Allocate swsusp_header dynamically so that virt_to_page() can be used safely. o I am changing this because in next few patches, __pa() on x86_64 will no longer support kernel text and data addresses and hibernation breaks. Signed-off-by: Vivek Goyal [EMAIL PROTECTED] +static int swsusp_header_init(void) +{ + swsusp_header = (struct swsusp_header*) __get_free_page(GFP_KERNEL); + if (!swsusp_header) + panic(Could not allocate memory for swsusp_header\n); + return 0; +} + +core_initcall(swsusp_header_init); I do not like the panic, but I guess it is okay as we are running during boot? (Could you add a comment?) Otherwise ok. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 16/20] swsusp: do not use virt_to_page on kernel data address
Hi! o virt_to_page() call should be used on kernel linear addresses and not on kernel text and data addresses. Swsusp code uses it on kernel data (statically allocated swsusp_header). o Allocate swsusp_header dynamically so that virt_to_page() can be used safely. o I am changing this because in next few patches, __pa() on x86_64 will no longer support kernel text and data addresses and hibernation breaks. Signed-off-by: Vivek Goyal [EMAIL PROTECTED] (I assume this was tested, too?) Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 16/20] swsusp: do not use virt_to_page on kernel data address
Hi. On Wed, 2007-03-07 at 23:50 +0100, Pavel Machek wrote: Hi! o virt_to_page() call should be used on kernel linear addresses and not on kernel text and data addresses. Swsusp code uses it on kernel data (statically allocated swsusp_header). o Allocate swsusp_header dynamically so that virt_to_page() can be used safely. o I am changing this because in next few patches, __pa() on x86_64 will no longer support kernel text and data addresses and hibernation breaks. Signed-off-by: Vivek Goyal [EMAIL PROTECTED] (I assume this was tested, too?) Absolutely. Nigel - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 16/20] swsusp: do not use virt_to_page on kernel data address
On Wed, Mar 07, 2007 at 11:50:06PM +0100, Pavel Machek wrote: Hi! o virt_to_page() call should be used on kernel linear addresses and not on kernel text and data addresses. Swsusp code uses it on kernel data (statically allocated swsusp_header). o Allocate swsusp_header dynamically so that virt_to_page() can be used safely. o I am changing this because in next few patches, __pa() on x86_64 will no longer support kernel text and data addresses and hibernation breaks. Signed-off-by: Vivek Goyal [EMAIL PROTECTED] (I assume this was tested, too?) Pavel Yes. I have tested this and it works fine. Thanks Vivek - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 16/20] swsusp: do not use virt_to_page on kernel data address
On Wed, Mar 07, 2007 at 11:49:15PM +0100, Pavel Machek wrote: Hi! o virt_to_page() call should be used on kernel linear addresses and not on kernel text and data addresses. Swsusp code uses it on kernel data (statically allocated swsusp_header). o Allocate swsusp_header dynamically so that virt_to_page() can be used safely. o I am changing this because in next few patches, __pa() on x86_64 will no longer support kernel text and data addresses and hibernation breaks. Signed-off-by: Vivek Goyal [EMAIL PROTECTED] +static int swsusp_header_init(void) +{ + swsusp_header = (struct swsusp_header*) __get_free_page(GFP_KERNEL); + if (!swsusp_header) + panic(Could not allocate memory for swsusp_header\n); + return 0; +} + +core_initcall(swsusp_header_init); I do not like the panic, but I guess it is okay as we are running during boot? (Could you add a comment?) Otherwise ok. Hi Pavel, Yes, it is an initcall and this memory page will be allocated during boot time. Not very sure what comment to put there. To me it seems pretty obivious with core_initcall. Thanks Vivek - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/