]> err.no Git - linux-2.6/log
linux-2.6
17 years ago[NETFILTER]: Fix non-ANSI func. decl.
Randy Dunlap [Thu, 7 Dec 2006 09:17:24 +0000 (01:17 -0800)]
[NETFILTER]: Fix non-ANSI func. decl.

Fix non-ANSI function declaration:
net/netfilter/nf_conntrack_core.c:1096:25: warning: non-ANSI function declaration of function 'nf_conntrack_flush'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TG3]: Identify Serdes devices more clearly.
Michael Chan [Thu, 7 Dec 2006 08:24:09 +0000 (00:24 -0800)]
[TG3]: Identify Serdes devices more clearly.

Change the message to more clearly identify Serdes devices.

Update version to 3.70.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TG3]: Use msleep.
Michael Chan [Thu, 7 Dec 2006 08:23:25 +0000 (00:23 -0800)]
[TG3]: Use msleep.

Change some udelay() in some eeprom functions to msleep().  Eeprom
related functions are always called from sleepable context.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TG3]: Use netif_msg_*.
Michael Chan [Thu, 7 Dec 2006 08:22:54 +0000 (00:22 -0800)]
[TG3]: Use netif_msg_*.

Use netif_msg_* to turn on or off some messages.

Based on Stephen Hemminger's initial patch.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TG3]: Allow partial speed advertisement.
Michael Chan [Thu, 7 Dec 2006 08:21:48 +0000 (00:21 -0800)]
[TG3]: Allow partial speed advertisement.

Honor the advertisement bitmask from ethtool.  We used to always
advertise the full capability when autoneg was set to on.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TG3]: Add TG3_FLG2_IS_NIC flag.
Michael Chan [Thu, 7 Dec 2006 08:21:14 +0000 (00:21 -0800)]
[TG3]: Add TG3_FLG2_IS_NIC flag.

Add Tg3_FLG2_IS_NIC flag to unambiguously determine whether the
device is NIC or onboard.  Previously, the EEPROM_WRITE_PROT flag was
overloaded to also mean onboard.  With the separation, we can
support some devices that are onboard but do not use eeprom write
protect.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TG3]: Add 5787F device ID.
Michael Chan [Thu, 7 Dec 2006 08:20:22 +0000 (00:20 -0800)]
[TG3]: Add 5787F device ID.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TG3]: Fix Phy loopback.
Michael Chan [Thu, 7 Dec 2006 08:19:40 +0000 (00:19 -0800)]
[TG3]: Fix Phy loopback.

Phy loopback on most 10/100 devices need to be run in 1Gbps mode in
GMII mode.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[WANROUTER]: Kill kmalloc debugging code.
David S. Miller [Thu, 7 Dec 2006 08:18:22 +0000 (00:18 -0800)]
[WANROUTER]: Kill kmalloc debugging code.

It duplicates what SLAB debug can do already.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP] inet_twdr_hangman: Delete unnecessary memory barrier().
David S. Miller [Thu, 7 Dec 2006 08:12:30 +0000 (00:12 -0800)]
[TCP] inet_twdr_hangman: Delete unnecessary memory barrier().

As per Ralf Baechle's observations, the schedule_work() call
should give enough of a memory barrier, so the explicit one
here is totally unnecessary.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: Memory barrier cleanups
Ralf Baechle [Thu, 7 Dec 2006 08:11:33 +0000 (00:11 -0800)]
[NET]: Memory barrier cleanups

I believe all the below memory barriers only matter on SMP so
therefore the smp_* variant of the barrier should be used.

I'm wondering if the barrier in net/ipv4/inet_timewait_sock.c should be
dropped entirely.  schedule_work's implementation currently implies a
memory barrier and I think sane semantics of schedule_work() should imply
a memory barrier, as needed so the caller shouldn't have to worry.
It's not quite obvious why the barrier in net/packet/af_packet.c is
needed; maybe it should be implied through flush_dcache_page?

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPSEC]: Fix inetpeer leak in ipv4 xfrm dst entries.
David S. Miller [Thu, 7 Dec 2006 07:45:15 +0000 (23:45 -0800)]
[IPSEC]: Fix inetpeer leak in ipv4 xfrm dst entries.

We grab a reference to the route's inetpeer entry but
forget to release it in xfrm4_dst_destroy().

Bug discovered by Kazunori MIYAZAWA <kazunori@miyazawa.org>

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoaudit: disable ipsec auditing when CONFIG_AUDITSYSCALL=n
Joy Latten [Thu, 30 Nov 2006 21:50:43 +0000 (15:50 -0600)]
audit: disable ipsec auditing when CONFIG_AUDITSYSCALL=n

Disables auditing in ipsec when CONFIG_AUDITSYSCALL is
disabled in the kernel.

Also includes a bug fix for xfrm_state.c as a result of
original ipsec audit patch.

Signed-off-by: Joy Latten <latten@austin.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoaudit: Add auditing to ipsec
Joy Latten [Mon, 27 Nov 2006 19:11:54 +0000 (13:11 -0600)]
audit: Add auditing to ipsec

An audit message occurs when an ipsec SA
or ipsec policy is created/deleted.

Signed-off-by: Joy Latten <latten@austin.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IRDA] irlan: Fix compile warning when CONFIG_PROC_FS=n
Randy Dunlap [Thu, 7 Dec 2006 04:10:07 +0000 (20:10 -0800)]
[IRDA] irlan: Fix compile warning when CONFIG_PROC_FS=n

include/net/irda/irlan_filter.h:31: warning: 'struct seq_file' declared inside parameter list
include/net/irda/irlan_filter.h:31: warning: its scope is only this definition or declaration, which is probably not what you want

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IrDA]: Incorrect TTP header reservation
Jeet Chaudhuri [Thu, 7 Dec 2006 04:08:45 +0000 (20:08 -0800)]
[IrDA]: Incorrect TTP header reservation

We must reserve SAR + MAX_HEADER bytes for IrLMP to fit in.

Patch from Jeet Chaudhuri <jeetlinux@yahoo.co.in>

Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IrDA]: PXA FIR code device model conversion
Paul Sokolovsky [Thu, 7 Dec 2006 04:07:59 +0000 (20:07 -0800)]
[IrDA]: PXA FIR code device model conversion

pxaficp_ir.c was not converted to the device model framework.

Signed-off-by: Paul Sokolovsky <pmiscml@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[GENETLINK]: Fix misplaced command flags.
Jamal Hadi Salim [Thu, 7 Dec 2006 04:06:25 +0000 (20:06 -0800)]
[GENETLINK]: Fix misplaced command flags.

The command flags for dump and do were swapped..

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETLIK]: Add a pointer to the Generic Netlink wiki page.
Paul Moore [Tue, 5 Dec 2006 21:49:56 +0000 (13:49 -0800)]
[NETLIK]: Add a pointer to the Generic Netlink wiki page.

Add a pointer to the OSDL wiki page on Generic Netlink.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPV6] RAW: Don't release unlocked sock.
Masahide NAKAMURA [Tue, 5 Dec 2006 21:48:27 +0000 (13:48 -0800)]
[IPV6] RAW: Don't release unlocked sock.

When user builds IPv6 header and send it through raw socket, kernel
tries to release unlocked sock. (Kernel log shows
"BUG: bad unlock balance detected" with enabled debug option.)

The lock is held only for non-hdrincl sock in this function
then this patch fix to do nothing about lock for hdrincl one.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPV6]: Repair IPv6 Fragments
YOSHIFUJI Hideaki [Tue, 5 Dec 2006 21:47:21 +0000 (13:47 -0800)]
[IPV6]: Repair IPv6 Fragments

The commit "[IPV6]: Use kmemdup" (commit-id:
af879cc704372ef762584e916129d19ffb39e844) broke IPv6 fragments.

Bug was spotted by Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET_SCHED]: cls_fw: fix NULL pointer dereference
Patrick McHardy [Tue, 5 Dec 2006 21:46:13 +0000 (13:46 -0800)]
[NET_SCHED]: cls_fw: fix NULL pointer dereference

When the first fw classifier is initialized, there is a small window
between the ->init() and ->change() calls, during which the classifier
is active but not entirely set up and tp->root is still NULL (->init()
does nothing).

When a packet is queued during this window a NULL pointer dereference
occurs in fw_classify() when trying to dereference head->mask;

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: bridge netfilter: deal with martians correctly
Bart De Schuymer [Tue, 5 Dec 2006 21:45:21 +0000 (13:45 -0800)]
[NETFILTER]: bridge netfilter: deal with martians correctly

The attached patch resolves an issue where a IP DNATed packet with a
martian source is forwarded while it's better to drop it. It also
resolves messages complaining about ip forwarding being disabled while
it's actually enabled. Thanks to lepton <ytht.net@gmail.com> for
reporting this problem.

This is probably a candidate for the -stable release.

Signed-off-by: Bart De Schuymer <bdschuym@pandora.be>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: nf_conntrack: Don't try to find clashed expectation
Yasuyuki Kozakai [Tue, 5 Dec 2006 21:44:57 +0000 (13:44 -0800)]
[NETFILTER]: nf_conntrack: Don't try to find clashed expectation

The original code continues loop to find expectation in list if the master
conntrack of the found expectation is unconfirmed. But it never success
in that case, because nf_conntrack_expect_related() never insert
clashed expectation to the list.

This stops loop in that case.

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: nf_conntrack: fix warning in PPTP helper
Yasuyuki Kozakai [Tue, 5 Dec 2006 21:44:31 +0000 (13:44 -0800)]
[NETFILTER]: nf_conntrack: fix warning in PPTP helper

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: Fix iptables compat hook validation
Dmitry Mishin [Tue, 5 Dec 2006 21:44:07 +0000 (13:44 -0800)]
[NETFILTER]: Fix iptables compat hook validation

In compat mode, matches and targets valid hooks checks always successful due
to not initialized e->comefrom field yet. This patch separates this checks from
translation code and moves them after mark_source_chains() call, where these
marks are initialized.

Signed-off-by: Dmitry Mishin <dim@openvz.org>
Signed-off-by; Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: Fix {ip,ip6,arp}_tables hook validation
Dmitry Mishin [Tue, 5 Dec 2006 21:43:50 +0000 (13:43 -0800)]
[NETFILTER]: Fix {ip,ip6,arp}_tables hook validation

Commit 590bdf7fd2292b47c428111cb1360e312eff207e introduced a regression
in match/target hook validation. mark_source_chains builds a bitmask
for each rule representing the hooks it can be reached from, which is
then used by the matches and targets to make sure they are only called
from valid hooks. The patch moved the match/target specific validation
before the mark_source_chains call, at which point the mask is always zero.

This patch returns back to the old order and moves the standard checks
to mark_source_chains. This allows to get rid of a special case for
standard targets as a nice side-effect.

Signed-off-by: Dmitry Mishin <dim@openvz.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO] dm-crypt: Make iv_gen_private a union
Herbert Xu [Tue, 5 Dec 2006 21:41:52 +0000 (13:41 -0800)]
[CRYPTO] dm-crypt: Make iv_gen_private a union

Rather than stuffing integers into pointers with casts, let's use
a union.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO] lrw: round --> lrw_round
David S. Miller [Tue, 5 Dec 2006 04:20:05 +0000 (20:20 -0800)]
[CRYPTO] lrw: round --> lrw_round

Fixes:

crypto/lrw.c:99: warning: conflicting types for built-in function â€˜round’

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO] cryptoloop: Select CRYPTO_CBC
Herbert Xu [Sat, 2 Dec 2006 03:36:03 +0000 (14:36 +1100)]
[CRYPTO] cryptoloop: Select CRYPTO_CBC

As CBC is the default chaining method for cryptoloop, we should select
it from cryptoloop to ease the transition.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] tcrypt: LRW test vectors
Rik Snel [Wed, 29 Nov 2006 08:01:41 +0000 (19:01 +1100)]
[CRYPTO] tcrypt: LRW test vectors

Do modprobe tcrypt mode=10 to check the included test vectors, they are
from: http://grouper.ieee.org/groups/1619/email/pdf00017.pdf and from
http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html.

To make the last test vector fit, I had to increase the buffer size of
input and result to 512 bytes.

Signed-off-by: Rik Snel <rsnel@cube.dyndns.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] lrw: Liskov Rivest Wagner, a tweakable narrow block cipher mode
Rik Snel [Sat, 25 Nov 2006 22:43:10 +0000 (09:43 +1100)]
[CRYPTO] lrw: Liskov Rivest Wagner, a tweakable narrow block cipher mode

Main module, this implements the Liskov Rivest Wagner block cipher mode
in the new blockcipher API. The implementation is based on ecb.c.

The LRW-32-AES specification I used can be found at:
http://grouper.ieee.org/groups/1619/email/pdf00017.pdf

It implements the optimization specified as optional in the
specification, and in addition it uses optimized multiplication
routines from gf128mul.c.

Since gf128mul.[ch] is not tested on bigendian, this cipher mode
may currently fail badly on bigendian machines.

Signed-off-by: Rik Snel <rsnel@cube.dyndns.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] lib: table driven multiplications in GF(2^128)
Rik Snel [Wed, 29 Nov 2006 07:59:44 +0000 (18:59 +1100)]
[CRYPTO] lib: table driven multiplications in GF(2^128)

A lot of cypher modes need multiplications in GF(2^128). LRW, ABL, GCM...
I use functions from this library in my LRW implementation and I will
also use them in my ABL (Arbitrary Block Length, an unencumbered (correct
me if I am wrong, wide block cipher mode).

Elements of GF(2^128) must be presented as u128 *, it encourages automatic
and proper alignment.

The library contains support for two different representations of GF(2^128),
see the comment in gf128mul.h. There different levels of optimization
(memory/speed tradeoff).

The code is based on work by Dr Brian Gladman. Notable changes:
- deletion of two optimization modes
- change from u32 to u64 for faster handling on 64bit machines
- support for 'bbe' representation in addition to the, already implemented,
  'lle' representation.
- move 'inline void' functions from header to 'static void' in the
  source file
- update to use the linux coding style conventions

The original can be found at:
http://fp.gladman.plus.com/AES/modes.vc8.19-06-06.zip

The copyright (and GPL statement) of the original author is preserved.

Signed-off-by: Rik Snel <rsnel@cube.dyndns.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] lib: some common 128-bit block operations, nicely centralized
Rik Snel [Sun, 29 Oct 2006 00:02:07 +0000 (11:02 +1100)]
[CRYPTO] lib: some common 128-bit block operations, nicely centralized

128bit is a common blocksize in linux kernel cryptography, so it helps to
centralize some common operations.

The code, while mostly trivial, is based on a header file mode_hdr.h in
http://fp.gladman.plus.com/AES/modes.vc8.19-06-06.zip

The original copyright (and GPL statement) of the original author,
Dr Brian Gladman, is preserved.

Signed-off-by: Rik Snel <rsnel@cube.dyndns.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] api: Remove unused functions
Adrian Bunk [Wed, 22 Nov 2006 06:55:00 +0000 (17:55 +1100)]
[CRYPTO] api: Remove unused functions

This patch removes the following no longer used functions:
- api.c: crypto_alg_available()
- digest.c: crypto_digest_init()
- digest.c: crypto_digest_update()
- digest.c: crypto_digest_final()
- digest.c: crypto_digest_digest()

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] geode: Make needlessly global geode_aes_crypt() static
Adrian Bunk [Fri, 17 Nov 2006 02:43:55 +0000 (13:43 +1100)]
[CRYPTO] geode: Make needlessly global geode_aes_crypt() static

On Tue, Nov 14, 2006 at 01:41:25AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.19-rc5-mm2:
>...
>  git-cryptodev.patch
>...
>  git trees
>...

This patch makes the needlessly global geode_aes_crypt() static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] xcbc: Make needlessly global code static
Adrian Bunk [Fri, 17 Nov 2006 02:43:04 +0000 (13:43 +1100)]
[CRYPTO] xcbc: Make needlessly global code static

On Tue, Nov 14, 2006 at 01:41:25AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.19-rc5-mm2:
>...
>  git-cryptodev.patch
>...
>  git trees
>...

This patch makes some needlessly global code static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[IPSEC]: Add support for AES-XCBC-MAC
Kazunori MIYAZAWA [Sat, 28 Oct 2006 03:21:22 +0000 (13:21 +1000)]
[IPSEC]: Add support for AES-XCBC-MAC

