本文整理汇总了C++中convert_to_wide函数的典型用法代码示例。如果您正苦于以下问题:C++ convert_to_wide函数的具体用法?C++ convert_to_wide怎么用?C++ convert_to_wide使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了convert_to_wide函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: set_firmware_width_unlocked
void __cpuinit set_firmware_width_unlocked(void)
{
int ret;
ret = mem_pdc_call(PDC_MODEL, PDC_MODEL_CAPABILITIES,
__pa(pdc_result), 0);
convert_to_wide(pdc_result);
if (pdc_result[0] != NARROW_FIRMWARE)
parisc_narrow_firmware = 0;
}
示例2: pdc_model_info
/**
* pdc_model_info - Return model information about the processor.
* @model: The return buffer.
*
* Returns the version numbers, identifiers, and capabilities from the processor module.
*/
int pdc_model_info(struct pdc_model *model)
{
int retval;
spin_lock_irq(&pdc_lock);
retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_INFO, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
memcpy(model, pdc_result, sizeof(*model));
spin_unlock_irq(&pdc_lock);
return retval;
}
示例3: pdc_cache_info
/**
* pdc_cache_info - Return cache and TLB information.
* @cache_info: The return buffer.
*
* Returns information about the processor's cache and TLB.
*/
int pdc_cache_info(struct pdc_cache_info *cache_info)
{
int retval;
spin_lock_irq(&pdc_lock);
retval = mem_pdc_call(PDC_CACHE, PDC_CACHE_INFO, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
memcpy(cache_info, pdc_result, sizeof(*cache_info));
spin_unlock_irq(&pdc_lock);
return retval;
}
示例4: pdc_tod_read
/**
* pdc_tod_read - Read the Time-Of-Day clock.
* @tod: The return buffer:
*
* Read the Time-Of-Day clock
*/
int pdc_tod_read(struct pdc_tod *tod)
{
int retval;
spin_lock_irq(&pdc_lock);
retval = mem_pdc_call(PDC_TOD, PDC_TOD_READ, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
memcpy(tod, pdc_result, sizeof(*tod));
spin_unlock_irq(&pdc_lock);
return retval;
}
示例5: pdc_model_versions
/**
* pdc_model_versions - Identify the version number of each processor.
* @cpu_id: The return buffer.
* @id: The id of the processor to check.
*
* Returns the version number for each processor component.
*
* This comment was here before, but I do not know what it means :( -RB
* id: 0 = cpu revision, 1 = boot-rom-version
*/
int pdc_model_versions(unsigned long *versions, int id)
{
int retval;
spin_lock_irq(&pdc_lock);
retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_VERSIONS, __pa(pdc_result), id);
convert_to_wide(pdc_result);
*versions = pdc_result[0];
spin_unlock_irq(&pdc_lock);
return retval;
}
示例6: pdc_stable_write
/**
* pdc_stable_write - Write data to Stable Storage.
* @staddr: Stable Storage address to access.
* @memaddr: The memory address where Stable Storage data shall be read from.
* @count: number of bytes to transfert. count is multiple of 4.
*
* This PDC call reads count bytes from the supplied memaddr address,
* and copies count bytes to the Stable Storage address staddr.
* The call will fail if staddr+count > PDC_STABLE size.
*/
int pdc_stable_write(unsigned long staddr, void *memaddr, unsigned long count)
{
int retval;
spin_lock_irq(&pdc_lock);
memcpy(pdc_result, memaddr, count);
convert_to_wide(pdc_result);
retval = mem_pdc_call(PDC_STABLE, PDC_STABLE_WRITE, staddr,
__pa(pdc_result), count);
spin_unlock_irq(&pdc_lock);
return retval;
}
示例7: pdc_tod_read
/**
* pdc_tod_read - Read the Time-Of-Day clock.
* @tod: The return buffer:
*
* Read the Time-Of-Day clock
*/
int pdc_tod_read(struct pdc_tod *tod)
{
int retval;
unsigned long flags;
spin_lock_irqsave(&pdc_lock, flags);
retval = mem_pdc_call(PDC_TOD, PDC_TOD_READ, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
memcpy(tod, pdc_result, sizeof(*tod));
spin_unlock_irqrestore(&pdc_lock, flags);
return retval;
}
示例8: pdc_coproc_cfg_unlocked
int __cpuinit pdc_coproc_cfg_unlocked(struct pdc_coproc_cfg *pdc_coproc_info)
{
int ret;
ret = mem_pdc_call(PDC_COPROC, PDC_COPROC_CFG, __pa(pdc_result));
convert_to_wide(pdc_result);
pdc_coproc_info->ccr_functional = pdc_result[0];
pdc_coproc_info->ccr_present = pdc_result[1];
pdc_coproc_info->revision = pdc_result[17];
pdc_coproc_info->model = pdc_result[18];
return ret;
}
示例9: pdc_model_info
/**
* pdc_model_info - Return model information about the processor.
* @model: The return buffer.
*
* Returns the version numbers, identifiers, and capabilities from the processor module.
*/
int pdc_model_info(struct pdc_model *model)
{
int retval;
unsigned long flags;
spin_lock_irqsave(&pdc_lock, flags);
retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_INFO, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
memcpy(model, pdc_result, sizeof(*model));
spin_unlock_irqrestore(&pdc_lock, flags);
return retval;
}
示例10: pdc_pci_irt_size
/**
* pdc_pci_irt_size - Get the number of entries in the interrupt routing table.
* @num_entries: The return value.
* @hpa: The HPA for the device.
*
* This PDC function returns the number of entries in the specified cell's
* interrupt table.
* Similar to PDC_PAT stuff - but added for Forte/Allegro boxes
*/
int pdc_pci_irt_size(unsigned long *num_entries, unsigned long hpa)
{
int retval;
spin_lock_irq(&pdc_lock);
retval = mem_pdc_call(PDC_PCI_INDEX, PDC_PCI_GET_INT_TBL_SIZE,
__pa(pdc_result), hpa);
convert_to_wide(pdc_result);
*num_entries = pdc_result[0];
spin_unlock_irq(&pdc_lock);
return retval;
}
示例11: pdc_spaceid_bits
/**
* pdc_spaceid_bits - Return whether Space ID hashing is turned on.
* @space_bits: Should be 0, if not, bad mojo!
*
* Returns information about Space ID hashing.
*/
int pdc_spaceid_bits(unsigned long *space_bits)
{
int retval;
spin_lock_irq(&pdc_lock);
pdc_result[0] = 0;
retval = mem_pdc_call(PDC_CACHE, PDC_CACHE_RET_SPID, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
*space_bits = pdc_result[0];
spin_unlock_irq(&pdc_lock);
return retval;
}
示例12: pdc_cache_info
/**
* pdc_cache_info - Return cache and TLB information.
* @cache_info: The return buffer.
*
* Returns information about the processor's cache and TLB.
*/
int pdc_cache_info(struct pdc_cache_info *cache_info)
{
int retval;
unsigned long flags;
spin_lock_irqsave(&pdc_lock, flags);
retval = mem_pdc_call(PDC_CACHE, PDC_CACHE_INFO, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
memcpy(cache_info, pdc_result, sizeof(*cache_info));
spin_unlock_irqrestore(&pdc_lock, flags);
return retval;
}
示例13: pdc_model_capabilities
/**
* pdc_model_capabilities - Returns the platform capabilities.
* @capabilities: The return buffer.
*
* Returns information about platform support for 32- and/or 64-bit
* OSes, IO-PDIR coherency, and virtual aliasing.
*/
int pdc_model_capabilities(unsigned long *capabilities)
{
int retval;
spin_lock_irq(&pdc_lock);
pdc_result[0] = 0; /* preset zero (call may not be implemented!) */
retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_CAPABILITIES, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
*capabilities = pdc_result[0];
spin_unlock_irq(&pdc_lock);
return retval;
}
示例14: pdc_model_cpuid
/**
* pdc_model_cpuid - Returns the CPU_ID.
* @cpu_id: The return buffer.
*
* Returns the CPU_ID value which uniquely identifies the cpu portion of
* the processor module.
*/
int pdc_model_cpuid(unsigned long *cpu_id)
{
int retval;
spin_lock_irq(&pdc_lock);
pdc_result[0] = 0; /* preset zero (call may not be implemented!) */
retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_CPU_ID, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
*cpu_id = pdc_result[0];
spin_unlock_irq(&pdc_lock);
return retval;
}
示例15: set_firmware_width
/**
* set_firmware_width - Determine if the firmware is wide or narrow.
*
* This function must be called before any pdc_* function that uses the convert_to_wide
* function.
*/
void __init set_firmware_width(void)
{
#ifdef __LP64__
int retval;
spin_lock_irq(&pdc_lock);
retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_CAPABILITIES, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
if(pdc_result[0] != NARROW_FIRMWARE)
parisc_narrow_firmware = 0;
spin_unlock_irq(&pdc_lock);
#endif
}