Commit graph

413 commits

Author SHA1 Message Date
Russell King f4dc9a4cf2 [PATCH] ARM: Remove single-use user save/restore macros
Assembly macros are pointless if they're only used once.  Move
them inline.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-26 15:20:34 +01:00
Russell King cf88b417f9 [PATCH] ARM: remove PT_TRACESYS
PT_TRACESYS is unused, remove it.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-26 15:20:12 +01:00
Russell King acaca3c915 [PATCH] ARM: Remove SVC_MODE definition
SVC_MODE reflects the MODE_SVC definition in asm/ptrace.h.  Use
the asm/ptrace.h definition instead, and remove SVC_MODE.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-26 15:19:48 +01:00
Russell King e0f9f4a622 [PATCH] ARM: Use __NR_SYSCALL_BASE and __ARM_NR_BASE in asm code
Don't define our own local constants, but use those already defined
in asm/unistd.h instead.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-26 15:19:24 +01:00
Russell King 925c8a1a8c [PATCH] ARM: pt_regs offsets
Generate pt_regs S_xx offsets from the structure itself instead
of #defining them.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-26 15:18:59 +01:00
Russell King 1ec42c0c97 [PATCH] ARM: Remove argument for disable_irq/enable_irq
Since we do not require a register for these operations, we can
remove this unnecessary argument.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-26 15:18:26 +01:00
Russell King 7933523dc7 [PATCH] ARM: remove some entry initialisation asm code
Convert the trivial vector entry initialisation code to C code.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-26 15:17:42 +01:00
Deepak Saxena 2fac6f3fec [PATCH] ARM: 2653/1: Fix memset and memzero macro double-reference of parameters
Patch from Deepak Saxena

The current memset() and memzero() macros on ARM reference the
incoming parameters more than once and this can cause uninted
side-effects. The issue was found while debugging SCTP protocol
and with the specific usage of memzero(skb_put(skb,size),size).
This call would call skb_put(skb,size) twice leading to badness.
The fixed version copies the incoming parameters into local
variables and uses those instead.

Signed-off-by: Deepak Saxena
Signed-off-by: Russell King
2005-04-25 23:40:05 +01:00
Jeff Lackey 41130d37a4 [PATCH] ARM: 2650/1: PXA27x sleep - workaround Errata 39 & 50 (Patch 2667)
Patch from Jeff Lackey

This patch updates arch/arm/mach-pxa/sleep.S to support
the PXA270 CPU.  It works around Errata 39 & 50 from the
Intel(R) PXA27x Processor Family Specification Update.

Signed-off-by: Jeff Lackey
Signed-off-by: Russell King
2005-04-25 23:38:55 +01:00
Lucas Correia Villa Real eec99e345e [PATCH] ARM: 2645/1: Adds IIS definitions for the S3C2400
Patch from Lucas Correia Villa Real

Adds IISFCON definitions for the S3C2400 at
include/asm-arm/arch-s3c2400/regs-iis.h.

Signed-off-by: Lucas Correia Villa Real
Signed-off-by: Ben Dooks
Signed-off-by: Russell King
2005-04-25 23:13:15 +01:00
Lucas Correia Villa Real bd7b170201 [PATCH] ARM: 2644/1: Adds S3C2400 support to uncompress.h
Patch from Lucas Correia Villa Real

The S3C2400 doesn't have a cpuid information stored anywhere. This patch adds
support to the S3C2400 at include/asm-arm/arch-s3c2400/uncompress.h by
initializing the cpuid variable to the S3C2410, as they share the same
routine. The GSTATUS1 pin is then used only if not compiling for the S3C2400.

Signed-off-by: Lucas Correia Villa Real
Signed-off-by: Ben Dooks
Signed-off-by: Russell King
2005-04-25 23:12:50 +01:00
Lucas Correia Villa Real b7ebcc108a [PATCH] ARM: 2641/1: Adds S3C2400_SPPIN_nCS to arch-s3c2410/regs-spi.h
Patch from Lucas Correia Villa Real

Adds a define to the SPI Card Select bit on the S3C2400 into
include/asm-arm/arch-s3c2410/regs-spi.h

Signed-off-by: Lucas Correia Villa Real
Signed-off-by: Russell King
2005-04-25 18:40:31 +01:00
Lucas Correia Villa Real a334242136 [PATCH] ARM: 2640/1: Adds DRAM/BANKSIZE_MASK definitions for S3C2400
Patch from Lucas Correia Villa Real

Adds DRAM refresh definitions and sets the BANKSIZE_MASK for the S3C2400 on
include/asm-arm/arch-s3c2400/regs-mem.h

Signed-off-by: Lucas Correia Villa Real
Signed-off-by: Ben Dooks
Signed-off-by: Russell King
2005-04-25 18:36:50 +01:00
Al Viro 8e293ada7d [PATCH] ppc trivial iomem annotations: pmac_smp.c
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-24 14:58:08 -07:00
Al Viro e2178f199b [PATCH] ppc trivial iomem annotations: chrp
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-24 14:58:08 -07:00
Al Viro 28a6815979 [PATCH] ppc trivial iomem annotations: pmac_time.c
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-24 14:58:08 -07:00
Al Viro ef0299bf8e [PATCH] mostek bogus sparse annotations fixed
void * __iomem foo is not a pointer to iomem - it's an iomem variable
containing void *.  A pile of such guys in arch/sparc64/kernel/time.c,
drivers/sbus/char/rtc.c and include/asm-sparc64/mostek.h turned into
intended void __iomem *. 

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-24 12:28:36 -07:00
Al Viro fdca124a1b [PATCH] missing include in mthca
Missing include - usual portability problems...

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-24 12:28:36 -07:00
Al Viro 461790f790 [PATCH] broken dependency for floppy on ARM
(!ARCH_S390 && !M68K && !IA64 && !UML) is obviously always true on ARM.

Intended behaviour for ARM is "absent unless we are on RiscPC or
EBSA285".  So what we want is added && !ARM in the first term - without
it the last part (|| ARCH_RPC || ARCH_EBSA285, that is) doesn't do
anything. 

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-24 12:28:35 -07:00
Al Viro a62e7cef1a [PATCH] missing include in hisax
Missing include, breaks at least on arm.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-24 12:28:35 -07:00
Al Viro 3106dbcd91 [PATCH] __get_unaligned() turned into macro
Turns __get_unaligned() and __put_unaligned into macros.  That is
definitely safe; leaving them as inlines breaks on e.g.  alpha [try to
build ncpfs there and you'll get unresolved symbols since we end up
getting __get_unaligned() not inlined]. 

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-24 12:28:35 -07:00
Al Viro b5a48daddc [PATCH] broken dependency for I2C_MPC
All boards dealt with by I2C_MPC are 32bit.  Moreover, driver simply
won't build on ppc64 - it uses ppc32-only types all over the place. 
Dependency fixed - it's PPC32, not PPC. 

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-24 12:28:35 -07:00
Al Viro e3b9ab1a6d [PATCH] missing dependency on sparc64
CONFIG_HW_CONSOLE selects vt.c; without the stuff pulled by CONFIG_VT it
will not build.  Normally we get both in drivers/char/Kconfig and there
HW_CONSOLE depends on VT.  sparc64 does not pull drivers/char/Kconfig
and has that sutff in arch/sparc64/Kconfig instead.  However, it forgets
to add the same dependency.  As the result, turning VT off [which is
possible] will end up with broken build.  For no good reason... 

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-24 12:28:35 -07:00
Al Viro fa732f5568 [PATCH] msnd_pinnacle GFP fix
Dumb typo - __get_free_page() takes gfp mask (in this case -
GFP_KERNEL), not the page size... 

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-24 12:28:34 -07:00
Al Viro 01424961e6 [PATCH] mempolicy.c GFP fix
zonelist_policy() forgot to mask non-zone bits from gfp when comparing
zone number with policy_zone. 

ACKed-by: Andi Kleen <ak@suse.de>
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-24 12:28:34 -07:00
Al Viro bc86120a85 [PATCH] SCSI GFP fixes
Somebody forgot that | has higher priority than ?:.  As the result,
allocation is done with bogus flags - instead of GFP_ATOMIC + possibly
GFP_DMA we always get GFP_DMA and no GFP_ATOMIC. 

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-24 12:28:34 -07:00
Ashok Raj df6c6804ce [IA64] Fix build errors for !HOTPLUG case.
Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-22 14:46:24 -07:00
Ashok Raj b8d8b883e6 [IA64] cpu hotplug: return offlined cpus to SAL
This patch is required to support cpu removal for IPF systems. Existing code
just fakes the real offline by keeping it run the idle thread, and polling
for the bit to re-appear in the cpu_state to get out of the idle loop.

For the cpu-offline to work correctly, we need to pass control of this CPU 
back to SAL so it can continue in the boot-rendez mode. This gives the
SAL control to not pick this cpu as the monarch processor for global MCA
events, and addition does not wait for this cpu to checkin with SAL
for global MCA events as well. The handoff is implemented as documented in 
SAL specification section 3.2.5.1 "OS_BOOT_RENDEZ to SAL return State"

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-22 14:44:40 -07:00
Arun Sharma 7130667107 [IA64] ia32_signal.c: erroneous use of memset/memcpy
Found by Alexander Nyberg, improved by Bjorn Helgaas.

- Fix the incorrect argument to sizeof()
- looks like memcpy() code pass was dervived from code that used
  copy_from_user().  But in this case we are doing to kernel space
  to kernel space copy, so memcpy is the right routine, but it
  doesn't return an error code.
 
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-22 13:06:47 -07:00
Alexander Nyberg efab7739d9 [PATCH] x86_64: fix new out of line put_user()
The labels after the last put_user patch were misplaced so
exceptions on the real mov instructions would not be handled.

Noted by Brian Gerst <bgerst@didntduck.org>
2005-04-22 10:22:07 -07:00
Linus Torvalds 21b7ef0c6c Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6.git 2005-04-22 10:18:06 -07:00
David S. Miller b179fb8ca5 [SPARC64]: In sunsab driver, make sure to set the uart timeout.
This breaks serial consoles badly.  Thanks to Eric Brower
for tracking down the problem.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 22:18:03 -07:00
David S. Miller 623f41eb92 [SPARC64]: In sunsu driver, make sure to fully init chip for kbd/ms
We were forgetting to call sunsu_change_speed().  The reason
that replugging in the mouse cable "fixes things" is that
causes a BREAK interrupt which in turn caused a call to
sunsu_change_speed() which would get the chip setup properly.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 22:06:13 -07:00
David S. Miller b4bca26c01 [SPARC]: Provide generic ioctls in Sparc RTC driver.
Provide support for drivers/char/rtc.c ioctls in the
Mostek rtc driver as well as the Sparc specific RTCGET
and RTCSET.

This allows userspace to be much less messy.  Currently
util-linux and other spots jump through hoops trying
various ioctl variants until it hits the right one whatever
driver actually being used supports.

Eventually all of this should move over to the genrtc.c
driver, but not today...

While we are here, fix up the register types for sparse.

Thanks to Frans Pop for helping point out this issue.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 21:42:34 -07:00
David S. Miller d7be828e03 [SPARC64]: Provide a pgprot_noncached() implementation.
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 21:41:33 -07:00
Patrick McHardy 5c5d281a93 [XFRM]: Fix existence lookup in xfrm_state_find
Use 'daddr' instead of &tmpl->id.daddr, since the latter
might be zero.  Also, only perform the lookup when
tmpl->id.spi is non-zero.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 20:12:32 -07:00
Michael Chan 7938109fff [TG3]: Add msi test
Add MSI test for chips that support MSI. If MSI test fails, it will
switch back to INTx mode and will print a message asking the user to
report the failure.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 17:13:59 -07:00
Michael Chan 88b06bc26b [TG3]: Add msi support
Add MSI support for 5751 C0 and 5752.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 17:13:25 -07:00
Michael Chan 1c8594b48b [TG3]: Fix bug in tg3_set_eeprom()
Fix a bug in tg3_set_eeprom() when the length is less than 4 and the
offset is not 4-byte aligned.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 17:12:46 -07:00
Michael Chan e6af301be3 [TG3]: Add nvram lock-out support for 5752 TPM
Add support for the NVRAM lock-out feature for TPM in 5752. If lock-out
is enabled, certain NVRAM registers cannot be written to.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 17:12:05 -07:00
Michael Chan 361b4ac29b [TG3]: Add nvram detection for 5752
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 17:11:21 -07:00
Michael Chan 3e7d83bc96 [TG3]: Add GPIO3 for 5752
Add bit definitions for the new GPIO3 in 5752. GPIO3 must be driven as
output when it is unused.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 17:10:36 -07:00
Michael Chan ff645bec52 [TG3]: Workaround 5752 A0 chip ID
The 5752 A0 chip ID is wrong in hardware. The simplest way to workaround
it is to change it to the correct value in tp->pci_chip_rev_id. This
way, it is easier to check for the ASIC_REV_5752 in the rest of the
driver.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 17:09:53 -07:00
Michael Chan 8c6bda1a89 [TG3]: Fix tg3_set_power_state()
Fix tg3_set_power_state to drive GPIOs properly based on the
TG3_FLAG_EEPROM_WRITE_PROTECT flag. Some delays are also added after D0
and D3 power state changes.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 17:09:08 -07:00
Michael Chan 314fba348e [TG3]: Setup proper GPIO settings
Setup proper GPIO settings in tp->grc_local_ctrl before calling
tg3_set_power() state in tg3_get_invariants() and after chip reset.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 17:07:04 -07:00
Michael Chan 7d0c41ef89 [TG3]: Split tg3_phy_probe into 2 functions
Split the 1st half of tg3_phy_probe() into tg3_get_eeprom_hw_cfg() so
that the TG3_FLAG_EEPROM_WRITE_PROT can be determined before calling
tg3_set_power_state() in tg3_get_invariants(). This will allow
tg3_set_power_state() to drive the GPIOs correctly based on the config.
information in eeprom.

On the 5752, there are no pull-up resistors on the GPIO pins and it is
necessary to drive the unused GPIOs as output.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 17:06:20 -07:00
Michael Chan 85e94cedc4 [TG3]: Minor 5752 fixes
Some minor 5752 fixes mostly for correctness and add 5752 PHY ID.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 17:05:28 -07:00
John W. Linville 053d78000b [TG3]: add support for bcm5752 rev a1
Replace existing ASIC_REV_5752 definition with ASIC_REV_5752_A0,
and add definition for ASIC_REV_5752_A1. Then, add ASIC_REV_5752_A1
to check for setting TG3_FLG2_5750_PLUS in tg3_get_invariants.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 17:03:52 -07:00
John W. Linville 1b440c568e [TG3]: check TG3_FLG2_5750_PLUS flag to set TG3_FLG2_5705_PLUS flag
Use check of TG3_FLG2_5750_PLUS in tg3_get_invariants to set
TG3_FLG2_5705_PLUS flag.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 17:03:18 -07:00
John W. Linville bb7064dc09 [TG3]: use TG3_FLG2_57{05,50}_PLUS flags in tg3_get_invariants
Rewrite checks in tg3_get_invariants to use TG3_FLG2_5705_PLUS and
TG3_FLG2_5750_PLUS flags.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21 17:02:41 -07:00