| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Initial setup-routines for HP 9000 based hardware. |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 9 | 10 | * Modifications copyright 2001 Ryan Bradetich <rbradetich@uswest.net> |
|---|
| 10 | 11 | * |
|---|
| 11 | 12 | * Initial PA-RISC Version: 04-23-1999 by Helge Deller |
|---|
| 12 | | - * |
|---|
| 13 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 14 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 15 | | - * the Free Software Foundation; either version 2, or (at your option) |
|---|
| 16 | | - * any later version. |
|---|
| 17 | | - * |
|---|
| 18 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 19 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 20 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 21 | | - * GNU General Public License for more details. |
|---|
| 22 | | - * |
|---|
| 23 | | - * You should have received a copy of the GNU General Public License |
|---|
| 24 | | - * along with this program; if not, write to the Free Software |
|---|
| 25 | | - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|---|
| 26 | | - * |
|---|
| 27 | 13 | */ |
|---|
| 28 | 14 | #include <linux/delay.h> |
|---|
| 29 | 15 | #include <linux/init.h> |
|---|
| .. | .. |
|---|
| 43 | 29 | #include <asm/irq.h> /* for struct irq_region */ |
|---|
| 44 | 30 | #include <asm/parisc-device.h> |
|---|
| 45 | 31 | |
|---|
| 46 | | -struct system_cpuinfo_parisc boot_cpu_data __read_mostly; |
|---|
| 32 | +struct system_cpuinfo_parisc boot_cpu_data __ro_after_init; |
|---|
| 47 | 33 | EXPORT_SYMBOL(boot_cpu_data); |
|---|
| 48 | 34 | #ifdef CONFIG_PA8X00 |
|---|
| 49 | | -int _parisc_requires_coherency __read_mostly; |
|---|
| 35 | +int _parisc_requires_coherency __ro_after_init; |
|---|
| 50 | 36 | EXPORT_SYMBOL(_parisc_requires_coherency); |
|---|
| 51 | 37 | #endif |
|---|
| 52 | 38 | |
|---|
| .. | .. |
|---|
| 226 | 212 | #ifdef CONFIG_SMP |
|---|
| 227 | 213 | if (cpuid) { |
|---|
| 228 | 214 | set_cpu_present(cpuid, true); |
|---|
| 229 | | - cpu_up(cpuid); |
|---|
| 215 | + add_cpu(cpuid); |
|---|
| 230 | 216 | } |
|---|
| 231 | 217 | #endif |
|---|
| 232 | 218 | |
|---|
| .. | .. |
|---|
| 242 | 228 | void __init collect_boot_cpu_data(void) |
|---|
| 243 | 229 | { |
|---|
| 244 | 230 | unsigned long cr16_seed; |
|---|
| 231 | + char orig_prod_num[64], current_prod_num[64], serial_no[64]; |
|---|
| 245 | 232 | |
|---|
| 246 | 233 | memset(&boot_cpu_data, 0, sizeof(boot_cpu_data)); |
|---|
| 247 | 234 | |
|---|
| .. | .. |
|---|
| 301 | 288 | _parisc_requires_coherency = (boot_cpu_data.cpu_type == mako) || |
|---|
| 302 | 289 | (boot_cpu_data.cpu_type == mako2); |
|---|
| 303 | 290 | #endif |
|---|
| 291 | + |
|---|
| 292 | + if (pdc_model_platform_info(orig_prod_num, current_prod_num, serial_no) == PDC_OK) { |
|---|
| 293 | + printk(KERN_INFO "product %s, original product %s, S/N: %s\n", |
|---|
| 294 | + current_prod_num[0] ? current_prod_num : "n/a", |
|---|
| 295 | + orig_prod_num, serial_no); |
|---|
| 296 | + add_device_randomness(orig_prod_num, strlen(orig_prod_num)); |
|---|
| 297 | + add_device_randomness(current_prod_num, strlen(current_prod_num)); |
|---|
| 298 | + add_device_randomness(serial_no, strlen(serial_no)); |
|---|
| 299 | + } |
|---|
| 304 | 300 | } |
|---|
| 305 | 301 | |
|---|
| 306 | 302 | |
|---|
| .. | .. |
|---|
| 423 | 419 | } |
|---|
| 424 | 420 | seq_printf(m, " (0x%02lx)\n", boot_cpu_data.pdc.capabilities); |
|---|
| 425 | 421 | |
|---|
| 426 | | - seq_printf(m, "model\t\t: %s\n" |
|---|
| 427 | | - "model name\t: %s\n", |
|---|
| 422 | + seq_printf(m, "model\t\t: %s - %s\n", |
|---|
| 428 | 423 | boot_cpu_data.pdc.sys_model_name, |
|---|
| 429 | 424 | cpuinfo->dev ? |
|---|
| 430 | 425 | cpuinfo->dev->name : "Unknown"); |
|---|