Commit Graph

411 Commits (d0ec774cb2599c858be9d923bb873cf6697520d8)

Author SHA1 Message Date
Linus Torvalds a03fdb7612 Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (34 commits)
  time: Prevent 32 bit overflow with set_normalized_timespec()
  clocksource: Delay clocksource down rating to late boot
  clocksource: clocksource_select must be called with mutex locked
  clocksource: Resolve cpu hotplug dead lock with TSC unstable, fix crash
  timers: Drop a function prototype
  clocksource: Resolve cpu hotplug dead lock with TSC unstable
  timer.c: Fix S/390 comments
  timekeeping: Fix invalid getboottime() value
  timekeeping: Fix up read_persistent_clock() breakage on sh
  timekeeping: Increase granularity of read_persistent_clock(), build fix
  time: Introduce CLOCK_REALTIME_COARSE
  x86: Do not unregister PIT clocksource on PIT oneshot setup/shutdown
  clocksource: Avoid clocksource watchdog circular locking dependency
  clocksource: Protect the watchdog rating changes with clocksource_mutex
  clocksource: Call clocksource_change_rating() outside of watchdog_lock
  timekeeping: Introduce read_boot_clock
  timekeeping: Increase granularity of read_persistent_clock()
  timekeeping: Update clocksource with stop_machine
  timekeeping: Add timekeeper read_clock helper functions
  timekeeping: Move NTP adjusted clock multiplier to struct timekeeper
  ...

Fix trivial conflict due to MIPS lemote -> loongson renaming.
2009-09-18 09:15:24 -07:00
Linus Torvalds 66bc4a6f34 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: (53 commits)
  m68knommu: Make PAGE_SIZE available to assembly files.
  m68knommu: fix ColdFire definition of CLOCK_TICK_RATE
  m68knommu: set multi-function pins for ethernet when enabled
  m68knommu: remove special interrupt handling code for ne2k support
  m68knommu: relax IO_SPACE_LIMIT setting
  m68knommu: remove ColdFire direct interrupt register access
  m68knommu: create a speciailized ColdFire 5272 interrupt controller
  m68knommu: add support for second interrupt controller of ColdFire 5249
  m68knommu: clean up old ColdFire timer irq setup
  m68knommu: map ColdFire interrupts to correct masking bits
  m68knommu: clean up ColdFire 532x CPU timer setup
  m68knommu: simplify ColdFire "timers" clock initialization
  m68knommu: support code to mask external interrupts on old ColdFire CPU's
  m68knommu: merge old ColdFire interrupt controller masking macros
  m68knommu: remove duplicate ColdFire mcf_autovector() code
  m68knommu: move ColdFire INTC definitions to new include file
  m68knommu: mask off all interrupts in ColdFire intc-simr controller
  m68knommu: remove timer device interrupt setup for ColdFire 532x
  m68knommu: remove interrupt masking from ColdFire pit timer
  m68knommu: remove unecessary interrupt level setting in ColdFire 520x setup
  ...
2009-09-17 09:52:43 -07:00
Greg Ungerer 14c16db390 m68knommu: set multi-function pins for ethernet when enabled
The ethernet pins on the 532x ColdFire CPU family are multi-function
pins. We need to enable them as ethernet pins when using the FEC
ethernet driver.

Bug report, and older patch, from timothee@manaud.net.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:56 +10:00
Greg Ungerer 49802967cb m68knommu: remove ColdFire direct interrupt register access
Now that the ColdFire 5272 has full interrupt controller functionality
we can remove all the interrupt masking and acking code from the FEC
ethernet driver.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:54 +10:00
Greg Ungerer 9075216d2c m68knommu: create a speciailized ColdFire 5272 interrupt controller
The ColdFire 5272 CPU has a very different interrupt controller than
any of the other ColdFire parts. It needs its own controller code to
correctly setup and ack interrupts.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:54 +10:00
Greg Ungerer da3601a5fa m68knommu: add support for second interrupt controller of ColdFire 5249
The ColdFire 5249 CPU has a second (compleletly different) interrupt
controller. It is the only ColdFire CPU that has this type. It controlls
GPIO interrupts amongst a number of interrupts from other internal
peripherals. Add support code for it.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:53 +10:00
Greg Ungerer 3945ca0f84 m68knommu: clean up old ColdFire timer irq setup
The recent changes to the old ColdFire interrupt controller code means
we no longer need to manually unmask the timer interrupt. That is now
done in the interrupt controller code proper.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:53 +10:00
Greg Ungerer 39f0fb6a34 m68knommu: map ColdFire interrupts to correct masking bits
The older simple ColdFire interrupt controller has no one-to-one mapping
of interrupt numbers to bits in the interrupt mask register. Create a
mapping array that each ColdFire CPU type can populate with its available
interrupts and the bits that each use in the interrupt mask register.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:52 +10:00
Greg Ungerer f6a66276f5 m68knommu: clean up ColdFire 532x CPU timer setup
The newer ColdFire 532x family of CPU's uses the old timer, but has a
newer interrupt controller. It doesn't need the special timer setup
that was required when using the older interrupt controller. Remove the
dead timer irq and level setting code, and define the hard coded vector.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:52 +10:00
Greg Ungerer 04b75b10dc m68knommu: simplify ColdFire "timers" clock initialization
The ColdFire "timers" clock setup can be simplified. There is really no
need for the flexible per-platform setup code. The clock interrupt can be
hard defined per CPU platform (in CPU include files). This makes the
actual timer code simpler.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:51 +10:00
Greg Ungerer f9311f2643 m68knommu: support code to mask external interrupts on old ColdFire CPU's
The external interrupts used on the old Coldfire parts with the old style
interrupt controller can be properly mask/unmasked in the interrupt
handling code.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:51 +10:00
Greg Ungerer f2154bef81 m68knommu: merge old ColdFire interrupt controller masking macros
Currently the code that supports setting the old style ColdFire interrupt
controller mask registers is macros in the include files of each of the
CPU types. Merge all these into a set of real masking functions in the
old Coldfire interrupt controller code proper. All the macros are basically
the same (excepting a register size difference on really early parts).

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:50 +10:00
Greg Ungerer 5187995f0a m68knommu: remove duplicate ColdFire mcf_autovector() code
Each of the ColdFire CPU platform code that used the old style interrupt
controller had its own copy of the mcf_autovector() function. They are all
the same, remove them all and create a single function in the common
coldfire/intc.c code.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:50 +10:00
Greg Ungerer e47cc3d6ac m68knommu: mask off all interrupts in ColdFire intc-simr controller
The ColdFire intc-simr interrupt controller should mask off all
interrupt sources at init time. Doing it here instead of separately
in each platform setup.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:48 +10:00
Greg Ungerer 91b1b94f88 m68knommu: remove timer device interrupt setup for ColdFire 532x
With fully implemented interrupt controller code we don't need to do
the custom interrupt setup for the timer device of the ColdFire 532x.
Remove that code.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:48 +10:00
Greg Ungerer f1a59d244a m68knommu: remove interrupt masking from ColdFire pit timer
With proper interrupt controller code in place there is no need for
devices like the timers to have custom interrupt masking code.
Remove it (and the defines that go along with it).

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:47 +10:00
Greg Ungerer a3d9bf1dfd m68knommu: remove unecessary interrupt level setting in ColdFire 520x setup
The new code for the interrupt controller in the ColdFire 520x takes
care of all the interrupt controller setup. No manual config of the
level registers (ICR) is required by the  platform device setup code.
So remove it.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:47 +10:00
Greg Ungerer de4cbfb599 m68knommu: remove the common interrupt controller structure
Each different m68knommu CPU interrupt controller type has its own
interrupt controller data structures now. Remove the old, and now not
used, common irq structs and init code from here.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:46 +10:00
Greg Ungerer 0531d7b36b m68knommu: complete interrupt controller code for the 68360 CPU
Define the interrupt controller structures along with the interrupt
controller code for the 68360 CPU. This brings the interrupt setup
and control into one place for this CPU family.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:45 +10:00
Greg Ungerer 1985d2538c m68knommu: complete interrupt controller code for the 68328 CPU's
Define the interrupt controller structures along with the interrupt
controller code for the 68328 CPU family. This brings the interrupt
setup and control into one place for this CPU family.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:45 +10:00
Greg Ungerer 33a21263bf m68knommu: use common interrupt controller code for older ColdFire CPU's
The old ColdFire CPU's (5206, 5307, 5407, 5249 etc) use a simple
interrupt controller. Use common setup code for them. This addition
means that all ColdFire CPU's now have some specific type of interrupt
controller code.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:44 +10:00
Greg Ungerer 6589c1d715 m68knommu: clean up ColdFire 532x interrupt setup
With the common intc-simr interrupt controller code in place the ColdFire
532x family startup code can be greatly simplified. Remove all the
interrupt masking code, and the per-device interrupt config here.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:43 +10:00
Greg Ungerer 277c5e3e26 m68knommu: general interrupt controller for ColdFire 532x parts
The ColdFire 532x family of parts uses 2 of the same INTC interrupt
controlers used in the ColdFire 520x family. So modify the code to
support both parts. The extra code for the second INTC controler in
the case of the 520x is easily optimized away to nothing.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:42 +10:00
Greg Ungerer 1f946533bb m68knommu: clean up ColdFire 523x interrupt setup
With the common intc-2 interrupt controller code in place the ColdFire
523x family startup code can be greatly simplified. Remove all the
interrupt masking code, and the per-device interrupt config here.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:42 +10:00
Greg Ungerer 980f9235eb m68knommu: clean up ColdFire 528x interrupt setup
With the common intc-2 interrupt controller code in place the ColdFire
528x family startup code can be greatly simplified. Remove all the
interrupt masking code, and the per-device interrupt config here.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:41 +10:00
Greg Ungerer 1b718c71b7 m68knommu: clean up ColdFire 527x interrupt setup
With the common intc-2 interrupt controller code in place the ColdFire
527x family startup code can be greatly simplified. Remove all the
interrupt masking code, and the per-device interrupt config here.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:41 +10:00
Greg Ungerer 2fba4f0b03 m68knommu: general interrupt controller for ColdFire many 52xx parts
Create general interrupt controller code for the many ColdFire version 2
cores that use the two region INTC interrupt controller. This includes the
523x family, 5270, 5271, 5274, 5275, and the 528x families.

This code does proper masking and unmasking of interrupts. With this in
place some of the driver hacks in place to support ColdFire interrupts
can finally go away.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:40 +10:00
Greg Ungerer d0d77c26cb m68knommu: remove per device interrupt mask setting for ColdFire 520x
With general interrupt controller code in place we don't need specific
unmasking code for the internal ColdFire 520x UARTs or ethernet (FEC).

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:40 +10:00
Greg Ungerer cd3dd4068d m68knommu: use general interrupt controller for ColdFire 520x family
Create general interrupt controller code for the ColdFire 520x family,
that does proper masking and unmasking of interrupts. With this in
place some of the driver hacks in place to support ColdFire interrupts
can finally go away.

Within the ColdFire family there is a variety of different interrupt
controllers in use. Some are used on multiple parts, some on only one.
There is quite some differences in some varients, so much so that
common code for all ColdFire parts would be impossible.

This commit introduces code to support one of the newer interrupt
controllers in the ColdFire 5208 and 5207 parts. It has very simple
mask and unmask operations, so is one of the easiest to support.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:39 +10:00
Greg Ungerer 6192c1ea0a m68k: merge the mmu and non-mmu versions of checksum.h
The mmu and non-mmu versions of checksum.h are mostly the same,
merge them.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:37 +10:00
Christoph Hellwig d668bf0a0d m68knommu: convert to asm-generic/hardirq.h
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:36 +10:00
Joe Perches c573b29baf arch/m68knommu/kernel/time.c: Remove unnecessary semicolons
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-16 09:43:31 +10:00
Linus Torvalds ada3fa1505 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (46 commits)
  powerpc64: convert to dynamic percpu allocator
  sparc64: use embedding percpu first chunk allocator
  percpu: kill lpage first chunk allocator
  x86,percpu: use embedding for 64bit NUMA and page for 32bit NUMA
  percpu: update embedding first chunk allocator to handle sparse units
  percpu: use group information to allocate vmap areas sparsely
  vmalloc: implement pcpu_get_vm_areas()
  vmalloc: separate out insert_vmalloc_vm()
  percpu: add chunk->base_addr
  percpu: add pcpu_unit_offsets[]
  percpu: introduce pcpu_alloc_info and pcpu_group_info
  percpu: move pcpu_lpage_build_unit_map() and pcpul_lpage_dump_cfg() upward
  percpu: add @align to pcpu_fc_alloc_fn_t
  percpu: make @dyn_size mandatory for pcpu_setup_first_chunk()
  percpu: drop @static_size from first chunk allocators
  percpu: generalize first chunk allocator selection
  percpu: build first chunk allocators selectively
  percpu: rename 4k first chunk allocator to page
  percpu: improve boot messages
  percpu: fix pcpu_reclaim() locking
  ...

Fix trivial conflict as by Tejun Heo in kernel/sched.c
2009-09-15 09:39:44 -07:00
sfking@fdwdc.com dca7cf33bb generic GPIO support for the Freescale Coldfire 5407.
Add support for the 5407.

Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-10 12:01:24 +10:00
sfking@fdwdc.com 7846fe800a generic GPIO support for the Freescale Coldfire 532x.
Add support for the 532x.

Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-10 12:01:23 +10:00
sfking@fdwdc.com f7a20ba064 generic GPIO support for the Freescale Coldfire 5307.
Add support for the 5307.

Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-10 12:01:23 +10:00
sfking@fdwdc.com 6da6e63c96 generic GPIO support for the Freescale Coldfire 528x.
Add support for the 528x.

Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-10 12:01:23 +10:00
sfking@fdwdc.com 316f2c483c generic GPIO support for the Freescale Coldfire 5272.
Add support for the 5272.

Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-10 12:01:23 +10:00
sfking@fdwdc.com f1554da34f generic GPIO support for the Freescale Coldfire 527x.
Add support for the 5271 & 5275.

Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-10 12:01:23 +10:00
sfking@fdwdc.com 9e8ded166d generic GPIO support for the Freescale Coldfire 5249.
Add support for the 5249.

Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-10 12:01:22 +10:00
sfking@fdwdc.com a03ce7d9ef generic GPIO support for the Freescale Coldfire 523x.
Add support for the 523x.

Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-10 12:01:22 +10:00
sfking@fdwdc.com afde8560b4 generic GPIO support for the Freescale Coldfire 520x.
Add support for the 520x.

Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-10 12:01:22 +10:00
sfking@fdwdc.com 24a1836ecd generic GPIO support for the Freescale Coldire 5206e.
Add support for the 5206e.

Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-10 12:01:22 +10:00
sfking@fdwdc.com bc25b057fa generic GPIO support for the Freescale Coldfire 5206.
Add support for the 5206.

Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-10 12:01:22 +10:00
sfking@fdwdc.com af39bb8b07 core generic GPIO support for Freescale Coldfire processors.
This adds the basic infrastructure used by all of the different Coldfire CPUs.

Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-09-10 12:01:22 +10:00
Geert Uytterhoeven 9848484fad m68k,m68knommu: Wire up rt_tgsigqueueinfo and perf_counter_open
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Greg Ungerer <gerg@uclinux.org>
2009-08-26 23:14:50 +02:00
Martin Schwidefsky d4f587c67f timekeeping: Increase granularity of read_persistent_clock()
The persistent clock of some architectures (e.g. s390) have a
better granularity than seconds. To reduce the delta between the
host clock and the guest clock in a virtualized system change the 
read_persistent_clock function to return a struct timespec.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Acked-by: John Stultz <johnstul@us.ibm.com>
Cc: Daniel Walker <dwalker@fifo99.com>
LKML-Reference: <20090814134811.013873340@de.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2009-08-15 10:55:46 +02:00
Tejun Heo 384be2b18a Merge branch 'percpu-for-linus' into percpu-for-next
Conflicts:
	arch/sparc/kernel/smp_64.c
	arch/x86/kernel/cpu/perf_counter.c
	arch/x86/kernel/setup_percpu.c
	drivers/cpufreq/cpufreq_ondemand.c
	mm/percpu.c

Conflicts in core and arch percpu codes are mostly from commit
ed78e1e078dd44249f88b1dd8c76dafb39567161 which substituted many
num_possible_cpus() with nr_cpu_ids.  As for-next branch has moved all
the first chunk allocators into mm/percpu.c, the changes are moved
from arch code to mm/percpu.c.

Signed-off-by: Tejun Heo <tj@kernel.org>
2009-08-14 14:45:31 +09:00
Tejun Heo 023bf6f1b8 linker script: unify usage of discard definition
Discarded sections in different archs share some commonality but have
considerable differences.  This led to linker script for each arch
implementing its own /DISCARD/ definition, which makes maintaining
tedious and adding new entries error-prone.

This patch makes all linker scripts to move discard definitions to the
end of the linker script and use the common DISCARDS macro.  As ld
uses the first matching section definition, archs can include default
discarded sections by including them earlier in the linker script.

ia64 is notable because it first throws away some ia64 specific
subsections and then include the rest of the sections into the final
image, so those sections must be discarded before the inclusion.

defconfig compile tested for x86, x86-64, powerpc, powerpc64, ia64,
alpha, sparc, sparc64 and s390.  Michal Simek tested microblaze.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Michal Simek <monstr@monstr.eu>
Cc: linux-arch@vger.kernel.org
Cc: Michal Simek <monstr@monstr.eu>
Cc: microblaze-uclinux@itee.uq.edu.au
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Tony Luck <tony.luck@intel.com>
2009-07-09 11:27:40 +09:00
Joe Perches ad361c9884 Remove multiple KERN_ prefixes from printk formats
Commit 5fd29d6ccb ("printk: clean up
handling of log-levels and newlines") changed printk semantics.  printk
lines with multiple KERN_<level> prefixes are no longer emitted as
before the patch.

<level> is now included in the output on each additional use.

Remove all uses of multiple KERN_<level>s in formats.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-07-08 10:30:03 -07:00