26 Jul, 2011

1 commit

  • * 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (26 commits)
    amba pl011: workaround for uart registers lockup
    n_gsm: fix the wrong FCS handling
    pch_uart: add missing comment about OKI ML7223
    pch_uart: Add MSI support
    tty: fix "IRQ45: nobody cared"
    PTI feature to allow user to name and mark masterchannel request.
    0 for o PTI Makefile bug.
    tty: serial: samsung.c remove legacy PM code.
    SERIAL: SC26xx: Fix link error.
    serial: mrst_max3110: initialize waitqueue earlier
    mrst_max3110: Change max missing message priority.
    tty: s5pv210: Add delay loop on fifo reset function for UART
    tty/serial: Fix XSCALE serial ports, e.g. ce4100
    serial: bfin_5xx: fix off-by-one with resource size
    drivers/tty: use printk_ratelimited() instead of printk_ratelimit()
    tty: n_gsm: Added refcount usage to gsm_mux and gsm_dlci structs
    tty: n_gsm: Add raw-ip support
    tty: n_gsm: expose gsmtty device nodes at ldisc open time
    pch_phub: Fix register miss-setting issue
    serial: 8250, increase PASS_LIMIT
    ...

    Linus Torvalds
     

10 Jun, 2011

1 commit


08 Jun, 2011

