* adding lockdep support to the Blackfin arch
@ 2009-06-08 23:28 Mike Frysinger
2009-06-08 23:36 ` Mike Frysinger
2009-06-09 6:32 ` Ingo Molnar
0 siblings, 2 replies; 3+ messages in thread
From: Mike Frysinger @ 2009-06-08 23:28 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Linux kernel mailing list
ive been extending the Blackfin arch recently to support lockdep.
since i also had to implement irqflags/stacktrace as well, i wouldnt
be surprised if this issue is nested in there, plus this is a no-mmu
system.
at any rate, when i boot up a Blackfin system with PROVE_LOCKING
enabled, i end up with this warning:
Badness at kernel/fork.c:988
which correlates to this in copy_process():
DEBUG_LOCKS_WARN_ON(!p->hardirqs_enabled);
btw, in order to get this to work in the first place, i had to extend
-mike
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: adding lockdep support to the Blackfin arch
2009-06-08 23:28 adding lockdep support to the Blackfin arch Mike Frysinger
@ 2009-06-08 23:36 ` Mike Frysinger
2009-06-09 6:32 ` Ingo Molnar
1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2009-06-08 23:36 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Linux kernel mailing list
On Mon, Jun 8, 2009 at 19:28, Mike Frysinger wrote:
> ive been extending the Blackfin arch recently to support lockdep.
> since i also had to implement irqflags/stacktrace as well, i wouldnt
> be surprised if this issue is nested in there, plus this is a no-mmu
> system.
>
> at any rate, when i boot up a Blackfin system with PROVE_LOCKING
> enabled, i end up with this warning:
> Badness at kernel/fork.c:988
>
> which correlates to this in copy_process():
> DEBUG_LOCKS_WARN_ON(!p->hardirqs_enabled);
sorry, stupid stuck keys triggered gmail sending before i finished
when i trace the code, i can see hardirqs_enabled toggling between 0
and 1 ... but when it makes it to copy_process(), apparently it's 0
which annoys the lockdep code. any tips for me ?
btw, in order to get this to work in the first place, i had to extend
kernel/lockdep.c's static_obj() function as the Blackfin has custom
data regions where some locks live (thus outside of the normal
start/end map). should this code use kallsyms' helper functions
instead ? otherwise, i needed this:
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -634,6 +634,27 @@ static int static_obj(void *obj)
if ((addr >= start) && (addr < end))
return 1;
+#ifdef CONFIG_BLACKFIN
+ if (L1_DATA_A_LENGTH) {
+ start = (unsigned long) &_sdata_l1;
+ end = (unsigned long) &_ebss_l1;
+ if ((addr >= start) && (addr < end))
+ return 1;
+ }
+ if (L1_DATA_B_LENGTH) {
+ start = (unsigned long) &_sdata_b_l1;
+ end = (unsigned long) &_ebss_b_l1;
+ if ((addr >= start) && (addr < end))
+ return 1;
+ }
+ if (L2_LENGTH) {
+ start = (unsigned long) &_sdata_l2;
+ end = (unsigned long) &_ebss_l2;
+ if ((addr >= start) && (addr < end))
+ return 1;
+ }
+#endif
+
#ifdef CONFIG_SMP
/*
* percpu var?
-mike
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: adding lockdep support to the Blackfin arch
2009-06-08 23:28 adding lockdep support to the Blackfin arch Mike Frysinger
2009-06-08 23:36 ` Mike Frysinger
@ 2009-06-09 6:32 ` Ingo Molnar
1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2009-06-09 6:32 UTC (permalink / raw)
To: Mike Frysinger, Peter Zijlstra; +Cc: Ingo Molnar, Linux kernel mailing list
* Mike Frysinger <vapier.adi@gmail.com> wrote:
> ive been extending the Blackfin arch recently to support lockdep.
> since i also had to implement irqflags/stacktrace as well, i wouldnt
> be surprised if this issue is nested in there, plus this is a no-mmu
> system.
>
> at any rate, when i boot up a Blackfin system with PROVE_LOCKING
> enabled, i end up with this warning:
> Badness at kernel/fork.c:988
>
> which correlates to this in copy_process():
> DEBUG_LOCKS_WARN_ON(!p->hardirqs_enabled);
This suggests that the irqflags tracking might be wrong: the fork
code expects it at this point that hardirqs are enabled.
> btw, in order to get this to work in the first place, i had to
> extend
[incomplete mail?]
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-06-09 6:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-08 23:28 adding lockdep support to the Blackfin arch Mike Frysinger
2009-06-08 23:36 ` Mike Frysinger
2009-06-09 6:32 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox