linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Kuehling <felix.kuehling@amd.com>
To: Randy Dunlap <rdunlap@infradead.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Alex Deucher <alexdeucher@gmail.com>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>,
	KVM list <kvm@vger.kernel.org>,
	Network Development <netdev@vger.kernel.org>,
	linux-um <linux-um@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	amd-gfx list <amd-gfx@lists.freedesktop.org>,
	"open list:BROADCOM NVRAM DRIVER" <linux-mips@vger.kernel.org>,
	Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>,
	sparclinux <sparclinux@vger.kernel.org>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	"Tobin C. Harding" <me@tobin.cc>
Subject: Re: Build regressions/improvements in v5.17-rc1
Date: Mon, 24 Jan 2022 20:23:56 -0500	[thread overview]
Message-ID: <500a3aa0-f51e-92ac-82d6-7ffc7f603e2c@amd.com> (raw)
In-Reply-To: <aca104cf-5f5f-b696-754a-35e62dbe64c3@infradead.org>


Am 2022-01-24 um 14:11 schrieb Randy Dunlap:
> On 1/24/22 10:55, Geert Uytterhoeven wrote:
>> Hi Alex,
>>
>> On Mon, Jan 24, 2022 at 7:52 PM Alex Deucher <alexdeucher@gmail.com> wrote:
>>> On Mon, Jan 24, 2022 at 5:25 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>>>> On Sun, 23 Jan 2022, Geert Uytterhoeven wrote:
>>>>>   + /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c: error: control reaches end of non-void function [-Werror=return-type]:  => 1560:1
>>> I don't really see what's going on here:
>>>
>>> #ifdef CONFIG_X86_64
>>> return cpu_data(first_cpu_of_numa_node).apicid;
>>> #else
>>> return first_cpu_of_numa_node;
>>> #endif
>> Ah, the actual failure causing this was not included:
>>
>> In file included from /kisskb/src/arch/x86/um/asm/processor.h:41:0,
>>                   from /kisskb/src/include/linux/mutex.h:19,
>>                   from /kisskb/src/include/linux/kernfs.h:11,
>>                   from /kisskb/src/include/linux/sysfs.h:16,
>>                   from /kisskb/src/include/linux/kobject.h:20,
>>                   from /kisskb/src/include/linux/pci.h:35,
>>                   from
>> /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:25:
>> /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c: In
>> function 'kfd_cpumask_to_apic_id':
>> /kisskb/src/arch/um/include/asm/processor-generic.h:103:18: error:
>> called object is not a function or function pointer
>>   #define cpu_data (&boot_cpu_data)
>>                    ^
>> /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1556:9:
>> note: in expansion of macro 'cpu_data'
>>    return cpu_data(first_cpu_of_numa_node).apicid;
>>           ^
>> /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1560:1:
>> error: control reaches end of non-void function [-Werror=return-type]
>>   }
>>   ^
> ah yes, UML.
> I have a bunch of UML fixes that I have been hesitant to post.
>
> This is one of them.
> What do people think about this?

Does it make sense to configure a UML kernel with a real device driver 
in the first place? Or should we just prevent enabling amdgpu for UML 
with a Kconfig dependency?

Regards,
   Felix


>
> thanks.
>
> ---
> From: Randy Dunlap <rdunlap@infradead.org>
>
>
> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1556:9: note: in expansion of macro ‘cpu_data’
>    return cpu_data(first_cpu_of_numa_node).apicid;
>           ^~~~~~~~
> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1560:1: error: control reaches end of non-void function [-Werror=return-type]
>
> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c: In function ‘kfd_fill_iolink_info_for_cpu’:
> ../arch/um/include/asm/processor-generic.h:103:19: error: called object is not a function or function pointer
>   #define cpu_data (&boot_cpu_data)
>                    ~^~~~~~~~~~~~~~~
> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1688:27: note: in expansion of macro ‘cpu_data’
>    struct cpuinfo_x86 *c = &cpu_data(0);
>                             ^~~~~~~~
> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1691:7: error: dereferencing pointer to incomplete type ‘struct cpuinfo_x86’
>    if (c->x86_vendor == X86_VENDOR_AMD)
>         ^~
> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1691:23: error: ‘X86_VENDOR_AMD’ undeclared (first use in this function); did you mean ‘X86_VENDOR_ANY’?
>    if (c->x86_vendor == X86_VENDOR_AMD)
>                         ^~~~~~~~~~~~~~
>                         X86_VENDOR_ANY
>
> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c: In function ‘kfd_create_vcrat_image_cpu’:
> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1742:11: warning: unused variable ‘entries’ [-Wunused-variable]
>    uint32_t entries = 0;
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> ---
>   drivers/gpu/drm/amd/amdkfd/kfd_crat.c     |    6 +++---
>   drivers/gpu/drm/amd/amdkfd/kfd_topology.c |    2 +-
>   2 files changed, 4 insertions(+), 4 deletions(-)
>
> --- linux-next-20220107.orig/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> +++ linux-next-20220107/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> @@ -1552,7 +1552,7 @@ static int kfd_cpumask_to_apic_id(const
>   	first_cpu_of_numa_node = cpumask_first(cpumask);
>   	if (first_cpu_of_numa_node >= nr_cpu_ids)
>   		return -1;
> -#ifdef CONFIG_X86_64
> +#if defined(CONFIG_X86_64) && !defined(CONFIG_UML)
>   	return cpu_data(first_cpu_of_numa_node).apicid;
>   #else
>   	return first_cpu_of_numa_node;
> --- linux-next-20220107.orig/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
> +++ linux-next-20220107/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
> @@ -1679,7 +1679,7 @@ static int kfd_fill_mem_info_for_cpu(int
>   	return 0;
>   }
>   
> -#ifdef CONFIG_X86_64
> +#if defined(CONFIG_X86_64) && !defined(CONFIG_UML)
>   static int kfd_fill_iolink_info_for_cpu(int numa_node_id, int *avail_size,
>   				uint32_t *num_entries,
>   				struct crat_subtype_iolink *sub_type_hdr)
> @@ -1738,7 +1738,7 @@ static int kfd_create_vcrat_image_cpu(vo
>   	struct crat_subtype_generic *sub_type_hdr;
>   	int avail_size = *size;
>   	int numa_node_id;
> -#ifdef CONFIG_X86_64
> +#if defined(CONFIG_X86_64) && !defined(CONFIG_UML)
>   	uint32_t entries = 0;
>   #endif
>   	int ret = 0;
> @@ -1803,7 +1803,7 @@ static int kfd_create_vcrat_image_cpu(vo
>   			sub_type_hdr->length);
>   
>   		/* Fill in Subtype: IO Link */
> -#ifdef CONFIG_X86_64
> +#if defined(CONFIG_X86_64) && !defined(CONFIG_UML)
>   		ret = kfd_fill_iolink_info_for_cpu(numa_node_id, &avail_size,
>   				&entries,
>   				(struct crat_subtype_iolink *)sub_type_hdr);
>
>

  reply	other threads:[~2022-01-25  2:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220123125737.2658758-1-geert@linux-m68k.org>
2022-01-24  7:55 ` Build regressions/improvements in v5.17-rc1 Geert Uytterhoeven
2022-01-24 17:04   ` Jakub Kicinski
2022-01-24 17:23     ` Jakub Kicinski
2022-01-24 18:51   ` Alex Deucher
2022-01-24 18:55     ` Geert Uytterhoeven
2022-01-24 19:11       ` Randy Dunlap
2022-01-25  1:23         ` Felix Kuehling [this message]
2022-01-25  1:29           ` Randy Dunlap
2022-01-25 12:56   ` D, Lakshmi Sowjanya
2022-01-25 14:20   ` Thomas Bogendoerfer

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=500a3aa0-f51e-92ac-82d6-7ffc7f603e2c@amd.com \
    --to=felix.kuehling@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=kvm@vger.kernel.org \
    --cc=lakshmi.sowjanya.d@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=me@tobin.cc \
    --cc=netdev@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=sparclinux@vger.kernel.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 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).