pandora-kernel.git
15 years agoUBI: add UBI devices reference counting
Artem Bityutskiy [Mon, 17 Dec 2007 15:37:26 +0000 (17:37 +0200)]
UBI: add UBI devices reference counting

This is one more step on the way to "removable" UBI devices. It
adds reference counting for UBI devices. Every time a volume on
this device is opened - the device's refcount is increased. It
is also increased if someone is reading any sysfs file of this
UBI device or of one of its volumes.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: add UBI control device
Artem Bityutskiy [Sun, 16 Dec 2007 14:59:31 +0000 (16:59 +0200)]
UBI: add UBI control device

This patch is a preparation to make UBI devices dynamic. It
adds an UBI control device which has dynamically allocated
major number and registers itself as "ubi_ctrl". It does not
do anything so far. The idea is that this device will allow
to attach/detach MTD devices from userspace.

This is symilar to what the Linux device mapper has.

The next things to do are:
* Fix UBI, because it now assumes UBI devices cannot go away
* Implement control device ioctls which will attach/detach MTD
  devices

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: fix comment
Artem Bityutskiy [Wed, 19 Dec 2007 14:03:17 +0000 (16:03 +0200)]
UBI: fix comment

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: fix ubi_wl_flush
Artem Bityutskiy [Tue, 18 Dec 2007 13:54:35 +0000 (15:54 +0200)]
UBI: fix ubi_wl_flush

The flush function should finish all the pending jobs. But if
somebody else is doing a work, this function should wait and let
it finish.

This patche uses rw semaphore for synchronization purpose - it
just looks quite convinient.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: fix printk
Artem Bityutskiy [Wed, 19 Dec 2007 15:03:42 +0000 (17:03 +0200)]
UBI: fix printk

Add proper log level to printk's.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: bugfix: protect from volume removal
Artem Bityutskiy [Tue, 18 Dec 2007 13:06:55 +0000 (15:06 +0200)]
UBI: bugfix: protect from volume removal

When the WL worker is moving an LEB, the volume might go away
occasionally. UBI does not handle these situations correctly.

This patch introduces a new mutex which serializes wear-levelling
worker and the the 'ubi_wl_put_peb()' function. Now, if one puts
an LEB, and its PEB is being moved, it will wait on the mutex.
And because we unmap all LEBs when removing volumes, this will make
the volume remove function to wait while the LEB movement
finishes.

Below is an example of an oops which should be fixed by this patch:

