aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-gru/grufile.c
diff options
context:
space:
mode:
authorJack Steiner <steiner@sgi.com>2009-04-02 19:59:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-02 22:05:06 -0400
commite1c3219d06447dab8a87b96df1211d158e21071e (patch)
treeaa3a5ea8af148d2d7d461d61618d7820f099148a /drivers/misc/sgi-gru/grufile.c
parent6f2584f47474d29ce829604bfc8b56c10b352fdb (diff)
sgi-gru: macro for scanning all gru chiplets
Add macro for scanning all active GRU chiplets. Maximum chiplet id is saved during GRU initialization. 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/grufile.c')
-rw-r--r--drivers/misc/sgi-gru/grufile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c
index f8dcdb1a0ec4..b7a21ce91496 100644
--- a/drivers/misc/sgi-gru/grufile.c
+++ b/drivers/misc/sgi-gru/grufile.c
@@ -47,6 +47,7 @@
47struct gru_blade_state *gru_base[GRU_MAX_BLADES] __read_mostly; 47struct gru_blade_state *gru_base[GRU_MAX_BLADES] __read_mostly;
48unsigned long gru_start_paddr __read_mostly; 48unsigned long gru_start_paddr __read_mostly;
49unsigned long gru_end_paddr __read_mostly; 49unsigned long gru_end_paddr __read_mostly;
50unsigned int gru_max_gids __read_mostly;
50struct gru_stats_s gru_stats; 51struct gru_stats_s gru_stats;
51 52
52/* Guaranteed user available resources on each node */ 53/* Guaranteed user available resources on each node */
@@ -276,6 +277,8 @@ static void gru_init_chiplet(struct gru_state *gru, unsigned long paddr,
276 gru->gs_dsr_map = (1UL << GRU_DSR_AU) - 1; 277 gru->gs_dsr_map = (1UL << GRU_DSR_AU) - 1;
277 gru->gs_asid_limit = MAX_ASID; 278 gru->gs_asid_limit = MAX_ASID;
278 gru_tgh_flush_init(gru); 279 gru_tgh_flush_init(gru);
280 if (gru->gs_gid >= gru_max_gids)
281 gru_max_gids = gru->gs_gid + 1;
279 gru_dbg(grudev, "bid %d, nid %d, gid %d, vaddr %p (0x%lx)\n", 282 gru_dbg(grudev, "bid %d, nid %d, gid %d, vaddr %p (0x%lx)\n",
280 bid, nid, gru->gs_gid, gru->gs_gru_base_vaddr, 283 bid, nid, gru->gs_gid, gru->gs_gru_base_vaddr,
281 gru->gs_gru_base_paddr); 284 gru->gs_gru_base_paddr);