16 Jul, 2011

1 commit


16 Mar, 2011

2 commits


05 Jan, 2011

1 commit


01 Dec, 2010

1 commit


25 Oct, 2010

5 commits

  • Update the subchannel descriptor while resuming from hibernate
    in order to obtain current link addresses.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • Update the channel path descriptors after hibernation.
    This is done unlocked, since we are the only active
    task at this time.

    Note: chsc_determine_base_channel_path_desc is changed
    to use spin_lock_irqsave, since it's called with
    interrupts disabled in this case.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • Most wrappers around the channel subsystem call have their own logic
    to allocate memory (with proper alignment) or use preallocated or
    static memory. This patch converts most users of the channel
    subsystem call to use the same preallocated page (proteced by a
    spinlock).

    Note: The sei_page which is used in our crw handler to call
    "store event information" has to coexist, since
    a) in crw context, while accessing the sei_page, sleeping is allowed
    (which will conflict with the spinlock protection of the chsc_page)
    b) in crw context, while accessing the sei_page, channel subsystem
    calls are allowed (which itself would require the page).

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • This patch fixes:
    * kfree vs. free_page usage
    * structure definition for determine_css_characteristics
    * naming convention for the chsc init function
    * deregistration of crw handlers in the cleanup path

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • fix this sparse warning:

    drivers/s390/cio/css.c:580:6: warning: symbol 'css_schedule_eval_all_unreg'
    was not declared. Should it be static?

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     

15 Oct, 2010

1 commit

  • All file_operations should get a .llseek operation so we can make
    nonseekable_open the default for future file operations without a
    .llseek pointer.

    The three cases that we can automatically detect are no_llseek, seq_lseek
    and default_llseek. For cases where we can we can automatically prove that
    the file offset is always ignored, we use noop_llseek, which maintains
    the current behavior of not returning an error from a seek.

    New drivers should normally not use noop_llseek but instead use no_llseek
    and call nonseekable_open at open time. Existing drivers can be converted
    to do the same when the maintainer knows for certain that no user code
    relies on calling seek on the device file.

    The generated code is often incorrectly indented and right now contains
    comments that clarify for each added line why a specific variant was
    chosen. In the version that gets submitted upstream, the comments will
    be gone and I will manually fix the indentation, because there does not
    seem to be a way to do that using coccinelle.

    Some amount of new code is currently sitting in linux-next that should get
    the same modifications, which I will do at the end of the merge window.

    Many thanks to Julia Lawall for helping me learn to write a semantic
    patch that does all this.

    ===== begin semantic patch =====
    // This adds an llseek= method to all file operations,
    // as a preparation for making no_llseek the default.
    //
    // The rules are
    // - use no_llseek explicitly if we do nonseekable_open
    // - use seq_lseek for sequential files
    // - use default_llseek if we know we access f_pos
    // - use noop_llseek if we know we don't access f_pos,
    // but we still want to allow users to call lseek
    //
    @ open1 exists @
    identifier nested_open;
    @@
    nested_open(...)
    {

    }

    @ open exists@
    identifier open_f;
    identifier i, f;
    identifier open1.nested_open;
    @@
    int open_f(struct inode *i, struct file *f)
    {

    }

    @ read disable optional_qualifier exists @
    identifier read_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    expression E;
    identifier func;
    @@
    ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
    {

    }

    @ read_no_fpos disable optional_qualifier exists @
    identifier read_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    @@
    ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
    {
    ... when != off
    }

    @ write @
    identifier write_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    expression E;
    identifier func;
    @@
    ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
    {

    }

    @ write_no_fpos @
    identifier write_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    @@
    ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
    {
    ... when != off
    }

    @ fops0 @
    identifier fops;
    @@
    struct file_operations fops = {
    ...
    };

    @ has_llseek depends on fops0 @
    identifier fops0.fops;
    identifier llseek_f;
    @@
    struct file_operations fops = {
    ...
    .llseek = llseek_f,
    ...
    };

    @ has_read depends on fops0 @
    identifier fops0.fops;
    identifier read_f;
    @@
    struct file_operations fops = {
    ...
    .read = read_f,
    ...
    };

    @ has_write depends on fops0 @
    identifier fops0.fops;
    identifier write_f;
    @@
    struct file_operations fops = {
    ...
    .write = write_f,
    ...
    };

    @ has_open depends on fops0 @
    identifier fops0.fops;
    identifier open_f;
    @@
    struct file_operations fops = {
    ...
    .open = open_f,
    ...
    };

    // use no_llseek if we call nonseekable_open
    ////////////////////////////////////////////
    @ nonseekable1 depends on !has_llseek && has_open @
    identifier fops0.fops;
    identifier nso ~= "nonseekable_open";
    @@
    struct file_operations fops = {
    ... .open = nso, ...
    +.llseek = no_llseek, /* nonseekable */
    };

    @ nonseekable2 depends on !has_llseek @
    identifier fops0.fops;
    identifier open.open_f;
    @@
    struct file_operations fops = {
    ... .open = open_f, ...
    +.llseek = no_llseek, /* open uses nonseekable */
    };

    // use seq_lseek for sequential files
    /////////////////////////////////////
    @ seq depends on !has_llseek @
    identifier fops0.fops;
    identifier sr ~= "seq_read";
    @@
    struct file_operations fops = {
    ... .read = sr, ...
    +.llseek = seq_lseek, /* we have seq_read */
    };

    // use default_llseek if there is a readdir
    ///////////////////////////////////////////
    @ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier readdir_e;
    @@
    // any other fop is used that changes pos
    struct file_operations fops = {
    ... .readdir = readdir_e, ...
    +.llseek = default_llseek, /* readdir is present */
    };

    // use default_llseek if at least one of read/write touches f_pos
    /////////////////////////////////////////////////////////////////
    @ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read.read_f;
    @@
    // read fops use offset
    struct file_operations fops = {
    ... .read = read_f, ...
    +.llseek = default_llseek, /* read accesses f_pos */
    };

    @ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier write.write_f;
    @@
    // write fops use offset
    struct file_operations fops = {
    ... .write = write_f, ...
    + .llseek = default_llseek, /* write accesses f_pos */
    };

    // Use noop_llseek if neither read nor write accesses f_pos
    ///////////////////////////////////////////////////////////

    @ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read_no_fpos.read_f;
    identifier write_no_fpos.write_f;
    @@
    // write fops use offset
    struct file_operations fops = {
    ...
    .write = write_f,
    .read = read_f,
    ...
    +.llseek = noop_llseek, /* read and write both use no f_pos */
    };

    @ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier write_no_fpos.write_f;
    @@
    struct file_operations fops = {
    ... .write = write_f, ...
    +.llseek = noop_llseek, /* write uses no f_pos */
    };

    @ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read_no_fpos.read_f;
    @@
    struct file_operations fops = {
    ... .read = read_f, ...
    +.llseek = noop_llseek, /* read uses no f_pos */
    };

    @ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    @@
    struct file_operations fops = {
    ...
    +.llseek = noop_llseek, /* no read or write fn */
    };
    ===== End semantic patch =====

    Signed-off-by: Arnd Bergmann
    Cc: Julia Lawall
    Cc: Christoph Hellwig

    Arnd Bergmann
     

17 May, 2010

2 commits


22 Apr, 2010

2 commits


27 Feb, 2010

