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
     

09 Jul, 2009

1 commit

  • Commit 5fd29d6ccbc98884569d6f3105aeca70858b3e0f ("printk: clean up
    handling of log-levels and newlines") changed printk semantics. printk
    lines with multiple KERN_ prefixes are no longer emitted as
    before the patch.

    is now included in the output on each additional use.

    Remove all uses of multiple KERN_s in formats.

    Signed-off-by: Joe Perches
    Signed-off-by: Linus Torvalds

    Joe Perches
     

27 Oct, 2008

1 commit


28 Jul, 2008

1 commit


13 Jun, 2008

1 commit

  • Since many distros load this driver by default (throw it against the wall
    and see what sticks method). Change the error message severity level to
    avoid alarming users. Isn't it annoying when users actually read the
    error logs...

    Signed-off-by: Stephen Hemminger
    Cc: Michael Buesch
    Acked-by: Jan Beulich
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Hemminger
     

11 Jan, 2008

1 commit


17 Jul, 2007

1 commit

  • The intel-rng printed a nice well formatted message when the port was
    disabled. Someone then came along and blindly trashed it by screwing up a
    trim down to 80 columns.

    Put it back into the right format and keep the overlong lines as the result
    is also MUCH easier to read in this specific case.

    Signed-off-by: Alan Cox
    Cc: Michael Buesch
    Acked-by: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     

09 May, 2007

1 commit

  • Replace call_smp_function with stop_machine_run in the Intel RNG driver.

    CPU A has done read_lock(&lock)
    CPU B has done write_lock_irq(&lock) and is waiting for A to release the lock.

    A third CPU calls call_smp_function and issues the IPI. CPU A takes CPU
    C's IPI. CPU B is waiting with interrupts disabled and does not see the
    IPI. CPU C is stuck waiting for CPU B to respond to the IPI.

    Deadlock.

    The solution is to use stop_machine_run instead of call_smp_function
    (call_smp_function should not be called in situations where the CPUs may be
    suspended).

    [haruo.tomita@toshiba.co.jp: fix a typo in mod_init()]
    [haruo.tomita@toshiba.co.jp: fix memory leak]
    Signed-off-by: Prarit Bhargava
    Cc: Jan Beulich
    Cc: "Tomita, Haruo"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Prarit Bhargava
     

13 Feb, 2007

1 commit


12 Jan, 2007

2 commits

  • This changes all HWRNG driver initcalls to module_init(). We must probe
    the RNGs after the major kernel subsystems are already up and running (like
    PCI).

    This fixes Bug 7730.
    http://bugzilla.kernel.org/show_bug.cgi?id=7730

    Signed-off-by: Michael Buesch
    Cc: Jan Beulich
    Cc: Jeff Garzik
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Buesch
     
  • Add a load option to intel-rng to allow skipping the FWH detection,
    necessary in case the BIOS has locked read-only the firmware hub space.
    Also prevent any attempt to write to firmware space if it cannot be write
    enabled (apparently caused hangs on some systems not having an FWH and thus
    also not having a respective RNG).

    Signed-off-by: Jan Beulich
    Signed-off-by: Michael Buesch
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Beulich
     

30 Sep, 2006

1 commit

  • Previously, since determination whether there was an Intel random number
    generator was based on a single bit, on systems with a matching bridge
    device but without a firmware hub, there was a 50% chance that the code
    would incorrectly decide that the system had an RNG. This patch adds
    detection of the firmware hub to better qualify the existence of an RNG.

    There is one issue with the patch: I was unable to determine the LPC
    equivalent for the PCI bridge 8086:2430 (since the old code didn't care
    about which of the many devices provided by the ICH/ESB it was chose to use
    the PCI bridge device, but the FWH settings live in the LPC device, so the
    device list needed to be changed).

    Signed-off-by: Jan Beulich
    Signed-off-by: Michael Buesch
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Beulich
     

01 Aug, 2006

1 commit


27 Jun, 2006

1 commit