Nobuhiro Iwamatsu [Wed, 24 Sep 2008 02:46:48 +0000 (11:46 +0900)]
sh: ap325rxa: create CPLD data area in mtd
AP320 and AP325RXA has CPLD data in NOR Flash.
If this area erased, this board can not boot.
This patch create CPLD data area and set writeable mask bit.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Sun, 21 Sep 2008 10:04:55 +0000 (19:04 +0900)]
sh: Add FPU registers to regset interface.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Sun, 21 Sep 2008 08:17:53 +0000 (17:17 +0900)]
sh: Add missing asm/ftrace.h.
This was missed with the ftrace support commit.. check it in now.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Sun, 21 Sep 2008 08:14:42 +0000 (17:14 +0900)]
doc: Add remaining SH parameters to kernel-parameters.txt.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Sun, 21 Sep 2008 07:43:45 +0000 (16:43 +0900)]
sh: ftrace support.
This adds support for ftrace to SH. This only includes CONFIG_FTRACE,
and does not handle dynamic ftrace presently.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Sun, 21 Sep 2008 04:56:39 +0000 (13:56 +0900)]
sh: Trivial trace_mark() instrumentation for core events.
This implements a few trace points across events that are deemed
interesting. This implements a number of trace points:
- The page fault handler / TLB miss
- IPC calls
- Kernel thread creation
The original LTTng patch had the slow-path instrumented, which
fails to account for the vast majority of events. In general
placing this in the fast-path is not a huge performance hit, as
we don't take page faults for kernel addresses.
The other bits of interest are some of the other trap handlers, as
well as the syscall entry/exit (which is better off being handled
through the tracehook API). Most of the other trap handlers are corner
cases where alternate means of notification exist, so there is little
value in placing extra trace points in these locations.
Based on top of the points provided both by the LTTng instrumentation
patch as well as the patch shipping in the ST-Linux tree, albeit in a
stripped down form.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Sun, 21 Sep 2008 03:11:25 +0000 (12:11 +0900)]
sh: Kill off duplicate page fault notifiers in slow path.
We already have hooks in place in the __do_page_fault() fast-path,
so kill them off in the slow path.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Sun, 21 Sep 2008 03:06:43 +0000 (12:06 +0900)]
sh: Look up the trap vector for the page fault notifier.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Sun, 21 Sep 2008 03:00:23 +0000 (12:00 +0900)]
sh: Move lookup_exception_vector() out to asm/system_32.h.
There are other places where we want to have access to the trap/exception
number, so move out the lookup_exception_vector() helper. While we're at
it, refactor it slightly to return the vector instead.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Luca Santini [Sun, 21 Sep 2008 01:32:29 +0000 (10:32 +0900)]
sh: edosk7760: Correct size of bootloader flash partition.
This is 256K instead of 1M.
[ Converted to use asm/sizes.h. -- PFM ]
Signed-off-by: Luca Santini <luca.santini@spesonline.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Sun, 21 Sep 2008 01:31:57 +0000 (10:31 +0900)]
sh: Add a few more definitions to asm/sizes.h.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Sun, 21 Sep 2008 01:24:18 +0000 (10:24 +0900)]
sh: Copy in asm/sizes.h helper from ARM.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Sat, 20 Sep 2008 11:21:33 +0000 (20:21 +0900)]
sh: Support kernel stacks smaller than a page.
This follows the powerpc commit
f6a616800e68b61807d0f7bb0d5dc70665ef8046
'[POWERPC] Fix kernel stack allocation alignment'.
SH has traditionally forced the thread order to be relative to the page
size, so there were never any situations where the same bug was
triggered by slub. Regardless, the usage of > 8kB stacks for the larger
page sizes is overkill, so we switch to using slab allocations there,
as per the powerpc change.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Sat, 20 Sep 2008 11:16:35 +0000 (20:16 +0900)]
sh: Disable 4kB stacks when using PAGE_SIZE_64KB.
This combination triggers a divide by zero in kernel/fork.c when
calculating the initial max_threads value:
max_threads = mempages / (8 * THREAD_SIZE / PAGE_SIZE);
Simply disable 4K stacks on 64kB PAGE_SIZE to work around this,
as it's not a terribly useful combination to begin with.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Wed, 17 Sep 2008 14:26:44 +0000 (23:26 +0900)]
sh: HAVE_IOREMAP_PROT depends on MMU.
HAVE_IOREMAP_PROT enables an unconditional reference to
generic_access_phys(), which remains undefined in the nommu case.
As there's no point in supporting this there anyways, simply fix
up the dependency.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Wed, 17 Sep 2008 14:24:59 +0000 (23:24 +0900)]
sh: Fix up headers_check regression.
linux/mmzone.h isn't exported, kill it off from asm/setup.h and simply
deal with it in the places that have a dependency instead.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Wed, 17 Sep 2008 14:24:02 +0000 (23:24 +0900)]
sh: Consolidate struct sh_cpuinfo definitions across _32/_64 split.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Wed, 17 Sep 2008 14:14:36 +0000 (23:14 +0900)]
sh: Fix up signal_64 conflicting handle_signal() definition.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Wed, 17 Sep 2008 14:13:27 +0000 (23:13 +0900)]
sh: Make memory hot-add and hot-remove depend on MMU.
Cleans up link numerous build issues with page migration and so on when
enabled on nommu builds.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Wed, 17 Sep 2008 14:12:11 +0000 (23:12 +0900)]
sh: Fix up fpu emu build.
The addition of the kprobes code pushed down a variable declaration,
clean it up.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 12 Sep 2008 16:44:03 +0000 (01:44 +0900)]
sh: latencytop support.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 12 Sep 2008 14:27:46 +0000 (23:27 +0900)]
sh: Tidy up ELF core dumps.
These have been using overrides for ELF_CORE_COPY_TASK_REGS and
ELF_CORE_COPY_FPREGS while the generic versions can be used instead.
Presently the pt_regs are also duplicated across elf_core_copy_regs()
and elf_core_copy_task_regs(), this switches to simply copying out
through elf_core_copy_regs() instead.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 12 Sep 2008 13:56:35 +0000 (22:56 +0900)]
sh: Check SR.DSP bit for DSP regset validity.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 12 Sep 2008 13:42:43 +0000 (22:42 +0900)]
sh: Add missing task_user_regset_view() definition.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 12 Sep 2008 13:42:10 +0000 (22:42 +0900)]
sh: Add DSP registers to regset interface.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 12 Sep 2008 13:41:30 +0000 (22:41 +0900)]
sh: Fix up NUMA build error with se7722_defconfig.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 12 Sep 2008 13:13:36 +0000 (22:13 +0900)]
sh: Enable HAVE_ARCH_TRACEHOOK.
Now that the rest of the support requirements are out of the way, finally
enable support for tracehook.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 12 Sep 2008 13:13:13 +0000 (22:13 +0900)]
sh: Provide the asm/syscall.h interface, needed by tracehook.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 12 Sep 2008 13:11:36 +0000 (22:11 +0900)]
sh: provide user_stack_pointer(), needed for tracehook support.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 12 Sep 2008 13:08:20 +0000 (22:08 +0900)]
sh: Flag T-bit for syscall restart.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 12 Sep 2008 11:41:05 +0000 (20:41 +0900)]
sh: ioremap_prot support.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 12 Sep 2008 10:52:36 +0000 (19:52 +0900)]
sh: ptrace: Introduce user_regset interface for gp regs.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 12 Sep 2008 09:58:28 +0000 (18:58 +0900)]
sh: Provide a fixed UTS_MACHINE definition for sh64.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Luca Santini [Fri, 12 Sep 2008 09:08:01 +0000 (18:08 +0900)]
sh: update edosk7760 defconfig for physmap-flash.
Signed-off-by: Luca Santini <luca.santini@spesonline.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Luca Santini [Fri, 12 Sep 2008 09:07:16 +0000 (18:07 +0900)]
sh: edosk7760 physmap-flash support.
Signed-off-by: Luca Santini <luca.santini@spesonline.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
roel kluin [Wed, 10 Sep 2008 17:34:44 +0000 (19:34 +0200)]
rtc-sh: Unsigned rtc->{periodic,carry,alarm}_irq cannot be negative
possibly since commit
b420b1a7a17ea88531d0e12b2f2679a0c8365803
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
roel kluin [Wed, 10 Sep 2008 17:22:44 +0000 (19:22 +0200)]
sh_eth: unsigned ndev->irq cannot be negative
unsigned ndev->irq cannot be negative
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
roel kluin [Tue, 9 Sep 2008 21:02:43 +0000 (23:02 +0200)]
sh: intc_prio_data() test before subtraction on unsigned
bit is unsigned, so test before subtraction
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 8 Sep 2008 23:13:28 +0000 (08:13 +0900)]
sh: kprobes: kretprobe_trampoline needs to be global.
Needed by CONFIG_TRACING.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 8 Sep 2008 21:15:47 +0000 (06:15 +0900)]
sh: Add R2D+ defconfig for qemu system emulator.
This adds a defconfig for the R2D+ target in the qemu system emulator.
Eventually it will be possible to simply use the r2d+ defconfig as it is.
Provided by Shin-ichiro KAWASAKI.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 8 Sep 2008 11:47:42 +0000 (20:47 +0900)]
sh: Derive calibrate_delay lpj from clk fwk.
All CPUs must have a sensible cpu_clk definition these days, which we can
safely use for deriving the preset loops_per_jiffy. The only odd one out
is SH-5, which hasn't been hammered in to the framework yet.
Based on the ST patch.
Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
Signed-off-by: Carl Shaw <carl.shaw@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 8 Sep 2008 09:22:47 +0000 (18:22 +0900)]
sh: kprobes: __kprobes annotations and formatting cleanups.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 8 Sep 2008 09:15:55 +0000 (18:15 +0900)]
sh: kprobes: Fix up race against probe point removal.
Handle a corner case where another CPU or debugger removes the probe
point from underneath us.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 8 Sep 2008 09:14:50 +0000 (18:14 +0900)]
sh: kprobes: Fix up a preemption imbalance on jprobe return.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 8 Sep 2008 09:12:33 +0000 (18:12 +0900)]
sh: kprobes: Default to NOTIFY_DONE for unhandled debug traps.
Presently this is doing a force_sig() SIGTRAP, which is already taken
care of in the generic code if no one asserts NOTIFY_STOP. Switch the
default return to NOTIFY_DONE in the case of unhandled traps, so that
the same trap may pass through to other users on the same die chain.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 8 Sep 2008 09:10:10 +0000 (18:10 +0900)]
sh: kprobes: Use trapa #0x3a for breakpoint trap.
Not all parts support trapa #0xff, so use something within the debug trap
range that's accessible on all parts.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 8 Sep 2008 03:22:47 +0000 (12:22 +0900)]
sh: kprobes: Hook up kprobe_fault_handler() in the page fault path.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 8 Sep 2008 03:10:35 +0000 (12:10 +0900)]
sh: Disable seccomp support by default.
This was initially checked in with a stupid default of y, while most
everyone is going to want to have this disabled anyways.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 8 Sep 2008 03:02:17 +0000 (12:02 +0900)]
sh: Mark kretprobe_trampoline_holder static and __used.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 8 Sep 2008 03:01:55 +0000 (12:01 +0900)]
sh: Add EDOSK7760 mach type.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Luca Santini [Mon, 8 Sep 2008 03:01:15 +0000 (12:01 +0900)]
sh: Add Renesas EDOSK7760 board support.
This adds support for the Renesas (RTE) EDOSK7760 board. Currently
supported devices are:
- ramdisk support
- ethernet support
- nfs support
- ext2/ext3 support
- i2c support
- fb support (M)
Signed-off-by: Luca Santini <luca.santini@spesonline.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Luca Santini [Mon, 8 Sep 2008 02:54:56 +0000 (11:54 +0900)]
sh: Enable IRLM mode for SH7760 IRQ_MODE_IRQ.
Follows the same setting as SH7750.
Signed-off-by: Luca Santini <luca.santini@spesonline.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 5 Sep 2008 09:00:29 +0000 (18:00 +0900)]
sh: uninline flush_icache_all().
This uses jump_to_uncached() which is now given the noinline attribute
due to the special section mapping. Kill off the inline attribute to
fix up compilation failure.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 5 Sep 2008 08:27:37 +0000 (17:27 +0900)]
sh: Add the rest of the boot targets to arch/sh/boot/.gitignore.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Chris Smith [Fri, 5 Sep 2008 08:15:39 +0000 (17:15 +0900)]
sh: Add kprobes support.
Initial support for kprobes/kretprobes for 32-bit SH platforms.
[ General cleanup and some rework for the kretprobe hash lock. -- PFM ]
Signed-off-by: Chris Smith <chris.smith@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Marek Skuczynski [Fri, 5 Sep 2008 07:42:58 +0000 (16:42 +0900)]
sh: remove unnecessary memset after alloc_bootmem_low_pages
Because alloc_bootmem functions return the allocated memory always
zeroed, an additional call of memset on allocated memory is
unnecessary.
Signed-off-by: Marek Skuczynski <M.Skuczynski@adbglobal.com>
Signed-off-by: Carl Shaw <carl.shaw@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Francesco Virlinzi [Fri, 5 Sep 2008 07:40:22 +0000 (16:40 +0900)]
sh: fix the TMU code to allow a fully running NO_HZ system
This patch fixes the TMU code to allow NO_HZ to work on sh
Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Carl Shaw [Fri, 5 Sep 2008 07:36:19 +0000 (16:36 +0900)]
sh: Subnormal double to float conversion
This patch adds support for the SH4 to convert a subnormal double
into a float by catching the FPE and implementing the FCNVDS
instruction in software.
Signed-off-by: Carl Shaw <carl.shaw@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Stuart Menefy [Fri, 5 Sep 2008 07:29:40 +0000 (16:29 +0900)]
sh: Fix an unusual memory initialisation error.
This fixes a problems with the set up of Linux memory:
- When reserving memory at boot time, the code previously reserved
the bottom page of memory, and then from one page up to the end of
the bootmap. This had the desired effect, but was strictly speaking
wrong, as the one page was actually whatever CONFIG_ZERO_PAGE_OFFSET
had been set to.
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Chris Smith [Fri, 5 Sep 2008 07:24:13 +0000 (16:24 +0900)]
sh: Fix uImage load address in 32-bit mode.
Fix "make uImage" load and entry addresses in 32-bit mode.
Signed-off-by: Chris Smith <chris.smith@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Stuart Menefy [Fri, 5 Sep 2008 07:17:15 +0000 (16:17 +0900)]
sh: vmalloc pgtable sync fix.
This fixes a problem in the code which copies the vmalloc portion of the
kernel's page table into the current user space page table. The addition
of the four level page table code breaks on folded page tables, because
the pud level is always present (although folded). This updates the code
to use the same style of updates for the pud as is used for the pgd
level.
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Stuart Menefy [Fri, 5 Sep 2008 07:14:17 +0000 (16:14 +0900)]
sh: Fix up broken 32-bit initrd support.
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Stuart Menefy [Fri, 5 Sep 2008 07:06:42 +0000 (16:06 +0900)]
sh: early cached_to_uncached initialization.
statically initialise the cached_to_uncached offset, so that we can use
it immediatly.
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 5 Sep 2008 06:39:12 +0000 (15:39 +0900)]
sh: Add support for memory hot-remove.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 5 Sep 2008 06:36:39 +0000 (15:36 +0900)]
sh: Don't enable clockevents broadcasting on UP SH-X3 builds.
Fixes up compile errors with missing timer definitions. It's pointless to
have this enabled anyways if CONFIG_SMP=n.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Thu, 4 Sep 2008 09:53:58 +0000 (18:53 +0900)]
sh: fixup many sparse errors.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Thu, 7 Aug 2008 16:23:34 +0000 (01:23 +0900)]
sh: Display CPU information in show_regs().
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Thu, 7 Aug 2008 16:18:48 +0000 (01:18 +0900)]
sh: Early dummy clockevent registration on boot CPU.
The dummy timer needs to be registered on the boot CPU before the
system timer clockevent is registered, or broadcasting doesn't work
as advertized.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Wed, 6 Aug 2008 09:39:32 +0000 (18:39 +0900)]
sh: smp: shove a cpu_relax() in the plat_start_cpu() busy loop.
Without this, certain versions of GCC will happily optimize the entire
loop out.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Wed, 6 Aug 2008 09:37:07 +0000 (18:37 +0900)]
sh: generic clockevent broadcast support.
This hooks up GENERIC_CLOCKEVENTS_BROADCAST and a dummy local timer,
which we call in to from the timer IPI when no other local timer is
provided.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Wed, 6 Aug 2008 09:21:03 +0000 (18:21 +0900)]
sh: smp: Hook up a timer IPI stub.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Wed, 6 Aug 2008 09:05:09 +0000 (18:05 +0900)]
sh: smp: Hook in to the generic IPI handler for SH-X3 SMP.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Wed, 6 Aug 2008 09:02:48 +0000 (18:02 +0900)]
sh: smp: Provide a generic IPI handler.
This provides a generic smp_message_recv() routine (based on the PPC
one), that IPI IRQs can wrap in to.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Wed, 6 Aug 2008 08:29:14 +0000 (17:29 +0900)]
sh: Kill off unused defines from asm/smp.h.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Thu, 7 Aug 2008 09:01:43 +0000 (18:01 +0900)]
sh: Provide movli.l/movco.l-based cmpxchg.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Thu, 7 Aug 2008 08:36:12 +0000 (17:36 +0900)]
sh: Provide movli.l/movco.l-based bitops.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Linus Torvalds [Sun, 7 Sep 2008 04:47:30 +0000 (21:47 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: i8042 - make Lenovo 3000 N100 blacklist entry more specific
Input: bcm5974 - add BTN_TOUCH event for mousedev benefit
Input: bcm5974 - improve finger tracking and counting
Input: bcm5974 - small formatting cleanup
Input: bcm5974 - add maintainer entry
Linus Torvalds [Sun, 7 Sep 2008 02:36:23 +0000 (19:36 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: cpu_init(): fix memory leak when using CPU hotplug
x86: pda_init(): fix memory leak when using CPU hotplug
x86, xen: Use native_pte_flags instead of native_pte_val for .pte_flags
x86: move mtrr cpu cap setting early in early_init_xxxx
x86: delay early cpu initialization until cpuid is done
x86: use X86_FEATURE_NOPL in alternatives
x86: add NOPL as a synthetic CPU feature bit
x86: boot: stub out unimplemented CPU feature words
Linus Torvalds [Sun, 7 Sep 2008 02:33:26 +0000 (19:33 -0700)]
Merge branch 'timers-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
clocksource, acpi_pm.c: check for monotonicity
clocksource, acpi_pm.c: use proper read function also in errata mode
ntp: fix calculation of the next jiffie to trigger RTC sync
x86: HPET: read back compare register before reading counter
x86: HPET fix moronic 32/64bit thinko
clockevents: broadcast fixup possible waiters
HPET: make minimum reprogramming delta useful
clockevents: prevent endless loop lockup
clockevents: prevent multiple init/shutdown
clockevents: enforce reprogram in oneshot setup
clockevents: prevent endless loop in periodic broadcast handler
clockevents: prevent clockevent event_handler ending up handler_noop
Linus Torvalds [Sun, 7 Sep 2008 02:33:10 +0000 (19:33 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
Fix CONFIG_AC97_BUS dependency
Linus Torvalds [Sun, 7 Sep 2008 02:32:21 +0000 (19:32 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] Probe initrd header only if explicitly specified
[MIPS] TX39xx: Add missing local_flush_icache_range initialization
[MIPS] TXx9: Fix txx9_pcode initialization
[MIPS] Fix WARNING: at kernel/smp.c:290
[MIPS] Fix data bus error recovery
Andreas Herrmann [Wed, 6 Aug 2008 08:29:37 +0000 (10:29 +0200)]
x86: cpu_init(): fix memory leak when using CPU hotplug
Exception stacks are allocated each time a CPU is set online.
But the allocated space is never freed. Thus with one CPU hotplug
offline/online cycle there is a memory leak of 24K (6 pages) for
a CPU.
Fix is to allocate exception stacks only once -- when the CPU is
set online for the first time.
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: akpm@linux-foundation.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Andreas Herrmann [Wed, 6 Aug 2008 08:27:30 +0000 (10:27 +0200)]
x86: pda_init(): fix memory leak when using CPU hotplug
pda->irqstackptr is allocated whenever a CPU is set online.
But it is never freed. This results in a memory leak of 16K
for each CPU offline/online cycle.
Fix is to allocate pda->irqstackptr only once.
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: akpm@linux-foundation.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Eduardo Habkost [Thu, 24 Jul 2008 15:15:45 +0000 (12:15 -0300)]
x86, xen: Use native_pte_flags instead of native_pte_val for .pte_flags
Using native_pte_val triggers the BUG_ON() in the paravirt_ops
version of pte_flags().
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Yinghai Lu [Thu, 4 Sep 2008 19:09:43 +0000 (21:09 +0200)]
x86: move mtrr cpu cap setting early in early_init_xxxx
Krzysztof Helt found MTRR is not detected on k6-2
root cause:
we moved mtrr_bp_init() early for mtrr trimming,
and in early_detect we only read the CPU capability from cpuid,
so some cpu doesn't have that bit in cpuid.
So we need to add early_init_xxxx to preset those bit before mtrr_bp_init
for those earlier cpus.
this patch is for v2.6.27
Reported-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Krzysztof Helt [Thu, 4 Sep 2008 19:09:43 +0000 (21:09 +0200)]
x86: delay early cpu initialization until cpuid is done
Move early cpu initialization after cpu early get cap so the
early cpu initialization can fix up cpu caps.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Dominik Brodowski [Fri, 5 Sep 2008 21:05:35 +0000 (14:05 -0700)]
clocksource, acpi_pm.c: check for monotonicity
The current check for monotonicity is way too weak: Andreas Mohr reports (
http://lkml.org/lkml/2008/8/10/77 ) that on one of his test systems the
current check only triggers in 50% of all cases, leading to catastrophic
timer behaviour. To fix this issue, expand the check for monotonicity by
doing ten consecutive tests instead of one.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Dominik Brodowski [Fri, 5 Sep 2008 21:05:33 +0000 (14:05 -0700)]
clocksource, acpi_pm.c: use proper read function also in errata mode
On all hardware (some Intel ICH4, PIIX4 and PIIX4E chipsets) affected by a
hardware errata there's about a 4.2% chance that initialization of the
ACPI PMTMR fails. On those chipsets, we need to read out the timer value
at least three times to get a correct result, for every once in a while
(i.e. within a 3 ns window every 69.8 ns) the read returns a bogus
result. During normal operation we work around this issue, but during
initialization reading a bogus value may lead to -EINVAL even though the
hardware is usable.
Thanks to Andreas Mohr for spotting this issue.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Maciej W. Rozycki [Fri, 5 Sep 2008 21:05:31 +0000 (14:05 -0700)]
ntp: fix calculation of the next jiffie to trigger RTC sync
We have a bug in the calculation of the next jiffie to trigger the RTC
synchronisation. The aim here is to run sync_cmos_clock() as close as
possible to the middle of a second. Which means we want this function to
be called less than or equal to half a jiffie away from when now.tv_nsec
equals 5e8 (
500000000).
If this is not the case for a given call to the function, for this purpose
instead of updating the RTC we calculate the offset in nanoseconds to the
next point in time where now.tv_nsec will be equal 5e8. The calculated
offset is then converted to jiffies as these are the unit used by the
timer.
Hovewer timespec_to_jiffies() used here uses a ceil()-type rounding mode,
where the resulting value is rounded up. As a result the range of
now.tv_nsec when the timer will trigger is from 5e8 to 5e8 + TICK_NSEC
rather than the desired 5e8 - TICK_NSEC / 2 to 5e8 + TICK_NSEC / 2.
As a result if for example sync_cmos_clock() happens to be called at the
time when now.tv_nsec is between 5e8 + TICK_NSEC / 2 and 5e8 to 5e8 +
TICK_NSEC, it will simply be rescheduled HZ jiffies later, falling in the
same range of now.tv_nsec again. Similarly for cases offsetted by an
integer multiple of TICK_NSEC.
This change addresses the problem by subtracting TICK_NSEC / 2 from the
nanosecond offset to the next point in time where now.tv_nsec will be
equal 5e8, effectively shifting the following rounding in
timespec_to_jiffies() so that it produces a rounded-to-nearest result.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Takashi Iwai [Sat, 6 Sep 2008 09:43:41 +0000 (11:43 +0200)]
Fix CONFIG_AC97_BUS dependency
CONFIG_AC97_BUS is used from both sound and ucb1400 drivers.
The recent change in Kconfig introduced the exclusive dependency on
CONFIG_SOUND, and disabled the ucb1400 build without sound.
This patch makes CONFIG_AC97_BUS independent.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
Thomas Gleixner [Sat, 6 Sep 2008 01:06:08 +0000 (03:06 +0200)]
x86: HPET: read back compare register before reading counter
After fixing the u32 thinko I sill had occasional hickups on ATI chipsets
with small deltas. There seems to be a delay between writing the compare
register and the transffer to the internal register which triggers the
interrupt. Reading back the value makes sure, that it hit the internal
match register befor we compare against the counter value.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Thomas Gleixner [Sat, 6 Sep 2008 01:03:32 +0000 (03:03 +0200)]
x86: HPET fix moronic 32/64bit thinko
We use the HPET only in 32bit mode because:
1) some HPETs are 32bit only
2) on i386 there is no way to read/write the HPET atomic 64bit wide
The HPET code unification done by the "moron of the year" did
not take into account that unsigned long is different on 32 and
64 bit.
This thinko results in a possible endless loop in the clockevents
code, when the return comparison fails due to the 64bit/332bit
unawareness.
unsigned long cnt = (u32) hpet_read() + delta can wrap over 32bit.
but the final compare will fail and return -ETIME causing endless
loops.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Thomas Gleixner [Sat, 6 Sep 2008 01:01:45 +0000 (03:01 +0200)]
clockevents: broadcast fixup possible waiters
Until the C1E patches arrived there where no users of periodic broadcast
before switching to oneshot mode. Now we need to trigger a possible
waiter for a periodic broadcast when switching to oneshot mode.
Otherwise we can starve them for ever.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
H. Peter Anvin [Tue, 19 Aug 2008 00:50:33 +0000 (17:50 -0700)]
x86: use X86_FEATURE_NOPL in alternatives
Use X86_FEATURE_NOPL to determine if it is safe to use P6 NOPs in
alternatives. Also, replace table and loop with simple if statement.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 19 Aug 2008 00:39:32 +0000 (17:39 -0700)]
x86: add NOPL as a synthetic CPU feature bit
The long noops ("NOPL") are supposed to be detected by family >= 6.
Unfortunately, several non-Intel x86 implementations, both hardware
and software, don't obey this dictum. Instead, probe for NOPL
directly by executing a NOPL instruction and see if we get #UD.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Fri, 15 Aug 2008 22:36:31 +0000 (15:36 -0700)]
x86: boot: stub out unimplemented CPU feature words
The CPU feature detection code in the boot code is somewhat minimal,
and doesn't include all possible CPUID words. In particular, it
doesn't contain the code for CPU feature words 2 (Transmeta),
3 (Linux-specific), 5 (VIA), or 7 (scattered). Zero them out, so we
can still set those bits as known at compile time; in particular, this
allows creating a Linux-specific NOPL flag and have it required (and
therefore resolvable at compile time) in 64-bit mode.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Andrew Morton [Fri, 5 Sep 2008 21:00:24 +0000 (14:00 -0700)]
drivers/mmc/card/block.c: fix refcount leak in mmc_block_open()
mmc_block_open() increments md->usage although it returns with -EROFS when
default mounting a MMC/SD card with write protect switch on. This
reference counting bug prevents /dev/mmcblkX from being released on card
removal, and situation worsen with reinsertion until the minor number
range runs out.
Reported-by: <sasin@solomon-systech.com>
Acked-by: Pierre Ossman <drzeus-list@drzeus.cx>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Roland McGrath [Fri, 5 Sep 2008 21:00:23 +0000 (14:00 -0700)]
tracehook: comment pasto fixes
Fix some pasto's in comments in the new linux/tracehook.h and
asm-generic/syscall.h files.
Reported-by: Wenji Huang <wenji.huang@oracle.com>
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Stanislaw Gruszka [Fri, 5 Sep 2008 21:00:22 +0000 (14:00 -0700)]
atmel_lcdfb: fix oops in rmmod when framebuffer fails to register
If framebuffer registration failed in platform driver ->probe() callback,
dev_get_drvdata() points to freed memory region, but ->remove() function
try to use it and the following oops occurs:
Unable to handle kernel NULL pointer dereference at virtual address
00000228
pgd =
c3a20000
[
00000228] *pgd=
23a2b031, *pte=
00000000, *ppte=
00000000
Internal error: Oops: 17 [#1]
Modules linked in: atmel_lcdfb(-) cfbcopyarea cfbimgblt cfbfillrect [last unloaded: atmel_lcdfb]
CPU: 0 Not tainted (2.6.27-rc2 #116)
PC is at atmel_lcdfb_remove+0x14/0xf8 [atmel_lcdfb]
LR is at platform_drv_remove+0x20/0x24
pc : [<
bf006bc4>] lr : [<
c0157d28>] psr:
a0000013
sp :
c3a45e84 ip :
c3a45ea0 fp :
c3a45e9c
r10:
00000002 r9 :
c3a44000 r8 :
c0026c04
r7 :
00000880 r6 :
c02bb228 r5 :
00000000 r4 :
c02bb230
r3 :
bf007e3c r2 :
c02bb230 r1 :
00000004 r0 :
c02bb228
Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control:
0005317f Table:
23a20000 DAC:
00000015
Process rmmod (pid: 6799, stack limit = 0xc3a44260)
Stack: (0xc3a45e84 to 0xc3a46000)
5e80:
c02bb230 bf007e3c bf007e3c c3a45eac c3a45ea0 c0157d28 bf006bc0
5ea0:
c3a45ec4 c3a45eb0 c0156d20 c0157d18 c02bb230 c02bb2d8 c3a45ee0 c3a45ec8
5ec0:
c0156da8 c0156cb8 bf007e3c bf007ee0 c02c8e14 c3a45efc c3a45ee4 c0156018
5ee0:
c0156d50 bf007e3c bf007ee0 00000000 c3a45f18 c3a45f00 c0157220 c0155f9c
5f00:
00000000 bf007ee0 bf008000 c3a45f28 c3a45f1c c0157e34 c01571ec c3a45f38
5f20:
c3a45f2c bf006ba8 c0157e30 c3a45fa4 c3a45f3c c005772c bf006ba4 656d7461
5f40:
636c5f6c 00626664 c004c988 c3a45f80 c3a45f5c 00000000 c3a45fb0 00000000
5f60:
ffffffff becaccd8 00000880 00000000 000a5e80 00000001 bf007ee0 00000880
5f80:
c3a45f84 00000000 becaccd4 00000002 000003df 00000081 00000000 c3a45fa8
5fa0:
c0026a60 c0057584 00000002 000003df 00900081 000a5e80 00000880 00000000
5fc0:
becaccd4 00000002 000003df 00000000 000a5e80 00000001 00000002 0000005f
5fe0:
4004f5ec becacbe8 0001a158 4004f5fc 20000010 00900081 f9ffbadf 7bbfb2bb
Backtrace:
[<
bf006bb0>] (atmel_lcdfb_remove+0x0/0xf8 [atmel_lcdfb]) from [<
c0157d28>] (platform_drv_remove+0x20/0x24)
r6:
bf007e3c r5:
bf007e3c r4:
c02bb230
[<
c0157d08>] (platform_drv_remove+0x0/0x24) from [<
c0156d20>] (__device_release_driver+0x78/0x98)
[<
c0156ca8>] (__device_release_driver+0x0/0x98) from [<
c0156da8>] (driver_detach+0x68/0x90)
r5:
c02bb2d8 r4:
c02bb230
[<
c0156d40>] (driver_detach+0x0/0x90) from [<
c0156018>] (bus_remove_driver+0x8c/0xb4)
r6:
c02c8e14 r5:
bf007ee0 r4:
bf007e3c
[<
c0155f8c>] (bus_remove_driver+0x0/0xb4) from [<
c0157220>] (driver_unregister+0x44/0x48)
r6:
00000000 r5:
bf007ee0 r4:
bf007e3c
[<
c01571dc>] (driver_unregister+0x0/0x48) from [<
c0157e34>] (platform_driver_unregister+0x14/0x18)
r6:
bf008000 r5:
bf007ee0 r4:
00000000
[<
c0157e20>] (platform_driver_unregister+0x0/0x18) from [<
bf006ba8>] (atmel_lcdfb_exit+0x14/0x1c [atmel_lcdfb])
[<
bf006b94>] (atmel_lcdfb_exit+0x0/0x1c [atmel_lcdfb]) from [<
c005772c>] (sys_delete_module+0x1b8/0x22c)
[<
c0057574>] (sys_delete_module+0x0/0x22c) from [<
c0026a60>] (ret_fast_syscall+0x0/0x2c)
r7:
00000081 r6:
000003df r5:
00000002 r4:
becaccd4
Code:
e92dd870 e24cb004 e59050c4 e1a06000 (
e5954228)
---[ end trace
85476b184d9e68d8 ]---
This patch fixes the oops.
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Rafael J. Wysocki [Fri, 5 Sep 2008 21:00:19 +0000 (14:00 -0700)]
forcedeth: fix kexec regression
Fix regression tracked as http://bugzilla.kernel.org/show_bug.cgi?id=11361
and caused by commit
f735a2a1a4f2a0f5cd823ce323e82675990469e2 ("[netdrvr]
forcedeth: setup wake-on-lan before shutting down") that makes network
adapters integrated into the NVidia MCP55 chipsets fail to work in kexeced
kernels. The problem appears to be that if the adapter is put into D3_hot
during ->shutdown(), it cannot be brought back into D0 after kexec (ref.
http://marc.info/?l=linux-kernel&m=
121900062814967&w=4). Therefore, only
put forcedeth into D3 during ->shutdown() if the system is to be powered
off.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Ayaz Abdulla <aabdulla@nvidia.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This page took 0.046398 seconds and 5 git commands to generate.