Merge branch 'linus' into core/rcu

Conflicts:

	include/linux/rculist.h
	kernel/rcupreempt.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Ingo Molnar 2008-07-11 10:46:50 +02:00
commit 0c81b2a144
371 changed files with 11116 additions and 1564 deletions

12
.gitignore vendored
View file

@ -3,6 +3,10 @@
# subdirectories here. Add them in the ".gitignore" file # subdirectories here. Add them in the ".gitignore" file
# in that subdirectory instead. # in that subdirectory instead.
# #
# NOTE! Please use 'git-ls-files -i --exclude-standard'
# command after changing this file, to see if there are
# any tracked files which get ignored after the change.
#
# Normal rules # Normal rules
# #
.* .*
@ -18,19 +22,21 @@
*.lst *.lst
*.symtypes *.symtypes
*.order *.order
*.elf
*.bin
*.gz
# #
# Top-level generic files # Top-level generic files
# #
tags tags
TAGS TAGS
vmlinux* vmlinux
!vmlinux.lds.S
!vmlinux.lds.h
System.map System.map
Module.markers Module.markers
Module.symvers Module.symvers
!.gitignore !.gitignore
!.mailmap
# #
# Generated include files # Generated include files

View file

@ -2611,8 +2611,9 @@ S: Perth, Western Australia
S: Australia S: Australia
N: Miguel Ojeda Sandonis N: Miguel Ojeda Sandonis
E: maxextreme@gmail.com E: miguel.ojeda.sandonis@gmail.com
W: http://maxextreme.googlepages.com/ W: http://miguelojeda.es
W: http://jair.lab.fi.uva.es/~migojed/
D: Author of the ks0108, cfag12864b and cfag12864bfb auxiliary display drivers. D: Author of the ks0108, cfag12864b and cfag12864bfb auxiliary display drivers.
D: Maintainer of the auxiliary display drivers tree (drivers/auxdisplay/*) D: Maintainer of the auxiliary display drivers tree (drivers/auxdisplay/*)
S: C/ Mieses 20, 9-B S: C/ Mieses 20, 9-B

View file

@ -24,6 +24,8 @@ There are three different groups of fields in the struct taskstats:
4) Per-task and per-thread context switch count statistics 4) Per-task and per-thread context switch count statistics
5) Time accounting for SMT machines
Future extension should add fields to the end of the taskstats struct, and Future extension should add fields to the end of the taskstats struct, and
should not change the relative position of each field within the struct. should not change the relative position of each field within the struct.
@ -164,4 +166,8 @@ struct taskstats {
__u64 nvcsw; /* Context voluntary switch counter */ __u64 nvcsw; /* Context voluntary switch counter */
__u64 nivcsw; /* Context involuntary switch counter */ __u64 nivcsw; /* Context involuntary switch counter */
5) Time accounting for SMT machines
__u64 ac_utimescaled; /* utime scaled on frequency etc */
__u64 ac_stimescaled; /* stime scaled on frequency etc */
__u64 cpu_scaled_run_real_total; /* scaled cpu_run_real_total */
} }

View file

@ -3,7 +3,7 @@
=================================== ===================================
License: GPLv2 License: GPLv2
Author & Maintainer: Miguel Ojeda Sandonis <maxextreme@gmail.com> Author & Maintainer: Miguel Ojeda Sandonis
Date: 2006-10-27 Date: 2006-10-27
@ -22,7 +22,7 @@ Date: 2006-10-27
1. DRIVER INFORMATION 1. DRIVER INFORMATION
--------------------- ---------------------
This driver support one cfag12864b display at time. This driver supports a cfag12864b LCD.
--------------------- ---------------------

View file

@ -4,7 +4,7 @@
* Description: cfag12864b LCD userspace example program * Description: cfag12864b LCD userspace example program
* License: GPLv2 * License: GPLv2
* *
* Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> * Author: Copyright (C) Miguel Ojeda Sandonis
* Date: 2006-10-31 * Date: 2006-10-31
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify

View file

@ -3,7 +3,7 @@
========================================== ==========================================
License: GPLv2 License: GPLv2
Author & Maintainer: Miguel Ojeda Sandonis <maxextreme@gmail.com> Author & Maintainer: Miguel Ojeda Sandonis
Date: 2006-10-27 Date: 2006-10-27
@ -21,7 +21,7 @@ Date: 2006-10-27
1. DRIVER INFORMATION 1. DRIVER INFORMATION
--------------------- ---------------------
This driver support the ks0108 LCD controller. This driver supports the ks0108 LCD controller.
--------------------- ---------------------

View file

@ -390,6 +390,10 @@ If you have several tasks to attach, you have to do it one after another:
... ...
# /bin/echo PIDn > tasks # /bin/echo PIDn > tasks
You can attach the current shell task by echoing 0:
# echo 0 > tasks
3. Kernel API 3. Kernel API
============= =============

View file

@ -13,7 +13,7 @@ either an integer or * for all. Access is a composition of r
The root device cgroup starts with rwm to 'all'. A child device The root device cgroup starts with rwm to 'all'. A child device
cgroup gets a copy of the parent. Administrators can then remove cgroup gets a copy of the parent. Administrators can then remove
devices from the whitelist or add new entries. A child cgroup can devices from the whitelist or add new entries. A child cgroup can
never receive a device access which is denied its parent. However never receive a device access which is denied by its parent. However
when a device access is removed from a parent it will not also be when a device access is removed from a parent it will not also be
removed from the child(ren). removed from the child(ren).
@ -29,7 +29,11 @@ allows cgroup 1 to read and mknod the device usually known as
echo a > /cgroups/1/devices.deny echo a > /cgroups/1/devices.deny
will remove the default 'a *:* mrw' entry. will remove the default 'a *:* rwm' entry. Doing
echo a > /cgroups/1/devices.allow
will add the 'a *:* rwm' entry to the whitelist.
3. Security 3. Security

View file

@ -154,13 +154,15 @@ browsing and modifying the cpusets presently known to the kernel. No
new system calls are added for cpusets - all support for querying and new system calls are added for cpusets - all support for querying and
modifying cpusets is via this cpuset file system. modifying cpusets is via this cpuset file system.
The /proc/<pid>/status file for each task has two added lines, The /proc/<pid>/status file for each task has four added lines,
displaying the tasks cpus_allowed (on which CPUs it may be scheduled) displaying the tasks cpus_allowed (on which CPUs it may be scheduled)
and mems_allowed (on which Memory Nodes it may obtain memory), and mems_allowed (on which Memory Nodes it may obtain memory),
in the format seen in the following example: in the two formats seen in the following example:
Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff
Cpus_allowed_list: 0-127
Mems_allowed: ffffffff,ffffffff Mems_allowed: ffffffff,ffffffff
Mems_allowed_list: 0-63
Each cpuset is represented by a directory in the cgroup file system Each cpuset is represented by a directory in the cgroup file system
containing (on top of the standard cgroup files) the following containing (on top of the standard cgroup files) the following
@ -544,6 +546,9 @@ otherwise initial value -1 that indicates the cpuset has no request.
( 4 : search nodes in a chunk of node [on NUMA system] ) ( 4 : search nodes in a chunk of node [on NUMA system] )
( 5 : search system wide [on NUMA system] ) ( 5 : search system wide [on NUMA system] )
The system default is architecture dependent. The system default
can be changed using the relax_domain_level= boot parameter.
This file is per-cpuset and affect the sched domain where the cpuset This file is per-cpuset and affect the sched domain where the cpuset
belongs to. Therefore if the flag 'sched_load_balance' of a cpuset belongs to. Therefore if the flag 'sched_load_balance' of a cpuset
is disabled, then 'sched_relax_domain_level' have no effect since is disabled, then 'sched_relax_domain_level' have no effect since

View file

@ -312,3 +312,12 @@ When: 2.6.26
Why: Implementation became generic; users should now include Why: Implementation became generic; users should now include
linux/semaphore.h instead. linux/semaphore.h instead.
Who: Matthew Wilcox <willy@linux.intel.com> Who: Matthew Wilcox <willy@linux.intel.com>
---------------------------
What: CONFIG_THERMAL_HWMON
When: January 2009
Why: This option was introduced just to allow older lm-sensors userspace
to keep working over the upgrade to 2.6.26. At the scheduled time of
removal fixed lm-sensors (2.x or 3.x) should be readily available.
Who: Rene Herman <rene.herman@gmail.com>

1353
Documentation/ftrace.txt Normal file

File diff suppressed because it is too large Load diff

View file

@ -25,12 +25,23 @@ routines, and should be zero-initialized except for fields with data you
provide. A client structure holds device-specific information like the provide. A client structure holds device-specific information like the
driver model device node, and its I2C address. driver model device node, and its I2C address.
/* iff driver uses driver model ("new style") binding model: */
static struct i2c_device_id foo_idtable[] = {
{ "foo", my_id_for_foo },
{ "bar", my_id_for_bar },
{ }
};
MODULE_DEVICE_TABLE(i2c, foo_idtable);
static struct i2c_driver foo_driver = { static struct i2c_driver foo_driver = {
.driver = { .driver = {
.name = "foo", .name = "foo",
}, },
/* iff driver uses driver model ("new style") binding model: */ /* iff driver uses driver model ("new style") binding model: */
.id_table = foo_ids,
.probe = foo_probe, .probe = foo_probe,
.remove = foo_remove, .remove = foo_remove,
@ -173,10 +184,9 @@ handle may be used during foo_probe(). If foo_probe() reports success
(zero not a negative status code) it may save the handle and use it until (zero not a negative status code) it may save the handle and use it until
foo_remove() returns. That binding model is used by most Linux drivers. foo_remove() returns. That binding model is used by most Linux drivers.
Drivers match devices when i2c_client.driver_name and the driver name are The probe function is called when an entry in the id_table name field
the same; this approach is used in several other busses that don't have matches the device's name. It is passed the entry that was matched so
device typing support in the hardware. The driver and module name should the driver knows which one in the table matched.
match, so hotplug/coldplug mechanisms will modprobe the driver.
Device Creation (Standard driver model) Device Creation (Standard driver model)

View file

@ -295,7 +295,7 @@ and is between 256 and 4096 characters. It is defined in the file
when initialising the APIC and IO-APIC components. when initialising the APIC and IO-APIC components.
apm= [APM] Advanced Power Management apm= [APM] Advanced Power Management
See header of arch/i386/kernel/apm.c. See header of arch/x86/kernel/apm_32.c.
arcrimi= [HW,NET] ARCnet - "RIM I" (entirely mem-mapped) cards arcrimi= [HW,NET] ARCnet - "RIM I" (entirely mem-mapped) cards
Format: <io>,<irq>,<nodeID> Format: <io>,<irq>,<nodeID>
@ -638,7 +638,7 @@ and is between 256 and 4096 characters. It is defined in the file
elanfreq= [X86-32] elanfreq= [X86-32]
See comment before function elanfreq_setup() in See comment before function elanfreq_setup() in
arch/i386/kernel/cpu/cpufreq/elanfreq.c. arch/x86/kernel/cpu/cpufreq/elanfreq.c.
elevator= [IOSCHED] elevator= [IOSCHED]
Format: {"anticipatory" | "cfq" | "deadline" | "noop"} Format: {"anticipatory" | "cfq" | "deadline" | "noop"}
@ -1679,6 +1679,10 @@ and is between 256 and 4096 characters. It is defined in the file
Format: <reboot_mode>[,<reboot_mode2>[,...]] Format: <reboot_mode>[,<reboot_mode2>[,...]]
See arch/*/kernel/reboot.c or arch/*/kernel/process.c See arch/*/kernel/reboot.c or arch/*/kernel/process.c
relax_domain_level=
[KNL, SMP] Set scheduler's default relax_domain_level.
See Documentation/cpusets.txt.
reserve= [KNL,BUGS] Force the kernel to ignore some iomem area reserve= [KNL,BUGS] Force the kernel to ignore some iomem area
reservetop= [X86-32] reservetop= [X86-32]

View file

@ -81,23 +81,23 @@ inet_peer_minttl - INTEGER
Minimum time-to-live of entries. Should be enough to cover fragment Minimum time-to-live of entries. Should be enough to cover fragment
time-to-live on the reassembling side. This minimum time-to-live is time-to-live on the reassembling side. This minimum time-to-live is
guaranteed if the pool size is less than inet_peer_threshold. guaranteed if the pool size is less than inet_peer_threshold.
Measured in jiffies(1). Measured in seconds.
inet_peer_maxttl - INTEGER inet_peer_maxttl - INTEGER
Maximum time-to-live of entries. Unused entries will expire after Maximum time-to-live of entries. Unused entries will expire after
this period of time if there is no memory pressure on the pool (i.e. this period of time if there is no memory pressure on the pool (i.e.
when the number of entries in the pool is very small). when the number of entries in the pool is very small).
Measured in jiffies(1). Measured in seconds.
inet_peer_gc_mintime - INTEGER inet_peer_gc_mintime - INTEGER
Minimum interval between garbage collection passes. This interval is Minimum interval between garbage collection passes. This interval is
in effect under high memory pressure on the pool. in effect under high memory pressure on the pool.
Measured in jiffies(1). Measured in seconds.
inet_peer_gc_maxtime - INTEGER inet_peer_gc_maxtime - INTEGER
Minimum interval between garbage collection passes. This interval is Minimum interval between garbage collection passes. This interval is
in effect under low (or absent) memory pressure on the pool. in effect under low (or absent) memory pressure on the pool.
Measured in jiffies(1). Measured in seconds.
TCP variables: TCP variables:
@ -794,10 +794,6 @@ tag - INTEGER
Allows you to write a number, which can be used as required. Allows you to write a number, which can be used as required.
Default value is 0. Default value is 0.
(1) Jiffie: internal timeunit for the kernel. On the i386 1/100s, on the
Alpha 1/1024s. See the HZ define in /usr/include/asm/param.h for the exact
value on your system.
Alexey Kuznetsov. Alexey Kuznetsov.
kuznet@ms2.inr.ac.ru kuznet@ms2.inr.ac.ru

View file

@ -83,9 +83,9 @@ Valid range: Limited by memory on system
Default: 30 Default: 30
e. intr_type e. intr_type
Specifies interrupt type. Possible values 1(INTA), 2(MSI), 3(MSI-X) Specifies interrupt type. Possible values 0(INTA), 2(MSI-X)
Valid range: 1-3 Valid values: 0, 2
Default: 1 Default: 2
5. Performance suggestions 5. Performance suggestions
General: General:

View file

@ -1,4 +1,4 @@
0 -> Unknown board (au0828) 0 -> Unknown board (au0828)
1 -> Hauppauge HVR950Q (au0828) [2040:7200] 1 -> Hauppauge HVR950Q (au0828) [2040:7200,2040:7210,2040:7217,2040:721b,2040:721f,2040:7280,0fd9:0008]
2 -> Hauppauge HVR850 (au0828) [2040:7240] 2 -> Hauppauge HVR850 (au0828) [2040:7240]
3 -> DViCO FusionHDTV USB (au0828) [0fe9:d620] 3 -> DViCO FusionHDTV USB (au0828) [0fe9:d620]

View file

@ -1,7 +1,7 @@
/* /*
* Slabinfo: Tool to get reports about slabs * Slabinfo: Tool to get reports about slabs
* *
* (C) 2007 sgi, Christoph Lameter <clameter@sgi.com> * (C) 2007 sgi, Christoph Lameter
* *
* Compile by: * Compile by:
* *
@ -99,7 +99,7 @@ void fatal(const char *x, ...)
void usage(void) void usage(void)
{ {
printf("slabinfo 5/7/2007. (c) 2007 sgi. clameter@sgi.com\n\n" printf("slabinfo 5/7/2007. (c) 2007 sgi.\n\n"
"slabinfo [-ahnpvtsz] [-d debugopts] [slab-regexp]\n" "slabinfo [-ahnpvtsz] [-d debugopts] [slab-regexp]\n"
"-a|--aliases Show aliases\n" "-a|--aliases Show aliases\n"
"-A|--activity Most active slabs first\n" "-A|--activity Most active slabs first\n"

View file

@ -266,4 +266,4 @@ of other objects.
slub_debug=FZ,dentry slub_debug=FZ,dentry
Christoph Lameter, <clameter@sgi.com>, May 30, 2007 Christoph Lameter, May 30, 2007

View file

@ -763,9 +763,10 @@ S: Maintained
AUXILIARY DISPLAY DRIVERS AUXILIARY DISPLAY DRIVERS
P: Miguel Ojeda Sandonis P: Miguel Ojeda Sandonis
M: maxextreme@gmail.com M: miguel.ojeda.sandonis@gmail.com
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
W: http://auxdisplay.googlepages.com/ W: http://miguelojeda.es/auxdisplay.htm
W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
S: Maintained S: Maintained
AVR32 ARCHITECTURE AVR32 ARCHITECTURE
@ -1055,16 +1056,18 @@ S: Supported
CFAG12864B LCD DRIVER CFAG12864B LCD DRIVER
P: Miguel Ojeda Sandonis P: Miguel Ojeda Sandonis
M: maxextreme@gmail.com M: miguel.ojeda.sandonis@gmail.com
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
W: http://auxdisplay.googlepages.com/ W: http://miguelojeda.es/auxdisplay.htm
W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
S: Maintained S: Maintained
CFAG12864BFB LCD FRAMEBUFFER DRIVER CFAG12864BFB LCD FRAMEBUFFER DRIVER
P: Miguel Ojeda Sandonis P: Miguel Ojeda Sandonis
M: maxextreme@gmail.com M: miguel.ojeda.sandonis@gmail.com
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
W: http://auxdisplay.googlepages.com/ W: http://miguelojeda.es/auxdisplay.htm
W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
S: Maintained S: Maintained
CFG80211 and NL80211 CFG80211 and NL80211
@ -1420,6 +1423,14 @@ M: kristen.c.accardi@intel.com
L: linux-acpi@vger.kernel.org L: linux-acpi@vger.kernel.org
S: Supported S: Supported
DOCUMENTATION (/Documentation directory)
P: Michael Kerrisk
M: mtk.manpages@gmail.com
P: Randy Dunlap
M: rdunlap@xenotime.net
L: linux-doc@vger.kernel.org
S: Maintained
DOUBLETALK DRIVER DOUBLETALK DRIVER
P: James R. Van Zandt P: James R. Van Zandt
M: jrv@vanzandt.mv.com M: jrv@vanzandt.mv.com
@ -1626,13 +1637,13 @@ S: Maintained
EXT3 FILE SYSTEM EXT3 FILE SYSTEM
P: Stephen Tweedie, Andrew Morton P: Stephen Tweedie, Andrew Morton
M: sct@redhat.com, akpm@linux-foundation.org, adilger@clusterfs.com M: sct@redhat.com, akpm@linux-foundation.org, adilger@sun.com
L: linux-ext4@vger.kernel.org L: linux-ext4@vger.kernel.org
S: Maintained S: Maintained
EXT4 FILE SYSTEM EXT4 FILE SYSTEM
P: Stephen Tweedie, Andrew Morton P: Stephen Tweedie, Andrew Morton
M: sct@redhat.com, akpm@linux-foundation.org, adilger@clusterfs.com M: sct@redhat.com, akpm@linux-foundation.org, adilger@sun.com
L: linux-ext4@vger.kernel.org L: linux-ext4@vger.kernel.org
S: Maintained S: Maintained
@ -2428,9 +2439,10 @@ S: Maintained
KS0108 LCD CONTROLLER DRIVER KS0108 LCD CONTROLLER DRIVER
P: Miguel Ojeda Sandonis P: Miguel Ojeda Sandonis
M: maxextreme@gmail.com M: miguel.ojeda.sandonis@gmail.com
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
W: http://auxdisplay.googlepages.com/ W: http://miguelojeda.es/auxdisplay.htm
W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
S: Maintained S: Maintained
LAPB module LAPB module
@ -2474,9 +2486,11 @@ M: James.Bottomley@HansenPartnership.com
W: http://www.hansenpartnership.com/voyager W: http://www.hansenpartnership.com/voyager
S: Maintained S: Maintained
LINUX FOR POWERPC LINUX FOR POWERPC (32-BIT AND 64-BIT)
P: Paul Mackerras P: Paul Mackerras
M: paulus@samba.org M: paulus@samba.org
P: Benjamin Herrenschmidt
M: benh@kernel.crashing.org
W: http://www.penguinppc.org/ W: http://www.penguinppc.org/
L: linuxppc-dev@ozlabs.org L: linuxppc-dev@ozlabs.org
T: git kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc.git T: git kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc.git
@ -2516,13 +2530,6 @@ W: http://wiki.secretlab.ca/index.php/Linux_on_Xilinx_Virtex
L: linuxppc-dev@ozlabs.org L: linuxppc-dev@ozlabs.org
S: Maintained S: Maintained
LINUX FOR POWERPC BOOT CODE
P: Tom Rini
M: trini@kernel.crashing.org
W: http://www.penguinppc.org/
L: linuxppc-dev@ozlabs.org
S: Maintained
LINUX FOR POWERPC EMBEDDED PPC8XX LINUX FOR POWERPC EMBEDDED PPC8XX
P: Vitaly Bordug P: Vitaly Bordug
M: vitb@kernel.crashing.org M: vitb@kernel.crashing.org
@ -2551,17 +2558,6 @@ P: Arnaldo Carvalho de Melo
M: acme@ghostprotocols.net M: acme@ghostprotocols.net
S: Maintained S: Maintained
LINUX FOR 64BIT POWERPC
P: Paul Mackerras
M: paulus@samba.org
M: paulus@au.ibm.com
P: Anton Blanchard
M: anton@samba.org
M: anton@au.ibm.com
W: http://www.penguinppc.org/ppc64/
L: linuxppc-dev@ozlabs.org
S: Supported
LINUX SECURITY MODULE (LSM) FRAMEWORK LINUX SECURITY MODULE (LSM) FRAMEWORK
P: Chris Wright P: Chris Wright
M: chrisw@sous-sol.org M: chrisw@sous-sol.org
@ -2680,8 +2676,8 @@ S: Supported
MAN-PAGES: MANUAL PAGES FOR LINUX -- Sections 2, 3, 4, 5, and 7 MAN-PAGES: MANUAL PAGES FOR LINUX -- Sections 2, 3, 4, 5, and 7
P: Michael Kerrisk P: Michael Kerrisk
M: mtk.manpages@gmail.com M: mtk.manpages@gmail.com
W: ftp://ftp.kernel.org/pub/linux/docs/manpages W: http://www.kernel.org/doc/man-pages
S: Maintained S: Supported
MARVELL LIBERTAS WIRELESS DRIVER MARVELL LIBERTAS WIRELESS DRIVER
P: Dan Williams P: Dan Williams
@ -2814,6 +2810,12 @@ W: https://tango.0pointer.de/mailman/listinfo/s270-linux
W: http://0pointer.de/lennart/tchibo.html W: http://0pointer.de/lennart/tchibo.html
S: Maintained S: Maintained
MULTIFUNCTION DEVICES (MFD)
P: Samuel Ortiz
M: sameo@openedhand.com
L: linux-kernel@vger.kernel.org
S: Supported
MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND SDIO SUBSYSTEM MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND SDIO SUBSYSTEM
P: Pierre Ossman P: Pierre Ossman
M: drzeus-mmc@drzeus.cx M: drzeus-mmc@drzeus.cx
@ -3195,8 +3197,8 @@ L: netdev@vger.kernel.org
S: Maintained S: Maintained
PER-TASK DELAY ACCOUNTING PER-TASK DELAY ACCOUNTING
P: Shailabh Nagar P: Balbir Singh
M: nagar@watson.ibm.com M: balbir@linux.vnet.ibm.com
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
S: Maintained S: Maintained
@ -3688,7 +3690,7 @@ S: Maintained
SLAB ALLOCATOR SLAB ALLOCATOR
P: Christoph Lameter P: Christoph Lameter
M: clameter@sgi.com M: cl@linux-foundation.org
P: Pekka Enberg P: Pekka Enberg
M: penberg@cs.helsinki.fi M: penberg@cs.helsinki.fi
P: Matt Mackall P: Matt Mackall
@ -3898,8 +3900,8 @@ M: hch@infradead.org
S: Maintained S: Maintained
TASKSTATS STATISTICS INTERFACE TASKSTATS STATISTICS INTERFACE
P: Shailabh Nagar P: Balbir Singh
M: nagar@watson.ibm.com M: balbir@linux.vnet.ibm.com
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
S: Maintained S: Maintained
@ -3995,7 +3997,8 @@ W: http://www.buzzard.org.uk/toshiba/
S: Maintained S: Maintained
TPM DEVICE DRIVER TPM DEVICE DRIVER
P: Kylene Hall P: Debora Velarde
P: Rajiv Andrade
M: tpmdd-devel@lists.sourceforge.net M: tpmdd-devel@lists.sourceforge.net
W: http://tpmdd.sourceforge.net W: http://tpmdd.sourceforge.net
P: Marcel Selhorst P: Marcel Selhorst
@ -4314,6 +4317,14 @@ L: netdev@vger.kernel.org
W: http://www.linux-usb.org/usbnet W: http://www.linux-usb.org/usbnet
S: Maintained S: Maintained
USB VIDEO CLASS
P: Laurent Pinchart
M: laurent.pinchart@skynet.be
L: linx-uvc-devel@berlios.de
L: video4linux-list@redhat.com
W: http://linux-uvc.berlios.de
S: Maintained
USB W996[87]CF DRIVER USB W996[87]CF DRIVER
P: Luca Risolia P: Luca Risolia
M: luca.risolia@studio.unibo.it M: luca.risolia@studio.unibo.it

View file

@ -1,7 +1,7 @@
VERSION = 2 VERSION = 2
PATCHLEVEL = 6 PATCHLEVEL = 6
SUBLEVEL = 26 SUBLEVEL = 26
EXTRAVERSION = -rc8 EXTRAVERSION = -rc9
NAME = Rotary Wombat NAME = Rotary Wombat
# *DOCUMENTATION* # *DOCUMENTATION*

View file

@ -25,6 +25,13 @@ SECTIONS
} :kernel } :kernel
_etext = .; /* End of text section */ _etext = .; /* End of text section */
NOTES :kernel :note
.dummy : {
*(.dummy)
} :kernel
RODATA
/* Exception table */ /* Exception table */
. = ALIGN(16); . = ALIGN(16);
__ex_table : { __ex_table : {
@ -33,13 +40,6 @@ SECTIONS
__stop___ex_table = .; __stop___ex_table = .;
} }
NOTES :kernel :note
.dummy : {
*(.dummy)
} :kernel
RODATA
/* Will be freed after init */ /* Will be freed after init */
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
/* Init code and data */ /* Init code and data */

View file

@ -650,7 +650,8 @@ EXPORT_SYMBOL(dma_map_sg);
EXPORT_SYMBOL(dma_unmap_sg); EXPORT_SYMBOL(dma_unmap_sg);
EXPORT_SYMBOL(dma_sync_single_for_cpu); EXPORT_SYMBOL(dma_sync_single_for_cpu);
EXPORT_SYMBOL(dma_sync_single_for_device); EXPORT_SYMBOL(dma_sync_single_for_device);
EXPORT_SYMBOL(dma_sync_sg); EXPORT_SYMBOL(dma_sync_sg_for_cpu);
EXPORT_SYMBOL(dma_sync_sg_for_device);
EXPORT_SYMBOL(dmabounce_register_dev); EXPORT_SYMBOL(dmabounce_register_dev);
EXPORT_SYMBOL(dmabounce_unregister_dev); EXPORT_SYMBOL(dmabounce_unregister_dev);

View file

@ -42,7 +42,7 @@
#define GPMC_STATUS 0x54 #define GPMC_STATUS 0x54
#define GPMC_PREFETCH_CONFIG1 0x1e0 #define GPMC_PREFETCH_CONFIG1 0x1e0
#define GPMC_PREFETCH_CONFIG2 0x1e4 #define GPMC_PREFETCH_CONFIG2 0x1e4
#define GPMC_PREFETCH_CONTROL 0x1e8 #define GPMC_PREFETCH_CONTROL 0x1ec
#define GPMC_PREFETCH_STATUS 0x1f0 #define GPMC_PREFETCH_STATUS 0x1f0
#define GPMC_ECC_CONFIG 0x1f4 #define GPMC_ECC_CONFIG 0x1f4
#define GPMC_ECC_CONTROL 0x1f8 #define GPMC_ECC_CONTROL 0x1f8

View file

@ -74,6 +74,8 @@ static DEFINE_SPINLOCK(boot_lock);
void __cpuinit platform_secondary_init(unsigned int cpu) void __cpuinit platform_secondary_init(unsigned int cpu)
{ {
trace_hardirqs_off();
/* /*
* the primary core may have used a "cross call" soft interrupt * the primary core may have used a "cross call" soft interrupt
* to get this processor out of WFI in the BootMonitor - make * to get this processor out of WFI in the BootMonitor - make

View file

@ -501,8 +501,6 @@ static inline void omap_enable_channel_irq(int lch)
/* Enable some nice interrupts. */ /* Enable some nice interrupts. */
OMAP_DMA_CICR_REG(lch) = dma_chan[lch].enabled_irqs; OMAP_DMA_CICR_REG(lch) = dma_chan[lch].enabled_irqs;
dma_chan[lch].flags |= OMAP_DMA_ACTIVE;
} }
static void omap_disable_channel_irq(int lch) static void omap_disable_channel_irq(int lch)

View file

@ -254,7 +254,8 @@ close_cplbtab(struct cplb_tab *table)
} }
/* helper function */ /* helper function */
static void __fill_code_cplbtab(struct cplb_tab *t, int i, u32 a_start, u32 a_end) static void __init
__fill_code_cplbtab(struct cplb_tab *t, int i, u32 a_start, u32 a_end)
{ {
if (cplb_data[i].psize) { if (cplb_data[i].psize) {
fill_cplbtab(t, fill_cplbtab(t,
@ -291,7 +292,8 @@ static void __fill_code_cplbtab(struct cplb_tab *t, int i, u32 a_start, u32 a_en
} }
} }
static void __fill_data_cplbtab(struct cplb_tab *t, int i, u32 a_start, u32 a_end) static void __init
__fill_data_cplbtab(struct cplb_tab *t, int i, u32 a_start, u32 a_end)
{ {
if (cplb_data[i].psize) { if (cplb_data[i].psize) {
fill_cplbtab(t, fill_cplbtab(t,

View file

@ -60,9 +60,14 @@ static struct irq_chip bad_chip = {
}; };
static struct irq_desc bad_irq_desc = { static struct irq_desc bad_irq_desc = {
.status = IRQ_DISABLED,
.chip = &bad_chip, .chip = &bad_chip,
.handle_irq = handle_bad_irq, .handle_irq = handle_bad_irq,
.depth = 1, .depth = 1,
.lock = __SPIN_LOCK_UNLOCKED(irq_desc->lock),
#ifdef CONFIG_SMP
.affinity = CPU_MASK_ALL
#endif
}; };
int show_interrupts(struct seq_file *p, void *v) int show_interrupts(struct seq_file *p, void *v)

View file

@ -547,7 +547,8 @@ setup_arch (char **cmdline_p)
# ifdef CONFIG_ACPI_NUMA # ifdef CONFIG_ACPI_NUMA
acpi_numa_init(); acpi_numa_init();
per_cpu_scan_finalize((cpus_weight(early_cpu_possible_map) == 0 ? per_cpu_scan_finalize((cpus_weight(early_cpu_possible_map) == 0 ?
32 : cpus_weight(early_cpu_possible_map)), additional_cpus); 32 : cpus_weight(early_cpu_possible_map)),
additional_cpus > 0 ? additional_cpus : 0);
# endif # endif
#else #else
# ifdef CONFIG_SMP # ifdef CONFIG_SMP

View file

@ -117,6 +117,7 @@ void account_system_vtime(struct task_struct *tsk)
local_irq_restore(flags); local_irq_restore(flags);
} }
EXPORT_SYMBOL_GPL(account_system_vtime);
/* /*
* Called from the timer interrupt handler to charge accumulated user time * Called from the timer interrupt handler to charge accumulated user time

View file

@ -1006,7 +1006,7 @@ config BOOT_ELF32
config MIPS_L1_CACHE_SHIFT config MIPS_L1_CACHE_SHIFT
int int
default "4" if MACH_DECSTATION default "4" if MACH_DECSTATION
default "7" if SGI_IP27 || SGI_IP28 || SNI_RM default "7" if SGI_IP22 || SGI_IP27 || SGI_IP28 || SNI_RM
default "4" if PMC_MSP4200_EVAL default "4" if PMC_MSP4200_EVAL
default "5" default "5"

View file

@ -161,6 +161,9 @@ void __init txx9_tmr_init(unsigned long baseaddr)
struct txx9_tmr_reg __iomem *tmrptr; struct txx9_tmr_reg __iomem *tmrptr;
tmrptr = ioremap(baseaddr, sizeof(struct txx9_tmr_reg)); tmrptr = ioremap(baseaddr, sizeof(struct txx9_tmr_reg));
/* Start once to make CounterResetEnable effective */
__raw_writel(TXx9_TMTCR_CRE | TXx9_TMTCR_TCE, &tmrptr->tcr);
/* Stop and reset the counter */
__raw_writel(TXx9_TMTCR_CRE, &tmrptr->tcr); __raw_writel(TXx9_TMTCR_CRE, &tmrptr->tcr);
__raw_writel(0, &tmrptr->tisr); __raw_writel(0, &tmrptr->tisr);
__raw_writel(0xffffffff, &tmrptr->cpra); __raw_writel(0xffffffff, &tmrptr->cpra);

View file

@ -26,7 +26,7 @@
static unsigned long icache_size, dcache_size; /* Size in bytes */ static unsigned long icache_size, dcache_size; /* Size in bytes */
static unsigned long icache_lsize, dcache_lsize; /* Size in bytes */ static unsigned long icache_lsize, dcache_lsize; /* Size in bytes */
unsigned long __init r3k_cache_size(unsigned long ca_flags) unsigned long __cpuinit r3k_cache_size(unsigned long ca_flags)
{ {
unsigned long flags, status, dummy, size; unsigned long flags, status, dummy, size;
volatile unsigned long *p; volatile unsigned long *p;
@ -61,7 +61,7 @@ unsigned long __init r3k_cache_size(unsigned long ca_flags)
return size * sizeof(*p); return size * sizeof(*p);
} }
unsigned long __init r3k_cache_lsize(unsigned long ca_flags) unsigned long __cpuinit r3k_cache_lsize(unsigned long ca_flags)
{ {
unsigned long flags, status, lsize, i; unsigned long flags, status, lsize, i;
volatile unsigned long *p; volatile unsigned long *p;
@ -90,7 +90,7 @@ unsigned long __init r3k_cache_lsize(unsigned long ca_flags)
return lsize * sizeof(*p); return lsize * sizeof(*p);
} }
static void __init r3k_probe_cache(void) static void __cpuinit r3k_probe_cache(void)
{ {
dcache_size = r3k_cache_size(ST0_ISC); dcache_size = r3k_cache_size(ST0_ISC);
if (dcache_size) if (dcache_size)

View file

@ -235,13 +235,12 @@ static void __cpuinit set_prefetch_parameters(void)
} }
/* /*
* Too much unrolling will overflow the available space in * Too much unrolling will overflow the available space in
* clear_space_array / copy_page_array. 8 words sounds generous, * clear_space_array / copy_page_array.
* but a R4000 with 128 byte L2 line length can exceed even that.
*/ */
half_clear_loop_size = min(8 * clear_word_size, half_clear_loop_size = min(16 * clear_word_size,
max(cache_line_size >> 1, max(cache_line_size >> 1,
4 * clear_word_size)); 4 * clear_word_size));
half_copy_loop_size = min(8 * copy_word_size, half_copy_loop_size = min(16 * copy_word_size,
max(cache_line_size >> 1, max(cache_line_size >> 1,
4 * copy_word_size)); 4 * copy_word_size));
} }
@ -263,21 +262,23 @@ static inline void __cpuinit build_clear_pref(u32 **buf, int off)
if (pref_bias_clear_store) { if (pref_bias_clear_store) {
uasm_i_pref(buf, pref_dst_mode, pref_bias_clear_store + off, uasm_i_pref(buf, pref_dst_mode, pref_bias_clear_store + off,
A0); A0);
} else if (cpu_has_cache_cdex_s) { } else if (cache_line_size == (half_clear_loop_size << 1)) {
uasm_i_cache(buf, Create_Dirty_Excl_SD, off, A0); if (cpu_has_cache_cdex_s) {
} else if (cpu_has_cache_cdex_p) { uasm_i_cache(buf, Create_Dirty_Excl_SD, off, A0);
if (R4600_V1_HIT_CACHEOP_WAR && cpu_is_r4600_v1_x()) { } else if (cpu_has_cache_cdex_p) {
uasm_i_nop(buf); if (R4600_V1_HIT_CACHEOP_WAR && cpu_is_r4600_v1_x()) {
uasm_i_nop(buf); uasm_i_nop(buf);
uasm_i_nop(buf); uasm_i_nop(buf);
uasm_i_nop(buf); uasm_i_nop(buf);
uasm_i_nop(buf);
}
if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
uasm_i_lw(buf, ZERO, ZERO, AT);
uasm_i_cache(buf, Create_Dirty_Excl_D, off, A0);
}
} }
if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
uasm_i_lw(buf, ZERO, ZERO, AT);
uasm_i_cache(buf, Create_Dirty_Excl_D, off, A0);
}
} }
void __cpuinit build_clear_page(void) void __cpuinit build_clear_page(void)
@ -403,20 +404,22 @@ static inline void build_copy_store_pref(u32 **buf, int off)
if (pref_bias_copy_store) { if (pref_bias_copy_store) {
uasm_i_pref(buf, pref_dst_mode, pref_bias_copy_store + off, uasm_i_pref(buf, pref_dst_mode, pref_bias_copy_store + off,
A0); A0);
} else if (cpu_has_cache_cdex_s) { } else if (cache_line_size == (half_copy_loop_size << 1)) {
uasm_i_cache(buf, Create_Dirty_Excl_SD, off, A0); if (cpu_has_cache_cdex_s) {
} else if (cpu_has_cache_cdex_p) { uasm_i_cache(buf, Create_Dirty_Excl_SD, off, A0);
if (R4600_V1_HIT_CACHEOP_WAR && cpu_is_r4600_v1_x()) { } else if (cpu_has_cache_cdex_p) {
uasm_i_nop(buf); if (R4600_V1_HIT_CACHEOP_WAR && cpu_is_r4600_v1_x()) {
uasm_i_nop(buf); uasm_i_nop(buf);
uasm_i_nop(buf); uasm_i_nop(buf);
uasm_i_nop(buf); uasm_i_nop(buf);
uasm_i_nop(buf);
}
if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
uasm_i_lw(buf, ZERO, ZERO, AT);
uasm_i_cache(buf, Create_Dirty_Excl_D, off, A0);
} }
if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
uasm_i_lw(buf, ZERO, ZERO, AT);
uasm_i_cache(buf, Create_Dirty_Excl_D, off, A0);
} }
} }

View file

@ -86,7 +86,7 @@ static void rm7k_sc_inv(unsigned long addr, unsigned long size)
/* /*
* This function is executed in uncached address space. * This function is executed in uncached address space.
*/ */
static __init void __rm7k_sc_enable(void) static __cpuinit void __rm7k_sc_enable(void)
{ {
int i; int i;
@ -107,7 +107,7 @@ static __init void __rm7k_sc_enable(void)
} }
} }
static __init void rm7k_sc_enable(void) static __cpuinit void rm7k_sc_enable(void)
{ {
if (read_c0_config() & RM7K_CONF_SE) if (read_c0_config() & RM7K_CONF_SE)
return; return;

View file

@ -425,6 +425,11 @@ static void ip32_irq0(void)
BUILD_BUG_ON(MACEISA_SERIAL2_RDMAOR_IRQ - MACEISA_AUDIO_SW_IRQ != 31); BUILD_BUG_ON(MACEISA_SERIAL2_RDMAOR_IRQ - MACEISA_AUDIO_SW_IRQ != 31);
crime_int = crime->istat & crime_mask; crime_int = crime->istat & crime_mask;
/* crime sometime delivers spurious interrupts, ignore them */
if (unlikely(crime_int == 0))
return;
irq = MACE_VID_IN1_IRQ + __ffs(crime_int); irq = MACE_VID_IN1_IRQ + __ffs(crime_int);
if (crime_int & CRIME_MACEISA_INT_MASK) { if (crime_int & CRIME_MACEISA_INT_MASK) {

View file

@ -10,8 +10,11 @@
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/pgtable.h>
EXPORT_SYMBOL(empty_zero_page);
EXPORT_SYMBOL(change_bit); EXPORT_SYMBOL(change_bit);
EXPORT_SYMBOL(test_and_change_bit); EXPORT_SYMBOL(test_and_change_bit);
@ -31,7 +34,9 @@ extern u64 __ashrdi3(u64, unsigned);
extern u64 __ashldi3(u64, unsigned); extern u64 __ashldi3(u64, unsigned);
extern u64 __lshrdi3(u64, unsigned); extern u64 __lshrdi3(u64, unsigned);
extern s64 __negdi2(s64); extern s64 __negdi2(s64);
extern int __ucmpdi2(u64, u64);
EXPORT_SYMBOL(__ashrdi3); EXPORT_SYMBOL(__ashrdi3);
EXPORT_SYMBOL(__ashldi3); EXPORT_SYMBOL(__ashldi3);
EXPORT_SYMBOL(__lshrdi3); EXPORT_SYMBOL(__lshrdi3);
EXPORT_SYMBOL(__negdi2); EXPORT_SYMBOL(__negdi2);
EXPORT_SYMBOL(__ucmpdi2);

View file

@ -153,6 +153,7 @@ int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0,
NULL, NULL); NULL, NULL);
} }
EXPORT_SYMBOL(kernel_thread);
/* /*
* free current thread data structures etc.. * free current thread data structures etc..

View file

@ -4,4 +4,4 @@
lib-y = delay.o usercopy.o checksum.o bitops.o memcpy.o memmove.o memset.o lib-y = delay.o usercopy.o checksum.o bitops.o memcpy.o memmove.o memset.o
lib-y += do_csum.o lib-y += do_csum.o
lib-y += __ashldi3.o __ashrdi3.o __lshrdi3.o negdi2.o lib-y += __ashldi3.o __ashrdi3.o __lshrdi3.o negdi2.o __ucmpdi2.o

View file

@ -0,0 +1,43 @@
/* __ucmpdi2.S: 64-bit unsigned compare
*
* Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
* Written by David Howells (dhowells@redhat.com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
.text
.p2align 4
###############################################################################
#
# int __ucmpdi2(unsigned long long a [D0:D1],
# unsigned long long b [(SP,12),(SP,16)])
#
# - returns 0, 1, or 2 as a <, =, > b respectively.
#
###############################################################################
.globl __ucmpdi2
.type __ucmpdi2,@function
__ucmpdi2:
mov (12,sp),a0 # b.lsw
mov (16,sp),a1 # b.msw
sub a0,d0
subc a1,d1 # may clear Z, never sets it
bne __ucmpdi2_differ # a.msw != b.msw
mov +1,d0
rets
__ucmpdi2_differ:
# C flag is set if LE, clear if GE
subc d0,d0 # -1 if LE, 0 if GE
add +1,d0 # 0 if LE, 1 if GE
add d0,d0 # 0 if LE, 2 if GE
rets
.size __ucmpdi2, .-__ucmpdi2

View file

@ -273,7 +273,8 @@ endif
initrd- := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-)) initrd- := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-))
initrd-y := $(patsubst zImage%, zImage.initrd%, \ initrd-y := $(patsubst zImage%, zImage.initrd%, \
$(patsubst dtbImage%, dtbImage.initrd%, \ $(patsubst dtbImage%, dtbImage.initrd%, \
$(patsubst treeImage%, treeImage.initrd%, $(image-y)))) $(patsubst simpleImage%, simpleImage.initrd%, \
$(patsubst treeImage%, treeImage.initrd%, $(image-y)))))
initrd-y := $(filter-out $(image-y), $(initrd-y)) initrd-y := $(filter-out $(image-y), $(initrd-y))
targets += $(image-y) $(initrd-y) targets += $(image-y) $(initrd-y)

View file

@ -33,13 +33,14 @@ static struct legacy_serial_info {
phys_addr_t taddr; phys_addr_t taddr;
} legacy_serial_infos[MAX_LEGACY_SERIAL_PORTS]; } legacy_serial_infos[MAX_LEGACY_SERIAL_PORTS];
static struct __initdata of_device_id parents[] = { static struct __initdata of_device_id legacy_serial_parents[] = {
{.type = "soc",}, {.type = "soc",},
{.type = "tsi-bridge",}, {.type = "tsi-bridge",},
{.type = "opb", }, {.type = "opb", },
{.compatible = "ibm,opb",}, {.compatible = "ibm,opb",},
{.compatible = "simple-bus",}, {.compatible = "simple-bus",},
{.compatible = "wrs,epld-localbus",}, {.compatible = "wrs,epld-localbus",},
{},
}; };
static unsigned int legacy_serial_count; static unsigned int legacy_serial_count;
@ -136,6 +137,11 @@ static int __init add_legacy_soc_port(struct device_node *np,
if (of_get_property(np, "clock-frequency", NULL) == NULL) if (of_get_property(np, "clock-frequency", NULL) == NULL)
return -1; return -1;
/* if reg-shift or offset, don't try to use it */
if ((of_get_property(np, "reg-shift", NULL) != NULL) ||
(of_get_property(np, "reg-offset", NULL) != NULL))
return -1;
/* if rtas uses this device, don't try to use it as well */ /* if rtas uses this device, don't try to use it as well */
if (of_get_property(np, "used-by-rtas", NULL) != NULL) if (of_get_property(np, "used-by-rtas", NULL) != NULL)
return -1; return -1;
@ -322,7 +328,7 @@ void __init find_legacy_serial_ports(void)
struct device_node *parent = of_get_parent(np); struct device_node *parent = of_get_parent(np);
if (!parent) if (!parent)
continue; continue;
if (of_match_node(parents, parent) != NULL) { if (of_match_node(legacy_serial_parents, parent) != NULL) {
index = add_legacy_soc_port(np, np); index = add_legacy_soc_port(np, np);
if (index >= 0 && np == stdout) if (index >= 0 && np == stdout)
legacy_serial_console = index; legacy_serial_console = index;

View file

@ -76,6 +76,8 @@ struct of_device* of_platform_device_create(struct device_node *np,
return NULL; return NULL;
dev->dma_mask = 0xffffffffUL; dev->dma_mask = 0xffffffffUL;
dev->dev.coherent_dma_mask = DMA_32BIT_MASK;
dev->dev.bus = &of_platform_bus_type; dev->dev.bus = &of_platform_bus_type;
/* We do not fill the DMA ops for platform devices by default. /* We do not fill the DMA ops for platform devices by default.

View file

@ -14,6 +14,7 @@ static struct mpc52xx_sdma __iomem *bes;
static struct mpc52xx_xlb __iomem *xlb; static struct mpc52xx_xlb __iomem *xlb;
static struct mpc52xx_gpio __iomem *gps; static struct mpc52xx_gpio __iomem *gps;
static struct mpc52xx_gpio_wkup __iomem *gpw; static struct mpc52xx_gpio_wkup __iomem *gpw;
static void __iomem *pci;
static void __iomem *sram; static void __iomem *sram;
static const int sram_size = 0x4000; /* 16 kBytes */ static const int sram_size = 0x4000; /* 16 kBytes */
static void __iomem *mbar; static void __iomem *mbar;
@ -50,6 +51,8 @@ static int lite5200_pm_prepare(void)
{ .type = "builtin", .compatible = "mpc5200", }, /* efika */ { .type = "builtin", .compatible = "mpc5200", }, /* efika */
{} {}
}; };
u64 regaddr64 = 0;
const u32 *regaddr_p;
/* deep sleep? let mpc52xx code handle that */ /* deep sleep? let mpc52xx code handle that */
if (lite5200_pm_target_state == PM_SUSPEND_STANDBY) if (lite5200_pm_target_state == PM_SUSPEND_STANDBY)
@ -60,8 +63,12 @@ static int lite5200_pm_prepare(void)
/* map registers */ /* map registers */
np = of_find_matching_node(NULL, immr_ids); np = of_find_matching_node(NULL, immr_ids);
mbar = of_iomap(np, 0); regaddr_p = of_get_address(np, 0, NULL, NULL);
if (regaddr_p)
regaddr64 = of_translate_address(np, regaddr_p);
of_node_put(np); of_node_put(np);
mbar = ioremap((u32) regaddr64, 0xC000);
if (!mbar) { if (!mbar) {
printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__); printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__);
return -ENOSYS; return -ENOSYS;
@ -71,6 +78,7 @@ static int lite5200_pm_prepare(void)
pic = mbar + 0x500; pic = mbar + 0x500;
gps = mbar + 0xb00; gps = mbar + 0xb00;
gpw = mbar + 0xc00; gpw = mbar + 0xc00;
pci = mbar + 0xd00;
bes = mbar + 0x1200; bes = mbar + 0x1200;
xlb = mbar + 0x1f00; xlb = mbar + 0x1f00;
sram = mbar + 0x8000; sram = mbar + 0x8000;
@ -85,6 +93,7 @@ static struct mpc52xx_sdma sbes;
static struct mpc52xx_xlb sxlb; static struct mpc52xx_xlb sxlb;
static struct mpc52xx_gpio sgps; static struct mpc52xx_gpio sgps;
static struct mpc52xx_gpio_wkup sgpw; static struct mpc52xx_gpio_wkup sgpw;
static char spci[0x200];
static void lite5200_save_regs(void) static void lite5200_save_regs(void)
{ {
@ -94,6 +103,7 @@ static void lite5200_save_regs(void)
_memcpy_fromio(&sxlb, xlb, sizeof(*xlb)); _memcpy_fromio(&sxlb, xlb, sizeof(*xlb));
_memcpy_fromio(&sgps, gps, sizeof(*gps)); _memcpy_fromio(&sgps, gps, sizeof(*gps));
_memcpy_fromio(&sgpw, gpw, sizeof(*gpw)); _memcpy_fromio(&sgpw, gpw, sizeof(*gpw));
_memcpy_fromio(spci, pci, 0x200);
_memcpy_fromio(saved_sram, sram, sram_size); _memcpy_fromio(saved_sram, sram, sram_size);
} }
@ -103,6 +113,8 @@ static void lite5200_restore_regs(void)
int i; int i;
_memcpy_toio(sram, saved_sram, sram_size); _memcpy_toio(sram, saved_sram, sram_size);
/* PCI Configuration */
_memcpy_toio(pci, spci, 0x200);
/* /*
* GPIOs. Interrupt Master Enable has higher address then other * GPIOs. Interrupt Master Enable has higher address then other

View file

@ -77,7 +77,6 @@ include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
KERNEL_DEFINES = $(strip -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ KERNEL_DEFINES = $(strip -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \
-Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES)) -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES))
KBUILD_CFLAGS += $(KERNEL_DEFINES) KBUILD_CFLAGS += $(KERNEL_DEFINES)
KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,)
PHONY += linux PHONY += linux

View file

@ -32,4 +32,11 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
# an unresolved reference. # an unresolved reference.
cflags-y += -ffreestanding cflags-y += -ffreestanding
# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
# a lot more stack due to the lack of sharing of stacklots. Also, gcc
# 4.3.0 needs -funit-at-a-time for extern inline functions.
KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then \
echo $(call cc-option,-fno-unit-at-a-time); \
else echo $(call cc-option,-funit-at-a-time); fi ;)
KBUILD_CFLAGS += $(cflags-y) KBUILD_CFLAGS += $(cflags-y)

View file

@ -21,3 +21,6 @@ HEADER_ARCH := x86
LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64 LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64
LINK-y += -m64 LINK-y += -m64
# Do unit-at-a-time unconditionally on x86_64, following the host
KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)

View file

@ -966,8 +966,8 @@ config NUMA_EMU
number of nodes. This is only useful for debugging. number of nodes. This is only useful for debugging.
config NODES_SHIFT config NODES_SHIFT
int "Max num nodes shift(1-15)" int "Max num nodes shift(1-9)"
range 1 15 if X86_64 range 1 9 if X86_64
default "6" if X86_64 default "6" if X86_64
default "4" if X86_NUMAQ default "4" if X86_NUMAQ
default "3" default "3"

View file

@ -1,2 +1,3 @@
vsyscall.lds vsyscall.lds
vsyscall_32.lds vsyscall_32.lds
vmlinux.lds

View file

@ -5,6 +5,7 @@
#include <asm/msr-index.h> #include <asm/msr-index.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/processor-flags.h>
.code16 .code16
.section ".header", "a" .section ".header", "a"
@ -24,6 +25,11 @@ pmode_gdt: .quad 0
realmode_flags: .long 0 realmode_flags: .long 0
real_magic: .long 0 real_magic: .long 0
trampoline_segment: .word 0 trampoline_segment: .word 0
_pad1: .byte 0
wakeup_jmp: .byte 0xea /* ljmpw */
wakeup_jmp_off: .word 3f
wakeup_jmp_seg: .word 0
wakeup_gdt: .quad 0, 0, 0
signature: .long 0x51ee1111 signature: .long 0x51ee1111
.text .text
@ -34,11 +40,34 @@ _start:
cli cli
cld cld
/* Apparently some dimwit BIOS programmers don't know how to
program a PM to RM transition, and we might end up here with
junk in the data segment descriptor registers. The only way
to repair that is to go into PM and fix it ourselves... */
movw $16, %cx
lgdtl %cs:wakeup_gdt
movl %cr0, %eax
orb $X86_CR0_PE, %al
movl %eax, %cr0
jmp 1f
1: ljmpw $8, $2f
2:
movw %cx, %ds
movw %cx, %es
movw %cx, %ss
movw %cx, %fs
movw %cx, %gs
andb $~X86_CR0_PE, %al
movl %eax, %cr0
jmp wakeup_jmp
3:
/* Set up segments */ /* Set up segments */
movw %cs, %ax movw %cs, %ax
movw %ax, %ds movw %ax, %ds
movw %ax, %es movw %ax, %es
movw %ax, %ss movw %ax, %ss
lidtl wakeup_idt
movl $wakeup_stack_end, %esp movl $wakeup_stack_end, %esp
@ -98,7 +127,14 @@ bogus_real_magic:
jmp 1b jmp 1b
.data .data
.balign 4 .balign 8
/* This is the standard real-mode IDT */
wakeup_idt:
.word 0xffff /* limit */
.long 0 /* address */
.word 0
.globl HEAP, heap_end .globl HEAP, heap_end
HEAP: HEAP:
.long wakeup_heap .long wakeup_heap

View file

@ -24,6 +24,11 @@ struct wakeup_header {
u32 realmode_flags; u32 realmode_flags;
u32 real_magic; u32 real_magic;
u16 trampoline_segment; /* segment with trampoline code, 64-bit only */ u16 trampoline_segment; /* segment with trampoline code, 64-bit only */
u8 _pad1;
u8 wakeup_jmp;
u16 wakeup_jmp_off;
u16 wakeup_jmp_seg;
u64 wakeup_gdt[3];
u32 signature; /* To check we have correct structure */ u32 signature; /* To check we have correct structure */
} __attribute__((__packed__)); } __attribute__((__packed__));

View file

@ -50,6 +50,20 @@ int acpi_save_state_mem(void)
header->video_mode = saved_video_mode; header->video_mode = saved_video_mode;
header->wakeup_jmp_seg = acpi_wakeup_address >> 4;
/* GDT[0]: GDT self-pointer */
header->wakeup_gdt[0] =
(u64)(sizeof(header->wakeup_gdt) - 1) +
((u64)(acpi_wakeup_address +
((char *)&header->wakeup_gdt - (char *)acpi_realmode))
<< 16);
/* GDT[1]: real-mode-like code segment */
header->wakeup_gdt[1] = (0x009bULL << 40) +
((u64)acpi_wakeup_address << 16) + 0xffff;
/* GDT[2]: real-mode-like data segment */
header->wakeup_gdt[2] = (0x0093ULL << 40) +
((u64)acpi_wakeup_address << 16) + 0xffff;
#ifndef CONFIG_64BIT #ifndef CONFIG_64BIT
store_gdt((struct desc_ptr *)&header->pmode_gdt); store_gdt((struct desc_ptr *)&header->pmode_gdt);
@ -111,7 +125,7 @@ void __init acpi_reserve_bootmem(void)
return; return;
} }
acpi_wakeup_address = acpi_realmode; acpi_wakeup_address = virt_to_phys((void *)acpi_realmode);
} }

View file

