]> err.no Git - linux-2.6/log
linux-2.6
17 years agoDriver core: add device_type to struct device
Kay Sievers [Sat, 7 Oct 2006 19:54:55 +0000 (21:54 +0200)]
Driver core: add device_type to struct device

This allows us to add type specific attributes, uevent vars and
release funtions.

A subsystem can carry different types of devices like the "block"
subsys has disks and partitions. Both types create a different set
of attributes, but belong to the same subsystem.

This corresponds to the low level objects:
  kobject   -> device       (object/device data)
  kobj_type -> device_type  (type of object/device we are embedded in)
  kset      -> class/bus    (list of objects/devices of a subsystem)

Signed-off-by: Kay Sievers <kay.sievers@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoDriver core: add uevent vars for devices of a class
Kay Sievers [Sat, 7 Oct 2006 19:54:55 +0000 (21:54 +0200)]
Driver core: add uevent vars for devices of a class

Devices converted from class_device to device should have
the same uevent keys as the original class_device had. We
search up the parents until we find the first bus device and
add the (already deprecated) PHYDEV* values.

Signed-off-by: Kay Sievers <kay.sievers@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoSYSFS: Fix missing include of list.h in sysfs.h
Frank Haverkamp [Wed, 17 Jan 2007 16:51:18 +0000 (17:51 +0100)]
SYSFS: Fix missing include of list.h in sysfs.h

Sysfs.h uses definitions (e.g. struct list_head s_sibling) from list.h
but does not include it.

Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoHOWTO: Add a reference to Harbison and Steele
Robert P. J. Day [Wed, 17 Jan 2007 09:54:07 +0000 (04:54 -0500)]
HOWTO: Add a reference to Harbison and Steele

Add a reference to Harbison and Steele's C book.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agosysfs: error handling in sysfs, fill_read_buffer()
Oliver Neukum [Tue, 2 Jan 2007 07:48:08 +0000 (08:48 +0100)]
sysfs: error handling in sysfs, fill_read_buffer()

if a driver returns an error in fill_read_buffer(), the buffer will be
marked as filled. Subsequent reads will return eof. But there is
no data because of an error, not because it has been read.
Not marking the buffer filled is the obvious fix.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agokobject: kobject_put cleanup
Mariusz Kozlowski [Tue, 2 Jan 2007 12:44:44 +0000 (13:44 +0100)]
kobject: kobject_put cleanup

This patch removes redundant argument checks for kobject_put().

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agosysfs: kobject_put cleanup
Mariusz Kozlowski [Tue, 2 Jan 2007 12:41:10 +0000 (13:41 +0100)]
sysfs: kobject_put cleanup

This patch removes redundant argument checks for kobject_put().

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agosysfs: suppress lockdep warnings
Frederik Deweerdt [Fri, 5 Jan 2007 20:04:33 +0000 (12:04 -0800)]
sysfs: suppress lockdep warnings

Lockdep issues the following warning:
[    9.064000] =============================================
[    9.064000] [ INFO: possible recursive locking detected ]
[    9.064000] 2.6.20-rc3-mm1 #3
[    9.064000] ---------------------------------------------
[    9.064000] init/1 is trying to acquire lock:
[    9.064000]  (&sysfs_inode_imutex_key){--..}, at: [<c03e6afc>] mutex_lock+0x1c/0x1f
[    9.064000]
[    9.064000] but task is already holding lock:
[    9.064000]  (&sysfs_inode_imutex_key){--..}, at: [<c03e6afc>] mutex_lock+0x1c/0x1f
[    9.065000]
[    9.065000] other info that might help us debug this:
[    9.065000] 2 locks held by init/1:
[    9.065000]  #0:  (tty_mutex){--..}, at: [<c03e6afc>] mutex_lock+0x1c/0x1f
[    9.065000]  #1:  (&sysfs_inode_imutex_key){--..}, at: [<c03e6afc>] mutex_lock+0x1c/0x1f
[    9.065000]
[    9.065000] stack backtrace:
[    9.065000]  [<c010390d>] show_trace_log_lvl+0x1a/0x30
[    9.066000]  [<c0103935>] show_trace+0x12/0x14
[    9.066000]  [<c0103a2f>] dump_stack+0x16/0x18
[    9.066000]  [<c0138cb8>] print_deadlock_bug+0xb9/0xc3
[    9.066000]  [<c0138d17>] check_deadlock+0x55/0x5a
[    9.066000]  [<c013a953>] __lock_acquire+0x371/0xbf0
[    9.066000]  [<c013b7a9>] lock_acquire+0x69/0x83
[    9.066000]  [<c03e6b7e>] __mutex_lock_slowpath+0x75/0x2d1
[    9.066000]  [<c03e6afc>] mutex_lock+0x1c/0x1f
[    9.066000]  [<c01b249c>] sysfs_drop_dentry+0xb1/0x133
[    9.066000]  [<c01b25d1>] sysfs_hash_and_remove+0xb3/0x142
[    9.066000]  [<c01b30ed>] sysfs_remove_file+0xd/0x10
[    9.067000]  [<c02849e0>] device_remove_file+0x23/0x2e
[    9.067000]  [<c02850b2>] device_del+0x188/0x1e6
[    9.067000]  [<c028511b>] device_unregister+0xb/0x15
[    9.067000]  [<c0285318>] device_destroy+0x9c/0xa9
[    9.067000]  [<c0261431>] vcs_remove_sysfs+0x1c/0x3b
[    9.067000]  [<c0267a08>] con_close+0x5e/0x6b
[    9.067000]  [<c02598f2>] release_dev+0x4c4/0x6e5
[    9.067000]  [<c0259faa>] tty_release+0x12/0x1c
[    9.067000]  [<c0174872>] __fput+0x177/0x1a0
[    9.067000]  [<c01746f5>] fput+0x3b/0x41
[    9.068000]  [<c0172ee1>] filp_close+0x36/0x65
[    9.068000]  [<c0172f73>] sys_close+0x63/0xa4
[    9.068000]  [<c0102a96>] sysenter_past_esp+0x5f/0x99
[    9.068000]  =======================

This is due to sysfs_hash_and_remove() holding dir->d_inode->i_mutex
before calling sysfs_drop_dentry() which calls orphan_all_buffers()
which in turn takes node->i_mutex.

Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoDriver core: fix race in sysfs between sysfs_remove_file() and read()/write()
Oliver Neukum [Wed, 20 Dec 2006 09:52:44 +0000 (10:52 +0100)]
Driver core: fix race in sysfs between sysfs_remove_file() and read()/write()

This patch prevents a race between IO and removing a file from sysfs.
It introduces a list of sysfs_buffers associated with a file at the inode.
Upon removal of a file the list is walked and the buffers marked orphaned.
IO to orphaned buffers fails with -ENODEV. The driver can safely free
associated data structures or be unloaded.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Acked-by: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodriver core: Change function call order in device_bind_driver().
Cornelia Huck [Mon, 27 Nov 2006 09:35:12 +0000 (10:35 +0100)]
driver core: Change function call order in device_bind_driver().

Change function call order in device_bind_driver().

If we create symlinks (which might fail) before adding the device to the list
we don't have to clean up afterwards (which we didn't).

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodriver core: Don't stop probing on ->probe errors.
Cornelia Huck [Mon, 27 Nov 2006 09:35:10 +0000 (10:35 +0100)]
driver core: Don't stop probing on ->probe errors.

Don't stop on the first ->probe error that is not -ENODEV/-ENXIO.

There might be a driver registered returning an unresonable return code, and
this stops probing completely even though it may make sense to try the next
possible driver. At worst, we may end up with an unbound device.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodriver core fixes: device_register() retval check in platform.c
Cornelia Huck [Mon, 27 Nov 2006 09:35:08 +0000 (10:35 +0100)]
driver core fixes: device_register() retval check in platform.c

Check the return value of device_register() in platform_bus_init().

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodriver core fixes: make_class_name() retval checks
Cornelia Huck [Mon, 27 Nov 2006 09:35:05 +0000 (10:35 +0100)]
driver core fixes: make_class_name() retval checks

Make make_class_name() return NULL on error and fixup callers in the
driver core.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years ago/sys/modules/*/holders
Kay Sievers [Thu, 18 Jan 2007 12:26:15 +0000 (13:26 +0100)]
/sys/modules/*/holders

  /sys/module/usbcore/
  |-- drivers
  |   |-- usb:hub -> ../../../subsystem/usb/drivers/hub
  |   |-- usb:usb -> ../../../subsystem/usb/drivers/usb
  |   `-- usb:usbfs -> ../../../subsystem/usb/drivers/usbfs
  |-- holders
  |   |-- ehci_hcd -> ../../../module/ehci_hcd
  |   |-- uhci_hcd -> ../../../module/uhci_hcd
  |   |-- usb_storage -> ../../../module/usb_storage
  |   `-- usbhid -> ../../../module/usbhid
  |-- initstate

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: add the sysfs driver name to all modules
Greg Kroah-Hartman [Mon, 15 Jan 2007 19:50:02 +0000 (11:50 -0800)]
USB: add the sysfs driver name to all modules

This adds the module name to all USB drivers, if they are built into the
kernel or not.  It will show up in /sys/modules/MODULE_NAME/drivers/

Cc: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoSERIO: add the sysfs driver name to all modules
Greg Kroah-Hartman [Mon, 15 Jan 2007 19:50:02 +0000 (11:50 -0800)]
SERIO: add the sysfs driver name to all modules

This adds the module name to all SERIO drivers, if they are built into
the kernel or not.  It will show up in /sys/modules/MODULE_NAME/drivers/

Cc: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI: add the sysfs driver name to all modules
Greg Kroah-Hartman [Mon, 15 Jan 2007 19:50:02 +0000 (11:50 -0800)]
PCI: add the sysfs driver name to all modules

This adds the module name to all PCI drivers, if they are built into the
kernel or not.  It will show up in /sys/modules/MODULE_NAME/drivers/

It also fixes up the IDE core, which was calling __pci_register_driver()
directly.

Cc: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoModules: only add drivers/ direcory if needed
Greg Kroah-Hartman [Mon, 15 Jan 2007 19:50:02 +0000 (11:50 -0800)]
Modules: only add drivers/ direcory if needed

This changes the module core to only create the drivers/ directory if we
are going to put something in it.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoMODULES: add the module name for built in kernel drivers
Kay Sievers [Mon, 15 Jan 2007 19:22:02 +0000 (20:22 +0100)]
MODULES: add the module name for built in kernel drivers

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodriver core: Allow device_move(dev, NULL).
Cornelia Huck [Mon, 8 Jan 2007 19:16:44 +0000 (20:16 +0100)]
driver core: Allow device_move(dev, NULL).

If we allow NULL as the new parent in device_move(), we need to make sure
that the device is placed into the same place as it would if it was
newly registered:

- Consider the device virtual tree. In order to be able to reuse code,
  setup_parent() has been tweaked a bit.
- kobject_move() can fall back to the kset's kobject.
- sysfs_move_dir() uses the sysfs root dir as fallback.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodriver core: Remove device_is_registered() in device_move().
Cornelia Huck [Mon, 8 Jan 2007 19:16:41 +0000 (20:16 +0100)]
driver core: Remove device_is_registered() in device_move().

device_is_registered() will always be false for a device with no bus. Remove
this check and trust the caller to know what they're doing.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoNetwork: convert network devices to use struct device instead of class_device
Greg Kroah-Hartman [Tue, 9 Apr 2002 19:14:34 +0000 (12:14 -0700)]
Network: convert network devices to use struct device instead of class_device

This lets the network core have the ability to handle suspend/resume
issues, if it wants to.

Thanks to Frederik Deweerdt <frederik.deweerdt@gmail.com> for the arm
driver fixes.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoDriver core: convert SPI code to use struct device
Greg Kroah-Hartman [Mon, 22 Jan 2007 21:45:38 +0000 (13:45 -0800)]
Driver core: convert SPI code to use struct device

Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.

Cc: <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoDriver core: convert pcmcia code to use struct device
Greg Kroah-Hartman [Tue, 12 Sep 2006 15:00:10 +0000 (17:00 +0200)]
Driver core: convert pcmcia code to use struct device

Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.

Cc: <linux-pcmcia@lists.infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoKobject: make kobject apis more robust in handling NULL pointers
Greg Kroah-Hartman [Thu, 18 Jan 2007 20:23:51 +0000 (12:23 -0800)]
Kobject: make kobject apis more robust in handling NULL pointers

It should be ok to pass in NULL for some kobject functions, so add error
checking for all exported kobject functions to be more robust.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy...
Linus Torvalds [Wed, 7 Feb 2007 16:10:48 +0000 (08:10 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
  JFS: Remove incorrect kgdb define
  JFS: call io_schedule() instead of schedule() to avoid deadlock
  JFS: Add lockdep annotations
  JFS: Avoid BUG() on a damaged file system

17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
Linus Torvalds [Wed, 7 Feb 2007 16:09:00 +0000 (08:09 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: (57 commits)
  [GFS2] make gfs2_writepages() static
  [GFS2] Unlock page on prepare_write try lock failure
  [GFS2] nfsd readdirplus assertion failure
  [DLM] fix softlockup in dlm_recv
  [DLM] zero new user lvbs
  [DLM/GFS2] indent help text
  [GFS2] Fix unlink deadlocks
  [GFS2] Put back semaphore to avoid umount problem
  [GFS2] more CURRENT_TIME_SEC
  [GFS2/DLM] fix GFS2 circular dependency
  [GFS2/DLM] use sysfs
  [GFS2] make lock_dlm drop_count tunable in sysfs
  [GFS2] increase default lock limit
  [GFS2] Fix list corruption in lops.c
  [GFS2] Fix recursive locking attempt with NFS
  [DLM] can miss clearing resend flag
  [DLM] saved dlm message can be dropped
  [DLM] Make sock_sem into a mutex
  [GFS2] Fix typo in glock.c
  [GFS2] use CURRENT_TIME_SEC instead of get_seconds in gfs2
  ...

17 years ago[GFS2] make gfs2_writepages() static
Adrian Bunk [Tue, 6 Feb 2007 22:12:49 +0000 (23:12 +0100)]
[GFS2] make gfs2_writepages() static

On Mon, Jan 29, 2007 at 08:45:28PM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.20-rc6-mm2:
>...
>  git-gfs2-nmw.patch
>...
>  git trees
>...

This patch makes the needlessly global gfs2_writepages() static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
17 years ago[GFS2] Unlock page on prepare_write try lock failure
Steven Whitehouse [Wed, 7 Feb 2007 15:25:59 +0000 (10:25 -0500)]
[GFS2] Unlock page on prepare_write try lock failure

When the try lock of the glock failed in prepare_write we were
incorrectly exiting this function with the page still locked.
This was resulting in further I/O to this page hanging.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
17 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Wed, 7 Feb 2007 01:24:58 +0000 (17:24 -0800)]
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: (27 commits)
  [IA64] swiotlb abstraction (e.g. for Xen)
  [IA64] swiotlb cleanup
  [IA64] make swiotlb use bus_to_virt/virt_to_bus
  [IA64] swiotlb bug fixes
  [IA64] Hook up getcpu system call for IA64
  [IA64] clean up sparsemem memory_present call
  [IA64] show_mem() for IA64 sparsemem NUMA
  [IA64] missing exports hwsw_sync_...
  [IA64] virt_to_page() can be called with NULL arg
  [IA64] alignment bug in ldscript
  [IA64] register memory ranges in a consistent manner
  [IA64] Enable SWIOTLB only when needed
  [IA64-SGI] Check for TIO errors on shub2 Altix
  [IA64] remove bogus prototype ia64_esi_init()
  [IA64] Clear IRQ affinity when unregistered
  [IA64] fix ACPI Kconfig issues
  [IA64] Fix NULL-pointer dereference in ia64_machine_kexec()
  [IA64] find thread for user rbs address
  [IA64] use snprintf() on features field of /proc/cpuinfo
  [IA64] enable singlestep on system call
  ...

17 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
Linus Torvalds [Tue, 6 Feb 2007 22:59:27 +0000 (14:59 -0800)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  ocfs2: ocfs2_link() journal credits update

17 years agoMerge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Tue, 6 Feb 2007 22:56:37 +0000 (14:56 -0800)]
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid:
  USB HID: handle multi-interface devices for Apple macbook pro properly
  HID: move away from DEBUG defines in favor of CONFIG_HID_DEBUG
  USB HID: fix bogus comment in hid_get_class_descriptor()
  USB HID: remove hid_find_field_by_usage()
  HID: API - fix leftovers of hidinput API in USB HID
  HID: hid debug from hid-debug.h to hid layer
  hid: force feedback driver for PantherLord USB/PS2 2in1 Adapter
  hid: quirk for multi-input devices with unneeded output reports
  hid: allow force feedback for multi-input devices

17 years agoMerge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
Linus Torvalds [Tue, 6 Feb 2007 22:55:33 +0000 (14:55 -0800)]
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
  IB/ehca: Remove obsolete prototypes
  IB/ehca: Remove use of do_mmap()
  RDMA/addr: Handle ethernet neighbour updates during route resolution
  IB: Make sure struct ib_user_mad.data is aligned
  IB/srp: Don't wait for response when QP is in error state.
  IB: Return qp pointer as part of ib_wc
  IB: Include <linux/kref.h> explicitly in <rdma/ib_verbs.h>

17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
Linus Torvalds [Tue, 6 Feb 2007 22:54:54 +0000 (14:54 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (32 commits)
  mmc: tifm: replace kmap with page_address
  mmc: sdhci: fix voltage ocr
  mmc: sdhci: replace kmap with page_address
  mmc: wbsd: replace kmap with page_address
  mmc: handle pci_enable_device() return value in sdhci
  mmc: Proper unclaim in mmc_block
  mmc: change wbsd mailing list
  mmc: Graceful fallback for fancy features
  mmc: Handle wbsd's stupid command list
  mmc: Allow host drivers to specify max block count
  mmc: Allow host drivers to specify a max block size
  tifm_sd: add suspend and resume functionality
  tifm_core: add suspend/resume infrastructure for tifm devices
  tifm_7xx1: prettify
  tifm_7xx1: recognize device 0xac8f as supported
  tifm_7xx1: switch from workqueue to kthread
  tifm_7xx1: Merge media insert and media remove functions
  tifm_7xx1: simplify eject function
  Add dummy_signal_irq function to save check in ISR
  Remove unused return value from signal_irq callback
  ...

17 years agoMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Tue, 6 Feb 2007 22:45:32 +0000 (14:45 -0800)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (37 commits)
  [S390] Avoid excessive inlining.
  [S390] Mark kernel text section read-only.
  [S390] Convert memory detection into C code.
  [S390] Calibrate delay and bogomips.
  [S390] Hypervisor filesystem (s390_hypfs) for z/VM
  [S390] Add crypto support for 3592 tape devices
  [S390] boot from NSS support
  [S390] Support for s390 Pseudo Random Number Generator
  [S390] ETR support.
  [S390] noexec protection
  [S390] move crypto options and some cleanup.
  [S390] cio: Don't spam debug feature.
  [S390] Cleanup of CHSC event handling.
  [S390] cio: declare hardware structures packed.
  [S390] Add set_fs(USER_DS) to start_thread().
  [S390] cio: Catch operand exceptions on stsch.
  [S390] Fix register usage description.
  [S390] kretprobe_trampoline_holder() in wrong section.
  [S390] Fix kprobes breakpoint handling.
  [S390] Update maintainers file.
  ...

17 years ago[PATCH] Keys: Fix key serial number collision handling
David Howells [Tue, 6 Feb 2007 13:45:51 +0000 (13:45 +0000)]
[PATCH] Keys: Fix key serial number collision handling

Fix the key serial number collision avoidance code in key_alloc_serial().

This didn't use to be so much of a problem as the key serial numbers were
allocated from a simple incremental counter, and it would have to go through
two billion keys before it could possibly encounter a collision.  However, now
that random numbers are used instead, collisions are much more likely.

This is fixed by finding a hole in the rbtree where the next unused serial
number ought to be and using that by going almost back to the top of the
insertion routine and redoing the insertion with the new serial number rather
than trying to be clever and attempting to work out the insertion point
pointer directly.

This fixes kernel BZ #7727.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Tue, 6 Feb 2007 22:42:20 +0000 (14:42 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] Minor cleanup
  [CIFS] Missing free in error path
  [CIFS] Reduce cifs stack space usage
  [CIFS] lseek polling returned stale EOF

17 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Tue, 6 Feb 2007 22:35:30 +0000 (14:35 -0800)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (40 commits)
  [MIPS] Yosemite: Fix missing parens in SERIAL_READ_1 macro
  [MIPS] Fix warnings in run_uncached on 32bit kernel
  [MIPS] Comment fix
  [MIPS] MT: Nuke duplicate mips_mt_regdump() prototype.
  [MIPS] Alchemy:  Fix PCI-memory access
  [MIPS] Move .set reorder out of conditional code
  [MIPS] Check FCSR for pending interrupts before restoring from a context.
  [MIPS] Jaguar ATX: Fix large number of warnings.
  [MIPS] Jaguar: Fix MAC address detection after platform_device conversion.
  [MIPS] SMTC: Make a bunch of functions and variables static.
  [MIPS] Use compat_sys_pselect6
  [MIPS] SMTC: Cleanup idle hook invocation.
  [MIPS] SELinux: Add security hooks to mips-mt {get,set}affinity
  [MIPS] IRIX: Linux coding style cleanups.
  [MIPS] PB1100: Fix pile of warnings
  [MIPS] Alchemy: Fix bunch of warnings
  [MIPS] Whitespace cleanups.
  [MIPS] Alchemy: Fix bunch more warnings.
  [MIPS] Use ARRAY_SIZE macro when appropriate
  [MIPS] Fix some whitespace damage
  ...

17 years ago[PATCH] kbuild: correctly skip tilded backups in localversion files
Oleg Verych [Tue, 6 Feb 2007 01:18:22 +0000 (02:18 +0100)]
[PATCH] kbuild: correctly skip tilded backups in localversion files

 Tildes as in path as in filenames are handled correctly now:
 only files, containing tilde '~', are backups, thus are not valid.

 [KJ]:
 Definition of `space' was removed, scripts/Kbuild.include has one.
 That definition was taken right from the GNU make manual, while Kbuild's
 version is original.

Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Bastian Blank <bastian@waldi.eu.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Oleg Verych <olecom@flower.upol.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] kbuild: improve option checking, Kbuild.include cleanup
Oleg Verych [Tue, 6 Feb 2007 01:18:21 +0000 (02:18 +0100)]
[PATCH] kbuild: improve option checking, Kbuild.include cleanup

 GNU binutils, root users, tmpfiles, external modules ro builds must
 be fixed to do the right thing now.

Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Horst Schirmeier <horst@schirmeier.com>
Cc: Jan Beulich <jbeulich@novell.com>
Cc: Daniel Drake <dsd@gentoo.org>
Cc: Andi Kleen <ak@suse.de>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Oleg Verych <olecom@flower.upol.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] kbuild scripts: replace gawk, head, bc with shell, update
Oleg Verych [Tue, 6 Feb 2007 01:18:20 +0000 (02:18 +0100)]
[PATCH] kbuild scripts: replace gawk, head, bc with shell, update

  Replacing overhead of using some (external) programs
  instead of good old `sh'.

Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: William Stearns <wstearns@pobox.com>
Cc: Martin Schlemmer <azarah@nosferatu.za.org>
Signed-off-by: Oleg Verych <olecom@flower.upol.cz>
Acked-by: Mark Lord <lkml@rtr.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[CIFS] Minor cleanup
Steve French [Tue, 6 Feb 2007 20:43:30 +0000 (20:43 +0000)]
[CIFS] Minor cleanup

Missing tab.  Missing entry in changelog

Signed-off-by: Steve French <sfrench@us.ibm.com>
17 years ago[MIPS] Yosemite: Fix missing parens in SERIAL_READ_1 macro
Ralf Baechle [Tue, 6 Feb 2007 16:43:31 +0000 (16:43 +0000)]
[MIPS] Yosemite: Fix missing parens in SERIAL_READ_1 macro

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Fix warnings in run_uncached on 32bit kernel
Yoichi Yuasa [Tue, 6 Feb 2007 01:59:22 +0000 (10:59 +0900)]
[MIPS] Fix warnings in run_uncached on 32bit kernel

arch/mips/lib/uncached.c: In function 'run_uncached':
arch/mips/lib/uncached.c:47: warning: comparison is always true due to limited range of data type
arch/mips/lib/uncached.c:48: warning: comparison is always false due to limited range of data type
arch/mips/lib/uncached.c:57: warning: comparison is always true due to limited range of data type
arch/mips/lib/uncached.c:58: warning: comparison is always false due to limited range of data type

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Comment fix
Chris Dearman [Thu, 1 Feb 2007 19:54:13 +0000 (19:54 +0000)]
[MIPS] Comment fix

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] MT: Nuke duplicate mips_mt_regdump() prototype.
Ralf Baechle [Sun, 4 Feb 2007 23:23:00 +0000 (23:23 +0000)]
[MIPS] MT: Nuke duplicate mips_mt_regdump() prototype.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Alchemy: Fix PCI-memory access
Alexander Bigga [Thu, 21 Dec 2006 10:25:19 +0000 (11:25 +0100)]
[MIPS] Alchemy:  Fix PCI-memory access

The problem was introduced in 2.6.18.3 with the casting of some
36bit-defines (PCI memory) in au1000.h to resource_size_t which may be
u32 or u64 depending on the experimental CONFIG_RESOURCES_64BIT.

With unset CONFIG_RESOURCES_64BIT, the pci-memory cannot be accessed
because the ioremap in arch/mips/au1000/common/pci.c already used the
truncated addresses.
With set CONFIG_RESOURCES_64BIT, things get even worse, because PCI-scan
aborts, due to resource conflict: request_resource() in arch/mips/pci/pci.c
fails because the maximum iomem-address is 0xffffffff (32bit) but the
pci-memory-start-address is 0x440000000 (36bit).

To get pci working again, I propose the following patch:

1. remove the resource_size_t-casting from au1000.h again
2. make the casting in arch/mips/au1000/common/pci.c (it's allowed and
necessary here. The 36bit-handling will be done in __fixup_bigphys_addr).

With this patch pci works again like in 2.6.18.2, the gcc-compile warnings
in pci.c are gone and it doesn't depend on CONFIG_EXPERIMENTAL.

Signed-off-by: Alexander Bigga <ab@mycable.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Move .set reorder out of conditional code
Chris Dearman [Thu, 1 Feb 2007 19:54:13 +0000 (19:54 +0000)]
[MIPS] Move .set reorder out of conditional code

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Check FCSR for pending interrupts before restoring from a context.
Chris Dearman [Thu, 1 Feb 2007 19:54:13 +0000 (19:54 +0000)]
[MIPS] Check FCSR for pending interrupts before restoring from a context.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Jaguar ATX: Fix large number of warnings.
Ralf Baechle [Tue, 7 Nov 2006 09:23:57 +0000 (09:23 +0000)]
[MIPS] Jaguar ATX: Fix large number of warnings.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Jaguar: Fix MAC address detection after platform_device conversion.
Ralf Baechle [Tue, 7 Nov 2006 09:25:51 +0000 (09:25 +0000)]
[MIPS] Jaguar: Fix MAC address detection after platform_device conversion.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] SMTC: Make a bunch of functions and variables static.
Ralf Baechle [Mon, 5 Feb 2007 00:33:21 +0000 (00:33 +0000)]
[MIPS] SMTC: Make a bunch of functions and variables static.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Use compat_sys_pselect6
Joseph S. Myers [Wed, 10 Jan 2007 12:30:50 +0000 (12:30 +0000)]
[MIPS] Use compat_sys_pselect6

The N32 and O32 pselect6 syscalls need to use compat_sys_pselect6 to
translate arguments from 32-bit to 64-bit layout.

Signed-off-by: Joseph Myers <joseph@codesourcery.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] SMTC: Cleanup idle hook invocation.
Ralf Baechle [Mon, 5 Feb 2007 00:34:20 +0000 (00:34 +0000)]
[MIPS] SMTC: Cleanup idle hook invocation.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] SELinux: Add security hooks to mips-mt {get,set}affinity
David Quigley [Wed, 28 Jun 2006 13:36:46 +0000 (09:36 -0400)]
[MIPS] SELinux: Add security hooks to mips-mt {get,set}affinity

This patch adds LSM hooks into the setaffinity and getaffinity functions
for the mips architecture to enable security modules to control these
operations between tasks with different security attributes. This
implementation uses the existing task_setscheduler and task_getscheduler
LSM hooks.

Signed-Off-By: David Quigley <dpquigl@tycho.nsa.gov>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] IRIX: Linux coding style cleanups.
Ralf Baechle [Mon, 5 Feb 2007 00:05:08 +0000 (00:05 +0000)]
[MIPS] IRIX: Linux coding style cleanups.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] PB1100: Fix pile of warnings
Ralf Baechle [Tue, 7 Nov 2006 10:19:05 +0000 (10:19 +0000)]
[MIPS] PB1100: Fix pile of warnings

  CC      arch/mips/au1000/pb1100/board_setup.o
arch/mips/au1000/pb1100/board_setup.c: In function â€˜board_setup’:
arch/mips/au1000/pb1100/board_setup.c:104: warning: passing argument 1 of â€˜readb’ makes pointer from integer without a cast
arch/mips/au1000/pb1100/board_setup.c:105: warning: passing argument 1 of â€˜readb’ makes pointer from integer without a cast
arch/mips/au1000/pb1100/board_setup.c:105: warning: passing argument 2 of â€˜writeb’ makes pointer from integer without a cast
arch/mips/au1000/pb1100/board_setup.c:109: warning: passing argument 1 of â€˜readb’ makes pointer from integer without a cast
arch/mips/au1000/pb1100/board_setup.c:110: warning: passing argument 1 of â€˜readb’ makes pointer from integer without a cast
arch/mips/au1000/pb1100/board_setup.c:110: warning: passing argument 2 of â€˜writeb’ makes pointer from integer without a cast
arch/mips/au1000/pb1100/board_setup.c:51: warning: unused variable â€˜sys_clksrc’
arch/mips/au1000/pb1100/board_setup.c:51: warning: unused variable â€˜sys_freqctrl’
arch/mips/au1000/pb1100/board_setup.c:50: warning: unused variable â€˜pin_func’

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Alchemy: Fix bunch of warnings
Ralf Baechle [Tue, 7 Nov 2006 09:58:30 +0000 (09:58 +0000)]
[MIPS] Alchemy: Fix bunch of warnings

  CC      arch/mips/au1000/common/pci.o
arch/mips/au1000/common/pci.c:42: warning: large integer implicitly truncated to unsigned type
arch/mips/au1000/common/pci.c:43: warning: large integer implicitly truncated to unsigned type
arch/mips/au1000/common/pci.c:49: warning: large integer implicitly truncated to unsigned type
arch/mips/au1000/common/pci.c:50: warning: large integer implicitly truncated to unsigned type
arch/mips/au1000/common/pci.c: In function â€˜au1x_pci_setup’:
arch/mips/au1000/common/pci.c:82: warning: ISO C90 forbids mixed declarations and code

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Whitespace cleanups.
Ralf Baechle [Mon, 5 Feb 2007 00:10:11 +0000 (00:10 +0000)]
[MIPS] Whitespace cleanups.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Alchemy: Fix bunch more warnings.
Ralf Baechle [Tue, 7 Nov 2006 10:22:31 +0000 (10:22 +0000)]
[MIPS] Alchemy: Fix bunch more warnings.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Use ARRAY_SIZE macro when appropriate
Ahmed S. Darwish [Mon, 5 Feb 2007 02:42:11 +0000 (04:42 +0200)]
[MIPS] Use ARRAY_SIZE macro when appropriate

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Fix some whitespace damage
Jan Altenberg [Thu, 25 Jan 2007 19:46:14 +0000 (20:46 +0100)]
[MIPS] Fix some whitespace damage

Signed-off-by: Jan Altenberg <jan@linutronix.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Add missing ifdef arch/mips/pmc-sierra/yosemite/setup.c
Mathieu Desnoyers [Sun, 4 Feb 2007 04:16:51 +0000 (23:16 -0500)]
[MIPS] Add missing ifdef arch/mips/pmc-sierra/yosemite/setup.c

early_serial_setup is only defined when CONFIG_SERIAL_8250 is set.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Fix pb1200/irqmap.c and apply some missed patches
Atsushi Nemoto [Sat, 3 Feb 2007 15:57:25 +0000 (00:57 +0900)]
[MIPS] Fix pb1200/irqmap.c and apply some missed patches

pb1200/irqmap.c had been broken a while due to non-named initializer
and had missed some recent IRQ related changes.  Apply these commits
to this file.

[MIPS] IRQ cleanups
commit 1603b5aca4f15b34848fb5594d0c7b6333b99144
[MIPS] use generic_handle_irq, handle_level_irq, handle_percpu_irq
commit 1417836e81c0ab8f5a0bfeafa90d3eaa41b2a067
[MIPS] Compile __do_IRQ() when really needed
commit e77c232cfc6e1250b2916a7c69225d6634d05a49

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Do not allow oprofile to be enabled on SMTC.
Ralf Baechle [Fri, 2 Feb 2007 11:13:35 +0000 (11:13 +0000)]
[MIPS] Do not allow oprofile to be enabled on SMTC.

Oprofile cannot work on SMTC due to the limited number of counters.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Remove superfluous "ifdef CONFIG_KGDB".
Robert P. J. Day [Thu, 1 Feb 2007 10:45:14 +0000 (05:45 -0500)]
[MIPS] Remove superfluous "ifdef CONFIG_KGDB".

Given that the Makefiles involved already have conditional compilation of
 the form:

  obj-$(CONFIG_KGDB)      += dbg_io.o

there seems to be little value for the dbg_io.c source files to check
that config variable yet again.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] vpe_elfload and vpe_run are only used locally, make them static.
Ralf Baechle [Tue, 6 Feb 2007 16:53:17 +0000 (16:53 +0000)]
[MIPS] vpe_elfload and vpe_run are only used locally, make them static.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] SMTC: remove unused atomic_postclear
Ralf Baechle [Tue, 6 Feb 2007 16:53:16 +0000 (16:53 +0000)]
[MIPS] SMTC: remove unused atomic_postclear

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Move some kernel globals from asm file to C file.
Atsushi Nemoto [Tue, 23 Jan 2007 16:21:05 +0000 (01:21 +0900)]
[MIPS] Move some kernel globals from asm file to C file.

This get rid of some undesirable hole in BSS section due to random
order of placement.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Remove _fdata from asm-mips/sections.h
Atsushi Nemoto [Tue, 23 Jan 2007 13:29:06 +0000 (22:29 +0900)]
[MIPS] Remove _fdata from asm-mips/sections.h

There is no _fdata symbol in kernel.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Kconfig: Provide sane NR_CPUS defaults for more configurations
Ralf Baechle [Tue, 6 Feb 2007 16:53:15 +0000 (16:53 +0000)]
[MIPS] Kconfig: Provide sane NR_CPUS defaults for more configurations

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] vr41xx: Use symbolic names for IRQ numers
Yoichi Yuasa [Thu, 18 Jan 2007 13:27:11 +0000 (22:27 +0900)]
[MIPS] vr41xx: Use symbolic names for IRQ numers

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] use name instead of typename for each irq_chip
Atsushi Nemoto [Sun, 14 Jan 2007 15:07:25 +0000 (00:07 +0900)]
[MIPS] use name instead of typename for each irq_chip

The "typename" field was obsoleted by the "name" field.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Kconfig: Move some entries to appropriate menu
Atsushi Nemoto [Tue, 16 Jan 2007 14:29:11 +0000 (23:29 +0900)]
[MIPS] Kconfig: Move some entries to appropriate menu

