On Thu, Jul 23, 2009 at 02:09, gyang wrote: > On Thu, 2009-07-23 at 01:25 -0400, Mike Frysinger wrote: >> On Thu, Jul 23, 2009 at 00:02, gyang wrote: >> > On Wed, 2009-07-22 at 09:47 -0400, Robin Getz wrote: >> >> On Wed 22 Jul 2009 07:56, [email protected] pondered: >> >> > Revision >> >> > 7059 >> >> > <http://blackfin.uclinux.org/gf/project/linux-kernel/scmsvn/?action=browse&path=/&view=rev&root=linux-kernel&revision=7059> >> >> > Author >> >> > gyang <http://blackfin.uclinux.org/gf/user/gyang/> >> >> > Date >> >> > 2009-07-22 06:56:24 -0500 (Wed, 22 Jul 2009) >> >> > >> >> > >> >> > Log Message >> >> > >> >> > Bug [#5153] <http://blackfin.uclinux.org/gf/tracker/5153> , fix mmap05 >> >> > fail, the SAVE_ALL_SYS cause seqstat changed, so send a wrong signal. >> >> > >> >> > Modified Paths >> >> > >> >> > >> >> > * trunk/arch/blackfin/include/asm/pda.h >> >> > * trunk/arch/blackfin/kernel/asm-offsets.c >> >> > * trunk/arch/blackfin/mach-common/entry.S >> >> > >> >> > >> >> > Diff >> >> > >> >> > >> >> > Modified: trunk/arch/blackfin/include/asm/pda.h (7058 => 7059) >> >> > >> >> > >> >> > --- trunk/arch/blackfin/include/asm/pda.h 2009-07-22 11:56:09 UTC >> >> > (rev 7058) >> >> > +++ trunk/arch/blackfin/include/asm/pda.h 2009-07-22 11:56:24 UTC >> >> > (rev 7059) >> >> > @@ -60,6 +60,7 @@ >> >> > unsigned long icplb_fault_addr; >> >> > unsigned long retx; >> >> > unsigned long seqstat; >> >> > + unsigned long seqstat_l5; /* saved seqstat in >> >> > _exception_to_level5 */ >> >> > unsigned int __nmi_count; /* number of times NMI asserted on >> >> > this CPU */ >> >> > }; >> >> > >> >> > >> >> > >> >> > Modified: trunk/arch/blackfin/kernel/asm-offsets.c (7058 => 7059) >> >> > >> >> > >> >> > --- trunk/arch/blackfin/kernel/asm-offsets.c 2009-07-22 11:56:09 >> >> > UTC (rev 7058) >> >> > +++ trunk/arch/blackfin/kernel/asm-offsets.c 2009-07-22 11:56:24 >> >> > UTC (rev 7059) >> >> > @@ -153,6 +153,7 @@ >> >> > DEFINE(PDA_ICPLB, offsetof(struct blackfin_pda, icplb_fault_addr)); >> >> > DEFINE(PDA_RETX, offsetof(struct blackfin_pda, retx)); >> >> > DEFINE(PDA_SEQSTAT, offsetof(struct blackfin_pda, seqstat)); >> >> > + DEFINE(PDA_SEQSTAT_L5, offsetof(struct blackfin_pda, seqstat_l5)); >> >> > #ifdef CONFIG_SMP >> >> > /* Inter-core lock (in L2 SRAM) */ >> >> > DEFINE(SIZEOF_CORELOCK, sizeof(struct corelock_slot)); >> >> > >> >> > >> >> > Modified: trunk/arch/blackfin/mach-common/entry.S (7058 => 7059) >> >> > >> >> > >> >> > --- trunk/arch/blackfin/mach-common/entry.S 2009-07-22 11:56:09 UTC >> >> > (rev 7058) >> >> > +++ trunk/arch/blackfin/mach-common/entry.S 2009-07-22 11:56:24 UTC >> >> > (rev 7059) >> >> > @@ -435,6 +435,22 @@ >> >> > ENDPROC(_double_fault) >> >> > >> >> > ENTRY(_exception_to_level5) >> >> > + /* >> >> > + * The call of SAVE_ALL_SYS may cause cplb exceptions, >> >> > + * the seqstat then be changed, so we save the seqstat to pda. >> >> > + */ >> >> > + EX_SCRATCH_REG = sp; >> >> > + GET_PDA_SAFE(sp); >> >> > + sp = [sp + PDA_EXSTACK]; >> >> > + [--sp] = (r7:7,p5:5); >> >> > + >> >> > + GET_PDA(p5, r7); >> >> > + r7 = SEQSTAT; >> >> > + [p5 + PDA_SEQSTAT_L5] = r7; >> >> > + >> >> > + (r7:7,p5:5) = [sp++]; >> >> > + sp = EX_SCRATCH_REG; >> >> > + >> >> > SAVE_ALL_SYS >> >> > >> >> > GET_PDA(p5, r7); /* Fetch current PDA */ >> >> > @@ -444,6 +460,9 @@ >> >> > r6 = [p5 + PDA_SYSCFG]; >> >> > [sp + PT_SYSCFG] = r6; >> >> > >> >> > + r6 = [p5 + PDA_SEQSTAT_L5]; /* Read back the seqstat */ >> >> > + [sp + PT_SEQSTAT] = r6; >> >> >> >> ? >> >> >> >> Don't you want the Level3 SEQSTAT on the frame? otherwise - it will print >> >> out the wrong seqstat when the traps_c code is run. >> > >> > I now find that the SEQSTAT is not a problem. >> >> so you'll revert this change ? > > I'm trying another method. > Can we load the cplb entry that covered the SP, before lowering to EVT5? > It's a little ugly, because the frame by SAVE_ALL_SYS may across pages. > It means we may need setting 2 entries together, which is not the > thought of MPU.
if the only point is to enhance the debug output and/or signal generated, then no, this is not desirable. >> > But cpu_pda[].dcplb_fault_addr will be wrong in trap_c. >> >> why ? because after lowering to EVT5 we took a miss and that then >> clobbered the fault addr that was stored before lowering ? > > Yes. > Is there any other concern about this patch? well if it isnt actually fixing anything, then we shouldnt be changing code. -mike _______________________________________________ Linux-kernel-commits mailing list [email protected] https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits
