15 Feb, 2007

1 commit

  • After Al Viro (finally) succeeded in removing the sched.h #include in module.h
    recently, it makes sense again to remove other superfluous sched.h includes.
    There are quite a lot of files which include it but don't actually need
    anything defined in there. Presumably these includes were once needed for
    macros that used to live in sched.h, but moved to other header files in the
    course of cleaning it up.

    To ease the pain, this time I did not fiddle with any header files and only
    removed #includes from .c-files, which tend to cause less trouble.

    Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
    arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
    allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
    configs in arch/arm/configs on arm. I also checked that no new warnings were
    introduced by the patch (actually, some warnings are removed that were emitted
    by unnecessarily included header files).

    Signed-off-by: Tim Schmielau
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

13 Feb, 2007

2 commits

  • Many struct file_operations in the kernel can be "const". Marking them const
    moves these to the .rodata section, which avoids false sharing with potential
    dirty data. In addition it'll catch accidental writes at compile time to
    these shared resources.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • - Use timer macros to set function and data members and to modify
    expiration time.
    - Use DEFINE_TIMER for global timers and do not init them at run-time in
    these cases.
    - del_timer_sync is common in most cases -- we want to wait for timer
    function if it's still running.

    Signed-off-by: Jiri Slaby
    Cc: Dave Airlie
    Cc: David Woodhouse
    Cc: Dominik Brodowski
    Cc: Alessandro Zummo
    Cc: Paul Fulghum
    Cc: Kylene Jo Hall
    Cc: Wim Van Sebroeck
    Acked-by: Dmitry Torokhov (Input bits)
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

03 Feb, 2007

1 commit


08 Dec, 2006

1 commit

  • Clean up several code points in which the return code from misc_register is
    not handled properly.

    Several modules failed to deregister various hooks when misc_register fails,
    and this patch cleans them up. Also there are a few modules that legitimately
    don't care about the failure status of misc register. These drivers however
    unilaterally call misc_deregister on module unload.

    Since misc_register doesn't initialize the list_head in the init_routine if it
    fails, the deregister operation is at risk for oopsing when list_del is
    called. The initial solution was to manually init the list in the miscdev
    structure in each of those modules, but the consensus in this thread was to
    consolodate and do that universally inside misc_register.

    Signed-off-by: Neil Horman
    Cc: Bjorn Helgaas
    Cc: Kylene Jo Hall
    Cc: Dmitry Torokhov
    Cc: Olaf Hering
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Neil Horman
     

06 Dec, 2006

1 commit


05 Dec, 2006

1 commit


04 Dec, 2006

1 commit


02 Dec, 2006

1 commit


22 Nov, 2006

1 commit


12 Oct, 2006

1 commit

  • - handle sysfs error
    - handle driver model errors
    - de-obfuscate platform_device_register_simple() call, which included an
    assignment in between two function calls, in the same C statement.

    Signed-off-by: Jeff Garzik
    Acked-by: Kylene Hall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    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
     

01 Aug, 2006

1 commit


31 Jul, 2006

1 commit


15 Jul, 2006

4 commits


04 Jul, 2006

1 commit

  • Mark the static struct file_operations in drivers/char as const. Making
    them const prevents accidental bugs, and moves them to the .rodata section
    so that they no longer do any false sharing; in addition with the proper
    debug option they are then protected against corruption..

    [akpm@osdl.org: build fix]
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

03 Jul, 2006

1 commit


01 Jun, 2006

2 commits

  • From: Seiji Munetoh

    Change the binary output format to actual ACPI TCPA log structure since the
    current format does not contain all event-data information that need to
    verify the PCRs in TPM. tpm_binary_bios_measurements_show() uses
    get_event_name() to convert the binary event-data to ascii format, and puts
    them as binary. However, to verify the PCRs, the event-data must be a
    actual binary event-data used by SHA1 calc. in BIOS.

    So, I think actual ACPI TCPA log is good for this binary output format.
    That way, any userland tools easily parse this data with reference to TCG
    PC specification.

    Signed-off-by: Seiji Munetoh
    Acked-by: Kylene Hall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Seiji Munetoh
     
  • From: Seiji Munetoh

    Fix "tcpa_pc_event" misalignment between enum, strings and TCG PC spec and
    output of the event which contains a hash data.

    Signed-off-by: Seiji Munetoh
    Acked-by: Kylene Hall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Seiji Munetoh
     

27 May, 2006

1 commit

  • The TPM chip on the ThinkPad T60 and Z60 machines is returning 0xFFFF for
    the vendor ID which is a check the driver made to double check it was
    actually talking to the memory mapped space of a TPM. This patch removes
    the check since it isn't absolutely necessary and was causing device
    discovery to fail on these machines.

    Signed-off-by: Kylene Hall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kylene Jo Hall
     

