01 Nov, 2011

1 commit


27 May, 2011

1 commit


26 May, 2011

1 commit

  • The functions probe_kernel_write() and probe_kernel_read() do not modify
    the src pointer. Allow const pointers to be passed in without the need
    of a typecast.

    Acked-by: Mike Frysinger
    Acked-by: Heiko Carstens
    Acked-by: Martin Schwidefsky
    Signed-off-by: Steven Rostedt
    Link: http://lkml.kernel.org/r/1305824936.1465.4.camel@gandalf.stny.rr.com

    Steven Rostedt
     

25 May, 2011

1 commit


10 Jan, 2011

1 commit


22 Oct, 2010

1 commit

  • If the kernel's init section is merged back into the main memory region
    during boot (which it should since that is how we've laid out the kernel
    linker map), we want to make sure that these aren't counted as independent
    regions. Otherwise, if a large mapping is attempted which starts in the
    init region and extends into the main memory region, the access_ok func
    will deny it. This leads to weird messages during runtime like "unable
    to map xxx library" from the ldso but upon running the application again,
    everything works fine.

    So if the address of the end of the init region is the same as the start
    of the main memory region, simply enlarge the memory region to include
    the init region.

    Signed-off-by: Sonic Zhang
    Signed-off-by: Mike Frysinger

    Sonic Zhang
     

23 May, 2010

2 commits


21 May, 2010

2 commits


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 Mar, 2010

2 commits


08 Jan, 2010

1 commit

  • Blackfin needs it own arch specific probe_kernel_read() and
    probe_kernel_write().

    This was moved out of the kgdb code and into the
    arch/blackfin/maccess.c, because it is a generic kernel api.

    The arch specific kgdb.c for blackfin was cleaned of all functions
    which exist in the kgdb core that do the same thing after resolving
    the probe_kernel_read() and probe_kernel_write(). This also
    eliminated the need for most of the #include's.

    CC: Sonic Zhang
    Signed-off-by: Jason Wessel
    Signed-off-by: Mike Frysinger

    Jason Wessel
     

07 Oct, 2009

1 commit

  • Bill Gatliff & David Brownell pointed out we were missing some
    copyrights, and licensing terms in some of the files in
    ./arch/blackfin, so this fixes things, and cleans them up.

    It also removes:
    - verbose GPL text(refer to the top level ./COPYING file)
    - file names (you are looking at the file)
    - bug url (it's in the ./MAINTAINERS file)
    - "or later" on GPL-2, when we did not have that right

    It also allows some Blackfin-specific assembly files to be under a BSD
    like license (for people to use them outside of Linux).

    Signed-off-by: Robin Getz
    Signed-off-by: Mike Frysinger

    Robin Getz
     

17 Sep, 2009

4 commits

  • The DTEST write bit is 2, not 1. Improve comments in the related macro
    while we're here.

    Signed-off-by: Robin Getz
    Signed-off-by: Mike Frysinger

    Robin Getz
     
  • Make it easy to figure out if code changes here are correct.

    Signed-off-by: Mike Frysinger

    Mike Frysinger
     
  • Allow hardware errors to be caught during early portions of booting, and
    leave something in the shadow console that people can use to debug their
    system with (to be printed out by the bootloader on next reset).

    This enables the hardare error interrupts in head.S, allowing us to find
    hardware errors when they happen (well, as much as you can with a hardware
    error) and prints out the trace if it is enabled. This will catch errors
    (like booting the wrong image on a 533) which previously resulted in a
    infinite loop/hang, as well as random hardware errors before before
    setup_arch().

    To disable this debug only feature - turn off EARLY_PRINTK.

    Signed-off-by: Robin Getz
    Signed-off-by: Mike Frysinger

    Robin Getz
     
  • Rather than defining the locks and initializing them all the time, only do
    so when we actually need them (i.e. the SRAM regions exist). This avoids
    dead data and code bloat during runtime.

    Signed-off-by: Mike Frysinger

    Mike Frysinger
     

04 Jul, 2009

1 commit

  • Pull linus#master to merge PER_CPU_DEF_ATTRIBUTES and alpha build fix
    changes. As alpha in percpu tree uses 'weak' attribute instead of
    inline assembly, there's no need for __used attribute.

    Conflicts:
    arch/alpha/include/asm/percpu.h
    arch/mn10300/kernel/vmlinux.lds.S
    include/linux/percpu-defs.h

    Tejun Heo
     

24 Jun, 2009

1 commit

  • There are a few places where ___cacheline_aligned* is used with
    DEFINE_PER_CPU(). Use DEFINE_PER_CPU_SHARED_ALIGNED() instead.

    DEFINE_PER_CPU_SHARED_ALIGNED() applies alignment only on SMPs. While
    all other converted places used _in_smp variant or only get compiled
    for SMP, net/rds used unconditional ____cacheline_aligned. I don't
    see any reason these data structures should be aligned on UP and thus
    converted together.

    Signed-off-by: Tejun Heo
    Cc: Mike Frysinger
    Cc: Tony Luck
    Cc: Andy Grover

    Tejun Heo
     

23 Jun, 2009

1 commit

  • The current cache options don't really represent the hardware features.
    They end up setting different aspects of the hardware so that the end
    result is to turn on/off the cache. Unfortunately, when we hit cache
    problems with the hardware, it's difficult to test different settings to
    root cause the problem. The current settings also don't cleanly allow for
    different caching behaviors with different regions of memory.

    So split the configure options such that they properly reflect the settings
    that are applied to the hardware.

    Signed-off-by: Jie Zhang
    Signed-off-by: Mike Frysinger

    Jie Zhang
     

12 Jun, 2009

6 commits


31 Mar, 2009

1 commit

  • Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
    as correctly noted at bug #12454. Someone can lookup entry with NULL
    ->owner, thus not pinning enything, and release it later resulting
    in module refcount underflow.

    We can keep ->owner and supply it at registration time like ->proc_fops
    and ->data.

    But this leaves ->owner as easy-manipulative field (just one C assignment)
    and somebody will forget to unpin previous/pin current module when
    switching ->owner. ->proc_fops is declared as "const" which should give
    some thoughts.

    ->read_proc/->write_proc were just fixed to not require ->owner for
    protection.

    rmmod'ed directories will be empty and return "." and ".." -- no harm.
    And directories with tricky enough readdir and lookup shouldn't be modular.
    We definitely don't want such modular code.

    Removing ->owner will also make PDE smaller.

    So, let's nuke it.

    Kudos to Jeff Layton for reminding about this, let's say, oversight.

    http://bugzilla.kernel.org/show_bug.cgi?id=12454

    Signed-off-by: Alexey Dobriyan

    Alexey Dobriyan
     

05 Mar, 2009

1 commit


07 Jan, 2009

2 commits

  • This is a mixture ofcMichael McTernan's patch and the existing cplb-mpu code.

    We ditch the old cplb-nompu implementation, which is a good example of
    why a good algorithm in a HLL is preferrable to a bad algorithm written in
    assembly. Rather than try to construct a table of all posible CPLBs and
    search it, we just create a (smaller) table of memory regions and
    their attributes. Some of the data structures are now unified for both
    the mpu and nompu cases. A lot of needless complexity in cplbinit.c is
    removed.

    Further optimizations:
    * compile cplbmgr.c with a lot of -ffixed-reg options, and omit saving
    these registers on the stack when entering a CPLB exception.
    * lose cli/nop/nop/sti sequences for some workarounds - these don't
    * make
    sense in an exception context

    Additional code unification should be possible after this.

    [Mike Frysinger :
    - convert CPP if statements to C if statements
    - remove redundant statements
    - use a do...while loop rather than a for loop to get slightly better
    optimization and to avoid gcc "may be used uninitialized" warnings ...
    we know that the [id]cplb_nr_bounds variables will never be 0, so this
    is OK
    - the no-mpu code was the last user of MAX_MEM_SIZE and with that rewritten,
    we can punt it
    - add some BUG_ON() checks to make sure we dont overflow the small
    cplb_bounds array
    - add i/d cplb entries for the bootrom because there is functions/data in
    there we want to access
    - we do not need a NULL trailing entry as any time we access the bounds
    arrays, we use the nr_bounds variable
    ]

    Signed-off-by: Michael McTernan
    Signed-off-by: Mike Frysinger
    Signed-off-by: Bernd Schmidt
    Signed-off-by: Bryan Wu

    Bernd Schmidt
     
  • 1. Use inline get_l1_... functions instead of macro
    2. Fix compile issue about smp barrier functions

    Signed-off-by: Graf Yang
    Signed-off-by: Bryan Wu

    Graf Yang
     

18 Nov, 2008

2 commits


28 Oct, 2008

1 commit


08 Oct, 2008

2 commits


28 Aug, 2008

1 commit

  • Using just 'unsigned' will make flags an unsigned int. While this is
    arguably not an error on blackfin where sizeof(int) == sizeof(long),
    the patch is still justified on the grounds of principle.

    The patch was generated using the Coccinelle semantic patch framework.

    Cc: Julia Lawall
    Cc: Alexey Dobriyan
    Signed-off-by: Vegard Nossum
    Signed-off-by: Mike Frysinger
    Signed-off-by: Bryan Wu

    Vegard Nossum
     

25 Aug, 2008

1 commit


13 Aug, 2008

1 commit