]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
parisc: Retrieve and display the PDC PAT capabilities
authorHelge Deller <deller@gmx.de>
Fri, 19 Oct 2018 20:13:49 +0000 (22:13 +0200)
committerHelge Deller <deller@gmx.de>
Sat, 20 Oct 2018 19:10:37 +0000 (21:10 +0200)
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/include/asm/pdc.h
arch/parisc/kernel/inventory.c

index 339e83ddb39e464c1d4dee57ea1d87d4c6ef570b..5b187d40d6043068f9de5bb356b4c51b99859a3a 100644 (file)
@@ -11,6 +11,7 @@ extern int parisc_narrow_firmware;
 extern int pdc_type;
 extern unsigned long parisc_cell_num; /* cell number the CPU runs on (PAT) */
 extern unsigned long parisc_cell_loc; /* cell location of CPU (PAT)       */
+extern unsigned long parisc_pat_pdc_cap; /* PDC capabilities (PAT) */
 
 /* Values for pdc_type */
 #define PDC_TYPE_ILLEGAL       -1
index b0fe19ac4d78f03cd524d9b9f2d23ec828dc9100..35d05fdd7483961dcdf5abd96e6bf621971e1aa6 100644 (file)
@@ -43,6 +43,7 @@ int pdc_type __read_mostly = PDC_TYPE_ILLEGAL;
 /* cell number and location (PAT firmware only) */
 unsigned long parisc_cell_num __read_mostly;
 unsigned long parisc_cell_loc __read_mostly;
+unsigned long parisc_pat_pdc_cap __read_mostly;
 
 
 void __init setup_pdc(void)
@@ -81,12 +82,21 @@ void __init setup_pdc(void)
 #ifdef CONFIG_64BIT
        status = pdc_pat_cell_get_number(&cell_info);
        if (status == PDC_OK) {
+               unsigned long legacy_rev, pat_rev;
                pdc_type = PDC_TYPE_PAT;
                pr_cont("64 bit PAT.\n");
                parisc_cell_num = cell_info.cell_num;
                parisc_cell_loc = cell_info.cell_loc;
                pr_info("PAT: Running on cell %lu and location %lu.\n",
                        parisc_cell_num, parisc_cell_loc);
+               status = pdc_pat_pd_get_pdc_revisions(&legacy_rev,
+                       &pat_rev, &parisc_pat_pdc_cap);
+               pr_info("PAT: legacy revision 0x%lx, pat_rev 0x%lx, pdc_cap 0x%lx, S-PTLB %d, HPMC_RENDEZ %d.\n",
+                       legacy_rev, pat_rev, parisc_pat_pdc_cap,
+                       parisc_pat_pdc_cap
+                        & PDC_PAT_CAPABILITY_BIT_SIMULTANEOUS_PTLB ? 1:0,
+                       parisc_pat_pdc_cap
+                        & PDC_PAT_CAPABILITY_BIT_PDC_HPMC_RENDEZ   ? 1:0);
                return;
        }
 #endif