@ -49,13 +49,13 @@ void efi_call_phys_prelog(void)
local_irq_save(efi_rt_eflags); local_irq_save(efi_rt_eflags);
/* /*
* If I don't have PSE, I should just duplicate two entries in page * If I don't have PAE, I should just duplicate two entries in page
* directory. If I have PSE, I just need to duplicate one entry in * directory. If I have PAE, I just need to duplicate one entry in
* page directory. * page directory.
*/ */
cr4 = read_cr4(); cr4 = read_cr4();
if (cr4 & X86_CR4_PSE) { if (cr4 & X86_CR4_PAE) {
efi_bak_pg_dir_pointer[0].pgd = efi_bak_pg_dir_pointer[0].pgd =
swapper_pg_dir[pgd_index(0)].pgd; swapper_pg_dir[pgd_index(0)].pgd;
swapper_pg_dir[0].pgd = swapper_pg_dir[0].pgd =
@ -93,7 +93,7 @@ void efi_call_phys_epilog(void)
cr4 = read_cr4(); cr4 = read_cr4();
if (cr4 & X86_CR4_PSE) { if (cr4 & X86_CR4_PAE) {
swapper_pg_dir[pgd_index(0)].pgd = swapper_pg_dir[pgd_index(0)].pgd =
efi_bak_pg_dir_pointer[0].pgd; efi_bak_pg_dir_pointer[0].pgd;
} else { } else {

View file

@ -128,7 +128,7 @@ ident_complete:
/* Fixup phys_base */ /* Fixup phys_base */
addq %rbp, phys_base(%rip) addq %rbp, phys_base(%rip)
#ifdef CONFIG_SMP #ifdef CONFIG_X86_TRAMPOLINE
addq %rbp, trampoline_level4_pgt + 0(%rip) addq %rbp, trampoline_level4_pgt + 0(%rip)
addq %rbp, trampoline_level4_pgt + (511*8)(%rip) addq %rbp, trampoline_level4_pgt + (511*8)(%rip)
#endif #endif

View file

@ -162,7 +162,7 @@ int xfpregs_get(struct task_struct *target, const struct user_regset *regset,
int ret; int ret;
if (!cpu_has_fxsr) if (!cpu_has_fxsr)
return -ENODEV; return -EIO;
ret = init_fpu(target); ret = init_fpu(target);
if (ret) if (ret)
@ -179,7 +179,7 @@ int xfpregs_set(struct task_struct *target, const struct user_regset *regset,
int ret; int ret;
if (!cpu_has_fxsr) if (!cpu_has_fxsr)
return -ENODEV; return -EIO;
ret = init_fpu(target); ret = init_fpu(target);
if (ret) if (ret)

View file

@ -996,7 +996,6 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu)
#endif #endif
cpu_clear(cpu, cpu_callout_map); /* was set by do_boot_cpu() */ cpu_clear(cpu, cpu_callout_map); /* was set by do_boot_cpu() */
cpu_clear(cpu, cpu_initialized); /* was set by cpu_init() */ cpu_clear(cpu, cpu_initialized); /* was set by cpu_init() */
cpu_clear(cpu, cpu_possible_map);
cpu_clear(cpu, cpu_present_map); cpu_clear(cpu, cpu_present_map);
per_cpu(x86_cpu_to_apicid, cpu) = BAD_APICID; per_cpu(x86_cpu_to_apicid, cpu) = BAD_APICID;
} }

View file

@ -135,7 +135,7 @@ static __init void *spp_getpage(void)
return ptr; return ptr;
} }
static void static __init void
set_pte_phys(unsigned long vaddr, unsigned long phys, pgprot_t prot) set_pte_phys(unsigned long vaddr, unsigned long phys, pgprot_t prot)
{ {
pgd_t *pgd; pgd_t *pgd;
@ -214,7 +214,7 @@ void __init cleanup_highmap(void)
} }
/* NOTE: this is meant to be run only at boot */ /* NOTE: this is meant to be run only at boot */
void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot) void __init __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
{ {
unsigned long address = __fix_to_virt(idx); unsigned long address = __fix_to_virt(idx);
@ -526,7 +526,8 @@ static void __init early_memtest(unsigned long start, unsigned long end)
t_size = end - t_start; t_size = end - t_start;
printk(KERN_CONT "\n %016llx - %016llx pattern %d", printk(KERN_CONT "\n %016llx - %016llx pattern %d",
t_start, t_start + t_size, pattern); (unsigned long long)t_start,
(unsigned long long)t_start + t_size, pattern);
memtest(t_start, t_size, pattern); memtest(t_start, t_size, pattern);

View file

@ -328,18 +328,18 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = {
#endif #endif
{ {
.callback = set_bf_sort, .callback = set_bf_sort,
.ident = "HP ProLiant DL360", .ident = "HP ProLiant DL385 G2",
.matches = { .matches = {
DMI_MATCH(DMI_SYS_VENDOR, "HP"), DMI_MATCH(DMI_SYS_VENDOR, "HP"),
DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL360"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL385 G2"),
}, },
}, },
{ {
.callback = set_bf_sort, .callback = set_bf_sort,
.ident = "HP ProLiant DL380", .ident = "HP ProLiant DL585 G2",
.matches = { .matches = {
DMI_MATCH(DMI_SYS_VENDOR, "HP"), DMI_MATCH(DMI_SYS_VENDOR, "HP"),
DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL380"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL585 G2"),
}, },
}, },
{} {}

View file

@ -185,7 +185,7 @@ static pteval_t pte_mfn_to_pfn(pteval_t val)
if (val & _PAGE_PRESENT) { if (val & _PAGE_PRESENT) {
unsigned long mfn = (val & PTE_MASK) >> PAGE_SHIFT; unsigned long mfn = (val & PTE_MASK) >> PAGE_SHIFT;
pteval_t flags = val & ~PTE_MASK; pteval_t flags = val & ~PTE_MASK;
val = (mfn_to_pfn(mfn) << PAGE_SHIFT) | flags; val = ((pteval_t)mfn_to_pfn(mfn) << PAGE_SHIFT) | flags;
} }
return val; return val;
@ -196,7 +196,7 @@ static pteval_t pte_pfn_to_mfn(pteval_t val)
if (val & _PAGE_PRESENT) { if (val & _PAGE_PRESENT) {
unsigned long pfn = (val & PTE_MASK) >> PAGE_SHIFT; unsigned long pfn = (val & PTE_MASK) >> PAGE_SHIFT;
pteval_t flags = val & ~PTE_MASK; pteval_t flags = val & ~PTE_MASK;
val = (pfn_to_mfn(pfn) << PAGE_SHIFT) | flags; val = ((pteval_t)pfn_to_mfn(pfn) << PAGE_SHIFT) | flags;
} }
return val; return val;

View file

@ -831,6 +831,8 @@ static void as_completed_request(struct request_queue *q, struct request *rq)
} }
if (ad->changed_batch && ad->nr_dispatched == 1) { if (ad->changed_batch && ad->nr_dispatched == 1) {
ad->current_batch_expires = jiffies +
ad->batch_expire[ad->batch_data_dir];
kblockd_schedule_work(&ad->antic_work); kblockd_schedule_work(&ad->antic_work);
ad->changed_batch = 0; ad->changed_batch = 0;

View file

@ -117,6 +117,7 @@ static int chainiv_init(struct crypto_tfm *tfm)
static int async_chainiv_schedule_work(struct async_chainiv_ctx *ctx) static int async_chainiv_schedule_work(struct async_chainiv_ctx *ctx)
{ {
int queued; int queued;
int err = ctx->err;
if (!ctx->queue.qlen) { if (!ctx->queue.qlen) {
smp_mb__before_clear_bit(); smp_mb__before_clear_bit();
@ -131,7 +132,7 @@ static int async_chainiv_schedule_work(struct async_chainiv_ctx *ctx)
BUG_ON(!queued); BUG_ON(!queued);
out: out:
return ctx->err; return err;
} }
static int async_chainiv_postpone_request(struct skcipher_givcrypt_request *req) static int async_chainiv_postpone_request(struct skcipher_givcrypt_request *req)
@ -227,6 +228,7 @@ static void async_chainiv_do_postponed(struct work_struct *work)
postponed); postponed);
struct skcipher_givcrypt_request *req; struct skcipher_givcrypt_request *req;
struct ablkcipher_request *subreq; struct ablkcipher_request *subreq;
int err;
/* Only handle one request at a time to avoid hogging keventd. */ /* Only handle one request at a time to avoid hogging keventd. */
spin_lock_bh(&ctx->lock); spin_lock_bh(&ctx->lock);
@ -241,7 +243,11 @@ static void async_chainiv_do_postponed(struct work_struct *work)
subreq = skcipher_givcrypt_reqctx(req); subreq = skcipher_givcrypt_reqctx(req);
subreq->base.flags |= CRYPTO_TFM_REQ_MAY_SLEEP; subreq->base.flags |= CRYPTO_TFM_REQ_MAY_SLEEP;
async_chainiv_givencrypt_tail(req); err = async_chainiv_givencrypt_tail(req);
local_bh_disable();
skcipher_givcrypt_complete(req, err);
local_bh_enable();
} }
static int async_chainiv_init(struct crypto_tfm *tfm) static int async_chainiv_init(struct crypto_tfm *tfm)

View file

@ -586,12 +586,6 @@ static void test_cipher(char *algo, int enc,
j = 0; j = 0;
for (i = 0; i < tcount; i++) { for (i = 0; i < tcount; i++) {
data = kzalloc(template[i].ilen, GFP_KERNEL);
if (!data)
continue;
memcpy(data, template[i].input, template[i].ilen);
if (template[i].iv) if (template[i].iv)
memcpy(iv, template[i].iv, MAX_IVLEN); memcpy(iv, template[i].iv, MAX_IVLEN);
else else
@ -613,10 +607,8 @@ static void test_cipher(char *algo, int enc,
printk("setkey() failed flags=%x\n", printk("setkey() failed flags=%x\n",
crypto_ablkcipher_get_flags(tfm)); crypto_ablkcipher_get_flags(tfm));
if (!template[i].fail) { if (!template[i].fail)
kfree(data);
goto out; goto out;
}
} }
temp = 0; temp = 0;

View file

@ -377,6 +377,9 @@ static int __init bay_init(void)
INIT_LIST_HEAD(&drive_bays); INIT_LIST_HEAD(&drive_bays);
if (acpi_disabled)
return -ENODEV;
/* look for dockable drive bays */ /* look for dockable drive bays */
acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX, find_bay, &bays, NULL); ACPI_UINT32_MAX, find_bay, &bays, NULL);

View file

@ -917,6 +917,9 @@ static int __init dock_init(void)
dock_station = NULL; dock_station = NULL;
if (acpi_disabled)
return 0;
/* look for a dock station */ /* look for a dock station */
acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX, find_dock, &num, NULL); ACPI_UINT32_MAX, find_dock, &num, NULL);

View file

@ -333,6 +333,9 @@ static int __init acpi_rtc_init(void)
{ {
struct device *dev = get_rtc_dev(); struct device *dev = get_rtc_dev();
if (acpi_disabled)
return 0;
if (dev) { if (dev) {
rtc_wake_setup(); rtc_wake_setup();
rtc_info.wake_on = rtc_wake_on; rtc_info.wake_on = rtc_wake_on;

View file

@ -36,9 +36,8 @@ static int acpi_sleep_prepare(u32 acpi_state)
if (!acpi_wakeup_address) { if (!acpi_wakeup_address) {
return -EFAULT; return -EFAULT;
} }
acpi_set_firmware_waking_vector((acpi_physical_address) acpi_set_firmware_waking_vector(
virt_to_phys((void *) (acpi_physical_address)acpi_wakeup_address);
acpi_wakeup_address));
} }
ACPI_FLUSH_CPU_CACHE(); ACPI_FLUSH_CPU_CACHE();

View file

@ -315,8 +315,11 @@ acpi_system_write_alarm(struct file *file,
cmos_bcd_write(day, acpi_gbl_FADT.day_alarm, rtc_control); cmos_bcd_write(day, acpi_gbl_FADT.day_alarm, rtc_control);
if (acpi_gbl_FADT.month_alarm) if (acpi_gbl_FADT.month_alarm)
cmos_bcd_write(mo, acpi_gbl_FADT.month_alarm, rtc_control); cmos_bcd_write(mo, acpi_gbl_FADT.month_alarm, rtc_control);
if (acpi_gbl_FADT.century) if (acpi_gbl_FADT.century) {
if (adjust)
yr += cmos_bcd_read(acpi_gbl_FADT.century, rtc_control) * 100;
cmos_bcd_write(yr / 100, acpi_gbl_FADT.century, rtc_control); cmos_bcd_write(yr / 100, acpi_gbl_FADT.century, rtc_control);
}
/* enable the rtc alarm interrupt */ /* enable the rtc alarm interrupt */
rtc_control |= RTC_AIE; rtc_control |= RTC_AIE;
CMOS_WRITE(rtc_control, RTC_CONTROL); CMOS_WRITE(rtc_control, RTC_CONTROL);

View file

@ -1777,7 +1777,7 @@ static irqreturn_t ahci_interrupt(int irq, void *dev_instance)
struct ahci_host_priv *hpriv; struct ahci_host_priv *hpriv;
unsigned int i, handled = 0; unsigned int i, handled = 0;
void __iomem *mmio; void __iomem *mmio;
u32 irq_stat, irq_ack = 0; u32 irq_stat, irq_masked;
VPRINTK("ENTER\n"); VPRINTK("ENTER\n");
@ -1786,16 +1786,17 @@ static irqreturn_t ahci_interrupt(int irq, void *dev_instance)
/* sigh. 0xffffffff is a valid return from h/w */ /* sigh. 0xffffffff is a valid return from h/w */
irq_stat = readl(mmio + HOST_IRQ_STAT); irq_stat = readl(mmio + HOST_IRQ_STAT);
irq_stat &= hpriv->port_map;
if (!irq_stat) if (!irq_stat)
return IRQ_NONE; return IRQ_NONE;
irq_masked = irq_stat & hpriv->port_map;
spin_lock(&host->lock); spin_lock(&host->lock);
for (i = 0; i < host->n_ports; i++) { for (i = 0; i < host->n_ports; i++) {
struct ata_port *ap; struct ata_port *ap;
if (!(irq_stat & (1 << i))) if (!(irq_masked & (1 << i)))
continue; continue;
ap = host->ports[i]; ap = host->ports[i];
@ -1809,14 +1810,20 @@ static irqreturn_t ahci_interrupt(int irq, void *dev_instance)
"interrupt on disabled port %u\n", i); "interrupt on disabled port %u\n", i);
} }
irq_ack |= (1 << i);
}
if (irq_ack) {
writel(irq_ack, mmio + HOST_IRQ_STAT);
handled = 1; handled = 1;
} }
/* HOST_IRQ_STAT behaves as level triggered latch meaning that
* it should be cleared after all the port events are cleared;
* otherwise, it will raise a spurious interrupt after each
* valid one. Please read section 10.6.2 of ahci 1.1 for more
* information.
*
* Also, use the unmasked value to clear interrupt as spurious
* pending event on a dummy port might cause screaming IRQ.
*/
writel(irq_stat, mmio + HOST_IRQ_STAT);
spin_unlock(&host->lock); spin_unlock(&host->lock);
VPRINTK("EXIT\n"); VPRINTK("EXIT\n");

View file

@ -1094,6 +1094,7 @@ static void ata_hsm_qc_complete(struct ata_queued_cmd *qc, int in_wq)
int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc,
u8 status, int in_wq) u8 status, int in_wq)
{ {
struct ata_eh_info *ehi = &ap->link.eh_info;
unsigned long flags = 0; unsigned long flags = 0;
int poll_next; int poll_next;
@ -1125,9 +1126,12 @@ int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc,
if (likely(status & (ATA_ERR | ATA_DF))) if (likely(status & (ATA_ERR | ATA_DF)))
/* device stops HSM for abort/error */ /* device stops HSM for abort/error */
qc->err_mask |= AC_ERR_DEV; qc->err_mask |= AC_ERR_DEV;
else else {
/* HSM violation. Let EH handle this */ /* HSM violation. Let EH handle this */
ata_ehi_push_desc(ehi,
"ST_FIRST: !(DRQ|ERR|DF)");
qc->err_mask |= AC_ERR_HSM; qc->err_mask |= AC_ERR_HSM;
}
ap->hsm_task_state = HSM_ST_ERR; ap->hsm_task_state = HSM_ST_ERR;
goto fsm_start; goto fsm_start;
@ -1146,9 +1150,9 @@ int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc,
* the CDB. * the CDB.
*/ */
if (!(qc->dev->horkage & ATA_HORKAGE_STUCK_ERR)) { if (!(qc->dev->horkage & ATA_HORKAGE_STUCK_ERR)) {
ata_port_printk(ap, KERN_WARNING, ata_ehi_push_desc(ehi, "ST_FIRST: "
"DRQ=1 with device error, " "DRQ=1 with device error, "
"dev_stat 0x%X\n", status); "dev_stat 0x%X", status);
qc->err_mask |= AC_ERR_HSM; qc->err_mask |= AC_ERR_HSM;
ap->hsm_task_state = HSM_ST_ERR; ap->hsm_task_state = HSM_ST_ERR;
goto fsm_start; goto fsm_start;
@ -1205,9 +1209,9 @@ int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc,
* let the EH abort the command or reset the device. * let the EH abort the command or reset the device.
*/ */
if (unlikely(status & (ATA_ERR | ATA_DF))) { if (unlikely(status & (ATA_ERR | ATA_DF))) {
ata_port_printk(ap, KERN_WARNING, "DRQ=1 with " ata_ehi_push_desc(ehi, "ST-ATAPI: "
"device error, dev_stat 0x%X\n", "DRQ=1 with device error, "
status); "dev_stat 0x%X", status);
qc->err_mask |= AC_ERR_HSM; qc->err_mask |= AC_ERR_HSM;
ap->hsm_task_state = HSM_ST_ERR; ap->hsm_task_state = HSM_ST_ERR;
goto fsm_start; goto fsm_start;
@ -1226,13 +1230,17 @@ int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc,
if (likely(status & (ATA_ERR | ATA_DF))) if (likely(status & (ATA_ERR | ATA_DF)))
/* device stops HSM for abort/error */ /* device stops HSM for abort/error */
qc->err_mask |= AC_ERR_DEV; qc->err_mask |= AC_ERR_DEV;
else else {
/* HSM violation. Let EH handle this. /* HSM violation. Let EH handle this.
* Phantom devices also trigger this * Phantom devices also trigger this
* condition. Mark hint. * condition. Mark hint.
*/ */
ata_ehi_push_desc(ehi, "ST-ATA: "
"DRQ=1 with device error, "
"dev_stat 0x%X", status);
qc->err_mask |= AC_ERR_HSM | qc->err_mask |= AC_ERR_HSM |
AC_ERR_NODEV_HINT; AC_ERR_NODEV_HINT;
}
ap->hsm_task_state = HSM_ST_ERR; ap->hsm_task_state = HSM_ST_ERR;
goto fsm_start; goto fsm_start;
@ -1257,8 +1265,12 @@ int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc,
status = ata_wait_idle(ap); status = ata_wait_idle(ap);
} }
if (status & (ATA_BUSY | ATA_DRQ)) if (status & (ATA_BUSY | ATA_DRQ)) {
ata_ehi_push_desc(ehi, "ST-ATA: "
"BUSY|DRQ persists on ERR|DF, "
"dev_stat 0x%X", status);
qc->err_mask |= AC_ERR_HSM; qc->err_mask |= AC_ERR_HSM;
}
/* ata_pio_sectors() might change the /* ata_pio_sectors() might change the
* state to HSM_ST_LAST. so, the state * state to HSM_ST_LAST. so, the state

View file

@ -1607,7 +1607,7 @@ static unsigned int mv_qc_issue(struct ata_queued_cmd *qc)
* Much of the time, this could just work regardless. * Much of the time, this could just work regardless.
* So for now, just log the incident, and allow the attempt. * So for now, just log the incident, and allow the attempt.
*/ */
if (limit_warnings && (qc->nbytes / qc->sect_size) > 1) { if (limit_warnings > 0 && (qc->nbytes / qc->sect_size) > 1) {
--limit_warnings; --limit_warnings;
ata_link_printk(qc->dev->link, KERN_WARNING, DRV_NAME ata_link_printk(qc->dev->link, KERN_WARNING, DRV_NAME
": attempting PIO w/multiple DRQ: " ": attempting PIO w/multiple DRQ: "

View file

@ -370,6 +370,7 @@ static const struct pci_device_id sil24_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, 0x3124), BID_SIL3124 }, { PCI_VDEVICE(INTEL, 0x3124), BID_SIL3124 },
{ PCI_VDEVICE(CMD, 0x3132), BID_SIL3132 }, { PCI_VDEVICE(CMD, 0x3132), BID_SIL3132 },
{ PCI_VDEVICE(CMD, 0x0242), BID_SIL3132 }, { PCI_VDEVICE(CMD, 0x0242), BID_SIL3132 },
{ PCI_VDEVICE(CMD, 0x0244), BID_SIL3132 },
{ PCI_VDEVICE(CMD, 0x3131), BID_SIL3131 }, { PCI_VDEVICE(CMD, 0x3131), BID_SIL3131 },
{ PCI_VDEVICE(CMD, 0x3531), BID_SIL3131 }, { PCI_VDEVICE(CMD, 0x3531), BID_SIL3131 },

View file

@ -83,6 +83,7 @@ static struct ata_port_operations uli_ops = {
.inherits = &ata_bmdma_port_ops, .inherits = &ata_bmdma_port_ops,
.scr_read = uli_scr_read, .scr_read = uli_scr_read,
.scr_write = uli_scr_write, .scr_write = uli_scr_write,
.hardreset = ATA_OP_NULL,
}; };
static const struct ata_port_info uli_port_info = { static const struct ata_port_info uli_port_info = {

View file

@ -64,7 +64,7 @@ config KS0108_DELAY
Amount of time the ks0108 should wait between each control write Amount of time the ks0108 should wait between each control write
to the parallel port. to the parallel port.
If your driver seems to miss random writings, increment this. If your LCD seems to miss random writings, increment this.
If you don't know what I'm talking about, ignore it. If you don't know what I'm talking about, ignore it.

View file

@ -5,7 +5,7 @@
* License: GPLv2 * License: GPLv2
* Depends: ks0108 * Depends: ks0108
* *
* Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> * Author: Copyright (C) Miguel Ojeda Sandonis
* Date: 2006-10-31 * Date: 2006-10-31
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -398,5 +398,5 @@ module_init(cfag12864b_init);
module_exit(cfag12864b_exit); module_exit(cfag12864b_exit);
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Miguel Ojeda Sandonis <maxextreme@gmail.com>"); MODULE_AUTHOR("Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>");
MODULE_DESCRIPTION("cfag12864b LCD driver"); MODULE_DESCRIPTION("cfag12864b LCD driver");

View file

@ -5,7 +5,7 @@
* License: GPLv2 * License: GPLv2
* Depends: cfag12864b * Depends: cfag12864b
* *
* Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> * Author: Copyright (C) Miguel Ojeda Sandonis
* Date: 2006-10-31 * Date: 2006-10-31
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -186,5 +186,5 @@ module_init(cfag12864bfb_init);
module_exit(cfag12864bfb_exit); module_exit(cfag12864bfb_exit);
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Miguel Ojeda Sandonis <maxextreme@gmail.com>"); MODULE_AUTHOR("Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>");
MODULE_DESCRIPTION("cfag12864b LCD framebuffer driver"); MODULE_DESCRIPTION("cfag12864b LCD framebuffer driver");

View file

@ -5,7 +5,7 @@
* License: GPLv2 * License: GPLv2
* Depends: parport * Depends: parport
* *
* Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> * Author: Copyright (C) Miguel Ojeda Sandonis
* Date: 2006-10-31 * Date: 2006-10-31
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -173,6 +173,6 @@ module_init(ks0108_init);
module_exit(ks0108_exit); module_exit(ks0108_exit);
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Miguel Ojeda Sandonis <maxextreme@gmail.com>"); MODULE_AUTHOR("Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>");
MODULE_DESCRIPTION("ks0108 LCD Controller driver"); MODULE_DESCRIPTION("ks0108 LCD Controller driver");

View file

@ -84,8 +84,8 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf)
nid, K(i.totalram), nid, K(i.totalram),
nid, K(i.freeram), nid, K(i.freeram),
nid, K(i.totalram - i.freeram), nid, K(i.totalram - i.freeram),
nid, node_page_state(nid, NR_ACTIVE), nid, K(node_page_state(nid, NR_ACTIVE)),
nid, node_page_state(nid, NR_INACTIVE), nid, K(node_page_state(nid, NR_INACTIVE)),
#ifdef CONFIG_HIGHMEM #ifdef CONFIG_HIGHMEM
nid, K(i.totalhigh), nid, K(i.totalhigh),
nid, K(i.freehigh), nid, K(i.freehigh),

View file

@ -106,35 +106,34 @@ MODULE_DEVICE_TABLE(pci, cciss_pci_device_id);
/* board_id = Subsystem Device ID & Vendor ID /* board_id = Subsystem Device ID & Vendor ID
* product = Marketing Name for the board * product = Marketing Name for the board
* access = Address of the struct of function pointers * access = Address of the struct of function pointers
* nr_cmds = Number of commands supported by controller
*/ */
static struct board_type products[] = { static struct board_type products[] = {
{0x40700E11, "Smart Array 5300", &SA5_access, 512}, {0x40700E11, "Smart Array 5300", &SA5_access},
{0x40800E11, "Smart Array 5i", &SA5B_access, 512}, {0x40800E11, "Smart Array 5i", &SA5B_access},
{0x40820E11, "Smart Array 532", &SA5B_access, 512}, {0x40820E11, "Smart Array 532", &SA5B_access},
{0x40830E11, "Smart Array 5312", &SA5B_access, 512}, {0x40830E11, "Smart Array 5312", &SA5B_access},
{0x409A0E11, "Smart Array 641", &SA5_access, 512}, {0x409A0E11, "Smart Array 641", &SA5_access},
{0x409B0E11, "Smart Array 642", &SA5_access, 512}, {0x409B0E11, "Smart Array 642", &SA5_access},
{0x409C0E11, "Smart Array 6400", &SA5_access, 512}, {0x409C0E11, "Smart Array 6400", &SA5_access},
{0x409D0E11, "Smart Array 6400 EM", &SA5_access, 512}, {0x409D0E11, "Smart Array 6400 EM", &SA5_access},
{0x40910E11, "Smart Array 6i", &SA5_access, 512}, {0x40910E11, "Smart Array 6i", &SA5_access},
{0x3225103C, "Smart Array P600", &SA5_access, 512}, {0x3225103C, "Smart Array P600", &SA5_access},
{0x3223103C, "Smart Array P800", &SA5_access, 512}, {0x3223103C, "Smart Array P800", &SA5_access},
{0x3234103C, "Smart Array P400", &SA5_access, 512}, {0x3234103C, "Smart Array P400", &SA5_access},
{0x3235103C, "Smart Array P400i", &SA5_access, 512}, {0x3235103C, "Smart Array P400i", &SA5_access},
{0x3211103C, "Smart Array E200i", &SA5_access, 120}, {0x3211103C, "Smart Array E200i", &SA5_access},
{0x3212103C, "Smart Array E200", &SA5_access, 120}, {0x3212103C, "Smart Array E200", &SA5_access},
{0x3213103C, "Smart Array E200i", &SA5_access, 120}, {0x3213103C, "Smart Array E200i", &SA5_access},
{0x3214103C, "Smart Array E200i", &SA5_access, 120}, {0x3214103C, "Smart Array E200i", &SA5_access},
{0x3215103C, "Smart Array E200i", &SA5_access, 120}, {0x3215103C, "Smart Array E200i", &SA5_access},
{0x3237103C, "Smart Array E500", &SA5_access, 512}, {0x3237103C, "Smart Array E500", &SA5_access},
{0x323D103C, "Smart Array P700m", &SA5_access, 512}, {0x323D103C, "Smart Array P700m", &SA5_access},
{0x3241103C, "Smart Array P212", &SA5_access, 384}, {0x3241103C, "Smart Array P212", &SA5_access},
{0x3243103C, "Smart Array P410", &SA5_access, 384}, {0x3243103C, "Smart Array P410", &SA5_access},
{0x3245103C, "Smart Array P410i", &SA5_access, 384}, {0x3245103C, "Smart Array P410i", &SA5_access},
{0x3247103C, "Smart Array P411", &SA5_access, 384}, {0x3247103C, "Smart Array P411", &SA5_access},
{0x3249103C, "Smart Array P812", &SA5_access, 384}, {0x3249103C, "Smart Array P812", &SA5_access},
{0xFFFF103C, "Unknown Smart Array", &SA5_access, 120}, {0xFFFF103C, "Unknown Smart Array", &SA5_access},
}; };
/* How long to wait (in milliseconds) for board to go into simple mode */ /* How long to wait (in milliseconds) for board to go into simple mode */
@ -3086,11 +3085,20 @@ static int __devinit cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
print_cfg_table(c->cfgtable); print_cfg_table(c->cfgtable);
#endif /* CCISS_DEBUG */ #endif /* CCISS_DEBUG */
/* Some controllers support Zero Memory Raid (ZMR).
* When configured in ZMR mode the number of supported
* commands drops to 64. So instead of just setting an
* arbitrary value we make the driver a little smarter.
* We read the config table to tell us how many commands
* are supported on the controller then subtract 4 to
* leave a little room for ioctl calls.
*/
c->max_commands = readl(&(c->cfgtable->CmdsOutMax));
for (i = 0; i < ARRAY_SIZE(products); i++) { for (i = 0; i < ARRAY_SIZE(products); i++) {
if (board_id == products[i].board_id) { if (board_id == products[i].board_id) {
c->product_name = products[i].product_name; c->product_name = products[i].product_name;
c->access = *(products[i].access); c->access = *(products[i].access);
c->nr_cmds = products[i].nr_cmds; c->nr_cmds = c->max_commands - 4;
break; break;
} }
} }
@ -3110,7 +3118,7 @@ static int __devinit cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
if (subsystem_vendor_id == PCI_VENDOR_ID_HP) { if (subsystem_vendor_id == PCI_VENDOR_ID_HP) {
c->product_name = products[i-1].product_name; c->product_name = products[i-1].product_name;
c->access = *(products[i-1].access); c->access = *(products[i-1].access);
c->nr_cmds = products[i-1].nr_cmds; c->nr_cmds = c->max_commands - 4;
printk(KERN_WARNING "cciss: This is an unknown " printk(KERN_WARNING "cciss: This is an unknown "
"Smart Array controller.\n" "Smart Array controller.\n"
"cciss: Please update to the latest driver " "cciss: Please update to the latest driver "
@ -3546,6 +3554,10 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
for (j = 0; j <= hba[i]->highest_lun; j++) for (j = 0; j <= hba[i]->highest_lun; j++)
add_disk(hba[i]->gendisk[j]); add_disk(hba[i]->gendisk[j]);
/* we must register the controller even if no disks exist */
if (hba[i]->highest_lun == -1)
add_disk(hba[i]->gendisk[0]);
return 1; return 1;
clean4: clean4:

View file

@ -62,11 +62,11 @@ static void i915_vblank_tasklet(struct drm_device *dev)
u32 ropcpp = (0xcc << 16) | ((cpp - 1) << 24); u32 ropcpp = (0xcc << 16) | ((cpp - 1) << 24);
RING_LOCALS; RING_LOCALS;
if (sarea_priv->front_tiled) { if (IS_I965G(dev) && sarea_priv->front_tiled) {
cmd |= XY_SRC_COPY_BLT_DST_TILED; cmd |= XY_SRC_COPY_BLT_DST_TILED;
dst_pitch >>= 2; dst_pitch >>= 2;
} }
if (sarea_priv->back_tiled) { if (IS_I965G(dev) && sarea_priv->back_tiled) {
cmd |= XY_SRC_COPY_BLT_SRC_TILED; cmd |= XY_SRC_COPY_BLT_SRC_TILED;
src_pitch >>= 2; src_pitch >>= 2;
} }

View file

@ -3322,7 +3322,7 @@ static int send_break(struct tty_struct *tty, unsigned int duration)
msleep_interruptible(duration); msleep_interruptible(duration);
tty->ops->break_ctl(tty, 0); tty->ops->break_ctl(tty, 0);
tty_write_unlock(tty); tty_write_unlock(tty);
if (!signal_pending(current)) if (signal_pending(current))
return -EINTR; return -EINTR;
return 0; return 0;
} }

View file

@ -27,6 +27,8 @@
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/connector.h> #include <linux/connector.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/proc_fs.h>
#include <linux/spinlock.h>
#include <net/sock.h> #include <net/sock.h>
@ -403,6 +405,40 @@ static void cn_callback(void *data)
mutex_unlock(&notify_lock); mutex_unlock(&notify_lock);
} }
static int cn_proc_show(struct seq_file *m, void *v)
{
struct cn_queue_dev *dev = cdev.cbdev;
struct cn_callback_entry *cbq;
seq_printf(m, "Name ID\n");
spin_lock_bh(&dev->queue_lock);
list_for_each_entry(cbq, &dev->queue_list, callback_entry) {
seq_printf(m, "%-15s %u:%u\n",
cbq->id.name,
cbq->id.id.idx,
cbq->id.id.val);
}
spin_unlock_bh(&dev->queue_lock);
return 0;
}
static int cn_proc_open(struct inode *inode, struct file *file)
{
return single_open(file, cn_proc_show, NULL);
}
static const struct file_operations cn_file_ops = {
.owner = THIS_MODULE,
.open = cn_proc_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release
};
static int __devinit cn_init(void) static int __devinit cn_init(void)
{ {
struct cn_dev *dev = &cdev; struct cn_dev *dev = &cdev;
@ -434,6 +470,8 @@ static int __devinit cn_init(void)
return -EINVAL; return -EINVAL;
} }
proc_net_fops_create(&init_net, "connector", S_IRUGO, &cn_file_ops);
return 0; return 0;
} }
@ -443,6 +481,8 @@ static void __devexit cn_fini(void)
cn_already_initialized = 0; cn_already_initialized = 0;
proc_net_remove(&init_net, "connector");
cn_del_callback(&dev->id); cn_del_callback(&dev->id);
cn_queue_free_dev(dev->cbdev); cn_queue_free_dev(dev->cbdev);
netlink_kernel_release(dev->nls); netlink_kernel_release(dev->nls);

View file

@ -1051,7 +1051,8 @@ static int sbp2_scan_unit_dir(struct sbp2_target *tgt, u32 *directory,
break; break;
case SBP2_CSR_LOGICAL_UNIT_DIRECTORY: case SBP2_CSR_LOGICAL_UNIT_DIRECTORY:
if (sbp2_scan_logical_unit_dir(tgt, ci.p + value) < 0) /* Adjust for the increment in the iterator */
if (sbp2_scan_logical_unit_dir(tgt, ci.p - 1 + value) < 0)
return -ENOMEM; return -ENOMEM;
break; break;
} }

View file

@ -28,12 +28,18 @@ config DEBUG_GPIO
comment "I2C GPIO expanders:" comment "I2C GPIO expanders:"
config GPIO_PCA953X config GPIO_PCA953X
tristate "PCA953x I/O ports" tristate "PCA953x, PCA955x, and MAX7310 I/O ports"
depends on I2C depends on I2C
help help
Say yes here to support the PCA9534 (8-bit), PCA9535 (16-bit), Say yes here to provide access to several register-oriented
PCA9536 (4-bit), PCA9537 (4-bit), PCA9538 (8-bit), and PCA9539 SMBus I/O expanders, made mostly by NXP or TI. Compatible
(16-bit) I/O ports. These parts are made by NXP and TI. models include:
4 bits: pca9536, pca9537
8 bits: max7310, pca9534, pca9538, pca9554, pca9557
16 bits: pca9535, pca9539, pca9555
This driver can also be built as a module. If so, the module This driver can also be built as a module. If so, the module
will be called pca953x. will be called pca953x.

View file

@ -33,7 +33,7 @@ static const struct i2c_device_id pca953x_id[] = {
{ "pca9554", 8, }, { "pca9554", 8, },
{ "pca9555", 16, }, { "pca9555", 16, },
{ "pca9557", 8, }, { "pca9557", 8, },
/* REVISIT several pca955x parts should work here too */ { "max7310", 8, },
{ } { }
}; };
MODULE_DEVICE_TABLE(i2c, pca953x_id); MODULE_DEVICE_TABLE(i2c, pca953x_id);

View file

@ -516,17 +516,23 @@ static struct dmi_system_id __initdata hdaps_whitelist[] = {
HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R51"), HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R51"),
HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R52"), HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R52"),
HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad R61i"), HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad R61i"),
HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad R61"),
HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad T41p"), HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad T41p"),
HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad T41"), HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad T41"),
HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad T42p"), HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad T42p"),
HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad T42"), HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad T42"),
HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad T43"), HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad T43"),
HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad T60"), HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad T60"),
HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad T61p"),
HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad T61"), HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad T61"),
HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad X40"), HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad X40"),
HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad X41"), HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad X41"),
HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X60"), HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X60"),
HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X61s"),
HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X61"),
HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad Z60m"), HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad Z60m"),
HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad Z61m"),
HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad Z61p"),
{ .ident = NULL } { .ident = NULL }
}; };