The glue of xfrm.

Signed-off-by: Kazunori MIYAZAWA <miyazawa@linux-ipv6.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] tcrypt: Add test vectors of AES_XCBC
Kazunori MIYAZAWA [Sat, 28 Oct 2006 03:18:53 +0000 (13:18 +1000)]
[CRYPTO] tcrypt: Add test vectors of AES_XCBC

est vectors of XCBC with AES-128.

Signed-off-by: Kazunori MIYAZAWA <miyazawa@linux-ipv6.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] xcbc: New algorithm
Kazunori MIYAZAWA [Sat, 28 Oct 2006 03:15:24 +0000 (13:15 +1000)]
[CRYPTO] xcbc: New algorithm

This is core code of XCBC.

XCBC is an algorithm that forms a MAC algorithm out of a cipher algorithm.
For example, AES-XCBC-MAC is a MAC algorithm based on the AES cipher
algorithm.

Signed-off-by: Kazunori MIYAZAWA <miyazawa@linux-ipv6.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[BLOCK] dm-crypt: Align IV to u64 for essiv
Herbert Xu [Sat, 2 Sep 2006 22:58:41 +0000 (08:58 +1000)]
[BLOCK] dm-crypt: Align IV to u64 for essiv

This patch makes the IV u64-aligned since essiv does a u64 store to it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[BLOCK] dm-crypt: benbi IV, big endian narrow block count for LRW-32-AES
Rik Snel [Sat, 2 Sep 2006 22:56:39 +0000 (08:56 +1000)]
[BLOCK] dm-crypt: benbi IV, big endian narrow block count for LRW-32-AES

LRW-32-AES needs a certain IV. This IV should be provided dm-crypt.
The block cipher mode could, in principle generate the correct IV from
the plain IV, but I think that it is cleaner to supply the right IV
directly.

The sector -> narrow block calculation uses a shift for performance reasons.
This shift is computed in .ctr and stored in cc->iv_gen_private (as a void *).

Signed-off-by: Rik Snel <rsnel@cube.dyndns.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[PATCH] crypto: Add support for the Geode LX AES hardware
Jordan Crouse [Wed, 4 Oct 2006 08:48:57 +0000 (18:48 +1000)]
[PATCH] crypto: Add support for the Geode LX AES hardware

Add a driver to support the AES hardware on the Geode LX processor.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[XFRM] Optimize SA dumping
Jamal Hadi Salim [Tue, 5 Dec 2006 04:03:35 +0000 (20:03 -0800)]
[XFRM] Optimize SA dumping

Same comments as in "[XFRM] Optimize policy dumping"

The numbers are (20K SAs):

17 years ago[XFRM] Optimize policy dumping
Jamal Hadi Salim [Tue, 5 Dec 2006 04:02:37 +0000 (20:02 -0800)]
[XFRM] Optimize policy dumping

This change optimizes the dumping of Security policies.

1) Before this change ..
speedopolis:~# time ./ip xf pol

real    0m22.274s
user    0m0.000s
sys     0m22.269s

2) Turn off sub-policies

speedopolis:~# ./ip xf pol

real    0m13.496s
user    0m0.000s
sys     0m13.493s

i suppose the above is to be expected

3) With this change ..
speedopolis:~# time ./ip x policy

real    0m7.901s
user    0m0.008s
sys     0m7.896s

17 years ago[XFRM]: Use output device disable_xfrm for forwarded packets
Patrick McHardy [Tue, 5 Dec 2006 03:59:00 +0000 (19:59 -0800)]
[XFRM]: Use output device disable_xfrm for forwarded packets

Currently the behaviour of disable_xfrm is inconsistent between
locally generated and forwarded packets. For locally generated
packets disable_xfrm disables the policy lookup if it is set on
the output device, for forwarded traffic however it looks at the
input device. This makes it impossible to disable xfrm on all
devices but a dummy device and use normal routing to direct
traffic to that device.

Always use the output device when checking disable_xfrm.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[ATM]: Add CPPFLAGS to byteorder.h check
Ben Collins [Tue, 5 Dec 2006 03:33:47 +0000 (19:33 -0800)]
[ATM]: Add CPPFLAGS to byteorder.h check

O= builds produced errors in the shell command because of unfound headers.

Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[GENETLINK]: Move command capabilities to flags.
Jamal Hadi Salim [Tue, 5 Dec 2006 03:31:51 +0000 (19:31 -0800)]
[GENETLINK]: Move command capabilities to flags.

This patch moves command capabilities to command flags. Other than
being cleaner, saves several bytes.
We increment the nlctrl version so as to signal to user space that
to not expect the attributes. We will try to be careful
not to do this too often ;->

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[PATCH] A few small additions and corrections to README
Jesper Juhl [Wed, 6 Dec 2006 23:45:58 +0000 (00:45 +0100)]
[PATCH] A few small additions and corrections to README

Here's a small patch which

 - adds a few archs to the current list of supported platforms.
 - adds a few missing slashes at the end of URLs.
 - adds a few references to additional documentation.
 - adds "make config" to the list of possible configuration targets.
 - makes a few other minor changes.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
[ Ben Nizette <ben.nizette@iinet.net.au> points out AVR32 arch too ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Clean up 'make help' output for documentation targets.
Jesper Juhl [Wed, 6 Dec 2006 23:16:26 +0000 (00:16 +0100)]
[PATCH] Clean up 'make help' output for documentation targets.

Here's a patch that cleans up the "make help" output a bit for the
documentation targets.

Currently the documentation targets are listed completely different than
all the other targets :

  Documentation targets:
    Linux kernel internal documentation in different formats:
    xmldocs (XML DocBook), psdocs (Postscript), pdfdocs (PDF)
    htmldocs (HTML), mandocs (man pages, use installmandocs to install)

with this patch they are more in line with the rest of the output :

  Documentation targets:
   Linux kernel internal documentation in different formats:
    htmldocs        - HTML
    installmandocs  - install man pages generated by mandocs
    mandocs         - man pages
    pdfdocs         - PDF
    psdocs          - Postscript
    xmldocs         - XML DocBook

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Thu, 7 Dec 2006 00:17:37 +0000 (16:17 -0800)]
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] Import updates from i386's i8259.c
  [MIPS] *-berr: Header inclusions for DEC bus error handlers
  [MIPS] Compile __do_IRQ() when really needed
  [MIPS] genirq: use name instead of typename
  [MIPS] Do not use handle_level_irq for ioasic_dma_irq_type.
  [MIPS] pte_offset(dir,addr): parenthesis fix

17 years agoMerge branch 'release' of master.kernel.org:/home/ftp/pub/scm/linux/kernel/git/aegl...
Linus Torvalds [Thu, 7 Dec 2006 00:16:35 +0000 (16:16 -0800)]
Merge branch 'release' of master.kernel.org:/home/ftp/pub/scm/linux/kernel/git/aegl/linux-2.6

* 'release' of master.kernel.org:/home/ftp/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] Fix pci.c kernel compilation breakage.

17 years ago[PATCH] ... and then some more work_struct-induced breakage (ibmvscsi)
Al Viro [Wed, 6 Dec 2006 21:15:22 +0000 (21:15 +0000)]
[PATCH] ... and then some more work_struct-induced breakage (ibmvscsi)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] ... and more work_struct-induced breakage (mips)
Al Viro [Wed, 6 Dec 2006 19:50:06 +0000 (19:50 +0000)]
[PATCH] ... and more work_struct-induced breakage (mips)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] More work_struct induced breakage (s390)
Al Viro [Wed, 6 Dec 2006 19:18:20 +0000 (19:18 +0000)]
[PATCH] More work_struct induced breakage (s390)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years agox86[-64]:Remove 'volatile' from atomic_t
Linus Torvalds [Wed, 6 Dec 2006 22:42:57 +0000 (14:42 -0800)]
x86[-64]:Remove 'volatile' from atomic_t

Any code that relies on the volatile would be a bug waiting to happen
anyway.

Don't encourage people to think that putting 'volatile' on data
structures somehow fixes problems.  We should always use proper locking
(and other serialization) techniques.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Remove 'volatile' from spinlock_types
Art Haas [Wed, 6 Dec 2006 20:45:53 +0000 (14:45 -0600)]
[PATCH] Remove 'volatile' from spinlock_types

This is a resubmission of patches originally created by Ingo Molnar.
The link below is the initial (?) posting of the patch.

  http://marc.theaimsgroup.com/?l=linux-kernel&m=115217423929806&w=2

Remove 'volatile' from spinlock_types as it causes GCC to generate bad
code (see link) and locking should be used on kernel data.

Signed-off-by: Art Haas <ahaas@airmail.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[IA64] Fix pci.c kernel compilation breakage.
Peter Chubb [Tue, 5 Dec 2006 01:25:31 +0000 (12:25 +1100)]
[IA64] Fix pci.c kernel compilation breakage.

The recent change to convert the is_enabled flag in the PCI device to an
atomic count broke the IA64 compilation.

As pcibios_disable_device is only ever called if the reference count
is zero, convert the if to a BUG_ON.

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[MIPS] Import updates from i386's i8259.c
Atsushi Nemoto [Wed, 6 Dec 2006 17:04:17 +0000 (02:04 +0900)]
[MIPS] Import updates from i386's i8259.c

Import many updates from i386's i8259.c, especially genirq transitions.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] *-berr: Header inclusions for DEC bus error handlers
Maciej W. Rozycki [Wed, 6 Dec 2006 11:50:23 +0000 (11:50 +0000)]
[MIPS] *-berr: Header inclusions for DEC bus error handlers

 A fixup to add missing header inclusions for bus error handlers for
DECstation system after the recent switch to get_irq_regs().

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Compile __do_IRQ() when really needed
Franck Bui-Huu [Fri, 1 Dec 2006 17:22:27 +0000 (18:22 +0100)]
[MIPS] Compile __do_IRQ() when really needed

__do_IRQ() is needed only by irq handlers that can't use
default handlers defined in kernel/irq/chip.c.

For others platforms there's no need to compile this function
since it won't be used. For those platforms this patch defines
GENERIC_HARDIRQS_NO__DO_IRQ symbol which is used exactly for
this purpose.

Futhermore for platforms which do not use __do_IRQ(), end()
method which is part of the 'irq_chip' structure is not used.
This patch simply removes this method in this case.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] genirq: use name instead of typename
Atsushi Nemoto [Tue, 5 Dec 2006 16:20:57 +0000 (01:20 +0900)]
[MIPS] genirq: use name instead of typename

The "typename" field was obsoleted by the "name" field.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Do not use handle_level_irq for ioasic_dma_irq_type.
Atsushi Nemoto [Fri, 1 Dec 2006 15:08:03 +0000 (00:08 +0900)]
[MIPS] Do not use handle_level_irq for ioasic_dma_irq_type.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] pte_offset(dir,addr): parenthesis fix
Franck Bui-Huu [Tue, 5 Dec 2006 09:39:56 +0000 (10:39 +0100)]
[MIPS] pte_offset(dir,addr): parenthesis fix

This patch adds missing parenthesis around 'dir' argument in pte_offset()
macro definition.

It also removes an extra space in the definition of pte_offset_kernel()
macro.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[PATCH] drivers/{char|isdn}: work_struct-induced breakage
Al Viro [Wed, 6 Dec 2006 18:41:45 +0000 (18:41 +0000)]
[PATCH] drivers/{char|isdn}: work_struct-induced breakage

part 1 of fsck-knows-how-many

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] hamradio/dmascc: fix up work_struct-induced breakage
Al Viro [Wed, 6 Dec 2006 18:51:40 +0000 (18:51 +0000)]
[PATCH] hamradio/dmascc: fix up work_struct-induced breakage

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Wed, 6 Dec 2006 16:10:55 +0000 (08:10 -0800)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: (43 commits)
  sh: sh775x/titan fixes for irq header changes.
  sh: update r7780rp defconfig.
  sh: compile fixes for header cleanup.
  sh: Fixup pte_mkhuge() build failure.
  sh: set KBUILD_IMAGE to something sensible.
  sh: show held locks in stack trace with lockdep.
  sh: platform_pata support for R7780RP
  sh: stacktrace/lockdep/irqflags tracing support.
  sh: Fixup movli.l/movco.l atomic ops for gcc4.
  sh: dyntick infrastructure.
  sh: Clock framework tidying.
  sh: Turn off IRQs around get_timer_offset() calls.
  sh: Get the PGD right in oops case with 64-bit PTEs.
  sh: Fix store queue bitmap end.
  sh: More flexible + SH7780 earlyprintk SCIF support.
  sh: Fixup various PAGE_SIZE == 4096 assumptions.
  sh: Fixup 4K irq stacks.
  sh: dma-api channel capability extensions.
  sh: Drop name overload in dma-sh.
  sh: Make dma-isa depend on ISA_DMA_API.
  ...

17 years agoMerge git://git.infradead.org/users/dhowells/workq-2.6
Linus Torvalds [Wed, 6 Dec 2006 16:01:37 +0000 (08:01 -0800)]
Merge git://git.infradead.org/users/dhowells/workq-2.6

* git://git.infradead.org/users/dhowells/workq-2.6:
  Actually update the fixed up compile failures.
  WorkQueue: Fix up arch-specific work items where possible
  WorkStruct: make allyesconfig
  WorkStruct: Pass the work_struct pointer instead of context data
  WorkStruct: Merge the pending bit into the wq_data pointer
  WorkStruct: Typedef the work function prototype
  WorkStruct: Separate delayable and non-delayable events.

17 years ago[PATCH] uclinux: fix mmap() of directory for nommu case
Mike Frysinger [Wed, 6 Dec 2006 02:02:59 +0000 (12:02 +1000)]
[PATCH] uclinux: fix mmap() of directory for nommu case

I was playing with blackfin when i hit a neat bug ... doing an open() on a
directory and then passing that fd to mmap() would cause the kernel to hang

after poking into the code a bit more, i found that
mm/nommu.c:validate_mmap_request() checks the length and if it is 0, just
returns the address ... this is in stark contrast to mmu's
mm/mmap.c:do_mmap_pgoff() where it returns -EINVAL for 0 length requests ...
i then noticed that some other parts of the logic is out of date between the
two funcs, so perhaps that's the easy fix ?

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: remove FP conditionals in ucontext struct
Gavin Lambert [Wed, 6 Dec 2006 01:57:53 +0000 (11:57 +1000)]
[PATCH] m68knommu: remove FP conditionals in ucontext struct

The first patch is to the 2.6 kernel include file (for m68knommu), to get
rid of the conditional definitions, otherwise the structures have different
sizes depending on whether there's an FPU or not.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: ColdFire serial driver fixes
Greg Ungerer [Wed, 6 Dec 2006 01:49:34 +0000 (11:49 +1000)]
[PATCH] m68knommu: ColdFire serial driver fixes

Some updates for the old ColdFire serial driver:

 . support 3 and 4 UARTs on some ColdFire parts that have them
 . enable multifunction pins to serial for 527x CPU's
 . support the 5272 UART's fractional baud rate divisor
 . switch driver name to "mcfserial"

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: switch 68360 to using rtc_time
Greg Ungerer [Wed, 6 Dec 2006 01:43:14 +0000 (11:43 +1000)]
[PATCH] m68knommu: switch 68360 to using rtc_time

Adds support for RTCs (through genrtc) for M68KNOMMU.

Board-specific code will have to link the appropriate RTC driver to the
mach_hwclk callback, at minimum.

This patch switches the 68360 code over to using rtc_time.

Signed-off-by: Gavin Lambert <gavinl@compacsort.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: fix timer register access on 523x ColdFire platforms
Greg Ungerer [Wed, 6 Dec 2006 01:36:59 +0000 (11:36 +1000)]
[PATCH] m68knommu: fix timer register access on 523x ColdFire platforms

The 523x timer TRR register is a full 32bits, the older register (on
other ColdFire parts) was only 16 bits.  Use the right type of
__raw_read when accessing it.

Problem found by Yaroslav Vinogradov <yaroslav.vinogradov@freescale.com>

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: implement irq_canonicalize()
Greg Ungerer [Wed, 6 Dec 2006 01:36:13 +0000 (11:36 +1000)]
[PATCH] m68knommu: implement irq_canonicalize()

Add a null definition for irq_canonicalize(). It is used in the gerneric
serial subsystem code, can't compile without it.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: create rtc.h
Greg Ungerer [Wed, 6 Dec 2006 01:35:16 +0000 (11:35 +1000)]
[PATCH] m68knommu: create rtc.h

This adds support for RTCs (through genrtc) for M68KNOMMU.

Board-specific code will have to link the appropriate RTC driver to the
mach_hwclk callback, at minimum.

Signed-off-by: Gavin Lambert <gavinl@compacsort.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years agoActually update the fixed up compile failures.
David Howells [Wed, 6 Dec 2006 15:02:26 +0000 (15:02 +0000)]
Actually update the fixed up compile failures.

Signed-Off-By: David Howells <dhowells@redhat.com>
17 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
David Howells [Wed, 6 Dec 2006 15:01:18 +0000 (15:01 +0000)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6

Conflicts:

drivers/pcmcia/ds.c

Fix up merge failures with Linus's head and fix new compile failures.

Signed-Off-By: David Howells <dhowells@redhat.com>
18 years agosh: sh775x/titan fixes for irq header changes.
Jamie Lenehan [Wed, 6 Dec 2006 03:05:02 +0000 (12:05 +0900)]
sh: sh775x/titan fixes for irq header changes.

The following moves the creation of IPR interupts into setup-7750.c
and updates a few other things to make it all work after the "Drop
CPU subtype IRQ headers" commit. It boots and runs fine on my titan
board.

 - adds an ipr_idx to the ipr_data and uses a function in the subtype
   code to calculate the address of the IPR registers

 - adds a function to enable individual interrupt mode for externals
   in the subtype code and calls that from the titan board code
   instead of doing it directly.

 - I changed the shift in the ipr_data to be the actual # of bits to
   shift, instead of the numnber / 4 - made it easier to match with
   the manual.

Signed-off-by: Jamie Lenehan <lenehan@twibble.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: update r7780rp defconfig.
Paul Mundt [Wed, 6 Dec 2006 03:02:01 +0000 (12:02 +0900)]
sh: update r7780rp defconfig.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: compile fixes for header cleanup.
Paul Mundt [Wed, 6 Dec 2006 02:24:48 +0000 (11:24 +0900)]
sh: compile fixes for header cleanup.

Since some header inclusion paths were cleaned up, compilation
broke. Add in the headers we need directly to build again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: Fixup pte_mkhuge() build failure.
Paul Mundt [Wed, 6 Dec 2006 02:20:53 +0000 (11:20 +0900)]
sh: Fixup pte_mkhuge() build failure.

When hugetlbpage support isn't enabled, this can be bogus.
Wrap it back in _PAGE_FLAGS_HARD to avoid changes to the
base PTE when not aiming for larger sizes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: set KBUILD_IMAGE to something sensible.
Paul Mundt [Wed, 6 Dec 2006 02:08:49 +0000 (11:08 +0900)]
sh: set KBUILD_IMAGE to something sensible.

This was missing for sh too, wire it up..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: show held locks in stack trace with lockdep.
Paul Mundt [Wed, 6 Dec 2006 02:07:51 +0000 (11:07 +0900)]
sh: show held locks in stack trace with lockdep.

Follows the same change as other architectures..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: platform_pata support for R7780RP
Paul Mundt [Wed, 6 Dec 2006 01:43:44 +0000 (10:43 +0900)]
sh: platform_pata support for R7780RP

This adds a platform device for the directly connected
CF interface on R7780RP boards, for use with the
pata_platform libata driver.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: stacktrace/lockdep/irqflags tracing support.
Paul Mundt [Mon, 4 Dec 2006 09:17:28 +0000 (18:17 +0900)]
sh: stacktrace/lockdep/irqflags tracing support.

Wire up all of the essentials for lockdep..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: Fixup movli.l/movco.l atomic ops for gcc4.
Paul Mundt [Fri, 1 Dec 2006 05:32:54 +0000 (14:32 +0900)]
sh: Fixup movli.l/movco.l atomic ops for gcc4.

gcc4 gets a bit pissy about the outputs:

include/asm/atomic.h: In function 'atomic_add':
include/asm/atomic.h:37: error: invalid lvalue in asm statement
include/asm/atomic.h:30: error: invalid lvalue in asm output 1
...

this ended up being a thinko anyways, so just fix it up.

Verified for proper behaviour with the older toolchains, too.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: dyntick infrastructure.
Paul Mundt [Fri, 1 Dec 2006 04:23:47 +0000 (13:23 +0900)]
sh: dyntick infrastructure.

This adds basic NO_IDLE_HZ support to the SH timer API so timers
are able to wire it up. Taken from the ARM version, as it fit in
to our API with very few changes needed.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: Clock framework tidying.
Paul Mundt [Fri, 1 Dec 2006 04:15:14 +0000 (13:15 +0900)]
sh: Clock framework tidying.

This syncs up the SH clock framework with the linux/clk.h API,
for which there were only some minor changes required, namely
the clk_get() dev_id and subsequent callsites.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: Turn off IRQs around get_timer_offset() calls.
Paul Mundt [Fri, 1 Dec 2006 04:12:05 +0000 (13:12 +0900)]
sh: Turn off IRQs around get_timer_offset() calls.

Since all of the sys_timer sources currently do this on their own
within the ->get_offset() path, it's more sensible to just have
the caller take care of it when grabbing xtime_lock. Incidentally,
this is more in line with what others (ie, ARM) are doing already.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: Get the PGD right in oops case with 64-bit PTEs.
Paul Mundt [Fri, 1 Dec 2006 03:14:11 +0000 (12:14 +0900)]
sh: Get the PGD right in oops case with 64-bit PTEs.

Previously this was using a static pgd shift in the reporting
code, simply flip this to PGDIR_SHIFT which does the right
thing depending on varying PTE magnitudes on the SH-X2 MMU.

While we're at it, and since it's been recently added, use
get_TTB() for fetching the TTB, rather than the open coded
instructions.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: Fix store queue bitmap end.
Paul Mundt [Fri, 1 Dec 2006 03:01:43 +0000 (12:01 +0900)]
sh: Fix store queue bitmap end.

The end of the store queue bitmap is miscalculated when searching
for a free range in sq_remap(), missing the PAGE_SHIFT shift that's
done in sq_api_init(). This runs in to workloads where we can scan
beyond the end of the bitmap.

Spotted by Paul Jackson:

http://marc.theaimsgroup.com/?l=linux-kernel&m=116493191224097&w

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: More flexible + SH7780 earlyprintk SCIF support.
Paul Mundt [Mon, 27 Nov 2006 03:10:23 +0000 (12:10 +0900)]
sh: More flexible + SH7780 earlyprintk SCIF support.

This makes the early printk support somewhat more flexible,
moving the port definition to a config option, and making the
port initialization configurable for sh-ipl+g users.

At the same time, this allows us to trivially wire up the
SH7780 SCIF0, so that's thrown in too more or less for free.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: Fixup various PAGE_SIZE == 4096 assumptions.
Paul Mundt [Mon, 27 Nov 2006 03:06:26 +0000 (12:06 +0900)]
sh: Fixup various PAGE_SIZE == 4096 assumptions.

There were a number of places that made evil PAGE_SIZE == 4k
assumptions that ended up breaking when trying to play with
8k and 64k page sizes, this fixes those up.

The most significant change is the way we load THREAD_SIZE,
previously this was done via:

mov #(THREAD_SIZE >> 8), reg
shll8 reg

to avoid a memory access and allow the immediate load. With
a 64k PAGE_SIZE, we're out of range for the immediate load
size without resorting to special instructions available in
later ISAs (movi20s and so on). The "workaround" for this is
to bump up the shift to 10 and insert a shll2, which gives a
bit more flexibility while still being much cheaper than a
memory access.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: Fixup 4K irq stacks.
Paul Mundt [Fri, 24 Nov 2006 10:46:18 +0000 (19:46 +0900)]
sh: Fixup 4K irq stacks.

There was a clobber issue with the register we were saving
the stack in, so we switch to a register that we handle in
the clobber list properly already.

This also follows the x86 changes for allowing the softirq
checks from hardirq context.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: dma-api channel capability extensions.
Mark Glaisher [Fri, 24 Nov 2006 06:13:52 +0000 (15:13 +0900)]
sh: dma-api channel capability extensions.

This extends the SH DMA API for allowing handling of DMA
channels based off of their respective capabilities.

A couple of functions are added to the existing API,
the core bits are register_chan_caps() for registering
channel capabilities, and request_dma_bycap() for fetching
a channel dynamically based off of a capability set.

Signed-off-by: Mark Glaisher <mark.glaisher@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: Drop name overload in dma-sh.
Paul Mundt [Fri, 24 Nov 2006 05:50:05 +0000 (14:50 +0900)]
sh: Drop name overload in dma-sh.

Pass along the dev_id from request_dma() all the way down,
rather than inserting an artificial name relating to the TEI
line that we were doing before.

This makes the line a bit less obvious, but dev_id is the proper
behaviour for this regardless.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: Make dma-isa depend on ISA_DMA_API.
Paul Mundt [Fri, 24 Nov 2006 05:48:14 +0000 (14:48 +0900)]
sh: Make dma-isa depend on ISA_DMA_API.

Previously we linked in the ISA DMA wrapper unconditionally.
As there are very few users of this, it's better to make it
conditional.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: dma-sysfs fixes.
Paul Mundt [Fri, 24 Nov 2006 05:43:09 +0000 (14:43 +0900)]
sh: dma-sysfs fixes.

Handle the case where no registered DMACs exist somewhat more
gracefully. While we're at it, check for sysdev_create_file()
failing.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: Fix syscall tracing ordering.
Stuart Menefy [Fri, 24 Nov 2006 04:01:36 +0000 (13:01 +0900)]
sh: Fix syscall tracing ordering.

The implementation of system call tracing in the kernel has a
couple of ordering problems:

 - the validity of the system call number is checked before
   calling out to system call tracing code, and should be
   done after

 - the system call number used when tracing is the one the
   system call was invoked with, while the system call tracing
   code can legitimatly change the call number (for example
   strace permutes fork into clone)

This patch fixes both of these problems, and also reoders the
code slightly to make the direct path through the code the
common case.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
18 years agosh: KSTK_EIP/KSTK_ESP consistency.
Stuart Menefy [Fri, 24 Nov 2006 03:53:02 +0000 (12:53 +0900)]
sh: KSTK_EIP/KSTK_ESP consistency.

Two of the fields in /proc/[number]/stat are documented in
proc(5) as:

      kstkesp %lu
     The current value of esp (stack pointer), as
     found in the kernel stack page for the process.

      kstkeip %lu
     The current EIP (instruction pointer).

The SH currently prints the the last SP and PC of the process
inside the kernel, while most other archs use the last user
space values.

This patch modifes the SH to display the user space values.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>