- Sep 05, 2008
-
-
Jeremy Kerr authored
We currently have a race for a free SPE. With one thread doing a spu_yield(), and another doing a spu_activate(): thread 1 thread 2 spu_yield(oldctx) spu_activate(ctx) __spu_deactivate(oldctx) spu_unschedule(oldctx, spu) spu->alloc_state = SPU_FREE spu = spu_get_idle(ctx) - searches for a SPE in state SPU_FREE, gets the context just freed by thread 1 spu_schedule(ctx, spu) spu->alloc_state = SPU_USED spu_schedule(newctx, spu) - assumes spu is still free - tries to schedule context on already-used spu This change introduces a 'free_spu' flag to spu_unschedule, to indicate whether or not the function should free the spu after descheduling the context. We only set this flag if we're not going to re-schedule another context on this SPU. Add a comment to document this behaviour. Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Jeremy Kerr authored
Commit 8d5636fb introduced a reference count on SPU contexts during find_victim, but this may cause a leak in the reference count if we later find a better contender for a context to unschedule. Change the reference to after we've found our victim context, so we don't do the extra get_spu_context(). Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
- Sep 03, 2008
-
-
Kumar Gala authored
The calculation to get TI_CPU based off of SPRG3 was just plain wrong, meaning that we were getting garbage for the CPU number on 6xx/G3/G4 based SMP boxes in this code. Just offset off the stack pointer (to get to thread_info) like all the other references to TI_CPU do. This was pointed out by Chen Gong <G.Chen@freescale.com> [paulus@samba.org - use rlwinm r12,r11,... instead of rlwinm r12,r1,...; tophys()] Signed-off-by:
Kumar Gala <galak@kernel.crashing.org> Acked-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
Benjamin Herrenschmidt authored
HAVE_ARCH_UNMAPPED_AREA and HAVE_ARCH_UNMAPPED_AREA_TOPDOWN must be defined whenever CONFIG_PPC_MM_SLICES is enabled, not just when CONFIG_HUGETLB_PAGE is. They used to be always defined together but this is no longer the case since 3a8247cc ("powerpc: Only demote individual slices rather than whole process"). Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
Tony Breeds authored
This bug is causing random crashes (http://bugzilla.kernel.org/show_bug.cgi?id=11414 ). -fno-omit-frame-pointer is only needed on powerpc when -pg is also supplied, and there is a gcc bug that causes incorrect code generation on 32-bit powerpc when -fno-omit-frame-pointer is used---it uses stack locations below the stack pointer, which is not allowed by the ABI because those locations can and sometimes do get corrupted by an interrupt. This ensures that CONFIG_FRAME_POINTER is only selected by ftrace. When CONFIG_FTRACE is enabled we also pass -mno-sched-epilog to work around the gcc codegen bug. Patch based on work by: Andreas Schwab <schwab@suse.de> Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by:
Tony Breeds <tony@bakeyournoodle.com> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
Stephen Rothwell authored
This makes core_kernel_text() (and therefore kernel_text_address()) return the correct result. Currently all the __devinit routines (at least) will not be considered to be kernel text. This is just a quick fix for 2.6.27 - hopefully we will be able to fix this better in 2.6.28. Signed-off-by:
Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
Paul Mackerras authored
Commit bc033b63 ("powerpc/mm: Fix attribute confusion with htab_bolt_mapping()") moved the check for whether we should make pages of the linear mapping executable from htab_bolt_mapping into its callers, including htab_initialize. A side-effect of this is that the decision is now made once for each contiguous section in the LMB array rather than for each page individually. This can often mean that the whole of the linear mapping ends up being executable. This reverts to the previous behaviour, where individual pages are checked for being part of the kernel text or not, by moving the check back down into htab_bolt_mapping. Acked-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
Michael Neuling authored
This fixes an uninitialised variable in the VSX alignment code. It can cause warnings from GCC (noticed with gcc-4.1.1). Gcc is actually correct in this instance, and this bug could cause the alignment interrupt handler to send a SIGSEGV to the process on a legitimate access. Signed-off-by:
Michael Neuling <mikey@neuling.org> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
Thomas Gleixner authored
Larry Finger reported at http://lkml.org/lkml/2008/9/1/90 : An ancient laptop of mine started throwing errors from b43legacy when I started using 2.6.27 on it. This has been bisected to commit bfc0f594 "x86: merge tsc calibration". The unification of the TSC code adopted mostly the 64bit code, which prefers PMTIMER/HPET over the PIT calibration. Larrys system has an AMD K6 CPU. Such systems are known to have PMTIMER incarnations which run at double speed. This results in a miscalibration of the TSC by factor 0.5. So the resulting calibrated CPU/TSC speed is half of the real CPU speed, which means that the TSC based delay loop will run half the time it should run. That might explain why the b43legacy driver went berserk. On the other hand we know about systems, where the PIT based calibration results in random crap due to heavy SMI/SMM disturbance. On those systems the PMTIMER/HPET based calibration logic with SMI detection shows better results. According to Alok also virtualized systems suffer from the PIT calibration method. The solution is to use a more wreckage aware aproach than the current either/or decision. 1) reimplement the retry loop which was dropped from the 32bit code during the merge. It repeats the calibration and selects the lowest frequency value as this is probably the closest estimate to the real frequency 2) Monitor the delta of the TSC values in the delay loop which waits for the PIT counter to reach zero. If the maximum value is significantly different from the minimum, then we have a pretty safe indicator that the loop was disturbed by an SMI. 3) keep the pmtimer/hpet reference as a backup solution for systems where the SMI disturbance is a permanent point of failure for PIT based calibration 4) do the loop iteration for both methods, record the lowest value and decide after all iterations finished. 5) Set a clear preference to PIT based calibration when the result makes sense. The implementation does the reference calibration based on HPET/PMTIMER around the delay, which is necessary for the PIT anyway, but keeps separate TSC values to ensure the "independency" of the resulting calibration values. Tested on various 32bit/64bit machines including Geode 266Mhz, AMD K6 (affected machine with a double speed pmtimer which I grabbed out of the dump), Pentium class machines and AMD/Intel 64 bit boxen. Bisected-by:
Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Tested-by:
Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Sep 02, 2008
-
-
Michael Schmitz authored
Fix operator precedence bug in atari_keyb_init, which caused a failure on CT60 Signed-off-by:
Michael Schmitz <schmitz@debian.org> Signed-off-by:
Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Stephen Rothwell authored
A parisc allmodconfig build produces this: arch/parisc/hpux/fs.c:107: error: 'buffer' undeclared (first use in this function) Introduced by commit da574983 ("[PATCH] fix hpux_getdents()"). Helge Dille also reported this in bugzilla 11461: http://bugzilla.kernel.org/show_bug.cgi?id=11461 and he posted an identical patch. Signed-off-by:
Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by:
Helge Deller <deller@gmx.de> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Linus Torvalds authored
Breaking lines due to some imaginary problem with a long line length is often stupid and wrong, but never more so when it splits a string that is printed out into multiple lines. This really ended up making it much harder to find where some error strings were printed out, because a simple 'grep' didn't work. I'm sure there is tons more of this particular idiocy hiding in other places, but this particular case hit me once more last week. So fix it. Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Aug 30, 2008
-
-
David S. Miller authored
Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 29, 2008
-
-
Linus Torvalds authored
This reverts commit a2bd7274. It wasn't really right to begin with (there's a better fix for the problem with e820 reservations clashing with PCI BAR's pending), but it also actually causes more regressions, so it should be reverted even before the better fix is finalized. Rafael reports that this commit broke AHCI detection, and thus causes the kernel to not boot on his quad core test box. Reported-and-bisected-by:
Rafael J. Wysocki <rjw@sisk.pl> Cc: Yinghai Lu <yhlu.kernel@gmail.com> Cc: David Witbrodt <dawitbro@sbcglobal.net> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
David S. Miller authored
When a device is under an EBUS or ISA bus, the resource flags don't get set properly. Fix this by re-evaluating the resource flags at each level of bus as we apply ranges on the way to the root. And let PCI override any existing flags setting, but don't let the default flags calculator make such overrides. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 28, 2008
-
-
Jean-Christophe DUBOIS authored
remove unmatched comment end. Signed-off-by:
Jean-Christophe DUBOIS <jcd@tribudubois.net> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Michael Hennerich authored
Signed-off-by:
Michael Hennerich <michael.hennerich@analog.com> Signed-off-by:
Bryan Wu <cooloney@kernel.org>
-
Vegard Nossum authored
Using just 'unsigned' will make flags an unsigned int. While this is arguably not an error on blackfin where sizeof(int) == sizeof(long), the patch is still justified on the grounds of principle. The patch was generated using the Coccinelle semantic patch framework. Cc: Julia Lawall <julia@diku.dk> Cc: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by:
Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by:
Mike Frysinger <vapier.adi@gmail.com> Signed-off-by:
Bryan Wu <cooloney@kernel.org>
-
David S. Miller authored
Reported by Stephen Rothwell. Needed to fix the build when CONFIG_RELAY is enabled. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 27, 2008
-
-
Mel Gorman authored
Ordinarily, memory holes in flatmem still have a valid memmap and is safe to use. However, an architecture (ARM) frees up the memmap backing memory holes on the assumption it is never used. /proc/pagetypeinfo reads the whole range of pages in a zone believing that the memmap is valid and that pfn_valid will return false if it is not. On ARM, freeing the memmap breaks the page->zone linkages even though pfn_valid() returns true and the kernel can oops shortly afterwards due to accessing a bogus struct zone *. This patch lets architectures say when FLATMEM can have holes in the memmap. Rather than an expensive check for valid memory, /proc/pagetypeinfo will confirm that the page linkages are still valid by checking page->zone is still the expected zone. The lookup of page_zone is safe as there is a limited range of memory that is accessed when calling page_zone. Even if page_zone happens to return the correct zone, the impact is that the counters in /proc/pagetypeinfo are slightly off but fragmentation monitoring is unlikely to be relevant on an embedded system. Reported-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by:
Mel Gorman <mel@csn.ul.ie> Tested-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Adrian Bunk authored
This patch changes arm to use the new bcd2bin/bin2bcd functions instead of the obsolete BCD_TO_BIN/BIN_TO_BCD macros. Signed-off-by:
Adrian Bunk <bunk@kernel.org> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Harvey Harrison authored
Signed-off-by:
Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Russell King authored
Taken from omap 97b705ad835f1481270c4b67b402d6e37fa8ad15: ARM: OMAP: Misc compile fixes after syncing with mainline Also fix 2430 smc91x to use IRQ_LOWLEVEL. Signed-off-by:
Tony Lindgren <tony@atomide.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Russell King authored
Update omap_h2_1610 and omap_osk_5912 default configurations. Add ams delta, n770, omap 2430sdp, apollon_2420, generic 1510, 1610, 1710, 2420, h4 2420, innovator 1510 and 1610, perseus2 730, palte, palmtt, palmz71 and sx1 default configurations. Pulled out of the omap zoom tree. Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Heiko Schocher authored
Signed-off-by:
Heiko Schocher <hs@denx.de> Signed-off-by:
Vitaly Bordug <vitb@kernel.crashing.org> Signed-off-by:
Kumar Gala <galak@kernel.crashing.org> Signed-off-by:
Jeff Garzik <jgarzik@redhat.com>
-
H. Peter Anvin authored
Enable some option commonly used by testers in defconfig, including some very common device drivers and network boot support. defconfig is still not meant to be a kitchen-sink configuration. Signed-off-by:
H. Peter Anvin <hpa@zytor.com>
-
Adrian Bunk authored
AFAIR there exists blackfin hardware with PCI support, but the support currently in the kernel fails to build starting with: ... CC drivers/pci/probe.o probe.c: In function 'pci_scan_slot': probe.c:1056: error: implicit declaration of function 'pcibios_scan_all_fns' make[3]: *** [drivers/pci/probe.o] Error 1 Signed-off-by:
Adrian Bunk <bunk@kernel.org> Signed-off-by:
Bryan Wu <cooloney@kernel.org>
-
Bryan Wu authored
Signed-off-by:
Bryan Wu <cooloney@kernel.org>
-
- Aug 26, 2008
-
-
Wei Shuai authored
Fix the S3C2443 clock register definitions for selecting the EPLL reference clock described by S3C2443_CLKSRC_EPLLREF. Signed-off-by:
Wei Shuai <cpuwolf@gmail.com> [ben-linux@fluff.org: minor description fixes] Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Ben Dooks authored
The first spi bus is registered with number 0, but the board data says that the device on it is registered on bus 1. Move the spi bus to bus 1 to keep the compatibility with the original board-support patches. Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Ben Dooks authored
Move debugging output to dev_dbg() instead of dev_info(). Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Ben Dooks authored
Fix the following sparse warnings in arch/arm/plat-s3c24xx/pwm.c: warning: symbol 's3c_device_timer' was not declared. Should it be static? warning: symbol 'pwm_calc_tin' was not declared. Should it be static? Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Ben Dooks authored
Fix the following sparse warnings in arch/arm/plat-s3c24xx/pwm-clock.c: warning: symbol 'clk_timer_scaler' was not declared. Should it be static? warning: symbol 'clk_timer_tclk' was not declared. Should it be static? warning: symbol 'clk_timer_tdiv' was not declared. Should it be static? Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Ben Dooks authored
Fix the following problems spotted by sparse: warning: symbol 's3c24xx_gpiolib_input' was not declared. Should it be static? warning: symbol 's3c24xx_gpiolib_output' was not declared. Should it be static? warning: symbol 's3c24xx_gpiolib_set' was not declared. Should it be static? warning: symbol 's3c24xx_gpiolib_get' was not declared. Should it be static? warning: symbol 'gpios' was not declared. Should it be static? Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Ben Dooks authored
Fix the following sparse errors in arch/arm/mach-s3c2410/nor-simtec.c: 53:27: warning: symbol 'simtec_nor_pdata' was not declared. Should it be static? 77:13: warning: symbol 'nor_simtec_init' was not declared. Should it be static? Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Mark Brown authored
corgi, spitz and poodle have audio codecs on their primary I2C bus so need to call pxa_set_i2c_info() to set it up during init. Tested on spitz by Stanislav. Reported-by:
Stanislav Brabec <utx@penguin.cz> Signed-off-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by:
Richard Purdie <rpurdie@rpsys.net> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Florian Fainelli authored
This patch adds the proper .gitignore file to ignore vmlinux.lds generated in arch/mips/kernel/. Signed-off-by:
Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
Atsushi Nemoto authored
kgdb_mips_notify is called on IBE/DBE/FPE/BP/TRAP/RI exception. None of them need fixup. And doing fixup for a breakpoint exception will confuse gdb. Signed-off-by:
Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
Florian Fainelli authored
Use the register definitions of the MPMC controller from mach-rc32434/rb.h instead of redefining them. Signed-off-by:
Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
Ralf Baechle authored
Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-