From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from cantor2.suse.de ([195.135.220.15] helo=mx2.suse.de) by bombadil.infradead.org with esmtps (Exim 4.68 #1 (Red Hat Linux)) id 1J2SSy-0006zU-F9 for kexec@lists.infradead.org; Wed, 12 Dec 2007 14:21:47 +0000 Date: Wed, 12 Dec 2007 15:21:32 +0100 From: Andi Kleen Subject: Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels on boot cpu Message-ID: <20071212142132.GC4889@bingen.suse.de> References: <20071211034349.GA3635@localhost.localdomain> <20071211143910.GA10999@hmsreliant.think-freely.org> <20071211182254.GB10999@hmsreliant.think-freely.org> <20071211192434.GD10999@hmsreliant.think-freely.org> <86802c440712111151t29acd38kf9fac8e41743f3e4@mail.gmail.com> <20071211205955.GF10999@hmsreliant.think-freely.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20071211205955.GF10999@hmsreliant.think-freely.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: kexec-bounces@lists.infradead.org Errors-To: kexec-bounces+dwmw2=infradead.org+dwmw2=infradead.org@lists.infradead.org To: Neil Horman Cc: Ben Woodard , Neil Horman , kexec@lists.infradead.org, Andi Kleen , linux-kernel@vger.kernel.org, hbabu@us.ibm.com, Andi Kleen , Yinghai Lu , hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, "Eric W. Biederman" > + htcfg = read_pci_config(num, slot, func, 0x68); > + if (htcfg & (1 << 18)) { > + printk(KERN_INFO "Detected use of extended apic ids on hypertransport bus\n"); > + if ((htcfg & (1 << 17)) == 0) { > + printk(KERN_INFO "Enabling hypertransport extended apic interrupt broadcast\n"); > + printk(KERN_INFO "Note this is a bios bug, please contact your hw vendor\n"); I'm not convinced the message is correct. e.g. on a system with only a dual core not enabling that is fine, but the extended IDs might be still set. > #endif /* CONFIG_ACPI */ > > -static void __init nvidia_bugs(void) > +static void __init nvidia_bugs(int num, int slot, int func) > { > + static int fix_applied = 0; > + > + if (fix_applied++) > + return; This looks like the wrong place to do this. Better add a flag or something in the structure. Dito others. Also while not a problem here in general it's bad style to add potential wrapping bugs like this. Never use ++ for flags. -Andi _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754597AbXLLOVr (ORCPT ); Wed, 12 Dec 2007 09:21:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751892AbXLLOVj (ORCPT ); Wed, 12 Dec 2007 09:21:39 -0500 Received: from mx2.suse.de ([195.135.220.15]:54351 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751746AbXLLOVi (ORCPT ); Wed, 12 Dec 2007 09:21:38 -0500 Date: Wed, 12 Dec 2007 15:21:32 +0100 From: Andi Kleen To: Neil Horman Cc: Yinghai Lu , Ben Woodard , Neil Horman , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Andi Kleen , hbabu@us.ibm.com, Andi Kleen , "Eric W. Biederman" , tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com Subject: Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels on boot cpu Message-ID: <20071212142132.GC4889@bingen.suse.de> References: <20071211034349.GA3635@localhost.localdomain> <20071211143910.GA10999@hmsreliant.think-freely.org> <20071211182254.GB10999@hmsreliant.think-freely.org> <20071211192434.GD10999@hmsreliant.think-freely.org> <86802c440712111151t29acd38kf9fac8e41743f3e4@mail.gmail.com> <20071211205955.GF10999@hmsreliant.think-freely.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071211205955.GF10999@hmsreliant.think-freely.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + htcfg = read_pci_config(num, slot, func, 0x68); > + if (htcfg & (1 << 18)) { > + printk(KERN_INFO "Detected use of extended apic ids on hypertransport bus\n"); > + if ((htcfg & (1 << 17)) == 0) { > + printk(KERN_INFO "Enabling hypertransport extended apic interrupt broadcast\n"); > + printk(KERN_INFO "Note this is a bios bug, please contact your hw vendor\n"); I'm not convinced the message is correct. e.g. on a system with only a dual core not enabling that is fine, but the extended IDs might be still set. > #endif /* CONFIG_ACPI */ > > -static void __init nvidia_bugs(void) > +static void __init nvidia_bugs(int num, int slot, int func) > { > + static int fix_applied = 0; > + > + if (fix_applied++) > + return; This looks like the wrong place to do this. Better add a flag or something in the structure. Dito others. Also while not a problem here in general it's bad style to add potential wrapping bugs like this. Never use ++ for flags. -Andi