linux-2.6
14 years agoperf record: Explicity program a default counter
Peter Zijlstra [Thu, 11 Jun 2009 21:11:50 +0000 (23:11 +0200)] 
perf record: Explicity program a default counter

Up until now record has worked on the assumption that type=0, config=0
was a suitable configuration - which it is. Lets make this a little more
explicit and more readable via the use of proper symbols.

[ Impact: cleanup ]

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf_counter: Remove PERF_TYPE_RAW special casing
Peter Zijlstra [Thu, 11 Jun 2009 15:57:21 +0000 (17:57 +0200)] 
perf_counter: Remove PERF_TYPE_RAW special casing

The PERF_TYPE_RAW special case seems superfluous these days. Remove
it and add it to the switch() stmt like the others.

[ Impact: cleanup ]

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf_counter: PERF_TYPE_HW_CACHE is a hardware counter too
Peter Zijlstra [Thu, 11 Jun 2009 15:56:09 +0000 (17:56 +0200)] 
perf_counter: PERF_TYPE_HW_CACHE is a hardware counter too

is_software_counter() was missing the new HW_CACHE category.

( This could have caused some counter scheduling artifacts
  with mixed sw and hw counters and counter groups. )

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agopowerpc, perf_counter: Fix performance counter event types
Jaswinder Singh Rajput [Fri, 12 Jun 2009 06:34:54 +0000 (12:04 +0530)] 
powerpc, perf_counter: Fix performance counter event types

Sachin Sant reported these compiler errors:

 CC      arch/powerpc/kernel/power7-pmu.o
arch/powerpc/kernel/power7-pmu.c:297: error: PERF_COUNT_CPU_CYCLES undeclared here (not in a function)

Which happened because a last-minute rename of symbols crossed with
the Power7 support patch.

Fix this by using the new symbol names.

Reported-by: Sachin Sant <sachinp@in.ibm.com>
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
LKML-Reference: <1244788494.5554.1.camel@ht.satnam>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agomodule: cleanup FIXME comments about trimming exception table entries.
Rusty Russell [Sat, 13 Jun 2009 03:47:04 +0000 (21:47 -0600)] 
module: cleanup FIXME comments about trimming exception table entries.

Everyone cut and paste this comment from my original one.  We now do
it generically, so cut the comments.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Amerigo Wang <amwang@redhat.com>
14 years agomodule: trim exception table on init free.
Rusty Russell [Sat, 13 Jun 2009 03:47:03 +0000 (21:47 -0600)] 
module: trim exception table on init free.

It's theoretically possible that there are exception table entries
which point into the (freed) init text of modules.  These could cause
future problems if other modules get loaded into that memory and cause
an exception as we'd see the wrong fixup.  The only case I know of is
kvm-intel.ko (when CONFIG_CC_OPTIMIZE_FOR_SIZE=n).

Amerigo fixed this long-standing FIXME in the x86 version, but this
patch is more general.

This implements trim_init_extable(); most archs are simple since they
use the standard lib/extable.c sort code.  Alpha and IA64 use relative
addresses in their fixups, so thier trimming is a slight variation.

Sparc32 is unique; it doesn't seem to define ARCH_HAS_SORT_EXTABLE,
yet it defines its own sort_extable() which overrides the one in lib.
It doesn't sort, so we have to mark deleted entries instead of
actually trimming them.

Inspired-by: Amerigo Wang <amwang@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-alpha@vger.kernel.org
Cc: sparclinux@vger.kernel.org
Cc: linux-ia64@vger.kernel.org
14 years agomodule: merge module_alloc() finally
Amerigo Wang [Thu, 4 Jun 2009 01:46:46 +0000 (21:46 -0400)] 
module: merge module_alloc() finally

As Christoph Hellwig suggested, module_alloc() actually can be
unified for i386 and x86_64 (of course, also UML).

Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: 'Ingo Molnar' <mingo@elte.hu>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 years agouml module: fix uml build process due to this merge
Amerigo Wang [Thu, 4 Jun 2009 01:46:28 +0000 (21:46 -0400)] 
uml module: fix uml build process due to this merge

Due to the previous merge, uml needs to be fixed.

Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 years agox86 module: merge the rest functions with macros
Amerigo Wang [Thu, 4 Jun 2009 01:46:19 +0000 (21:46 -0400)] 
x86 module: merge the rest functions with macros

Merge the rest functions together, with proper preprocessing directives.
Finally remove module_{32|64}.c.

Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 years agox86 module: merge the same functions in module_32.c and module_64.c
Amerigo Wang [Thu, 4 Jun 2009 01:46:09 +0000 (21:46 -0400)] 
x86 module: merge the same functions in module_32.c and module_64.c

Merge the same functions both in module_32.c and module_64.c into
module.c.

This is the first step to merge both of them finally.

Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 years agouvesafb: improve parameter handling.
Rusty Russell [Sat, 13 Jun 2009 03:46:58 +0000 (21:46 -0600)] 
uvesafb: improve parameter handling.

1) Now module_param(..., invbool, ...) requires a bool, and similarly
   module_param(..., bool, ...) allows it, change pmi_setpal to a bool.
2) #define param_get_scroll to NULL, since it can never be called (perm
   argument to module_param_named is 0).
3) Return -EINVAL from param_set_scroll if the value is bad, so it's
   reported.

Note that I don't think the old fb_get_options() is required for new
drivers: the parameters automatically work as uvesafb.XXX=... anyway.

Acked-by: MichaƂ Januszewski <spock@gentoo.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 years agomodule_param: allow 'bool' module_params to be bool, not just int.
Rusty Russell [Sat, 13 Jun 2009 03:46:57 +0000 (21:46 -0600)] 
module_param: allow 'bool' module_params to be bool, not just int.

Impact: API cleanup

For historical reasons, 'bool' parameters must be an int, not a bool.
But there are around 600 users, so a conversion seems like useless churn.

So we use __same_type() to distinguish, and handle both cases.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 years agomodule_param: add __same_type convenience wrapper for __builtin_types_compatible_p
Rusty Russell [Sat, 13 Jun 2009 03:46:56 +0000 (21:46 -0600)] 
module_param: add __same_type convenience wrapper for __builtin_types_compatible_p

Impact: new API

__builtin_types_compatible_p() is a little awkward to use: it takes two
types rather than types or variables, and it's just damn long.

(typeof(type) == type, so this works on types as well as vars).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 years agomodule_param: split perm field into flags and perm
Rusty Russell [Sat, 13 Jun 2009 03:46:56 +0000 (21:46 -0600)] 
module_param: split perm field into flags and perm

Impact: cleanup

Rather than hack KPARAM_KMALLOCED into the perm field, separate it out.
Since the perm field was 32 bits and only needs 16, we don't add bloat.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 years agomodule_param: invbool should take a 'bool', not an 'int'
Rusty Russell [Sat, 13 Jun 2009 03:46:53 +0000 (21:46 -0600)] 
module_param: invbool should take a 'bool', not an 'int'

It takes an 'int' for historical reasons, and there are only two
users: simply switch it over to bool.

The other user (uvesafb.c) will get a (harmless-on-x86) warning until
the next patch is applied.

Cc: Brad Douglas <brad@neruo.com>
Cc: Michal Januszewski <spock@gentoo.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 years agocyber2000fb.c: use proper method for stopping unload if CONFIG_ARCH_SHARK
Rusty Russell [Sat, 13 Jun 2009 03:46:50 +0000 (21:46 -0600)] 
cyber2000fb.c: use proper method for stopping unload if CONFIG_ARCH_SHARK

Russell explains the __module_get():
> cyber2000fb.c does it in its module initialization function
> to prevent the module (when built for Shark) from being unloaded.  It
> does this because it's from the days of 2.2 kernels and no one bothered
> writing the module unload support for Shark.

Since 2.4, the correct answer has been to not define an unload fn.

Cc: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: alex@shark-linux.de
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 years agokmemleak: Add more info to the MAINTAINERS entry
Catalin Marinas [Fri, 12 Jun 2009 08:35:22 +0000 (09:35 +0100)] 
kmemleak: Add more info to the MAINTAINERS entry

The patch adds the "F:" fields to the KMEMLEAK MAINTAINERS entry and
also moves it before KMEMTRACE to preserve the alphabetical order.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
14 years agoperf_counter/x86: Add a quirk for Atom processors
Yong Wang [Fri, 12 Jun 2009 08:08:55 +0000 (16:08 +0800)] 
perf_counter/x86: Add a quirk for Atom processors

The fixed-function performance counters do not work on current Atom
processors. Use the general-purpose ones instead.

Signed-off-by: Yong Wang <yong.y.wang@intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <20090612080855.GA2286@ywang-moblin2.bj.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf_counter tools: Remove one L1-data alias
Yong Wang [Fri, 12 Jun 2009 03:17:06 +0000 (11:17 +0800)] 
perf_counter tools: Remove one L1-data alias

Otherwise all L1-instruction aliases will be recognized as
L1-data by strcasestr() when calling function parse_aliases.

Signed-off-by: Yong Wang <yong.y.wang@intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <20090612031706.GA22126@ywang-moblin2.bj.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agox86: make zap_low_mapping could be used early
Yinghai Lu [Fri, 12 Jun 2009 08:36:52 +0000 (11:36 +0300)] 
x86: make zap_low_mapping could be used early

