xen/panic: Fix string inconsistencies in callers of panic()
PATCH 1/1 xen/panic: Fix string inconsistencies in callers of panic()
panic() (as well as early_panic() in arm) is inconsistently called with or without a trailing newline. This results in cases where the lower line of *****s is not on its own line.
Change panic() to always print a newline itself, and update callers not to.
In addition, panic() was occasionally called with a leading newline, and occaionally with trailing punctuation which seems rather redundant given the surrounding context. Fix up these sitiuations as well.
---
This has been compile tested on arm32 and arm64.
George:
I request that this is included for 4.4 - It is just formatting changes rather than functional ones
--- xen/arch/arm/arm32/vfp.c | 2 +- xen/arch/arm/arm64/traps.c | 2 +- xen/arch/arm/domain_build.c | 18 +++++++++--------- xen/arch/arm/early_printk.c | 2 +- xen/arch/arm/gic.c | 16 ++++++++-------- xen/arch/arm/kernel.c | 8 ++++---- xen/arch/arm/mm.c | 2 +- xen/arch/arm/platform.c | 2 +- xen/arch/arm/setup.c | 10 +++++----- xen/arch/arm/smpboot.c | 2 +- xen/arch/arm/time.c | 8 ++++---- xen/arch/arm/traps.c | 10 +++++----- xen/arch/x86/apic.c | 4 ++-- xen/arch/x86/bzimage.c | 2 +- xen/arch/x86/cpu/amd.c | 2 +- xen/arch/x86/cpu/mcheck/mce.c | 4 ++-- xen/arch/x86/domain_build.c | 20 ++++++++++---------- xen/arch/x86/hvm/svm/intr.c | 2 +- xen/arch/x86/io_apic.c | 4 ++-- xen/arch/x86/mm/mm-locks.h | 2 +- xen/arch/x86/mpparse.c | 10 +++++----- xen/arch/x86/setup.c | 6 +++--- xen/arch/x86/smpboot.c | 2 +- xen/arch/x86/tboot.c | 2 +- xen/arch/x86/time.c | 2 +- xen/arch/x86/traps.c | 14 +++++++------- xen/arch/x86/x86_64/mm.c | 2 +- xen/arch/x86/x86_64/traps.c | 2 +- xen/common/page_alloc.c | 2 +- xen/common/schedule.c | 2 +- xen/drivers/char/console.c | 4 ++-- xen/drivers/passthrough/iommu.c | 2 +- xen/drivers/passthrough/pci.c | 2 +- xen/drivers/passthrough/vtd/dmar.h | 2 +- xen/drivers/passthrough/vtd/iommu.c | 4 ++-- xen/drivers/passthrough/vtd/qinval.c | 2 +- xen/xsm/flask/hooks.c | 2 +- 37 files changed, 92 insertions(+), 92 deletions(-)
xen/arch/arm/arm32/vfp.c +1 -1
@@ -80,7 +80,7 @@ static __init int vfp_init(void) vfparch = (vfpsid &FPSID_ARCH_MASK ) >>FPSID_ARCH_BIT ;if ( vfparch <2 ) -panic ("Xen only support VFP 3\n" ); +panic ("Xen only support VFP 3" );return 0 ; }
xen/arch/arm/arm64/traps.c +1 -1
@@ -26,7 +26,7 @@ asmlinkage void do_trap_serror(struct cpu_user_regs *regs) { -panic ("Unhandled serror trap\n" ); +panic ("Unhandled serror trap" ); }static const char *handler[]= {
xen/arch/arm/domain_build.c +9 -9
@@ -81,7 +81,7 @@ static void allocate_memory_11(struct domain *d, struct kernel_info *kinfo) }if ( !pg ) -panic ("Failed to allocate contiguous memory for dom0\n" ); +panic ("Failed to allocate contiguous memory for dom0" ); spfn =page_to_mfn (pg); start = spfn <<PAGE_SHIFT ;
@@ -93,7 +93,7 @@ static void allocate_memory_11(struct domain *d, struct kernel_info *kinfo) res =guest_physmap_add_page (d, spfn, spfn, order);if ( res ) -panic ("Unable to add pages in DOM0: %d\n" , res); +panic ("Unable to add pages in DOM0: %d" , res); kinfo->mem.bank[0 ].start = start; kinfo->mem.bank[0 ].size = size;
@@ -123,7 +123,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo) reg =dt_get_property (memory,"reg" , ®_len);if ( reg ==NULL ) -panic ("Memory node has no reg property!\n" ); +panic ("Memory node has no reg property" ); for ( l = 0; kinfo->unassigned_mem > 0 && l + reg_size <= reg_len
@@ -133,7 +133,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)paddr_t start, size;if (dt_device_get_address (memory, bank, &start, &size) ) -panic ("Unable to retrieve the bank %u for %s\n" , +panic ("Unable to retrieve the bank %u for %s" , bank,dt_node_full_name (memory));if ( size > kinfo->unassigned_mem )
@@ -142,7 +142,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)printk ("Populate P2M %#" PRIx64"->%#" PRIx64"\n" , start, start + size);if (p2m_populate_ram (d, start, start + size) <0 ) -panic ("Failed to populate P2M\n" ); +panic ("Failed to populate P2M" ); kinfo->mem.bank[kinfo->mem.nr_banks].start = start; kinfo->mem.bank[kinfo->mem.nr_banks].size = size; kinfo->mem.nr_banks++;
@@ -908,7 +908,7 @@ static void dtb_load(struct kernel_info *kinfo) rc =raw_copy_to_guest (dtb_virt, kinfo->fdt,fdt_totalsize (kinfo->fdt));if ( rc !=0 ) -panic ("Unable to copy the DTB to dom0 memory (rc = %lu)\n" , rc); +panic ("Unable to copy the DTB to dom0 memory (rc = %lu)" , rc);xfree (kinfo->fdt); }
@@ -935,12 +935,12 @@ static void initrd_load(struct kernel_info *kinfo) res =fdt_setprop_inplace_cell (kinfo->fdt, node,"linux,initrd-start" , load_addr);if ( res ) -panic ("Cannot fix up \"linux,initrd-start\" property\n" ); +panic ("Cannot fix up \"linux,initrd-start\" property" ); res =fdt_setprop_inplace_cell (kinfo->fdt, node,"linux,initrd-end" , load_addr + len);if ( res ) -panic ("Cannot fix up \"linux,initrd-end\" property\n" ); +panic ("Cannot fix up \"linux,initrd-end\" property" );for ( offs =0 ; offs < len; ) {
@@ -954,7 +954,7 @@ static void initrd_load(struct kernel_info *kinfo) rc =gvirt_to_maddr (load_addr + offs, &ma);if ( rc ) { -panic ("\nUnable to translate guest address\n" ); +panic ("Unable to translate guest address" );return ; }
xen/arch/arm/early_printk.c +1 -1
@@ -61,7 +61,7 @@ early_panic(const char *fmt, ...)early_vprintk (fmt, args);va_end (args); -early_printk ("\nEarly Panic: Stopping\n" ); +early_printk ("\n\nEarly Panic: Stopping\n" );while (1 ); }
xen/arch/arm/gic.c +8 -8
@@ -398,29 +398,29 @@ void __init gic_init(void) node =dt_find_interrupt_controller (gic_ids);if ( !node ) -panic ("Unable to find compatible GIC in the device tree\n" ); +panic ("Unable to find compatible GIC in the device tree" );dt_device_set_used_by (node,DOMID_XEN ); res =dt_device_get_address (node,0 , &gic.dbase,NULL );if ( res || !gic.dbase || (gic.dbase & ~PAGE_MASK ) ) -panic ("GIC: Cannot find a valid address for the distributor\n" ); +panic ("GIC: Cannot find a valid address for the distributor" ); res =dt_device_get_address (node,1 , &gic.cbase,NULL );if ( res || !gic.cbase || (gic.cbase & ~PAGE_MASK ) ) -panic ("GIC: Cannot find a valid address for the CPU\n" ); +panic ("GIC: Cannot find a valid address for the CPU" ); res =dt_device_get_address (node,2 , &gic.hbase,NULL );if ( res || !gic.hbase || (gic.hbase & ~PAGE_MASK ) ) -panic ("GIC: Cannot find a valid address for the hypervisor\n" ); +panic ("GIC: Cannot find a valid address for the hypervisor" ); res =dt_device_get_address (node,3 , &gic.vbase,NULL );if ( res || !gic.vbase || (gic.vbase & ~PAGE_MASK ) ) -panic ("GIC: Cannot find a valid address for the virtual CPU\n" ); +panic ("GIC: Cannot find a valid address for the virtual CPU" ); res =dt_device_get_irq (node,0 , &gic.maintenance);if ( res ) -panic ("GIC: Cannot find the maintenance IRQ\n" ); +panic ("GIC: Cannot find the maintenance IRQ" );/* Set the GIC as the primary interrupt controller */ dt_interrupt_controller = node;
@@ -438,7 +438,7 @@ void __init gic_init(void)if ( (gic.dbase & ~PAGE_MASK ) || (gic.cbase & ~PAGE_MASK ) || (gic.hbase & ~PAGE_MASK ) || (gic.vbase & ~PAGE_MASK ) ) -panic ("GIC interfaces not page aligned.\n" ); +panic ("GIC interfaces not page aligned" );set_fixmap (FIXMAP_GICD , gic.dbase >>PAGE_SHIFT ,DEV_SHARED ); BUILD_BUG_ON(FIXMAP_ADDR(FIXMAP_GICC1) !=
@@ -783,7 +783,7 @@ static void do_sgi(struct cpu_user_regs *regs, int othercpu, enum gic_sgi sgi)smp_call_function_interrupt ();break ;default : -panic ("Unhandled SGI %d on CPU%d\n" , sgi,smp_processor_id ()); +panic ("Unhandled SGI %d on CPU%d" , sgi,smp_processor_id ());break ; }
xen/arch/arm/kernel.c +4 -4
@@ -87,7 +87,7 @@ static void place_modules(struct kernel_info *info,paddr_t addr;if ( total + kernel_size > mem_size ) -panic ("Not enough memory in the first bank for the dtb+initrd." ); +panic ("Not enough memory in the first bank for the dtb+initrd" );/* * DTB must be loaded such that it does not conflict with the
@@ -112,7 +112,7 @@ static void place_modules(struct kernel_info *info, addr = kernel_start - total; else { -panic ("Unable to find suitable location for dtb+initrd." ); +panic ("Unable to find suitable location for dtb+initrd" );return ; }
@@ -144,7 +144,7 @@ static void kernel_zimage_load(struct kernel_info *info) rc =gvirt_to_maddr (load_addr + offs, &ma);if ( rc ) { -panic ("\nUnable to map translate guest address\n" ); +panic ("Unable to map translate guest address" );return ; }
@@ -314,7 +314,7 @@ static int kernel_try_elf_prepare(struct kernel_info *info, info->kernel_order =get_order_from_bytes (size); info->kernel_img =alloc_xenheap_pages (info->kernel_order,0 );if ( info->kernel_img ==NULL ) -panic ("Cannot allocate temporary buffer for kernel.\n" ); +panic ("Cannot allocate temporary buffer for kernel" );copy_from_paddr (info->kernel_img, addr, size, info->load_attr);
xen/arch/arm/mm.c +1 -1
@@ -633,7 +633,7 @@ void __init setup_xenheap_mappings(unsigned long base_mfn, xenheap_mfn_start = base_mfn;if ( base_mfn < xenheap_mfn_start ) -early_panic ("cannot add xenheap mapping at %lx below heap start %lx\n" , +early_panic ("cannot add xenheap mapping at %lx below heap start %lx" , base_mfn, xenheap_mfn_start); end_mfn = base_mfn + nr_mfns;
xen/arch/arm/platform.c +1 -1
@@ -83,7 +83,7 @@ void __init platform_init(void) res = platform->init ();if ( res ) -panic ("Unable to initialize the platform\n" ); +panic ("Unable to initialize the platform" ); }int __init platform_init_time (void )
xen/arch/arm/setup.c +5 -5
@@ -345,7 +345,7 @@ static paddr_t __init get_xen_paddr(void) }if ( !paddr ) -early_panic ("Not enough memory to relocate Xen\n" ); +early_panic ("Not enough memory to relocate Xen" );early_printk ("Placing Xen at 0x%" PRIpaddr"-0x%" PRIpaddr"\n" , paddr, paddr + min_size);
@@ -372,7 +372,7 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)/* TODO: Handle non-contiguous memory bank */ if ( !early_info.mem.nr_banks ) -early_panic ("No memory bank\n" ); +early_panic ("No memory bank" ); ram_start = early_info.mem.bank[0 ].start; ram_size = early_info.mem.bank[0 ].size; ram_end = ram_start + ram_size;
@@ -417,7 +417,7 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size) }while ( xenheap_pages >128 <<(20 -PAGE_SHIFT ) );if ( ! e ) -early_panic ("Not not enough space for xenheap\n" ); +early_panic ("Not not enough space for xenheap" ); domheap_pages = heap_pages - xenheap_pages;
@@ -695,13 +695,13 @@ void __init start_xen(unsigned long boot_phys_offset,/* Create initial domain 0. */ dom0 =domain_create (0 ,0 ,0 );if (IS_ERR (dom0) || (alloc_dom0_vcpu0 () ==NULL ) ) -panic ("Error creating domain 0\n" ); +panic ("Error creating domain 0" ); dom0->is_privileged =1 ; dom0->target =NULL ;if (construct_dom0 (dom0) !=0 ) -panic ("Could not set up DOM0 guest OS\n" ); +panic ("Could not set up DOM0 guest OS" );/* Scrub RAM that is still free and so may go to an unprivileged domain. XXX too slow in simulator
xen/arch/arm/smpboot.c +1 -1
@@ -72,7 +72,7 @@ static void setup_cpu_sibling_map(int cpu) {if ( !zalloc_cpumask_var (&per_cpu (cpu_sibling_mask, cpu)) || !zalloc_cpumask_var (&per_cpu (cpu_core_mask, cpu)) ) -panic ("No memory for CPU sibling/core maps\n" ); +panic ("No memory for CPU sibling/core maps" );/* A CPU is a sibling with itself and is always on its own core. */ cpumask_set_cpu (cpu,per_cpu (cpu_sibling_mask, cpu));
xen/arch/arm/time.c +4 -4
@@ -113,7 +113,7 @@ int __init init_xen_time(void) dev =dt_find_matching_node (NULL , timer_ids);if ( !dev ) -panic ("Unable to find a compatible timer in the device tree\n" ); +panic ("Unable to find a compatible timer in the device tree" );dt_device_set_used_by (dev,DOMID_XEN );
@@ -122,7 +122,7 @@ int __init init_xen_time(void) { res =dt_device_get_irq (dev, i, &timer_irq[i]);if ( res ) -panic ("Timer: Unable to retrieve IRQ %u from the device tree\n" , i); +panic ("Timer: Unable to retrieve IRQ %u from the device tree" , i); } printk("Generic Timer IRQ: phys=%u hyp=%u virt=%u\n",
@@ -132,11 +132,11 @@ int __init init_xen_time(void) res =platform_init_time ();if ( res ) -panic ("Timer: Cannot initialize platform timer\n" ); +panic ("Timer: Cannot initialize platform timer" );/* Check that this CPU supports the Generic Timer interface */ if ( !cpu_has_gentimer ) -panic ("CPU does not support the Generic Timer v1 interface.\n" ); +panic ("CPU does not support the Generic Timer v1 interface" ); res =dt_property_read_u32 (dev,"clock-frequency" , &rate);if ( res )
xen/arch/arm/traps.c +5 -5
@@ -253,7 +253,7 @@ void panic_PAR(uint64_t par) second_in_first ?" during second stage lookup" :"" , fsc_level_str(level)); -panic ("Error during Hypervisor-to-physical address translation\n" ); +panic ("Error during Hypervisor-to-physical address translation" ); }static void cpsr_switch_mode (struct cpu_user_regs *regs,int mode)
@@ -902,7 +902,7 @@ static void do_debug_trap(struct cpu_user_regs *regs, unsigned int code)show_execution_state (regs);break ;default : -panic ("DOM%d: Unhandled debug trap %#x\n" , domid, code); +panic ("DOM%d: Unhandled debug trap %#x" , domid, code);break ; } }
@@ -1187,7 +1187,7 @@ static void do_cp15_32(struct cpu_user_regs *regs,printk ("%s p15, %d, r%d, cr%d, cr%d, %d @ 0x%" PRIregister"\n" , cp32.read ?"mrc" :"mcr" , cp32.op1, cp32.reg, cp32.crn, cp32.crm, cp32.op2, regs->pc); -panic ("unhandled 32-bit CP15 access %#x\n" , hsr.bits &HSR_CP32_REGS_MASK ); +panic ("unhandled 32-bit CP15 access %#x" , hsr.bits &HSR_CP32_REGS_MASK ); }advance_pc (regs, hsr); }
@@ -1217,7 +1217,7 @@ static void do_cp15_64(struct cpu_user_regs *regs,printk ("%s p15, %d, r%d, r%d, cr%d @ 0x%" PRIregister"\n" , cp64.read ?"mrrc" :"mcrr" , cp64.op1, cp64.reg1, cp64.reg2, cp64.crm, regs->pc); -panic ("unhandled 64-bit CP15 access %#x\n" , hsr.bits &HSR_CP64_REGS_MASK ); +panic ("unhandled 64-bit CP15 access %#x" , hsr.bits &HSR_CP64_REGS_MASK ); }advance_pc (regs, hsr); }
@@ -1247,7 +1247,7 @@ static void do_sysreg(struct cpu_user_regs *regs, sysreg.op2, sysreg.read ?"=>" :"<=" , sysreg.reg, regs->pc); -panic ("unhandled 64-bit sysreg access %#x\n" , +panic ("unhandled 64-bit sysreg access %#x" , hsr.bits &HSR_SYSREG_REGS_MASK ); }
xen/arch/x86/apic.c +2 -2
@@ -946,7 +946,7 @@ void __init x2apic_bsp_setup(void)return ; }panic ("x2APIC: already enabled by BIOS, but " -"iommu_supports_eim failed!\n" ); +"iommu_supports_eim failed" ); }if ( (ioapic_entries =alloc_ioapic_entries ()) ==NULL )
@@ -968,7 +968,7 @@ void __init x2apic_bsp_setup(void) {if ( x2apic_enabled )panic ("Interrupt remapping could not be enabled while " -"x2APIC is already enabled by BIOS!\n" ); +"x2APIC is already enabled by BIOS" );printk (XENLOG_ERR "Failed to enable Interrupt Remapping: Will not enable x2APIC.\n" );
xen/arch/x86/bzimage.c +1 -1
@@ -62,7 +62,7 @@ static void flush_window(void);static __init void error (char *x) { -panic ("%s\n" , x); +panic ("%s" , x); }static __init int fill_inbuf (void )
xen/arch/x86/cpu/amd.c +1 -1
@@ -465,7 +465,7 @@ static void __devinit init_amd(struct cpuinfo_x86 *c)if (!cpu_has_amd_erratum (c,AMD_ERRATUM_121 )) opt_allow_unsafe =1 ;else if (opt_allow_unsafe <0 ) -panic ("Xen will not boot on this CPU for security reasons.\n" +panic ("Xen will not boot on this CPU for security reasons" "Pass \"allow_unsafe\" if you're trusting all your" " (PV) guest kernels.\n" );else if (!opt_allow_unsafe && c == &boot_cpu_data)
xen/arch/x86/cpu/mcheck/mce.c +2 -2
@@ -523,7 +523,7 @@ void mcheck_cmn_handler(struct cpu_user_regs *regs, long error_code,* recovery job but to reset the system. */ if (atomic_read (&found_error) ==0 ) -mc_panic ("MCE: No CPU found valid MCE, need reset\n" ); +mc_panic ("MCE: No CPU found valid MCE, need reset" );if (!cpumask_empty (&mce_fatal_cpus)) {char *ebufp, ebuf[96 ] ="MCE: Fatal error happened on CPUs " ;
@@ -1642,7 +1642,7 @@ static int mce_delayed_action(mctelem_cookie_t mctc)dprintk (XENLOG_ERR ,"MCE delayed action failed\n" ); is_mc_panic =1 ;x86_mcinfo_dump (mctelem_dataptr (mctc)); -panic ("MCE: Software recovery failed for the UCR\n" ); +panic ("MCE: Software recovery failed for the UCR" );break ;case MCER_RECOVERED :dprintk (XENLOG_INFO ,"MCE: Error is successfully recovered\n" );
xen/arch/x86/domain_build.c +10 -10
@@ -439,7 +439,7 @@ int __init construct_dom0( value = (parms.virt_hv_start_low + mask) & ~mask;BUG_ON (!is_pv_32bit_domain (d));if ( value > __HYPERVISOR_COMPAT_VIRT_START ) -panic ("Domain 0 expects too high a hypervisor start address.\n" ); +panic ("Domain 0 expects too high a hypervisor start address" );HYPERVISOR_COMPAT_VIRT_START (d) = max_t(unsigned int, m2p_compat_vstart, value); }
@@ -509,7 +509,7 @@ int __init construct_dom0( count -=PAGE_ALIGN (initrd_len); order =get_order_from_bytes (count);if ( (1UL << order) +PFN_UP (initrd_len) > nr_pages ) -panic ("Domain 0 allocation is too small for kernel image.\n" ); +panic ("Domain 0 allocation is too small for kernel image" );if ( parms.p2m_base !=UNSET_ADDR ) {
@@ -518,7 +518,7 @@ int __init construct_dom0( } page =alloc_domheap_pages (d, order,0 );if ( page ==NULL ) -panic ("Not enough RAM for domain 0 allocation.\n" ); +panic ("Not enough RAM for domain 0 allocation" ); alloc_spfn =page_to_mfn (page); alloc_epfn = alloc_spfn + d->tot_pages;
@@ -535,7 +535,7 @@ int __init construct_dom0( order =get_order_from_pages (count); page =alloc_domheap_pages (d, order,0 );if ( !page ) -panic ("Not enough RAM for domain 0 initrd.\n" ); +panic ("Not enough RAM for domain 0 initrd" );for ( count = -count; order--; )if ( count & (1UL << order) ) {
@@ -618,7 +618,7 @@ int __init construct_dom0( { page =alloc_domheap_page (NULL ,0 );if ( !page ) -panic ("Not enough RAM for domain 0 PML4.\n" ); +panic ("Not enough RAM for domain 0 PML4" ); page->u.inuse.type_info = PGT_l4_page_table|PGT_validated|1 ; l4start = l4tab =page_to_virt (page);maddr_to_page (mpt_alloc)->u.inuse.type_info = PGT_l3_page_table;
@@ -830,7 +830,7 @@ int __init construct_dom0( {if ( d->tot_pages + ((round_pgup (vphysmap_end) - va) >>PAGE_SHIFT ) +3 > nr_pages ) -panic ("Dom0 allocation too small for initial P->M table.\n" ); +panic ("Dom0 allocation too small for initial P->M table" );if ( l1tab ) {
@@ -929,7 +929,7 @@ int __init construct_dom0( va &=PAGE_MASK ; }if ( !page ) -panic ("Not enough RAM for DOM0 P->M table.\n" ); +panic ("Not enough RAM for DOM0 P->M table" ); }if ( l1tab )
@@ -990,7 +990,7 @@ int __init construct_dom0(while ( pfn < nr_pages ) {if ( (page =alloc_chunk (d, nr_pages - d->tot_pages)) ==NULL ) -panic ("Not enough RAM for DOM0 reservation.\n" ); +panic ("Not enough RAM for DOM0 reservation" );while ( pfn < d->tot_pages ) { mfn =page_to_mfn (page);
@@ -1072,12 +1072,12 @@ int __init construct_dom0(printk ("Dom0 runs in ring 0 (supervisor mode)\n" );if ( !test_bit (XENFEAT_supervisor_mode_kernel, parms.f_supported) ) -panic ("Dom0 does not support supervisor-mode execution\n" ); +panic ("Dom0 does not support supervisor-mode execution" ); }else {if (test_bit (XENFEAT_supervisor_mode_kernel, parms.f_required) ) -panic ("Dom0 requires supervisor-mode execution\n" ); +panic ("Dom0 requires supervisor-mode execution" ); } rc =0 ;
xen/arch/x86/hvm/svm/intr.c +1 -1
@@ -175,7 +175,7 @@ void svm_intr_assist(void)/* Guest already enabled an interrupt window. */ return ;default : -panic ("%s: nestedsvm_vcpu_interrupt can't handle value %#x\n" , +panic ("%s: nestedsvm_vcpu_interrupt can't handle value %#x" , __func__, rc); } }
xen/arch/x86/io_apic.c +2 -2
@@ -1421,7 +1421,7 @@ static void __init setup_ioapic_ids_from_mpc(void)if (!physid_isset (i, phys_id_present_map))break ;if (i >=get_physical_broadcast ()) -panic ("Max APIC ID exceeded!\n" ); +panic ("Max APIC ID exceeded" );printk (KERN_ERR "... fixing up to %d. (tell your hw vendor)\n" , i); mp_ioapics[apic].mpc_apicid = i;
@@ -2135,7 +2135,7 @@ int __init io_apic_get_unique_id (int ioapic, int apic_id) }if (i ==get_physical_broadcast ()) -panic ("Max apic_id exceeded!\n" ); +panic ("Max apic_id exceeded" );printk (KERN_WARNING "IOAPIC[%d]: apic_id %d already used, " "trying %d\n" , ioapic, apic_id, i);
xen/arch/x86/mm/mm-locks.h +1 -1
@@ -73,7 +73,7 @@ static inline void _mm_lock(mm_lock_t *l, const char *func, int level, int rec) l->unlock_level =__get_lock_level (); }else if ( (unlikely (!rec)) ) -panic ("mm lock already held by %s\n" , l->locker_function); +panic ("mm lock already held by %s" , l->locker_function);__set_lock_level (level); }
xen/arch/x86/mpparse.c +5 -5
@@ -221,7 +221,7 @@ static void __init MP_ioapic_info (struct mpc_config_ioapic *m)if (nr_ioapics >=MAX_IO_APICS ) {printk (KERN_CRIT "Max # of I/O APICs (%d) exceeded (found %d).\n" ,MAX_IO_APICS , nr_ioapics); -panic ("Recompile kernel with bigger MAX_IO_APICS!.\n" ); +panic ("Recompile kernel with bigger MAX_IO_APICS" ); }if (!m->mpc_apicaddr) { printk(KERN_ERR "WARNING: bogus zero I/O APIC address"
@@ -241,7 +241,7 @@ static void __init MP_intsrc_info (struct mpc_config_intsrc *m) (m->mpc_irqflag >>2 ) &3 , m->mpc_srcbus, m->mpc_srcbusirq, m->mpc_dstapic, m->mpc_dstirq);if (++mp_irq_entries ==MAX_IRQ_SOURCES ) -panic ("Max # of irq sources exceeded!!\n" ); +panic ("Max # of irq sources exceeded" ); }static void __init MP_lintsrc_info (struct mpc_config_lintsrc *m)
@@ -844,7 +844,7 @@ void __init mp_register_ioapic (if (nr_ioapics >=MAX_IO_APICS ) {printk (KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded " "(found %d)\n" ,MAX_IO_APICS , nr_ioapics); -panic ("Recompile kernel with bigger MAX_IO_APICS!\n" ); +panic ("Recompile kernel with bigger MAX_IO_APICS" ); }if (!address) { printk(KERN_ERR "WARNING: Bogus (zero) I/O APIC address"
@@ -943,7 +943,7 @@ void __init mp_override_legacy_irq ( mp_irqs[mp_irq_entries] = intsrc;if (++mp_irq_entries ==MAX_IRQ_SOURCES ) -panic ("Max # of irq sources exceeded!\n" ); +panic ("Max # of irq sources exceeded" );return ; }
@@ -1009,7 +1009,7 @@ void __init mp_config_acpi_legacy_irqs (void) mp_irqs[mp_irq_entries] = intsrc;if (++mp_irq_entries ==MAX_IRQ_SOURCES ) -panic ("Max # of irq sources exceeded!\n" ); +panic ("Max # of irq sources exceeded" ); } }
xen/arch/x86/setup.c +3 -3
@@ -1330,12 +1330,12 @@ void __init __start_xen(unsigned long mbi_p)watchdog_setup ();if ( !tboot_protect_mem_regions () ) -panic ("Could not protect TXT memory regions\n" ); +panic ("Could not protect TXT memory regions" );/* Create initial domain 0. */ dom0 =domain_create (0 , DOMCRF_s3_integrity,0 );if (IS_ERR (dom0) || (alloc_dom0_vcpu0 () ==NULL ) ) -panic ("Error creating domain 0\n" ); +panic ("Error creating domain 0" ); dom0->is_privileged =1 ; dom0->target =NULL ;
@@ -1390,7 +1390,7 @@ void __init __start_xen(unsigned long mbi_p) (initrdidx > 0) && (initrdidx < mbi->mods_count) ? mod + initrdidx : NULL, bootstrap_map, cmdline) != 0) -panic ("Could not set up DOM0 guest OS\n" ); +panic ("Could not set up DOM0 guest OS" );/* Scrub RAM that is still free and so may go to an unprivileged domain. */ scrub_heap_pages ();
xen/arch/x86/smpboot.c +1 -1
@@ -735,7 +735,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)if ( !zalloc_cpumask_var (&per_cpu (cpu_sibling_mask,0 )) || !zalloc_cpumask_var (&per_cpu (cpu_core_mask,0 )) ) -panic ("No memory for boot CPU sibling/core maps\n" ); +panic ("No memory for boot CPU sibling/core maps" );set_cpu_sibling_map (0 );
xen/arch/x86/tboot.c +1 -1
@@ -528,7 +528,7 @@ void tboot_s3_error(int error)printk ("MAC for %s before S3 is: 0x%08" PRIx64"\n" , what, orig_mac);printk ("MAC for %s after S3 is: 0x%08" PRIx64"\n" , what, resume_mac); -panic ("Memory integrity was lost on resume (%d)\n" , error); +panic ("Memory integrity was lost on resume (%d)" , error); }int tboot_wake_ap (int apicid,unsigned long sipi_vec)
xen/arch/x86/time.c +1 -1
@@ -690,7 +690,7 @@ static unsigned long get_cmos_time(void) }if (unlikely (acpi_gbl_FADT.boot_flags &ACPI_FADT_NO_CMOS_RTC ) ) -panic ("System without CMOS RTC must be booted from EFI\n" ); +panic ("System without CMOS RTC must be booted from EFI" );spin_lock_irqsave (&rtc_lock, flags);
xen/arch/x86/traps.c +7 -7
@@ -422,7 +422,7 @@ void fatal_trap(int trapnr, struct cpu_user_regs *regs) }panic ("FATAL TRAP: vector = %d (%s)\n" -"[error_code=%04x] %s\n" , +"[error_code=%04x] %s" , trapnr,trapstr (trapnr), regs->error_code, (regs->eflags &X86_EFLAGS_IF ) ?"" :", IN INTERRUPT CONTEXT" ); }
@@ -569,7 +569,7 @@ static inline void do_trap(show_execution_state (regs);panic ("FATAL TRAP: vector = %d (%s)\n" -"[error_code=%04x]\n" , +"[error_code=%04x]" , trapnr,trapstr (trapnr), regs->error_code); }
@@ -1017,7 +1017,7 @@ void do_invalid_op(struct cpu_user_regs *regs)printk ("Xen BUG at %s%s:%d\n" , prefix, filename, lineno);DEBUGGER_trap_fatal (TRAP_invalid_op, regs);show_execution_state (regs); -panic ("Xen BUG at %s%s:%d\n" , prefix, filename, lineno); +panic ("Xen BUG at %s%s:%d" , prefix, filename, lineno);case BUGFRAME_assert:/* ASSERT: decode the predicate string pointer. */
@@ -1029,7 +1029,7 @@ void do_invalid_op(struct cpu_user_regs *regs) predicate, prefix, filename, lineno);DEBUGGER_trap_fatal (TRAP_invalid_op, regs);show_execution_state (regs); -panic ("Assertion '%s' failed at %s%s:%d\n" , +panic ("Assertion '%s' failed at %s%s:%d" , predicate, prefix, filename, lineno); }
@@ -1042,7 +1042,7 @@ void do_invalid_op(struct cpu_user_regs *regs) }DEBUGGER_trap_fatal (TRAP_invalid_op, regs);show_execution_state (regs); -panic ("FATAL TRAP: vector = %d (invalid opcode)\n" , TRAP_invalid_op); +panic ("FATAL TRAP: vector = %d (invalid opcode)" , TRAP_invalid_op); }void do_int3 (struct cpu_user_regs *regs)
@@ -1397,7 +1397,7 @@ void do_page_fault(struct cpu_user_regs *regs)show_page_walk (addr);panic ("FATAL PAGE FAULT\n" "[error_code=%04x]\n" -"Faulting linear address: %p\n" , +"Faulting linear address: %p" , error_code,_p (addr)); }
@@ -3078,7 +3078,7 @@ void do_general_protection(struct cpu_user_regs *regs) hardware_gp:show_execution_state (regs); -panic ("GENERAL PROTECTION FAULT\n[error_code=%04x]\n" , regs->error_code); +panic ("GENERAL PROTECTION FAULT\n[error_code=%04x]" , regs->error_code); } static DEFINE_PER_CPU(struct softirq_trap, softirq_trap);
xen/arch/x86/x86_64/mm.c +1 -1
@@ -740,7 +740,7 @@ void __init paging_init(void)return ; nomem: -panic ("Not enough memory for m2p table\n" ); +panic ("Not enough memory for m2p table" ); }void __init zap_low_mappings (void )
xen/arch/x86/x86_64/traps.c +1 -1
@@ -250,7 +250,7 @@ void do_double_fault(struct cpu_user_regs *regs)_show_registers (regs, crs, CTXT_hypervisor,NULL );show_stack_overflow (cpu, regs); -panic ("DOUBLE FAULT -- system shutdown\n" ); +panic ("DOUBLE FAULT -- system shutdown" ); }void toggle_guest_mode (struct vcpu *v)
xen/common/page_alloc.c +1 -1
@@ -92,7 +92,7 @@ static unsigned int __initdata nr_bootmem_regions;static void __init boot_bug (int line) { -panic ("Boot BUG at %s:%d\n" , __FILE__, line); +panic ("Boot BUG at %s:%d" , __FILE__, line); }#define BOOT_BUG_ON (p) if ( p ) boot_bug(__LINE__);
xen/common/schedule.c +1 -1
@@ -1389,7 +1389,7 @@ void __init scheduler_init(void)printk ("Using scheduler: %s (%s)\n" , ops.name, ops.opt_name);if (SCHED_OP (&ops, init) ) -panic ("scheduler returned error on init\n" ); +panic ("scheduler returned error on init" ); if ( sched_ratelimit_us && (sched_ratelimit_us > XEN_SYSCTL_SCHED_RATELIMIT_MAX
xen/drivers/char/console.c +2 -2
@@ -1057,7 +1057,7 @@ void panic(const char *fmt, ...)console_start_sync ();printk ("\n****************************************\n" );printk ("Panic on CPU %d:\n" ,smp_processor_id ()); -printk ("%s" , buf); +printk ("%s\n" , buf);printk ("****************************************\n\n" );if ( opt_noreboot )printk ("Manual reset required ('noreboot' specified)\n" );
@@ -1088,7 +1088,7 @@ void __bug(char *file, int line)console_start_sync ();printk ("Xen BUG at %s:%d\n" , file, line);dump_execution_state (); -panic ("Xen BUG at %s:%d\n" , file, line); +panic ("Xen BUG at %s:%d" , file, line);for ( ; ; ) ; }
xen/drivers/passthrough/iommu.c +1 -1
@@ -475,7 +475,7 @@ int __init iommu_setup(void)if ( (force_iommu && !iommu_enabled) || (force_intremap && !iommu_intremap) ) -panic ("Couldn't enable %s and iommu=required/force\n" , +panic ("Couldn't enable %s and iommu=required/force" , !iommu_enabled ?"IOMMU" :"Interrupt Remapping" );if ( !iommu_enabled )
xen/drivers/passthrough/pci.c +1 -1
@@ -104,7 +104,7 @@ void __init pt_pci_init(void) {radix_tree_init (&pci_segments);if ( !alloc_pseg (0 ) ) -panic ("Could not initialize PCI segment 0\n" ); +panic ("Could not initialize PCI segment 0" ); }int __init pci_add_segment (u16 seg)
xen/drivers/passthrough/vtd/dmar.h +1 -1
@@ -118,7 +118,7 @@ do { \break ; \if (NOW () > start_time +DMAR_OPERATION_TIMEOUT ) { \if ( !kexecing ) \ -panic ("%s:%d:%s: DMAR hardware is malfunctional\n" ,\ +panic ("%s:%d:%s: DMAR hardware is malfunctional" ,\ __FILE__, __LINE__, __func__); \else \break ; \
xen/drivers/passthrough/vtd/iommu.c +2 -2
@@ -722,7 +722,7 @@ static void iommu_enable_translation(struct acpi_drhd_unit *drhd)if (is_igd_drhd (drhd) && !is_igd_vt_enabled_quirk () ) {if ( force_iommu ) -panic ("BIOS did not enable IGD for VT properly, crash Xen for security purpose!\n" ); +panic ("BIOS did not enable IGD for VT properly, crash Xen for security purpose" );else { dprintk(XENLOG_WARNING VTDPREFIX,
@@ -2344,7 +2344,7 @@ static void vtd_resume(void)return ;if (init_vtd_hw () !=0 && force_iommu ) -panic ("IOMMU setup failed, crash Xen for security purpose!\n" ); +panic ("IOMMU setup failed, crash Xen for security purpose" );for_each_drhd_unit ( drhd ) {
xen/drivers/passthrough/vtd/qinval.c +1 -1
@@ -220,7 +220,7 @@ static int queue_invalidate_wait(struct iommu *iommu,if (NOW () > (start_time +DMAR_OPERATION_TIMEOUT ) ) {print_qi_regs (iommu); -panic ("queue invalidate wait descriptor was not executed\n" ); +panic ("queue invalidate wait descriptor was not executed" ); }cpu_relax (); }
xen/xsm/flask/hooks.c +1 -1
@@ -1586,7 +1586,7 @@ static __init int flask_init(void) original_ops = xsm_ops;if (register_xsm (&flask_ops) ) -panic ("Flask: Unable to register with XSM.\n" ); +panic ("Flask: Unable to register with XSM" ); ret =security_load_policy (policy_buffer, policy_size);
Signature · 1 line
1.7.10.4
Quoted 10 lines · Andrew Cooper
panic()(as well asearly_panic()in arm) is inconsistently called with or without a trailing newline. This results in cases where the lower line of *****s is not on its own line.Change
panic()to always print a newline itself, and update callers not to.In addition,
panic()was occasionally called with a leading newline, and occaionally with trailing punctuation which seems rather redundant given the surrounding context. Fix up these sitiuations as well.
Quoted 7 lines
Signed-off-by Andrew Cooper <[email protected]>CC Keir Fraser <[email protected]>CC Jan Beulich <[email protected]>CC Ian Campbell <[email protected]>CC Stefano Stabellini <[email protected]>CC Tim Deegan <[email protected]>CC George Dunlap <[email protected]>
I'm not entirely sure I agree with nuking the trailing full stop from all of the sentences, especially those which are a complete sentence.
But unless others feel the same I'm not inclined to argue:
Quoted 18 lines · Ian Campbell
Quoted 10 lines · Andrew Cooper
panic()(as well asearly_panic()in arm) is inconsistently called with or without a trailing newline. This results in cases where the lower line of *****s is not on its own line.Change
panic()to always print a newline itself, and update callers not to.In addition,
panic()was occasionally called with a leading newline, and occaionally with trailing punctuation which seems rather redundant given the surrounding context. Fix up these sitiuations as well.Quoted 7 lines
Signed-off-by Andrew Cooper <[email protected]>CC Keir Fraser <[email protected]>CC Jan Beulich <[email protected]>CC Ian Campbell <[email protected]>CC Stefano Stabellini <[email protected]>CC Tim Deegan <[email protected]>CC George Dunlap <[email protected]>
Quoted 8 lines
I'm not entirely sure I agree with nuking the trailing full stop from all of the sentences, especially those which are a complete sentence.
But unless others feel the same I'm not inclined to argue:
Acked-by Ian Campbell <[email protected]>
This was at the request of Keir, based on my previous patch from ages ago which fixed up the callers without a newline at the end.
~Andrew
Quoted 11 lines · Andrew Cooper
panic()(as well asearly_panic()in arm) is inconsistently called with or without a trailing newline. This results in cases where the lower line of *****s is not on its own line.Change
panic()to always print a newline itself, and update callers not to.In addition,
panic()was occasionally called with a leading newline, and occaionally with trailing punctuation which seems rather redundant given the surrounding context. Fix up these sitiuations as well.Signed-off-by Andrew Cooper <[email protected]>
Quoted 11 lines · Andrew Cooper
panic()(as well asearly_panic()in arm) is inconsistently called with or without a trailing newline. This results in cases where the lower line of *****s is not on its own line.Change
panic()to always print a newline itself, and update callers not to.In addition,
panic()was occasionally called with a leading newline, and occaionally with trailing punctuation which seems rather redundant given the surrounding context. Fix up these sitiuations as well.Signed-off-by Andrew Cooper <[email protected]>
Assuming that it does what it says on the tin (only changes strings):
Quoted 997 lines
CC Keir Fraser <[email protected]>CC Jan Beulich <[email protected]>CC Ian Campbell <[email protected]>CC Stefano Stabellini <[email protected]>CC Tim Deegan <[email protected]>CC George Dunlap <[email protected]>---
This has been compile tested on arm32 and arm64.
George:
I request that this is included for 4.4 - It is just formatting changes rather than functional ones--- xen/arch/arm/arm32/vfp.c | 2 +- xen/arch/arm/arm64/traps.c | 2 +- xen/arch/arm/domain_build.c | 18 +++++++++--------- xen/arch/arm/early_printk.c | 2 +- xen/arch/arm/gic.c | 16 ++++++++-------- xen/arch/arm/kernel.c | 8 ++++---- xen/arch/arm/mm.c | 2 +- xen/arch/arm/platform.c | 2 +- xen/arch/arm/setup.c | 10 +++++----- xen/arch/arm/smpboot.c | 2 +- xen/arch/arm/time.c | 8 ++++---- xen/arch/arm/traps.c | 10 +++++----- xen/arch/x86/apic.c | 4 ++-- xen/arch/x86/bzimage.c | 2 +- xen/arch/x86/cpu/amd.c | 2 +- xen/arch/x86/cpu/mcheck/mce.c | 4 ++-- xen/arch/x86/domain_build.c | 20 ++++++++++---------- xen/arch/x86/hvm/svm/intr.c | 2 +- xen/arch/x86/io_apic.c | 4 ++-- xen/arch/x86/mm/mm-locks.h | 2 +- xen/arch/x86/mpparse.c | 10 +++++----- xen/arch/x86/setup.c | 6 +++--- xen/arch/x86/smpboot.c | 2 +- xen/arch/x86/tboot.c | 2 +- xen/arch/x86/time.c | 2 +- xen/arch/x86/traps.c | 14 +++++++------- xen/arch/x86/x86_64/mm.c | 2 +- xen/arch/x86/x86_64/traps.c | 2 +- xen/common/page_alloc.c | 2 +- xen/common/schedule.c | 2 +- xen/drivers/char/console.c | 4 ++-- xen/drivers/passthrough/iommu.c | 2 +- xen/drivers/passthrough/pci.c | 2 +- xen/drivers/passthrough/vtd/dmar.h | 2 +- xen/drivers/passthrough/vtd/iommu.c | 4 ++-- xen/drivers/passthrough/vtd/qinval.c | 2 +- xen/xsm/flask/hooks.c | 2 +- 37 files changed, 92 insertions(+), 92 deletions(-)xen/arch/arm/arm32/vfp.c +1
-1@@ -80,7 +80,7 @@ static __init int vfp_init(void) vfparch = (vfpsid &FPSID_ARCH_MASK ) >>FPSID_ARCH_BIT ;if ( vfparch <2 ) -panic ("Xen only support VFP 3\n" ); +panic ("Xen only support VFP 3" );return 0 ; }xen/arch/arm/arm64/traps.c +1
-1@@ -26,7 +26,7 @@ asmlinkage void do_trap_serror(struct cpu_user_regs *regs) { -panic ("Unhandled serror trap\n" ); +panic ("Unhandled serror trap" ); }static const char *handler[]= {xen/arch/arm/domain_build.c +9
-9@@ -81,7 +81,7 @@ static void allocate_memory_11(struct domain *d, struct kernel_info *kinfo) }if ( !pg ) -panic ("Failed to allocate contiguous memory for dom0\n" ); +panic ("Failed to allocate contiguous memory for dom0" ); spfn =page_to_mfn (pg); start = spfn <<PAGE_SHIFT ;@@ -93,7 +93,7 @@ static void allocate_memory_11(struct domain *d, struct kernel_info *kinfo) res =guest_physmap_add_page (d, spfn, spfn, order);if ( res ) -panic ("Unable to add pages in DOM0: %d\n" , res); +panic ("Unable to add pages in DOM0: %d" , res); kinfo->mem.bank[0 ].start = start; kinfo->mem.bank[0 ].size = size;@@ -123,7 +123,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo) reg =dt_get_property (memory,"reg" , ®_len);if ( reg ==NULL ) -panic ("Memory node has no reg property!\n" ); +panic ("Memory node has no reg property" ); for ( l = 0; kinfo->unassigned_mem > 0 && l + reg_size <= reg_len@@ -133,7 +133,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)paddr_t start, size;if (dt_device_get_address (memory, bank, &start, &size) ) -panic ("Unable to retrieve the bank %u for %s\n" , +panic ("Unable to retrieve the bank %u for %s" , bank,dt_node_full_name (memory));if ( size > kinfo->unassigned_mem )@@ -142,7 +142,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)printk ("Populate P2M %#" PRIx64"->%#" PRIx64"\n" , start, start + size);if (p2m_populate_ram (d, start, start + size) <0 ) -panic ("Failed to populate P2M\n" ); +panic ("Failed to populate P2M" ); kinfo->mem.bank[kinfo->mem.nr_banks].start = start; kinfo->mem.bank[kinfo->mem.nr_banks].size = size; kinfo->mem.nr_banks++;@@ -908,7 +908,7 @@ static void dtb_load(struct kernel_info *kinfo) rc =raw_copy_to_guest (dtb_virt, kinfo->fdt,fdt_totalsize (kinfo->fdt));if ( rc !=0 ) -panic ("Unable to copy the DTB to dom0 memory (rc = %lu)\n" , rc); +panic ("Unable to copy the DTB to dom0 memory (rc = %lu)" , rc);xfree (kinfo->fdt); }@@ -935,12 +935,12 @@ static void initrd_load(struct kernel_info *kinfo) res =fdt_setprop_inplace_cell (kinfo->fdt, node,"linux,initrd-start" , load_addr);if ( res ) -panic ("Cannot fix up \"linux,initrd-start\" property\n" ); +panic ("Cannot fix up \"linux,initrd-start\" property" ); res =fdt_setprop_inplace_cell (kinfo->fdt, node,"linux,initrd-end" , load_addr + len);if ( res ) -panic ("Cannot fix up \"linux,initrd-end\" property\n" ); +panic ("Cannot fix up \"linux,initrd-end\" property" );for ( offs =0 ; offs < len; ) {@@ -954,7 +954,7 @@ static void initrd_load(struct kernel_info *kinfo) rc =gvirt_to_maddr (load_addr + offs, &ma);if ( rc ) { -panic ("\nUnable to translate guest address\n" ); +panic ("Unable to translate guest address" );return ; }xen/arch/arm/early_printk.c +1
-1@@ -61,7 +61,7 @@ early_panic(const char *fmt, ...)early_vprintk (fmt, args);va_end (args); -early_printk ("\nEarly Panic: Stopping\n" ); +early_printk ("\n\nEarly Panic: Stopping\n" );while (1 ); }xen/arch/arm/gic.c +8
-8@@ -398,29 +398,29 @@ void __init gic_init(void) node =dt_find_interrupt_controller (gic_ids);if ( !node ) -panic ("Unable to find compatible GIC in the device tree\n" ); +panic ("Unable to find compatible GIC in the device tree" );dt_device_set_used_by (node,DOMID_XEN ); res =dt_device_get_address (node,0 , &gic.dbase,NULL );if ( res || !gic.dbase || (gic.dbase & ~PAGE_MASK ) ) -panic ("GIC: Cannot find a valid address for the distributor\n" ); +panic ("GIC: Cannot find a valid address for the distributor" ); res =dt_device_get_address (node,1 , &gic.cbase,NULL );if ( res || !gic.cbase || (gic.cbase & ~PAGE_MASK ) ) -panic ("GIC: Cannot find a valid address for the CPU\n" ); +panic ("GIC: Cannot find a valid address for the CPU" ); res =dt_device_get_address (node,2 , &gic.hbase,NULL );if ( res || !gic.hbase || (gic.hbase & ~PAGE_MASK ) ) -panic ("GIC: Cannot find a valid address for the hypervisor\n" ); +panic ("GIC: Cannot find a valid address for the hypervisor" ); res =dt_device_get_address (node,3 , &gic.vbase,NULL );if ( res || !gic.vbase || (gic.vbase & ~PAGE_MASK ) ) -panic ("GIC: Cannot find a valid address for the virtual CPU\n" ); +panic ("GIC: Cannot find a valid address for the virtual CPU" ); res =dt_device_get_irq (node,0 , &gic.maintenance);if ( res ) -panic ("GIC: Cannot find the maintenance IRQ\n" ); +panic ("GIC: Cannot find the maintenance IRQ" );/* Set the GIC as the primary interrupt controller */ dt_interrupt_controller = node;@@ -438,7 +438,7 @@ void __init gic_init(void)if ( (gic.dbase & ~PAGE_MASK ) || (gic.cbase & ~PAGE_MASK ) || (gic.hbase & ~PAGE_MASK ) || (gic.vbase & ~PAGE_MASK ) ) -panic ("GIC interfaces not page aligned.\n" ); +panic ("GIC interfaces not page aligned" );set_fixmap (FIXMAP_GICD , gic.dbase >>PAGE_SHIFT ,DEV_SHARED ); BUILD_BUG_ON(FIXMAP_ADDR(FIXMAP_GICC1) !=@@ -783,7 +783,7 @@ static void do_sgi(struct cpu_user_regs *regs, int othercpu, enum gic_sgi sgi)smp_call_function_interrupt ();break ;default : -panic ("Unhandled SGI %d on CPU%d\n" , sgi,smp_processor_id ()); +panic ("Unhandled SGI %d on CPU%d" , sgi,smp_processor_id ());break ; }xen/arch/arm/kernel.c +4
-4@@ -87,7 +87,7 @@ static void place_modules(struct kernel_info *info,paddr_t addr;if ( total + kernel_size > mem_size ) -panic ("Not enough memory in the first bank for the dtb+initrd." ); +panic ("Not enough memory in the first bank for the dtb+initrd" );/* * DTB must be loaded such that it does not conflict with the @@ -112,7 +112,7 @@ static void place_modules(struct kernel_info *info, addr = kernel_start - total; else { -panic ("Unable to find suitable location for dtb+initrd." ); +panic ("Unable to find suitable location for dtb+initrd" );return ; }@@ -144,7 +144,7 @@ static void kernel_zimage_load(struct kernel_info *info) rc =gvirt_to_maddr (load_addr + offs, &ma);if ( rc ) { -panic ("\nUnable to map translate guest address\n" ); +panic ("Unable to map translate guest address" );return ; }@@ -314,7 +314,7 @@ static int kernel_try_elf_prepare(struct kernel_info *info, info->kernel_order =get_order_from_bytes (size); info->kernel_img =alloc_xenheap_pages (info->kernel_order,0 );if ( info->kernel_img ==NULL ) -panic ("Cannot allocate temporary buffer for kernel.\n" ); +panic ("Cannot allocate temporary buffer for kernel" );copy_from_paddr (info->kernel_img, addr, size, info->load_attr);xen/arch/arm/mm.c +1
-1@@ -633,7 +633,7 @@ void __init setup_xenheap_mappings(unsigned long base_mfn, xenheap_mfn_start = base_mfn;if ( base_mfn < xenheap_mfn_start ) -early_panic ("cannot add xenheap mapping at %lx below heap start %lx\n" , +early_panic ("cannot add xenheap mapping at %lx below heap start %lx" , base_mfn, xenheap_mfn_start); end_mfn = base_mfn + nr_mfns;xen/arch/arm/platform.c +1
-1@@ -83,7 +83,7 @@ void __init platform_init(void) res = platform->init ();if ( res ) -panic ("Unable to initialize the platform\n" ); +panic ("Unable to initialize the platform" ); }int __init platform_init_time (void )xen/arch/arm/setup.c +5
-5@@ -345,7 +345,7 @@ static paddr_t __init get_xen_paddr(void) }if ( !paddr ) -early_panic ("Not enough memory to relocate Xen\n" ); +early_panic ("Not enough memory to relocate Xen" );early_printk ("Placing Xen at 0x%" PRIpaddr"-0x%" PRIpaddr"\n" , paddr, paddr + min_size);@@ -372,7 +372,7 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)/* TODO: Handle non-contiguous memory bank */ if ( !early_info.mem.nr_banks ) -early_panic ("No memory bank\n" ); +early_panic ("No memory bank" ); ram_start = early_info.mem.bank[0 ].start; ram_size = early_info.mem.bank[0 ].size; ram_end = ram_start + ram_size;@@ -417,7 +417,7 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size) }while ( xenheap_pages >128 <<(20 -PAGE_SHIFT ) );if ( ! e ) -early_panic ("Not not enough space for xenheap\n" ); +early_panic ("Not not enough space for xenheap" ); domheap_pages = heap_pages - xenheap_pages;@@ -695,13 +695,13 @@ void __init start_xen(unsigned long boot_phys_offset,/* Create initial domain 0. */ dom0 =domain_create (0 ,0 ,0 );if (IS_ERR (dom0) || (alloc_dom0_vcpu0 () ==NULL ) ) -panic ("Error creating domain 0\n" ); +panic ("Error creating domain 0" ); dom0->is_privileged =1 ; dom0->target =NULL ;if (construct_dom0 (dom0) !=0 ) -panic ("Could not set up DOM0 guest OS\n" ); +panic ("Could not set up DOM0 guest OS" );/* Scrub RAM that is still free and so may go to an unprivileged domain. XXX too slow in simulator xen/arch/arm/smpboot.c +1
-1@@ -72,7 +72,7 @@ static void setup_cpu_sibling_map(int cpu) {if ( !zalloc_cpumask_var (&per_cpu (cpu_sibling_mask, cpu)) || !zalloc_cpumask_var (&per_cpu (cpu_core_mask, cpu)) ) -panic ("No memory for CPU sibling/core maps\n" ); +panic ("No memory for CPU sibling/core maps" );/* A CPU is a sibling with itself and is always on its own core. */ cpumask_set_cpu (cpu,per_cpu (cpu_sibling_mask, cpu));xen/arch/arm/time.c +4
-4@@ -113,7 +113,7 @@ int __init init_xen_time(void) dev =dt_find_matching_node (NULL , timer_ids);if ( !dev ) -panic ("Unable to find a compatible timer in the device tree\n" ); +panic ("Unable to find a compatible timer in the device tree" );dt_device_set_used_by (dev,DOMID_XEN );@@ -122,7 +122,7 @@ int __init init_xen_time(void) { res =dt_device_get_irq (dev, i, &timer_irq[i]);if ( res ) -panic ("Timer: Unable to retrieve IRQ %u from the device tree\n" , i); +panic ("Timer: Unable to retrieve IRQ %u from the device tree" , i); } printk("Generic Timer IRQ: phys=%u hyp=%u virt=%u\n",@@ -132,11 +132,11 @@ int __init init_xen_time(void) res =platform_init_time ();if ( res ) -panic ("Timer: Cannot initialize platform timer\n" ); +panic ("Timer: Cannot initialize platform timer" );/* Check that this CPU supports the Generic Timer interface */ if ( !cpu_has_gentimer ) -panic ("CPU does not support the Generic Timer v1 interface.\n" ); +panic ("CPU does not support the Generic Timer v1 interface" ); res =dt_property_read_u32 (dev,"clock-frequency" , &rate);if ( res )xen/arch/arm/traps.c +5
-5@@ -253,7 +253,7 @@ void panic_PAR(uint64_t par) second_in_first ?" during second stage lookup" :"" , fsc_level_str(level)); -panic ("Error during Hypervisor-to-physical address translation\n" ); +panic ("Error during Hypervisor-to-physical address translation" ); }static void cpsr_switch_mode (struct cpu_user_regs *regs,int mode)@@ -902,7 +902,7 @@ static void do_debug_trap(struct cpu_user_regs *regs, unsigned int code)show_execution_state (regs);break ;default : -panic ("DOM%d: Unhandled debug trap %#x\n" , domid, code); +panic ("DOM%d: Unhandled debug trap %#x" , domid, code);break ; } }@@ -1187,7 +1187,7 @@ static void do_cp15_32(struct cpu_user_regs *regs,printk ("%s p15, %d, r%d, cr%d, cr%d, %d @ 0x%" PRIregister"\n" , cp32.read ?"mrc" :"mcr" , cp32.op1, cp32.reg, cp32.crn, cp32.crm, cp32.op2, regs->pc); -panic ("unhandled 32-bit CP15 access %#x\n" , hsr.bits &HSR_CP32_REGS_MASK ); +panic ("unhandled 32-bit CP15 access %#x" , hsr.bits &HSR_CP32_REGS_MASK ); }advance_pc (regs, hsr); }@@ -1217,7 +1217,7 @@ static void do_cp15_64(struct cpu_user_regs *regs,printk ("%s p15, %d, r%d, r%d, cr%d @ 0x%" PRIregister"\n" , cp64.read ?"mrrc" :"mcrr" , cp64.op1, cp64.reg1, cp64.reg2, cp64.crm, regs->pc); -panic ("unhandled 64-bit CP15 access %#x\n" , hsr.bits &HSR_CP64_REGS_MASK ); +panic ("unhandled 64-bit CP15 access %#x" , hsr.bits &HSR_CP64_REGS_MASK ); }advance_pc (regs, hsr); }@@ -1247,7 +1247,7 @@ static void do_sysreg(struct cpu_user_regs *regs, sysreg.op2, sysreg.read ?"=>" :"<=" , sysreg.reg, regs->pc); -panic ("unhandled 64-bit sysreg access %#x\n" , +panic ("unhandled 64-bit sysreg access %#x" , hsr.bits &HSR_SYSREG_REGS_MASK ); }xen/arch/x86/apic.c +2
-2@@ -946,7 +946,7 @@ void __init x2apic_bsp_setup(void)return ; }panic ("x2APIC: already enabled by BIOS, but " -"iommu_supports_eim failed!\n" ); +"iommu_supports_eim failed" ); }if ( (ioapic_entries =alloc_ioapic_entries ()) ==NULL )@@ -968,7 +968,7 @@ void __init x2apic_bsp_setup(void) {if ( x2apic_enabled )panic ("Interrupt remapping could not be enabled while " -"x2APIC is already enabled by BIOS!\n" ); +"x2APIC is already enabled by BIOS" );printk (XENLOG_ERR "Failed to enable Interrupt Remapping: Will not enable x2APIC.\n" );xen/arch/x86/bzimage.c +1
-1@@ -62,7 +62,7 @@ static void flush_window(void);static __init void error (char *x) { -panic ("%s\n" , x); +panic ("%s" , x); }static __init int fill_inbuf (void )xen/arch/x86/cpu/amd.c +1
-1@@ -465,7 +465,7 @@ static void __devinit init_amd(struct cpuinfo_x86 *c)if (!cpu_has_amd_erratum (c,AMD_ERRATUM_121 )) opt_allow_unsafe =1 ;else if (opt_allow_unsafe <0 ) -panic ("Xen will not boot on this CPU for security reasons.\n" +panic ("Xen will not boot on this CPU for security reasons" "Pass \"allow_unsafe\" if you're trusting all your" " (PV) guest kernels.\n" );else if (!opt_allow_unsafe && c == &boot_cpu_data)xen/arch/x86/cpu/mcheck/mce.c +2
-2@@ -523,7 +523,7 @@ void mcheck_cmn_handler(struct cpu_user_regs *regs, long error_code,* recovery job but to reset the system. */ if (atomic_read (&found_error) ==0 ) -mc_panic ("MCE: No CPU found valid MCE, need reset\n" ); +mc_panic ("MCE: No CPU found valid MCE, need reset" );if (!cpumask_empty (&mce_fatal_cpus)) {char *ebufp, ebuf[96 ] ="MCE: Fatal error happened on CPUs " ;@@ -1642,7 +1642,7 @@ static int mce_delayed_action(mctelem_cookie_t mctc)dprintk (XENLOG_ERR ,"MCE delayed action failed\n" ); is_mc_panic =1 ;x86_mcinfo_dump (mctelem_dataptr (mctc)); -panic ("MCE: Software recovery failed for the UCR\n" ); +panic ("MCE: Software recovery failed for the UCR" );break ;case MCER_RECOVERED :dprintk (XENLOG_INFO ,"MCE: Error is successfully recovered\n" );xen/arch/x86/domain_build.c +10
-10@@ -439,7 +439,7 @@ int __init construct_dom0( value = (parms.virt_hv_start_low + mask) & ~mask;BUG_ON (!is_pv_32bit_domain (d));if ( value > __HYPERVISOR_COMPAT_VIRT_START ) -panic ("Domain 0 expects too high a hypervisor start address.\n" ); +panic ("Domain 0 expects too high a hypervisor start address" );HYPERVISOR_COMPAT_VIRT_START (d) = max_t(unsigned int, m2p_compat_vstart, value); }@@ -509,7 +509,7 @@ int __init construct_dom0( count -=PAGE_ALIGN (initrd_len); order =get_order_from_bytes (count);if ( (1UL << order) +PFN_UP (initrd_len) > nr_pages ) -panic ("Domain 0 allocation is too small for kernel image.\n" ); +panic ("Domain 0 allocation is too small for kernel image" );if ( parms.p2m_base !=UNSET_ADDR ) {@@ -518,7 +518,7 @@ int __init construct_dom0( } page =alloc_domheap_pages (d, order,0 );if ( page ==NULL ) -panic ("Not enough RAM for domain 0 allocation.\n" ); +panic ("Not enough RAM for domain 0 allocation" ); alloc_spfn =page_to_mfn (page); alloc_epfn = alloc_spfn + d->tot_pages;@@ -535,7 +535,7 @@ int __init construct_dom0( order =get_order_from_pages (count); page =alloc_domheap_pages (d, order,0 );if ( !page ) -panic ("Not enough RAM for domain 0 initrd.\n" ); +panic ("Not enough RAM for domain 0 initrd" );for ( count = -count; order--; )if ( count & (1UL << order) ) {@@ -618,7 +618,7 @@ int __init construct_dom0( { page =alloc_domheap_page (NULL ,0 );if ( !page ) -panic ("Not enough RAM for domain 0 PML4.\n" ); +panic ("Not enough RAM for domain 0 PML4" ); page->u.inuse.type_info = PGT_l4_page_table|PGT_validated|1 ; l4start = l4tab =page_to_virt (page);maddr_to_page (mpt_alloc)->u.inuse.type_info = PGT_l3_page_table;@@ -830,7 +830,7 @@ int __init construct_dom0( {if ( d->tot_pages + ((round_pgup (vphysmap_end) - va) >>PAGE_SHIFT ) +3 > nr_pages ) -panic ("Dom0 allocation too small for initial P->M table.\n" ); +panic ("Dom0 allocation too small for initial P->M table" );if ( l1tab ) {@@ -929,7 +929,7 @@ int __init construct_dom0( va &=PAGE_MASK ; }if ( !page ) -panic ("Not enough RAM for DOM0 P->M table.\n" ); +panic ("Not enough RAM for DOM0 P->M table" ); }if ( l1tab )@@ -990,7 +990,7 @@ int __init construct_dom0(while ( pfn < nr_pages ) {if ( (page =alloc_chunk (d, nr_pages - d->tot_pages)) ==NULL ) -panic ("Not enough RAM for DOM0 reservation.\n" ); +panic ("Not enough RAM for DOM0 reservation" );while ( pfn < d->tot_pages ) { mfn =page_to_mfn (page);@@ -1072,12 +1072,12 @@ int __init construct_dom0(printk ("Dom0 runs in ring 0 (supervisor mode)\n" );if ( !test_bit (XENFEAT_supervisor_mode_kernel, parms.f_supported) ) -panic ("Dom0 does not support supervisor-mode execution\n" ); +panic ("Dom0 does not support supervisor-mode execution" ); }else {if (test_bit (XENFEAT_supervisor_mode_kernel, parms.f_required) ) -panic ("Dom0 requires supervisor-mode execution\n" ); +panic ("Dom0 requires supervisor-mode execution" ); } rc =0 ;xen/arch/x86/hvm/svm/intr.c +1
-1@@ -175,7 +175,7 @@ void svm_intr_assist(void)/* Guest already enabled an interrupt window. */ return ;default : -panic ("%s: nestedsvm_vcpu_interrupt can't handle value %#x\n" , +panic ("%s: nestedsvm_vcpu_interrupt can't handle value %#x" , __func__, rc); } }xen/arch/x86/io_apic.c +2
-2@@ -1421,7 +1421,7 @@ static void __init setup_ioapic_ids_from_mpc(void)if (!physid_isset (i, phys_id_present_map))break ;if (i >=get_physical_broadcast ()) -panic ("Max APIC ID exceeded!\n" ); +panic ("Max APIC ID exceeded" );printk (KERN_ERR "... fixing up to %d. (tell your hw vendor)\n" , i); mp_ioapics[apic].mpc_apicid = i;@@ -2135,7 +2135,7 @@ int __init io_apic_get_unique_id (int ioapic, int apic_id) }if (i ==get_physical_broadcast ()) -panic ("Max apic_id exceeded!\n" ); +panic ("Max apic_id exceeded" );printk (KERN_WARNING "IOAPIC[%d]: apic_id %d already used, " "trying %d\n" , ioapic, apic_id, i);xen/arch/x86/mm/mm-locks.h +1
-1@@ -73,7 +73,7 @@ static inline void _mm_lock(mm_lock_t *l, const char *func, int level, int rec) l->unlock_level =__get_lock_level (); }else if ( (unlikely (!rec)) ) -panic ("mm lock already held by %s\n" , l->locker_function); +panic ("mm lock already held by %s" , l->locker_function);__set_lock_level (level); }xen/arch/x86/mpparse.c +5
-5@@ -221,7 +221,7 @@ static void __init MP_ioapic_info (struct mpc_config_ioapic *m)if (nr_ioapics >=MAX_IO_APICS ) {printk (KERN_CRIT "Max # of I/O APICs (%d) exceeded (found %d).\n" ,MAX_IO_APICS , nr_ioapics); -panic ("Recompile kernel with bigger MAX_IO_APICS!.\n" ); +panic ("Recompile kernel with bigger MAX_IO_APICS" ); }if (!m->mpc_apicaddr) { printk(KERN_ERR "WARNING: bogus zero I/O APIC address"@@ -241,7 +241,7 @@ static void __init MP_intsrc_info (struct mpc_config_intsrc *m) (m->mpc_irqflag >>2 ) &3 , m->mpc_srcbus, m->mpc_srcbusirq, m->mpc_dstapic, m->mpc_dstirq);if (++mp_irq_entries ==MAX_IRQ_SOURCES ) -panic ("Max # of irq sources exceeded!!\n" ); +panic ("Max # of irq sources exceeded" ); }static void __init MP_lintsrc_info (struct mpc_config_lintsrc *m)@@ -844,7 +844,7 @@ void __init mp_register_ioapic (if (nr_ioapics >=MAX_IO_APICS ) {printk (KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded " "(found %d)\n" ,MAX_IO_APICS , nr_ioapics); -panic ("Recompile kernel with bigger MAX_IO_APICS!\n" ); +panic ("Recompile kernel with bigger MAX_IO_APICS" ); }if (!address) { printk(KERN_ERR "WARNING: Bogus (zero) I/O APIC address"@@ -943,7 +943,7 @@ void __init mp_override_legacy_irq ( mp_irqs[mp_irq_entries] = intsrc;if (++mp_irq_entries ==MAX_IRQ_SOURCES ) -panic ("Max # of irq sources exceeded!\n" ); +panic ("Max # of irq sources exceeded" );return ; }@@ -1009,7 +1009,7 @@ void __init mp_config_acpi_legacy_irqs (void) mp_irqs[mp_irq_entries] = intsrc;if (++mp_irq_entries ==MAX_IRQ_SOURCES ) -panic ("Max # of irq sources exceeded!\n" ); +panic ("Max # of irq sources exceeded" ); } }xen/arch/x86/setup.c +3
-3@@ -1330,12 +1330,12 @@ void __init __start_xen(unsigned long mbi_p)watchdog_setup ();if ( !tboot_protect_mem_regions () ) -panic ("Could not protect TXT memory regions\n" ); +panic ("Could not protect TXT memory regions" );/* Create initial domain 0. */ dom0 =domain_create (0 , DOMCRF_s3_integrity,0 );if (IS_ERR (dom0) || (alloc_dom0_vcpu0 () ==NULL ) ) -panic ("Error creating domain 0\n" ); +panic ("Error creating domain 0" ); dom0->is_privileged =1 ; dom0->target =NULL ;@@ -1390,7 +1390,7 @@ void __init __start_xen(unsigned long mbi_p) (initrdidx > 0) && (initrdidx < mbi->mods_count) ? mod + initrdidx : NULL, bootstrap_map, cmdline) != 0) -panic ("Could not set up DOM0 guest OS\n" ); +panic ("Could not set up DOM0 guest OS" );/* Scrub RAM that is still free and so may go to an unprivileged domain. */ scrub_heap_pages ();xen/arch/x86/smpboot.c +1
-1@@ -735,7 +735,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)if ( !zalloc_cpumask_var (&per_cpu (cpu_sibling_mask,0 )) || !zalloc_cpumask_var (&per_cpu (cpu_core_mask,0 )) ) -panic ("No memory for boot CPU sibling/core maps\n" ); +panic ("No memory for boot CPU sibling/core maps" );set_cpu_sibling_map (0 );xen/arch/x86/tboot.c +1
-1@@ -528,7 +528,7 @@ void tboot_s3_error(int error)printk ("MAC for %s before S3 is: 0x%08" PRIx64"\n" , what, orig_mac);printk ("MAC for %s after S3 is: 0x%08" PRIx64"\n" , what, resume_mac); -panic ("Memory integrity was lost on resume (%d)\n" , error); +panic ("Memory integrity was lost on resume (%d)" , error); }int tboot_wake_ap (int apicid,unsigned long sipi_vec)xen/arch/x86/time.c +1
-1@@ -690,7 +690,7 @@ static unsigned long get_cmos_time(void) }if (unlikely (acpi_gbl_FADT.boot_flags &ACPI_FADT_NO_CMOS_RTC ) ) -panic ("System without CMOS RTC must be booted from EFI\n" ); +panic ("System without CMOS RTC must be booted from EFI" );spin_lock_irqsave (&rtc_lock, flags);xen/arch/x86/traps.c +7
-7@@ -422,7 +422,7 @@ void fatal_trap(int trapnr, struct cpu_user_regs *regs) }panic ("FATAL TRAP: vector = %d (%s)\n" -"[error_code=%04x] %s\n" , +"[error_code=%04x] %s" , trapnr,trapstr (trapnr), regs->error_code, (regs->eflags &X86_EFLAGS_IF ) ?"" :", IN INTERRUPT CONTEXT" ); }@@ -569,7 +569,7 @@ static inline void do_trap(show_execution_state (regs);panic ("FATAL TRAP: vector = %d (%s)\n" -"[error_code=%04x]\n" , +"[error_code=%04x]" , trapnr,trapstr (trapnr), regs->error_code); }@@ -1017,7 +1017,7 @@ void do_invalid_op(struct cpu_user_regs *regs)printk ("Xen BUG at %s%s:%d\n" , prefix, filename, lineno);DEBUGGER_trap_fatal (TRAP_invalid_op, regs);show_execution_state (regs); -panic ("Xen BUG at %s%s:%d\n" , prefix, filename, lineno); +panic ("Xen BUG at %s%s:%d" , prefix, filename, lineno);case BUGFRAME_assert:/* ASSERT: decode the predicate string pointer. */ @@ -1029,7 +1029,7 @@ void do_invalid_op(struct cpu_user_regs *regs) predicate, prefix, filename, lineno);DEBUGGER_trap_fatal (TRAP_invalid_op, regs);show_execution_state (regs); -panic ("Assertion '%s' failed at %s%s:%d\n" , +panic ("Assertion '%s' failed at %s%s:%d" , predicate, prefix, filename, lineno); }@@ -1042,7 +1042,7 @@ void do_invalid_op(struct cpu_user_regs *regs) }DEBUGGER_trap_fatal (TRAP_invalid_op, regs);show_execution_state (regs); -panic ("FATAL TRAP: vector = %d (invalid opcode)\n" , TRAP_invalid_op); +panic ("FATAL TRAP: vector = %d (invalid opcode)" , TRAP_invalid_op); }void do_int3 (struct cpu_user_regs *regs)@@ -1397,7 +1397,7 @@ void do_page_fault(struct cpu_user_regs *regs)show_page_walk (addr);panic ("FATAL PAGE FAULT\n" "[error_code=%04x]\n" -"Faulting linear address: %p\n" , +"Faulting linear address: %p" , error_code,_p (addr)); }@@ -3078,7 +3078,7 @@ void do_general_protection(struct cpu_user_regs *regs) hardware_gp:show_execution_state (regs); -panic ("GENERAL PROTECTION FAULT\n[error_code=%04x]\n" , regs->error_code); +panic ("GENERAL PROTECTION FAULT\n[error_code=%04x]" , regs->error_code); } static DEFINE_PER_CPU(struct softirq_trap, softirq_trap);xen/arch/x86/x86_64/mm.c +1
-1@@ -740,7 +740,7 @@ void __init paging_init(void)return ; nomem: -panic ("Not enough memory for m2p table\n" ); +panic ("Not enough memory for m2p table" ); }void __init zap_low_mappings (void )xen/arch/x86/x86_64/traps.c +1
-1@@ -250,7 +250,7 @@ void do_double_fault(struct cpu_user_regs *regs)_show_registers (regs, crs, CTXT_hypervisor,NULL );show_stack_overflow (cpu, regs); -panic ("DOUBLE FAULT -- system shutdown\n" ); +panic ("DOUBLE FAULT -- system shutdown" ); }void toggle_guest_mode (struct vcpu *v)xen/common/page_alloc.c +1
-1@@ -92,7 +92,7 @@ static unsigned int __initdata nr_bootmem_regions;static void __init boot_bug (int line) { -panic ("Boot BUG at %s:%d\n" , __FILE__, line); +panic ("Boot BUG at %s:%d" , __FILE__, line); }#define BOOT_BUG_ON (p) if ( p ) boot_bug(__LINE__);xen/common/schedule.c +1
-1@@ -1389,7 +1389,7 @@ void __init scheduler_init(void)printk ("Using scheduler: %s (%s)\n" , ops.name, ops.opt_name);if (SCHED_OP (&ops, init) ) -panic ("scheduler returned error on init\n" ); +panic ("scheduler returned error on init" ); if ( sched_ratelimit_us && (sched_ratelimit_us > XEN_SYSCTL_SCHED_RATELIMIT_MAXxen/drivers/char/console.c +2
-2@@ -1057,7 +1057,7 @@ void panic(const char *fmt, ...)console_start_sync ();printk ("\n****************************************\n" );printk ("Panic on CPU %d:\n" ,smp_processor_id ()); -printk ("%s" , buf); +printk ("%s\n" , buf);printk ("****************************************\n\n" );if ( opt_noreboot )printk ("Manual reset required ('noreboot' specified)\n" );@@ -1088,7 +1088,7 @@ void __bug(char *file, int line)console_start_sync ();printk ("Xen BUG at %s:%d\n" , file, line);dump_execution_state (); -panic ("Xen BUG at %s:%d\n" , file, line); +panic ("Xen BUG at %s:%d" , file, line);for ( ; ; ) ; }xen/drivers/passthrough/iommu.c +1
-1@@ -475,7 +475,7 @@ int __init iommu_setup(void)if ( (force_iommu && !iommu_enabled) || (force_intremap && !iommu_intremap) ) -panic ("Couldn't enable %s and iommu=required/force\n" , +panic ("Couldn't enable %s and iommu=required/force" , !iommu_enabled ?"IOMMU" :"Interrupt Remapping" );if ( !iommu_enabled )xen/drivers/passthrough/pci.c +1
-1@@ -104,7 +104,7 @@ void __init pt_pci_init(void) {radix_tree_init (&pci_segments);if ( !alloc_pseg (0 ) ) -panic ("Could not initialize PCI segment 0\n" ); +panic ("Could not initialize PCI segment 0" ); }int __init pci_add_segment (u16 seg)xen/drivers/passthrough/vtd/dmar.h +1
-1@@ -118,7 +118,7 @@ do { \break ; \if (NOW () > start_time +DMAR_OPERATION_TIMEOUT ) { \if ( !kexecing ) \ -panic ("%s:%d:%s: DMAR hardware is malfunctional\n" ,\ +panic ("%s:%d:%s: DMAR hardware is malfunctional" ,\ __FILE__, __LINE__, __func__); \else \break ; \xen/drivers/passthrough/vtd/iommu.c +2
-2@@ -722,7 +722,7 @@ static void iommu_enable_translation(struct acpi_drhd_unit *drhd)if (is_igd_drhd (drhd) && !is_igd_vt_enabled_quirk () ) {if ( force_iommu ) -panic ("BIOS did not enable IGD for VT properly, crash Xen for security purpose!\n" ); +panic ("BIOS did not enable IGD for VT properly, crash Xen for security purpose" );else { dprintk(XENLOG_WARNING VTDPREFIX,@@ -2344,7 +2344,7 @@ static void vtd_resume(void)return ;if (init_vtd_hw () !=0 && force_iommu ) -panic ("IOMMU setup failed, crash Xen for security purpose!\n" ); +panic ("IOMMU setup failed, crash Xen for security purpose" );for_each_drhd_unit ( drhd ) {xen/drivers/passthrough/vtd/qinval.c +1
-1@@ -220,7 +220,7 @@ static int queue_invalidate_wait(struct iommu *iommu,if (NOW () > (start_time +DMAR_OPERATION_TIMEOUT ) ) {print_qi_regs (iommu); -panic ("queue invalidate wait descriptor was not executed\n" ); +panic ("queue invalidate wait descriptor was not executed" ); }cpu_relax (); }xen/xsm/flask/hooks.c +1
-1@@ -1586,7 +1586,7 @@ static __init int flask_init(void) original_ops = xsm_ops;if (register_xsm (&flask_ops) ) -panic ("Flask: Unable to register with XSM.\n" ); +panic ("Flask: Unable to register with XSM" ); ret =security_load_policy (policy_buffer, policy_size);
Keir Fraser
Acked-byQuoted 11 lines · George Dunlap
Quoted 10 lines · Andrew Cooper
panic()(as well asearly_panic()in arm) is inconsistently called with or without a trailing newline. This results in cases where the lower line of *****s is not on its own line.Change
panic()to always print a newline itself, and update callers not to.In addition,
panic()was occasionally called with a leading newline, and occaionally with trailing punctuation which seems rather redundant given the surrounding context. Fix up these sitiuations as well.
Quoted 5 lines
Quoted 1 line
Signed-off-by Andrew Cooper <[email protected]>Assuming that it does what it says on the tin (only changes strings):
Release-acked-by George Dunlap <[email protected]>
Quoted 1,039 lines
Quoted 1,038 lines
CC Keir Fraser <[email protected]>CC Jan Beulich <[email protected]>CC Ian Campbell <[email protected]>CC Stefano Stabellini <[email protected]>CC Tim Deegan <[email protected]>CC George Dunlap <[email protected]>---
This has been compile tested on arm32 and arm64.
George:
I request that this is included for 4.4 - It is just formatting changes
rather
than functional ones--- xen/arch/arm/arm32/vfp.c | 2 +- xen/arch/arm/arm64/traps.c | 2 +- xen/arch/arm/domain_build.c | 18 +++++++++--------- xen/arch/arm/early_printk.c | 2 +- xen/arch/arm/gic.c | 16 ++++++++-------- xen/arch/arm/kernel.c | 8 ++++---- xen/arch/arm/mm.c | 2 +- xen/arch/arm/platform.c | 2 +- xen/arch/arm/setup.c | 10 +++++----- xen/arch/arm/smpboot.c | 2 +- xen/arch/arm/time.c | 8 ++++---- xen/arch/arm/traps.c | 10 +++++----- xen/arch/x86/apic.c | 4 ++-- xen/arch/x86/bzimage.c | 2 +- xen/arch/x86/cpu/amd.c | 2 +- xen/arch/x86/cpu/mcheck/mce.c | 4 ++-- xen/arch/x86/domain_build.c | 20 ++++++++++---------- xen/arch/x86/hvm/svm/intr.c | 2 +- xen/arch/x86/io_apic.c | 4 ++-- xen/arch/x86/mm/mm-locks.h | 2 +- xen/arch/x86/mpparse.c | 10 +++++----- xen/arch/x86/setup.c | 6 +++--- xen/arch/x86/smpboot.c | 2 +- xen/arch/x86/tboot.c | 2 +- xen/arch/x86/time.c | 2 +- xen/arch/x86/traps.c | 14 +++++++------- xen/arch/x86/x86_64/mm.c | 2 +- xen/arch/x86/x86_64/traps.c | 2 +- xen/common/page_alloc.c | 2 +- xen/common/schedule.c | 2 +- xen/drivers/char/console.c | 4 ++-- xen/drivers/passthrough/iommu.c | 2 +- xen/drivers/passthrough/pci.c | 2 +- xen/drivers/passthrough/vtd/dmar.h | 2 +- xen/drivers/passthrough/vtd/iommu.c | 4 ++-- xen/drivers/passthrough/vtd/qinval.c | 2 +- xen/xsm/flask/hooks.c | 2 +- 37 files changed, 92 insertions(+), 92 deletions(-)xen/arch/arm/arm32/vfp.c +1
-1@@ -80,7 +80,7 @@ static __init int vfp_init(void) vfparch = (vfpsid &FPSID_ARCH_MASK ) >>FPSID_ARCH_BIT ;if ( vfparch <2 ) -panic ("Xen only support VFP 3\n" ); +panic ("Xen only support VFP 3" );return 0 ; }xen/arch/arm/arm64/traps.c +1
-1@@ -26,7 +26,7 @@ asmlinkage void do_trap_serror(struct cpu_user_regs *regs) { -panic ("Unhandled serror trap\n" ); +panic ("Unhandled serror trap" ); }static const char *handler[]= {xen/arch/arm/domain_build.c +1
-1@@ -81,7 +81,7 @@ static void allocate_memory_11(struct domain *d, struct kernel_info *kinfo) }if ( !pg ) -panic ("Failed to allocate contiguous memory for dom0\n" ); +panic ("Failed to allocate contiguous memory for dom0" ); spfn =page_to_mfn (pg);start = spfn << PAGE_SHIFT;xen/arch/arm/domain_build.c +1
-1@@ -93,7 +93,7 @@ static void allocate_memory_11(struct domain *d, struct kernel_info *kinfo) res =guest_physmap_add_page (d, spfn, spfn, order);if ( res ) -panic ("Unable to add pages in DOM0: %d\n" , res); +panic ("Unable to add pages in DOM0: %d" , res); kinfo->mem.bank[0 ].start = start;kinfo->mem.bank[0].size = size;xen/arch/arm/domain_build.c +1
-1@@ -123,7 +123,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo) reg =dt_get_property (memory,"reg" , ®_len);if ( reg ==NULL ) -panic ("Memory node has no reg property!\n" ); +panic ("Memory node has no reg property" ); for ( l = 0;kinfo->unassigned_mem > 0 && l + reg_size <= reg_lenxen/arch/arm/domain_build.c +1
-1@@ -133,7 +133,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo) paddr_t start, size;if (dt_device_get_address (memory, bank, &start, &size) ) -panic ("Unable to retrieve the bank %u for %s\n" , +panic ("Unable to retrieve the bank %u for %s" , bank,dt_node_full_name (memory));if ( size > kinfo->unassigned_mem )xen/arch/arm/domain_build.c +1
-1@@ -142,7 +142,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo) printk("Populate P2M %#"PRIx64"->%#"PRIx64"\n", start, start + size);if (p2m_populate_ram (d, start, start + size) <0 ) -panic ("Failed to populate P2M\n" ); +panic ("Failed to populate P2M" ); kinfo->mem.bank[kinfo->mem.nr_banks].start = start; kinfo->mem.bank[kinfo->mem.nr_banks].size = size;kinfo->mem.nr_banks++;xen/arch/arm/domain_build.c +4
-4@@ -908,7 +908,7 @@ static void dtb_load(struct kernel_info *kinfo) rc =raw_copy_to_guest (dtb_virt, kinfo->fdt,fdt_totalsize (kinfo->fdt));if ( rc !=0 ) -panic ("Unable to copy the DTB to dom0 memory (rc = %lu)\n" , rc); +panic ("Unable to copy the DTB to dom0 memory (rc = %lu)" , rc);xfree (kinfo->fdt); }@@ -935,12 +935,12 @@ static void initrd_load(struct kernel_info *kinfo) res =fdt_setprop_inplace_cell (kinfo->fdt, node,"linux,initrd-start" , load_addr);if ( res ) -panic ("Cannot fix up \"linux,initrd-start\" property\n" ); +panic ("Cannot fix up \"linux,initrd-start\" property" ); res =fdt_setprop_inplace_cell (kinfo->fdt, node,"linux,initrd-end" , load_addr + len);if ( res ) -panic ("Cannot fix up \"linux,initrd-end\" property\n" ); +panic ("Cannot fix up \"linux,initrd-end\" property" );for ( offs =0 ; offs < len; ) {@@ -954,7 +954,7 @@ static void initrd_load(struct kernel_info *kinfo) rc =gvirt_to_maddr (load_addr + offs, &ma);if ( rc ) { -panic ("\nUnable to translate guest address\n" ); +panic ("Unable to translate guest address" );return ; }xen/arch/arm/early_printk.c +1
-1@@ -61,7 +61,7 @@ early_panic(const char *fmt, ...)early_vprintk (fmt, args);va_end (args); -early_printk ("\nEarly Panic: Stopping\n" ); +early_printk ("\n\nEarly Panic: Stopping\n" );while (1 ); }xen/arch/arm/gic.c +8
-8@@ -398,29 +398,29 @@ void __init gic_init(void) node =dt_find_interrupt_controller (gic_ids);if ( !node ) -panic ("Unable to find compatible GIC in the device tree\n" ); +panic ("Unable to find compatible GIC in the device tree" );dt_device_set_used_by (node,DOMID_XEN ); res =dt_device_get_address (node,0 , &gic.dbase,NULL );if ( res || !gic.dbase || (gic.dbase & ~PAGE_MASK ) ) -panic ("GIC: Cannot find a valid address for the distributor\n" ); +panic ("GIC: Cannot find a valid address for the distributor" ); res =dt_device_get_address (node,1 , &gic.cbase,NULL );if ( res || !gic.cbase || (gic.cbase & ~PAGE_MASK ) ) -panic ("GIC: Cannot find a valid address for the CPU\n" ); +panic ("GIC: Cannot find a valid address for the CPU" ); res =dt_device_get_address (node,2 , &gic.hbase,NULL );if ( res || !gic.hbase || (gic.hbase & ~PAGE_MASK ) ) -panic ("GIC: Cannot find a valid address for the hypervisor\n" ); +panic ("GIC: Cannot find a valid address for the hypervisor" ); res =dt_device_get_address (node,3 , &gic.vbase,NULL );if ( res || !gic.vbase || (gic.vbase & ~PAGE_MASK ) ) -panic ("GIC: Cannot find a valid address for the virtual CPU\n" ); +panic ("GIC: Cannot find a valid address for the virtual CPU" ); res =dt_device_get_irq (node,0 , &gic.maintenance);if ( res ) -panic ("GIC: Cannot find the maintenance IRQ\n" ); +panic ("GIC: Cannot find the maintenance IRQ" );/* Set the GIC as the primary interrupt controller */ dt_interrupt_controller = node;@@ -438,7 +438,7 @@ void __init gic_init(void)if ( (gic.dbase & ~PAGE_MASK ) || (gic.cbase & ~PAGE_MASK ) || (gic.hbase & ~PAGE_MASK ) || (gic.vbase & ~PAGE_MASK ) ) -panic ("GIC interfaces not page aligned.\n" ); +panic ("GIC interfaces not page aligned" );set_fixmap (FIXMAP_GICD , gic.dbase >>PAGE_SHIFT ,DEV_SHARED ); BUILD_BUG_ON(FIXMAP_ADDR(FIXMAP_GICC1) !=@@ -783,7 +783,7 @@ static void do_sgi(struct cpu_user_regs *regs, int othercpu, enum gic_sgi sgi)smp_call_function_interrupt ();break ;default : -panic ("Unhandled SGI %d on CPU%d\n" , sgi,smp_processor_id ()); +panic ("Unhandled SGI %d on CPU%d" , sgi,smp_processor_id ());break ; }xen/arch/arm/kernel.c +4
-4@@ -87,7 +87,7 @@ static void place_modules(struct kernel_info *info,paddr_t addr;if ( total + kernel_size > mem_size ) -panic ("Not enough memory in the first bank for the dtb+initrd." ); +panic ("Not enough memory in the first bank for the dtb+initrd" );/* * DTB must be loaded such that it does not conflict with the @@ -112,7 +112,7 @@ static void place_modules(struct kernel_info *info, addr = kernel_start - total; else { -panic ("Unable to find suitable location for dtb+initrd." ); +panic ("Unable to find suitable location for dtb+initrd" );return ; }@@ -144,7 +144,7 @@ static void kernel_zimage_load(struct kernel_info *info) rc =gvirt_to_maddr (load_addr + offs, &ma);if ( rc ) { -panic ("\nUnable to map translate guest address\n" ); +panic ("Unable to map translate guest address" );return ; }@@ -314,7 +314,7 @@ static int kernel_try_elf_prepare(struct kernel_info *info, info->kernel_order =get_order_from_bytes (size); info->kernel_img =alloc_xenheap_pages (info->kernel_order,0 );if ( info->kernel_img ==NULL ) -panic ("Cannot allocate temporary buffer for kernel.\n" ); +panic ("Cannot allocate temporary buffer for kernel" );copy_from_paddr (info->kernel_img, addr, size, info->load_attr);xen/arch/arm/mm.c +1
-1@@ -633,7 +633,7 @@ void __init setup_xenheap_mappings(unsigned long base_mfn, xenheap_mfn_start = base_mfn;if ( base_mfn < xenheap_mfn_start ) - early_panic("cannot add xenheap mapping at %lx below heap start %lx\n", + early_panic("cannot add xenheap mapping at %lx below heap start %lx",base_mfn, xenheap_mfn_start); end_mfn = base_mfn + nr_mfns;xen/arch/arm/platform.c +1
-1@@ -83,7 +83,7 @@ void __init platform_init(void) res = platform->init ();if ( res ) -panic ("Unable to initialize the platform\n" ); +panic ("Unable to initialize the platform" ); }int __init platform_init_time (void )xen/arch/arm/setup.c +2
-2@@ -345,7 +345,7 @@ static paddr_t __init get_xen_paddr(void) }if ( !paddr ) -early_panic ("Not enough memory to relocate Xen\n" ); +early_panic ("Not enough memory to relocate Xen" );early_printk ("Placing Xen at 0x%" PRIpaddr"-0x%" PRIpaddr"\n" , paddr, paddr + min_size);@@ -372,7 +372,7 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)/* TODO: Handle non-contiguous memory bank */ if ( !early_info.mem.nr_banks ) -early_panic ("No memory bank\n" ); +early_panic ("No memory bank" ); ram_start = early_info.mem.bank[0 ].start; ram_size = early_info.mem.bank[0 ].size;ram_end = ram_start + ram_size;xen/arch/arm/setup.c +3
-3@@ -417,7 +417,7 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size) }while ( xenheap_pages >128 <<(20 -PAGE_SHIFT ) );if ( ! e ) -early_panic ("Not not enough space for xenheap\n" ); +early_panic ("Not not enough space for xenheap" ); domheap_pages = heap_pages - xenheap_pages;@@ -695,13 +695,13 @@ void __init start_xen(unsigned long boot_phys_offset,/* Create initial domain 0. */ dom0 =domain_create (0 ,0 ,0 );if (IS_ERR (dom0) || (alloc_dom0_vcpu0 () ==NULL ) ) -panic ("Error creating domain 0\n" ); +panic ("Error creating domain 0" ); dom0->is_privileged =1 ; dom0->target =NULL ;if (construct_dom0 (dom0) !=0 ) -panic ("Could not set up DOM0 guest OS\n" ); +panic ("Could not set up DOM0 guest OS" );/* Scrub RAM that is still free and so may go to an unprivileged domain.
XXX too slow in simulatorxen/arch/arm/smpboot.c +1
-1@@ -72,7 +72,7 @@ static void setup_cpu_sibling_map(int cpu) {if ( !zalloc_cpumask_var (&per_cpu (cpu_sibling_mask, cpu)) || !zalloc_cpumask_var (&per_cpu (cpu_core_mask, cpu)) ) -panic ("No memory for CPU sibling/core maps\n" ); +panic ("No memory for CPU sibling/core maps" );/* A CPU is a sibling with itself and is always on its own core. */ cpumask_set_cpu (cpu,per_cpu (cpu_sibling_mask, cpu));xen/arch/arm/time.c +2
-2@@ -113,7 +113,7 @@ int __init init_xen_time(void) dev =dt_find_matching_node (NULL , timer_ids);if ( !dev ) -panic ("Unable to find a compatible timer in the device tree\n" ); +panic ("Unable to find a compatible timer in the device tree" );dt_device_set_used_by (dev,DOMID_XEN );@@ -122,7 +122,7 @@ int __init init_xen_time(void) { res =dt_device_get_irq (dev, i, &timer_irq[i]);if ( res ) -panic ("Timer: Unable to retrieve IRQ %u from the device tree\n" , i); +panic ("Timer: Unable to retrieve IRQ %u from the device tree" , i); }printk("Generic Timer IRQ: phys=%u hyp=%u virt=%u\n",
xen/arch/arm/time.c +2
-2@@ -132,11 +132,11 @@ int __init init_xen_time(void) res =platform_init_time ();if ( res ) -panic ("Timer: Cannot initialize platform timer\n" ); +panic ("Timer: Cannot initialize platform timer" );/* Check that this CPU supports the Generic Timer interface */ if ( !cpu_has_gentimer ) -panic ("CPU does not support the Generic Timer v1 interface.\n" ); +panic ("CPU does not support the Generic Timer v1 interface" ); res =dt_property_read_u32 (dev,"clock-frequency" , &rate);if ( res )xen/arch/arm/traps.c +2
-2@@ -253,7 +253,7 @@ void panic_PAR(uint64_t par) second_in_first ?" during second stage lookup" :"" , fsc_level_str(level)); -panic ("Error during Hypervisor-to-physical address translation\n" ); +panic ("Error during Hypervisor-to-physical address translation" ); }static void cpsr_switch_mode (struct cpu_user_regs *regs,int mode)@@ -902,7 +902,7 @@ static void do_debug_trap(struct cpu_user_regs *regs, unsigned int code)show_execution_state (regs );break ;default : -panic ("DOM%d: Unhandled debug trap %#x\n" , domid, code); +panic ("DOM%d: Unhandled debug trap %#x" , domid, code);break ; }}xen/arch/arm/traps.c +1
-1@@ -1187,7 +1187,7 @@ static void do_cp15_32(struct cpu_user_regs *regs,printk ("%s p15, %d, r%d, cr%d, cr%d, %d @ 0x%" PRIregister"\n" , cp32.read ?"mrc" :"mcr" , cp32.op1, cp32.reg, cp32.crn, cp32.crm, cp32.op2, regs->pc); -panic ("unhandled 32-bit CP15 access %#x\n" , hsr.bits & HSR_CP32_REGS_MASK); +panic ("unhandled 32-bit CP15 access %#x" , hsr.bits &HSR_CP32_REGS_MASK ); }advance_pc(regs, hsr);}
xen/arch/arm/traps.c +1
-1@@ -1217,7 +1217,7 @@ static void do_cp15_64(struct cpu_user_regs *regs,printk ("%s p15, %d, r%d, r%d, cr%d @ 0x%" PRIregister"\n" , cp64.read ?"mrrc" :"mcrr" , cp64.op1, cp64.reg1, cp64.reg2, cp64.crm, regs->pc); -panic ("unhandled 64-bit CP15 access %#x\n" , hsr.bits & HSR_CP64_REGS_MASK); +panic ("unhandled 64-bit CP15 access %#x" , hsr.bits &HSR_CP64_REGS_MASK ); }advance_pc(regs, hsr);}
xen/arch/arm/traps.c +1
-1@@ -1247,7 +1247,7 @@ static void do_sysreg(struct cpu_user_regs *regs, sysreg.op2, sysreg.read ?"=>" :"<=" , sysreg.reg, regs->pc); -panic ("unhandled 64-bit sysreg access %#x\n" , +panic ("unhandled 64-bit sysreg access %#x" , hsr.bits &HSR_SYSREG_REGS_MASK ); }xen/arch/x86/apic.c +2
-2@@ -946,7 +946,7 @@ void __init x2apic_bsp_setup(void)return ; }panic ("x2APIC: already enabled by BIOS, but " -"iommu_supports_eim failed!\n" ); +"iommu_supports_eim failed" ); }if ( (ioapic_entries =alloc_ioapic_entries ()) ==NULL )@@ -968,7 +968,7 @@ void __init x2apic_bsp_setup(void) { if ( x2apic_enabled ) panic("Interrupt remapping could not be enabled while " - "x2APIC is already enabled by BIOS!\n"); + "x2APIC is already enabled by BIOS"); printk(XENLOG_ERR "Failed to enable Interrupt Remapping: Will not enablex2APIC.\n");
xen/arch/x86/bzimage.c +1
-1@@ -62,7 +62,7 @@ static void flush_window(void);static __init void error (char *x) { -panic ("%s\n" , x); +panic ("%s" , x); }static __init int fill_inbuf (void )xen/arch/x86/cpu/amd.c +1
-1@@ -465,7 +465,7 @@ static void __devinit init_amd(struct cpuinfo_x86 *c)if (!cpu_has_amd_erratum (c,AMD_ERRATUM_121 )) opt_allow_unsafe =1 ;else if (opt_allow_unsafe <0 ) -panic ("Xen will not boot on this CPU for security reasons.\n" +panic ("Xen will not boot on this CPU for security reasons" "Pass \"allow_unsafe\" if you're trusting all your" " (PV) guest kernels.\n" );else if (!opt_allow_unsafe && c == &boot_cpu_data)xen/arch/x86/cpu/mcheck/mce.c +1
-1@@ -523,7 +523,7 @@ void mcheck_cmn_handler(struct cpu_user_regs *regs, longerror_code, * recovery job but to reset the system. */ if (atomic_read (&found_error) ==0 ) -mc_panic ("MCE: No CPU found valid MCE, need reset\n" ); +mc_panic ("MCE: No CPU found valid MCE, need reset" );if (!cpumask_empty (&mce_fatal_cpus)) {char *ebufp, ebuf[96] = "MCE: Fatal error happened on CPUs ";xen/arch/x86/cpu/mcheck/mce.c +1
-1@@ -1642,7 +1642,7 @@ static int mce_delayed_action(mctelem_cookie_t mctc)dprintk (XENLOG_ERR ,"MCE delayed action failed\n" ); is_mc_panic =1 ;x86_mcinfo_dump (mctelem_dataptr (mctc)); -panic ("MCE: Software recovery failed for the UCR\n" ); +panic ("MCE: Software recovery failed for the UCR" );break ;case MCER_RECOVERED :dprintk (XENLOG_INFO ,"MCE: Error is successfully recovered\n" );xen/arch/x86/domain_build.c +1
-1@@ -439,7 +439,7 @@ int __init construct_dom0( value = (parms.virt_hv_start_low + mask) & ~mask;BUG_ON (!is_pv_32bit_domain (d));if ( value > __HYPERVISOR_COMPAT_VIRT_START ) - panic("Domain 0 expects too high a hypervisor start address.\n"); + panic("Domain 0 expects too high a hypervisor start address" );HYPERVISOR_COMPAT_VIRT_START (d) = max_t(unsigned int, m2p_compat_vstart, value);}xen/arch/x86/domain_build.c +5
-5@@ -509,7 +509,7 @@ int __init construct_dom0( count -=PAGE_ALIGN (initrd_len); order =get_order_from_bytes (count);if ( (1UL << order) +PFN_UP (initrd_len) > nr_pages ) -panic ("Domain 0 allocation is too small for kernel image.\n" ); +panic ("Domain 0 allocation is too small for kernel image" );if ( parms.p2m_base !=UNSET_ADDR ) {@@ -518,7 +518,7 @@ int __init construct_dom0( } page =alloc_domheap_pages (d, order,0 );if ( page ==NULL ) -panic ("Not enough RAM for domain 0 allocation.\n" ); +panic ("Not enough RAM for domain 0 allocation" ); alloc_spfn =page_to_mfn (page); alloc_epfn = alloc_spfn + d->tot_pages;@@ -535,7 +535,7 @@ int __init construct_dom0( order =get_order_from_pages (count); page =alloc_domheap_pages (d, order,0 );if ( !page ) -panic ("Not enough RAM for domain 0 initrd.\n" ); +panic ("Not enough RAM for domain 0 initrd" );for ( count = -count; order--; )if ( count & (1UL << order) ) {@@ -618,7 +618,7 @@ int __init construct_dom0( { page =alloc_domheap_page (NULL ,0 );if ( !page ) -panic ("Not enough RAM for domain 0 PML4.\n" ); +panic ("Not enough RAM for domain 0 PML4" ); page->u.inuse.type_info = PGT_l4_page_table|PGT_validated|1 ; l4start = l4tab =page_to_virt (page);maddr_to_page (mpt_alloc)->u.inuse.type_info = PGT_l3_page_table;@@ -830,7 +830,7 @@ int __init construct_dom0( {if ( d->tot_pages + ((round_pgup (vphysmap_end) - va) >>PAGE_SHIFT ) +3 > nr_pages ) - panic("Dom0 allocation too small for initial P->M table.\n"); +panic ("Dom0 allocation too small for initial P->M table" );if ( l1tab ){xen/arch/x86/domain_build.c +4
-4@@ -929,7 +929,7 @@ int __init construct_dom0( va &=PAGE_MASK ; }if ( !page ) -panic ("Not enough RAM for DOM0 P->M table.\n" ); +panic ("Not enough RAM for DOM0 P->M table" ); }if ( l1tab )@@ -990,7 +990,7 @@ int __init construct_dom0(while ( pfn < nr_pages ) {if ( (page =alloc_chunk (d, nr_pages - d->tot_pages)) ==NULL ) -panic ("Not enough RAM for DOM0 reservation.\n" ); +panic ("Not enough RAM for DOM0 reservation" );while ( pfn < d->tot_pages ) { mfn =page_to_mfn (page);@@ -1072,12 +1072,12 @@ int __init construct_dom0(printk ("Dom0 runs in ring 0 (supervisor mode)\n" );if ( !test_bit (XENFEAT_supervisor_mode_kernel, parms.f_supported) ) -panic ("Dom0 does not support supervisor-mode execution\n" ); +panic ("Dom0 does not support supervisor-mode execution" ); }else {if (test_bit (XENFEAT_supervisor_mode_kernel, parms.f_required) ) -panic ("Dom0 requires supervisor-mode execution\n" ); +panic ("Dom0 requires supervisor-mode execution" ); } rc =0 ;xen/arch/x86/hvm/svm/intr.c +1
-1@@ -175,7 +175,7 @@ void svm_intr_assist(void)/* Guest already enabled an interrupt window. */ return ;default : -panic ("%s: nestedsvm_vcpu_interrupt can't handle value %#x\n", +panic ("%s: nestedsvm_vcpu_interrupt can't handle value %#x" , __func__, rc); }}xen/arch/x86/io_apic.c +2
-2@@ -1421,7 +1421,7 @@ static void __init setup_ioapic_ids_from_mpc(void)if (!physid_isset (i, phys_id_present_map))break ;if (i >=get_physical_broadcast ()) -panic ("Max APIC ID exceeded!\n" ); +panic ("Max APIC ID exceeded" );printk (KERN_ERR "... fixing up to %d. (tell your hw vendor)\n" , i); mp_ioapics[apic].mpc_apicid = i;@@ -2135,7 +2135,7 @@ int __init io_apic_get_unique_id (int ioapic, int apic_id) }if (i ==get_physical_broadcast ()) -panic ("Max apic_id exceeded!\n" ); +panic ("Max apic_id exceeded" ); printk(KERN_WARNING "IOAPIC[%d]: apic_id %d already used, ""trying %d\n", ioapic, apic_id, i);xen/arch/x86/mm/mm-locks.h +1
-1@@ -73,7 +73,7 @@ static inline void _mm_lock(mm_lock_t *l, const char *func, int level, int rec) l->unlock_level = __get_lock_level(); }else if ( (unlikely (!rec)) ) -panic ("mm lock already held by %s\n" , l->locker_function); +panic ("mm lock already held by %s" , l->locker_function);__set_lock_level (level); }xen/arch/x86/mpparse.c +1
-1@@ -221,7 +221,7 @@ static void __init MP_ioapic_info (struct mpc_config_ioapic *m)if (nr_ioapics >=MAX_IO_APICS ) {printk (KERN_CRIT "Max # of I/O APICs (%d) exceeded (found %d).\n" ,MAX_IO_APICS , nr_ioapics); -panic ("Recompile kernel with bigger MAX_IO_APICS!.\n" ); +panic ("Recompile kernel with bigger MAX_IO_APICS" ); }if (!m->mpc_apicaddr) {printk(KERN_ERR "WARNING: bogus zero I/O APIC address"
xen/arch/x86/mpparse.c +1
-1@@ -241,7 +241,7 @@ static void __init MP_intsrc_info (struct mpc_config_intsrc *m) (m->mpc_irqflag >> 2) & 3, m->mpc_srcbus, m->mpc_srcbusirq, m->mpc_dstapic, m->mpc_dstirq);if (++mp_irq_entries ==MAX_IRQ_SOURCES ) -panic ("Max # of irq sources exceeded!!\n" ); +panic ("Max # of irq sources exceeded" ); }static void
__initMP_lintsrc_info(structmpc_config_lintsrc*m)xen/arch/x86/mpparse.c +0
-0@@ -844,7 +844,7 @@ void __init mp_register_ioapic (if (nr_ioapics >=MAX_IO_APICS ) {
printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded " "(found %d)\n", MAX_IO_APICS, nr_ioapics);xen/arch/x86/mpparse.c +1
-1-panic ("Recompile kernel with bigger MAX_IO_APICS!\n" ); +panic ("Recompile kernel with bigger MAX_IO_APICS" );}
if (!address) {
printk(KERN_ERR "WARNING: Bogus (zero) I/O APIC address"xen/arch/x86/mpparse.c +2
-2@@ -943,7 +943,7 @@ void __init mp_override_legacy_irq ( mp_irqs[mp_irq_entries] = intsrc;if (++mp_irq_entries ==MAX_IRQ_SOURCES ) -panic ("Max # of irq sources exceeded!\n" ); +panic ("Max # of irq sources exceeded" );return ; }@@ -1009,7 +1009,7 @@ void __init mp_config_acpi_legacy_irqs (void) mp_irqs[mp_irq_entries] = intsrc;if (++mp_irq_entries ==MAX_IRQ_SOURCES ) -panic ("Max # of irq sources exceeded!\n" ); +panic ("Max # of irq sources exceeded" ); } }xen/arch/x86/setup.c +3
-3@@ -1330,12 +1330,12 @@ void __init __start_xen(unsigned long mbi_p)watchdog_setup ();if ( !tboot_protect_mem_regions () ) -panic ("Could not protect TXT memory regions\n" ); +panic ("Could not protect TXT memory regions" );/* Create initial domain 0. */ dom0 =domain_create (0 , DOMCRF_s3_integrity,0 );if (IS_ERR (dom0) || (alloc_dom0_vcpu0 () ==NULL ) ) -panic ("Error creating domain 0\n" ); +panic ("Error creating domain 0" ); dom0->is_privileged =1 ; dom0->target =NULL ;@@ -1390,7 +1390,7 @@ void __init __start_xen(unsigned long mbi_p) (initrdidx > 0) && (initrdidx < mbi->mods_count) ? mod + initrdidx : NULL, bootstrap_map, cmdline) != 0) -panic ("Could not set up DOM0 guest OS\n" ); +panic ("Could not set up DOM0 guest OS" );/* Scrub RAM that is still free and so may go to an unprivileged domain. */
scrub_heap_pages();xen/arch/x86/smpboot.c +1
-1@@ -735,7 +735,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)if ( !zalloc_cpumask_var (&per_cpu (cpu_sibling_mask,0 )) || !zalloc_cpumask_var (&per_cpu (cpu_core_mask,0 )) ) -panic ("No memory for boot CPU sibling/core maps\n" ); +panic ("No memory for boot CPU sibling/core maps" );set_cpu_sibling_map (0 );xen/arch/x86/tboot.c +1
-1@@ -528,7 +528,7 @@ void tboot_s3_error(int error)printk ("MAC for %s before S3 is: 0x%08" PRIx64"\n" , what, orig_mac);printk ("MAC for %s after S3 is: 0x%08" PRIx64"\n" , what, resume_mac); -panic ("Memory integrity was lost on resume (%d)\n" , error); +panic ("Memory integrity was lost on resume (%d)" , error); }int tboot_wake_ap (int apicid,unsigned long sipi_vec)xen/arch/x86/time.c +1
-1@@ -690,7 +690,7 @@ static unsigned long get_cmos_time(void) }if (unlikely (acpi_gbl_FADT.boot_flags &ACPI_FADT_NO_CMOS_RTC ) ) -panic ("System without CMOS RTC must be booted from EFI\n" ); +panic ("System without CMOS RTC must be booted from EFI" );spin_lock_irqsave (&rtc_lock, flags);xen/arch/x86/traps.c +7
-7@@ -422,7 +422,7 @@ void fatal_trap(int trapnr, struct cpu_user_regs *regs) }panic ("FATAL TRAP: vector = %d (%s)\n" -"[error_code=%04x] %s\n" , +"[error_code=%04x] %s" , trapnr,trapstr (trapnr), regs->error_code, (regs->eflags &X86_EFLAGS_IF ) ?"" :", IN INTERRUPT CONTEXT" ); }@@ -569,7 +569,7 @@ static inline void do_trap(show_execution_state (regs);panic ("FATAL TRAP: vector = %d (%s)\n" -"[error_code=%04x]\n" , +"[error_code=%04x]" , trapnr,trapstr (trapnr), regs->error_code); }@@ -1017,7 +1017,7 @@ void do_invalid_op(struct cpu_user_regs *regs)printk ("Xen BUG at %s%s:%d\n" , prefix, filename, lineno);DEBUGGER_trap_fatal (TRAP_invalid_op, regs);show_execution_state (regs); -panic ("Xen BUG at %s%s:%d\n" , prefix, filename, lineno); +panic ("Xen BUG at %s%s:%d" , prefix, filename, lineno);case BUGFRAME_assert:/* ASSERT: decode the predicate string pointer. */ @@ -1029,7 +1029,7 @@ void do_invalid_op(struct cpu_user_regs *regs) predicate, prefix, filename, lineno);DEBUGGER_trap_fatal (TRAP_invalid_op, regs);show_execution_state (regs); -panic ("Assertion '%s' failed at %s%s:%d\n" , +panic ("Assertion '%s' failed at %s%s:%d" , predicate, prefix, filename, lineno); }@@ -1042,7 +1042,7 @@ void do_invalid_op(struct cpu_user_regs *regs) }DEBUGGER_trap_fatal (TRAP_invalid_op, regs);show_execution_state (regs); -panic ("FATAL TRAP: vector = %d (invalid opcode)\n" , TRAP_invalid_op); +panic ("FATAL TRAP: vector = %d (invalid opcode)" , TRAP_invalid_op); }void do_int3 (struct cpu_user_regs *regs)@@ -1397,7 +1397,7 @@ void do_page_fault(struct cpu_user_regs *regs)show_page_walk (addr);panic ("FATAL PAGE FAULT\n" "[error_code=%04x]\n" -"Faulting linear address: %p\n" , +"Faulting linear address: %p" , error_code,_p (addr)); }@@ -3078,7 +3078,7 @@ void do_general_protection(struct cpu_user_regs *regs) hardware_gp:show_execution_state (regs); -panic ("GENERAL PROTECTION FAULT\n[error_code=%04x]\n" , regs->error_code); +panic ("GENERAL PROTECTION FAULT\n[error_code=%04x]" , regs->error_code); }static DEFINE_PER_CPU(struct softirq_trap, softirq_trap);xen/arch/x86/x86_64/mm.c +1
-1@@ -740,7 +740,7 @@ void __init paging_init(void)return ; nomem: -panic ("Not enough memory for m2p table\n" ); +panic ("Not enough memory for m2p table" ); }void __init zap_low_mappings (void )xen/arch/x86/x86_64/traps.c +1
-1@@ -250,7 +250,7 @@ void do_double_fault(struct cpu_user_regs *regs)_show_registers (regs, crs, CTXT_hypervisor,NULL );show_stack_overflow (cpu, regs); -panic ("DOUBLE FAULT -- system shutdown\n" ); +panic ("DOUBLE FAULT -- system shutdown" ); }void toggle_guest_mode (struct vcpu *v)xen/common/page_alloc.c +1
-1@@ -92,7 +92,7 @@ static unsigned int __initdata nr_bootmem_regions;static void __init boot_bug (int line) { -panic ("Boot BUG at %s:%d\n" , __FILE__, line); +panic ("Boot BUG at %s:%d" , __FILE__, line); }#define BOOT_BUG_ON (p) if ( p ) boot_bug(__LINE__);xen/common/schedule.c +1
-1@@ -1389,7 +1389,7 @@ void __init scheduler_init(void)printk ("Using scheduler: %s (%s)\n" , ops.name, ops.opt_name);if (SCHED_OP (&ops, init) ) -panic ("scheduler returned error on init\n" ); +panic ("scheduler returned error on init" ); if ( sched_ratelimit_us && (sched_ratelimit_us > XEN_SYSCTL_SCHED_RATELIMIT_MAXxen/drivers/char/console.c +2
-2@@ -1057,7 +1057,7 @@ void panic(const char *fmt, ...)console_start_sync ();printk ("\n****************************************\n" );printk ("Panic on CPU %d:\n" ,smp_processor_id ()); -printk ("%s" , buf); +printk ("%s\n" , buf);printk ("****************************************\n\n" );if ( opt_noreboot )printk ("Manual reset required ('noreboot' specified)\n" );@@ -1088,7 +1088,7 @@ void __bug(char *file, int line)console_start_sync ();printk ("Xen BUG at %s:%d\n" , file, line);dump_execution_state (); -panic ("Xen BUG at %s:%d\n" , file, line); +panic ("Xen BUG at %s:%d" , file, line);for ( ; ; ) ; }xen/drivers/passthrough/iommu.c +1
-1@@ -475,7 +475,7 @@ int __init iommu_setup(void)if ( (force_iommu && !iommu_enabled) || (force_intremap && !iommu_intremap) ) -panic ("Couldn't enable %s and iommu=required/force\n" , +panic ("Couldn't enable %s and iommu=required/force" , !iommu_enabled ?"IOMMU" :"Interrupt Remapping" );if ( !iommu_enabled )xen/drivers/passthrough/pci.c +1
-1@@ -104,7 +104,7 @@ void __init pt_pci_init(void) {radix_tree_init (&pci_segments);if ( !alloc_pseg (0 ) ) -panic ("Could not initialize PCI segment 0\n" ); +panic ("Could not initialize PCI segment 0" ); }int __init pci_add_segment (u16 seg)xen/drivers/passthrough/vtd/dmar.h +1
-1@@ -118,7 +118,7 @@ do { \break ; \if (NOW () > start_time +DMAR_OPERATION_TIMEOUT ) { \if ( !kexecing ) \ -panic ("%s:%d:%s: DMAR hardware is malfunctional\n" ,\ +panic ("%s:%d:%s: DMAR hardware is malfunctional" ,\ __FILE__, __LINE__, __func__); \else \break ; \xen/drivers/passthrough/vtd/iommu.c +1
-1@@ -722,7 +722,7 @@ static void iommu_enable_translation(struct acpi_drhd_unit *drhd) if ( is_igd_drhd(drhd) && !is_igd_vt_enabled_quirk() ) { if ( force_iommu ) - panic("BIOS did not enable IGD for VT properly, crash Xen for security purpose!\n"); + panic("BIOS did not enable IGD for VT properly, crash Xen for security purpose");else { dprintk(XENLOG_WARNING VTDPREFIX,xen/drivers/passthrough/vtd/iommu.c +1
-1@@ -2344,7 +2344,7 @@ static void vtd_resume(void)return ;if (init_vtd_hw () !=0 && force_iommu ) -panic ("IOMMU setup failed, crash Xen for security purpose!\n" ); +panic ("IOMMU setup failed, crash Xen for security purpose" );for_each_drhd_unit ( drhd ) {xen/drivers/passthrough/vtd/qinval.c +1
-1@@ -220,7 +220,7 @@ static int queue_invalidate_wait(struct iommu *iommu,if (NOW () > (start_time +DMAR_OPERATION_TIMEOUT ) ) {print_qi_regs (iommu); -panic ("queue invalidate wait descriptor was not executed\n"); + panic("queue invalidate wait descriptor was not executed" ); }cpu_relax ();}xen/xsm/flask/hooks.c +1
-1@@ -1586,7 +1586,7 @@ static __init int flask_init(void) original_ops = xsm_ops;if (register_xsm (&flask_ops) ) -panic ("Flask: Unable to register with XSM.\n" ); +panic ("Flask: Unable to register with XSM" ); ret =security_load_policy (policy_buffer, policy_size);