aboutsummaryrefslogtreecommitdiffstats
path: root/lib (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2007-02-13[POWERPC] spufs: avoid accessing kernel memory through mmapped /mem nodeMasato Noguchi1-0/+3
I found an exploit in current kernel. Currently, there is no range check about mmapping "/mem" node in spufs. Thus, an application can access privilege memory region. In case this kernel already worked on a public server, I send this information only here. If there are such servers in somewhere, please replace it, ASAP. Signed-off-by: Masato Noguchi <Masato.Noguchi@jp.sony.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spu sched: static timeslicing for SCHED_RR contextsChristoph Hellwig4-3/+56
For SCHED_RR tasks we can do some really trivial timeslicing. Basically we fire up a time for every scheduler tick that searches for a higher or same priority thread that is on the runqueue and if there is one context switches to it. Because we can't lock spus from timer context we actually run this from a delayed runqueue instead of a timer. A nice optimization would be to skip the actual priority bitmap search when there are less contexts than physical spus available. To implement this I need a so far unpublished patch from Andre, and it will be added after we have that patch in. Note that right now we only do the time slicing for SCHED_RR tasks. The code would work for SCHED_OTHER tasks aswell, but their prio value is defered from the one the PPU thread has at time of spu_run, and using this for spu scheduling decisions would make the code very unfair. SCHED_OTHER support will be enabled once we the spu scheduler knows how to calculcate cpu_context.prio (very soon) Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spu sched: use DECLARE_BITMAPChristoph Hellwig1-2/+1
use DECLARE_BITMAP in the spu scheduler instead of reimplementing it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spu sched: forced preemption at executionChristoph Hellwig3-0/+76
If we start a spu context with realtime priority we want it to run immediately and not wait until some other lower priority thread has finished. Try to find a suitable victim and use it's spu in this case. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spu sched: update some commentsChristoph Hellwig1-8/+8
Give spu_yield a kerneldoc comment and remove the old comment documenting spu_activate, spu_deactive and spu_yield as all of them now have descriptive kerneldoc comments of their own. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spu sched: simplity spu_remove_from_active_listChristoph Hellwig1-29/+15
If we call spu_remove_from_active_list that spu is always guaranteed to be on the active list and in runnable state, so we can simply do a list_del to remove it and unconditionally take the was_active codepath. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: optimize spu_runChristoph Hellwig5-12/+23
There is no need to directly wake up contexts in spu_activate when called from spu_run, so add a flag to surpress this wakeup. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: runqueue simplificationChristoph Hellwig2-67/+93
This is the biggest patch in this series, and it reworks the guts of the spu scheduler runqueue mechanism: - instead of embedding a waitqueue in the runqueue there is now a simple doubly-linked list, the actual wakeups happen by reusing the stop_wq in the spu context (maybe we should rename it one day) - spu_free and spu_prio_wakeup are merged into a single spu_reschedule function - various functionality is split out into small helpers, and kerneldoc comments are added in various places to document what's going on. - spu_activate is rewritten into a tight loop by removing test for various impossible conditions and using the infrastructure in this patch. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: move prio to spu_contextChristoph Hellwig5-9/+6
It doesn't make any sense to have a priority field in the physical spu structure. Move it into the spu context instead. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: state_mutex cleanupChristoph Hellwig3-53/+64
Various cleanups in code surrounding the state semaphore: - inline spu_acquire/spu_release - cleanup spu_acquire_* and add kerneldoc comments to these functions - remove spu_release_exclusive and replace it with spu_release Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[IPSEC]: make sit use the xfrm4_tunnel_registerKazunori MIYAZAWA2-12/+19
This patch makes sit use xfrm4_tunnel_register instead of inet_add_protocol. It solves conflict of sit device with inter address family IPsec tunnel. Signed-off-by: Kazunori MIYAZAWA <miyazawa@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-13[IPSEC]: Changing API of xfrm4_tunnel_register.Kazunori MIYAZAWA5-14/+79
This patch changes xfrm4_tunnel register and deregister interface to prepare for solving the conflict of device tunnels with inter address family IPsec tunnel. Signed-off-by: Kazunori MIYAZAWA <miyazawa@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-13[POWERPC] spufs: simplify state_mutexChristoph Hellwig3-30/+17
The r/w semaphore to lock the spus was overkill and can be replaced with a mutex to make it faster, simpler and easier to debug. It also helps to allow making most spufs interruptible in future patches. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: sched.c cleanupsChristoph Hellwig1-37/+61
Various cleanups to sched.c that don't change the global control flow: - add kerneldoc comments to various functions - add spu_ prefixes to various functions - add/remove context from the runqueue in bind/unbind_context as it's part of the logical operation - add a call to put_active_spu to spu_unbind_contex as it's logically part of the unbind operation Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: bind_context sets SPU_STATE_RUNNABLEChristoph Hellwig2-2/+2
Only bind_context/unbind_context change the spu context state. Thus we can move all assignents of SPU_STATE_RUNNABLE into bind_context, which parallels the unbind side aswell. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: remove superfluous SPU_STATE_SAVED assignmentsChristoph Hellwig2-4/+1
unbind_context already sets the context state to SPU_STATE_SAVED, thus the spu_deactivate callers don't need to do it again. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: remove empty last line in run.cChristoph Hellwig1-1/+0
Remove the empty last line in arch/powerpc/platforms/cell/spufs/run.c. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: remove SPU_CONTEXT_PREEMPTChristoph Hellwig1-3/+0
Remove the SPU_CONTEXT_PREEMPT define. It's unused and won't be used in this form after the scheduler rework. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[TCP]: Prevent pseudo garbage in SYN's advertized windowIlpo Järvinen1-2/+2
TCP may advertize up to 16-bits window in SYN packets (no window scaling allowed). At the same time, TCP may have rcv_wnd (32-bits) that does not fit to 16-bits without window scaling resulting in pseudo garbage into advertized window from the low-order bits of rcv_wnd. This can happen at least when mss <= (1<<wscale) (see tcp_select_initial_window). This patch fixes the handling of SYN advertized windows (compile tested only). In worst case (which is unlikely to occur though), the receiver advertized window could be just couple of bytes. I'm not sure that such situation would be handled very well at all by the receiver!? Fortunately, the situation normalizes after the first non-SYN ACK is received because it has the correct, scaled window. Alternatively, tcp_select_initial_window could be changed to prevent too large rcv_wnd in the first place. [ tcp_make_synack() has the same bug, and I've added a fix for that to this patch -DaveM ] Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-13[NET_SCHED]: sch_hfsc: replace ASSERT macro by WARN_ONPatrick McHardy1-14/+1
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-13[BRIDGE] br_if: Fix oops in port_carrier_checkJarek Poplawski2-3/+9
Signed-off-by: Jarek Poplawski <jarkao2@o2.pl> Acked-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-13[NETFILTER]: Clear GSO bits for TCP reset packetHerbert Xu1-0/+4
The TCP reset packet is copied from the original. This includes all the GSO bits which do not apply to the new packet. So we should clear those bits. Spotted by Patrick McHardy. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-13[TG3]: Update copyright, version, and reldate.Michael Chan1-3/+3
Update version to 3.73. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-13[TG3]: Add some tx timeout debug messages.Michael Chan1-1/+11
Print the most useful information during tx timeout to help debug. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-13[TG3]: Use constant for PHY register 0x1e.Michael Chan2-4/+7
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-13[TG3]: Power down 5704 serdes transceiver when shutting down.Michael Chan1-1/+11
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-13[TG3]: 5906 doesn't need to switch to slower clock.Michael Chan1-1/+2
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-13[TG3]: 5722/5756 don't need PHY jitter workaround.Michael Chan1-1/+3
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-13[TG3]: Use lower DMA watermark for 5703.Michael Chan1-1/+7
Set DMA read watermark to 4 on 5703 in PCIX mode. This is needed to prevent some tx timeouts. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-13[TG3]: Save MSI state before suspend.Michael Chan1-0/+3
This fixes the following problem: http://bugzilla.kernel.org/show_bug.cgi?id=7969 The MSI state needs to be saved during suspend. PCI state saved during tg3_init_one() does not contain valid MSI state because MSI hasn't been enabled. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-13Revert "[PATCH] Fix d_path for lazy unmounts"Linus Torvalds1-80/+70
This reverts commit eb3dfb0cb1f4a44e2d0553f89514ce9f2a9fcaf1. It causes some strange Gnome problem with dbus-daemon getting stuck, so we'll revert it until that problem is understood. Reported by both walt and Greg KH, who both independently git-bisected the problem to this commit. Andreas is looking at it. Reported-by: walt <wa1ter@myrealbox.com> Reported-by: Greg KH <greg@kroah.com> Acked-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-13[POWERPC] 83xx: Updated mpc834x_itx_defconfigTimur Tabi1-172/+60
This patch updates the defconfig for the MPC8349E-mITX. In addition to picking up changes from recent kernels, disables support for e100 (which doesn't ship with the system), turns off input devices, turns on some I2C support, turns off HW monitoring (HW not yet supported), turns off OHCI USB (not used), turns off USB gadget support (HW not yet supported), turns on DOS FS support, and turns off kernel debugging. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-13[POWERPC] 83xx: Add support for MPC8349E-mITX-GPTimur Tabi2-0/+1361
This patch adds a defconfig and a DTS for the MPC8349E-mITX-GP, a variant of the MPC8349E-mITX. USB is disabled because the only USB port is not setup properly by firmware/kernel Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>