lkml.org 
[lkml]   [2015]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] x86/quark: Add Quark embedded SRAM self-test

* Bryan O'Donoghue <pure.logic@nexus-software.ie> wrote:

> +/**
> + * esram_self_test_time
> + *
> + * This function is carefully constructed to measure and verify the
> + * performance boost provided by eSRAM. We invalidate the cache with a
> + * wbinvd() and then perform a series of reads - each of which will cause a
> + * cacheline miss. We measure the aggregate time it takes to complete the
> + * series of reads and return the delta in cycles. The calling function will
> + * pass either a pointer to DRAM or a pointer to eSRAM.
> + *
> + * @param walker: Pointer to RAM area to test.
> + * @return: Number of cycles to complete test.
> + */
> +static cycles_t esram_self_test_time(char *walker, ssize_t step, ssize_t size)
> +{
> + volatile u32 dummy = 0;
> + int i;
> + int j;
> + cycle_t t1;
> + cycle_t t2;
> + u32 page_count = size / PAGE_SIZE;
> +
> + local_irq_disable();
> + t1 = get_cycles();
> + for (i = 0; i < page_count; i++) {
> + for (j = 0; j < PAGE_SIZE/step; j++) {
> + dummy += *(u32 *)walker;
> + walker += step;
> + }
> + }
> + t2 = get_cycles();
> + local_irq_enable();
> +
> + return t2 > t1 ? t2 - t1 : ULLONG_MAX - t2 + t1;
> +}

So I don't see the wbinvd() that the description mentions.

> + * esram_self_test_init - entry point for IMR driver.
> + * esram_self_test_exit - exit point for IMR code.

Stale 'IMR' references left over from copy & paste?

Thanks,

Ingo


\
 
 \ /
  Last update: 2015-05-06 12:41    [W:0.822 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site