Paul Mundt [Thu, 13 May 2010 09:42:25 +0000 (18:42 +0900)]
sh: fixup the docbook paths for clock framework shuffling.
Now that the definitions have been consolidated in an alternate header,
update the template accordingly.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Thu, 13 May 2010 09:02:28 +0000 (18:02 +0900)]
Merge branch 'sh/driver-core'
Paul Mundt [Thu, 13 May 2010 08:56:56 +0000 (17:56 +0900)]
driver core: Early dev_name() depends on slab_is_available().
The early dev_name() setup needs to do an allocation which can only be
satisfied under slab_is_available() conditions. Some of the early
platform drivers may be initialized before this point, and those still
need to contend themselves with an empty dev_name.
This fixes up a regression with the SH earlyprintk which was bailing out
prior to hitting the early probe path due to not being able to satisfy
the early allocation. Other early platform drivers (such as the early
timers) that need to match the dev name are sufficiently late that
allocations are already possible.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Thu, 13 May 2010 08:48:13 +0000 (17:48 +0900)]
Merge branch 'sh/highmem'
Paul Mundt [Thu, 13 May 2010 08:48:05 +0000 (17:48 +0900)]
Merge branch 'sh/lmb'
Conflicts:
arch/sh/kernel/setup.c
Paul Mundt [Thu, 13 May 2010 08:45:44 +0000 (17:45 +0900)]
Merge branch 'sh/clkfwk'
Guennadi Liakhovetski [Tue, 4 May 2010 14:15:09 +0000 (14:15 +0000)]
sh: simplify WARN usage in SH clock driver
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Kuninori Morimoto [Thu, 13 May 2010 01:08:37 +0000 (01:08 +0000)]
sh: Check return value of clk_get on ms7724
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Kuninori Morimoto [Thu, 13 May 2010 01:08:33 +0000 (01:08 +0000)]
sh: Check return value of clk_get on ecovec24
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 13:29:34 +0000 (13:29 +0000)]
sh: move sh clock-cpg.c contents to drivers/sh/clk-cpg.c
Move the CPG helpers to drivers/sh/clk-cpg.c V2.
This to allow SH-Mobile ARM to share the code with
SH. All functions except the legacy CPG stuff is moved.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 13:29:25 +0000 (13:29 +0000)]
sh: move sh clock.c contents to drivers/sh/clk.
This patch is V2 of the SH clock framework move from
arch/sh/kernel/cpu/clock.c to drivers/sh/clk.c. All
code except the following functions are moved:
clk_init(), clk_get() and clk_put().
The init function is still kept in clock.c since it
depends on the SH-specific machvec implementation.
The symbols clk_get() and clk_put() already exist in
the common ARM clkdev code, those symbols are left in
the SH tree to avoid duplicating them for SH-Mobile ARM.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 13:29:17 +0000 (13:29 +0000)]
sh: move sh asm/clock.h contents to linux/sh_clk.h V2
This patch is V2 of the clock framework move from
arch/sh/include/asm/clock.h to include/linux/sh_clk.h
and updates the include paths for files that will be
shared between SH and SH-Mobile ARM.
The file asm/clock.h is still kept in this version,
this to depend on as few files as possible at this
point. We keep SH specific stuff in there.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 09:37:12 +0000 (09:37 +0000)]
sh: remove unused clock lookup
Now when all clocks are registered using clkdev,
get rid of the special SH-specific clock lookup.
Also ditch the unused module ref counting code.
This patch syncs the SH behaviour with ARM.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 09:37:05 +0000 (09:37 +0000)]
sh: switch boards to clkdev
This patch converts the remaining board clocks
to use clkdev for lookup if needed. The unused
name and id from struct clk are also removed.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 09:36:57 +0000 (09:36 +0000)]
sh: switch sh4-202 to clkdev
This patch converts the remaining sh4-202 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 09:36:48 +0000 (09:36 +0000)]
sh: switch shx3 to clkdev
This patch converts the remaining shx3 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 09:36:40 +0000 (09:36 +0000)]
sh: switch sh7757 to clkdev
This patch converts the remaining sh7757 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 09:36:32 +0000 (09:36 +0000)]
sh: switch sh7763 to clkdev
This patch converts the remaining sh7763 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 09:36:24 +0000 (09:36 +0000)]
sh: switch sh7780 to clkdev
This patch converts the remaining sh7780 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 09:36:16 +0000 (09:36 +0000)]
sh: switch sh7786 to clkdev
This patch converts the remaining sh7786 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 09:36:03 +0000 (09:36 +0000)]
sh: switch sh7785 to clkdev
This patch converts the remaining sh7785 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 09:35:55 +0000 (09:35 +0000)]
sh: switch sh7366 to clkdev
This patch converts the remaining sh7366 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 09:35:45 +0000 (09:35 +0000)]
sh: switch sh7343 to clkdev
This patch converts the remaining sh7343 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 09:35:38 +0000 (09:35 +0000)]
sh: switch sh7722 to clkdev
This patch converts the remaining sh7722 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 09:35:27 +0000 (09:35 +0000)]
sh: switch sh7723 to clkdev
This patch converts the remaining sh7723 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 09:35:19 +0000 (09:35 +0000)]
sh: switch sh7724 to clkdev
This patch converts the remaining sh7724 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 09:35:11 +0000 (09:35 +0000)]
sh: switch legacy clocks to clkdev
This patch converts the legacy clocks to register
using clkdev. Also the clock name is removed.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 07:06:13 +0000 (07:06 +0000)]
sh: get rid of div4 clock name
Remove the name parameter from SH_CLK_DIV4() and
adjust the processor specific code. The lookup
happens using clkdev so the name is unused.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 07:06:05 +0000 (07:06 +0000)]
sh: sh7786 div4 clkdev lookup
Add sh7786 DIV4 clocks to the clkdev lookup list.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 07:05:58 +0000 (07:05 +0000)]
sh: sh7785 div4 clkdev lookup
Add sh7785 DIV4 clocks to the clkdev lookup list.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 07:05:50 +0000 (07:05 +0000)]
sh: sh7366 div4 clkdev lookup
Add sh7366 DIV4 clocks to the clkdev lookup list.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 07:05:42 +0000 (07:05 +0000)]
sh: sh7343 div4 clkdev lookup
Add sh7343 DIV4 clocks to the clkdev lookup list.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 07:05:32 +0000 (07:05 +0000)]
sh: sh7724 div4 clkdev lookup
Add sh7724 DIV4 clocks to the clkdev lookup list.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 07:05:25 +0000 (07:05 +0000)]
sh: sh7723 div4 clkdev lookup
Add sh7723 DIV4 clocks to the clkdev lookup list.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 07:05:17 +0000 (07:05 +0000)]
sh: sh7722 div4 clkdev lookup
Add sh7722 DIV4 clocks to the clkdev lookup list.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 07:05:09 +0000 (07:05 +0000)]
sh: div4 reparent workaround
Update the div4 set_parent() callback to use the
flags instead of name to determine parent index.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 05:00:47 +0000 (05:00 +0000)]
sh: get rid of mstp32 clock name and id
Remove the name and the id from SH_CLK_MSTP32().
Now when lookups are handled by clkdev they are
not needed anymore.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 05:00:38 +0000 (05:00 +0000)]
sh: sh7786 mstp32 clkdev lookup
Add sh7786 MSTP clocks to the clkdev lookup table.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 05:00:30 +0000 (05:00 +0000)]
sh: sh7786 mstp32 index rework
This patch adds sh7786 MSTP enums for mstp_clks[] index.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 05:00:22 +0000 (05:00 +0000)]
sh: sh7785 mstp32 clkdev lookup
Add sh7785 MSTP clocks to the clkdev lookup table.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 05:00:14 +0000 (05:00 +0000)]
sh: sh7785 mstp32 index rework
This patch adds sh7785 MSTP enums for mstp_clks[] index.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 05:00:06 +0000 (05:00 +0000)]
sh: sh7366 mstp32 clkdev lookup
Add sh7366 MSTP clocks to the clkdev lookup table.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 04:59:58 +0000 (04:59 +0000)]
sh: sh7366 mstp32 index rework
This patch adds sh7366 MSTP enums for mstp_clks[] index.
The MSTP bit for the SIU is removed as well since it is
not included in the documentation. Most likely an old
copy paste error from sh7722.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 04:59:50 +0000 (04:59 +0000)]
sh: sh7343 mstp32 clkdev lookup
Add sh7343 MSTP clocks to the clkdev lookup table.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Tue, 11 May 2010 04:59:43 +0000 (04:59 +0000)]
sh: sh7343 mstp32 index rework
This patch adds sh7343 MSTP enums for mstp_clks[] index.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Tue, 11 May 2010 06:24:04 +0000 (15:24 +0900)]
sh: All SH-X3 cores support NUMA and SMP, update Kconfig.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Tue, 11 May 2010 04:52:50 +0000 (13:52 +0900)]
sh: Ensure active regions have a backing PMB entry.
In the NUMA or memory hot-add case where system memory has been
partitioned up, we immediately run in to a situation where the existing
PMB entry doesn't cover the new range (primarily as a result of the entry
size being shrunk to match the node size early in the initialization). In
order to fix this up it's necessary to preload a PMB mapping for the new
range prior to activation in order to circumvent reset by MMU.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Tue, 11 May 2010 04:50:29 +0000 (13:50 +0900)]
sh: Reject small mappings for PMB bolting.
The minimum section size for the PMB is 16M, so just always error
out early if the specified size is too small. This permits us to
unconditionally call in to pmb_bolt_mapping() with variable sizes
without wasting a TLB and cache flush for the range.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Tue, 11 May 2010 04:32:19 +0000 (13:32 +0900)]
sh: bootmem refactoring.
This reworks much of the bootmem setup and initialization code allowing
us to get rid of duplicate work between the NUMA and non-NUMA cases. The
end result is that we end up with a much more flexible interface for
supporting more complex topologies (fake NUMA, highmem, etc, etc.) which
is entirely LMB backed. This is an incremental step for more NUMA work as
well as gradually enabling migration off of bootmem entirely.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Tue, 11 May 2010 02:53:11 +0000 (11:53 +0900)]
Merge branches 'sh/clkfwk' and 'sh/kexec'
Hiroshi DOYU [Mon, 10 May 2010 11:50:55 +0000 (14:50 +0300)]
sh: clkfwk: Use debugfs_remove_recursive() for rewinding
Rewinding each debugfs entries to unregister if an error happens.
Based on the commit
ca4caa4e1d45f9542fa54263974d0ef637157b4a
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Mon, 10 May 2010 14:02:09 +0000 (14:02 +0000)]
sh: get rid of div6 clock names
Get rid of div6 clock names on
sh7343/sh7366/sh7722/sh7723/sh7724
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Mon, 10 May 2010 14:01:55 +0000 (14:01 +0000)]
sh: tie in div6 clocks using clkdev
Use clkdev for div6 lookup on SH-Mobile processors:
sh7343/sh7366/sh7722/sh7723/sh7724
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Mon, 10 May 2010 14:01:44 +0000 (14:01 +0000)]
sh: get rid of hwblk clock names
Remove the clock name from sh7722/sh7723/sh7724
hwblk clocks. Lookup is handled by clkdev.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Mon, 10 May 2010 14:01:34 +0000 (14:01 +0000)]
sh: allow registering clocks without name
Modify the SuperH clock code to support struct clk
with NULL as name. Such clocks will not be hooked
up to debugfs.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Mon, 10 May 2010 14:01:22 +0000 (14:01 +0000)]
sh: tie in hwblk clocks using clkdev
Use clkdev for lookup of hwblk clocks on
sh7722/sh7723/sh7724.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Mon, 10 May 2010 14:01:12 +0000 (14:01 +0000)]
sh: scif and tmu clkdev changes
Modify sh7722/sh7723/sh7724 to use clkdev for
TMU and SCIF clock lookups.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Mon, 10 May 2010 14:01:02 +0000 (14:01 +0000)]
sh: hwblk index rework
Rework the sh7722/sh7723/sh7724 hwblk code to use the
hwblk id as index in the mstp clock array.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 10 May 2010 11:17:25 +0000 (20:17 +0900)]
sh: rework memory limits to work with LMB.
This reworks the memory limit handling to tie in through the available
LMB infrastructure. This requires a bit of reordering as we need to have
all of the LMB reservations taken care of prior to establishing the
limits.
While we're at it, the crash kernel reservation semantics are reworked
so that we allocate from the bottom up and reduce the risk of having
to disable the memory limit due to a clash with the crash kernel
reservation.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 10 May 2010 06:39:05 +0000 (15:39 +0900)]
sh: enable LMB region setup via machvec.
This plugs in a memory init callback in the machvec to permit boards to
wire up various bits of memory directly in to LMB. A generic machvec
implementation is provided that simply wraps around the normal
Kconfig-derived memory start/size.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 7 May 2010 08:58:55 +0000 (17:58 +0900)]
sh: shuffle the elfcorehdr handling over to the crash dump code.
The elfcorehdr parsing was just tossed in setup.c, but nothing outside of
the crash dump code/vmcore bits require it, so we just move it out of the
way, as per ppc.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 7 May 2010 08:14:00 +0000 (17:14 +0900)]
sh: Ensure that X2 TLB settings are reflected in vmcore.
This rolls in the X2TLB config settings for vmcore.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 7 May 2010 07:39:09 +0000 (16:39 +0900)]
sh: flag kdump as broken on SMP for now.
There's still quite a bit of shootdown logic that needs to be hacked up
to support SMP for kdump properly, so just add in a BROKEN_ON_SMP
dependency for now.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 7 May 2010 06:10:42 +0000 (15:10 +0900)]
sh: bump up extra LMB reservations in bootmem init.
This bumps up the extra LMB reservations in ordering so that they're
accounted for prior to iterating over the region list. This ensures that
reservations are visible both within the LMB and bootmem context.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 7 May 2010 06:10:07 +0000 (15:10 +0900)]
sh: convert initrd reservation to LMB.
This switches over from bootmem -> LMB for the initrd area reservation.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 7 May 2010 05:54:55 +0000 (14:54 +0900)]
sh: convert kexec crash kernel management to LMB.
This migrates the crash kernel handling off of bootmem and over to LMB.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Thu, 6 May 2010 06:09:45 +0000 (15:09 +0900)]
sh: Make initrd detection more robust.
Various boot loaders go to various extents to thwart the initrd detection
logic (mostly on account of not being able to be bothered with adhering
to the established boot ABI), so we make the detection logic a bit more
robust. This makes it possible to work around the SDK7786's firmware's
attempts to thwart compressed image booting. Victory is mine.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Matt Fleming [Wed, 28 Apr 2010 11:11:30 +0000 (11:11 +0000)]
sh: native_cpu_disable() build error when CONFIG_HOTPLUG_CPU=n
arch/sh/kernel/smp.c:164: error: conflicting types for 'native_cpu_disable'
/home/matt/src/kernels/sh-2.6/arch/sh/include/asm/smp.h:48: error: previous declaration of 'native_cpu_disable' was here
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Wed, 28 Apr 2010 05:46:11 +0000 (05:46 +0000)]
sh: add CONFIG_VIRTUALIZATION for virtio support
Add CONFIG_VIRTUALIZATION to the SH architecture
and include the virtio code there. Used to enable
the virtio drivers under QEMU.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Tue, 27 Apr 2010 07:41:12 +0000 (16:41 +0900)]
sh: make latencytop available on SMP, too.
The UP dependency was inherited from ARM, which seems to have run in to
it due to the stacktrace code not being available for SMP in certain
cases, as we don't have this particular limitation there is no specific
need to block on the SMP dependency.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 26 Apr 2010 10:11:51 +0000 (19:11 +0900)]
Merge branch 'sh/smp'
Paul Mundt [Mon, 26 Apr 2010 10:09:57 +0000 (19:09 +0900)]
sh: CPU hotplug support for SH-X3 SMP.
This wires up CPU hotplug for SH-X3 SMP CPUs. Presently only secondary
cores can be hotplugged given that the boot CPU has to contend with the
broadcast timer. When real local timers are implemented this restriction
can be lifted.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 26 Apr 2010 10:08:55 +0000 (19:08 +0900)]
sh: CPU hotplug support.
This adds preliminary support for CPU hotplug for SH SMP systems.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 26 Apr 2010 09:59:47 +0000 (18:59 +0900)]
sh: cache secondary CPUs idle loop.
This provides a cache of the secondary CPUs idle loop for the cases where
hotplug simply enters a low power state instead of resetting or powering
off the core.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 26 Apr 2010 09:55:01 +0000 (18:55 +0900)]
sh: flag smp_store_cpu_info() __cpuinit.
smp_store_cpu_info() is presently flagged as __init, but is called by
start_secondary() which is __cpuinit, fix it up.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 26 Apr 2010 09:49:58 +0000 (18:49 +0900)]
sh: provide percpu CPU states for hotplug notifiers.
This provides percpu CPU states in preparation for CPU hotplug and the
associated notifier chains.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 26 Apr 2010 09:44:04 +0000 (18:44 +0900)]
sh: Make sure all SH-X3 cores are populated in the present CPU map.
This iterates over the maximum number of CPUs we plan to support and
makes sure they're all set in the present CPU map.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 26 Apr 2010 09:39:50 +0000 (18:39 +0900)]
sh: convert online CPU map twiddling to cpumask.
This converts from cpu_set() for the online map to set_cpu_online().
The two online map modifiers were the last remaining manual map
manipulation bits, with this in place everything now goes through
cpumask.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 26 Apr 2010 09:35:44 +0000 (18:35 +0900)]
sh: arch/sh/kernel/setup.c needs asm/smp.h.
With the platform ops migration, the definitions still need to be
included in the CONFIG_SMP=n case, so make the asm/smp.h include
explicit.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 26 Apr 2010 09:20:29 +0000 (18:20 +0900)]
sh: Flag present CPUs hotpluggable in topology registration.
When registering CPUs in the topology initialization ensure that all of
the present CPUs are flagged as hotpluggable.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 26 Apr 2010 08:45:34 +0000 (17:45 +0900)]
sh: mach-sdk7786: update defconfig for compressed kernel image.
Now that compressed image loading is possible for sdk7786, drop the
vmlinux.bin default image target and update the defconfig accordingly.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 26 Apr 2010 07:15:17 +0000 (16:15 +0900)]
sh: Kill off dangling goto labels from oom-killer rework.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 26 Apr 2010 07:08:27 +0000 (16:08 +0900)]
Merge branch 'sh/stable-updates'
Conflicts:
arch/sh/kernel/dwarf.c
drivers/dma/shdma.c
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Guennadi Liakhovetski [Mon, 19 Apr 2010 08:39:39 +0000 (08:39 +0000)]
SH: fix error paths in DMA driver
If channel allocation is failing, mark the channel unused and give PM a chance
to power down the hardware.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Thu, 22 Apr 2010 06:21:10 +0000 (06:21 +0000)]
sh: sh7751 pci controller io port fix
This patch updates the sh7751 pci code to handle io ports
correctly. The code is based on the sh7788x implementation.
Tested on a R2D-1 board with CONFIG_8139TOO_PIO=y.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Thu, 22 Apr 2010 06:06:04 +0000 (06:06 +0000)]
sh: Fix maximum number of SCIF ports in R2D defconfigs
Update the R2D defconfigs to bump up the maximum
number of SCIF ports on the system.
Fixes a broken serial console regression added
by
cd5f107628ab89c5dec5ad923f1c27f4cba41972.
Reported-by: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp>
Signed-off-by: Magnus Damm <damm@opensource.se>
Tested-by: Alexandre Courbot <alex@dcl.info.waseda.ac.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Guennadi Liakhovetski [Wed, 21 Apr 2010 15:14:19 +0000 (15:14 +0000)]
SH: fix TS field shift calculation for DMA drivers
CHCR_TS_HIGH_SHIFT is defined as a shift of TS high bits in CHCR register,
relative to low bits. The TS_INDEX2VAL() macro has to take this into account.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 26 Apr 2010 06:54:48 +0000 (15:54 +0900)]
Merge branch 'master' of /linux/kernel/git/mfleming/sh-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/mfleming/sh-2.6:
sh: Use correct mask when comparing PMB DATA array values
sh: Do not try merging two 128MB PMB mappings
sh: Fix zImage load address when CONFIG_32BIT=y
sh: Fix address to decompress at when CONFIG_32BIT=y
sh: Assembly friendly __pa and __va definitions
Guennadi Liakhovetski [Wed, 21 Apr 2010 15:36:49 +0000 (15:36 +0000)]
SH: constify multiple DMA related objects and references to them
Lists of DMA channels and slaves are not changed, make them constant. Besides,
SH7724 channel and slave configuration of both DMA controllers is identical,
remove the extra copy of the configuration data.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Nick Piggin [Thu, 22 Apr 2010 16:06:26 +0000 (16:06 +0000)]
sh: invoke oom-killer from page fault
As explained in commit
1c0fe6e3bd, we want to call the architecture independent
oom killer when getting an unexplained OOM from handle_mm_fault, rather than
simply killing current.
Cc: linux-sh@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Linus Torvalds [Sun, 25 Apr 2010 23:28:56 +0000 (16:28 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
ipv6: Fix inet6_csk_bind_conflict()
e100: Fix the TX workqueue race
Eric Dumazet [Sun, 25 Apr 2010 22:09:42 +0000 (15:09 -0700)]
ipv6: Fix inet6_csk_bind_conflict()
Commit
fda48a0d7a84 (tcp: bind() fix when many ports are bound)
introduced a bug on IPV6 part.
We should not call ipv6_addr_any(inet6_rcv_saddr(sk2)) but
ipv6_addr_any(inet6_rcv_saddr(sk)) because sk2 can be IPV4, while sk is
IPV6.
Reported-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Tested-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Fleming [Sun, 25 Apr 2010 19:18:41 +0000 (20:18 +0100)]
sh: Use correct mask when comparing PMB DATA array values
Previously we were masking the PMB DATA array values with the value of
__MEMORY_START | PMB_V, which misses some PFN bits off the mask.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Matt Fleming [Sun, 25 Apr 2010 16:29:07 +0000 (17:29 +0100)]
sh: Do not try merging two 128MB PMB mappings
There is a logic error in pmb_merge() that means we will incorrectly try
to merge two 128MB PMB mappings into one mapping. However, 256MB isn't a
valid PMB map size and pmb_merge() will actually drop the second 128MB
mapping.
This patch allows my SDK7786 board to boot when configured with
CONFIG_MEMORY_SIZE=0x10000000.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Matt Fleming [Sat, 24 Apr 2010 12:34:44 +0000 (13:34 +0100)]
sh: Fix zImage load address when CONFIG_32BIT=y
We can't necessarily use the P1SEG region to access RAM when running in
32BIT mode, so use CONFIG_MEMORY_START as the base address.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Matt Fleming [Sat, 24 Apr 2010 12:28:20 +0000 (13:28 +0100)]
sh: Fix address to decompress at when CONFIG_32BIT=y
When running in 32BIT mode the P1SEG region doesn't necessarily provide
a window onto RAM (it depends how the bootloader setup the PMB). The
correct location to place the decompressed kernel is the physical
address of _text.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Matt Fleming [Sat, 24 Apr 2010 10:12:12 +0000 (11:12 +0100)]
sh: Assembly friendly __pa and __va definitions
This patch defines ___pa and ___va which return the physical and virtual
address of an address, respectively. These macros are suitable for
calling from assembly because they don't include the C casts required by
__pa and __va.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Linus Torvalds [Sun, 25 Apr 2010 17:01:51 +0000 (10:01 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/tytso/ext4
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: Issue the discard operation *before* releasing the blocks to be reused
ext4: Fix buffer head leaks after calls to ext4_get_inode_loc()
ext4: Fix possible lost inode write in no journal mode
Alan Cox [Sun, 25 Apr 2010 04:09:29 +0000 (21:09 -0700)]
e100: Fix the TX workqueue race
Nothing stops the workqueue being left to run in parallel with close or a
few other operations. This causes double unmaps and the like.
See kerneloops.org #
1041230 for an example
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Sat, 24 Apr 2010 18:35:21 +0000 (11:35 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/davej/cpufreq
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ] use max load in conservative governor
[CPUFREQ] fix a lockdep warning