]> bbs.cooldavid.org Git - net-next-2.6.git/log
net-next-2.6.git
13 years agoMerge branch 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek...
Linus Torvalds [Thu, 5 Aug 2010 21:19:50 +0000 (14:19 -0700)]
Merge branch 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6

* 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  kbuild: Change section of generated debian packages to kernel
  kbuild: Mark that the packages generated conform to Standards-Version 3.8.4
  kbuild: Add homepage field to debian/control file

13 years agoStaging: wlan-ng: Update prism2_set_tx_power() to use mBm
Christoph Fritz [Mon, 2 Aug 2010 19:53:35 +0000 (21:53 +0200)]
Staging: wlan-ng: Update prism2_set_tx_power() to use mBm

Commit fa61cf70a6ae1089e459e4b59b2e8d8e90d8535e updates nl80211's function
.set_tx_power to use mBm units instead of dBm for greater accuracy and
smaller power levels.

This patchs updates prism2_set_tx_power() accordingly.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: Merge staging-next into Linus's tree
Greg Kroah-Hartman [Thu, 5 Aug 2010 21:18:03 +0000 (14:18 -0700)]
Staging: Merge staging-next into Linus's tree

Conflicts:
drivers/staging/Kconfig
drivers/staging/batman-adv/bat_sysfs.c
drivers/staging/batman-adv/device.c
drivers/staging/batman-adv/hard-interface.c
drivers/staging/cx25821/cx25821-audups11.c

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoMerge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
Linus Torvalds [Thu, 5 Aug 2010 21:12:07 +0000 (14:12 -0700)]
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6

* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: (26 commits)
  kconfig: add savedefconfig
  kconfig: code refactoring in confdata.c
  kconfig: refactor code in symbol.c
  kconfig: add alldefconfig
  kconfig: print more info when we see a recursive dependency
  kconfig: save location of config symbols
  kconfig: change nonint_oldconfig to listnewconfig
  kconfig: rename loose_nonint_oldconfig => oldnoconfig
  kconfig: use long options in conf
  kconfig: fix MODULES-related bug in case of no .config
  kconfig: make randconfig fair for booleans
  kconfig: Don't write invisible choice values
  kbuild: Warn on selecting symbols with unmet direct dependencies
  scripts:conf.c Fix warning: variable 'type' set but not used
  menuconfig: truncate list items
  menuconfig: fix to center checklist correctly in a corner case
  xconfig: add support to show hidden options which have prompts
  xconfig: remove unused function
  xconfig: clean up
  gconfig: fix null pointer warning
  ...

13 years agoMerge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
Linus Torvalds [Thu, 5 Aug 2010 21:10:07 +0000 (14:10 -0700)]
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6

* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  modpost: support objects with more than 64k sections
  trivial: fix a typo in a filename
  frv: clean up arch/frv/Makefile
  kbuild: allow assignment to {A,C}FLAGS_KERNEL on the command line
  kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line
  Kbuild: Add option to set -femit-struct-debug-baseonly
  Makefile: "make kernelrelease" should show the correct full kernel version
  Makefile.build: make KBUILD_SYMTYPES work again

13 years agodriver core: device_rename's new_name can be const
Johannes Berg [Thu, 5 Aug 2010 15:38:18 +0000 (17:38 +0200)]
driver core: device_rename's new_name can be const

The new_name argument to device_rename() can be
const as kobject_rename's new_name argument is.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agosysfs: Remove owner field from sysfs struct attribute
Guenter Roeck [Thu, 29 Jul 2010 05:09:26 +0000 (22:09 -0700)]
sysfs: Remove owner field from sysfs struct attribute

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agopowerpc/pci: Remove owner field from attribute initialization in PCI bridge init
Guenter Roeck [Thu, 29 Jul 2010 05:09:25 +0000 (22:09 -0700)]
powerpc/pci: Remove owner field from attribute initialization in PCI bridge init

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoregulator: Remove owner field from attribute initialization in regulator core driver
Guenter Roeck [Thu, 29 Jul 2010 05:09:24 +0000 (22:09 -0700)]
regulator: Remove owner field from attribute initialization in regulator core driver

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoleds: Remove owner field from attribute initialization in bd2802 driver
Guenter Roeck [Thu, 29 Jul 2010 05:09:23 +0000 (22:09 -0700)]
leds: Remove owner field from attribute initialization in bd2802 driver

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoscsi: Remove owner field from attribute initialization in ARCMSR driver
Guenter Roeck [Thu, 29 Jul 2010 05:09:22 +0000 (22:09 -0700)]
scsi: Remove owner field from attribute initialization in ARCMSR driver

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoscsi: Remove owner field from attribute initialization in LPFC driver
Guenter Roeck [Thu, 29 Jul 2010 05:09:21 +0000 (22:09 -0700)]
scsi: Remove owner field from attribute initialization in LPFC driver

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agocgroupfs: create /sys/fs/cgroup to mount cgroupfs on
Greg KH [Thu, 5 Aug 2010 20:53:35 +0000 (13:53 -0700)]
cgroupfs: create /sys/fs/cgroup to mount cgroupfs on

We really shouldn't be asking userspace to create new root filesystems.
So follow along with all of the other in-kernel filesystems, and provide
a mount point in sysfs.

For cgroupfs, this should be in /sys/fs/cgroup/  This change provides
that mount point when the cgroup filesystem is registered in the kernel.

Acked-by: Paul Menage <menage@google.com>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Lennart Poettering <lennart@poettering.net>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoDriver core: Add BUS_NOTIFY_BIND_DRIVER
Magnus Damm [Fri, 23 Jul 2010 10:56:18 +0000 (19:56 +0900)]
Driver core: Add BUS_NOTIFY_BIND_DRIVER

Add BUS_NOTIFY_BIND_DRIVER as a bus notifier event.

For driver binding/unbinding we with this in
place have the following bus notifier events:
 - BUS_NOTIFY_BIND_DRIVER - before ->probe()
 - BUS_NOTIFY_BOUND_DRIVER - after ->probe()
 - BUS_NOTIFY_UNBIND_DRIVER - before ->remove()
 - BUS_NOTIFY_UNBOUND_DRIVER - after ->remove()

The event BUS_NOTIFY_BIND_DRIVER allows bus code
to be notified that ->probe() is about to be called.

Useful for bus code that needs to setup hardware before
the driver gets to run. With this in place platform
drivers can be loaded and unloaded as modules and the
new BIND event allows bus code to control for instance
device clocks that must be enabled before the driver
can be executed.

Without this patch there is no way for the bus code to
get notified that a modular driver is about to be probed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agodriver core: fix memory leak on one error path in bus_register()
Jike Song [Thu, 15 Jul 2010 09:43:54 +0000 (17:43 +0800)]
driver core: fix memory leak on one error path in bus_register()

Reported-by: huangweibing@gmail.com
Signed-off-by: Jike Song <albcamus@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agodebugfs: no longer needs to depend on SYSFS
Randy Dunlap [Tue, 20 Jul 2010 23:04:51 +0000 (16:04 -0700)]
debugfs: no longer needs to depend on SYSFS

debugfs no longer uses 'kernel_subsys' (which is gone), and other
kernel/ksysfs.c code is always built, so DEBUG_FS does not need
to depend on SYSFS.

Fixes this kconfig warning:

warning: (TREE_RCU_TRACE || AMD_IOMMU_STATS && AMD_IOMMU || MTD_UBI_DEBUG && MTD && SYSFS && MTD_UBI || UBIFS_FS_DEBUG && MISC_FILESYSTEMS && UBIFS_FS || DEBUG_KMEMLEAK && DEBUG_KERNEL && EXPERIMENTAL && !MEMORY_HOTPLUG && (X86 || ARM || PPC || S390 || SPARC64 || SUPERH || MICROBLAZE) && SYSFS || TRACING || X86_PTDUMP && DEBUG_KERNEL || BLK_DEV_IO_TRACE && TRACING_SUPPORT && FTRACE && SYSFS && BLOCK) selects DEBUG_FS which has unmet direct dependencies (SYSFS)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agosysfs: Fix one more signature discrepancy between sysfs implementation and docs.
Ira Weiny [Thu, 15 Jul 2010 18:34:44 +0000 (11:34 -0700)]
sysfs: Fix one more signature discrepancy between sysfs implementation and docs.

Signed-off-by: Ira Weiny <weiny2@llnl.gov>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agosysfs: fix discrepancies between implementation and documentation
Bart Van Assche [Tue, 20 Jul 2010 22:22:05 +0000 (15:22 -0700)]
sysfs: fix discrepancies between implementation and documentation

Fix all discrepancies I know of between the sysfs implementation and its
documentation.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agodcdbas: remove a redundant smi_data_buf_free in dcdbas_exit
Axel Lin [Mon, 5 Jul 2010 01:35:47 +0000 (09:35 +0800)]
dcdbas: remove a redundant smi_data_buf_free in dcdbas_exit

smi_data_buf_free is called twice in current implementation.
The second call simply return because smi_data_buf is set to NULL in first call.
This patch removes the second smi_data_buf_free call.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agodmi-id: fix a memory leak in dmi_id_init error path
Axel Lin [Thu, 1 Jul 2010 02:35:07 +0000 (10:35 +0800)]
dmi-id: fix a memory leak in dmi_id_init error path

This patch adds a missing kfree(dmi_dev) in dmi_id_init error path.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agosysfs: sysfs_chmod_file's attr can be const
Jean Delvare [Fri, 2 Jul 2010 14:54:05 +0000 (16:54 +0200)]
sysfs: sysfs_chmod_file's attr can be const

sysfs_chmod_file doesn't change the attribute it operates on, so this
attribute can be marked const.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agofirmware: Update hotplug script
Magnus Damm [Fri, 25 Jun 2010 08:55:11 +0000 (17:55 +0900)]
firmware: Update hotplug script

Update the in-kernel hotplug example script to work
properly with recent kernels. Without this fix the
script may load the firmware twice - both at "add"
and "remove" time.

The second load only triggers in the case when multiple
firmware images are used. A good example is the b43
driver which does not work properly without this fix.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoDriver core: move platform device creation helpers to .init.text (if MODULE=n)
Uwe Kleine-König [Mon, 21 Jun 2010 14:11:45 +0000 (16:11 +0200)]
Driver core: move platform device creation helpers to .init.text (if MODULE=n)

Platform devices should only be called by init code, so it should be
possible to move creation helpers to .init.text -- at least if modules
are disabled.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoDriver core: reduce duplicated code for platform_device creation
Uwe Kleine-König [Mon, 21 Jun 2010 14:11:44 +0000 (16:11 +0200)]
Driver core: reduce duplicated code for platform_device creation

This makes the two similar functions platform_device_register_simple
and platform_device_register_data one line inline functions using a new
generic function platform_device_register_resndata.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoDriver core: use kmemdup in platform_device_add_resources
Uwe Kleine-König [Tue, 15 Jun 2010 08:47:55 +0000 (10:47 +0200)]
Driver core: use kmemdup in platform_device_add_resources

This makes platform_device_add_resources look like
platform_device_add_data.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agofirmware loader: embed device into firmware_priv structure
Dmitry Torokhov [Fri, 4 Jun 2010 07:54:43 +0000 (00:54 -0700)]
firmware loader: embed device into firmware_priv structure

Both these structures have the same lifetime rules so instead of allocating
and managing them separately embed struct device into struct firmware_priv.
Also make sure to delete sysfs attributes ourselves instead of expecting
sysfs to clean up our mess.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agofirmware loader: use statically initialized data attribute
Dmitry Torokhov [Fri, 4 Jun 2010 07:54:37 +0000 (00:54 -0700)]
firmware loader: use statically initialized data attribute

There is no reason why we are using a template for binary attribute
and copying it into per-firmware data before registering. Using the
original works as well.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoDriver core: Drop __must_check from bus_for_each_drv()
Jean Delvare [Wed, 16 Jun 2010 09:44:18 +0000 (11:44 +0200)]
Driver core: Drop __must_check from bus_for_each_drv()

There is little rationale for marking bus_for_each_drv() __must_check.
It is more of an iteration helper than a real function. You don't know
in advance which callback it will be used on, so you have no clue how
important it can be to check the returned value. In practice, this
helper function can be used for best-effort tasks.

As a matter of fact, bus_for_each_dev() is not marked __must_check.
So remove it from bus_for_each_drv() as well. This is the same that
was done back in October 2006 by Russell King for
device_for_each_child(), for exactly the same reasons.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoDriver core: internal struct dma_coherent_mem, change type of a member.
Marin Mitov [Mon, 31 May 2010 10:03:04 +0000 (13:03 +0300)]
Driver core: internal struct dma_coherent_mem, change type of a member.

struct dma_coherent_mem in drivers/base/dma-coherent.c
has member 'device_base' that is of type u32,
but is assigned value of type dma_addr_t, which may be
64 bits for x86_64. Change the type to dma_addr_t.

Signed-off-by: Marin Mitov <mitov@issp.bas.bg>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agohotplug: Support kernel/hotplug sysctl variable when !CONFIG_NET
Ian Abbott [Mon, 7 Jun 2010 11:57:12 +0000 (12:57 +0100)]
hotplug: Support kernel/hotplug sysctl variable when !CONFIG_NET

The kernel/hotplug sysctl variable (/proc/sys/kernel/hotplug file) was
made conditional on CONFIG_NET by commit
f743ca5e10f4145e0b3e6d11b9b46171e16af7ce (applied in 2.6.18) to fix
problems with undefined references in 2.6.16 when CONFIG_HOTPLUG=y &&
!CONFIG_NET, but this restriction is no longer needed.

This patch makes the kernel/hotplug sysctl variable depend only on
CONFIG_HOTPLUG.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Randy Dunlap <randy.dunlap@oracle.COM>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agouio: Remove IRQF_DISABLED flag from uio_cif.c
Hans J. Koch [Wed, 9 Jun 2010 23:18:08 +0000 (01:18 +0200)]
uio: Remove IRQF_DISABLED flag from uio_cif.c

Remove IRQF_DISABLED since it is deprecated and a no-op in the
current kernel.

Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agouio: Remove IRQF_DISABLED from uio_sercos3.c
Hans J. Koch [Wed, 9 Jun 2010 23:15:49 +0000 (01:15 +0200)]
uio: Remove IRQF_DISABLED from uio_sercos3.c

Remove IRQF_DISABLED since it is deprecated and a no-op in the
current kernel.

Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Acked-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agouio: Remove IRQF_DISABLED flag from uio_pdrv_genirq.c
Hans J. Koch [Wed, 9 Jun 2010 23:12:32 +0000 (01:12 +0200)]
uio: Remove IRQF_DISABLED flag from uio_pdrv_genirq.c

Remove IRQF_DISABLED flag since it is deprecated and a no-op in the
current kernel.

Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoMerge branch 'modules' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux...
Linus Torvalds [Thu, 5 Aug 2010 20:49:55 +0000 (13:49 -0700)]
Merge branch 'modules' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus

* 'modules' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  module: cleanup comments, remove noinline
  module: group post-relocation functions into post_relocation()
  module: move module args strndup_user to just before use
  module: pass load_info into other functions
  module: fix sysfs cleanup for !CONFIG_SYSFS
  module: sysfs cleanup
  module: layout_and_allocate
  module: fix crash in get_ksymbol() when oopsing in module init
  module: kallsyms functions take struct load_info
  module: refactor out section header rewriting: FIX modversions
  module: refactor out section header rewriting
  module: add load_info
  module: reduce stack usage for each_symbol()
  module: refactor load_module part 5
  module: refactor load_module part 4
  module: refactor load_module part 3
  module: refactor load_module part 2
  module: refactor load_module
  module: module_unload_init() cleanup

13 years agoMerge branch 'virtio' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux...
Linus Torvalds [Thu, 5 Aug 2010 20:49:37 +0000 (13:49 -0700)]
Merge branch 'virtio' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus

* 'virtio' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  virtio_blk: Remove VBID ioctl
  virtio_blk: Add 'serial' attribute to virtio-blk devices (v2)
  virtio_blk: support barriers without FLUSH feature

13 years agoMerge branch 'upstream/xen' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen
Linus Torvalds [Thu, 5 Aug 2010 20:45:50 +0000 (13:45 -0700)]
Merge branch 'upstream/xen' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen

* 'upstream/xen' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen: (23 commits)
  xen/panic: use xen_reboot and fix smp_send_stop
  Xen: register panic notifier to take crashes of xen guests on panic
  xen: support large numbers of CPUs with vcpu info placement
  xen: drop xen_sched_clock in favour of using plain wallclock time
  pvops: do not notify callers from register_xenstore_notifier
  Introduce CONFIG_XEN_PVHVM compile option
  blkfront: do not create a PV cdrom device if xen_hvm_guest
  support multiple .discard.* sections to avoid section type conflicts
  xen/pvhvm: fix build problem when !CONFIG_XEN
  xenfs: enable for HVM domains too
  x86: Call HVMOP_pagetable_dying on exit_mmap.
  x86: Unplug emulated disks and nics.
  x86: Use xen_vcpuop_clockevent, xen_clocksource and xen wallclock.
  implement O_NONBLOCK for /proc/xen/xenbus
  xen: Fix find_unbound_irq in presence of ioapic irqs.
  xen: Add suspend/resume support for PV on HVM guests.
  xen: Xen PCI platform device driver.
  x86/xen: event channels delivery on HVM.
  x86: early PV on HVM features initialization.
  xen: Add support for HVM hypercalls.
  ...

13 years agoext4: Adding error check after calling ext4_mb_regular_allocator()
Aditya Kali [Thu, 5 Aug 2010 20:22:24 +0000 (16:22 -0400)]
ext4: Adding error check after calling ext4_mb_regular_allocator()

If the bitmap block on disk is bad, ext4_mb_load_buddy() returns an
error. This error is returned to the caller,
ext4_mb_regular_allocator() and then to ext4_mb_new_blocks().  But
ext4_mb_new_blocks() did not check for the return value of
ext4_mb_regular_allocator() and would repeatedly try to load the
bitmap block. The fix simply catches the return value and exits out of
the 'repeat' loop after cleanup.

We also take the opportunity to clean up the error handling in
ext4_mb_new_blocks().

Google-Bug-Id: 2853530

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agodocbook: use IDs as filenames to support multiple books
Johannes Berg [Thu, 5 Aug 2010 18:23:11 +0000 (11:23 -0700)]
docbook: use IDs as filenames to support multiple books

I'm trying to generate a <set> of <book>s in docbook for wireless to
link together all the cfg80211 and mac80211 documentation.

However, docbook will generate "re01.html" anew for each book for the
first <refentry>, presumably due to a bug in the stylesheets.

An effective workaround is to use IDs for the filenames, which makes
them more descriptive as well, e.g.  API-enum-ieee80211-band.html.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation: fix kbuild typos and wording
Nicolas Kaiser [Thu, 5 Aug 2010 18:23:11 +0000 (11:23 -0700)]
Documentation: fix kbuild typos and wording

Fixed some typos and wording.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation: update kbuild make typos/grammar/text flow
Matt Mooney [Thu, 5 Aug 2010 18:23:11 +0000 (11:23 -0700)]
Documentation: update kbuild make typos/grammar/text flow

