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]
Message-ID: <CACRpkdZJwocwwFUeVte+NTN83LRaiBvis9nHWV0KUj9htsDoQg@mail.gmail.com>
Date:	Thu, 28 Jun 2012 18:07:48 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	John Stultz <john.stultz@...aro.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Arve Hjønnevåg <arve@...roid.com>,
	Russell King <linux@....linux.org.uk>,
	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Subject: Re: [PATCH 11/15] ARM: etm: Check arch version and disable data
 tracing for ptm

On Thu, Jun 21, 2012 at 12:47 AM, John Stultz <john.stultz@...aro.org> wrote:

> +#define ETMR_ID                        0x1e4
> +#define ETMIDR_VERSION(x)      (((x) >> 4) & 0xff)
> +#define ETMIDR_VERSION_PFT_1_0 0x30

NAK don't reinvent this stuff.

>From <linux/amba/bus.h>

Use these macros on the periphid:
#define amba_config(d)  AMBA_CONFIG_BITS((d)->periphid)
#define amba_rev(d)     AMBA_REV_BITS((d)->periphid)
#define amba_manf(d)    AMBA_MANF_BITS((d)->periphid)
#define amba_part(d)    AMBA_PART_BITS((d)->periphid)

I thin amba_rev() is the one you're looking for (not sure).

So here:

> @@ -724,6 +724,9 @@ static int __devinit etm_probe(struct amba_device *dev, const struct amba_id *id

> +       if (etmccr & ETMCCR_ETMIDR_PRESENT) {
> +               etmidr = etm_readl(t, t->etm_regs_count, ETMR_ID);
> +               etm_version = ETMIDR_VERSION(etmidr);

etm_version = amba_rev(dev);

etc.

Yours,
Linus Walleij
--
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