GitHub/LineageOS/android_kernel_motorola_exynos9610.git
17 years ago[POWERPC] Quiet section mismatch warning on pcibios_setup
Stephen Rothwell [Sat, 21 Jul 2007 14:37:38 +0000 (00:37 +1000)]
[POWERPC] Quiet section mismatch warning on pcibios_setup

WARNING: vmlinux.o(.text+0x1cefcc): Section mismatch: reference to .init.text:.pcibios_setup (between '.pci_setup' and '.pci_init')

pci_setup() is marked __devinit and calls pcibios_setup.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] init and exit markings for hvc_iseries
Stephen Rothwell [Sat, 21 Jul 2007 14:33:11 +0000 (00:33 +1000)]
[POWERPC] init and exit markings for hvc_iseries

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Quiet section mismatch in hvc_rtas.c
Stephen Rothwell [Sat, 21 Jul 2007 14:31:28 +0000 (00:31 +1000)]
[POWERPC] Quiet section mismatch in hvc_rtas.c

WARNING: vmlinux.o(.text+0x2066f0): Section mismatch: reference to .init.text:.add_preferred_console (between '.hvc_rtas_console_init' and '.hvc_beat_put_chars')

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Constify of_platform_driver match_table
Stephen Rothwell [Sat, 21 Jul 2007 14:27:01 +0000 (00:27 +1000)]
[POWERPC] Constify of_platform_driver match_table

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] hvcs: Make some things static and const
Stephen Rothwell [Sat, 21 Jul 2007 14:25:00 +0000 (00:25 +1000)]
[POWERPC] hvcs: Make some things static and const

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Constify of_platform_driver name
Stephen Rothwell [Sat, 21 Jul 2007 14:23:03 +0000 (00:23 +1000)]
[POWERPC] Constify of_platform_driver name

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] MPIC protected sources
Benjamin Herrenschmidt [Fri, 20 Jul 2007 23:55:21 +0000 (09:55 +1000)]
[POWERPC] MPIC protected sources

Some HW platforms, such as the new cell blades, requires some MPIC sources
to be left alone by the operating system. This implements support for
a "protected-sources" property in the mpic controller node containing a list
of source numbers to be protected against operating system interference.

For those interested in the gory details, the MPIC on the southbridge of
those blades has some of the processor outputs routed to the cell, and
at least one routed as a GPIO to the service processor. It will be used
in the GA product for routing some of the southbridge error interrupts
to the service processor which implements some of the RAS stuff, such
as checkstopping when fatal errors occurs before they can propagate.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] of_detach_node()'s device node argument cannot be const
Segher Boessenkool [Fri, 20 Jul 2007 05:58:38 +0000 (15:58 +1000)]
[POWERPC] of_detach_node()'s device node argument cannot be const

...since it modifies it (when it sets the OF_DETACHED flag).

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Fix ARCH=ppc builds
Josh Boyer [Fri, 20 Jul 2007 03:11:10 +0000 (13:11 +1000)]
[POWERPC] Fix ARCH=ppc builds

The recent signal rework broke ARCH=ppc builds with the following
error:

CC      arch/powerpc/kernel/signal.o
arch/powerpc/kernel/signal.c: In function Â\91do_signalÂ\92:
arch/powerpc/kernel/signal.c:142: error: implicit declaration of
function Â\91set_dabrÂ\92
make[1]: *** [arch/powerpc/kernel/signal.o] Error 1

This fixes it by including a function prototype in asm-ppc/system.h.

Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] mv64x60: Use mutex instead of semaphore
Christoph Hellwig [Thu, 19 Jul 2007 21:50:49 +0000 (07:50 +1000)]
[POWERPC] mv64x60: Use mutex instead of semaphore

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Allow smp_call_function_single() to current cpu
Avi Kivity [Thu, 19 Jul 2007 15:33:48 +0000 (01:33 +1000)]
[POWERPC] Allow smp_call_function_single() to current cpu

This removes the requirement for callers to get_cpu() to check in simple
cases.  i386 and x86_64 already received a similar treatment.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Allow exec faults on readable areas on classic 32-bit PowerPC
Paul Mackerras [Thu, 19 Jul 2007 00:00:20 +0000 (10:00 +1000)]
[POWERPC] Allow exec faults on readable areas on classic 32-bit PowerPC

Classic 32-bit PowerPC CPUs, and the early 64-bit PowerPC CPUs, don't
provide a way to prevent execution from readable pages, that is, the
MMU doesn't distinguish between data reads and instruction reads,
although a different exception is taken for faults in data accesses
and instruction accesses.

Commit 9ba4ace39fdfe22268daca9f28c5df384ae462cf, in the course of
fixing another bug, added a check that meant that a page fault due
to an instruction access would fail if the vma did not have the
VM_EXEC flag set.  This gives an inconsistent enforcement on these
CPUs of the no-execute status of the vma (since reading from the page
is sufficient to allow subsequent execution from it), and causes old
versions of ppc32 glibc (2.2 and earlier) to fail, since they rely
on executing the word before the GOT but don't have it marked
executable.

This fixes the problem by allowing execution from readable (or writable)
areas on CPUs which do not provide separate control over data and
instruction reads.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Jon Loeliger <jdl@freescale.com>
17 years ago[POWERPC] Fix future firmware feature fixups function failure
Michael Neuling [Wed, 18 Jul 2007 21:56:32 +0000 (07:56 +1000)]
[POWERPC] Fix future firmware feature fixups function failure

Move firmware feature initialisation from pSeries_init_early to the
earlier pSeries_probe_hypertas so they are initialised before firmware
feature fixups are applied.

Currently firmware feature sections are only used for iSeries which
initialises the these features much earlier.  This is a bug in waiting
on pSeries.

Also adds some whitespace fixups.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] fix showing xmon help
Ishizaki Kou [Wed, 18 Jul 2007 09:26:40 +0000 (19:26 +1000)]
[POWERPC] fix showing xmon help

In some configuration, xmon help string is larger than xmon_printf
buffer.  We need not to use printf.  This patch adds xmon_puts and
change to use it to show help string.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Make xmon_write accept a const buffer
Ishizaki Kou [Wed, 18 Jul 2007 09:30:29 +0000 (19:30 +1000)]
[POWERPC] Make xmon_write accept a const buffer

Because xmon_write doesn't change the buffer, we should add 'const'
qualifier to the argument which points it.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Fix misspelled "CONFIG_CHECK_CACHE_COHERENCY" Kconfig option.
Robert P. J. Day [Tue, 17 Jul 2007 22:21:29 +0000 (08:21 +1000)]
[POWERPC] Fix misspelled "CONFIG_CHECK_CACHE_COHERENCY" Kconfig option.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] cell: CONFIG_SPE_BASE is a typo
Geert Uytterhoeven [Mon, 16 Jul 2007 16:35:38 +0000 (02:35 +1000)]
[POWERPC] cell: CONFIG_SPE_BASE is a typo

The config symbol for SPE support is called CONFIG_SPU_BASE, not
CONFIG_SPE_BASE.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years agoKVM: MMU: Fix cleaning up the shadow page allocation cache
Avi Kivity [Sat, 21 Jul 2007 06:06:46 +0000 (09:06 +0300)]
KVM: MMU: Fix cleaning up the shadow page allocation cache

__free_page() wants a struct page, not a virtual address.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
Linus Torvalds [Sat, 21 Jul 2007 01:10:03 +0000 (18:10 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  sdhci: make sure to clear the error interrupt
  mmc: at91_mci: wakeup on card insertion (or removal)
  mmc: add maintainer for at91

17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Sat, 21 Jul 2007 00:35:25 +0000 (17:35 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/sparc-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: fix section mismatch warning in mdesc.c
  [SPARC64]: fix section mismatch warning in pci_sunv4
  [SPARC64]: Stop using drivers/char/rtc.c
  [SPARC64]: Convert parport to of_platform_driver.
  [SPARC]: Implement fb_is_primary_device().
  [SPARC64]: Fix virq decomposition.
  [SPARC64]: Use KERN_ERR in IRQ manipulation error printks.
  [SPARC64]: Do not flood log with failed DS messages.
  [SPARC64]: Add proper multicast support to VNET driver.
  [SPARC64]: Handle multiple domain-services-port nodes properly.
  [SPARC64]: Improve VIO device naming further.
  [SPARC]: Make sure dev_archdata is filled in for all devices.
  [SPARC]: Define minimal struct dev_archdata, similarly to sparc64.
  [SPARC]: Fix serial console device detection.

17 years ago[SPARC64]: fix section mismatch warning in mdesc.c
Sam Ravnborg [Sat, 21 Jul 2007 00:20:56 +0000 (17:20 -0700)]
[SPARC64]: fix section mismatch warning in mdesc.c

Fix following warning:
WARNING: vmlinux.o(.text+0x35264): Section mismatch: reference to .init.text:__alloc_bootmem (between 'mdesc_bootmem_alloc' and 'mdesc_bootmem_free')

Rename mdesc_mem_ops to *_ops so modpost ignores __init references
and declare mdesc_bootmem_alloc __init since it is only used
during __init context.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: fix section mismatch warning in pci_sunv4
Sam Ravnborg [Sat, 21 Jul 2007 00:19:56 +0000 (17:19 -0700)]
[SPARC64]: fix section mismatch warning in pci_sunv4

Fix following warning:
WARNING: vmlinux.o(.text+0x3cf50): Section mismatch: reference to .init.text:page_in_phys_avail (between 'pci_sun4v_pbm_init' and 'sun4v_pci_init')

pci_sun4v_pbm_init and sun4v_pci_init was only used under __init
context so declare them _init.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Stop using drivers/char/rtc.c
David S. Miller [Thu, 19 Jul 2007 20:59:58 +0000 (13:59 -0700)]
[SPARC64]: Stop using drivers/char/rtc.c

The existing sparc64 mini_rtc driver can handle CMOS based
rtcs trivially with just a few lines of code and the simplifies
things tremendously.

Tested on SB1500.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Convert parport to of_platform_driver.
David S. Miller [Thu, 19 Jul 2007 06:15:04 +0000 (23:15 -0700)]
[SPARC64]: Convert parport to of_platform_driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC]: Implement fb_is_primary_device().
David S. Miller [Thu, 19 Jul 2007 05:03:58 +0000 (22:03 -0700)]
[SPARC]: Implement fb_is_primary_device().

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Fix virq decomposition.
David S. Miller [Fri, 20 Jul 2007 09:58:28 +0000 (02:58 -0700)]
[SPARC64]: Fix virq decomposition.

The dev_handle and dev_ino fields don't match up exactly to
the traditional IMAP_IGN and IMAP_INO masks.

So store them away in a table and look them up directly.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Use KERN_ERR in IRQ manipulation error printks.
David S. Miller [Fri, 20 Jul 2007 09:39:04 +0000 (02:39 -0700)]
[SPARC64]: Use KERN_ERR in IRQ manipulation error printks.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Do not flood log with failed DS messages.
David S. Miller [Fri, 20 Jul 2007 09:34:41 +0000 (02:34 -0700)]
[SPARC64]: Do not flood log with failed DS messages.

When booting up a control node it's quite common to
not be able to register several service types.

And likewise on guests at least one or two are going
to not be there.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Add proper multicast support to VNET driver.
David S. Miller [Fri, 20 Jul 2007 09:30:25 +0000 (02:30 -0700)]
[SPARC64]: Add proper multicast support to VNET driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Handle multiple domain-services-port nodes properly.
David S. Miller [Fri, 20 Jul 2007 06:25:35 +0000 (23:25 -0700)]
[SPARC64]: Handle multiple domain-services-port nodes properly.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Improve VIO device naming further.
David S. Miller [Fri, 20 Jul 2007 05:51:07 +0000 (22:51 -0700)]
[SPARC64]: Improve VIO device naming further.

The best scheme to get uniqueness seems to be:

FOO -- If node lacks "id" property
FOO-$(ID) -- If node has "id" but parent lacks "cfg-handle"
FOO-$(ID)-$(CFG_HANDLE) -- If node has both

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC]: Make sure dev_archdata is filled in for all devices.
David S. Miller [Thu, 19 Jul 2007 05:03:25 +0000 (22:03 -0700)]
[SPARC]: Make sure dev_archdata is filled in for all devices.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC]: Define minimal struct dev_archdata, similarly to sparc64.
David S. Miller [Thu, 19 Jul 2007 03:59:54 +0000 (20:59 -0700)]
[SPARC]: Define minimal struct dev_archdata, similarly to sparc64.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC]: Fix serial console device detection.
David S. Miller [Fri, 20 Jul 2007 23:59:26 +0000 (16:59 -0700)]
[SPARC]: Fix serial console device detection.

The current scheme works on static interpretation of text names, which
is wrong.

The output-device setting, for example, must be resolved via an alias
or similar to a full path name to the console device.

Paths also contain an optional set of 'options', which starts with a
colon at the end of the path.  The option area is used to specify
which of two serial ports ('a' or 'b') the path refers to when a
device node drives multiple ports.  'a' is assumed if the option
specification is missing.

This was caught by the UltraSPARC-T1 simulator.  The 'output-device'
property was set to 'ttya' and we didn't pick upon the fact that this
is an OBP alias set to '/virtual-devices/console'.  Instead we saw it
as the first serial console device, instead of the hypervisor console.

The infrastructure is now there to take advantage of this to resolve
the console correctly even in multi-head situations in fbcon too.

Thanks to Greg Onufer for the bug report.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoMerge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Fri, 20 Jul 2007 21:54:35 +0000 (14:54 -0700)]
Merge branch 'master' of ssh:///linux/kernel/git/mchehab/v4l-dvb

* 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (5880): wm8775/wm8739: Fix memory leak when unloading module
  V4L/DVB (5877): radio-gemtek-pci: remove unused structure member
  V4L/DVB (5871): Conexant 2388x: check for kthread_run
  V4L/DVB (5869): Add check for valid control ID to v4l2_ctrl_next.
  V4L/DVB (5867): videodev2.h: add missing <sys/time.h> for userspace
  V4L/DVB (5866): ivtv: fix DMA timeout when capturing VBI + another stream
  V4L/DVB (5865): Remove usage of HZ on ivtv driver, replacing by msecs_to_jiffies
  V4L/DVB (5861): Use msecs_to_jiffies instead of HZ on bttv, cx88 and saa7134
  V4L/DVB (5860): Use msecs_to_jiffies instead of HZ on some webcam drivers
  V4L/DVB (5859): use msecs_to_jiffies on InfraRed RC5 timeout
  V4L/DVB (5858): Use msecs_to_jiffies instead of HZ on media/video I2C drivers
  V4L/DVB (5857): Use msecs_to_jiffies instead of HZ on radio drivers
  V4L/DVB (5855): ivtv: fix Kconfig typo and refer to the driver homepage.
  V4L/DVB (5854): ivtv: cleanup of driver messages
  V4L/DVB (5853): ivtv: add support to suppress high volume i2c debug messages.
  V4L/DVB (5852): ivtv: don't recompile needlessly
  V4L/DVB (5851): ivtv: fix missing I2C_ALGOBIT config option
  V4L/DVB (5850): ivtv: improve API command debugging
  V4L/DVB (5848): Av7110: fix typo

17 years agoUn-ignore "vmlinux.lds.S" in .gitignore
Linus Torvalds [Fri, 20 Jul 2007 21:53:52 +0000 (14:53 -0700)]
Un-ignore "vmlinux.lds.S" in .gitignore

We ignore all the generated files called "vmlinux*" from the top-level
gitignore, but that also ends up catching a few files that we track, and
that people do edit.  Notably the "vmlinux.lds.S" file, that each
architecture has.

You can always use "git add -f" to override the ignore file, but we
might as well just make it explicit for this file.

Bitten-by-and-tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'for-2.6.23' of master.kernel.org:/pub/scm/linux/kernel/git/arnd/cell-2.6
Linus Torvalds [Fri, 20 Jul 2007 20:45:53 +0000 (13:45 -0700)]
Merge branch 'for-2.6.23' of /linux/kernel/git/arnd/cell-2.6

* 'for-2.6.23' of master.kernel.org:/pub/scm/linux/kernel/git/arnd/cell-2.6: (37 commits)
  [CELL] spufs: rework list management and associated locking
  [CELL] oprofile: add support to OProfile for profiling CELL BE SPUs
  [CELL] oprofile: enable SPU switch notification to detect currently active SPU tasks
  [CELL] spu_base: locking cleanup
  [CELL] cell: indexing of SPUs based on firmware vicinity properties
  [CELL] spufs: integration of SPE affinity with the scheduller
  [CELL] cell: add placement computation for scheduling of affinity contexts
  [CELL] spufs: extension of spu_create to support affinity definition
  [CELL] cell: add hardcoded spu vicinity information for QS20
  [CELL] cell: add vicinity information on spus
  [CELL] cell: add per BE structure with info about its SPUs
  [CELL] spufs: use find_first_bit() instead of sched_find_first_bit()
  [CELL] spufs: remove unused file argument from spufs_run_spu()
  [CELL] spufs: change decrementer restore timing
  [CELL] spufs: dont halt decrementer at restore step 47
  [CELL] spufs: limit saving MFC_CNTL bits
  [CELL] spufs: fix read and write for decr_status file
  [CELL] spufs: fix decr_status meanings
  [CELL] spufs: remove needless context save/restore code
  [CELL] spufs: fix array size of channel index
  ...

17 years agoV4L/DVB (5880): wm8775/wm8739: Fix memory leak when unloading module
Hans Verkuil [Fri, 20 Jul 2007 09:25:22 +0000 (06:25 -0300)]
V4L/DVB (5880): wm8775/wm8739: Fix memory leak when unloading module

State struct was never freed.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5877): radio-gemtek-pci: remove unused structure member
Trent Piepho [Fri, 20 Jul 2007 07:11:36 +0000 (04:11 -0300)]
V4L/DVB (5877): radio-gemtek-pci: remove unused structure member

The drivers reads the PCI subsystem ID into its state structure, but it's
never used anywhere.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5871): Conexant 2388x: check for kthread_run
Cyrill Gorcunov [Thu, 19 Jul 2007 14:44:11 +0000 (11:44 -0300)]
V4L/DVB (5871): Conexant 2388x: check for kthread_run

The patch adds checking of kthread_run return code and issues a message
if it fails.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5869): Add check for valid control ID to v4l2_ctrl_next.
Hans Verkuil [Thu, 19 Jul 2007 07:53:36 +0000 (04:53 -0300)]
V4L/DVB (5869): Add check for valid control ID to v4l2_ctrl_next.

If v4l2_ctrl_next is called without the V4L2_CTRL_FLAG_NEXT_CTRL then it
should check whether the passed control ID is valid and return 0 if it
isn't. Otherwise a for-loop over the control IDs will never end.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5867): videodev2.h: add missing <sys/time.h> for userspace
Hans Verkuil [Wed, 18 Jul 2007 21:41:08 +0000 (18:41 -0300)]
V4L/DVB (5867): videodev2.h: add missing <sys/time.h> for userspace

When videodev2.h is included by an application, it needs to include
<sys/time.h> for the timeval struct.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5866): ivtv: fix DMA timeout when capturing VBI + another stream
Hans Verkuil [Wed, 18 Jul 2007 16:22:06 +0000 (13:22 -0300)]
V4L/DVB (5866): ivtv: fix DMA timeout when capturing VBI + another stream

The VBI DMA is handled in a special way and is marked with a bit.
However, that bit was set at the wrong time and could be cleared
by mistake if a PCM (or other) DMA request would arrive before the
VBI DMA was completed. So on completion of the VBI DMA the driver
no longer knew that that DMA transfer was for VBI data. And this
in turn caused havoc with the card's DMA engine.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5865): Remove usage of HZ on ivtv driver, replacing by msecs_to_jiffies
Mauro Carvalho Chehab [Thu, 19 Jul 2007 14:21:04 +0000 (11:21 -0300)]
V4L/DVB (5865): Remove usage of HZ on ivtv driver, replacing by msecs_to_jiffies

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5861): Use msecs_to_jiffies instead of HZ on bttv, cx88 and saa7134
Mauro Carvalho Chehab [Tue, 17 Jul 2007 19:36:20 +0000 (16:36 -0300)]
V4L/DVB (5861): Use msecs_to_jiffies instead of HZ on bttv, cx88 and saa7134

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5860): Use msecs_to_jiffies instead of HZ on some webcam drivers
Mauro Carvalho Chehab [Tue, 17 Jul 2007 19:29:07 +0000 (16:29 -0300)]
V4L/DVB (5860): Use msecs_to_jiffies instead of HZ on some webcam drivers

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5859): use msecs_to_jiffies on InfraRed RC5 timeout
Mauro Carvalho Chehab [Tue, 17 Jul 2007 19:27:30 +0000 (16:27 -0300)]
V4L/DVB (5859): use msecs_to_jiffies on InfraRed RC5 timeout

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5858): Use msecs_to_jiffies instead of HZ on media/video I2C drivers
Mauro Carvalho Chehab [Tue, 17 Jul 2007 19:25:38 +0000 (16:25 -0300)]
V4L/DVB (5858): Use msecs_to_jiffies instead of HZ on media/video I2C drivers

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5857): Use msecs_to_jiffies instead of HZ on radio drivers
Mauro Carvalho Chehab [Tue, 17 Jul 2007 19:15:58 +0000 (16:15 -0300)]
V4L/DVB (5857): Use msecs_to_jiffies instead of HZ on radio drivers

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5855): ivtv: fix Kconfig typo and refer to the driver homepage.
Hans Verkuil [Tue, 17 Jul 2007 16:50:46 +0000 (13:50 -0300)]
V4L/DVB (5855): ivtv: fix Kconfig typo and refer to the driver homepage.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5854): ivtv: cleanup of driver messages
Hans Verkuil [Tue, 17 Jul 2007 16:42:43 +0000 (13:42 -0300)]
V4L/DVB (5854): ivtv: cleanup of driver messages

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5853): ivtv: add support to suppress high volume i2c debug messages.
Hans Verkuil [Tue, 17 Jul 2007 15:47:38 +0000 (12:47 -0300)]
V4L/DVB (5853): ivtv: add support to suppress high volume i2c debug messages.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5852): ivtv: don't recompile needlessly
Alexey Dobriyan [Tue, 17 Jul 2007 12:03:14 +0000 (09:03 -0300)]
V4L/DVB (5852): ivtv: don't recompile needlessly

Driver prints banner including kernel version. Was a leftover from when
the driver was standalone.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5851): ivtv: fix missing I2C_ALGOBIT config option
Hans Verkuil [Tue, 17 Jul 2007 09:45:42 +0000 (06:45 -0300)]
V4L/DVB (5851): ivtv: fix missing I2C_ALGOBIT config option

I2C_ALGOBIT must also be selected when ivtv is selected.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5850): ivtv: improve API command debugging
Hans Verkuil [Tue, 17 Jul 2007 09:38:43 +0000 (06:38 -0300)]
V4L/DVB (5850): ivtv: improve API command debugging

Turn off debugging of API commands that occur during encoding or decoding,
unless they are explicitly requested.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5848): Av7110: fix typo
Yoann Padioleau [Mon, 16 Jul 2007 19:54:49 +0000 (16:54 -0300)]
V4L/DVB (5848): Av7110: fix typo

Parse error in ifdef or bad use of macro.

Signed-off-by: Yoann Padioleau <padator@wanadoo.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoRevert "sys_time() speedup"
Linus Torvalds [Fri, 20 Jul 2007 20:28:54 +0000 (13:28 -0700)]
Revert "sys_time() speedup"

This basically reverts commit 4e44f3497d41db4c3b9051c61410dee8ae4fb49c,
while waiting for it to be re-done more completely.  There are cases of
people mixing "time()" with higher-resolution time sources, and we need
to take the nanosecond offsets into account.

Ingo has a patch that does that, but it's still under some discussion.
In the meantime, just revert back to the old simple situation of just
doing the whole exact timesource calculations.

But rather than using do_gettimeofday(), use the internal nanosecond
resolution getnstimeofday(), which at least avoids one unnecessary
conversion (since we really don't care about whether the fractional
seconds are nanoseconds or microseconds - we'll just throw them away).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[CELL] spufs: rework list management and associated locking
Christoph Hellwig [Fri, 20 Jul 2007 19:39:54 +0000 (21:39 +0200)]
[CELL] spufs: rework list management and associated locking

This sorts out the various lists and related locks in the spu code.

In detail:

 - the per-node free_spus and active_list are gone.  Instead struct spu
   gained an alloc_state member telling whether the spu is free or not
 - the per-node spus array is now locked by a per-node mutex, which
   takes over from the global spu_lock and the per-node active_mutex
 - the spu_alloc* and spu_free function are gone as the state change is
   now done inline in the spufs code.  This allows some more sharing of
   code for the affinity vs normal case and more efficient locking
 - some little refactoring in the affinity code for this locking scheme

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] oprofile: add support to OProfile for profiling CELL BE SPUs
Bob Nelson [Fri, 20 Jul 2007 19:39:53 +0000 (21:39 +0200)]
[CELL] oprofile: add support to OProfile for profiling CELL BE SPUs

From: Maynard Johnson <mpjohn@us.ibm.com>

This patch updates the existing arch/powerpc/oprofile/op_model_cell.c
to add in the SPU profiling capabilities.  In addition, a 'cell' subdirectory
was added to arch/powerpc/oprofile to hold Cell-specific SPU profiling code.
Exports spu_set_profile_private_kref and spu_get_profile_private_kref which
are used by OProfile to store private profile information in spufs data
structures.

Also incorporated several fixes from other patches (rrn).  Check pointer
returned from kzalloc.  Eliminated unnecessary cast.  Better error
handling and cleanup in the related area.  64-bit unsigned long parameter
was being demoted to 32-bit unsigned int and eventually promoted back to
unsigned long.

Signed-off-by: Carl Love <carll@us.ibm.com>
Signed-off-by: Maynard Johnson <mpjohn@us.ibm.com>
Signed-off-by: Bob Nelson <rrnelson@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
17 years ago[CELL] oprofile: enable SPU switch notification to detect currently active SPU tasks
Bob Nelson [Fri, 20 Jul 2007 19:39:52 +0000 (21:39 +0200)]
[CELL] oprofile: enable SPU switch notification to detect currently active SPU tasks

From: Maynard Johnson <mpjohn@us.ibm.com>

This patch adds to the capability of spu_switch_event_register so that
the caller is also notified of currently active SPU tasks.
Exports spu_switch_event_register and spu_switch_event_unregister so
that OProfile can get access to the notifications provided.

Signed-off-by: Maynard Johnson <mpjohn@us.ibm.com>
Signed-off-by: Carl Love <carll@us.ibm.com>
Signed-off-by: Bob Nelson <rrnelson@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
17 years ago[CELL] spu_base: locking cleanup
Christoph Hellwig [Fri, 20 Jul 2007 19:39:51 +0000 (21:39 +0200)]
[CELL] spu_base: locking cleanup

Sort out the locking mess in spu_base and document the current rules.
As an added benefit spu_alloc* and spu_free don't block anymore.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] cell: indexing of SPUs based on firmware vicinity properties
Arnd Bergmann [Fri, 20 Jul 2007 19:39:50 +0000 (21:39 +0200)]
[CELL] cell: indexing of SPUs based on firmware vicinity properties

This patch links spus according to their physical position using
information provided by the firmware through a special vicinity
device-tree property. This property is present in current version
of Malta firmware.

Example of vicinity properties for a node in Malta:

Node:        Vicinity property contains phandles of:
spe@0        [ spe@100000 , mic-tm@50a000 ]
spe@100000   [ spe@0      , spe@200000    ]
spe@200000   [ spe@100000 , spe@300000    ]
spe@300000   [ spe@200000 , bif0@512000   ]
spe@80000    [ spe@180000 , mic-tm@50a000 ]
spe@180000   [ spe@80000  , spe@280000    ]
spe@280000   [ spe@180000 , spe@380000    ]
spe@380000   [ spe@280000 , bif0@512000   ]

Only spe@* have a vicinity property (e.g., bif0@512000 and
mic-tm@50a000 do not have it).

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: integration of SPE affinity with the scheduller
Arnd Bergmann [Fri, 20 Jul 2007 19:39:49 +0000 (21:39 +0200)]
[CELL] spufs: integration of SPE affinity with the scheduller

This patch makes the scheduller honor affinity information for each
context being scheduled. If the context has no affinity information,
behaviour is unchanged. If there are affinity information, context is
schedulled to be run on the exact spu recommended by the affinity
placement algorithm.

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] cell: add placement computation for scheduling of affinity contexts
Arnd Bergmann [Fri, 20 Jul 2007 19:39:48 +0000 (21:39 +0200)]
[CELL] cell: add placement computation for scheduling of affinity contexts

This patch provides the spu affinity placement logic for the spufs scheduler.
Each time a gang is going to be scheduled, the placement of a reference
context is defined. The placement of all other contexts with affinity from
the gang is defined based on this reference context location and on a
precomputed displacement offset.

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: extension of spu_create to support affinity definition
Arnd Bergmann [Fri, 20 Jul 2007 19:39:47 +0000 (21:39 +0200)]
[CELL] spufs: extension of spu_create to support affinity definition

This patch adds support for additional flags at spu_create, which relate
to the establishment of affinity between contexts and contexts to memory.
A fourth, optional, parameter is supported. This parameter represent
a affinity neighbor of the context being created, and is used when defining
SPU-SPU affinity.
Affinity is represented as a doubly linked list of spu_contexts.

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] cell: add hardcoded spu vicinity information for QS20
Arnd Bergmann [Fri, 20 Jul 2007 19:39:46 +0000 (21:39 +0200)]
[CELL] cell: add hardcoded spu vicinity information for QS20

This patch allows the use of spu affinity on QS20, whose
original FW does not provide affinity information.
This is done through two hardcoded arrays, and by reading the reg
property from each spu.

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] cell: add vicinity information on spus
Arnd Bergmann [Fri, 20 Jul 2007 19:39:45 +0000 (21:39 +0200)]
[CELL] cell: add vicinity information on spus

This patch adds affinity data to each spu instance.
A doubly linked list is created, meant to connect the spus
in the physical order they are placed in the BE. SPUs
near to memory should be marked as having memory affinity.
Adjustments of the fields acording to FW properties is done
in separate patches, one for CPBW, one for Malta (patch for
Malta under testing).

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] cell: add per BE structure with info about its SPUs
Arnd Bergmann [Fri, 20 Jul 2007 19:39:44 +0000 (21:39 +0200)]
[CELL] cell: add per BE structure with info about its SPUs

Addition of a spufs-global "cbe_info" array. Each entry contains information
about one Cell/B.E. node, namelly:
* list of spus (both free and busy spus are in this list);
* list of free spus (replacing the static spu_list from spu_base.c)
* number of spus;
* number of reserved (non scheduleable) spus.

SPE affinity implementation actually requires only access to one spu per
BE node (since it implements its own pointer to walk through the other spus
of the ring) and the number of scheduleable spus (n_spus - non_sched_spus)
However having this more general structure can be useful for other
functionalities, concentrating per-cbe statistics / data.

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: use find_first_bit() instead of sched_find_first_bit()
Masato Noguchi [Fri, 20 Jul 2007 19:39:43 +0000 (21:39 +0200)]
[CELL] spufs: use find_first_bit() instead of sched_find_first_bit()

spu_sched->bitmap has MAX_PRIO(=140) width in bits.However, since
ff80a77f20f811c0cc5b251d0f657cbc6f788385, sched_find_first_bit()
only supports 100-bit bitmaps.

Thus, spu_sched->bitmap should be treated by generic find_first_bit().

Signed-off-by: Masato Noguchi <Masato.Noguchi@jp.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: remove unused file argument from spufs_run_spu()
Jeremy Kerr [Fri, 20 Jul 2007 19:39:42 +0000 (21:39 +0200)]
[CELL] spufs: remove unused file argument from spufs_run_spu()

From: Sebastian Siewior <cbe-oss-dev@ml.breakpoint.cc>

The 'file' argument is unused in spufs_run_spu(). This change removes
it.

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: change decrementer restore timing
Masato Noguchi [Fri, 20 Jul 2007 19:39:41 +0000 (21:39 +0200)]
[CELL] spufs: change decrementer restore timing

The SPU decrementer should be restored after the LSCSA DMA has
completed.

Signed-off-by: Masato Noguchi <Masato.Noguchi@jp.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: dont halt decrementer at restore step 47
Masato Noguchi [Fri, 20 Jul 2007 19:39:40 +0000 (21:39 +0200)]
[CELL] spufs: dont halt decrementer at restore step 47

No need to halt the SPE decrementer at context restore step 47, it will
be done in step 7.

Signed-off-by: Masato Noguchi <Masato.Noguchi@jp.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: limit saving MFC_CNTL bits
Masato Noguchi [Fri, 20 Jul 2007 19:39:39 +0000 (21:39 +0200)]
[CELL] spufs: limit saving MFC_CNTL bits

At save step 8, the mfc control register in the CSA should be written
_only_ with Sc and Sm bits (at least MFC_CNTL[Dh] should be set to 0)

Signed-off-by: Masato Noguchi <Masato.Noguchi@jp.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: fix read and write for decr_status file
Masato Noguchi [Fri, 20 Jul 2007 19:39:38 +0000 (21:39 +0200)]
[CELL] spufs: fix read and write for decr_status file

The decr_status in the LSCSA is valid only in the sequence of context
restore. Thus, it's nonsense to read and/or write it through spufs.

This patch changes decr_status node to access MFC_CNTL[Ds] in the CSA.

Signed-off-by: Masato Noguchi <Masato.Noguchi@jp.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: fix decr_status meanings
Masato Noguchi [Fri, 20 Jul 2007 19:39:37 +0000 (21:39 +0200)]
[CELL] spufs: fix decr_status meanings

The decr_status in the LSCSA is confusedly used as two meanings:
 * SPU decrementer was running
 * SPU decrementer was wrapped as a result of adjust
and the code to set decr_status is missing.

This patch fixes these problems by using the decr_status argument as a
set of flags. This requires a rebuild of the shipped spu_restore code.

Signed-off-by: Masato Noguchi <Masato.Noguchi@jp.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: remove needless context save/restore code
Masato Noguchi [Fri, 20 Jul 2007 19:39:36 +0000 (21:39 +0200)]
[CELL] spufs: remove needless context save/restore code

The following steps are not needed in the SPE context save/restore
paths:

Save Step 12: save_mfc_decr()
  save suspend_time to CSA (It will be done by step 14)
  save ch 7 (decrementer value will be saved in LSCSA by spe-side step 10)

Restore Step 59: restore_ch_part1()
  restore ch 1 (it will be done by spe-side step 15)

This change removes the unnecessary steps.

Signed-off-by: Masato Noguchi <Masato.Noguchi@jp.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: fix array size of channel index
Jeremy Kerr [Fri, 20 Jul 2007 19:39:35 +0000 (21:39 +0200)]
[CELL] spufs: fix array size of channel index

Based on a fix from Masato Noguchi <Masato.Noguchi@jp.sony.com>.

Remove the (incorrect) array size declarations in the spufs channel
arrays, and use ARRAY_SIZE rather than hardcoded values.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: make sure context are scheduled again after spu_acquire_saved
Christoph Hellwig [Fri, 20 Jul 2007 19:39:34 +0000 (21:39 +0200)]
[CELL] spufs: make sure context are scheduled again after spu_acquire_saved

Currently a process is removed from the physical spu when spu_acquire_saved
is saved but never put back.  This patch adds a new spu_release_saved
that is to be paired with spu_acquire_saved and put the process back if
it has been in RUNNABLE state before.

Niether Jeremy not be are entirely happy about this exact patch because
it adds another spu_activate call outside of the owner thread, but I
feel this is the best short-term fix we can come up with.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: add spu stats in sysfs and ctx stat file in spufs
Andre Detsch [Fri, 20 Jul 2007 19:39:33 +0000 (21:39 +0200)]
[CELL] spufs: add spu stats in sysfs and ctx stat file in spufs

This patch exports per-context statistics in spufs as long as spu
statistics in sysfs.

It was formed by merging:
"spufs: add spu stats in sysfs"   From: Christoph Hellwig
"spufs: add stat file to spufs"   From: Christoph Hellwig
"spufs: fix libassist accounting" From: Jeremy Kerr
"spusched: fix spu utilization statistics" From: Luke Browning
And some adjustments by myself, after suggestions on cbe-oss-dev.

Having separate patches was making the review process harder
than it should, as we end up integrating spus and ctx statistics
accounting much more than it was on the first implementation.

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: Remove spurious WARN_ON for spu_deactivate for NOSCHED contexts
Jeremy Kerr [Fri, 20 Jul 2007 19:39:32 +0000 (21:39 +0200)]
[CELL] spufs: Remove spurious WARN_ON for spu_deactivate for NOSCHED contexts

In 6cbf93960e64f313f6e247cbca7afaa50e3ee2c we added a WARN_ON for
calling spu_deactivate on contexts created with the SPU_CREATE_NOSCHED
flag. However, all NOSCHED contexts will need to be deactivated when
the context is destroyed, so this gives a spurious warning when any
NOSCHED context is closed.

This change removes the WARN_ON.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: Make signal-notification files readonly for NOSCHED contexts
Jeremy Kerr [Fri, 20 Jul 2007 19:39:31 +0000 (21:39 +0200)]
[CELL] spufs: Make signal-notification files readonly for NOSCHED contexts

Reading from the signal{1,2} files requires a spu_acquire_saved, so
make these files write-only for contexts created with
SPU_CREATE_NOSCHED.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: Avoid unexpectedly restaring MFC during context save
Kazunori Asayama [Fri, 20 Jul 2007 19:39:30 +0000 (21:39 +0200)]
[CELL] spufs: Avoid unexpectedly restaring MFC during context save

The current SPU context saving procedure in SPUFS unexpectedly
restarts MFC when halting decrementer, because MFC_CNTL[Dh] is set
without MFC_CNTL[Sm]. This bug causes, for example, saving broken DMA
queues. Here is a patch to fix the problem.

Signed-off-by: Kazunori Asayama <asayama@sm.sony.co.jp>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: remove section mismatch warning
Sebastian Siewior [Fri, 20 Jul 2007 19:39:29 +0000 (21:39 +0200)]
[CELL] spufs: remove section mismatch warning

WARNING: arch/powerpc/platforms/cell/spufs/spufs.o(.init.text+0x158): Section
mismatch: reference to .exit.text:.spu_sched_exit (between '.init_module' and
'.spu_sched_init')

was introduced by c99c1994a2bb9493b4ac372b2b6ee2606d291171
This patch removes the warning.

Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] add support for MSI on Axon-based Cell systems
Michael Ellerman [Fri, 20 Jul 2007 19:39:28 +0000 (21:39 +0200)]
[CELL] add support for MSI on Axon-based Cell systems

This patch adds support for the setup and decoding of MSIs
on Axon-based Cell systems, using the MSIC mechanism.

This involves setting up an area of BE memory which the Axon
then uses as a FIFO for MSI messages. When one or more MSIs
are decoded by the MSIC we receive an interrupt on the MPIC,
and the MSI messages are written into the FIFO. At the moment
we use a 64KB FIFO, one per MSIC/BE.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] saving spus information for kexec crash
Andre Detsch [Fri, 20 Jul 2007 19:39:27 +0000 (21:39 +0200)]
[CELL] saving spus information for kexec crash

This patch adds support for investigating spus information after a
kernel crash event, through kdump vmcore file.
Implementation is based on xmon code, but the new functionality was
kept independent from xmon.

Signed-off-by: Lucio Jose Herculano Correia <luciojhc@br.ibm.com>
Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] driver for DDR2 memory on AXON
Maxim Shchetynin [Fri, 20 Jul 2007 19:39:26 +0000 (21:39 +0200)]
[CELL] driver for DDR2 memory on AXON

The Axon bridge chip used on new Cell/B.E. based blade servers
comes with a DDR2 memory controller that can be used to
attach cheap memory modules, as opposed to the high-speed
XDR memory that is used by the CPU itself.

Since the memory controller does not participate in the
cache coherency protocol, we can not use the memory direcly
for Linux applications, but by providing a block device
it can be used for swap space, temporary file storage and
through the use of the direct_access block device operation
for mapping into user addresses, when it is mounted with
an appropriate file system.

Signed-off-by: Maxim Shchetynin <maxim@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] allow linux to map Cell regs on legacy SLOF tree.
Jean-Christophe DUBOIS [Fri, 20 Jul 2007 19:39:25 +0000 (21:39 +0200)]
[CELL] allow linux to map Cell regs on legacy SLOF tree.

The platforms missing the "cpus" property in the "be" node are mono-Cell
platforms such as CAB or Getaway.

Therefore it is possible to assume that if there is no "cpus" properties
under the "be" node then we can safely return the "device node" without
more checking. This is a bit hacky but ... it allows it to work on
these platforms.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
Acked-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] fix cbe_thermal for legacy SLOF tree.
Jean-Christophe DUBOIS [Fri, 20 Jul 2007 19:39:24 +0000 (21:39 +0200)]
[CELL] fix cbe_thermal for legacy SLOF tree.

Previous patch changed based on Christian Krafft's comment.

On some legacy SLOF tree the generic code is unable to ioremap some Cell BE
registers. Therefore the "generic" functions are returning a NULL pointer,
triggering a crash on such platforms.

Let's handle this more gracefully.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
Acked-by: Christian Kraff <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] fix cbe_cpufreq for legacy SLOF tree.
Jean-Christophe DUBOIS [Fri, 20 Jul 2007 19:39:23 +0000 (21:39 +0200)]
[CELL] fix cbe_cpufreq for legacy SLOF tree.

Previous patch changed based on Christian Krafft's comment.

On some legacy SLOF tree the generic code is unable to ioremap some Cell BE
registers. Therefore the "generic" functions are returning a NULL pointer,
triggering a crash on such platforms.

Let's handle this more gracefully.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
Acked-by: Christian Kraff <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] cbe_cpufreq: reorganize code
Christian Krafft [Fri, 20 Jul 2007 19:39:22 +0000 (21:39 +0200)]
[CELL] cbe_cpufreq: reorganize code

This patch reorganizes the code of the driver into three files.
Two cbe_cpufreq_pmi.c and cbe_cpufreq_pervasive.c care about hardware.
cbe_cpufreq.c contains the logic.
There is no changed behaviour, except that the PMI related function
is now located in a seperate module cbe_cpufreq_pmi. This module
will be required by cbe_cpufreq, if CONFIG_CBE_CPUFREQ_PMI has been set.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] cbe_cpufreq: fix minor issues
Christian Krafft [Fri, 20 Jul 2007 19:39:21 +0000 (21:39 +0200)]
[CELL] cbe_cpufreq: fix minor issues

Minor issues have been fixed:
* added a missing call to of_node_put()
* signedness of a function parameter
* added some line breaks
* changed global pmi_frequency_limit to a
  per node pmi_slow_mode_limit array

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] cbe_cpufreq: fix initialization
Christian Krafft [Fri, 20 Jul 2007 19:39:20 +0000 (21:39 +0200)]
[CELL] cbe_cpufreq: fix initialization

This patch fixes the initialization of the cbe_cpufreq driver.
The code that initializes the PMI related functions was called per cpu:
* registering cpufreq notifier block
* registering a pmi handler

This ends in a bug that the notifier block gets called in an endless loop.
The initialization code is being put to the
module init code path by this patch. This way it only gets called once.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] cbe_cpufreq: fix latency measurement
Christian Krafft [Fri, 20 Jul 2007 19:39:19 +0000 (21:39 +0200)]
[CELL] cbe_cpufreq: fix latency measurement

This patch fixes the debug code that calculates the transition time when
changing the slow modes on a Cell BE cpu.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] pmi: remove support for mutiple devices.
Christian Krafft [Fri, 20 Jul 2007 19:39:18 +0000 (21:39 +0200)]
[CELL] pmi: remove support for mutiple devices.

The pmi driver got simplified by removing support for multiple devices.
As there is no more than one pmi device per maschine, there is no need to
specify the device for listening and sending messages.

This way the caller (cbe_cpufreq) doesn't need to scan the device tree.
When registering the handler on a board without a pmi
interface, pmi.c will just return -ENODEV.

The patch that fixed the breakage of cell_defconfig has been
broken out of the earlier version of this patch. So this is
the version that applies cleanly on top of it.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years agoFix ZERO_OR_NULL_PTR(ZERO_SIZE_PTR)
Roland Dreier [Fri, 20 Jul 2007 19:13:20 +0000 (12:13 -0700)]
Fix ZERO_OR_NULL_PTR(ZERO_SIZE_PTR)

The comparison with ZERO_SIZE_PTR in ZERO_OR_NULL_PTR() needs to be <=
(not just <) so that ZERO_OR_NULL_PTR(ZERO_SIZE_PTR) is 1.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
[ Duh!  - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Fri, 20 Jul 2007 19:02:20 +0000 (12:02 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] Prevent people from directly including <asm/rwsem.h>.
  [IA64] remove time interpolator
  [IA64] Convert to generic timekeeping/clocksource
  [IA64] refresh some config files for 64K pagesize
  [IA64] Delete iosapic_free_rte()
  [IA64] fallocate system call
  [IA64] Enable percpu vector domain for IA64_DIG
  [IA64] Enable percpu vector domain for IA64_GENERIC
  [IA64] Support irq migration across domain
  [IA64] Add support for vector domain
  [IA64] Add mapping table between irq and vector
  [IA64] Check if irq is sharable
  [IA64] Fix invalid irq vector assumption for iosapic
  [IA64] Use dynamic irq for iosapic interrupts
  [IA64] Use per iosapic lock for indirect iosapic register access
  [IA64] Cleanup lock order in iosapic_register_intr
  [IA64] Remove duplicated members in iosapic_rte_info
  [IA64] Remove block structure for locking in iosapic.c

17 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Fri, 20 Jul 2007 19:01:59 +0000 (12:01 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] User stack pointer randomisation
  [MIPS] Remove unused include/asm-mips/gfx.h
  [MIPS] Remove unused include/asm-mips/ds1216.h
  [MIPS] Workaround for RM7000 WAIT instruction aka erratum 38
  [MIPS] Make support for weakly ordered LL/SC a config option.
  [MIPS] Disable UserLocal runtime detection on platforms which never have it.
  [MIPS] Disable MT runtime detection on platforms which never support MT.

17 years agoFRV: Fix linkage problems
David Howells [Fri, 20 Jul 2007 16:02:04 +0000 (17:02 +0100)]
FRV: Fix linkage problems

Make it possible to use __start_notes and __stop_notes without getting a GPREL
overflow error from the FRV linker.

Small variables that would otherwise be in .data or .bss may, depending on the
arch, be placed in special sections (.sdata or .sbss) that permit single
instruction references on fixed instruction width machines.

__start_notes and __stop_notes aren't really char variables, and certainly
don't refer to data in .data or .bss.  Making them type "void" fools the
compiler into not assuming anything about them.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix memory leak in tpm_binary_bios_measurements_open()
Reiner Sailer [Fri, 20 Jul 2007 14:03:02 +0000 (10:03 -0400)]
Fix memory leak in tpm_binary_bios_measurements_open()

The same problem that was fixed for tpm_ascii_bios_measurements_open()
in commit 178554ae75739e91dc4d7c3e42a3db95448cc5bf also occurs in
tpm_binary_bios measurements().  Thanks for noticing this Satyam!

I tested the attached patch to fix tpm_binary_bios_measurments as well.

Signed-off-by: Reiner Sailer <sailer@watson.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[IA64] Prevent people from directly including <asm/rwsem.h>.
Robert P. J. Day [Wed, 18 Jul 2007 11:33:08 +0000 (07:33 -0400)]
[IA64] Prevent people from directly including <asm/rwsem.h>.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>