mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Ross Zwisler <zwisler@google.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	Duncan Laurie <dlaurie@chromium.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Eduardo Valentin <edubezval@gmail.com>,
	Zhang Rui <rui.zhang@intel.com>,
	linux-pm@vger.kernel.org, Ross Zwisler <zwisler@google.com>
Subject: Re: [PATCH 2/2] gsmi: Log event for critical thermal thresholds
Date: Tue, 30 Oct 2018 11:14:44 +0800	[thread overview]
Message-ID: <201810301132.DIuNAVYy%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181022203218.7007-2-zwisler@google.com>

[-- Attachment #1: Type: text/plain, Size: 7399 bytes --]

Hi Duncan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on soc-thermal/next]
[also build test ERROR on v4.19]
[cannot apply to next-20181029]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Ross-Zwisler/thermal-Add-notifier-call-chain-for-hot-critical-events/20181023-043806
base:   https://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git next
config: i386-randconfig-k0-10291547 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/firmware/google/gsmi.o: In function `gsmi_exit':
>> drivers/firmware/google/gsmi.c:936: undefined reference to `unregister_thermal_notifier'
   drivers/firmware/google/gsmi.o: In function `gsmi_init':
>> drivers/firmware/google/gsmi.c:909: undefined reference to `register_thermal_notifier'