Update section 3.7 examples to reflect the current state of the
Makefiles used. Fix spelling and grammar errors along with flow of text.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation: update kbuild make examples#2 to reflect changes
Matt Mooney [Thu, 5 Aug 2010 18:23:11 +0000 (11:23 -0700)]
Documentation: update kbuild make examples#2 to reflect changes

Update section 3.2 and 3.5 example, along with text in section 3.5
to reflect change.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation: update kbuild loadable modules goals & examples
Matt Mooney [Thu, 5 Aug 2010 18:23:11 +0000 (11:23 -0700)]
Documentation: update kbuild loadable modules goals & examples

Update section 3.3 Loadable module goals - obj-m, from $(<module_name>-objs)
to $(<module_name>-y) for easier addition of conditional objects to the
module. The examples are also updated to reflect the current state of
each Makefile used.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation/vm: fix spelling in page-types.c
Tommi Rantala [Thu, 5 Aug 2010 18:23:11 +0000 (11:23 -0700)]
Documentation/vm: fix spelling in page-types.c

Trivial typo fixes.

Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoaio: fix wrong subsystem comments
Satoru Takeuchi [Thu, 5 Aug 2010 18:23:11 +0000 (11:23 -0700)]
aio: fix wrong subsystem comments

 - sys_io_destroy(): acutually return -EINVAL if the context pointed to
   is invalidIndex: linux-2.6.33-rc4/fs/aio.c
 - sys_io_getevents(): An argument specifying timeout is not `when',
   but `timeout'.
 - sys_io_getevents(): Should describe what is returned if this syscall
   succeeds.

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoext3: Fix dirtying of journalled buffers in data=journal mode
Jan Kara [Thu, 5 Aug 2010 10:38:26 +0000 (12:38 +0200)]
ext3: Fix dirtying of journalled buffers in data=journal mode

In data=journal mode, we still use block_write_begin() to prepare page for
writing. This function can occasionally mark buffer dirty which violates
journalling assumptions - when a buffer is part of a transaction, it should be
dirty and a buffer can be already part of a forget list of some transaction
when block_write_begin() gets called. This violation of journalling assumptions
then results in "JBD: Spotted dirty metadata buffer..." warnings.

In fact, temporary dirtying the buffer while the page is still locked does not
really cause problems to the journalling because we won't write the buffer
until the page gets unlocked. So we just have to make sure to clear dirty bits
before unlocking the page.

Reviewed-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Jan Kara <jack@suse.cz>
13 years agofs/dlm: Drop unnecessary null test
Julia Lawall [Tue, 3 Aug 2010 21:34:16 +0000 (23:34 +0200)]
fs/dlm: Drop unnecessary null test

hlist_for_each_entry binds its first argument to a non-null value, and thus
any null test on the value of that argument is superfluous.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
iterator I;
expression x,E,E1,E2;
statement S,S1,S2;
@@

I(x,...) { <...
- (x != NULL) &&
  E
  ...> }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David Teigland <teigland@redhat.com>
13 years agodlm: use genl_register_family_with_ops()
Changli Gao [Mon, 26 Jul 2010 09:19:19 +0000 (17:19 +0800)]
dlm: use genl_register_family_with_ops()

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David Teigland <teigland@redhat.com>
13 years agoext4: Fix dirtying of journalled buffers in data=journal mode
Jan Kara [Thu, 5 Aug 2010 18:41:42 +0000 (14:41 -0400)]
ext4: Fix dirtying of journalled buffers in data=journal mode

In data=journal mode, we still use block_write_begin() to prepare
page for writing. This function can occasionally mark buffer dirty
which violates journalling assumptions - when a buffer is part of
a transaction, it should be dirty and a buffer can be already part
of a forget list of some transaction when block_write_begin()
gets called. This violation of journalling assumptions then results
in "JBD: Spotted dirty metadata buffer..." warnings.

In fact, temporary dirtying the buffer while the page is still locked
does not really cause problems to the journalling because we won't write
the buffer until the page gets unlocked. So we just have to make sure
to clear dirty bits before unlocking the page.

Signed-off-by: Jan Kara <jack@suse.cz>
13 years agoDNS: Make AFS go to the DNS for AFSDB records for unknown cells
Wang Lei [Wed, 4 Aug 2010 14:16:38 +0000 (15:16 +0100)]
DNS: Make AFS go to the DNS for AFSDB records for unknown cells

Add DNS query support for AFS so that it can get the IP addresses of Volume
Location servers from the DNS using an AFSDB record.

This requires userspace support.  /etc/request-key.conf must be configured to
invoke a helper for dns_resolver type keys with a subtype of "afsdb:" in the
description.

Signed-off-by: Wang Lei <wang840925@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agoDNS: Separate out CIFS DNS Resolver code
Wang Lei [Wed, 4 Aug 2010 14:16:33 +0000 (15:16 +0100)]
DNS: Separate out CIFS DNS Resolver code

Separate out the DNS resolver key type from the CIFS filesystem into its own
module so that it can be made available for general use, including the AFS
filesystem module.

This facility makes it possible for the kernel to upcall to userspace to have
it issue DNS requests, package up the replies and present them to the kernel
in a useful form.  The kernel is then able to cache the DNS replies as keys
can be retained in keyrings.

Resolver keys are of type "dns_resolver" and have a case-insensitive
description that is of the form "[<type>:]<domain_name>".  The optional <type>
indicates the particular DNS lookup and packaging that's required.  The
<domain_name> is the query to be made.

If <type> isn't given, a basic hostname to IP address lookup is made, and the
result is stored in the key in the form of a printable string consisting of a
comma-separated list of IPv4 and IPv6 addresses.

This key type is supported by userspace helpers driven from /sbin/request-key
and configured through /etc/request-key.conf.  The cifs.upcall utility is
invoked for UNC path server name to IP address resolution.

The CIFS functionality is encapsulated by the dns_resolve_unc_to_ip() function,
which is used to resolve a UNC path to an IP address for CIFS filesystem.  This
part remains in the CIFS module for now.

See the added Documentation/networking/dns_resolver.txt for more information.

Signed-off-by: Wang Lei <wang840925@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agocifs: account for new creduid=0x%x parameter in spnego upcall string
Jeff Layton [Tue, 3 Aug 2010 14:19:50 +0000 (10:19 -0400)]
cifs: account for new creduid=0x%x parameter in spnego upcall string

The commit that added the creduid=0x%x parameter failed to increase the
buffer allocation to account for it.

Reported-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agocifs: reduce false positives with inode aliasing serverino autodisable
Jeff Layton [Mon, 2 Aug 2010 21:43:54 +0000 (17:43 -0400)]
cifs: reduce false positives with inode aliasing serverino autodisable

It turns out that not all directory inodes with dentries on the
i_dentry list are unusable here. We only consider them unusable if they
are still hashed or if they have a root dentry attached.

Full disclosure -- this check is inherently racy. There's nothing that
stops someone from slapping a new dentry onto this inode just after
this check, or hashing an existing one that's already attached. So,
this is really a "best effort" thing to work around misbehaving servers.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agoCIFS: Make cifs_convert_address() take a const src pointer and a length
David Howells [Thu, 22 Jul 2010 17:33:01 +0000 (18:33 +0100)]
CIFS: Make cifs_convert_address() take a const src pointer and a length

Make cifs_convert_address() take a const src pointer and a length so that all
the strlen() calls in their can be cut out and to make it unnecessary to modify
the src string.

Also return the data length from dns_resolve_server_name_to_ip() so that a
strlen() can be cut out of cifs_compose_mount_options() too.

Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agocifs: show features compiled in as part of DebugData
Suresh Jayaraman [Fri, 30 Jul 2010 12:55:56 +0000 (18:25 +0530)]
cifs: show features compiled in as part of DebugData

Fixed the nit pointed out by Jeff.

From: Suresh Jayaraman <sjayaraman@suse.de>
Subject: [PATCH 1/2] cifs: show features compiled in as part of DebugData

This patch adds the features that are compiled in to the CIFS debugging data
as shown below:

$cat /proc/fs/cifs/DebugData
Display Internal CIFS Data Structures for Debugging
---------------------------------------------------
CIFS Version 1.64
Features: dfs fscache posix spnego xattr
Active VFS Requests: 0
...

This patch provides a definitive way to tell what features are currently
enabled in the running kernel. This could also help debugging.

Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
Cc: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agocifs: update README
Suresh Jayaraman [Fri, 30 Jul 2010 12:31:17 +0000 (18:01 +0530)]
cifs: update README

Update the README file to reflect that now DebugData shows all
the features enabled.

Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
Cc: Jeff Layton <jlayton@redhat.com>
--
 fs/cifs/README |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agodavinci: dm646x EVM: Specify reserved EDMA channel/slots
Rajashekhara, Sudhakar [Tue, 29 Jun 2010 06:05:15 +0000 (11:35 +0530)]
davinci: dm646x EVM: Specify reserved EDMA channel/slots

Not all the channels and slots available on the DM646x EVM
are used by the devices on the EVM. These resources can be
used by the DSP to speed up codec operations.

This patch reserves these channels for the DSP.

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
13 years agodavinci: da8xx/omapl EVM: Specify reserved channels/slots
Rajashekhara, Sudhakar [Tue, 29 Jun 2010 06:05:14 +0000 (11:35 +0530)]
davinci: da8xx/omapl EVM: Specify reserved channels/slots

The drivers on da8xx/omapl EVMs do not utilize all the channels
and slots provided by EDMA. Some of these are better utilitzed by
the DSP on the SoC for speeding up codec operations.

Reserve these channels/slots for the DSP.

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
13 years agodavinci: support for EDMA resource sharing
Rajashekhara, Sudhakar [Tue, 29 Jun 2010 06:05:13 +0000 (11:35 +0530)]
davinci: support for EDMA resource sharing

Current EDMA driver is not taking care of EDMA channels/slots
which are allocated from other processor, say DSP. If a
channel/slot is allocated from DSP, the existing EDMA driver
can still allocate the same resource on ARM.

This patch enables the user to pass the channel/slots reserved
for DSP as platform data. EDMA driver scans this list during
probe and prepares a bitmap of channel/slots which can be used
on ARM side.

Trying to reserve channels by doing a 'pre-allocate' using
edma_alloc_{slot|channel}() API does not work because

1) The reservation should be done in probe() to avoid race
   with other ARM side driver trying to use EDMA

2) The alloc channel API sets up the access through shadow region
   0 which will be incorrect for DSP usage. It also sets up the
   channel <-> queue number mapping which is not required as DSP
   will likely do its own mapping anyway.

3) (minor) There is no API to allocate channels in bulk.

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
13 years agodavinci: edma: provide ability to detect insufficient CC info data
Sekhar Nori [Tue, 29 Jun 2010 06:05:12 +0000 (11:35 +0530)]
davinci: edma: provide ability to detect insufficient CC info data

This patch modifies the EDMA driver to expect the channel
controller (CC) infomation passed on by the platform as a fixed
size (EDMA_MAX_CC) array of pointers to structures.

Doing so helps catch errors of the sort where the resource
structure has information for more channel controllers than
the number channel controller info structures defined.

Such insufficient platform data would lead to illegal memory
accesses.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
13 years agodavinci: da8xx: sparse cleanup: remove duplicate entries in irq priorities
Sekhar Nori [Mon, 28 Jun 2010 11:46:37 +0000 (17:16 +0530)]
davinci: da8xx: sparse cleanup: remove duplicate entries in irq priorities

This patch helps get rid of the following sparse warnings
of the type:

  CHECK   arch/arm/mach-davinci/da830.c
arch/arm/mach-davinci/da830.c:1026:3: warning: Initializer entry defined twice
arch/arm/mach-davinci/da830.c:1027:3:   also defined here

coming from the irq priorities array init.

Apart from one instance of genuinie repetition, most are are instances
of multiple #defines of the same interrupt number. I have not
removed the multiple definitions from the irq.h file in the hope
that someone might decide to use them as shared interrupts at some
point of time. The priority initialization however needs to be done
only once and hence has been corrected.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
13 years agodavinci: DM365: fixed second serial port
Thomas Koeller [Tue, 22 Jun 2010 12:08:12 +0000 (14:08 +0200)]
davinci: DM365: fixed second serial port

The register base address for the second serial port (UART1) was
wrong.

Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
13 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Thu, 5 Aug 2010 16:03:46 +0000 (09:03 -0700)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (79 commits)
  powerpc/8xx: Add support for the MPC8xx based boards from TQC
  powerpc/85xx: Introduce support for the Freescale P1022DS reference board
  powerpc/85xx: Adding DTS for the STx GP3-SSA MPC8555 board
  powerpc/85xx: Change deprecated binding for 85xx-based boards
  powerpc/tqm85xx: add a quirk for ti1520 PCMCIA bridge
  powerpc/tqm85xx: update PCI interrupt-map attribute
  powerpc/mpc8308rdb: support for MPC8308RDB board from Freescale
  powerpc/fsl_pci: add quirk for mpc8308 pcie bridge
  powerpc/85xx: Cleanup QE initialization for MPC85xxMDS boards
  powerpc/85xx: Fix booting for P1021MDS boards
  powerpc/85xx: Fix SWIOTLB initalization for MPC85xxMDS boards
  powerpc/85xx: kexec for SMP 85xx BookE systems
  powerpc/5200/i2c: improve i2c bus error recovery
  of/xilinxfb: update tft compatible versions
  powerpc/fsl-diu-fb: Support setting display mode using EDID
  powerpc/5121: doc/dts-bindings: update doc of FSL DIU bindings
  powerpc/5121: shared DIU framebuffer support
  powerpc/5121: move fsl-diu-fb.h to include/linux
  powerpc/5121: fsl-diu-fb: fix issue with re-enabling DIU area descriptor
  powerpc/512x: add clock structure for Video-IN (VIU) unit
  ...

13 years agoMerge branch 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze
Linus Torvalds [Thu, 5 Aug 2010 15:59:22 +0000 (08:59 -0700)]
Merge branch 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze

* 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze: (49 commits)
  microblaze: Add KGDB support
  microblaze: Support brki rX, 0x18 for user application debugging
  microblaze: Remove nop after MSRCLR/SET, MTS, MFS instructions
  microblaze: Simplify syscall rutine
  microblaze: Move PT_MODE saving to delay slot
  microblaze: Fix _interrupt function
  microblaze: Fix _user_exception function
  microblaze: Put together addik instructions
  microblaze: Use delay slot in syscall macros
  microblaze: Save kernel mode in delay slot
  microblaze: Do not mix register saving and mode setting
  microblaze: Move SAVE_STATE upward
  microblaze: entry.S: Macro optimization
  microblaze: Optimize hw exception rutine
  microblaze: Implement clear_ums macro and fix SAVE_STATE macro
  microblaze: Remove additional setup for kernel_mode
  microblaze: Optimize SAVE_STATE macro
  microblaze: Remove additional loading
  microblaze: Completely remove working with R11 register
  microblaze: Do not setup BIP in _debug_exception
  ...

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Thu, 5 Aug 2010 15:58:30 +0000 (08:58 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  arch/sparc/mm: Use GFP_KERNEL
  MAINTAINERS: Add trailing slash to SBUS path.
  sbus: autoconvert trivial BKL users to private mutex

13 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Thu, 5 Aug 2010 15:57:50 +0000 (08:57 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] increase ia64 static per cpu area
  [IA64] Put ia64 config files on the Uwe Kleine-König diet
  [IA64] perfmon: convert to unlocked_ioctl
  [IA64] beautify vmlinux.lds.h

13 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Thu, 5 Aug 2010 15:53:20 +0000 (08:53 -0700)]
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: (150 commits)
  MIPS: PowerTV: Separate PowerTV USB support from non-USB code
  MIPS: strip the un-needed sections of vmlinuz
  MIPS: Clean up the calculation of VMLINUZ_LOAD_ADDRESS
  MIPS: Clean up arch/mips/boot/compressed/decompress.c
  MIPS: Clean up arch/mips/boot/compressed/ld.script
  MIPS: Unify the suffix of compressed vmlinux.bin
  MIPS: PowerTV: Add Gaia platform definitions.
  MIPS: BCM47xx: Fix nvram_getenv return value.
  MIPS: Octeon: Allow more than 3.75GB of memory with PCIe
  MIPS: Clean up notify_die() usage.
  MIPS: Remove unused task_struct.trap_no field.
  Documentation: Mention that KProbes is supported on MIPS
  SAMPLES: kprobe_example: Make it print something on MIPS.
  MIPS: kprobe: Add support.
  MIPS: Add instrunction format for BREAK and SYSCALL
  MIPS: kprobes: Define regs_return_value()
  MIPS: Ritually kill stupid printk.
  MIPS: Octeon: Disallow MSI-X interrupt and fall back to MSI interrupts.
  MIPS: Octeon: Support 256 MSI on PCIe
  MIPS: Decode core number for R2 CPUs.
  ...

13 years agokgdb,docs: Update the kgdb docs to include kms
Jason Wessel [Thu, 5 Aug 2010 14:22:33 +0000 (09:22 -0500)]
kgdb,docs: Update the kgdb docs to include kms

Update the kgdb docs to include information about kernel mode setting support.

[Randy Dunlap <rdunlap@xenotime.net>: grammatical corrections]

CC: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6
Linus Torvalds [Thu, 5 Aug 2010 15:49:42 +0000 (08:49 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6:
  xtensa: Disable PCI and nfsroot on simulation target
  xtensa: Add missing include in coprocessor.h
  xtensa: Fix the network driver for the simulator target
  xtensa: Shuffle include statements to fix linker script
  xtensa: Add -mforce-no-pic option is supported
  xtensa: Fixes due to bss boundary symbol name changes.
  xtensa: Fix linker script patch-up
  xtensa: Fix FLUSH_DCACHE macro for some variants.

13 years agonick piggin: change email address
Nick Piggin [Thu, 5 Aug 2010 11:08:09 +0000 (21:08 +1000)]
nick piggin: change email address

Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrm_fb_helper: Preserve capability to use atomic kms
Jason Wessel [Thu, 5 Aug 2010 14:22:32 +0000 (09:22 -0500)]
drm_fb_helper: Preserve capability to use atomic kms

Commit 5349ef3127c77075ff70b2014f17ae0fbcaaf199 (drm/fb: fix
FBIOGET/PUT_VSCREENINFO pixel clock handling) changed the logic of
when a pixclock was valid vs invalid.

The atomic kernel mode setting used by the kernel debugger relies upon
the drm_fb_helper_check_var() to always return -EINVAL.  Until a
better solution exists, this behavior will be restored.

CC: David Airlie <airlied@linux.ie>
CC: Jesse Barnes <jbarnes@virtuousgeek.org>
CC: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
13 years agoi915: when kgdb is active display compression should be off
Jason Wessel [Thu, 5 Aug 2010 14:22:32 +0000 (09:22 -0500)]
i915: when kgdb is active display compression should be off

If the HW compression is left on, the call backs from the HW will
crash the kernel.  The only time this code is called is when kernel
mode setting is in use with kgdb and the kdb shell.

The atomic display pipe handler callback will reset everything when
kgdb restores kernel to the run state.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
CC: David Airlie <airlied@linux.ie>
13 years agodrm/i915: use new fb debug hooks
Jesse Barnes [Mon, 2 Aug 2010 19:07:50 +0000 (12:07 -0700)]
drm/i915: use new fb debug hooks

Implement atomic kernel mode settings using the fb layer's debug hook
system for supporting debugger interaction.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
13 years agodrm: add KGDB/KDB support
Jesse Barnes [Thu, 5 Aug 2010 14:22:31 +0000 (09:22 -0500)]
drm: add KGDB/KDB support

Implement the callbacks for KDB entry/exit via the drm helpers.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
13 years agofb: add hooks to handle KDB enter/exit
Jesse Barnes [Mon, 2 Aug 2010 19:05:41 +0000 (12:05 -0700)]
fb: add hooks to handle KDB enter/exit

Add fb ops to handle enter/exit of the kernel debugger.  If present, the
fb core will register them with KGDB and they'll be called when the
debugger is entered and exited.  The new functions are responsible for
switching to an appropriate debug framebuffer and restoring the
interrupted state at exit time.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
13 years agokgdboc: Add call backs to allow kernel mode switching
Jason Wessel [Thu, 5 Aug 2010 14:22:30 +0000 (09:22 -0500)]
kgdboc: Add call backs to allow kernel mode switching

Add the kms keyword processing to kgdboc and the callbacks to invoke
console switching when ever kgdboc is started with "kgdboc=kms,kbd".

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agovt,console,kdb: automatically set kdb LINES variable
Jason Wessel [Thu, 5 Aug 2010 14:22:30 +0000 (09:22 -0500)]
vt,console,kdb: automatically set kdb LINES variable

The kernel console interface stores the number of lines it is
configured to use. The kdb debugger can greatly benefit by knowing how
many lines there are on the console for the pager functionality
without having the end user compile in the setting or have to
repeatedly change it at run time.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
CC: David Airlie <airlied@linux.ie>
CC: Andrew Morton <akpm@linux-foundation.org>
13 years agovt,console,kdb: implement atomic console enter/leave functions
Jesse Barnes [Thu, 5 Aug 2010 14:22:30 +0000 (09:22 -0500)]
vt,console,kdb: implement atomic console enter/leave functions

These functions allow the kernel debugger to save and restore the
state of the system console.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
CC: David Airlie <airlied@linux.ie>
CC: Andrew Morton <akpm@linux-foundation.org>
13 years agodebug_core,kdb: fix crash when arch does not have single step
Jason Wessel [Thu, 5 Aug 2010 14:22:25 +0000 (09:22 -0500)]
debug_core,kdb: fix crash when arch does not have single step

When an arch such as mips and microblaze does not implement either HW
or software single stepping the debug core should re-enter kdb.  The
kdb code will properly ignore the single step operation.  Attempting
to single step the kernel without software or hardware support causes
unpredictable kernel crashes.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
13 years agokgdb,x86: use macro HBP_NUM to replace magic number 4
Dongdong Deng [Thu, 5 Aug 2010 14:22:25 +0000 (09:22 -0500)]
kgdb,x86: use macro HBP_NUM to replace magic number 4

Use the macros provided by the HW breakpoint API.

Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
13 years agokgdb,mips: remove unused kgdb_cpu_doing_single_step operations
Jason Wessel [Thu, 5 Aug 2010 14:22:25 +0000 (09:22 -0500)]
kgdb,mips: remove unused kgdb_cpu_doing_single_step operations

The mips kgdb specific code does not support software or HW single
stepping so it should not implement

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
CC: linux-mips@linux-mips.org
13 years agomm,kdb,kgdb: Add a debug reference for the kdb kmap usage
Jason Wessel [Thu, 5 Aug 2010 14:22:24 +0000 (09:22 -0500)]
mm,kdb,kgdb: Add a debug reference for the kdb kmap usage

The kdb kmap should never get used outside of the kernel debugger
exception context.

Signed-off-by: Jason Wessel<jason.wessel@windriver.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Ingo Molnar <mingo@elte.hu>
CC: linux-mm@kvack.org
13 years agoKGDB: Remove set but unused newPC
Andi Kleen [Thu, 5 Aug 2010 14:22:24 +0000 (09:22 -0500)]
KGDB: Remove set but unused newPC

Found by gcc 4.6's new warnings

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
13 years agoftrace,kdb: Allow dumping a specific cpu's buffer with ftdump
Jason Wessel [Thu, 5 Aug 2010 14:22:23 +0000 (09:22 -0500)]
ftrace,kdb: Allow dumping a specific cpu's buffer with ftdump

In systems with more than one processor it is desirable to look at the
per cpu trace buffers.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
13 years agoftrace,kdb: Extend kdb to be able to dump the ftrace buffer
Jason Wessel [Thu, 5 Aug 2010 14:22:23 +0000 (09:22 -0500)]
ftrace,kdb: Extend kdb to be able to dump the ftrace buffer

Add in a helper function to allow the kdb shell to dump the ftrace
buffer.

Modify trace.c to expose the capability to iterate over the ftrace
buffer in a read only capacity.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
13 years agokgdb,powerpc: Replace hardcoded offset by BREAK_INSTR_SIZE
Michal Simek [Thu, 5 Aug 2010 14:22:22 +0000 (09:22 -0500)]
kgdb,powerpc: Replace hardcoded offset by BREAK_INSTR_SIZE

kgdb_handle_breakpoint checks the first arch_kgdb_breakpoint
which is not known by gdb that's why is necessary jump over
it. The jump lenght is equal to BREAK_INSTR_SIZE that's
why is cleaner to use defined macro instead of hardcoded
non-described offset.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agoarm,kgdb: Add ability to trap into debugger on notify_die
Jason Wessel [Thu, 5 Aug 2010 14:22:22 +0000 (09:22 -0500)]
arm,kgdb: Add ability to trap into debugger on notify_die

Now that ARM implements the notify die handlers, add the ability for
the kernel debugger to receive the notifications.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
CC: Russell King <linux@arm.linux.org.uk>
CC: linux-arm-kernel@lists.infradead.org
13 years agogdbstub: do not directly use dbg_reg_def[] in gdb_cmd_reg_set()
Jason Wessel [Thu, 5 Aug 2010 14:22:22 +0000 (09:22 -0500)]
gdbstub: do not directly use dbg_reg_def[] in gdb_cmd_reg_set()

Presently the usable registers definitions on x86 are not contiguous
for kgdb.  The x86 kgdb uses a case statement for the sparse register
accesses.  The array which defines the registers (dbg_reg_def) should
not be used directly in order to safely work with sparse register
definitions.

Specifically there was a problem when gdb accesses ORIG_AX, which is
accessed only through the case statement.

This patch encodes register memory using the size information provided
from the debugger which avoids the need to look up the size of the
register.  The dbg_set_reg() function always further validates the
inputs from the debugger.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
13 years agogdbstub: Implement gdbserial 'p' and 'P' packets
Jason Wessel [Thu, 5 Aug 2010 14:22:21 +0000 (09:22 -0500)]
gdbstub: Implement gdbserial 'p' and 'P' packets

The gdbserial 'p' and 'P' packets allow gdb to individually get and
set registers instead of querying for all the available registers.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
13 years agokgdb,arm: Individual register get/set for arm
Jason Wessel [Thu, 5 Aug 2010 14:22:21 +0000 (09:22 -0500)]
kgdb,arm: Individual register get/set for arm

Implement the ability to individually get and set registers for kdb
and kgdb for arm.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
CC: Russell King <linux@arm.linux.org.uk>
CC: linux-arm-kernel@lists.infradead.org
13 years agokgdb,mips: Individual register get/set for mips
Jason Wessel [Thu, 5 Aug 2010 14:22:21 +0000 (09:22 -0500)]
kgdb,mips: Individual register get/set for mips

Implement the ability to individually get and set registers for kdb
and kgdb for mips.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
CC: linux-mips@linux-mips.org
13 years agokgdb,x86: Individual register get/set for x86
Jason Wessel [Thu, 5 Aug 2010 14:22:20 +0000 (09:22 -0500)]
kgdb,x86: Individual register get/set for x86

Implement the ability to individually get and set registers for kdb
and kgdb for x86.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
CC: Ingo Molnar <mingo@redhat.com>
CC: x86@kernel.org
13 years agokgdb,kdb: individual register set and and get API
Jason Wessel [Thu, 5 Aug 2010 14:22:20 +0000 (09:22 -0500)]
kgdb,kdb: individual register set and and get API

The kdb shell specification includes the ability to get and set
architecture specific registers by name.

For the time being individual register get and set will be implemented
on a per architecture basis.  If an architecture defines
DBG_MAX_REG_NUM > 0 then kdb and the gdbstub will use the capability
for individually getting and setting architecture specific registers.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
13 years agogdbstub: Optimize kgdb's "thread:" response for the gdb serial protocol
Jason Wessel [Thu, 5 Aug 2010 14:22:19 +0000 (09:22 -0500)]
gdbstub: Optimize kgdb's "thread:" response for the gdb serial protocol

The gdb debugger understands how to parse short versions of the thread
reference string as long as the bytes are paired in sets of two
characters.  The kgdb implementation was always sending 8 leading
zeros which could be omitted, and further optimized in the case of
non-negative thread numbers.  The negative numbers are used to
reference a specific cpu in the case of kgdb.

An example of the previous i386 stop packet looks like:
    T05thread:00000000000003bb;

New stop packet response:
    T05thread:03bb;

The previous ThreadInfo response looks like:
    m00000000fffffffe,0000000000000001,0000000000000002,0000000000000003,0000000000000004,0000000000000005,0000000000000006,0000000000000007,000000000000000c,0000000000000088,000000000000008a,000000000000008b,000000000000008c,000000000000008d,000000000000008e,00000000000000d4,00000000000000d5,00000000000000dd

New ThreadInfo response:
    mfffffffe,01,02,03,04,05,06,07,0c,88,8a,8b,8c,8d,8e,d4,d5,dd

A few bytes saved means better response time when using kgdb over a
serial line.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
13 years agokgdb: remove custom hex_to_bin()implementation
Andy Shevchenko [Thu, 5 Aug 2010 14:22:19 +0000 (09:22 -0500)]
kgdb: remove custom hex_to_bin()implementation

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
13 years agoOMAP: DSS2: OMAPFB: add support for FBIO_WAITFORVSYNC
Grazvydas Ignotas [Fri, 2 Jul 2010 20:54:56 +0000 (22:54 +0200)]
OMAP: DSS2: OMAPFB: add support for FBIO_WAITFORVSYNC

FBIO_WAITFORVSYNC is a stardard ioctl for waiting vsync, already
used by some userspace, so add it as an alias for OMAPFB_WAITFORVSYNC.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
13 years agoOMAP: DSS2: Replace strncmp() with sysfs_streq() in overlay_manager_store()
Archit Taneja [Mon, 2 Aug 2010 13:14:11 +0000 (15:14 +0200)]
OMAP: DSS2: Replace strncmp() with sysfs_streq() in overlay_manager_store()

The function overlay_manager_store currently fails if the sysfs input is a
prefix string of an existing overlay manager name. This occurs because strncmp
compares the two strings only till the length of the input sysfs string. So a
sysfs input "lcd" will match manager name "lcd2" which is incorrect behavior.

The use of sysfs_streq here will prevent this false positive match to occur.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
13 years agoOMAP: DSS2: Fix error path in omap_dsi_update()
Archit Taneja [Wed, 14 Jul 2010 12:11:50 +0000 (14:11 +0200)]
OMAP: DSS2: Fix error path in omap_dsi_update()

In the case of an error on calling dsi_update_screen_l4(), a
successful framedone callback is still sent to panel-taal. An
error should be returned to taal_update() instead.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
13 years agoOMAP: DSS2: TDO35S: fix video signaling
Igor Grinberg [Mon, 12 Jul 2010 10:42:50 +0000 (12:42 +0200)]
OMAP: DSS2: TDO35S: fix video signaling

TDO35S samples the data on the falling adge of the pixel clock,
therefore the data strobe should be on the raising edge.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
13 years agoOMAP: DSS2: OMAPFB: Fix invalid bpp for PAL and NTSC modes
Maurus Cuelenaere [Wed, 21 Jul 2010 22:40:58 +0000 (00:40 +0200)]
OMAP: DSS2: OMAPFB: Fix invalid bpp for PAL and NTSC modes

omapfb_mode_to_timings() sets the bpp to 0 when bootarg omapfb.mode is set to
either "pal" or "ntsc". This patch corrects this by setting the bpp to 24, as
would be done if omapdss_default_get_recommended_bpp() would be called.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
13 years agoOMAP: DSS2: OMAPFB: Fix probe error path
Afzal Mohammed [Thu, 1 Jul 2010 13:40:01 +0000 (15:40 +0200)]
OMAP: DSS2: OMAPFB: Fix probe error path

Move sysfs entry creation to omapfb_probe() from omapfb_create_framebuffers().
This will make sure that sysfs entry is not left behind in case of unsuccessful
probe due to failure in enabling fb0 of omapfb_create_framebuffers().

Signed-off-by: Afzal Mohammed <lazfamam@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>