All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
Cc: Borislav Petkov <bp@alien8.de>,
	jdelvare@suse.de, linux@roeck-us.net, rdunlap@infradead.org,
	bhelgaas@google.com, lm-sensors@lm-sensors.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH] hwmon, k10temp: Add support for AMD F15h M60h processor
Date: Mon, 14 Jul 2014 22:21:51 +0200	[thread overview]
Message-ID: <53C43BDF.2070403@ladisch.de> (raw)
In-Reply-To: <20140714195128.GA25124@pd.tnic>

Borislav Petkov wrote:
> On Mon, Jul 14, 2014 at 03:23:08PM -0500, Aravind Gopalakrishnan wrote:
>> +	if (boot_cpu_data.x86 == 0x15 && boot_cpu_data.x86_model == 0x60) {
>> +		pci_bus_write_config_dword(pdev->bus, PCI_DEVFN(0, 0),
>> +					   NB_SMU_IND_ADDR, IND_ADDR_OFFSET);
>> +		pci_bus_read_config_dword(pdev->bus, PCI_DEVFN(0, 0),
>> +					  NB_SMU_IND_DATA, &regval);

How do you prevent races with any other code that accesses some indirect
register?

>> +
>> +	} else
>> +		pci_read_config_dword(pdev, REG_REPORTED_TEMPERATURE, &regval);

Why the empty line?  Also, use braces in both branches.


Regards,
Clemens

WARNING: multiple messages have this Message-ID (diff)
From: Clemens Ladisch <clemens@ladisch.de>
To: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
Cc: Borislav Petkov <bp@alien8.de>,
	jdelvare@suse.de, linux@roeck-us.net, rdunlap@infradead.org,
	bhelgaas@google.com, lm-sensors@lm-sensors.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] hwmon, k10temp: Add support for AMD F15h M60h processor
Date: Mon, 14 Jul 2014 20:21:51 +0000	[thread overview]
Message-ID: <53C43BDF.2070403@ladisch.de> (raw)
In-Reply-To: <20140714195128.GA25124@pd.tnic>

Borislav Petkov wrote:
> On Mon, Jul 14, 2014 at 03:23:08PM -0500, Aravind Gopalakrishnan wrote:
>> +	if (boot_cpu_data.x86 = 0x15 && boot_cpu_data.x86_model = 0x60) {
>> +		pci_bus_write_config_dword(pdev->bus, PCI_DEVFN(0, 0),
>> +					   NB_SMU_IND_ADDR, IND_ADDR_OFFSET);
>> +		pci_bus_read_config_dword(pdev->bus, PCI_DEVFN(0, 0),
>> +					  NB_SMU_IND_DATA, &regval);

How do you prevent races with any other code that accesses some indirect
register?

>> +
>> +	} else
>> +		pci_read_config_dword(pdev, REG_REPORTED_TEMPERATURE, &regval);

Why the empty line?  Also, use braces in both branches.


Regards,
Clemens

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  parent reply	other threads:[~2014-07-14 20:22 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-14 20:23 [PATCH] hwmon, k10temp: Add support for AMD F15h M60h processor Aravind Gopalakrishnan
2014-07-14 20:23 ` [lm-sensors] " Aravind Gopalakrishnan
2014-07-14 19:51 ` Borislav Petkov
2014-07-14 19:51   ` [lm-sensors] " Borislav Petkov
2014-07-14 19:59   ` Aravind Gopalakrishnan
2014-07-14 19:59     ` [lm-sensors] " Aravind Gopalakrishnan
2014-07-14 20:06     ` Guenter Roeck
2014-07-14 20:06       ` [lm-sensors] " Guenter Roeck
2014-07-14 20:21   ` Clemens Ladisch [this message]
2014-07-14 20:21     ` Clemens Ladisch
2014-07-14 20:33     ` Guenter Roeck
2014-07-14 20:33       ` [lm-sensors] " Guenter Roeck
2014-07-15  7:41       ` Clemens Ladisch
2014-07-15  7:41         ` [lm-sensors] " Clemens Ladisch
2014-07-15  9:03         ` Guenter Roeck
2014-07-15  9:03           ` [lm-sensors] " Guenter Roeck
2014-07-17 15:22           ` Aravind Gopalakrishnan
2014-07-17 15:22             ` [lm-sensors] " Aravind Gopalakrishnan
2014-07-17 16:02             ` Clemens Ladisch
2014-07-17 16:02               ` [lm-sensors] " Clemens Ladisch
  -- strict thread matches above, loose matches on Subject: below --
2014-03-11 21:25 [lm-sensors] [PATCH] hwmon, k10temp: Add support for AMD F16 M30h processor Aravind Gopalakrishnan
2014-03-11 21:25 ` Aravind Gopalakrishnan
2014-03-12  3:06 ` [lm-sensors] " Guenter Roeck
2014-03-12  3:06   ` Guenter Roeck
2014-03-12  9:25   ` [lm-sensors] " Jean Delvare
2014-03-12  9:25     ` Jean Delvare
2014-03-12 14:34     ` [lm-sensors] " Aravind Gopalakrishnan
2014-03-12 14:34       ` Aravind Gopalakrishnan

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=53C43BDF.2070403@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=jdelvare@suse.de \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lm-sensors@lm-sensors.org \
    --cc=rdunlap@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.