4 commits

  • ccw_device_pm_restore: trigger subchannel event to better handle
    changes to the subchannel device.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • Make the potentially long blocking wait_event's used by the cio
    settle mechanism interruptible.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • This patch introduces a proc file cio_settle. A write request to
    this file is blocked until all queued cio actions are handled.

    This will allow userspace to wait for pending work affecting
    device availability after changing cio_ignore or the hardware
    configuration.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • We used to maintain 2 singlethreaded workqueues for synchronization
    and to trigger work from interrupt context. Since our latest cio
    changes we only use one of these workqueues. So get rid of the
    unused workqueue, rename the remaining one to "cio_work_q" and move
    its ownership to the channel subsystem driver.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     

16 Dec, 2009

1 commit


07 Dec, 2009

2 commits

  • Ensure that current and future users of sch->work do not overwrite
    each other by introducing a single mechanism for delayed subchannel
    work.

    Signed-off-by: Peter Oberparleiter
    Signed-off-by: Martin Schwidefsky

    Peter Oberparleiter
     
  • Change the initiative to update subchannel-ccw device associations
    to the subchannel: when there is an indication that the internal
    association no longer reflects the current hardware state, mark
    each affected subchannel as requiring attention. Once processing
    reaches a subchannel, determine the correct association for that
    subchannel at that time and perform the necessary device_move
    operations.

    This change fixes problems with the previous approach which would
    leave devices in an inconsistent state when a new hardware change
    occurred while a device_move was already scheduled.

    Signed-off-by: Peter Oberparleiter
    Signed-off-by: Martin Schwidefsky

    Peter Oberparleiter
     

23 Sep, 2009

6 commits


16 Sep, 2009

1 commit


11 Sep, 2009

5 commits

  • Merge cpuid.h header file into cpu.h.
    While at it convert from typedef to struct declaration and also
    convert cio code to use proper lowcore structure instead of casts.

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

    Heiko Carstens
     
  • Don't use kfree directly after device registration started.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • We used the init_name to set the console subchannels name early
    at the boot stage. With the patch cio: fix memleak in subchannel validation
    we moved the name setting to the point where we actually register the
    console subchannel. At this time we can do dynamic allocations and therefore
    use dev_set_name.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • When scanning for new subchannels we have a code path where we allocate
    memory for a struct subchannel, set the device name (which is dynamically
    allocated now) and do a check if the underlying device is blacklisted - if
    so we free the subchannel structure.
    Since we have not set up refcounting at this stage, the device name's memory
    is lost. Fix this by moving the dev_set_name after the blacklist test.

    Note: With this patch the init_name for the console subchannel becomes
    virtually obsolete.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • Ensure that the hardware interruption parameter for a subchannel is
    reset when the associated subchannel data structure is freed.

    Signed-off-by: Peter Oberparleiter
    Signed-off-by: Martin Schwidefsky

    Peter Oberparleiter
     

16 Jun, 2009

1 commit


27 Mar, 2009

1 commit

  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (81 commits)
    [S390] remove duplicated #includes
    [S390] cpumask: use mm_cpumask() wrapper
    [S390] cpumask: Use accessors code.
    [S390] cpumask: prepare for iterators to only go to nr_cpu_ids/nr_cpumask_bits.
    [S390] cpumask: remove cpu_coregroup_map
    [S390] fix clock comparator save area usage
    [S390] Add hwcap flag for the etf3 enhancement facility
    [S390] Ensure that ipl panic notifier is called late.
    [S390] fix dfp elf hwcap/facility bit detection
    [S390] smp: perform initial cpu reset before starting a cpu
    [S390] smp: fix memory leak on __cpu_up
    [S390] ipl: Improve checking logic and remove switch defaults.
    [S390] s390dbf: Remove needless check for NULL pointer.
    [S390] s390dbf: Remove redundant initilizations.
    [S390] use kzfree()
    [S390] BUG to BUG_ON changes
    [S390] zfcpdump: Prevent zcore from beeing built as a kernel module.
    [S390] Use csum_partial in checksum.h
    [S390] cleanup lowcore.h
    [S390] eliminate ipl_device from lowcore
    ...

    Linus Torvalds
     

26 Mar, 2009

4 commits