Re: [ANNOUNCE] various linux kernel devtools : device handling/memory mapping/profiling/etc

From: Willem de Bruijn (wdebruij_at_dds.nl)
Date: 04/06/04

  • Next message: Angelo Dell'Aera: "Re: Oops with cpufreq on 2.6.5-mm1"
    To: Greg KH <greg@kroah.com>
    Date:	Tue, 6 Apr 2004 11:55:05 +0000
    
    

    > pci_register_driver() as Documentation/pci.txt says to use. Works just
    > wonderful from 2.4 to 2.6, and I think it's even been backported to work
    > on 2.2 if you so desire.

    thanks. I need something that works with a specially patched
    2.3.99-pre3-rmk3-ds1 kernel for an IXP1200 network processor. Porting the
    original patch to 2.6 is simply too much work, so everything *must* be
    backward compatible to this prerelease. Hence the module template files.

    >
    > Well, feel free to submit portions of it as patches that clean up the
    > current API, if you think it will help out any. In my short glance, I
    > didn't really see anything that would help out all that much, but I'm
    > probably missing something.
    >

    AFAIK there the kernel reverts to a standard llseek implementation when this
    operation is left empty. How about having standard fallback behaviour for all
    system call handlers? That's what most of my device code is about:
    implementing regular file access and memory mapping, so that device driver
    writers won't have to do that each time for themselves. 9 times of out 10
    people will want the same .nopage handler, right? Why implement it for each
    driver individually?

    having a generic interface does entail that drivers must export the memory
    region information in a standard fashion, which is why I created the
    dev_file_t, dev_file_open_t and dev_file_open_region_t structures (for lack
    of a better name). Once these were finished, adding automatic default
    handling was relatively straightforward. However, as you pointed out, I
    shouldn't have made claims about udev, as I never actually tested that.

    considering udev and devfs are both still being developed (although the latter
    is marked `deprecated'), a single interface to the device file creation,
    would IMO, also be useful, as not all drivers have to be updated or filled
    with KERNEL_VERSION statements. The actual code is quite small (it all
    resides in dev.c), but even without supporting udev I have 3 different cases
    to deal with (2devfs+mknod).

    I'm not saying my code should be used for this per se, but I do believe that
    these two features are so generic across drivers that they deserve to be
    included in the main tree somewhere. As for the rest of the package, that
    might not be too useful. I discussed the addition of prepending __FILE__,
    __FUNCTION__ and clockcycles to printk previously and someone else actually
    sent in a patch to printk allowing vsprintf functionality. The buffer
    structure is probably too heavyweight for kernel inclusion, anyway.

    Willem

    -- 
    Dit bericht is gescand op virussen en andere gevaarlijke inhoud door ULCN MailScanner en het bericht lijkt schoon te zijn.
    This message has been scanned for viruses and dangerous content by ULCN MailScanner, and is believed to be clean.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Angelo Dell'Aera: "Re: Oops with cpufreq on 2.6.5-mm1"

    Relevant Pages

    • [PATCH][RFC/v1][0/12] Initial submission of InfiniBand patches for review
      ... I'm very happy to be able to post an initial version of InfiniBand ... Although this code should be far closer to kernel ... coding standards than previous open source InfiniBand drivers, ... These patches add a minimal but complete level of InfiniBand support, ...
      (Linux-Kernel)
    • Re: current linus bk, error mounting root
      ... I think Jens wants all of the distributions to fix it. ... >> Something changed in the timing for loading drivers during boot. ... You can't do that on any udev based system reliably. ... the kernel about it (well, except for the obvious thing of giving udev ...
      (Linux-Kernel)
    • Re: patches question
      ... >> drivers should be ok. ... support x hardware..., (i don't found it in the faq, ... may be because alan cox patches only solve problems ... Kernel, Kernel Patches, Kernel Modules, ...
      (Linux-Kernel)
    • Re: 2.6.18-rc7-mm1: no /dev/tty0
      ... There were some problems with older versions of udev not creating ... "- The kernel doesn't work properly on RH FC3 or pretty much anything ... # Firmware Drivers ... # ACPI Support ...
      (Linux-Kernel)
    • Re: Soft lockup 2.6.23.14-uc0
      ... I am observing kernel soft lockups when running ... stock 2.6.23 kernel with patches from uClinux.org. ... Replacing Intel's IXP400 drivers with this driver ...
      (Linux-Kernel)

    Loading