lkml.org 
[lkml]   [2023]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] [v2] x86: xen: add missing prototypes


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

\
 
 \ /
  Last update: 2023-05-24 01:11    [W:0.543 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site