Only one cpu is there, just call __flush_tlb for it. Fixes the following boot
warning on x86:

  [    0.000000] Memory: 885032k/915540k available (5993k kernel code, 29844k reserved, 3842k data, 428k init, 0k highmem)
  [    0.000000] virtual kernel memory layout:
  [    0.000000]     fixmap  : 0xffe17000 - 0xfffff000   (1952 kB)
  [    0.000000]     vmalloc : 0xf8615000 - 0xffe15000   ( 120 MB)
  [    0.000000]     lowmem  : 0xc0000000 - 0xf7e15000   ( 894 MB)
  [    0.000000]       .init : 0xc19a5000 - 0xc1a10000   ( 428 kB)
  [    0.000000]       .data : 0xc15da4bb - 0xc199af6c   (3842 kB)
  [    0.000000]       .text : 0xc1000000 - 0xc15da4bb   (5993 kB)
  [    0.000000] Checking if this processor honours the WP bit even in supervisor mode...Ok.
  [    0.000000] ------------[ cut here ]------------
  [    0.000000] WARNING: at kernel/smp.c:369 smp_call_function_many+0x50/0x1b0()
  [    0.000000] Hardware name: System Product Name
  [    0.000000] Modules linked in:
  [    0.000000] Pid: 0, comm: swapper Not tainted 2.6.30-tip #52504
  [    0.000000] Call Trace:
  [    0.000000]  [<c104aa16>] warn_slowpath_common+0x65/0x95
  [    0.000000]  [<c104aa58>] warn_slowpath_null+0x12/0x15
  [    0.000000]  [<c1073bbe>] smp_call_function_many+0x50/0x1b0
  [    0.000000]  [<c1037615>] ? do_flush_tlb_all+0x0/0x41
  [    0.000000]  [<c1037615>] ? do_flush_tlb_all+0x0/0x41
  [    0.000000]  [<c1073d4f>] smp_call_function+0x31/0x58
  [    0.000000]  [<c1037615>] ? do_flush_tlb_all+0x0/0x41
  [    0.000000]  [<c104f635>] on_each_cpu+0x26/0x65
  [    0.000000]  [<c10374b5>] flush_tlb_all+0x19/0x1b
  [    0.000000]  [<c1032ab3>] zap_low_mappings+0x4d/0x56
  [    0.000000]  [<c15d64b5>] ? printk+0x14/0x17
  [    0.000000]  [<c19b42a8>] mem_init+0x23d/0x245
  [    0.000000]  [<c19a56a1>] start_kernel+0x17a/0x2d5
  [    0.000000]  [<c19a5347>] ? unknown_bootoption+0x0/0x19a
  [    0.000000]  [<c19a5039>] __init_begin+0x39/0x41
  [    0.000000] ---[ end trace 4eaa2a86a8e2da22 ]---

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
14 years agoirq: slab alloc for default irq_affinity
Yinghai Lu [Fri, 12 Jun 2009 08:33:02 +0000 (11:33 +0300)] 
irq: slab alloc for default irq_affinity

Ingo had

[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: at mm/bootmem.c:537 alloc_arch_preferred_bootmem+0x2b/0x71()
[    0.000000] Hardware name: System Product Name
[    0.000000] Modules linked in:
[    0.000000] Pid: 0, comm: swapper Tainted: G        W  2.6.30-tip-03087-g0bb2618-dirty #52506
[    0.000000] Call Trace:
[    0.000000]  [<81032588>] warn_slowpath_common+0x60/0x90
[    0.000000]  [<810325c5>] warn_slowpath_null+0xd/0x10
[    0.000000]  [<819d1bc0>] alloc_arch_preferred_bootmem+0x2b/0x71
[    0.000000]  [<819d1c31>] ___alloc_bootmem_nopanic+0x2b/0x9a
[    0.000000]  [<81050a0a>] ? lock_release+0xac/0xb2
[    0.000000]  [<819d1d4c>] ___alloc_bootmem+0xe/0x2d
[    0.000000]  [<819d1e9f>] __alloc_bootmem+0xa/0xc
[    0.000000]  [<819d7c63>] alloc_bootmem_cpumask_var+0x21/0x26
[    0.000000]  [<819d0cc8>] early_irq_init+0x15/0x10d
[    0.000000]  [<819bb75a>] start_kernel+0x167/0x326
[    0.000000]  [<819bb06b>] __init_begin+0x6b/0x70
[    0.000000] ---[ end trace 4eaa2a86a8e2da23 ]---
[    0.000000] NR_IRQS:2304 nr_irqs:424
[    0.000000] CPU 0 irqstacks, hard=821e6000 soft=821e7000

we need to update init_irq_default_affinity

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
14 years agoBlackfin: fix sparseirq/kstat_irqs fallout
Mike Frysinger [Fri, 5 Jun 2009 07:13:11 +0000 (03:13 -0400)] 
Blackfin: fix sparseirq/kstat_irqs fallout

The sparseirq changes (d7e51e66) played poorly with the Blackfin irqchip
implementation as we're still using the old hardirq method.  Our bad irq
structure had a NULL kstat_irqs field so when all the common code tries
to increment this field, everything goes big bada boom.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: fix unused warnings after nommu update
Mike Frysinger [Fri, 5 Jun 2009 03:51:27 +0000 (23:51 -0400)] 
Blackfin: fix unused warnings after nommu update

The massive nommu update (8feae131) left the local variable "vml" unused,
so punt it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: export the last exception cause via debugfs
Robin Getz [Wed, 3 Jun 2009 18:58:26 +0000 (18:58 +0000)] 
Blackfin: export the last exception cause via debugfs

We have some test code that runs in userspace that exercises the exception
handling of the Blackfin pretty thoroughly.  Part of the validation process
is checking the exact exception triggered, so export the last one seen to
userspace via debugfs when debugging is enabled for the test code to check.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: fix length checking in kgdb_ebin2mem
Roel Kluin [Thu, 4 Jun 2009 23:57:24 +0000 (19:57 -0400)] 
Blackfin: fix length checking in kgdb_ebin2mem

The kgdb_ebin2mem() was decrementing the count variable to do parsing, but
then later still tries to use it based on its original meaning.  So leave
it untouched and use a different variable to walk the memory.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: kgdb: fix up error return values
Mike Frysinger [Thu, 4 Jun 2009 17:28:16 +0000 (17:28 +0000)] 
Blackfin: kgdb: fix up error return values

The Blackfin kgdb code was all passing back positive errno values when it
really should have been using negative errno values.

Reported-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: push access_ok() L1 attribute down
Mike Frysinger [Thu, 4 Jun 2009 19:24:31 +0000 (19:24 +0000)] 
Blackfin: push access_ok() L1 attribute down

There is no need for the L1 attribute to be on the prototype of the
access_ok() function as all consumers of the function do not care where it
lives -- they'll always use pcrel calls to get to it.  This prevents
pointless recompiles of most of the system when this config option changes.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: punt duplicated search_exception_table() prototype
Mike Frysinger [Thu, 4 Jun 2009 19:11:31 +0000 (19:11 +0000)] 
Blackfin: punt duplicated search_exception_table() prototype

The common code already has a prototype for this function and we don't use
it anywhere in the Blackfin code, so punt it from the Blackfin headers.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: add missing access_ok() checks to user functions
Robin Getz [Thu, 4 Jun 2009 00:32:59 +0000 (00:32 +0000)] 
Blackfin: add missing access_ok() checks to user functions

The core string/clear user functions weren't checking the user pointers
which caused kernel crashes with some bad programs and tests (like LTP).

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: convert early_printk EVT init to a loop
Mike Frysinger [Wed, 3 Jun 2009 00:33:31 +0000 (00:33 +0000)] 
Blackfin: convert early_printk EVT init to a loop

The EVT registers are all contiguous in the memory map, so using a loop to
initialize them all rather than hardcoding the list results in much better
generated code (a hardware loop rather than a whole bunch of individual
loads).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: document the lsl variants of the L1 allocator
Mike Frysinger [Tue, 2 Jun 2009 08:46:35 +0000 (08:46 +0000)] 
Blackfin: document the lsl variants of the L1 allocator

Make sure the meaning of "lsl" is covered somewhere and it is clear why we
somewhat duplicate the sram alloc/free functions.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: rename Blackfin relocs according to the toolchain
Mike Frysinger [Tue, 2 Jun 2009 00:35:33 +0000 (00:35 +0000)] 
Blackfin: rename Blackfin relocs according to the toolchain

The latest Blackfin toolchain has fixed its relocation scheme to match
other ports: always use R_BFIN_ prefix and capitalize everything.  This
brings the kernel in line with those fixes.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: check SIC defines rather than variant names
Mike Frysinger [Mon, 1 Jun 2009 23:43:02 +0000 (19:43 -0400)] 
Blackfin: check SIC defines rather than variant names

Rather than having to maintain a hard coded list of Blackfin variants, use
the SIC defines themselves.  This fixes build problems on BF51x/BF538 under
some configurations as they were missing from one of the lists.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: add SSYNC to set_dma_sg() for descriptor fetching
Sonic Zhang [Mon, 1 Jun 2009 04:49:32 +0000 (00:49 -0400)] 
Blackfin: add SSYNC to set_dma_sg() for descriptor fetching

Make sure the internal core buffers are flushed before telling the DMA
engine to fetch the descriptor structure so that it gets the right values.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: convert SMP to only use generic time framework
Graf Yang [Wed, 27 May 2009 09:58:35 +0000 (09:58 +0000)] 
Blackfin: convert SMP to only use generic time framework

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: bf548-ezkit/bf537-stamp: add resources for ADXL345/346
Michael Hennerich [Fri, 29 May 2009 15:41:18 +0000 (15:41 +0000)] 
Blackfin: bf548-ezkit/bf537-stamp: add resources for ADXL345/346

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: override default uClinux MTD addr/size
Mike Frysinger [Tue, 26 May 2009 23:34:51 +0000 (23:34 +0000)] 
Blackfin: override default uClinux MTD addr/size

Due to a processor anomaly (05000263 to be exact), most Blackfin parts
cannot keep the embedded filesystem image directly after the kernel in
RAM.  Instead, the filesystem needs to be relocated to the end of memory.
As such, we need to tweak the map addr/size during boot for Blackfin
systems.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: fix command line corruption with DEBUG_DOUBLEFAULT
Mike Frysinger [Tue, 26 May 2009 21:48:38 +0000 (21:48 +0000)] 
Blackfin: fix command line corruption with DEBUG_DOUBLEFAULT

Commit 6b3087c6 (which introduced Blackfin SMP) broke command line passing
when the DEBUG_DOUBLEFAULT config option was enabled.  Switch the code to
using a scratch register and not R7 which holds the command line.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: fix handling of initial L1 reservation
Graf Yang [Mon, 25 May 2009 06:40:42 +0000 (06:40 +0000)] 
Blackfin: fix handling of initial L1 reservation

This restores some L1 reservation logic that was lost during the Blackfin
SMP merge.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: merge sram init functions
Graf Yang [Mon, 25 May 2009 04:44:00 +0000 (04:44 +0000)] 
Blackfin: merge sram init functions

Now that the sram_init() function exists only to call the bfin_sram_init()
after the punting of the reserve_pda() function, simply merge the two to
avoid pointless overhead.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: drop unused reserve_pda() function
Graf Yang [Mon, 25 May 2009 04:27:22 +0000 (04:27 +0000)] 
Blackfin: drop unused reserve_pda() function

The Per-processor Data Area isn't actually reserved by this function, and
all it ended up doing was issuing a printk(), so punt it.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: update gptimers API
Michael Hennerich [Mon, 4 May 2009 09:11:37 +0000 (09:11 +0000)] 
Blackfin: update gptimers API

First we fix the prototypes for functions that return boolean values by
using "int" rather than "uint16_t".  Then we introduce a get_gptimer_run()
function for checking the current run status of a timer, and then we add a
disable_gptimers_sync() function which parallels disable_gptimers() with
corresponding normal "_sync" behavior.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: include system/processor info in dump messages
Robin Getz [Wed, 20 May 2009 21:19:21 +0000 (21:19 +0000)] 
Blackfin: include system/processor info in dump messages

People often copy & paste crash messages without surrounding context, so
include common useful information like system/processor stats in the crash
summary.  This should smooth over the report/test cycle a bit more.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: add workaround for anomaly 05000461
Robin Getz [Mon, 11 May 2009 18:55:16 +0000 (18:55 +0000)] 
Blackfin: add workaround for anomaly 05000461

Returning too fast with a bad RETI can trigger false errors.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: make sure stack is accessible before dumping it
Robin Getz [Mon, 11 May 2009 18:34:41 +0000 (18:34 +0000)] 
Blackfin: make sure stack is accessible before dumping it

When displaying a crash dump, make sure accessing the stack is safe so
we don't crash at the same time.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: make deferred hardware errors more exact
Robin Getz [Mon, 18 May 2009 18:33:26 +0000 (18:33 +0000)] 
Blackfin: make deferred hardware errors more exact

Hardware errors on the Blackfin architecture are queued by nature of the
hardware design.  Things that could generate a hardware level queue up at
the system interface and might not process until much later, at which
point the system would send a notification back to the core.

As such, it is possible for user space code to do something that would
trigger a hardware error, but have it delay long enough for the process
context to switch.  So when the hardware error does signal, we mistakenly
evaluate it as a different process or as kernel context and panic (erp!).
This makes it pretty difficult to find the offending context.  But wait,
there is good news somewhere.

By forcing a SSYNC in the interrupt entry, we force all pending queues at
the system level to be processed and all hardware errors to be signaled.
Then we check the current interrupt state to see if the hardware error is
now signaled.  If so, we re-queue the current interrupt and return thus
allowing the higher priority hardware error interrupt to process properly.
Since we haven't done any other context processing yet, the right context
will be selected and killed.  There is still the possibility that the
exact offending instruction will be unknown, but at least we'll have a
much better idea of where to look.

The downside of course is that this causes system-wide syncs at every
interrupt point which results in significant performance degradation.
Since this situation should not occur in any properly configured system
(as hardware errors are triggered by things like bad pointers), make it a
debug configuration option and disable it by default.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: add note about anomaly 05000242 being worked around
Mike Frysinger [Fri, 24 Apr 2009 03:17:07 +0000 (03:17 +0000)] 
Blackfin: add note about anomaly 05000242 being worked around

Document anomaly 05000242 workaround in source code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: work around anomaly 05000220
Graf Yang [Thu, 7 May 2009 04:09:15 +0000 (04:09 +0000)] 
Blackfin: work around anomaly 05000220

When possible, work around anomaly 05000220 (external memory is write
back cached, but L2 is not cached).  If not possible, detect the
conditions at build time and reject any qualifying configurations.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: rename some Blackfin drivers
Mike Frysinger [Wed, 20 May 2009 14:05:36 +0000 (14:05 +0000)] 
Blackfin: rename some Blackfin drivers

Try to keep the naming conventions consistent, so:
SPI_ADC_BF533 -> BFIN_SPI_ADC
TWI_LCD       -> BFIN_TWI_LCD

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: make sure MPU CPLB for first 1k is marked as valid
Robin Getz [Tue, 5 May 2009 17:14:39 +0000 (17:14 +0000)] 
Blackfin: make sure MPU CPLB for first 1k is marked as valid

This way we properly catch and kill applications that jump to a NULL ptr.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: add workaround for anomaly 05000287
Graf Yang [Fri, 8 May 2009 07:42:12 +0000 (07:42 +0000)] 
Blackfin: add workaround for anomaly 05000287

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: add support for gptimer0 as a tick source
Graf Yang [Fri, 15 May 2009 11:01:59 +0000 (11:01 +0000)] 
Blackfin: add support for gptimer0 as a tick source

For systems where the core cycles are not a usable tick source (like SMP
or cycles gets updated), enable gptimer0 as an alternative.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: annotate anomaly 05000120
Graf Yang [Wed, 6 May 2009 10:38:07 +0000 (10:38 +0000)] 
Blackfin: annotate anomaly 05000120

Add some notes for anomaly 05000120 to make sure we work around it.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: BF518F-EZBRD: handle required portmuxing of async pins
Graf Yang [Wed, 20 May 2009 06:06:15 +0000 (06:06 +0000)] 
Blackfin: BF518F-EZBRD: handle required portmuxing of async pins

The two high address lines on the BF51x are not dedicated which means we
need to handle them like any other peripheral pin if we want to access the
upper 2MB of parallel flash.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: detect anomaly 05000274
Sonic Zhang [Thu, 7 May 2009 10:04:19 +0000 (10:04 +0000)] 
Blackfin: detect anomaly 05000274

Detect and reject operating conditions for anomaly 05000274 since the
problem cannot be worked around in software.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: do not append newlines to panic() messages
Mike Frysinger [Wed, 29 Apr 2009 06:26:46 +0000 (06:26 +0000)] 
Blackfin: do not append newlines to panic() messages

The panic() function already handles newlines for us.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: workaround anomaly 05000227
Mike Frysinger [Fri, 24 Apr 2009 03:55:41 +0000 (03:55 +0000)] 
Blackfin: workaround anomaly 05000227

Workaround anomaly 05000227 by only using the scratch pad for stack when
absolutely necessary.  The core code which reprograms clocks really only
touches MMRs directly with constants.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: delete unused sys_getpagesize() function
Mike Frysinger [Thu, 23 Apr 2009 17:04:10 +0000 (17:04 +0000)] 
Blackfin: delete unused sys_getpagesize() function

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: work around anomaly 05000287
Graf Yang [Fri, 8 May 2009 07:42:12 +0000 (07:42 +0000)] 
Blackfin: work around anomaly 05000287

Make sure we work around anomaly 05000287 by configuring different port
preferences for the data cache.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: punt useless GPIO init call
Mike Frysinger [Fri, 24 Apr 2009 01:42:54 +0000 (01:42 +0000)] 
Blackfin: punt useless GPIO init call

This init code existed only to dump a printk(), and not even a useful one.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: annotate anomaly 05000119 in core DMA code
Robin Getz [Thu, 23 Apr 2009 20:56:42 +0000 (20:56 +0000)] 
Blackfin: annotate anomaly 05000119 in core DMA code

Add a reminder note to avoid the DMA_DONE bit in our DMA core code.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: document anomaly 05000234 workaround
Robin Getz [Thu, 23 Apr 2009 14:15:04 +0000 (14:15 +0000)] 
Blackfin: document anomaly 05000234 workaround

Note the reason for using CHIPD over DSPID.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: fix early L1 relocation crash
Robin Getz [Thu, 23 Apr 2009 20:49:43 +0000 (20:49 +0000)] 
Blackfin: fix early L1 relocation crash

Our early L1 relocate code may implicitly call code which lives in L1
memory.  This is due to the dma_memcpy() rewrite that made the DMA code
lockless and safe to be used by multiple processes.  If we start the
early DMA memcpy to relocate things into L1 instruction but then our
DMA memcpy code calls a function that lives in L1, things fall apart.
As such, create a small dedicated DMA memcpy routine that we can assume
sanity at boot time.

Reported-by: Filip Van Rillaer <filip.vanrillaer@oneaccess-net.com>
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: add MDMA defines to make cross-variant coding easier
Graf Yang [Wed, 6 May 2009 09:59:11 +0000 (09:59 +0000)] 
Blackfin: add MDMA defines to make cross-variant coding easier

Add some defines to make the BF538/BF561 look like most other Blackfin
parts in that it has a MDMA0 channel available for low level init.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: fix detection of cached L2 SRAM
Mike Frysinger [Tue, 19 May 2009 12:58:13 +0000 (12:58 +0000)] 
Blackfin: fix detection of cached L2 SRAM

Make sure our bfin_addr_dcachable() function flags cached L2 SRAM properly
else memory easily goes unflushed when working with DMA.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: simplify BF561 coreb driver greatly
Mike Frysinger [Thu, 14 May 2009 14:55:50 +0000 (14:55 +0000)] 
Blackfin: simplify BF561 coreb driver greatly

Since 90% of this driver can be handled in user space, move it to the
corebld user space application.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: update defconfigs
Sonic Zhang [Thu, 21 May 2009 06:39:46 +0000 (06:39 +0000)] 
Blackfin: update defconfigs

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
14 years agoBlackfin: simplify the do_flush macro
Mike Frysinger [Fri, 10 Apr 2009 21:20:19 +0000 (21:20 +0000)] 
Blackfin: simplify the do_flush macro

Simplify the do_flush macro now that we don't need to take into account
a second instruction being used together.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
14 years agoBlackfin: set bf51x/bf52x to 0.0 rev by default and bf54x to 0.2
Mike Frysinger [Mon, 13 Apr 2009 21:58:34 +0000 (21:58 +0000)] 
Blackfin: set bf51x/bf52x to 0.0 rev by default and bf54x to 0.2

Update the default revs based on what we actually support (bf54x-0.[01]
is too broken to use).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
14 years agoBlackfin: do not error if GPIO IRQ is requested already as GPIO
Michael Hennerich [Thu, 16 Apr 2009 12:38:34 +0000 (12:38 +0000)] 
Blackfin: do not error if GPIO IRQ is requested already as GPIO

Some drivers expect to be able to request both as GPIO and GPIO IRQ, so
allow that use case.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: pull updated anomaly lists from toolchain
Mike Frysinger [Fri, 8 May 2009 07:40:25 +0000 (07:40 +0000)] 
Blackfin: pull updated anomaly lists from toolchain

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
14 years agoBlackfin: fix up PATA resource handling in bf537-stamp
Michael Hennerich [Tue, 21 Apr 2009 12:05:50 +0000 (12:05 +0000)] 
Blackfin: fix up PATA resource handling in bf537-stamp

Make sure the addresses declared match reality, and make the PATA IRQ code
optional.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
14 years agoBlackfin: merge Philippe's recent ipipe patch
Philippe Gerum [Wed, 8 Apr 2009 07:41:55 +0000 (07:41 +0000)] 
Blackfin: merge Philippe's recent ipipe patch

ipipe-2.6.28.9-blackfin-git95aafe6.patch

Singed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: fix warnings with I/O port macros
Mike Frysinger [Wed, 1 Apr 2009 12:25:58 +0000 (12:25 +0000)] 
Blackfin: fix warnings with I/O port macros

The I/O port functions take ints, so we need to cast them up before
passing to our read/write funcs to avoid ugly messes of warnings.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
14 years agoBlackfin: fix parentheses balance and convert some tab/space mixing
Mariusz Kozlowski [Sun, 12 Apr 2009 20:03:30 +0000 (20:03 +0000)] 
Blackfin: fix parentheses balance and convert some tab/space mixing

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
14 years agoBlackfin: fix bug found by traps test case 21
Graf Yang [Mon, 20 Apr 2009 09:20:58 +0000 (09:20 +0000)] 
Blackfin: fix bug found by traps test case 21

The traps test case 21 "exception 0x3f: l1_instruction_access" would make
the kernel panic on BF533's because we end up calling show_stack()
infinitely.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
14 years agoBlackfin: fix data cache flushing when doing icache flushing
Mike Frysinger [Fri, 10 Apr 2009 20:52:08 +0000 (20:52 +0000)] 
Blackfin: fix data cache flushing when doing icache flushing

Make sure we flush all data caches and their write buffers before flushing
icache, otherwise random edge cases could crop up where stale data is read
into icache from external memory.  As fallout, punt the combined icache +
dcache flush function since we cannot safely do them back to back -- the
SSYNC is needed between the dcache flush and the icache flush.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
14 years agoBlackfin: fix link failure due to CONFIG_EXCEPTION_L1_SCRATCH
Graf Yang [Wed, 8 Apr 2009 08:30:22 +0000 (08:30 +0000)] 
Blackfin: fix link failure due to CONFIG_EXCEPTION_L1_SCRATCH

Move exception stack mess from entry.S to init.c to fix link failure when
CONFIG_EXCEPTION_L1_SCRATCH is in use.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
14 years agoBlackfin: allow scheduler functions to be placed into L1
Robin Getz [Tue, 31 Mar 2009 13:40:52 +0000 (13:40 +0000)] 
Blackfin: allow scheduler functions to be placed into L1

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
14 years agoBlackfin: Allow bf548 ATAPI to be routed to GPIO
Sonic Zhang [Mon, 30 Mar 2009 09:07:26 +0000 (09:07 +0000)] 
Blackfin: Allow bf548 ATAPI to be routed to GPIO

By default, it is routed to async memory address. In GPIO case,
GPIO peripheral PINs should be requested in advance.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
14 years agoBlackfin: bf527-ezkit: add support for mmc-spi
Yi Li [Tue, 31 Mar 2009 10:36:51 +0000 (10:36 +0000)] 
Blackfin: bf527-ezkit: add support for mmc-spi

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
14 years agoBlackfin: add some help text to the EBIU_AMBCTL settings
Mike Frysinger [Tue, 31 Mar 2009 00:18:35 +0000 (00:18 +0000)] 
Blackfin: add some help text to the EBIU_AMBCTL settings

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
14 years agoBlackfin: add comment for anomaly 05000171 to init code
Michael Hennerich [Wed, 15 Apr 2009 08:48:08 +0000 (08:48 +0000)] 
Blackfin: add comment for anomaly 05000171 to init code

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
14 years agoasm-generic: merge branch 'master' of torvalds/linux-2.6
Arnd Bergmann [Fri, 12 Jun 2009 07:53:47 +0000 (09:53 +0200)] 
asm-generic: merge branch 'master' of torvalds/linux-2.6

Fixes a merge conflict against the x86 tree caused by a fix to
atomic.h which I renamed to atomic_long.h.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
14 years agokmemleak: Remove the kmemleak.h include in drivers/char/vt.c
Catalin Marinas [Fri, 12 Jun 2009 08:29:52 +0000 (09:29 +0100)] 
kmemleak: Remove the kmemleak.h include in drivers/char/vt.c

This file is no longer annotated for false positives but the kmemleak.h
include was still present.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Alan Cox <alan.cox@linux.intel.com>
14 years ago[S390] wire up sys_perf_counter_open
Heiko Carstens [Fri, 12 Jun 2009 08:26:49 +0000 (10:26 +0200)] 
[S390] wire up sys_perf_counter_open

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] wire up sys_rt_tgsigqueueinfo
Heiko Carstens [Fri, 12 Jun 2009 08:26:48 +0000 (10:26 +0200)] 
[S390] wire up sys_rt_tgsigqueueinfo

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] ftrace: add system call tracer support
Heiko Carstens [Fri, 12 Jun 2009 08:26:47 +0000 (10:26 +0200)] 
[S390] ftrace: add system call tracer support

System call tracer support for s390.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] ftrace: add function graph tracer support
Heiko Carstens [Fri, 12 Jun 2009 08:26:46 +0000 (10:26 +0200)] 
[S390] ftrace: add function graph tracer support

Function graph tracer support for s390.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] ftrace: add function trace mcount test support
Heiko Carstens [Fri, 12 Jun 2009 08:26:45 +0000 (10:26 +0200)] 
[S390] ftrace: add function trace mcount test support

Add support for early test if the function tracer is enabled or
disabled. Saves some extra function calls.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] ftrace: add dynamic ftrace support
Heiko Carstens [Fri, 12 Jun 2009 08:26:44 +0000 (10:26 +0200)] 
[S390] ftrace: add dynamic ftrace support

Dynamic ftrace support for s390.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] kprobes: use probe_kernel_write
Heiko Carstens [Fri, 12 Jun 2009 08:26:43 +0000 (10:26 +0200)] 
[S390] kprobes: use probe_kernel_write

Use proble_kernel_write() to patch the kernel.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] maccess: arch specific probe_kernel_write() implementation
Heiko Carstens [Fri, 12 Jun 2009 08:26:42 +0000 (10:26 +0200)] 
[S390] maccess: arch specific probe_kernel_write() implementation

Add an s390 specific probe_kernel_write() function which allows to
write to the kernel text segment even if write protection is enabled.
This is implemented using the lra (load real address) and stura (store
using real address) instructions.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] maccess: add weak attribute to probe_kernel_write
Heiko Carstens [Fri, 12 Jun 2009 08:26:41 +0000 (10:26 +0200)] 
[S390] maccess: add weak attribute to probe_kernel_write

probe_kernel_write() gets used to write to the kernel address space.
E.g. to patch the kernel (kgdb, ftrace, kprobes...). Some architectures
however enable write protection for the kernel text section, so that
writes to this region would fault.
This patch allows to specify an architecture specific version of
probe_kernel_write() which allows to handle and bypass write protection
of the text segment.
That way it is still possible to catch random writes to kernel text
and explicitly allow writes via this interface.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] profile_tick called twice
Martin Schwidefsky [Fri, 12 Jun 2009 08:26:40 +0000 (10:26 +0200)] 
[S390] profile_tick called twice

profile_tick is called twice for every clock comparator interrupt.
The generic clock event code does it in tick_sched_timer and the
s390 backend code in clock_comparator_work. That is one too many,
remove the one in the arch backend code.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] dasd: forward internal errors to dasd_sleep_on caller
Stefan Weinhuber [Fri, 12 Jun 2009 08:26:39 +0000 (10:26 +0200)] 
[S390] dasd: forward internal errors to dasd_sleep_on caller

If a DASD requests is started with dasd_sleep_on and fails, then the
calling function may need to know the reason for the failure.
In cases of hardware errors it can inspect the sense data in the irb,
but when the reason is internal (e.g. start_IO failed) then it needs
a meaningfull return code.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] dasd: sync after async probe
Sebastian Ott [Fri, 12 Jun 2009 08:26:38 +0000 (10:26 +0200)] 
[S390] dasd: sync after async probe

