^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #ifndef __ALPHA_HWRPB_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define __ALPHA_HWRPB_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) #define INIT_HWRPB ((struct hwrpb_struct *) 0x10000000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * DEC processor types for Alpha systems. Found in HWRPB.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) * These values are architected.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #define EV3_CPU 1 /* EV3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #define EV4_CPU 2 /* EV4 (21064) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #define LCA4_CPU 4 /* LCA4 (21066/21068) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #define EV5_CPU 5 /* EV5 (21164) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #define EV45_CPU 6 /* EV4.5 (21064/xxx) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #define EV56_CPU 7 /* EV5.6 (21164) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #define EV6_CPU 8 /* EV6 (21264) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #define PCA56_CPU 9 /* PCA56 (21164PC) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #define PCA57_CPU 10 /* PCA57 (notyet) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #define EV67_CPU 11 /* EV67 (21264A) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #define EV68CB_CPU 12 /* EV68CB (21264C) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #define EV68AL_CPU 13 /* EV68AL (21264B) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #define EV68CX_CPU 14 /* EV68CX (21264D) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #define EV7_CPU 15 /* EV7 (21364) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #define EV79_CPU 16 /* EV79 (21364??) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #define EV69_CPU 17 /* EV69 (21264/EV69A) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) * DEC system types for Alpha systems. Found in HWRPB.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) * These values are architected.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) #define ST_ADU 1 /* Alpha ADU systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) #define ST_DEC_4000 2 /* Cobra systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) #define ST_DEC_7000 3 /* Ruby systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) #define ST_DEC_3000_500 4 /* Flamingo systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) #define ST_DEC_2000_300 6 /* Jensen systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) #define ST_DEC_3000_300 7 /* Pelican systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) #define ST_DEC_2100_A500 9 /* Sable systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) #define ST_DEC_AXPVME_64 10 /* AXPvme system type */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) #define ST_DEC_AXPPCI_33 11 /* NoName system type */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) #define ST_DEC_TLASER 12 /* Turbolaser systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) #define ST_DEC_2100_A50 13 /* Avanti systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) #define ST_DEC_MUSTANG 14 /* Mustang systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) #define ST_DEC_ALCOR 15 /* Alcor (EV5) systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) #define ST_DEC_1000 17 /* Mikasa systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) #define ST_DEC_EB64 18 /* EB64 systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) #define ST_DEC_EB66 19 /* EB66 systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) #define ST_DEC_EB64P 20 /* EB64+ systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) #define ST_DEC_BURNS 21 /* laptop systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) #define ST_DEC_RAWHIDE 22 /* Rawhide systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) #define ST_DEC_K2 23 /* K2 systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) #define ST_DEC_LYNX 24 /* Lynx systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) #define ST_DEC_XL 25 /* Alpha XL systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) #define ST_DEC_EB164 26 /* EB164 systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) #define ST_DEC_NORITAKE 27 /* Noritake systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) #define ST_DEC_CORTEX 28 /* Cortex systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) #define ST_DEC_MIATA 30 /* Miata systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) #define ST_DEC_XXM 31 /* XXM systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) #define ST_DEC_TAKARA 32 /* Takara systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) #define ST_DEC_YUKON 33 /* Yukon systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) #define ST_DEC_TSUNAMI 34 /* Tsunami systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) #define ST_DEC_WILDFIRE 35 /* Wildfire systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) #define ST_DEC_CUSCO 36 /* CUSCO systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) #define ST_DEC_EIGER 37 /* Eiger systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) #define ST_DEC_TITAN 38 /* Titan systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) #define ST_DEC_MARVEL 39 /* Marvel systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) /* UNOFFICIAL!!! */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) #define ST_UNOFFICIAL_BIAS 100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) #define ST_DTI_RUFFIAN 101 /* RUFFIAN systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) /* Alpha Processor, Inc. systems */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) #define ST_API_BIAS 200
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) #define ST_API_NAUTILUS 201 /* UP1000 systype */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) struct pcb_struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) unsigned long ksp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) unsigned long usp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) unsigned long ptbr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) unsigned int pcc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) unsigned int asn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) unsigned long unique;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) unsigned long flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) unsigned long res1, res2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) struct percpu_struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) unsigned long hwpcb[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) unsigned long flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) unsigned long pal_mem_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) unsigned long pal_scratch_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) unsigned long pal_mem_pa;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) unsigned long pal_scratch_pa;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) unsigned long pal_revision;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) unsigned long type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) unsigned long variation;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) unsigned long revision;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) unsigned long serial_no[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) unsigned long logout_area_pa;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) unsigned long logout_area_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) unsigned long halt_PCBB;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) unsigned long halt_PC;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) unsigned long halt_PS;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) unsigned long halt_arg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) unsigned long halt_ra;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) unsigned long halt_pv;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) unsigned long halt_reason;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) unsigned long res;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) unsigned long ipc_buffer[21];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) unsigned long palcode_avail[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) unsigned long compatibility;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) unsigned long console_data_log_pa;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) unsigned long console_data_log_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) unsigned long bcache_info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) struct procdesc_struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) unsigned long weird_vms_stuff;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) unsigned long address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) struct vf_map_struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) unsigned long va;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) unsigned long pa;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) unsigned long count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) struct crb_struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) struct procdesc_struct * dispatch_va;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) struct procdesc_struct * dispatch_pa;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) struct procdesc_struct * fixup_va;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) struct procdesc_struct * fixup_pa;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) /* virtual->physical map */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) unsigned long map_entries;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) unsigned long map_pages;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) struct vf_map_struct map[1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) struct memclust_struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) unsigned long start_pfn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) unsigned long numpages;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) unsigned long numtested;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) unsigned long bitmap_va;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) unsigned long bitmap_pa;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) unsigned long bitmap_chksum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) unsigned long usage;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) struct memdesc_struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) unsigned long chksum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) unsigned long optional_pa;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) unsigned long numclusters;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) struct memclust_struct cluster[0];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) struct dsr_struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) long smm; /* SMM nubber used by LMF */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) unsigned long lurt_off; /* offset to LURT table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) unsigned long sysname_off; /* offset to sysname char count */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) struct hwrpb_struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) unsigned long phys_addr; /* check: physical address of the hwrpb */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) unsigned long id; /* check: "HWRPB\0\0\0" */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) unsigned long revision;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) unsigned long size; /* size of hwrpb */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) unsigned long cpuid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) unsigned long pagesize; /* 8192, I hope */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) unsigned long pa_bits; /* number of physical address bits */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) unsigned long max_asn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) unsigned char ssn[16]; /* system serial number: big bother is watching */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) unsigned long sys_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) unsigned long sys_variation;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) unsigned long sys_revision;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) unsigned long intr_freq; /* interval clock frequency * 4096 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) unsigned long cycle_freq; /* cycle counter frequency */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) unsigned long vptb; /* Virtual Page Table Base address */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) unsigned long res1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) unsigned long tbhb_offset; /* Translation Buffer Hint Block */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) unsigned long nr_processors;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) unsigned long processor_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) unsigned long processor_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) unsigned long ctb_nr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) unsigned long ctb_size; /* console terminal block size */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) unsigned long ctbt_offset; /* console terminal block table offset */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) unsigned long crb_offset; /* console callback routine block */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) unsigned long mddt_offset; /* memory data descriptor table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) unsigned long cdb_offset; /* configuration data block (or NULL) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) unsigned long frut_offset; /* FRU table (or NULL) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) void (*save_terminal)(unsigned long);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) unsigned long save_terminal_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) void (*restore_terminal)(unsigned long);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) unsigned long restore_terminal_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) void (*CPU_restart)(unsigned long);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) unsigned long CPU_restart_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) unsigned long res2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) unsigned long res3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) unsigned long chksum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) unsigned long rxrdy;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) unsigned long txrdy;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) unsigned long dsr_offset; /* "Dynamic System Recognition Data Block Table" */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) #ifdef __KERNEL__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) extern struct hwrpb_struct *hwrpb;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) static inline void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) hwrpb_update_checksum(struct hwrpb_struct *h)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) unsigned long sum = 0, *l;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) for (l = (unsigned long *) h; l < (unsigned long *) &h->chksum; ++l)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) sum += *l;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) h->chksum = sum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) #endif /* __KERNEL__ */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) #endif /* __ALPHA_HWRPB_H */