13 Aug, 2010

1 commit

  • * 'params' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (22 commits)
    param: don't deref arg in __same_type() checks
    param: update drivers/acpi/debug.c to new scheme
    param: use module_param in drivers/message/fusion/mptbase.c
    ide: use module_param_named rather than module_param_call
    param: update drivers/char/ipmi/ipmi_watchdog.c to new scheme
    param: lock if_sdio's lbs_helper_name and lbs_fw_name against sysfs changes.
    param: lock myri10ge_fw_name against sysfs changes.
    param: simple locking for sysfs-writable charp parameters
    param: remove unnecessary writable charp
    param: add kerneldoc to moduleparam.h
    param: locking for kernel parameters
    param: make param sections const.
    param: use free hook for charp (fix leak of charp parameters)
    param: add a free hook to kernel_param_ops.
    param: silence .init.text references from param ops
    Add param ops struct for hvc_iucv driver.
    nfs: update for module_param_named API change
    AppArmor: update for module_param_named API change
    param: use ops in struct kernel_param, rather than get and set fns directly
    param: move the EXPORT_SYMBOL to after the definitions.
    ...

    Linus Torvalds
     

11 Aug, 2010

2 commits

  • The MFGPT hardware may be set up only once, therefore
    cs5535_mfgpt_free_timer() didn't re-set the timer's "avail" bit. However
    if a timer is freed before it has actually been in use then it may be made
    available again.

    Signed-off-by: Jens Rottmann
    Acked-by: Andres Salomon
    Cc: Thomas Gleixner
    Cc: Jordan Crouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jens Rottmann
     
  • sysfs-writable charp arguments need to be locked against modification
    (since the old ones may be kfreed underneath us). String arguments
    are much simpler, so use them for small strings (eg. IFNAMSIZ).

    lkdtm only uses the parameters at module initialization time, so there's
    not much point making them writable.

    Signed-off-by: Rusty Russell
    Reviewed-by: Takashi Iwai
    Tested-by: Phil Carmody
    Cc: Andrew Morton
    Cc: M. Mohan Kumar
    Cc: Greg Kroah-Hartman
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Jeff Mahoney
    Cc: Julia Lawall
    Cc: devel@driverdev.osuosl.org

    Rusty Russell
     

10 Aug, 2010

4 commits

  • This driver will report the heading values in degrees to the sysfs
    interface. The values returned are headings . e.g. 245.6

    Alan: Cleanups requested now all folded in and a sysfs description to keep
    Andrew happy. The sysfs description now resembles hwmon.

    Signed-off-by: Kalhan Trisal
    Reviewed-by: Jean Delvare
    Signed-off-by: Alan Cox
    Cc: Jonathan Cameron
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kalhan Trisal
     
  • This driver adds support for the BMP085 digital pressure sensor from Bosch
    Sensortec. It exposes a sysfs api to userspace where pressure and
    temperature measurement results can be read from the pressure0_input and
    temp0_input file. The chip is able to calculate the average of up to
    eight samples to increase the accuracy. This feature can be controlled by
    writing to the oversampling file.

    The BMP085 digital pressure sensor can measure ambient air pressure and
    temperature. Both values can be obtained from sysfs files. The pressure
    is measured by reading from pressure0_input. Valid values range from
    30000 to 110000 pascal with a resolution of 1 pascal (=0.01 millibar).

    temp0_input holds the current temperature in degree celsius, multiplied by
    10. This results in a resolution of a tenth degree celsius. Values range
    from -400 to 850.

    To increase the accuracy, this chip can calculate the average of 1, 2, 4
    or 8 samples. This behavior is controlled through the oversampling sysfs
    file. Two to the power of the value written to that file specifies how
    many samples will be used. Valid values: 0..3.

    [akpm@linux-foundation.org: fix typo]
    [shubhrajyoti@ti.com: optimize the wait time for the pressure sensor, definition of long is arch dependent so make it u32]
    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Christoph Mair
    Signed-off-by: Shubhrajyoti D
    Acked-by: Jonathan Cameron
    Cc: Stefan Schmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Mair
     
  • Fix i386 PAE compile warning:

    drivers/misc/hpilo.c: In function `ilo_ccb_setup':
    drivers/misc/hpilo.c:274: warning: cast to pointer from integer of different size

    dma_addr_t is 64 on i386 PAE which causes a size mismatch.

    Signed-off-by: Prarit Bhargava
    Acked-by: David Altobelli
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Prarit Bhargava
     
  • Add support for ROHM BH1780GLI Ambient light sensor.

    BH1780 supports I2C interface. Driver supports read/update of power state
    and read of lux value (through SYSFS). Writing value 3 to power_state
    enables the sensor and current lux value could be read.

    Currently this driver follows the same sysfs convention as supported by
    drivers/misc/isl29003.c.

    Signed-off-by: Hemanth V
    Reviewed-by: Daniel Mack
    Acked-by: Jonathan Cameron
    Cc: Jean Delvare
    Cc: Wolfram Sang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hemanth V
     

07 Aug, 2010

1 commit

  • …x/kernel/git/tip/linux-2.6-tip

    * 'timers-timekeeping-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    um: Fix read_persistent_clock fallout
    kgdb: Do not access xtime directly
    powerpc: Clean up obsolete code relating to decrementer and timebase
    powerpc: Rework VDSO gettimeofday to prevent time going backwards
    clocksource: Add __clocksource_updatefreq_hz/khz methods
    x86: Convert common clocksources to use clocksource_register_hz/khz
    timekeeping: Make xtime and wall_to_monotonic static
    hrtimer: Cleanup direct access to wall_to_monotonic
    um: Convert to use read_persistent_clock
    timkeeping: Fix update_vsyscall to provide wall_to_monotonic offset
    powerpc: Cleanup xtime usage
    powerpc: Simplify update_vsyscall
    time: Kill off CONFIG_GENERIC_TIME
    time: Implement timespec_add
    x86: Fix vtime/file timestamp inconsistencies

    Trivial conflicts in Documentation/feature-removal-schedule.txt

    Much less trivial conflicts in arch/powerpc/kernel/time.c resolved as
    per Thomas' earlier merge commit 47916be4e28c ("Merge branch
    'powerpc.cherry-picks' into timers/clocksource")

    Linus Torvalds
     

05 Aug, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (276 commits)
    [SCSI] zfcp: Trigger logging in the FCP channel on qdio error conditions
    [SCSI] zfcp: Introduce experimental support for DIF/DIX
    [SCSI] zfcp: Enable data division support for FCP devices
    [SCSI] zfcp: Prevent access on uninitialized memory.
    [SCSI] zfcp: Post events through FC transport class
    [SCSI] zfcp: Cleanup QDIO attachment and improve processing.
    [SCSI] zfcp: Cleanup function parameters for sbal value.
    [SCSI] zfcp: Use correct width for timer_interval field
    [SCSI] zfcp: Remove SCSI device when removing unit
    [SCSI] zfcp: Use memdup_user and kstrdup
    [SCSI] zfcp: Fix retry after failed "open port" erp action
    [SCSI] zfcp: Fail erp after timeout
    [SCSI] zfcp: Use forced_reopen in terminate_rport_io callback
    [SCSI] zfcp: Register SCSI devices after successful fc_remote_port_add
    [SCSI] zfcp: Do not try "forced close" when port is already closed
    [SCSI] zfcp: Do not unblock rport from REOPEN_PORT_FORCED
    [SCSI] sd: add support for runtime PM
    [SCSI] implement runtime Power Management
    [SCSI] convert to the new PM framework
    [SCSI] Unify SAM_ and SAM_STAT_ macros
    ...

    Linus Torvalds
     

31 Jul, 2010

1 commit


28 Jul, 2010

1 commit


27 Jul, 2010

1 commit

  • Now that all arches have been converted over to use generic time via
    clocksources or arch_gettimeoffset(), we can remove the GENERIC_TIME
    config option and simplify the generic code.

    Signed-off-by: John Stultz
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    John Stultz
     

26 Jul, 2010

1 commit


21 Jul, 2010

1 commit

  • My Collabora address is no longer enabled - update the MODULE_AUTHOR
    fields of drivers to my current email address.

    Signed-off-by: Andres Salomon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andres Salomon
     

05 Jun, 2010

1 commit

  • Limit number of accumulated non-balloonable pages during inflation cycle,
    otherwise there is a chance we will be spinning and growing the list
    forever. This happens during torture tests when balloon target changes
    while we are in the middle of inflation cycle and monitor starts refusing
    to lock pages (since they are not needed anymore).

    Signed-off-by: Dmitry Torokhov
    Acked-by: Bhavesh Davda
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry Torokhov
     

03 Jun, 2010

1 commit

  • I2C drivers can use the clientdata-pointer to point to private data. As I2C
    devices are not really unregistered, but merely detached from their driver, it
    used to be the drivers obligation to clear this pointer during remove() or a
    failed probe(). As a couple of drivers forgot to do this, it was agreed that it
    was cleaner if the i2c-core does this clearance when appropriate, as there is
    no guarantee for the lifetime of the clientdata-pointer after remove() anyhow.
    This feature was added to the core with commit
    e4a7b9b04de15f6b63da5ccdd373ffa3057a3681 to fix the faulty drivers.

    As there is no need anymore to clear the clientdata-pointer, remove all current
    occurrences in the drivers to simplify the code and prevent confusion.

    Signed-off-by: Wolfram Sang
    Acked-by: Mark Brown
    Acked-by: Greg Kroah-Hartman
    Acked-by: Richard Purdie
    Acked-by: Dmitry Torokhov
    Signed-off-by: Jean Delvare

    Wolfram Sang
     

28 May, 2010

1 commit

  • This adds three new types of kernel "crashes" in the lkdtm driver to
    trigger hardlockups, softlockups and task hung states at will.

    The first two are useful to test the new generic lockup detector and check
    its further regressions. The latter one is a bonus to check the hung task
    detector regressions even though it's not currently in rework.

    Signed-off-by: Frederic Weisbecker
    Cc: Simon Kagstrom
    Cc: Ingo Molnar
    Cc: Don Zickus
    Cc: Cyrill Gorcunov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Frederic Weisbecker
     

25 May, 2010

6 commits


22 May, 2010

4 commits

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (92 commits)
    powerpc: Remove unused 'protect4gb' boot parameter
    powerpc: Build-in e1000e for pseries & ppc64_defconfig
    powerpc/pseries: Make request_ras_irqs() available to other pseries code
    powerpc/numa: Use ibm,architecture-vec-5 to detect form 1 affinity
    powerpc/numa: Set a smaller value for RECLAIM_DISTANCE to enable zone reclaim
    powerpc: Use smt_snooze_delay=-1 to always busy loop
    powerpc: Remove check of ibm,smt-snooze-delay OF property
    powerpc/kdump: Fix race in kdump shutdown
    powerpc/kexec: Fix race in kexec shutdown
    powerpc/kexec: Speedup kexec hash PTE tear down
    powerpc/pseries: Add hcall to read 4 ptes at a time in real mode
    powerpc: Use more accurate limit for first segment memory allocations
    powerpc/kdump: Use chip->shutdown to disable IRQs
    powerpc/kdump: CPUs assume the context of the oopsing CPU
    powerpc/crashdump: Do not fail on NULL pointer dereferencing
    powerpc/eeh: Fix oops when probing in early boot
    powerpc/pci: Check devices status property when scanning OF tree
    powerpc/vio: Switch VIO Bus PM to use generic helpers
    powerpc: Avoid bad relocations in iSeries code
    powerpc: Use common cpu_die (fixes SMP+SUSPEND build)
    ...

    Linus Torvalds
     
  • * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
    i2c-nforce2: Remove redundant error messages on ACPI conflict
    i2c: Use instead of
    i2c-algo-pca: Fix coding style issues
    i2c-dev: Fix all coding style issues
    i2c-core: Fix some coding style issues
    i2c-gpio: Move initialization code to subsys_initcall()
    i2c-parport: Make template structure const
    i2c-dev: Remove unnecessary casts
    at24: Fall back to byte or word reads if needed
    i2c-stub: Expose the default functionality flags
    i2c/scx200_acb: Make PCI device ids constant
    i2c-i801: Fix all checkpatch warnings
    i2c-i801: All newer devices have all the optional features
    i2c-i801: Let the user disable selected driver features

    Linus Torvalds
     
  • Increase the portability of the at24 driver by letting it read from
    EEPROM chips connected to cheap SMBus controllers that support neither
    raw I2C messages nor even I2C block reads. All SMBus controllers
    should support either word reads or byte reads, so read support
    becomes universal, much like with the legacy "eeprom" driver.

    Obviously, this only works with EEPROM chips up to AT24C16, that use
    8-bit offset addressing. 16-bit offset addressing is almost impossible
    to support on SMBus controllers.

    I did not add universal support for writes, as I had no immediate need
    for this, but it could be added later if needed (with the same
    performance issue as byte and word reads have, of course.)

    Signed-off-by: Jean Delvare
    Reviewed-by: Wolfram Sang
    Cc: Konstantin Lazarev

    Jean Delvare
     
  • This allows bin_attr->read,write,mmap callbacks to check file specific data
    (such as inode owner) as part of any privilege validation.

    Signed-off-by: Chris Wright
    Signed-off-by: Greg Kroah-Hartman

    Chris Wright
     

21 May, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (44 commits)
    vlynq: make whole Kconfig-menu dependant on architecture
    add descriptive comment for TIF_MEMDIE task flag declaration.
    EEPROM: max6875: Header file cleanup
    EEPROM: 93cx6: Header file cleanup
    EEPROM: Header file cleanup
    agp: use NULL instead of 0 when pointer is needed
    rtc-v3020: make bitfield unsigned
    PCI: make bitfield unsigned
    jbd2: use NULL instead of 0 when pointer is needed
    cciss: fix shadows sparse warning
    doc: inode uses a mutex instead of a semaphore.
    uml: i386: Avoid redefinition of NR_syscalls
    fix "seperate" typos in comments
    cocbalt_lcdfb: correct sections
    doc: Change urls for sparse
    Powerpc: wii: Fix typo in comment
    i2o: cleanup some exit paths
    Documentation/: it's -> its where appropriate
    UML: Fix compiler warning due to missing task_struct declaration
    UML: add kernel.h include to signal.c
    ...

    Linus Torvalds
     

14 May, 2010

3 commits


09 May, 2010

1 commit


07 May, 2010

1 commit


25 Apr, 2010

1 commit

  • This is a standalone version of VMware Balloon driver. Ballooning is a
    technique that allows hypervisor dynamically limit the amount of memory
    available to the guest (with guest cooperation). In the overcommit
    scenario, when hypervisor set detects that it needs to shuffle some
    memory, it instructs the driver to allocate certain number of pages, and
    the underlying memory gets returned to the hypervisor. Later hypervisor
    may return memory to the guest by reattaching memory to the pageframes and
    instructing the driver to "deflate" balloon.

    We are submitting a standalone driver because KVM maintainer (Avi Kivity)
    expressed opinion (rightly) that our transport does not fit well into
    virtqueue paradigm and thus it does not make much sense to integrate with
    virtio.

    There were also some concerns whether current ballooning technique is the
    right thing. If there appears a better framework to achieve this we are
    prepared to evaluate and switch to using it, but in the meantime we'd like
    to get this driver upstream.

    We want to get the driver accepted in distributions so that users do not
    have to deal with an out-of-tree module and many distributions have
    "upstream first" requirement.

    The driver has been shipping for a number of years and users running on
    VMware platform will have it installed as part of VMware Tools even if it
    will not come from a distribution, thus there should not be additional
    risk in pulling the driver into mainline. The driver will only activate
    if host is VMware so everyone else should not be affected at all.

    Signed-off-by: Dmitry Torokhov
    Cc: Avi Kivity
    Cc: Jeremy Fitzhardinge
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry Torokhov
     

07 Apr, 2010

1 commit


05 Apr, 2010

1 commit


03 Apr, 2010

1 commit


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
     

25 Mar, 2010

1 commit


15 Mar, 2010

1 commit

  • Commit 6992f5334995af474c2b58d010d08bc597f0f2fe ("sysfs: Use one lockdep
    class per sysfs attribute.") introduced this requirement. First, at25
    was fixed manually. Then, other occurences were found with coccinelle
    and the following semantic patch. Results were reviewed and fixed up:

    @ init @
    identifier struct_name, bin;
    @@

    struct struct_name {
    ...
    struct bin_attribute bin;
    ...
    };

    @ main extends init @
    expression E;
    statement S;
    identifier name, err;
    @@

    (
    struct struct_name *name;
    |
    - struct struct_name *name = NULL;
    + struct struct_name *name;
    )
    ...
    (
    sysfs_bin_attr_init(&name->bin);
    |
    + sysfs_bin_attr_init(&name->bin);
    if (sysfs_create_bin_file(E, &name->bin))
    S
    |
    + sysfs_bin_attr_init(&name->bin);
    err = sysfs_create_bin_file(E, &name->bin);
    )

    Signed-off-by: Wolfram Sang
    Cc: Eric W. Biederman
    Signed-off-by: Linus Torvalds

    Wolfram Sang