]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years agoirq: introduce nr_irqs
Yinghai Lu [Wed, 20 Aug 2008 03:49:47 +0000 (20:49 -0700)]
irq: introduce nr_irqs

at this point nr_irqs is equal NR_IRQS

convert a few easy users from NR_IRQS to dynamic nr_irqs.

v2: according to Eric, we need to take care of arch without generic_hardirqs

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: enable dyn_array support
Yinghai Lu [Wed, 20 Aug 2008 03:49:46 +0000 (20:49 -0700)]
x86: enable dyn_array support

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: alloc dyn_array all together
Yinghai Lu [Wed, 20 Aug 2008 03:49:45 +0000 (20:49 -0700)]
x86: alloc dyn_array all together

so could spare some memory with small alignment in bootmem

also tighten the alignment checking, and make print out less debug info.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoadd per_cpu_dyn_array support
Yinghai Lu [Wed, 20 Aug 2008 03:49:44 +0000 (20:49 -0700)]
add per_cpu_dyn_array support

allow dyn-array in per_cpu area, allocated dynamically.

usage:

|  /* in .h */
| struct kernel_stat {
|        struct cpu_usage_stat   cpustat;
|        unsigned int *irqs;
| };
|
|  /* in .c */
| DEFINE_PER_CPU(struct kernel_stat, kstat);
|
| DEFINE_PER_CPU_DYN_ARRAY_ADDR(per_cpu__kstat_irqs, per_cpu__kstat.irqs, sizeof(unsigned int), nr_irqs, sizeof(unsigned long), NULL);

after setup_percpu()/per_cpu_alloc_dyn_array(), the dyn_array in
per_cpu area is ready to use.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agogeneric: add dyn_array support
Yinghai Lu [Wed, 20 Aug 2008 03:49:43 +0000 (20:49 -0700)]
generic: add dyn_array support

Allow crazy big arrays via bootmem at init stage.
Architectures use CONFIG_HAVE_DYN_ARRAY to enable it.

usage:

| static struct irq_desc irq_desc_init __initdata = {
|        .status = IRQ_DISABLED,
|        .chip = &no_irq_chip,
|        .handle_irq = handle_bad_irq,
|        .depth = 1,
|        .lock = __SPIN_LOCK_UNLOCKED(irq_desc->lock),
| #ifdef CONFIG_SMP
|        .affinity = CPU_MASK_ALL
| #endif
| };
|
| static void __init init_work(void *data)
| {
|        struct dyn_array *da = data;
|        struct  irq_desc *desc;
|        int i;
|
|        desc = *da->name;
|
|        for (i = 0; i < *da->nr; i++)
|                memcpy(&desc[i], &irq_desc_init, sizeof(struct irq_desc));
| }
|
| struct irq_desc *irq_desc;
| DEFINE_DYN_ARRAY(irq_desc, sizeof(struct irq_desc), nr_irqs, PAGE_SIZE, init_work);

after pre_alloc_dyn_array() after setup_arch(), the array is ready to be
used.

Via this facility we can replace irq_desc[NR_IRQS] array with dyn_array
irq_desc[nr_irqs].

v2: remove _nopanic in pre_alloc_dyn_array()

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: remove irq_vectors_limits
Yinghai Lu [Wed, 20 Aug 2008 03:49:42 +0000 (20:49 -0700)]
x86: remove irq_vectors_limits

there's no user left.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: add after_bootmem flag for 32bit
Yinghai Lu [Wed, 20 Aug 2008 03:49:41 +0000 (20:49 -0700)]
x86: add after_bootmem flag for 32bit

to prepare to use dyn_array support etc.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoserial, 8250: remove NR_IRQ usage
Alan Cox [Wed, 20 Aug 2008 03:49:40 +0000 (20:49 -0700)]
serial, 8250: remove NR_IRQ usage

Works on my test box with a quick test.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'linus' into genirq
Ingo Molnar [Thu, 16 Oct 2008 14:51:32 +0000 (16:51 +0200)]
Merge branch 'linus' into genirq

17 years agoBlackfin arch: Zero out bss region in L1/L2 memory.
Graf Yang [Thu, 16 Oct 2008 14:50:46 +0000 (22:50 +0800)]
Blackfin arch: Zero out bss region in L1/L2 memory.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
17 years agoALSA: hda - Release jack instance for dynamic reconfigure
Takashi Iwai [Thu, 16 Oct 2008 14:39:56 +0000 (16:39 +0200)]
ALSA: hda - Release jack instance for dynamic reconfigure

The jack instance has to be release manually in free callback
in patch_sigmatel.c for dynamic reconfiguration.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoMerge branch 'topic/hda-reconfig' into topic/hda-next
Takashi Iwai [Thu, 16 Oct 2008 14:39:46 +0000 (16:39 +0200)]
Merge branch 'topic/hda-reconfig' into topic/hda-next

17 years agoBlackfin arch: add read/write IO accessor functions to Blackfin
Bryan Wu [Thu, 16 Oct 2008 14:31:56 +0000 (22:31 +0800)]
Blackfin arch: add read/write IO accessor functions to Blackfin

This is to kill some compiling warning on DM9000 netdev driver.

Signed-off-by: Bryan Wu <cooloney@kernel.org>
17 years agoALSA: Print function symbol in the error messages
Takashi Iwai [Thu, 16 Oct 2008 14:17:30 +0000 (16:17 +0200)]
ALSA: Print function symbol in the error messages

Use the new %pF for error messages in snd_device_*() functions
to give more understandable results.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoMerge branch 'master' of ssh://mason@master.kernel.org/pub/scm/linux/kernel/git/mason...
Chris Mason [Thu, 16 Oct 2008 14:12:58 +0000 (10:12 -0400)]
Merge branch 'master' of ssh://mason@master.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable

17 years agoext4: Fix file fragmentation during large file write.
Aneesh Kumar K.V [Thu, 16 Oct 2008 14:10:36 +0000 (10:10 -0400)]
ext4: Fix file fragmentation during large file write.

The range_cyclic writeback mode uses the address_space writeback_index
as the start index for writeback.  With delayed allocation we were
updating writeback_index wrongly resulting in highly fragmented file.
This patch reduces the number of extents reduced from 4000 to 27 for a
3GB file.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
17 years agovfs: Add no_nrwrite_index_update writeback control flag
Aneesh Kumar K.V [Thu, 16 Oct 2008 14:09:17 +0000 (10:09 -0400)]
vfs: Add no_nrwrite_index_update writeback control flag

If no_nrwrite_index_update is set we don't update nr_to_write and
address space writeback_index in write_cache_pages.  This change
enables a file system to skip these updates in write_cache_pages and do
them in the writepages() callback.  This patch will be followed by an
ext4 patch that make use of these new flags.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
CC: linux-fsdevel@vger.kernel.org
17 years agofuse: implement nonseekable open
Tejun Heo [Thu, 16 Oct 2008 14:08:57 +0000 (16:08 +0200)]
fuse: implement nonseekable open

Let the client request nonseekable open using FOPEN_NONSEEKABLE and
call nonseekable_open() on the file if requested.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
17 years agofuse: add include protectors
Tejun Heo [Thu, 16 Oct 2008 14:08:57 +0000 (16:08 +0200)]
fuse: add include protectors

Add include protectors to include/linux/fuse.h and fs/fuse/fuse_i.h.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
17 years agofuse: config description improvement
Robert P. J. Day [Thu, 16 Oct 2008 14:08:57 +0000 (16:08 +0200)]
fuse: config description improvement

Make the short description of the FUSE_FS config option clearer.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
17 years agofuse: add missing fuse_request_free
Julia Lawall [Thu, 16 Oct 2008 14:08:56 +0000 (16:08 +0200)]
fuse: add missing fuse_request_free

The error handling code for the second call to fuse_request_alloc should
include freeing the result of the first one.

This bug was found by the Coccinelle project:

  http://www.emn.fr/x-info/coccinelle/

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
17 years agofuse: fix SEEK_END incorrectness
Miklos Szeredi [Thu, 16 Oct 2008 14:08:56 +0000 (16:08 +0200)]
fuse: fix SEEK_END incorrectness

Update file size before using it in lseek(..., SEEK_END).

Reported-by: Amnon Shiloh <u3557@miso.sublimeip.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
17 years ago[PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY
Martin Schwidefsky [Thu, 16 Oct 2008 13:39:57 +0000 (15:39 +0200)]
[PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY

The SET_PERSONALITY macro is always called with a second argument of 0.
Remove the ibcs argument and the various tests to set the PER_SVR4
personality.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years agooprofile: fixing whitespaces in arch/x86/oprofile/*
Robert Richter [Thu, 16 Oct 2008 13:01:40 +0000 (15:01 +0200)]
oprofile: fixing whitespaces in arch/x86/oprofile/*

Signed-off-by: Robert Richter <robert.richter@amd.com>
17 years agooprofile: fixing whitespaces in drivers/oprofile/*
Robert Richter [Thu, 16 Oct 2008 13:01:40 +0000 (15:01 +0200)]
oprofile: fixing whitespaces in drivers/oprofile/*

Signed-off-by: Robert Richter <robert.richter@amd.com>
17 years agouwb: don't use printk_ratelimit() so often
David Vrabel [Thu, 16 Oct 2008 12:56:53 +0000 (13:56 +0100)]
uwb: don't use printk_ratelimit() so often

Avoid using printk_ratelimit() in many places because:
  - many were error messages reporting broken hardware (it's useful to
    get all of these).
  - the message itself wasn't useful so the message has been removed.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
17 years agoALSA: ASoC: Remove snd_soc_dapm_connect_input()
Mark Brown [Thu, 16 Oct 2008 10:00:07 +0000 (11:00 +0100)]
ALSA: ASoC: Remove snd_soc_dapm_connect_input()

This was marked as deprecated in 2.6.27 and all users except for
playpaq_wm8510 fixed in that release.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoALSA: ASoC: Convert playpaq_wm8510 to bulk route registration API
Mark Brown [Thu, 16 Oct 2008 10:00:06 +0000 (11:00 +0100)]
ALSA: ASoC: Convert playpaq_wm8510 to bulk route registration API

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agopowerpc: fix linux-next build failure
Stephen Rothwell [Thu, 16 Oct 2008 09:29:07 +0000 (20:29 +1100)]
powerpc: fix linux-next build failure

Today's linux-next build (powerpc allyesconfig) failed like this:

In file included from arch/powerpc/include/asm/mmu-hash64.h:17,
                 from arch/powerpc/include/asm/mmu.h:8,
                 from arch/powerpc/include/asm/pgtable.h:8,
                 from arch/powerpc/mm/slb.c:20:
arch/powerpc/include/asm/page.h:76: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'memstart_addr'
arch/powerpc/include/asm/page.h:77: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'kernstart_addr'

Caused by commit 600715dcdf567c86f8b2c6173fcfb4b873e25a19 ("generic: add
phys_addr_t for holding physical addresses") from the tip-core tree.
This only fails if CONFIG_RELOCATABLE is set.

So include that instead of asm/types.h in asm/page.h for
the CONFIG_RELOCATABLE case.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: ppc-dev <linuxppc-dev@ozlabs.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoIntroduce is_vmalloc_or_module_addr() and use with DEBUG_VIRTUAL
Linus Torvalds [Wed, 15 Oct 2008 15:35:12 +0000 (08:35 -0700)]
Introduce is_vmalloc_or_module_addr() and use with DEBUG_VIRTUAL

Impact: crash on module insertion with CONFIG_DEBUG_VIRTUAL

We would incorrectly BUG due to:

   VIRTUAL_BUG_ON(!is_vmalloc_addr(vmalloc_addr) &&
              !is_module_address(addr));

... because, at least on x86-64, is_module_address() doesn't do what
it should.  This patch introduces is_vmalloc_or_module_addr(), which
is what we really want anyway, and uses it instead.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years ago[netdrvr] ibmtr: PCMCIA IBMTR is ok on 64bit
Alan Cox [Mon, 13 Oct 2008 14:02:31 +0000 (15:02 +0100)]
[netdrvr] ibmtr: PCMCIA IBMTR is ok on 64bit

For whatever value of 'OK' can be applied to the use of token ring. Seems
the 32bit to 64bit cleanups missed re-enabling the pcmcia driver

Closes #7133 and also reviewed the code in question

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agoxen-netfront: Avoid unaligned accesses to IP header
Isaku Yamahata [Wed, 15 Oct 2008 00:50:42 +0000 (17:50 -0700)]
xen-netfront: Avoid unaligned accesses to IP header

Align ip header to a 16 byte boundary to avoid unaligned
access like other drivers.
Without this patch, xen-netfront doesn't work well on ia64.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agolmc: copy_*_user under spinlock
Alan Cox [Wed, 15 Oct 2008 10:50:42 +0000 (11:50 +0100)]
lmc: copy_*_user under spinlock

Not sure anyone uses this driver any more, maybe we should just drop it ?
Code is still foul but at least a fraction less broken.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years ago[netdrvr] myri10ge, ixgbe: remove broken select INTEL_IOATDMA
Jeff Garzik [Thu, 16 Oct 2008 09:09:31 +0000 (05:09 -0400)]
[netdrvr] myri10ge, ixgbe: remove broken select INTEL_IOATDMA

We cannot select INTEL_IOATDMA in Kconfig as soon as MYRI10GE or IXGBE
is enabled since the former is not available on all architectures.

Just use a Kconfig bool {IXGBE,MYRI10GE}_DCA set to =y when DCA
support can actually be built.

[myri10ge portion written and signed-off-by] Brice Goglin <brice@myri.com>

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agoALSA: ASoC: Convert wm8900 to a new-style i2c driver
Jean Delvare [Wed, 15 Oct 2008 17:58:12 +0000 (19:58 +0200)]
ALSA: ASoC: Convert wm8900 to a new-style i2c driver

Convert the wm8900 codec driver to the new (standard) device driver
binding model.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoALSA: ASoC: Convert wm8580 to a new-style i2c driver
Jean Delvare [Wed, 15 Oct 2008 17:57:12 +0000 (19:57 +0200)]
ALSA: ASoC: Convert wm8580 to a new-style i2c driver

Convert the wm8580 codec driver to the new (standard) device driver
binding model.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoALSA: kernel docs: fix sound/core/ kernel-doc
Randy Dunlap [Wed, 15 Oct 2008 21:38:40 +0000 (14:38 -0700)]
ALSA: kernel docs: fix sound/core/ kernel-doc

Add kernel-doc function short descriptions to sound/core functions that
are missing this short description.  Mostly this involves moving some of
the function description onto the @funcname line.

Also correct a few variable names and fix other kernel-doc notation.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoALSA: hda: add support for jack detection on IDT/Sigmatel
Matthew Ranostay [Wed, 15 Oct 2008 18:45:38 +0000 (14:45 -0400)]
ALSA: hda: add support for jack detection on IDT/Sigmatel

Added support for jack detection reporting to userspace for
IDT/Sigmatel codecs.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoALSA: Handle NULL jacks in snd_jack_report()
Mark Brown [Wed, 15 Oct 2008 16:07:47 +0000 (17:07 +0100)]
ALSA: Handle NULL jacks in snd_jack_report()

Facilitate drivers that wish to carry on if they can't create a jack
input device by handling attempts to report the state of a NULL jack,
removing the need to check for initialisation before use.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoagp/nvidia: Support agp user-memory on nvidia agp.
Thomas Hellstrom [Wed, 10 Sep 2008 12:13:33 +0000 (14:13 +0200)]
agp/nvidia: Support agp user-memory on nvidia agp.

This adds user memory support required for TTM to the nvidia AGP driver.

Signed-off-by: Dave Airlie <airlied@redhat.com>
17 years agomd: fix input truncation in safe_delay_store()
Dan Williams [Thu, 25 Sep 2008 05:48:19 +0000 (22:48 -0700)]
md: fix input truncation in safe_delay_store()

safe_delay_store() currently truncates the last character of input since
it tells strlcpy that the buffer can only hold 'len' characters, off by
one.  sysfs already null terminates the buffer, so just increase the
last argument to strlcpy.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
17 years agoALSA: hda - Fix PCM type of Nvidia HDMI devices
Takashi Iwai [Thu, 16 Oct 2008 06:02:41 +0000 (08:02 +0200)]
ALSA: hda - Fix PCM type of Nvidia HDMI devices

Added the missing PCM type for Nvidia HDMI devices so that they point
the right device number.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoagp/amd-k7: Suspend support for AMD K7 GART driver
Stuart Bennett [Tue, 12 Aug 2008 14:19:18 +0000 (15:19 +0100)]
agp/amd-k7: Suspend support for AMD K7 GART driver

Reinitialize bridge registers after suspend, but avoid repeating the ioremap

Tested and works on AMD761

Signed-off-by: Stuart Bennett <stuart@freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
17 years agoagp/intel: Reduce extraneous PCI posting reads during init
Keith Packard [Wed, 15 Oct 2008 00:18:45 +0000 (17:18 -0700)]
agp/intel: Reduce extraneous PCI posting reads during init

Instead of doing a posting read after each GTT entry update, do a single one
at the end of the writes. This should reduce boot time a tiny amount by
avoiding a lot of extra uncached reads.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
17 years agoagp: Fix stolen memory counting on G4X.
Eric Anholt [Tue, 14 Oct 2008 18:28:58 +0000 (11:28 -0700)]
agp: Fix stolen memory counting on G4X.

On the GM45, the amount of stolen memory mapped to the GTT was underestimated,
even though we had 508KB more available since the GTT doesn't take from
stolen memory. On the non-GM45 G4X, we overestimated how much stolen was
mapped to the GTT by 4KB, resulting in GPU page faults when that page was
accessed.

This update requires a corresponding update to xf86-video-intel to work
correctly.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
17 years agoMerge branch 'next' into for-linus
Dmitry Torokhov [Thu, 16 Oct 2008 03:29:12 +0000 (23:29 -0400)]
Merge branch 'next' into for-linus

17 years agomd: check for memory allocation failure in faulty personality
Sven Wegener [Thu, 16 Oct 2008 03:16:53 +0000 (14:16 +1100)]
md: check for memory allocation failure in faulty personality

It's a fault injection module, but I don't think we should oops here.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agocpufreq: remove policy->governor setting in drivers initialization
Dominik Brodowski [Wed, 15 Oct 2008 22:11:04 +0000 (00:11 +0200)]
cpufreq: remove policy->governor setting in drivers initialization

As policy->governor is already set to CPUFREQ_DEFAULT_GOVERNOR in the
(always built-in) cpufreq core, we do not need to set it in the drivers.
This fixes the sparc64 allmodconfig build failure.

Also, remove a totally useles setting of ->policy in cpufreq-pxa3xx.c.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoHID: blacklist additional SoundGraph iMon LCD models
Jarod Wilson [Wed, 15 Oct 2008 23:26:43 +0000 (01:26 +0200)]
HID: blacklist additional SoundGraph iMon LCD models

hid_ignore_list additions for more SoundGraph iMon LCD devices

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoHID: fix/improve help texts for quirk drivers
Jiri Kosina [Wed, 15 Oct 2008 23:25:15 +0000 (01:25 +0200)]
HID: fix/improve help texts for quirk drivers

Update the help texts for the HID-quirk drivers, so that they are a little
bit more descriptive.

Also make some obsolete help descriptions up to date.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoHID: fix default building of HID-quirk drivers
Jiri Kosina [Wed, 15 Oct 2008 23:18:54 +0000 (01:18 +0200)]
HID: fix default building of HID-quirk drivers

Commit 9be7bbd54df3c9c393ccd19acc49f90c517d1291
(HID: build drivers for all quirky devices by default)
made a wrong assumption about select/depends interaction in Kconfig,
resulting in possibility of link failure with certain configuration
options.

Fix this by explicitly having all the quirk-drivers depend on
USB_HID, default to y and make the possibility to alter the
settings dependent on EBMEDDED.

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agodecnet: Fix compiler warning in dn_dev.c
David S. Miller [Wed, 15 Oct 2008 22:59:50 +0000 (15:59 -0700)]
decnet: Fix compiler warning in dn_dev.c

Use offsetof() instead of home-brewed version.

Based upon initial patch by Steven Whitehouse and suggestions
by Ben Hutchings.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoIPV6: Fix default gateway criteria wrt. HIGH/LOW preference radv option
Pedro Ribeiro [Wed, 15 Oct 2008 22:47:49 +0000 (15:47 -0700)]
IPV6: Fix default gateway criteria wrt. HIGH/LOW preference radv option

Problem observed:
               In IPv6, in the presence of multiple routers candidates to
               default gateway in one segment, each sending a different
               value of preference, the Linux hosts connected to the
               segment weren't selecting the right one in all the
               combinations possible of LOW/MEDIUM/HIGH preference.

This patch changes two files:
include/linux/icmpv6.h
               Get the "router_pref" bitfield in the right place
               (as RFC4191 says), named the bit left with this fix as
               "home_agent" (RFC3775 say that's his function)

net/ipv6/ndisc.c
               Corrects the binary logic behind the updating of the
               router preference in the flags of the routing table

Result:
               With this two fixes applied, the default route used by
               the system was to consistent with the rules mentioned
               in RFC4191 in case of changes in the value of preference
               in router advertisements

Signed-off-by: Pedro Ribeiro <pribeiro@net.ipl.pt>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoMerge branch 'fixes' into for-linus
Russell King [Wed, 15 Oct 2008 22:16:07 +0000 (23:16 +0100)]
Merge branch 'fixes' into for-linus

Conflicts:

arch/arm/mach-versatile/core.c

17 years agofix CONFIG_MMCONFIG=n build warning
Pavel Vasilyev [Wed, 15 Oct 2008 21:33:48 +0000 (17:33 -0400)]
fix CONFIG_MMCONFIG=n build warning

arch/x86/kernel/acpi/boot.c:100: warning: 'acpi_mcfg_64bit_base_addr' defined
but not used

http://bugzilla.kernel.org/show_bug.cgi?id=11743

Signed-off-by: Pavel Vasilyev <linuxoid@tochka.ru>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agofirewire: Add more documentation to firewire-cdev.h
Jay Fenlason [Wed, 1 Oct 2008 22:13:20 +0000 (18:13 -0400)]
firewire: Add more documentation to firewire-cdev.h

Signed-off-by: Jay Fenlason <fenlason@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agofirewire: fix ioctl() return code
Stefan Richter [Fri, 12 Sep 2008 16:20:16 +0000 (18:20 +0200)]
firewire: fix ioctl() return code

Reported by Jay Fenlason:  ioctl() did not return as intended
  - the size of data read into ioctl_send_request,
  - the number of datagrams enqueued by ioctl_queue_iso.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agofirewire: fix setting tag and sy in iso transmission
Stefan Richter [Fri, 12 Sep 2008 16:09:55 +0000 (18:09 +0200)]
firewire: fix setting tag and sy in iso transmission

Reported by Jay Fenlason:
The iso packet control accessors in fw-cdev.c had bogus masks.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agofirewire: fw-sbp2: fix another small generation access bug
Stefan Richter [Sat, 9 Aug 2008 18:22:17 +0000 (20:22 +0200)]
firewire: fw-sbp2: fix another small generation access bug

queuecommand() looked at the remote and local node IDs before it read
the bus generation.  The corresponding race with sbp2_reconnect updating
these data was probably impossible to happen though because the current
code blocks the SCSI layer during reconnection.  However, better safe
than sorry, especially if someone later improves the code to not block
the SCSI layer.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agofirewire: fw-sbp2: enforce s/g segment size limit
Stefan Richter [Thu, 14 Aug 2008 19:47:21 +0000 (21:47 +0200)]
firewire: fw-sbp2: enforce s/g segment size limit

1. We don't need to round the SBP-2 segment size limit down to a
   multiple of 4 kB (0xffff -> 0xf000).  It is only necessary to
   ensure quadlet alignment (0xffff -> 0xfffc).

2. Use dma_set_max_seg_size() to tell the DMA mapping infrastructure
   and the block IO layer about the restriction.  This way we can
   remove the size checks and segment splitting in the queuecommand
   path.

   This assumes that no other code in the firewire stack uses
   dma_map_sg() with conflicting requirements.  It furthermore assumes
   that the controller device's platform actually allows us to set the
   segment size to our liking.  Assert the latter with a BUG_ON().

3. Also use blk_queue_max_segment_size() to tell the block IO layer
   about it.  It cannot know it because our scsi_add_host() does not
   point to the FireWire controller's device.

Thanks to Grant Grundler and FUJITA Tomonori for advice.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agofirewire: fw_send_request_sync()
Jay Fenlason [Sun, 20 Jul 2008 12:20:53 +0000 (14:20 +0200)]
firewire: fw_send_request_sync()

Share code between fw_send_request + wait_for_completion callers.

Signed-off-by: Jay Fenlason <fenlason@redhat.com>
Addendum:
Removes an unnecessary struct and an ununsed retry loop.
Calls it fw_run_transaction() instead of fw_send_request_sync().

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Kristian Høgsberg <krh@redhat.com>
17 years agoieee1394: survive a few seconds connection loss
Stefan Richter [Tue, 19 Aug 2008 19:30:17 +0000 (21:30 +0200)]
ieee1394: survive a few seconds connection loss

There are situations when nodes vanish from the bus and come back in
quickly thereafter:
  - When certain bus-powered hubs are plugged in,
  - when certain disk enclosures are switched from self-power to bus
    power or vice versa and break the daisy chain during the transition,
  - when the user plugs a cable out and quickly plugs it back in, e.g.
    to reorder a daisy chain (works on Mac OS X if done quickly enough),
  - when certain hubs temporarily malfunction during high bus traffic.

The ieee1394 driver's nodemgr already contained a function to set
vanished nodes aside into "limbo"; i.e. they wouldn't actually be
deleted right away.  (In fact, only unloading the driver or writing into
an obscure sysfs attribute would delete them eventually.)  If nodes
reappeared later, they would be resurrected out of limbo.

Moving nodes into and out of limbo was accompanied with calling the
.suspend() and .resume() driver methods of the drivers which were bound
to a respective node's unit directories.  Not only is this somewhat
strange due to the intended use of these driver methods for power
management, also the sbp2 driver in particular does not implement
.suspend() and .resume().  Hence sbp2 would be disconnected from devices
in situations as listed above.

We now:
  - leave drivers bound when nodes go into limbo,
  - call the drivers' .update() when nodes come out of limbo,
  - automatically delete in-limbo nodes 3 seconds after the last
    bus reset and bus rescan.
  - Because of the automatic removal, the now obsolete bus attribute
    /sys/bus/ieee1394/destroy_node is removed.

This especially lets sbp2 survive brief disconnections.  You can for
example yank a disk's cable and plug it back in while reading the
respective disk with dd, but dd will happily continue as if nothing
happened.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: nodemgr clean up class iterators
Stefan Richter [Tue, 19 Aug 2008 19:29:23 +0000 (21:29 +0200)]
ieee1394: nodemgr clean up class iterators

Remove useless pointer type casts.
Remove unnecessary hi->host indirection where only host is used.
Remove an unnecessary WARN_ON.
Change a few names.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: dv1394, video1394: remove unnecessary expressions
Stefan Richter [Thu, 11 Sep 2008 17:22:53 +0000 (19:22 +0200)]
ieee1394: dv1394, video1394: remove unnecessary expressions

init->channel and v.buffer are unsigned and tests for < 0 therefore
always false.  gcc knows this and eliminates the code, but anyway...
Reported by Roel Kluin.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: raw1394: make write() thread-safe
Stefan Richter [Fri, 15 Aug 2008 22:15:16 +0000 (00:15 +0200)]
ieee1394: raw1394: make write() thread-safe

Application programs should use a libraw1394 handle only in a single
thread.  The raw1394 driver was apparently relying on this, because it
did nothing to protect its fi->state variable from corruption due to
concurrent accesses.

We now serialize the fi->state accesses.  This affects the write() path.
We re-use the state_mutex which was introduced to protect fi->iso_state
accesses in the ioctl() path.  These paths and accesses are independent
of each other, hence separate mutexes could be used.  But I don't see
much benefit in that.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: raw1394: narrow down the state_mutex protected region
Stefan Richter [Sat, 16 Aug 2008 15:52:04 +0000 (17:52 +0200)]
ieee1394: raw1394: narrow down the state_mutex protected region

Refactor the ioctl dispatcher in order to move a fraction of it out of
the section which is serialized by fi->state_mutex.  This is not so much
about performance but more about self-documentation:  The mutex_lock()/
mutex_unlock() calls are now closer to the data accesses which the mutex
protects, i.e. to the iso_state switch.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: raw1394: replace BKL by local mutex, make ioctl() and mmap() thread-safe
Stefan Richter [Fri, 15 Aug 2008 22:11:48 +0000 (00:11 +0200)]
ieee1394: raw1394: replace BKL by local mutex, make ioctl() and mmap() thread-safe

This removes the last usage of the Big Kernel Lock from the ieee1394
stack, i.e. from raw1394's (unlocked_)ioctl and compat_ioctl.

The ioctl()s don't need to take the BKL, but they need to be serialized
per struct file *.  In particular, accesses to ->iso_state need to be
serial.  We simply use a blocking mutex for this purpose because
libraw1394 does not use O_NONBLOCK.  In practice, there is no lock
contention anyway because most if not all libraw1394 clients use a
libraw1394 handle only in a single thread.

mmap() also accesses ->iso_state.  Until now this was unprotected
against concurrent changes by ioctls.  Fix this bug while we are at it.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: sbp2: enforce s/g segment size limit
Stefan Richter [Thu, 14 Aug 2008 07:28:14 +0000 (09:28 +0200)]
ieee1394: sbp2: enforce s/g segment size limit

1. We don't need to round the SBP-2 segment size limit down to a
   multiple of 4 kB (0xffff -> 0xf000).  It is only necessary to
   ensure quadlet alignment (0xffff -> 0xfffc).

2. Use dma_set_max_seg_size() to tell the DMA mapping infrastructure
   and the block IO layer about the restriction.  This way we can
   remove the size checks and segment splitting in the queuecommand
   path.

   This assumes that no other code in the ieee1394 stack uses
   dma_map_sg() with conflicting requirements.  It furthermore assumes
   that the controller device's platform actually allows us to set the
   segment size to our liking.  Assert the latter with a BUG_ON().

3. Also use blk_queue_max_segment_size() to tell the block IO layer
   about it.  It cannot know it because our scsi_add_host() does not
   point to the FireWire controller's device.

We can also uniformly use dma_map_sg() for the single segment case just
like for the multi segment case, to further simplify the code.

Also clean up how the page table is converted to big endian.

Thanks to Grant Grundler and FUJITA Tomonori for advice.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: sbp2: check for DMA mapping failures
Stefan Richter [Sat, 9 Aug 2008 18:16:24 +0000 (20:16 +0200)]
ieee1394: sbp2: check for DMA mapping failures

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: sbp2: stricter dma_sync
Stefan Richter [Sat, 9 Aug 2008 18:13:00 +0000 (20:13 +0200)]
ieee1394: sbp2: stricter dma_sync

Two dma_sync_single_for_cpu() were called in the wrong place.
Luckily they were merely for DMA_TO_DEVICE, hence nobody noticed.

Also reorder the matching dma_sync_single_for_device() a little bit
so that they reside in the same functions as their counterparts.
This also avoids syncing the s/g table for requests which don't use it.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: Use DIV_ROUND_UP
Julia Lawall [Sat, 2 Aug 2008 15:13:09 +0000 (17:13 +0200)]
ieee1394: Use DIV_ROUND_UP

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoMerge branch 'oprofile/x86-oprofile-for-tip' into oprofile/oprofile-for-tip
Robert Richter [Wed, 15 Oct 2008 20:19:41 +0000 (22:19 +0200)]
Merge branch 'oprofile/x86-oprofile-for-tip' into oprofile/oprofile-for-tip

Conflicts:
arch/x86/oprofile/op_model_ppro.c

17 years agoMerge branch 'next'
Trond Myklebust [Wed, 15 Oct 2008 19:54:56 +0000 (15:54 -0400)]
Merge branch 'next'

17 years agox86/oprofile: add the logic for enabling additional IBS bits
Suravee Suthikulpanit [Wed, 15 Oct 2008 13:15:51 +0000 (08:15 -0500)]
x86/oprofile: add the logic for enabling additional IBS bits

This patch adds the logic for enabling additional IBS control bits :
* IBS-Fetch IbsRandEn bit (bit 57)
* IBS-Op IbsOpCntCtl bit (bit 19)

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
17 years agox86/oprofile: reordering functions in nmi_int.c
Robert Richter [Fri, 5 Sep 2008 10:17:40 +0000 (12:17 +0200)]
x86/oprofile: reordering functions in nmi_int.c

No functional changes. The intension is to remove static function
declarations.

Signed-off-by: Robert Richter <robert.richter@amd.com>
17 years agox86/oprofile: removing unused function parameter in add_ibs_begin()
Robert Richter [Mon, 28 Jul 2008 16:13:10 +0000 (18:13 +0200)]
x86/oprofile: removing unused function parameter in add_ibs_begin()

Signed-off-by: Robert Richter <robert.richter@amd.com>
17 years agooprofile: more whitespace fixes
Robert Richter [Fri, 5 Sep 2008 15:12:36 +0000 (17:12 +0200)]
oprofile: more whitespace fixes

Signed-off-by: Robert Richter <robert.richter@amd.com>
17 years agooprofile: whitespace fixes
Robert Richter [Fri, 5 Sep 2008 15:12:36 +0000 (17:12 +0200)]
oprofile: whitespace fixes

Signed-off-by: Robert Richter <robert.richter@amd.com>
17 years agoOProfile: Rename IBS sysfs dir into "ibs_op"
Robert Richter [Tue, 29 Jul 2008 14:57:10 +0000 (16:57 +0200)]
OProfile: Rename IBS sysfs dir into "ibs_op"

The new name is now more close to those used in the spec.

Signed-off-by: Robert Richter <robert.richter@amd.com>
17 years agoOProfile: Rework string handling in setup_ibs_files()
Robert Richter [Fri, 18 Jul 2008 15:56:05 +0000 (17:56 +0200)]
OProfile: Rework string handling in setup_ibs_files()

Signed-off-by: Robert Richter <robert.richter@amd.com>
17 years agoOProfile: Rework oprofile_add_ibs_sample() function
Robert Richter [Fri, 18 Jul 2008 15:36:20 +0000 (17:36 +0200)]
OProfile: Rework oprofile_add_ibs_sample() function

Code looks much more cleaner now.

Signed-off-by: Robert Richter <robert.richter@amd.com>
17 years agosched: only update rq->clock while holding rq->lock
Peter Zijlstra [Wed, 15 Oct 2008 18:37:23 +0000 (20:37 +0200)]
sched: only update rq->clock while holding rq->lock

Vatsa noticed rq->clock going funny and tracked it down to an update_rq_clock()
outside a rq->lock section.

This is a problem because things like double_rq_lock() update the rq->clock
value for both rqs. Therefore disabling interrupts isn't strong enough.

Reported-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoRDMA/cxgb3: Remove cmid reference on tid allocation failures
Steve Wise [Wed, 15 Oct 2008 17:50:34 +0000 (10:50 -0700)]
RDMA/cxgb3: Remove cmid reference on tid allocation failures

The error path in iwch_connect() can fail to drop the cmid reference,
which will cause the process to hang when destroying the cmid.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Wed, 15 Oct 2008 17:22:21 +0000 (10:22 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  MIPS: Kill unused <asm/debug.h> inclusions
  MIPS: IP32: Add platform device for CMOS RTC; remove dead code
  RTC: M48T35: new RTC driver
  MIPS: IP27: Switch over to RTC class driver
  MIPS: DS1286: New RTC driver
  MIPS: IP22/28: Switch over to RTC class driver
  MIPS: PCI: Scan busses when they are registered
  MIPS: WGT634U: Add reset button support
  MIPS: BCM47xx: Use the new SSB GPIO API
  MIPS: BCM47xx: Remove references to BCM947XX
  MIPS: WGT634U: Add machine detection message
  MIPS: Align .data.cacheline_aligned based on CONFIG_MIPS_L1_CACHE_SHIFT
  MIPS: show_cpuinfo prints the type of the calling CPU
  MIPS: Fix wrong branch target in new spin_lock code.
  MIPS: Have a heart for a lonely, lost header file ...

17 years agotty: make sure that proc_clear_tty stores the cpu flags
Arjan van de Ven [Wed, 15 Oct 2008 09:52:34 +0000 (10:52 +0100)]
tty: make sure that proc_clear_tty stores the cpu flags

proc_clear_tty() gets called with interrupts off (while holding the task list
lock) from sys_setid. This means that it needs the _irqsave version of the
locking primitives.

Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Tested-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agometronomefb: Fix warning when building 64bit
Alan Cox [Wed, 15 Oct 2008 09:50:32 +0000 (10:50 +0100)]
metronomefb: Fix warning when building 64bit

The metronome driver produces warnings when built on x86-64 as it assumes that
size_t is an int. Use %Zd instead.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agopowerpc/mpc5200: Refactor FEC mdio read/write routines
Wolfram Sang [Wed, 15 Oct 2008 17:10:00 +0000 (11:10 -0600)]
powerpc/mpc5200: Refactor FEC mdio read/write routines

Read & write functions now call a generic transfer function, so identical
code in both routines could be eliminated. The result is easier to maintain
and smaller in source and binary code. Also, fix some checkpatch warnings.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
17 years agopowerpc/mpc5200: Don't touch pipelining for MPC5200B
Wolfram Sang [Wed, 15 Oct 2008 17:09:59 +0000 (11:09 -0600)]
powerpc/mpc5200: Don't touch pipelining for MPC5200B

MPC5200 needs to have pipelining disabled for ATA to work. MPC5200B does not.
So, for the latter, don't touch the original setting from the bootloader.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
17 years agopowerpc/52xx: Make cuImage more robust in locating immr node.
Grant Likely [Wed, 15 Oct 2008 17:09:59 +0000 (11:09 -0600)]
powerpc/52xx: Make cuImage more robust in locating immr node.

Current device trees do not have the device_type = soc property set
anymore.  Fix up the cuImage bootwrapper fragment to still find the IMMR
nodes.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
17 years agoxfs: fix remount rw with unrecognized options
Christoph Hellwig [Sun, 12 Oct 2008 12:30:44 +0000 (14:30 +0200)]
xfs: fix remount rw with unrecognized options

When we skip unrecognized options in xfs_fs_remount we should just break
out of the switch and not return because otherwise we may skip clearing
the xfs-internal read-only flag.  This will only show up on some
operations like touch because most read-only checks are done by the VFS
which thinks this filesystem is r/w.  Eventually we should replace the
XFS read-only flag with a helper that always checks the VFS flag to make
sure they can never get out of sync.

Bug reported and fix verified by Marcel Beister on #xfs.
Bug fix verified by updated xfstests/189.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Timothy Shimmin <tes@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agox86: fix compat-vdso
Suresh Siddha [Wed, 15 Oct 2008 14:46:27 +0000 (07:46 -0700)]
x86: fix compat-vdso

Jeff Chua reported that this patch:

> -#define PTE_IDENT_ATTR  0x007          /* PRESENT+RW+USER */
> -#define PDE_IDENT_ATTR  0x067          /* PRESENT+RW+USER+DIRTY+ACCESSED */
> +#define PTE_IDENT_ATTR  0x003          /* PRESENT+RW */
> +#define PDE_IDENT_ATTR  0x063          /* PRESENT+RW+DIRTY+ACCESSED */

broke kernels with CONFIG_COMPAT_VDSO set with this init segfault:

init[1]: segfault at ffffe01c up b7f0dc28 sp bfc26628 error 5 in ld-2.7.90.so[b7f0b000+1c000]

Include USER bit in the PDE_IDENT_ATTR only, as the protection bits
are combined from the PDE and PTE entries. This will allow the high
mapped VDSO page in the case of CONFIG_COMPAT_VDSO to be user
readable.

Reported-by: Jeff Chua <jeff.chua.linux@gmail.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Tested-by: Jeff Chua <jeff.chua.linux@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agos3cmci: Add Ben Dooks/Simtec Electronics to header & copyright
ben@fluff.org.uk [Tue, 14 Oct 2008 23:17:19 +0000 (00:17 +0100)]
s3cmci: Add Ben Dooks/Simtec Electronics to header & copyright

Since the original authour (Thomas Kleffel) has been too busy to
merge the s3cmci driver and keep it up to date, I (mostly as part
of my role with Simtec Electronics) got the driver to a mergable
state and have been maintaining it since I think that I should
be added to the header. Also add a copyright statement for the
new work.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agos3cmci: fix continual accesses to host->pio_ptr
ben@fluff.org.uk [Tue, 14 Oct 2008 23:17:18 +0000 (00:17 +0100)]
s3cmci: fix continual accesses to host->pio_ptr

The s3cmci driver uses the host->pio_ptr field to
point to the current position into the buffer for data
transfer. During the transfers it does the following:

while (fifo_words--)
*(host->pio_ptr++) = readl(from_ptr);

This is inefficent, as host->pio_ptr is not used in any
other part of the transfer but the compiler emits code
which does the following:

while (fifo_words--) {
u32 *ptr = host->pio_ptr;
*ptr = readl(from_ptr);
ptr++;
host->pio_ptr = ptr;
}

This is obviously a waste of a load and store each time
around the loop, which could be up to 16 times depending
on how much needs to be transfered.

Move the ptr accesses to outside the while loop so that
we do not end up reloading/re-writing the pointer.

Note, this seems to make the code 16 bytes larger.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agos3cmci: Support transfers which are not multiple of 32 bits.
Christer Weinigel [Tue, 14 Oct 2008 23:17:17 +0000 (00:17 +0100)]
s3cmci: Support transfers which are not multiple of 32 bits.

To be able to do SDIO the s3cmci driver has to support non-word-sized
transfers.  Change pio_words into pio_bytes and fix up all the places
where it is used.

This variant of the patch will not overrun the buffer when reading an
odd number of bytes.  When writing, this variant will still read past
the end of the buffer, but since the driver can't support non-word-
aligned transfers anyway, this should not be a problem, since a
word-aligned transfer will never cross a page boundary.

This has been tested with a CSR SDIO Bluetooth Type A device on a
Samsung S3C24A0 processor.

Signed-off-by: Christer Weinigel <christer@weinigel.se>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agos3cmci: cpufreq support
ben@fluff.org.uk [Tue, 14 Oct 2008 23:17:16 +0000 (00:17 +0100)]
s3cmci: cpufreq support

Support for cpu frequency changing.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agos3cmci: Make general protocol errors less noisy
ben@fluff.org.uk [Tue, 14 Oct 2008 23:17:15 +0000 (00:17 +0100)]
s3cmci: Make general protocol errors less noisy

General errors, such as timeouts during probe do not need to
be sent to the console, so move them down to be included if the
debug is enabled.

Such errors include:
s3c2440-sdi s3c2440-sdi: s3cmci_request: no medium present

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agoMerge branch 'build_fix' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh...
Linus Torvalds [Wed, 15 Oct 2008 15:08:57 +0000 (08:08 -0700)]
Merge branch 'build_fix' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2

* 'build_fix' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  ocfs2: fix build error

17 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Wed, 15 Oct 2008 15:07:35 +0000 (08:07 -0700)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (158 commits)
  powerpc: Fix CHRP PCI config access for indirect_pci
  powerpc/chrp: Fix detection of Python PCI host bridge on IBM CHRPs
  powerpc: Fix 32-bit SMP boot on CHRP
  powerpc: Fix link errors on 32-bit machines using legacy DMA
  powerpc/pci: Improve detection of unassigned bridge resources
  hvc_console: Fix free_irq in spinlocked section
  powerpc: Get USE_STRICT_MM_TYPECHECKS working again
  powerpc: Reflect the used arguments in machine_init() prototype
  powerpc: Fix DMA offset for non-coherent DMA
  powerpc: fix fsl_upm nand driver modular build
  powerpc/83xx: add NAND support for the MPC8360E-RDK boards
  powerpc: FPGA support for GE Fanuc SBC610
  i2c: MPC8349E-mITX Power Management and GPIO expander driver
  powerpc: reserve two DMA channels for audio in MPC8610 HPCD device tree
  powerpc: document the "fsl,ssi-dma-channel" compatible property
  powerpc: disable CHRP and PMAC support in various defconfigs
  OF: add fsl,mcu-mpc8349emitx to the exception list
  powerpc/83xx: add DS1374 RTC support for the MPC837xE-MDS boards
  powerpc: remove support for bootmem-allocated memory for the DIU driver
  powerpc: remove non-dependent load fsl_booke PTE_64BIT
  ...

17 years agoMerge branches 'topic/misc-fixes', 'topic/hda' and 'topic/asoc' into for-linus
Takashi Iwai [Wed, 15 Oct 2008 14:18:19 +0000 (16:18 +0200)]
Merge branches 'topic/misc-fixes', 'topic/hda' and 'topic/asoc' into for-linus

17 years agoDECLARE_PER_CPU needs linux/percpu.h
Stephen Rothwell [Wed, 15 Oct 2008 03:20:28 +0000 (14:20 +1100)]
DECLARE_PER_CPU needs linux/percpu.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>