2 commits

  • Timedia/SUNIX PCI cards with both serial and parallel ports are
    currently supported by 8250_pci and parport_pc individually. Moving
    that support into parport_serial allows using both types of ports at the
    same time.

    This was successfully tested with a SUNIX 4079T.

    Signed-off-by: Frédéric Brière
    Acked-by: Alan Cox
    Cc: linux-serial@vger.kernel.org
    Cc: linux-parport@lists.infradead.org
    Signed-off-by: Greg Kroah-Hartman

    Frédéric Brière
     
  • Add I/O based support for serial and parallel ports of the following
    chips:

    Vendor: Moschip (0x9710)

    Parts (device IDs)
    * 9900 (0x9900)
    * 9904 (0x9904
    * 9901 (0x9912, also sold as 9912)
    * 9922 (0x9922)

    On all chips but the 9900, a single port is provided per PCI subdevice
    (subvendor-ID 0xA000, subdevice-IDs 0x1000 for serial, 0x2000 for
    parallel with proper class codes). In cascading configurations, the
    9900 provides two devices per subdevice, with subvendor-ID 0xA000 and
    subdevice-IDs 0x30ps where p is the number of parallel ports and s the
    number of serial ports.

    Basic testing was only done on the serial part of a 9912 to the point
    where it can be used for a serial kernel console, and advanced features
    are completely untested. It is possible to reduce functionality of the
    chips by adding a configuration EEPROM, and the datasheet [1] is
    inconsistent w.r.t subdevices in the 4s+2s1p and 2s1p+4s
    configurations. The subdevice-ID 0x3012 should likely read 0x3011 with
    a serial port in function 3, which would be consistent with the BAR
    layouts. For now, the drivers ignore subdevices with ID 0x1000 and no
    class code.

    The parallel ports are integrated in parport_serial even for purely
    parallel parts to reduce the footprint of the patch.

    [1] http://www.moschip.com/data/products/MCS9900/MCS9900_Datasheet.pdf

    Signed-off-by: Nicos Gollan
    Signed-off-by: Greg Kroah-Hartman

    Nicos Gollan
     

27 May, 2011

1 commit

  • * 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
    gfs2: Drop __TIME__ usage
    isdn/diva: Drop __TIME__ usage
    atm: Drop __TIME__ usage
    dlm: Drop __TIME__ usage
    wan/pc300: Drop __TIME__ usage
    parport: Drop __TIME__ usage
    hdlcdrv: Drop __TIME__ usage
    baycom: Drop __TIME__ usage
    pmcraid: Drop __DATE__ usage
    edac: Drop __DATE__ usage
    rio: Drop __DATE__ usage
    scsi/wd33c93: Drop __TIME__ usage
    scsi/in2000: Drop __TIME__ usage
    aacraid: Drop __TIME__ usage
    media/cx231xx: Drop __TIME__ usage
    media/radio-maxiradio: Drop __TIME__ usage
    nozomi: Drop __TIME__ usage
    cyclades: Drop __TIME__ usage

    Linus Torvalds
     

26 May, 2011

1 commit

  • The kernel already prints its build timestamp during boot, no need to
    repeat it in random drivers and produce different object files each
    time.

    Acked-by: Arnaud Giersch
    Signed-off-by: Michal Marek

    Michal Marek
     

25 May, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
    pcmcia: Make struct pcmcia_device_id const, sound drivers edition
    staging: pcmcia: Convert pcmcia_device_id declarations to const
    pcmcia: Convert pcmcia_device_id declarations to const
    pcmcia: Make declaration and uses of struct pcmcia_device_id const
    pcmcia/sa1100: put sa11x0_pcmcia_hw_init[] to .devinit.data

    Linus Torvalds
     

24 May, 2011

1 commit

  • * 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (48 commits)
    serial: 8250_pci: add support for Cronyx Omega PCI multiserial board.
    tty/serial: Fix break handling for PORT_TEGRA
    tty/serial: Add explicit PORT_TEGRA type
    n_tracerouter and n_tracesink ldisc additions.
    Intel PTI implementaiton of MIPI 1149.7.
    Kernel documentation for the PTI feature.
    export kernel call get_task_comm().
    tty: Remove to support serial for S5P6442
    pch_phub: Support new device ML7223
    8250_pci: Add support for the Digi/IBM PCIe 2-port Adapter
    ASoC: Update cx20442 for TTY API change
    pch_uart: Support new device ML7223 IOH
    parport: Use request_muxed_region for IT87 probe and lock
    tty/serial: add support for Xilinx PS UART
    n_gsm: Use print_hex_dump_bytes
    drivers/tty/moxa.c: Put correct tty value
    TTY: tty_io, annotate locking functions
    TTY: serial_core, remove superfluous set_task_state
    TTY: serial_core, remove invalid test
    Char: moxa, fix locking in moxa_write
    ...

    Fix up trivial conflicts in drivers/bluetooth/hci_ldisc.c and
    drivers/tty/serial/Makefile.

    I did the hci_ldisc thing as an evil merge, cleaning things up.

    Linus Torvalds
     

07 May, 2011

1 commit

  • This is needed as part of making the various IT87 drivers actually co-exist
    politely with each other, and with other superio devices that may be muxed
    on 0x2E/0x2F.

    It can be applied before or after the other patches by Nat Gurumoorthy without
    problem.

    Signed-off-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     

06 May, 2011

1 commit

  • Saves about 50KB of data.

    Old/new size of all objects:
    text data bss dec hex filename
    563015 80096 130684 773795 bcea3 (TOTALS)
    610916 32256 130632 773804 bceac (TOTALS)

    Signed-off-by: Joe Perches
    Acked-by: Kurt Van Dijck (for drivers/net/can/softing/softing_cs.c)
    Signed-off-by: Dominik Brodowski

    Joe Perches
     

20 Apr, 2011

1 commit

  • Replace release_resource() by release_region() and also fix the
    inconsistency in the size of the requested/released region.

    The size of the resource should be 32, not 0x8 like it was corrected in
    commit e7c310c36e5fdf1b83a459e5db167bfbd86137db already.

    CC: linux-serial@vger.kernel.org
    Reported-by: Julia Lawall
    Signed-off-by: Niels de Vos
    Signed-off-by: Greg Kroah-Hartman

    Niels de Vos
     

31 Mar, 2011

1 commit


28 Feb, 2011

1 commit


26 Jan, 2011

1 commit

  • parport_unregister_device() should never be used when interrupts are
    enabled in hardware and irq handler is registered so there is no need to
    disable interrupts when using waitlist_lock. But there is no way to
    explain this subtle semantics to lockdep analyzer.

    So disable interrupts here too to simplify things. The price is
    negligible.

    Signed-off-by: Alexander Gordeev
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Gordeev
     

25 Oct, 2010

1 commit

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    Update broken web addresses in arch directory.
    Update broken web addresses in the kernel.
    Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget
    Revert "Fix typo: configuation => configuration" partially
    ida: document IDA_BITMAP_LONGS calculation
    ext2: fix a typo on comment in ext2/inode.c
    drivers/scsi: Remove unnecessary casts of private_data
    drivers/s390: Remove unnecessary casts of private_data
    net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
    drivers/infiniband: Remove unnecessary casts of private_data
    drivers/gpu/drm: Remove unnecessary casts of private_data
    kernel/pm_qos_params.c: Remove unnecessary casts of private_data
    fs/ecryptfs: Remove unnecessary casts of private_data
    fs/seq_file.c: Remove unnecessary casts of private_data
    arm: uengine.c: remove C99 comments
    arm: scoop.c: remove C99 comments
    Fix typo configue => configure in comments
    Fix typo: configuation => configuration
    Fix typo interrest[ing|ed] => interest[ing|ed]
    Fix various typos of valid in comments
    ...

    Fix up trivial conflicts in:
    drivers/char/ipmi/ipmi_si_intf.c
    drivers/usb/gadget/rndis.c
    net/irda/irnet/irnet_ppp.c

    Linus Torvalds
     

22 Oct, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: (22 commits)
    pcmcia: synclink_cs: fix information leak to userland
    pcmcia: don't call flush_scheduled_work() spuriously
    serial_cs: drop spurious flush_scheduled_work() call
    pcmcia/yenta: guide users in case of problems with O2-bridges
    pcmcia: fix unused function compile warning
    pcmcia: vrc4173_cardu: Fix error path for pci_release_regions and pci_disable_device
    pcmcia: add a few debug statements
    pcmcia: remove obsolete and wrong comments
    pcmcia: avoid messages on module (un)loading
    pcmcia: move driver name to struct pcmcia_driver
    pcmcia: remove the "Finally, report what we've done" message
    pcmcia: use autoconfiguration feature for ioports and iomem
    pcmcia: introduce autoconfiguration feature
    pcmcia: Documentation update
    pcmcia: convert pcmcia_request_configuration to pcmcia_enable_device
    pcmcia: move config_{base,index,regs} to struct pcmcia_device
    pcmcia: simplify IntType
    pcmcia: simplify Status, ExtStatus register access
    pcmcia: remove Pin, Copy configuration register access
    pcmcia: move Vpp setup to struct pcmcia_device
    ...

    Linus Torvalds
     

12 Oct, 2010

1 commit


29 Sep, 2010

7 commits

  • What's worse than no comment? A wrong comment.

    Several PCMCIA device drivers contained the same comments, which
    were based on how the PCMCIA subsystem worked in the old days of 2.4.,
    and which were originally part of a "dummy_cs" driver. These comments
    no longer matched at all what is happening now, and therefore should
    be removed.

    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • When CONF_AUTO_SET_IO or CONF_AUTO_SET_IOMEM are set, the corresponding
    fields in struct pcmcia_device *p_dev->resource[0,1,2] are set
    accordinly. Drivers wishing to override certain settings may do so in
    the callback function, but they no longer need to parse the CIS entries
    stored in cistpl_cftable_entry_t themselves.

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: linux-bluetooth@vger.kernel.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    CC: Jiri Kosina
    CC: linux-scsi@vger.kernel.org
    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Introduce an autoconfiguration feature to set certain values in
    pcmcia_loop_config(), instead of copying the same code over and over
    in each PCMCIA driver. At first, introduce the following options:

    CONF_AUTO_CHECK_VCC check or matching Vcc entry
    CONF_AUTO_SET_VPP set Vpp
    CONF_AUTO_AUDIO enable the speaker line

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    CC: Jiri Kosina
    CC: linux-scsi@vger.kernel.org
    Acked-by: Gustavo F. Padovan (for drivers/bluetooth)
    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • pcmcia_enable_device() now replaces pcmcia_request_configuration().
    Instead of config_req_t, all necessary flags are either passed as
    a parameter to pcmcia_enable_device(), or (in rare circumstances)
    set in struct pcmcia_device -> flags.

    With the last remaining user of include/pcmcia/cs.h gone, remove
    all references.

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    CC: Jiri Kosina
    CC: linux-scsi@vger.kernel.org
    Acked-by: Gustavo F. Padovan (for drivers/bluetooth)
    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Several drivers prefer to explicitly set config_{base,index,regs},
    formerly known as ConfigBase, ConfigIndex and Present. Instead of
    passing these values inside config_req_t, store it in struct
    pcmcia_device.

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    CC: Jiri Kosina
    CC: linux-scsi@vger.kernel.org
    Acked-by: Gustavo F. Padovan (for drivers/bluetooth)
    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • IntType was only set to INT_MEMORY (driver pcmciamtd) or INT_MEMORY_AND_IO
    (all other drivers). As this flags seems to relate to ioport access, make
    it conditional to the driver having requested IO port access. There are two
    drivers which do not request IO ports, but did set INT_MEMORY_AND_IO:
    ray_cs and b43. For those, we consistently only set INT_MEMORY in future.

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    CC: Jiri Kosina
    CC: linux-scsi@vger.kernel.org
    Acked-by: Gustavo F. Padovan (for drivers/bluetooth)
    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

24 Aug, 2010

1 commit


13 Aug, 2010

1 commit


11 Aug, 2010

1 commit

  • Commit 51dcdfe ("parport: Use the PCI IRQ if offered") added IRQ support
    for PCI parallel port devices handled by parport_pc, but turned it off for
    parport_serial, despite a printk() message to the contrary.

    Signed-off-by: Fr?d?ric Bri?re
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fr?d?ric Bri?re
     

07 Aug, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
    pcmcia: avoid buffer overflow in pcmcia_setup_isa_irq
    pcmcia: do not request windows if you don't need to
    pcmcia: insert PCMCIA device resources into resource tree
    pcmcia: export resource information to sysfs
    pcmcia: use struct resource for PCMCIA devices, part 2
    pcmcia: remove memreq_t
    pcmcia: move local definitions out of include/pcmcia/cs.h
    pcmcia: do not use io_req_t when calling pcmcia_request_io()
    pcmcia: do not use io_req_t after call to pcmcia_request_io()
    pcmcia: use struct resource for PCMCIA devices
    pcmcia: clean up cs.h
    pcmcia: use pcmica_{read,write}_config_byte
    pcmcia: remove cs_types.h
    pcmcia: remove unused flag, simplify headers
    pcmcia: remove obsolete CS_EVENT_ definitions
    pcmcia: split up central event handler
    pcmcia: simplify event callback
    pcmcia: remove obsolete ioctl

    Conflicts in:
    - drivers/staging/comedi/drivers/*
    - drivers/staging/wlags49_h2/wl_cs.c
    due to dev_info_t and whitespace changes

    Linus Torvalds
     

06 Aug, 2010

1 commit

  • of_device is just an alias for platform_device, so remove it entirely. Also
    replace to_of_device() with to_platform_device() and update comment blocks.

    This patch was initially generated from the following semantic patch, and then
    edited by hand to pick up the bits that coccinelle didn't catch.

    @@
    @@
    -struct of_device
    +struct platform_device

    Signed-off-by: Grant Likely
    Reviewed-by: David S. Miller

    Grant Likely
     

03 Aug, 2010

2 commits

  • Instead of io_req_t, drivers are now requested to fill out
    struct pcmcia_device *p_dev->resource[0,1] for up to two ioport
    ranges. After a call to pcmcia_request_io(), the ports found there
    are reserved, after calling pcmcia_request_configuration(), they may
    be used.

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    CC: Michael Buesch
    Acked-by: Marcel Holtmann (for drivers/bluetooth/)
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • After pcmcia_request_io(), do not make use of the values stored in
    io_req_t, but instead use those found in struct pcmcia_device->resource[].

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    Acked-by: Marcel Holtmann (for drivers/bluetooth/)
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

31 Jul, 2010

1 commit

  • Remove cs_types.h which is no longer needed: Most definitions aren't
    used at all, a few can be made away with, and two remaining definitions
    (typedefs, unfortunatley) may be moved to more specific places.

    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    Acked-by: Marcel Holtmann (for drivers/bluetooth/)
    Acked-by: David S. Miller
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

24 Jul, 2010

1 commit

  • Both of_bus_type and of_platform_bus_type are just #define aliases
    for the platform bus. This patch removes all references to them and
    switches to the of_register_platform_driver()/of_unregister_platform_driver()
    API for registering.

    Subsequent patches will convert each user of of_register_platform_driver()
    into plain platform_drivers without the of_platform_driver shim. At which
    point the of_register_platform_driver()/of_unregister_platform_driver()
    functions can be removed.

    Signed-off-by: Grant Likely
    Acked-by: David S. Miller

    Grant Likely
     

29 Jun, 2010

1 commit

  • This patch moves SPARC architecture specific data members out of
    struct of_device and into the pdev_archdata structure. The reason
    for this change is to unify the struct of_device definition amongst
    all the architectures. It also remvoes the .sysdata, .slot, .portid
    and .clock_freq properties because they aren't actually used by
    anything.

    A subsequent patch will replace struct of_device entirely with struct
    platform_device and the of_platform support code will share common
    routines with the platform bus (but the bus instances themselves can
    remain separate).

    This patch also adds 'struct resources *resource' and num_resources
    to match the fields defined in struct platform_device. After this
    change, 'struct platform_device' can be used as a drop-in replacement
    for 'struct of_platform'.

    This change is in preparation for merging the of_platform_bus_type
    with the platform_bus_type.

    Signed-off-by: Grant Likely
    Acked-by: David S. Miller
    Cc: Stephen Rothwell

    Grant Likely
     

27 May, 2010

1 commit


22 May, 2010

2 commits

  • Merging in current state of Linus' tree to deal with merge conflicts and
    build failures in vio.c after merge.

    Conflicts:
    drivers/i2c/busses/i2c-cpm.c
    drivers/i2c/busses/i2c-mpc.c
    drivers/net/gianfar.c

    Also fixed up one line in arch/powerpc/kernel/vio.c to use the
    correct node pointer.

    Signed-off-by: Grant Likely

    Grant Likely
     
  • .name, .match_table and .owner are duplicated in both of_platform_driver
    and device_driver. This patch is a removes the extra copies from struct
    of_platform_driver and converts all users to the device_driver members.

    This patch is a pretty mechanical change. The usage model doesn't change
    and if any drivers have been missed, or if anything has been fixed up
    incorrectly, then it will fail with a compile time error, and the fixup
    will be trivial. This patch looks big and scary because it touches so
    many files, but it should be pretty safe.

    Signed-off-by: Grant Likely
    Acked-by: Sean MacLennan

    Grant Likely
     

10 May, 2010

2 commits

  • dev_node_t was only used to transport some minor/major numbers
    from the PCMCIA device drivers to deprecated userspace helpers.
    However, only a few drivers made use of it, and the userspace
    helpers are deprecated anyways. Therefore, get rid of dev_node_t .

    As a first step, remove any usage of dev_node_t from drivers which
    only wrote to this typedef/struct, but did not make use of it.

    CC: linux-bluetooth@vger.kernel.org
    CC: Harald Welte
    CC: linux-mtd@lists.infradead.org
    CC: linux-wireless@vger.kernel.org
    CC: netdev@vger.kernel.org
    CC: linux-serial@vger.kernel.org
    CC: alsa-devel@alsa-project.org
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Instead of the old pcmcia_request_irq() interface, drivers may now
    choose between:

    - calling request_irq/free_irq directly. Use the IRQ from *p_dev->irq.

    - use pcmcia_request_irq(p_dev, handler_t); the PCMCIA core will
    clean up automatically on calls to pcmcia_disable_device() or
    device ejection.

    - drivers still not capable of IRQF_SHARED (or not telling us so) may
    use the deprecated pcmcia_request_exclusive_irq() for the time
    being; they might receive a shared IRQ nonetheless.

    CC: linux-bluetooth@vger.kernel.org
    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-serial@vger.kernel.org
    CC: alsa-devel@alsa-project.org
    CC: linux-usb@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo