20 Jul, 2007
1 commit
-
Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).
Here is a short excerpt of the semantic patch performing
this transformation:@@
type T2;
expression x;
identifier f,fld;
expression E;
expression E1,E2;
expression e1,e2,e3,y;
statement S;
@@x =
- kmalloc
+ kzalloc
(E1,E2)
... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
- memset((T2)x,0,E1);@@
expression E1,E2,E3;
@@- kzalloc(E1 * E2,E3)
+ kcalloc(E1,E2,E3)[akpm@linux-foundation.org: get kcalloc args the right way around]
Signed-off-by: Yoann Padioleau
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Acked-by: Russell King
Cc: Bryan Wu
Acked-by: Jiri Slaby
Cc: Dave Airlie
Acked-by: Roland Dreier
Cc: Jiri Kosina
Acked-by: Dmitry Torokhov
Cc: Benjamin Herrenschmidt
Acked-by: Mauro Carvalho Chehab
Acked-by: Pierre Ossman
Cc: Jeff Garzik
Cc: "David S. Miller"
Acked-by: Greg KH
Cc: James Bottomley
Cc: "Antonino A. Daplas"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
18 Jul, 2007
1 commit
-
Currently, the freezer treats all tasks as freezable, except for the kernel
threads that explicitly set the PF_NOFREEZE flag for themselves. This
approach is problematic, since it requires every kernel thread to either
set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't
care for the freezing of tasks at all.It seems better to only require the kernel threads that want to or need to
be frozen to use some freezer-related code and to remove any
freezer-related code from the other (nonfreezable) kernel threads, which is
done in this patch.The patch causes all kernel threads to be nonfreezable by default (ie. to
have PF_NOFREEZE set by default) and introduces the set_freezable()
function that should be called by the freezable kernel threads in order to
unset PF_NOFREEZE. It also makes all of the currently freezable kernel
threads call set_freezable(), so it shouldn't cause any (intentional)
change of behaviour to appear. Additionally, it updates documentation to
describe the freezing of tasks more accurately.[akpm@linux-foundation.org: build fixes]
Signed-off-by: Rafael J. Wysocki
Acked-by: Nigel Cunningham
Cc: Pavel Machek
Cc: Oleg Nesterov
Cc: Gautham R Shenoy
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
24 Jun, 2007
5 commits
-
When binding the driver, check the ID register for a valid identity, in case
the SM501 is not functioning correctly.Signed-off-by: Ben Dooks
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Ensure that the M1XCLK and MCLK are sourced from the same PLL (and refuse to
bind the driver if they are not).Update the PCI to safe initialisation values, as 72MHz is the maximum clock
for 33MHz PCI bus mastering.Signed-off-by: Ben Dooks
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The order of the set and mask operation in sm501_init_reg() was setting and
then masking the bits set. Correct the order so that we do not end up with
288MHz SDRAM clocks on certain systems.Signed-off-by: Ben Dooks
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This init sequence of setting the SDRAM clock before the bus clock is
recommend by Silicon Motion to stop problems with writes not sticking into
registers.Signed-off-by: Vincent Sanders
Signed-off-by: Ben Dooks
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch adds support for suspending the core (mfd driver) of the SM501.
Signed-off-by: Ben Dooks
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
05 Jun, 2007
1 commit
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: reduce raciness when input handlers disconnect
Input: ucb1x00 - do not access input_dev->private directly
Input: logips2pp - fix typo in Kconfig
Input: db9 - do not ignore dev2 module parameter
04 Jun, 2007
1 commit
-
Use input_get_drvdata() and input_set_drvdata() helpers to do that.
Signed-off-by: Dmitry Torokhov
Acked-by: Pavel Machek
23 May, 2007
2 commits
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: ads7846 - SPI_CPHA mode bugfix
Input: ads7846 - document that it handles tsc2046 too
Input: input-polldev - add module info
Input: ucb1x00-ts - remove commented out code
Input: ucb1400_ts - use sched_setscheduler()
Input: ALPS - force stream mode
Input: iforce - minor clean-ups
Input: iforce - fix force feedback not working
Input: adbhid - do not access input_dev->private directly
Input: logips2pp - add type 72 (PS/2 TrackMan Marble) -
Signed-off-by: Dmitry Torokhov
10 May, 2007
1 commit
-
Add "depends on HAS_IOMEM" to a number of menus to make them
disappear for s390 which does not have I/O memory.Signed-off-by: Martin Schwidefsky
09 May, 2007
1 commit
-
Remove includes of where it is not used/needed.
Suggested by Al Viro.Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
sparc64, and arm (all 59 defconfigs).Signed-off-by: Randy Dunlap
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 Apr, 2007
1 commit
-
Fix an off-by-one spotted by the Coverity checker.
Signed-off-by: Adrian Bunk
Cc: Ben Dooks
Cc: Vincent Sanders
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
27 Feb, 2007
1 commit
-
Replace pci_module_init with pci_register_driver
Signed-off-by: Richard Knutson
Acked-by: Ben Dooks
Signed-off-by: Linus Torvalds
21 Feb, 2007
1 commit
-
This driver provides the core functionality of the SM501, which is a
multi-function chip including two framebuffers, video acceleration, USB,
and many other peripheral blocks.The driver exports a number of entries for the peripheral drivers to use.
Signed-off-by: Ben Dooks
Signed-off-by: Vincent Sanders
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Dec, 2006
1 commit
-
Move process freezing functions from include/linux/sched.h to freezer.h, so
that modifications to the freezer or the kernel configuration don't require
recompiling just about everything.[akpm@osdl.org: fix ueagle driver]
Signed-off-by: Nigel Cunningham
Cc: "Rafael J. Wysocki"
Cc: Pavel Machek
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
05 Oct, 2006
1 commit
-
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:struct pt_regs *old_regs = set_irq_regs(regs);
And put the old one back at the end:
set_irq_regs(old_regs);
Don't pass regs through to generic_handle_irq() or __do_IRQ().
In timer_interrupt(), this sort of change will be necessary:
- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().Some notes on the interrupt handling in the drivers:
(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.Signed-Off-By: David Howells
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
30 Sep, 2006
1 commit
-
ucb1x00-ts: handle errors from input_register_device()
Signed-off-by: Dmitry Torokhov
Cc: Russell King
Cc: Pavel Machek
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Jul, 2006
1 commit
-
Patch from Pavel Machek
From: Dirk Opfer
Fix ucb initialization on collie. Wrong frequency was used and that
led to things not working quite correctly. (I had to actually disable
checks in my tree to get it to boot). It now includes all the
neccessary parts to get it to compile :-).Signed-off-by: Pavel Machek
Acked-by: Richard Purdie
Signed-off-by: Russell King
03 Jul, 2006
1 commit
-
Signed-off-by: Thomas Gleixner
Cc: Ingo Molnar
Cc: "David S. Miller"
Cc: Benjamin Herrenschmidt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
01 Jul, 2006
1 commit
-
Signed-off-by: Jörn Engel
Signed-off-by: Adrian Bunk
26 Jun, 2006
1 commit
-
While reviewing the IRQ autoprobing code i found the attached buglet.
probe_irq_on()/off() calls must always be in pairs, because the generic IRQ
code uses a global semaphore to serialize all autoprobing activites.
(which does make sense) The ARM code's probe_irq_*() implementation does
not do this, but if this driver is ever used on another platform, this bug
might bite.(It probably does not trigger in practice, because a zero probing mask
returned should be rare - but still.)Signed-off-by: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Russell King
24 Mar, 2006
1 commit
-
On architectures like i386, the "Multimedia Capabilities Port drivers" menu is
visible, but it can't be visited since it contains nothing usable for
!ARCH_SA1100.This patch therefore shows this menu only on ARCH_SA1100.
Signed-off-by: Adrian Bunk
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
14 Jan, 2006
1 commit
-
Signed-off-by: Russell King
Signed-off-by: Greg Kroah-Hartman
13 Jan, 2006
1 commit
-
convert mfd and mmc to mutexes
Signed-off-by: Arjan van de Ven
Signed-off-by: Russell King
09 Jan, 2006
2 commits
-
linux/delay.h included twice
Signed-off-by: Nicolas Kaiser
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Some ARM platforms have the ability to program the interrupt controller to
detect various interrupt edges and/or levels. For some platforms, this is
critical to setup correctly, particularly those which the setting is dependent
on the device.Currently, ARM drivers do (eg) the following:
err = request_irq(irq, ...);
set_irq_type(irq, IRQT_RISING);
However, if the interrupt has previously been programmed to be level sensitive
(for whatever reason) then this will cause an interrupt storm.Hence, if we combine set_irq_type() with request_irq(), we can then safely set
the type prior to unmasking the interrupt. The unfortunate problem is that in
order to support this, these flags need to be visible outside of the ARM
architecture - drivers such as smc91x need these flags and they're
cross-architecture.Finally, the SA_TRIGGER_* flag passed to request_irq() should reflect the
property that the device would like. The IRQ controller code should do its
best to select the most appropriate supported mode.Signed-off-by: Russell King
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Dec, 2005
1 commit
-
The bd622663192e8ebebb27dc1d9397f352a82d2495 commit broke the UCB1x00
touchscreen driver since the idev structure was assumed to be into the ts
structure, simply casting the former to the later in a couple places.This patch fixes those, and also cache the idev pointer between multiple
calls to input_report_abs() to avoid growing the compiled code needlessly.Signed-off-by: Nicolas Pitre
Cc: Dmitry Torokhov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
10 Nov, 2005
1 commit
-
This allows us to eliminate the casts in the drivers, and eventually
remove the use of the device_driver function pointer methods for
platform device drivers.Signed-off-by: Russell King
Acked-by: Greg Kroah-Hartman
07 Nov, 2005
1 commit
-
Fix more include file problems that surfaced since I submitted the previous
fix-missing-includes.patch. This should now allow not to include sched.h
from module.h, which is done by a followup patch.Signed-off-by: Tim Schmielau
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
31 Oct, 2005
2 commits
-
Manual #include fixups for clashes - there may be some unnecessary
-
This adds support for sharp zaurus sl-5500 touchscreen. It introduces
some not-too-nice ifs, but I guess copying whole ucb1x00-ts.c would be
bad idea...Signed-off-by: Pavel Machek
Signed-off-by: Andrew Morton
Signed-off-by: Russell King
30 Oct, 2005
1 commit
-
Convert everyone who uses platform_bus_type to include
linux/platform_device.h.Signed-off-by: Russell King
Acked-by: Greg Kroah-Hartman
29 Oct, 2005
2 commits
-
In PM v1, all devices were called at SUSPEND_DISABLE level. Then
all devices were called at SUSPEND_SAVE_STATE level, and finally
SUSPEND_POWER_DOWN level. However, with PM v2, to maintain
compatibility for platform devices, I arranged for the PM v2
suspend/resume callbacks to call the old PM v1 suspend/resume
callbacks three times with each level in order so that existing
drivers continued to work.Since this is obsolete infrastructure which is no longer necessary,
we can remove it. Here's an (untested) patch to do exactly that.Signed-off-by: Russell King
Signed-off-by: Greg Kroah-Hartman -
Input: convert ucb1x00-ts to dynamic input_dev allocation
This is required for input_dev sysfs integration
Signed-off-by: Dmitry Torokhov
Signed-off-by: Greg Kroah-Hartman
11 Oct, 2005
1 commit
-
Patch from Nicolas Pitre
drivers/mfd/ucb1x00-core.c: In function 'ucb1x00_probe':
drivers/mfd/ucb1x00-core.c:482: error: 'ucb1x00_class' undeclared (first use in this function)Signed-off-by: Nicolas Pitre
Signed-off-by: Russell King
06 Oct, 2005
1 commit
-
drivers/mfd/ucb1x00-core.c:555: error: static declaration of 'ucb1x00_class' follows non-static declaration
drivers/mfd/ucb1x00.h:109: error: previous declaration of 'ucb1x00_class' was hereSince ucb1x00_class isn't used by anything, remove the extern
declaration and the symbol export.Signed-off-by: Russell King
24 Sep, 2005
1 commit
-
ucb1x00-ts declared a couple of one-bit 'int' bitfields.
Make them unsigned.Signed-off-by: Russell King
11 Sep, 2005
1 commit
-
These are small ucb1x00-ts cleanups, as suggested by Vojtech, Dmitri
and the lists.Signed-off-by: Pavel Machek
Signed-off-by: Russell King