]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/misc/sgi-gru/grukservices.c
Merge branch 'linus' into core/urgent
[linux-2.6-omap-h63xx.git] / drivers / misc / sgi-gru / grukservices.c
index dfd49af0fe18220d41a4afc438fc0b74c3439a6f..880c55dfb66266dfd53cae3dea2492b986ff5744 100644 (file)
@@ -122,6 +122,7 @@ int gru_get_cb_exception_detail(void *cb,
        struct gru_control_block_extended *cbe;
 
        cbe = get_cbe(GRUBASE(cb), get_cb_number(cb));
+       prefetchw(cbe);         /* Harmless on hardware, required for emulator */
        excdet->opc = cbe->opccpy;
        excdet->exopc = cbe->exopccpy;
        excdet->ecause = cbe->ecause;
@@ -466,7 +467,7 @@ int gru_send_message_gpa(unsigned long mq, void *mesg, unsigned int bytes)
        STAT(mesq_send);
        BUG_ON(bytes < sizeof(int) || bytes > 2 * GRU_CACHE_LINE_BYTES);
 
-       clines = (bytes + GRU_CACHE_LINE_BYTES - 1) / GRU_CACHE_LINE_BYTES;
+       clines = DIV_ROUND_UP(bytes, GRU_CACHE_LINE_BYTES);
        if (gru_get_cpu_resources(bytes, &cb, &dsr))
                return MQE_BUG_NO_RESOURCES;
        memcpy(dsr, mesg, bytes);