mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
	"Huang, Ying" <ying.huang@intel.com>,
	Nathan Chancellor <nathan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Len Brown <lenb@kernel.org>,
	Ho-Ren Chuang <horen.chuang@linux.dev>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel test robot <lkp@intel.com>,
	Dan Williams <dan.j.williams@intel.com>
Subject: Re: [PATCH] ACPI: HMAT: Mark hmat_set_default_dram_perf() as __init
Date: Fri, 12 Jul 2024 09:59:27 -0700	[thread overview]
Message-ID: <23ab3394-8862-4da5-97ee-1355d9a21e40@intel.com> (raw)
In-Reply-To: <CAJZ5v0gHHkFnJEf2CQ5Rmz9+_7u1EqBPiycuFL1huPJf9Pvc6Q@mail.gmail.com>



On 7/12/24 2:40 AM, Rafael J. Wysocki wrote:
> On Thu, Jul 11, 2024 at 8:56 AM Huang, Ying <ying.huang@intel.com> wrote:
>>
>> Nathan Chancellor <nathan@kernel.org> writes:
>>
>>> After commit 4dc70b711dbc ("memory tier: consolidate the initialization
>>> of memory tiers"), there is a modpost warning when
>>> hmat_set_default_dram_perf() is not inlined into its callsite, as it
>>> appears that default_dram_nodes may be accessed after its memory has
>>> been freed.
>>>
>>>   WARNING: modpost: vmlinux: section mismatch in reference: hmat_set_default_dram_perf+0x18 (section: .text) -> default_dram_nodes (section: .init.data)
>>>
>>> The single callsite, hmat_init(), is __init, so this warning is not a
>>> problem in reality but it is easily solvable by marking
>>> hmat_set_default_dram_perf() as __init, which should have been done when
>>> this function was added in commit 3718c02dbd4c ("acpi, hmat: calculate
>>> abstract distance with HMAT").
>>
>> Good catch!  Thanks for your fix!  If it's necessary, feel free to add
>>
>> Reviewed-by: "Huang, Ying" <ying.huang@intel.com>
> 
> Thanks for the patch and the review!
> 
> I'm expecting Dan/Dave to take care of it (or please let me know if
> I'm expected to pick it up).
> 
>>> Reported-by: kernel test robot <lkp@intel.com>
>>> Closes: https://lore.kernel.org/oe-kbuild-all/202406292310.hlRATeZJ-lkp@intel.com/
>>> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
>>> ---
>>> I left off a fixes tag as I assume this is going to be squashed into the
>>> former change mentioned above, as it is still in mm-unstable, but feel
>>> free to add one if the patch is going to be standalone.

Should this be picked up by Andrew instead since it's already in mm-unstable?

>>> ---
>>>  drivers/acpi/numa/hmat.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c
>>> index a2f9e7a4b479..ca0c0ea3e1ef 100644
>>> --- a/drivers/acpi/numa/hmat.c
>>> +++ b/drivers/acpi/numa/hmat.c
>>> @@ -933,7 +933,7 @@ static int hmat_callback(struct notifier_block *self,
>>>       return NOTIFY_OK;
>>>  }
>>>
>>> -static int hmat_set_default_dram_perf(void)
>>> +static __init int hmat_set_default_dram_perf(void)
>>>  {
>>>       int rc;
>>>       int nid, pxm;
>>>
>>> ---
>>> base-commit: 17bcc624e67da6383060ee24483db77aa17276aa
>>> change-id: 20240710-fix-modpost-warning-default_dram_nodes-38b6faffe3da
>>>
>>> Best regards,
>>
>> --
>> Best Regards,
>> Huang, Ying
>>

  reply	other threads:[~2024-07-12 16:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-10 16:29 Nathan Chancellor
2024-07-11  6:54 ` Huang, Ying
2024-07-12  9:40   ` Rafael J. Wysocki
2024-07-12 16:59     ` Dave Jiang [this message]
2024-07-12 17:25       ` Rafael J. Wysocki

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=23ab3394-8862-4da5-97ee-1355d9a21e40@intel.com \
    --to=dave.jiang@intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=horen.chuang@linux.dev \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=nathan@kernel.org \
    --cc=rafael@kernel.org \
    --cc=ying.huang@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

all inboxes | Powered by JetHome®