[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 32/40] xen/mpu: implement MPU version of ioremap_xxx
- To: Penny Zheng <Penny.Zheng@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 13 Jan 2023 10:49:42 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IwfXkk+qTKlGw8HTM4dD2ubDPmrKmk+UOqeFoGLmFVA=; b=C//Lg72e+J5H3FG2EDqGFDj/waRKP26RP5+Qt+yvCW0kflovTA5pYHwfzIL+ta3jlf8zIiBBkI4ljlIETMFkpFjYieA5PzGp4oCIMRmqEykA1nGos8Z61PzDgOz44L8VVeApOa4KeD1exKdGFdE6H1VRECZDG6Jxf6iYUiNcKZQ1XkpfxGLsltz3HfBCKBhxFhd89n6yTaGUtEfqkLL2L1/zyXiF+SXqFcPwPKDggCrrrOAYKZMhLSLoYuUMNH25z3vOUxxQs3h4OwTYcjkHGUz5tiU4kBzNorksLSmy55C8SvFt4Gzss/PwpIyroTCFNJK8UaHoBkgRp9MDkJaxPw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bgxfBpqWOlP7kPPgJyxsSfXZXgMyDmwOoY4x+DXAEo9Yrcy/S8wzhxB5h+rOxyD1MFh3itQKmmWFhl0IP/XQLJk/OQhidZTrdXeTSMpvLBKGYpoP79MKLuHdplVaZvGu3kD+iZeymPPDvtk1sxKyu0CM2Ckdo6v4RjU4OMMb7Zt25UB+pwWxN/qd6ucvHmou1EJsTsMfvXDEXq0lXAQtQdi2W/Z33SeSoFKYdezqroPdmxdXk/3aM8FqA6+i+f/yamaJECVqDStgrF8in2mqz6sl50kmS9gT1wVTlBVTABUY//ysCd28tR9bZVj0RPdR3MrPp5L8UIIBF0fuoh0D/g==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: wei.chen@xxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Fri, 13 Jan 2023 09:49:50 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 13.01.2023 06:29, Penny Zheng wrote:
> --- a/xen/include/xen/vmap.h
> +++ b/xen/include/xen/vmap.h
> @@ -89,15 +89,27 @@ static inline void vfree(void *va)
> ASSERT_UNREACHABLE();
> }
>
> +#ifdef CONFIG_HAS_MPU
> +void __iomem *ioremap(paddr_t, size_t);
> +#else
> void __iomem *ioremap(paddr_t, size_t)
> {
> ASSERT_UNREACHABLE();
> return NULL;
> }
> +#endif
If, as per the comment on the earlier patch, a mere declaration isn't
sufficient, the earlier patch will need to make the stub static inline.
I'm actually surprised you didn't see a build failure from it not being
so. At the point here I then actually question why the stub function
isn't being dropped here again (assuming it needs putting in place at
all earlier on).
Furthermore, once you want a declaration for the function here as well,
I think it would be better to consolidate both declarations: It's
awkward to have to remember to update two instances, in case any
changes are necessary.
Jan
|