Currently KEXEC is in "Machine selection", SECCOMP, PM, APM are in
"Executable file formats" menu.  Move KEXEC and SECCOMP to "Kernel
type" and PM, APM to new "Power management options" menu.  Also
replace "config PM" with kernel/power/Kconfig.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] vr41xx: add MACINT controls
Yoichi Yuasa [Thu, 11 Jan 2007 14:53:18 +0000 (23:53 +0900)]
[MIPS] vr41xx: add MACINT controls

This patch has added MACINT controls.
They are necessary for VR4133 ethernet driver.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] FLATMEM: introduce PHYS_OFFSET.
Franck Bui-Huu [Wed, 10 Jan 2007 08:44:05 +0000 (09:44 +0100)]
[MIPS] FLATMEM: introduce PHYS_OFFSET.

The old code was assuming that min_low_pfn was always 0. This
means that platforms having a big hole at their memory start
paid the price of wasting some memory for the allocation of
unused entries in mem_map[].

This patch prevents this waste.

It introduces PHYS_OFFSET define which is the start of the
physical memory and uses it wherever needed. Specially when
converting physical/virtual addresses into virtual/physical
ones.

Currently all platforms defines PHYS_OFFSET to 0.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Setup min_low_pfn/max_low_pfn correctly
Franck Bui-Huu [Wed, 10 Jan 2007 08:44:04 +0000 (09:44 +0100)]
[MIPS] Setup min_low_pfn/max_low_pfn correctly

This patch makes a better usage of these two globals.
'min_low_pfn' is now correctly setup for all configs, which
allow us to rely on it in boot memory code init.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Unify memset.S
Atsushi Nemoto [Sun, 17 Dec 2006 15:07:40 +0000 (00:07 +0900)]
[MIPS] Unify memset.S

The 32-bit version and 64-bit version are almost equal.  Unify them.
This makes further improvements (for example, supporting CDEX, etc.)
easier.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] prom_free_prom_memory cleanup
Atsushi Nemoto [Fri, 29 Dec 2006 15:43:59 +0000 (00:43 +0900)]
[MIPS] prom_free_prom_memory cleanup

Current prom_free_prom_memory() implementations are almost same as
free_init_pages(), or no-op.  Make free_init_pages() extern (again)
and make prom_free_prom_memory() use it.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Make I8259A_IRQ_BASE customizable
Atsushi Nemoto [Sun, 14 Jan 2007 14:41:42 +0000 (23:41 +0900)]
[MIPS] Make I8259A_IRQ_BASE customizable

Move I8259A_IRQ_BASE from asm/i8259.h to asm/mach-generic/irq.h and
make it really customizable.  And remove I8259_IRQ_BASE declared on
some platforms.  Currently only NEC_CMBVR4133 is using custom
I8259A_IRQ_BASE value.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Define MIPS_CPU_IRQ_BASE in generic header
Atsushi Nemoto [Sun, 7 Jan 2007 17:14:29 +0000 (02:14 +0900)]
[MIPS] Define MIPS_CPU_IRQ_BASE in generic header

The irq_base for {mips,rm7k,rm9k}_cpu_irq_init() are constant on all
platforms and are same value on most platforms (0 or 16, depends on
CONFIG_I8259).  Define them in asm-mips/mach-generic/irq.h and make
them customizable.  This will save a few cycle on each CPU interrupt.

A good side effect is removing some dependencies to MALTA in generic
SMTC code.

Although MIPS_CPU_IRQ_BASE is customizable, this patch changes irq
mappings on DDB5477, EMMA2RH and MIPS_SIM, since really customizing
them might cause some header dependency problem and there seems no
good reason to customize it.  So currently only VR41XX is using custom
MIPS_CPU_IRQ_BASE value, which is 0 regardless of CONFIG_I8259.

Testing this patch on those platforms is greatly appreciated.  Thank
you.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Remove unused rm9k_cpu_irq_disable()
Atsushi Nemoto [Sun, 7 Jan 2007 15:20:24 +0000 (00:20 +0900)]
[MIPS] Remove unused rm9k_cpu_irq_disable()

rm9k_cpu_irq_disable() is unused since commit
1603b5aca4f15b34848fb5594d0c7b6333b99144.  Remove it.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[GFS2] nfsd readdirplus assertion failure
Wendy Cheng [Tue, 6 Feb 2007 08:52:16 +0000 (03:52 -0500)]
[GFS2] nfsd readdirplus assertion failure

Glock assertion failure found in '07 NFS connectathon. One of the NFSDs
is doing a "readdirplus" procedure call. It passes the logic into
gfs2_readdir() where it obtains its directory inode glock. This is then
followed by filehandle construction that invokes lookup code. It hits
the assertion failure while trying to obtain the inode glock again
inside gfs2_drevalidate().

This patch bypasses the recursive glock call if caller already holds the
lock.

Signed-off-by: S. Wendy Cheng <wcheng@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
17 years ago[IA64] swiotlb abstraction (e.g. for Xen)
Jan Beulich [Tue, 6 Feb 2007 02:53:04 +0000 (18:53 -0800)]
[IA64] swiotlb abstraction (e.g. for Xen)

Add abstraction so that the file can be used by environments other than IA64
and EM64T, namely for Xen.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] swiotlb cleanup
Jan Beulich [Tue, 6 Feb 2007 02:51:25 +0000 (18:51 -0800)]
[IA64] swiotlb cleanup

- add proper __init decoration to swiotlb's init code (and the code calling
  it, where not already the case)

- replace uses of 'unsigned long' with dma_addr_t where appropriate

- do miscellaneous simplicfication and cleanup

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] make swiotlb use bus_to_virt/virt_to_bus
Jan Beulich [Tue, 6 Feb 2007 02:49:45 +0000 (18:49 -0800)]
[IA64] make swiotlb use bus_to_virt/virt_to_bus

Convert all phys_to_virt/virt_to_phys uses to bus_to_virt/virt_to_bus, as is
what is meant and what is needed in (at least) some virtualized environments
like Xen.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] swiotlb bug fixes
Jan Beulich [Tue, 6 Feb 2007 02:46:40 +0000 (18:46 -0800)]
[IA64] swiotlb bug fixes

This patch fixes
- marking I-cache clean of pages DMAed to now only done for IA64
- broken multiple inclusion in include/asm-x86_64/swiotlb.h
- missing call to mark_clean in swiotlb_sync_sg()
- a (perhaps only theoretical) issue in swiotlb_dma_supported() when
io_tlb_end is exactly at the end of memory

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Hook up getcpu system call for IA64
Fenghua Yu [Tue, 6 Feb 2007 00:07:57 +0000 (16:07 -0800)]
[IA64] Hook up getcpu system call for IA64

getcpu system call returns cpu# and node# on which this system call and
its caller are running. This patch hooks up its implementation on IA64.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] clean up sparsemem memory_present call
Bob Picco [Tue, 6 Feb 2007 00:20:08 +0000 (16:20 -0800)]
[IA64] clean up sparsemem memory_present call

Eliminate arch specific memory_present call ia64 NUMA by utilizing
sparse_memory_present_with_active_regions.

Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] show_mem() for IA64 sparsemem NUMA
George Beshers [Tue, 6 Feb 2007 00:20:04 +0000 (16:20 -0800)]
[IA64] show_mem() for IA64 sparsemem NUMA

On the ia64 architecture only this patch upgrades show_mem() for sparse
memory to be the same as it was for discontig memory.  It has been shown to
work on NUMA and flatmem architectures.

Signed-off-by: George Beshers <gbeshers@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] missing exports hwsw_sync_...
Jan Beulich [Tue, 6 Feb 2007 00:20:03 +0000 (16:20 -0800)]
[IA64] missing exports hwsw_sync_...

Add missing exports to allow several drivers to be built as module with
CONFIG_IA64_HP_ZX1_SWIOTLB.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] virt_to_page() can be called with NULL arg
Kirill Korotaev [Tue, 6 Feb 2007 00:20:00 +0000 (16:20 -0800)]
[IA64] virt_to_page() can be called with NULL arg

It does not return NULL when arg is NULL.

Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] alignment bug in ldscript
Kirill Korotaev [Tue, 6 Feb 2007 00:19:59 +0000 (16:19 -0800)]
[IA64] alignment bug in ldscript

Occasionally the FSYS_RETURN patch list can have an odd length, causing other
data structures to get out of alignment.  In OpenVZ it is odd and we get
misaligned kernel image, which does not boot.

Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] register memory ranges in a consistent manner
Bob Picco [Tue, 30 Jan 2007 10:11:09 +0000 (02:11 -0800)]
[IA64] register memory ranges in a consistent manner

While pursuing and unrelated issue with 64Mb granules I noticed a problem
related to inconsistent use of add_active_range.  There doesn't appear any
reason to me why FLATMEM versus DISCONTIG_MEM should register memory to
add_active_range with different code.  So I've changed the code into a
common implementation.

The other subtle issue fixed by this patch was calling add_active_range in
count_node_pages before granule aligning is performed.  We were lucky with
16MB granules but not so with 64MB granules.  count_node_pages has reserved
regions filtered out and as a consequence linked kernel text and data
aren't covered by calls to count_node_pages.  So linked kernel regions
wasn't reported to add_active_regions.  This resulted in free_initmem
causing numerous bad_page reports.  This won't occur with this patch
because now all known memory regions are reported by
register_active_ranges.

Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Bob Picco <bob.picco@hp.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Enable SWIOTLB only when needed
Jan Beulich [Wed, 3 Jan 2007 09:26:21 +0000 (09:26 +0000)]
[IA64] Enable SWIOTLB only when needed

Don't force CONFIG_SWIOTLB on when not actually needed (i.e. HP_ZX1 and
SGI_SN2).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64-SGI] Check for TIO errors on shub2 Altix
Russ Anderson [Mon, 8 Jan 2007 22:05:08 +0000 (16:05 -0600)]
[IA64-SGI] Check for TIO errors on shub2 Altix

The shub2 error interrupt handler must check for TIO errors.

Signed-off-by: Russ Anderson (rja@sgi.com)
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] remove bogus prototype ia64_esi_init()
Alex Williamson [Mon, 15 Jan 2007 16:33:55 +0000 (09:33 -0700)]
[IA64] remove bogus prototype ia64_esi_init()

This function doesn't exist.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Clear IRQ affinity when unregistered
Alex Williamson [Thu, 25 Jan 2007 05:48:04 +0000 (22:48 -0700)]
[IA64] Clear IRQ affinity when unregistered

When we offline a CPU, migrate_irqs() tries to determine whether the
affinity bits of the IRQ descriptor match any of the remaining online
CPUs.  If not, it fixes up the interrupt to point somewhere else.
Unfortunately, if an IRQ is unregistered the IRQ descriptor may still
have affinity to the CPU being offlined, but the no_irq_chip handler
doesn't provide a set_affinity function.  This causes us to hit the
WARN_ON in migrate_irqs().

The easiest solution seems to be setting all the bits in the affinity
mask when the last interrupt is removed from the vector.  I hit this on
an older kernel with Xen/ia64 using driver domains (so it probably needs
more testing on upstream).  Xen essentially uses the bind/unbind
interface in sysfs to unregister a device from a driver and thus
unregister the interrupt.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] fix ACPI Kconfig issues
Len Brown [Fri, 26 Jan 2007 05:38:53 +0000 (00:38 -0500)]
[IA64] fix ACPI Kconfig issues

All IA64 systems except IA64_HP_SIM include ACPI and PCI.
So prevent IA64 Kconfigs that try to do irritating things like building
PCI without building ACPI.

Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Fix NULL-pointer dereference in ia64_machine_kexec()
Bernhard Walle [Sun, 28 Jan 2007 12:47:02 +0000 (13:47 +0100)]
[IA64] Fix NULL-pointer dereference in ia64_machine_kexec()

This patch fixes a NULL-pointer dereference in ia64_machine_kexec().

The variable ia64_kimage is set in machine_kexec_prepare() which is
called from sys_kexec_load(). If kdump wasn't configured before,
ia64_kimage is NULL.  machine_kdump_on_init() passes ia64_kimage() to
machine_kexec() which assumes a valid value.

The patch also adds a few sanity checks for the image to simplify
debugging of similar problems in future.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Tony Luck <tony.luck@intel.com>