Re: [RFC 1/2] lib/vsprintf: Add support for pte_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18.06.25 10:33, Anshuman Khandual wrote:


On 18/06/25 1:49 PM, David Hildenbrand wrote:
+    case 'p':
+        if (fmt[1] == 't' && fmt[2] == 'e') {
+            pte_t *pte = (pte_t *)ptr;
+
+            spec.field_width = 10;
+            spec.precision = 8;
+            spec.base = 16;
+            spec.flags = SPECIAL | SMALL | ZEROPAD;
+            if (sizeof(pte_t) == sizeof(u64)) {
+                u64 val = pte_val(*pte);
+
+                return number(buf, end, val, spec);
+            }
+            WARN_ONCE(1, "Non standard pte_t\n");

What about 32bit with 32bit pte_t?

Ahh, missed that. Just wondering which all platforms might
care about the 32 bit pte representation.

I think e.g., 32bit arm has 32bit ptes?

arch/arm/include/asm/pgtable-2level-types.h

typedef u32 pteval_t;
...
typedef struct { pteval_t pte; } pte_t;

--
Cheers,

David / dhildenb





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux