25 May, 2011

1 commit

  • Commit 1292500b replaced

    "=m" (*field) : "1" (*field)

    with

    "=m" (*field) :

    with comment "The following patch fixes it by using the '+' operator on
    the (*field) operand, marking it as read-write to gcc."
    '+' was actually forgotten. This really puts it.

    Signed-off-by: Samuel Thibault
    Cc: stable@kernel.org
    Signed-off-by: James Bottomley

    Samuel Thibault
     

29 Mar, 2011

1 commit

  • Stop including in x86 header files which don't
    need it. This will let the compiler complain when this header is
    not included by source files when it should, so that
    contributors can fix the problem before building on other
    architectures starts to fail.

    Credits go to Geert for the idea.

    Signed-off-by: Jean Delvare
    Cc: James E.J. Bottomley
    Cc: Geert Uytterhoeven
    Cc: Stephen Rothwell
    LKML-Reference:
    [ this also fixes an upstream build bug in drivers/media/rc/ite-cir.c ]
    Signed-off-by: Ingo Molnar

    Jean Delvare
     

17 Nov, 2010

1 commit

  • Move the mid-layer's ->queuecommand() invocation from being locked
    with the host lock to being unlocked to facilitate speeding up the
    critical path for drivers who don't need this lock taken anyway.

    The patch below presents a simple SCSI host lock push-down as an
    equivalent transformation. No locking or other behavior should change
    with this patch. All existing bugs and locking orders are preserved.

    Additionally, add one parameter to queuecommand,
    struct Scsi_Host *
    and remove one parameter from queuecommand,
    void (*done)(struct scsi_cmnd *)

    Scsi_Host* is a convenient pointer that most host drivers need anyway,
    and 'done' is redundant to struct scsi_cmnd->scsi_done.

    Minimal code disturbance was attempted with this change. Most drivers
    needed only two one-line modifications for their host lock push-down.

    Signed-off-by: Jeff Garzik
    Acked-by: James Bottomley
    Signed-off-by: Linus Torvalds

    Jeff Garzik
     

29 Apr, 2008

1 commit

  • drivers/scsi/aic7xxx/aic7770_osm.c:53:58: warning: Using plain integer as NULL pointer
    drivers/scsi/aic7xxx/aic7xxx_osm_pci.c:355:47: warning: Using plain integer as NULL pointer
    drivers/scsi/aic7xxx/aic7xxx_osm_pci.c:372:55: warning: Using plain integer as NULL pointer
    drivers/scsi/aha152x.c:997:28: warning: Using plain integer as NULL pointer
    drivers/scsi/aha152x.c:1003:28: warning: Using plain integer as NULL pointer
    drivers/scsi/aha152x.c:1165:46: warning: Using plain integer as NULL pointer
    drivers/scsi/fdomain.c:1446:40: warning: Using plain integer as NULL pointer
    drivers/scsi/sym53c8xx_2/sym_hipd.c:1650:51: warning: Using plain integer as NULL pointer
    drivers/scsi/sym53c8xx_2/sym_hipd.c:3171:42: warning: Using plain integer as NULL pointer
    drivers/scsi/sym53c8xx_2/sym_hipd.c:5732:52: warning: Using plain integer as NULL pointer
    drivers/scsi/ncr53c8xx.c:8189:31: warning: Using plain integer as NULL pointer
    drivers/scsi/ncr53c8xx.c:8225:34: warning: Using plain integer as NULL pointer
    drivers/scsi/dpt_i2o.c:156:32: warning: Using plain integer as NULL pointer
    drivers/scsi/ultrastor.c:954:42: warning: Using plain integer as NULL pointer
    drivers/scsi/ultrastor.c:1104:18: warning: Using plain integer as NULL pointer

    Signed-off-by: Harvey Harrison
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     

31 Jan, 2008

1 commit

  • With the sg table code, every SCSI driver is now either chain capable
    or broken (or has sg_tablesize set so chaining is never activated), so
    there's no need to have a check in the host template.

    Also tidy up the code by moving the scatterlist size defines into the
    SCSI includes and permit the last entry of the scatterlist pools not
    to be a power of two.
    Signed-off-by: James Bottomley

    James Bottomley
     

26 Jan, 2008

1 commit

  • To: linux-kernel@vger.kernel.org
    Cc: bunk@kernel.org
    Subject: [trivial patch] scsi/ultrastor: clean up inline asm warnings

    Hi,

    Compiling latest mainline with gcc 4.2.1 spews the following warnings:

    drivers/scsi/ultrastor.c: In function 'find_and_clear_bit_16':
    drivers/scsi/ultrastor.c:303: warning: matching constraint does not allow a register
    drivers/scsi/ultrastor.c:302: warning: matching constraint does not allow a register
    drivers/scsi/ultrastor.c: At top level:
    drivers/scsi/ultrastor.c:1202: warning: matching constraint does not allow a register
    drivers/scsi/ultrastor.c:1202: warning: matching constraint does not allow a register
    drivers/scsi/ultrastor.c: In function 'ultrastor_queuecommand':
    drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register
    drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register
    drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register
    drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register
    drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register
    drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register
    drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register
    drivers/scsi/ultrastor.c:302: warning: matching constraint does not allow a register
    drivers/scsi/ultrastor.c:302: warning: matching constraint does not allow a register

    The following patch fixes it by using the '+' operator on the (*field)
    operand, marking it as read-write to gcc. I diffed the two resulting .s,
    and gcc produced the same code. This was tested with gcc 4.2.1 and gcc 3.4.3

    Signed-off-by: Frederik Deweerdt
    Cc: Adrian Bunk
    Signed-off-by: James Bottomley

    Frederik Deweerdt
     

24 Jan, 2008

1 commit


23 Oct, 2007

1 commit


16 Oct, 2007

1 commit


27 May, 2007

1 commit


07 Oct, 2006

1 commit

  • - Eliminate casts to/from void*

    - Eliminate checks for conditions that never occur. These typically
    fall into two classes:

    1) Checking for 'dev_id == NULL', then it is never called with
    NULL as an argument.

    2) Checking for invalid irq number, when the only caller (the
    system) guarantees the irq handler is called with the proper
    'irq' number argument.

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     

05 Oct, 2006

1 commit

  • Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
    of passing regs around manually through all ~1800 interrupt handlers in the
    Linux kernel.

    The regs pointer is used in few places, but it potentially costs both stack
    space and code to pass it around. On the FRV arch, removing the regs parameter
    from all the genirq function results in a 20% speed up of the IRQ exit path
    (ie: from leaving timer_interrupt() to leaving do_IRQ()).

    Where appropriate, an arch may override the generic storage facility and do
    something different with the variable. On FRV, for instance, the address is
    maintained in GR28 at all times inside the kernel as part of general exception
    handling.

    Having looked over the code, it appears that the parameter may be handed down
    through up to twenty or so layers of functions. Consider a USB character
    device attached to a USB hub, attached to a USB controller that posts its
    interrupts through a cascaded auxiliary interrupt controller. A character
    device driver may want to pass regs to the sysrq handler through the input
    layer which adds another few layers of parameter passing.

    I've build this code with allyesconfig for x86_64 and i386. I've runtested the
    main part of the code on FRV and i386, though I can't test most of the drivers.
    I've also done partial conversion for powerpc and MIPS - these at least compile
    with minimal configurations.

    This will affect all archs. Mostly the changes should be relatively easy.
    Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

    struct pt_regs *old_regs = set_irq_regs(regs);

    And put the old one back at the end:

    set_irq_regs(old_regs);

    Don't pass regs through to generic_handle_irq() or __do_IRQ().

    In timer_interrupt(), this sort of change will be necessary:

    - update_process_times(user_mode(regs));
    - profile_tick(CPU_PROFILING, regs);
    + update_process_times(user_mode(get_irq_regs()));
    + profile_tick(CPU_PROFILING);

    I'd like to move update_process_times()'s use of get_irq_regs() into itself,
    except that i386, alone of the archs, uses something other than user_mode().

    Some notes on the interrupt handling in the drivers:

    (*) input_dev() is now gone entirely. The regs pointer is no longer stored in
    the input_dev struct.

    (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
    something different depending on whether it's been supplied with a regs
    pointer or not.

    (*) Various IRQ handler function pointers have been moved to type
    irq_handler_t.

    Signed-Off-By: David Howells
    (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)

    David Howells
     

08 Sep, 2006

1 commit


10 Nov, 2005

1 commit


18 Jun, 2005

2 commits


01 May, 2005

1 commit


19 Apr, 2005

1 commit

  • Fix up two drivers that incorrectly were using the old return values for
    their new-style EH methods and kill off scsi_obsolete.h that defined the
    constants. The initio driver has all these constansts defined locally
    and uses them internally, I'll fix that up some time later.

    Signed-off-by: James Bottomley

     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds