From: Ingo Molnar <mingo2.kernel.org@gmail.com>
To: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
x86@kernel.org, dvhart@infradead.org, andy.schevchenko@gmail.com,
boon.leong.ong@intel.com, linux-kernel@vger.kernel.org,
platform-driver-x86@vger.kernel.org, derek.browne@intel.com,
josef.ahmad@intel.com, erik.nyquist@intel.com
Subject: Re: [PATCH 2/2] x86/quark: Add Quark embedded SRAM self-test
Date: Wed, 6 May 2015 12:02:11 +0200 [thread overview]
Message-ID: <20150506100211.GB16458@gmail.com> (raw)
In-Reply-To: <1430705875-6990-3-git-send-email-pure.logic@nexus-software.ie>
* 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
next prev parent reply other threads:[~2015-05-06 10:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-04 2:17 [PATCH 0/2] x86/quark: Add eSRAM driver and test code Bryan O'Donoghue
2015-05-04 2:17 ` [PATCH 1/2] x86/quark: Add Quark embedded SRAM support Bryan O'Donoghue
2015-05-04 15:00 ` Thomas Gleixner
2015-05-05 13:48 ` Bryan O'Donoghue
2015-05-05 20:07 ` Darren Hart
2015-05-05 22:19 ` H. Peter Anvin
2015-05-05 8:44 ` Paul Bolle
2015-05-05 13:03 ` Bryan O'Donoghue
2015-05-06 9:58 ` Ingo Molnar
2015-05-06 15:46 ` Bryan O'Donoghue
2015-05-04 2:17 ` [PATCH 2/2] x86/quark: Add Quark embedded SRAM self-test Bryan O'Donoghue
2015-05-05 8:34 ` Paul Bolle
2015-05-06 10:02 ` Ingo Molnar [this message]
2015-05-06 14:27 ` Bryan O'Donoghue
2015-05-06 10:08 ` Ingo Molnar
2015-05-06 9:52 ` [PATCH 0/2] x86/quark: Add eSRAM driver and test code Ingo Molnar
2015-05-06 15:27 ` Bryan O'Donoghue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150506100211.GB16458@gmail.com \
--to=mingo2.kernel.org@gmail.com \
--cc=andy.schevchenko@gmail.com \
--cc=boon.leong.ong@intel.com \
--cc=derek.browne@intel.com \
--cc=dvhart@infradead.org \
--cc=erik.nyquist@intel.com \
--cc=hpa@zytor.com \
--cc=josef.ahmad@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=pure.logic@nexus-software.ie \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox