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
     

08 Mar, 2010

1 commit

  • Constify struct sysfs_ops.

    This is part of the ops structure constification
    effort started by Arjan van de Ven et al.

    Benefits of this constification:

    * prevents modification of data that is shared
    (referenced) by many other structure instances
    at runtime

    * detects/prevents accidental (but not intentional)
    modification attempts on archs that enforce
    read-only kernel data at runtime

    * potentially better optimized code as the compiler
    can assume that the const data cannot be changed

    * the compiler/linker move const data into .rodata
    and therefore exclude them from false sharing

    Signed-off-by: Emese Revfy
    Acked-by: David Teigland
    Acked-by: Matt Domsch
    Acked-by: Maciej Sosnowski
    Acked-by: Hans J. Koch
    Acked-by: Pekka Enberg
    Acked-by: Jens Axboe
    Acked-by: Stephen Hemminger
    Signed-off-by: Greg Kroah-Hartman

    Emese Revfy
     

07 Mar, 2010

1 commit


16 Dec, 2009

3 commits

  • The typename member of struct irq_chip was kept for migration purposes
    and is obsolete since more than 2 years. Fix up the leftovers.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Kyle McMartin

    Thomas Gleixner
     
  • Convert code away from ->read_proc/->write_proc interfaces.
    Switch to proc_create()/proc_create_data() which make addition of
    proc entries reliable wrt NULL ->proc_fops, NULL ->data and so on.

    Problem with ->read_proc et al is described here
    commit 786d7e1612f0b0adb6046f19b906609e4fe8b1ba
    "Fix rmmod/read/write races in /proc entries"

    Signed-off-by: Alexey Dobriyan
    Reviewed-by: Grant Grundler
    Signed-off-by: Kyle McMartin

    Alexey Dobriyan
     
  • Makes use of skip_spaces() defined in lib/string.c for removing leading
    spaces from strings all over the tree.

    It decreases lib.a code size by 47 bytes and reuses the function tree-wide:
    text data bss dec hex filename
    64688 584 592 65864 10148 (TOTALS-BEFORE)
    64641 584 592 65817 10119 (TOTALS-AFTER)

    Also, while at it, if we see (*str && isspace(*str)), we can be sure to
    remove the first condition (*str) as the second one (isspace(*str)) also
    evaluates to 0 whenever *str == 0, making it redundant. In other words,
    "a char equals zero is never a space".

    Julia Lawall tried the semantic patch (http://coccinelle.lip6.fr) below,
    and found occurrences of this pattern on 3 more files:
    drivers/leds/led-class.c
    drivers/leds/ledtrig-timer.c
    drivers/video/output.c

    @@
    expression str;
    @@

    ( // ignore skip_spaces cases
    while (*str && isspace(*str)) { \(str++;\|++str;\) }
    |
    - *str &&
    isspace(*str)
    )

    Signed-off-by: André Goddard Rosa
    Cc: Julia Lawall
    Cc: Martin Schwidefsky
    Cc: Jeff Dike
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Richard Purdie
    Cc: Neil Brown
    Cc: Kyle McMartin
    Cc: Henrique de Moraes Holschuh
    Cc: David Howells
    Cc:
    Cc: Samuel Ortiz
    Cc: Patrick McHardy
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    André Goddard Rosa
     

10 Dec, 2009

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits)
    tree-wide: fix misspelling of "definition" in comments
    reiserfs: fix misspelling of "journaled"
    doc: Fix a typo in slub.txt.
    inotify: remove superfluous return code check
    hdlc: spelling fix in find_pvc() comment
    doc: fix regulator docs cut-and-pasteism
    mtd: Fix comment in Kconfig
    doc: Fix IRQ chip docs
    tree-wide: fix assorted typos all over the place
    drivers/ata/libata-sff.c: comment spelling fixes
    fix typos/grammos in Documentation/edac.txt
    sysctl: add missing comments
    fs/debugfs/inode.c: fix comment typos
    sgivwfb: Make use of ARRAY_SIZE.
    sky2: fix sky2_link_down copy/paste comment error
    tree-wide: fix typos "couter" -> "counter"
    tree-wide: fix typos "offest" -> "offset"
    fix kerneldoc for set_irq_msi()
    spidev: fix double "of of" in comment
    comment typo fix: sybsystem -> subsystem
    ...

    Linus Torvalds
     
  • …l/git/tip/linux-2.6-tip

    * 'bkl-drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    agp: Remove the BKL from agp_open
    inifiband: Remove BKL from ipath_open()
    mips: Remove BKL from tb0219
    drivers: Remove BKL from scx200_gpio
    drivers: Remove BKL from pc8736x_gpio
    parisc: Remove BKL from eisa_eeprom
    rtc: Remove BKL from efirtc
    input: Remove BKL from hp_sdc_rtc
    hw_random: Remove BKL from core
    macintosh: Remove BKL from ans-lcd
    nvram: Drop the bkl from non-generic nvram_llseek()
    nvram: Drop the bkl from nvram_llseek()
    mem_class: Drop the bkl from memory_open()
    spi: Remove BKL from spidev_open
    drivers: Remove BKL from cs5535_gpio
    drivers: Remove BKL from misc_open

    Linus Torvalds
     

04 Dec, 2009

1 commit

  • That is "success", "unknown", "through", "performance", "[re|un]mapping"
    , "access", "default", "reasonable", "[con]currently", "temperature"
    , "channel", "[un]used", "application", "example","hierarchy", "therefore"
    , "[over|under]flow", "contiguous", "threshold", "enough" and others.

    Signed-off-by: André Goddard Rosa
    Signed-off-by: Jiri Kosina

    André Goddard Rosa
     

11 Nov, 2009

1 commit


14 Oct, 2009

1 commit

  • Remove the empty ioctl and the cycle_kernel_lock() in
    eisa_eeprom_open() which got there with the big BKL push down. There
    is nothing to wait for and sychronize with after the misc device has
    been registered.

    Remove the empty ioctl as well. The generic code handles the -ENOTTY
    if no ioctl function is provided.

    Signed-off-by: Thomas Gleixner
    LKML-Reference:
    Cc: Kyle McMartin

    Thomas Gleixner
     

22 Sep, 2009

1 commit

  • Sizing of memory allocations shouldn't depend on the number of physical
    pages found in a system, as that generally includes (perhaps a huge amount
    of) non-RAM pages. The amount of what actually is usable as storage
    should instead be used as a basis here.

    Some of the calculations (i.e. those not intending to use high memory)
    should likely even use (totalram_pages - totalhigh_pages).

    Signed-off-by: Jan Beulich
    Acked-by: Rusty Russell
    Acked-by: Ingo Molnar
    Cc: Dave Airlie
    Cc: Kyle McMartin
    Cc: Jeremy Fitzhardinge
    Cc: Pekka Enberg
    Cc: Hugh Dickins
    Cc: "David S. Miller"
    Cc: Patrick McHardy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Beulich
     

02 Aug, 2009

6 commits


09 Jul, 2009

1 commit

  • Commit 5fd29d6ccbc98884569d6f3105aeca70858b3e0f ("printk: clean up
    handling of log-levels and newlines") changed printk semantics. printk
    lines with multiple KERN_ prefixes are no longer emitted as
    before the patch.

    is now included in the output on each additional use.

    Remove all uses of multiple KERN_s in formats.

    Signed-off-by: Joe Perches
    Signed-off-by: Linus Torvalds

    Joe Perches
     

03 Jul, 2009

6 commits

  • Usage of parport_pc_probe_port was changed in 28783eb52
    (parport: Fix various uses of parport_pc).

    It introduced this build error:
    drivers/parisc/superio.c: In function 'superio_parport_init':
    drivers/parisc/superio.c:437: error: too few arguments to function
    'parport_pc_probe_port'

    Fix it.

    Signed-off-by: Alexander Beregalov
    Signed-off-by: Kyle McMartin

    Alexander Beregalov
     
  • We weren't marking the resources as memory resources, so they weren't
    being found by pci_claim_resource().

    Signed-off-by: Matthew Wilcox
    Reviewed-by: Grant Grundler
    Signed-off-by: Kyle McMartin

    Matthew Wilcox
     
  • gcc 4.4 warns about:
    drivers/parisc/lba_pci.c: In function 'lba_pat_resources':
    drivers/parisc/lba_pci.c:1099: warning: the frame size of 8280 bytes is larger than 4096 bytes

    The problem is we declare two large structures on the stack. They don't need
    to be on the stack since they are only used during LBA initialization (which
    is serialized). Moving to be "static".

    Signed-off-by: Grant Grundler
    Signed-off-by: Kyle McMartin

    Grant Grundler
     
  • The defines and typedefs (hw_interrupt_type, no_irq_type, irq_desc_t) have
    been kept around for migration reasons. After more than two years it's
    time to remove them finally.

    This patch cleans up one of the remaining users. When all such patches
    hit mainline we can remove the defines and typedefs finally.

    Impact: cleanup

    Convert the last remaining users to struct irq_chip and remove the
    define.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Kyle McMartin

    Thomas Gleixner
     
  • Alex Chiang asked me why PARISC was calling pci_bus_add_devices()
    and pci_bus_assign_resources() in the opposite order from everyone else.
    No reason and I couldn't see any data dependency.
    Patch below applies cleanly to 2.6.30-rc2.

    Later, I suspected the code worked only because no drivers would be
    loaded/ready until much later in the system initialization sequence.

    Tested "LBA" code on J6000 (32-bit) and A500 (64-bit SMP) with 2.6.30-rc2.
    Not tested with any Dino controllers.
    Not tested with PCI-PCI Bridge (TBD).

    Reported-by: Alex Chiang
    Signed-off-by: Grant Grundler
    Signed-off-by: Kyle McMartin

    Grant Grundler
     
  • Fix this build error when CONFIG_PROC_FS is not set:
    drivers/parisc/ccio-dma.c:1574: error: 'ccio_proc_info_fops' undeclared

    Signed-off-by: Alexander Beregalov
    Signed-off-by: Kyle McMartin

    Alexander Beregalov
     

16 Jun, 2009

1 commit

  • In the near future, the driver core is going to not allow direct access
    to the driver_data pointer in struct device. Instead, the functions
    dev_get_drvdata() and dev_set_drvdata() should be used. These functions
    have been around since the beginning, so are backwards compatible with
    all older kernel versions.

    Cc: linux-parisc@vger.kernel.org
    Cc: Helge Deller
    Cc: Kyle McMartin
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

28 Apr, 2009

1 commit

  • according to Ingo, change set_affinity() in irq_chip should return int,
    because that way we can handle failure cases in a much cleaner way, in
    the genirq layer.

    v2: fix two typos

    [ Impact: extend API ]

    Signed-off-by: Yinghai Lu
    Cc: Andrew Morton
    Cc: Suresh Siddha
    Cc: "Eric W. Biederman"
    Cc: Rusty Russell
    Cc: linux-arch@vger.kernel.org
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Yinghai Lu
     

14 Apr, 2009

1 commit


02 Apr, 2009

2 commits

  • ccio-dma.c:456: warning: overflow in implicit constant conversion
    ccio-dma.c:459: warning: overflow in implicit constant conversion
    ccio-dma.c:1032: warning: unused variable 'j'
    ccio-dma.c:1031: warning: unused variable 'max'
    ccio-dma.c:1031: warning: unused variable 'min'
    ccio-dma.c:1031: warning: unused variable 'avg'
    ccio-dma.c:1403: warning: format '%08lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t'
    ccio-dma.c:1403: warning: format '%08lx' expects type 'long unsigned int', but argument 4 has type 'resource_size_t'
    ccio-dma.c:1554: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t'
    dino.c:822: warning: format '%lx' expects type 'long unsigned int', but argument 4 has type 'resource_size_t'
    dino.c:822: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'resource_size_t'
    dino.c:902: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t'
    dino.c:902: warning: format '%lx' expects type 'long unsigned int', but argument 4 has type 'resource_size_t'
    asp.c:84: warning: format '%lx' expects type 'long unsigned int', but argument 4 has type 'resource_size_t'
    eisa.c:317: warning: format '%08lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t'
    eisa_enumerator.c:101: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'resource_size_t'
    eisa_enumerator.c:101: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t'
    eisa_enumerator.c:191: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'resource_size_t'
    eisa_enumerator.c:191: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t'

    Signed-off-by: Alexander Beregalov
    Signed-off-by: Kyle McMartin

    Alexander Beregalov
     
  • proc_dir_entry::owner was removed in 0702c1c1a4
    (proc 2/2: remove struct proc_dir_entry::owner)

    Signed-off-by: Alexander Beregalov
    Signed-off-by: Kyle McMartin

    Alexander Beregalov
     

31 Mar, 2009

2 commits


16 Mar, 2009

1 commit

  • CC drivers/parisc/sba_iommu.o
    drivers/parisc/sba_iommu.c:1373: error: expected identifier or '('
    before '}' token
    make[2]: *** [drivers/parisc/sba_iommu.o] Error 1
    make[1]: *** [drivers/parisc] Error 2
    make: *** [drivers] Error 2

    Don't know how this has gone missed for so long... clearly I need
    to do builds on my C8000 more often.

    Signed-off-by: Kyle McMartin
    Signed-off-by: Linus Torvalds

    Kyle McMartin
     

13 Mar, 2009

4 commits

  • Acked-by: Greg Kroah-Hartman
    Signed-off-by: Kay Sievers
    Signed-off-by: Kyle McMartin

    Kay Sievers
     
  • cpumask arg to the affinity function is now const, sort
    that out through the irq_desc implementations.

    Signed-off-by: Kyle McMartin

    Kyle McMartin
     
  • Kenji Kaneshige posted a patch series
    to linux-pci to fix a wrong assumption about pci_bus->self==NULL for
    all PCI host bus controllers. While PARISC platforms to not behave
    this way, I prefer to have the code consistent across architectures.
    The following patch replaces pci_bus->self with pci_bus->parent when
    used as a test to check for "root bus controller".

    Signed-off-by: Grant Grundler
    Signed-off-by: Kyle McMartin

    Grant Grundler
     
  • commit 11c3b5c3e08f4d855cbef52883c266b9ab9df879
    Author: Greg Kroah-Hartman
    Date: Tue Dec 16 12:24:56 2008 -0800

    driver core: move klist_children into private structure

    Broke our parisc build pretty badly because we touch the klists directly
    in three cases (AGP, SBA and GSC). Although GregKH will revert this
    patch, there's no reason we should be using the iterators directly, we
    can just move to the standard device_for_each_child() API.

    Signed-off-by: James Bottomley
    Tested-by: Helge Deller
    Tested-by: Kyle McMartin
    Signed-off-by: Kyle McMartin

    James Bottomley
     

30 Jan, 2009

1 commit

  • Move DMA-mapping.txt to Documentation/PCI/.

    DMA-mapping.txt was supposed to be moved from Documentation/ to
    Documentation/PCI/. The 00-INDEX files in those two directories
    were updated, along with a few other text files, but the file
    itself somehow escaped being moved, so move it and update more
    text files and source files with its new location.

    Signed-off-by: Randy Dunlap
    Acked-by: Greg Kroah-Hartman
    cc: Jesse Barnes
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

14 Jan, 2009

1 commit

  • Commit b430428a188e8a434325e251d0704af4b88b4711 ("8250: Don't clobber
    spinlocks.") introduced a regression on the parisc architecture, which
    broke the handover to the serial port at boottime.

    early_serial_setup() was changed to only copy a subset of the uart_port
    fields, and sadly the "type" and "line" fields were forgotten and thus
    the serial port was not initialized and could not be used for a
    handover. This patch fixes this by copying the missing fields.

    As this change to early_serial_setup() doesn't need an initialized
    spinlock in the uart_port struct any longer, we can drop the spinlock
    initialization in the superio driver.

    Cc: David Daney
    Cc: Tomaso Paoletti
    Cc: Andrew Morton
    Cc: Alan Cox
    Acked-by: Kyle McMartin
    Cc: linux-parisc@vger.kernel.org
    Signed-off-by: Helge Deller
    Signed-off-by: Linus Torvalds

    Helge Deller
     

10 Jan, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
    parisc: export length of os_hpmc vector
    parisc: fix kernel crash (protection id trap) when compiling ruby1.9
    parisc: Use DEFINE_SPINLOCK
    parisc: add uevent helper for parisc bus
    parisc: fix ipv6 checksum
    parisc: quiet palo not-found message from "which"
    parisc: Replace NR_CPUS in parisc code
    parisc: trivial fixes
    parisc: fix braino in commit adding __space_to_prot
    parisc: factor out sid to protid conversion
    parisc: use leX_to_cpu in place of __fswabX
    parisc: fix GFP_KERNEL use while atomic in unwinder
    parisc: remove dead BIO_VMERGE_BOUNDARY and BIO_VMERGE_MAX_SIZE definitions
    parisc: set_time() catch errors
    parisc: use the new byteorder headers
    parisc: drivers/parisc/: make code static
    parisc: lib/: make code static

    Linus Torvalds