lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 20 Jun 2013 21:02:30 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Srinivas KANDAGATLA <srinivas.kandagatla@...com>
Cc:	linux-arm-kernel@...ts.infradead.org,
	Rob Landley <rob@...dley.net>,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <rob.herring@...xeda.com>,
	Russell King <linux@....linux.org.uk>,
	Stuart Menefy <stuart.menefy@...com>,
	John Stultz <john.stultz@...aro.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Linus Walleij <linus.walleij@...aro.org>,
	"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
	Jiri Slaby <jslaby@...e.cz>, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org, devicetree-discuss@...ts.ozlabs.org,
	kernel@...inux.com, linux-serial@...r.kernel.org,
	Mark Brown <broonie@...nel.org>,
	Stephen Gallimore <stephen.gallimore@...com>,
	Rob Herring <robherring2@...il.com>,
	Will Deacon <will.deacon@....com>
Subject: Re: [PATCH v3 02/10] clocksource:arm_global_timer: Add ARM global timer support.

On Thursday 20 June 2013, Srinivas KANDAGATLA wrote:
> +static u64 gt_counter_read(void)
> +{
> +       u64 counter;
> +       u32 lower;
> +       u32 upper, old_upper;
> +
> +       upper = __raw_readl(gt_base + GT_COUNTER1);
> +       do {
> +               old_upper = upper;
> +               lower = __raw_readl(gt_base + GT_COUNTER0);
> +               upper = __raw_readl(gt_base + GT_COUNTER1);
> +       } while (upper != old_upper);
> +
> +       counter = upper;
> +       counter <<= 32;
> +       counter |= lower;
> +       return counter;
> +}

Please replace __raw_readl etc with the non-__raw variants
throughout the code.

The __raw accessors are not endian safe and are not meant
for device drivers. If you are worried about latency from
extra barriers, use readl_relaxed().

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