aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2006-12-11[NETPOLL]: Fix local_bh_enable() warning.Andrew Morton1-2/+4
During boot we get: netconsole: device eth0 not up yet, forcing it e1000: eth0: e1000_watchdog: NIC Link is Up 100 Mbps Full Duplex WARNING (!__warned) at kernel/softirq.c:137 local_bh_enable() Call Trace: [<ffffffff80235baf>] local_bh_enable+0x41/0xa3 [<ffffffff8045ab8e>] netpoll_send_skb+0x116/0x144 [<ffffffff8045b1ee>] netpoll_send_udp+0x263/0x271 [<ffffffff803d41ec>] write_msg+0x42/0x5e [<ffffffff80230c9b>] __call_console_drivers+0x5f/0x70 [<ffffffff80230d19>] _call_console_drivers+0x6d/0x71 [<ffffffff802313f0>] release_console_sem+0x148/0x1ec [<ffffffff802316ce>] register_console+0x1b1/0x1ba [<ffffffff803d4178>] init_netconsole+0x54/0x68 [<ffffffff802071ae>] init+0x152/0x308 [<ffffffff804dac8b>] _spin_unlock_irq+0x14/0x30 [<ffffffff8022c15e>] schedule_tail+0x43/0x9f [<ffffffff8020a758>] child_rip+0xa/0x12 Herbert sayeth: Normally networking isn't invoked with interrupts turned off, but I suppose we don't have a choice here. This is unique being a place where you can get called with BH on, off, or IRQs off. Given that this is only used for printk, the easiest solution is probably just to disable local IRQs instead of BH. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-12sh: Fixup SH-2 BUG() trap handling.Yoshinori Sato1-18/+14
This adds in support for the BUG() trap on SH-2. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: Use early_param() for earlyprintk parsing.Paul Mundt2-31/+16
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: Fix .empty_zero_page alignment for PAGE_SIZE > 4096.Paul Mundt3-3/+6
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: Fixup .data.page_aligned.Paul Mundt1-1/+1
This had a bogus .data.idt reference, fix it up.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: Hook up SH7722 scif ipr interrupts.Paul Mundt1-0/+4
Add the SCIF IRQs to the IPR table for SH7722. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: Fixup sh_bios() trap handling.Paul Mundt1-2/+13
This was inadvertently broken when the entry.S code split up, restore the missing branch and get subsequent traps working under debug again. This manifested itself as a lockup when attempting to reload the VBR base. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: SH-MobileR SH7722 CPU support.Paul Mundt22-20/+284
This adds CPU support for the SH7722. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: Fixup dma_cache_sync() callers.Paul Mundt1-5/+5
This now takes a struct device, update all of the callers. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: Convert remaining remap_area_pages() users to ioremap_page_range().Paul Mundt2-4/+5
A couple of these were missed. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: Fixup kernel_execve() for syscall cleanups.Paul Mundt1-0/+6
SH-2 and SH-2A need to use a different syscall base for the trapa vector than the other parts, so fixup the logic in the kernel_execve() case. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: Fix get_wchan().Paul Mundt1-2/+3
Some time ago the schedule frame size changed and we failed to reflect this in get_wchan() at the time. This first popped up as a problem on SH7751R where schedule_frame ended up being unaligned and generating an unaligned trap. This fixes it up again.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: BUG() handling through trapa vector.Paul Mundt3-9/+89
Previously we haven't been doing anything with verbose BUG() reporting, and we've been relying on the oops path for handling BUG()'s, which is rather sub-optimal. This switches BUG handling to use a fixed trapa vector (#0x3e) where we construct a small bug frame post trapa instruction to get the context right. This also makes it trivial to wire up a DIE_BUG for the atomic die chain, which we couldn't really do before. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12rtc: rtc-sh: alarm support.Jamie Lenehan1-25/+201
This adds alarm support for the RTC_ALM_SET, RTC_ALM_READ, RTC_WKALM_SET and RTC_WKALM_RD operations to rtc-sh. The only unusual part is the handling of the alarm interrupt. If you clear the alarm flag (AF) while the time in the RTC still matches the time in the alarm registers than AF is immediately re-set, and if the alarm interrupt (AIE) is still enabled then it re-triggers. I was originally getting around 20k+ interrupts generated during the second when the RTC and alarm registers matches. The solution I've used is to clear AIE when the alarm goes off and then use the carry interrupt to re-enabled it. The carry interrupt will check AF and re-enabled AIE if it's clear. If AF is not clear it'll clear it and then the check will be repeated next carry interrupt. This a bit in rtc structure that indicates that it's waiting to have AIE re-enabled so it doesn't turn it on when it wasn't enabled anyway. Signed-off-by: Jamie Lenehan <lenehan@twibble.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12rtc: rtc-sh: fix rtc for out-by-one for the month.Jamie Lenehan1-3/+3
The RMONCNT register, which holds the month in the RTC, takes a value between 1 and 12 while the tm_mon field in the time structures takes a value between 0 and 11. This wasn't being taken into account in rtc-sh resulting in the month being out by one. eg, on my board during boot the RTC is set to: RTC is set to Thu Jul 01 09:00:00 1999 but "hwclock -r" immediately after logging in was showing: Sun Aug 1 09:01:43 1999 0.000000 seconds Signed-off-by: Jamie Lenehan <lenehan@twibble.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: Kill off unused SE7619 I/O ops.Yoshinori Sato3-124/+1
This can use the generic routines, so kill off the board-specific ones. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12serial: sh-sci: Shut up various sci_rxd_in() gcc4 warnings.Paul Mundt1-0/+5
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: Split out atomic ops logically.Paul Mundt3-151/+180
We have a few different ways to do the atomic operations, so split them out in to different headers rather than bloating atomic.h. Kernelspace gUSA will take this up to a third implementation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: Fix Solution Engine 7619 build.Yoshinori Sato2-33/+33
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: Trivial build fixes for SH-2 support.Yoshinori Sato5-16/+7
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: IPR IRQ updates for SH7619/SH7206.Yoshinori Sato3-8/+111
This updates the SH7619 and SH7206 code for the IPR IRQ changes. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: gcc4 symbol export fixups.Stuart Menefy1-1/+14
gcc 4 for sh changes the names of some compiler intrinsic functions and adds some additional ones. This patch adds the new ones, and fixes up various module symbol resolution issues. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: landisk board build fixes.Paul Mundt3-34/+57
Get the landisk board building again.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12rtc: rtc-sh: fix for period rtc interrupts.Jamie Lenehan1-21/+22
When testing the per second interrupt support (RTC_UIE_ON/RTC_UIE_OFF) of the new RTC system it would die in sh_rtc_interrupt due to a null ptr dereference. The following gets it working correctly. Signed-off-by: Jamie Lenehan <lenehan@twibble.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: register rtc resources for sh775x.Jamie Lenehan1-0/+31
Register the RTC resources for the sh775x subtype so that the new generic RTC support in drivers/rtc/rtc-sh.c will work. Signed-off-by: Jamie Lenehan <lenehan@twibble.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: SH-2 defconfig updates.Yoshinori Sato2-39/+847
This adds a new defconfig for SE7619 and updates SE7206. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: Add uImage and S-rec generation support.Paul Mundt3-10/+43
Add a couple of new targets, both for uImage and S-rec generation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: push-switch fixups for work_struct API damage.Paul Mundt2-5/+11
INIT_WORK() dropped the data arg, so now we have to stash an extra pointer and backpedal instead. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: Shut up csum_ipv6_magic() warnings.Paul Mundt1-35/+34
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: Reworked swap cache entry encoding for SH-X2 MMU.Paul Mundt1-6/+41
In the 64-bit PTE case there's no point in restricting the encoding to the low bits of the PTE, we can instead bump all of this up to the high 32 bits and extend PTE_FILE_MAX_BITS to 32, adopting the same convention used by x86 PAE. There's a minor discrepency between the number of bits used for the swap type encoding between 32 and 64-bit PTEs, but this is unlikely to cause any problem given the extended offset. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-11[IPVS]: Make ip_vs_sync.c <= 80col wide.Simon Horman1-3/+6
Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-11[IPVS]: Use msleep_interruptable() instead of ssleep() aka msleep()Simon Horman1-4/+4
Dean Manners notices that when an IPVS synchonisation daemons are started the system load slowly climbs up to 1. This seems to be related to the call to ssleep(1) (aka msleep(1000) in the main loop. Replacing this with a call to msleep_interruptable() seems to make the problem go away. Though I'm not sure that it is correct. This is the second edition of this patch, which replaces ssleep() in the main loop for both the master and backup threads, as well as some thread synchronisation code. The latter is just for thorougness as it shouldn't be causing any problems. Signed-Off-By: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-11[HAMRADIO]: Fix baycom_epp.c compile failure.Ralf Baechle3-2/+4
Fix foobar in 15b1c0e822f578306332d4f4c449250db5c5dceb and e8cc49bb0fdb9e18a99e6780073d1400ba2b0d1f patch series. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-11[DCCP]: Whitespace cleanupsArnaldo Carvalho de Melo13-137/+149
That accumulated over the last months hackaton, shame on me for not using git-apply whitespace helping hand, will do that from now on. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-11[DCCP] ccid3: Fixup some type conversions related to rttsArnaldo Carvalho de Melo2-12/+12
Spotted by David Miller when compiling on sparc64, I reproduced it here on parisc64, that are the only platforms to define __kernel_suseconds_t as an 'int', all the others, x86_64 and x86 included typedef it as a 'long', but from the definition of suseconds_t it should just be an 'int' on platforms where it is >= 32bits, it would not require all the castings from suseconds_t to (int) when printking variables of this type, that are not needed on parisc64 and sparc64. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-11[DCCP] ccid3: BUG-FIX - conversion errorsGerrit Renker1-24/+30
This fixes conversion errors which arose by not properly type-casting from u32 to __u64. Fixed by explicitly casting each type which is not __u64, or by performing operation after assignment. The patch further adds missing debug information to track the current value of X_recv. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-11[DCCP] ccid3: Reorder packet history source fileGerrit Renker1-107/+112
No code change at all. This reorders the source file to follow the same order as the corresponding header file. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-11[DCCP] ccid3: Reorder packet history header fileGerrit Renker1-60/+67
No code change at all. To make the header file easier to read, the following ordering is established among the declarations: * hist_new * hist_delete * hist_entry_new * hist_head * hist_find_entry * hist_add_entry * hist_entry_delete * hist_purge Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-11[DCCP] ccid3: Make debug output consistentGerrit Renker1-35/+32
This patch does not alter any algorithm, just the debug message format: * s#%s, sk=%p#%s(%p)#g * when a statename is present, it now uses %s(%p, state=%s) * when only function entry is debugged, it adds an `- entry' Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-11[DCCP] ccid3: Perform history operations only after packet has been sentGerrit Renker1-29/+9
This migrates all packet history operations into the routine ccid3_hc_tx_packet_sent, thereby removing synchronization problems that occur when, as before, the operations are spread over multiple routines. The following minor simplifications are also applied: * several simplifications now follow from this change - several tests are now no longer required * removal of one unnecessary variable (dp) Justification: Currently packet history operations span two different routines, one of which is likely to pass through several iterations of sleeping and awakening. The first routine, ccid3_hc_tx_send_packet, allocates an entry and sets a few fields. The remaining fields are filled in when the second routine (which is not within a sleeping context), ccid3_hc_tx_packet_sent, is called. This has several strong drawbacks: * it is not necessary to split history operations - all fields can be filled in by the second routine * the first routine is called multiple times, until a packet can be sent, and sleeps meanwhile - this causes a lot of difficulties with regard to keeping the list consistent * since both routines do not have a producer-consumer like synchronization, it is very difficult to maintain data across calls to these routines * the fact that the routines are called in different contexts (sleeping, not sleeping) adds further problems Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-11[DCCP] ccid3: TX history - remove unused fieldGerrit Renker2-3/+3
This removes the `dccphtx_ccval' field since it is nowhere used in the code and in fact not necessary for the accounting. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-11[DCCP] ccid3: Shift window counter computationGerrit Renker1-20/+29
This puts the window counter computation [RFC 4342, 8.1] into a separate function which is called whenever a new packet is ready for immediate transmission in ccid3_hc_tx_send_packet. Justification: The window counter update was previously computed after the packet was sent. This has two drawbacks, both fixed by this patch: 1) re-compute another timestamp almost directly after the packet was sent (expensive), 2) the CCVal for the window counter is needed at the instant the packet is sent. Further details: The initialisation of the window counter is left in the state NO_SENT, as before. The algorithm will do nothing if either RTT is initialised to 0 (which is ok) or if the RTT value remains below 4 microseconds (which is almost pathological). Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-11[DCCP] ccid3: Sanity-check RTT samplesGerrit Renker2-1/+13
CCID3 performance depends much on the accuracy of RTT samples. If RTT samples grow too large, performance can be catastrophically poor. To limit the amount of possible damage in such cases, the patch * introduces an upper limit which identifies a maximum `sane' RTT value; * uses a macro to enforce this upper limit. Using a macro was given preference, since it is necessary to identify the calling function in the warning message. Since exceeding this threshold identifies a critical condition, DCCP_CRIT is used and not DCCP_WARN. Many thanks to Ian McDonald for collaboration on this issue. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-11[DCCP] ccid3: Initialise RTT valuesGerrit Renker1-1/+2
In both the sender and the receiver it is possible that the stored RTT value is accessed before an actual RTT estimate has been computed. This patch * initialises the sender RTT to 0 - the sender always accesses the RTT in ccid3_hc_tx_packet_sent - the RTT is further needed for the window counter algorithm * replaces the receiver initialisation of 5msec with 0 - which has the same effect and removes an `XXX' - the RTT value is needed in ccid3_hc_rx_packet_recv as rtt_prev Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-11[DCCP] ccid: Deprecate ccid_hc_tx_insert_optionsGerrit Renker3-27/+0
The function ccid3_hc_tx_insert_options only does a redundant no-op, as the operation DCCP_SKB_CB(skb)->dccpd_ccval = hctx->ccid3hctx_last_win_count; is already performed _unconditionally_ in ccid3_hc_tx_send_packet. Since there is further no current need for this function, it is removed entirely. Since furthermore, there is actually no present need for the entire interface function ccid_hc_tx_insert_options, it was decided to remove it also, to clean up the interface. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-11[DCCP]: Warn when discarding packet due to internal errorsGerrit Renker1-2/+4
This adds a (debug) warning message which is triggered whenever a packet is discarded due to send failure. It also adds a conditional, so that an interruption during dccp_wait_for_ccid is not treated as a `BUG': the rationale is that interruptions are external, whereas bug warnings are concerned with the internals. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-11[DCCP]: Only deliver to the CCID rx side in chargeGerrit Renker2-7/+20
This is an optimisation to reduce CPU load. The received feedback is now only directed to the active CCID component, without requiring processing also by the inactive one. As a consequence, a similar test in ccid3.c is now redundant and is also removed. Justification: Currently DCCP works as a unidirectional service, i.e. a listening server is not at the same time a connecting client. As far as I can see, several modifications are necessary until that becomes possible. At the present time, received feedback is both fed to the rx/tx CCID modules. In unidirectional service, only one of these is active at any one time. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-11[DCCP]: Simplify TFRC calculationGerrit Renker3-35/+35
In migrating towards using the newer functions scaled_div/scaled_div32 for TFRC computations mapped from floating-point onto integer arithmetic, this completes the last stage of modifications. In particular, the overflow case for computing X_calc is circumvented by * breaking the computation into two stages * the first stage, res = (s*1E6)/R, cannot overflow due to use of u64 * in the second stage, res = (res*1E6)/f, overflow on u32 is avoided due to (i) returning UINT_MAX in this case (which is logically appropriate) and (ii) issuing a warning message into the system log (since very likely there is a problem somewhere else with the parameters) Lastly, all such scaling operations are now exported into tfrc.h, since actually this form of scaled computation is specific to TFRC and not to CCID3. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-11[DCCP]: Debug timeval operationsGerrit Renker2-24/+33
Problem: Most target types in the CCID3 code are u32, so subtle conversion errors can occur if signed time calculations yield negative results: the original values are lost in the conversion to unsigned, calculation errors go undetected. This patch therefore * sets all critical time types from unsigned to suseconds_t * avoids comparison between signed/unsigned via type-casting * provides ample warning messages in case time calculations are negative These warning messages can be removed at a later stage when the code has undergone more testing. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-11[DCCP] ccid3: Simplify calculation for reverse lookup of pGerrit Renker1-17/+22
This simplifies the calculation of a value p for a given fval when the first loss interval is computed (RFC 3448, 6.3.1). It makes use of the two new functions scaled_div/scaled_div32 to provide overflow protection. Additionally, protection against divide-by-zero is extended - in this case the function will return the maximally possible value of p=100%. Background: The maximum fval, f(100%), is approximately 244, i.e. the scaled value of fval should never exceed 244E6, which fits easily into u32. The problem is the scaling by 10^6, since additionally R(TT) is in microseconds. This is resolved by breaking the division into two stages: the first stage computes fval=(s*10^6)/R, stores that into u64; the second stage computes fval = (fval*10^6)/X_recv and complains if overflow is reached for u32. This case is safe since the TFRC reverse-lookup routine then returns p=100%. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>