Re: [PATCH v5 16/16] scripts: kernel-doc: validate kernel-doc markup with the actual names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mauro,

I love your patch! Perhaps something to improve:

[auto build test WARNING on next-20201201]
[cannot apply to lwn/docs-next tip/sched/core hsi/for-next linus/master v5.10-rc6 v5.10-rc5 v5.10-rc4 v5.10-rc6]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/HSI-fix-a-kernel-doc-markup/20201201-210930
base:    0eedceafd3a63fd082743c914853ef4b9247dbe6
config: parisc-randconfig-s032-20201201 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-170-g3bc348f6-dirty
        # https://github.com/0day-ci/linux/commit/7c52ba119279c74e6c7e968e3fa7290bd0f3b837
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Mauro-Carvalho-Chehab/HSI-fix-a-kernel-doc-markup/20201201-210930
        git checkout 7c52ba119279c74e6c7e968e3fa7290bd0f3b837
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=parisc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   arch/parisc/kernel/firmware.c:144: warning: Function parameter or member 'addr' not described in 'convert_to_wide'
   arch/parisc/kernel/firmware.c:144: warning: Excess function parameter 'address' description in 'convert_to_wide'
   arch/parisc/kernel/firmware.c:260: warning: Function parameter or member 'led_info' not described in 'pdc_chassis_info'
   arch/parisc/kernel/firmware.c:260: warning: Excess function parameter 'result' description in 'pdc_chassis_info'
   arch/parisc/kernel/firmware.c:284: warning: Function parameter or member 'state' not described in 'pdc_pat_chassis_send_log'
   arch/parisc/kernel/firmware.c:284: warning: Function parameter or member 'data' not described in 'pdc_pat_chassis_send_log'
   arch/parisc/kernel/firmware.c:284: warning: Excess function parameter 'retval' description in 'pdc_pat_chassis_send_log'
   arch/parisc/kernel/firmware.c:304: warning: Function parameter or member 'disp' not described in 'pdc_chassis_disp'
   arch/parisc/kernel/firmware.c:304: warning: Excess function parameter 'retval' description in 'pdc_chassis_disp'
>> arch/parisc/kernel/firmware.c:320: warning: expecting prototype for pdc_cpu_rendenzvous(). Prototype was for __pdc_cpu_rendezvous() instead
   arch/parisc/kernel/firmware.c:333: warning: Function parameter or member 'warn' not described in 'pdc_chassis_warn'
   arch/parisc/kernel/firmware.c:333: warning: Excess function parameter 'retval' description in 'pdc_chassis_warn'
   arch/parisc/kernel/firmware.c:519: warning: Function parameter or member 'versions' not described in 'pdc_model_versions'
   arch/parisc/kernel/firmware.c:519: warning: Excess function parameter 'cpu_id' description in 'pdc_model_versions'
   arch/parisc/kernel/firmware.c:963: warning: Function parameter or member 'hpa' not described in 'pdc_pci_config_read'
   arch/parisc/kernel/firmware.c:963: warning: Function parameter or member 'cfg_addr' not described in 'pdc_pci_config_read'
   arch/parisc/kernel/firmware.c:987: warning: Function parameter or member 'hpa' not described in 'pdc_pci_config_write'
   arch/parisc/kernel/firmware.c:987: warning: Function parameter or member 'cfg_addr' not described in 'pdc_pci_config_write'
   arch/parisc/kernel/firmware.c:987: warning: Function parameter or member 'val' not described in 'pdc_pci_config_write'
   arch/parisc/kernel/firmware.c:1464: warning: Function parameter or member 'actual_len' not described in 'pdc_pat_pd_get_addr_map'
   arch/parisc/kernel/firmware.c:1464: warning: Excess function parameter 'actlen' description in 'pdc_pat_pd_get_addr_map'
>> arch/parisc/kernel/firmware.c:1487: warning: expecting prototype for pdc_pat_pd_get_PDC_interface_revisions(). Prototype was for pdc_pat_pd_get_pdc_revisions() instead
   arch/parisc/kernel/firmware.c:1539: warning: Function parameter or member 'val' not described in 'pdc_pat_io_pci_cfg_write'
   arch/parisc/kernel/firmware.c:1539: warning: Excess function parameter 'value' description in 'pdc_pat_io_pci_cfg_write'
>> arch/parisc/kernel/firmware.c:1557: warning: expecting prototype for pdc_pat_mem_pdc_info(). Prototype was for pdc_pat_mem_pdt_info() instead
--
   arch/parisc/kernel/pdc_chassis.c:47: warning: Function parameter or member 'str' not described in 'pdc_chassis_setup'
   arch/parisc/kernel/pdc_chassis.c:64: warning: Excess function parameter 'pdc_chassis_old' description in 'pdc_chassis_checkold'
   arch/parisc/kernel/pdc_chassis.c:88: warning: Function parameter or member 'this' not described in 'pdc_chassis_panic_event'
   arch/parisc/kernel/pdc_chassis.c:88: warning: Function parameter or member 'event' not described in 'pdc_chassis_panic_event'
   arch/parisc/kernel/pdc_chassis.c:88: warning: Function parameter or member 'ptr' not described in 'pdc_chassis_panic_event'
   arch/parisc/kernel/pdc_chassis.c:108: warning: Function parameter or member 'this' not described in 'pdc_chassis_reboot_event'
   arch/parisc/kernel/pdc_chassis.c:108: warning: Function parameter or member 'event' not described in 'pdc_chassis_reboot_event'
   arch/parisc/kernel/pdc_chassis.c:108: warning: Function parameter or member 'ptr' not described in 'pdc_chassis_reboot_event'
