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
     

27 Feb, 2010

1 commit

  • Use asm offsets to make sure the offset defines to struct _lowcore and
    its layout don't get out of sync.
    Also add a BUILD_BUG_ON() which checks that the size of the structure
    is sane.
    And while being at it change those sites which use odd casts to access
    the current lowcore. These should use S390_lowcore instead.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

11 Sep, 2009

1 commit


12 Jun, 2009

2 commits


07 Jan, 2009

1 commit


30 Dec, 2008

3 commits


15 Nov, 2008

1 commit


11 Oct, 2008

1 commit

  • No need to define a static device for the kvm_s390 root device,
    just use s390_root_dev_register().

    This is needed for the bus_id rework

    Acked-by: Carsten Otte
    Cc: Kay Sievers
    Signed-off-by: Cornelia Huck
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Martin Schwidefsky

    Cornelia Huck
     

01 Aug, 2008

1 commit

  • Fix these two false positive warnings:

    WARNING: vmlinux.o(.text+0x2e1cc4): Section mismatch in reference from the function s390_virtio_console_init() to the function .init.text:early_put_chars()
    The function s390_virtio_console_init() references
    the function __init early_put_chars().
    This is often because s390_virtio_console_init lacks a __init
    annotation or the annotation of early_put_chars is wrong.

    WARNING: vmlinux.o(.text+0x2e1cd0): Section mismatch in reference from the function s390_virtio_console_init() to the function .init.text:virtio_cons_early_init()
    The function s390_virtio_console_init() references
    the function __init virtio_cons_early_init().
    This is often because s390_virtio_console_init lacks a __init
    annotation or the annotation of virtio_cons_early_init is wrong.

    Cc: Christian Borntraeger
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

27 Jul, 2008

1 commit

  • Cornelia Huck noticed that a modular virtio without kvm guest support
    leads to a build error in the s390 virtio transport:

    CONFIG_VIRTIO=m leads to
    ERROR: "vmem_add_mapping" [drivers/s390/kvm/kvm_virtio.ko] undefined!
    ERROR: "max_pfn" [drivers/s390/kvm/kvm_virtio.ko] undefined!
    ERROR: "vmem_remove_mapping" [drivers/s390/kvm/kvm_virtio.ko] undefined!

    The virtio transport only works with kvm guest support and only as a
    builtin. Lets change the build process of drivers/s390/kvm/kvm_virtio.c
    to depend on kvm guest support, which is also a bool.

    CONFIG_S390_GUEST already selects CONFIG_VIRTIO, that should prevent
    CONFIG_S390_GUEST=y CONFIG_VIRTIO=n situations.

    CC: Cornelia Huck
    Signed-off-by: Christian Borntraeger
    Signed-off-by: Avi Kivity

    Christian Borntraeger
     

25 Jul, 2008

3 commits


30 May, 2008

1 commit

  • Anthony Liguori points out that three different transports use the virtio code,
    but each one keeps its own counter to set the virtio_device's index field. In
    theory (though not in current practice) this means that names could be
    duplicated, and that risk grows as more transports are created.

    So we move the selection of the unique virtio_device.index into the common code
    in virtio.c, which has the side-benefit of removing duplicate code.

    The only complexity is that lguest and S/390 use the index to uniquely identify
    the device in case of catastrophic failure before register_virtio_device() is
    called: now we use the offset within the descriptor page as a unique identifier
    for the printks.

    Signed-off-by: Rusty Russell
    Cc: Christian Borntraeger
    Cc: Martin Schwidefsky
    Cc: Carsten Otte
    Cc: Heiko Carstens
    Cc: Chris Lalancette
    Cc: Anthony Liguori

    Rusty Russell
     

18 May, 2008

1 commit

  • Fix kvm compile error:

    Commit c45a6816c19dee67b8f725e6646d428901a6dc24
    (virtio: explicit advertisement of driver features)
    and commit e976a2b997fc4ad70ccc53acfe62811c4aaec851
    (s390: KVM guest: virtio device support, and kvm hypercalls)
    don't like each other:

    CC drivers/s390/kvm/kvm_virtio.o
    drivers/s390/kvm/kvm_virtio.c:224: error: unknown field 'feature' specified in initializer
    drivers/s390/kvm/kvm_virtio.c:224: warning: initialization from incompatible pointer type
    make[3]: *** [drivers/s390/kvm/kvm_virtio.o] Error 1

    Cc: Adrian Bunk
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky
    Acked-by: Christian Borntraeger
    Acked-by: Carsten Otte
    Signed-off-by: Avi Kivity

    Heiko Carstens
     

30 Apr, 2008

1 commit

  • Convert s390 to SPARSEMEM and SPARSEMEM_VMEMMAP. We do a select
    of SPARSEMEM_VMEMMAP since it is configurable. This is because
    SPARSEMEM without SPARSEMEM_VMEMMAP gives us a hell of broken
    include dependencies that I don't want to fix.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

27 Apr, 2008

1 commit

  • This patch implements kvm guest kernel support for paravirtualized devices
    and contains two parts:
    o a basic virtio stub using virtio_ring and external interrupts and hypercalls
    o full hypercall implementation in kvm_para.h

    Currently we dont have PCI on s390. Making virtio_pci usable for s390 seems
    more complicated that providing an own stub. This virtio stub is similar to
    the lguest one, the memory for the descriptors and the device detection is made
    via additional mapped memory on top of the guest storage. We use an external
    interrupt with extint code 0x2603 for host->guest notification.

    The hypercall definition uses the diag instruction for issuing a hypercall. The
    parameters are written in R2-R7, the hypercall number is written in R1. This is
    similar to the system call ABI (svc) which can use R1 for the number and R2-R6
    for the parameters.

    Signed-off-by: Christian Borntraeger
    Acked-by: Martin Schwidefsky
    Signed-off-by: Carsten Otte
    Signed-off-by: Avi Kivity

    Christian Borntraeger