All of lore.kernel.org
 help / color / mirror / Atom feed
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] ARM: pgtable: introduce pteval_t to represent a pte value
Date: Fri, 19 Nov 2010 14:23:06 +0000	[thread overview]
Message-ID: <AANLkTi=iT_wG22WTax=2TUz7OPqgqvbFaqcz22h+c7=y@mail.gmail.com> (raw)
In-Reply-To: <E1PIlop-0007qc-1e@rmk-PC.arm.linux.org.uk>

On 17 November 2010 17:29, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> --- a/arch/arm/include/asm/pgtable.h
> +++ b/arch/arm/include/asm/pgtable.h
> @@ -10,6 +10,7 @@
> ?#ifndef _ASMARM_PGTABLE_H
> ?#define _ASMARM_PGTABLE_H
>
> +#include <linux/const.h>
> ?#include <asm-generic/4level-fixup.h>
> ?#include <asm/proc-fns.h>
>
> @@ -165,30 +166,30 @@ extern void __pgd_error(const char *file, int line, pgd_t);
> ?* The PTE table pointer refers to the hardware entries; the "Linux"
> ?* entries are stored 1024 bytes below.
> ?*/
> -#define L_PTE_PRESENT ? ? ? ? ?(1 << 0)
> -#define L_PTE_YOUNG ? ? ? ? ? ?(1 << 1)
> -#define L_PTE_FILE ? ? ? ? ? ? (1 << 2) ? ? ? ?/* only when !PRESENT */
> -#define L_PTE_DIRTY ? ? ? ? ? ?(1 << 6)
> -#define L_PTE_WRITE ? ? ? ? ? ?(1 << 7)
> -#define L_PTE_USER ? ? ? ? ? ? (1 << 8)
> -#define L_PTE_EXEC ? ? ? ? ? ? (1 << 9)
> -#define L_PTE_SHARED ? ? ? ? ? (1 << 10) ? ? ? /* shared(v6), coherent(xsc3) */
> +#define L_PTE_PRESENT ? ? ? ? ?(_AT(pteval_t, 1) << 0)
> +#define L_PTE_YOUNG ? ? ? ? ? ?(_AT(pteval_t, 1) << 1)
> +#define L_PTE_FILE ? ? ? ? ? ? (_AT(pteval_t, 1) << 2) /* only when !PRESENT */
> +#define L_PTE_DIRTY ? ? ? ? ? ?(_AT(pteval_t, 1) << 6)
> +#define L_PTE_WRITE ? ? ? ? ? ?(_AT(pteval_t, 1) << 7)
> +#define L_PTE_USER ? ? ? ? ? ? (_AT(pteval_t, 1) << 8)
> +#define L_PTE_EXEC ? ? ? ? ? ? (_AT(pteval_t, 1) << 9)
> +#define L_PTE_SHARED ? ? ? ? ? (_AT(pteval_t, 1) << 10) ? ? ? ?/* shared(v6), coherent(xsc3) */

One of my patches which adds pmdval_t etc. also defines the PMD_SECT_*
macros with _AT(pmdval_t...). For consistency in the same file, I
defined the PTE_* as _AT(pteval_t), though the latter are only used in
.S files. Note that 64-bit values aren't handled by .S anyway.

Should your patch use _AT() for PTE_* macros as well or we just leave
them as they are?

-- 
Catalin

  parent reply	other threads:[~2010-11-19 14:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-17 17:27 [PATCH 0/5] Clean up page tables Russell King - ARM Linux
2010-11-17 17:28 ` [PATCH 1/5] ARM: pgtable: switch order of Linux vs hardware " Russell King - ARM Linux
2010-11-18 16:59   ` Catalin Marinas
2010-11-18 17:38     ` Catalin Marinas
2010-11-18 17:18   ` Catalin Marinas
2010-11-19 11:48   ` Catalin Marinas
2010-11-26 11:38     ` Russell King - ARM Linux
2010-11-26 14:41       ` Catalin Marinas
2010-11-17 17:28 ` [PATCH 2/5] ARM: pgtable: directly pass pgd/pmd/pte to their error functions Russell King - ARM Linux
2010-11-17 17:29 ` [PATCH 3/5] ARM: pgtable: introduce pteval_t to represent a pte value Russell King - ARM Linux
2010-11-18 10:59   ` Catalin Marinas
2010-11-19 14:23   ` Catalin Marinas [this message]
2010-11-19 14:27     ` Catalin Marinas
2010-11-17 17:29 ` [PATCH 4/5] ARM: pgtable: invert L_PTE_EXEC to L_PTE_XN Russell King - ARM Linux
2010-11-17 17:29 ` [PATCH 5/5] ARM: pgtable: provide RDONLY page table bit rather than WRITE bit Russell King - ARM Linux
2010-11-19 12:00 ` [PATCH 0/5] Clean up page tables Catalin Marinas

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='AANLkTi=iT_wG22WTax=2TUz7OPqgqvbFaqcz22h+c7=y@mail.gmail.com' \
    --to=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.