Some functions called as a late_initcall depend on completely
initialized devices. Since commit
f3445a1a656bc26b07946cc6d20de1ef07c8d116 the dasd driver uses the
new async framework and relies on the fact that synchronization is
done in prepare_namespace which is called after the late_initcalls.

Fix this by calling async_synchronize_full at the end of the related
init functions.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] dasd: check_characteristics cleanup
Sebastian Ott [Fri, 12 Jun 2009 08:26:37 +0000 (10:26 +0200)] 
[S390] dasd: check_characteristics cleanup

Fix a broken memset (sizeof pointer vs sizeof the underlying
structure) by cleaning up the involved functions.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] dasd: no High Performance FICON in 31-bit mode
Stefan Weinhuber [Fri, 12 Jun 2009 08:26:36 +0000 (10:26 +0200)] 
[S390] dasd: no High Performance FICON in 31-bit mode

The High Performance FICON feature is not supported in 31-bit mode,
no matter what the various flags say. So we need to check for the
CONFIG_64BIT option as well.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] dcssblk: revert devt conversion
Gerald Schaefer [Fri, 12 Jun 2009 08:26:35 +0000 (10:26 +0200)] 
[S390] dcssblk: revert devt conversion

git commit f331c0296f2a9fee0d396a70598b954062603015 changed users of
->first_minor to devt. This broke device handling in dcssblk, so that
no additional devices could be added after the first one.

This patch reverts the devt conversion to the previous ->first_minor
handling.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>