View file

@ -290,12 +290,12 @@ static int i2s_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
* bus, or started a new i2c message * bus, or started a new i2c message
*/ */
if (iicstat & S3C2410_IICSTAT_LASTBIT && if (iicstat & S3C2410_IICSTAT_LASTBIT &&
!(i2c->msg->flags & I2C_M_IGNORE_NAK)) { !(i2c->msg->flags & I2C_M_IGNORE_NAK)) {
/* ack was not received... */ /* ack was not received... */
dev_dbg(i2c->dev, "ack was not received\n"); dev_dbg(i2c->dev, "ack was not received\n");
s3c24xx_i2c_stop(i2c, -EREMOTEIO); s3c24xx_i2c_stop(i2c, -ENXIO);
goto out_ack; goto out_ack;
} }
@ -305,7 +305,7 @@ static int i2s_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
i2c->state = STATE_WRITE; i2c->state = STATE_WRITE;
/* terminate the transfer if there is nothing to do /* terminate the transfer if there is nothing to do
* (used by the i2c probe to find devices */ * as this is used by the i2c probe to find devices. */
if (is_lastmsg(i2c) && i2c->msg->len == 0) { if (is_lastmsg(i2c) && i2c->msg->len == 0) {
s3c24xx_i2c_stop(i2c, 0); s3c24xx_i2c_stop(i2c, 0);
@ -323,7 +323,17 @@ static int i2s_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
* end of the message, and if so, work out what to do * end of the message, and if so, work out what to do
*/ */
if (!(i2c->msg->flags & I2C_M_IGNORE_NAK)) {
if (iicstat & S3C2410_IICSTAT_LASTBIT) {
dev_dbg(i2c->dev, "WRITE: No Ack\n");
s3c24xx_i2c_stop(i2c, -ECONNREFUSED);
goto out_ack;
}
}
retry_write: retry_write:
if (!is_msgend(i2c)) { if (!is_msgend(i2c)) {
byte = i2c->msg->buf[i2c->msg_ptr++]; byte = i2c->msg->buf[i2c->msg_ptr++];
writeb(byte, i2c->regs + S3C2410_IICDS); writeb(byte, i2c->regs + S3C2410_IICDS);
@ -377,17 +387,6 @@ static int i2s_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
* going to do any more read/write * going to do any more read/write
*/ */
if (!(i2c->msg->flags & I2C_M_IGNORE_NAK) &&
!(is_msglast(i2c) && is_lastmsg(i2c))) {
if (iicstat & S3C2410_IICSTAT_LASTBIT) {
dev_dbg(i2c->dev, "READ: No Ack\n");
s3c24xx_i2c_stop(i2c, -ECONNREFUSED);
goto out_ack;
}
}
byte = readb(i2c->regs + S3C2410_IICDS); byte = readb(i2c->regs + S3C2410_IICDS);
i2c->msg->buf[i2c->msg_ptr++] = byte; i2c->msg->buf[i2c->msg_ptr++] = byte;
@ -949,3 +948,4 @@ MODULE_DESCRIPTION("S3C24XX I2C Bus driver");
MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:s3c2410-i2c"); MODULE_ALIAS("platform:s3c2410-i2c");
MODULE_ALIAS("platform:s3c2440-i2c");

View file

@ -823,6 +823,13 @@ config BLK_DEV_IDE_RAPIDE
Say Y here if you want to support the Yellowstone RapIDE controller Say Y here if you want to support the Yellowstone RapIDE controller
manufactured for use with Acorn computers. manufactured for use with Acorn computers.
config BLK_DEV_IDE_BAST
tristate "Simtec BAST / Thorcom VR1000 IDE support"
depends on ARM && (ARCH_BAST || MACH_VR1000)
help
Say Y here if you want to support the onboard IDE channels on the
Simtec BAST or the Thorcom VR1000
config IDE_H8300 config IDE_H8300
tristate "H8300 IDE support" tristate "H8300 IDE support"
depends on H8300 depends on H8300

View file

@ -1,6 +1,7 @@
obj-$(CONFIG_BLK_DEV_IDE_ICSIDE) += icside.o obj-$(CONFIG_BLK_DEV_IDE_ICSIDE) += icside.o
obj-$(CONFIG_BLK_DEV_IDE_RAPIDE) += rapide.o obj-$(CONFIG_BLK_DEV_IDE_RAPIDE) += rapide.o
obj-$(CONFIG_BLK_DEV_IDE_BAST) += bast-ide.o
obj-$(CONFIG_BLK_DEV_PALMCHIP_BK3710) += palm_bk3710.o obj-$(CONFIG_BLK_DEV_PALMCHIP_BK3710) += palm_bk3710.o
ifeq ($(CONFIG_IDE_ARM), m) ifeq ($(CONFIG_IDE_ARM), m)

View file

@ -0,0 +1,90 @@
/*
* Copyright (c) 2003-2004 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/ide.h>
#include <linux/init.h>
#include <asm/mach-types.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/arch/map.h>
#include <asm/arch/bast-map.h>
#include <asm/arch/bast-irq.h>
#define DRV_NAME "bast-ide"
static int __init bastide_register(unsigned int base, unsigned int aux, int irq)
{
ide_hwif_t *hwif;
hw_regs_t hw;
int i;
u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
memset(&hw, 0, sizeof(hw));
base += BAST_IDE_CS;
aux += BAST_IDE_CS;
for (i = 0; i <= 7; i++) {
hw.io_ports_array[i] = (unsigned long)base;
base += 0x20;
}
hw.io_ports.ctl_addr = aux + (6 * 0x20);
hw.irq = irq;
hw.chipset = ide_generic;
hwif = ide_find_port();
if (hwif == NULL)
goto out;
i = hwif->index;
ide_init_port_data(hwif, i);
ide_init_port_hw(hwif, &hw);
hwif->port_ops = NULL;
idx[0] = i;
ide_device_add(idx, NULL);
out:
return 0;
}
static int __init bastide_init(void)
{
unsigned long base = BAST_VA_IDEPRI + BAST_IDE_CS;
/* we can treat the VR1000 and the BAST the same */
if (!(machine_is_bast() || machine_is_vr1000()))
return 0;
printk("BAST: IDE driver, (c) 2003-2004 Simtec Electronics\n");
if (!request_mem_region(base, 0x400000, DRV_NAME)) {
printk(KERN_ERR "%s: resources busy\n", DRV_NAME);
return -EBUSY;
}
bastide_register(BAST_VA_IDEPRI, BAST_VA_IDEPRIAUX, IRQ_IDE0);
bastide_register(BAST_VA_IDESEC, BAST_VA_IDESECAUX, IRQ_IDE1);
return 0;
}
module_init(bastide_init);
MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Simtec BAST / Thorcom VR1000 IDE driver");

View file

@ -76,7 +76,7 @@ struct palm_bk3710_udmatiming {
#include "../ide-timing.h" #include "../ide-timing.h"
static long ide_palm_clk; static unsigned ideclk_period; /* in nanoseconds */
static const struct palm_bk3710_udmatiming palm_bk3710_udmatimings[6] = { static const struct palm_bk3710_udmatiming palm_bk3710_udmatimings[6] = {
{160, 240}, /* UDMA Mode 0 */ {160, 240}, /* UDMA Mode 0 */
@ -86,8 +86,6 @@ static const struct palm_bk3710_udmatiming palm_bk3710_udmatimings[6] = {
{85, 60}, /* UDMA Mode 4 */ {85, 60}, /* UDMA Mode 4 */
}; };
static struct clk *ideclkp;
static void palm_bk3710_setudmamode(void __iomem *base, unsigned int dev, static void palm_bk3710_setudmamode(void __iomem *base, unsigned int dev,
unsigned int mode) unsigned int mode)
{ {
@ -97,10 +95,10 @@ static void palm_bk3710_setudmamode(void __iomem *base, unsigned int dev,
/* DMA Data Setup */ /* DMA Data Setup */
t0 = DIV_ROUND_UP(palm_bk3710_udmatimings[mode].cycletime, t0 = DIV_ROUND_UP(palm_bk3710_udmatimings[mode].cycletime,
ide_palm_clk) - 1; ideclk_period) - 1;
tenv = DIV_ROUND_UP(20, ide_palm_clk) - 1; tenv = DIV_ROUND_UP(20, ideclk_period) - 1;
trp = DIV_ROUND_UP(palm_bk3710_udmatimings[mode].rptime, trp = DIV_ROUND_UP(palm_bk3710_udmatimings[mode].rptime,
ide_palm_clk) - 1; ideclk_period) - 1;
/* udmatim Register */ /* udmatim Register */
val16 = readw(base + BK3710_UDMATIM) & (dev ? 0xFF0F : 0xFFF0); val16 = readw(base + BK3710_UDMATIM) & (dev ? 0xFF0F : 0xFFF0);
@ -141,8 +139,8 @@ static void palm_bk3710_setdmamode(void __iomem *base, unsigned int dev,
cycletime = max_t(int, t->cycle, min_cycle); cycletime = max_t(int, t->cycle, min_cycle);
/* DMA Data Setup */ /* DMA Data Setup */
t0 = DIV_ROUND_UP(cycletime, ide_palm_clk); t0 = DIV_ROUND_UP(cycletime, ideclk_period);
td = DIV_ROUND_UP(t->active, ide_palm_clk); td = DIV_ROUND_UP(t->active, ideclk_period);
tkw = t0 - td - 1; tkw = t0 - td - 1;
td -= 1; td -= 1;
@ -168,9 +166,9 @@ static void palm_bk3710_setpiomode(void __iomem *base, ide_drive_t *mate,
struct ide_timing *t; struct ide_timing *t;
/* PIO Data Setup */ /* PIO Data Setup */
t0 = DIV_ROUND_UP(cycletime, ide_palm_clk); t0 = DIV_ROUND_UP(cycletime, ideclk_period);
t2 = DIV_ROUND_UP(ide_timing_find_mode(XFER_PIO_0 + mode)->active, t2 = DIV_ROUND_UP(ide_timing_find_mode(XFER_PIO_0 + mode)->active,
ide_palm_clk); ideclk_period);
t2i = t0 - t2 - 1; t2i = t0 - t2 - 1;
t2 -= 1; t2 -= 1;
@ -192,8 +190,8 @@ static void palm_bk3710_setpiomode(void __iomem *base, ide_drive_t *mate,
/* TASKFILE Setup */ /* TASKFILE Setup */
t = ide_timing_find_mode(XFER_PIO_0 + mode); t = ide_timing_find_mode(XFER_PIO_0 + mode);
t0 = DIV_ROUND_UP(t->cyc8b, ide_palm_clk); t0 = DIV_ROUND_UP(t->cyc8b, ideclk_period);
t2 = DIV_ROUND_UP(t->act8b, ide_palm_clk); t2 = DIV_ROUND_UP(t->act8b, ideclk_period);
t2i = t0 - t2 - 1; t2i = t0 - t2 - 1;
t2 -= 1; t2 -= 1;
@ -350,22 +348,22 @@ static const struct ide_port_info __devinitdata palm_bk3710_port_info = {
static int __devinit palm_bk3710_probe(struct platform_device *pdev) static int __devinit palm_bk3710_probe(struct platform_device *pdev)
{ {
struct clk *clkp; struct clk *clk;
struct resource *mem, *irq; struct resource *mem, *irq;
ide_hwif_t *hwif; ide_hwif_t *hwif;
unsigned long base; unsigned long base, rate;
int i; int i;
hw_regs_t hw; hw_regs_t hw;
u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
clkp = clk_get(NULL, "IDECLK"); clk = clk_get(NULL, "IDECLK");
if (IS_ERR(clkp)) if (IS_ERR(clk))
return -ENODEV; return -ENODEV;
ideclkp = clkp; clk_enable(clk);
clk_enable(ideclkp); rate = clk_get_rate(clk);
ide_palm_clk = clk_get_rate(ideclkp)/100000; ideclk_period = 1000000000UL / rate;
ide_palm_clk = (10000/ide_palm_clk) + 1;
/* Register the IDE interface with Linux ATA Interface */ /* Register the IDE interface with Linux ATA Interface */
memset(&hw, 0, sizeof(hw)); memset(&hw, 0, sizeof(hw));

View file

@ -646,8 +646,6 @@ static int ide_register_port(ide_hwif_t *hwif)
goto out; goto out;
} }
get_device(&hwif->gendev);
hwif->portdev = device_create_drvdata(ide_port_class, &hwif->gendev, hwif->portdev = device_create_drvdata(ide_port_class, &hwif->gendev,
MKDEV(0, 0), hwif, hwif->name); MKDEV(0, 0), hwif, hwif->name);
if (IS_ERR(hwif->portdev)) { if (IS_ERR(hwif->portdev)) {
@ -1220,16 +1218,12 @@ static void drive_release_dev (struct device *dev)
complete(&drive->gendev_rel_comp); complete(&drive->gendev_rel_comp);
} }
#ifndef ide_default_irq
#define ide_default_irq(irq) 0
#endif
static int hwif_init(ide_hwif_t *hwif) static int hwif_init(ide_hwif_t *hwif)
{ {
int old_irq; int old_irq;
if (!hwif->irq) { if (!hwif->irq) {
hwif->irq = ide_default_irq(hwif->io_ports.data_addr); hwif->irq = __ide_default_irq(hwif->io_ports.data_addr);
if (!hwif->irq) { if (!hwif->irq) {
printk("%s: DISABLED, NO IRQ\n", hwif->name); printk("%s: DISABLED, NO IRQ\n", hwif->name);
return 0; return 0;
@ -1259,7 +1253,7 @@ static int hwif_init(ide_hwif_t *hwif)
* It failed to initialise. Find the default IRQ for * It failed to initialise. Find the default IRQ for
* this port and try that. * this port and try that.
*/ */
hwif->irq = ide_default_irq(hwif->io_ports.data_addr); hwif->irq = __ide_default_irq(hwif->io_ports.data_addr);
if (!hwif->irq) { if (!hwif->irq) {
printk("%s: Disabled unable to get IRQ %d.\n", printk("%s: Disabled unable to get IRQ %d.\n",
hwif->name, old_irq); hwif->name, old_irq);

View file

@ -76,7 +76,7 @@ static int proc_ide_read_mate
ide_hwif_t *hwif = (ide_hwif_t *) data; ide_hwif_t *hwif = (ide_hwif_t *) data;
int len; int len;
if (hwif && hwif->mate && hwif->mate->present) if (hwif && hwif->mate)
len = sprintf(page, "%s\n", hwif->mate->name); len = sprintf(page, "%s\n", hwif->mate->name);
else else
len = sprintf(page, "(none)\n"); len = sprintf(page, "(none)\n");

View file

@ -315,13 +315,14 @@ void ide_unregister(ide_hwif_t *hwif)
BUG_ON(in_interrupt()); BUG_ON(in_interrupt());
BUG_ON(irqs_disabled()); BUG_ON(irqs_disabled());
mutex_lock(&ide_cfg_mtx);
spin_lock_irq(&ide_lock);
if (!hwif->present)
goto abort;
__ide_port_unregister_devices(hwif);
hwif->present = 0;
mutex_lock(&ide_cfg_mtx);
spin_lock_irq(&ide_lock);
if (hwif->present) {
__ide_port_unregister_devices(hwif);
hwif->present = 0;
}
spin_unlock_irq(&ide_lock); spin_unlock_irq(&ide_lock);
ide_proc_unregister_port(hwif); ide_proc_unregister_port(hwif);
@ -351,16 +352,15 @@ void ide_unregister(ide_hwif_t *hwif)
blk_unregister_region(MKDEV(hwif->major, 0), MAX_DRIVES<<PARTN_BITS); blk_unregister_region(MKDEV(hwif->major, 0), MAX_DRIVES<<PARTN_BITS);
kfree(hwif->sg_table); kfree(hwif->sg_table);
unregister_blkdev(hwif->major, hwif->name); unregister_blkdev(hwif->major, hwif->name);
spin_lock_irq(&ide_lock);
if (hwif->dma_base) if (hwif->dma_base)
ide_release_dma_engine(hwif); ide_release_dma_engine(hwif);
spin_lock_irq(&ide_lock);
/* restore hwif data to pristine status */ /* restore hwif data to pristine status */
ide_init_port_data(hwif, hwif->index); ide_init_port_data(hwif, hwif->index);
abort:
spin_unlock_irq(&ide_lock); spin_unlock_irq(&ide_lock);
mutex_unlock(&ide_cfg_mtx); mutex_unlock(&ide_cfg_mtx);
} }
@ -1094,13 +1094,6 @@ struct bus_type ide_bus_type = {
EXPORT_SYMBOL_GPL(ide_bus_type); EXPORT_SYMBOL_GPL(ide_bus_type);
static void ide_port_class_release(struct device *portdev)
{
ide_hwif_t *hwif = dev_get_drvdata(portdev);
put_device(&hwif->gendev);
}
int ide_vlb_clk; int ide_vlb_clk;
EXPORT_SYMBOL_GPL(ide_vlb_clk); EXPORT_SYMBOL_GPL(ide_vlb_clk);
@ -1305,7 +1298,6 @@ static int __init ide_init(void)
ret = PTR_ERR(ide_port_class); ret = PTR_ERR(ide_port_class);
goto out_port_class; goto out_port_class;
} }
ide_port_class->dev_release = ide_port_class_release;
init_ide_data(); init_ide_data();

View file

@ -184,8 +184,7 @@ static const struct ide_port_info it8213_chipsets[] __devinitdata = {
static int __devinit it8213_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit it8213_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_setup_pci_device(dev, &it8213_chipsets[id->driver_data]); return ide_setup_pci_device(dev, &it8213_chipsets[id->driver_data]);
return 0;
} }
static const struct pci_device_id it8213_pci_tbl[] = { static const struct pci_device_id it8213_pci_tbl[] = {

View file

@ -225,10 +225,6 @@ static int ns87415_dma_setup(ide_drive_t *drive)
return 1; return 1;
} }
#ifndef ide_default_irq
#define ide_default_irq(irq) 0
#endif
static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif)
{ {
struct pci_dev *dev = to_pci_dev(hwif->dev); struct pci_dev *dev = to_pci_dev(hwif->dev);
@ -288,7 +284,7 @@ static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif)
} }
if (!using_inta) if (!using_inta)
hwif->irq = ide_default_irq(hwif->io_ports.data_addr); hwif->irq = __ide_default_irq(hwif->io_ports.data_addr);
else if (!hwif->irq && hwif->mate && hwif->mate->irq) else if (!hwif->irq && hwif->mate && hwif->mate->irq)
hwif->irq = hwif->mate->irq; /* share IRQ with mate */ hwif->irq = hwif->mate->irq; /* share IRQ with mate */

View file

@ -1096,7 +1096,9 @@ static ssize_t show_fw_ver(struct device *dev, struct device_attribute *attr, ch
struct net_device *lldev = iwch_dev->rdev.t3cdev_p->lldev; struct net_device *lldev = iwch_dev->rdev.t3cdev_p->lldev;
PDBG("%s dev 0x%p\n", __func__, dev); PDBG("%s dev 0x%p\n", __func__, dev);
rtnl_lock();
lldev->ethtool_ops->get_drvinfo(lldev, &info); lldev->ethtool_ops->get_drvinfo(lldev, &info);
rtnl_unlock();
return sprintf(buf, "%s\n", info.fw_version); return sprintf(buf, "%s\n", info.fw_version);
} }
@ -1109,7 +1111,9 @@ static ssize_t show_hca(struct device *dev, struct device_attribute *attr,
struct net_device *lldev = iwch_dev->rdev.t3cdev_p->lldev; struct net_device *lldev = iwch_dev->rdev.t3cdev_p->lldev;
PDBG("%s dev 0x%p\n", __func__, dev); PDBG("%s dev 0x%p\n", __func__, dev);
rtnl_lock();
lldev->ethtool_ops->get_drvinfo(lldev, &info); lldev->ethtool_ops->get_drvinfo(lldev, &info);
rtnl_unlock();
return sprintf(buf, "%s\n", info.driver); return sprintf(buf, "%s\n", info.driver);
} }

View file

@ -28,6 +28,7 @@
#include <linux/input.h> #include <linux/input.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/sched.h>
/* /*
* Check that the effect_id is a valid effect and whether the user * Check that the effect_id is a valid effect and whether the user
@ -166,8 +167,10 @@ int input_ff_upload(struct input_dev *dev, struct ff_effect *effect,
if (ret) if (ret)
goto out; goto out;
spin_lock_irq(&dev->event_lock);
ff->effects[id] = *effect; ff->effects[id] = *effect;
ff->effect_owners[id] = file; ff->effect_owners[id] = file;
spin_unlock_irq(&dev->event_lock);
out: out:
mutex_unlock(&ff->mutex); mutex_unlock(&ff->mutex);
@ -189,15 +192,21 @@ static int erase_effect(struct input_dev *dev, int effect_id,
if (error) if (error)
return error; return error;
spin_lock_irq(&dev->event_lock);
ff->playback(dev, effect_id, 0); ff->playback(dev, effect_id, 0);
ff->effect_owners[effect_id] = NULL;
spin_unlock_irq(&dev->event_lock);
if (ff->erase) { if (ff->erase) {
error = ff->erase(dev, effect_id); error = ff->erase(dev, effect_id);
if (error) if (error) {
return error; spin_lock_irq(&dev->event_lock);
} ff->effect_owners[effect_id] = file;
spin_unlock_irq(&dev->event_lock);
ff->effect_owners[effect_id] = NULL; return error;
}
}
return 0; return 0;
} }
@ -263,8 +272,6 @@ int input_ff_event(struct input_dev *dev, unsigned int type,
if (type != EV_FF) if (type != EV_FF)
return 0; return 0;
mutex_lock(&ff->mutex);
switch (code) { switch (code) {
case FF_GAIN: case FF_GAIN:
if (!test_bit(FF_GAIN, dev->ffbit) || value > 0xffff) if (!test_bit(FF_GAIN, dev->ffbit) || value > 0xffff)
@ -286,7 +293,6 @@ int input_ff_event(struct input_dev *dev, unsigned int type,
break; break;
} }
mutex_unlock(&ff->mutex);
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(input_ff_event); EXPORT_SYMBOL_GPL(input_ff_event);

View file

@ -432,6 +432,7 @@ static int crypt_convert(struct crypt_config *cc,
case 0: case 0:
atomic_dec(&ctx->pending); atomic_dec(&ctx->pending);
ctx->sector++; ctx->sector++;
cond_resched();
continue; continue;
/* error */ /* error */

View file

@ -3897,8 +3897,10 @@ static void autorun_devices(int part)
md_probe(dev, NULL, NULL); md_probe(dev, NULL, NULL);
mddev = mddev_find(dev); mddev = mddev_find(dev);
if (!mddev) { if (!mddev || !mddev->gendisk) {
printk(KERN_ERR if (mddev)
mddev_put(mddev);
printk(KERN_ERR
"md: cannot allocate memory for md drive.\n"); "md: cannot allocate memory for md drive.\n");
break; break;
} }

View file

@ -2137,6 +2137,8 @@ static int run(mddev_t *mddev)
!test_bit(In_sync, &disk->rdev->flags)) { !test_bit(In_sync, &disk->rdev->flags)) {
disk->head_position = 0; disk->head_position = 0;
mddev->degraded++; mddev->degraded++;
if (disk->rdev)
conf->fullsync = 1;
} }
} }

View file

@ -2017,12 +2017,7 @@ static int __handle_issuing_new_read_requests5(struct stripe_head *sh,
*/ */
s->uptodate++; s->uptodate++;
return 0; /* uptodate + compute == disks */ return 0; /* uptodate + compute == disks */
} else if ((s->uptodate < disks - 1) && } else if (test_bit(R5_Insync, &dev->flags)) {
test_bit(R5_Insync, &dev->flags)) {
/* Note: we hold off compute operations while checks are
* in flight, but we still prefer 'compute' over 'read'
* hence we only read if (uptodate < * disks-1)
*/
set_bit(R5_LOCKED, &dev->flags); set_bit(R5_LOCKED, &dev->flags);
set_bit(R5_Wantread, &dev->flags); set_bit(R5_Wantread, &dev->flags);
if (!test_and_set_bit(STRIPE_OP_IO, &sh->ops.pending)) if (!test_and_set_bit(STRIPE_OP_IO, &sh->ops.pending))
@ -2898,6 +2893,8 @@ static void handle_stripe5(struct stripe_head *sh)
for (i = conf->raid_disks; i--; ) { for (i = conf->raid_disks; i--; ) {
set_bit(R5_Wantwrite, &sh->dev[i].flags); set_bit(R5_Wantwrite, &sh->dev[i].flags);
set_bit(R5_LOCKED, &dev->flags);
s.locked++;
if (!test_and_set_bit(STRIPE_OP_IO, &sh->ops.pending)) if (!test_and_set_bit(STRIPE_OP_IO, &sh->ops.pending))
sh->ops.count++; sh->ops.count++;
} }
@ -2911,6 +2908,7 @@ static void handle_stripe5(struct stripe_head *sh)
conf->raid_disks); conf->raid_disks);
s.locked += handle_write_operations5(sh, 1, 1); s.locked += handle_write_operations5(sh, 1, 1);
} else if (s.expanded && } else if (s.expanded &&
s.locked == 0 &&
!test_bit(STRIPE_OP_POSTXOR, &sh->ops.pending)) { !test_bit(STRIPE_OP_POSTXOR, &sh->ops.pending)) {
clear_bit(STRIPE_EXPAND_READY, &sh->state); clear_bit(STRIPE_EXPAND_READY, &sh->state);
atomic_dec(&conf->reshape_stripes); atomic_dec(&conf->reshape_stripes);
@ -4305,7 +4303,9 @@ static int run(mddev_t *mddev)
" disk %d\n", bdevname(rdev->bdev,b), " disk %d\n", bdevname(rdev->bdev,b),
raid_disk); raid_disk);
working_disks++; working_disks++;
} } else
/* Cannot rely on bitmap to complete recovery */
conf->fullsync = 1;
} }
/* /*

Some files were not shown because too many files have changed in this diff Show more