linux-2.6-microblaze.git
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Fri, 18 Sep 2009 03:54:12 +0000 (20:54 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc: Update defconfigs.
  sparc: Kill PROM console driver.

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 18 Sep 2009 03:53:52 +0000 (20:53 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (66 commits)
  be2net: fix some cmds to use mccq instead of mbox
  atl1e: fix 2.6.31-git4 -- ATL1E 0000:03:00.0: DMA-API: device driver frees DMA
  pkt_sched: Fix qstats.qlen updating in dump_stats
  ipv6: Log the affected address when DAD failure occurs
  wl12xx: Fix print_mac() conversion.
  af_iucv: fix race when queueing skbs on the backlog queue
  af_iucv: do not call iucv_sock_kill() twice
  af_iucv: handle non-accepted sockets after resuming from suspend
  af_iucv: fix race in __iucv_sock_wait()
  iucv: use correct output register in iucv_query_maxconn()
  iucv: fix iucv_buffer_cpumask check when calling IUCV functions
  iucv: suspend/resume error msg for left over pathes
  wl12xx: switch to %pM to print the mac address
  b44: the poll handler b44_poll must not enable IRQ unconditionally
  ipv6: Ignore route option with ROUTER_PREF_INVALID
  bonding: make ab_arp select active slaves as other modes
  cfg80211: fix SME connect
  rc80211_minstrel: fix contention window calculation
  ssb/sdio: fix printk format warnings
  p54usb: add Zcomax XG-705A usbid
  ...

15 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Fri, 18 Sep 2009 03:52:32 +0000 (20:52 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (51 commits)
  MIPS: BCM63xx: Add integrated ethernet mac support.
  MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs.
  MIPS: BCM63xx: Add Broadcom 63xx CPU definitions.
  MIPS: Octeon:  Move some platform device registration to its own file.
  MIPS: Don't corrupt page tables on vmalloc fault.
  MIPS: Shrink the size of tlb handler
  MIPS: Alchemy: override loops_per_jiffy detection
  MIPS: hw_random: Add hardware RNG for Octeon SOCs.
  MIPS: Octeon:  Add hardware RNG platform device.
  MIPS: Remove useless zero initializations.
  MIPS: Alchemy: get rid of allow_au1k_wait
  MIPS: Octeon: Set kernel_uses_llsc to false on non-SMP builds.
  MIPS: Allow kernel use of LL/SC to be separate from the presence of LL/SC.
  MIPS: Get rid of CONFIG_CPU_HAS_LLSC
  MIPS: Malta: Remove pointless use use of CONFIG_CPU_HAS_LLSC
  MIPS: Rewrite clearing of ll_bit on context switch in C
  MIPS: Rewrite sysmips(MIPS_ATOMIC_SET, ...) in C with inline assembler
  MIPS: Consolidate all CONFIG_CPU_HAS_LLSC use in a single C file.
  MIPS: Clean up linker script using new linker script macros.
  MIPS: Use PAGE_SIZE in assembly instead of _PAGE_SIZE.
  ...

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Thu, 17 Sep 2009 20:21:52 +0000 (13:21 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Fix MSI GX620 mixer
  ASoC: remove unused #include <linux/version.h>
  ASoC: S3C lrsync function made to work with IRQs disabled.
  ALSA: hda - Fix Dell S14 pin setup
  ALSA: hda - Fix IDT92HD83* codec setup
  ASoC: Fix display of stream name in DAPM debugfs
  ALSA: hda - Add support for HP dv6
  ALSA: hda - Fix HP/line-out initialization with IDT/STAC codecs
  ALSA: hda - Set default GPIO for IDT92HD71bxx
  ALSA: hda - Set default GPIO for STAC/IDT codecs
  ASoC: Clean up error handling in MPC5200 DMA setup
  ALSA: hda - Add missing model=auto entry for ALC269

15 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Thu, 17 Sep 2009 19:08:56 +0000 (21:08 +0200)]
Merge branch 'fix/hda' into for-linus

* fix/hda:
  ALSA: hda - Fix MSI GX620 mixer
  ALSA: hda - Fix Dell S14 pin setup
  ALSA: hda - Fix IDT92HD83* codec setup
  ALSA: hda - Add support for HP dv6
  ALSA: hda - Fix HP/line-out initialization with IDT/STAC codecs
  ALSA: hda - Set default GPIO for IDT92HD71bxx
  ALSA: hda - Set default GPIO for STAC/IDT codecs
  ALSA: hda - Add missing model=auto entry for ALC269

15 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Thu, 17 Sep 2009 19:08:53 +0000 (21:08 +0200)]
Merge branch 'fix/asoc' into for-linus

* fix/asoc:
  ASoC: remove unused #include <linux/version.h>
  ASoC: S3C lrsync function made to work with IRQs disabled.
  ASoC: Fix display of stream name in DAPM debugfs
  ASoC: Clean up error handling in MPC5200 DMA setup

15 years agoMIPS: BCM63xx: Add integrated ethernet mac support.
Maxime Bizon [Tue, 18 Aug 2009 12:23:40 +0000 (13:23 +0100)]
MIPS: BCM63xx: Add integrated ethernet mac support.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs.
Maxime Bizon [Tue, 18 Aug 2009 12:23:37 +0000 (13:23 +0100)]
MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: BCM63xx: Add Broadcom 63xx CPU definitions.
Maxime Bizon [Tue, 18 Aug 2009 12:23:37 +0000 (13:23 +0100)]
MIPS: BCM63xx: Add Broadcom 63xx CPU definitions.

Todo: Nothing ever detects CPU_BCM6338 but the code tests for it anyway.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Octeon: Move some platform device registration to its own file.
David Daney [Wed, 16 Sep 2009 21:54:18 +0000 (14:54 -0700)]
MIPS: Octeon:  Move some platform device registration to its own file.

There is a bunch of platform device registration in
arch/mips/cavium-octeon/setup.c.  We move it to its own file in
preparation for adding more platform devices.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Don't corrupt page tables on vmalloc fault.
David Daney [Wed, 2 Sep 2009 22:47:34 +0000 (15:47 -0700)]
MIPS: Don't corrupt page tables on vmalloc fault.

The code after the vmalloc_fault: label in do_page_fault() modifies
user page tables, this is not correct for 64-bit kernels.

For 64-bit kernels we should go straight to the no_context handler
skipping vmalloc_fault.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Shrink the size of tlb handler
Wu Fei [Thu, 3 Sep 2009 14:29:53 +0000 (22:29 +0800)]
MIPS: Shrink the size of tlb handler

By combining swapper_pg_dir and module_pg_dir, several if conditions
can be eliminated from the tlb exception handler. The reason they
can be combined is that, the effective virtual address of vmalloc
returned is at the bottom, and of module_alloc returned is at the
top. It also fixes the bug in vmalloc(), which happens when its
return address is not covered by the first pgd.

Signed-off-by: Wu Fei <at.wufei@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: override loops_per_jiffy detection
Manuel Lauss [Thu, 27 Aug 2009 17:21:18 +0000 (19:21 +0200)]
MIPS: Alchemy: override loops_per_jiffy detection

loops_per_jiffy depends on coreclk speed;  preset it instead of
letting the kernel waste precious microseconds trying to approximate it.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: hw_random: Add hardware RNG for Octeon SOCs.
David Daney [Thu, 20 Aug 2009 21:10:23 +0000 (14:10 -0700)]
MIPS: hw_random: Add hardware RNG for Octeon SOCs.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Octeon: Add hardware RNG platform device.
David Daney [Thu, 20 Aug 2009 21:10:22 +0000 (14:10 -0700)]
MIPS: Octeon:  Add hardware RNG platform device.

Add a platform device for the Octeon Random Number Generator (RNG).

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Remove useless zero initializations.
Ralf Baechle [Thu, 17 Sep 2009 00:25:07 +0000 (02:25 +0200)]
MIPS: Remove useless zero initializations.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: get rid of allow_au1k_wait
Manuel Lauss [Sat, 22 Aug 2009 16:09:27 +0000 (18:09 +0200)]
MIPS: Alchemy: get rid of allow_au1k_wait

Eliminate the 'allow_au1k_wait' variable.  MIPS kernel installs the
Alchemy-specific wait code before timer initialization;  if the C0
timer must be used for timekeeping the wait function is set to NULL
which means no wait implementation is available.

As a sideeffect, the 'wait instruction available' output in
/proc/cpuinfo now correctly indicates whether 'wait' is usable.

Run-tested on DB1200.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Octeon: Set kernel_uses_llsc to false on non-SMP builds.
David Daney [Mon, 13 Jul 2009 18:15:20 +0000 (11:15 -0700)]
MIPS: Octeon: Set kernel_uses_llsc to false on non-SMP builds.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Allow kernel use of LL/SC to be separate from the presence of LL/SC.
David Daney [Mon, 13 Jul 2009 18:15:19 +0000 (11:15 -0700)]
MIPS: Allow kernel use of LL/SC to be separate from the presence of LL/SC.

On some CPUs, it is more efficient to disable and enable interrupts in the
kernel rather than use ll/sc for atomic operations.  But if we were to set
cpu_has_llsc to false, we would break the userspace futex interface (in
asm/futex.h).

We separate the two concepts, with a new predicate kernel_uses_llsc, that
lets us disable the kernel's use of ll/sc while still allowing the futex
code to use it.

Also there were a couple of cases in bitops.h where we were using ll/sc
unconditionally even if cpu_has_llsc were false.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Get rid of CONFIG_CPU_HAS_LLSC
Ralf Baechle [Thu, 17 Sep 2009 00:25:06 +0000 (02:25 +0200)]
MIPS: Get rid of CONFIG_CPU_HAS_LLSC

CONFIG_CPU_HAS_LLSC duplicated the function of cpu_has_llsc for no good
reason and and the results if the one was enabled and the other disabled
was very unobvious.  Remove it now that there are no more remaining users.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Malta: Remove pointless use use of CONFIG_CPU_HAS_LLSC
Ralf Baechle [Thu, 17 Sep 2009 00:25:06 +0000 (02:25 +0200)]
MIPS: Malta: Remove pointless use use of CONFIG_CPU_HAS_LLSC

All CPUs for Malta support LL/SC.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Rewrite clearing of ll_bit on context switch in C
Ralf Baechle [Thu, 17 Sep 2009 00:25:05 +0000 (02:25 +0200)]
MIPS: Rewrite clearing of ll_bit on context switch in C

This also means there is now only one implementation not 3 left.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Rewrite sysmips(MIPS_ATOMIC_SET, ...) in C with inline assembler
Ralf Baechle [Thu, 17 Sep 2009 00:25:05 +0000 (02:25 +0200)]
MIPS: Rewrite sysmips(MIPS_ATOMIC_SET, ...) in C with inline assembler

This way it doesn't have to use CONFIG_CPU_HAS_LLSC anymore.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Consolidate all CONFIG_CPU_HAS_LLSC use in a single C file.
Ralf Baechle [Thu, 17 Sep 2009 00:25:05 +0000 (02:25 +0200)]
MIPS: Consolidate all CONFIG_CPU_HAS_LLSC use in a single C file.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Clean up linker script using new linker script macros.
Nelson Elhage [Fri, 31 Jul 2009 20:58:19 +0000 (16:58 -0400)]
MIPS: Clean up linker script using new linker script macros.

This patch results in fewer output sections and in some data being
reordered, but should have no functional impact.

Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Use PAGE_SIZE in assembly instead of _PAGE_SIZE.
Nelson Elhage [Fri, 31 Jul 2009 20:58:18 +0000 (16:58 -0400)]
MIPS: Use PAGE_SIZE in assembly instead of _PAGE_SIZE.

Now that PAGE_SIZE is available to assembly directly, there is no need
to separately expose it as _PAGE_SIZE through asm-offsets.

In addition, remove _PAGE_SHIFT from asm-offsets, since it was never
needed, and is not used anywhere.

Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Convert to asm-generic/hardirq.h
Christoph Hellwig [Tue, 4 Aug 2009 14:54:04 +0000 (16:54 +0200)]
MIPS: Convert to asm-generic/hardirq.h

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: AR7: Make board code register ar7_wdt as a platform device
Florian Fainelli [Wed, 15 Jul 2009 10:09:34 +0000 (12:09 +0200)]
MIPS: AR7: Make board code register ar7_wdt as a platform device

This patch makes the board code register the ar7_wdt driver as a platform
device. We move the dynamic resource calculation here since the driver
should not be aware of the AR7 SoC version it is running on.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Loongson: Update the default config file for fuloong2e
Wu Zhangjin [Thu, 2 Jul 2009 15:28:04 +0000 (23:28 +0800)]
MIPS: Loongson: Update the default config file for fuloong2e

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Loongson: Add GCC 4.4 support for Loongson2E
Wu Zhangjin [Thu, 2 Jul 2009 15:27:41 +0000 (23:27 +0800)]
MIPS: Loongson: Add GCC 4.4 support for Loongson2E

Because only gcc >=4.4 have loongson-specific support, we need to choose
the suitable -march argument for gcc <= 4.3 and gcc >= 4.4, and here, we
use -march=loongson2e for loongson2e.

Thanks goes to Arnaud Patard <apatard@mandriva.com> for suggestion of
using cc-options(Documentation/kbuild/makefiles.txt). and thanks Zhang
Le for introducing the new CPU_LOONGSON2E kernel option.

NOTE: -mtune option is not need if -march and -mtune use the same value.

Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Loongson: Add a machtype kernel command line argument
Wu Zhangjin [Thu, 2 Jul 2009 15:27:12 +0000 (23:27 +0800)]
MIPS: Loongson: Add a machtype kernel command line argument

The difference between some loongson-based machines is very small, so, if
there is no necessary to add new kernel config options to cope with this
difference, it will be better to share the same kernel image file between
them, benefit from this, the linux distribution developers only have a need
to compile the kernel one time.

This machtype kernel command line argument will be used later to share the
same kernel image file between two different machines(menglong & yeeloong)
made by lemote.

Thanks very much to Zhang Le for cleaning up the machtype implementation.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Loongson: Split common loongson source code out
Wu Zhangjin [Thu, 2 Jul 2009 15:26:45 +0000 (23:26 +0800)]
MIPS: Loongson: Split common loongson source code out

To share common loongson source code between all of the loongson-based
machines. there is a need to split it out of the fuloong-2e/ directory.
at the same time, other according tuning is needed. the machine-specific
parts are defined as macros in relative header file, pci.h, mem.h,
machine.h.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Loongson: Change naming methods
Wu Zhangjin [Thu, 2 Jul 2009 15:26:08 +0000 (23:26 +0800)]
MIPS: Loongson: Change naming methods

To make source code of loongson sharable to the machines(such as gdium)
made by the other companies, we rename arch/mips/lemote to
arch/mips/loongson, asm/mach-lemote to asm/mach-loongson, and rename lm2e
to the name of the machine: fuloong-2e. accordingly, FULONG are renamed to
FULOONG2E to make it distinguishable to the future FULOONG2F.  and also,
some other relative tuning is needed.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Loongson: Add oprofile support
Wu Zhangjin [Thu, 2 Jul 2009 15:25:46 +0000 (23:25 +0800)]
MIPS: Loongson: Add oprofile support

This kernel support is needed by the user-space tool:oprofile to profile
linux kernel or applications via loongson2 performance counters. you can
enable this driver via CONFIG_OPROFILE = y or m.

On Loongson2 there are two performance counters, each one can count 16
events respectively. when anyone of the performance counter overflows, an
interrupt will be generated and is routed to the IRQ MIPS_CPU_IRQ_BASE + 6.

Signed-off-by: Yanhua <yanh@lemote.com>
Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Loongson: RTC: Enable legacy RTC driver on fulong
Wu Zhangjin [Thu, 2 Jul 2009 15:24:01 +0000 (23:24 +0800)]
MIPS: Loongson: RTC: Enable legacy RTC driver on fulong

RTC_LIB is selected by MIPS by default, and therefore, the legacy RTC
driver is disabled. but fortunately, RTC_LIB not works on fulong, so,
enabling the legcy RTC driver is needed, otherwise, the tools like
hwclock will not work.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Loongson: PCI: Clean up pcimap setup
Wu Zhangjin [Thu, 2 Jul 2009 15:23:30 +0000 (23:23 +0800)]
MIPS: Loongson: PCI: Clean up pcimap setup

Fixup the wrong original comment of pcimap, and make the source code more
understandable. and also, some new extra consideration is added in.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Loongson: clean up the coding style
Wu Zhangjin [Thu, 2 Jul 2009 15:23:03 +0000 (23:23 +0800)]
MIPS: Loongson: clean up the coding style

With the help of script/checkpatch.pl, i have cleaned up the coding
style.

1. remove un-needed header files and tune some comments.
2. remove some un-needed { }

add a new header file loongson.h:

3. move some common header files to loongson.h
4. move some common extern declartions to loongson.h

and this new header file is needed for future loongson2f support.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Loongson: Split the implementation of prom and setup parts
Wu Zhangjin [Thu, 2 Jul 2009 15:22:36 +0000 (23:22 +0800)]
MIPS: Loongson: Split the implementation of prom and setup parts

This patch split the old initilization and setup implementation to
several file, one file one logic function.

the other main changes include:

1. as the script/checkpatch.pl suggests, use strict_strtol instead
of simple_strtol in arch/mips/lemote/lm2e/cmdline.c

2. use the existed macros in asm/mips-boards/bonito64.h as the
arguments of set_io_port_base() and remove the un-needed ones in
asm/mach-lemote/pci.h

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Loongson: PCI: use existing mips_io_port_base
Wu Zhangjin [Thu, 2 Jul 2009 15:22:11 +0000 (23:22 +0800)]
MIPS: Loongson: PCI: use existing mips_io_port_base

mips_io_port_base is initialized via set_io_port_base() in
arch/mips/lemote/lm2e/setup.c, we can use it directly here.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Loongson: pm: clean up the reboot support
Wu Zhangjin [Thu, 2 Jul 2009 15:21:27 +0000 (23:21 +0800)]
MIPS: Loongson: pm: clean up the reboot support

Several magic numbers have been replaced by relative macros, which will be
more readable and understandable.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Loongson: pm: Remove redundant source code
Wu Zhangjin [Thu, 2 Jul 2009 15:20:56 +0000 (23:20 +0800)]
MIPS: Loongson: pm: Remove redundant source code

The implmentation of loongson2e_power_off and loongson2e_halt is almostly
the same, just preserve one of them.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Loongson: Add new early_printk implmentation
Wu Zhangjin [Thu, 2 Jul 2009 15:20:20 +0000 (23:20 +0800)]
MIPS: Loongson: Add new early_printk implmentation

This patch is based on the implementation in the lm2e-fixes branch of
Philippe's git://git.linux-cisco.org/linux-mips.git and the
malta-specific early_printk implementation.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Loongson: Remove out-of-date board-specific kgdb source code
Wu Zhangjin [Thu, 2 Jul 2009 15:19:33 +0000 (23:19 +0800)]
MIPS: Loongson: Remove out-of-date board-specific kgdb source code

Since the re-implementation of kgdb by commit
8854700115ecf8aa6f087aa915b7b6cf18090d39 the platform-specific version
has become superfluous, remove it.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Loongson: Remove existing early_printk implementation
Wu Zhangjin [Thu, 2 Jul 2009 15:18:09 +0000 (23:18 +0800)]
MIPS: Loongson: Remove existing early_printk implementation

Removes the existing implementation of early_printk for fulong.  The old
implementation was based on the outdated board-specific dbg_io.c.

Since commit 8d60a903d986ffa26c41f0092320a3b9da20bfaf dbg_io.c is not longer
needed; it will be removed by the next patch, and a new implementation of
early_printk will be added later.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: IP22, IP28: Build with -Werror
Ralf Baechle [Tue, 15 Sep 2009 21:04:59 +0000 (23:04 +0200)]
MIPS: IP22, IP28: Build with -Werror

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: FW: Build with -Werror
Ralf Baechle [Tue, 15 Sep 2009 20:58:23 +0000 (22:58 +0200)]
MIPS: FW: Build with -Werror

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Fulong: Convert reset initialization to initcall.
Ralf Baechle [Tue, 15 Sep 2009 13:00:02 +0000 (15:00 +0200)]
MIPS: Fulong: Convert reset initialization to initcall.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Malta: Convert reset initialization to initcall.
Ralf Baechle [Tue, 15 Sep 2009 12:50:39 +0000 (14:50 +0200)]
MIPS: Malta: Convert reset initialization to initcall.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Get rid of duplicate cpu_idle() prototype.
Ralf Baechle [Tue, 15 Sep 2009 11:36:13 +0000 (13:36 +0200)]
MIPS: Get rid of duplicate cpu_idle() prototype.

Since 2.6.11-rc1 there is a prototype in <linux/smp.h>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: TXx9: Fix error handling.
Julia Lawall [Sun, 13 Sep 2009 19:15:18 +0000 (21:15 +0200)]
MIPS: TXx9: Fix error handling.

Error handling code following a kzalloc should free the allocated data.
Error handling code following an ioremap should iounmap the allocated data.

The semantic match that finds the first problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...x...+> }
(
x->f1 = E
|
 (x->f1 == NULL || ...)
|
 f(...,x->f1,...)
)
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: TXx9: Disable PM capability of TX493[89] internal ether
Atsushi Nemoto [Fri, 4 Sep 2009 13:09:04 +0000 (22:09 +0900)]
MIPS: TXx9: Disable PM capability of TX493[89] internal ether

Some TC35815 variants (i.e. TX493[89] internal ether) report existance of
PM registers though they are not supported.  Disable PM features by
clearing pdev->pm_cap.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: make page.h constants available to assembly.
Nelson Elhage [Fri, 31 Jul 2009 20:58:17 +0000 (16:58 -0400)]
MIPS: make page.h constants available to assembly.

page.h includes ifndef __ASSEMBLY__ guards, but PAGE_SIZE and some other
constants are defined using "1UL", which the assembler does not support.
Use the _AC macro from const.h to make them available to assembly (and
linker scripts).

Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: add gpio_request/gpio_free stubs for CONFIG_GPIOLIB=n
Manuel Lauss [Fri, 28 Aug 2009 09:26:58 +0000 (11:26 +0200)]
MIPS: Alchemy: add gpio_request/gpio_free stubs for CONFIG_GPIOLIB=n

Some drivers use gpio_request/gpio_free regardless of whether
gpiolib is actually built;  add stubs to work around the ensuing
compile failures.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Tested-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Lasat: Fix compilation
Alexey Dobriyan [Wed, 12 Aug 2009 19:59:27 +0000 (23:59 +0400)]
MIPS: Lasat: Fix compilation

Header needed for current_cpu_data which expands to smp_processor_id().
However, linux/smp.h can't be included into asm/cpu-info.h due to horrible
circular dependencies, so plug it here.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Octeon: Check all CCAs in cvmx_write_csr.
David Daney [Thu, 20 Aug 2009 19:35:53 +0000 (12:35 -0700)]
MIPS: Octeon: Check all CCAs in cvmx_write_csr.

The current code only checks CCA of 0 when deciding if a dummy read is
needed.  Since the kernel can (and does) use other CCAs we need to
mask out the CCA bits from the address.  Since the address constant
now fits in 16 bits, there is an added benefit that smaller code is
generated.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Octeon: False positive timeout
Roel Kluin [Wed, 26 Aug 2009 12:48:35 +0000 (14:48 +0200)]
MIPS: Octeon: False positive timeout

If we reach the test just below the loop with a `timeout' value of 0,
this does not mean that the timeout caused the loop to end, but rather
the `smi_rd.s.pending', in the last iteration. If timeout caused the
loop to end, then `timeout' is -1, not 0.

Since this can occur only in the last iteration, it is not very likely
to be a problem. By changing the post- to prefix decrement we ensure
that a timeout of 0 does mean it timed out.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Fix potencial build error in <asm/delay.h>
Ralf Baechle [Fri, 28 Aug 2009 11:29:58 +0000 (12:29 +0100)]
MIPS: Fix potencial build error in <asm/delay.h>

<asm/delay.h> will break if HZ isn't defined.  In 2.6.26 and later we're
usually lucky ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agobe2net: fix some cmds to use mccq instead of mbox
Sathya Perla [Thu, 17 Sep 2009 17:30:13 +0000 (10:30 -0700)]
be2net: fix some cmds to use mccq instead of mbox

All cmds issued to BE after the creation of mccq must now use the mcc-q
(and not mbox) to avoid a hw issue that results in mbox poll timeout.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoatl1e: fix 2.6.31-git4 -- ATL1E 0000:03:00.0: DMA-API: device driver frees DMA
Jie Yang [Thu, 17 Sep 2009 17:27:28 +0000 (10:27 -0700)]
atl1e: fix 2.6.31-git4 -- ATL1E 0000:03:00.0: DMA-API: device driver frees DMA

use the wrong API when free dma. So when map dma use a flag to
demostrate whether it is 'pci_map_single' or 'pci_map_page'. When free
the dma, check the flags to select the right APIs('pci_unmap_single'
or 'pci_unmap_page').

set the flags type to u16  instead of unsigned long  on David's comments.

Signed-off-by: Jie Yang <jie.yang@atheros.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopkt_sched: Fix qstats.qlen updating in dump_stats
Jarek Poplawski [Thu, 17 Sep 2009 17:26:07 +0000 (10:26 -0700)]
pkt_sched: Fix qstats.qlen updating in dump_stats

Some classful qdiscs miss qstats.qlen updating with q.qlen of their
child qdiscs in dump_stats methods.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: Log the affected address when DAD failure occurs
Jens Rosenboom [Thu, 17 Sep 2009 17:24:24 +0000 (10:24 -0700)]
ipv6: Log the affected address when DAD failure occurs

If an interface has multiple addresses, the current message for DAD
failure isn't really helpful, so this patch adds the address itself to
the printk.

Signed-off-by: Jens Rosenboom <me@jayr.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agowl12xx: Fix print_mac() conversion.
David S. Miller [Thu, 17 Sep 2009 17:18:30 +0000 (10:18 -0700)]
wl12xx: Fix print_mac() conversion.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
Linus Torvalds [Thu, 17 Sep 2009 16:55:52 +0000 (09:55 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/bp/bp

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  amd64_edac: check NB MCE bank enable on the current node properly
  amd64_edac: Rewrite unganged mode code of f10_early_channel_count
  amd64_edac: cleanup amd64_check_ecc_enabled
  x86, EDAC: Provide function to return NodeId of a CPU
  amd64_edac: build driver only on AMD hardware

15 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Thu, 17 Sep 2009 16:54:37 +0000 (09:54 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs: (39 commits)
  xfs: includecheck fix for fs/xfs/xfs_iops.c
  xfs: switch to seq_file
  xfs: Record new maintainer information
  xfs: use correct log reservation when handling ENOSPC in xfs_create
  xfs: xfs_showargs() reports group *and* project quotas enabled
  xfs: un-static xfs_inobt_lookup
  xfs: actually enable the swapext compat handler
  xfs: simplify xfs_trans_iget
  xfs: merge fsync and O_SYNC handling
  xfs: speed up free inode search
  xfs: rationalize xfs_inobt_lookup*
  xfs: untangle xfs_dialloc
  xfs: factor out debug checks from xfs_dialloc and xfs_difree
  xfs: improve xfs_inobt_update prototype
  xfs: improve xfs_inobt_get_rec prototype
  xfs: factor out inode initialisation
  fs/xfs: Correct redundant test
  xfs: remove XFS_INO64_OFFSET
  un-static xfs_read_agf
  xfs: add more statics & drop some unused functions
  ...

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier...
Linus Torvalds [Thu, 17 Sep 2009 16:53:04 +0000 (09:53 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/vapier/blackfin

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (75 commits)
  Blackfin: update ftrace for latest toolchain
  Blackfin: fix elf_fpregset_t definition
  Blackfin: unify cache init functions
  Blackfin: swap clocksource ratings for gptimer/cycles
  Blackfin: update ftrace_push_return_trace() breakage
  Blackfin: update cm board resources
  Blackfin: cm-bf537u: split board from cm-bf537e
  Blackfin: bf538-ezkit: add SPI IRQ resources
  Blackfin: increase default async timings for parallel flashes
  Blackfin: add ICPLB coverage for async banks
  Blackfin: use KERN_ALERT in all kgdb_test output
  Blackfin: fix BF54x SPI CS resources
  Blackfin: fix typo in isram_write()
  Blackfin: bf537-stamp: add adp5588 gpio resources
  Blackfin: add some isram-driver self tests
  Blackfin: workaround anomaly 05000283
  Blackfin: fix spelling in a few comments
  Blackfin: use raw_smp_processor_id() in exception code
  Blackfin: remove useless duplicated assignment in gpio code
  Blackfin: Fix link errors with binutils 2.19 and GCC 4.3
  ...

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Linus Torvalds [Thu, 17 Sep 2009 16:52:43 +0000 (09:52 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/gerg/m68knommu

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: (53 commits)
  m68knommu: Make PAGE_SIZE available to assembly files.
  m68knommu: fix ColdFire definition of CLOCK_TICK_RATE
  m68knommu: set multi-function pins for ethernet when enabled
  m68knommu: remove special interrupt handling code for ne2k support
  m68knommu: relax IO_SPACE_LIMIT setting
  m68knommu: remove ColdFire direct interrupt register access
  m68knommu: create a speciailized ColdFire 5272 interrupt controller
  m68knommu: add support for second interrupt controller of ColdFire 5249
  m68knommu: clean up old ColdFire timer irq setup
  m68knommu: map ColdFire interrupts to correct masking bits
  m68knommu: clean up ColdFire 532x CPU timer setup
  m68knommu: simplify ColdFire "timers" clock initialization
  m68knommu: support code to mask external interrupts on old ColdFire CPU's
  m68knommu: merge old ColdFire interrupt controller masking macros
  m68knommu: remove duplicate ColdFire mcf_autovector() code
  m68knommu: move ColdFire INTC definitions to new include file
  m68knommu: mask off all interrupts in ColdFire intc-simr controller
  m68knommu: remove timer device interrupt setup for ColdFire 532x
  m68knommu: remove interrupt masking from ColdFire pit timer
  m68knommu: remove unecessary interrupt level setting in ColdFire 520x setup
  ...

15 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
Linus Torvalds [Thu, 17 Sep 2009 16:47:35 +0000 (09:47 -0700)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (lm85) Don't bind to Winbond/Nuvoton WPCD377I
  hwmon: (pcf8591) Documentation clean-ups
  hwmon: Clearly mark ACPI drivers as such
  hwmon: Use resource_size
  hwmon: Include <linux/io.h> instead of <asm/io.h>
  hwmon: (tmp421) Add documentation
  hwmon: Add driver for Texas Instruments TMP421/422/423 sensor chips
  hwmon-vid: Ignore 6th VID pin of AMD family 0Fh processors
  hwmon: (asus_atk0110) Add maintainer information
  hwmon: (abituguru3) Support multiple DMI strings per chip ID

15 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb
Linus Torvalds [Thu, 17 Sep 2009 16:44:09 +0000 (09:44 -0700)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/dvrabel/uwb

* 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb:
  uwb: avoid radio controller reset loops
  uwb: stop uwbd thread if rc->start() fails
  uwb: handle radio controller events with out-of-range IDs correctly

15 years agoALSA: hda - Fix MSI GX620 mixer
Takashi Iwai [Thu, 17 Sep 2009 16:23:00 +0000 (18:23 +0200)]
ALSA: hda - Fix MSI GX620 mixer

The headphone and speaker mixer elements aren't properly set for
MSI GX620 with targa-8ch-dig quirk.
Also fixed the speaker volume control for other ALC883-targa quirks,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoaf_iucv: fix race when queueing skbs on the backlog queue
Hendrik Brueckner [Wed, 16 Sep 2009 04:37:28 +0000 (04:37 +0000)]
af_iucv: fix race when queueing skbs on the backlog queue

iucv_sock_recvmsg() and iucv_process_message()/iucv_fragment_skb race
for dequeuing an skb from the backlog queue.

If iucv_sock_recvmsg() dequeues first, iucv_process_message() calls
sock_queue_rcv_skb() with an skb that is NULL.

This results in the following kernel panic:

<1>Unable to handle kernel pointer dereference at virtual kernel address (null)
<4>Oops: 0004 [#1] PREEMPT SMP DEBUG_PAGEALLOC
<4>Modules linked in: af_iucv sunrpc qeth_l3 dm_multipath dm_mod vmur qeth ccwgroup
<4>CPU: 0 Not tainted 2.6.30 #4
<4>Process client-iucv (pid: 4787, task: 0000000034e75940, ksp: 00000000353e3710)
<4>Krnl PSW : 0704000180000000 000000000043ebca (sock_queue_rcv_skb+0x7a/0x138)
<4>           R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:0 PM:0 EA:3
<4>Krnl GPRS: 0052900000000000 000003e0016e0fe8 0000000000000000 0000000000000000
<4>           000000000043eba8 0000000000000002 0000000000000001 00000000341aa7f0
<4>           0000000000000000 0000000000007800 0000000000000000 0000000000000000
<4>           00000000341aa7f0 0000000000594650 000000000043eba8 000000003fc2fb28
<4>Krnl Code: 000000000043ebbea7840006            brc     8,43ebca
<4>           000000000043ebc25930c23c            c       %r3,572(%r12)
<4>           000000000043ebc6a724004c            brc     2,43ec5e
<4>          >000000000043ebcae3c0b0100024        stg     %r12,16(%r11)
<4>           000000000043ebd0a7190000            lghi    %r1,0
<4>           000000000043ebd4e310b0200024        stg     %r1,32(%r11)
<4>           000000000043ebdac010ffffdce9        larl    %r1,43a5ac
<4>           000000000043ebe0e310b0800024        stg     %r1,128(%r11)
<4>Call Trace:
<4>([<000000000043eba8>] sock_queue_rcv_skb+0x58/0x138)
<4> [<000003e0016bcf2a>] iucv_process_message+0x112/0x3cc [af_iucv]
<4> [<000003e0016bd3d4>] iucv_callback_rx+0x1f0/0x274 [af_iucv]
<4> [<000000000053a21a>] iucv_message_pending+0xa2/0x120
<4> [<000000000053b5a6>] iucv_tasklet_fn+0x176/0x1b8
<4> [<000000000014fa82>] tasklet_action+0xfe/0x1f4
<4> [<0000000000150a56>] __do_softirq+0x116/0x284
<4> [<0000000000111058>] do_softirq+0xe4/0xe8
<4> [<00000000001504ba>] irq_exit+0xba/0xd8
<4> [<000000000010e0b2>] do_extint+0x146/0x190
<4> [<00000000001184b6>] ext_no_vtime+0x1e/0x22
<4> [<00000000001fbf4e>] kfree+0x202/0x28c
<4>([<00000000001fbf44>] kfree+0x1f8/0x28c)
<4> [<000000000044205a>] __kfree_skb+0x32/0x124
<4> [<000003e0016bd8b2>] iucv_sock_recvmsg+0x236/0x41c [af_iucv]
<4> [<0000000000437042>] sock_aio_read+0x136/0x160
<4> [<0000000000205e50>] do_sync_read+0xe4/0x13c
<4> [<0000000000206dce>] vfs_read+0x152/0x15c
<4> [<0000000000206ed0>] SyS_read+0x54/0xac
<4> [<0000000000117c8e>] sysc_noemu+0x10/0x16
<4> [<00000042ff8def3c>] 0x42ff8def3c

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoaf_iucv: do not call iucv_sock_kill() twice
Hendrik Brueckner [Wed, 16 Sep 2009 04:37:27 +0000 (04:37 +0000)]
af_iucv: do not call iucv_sock_kill() twice

For non-accepted sockets on the accept queue, iucv_sock_kill()
is called twice (in iucv_sock_close() and iucv_sock_cleanup_listen()).
This typically results in a kernel oops as shown below.

Remove the duplicate call to iucv_sock_kill() and set the SOCK_ZAPPED
flag in iucv_sock_close() only.

The iucv_sock_kill() function frees a socket only if the socket is zapped
and orphaned (sk->sk_socket == NULL):
  - Non-accepted sockets are always orphaned and, thus, iucv_sock_kill()
    frees the socket twice.
  - For accepted sockets or sockets created with iucv_sock_create(),
    sk->sk_socket is initialized. This caused the first call to
    iucv_sock_kill() to return immediately. To free these sockets,
    iucv_sock_release() uses sock_orphan() before calling iucv_sock_kill().

<1>Unable to handle kernel pointer dereference at virtual kernel address 000000003edd3000
<4>Oops: 0011 [#1] PREEMPT SMP DEBUG_PAGEALLOC
<4>Modules linked in: af_iucv sunrpc qeth_l3 dm_multipath dm_mod qeth vmur ccwgroup
<4>CPU: 0 Not tainted 2.6.30 #4
<4>Process iucv_sock_close (pid: 2486, task: 000000003aea4340, ksp: 000000003b75bc68)
<4>Krnl PSW : 0704200180000000 000003e00168e23a (iucv_sock_kill+0x2e/0xcc [af_iucv])
<4>           R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3
<4>Krnl GPRS: 0000000000000000 000000003b75c000 000000003edd37f0 0000000000000001
<4>           000003e00168ec62 000000003988d960 0000000000000000 000003e0016b0608
<4>           000000003fe81b20 000000003839bb58 00000000399977f0 000000003edd37f0
<4>           000003e00168b000 000003e00168f138 000000003b75bcd0 000000003b75bc98
<4>Krnl Code: 000003e00168e22ac0c0ffffe6eb larl %r12,3e00168b000
<4>           000003e00168e230b90400b2 lgr %r11,%r2
<4>           000003e00168e234e3e0f0980024 stg %r14,152(%r15)
<4>          >000003e00168e23ae310225e0090 llgc %r1,606(%r2)
<4>           000003e00168e240a7110001 tmll %r1,1
<4>           000003e00168e244a7840007 brc 8,3e00168e252
<4>           000003e00168e248d507d00023c8 clc 0(8,%r13),968(%r2)
<4>           000003e00168e24ea7840009 brc 8,3e00168e260
<4>Call Trace:
<4>([<000003e0016b0608>] afiucv_dbf+0x0/0xfffffffffffdea20 [af_iucv])
<4> [<000003e00168ec6c>] iucv_sock_close+0x130/0x368 [af_iucv]
<4> [<000003e00168ef02>] iucv_sock_release+0x5e/0xe4 [af_iucv]
<4> [<0000000000438e6c>] sock_release+0x44/0x104
<4> [<0000000000438f5e>] sock_close+0x32/0x50
<4> [<0000000000207898>] __fput+0xf4/0x250
<4> [<00000000002038aa>] filp_close+0x7a/0xa8
<4> [<00000000002039ba>] SyS_close+0xe2/0x148
<4> [<0000000000117c8e>] sysc_noemu+0x10/0x16
<4> [<00000042ff8deeac>] 0x42ff8deeac

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoaf_iucv: handle non-accepted sockets after resuming from suspend
Hendrik Brueckner [Wed, 16 Sep 2009 04:37:26 +0000 (04:37 +0000)]
af_iucv: handle non-accepted sockets after resuming from suspend

After resuming from suspend, all af_iucv sockets are disconnected.
Ensure that iucv_accept_dequeue() can handle disconnected sockets
which are not yet accepted.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoaf_iucv: fix race in __iucv_sock_wait()
Hendrik Brueckner [Wed, 16 Sep 2009 04:37:25 +0000 (04:37 +0000)]
af_iucv: fix race in __iucv_sock_wait()

Moving prepare_to_wait before the condition to avoid a race between
schedule_timeout and wake up.
The race can appear during iucv_sock_connect() and iucv_callback_connack().

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoiucv: use correct output register in iucv_query_maxconn()
Hendrik Brueckner [Wed, 16 Sep 2009 04:37:24 +0000 (04:37 +0000)]
iucv: use correct output register in iucv_query_maxconn()

The iucv_query_maxconn() function uses the wrong output register and
stores the size of the interrupt buffer instead of the maximum number
of connections.

According to the QUERY IUCV function, general register 1 contains the
maximum number of connections.

If the maximum number of connections is not set properly, the following
warning is displayed:

Badness at /usr/src/kernel-source/2.6.30-39.x.20090806/net/iucv/iucv.c:1808
Modules linked in: netiucv fsm af_iucv sunrpc qeth_l3 dm_multipath dm_mod vmur qeth ccwgroup
CPU: 0 Tainted: G        W  2.6.30 #4
Process seq (pid: 16925, task: 0000000030e24a40, ksp: 000000003033bd98)
Krnl PSW : 0404200180000000 000000000053b270 (iucv_external_interrupt+0x64/0x224)
           R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3
Krnl GPRS: 00000000011279c2 00000000014bdb70 0029000000000000 0000000000000029
           000000000053b236 000000000001dba4 0000000000000000 0000000000859210
           0000000000a67f68 00000000008a6100 000000003f83fb90 0000000000004000
           000000003f8c7bc8 00000000005a2250 000000000053b236 000000003fc2fe08
Krnl Code: 000000000053b262e33010000021 clg %r3,0(%r1)
           000000000053b268a7440010 brc 4,53b288
           000000000053b26ca7f40001 brc 15,53b26e
          >000000000053b270c03000184134 larl %r3,8434d8
           000000000053b276eb220030000c srlg %r2,%r2,48
           000000000053b27ceb6ff0a00004 lmg %r6,%r15,160(%r15)
           000000000053b282c0f4fffff6a7 brcl 15,539fd0
           000000000053b2884310a003 ic %r1,3(%r10)
Call Trace:
([<000000000053b236>] iucv_external_interrupt+0x2a/0x224)
 [<000000000010e09e>] do_extint+0x132/0x190
 [<00000000001184b6>] ext_no_vtime+0x1e/0x22
 [<0000000000549f7a>] _spin_unlock_irqrestore+0x96/0xa4
([<0000000000549f70>] _spin_unlock_irqrestore+0x8c/0xa4)
 [<00000000002101d6>] pipe_write+0x3da/0x5bc
 [<0000000000205d14>] do_sync_write+0xe4/0x13c
 [<0000000000206a7e>] vfs_write+0xae/0x15c
 [<0000000000206c24>] SyS_write+0x54/0xac
 [<0000000000117c8e>] sysc_noemu+0x10/0x16
 [<00000042ff8defcc>] 0x42ff8defcc

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoiucv: fix iucv_buffer_cpumask check when calling IUCV functions
Hendrik Brueckner [Wed, 16 Sep 2009 04:37:23 +0000 (04:37 +0000)]
iucv: fix iucv_buffer_cpumask check when calling IUCV functions

Prior to calling IUCV functions, the DECLARE BUFFER function must have been
called for at least one CPU to receive IUCV interrupts.

With commit "iucv: establish reboot notifier" (6c005961), a check has been
introduced to avoid calling IUCV functions if the current CPU does not have
an interrupt buffer declared.
Because one interrupt buffer is sufficient, change the condition to ensure
that one interrupt buffer is available.

In addition, checking the buffer on the current CPU creates a race with
CPU up/down notifications: before checking the buffer, the IUCV function
might be interrupted by an smp_call_function() that retrieves the interrupt
buffer for the current CPU.
When the IUCV function continues, the check fails and -EIO is returned. If a
buffer is available on any other CPU, the IUCV function call must be invoked
(instead of failing with -EIO).

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoiucv: suspend/resume error msg for left over pathes
Ursula Braun [Wed, 16 Sep 2009 04:37:22 +0000 (04:37 +0000)]
iucv: suspend/resume error msg for left over pathes

During suspend IUCV exploiters have to close their IUCV connections.
When restoring an image, it can be checked if all IUCV pathes had
been closed before the Linux instance was suspended. If not, an
error message is issued to indicate a problem in one of the
used programs exploiting IUCV communication.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lowpan...
David S. Miller [Thu, 17 Sep 2009 03:55:28 +0000 (20:55 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/lowpan/lowpan

15 years agowl12xx: switch to %pM to print the mac address
Jean-Christophe PLAGNIOL-VILLARD [Wed, 16 Sep 2009 14:07:38 +0000 (14:07 +0000)]
wl12xx: switch to %pM to print the mac address

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agob44: the poll handler b44_poll must not enable IRQ unconditionally
Dongdong Deng [Wed, 16 Sep 2009 16:10:47 +0000 (16:10 +0000)]
b44: the poll handler b44_poll must not enable IRQ unconditionally

net/core/netpoll.c::netpoll_send_skb() calls the poll handler when
it is available. As netconsole can be used from almost any context,
IRQ must not be enabled blindly in the NAPI handler of the driver
which supports netpoll.

Call trace:
netpoll_send_skb()
{
local_irq_save(flags)
  -> netpoll_poll()
    -> poll_napi()
      -> poll_one_napi()
        -> napi->poll()
            -> b44_poll()
local_irq_restore(flags)
}

Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoBlackfin: update ftrace for latest toolchain
Yi Li [Tue, 15 Sep 2009 09:24:31 +0000 (09:24 +0000)]
Blackfin: update ftrace for latest toolchain

The mcount support that was finally added to the Blackfin gcc port isn't
exactly the same as what ftrace was developed against.  Now that the final
gcc version is in place, update the ftrace code to match.

While updating this, fix the swapped arguments to the tracer (signature is
(ip, parent_ip) while we were passing (parent_ip, ip)).

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: fix elf_fpregset_t definition
Mike Frysinger [Mon, 14 Sep 2009 21:22:06 +0000 (21:22 +0000)]
Blackfin: fix elf_fpregset_t definition

The elf_fpregset_t type relied on an empty struct in the asm/user.h, but
the transition to asm-generic/user.h dropped that empty struct.  Rather
than restore this useless struct, define the only user (elf_fpregset_t)
as an empty struct itself.  This fixes building when ELF dump support is
enabled.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: unify cache init functions
Mike Frysinger [Mon, 14 Sep 2009 19:42:26 +0000 (19:42 +0000)]
Blackfin: unify cache init functions

The CPLB implementations (mpu/nompu) had exact copies of the cacheinit
code.  Even the i/d cache functions are largely the same.  So unify them
both in the common kernel cache code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: swap clocksource ratings for gptimer/cycles
Graf Yang [Mon, 14 Sep 2009 04:41:00 +0000 (04:41 +0000)]
Blackfin: swap clocksource ratings for gptimer/cycles

The cycles clocksource is a higher resolution than the gptimer one, so
make sure the ratings field reflects this.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: update ftrace_push_return_trace() breakage
Mike Frysinger [Mon, 14 Sep 2009 01:50:22 +0000 (01:50 +0000)]
Blackfin: update ftrace_push_return_trace() breakage

Commit 71e308a239c updated ftrace_push_return_trace() prototype but didn't
update the Blackfin ftrace code, so things broke.  Since we don't support
the new stuff yet, call it with stub values.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: update cm board resources
Harald Krapfenbauer [Thu, 10 Sep 2009 15:30:03 +0000 (15:30 +0000)]
Blackfin: update cm board resources

Signed-off-by: Harald Krapfenbauer <Harald.Krapfenbauer@bluetechnix.at>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: cm-bf537u: split board from cm-bf537e
Harald Krapfenbauer [Thu, 10 Sep 2009 15:12:08 +0000 (15:12 +0000)]
Blackfin: cm-bf537u: split board from cm-bf537e

The cm-bf537u module, while similar to the cm-bf537e, is different enough
to warrant its own resources.  It has a USB controller but no PHY.

Signed-off-by: Harald Krapfenbauer <Harald.Krapfenbauer@bluetechnix.at>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: bf538-ezkit: add SPI IRQ resources
Barry Song [Thu, 10 Sep 2009 04:32:47 +0000 (04:32 +0000)]
Blackfin: bf538-ezkit: add SPI IRQ resources

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: increase default async timings for parallel flashes
Sonic Zhang [Mon, 7 Sep 2009 03:20:48 +0000 (03:20 +0000)]
Blackfin: increase default async timings for parallel flashes

The default async timings are a little too fast for the parallel flash
that is attached by default to the async banks.  So slow things down a bit
so accessing the hardware is stable.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: add ICPLB coverage for async banks
Bernd Schmidt [Wed, 2 Sep 2009 08:14:05 +0000 (08:14 +0000)]
Blackfin: add ICPLB coverage for async banks

When doing XIP, we need to execute out of the async banks, so we need
ICPLBs to allow this.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: use KERN_ALERT in all kgdb_test output
Mingquan Pan [Mon, 31 Aug 2009 04:56:06 +0000 (04:56 +0000)]
Blackfin: use KERN_ALERT in all kgdb_test output

Most messages are already using KERN_ALERT, so be consistent to make
things easier to check with test scripts.

Signed-off-by: Mingquan Pan <grace.pan@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: fix BF54x SPI CS resources
Yi Li [Sun, 30 Aug 2009 20:45:50 +0000 (20:45 +0000)]
Blackfin: fix BF54x SPI CS resources

The BF54x has three slave select signals for SPI0/SPI1, not eight.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: fix typo in isram_write()
Robin Getz [Thu, 27 Aug 2009 14:39:31 +0000 (14:39 +0000)]
Blackfin: fix typo in isram_write()

The DTEST write bit is 2, not 1.  Improve comments in the related macro
while we're here.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: bf537-stamp: add adp5588 gpio resources
Michael Hennerich [Thu, 27 Aug 2009 04:09:32 +0000 (04:09 +0000)]
Blackfin: bf537-stamp: add adp5588 gpio resources

For the adp5588 GPIO daughter card.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: add some isram-driver self tests
Mike Frysinger [Thu, 27 Aug 2009 01:46:48 +0000 (01:46 +0000)]
Blackfin: add some isram-driver self tests

Make it easy to figure out if code changes here are correct.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: workaround anomaly 05000283
Robin Getz [Wed, 26 Aug 2009 15:54:10 +0000 (15:54 +0000)]
Blackfin: workaround anomaly 05000283

Make sure our interrupt entry code with exact hardware errors handles
anomaly 05000283 (infinite stall in system MMR kill) so we don't stall
while under load.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: fix spelling in a few comments
Michael Hennerich [Fri, 21 Aug 2009 03:49:19 +0000 (03:49 +0000)]
Blackfin: fix spelling in a few comments

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: use raw_smp_processor_id() in exception code
Yi Li [Thu, 20 Aug 2009 04:17:47 +0000 (04:17 +0000)]
Blackfin: use raw_smp_processor_id() in exception code

When preempt debugging is enabled, smp_processor_id() may utilize the
"current" structure.  This may not be safe to access under all exceptions
due to it being in dynamically allocated memory.  So in exception code,
make sure we use raw_smp_processor_id() instead to get at the real value
directly.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: remove useless duplicated assignment in gpio code
Michael Hennerich [Wed, 19 Aug 2009 03:15:56 +0000 (03:15 +0000)]
Blackfin: remove useless duplicated assignment in gpio code

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: Fix link errors with binutils 2.19 and GCC 4.3
Ingo Molnar [Tue, 18 Aug 2009 16:45:25 +0000 (16:45 +0000)]
Blackfin: Fix link errors with binutils 2.19 and GCC 4.3

Not sure whether this has been reported/fixed before.

Today I built a Blackfin tool-chain from scratch for -tip testing,
and it triggers:

 arch/blackfin/kernel/vmlinux.lds:1238: undefined section `.data_a_l1' referenced in expression

and:

 arch/blackfin/kernel/vmlinux.lds:1238: undefined section `.text_data_l1'
referenced in expression

Now i dont have any way to test this linker script, but it now at
least builds fine after fixing what appears to be typos in those
assert statements.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: handle the core timer interrupt with handle_percpu_irq on SMP
Graf Yang [Tue, 18 Aug 2009 04:29:33 +0000 (04:29 +0000)]
Blackfin: handle the core timer interrupt with handle_percpu_irq on SMP

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>