vim +936 drivers/firmware/google/gsmi.c

   787	
   788	static __init int gsmi_init(void)
   789	{
   790		unsigned long flags;
   791		int ret;
   792	
   793		ret = gsmi_system_valid();
   794		if (ret)
   795			return ret;
   796	
   797		gsmi_dev.smi_cmd = acpi_gbl_FADT.smi_command;
   798	
   799		/* register device */
   800		gsmi_dev.pdev = platform_device_register_full(&gsmi_dev_info);
   801		if (IS_ERR(gsmi_dev.pdev)) {
   802			printk(KERN_ERR "gsmi: unable to register platform device\n");
   803			return PTR_ERR(gsmi_dev.pdev);
   804		}
   805	
   806		/* SMI access needs to be serialized */
   807		spin_lock_init(&gsmi_dev.lock);
   808	
   809		ret = -ENOMEM;
   810		gsmi_dev.dma_pool = dma_pool_create("gsmi", &gsmi_dev.pdev->dev,
   811						     GSMI_BUF_SIZE, GSMI_BUF_ALIGN, 0);
   812		if (!gsmi_dev.dma_pool)
   813			goto out_err;
   814	
   815		/*
   816		 * pre-allocate buffers because sometimes we are called when
   817		 * this is not feasible: oops, panic, die, mce, etc
   818		 */
   819		gsmi_dev.name_buf = gsmi_buf_alloc();
   820		if (!gsmi_dev.name_buf) {
   821			printk(KERN_ERR "gsmi: failed to allocate name buffer\n");
   822			goto out_err;
   823		}
   824	
   825		gsmi_dev.data_buf = gsmi_buf_alloc();
   826		if (!gsmi_dev.data_buf) {
   827			printk(KERN_ERR "gsmi: failed to allocate data buffer\n");
   828			goto out_err;
   829		}
   830	
   831		gsmi_dev.param_buf = gsmi_buf_alloc();
   832		if (!gsmi_dev.param_buf) {
   833			printk(KERN_ERR "gsmi: failed to allocate param buffer\n");
   834			goto out_err;
   835		}
   836	
   837		/*
   838		 * Determine type of handshake used to serialize the SMI
   839		 * entry. See also gsmi_exec().
   840		 *
   841		 * There's a "behavior" present on some chipsets where writing the
   842		 * SMI trigger register in the southbridge doesn't result in an
   843		 * immediate SMI. Rather, the processor can execute "a few" more
   844		 * instructions before the SMI takes effect. To ensure synchronous
   845		 * behavior, implement a handshake between the kernel driver and the
   846		 * firmware handler to spin until released. This ioctl determines
   847		 * the type of handshake.
   848		 *
   849		 * NONE: The firmware handler does not implement any
   850		 * handshake. Either it doesn't need to, or it's legacy firmware
   851		 * that doesn't know it needs to and never will.
   852		 *
   853		 * CF: The firmware handler will clear the CF in the saved
   854		 * state before returning. The driver may set the CF and test for
   855		 * it to clear before proceeding.
   856		 *
   857		 * SPIN: The firmware handler does not implement any handshake
   858		 * but the driver should spin for a hundred or so microseconds
   859		 * to ensure the SMI has triggered.
   860		 *
   861		 * Finally, the handler will return -ENOSYS if
   862		 * GSMI_CMD_HANDSHAKE_TYPE is unimplemented, which implies
   863		 * HANDSHAKE_NONE.
   864		 */
   865		spin_lock_irqsave(&gsmi_dev.lock, flags);
   866		gsmi_dev.handshake_type = GSMI_HANDSHAKE_SPIN;
   867		gsmi_dev.handshake_type =
   868		    gsmi_exec(GSMI_CALLBACK, GSMI_CMD_HANDSHAKE_TYPE);
   869		if (gsmi_dev.handshake_type == -ENOSYS)
   870			gsmi_dev.handshake_type = GSMI_HANDSHAKE_NONE;
   871		spin_unlock_irqrestore(&gsmi_dev.lock, flags);
   872	
   873		/* Remove and clean up gsmi if the handshake could not complete. */
   874		if (gsmi_dev.handshake_type == -ENXIO) {
   875			printk(KERN_INFO "gsmi version " DRIVER_VERSION
   876			       " failed to load\n");
   877			ret = -ENODEV;
   878			goto out_err;
   879		}
   880	
   881		/* Register in the firmware directory */
   882		ret = -ENOMEM;
   883		gsmi_kobj = kobject_create_and_add("gsmi", firmware_kobj);
   884		if (!gsmi_kobj) {
   885			printk(KERN_INFO "gsmi: Failed to create firmware kobj\n");
   886			goto out_err;
   887		}
   888	
   889		/* Setup eventlog access */
   890		ret = sysfs_create_bin_file(gsmi_kobj, &eventlog_bin_attr);
   891		if (ret) {
   892			printk(KERN_INFO "gsmi: Failed to setup eventlog");
   893			goto out_err;
   894		}
   895	
   896		/* Other attributes */
   897		ret = sysfs_create_files(gsmi_kobj, gsmi_attrs);
   898		if (ret) {
   899			printk(KERN_INFO "gsmi: Failed to add attrs");
   900			goto out_remove_bin_file;
   901		}
   902	
   903		ret = efivars_register(&efivars, &efivar_ops, gsmi_kobj);
   904		if (ret) {
   905			printk(KERN_INFO "gsmi: Failed to register efivars\n");
   906			goto out_remove_sysfs_files;
   907		}
   908	
 > 909		register_thermal_notifier(&gsmi_thermal_notifier);
   910		register_reboot_notifier(&gsmi_reboot_notifier);
   911		register_die_notifier(&gsmi_die_notifier);
   912		atomic_notifier_chain_register(&panic_notifier_list,
   913					       &gsmi_panic_notifier);
   914	
   915		printk(KERN_INFO "gsmi version " DRIVER_VERSION " loaded\n");
   916	
   917		return 0;
   918	
   919	out_remove_sysfs_files:
   920		sysfs_remove_files(gsmi_kobj, gsmi_attrs);
   921	out_remove_bin_file:
   922		sysfs_remove_bin_file(gsmi_kobj, &eventlog_bin_attr);
   923	out_err:
   924		kobject_put(gsmi_kobj);
   925		gsmi_buf_free(gsmi_dev.param_buf);
   926		gsmi_buf_free(gsmi_dev.data_buf);
   927		gsmi_buf_free(gsmi_dev.name_buf);
   928		dma_pool_destroy(gsmi_dev.dma_pool);
   929		platform_device_unregister(gsmi_dev.pdev);
   930		pr_info("gsmi: failed to load: %d\n", ret);
   931		return ret;
   932	}
   933	
   934	static void __exit gsmi_exit(void)
   935	{
 > 936		unregister_thermal_notifier(&gsmi_thermal_notifier);
   937		unregister_reboot_notifier(&gsmi_reboot_notifier);
   938		unregister_die_notifier(&gsmi_die_notifier);
   939		atomic_notifier_chain_unregister(&panic_notifier_list,
   940						 &gsmi_panic_notifier);
   941		efivars_unregister(&efivars);
   942	
   943		sysfs_remove_files(gsmi_kobj, gsmi_attrs);
   944		sysfs_remove_bin_file(gsmi_kobj, &eventlog_bin_attr);
   945		kobject_put(gsmi_kobj);
   946		gsmi_buf_free(gsmi_dev.param_buf);
   947		gsmi_buf_free(gsmi_dev.data_buf);
   948		gsmi_buf_free(gsmi_dev.name_buf);
   949		dma_pool_destroy(gsmi_dev.dma_pool);
   950		platform_device_unregister(gsmi_dev.pdev);
   951	}
   952	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29552 bytes --]

  reply	other threads:[~2018-10-30  3:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-22 20:32 [PATCH 1/2] thermal: Add notifier call chain for hot/critical events Ross Zwisler
2018-10-22 20:32 ` [PATCH 2/2] gsmi: Log event for critical thermal thresholds Ross Zwisler
2018-10-30  3:14   ` kbuild test robot [this message]
2018-10-22 22:08 ` [PATCH 1/2] thermal: Add notifier call chain for hot/critical events Tom Psyborg
2018-10-23  8:17 ` Daniel Lezcano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201810301132.DIuNAVYy%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=dlaurie@chromium.org \
    --cc=edubezval@gmail.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=zwisler@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®