Commit graph

119323 commits

Author SHA1 Message Date
Eric Miao a5718a14a1 [ARM] pxafb: make {backlight,lcd}_power() members of struct pxafb_info
instead of holding them as static pointers.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:43:47 +08:00
Eric Miao 9179825cf5 [ARM] locomo: export locomo_frontlight_set()
This symbol is required by locomo backlight driver, exporting this
allows the driver to be built as a module.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:43:35 +08:00
Eric Miao 8cc7890981 [ARM] pxa: add missing GPIOs definitions
GPIO3/GPIO4 are a bit special on pxa27x, since it depends on PCFR/PI2C_EN
bit, add their definitions here with comments.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Stefan Schmidt <stefan@datenfreihafen.org>
2008-12-02 14:42:41 +08:00
Eric Miao 59c7bcd4d6 [ARM] pxa: add base PXA935 support due to CPUID change
PXA935 has changed its implementor ID from Intel to Marvell, this
patch modifies arch/arm/boot/compressed/head.S and proc-xsc3.S to
support a smooth bootup.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:40 +08:00
Eric Miao f1c6cd62cc [ARM] pxa: introduced cpu_is_pxa935() and cpu_is_pxa9xx()
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:40 +08:00
Eric Miao 6f584cfab4 [ARM] pxa: move I2C pin configurations out into board specific files
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:40 +08:00
Eric Miao 1475822052 [ARM] pxa: register Power I2C device only when necessary
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:40 +08:00
Eric Miao 994642934d [ARM] pxa: move power I2C device definitions into devices.c
Let's put these devices into a central place even if they are now
processor specific, as they might be re-used in later processors.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:40 +08:00
Eric Miao e8a5ab1f73 [ARM] pxa: remove unnecessary #include of pxa2xx-gpio.h in clock.c
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:39 +08:00
Eric Miao 7e5abc465b [ARM] pxa: include <mach/hardware.h> in pxa-regs.h
for the reference of __REG() within <mach/hardware.h>

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:39 +08:00
Eric Miao bf8b38654b [ARM] pxa: further cleanup of pxa-regs.h
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:39 +08:00
Eric Miao f1647e4c06 [ARM] pxa: move GPIOx_BASE and GPIO register offsets to gpio.c
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:39 +08:00
Eric Miao 1f017a9964 [ARM] pxa: move AC97 register definitions into dedicated regs-ac97.h
The optimal change would be to move the AC97 register definitions into
the AC97 driver, unfortunately, the registers are shared between several
files. Move them into a dedicated regs-ac97.h first.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:39 +08:00
Eric Miao 02f652626a [ARM] pxa: move UART register definitions into dedicated regs-uart.h
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:38 +08:00
Eric Miao b31eca4f00 [ARM] pxa: move pxa2xx specific PWRMODE definitions into pxa2xx-regs.h
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:38 +08:00
Eric Miao a07efb5dac [ARM] pxa: remove the now unused IMPMCR/IMPMSR register definitions
There two are internal registers that are used to control the power
management of the Internal Memory (i.e. Internal SRAM). They are
referenced nowhere and removed here to simplify pxa-regs.h a bit.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:38 +08:00
Eric Miao d15313e685 [ARM] pxa: remove unused PWM register definitions, use generic PWM API
We now have generic PWM API for PXA, the PWM registers definitions are
now used nowhere, and it is not encouraged to manipulate them directly
by driver code.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:38 +08:00
Eric Miao b40ddf5758 [ARM] pxa: move FICP register definitions into pxaficp_ir.c
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:38 +08:00
Eric Miao 013132cae8 [ARM] pxa: move camera (QCI) registers definition out of pxa-regs.h
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
2008-12-02 14:42:37 +08:00
Eric Miao 63e6552f7c [ARM] pxa: removed unused declarations of pxa_gpio_* in hardware.h
pxa_gpio_{get,set}_value() are not used anymore, remove them from hardware.h.
Declaration of pxa_gpio_mode() is still being referenced and thus moved into
pxa2xx-gpio.h

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:37 +08:00
Eric Miao 80796f2a40 [ARM] pxa: use <linux/gpio.h> instead of unnecessary <mach/gpio.h>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:37 +08:00
Eric Miao 067455aa53 [ARM] pxa: add support for additional GPIOs on PXA26x
Original patch from Marek Vasut, the problems with PXA26x are:

1. there are additional 4 GPIOs 86,87,88,89 have their direction bits
   inverted in GPDR2, as well as their alternate function bits being
   '1' for their GPIO functionality in GAFRx

2. there is no easy way to decide if the processor is a pxa26x or a
   pxa250/pxa255 at run-time, so the assumption here is the pxa26x
   will be treated as one of the pxa25x variants, and board code
   should have a better knowledge of the processor it is featured

Introduce pxa26x_init_irq() for the second purpose, and treat the
additional GPIOs > 85 on PXA25x specially.

Kconfig option CONFIG_CPU_PXA26x is introduced to optimize the code
a bit when PXA26x support isn't needed. Board config options have
to select this to enable the support for PXA26x.

__gpio_is_inverted() will be optimized way when CONFIG_CPU_PXA26x
isn't selected.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:37 +08:00
Eric Miao e88db8b91f Revert "[ARM] pxa: introduce cpu_is_pxa26x()"
This reverts commit da1a3dc0eb.

The originally proposed way in the above commit is incorrect. And
there is no easy way to distinguish between pxa25x and pxa26x at
run-time.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:37 +08:00
Eric Miao ddd244dd81 [ARM] pxa: use 'pxa_last_gpio' instead of 'gpio_nr' in mfp-pxa2xx.c
The 'gpio_nr' can really be inferred by 'pxa_last_gpio', and since we
already have that variable, remove the unnecessary 'gpio_nr' now.

Also, fix the incorrect GPIO number passed in pxa27x_init_irq().

Note: pxa_last_gpio should be initialized earlier, and this is true
since it's been assigned in machine_desc->init_irq().

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:36 +08:00
Robert Jarzmik 9968711468 [ARM] pxa: add muxed gpio wakeup sources on pxa2xx architectures
PXA SoC have several GPIOs muxed on only one wakeup source.
Add support for these wakeup sources which were missing
in mfp core support.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:36 +08:00
Eric Miao afb5b5c9ad [ARM] pxa: explicit #include <mach/dma.h> in various drivers
Where 'pxa_dma_desc' and 'pxa_{request,free}_dma' are referenced.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:26 +08:00
Linus Torvalds ed313489ba Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 5330/1: mach-pxa: Fixup reset for systems using reboot=cold or other strings
  [ARM] pxa: fix incorrect PCMCIA PSKTSEL pin configuration for spitz
  [ARM] pxa: fix I2C controller device being registered twice on Akita
  pxafb: only initialize the smart panel thread when dealing with a smartpanel
  pxafb: introduce LCD_TYPE_MASK and use it.
2008-11-20 18:08:09 -08:00
Linus Torvalds 13d428afc0 Linux 2.6.28-rc6 2008-11-20 15:19:22 -08:00
Linus Torvalds 906430a99e Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] xen: fix xen_get_eflags.
  [IA64] ia64/pv_ops/pv_cpu_ops: fix _IA64_REG_IP case.
  [IA64] remove duplicate include iommu.h
  [IA64] use mprintk instead of printk, in ia64_mca_modify_original_stack
  [IA64] Rationalize kernel mode alignment checking
2008-11-20 15:07:40 -08:00
Linus Torvalds ba721d318b Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: ACE1001 patch for cp2101.c
  USB: usbmon: fix read(2)
  USB: gadget rndis: send notifications
  USB: gadget rndis: stop windows self-immolation
  USB: storage: update unusual_devs entries for Nokia 5300 and 5310
  USB: storage: updates unusual_devs entry for the Nokia 6300
  usb: musb: fix bug in musb_schedule
  USB: fix SB700 usb subsystem hang bug
2008-11-20 13:53:21 -08:00
Isaku Yamahata 0090d481ee [IA64] xen: fix xen_get_eflags.
fix xen_get_eflags. It doesn't take any argument.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2008-11-20 13:43:01 -08:00
Isaku Yamahata 93fe10b670 [IA64] ia64/pv_ops/pv_cpu_ops: fix _IA64_REG_IP case.
pv_cpu_ops.getreg(_IA64_REG_IP) returned constant.
But the returned ip valued should be the one in the caller, not of the callee.
This patch fixes that.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2008-11-20 13:41:20 -08:00
Huang Weiyi d596410776 [IA64] remove duplicate include iommu.h
arch/ia64/kernel/pci-dma.c only needs to include iommu once.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2008-11-20 13:38:16 -08:00
Hidetoshi Seto ef23cdbefc [IA64] use mprintk instead of printk, in ia64_mca_modify_original_stack
Using printk from MCA/INIT context is unsafe since it can cause deadlock.
The ia64_mca_modify_original_stack is called from both of mca handler and
init handler, so it should use mprintk instead of printk.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2008-11-20 13:31:10 -08:00
Tony Luck b704882e70 [IA64] Rationalize kernel mode alignment checking
Itanium processors can handle some misaligned data accesses. They
also provide a mode where all such accesses are forced to trap. The
kernel was schizophrenic about use of this mode:

* Base kernel code ran in permissive mode where the only traps
  generated were from those cases that the h/w could not handle.
* Interrupt, syscall and trap code ran in strict mode where all
  unaligned accesses caused traps to the 0x5a00 unaligned reference
  vector.

Use strict alignment checking throughout the kernel, but make
sure that we continue to let user mode use more relaxed mode
as the default.

Signed-off-by: Tony Luck <tony.luck@intel.com>
2008-11-20 13:27:12 -08:00
Matthew Wilcox 0ca4b6b001 x86: Fix interrupt leak due to migration
When we migrate an interrupt from one CPU to another, we set the
move_in_progress flag and clean up the vectors later once they're not
being used.  If you're unlucky and call destroy_irq() before the vectors
become un-used, the move_in_progress flag is never cleared, which causes
the interrupt to become unusable.

This was discovered by Jesse Brandeburg for whom it manifested as an
MSI-X device refusing to use MSI-X mode when the driver was unloaded
and reloaded repeatedly.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-20 13:17:40 -08:00
Trond Myklebust 23918b0306 SUNRPC: Fix a performance regression in the RPC authentication code
Fix a regression reported by Max Kellermann whereby kernel profiling
showed that his clients were spending 45% of their time in
rpcauth_lookup_credcache.

It turns out that although his processes had identical uid/gid/groups,
generic_match() was failing to detect this, because the task->group_info
pointers were not shared. This again lead to the creation of a huge number
of identical credentials at the RPC layer.

The regression is fixed by comparing the contents of task->group_info
if the actual pointers are not identical.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-20 13:17:40 -08:00
Linus Torvalds 0cb39aa0ac Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] Do not attempt to close invalidated file handles
  [CIFS] fix check for dead tcon in smb_init
2008-11-20 13:14:16 -08:00
Linus Torvalds c93fc2873e Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  MIPS: csrc-r4k: Fix declaration depending on the wrong CONFIG_ symbol.
  MIPS: csrc-r4k: Fix spelling mistake.
  MIPS: RB532: Provide functions for gpio configuration
  MIPS: IP22: Make indy_sc_ops variable static
  MIPS: RB532: GPIO register offsets are relative to GPIOBASE
  MIPS: Malta: Fix include paths in malta-amon.c
2008-11-20 13:13:48 -08:00
Linus Torvalds e3b4ae79e9 Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  intel-iommu: fix compile warnings
2008-11-20 13:13:03 -08:00
Linus Torvalds 4dd61d92d7 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (23 commits)
  net: fix tiny output corruption of /proc/net/snmp6
  atl2: don't request irq on resume if netif running
  ipv6: use seq_release_private for ip6mr.c /proc entries
  pkt_sched: fix missing check for packet overrun in qdisc_dump_stab()
  smc911x: Fix printf format typo in smc911x driver.
  asix: Fix asix-based cards connecting to 10/100Mbs LAN.
  mv643xx_eth: fix recycle check bound
  mv643xx_eth: fix the order of mdiobus_{unregister, free}() calls
  sh: sh_eth: Update to change of mii_bus
  TPROXY: supply a struct flowi->flags argument in inet_sk_rebuild_header()
  TPROXY: fill struct flowi->flags in udp_sendmsg()
  net: ipg.c fix bracing on endian swapping
  phylib: Fix auto-negotiation restart avoidance
  net: jme.c rxdesc.flags is __le16, other missing endian swaps
  phylib: fix phy name example in documentation
  net: Do not fire linkwatch events until the device is registered.
  phonet: fix compilation with gcc-3.4
  ixgbe: fix compilation with gcc-3.4
  pktgen: fix multiple queue warning
  net: fix ip_mr_init() error path
  ...
2008-11-20 13:12:14 -08:00
Linus Torvalds 95763dd52b Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  ftrace: fix dyn ftrace filter selection
  ftrace: make filtered functions effective on setting
  ftrace: fix set_ftrace_filter
  trace: introduce missing mutex_unlock()
  tracing: kernel/trace/trace.c: introduce missing kfree()
2008-11-20 13:11:21 -08:00
Linus Torvalds 0260da162f Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: uaccess_64: fix return value in __copy_from_user()
  x86: quirk for reboot stalls on a Dell Optiplex 330
2008-11-20 13:09:32 -08:00
Helge Deller ed79b86d8a parisc: fix bug in compat_arch_ptrace
Commit 81e192d6ce ("parisc: convert to
generic compat_sys_ptrace") introduced a bug which segfaults the parisc
64bit kernel when stracing 32bit applications:

  Kernel Fault: Code=15 regs=00000000bafa42b0 (Addr=00000001baf5ab57)
       YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
  PSW: 00001000000001101111111100001011 Tainted: G        W
  r00-03  000000ff0806ff0b 000000004068edc0 00000000401203f8 00000000fb3e2508
  r04-07  0000000040686dc0 00000000baf5a800 fffffffffffffffc fffffffffb3e2508
  r08-11  00000000baf5a800 000000000004b068 00000000000402b0 0000000000040d68
  r12-15  0000000000042a9c 0000000000040a9c 0000000000040d60 0000000000042e9c
  r16-19  000000000004b060 000000000004b058 0000000000042d9c ffffffffffffffff
  r20-23  000000000800000b 0000000000000000 000000000800000b fffffffffb3e2508
  r24-27  00000000fffffffc 0000000000000003 00000000fffffffc 0000000040686dc0
  r28-31  00000001baf5a7ff 00000000bafa4280 00000000bafa42b0 00000000000001d7
  sr00-03  0000000000fca000 0000000000000000 0000000000000000 0000000000fca000
  sr04-07  0000000000000000 0000000000000000 0000000000000000 0000000000000000

  IASQ: 0000000000000000 0000000000000000 IAOQ: 0000000040120400 0000000040120404
   IIR: 4b9a06b0    ISR: 0000000000000000  IOR: 00000001baf5ab57
   CPU:        0   CR30: 00000000bafa4000 CR31: 00000000d22344e0
   ORIG_R28: 00000000fb3e2248
   IAOQ[0]: compat_arch_ptrace+0xb8/0x160
   IAOQ[1]: compat_arch_ptrace+0xbc/0x160
   RP(r2): compat_arch_ptrace+0xb0/0x160
  Backtrace:
   [<00000000401612ac>] compat_sys_ptrace+0x15c/0x180
   [<0000000040104ef8>] syscall_exit+0x0/0x14

The problem is that compat_arch_ptrace() enters with an addr value of
type compat_ulong_t and calls translate_usr_offset() to translate the
address offset into a struct pt_regs offset like this:

	addr = translate_usr_offset(addr)

this means that any return value of translate_usr_offset() is stored
back as compat_ulong_t type into the addr variable.

But since translate_usr_offset() returns -1 for invalid offsets, addr
can now get the value 0xffffffff which then fails the next return-value
sanity check and thus the kernel tries to access invalid memory:

	if (addr < 0)
		break;

Fix this bug by modifying translate_usr_offset() to take and return
values of type compat_ulong_t, and by returning the value
"sizeof(struct pt_regs)" as an error indicator.

Additionally change the sanity check to check for return values
for >= sizeof(struct pt_regs).

This patch survived my compile and run-tests.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-20 13:09:17 -08:00
Steve French ddb4cbfc53 [CIFS] Do not attempt to close invalidated file handles
If a connection with open file handles has gone down
and come back up and reconnected without reopening
the file handle yet, do not attempt to send an SMB close
request for this handle in cifs_close.  We were
checking for the connection being invalid in cifs_close
but since the connection may have been reconnected
we also need to check whether the file handle
was marked invalid (otherwise we could close the
wrong file handle by accident).

Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-20 20:14:13 +00:00
Ralf Baechle a24e849c01 MIPS: csrc-r4k: Fix declaration depending on the wrong CONFIG_ symbol.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-11-20 19:42:33 +00:00
Ralf Baechle 664c4bbb73 MIPS: csrc-r4k: Fix spelling mistake.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-11-20 19:42:33 +00:00
Phil Sutter 2e373952cc MIPS: RB532: Provide functions for gpio configuration
As gpiolib doesn't support pin multiplexing, it provides no way to
access the GPIOFUNC register. Also there is no support for setting
interrupt status and level. These functions provide access to them and
are needed by the CompactFlash driver.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-11-20 19:42:33 +00:00
Dmitri Vorobiev f43909dfb3 MIPS: IP22: Make indy_sc_ops variable static
The indy_sc_ops variable in arch/mips/mm/sc-ip22.c is needlessly defined
global, and this patch makes it static.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
---
2008-11-20 19:42:33 +00:00
Florian Fainelli 1b432840d0 MIPS: RB532: GPIO register offsets are relative to GPIOBASE
This patch fixes the wrong use of GPIO register offsets
in devices.c. To avoid further problems, use gpio_get_value
to return the NAND status instead of our own expanded code.

Also define the zero offset of the alternate function register to allow
consistent access.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-11-20 19:42:32 +00:00