| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 3/4] xen/ppc: Implement early serial printk on pseries
 Hi, On 22/06/2023 17:05, Shawn Anastasio wrote: On 6/21/23 3:48 PM, Julien Grall wrote:On 21/06/2023 17:59, Shawn Anastasio wrote:diff --git a/xen/arch/ppc/boot-of.c b/xen/arch/ppc/boot-of.c new file mode 100644 index 0000000000..1ceeaf1250 --- /dev/null +++ b/xen/arch/ppc/boot-of.c @@ -0,0 +1,116 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.As you already have the SPDX license, the full license should be dropped.To clarify, you're suggesting that I remove the license text but keep the copyright lines below? I wouldn't feel comfortable removing the latter since this is derived from code that wasn't written by me. I am only suggesting to remove the license text. The copyright are fine to keep. Note that in Xen, we don't tend to add them for new file (I guess this is not the case here) and instead rely on signed-off/author in the commit message. + * + * Copyright IBM Corp. 2005, 2006, 2007 + * Copyright Raptor Engineering, LLC + * + * Authors: Jimi Xenidis <jimix@xxxxxxxxxxxxxx> + * Hollis Blanchard <hollisb@xxxxxxxxxx> + * Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx> + */+extern int enter_of(struct of_service *args, unsigned long entry);Here you add 'extern' but ...+ +void boot_of_init(unsigned long);not here. In Xen, we tend to not add 'extern' for prototypes. Also, please name the parameter as this makes clear what the value is. This would also make MISRA happy (IIRC this would rule 8.2).I used extern to mark the `enter_of` since it's an assembly function rather than a C one, but if this isn't a convention used in the Xen codebase I can drop it. I am not aware of such convention in Xen. But if you want to distinguish assembly vs C function, then I think it would be better to add asm_ in the name so it is clearer. diff --git a/xen/arch/ppc/include/asm/bug.h b/xen/arch/ppc/include/asm/bug.h new file mode 100644 index 0000000000..a23ab1fa74 --- /dev/null +++ b/xen/arch/ppc/include/asm/bug.h @@ -0,0 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef _ASM_PPC_BUG_H +#define _ASM_PPC_BUG_H + +#endif /* _ASM_PPC_BUG_H */Can you clarify why you do need this empty header?Some empty headers were necessary to include <xen/lib.h> which in turn includes various asm/ headers. I have since dropped many of these headers following Andrew's earlier comments, though, and they won't be present in v2. In general we tend to split code movement/refactoring from new code. This helps during reviews. Not sure how small will be your patch. If it is only a few dozen of lines, then it should be fine :). Cheers, -- Julien Grall 
 
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |