grukservices.c (33f3648342dc40f8bd6383a5a1a91c22e06f6b77) grukservices.c (67bf04a5c2574e9495f660f418f6df776821d578)
1/*
2 * SN Platform GRU Driver
3 *
4 * KERNEL SERVICES THAT USE THE GRU
5 *
6 * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 381 unchanged lines hidden (view full) ---

390 struct gru_control_block_extended *cbe;
391 struct gru_blade_state *bs;
392 int cbrnum;
393
394 bs = KCB_TO_BS(cb);
395 cbrnum = thread_cbr_number(bs->bs_kgts, get_cb_number(cb));
396 cbe = get_cbe(GRUBASE(cb), cbrnum);
397 gru_flush_cache(cbe); /* CBE not coherent */
1/*
2 * SN Platform GRU Driver
3 *
4 * KERNEL SERVICES THAT USE THE GRU
5 *
6 * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 381 unchanged lines hidden (view full) ---

390 struct gru_control_block_extended *cbe;
391 struct gru_blade_state *bs;
392 int cbrnum;
393
394 bs = KCB_TO_BS(cb);
395 cbrnum = thread_cbr_number(bs->bs_kgts, get_cb_number(cb));
396 cbe = get_cbe(GRUBASE(cb), cbrnum);
397 gru_flush_cache(cbe); /* CBE not coherent */
398 sync_core();
398 excdet->opc = cbe->opccpy;
399 excdet->exopc = cbe->exopccpy;
400 excdet->ecause = cbe->ecause;
401 excdet->exceptdet0 = cbe->idef1upd;
402 excdet->exceptdet1 = cbe->idef3upd;
403 gru_flush_cache(cbe);
404 return 0;
405}

--- 50 unchanged lines hidden (view full) ---

456}
457
458int gru_check_status_proc(void *cb)
459{
460 struct gru_control_block_status *gen = (void *)cb;
461 int ret;
462
463 ret = gen->istatus;
399 excdet->opc = cbe->opccpy;
400 excdet->exopc = cbe->exopccpy;
401 excdet->ecause = cbe->ecause;
402 excdet->exceptdet0 = cbe->idef1upd;
403 excdet->exceptdet1 = cbe->idef3upd;
404 gru_flush_cache(cbe);
405 return 0;
406}

--- 50 unchanged lines hidden (view full) ---

457}
458
459int gru_check_status_proc(void *cb)
460{
461 struct gru_control_block_status *gen = (void *)cb;
462 int ret;
463
464 ret = gen->istatus;
464 if (ret != CBS_EXCEPTION)
465 return ret;
466 return gru_retry_exception(cb);
465 if (ret == CBS_EXCEPTION)
466 ret = gru_retry_exception(cb);
467 rmb();
468 return ret;
467
468}
469
470int gru_wait_proc(void *cb)
471{
472 struct gru_control_block_status *gen = (void *)cb;
473 int ret;
474
475 ret = gru_wait_idle_or_exception(gen);
476 if (ret == CBS_EXCEPTION)
477 ret = gru_retry_exception(cb);
469
470}
471
472int gru_wait_proc(void *cb)
473{
474 struct gru_control_block_status *gen = (void *)cb;
475 int ret;
476
477 ret = gru_wait_idle_or_exception(gen);
478 if (ret == CBS_EXCEPTION)
479 ret = gru_retry_exception(cb);
478
480 rmb();
479 return ret;
480}
481
482void gru_abort(int ret, void *cb, char *str)
483{
484 char buf[GRU_EXC_STR_SIZE];
485
486 panic("GRU FATAL ERROR: %s - %s\n", str,

--- 629 unchanged lines hidden ---
481 return ret;
482}
483
484void gru_abort(int ret, void *cb, char *str)
485{
486 char buf[GRU_EXC_STR_SIZE];
487
488 panic("GRU FATAL ERROR: %s - %s\n", str,

--- 629 unchanged lines hidden ---