initdata changes in 2.3.99-pre9-pre1 (was Re: bug in emu10k1 under 2.3.late...)

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Sat May 13 2000 - 12:24:23 EDT

  • Next message: Jeff Garzik: "Seconded: 2.2.15 slow as molasses"

    In 2.3.99-pre9-pre1, there are many changes to the struct pci_device_id
    PCI probe tables. Unfortunately these changes were made rather blindly
    and some are not correct. (If these are Rui's changes, I fear I did not
    speak up soon enough, causing these errors)

    __devinitdata should NOT be used unless you are certain the driver is a
    hotplug driver. Otherwise __initdata should be used. Similar rules for
    __init and __devinit.

    The patch in 2.3.99-pre9-pre1 blindly moves everything to __devinitdata,
    which causes memory wastage in non-hotplug kernels (ie. the majority of
    the kernels out there).

    Each driver author should carefully consider their __initdata markers
    versus their __devinitdata markers, and doing a global conversion like
    that in patch-2.3.99-pre9-pre1 is bound to "undo" carefully thought-out
    changes by driver authors and maintainers.

    Sample completely-wrong change, which breaks careful consideration on my
    part:

    +++ linux/drivers/sound/via82cxxx_audio.c Sat May 13 08:19:21 2000
    @@ -303,9 +303,9 @@
      */
     
     
    -static struct pci_device_id via_pci_tbl[] __initdata = {
    +static struct pci_device_id via_pci_tbl[] __devinitdata = {
            { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, PCI_ANY_ID,
    PCI_ANY_ID, 0, 0, 0 },
    - { 0, },
    + { 0, }
     };
     MODULE_DEVICE_TABLE(pci,via_pci_tbl);

    So who is going around changing all these drivers, without at least
    notifying the maintainers?

            Jeff

                                                                                                                             

    -- 
    Jeff Garzik              | Liberty is always dangerous, but
    Building 1024            | it is the safest thing we have.
    MandrakeSoft, Inc.       |      -- Harry Emerson Fosdick
    

    - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Sat May 13 2000 - 12:30:35 EDT