Граф коммитов

59096 Коммитов

Автор SHA1 Сообщение Дата
Martin Schwidefsky fdb204d1a7 [S390] cleanup program check handler prototypes
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-07-24 10:48:21 +02:00
Carsten Otte f7850c9288 [S390] remove kvm mmu reload on s390
This patch removes the mmu reload logic for kvm on s390. Via Martin's
new gmap interface, we can safely add or remove memory slots while
guest CPUs are in-flight. Thus, the mmu reload logic is not needed
anymore.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-07-24 10:48:21 +02:00
Carsten Otte 092670cd90 [S390] Use gmap translation for accessing guest memory
This patch removes kvm-s390 internal assumption of a linear mapping
of guest address space to user space. Previously, guest memory was
translated to user addresses using a fixed offset (gmsor). The new
code uses gmap_fault to resolve guest addresses.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-07-24 10:48:21 +02:00
Carsten Otte 598841ca99 [S390] use gmap address spaces for kvm guest images
This patch switches kvm from using (Qemu's) user address space to
Martin's gmap address space. This way QEMU does not have to use a
linker script in order to fit large guests at low addresses in its
address space.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-07-24 10:48:21 +02:00
Martin Schwidefsky e5992f2e6c [S390] kvm guest address space mapping
Add code that allows KVM to control the virtual memory layout that
is seen by a guest. The guest address space uses a second page table
that shares the last level pte-tables with the process page table.
If a page is unmapped from the process page table it is automatically
unmapped from the guest page table as well.

The guest address space mapping starts out empty, KVM can map any
individual 1MB segments from the process virtual memory to any 1MB
aligned location in the guest virtual memory. If a target segment in
the process virtual memory does not exist or is unmapped while a
guest mapping exists the desired target address is stored as an
invalid segment table entry in the guest page table.
The population of the guest page table is fault driven.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-07-24 10:48:21 +02:00
Jan Glauber 144d634a21 [S390] fix s390 assembler code alignments
The alignment is missing for various global symbols in s390 assembly code.
With a recent gcc and an instruction like stgrl this can lead to a
specification exception if the instruction uses such a mis-aligned address.

Specify the alignment explicitely and while add it define __ALIGN for s390
and use the ENTRY define to save some lines of code.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-07-24 10:48:21 +02:00
Martin Schwidefsky 603d1a50ac [S390] move sie code to entry.S
The entry to / exit from sie has subtle dependencies to the first level
interrupt handler. Move the sie assembler code to entry64.S and replace
the SIE_HOOK callback with a test and the new _TIF_SIE bit.
In addition this patch fixes several problems in regard to the check for
the_TIF_EXIT_SIE bits. The old code checked the TIF bits before executing
the interrupt handler and it only modified the instruction address if it
pointed directly to the sie instruction. In both cases it could miss
a TIF bit that normally would cause an exit from the guest and would
reenter the guest context.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-07-24 10:48:21 +02:00
Christian Borntraeger bb25b9ba3e [S390] kvm: handle tprot intercepts
When running a kvm guest we can get intercepts for tprot, if the host
page table is read-only or not populated. This patch implements the
most common case (linux memory detection).
This also allows host copy on write for guest memory on newer systems.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-07-24 10:48:20 +02:00
Steven Rostedt f433c4aec9 [S390] irqs: Do not trace arch_local_{*,irq_*} functions
Do not trace arch_local_save_flags(), arch_local_irq_*() and friends.
Although they are marked inline, gcc may still make a function out of
them and add it to the pool of functions that are traced by the function
tracer. This can cause undesirable results (kernel panic, triple faults,
etc).

Add the notrace notation to prevent them from ever being traced.

Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-07-24 10:48:00 +02:00
Linus Torvalds 6d6be43d4d Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (43 commits)
  Blackfin: spi-docs: further clarify GPIO CS behavior with various modes
  Blackfin: boards: fix pcm device name
  Blackfin: SMP: punt unused atomic_test_mask helper
  Blackfin: irqs: do not trace arch_local_{*,irq_*} functions
  Blackfin: bf526: restrict reboot workaround to 0.0 silicon
  Blackfin: bf51x: fix alternative portmux options
  Blackfin: bf54x: fix GPIO resume code
  Blackfin: dpmc: optimize SDRAM programming slightly
  Blackfin: dpmc: don't save/restore scratch registers
  Blackfin: bf538: pull gpio/port logic out of core hibernate paths
  Blackfin: dpmc: optimize hibernate/resume path
  Blackfin: dpmc: do not save/restore EVT0/EVT1/EVT4 when hibernating
  Blackfin: dpmc: relocate hibernate helper macros
  Blackfin: dpmc: omit RETE/RETN when hibernating
  Blackfin: dpmc: optimize SIC_IWR programming a little
  Blackfin: gpio/ints: generalize pint logic
  Blackfin: dpmc: bind to MMR names and not CPUs
  Blackfin: debug-mmrs: generalize pint logic
  Blackfin: bf54x: switch to common pint MMR struct
  Blackfin: bf54x: tweak MMR pint names
  ...
2011-07-23 14:05:44 -07:00
Linus Torvalds b4db920c7f Merge branches 'x86-detect-hyper-for-linus', 'x86-fpu-for-linus', 'x86-kexec-for-linus', 'x86-platform-for-linus', 'x86-quirks-for-linus', 'x86-tsc-for-linus' and 'x86-smpboot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-detect-hyper-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, hyper: Change hypervisor detection order

* 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86-32, fpu: Fix DNA exception during check_fpu()

* 'x86-kexec-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  kexec, x86: Fix incorrect jump back address if not preserving context

* 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, config: Introduce an INTEL_MID configuration

* 'x86-quirks-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, quirks: Use pci_dev->revision

* 'x86-tsc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: tsc: Remove unneeded DMI-based blacklisting

* 'x86-smpboot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, boot: Wait for boot cpu to show up if nr_cpus limit is about to hit
2011-07-23 10:38:21 -07:00
Linus Torvalds 7080d30676 Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, build: Do not set the root_dev field in bzImage
2011-07-23 10:36:09 -07:00
Linus Torvalds 148a7b1725 Merge branch 'x86-atomic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-atomic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: Add support for cmpxchg_double
2011-07-23 10:35:43 -07:00
Linus Torvalds 9d0715630e Merge branch 'timers-clocksource-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-clocksource-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  clocksource: apb: Share APB timer code with other platforms
2011-07-23 10:34:47 -07:00
Linus Torvalds c0c463d34a Merge branches 'x86-urgent-for-linus', 'core-debug-for-linus', 'irq-core-for-linus' and 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  um: Make rwsem.S depend on CONFIG_RWSEM_XCHGADD_ALGORITHM

* 'core-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  debug: Make CONFIG_EXPERT select CONFIG_DEBUG_KERNEL to unhide debug options

* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  genirq: Remove unused CHECK_IRQ_PER_CPU()

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf tools, x86: Fix 32-bit compile on 64-bit system
2011-07-23 10:33:08 -07:00
Ohad Ben-Cohen e72542191c virtio: expose for non-virtualization users too
virtio has been so far used only in the context of virtualization,
and the virtio Kconfig was sourced directly by the relevant arch
Kconfigs when VIRTUALIZATION was selected.

Now that we start using virtio for inter-processor communications,
we need to source the virtio Kconfig outside of the virtualization
scope too.

Moreover, some architectures might use virtio for both virtualization
and inter-processor communications, so directly sourcing virtio
might yield unexpected results due to conflicting selections.

The simple solution offered by this patch is to always source virtio's
Kconfig in drivers/Kconfig, and remove it from the appropriate arch
Kconfigs. Additionally, a virtio menu entry has been added so virtio
drivers don't show up in the general drivers menu.

This way anyone can use virtio, though it's arguably less accessible
(and neat!) for virtualization users now.

Note: some architectures (mips and sh) seem to have a VIRTUALIZATION
menu merely for sourcing virtio's Kconfig, so that menu is removed too.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-07-23 16:20:30 +09:30
Scott Jiang 2b6678c552 Blackfin: boards: fix pcm device name
The pcm driver name has been changed, but the device name has not.

Signed-off-by: Scott Jiang <scott.jiang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:34 -04:00
Mike Frysinger 6ebc2bb92a Blackfin: SMP: punt unused atomic_test_mask helper
No one uses this func, so just punt it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:34 -04:00
Steven Rostedt a2de3f79b1 Blackfin: irqs: do not trace arch_local_{*,irq_*} functions
Do not trace arch_local_save_flags(), arch_local_irq_*() and friends.
Although they are marked inline, gcc may still make a function out of
them and add it to the pool of functions that are traced by the function
tracer. This can cause undesirable results (kernel panic, triple faults,
etc).

Add the notrace notation to prevent them from ever being traced.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:33 -04:00
Mike Frysinger b0d3dc1291 Blackfin: bf526: restrict reboot workaround to 0.0 silicon
The bug in the BF526 rom when doing a software reset exists only in older
silicon versions, so don't clear SWRST on newer parts.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:33 -04:00
Mike Frysinger 65cd3b5362 Blackfin: bf51x: fix alternative portmux options
The BF51x's alternative portmux Kconfig options were copy & pasted from
the BF52x, but never tweaked to reflect it.  So drop the old options as
they were never used (and were simply wrong), and add the BF51x specific
pieces to the Kconfig and header.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:32 -04:00
Mike Frysinger fdfb0becea Blackfin: bf54x: fix GPIO resume code
Back in commit c03c2a8734, we fixed logic in the non-bf54x
GPIO resume code to set the data levels properly before the direction
to avoid spurious line glitches.  But we missed the bf54x code paths.
So add the same fix there.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:32 -04:00
Mike Frysinger 9e770f7780 Blackfin: dpmc: optimize SDRAM programming slightly
No need to reload these registers constantly since they're always
available (we're not making any function calls in between).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:31 -04:00
Mike Frysinger da31d6fb46 Blackfin: dpmc: don't save/restore scratch registers
The Blackfin C ABI says we do not need to save/restore R0-R3 and P0-P2
as they are available as scratch registers.  So don't bother.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:31 -04:00
Mike Frysinger 9466a0510a Blackfin: bf538: pull gpio/port logic out of core hibernate paths
Re-architect how we save/restore the gpio/port logic that only pertains
to bf538/bf539 parts by pulling it out of the core code paths and pushing
it out to bf538-specific locations.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:30 -04:00
Mike Frysinger eed7b83658 Blackfin: dpmc: optimize hibernate/resume path
The current save logic used in hibernation is to do a MMR load (base +
offset) into a register, and then push that onto the stack.  Then when
restoring, pop off the stack into a register followed by a MMR store
(base + offset).  These use plenty of 32bit insns rather than 16bit,
are pretty long winded, and full of pipeline bubbles.

So, by taking advantage of MMRs that are contiguous, the multi-register
push/pop insn, and register abuse, we can shrink this code considerably.

When saving, the new logic does a lot of loads into the data and pointer
registers before executing a single multi-register push insn.  Then when
restoring, we do a single multi-register pop insn followed by a lot of
stores.  Overall, this allows us to cut the insn count by ~30%, the code
size by ~45%, and drastically reduce the register hazards that trigger
bubbles in the pipeline.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:29 -04:00
Mike Frysinger d7228e7eb9 Blackfin: dpmc: do not save/restore EVT0/EVT1/EVT4 when hibernating
EVT0 is for emulation, EVT1 is for reset, and EVT4 is the "global int
disable" region.  None of these are used by software (or even hardware),
so don't bother saving/restoring them when we hibernate since nothing
ever uses these in Linux (the only thing they would be useful for is
core-memory scratch, but that's just crazy talk).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:29 -04:00
Mike Frysinger 584ecbaa25 Blackfin: dpmc: relocate hibernate helper macros
This defines only get used in the hibernate code, so remove them from the
global dpmc header as no one else cares.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:28 -04:00
Mike Frysinger 429e257ea3 Blackfin: dpmc: omit RETE/RETN when hibernating
The RETE/RETN registers are only used in emulation(JTAG) and NMI nodes,
or as scratch registers, neither of which need to be saved/restored as
this code doesn't execute at those core event levels.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:28 -04:00
Mike Frysinger 4705a25c06 Blackfin: dpmc: optimize SIC_IWR programming a little
For parts with more than one SIC_IWR, we can optimize the writing
a little bit using better Blackfin insns.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:27 -04:00
Mike Frysinger 01f8e34c98 Blackfin: gpio/ints: generalize pint logic
Have the logic that uses peripheral interrupt blocks key off of pint
defines rather than CPU names so that things are generalized across
families.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:27 -04:00
Mike Frysinger 85c2737ae7 Blackfin: dpmc: bind to MMR names and not CPUs
Have the code work off of MMR names rather than CPU defines so there is
less code to tweak in the future with new parts.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:26 -04:00
Mike Frysinger 0a7e5413ca Blackfin: debug-mmrs: generalize pint logic
Don't bind the code to specific CPU defines.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:26 -04:00
Mike Frysinger 82ed5f73ed Blackfin: bf54x: switch to common pint MMR struct
We have a struct in the headers describing the register layout, so
drop the local duplicate one.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:25 -04:00
Mike Frysinger b69c920cb1 Blackfin: bf54x: tweak MMR pint names
The hardware block uses the name "request" rather than "irq", so update
the struct accordingly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:25 -04:00
Mike Frysinger b0759a4d23 Blackfin: bf54x: constify pint register array
The array of pointers to register blocks never changes, so constify it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:24 -04:00
Mike Frysinger 1a9e5bfbd4 Blackfin: gpio: punt unused GPIO_# defines
These defines don't accomplish much as GPIO_# is the same thing as #.
Each CPU already provides helpful symbolic defines like GPIO_<PIN>
which everyone uses, so just punt these # ones.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:24 -04:00
Mike Frysinger 969564508d Blackfin: convert unicode space gremlins
Not sure how these guys slipped in, but they're annoying me.
So bring these unicode space gremlins down to earth to normal
ascii spaces.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:23 -04:00
Mike Frysinger 006669ec21 Blackfin: pwm: implement linux/pwm.h API
For now, this only supports gptimers.  Support for dedicated PWM devices
as found on newer parts to come.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:23 -04:00
Mike Frysinger e1b5596533 Blackfin: gptimers: add enable/disable by timer id
The API is geared around timer ids, except for the act of enabling
and disabling timers.  So add a small helper to fill out the gap.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:22 -04:00
Steven Miao 353470cc50 Blackfin: make sure percpu section is aligned in XIP builds
The alignment is normally handled by PERCPU(), but we need to do it
ourselves in the XIP build due to the custom layout.

Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:22 -04:00
Mike Frysinger 997f95e190 Blackfin: gptimers: use bfin read/write helpers
Use proper helper macros for reading/writing the MMRs rather than
volatile markings on the struct.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:21 -04:00
Mike Frysinger 24a6b91f69 Blackfin: gptimers: use register structs from common header
Now that asm/gptimers.h has the hardware register struct layout, there's
no need to duplicate things locally.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:21 -04:00
Mike Frysinger af459864b3 Blackfin: debug-mmrs: use new gptimer_group layout to simplify code
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:20 -04:00
Mike Frysinger 94674b15df Blackfin: debug-mmrs: prevent macro arg from expanding
Passing a non-simple expression in as the addr arg could incorrectly
apply the pointer cast resulting in misbehavior.  Add proper paren.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:20 -04:00
Mike Frysinger 7595ac0711 Blackfin: gptimers: add group structure for hardware register layout
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:19 -04:00
Mathias Krause a64b384818 Blackfin: exec: remove redundant set_fs(USER_DS)
The address limit is already set in flush_old_exec() so this
set_fs(USER_DS) is redundant.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:18 -04:00
Mike Frysinger 979365ba4e Blackfin: update anomaly lists to latest public info
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:18 -04:00
Mike Frysinger 4e12b08b72 Blackfin: bf561-ezkit: change parallel flash from M to Y in defconfig
These flashes are always on the board, so might as well enable them by
default rather than a module.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:17 -04:00
Mike Frysinger e14062563c Blackfin: debug-mmrs: disable PERIPHERAL_MAP for IMDMA channels
The documentation for the IMDMA channels appears to be incorrect.
These DMA blocks don't actually have PERIPHERAL_MAP MMRs for us
to access.  Attempts to do so lead to system mmr hardware errors.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:17 -04:00