linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Daniel Lezcano <daniel.lezcano@linaro.org>,
	Zhang Rui <rui.zhang@intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Daniel Lezcano <daniel.lezcano@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: linux-next: manual merge of the thermal tree with the pm tree
Date: Thu, 5 Jan 2023 10:03:02 +1100	[thread overview]
Message-ID: <20230105100302.00b1c5cd@canb.auug.org.au> (raw)

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

Hi all,

Today's linux-next merge of the thermal tree got a conflict in:

  drivers/thermal/intel/int340x_thermal/processor_thermal_device.c

between commit:

  d91a4714e54e ("thermal/int340x/processor_thermal: Use Intel TCC library")

from the pm tree and commit:

  e503a68ebfe3 ("thermal/intel/int340x: Replace parameter to simplify")

from the thermal tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/thermal/intel/int340x_thermal/processor_thermal_device.c
index a2ea22f2bffd,317703027ce9..000000000000
--- a/drivers/thermal/intel/int340x_thermal/processor_thermal_device.c
+++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_device.c
@@@ -118,22 -174,39 +118,18 @@@ static int proc_thermal_get_zone_temp(s
  	*temp = 0;
  
  	for_each_online_cpu(cpu) {
 -		err = rdmsr_safe_on_cpu(cpu, MSR_IA32_THERM_STATUS, &eax,
 -					&edx);
 -		if (err)
 -			goto err_ret;
 -		else {
 -			if (eax & 0x80000000) {
 -				curr_temp_off = (eax >> 16) & 0x7f;
 -				if (!*temp || curr_temp_off < *temp)
 -					*temp = curr_temp_off;
 -			} else {
 -				err = -EINVAL;
 -				goto err_ret;
 -			}
 -		}
 +		curr_temp = intel_tcc_get_temp(cpu, false);
 +		if (curr_temp < 0)
 +			return curr_temp;
 +		if (!*temp || curr_temp > *temp)
 +			*temp = curr_temp;
  	}
  
 -	return 0;
 -err_ret:
 -	return err;
 -}
 -
 -static int proc_thermal_get_zone_temp(struct thermal_zone_device *zone,
 -					 int *temp)
 -{
 -	int ret;
 -
 -	ret = read_temp_msr(temp);
 -	if (!ret)
 -		*temp = (stored_tjmax - *temp) * 1000;
 +	*temp *= 1000;
  
 -	return ret;
 +	return 0;
  }
  
- static struct thermal_zone_device_ops proc_thermal_local_ops = {
- 	.get_temp       = proc_thermal_get_zone_temp,
- };
- 
  static int proc_thermal_read_ppcc(struct proc_thermal_device *proc_priv)
  {
  	int i;
@@@ -225,11 -298,12 +221,11 @@@ int proc_thermal_add(struct device *dev
  	status = acpi_evaluate_integer(adev->handle, "_TMP", NULL, &tmp);
  	if (ACPI_FAILURE(status)) {
  		/* there is no _TMP method, add local method */
 -		stored_tjmax = get_tjmax();
 -		if (stored_tjmax > 0)
 +		if (intel_tcc_get_tjmax(-1) > 0)
- 			ops = &proc_thermal_local_ops;
+ 			get_temp = proc_thermal_get_zone_temp;
  	}
  
- 	proc_priv->int340x_zone = int340x_thermal_zone_add(adev, ops);
+ 	proc_priv->int340x_zone = int340x_thermal_zone_add(adev, get_temp);
  	if (IS_ERR(proc_priv->int340x_zone)) {
  		return PTR_ERR(proc_priv->int340x_zone);
  	} else

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2023-01-04 23:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04 23:03 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-01-01 23:09 linux-next: manual merge of the thermal tree with the pm tree Stephen Rothwell
2023-04-06  0:32 Stephen Rothwell
2023-01-24 22:45 Stephen Rothwell
2023-01-25 11:57 ` Wysocki, Rafael J
2023-01-24 22:39 Stephen Rothwell
2023-01-25 11:57 ` Wysocki, Rafael J
2023-01-04 23:10 Stephen Rothwell
2023-01-04 23:35 ` Stephen Rothwell
2023-01-05 14:27   ` Wysocki, Rafael J
2023-01-05 15:30     ` Daniel Lezcano
2023-01-05 20:13       ` Wysocki, Rafael J
2022-11-17  1:29 Stephen Rothwell
2022-11-17 16:18 ` Rafael J. Wysocki
2022-11-27 23:22 ` Stephen Rothwell
2022-11-28 12:51   ` Rafael J. Wysocki
2022-11-28 13:22     ` Daniel Lezcano
2022-11-28 13:48       ` Bagas Sanjaya
2022-11-28 13:54         ` Rafael J. Wysocki
2022-11-28 13:56         ` Daniel Lezcano
2022-11-29 14:32           ` Geert Uytterhoeven
2014-10-10  1:10 Stephen Rothwell
2014-10-10  8:40 ` Zhang Rui
2014-01-06  3:14 Stephen Rothwell

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=20230105100302.00b1c5cd@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=daniel.lezcano@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.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;
as well as URLs for NNTP newsgroup(s).