]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/log
mirror_ubuntu-bionic-kernel.git
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Tue, 16 Oct 2007 23:53:20 +0000 (16:53 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
  SELinux: kills warnings in Improve SELinux performance when AVC misses
  SELinux: improve performance when AVC misses.
  SELinux: policy selectable handling of unknown classes and perms
  SELinux: Improve read/write performance
  SELinux: tune avtab to reduce memory usage

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Tue, 16 Oct 2007 23:52:21 +0000 (16:52 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: (25 commits)
  firewire: fw-cdev: reorder wakeup vs. spinlock
  firewire: in-code doc updates.
  firewire: a header cleanup
  firewire: adopt read cycle timer ABI from raw1394
  firewire: fw-ohci: check for misconfigured bus (phyID == 63)
  firewire: fw-ohci: missing dma_unmap_single
  firewire: fw-ohci: log posted write errors
  firewire: fw-ohci: reorder includes
  firewire: fw-ohci: fix includes
  firewire: fw-ohci: enforce read order for selfID generation
  firewire: fw-sbp2: use an own workqueue (fix system responsiveness)
  firewire: fw-sbp2: expose module parameter for workarounds
  firewire: fw-sbp2: add support for multiple logical units per target
  firewire: fw-sbp2: always enable IRQs before calling command ORB callback
  firewire: fw-core: local variable shadows a global one
  firewire: optimize fw_core_add_address_handler
  ieee1394: ieee1394_core.c: use DEFINE_SPINLOCK for spinlock definition
  ieee1394: csr1212: proper refcounting
  ieee1394: nodemgr: fix leak of struct csr1212_keyval
  ieee1394: pcilynx: I2C cleanups
  ...

16 years agoMerge ssh://master.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
Linus Torvalds [Tue, 16 Oct 2007 23:51:11 +0000 (16:51 -0700)]
Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/sam/kbuild

* ssh://master.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  x86: fix boot error introduced by kbuild

16 years agoMerge branch 'release' of ssh://master.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Tue, 16 Oct 2007 23:48:59 +0000 (16:48 -0700)]
Merge branch 'release' of ssh://master.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6

* 'release' of ssh://master.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] Fix build for CONFIG_SMP=n

16 years agoSELinux: kills warnings in Improve SELinux performance when AVC misses
KaiGai Kohei [Wed, 3 Oct 2007 14:42:56 +0000 (23:42 +0900)]
SELinux: kills warnings in Improve SELinux performance when AVC misses

This patch kills ugly warnings when the "Improve SELinux performance
when ACV misses" patch.

Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
Signed-off-by: James Morris <jmorris@namei.org>
16 years agoSELinux: improve performance when AVC misses.
KaiGai Kohei [Fri, 28 Sep 2007 17:20:55 +0000 (02:20 +0900)]
SELinux: improve performance when AVC misses.

* We add ebitmap_for_each_positive_bit() which enables to walk on
  any positive bit on the given ebitmap, to improve its performance
  using common bit-operations defined in linux/bitops.h.
  In the previous version, this logic was implemented using a combination
  of ebitmap_for_each_bit() and ebitmap_node_get_bit(), but is was worse
  in performance aspect.
  This logic is most frequestly used to compute a new AVC entry,
  so this patch can improve SELinux performance when AVC misses are happen.
* struct ebitmap_node is redefined as an array of "unsigned long", to get
  suitable for using find_next_bit() which is fasted than iteration of
  shift and logical operation, and to maximize memory usage allocated
  from general purpose slab.
* Any ebitmap_for_each_bit() are repleced by the new implementation
  in ss/service.c and ss/mls.c. Some of related implementation are
  changed, however, there is no incompatibility with the previous
  version.
* The width of any new line are less or equal than 80-chars.

The following benchmark shows the effect of this patch, when we
access many files which have different security context one after
another. The number is more than /selinux/avc/cache_threshold, so
any access always causes AVC misses.

      selinux-2.6      selinux-2.6-ebitmap
AVG:   22.763 [s]          8.750 [s]
STD:    0.265              0.019
------------------------------------------
1st:   22.558 [s]          8.786 [s]
2nd:   22.458 [s]          8.750 [s]
3rd:   22.478 [s]          8.754 [s]
4th:   22.724 [s]          8.745 [s]
5th:   22.918 [s]          8.748 [s]
6th:   22.905 [s]          8.764 [s]
7th:   23.238 [s]          8.726 [s]
8th:   22.822 [s]          8.729 [s]

Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
16 years agoSELinux: policy selectable handling of unknown classes and perms
Eric Paris [Fri, 21 Sep 2007 18:37:10 +0000 (14:37 -0400)]
SELinux: policy selectable handling of unknown classes and perms

Allow policy to select, in much the same way as it selects MLS support, how
the kernel should handle access decisions which contain either unknown
classes or unknown permissions in known classes.  The three choices for the
policy flags are

0 - Deny unknown security access. (default)
2 - reject loading policy if it does not contain all definitions
4 - allow unknown security access

The policy's choice is exported through 2 booleans in
selinuxfs.  /selinux/deny_unknown and /selinux/reject_unknown.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
16 years agoSELinux: Improve read/write performance
Yuichi Nakamura [Fri, 14 Sep 2007 00:27:07 +0000 (09:27 +0900)]
SELinux: Improve read/write performance

It reduces the selinux overhead on read/write by only revalidating
permissions in selinux_file_permission if the task or inode labels have
changed or the policy has changed since the open-time check.  A new LSM
hook, security_dentry_open, is added to capture the necessary state at open
time to allow this optimization.

(see http://marc.info/?l=selinux&m=118972995207740&w=2)

Signed-off-by: Yuichi Nakamura<ynakam@hitachisoft.jp>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
16 years agoSELinux: tune avtab to reduce memory usage
Yuichi Nakamura [Fri, 24 Aug 2007 02:55:11 +0000 (11:55 +0900)]
SELinux: tune avtab to reduce memory usage

This patch reduces memory usage of SELinux by tuning avtab. Number of hash
slots in avtab was 32768. Unused slots used memory when number of rules is
fewer. This patch decides number of hash slots dynamically based on number
of rules. (chain length)^2 is also printed out in avtab_hash_eval to see
standard deviation of avtab hash table.

Signed-off-by: Yuichi Nakamura<ynakam@hitachisoft.jp>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
16 years agofirewire: fw-cdev: reorder wakeup vs. spinlock
Jay Fenlason [Mon, 8 Oct 2007 21:00:29 +0000 (17:00 -0400)]
firewire: fw-cdev: reorder wakeup vs. spinlock

Signed-off-by: Jay Fenlason <fenlason@redhat.com>
Prompted by https://bugzilla.redhat.com/show_bug.cgi?id=323411

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agofirewire: in-code doc updates.
Yann Dirson [Sun, 7 Oct 2007 00:21:29 +0000 (02:21 +0200)]
firewire: in-code doc updates.

Signed-off-by: Yann Dirson <ydirson@altern.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (update)
16 years agofirewire: a header cleanup
Stefan Richter [Sun, 7 Oct 2007 00:10:11 +0000 (02:10 +0200)]
firewire: a header cleanup

fw_node() is not used (and not useful) outside fw-topology.c.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agofirewire: adopt read cycle timer ABI from raw1394
Stefan Richter [Sat, 29 Sep 2007 08:41:58 +0000 (10:41 +0200)]
firewire: adopt read cycle timer ABI from raw1394

This duplicates the read cycle timer feature of raw1394 (added in Linux
2.6.21) in firewire-core's userspace ABI.  The argument to the ioctl is
reordered though to ensure 32/64 bit compatibility.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
16 years agofirewire: fw-ohci: check for misconfigured bus (phyID == 63)
Stefan Richter [Wed, 29 Aug 2007 22:11:40 +0000 (00:11 +0200)]
firewire: fw-ohci: check for misconfigured bus (phyID == 63)

Check NodeID.nodeNumber as per OHCI 1.1 clause 7.2.3.2.  See also IEEE
1394a table 5B-1.

Also, demote the "node ID not valid" message from error to notification
as it is not an error condition.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agofirewire: fw-ohci: missing dma_unmap_single
Stefan Richter [Wed, 29 Aug 2007 17:40:28 +0000 (19:40 +0200)]
firewire: fw-ohci: missing dma_unmap_single

at_context_queue_packet() didn't clean up in an early exit path.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
16 years agofirewire: fw-ohci: log posted write errors
Stefan Richter [Mon, 20 Aug 2007 19:58:30 +0000 (21:58 +0200)]
firewire: fw-ohci: log posted write errors

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agofirewire: fw-ohci: reorder includes
Stefan Richter [Mon, 20 Aug 2007 19:41:22 +0000 (21:41 +0200)]
firewire: fw-ohci: reorder includes

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agofirewire: fw-ohci: fix includes
Stefan Richter [Mon, 20 Aug 2007 19:40:30 +0000 (21:40 +0200)]
firewire: fw-ohci: fix includes

Add used includes, remove unused includes.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agofirewire: fw-ohci: enforce read order for selfID generation
Stefan Richter [Sat, 25 Aug 2007 12:08:19 +0000 (14:08 +0200)]
firewire: fw-ohci: enforce read order for selfID generation

It seems unlikely, but access to self_id_cpu[0] could at least in theory
be deferred until after the loop over self_id_cpu[1..n] or even after
the subsequent reg_read.  Enforce the desired order by a read barrier.

Also prevent the reg_read from being reordered relative to the for loop.
This isn't necessary if the loop's conditional printk counts as an
implicit barrier, but better make it explicit.

(self_id_cpu[] is a coherent DMA buffer.)

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agofirewire: fw-sbp2: use an own workqueue (fix system responsiveness)
Stefan Richter [Sun, 12 Aug 2007 10:51:18 +0000 (12:51 +0200)]
firewire: fw-sbp2: use an own workqueue (fix system responsiveness)

Firewire-sbp2 did very uncooperative things in the kernel's shared
workqueue:  Sleeping until reception of management status from the
target for up to 2 seconds, and performing SCSI inquiry and all of the
setup of SCSI command set drivers via scsi_add_device.  If there were
transient or permanent error conditions, this caused long blockage of
the kernel's events process, noticeable e.g. by blocked keyboard input.

We now allocate a workqueue process exclusive to fw-sbp2.  As a side
effect, this also increases parallelism of fw-sbp2's login and reconnect
work versus fw-core's device discovery and device update work which is
performed in the shared workqueue.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
16 years agofirewire: fw-sbp2: expose module parameter for workarounds
Stefan Richter [Mon, 13 Aug 2007 15:48:25 +0000 (17:48 +0200)]
firewire: fw-sbp2: expose module parameter for workarounds

On rare occasions, the ability to set one of the workaround flags at
runtime may save the day.

People who experience I/O errors with firewire-sbp2 while the old sbp2
driver worked for them should try workarounds=1 and report to the devel
mailinglist whether that improves things.  Firewire-sbp2 defaults to the
SCSI stack's maximum transfer size per command, while sbp2 limits them
to 128 kBytes.  Flag 1 accomplishes just that.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agofirewire: fw-sbp2: add support for multiple logical units per target
Stefan Richter [Sat, 25 Aug 2007 12:05:28 +0000 (14:05 +0200)]
firewire: fw-sbp2: add support for multiple logical units per target

Fixes "New firewire stack only recognizing half of a chain of drives",
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=242254

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agofirewire: fw-sbp2: always enable IRQs before calling command ORB callback
Stefan Richter [Sat, 25 Aug 2007 08:40:42 +0000 (10:40 +0200)]
firewire: fw-sbp2: always enable IRQs before calling command ORB callback

On IOMMU-less noncoherent architectures, orb->callback will memcpy the
whole SCSI command buffer for READ-like SCSI commands.  It is therefore
friendlier to enable IRQs before the call, like before patch "Add
ref-counting for sbp2 orbs".

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Kristian Høgsberg <krh@redhat.com>
16 years agofirewire: fw-core: local variable shadows a global one
Stefan Richter [Fri, 3 Aug 2007 18:56:31 +0000 (20:56 +0200)]
firewire: fw-core: local variable shadows a global one

Sparse warned about it although it was apparently harmless:

drivers/firewire/fw-cdev.c:624:23: warning: symbol 'interrupt' shadows an earlier one
include/asm/hw_irq.h:29:13: originally declared here

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agofirewire: optimize fw_core_add_address_handler
Stefan Richter [Tue, 17 Jul 2007 00:10:16 +0000 (02:10 +0200)]
firewire: optimize fw_core_add_address_handler

Potentially avoids unnecessary loop runs.
Guarantee quadlet-aligned starts of address regions.
Document the return values.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agoieee1394: ieee1394_core.c: use DEFINE_SPINLOCK for spinlock definition
Matthias Kaehlcke [Fri, 12 Oct 2007 17:57:23 +0000 (19:57 +0200)]
ieee1394: ieee1394_core.c: use DEFINE_SPINLOCK for spinlock definition

drivers/ieee1394/ieee1394_core.c: Define spinlock using
DEFINE_SPINLOCK instead of assignment to SPIN_LOCK_UNLOCKED

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agoieee1394: csr1212: proper refcounting
Stefan Richter [Sat, 15 Sep 2007 12:50:25 +0000 (14:50 +0200)]
ieee1394: csr1212: proper refcounting

At least since nodemgr got rid of coarse global locking, accesses to
struct csr1212_keyval's reference counter should be atomic and coupled
with proper barriers.  Also, calls to csr1212_keep_keyval(kv) should
occur before kv is being used.

(We probably should convert refcnt to struct kref, but how to keep
csr1212_destroy_keyval's implementation non-recursively then?)

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agoieee1394: nodemgr: fix leak of struct csr1212_keyval
Stefan Richter [Sat, 15 Sep 2007 12:45:53 +0000 (14:45 +0200)]
ieee1394: nodemgr: fix leak of struct csr1212_keyval

csr1212_keep_keyval(kv) in nodemgr_process_root_directory was
unbalanced if ne->vendor_name_kv already exists.  This happens for
example if eth1394 or raw1394 modify the local config ROM and it is
parsed again.

As a bonus, the attempt to add the vendor_name_kv sysfs attribute
when it already exists is now fixed for good.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agoieee1394: pcilynx: I2C cleanups
Jean Delvare [Sat, 8 Sep 2007 12:09:19 +0000 (14:09 +0200)]
ieee1394: pcilynx: I2C cleanups

* Delete optional and empty i2c client_register and client_unregister
  callbacks.
* Use the proper i2c adapter ID.
* Don't use a template to initialize the i2c_adapter structure, it's
  inefficient.
* Update a misleading comment on why we use i2c_transfer rather than
  higher level i2c functions.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agoieee1394: Fix kthread stopping in nodemgr_host_thread
Satyam Sharma [Wed, 15 Aug 2007 14:35:38 +0000 (20:05 +0530)]
ieee1394: Fix kthread stopping in nodemgr_host_thread

The nodemgr host thread can exit on its own even when kthread_should_stop
is not true, on receiving a signal (might never happen in practice, as
it ignores signals). But considering kthread_stop() must not be mixed with
kthreads that can exit on their own, I think changing the code like this
is clearer. This change means the thread can cut its sleep short when
receive a signal but looking at the code around, that sounds okay (and
again, it might never actually recieve a signal in practice).

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agoieee1394: sbp2: fix unsafe iteration over list of devices
Stefan Richter [Sat, 11 Aug 2007 09:52:08 +0000 (11:52 +0200)]
ieee1394: sbp2: fix unsafe iteration over list of devices

sbp2_host_reset and sbp2_handle_status_write are not serialized against
sbp2_alloc_device and sbp2_remove_device.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agoieee1394: pcilynx: superfluous local variables
Stefan Richter [Sat, 28 Jul 2007 22:01:35 +0000 (00:01 +0200)]
ieee1394: pcilynx: superfluous local variables

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agoieee1394: eth1394: fix lock imbalance
Stefan Richter [Sat, 28 Jul 2007 21:45:03 +0000 (23:45 +0200)]
ieee1394: eth1394: fix lock imbalance

bad_proto can be reached from points which did not take priv->lock.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agoieee1394: eth1394: superfluous local variable
Stefan Richter [Sat, 28 Jul 2007 21:44:25 +0000 (23:44 +0200)]
ieee1394: eth1394: superfluous local variable

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agox86: fix boot error introduced by kbuild
Sam Ravnborg [Tue, 16 Oct 2007 21:50:33 +0000 (23:50 +0200)]
x86: fix boot error introduced by kbuild

x86 uses target specific assignment of EXTRA_AFLAGS,
EXTRA_CFLAGS - this caused troubles with
introducing asflags-y, ccflags-y.

Fixed the target specific assignments in arch/x86/boot/Makefile
and auditted the rest of the kernel for similar usage.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
16 years ago[IA64] Fix build for CONFIG_SMP=n
Tony Luck [Tue, 16 Oct 2007 20:17:22 +0000 (13:17 -0700)]
[IA64] Fix build for CONFIG_SMP=n

d5a7430ddcdb598261d70f7eb1bf450b5be52085 missed a spot where we
use cpu_sibling_map and cpu_core_map.  These don't exist on a
uni-processor build.  Wrap #ifdef CONFIG_SMP ... #endif around it.

Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years agoUpdate PowerPC vmemmap code for 1TB segments
Anton Blanchard [Tue, 16 Oct 2007 19:57:06 +0000 (14:57 -0500)]
Update PowerPC vmemmap code for 1TB segments

htab_bolt_mapping takes another argument now the 1TB code has been
merged. Update vmemmap_populate to match.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFix powerpc breakage in sg chaining code
Anton Blanchard [Tue, 16 Oct 2007 19:54:33 +0000 (14:54 -0500)]
Fix powerpc breakage in sg chaining code

Commit 78bdc3106a877cfa50439fa66b52acbc4e7868df ("PPC: sg chaining
support") looks to have removed some unrelated ppc code.  Lets put it
back in.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
Linus Torvalds [Tue, 16 Oct 2007 18:23:06 +0000 (11:23 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits)
  kbuild: introduce ccflags-y, asflags-y and ldflags-y
  kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP
  kbuild: enable use of AFLAGS and CFLAGS on commandline
  kbuild: enable 'make AFLAGS=...' to add additional options to AS
  kbuild: fix AFLAGS use in h8300 and m68knommu
  kbuild: check for wrong use of CFLAGS
  kbuild: enable 'make CFLAGS=...' to add additional options to CC
  kbuild: fix up CFLAGS usage
  kbuild: make modpost detect unterminated device id lists
  kbuild: call export_report from the Makefile
  kbuild: move Kai Germaschewski to CREDITS
  kconfig/menuconfig: distinguish between selected-by-another options and comments
  kconfig: tristate choices with mixed tristate and boolean values
  include/linux/Kbuild: remove duplicate entries
  kbuild: kill backward compatibility checks
  kbuild: kill EXTRA_ARFLAGS
  kbuild: fix documentation in makefiles.txt
  kbuild: call make once for all targets when O=.. is used
  kbuild: pass -g to assembler under CONFIG_DEBUG_INFO
  kbuild: update _shipped files for kconfig syntax cleanup
  ...

Fix up conflicts in arch/um/sys-{x86_64,i386}/Makefile manually.

16 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Tue, 16 Oct 2007 17:44:35 +0000 (10:44 -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] Increase cp0 compare clockevent min_delta_ns from 0x30 to 0x300.
  [MIPS] Cache: Provide more information on cache policy on bootup.
  [MIPS] Fix aliasing bug in copy_user_highpage, take 2.
  [MIPS] VPE loader: convert from struct class_ device to struct device
  [MIPS] MIPSsim: Fix booting from NFS root
  [MIPS] Alchemy: Get rid of au1xxx_irq_map_t.
  [MIPS] Alchemy: Get rid of au_ffz().
  [MIPS] Alchemy: Get rid of au_ffs().
  [MIPS] Alchemy: cleanup interrupt code.
  [MIPS] Lasat: Fix build by conversion to irq_cpu.c.
  [MIPS] Lasat: Add #ifndef ... #endif include warpper to lasatint.h.
  [MIPS] IP22: Enable -Werror.
  [MIPS] IP22: Fix warning.
  [MIPS] IP22: Complain if requesting the front panel irq failed.
  [MIPS] vmlinux.lds.S: Handle KPROBES_TEXT.
  [MIPS] vmlinux.lds.S: Fix handling of .notes in final link.
  [MIPS] vmlinux.lds.S: Remove duplicate comment.
  [MIPS] MSP71XX: Add workarounds file.
  [MIPS] IP32: Fix build by conversion to irq_cpu.c.

16 years ago[MIPS] Increase cp0 compare clockevent min_delta_ns from 0x30 to 0x300.
Ralf Baechle [Tue, 16 Oct 2007 10:35:11 +0000 (11:35 +0100)]
[MIPS] Increase cp0 compare clockevent min_delta_ns from 0x30 to 0x300.

Extremly low values are of dubious usefulness anyway but in this case
they actually were killing Qemu which simply wasn't able to complete
mips_next_event() within 0x30 100MHz cycles even on fast hosts.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Cache: Provide more information on cache policy on bootup.
Ralf Baechle [Mon, 15 Oct 2007 15:35:45 +0000 (16:35 +0100)]
[MIPS] Cache: Provide more information on cache policy on bootup.

This should help making bug reports for the gadzillion of cores with all
their configuration and synthesis options more useful.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Fix aliasing bug in copy_user_highpage, take 2.
Ralf Baechle [Mon, 15 Oct 2007 15:30:24 +0000 (16:30 +0100)]
[MIPS] Fix aliasing bug in copy_user_highpage, take 2.

Turns out b868868ae0f7272228c95cc760338ffe35bb739d  wasn't quite right.
When called for a page that isn't marked dirty it would artificially
create an alias instead of doing the obvious thing and access the page
via KSEG0.

The same issue also exists in copy_to_user_page and copy_from_user_page
which was causing the machine to die under rare circumstances for example
when running ps if the BUG_ON() assertion added by the earlier fix was
getting triggered.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] VPE loader: convert from struct class_ device to struct device
Kay Sievers [Mon, 15 Oct 2007 11:42:35 +0000 (13:42 +0200)]
[MIPS] VPE loader: convert from struct class_ device to struct device

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] MIPSsim: Fix booting from NFS root
Thiemo Seufer [Sun, 14 Oct 2007 16:11:06 +0000 (17:11 +0100)]
[MIPS] MIPSsim: Fix booting from NFS root

MIPSsim probably doesn't have any sort of environment, but writing
a zero in it kills even the compiled in command line. This prevents
booting via NFS root.

Signed-Off-By: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Alchemy: Get rid of au1xxx_irq_map_t.
Ralf Baechle [Mon, 15 Oct 2007 00:07:39 +0000 (01:07 +0100)]
[MIPS] Alchemy: Get rid of au1xxx_irq_map_t.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Alchemy: Get rid of au_ffz().
Ralf Baechle [Mon, 15 Oct 2007 00:02:43 +0000 (01:02 +0100)]
[MIPS] Alchemy: Get rid of au_ffz().

There were no users - and why have a private version anyway.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Alchemy: Get rid of au_ffs().
Ralf Baechle [Mon, 15 Oct 2007 00:00:06 +0000 (01:00 +0100)]
[MIPS] Alchemy: Get rid of au_ffs().

It was plain a bad idea ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Alchemy: cleanup interrupt code.
Ralf Baechle [Sun, 14 Oct 2007 23:51:34 +0000 (00:51 +0100)]
[MIPS] Alchemy: cleanup interrupt code.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Lasat: Fix build by conversion to irq_cpu.c.
Ralf Baechle [Sun, 14 Oct 2007 22:49:33 +0000 (23:49 +0100)]
[MIPS] Lasat: Fix build by conversion to irq_cpu.c.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Lasat: Add #ifndef ... #endif include warpper to lasatint.h.
Ralf Baechle [Sun, 14 Oct 2007 22:42:01 +0000 (23:42 +0100)]
[MIPS] Lasat: Add #ifndef ... #endif include warpper to lasatint.h.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] IP22: Enable -Werror.
Ralf Baechle [Sun, 14 Oct 2007 22:27:58 +0000 (23:27 +0100)]
[MIPS] IP22: Enable -Werror.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] IP22: Fix warning.
Ralf Baechle [Sun, 14 Oct 2007 22:27:21 +0000 (23:27 +0100)]
[MIPS] IP22: Fix warning.

  CC      arch/mips/sgi-ip22/ip22-berr.o
arch/mips/sgi-ip22/ip22-berr.c: In function 'ip22_be_interrupt':
arch/mips/sgi-ip22/ip22-berr.c:100: warning: passing argument 2 of 'die_if_kernel' discards qualifiers from pointer target type

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] IP22: Complain if requesting the front panel irq failed.
Ralf Baechle [Sun, 14 Oct 2007 22:04:27 +0000 (23:04 +0100)]
[MIPS] IP22: Complain if requesting the front panel irq failed.

This fixes the warning:

  CC      arch/mips/sgi-ip22/ip22-reset.o
arch/mips/sgi-ip22/ip22-reset.c: In function 'reboot_setup':
arch/mips/sgi-ip22/ip22-reset.c:239: warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] vmlinux.lds.S: Handle KPROBES_TEXT.
Ralf Baechle [Sun, 14 Oct 2007 21:50:05 +0000 (22:50 +0100)]
[MIPS] vmlinux.lds.S: Handle KPROBES_TEXT.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] vmlinux.lds.S: Fix handling of .notes in final link.
Ralf Baechle [Sun, 14 Oct 2007 21:49:01 +0000 (22:49 +0100)]
[MIPS] vmlinux.lds.S: Fix handling of .notes in final link.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] vmlinux.lds.S: Remove duplicate comment.
Ralf Baechle [Sun, 14 Oct 2007 21:42:58 +0000 (22:42 +0100)]
[MIPS] vmlinux.lds.S: Remove duplicate comment.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] MSP71XX: Add workarounds file.
Ralf Baechle [Sun, 14 Oct 2007 13:27:18 +0000 (14:27 +0100)]
[MIPS] MSP71XX: Add workarounds file.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] IP32: Fix build by conversion to irq_cpu.c.
Ralf Baechle [Sun, 14 Oct 2007 13:02:26 +0000 (14:02 +0100)]
[MIPS] IP32: Fix build by conversion to irq_cpu.c.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agoMerge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
Linus Torvalds [Tue, 16 Oct 2007 17:13:38 +0000 (10:13 -0700)]
Merge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa

* 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa: (264 commits)
  [ALSA] version 1.0.15
  [ALSA] Fix thinko in cs4231 mce down check
  [ALSA] sun-cs4231: improved waiting after MCE down
  [ALSA] sun-cs4231: use cs4231-regs.h
  [ALSA] This simplifies and fixes waiting loops of the mce_down()
  [ALSA] This patch adds support for a wavetable chip on
  [ALSA] This patch removes open_mutex from the ad1848-lib as
  [ALSA] fix bootup crash in snd_gus_interrupt()
  [ALSA] hda-codec - Fix SKU ID function for realtek codecs
  [ALSA] Support  ASUS P701 eeepc [0x1043 0x82a1] support
  [ALSA] hda-codec - Add array terminator for dmic in STAC codec
  [ALSA] hdsp - Fix zero division
  [ALSA] usb-audio - Fix double comment
  [ALSA] hda-codec - Fix STAC922x volume knob control
  [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz
  [ALSA] hda-codec - Fix for Fujitsu Lifebook C1410
  [ALSA] mpu-401: remove MPU401_INFO_UART_ONLY flag
  [ALSA] mpu-401: do not require an ACK byte for the ENTER_UART command
  [ALSA] via82xx - Add DXS quirk for Shuttle AK31v2
  [ALSA] hda-codec - Fix input_mux numbers for vaio stac92xx
  ...

16 years agoMerge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block
Linus Torvalds [Tue, 16 Oct 2007 17:09:16 +0000 (10:09 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block: (63 commits)
  Fix memory leak in dm-crypt
  SPARC64: sg chaining support
  SPARC: sg chaining support
  PPC: sg chaining support
  PS3: sg chaining support
  IA64: sg chaining support
  x86-64: enable sg chaining
  x86-64: update pci-gart iommu to sg helpers
  x86-64: update nommu to sg helpers
  x86-64: update calgary iommu to sg helpers
  swiotlb: sg chaining support
  i386: enable sg chaining
  i386 dma_map_sg: convert to using sg helpers
  mmc: need to zero sglist on init
  Panic in blk_rq_map_sg() from CCISS driver
  remove sglist_len
  remove blk_queue_max_phys_segments in libata
  revert sg segment size ifdefs
  Fixup u14-34f ENABLE_SG_CHAINING
  qla1280: enable use_sg_chaining option
  ...

16 years agotime: introduce xtime_seconds
Ingo Molnar [Tue, 16 Oct 2007 14:09:20 +0000 (16:09 +0200)]
time: introduce xtime_seconds

improve performance of sys_time(). sys_time() returns time in seconds,
but it does so by calling do_gettimeofday() and then returning the
tv_sec portion of the GTOD time. But the data structure "xtime", which
is updated by every timer/scheduler tick, already offers HZ granularity
time.

the patch improves the sysbench oltp macrobenchmark by 4-5% on an AMD
dual-core system:

v2.6.23:

#threads

   1:     transactions:                        4073   (407.23 per sec.)
   2:     transactions:                        8530   (852.81 per sec.)
   3:     transactions:                        8321   (831.88 per sec.)
   4:     transactions:                        8407   (840.58 per sec.)
   5:     transactions:                        8070   (806.74 per sec.)

v2.6.23 + sys_time-speedup.patch:

   1:     transactions:                        4281   (428.09 per sec.)
   2:     transactions:                        8910   (890.85 per sec.)
   3:     transactions:                        8659   (865.79 per sec.)
   4:     transactions:                        8676   (867.34 per sec.)
   5:     transactions:                        8532   (852.91 per sec.)

and by 4-5% on an Intel dual-core system too:

2.6.23:

  1:     transactions:                        4560   (455.94 per sec.)
  2:     transactions:                        10094  (1009.30 per sec.)
  3:     transactions:                        9755   (975.36 per sec.)
  4:     transactions:                        9859   (985.78 per sec.)
  5:     transactions:                        9701   (969.72 per sec.)

2.6.23 + sys_time-speedup.patch:

  1:     transactions:                        4779   (477.84 per sec.)
  2:     transactions:                        10103  (1010.14 per sec.)
  3:     transactions:                        10141  (1013.93 per sec.)
  4:     transactions:                        10371  (1036.89 per sec.)
  5:     transactions:                        10178  (1017.50 per sec.)

(the more CPUs the system has, the more speedup this patch gives for
this particular workload.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoCREDITS: correct Mikael Pettersson's URL
Mikael Pettersson [Tue, 16 Oct 2007 07:33:24 +0000 (09:33 +0200)]
CREDITS: correct Mikael Pettersson's URL

New URL due to local reorganization.

16 years agopowerpc32 vDSO: linker script indentation
Roland McGrath [Tue, 16 Oct 2007 03:44:14 +0000 (20:44 -0700)]
powerpc32 vDSO: linker script indentation

This cleans up the formatting in the vDSO linker script, mostly just the
use of whitespace.  It's intended to approximate the kernel standard
conventions for indenting C, treating elements of the linker script about
like initialized variable definitions.

Signed-off-by: Roland McGrath <roland@redhat.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agopowerpc64 vDSO: linker script indentation
Roland McGrath [Tue, 16 Oct 2007 03:43:33 +0000 (20:43 -0700)]
powerpc64 vDSO: linker script indentation

This cleans up the formatting in the vDSO linker script, mostly just the
use of whitespace.  It's intended to approximate the kernel standard
conventions for indenting C, treating elements of the linker script about
like initialized variable definitions.

Signed-off-by: Roland McGrath <roland@redhat.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoSH vDSO: linker script indentation
Roland McGrath [Tue, 16 Oct 2007 03:42:02 +0000 (20:42 -0700)]
SH vDSO: linker script indentation

This cleans up the formatting in the vDSO linker script, mostly just the
use of whitespace.  It's intended to approximate the kernel standard
conventions for indenting C, treating elements of the linker script about
like initialized variable definitions.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoia64 vDSO: linker script indentation
Roland McGrath [Tue, 16 Oct 2007 03:40:29 +0000 (20:40 -0700)]
ia64 vDSO: linker script indentation

This cleans up the formatting in the vDSO linker script, mostly just the
use of whitespace.  It's intended to approximate the kernel standard
conventions for indenting C, treating elements of the linker script about
like initialized variable definitions.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolockdep: fixup the inode dir annotation
Peter Zijlstra [Tue, 16 Oct 2007 04:47:54 +0000 (06:47 +0200)]
lockdep: fixup the inode dir annotation

A slight oversight tripped lockdep debugging code, each lockdep
class should have but a single init site.

Rearange the code to make this true.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoscsi_mac.h: Define AUTOSENSE before include of NCR5380.h
Boaz Harrosh [Tue, 16 Oct 2007 08:25:01 +0000 (10:25 +0200)]
scsi_mac.h: Define AUTOSENSE before include of NCR5380.h

  - Previese patch to NCR5380 broke scsi_mac because
    AUTOSENSE was defined after the inclusion of
    NCR5380.h. Fix it

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agonet/sunrpc/xprtrdma/verbs.c printk warning fix
Andrew Morton [Tue, 16 Oct 2007 08:29:57 +0000 (01:29 -0700)]
net/sunrpc/xprtrdma/verbs.c printk warning fix

sparc64:

net/sunrpc/xprtrdma/verbs.c:1264: warning: long long unsigned int format, u64 arg (arg 3)
net/sunrpc/xprtrdma/verbs.c:1264: warning: long long unsigned int format, u64 arg (arg 4)

Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotgafb: remove a redundant non-mono test in mono imageblit
Maciej W. Rozycki [Tue, 16 Oct 2007 08:29:57 +0000 (01:29 -0700)]
tgafb: remove a redundant non-mono test in mono imageblit

There is a test in tgafb_mono_imageblit() for a colour image with a fall-back
to cfb_imageblit().  The test is not necessary as the only caller, which is
tgafb_imageblit(), checks it too and only invokes this function for monochrome
images.  It looks like a left-over from before some changes to
tgafb_imageblit().

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Antonino Daplas <adaplas@pol.net>
Cc: Jay Estabrook <Jay.Estabrook@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotgafb: fix an out-of-range shift in mono imageblit
Maciej W. Rozycki [Tue, 16 Oct 2007 08:29:56 +0000 (01:29 -0700)]
tgafb: fix an out-of-range shift in mono imageblit

The pixel mask calculation in tgafb_mono_imageblit() uses a variable
left-shift on a 32-bit data type by up to 32.  Shifting by the width of a data
type or more produces an unpredictable result according to the C standard.

Rather than widening the data type this fix makes sure the count is between 0
and 31.  The reason is not to penalise 32-bit platforms with operation on a
"long long" type for a marginal case that is meant not to happen (blitting an
image of a zero width).

The reason it has escaped for so long is the Alpha, being purely 64-bit, :-)
does not mask the shift out to 32 bits.  This is a valid implementation --
producing the correct result certainly falls within "unpredictable behaviour".
 It does trigger on MIPS though and it is the recent merge of the TC support
which only enabled the driver for use on anything other than the Alpha.  For
MIPS when the width is 32 the mask ends up being 0 rather than 0xffffffff as
it should be and the frame buffer is not updated.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Antonino Daplas <adaplas@pol.net>
Cc: Jay Estabrook <Jay.Estabrook@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofbcon: delay the start of the cursor timer until a con_switch()
Antonino Daplas [Tue, 16 Oct 2007 08:29:55 +0000 (01:29 -0700)]
fbcon: delay the start of the cursor timer until a con_switch()

As reported in Bugzilla Bug 9093, upon switching to X, a small rectangular
cursor can still be seen blinking in the upper left part of the screen.  It is
fbcon's text cursor.  This is caused by a strange ioctl(..., KDSETMODE,
KD_TEXT) call done by something in userspace, perhaps by X itself, while the
tty is still in graphics mode.  And when the tty is in KD_TEXT mode, the
cursor timer is restarted.

Although this is a userspace problem, we can work around it by delaying the
restart of the cursor timer until an fbcon_switch() is called.  In other
words, the cursor timer will not be restarted even if a KD_TEXT mode switch is
requested.

Regression potential: Present but low

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofbdev: copyarea function taught to fully support swapped pixel order in byte
Pavel Pisa [Tue, 16 Oct 2007 08:29:55 +0000 (01:29 -0700)]
fbdev: copyarea function taught to fully support swapped pixel order in byte

This correct case, when source and destination X coordinates difference is n
multiple of pixels in byte.  This is probably rare case, but this case should
supported for completeness.

Reorganization of FB_READL and FB_WRITEL calls results in code size decrease
for normal build without swapping support and size with support enabled is
reasonable too.

[adaplas]
Add missing fb_rev_pixels_in_long() prototype.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agos3fb: do not allow incorrect pixclock settings
Krzysztof Helt [Tue, 16 Oct 2007 08:29:54 +0000 (01:29 -0700)]
s3fb: do not allow incorrect pixclock settings

This patch adds check if selected pixclock is valid (is in the PLL range).

Previously, if the pixclock could not be set, the new mode resolution was set
but pixclock was not set which led to incorrect timings sent to monitor.

[adaplas]
Fixed a few misplaced curly braces.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosvgalib: mode selection updates
Ondrej Zajicek [Tue, 16 Oct 2007 08:29:52 +0000 (01:29 -0700)]
svgalib: mode selection updates

This patch changes mode selection matching algorithm.  It allows to choose
mode with matching depth even when requested color lengths are greater than
color lengths of every mode with requested color depth.

It also fixes bug in s3fb - wrong error value returned when format is not
supported by chip.

Signed-off-by: Ondrej Zajicek <santiago@crfreenet.org>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3fb: default to 480p on DVI-D/HDMI if video=safe
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:52 +0000 (01:29 -0700)]
ps3fb: default to 480p on DVI-D/HDMI if video=safe

Default to the 480p video mode on DVI-D and HDMI displays if `video=safe' is
passed on the kernel command line.

This is intended to be used by `kboot'-style boot loaders (i.e. first-stage
kernels) for the PS3, to provide a failsafe video mode.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofb: move and rename extern declaration for global_mode_option
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:51 +0000 (01:29 -0700)]
fb: move and rename extern declaration for global_mode_option

Move the extern declaration for global_mode_option to <linux/fb.h> and rename
the variable to fb_mode_option.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3fb: enhance horizontal panning on firmware 1.90 and up
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:51 +0000 (01:29 -0700)]
ps3fb: enhance horizontal panning on firmware 1.90 and up

ps3fb: Enhance horizontal panning on firmware 1.90 and up:
  - On firmware 1.90 and up, L1GPU_CONTEXT_ATTRIBUTE_FB_BLIT supports copying
    rectangles from XDR to DDR memory with different source and destination
    line lengths. Hence larger horizontal virtual resolutions can be supported
    (up to 16368 pixels).
  - As the actual frame buffer memory layout no longer matches the entries in
    ps3fb_res[], create fake struct ps3fb_ioctl_res data for the
    PS3FB_IOCTL_SCREENINFO ioctl, so user space applications that depend on it
    keep on working.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3fb: add virtual screen and panning support
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:50 +0000 (01:29 -0700)]
ps3fb: add virtual screen and panning support

ps3fb: Add virtual screen and panning support:
  - The vertical virtual screen size is limited by the amount of memory
    reserved for ps3fb,
  - The horizontal virtual screen size is limited to the fullscreen width,
  - Advertise that we support panning, so fbcon will use it if the virtual
    screen is enabled.
    Enabling a virtual screen (using `fbset -vyres nnn') can speed up text
    console scrolling by a factor of 10-15, depending on the video mode.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3fb: don't keep the borders for non-fullscreen modes in XDR memory
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:49 +0000 (01:29 -0700)]
ps3fb: don't keep the borders for non-fullscreen modes in XDR memory

Don't keep the borders for non-fullscreen modes in XDR memory:
  - Extract ps3fb_sync_image()
  - Work around the alignment restrictions of L1GPU_CONTEXT_ATTRIBUTE_FB_BLIT
    by using an offset with L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP
  - Only copy the visible part of the screen on every vblank
  - Always put the real frame buffer at the start of video memory
  - Clear fullscreen DDR memory on mode change

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3fb: use fb_info.par properly
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:48 +0000 (01:29 -0700)]
ps3fb: use fb_info.par properly

ps3fb: Use fb_info.par properly:
  o Move mode-specific fields into struct ps3fb_par
  o Allocate struct ps3fb_par using framebuffer_alloc()
  o Protect access to ps3fb_par in ps3fb_sync() using the console semaphore
    (this semaphore is already held when ps3fb_set_par() is called)
  o Avoid calling ps3av_set_video_mode() if the actual video mode hasn't
    changed

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3fb: fix possible overlap of GPU command buffer and frame buffer
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:48 +0000 (01:29 -0700)]
ps3fb: fix possible overlap of GPU command buffer and frame buffer

ps3fb: In the case of non-fullscreen video modes, there was a partial overlap
of the GPU command buffer and the frame buffer. Fix and cleanup various issues
with overlap and alignment:
  - Move the GPU command buffer from the beginning to the end of video memory
  - Exclude the GPU command buffer from the actual frame buffer memory
  - Align the start of the virtual frame buffer to PAGE_SIZE instead of to 64
    KiB, and don't waste memory if it's already aligned (for fullscreen modes)
  - Take into account the alignment when checking memory requirements and
    maximum number of frames
  - Make sure fb_fix_screeninfo.smem_start always points to the virtual frame
    buffer start, so we don't have to compensate for that in ps3fb_mmap()

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3fb: make ps3fb_wait_for_vsync() and ps3fb_flip_ctl() static
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:47 +0000 (01:29 -0700)]
ps3fb: make ps3fb_wait_for_vsync() and ps3fb_flip_ctl() static

Make ps3fb_wait_for_vsync() and ps3fb_flip_ctl() static, as they're no
(longer) used outside ps3fb.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3fb: clean up includes
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:46 +0000 (01:29 -0700)]
ps3fb: clean up includes

Clean up includes

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3fb: do not print warnings on invalid frame numbers
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:46 +0000 (01:29 -0700)]
ps3fb: do not print warnings on invalid frame numbers

Do not print warnings on invalid frame numbers, as this can be triggered from
user space.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3fb: convert from printk()/DPRINTK() to dev_*()/pr_*()
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:45 +0000 (01:29 -0700)]
ps3fb: convert from printk()/DPRINTK() to dev_*()/pr_*()

Convert ps3fb from printk()/DPRINTK() to dev_*()/pr_*()

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoimxfb: fast read flag and nonstandard field configurable
Pavel Pisa [Tue, 16 Oct 2007 08:29:44 +0000 (01:29 -0700)]
imxfb: fast read flag and nonstandard field configurable

The i.MX frame-buffer read operation should be faster for all configurations
then drawing each individual character again in response to scroll events.

The nonstandard fields allows to configure frame-buffer special options flags
for different display configurations by board specific initialization code.

One of such specific options is reversed order of pixels in each individual
byte.  i.MX frame-buffer seems to be designed for big-endian use first.  The
byte order is correctly configured for little-endian ordering, but if 1, 2 or
4 bits per pixel are used, pixels ordering is incompatible to Linux generic
frame-buffer drawing functions.

The patch "Allow generic BitBLT functions to work with swapped pixel order in
bytes" introduces required functionality into FBDEV core.  The pixels ordering
selection has to be enabled at compile time CONFIG_FB_CFB_REV_PIXELS_IN_BYTE
and for each display configuration which requires it by flag
FB_NONSTD_REV_PIX_IN_B in "nonstd" field of info structure.

This patch provides way for board specific code to select this option.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3av: dont distinguish between `boot' and `non-boot' autodetection
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:44 +0000 (01:29 -0700)]
ps3av: dont distinguish between `boot' and `non-boot' autodetection