>> arch/parisc/kernel/pdc_chassis.c:108: warning: expecting prototype for parisc_reboot_event(). Prototype was for pdc_chassis_reboot_event() instead
   arch/parisc/kernel/pdc_chassis.c:162: warning: Function parameter or member 'message' not described in 'pdc_chassis_send_status'
   arch/parisc/kernel/pdc_chassis.c:162: warning: Excess function parameter 'retval' description in 'pdc_chassis_send_status'
--
>> arch/parisc/kernel/processor.c:67: warning: expecting prototype for init_cpu_profiler(). Prototype was for init_percpu_prof() instead
--
   drivers/tty/serial/mux.c:118: warning: Function parameter or member 'port' not described in 'mux_set_mctrl'
   drivers/tty/serial/mux.c:118: warning: Excess function parameter 'ports' description in 'mux_set_mctrl'
>> drivers/tty/serial/mux.c:371: warning: expecting prototype for mux_drv_poll(). Prototype was for mux_poll() instead

vim +320 arch/parisc/kernel/firmware.c

^1da177e4c3f415 Linus Torvalds 2005-04-16  134  
^1da177e4c3f415 Linus Torvalds 2005-04-16  135  /**
^1da177e4c3f415 Linus Torvalds 2005-04-16  136   * convert_to_wide - Convert the return buffer addresses into kernel addresses.
^1da177e4c3f415 Linus Torvalds 2005-04-16  137   * @address: The return buffer from PDC.
^1da177e4c3f415 Linus Torvalds 2005-04-16  138   *
^1da177e4c3f415 Linus Torvalds 2005-04-16  139   * This function is used to convert the return buffer addresses retrieved from PDC
^1da177e4c3f415 Linus Torvalds 2005-04-16  140   * into kernel addresses when the PDC address size and kernel address size are
^1da177e4c3f415 Linus Torvalds 2005-04-16  141   * different.
^1da177e4c3f415 Linus Torvalds 2005-04-16  142   */
^1da177e4c3f415 Linus Torvalds 2005-04-16  143  static void convert_to_wide(unsigned long *addr)
^1da177e4c3f415 Linus Torvalds 2005-04-16 @144  {
a8f44e3889b6868 Helge Deller   2007-01-28  145  #ifdef CONFIG_64BIT
^1da177e4c3f415 Linus Torvalds 2005-04-16  146  	int i;
^1da177e4c3f415 Linus Torvalds 2005-04-16  147  	unsigned int *p = (unsigned int *)addr;
^1da177e4c3f415 Linus Torvalds 2005-04-16  148  
^1da177e4c3f415 Linus Torvalds 2005-04-16  149  	if (unlikely(parisc_narrow_firmware)) {
8a5aa00e6b9630d Helge Deller   2017-08-04  150  		for (i = (NUM_PDC_RESULT-1); i >= 0; --i)
^1da177e4c3f415 Linus Torvalds 2005-04-16  151  			addr[i] = p[i];
^1da177e4c3f415 Linus Torvalds 2005-04-16  152  	}
^1da177e4c3f415 Linus Torvalds 2005-04-16  153  #endif
^1da177e4c3f415 Linus Torvalds 2005-04-16  154  }
^1da177e4c3f415 Linus Torvalds 2005-04-16  155  
24b574d052a1996 Kyle McMartin  2008-07-29  156  #ifdef CONFIG_64BIT
60ffef065dd40b9 Paul Gortmaker 2013-06-17  157  void set_firmware_width_unlocked(void)
24b574d052a1996 Kyle McMartin  2008-07-29  158  {
24b574d052a1996 Kyle McMartin  2008-07-29  159  	int ret;
24b574d052a1996 Kyle McMartin  2008-07-29  160  
24b574d052a1996 Kyle McMartin  2008-07-29  161  	ret = mem_pdc_call(PDC_MODEL, PDC_MODEL_CAPABILITIES,
24b574d052a1996 Kyle McMartin  2008-07-29  162  		__pa(pdc_result), 0);
24b574d052a1996 Kyle McMartin  2008-07-29  163  	convert_to_wide(pdc_result);
24b574d052a1996 Kyle McMartin  2008-07-29  164  	if (pdc_result[0] != NARROW_FIRMWARE)
24b574d052a1996 Kyle McMartin  2008-07-29  165  		parisc_narrow_firmware = 0;
24b574d052a1996 Kyle McMartin  2008-07-29  166  }
24b574d052a1996 Kyle McMartin  2008-07-29  167  	
^1da177e4c3f415 Linus Torvalds 2005-04-16  168  /**
^1da177e4c3f415 Linus Torvalds 2005-04-16  169   * set_firmware_width - Determine if the firmware is wide or narrow.
^1da177e4c3f415 Linus Torvalds 2005-04-16  170   * 
24b574d052a1996 Kyle McMartin  2008-07-29  171   * This function must be called before any pdc_* function that uses the
24b574d052a1996 Kyle McMartin  2008-07-29  172   * convert_to_wide function.
^1da177e4c3f415 Linus Torvalds 2005-04-16  173   */
60ffef065dd40b9 Paul Gortmaker 2013-06-17  174  void set_firmware_width(void)
^1da177e4c3f415 Linus Torvalds 2005-04-16  175  {
09690b18b7b9696 Kyle McMartin  2006-10-05  176  	unsigned long flags;
09690b18b7b9696 Kyle McMartin  2006-10-05  177  	spin_lock_irqsave(&pdc_lock, flags);
24b574d052a1996 Kyle McMartin  2008-07-29  178  	set_firmware_width_unlocked();
09690b18b7b9696 Kyle McMartin  2006-10-05  179  	spin_unlock_irqrestore(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  180  }
24b574d052a1996 Kyle McMartin  2008-07-29  181  #else
60ffef065dd40b9 Paul Gortmaker 2013-06-17  182  void set_firmware_width_unlocked(void)
60ffef065dd40b9 Paul Gortmaker 2013-06-17  183  {
24b574d052a1996 Kyle McMartin  2008-07-29  184  	return;
24b574d052a1996 Kyle McMartin  2008-07-29  185  }
24b574d052a1996 Kyle McMartin  2008-07-29  186  
60ffef065dd40b9 Paul Gortmaker 2013-06-17  187  void set_firmware_width(void)
60ffef065dd40b9 Paul Gortmaker 2013-06-17  188  {
24b574d052a1996 Kyle McMartin  2008-07-29  189  	return;
24b574d052a1996 Kyle McMartin  2008-07-29  190  }
24b574d052a1996 Kyle McMartin  2008-07-29  191  #endif /*CONFIG_64BIT*/
^1da177e4c3f415 Linus Torvalds 2005-04-16  192  
f5213b2c40f5749 Helge Deller   2017-08-20  193  
f5213b2c40f5749 Helge Deller   2017-08-20  194  #if !defined(BOOTLOADER)
^1da177e4c3f415 Linus Torvalds 2005-04-16  195  /**
^1da177e4c3f415 Linus Torvalds 2005-04-16  196   * pdc_emergency_unlock - Unlock the linux pdc lock
^1da177e4c3f415 Linus Torvalds 2005-04-16  197   *
^1da177e4c3f415 Linus Torvalds 2005-04-16  198   * This call unlocks the linux pdc lock in case we need some PDC functions
^1da177e4c3f415 Linus Torvalds 2005-04-16  199   * (like pdc_add_valid) during kernel stack dump.
^1da177e4c3f415 Linus Torvalds 2005-04-16  200   */
^1da177e4c3f415 Linus Torvalds 2005-04-16  201  void pdc_emergency_unlock(void)
^1da177e4c3f415 Linus Torvalds 2005-04-16  202  {
^1da177e4c3f415 Linus Torvalds 2005-04-16  203   	/* Spinlock DEBUG code freaks out if we unconditionally unlock */
^1da177e4c3f415 Linus Torvalds 2005-04-16  204          if (spin_is_locked(&pdc_lock))
^1da177e4c3f415 Linus Torvalds 2005-04-16  205  		spin_unlock(&pdc_lock);
^1da177e4c3f415 Linus Torvalds 2005-04-16  206  }
^1da177e4c3f415 Linus Torvalds 2005-04-16  207  
^1da177e4c3f415 Linus Torvalds 2005-04-16  208  
^1da177e4c3f415 Linus Torvalds 2005-04-16  209  /**
^1da177e4c3f415 Linus Torvalds 2005-04-16  210   * pdc_add_valid - Verify address can be accessed without causing a HPMC.
^1da177e4c3f415 Linus Torvalds 2005-04-16  211   * @address: Address to be verified.
^1da177e4c3f415 Linus Torvalds 2005-04-16  212   *
^1da177e4c3f415 Linus Torvalds 2005-04-16  213   * This PDC call attempts to read from the specified address and verifies
^1da177e4c3f415 Linus Torvalds 2005-04-16  214   * if the address is valid.
^1da177e4c3f415 Linus Torvalds 2005-04-16  215   * 
^1da177e4c3f415 Linus Torvalds 2005-04-16  216   * The return value is PDC_OK (0) in case accessing this address is valid.
^1da177e4c3f415 Linus Torvalds 2005-04-16  217   */
^1da177e4c3f415 Linus Torvalds 2005-04-16  218  int pdc_add_valid(unsigned long address)
^1da177e4c3f415 Linus Torvalds 2005-04-16  219  {
^1da177e4c3f415 Linus Torvalds 2005-04-16  220          int retval;
09690b18b7b9696 Kyle McMartin  2006-10-05  221  	unsigned long flags;
^1da177e4c3f415 Linus Torvalds 2005-04-16  222  
09690b18b7b9696 Kyle McMartin  2006-10-05  223          spin_lock_irqsave(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  224          retval = mem_pdc_call(PDC_ADD_VALID, PDC_ADD_VALID_VERIFY, address);
09690b18b7b9696 Kyle McMartin  2006-10-05  225          spin_unlock_irqrestore(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  226  
^1da177e4c3f415 Linus Torvalds 2005-04-16  227          return retval;
^1da177e4c3f415 Linus Torvalds 2005-04-16  228  }
^1da177e4c3f415 Linus Torvalds 2005-04-16  229  EXPORT_SYMBOL(pdc_add_valid);
^1da177e4c3f415 Linus Torvalds 2005-04-16  230  
77089c5274fe2f7 Helge Deller   2017-09-17  231  /**
77089c5274fe2f7 Helge Deller   2017-09-17  232   * pdc_instr - Get instruction that invokes PDCE_CHECK in HPMC handler.
77089c5274fe2f7 Helge Deller   2017-09-17  233   * @instr: Pointer to variable which will get instruction opcode.
77089c5274fe2f7 Helge Deller   2017-09-17  234   *
77089c5274fe2f7 Helge Deller   2017-09-17  235   * The return value is PDC_OK (0) in case call succeeded.
77089c5274fe2f7 Helge Deller   2017-09-17  236   */
77089c5274fe2f7 Helge Deller   2017-09-17  237  int __init pdc_instr(unsigned int *instr)
77089c5274fe2f7 Helge Deller   2017-09-17  238  {
77089c5274fe2f7 Helge Deller   2017-09-17  239  	int retval;
77089c5274fe2f7 Helge Deller   2017-09-17  240  	unsigned long flags;
77089c5274fe2f7 Helge Deller   2017-09-17  241  
77089c5274fe2f7 Helge Deller   2017-09-17  242  	spin_lock_irqsave(&pdc_lock, flags);
77089c5274fe2f7 Helge Deller   2017-09-17  243  	retval = mem_pdc_call(PDC_INSTR, 0UL, __pa(pdc_result));
77089c5274fe2f7 Helge Deller   2017-09-17  244  	convert_to_wide(pdc_result);
77089c5274fe2f7 Helge Deller   2017-09-17  245  	*instr = pdc_result[0];
77089c5274fe2f7 Helge Deller   2017-09-17  246  	spin_unlock_irqrestore(&pdc_lock, flags);
77089c5274fe2f7 Helge Deller   2017-09-17  247  
77089c5274fe2f7 Helge Deller   2017-09-17  248  	return retval;
77089c5274fe2f7 Helge Deller   2017-09-17  249  }
77089c5274fe2f7 Helge Deller   2017-09-17  250  
^1da177e4c3f415 Linus Torvalds 2005-04-16  251  /**
^1da177e4c3f415 Linus Torvalds 2005-04-16  252   * pdc_chassis_info - Return chassis information.
^1da177e4c3f415 Linus Torvalds 2005-04-16  253   * @result: The return buffer.
^1da177e4c3f415 Linus Torvalds 2005-04-16  254   * @chassis_info: The memory buffer address.
^1da177e4c3f415 Linus Torvalds 2005-04-16  255   * @len: The size of the memory buffer address.
^1da177e4c3f415 Linus Torvalds 2005-04-16  256   *
^1da177e4c3f415 Linus Torvalds 2005-04-16  257   * An HVERSION dependent call for returning the chassis information.
^1da177e4c3f415 Linus Torvalds 2005-04-16  258   */
^1da177e4c3f415 Linus Torvalds 2005-04-16  259  int __init pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_info, unsigned long len)
^1da177e4c3f415 Linus Torvalds 2005-04-16  260  {
^1da177e4c3f415 Linus Torvalds 2005-04-16  261          int retval;
09690b18b7b9696 Kyle McMartin  2006-10-05  262  	unsigned long flags;
^1da177e4c3f415 Linus Torvalds 2005-04-16  263  
09690b18b7b9696 Kyle McMartin  2006-10-05  264          spin_lock_irqsave(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  265          memcpy(&pdc_result, chassis_info, sizeof(*chassis_info));
^1da177e4c3f415 Linus Torvalds 2005-04-16  266          memcpy(&pdc_result2, led_info, len);
^1da177e4c3f415 Linus Torvalds 2005-04-16  267          retval = mem_pdc_call(PDC_CHASSIS, PDC_RETURN_CHASSIS_INFO,
^1da177e4c3f415 Linus Torvalds 2005-04-16  268                                __pa(pdc_result), __pa(pdc_result2), len);
^1da177e4c3f415 Linus Torvalds 2005-04-16  269          memcpy(chassis_info, pdc_result, sizeof(*chassis_info));
^1da177e4c3f415 Linus Torvalds 2005-04-16  270          memcpy(led_info, pdc_result2, len);
09690b18b7b9696 Kyle McMartin  2006-10-05  271          spin_unlock_irqrestore(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  272  
^1da177e4c3f415 Linus Torvalds 2005-04-16  273          return retval;
^1da177e4c3f415 Linus Torvalds 2005-04-16  274  }
^1da177e4c3f415 Linus Torvalds 2005-04-16  275  
^1da177e4c3f415 Linus Torvalds 2005-04-16  276  /**
^1da177e4c3f415 Linus Torvalds 2005-04-16  277   * pdc_pat_chassis_send_log - Sends a PDC PAT CHASSIS log message.
^1da177e4c3f415 Linus Torvalds 2005-04-16  278   * @retval: -1 on error, 0 on success. Other value are PDC errors
^1da177e4c3f415 Linus Torvalds 2005-04-16  279   * 
^1da177e4c3f415 Linus Torvalds 2005-04-16  280   * Must be correctly formatted or expect system crash
^1da177e4c3f415 Linus Torvalds 2005-04-16  281   */
a8f44e3889b6868 Helge Deller   2007-01-28  282  #ifdef CONFIG_64BIT
^1da177e4c3f415 Linus Torvalds 2005-04-16  283  int pdc_pat_chassis_send_log(unsigned long state, unsigned long data)
^1da177e4c3f415 Linus Torvalds 2005-04-16  284  {
^1da177e4c3f415 Linus Torvalds 2005-04-16  285  	int retval = 0;
09690b18b7b9696 Kyle McMartin  2006-10-05  286  	unsigned long flags;
^1da177e4c3f415 Linus Torvalds 2005-04-16  287          
^1da177e4c3f415 Linus Torvalds 2005-04-16  288  	if (!is_pdc_pat())
^1da177e4c3f415 Linus Torvalds 2005-04-16  289  		return -1;
^1da177e4c3f415 Linus Torvalds 2005-04-16  290  
09690b18b7b9696 Kyle McMartin  2006-10-05  291  	spin_lock_irqsave(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  292  	retval = mem_pdc_call(PDC_PAT_CHASSIS_LOG, PDC_PAT_CHASSIS_WRITE_LOG, __pa(&state), __pa(&data));
09690b18b7b9696 Kyle McMartin  2006-10-05  293  	spin_unlock_irqrestore(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  294  
^1da177e4c3f415 Linus Torvalds 2005-04-16  295  	return retval;
^1da177e4c3f415 Linus Torvalds 2005-04-16  296  }
^1da177e4c3f415 Linus Torvalds 2005-04-16  297  #endif
^1da177e4c3f415 Linus Torvalds 2005-04-16  298  
^1da177e4c3f415 Linus Torvalds 2005-04-16  299  /**
8ffaeaf42e91930 Thibaut Varene 2006-05-03  300   * pdc_chassis_disp - Updates chassis code
^1da177e4c3f415 Linus Torvalds 2005-04-16  301   * @retval: -1 on error, 0 on success
^1da177e4c3f415 Linus Torvalds 2005-04-16  302   */
^1da177e4c3f415 Linus Torvalds 2005-04-16  303  int pdc_chassis_disp(unsigned long disp)
^1da177e4c3f415 Linus Torvalds 2005-04-16  304  {
^1da177e4c3f415 Linus Torvalds 2005-04-16  305  	int retval = 0;
09690b18b7b9696 Kyle McMartin  2006-10-05  306  	unsigned long flags;
^1da177e4c3f415 Linus Torvalds 2005-04-16  307  
09690b18b7b9696 Kyle McMartin  2006-10-05  308  	spin_lock_irqsave(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  309  	retval = mem_pdc_call(PDC_CHASSIS, PDC_CHASSIS_DISP, disp);
09690b18b7b9696 Kyle McMartin  2006-10-05  310  	spin_unlock_irqrestore(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  311  
^1da177e4c3f415 Linus Torvalds 2005-04-16  312  	return retval;
^1da177e4c3f415 Linus Torvalds 2005-04-16  313  }
^1da177e4c3f415 Linus Torvalds 2005-04-16  314  
507efd63d98c443 Sven Schnelle  2019-09-08  315  /**
507efd63d98c443 Sven Schnelle  2019-09-08  316   * pdc_cpu_rendenzvous - Stop currently executing CPU
507efd63d98c443 Sven Schnelle  2019-09-08  317   * @retval: -1 on error, 0 on success
507efd63d98c443 Sven Schnelle  2019-09-08  318   */
507efd63d98c443 Sven Schnelle  2019-09-08  319  int __pdc_cpu_rendezvous(void)
507efd63d98c443 Sven Schnelle  2019-09-08 @320  {
507efd63d98c443 Sven Schnelle  2019-09-08  321  	if (is_pdc_pat())
507efd63d98c443 Sven Schnelle  2019-09-08  322  		return mem_pdc_call(PDC_PAT_CPU, PDC_PAT_CPU_RENDEZVOUS);
507efd63d98c443 Sven Schnelle  2019-09-08  323  	else
507efd63d98c443 Sven Schnelle  2019-09-08  324  		return mem_pdc_call(PDC_PROC, 1, 0);
507efd63d98c443 Sven Schnelle  2019-09-08  325  }
507efd63d98c443 Sven Schnelle  2019-09-08  326  
507efd63d98c443 Sven Schnelle  2019-09-08  327  
8ffaeaf42e91930 Thibaut Varene 2006-05-03  328  /**
8ffaeaf42e91930 Thibaut Varene 2006-05-03  329   * pdc_chassis_warn - Fetches chassis warnings
8ffaeaf42e91930 Thibaut Varene 2006-05-03  330   * @retval: -1 on error, 0 on success
8ffaeaf42e91930 Thibaut Varene 2006-05-03  331   */
8ffaeaf42e91930 Thibaut Varene 2006-05-03  332  int pdc_chassis_warn(unsigned long *warn)
8ffaeaf42e91930 Thibaut Varene 2006-05-03  333  {
8ffaeaf42e91930 Thibaut Varene 2006-05-03  334  	int retval = 0;
09690b18b7b9696 Kyle McMartin  2006-10-05  335  	unsigned long flags;
8ffaeaf42e91930 Thibaut Varene 2006-05-03  336  
09690b18b7b9696 Kyle McMartin  2006-10-05  337  	spin_lock_irqsave(&pdc_lock, flags);
8ffaeaf42e91930 Thibaut Varene 2006-05-03  338  	retval = mem_pdc_call(PDC_CHASSIS, PDC_CHASSIS_WARN, __pa(pdc_result));
8ffaeaf42e91930 Thibaut Varene 2006-05-03  339  	*warn = pdc_result[0];
09690b18b7b9696 Kyle McMartin  2006-10-05  340  	spin_unlock_irqrestore(&pdc_lock, flags);
8ffaeaf42e91930 Thibaut Varene 2006-05-03  341  
8ffaeaf42e91930 Thibaut Varene 2006-05-03  342  	return retval;
8ffaeaf42e91930 Thibaut Varene 2006-05-03  343  }
8ffaeaf42e91930 Thibaut Varene 2006-05-03  344  
60ffef065dd40b9 Paul Gortmaker 2013-06-17  345  int pdc_coproc_cfg_unlocked(struct pdc_coproc_cfg *pdc_coproc_info)
24b574d052a1996 Kyle McMartin  2008-07-29  346  {
24b574d052a1996 Kyle McMartin  2008-07-29  347  	int ret;
24b574d052a1996 Kyle McMartin  2008-07-29  348  
24b574d052a1996 Kyle McMartin  2008-07-29  349  	ret = mem_pdc_call(PDC_COPROC, PDC_COPROC_CFG, __pa(pdc_result));
24b574d052a1996 Kyle McMartin  2008-07-29  350  	convert_to_wide(pdc_result);
24b574d052a1996 Kyle McMartin  2008-07-29  351  	pdc_coproc_info->ccr_functional = pdc_result[0];
24b574d052a1996 Kyle McMartin  2008-07-29  352  	pdc_coproc_info->ccr_present = pdc_result[1];
24b574d052a1996 Kyle McMartin  2008-07-29  353  	pdc_coproc_info->revision = pdc_result[17];
24b574d052a1996 Kyle McMartin  2008-07-29  354  	pdc_coproc_info->model = pdc_result[18];
24b574d052a1996 Kyle McMartin  2008-07-29  355  
24b574d052a1996 Kyle McMartin  2008-07-29  356  	return ret;
24b574d052a1996 Kyle McMartin  2008-07-29  357  }
24b574d052a1996 Kyle McMartin  2008-07-29  358  
^1da177e4c3f415 Linus Torvalds 2005-04-16  359  /**
^1da177e4c3f415 Linus Torvalds 2005-04-16  360   * pdc_coproc_cfg - To identify coprocessors attached to the processor.
^1da177e4c3f415 Linus Torvalds 2005-04-16  361   * @pdc_coproc_info: Return buffer address.
^1da177e4c3f415 Linus Torvalds 2005-04-16  362   *
^1da177e4c3f415 Linus Torvalds 2005-04-16  363   * This PDC call returns the presence and status of all the coprocessors
^1da177e4c3f415 Linus Torvalds 2005-04-16  364   * attached to the processor.
^1da177e4c3f415 Linus Torvalds 2005-04-16  365   */
60ffef065dd40b9 Paul Gortmaker 2013-06-17  366  int pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info)
^1da177e4c3f415 Linus Torvalds 2005-04-16  367  {
24b574d052a1996 Kyle McMartin  2008-07-29  368  	int ret;
09690b18b7b9696 Kyle McMartin  2006-10-05  369  	unsigned long flags;
^1da177e4c3f415 Linus Torvalds 2005-04-16  370  
09690b18b7b9696 Kyle McMartin  2006-10-05  371  	spin_lock_irqsave(&pdc_lock, flags);
24b574d052a1996 Kyle McMartin  2008-07-29  372  	ret = pdc_coproc_cfg_unlocked(pdc_coproc_info);
09690b18b7b9696 Kyle McMartin  2006-10-05  373  	spin_unlock_irqrestore(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  374  
24b574d052a1996 Kyle McMartin  2008-07-29  375  	return ret;
^1da177e4c3f415 Linus Torvalds 2005-04-16  376  }
^1da177e4c3f415 Linus Torvalds 2005-04-16  377  
^1da177e4c3f415 Linus Torvalds 2005-04-16  378  /**
^1da177e4c3f415 Linus Torvalds 2005-04-16  379   * pdc_iodc_read - Read data from the modules IODC.
^1da177e4c3f415 Linus Torvalds 2005-04-16  380   * @actcnt: The actual number of bytes.
^1da177e4c3f415 Linus Torvalds 2005-04-16  381   * @hpa: The HPA of the module for the iodc read.
^1da177e4c3f415 Linus Torvalds 2005-04-16  382   * @index: The iodc entry point.
^1da177e4c3f415 Linus Torvalds 2005-04-16  383   * @iodc_data: A buffer memory for the iodc options.
^1da177e4c3f415 Linus Torvalds 2005-04-16  384   * @iodc_data_size: Size of the memory buffer.
^1da177e4c3f415 Linus Torvalds 2005-04-16  385   *
^1da177e4c3f415 Linus Torvalds 2005-04-16  386   * This PDC call reads from the IODC of the module specified by the hpa
^1da177e4c3f415 Linus Torvalds 2005-04-16  387   * argument.
^1da177e4c3f415 Linus Torvalds 2005-04-16  388   */
^1da177e4c3f415 Linus Torvalds 2005-04-16  389  int pdc_iodc_read(unsigned long *actcnt, unsigned long hpa, unsigned int index,
^1da177e4c3f415 Linus Torvalds 2005-04-16  390  		  void *iodc_data, unsigned int iodc_data_size)
^1da177e4c3f415 Linus Torvalds 2005-04-16  391  {
^1da177e4c3f415 Linus Torvalds 2005-04-16  392  	int retval;
09690b18b7b9696 Kyle McMartin  2006-10-05  393  	unsigned long flags;
^1da177e4c3f415 Linus Torvalds 2005-04-16  394  
09690b18b7b9696 Kyle McMartin  2006-10-05  395  	spin_lock_irqsave(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  396  	retval = mem_pdc_call(PDC_IODC, PDC_IODC_READ, __pa(pdc_result), hpa, 
^1da177e4c3f415 Linus Torvalds 2005-04-16  397  			      index, __pa(pdc_result2), iodc_data_size);
^1da177e4c3f415 Linus Torvalds 2005-04-16  398  	convert_to_wide(pdc_result);
^1da177e4c3f415 Linus Torvalds 2005-04-16  399  	*actcnt = pdc_result[0];
^1da177e4c3f415 Linus Torvalds 2005-04-16  400  	memcpy(iodc_data, pdc_result2, iodc_data_size);
09690b18b7b9696 Kyle McMartin  2006-10-05  401  	spin_unlock_irqrestore(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  402  
^1da177e4c3f415 Linus Torvalds 2005-04-16  403  	return retval;
^1da177e4c3f415 Linus Torvalds 2005-04-16  404  }
^1da177e4c3f415 Linus Torvalds 2005-04-16  405  EXPORT_SYMBOL(pdc_iodc_read);
^1da177e4c3f415 Linus Torvalds 2005-04-16  406  
^1da177e4c3f415 Linus Torvalds 2005-04-16  407  /**
^1da177e4c3f415 Linus Torvalds 2005-04-16  408   * pdc_system_map_find_mods - Locate unarchitected modules.
^1da177e4c3f415 Linus Torvalds 2005-04-16  409   * @pdc_mod_info: Return buffer address.
^1da177e4c3f415 Linus Torvalds 2005-04-16  410   * @mod_path: pointer to dev path structure.
^1da177e4c3f415 Linus Torvalds 2005-04-16  411   * @mod_index: fixed address module index.
^1da177e4c3f415 Linus Torvalds 2005-04-16  412   *
^1da177e4c3f415 Linus Torvalds 2005-04-16  413   * To locate and identify modules which reside at fixed I/O addresses, which
^1da177e4c3f415 Linus Torvalds 2005-04-16  414   * do not self-identify via architected bus walks.
^1da177e4c3f415 Linus Torvalds 2005-04-16  415   */
^1da177e4c3f415 Linus Torvalds 2005-04-16  416  int pdc_system_map_find_mods(struct pdc_system_map_mod_info *pdc_mod_info,
^1da177e4c3f415 Linus Torvalds 2005-04-16  417  			     struct pdc_module_path *mod_path, long mod_index)
^1da177e4c3f415 Linus Torvalds 2005-04-16  418  {
^1da177e4c3f415 Linus Torvalds 2005-04-16  419  	int retval;
09690b18b7b9696 Kyle McMartin  2006-10-05  420  	unsigned long flags;
^1da177e4c3f415 Linus Torvalds 2005-04-16  421  
09690b18b7b9696 Kyle McMartin  2006-10-05  422  	spin_lock_irqsave(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  423  	retval = mem_pdc_call(PDC_SYSTEM_MAP, PDC_FIND_MODULE, __pa(pdc_result), 
^1da177e4c3f415 Linus Torvalds 2005-04-16  424  			      __pa(pdc_result2), mod_index);
^1da177e4c3f415 Linus Torvalds 2005-04-16  425  	convert_to_wide(pdc_result);
^1da177e4c3f415 Linus Torvalds 2005-04-16  426  	memcpy(pdc_mod_info, pdc_result, sizeof(*pdc_mod_info));
^1da177e4c3f415 Linus Torvalds 2005-04-16  427  	memcpy(mod_path, pdc_result2, sizeof(*mod_path));
09690b18b7b9696 Kyle McMartin  2006-10-05  428  	spin_unlock_irqrestore(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  429  
^1da177e4c3f415 Linus Torvalds 2005-04-16  430  	pdc_mod_info->mod_addr = f_extend(pdc_mod_info->mod_addr);
^1da177e4c3f415 Linus Torvalds 2005-04-16  431  	return retval;
^1da177e4c3f415 Linus Torvalds 2005-04-16  432  }
^1da177e4c3f415 Linus Torvalds 2005-04-16  433  
^1da177e4c3f415 Linus Torvalds 2005-04-16  434  /**
^1da177e4c3f415 Linus Torvalds 2005-04-16  435   * pdc_system_map_find_addrs - Retrieve additional address ranges.
^1da177e4c3f415 Linus Torvalds 2005-04-16  436   * @pdc_addr_info: Return buffer address.
^1da177e4c3f415 Linus Torvalds 2005-04-16  437   * @mod_index: Fixed address module index.
^1da177e4c3f415 Linus Torvalds 2005-04-16  438   * @addr_index: Address range index.
^1da177e4c3f415 Linus Torvalds 2005-04-16  439   * 
^1da177e4c3f415 Linus Torvalds 2005-04-16  440   * Retrieve additional information about subsequent address ranges for modules
^1da177e4c3f415 Linus Torvalds 2005-04-16  441   * with multiple address ranges.  
^1da177e4c3f415 Linus Torvalds 2005-04-16  442   */
^1da177e4c3f415 Linus Torvalds 2005-04-16  443  int pdc_system_map_find_addrs(struct pdc_system_map_addr_info *pdc_addr_info, 
^1da177e4c3f415 Linus Torvalds 2005-04-16  444  			      long mod_index, long addr_index)
^1da177e4c3f415 Linus Torvalds 2005-04-16  445  {
^1da177e4c3f415 Linus Torvalds 2005-04-16  446  	int retval;
09690b18b7b9696 Kyle McMartin  2006-10-05  447  	unsigned long flags;
^1da177e4c3f415 Linus Torvalds 2005-04-16  448  
09690b18b7b9696 Kyle McMartin  2006-10-05  449  	spin_lock_irqsave(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  450  	retval = mem_pdc_call(PDC_SYSTEM_MAP, PDC_FIND_ADDRESS, __pa(pdc_result),
^1da177e4c3f415 Linus Torvalds 2005-04-16  451  			      mod_index, addr_index);
^1da177e4c3f415 Linus Torvalds 2005-04-16  452  	convert_to_wide(pdc_result);
^1da177e4c3f415 Linus Torvalds 2005-04-16  453  	memcpy(pdc_addr_info, pdc_result, sizeof(*pdc_addr_info));
09690b18b7b9696 Kyle McMartin  2006-10-05  454  	spin_unlock_irqrestore(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  455  
^1da177e4c3f415 Linus Torvalds 2005-04-16  456  	pdc_addr_info->mod_addr = f_extend(pdc_addr_info->mod_addr);
^1da177e4c3f415 Linus Torvalds 2005-04-16  457  	return retval;
^1da177e4c3f415 Linus Torvalds 2005-04-16  458  }
^1da177e4c3f415 Linus Torvalds 2005-04-16  459  
^1da177e4c3f415 Linus Torvalds 2005-04-16  460  /**
^1da177e4c3f415 Linus Torvalds 2005-04-16  461   * pdc_model_info - Return model information about the processor.
^1da177e4c3f415 Linus Torvalds 2005-04-16  462   * @model: The return buffer.
^1da177e4c3f415 Linus Torvalds 2005-04-16  463   *
^1da177e4c3f415 Linus Torvalds 2005-04-16  464   * Returns the version numbers, identifiers, and capabilities from the processor module.
^1da177e4c3f415 Linus Torvalds 2005-04-16  465   */
^1da177e4c3f415 Linus Torvalds 2005-04-16  466  int pdc_model_info(struct pdc_model *model) 
^1da177e4c3f415 Linus Torvalds 2005-04-16  467  {
^1da177e4c3f415 Linus Torvalds 2005-04-16  468  	int retval;
09690b18b7b9696 Kyle McMartin  2006-10-05  469  	unsigned long flags;
^1da177e4c3f415 Linus Torvalds 2005-04-16  470  
09690b18b7b9696 Kyle McMartin  2006-10-05  471  	spin_lock_irqsave(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  472  	retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_INFO, __pa(pdc_result), 0);
^1da177e4c3f415 Linus Torvalds 2005-04-16  473  	convert_to_wide(pdc_result);
^1da177e4c3f415 Linus Torvalds 2005-04-16  474  	memcpy(model, pdc_result, sizeof(*model));
09690b18b7b9696 Kyle McMartin  2006-10-05  475  	spin_unlock_irqrestore(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  476  
^1da177e4c3f415 Linus Torvalds 2005-04-16  477  	return retval;
^1da177e4c3f415 Linus Torvalds 2005-04-16  478  }
^1da177e4c3f415 Linus Torvalds 2005-04-16  479  
^1da177e4c3f415 Linus Torvalds 2005-04-16  480  /**
^1da177e4c3f415 Linus Torvalds 2005-04-16  481   * pdc_model_sysmodel - Get the system model name.
^1da177e4c3f415 Linus Torvalds 2005-04-16  482   * @name: A char array of at least 81 characters.
^1da177e4c3f415 Linus Torvalds 2005-04-16  483   *
ec1fdc24c2ae012 Kyle McMartin  2006-06-21  484   * Get system model name from PDC ROM (e.g. 9000/715 or 9000/778/B160L).
ec1fdc24c2ae012 Kyle McMartin  2006-06-21  485   * Using OS_ID_HPUX will return the equivalent of the 'modelname' command
ec1fdc24c2ae012 Kyle McMartin  2006-06-21  486   * on HP/UX.
^1da177e4c3f415 Linus Torvalds 2005-04-16  487   */
^1da177e4c3f415 Linus Torvalds 2005-04-16  488  int pdc_model_sysmodel(char *name)
^1da177e4c3f415 Linus Torvalds 2005-04-16  489  {
^1da177e4c3f415 Linus Torvalds 2005-04-16  490          int retval;
09690b18b7b9696 Kyle McMartin  2006-10-05  491  	unsigned long flags;
^1da177e4c3f415 Linus Torvalds 2005-04-16  492  
09690b18b7b9696 Kyle McMartin  2006-10-05  493          spin_lock_irqsave(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  494          retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_SYSMODEL, __pa(pdc_result),
^1da177e4c3f415 Linus Torvalds 2005-04-16  495                                OS_ID_HPUX, __pa(name));
^1da177e4c3f415 Linus Torvalds 2005-04-16  496          convert_to_wide(pdc_result);
^1da177e4c3f415 Linus Torvalds 2005-04-16  497  
^1da177e4c3f415 Linus Torvalds 2005-04-16  498          if (retval == PDC_OK) {
^1da177e4c3f415 Linus Torvalds 2005-04-16  499                  name[pdc_result[0]] = '\0'; /* add trailing '\0' */
^1da177e4c3f415 Linus Torvalds 2005-04-16  500          } else {
^1da177e4c3f415 Linus Torvalds 2005-04-16  501                  name[0] = 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16  502          }
09690b18b7b9696 Kyle McMartin  2006-10-05  503          spin_unlock_irqrestore(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  504  
^1da177e4c3f415 Linus Torvalds 2005-04-16  505          return retval;
^1da177e4c3f415 Linus Torvalds 2005-04-16  506  }
^1da177e4c3f415 Linus Torvalds 2005-04-16  507  
^1da177e4c3f415 Linus Torvalds 2005-04-16  508  /**
^1da177e4c3f415 Linus Torvalds 2005-04-16  509   * pdc_model_versions - Identify the version number of each processor.
^1da177e4c3f415 Linus Torvalds 2005-04-16  510   * @cpu_id: The return buffer.
^1da177e4c3f415 Linus Torvalds 2005-04-16  511   * @id: The id of the processor to check.
^1da177e4c3f415 Linus Torvalds 2005-04-16  512   *
^1da177e4c3f415 Linus Torvalds 2005-04-16  513   * Returns the version number for each processor component.
^1da177e4c3f415 Linus Torvalds 2005-04-16  514   *
^1da177e4c3f415 Linus Torvalds 2005-04-16  515   * This comment was here before, but I do not know what it means :( -RB
^1da177e4c3f415 Linus Torvalds 2005-04-16  516   * id: 0 = cpu revision, 1 = boot-rom-version
^1da177e4c3f415 Linus Torvalds 2005-04-16  517   */
^1da177e4c3f415 Linus Torvalds 2005-04-16  518  int pdc_model_versions(unsigned long *versions, int id)
^1da177e4c3f415 Linus Torvalds 2005-04-16 @519  {
^1da177e4c3f415 Linus Torvalds 2005-04-16  520          int retval;
09690b18b7b9696 Kyle McMartin  2006-10-05  521  	unsigned long flags;
^1da177e4c3f415 Linus Torvalds 2005-04-16  522  
09690b18b7b9696 Kyle McMartin  2006-10-05  523          spin_lock_irqsave(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  524          retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_VERSIONS, __pa(pdc_result), id);
^1da177e4c3f415 Linus Torvalds 2005-04-16  525          convert_to_wide(pdc_result);
^1da177e4c3f415 Linus Torvalds 2005-04-16  526          *versions = pdc_result[0];
09690b18b7b9696 Kyle McMartin  2006-10-05  527          spin_unlock_irqrestore(&pdc_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16  528  
^1da177e4c3f415 Linus Torvalds 2005-04-16  529          return retval;
^1da177e4c3f415 Linus Torvalds 2005-04-16  530  }
^1da177e4c3f415 Linus Torvalds 2005-04-16  531  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux