summaryrefslogtreecommitdiff
path: root/usr/src/uts/i86pc
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/i86pc')
-rw-r--r--usr/src/uts/i86pc/dboot/dboot_startkern.c8
-rw-r--r--usr/src/uts/i86pc/io/amd_iommu/amd_iommu_impl.c6
-rw-r--r--usr/src/uts/i86pc/io/cbe.c4
-rw-r--r--usr/src/uts/i86pc/os/cmi.c2
-rw-r--r--usr/src/uts/i86pc/os/cmi_hw.c8
-rw-r--r--usr/src/uts/i86pc/os/cms.c2
-rw-r--r--usr/src/uts/i86pc/os/cpupm/cpupm_throttle.c4
-rw-r--r--usr/src/uts/i86pc/os/cpupm/pwrnow.c2
-rw-r--r--usr/src/uts/i86pc/os/cpupm/speedstep.c2
-rw-r--r--usr/src/uts/i86pc/os/fakebop.c2
-rw-r--r--usr/src/uts/i86pc/os/fastboot.c10
-rw-r--r--usr/src/uts/i86pc/os/graphics.c2
-rw-r--r--usr/src/uts/i86pc/os/intr.c2
-rw-r--r--usr/src/uts/i86pc/os/machdep.c4
-rw-r--r--usr/src/uts/i86pc/os/mp_implfuncs.c8
-rw-r--r--usr/src/uts/i86pc/os/pci_cfgacc_x86.c2
-rw-r--r--usr/src/uts/i86pc/os/startup.c10
17 files changed, 39 insertions, 39 deletions
diff --git a/usr/src/uts/i86pc/dboot/dboot_startkern.c b/usr/src/uts/i86pc/dboot/dboot_startkern.c
index 74e3504d11..c3aafcc6e5 100644
--- a/usr/src/uts/i86pc/dboot/dboot_startkern.c
+++ b/usr/src/uts/i86pc/dboot/dboot_startkern.c
@@ -1733,7 +1733,7 @@ process_efi32(EFI_SYSTEM_TABLE32 *efi)
bi->bi_smbios = (native_ptr_t)(uintptr_t)
config[i].VendorTable;
}
- if (bi->bi_smbios == NULL &&
+ if (bi->bi_smbios == 0 &&
dboot_same_guids(&config[i].VendorGuid, &smbios)) {
bi->bi_smbios = (native_ptr_t)(uintptr_t)
config[i].VendorTable;
@@ -1742,7 +1742,7 @@ process_efi32(EFI_SYSTEM_TABLE32 *efi)
bi->bi_acpi_rsdp = (native_ptr_t)(uintptr_t)
config[i].VendorTable;
}
- if (bi->bi_acpi_rsdp == NULL &&
+ if (bi->bi_acpi_rsdp == 0 &&
dboot_same_guids(&config[i].VendorGuid, &acpi1)) {
bi->bi_acpi_rsdp = (native_ptr_t)(uintptr_t)
config[i].VendorTable;
@@ -1766,7 +1766,7 @@ process_efi64(EFI_SYSTEM_TABLE64 *efi)
bi->bi_smbios = (native_ptr_t)(uintptr_t)
config[i].VendorTable;
}
- if (bi->bi_smbios == NULL &&
+ if (bi->bi_smbios == 0 &&
dboot_same_guids(&config[i].VendorGuid, &smbios)) {
bi->bi_smbios = (native_ptr_t)(uintptr_t)
config[i].VendorTable;
@@ -1776,7 +1776,7 @@ process_efi64(EFI_SYSTEM_TABLE64 *efi)
bi->bi_acpi_rsdp = (native_ptr_t)(uintptr_t)
config[i].VendorTable;
}
- if (bi->bi_acpi_rsdp == NULL &&
+ if (bi->bi_acpi_rsdp == 0 &&
dboot_same_guids(&config[i].VendorGuid, &acpi1)) {
bi->bi_acpi_rsdp = (native_ptr_t)(uintptr_t)
config[i].VendorTable;
diff --git a/usr/src/uts/i86pc/io/amd_iommu/amd_iommu_impl.c b/usr/src/uts/i86pc/io/amd_iommu/amd_iommu_impl.c
index b5ab7d9cf6..4287c37bb6 100644
--- a/usr/src/uts/i86pc/io/amd_iommu/amd_iommu_impl.c
+++ b/usr/src/uts/i86pc/io/amd_iommu/amd_iommu_impl.c
@@ -1211,13 +1211,13 @@ amd_iommu_fini(amd_iommu_t *iommu, int type)
if (type == AMD_IOMMU_QUIESCE)
return (DDI_SUCCESS);
- if (iommu->aiomt_va != NULL) {
+ if (iommu->aiomt_va != 0) {
hat_unload(kas.a_hat, (void *)(uintptr_t)iommu->aiomt_va,
iommu->aiomt_reg_size, HAT_UNLOAD_UNLOCK);
device_arena_free((void *)(uintptr_t)iommu->aiomt_va,
ptob(iommu->aiomt_reg_pages));
- iommu->aiomt_va = NULL;
- iommu->aiomt_reg_va = NULL;
+ iommu->aiomt_va = 0;
+ iommu->aiomt_reg_va = 0;
}
mutex_destroy(&iommu->aiomt_eventlock);
mutex_destroy(&iommu->aiomt_cmdlock);
diff --git a/usr/src/uts/i86pc/io/cbe.c b/usr/src/uts/i86pc/io/cbe.c
index 87ec248717..030f667925 100644
--- a/usr/src/uts/i86pc/io/cbe.c
+++ b/usr/src/uts/i86pc/io/cbe.c
@@ -56,9 +56,9 @@ static void *cbe_xcall_farg;
static cpuset_t cbe_enabled;
static ddi_softint_hdl_impl_t cbe_low_hdl =
- {0, NULL, NULL, NULL, 0, NULL, NULL, NULL};
+ {0, 0, NULL, NULL, 0, NULL, NULL, NULL};
static ddi_softint_hdl_impl_t cbe_clock_hdl =
- {0, NULL, NULL, NULL, 0, NULL, NULL, NULL};
+ {0, 0, NULL, NULL, 0, NULL, NULL, NULL};
cyclic_id_t cbe_hres_cyclic;
int cbe_psm_timer_mode = TIMER_ONESHOT;
diff --git a/usr/src/uts/i86pc/os/cmi.c b/usr/src/uts/i86pc/os/cmi.c
index b3d52c1726..6433407eee 100644
--- a/usr/src/uts/i86pc/os/cmi.c
+++ b/usr/src/uts/i86pc/os/cmi.c
@@ -216,7 +216,7 @@ cmi_load_modctl(modctl_t *modp)
return (cmi);
}
- if ((ver = modlookup_by_modctl(modp, "_cmi_api_version")) == NULL) {
+ if ((ver = modlookup_by_modctl(modp, "_cmi_api_version")) == 0) {
/*
* Apparently a cpu module before versioning was introduced -
* we call this version 0.
diff --git a/usr/src/uts/i86pc/os/cmi_hw.c b/usr/src/uts/i86pc/os/cmi_hw.c
index 290231b487..aa549569b0 100644
--- a/usr/src/uts/i86pc/os/cmi_hw.c
+++ b/usr/src/uts/i86pc/os/cmi_hw.c
@@ -717,7 +717,7 @@ ntv_getcr4(cmi_hdl_impl_t *hdl)
cpu_t *cp = HDLPRIV(hdl);
ulong_t val;
- (void) call_func_ntv(cp->cpu_id, ntv_getcr4_xc, (xc_arg_t)&val, NULL);
+ (void) call_func_ntv(cp->cpu_id, ntv_getcr4_xc, (xc_arg_t)&val, 0);
return (val);
}
@@ -740,7 +740,7 @@ ntv_setcr4(cmi_hdl_impl_t *hdl, ulong_t val)
{
cpu_t *cp = HDLPRIV(hdl);
- (void) call_func_ntv(cp->cpu_id, ntv_setcr4_xc, (xc_arg_t)val, NULL);
+ (void) call_func_ntv(cp->cpu_id, ntv_setcr4_xc, (xc_arg_t)val, 0);
}
volatile uint32_t cmi_trapped_rdmsr;
@@ -847,7 +847,7 @@ ntv_int(cmi_hdl_impl_t *hdl, int int_no)
{
cpu_t *cp = HDLPRIV(hdl);
- (void) call_func_ntv(cp->cpu_id, ntv_int_xc, (xc_arg_t)int_no, NULL);
+ (void) call_func_ntv(cp->cpu_id, ntv_int_xc, (xc_arg_t)int_no, 0);
}
static int
@@ -1728,7 +1728,7 @@ cmi_ntv_hwdisable_mce(cmi_hdl_t hdl)
cmi_ntv_hwdisable_mce_xc();
} else {
CPUSET_ONLY(set, cp->cpu_id);
- xc_call(NULL, NULL, NULL, CPUSET2BV(set),
+ xc_call(0, 0, 0, CPUSET2BV(set),
(xc_func_t)cmi_ntv_hwdisable_mce_xc);
}
}
diff --git a/usr/src/uts/i86pc/os/cms.c b/usr/src/uts/i86pc/os/cms.c
index 0433aeabfd..cb686c27d2 100644
--- a/usr/src/uts/i86pc/os/cms.c
+++ b/usr/src/uts/i86pc/os/cms.c
@@ -209,7 +209,7 @@ cms_load_modctl(modctl_t *modp)
return (cms);
}
- if ((ver = modlookup_by_modctl(modp, "_cms_api_version")) == NULL) {
+ if ((ver = modlookup_by_modctl(modp, "_cms_api_version")) == 0) {
cmn_err(CE_WARN, "cpu model-specific module '%s' is invalid: "
"no _cms_api_version", modp->mod_modname);
return (NULL);
diff --git a/usr/src/uts/i86pc/os/cpupm/cpupm_throttle.c b/usr/src/uts/i86pc/os/cpupm/cpupm_throttle.c
index 63ced2b9b1..b8c37a22c2 100644
--- a/usr/src/uts/i86pc/os/cpupm/cpupm_throttle.c
+++ b/usr/src/uts/i86pc/os/cpupm/cpupm_throttle.c
@@ -213,7 +213,7 @@ cpupm_throttle(cpuset_t set, uint32_t throtl_lvl)
CPUSET_DEL(set, CPU->cpu_id);
}
if (!CPUSET_ISNULL(set)) {
- xc_call((xc_arg_t)throtl_lvl, NULL, NULL,
+ xc_call((xc_arg_t)throtl_lvl, 0, 0,
CPUSET2BV(set), (xc_func_t)cpupm_tstate_transition);
}
kpreempt_enable();
@@ -290,7 +290,7 @@ static int
cpupm_throttle_get_max(processorid_t cpu_id)
{
cpu_t *cp = cpu[cpu_id];
- cpupm_mach_state_t *mach_state =
+ cpupm_mach_state_t *mach_state =
(cpupm_mach_state_t *)(cp->cpu_m.mcpu_pm_mach_state);
cpu_acpi_handle_t handle;
int throtl_level;
diff --git a/usr/src/uts/i86pc/os/cpupm/pwrnow.c b/usr/src/uts/i86pc/os/cpupm/pwrnow.c
index a58e85256a..437019542a 100644
--- a/usr/src/uts/i86pc/os/cpupm/pwrnow.c
+++ b/usr/src/uts/i86pc/os/cpupm/pwrnow.c
@@ -153,7 +153,7 @@ pwrnow_power(cpuset_t set, uint32_t req_state)
CPUSET_DEL(set, CPU->cpu_id);
}
if (!CPUSET_ISNULL(set)) {
- xc_call((xc_arg_t)req_state, NULL, NULL,
+ xc_call((xc_arg_t)req_state, 0, 0,
CPUSET2BV(set), (xc_func_t)pwrnow_pstate_transition);
}
kpreempt_enable();
diff --git a/usr/src/uts/i86pc/os/cpupm/speedstep.c b/usr/src/uts/i86pc/os/cpupm/speedstep.c
index 021eab7e41..6f3dfab61c 100644
--- a/usr/src/uts/i86pc/os/cpupm/speedstep.c
+++ b/usr/src/uts/i86pc/os/cpupm/speedstep.c
@@ -168,7 +168,7 @@ speedstep_power(cpuset_t set, uint32_t req_state)
CPUSET_DEL(set, CPU->cpu_id);
}
if (!CPUSET_ISNULL(set)) {
- xc_call((xc_arg_t)req_state, NULL, NULL, CPUSET2BV(set),
+ xc_call((xc_arg_t)req_state, 0, 0, CPUSET2BV(set),
(xc_func_t)speedstep_pstate_transition);
}
kpreempt_enable();
diff --git a/usr/src/uts/i86pc/os/fakebop.c b/usr/src/uts/i86pc/os/fakebop.c
index 7227ce3473..128f75f0c5 100644
--- a/usr/src/uts/i86pc/os/fakebop.c
+++ b/usr/src/uts/i86pc/os/fakebop.c
@@ -1259,7 +1259,7 @@ save_boot_info(struct xboot_info *xbi)
}
} else {
saved_mbi.drives_length = 0;
- saved_mbi.drives_addr = NULL;
+ saved_mbi.drives_addr = 0;
}
/*
diff --git a/usr/src/uts/i86pc/os/fastboot.c b/usr/src/uts/i86pc/os/fastboot.c
index 1520a6653c..9dbcd456df 100644
--- a/usr/src/uts/i86pc/os/fastboot.c
+++ b/usr/src/uts/i86pc/os/fastboot.c
@@ -497,7 +497,7 @@ fastboot_build_mbi(char *mdep, fastboot_info_t *nk)
if (nk->fi_mbi_size == 0) {
if ((nk->fi_new_mbi_va =
(uintptr_t)contig_alloc(size, &fastboot_below_1G_dma_attr,
- PAGESIZE, 0)) == NULL) {
+ PAGESIZE, 0)) == 0) {
cmn_err(CE_NOTE, fastboot_enomem_msg,
(uint64_t)size, "1G");
return (-1);
@@ -705,7 +705,7 @@ fastboot_reserve_mem(fastboot_info_t *nk)
*/
if ((nk->fi_pagetable_va =
(uintptr_t)contig_alloc(fastboot_pagetable_size,
- &fastboot_below_1G_dma_attr, PAGESIZE, 0)) == NULL) {
+ &fastboot_below_1G_dma_attr, PAGESIZE, 0)) == 0) {
return;
}
nk->fi_pagetable_size = fastboot_pagetable_size;
@@ -714,7 +714,7 @@ fastboot_reserve_mem(fastboot_info_t *nk)
* Reserve memory under PA 1G for multiboot structure.
*/
if ((nk->fi_new_mbi_va = (uintptr_t)contig_alloc(fastboot_mbi_size,
- &fastboot_below_1G_dma_attr, PAGESIZE, 0)) == NULL) {
+ &fastboot_below_1G_dma_attr, PAGESIZE, 0)) == 0) {
return;
}
nk->fi_mbi_size = fastboot_mbi_size;
@@ -745,7 +745,7 @@ fastboot_free_file(fastboot_file_t *fb)
fsize_roundup = P2ROUNDUP_TYPED(fb->fb_size, PAGESIZE, size_t);
if (fsize_roundup) {
contig_free((void *)fb->fb_va, fsize_roundup);
- fb->fb_va = NULL;
+ fb->fb_va = 0;
fb->fb_size = 0;
}
}
@@ -1243,7 +1243,7 @@ load_kernel_retry:
if (newkernel.fi_pagetable_size == 0) {
if ((newkernel.fi_pagetable_va = (uintptr_t)
contig_alloc(size, &fastboot_below_1G_dma_attr,
- MMU_PAGESIZE, 0)) == NULL) {
+ MMU_PAGESIZE, 0)) == 0) {
cmn_err(CE_NOTE, fastboot_enomem_msg,
(uint64_t)size, "1G");
goto err_out;
diff --git a/usr/src/uts/i86pc/os/graphics.c b/usr/src/uts/i86pc/os/graphics.c
index 03e3199ff4..9fbbc38fb5 100644
--- a/usr/src/uts/i86pc/os/graphics.c
+++ b/usr/src/uts/i86pc/os/graphics.c
@@ -219,7 +219,7 @@ progressbar_key_abort(ldi_ident_t li)
!= 0)
cmn_err(CE_NOTE,
"!ldi_ioctl for KD_RESETTEXT failed");
- (void) ldi_close(hdl, NULL, kcred);
+ (void) ldi_close(hdl, 0, kcred);
}
#endif
}
diff --git a/usr/src/uts/i86pc/os/intr.c b/usr/src/uts/i86pc/os/intr.c
index 0634df1a94..4d24cf74c0 100644
--- a/usr/src/uts/i86pc/os/intr.c
+++ b/usr/src/uts/i86pc/os/intr.c
@@ -1162,7 +1162,7 @@ cpu_create_intrstat(cpu_t *cp)
zoneid = ALL_ZONES;
intr_ksp = kstat_create_zone("cpu", cp->cpu_id, "intrstat", "misc",
- KSTAT_TYPE_NAMED, PIL_MAX * 2, NULL, zoneid);
+ KSTAT_TYPE_NAMED, PIL_MAX * 2, 0, zoneid);
/*
* Initialize each PIL's named kstat
diff --git a/usr/src/uts/i86pc/os/machdep.c b/usr/src/uts/i86pc/os/machdep.c
index 97b1bf3f45..e3c03dbe02 100644
--- a/usr/src/uts/i86pc/os/machdep.c
+++ b/usr/src/uts/i86pc/os/machdep.c
@@ -262,7 +262,7 @@ mdboot(int cmd, int fcn, char *mdep, boolean_t invoke_cb)
devtree_freeze();
if (invoke_cb)
- (void) callb_execute_class(CB_CL_MDBOOT, NULL);
+ (void) callb_execute_class(CB_CL_MDBOOT, 0);
/*
* Clear any unresolved UEs from memory.
@@ -1417,7 +1417,7 @@ dtrace_linear_pc(struct regs *rp, proc_t *p, caddr_t *linearp)
* and posts the softint for x86.
*/
static ddi_softint_hdl_impl_t lbolt_softint_hdl =
- {0, NULL, NULL, NULL, 0, NULL, NULL, NULL};
+ {0, 0, NULL, NULL, 0, NULL, NULL, NULL};
void
lbolt_softint_add(void)
diff --git a/usr/src/uts/i86pc/os/mp_implfuncs.c b/usr/src/uts/i86pc/os/mp_implfuncs.c
index 3bded8f124..2d0bd3eb53 100644
--- a/usr/src/uts/i86pc/os/mp_implfuncs.c
+++ b/usr/src/uts/i86pc/os/mp_implfuncs.c
@@ -70,11 +70,11 @@ struct mod_ops mod_psmops = {
};
static struct psm_sw psm_swtab = {
- &psm_swtab, &psm_swtab, NULL, NULL
+ &psm_swtab, &psm_swtab, NULL, 0
};
-kmutex_t psmsw_lock; /* lock accesses to psmsw */
-struct psm_sw *psmsw = &psm_swtab; /* start of all psm_sw */
+kmutex_t psmsw_lock; /* lock accesses to psmsw */
+struct psm_sw *psmsw = &psm_swtab; /* start of all psm_sw */
static struct modlinkage *
psm_modlinkage_alloc(struct psm_info *infop)
@@ -167,7 +167,7 @@ psm_mod_info(void **handlepp, struct psm_info *infop, struct modinfo *modinfop)
if (!*modlpp) {
mlinkp = psm_modlinkage_alloc(infop);
if (!mlinkp)
- return ((int)NULL);
+ return (0);
} else
mlinkp = *modlpp;
diff --git a/usr/src/uts/i86pc/os/pci_cfgacc_x86.c b/usr/src/uts/i86pc/os/pci_cfgacc_x86.c
index b48a4c0703..8fc919f484 100644
--- a/usr/src/uts/i86pc/os/pci_cfgacc_x86.c
+++ b/usr/src/uts/i86pc/os/pci_cfgacc_x86.c
@@ -217,7 +217,7 @@ pci_cfgacc_check_io(pci_cfgacc_req_t *req)
bus = PCI_BDF_BUS(req->bdf);
- if (pci_cfgacc_force_io || (mcfg_mem_base == NULL) ||
+ if (pci_cfgacc_force_io || (mcfg_mem_base == 0) ||
(bus < mcfg_bus_start) || (bus > mcfg_bus_end) ||
pci_cfgacc_find_workaround(req->bdf))
req->ioacc = B_TRUE;
diff --git a/usr/src/uts/i86pc/os/startup.c b/usr/src/uts/i86pc/os/startup.c
index f63973f092..9d9765cb2c 100644
--- a/usr/src/uts/i86pc/os/startup.c
+++ b/usr/src/uts/i86pc/os/startup.c
@@ -633,9 +633,9 @@ static char *prm_dbg_str[] = {
int prom_debug;
-#define PRM_DEBUG(q) if (prom_debug) \
+#define PRM_DEBUG(q) if (prom_debug) \
prom_printf(prm_dbg_str[sizeof (q) >> 3], "startup.c", __LINE__, #q, q);
-#define PRM_POINT(q) if (prom_debug) \
+#define PRM_POINT(q) if (prom_debug) \
prom_printf("%s:%d: %s\n", "startup.c", __LINE__, q);
/*
@@ -653,13 +653,13 @@ size_t valloc_sz = 0;
uintptr_t valloc_base;
#define ADD_TO_ALLOCATIONS(ptr, size) { \
- size = ROUND_UP_PAGE(size); \
+ size = ROUND_UP_PAGE(size); \
if (num_allocations == NUM_ALLOCATIONS) \
panic("too many ADD_TO_ALLOCATIONS()"); \
allocations[num_allocations].al_ptr = (void**)&ptr; \
allocations[num_allocations].al_size = size; \
valloc_sz += size; \
- ++num_allocations; \
+ ++num_allocations; \
}
/*
@@ -3087,7 +3087,7 @@ get_system_configuration(void)
if (BOP_GETPROPLEN(bootops, "kernelbase") > sizeof (prop) ||
BOP_GETPROP(bootops, "kernelbase", prop) < 0 ||
kobj_getvalue(prop, &lvalue) == -1)
- eprom_kernelbase = NULL;
+ eprom_kernelbase = 0;
else
eprom_kernelbase = (uintptr_t)lvalue;