Commit Graph

73948 Commits (2ddae4a64491f790799e2adbfaec72a23dc2e7ef)

Author SHA1 Message Date
Christian Borntraeger 9778385db3 sched: fix accounting of interrupts during guest execution on s390
Currently the scheduler checks for PF_VCPU to decide if this timeslice
has to be accounted as guest time. On s390 host interrupts are not
disabled during guest execution. This causes theses interrupts to be
accounted as guest time if CONFIG_VIRT_CPU_ACCOUNTING is set. Solution
is to check if an interrupt triggered account_system_time. As the tick
is timer interrupt based, we have to subtract hardirq_offset.

I tested the patch on s390 with CONFIG_VIRT_CPU_ACCOUNTING and on
x86_64. Seems to work.

CC: Avi Kivity <avi@qumranet.com>
CC: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-15 20:57:39 +01:00
Linus Torvalds ecefe4a1c3 Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c/eeprom: Recognize VGN as a valid Sony Vaio name prefix
  i2c/eeprom: Hide Sony Vaio serial numbers
  i2c-pasemi: Fix NACK detection
  i2c-pasemi: Replace obsolete "driverfs" reference with "sysfs"
  i2c: Make i2c_check_addr static
  i2c-dev: Unbound new-style i2c clients aren't busy
  i2c-dev: "how does it work" comments
2007-11-15 11:01:07 -08:00
Jean Delvare 8b925a3dd8 i2c/eeprom: Recognize VGN as a valid Sony Vaio name prefix
Recent (i.e. 2005 and later) Sony Vaio laptops have names beginning
with VGN rather than PCG. Update the eeprom driver so that it
recognizes these.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-11-15 19:24:03 +01:00
Jean Delvare 0f2cbd38aa i2c/eeprom: Hide Sony Vaio serial numbers
The sysfs interface to DMI data takes care to not make the system
serial number and UUID world-readable, presumably due to privacy
concerns. For consistency, we should not let the eeprom driver
export these same strings to the world on Sony Vaio laptops.
Instead, only make them readable by root, as we already do for BIOS
passwords.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-11-15 19:24:03 +01:00
Olof Johansson be8a1f7cd4 i2c-pasemi: Fix NACK detection
Turns out we don't actually check the status to see if there was a
device out there to talk to, just if we had a timeout when doing so.

Add the proper check, so we don't falsly think there are devices
on the bus that are not there, etc.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-11-15 19:24:02 +01:00
Robert P. J. Day ff23f3eabb i2c-pasemi: Replace obsolete "driverfs" reference with "sysfs"
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-11-15 19:24:02 +01:00
Jean Delvare 5e31c2bd3c i2c: Make i2c_check_addr static
i2c_check_addr is only used inside i2c-core now, so we can make it
static and stop exporting it. Thanks to David Brownell for noticing.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-11-15 19:24:02 +01:00
Jean Delvare bd4217d8c6 i2c-dev: Unbound new-style i2c clients aren't busy
Let i2c-dev deal properly with new-style i2c clients. Instead of
considering them always busy, it needs to check wether a driver is
bound to them or not.

This is still not completely correct, as the client could become
busy later, but the same problem already existed before new-style
clients were introduced. We'll want to fix it someday.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
2007-11-15 19:24:01 +01:00
David Brownell 907135aaa0 i2c-dev: "how does it work" comments
This adds some "how does this work" comments to the i2c-dev driver,
plus separators between the three main components:

  - The parallel list of i2c_adapters ("i2c_dev_list"), each of which
    gets a "struct i2c_dev" and a /dev/i2c-X character special file.

  - An i2cdev_driver gets adapter add/remove notifications, which are
    used to maintain that list of adapters.

  - Special file operations, which let userspace talk either directly to
    the adapter (for i2c_msg operations) or through cached addressing info
    using an anonymous i2c_client (never registered anywhere).

Plus there's the usual module load/unload record keeping.

After making sense of this code, I think that the anonymous i2c_client
is pretty shady.  But since it's never registered, using this code with
a system set up for "new style" I2C drivers is no more complicated than
always using the I2C_SLAVE_FORCE ioctl (instead of I2C_SLAVE).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-11-15 19:24:01 +01:00
Linus Torvalds 279e1dab94 Revert "skge: fix ram buffer size calculation"
This reverts commit 7fb7ac2411.

Heikki Orsila reports that it causes a regression:

  "Doing

	nc host port < /dev/zero

   on a sending machine (not skge) to an skge machine that is receiving:

	nc -l -p port >/dev/null

   with ~60 MiB/s speed, causes the interface go malfunct. A slow
   transfer doesn't cause a problem."

See

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

for some more information.

There is a workaround (also reported by Heikki):

  "After some fiddling, I noticed that not changing the register write
   order on patch:

   +       skge_write32(hw, RB_ADDR(q, RB_END), end);
           skge_write32(hw, RB_ADDR(q, RB_WP), start);
           skge_write32(hw, RB_ADDR(q, RB_RP), start);
   -       skge_write32(hw, RB_ADDR(q, RB_END), end);

   fixes the visible effect..  Possibly not the root cause of the
   problem, but changing the order back fixes networking here."

but that has yet to be ack'ed or tested more widely, so the whole
problem-causing commit gets reverted until this is resolved properly.

Bisected-and-requested-by: Heikki Orsila <shdl@zakalwe.fi>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-15 08:44:36 -08:00
Linus Torvalds 8cc91677ae Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
  [AVR32] Export intc_get_pending symbol
  [AVR32] Add missing bit in PCCR sysreg
  [AVR32] Fix duplicate clock index in at32ap machine code
  [AVR32] remove UID16 option
  [AVR32] Turn off debugging in SMC driver
  Extend I/O resource for wdt0 for at32ap7000 devices
  [AVR32] pcmcia ioaddr_t should be 32 bits on AVR32
2007-11-15 08:37:09 -08:00
Nick Piggin d32ddd8f20 slob: fix memory corruption
Previously, it would be possible for prev->next to point to
&free_slob_pages, and thus we would try to move a list onto itself, and
bad things would happen.

It seems a bit hairy to be doing list operations with the list marker as
an entry, rather than a head, but...

this resolves the following crash:

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

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-15 08:36:27 -08:00
Roland McGrath a3474224e6 wait_task_stopped: Check p->exit_state instead of TASK_TRACED
The original meaning of the old test (p->state > TASK_STOPPED) was
"not dead", since it was before TASK_TRACED existed and before the
state/exit_state split.  It was a wrong correction in commit
14bf01bb05 to make this test for
TASK_TRACED instead.  It should have been changed when TASK_TRACED
was introducted and again when exit_state was introduced.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Alexey Dobriyan <adobriyan@sw.ru>
Cc: Kees Cook <kees@ubuntu.com>
Acked-by: Scott James Remnant <scott@ubuntu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-15 08:36:27 -08:00
Haavard Skinnemoen 597702aeb4 [AVR32] Export intc_get_pending symbol
Oprofile needs to call intc_get_pending() in order to determine
whether a performance counter interrupt is pending.

Also, include the header which declares intc_get_pending() and fix the
definition to match the prototype.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-11-15 13:47:20 +01:00
Haavard Skinnemoen 8fea1ad17f [AVR32] Add missing bit in PCCR sysreg
The enable bit was missing...

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-11-15 13:47:20 +01:00
ben.nizette@iinet.net.au 80f76c54bd [AVR32] Fix duplicate clock index in at32ap machine code
There's a duplicate clock index between USART0 and USART1 which may be
causing system crashes when USART0 is used.  Change the USART0 index
to '3', indicating the clock that is actually used by USART0.

Signed-off-by: Ben Nizette <ben@niasdigital.com>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-11-15 13:47:20 +01:00
Adrian Bunk 138712218e [AVR32] remove UID16 option
avr32 already sees the option from init/Kconfig.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-11-15 13:47:20 +01:00
Haavard Skinnemoen 3a65a69d49 [AVR32] Turn off debugging in SMC driver
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-11-15 13:47:19 +01:00
Hans-Christian Egtvedt 9797bed20e Extend I/O resource for wdt0 for at32ap7000 devices
This patch extends the I/O resource to 0xfff000cf which will enable the
watchdog driver to access the reset cause (RCAUSE) register. Making it
capable of reporting boot status.

Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-11-15 13:47:19 +01:00
Haavard Skinnemoen 330a9c1df6 [AVR32] pcmcia ioaddr_t should be 32 bits on AVR32
Define ioaddr_t as u_int on AVR32 just like on ARM and MIPS.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-11-15 13:47:19 +01:00
Pavel Emelyanov dab6ba3688 [INET]: Fix potential kfree on vmalloc-ed area of request_sock_queue
The request_sock_queue's listen_opt is either vmalloc-ed or
kmalloc-ed depending on the number of table entries. Thus it 
is expected to be handled properly on free, which is done in 
the reqsk_queue_destroy().

However the error path in inet_csk_listen_start() calls 
the lite version of reqsk_queue_destroy, called 
__reqsk_queue_destroy, which calls the kfree unconditionally. 

Fix this and move the __reqsk_queue_destroy into a .c file as 
it looks too big to be inline.

As David also noticed, this is an error recovery path only,
so no locking is required and the lopt is known to be not NULL.

reqsk_queue_yank_listen_sk is also now only used in
net/core/request_sock.c so we should move it there too.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-15 02:57:06 -08:00
Stephen Hemminger bd7b3f3419 [VIA_VELOCITY]: Don't oops on MTU change.
Simple mtu change when device is down.
Fix http://bugzilla.kernel.org/show_bug.cgi?id=9382.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-14 19:47:27 -08:00
David S. Miller d06fc1d9b5 Merge branch 'fixes-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2007-11-14 19:44:02 -08:00
Linus Torvalds 99fee6d7e5 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] geode: Fix not inplace encryption
2007-11-14 19:17:07 -08:00
Linus Torvalds 4e396db803 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  mlx4_core: Fix thinko in QP destroy (incorrect bitmap_free)
  RDMA/cxgb3: Set the max_qp_init_rd_atom attribute in query_device
  IB/ehca: Fix static rate calculation
  IB/ehca: Return physical link information in query_port()
  IB/ipath: Fix race with ACK retry timeout list management
  IB/ipath: Fix memory leak in ipath_resize_cq() if copy_to_user() fails
  mlx4_core: Fix possible bad free in mlx4_buf_free()
2007-11-14 18:53:49 -08:00
Linus Torvalds a052f44736 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/x86
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/x86:
  x86: enable "make ARCH=x86"
  x86: do not use $(ARCH) when not needed
  kconfig: use $K64BIT to set 64BIT with all*config targets
  kconfig: add helper to set config symbol from environment variable
  kconfig: factor out code in confdata.c
  x86: move the rest of the menu's to Kconfig
  x86: move all simple arch settings to Kconfig
  x86: copy x86_64 specific Kconfig symbols to Kconfig.i386
  x86: add X86_64 dependency to x86_64 specific symbols in Kconfig.x86_64
  x86: add X86_32 dependency to i386 specific symbols in Kconfig.i386
  x86: arch/x86/Kconfig.cpu unification
  x86: start unification of arch/x86/Kconfig.*
  x86: unification of cfufreq/Kconfig
2007-11-14 18:53:11 -08:00
Linus Torvalds 6f37ac793d Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NET]: rt_check_expire() can take a long time, add a cond_resched()
  [ISDN] sc: Really, really fix warning
  [ISDN] sc: Fix sndpkt to have the correct number of arguments
  [TCP] FRTO: Clear frto_highmark only after process_frto that uses it
  [NET]: Remove notifier block from chain when register_netdevice_notifier fails
  [FS_ENET]: Fix module build.
  [TCP]: Make sure write_queue_from does not begin with NULL ptr
  [TCP]: Fix size calculation in sk_stream_alloc_pskb
  [S2IO]: Fixed memory leak when MSI-X vector allocation fails
  [BONDING]: Fix resource use after free
  [SYSCTL]: Fix warning for token-ring from sysctl checker
  [NET] random : secure_tcp_sequence_number should not assume CONFIG_KTIME_SCALAR
  [IWLWIFI]: Not correctly dealing with hotunplug.
  [TCP] FRTO: Plug potential LOST-bit leak
  [TCP] FRTO: Limit snd_cwnd if TCP was application limited
  [E1000]: Fix schedule while atomic when called from mii-tool.
  [NETX]: Fix build failure added by 2.6.24 statistics cleanup.
  [EP93xx_ETH]: Build fix after 2.6.24 NAPI changes.
  [PKT_SCHED]: Check subqueue status before calling hard_start_xmit
2007-11-14 18:51:48 -08:00
Jesper Nilsson 2f1f53bdc6 CRISv10 fasttimer: Scrap INLINE and name timeval_cmp better
Scrap the local __INLINE__ macro, and rename timeval_cmp to fasttime_cmp.

Inline macro was completely unnecessary since the macro was defined
locally to be inline.
timeval_cmp was inaccurately named since it does comparison on
struct fasttimer_t and not on struct timeval.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:47 -08:00
Jesper Nilsson 2e2cd8bad6 CRISv10 memset library add lineendings to asm
Add \n\ at end of lines inside asm statement to avoid warning.

No change except adding \n\ to end of line and correcting
whitespace has been done.
Removes warning about multi-line string literals when compiling
arch/cris/arch-v10/lib/memset.c

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:47 -08:00
Jesper Nilsson 341ac6e4be CRISv10 string library add lineendings to asm
Add \n\ at end of lines inside asm statement to avoid warning.

No change except adding \n\ to end of line and correcting
whitespace has been done.
Removes warning about multi-line string literals when compiling
arch/cris/arch-v10/lib/string.c

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:47 -08:00
Jesper Nilsson 2b05d2b3b4 CRISv10 usercopy library add lineendings to asm
Removes warning when compiling arch/cris/arch-v10/lib/usercopy.c

No change except adding \n\ on the end of the lines has been done.
Removes warning about multi-line string literals.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:47 -08:00
Jesper Nilsson 3eed639364 CRISv10 Ethernet declare mac fix
Declare mac using DECLARE_MAC_BUF for use when calling print_mac().

This fixes compile error where mac was undeclared.
Also, remove unused variable i.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:47 -08:00
Jesper Nilsson ebd33e11c3 CRIS tlb.h should include linux/pagemap.h
Include linux/pagemap.h for release_pages and page_cache_release.

Fixes compilation error in arch/cris/mm/init.c when CONFIG_SWAP is unset.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:47 -08:00
Jesper Nilsson 57c230a873 CRISv32: add cache flush operations
These are needed due to a cache bug, and can be used to make sure that the
DMA descriptors are flushed to memory and can be safely handled by DMA.

flush_dma_descr - Flush one DMA descriptor.
flush_dma_list - Flush a complete list of DMA descriptors.
cris_flush_cache - Flush the complete cache.
cris_flush_cache_range - Flush only the specified range

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:47 -08:00
Jesper Nilsson d8e5219f9f CRISv10 improve and bugfix fasttimer
Improve and bugfix CRIS v10 fast timers.

- irq_handler_t now only takes two arguments.
- Keep interrupts disabled as long as we have a reference to the
  fasttimer list and only enable them while doing the callback.
  del_fast_timer may be called from other interrupt context.
- Fix bug where debug code could return without calling local_irq_restore.
- Use jiffies instead of usec (change from struct timeval to fasttime_t).
- Don't initialize static variables to zero.
- Remove obsolete #ifndef DECLARE_WAITQUEUE code.
- fast_timer_init should be __initcall.
- Change status/debug variables to unsigned.
- Remove CVS log and CVS id.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:47 -08:00
Jesper Nilsson 3244c77bd3 CRISv10: fix timer interrupt parameters
Fix timer interrupt parameters for CRIS v10.

- irq_handler_t only takes two arguments, use get_irq_regs to get
  regs for profiling.
- Call update_process_times.
- Remove CVS tag.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:47 -08:00
Jesper Nilsson 1b8be1d82d CRIS: remove MTD_AMSTD and MTD_OBSOLETE_CHIPS take two
Remove MTD_AMDSTD and MTD_OBSOLETE_CHIPS from defconfig, Kconfig and code,
instead we'll use MTD_CFI or MTD_JEDECPROBE.

[akpm@linux-foundation.org: codingl-style cleanups]
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:46 -08:00
Jesper Nilsson 77accbf505 CRISv10 serial driver rewrite
New and improved serial driver for CRISv10, take three, with improvements
suggested by Jiri Slaby.

- Call wait_event_interruptible with a _correct_ and sensible condition.
- Removed superfluous test of info->flags & ASYNC_CLOSING, since that is done
  by wait_event_interruptible.
- Moved common code for deregistering DMA and IRQ to deinit_port function.
- Use setup_timer when initializing flush_timer.
- Convert bit-field for uses_dma_in and uses_dma_out to regular bytes.
- Removed CVS tags.
- Removed defines and comments for CRIS_BUF_SIZE and TTY_THRESHOLD_THROTTLE
  (no longer used).
- Cleaned up code to pass checkpatch.
- Add crisv10.h header file.
- Merge of CRISv10 from Axis internal CVS.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Reviewed-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:46 -08:00
Jesper Nilsson 4b7e888933 CRIS don't include bitops.h in posix_types.h
In file included from include/asm/byteorder.h:23,
                 from include/asm-generic/bitops/le.h:5,
                 from include/asm-generic/bitops/ext2-non-atomic.h:4,
                 from include/asm/bitops.h:163,
                 from include/linux/bitops.h:17,
                 from include/asm/posix_types.h:55,
                 from include/linux/posix_types.h:47,
                 from include/linux/types.h:11,
                 from include/linux/capability.h:16,
                 from include/linux/sched.h:49,
                 from arch/cris/kernel/asm-offsets.c:1:
