[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] [v2] x86: xen: add missing prototypes


  • To: Arnd Bergmann <arnd@xxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, x86@xxxxxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • Date: Tue, 23 May 2023 19:09:06 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.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=+qwBvZzx6z2ER5JvViHJG0G/iidDC76dmxZ2VENB0ME=; b=adcOjgBJiNBsBxv+04SWIsTmzbRX9irC/NnBkY5Jut4VBHoenkN9xvAARdcdIbpokb/z0VQ7Rk2D/ei9SqXLt3DR4uQDSTl2iVbnG2iCNMWJw+e6jDQFciBP92UK2FKHJWUcaxZ29QUzRvHu2WVg7RtezPOY62Ifv+v0lE2y6xbn/xkP0LsjA1MWBNYCOMk00XBLJSNF8/v5TJXkztW9CRxLumsOLRxXvVidmJtJEp6Z3YiiB3lfkG8wWiOhaWU3/fP7ciIYOL6VbsHlq9iVKjeRy/0FmCrd9Z9EegmtkLYPqU7kMhJtSJYQLYaabE2kuSJq2dc4HcmaJfksbs94zQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Girz8uPNQKjRrsInWgnJ1EQJOUknmipgTiTwpCEHrpcxRUOEGGLtJEt+AHcgxl68K9VQRcuUxCI5QYib4g+iXMj/OJzp2wAiGWd6WD3ySb6BdWMrmDD5tvBhLKxz4ZTx19sEpNT7Y71K7bUHLWViye9JljFmNEp5RMDu01bKVUnW8Nh/xCFFIscj9uPcbnfzKWiBimxZuTvYvej3CocPbMg6lpeOtQL5pOo6cOVf/CITYyo/lgmyiw6bVAjP53+jWbNKADS4YGlM7NbabbM66br1cc1/OIfDw3uWdMmIW+5PTS+RWWeTbS+Kjsr0fc0teP/QmSasPTRJKLyLKwZ9Gw==
  • Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
  • Delivery-date: Tue, 23 May 2023 23:10:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>



On 5/23/23 4:37 PM, Arnd Bergmann wrote:
On Sat, May 20, 2023, at 00:24, Boris Ostrovsky wrote:
On 5/19/23 5:28 AM, Arnd Bergmann wrote:

diff --git a/arch/x86/xen/smp.h b/arch/x86/xen/smp.h
index 22fb982ff971..81a7821dd07f 100644
--- a/arch/x86/xen/smp.h
+++ b/arch/x86/xen/smp.h
@@ -1,7 +1,11 @@
   /* SPDX-License-Identifier: GPL-2.0 */
   #ifndef _XEN_SMP_H
+void asm_cpu_bringup_and_idle(void);
+asmlinkage void cpu_bringup_and_idle(void);

These can go under CONFIG_SMP

Not sure if there is much point for the second one, since
it's only called from assembler, so the #else path is
never seen, but I can do that for consistency if you
like.

I generally prefer to avoid the extra #if checks
when there is no strict need for an empty stub.

Do we need the empty stubs? Neither of these should be referenced if !SMP (or 
more precisely if !CONFIG_XEN_PV_SMP)


I guess you also want me to add the empty stubs for the
other functions that only have a bit in #ifdef but not
#else then?

+void xen_force_evtchn_callback(void);

These ...

+pteval_t xen_pte_val(pte_t pte);
+pgdval_t xen_pgd_val(pgd_t pgd);
+pte_t xen_make_pte(pteval_t pte);
+pgd_t xen_make_pgd(pgdval_t pgd);
+pmdval_t xen_pmd_val(pmd_t pmd);
+pmd_t xen_make_pmd(pmdval_t pmd);
+pudval_t xen_pud_val(pud_t pud);
+pud_t xen_make_pud(pudval_t pud);
+p4dval_t xen_p4d_val(p4d_t p4d);
+p4d_t xen_make_p4d(p4dval_t p4d);
+pte_t xen_make_pte_init(pteval_t pte);
+void xen_start_kernel(struct start_info *si);


... should go under '#ifdef CONFIG_XEN_PV'

What should the stubs do here? I guess just return the
unmodified value?


Same here -- these should only be referenced if CONFIG_XEN_PV is defined which 
is why I suggested moving them under ifdef.


-boris



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.