16 May, 2006

3 commits


23 Apr, 2006

14 commits

  • I recently found that not all BIOS manufacturers are using the specified
    generic PNP id in their TPM ACPI table entry. I have added the vendor
    specific IDs that I know about and added a module parameter that a user can
    specify another HID to the probe list if their device isn't being found by the
    default list.

    Signed-off-by: Kylene Hall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kylene Jo Hall
     
  • This patch adds a boolean module parameter that allows the user to turn
    interrupt support on and off. The default behavior is to attempt to use
    interrupts.

    Signed-off-by: Kylene Hall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kylene Jo Hall
     
  • Fixes minor spacing issues.

    Signed-off-by: Kylene Hall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kylene Jo Hall
     
  • Use __devexit_p() for the exit/remove function to protect against
    discarding it.

    WARNING: drivers/char/tpm/tpm_infineon.o - Section mismatch: reference to .exit.text:tpm_inf_pnp_remove from .data between 'tpm_inf_pnp' (at offset 0x20) and 'tpm_inf'

    Signed-off-by: Randy Dunlap
    Cc: Kylene Jo Hall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • The acpi table which contains the BIOS log events was updated for 1.2.
    There are now client and server modes as defined in the specifications with
    slightly different formats. Additionally, the start field was even too
    small for the 1.1 version but had been working anyway. This patch updates
    the code to deal with any of the three types of headers probperly (1.1, 1.2
    client and 1.2 server).

    Signed-off-by: Kylie Hall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kylene Jo Hall
     
  • The memory start and length values obtained from the ACPI entry need to be
    checked and filled in with the default values from the specification if
    they don't exist. This patch fills in the default values and uses them
    appropriately.

    Signed-off-by: Kylie Hall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kylene Jo Hall
     
  • Apply the latest changes in the TPM interface to the Infineon TPM-driver.

    Signed-off-by: Marcel Selhorst
    Acked-by: Kylie Hall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marcel Selhorst
     
  • Use set_bit() and clear_bit() for dev_mask manipulation.

    Signed-off-by: Kylie Hall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kylene Jo Hall
     
  • The timeout and duration values used in the tpm driver are not exposed to
    userspace. This patch converts the storage units to jiffies with
    msecs_to_jiffies. They were always being used in jiffies so this
    simplifies things removing the need for calculation all over the place.
    The change necessitated a type change in the tpm_chip struct to hold
    jiffies.

    Signed-off-by: Kylie Hall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kylene Jo Hall
     
  • The driver for the next generation of TPM chips version 1.2 including support
    for interrupts. The Trusted Computing Group has written the TPM Interface
    Specification (TIS) which defines a common interface for all manufacturer's
    1.2 TPM's thus the name tpm_tis.

    Signed-off-by: Leendert van Doorn
    Signed-off-by: Kylene Hall
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Leendert van Doorn
     
  • Many of the sysfs files were calling the TPM_GetCapability command with array.
    Since for 1.2 more sysfs files of this type are coming I am generalizing the
    array so there can be one array and the unique parts can be filled in just
    before the command is called.

    This updated version of the patch breaks the multi-value sysfs file into
    separate files pointed out by Greg. It also addresses the code redundancy and
    ugliness in the tpm_show_* functions pointed out on another patch by Dave
    Hansen.

    Signed-off-by: Kylene Hall
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kylene Jo Hall
     
  • With the TPM 1.2 Specification, each command is classified as short, medium or
    long and the chip tells you the maximum amount of time for a response to each
    class of command. This patch provides and array of the classifications and a
    function to determine how long the response should be waited for. Also, it
    uses that information in the command processing to determine how long to poll
    for. The function is exported so the 1.2 driver can use the functionality to
    determine how long to wait for a DataAvailable interrupt if interrupts are
    being used.

    Signed-off-by: Kylene Hall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kylene Jo Hall
     
  • Changes in the 1.2 TPM Specification make it necessary to update some fields
    of the chip structure in the initialization function after it is registered
    with tpm.c thus tpm_register_hardware was modified to return a pointer to the
    structure. This patch makes that change and the associated changes in
    tpm_atmel and tpm_nsc. The changes to tpm_infineon will be coming in a patch
    from Marcel Selhorst.

    Signed-off-by: Kylene Hall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kylene Jo Hall
     
  • To assist with chip management and better support the possibility of having
    multiple TPMs in the system of the same kind, the struct tpm_vendor_specific
    member of the tpm_chip was changed from a pointer to an instance. This patch
    changes that declaration and fixes up all accesses to the structure member
    except in tpm_infineon which is coming in a patch from Marcel Selhorst.

    Signed-off-by: Kylene Hall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kylene Jo Hall