don't distinguish between `boot' and `non-boot' autodetection now the
autodetection code has been improved

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3av: remove unused ps3av_set_mode()
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:43 +0000 (01:29 -0700)]
ps3av: remove unused ps3av_set_mode()

remove unused ps3av_set_mode()

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3av: add quirk database for broken monitors
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:42 +0000 (01:29 -0700)]
ps3av: add quirk database for broken monitors

add a quirk database for broken monitors where the `best' advertised
video mode doesn't work

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3av: add autodetection for VESA modes
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:42 +0000 (01:29 -0700)]
ps3av: add autodetection for VESA modes

add autodetection for VESA modes

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3av: treat DVI-D like HDMI in autodetect
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:41 +0000 (01:29 -0700)]
ps3av: treat DVI-D like HDMI in autodetect

treat DVI-D monitors like HDMI monitors when autodetecting the best video mode

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3av: use PS3 video mode ids in autodetect code
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:41 +0000 (01:29 -0700)]
ps3av: use PS3 video mode ids in autodetect code

It doesn't make much sense to use the PS3AV_CMD_VIDEO_VID_* values in the
autodetection code, just to convert them to PS3 video mode ids afterwards.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3av: eliminate PS3AV_DEBUG
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:40 +0000 (01:29 -0700)]
ps3av: eliminate PS3AV_DEBUG

ps3av: eliminate PS3AV_DEBUG
  - Move ps3av_cmd_av_monitor_info_dump from ps3av_cmd.c to ps3av.c, as
it's
    used there only
  - Integrate ps3av_cmd_av_hw_conf_dump() into its sole user
  - Use pr_debug() for printing debug info

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3av: eliminate unneeded temporary variables
Geert Uytterhoeven [Tue, 16 Oct 2007 08:29:40 +0000 (01:29 -0700)]
ps3av: eliminate unneeded temporary variables

ps3av: eliminate unneeded temporary variables

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agovideo gfx: merge kconfig menus
Randy Dunlap [Tue, 16 Oct 2007 08:29:39 +0000 (01:29 -0700)]
video gfx: merge kconfig menus

Move AGP and DRM menus into the video graphics support menu.
  They use 'menuconfig' so that they can all be disabled with
  one selection.
Make the console menu use 'menuconfig' so that it can all be
  disabled with one selection.
Make the frame buffer menu use 'menuconfig' so that it can all be
  disabled with one selection.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agobf54x-lq043fb: framebuffer driver for Blackfin BF54x framebuffer device driver
Michael Hennerich [Tue, 16 Oct 2007 08:29:38 +0000 (01:29 -0700)]
bf54x-lq043fb: framebuffer driver for Blackfin BF54x framebuffer device driver

Blackfin BF54x framebuffer device driver for a SHARP LQ043T1DG01 TFT LCD

[adaplas]
Add 'fb' suffix to driver name.
Move Makefile entry under platform device section

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofbcon: logo: disable logo at boot
Randy Dunlap [Tue, 16 Oct 2007 08:29:37 +0000 (01:29 -0700)]
fbcon: logo: disable logo at boot

Add logo.nologo kernel boot option to disable the logo in order to provide
more screen space for kernel messages; especially useful when debugging and
screen space is more critical.

newport_con driver changes are untested.

[akpm@linux-foundation.org: cleanups, coding-style fixes]
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agopmagb-b-fb: improve diagnostics
Maciej W. Rozycki [Tue, 16 Oct 2007 08:29:36 +0000 (01:29 -0700)]
pmagb-b-fb: improve diagnostics

Add error messages to the probe call.

[adaplas]
On failure, return actual error value instead of -ENXIO.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>