Commit Graph

258897 Commits

Author SHA1 Message Date
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
James Bottomley 87045b033a Merge branch 'scsi-fixes' 2011-07-23 21:09:03 +04:00
Venkateswararao Jujjuri (JV) c9ffb05ca5 net/9p: Fix the msize calculation.
msize represents the maximum PDU size that includes P9_IOHDRSZ.

Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2011-07-23 09:32:52 -05:00
Aneesh Kumar K.V 48e370ff93 fs/9p: add 9P2000.L unlinkat operation
unlinkat - Remove a directory entry

size[4] Tunlinkat tag[2] dirfid[4] name[s] flag[4]
size[4] Runlinkat tag[2]

older Tremove have the below request format

size[4] Tremove tag[2] fid[4]

The remove message is used to remove a directory entry either file or directory
The remove opreation is actually a directory opertation and should ideally have
dirfid, if not we cannot represent the fid on server with anything other than
name. We will have to derive the directory name from fid in the Tremove request.

NOTE: The operation doesn't clunk the unlink fid.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2011-07-23 09:32:52 -05:00
Aneesh Kumar K.V 9e8fb38e7d fs/9p: add 9P2000.L renameat operation
renameat - change name of file or directory

size[4] Trenameat tag[2] olddirfid[4] oldname[s] newdirfid[4] newname[s]
size[4] Rrenameat tag[2]

older Trename have the below request format

size[4] Trename tag[2] fid[4] newdirfid[4] name[s]

The rename message is used to change the name of a file, possibly moving it
to a new directory. The rename opreation is actually a directory opertation
and should ideally have olddirfid, if not we cannot represent the fid on server
with anything other than name. We will have to derive the old directory name
from fid in the Trename request.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2011-07-23 09:32:51 -05:00
Aneesh Kumar K.V ed80fcfac2 fs/9p: Always ask new inode in create
This make sure we don't end up reusing the unlinked inode object.
The ideal way is to use inode i_generation. But i_generation is
not available in userspace always.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2011-07-23 09:32:50 -05:00
Prem Karat 4d63055fa9 fs/9p: Clean-up get_protocol_version() to use strcmp
Signed-off-by: Prem Karat <prem.karat@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2011-07-23 09:32:49 -05:00
Prem Karat a2dd43bb0d fs/9p: Fix invalid mount options/args
Without this fix, if any invalid mount options/args are passed while mouting
the 9p fs, no error (-EINVAL) is returned and default arg value is assigned.

This fix returns -EINVAL when an invalid arguement is found while parsing
mount options.

Signed-off-by: Prem Karat <prem.karat@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2011-07-23 09:32:48 -05:00
Aneesh Kumar K.V fd2421f544 fs/9p: When doing inode lookup compare qid details and inode mode bits.
This make sure we don't use wrong inode from the inode hash. The inode number
of the file deleted is reused by the next file system object created
and if we only use inode number for inode hash lookup we could end up
with wrong struct inode.

Also compare inode generation number. Not all Linux file system provide
st_gen in userspace. So it could be 0;

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2011-07-23 09:32:48 -05:00
Aneesh Kumar K.V 5034990e28 fs/9p: Fid is not valid after a failed clunk.
free the fid even in case of failed clunk.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2011-07-23 09:32:48 -05:00
Aneesh Kumar K.V 52c14ab3b5 net/9p: Remove structure not used in the code
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2011-07-23 09:32:48 -05:00
jvrao 7f781679dd VirtIO can transfer VIRTQUEUE_NUM of pages.
Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2011-07-23 09:32:48 -05:00
jvrao 114e6f3a5e Fix the size of receive buffer packing onto VirtIO ring.
Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2011-07-23 09:32:47 -05:00
Eric Van Hensbergen e660a828f0 9p: clean up packet dump code
Switch to generic kernel hexdump library and cleanup macros to
be more consistent with the way we do normal debug prints.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2011-07-23 09:32:47 -05:00
Aneesh Kumar K.V 2053d67c54 fs/9p: remove rename work around in 9p
Now that VFS does the right thing remove the work around.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2011-07-23 09:32:47 -05:00
Eric Van Hensbergen b85f7d92d7 net/9p: fix client code to fail more gracefully on protocol error
There was a BUG_ON to protect against a bad id which could be dealt with
more gracefully.

Reported-by: Natalie Orlin <norlin@us.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2011-07-23 09:32:29 -05:00
Mark Brown 90923351d4 regulator: Convert tps65023 to use regmap API
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
2011-07-23 07:57:02 +01:00
Mark Brown a676f08306 regmap: Add SPI bus support
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
2011-07-23 07:56:59 +01:00
Mark Brown 9943fa300a regmap: Add I2C bus support
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
2011-07-23 07:56:39 +01:00
Mark Brown b83a313bf2 regmap: Add generic non-memory mapped register access API
There are many places in the tree where we implement register access for
devices on non-memory mapped buses, especially I2C and SPI. Since hardware
designers seem to have settled on a relatively consistent set of register
interfaces this can be effectively factored out into shared code.  There
are a standard set of formats for marshalling data for exchange with the
device, with the actual I/O mechanisms generally being simple byte
streams.

We create an abstraction for marshaling data into formats which can be
sent on the control interfaces, and create a standard method for
plugging in actual transport underneath that.

This is mostly a refactoring and renaming of the bottom level of the
existing code for sharing register I/O which we have in ASoC. A
subsequent patch in this series converts ASoC to use this.  The main
difference in interface is that reads return values by writing to a
location provided by a pointer rather than in the return value, ensuring
we can use the full range of the type for register data.  We also use
unsigned types rather than ints for the same reason.

As some of the devices can have very large register maps the existing
ASoC code also contains infrastructure for managing register caches.
This cache work will be moved over in a future stage to allow for
separate review, the current patch only deals with the physical I/O.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
2011-07-23 07:56:03 +01: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
Mike Frysinger 10617340ce Blackfin: spi-docs: further clarify GPIO CS behavior with various modes
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23 01:18:35 -04:00
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