diff options
author | Jack Steiner <steiner@sgi.com> | 2009-06-17 19:28:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-18 16:03:59 -0400 |
commit | 9cc9b056ea51608788609d7e26c7db55ef81bb2e (patch) | |
tree | e6381d7575babaee9658c5a2bc007a8dd2ec49ae /drivers/misc/sgi-gru/grutables.h | |
parent | cd1334f03f7b799bc6893b511daf2080e8f73863 (diff) |
gru: dump chiplet state
Add support for dumpping the state of an entire GRU chiplet.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/sgi-gru/grutables.h')
-rw-r--r-- | drivers/misc/sgi-gru/grutables.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/misc/sgi-gru/grutables.h b/drivers/misc/sgi-gru/grutables.h index ebf6183c1635..d768f54dc259 100644 --- a/drivers/misc/sgi-gru/grutables.h +++ b/drivers/misc/sgi-gru/grutables.h | |||
@@ -554,6 +554,12 @@ struct gru_blade_state { | |||
554 | 554 | ||
555 | /* Lock hierarchy checking enabled only in emulator */ | 555 | /* Lock hierarchy checking enabled only in emulator */ |
556 | 556 | ||
557 | /* 0 = lock failed, 1 = locked */ | ||
558 | static inline int __trylock_handle(void *h) | ||
559 | { | ||
560 | return !test_and_set_bit(1, h); | ||
561 | } | ||
562 | |||
557 | static inline void __lock_handle(void *h) | 563 | static inline void __lock_handle(void *h) |
558 | { | 564 | { |
559 | while (test_and_set_bit(1, h)) | 565 | while (test_and_set_bit(1, h)) |
@@ -565,6 +571,11 @@ static inline void __unlock_handle(void *h) | |||
565 | clear_bit(1, h); | 571 | clear_bit(1, h); |
566 | } | 572 | } |
567 | 573 | ||
574 | static inline int trylock_cch_handle(struct gru_context_configuration_handle *cch) | ||
575 | { | ||
576 | return __trylock_handle(cch); | ||
577 | } | ||
578 | |||
568 | static inline void lock_cch_handle(struct gru_context_configuration_handle *cch) | 579 | static inline void lock_cch_handle(struct gru_context_configuration_handle *cch) |
569 | { | 580 | { |
570 | __lock_handle(cch); | 581 | __lock_handle(cch); |
@@ -606,6 +617,7 @@ extern void gts_drop(struct gru_thread_state *gts); | |||
606 | extern void gru_tgh_flush_init(struct gru_state *gru); | 617 | extern void gru_tgh_flush_init(struct gru_state *gru); |
607 | extern int gru_kservices_init(struct gru_state *gru); | 618 | extern int gru_kservices_init(struct gru_state *gru); |
608 | extern void gru_kservices_exit(struct gru_state *gru); | 619 | extern void gru_kservices_exit(struct gru_state *gru); |
620 | extern int gru_dump_chiplet_request(unsigned long arg); | ||
609 | extern irqreturn_t gru_intr(int irq, void *dev_id); | 621 | extern irqreturn_t gru_intr(int irq, void *dev_id); |
610 | extern int gru_handle_user_call_os(unsigned long address); | 622 | extern int gru_handle_user_call_os(unsigned long address); |
611 | extern int gru_user_flush_tlb(unsigned long arg); | 623 | extern int gru_user_flush_tlb(unsigned long arg); |