From: Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: <dougthompson@xmission.com>, <m.chehab@samsung.com>,
<linux-edac@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V3] edac, amd64_edac: Modify usage of amd64_read_dct_pci_cfg()
Date: Tue, 9 Sep 2014 09:37:21 -0500 [thread overview]
Message-ID: <540F10A1.2030601@amd.com> (raw)
In-Reply-To: <20140909114250.GA30662@nazgul.tnic>
On 9/9/2014 6:42 AM, Borislav Petkov wrote:
> On Tue, Sep 02, 2014 at 12:45:57PM -0500, Aravind Gopalakrishnan wrote:
>> @@ -495,15 +493,56 @@ int __amd64_read_pci_cfg_dword(struct pci_dev *pdev, int offset,
>> u32 *val, const char *func);
>> int __amd64_write_pci_cfg_dword(struct pci_dev *pdev, int offset,
>> u32 val, const char *func);
>> -
>> +void f15h_select_dct(struct amd64_pvt *pvt, u8 dct);
>> #define amd64_read_pci_cfg(pdev, offset, val) \
>> __amd64_read_pci_cfg_dword(pdev, offset, val, __func__)
>>
>> #define amd64_write_pci_cfg(pdev, offset, val) \
>> __amd64_write_pci_cfg_dword(pdev, offset, val, __func__)
>>
>> -#define amd64_read_dct_pci_cfg(pvt, offset, val) \
>> - pvt->ops->read_dct_pci_cfg(pvt, offset, val, __func__)
>> +/*
>> + * Depending on the family, F2 DCT reads need special handling:
>> + *
>> + * K8: has a single DCT only and no address offsets >= 0x100
>> + *
>> + * F10h: each DCT has its own set of regs
>> + * DCT0 -> F2x040..
>> + * DCT1 -> F2x140..
>> + *
>> + * F16h: has only 1 DCT
>> + *
>> + * For all above families, we should use the 'raw' version
>> + * i.e, amd64_read_pci_cfg() function
>> + */
>> +static inline int amd64_read_dct_pci_cfg(struct amd64_pvt *pvt, u8 dct,
>> + int offset, u32 *val)
> Why is this function in the header since it is being used only in
> amd64_edac.c, AFAICT?
>
> This makes you export f15h_select_dct() too, for no apparent reason.
>
Hmm. Yeah, no particular reason. The earlier macro was here so I think I
just expanded it as an inline function here..
I shall move it to amd64_edac.c and resend.
Thanks,
-Aravind.
prev parent reply other threads:[~2014-09-09 15:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-02 17:45 [PATCH V3] edac, amd64_edac: Modify usage of amd64_read_dct_pci_cfg() Aravind Gopalakrishnan
2014-09-09 11:42 ` Borislav Petkov
2014-09-09 14:37 ` Aravind Gopalakrishnan [this message]
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=540F10A1.2030601@amd.com \
--to=aravind.gopalakrishnan@amd.com \
--cc=bp@alien8.de \
--cc=dougthompson@xmission.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.chehab@samsung.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