Pid: 9167, comm: io_paral Not tainted (2.6.24-rc5-ubi-2.6.git #2)
EIP: 0060:[<f884a379>] EFLAGS: 00010246 CPU: 0
EIP is at prot_tree_del+0x2a/0x63 [ubi]
EAX: f39a90e0 EBX: 00000000 ECX: 00000000 EDX: 00000134
ESI: f39a90e0 EDI: f39a90e0 EBP: f2d55ddc ESP: f2d55dd4
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process io_paral (pid: 9167, ti=f2d54000 task=f72a8030 task.ti=f2d54000)
Stack: f39a95f8 ef6aae50 f2d55e08 f884a511 f88538e1 f884ecea 00000134 00000000
       f39a9604 f39a95f0 efea8280 00000000 f39a90e0 f2d55e40 f8847261 f8850c3c
       f884eaad 00000001 000000b9 00000134 00000172 000000b9 00000134 00000001
Call Trace:
 [<c0105227>] show_trace_log_lvl+0x1a/0x30
 [<c01052e2>] show_stack_log_lvl+0xa5/0xca
 [<c01053d6>] show_registers+0xcf/0x21b
 [<c0105648>] die+0x126/0x224
 [<c0119a62>] do_page_fault+0x27f/0x60d
 [<c037dd62>] error_code+0x72/0x78
 [<f884a511>] ubi_wl_put_peb+0xf0/0x191 [ubi]
 [<f8847261>] ubi_eba_unmap_leb+0xaf/0xcc [ubi]
 [<f8843c21>] ubi_remove_volume+0x102/0x1e8 [ubi]
 [<f8846077>] ubi_cdev_ioctl+0x22a/0x383 [ubi]
 [<c017d768>] do_ioctl+0x68/0x71
 [<c017d7c6>] vfs_ioctl+0x55/0x271
 [<c017da15>] sys_ioctl+0x33/0x52
 [<c0104152>] sysenter_past_esp+0x5f/0xa5
 =======================

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: improve comment
Artem Bityutskiy [Tue, 18 Dec 2007 11:17:24 +0000 (13:17 +0200)]
UBI: improve comment

Explain better the purpose of thie 'move_to_put' stuff.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: add PID to debugging prints
Artem Bityutskiy [Tue, 18 Dec 2007 10:57:52 +0000 (12:57 +0200)]
UBI: add PID to debugging prints

Also, use single dbg_msg() macro for all prints.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: tweak volumes locking some more
Artem Bityutskiy [Mon, 17 Dec 2007 15:08:55 +0000 (17:08 +0200)]
UBI: tweak volumes locking some more

Make the code more consistent by requiring the caller to lock the
ubi->volume_mutex, because this is what we do for updates.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: introduce volume refcounting
Artem Bityutskiy [Mon, 17 Dec 2007 13:42:57 +0000 (15:42 +0200)]
UBI: introduce volume refcounting

Add ref_count field to UBI volumes and remove weired "vol->removed"
field. This way things are better understandable and we do not have
to do whold show_attr operation under spinlock.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: simplify error handling
Artem Bityutskiy [Mon, 17 Dec 2007 13:48:49 +0000 (15:48 +0200)]
UBI: simplify error handling

If we fail halfway through sysfs file creation, we may just call
sysfs remove function and it will delete all the files we created.
For non-existing files it will also be OK - the remove functions
just return -ENOENT.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: fix and cleanup volume opening functions
Artem Bityutskiy [Mon, 17 Dec 2007 12:22:55 +0000 (14:22 +0200)]
UBI: fix and cleanup volume opening functions

This patch fixes error codes of the functions - if the device number
is out of range, -EINVAL should be returned. It also removes unneeded
try_module_get call from the open by name function.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: fix error path
Artem Bityutskiy [Mon, 17 Dec 2007 12:02:09 +0000 (14:02 +0200)]
UBI: fix error path

Error path in volume creation is bogus. First of, it ovverrides the
'err' variable and returns zero to the caller. Second, ubi_assert()
in the release function is wrong.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: get device when opening volume
Artem Bityutskiy [Mon, 17 Dec 2007 11:09:09 +0000 (13:09 +0200)]
UBI: get device when opening volume

When a volume is opened, get its kref via get_device() call.
And put the reference when closing the volume. With this, we
may have a bit saner volume delete.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: add some more comments
Artem Bityutskiy [Mon, 17 Dec 2007 11:21:07 +0000 (13:21 +0200)]
UBI: add some more comments

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: tweak volumes locking
Artem Bityutskiy [Mon, 17 Dec 2007 10:46:48 +0000 (12:46 +0200)]
UBI: tweak volumes locking

Transform vtbl_mutex to volumes_mutex - this just makes code
easier to understand.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: improve internal interfaces
Artem Bityutskiy [Sun, 16 Dec 2007 18:00:38 +0000 (20:00 +0200)]
UBI: improve internal interfaces

Pass volume description object to the EBA function which makes
more sense, and EBA function do not have to find the volume
description object by volume ID.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: bugfix: dont oops with NULL module parameter
Artem Bityutskiy [Sun, 16 Dec 2007 14:46:57 +0000 (16:46 +0200)]
UBI: bugfix: dont oops with NULL module parameter

E.g., it oopsed in case of: modprobe ubi mtd = 0

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: remove ubi_devices_cnt
Artem Bityutskiy [Sun, 16 Dec 2007 11:01:03 +0000 (13:01 +0200)]
UBI: remove ubi_devices_cnt

This global variablea is not really needed, remove it

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: create ubi_wl_entry slab on initialization
Artem Bityutskiy [Sun, 16 Dec 2007 10:49:01 +0000 (12:49 +0200)]
UBI: create ubi_wl_entry slab on initialization

Similarly to ltree_entry_slab, it makes more sense to create
and destroy ubi_wl_entry slab on module initialization/exit.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: create ltree_entry slab on initialization
Artem Bityutskiy [Sun, 16 Dec 2007 10:32:51 +0000 (12:32 +0200)]
UBI: create ltree_entry slab on initialization

Since the ltree_entry slab cache is a global entity, which is
used by all UBI devices, it is more logical to create it on
module initialization time and destro on module exit time.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: improve error messages
Artem Bityutskiy [Sat, 15 Dec 2007 17:56:51 +0000 (19:56 +0200)]
UBI: improve error messages

Always print error code with error messages, sometimes it is
extremely helpful info.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: remove redundant field
Artem Bityutskiy [Sat, 15 Dec 2007 16:13:56 +0000 (18:13 +0200)]
UBI: remove redundant field

Remove redundant ubi->major field - we have it in ubi->cdev.dev
already.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: minor tidy-ups
Artem Bityutskiy [Sat, 15 Dec 2007 13:09:07 +0000 (15:09 +0200)]
UBI: minor tidy-ups

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: silence a warning
Jesper Juhl [Thu, 13 Dec 2007 22:53:08 +0000 (23:53 +0100)]
UBI: silence a warning

This patch silences the following warning :

  drivers/mtd/ubi/vmt.c:73: warning: 'ret' may be used uninitialized in this function

gcc can't see that we always initialize ret in all situations where it is
actually used. The one case where it's not initialized is when we BUG(),
but gcc doesn't know that we won't then continue and use an uninitialized
'ret'.

This patch results in code that does exactely the same as before, but it
also makes gcc shut up, so we generate one less line of warning noise.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: add ubi_leb_map interface
Artem Bityutskiy [Thu, 6 Dec 2007 16:47:30 +0000 (18:47 +0200)]
UBI: add ubi_leb_map interface

The idea of this interface belongs to Adrian Hunter. The
interface is extremely useful when one has to have a guarantee
that an LEB will contain all 0xFFs even in case of an unclean
reboot. UBI does have an 'ubi_leb_erase()' call which may do
this, but it is stupid and ineffecient, because it flushes whole
queue. I should be re-worked to just be a pair of unmap,
map calls.

The user of the interfaci is UBIFS at the moment.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: bugfix: allocate mandatory EBs first
Artem Bityutskiy [Tue, 4 Dec 2007 19:36:12 +0000 (21:36 +0200)]
UBI: bugfix: allocate mandatory EBs first

First allocate the necessary eraseblocks, then the optional ones.
Otherwise it allocates all PEBs for bad EB handling, and fails
on then following EBA LEB allocation.

Reported-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: fix error code in ubi_io_read()
Artem Bityutskiy [Thu, 18 Oct 2007 17:09:41 +0000 (20:09 +0300)]
UBI: fix error code in ubi_io_read()

When NAND detects an ECC error, it returns -EBADMSG. It does not
stop reading requested data if one page has an ECC error, it keeps
going and reads all the requested data. If it fails to read all
the data, it does not return -EBADMSG, but returns the error code
which reflects the reason of the failure.

But some drivers may have bugs (e.g., OneNAND had) and stop reading
after the first ECC error, so it returns -EBADMSG. In turn, UBI
propagates this up to the caller. The caller will treat this as
"all the requested data was read, but there was an ECC error".

So we change the error code to -EIO if it is -EBADMSG and the read
length is less then the requested length. We also add an assertion,
so if UBI debugging is enabled, UBI will bug.

Pointed-to-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoCryptoapi: add LZO compression algorithm support
Zoltan Sogor [Mon, 10 Dec 2007 12:41:19 +0000 (13:41 +0100)]
Cryptoapi: add LZO compression algorithm support

Add LZO compression algorithm support

Signed-off-by: Zoltan Sogor <weth@inf.u-szeged.hu>
15 years agoCryptoapi: add common compression tester function
Zoltan Sogor [Mon, 10 Dec 2007 10:05:17 +0000 (11:05 +0100)]
Cryptoapi: add common compression tester function

Add common compression tester function
Modify deflate test case to use the common compressor test function

Signed-off-by: Zoltan Sogor <weth@inf.u-szeged.hu>
16 years agoLinux 2.6.24 v2.6.24
Linus Torvalds [Thu, 24 Jan 2008 22:58:37 +0000 (14:58 -0800)]
Linux 2.6.24

16 years agospi: omap2_mcspi PIO RX fix
Kalle Valo [Thu, 24 Jan 2008 22:00:40 +0000 (14:00 -0800)]
spi: omap2_mcspi PIO RX fix

Before transmission of the last word in PIO RX_ONLY mode rx+tx mode
is enabled:

/* prevent last RX_ONLY read from triggering
 * more word i/o: switch to rx+tx
 */
if (c == 0 && tx == NULL)
mcspi_write_cs_reg(spi,
OMAP2_MCSPI_CHCONF0, l);

But because c is decremented after the test, c will never be zero and
rx+tx will not be enabled. This breaks RX_ONLY mode PIO transfers.

Fix it by decrementing c in the beginning of the various I/O loops.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoRevert "mac80211: warn when receiving frames with unaligned data"
Linus Torvalds [Thu, 24 Jan 2008 21:35:10 +0000 (13:35 -0800)]
Revert "mac80211: warn when receiving frames with unaligned data"

This reverts commit 81100eb80add328c4d2a377326f15aa0e7236398 for the
release, to avoid the unnecessary warning noise that is only really
relevant to wireless driver developers.

The warning will probably go right back in after I cut the release, but
at least we won't unnecessarily worry users.

Acked-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Thu, 24 Jan 2008 16:12:38 +0000 (08:12 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Partially revert "Constify function pointer tables."

16 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Thu, 24 Jan 2008 16:09:50 +0000 (08:09 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  Revert "ACPI: Fan: Drop force_power_state acpi_device option"
  ACPI: EC: "DEBUG" needs to be defined earlier
  ACPI: EC: add leading zeros to debug messages
  ACPI: EC: fix dmesg spam regression
  ACPI: DMI blacklist to reduce console warnings on OSI(Linux) systems.
  ACPI: Add ThinkPad R61, ThinkPad T61 to OSI(Linux) white-list
  ACPI: make _OSI(Linux) console messages smarter
  ACPI: Delete Intel Customer Reference Board (CRB) from OSI(Linux) DMI list
  ACPI: on OSI(Linux), print needed DMI rather than requesting dmidecode output
  ACPI: create acpi_dmi_dump()
  DMI: create dmi_get_slot()
  DMI: move dmi_available declaration to linux/dmi.h
  ACPI: processor: Fix null pointer dereference in throttling

16 years agoslab: partially revert list3 changes
Mel Gorman [Thu, 24 Jan 2008 13:49:54 +0000 (05:49 -0800)]
slab: partially revert list3 changes

Partial revert the changes made by 04231b3002ac53f8a64a7bd142fde3fa4b6808c6
to the kmem_list3 management. On a machine with a memoryless node, this
BUG_ON was triggering

static void *____cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid)
{
struct list_head *entry;
struct slab *slabp;
struct kmem_list3 *l3;
void *obj;
int x;

l3 = cachep->nodelists[nodeid];
BUG_ON(!l3);

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Christoph Lameter <clameter@sgi.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofix hugepages leak due to pagetable page sharing
Larry Woodman [Thu, 24 Jan 2008 13:49:25 +0000 (05:49 -0800)]
fix hugepages leak due to pagetable page sharing

The shared page table code for hugetlb memory on x86 and x86_64
is causing a leak.  When a user of hugepages exits using this code
the system leaks some of the hugepages.

-------------------------------------------------------
Part of /proc/meminfo just before database startup:
HugePages_Total:  5500
HugePages_Free:   5500
HugePages_Rsvd:      0
Hugepagesize:     2048 kB

Just before shutdown:
HugePages_Total:  5500
HugePages_Free:   4475
HugePages_Rsvd:      0
Hugepagesize:     2048 kB

After shutdown:
HugePages_Total:  5500
HugePages_Free:   4988
HugePages_Rsvd:
0 Hugepagesize:     2048 kB
----------------------------------------------------------

The problem occurs durring a fork, in copy_hugetlb_page_range().  It
locates the dst_pte using huge_pte_alloc().  Since huge_pte_alloc() calls
huge_pmd_share() it will share the pmd page if can, yet the main loop in
copy_hugetlb_page_range() does a get_page() on every hugepage.  This is a
violation of the shared hugepmd pagetable protocol and creates additional
referenced to the hugepages causing a leak when the unmap of the VMA
occurs.  We can skip the entire replication of the ptes when the hugepage
pagetables are shared.  The attached patch skips copying the ptes and the
get_page() calls if the hugetlbpage pagetable is shared.

[akpm@linux-foundation.org: coding-style cleanups]
Signed-off-by: Larry Woodman <lwoodman@redhat.com>
Signed-off-by: Adam Litke <agl@us.ibm.com>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Ken Chen <kenchen@google.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: William Lee Irwin III <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosysctl: kill binary sysctl KERN_PPC_L2CR
Eric W. Biederman [Thu, 24 Jan 2008 13:52:13 +0000 (05:52 -0800)]
sysctl: kill binary sysctl KERN_PPC_L2CR

: Stefan Roese <sr@denx.de> said:
> ppc: 4xx: sysctl table check failed: /kernel/l2cr .1.31 Missing strategy
>
> I'm seeing this error message when booting an recent arch/ppc kernel on
> 4xx platforms (tested on Ocotea and other 4xx platforms). Booting NFS
> rootfs still works fine, but this message kind of makes me "nervous".
> This is not seen on 4xx arch/powerpc platforms. Here the bootlog:

Because the data field was never filled and a binary sysctl handler was
never written this sysctl has never been usable through the sys_sysctl
interface.  So just remove the binary sysctl number.  Making the kernel
sanity checks happy.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Reported-by: Stefan Roese <sr@denx.de>
Cc: Josh Boyer <jwboyer@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolockdep: fix kernel crash on module unload
Arjan van de Ven [Thu, 24 Jan 2008 06:00:45 +0000 (07:00 +0100)]
lockdep: fix kernel crash on module unload

Michael Wu noticed in his lkml post at

    http://marc.info/?l=linux-kernel&m=119396182726091&w=2

that certain wireless drivers ended up having their name in module
memory, which would then crash the kernel on module unload.

The patch he proposed was a bit clumsy in that it increased the size of
a lockdep entry significantly; the patch below tries another approach,
it checks, on module teardown, if the name of a class is in module space
and then zaps the class.  This is very similar to what we already do
with keys that are in module space.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[SPARC64]: Partially revert "Constify function pointer tables."
David S. Miller [Thu, 24 Jan 2008 05:32:04 +0000 (21:32 -0800)]
[SPARC64]: Partially revert "Constify function pointer tables."

This partially reverts 872e2be7c4056496c2871bd9b0f2fae6c374fe47
(Constify function pointer tables.)

The solaris/socksys.c transformation wasn't valid:

arch/sparc64/solaris/socksys.c:192: error: assignment of read-only variable â€˜socksys_file_ops’
arch/sparc64/solaris/socksys.c:195: error: assignment of read-only variable â€˜socksys_file_ops’
arch/sparc64/solaris/socksys.c:196: error: assignment of read-only variable â€˜socksys_file_ops’

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoPull dmi-2.6.24 into release branch
Len Brown [Thu, 24 Jan 2008 04:50:01 +0000 (23:50 -0500)]
Pull dmi-2.6.24 into release branch

16 years agoPull bugzilla-9798 into release branch
Len Brown [Thu, 24 Jan 2008 04:48:46 +0000 (23:48 -0500)]
Pull bugzilla-9798 into release branch

16 years agoPull bugzilla-8459 into release branch
Len Brown [Thu, 24 Jan 2008 04:48:33 +0000 (23:48 -0500)]
Pull bugzilla-8459 into release branch

16 years agoPull bugzilla-9747 into release branch
Len Brown [Thu, 24 Jan 2008 04:48:19 +0000 (23:48 -0500)]
Pull bugzilla-9747 into release branch

16 years agoRevert "ACPI: Fan: Drop force_power_state acpi_device option"
Len Brown [Thu, 24 Jan 2008 03:41:20 +0000 (22:41 -0500)]
Revert "ACPI: Fan: Drop force_power_state acpi_device option"

This reverts commit 93ad7c07ad487b036add8760dabcc35666a550ef.

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

Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: EC: "DEBUG" needs to be defined earlier
Márton Németh [Thu, 24 Jan 2008 03:34:09 +0000 (22:34 -0500)]
ACPI: EC: "DEBUG" needs to be defined earlier

The "DEBUG" symbol needs to be defined before #including <linux/kernel.h> to
get the pr_debug() working.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: EC: add leading zeros to debug messages
Márton Németh [Thu, 24 Jan 2008 03:33:06 +0000 (22:33 -0500)]
ACPI: EC: add leading zeros to debug messages

Add leading zeros to pr_debug() calls. For example if x=0x0a, the format
"0x%2x" will result the string "0x a", the format "0x%2.2x" will result "0x0a".

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: EC: fix dmesg spam regression
Alexey Starikovskiy [Thu, 24 Jan 2008 03:28:34 +0000 (22:28 -0500)]
ACPI: EC: fix dmesg spam regression

Return OBF_1 optimization workaround

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

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Thu, 24 Jan 2008 02:46:25 +0000 (18:46 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC]: Constify function pointer tables.
  [SPARC64]: Fix section error in sparcspkr
  [SPARC64]: Fix of section mismatch warnings.

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 24 Jan 2008 02:41:51 +0000 (18:41 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  sis190: scheduling while atomic error
  sis190: mdio operation failure is not correctly detected
  sis190: remove duplicate INIT_WORK
  sis190: add cmos ram access code for the SiS19x/968 chipset pair
  [INET]: Fix truesize setting in ip_append_data
  [NETNS]: Re-export init_net via EXPORT_SYMBOL.
  iwlwifi: fix possible read attempt on ucode that is not available
  [IPV4]: Add missing skb->truesize increment in ip_append_page().
  [TULIP] DMFE: Fix SROM parsing regression.
  [BLUETOOTH]: Move children of connection device to NULL before connection down.

16 years agoACPI: DMI blacklist to reduce console warnings on OSI(Linux) systems.
Len Brown [Thu, 24 Jan 2008 02:19:27 +0000 (21:19 -0500)]
ACPI: DMI blacklist to reduce console warnings on OSI(Linux) systems.

This DMI blacklist reduces the console messages
on systems which have a BIOS that invokes OSI(Linux).

As the DMI blacklist already knows about these systems,
the request for DMI info itself is disabled.

Further, if OSI(Linux) has already been determined
to have no beneift, we disable the console message
requesting acpi_osi=Linux test results.

Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: Add ThinkPad R61, ThinkPad T61 to OSI(Linux) white-list
Len Brown [Thu, 24 Jan 2008 01:56:18 +0000 (20:56 -0500)]
ACPI: Add ThinkPad R61, ThinkPad T61 to OSI(Linux) white-list

acpi_osi=Linux helps sound on these systems.

Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: make _OSI(Linux) console messages smarter
Len Brown [Thu, 24 Jan 2008 01:50:56 +0000 (20:50 -0500)]
ACPI: make _OSI(Linux) console messages smarter

If BIOS invokes _OSI(Linux), the kernel response
depends on what the ACPI DMI list knows about the system,
and that is reflectd in dmesg:

1) System unknown to DMI:

ACPI: BIOS _OSI(Linux) query ignored
ACPI: DMI System Vendor: LENOVO
ACPI: DMI Product Name: 7661W1P
ACPI: DMI Product Version: ThinkPad T61
ACPI: DMI Board Name: 7661W1P
ACPI: DMI BIOS Vendor: LENOVO
ACPI: DMI BIOS Date: 10/18/2007
ACPI: Please send DMI info above to linux-acpi@vger.kernel.org
ACPI: If "acpi_osi=Linux" works better, please notify linux-acpi@vger.kernel.org

2) System known to DMI, but effect of OSI(Linux) unknown:

ACPI: DMI detected: Lenovo ThinkPad T61
...
ACPI: BIOS _OSI(Linux) query ignored via DMI
ACPI: If "acpi_osi=Linux" works better, please notify linux-acpi@vger.kernel.org

3) System known to DMI, which disables _OSI(Linux):

ACPI: DMI detected: Lenovo ThinkPad T61
...
ACPI: BIOS _OSI(Linux) query ignored via DMI

4) System known to DMI, which enable _OSI(Linux):

ACPI: DMI detected: Lenovo ThinkPad T61
ACPI: Added _OSI(Linux)
...
ACPI: BIOS _OSI(Linux) query honored via DMI

cmdline overrides take precidence over the built-in
default and the DMI prescribed default.
cmdline "acpi_osi=Linux" results in:

ACPI: BIOS _OSI(Linux) query honored via cmdline

Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: Delete Intel Customer Reference Board (CRB) from OSI(Linux) DMI list
Len Brown [Thu, 24 Jan 2008 01:06:41 +0000 (20:06 -0500)]
ACPI: Delete Intel Customer Reference Board (CRB) from OSI(Linux) DMI list

Linux does not want BIOS writers to invoke _OSI(Linux) -
for in the field it causes more Windows incompatibility problems
than it solves.

So when it is seen in the BIOS for an Intel Customer Reference Board,
Linux should ignore its effect by default, and should complain loudly.
Otherwise, the reference BIOS will go unfixed, and the bad BIOS
will spread to the field.

Users of this board can get the old behavior with "acpi_osi=Linux"

As this was the only entry, delete acpi_osl_dmi_table[].

Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: on OSI(Linux), print needed DMI rather than requesting dmidecode output
Len Brown [Thu, 24 Jan 2008 01:04:28 +0000 (20:04 -0500)]
ACPI: on OSI(Linux), print needed DMI rather than requesting dmidecode output

Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: create acpi_dmi_dump()
Len Brown [Thu, 24 Jan 2008 01:01:22 +0000 (20:01 -0500)]
ACPI: create acpi_dmi_dump()

A utility routine to print common entries used
for ACPI-related DMI blacklist entries.

Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoDMI: create dmi_get_slot()
Len Brown [Wed, 23 Jan 2008 21:36:45 +0000 (16:36 -0500)]
DMI: create dmi_get_slot()

This simply allows other sub-systems (such as ACPI)
to access and print out slots in static dmi_ident[].

Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoDMI: move dmi_available declaration to linux/dmi.h
Len Brown [Wed, 16 Jan 2008 22:20:37 +0000 (17:20 -0500)]
DMI: move dmi_available declaration to linux/dmi.h

Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Thu, 24 Jan 2008 02:05:28 +0000 (18:05 -0800)]
Merge git://git./linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] initio: fix module hangs on loading

16 years agodrm/i915: add support for E7221 chipset
Carlos Martín [Thu, 24 Jan 2008 00:34:10 +0000 (10:34 +1000)]
drm/i915: add support for E7221 chipset

E7221 chipset is a server version of the i915.

Signed-off-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoagp/intel: add support for E7221 chipset
Carlos Martín [Thu, 24 Jan 2008 00:34:09 +0000 (10:34 +1000)]
agp/intel: add support for E7221 chipset

The E7221 chipset is a 915 rebadged for the Intel server line.

Signed-off-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoxen: disable vcpu_info placement for now
Jeremy Fitzhardinge [Thu, 24 Jan 2008 00:07:17 +0000 (16:07 -0800)]
xen: disable vcpu_info placement for now

There have been several reports of Xen guest domains locking up when
using vcpu_info structure placement.  Disable it for now.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[SCSI] initio: fix module hangs on loading
Stuart Swales [Wed, 23 Jan 2008 20:00:48 +0000 (20:00 +0000)]
[SCSI] initio: fix module hangs on loading

I've verified (on my Initio 9100 with a DAT drive) that the
2.6.24-rc8-git6 initio module still hangs on loading.

These fixes (other than the printk) are needed to get the module to load
ok (and work correctly) with my adapter & tape drive.

a) printk cosmetic fix

b) cblk->sglen needs setting for later DMA I/O routines to use

c) host->bios_addr needs setting for debug output correctness

d) semaph & semaph_lock initialisation had got lost since 2.6.22

e) since 2.6.22 the bios data address was truncated to 16 bits (needs 20
when shifted left)

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agoUpdate ctime and mtime for memory-mapped files
Anton Salikhmetov [Tue, 22 Jan 2008 23:21:18 +0000 (02:21 +0300)]
Update ctime and mtime for memory-mapped files

Update ctime and mtime for memory-mapped files at a write access on
a present, read-only PTE, as well as at a write on a non-present PTE.

Signed-off-by: Anton Salikhmetov <salikhmetov@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosis190: scheduling while atomic error
Francois Romieu [Sat, 17 Nov 2007 20:29:47 +0000 (21:29 +0100)]
sis190: scheduling while atomic error

sis190_tx_timeout
-> sis190_hw_start
   -> sis190_soft_reset
      -> msleep *splat*

PCI transactions are correctly flushed here.
The msleep() is probably useless.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: K.M. Liu <kmliu@sis.com.tw>
16 years agosis190: mdio operation failure is not correctly detected
Francois Romieu [Sat, 17 Nov 2007 15:56:43 +0000 (16:56 +0100)]
sis190: mdio operation failure is not correctly detected

i ranges from 0 to 100 in the 'for' loop a few lines above.

Reported by davem.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: K.M. Liu <kmliu@sis.com.tw>
16 years agosis190: remove duplicate INIT_WORK
Francois Romieu [Sat, 17 Nov 2007 14:55:10 +0000 (15:55 +0100)]
sis190: remove duplicate INIT_WORK

It is already done in sis190_init_one.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: K.M. Liu <kmliu@sis.com.tw>
16 years agosis190: add cmos ram access code for the SiS19x/968 chipset pair
Francois Romieu [Tue, 4 Dec 2007 21:58:41 +0000 (22:58 +0100)]
sis190: add cmos ram access code for the SiS19x/968 chipset pair

More work is needed to handle correctly the PHY of the new devices
when connected to a 10Mb link but this change already helps some
users as is.

Fix for:
http://bugzilla.kernel.org/show_bug.cgi?id=9467

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: K.M. Liu <kmliu@sis.com.tw>
Cc: J. Gleacher <jgleacher@yahoo.com>
Cc: Alexandre Penasso Teixeira <alexandre@keepsoftware.com>
Cc: Arliton Rocha <arliton@gmail.com>
Cc: Juan Jose Pablos <juanjo@apertus.es>
Cc: Wipat Srutiprom <wipat.s@psu.ac.th>
16 years ago[INET]: Fix truesize setting in ip_append_data
Herbert Xu [Wed, 23 Jan 2008 06:39:26 +0000 (22:39 -0800)]
[INET]: Fix truesize setting in ip_append_data

As it is ip_append_data only counts page fragments to the skb that
allocated it.  As such it means that the first skb gets hit with a
4K charge even though it might have only used a fraction of it while
all subsequent skb's that use the same page gets away with no charge
at all.

This bug was exposed by the UDP accounting patch.

[ The wmem_alloc bumping needs to be moved with the truesize,
  noticed by Takahiro Yasui.  -DaveM ]

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Re-export init_net via EXPORT_SYMBOL.
Denis V. Lunev [Wed, 23 Jan 2008 06:05:33 +0000 (22:05 -0800)]
[NETNS]: Re-export init_net via EXPORT_SYMBOL.

init_net is used added as a parameter to a lot of old API calls, f.e.
ip_dev_find. These calls were exported as EXPORT_SYMBOL. So, export init_net
as EXPORT_SYMBOL to keep networking API consistent.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoiwlwifi: fix possible read attempt on ucode that is not available
Reinette Chatre [Mon, 21 Jan 2008 18:08:31 +0000 (10:08 -0800)]
iwlwifi: fix possible read attempt on ucode that is not available

This fixes a NULL pointer dereference that can occur when the
ucode is not loaded at the time __iwl_up is called.

The problem was reported at http://kerneloops.org/raw.php?rawid=2765&msgid=

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[IPV4]: Add missing skb->truesize increment in ip_append_page().
David S. Miller [Wed, 23 Jan 2008 07:44:31 +0000 (23:44 -0800)]
[IPV4]: Add missing skb->truesize increment in ip_append_page().

And as noted by Takahiro Yasui, we thus need to bump the
sk->sk_wmem_alloc at this spot as well.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TULIP] DMFE: Fix SROM parsing regression.
David S. Miller [Tue, 22 Jan 2008 07:20:58 +0000 (23:20 -0800)]
[TULIP] DMFE: Fix SROM parsing regression.

Changeset 16b110c3fd760620b4a787db6ed512fe531ab1b5 (dmfe warning fix)
bothed up the offsets read from the SROM so that it doesn't read the
same datums it used to.

The change made transformations like turning:

"srom + 34"

into

"(__le32 *)srom + 34/4"

which doesn't work because 4 does not divide evenly
into 34 so we're using a different pointer offset
than in the original code.

I've changed theses cases in dmfe_parse_srom() to
consistently use "(type *)(srom + offset)" preserving
the offsets from the original code.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BLUETOOTH]: Move children of connection device to NULL before connection down.
Dave Young [Tue, 22 Jan 2008 06:35:21 +0000 (22:35 -0800)]
[BLUETOOTH]: Move children of connection device to NULL before connection down.

The rfcomm tty device will possibly retain even when conn is down, and
sysfs doesn't support zombie device moving, so this patch move the tty
device before conn device is destroyed.

For the bug refered please see :
http://lkml.org/lkml/2007/12/28/87

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC]: Constify function pointer tables.
Jan Engelhardt [Wed, 23 Jan 2008 02:29:20 +0000 (18:29 -0800)]
[SPARC]: Constify function pointer tables.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agox86: GEODE fix a race condition in the MFGPT timer tick
Jordan Crouse [Tue, 22 Jan 2008 22:30:16 +0000 (23:30 +0100)]
x86: GEODE fix a race condition in the MFGPT timer tick

When we set the MFGPT timer tick, there is a chance that we'll
immediately assert an event.  If for some reason the IRQ routing
for this clock has been setup for some other purpose, then we
could end up firing an interrupt into the SMM handler or worse.

This rearranges the timer tick init function to initalize the handler
before we set up the MFGPT clock to make sure that even if we get
an event, it will go to the handler.

Furthermore, in the handler we need to make sure that we clear the
event, even if the timer isn't running.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Arnd Hannemann <hannemann@i4.informatik.rwth-aachen.de>
16 years agoFix file references in documentation and Kconfig
Johann Felix Soden [Sun, 20 Jan 2008 13:41:18 +0000 (14:41 +0100)]
Fix file references in documentation and Kconfig

Fix typo in arch/powerpc/boot/flatdevtree_env.h.
There is no Documentation/networking/ixgbe.txt.

README.cycladesZ is now in Documentation/.
wavelan.p.h is now in drivers/net/wireless/.
HFS.txt is now Documentation/filesystems/hfs.txt.
OSS-files are now in sound/oss/.

Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
Linus Torvalds [Tue, 22 Jan 2008 17:25:55 +0000 (09:25 -0800)]
Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6

* 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6:
  hwmon: (it87) request only Environment Controller ports

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
Linus Torvalds [Tue, 22 Jan 2008 17:19:06 +0000 (09:19 -0800)]
Merge git://git./linux/kernel/git/x86/linux-2.6-x86

* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  Revert "x86: fix NMI watchdog & 'stopped time' problem"

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
Linus Torvalds [Tue, 22 Jan 2008 17:18:45 +0000 (09:18 -0800)]
Merge git://git./linux/kernel/git/mingo/linux-2.6-sched

* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
  sched: group scheduler, set uid share fix

16 years agorcu: fix section mismatch
Randy Dunlap [Tue, 22 Jan 2008 11:31:39 +0000 (03:31 -0800)]
rcu: fix section mismatch

rcu_online_cpu() should be __cpuinit instead of __devinit.

WARNING: vmlinux.o(.text+0x4b6d5): Section mismatch: reference to .init.text: (between 'rcu_cpu_notify' and 'wakeme_after_rcu')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoW1: w1_therm.c is flagging 0C etc as invalid
David Fries [Tue, 22 Jan 2008 11:31:39 +0000 (03:31 -0800)]
W1: w1_therm.c is flagging 0C etc as invalid

The extra rom[0] check is flagging valid temperatures as invalid when
there is already a CRC data transmission check.

w1_therm_read_bin()
if (rom[8] == crc && rom[0])
verdict = 1;

Requiring rom[0] to be non-zero will flag as invalid temperature
conversions when the low byte is zero, specifically the temperatures 0C,
16C, 32C, 48C, -16C, -32C, and -48C.

The CRC check is produced on the device for the previous 8 bytes and is
required to ensure the data integrity in transmission.  I don't see why the
extra check for rom[0] being non-zero is in there.  Evgeniy Polyakov didn't
know either.  Just for a check I unplugged the sensor, executed a
temperature conversion, and read the results.  The read was all ff's, which
also failed the CRC, so it doesn't need to protect against a disconnected
sensor.

I have more extensive patches in the work, but these two trivial ones will
do for today.  I would like to hear from people who use the ds2490 USB to
one wire dongle.  1 if you would be willing to test the patches as I
currently only have the one sensor on a short parisite powered wire, 2 if
there is any cheap sources for the ds2490.

Signed-off-by: David Fries <david@fries.net>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoW1: w1_therm.c ds18b20 decode freezing temperatures correctly
David Fries [Tue, 22 Jan 2008 11:31:37 +0000 (03:31 -0800)]
W1: w1_therm.c ds18b20 decode freezing temperatures correctly

Correct the decoding of negative C temperatures.  The code did a binary OR
of two bytes to make a 16 bit value, but assignd it to an integer.  This
caused the value to not be sign extended and to loose that it was a
negative number in the assignment.

Before the patch (in my freezer),
w1_slave
ed fe 4b 46 7f ff 03 10 e4 : crc=e4 YES
ed fe 4b 46 7f ff 03 10 e4 t=4078
With the patch,
e3 fe 4b 46 7f ff 0d 10 81 : crc=81 YES
e3 fe 4b 46 7f ff 0d 10 81 t=-17

Signed-off-by: David Fries <david@fries.net>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agohwmon: (it87) request only Environment Controller ports
Bjorn Helgaas [Tue, 22 Jan 2008 12:21:03 +0000 (07:21 -0500)]
hwmon: (it87) request only Environment Controller ports

The IT8705F and related parts are Super I/O controllers that contain
many separate devices.

Some BIOSes describe IT8705F I/O port usage under a motherboard device
(PNP0C02) with overlapping regions, e.g., 0x290-0x29f and 0x290-0x294.

The it87 driver supports only the Environment Controller, which requires
only two ISA ports, but it used to request an eight-port range.  If that
range exceeds a range reported by the BIOS, as 0x290-0x297 would, the
request fails, and the it87 driver cannot claim the device.

This patch makes the it87 driver request only the two ports used for the
Environment Controller device.

Systems where this problem has been reported:
    Gigabyte GA-K8N Ultra 9
    Gigabyte M56S-S3
    Gigabyte GA-965G-DS3

Kernel bug reports:
    http://bugzilla.kernel.org/show_bug.cgi?id=9514
    http://lkml.org/lkml/2007/12/4/466

Related change:
    http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a7839e960675b549f06209d18283d5cee2ce9261

    The patch above increases the number of PNP port resources we support.
    Prior to this patch, we ignored some port resources, which masked the
    it87 problem.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
16 years agosched: group scheduler, set uid share fix
Ingo Molnar [Tue, 22 Jan 2008 10:24:58 +0000 (11:24 +0100)]
sched: group scheduler, set uid share fix

setting cpu share to 1 causes hangs, as reported in:

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

as the default share is 1024, the values of 0 and 1 can indeed
cause problems. Limit it to 2 or higher values.

These values can only be set by the root user - but still it
makes sense to protect against nonsensical values.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoRevert "x86: fix NMI watchdog & 'stopped time' problem"
Thomas Gleixner [Tue, 22 Jan 2008 09:23:01 +0000 (10:23 +0100)]
Revert "x86: fix NMI watchdog & 'stopped time' problem"

This reverts commit d4d25deca49ec2527a634557bf5a6cf449f85deb.

It tried to fix long standing bugzilla entries, but the solution was
reported to break other systems. The reporter of

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

tracked it down to this commit and confirmed that reverting the patch
restores the correct behaviour. It's too late in the release cycle to
find a better solution than reverting the commit to avoid regressions.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
16 years ago[SPARC64]: Fix section error in sparcspkr
Sam Ravnborg [Tue, 22 Jan 2008 01:25:37 +0000 (17:25 -0800)]
[SPARC64]: Fix section error in sparcspkr

With a sparc64 defconfig modified to set CONFIG_HOTPLUG=n
the following error happened during link of vmlinux:

local symbol 0: discarded in section `.devexit.text' from drivers/built-in.o
local symbol 1: discarded in section `.devexit.text' from drivers/built-in.o

(The error message above is from kbuild.git but it happens in mainline too)

The error happens becase there is a reference from .text/.data to a
function marked __devexit. With CONFIG_HOTPLUG=n all code marked
__devexit are discarded and the linker complains.

It was tracked down to sparcspkr.c which were missing __devexit_p()
around the function pointers.

Unfortunately modpost did not catch this since modpost do not warn
about references from .data to .devexit from variables named *_driver.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Fix of section mismatch warnings.
Sam Ravnborg [Tue, 22 Jan 2008 01:22:46 +0000 (17:22 -0800)]
[SPARC64]: Fix of section mismatch warnings.

Fix following Section mismatch warning in sparc64:

WARNING: arch/sparc64/kernel/built-in.o(.text+0x13dec): Section mismatch: reference to .devinit.text:pci_scan_one_pbm (between 'psycho_scan_bus' and 'psycho_pbm_init')
WARNING: arch/sparc64/kernel/built-in.o(.text+0x14b58): Section mismatch: reference to .devinit.text:pci_scan_one_pbm (between 'sabre_scan_bus' and 'sabre_init')
WARNING: arch/sparc64/kernel/built-in.o(.text+0x15ea4): Section mismatch: reference to .devinit.text:pci_scan_one_pbm (between 'schizo_scan_bus' and 'schizo_pbm_init')
WARNING: arch/sparc64/kernel/built-in.o(.text+0x17780): Section mismatch: reference to .devinit.text:pci_scan_one_pbm (between 'pci_sun4v_scan_bus' and 'pci_sun4v_get_head')
WARNING: arch/sparc64/kernel/built-in.o(.text+0x17d5c): Section mismatch: reference to .devinit.text:pci_scan_one_pbm (between 'pci_fire_scan_bus' and 'pci_fire_get_head')
WARNING: arch/sparc64/kernel/built-in.o(.text+0x23860): Section mismatch: reference to .devinit.text:vio_dev_release (between 'vio_create_one' and 'vio_add')
WARNING: arch/sparc64/kernel/built-in.o(.text+0x23868): Section mismatch: reference to .devinit.text:vio_dev_release (between 'vio_create_one' and 'vio_add')

The pci_* were all missing __init annotations.
For the vio.c case it was a function with a wrong annotation which was removed.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMakefile: Change typoed 'behavour' to 'behaviour'
Linus Nilsson [Sun, 20 Jan 2008 16:10:01 +0000 (17:10 +0100)]
Makefile: Change typoed 'behavour' to 'behaviour'

Change two occurances of "behavour" to "behaviour".

Signed-off-by: Linus Nilsson <lajnold@acc.umu.se>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Tue, 22 Jan 2008 03:45:49 +0000 (19:45 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/selinux-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
  selinux: fix memory leak in netlabel code

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 22 Jan 2008 03:42:25 +0000 (19:42 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  [ICMP]: ICMP_MIB_OUTMSGS increment duplicated
  [IPV6]: RFC 2011 compatibility broken
  [IPV6]: ICMP6_MIB_OUTMSGS increment duplicated
  [NET]: rtnl_link: fix use-after-free
  [AF_KEY]: Fix skb leak on pfkey_send_migrate() error
  [ATM] atm/suni.c: Fix section mismatch.
  [ATM] atm/idt77105.c: Fix section mismatch.
  [IrDA]: af_irda memory leak fixes
  [NEIGH]: Revert 'Fix race between neigh_parms_release and neightbl_fill_parms'
  [NETFILTER]: bridge-netfilter: fix net_device refcnt leaks
  [IPV6] ROUTE: Make sending algorithm more friendly with RFC 4861.
  [IPV4] FIB_HASH : Avoid unecessary loop in fn_hash_dump_zone()
  [NET]: Fix interrupt semaphore corruption in Intel drivers.
  [IPV4] fib_trie: fix duplicated route issue
  [IPV4] fib_hash: fix duplicated route issue
  [IPV6]: Mischecked tw match in __inet6_check_established.
  rfkill: call rfkill_led_trigger_unregister() on error

16 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Tue, 22 Jan 2008 03:40:05 +0000 (19:40 -0800)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  tc35815: Use irq number for tc35815-mac platform device id
  [MIPS] Malta: Fix reading the PCI clock frequency on big-endian
  [MIPS] SMTC: Fix build error.

16 years agoFix filesystem capability support
Andrew G. Morgan [Tue, 22 Jan 2008 01:18:30 +0000 (17:18 -0800)]
Fix filesystem capability support

In linux-2.6.24-rc1, security/commoncap.c:cap_inh_is_capped() was
introduced. It has the exact reverse of its intended behavior. This
led to an unintended privilege esculation involving a process'
inheritable capability set.

To be exposed to this bug, you need to have Filesystem Capabilities
enabled and in use. That is:

- CONFIG_SECURITY_FILE_CAPABILITIES must be defined for the buggy code
  to be compiled in.

- You also need to have files on your system marked with fI bits raised.

Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@akpm@linux-foundation.org>
16 years agos3c2410_fb: fix line length calculation
Stefan Schmidt [Tue, 22 Jan 2008 01:18:27 +0000 (17:18 -0800)]
s3c2410_fb: fix line length calculation

Fix line length calculation. var->width is the size of the display in mm. We
like to use the pixel size.

Without this fix, dynamic (fbset) based resolution and depths changes with
s3c2410_fb don't work at all.

Spotted by john cass <johnpcass@yahoo.com>

Signed-off-by: Stefan Schmidt <stefan@openmoko.org>
Signed-off-by: Harald Welte <laforge@openmoko.org>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@akpm@linux-foundation.org>
16 years agoCRIS: add missed local_irq_restore call
Cyrill Gorcunov [Tue, 22 Jan 2008 01:18:26 +0000 (17:18 -0800)]
CRIS: add missed local_irq_restore call

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@akpm@linux-foundation.org>
16 years agotimer: fix section mismatch
Randy Dunlap [Tue, 22 Jan 2008 01:18:25 +0000 (17:18 -0800)]
timer: fix section mismatch

The caller is __cpuinit.
Also, this code block and its caller are inside #ifdef CONFIG_HOTPLUG_CPU
blocks, so this code should reflect that config symbol's usage.

WARNING: vmlinux.o(.text+0x4252f): Section mismatch: reference to .init.text: (between 'timer_cpu_notify' and 'msleep')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@akpm@linux-foundation.org>
16 years agohrtimer: fix section mismatch
Randy Dunlap [Tue, 22 Jan 2008 01:18:24 +0000 (17:18 -0800)]
hrtimer: fix section mismatch

Fix section mismatch in hrtimer.c:

WARNING: vmlinux.o(.text+0x50c61): Section mismatch: reference to .init.text: (between 'hrtimer_cpu_notify' and 'down_read_trylock')

Noticed by Johannes Berg and confirmed by Sam Ravnborg.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@akpm@linux-foundation.org>
16 years agokeyspan: fix oops
Alan Cox [Tue, 22 Jan 2008 01:18:24 +0000 (17:18 -0800)]
keyspan: fix oops

If we get a data URB back from the hardware after we have put the tty to
bed we go kaboom.  Fortunately all we need to do is process the URB without
trying to ram its contents down the throat of an ex-tty.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@akpm@linux-foundation.org>
16 years agotc35815: Use irq number for tc35815-mac platform device id
Atsushi Nemoto [Fri, 18 Jan 2008 16:15:52 +0000 (01:15 +0900)]
tc35815: Use irq number for tc35815-mac platform device id

The tc35815-mac platform device used a pci bus number and a devfn to
identify its target device, but the pci bus number may vary if some
bus-bridges are found.  Use irq number which is be unique for embedded
controllers.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Malta: Fix reading the PCI clock frequency on big-endian
Dmitri Vorobiev [Mon, 14 Jan 2008 21:27:46 +0000 (00:27 +0300)]
[MIPS] Malta: Fix reading the PCI clock frequency on big-endian

The JMPRS register on Malta boards keeps a 32-bit CPU-endian
value. The readw() function assumes that the value it reads is a
little-endian 16-bit number. Therefore, using readw() to obtain
the value of the JMPRS register is a mistake. This error leads
to incorrect reading of the PCI clock frequency on big-endian
during board start-up.

Change readw() to __raw_readl().

This was tested by injecting a call to printk() and verifying
that the value of the jmpr variable was consistent with current
setting of the JP4 "PCI CLK" jumper.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>