diff for duplicates of <20100511200450.GG13931@atomide.com> diff --git a/a/1.txt b/N1/1.txt index 5c9aca3..ab1f45e 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -35,65 +35,61 @@ Acked-by: Tony Lindgren <tony@atomide.com> > > Cc: Richard Woodruff <r-woodruff2@ti.com> > > Cc: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com> > > --- -> > arch/arm/vfp/vfpmodule.c | 28 ++++++++++++++++++++-------- -> > 1 files changed, 20 insertions(+), 8 deletions(-) +> > ?arch/arm/vfp/vfpmodule.c | ? 28 ++++++++++++++++++++-------- +> > ?1 files changed, 20 insertions(+), 8 deletions(-) > > > > diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c > > index 2d7423a..920a33b 100644 > > --- a/arch/arm/vfp/vfpmodule.c > > +++ b/arch/arm/vfp/vfpmodule.c > > @@ -329,22 +329,34 @@ static void vfp_enable(void *unused) -> > #ifdef CONFIG_PM -> > #include <linux/sysdev.h> +> > ?#ifdef CONFIG_PM +> > ?#include <linux/sysdev.h> > > > > -static int vfp_pm_suspend(struct sys_device *dev, pm_message_t state) > > +void vfp_pm_save_context(void) -> > { -> > - struct thread_info *ti = current_thread_info(); -> > u32 fpexc = fmrx(FPEXC); -> > + unsigned int cpu = get_cpu(); +> > ?{ +> > - ? ? ? struct thread_info *ti = current_thread_info(); +> > ? ? ? ?u32 fpexc = fmrx(FPEXC); +> > + ? ? ? unsigned int cpu = get_cpu(); > > + -> > + /* Save last_VFP_context if needed */ -> > + if (last_VFP_context[cpu]) { -> > + /* Enable vfp to save context */ -> > + if (!(fpexc & FPEXC_EN)) { -> > + vfp_enable(NULL); -> > + fmxr(FPEXC, fpexc | FPEXC_EN); -> > + } +> > + ? ? ? /* Save last_VFP_context if needed */ +> > + ? ? ? if (last_VFP_context[cpu]) { +> > + ? ? ? ? ? ? ? /* Enable vfp to save context */ +> > + ? ? ? ? ? ? ? if (!(fpexc & FPEXC_EN)) { +> > + ? ? ? ? ? ? ? ? ? ? ? vfp_enable(NULL); +> > + ? ? ? ? ? ? ? ? ? ? ? fmxr(FPEXC, fpexc | FPEXC_EN); +> > + ? ? ? ? ? ? ? } > > -> > - /* if vfp is on, then save state for resumption */ -> > - if (fpexc & FPEXC_EN) { -> > printk(KERN_DEBUG "%s: saving vfp state\n", __func__); -> > - vfp_save_state(&ti->vfpstate, fpexc); -> > + vfp_save_state(last_VFP_context[cpu], fpexc); +> > - ? ? ? /* if vfp is on, then save state for resumption */ +> > - ? ? ? if (fpexc & FPEXC_EN) { +> > ? ? ? ? ? ? ? ?printk(KERN_DEBUG "%s: saving vfp state\n", __func__); +> > - ? ? ? ? ? ? ? vfp_save_state(&ti->vfpstate, fpexc); +> > + ? ? ? ? ? ? ? vfp_save_state(last_VFP_context[cpu], fpexc); > > -> > /* disable, just in case */ -> > - fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN); -> > + fmxr(FPEXC, fpexc & ~FPEXC_EN); +> > ? ? ? ? ? ? ? ?/* disable, just in case */ +> > - ? ? ? ? ? ? ? fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN); +> > + ? ? ? ? ? ? ? fmxr(FPEXC, fpexc & ~FPEXC_EN); > > + -> > + last_VFP_context[cpu] = NULL; -> > } +> > + ? ? ? ? ? ? ? last_VFP_context[cpu] = NULL; +> > ? ? ? ?} > > -> > - /* clear any information we had about last context state */ -> > - memset(last_VFP_context, 0, sizeof(last_VFP_context)); -> > + put_cpu(); +> > - ? ? ? /* clear any information we had about last context state */ +> > - ? ? ? memset(last_VFP_context, 0, sizeof(last_VFP_context)); +> > + ? ? ? put_cpu(); > > +} > > + > > +static int vfp_pm_suspend(struct sys_device *dev, pm_message_t state) > > +{ -> > + vfp_pm_save_context(); +> > + ? ? ? vfp_pm_save_context(); > > -> > return 0; -> > } +> > ? ? ? ?return 0; +> > ?} > > -- > > 1.5.4.3 > > > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-omap" in -> > the body of a message to majordomo@vger.kernel.org -> > More majordomo info at http://vger.kernel.org/majordomo-info.html +> > the body of a message to majordomo at vger.kernel.org +> > More majordomo info at ?http://vger.kernel.org/majordomo-info.html > > --- -To unsubscribe from this list: send the line "unsubscribe linux-omap" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/a/content_digest b/N1/content_digest index 9b13a85..d3adc42 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,14 +1,10 @@ "ref\01259847353-22725-1-git-send-email-tero.kristo@nokia.com\0" "ref\01259847353-22725-2-git-send-email-tero.kristo@nokia.com\0" "ref\0AANLkTilyji16JTT1Oe8fOT6Oz5tzopQNc-3AIQ3UprCO@mail.gmail.com\0" - "From\0Tony Lindgren <tony@atomide.com>\0" - "Subject\0Re: [PATCHv2 1/2] ARM: VFP: Fixed suspend and added context save support\0" + "From\0tony@atomide.com (Tony Lindgren)\0" + "Subject\0[PATCHv2 1/2] ARM: VFP: Fixed suspend and added context save support\0" "Date\0Tue, 11 May 2010 13:04:50 -0700\0" - "To\0ye janboe <janboe.ye@gmail.com>\0" - "Cc\0Russell King - ARM Linux <linux@arm.linux.org.uk>" - linux-arm-kernel@lists.infradead.org - linux-omap@vger.kernel.org - " Tero Kristo <tero.kristo@nokia.com>\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" "b\0" "* ye janboe <janboe.ye@gmail.com> [100510 20:10]:\n" @@ -48,67 +44,63 @@ "> > Cc: Richard Woodruff <r-woodruff2@ti.com>\n" "> > Cc: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>\n" "> > ---\n" - "> > \302\240arch/arm/vfp/vfpmodule.c | \302\240 28 ++++++++++++++++++++--------\n" - "> > \302\2401 files changed, 20 insertions(+), 8 deletions(-)\n" + "> > ?arch/arm/vfp/vfpmodule.c | ? 28 ++++++++++++++++++++--------\n" + "> > ?1 files changed, 20 insertions(+), 8 deletions(-)\n" "> >\n" "> > diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c\n" "> > index 2d7423a..920a33b 100644\n" "> > --- a/arch/arm/vfp/vfpmodule.c\n" "> > +++ b/arch/arm/vfp/vfpmodule.c\n" "> > @@ -329,22 +329,34 @@ static void vfp_enable(void *unused)\n" - "> > \302\240#ifdef CONFIG_PM\n" - "> > \302\240#include <linux/sysdev.h>\n" + "> > ?#ifdef CONFIG_PM\n" + "> > ?#include <linux/sysdev.h>\n" "> >\n" "> > -static int vfp_pm_suspend(struct sys_device *dev, pm_message_t state)\n" "> > +void vfp_pm_save_context(void)\n" - "> > \302\240{\n" - "> > - \302\240 \302\240 \302\240 struct thread_info *ti = current_thread_info();\n" - "> > \302\240 \302\240 \302\240 \302\240u32 fpexc = fmrx(FPEXC);\n" - "> > + \302\240 \302\240 \302\240 unsigned int cpu = get_cpu();\n" + "> > ?{\n" + "> > - ? ? ? struct thread_info *ti = current_thread_info();\n" + "> > ? ? ? ?u32 fpexc = fmrx(FPEXC);\n" + "> > + ? ? ? unsigned int cpu = get_cpu();\n" "> > +\n" - "> > + \302\240 \302\240 \302\240 /* Save last_VFP_context if needed */\n" - "> > + \302\240 \302\240 \302\240 if (last_VFP_context[cpu]) {\n" - "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 /* Enable vfp to save context */\n" - "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 if (!(fpexc & FPEXC_EN)) {\n" - "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 vfp_enable(NULL);\n" - "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 fmxr(FPEXC, fpexc | FPEXC_EN);\n" - "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 }\n" + "> > + ? ? ? /* Save last_VFP_context if needed */\n" + "> > + ? ? ? if (last_VFP_context[cpu]) {\n" + "> > + ? ? ? ? ? ? ? /* Enable vfp to save context */\n" + "> > + ? ? ? ? ? ? ? if (!(fpexc & FPEXC_EN)) {\n" + "> > + ? ? ? ? ? ? ? ? ? ? ? vfp_enable(NULL);\n" + "> > + ? ? ? ? ? ? ? ? ? ? ? fmxr(FPEXC, fpexc | FPEXC_EN);\n" + "> > + ? ? ? ? ? ? ? }\n" "> >\n" - "> > - \302\240 \302\240 \302\240 /* if vfp is on, then save state for resumption */\n" - "> > - \302\240 \302\240 \302\240 if (fpexc & FPEXC_EN) {\n" - "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240printk(KERN_DEBUG \"%s: saving vfp state\\n\", __func__);\n" - "> > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 vfp_save_state(&ti->vfpstate, fpexc);\n" - "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 vfp_save_state(last_VFP_context[cpu], fpexc);\n" + "> > - ? ? ? /* if vfp is on, then save state for resumption */\n" + "> > - ? ? ? if (fpexc & FPEXC_EN) {\n" + "> > ? ? ? ? ? ? ? ?printk(KERN_DEBUG \"%s: saving vfp state\\n\", __func__);\n" + "> > - ? ? ? ? ? ? ? vfp_save_state(&ti->vfpstate, fpexc);\n" + "> > + ? ? ? ? ? ? ? vfp_save_state(last_VFP_context[cpu], fpexc);\n" "> >\n" - "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240/* disable, just in case */\n" - "> > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN);\n" - "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 fmxr(FPEXC, fpexc & ~FPEXC_EN);\n" + "> > ? ? ? ? ? ? ? ?/* disable, just in case */\n" + "> > - ? ? ? ? ? ? ? fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN);\n" + "> > + ? ? ? ? ? ? ? fmxr(FPEXC, fpexc & ~FPEXC_EN);\n" "> > +\n" - "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 last_VFP_context[cpu] = NULL;\n" - "> > \302\240 \302\240 \302\240 \302\240}\n" + "> > + ? ? ? ? ? ? ? last_VFP_context[cpu] = NULL;\n" + "> > ? ? ? ?}\n" "> >\n" - "> > - \302\240 \302\240 \302\240 /* clear any information we had about last context state */\n" - "> > - \302\240 \302\240 \302\240 memset(last_VFP_context, 0, sizeof(last_VFP_context));\n" - "> > + \302\240 \302\240 \302\240 put_cpu();\n" + "> > - ? ? ? /* clear any information we had about last context state */\n" + "> > - ? ? ? memset(last_VFP_context, 0, sizeof(last_VFP_context));\n" + "> > + ? ? ? put_cpu();\n" "> > +}\n" "> > +\n" "> > +static int vfp_pm_suspend(struct sys_device *dev, pm_message_t state)\n" "> > +{\n" - "> > + \302\240 \302\240 \302\240 vfp_pm_save_context();\n" + "> > + ? ? ? vfp_pm_save_context();\n" "> >\n" - "> > \302\240 \302\240 \302\240 \302\240return 0;\n" - "> > \302\240}\n" + "> > ? ? ? ?return 0;\n" + "> > ?}\n" "> > --\n" "> > 1.5.4.3\n" "> >\n" "> > --\n" "> > To unsubscribe from this list: send the line \"unsubscribe linux-omap\" in\n" - "> > the body of a message to majordomo@vger.kernel.org\n" - "> > More majordomo info at \302\240http://vger.kernel.org/majordomo-info.html\n" - "> >\n" - "--\n" - "To unsubscribe from this list: send the line \"unsubscribe linux-omap\" in\n" - "the body of a message to majordomo@vger.kernel.org\n" - More majordomo info at http://vger.kernel.org/majordomo-info.html + "> > the body of a message to majordomo at vger.kernel.org\n" + "> > More majordomo info at ?http://vger.kernel.org/majordomo-info.html\n" + > > -9703e061b96bd8f331ad80e38e06eae10da315e185fd5c0731e21db9abc6a71e +61df07cd96cd3c1990489d209298604b29c751f97e6769ff17a7fa4607883d21
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.