include/linux/byteorder/little_endian.h:43: parse error before "__cpu_to_le64p"
include/linux/byteorder/little_endian.h:44: warning: return type defaults to `int'
include/linux/byteorder/little_endian.h: In function `__cpu_to_le64p':
include/linux/byteorder/little_endian.h:45: `__le64' undeclared (first use in this function)

Remove include of asm/bitops.h, not needed here, corrects compilation error
(__le64 undeclared).

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:46 -08:00
Alex Unleashed 16ad1b4910 cris: ARRAY_SIZE() cleanup
I'm converting most array size calculations under arch/ to use
ARRAY_SIZE().  This is the patch for CRIS.

Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:46 -08:00
Jesper Nilsson f150f35232 cris build fixes: defconfig updates
Remove some unused config lines, and add some others that needs to be off
for a succesful compile. This is the minimal set of changes for 2.6.23.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:46 -08:00
Jesper Nilsson 5af26b1862 cris build fixes: fix crisksyms.c
- Add __negdi2 to exported symbols.
- Remove string functions from exported symbols.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:46 -08:00
Jesper Nilsson a8e2a8b227 cris build fixes: setup.c needs param.h
Include linux/param.h for HZ.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:45 -08:00
Jesper Nilsson 0188e60321 cris build fixes: fixes in arch/cris/kernel/time.c
- Remove debug print.
- Change #if to #ifdef to avoid compile time warning if CONFIG_PROFILING
  isn't set.
- Number of parameters to profile_tick has changed, drop the regs parameter.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:45 -08:00
Jesper Nilsson 7b275523ab cris build fixes: corrected and improved NMI and IRQ handling
Corrects compile errors and the following:

- Remove oldset parameter from do_signal and do_notify_resume.

- Modified to fit new consolidated IRQ handling code.

- Reverse check order between external nmi and watchdog nmi to avoid false
  watchdog oops in case of a glitch on the nmi pin.

- Return from an pin-generated NMI the same way as for other interrupts.

- Moved blocking of ethernet rx/tx irq from ethernet interrupt handler to
  low-level asm interrupt handlers.  Fixed in the multiple interrupt
  handler also.

- Add space for thread local storage in thread_info struct.

- Add NO_DMA to Kconfig, and include arch specific Kconfig using arch
  independent path. Include subsystem Kconfigs for pcmcia, usb, i2c,
  rtc and pci.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:45 -08:00
Andrew Morton 633edf5a4f cris-build-fixes-update-eth_v10c-ethernet-driver-fix
Fix locking bug noted by  Roel Kluin <12o3l@tiscali.nl>.

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:45 -08:00
Jesper Nilsson bafef0ae9d cris build fixes: update eth_v10.c ethernet driver
New (updated) version of ethernet driver for cris v10.

- First steps to simplify and make the MII code more similar
  between the etrax100 and etraxfs ports.

- Start the transmit queue before enabling tx interrupts
  to avoid race with the first frame.

- Flip the comparition statement to stick to physical addresses
  to avoid phys_to_virt mapping a potential null pointer.
  This was not an error but the change simplifies debugging
  of address-space mappings.

- Made myPrevRxDesc local to e100_rx since it was only used there.
  Fixed out of memory handling in e100_rx.  If dev_alloc_skb() fails
  persistently the system is hosed anyway but at least it won't
  loop in an interrupt handler.

- Correct some code formatting issues.

- Add defines SET_ETH_ENABLE_LEDS, SET_ETH_DISABLE_LEDS
  and SET_ETH_AUTONEG used in new cris v10 ethernet driver.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:45 -08:00
Jesper Nilsson eda35b64a7 cris build fixes: add baud rate defines
Add missing defines for (unsupported) baud rates.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:45 -08:00
Jesper Nilsson 5978e791fe cris build fixes: sys_cris.c needs fs.h
Include linux/fs.h, needed for do_pipe.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:45 -08:00
Jesper Nilsson eb2746ddc3 cris build fixes: irq fixes
- New file include/asm-cris/irq_regs.h.
- Change handling of registers for do_IRQ.
- Add GENERIC_HARDIRQS to Kconfig.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:45 -08:00