From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753680AbYJAQVg (ORCPT ); Wed, 1 Oct 2008 12:21:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752476AbYJAQV0 (ORCPT ); Wed, 1 Oct 2008 12:21:26 -0400 Received: from wf-out-1314.google.com ([209.85.200.172]:50126 "EHLO wf-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750769AbYJAQVY (ORCPT ); Wed, 1 Oct 2008 12:21:24 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=EGpQ8BqY7j3XfJQjyeQVr97zj4x9mEHJ3HllJkh25+csyrnh4rfQDTGfl3XPxMFzq0 861Kj5PLEssIYV0gMpSgYx+FeoErG7fjHSjxiRnM7shTUHQekjYX6C47lox5jtTpURDq 1PakdZmwuZ8dg0edwp5pUEH+ISKF4Ce8LUQlI= Message-ID: <86802c440810010921v3681d5f2gf1726e4f5ed36cc4@mail.gmail.com> Date: Wed, 1 Oct 2008 09:21:23 -0700 From: "Yinghai Lu" To: "Linus Torvalds" Subject: Re: [patch 2/2] PNP: don't check disabled PCI BARs for conflicts in quirk_system_pci_resources() Cc: "Grant Grundler" , "Ingo Molnar" , "Arjan van de Ven" , "Rene Herman" , "Bjorn Helgaas" , "Jesse Barnes" , "Len Brown" , "Frans Pop" , "Rafael J. Wysocki" , "Linux Kernel Mailing List" , linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, "Adam Belay" , "Avuton Olrich" , "Karl Bellve" , "Willem Riede" , "Matthew Hall" , "Sam Ravnborg" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48E11EFA.8010402@keyaccess.nl> <48E24C6F.3030903@keyaccess.nl> <20080930193819.GA29860@elte.hu> <20081001061328.GD7348@colo.lackof.org> X-Google-Sender-Auth: 10b823f9dc7e928c Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 1, 2008 at 8:14 AM, Linus Torvalds wrote: > > and instead do > > initcall(pci_init, "pci"); > .. > initcall(pnp_init, "pnp"); > > and then just list the levels for the linker scripts in one place. So that > we wouldn't really have to worry about link ordering: if the link ordering > is wrong, we just add a new initcall level and insert it in the right > place, and then we can look at the ordering and see it explicitly in one > place instead of looking at the makefiles and checking the order we add > object files to the list in! don't need to think linking order. could reorder them in the run time. struct init_call_st { int level; char *name; initcall_t call; }; #define INIT_CALL(nameX, levelX, callX) \ static struct init_call_st __init_call_##nameX __initdata = \ { .name = nameX,\ .level = levelX,\ .call = callX,\ }; \ static struct init_call_st *__init_call_ptr_##nameX __used \ __attribute__((__section__(".init_call.init"))) = \ &__init_call_##nameX in vmlinux.lds.h #define INIT_CALL_INIT(align) \ . = ALIGN((align)); \ .init_call.init : AT(ADDR(.init_call.init) - LOAD_OFFSET) { \ VMLINUX_SYMBOL(__init_call_start) = .; \ *(.init_call.init) \ VMLINUX_SYMBOL(__init_call_end) = .; \ } let arch vmlinux.lds.S to have INIT_CALL_INIT(8) and init/main.c void __init do_init_calls(void) { struct init_call_st **daa; char *ptr; /* sort it?, prescan... */ for (daa = __init_call_start ; daa < __init_call_end; daa++) { struct init_call_st *da = *daa; ... } for (daa = __init_call_start ; daa < __init_call_end; daa++) { struct dyn_array *da = *daa; ... da->call(); } YH