cpuextintr_ctl Subroutine

Purpose

Performs Central Processing Unit (CPU) external interrupt control related operations on CPUs.

Library

Standard C library (libc.a)

Syntax

#include <sys/intr.h>

int cpuextintr_ctl(command,cpuset,flags)
extintrctl_t command;
rsethandle_t cpuset;
uint flags;

Description

The cpuextintr_ctl subroutine provides means of enabling, disabling, and querying the external interrupt state on the CPUs described by the CPU resource set. If you enable or disable a CPU’s external interrupt, it affects the external interrupt delivery to the CPU. Typically, on multiple CPU system, external interrupts can be delivered to any running CPU, and the distribution among the CPUs is determined by a predefined method. Any external interrupt can only be delivered to a CPU if its interrupt priority is more favored than the current external interrupt priority of the CPU. When external interrupts are disabled through this interface, any external interrupt priority that is less favored than INTMAX is blocked until interrupts are enabled again. The cpuextintr_ctl subroutine is applicable only on selective hardware types.

Note: Because this subroutine changes the way external interrupt is delivered, system performance can be affected. This service guarantees at least one online CPU is available to handle all the external interrupts. Any CPU DLPAR removal fails if the operation breaks such rule. On an I/O bound system, one CPU might not be enough to handle all the external interrupts. Performance suffers due to insufficient CPU available to handle external interrupts.

Parameters

Item Description
command
Specifies the operation to the CPUs specified by CPU resource set. One of the following values that are defined in <sys/intr.h> file can be used:
EXTINTDISABLE
Disable external interrupt on the CPUs specified by the CPU resource set.
EXTINTENABLE
Enable external interrupt on the CPUs specified by the CPU resource set.
QUERYEXTINTDISABLE
Returns a CPU resource set that have the CPUs with external interrupt as disabled.
QUERYEXTINTENABLE
Returns a CPU resource set that have the CPUs with external interrupt as enabled.
cpuset

Reference to a CPU resource set. Upon successful return from this kernel service, the CPUs, for which the external interrupt control operation is complete are set in the CPU resource set.

The CPUs specified by the cpuset parameter are logical CPU IDs.

flags

Always set to 0 or EINVAL is returned.

Security

The caller must have root authority with the CAP_NUMA_ATTACH capability or PV_KER_CONF privilege in the RBAC environment.

Return Values

Upon successful completion, the cpuextintr_ctl subroutine returns the number of CPUs on which the command successfully completed. If unsuccessful, -1 is returned and the errno global variable is set to indicate the error.

Error Codes

Item Description
EINVAL

The command is not valid, the cpuset references NULL, the cpuset is empty, or the flags value is unknown.

EFAULT

The cpuset buffer passed in is not valid.

ENOSYS

This function is not implemented on the platform.

EPERM

Caller does not have enough privilege to perform the requested operation.

Note: A return value of success does not necessarily indicate that external interrupts have been enabled or disabled on all of the specified CPUs. For example, if a CPU is not online, the enable or disable operation will not be performed on that CPU. The caller must check the returned cpuset to verify the completion of this operation on the CPUs. The k_cpuextintr_ctl kernel service does not block DR CPU add or remove operation during the entire period of system call.