diff --git a/[refs] b/[refs]
index 7015fca24998..af156c8fee7e 100644
--- a/[refs]
+++ b/[refs]
@@ -1,2 +1,2 @@
---
-refs/heads/master: 0b5c59a1e41636afa77b90d34e8c394d8d929733
+refs/heads/master: 7d420896256a4bffe44202f282fbdd4c74d779a8
diff --git a/trunk/CREDITS b/trunk/CREDITS
index c6d69bf10e15..af70678a0afd 100644
--- a/trunk/CREDITS
+++ b/trunk/CREDITS
@@ -2007,14 +2007,13 @@ S: University of Stuttgart, Germany and
S: Ecole Nationale Superieure des Telecommunications, Paris
N: Jamie Lokier
-E: jamie@shareable.org
-W: http://www.shareable.org/
+E: jamie@imbolc.ucc.ie
D: Reboot-through-BIOS for broken 486 motherboards
-D: Parport fixes, futex improvements
-D: First instruction of x86 sysenter path :)
-S: 51 Sunningwell Road
+D: Some parport fixes
+S: 11 Goodson Walk
+S: Marston
S: Oxford
-S: OX1 4SZ
+S: OX3 0HX
S: United Kingdom
N: Mark Lord
diff --git a/trunk/Documentation/DocBook/Makefile b/trunk/Documentation/DocBook/Makefile
index 7d87dd73cbe4..2975291e296a 100644
--- a/trunk/Documentation/DocBook/Makefile
+++ b/trunk/Documentation/DocBook/Makefile
@@ -28,7 +28,7 @@ PS_METHOD = $(prefer-db2x)
###
# The targets that may be used.
-PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs
+.PHONY: xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs
BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
xmldocs: $(BOOKS)
@@ -211,9 +211,3 @@ clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS))
#man put files in man subdir - traverse down
subdir- := man/
-
-
-# Declare the contents of the .PHONY variable as phony. We keep that
-# information in a variable se we can use it in if_changed and friends.
-
-.PHONY: $(PHONY)
diff --git a/trunk/Documentation/DocBook/deviceiobook.tmpl b/trunk/Documentation/DocBook/deviceiobook.tmpl
index 90ed23df1f68..6f41f2f5c6f6 100644
--- a/trunk/Documentation/DocBook/deviceiobook.tmpl
+++ b/trunk/Documentation/DocBook/deviceiobook.tmpl
@@ -270,6 +270,25 @@ CPU B: spin_unlock_irqrestore(&dev_lock, flags)
+
+ ISA legacy functions
+
+ On older kernels (2.2 and earlier) the ISA bus could be read or
+ written with these functions and without ioremap being used. This is
+ no longer true in Linux 2.4. A set of equivalent functions exist for
+ easy legacy driver porting. The functions available are prefixed
+ with 'isa_' and are isa_readb,
+ isa_writeb, isa_readw,
+ isa_writew, isa_readl,
+ isa_writel, isa_memcpy_fromio
+ and isa_memcpy_toio
+
+
+ These functions should not be used in new drivers, and will
+ eventually be going away.
+
+
+
diff --git a/trunk/Documentation/RCU/whatisRCU.txt b/trunk/Documentation/RCU/whatisRCU.txt
index b4ea51ad3610..5ed85af88789 100644
--- a/trunk/Documentation/RCU/whatisRCU.txt
+++ b/trunk/Documentation/RCU/whatisRCU.txt
@@ -360,7 +360,7 @@ uses of RCU may be found in listRCU.txt, arrayRCU.txt, and NMI-RCU.txt.
struct foo *new_fp;
struct foo *old_fp;
- new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL);
+ new_fp = kmalloc(sizeof(*fp), GFP_KERNEL);
spin_lock(&foo_mutex);
old_fp = gbl_foo;
*new_fp = *old_fp;
@@ -461,7 +461,7 @@ The foo_update_a() function might then be written as follows:
struct foo *new_fp;
struct foo *old_fp;
- new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL);
+ new_fp = kmalloc(sizeof(*fp), GFP_KERNEL);
spin_lock(&foo_mutex);
old_fp = gbl_foo;
*new_fp = *old_fp;
diff --git a/trunk/Documentation/aoe/mkdevs.sh b/trunk/Documentation/aoe/mkdevs.sh
index 97374aacacb2..ec5a6de1cd7b 100644
--- a/trunk/Documentation/aoe/mkdevs.sh
+++ b/trunk/Documentation/aoe/mkdevs.sh
@@ -27,8 +27,6 @@ rm -f $dir/discover
mknod -m 0200 $dir/discover c $MAJOR 3
rm -f $dir/interfaces
mknod -m 0200 $dir/interfaces c $MAJOR 4
-rm -f $dir/revalidate
-mknod -m 0200 $dir/revalidate c $MAJOR 5
export n_partitions
mkshelf=`echo $0 | sed 's!mkdevs!mkshelf!'`
diff --git a/trunk/Documentation/aoe/udev.txt b/trunk/Documentation/aoe/udev.txt
index a7ed1dc4f331..ab39d8bb634c 100644
--- a/trunk/Documentation/aoe/udev.txt
+++ b/trunk/Documentation/aoe/udev.txt
@@ -18,7 +18,6 @@
SUBSYSTEM="aoe", KERNEL="discover", NAME="etherd/%k", GROUP="disk", MODE="0220"
SUBSYSTEM="aoe", KERNEL="err", NAME="etherd/%k", GROUP="disk", MODE="0440"
SUBSYSTEM="aoe", KERNEL="interfaces", NAME="etherd/%k", GROUP="disk", MODE="0220"
-SUBSYSTEM="aoe", KERNEL="revalidate", NAME="etherd/%k", GROUP="disk", MODE="0220"
# aoe block devices
KERNEL="etherd*", NAME="%k", GROUP="disk"
diff --git a/trunk/Documentation/arm/Booting b/trunk/Documentation/arm/Booting
index 76850295af8f..fad566bb02fc 100644
--- a/trunk/Documentation/arm/Booting
+++ b/trunk/Documentation/arm/Booting
@@ -118,7 +118,7 @@ to store page tables. The recommended placement is 32KiB into RAM.
In either case, the following conditions must be met:
-- Quiesce all DMA capable devices so that memory does not get
+- Quiesce all DMA capable devicess so that memory does not get
corrupted by bogus network packets or disk data. This will save
you many hours of debug.
diff --git a/trunk/Documentation/arm/README b/trunk/Documentation/arm/README
index 9b9c8226fdc4..5ed6f3530b86 100644
--- a/trunk/Documentation/arm/README
+++ b/trunk/Documentation/arm/README
@@ -89,7 +89,7 @@ Modules
Although modularisation is supported (and required for the FP emulator),
each module on an ARM2/ARM250/ARM3 machine when is loaded will take
memory up to the next 32k boundary due to the size of the pages.
- Therefore, is modularisation on these machines really worth it?
+ Therefore, modularisation on these machines really worth it?
However, ARM6 and up machines allow modules to take multiples of 4k, and
as such Acorn RiscPCs and other architectures using these processors can
diff --git a/trunk/Documentation/arm/Setup b/trunk/Documentation/arm/Setup
index 0cb1e64bde80..0abd0720d7ed 100644
--- a/trunk/Documentation/arm/Setup
+++ b/trunk/Documentation/arm/Setup
@@ -58,7 +58,7 @@ below:
video_y
This describes the character position of cursor on VGA console, and
- is otherwise unused. (should not be used for other console types, and
+ is otherwise unused. (should not used for other console types, and
should not be used for other purposes).
memc_control_reg
diff --git a/trunk/Documentation/cpusets.txt b/trunk/Documentation/cpusets.txt
index 159e2a0c3e80..30c41459953c 100644
--- a/trunk/Documentation/cpusets.txt
+++ b/trunk/Documentation/cpusets.txt
@@ -18,8 +18,7 @@ CONTENTS:
1.4 What are exclusive cpusets ?
1.5 What does notify_on_release do ?
1.6 What is memory_pressure ?
- 1.7 What is memory spread ?
- 1.8 How do I use cpusets ?
+ 1.7 How do I use cpusets ?
2. Usage Examples and Syntax
2.1 Basic Usage
2.2 Adding/removing cpus
@@ -318,78 +317,7 @@ the tasks in the cpuset, in units of reclaims attempted per second,
times 1000.
-1.7 What is memory spread ?
----------------------------
-There are two boolean flag files per cpuset that control where the
-kernel allocates pages for the file system buffers and related in
-kernel data structures. They are called 'memory_spread_page' and
-'memory_spread_slab'.
-
-If the per-cpuset boolean flag file 'memory_spread_page' is set, then
-the kernel will spread the file system buffers (page cache) evenly
-over all the nodes that the faulting task is allowed to use, instead
-of preferring to put those pages on the node where the task is running.
-
-If the per-cpuset boolean flag file 'memory_spread_slab' is set,
-then the kernel will spread some file system related slab caches,
-such as for inodes and dentries evenly over all the nodes that the
-faulting task is allowed to use, instead of preferring to put those
-pages on the node where the task is running.
-
-The setting of these flags does not affect anonymous data segment or
-stack segment pages of a task.
-
-By default, both kinds of memory spreading are off, and memory
-pages are allocated on the node local to where the task is running,
-except perhaps as modified by the tasks NUMA mempolicy or cpuset
-configuration, so long as sufficient free memory pages are available.
-
-When new cpusets are created, they inherit the memory spread settings
-of their parent.
-
-Setting memory spreading causes allocations for the affected page
-or slab caches to ignore the tasks NUMA mempolicy and be spread
-instead. Tasks using mbind() or set_mempolicy() calls to set NUMA
-mempolicies will not notice any change in these calls as a result of
-their containing tasks memory spread settings. If memory spreading
-is turned off, then the currently specified NUMA mempolicy once again
-applies to memory page allocations.
-
-Both 'memory_spread_page' and 'memory_spread_slab' are boolean flag
-files. By default they contain "0", meaning that the feature is off
-for that cpuset. If a "1" is written to that file, then that turns
-the named feature on.
-
-The implementation is simple.
-
-Setting the flag 'memory_spread_page' turns on a per-process flag
-PF_SPREAD_PAGE for each task that is in that cpuset or subsequently
-joins that cpuset. The page allocation calls for the page cache
-is modified to perform an inline check for this PF_SPREAD_PAGE task
-flag, and if set, a call to a new routine cpuset_mem_spread_node()
-returns the node to prefer for the allocation.
-
-Similarly, setting 'memory_spread_cache' turns on the flag
-PF_SPREAD_SLAB, and appropriately marked slab caches will allocate
-pages from the node returned by cpuset_mem_spread_node().
-
-The cpuset_mem_spread_node() routine is also simple. It uses the
-value of a per-task rotor cpuset_mem_spread_rotor to select the next
-node in the current tasks mems_allowed to prefer for the allocation.
-
-This memory placement policy is also known (in other contexts) as
-round-robin or interleave.
-
-This policy can provide substantial improvements for jobs that need
-to place thread local data on the corresponding node, but that need
-to access large file system data sets that need to be spread across
-the several nodes in the jobs cpuset in order to fit. Without this
-policy, especially for jobs that might have one thread reading in the
-data set, the memory allocation across the nodes in the jobs cpuset
-can become very uneven.
-
-
-1.8 How do I use cpusets ?
+1.7 How do I use cpusets ?
--------------------------
In order to minimize the impact of cpusets on critical kernel
diff --git a/trunk/Documentation/feature-removal-schedule.txt b/trunk/Documentation/feature-removal-schedule.txt
index 495858b236b6..afeaf6218ea2 100644
--- a/trunk/Documentation/feature-removal-schedule.txt
+++ b/trunk/Documentation/feature-removal-schedule.txt
@@ -116,17 +116,6 @@ Who: Harald Welte
---------------------------
-What: remove EXPORT_SYMBOL(kernel_thread)
-When: August 2006
-Files: arch/*/kernel/*_ksyms.c
-Why: kernel_thread is a low-level implementation detail. Drivers should
- use the API instead which shields them from
- implementation details and provides a higherlevel interface that
- prevents bugs and code duplication
-Who: Christoph Hellwig
-
----------------------------
-
What: EXPORT_SYMBOL(lookup_hash)
When: January 2006
Why: Too low-level interface. Use lookup_one_len or lookup_create instead.
@@ -169,6 +158,13 @@ Who: Adrian Bunk
---------------------------
+What: Legacy /proc/pci interface (PCI_LEGACY_PROC)
+When: March 2006
+Why: deprecated since 2.5.53 in favor of lspci(8)
+Who: Adrian Bunk
+
+---------------------------
+
What: pci_module_init(driver)
When: January 2007
Why: Is replaced by pci_register_driver(pci_driver).
@@ -176,18 +172,6 @@ Who: Richard Knutsson and Greg Kroah-Hartman
-
----------------------------
-
What: I2C interface of the it87 driver
When: January 2007
Why: The ISA interface is faster and should be always available. The I2C
@@ -197,17 +181,6 @@ Who: Jean Delvare
---------------------------
-What: remove EXPORT_SYMBOL(tasklist_lock)
-When: August 2006
-Files: kernel/fork.c
-Why: tasklist_lock protects the kernel internal task list. Modules have
- no business looking at it, and all instances in drivers have been due
- to use of too-lowlevel APIs. Having this symbol exported prevents
- moving to more scalable locking schemes for the task list.
-Who: Christoph Hellwig
-
----------------------------
-
What: mount/umount uevents
When: February 2007
Why: These events are not correct, and do not properly let userspace know
diff --git a/trunk/Documentation/filesystems/ntfs.txt b/trunk/Documentation/filesystems/ntfs.txt
index 638cbd3d2b00..251168587899 100644
--- a/trunk/Documentation/filesystems/ntfs.txt
+++ b/trunk/Documentation/filesystems/ntfs.txt
@@ -457,11 +457,6 @@ ChangeLog
Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.
-2.1.27:
- - Implement page migration support so the kernel can move memory used
- by NTFS files and directories around for management purposes.
- - Add support for writing to sparse files created with Windows XP SP2.
- - Many minor improvements and bug fixes.
2.1.26:
- Implement support for sector sizes above 512 bytes (up to the maximum
supported by NTFS which is 4096 bytes).
diff --git a/trunk/Documentation/filesystems/proc.txt b/trunk/Documentation/filesystems/proc.txt
index 99902ae6804e..944cf109a6f5 100644
--- a/trunk/Documentation/filesystems/proc.txt
+++ b/trunk/Documentation/filesystems/proc.txt
@@ -121,7 +121,7 @@ Table 1-1: Process specific entries in /proc
..............................................................................
File Content
cmdline Command line arguments
- cpu Current and last cpu in which it was executed (2.4)(smp)
+ cpu Current and last cpu in wich it was executed (2.4)(smp)
cwd Link to the current working directory
environ Values of environment variables
exe Link to the executable of this process
@@ -309,13 +309,13 @@ is the same by default:
> cat /proc/irq/0/smp_affinity
ffffffff
-It's a bitmask, in which you can specify which CPUs can handle the IRQ, you can
+It's a bitmask, in wich you can specify wich CPUs can handle the IRQ, you can
set it by doing:
> echo 1 > /proc/irq/prof_cpu_mask
This means that only the first CPU will handle the IRQ, but you can also echo 5
-which means that only the first and fourth CPU can handle the IRQ.
+wich means that only the first and fourth CPU can handle the IRQ.
The way IRQs are routed is handled by the IO-APIC, and it's Round Robin
between all the CPUs which are allowed to handle it. As usual the kernel has
diff --git a/trunk/Documentation/filesystems/udf.txt b/trunk/Documentation/filesystems/udf.txt
index 511b4230c053..e5213bc301f7 100644
--- a/trunk/Documentation/filesystems/udf.txt
+++ b/trunk/Documentation/filesystems/udf.txt
@@ -26,20 +26,6 @@ The following mount options are supported:
nostrict Unset strict conformance
iocharset= Set the NLS character set
-The uid= and gid= options need a bit more explaining. They will accept a
-decimal numeric value which will be used as the default ID for that mount.
-They will also accept the string "ignore" and "forget". For files on the disk
-that are owned by nobody ( -1 ), they will instead look as if they are owned
-by the default ID. The ignore option causes the default ID to override all
-IDs on the disk, not just -1. The forget option causes all IDs to be written
-to disk as -1, so when the media is later remounted, they will appear to be
-owned by whatever default ID it is mounted with at that time.
-
-For typical desktop use of removable media, you should set the ID to that
-of the interactively logged on user, and also specify both the forget and
-ignore options. This way the interactive user will always see the files
-on the disk as belonging to him.
-
The remaining are for debugging and disaster recovery:
novrs Skip volume sequence recognition
diff --git a/trunk/Documentation/filesystems/9p.txt b/trunk/Documentation/filesystems/v9fs.txt
similarity index 82%
rename from trunk/Documentation/filesystems/9p.txt
rename to trunk/Documentation/filesystems/v9fs.txt
index 43b89c214d20..24c7a9c41f0d 100644
--- a/trunk/Documentation/filesystems/9p.txt
+++ b/trunk/Documentation/filesystems/v9fs.txt
@@ -1,5 +1,5 @@
- v9fs: Plan 9 Resource Sharing for Linux
- =======================================
+ V9FS: 9P2000 for Linux
+ ======================
ABOUT
=====
@@ -9,19 +9,18 @@ v9fs is a Unix implementation of the Plan 9 9p remote filesystem protocol.
This software was originally developed by Ron Minnich
and Maya Gokhale . Additional development by Greg Watson
and most recently Eric Van Hensbergen
-, Latchesar Ionkov and Russ Cox
-.
+ and Latchesar Ionkov .
USAGE
=====
For remote file server:
- mount -t 9p 10.10.1.2 /mnt/9
+ mount -t 9P 10.10.1.2 /mnt/9
For Plan 9 From User Space applications (http://swtch.com/plan9)
- mount -t 9p `namespace`/acme /mnt/9 -o proto=unix,uname=$USER
+ mount -t 9P `namespace`/acme /mnt/9 -o proto=unix,name=$USER
OPTIONS
=======
@@ -33,7 +32,7 @@ OPTIONS
fd - used passed file descriptors for connection
(see rfdno and wfdno)
- uname=name user name to attempt mount as on the remote server. The
+ name=name user name to attempt mount as on the remote server. The
server may override or ignore this value. Certain user
names may require authentication.
@@ -43,7 +42,7 @@ OPTIONS
debug=n specifies debug level. The debug level is a bitmask.
0x01 = display verbose error messages
0x02 = developer debug (DEBUG_CURRENT)
- 0x04 = display 9p trace
+ 0x04 = display 9P trace
0x08 = display VFS trace
0x10 = display Marshalling debug
0x20 = display RPC debug
@@ -54,11 +53,11 @@ OPTIONS
wfdno=n the file descriptor for writing with proto=fd
- maxdata=n the number of bytes to use for 9p packet payload (msize)
+ maxdata=n the number of bytes to use for 9P packet payload (msize)
port=n port to connect to on the remote server
- noextend force legacy mode (no 9p2000.u semantics)
+ noextend force legacy mode (no 9P2000.u semantics)
uid attempt to mount as a particular uid
@@ -73,7 +72,7 @@ OPTIONS
RESOURCES
=========
-The Linux version of the 9p server is now maintained under the npfs project
+The Linux version of the 9P server is now maintained under the npfs project
on sourceforge (http://sourceforge.net/projects/npfs).
There are user and developer mailing lists available through the v9fs project
diff --git a/trunk/Documentation/filesystems/vfs.txt b/trunk/Documentation/filesystems/vfs.txt
index adaa899e5c90..e56e842847d3 100644
--- a/trunk/Documentation/filesystems/vfs.txt
+++ b/trunk/Documentation/filesystems/vfs.txt
@@ -230,15 +230,10 @@ only called from a process context (i.e. not from an interrupt handler
or bottom half).
alloc_inode: this method is called by inode_alloc() to allocate memory
- for struct inode and initialize it. If this function is not
- defined, a simple 'struct inode' is allocated. Normally
- alloc_inode will be used to allocate a larger structure which
- contains a 'struct inode' embedded within it.
+ for struct inode and initialize it.
destroy_inode: this method is called by destroy_inode() to release
- resources allocated for struct inode. It is only required if
- ->alloc_inode was defined and simply undoes anything done by
- ->alloc_inode.
+ resources allocated for struct inode.
read_inode: this method is called to read a specific inode from the
mounted filesystem. The i_ino member in the struct inode is
@@ -448,81 +443,14 @@ otherwise noted.
The Address Space Object
========================
-The address space object is used to group and manage pages in the page
-cache. It can be used to keep track of the pages in a file (or
-anything else) and also track the mapping of sections of the file into
-process address spaces.
-
-There are a number of distinct yet related services that an
-address-space can provide. These include communicating memory
-pressure, page lookup by address, and keeping track of pages tagged as
-Dirty or Writeback.
-
-The first can be used independently to the others. The VM can try to
-either write dirty pages in order to clean them, or release clean
-pages in order to reuse them. To do this it can call the ->writepage
-method on dirty pages, and ->releasepage on clean pages with
-PagePrivate set. Clean pages without PagePrivate and with no external
-references will be released without notice being given to the
-address_space.
-
-To achieve this functionality, pages need to be placed on an LRU with
-lru_cache_add and mark_page_active needs to be called whenever the
-page is used.
-
-Pages are normally kept in a radix tree index by ->index. This tree
-maintains information about the PG_Dirty and PG_Writeback status of
-each page, so that pages with either of these flags can be found
-quickly.
-
-The Dirty tag is primarily used by mpage_writepages - the default
-->writepages method. It uses the tag to find dirty pages to call
-->writepage on. If mpage_writepages is not used (i.e. the address
-provides its own ->writepages) , the PAGECACHE_TAG_DIRTY tag is
-almost unused. write_inode_now and sync_inode do use it (through
-__sync_single_inode) to check if ->writepages has been successful in
-writing out the whole address_space.
-
-The Writeback tag is used by filemap*wait* and sync_page* functions,
-via wait_on_page_writeback_range, to wait for all writeback to
-complete. While waiting ->sync_page (if defined) will be called on
-each page that is found to require writeback.
-
-An address_space handler may attach extra information to a page,
-typically using the 'private' field in the 'struct page'. If such
-information is attached, the PG_Private flag should be set. This will
-cause various VM routines to make extra calls into the address_space
-handler to deal with that data.
-
-An address space acts as an intermediate between storage and
-application. Data is read into the address space a whole page at a
-time, and provided to the application either by copying of the page,
-or by memory-mapping the page.
-Data is written into the address space by the application, and then
-written-back to storage typically in whole pages, however the
-address_space has finer control of write sizes.
-
-The read process essentially only requires 'readpage'. The write
-process is more complicated and uses prepare_write/commit_write or
-set_page_dirty to write data into the address_space, and writepage,
-sync_page, and writepages to writeback data to storage.
-
-Adding and removing pages to/from an address_space is protected by the
-inode's i_mutex.
-
-When data is written to a page, the PG_Dirty flag should be set. It
-typically remains set until writepage asks for it to be written. This
-should clear PG_Dirty and set PG_Writeback. It can be actually
-written at any point after PG_Dirty is clear. Once it is known to be
-safe, PG_Writeback is cleared.
-
-Writeback makes use of a writeback_control structure...
+The address space object is used to identify pages in the page cache.
+
struct address_space_operations
-------------------------------
This describes how the VFS can manipulate mapping of a file to page cache in
-your filesystem. As of kernel 2.6.16, the following members are defined:
+your filesystem. As of kernel 2.6.13, the following members are defined:
struct address_space_operations {
int (*writepage)(struct page *page, struct writeback_control *wbc);
@@ -541,148 +469,47 @@ struct address_space_operations {
loff_t offset, unsigned long nr_segs);
struct page* (*get_xip_page)(struct address_space *, sector_t,
int);
- /* migrate the contents of a page to the specified target */
- int (*migratepage) (struct page *, struct page *);
};
- writepage: called by the VM to write a dirty page to backing store.
- This may happen for data integrity reasons (i.e. 'sync'), or
- to free up memory (flush). The difference can be seen in
- wbc->sync_mode.
- The PG_Dirty flag has been cleared and PageLocked is true.
- writepage should start writeout, should set PG_Writeback,
- and should make sure the page is unlocked, either synchronously
- or asynchronously when the write operation completes.
-
- If wbc->sync_mode is WB_SYNC_NONE, ->writepage doesn't have to
- try too hard if there are problems, and may choose to write out
- other pages from the mapping if that is easier (e.g. due to
- internal dependencies). If it chooses not to start writeout, it
- should return AOP_WRITEPAGE_ACTIVATE so that the VM will not keep
- calling ->writepage on that page.
-
- See the file "Locking" for more details.
+ writepage: called by the VM write a dirty page to backing store.
readpage: called by the VM to read a page from backing store.
- The page will be Locked when readpage is called, and should be
- unlocked and marked uptodate once the read completes.
- If ->readpage discovers that it needs to unlock the page for
- some reason, it can do so, and then return AOP_TRUNCATED_PAGE.
- In this case, the page will be relocated, relocked and if
- that all succeeds, ->readpage will be called again.
sync_page: called by the VM to notify the backing store to perform all
queued I/O operations for a page. I/O operations for other pages
associated with this address_space object may also be performed.
- This function is optional and is called only for pages with
- PG_Writeback set while waiting for the writeback to complete.
-
writepages: called by the VM to write out pages associated with the
- address_space object. If wbc->sync_mode is WBC_SYNC_ALL, then
- the writeback_control will specify a range of pages that must be
- written out. If it is WBC_SYNC_NONE, then a nr_to_write is given
- and that many pages should be written if possible.
- If no ->writepages is given, then mpage_writepages is used
- instead. This will choose pages from the address space that are
- tagged as DIRTY and will pass them to ->writepage.
+ address_space object.
set_page_dirty: called by the VM to set a page dirty.
- This is particularly needed if an address space attaches
- private data to a page, and that data needs to be updated when
- a page is dirtied. This is called, for example, when a memory
- mapped page gets modified.
- If defined, it should set the PageDirty flag, and the
- PAGECACHE_TAG_DIRTY tag in the radix tree.
readpages: called by the VM to read pages associated with the address_space
- object. This is essentially just a vector version of
- readpage. Instead of just one page, several pages are
- requested.
- readpages is only used for read-ahead, so read errors are
- ignored. If anything goes wrong, feel free to give up.
+ object.
prepare_write: called by the generic write path in VM to set up a write
- request for a page. This indicates to the address space that
- the given range of bytes is about to be written. The
- address_space should check that the write will be able to
- complete, by allocating space if necessary and doing any other
- internal housekeeping. If the write will update parts of
- any basic-blocks on storage, then those blocks should be
- pre-read (if they haven't been read already) so that the
- updated blocks can be written out properly.
- The page will be locked. If prepare_write wants to unlock the
- page it, like readpage, may do so and return
- AOP_TRUNCATED_PAGE.
- In this case the prepare_write will be retried one the lock is
- regained.
-
- commit_write: If prepare_write succeeds, new data will be copied
- into the page and then commit_write will be called. It will
- typically update the size of the file (if appropriate) and
- mark the inode as dirty, and do any other related housekeeping
- operations. It should avoid returning an error if possible -
- errors should have been handled by prepare_write.
+ request for a page.
+
+ commit_write: called by the generic write path in VM to write page to
+ its backing store.
bmap: called by the VFS to map a logical block offset within object to
- physical block number. This method is used by the FIBMAP
- ioctl and for working with swap-files. To be able to swap to
- a file, the file must have a stable mapping to a block
- device. The swap system does not go through the filesystem
- but instead uses bmap to find out where the blocks in the file
- are and uses those addresses directly.
-
-
- invalidatepage: If a page has PagePrivate set, then invalidatepage
- will be called when part or all of the page is to be removed
- from the address space. This generally corresponds to either a
- truncation or a complete invalidation of the address space
- (in the latter case 'offset' will always be 0).
- Any private data associated with the page should be updated
- to reflect this truncation. If offset is 0, then
- the private data should be released, because the page
- must be able to be completely discarded. This may be done by
- calling the ->releasepage function, but in this case the
- release MUST succeed.
-
- releasepage: releasepage is called on PagePrivate pages to indicate
- that the page should be freed if possible. ->releasepage
- should remove any private data from the page and clear the
- PagePrivate flag. It may also remove the page from the
- address_space. If this fails for some reason, it may indicate
- failure with a 0 return value.
- This is used in two distinct though related cases. The first
- is when the VM finds a clean page with no active users and
- wants to make it a free page. If ->releasepage succeeds, the
- page will be removed from the address_space and become free.
-
- The second case if when a request has been made to invalidate
- some or all pages in an address_space. This can happen
- through the fadvice(POSIX_FADV_DONTNEED) system call or by the
- filesystem explicitly requesting it as nfs and 9fs do (when
- they believe the cache may be out of date with storage) by
- calling invalidate_inode_pages2().
- If the filesystem makes such a call, and needs to be certain
- that all pages are invalidated, then its releasepage will
- need to ensure this. Possibly it can clear the PageUptodate
- bit if it cannot free private data yet.
-
- direct_IO: called by the generic read/write routines to perform
- direct_IO - that is IO requests which bypass the page cache
- and transfer data directly between the storage and the
- application's address space.
+ physical block number. This method is use by for the legacy FIBMAP
+ ioctl. Other uses are discouraged.
+
+ invalidatepage: called by the VM on truncate to disassociate a page from its
+ address_space mapping.
+
+ releasepage: called by the VFS to release filesystem specific metadata from
+ a page.
+
+ direct_IO: called by the VM for direct I/O writes and reads.
get_xip_page: called by the VM to translate a block number to a page.
The page is valid until the corresponding filesystem is unmounted.
Filesystems that want to use execute-in-place (XIP) need to implement
it. An example implementation can be found in fs/ext2/xip.c.
- migrate_page: This is used to compact the physical memory usage.
- If the VM wants to relocate a page (maybe off a memory card
- that is signalling imminent failure) it will pass a new page
- and an old page to this function. migrate_page should
- transfer any private data across and update any references
- that it has to the page.
The File Object
===============
diff --git a/trunk/Documentation/firmware_class/firmware_sample_driver.c b/trunk/Documentation/firmware_class/firmware_sample_driver.c
index ad3edaba4533..d3ad2c24490a 100644
--- a/trunk/Documentation/firmware_class/firmware_sample_driver.c
+++ b/trunk/Documentation/firmware_class/firmware_sample_driver.c
@@ -23,6 +23,7 @@ char __init inkernel_firmware[] = "let's say that this is firmware\n";
#endif
static struct device ghost_device = {
+ .name = "Ghost Device",
.bus_id = "ghost0",
};
@@ -91,7 +92,7 @@ static void sample_probe_async(void)
{
/* Let's say that I can't sleep */
int error;
- error = request_firmware_nowait (THIS_MODULE, FW_ACTION_NOHOTPLUG,
+ error = request_firmware_nowait (THIS_MODULE,
"sample_driver_fw", &ghost_device,
"my device pointer",
sample_probe_async_cont);
diff --git a/trunk/Documentation/firmware_class/firmware_sample_firmware_class.c b/trunk/Documentation/firmware_class/firmware_sample_firmware_class.c
index 9e1b0e4051cd..57b956aecbc5 100644
--- a/trunk/Documentation/firmware_class/firmware_sample_firmware_class.c
+++ b/trunk/Documentation/firmware_class/firmware_sample_firmware_class.c
@@ -172,6 +172,7 @@ static void fw_remove_class_device(struct class_device *class_dev)
static struct class_device *class_dev;
static struct device my_device = {
+ .name = "Sample Device",
.bus_id = "my_dev0",
};
diff --git a/trunk/Documentation/hwmon/w83627hf b/trunk/Documentation/hwmon/w83627hf
index 792231921241..bbeaba680443 100644
--- a/trunk/Documentation/hwmon/w83627hf
+++ b/trunk/Documentation/hwmon/w83627hf
@@ -18,10 +18,6 @@ Supported chips:
Prefix: 'w83637hf'
Addresses scanned: ISA address retrieved from Super I/O registers
Datasheet: http://www.winbond.com/PDF/sheet/w83637hf.pdf
- * Winbond W83687THF
- Prefix: 'w83687thf'
- Addresses scanned: ISA address retrieved from Super I/O registers
- Datasheet: Provided by Winbond on request
Authors:
Frodo Looijaard ,
diff --git a/trunk/Documentation/hwmon/w83781d b/trunk/Documentation/hwmon/w83781d
index b1e9f80098ee..e5459333ba68 100644
--- a/trunk/Documentation/hwmon/w83781d
+++ b/trunk/Documentation/hwmon/w83781d
@@ -36,11 +36,6 @@ Module parameters
Use 'init=0' to bypass initializing the chip.
Try this if your computer crashes when you load the module.
-* reset int
- (default 0)
- The driver used to reset the chip on load, but does no more. Use
- 'reset=1' to restore the old behavior. Report if you need to do this.
-
force_subclients=bus,caddr,saddr,saddr
This is used to force the i2c addresses for subclients of
a certain chip. Typical usage is `force_subclients=0,0x2d,0x4a,0x4b'
@@ -128,25 +123,6 @@ When an alarm goes off, you can be warned by a beeping signal through
your computer speaker. It is possible to enable all beeping globally,
or only the beeping for some alarms.
-Individual alarm and beep bits:
-
-0x000001: in0
-0x000002: in1
-0x000004: in2
-0x000008: in3
-0x000010: temp1
-0x000020: temp2 (+temp3 on W83781D)
-0x000040: fan1
-0x000080: fan2
-0x000100: in4
-0x000200: in5
-0x000400: in6
-0x000800: fan3
-0x001000: chassis
-0x002000: temp3 (W83782D and W83627HF only)
-0x010000: in7 (W83782D and W83627HF only)
-0x020000: in8 (W83782D and W83627HF only)
-
If an alarm triggers, it will remain triggered until the hardware register
is read at least once. This means that the cause for the alarm may
already have disappeared! Note that in the current implementation, all
diff --git a/trunk/Documentation/i2c/busses/i2c-piix4 b/trunk/Documentation/i2c/busses/i2c-piix4
index a1c8f581afed..856b4b8b962c 100644
--- a/trunk/Documentation/i2c/busses/i2c-piix4
+++ b/trunk/Documentation/i2c/busses/i2c-piix4
@@ -4,7 +4,7 @@ Supported adapters:
* Intel 82371AB PIIX4 and PIIX4E
* Intel 82443MX (440MX)
Datasheet: Publicly available at the Intel website
- * ServerWorks OSB4, CSB5, CSB6 and HT-1000 southbridges
+ * ServerWorks OSB4, CSB5 and CSB6 southbridges
Datasheet: Only available via NDA from ServerWorks
* Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge
Datasheet: Publicly available at the SMSC website http://www.smsc.com
diff --git a/trunk/Documentation/i2c/busses/scx200_acb b/trunk/Documentation/i2c/busses/scx200_acb
index f50e69981ec6..08c8cd1df60c 100644
--- a/trunk/Documentation/i2c/busses/scx200_acb
+++ b/trunk/Documentation/i2c/busses/scx200_acb
@@ -6,10 +6,9 @@ Module Parameters
-----------------
* base: int
- Base addresses for the ACCESS.bus controllers on SCx200 and SC1100 devices
+ Base addresses for the ACCESS.bus controllers
Description
-----------
-Enable the use of the ACCESS.bus controller on the Geode SCx200 and
-SC1100 processors and the CS5535 and CS5536 Geode companion devices.
+Enable the use of the ACCESS.bus controllers of a SCx200 processor.
diff --git a/trunk/Documentation/kbuild/makefiles.txt b/trunk/Documentation/kbuild/makefiles.txt
index a9c00facdf40..443230b43e09 100644
--- a/trunk/Documentation/kbuild/makefiles.txt
+++ b/trunk/Documentation/kbuild/makefiles.txt
@@ -17,7 +17,6 @@ This document describes the Linux kernel Makefiles.
--- 3.8 Command line dependency
--- 3.9 Dependency tracking
--- 3.10 Special Rules
- --- 3.11 $(CC) support functions
=== 4 Host Program support
--- 4.1 Simple Host Program
@@ -39,6 +38,7 @@ This document describes the Linux kernel Makefiles.
--- 6.6 Commands useful for building a boot image
--- 6.7 Custom kbuild commands
--- 6.8 Preprocessing linker scripts
+ --- 6.9 $(CC) support functions
=== 7 Kbuild Variables
=== 8 Makefile language
@@ -106,9 +106,9 @@ This document is aimed towards normal developers and arch developers.
Most Makefiles within the kernel are kbuild Makefiles that use the
kbuild infrastructure. This chapter introduce the syntax used in the
kbuild makefiles.
-The preferred name for the kbuild files are 'Makefile' but 'Kbuild' can
-be used and if both a 'Makefile' and a 'Kbuild' file exists then the 'Kbuild'
-file will be used.
+The preferred name for the kbuild files is 'Kbuild' but 'Makefile' will
+continue to be supported. All new developmen is expected to use the
+Kbuild filename.
Section 3.1 "Goal definitions" is a quick intro, further chapters provide
more details, with real examples.
@@ -385,102 +385,6 @@ more details, with real examples.
to prerequisites are referenced with $(src) (because they are not
generated files).
---- 3.11 $(CC) support functions
-
- The kernel may be build with several different versions of
- $(CC), each supporting a unique set of features and options.
- kbuild provide basic support to check for valid options for $(CC).
- $(CC) is useally the gcc compiler, but other alternatives are
- available.
-
- as-option
- as-option is used to check if $(CC) when used to compile
- assembler (*.S) files supports the given option. An optional
- second option may be specified if first option are not supported.
-
- Example:
- #arch/sh/Makefile
- cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),)
-
- In the above example cflags-y will be assinged the the option
- -Wa$(comma)-isa=$(isa-y) if it is supported by $(CC).
- The second argument is optional, and if supplied will be used
- if first argument is not supported.
-
- cc-option
- cc-option is used to check if $(CC) support a given option, and not
- supported to use an optional second option.
-
- Example:
- #arch/i386/Makefile
- cflags-y += $(call cc-option,-march=pentium-mmx,-march=i586)
-
- In the above example cflags-y will be assigned the option
- -march=pentium-mmx if supported by $(CC), otherwise -march-i586.
- The second argument to cc-option is optional, and if omitted
- cflags-y will be assigned no value if first option is not supported.
-
- cc-option-yn
- cc-option-yn is used to check if gcc supports a given option
- and return 'y' if supported, otherwise 'n'.
-
- Example:
- #arch/ppc/Makefile
- biarch := $(call cc-option-yn, -m32)
- aflags-$(biarch) += -a32
- cflags-$(biarch) += -m32
-
- In the above example $(biarch) is set to y if $(CC) supports the -m32
- option. When $(biarch) equals to y the expanded variables $(aflags-y)
- and $(cflags-y) will be assigned the values -a32 and -m32.
-
- cc-option-align
- gcc version >= 3.0 shifted type of options used to speify
- alignment of functions, loops etc. $(cc-option-align) whrn used
- as prefix to the align options will select the right prefix:
- gcc < 3.00
- cc-option-align = -malign
- gcc >= 3.00
- cc-option-align = -falign
-
- Example:
- CFLAGS += $(cc-option-align)-functions=4
-
- In the above example the option -falign-functions=4 is used for
- gcc >= 3.00. For gcc < 3.00 -malign-functions=4 is used.
-
- cc-version
- cc-version return a numerical version of the $(CC) compiler version.
- The format is where both are two digits. So for example
- gcc 3.41 would return 0341.
- cc-version is useful when a specific $(CC) version is faulty in one
- area, for example the -mregparm=3 were broken in some gcc version
- even though the option was accepted by gcc.
-
- Example:
- #arch/i386/Makefile
- cflags-y += $(shell \
- if [ $(call cc-version) -ge 0300 ] ; then \
- echo "-mregparm=3"; fi ;)
-
- In the above example -mregparm=3 is only used for gcc version greater
- than or equal to gcc 3.0.
-
- cc-ifversion
- cc-ifversion test the version of $(CC) and equals last argument if
- version expression is true.
-
- Example:
- #fs/reiserfs/Makefile
- EXTRA_CFLAGS := $(call cc-ifversion, -lt, 0402, -O1)
-
- In this example EXTRA_CFLAGS will be assigned the value -O1 if the
- $(CC) version is less than 4.2.
- cc-ifversion takes all the shell operators:
- -eq, -ne, -lt, -le, -gt, and -ge
- The third parameter may be a text as in this example, but it may also
- be an expanded variable or a macro.
-
=== 4 Host Program support
@@ -1069,6 +973,74 @@ When kbuild executes the following steps are followed (roughly):
architecture specific files.
+--- 6.9 $(CC) support functions
+
+ The kernel may be build with several different versions of
+ $(CC), each supporting a unique set of features and options.
+ kbuild provide basic support to check for valid options for $(CC).
+ $(CC) is useally the gcc compiler, but other alternatives are
+ available.
+
+ cc-option
+ cc-option is used to check if $(CC) support a given option, and not
+ supported to use an optional second option.
+
+ Example:
+ #arch/i386/Makefile
+ cflags-y += $(call cc-option,-march=pentium-mmx,-march=i586)
+
+ In the above example cflags-y will be assigned the option
+ -march=pentium-mmx if supported by $(CC), otherwise -march-i586.
+ The second argument to cc-option is optional, and if omitted
+ cflags-y will be assigned no value if first option is not supported.
+
+ cc-option-yn
+ cc-option-yn is used to check if gcc supports a given option
+ and return 'y' if supported, otherwise 'n'.
+
+ Example:
+ #arch/ppc/Makefile
+ biarch := $(call cc-option-yn, -m32)
+ aflags-$(biarch) += -a32
+ cflags-$(biarch) += -m32
+
+ In the above example $(biarch) is set to y if $(CC) supports the -m32
+ option. When $(biarch) equals to y the expanded variables $(aflags-y)
+ and $(cflags-y) will be assigned the values -a32 and -m32.
+
+ cc-option-align
+ gcc version >= 3.0 shifted type of options used to speify
+ alignment of functions, loops etc. $(cc-option-align) whrn used
+ as prefix to the align options will select the right prefix:
+ gcc < 3.00
+ cc-option-align = -malign
+ gcc >= 3.00
+ cc-option-align = -falign
+
+ Example:
+ CFLAGS += $(cc-option-align)-functions=4
+
+ In the above example the option -falign-functions=4 is used for
+ gcc >= 3.00. For gcc < 3.00 -malign-functions=4 is used.
+
+ cc-version
+ cc-version return a numerical version of the $(CC) compiler version.
+ The format is where both are two digits. So for example
+ gcc 3.41 would return 0341.
+ cc-version is useful when a specific $(CC) version is faulty in one
+ area, for example the -mregparm=3 were broken in some gcc version
+ even though the option was accepted by gcc.
+
+ Example:
+ #arch/i386/Makefile
+ cflags-y += $(shell \
+ if [ $(call cc-version) -ge 0300 ] ; then \
+ echo "-mregparm=3"; fi ;)
+
+ In the above example -mregparm=3 is only used for gcc version greater
+ than or equal to gcc 3.0.
+
+
=== 7 Kbuild Variables
The top Makefile exports the following variables:
diff --git a/trunk/Documentation/kbuild/modules.txt b/trunk/Documentation/kbuild/modules.txt
index fcccf2432f98..7e77f93634ea 100644
--- a/trunk/Documentation/kbuild/modules.txt
+++ b/trunk/Documentation/kbuild/modules.txt
@@ -13,7 +13,6 @@ In this document you will find information about:
--- 2.2 Available targets
--- 2.3 Available options
--- 2.4 Preparing the kernel tree for module build
- --- 2.5 Building separate files for a module
=== 3. Example commands
=== 4. Creating a kbuild file for an external module
=== 5. Include files
@@ -23,10 +22,7 @@ In this document you will find information about:
=== 6. Module installation
--- 6.1 INSTALL_MOD_PATH
--- 6.2 INSTALL_MOD_DIR
- === 7. Module versioning & Module.symvers
- --- 7.1 Symbols fron the kernel (vmlinux + modules)
- --- 7.2 Symbols and external modules
- --- 7.3 Symbols from another external module
+ === 7. Module versioning
=== 8. Tips & Tricks
--- 8.1 Testing for CONFIG_FOO_BAR
@@ -92,8 +88,7 @@ when building an external module.
make -C $KDIR M=$PWD modules_install
Install the external module(s).
Installation default is in /lib/modules//extra,
- but may be prefixed with INSTALL_MOD_PATH - see separate
- chapter.
+ but may be prefixed with INSTALL_MOD_PATH - see separate chapter.
make -C $KDIR M=$PWD clean
Remove all generated files for the module - the kernel
@@ -136,16 +131,6 @@ when building an external module.
Therefore a full kernel build needs to be executed to make
module versioning work.
---- 2.5 Building separate files for a module
- It is possible to build single files which is part of a module.
- This works equal for the kernel, a module and even for external
- modules.
- Examples (module foo.ko, consist of bar.o, baz.o):
- make -C $KDIR M=`pwd` bar.lst
- make -C $KDIR M=`pwd` bar.o
- make -C $KDIR M=`pwd` foo.ko
- make -C $KDIR M=`pwd` /
-
=== 3. Example commands
@@ -437,7 +422,7 @@ External modules are installed in the directory:
=> Install dir: /lib/modules/$(KERNELRELEASE)/gandalf
-=== 7. Module versioning & Module.symvers
+=== 7. Module versioning
Module versioning is enabled by the CONFIG_MODVERSIONS tag.
@@ -447,80 +432,11 @@ when a module is loaded/used then the CRC values contained in the kernel are
compared with similar values in the module. If they are not equal then the
kernel refuses to load the module.
-Module.symvers contains a list of all exported symbols from a kernel build.
-
---- 7.1 Symbols fron the kernel (vmlinux + modules)
-
- During a kernel build a file named Module.symvers will be generated.
- Module.symvers contains all exported symbols from the kernel and
- compiled modules. For each symbols the corresponding CRC value
- is stored too.
-
- The syntax of the Module.symvers file is:
-
- Sample:
- 0x2d036834 scsi_remove_host drivers/scsi/scsi_mod
+During a kernel build a file named Module.symvers will be generated. This
+file includes the symbol version of all symbols within the kernel. If the
+Module.symvers file is saved from the last full kernel compile one does not
+have to do a full kernel compile to build a module version's compatible module.
- For a kernel build without CONFIG_MODVERSIONING enabled the crc
- would read: 0x00000000
-
- Module.symvers serve two purposes.
- 1) It list all exported symbols both from vmlinux and all modules
- 2) It list CRC if CONFIG_MODVERSION is enabled
-
---- 7.2 Symbols and external modules
-
- When building an external module the build system needs access to
- the symbols from the kernel to check if all external symbols are
- defined. This is done in the MODPOST step and to obtain all
- symbols modpost reads Module.symvers from the kernel.
- If a Module.symvers file is present in the directory where
- the external module is being build this file will be read too.
- During the MODPOST step a new Module.symvers file will be written
- containing all exported symbols that was not defined in the kernel.
-
---- 7.3 Symbols from another external module
-
- Sometimes one external module uses exported symbols from another
- external module. Kbuild needs to have full knowledge on all symbols
- to avoid spitting out warnings about undefined symbols.
- Two solutions exist to let kbuild know all symbols of more than
- one external module.
- The method with a top-level kbuild file is recommended but may be
- impractical in certain situations.
-
- Use a top-level Kbuild file
- If you have two modules: 'foo', 'bar' and 'foo' needs symbols
- from 'bar' then one can use a common top-level kbuild file so
- both modules are compiled in same build.
-
- Consider following directory layout:
- ./foo/ <= contains the foo module
- ./bar/ <= contains the bar module
- The top-level Kbuild file would then look like:
-
- #./Kbuild: (this file may also be named Makefile)
- obj-y := foo/ bar/
-
- Executing:
- make -C $KDIR M=`pwd`
-
- will then do the expected and compile both modules with full
- knowledge on symbols from both modules.
-
- Use an extra Module.symvers file
- When an external module is build a Module.symvers file is
- generated containing all exported symbols which are not
- defined in the kernel.
- To get access to symbols from module 'bar' one can copy the
- Module.symvers file from the compilation of the 'bar' module
- to the directory where the 'foo' module is build.
- During the module build kbuild will read the Module.symvers
- file in the directory of the external module and when the
- build is finished a new Module.symvers file is created
- containing the sum of all symbols defined and not part of the
- kernel.
-
=== 8. Tips & Tricks
--- 8.1 Testing for CONFIG_FOO_BAR
diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt
index f8cb55c30b0f..fc99075e0af4 100644
--- a/trunk/Documentation/kernel-parameters.txt
+++ b/trunk/Documentation/kernel-parameters.txt
@@ -49,7 +49,6 @@ restrictions referred to are that the relevant option is valid if:
MCA MCA bus support is enabled.
MDA MDA console support is enabled.
MOUSE Appropriate mouse support is enabled.
- MSI Message Signaled Interrupts (PCI).
MTD MTD support is enabled.
NET Appropriate network support is enabled.
NUMA NUMA support is enabled.
@@ -367,17 +366,12 @@ running once the system is up.
tty Use the virtual console device .
ttyS[,options]
- ttyUSB0[,options]
Use the specified serial port. The options are of
- the form "bbbbpnf", where "bbbb" is the baud rate,
- "p" is parity ("n", "o", or "e"), "n" is number of
- bits, and "f" is flow control ("r" for RTS or
- omit it). Default is "9600n8".
+ the form "bbbbpn", where "bbbb" is the baud rate,
+ "p" is parity ("n", "o", or "e"), and "n" is bits.
+ Default is "9600n8".
- See Documentation/serial-console.txt for more
- information. See
- Documentation/networking/netconsole.txt for an
- alternative.
+ See also Documentation/serial-console.txt.
uart,io,[,options]
uart,mmio,[,options]
@@ -1014,9 +1008,7 @@ running once the system is up.
noexec=on: enable non-executable mappings (default)
noexec=off: disable nn-executable mappings
- nofxsr [BUGS=IA-32] Disables x86 floating point extended
- register save and restore. The kernel will only save
- legacy floating-point registers on task switch.
+ nofxsr [BUGS=IA-32]
nohlt [BUGS=ARM]
@@ -1061,8 +1053,6 @@ running once the system is up.
nosbagart [IA-64]
- nosep [BUGS=IA-32] Disables x86 SYSENTER/SYSEXIT support.
-
nosmp [SMP] Tells an SMP kernel to act as a UP kernel.
nosync [HW,M68K] Disables sync negotiation for all devices.
@@ -1132,11 +1122,6 @@ running once the system is up.
pas16= [HW,SCSI]
See header of drivers/scsi/pas16.c.
- pause_on_oops=
- Halt all CPUs after the first oops has been printed for
- the specified number of seconds. This is to be used if
- your oopses keep scrolling off the screen.
-
pcbit= [HW,ISDN]
pcd. [PARIDE]
@@ -1158,9 +1143,6 @@ running once the system is up.
Mechanism 2.
nommconf [IA-32,X86_64] Disable use of MMCONFIG for PCI
Configuration
- nomsi [MSI] If the PCI_MSI kernel config parameter is
- enabled, this kernel boot option can be used to
- disable the use of MSI interrupts system-wide.
nosort [IA-32] Don't sort PCI devices according to
order given by the PCI BIOS. This sorting is
done to get a device order compatible with
diff --git a/trunk/Documentation/networking/packet_mmap.txt b/trunk/Documentation/networking/packet_mmap.txt
index 4fc8e9874320..8d4cf78258e4 100644
--- a/trunk/Documentation/networking/packet_mmap.txt
+++ b/trunk/Documentation/networking/packet_mmap.txt
@@ -40,7 +40,7 @@ network interface card supports some sort of interrupt load mitigation or
+ How to use CONFIG_PACKET_MMAP
--------------------------------------------------------------------------------
-From the user standpoint, you should use the higher level libpcap library, which
+From the user standpoint, you should use the higher level libpcap library, wich
is a de facto standard, portable across nearly all operating systems
including Win32.
@@ -217,8 +217,8 @@ called pg_vec, its size limits the number of blocks that can be allocated.
kmalloc allocates any number of bytes of phisically contiguous memory from
a pool of pre-determined sizes. This pool of memory is mantained by the slab
-allocator which is at the end the responsible for doing the allocation and
-hence which imposes the maximum memory that kmalloc can allocate.
+allocator wich is at the end the responsible for doing the allocation and
+hence wich imposes the maximum memory that kmalloc can allocate.
In a 2.4/2.6 kernel and the i386 architecture, the limit is 131072 bytes. The
predetermined sizes that kmalloc uses can be checked in the "size-"
@@ -254,7 +254,7 @@ and, the number of frames be
* /
-Suposse the following parameters, which apply for 2.6 kernel and an
+Suposse the following parameters, wich apply for 2.6 kernel and an
i386 architecture:
= 131072 bytes
@@ -360,7 +360,7 @@ TP_STATUS_LOSING : indicates there were packet drops from last time
statistics where checked with getsockopt() and
the PACKET_STATISTICS option.
-TP_STATUS_CSUMNOTREADY: currently it's used for outgoing IP packets which
+TP_STATUS_CSUMNOTREADY: currently it's used for outgoing IP packets wich
it's checksum will be done in hardware. So while
reading the packet we should not try to check the
checksum.
diff --git a/trunk/Documentation/networking/pktgen.txt b/trunk/Documentation/networking/pktgen.txt
index 278771c9ad99..cc4b4d04129c 100644
--- a/trunk/Documentation/networking/pktgen.txt
+++ b/trunk/Documentation/networking/pktgen.txt
@@ -109,22 +109,6 @@ Examples:
cycle through the port range.
pgset "udp_dst_max 9" set UDP destination port max.
- pgset "mpls 0001000a,0002000a,0000000a" set MPLS labels (in this example
- outer label=16,middle label=32,
- inner label=0 (IPv4 NULL)) Note that
- there must be no spaces between the
- arguments. Leading zeros are required.
- Do not set the bottom of stack bit,
- thats done automatically. If you do
- set the bottom of stack bit, that
- indicates that you want to randomly
- generate that address and the flag
- MPLS_RND will be turned on. You
- can have any mix of random and fixed
- labels in the label stack.
-
- pgset "mpls 0" turn off mpls (or any invalid argument works too!)
-
pgset stop aborts injection. Also, ^C aborts generator.
@@ -183,8 +167,6 @@ pkt_size
min_pkt_size
max_pkt_size
-mpls
-
udp_src_min
udp_src_max
@@ -229,4 +211,4 @@ Grant Grundler for testing on IA-64 and parisc, Harald Welte, Lennert Buytenhek
Stephen Hemminger, Andi Kleen, Dave Miller and many others.
-Good luck with the linux net-development.
+Good luck with the linux net-development.
\ No newline at end of file
diff --git a/trunk/Documentation/networking/ray_cs.txt b/trunk/Documentation/networking/ray_cs.txt
index 145d27a52395..5427f8c7df95 100644
--- a/trunk/Documentation/networking/ray_cs.txt
+++ b/trunk/Documentation/networking/ray_cs.txt
@@ -25,7 +25,7 @@ the essid= string parameter is available via the kernel command line.
This will change after the method of sorting out parameters for all
the PCMCIA drivers is agreed upon. If you must have a built in driver
with nondefault parameters, they can be edited in
-/usr/src/linux/drivers/net/pcmcia/ray_cs.c. Searching for module_param
+/usr/src/linux/drivers/net/pcmcia/ray_cs.c. Searching for MODULE_PARM
will find them all.
Information on card services is available at:
diff --git a/trunk/Documentation/nfsroot.txt b/trunk/Documentation/nfsroot.txt
index d56dc71d9430..a87d4af216c0 100644
--- a/trunk/Documentation/nfsroot.txt
+++ b/trunk/Documentation/nfsroot.txt
@@ -3,7 +3,6 @@ Mounting the root filesystem via NFS (nfsroot)
Written 1996 by Gero Kuhlmann
Updated 1997 by Martin Mares
-Updated 2006 by Nico Schottelius
@@ -169,6 +168,7 @@ depend on what facilities are available:
root. If it got a BOOTP answer the directory name in that answer
is used.
+
3.2) Using LILO
When using LILO you can specify all necessary command line
parameters with the 'append=' command in the LILO configuration
@@ -177,11 +177,7 @@ depend on what facilities are available:
LILO and its 'append=' command please refer to the LILO
documentation.
-3.3) Using GRUB
- When you use GRUB, you simply append the parameters after the kernel
- specification: "kernel " (without the quotes).
-
-3.4) Using loadlin
+3.3) Using loadlin
When you want to boot Linux from a DOS command prompt without
having a local hard disk to mount as root, you can use loadlin.
I was told that it works, but haven't used it myself yet. In
@@ -189,7 +185,7 @@ depend on what facilities are available:
lar to how LILO is doing it. Please refer to the loadlin docu-
mentation for further information.
-3.5) Using a boot ROM
+3.4) Using a boot ROM
This is probably the most elegant way of booting a diskless
client. With a boot ROM the kernel gets loaded using the TFTP
protocol. As far as I know, no commercial boot ROMs yet
@@ -198,13 +194,6 @@ depend on what facilities are available:
and its mirrors. They are called 'netboot-nfs' and 'etherboot'.
Both contain everything you need to boot a diskless Linux client.
-3.6) Using pxelinux
- Using pxelinux you specify the kernel you built with
- "kernel ". The nfsroot parameters
- are passed to the kernel by adding them to the "append" line.
- You may perhaps also want to fine tune the console output,
- see Documentation/serial-console.txt for serial console help.
-
diff --git a/trunk/Documentation/power/swsusp.txt b/trunk/Documentation/power/swsusp.txt
index d7814a113ee1..b28b7f04abb8 100644
--- a/trunk/Documentation/power/swsusp.txt
+++ b/trunk/Documentation/power/swsusp.txt
@@ -17,11 +17,6 @@ Some warnings, first.
* but it will probably only crash.
*
* (*) suspend/resume support is needed to make it safe.
- *
- * If you have any filesystems on USB devices mounted before suspend,
- * they won't be accessible after resume and you may lose data, as though
- * you have unplugged the USB devices with mounted filesystems on them
- * (see the FAQ below for details).
You need to append resume=/dev/your_swap_partition to kernel command
line. Then you suspend by
@@ -32,18 +27,19 @@ echo shutdown > /sys/power/disk; echo disk > /sys/power/state
echo platform > /sys/power/disk; echo disk > /sys/power/state
-. If you have SATA disks, you'll need recent kernels with SATA suspend
-support. For suspend and resume to work, make sure your disk drivers
-are built into kernel -- not modules. [There's way to make
-suspend/resume with modular disk drivers, see FAQ, but you probably
-should not do that.]
-
If you want to limit the suspend image size to N bytes, do
echo N > /sys/power/image_size
before suspend (it is limited to 500 MB by default).
+Encrypted suspend image:
+------------------------
+If you want to store your suspend image encrypted with a temporary
+key to prevent data gathering after resume you must compile
+crypto and the aes algorithm into the kernel - modules won't work
+as they cannot be loaded at resume time.
+
Article about goals and implementation of Software Suspend for Linux
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -337,37 +333,4 @@ init=/bin/bash, then swapon and starting suspend sequence manually
usually does the trick. Then it is good idea to try with latest
vanilla kernel.
-Q: How can distributions ship a swsusp-supporting kernel with modular
-disk drivers (especially SATA)?
-
-A: Well, it can be done, load the drivers, then do echo into
-/sys/power/disk/resume file from initrd. Be sure not to mount
-anything, not even read-only mount, or you are going to lose your
-data.
-
-Q: How do I make suspend more verbose?
-
-A: If you want to see any non-error kernel messages on the virtual
-terminal the kernel switches to during suspend, you have to set the
-kernel console loglevel to at least 5, for example by doing
-
- echo 5 > /proc/sys/kernel/printk
-
-Q: Is this true that if I have a mounted filesystem on a USB device and
-I suspend to disk, I can lose data unless the filesystem has been mounted
-with "sync"?
-
-A: That's right. It depends on your hardware, and it could be true even for
-suspend-to-RAM. In fact, even with "-o sync" you can lose data if your
-programs have information in buffers they haven't written out to disk.
-
-If you're lucky, your hardware will support low-power modes for USB
-controllers while the system is asleep. Lots of hardware doesn't,
-however. Shutting off the power to a USB controller is equivalent to
-unplugging all the attached devices.
-
-Remember that it's always a bad idea to unplug a disk drive containing a
-mounted filesystem. With USB that's true even when your system is asleep!
-The safest thing is to unmount all USB-based filesystems before suspending
-and remount them after resuming.
diff --git a/trunk/Documentation/power/userland-swsusp.txt b/trunk/Documentation/power/userland-swsusp.txt
deleted file mode 100644
index 94058220aaf0..000000000000
--- a/trunk/Documentation/power/userland-swsusp.txt
+++ /dev/null
@@ -1,149 +0,0 @@
-Documentation for userland software suspend interface
- (C) 2006 Rafael J. Wysocki
-
-First, the warnings at the beginning of swsusp.txt still apply.
-
-Second, you should read the FAQ in swsusp.txt _now_ if you have not
-done it already.
-
-Now, to use the userland interface for software suspend you need special
-utilities that will read/write the system memory snapshot from/to the
-kernel. Such utilities are available, for example, from
-. You may want to have
-a look at them if you are going to develop your own suspend/resume
-utilities.
-
-The interface consists of a character device providing the open(),
-release(), read(), and write() operations as well as several ioctl()
-commands defined in kernel/power/power.h. The major and minor
-numbers of the device are, respectively, 10 and 231, and they can
-be read from /sys/class/misc/snapshot/dev.
-
-The device can be open either for reading or for writing. If open for
-reading, it is considered to be in the suspend mode. Otherwise it is
-assumed to be in the resume mode. The device cannot be open for reading
-and writing. It is also impossible to have the device open more than once
-at a time.
-
-The ioctl() commands recognized by the device are:
-
-SNAPSHOT_FREEZE - freeze user space processes (the current process is
- not frozen); this is required for SNAPSHOT_ATOMIC_SNAPSHOT
- and SNAPSHOT_ATOMIC_RESTORE to succeed
-
-SNAPSHOT_UNFREEZE - thaw user space processes frozen by SNAPSHOT_FREEZE
-
-SNAPSHOT_ATOMIC_SNAPSHOT - create a snapshot of the system memory; the
- last argument of ioctl() should be a pointer to an int variable,
- the value of which will indicate whether the call returned after
- creating the snapshot (1) or after restoring the system memory state
- from it (0) (after resume the system finds itself finishing the
- SNAPSHOT_ATOMIC_SNAPSHOT ioctl() again); after the snapshot
- has been created the read() operation can be used to transfer
- it out of the kernel
-
-SNAPSHOT_ATOMIC_RESTORE - restore the system memory state from the
- uploaded snapshot image; before calling it you should transfer
- the system memory snapshot back to the kernel using the write()
- operation; this call will not succeed if the snapshot
- image is not available to the kernel
-
-SNAPSHOT_FREE - free memory allocated for the snapshot image
-
-SNAPSHOT_SET_IMAGE_SIZE - set the preferred maximum size of the image
- (the kernel will do its best to ensure the image size will not exceed
- this number, but if it turns out to be impossible, the kernel will
- create the smallest image possible)
-
-SNAPSHOT_AVAIL_SWAP - return the amount of available swap in bytes (the last
- argument should be a pointer to an unsigned int variable that will
- contain the result if the call is successful).
-
-SNAPSHOT_GET_SWAP_PAGE - allocate a swap page from the resume partition
- (the last argument should be a pointer to a loff_t variable that
- will contain the swap page offset if the call is successful)
-
-SNAPSHOT_FREE_SWAP_PAGES - free all swap pages allocated with
- SNAPSHOT_GET_SWAP_PAGE
-
-SNAPSHOT_SET_SWAP_FILE - set the resume partition (the last ioctl() argument
- should specify the device's major and minor numbers in the old
- two-byte format, as returned by the stat() function in the .st_rdev
- member of the stat structure); it is recommended to always use this
- call, because the code to set the resume partition could be removed from
- future kernels
-
-The device's read() operation can be used to transfer the snapshot image from
-the kernel. It has the following limitations:
-- you cannot read() more than one virtual memory page at a time
-- read()s accross page boundaries are impossible (ie. if ypu read() 1/2 of
- a page in the previous call, you will only be able to read()
- _at_ _most_ 1/2 of the page in the next call)
-
-The device's write() operation is used for uploading the system memory snapshot
-into the kernel. It has the same limitations as the read() operation.
-
-The release() operation frees all memory allocated for the snapshot image
-and all swap pages allocated with SNAPSHOT_GET_SWAP_PAGE (if any).
-Thus it is not necessary to use either SNAPSHOT_FREE or
-SNAPSHOT_FREE_SWAP_PAGES before closing the device (in fact it will also
-unfreeze user space processes frozen by SNAPSHOT_UNFREEZE if they are
-still frozen when the device is being closed).
-
-Currently it is assumed that the userland utilities reading/writing the
-snapshot image from/to the kernel will use a swap parition, called the resume
-partition, as storage space. However, this is not really required, as they
-can use, for example, a special (blank) suspend partition or a file on a partition
-that is unmounted before SNAPSHOT_ATOMIC_SNAPSHOT and mounted afterwards.
-
-These utilities SHOULD NOT make any assumptions regarding the ordering of
-data within the snapshot image, except for the image header that MAY be
-assumed to start with an swsusp_info structure, as specified in
-kernel/power/power.h. This structure MAY be used by the userland utilities
-to obtain some information about the snapshot image, such as the size
-of the snapshot image, including the metadata and the header itself,
-contained in the .size member of swsusp_info.
-
-The snapshot image MUST be written to the kernel unaltered (ie. all of the image
-data, metadata and header MUST be written in _exactly_ the same amount, form
-and order in which they have been read). Otherwise, the behavior of the
-resumed system may be totally unpredictable.
-
-While executing SNAPSHOT_ATOMIC_RESTORE the kernel checks if the
-structure of the snapshot image is consistent with the information stored
-in the image header. If any inconsistencies are detected,
-SNAPSHOT_ATOMIC_RESTORE will not succeed. Still, this is not a fool-proof
-mechanism and the userland utilities using the interface SHOULD use additional
-means, such as checksums, to ensure the integrity of the snapshot image.
-
-The suspending and resuming utilities MUST lock themselves in memory,
-preferrably using mlockall(), before calling SNAPSHOT_FREEZE.
-
-The suspending utility MUST check the value stored by SNAPSHOT_ATOMIC_SNAPSHOT
-in the memory location pointed to by the last argument of ioctl() and proceed
-in accordance with it:
-1. If the value is 1 (ie. the system memory snapshot has just been
- created and the system is ready for saving it):
- (a) The suspending utility MUST NOT close the snapshot device
- _unless_ the whole suspend procedure is to be cancelled, in
- which case, if the snapshot image has already been saved, the
- suspending utility SHOULD destroy it, preferrably by zapping
- its header. If the suspend is not to be cancelled, the
- system MUST be powered off or rebooted after the snapshot
- image has been saved.
- (b) The suspending utility SHOULD NOT attempt to perform any
- file system operations (including reads) on the file systems
- that were mounted before SNAPSHOT_ATOMIC_SNAPSHOT has been
- called. However, it MAY mount a file system that was not
- mounted at that time and perform some operations on it (eg.
- use it for saving the image).
-2. If the value is 0 (ie. the system state has just been restored from
- the snapshot image), the suspending utility MUST close the snapshot
- device. Afterwards it will be treated as a regular userland process,
- so it need not exit.
-
-The resuming utility SHOULD NOT attempt to mount any file systems that could
-be mounted before suspend and SHOULD NOT attempt to perform any operations
-involving such file systems.
-
-For details, please refer to the source code.
diff --git a/trunk/Documentation/power/video.txt b/trunk/Documentation/power/video.txt
index d18a57d1a531..912bed87c758 100644
--- a/trunk/Documentation/power/video.txt
+++ b/trunk/Documentation/power/video.txt
@@ -1,7 +1,7 @@
Video issues with S3 resume
~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 2003-2006, Pavel Machek
+ 2003-2005, Pavel Machek
During S3 resume, hardware needs to be reinitialized. For most
devices, this is easy, and kernel driver knows how to do
@@ -15,27 +15,6 @@ run normally so video card is normally initialized. It should not be
problem for S1 standby, because hardware should retain its state over
that.
-We either have to run video BIOS during early resume, or interpret it
-using vbetool later, or maybe nothing is neccessary on particular
-system because video state is preserved. Unfortunately different
-methods work on different systems, and no known method suits all of
-them.
-
-Userland application called s2ram has been developed; it contains long
-whitelist of systems, and automatically selects working method for a
-given system. It can be downloaded from CVS at
-www.sf.net/projects/suspend . If you get a system that is not in the
-whitelist, please try to find a working solution, and submit whitelist
-entry so that work does not need to be repeated.
-
-Currently, VBE_SAVE method (6 below) works on most
-systems. Unfortunately, vbetool only runs after userland is resumed,
-so it makes debugging of early resume problems
-hard/impossible. Methods that do not rely on userland are preferable.
-
-Details
-~~~~~~~
-
There are a few types of systems where video works after S3 resume:
(1) systems where video state is preserved over S3.
@@ -125,7 +104,6 @@ HP NX7000 ??? (*)
HP Pavilion ZD7000 vbetool post needed, need open-source nv driver for X
HP Omnibook XE3 athlon version none (1)
HP Omnibook XE3GC none (1), video is S3 Savage/IX-MV
-HP Omnibook 5150 none (1), (S1 also works OK)
IBM TP T20, model 2647-44G none (1), video is S3 Inc. 86C270-294 Savage/IX-MV, vesafb gets "interesting" but X work.
IBM TP A31 / Type 2652-M5G s3_mode (3) [works ok with BIOS 1.04 2002-08-23, but not at all with BIOS 1.11 2004-11-05 :-(]
IBM TP R32 / Type 2658-MMG none (1)
@@ -142,24 +120,18 @@ IBM ThinkPad T42p (2373-GTG) s3_bios (2)
IBM TP X20 ??? (*)
IBM TP X30 s3_bios (2)
IBM TP X31 / Type 2672-XXH none (1), use radeontool (http://fdd.com/software/radeon/) to turn off backlight.
-IBM TP X32 none (1), but backlight is on and video is trashed after long suspend. s3_bios,s3_mode (4) works too. Perhaps that gets better results?
+IBM TP X32 none (1), but backlight is on and video is trashed after long suspend
IBM Thinkpad X40 Type 2371-7JG s3_bios,s3_mode (4)
-IBM TP 600e none(1), but a switch to console and back to X is needed
Medion MD4220 ??? (*)
Samsung P35 vbetool needed (6)
-Sharp PC-AR10 (ATI rage) none (1), backlight does not switch off
+Sharp PC-AR10 (ATI rage) none (1)
Sony Vaio PCG-C1VRX/K s3_bios (2)
Sony Vaio PCG-F403 ??? (*)
-Sony Vaio PCG-GRT995MP none (1), works with 'nv' X driver
-Sony Vaio PCG-GR7/K none (1), but needs radeonfb, use radeontool (http://fdd.com/software/radeon/) to turn off backlight.
Sony Vaio PCG-N505SN ??? (*)
Sony Vaio vgn-s260 X or boot-radeon can init it (5)
-Sony Vaio vgn-S580BH vga=normal, but suspend from X. Console will be blank unless you return to X.
-Sony Vaio vgn-FS115B s3_bios (2),s3_mode (4)
Toshiba Libretto L5 none (1)
-Toshiba Portege 3020CT s3_mode (3)
-Toshiba Satellite 4030CDT s3_mode (3) (S1 also works OK)
-Toshiba Satellite 4080XCDT s3_mode (3) (S1 also works OK)
+Toshiba Satellite 4030CDT s3_mode (3)
+Toshiba Satellite 4080XCDT s3_mode (3)
Toshiba Satellite 4090XCDT ??? (*)
Toshiba Satellite P10-554 s3_bios,s3_mode (4)(****)
Toshiba M30 (2) xor X with nvidia driver using internal AGP
@@ -179,3 +151,39 @@ Asus A7V8X nVidia RIVA TNT2 model 64 s3_bios,s3_mode (4)
(***) To be tested with a newer kernel.
(****) Not with SMP kernel, UP only.
+
+VBEtool details
+~~~~~~~~~~~~~~~
+(with thanks to Carl-Daniel Hailfinger)
+
+First, boot into X and run the following script ONCE:
+#!/bin/bash
+statedir=/root/s3/state
+mkdir -p $statedir
+chvt 2
+sleep 1
+vbetool vbestate save >$statedir/vbe
+
+
+To suspend and resume properly, call the following script as root:
+#!/bin/bash
+statedir=/root/s3/state
+curcons=`fgconsole`
+fuser /dev/tty$curcons 2>/dev/null|xargs ps -o comm= -p|grep -q X && chvt 2
+cat /dev/vcsa >$statedir/vcsa
+sync
+echo 3 >/proc/acpi/sleep
+sync
+vbetool post
+vbetool vbestate restore <$statedir/vbe
+cat $statedir/vcsa >/dev/vcsa
+rckbd restart
+chvt $[curcons%6+1]
+chvt $curcons
+
+
+Unless you change your graphics card or other hardware configuration,
+the state once saved will be OK for every resume afterwards.
+NOTE: The "rckbd restart" command may be different for your
+distribution. Simply replace it with the command you would use to
+set the fonts on screen.
diff --git a/trunk/Documentation/s390/driver-model.txt b/trunk/Documentation/s390/driver-model.txt
index efb674eda4d4..df09758bf3fe 100644
--- a/trunk/Documentation/s390/driver-model.txt
+++ b/trunk/Documentation/s390/driver-model.txt
@@ -16,12 +16,10 @@ devices/
- 0.0.0000/0.0.0815/
- 0.0.0001/0.0.4711/
- 0.0.0002/
- - 0.1.0000/0.1.1234/
...
-In this example, device 0815 is accessed via subchannel 0 in subchannel set 0,
-device 4711 via subchannel 1 in subchannel set 0, and subchannel 2 is a non-I/O
-subchannel. Device 1234 is accessed via subchannel 0 in subchannel set 1.
+In this example, device 0815 is accessed via subchannel 0, device 4711 via
+subchannel 1, and subchannel 2 is a non-I/O subchannel.
You should address a ccw device via its bus id (e.g. 0.0.4711); the device can
be found under bus/ccw/devices/.
@@ -99,7 +97,7 @@ is not available to the device driver.
Each driver should declare in a MODULE_DEVICE_TABLE into which CU types/models
and/or device types/models it is interested. This information can later be found
-in the struct ccw_device_id fields:
+found in the struct ccw_device_id fields:
struct ccw_device_id {
__u16 match_flags;
@@ -210,11 +208,6 @@ Each ccwgroup device also provides an 'ungroup' attribute to destroy the device
again (only when offline). This is a generic ccwgroup mechanism (the driver does
not need to implement anything beyond normal removal routines).
-A ccw device which is a member of a ccwgroup device carries a pointer to the
-ccwgroup device in the driver_data of its device struct. This field must not be
-touched by the driver - it should use the ccwgroup device's driver_data for its
-private data.
-
To implement a ccwgroup driver, please refer to include/asm/ccwgroup.h. Keep in
mind that most drivers will need to implement both a ccwgroup and a ccw driver
(unless you have a meta ccw driver, like cu3088 for lcs and ctc).
@@ -237,8 +230,6 @@ status - Can be 'online' or 'offline'.
a channel path the user knows to be online, but the machine hasn't
created a machine check for.
-type - The physical type of the channel path.
-
3. System devices
-----------------
diff --git a/trunk/Documentation/serial-console.txt b/trunk/Documentation/serial-console.txt
index 9a7bc8b3f479..6c689b0df2b8 100644
--- a/trunk/Documentation/serial-console.txt
+++ b/trunk/Documentation/serial-console.txt
@@ -17,13 +17,11 @@ The format of this option is:
ttyX for any other virtual console
ttySx for a serial port
lp0 for the first parallel port
- ttyUSB0 for the first USB serial device
options: depend on the driver. For the serial port this
- defines the baudrate/parity/bits/flow control of
- the port, in the format BBBBPNF, where BBBB is the
- speed, P is parity (n/o/e), N is number of bits,
- and F is flow control ('r' for RTS). Default is
+ defines the baudrate/parity/bits of the port,
+ in the format BBBBPN, where BBBB is the speed,
+ P is parity (n/o/e), and N is bits. Default is
9600n8. The maximum baudrate is 115200.
You can specify multiple console= options on the kernel command line.
@@ -47,9 +45,6 @@ become the console.
You will need to create a new device to use /dev/console. The official
/dev/console is now character device 5,1.
-(You can also use a network device as a console. See
-Documentation/networking/netconsole.txt for information on that.)
-
Here's an example that will use /dev/ttyS1 (COM2) as the console.
Replace the sample values as needed.
diff --git a/trunk/Documentation/smart-config.txt b/trunk/Documentation/smart-config.txt
index 8467447b5a87..c9bed4cf8773 100644
--- a/trunk/Documentation/smart-config.txt
+++ b/trunk/Documentation/smart-config.txt
@@ -56,6 +56,10 @@ Here is the solution:
writing one file per option. It updates only the files for options
that have changed.
+ mkdep.c no longer generates warning messages for missing or unneeded
+ lines. The new top-level target 'make checkconfig'
+ checks for these problems.
+
Flag Dependencies
Martin Von Loewis contributed another feature to this patch:
diff --git a/trunk/Documentation/sound/oss/Introduction b/trunk/Documentation/sound/oss/Introduction
index f04ba6bb7395..15d4fb975ac0 100644
--- a/trunk/Documentation/sound/oss/Introduction
+++ b/trunk/Documentation/sound/oss/Introduction
@@ -69,7 +69,7 @@ are available, for example IRQ, address, DMA.
Warning, the options for different cards sometime use different names
for the same or a similar feature (dma1= versus dma16=). As a last
-resort, inspect the code (search for module_param).
+resort, inspect the code (search for MODULE_PARM).
Notes:
diff --git a/trunk/Documentation/sound/oss/cs46xx b/trunk/Documentation/sound/oss/cs46xx
index b54432709863..88d6cf8b39f3 100644
--- a/trunk/Documentation/sound/oss/cs46xx
+++ b/trunk/Documentation/sound/oss/cs46xx
@@ -88,7 +88,7 @@ parameters. for a copy email: twoller@crystal.cirrus.com
MODULE_PARMS definitions
------------------------
-module_param(defaultorder, ulong, 0);
+MODULE_PARM(defaultorder, "i");
defaultorder=N
where N is a value from 1 to 12
The buffer order determines the size of the dma buffer for the driver.
@@ -98,18 +98,18 @@ to not underrun the dma buffer as easily. As default, use 32k (order=3)
rather than 64k as some of the games work more responsively.
(2^N) * PAGE_SIZE = allocated buffer size
-module_param(cs_debuglevel, ulong, 0644);
-module_param(cs_debugmask, ulong, 0644);
+MODULE_PARM(cs_debuglevel, "i");
+MODULE_PARM(cs_debugmask, "i");
cs_debuglevel=N
cs_debugmask=0xMMMMMMMM
where N is a value from 0 (no debug printfs), to 9 (maximum)
0xMMMMMMMM is a debug mask corresponding to the CS_xxx bits (see driver source).
-module_param(hercules_egpio_disable, ulong, 0);
+MODULE_PARM(hercules_egpio_disable, "i");
hercules_egpio_disable=N
where N is a 0 (enable egpio), or a 1 (disable egpio support)
-module_param(initdelay, ulong, 0);
+MODULE_PARM(initdelay, "i");
initdelay=N
This value is used to determine the millescond delay during the initialization
code prior to powering up the PLL. On laptops this value can be used to
@@ -118,19 +118,19 @@ system is booted under battery power then the mdelay()/udelay() functions fail t
properly delay the required time. Also, if the system is booted under AC power
and then the power removed, the mdelay()/udelay() functions will not delay properly.
-module_param(powerdown, ulong, 0);
+MODULE_PARM(powerdown, "i");
powerdown=N
where N is 0 (disable any powerdown of the internal blocks) or 1 (enable powerdown)
-module_param(external_amp, bool, 0);
+MODULE_PARM(external_amp, "i");
external_amp=1
if N is set to 1, then force enabling the EAPD support in the primary AC97 codec.
override the detection logic and force the external amp bit in the AC97 0x26 register
to be reset (0). EAPD should be 0 for powerup, and 1 for powerdown. The VTB Santa Cruz
card has inverted logic, so there is a special function for these cards.
-module_param(thinkpad, bool, 0);
+MODULE_PARM(thinkpad, "i");
thinkpad=1
if N is set to 1, then force enabling the clkrun functionality.
Currently, when the part is being used, then clkrun is disabled for the entire system,
diff --git a/trunk/Documentation/video4linux/CQcam.txt b/trunk/Documentation/video4linux/CQcam.txt
index 464e4cec94cb..e415e3604539 100644
--- a/trunk/Documentation/video4linux/CQcam.txt
+++ b/trunk/Documentation/video4linux/CQcam.txt
@@ -1,7 +1,7 @@
c-qcam - Connectix Color QuickCam video4linux kernel driver
Copyright (C) 1999 Dave Forrest
- released under GNU GPL.
+ released under GNU GPL.
1999-12-08 Dave Forrest, written with kernel version 2.2.12 in mind
@@ -45,21 +45,21 @@ configuration. The appropriate flags are:
CONFIG_PNP_PARPORT M for autoprobe.o IEEE1284 readback module
CONFIG_PRINTER_READBACK M for parport_probe.o IEEE1284 readback module
CONFIG_VIDEO_DEV M for videodev.o video4linux module
- CONFIG_VIDEO_CQCAM M for c-qcam.o Color Quickcam module
+ CONFIG_VIDEO_CQCAM M for c-qcam.o Color Quickcam module
With these flags, the kernel should compile and install the modules.
To record and monitor the compilation, I use:
(make zlilo ; \
make modules; \
- make modules_install ;
+ make modules_install ;
depmod -a ) &>log &
less log # then a capital 'F' to watch the progress
-
+
But that is my personal preference.
2.2 Configuration
-
+
The configuration requires module configuration and device
configuration. I like kmod or kerneld process with the
/etc/modprobe.conf file so the modules can automatically load/unload as
@@ -68,7 +68,7 @@ using MAKEDEV, or need to be created. The following sections detail
these procedures.
-2.1 Module Configuration
+2.1 Module Configuration
Using modules requires a bit of work to install and pass the
parameters. Understand that entries in /etc/modprobe.conf of:
@@ -128,9 +128,9 @@ system (CONFIG_PROC_FS), the parallel printer support
(CONFIG_PRINTER), the IEEE 1284 system,(CONFIG_PRINTER_READBACK), you
should be able to read some identification from your quickcam with
- modprobe -v parport
- modprobe -v parport_probe
- cat /proc/parport/PORTNUMBER/autoprobe
+ modprobe -v parport
+ modprobe -v parport_probe
+ cat /proc/parport/PORTNUMBER/autoprobe
Returns:
CLASS:MEDIA;
MODEL:Color QuickCam 2.0;
@@ -140,7 +140,7 @@ Returns:
and well. A common problem is that the current driver does not
reliably detect a c-qcam, even though one is attached. In this case,
- modprobe -v c-qcam
+ modprobe -v c-qcam
or
insmod -v c-qcam
@@ -152,16 +152,16 @@ video4linux mailing list and archive for more current information.
3.1 Checklist:
Can you get an image?
- v4lgrab >qcam.ppm ; wc qcam.ppm ; xv qcam.ppm
+ v4lgrab >qcam.ppm ; wc qcam.ppm ; xv qcam.ppm
- Is a working c-qcam connected to the port?
- grep ^ /proc/parport/?/autoprobe
+ Is a working c-qcam connected to the port?
+ grep ^ /proc/parport/?/autoprobe
- Do the /dev/video* files exist?
- ls -lad /dev/video
+ Do the /dev/video* files exist?
+ ls -lad /dev/video
- Is the c-qcam module loaded?
- modprobe -v c-qcam ; lsmod
+ Is the c-qcam module loaded?
+ modprobe -v c-qcam ; lsmod
Does the camera work with alternate programs? cqcam, etc?
@@ -174,7 +174,7 @@ video4linux mailing list and archive for more current information.
isn't, you might try patching the c-qcam module to add a parport=xxx
option as in the bw-qcam module so you can specify the parallel port:
- insmod -v c-qcam parport=0
+ insmod -v c-qcam parport=0
And bypass the detection code, see ../../drivers/char/c-qcam.c and
look for the 'qc_detect' code and call.
@@ -183,12 +183,12 @@ look for the 'qc_detect' code and call.
this work is documented at the video4linux2 site listed below.
-9.0 --- A sample program using v4lgrabber,
+9.0 --- A sample program using v4lgrabber,
This program is a simple image grabber that will copy a frame from the
first video device, /dev/video0 to standard output in portable pixmap
format (.ppm) Using this like: 'v4lgrab | convert - c-qcam.jpg'
-produced this picture of me at
+produced this picture of me at
http://mug.sys.virginia.edu/~drf5n/extras/c-qcam.jpg
-------------------- 8< ---------------- 8< -----------------------------
@@ -202,8 +202,8 @@ produced this picture of me at
* Use as:
* v4lgrab >image.ppm
*
- * Copyright (C) 1998-05-03, Phil Blundell
- * Copied from http://www.tazenda.demon.co.uk/phil/vgrabber.c
+ * Copyright (C) 1998-05-03, Phil Blundell
+ * Copied from http://www.tazenda.demon.co.uk/phil/vgrabber.c
* with minor modifications (Dave Forrest, drf5n@virginia.edu).
*
*/
@@ -225,55 +225,55 @@ produced this picture of me at
#define READ_VIDEO_PIXEL(buf, format, depth, r, g, b) \
{ \
- switch (format) \
- { \
- case VIDEO_PALETTE_GREY: \
- switch (depth) \
- { \
- case 4: \
- case 6: \
- case 8: \
- (r) = (g) = (b) = (*buf++ << 8);\
- break; \
- \
- case 16: \
- (r) = (g) = (b) = \
- *((unsigned short *) buf); \
- buf += 2; \
- break; \
- } \
- break; \
- \
- \
- case VIDEO_PALETTE_RGB565: \
- { \
- unsigned short tmp = *(unsigned short *)buf; \
- (r) = tmp&0xF800; \
- (g) = (tmp<<5)&0xFC00; \
- (b) = (tmp<<11)&0xF800; \
- buf += 2; \
- } \
- break; \
- \
- case VIDEO_PALETTE_RGB555: \
- (r) = (buf[0]&0xF8)<<8; \
- (g) = ((buf[0] << 5 | buf[1] >> 3)&0xF8)<<8; \
- (b) = ((buf[1] << 2 ) & 0xF8)<<8; \
- buf += 2; \
- break; \
- \
- case VIDEO_PALETTE_RGB24: \
- (r) = buf[0] << 8; (g) = buf[1] << 8; \
- (b) = buf[2] << 8; \
- buf += 3; \
- break; \
- \
- default: \
- fprintf(stderr, \
- "Format %d not yet supported\n", \
- format); \
- } \
-}
+ switch (format) \
+ { \
+ case VIDEO_PALETTE_GREY: \
+ switch (depth) \
+ { \
+ case 4: \
+ case 6: \
+ case 8: \
+ (r) = (g) = (b) = (*buf++ << 8);\
+ break; \
+ \
+ case 16: \
+ (r) = (g) = (b) = \
+ *((unsigned short *) buf); \
+ buf += 2; \
+ break; \
+ } \
+ break; \
+ \
+ \
+ case VIDEO_PALETTE_RGB565: \
+ { \
+ unsigned short tmp = *(unsigned short *)buf; \
+ (r) = tmp&0xF800; \
+ (g) = (tmp<<5)&0xFC00; \
+ (b) = (tmp<<11)&0xF800; \
+ buf += 2; \
+ } \
+ break; \
+ \
+ case VIDEO_PALETTE_RGB555: \
+ (r) = (buf[0]&0xF8)<<8; \
+ (g) = ((buf[0] << 5 | buf[1] >> 3)&0xF8)<<8; \
+ (b) = ((buf[1] << 2 ) & 0xF8)<<8; \
+ buf += 2; \
+ break; \
+ \
+ case VIDEO_PALETTE_RGB24: \
+ (r) = buf[0] << 8; (g) = buf[1] << 8; \
+ (b) = buf[2] << 8; \
+ buf += 3; \
+ break; \
+ \
+ default: \
+ fprintf(stderr, \
+ "Format %d not yet supported\n", \
+ format); \
+ } \
+}
int get_brightness_adj(unsigned char *image, long size, int *brightness) {
long i, tot = 0;
@@ -324,40 +324,40 @@ int main(int argc, char ** argv)
if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) {
vpic.depth=6;
if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) {
- vpic.depth=4;
- if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) {
- fprintf(stderr, "Unable to find a supported capture format.\n");
- close(fd);
- exit(1);
- }
+ vpic.depth=4;
+ if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) {
+ fprintf(stderr, "Unable to find a supported capture format.\n");
+ close(fd);
+ exit(1);
+ }
}
}
} else {
vpic.depth=24;
vpic.palette=VIDEO_PALETTE_RGB24;
-
+
if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) {
vpic.palette=VIDEO_PALETTE_RGB565;
vpic.depth=16;
-
+
if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) {
- vpic.palette=VIDEO_PALETTE_RGB555;
- vpic.depth=15;
-
- if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) {
- fprintf(stderr, "Unable to find a supported capture format.\n");
- return -1;
- }
+ vpic.palette=VIDEO_PALETTE_RGB555;
+ vpic.depth=15;
+
+ if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) {
+ fprintf(stderr, "Unable to find a supported capture format.\n");
+ return -1;
+ }
}
}
}
-
+
buffer = malloc(win.width * win.height * bpp);
if (!buffer) {
fprintf(stderr, "Out of memory.\n");
exit(1);
}
-
+
do {
int newbright;
read(fd, buffer, win.width * win.height * bpp);
@@ -365,8 +365,8 @@ int main(int argc, char ** argv)
if (f) {
vpic.brightness += (newbright << 8);
if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) {
- perror("VIDIOSPICT");
- break;
+ perror("VIDIOSPICT");
+ break;
}
}
} while (f);
@@ -381,7 +381,7 @@ int main(int argc, char ** argv)
fputc(g>>8, stdout);
fputc(b>>8, stdout);
}
-
+
close(fd);
return 0;
}
diff --git a/trunk/Documentation/video4linux/README.cpia b/trunk/Documentation/video4linux/README.cpia
index 19cd3bf24981..c95e7bbc0fdf 100644
--- a/trunk/Documentation/video4linux/README.cpia
+++ b/trunk/Documentation/video4linux/README.cpia
@@ -87,7 +87,7 @@ hardware configuration of the parport. You can give the boot-parameter
at the LILO-prompt or specify it in lilo.conf. I use the following
append-line in lilo.conf:
- append="parport=0x378,7,3"
+ append="parport=0x378,7,3"
See Documentation/parport.txt for more information about the
configuration of the parport and the values given above. Do not simply
@@ -175,7 +175,7 @@ THANKS (in no particular order):
- Manuel J. Petit de Gabriel for providing help
with Isabel (http://isabel.dit.upm.es/)
- Bas Huisman for writing the initial parport code
-- Jarl Totland for setting up the mailing list
+- Jarl Totland for setting up the mailing list
and maintaining the web-server[3]
- Chris Whiteford for fixes related to the
1.02 firmware
diff --git a/trunk/Documentation/video4linux/Zoran b/trunk/Documentation/video4linux/Zoran
index be9f21b84555..52c94bd7dca1 100644
--- a/trunk/Documentation/video4linux/Zoran
+++ b/trunk/Documentation/video4linux/Zoran
@@ -28,7 +28,7 @@ Iomega Buz:
* Philips saa7111 TV decoder
* Philips saa7185 TV encoder
Drivers to use: videodev, i2c-core, i2c-algo-bit,
- videocodec, saa7111, saa7185, zr36060, zr36067
+ videocodec, saa7111, saa7185, zr36060, zr36067
Inputs/outputs: Composite and S-video
Norms: PAL, SECAM (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps)
Card number: 7
@@ -39,7 +39,7 @@ Linux Media Labs LML33:
* Brooktree bt819 TV decoder
* Brooktree bt856 TV encoder
Drivers to use: videodev, i2c-core, i2c-algo-bit,
- videocodec, bt819, bt856, zr36060, zr36067
+ videocodec, bt819, bt856, zr36060, zr36067
Inputs/outputs: Composite and S-video
Norms: PAL (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps)
Card number: 5
@@ -50,7 +50,7 @@ Linux Media Labs LML33R10:
* Philips saa7114 TV decoder
* Analog Devices adv7170 TV encoder
Drivers to use: videodev, i2c-core, i2c-algo-bit,
- videocodec, saa7114, adv7170, zr36060, zr36067
+ videocodec, saa7114, adv7170, zr36060, zr36067
Inputs/outputs: Composite and S-video
Norms: PAL (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps)
Card number: 6
@@ -61,7 +61,7 @@ Pinnacle/Miro DC10(new):
* Philips saa7110a TV decoder
* Analog Devices adv7176 TV encoder
Drivers to use: videodev, i2c-core, i2c-algo-bit,
- videocodec, saa7110, adv7175, zr36060, zr36067
+ videocodec, saa7110, adv7175, zr36060, zr36067
Inputs/outputs: Composite, S-video and Internal
Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps)
Card number: 1
@@ -84,7 +84,7 @@ Pinnacle/Miro DC10(old): *
* Micronas vpx3220a TV decoder
* mse3000 TV encoder or Analog Devices adv7176 TV encoder *
Drivers to use: videodev, i2c-core, i2c-algo-bit,
- videocodec, vpx3220, mse3000/adv7175, zr36050, zr36016, zr36067
+ videocodec, vpx3220, mse3000/adv7175, zr36050, zr36016, zr36067
Inputs/outputs: Composite, S-video and Internal
Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps)
Card number: 0
@@ -96,7 +96,7 @@ Pinnacle/Miro DC30: *
* Micronas vpx3225d/vpx3220a/vpx3216b TV decoder
* Analog Devices adv7176 TV encoder
Drivers to use: videodev, i2c-core, i2c-algo-bit,
- videocodec, vpx3220/vpx3224, adv7175, zr36050, zr36016, zr36067
+ videocodec, vpx3220/vpx3224, adv7175, zr36050, zr36016, zr36067
Inputs/outputs: Composite, S-video and Internal
Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps)
Card number: 3
@@ -123,11 +123,11 @@ Note: use encoder=X or decoder=X for non-default i2c chips (see i2c-id.h)
The best know TV standards are NTSC/PAL/SECAM. but for decoding a frame that
information is not enough. There are several formats of the TV standards.
-And not every TV decoder is able to handle every format. Also the every
-combination is supported by the driver. There are currently 11 different
-tv broadcast formats all aver the world.
+And not every TV decoder is able to handle every format. Also the every
+combination is supported by the driver. There are currently 11 different
+tv broadcast formats all aver the world.
-The CCIR defines parameters needed for broadcasting the signal.
+The CCIR defines parameters needed for broadcasting the signal.
The CCIR has defined different standards: A,B,D,E,F,G,D,H,I,K,K1,L,M,N,...
The CCIR says not much about about the colorsystem used !!!
And talking about a colorsystem says not to much about how it is broadcast.
@@ -136,18 +136,18 @@ The CCIR standards A,E,F are not used any more.
When you speak about NTSC, you usually mean the standard: CCIR - M using
the NTSC colorsystem which is used in the USA, Japan, Mexico, Canada
-and a few others.
+and a few others.
When you talk about PAL, you usually mean: CCIR - B/G using the PAL
-colorsystem which is used in many Countries.
+colorsystem which is used in many Countries.
-When you talk about SECAM, you mean: CCIR - L using the SECAM Colorsystem
+When you talk about SECAM, you mean: CCIR - L using the SECAM Colorsystem
which is used in France, and a few others.
There the other version of SECAM, CCIR - D/K is used in Bulgaria, China,
-Slovakai, Hungary, Korea (Rep.), Poland, Rumania and a others.
+Slovakai, Hungary, Korea (Rep.), Poland, Rumania and a others.
-The CCIR - H uses the PAL colorsystem (sometimes SECAM) and is used in
+The CCIR - H uses the PAL colorsystem (sometimes SECAM) and is used in
Egypt, Libya, Sri Lanka, Syrain Arab. Rep.
The CCIR - I uses the PAL colorsystem, and is used in Great Britain, Hong Kong,
@@ -158,30 +158,30 @@ and is used in Argentinia, Uruguay, an a few others
We do not talk about how the audio is broadcast !
-A rather good sites about the TV standards are:
+A rather good sites about the TV standards are:
http://www.sony.jp/ServiceArea/Voltage_map/
http://info.electronicwerkstatt.de/bereiche/fernsehtechnik/frequenzen_und_normen/Fernsehnormen/
and http://www.cabl.com/restaurant/channel.html
Other weird things around: NTSC 4.43 is a modificated NTSC, which is mainly
used in PAL VCR's that are able to play back NTSC. PAL 60 seems to be the same
-as NTSC 4.43 . The Datasheets also talk about NTSC 44, It seems as if it would
-be the same as NTSC 4.43.
+as NTSC 4.43 . The Datasheets also talk about NTSC 44, It seems as if it would
+be the same as NTSC 4.43.
NTSC Combs seems to be a decoder mode where the decoder uses a comb filter
to split coma and luma instead of a Delay line.
But I did not defiantly find out what NTSC Comb is.
Philips saa7111 TV decoder
-was introduced in 1997, is used in the BUZ and
-can handle: PAL B/G/H/I, PAL N, PAL M, NTSC M, NTSC N, NTSC 4.43 and SECAM
+was introduced in 1997, is used in the BUZ and
+can handle: PAL B/G/H/I, PAL N, PAL M, NTSC M, NTSC N, NTSC 4.43 and SECAM
Philips saa7110a TV decoder
was introduced in 1995, is used in the Pinnacle/Miro DC10(new), DC10+ and
-can handle: PAL B/G, NTSC M and SECAM
+can handle: PAL B/G, NTSC M and SECAM
Philips saa7114 TV decoder
-was introduced in 2000, is used in the LML33R10 and
+was introduced in 2000, is used in the LML33R10 and
can handle: PAL B/G/D/H/I/N, PAL N, PAL M, NTSC M, NTSC 4.43 and SECAM
Brooktree bt819 TV decoder
@@ -206,7 +206,7 @@ was introduced in 1996, is used in the BUZ
can generate: PAL B/G, NTSC M
Brooktree bt856 TV Encoder
-was introduced in 1994, is used in the LML33
+was introduced in 1994, is used in the LML33
can generate: PAL B/D/G/H/I/N, PAL M, NTSC M, PAL-N (Argentina)
Analog Devices adv7170 TV Encoder
@@ -221,9 +221,9 @@ ITT mse3000 TV encoder
was introduced in 1991, is used in the DC10 old
can generate: PAL , NTSC , SECAM
-The adv717x, should be able to produce PAL N. But you find nothing PAL N
+The adv717x, should be able to produce PAL N. But you find nothing PAL N
specific in the registers. Seem that you have to reuse a other standard
-to generate PAL N, maybe it would work if you use the PAL M settings.
+to generate PAL N, maybe it would work if you use the PAL M settings.
==========================
@@ -261,7 +261,7 @@ Here's my experience of using LML33 and Buz on various motherboards:
VIA MVP3
Forget it. Pointless. Doesn't work.
-Intel 430FX (Pentium 200)
+Intel 430FX (Pentium 200)
LML33 perfect, Buz tolerable (3 or 4 frames dropped per movie)
Intel 440BX (early stepping)
LML33 tolerable. Buz starting to get annoying (6-10 frames/hour)
@@ -438,52 +438,52 @@ importance of buffer sizes:
> -q 25 -b 128 : 24.655.992
> -q 25 -b 256 : 25.859.820
-I woke up, and can't go to sleep again. I'll kill some time explaining why
+I woke up, and can't go to sleep again. I'll kill some time explaining why
this doesn't look strange to me.
-Let's do some math using a width of 704 pixels. I'm not sure whether the Buz
+Let's do some math using a width of 704 pixels. I'm not sure whether the Buz
actually use that number or not, but that's not too important right now.
-704x288 pixels, one field, is 202752 pixels. Divided by 64 pixels per block;
-3168 blocks per field. Each pixel consist of two bytes; 128 bytes per block;
-1024 bits per block. 100% in the new driver mean 1:2 compression; the maximum
-output becomes 512 bits per block. Actually 510, but 512 is simpler to use
+704x288 pixels, one field, is 202752 pixels. Divided by 64 pixels per block;
+3168 blocks per field. Each pixel consist of two bytes; 128 bytes per block;
+1024 bits per block. 100% in the new driver mean 1:2 compression; the maximum
+output becomes 512 bits per block. Actually 510, but 512 is simpler to use
for calculations.
-Let's say that we specify d1q50. We thus want 256 bits per block; times 3168
-becomes 811008 bits; 101376 bytes per field. We're talking raw bits and bytes
-here, so we don't need to do any fancy corrections for bits-per-pixel or such
+Let's say that we specify d1q50. We thus want 256 bits per block; times 3168
+becomes 811008 bits; 101376 bytes per field. We're talking raw bits and bytes
+here, so we don't need to do any fancy corrections for bits-per-pixel or such
things. 101376 bytes per field.
-d1 video contains two fields per frame. Those sum up to 202752 bytes per
+d1 video contains two fields per frame. Those sum up to 202752 bytes per
frame, and one of those frames goes into each buffer.
-But wait a second! -b128 gives 128kB buffers! It's not possible to cram
+But wait a second! -b128 gives 128kB buffers! It's not possible to cram
202752 bytes of JPEG data into 128kB!
-This is what the driver notice and automatically compensate for in your
+This is what the driver notice and automatically compensate for in your
examples. Let's do some math using this information:
-128kB is 131072 bytes. In this buffer, we want to store two fields, which
-leaves 65536 bytes for each field. Using 3168 blocks per field, we get
-20.68686868... available bytes per block; 165 bits. We can't allow the
-request for 256 bits per block when there's only 165 bits available! The -q50
-option is silently overridden, and the -b128 option takes precedence, leaving
+128kB is 131072 bytes. In this buffer, we want to store two fields, which
+leaves 65536 bytes for each field. Using 3168 blocks per field, we get
+20.68686868... available bytes per block; 165 bits. We can't allow the
+request for 256 bits per block when there's only 165 bits available! The -q50
+option is silently overridden, and the -b128 option takes precedence, leaving
us with the equivalence of -q32.
-This gives us a data rate of 165 bits per block, which, times 3168, sums up
-to 65340 bytes per field, out of the allowed 65536. The current driver has
-another level of rate limiting; it won't accept -q values that fill more than
-6/8 of the specified buffers. (I'm not sure why. "Playing it safe" seem to be
-a safe bet. Personally, I think I would have lowered requested-bits-per-block
-by one, or something like that.) We can't use 165 bits per block, but have to
-lower it again, to 6/8 of the available buffer space: We end up with 124 bits
-per block, the equivalence of -q24. With 128kB buffers, you can't use greater
+This gives us a data rate of 165 bits per block, which, times 3168, sums up
+to 65340 bytes per field, out of the allowed 65536. The current driver has
+another level of rate limiting; it won't accept -q values that fill more than
+6/8 of the specified buffers. (I'm not sure why. "Playing it safe" seem to be
+a safe bet. Personally, I think I would have lowered requested-bits-per-block
+by one, or something like that.) We can't use 165 bits per block, but have to
+lower it again, to 6/8 of the available buffer space: We end up with 124 bits
+per block, the equivalence of -q24. With 128kB buffers, you can't use greater
than -q24 at -d1. (And PAL, and 704 pixels width...)
-The third example is limited to -q24 through the same process. The second
-example, using very similar calculations, is limited to -q48. The only
-example that actually grab at the specified -q value is the last one, which
+The third example is limited to -q24 through the same process. The second
+example, using very similar calculations, is limited to -q48. The only
+example that actually grab at the specified -q value is the last one, which
is clearly visible, looking at the file size.
--
diff --git a/trunk/Documentation/video4linux/bttv/ICs b/trunk/Documentation/video4linux/bttv/ICs
index 611315f87c3e..6b7491336967 100644
--- a/trunk/Documentation/video4linux/bttv/ICs
+++ b/trunk/Documentation/video4linux/bttv/ICs
@@ -14,13 +14,13 @@ Hauppauge Win/TV pci (version 405):
Microchip 24LC02B or
Philips 8582E2Y: 256 Byte EEPROM with configuration information
- I2C 0xa0-0xa1, (24LC02B also responds to 0xa2-0xaf)
+ I2C 0xa0-0xa1, (24LC02B also responds to 0xa2-0xaf)
Philips SAA5246AGP/E: Videotext decoder chip, I2C 0x22-0x23
TDA9800: sound decoder
Winbond W24257AS-35: 32Kx8 CMOS static RAM (Videotext buffer mem)
14052B: analog switch for selection of sound source
-PAL:
+PAL:
TDA5737: VHF, hyperband and UHF mixer/oscillator for TV and VCR 3-band tuners
TSA5522: 1.4 GHz I2C-bus controlled synthesizer, I2C 0xc2-0xc3
diff --git a/trunk/Documentation/video4linux/bttv/PROBLEMS b/trunk/Documentation/video4linux/bttv/PROBLEMS
index 2b8b0079f7c7..8e31e9e36bf7 100644
--- a/trunk/Documentation/video4linux/bttv/PROBLEMS
+++ b/trunk/Documentation/video4linux/bttv/PROBLEMS
@@ -3,7 +3,7 @@
- Start capturing by pressing "c" or by selecting it via a menu!!!
- The memory of some S3 cards is not recognized right:
-
+
First of all, if you are not using XFree-3.2 or newer, upgrade AT LEAST to
XFree-3.2A! This solved the problem for most people.
@@ -31,23 +31,23 @@
(mostly with Trio 64 but also with some others)
Get the free demo version of Accelerated X from www.xinside.com and try
bttv with it. bttv seems to work with most S3 cards with Accelerated X.
-
+
Since I do not know much (better make that almost nothing) about VGA card
programming I do not know the reason for this.
Looks like XFree does something different when setting up the video memory?
- Maybe somebody can enlighten me?
- Would be nice if somebody could get this to work with XFree since
- Accelerated X costs more than some of the grabber cards ...
-
+ Maybe somebody can enlighten me?
+ Would be nice if somebody could get this to work with XFree since
+ Accelerated X costs more than some of the grabber cards ...
+
Better linear frame buffer support for S3 cards will probably be in
XFree 4.0.
-
+
- Grabbing is not switched off when changing consoles with XFree.
That's because XFree and some AcceleratedX versions do not send unmap
events.
- Some popup windows (e.g. of the window manager) are not refreshed.
-
+
Disable backing store by starting X with the option "-bs"
- When using 32 bpp in XFree or 24+8bpp mode in AccelX 3.1 the system
diff --git a/trunk/Documentation/video4linux/bttv/README.quirks b/trunk/Documentation/video4linux/bttv/README.quirks
index 92e03929a6b2..e8edb87df711 100644
--- a/trunk/Documentation/video4linux/bttv/README.quirks
+++ b/trunk/Documentation/video4linux/bttv/README.quirks
@@ -38,9 +38,9 @@ tolerate.
------------------------
When using the 430FX PCI, the following rules will ensure
-compatibility:
+compatibility:
- (1) Deassert REQ at the same time as asserting FRAME.
+ (1) Deassert REQ at the same time as asserting FRAME.
(2) Do not reassert REQ to request another bus transaction until after
finish-ing the previous transaction.
diff --git a/trunk/Documentation/video4linux/bttv/THANKS b/trunk/Documentation/video4linux/bttv/THANKS
index 950aa781c2e9..2085399da7d4 100644
--- a/trunk/Documentation/video4linux/bttv/THANKS
+++ b/trunk/Documentation/video4linux/bttv/THANKS
@@ -1,6 +1,6 @@
Many thanks to:
-- Markus Schroeder for information on the Bt848
+- Markus Schroeder for information on the Bt848
and tuner programming and his control program xtvc.
- Martin Buck for his great Videotext
@@ -16,7 +16,7 @@ Many thanks to:
- MIRO for providing a free PCTV card and detailed information about the
components on their cards. (E.g. how the tuner type is detected)
Without their card I could not have debugged the NTSC mode.
-
+
- Hauppauge for telling how the sound input is selected and what components
they do and will use on their radio cards.
Also many thanks for faxing me the FM1216 data sheet.
diff --git a/trunk/Documentation/video4linux/radiotrack.txt b/trunk/Documentation/video4linux/radiotrack.txt
index d1f3ed199186..2b75345f13e3 100644
--- a/trunk/Documentation/video4linux/radiotrack.txt
+++ b/trunk/Documentation/video4linux/radiotrack.txt
@@ -131,17 +131,17 @@ Check Stereo: BASE <-- 0xd8 (current volume, stereo detect,
x=0xff ==> "not stereo", x=0xfd ==> "stereo detected"
Set Frequency: code = (freq*40) + 10486188
- foreach of the 24 bits in code,
- (from Least to Most Significant):
- to write a "zero" bit,
- BASE <-- 0x01 (audio mute, no stereo detect, radio
+ foreach of the 24 bits in code,
+ (from Least to Most Significant):
+ to write a "zero" bit,
+ BASE <-- 0x01 (audio mute, no stereo detect, radio
disable, "zero" bit phase 1, tuner adjust)
- BASE <-- 0x03 (audio mute, no stereo detect, radio
+ BASE <-- 0x03 (audio mute, no stereo detect, radio
disable, "zero" bit phase 2, tuner adjust)
- to write a "one" bit,
- BASE <-- 0x05 (audio mute, no stereo detect, radio
+ to write a "one" bit,
+ BASE <-- 0x05 (audio mute, no stereo detect, radio
disable, "one" bit phase 1, tuner adjust)
- BASE <-- 0x07 (audio mute, no stereo detect, radio
+ BASE <-- 0x07 (audio mute, no stereo detect, radio
disable, "one" bit phase 2, tuner adjust)
----------------------------------------------------------------------------
diff --git a/trunk/Documentation/video4linux/w9966.txt b/trunk/Documentation/video4linux/w9966.txt
index 78a651254b84..e7ac33a7eb06 100644
--- a/trunk/Documentation/video4linux/w9966.txt
+++ b/trunk/Documentation/video4linux/w9966.txt
@@ -26,7 +26,7 @@ is called VIDEO_PALETTE_YUV422 (16 bpp).
A minimal test application (with source) is available from:
http://hem.fyristorg.com/mogul/w9966.html
-The slow framerate is due to missing DMA ECP read support in the
+The slow framerate is due to missing DMA ECP read support in the
parport drivers. I might add working EPP support later.
Good luck!
diff --git a/trunk/Documentation/video4linux/zr36120.txt b/trunk/Documentation/video4linux/zr36120.txt
index ac6d92d01944..5d6357eefde4 100644
--- a/trunk/Documentation/video4linux/zr36120.txt
+++ b/trunk/Documentation/video4linux/zr36120.txt
@@ -2,7 +2,7 @@ Driver for Trust Computer Products Framegrabber, version 0.6.1
------ --- ----- -------- -------- ------------ ------- - - -
- ZORAN ------------------------------------------------------
- Author: Pauline Middelink
+ Author: Pauline Middelink
Date: 18 September 1999
Version: 0.6.1
@@ -115,7 +115,7 @@ After making/checking the devices do:
is the cardtype of the card you have. The cardnumber can
be found in the source of zr36120. Look for tvcards. If your
card is not there, please try if any other card gives some
-response, and mail me if you got a working tvcard addition.
+response, and mail me if you got a working tvcard addition.
PS.
-
-
-Description
------------
-
-The Maixm/Dallas Semiconductor DS2482 is a I2C device that provides
-one (DS2482-100) or eight (DS2482-800) 1-wire busses.
-
-
-General Remarks
----------------
-
-Valid addresses are 0x18, 0x19, 0x1a, and 0x1b.
-However, the device cannot be detected without writing to the i2c bus, so no
-detection is done.
-You should force the device address.
-
-$ modprobe ds2482 force=0,0x18
-
diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS
index 4e8fbbc5566d..bfd7fbfe90ab 100644
--- a/trunk/MAINTAINERS
+++ b/trunk/MAINTAINERS
@@ -147,18 +147,6 @@ M: p_gortmaker@yahoo.com
L: netdev@vger.kernel.org
S: Maintained
-9P FILE SYSTEM
-P: Eric Van Hensbergen
-M: ericvh@gmail.com
-P: Ron Minnich
-M: rminnich@lanl.gov
-P: Latchesar Ionkov
-M: lucho@ionkov.net
-L: v9fs-developer@lists.sourceforge.net
-W: http://v9fs.sf.net
-T: git kernel.org:/pub/scm/linux/kernel/ericvh/v9fs.git
-S: Maintained
-
A2232 SERIAL BOARD DRIVER
P: Enver Haase
M: ehaase@inf.fu-berlin.de
@@ -2025,6 +2013,12 @@ L: parisc-linux@parisc-linux.org
W: http://www.parisc-linux.org/
S: Maintained
+PERSONALITY HANDLING
+P: Christoph Hellwig
+M: hch@infradead.org
+L: linux-abi-devel@lists.sourceforge.net
+S: Maintained
+
PCI ERROR RECOVERY
P: Linas Vepstas
M: linas@austin.ibm.com
@@ -2075,12 +2069,6 @@ M: tsbogend@alpha.franken.de
L: netdev@vger.kernel.org
S: Maintained
-PERSONALITY HANDLING
-P: Christoph Hellwig
-M: hch@infradead.org
-L: linux-abi-devel@lists.sourceforge.net
-S: Maintained
-
PHRAM MTD DRIVER
P: Jörn Engel
M: joern@wh.fh-wedel.de
@@ -2224,6 +2212,13 @@ S: Maintained
RISCOM8 DRIVER
S: Orphan
+RTLINUX REALTIME LINUX
+P: Victor Yodaiken
+M: yodaiken@fsmlabs.com
+L: rtl@rtlinux.org
+W: www.rtlinux.org
+S: Maintained
+
S3 SAVAGE FRAMEBUFFER DRIVER
P: Antonino Daplas
M: adaplas@pol.net
@@ -2493,13 +2488,6 @@ M: kristen.c.accardi@intel.com
L: pcihpd-discuss@lists.sourceforge.net
S: Maintained
-SECURE DIGITAL HOST CONTROLLER INTERFACE DRIVER
-P: Pierre Ossman
-M: drzeus-sdhci@drzeus.cx
-L: sdhci-devel@list.drzeus.cx
-W: http://mmc.drzeus.cx/wiki/Linux/Drivers/sdhci
-S: Maintained
-
SKGE, SKY2 10/100/1000 GIGABIT ETHERNET DRIVERS
P: Stephen Hemminger
M: shemminger@osdl.org
@@ -2536,6 +2524,7 @@ S: Unsupported ?
STRADIS MPEG-2 DECODER DRIVER
P: Nathan Laredo
M: laredo@gnu.org
+W: http://mpeg.openprojects.net/
W: http://www.stradis.com/
S: Maintained
@@ -2654,7 +2643,7 @@ S: Maintained
TUN/TAP driver
P: Maxim Krasnyansky
-M: maxk@qualcomm.com
+M: maxk@qualcomm.com, max_mk@yahoo.com
L: vtun@office.satix.net
W: http://vtun.sourceforge.net/tun
S: Maintained
@@ -2983,6 +2972,18 @@ L: rio500-users@lists.sourceforge.net
W: http://rio500.sourceforge.net
S: Maintained
+V9FS FILE SYSTEM
+P: Eric Van Hensbergen
+M: ericvh@gmail.com
+P: Ron Minnich
+M: rminnich@lanl.gov
+P: Latchesar Ionkov
+M: lucho@ionkov.net
+L: v9fs-developer@lists.sourceforge.net
+W: http://v9fs.sf.net
+T: git kernel.org:/pub/scm/linux/kernel/ericvh/v9fs-devel.git
+S: Maintained
+
VIDEO FOR LINUX
P: Mauro Carvalho Chehab
M: mchehab@infradead.org
diff --git a/trunk/Makefile b/trunk/Makefile
index af6210d48836..cb5790580fca 100644
--- a/trunk/Makefile
+++ b/trunk/Makefile
@@ -95,7 +95,7 @@ ifdef O
endif
# That's our default target when none is given on the command line
-PHONY := _all
+.PHONY: _all
_all:
ifneq ($(KBUILD_OUTPUT),)
@@ -106,7 +106,7 @@ KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
$(if $(KBUILD_OUTPUT),, \
$(error output directory "$(saved-output)" does not exist))
-PHONY += $(MAKECMDGOALS)
+.PHONY: $(MAKECMDGOALS)
$(filter-out _all,$(MAKECMDGOALS)) _all:
$(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
@@ -123,7 +123,7 @@ ifeq ($(skip-makefile),)
# If building an external module we do not care about the all: rule
# but instead _all depend on modules
-PHONY += all
+.PHONY: all
ifeq ($(KBUILD_EXTMOD),)
_all: all
else
@@ -137,7 +137,7 @@ objtree := $(CURDIR)
src := $(srctree)
obj := $(objtree)
-VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD))
+VPATH := $(srctree)
export srctree objtree VPATH TOPDIR
@@ -151,7 +151,7 @@ export srctree objtree VPATH TOPDIR
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
-e s/arm.*/arm/ -e s/sa110/arm/ \
-e s/s390x/s390/ -e s/parisc64/parisc/ \
- -e s/ppc.*/powerpc/ -e s/mips.*/mips/ )
+ -e s/ppc.*/powerpc/ )
# Cross compiling and selecting different set of gcc/bin-utils
# ---------------------------------------------------------------------------
@@ -258,6 +258,38 @@ endif
export quiet Q KBUILD_VERBOSE
+######
+# cc support functions to be used (only) in arch/$(ARCH)/Makefile
+# See documentation in Documentation/kbuild/makefiles.txt
+
+# as-option
+# Usage: cflags-y += $(call as-option, -Wa$(comma)-isa=foo,)
+
+as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o /dev/null \
+ -xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; \
+ else echo "$(2)"; fi ;)
+
+# cc-option
+# Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586)
+
+cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
+ > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
+
+# cc-option-yn
+# Usage: flag := $(call cc-option-yn, -march=winchip-c6)
+cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
+ > /dev/null 2>&1; then echo "y"; else echo "n"; fi;)
+
+# cc-option-align
+# Prefix align with either -falign or -malign
+cc-option-align = $(subst -functions=0,,\
+ $(call cc-option,-falign-functions=0,-malign-functions=0))
+
+# cc-version
+# Usage gcc-ver := $(call cc-version $(CC))
+cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \
+ $(if $(1), $(1), $(CC)))
+
# Look for make include files relative to root of kernel src
MAKEFLAGS += --include-dir=$(srctree)
@@ -306,7 +338,8 @@ LINUXINCLUDE := -Iinclude \
CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)
CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
- -fno-strict-aliasing -fno-common
+ -fno-strict-aliasing -fno-common \
+ -ffreestanding
AFLAGS := -D__ASSEMBLY__
# Read KERNELRELEASE from .kernelrelease (if it exists)
@@ -336,14 +369,14 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exc
# Rules shared between *config targets and build targets
# Basic helpers built in scripts/
-PHONY += scripts_basic
+.PHONY: scripts_basic
scripts_basic:
$(Q)$(MAKE) $(build)=scripts/basic
# To avoid any implicit rule to kick in, define an empty command.
scripts/basic/%: scripts_basic ;
-PHONY += outputmakefile
+.PHONY: outputmakefile
# outputmakefile generate a Makefile to be placed in output directory, if
# using a seperate output directory. This allows convinient use
# of make in output directory
@@ -419,7 +452,7 @@ ifeq ($(KBUILD_EXTMOD),)
# Additional helpers built in scripts/
# Carefully list dependencies so we do not try to build scripts twice
# in parrallel
-PHONY += scripts
+.PHONY: scripts
scripts: scripts_basic include/config/MARKER
$(Q)$(MAKE) $(build)=$(@)
@@ -471,16 +504,19 @@ else
CFLAGS += -O2
endif
+#Add align options if CONFIG_CC_* is not equal to 0
+add-align = $(if $(filter-out 0,$($(1))),$(cc-option-align)$(2)=$($(1)))
+CFLAGS += $(call add-align,CONFIG_CC_ALIGN_FUNCTIONS,-functions)
+CFLAGS += $(call add-align,CONFIG_CC_ALIGN_LABELS,-labels)
+CFLAGS += $(call add-align,CONFIG_CC_ALIGN_LOOPS,-loops)
+CFLAGS += $(call add-align,CONFIG_CC_ALIGN_JUMPS,-jumps)
+
ifdef CONFIG_FRAME_POINTER
CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,)
else
CFLAGS += -fomit-frame-pointer
endif
-ifdef CONFIG_UNWIND_INFO
-CFLAGS += -fasynchronous-unwind-tables
-endif
-
ifdef CONFIG_DEBUG_INFO
CFLAGS += -g
endif
@@ -716,7 +752,7 @@ $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
# make menuconfig etc.
# Error messages still appears in the original language
-PHONY += $(vmlinux-dirs)
+.PHONY: $(vmlinux-dirs)
$(vmlinux-dirs): prepare scripts
$(Q)$(MAKE) $(build)=$@
@@ -769,10 +805,10 @@ kernelrelease = $(KERNELVERSION)$(localver-full)
# version.h and scripts_basic is processed / created.
# Listed in dependency order
-PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3
+.PHONY: prepare archprepare prepare0 prepare1 prepare2 prepare3
# prepare-all is deprecated, use prepare as valid replacement
-PHONY += prepare-all
+.PHONY: prepare-all
# prepare3 is used to check if we are building in a separate output directory,
# and if so do:
@@ -813,6 +849,27 @@ prepare prepare-all: prepare0
export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH)
+# Single targets
+# ---------------------------------------------------------------------------
+
+%.s: %.c scripts FORCE
+ $(Q)$(MAKE) $(build)=$(@D) $@
+%.i: %.c scripts FORCE
+ $(Q)$(MAKE) $(build)=$(@D) $@
+%.o: %.c scripts FORCE
+ $(Q)$(MAKE) $(build)=$(@D) $@
+%.ko: scripts FORCE
+ $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) $(build)=$(@D) $(@:.ko=.o)
+ $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost
+%/: scripts prepare FORCE
+ $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) $(build)=$(@D)
+%.lst: %.c scripts FORCE
+ $(Q)$(MAKE) $(build)=$(@D) $@
+%.s: %.S scripts FORCE
+ $(Q)$(MAKE) $(build)=$(@D) $@
+%.o: %.S scripts FORCE
+ $(Q)$(MAKE) $(build)=$(@D) $@
+
# FIXME: The asm symlink changes when $(ARCH) changes. That's
# hard to detect, but I suppose "make mrproper" is a good idea
# before switching between archs anyway.
@@ -853,7 +910,7 @@ include/linux/version.h: $(srctree)/Makefile .config .kernelrelease FORCE
# ---------------------------------------------------------------------------
-PHONY += depend dep
+.PHONY: depend dep
depend dep:
@echo '*** Warning: make $@ is unnecessary now.'
@@ -868,21 +925,21 @@ all: modules
# Build modules
-PHONY += modules
+.PHONY: modules
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
@echo ' Building modules, stage 2.';
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost
# Target to prepare building external modules
-PHONY += modules_prepare
+.PHONY: modules_prepare
modules_prepare: prepare scripts
# Target to install modules
-PHONY += modules_install
+.PHONY: modules_install
modules_install: _modinst_ _modinst_post
-PHONY += _modinst_
+.PHONY: _modinst_
_modinst_:
@if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \
echo "Warning: you may need to install module-init-tools"; \
@@ -909,7 +966,7 @@ depmod_opts :=
else
depmod_opts := -b $(INSTALL_MOD_PATH) -r
endif
-PHONY += _modinst_post
+.PHONY: _modinst_post
_modinst_post: _modinst_
if [ -r System.map -a -x $(DEPMOD) ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
@@ -952,7 +1009,7 @@ clean: rm-dirs := $(CLEAN_DIRS)
clean: rm-files := $(CLEAN_FILES)
clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs))
-PHONY += $(clean-dirs) clean archclean
+.PHONY: $(clean-dirs) clean archclean
$(clean-dirs):
$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
@@ -970,7 +1027,7 @@ mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS))
mrproper: rm-files := $(wildcard $(MRPROPER_FILES))
mrproper-dirs := $(addprefix _mrproper_,Documentation/DocBook scripts)
-PHONY += $(mrproper-dirs) mrproper archmrproper
+.PHONY: $(mrproper-dirs) mrproper archmrproper
$(mrproper-dirs):
$(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@)
@@ -980,7 +1037,7 @@ mrproper: clean archmrproper $(mrproper-dirs)
# distclean
#
-PHONY += distclean
+.PHONY: distclean
distclean: mrproper
@find $(srctree) $(RCS_FIND_IGNORE) \
@@ -996,10 +1053,12 @@ distclean: mrproper
# rpm target kept for backward compatibility
package-dir := $(srctree)/scripts/package
+.PHONY: %-pkg rpm
+
%pkg: FORCE
- $(Q)$(MAKE) $(build)=$(package-dir) $@
+ $(Q)$(MAKE) -f $(package-dir)/Makefile $@
rpm: FORCE
- $(Q)$(MAKE) $(build)=$(package-dir) $@
+ $(Q)$(MAKE) -f $(package-dir)/Makefile $@
# Brief documentation of the typical targets used
@@ -1031,11 +1090,13 @@ help:
@echo ' kernelversion - Output the version stored in Makefile'
@echo ''
@echo 'Static analysers'
+ @echo ' buildcheck - List dangling references to vmlinux discarded sections'
+ @echo ' and init sections from non-init sections'
@echo ' checkstack - Generate a list of stack hogs'
@echo ' namespacecheck - Name space analysis on compiled kernel'
@echo ''
@echo 'Kernel packaging:'
- @$(MAKE) $(build)=$(package-dir) help
+ @$(MAKE) -f $(package-dir)/Makefile help
@echo ''
@echo 'Documentation targets:'
@$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp
@@ -1084,12 +1145,11 @@ else # KBUILD_EXTMOD
# We are always building modules
KBUILD_MODULES := 1
-PHONY += crmodverdir
+.PHONY: crmodverdir
crmodverdir:
- $(Q)rm -rf $(MODVERDIR)
$(Q)mkdir -p $(MODVERDIR)
-PHONY += $(objtree)/Module.symvers
+.PHONY: $(objtree)/Module.symvers
$(objtree)/Module.symvers:
@test -e $(objtree)/Module.symvers || ( \
echo; \
@@ -1098,7 +1158,7 @@ $(objtree)/Module.symvers:
echo )
module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
-PHONY += $(module-dirs) modules
+.PHONY: $(module-dirs) modules
$(module-dirs): crmodverdir $(objtree)/Module.symvers
$(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
@@ -1106,32 +1166,13 @@ modules: $(module-dirs)
@echo ' Building modules, stage 2.';
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost
-PHONY += modules_install
-modules_install: _emodinst_ _emodinst_post
-
-install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra)
-PHONY += _emodinst_
-_emodinst_:
- $(Q)rm -rf $(MODLIB)/$(install-dir)
- $(Q)mkdir -p $(MODLIB)/$(install-dir)
+.PHONY: modules_install
+modules_install:
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst
-# Run depmod only is we have System.map and depmod is executable
-quiet_cmd_depmod = DEPMOD $(KERNELRELEASE)
- cmd_depmod = if [ -r System.map -a -x $(DEPMOD) ]; then \
- $(DEPMOD) -ae -F System.map \
- $(if $(strip $(INSTALL_MOD_PATH)), \
- -b $(INSTALL_MOD_PATH) -r) \
- $(KERNELRELEASE); \
- fi
-
-PHONY += _emodinst_post
-_emodinst_post: _emodinst_
- $(call cmd,depmod)
-
clean-dirs := $(addprefix _clean_,$(KBUILD_EXTMOD))
-PHONY += $(clean-dirs) clean
+.PHONY: $(clean-dirs) clean
$(clean-dirs):
$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
@@ -1151,11 +1192,6 @@ help:
@echo ' modules_install - install the module'
@echo ' clean - remove generated files in module directory only'
@echo ''
-
-# Dummies...
-PHONY += prepare scripts
-prepare: ;
-scripts: ;
endif # KBUILD_EXTMOD
# Generate tags for editors
@@ -1256,13 +1292,17 @@ versioncheck:
-name '*.[hcS]' -type f -print | sort \
| xargs $(PERL) -w scripts/checkversion.pl
+buildcheck:
+ $(PERL) $(srctree)/scripts/reference_discarded.pl
+ $(PERL) $(srctree)/scripts/reference_init.pl
+
namespacecheck:
$(PERL) $(srctree)/scripts/namespace.pl
endif #ifeq ($(config-targets),1)
endif #ifeq ($(mixed-targets),1)
-PHONY += checkstack
+.PHONY: checkstack
checkstack:
$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
$(PERL) $(src)/scripts/checkstack.pl $(ARCH)
@@ -1273,44 +1313,6 @@ kernelrelease:
kernelversion:
@echo $(KERNELVERSION)
-# Single targets
-# ---------------------------------------------------------------------------
-# The directory part is taken from first prerequisite, so this
-# works even with external modules
-%.s: %.c prepare scripts FORCE
- $(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
-%.i: %.c prepare scripts FORCE
- $(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
-%.o: %.c prepare scripts FORCE
- $(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
-%.lst: %.c prepare scripts FORCE
- $(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
-%.s: %.S prepare scripts FORCE
- $(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
-%.o: %.S prepare scripts FORCE
- $(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
-
-# For external modules we shall include any directory of the target,
-# but usual case there is no directory part.
-# make M=`pwd` module.o => $(dir $@)=./
-# make M=`pwd` foo/module.o => $(dir $@)=foo/
-# make M=`pwd` / => $(dir $@)=/
-
-ifeq ($(KBUILD_EXTMOD),)
- target-dir = $(@D)
-else
- zap-slash=$(filter-out .,$(patsubst %/,%,$(dir $@)))
- target-dir = $(KBUILD_EXTMOD)$(if $(zap-slash),/$(zap-slash))
-endif
-
-/ %/: scripts prepare FORCE
- $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
- $(build)=$(target-dir)
-%.ko: scripts FORCE
- $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
- $(build)=$(target-dir) $(@:.ko=.o)
- $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost
-
# FIXME Should go into a make.lib or something
# ===========================================================================
@@ -1345,10 +1347,4 @@ clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj
endif # skip-makefile
-PHONY += FORCE
FORCE:
-
-
-# Declare the contents of the .PHONY variable as phony. We keep that
-# information in a variable se we can use it in if_changed and friends.
-.PHONY: $(PHONY)
diff --git a/trunk/arch/arm/Makefile b/trunk/arch/arm/Makefile
index 99c0d323719a..b5b1e4087516 100644
--- a/trunk/arch/arm/Makefile
+++ b/trunk/arch/arm/Makefile
@@ -1,9 +1,6 @@
#
# arch/arm/Makefile
#
-# This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies.
-#
# This file is subject to the terms and conditions of the GNU General Public
# License. See the file "COPYING" in the main directory of this archive
# for more details.
@@ -180,7 +177,7 @@ endif
archprepare: maketools
-PHONY += maketools FORCE
+.PHONY: maketools FORCE
maketools: include/linux/version.h include/asm-arm/.arch FORCE
$(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h
diff --git a/trunk/arch/arm/boot/Makefile b/trunk/arch/arm/boot/Makefile
index ec9c400c7f82..a174d63395ea 100644
--- a/trunk/arch/arm/boot/Makefile
+++ b/trunk/arch/arm/boot/Makefile
@@ -1,9 +1,6 @@
#
# arch/arm/boot/Makefile
#
-# This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies.
-#
# This file is subject to the terms and conditions of the GNU General Public
# License. See the file "COPYING" in the main directory of this archive
# for more details.
@@ -76,7 +73,7 @@ $(obj)/bootpImage: $(obj)/bootp/bootp FORCE
$(call if_changed,objcopy)
@echo ' Kernel: $@ is ready'
-PHONY += initrd FORCE
+.PHONY: initrd FORCE
initrd:
@test "$(INITRD_PHYS)" != "" || \
(echo This machine does not support INITRD; exit -1)
diff --git a/trunk/arch/arm/boot/bootp/Makefile b/trunk/arch/arm/boot/bootp/Makefile
index c394e305447c..8e8879b6b3d7 100644
--- a/trunk/arch/arm/boot/bootp/Makefile
+++ b/trunk/arch/arm/boot/bootp/Makefile
@@ -1,9 +1,6 @@
#
# linux/arch/arm/boot/bootp/Makefile
#
-# This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies.
-#
LDFLAGS_bootp :=-p --no-undefined -X \
--defsym initrd_phys=$(INITRD_PHYS) \
@@ -24,4 +21,4 @@ $(obj)/kernel.o: arch/arm/boot/zImage FORCE
$(obj)/initrd.o: $(INITRD) FORCE
-PHONY += $(INITRD) FORCE
+.PHONY: $(INITRD) FORCE
diff --git a/trunk/arch/arm/mach-iop3xx/iop331-setup.c b/trunk/arch/arm/mach-iop3xx/iop331-setup.c
index 2d6abe5be14d..7b7b6eea3846 100644
--- a/trunk/arch/arm/mach-iop3xx/iop331-setup.c
+++ b/trunk/arch/arm/mach-iop3xx/iop331-setup.c
@@ -103,7 +103,7 @@ static struct plat_serial8250_port iop33x_uart1_data[] = {
static struct platform_device iop33x_uart0 = {
.name = "serial8250",
- .id = 0,
+ .id = PLAT8250_DEV_PLATFORM,
.dev.platform_data = iop33x_uart0_data,
.num_resources = 2,
.resource = iop33x_uart0_resources,
@@ -111,7 +111,7 @@ static struct platform_device iop33x_uart0 = {
static struct platform_device iop33x_uart1 = {
.name = "serial8250",
- .id = 1,
+ .id = PLAT8250_DEV_PLATFORM1,
.dev.platform_data = iop33x_uart1_data,
.num_resources = 2,
.resource = iop33x_uart1_resources,
diff --git a/trunk/arch/arm/mach-omap2/serial.c b/trunk/arch/arm/mach-omap2/serial.c
index 24dd374224af..0884bc7c23b7 100644
--- a/trunk/arch/arm/mach-omap2/serial.c
+++ b/trunk/arch/arm/mach-omap2/serial.c
@@ -167,7 +167,7 @@ void __init omap_serial_init()
static struct platform_device serial_device = {
.name = "serial8250",
- .id = 0,
+ .id = PLAT8250_DEV_PLATFORM,
.dev = {
.platform_data = serial_platform_data,
},
diff --git a/trunk/arch/arm/mach-pxa/leds-mainstone.c b/trunk/arch/arm/mach-pxa/leds-mainstone.c
index c06d3d7a8dd4..bbd3f87a9fc2 100644
--- a/trunk/arch/arm/mach-pxa/leds-mainstone.c
+++ b/trunk/arch/arm/mach-pxa/leds-mainstone.c
@@ -85,7 +85,7 @@ void mainstone_leds_event(led_event_t evt)
break;
case led_green_on:
- hw_led_state |= D21;
+ hw_led_state |= D21;;
break;
case led_green_off:
@@ -93,7 +93,7 @@ void mainstone_leds_event(led_event_t evt)
break;
case led_amber_on:
- hw_led_state |= D22;
+ hw_led_state |= D22;;
break;
case led_amber_off:
@@ -101,7 +101,7 @@ void mainstone_leds_event(led_event_t evt)
break;
case led_red_on:
- hw_led_state |= D23;
+ hw_led_state |= D23;;
break;
case led_red_off:
diff --git a/trunk/arch/arm/mach-s3c2410/cpu.c b/trunk/arch/arm/mach-s3c2410/cpu.c
index 70c34fcf7858..00a379334b60 100644
--- a/trunk/arch/arm/mach-s3c2410/cpu.c
+++ b/trunk/arch/arm/mach-s3c2410/cpu.c
@@ -146,7 +146,7 @@ void s3c24xx_set_board(struct s3c24xx_board *b)
board = b;
if (b->clocks_count != 0) {
- struct clk **ptr = b->clocks;
+ struct clk **ptr = b->clocks;;
for (i = b->clocks_count; i > 0; i--, ptr++)
s3c24xx_register_clock(*ptr);
diff --git a/trunk/arch/arm/mach-sa1100/collie.c b/trunk/arch/arm/mach-sa1100/collie.c
index 102454082474..6888816a1935 100644
--- a/trunk/arch/arm/mach-sa1100/collie.c
+++ b/trunk/arch/arm/mach-sa1100/collie.c
@@ -40,7 +40,6 @@
#include
#include
#include
-#include
#include "generic.h"
@@ -67,32 +66,6 @@ struct platform_device colliescoop_device = {
.resource = collie_scoop_resources,
};
-static struct scoop_pcmcia_dev collie_pcmcia_scoop[] = {
-{
- .dev = &colliescoop_device.dev,
- .irq = COLLIE_IRQ_GPIO_CF_IRQ,
- .cd_irq = COLLIE_IRQ_GPIO_CF_CD,
- .cd_irq_str = "PCMCIA0 CD",
-},
-};
-
-static struct scoop_pcmcia_config collie_pcmcia_config = {
- .devs = &collie_pcmcia_scoop[0],
- .num_devs = 1,
-};
-
-
-static struct mcp_plat_data collie_mcp_data = {
- .mccr0 = MCCR0_ADM,
- .sclk_rate = 11981000,
-};
-
-
-static struct sa1100_port_fns collie_port_fns __initdata = {
- .set_mctrl = collie_uart_set_mctrl,
- .get_mctrl = collie_uart_get_mctrl,
-};
-
static struct resource locomo_resources[] = {
[0] = {
@@ -186,8 +159,6 @@ static void __init collie_init(void)
GPDR |= GPIO_32_768kHz;
TUCR = TUCR_32_768kHz;
- platform_scoop_config = &collie_pcmcia_config;
-
ret = platform_add_devices(devices, ARRAY_SIZE(devices));
if (ret) {
printk(KERN_WARNING "collie: Unable to register LoCoMo device\n");
@@ -195,7 +166,6 @@ static void __init collie_init(void)
sa11x0_set_flash_data(&collie_flash_data, collie_flash_resources,
ARRAY_SIZE(collie_flash_resources));
- sa11x0_set_mcp_data(&collie_mcp_data);
sharpsl_save_param();
}
diff --git a/trunk/arch/arm26/Makefile b/trunk/arch/arm26/Makefile
index fe91eda98a94..844a9e46886e 100644
--- a/trunk/arch/arm26/Makefile
+++ b/trunk/arch/arm26/Makefile
@@ -1,9 +1,6 @@
#
# arch/arm26/Makefile
#
-# This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies.
-#
# This file is subject to the terms and conditions of the GNU General Public
# License. See the file "COPYING" in the main directory of this archive
# for more details.
@@ -52,9 +49,9 @@ all: zImage
boot := arch/arm26/boot
-PHONY += maketools FORCE
+.PHONY: maketools FORCE
maketools: FORCE
-
+
# Convert bzImage to zImage
bzImage: vmlinux
diff --git a/trunk/arch/arm26/boot/Makefile b/trunk/arch/arm26/boot/Makefile
index 68acb7b0d47f..b5c2277654d4 100644
--- a/trunk/arch/arm26/boot/Makefile
+++ b/trunk/arch/arm26/boot/Makefile
@@ -1,9 +1,6 @@
#
# arch/arm26/boot/Makefile
#
-# This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies.
-#
# This file is subject to the terms and conditions of the GNU General Public
# License. See the file "COPYING" in the main directory of this archive
# for more details.
@@ -63,7 +60,7 @@ $(obj)/xipImage: vmlinux FORCE
@echo ' Kernel: $@ is ready'
endif
-PHONY += initrd
+.PHONY: initrd
initrd:
@test "$(INITRD_PHYS)" != "" || \
(echo This machine does not support INITRD; exit -1)
diff --git a/trunk/arch/cris/arch-v32/drivers/cryptocop.c b/trunk/arch/cris/arch-v32/drivers/cryptocop.c
index c59ee28a35f4..501fa52d8d3a 100644
--- a/trunk/arch/cris/arch-v32/drivers/cryptocop.c
+++ b/trunk/arch/cris/arch-v32/drivers/cryptocop.c
@@ -2944,7 +2944,7 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig
int spdl_err;
/* Mark output pages dirty. */
spdl_err = set_page_dirty_lock(outpages[i]);
- DEBUG(if (spdl_err < 0)printk("cryptocop_ioctl_process: set_page_dirty_lock returned %d\n", spdl_err));
+ DEBUG(if (spdl_err)printk("cryptocop_ioctl_process: set_page_dirty_lock returned %d\n", spdl_err));
}
for (i = 0; i < nooutpages; i++){
put_page(outpages[i]);
diff --git a/trunk/arch/cris/kernel/irq.c b/trunk/arch/cris/kernel/irq.c
index b504def3e346..30deaf1b728a 100644
--- a/trunk/arch/cris/kernel/irq.c
+++ b/trunk/arch/cris/kernel/irq.c
@@ -52,8 +52,9 @@ int show_interrupts(struct seq_file *p, void *v)
if (i == 0) {
seq_printf(p, " ");
- for_each_online_cpu(j)
- seq_printf(p, "CPU%d ",j);
+ for (j=0; jtypename);
seq_printf(p, " %s", action->name);
diff --git a/trunk/arch/cris/kernel/process.c b/trunk/arch/cris/kernel/process.c
index 123451c44154..4ab3e87115b6 100644
--- a/trunk/arch/cris/kernel/process.c
+++ b/trunk/arch/cris/kernel/process.c
@@ -116,7 +116,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -195,6 +194,8 @@ EXPORT_SYMBOL(enable_hlt);
*/
void (*pm_idle)(void);
+extern void default_idle(void);
+
/*
* The idle thread. There's no useful work to be
* done, so just try to conserve power and have a
diff --git a/trunk/arch/frv/kernel/gdb-stub.c b/trunk/arch/frv/kernel/gdb-stub.c
index 508601fad079..8f860d9c4947 100644
--- a/trunk/arch/frv/kernel/gdb-stub.c
+++ b/trunk/arch/frv/kernel/gdb-stub.c
@@ -1406,7 +1406,7 @@ void gdbstub(int sigval)
__debug_frame->psr |= PSR_S;
__debug_regs->brr = (__debug_frame->tbr & TBR_TT) << 12;
__debug_regs->brr |= BRR_EB;
- sigval = SIGXCPU;
+ sigval = SIGXCPU;;
}
LEDS(0x5002);
diff --git a/trunk/arch/frv/kernel/irq.c b/trunk/arch/frv/kernel/irq.c
index 11fa326a8f62..27ab4c30aac6 100644
--- a/trunk/arch/frv/kernel/irq.c
+++ b/trunk/arch/frv/kernel/irq.c
@@ -75,8 +75,9 @@ int show_interrupts(struct seq_file *p, void *v)
switch (i) {
case 0:
seq_printf(p, " ");
- for_each_online_cpu(j)
- seq_printf(p, "CPU%d ",j);
+ for (j = 0; j < NR_CPUS; j++)
+ if (cpu_online(j))
+ seq_printf(p, "CPU%d ",j);
seq_putc(p, '\n');
break;
@@ -99,8 +100,9 @@ int show_interrupts(struct seq_file *p, void *v)
#ifndef CONFIG_SMP
seq_printf(p, "%10u ", kstat_irqs(i));
#else
- for_each_online_cpu(j)
- seq_printf(p, "%10u ", kstat_cpu(j).irqs[i - 1]);
+ for (j = 0; j < NR_CPUS; j++)
+ if (cpu_online(j))
+ seq_printf(p, "%10u ", kstat_cpu(j).irqs[i - 1]);
#endif
level = group->sources[ix]->level - frv_irq_levels;
diff --git a/trunk/arch/h8300/kernel/process.c b/trunk/arch/h8300/kernel/process.c
index 16ccddc69c2b..dd344f112cfe 100644
--- a/trunk/arch/h8300/kernel/process.c
+++ b/trunk/arch/h8300/kernel/process.c
@@ -54,7 +54,7 @@ asmlinkage void ret_from_fork(void);
* The idle loop on an H8/300..
*/
#if !defined(CONFIG_H8300H_SIM) && !defined(CONFIG_H8S_SIM)
-static void default_idle(void)
+void default_idle(void)
{
local_irq_disable();
if (!need_resched()) {
@@ -65,7 +65,7 @@ static void default_idle(void)
local_irq_enable();
}
#else
-static void default_idle(void)
+void default_idle(void)
{
cpu_relax();
}
diff --git a/trunk/arch/i386/Kconfig b/trunk/arch/i386/Kconfig
index b008fb0cd7b7..5b1a7d46d1d9 100644
--- a/trunk/arch/i386/Kconfig
+++ b/trunk/arch/i386/Kconfig
@@ -80,7 +80,6 @@ config X86_VOYAGER
config X86_NUMAQ
bool "NUMAQ (IBM/Sequent)"
- select SMP
select NUMA
help
This option is used for getting Linux to run on a (IBM/Sequent) NUMA
@@ -401,7 +400,6 @@ choice
config NOHIGHMEM
bool "off"
- depends on !X86_NUMAQ
---help---
Linux can use up to 64 Gigabytes of physical memory on x86 systems.
However, the address space of 32-bit x86 processors is only 4
@@ -438,7 +436,6 @@ config NOHIGHMEM
config HIGHMEM4G
bool "4GB"
- depends on !X86_NUMAQ
help
Select this if you have a 32-bit processor and between 1 and 4
gigabytes of physical RAM.
@@ -506,6 +503,10 @@ config NUMA
default n if X86_PC
default y if (X86_NUMAQ || X86_SUMMIT)
+# Need comments to help the hapless user trying to turn on NUMA support
+comment "NUMA (NUMA-Q) requires SMP, 64GB highmem support"
+ depends on X86_NUMAQ && (!HIGHMEM64G || !SMP)
+
comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI"
depends on X86_SUMMIT && (!HIGHMEM64G || !ACPI)
@@ -659,18 +660,13 @@ config BOOT_IOREMAP
default y
config REGPARM
- bool "Use register arguments"
- default y
+ bool "Use register arguments (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+ default n
help
- Compile the kernel with -mregparm=3. This instructs gcc to use
- a more efficient function call ABI which passes the first three
- arguments of a function call via registers, which results in denser
- and faster code.
-
- If this option is disabled, then the default ABI of passing
- arguments via the stack is used.
-
- If unsure, say Y.
+ Compile the kernel with -mregparm=3. This uses a different ABI
+ and passes the first three arguments of a function call in registers.
+ This will probably break binary only modules.
config SECCOMP
bool "Enable seccomp to safely compute untrusted bytecode"
@@ -737,7 +733,7 @@ config PHYSICAL_START
config HOTPLUG_CPU
bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
- depends on SMP && HOTPLUG && EXPERIMENTAL && !X86_VOYAGER && !X86_PC
+ depends on SMP && HOTPLUG && EXPERIMENTAL && !X86_VOYAGER
---help---
Say Y here to experiment with turning CPUs off and on. CPUs
can be controlled through /sys/devices/system/cpu.
diff --git a/trunk/arch/i386/Kconfig.debug b/trunk/arch/i386/Kconfig.debug
index 6e97df6979e8..bf32ecc9ad04 100644
--- a/trunk/arch/i386/Kconfig.debug
+++ b/trunk/arch/i386/Kconfig.debug
@@ -31,21 +31,12 @@ config DEBUG_STACK_USAGE
This option will slow down process creation somewhat.
-config STACK_BACKTRACE_COLS
- int "Stack backtraces per line" if DEBUG_KERNEL
- range 1 3
- default 2
- help
- Selects how many stack backtrace entries per line to display.
-
- This can save screen space when displaying traces.
-
comment "Page alloc debug is incompatible with Software Suspend on i386"
depends on DEBUG_KERNEL && SOFTWARE_SUSPEND
config DEBUG_PAGEALLOC
- bool "Debug page memory allocations"
- depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND && !HUGETLBFS
+ bool "Page alloc debugging"
+ depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND
help
Unmap pages from the kernel linear mapping after free_pages().
This results in a large slowdown, but helps to find certain types
diff --git a/trunk/arch/i386/Makefile b/trunk/arch/i386/Makefile
index c848a5b30391..36bef6543ac1 100644
--- a/trunk/arch/i386/Makefile
+++ b/trunk/arch/i386/Makefile
@@ -39,9 +39,6 @@ include $(srctree)/arch/i386/Makefile.cpu
cflags-$(CONFIG_REGPARM) += -mregparm=3
-# temporary until string.h is fixed
-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:
CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;)
@@ -102,8 +99,8 @@ AFLAGS += $(mflags-y)
boot := arch/i386/boot
-PHONY += zImage bzImage compressed zlilo bzlilo \
- zdisk bzdisk fdimage fdimage144 fdimage288 install
+.PHONY: zImage bzImage compressed zlilo bzlilo \
+ zdisk bzdisk fdimage fdimage144 fdimage288 install
all: bzImage
diff --git a/trunk/arch/i386/Makefile.cpu b/trunk/arch/i386/Makefile.cpu
index a11befba26d5..dcd936ef45db 100644
--- a/trunk/arch/i386/Makefile.cpu
+++ b/trunk/arch/i386/Makefile.cpu
@@ -39,7 +39,3 @@ cflags-$(CONFIG_X86_ELAN) += -march=i486
# Geode GX1 support
cflags-$(CONFIG_MGEODEGX1) += -march=pentium-mmx
-# add at the end to overwrite eventual tuning options from earlier
-# cpu entries
-cflags-$(CONFIG_X86_GENERIC) += $(call tune,generic)
-
diff --git a/trunk/arch/i386/boot/edd.S b/trunk/arch/i386/boot/edd.S
index 4b84ea216f2b..d8d69f2b911d 100644
--- a/trunk/arch/i386/boot/edd.S
+++ b/trunk/arch/i386/boot/edd.S
@@ -76,8 +76,6 @@ edd_mbr_sig_read:
popw %es
popw %bx
jc edd_mbr_sig_done # on failure, we're done.
- cmpb $0, %ah # some BIOSes do not set CF
- jne edd_mbr_sig_done # on failure, we're done.
movl (EDDBUF+EDD_MBR_SIG_OFFSET), %eax # read sig out of the MBR
movl %eax, (%bx) # store success
incb (EDD_MBR_SIG_NR_BUF) # note that we stored something
diff --git a/trunk/arch/i386/kernel/Makefile b/trunk/arch/i386/kernel/Makefile
index 5b9ed21216cf..65656c033d70 100644
--- a/trunk/arch/i386/kernel/Makefile
+++ b/trunk/arch/i386/kernel/Makefile
@@ -7,7 +7,7 @@ extra-y := head.o init_task.o vmlinux.lds
obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \
ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \
pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \
- quirks.o i8237.o topology.o alternative.o
+ quirks.o i8237.o topology.o
obj-y += cpu/
obj-y += timers/
diff --git a/trunk/arch/i386/kernel/alternative.c b/trunk/arch/i386/kernel/alternative.c
deleted file mode 100644
index 5cbd6f99fb2a..000000000000
--- a/trunk/arch/i386/kernel/alternative.c
+++ /dev/null
@@ -1,321 +0,0 @@
-#include
-#include
-#include
-#include
-#include
-
-#define DEBUG 0
-#if DEBUG
-# define DPRINTK(fmt, args...) printk(fmt, args)
-#else
-# define DPRINTK(fmt, args...)
-#endif
-
-/* Use inline assembly to define this because the nops are defined
- as inline assembly strings in the include files and we cannot
- get them easily into strings. */
-asm("\t.data\nintelnops: "
- GENERIC_NOP1 GENERIC_NOP2 GENERIC_NOP3 GENERIC_NOP4 GENERIC_NOP5 GENERIC_NOP6
- GENERIC_NOP7 GENERIC_NOP8);
-asm("\t.data\nk8nops: "
- K8_NOP1 K8_NOP2 K8_NOP3 K8_NOP4 K8_NOP5 K8_NOP6
- K8_NOP7 K8_NOP8);
-asm("\t.data\nk7nops: "
- K7_NOP1 K7_NOP2 K7_NOP3 K7_NOP4 K7_NOP5 K7_NOP6
- K7_NOP7 K7_NOP8);
-
-extern unsigned char intelnops[], k8nops[], k7nops[];
-static unsigned char *intel_nops[ASM_NOP_MAX+1] = {
- NULL,
- intelnops,
- intelnops + 1,
- intelnops + 1 + 2,
- intelnops + 1 + 2 + 3,
- intelnops + 1 + 2 + 3 + 4,
- intelnops + 1 + 2 + 3 + 4 + 5,
- intelnops + 1 + 2 + 3 + 4 + 5 + 6,
- intelnops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
-};
-static unsigned char *k8_nops[ASM_NOP_MAX+1] = {
- NULL,
- k8nops,
- k8nops + 1,
- k8nops + 1 + 2,
- k8nops + 1 + 2 + 3,
- k8nops + 1 + 2 + 3 + 4,
- k8nops + 1 + 2 + 3 + 4 + 5,
- k8nops + 1 + 2 + 3 + 4 + 5 + 6,
- k8nops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
-};
-static unsigned char *k7_nops[ASM_NOP_MAX+1] = {
- NULL,
- k7nops,
- k7nops + 1,
- k7nops + 1 + 2,
- k7nops + 1 + 2 + 3,
- k7nops + 1 + 2 + 3 + 4,
- k7nops + 1 + 2 + 3 + 4 + 5,
- k7nops + 1 + 2 + 3 + 4 + 5 + 6,
- k7nops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
-};
-static struct nop {
- int cpuid;
- unsigned char **noptable;
-} noptypes[] = {
- { X86_FEATURE_K8, k8_nops },
- { X86_FEATURE_K7, k7_nops },
- { -1, NULL }
-};
-
-
-extern struct alt_instr __alt_instructions[], __alt_instructions_end[];
-extern struct alt_instr __smp_alt_instructions[], __smp_alt_instructions_end[];
-extern u8 *__smp_locks[], *__smp_locks_end[];
-
-extern u8 __smp_alt_begin[], __smp_alt_end[];
-
-
-static unsigned char** find_nop_table(void)
-{
- unsigned char **noptable = intel_nops;
- int i;
-
- for (i = 0; noptypes[i].cpuid >= 0; i++) {
- if (boot_cpu_has(noptypes[i].cpuid)) {
- noptable = noptypes[i].noptable;
- break;
- }
- }
- return noptable;
-}
-
-/* Replace instructions with better alternatives for this CPU type.
- This runs before SMP is initialized to avoid SMP problems with
- self modifying code. This implies that assymetric systems where
- APs have less capabilities than the boot processor are not handled.
- Tough. Make sure you disable such features by hand. */
-
-void apply_alternatives(struct alt_instr *start, struct alt_instr *end)
-{
- unsigned char **noptable = find_nop_table();
- struct alt_instr *a;
- int diff, i, k;
-
- DPRINTK("%s: alt table %p -> %p\n", __FUNCTION__, start, end);
- for (a = start; a < end; a++) {
- BUG_ON(a->replacementlen > a->instrlen);
- if (!boot_cpu_has(a->cpuid))
- continue;
- memcpy(a->instr, a->replacement, a->replacementlen);
- diff = a->instrlen - a->replacementlen;
- /* Pad the rest with nops */
- for (i = a->replacementlen; diff > 0; diff -= k, i += k) {
- k = diff;
- if (k > ASM_NOP_MAX)
- k = ASM_NOP_MAX;
- memcpy(a->instr + i, noptable[k], k);
- }
- }
-}
-
-static void alternatives_smp_save(struct alt_instr *start, struct alt_instr *end)
-{
- struct alt_instr *a;
-
- DPRINTK("%s: alt table %p-%p\n", __FUNCTION__, start, end);
- for (a = start; a < end; a++) {
- memcpy(a->replacement + a->replacementlen,
- a->instr,
- a->instrlen);
- }
-}
-
-static void alternatives_smp_apply(struct alt_instr *start, struct alt_instr *end)
-{
- struct alt_instr *a;
-
- for (a = start; a < end; a++) {
- memcpy(a->instr,
- a->replacement + a->replacementlen,
- a->instrlen);
- }
-}
-
-static void alternatives_smp_lock(u8 **start, u8 **end, u8 *text, u8 *text_end)
-{
- u8 **ptr;
-
- for (ptr = start; ptr < end; ptr++) {
- if (*ptr < text)
- continue;
- if (*ptr > text_end)
- continue;
- **ptr = 0xf0; /* lock prefix */
- };
-}
-
-static void alternatives_smp_unlock(u8 **start, u8 **end, u8 *text, u8 *text_end)
-{
- unsigned char **noptable = find_nop_table();
- u8 **ptr;
-
- for (ptr = start; ptr < end; ptr++) {
- if (*ptr < text)
- continue;
- if (*ptr > text_end)
- continue;
- **ptr = noptable[1][0];
- };
-}
-
-struct smp_alt_module {
- /* what is this ??? */
- struct module *mod;
- char *name;
-
- /* ptrs to lock prefixes */
- u8 **locks;
- u8 **locks_end;
-
- /* .text segment, needed to avoid patching init code ;) */
- u8 *text;
- u8 *text_end;
-
- struct list_head next;
-};
-static LIST_HEAD(smp_alt_modules);
-static DEFINE_SPINLOCK(smp_alt);
-
-static int smp_alt_once = 0;
-static int __init bootonly(char *str)
-{
- smp_alt_once = 1;
- return 1;
-}
-__setup("smp-alt-boot", bootonly);
-
-void alternatives_smp_module_add(struct module *mod, char *name,
- void *locks, void *locks_end,
- void *text, void *text_end)
-{
- struct smp_alt_module *smp;
- unsigned long flags;
-
- if (smp_alt_once) {
- if (boot_cpu_has(X86_FEATURE_UP))
- alternatives_smp_unlock(locks, locks_end,
- text, text_end);
- return;
- }
-
- smp = kzalloc(sizeof(*smp), GFP_KERNEL);
- if (NULL == smp)
- return; /* we'll run the (safe but slow) SMP code then ... */
-
- smp->mod = mod;
- smp->name = name;
- smp->locks = locks;
- smp->locks_end = locks_end;
- smp->text = text;
- smp->text_end = text_end;
- DPRINTK("%s: locks %p -> %p, text %p -> %p, name %s\n",
- __FUNCTION__, smp->locks, smp->locks_end,
- smp->text, smp->text_end, smp->name);
-
- spin_lock_irqsave(&smp_alt, flags);
- list_add_tail(&smp->next, &smp_alt_modules);
- if (boot_cpu_has(X86_FEATURE_UP))
- alternatives_smp_unlock(smp->locks, smp->locks_end,
- smp->text, smp->text_end);
- spin_unlock_irqrestore(&smp_alt, flags);
-}
-
-void alternatives_smp_module_del(struct module *mod)
-{
- struct smp_alt_module *item;
- unsigned long flags;
-
- if (smp_alt_once)
- return;
-
- spin_lock_irqsave(&smp_alt, flags);
- list_for_each_entry(item, &smp_alt_modules, next) {
- if (mod != item->mod)
- continue;
- list_del(&item->next);
- spin_unlock_irqrestore(&smp_alt, flags);
- DPRINTK("%s: %s\n", __FUNCTION__, item->name);
- kfree(item);
- return;
- }
- spin_unlock_irqrestore(&smp_alt, flags);
-}
-
-void alternatives_smp_switch(int smp)
-{
- struct smp_alt_module *mod;
- unsigned long flags;
-
- if (smp_alt_once)
- return;
- BUG_ON(!smp && (num_online_cpus() > 1));
-
- spin_lock_irqsave(&smp_alt, flags);
- if (smp) {
- printk(KERN_INFO "SMP alternatives: switching to SMP code\n");
- clear_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability);
- clear_bit(X86_FEATURE_UP, cpu_data[0].x86_capability);
- alternatives_smp_apply(__smp_alt_instructions,
- __smp_alt_instructions_end);
- list_for_each_entry(mod, &smp_alt_modules, next)
- alternatives_smp_lock(mod->locks, mod->locks_end,
- mod->text, mod->text_end);
- } else {
- printk(KERN_INFO "SMP alternatives: switching to UP code\n");
- set_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability);
- set_bit(X86_FEATURE_UP, cpu_data[0].x86_capability);
- apply_alternatives(__smp_alt_instructions,
- __smp_alt_instructions_end);
- list_for_each_entry(mod, &smp_alt_modules, next)
- alternatives_smp_unlock(mod->locks, mod->locks_end,
- mod->text, mod->text_end);
- }
- spin_unlock_irqrestore(&smp_alt, flags);
-}
-
-void __init alternative_instructions(void)
-{
- apply_alternatives(__alt_instructions, __alt_instructions_end);
-
- /* switch to patch-once-at-boottime-only mode and free the
- * tables in case we know the number of CPUs will never ever
- * change */
-#ifdef CONFIG_HOTPLUG_CPU
- if (num_possible_cpus() < 2)
- smp_alt_once = 1;
-#else
- smp_alt_once = 1;
-#endif
-
- if (smp_alt_once) {
- if (1 == num_possible_cpus()) {
- printk(KERN_INFO "SMP alternatives: switching to UP code\n");
- set_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability);
- set_bit(X86_FEATURE_UP, cpu_data[0].x86_capability);
- apply_alternatives(__smp_alt_instructions,
- __smp_alt_instructions_end);
- alternatives_smp_unlock(__smp_locks, __smp_locks_end,
- _text, _etext);
- }
- free_init_pages("SMP alternatives",
- (unsigned long)__smp_alt_begin,
- (unsigned long)__smp_alt_end);
- } else {
- alternatives_smp_save(__smp_alt_instructions,
- __smp_alt_instructions_end);
- alternatives_smp_module_add(NULL, "core kernel",
- __smp_locks, __smp_locks_end,
- _text, _etext);
- alternatives_smp_switch(0);
- }
-}
diff --git a/trunk/arch/i386/kernel/apic.c b/trunk/arch/i386/kernel/apic.c
index eb5279d23b7f..776c90989e06 100644
--- a/trunk/arch/i386/kernel/apic.c
+++ b/trunk/arch/i386/kernel/apic.c
@@ -38,7 +38,6 @@
#include
#include
-#include
#include
#include "io_ports.h"
diff --git a/trunk/arch/i386/kernel/apm.c b/trunk/arch/i386/kernel/apm.c
index da30a374dd4e..05312a8abb8b 100644
--- a/trunk/arch/i386/kernel/apm.c
+++ b/trunk/arch/i386/kernel/apm.c
@@ -824,6 +824,8 @@ static void apm_do_busy(void)
static void (*original_pm_idle)(void);
+extern void default_idle(void);
+
/**
* apm_cpu_idle - cpu idling for APM capable Linux
*
diff --git a/trunk/arch/i386/kernel/cpu/centaur.c b/trunk/arch/i386/kernel/cpu/centaur.c
index bd75629dd262..f52669ecb93f 100644
--- a/trunk/arch/i386/kernel/cpu/centaur.c
+++ b/trunk/arch/i386/kernel/cpu/centaur.c
@@ -4,7 +4,6 @@
#include
#include
#include
-#include
#include "cpu.h"
#ifdef CONFIG_X86_OOSTORE
diff --git a/trunk/arch/i386/kernel/cpu/common.c b/trunk/arch/i386/kernel/cpu/common.c
index 7e3d6b6a4e96..e6bd095ae108 100644
--- a/trunk/arch/i386/kernel/cpu/common.c
+++ b/trunk/arch/i386/kernel/cpu/common.c
@@ -25,10 +25,9 @@ EXPORT_PER_CPU_SYMBOL(cpu_gdt_descr);
DEFINE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]);
EXPORT_PER_CPU_SYMBOL(cpu_16bit_stack);
-static int cachesize_override __cpuinitdata = -1;
-static int disable_x86_fxsr __cpuinitdata;
-static int disable_x86_serial_nr __cpuinitdata = 1;
-static int disable_x86_sep __cpuinitdata;
+static int cachesize_override __devinitdata = -1;
+static int disable_x86_fxsr __devinitdata = 0;
+static int disable_x86_serial_nr __devinitdata = 1;
struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {};
@@ -60,7 +59,7 @@ static int __init cachesize_setup(char *str)
}
__setup("cachesize=", cachesize_setup);
-int __cpuinit get_model_name(struct cpuinfo_x86 *c)
+int __devinit get_model_name(struct cpuinfo_x86 *c)
{
unsigned int *v;
char *p, *q;
@@ -90,7 +89,7 @@ int __cpuinit get_model_name(struct cpuinfo_x86 *c)
}
-void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c)
+void __devinit display_cacheinfo(struct cpuinfo_x86 *c)
{
unsigned int n, dummy, ecx, edx, l2size;
@@ -131,7 +130,7 @@ void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c)
/* in particular, if CPUID levels 0x80000002..4 are supported, this isn't used */
/* Look up CPU names by table lookup. */
-static char __cpuinit *table_lookup_model(struct cpuinfo_x86 *c)
+static char __devinit *table_lookup_model(struct cpuinfo_x86 *c)
{
struct cpu_model_info *info;
@@ -152,7 +151,7 @@ static char __cpuinit *table_lookup_model(struct cpuinfo_x86 *c)
}
-static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c, int early)
+static void __devinit get_cpu_vendor(struct cpuinfo_x86 *c, int early)
{
char *v = c->x86_vendor_id;
int i;
@@ -188,14 +187,6 @@ static int __init x86_fxsr_setup(char * s)
__setup("nofxsr", x86_fxsr_setup);
-static int __init x86_sep_setup(char * s)
-{
- disable_x86_sep = 1;
- return 1;
-}
-__setup("nosep", x86_sep_setup);
-
-
/* Standard macro to see if a specific flag is changeable */
static inline int flag_is_changeable_p(u32 flag)
{
@@ -219,7 +210,7 @@ static inline int flag_is_changeable_p(u32 flag)
/* Probe for the CPUID instruction */
-static int __cpuinit have_cpuid_p(void)
+static int __devinit have_cpuid_p(void)
{
return flag_is_changeable_p(X86_EFLAGS_ID);
}
@@ -263,7 +254,7 @@ static void __init early_cpu_detect(void)
}
}
-void __cpuinit generic_identify(struct cpuinfo_x86 * c)
+void __devinit generic_identify(struct cpuinfo_x86 * c)
{
u32 tfms, xlvl;
int junk;
@@ -316,7 +307,7 @@ void __cpuinit generic_identify(struct cpuinfo_x86 * c)
#endif
}
-static void __cpuinit squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
+static void __devinit squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
{
if (cpu_has(c, X86_FEATURE_PN) && disable_x86_serial_nr ) {
/* Disable processor serial number */
@@ -344,7 +335,7 @@ __setup("serialnumber", x86_serial_nr_setup);
/*
* This does the hard work of actually picking apart the CPU stuff...
*/
-void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
+void __devinit identify_cpu(struct cpuinfo_x86 *c)
{
int i;
@@ -414,10 +405,6 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
clear_bit(X86_FEATURE_XMM, c->x86_capability);
}
- /* SEP disabled? */
- if (disable_x86_sep)
- clear_bit(X86_FEATURE_SEP, c->x86_capability);
-
if (disable_pse)
clear_bit(X86_FEATURE_PSE, c->x86_capability);
@@ -430,7 +417,7 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
else
/* Last resort... */
sprintf(c->x86_model_id, "%02x/%02x",
- c->x86, c->x86_model);
+ c->x86_vendor, c->x86_model);
}
/* Now the feature flags better reflect actual CPU features! */
@@ -466,7 +453,7 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
}
#ifdef CONFIG_X86_HT
-void __cpuinit detect_ht(struct cpuinfo_x86 *c)
+void __devinit detect_ht(struct cpuinfo_x86 *c)
{
u32 eax, ebx, ecx, edx;
int index_msb, core_bits;
@@ -513,7 +500,7 @@ void __cpuinit detect_ht(struct cpuinfo_x86 *c)
}
#endif
-void __cpuinit print_cpu_info(struct cpuinfo_x86 *c)
+void __devinit print_cpu_info(struct cpuinfo_x86 *c)
{
char *vendor = NULL;
@@ -536,7 +523,7 @@ void __cpuinit print_cpu_info(struct cpuinfo_x86 *c)
printk("\n");
}
-cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE;
+cpumask_t cpu_initialized __devinitdata = CPU_MASK_NONE;
/* This is hacky. :)
* We're emulating future behavior.
@@ -583,7 +570,7 @@ void __init early_cpu_init(void)
* and IDT. We reload them nevertheless, this function acts as a
* 'CPU state barrier', nothing should get across.
*/
-void __cpuinit cpu_init(void)
+void __devinit cpu_init(void)
{
int cpu = smp_processor_id();
struct tss_struct * t = &per_cpu(init_tss, cpu);
@@ -683,7 +670,7 @@ void __cpuinit cpu_init(void)
}
#ifdef CONFIG_HOTPLUG_CPU
-void __cpuinit cpu_uninit(void)
+void __devinit cpu_uninit(void)
{
int cpu = raw_smp_processor_id();
cpu_clear(cpu, cpu_initialized);
diff --git a/trunk/arch/i386/kernel/cpu/cpufreq/Kconfig b/trunk/arch/i386/kernel/cpu/cpufreq/Kconfig
index e44a4c6a4fe5..26892d2099b0 100644
--- a/trunk/arch/i386/kernel/cpu/cpufreq/Kconfig
+++ b/trunk/arch/i386/kernel/cpu/cpufreq/Kconfig
@@ -96,6 +96,7 @@ config X86_POWERNOW_K8_ACPI
config X86_GX_SUSPMOD
tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation"
+ depends on PCI
help
This add the CPUFreq driver for NatSemi Geode processors which
support suspend modulation.
@@ -114,9 +115,9 @@ config X86_SPEEDSTEP_CENTRINO
you also need to say Y to "Use ACPI tables to decode..." below
[which might imply enabling ACPI] if you want to use this driver
on non-Banias CPUs.
-
+
For details, take a look at .
-
+
If in doubt, say N.
config X86_SPEEDSTEP_CENTRINO_ACPI
@@ -147,7 +148,7 @@ config X86_SPEEDSTEP_ICH
help
This adds the CPUFreq driver for certain mobile Intel Pentium III
(Coppermine), all mobile Intel Pentium III-M (Tualatin) and all
- mobile Intel Pentium 4 P4-M on systems which have an Intel ICH2,
+ mobile Intel Pentium 4 P4-M on systems which have an Intel ICH2,
ICH3 or ICH4 southbridge.
For details, take a look at .
@@ -160,7 +161,7 @@ config X86_SPEEDSTEP_SMI
depends on EXPERIMENTAL
help
This adds the CPUFreq driver for certain mobile Intel Pentium III
- (Coppermine), all mobile Intel Pentium III-M (Tualatin)
+ (Coppermine), all mobile Intel Pentium III-M (Tualatin)
on systems which have an Intel 440BX/ZX/MX southbridge.
For details, take a look at .
@@ -202,10 +203,9 @@ config X86_LONGRUN
config X86_LONGHAUL
tristate "VIA Cyrix III Longhaul"
select CPU_FREQ_TABLE
- depends on BROKEN
help
- This adds the CPUFreq driver for VIA Samuel/CyrixIII,
- VIA Cyrix Samuel/C3, VIA Cyrix Ezra and VIA Cyrix Ezra-T
+ This adds the CPUFreq driver for VIA Samuel/CyrixIII,
+ VIA Cyrix Samuel/C3, VIA Cyrix Ezra and VIA Cyrix Ezra-T
processors.
For details, take a look at .
@@ -215,11 +215,11 @@ config X86_LONGHAUL
comment "shared options"
config X86_ACPI_CPUFREQ_PROC_INTF
- bool "/proc/acpi/processor/../performance interface (deprecated)"
+ bool "/proc/acpi/processor/../performance interface (deprecated)"
depends on PROC_FS
depends on X86_ACPI_CPUFREQ || X86_SPEEDSTEP_CENTRINO_ACPI || X86_POWERNOW_K7_ACPI || X86_POWERNOW_K8_ACPI
help
- This enables the deprecated /proc/acpi/processor/../performance
+ This enables the deprecated /proc/acpi/processor/../performance
interface. While it is helpful for debugging, the generic,
cross-architecture cpufreq interfaces should be used.
@@ -233,9 +233,9 @@ config X86_SPEEDSTEP_RELAXED_CAP_CHECK
bool "Relaxed speedstep capability checks"
depends on (X86_SPEEDSTEP_SMI || X86_SPEEDSTEP_ICH)
help
- Don't perform all checks for a speedstep capable system which would
- normally be done. Some ancient or strange systems, though speedstep
- capable, don't always indicate that they are speedstep capable. This
+ Don't perform all checks for a speedstep capable system which would
+ normally be done. Some ancient or strange systems, though speedstep
+ capable, don't always indicate that they are speedstep capable. This
option lets the probing code bypass some of those checks if the
parameter "relaxed_check=1" is passed to the module.
diff --git a/trunk/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c b/trunk/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c
index f275e0d4aee5..2b62dee35c6c 100644
--- a/trunk/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c
+++ b/trunk/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c
@@ -39,7 +39,7 @@ static struct pci_dev *nforce2_chipset_dev;
static int fid = 0;
/* min_fsb, max_fsb:
- * minimum and maximum FSB (= FSB at boot time)
+ * minimum and maximum FSB (= FSB at boot time)
*/
static int min_fsb = 0;
static int max_fsb = 0;
@@ -57,10 +57,10 @@ MODULE_PARM_DESC(min_fsb,
#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "cpufreq-nforce2", msg)
-/**
+/*
* nforce2_calc_fsb - calculate FSB
* @pll: PLL value
- *
+ *
* Calculates FSB from PLL value
*/
static int nforce2_calc_fsb(int pll)
@@ -76,10 +76,10 @@ static int nforce2_calc_fsb(int pll)
return 0;
}
-/**
+/*
* nforce2_calc_pll - calculate PLL value
* @fsb: FSB
- *
+ *
* Calculate PLL value for given FSB
*/
static int nforce2_calc_pll(unsigned int fsb)
@@ -106,10 +106,10 @@ static int nforce2_calc_pll(unsigned int fsb)
return NFORCE2_PLL(mul, div);
}
-/**
+/*
* nforce2_write_pll - write PLL value to chipset
* @pll: PLL value
- *
+ *
* Writes new FSB PLL value to chipset
*/
static void nforce2_write_pll(int pll)
@@ -121,13 +121,15 @@ static void nforce2_write_pll(int pll)
pci_write_config_dword(nforce2_chipset_dev, NFORCE2_PLLADR, temp);
/* Now write the value in all 64 registers */
- for (temp = 0; temp <= 0x3f; temp++)
- pci_write_config_dword(nforce2_chipset_dev, NFORCE2_PLLREG, pll);
+ for (temp = 0; temp <= 0x3f; temp++) {
+ pci_write_config_dword(nforce2_chipset_dev,
+ NFORCE2_PLLREG, pll);
+ }
return;
}
-/**
+/*
* nforce2_fsb_read - Read FSB
*
* Read FSB from chipset
@@ -138,32 +140,39 @@ static unsigned int nforce2_fsb_read(int bootfsb)
struct pci_dev *nforce2_sub5;
u32 fsb, temp = 0;
+
/* Get chipset boot FSB from subdevice 5 (FSB at boot-time) */
nforce2_sub5 = pci_get_subsys(PCI_VENDOR_ID_NVIDIA,
- 0x01EF,PCI_ANY_ID,PCI_ANY_ID,NULL);
+ 0x01EF,
+ PCI_ANY_ID,
+ PCI_ANY_ID,
+ NULL);
+
if (!nforce2_sub5)
return 0;
pci_read_config_dword(nforce2_sub5, NFORCE2_BOOTFSB, &fsb);
fsb /= 1000000;
-
+
/* Check if PLL register is already set */
- pci_read_config_byte(nforce2_chipset_dev,NFORCE2_PLLENABLE, (u8 *)&temp);
-
+ pci_read_config_byte(nforce2_chipset_dev,
+ NFORCE2_PLLENABLE, (u8 *)&temp);
+
if(bootfsb || !temp)
return fsb;
/* Use PLL register FSB value */
- pci_read_config_dword(nforce2_chipset_dev,NFORCE2_PLLREG, &temp);
+ pci_read_config_dword(nforce2_chipset_dev,
+ NFORCE2_PLLREG, &temp);
fsb = nforce2_calc_fsb(temp);
return fsb;
}
-/**
+/*
* nforce2_set_fsb - set new FSB
* @fsb: New FSB
- *
+ *
* Sets new FSB
*/
static int nforce2_set_fsb(unsigned int fsb)
@@ -177,7 +186,7 @@ static int nforce2_set_fsb(unsigned int fsb)
printk(KERN_ERR "cpufreq: FSB %d is out of range!\n", fsb);
return -EINVAL;
}
-
+
tfsb = nforce2_fsb_read(0);
if (!tfsb) {
printk(KERN_ERR "cpufreq: Error while reading the FSB\n");
@@ -185,7 +194,8 @@ static int nforce2_set_fsb(unsigned int fsb)
}
/* First write? Then set actual value */
- pci_read_config_byte(nforce2_chipset_dev,NFORCE2_PLLENABLE, (u8 *)&temp);
+ pci_read_config_byte(nforce2_chipset_dev,
+ NFORCE2_PLLENABLE, (u8 *)&temp);
if (!temp) {
pll = nforce2_calc_pll(tfsb);
@@ -213,7 +223,7 @@ static int nforce2_set_fsb(unsigned int fsb)
/* Calculate the PLL reg. value */
if ((pll = nforce2_calc_pll(tfsb)) == -1)
return -EINVAL;
-
+
nforce2_write_pll(pll);
#ifdef NFORCE2_DELAY
mdelay(NFORCE2_DELAY);
@@ -229,7 +239,7 @@ static int nforce2_set_fsb(unsigned int fsb)
/**
* nforce2_get - get the CPU frequency
* @cpu: CPU number
- *
+ *
* Returns the CPU frequency
*/
static unsigned int nforce2_get(unsigned int cpu)
@@ -344,10 +354,10 @@ static int nforce2_cpu_init(struct cpufreq_policy *policy)
printk(KERN_INFO "cpufreq: FSB currently at %i MHz, FID %d.%d\n", fsb,
fid / 10, fid % 10);
-
+
/* Set maximum FSB to FSB at boot time */
max_fsb = nforce2_fsb_read(1);
-
+
if(!max_fsb)
return -EIO;
@@ -388,15 +398,17 @@ static struct cpufreq_driver nforce2_driver = {
* nforce2_detect_chipset - detect the Southbridge which contains FSB PLL logic
*
* Detects nForce2 A2 and C1 stepping
- *
+ *
*/
static unsigned int nforce2_detect_chipset(void)
{
u8 revision;
nforce2_chipset_dev = pci_get_subsys(PCI_VENDOR_ID_NVIDIA,
- PCI_DEVICE_ID_NVIDIA_NFORCE2,
- PCI_ANY_ID, PCI_ANY_ID, NULL);
+ PCI_DEVICE_ID_NVIDIA_NFORCE2,
+ PCI_ANY_ID,
+ PCI_ANY_ID,
+ NULL);
if (nforce2_chipset_dev == NULL)
return -ENODEV;
diff --git a/trunk/arch/i386/kernel/cpu/cpufreq/elanfreq.c b/trunk/arch/i386/kernel/cpu/cpufreq/elanfreq.c
index f317276afa7a..3f7caa4ae6d6 100644
--- a/trunk/arch/i386/kernel/cpu/cpufreq/elanfreq.c
+++ b/trunk/arch/i386/kernel/cpu/cpufreq/elanfreq.c
@@ -1,16 +1,16 @@
/*
- * elanfreq: cpufreq driver for the AMD ELAN family
+ * elanfreq: cpufreq driver for the AMD ELAN family
*
* (c) Copyright 2002 Robert Schwebel
*
- * Parts of this code are (c) Sven Geggus
+ * Parts of this code are (c) Sven Geggus
*
- * All Rights Reserved.
+ * All Rights Reserved.
*
* 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.
+ * 2 of the License, or (at your option) any later version.
*
* 2002-02-13: - initial revision for 2.4.18-pre9 by Robert Schwebel
*
@@ -28,7 +28,7 @@
#include
#include
-#define REG_CSCIR 0x22 /* Chip Setup and Control Index Register */
+#define REG_CSCIR 0x22 /* Chip Setup and Control Index Register */
#define REG_CSCDR 0x23 /* Chip Setup and Control Data Register */
/* Module parameter */
@@ -41,7 +41,7 @@ struct s_elan_multiplier {
};
/*
- * It is important that the frequencies
+ * It is important that the frequencies
* are listed in ascending order here!
*/
struct s_elan_multiplier elan_multiplier[] = {
@@ -72,79 +72,78 @@ static struct cpufreq_frequency_table elanfreq_table[] = {
* elanfreq_get_cpu_frequency: determine current cpu speed
*
* Finds out at which frequency the CPU of the Elan SOC runs
- * at the moment. Frequencies from 1 to 33 MHz are generated
+ * at the moment. Frequencies from 1 to 33 MHz are generated
* the normal way, 66 and 99 MHz are called "Hyperspeed Mode"
- * and have the rest of the chip running with 33 MHz.
+ * and have the rest of the chip running with 33 MHz.
*/
static unsigned int elanfreq_get_cpu_frequency(unsigned int cpu)
{
- u8 clockspeed_reg; /* Clock Speed Register */
-
+ u8 clockspeed_reg; /* Clock Speed Register */
+
local_irq_disable();
- outb_p(0x80,REG_CSCIR);
- clockspeed_reg = inb_p(REG_CSCDR);
+ outb_p(0x80,REG_CSCIR);
+ clockspeed_reg = inb_p(REG_CSCDR);
local_irq_enable();
- if ((clockspeed_reg & 0xE0) == 0xE0)
- return 0;
+ if ((clockspeed_reg & 0xE0) == 0xE0) { return 0; }
- /* Are we in CPU clock multiplied mode (66/99 MHz)? */
- if ((clockspeed_reg & 0xE0) == 0xC0) {
- if ((clockspeed_reg & 0x01) == 0)
+ /* Are we in CPU clock multiplied mode (66/99 MHz)? */
+ if ((clockspeed_reg & 0xE0) == 0xC0) {
+ if ((clockspeed_reg & 0x01) == 0) {
return 66000;
- else
- return 99000;
- }
+ } else {
+ return 99000;
+ }
+ }
/* 33 MHz is not 32 MHz... */
if ((clockspeed_reg & 0xE0)==0xA0)
return 33000;
- return ((1<<((clockspeed_reg & 0xE0) >> 5)) * 1000);
+ return ((1<<((clockspeed_reg & 0xE0) >> 5)) * 1000);
}
/**
- * elanfreq_set_cpu_frequency: Change the CPU core frequency
- * @cpu: cpu number
+ * elanfreq_set_cpu_frequency: Change the CPU core frequency
+ * @cpu: cpu number
* @freq: frequency in kHz
*
- * This function takes a frequency value and changes the CPU frequency
+ * This function takes a frequency value and changes the CPU frequency
* according to this. Note that the frequency has to be checked by
* elanfreq_validatespeed() for correctness!
- *
- * There is no return value.
+ *
+ * There is no return value.
*/
-static void elanfreq_set_cpu_state (unsigned int state)
-{
+static void elanfreq_set_cpu_state (unsigned int state) {
+
struct cpufreq_freqs freqs;
freqs.old = elanfreq_get_cpu_frequency(0);
freqs.new = elan_multiplier[state].clock;
freqs.cpu = 0; /* elanfreq.c is UP only driver */
-
+
cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
- printk(KERN_INFO "elanfreq: attempting to set frequency to %i kHz\n",
- elan_multiplier[state].clock);
+ printk(KERN_INFO "elanfreq: attempting to set frequency to %i kHz\n",elan_multiplier[state].clock);
- /*
- * Access to the Elan's internal registers is indexed via
- * 0x22: Chip Setup & Control Register Index Register (CSCI)
- * 0x23: Chip Setup & Control Register Data Register (CSCD)
+ /*
+ * Access to the Elan's internal registers is indexed via
+ * 0x22: Chip Setup & Control Register Index Register (CSCI)
+ * 0x23: Chip Setup & Control Register Data Register (CSCD)
*
*/
- /*
- * 0x40 is the Power Management Unit's Force Mode Register.
+ /*
+ * 0x40 is the Power Management Unit's Force Mode Register.
* Bit 6 enables Hyperspeed Mode (66/100 MHz core frequency)
*/
local_irq_disable();
- outb_p(0x40,REG_CSCIR); /* Disable hyperspeed mode */
+ outb_p(0x40,REG_CSCIR); /* Disable hyperspeed mode */
outb_p(0x00,REG_CSCDR);
local_irq_enable(); /* wait till internal pipelines and */
udelay(1000); /* buffers have cleaned up */
@@ -167,10 +166,10 @@ static void elanfreq_set_cpu_state (unsigned int state)
/**
* elanfreq_validatespeed: test if frequency range is valid
- * @policy: the policy to validate
+ * @policy: the policy to validate
*
- * This function checks if a given frequency range in kHz is valid
- * for the hardware supported by the driver.
+ * This function checks if a given frequency range in kHz is valid
+ * for the hardware supported by the driver.
*/
static int elanfreq_verify (struct cpufreq_policy *policy)
@@ -178,11 +177,11 @@ static int elanfreq_verify (struct cpufreq_policy *policy)
return cpufreq_frequency_table_verify(policy, &elanfreq_table[0]);
}
-static int elanfreq_target (struct cpufreq_policy *policy,
- unsigned int target_freq,
+static int elanfreq_target (struct cpufreq_policy *policy,
+ unsigned int target_freq,
unsigned int relation)
{
- unsigned int newstate = 0;
+ unsigned int newstate = 0;
if (cpufreq_frequency_table_target(policy, &elanfreq_table[0], target_freq, relation, &newstate))
return -EINVAL;
@@ -213,7 +212,7 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy)
max_freq = elanfreq_get_cpu_frequency(0);
/* table init */
- for (i=0; (elanfreq_table[i].frequency != CPUFREQ_TABLE_END); i++) {
+ for (i=0; (elanfreq_table[i].frequency != CPUFREQ_TABLE_END); i++) {
if (elanfreq_table[i].frequency > max_freq)
elanfreq_table[i].frequency = CPUFREQ_ENTRY_INVALID;
}
@@ -227,7 +226,8 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy)
if (result)
return (result);
- cpufreq_frequency_table_get_attr(elanfreq_table, policy->cpu);
+ cpufreq_frequency_table_get_attr(elanfreq_table, policy->cpu);
+
return 0;
}
@@ -268,9 +268,9 @@ static struct freq_attr* elanfreq_attr[] = {
static struct cpufreq_driver elanfreq_driver = {
- .get = elanfreq_get_cpu_frequency,
- .verify = elanfreq_verify,
- .target = elanfreq_target,
+ .get = elanfreq_get_cpu_frequency,
+ .verify = elanfreq_verify,
+ .target = elanfreq_target,
.init = elanfreq_cpu_init,
.exit = elanfreq_cpu_exit,
.name = "elanfreq",
@@ -279,21 +279,23 @@ static struct cpufreq_driver elanfreq_driver = {
};
-static int __init elanfreq_init(void)
-{
+static int __init elanfreq_init(void)
+{
struct cpuinfo_x86 *c = cpu_data;
/* Test if we have the right hardware */
if ((c->x86_vendor != X86_VENDOR_AMD) ||
- (c->x86 != 4) || (c->x86_model!=10)) {
+ (c->x86 != 4) || (c->x86_model!=10))
+ {
printk(KERN_INFO "elanfreq: error: no Elan processor found!\n");
return -ENODEV;
}
+
return cpufreq_register_driver(&elanfreq_driver);
}
-static void __exit elanfreq_exit(void)
+static void __exit elanfreq_exit(void)
{
cpufreq_unregister_driver(&elanfreq_driver);
}
@@ -307,3 +309,4 @@ MODULE_DESCRIPTION("cpufreq driver for AMD's Elan CPUs");
module_init(elanfreq_init);
module_exit(elanfreq_exit);
+
diff --git a/trunk/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c b/trunk/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
index 92afa3bc84f1..e86ea486c311 100644
--- a/trunk/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
+++ b/trunk/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
@@ -6,12 +6,12 @@
*
* 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
+ * version 2 as published by the Free Software Foundation
*
* The author(s) of this software shall not be held liable for damages
* of any nature resulting due to the use of this software. This
* software is provided AS-IS with no warranties.
- *
+ *
* Theoritical note:
*
* (see Geode(tm) CS5530 manual (rev.4.1) page.56)
@@ -21,18 +21,18 @@
*
* Suspend Modulation works by asserting and de-asserting the SUSP# pin
* to CPU(GX1/GXLV) for configurable durations. When asserting SUSP#
- * the CPU enters an idle state. GX1 stops its core clock when SUSP# is
+ * the CPU enters an idle state. GX1 stops its core clock when SUSP# is
* asserted then power consumption is reduced.
*
- * Suspend Modulation's OFF/ON duration are configurable
+ * Suspend Modulation's OFF/ON duration are configurable
* with 'Suspend Modulation OFF Count Register'
* and 'Suspend Modulation ON Count Register'.
- * These registers are 8bit counters that represent the number of
+ * These registers are 8bit counters that represent the number of
* 32us intervals which the SUSP# pin is asserted(ON)/de-asserted(OFF)
* to the processor.
*
- * These counters define a ratio which is the effective frequency
- * of operation of the system.
+ * These counters define a ratio which is the effective frequency
+ * of operation of the system.
*
* OFF Count
* F_eff = Fgx * ----------------------
@@ -40,24 +40,24 @@
*
* 0 <= On Count, Off Count <= 255
*
- * From these limits, we can get register values
+ * From these limits, we can get register values
*
* off_duration + on_duration <= MAX_DURATION
* on_duration = off_duration * (stock_freq - freq) / freq
*
- * off_duration = (freq * DURATION) / stock_freq
- * on_duration = DURATION - off_duration
+ * off_duration = (freq * DURATION) / stock_freq
+ * on_duration = DURATION - off_duration
*
*
*---------------------------------------------------------------------------
*
* ChangeLog:
- * Dec. 12, 2003 Hiroshi Miura
- * - fix on/off register mistake
- * - fix cpu_khz calc when it stops cpu modulation.
+ * Dec. 12, 2003 Hiroshi Miura
+ * - fix on/off register mistake
+ * - fix cpu_khz calc when it stops cpu modulation.
*
- * Dec. 11, 2002 Hiroshi Miura
- * - rewrite for Cyrix MediaGX Cx5510/5520 and
+ * Dec. 11, 2002 Hiroshi Miura
+ * - rewrite for Cyrix MediaGX Cx5510/5520 and
* NatSemi Geode Cs5530(A).
*
* Jul. ??, 2002 Zwane Mwaikambo
@@ -74,40 +74,40 @@
************************************************************************/
#include
-#include
+#include
#include
#include
#include
#include
-#include
+#include
#include
/* PCI config registers, all at F0 */
-#define PCI_PMER1 0x80 /* power management enable register 1 */
-#define PCI_PMER2 0x81 /* power management enable register 2 */
-#define PCI_PMER3 0x82 /* power management enable register 3 */
-#define PCI_IRQTC 0x8c /* irq speedup timer counter register:typical 2 to 4ms */
-#define PCI_VIDTC 0x8d /* video speedup timer counter register: typical 50 to 100ms */
-#define PCI_MODOFF 0x94 /* suspend modulation OFF counter register, 1 = 32us */
-#define PCI_MODON 0x95 /* suspend modulation ON counter register */
-#define PCI_SUSCFG 0x96 /* suspend configuration register */
+#define PCI_PMER1 0x80 /* power management enable register 1 */
+#define PCI_PMER2 0x81 /* power management enable register 2 */
+#define PCI_PMER3 0x82 /* power management enable register 3 */
+#define PCI_IRQTC 0x8c /* irq speedup timer counter register:typical 2 to 4ms */
+#define PCI_VIDTC 0x8d /* video speedup timer counter register: typical 50 to 100ms */
+#define PCI_MODOFF 0x94 /* suspend modulation OFF counter register, 1 = 32us */
+#define PCI_MODON 0x95 /* suspend modulation ON counter register */
+#define PCI_SUSCFG 0x96 /* suspend configuration register */
/* PMER1 bits */
-#define GPM (1<<0) /* global power management */
-#define GIT (1<<1) /* globally enable PM device idle timers */
-#define GTR (1<<2) /* globally enable IO traps */
-#define IRQ_SPDUP (1<<3) /* disable clock throttle during interrupt handling */
-#define VID_SPDUP (1<<4) /* disable clock throttle during vga video handling */
+#define GPM (1<<0) /* global power management */
+#define GIT (1<<1) /* globally enable PM device idle timers */
+#define GTR (1<<2) /* globally enable IO traps */
+#define IRQ_SPDUP (1<<3) /* disable clock throttle during interrupt handling */
+#define VID_SPDUP (1<<4) /* disable clock throttle during vga video handling */
/* SUSCFG bits */
-#define SUSMOD (1<<0) /* enable/disable suspend modulation */
-/* the belows support only with cs5530 (after rev.1.2)/cs5530A */
-#define SMISPDUP (1<<1) /* select how SMI re-enable suspend modulation: */
- /* IRQTC timer or read SMI speedup disable reg.(F1BAR[08-09h]) */
-#define SUSCFG (1<<2) /* enable powering down a GXLV processor. "Special 3Volt Suspend" mode */
-/* the belows support only with cs5530A */
-#define PWRSVE_ISA (1<<3) /* stop ISA clock */
-#define PWRSVE (1<<4) /* active idle */
+#define SUSMOD (1<<0) /* enable/disable suspend modulation */
+/* the belows support only with cs5530 (after rev.1.2)/cs5530A */
+#define SMISPDUP (1<<1) /* select how SMI re-enable suspend modulation: */
+ /* IRQTC timer or read SMI speedup disable reg.(F1BAR[08-09h]) */
+#define SUSCFG (1<<2) /* enable powering down a GXLV processor. "Special 3Volt Suspend" mode */
+/* the belows support only with cs5530A */
+#define PWRSVE_ISA (1<<3) /* stop ISA clock */
+#define PWRSVE (1<<4) /* active idle */
struct gxfreq_params {
u8 on_duration;
@@ -128,7 +128,7 @@ module_param (pci_busclk, int, 0444);
/* maximum duration for which the cpu may be suspended
* (32us * MAX_DURATION). If no parameter is given, this defaults
- * to 255.
+ * to 255.
* Note that this leads to a maximum of 8 ms(!) where the CPU clock
* is suspended -- processing power is just 0.39% of what it used to be,
* though. 781.25 kHz(!) for a 200 MHz processor -- wow. */
@@ -144,17 +144,17 @@ module_param (max_duration, int, 0444);
#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "gx-suspmod", msg)
/**
- * we can detect a core multipiler from dir0_lsb
- * from GX1 datasheet p.56,
- * MULT[3:0]:
- * 0000 = SYSCLK multiplied by 4 (test only)
- * 0001 = SYSCLK multiplied by 10
- * 0010 = SYSCLK multiplied by 4
- * 0011 = SYSCLK multiplied by 6
- * 0100 = SYSCLK multiplied by 9
- * 0101 = SYSCLK multiplied by 5
- * 0110 = SYSCLK multiplied by 7
- * 0111 = SYSCLK multiplied by 8
+ * we can detect a core multipiler from dir0_lsb
+ * from GX1 datasheet p.56,
+ * MULT[3:0]:
+ * 0000 = SYSCLK multiplied by 4 (test only)
+ * 0001 = SYSCLK multiplied by 10
+ * 0010 = SYSCLK multiplied by 4
+ * 0011 = SYSCLK multiplied by 6
+ * 0100 = SYSCLK multiplied by 9
+ * 0101 = SYSCLK multiplied by 5
+ * 0110 = SYSCLK multiplied by 7
+ * 0111 = SYSCLK multiplied by 8
* of 33.3MHz
**/
static int gx_freq_mult[16] = {
@@ -164,17 +164,17 @@ static int gx_freq_mult[16] = {
/****************************************************************
- * Low Level chipset interface *
+ * Low Level chipset interface *
****************************************************************/
static struct pci_device_id gx_chipset_tbl[] __initdata = {
- { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, PCI_ANY_ID, PCI_ANY_ID },
- { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5520, PCI_ANY_ID, PCI_ANY_ID },
- { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5510, PCI_ANY_ID, PCI_ANY_ID },
- { 0, },
+ { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, PCI_ANY_ID, PCI_ANY_ID },
+ { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5520, PCI_ANY_ID, PCI_ANY_ID },
+ { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5510, PCI_ANY_ID, PCI_ANY_ID },
+ { 0, },
};
/**
- * gx_detect_chipset:
+ * gx_detect_chipset:
*
**/
static __init struct pci_dev *gx_detect_chipset(void)
@@ -182,16 +182,17 @@ static __init struct pci_dev *gx_detect_chipset(void)
struct pci_dev *gx_pci = NULL;
/* check if CPU is a MediaGX or a Geode. */
- if ((current_cpu_data.x86_vendor != X86_VENDOR_NSC) &&
+ if ((current_cpu_data.x86_vendor != X86_VENDOR_NSC) &&
(current_cpu_data.x86_vendor != X86_VENDOR_CYRIX)) {
dprintk("error: no MediaGX/Geode processor found!\n");
- return NULL;
+ return NULL;
}
/* detect which companion chip is used */
while ((gx_pci = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, gx_pci)) != NULL) {
- if ((pci_match_id(gx_chipset_tbl, gx_pci)) != NULL)
+ if ((pci_match_id(gx_chipset_tbl, gx_pci)) != NULL) {
return gx_pci;
+ }
}
dprintk("error: no supported chipset found!\n");
@@ -199,24 +200,24 @@ static __init struct pci_dev *gx_detect_chipset(void)
}
/**
- * gx_get_cpuspeed:
+ * gx_get_cpuspeed:
*
* Finds out at which efficient frequency the Cyrix MediaGX/NatSemi Geode CPU runs.
*/
static unsigned int gx_get_cpuspeed(unsigned int cpu)
{
- if ((gx_params->pci_suscfg & SUSMOD) == 0)
+ if ((gx_params->pci_suscfg & SUSMOD) == 0)
return stock_freq;
- return (stock_freq * gx_params->off_duration)
+ return (stock_freq * gx_params->off_duration)
/ (gx_params->on_duration + gx_params->off_duration);
}
/**
* gx_validate_speed:
* determine current cpu speed
- *
- **/
+ *
+**/
static unsigned int gx_validate_speed(unsigned int khz, u8 *on_duration, u8 *off_duration)
{
@@ -229,7 +230,7 @@ static unsigned int gx_validate_speed(unsigned int khz, u8 *on_duration, u8 *off
*on_duration=0;
for (i=max_duration; i>0; i--) {
- tmp_off = ((khz * i) / stock_freq) & 0xff;
+ tmp_off = ((khz * i) / stock_freq) & 0xff;
tmp_on = i - tmp_off;
tmp_freq = (stock_freq * tmp_off) / i;
/* if this relation is closer to khz, use this. If it's equal,
@@ -246,17 +247,18 @@ static unsigned int gx_validate_speed(unsigned int khz, u8 *on_duration, u8 *off
/**
- * gx_set_cpuspeed:
- * set cpu speed in khz.
+ * gx_set_cpuspeed:
+ * set cpu speed in khz.
**/
static void gx_set_cpuspeed(unsigned int khz)
{
- u8 suscfg, pmer1;
+ u8 suscfg, pmer1;
unsigned int new_khz;
unsigned long flags;
struct cpufreq_freqs freqs;
+
freqs.cpu = 0;
freqs.old = gx_get_cpuspeed(0);
@@ -301,18 +303,18 @@ static void gx_set_cpuspeed(unsigned int khz)
pci_write_config_byte(gx_params->cs55x0, PCI_MODOFF, gx_params->off_duration);
pci_write_config_byte(gx_params->cs55x0, PCI_MODON, gx_params->on_duration);
- pci_write_config_byte(gx_params->cs55x0, PCI_SUSCFG, suscfg);
- pci_read_config_byte(gx_params->cs55x0, PCI_SUSCFG, &suscfg);
+ pci_write_config_byte(gx_params->cs55x0, PCI_SUSCFG, suscfg);
+ pci_read_config_byte(gx_params->cs55x0, PCI_SUSCFG, &suscfg);
- local_irq_restore(flags);
+ local_irq_restore(flags);
gx_params->pci_suscfg = suscfg;
cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
- dprintk("suspend modulation w/ duration of ON:%d us, OFF:%d us\n",
- gx_params->on_duration * 32, gx_params->off_duration * 32);
- dprintk("suspend modulation w/ clock speed: %d kHz.\n", freqs.new);
+ dprintk("suspend modulation w/ duration of ON:%d us, OFF:%d us\n",
+ gx_params->on_duration * 32, gx_params->off_duration * 32);
+ dprintk("suspend modulation w/ clock speed: %d kHz.\n", freqs.new);
}
/****************************************************************
@@ -320,10 +322,10 @@ static void gx_set_cpuspeed(unsigned int khz)
****************************************************************/
/*
- * cpufreq_gx_verify: test if frequency range is valid
+ * cpufreq_gx_verify: test if frequency range is valid
*
- * This function checks if a given frequency range in kHz is valid
- * for the hardware supported by the driver.
+ * This function checks if a given frequency range in kHz is valid
+ * for the hardware supported by the driver.
*/
static int cpufreq_gx_verify(struct cpufreq_policy *policy)
@@ -331,8 +333,8 @@ static int cpufreq_gx_verify(struct cpufreq_policy *policy)
unsigned int tmp_freq = 0;
u8 tmp1, tmp2;
- if (!stock_freq || !policy)
- return -EINVAL;
+ if (!stock_freq || !policy)
+ return -EINVAL;
policy->cpu = 0;
cpufreq_verify_within_limits(policy, (stock_freq / max_duration), stock_freq);
@@ -340,14 +342,14 @@ static int cpufreq_gx_verify(struct cpufreq_policy *policy)
/* it needs to be assured that at least one supported frequency is
* within policy->min and policy->max. If it is not, policy->max
* needs to be increased until one freuqency is supported.
- * policy->min may not be decreased, though. This way we guarantee a
+ * policy->min may not be decreased, though. This way we guarantee a
* specific processing capacity.
*/
tmp_freq = gx_validate_speed(policy->min, &tmp1, &tmp2);
- if (tmp_freq < policy->min)
+ if (tmp_freq < policy->min)
tmp_freq += stock_freq / max_duration;
policy->min = tmp_freq;
- if (policy->min > policy->max)
+ if (policy->min > policy->max)
policy->max = tmp_freq;
tmp_freq = gx_validate_speed(policy->max, &tmp1, &tmp2);
if (tmp_freq > policy->max)
@@ -356,12 +358,12 @@ static int cpufreq_gx_verify(struct cpufreq_policy *policy)
if (policy->max < policy->min)
policy->max = policy->min;
cpufreq_verify_within_limits(policy, (stock_freq / max_duration), stock_freq);
-
+
return 0;
}
/*
- * cpufreq_gx_target:
+ * cpufreq_gx_target:
*
*/
static int cpufreq_gx_target(struct cpufreq_policy *policy,
@@ -371,8 +373,8 @@ static int cpufreq_gx_target(struct cpufreq_policy *policy,
u8 tmp1, tmp2;
unsigned int tmp_freq;
- if (!stock_freq || !policy)
- return -EINVAL;
+ if (!stock_freq || !policy)
+ return -EINVAL;
policy->cpu = 0;
@@ -429,7 +431,7 @@ static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy)
return 0;
}
-/*
+/*
* cpufreq_gx_init:
* MediaGX/Geode GX initialize cpufreq driver
*/
@@ -450,7 +452,7 @@ static int __init cpufreq_gx_init(void)
u32 class_rev;
/* Test if we have the right hardware */
- if ((gx_pci = gx_detect_chipset()) == NULL)
+ if ((gx_pci = gx_detect_chipset()) == NULL)
return -ENODEV;
/* check whether module parameters are sane */
@@ -459,9 +461,10 @@ static int __init cpufreq_gx_init(void)
dprintk("geode suspend modulation available.\n");
- params = kzalloc(sizeof(struct gxfreq_params), GFP_KERNEL);
+ params = kmalloc(sizeof(struct gxfreq_params), GFP_KERNEL);
if (params == NULL)
return -ENOMEM;
+ memset(params, 0, sizeof(struct gxfreq_params));
params->cs55x0 = gx_pci;
gx_params = params;
@@ -475,7 +478,7 @@ static int __init cpufreq_gx_init(void)
pci_read_config_dword(params->cs55x0, PCI_CLASS_REVISION, &class_rev);
params->pci_rev = class_rev && 0xff;
- if ((ret = cpufreq_register_driver(&gx_suspmod_driver))) {
+ if ((ret = cpufreq_register_driver(&gx_suspmod_driver))) {
kfree(params);
return ret; /* register error! */
}
diff --git a/trunk/arch/i386/kernel/cpu/cpufreq/longhaul.h b/trunk/arch/i386/kernel/cpu/cpufreq/longhaul.h
index d3a95d77ee85..2a495c162ec7 100644
--- a/trunk/arch/i386/kernel/cpu/cpufreq/longhaul.h
+++ b/trunk/arch/i386/kernel/cpu/cpufreq/longhaul.h
@@ -234,7 +234,7 @@ static int __initdata ezrat_eblcr[32] = {
/*
* VIA C3 Nehemiah */
-
+
static int __initdata nehemiah_a_clock_ratio[32] = {
100, /* 0000 -> 10.0x */
160, /* 0001 -> 16.0x */
@@ -446,7 +446,7 @@ static int __initdata nehemiah_c_eblcr[32] = {
/* end of table */
};
-/*
+/*
* Voltage scales. Div/Mod by 1000 to get actual voltage.
* Which scale to use depends on the VRM type in use.
*/
diff --git a/trunk/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c b/trunk/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
index ab6504efd801..cc73a7ae34bc 100644
--- a/trunk/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
+++ b/trunk/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
@@ -14,7 +14,7 @@
* The author(s) of this software shall not be held liable for damages
* of any nature resulting due to the use of this software. This
* software is provided AS-IS with no warranties.
- *
+ *
* Date Errata Description
* 20020525 N44, O17 12.5% or 25% DC causes lockup
*
@@ -22,7 +22,7 @@
#include
#include
-#include
+#include
#include
#include
#include
@@ -30,7 +30,7 @@
#include
#include /* current / set_cpus_allowed() */
-#include
+#include
#include
#include
@@ -79,7 +79,7 @@ static int cpufreq_p4_setdc(unsigned int cpu, unsigned int newstate)
} else {
dprintk("CPU#%d setting duty cycle to %d%%\n",
cpu, ((125 * newstate) / 10));
- /* bits 63 - 5 : reserved
+ /* bits 63 - 5 : reserved
* bit 4 : enable/disable
* bits 3-1 : duty cycle
* bit 0 : reserved
@@ -132,7 +132,7 @@ static int cpufreq_p4_target(struct cpufreq_policy *policy,
}
/* run on each logical CPU, see section 13.15.3 of IA32 Intel Architecture Software
- * Developer's Manual, Volume 3
+ * Developer's Manual, Volume 3
*/
cpus_allowed = current->cpus_allowed;
@@ -206,7 +206,7 @@ static unsigned int cpufreq_p4_get_frequency(struct cpuinfo_x86 *c)
return speedstep_get_processor_frequency(SPEEDSTEP_PROCESSOR_P4D);
}
-
+
static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
{
@@ -234,7 +234,7 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
dprintk("has errata -- disabling frequencies lower than 2ghz\n");
break;
}
-
+
/* get max frequency */
stock_freq = cpufreq_p4_get_frequency(c);
if (!stock_freq)
@@ -244,13 +244,13 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
for (i=1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) {
if ((i<2) && (has_N44_O17_errata[policy->cpu]))
p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID;
- else if (has_N60_errata[policy->cpu] && ((stock_freq * i)/8) < 2000000)
+ else if (has_N60_errata[policy->cpu] && p4clockmod_table[i].frequency < 2000000)
p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID;
else
p4clockmod_table[i].frequency = (stock_freq * i)/8;
}
cpufreq_frequency_table_get_attr(p4clockmod_table, policy->cpu);
-
+
/* cpuinfo and default policy values */
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.transition_latency = 1000000; /* assumed */
@@ -262,7 +262,7 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
static int cpufreq_p4_cpu_exit(struct cpufreq_policy *policy)
{
- cpufreq_frequency_table_put_attr(policy->cpu);
+ cpufreq_frequency_table_put_attr(policy->cpu);
return 0;
}
@@ -298,7 +298,7 @@ static struct freq_attr* p4clockmod_attr[] = {
};
static struct cpufreq_driver p4clockmod_driver = {
- .verify = cpufreq_p4_verify,
+ .verify = cpufreq_p4_verify,
.target = cpufreq_p4_target,
.init = cpufreq_p4_cpu_init,
.exit = cpufreq_p4_cpu_exit,
@@ -310,12 +310,12 @@ static struct cpufreq_driver p4clockmod_driver = {
static int __init cpufreq_p4_init(void)
-{
+{
struct cpuinfo_x86 *c = cpu_data;
int ret;
/*
- * THERM_CONTROL is architectural for IA32 now, so
+ * THERM_CONTROL is architectural for IA32 now, so
* we can rely on the capability checks
*/
if (c->x86_vendor != X86_VENDOR_INTEL)
diff --git a/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k6.c b/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k6.c
index f89524051e4a..222f8cfe3c57 100644
--- a/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k6.c
+++ b/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k6.c
@@ -8,7 +8,7 @@
*/
#include
-#include
+#include
#include
#include
#include
@@ -50,7 +50,7 @@ static int powernow_k6_get_cpu_multiplier(void)
{
u64 invalue = 0;
u32 msrval;
-
+
msrval = POWERNOW_IOPORT + 0x1;
wrmsr(MSR_K6_EPMR, msrval, 0); /* enable the PowerNow port */
invalue=inl(POWERNOW_IOPORT + 0x8);
@@ -81,7 +81,7 @@ static void powernow_k6_set_state (unsigned int best_i)
freqs.old = busfreq * powernow_k6_get_cpu_multiplier();
freqs.new = busfreq * clock_ratio[best_i].index;
freqs.cpu = 0; /* powernow-k6.c is UP only driver */
-
+
cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
/* we now need to transform best_i to the BVC format, see AMD#23446 */
@@ -152,7 +152,7 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy)
busfreq = cpu_khz / max_multiplier;
/* table init */
- for (i=0; (clock_ratio[i].frequency != CPUFREQ_TABLE_END); i++) {
+ for (i=0; (clock_ratio[i].frequency != CPUFREQ_TABLE_END); i++) {
if (clock_ratio[i].index > max_multiplier)
clock_ratio[i].frequency = CPUFREQ_ENTRY_INVALID;
else
@@ -182,7 +182,7 @@ static int powernow_k6_cpu_exit(struct cpufreq_policy *policy)
powernow_k6_set_state(i);
}
cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
+ return 0;
}
static unsigned int powernow_k6_get(unsigned int cpu)
@@ -196,8 +196,8 @@ static struct freq_attr* powernow_k6_attr[] = {
};
static struct cpufreq_driver powernow_k6_driver = {
- .verify = powernow_k6_verify,
- .target = powernow_k6_target,
+ .verify = powernow_k6_verify,
+ .target = powernow_k6_target,
.init = powernow_k6_cpu_init,
.exit = powernow_k6_cpu_exit,
.get = powernow_k6_get,
@@ -215,7 +215,7 @@ static struct cpufreq_driver powernow_k6_driver = {
* on success.
*/
static int __init powernow_k6_init(void)
-{
+{
struct cpuinfo_x86 *c = cpu_data;
if ((c->x86_vendor != X86_VENDOR_AMD) || (c->x86 != 5) ||
diff --git a/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k7.c b/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
index 2bf4237cb94e..edcd626001da 100644
--- a/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
+++ b/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
@@ -199,8 +199,8 @@ static int get_ranges (unsigned char *pst)
powernow_table[j].index |= (vid << 8); /* upper 8 bits */
dprintk (" FID: 0x%x (%d.%dx [%dMHz]) "
- "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10,
- fid_codes[fid] % 10, speed/1000, vid,
+ "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10,
+ fid_codes[fid] % 10, speed/1000, vid,
mobile_vid_table[vid]/1000,
mobile_vid_table[vid]%1000);
}
@@ -368,8 +368,8 @@ static int powernow_acpi_init(void)
}
dprintk (" FID: 0x%x (%d.%dx [%dMHz]) "
- "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10,
- fid_codes[fid] % 10, speed/1000, vid,
+ "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10,
+ fid_codes[fid] % 10, speed/1000, vid,
mobile_vid_table[vid]/1000,
mobile_vid_table[vid]%1000);
@@ -460,7 +460,7 @@ static int powernow_decode_bios (int maxfid, int startvid)
(maxfid==pst->maxfid) && (startvid==pst->startvid))
{
dprintk ("PST:%d (@%p)\n", i, pst);
- dprintk (" cpuid: 0x%x fsb: %d maxFID: 0x%x startvid: 0x%x\n",
+ dprintk (" cpuid: 0x%x fsb: %d maxFID: 0x%x startvid: 0x%x\n",
pst->cpuid, pst->fsbspeed, pst->maxfid, pst->startvid);
ret = get_ranges ((char *) pst + sizeof (struct pst_s));
diff --git a/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
index e5bc06480ff9..e11a09207ec8 100644
--- a/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+++ b/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -45,7 +45,7 @@
#define PFX "powernow-k8: "
#define BFX PFX "BIOS error: "
-#define VERSION "version 1.60.1"
+#define VERSION "version 1.60.0"
#include "powernow-k8.h"
/* serialize freq changes */
@@ -54,7 +54,7 @@ static DECLARE_MUTEX(fidvid_sem);
static struct powernow_k8_data *powernow_data[NR_CPUS];
#ifndef CONFIG_SMP
-static cpumask_t cpu_core_map[1] = { CPU_MASK_ALL };
+static cpumask_t cpu_core_map[1];
#endif
/* Return a frequency in MHz, given an input fid */
@@ -83,10 +83,11 @@ static u32 find_millivolts_from_vid(struct powernow_k8_data *data, u32 vid)
*/
static u32 convert_fid_to_vco_fid(u32 fid)
{
- if (fid < HI_FID_TABLE_BOTTOM)
+ if (fid < HI_FID_TABLE_BOTTOM) {
return 8 + (2 * fid);
- else
+ } else {
return fid;
+ }
}
/*
@@ -176,7 +177,7 @@ static int write_new_fid(struct powernow_k8_data *data, u32 fid)
if (i++ > 100) {
printk(KERN_ERR PFX "internal error - pending bit very stuck - no further pstate changes possible\n");
return 1;
- }
+ }
} while (query_current_values_with_pending_wait(data));
count_off_irt(data);
@@ -473,10 +474,8 @@ static int check_supported_cpu(unsigned int cpu)
goto out;
eax = cpuid_eax(CPUID_PROCESSOR_SIGNATURE);
- if ((eax & CPUID_XFAM) != CPUID_XFAM_K8)
- goto out;
-
if (((eax & CPUID_USE_XFAM_XMOD) != CPUID_USE_XFAM_XMOD) ||
+ ((eax & CPUID_XFAM) != CPUID_XFAM_K8) ||
((eax & CPUID_XMOD) > CPUID_XMOD_REV_G)) {
printk(KERN_INFO PFX "Processor cpuid %x not supported\n", eax);
goto out;
@@ -781,7 +780,9 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
/* verify only 1 entry from the lo frequency table */
if (fid < HI_FID_TABLE_BOTTOM) {
if (cntlofreq) {
- /* if both entries are the same, ignore this one ... */
+ /* if both entries are the same, ignore this
+ * one...
+ */
if ((powernow_table[i].frequency != powernow_table[cntlofreq].frequency) ||
(powernow_table[i].index != powernow_table[cntlofreq].index)) {
printk(KERN_ERR PFX "Too many lo freq table entries\n");
@@ -853,7 +854,7 @@ static int transition_frequency(struct powernow_k8_data *data, unsigned int inde
dprintk("cpu %d transition to index %u\n", smp_processor_id(), index);
/* fid are the lower 8 bits of the index we stored into
- * the cpufreq frequency table in find_psb_table, vid are
+ * the cpufreq frequency table in find_psb_table, vid are
* the upper 8 bits.
*/
@@ -908,6 +909,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
u32 checkvid = data->currvid;
unsigned int newstate;
int ret = -EIO;
+ int i;
/* only run on specific CPU from here on */
oldmask = current->cpus_allowed;
@@ -953,6 +955,12 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
up(&fidvid_sem);
goto err_out;
}
+
+ /* Update all the fid/vids of our siblings */
+ for_each_cpu_mask(i, cpu_core_map[pol->cpu]) {
+ powernow_data[i]->currvid = data->currvid;
+ powernow_data[i]->currfid = data->currfid;
+ }
up(&fidvid_sem);
pol->cur = find_khz_freq_from_fid(data->currfid);
@@ -1040,7 +1048,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
pol->governor = CPUFREQ_DEFAULT_GOVERNOR;
pol->cpus = cpu_core_map[pol->cpu];
- /* Take a crude guess here.
+ /* Take a crude guess here.
* That guess was in microseconds, so multiply with 1000 */
pol->cpuinfo.transition_latency = (((data->rvo + 8) * data->vstable * VST_UNITS_20US)
+ (3 * (1 << data->irt) * 10)) * 1000;
@@ -1062,8 +1070,9 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
printk("cpu_init done, current fid 0x%x, vid 0x%x\n",
data->currfid, data->currvid);
- for_each_cpu_mask(i, cpu_core_map[pol->cpu])
+ for_each_cpu_mask(i, cpu_core_map[pol->cpu]) {
powernow_data[i] = data;
+ }
return 0;
@@ -1136,14 +1145,16 @@ static int __cpuinit powernowk8_init(void)
{
unsigned int i, supported_cpus = 0;
- for_each_online_cpu(i) {
+ for (i=0; icpu];
/* Only Intel makes Enhanced Speedstep-capable CPUs */
if (cpu->x86_vendor != X86_VENDOR_INTEL || !cpu_has(cpu, X86_FEATURE_EST))
return -ENODEV;
- if (cpu_has(cpu, X86_FEATURE_CONSTANT_TSC))
+ if (cpu_has(c, X86_FEATURE_CONSTANT_TSC)) {
centrino_driver.flags |= CPUFREQ_CONST_LOOPS;
+ }
if (centrino_cpu_init_acpi(policy)) {
if (policy->cpu != 0)
diff --git a/trunk/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c b/trunk/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c
index 4f46cac155c4..7c47005a1805 100644
--- a/trunk/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c
+++ b/trunk/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c
@@ -9,7 +9,7 @@
*/
#include
-#include
+#include
#include
#include
#include
@@ -36,8 +36,8 @@ static unsigned int pentium3_get_frequency (unsigned int processor)
/* See table 14 of p3_ds.pdf and table 22 of 29834003.pdf */
struct {
unsigned int ratio; /* Frequency Multiplier (x10) */
- u8 bitmap; /* power on configuration bits
- [27, 25:22] (in MSR 0x2a) */
+ u8 bitmap; /* power on configuration bits
+ [27, 25:22] (in MSR 0x2a) */
} msr_decode_mult [] = {
{ 30, 0x01 },
{ 35, 0x05 },
@@ -58,9 +58,9 @@ static unsigned int pentium3_get_frequency (unsigned int processor)
/* PIII(-M) FSB settings: see table b1-b of 24547206.pdf */
struct {
- unsigned int value; /* Front Side Bus speed in MHz */
- u8 bitmap; /* power on configuration bits [18: 19]
- (in MSR 0x2a) */
+ unsigned int value; /* Front Side Bus speed in MHz */
+ u8 bitmap; /* power on configuration bits [18: 19]
+ (in MSR 0x2a) */
} msr_decode_fsb [] = {
{ 66, 0x0 },
{ 100, 0x2 },
@@ -68,8 +68,8 @@ static unsigned int pentium3_get_frequency (unsigned int processor)
{ 0, 0xff}
};
- u32 msr_lo, msr_tmp;
- int i = 0, j = 0;
+ u32 msr_lo, msr_tmp;
+ int i = 0, j = 0;
/* read MSR 0x2a - we only need the low 32 bits */
rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp);
@@ -106,7 +106,7 @@ static unsigned int pentium3_get_frequency (unsigned int processor)
static unsigned int pentiumM_get_frequency(void)
{
- u32 msr_lo, msr_tmp;
+ u32 msr_lo, msr_tmp;
rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp);
dprintk("PM - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", msr_lo, msr_tmp);
@@ -134,7 +134,7 @@ static unsigned int pentium4_get_frequency(void)
dprintk("P4 - MSR_EBC_FREQUENCY_ID: 0x%x 0x%x\n", msr_lo, msr_hi);
- /* decode the FSB: see IA-32 Intel (C) Architecture Software
+ /* decode the FSB: see IA-32 Intel (C) Architecture Software
* Developer's Manual, Volume 3: System Prgramming Guide,
* revision #12 in Table B-1: MSRs in the Pentium 4 and
* Intel Xeon Processors, on page B-4 and B-5.
@@ -170,7 +170,7 @@ static unsigned int pentium4_get_frequency(void)
return (fsb * mult);
}
-
+
unsigned int speedstep_get_processor_frequency(unsigned int processor)
{
switch (processor) {
@@ -198,11 +198,11 @@ EXPORT_SYMBOL_GPL(speedstep_get_processor_frequency);
unsigned int speedstep_detect_processor (void)
{
struct cpuinfo_x86 *c = cpu_data;
- u32 ebx, msr_lo, msr_hi;
+ u32 ebx, msr_lo, msr_hi;
dprintk("x86: %x, model: %x\n", c->x86, c->x86_model);
- if ((c->x86_vendor != X86_VENDOR_INTEL) ||
+ if ((c->x86_vendor != X86_VENDOR_INTEL) ||
((c->x86 != 6) && (c->x86 != 0xF)))
return 0;
@@ -218,15 +218,15 @@ unsigned int speedstep_detect_processor (void)
dprintk("ebx value is %x, x86_mask is %x\n", ebx, c->x86_mask);
switch (c->x86_mask) {
- case 4:
+ case 4:
/*
- * B-stepping [M-P4-M]
+ * B-stepping [M-P4-M]
* sample has ebx = 0x0f, production has 0x0e.
*/
if ((ebx == 0x0e) || (ebx == 0x0f))
return SPEEDSTEP_PROCESSOR_P4M;
break;
- case 7:
+ case 7:
/*
* C-stepping [M-P4-M]
* needs to have ebx=0x0e, else it's a celeron:
@@ -253,7 +253,7 @@ unsigned int speedstep_detect_processor (void)
* also, M-P4M HTs have ebx=0x8, too
* For now, they are distinguished by the model_id string
*/
- if ((ebx == 0x0e) || (strstr(c->x86_model_id,"Mobile Intel(R) Pentium(R) 4") != NULL))
+ if ((ebx == 0x0e) || (strstr(c->x86_model_id,"Mobile Intel(R) Pentium(R) 4") != NULL))
return SPEEDSTEP_PROCESSOR_P4M;
break;
default:
@@ -264,7 +264,8 @@ unsigned int speedstep_detect_processor (void)
switch (c->x86_model) {
case 0x0B: /* Intel PIII [Tualatin] */
- /* cpuid_ebx(1) is 0x04 for desktop PIII, 0x06 for mobile PIII-M */
+ /* cpuid_ebx(1) is 0x04 for desktop PIII,
+ 0x06 for mobile PIII-M */
ebx = cpuid_ebx(0x00000001);
dprintk("ebx is %x\n", ebx);
@@ -274,8 +275,9 @@ unsigned int speedstep_detect_processor (void)
return 0;
/* So far all PIII-M processors support SpeedStep. See
- * Intel's 24540640.pdf of June 2003
+ * Intel's 24540640.pdf of June 2003
*/
+
return SPEEDSTEP_PROCESSOR_PIII_T;
case 0x08: /* Intel PIII [Coppermine] */
@@ -397,7 +399,7 @@ unsigned int speedstep_get_freqs(unsigned int processor,
}
}
-out:
+ out:
local_irq_restore(flags);
return (ret);
}
diff --git a/trunk/arch/i386/kernel/cpu/cpufreq/speedstep-lib.h b/trunk/arch/i386/kernel/cpu/cpufreq/speedstep-lib.h
index b735429c50b4..6a727fd3a77e 100644
--- a/trunk/arch/i386/kernel/cpu/cpufreq/speedstep-lib.h
+++ b/trunk/arch/i386/kernel/cpu/cpufreq/speedstep-lib.h
@@ -14,7 +14,7 @@
#define SPEEDSTEP_PROCESSOR_PIII_C_EARLY 0x00000001 /* Coppermine core */
#define SPEEDSTEP_PROCESSOR_PIII_C 0x00000002 /* Coppermine core */
-#define SPEEDSTEP_PROCESSOR_PIII_T 0x00000003 /* Tualatin core */
+#define SPEEDSTEP_PROCESSOR_PIII_T 0x00000003 /* Tualatin core */
#define SPEEDSTEP_PROCESSOR_P4M 0x00000004 /* P4-M */
/* the following processors are not speedstep-capable and are not auto-detected
@@ -25,8 +25,8 @@
/* speedstep states -- only two of them */
-#define SPEEDSTEP_HIGH 0x00000000
-#define SPEEDSTEP_LOW 0x00000001
+#define SPEEDSTEP_HIGH 0x00000000
+#define SPEEDSTEP_LOW 0x00000001
/* detect a speedstep-capable processor */
@@ -36,13 +36,13 @@ extern unsigned int speedstep_detect_processor (void);
extern unsigned int speedstep_get_processor_frequency(unsigned int processor);
-/* detect the low and high speeds of the processor. The callback
- * set_state"'s first argument is either SPEEDSTEP_HIGH or
- * SPEEDSTEP_LOW; the second argument is zero so that no
+/* detect the low and high speeds of the processor. The callback
+ * set_state"'s first argument is either SPEEDSTEP_HIGH or
+ * SPEEDSTEP_LOW; the second argument is zero so that no
* cpufreq_notify_transition calls are initiated.
*/
extern unsigned int speedstep_get_freqs(unsigned int processor,
- unsigned int *low_speed,
- unsigned int *high_speed,
- unsigned int *transition_latency,
- void (*set_state) (unsigned int state));
+ unsigned int *low_speed,
+ unsigned int *high_speed,
+ unsigned int *transition_latency,
+ void (*set_state) (unsigned int state));
diff --git a/trunk/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c b/trunk/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
index c28333d53646..28cc5d524afc 100644
--- a/trunk/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
+++ b/trunk/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
@@ -13,8 +13,8 @@
*********************************************************************/
#include
-#include
-#include
+#include
+#include
#include
#include
#include
@@ -28,21 +28,21 @@
*
* These parameters are got from IST-SMI BIOS call.
* If user gives it, these are used.
- *
+ *
*/
-static int smi_port = 0;
-static int smi_cmd = 0;
-static unsigned int smi_sig = 0;
+static int smi_port = 0;
+static int smi_cmd = 0;
+static unsigned int smi_sig = 0;
/* info about the processor */
-static unsigned int speedstep_processor = 0;
+static unsigned int speedstep_processor = 0;
-/*
- * There are only two frequency states for each processor. Values
+/*
+ * There are only two frequency states for each processor. Values
* are in kHz for the time being.
*/
static struct cpufreq_frequency_table speedstep_freqs[] = {
- {SPEEDSTEP_HIGH, 0},
+ {SPEEDSTEP_HIGH, 0},
{SPEEDSTEP_LOW, 0},
{0, CPUFREQ_TABLE_END},
};
@@ -75,9 +75,7 @@ static int speedstep_smi_ownership (void)
__asm__ __volatile__(
"out %%al, (%%dx)\n"
: "=D" (result)
- : "a" (command), "b" (function), "c" (0), "d" (smi_port),
- "D" (0), "S" (magic)
- : "memory"
+ : "a" (command), "b" (function), "c" (0), "d" (smi_port), "D" (0), "S" (magic)
);
dprintk("result is %x\n", result);
@@ -125,7 +123,7 @@ static int speedstep_smi_get_freqs (unsigned int *low, unsigned int *high)
*low = low_mhz * 1000;
return result;
-}
+}
/**
* speedstep_get_state - set the SpeedStep state
@@ -206,7 +204,7 @@ static void speedstep_set_state (unsigned int state)
* speedstep_target - set a new CPUFreq policy
* @policy: new policy
* @target_freq: new freq
- * @relation:
+ * @relation:
*
* Sets a new CPUFreq policy/freq.
*/
@@ -285,7 +283,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
state = speedstep_get_state();
speed = speedstep_freqs[state].frequency;
- dprintk("currently at %s speed setting - %i MHz\n",
+ dprintk("currently at %s speed setting - %i MHz\n",
(speed == speedstep_freqs[SPEEDSTEP_LOW].frequency) ? "low" : "high",
(speed / 1000));
@@ -298,7 +296,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
if (result)
return (result);
- cpufreq_frequency_table_get_attr(speedstep_freqs, policy->cpu);
+ cpufreq_frequency_table_get_attr(speedstep_freqs, policy->cpu);
return 0;
}
@@ -334,8 +332,8 @@ static struct freq_attr* speedstep_attr[] = {
static struct cpufreq_driver speedstep_driver = {
.name = "speedstep-smi",
- .verify = speedstep_verify,
- .target = speedstep_target,
+ .verify = speedstep_verify,
+ .target = speedstep_target,
.init = speedstep_cpu_init,
.exit = speedstep_cpu_exit,
.get = speedstep_get,
@@ -372,12 +370,13 @@ static int __init speedstep_init(void)
return -ENODEV;
}
- dprintk("signature:0x%.8lx, command:0x%.8lx, event:0x%.8lx, perf_level:0x%.8lx.\n",
+ dprintk("signature:0x%.8lx, command:0x%.8lx, event:0x%.8lx, perf_level:0x%.8lx.\n",
ist_info.signature, ist_info.command, ist_info.event, ist_info.perf_level);
- /* Error if no IST-SMI BIOS or no PARM
+
+ /* Error if no IST-SMI BIOS or no PARM
sig= 'ISGE' aka 'Intel Speedstep Gate E' */
- if ((ist_info.signature != 0x47534943) && (
+ if ((ist_info.signature != 0x47534943) && (
(smi_port == 0) || (smi_cmd == 0)))
return -ENODEV;
@@ -387,15 +386,17 @@ static int __init speedstep_init(void)
smi_sig = ist_info.signature;
/* setup smi_port from MODLULE_PARM or BIOS */
- if ((smi_port > 0xff) || (smi_port < 0))
+ if ((smi_port > 0xff) || (smi_port < 0)) {
return -EINVAL;
- else if (smi_port == 0)
+ } else if (smi_port == 0) {
smi_port = ist_info.command & 0xff;
+ }
- if ((smi_cmd > 0xff) || (smi_cmd < 0))
+ if ((smi_cmd > 0xff) || (smi_cmd < 0)) {
return -EINVAL;
- else if (smi_cmd == 0)
+ } else if (smi_cmd == 0) {
smi_cmd = (ist_info.command >> 16) & 0xff;
+ }
return cpufreq_register_driver(&speedstep_driver);
}
diff --git a/trunk/arch/i386/kernel/cpu/intel.c b/trunk/arch/i386/kernel/cpu/intel.c
index 5386b29bb5a5..8c0120186b9f 100644
--- a/trunk/arch/i386/kernel/cpu/intel.c
+++ b/trunk/arch/i386/kernel/cpu/intel.c
@@ -29,7 +29,7 @@ extern int trap_init_f00f_bug(void);
struct movsl_mask movsl_mask __read_mostly;
#endif
-void __cpuinit early_intel_workaround(struct cpuinfo_x86 *c)
+void __devinit early_intel_workaround(struct cpuinfo_x86 *c)
{
if (c->x86_vendor != X86_VENDOR_INTEL)
return;
@@ -44,7 +44,7 @@ void __cpuinit early_intel_workaround(struct cpuinfo_x86 *c)
* This is called before we do cpu ident work
*/
-int __cpuinit ppro_with_ram_bug(void)
+int __devinit ppro_with_ram_bug(void)
{
/* Uses data from early_cpu_detect now */
if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
@@ -62,7 +62,7 @@ int __cpuinit ppro_with_ram_bug(void)
* P4 Xeon errata 037 workaround.
* Hardware prefetcher may cause stale data to be loaded into the cache.
*/
-static void __cpuinit Intel_errata_workarounds(struct cpuinfo_x86 *c)
+static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c)
{
unsigned long lo, hi;
@@ -81,7 +81,7 @@ static void __cpuinit Intel_errata_workarounds(struct cpuinfo_x86 *c)
/*
* find out the number of processor cores on the die
*/
-static int __cpuinit num_cpu_cores(struct cpuinfo_x86 *c)
+static int __devinit num_cpu_cores(struct cpuinfo_x86 *c)
{
unsigned int eax, ebx, ecx, edx;
@@ -96,7 +96,7 @@ static int __cpuinit num_cpu_cores(struct cpuinfo_x86 *c)
return 1;
}
-static void __cpuinit init_intel(struct cpuinfo_x86 *c)
+static void __devinit init_intel(struct cpuinfo_x86 *c)
{
unsigned int l2 = 0;
char *p = NULL;
@@ -205,7 +205,7 @@ static unsigned int intel_size_cache(struct cpuinfo_x86 * c, unsigned int size)
return size;
}
-static struct cpu_dev intel_cpu_dev __cpuinitdata = {
+static struct cpu_dev intel_cpu_dev __devinitdata = {
.c_vendor = "Intel",
.c_ident = { "GenuineIntel" },
.c_models = {
diff --git a/trunk/arch/i386/kernel/cpu/intel_cacheinfo.c b/trunk/arch/i386/kernel/cpu/intel_cacheinfo.c
index ce61921369e5..ffe58cee0c48 100644
--- a/trunk/arch/i386/kernel/cpu/intel_cacheinfo.c
+++ b/trunk/arch/i386/kernel/cpu/intel_cacheinfo.c
@@ -174,7 +174,7 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c)
unsigned int new_l1d = 0, new_l1i = 0; /* Cache sizes from cpuid(4) */
unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */
- if (c->cpuid_level > 3) {
+ if (c->cpuid_level > 4) {
static int is_initialized;
if (is_initialized == 0) {
@@ -330,7 +330,7 @@ static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index)
}
}
}
-static void __cpuinit cache_remove_shared_cpu_map(unsigned int cpu, int index)
+static void __devinit cache_remove_shared_cpu_map(unsigned int cpu, int index)
{
struct _cpuid4_info *this_leaf, *sibling_leaf;
int sibling;
diff --git a/trunk/arch/i386/kernel/cpu/proc.c b/trunk/arch/i386/kernel/cpu/proc.c
index f94cdb7aca50..89a85af33d28 100644
--- a/trunk/arch/i386/kernel/cpu/proc.c
+++ b/trunk/arch/i386/kernel/cpu/proc.c
@@ -40,12 +40,12 @@ static int show_cpuinfo(struct seq_file *m, void *v)
/* Other (Linux-defined) */
"cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr",
NULL, NULL, NULL, NULL,
- "constant_tsc", "up", NULL, NULL, NULL, NULL, NULL, NULL,
+ "constant_tsc", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
/* Intel-defined (#2) */
- "pni", NULL, NULL, "monitor", "ds_cpl", "vmx", "smx", "est",
+ "pni", NULL, NULL, "monitor", "ds_cpl", "vmx", NULL, "est",
"tm2", NULL, "cid", NULL, NULL, "cx16", "xtpr", NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
diff --git a/trunk/arch/i386/kernel/crash.c b/trunk/arch/i386/kernel/crash.c
index e3c5fca0aa8a..d49dbe8dc96b 100644
--- a/trunk/arch/i386/kernel/crash.c
+++ b/trunk/arch/i386/kernel/crash.c
@@ -105,7 +105,7 @@ static int crash_nmi_callback(struct pt_regs *regs, int cpu)
return 1;
local_irq_disable();
- if (!user_mode_vm(regs)) {
+ if (!user_mode(regs)) {
crash_fixup_ss_esp(&fixed_regs, regs);
regs = &fixed_regs;
}
diff --git a/trunk/arch/i386/kernel/dmi_scan.c b/trunk/arch/i386/kernel/dmi_scan.c
index ebc8dc116c43..6a93d75db431 100644
--- a/trunk/arch/i386/kernel/dmi_scan.c
+++ b/trunk/arch/i386/kernel/dmi_scan.c
@@ -5,7 +5,6 @@
#include
#include
#include
-#include
static char * __init dmi_string(struct dmi_header *dm, u8 s)
{
@@ -107,7 +106,7 @@ static void __init dmi_save_devices(struct dmi_header *dm)
struct dmi_device *dev;
for (i = 0; i < count; i++) {
- char *d = (char *)(dm + 1) + (i * 2);
+ char *d = ((char *) dm) + (i * 2);
/* Skip disabled device */
if ((*d & 0x80) == 0)
@@ -300,33 +299,3 @@ struct dmi_device * dmi_find_device(int type, const char *name,
return NULL;
}
EXPORT_SYMBOL(dmi_find_device);
-
-/**
- * dmi_get_year - Return year of a DMI date
- * @field: data index (like dmi_get_system_info)
- *
- * Returns -1 when the field doesn't exist. 0 when it is broken.
- */
-int dmi_get_year(int field)
-{
- int year;
- char *s = dmi_get_system_info(field);
-
- if (!s)
- return -1;
- if (*s == '\0')
- return 0;
- s = strrchr(s, '/');
- if (!s)
- return 0;
-
- s += 1;
- year = simple_strtoul(s, NULL, 0);
- if (year && year < 100) { /* 2-digit year */
- year += 1900;
- if (year < 1996) /* no dates < spec 1.0 */
- year += 100;
- }
-
- return year;
-}
diff --git a/trunk/arch/i386/kernel/efi.c b/trunk/arch/i386/kernel/efi.c
index 7ec6cfa01fb3..aeabb4196861 100644
--- a/trunk/arch/i386/kernel/efi.c
+++ b/trunk/arch/i386/kernel/efi.c
@@ -543,7 +543,7 @@ efi_initialize_iomem_resources(struct resource *code_resource,
if ((md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT)) >
0x100000000ULL)
continue;
- res = kzalloc(sizeof(struct resource), GFP_ATOMIC);
+ res = alloc_bootmem_low(sizeof(struct resource));
switch (md->type) {
case EFI_RESERVED_TYPE:
res->name = "Reserved Memory";
diff --git a/trunk/arch/i386/kernel/entry.S b/trunk/arch/i386/kernel/entry.S
index cfc683f153b9..4d704724b2f5 100644
--- a/trunk/arch/i386/kernel/entry.S
+++ b/trunk/arch/i386/kernel/entry.S
@@ -226,10 +226,6 @@ ENTRY(system_call)
pushl %eax # save orig_eax
SAVE_ALL
GET_THREAD_INFO(%ebp)
- testl $TF_MASK,EFLAGS(%esp)
- jz no_singlestep
- orl $_TIF_SINGLESTEP,TI_flags(%ebp)
-no_singlestep:
# system call tracing in operation / emulation
/* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
testw $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
diff --git a/trunk/arch/i386/kernel/head.S b/trunk/arch/i386/kernel/head.S
index 3debc2e26542..e0b7c632efbc 100644
--- a/trunk/arch/i386/kernel/head.S
+++ b/trunk/arch/i386/kernel/head.S
@@ -450,6 +450,7 @@ int_msg:
.globl boot_gdt_descr
.globl idt_descr
+.globl cpu_gdt_descr
ALIGN
# early boot GDT descriptor (must use 1:1 address mapping)
@@ -469,6 +470,8 @@ cpu_gdt_descr:
.word GDT_ENTRIES*8-1
.long cpu_gdt_table
+ .fill NR_CPUS-1,8,0 # space for the other GDT descriptors
+
/*
* The boot_gdt_table must mirror the equivalent in setup.S and is
* used only for booting.
@@ -482,7 +485,7 @@ ENTRY(boot_gdt_table)
/*
* The Global Descriptor Table contains 28 quadwords, per-CPU.
*/
- .align L1_CACHE_BYTES
+ .align PAGE_SIZE_asm
ENTRY(cpu_gdt_table)
.quad 0x0000000000000000 /* NULL descriptor */
.quad 0x0000000000000000 /* 0x0b reserved */
diff --git a/trunk/arch/i386/kernel/io_apic.c b/trunk/arch/i386/kernel/io_apic.c
index 311b4e7266f1..39d9a5fa907e 100644
--- a/trunk/arch/i386/kernel/io_apic.c
+++ b/trunk/arch/i386/kernel/io_apic.c
@@ -351,8 +351,8 @@ static inline void rotate_irqs_among_cpus(unsigned long useful_load_threshold)
{
int i, j;
Dprintk("Rotating IRQs among CPUs.\n");
- for_each_online_cpu(i) {
- for (j = 0; j < NR_IRQS; j++) {
+ for (i = 0; i < NR_CPUS; i++) {
+ for (j = 0; cpu_online(i) && (j < NR_IRQS); j++) {
if (!irq_desc[j].action)
continue;
/* Is it a significant load ? */
@@ -381,7 +381,7 @@ static void do_irq_balance(void)
unsigned long imbalance = 0;
cpumask_t allowed_mask, target_cpu_mask, tmp;
- for_each_cpu(i) {
+ for (i = 0; i < NR_CPUS; i++) {
int package_index;
CPU_IRQ(i) = 0;
if (!cpu_online(i))
@@ -422,7 +422,9 @@ static void do_irq_balance(void)
}
}
/* Find the least loaded processor package */
- for_each_online_cpu(i) {
+ for (i = 0; i < NR_CPUS; i++) {
+ if (!cpu_online(i))
+ continue;
if (i != CPU_TO_PACKAGEINDEX(i))
continue;
if (min_cpu_irq > CPU_IRQ(i)) {
@@ -439,7 +441,9 @@ static void do_irq_balance(void)
*/
tmp_cpu_irq = 0;
tmp_loaded = -1;
- for_each_online_cpu(i) {
+ for (i = 0; i < NR_CPUS; i++) {
+ if (!cpu_online(i))
+ continue;
if (i != CPU_TO_PACKAGEINDEX(i))
continue;
if (max_cpu_irq <= CPU_IRQ(i))
@@ -615,7 +619,9 @@ static int __init balanced_irq_init(void)
if (smp_num_siblings > 1 && !cpus_empty(tmp))
physical_balance = 1;
- for_each_online_cpu(i) {
+ for (i = 0; i < NR_CPUS; i++) {
+ if (!cpu_online(i))
+ continue;
irq_cpu_data[i].irq_delta = kmalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL);
irq_cpu_data[i].last_irq = kmalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL);
if (irq_cpu_data[i].irq_delta == NULL || irq_cpu_data[i].last_irq == NULL) {
@@ -632,11 +638,9 @@ static int __init balanced_irq_init(void)
else
printk(KERN_ERR "balanced_irq_init: failed to spawn balanced_irq");
failed:
- for_each_cpu(i) {
+ for (i = 0; i < NR_CPUS; i++) {
kfree(irq_cpu_data[i].irq_delta);
- irq_cpu_data[i].irq_delta = NULL;
kfree(irq_cpu_data[i].last_irq);
- irq_cpu_data[i].last_irq = NULL;
}
return 0;
}
@@ -1757,8 +1761,7 @@ static void __init setup_ioapic_ids_from_mpc(void)
* Don't check I/O APIC IDs for xAPIC systems. They have
* no meaning without the serial APIC bus.
*/
- if (!(boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
- || APIC_XAPIC(apic_version[boot_cpu_physical_apicid]))
+ if (!(boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && boot_cpu_data.x86 < 15))
return;
/*
* This is broken; anything with a real cpu count has to
diff --git a/trunk/arch/i386/kernel/kprobes.c b/trunk/arch/i386/kernel/kprobes.c
index 7a59050242a7..694a13997637 100644
--- a/trunk/arch/i386/kernel/kprobes.c
+++ b/trunk/arch/i386/kernel/kprobes.c
@@ -84,9 +84,9 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p)
void __kprobes arch_remove_kprobe(struct kprobe *p)
{
- mutex_lock(&kprobe_mutex);
+ down(&kprobe_mutex);
free_insn_slot(p->ainsn.insn);
- mutex_unlock(&kprobe_mutex);
+ up(&kprobe_mutex);
}
static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb)
diff --git a/trunk/arch/i386/kernel/microcode.c b/trunk/arch/i386/kernel/microcode.c
index 55bc365b8753..5390b521aca0 100644
--- a/trunk/arch/i386/kernel/microcode.c
+++ b/trunk/arch/i386/kernel/microcode.c
@@ -202,6 +202,8 @@ static inline void mark_microcode_update (int cpu_num, microcode_header_t *mc_he
} else if (mc_header->rev == uci->rev) {
/* notify the caller of success on this cpu */
uci->err = MC_SUCCESS;
+ printk(KERN_ERR "microcode: CPU%d already at revision"
+ " 0x%x (current=0x%x)\n", cpu_num, mc_header->rev, uci->rev);
goto out;
}
@@ -367,6 +369,7 @@ static void do_update_one (void * unused)
struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num;
if (uci->mc == NULL) {
+ printk(KERN_INFO "microcode: No new microcode data for CPU%d\n", cpu_num);
return;
}
@@ -508,6 +511,7 @@ static int __init microcode_init (void)
static void __exit microcode_exit (void)
{
misc_deregister(µcode_dev);
+ printk(KERN_INFO "IA-32 Microcode Update Driver v" MICROCODE_VERSION " unregistered\n");
}
module_init(microcode_init)
diff --git a/trunk/arch/i386/kernel/module.c b/trunk/arch/i386/kernel/module.c
index 470cf97e7cd3..5149c8a621f0 100644
--- a/trunk/arch/i386/kernel/module.c
+++ b/trunk/arch/i386/kernel/module.c
@@ -104,38 +104,26 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
return -ENOEXEC;
}
+extern void apply_alternatives(void *start, void *end);
+
int module_finalize(const Elf_Ehdr *hdr,
const Elf_Shdr *sechdrs,
struct module *me)
{
- const Elf_Shdr *s, *text = NULL, *alt = NULL, *locks = NULL;
+ const Elf_Shdr *s;
char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
+ /* look for .altinstructions to patch */
for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) {
- if (!strcmp(".text", secstrings + s->sh_name))
- text = s;
- if (!strcmp(".altinstructions", secstrings + s->sh_name))
- alt = s;
- if (!strcmp(".smp_locks", secstrings + s->sh_name))
- locks= s;
- }
-
- if (alt) {
- /* patch .altinstructions */
- void *aseg = (void *)alt->sh_addr;
- apply_alternatives(aseg, aseg + alt->sh_size);
- }
- if (locks && text) {
- void *lseg = (void *)locks->sh_addr;
- void *tseg = (void *)text->sh_addr;
- alternatives_smp_module_add(me, me->name,
- lseg, lseg + locks->sh_size,
- tseg, tseg + text->sh_size);
- }
+ void *seg;
+ if (strcmp(".altinstructions", secstrings + s->sh_name))
+ continue;
+ seg = (void *)s->sh_addr;
+ apply_alternatives(seg, seg + s->sh_size);
+ }
return 0;
}
void module_arch_cleanup(struct module *mod)
{
- alternatives_smp_module_del(mod);
}
diff --git a/trunk/arch/i386/kernel/mpparse.c b/trunk/arch/i386/kernel/mpparse.c
index 8d8aa9d1796d..e6e2f43db85e 100644
--- a/trunk/arch/i386/kernel/mpparse.c
+++ b/trunk/arch/i386/kernel/mpparse.c
@@ -828,8 +828,6 @@ void __init find_smp_config (void)
smp_scan_config(address, 0x400);
}
-int es7000_plat;
-
/* --------------------------------------------------------------------------
ACPI-based MP Configuration
-------------------------------------------------------------------------- */
@@ -937,8 +935,7 @@ void __init mp_register_ioapic (
mp_ioapics[idx].mpc_apicaddr = address;
set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address);
- if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
- && !APIC_XAPIC(apic_version[boot_cpu_physical_apicid]))
+ if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 < 15))
tmpid = io_apic_get_unique_id(idx, id);
else
tmpid = id;
@@ -1014,6 +1011,8 @@ void __init mp_override_legacy_irq (
return;
}
+int es7000_plat;
+
void __init mp_config_acpi_legacy_irqs (void)
{
struct mpc_config_intsrc intsrc;
diff --git a/trunk/arch/i386/kernel/nmi.c b/trunk/arch/i386/kernel/nmi.c
index 9074818b9473..be87c5e2ee95 100644
--- a/trunk/arch/i386/kernel/nmi.c
+++ b/trunk/arch/i386/kernel/nmi.c
@@ -143,7 +143,7 @@ static int __init check_nmi_watchdog(void)
local_irq_enable();
mdelay((10*1000)/nmi_hz); // wait 10 ticks
- for_each_cpu(cpu) {
+ for (cpu = 0; cpu < NR_CPUS; cpu++) {
#ifdef CONFIG_SMP
/* Check cpu_callin_map here because that is set
after the timer is started. */
@@ -510,7 +510,7 @@ void touch_nmi_watchdog (void)
* Just reset the alert counters, (other CPUs might be
* spinning on locks we hold):
*/
- for_each_cpu(i)
+ for (i = 0; i < NR_CPUS; i++)
alert_counter[i] = 0;
/*
@@ -543,7 +543,7 @@ void nmi_watchdog_tick (struct pt_regs * regs)
/*
* die_nmi will return ONLY if NOTIFY_STOP happens..
*/
- die_nmi(regs, "BUG: NMI Watchdog detected LOCKUP");
+ die_nmi(regs, "NMI Watchdog detected LOCKUP");
} else {
last_irq_sums[cpu] = sum;
alert_counter[cpu] = 0;
diff --git a/trunk/arch/i386/kernel/process.c b/trunk/arch/i386/kernel/process.c
index 299e61674084..0480454ebffa 100644
--- a/trunk/arch/i386/kernel/process.c
+++ b/trunk/arch/i386/kernel/process.c
@@ -295,7 +295,7 @@ void show_regs(struct pt_regs * regs)
printk("EIP: %04x:[<%08lx>] CPU: %d\n",0xffff & regs->xcs,regs->eip, smp_processor_id());
print_symbol("EIP is at %s\n", regs->eip);
- if (user_mode_vm(regs))
+ if (user_mode(regs))
printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
printk(" EFLAGS: %08lx %s (%s %.*s)\n",
regs->eflags, print_tainted(), system_utsname.release,
diff --git a/trunk/arch/i386/kernel/ptrace.c b/trunk/arch/i386/kernel/ptrace.c
index 506462ef36a0..5c1fb6aada5b 100644
--- a/trunk/arch/i386/kernel/ptrace.c
+++ b/trunk/arch/i386/kernel/ptrace.c
@@ -34,10 +34,10 @@
/*
* Determines which flags the user has access to [1 = access, 0 = no access].
- * Prohibits changing ID(21), VIP(20), VIF(19), VM(17), NT(14), IOPL(12-13), IF(9).
+ * Prohibits changing ID(21), VIP(20), VIF(19), VM(17), IOPL(12-13), IF(9).
* Also masks reserved bits (31-22, 15, 5, 3, 1).
*/
-#define FLAG_MASK 0x00050dd5
+#define FLAG_MASK 0x00054dd5
/* set's the trap flag. */
#define TRAP_FLAG 0x100
diff --git a/trunk/arch/i386/kernel/semaphore.c b/trunk/arch/i386/kernel/semaphore.c
index 967dc74df9ee..7455ab643943 100644
--- a/trunk/arch/i386/kernel/semaphore.c
+++ b/trunk/arch/i386/kernel/semaphore.c
@@ -110,11 +110,11 @@ asm(
".align 4\n"
".globl __write_lock_failed\n"
"__write_lock_failed:\n\t"
- LOCK_PREFIX "addl $" RW_LOCK_BIAS_STR ",(%eax)\n"
+ LOCK "addl $" RW_LOCK_BIAS_STR ",(%eax)\n"
"1: rep; nop\n\t"
"cmpl $" RW_LOCK_BIAS_STR ",(%eax)\n\t"
"jne 1b\n\t"
- LOCK_PREFIX "subl $" RW_LOCK_BIAS_STR ",(%eax)\n\t"
+ LOCK "subl $" RW_LOCK_BIAS_STR ",(%eax)\n\t"
"jnz __write_lock_failed\n\t"
"ret"
);
@@ -124,11 +124,11 @@ asm(
".align 4\n"
".globl __read_lock_failed\n"
"__read_lock_failed:\n\t"
- LOCK_PREFIX "incl (%eax)\n"
+ LOCK "incl (%eax)\n"
"1: rep; nop\n\t"
"cmpl $1,(%eax)\n\t"
"js 1b\n\t"
- LOCK_PREFIX "decl (%eax)\n\t"
+ LOCK "decl (%eax)\n\t"
"js __read_lock_failed\n\t"
"ret"
);
diff --git a/trunk/arch/i386/kernel/setup.c b/trunk/arch/i386/kernel/setup.c
index d313a11acafa..ab62a9f4701e 100644
--- a/trunk/arch/i386/kernel/setup.c
+++ b/trunk/arch/i386/kernel/setup.c
@@ -1288,7 +1288,7 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat
struct resource *res;
if (e820.map[i].addr + e820.map[i].size > 0x100000000ULL)
continue;
- res = kzalloc(sizeof(struct resource), GFP_ATOMIC);
+ res = alloc_bootmem_low(sizeof(struct resource));
switch (e820.map[i].type) {
case E820_RAM: res->name = "System RAM"; break;
case E820_ACPI: res->name = "ACPI Tables"; break;
@@ -1316,15 +1316,13 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat
/*
* Request address space for all standard resources
- *
- * This is called just before pcibios_assign_resources(), which is also
- * an fs_initcall, but is linked in later (in arch/i386/pci/i386.c).
*/
-static int __init request_standard_resources(void)
+static void __init register_memory(void)
{
- int i;
+ unsigned long gapstart, gapsize, round;
+ unsigned long long last;
+ int i;
- printk("Setting up standard PCI resources\n");
if (efi_enabled)
efi_initialize_iomem_resources(&code_resource, &data_resource);
else
@@ -1336,16 +1334,6 @@ static int __init request_standard_resources(void)
/* request I/O space for devices used on all i[345]86 PCs */
for (i = 0; i < STANDARD_IO_RESOURCES; i++)
request_resource(&ioport_resource, &standard_io_resources[i]);
- return 0;
-}
-
-fs_initcall(request_standard_resources);
-
-static void __init register_memory(void)
-{
- unsigned long gapstart, gapsize, round;
- unsigned long long last;
- int i;
/*
* Search for the bigest gap in the low 32 bits of the e820
@@ -1389,6 +1377,101 @@ static void __init register_memory(void)
pci_mem_start, gapstart, gapsize);
}
+/* Use inline assembly to define this because the nops are defined
+ as inline assembly strings in the include files and we cannot
+ get them easily into strings. */
+asm("\t.data\nintelnops: "
+ GENERIC_NOP1 GENERIC_NOP2 GENERIC_NOP3 GENERIC_NOP4 GENERIC_NOP5 GENERIC_NOP6
+ GENERIC_NOP7 GENERIC_NOP8);
+asm("\t.data\nk8nops: "
+ K8_NOP1 K8_NOP2 K8_NOP3 K8_NOP4 K8_NOP5 K8_NOP6
+ K8_NOP7 K8_NOP8);
+asm("\t.data\nk7nops: "
+ K7_NOP1 K7_NOP2 K7_NOP3 K7_NOP4 K7_NOP5 K7_NOP6
+ K7_NOP7 K7_NOP8);
+
+extern unsigned char intelnops[], k8nops[], k7nops[];
+static unsigned char *intel_nops[ASM_NOP_MAX+1] = {
+ NULL,
+ intelnops,
+ intelnops + 1,
+ intelnops + 1 + 2,
+ intelnops + 1 + 2 + 3,
+ intelnops + 1 + 2 + 3 + 4,
+ intelnops + 1 + 2 + 3 + 4 + 5,
+ intelnops + 1 + 2 + 3 + 4 + 5 + 6,
+ intelnops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
+};
+static unsigned char *k8_nops[ASM_NOP_MAX+1] = {
+ NULL,
+ k8nops,
+ k8nops + 1,
+ k8nops + 1 + 2,
+ k8nops + 1 + 2 + 3,
+ k8nops + 1 + 2 + 3 + 4,
+ k8nops + 1 + 2 + 3 + 4 + 5,
+ k8nops + 1 + 2 + 3 + 4 + 5 + 6,
+ k8nops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
+};
+static unsigned char *k7_nops[ASM_NOP_MAX+1] = {
+ NULL,
+ k7nops,
+ k7nops + 1,
+ k7nops + 1 + 2,
+ k7nops + 1 + 2 + 3,
+ k7nops + 1 + 2 + 3 + 4,
+ k7nops + 1 + 2 + 3 + 4 + 5,
+ k7nops + 1 + 2 + 3 + 4 + 5 + 6,
+ k7nops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
+};
+static struct nop {
+ int cpuid;
+ unsigned char **noptable;
+} noptypes[] = {
+ { X86_FEATURE_K8, k8_nops },
+ { X86_FEATURE_K7, k7_nops },
+ { -1, NULL }
+};
+
+/* Replace instructions with better alternatives for this CPU type.
+
+ This runs before SMP is initialized to avoid SMP problems with
+ self modifying code. This implies that assymetric systems where
+ APs have less capabilities than the boot processor are not handled.
+ Tough. Make sure you disable such features by hand. */
+void apply_alternatives(void *start, void *end)
+{
+ struct alt_instr *a;
+ int diff, i, k;
+ unsigned char **noptable = intel_nops;
+ for (i = 0; noptypes[i].cpuid >= 0; i++) {
+ if (boot_cpu_has(noptypes[i].cpuid)) {
+ noptable = noptypes[i].noptable;
+ break;
+ }
+ }
+ for (a = start; (void *)a < end; a++) {
+ if (!boot_cpu_has(a->cpuid))
+ continue;
+ BUG_ON(a->replacementlen > a->instrlen);
+ memcpy(a->instr, a->replacement, a->replacementlen);
+ diff = a->instrlen - a->replacementlen;
+ /* Pad the rest with nops */
+ for (i = a->replacementlen; diff > 0; diff -= k, i += k) {
+ k = diff;
+ if (k > ASM_NOP_MAX)
+ k = ASM_NOP_MAX;
+ memcpy(a->instr + i, noptable[k], k);
+ }
+ }
+}
+
+void __init alternative_instructions(void)
+{
+ extern struct alt_instr __alt_instructions[], __alt_instructions_end[];
+ apply_alternatives(__alt_instructions, __alt_instructions_end);
+}
+
static char * __init machine_specific_memory_setup(void);
#ifdef CONFIG_MCA
@@ -1471,16 +1554,6 @@ void __init setup_arch(char **cmdline_p)
parse_cmdline_early(cmdline_p);
-#ifdef CONFIG_EARLY_PRINTK
- {
- char *s = strstr(*cmdline_p, "earlyprintk=");
- if (s) {
- setup_early_printk(strchr(s, '=') + 1);
- printk("early console enabled\n");
- }
- }
-#endif
-
max_low_pfn = setup_memory();
/*
@@ -1505,6 +1578,19 @@ void __init setup_arch(char **cmdline_p)
* NOTE: at this point the bootmem allocator is fully available.
*/
+#ifdef CONFIG_EARLY_PRINTK
+ {
+ char *s = strstr(*cmdline_p, "earlyprintk=");
+ if (s) {
+ extern void setup_early_printk(char *);
+
+ setup_early_printk(strchr(s, '=') + 1);
+ printk("early console enabled\n");
+ }
+ }
+#endif
+
+
dmi_scan_machine();
#ifdef CONFIG_X86_GENERICARCH
diff --git a/trunk/arch/i386/kernel/signal.c b/trunk/arch/i386/kernel/signal.c
index 5c352c3a9e7f..963616d364ec 100644
--- a/trunk/arch/i386/kernel/signal.c
+++ b/trunk/arch/i386/kernel/signal.c
@@ -123,8 +123,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *peax
err |= __get_user(tmp, &sc->seg); \
loadsegment(seg,tmp); }
-#define FIX_EFLAGS (X86_EFLAGS_AC | X86_EFLAGS_RF | \
- X86_EFLAGS_OF | X86_EFLAGS_DF | \
+#define FIX_EFLAGS (X86_EFLAGS_AC | X86_EFLAGS_OF | X86_EFLAGS_DF | \
X86_EFLAGS_TF | X86_EFLAGS_SF | X86_EFLAGS_ZF | \
X86_EFLAGS_AF | X86_EFLAGS_PF | X86_EFLAGS_CF)
@@ -583,6 +582,9 @@ static void fastcall do_signal(struct pt_regs *regs)
if (!user_mode(regs))
return;
+ if (try_to_freeze())
+ goto no_signal;
+
if (test_thread_flag(TIF_RESTORE_SIGMASK))
oldset = ¤t->saved_sigmask;
else
@@ -611,6 +613,7 @@ static void fastcall do_signal(struct pt_regs *regs)
return;
}
+no_signal:
/* Did we come from a system call? */
if (regs->orig_eax >= 0) {
/* Restart the system call - no handlers present */
diff --git a/trunk/arch/i386/kernel/smpboot.c b/trunk/arch/i386/kernel/smpboot.c
index 82371d83bfa9..7007e1783797 100644
--- a/trunk/arch/i386/kernel/smpboot.c
+++ b/trunk/arch/i386/kernel/smpboot.c
@@ -899,7 +899,6 @@ static int __devinit do_boot_cpu(int apicid, int cpu)
unsigned short nmi_high = 0, nmi_low = 0;
++cpucount;
- alternatives_smp_switch(1);
/*
* We can't use kernel_thread since we must avoid to
@@ -1003,6 +1002,7 @@ void cpu_exit_clear(void)
cpu_clear(cpu, cpu_callout_map);
cpu_clear(cpu, cpu_callin_map);
+ cpu_clear(cpu, cpu_present_map);
cpu_clear(cpu, smp_commenced_mask);
unmap_cpu_to_logical_apicid(cpu);
@@ -1014,20 +1014,31 @@ struct warm_boot_cpu_info {
int cpu;
};
-static void __cpuinit do_warm_boot_cpu(void *p)
+static void __devinit do_warm_boot_cpu(void *p)
{
struct warm_boot_cpu_info *info = p;
do_boot_cpu(info->apicid, info->cpu);
complete(info->complete);
}
-static int __cpuinit __smp_prepare_cpu(int cpu)
+int __devinit smp_prepare_cpu(int cpu)
{
DECLARE_COMPLETION(done);
struct warm_boot_cpu_info info;
struct work_struct task;
int apicid, ret;
+ lock_cpu_hotplug();
+
+ /*
+ * On x86, CPU0 is never offlined. Trying to bring up an
+ * already-booted CPU will hang. So check for that case.
+ */
+ if (cpu_online(cpu)) {
+ ret = -EINVAL;
+ goto exit;
+ }
+
apicid = x86_cpu_to_apicid[cpu];
if (apicid == BAD_APICID) {
ret = -ENODEV;
@@ -1052,6 +1063,7 @@ static int __cpuinit __smp_prepare_cpu(int cpu)
zap_low_mappings();
ret = 0;
exit:
+ unlock_cpu_hotplug();
return ret;
}
#endif
@@ -1356,8 +1368,6 @@ void __cpu_die(unsigned int cpu)
/* They ack this in play_dead by setting CPU_DEAD */
if (per_cpu(cpu_state, cpu) == CPU_DEAD) {
printk ("CPU %d is now offline\n", cpu);
- if (1 == num_online_cpus())
- alternatives_smp_switch(0);
return;
}
msleep(100);
@@ -1379,22 +1389,6 @@ void __cpu_die(unsigned int cpu)
int __devinit __cpu_up(unsigned int cpu)
{
-#ifdef CONFIG_HOTPLUG_CPU
- int ret=0;
-
- /*
- * We do warm boot only on cpus that had booted earlier
- * Otherwise cold boot is all handled from smp_boot_cpus().
- * cpu_callin_map is set during AP kickstart process. Its reset
- * when a cpu is taken offline from cpu_exit_clear().
- */
- if (!cpu_isset(cpu, cpu_callin_map))
- ret = __smp_prepare_cpu(cpu);
-
- if (ret)
- return -EIO;
-#endif
-
/* In case one didn't come up */
if (!cpu_isset(cpu, cpu_callin_map)) {
printk(KERN_DEBUG "skipping cpu%d, didn't come online\n", cpu);
diff --git a/trunk/arch/i386/kernel/topology.c b/trunk/arch/i386/kernel/topology.c
index 296355292c7c..67a0e1baa28b 100644
--- a/trunk/arch/i386/kernel/topology.c
+++ b/trunk/arch/i386/kernel/topology.c
@@ -41,15 +41,6 @@ int arch_register_cpu(int num){
parent = &node_devices[node].node;
#endif /* CONFIG_NUMA */
- /*
- * CPU0 cannot be offlined due to several
- * restrictions and assumptions in kernel. This basically
- * doesnt add a control file, one cannot attempt to offline
- * BSP.
- */
- if (!num)
- cpu_devices[num].cpu.no_control = 1;
-
return register_cpu(&cpu_devices[num].cpu, num, parent);
}
diff --git a/trunk/arch/i386/kernel/traps.c b/trunk/arch/i386/kernel/traps.c
index de5386b01d38..b814dbdcc91e 100644
--- a/trunk/arch/i386/kernel/traps.c
+++ b/trunk/arch/i386/kernel/traps.c
@@ -99,8 +99,6 @@ int register_die_notifier(struct notifier_block *nb)
{
int err = 0;
unsigned long flags;
-
- vmalloc_sync_all();
spin_lock_irqsave(&die_notifier_lock, flags);
err = notifier_chain_register(&i386die_chain, nb);
spin_unlock_irqrestore(&die_notifier_lock, flags);
@@ -114,30 +112,12 @@ static inline int valid_stack_ptr(struct thread_info *tinfo, void *p)
p < (void *)tinfo + THREAD_SIZE - 3;
}
-/*
- * Print CONFIG_STACK_BACKTRACE_COLS address/symbol entries per line.
- */
-static inline int print_addr_and_symbol(unsigned long addr, char *log_lvl,
- int printed)
+static void print_addr_and_symbol(unsigned long addr, char *log_lvl)
{
- if (!printed)
- printk(log_lvl);
-
-#if CONFIG_STACK_BACKTRACE_COLS == 1
+ printk(log_lvl);
printk(" [<%08lx>] ", addr);
-#else
- printk(" <%08lx> ", addr);
-#endif
print_symbol("%s", addr);
-
- printed = (printed + 1) % CONFIG_STACK_BACKTRACE_COLS;
-
- if (printed)
- printk(" ");
- else
- printk("\n");
-
- return printed;
+ printk("\n");
}
static inline unsigned long print_context_stack(struct thread_info *tinfo,
@@ -145,24 +125,20 @@ static inline unsigned long print_context_stack(struct thread_info *tinfo,
char *log_lvl)
{
unsigned long addr;
- int printed = 0; /* nr of entries already printed on current line */
#ifdef CONFIG_FRAME_POINTER
while (valid_stack_ptr(tinfo, (void *)ebp)) {
addr = *(unsigned long *)(ebp + 4);
- printed = print_addr_and_symbol(addr, log_lvl, printed);
+ print_addr_and_symbol(addr, log_lvl);
ebp = *(unsigned long *)ebp;
}
#else
while (valid_stack_ptr(tinfo, stack)) {
addr = *stack++;
if (__kernel_text_address(addr))
- printed = print_addr_and_symbol(addr, log_lvl, printed);
+ print_addr_and_symbol(addr, log_lvl);
}
#endif
- if (printed)
- printk("\n");
-
return ebp;
}
@@ -190,7 +166,8 @@ static void show_trace_log_lvl(struct task_struct *task,
stack = (unsigned long*)context->previous_esp;
if (!stack)
break;
- printk("%s =======================\n", log_lvl);
+ printk(log_lvl);
+ printk(" =======================\n");
}
}
@@ -217,17 +194,21 @@ static void show_stack_log_lvl(struct task_struct *task, unsigned long *esp,
for(i = 0; i < kstack_depth_to_print; i++) {
if (kstack_end(stack))
break;
- if (i && ((i % 8) == 0))
- printk("\n%s ", log_lvl);
+ if (i && ((i % 8) == 0)) {
+ printk("\n");
+ printk(log_lvl);
+ printk(" ");
+ }
printk("%08lx ", *stack++);
}
- printk("\n%sCall Trace:\n", log_lvl);
+ printk("\n");
+ printk(log_lvl);
+ printk("Call Trace:\n");
show_trace_log_lvl(task, esp, log_lvl);
}
void show_stack(struct task_struct *task, unsigned long *esp)
{
- printk(" ");
show_stack_log_lvl(task, esp, "");
}
@@ -252,7 +233,7 @@ void show_registers(struct pt_regs *regs)
esp = (unsigned long) (®s->esp);
savesegment(ss, ss);
- if (user_mode_vm(regs)) {
+ if (user_mode(regs)) {
in_kernel = 0;
esp = regs->esp;
ss = regs->xss & 0xffff;
@@ -352,8 +333,6 @@ void die(const char * str, struct pt_regs * regs, long err)
static int die_counter;
unsigned long flags;
- oops_enter();
-
if (die.lock_owner != raw_smp_processor_id()) {
console_verbose();
spin_lock_irqsave(&die.lock, flags);
@@ -406,7 +385,6 @@ void die(const char * str, struct pt_regs * regs, long err)
ssleep(5);
panic("Fatal exception");
}
- oops_exit();
do_exit(SIGSEGV);
}
@@ -645,7 +623,7 @@ void die_nmi (struct pt_regs *regs, const char *msg)
/* If we are in kernel we are probably nested up pretty bad
* and might aswell get out now while we still can.
*/
- if (!user_mode_vm(regs)) {
+ if (!user_mode(regs)) {
current->thread.trap_no = 2;
crash_kexec(regs);
}
@@ -716,7 +694,6 @@ fastcall void do_nmi(struct pt_regs * regs, long error_code)
void set_nmi_callback(nmi_callback_t callback)
{
- vmalloc_sync_all();
rcu_assign_pointer(nmi_callback, callback);
}
EXPORT_SYMBOL_GPL(set_nmi_callback);
diff --git a/trunk/arch/i386/kernel/vm86.c b/trunk/arch/i386/kernel/vm86.c
index aee14fafd13d..f51c894a7da5 100644
--- a/trunk/arch/i386/kernel/vm86.c
+++ b/trunk/arch/i386/kernel/vm86.c
@@ -43,7 +43,6 @@
#include
#include
#include
-#include
#include
#include
@@ -253,7 +252,6 @@ asmlinkage int sys_vm86(struct pt_regs regs)
static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk)
{
struct tss_struct *tss;
- long eax;
/*
* make sure the vm86() system call doesn't try to do anything silly
*/
@@ -307,19 +305,13 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk
tsk->thread.screen_bitmap = info->screen_bitmap;
if (info->flags & VM86_SCREEN_BITMAP)
mark_screen_rdonly(tsk->mm);
- __asm__ __volatile__("xorl %eax,%eax; movl %eax,%fs; movl %eax,%gs\n\t");
- __asm__ __volatile__("movl %%eax, %0\n" :"=r"(eax));
-
- /*call audit_syscall_exit since we do not exit via the normal paths */
- if (unlikely(current->audit_context))
- audit_syscall_exit(current, AUDITSC_RESULT(eax), eax);
-
__asm__ __volatile__(
+ "xorl %%eax,%%eax; movl %%eax,%%fs; movl %%eax,%%gs\n\t"
"movl %0,%%esp\n\t"
"movl %1,%%ebp\n\t"
"jmp resume_userspace"
: /* no outputs */
- :"r" (&info->regs), "r" (task_thread_info(tsk)));
+ :"r" (&info->regs), "r" (task_thread_info(tsk)) : "ax");
/* we never return here */
}
diff --git a/trunk/arch/i386/kernel/vmlinux.lds.S b/trunk/arch/i386/kernel/vmlinux.lds.S
index 8831303a473f..4710195b6b74 100644
--- a/trunk/arch/i386/kernel/vmlinux.lds.S
+++ b/trunk/arch/i386/kernel/vmlinux.lds.S
@@ -7,7 +7,6 @@
#include
#include
#include
-#include
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
@@ -69,26 +68,6 @@ SECTIONS
*(.data.init_task)
}
- /* might get freed after init */
- . = ALIGN(4096);
- __smp_alt_begin = .;
- __smp_alt_instructions = .;
- .smp_altinstructions : AT(ADDR(.smp_altinstructions) - LOAD_OFFSET) {
- *(.smp_altinstructions)
- }
- __smp_alt_instructions_end = .;
- . = ALIGN(4);
- __smp_locks = .;
- .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
- *(.smp_locks)
- }
- __smp_locks_end = .;
- .smp_altinstr_replacement : AT(ADDR(.smp_altinstr_replacement) - LOAD_OFFSET) {
- *(.smp_altinstr_replacement)
- }
- . = ALIGN(4096);
- __smp_alt_end = .;
-
/* will be freed after init */
. = ALIGN(4096); /* Init code and data */
__init_begin = .;
@@ -136,7 +115,7 @@ SECTIONS
__initramfs_start = .;
.init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) }
__initramfs_end = .;
- . = ALIGN(L1_CACHE_BYTES);
+ . = ALIGN(32);
__per_cpu_start = .;
.data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) }
__per_cpu_end = .;
diff --git a/trunk/arch/i386/kernel/vsyscall-sysenter.S b/trunk/arch/i386/kernel/vsyscall-sysenter.S
index 3b62baa6a371..76b728159403 100644
--- a/trunk/arch/i386/kernel/vsyscall-sysenter.S
+++ b/trunk/arch/i386/kernel/vsyscall-sysenter.S
@@ -21,9 +21,6 @@
* instruction clobbers %esp, the user's %esp won't even survive entry
* into the kernel. We store %esp in %ebp. Code in entry.S must fetch
* arg6 from the stack.
- *
- * You can not use this vsyscall for the clone() syscall because the
- * three dwords on the parent stack do not get copied to the child.
*/
.text
.globl __kernel_vsyscall
diff --git a/trunk/arch/i386/mach-es7000/es7000.h b/trunk/arch/i386/mach-es7000/es7000.h
index 80566ca4a80a..f1e3204f5dec 100644
--- a/trunk/arch/i386/mach-es7000/es7000.h
+++ b/trunk/arch/i386/mach-es7000/es7000.h
@@ -83,7 +83,6 @@ struct es7000_oem_table {
struct psai psai;
};
-#ifdef CONFIG_ACPI
struct acpi_table_sdt {
unsigned long pa;
unsigned long count;
@@ -100,9 +99,6 @@ struct oem_table {
u32 OEMTableSize;
};
-extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
-#endif
-
struct mip_reg {
unsigned long long off_0;
unsigned long long off_8;
@@ -118,6 +114,7 @@ struct mip_reg {
#define MIP_FUNC(VALUE) (VALUE & 0xff)
extern int parse_unisys_oem (char *oemptr);
+extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
extern void setup_unisys(void);
extern int es7000_start_cpu(int cpu, unsigned long eip);
extern void es7000_sw_apic(void);
diff --git a/trunk/arch/i386/mach-es7000/es7000plat.c b/trunk/arch/i386/mach-es7000/es7000plat.c
index 3d0fc853516d..a9ab0644f403 100644
--- a/trunk/arch/i386/mach-es7000/es7000plat.c
+++ b/trunk/arch/i386/mach-es7000/es7000plat.c
@@ -51,6 +51,8 @@ struct mip_reg *host_reg;
int mip_port;
unsigned long mip_addr, host_addr;
+#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI)
+
/*
* GSI override for ES7000 platforms.
*/
@@ -74,6 +76,8 @@ es7000_rename_gsi(int ioapic, int gsi)
return gsi;
}
+#endif /* (CONFIG_X86_IO_APIC) && (CONFIG_ACPI) */
+
void __init
setup_unisys(void)
{
@@ -156,7 +160,6 @@ parse_unisys_oem (char *oemptr)
return es7000_plat;
}
-#ifdef CONFIG_ACPI
int __init
find_unisys_acpi_oem_table(unsigned long *oem_addr)
{
@@ -209,7 +212,6 @@ find_unisys_acpi_oem_table(unsigned long *oem_addr)
}
return -1;
}
-#endif
static void
es7000_spin(int n)
diff --git a/trunk/arch/i386/mach-visws/reboot.c b/trunk/arch/i386/mach-visws/reboot.c
index 99332abfad42..5d73e042ed0a 100644
--- a/trunk/arch/i386/mach-visws/reboot.c
+++ b/trunk/arch/i386/mach-visws/reboot.c
@@ -1,6 +1,7 @@
#include
#include
#include
+#include
#include
#include "piix4.h"
diff --git a/trunk/arch/i386/mm/fault.c b/trunk/arch/i386/mm/fault.c
index 7f0fcf219a26..cf572d9a3b6e 100644
--- a/trunk/arch/i386/mm/fault.c
+++ b/trunk/arch/i386/mm/fault.c
@@ -214,68 +214,6 @@ static noinline void force_sig_info_fault(int si_signo, int si_code,
fastcall void do_invalid_op(struct pt_regs *, unsigned long);
-static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address)
-{
- unsigned index = pgd_index(address);
- pgd_t *pgd_k;
- pud_t *pud, *pud_k;
- pmd_t *pmd, *pmd_k;
-
- pgd += index;
- pgd_k = init_mm.pgd + index;
-
- if (!pgd_present(*pgd_k))
- return NULL;
-
- /*
- * set_pgd(pgd, *pgd_k); here would be useless on PAE
- * and redundant with the set_pmd() on non-PAE. As would
- * set_pud.
- */
-
- pud = pud_offset(pgd, address);
- pud_k = pud_offset(pgd_k, address);
- if (!pud_present(*pud_k))
- return NULL;
-
- pmd = pmd_offset(pud, address);
- pmd_k = pmd_offset(pud_k, address);
- if (!pmd_present(*pmd_k))
- return NULL;
- if (!pmd_present(*pmd))
- set_pmd(pmd, *pmd_k);
- else
- BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k));
- return pmd_k;
-}
-
-/*
- * Handle a fault on the vmalloc or module mapping area
- *
- * This assumes no large pages in there.
- */
-static inline int vmalloc_fault(unsigned long address)
-{
- unsigned long pgd_paddr;
- pmd_t *pmd_k;
- pte_t *pte_k;
- /*
- * Synchronize this task's top level page-table
- * with the 'reference' page table.
- *
- * Do _not_ use "current" here. We might be inside
- * an interrupt in the middle of a task switch..
- */
- pgd_paddr = read_cr3();
- pmd_k = vmalloc_sync_one(__va(pgd_paddr), address);
- if (!pmd_k)
- return -1;
- pte_k = pte_offset_kernel(pmd_k, address);
- if (!pte_present(*pte_k))
- return -1;
- return 0;
-}
-
/*
* This routine handles page faults. It determines the address,
* and the problem, and then passes it off to one of the appropriate
@@ -285,8 +223,6 @@ static inline int vmalloc_fault(unsigned long address)
* bit 0 == 0 means no page found, 1 means protection fault
* bit 1 == 0 means read, 1 means write
* bit 2 == 0 means kernel, 1 means user-mode
- * bit 3 == 1 means use of reserved bit detected
- * bit 4 == 1 means fault was an instruction fetch
*/
fastcall void __kprobes do_page_fault(struct pt_regs *regs,
unsigned long error_code)
@@ -301,6 +237,13 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs,
/* get the address */
address = read_cr2();
+ if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14,
+ SIGSEGV) == NOTIFY_STOP)
+ return;
+ /* It's safe to allow irq's after cr2 has been saved */
+ if (regs->eflags & (X86_EFLAGS_IF|VM_MASK))
+ local_irq_enable();
+
tsk = current;
si_code = SEGV_MAPERR;
@@ -316,29 +259,17 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs,
*
* This verifies that the fault happens in kernel space
* (error_code & 4) == 0, and that the fault was not a
- * protection error (error_code & 9) == 0.
+ * protection error (error_code & 1) == 0.
*/
- if (unlikely(address >= TASK_SIZE)) {
- if (!(error_code & 0x0000000d) && vmalloc_fault(address) >= 0)
- return;
- if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14,
- SIGSEGV) == NOTIFY_STOP)
- return;
- /*
+ if (unlikely(address >= TASK_SIZE)) {
+ if (!(error_code & 5))
+ goto vmalloc_fault;
+ /*
* Don't take the mm semaphore here. If we fixup a prefetch
* fault we could otherwise deadlock.
*/
goto bad_area_nosemaphore;
- }
-
- if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14,
- SIGSEGV) == NOTIFY_STOP)
- return;
-
- /* It's safe to allow irq's after cr2 has been saved and the vmalloc
- fault has been handled. */
- if (regs->eflags & (X86_EFLAGS_IF|VM_MASK))
- local_irq_enable();
+ }
mm = tsk->mm;
@@ -509,31 +440,24 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs,
bust_spinlocks(1);
- if (oops_may_print()) {
- #ifdef CONFIG_X86_PAE
- if (error_code & 16) {
- pte_t *pte = lookup_address(address);
+#ifdef CONFIG_X86_PAE
+ if (error_code & 16) {
+ pte_t *pte = lookup_address(address);
- if (pte && pte_present(*pte) && !pte_exec_kernel(*pte))
- printk(KERN_CRIT "kernel tried to execute "
- "NX-protected page - exploit attempt? "
- "(uid: %d)\n", current->uid);
- }
- #endif
- if (address < PAGE_SIZE)
- printk(KERN_ALERT "BUG: unable to handle kernel NULL "
- "pointer dereference");
- else
- printk(KERN_ALERT "BUG: unable to handle kernel paging"
- " request");
- printk(" at virtual address %08lx\n",address);
- printk(KERN_ALERT " printing eip:\n");
- printk("%08lx\n", regs->eip);
+ if (pte && pte_present(*pte) && !pte_exec_kernel(*pte))
+ printk(KERN_CRIT "kernel tried to execute NX-protected page - exploit attempt? (uid: %d)\n", current->uid);
}
+#endif
+ if (address < PAGE_SIZE)
+ printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference");
+ else
+ printk(KERN_ALERT "Unable to handle kernel paging request");
+ printk(" at virtual address %08lx\n",address);
+ printk(KERN_ALERT " printing eip:\n");
+ printk("%08lx\n", regs->eip);
page = read_cr3();
page = ((unsigned long *) __va(page))[address >> 22];
- if (oops_may_print())
- printk(KERN_ALERT "*pde = %08lx\n", page);
+ printk(KERN_ALERT "*pde = %08lx\n", page);
/*
* We must not directly access the pte in the highpte
* case, the page table might be allocated in highmem.
@@ -541,7 +465,7 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs,
* it's allocated already.
*/
#ifndef CONFIG_HIGHPTE
- if ((page & 1) && oops_may_print()) {
+ if (page & 1) {
page &= PAGE_MASK;
address &= 0x003ff000;
page = ((unsigned long *) __va(page))[address >> PAGE_SHIFT];
@@ -586,41 +510,51 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs,
tsk->thread.error_code = error_code;
tsk->thread.trap_no = 14;
force_sig_info_fault(SIGBUS, BUS_ADRERR, address, tsk);
-}
+ return;
-#ifndef CONFIG_X86_PAE
-void vmalloc_sync_all(void)
-{
- /*
- * Note that races in the updates of insync and start aren't
- * problematic: insync can only get set bits added, and updates to
- * start are only improving performance (without affecting correctness
- * if undone).
- */
- static DECLARE_BITMAP(insync, PTRS_PER_PGD);
- static unsigned long start = TASK_SIZE;
- unsigned long address;
+vmalloc_fault:
+ {
+ /*
+ * Synchronize this task's top level page-table
+ * with the 'reference' page table.
+ *
+ * Do _not_ use "tsk" here. We might be inside
+ * an interrupt in the middle of a task switch..
+ */
+ int index = pgd_index(address);
+ unsigned long pgd_paddr;
+ pgd_t *pgd, *pgd_k;
+ pud_t *pud, *pud_k;
+ pmd_t *pmd, *pmd_k;
+ pte_t *pte_k;
- BUILD_BUG_ON(TASK_SIZE & ~PGDIR_MASK);
- for (address = start; address >= TASK_SIZE; address += PGDIR_SIZE) {
- if (!test_bit(pgd_index(address), insync)) {
- unsigned long flags;
- struct page *page;
-
- spin_lock_irqsave(&pgd_lock, flags);
- for (page = pgd_list; page; page =
- (struct page *)page->index)
- if (!vmalloc_sync_one(page_address(page),
- address)) {
- BUG_ON(page != pgd_list);
- break;
- }
- spin_unlock_irqrestore(&pgd_lock, flags);
- if (!page)
- set_bit(pgd_index(address), insync);
- }
- if (address == start && test_bit(pgd_index(address), insync))
- start = address + PGDIR_SIZE;
+ pgd_paddr = read_cr3();
+ pgd = index + (pgd_t *)__va(pgd_paddr);
+ pgd_k = init_mm.pgd + index;
+
+ if (!pgd_present(*pgd_k))
+ goto no_context;
+
+ /*
+ * set_pgd(pgd, *pgd_k); here would be useless on PAE
+ * and redundant with the set_pmd() on non-PAE. As would
+ * set_pud.
+ */
+
+ pud = pud_offset(pgd, address);
+ pud_k = pud_offset(pgd_k, address);
+ if (!pud_present(*pud_k))
+ goto no_context;
+
+ pmd = pmd_offset(pud, address);
+ pmd_k = pmd_offset(pud_k, address);
+ if (!pmd_present(*pmd_k))
+ goto no_context;
+ set_pmd(pmd, *pmd_k);
+
+ pte_k = pte_offset_kernel(pmd_k, address);
+ if (!pte_present(*pte_k))
+ goto no_context;
+ return;
}
}
-#endif
diff --git a/trunk/arch/i386/mm/init.c b/trunk/arch/i386/mm/init.c
index 9f66ac582a8b..7ba55a6e2dbc 100644
--- a/trunk/arch/i386/mm/init.c
+++ b/trunk/arch/i386/mm/init.c
@@ -720,6 +720,21 @@ static int noinline do_test_wp_bit(void)
return flag;
}
+void free_initmem(void)
+{
+ unsigned long addr;
+
+ addr = (unsigned long)(&__init_begin);
+ for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) {
+ ClearPageReserved(virt_to_page(addr));
+ init_page_count(virt_to_page(addr));
+ memset((void *)addr, 0xcc, PAGE_SIZE);
+ free_page(addr);
+ totalram_pages++;
+ }
+ printk (KERN_INFO "Freeing unused kernel memory: %dk freed\n", (__init_end - __init_begin) >> 10);
+}
+
#ifdef CONFIG_DEBUG_RODATA
extern char __start_rodata, __end_rodata;
@@ -743,31 +758,17 @@ void mark_rodata_ro(void)
}
#endif
-void free_init_pages(char *what, unsigned long begin, unsigned long end)
-{
- unsigned long addr;
-
- for (addr = begin; addr < end; addr += PAGE_SIZE) {
- ClearPageReserved(virt_to_page(addr));
- init_page_count(virt_to_page(addr));
- memset((void *)addr, 0xcc, PAGE_SIZE);
- free_page(addr);
- totalram_pages++;
- }
- printk(KERN_INFO "Freeing %s: %ldk freed\n", what, (end - begin) >> 10);
-}
-
-void free_initmem(void)
-{
- free_init_pages("unused kernel memory",
- (unsigned long)(&__init_begin),
- (unsigned long)(&__init_end));
-}
#ifdef CONFIG_BLK_DEV_INITRD
void free_initrd_mem(unsigned long start, unsigned long end)
{
- free_init_pages("initrd memory", start, end);
+ if (start < end)
+ printk (KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
+ for (; start < end; start += PAGE_SIZE) {
+ ClearPageReserved(virt_to_page(start));
+ init_page_count(virt_to_page(start));
+ free_page(start);
+ totalram_pages++;
+ }
}
#endif
-
diff --git a/trunk/arch/i386/oprofile/nmi_int.c b/trunk/arch/i386/oprofile/nmi_int.c
index 1accce50c2c7..0493e8b8ec49 100644
--- a/trunk/arch/i386/oprofile/nmi_int.c
+++ b/trunk/arch/i386/oprofile/nmi_int.c
@@ -122,7 +122,7 @@ static void nmi_save_registers(void * dummy)
static void free_msrs(void)
{
int i;
- for_each_cpu(i) {
+ for (i = 0; i < NR_CPUS; ++i) {
kfree(cpu_msrs[i].counters);
cpu_msrs[i].counters = NULL;
kfree(cpu_msrs[i].controls);
@@ -138,7 +138,10 @@ static int allocate_msrs(void)
size_t counters_size = sizeof(struct op_msr) * model->num_counters;
int i;
- for_each_online_cpu(i) {
+ for (i = 0; i < NR_CPUS; ++i) {
+ if (!cpu_online(i))
+ continue;
+
cpu_msrs[i].counters = kmalloc(counters_size, GFP_KERNEL);
if (!cpu_msrs[i].counters) {
success = 0;
diff --git a/trunk/arch/i386/pci/Makefile b/trunk/arch/i386/pci/Makefile
index 62ad75c57e6a..5461d4d5ea1e 100644
--- a/trunk/arch/i386/pci/Makefile
+++ b/trunk/arch/i386/pci/Makefile
@@ -1,4 +1,4 @@
-obj-y := i386.o init.o
+obj-y := i386.o
obj-$(CONFIG_PCI_BIOS) += pcbios.o
obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o
diff --git a/trunk/arch/i386/pci/common.c b/trunk/arch/i386/pci/common.c
index dbece776c5b2..f6bc48da4d2a 100644
--- a/trunk/arch/i386/pci/common.c
+++ b/trunk/arch/i386/pci/common.c
@@ -8,7 +8,6 @@
#include
#include
#include
-#include
#include
#include
@@ -121,42 +120,11 @@ void __devinit pcibios_fixup_bus(struct pci_bus *b)
pci_read_bridge_bases(b);
}
-/*
- * Enable renumbering of PCI bus# ranges to reach all PCI busses (Cardbus)
- */
-#ifdef __i386__
-static int __devinit assign_all_busses(struct dmi_system_id *d)
-{
- pci_probe |= PCI_ASSIGN_ALL_BUSSES;
- printk(KERN_INFO "%s detected: enabling PCI bus# renumbering"
- " (pci=assign-busses)\n", d->ident);
- return 0;
-}
-#endif
-
-/*
- * Laptops which need pci=assign-busses to see Cardbus cards
- */
-static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = {
-#ifdef __i386__
- {
- .callback = assign_all_busses,
- .ident = "Samsung X20 Laptop",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Samsung Electronics"),
- DMI_MATCH(DMI_PRODUCT_NAME, "SX20S"),
- },
- },
-#endif /* __i386__ */
- {}
-};
struct pci_bus * __devinit pcibios_scan_root(int busnum)
{
struct pci_bus *bus = NULL;
- dmi_check_system(pciprobe_dmi_table);
-
while ((bus = pci_find_next_bus(bus)) != NULL) {
if (bus->number == busnum) {
/* Already scanned */
diff --git a/trunk/arch/i386/pci/direct.c b/trunk/arch/i386/pci/direct.c
index 99012b93bd12..e3ac502bf2fb 100644
--- a/trunk/arch/i386/pci/direct.c
+++ b/trunk/arch/i386/pci/direct.c
@@ -245,7 +245,7 @@ static int __init pci_check_type2(void)
return works;
}
-void __init pci_direct_init(void)
+static int __init pci_direct_init(void)
{
struct resource *region, *region2;
@@ -258,16 +258,16 @@ void __init pci_direct_init(void)
if (pci_check_type1()) {
printk(KERN_INFO "PCI: Using configuration type 1\n");
raw_pci_ops = &pci_direct_conf1;
- return;
+ return 0;
}
release_resource(region);
type2:
if ((pci_probe & PCI_PROBE_CONF2) == 0)
- return;
+ goto out;
region = request_region(0xCF8, 4, "PCI conf2");
if (!region)
- return;
+ goto out;
region2 = request_region(0xC000, 0x1000, "PCI conf2");
if (!region2)
goto fail2;
@@ -275,10 +275,15 @@ void __init pci_direct_init(void)
if (pci_check_type2()) {
printk(KERN_INFO "PCI: Using configuration type 2\n");
raw_pci_ops = &pci_direct_conf2;
- return;
+ return 0;
}
release_resource(region2);
fail2:
release_resource(region);
+
+ out:
+ return 0;
}
+
+arch_initcall(pci_direct_init);
diff --git a/trunk/arch/i386/pci/init.c b/trunk/arch/i386/pci/init.c
deleted file mode 100644
index f9156d3ac723..000000000000
--- a/trunk/arch/i386/pci/init.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#include
-#include
-#include
-#include "pci.h"
-
-/* arch_initcall has too random ordering, so call the initializers
- in the right sequence from here. */
-static __init int pci_access_init(void)
-{
-#ifdef CONFIG_PCI_MMCONFIG
- pci_mmcfg_init();
-#endif
- if (raw_pci_ops)
- return 0;
-#ifdef CONFIG_PCI_BIOS
- pci_pcbios_init();
-#endif
- if (raw_pci_ops)
- return 0;
-#ifdef CONFIG_PCI_DIRECT
- pci_direct_init();
-#endif
- return 0;
-}
-arch_initcall(pci_access_init);
diff --git a/trunk/arch/i386/pci/mmconfig.c b/trunk/arch/i386/pci/mmconfig.c
index 613789071f30..0ee8a983708c 100644
--- a/trunk/arch/i386/pci/mmconfig.c
+++ b/trunk/arch/i386/pci/mmconfig.c
@@ -172,20 +172,25 @@ static __init void unreachable_devices(void)
}
}
-void __init pci_mmcfg_init(void)
+static int __init pci_mmcfg_init(void)
{
if ((pci_probe & PCI_PROBE_MMCONF) == 0)
- return;
+ goto out;
acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg);
if ((pci_mmcfg_config_num == 0) ||
(pci_mmcfg_config == NULL) ||
(pci_mmcfg_config[0].base_address == 0))
- return;
+ goto out;
printk(KERN_INFO "PCI: Using MMCONFIG\n");
raw_pci_ops = &pci_mmcfg;
pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
unreachable_devices();
+
+ out:
+ return 0;
}
+
+arch_initcall(pci_mmcfg_init);
diff --git a/trunk/arch/i386/pci/pcbios.c b/trunk/arch/i386/pci/pcbios.c
index 1eec0868f4b3..b9d65f0bc2d1 100644
--- a/trunk/arch/i386/pci/pcbios.c
+++ b/trunk/arch/i386/pci/pcbios.c
@@ -476,12 +476,14 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
}
EXPORT_SYMBOL(pcibios_set_irq_routing);
-void __init pci_pcbios_init(void)
+static int __init pci_pcbios_init(void)
{
if ((pci_probe & PCI_PROBE_BIOS)
&& ((raw_pci_ops = pci_find_bios()))) {
pci_probe |= PCI_BIOS_SORT;
pci_bios_present = 1;
}
+ return 0;
}
+arch_initcall(pci_pcbios_init);
diff --git a/trunk/arch/i386/pci/pci.h b/trunk/arch/i386/pci/pci.h
index 12035e29108b..f550781ec310 100644
--- a/trunk/arch/i386/pci/pci.h
+++ b/trunk/arch/i386/pci/pci.h
@@ -80,7 +80,4 @@ extern int pci_conf1_write(unsigned int seg, unsigned int bus,
extern int pci_conf1_read(unsigned int seg, unsigned int bus,
unsigned int devfn, int reg, int len, u32 *value);
-extern void pci_direct_init(void);
-extern void pci_pcbios_init(void);
-extern void pci_mmcfg_init(void);
diff --git a/trunk/arch/ia64/Kconfig b/trunk/arch/ia64/Kconfig
index 10b6b9e7716b..ff7ae6b664e8 100644
--- a/trunk/arch/ia64/Kconfig
+++ b/trunk/arch/ia64/Kconfig
@@ -252,15 +252,6 @@ config NR_CPUS
than 64 will cause the use of a CPU mask array, causing a small
performance hit.
-config IA64_NR_NODES
- int "Maximum number of NODEs (256-1024)" if (IA64_SGI_SN2 || IA64_GENERIC)
- range 256 1024
- depends on IA64_SGI_SN2 || IA64_GENERIC
- default "256"
- help
- This option specifies the maximum number of nodes in your SSI system.
- If in doubt, use the default.
-
config HOTPLUG_CPU
bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
depends on SMP && EXPERIMENTAL
diff --git a/trunk/arch/ia64/Makefile b/trunk/arch/ia64/Makefile
index 80ea7506fa1a..f722e1a25948 100644
--- a/trunk/arch/ia64/Makefile
+++ b/trunk/arch/ia64/Makefile
@@ -1,9 +1,6 @@
#
# ia64/Makefile
#
-# This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies.
-#
# This file is subject to the terms and conditions of the GNU General Public
# License. See the file "COPYING" in the main directory of this archive
# for more details.
@@ -65,7 +62,7 @@ drivers-$(CONFIG_OPROFILE) += arch/ia64/oprofile/
boot := arch/ia64/hp/sim/boot
-PHONY += boot compressed check
+.PHONY: boot compressed check
all: compressed unwcheck
diff --git a/trunk/arch/ia64/configs/gensparse_defconfig b/trunk/arch/ia64/configs/gensparse_defconfig
index 0d29aa2066b3..744fd2f79f61 100644
--- a/trunk/arch/ia64/configs/gensparse_defconfig
+++ b/trunk/arch/ia64/configs/gensparse_defconfig
@@ -116,7 +116,6 @@ CONFIG_IOSAPIC=y
CONFIG_FORCE_MAX_ZONEORDER=17
CONFIG_SMP=y
CONFIG_NR_CPUS=512
-CONFIG_IA64_NR_NODES=256
CONFIG_HOTPLUG_CPU=y
# CONFIG_SCHED_SMT is not set
# CONFIG_PREEMPT is not set
diff --git a/trunk/arch/ia64/configs/sn2_defconfig b/trunk/arch/ia64/configs/sn2_defconfig
index a718034d68d0..8206752161bb 100644
--- a/trunk/arch/ia64/configs/sn2_defconfig
+++ b/trunk/arch/ia64/configs/sn2_defconfig
@@ -116,7 +116,6 @@ CONFIG_IA64_SGI_SN_XP=m
CONFIG_FORCE_MAX_ZONEORDER=17
CONFIG_SMP=y
CONFIG_NR_CPUS=1024
-CONFIG_IA64_NR_NODES=256
# CONFIG_HOTPLUG_CPU is not set
CONFIG_SCHED_SMT=y
CONFIG_PREEMPT=y
diff --git a/trunk/arch/ia64/defconfig b/trunk/arch/ia64/defconfig
index 6cba55da572a..3e767288a745 100644
--- a/trunk/arch/ia64/defconfig
+++ b/trunk/arch/ia64/defconfig
@@ -116,7 +116,6 @@ CONFIG_IOSAPIC=y
CONFIG_FORCE_MAX_ZONEORDER=17
CONFIG_SMP=y
CONFIG_NR_CPUS=512
-CONFIG_IA64_NR_NODES=256
CONFIG_HOTPLUG_CPU=y
# CONFIG_SCHED_SMT is not set
# CONFIG_PREEMPT is not set
diff --git a/trunk/arch/ia64/dig/setup.c b/trunk/arch/ia64/dig/setup.c
index 38aa9c108857..c9104bfff667 100644
--- a/trunk/arch/ia64/dig/setup.c
+++ b/trunk/arch/ia64/dig/setup.c
@@ -69,3 +69,8 @@ dig_setup (char **cmdline_p)
screen_info.orig_video_isVGA = 1; /* XXX fake */
screen_info.orig_video_ega_bx = 3; /* XXX fake */
}
+
+void __init
+dig_irq_init (void)
+{
+}
diff --git a/trunk/arch/ia64/hp/sim/simserial.c b/trunk/arch/ia64/hp/sim/simserial.c
index 0e5c6ae50228..626cdc83668b 100644
--- a/trunk/arch/ia64/hp/sim/simserial.c
+++ b/trunk/arch/ia64/hp/sim/simserial.c
@@ -46,6 +46,11 @@
#define KEYBOARD_INTR 3 /* must match with simulator! */
#define NR_PORTS 1 /* only one port for now */
+#define SERIAL_INLINE 1
+
+#ifdef SERIAL_INLINE
+#define _INLINE_ inline
+#endif
#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT)
@@ -232,7 +237,7 @@ static void rs_put_char(struct tty_struct *tty, unsigned char ch)
local_irq_restore(flags);
}
-static void transmit_chars(struct async_struct *info, int *intr_done)
+static _INLINE_ void transmit_chars(struct async_struct *info, int *intr_done)
{
int count;
unsigned long flags;
diff --git a/trunk/arch/ia64/ia32/sys_ia32.c b/trunk/arch/ia64/ia32/sys_ia32.c
index 13e739e4c84d..70dba1f0e2ee 100644
--- a/trunk/arch/ia64/ia32/sys_ia32.c
+++ b/trunk/arch/ia64/ia32/sys_ia32.c
@@ -1166,7 +1166,19 @@ put_tv32 (struct compat_timeval __user *o, struct timeval *i)
asmlinkage unsigned long
sys32_alarm (unsigned int seconds)
{
- return alarm_setitimer(seconds);
+ struct itimerval it_new, it_old;
+ unsigned int oldalarm;
+
+ it_new.it_interval.tv_sec = it_new.it_interval.tv_usec = 0;
+ it_new.it_value.tv_sec = seconds;
+ it_new.it_value.tv_usec = 0;
+ do_setitimer(ITIMER_REAL, &it_new, &it_old);
+ oldalarm = it_old.it_value.tv_sec;
+ /* ehhh.. We can't return 0 if we have an alarm pending.. */
+ /* And we'd better return too much than too little anyway */
+ if (it_old.it_value.tv_usec)
+ oldalarm++;
+ return oldalarm;
}
/* Translations due to time_t size differences. Which affects all
diff --git a/trunk/arch/ia64/kernel/acpi.c b/trunk/arch/ia64/kernel/acpi.c
index a4e218ce2edb..4722ec51c70c 100644
--- a/trunk/arch/ia64/kernel/acpi.c
+++ b/trunk/arch/ia64/kernel/acpi.c
@@ -420,26 +420,6 @@ int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS];
int __initdata nid_to_pxm_map[MAX_NUMNODES];
static struct acpi_table_slit __initdata *slit_table;
-static int get_processor_proximity_domain(struct acpi_table_processor_affinity *pa)
-{
- int pxm;
-
- pxm = pa->proximity_domain;
- if (ia64_platform_is("sn2"))
- pxm += pa->reserved[0] << 8;
- return pxm;
-}
-
-static int get_memory_proximity_domain(struct acpi_table_memory_affinity *ma)
-{
- int pxm;
-
- pxm = ma->proximity_domain;
- if (ia64_platform_is("sn2"))
- pxm += ma->reserved1[0] << 8;
- return pxm;
-}
-
/*
* ACPI 2.0 SLIT (System Locality Information Table)
* http://devresource.hp.com/devresource/Docs/TechPapers/IA64/slit.pdf
@@ -463,20 +443,13 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
void __init
acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa)
{
- int pxm;
-
- if (!pa->flags.enabled)
- return;
-
- pxm = get_processor_proximity_domain(pa);
-
/* record this node in proximity bitmap */
- pxm_bit_set(pxm);
+ pxm_bit_set(pa->proximity_domain);
node_cpuid[srat_num_cpus].phys_id =
(pa->apic_id << 8) | (pa->lsapic_eid);
/* nid should be overridden as logical node id later */
- node_cpuid[srat_num_cpus].nid = pxm;
+ node_cpuid[srat_num_cpus].nid = pa->proximity_domain;
srat_num_cpus++;
}
@@ -484,10 +457,10 @@ void __init
acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma)
{
unsigned long paddr, size;
- int pxm;
+ u8 pxm;
struct node_memblk_s *p, *q, *pend;
- pxm = get_memory_proximity_domain(ma);
+ pxm = ma->proximity_domain;
/* fill node memory chunk structure */
paddr = ma->base_addr_hi;
diff --git a/trunk/arch/ia64/kernel/ivt.S b/trunk/arch/ia64/kernel/ivt.S
index 829a43cab797..dcd906fe5749 100644
--- a/trunk/arch/ia64/kernel/ivt.S
+++ b/trunk/arch/ia64/kernel/ivt.S
@@ -865,7 +865,6 @@ ENTRY(interrupt)
;;
SAVE_REST
;;
- MCA_RECOVER_RANGE(interrupt)
alloc r14=ar.pfs,0,0,2,0 // must be first in an insn group
mov out0=cr.ivr // pass cr.ivr as first arg
add out1=16,sp // pass pointer to pt_regs as second arg
diff --git a/trunk/arch/ia64/kernel/machvec.c b/trunk/arch/ia64/kernel/machvec.c
index 4b0b71d5aef4..c3a04ee7f4f6 100644
--- a/trunk/arch/ia64/kernel/machvec.c
+++ b/trunk/arch/ia64/kernel/machvec.c
@@ -14,15 +14,7 @@
struct ia64_machine_vector ia64_mv;
EXPORT_SYMBOL(ia64_mv);
-static __initdata const char *mvec_name;
-static __init int setup_mvec(char *s)
-{
- mvec_name = s;
- return 0;
-}
-early_param("machvec", setup_mvec);
-
-static struct ia64_machine_vector * __init
+static struct ia64_machine_vector *
lookup_machvec (const char *name)
{
extern struct ia64_machine_vector machvec_start[];
@@ -41,13 +33,10 @@ machvec_init (const char *name)
{
struct ia64_machine_vector *mv;
- if (!name)
- name = mvec_name ? mvec_name : acpi_get_sysname();
mv = lookup_machvec(name);
- if (!mv)
- panic("generic kernel failed to find machine vector for"
- " platform %s!", name);
-
+ if (!mv) {
+ panic("generic kernel failed to find machine vector for platform %s!", name);
+ }
ia64_mv = *mv;
printk(KERN_INFO "booting generic kernel on platform %s\n", name);
}
diff --git a/trunk/arch/ia64/kernel/mca.c b/trunk/arch/ia64/kernel/mca.c
index 87ff7fe33cfb..b57e723f194c 100644
--- a/trunk/arch/ia64/kernel/mca.c
+++ b/trunk/arch/ia64/kernel/mca.c
@@ -83,7 +83,6 @@
#include
#include
-#include "mca_drv.h"
#include "entry.h"
#if defined(IA64_MCA_DEBUG_INFO)
@@ -134,7 +133,7 @@ static int cpe_poll_enabled = 1;
extern void salinfo_log_wakeup(int type, u8 *buffer, u64 size, int irqsafe);
-static int mca_init __initdata;
+static int mca_init;
static void inline
@@ -185,7 +184,7 @@ static ia64_state_log_t ia64_state_log[IA64_MAX_LOG_TYPES];
* Inputs : info_type (SAL_INFO_TYPE_{MCA,INIT,CMC,CPE})
* Outputs : None
*/
-static void __init
+static void
ia64_log_init(int sal_info_type)
{
u64 max_size = 0;
@@ -282,50 +281,6 @@ ia64_mca_log_sal_error_record(int sal_info_type)
ia64_sal_clear_state_info(sal_info_type);
}
-/*
- * search_mca_table
- * See if the MCA surfaced in an instruction range
- * that has been tagged as recoverable.
- *
- * Inputs
- * first First address range to check
- * last Last address range to check
- * ip Instruction pointer, address we are looking for
- *
- * Return value:
- * 1 on Success (in the table)/ 0 on Failure (not in the table)
- */
-int
-search_mca_table (const struct mca_table_entry *first,
- const struct mca_table_entry *last,
- unsigned long ip)
-{
- const struct mca_table_entry *curr;
- u64 curr_start, curr_end;
-
- curr = first;
- while (curr <= last) {
- curr_start = (u64) &curr->start_addr + curr->start_addr;
- curr_end = (u64) &curr->end_addr + curr->end_addr;
-
- if ((ip >= curr_start) && (ip <= curr_end)) {
- return 1;
- }
- curr++;
- }
- return 0;
-}
-
-/* Given an address, look for it in the mca tables. */
-int mca_recover_range(unsigned long addr)
-{
- extern struct mca_table_entry __start___mca_table[];
- extern struct mca_table_entry __stop___mca_table[];
-
- return search_mca_table(__start___mca_table, __stop___mca_table-1, addr);
-}
-EXPORT_SYMBOL_GPL(mca_recover_range);
-
#ifdef CONFIG_ACPI
int cpe_vector = -1;
@@ -400,7 +355,7 @@ ia64_mca_cpe_int_handler (int cpe_irq, void *arg, struct pt_regs *ptregs)
* Outputs
* None
*/
-static void __init
+static void
ia64_mca_register_cpev (int cpev)
{
/* Register the CPE interrupt vector with SAL */
@@ -431,7 +386,7 @@ ia64_mca_register_cpev (int cpev)
* Outputs
* None
*/
-void __cpuinit
+void
ia64_mca_cmc_vector_setup (void)
{
cmcv_reg_t cmcv;
@@ -792,34 +747,31 @@ ia64_mca_modify_original_stack(struct pt_regs *regs,
ia64_mca_modify_comm(previous_current);
goto no_mod;
}
-
- if (!mca_recover_range(ms->pmsa_iip)) {
- if (r13 != sos->prev_IA64_KR_CURRENT) {
- msg = "inconsistent previous current and r13";
- goto no_mod;
- }
- if ((r12 - r13) >= KERNEL_STACK_SIZE) {
- msg = "inconsistent r12 and r13";
- goto no_mod;
- }
- if ((ar_bspstore - r13) >= KERNEL_STACK_SIZE) {
- msg = "inconsistent ar.bspstore and r13";
- goto no_mod;
- }
- va.p = old_bspstore;
- if (va.f.reg < 5) {
- msg = "old_bspstore is in the wrong region";
- goto no_mod;
- }
- if ((ar_bsp - r13) >= KERNEL_STACK_SIZE) {
- msg = "inconsistent ar.bsp and r13";
- goto no_mod;
- }
- size += (ia64_rse_skip_regs(old_bspstore, slots) - old_bspstore) * 8;
- if (ar_bspstore + size > r12) {
- msg = "no room for blocked state";
- goto no_mod;
- }
+ if (r13 != sos->prev_IA64_KR_CURRENT) {
+ msg = "inconsistent previous current and r13";
+ goto no_mod;
+ }
+ if ((r12 - r13) >= KERNEL_STACK_SIZE) {
+ msg = "inconsistent r12 and r13";
+ goto no_mod;
+ }
+ if ((ar_bspstore - r13) >= KERNEL_STACK_SIZE) {
+ msg = "inconsistent ar.bspstore and r13";
+ goto no_mod;
+ }
+ va.p = old_bspstore;
+ if (va.f.reg < 5) {
+ msg = "old_bspstore is in the wrong region";
+ goto no_mod;
+ }
+ if ((ar_bsp - r13) >= KERNEL_STACK_SIZE) {
+ msg = "inconsistent ar.bsp and r13";
+ goto no_mod;
+ }
+ size += (ia64_rse_skip_regs(old_bspstore, slots) - old_bspstore) * 8;
+ if (ar_bspstore + size > r12) {
+ msg = "no room for blocked state";
+ goto no_mod;
}
ia64_mca_modify_comm(previous_current);
@@ -1491,7 +1443,7 @@ static struct irqaction mca_cpep_irqaction = {
* format most of the fields.
*/
-static void __cpuinit
+static void
format_mca_init_stack(void *mca_data, unsigned long offset,
const char *type, int cpu)
{
@@ -1515,7 +1467,7 @@ format_mca_init_stack(void *mca_data, unsigned long offset,
/* Do per-CPU MCA-related initialization. */
-void __cpuinit
+void __devinit
ia64_mca_cpu_init(void *cpu_data)
{
void *pal_vaddr;
diff --git a/trunk/arch/ia64/kernel/mca_drv.c b/trunk/arch/ia64/kernel/mca_drv.c
index 37c88eb55873..e883d85906db 100644
--- a/trunk/arch/ia64/kernel/mca_drv.c
+++ b/trunk/arch/ia64/kernel/mca_drv.c
@@ -6,7 +6,6 @@
* Copyright (C) Hidetoshi Seto (seto.hidetoshi@jp.fujitsu.com)
* Copyright (C) 2005 Silicon Graphics, Inc
* Copyright (C) 2005 Keith Owens
- * Copyright (C) 2006 Russ Anderson
*/
#include
#include
@@ -122,12 +121,11 @@ mca_page_isolate(unsigned long paddr)
*/
void
-mca_handler_bh(unsigned long paddr, void *iip, unsigned long ipsr)
+mca_handler_bh(unsigned long paddr)
{
- printk(KERN_ERR "OS_MCA: process [cpu %d, pid: %d, uid: %d, "
- "iip: %p, psr: 0x%lx,paddr: 0x%lx](%s) encounters MCA.\n",
- raw_smp_processor_id(), current->pid, current->uid,
- iip, ipsr, paddr, current->comm);
+ printk(KERN_ERR
+ "OS_MCA: process [pid: %d](%s) encounters MCA (paddr=%lx)\n",
+ current->pid, current->comm, paddr);
spin_lock(&mca_bh_lock);
switch (mca_page_isolate(paddr)) {
@@ -444,26 +442,21 @@ recover_from_read_error(slidx_table_t *slidx,
if (!peidx_bottom(peidx) || !(peidx_bottom(peidx)->valid.minstate))
return 0;
psr1 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_ipsr);
- psr2 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_xpsr);
/*
* Check the privilege level of interrupted context.
* If it is user-mode, then terminate affected process.
*/
-
- pmsa = sos->pal_min_state;
- if (psr1->cpl != 0 ||
- ((psr2->cpl != 0) && mca_recover_range(pmsa->pmsa_iip))) {
+ if (psr1->cpl != 0) {
smei = peidx_bus_check(peidx, 0);
if (smei->valid.target_identifier) {
/*
* setup for resume to bottom half of MCA,
* "mca_handler_bhhook"
*/
- /* pass to bhhook as argument (gr8, ...) */
+ pmsa = sos->pal_min_state;
+ /* pass to bhhook as 1st argument (gr8) */
pmsa->pmsa_gr[8-1] = smei->target_identifier;
- pmsa->pmsa_gr[9-1] = pmsa->pmsa_iip;
- pmsa->pmsa_gr[10-1] = pmsa->pmsa_ipsr;
/* set interrupted return address (but no use) */
pmsa->pmsa_br0 = pmsa->pmsa_iip;
/* change resume address to bottom half */
@@ -473,7 +466,6 @@ recover_from_read_error(slidx_table_t *slidx,
psr2 = (struct ia64_psr *)&pmsa->pmsa_ipsr;
psr2->cpl = 0;
psr2->ri = 0;
- psr2->bn = 1;
psr2->i = 0;
return 1;
diff --git a/trunk/arch/ia64/kernel/mca_drv.h b/trunk/arch/ia64/kernel/mca_drv.h
index 31a2e52bb16f..e2f6fa1e0ef6 100644
--- a/trunk/arch/ia64/kernel/mca_drv.h
+++ b/trunk/arch/ia64/kernel/mca_drv.h
@@ -111,10 +111,3 @@ typedef struct slidx_table {
slidx_foreach_entry(__pos, &((slidx)->sec)) { __count++; }\
__count; })
-struct mca_table_entry {
- int start_addr; /* location-relative starting address of MCA recoverable range */
- int end_addr; /* location-relative ending address of MCA recoverable range */
-};
-
-extern const struct mca_table_entry *search_mca_tables (unsigned long addr);
-extern int mca_recover_range(unsigned long);
diff --git a/trunk/arch/ia64/kernel/mca_drv_asm.S b/trunk/arch/ia64/kernel/mca_drv_asm.S
index e6a580d354b9..3f298ee4d00c 100644
--- a/trunk/arch/ia64/kernel/mca_drv_asm.S
+++ b/trunk/arch/ia64/kernel/mca_drv_asm.S
@@ -14,12 +14,15 @@
GLOBAL_ENTRY(mca_handler_bhhook)
invala // clear RSE ?
+ ;;
cover
;;
clrrrb
;;
- alloc r16=ar.pfs,0,2,3,0 // make a new frame
+ alloc r16=ar.pfs,0,2,1,0 // make a new frame
+ ;;
mov ar.rsc=0
+ ;;
mov r13=IA64_KR(CURRENT) // current task pointer
;;
mov r2=r13
@@ -27,6 +30,7 @@ GLOBAL_ENTRY(mca_handler_bhhook)
addl r22=IA64_RBS_OFFSET,r2
;;
mov ar.bspstore=r22
+ ;;
addl sp=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r2
;;
adds r2=IA64_TASK_THREAD_ON_USTACK_OFFSET,r13
@@ -36,12 +40,12 @@ GLOBAL_ENTRY(mca_handler_bhhook)
movl loc1=mca_handler_bh // recovery C function
;;
mov out0=r8 // poisoned address
- mov out1=r9 // iip
- mov out2=r10 // psr
mov b6=loc1
;;
mov loc1=rp
- ssm psr.i | psr.ic
+ ;;
+ ssm psr.i
+ ;;
br.call.sptk.many rp=b6 // does not return ...
;;
mov ar.pfs=loc0
@@ -49,4 +53,5 @@ GLOBAL_ENTRY(mca_handler_bhhook)
;;
mov r8=r0
br.ret.sptk.many rp
+ ;;
END(mca_handler_bhhook)
diff --git a/trunk/arch/ia64/kernel/numa.c b/trunk/arch/ia64/kernel/numa.c
index 0766493d4d00..a68ce6678092 100644
--- a/trunk/arch/ia64/kernel/numa.c
+++ b/trunk/arch/ia64/kernel/numa.c
@@ -25,7 +25,7 @@
#include
#include
-u16 cpu_to_node_map[NR_CPUS] __cacheline_aligned;
+u8 cpu_to_node_map[NR_CPUS] __cacheline_aligned;
EXPORT_SYMBOL(cpu_to_node_map);
cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
diff --git a/trunk/arch/ia64/kernel/patch.c b/trunk/arch/ia64/kernel/patch.c
index bc11bb096f58..6a4ac7d70b35 100644
--- a/trunk/arch/ia64/kernel/patch.c
+++ b/trunk/arch/ia64/kernel/patch.c
@@ -115,7 +115,7 @@ ia64_patch_vtop (unsigned long start, unsigned long end)
ia64_srlz_i();
}
-void __init
+void
ia64_patch_mckinley_e9 (unsigned long start, unsigned long end)
{
static int first_time = 1;
@@ -149,7 +149,7 @@ ia64_patch_mckinley_e9 (unsigned long start, unsigned long end)
ia64_srlz_i();
}
-static void __init
+static void
patch_fsyscall_table (unsigned long start, unsigned long end)
{
extern unsigned long fsyscall_table[NR_syscalls];
@@ -166,7 +166,7 @@ patch_fsyscall_table (unsigned long start, unsigned long end)
ia64_srlz_i();
}
-static void __init
+static void
patch_brl_fsys_bubble_down (unsigned long start, unsigned long end)
{
extern char fsys_bubble_down[];
@@ -184,7 +184,7 @@ patch_brl_fsys_bubble_down (unsigned long start, unsigned long end)
ia64_srlz_i();
}
-void __init
+void
ia64_patch_gate (void)
{
# define START(name) ((unsigned long) __start_gate_##name##_patchlist)
diff --git a/trunk/arch/ia64/kernel/ptrace.c b/trunk/arch/ia64/kernel/ptrace.c
index 9887c8787e7a..eaed14aac6aa 100644
--- a/trunk/arch/ia64/kernel/ptrace.c
+++ b/trunk/arch/ia64/kernel/ptrace.c
@@ -1656,14 +1656,8 @@ syscall_trace_leave (long arg0, long arg1, long arg2, long arg3,
long arg4, long arg5, long arg6, long arg7,
struct pt_regs regs)
{
- if (unlikely(current->audit_context)) {
- int success = AUDITSC_RESULT(regs.r10);
- long result = regs.r8;
-
- if (success != AUDITSC_SUCCESS)
- result = -result;
- audit_syscall_exit(current, success, result);
- }
+ if (unlikely(current->audit_context))
+ audit_syscall_exit(current, AUDITSC_RESULT(regs.r10), regs.r8);
if (test_thread_flag(TIF_SYSCALL_TRACE)
&& (current->ptrace & PT_PTRACED))
diff --git a/trunk/arch/ia64/kernel/setup.c b/trunk/arch/ia64/kernel/setup.c
index eb388e271b2b..3258e09278d0 100644
--- a/trunk/arch/ia64/kernel/setup.c
+++ b/trunk/arch/ia64/kernel/setup.c
@@ -41,6 +41,7 @@
#include
#include
#include
+#include
#include
#include
@@ -130,8 +131,8 @@ EXPORT_SYMBOL(ia64_max_iommu_merge_mask);
/*
* We use a special marker for the end of memory and it uses the extra (+1) slot
*/
-struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1] __initdata;
-int num_rsvd_regions __initdata;
+struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1];
+int num_rsvd_regions;
/*
@@ -140,7 +141,7 @@ int num_rsvd_regions __initdata;
* caller-specified function is called with the memory ranges that remain after filtering.
* This routine does not assume the incoming segments are sorted.
*/
-int __init
+int
filter_rsvd_memory (unsigned long start, unsigned long end, void *arg)
{
unsigned long range_start, range_end, prev_start;
@@ -176,7 +177,7 @@ filter_rsvd_memory (unsigned long start, unsigned long end, void *arg)
return 0;
}
-static void __init
+static void
sort_regions (struct rsvd_region *rsvd_region, int max)
{
int j;
@@ -217,7 +218,7 @@ __initcall(register_memory);
* initrd, etc. There are currently %IA64_MAX_RSVD_REGIONS defined,
* see include/asm-ia64/meminit.h if you need to define more.
*/
-void __init
+void
reserve_memory (void)
{
int n = 0;
@@ -269,7 +270,7 @@ reserve_memory (void)
* Grab the initrd start and end from the boot parameter struct given us by
* the boot loader.
*/
-void __init
+void
find_initrd (void)
{
#ifdef CONFIG_BLK_DEV_INITRD
@@ -361,7 +362,7 @@ mark_bsp_online (void)
}
#ifdef CONFIG_SMP
-static void __init
+static void
check_for_logical_procs (void)
{
pal_logical_to_physical_t info;
@@ -388,14 +389,6 @@ check_for_logical_procs (void)
}
#endif
-static __initdata int nomca;
-static __init int setup_nomca(char *s)
-{
- nomca = 1;
- return 0;
-}
-early_param("nomca", setup_nomca);
-
void __init
setup_arch (char **cmdline_p)
{
@@ -409,15 +402,35 @@ setup_arch (char **cmdline_p)
efi_init();
io_port_init();
- parse_early_param();
-
#ifdef CONFIG_IA64_GENERIC
- machvec_init(NULL);
+ {
+ const char *mvec_name = strstr (*cmdline_p, "machvec=");
+ char str[64];
+
+ if (mvec_name) {
+ const char *end;
+ size_t len;
+
+ mvec_name += 8;
+ end = strchr (mvec_name, ' ');
+ if (end)
+ len = end - mvec_name;
+ else
+ len = strlen (mvec_name);
+ len = min(len, sizeof (str) - 1);
+ strncpy (str, mvec_name, len);
+ str[len] = '\0';
+ mvec_name = str;
+ } else
+ mvec_name = acpi_get_sysname();
+ machvec_init(mvec_name);
+ }
#endif
if (early_console_setup(*cmdline_p) == 0)
mark_bsp_online();
+ parse_early_param();
#ifdef CONFIG_ACPI
/* Initialize the ACPI boot-time table parser */
acpi_table_init();
@@ -480,7 +493,7 @@ setup_arch (char **cmdline_p)
#endif
/* enable IA-64 Machine Check Abort Handling unless disabled */
- if (!nomca)
+ if (!strstr(saved_command_line, "nomca"))
ia64_mca_init();
platform_setup(cmdline_p);
@@ -610,7 +623,7 @@ struct seq_operations cpuinfo_op = {
.show = show_cpuinfo
};
-static void __cpuinit
+void
identify_cpu (struct cpuinfo_ia64 *c)
{
union {
@@ -687,7 +700,7 @@ setup_per_cpu_areas (void)
* In addition, the minimum of the i-cache stride sizes is calculated for
* "flush_icache_range()".
*/
-static void __cpuinit
+static void
get_max_cacheline_size (void)
{
unsigned long line_size, max = 1;
@@ -750,10 +763,10 @@ get_max_cacheline_size (void)
* cpu_init() initializes state that is per-CPU. This function acts
* as a 'CPU state barrier', nothing should get across.
*/
-void __cpuinit
+void
cpu_init (void)
{
- extern void __cpuinit ia64_mmu_init (void *);
+ extern void __devinit ia64_mmu_init (void *);
unsigned long num_phys_stacked;
pal_vm_info_2_u_t vmi;
unsigned int max_ctx;
@@ -881,7 +894,7 @@ void sched_cacheflush(void)
ia64_sal_cache_flush(3);
}
-void __init
+void
check_bugs (void)
{
ia64_patch_mckinley_e9((unsigned long) __start___mckinley_e9_bundles,
diff --git a/trunk/arch/ia64/kernel/smpboot.c b/trunk/arch/ia64/kernel/smpboot.c
index 44e9547878ac..c4b633b36dab 100644
--- a/trunk/arch/ia64/kernel/smpboot.c
+++ b/trunk/arch/ia64/kernel/smpboot.c
@@ -624,7 +624,31 @@ void __devinit smp_prepare_boot_cpu(void)
per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;
}
+/*
+ * mt_info[] is a temporary store for all info returned by
+ * PAL_LOGICAL_TO_PHYSICAL, to be copied into cpuinfo_ia64 when the
+ * specific cpu comes.
+ */
+static struct {
+ __u32 socket_id;
+ __u16 core_id;
+ __u16 thread_id;
+ __u16 proc_fixed_addr;
+ __u8 valid;
+} mt_info[NR_CPUS] __devinitdata;
+
#ifdef CONFIG_HOTPLUG_CPU
+static inline void
+remove_from_mtinfo(int cpu)
+{
+ int i;
+
+ for_each_cpu(i)
+ if (mt_info[i].valid && mt_info[i].socket_id ==
+ cpu_data(cpu)->socket_id)
+ mt_info[i].valid = 0;
+}
+
static inline void
clear_cpu_sibling_map(int cpu)
{
@@ -654,6 +678,12 @@ remove_siblinginfo(int cpu)
/* remove it from all sibling map's */
clear_cpu_sibling_map(cpu);
+
+ /* if this cpu is the last in the core group, remove all its info
+ * from mt_info structure
+ */
+ if (last)
+ remove_from_mtinfo(cpu);
}
extern void fixup_irqs(void);
@@ -848,6 +878,40 @@ init_smp_config(void)
ia64_sal_strerror(sal_ret));
}
+static inline int __devinit
+check_for_mtinfo_index(void)
+{
+ int i;
+
+ for_each_cpu(i)
+ if (!mt_info[i].valid)
+ return i;
+
+ return -1;
+}
+
+/*
+ * Search the mt_info to find out if this socket's cid/tid information is
+ * cached or not. If the socket exists, fill in the core_id and thread_id
+ * in cpuinfo
+ */
+static int __devinit
+check_for_new_socket(__u16 logical_address, struct cpuinfo_ia64 *c)
+{
+ int i;
+ __u32 sid = c->socket_id;
+
+ for_each_cpu(i) {
+ if (mt_info[i].valid && mt_info[i].proc_fixed_addr == logical_address
+ && mt_info[i].socket_id == sid) {
+ c->core_id = mt_info[i].core_id;
+ c->thread_id = mt_info[i].thread_id;
+ return 1; /* not a new socket */
+ }
+ }
+ return 0;
+}
+
/*
* identify_siblings(cpu) gets called from identify_cpu. This populates the
* information related to logical execution units in per_cpu_data structure.
@@ -857,12 +921,14 @@ identify_siblings(struct cpuinfo_ia64 *c)
{
s64 status;
u16 pltid;
+ u64 proc_fixed_addr;
+ int count, i;
pal_logical_to_physical_t info;
if (smp_num_cpucores == 1 && smp_num_siblings == 1)
return;
- if ((status = ia64_pal_logical_to_phys(-1, &info)) != PAL_STATUS_SUCCESS) {
+ if ((status = ia64_pal_logical_to_phys(0, &info)) != PAL_STATUS_SUCCESS) {
printk(KERN_ERR "ia64_pal_logical_to_phys failed with %ld\n",
status);
return;
@@ -871,12 +937,47 @@ identify_siblings(struct cpuinfo_ia64 *c)
printk(KERN_ERR "ia64_sal_pltid failed with %ld\n", status);
return;
}
+ if ((status = ia64_pal_fixed_addr(&proc_fixed_addr)) != PAL_STATUS_SUCCESS) {
+ printk(KERN_ERR "ia64_pal_fixed_addr failed with %ld\n", status);
+ return;
+ }
c->socket_id = (pltid << 8) | info.overview_ppid;
c->cores_per_socket = info.overview_cpp;
c->threads_per_core = info.overview_tpc;
- c->num_log = info.overview_num_log;
+ count = c->num_log = info.overview_num_log;
- c->core_id = info.log1_cid;
- c->thread_id = info.log1_tid;
+ /* If the thread and core id information is already cached, then
+ * we will simply update cpu_info and return. Otherwise, we will
+ * do the PAL calls and cache core and thread id's of all the siblings.
+ */
+ if (check_for_new_socket(proc_fixed_addr, c))
+ return;
+
+ for (i = 0; i < count; i++) {
+ int index;
+
+ if (i && (status = ia64_pal_logical_to_phys(i, &info))
+ != PAL_STATUS_SUCCESS) {
+ printk(KERN_ERR "ia64_pal_logical_to_phys failed"
+ " with %ld\n", status);
+ return;
+ }
+ if (info.log2_la == proc_fixed_addr) {
+ c->core_id = info.log1_cid;
+ c->thread_id = info.log1_tid;
+ }
+
+ index = check_for_mtinfo_index();
+ /* We will not do the mt_info caching optimization in this case.
+ */
+ if (index < 0)
+ continue;
+
+ mt_info[index].valid = 1;
+ mt_info[index].socket_id = c->socket_id;
+ mt_info[index].core_id = info.log1_cid;
+ mt_info[index].thread_id = info.log1_tid;
+ mt_info[index].proc_fixed_addr = info.log2_la;
+ }
}
diff --git a/trunk/arch/ia64/kernel/vmlinux.lds.S b/trunk/arch/ia64/kernel/vmlinux.lds.S
index 0b9e56dd7f05..73af6267d2ef 100644
--- a/trunk/arch/ia64/kernel/vmlinux.lds.S
+++ b/trunk/arch/ia64/kernel/vmlinux.lds.S
@@ -70,9 +70,34 @@ SECTIONS
__stop___ex_table = .;
}
+ .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET)
+ {
+ __start___vtop_patchlist = .;
+ *(.data.patch.vtop)
+ __end___vtop_patchlist = .;
+ }
+
+ .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET)
+ {
+ __start___mckinley_e9_bundles = .;
+ *(.data.patch.mckinley_e9)
+ __end___mckinley_e9_bundles = .;
+ }
+
/* Global data */
_data = .;
+#if defined(CONFIG_IA64_GENERIC)
+ /* Machine Vector */
+ . = ALIGN(16);
+ .machvec : AT(ADDR(.machvec) - LOAD_OFFSET)
+ {
+ machvec_start = .;
+ *(.machvec)
+ machvec_end = .;
+ }
+#endif
+
/* Unwind info & table: */
. = ALIGN(8);
.IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - LOAD_OFFSET)
@@ -129,41 +154,6 @@ SECTIONS
*(.initcall7.init)
__initcall_end = .;
}
-
- /* MCA table */
- . = ALIGN(16);
- __mca_table : AT(ADDR(__mca_table) - LOAD_OFFSET)
- {
- __start___mca_table = .;
- *(__mca_table)
- __stop___mca_table = .;
- }
-
- .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET)
- {
- __start___vtop_patchlist = .;
- *(.data.patch.vtop)
- __end___vtop_patchlist = .;
- }
-
- .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET)
- {
- __start___mckinley_e9_bundles = .;
- *(.data.patch.mckinley_e9)
- __end___mckinley_e9_bundles = .;
- }
-
-#if defined(CONFIG_IA64_GENERIC)
- /* Machine Vector */
- . = ALIGN(16);
- .machvec : AT(ADDR(.machvec) - LOAD_OFFSET)
- {
- machvec_start = .;
- *(.machvec)
- machvec_end = .;
- }
-#endif
-
__con_initcall_start = .;
.con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET)
{ *(.con_initcall.init) }
diff --git a/trunk/arch/ia64/mm/contig.c b/trunk/arch/ia64/mm/contig.c
index 84fd1c14c8a9..9855ba318094 100644
--- a/trunk/arch/ia64/mm/contig.c
+++ b/trunk/arch/ia64/mm/contig.c
@@ -97,7 +97,7 @@ find_max_pfn (unsigned long start, unsigned long end, void *arg)
* Find a place to put the bootmap and return its starting address in
* bootmap_start. This address must be page-aligned.
*/
-static int __init
+int
find_bootmap_location (unsigned long start, unsigned long end, void *arg)
{
unsigned long needed = *(unsigned long *)arg;
@@ -141,7 +141,7 @@ find_bootmap_location (unsigned long start, unsigned long end, void *arg)
* Walk the EFI memory map and find usable memory for the system, taking
* into account reserved areas.
*/
-void __init
+void
find_memory (void)
{
unsigned long bootmap_size;
@@ -176,7 +176,7 @@ find_memory (void)
*
* Allocate and setup per-cpu data areas.
*/
-void * __cpuinit
+void *
per_cpu_init (void)
{
void *cpu_data;
@@ -228,7 +228,7 @@ count_dma_pages (u64 start, u64 end, void *arg)
* Set up the page tables.
*/
-void __init
+void
paging_init (void)
{
unsigned long max_dma;
diff --git a/trunk/arch/ia64/mm/discontig.c b/trunk/arch/ia64/mm/discontig.c
index 2f5e44862e91..573d5cc63e2b 100644
--- a/trunk/arch/ia64/mm/discontig.c
+++ b/trunk/arch/ia64/mm/discontig.c
@@ -525,7 +525,7 @@ void __init find_memory(void)
* find_pernode_space() does most of this already, we just need to set
* local_per_cpu_offset
*/
-void __cpuinit *per_cpu_init(void)
+void *per_cpu_init(void)
{
int cpu;
static int first_time = 1;
diff --git a/trunk/arch/ia64/mm/hugetlbpage.c b/trunk/arch/ia64/mm/hugetlbpage.c
index 8d506710fdbd..9dbc7dadd165 100644
--- a/trunk/arch/ia64/mm/hugetlbpage.c
+++ b/trunk/arch/ia64/mm/hugetlbpage.c
@@ -113,7 +113,8 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb,
unsigned long floor, unsigned long ceiling)
{
/*
- * This is called to free hugetlb page tables.
+ * This is called only when is_hugepage_only_range(addr,),
+ * and it follows that is_hugepage_only_range(end,) also.
*
* The offset of these addresses from the base of the hugetlb
* region must be scaled down by HPAGE_SIZE/PAGE_SIZE so that
@@ -125,9 +126,9 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb,
addr = htlbpage_to_page(addr);
end = htlbpage_to_page(end);
- if (REGION_NUMBER(floor) == RGN_HPAGE)
+ if (is_hugepage_only_range(tlb->mm, floor, HPAGE_SIZE))
floor = htlbpage_to_page(floor);
- if (REGION_NUMBER(ceiling) == RGN_HPAGE)
+ if (is_hugepage_only_range(tlb->mm, ceiling, HPAGE_SIZE))
ceiling = htlbpage_to_page(ceiling);
free_pgd_range(tlb, addr, end, floor, ceiling);
diff --git a/trunk/arch/ia64/mm/init.c b/trunk/arch/ia64/mm/init.c
index ff4f31fcd330..08d94e6bfa18 100644
--- a/trunk/arch/ia64/mm/init.c
+++ b/trunk/arch/ia64/mm/init.c
@@ -206,7 +206,7 @@ free_initmem (void)
(__init_end - __init_begin) >> 10);
}
-void __init
+void
free_initrd_mem (unsigned long start, unsigned long end)
{
struct page *page;
@@ -261,7 +261,7 @@ free_initrd_mem (unsigned long start, unsigned long end)
/*
* This installs a clean page in the kernel's page table.
*/
-static struct page * __init
+struct page *
put_kernel_page (struct page *page, unsigned long address, pgprot_t pgprot)
{
pgd_t *pgd;
@@ -294,7 +294,7 @@ put_kernel_page (struct page *page, unsigned long address, pgprot_t pgprot)
return page;
}
-static void __init
+static void
setup_gate (void)
{
struct page *page;
@@ -411,7 +411,7 @@ ia64_mmu_init (void *my_cpu_data)
#ifdef CONFIG_VIRTUAL_MEM_MAP
-int __init
+int
create_mem_map_page_table (u64 start, u64 end, void *arg)
{
unsigned long address, start_page, end_page;
@@ -519,7 +519,7 @@ ia64_pfn_valid (unsigned long pfn)
}
EXPORT_SYMBOL(ia64_pfn_valid);
-int __init
+int
find_largest_hole (u64 start, u64 end, void *arg)
{
u64 *max_gap = arg;
@@ -535,7 +535,7 @@ find_largest_hole (u64 start, u64 end, void *arg)
}
#endif /* CONFIG_VIRTUAL_MEM_MAP */
-static int __init
+static int
count_reserved_pages (u64 start, u64 end, void *arg)
{
unsigned long num_reserved = 0;
@@ -556,7 +556,7 @@ count_reserved_pages (u64 start, u64 end, void *arg)
* purposes.
*/
-static int nolwsys __initdata;
+static int nolwsys;
static int __init
nolwsys_setup (char *s)
@@ -567,7 +567,7 @@ nolwsys_setup (char *s)
__setup("nolwsys", nolwsys_setup);
-void __init
+void
mem_init (void)
{
long reserved_pages, codesize, datasize, initsize;
diff --git a/trunk/arch/ia64/sn/kernel/bte.c b/trunk/arch/ia64/sn/kernel/bte.c
index e952ef4f6d91..1f11db470d90 100644
--- a/trunk/arch/ia64/sn/kernel/bte.c
+++ b/trunk/arch/ia64/sn/kernel/bte.c
@@ -36,7 +36,7 @@ static struct bteinfo_s *bte_if_on_node(nasid_t nasid, int interface)
nodepda_t *tmp_nodepda;
if (nasid_to_cnodeid(nasid) == -1)
- return (struct bteinfo_s *)NULL;
+ return (struct bteinfo_s *)NULL;;
tmp_nodepda = NODEPDA(nasid_to_cnodeid(nasid));
return &tmp_nodepda->bte_if[interface];
diff --git a/trunk/arch/ia64/sn/kernel/io_init.c b/trunk/arch/ia64/sn/kernel/io_init.c
index 5101ac462643..dfb3f2902379 100644
--- a/trunk/arch/ia64/sn/kernel/io_init.c
+++ b/trunk/arch/ia64/sn/kernel/io_init.c
@@ -13,8 +13,6 @@
#include
#include
#include
-#include
-#include
#include
#include
#include
@@ -712,36 +710,9 @@ cnodeid_get_geoid(cnodeid_t cnode)
return hubdev->hdi_geoid;
}
-void sn_generate_path(struct pci_bus *pci_bus, char *address)
-{
- nasid_t nasid;
- cnodeid_t cnode;
- geoid_t geoid;
- moduleid_t moduleid;
- u16 bricktype;
-
- nasid = NASID_GET(SN_PCIBUS_BUSSOFT(pci_bus)->bs_base);
- cnode = nasid_to_cnodeid(nasid);
- geoid = cnodeid_get_geoid(cnode);
- moduleid = geo_module(geoid);
-
- sprintf(address, "module_%c%c%c%c%.2d",
- '0'+RACK_GET_CLASS(MODULE_GET_RACK(moduleid)),
- '0'+RACK_GET_GROUP(MODULE_GET_RACK(moduleid)),
- '0'+RACK_GET_NUM(MODULE_GET_RACK(moduleid)),
- MODULE_GET_BTCHAR(moduleid), MODULE_GET_BPOS(moduleid));
-
- /* Tollhouse requires slot id to be displayed */
- bricktype = MODULE_GET_BTYPE(moduleid);
- if ((bricktype == L1_BRICKTYPE_191010) ||
- (bricktype == L1_BRICKTYPE_1932))
- sprintf(address, "%s^%d", address, geo_slot(geoid));
-}
-
subsys_initcall(sn_pci_init);
EXPORT_SYMBOL(sn_pci_fixup_slot);
EXPORT_SYMBOL(sn_pci_unfixup_slot);
EXPORT_SYMBOL(sn_pci_controller_fixup);
EXPORT_SYMBOL(sn_bus_store_sysdata);
EXPORT_SYMBOL(sn_bus_free_sysdata);
-EXPORT_SYMBOL(sn_generate_path);
diff --git a/trunk/arch/ia64/sn/kernel/irq.c b/trunk/arch/ia64/sn/kernel/irq.c
index c265e02f5036..c373113d073a 100644
--- a/trunk/arch/ia64/sn/kernel/irq.c
+++ b/trunk/arch/ia64/sn/kernel/irq.c
@@ -350,6 +350,9 @@ static void force_interrupt(int irq)
static void sn_check_intr(int irq, struct sn_irq_info *sn_irq_info)
{
u64 regval;
+ int irr_reg_num;
+ int irr_bit;
+ u64 irr_reg;
struct pcidev_info *pcidev_info;
struct pcibus_info *pcibus_info;
@@ -370,7 +373,23 @@ static void sn_check_intr(int irq, struct sn_irq_info *sn_irq_info)
pdi_pcibus_info;
regval = pcireg_intr_status_get(pcibus_info);
- if (!ia64_get_irr(irq_to_vector(irq))) {
+ irr_reg_num = irq_to_vector(irq) / 64;
+ irr_bit = irq_to_vector(irq) % 64;
+ switch (irr_reg_num) {
+ case 0:
+ irr_reg = ia64_getreg(_IA64_REG_CR_IRR0);
+ break;
+ case 1:
+ irr_reg = ia64_getreg(_IA64_REG_CR_IRR1);
+ break;
+ case 2:
+ irr_reg = ia64_getreg(_IA64_REG_CR_IRR2);
+ break;
+ case 3:
+ irr_reg = ia64_getreg(_IA64_REG_CR_IRR3);
+ break;
+ }
+ if (!test_bit(irr_bit, &irr_reg)) {
if (!test_bit(irq, pda->sn_in_service_ivecs)) {
regval &= 0xff;
if (sn_irq_info->irq_int_bit & regval &
diff --git a/trunk/arch/ia64/sn/kernel/tiocx.c b/trunk/arch/ia64/sn/kernel/tiocx.c
index feaf1a6e8101..99cb28e74295 100644
--- a/trunk/arch/ia64/sn/kernel/tiocx.c
+++ b/trunk/arch/ia64/sn/kernel/tiocx.c
@@ -369,15 +369,9 @@ static void tio_corelet_reset(nasid_t nasid, int corelet)
static int is_fpga_tio(int nasid, int *bt)
{
- u16 ioboard_type;
- s64 rc;
+ int ioboard_type;
- rc = ia64_sn_sysctl_ioboard_get(nasid, &ioboard_type);
- if (rc) {
- printk(KERN_WARNING "ia64_sn_sysctl_ioboard_get failed: %ld\n",
- rc);
- return 0;
- }
+ ioboard_type = ia64_sn_sysctl_ioboard_get(nasid);
switch (ioboard_type) {
case L1_BRICKTYPE_SA:
diff --git a/trunk/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/trunk/arch/ia64/sn/pci/pcibr/pcibr_provider.c
index ab1211ef0176..98f716bd92f0 100644
--- a/trunk/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+++ b/trunk/arch/ia64/sn/pci/pcibr/pcibr_provider.c
@@ -74,22 +74,6 @@ static int sal_pcibr_error_interrupt(struct pcibus_info *soft)
return (int)ret_stuff.v0;
}
-u16 sn_ioboard_to_pci_bus(struct pci_bus *pci_bus)
-{
- s64 rc;
- u16 ioboard;
- nasid_t nasid = NASID_GET(SN_PCIBUS_BUSSOFT(pci_bus)->bs_base);
-
- rc = ia64_sn_sysctl_ioboard_get(nasid, &ioboard);
- if (rc) {
- printk(KERN_WARNING "ia64_sn_sysctl_ioboard_get failed: %ld\n",
- rc);
- return 0;
- }
-
- return ioboard;
-}
-
/*
* PCI Bridge Error interrupt handler. Gets invoked whenever a PCI
* bridge sends an error interrupt.
@@ -271,4 +255,3 @@ pcibr_init_provider(void)
EXPORT_SYMBOL_GPL(sal_pcibr_slot_enable);
EXPORT_SYMBOL_GPL(sal_pcibr_slot_disable);
-EXPORT_SYMBOL_GPL(sn_ioboard_to_pci_bus);
diff --git a/trunk/arch/ia64/sn/pci/tioca_provider.c b/trunk/arch/ia64/sn/pci/tioca_provider.c
index be0176912968..7571a4025529 100644
--- a/trunk/arch/ia64/sn/pci/tioca_provider.c
+++ b/trunk/arch/ia64/sn/pci/tioca_provider.c
@@ -377,7 +377,7 @@ tioca_dma_mapped(struct pci_dev *pdev, u64 paddr, size_t req_size)
struct tioca_dmamap *ca_dmamap;
void *map;
unsigned long flags;
- struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(pdev);
+ struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(pdev);;
tioca_common = (struct tioca_common *)pcidev_info->pdi_pcibus_info;
tioca_kern = (struct tioca_kernel *)tioca_common->ca_kernel_private;
diff --git a/trunk/arch/m32r/Kconfig.debug b/trunk/arch/m32r/Kconfig.debug
index 2e1019ddbb22..bbf711bab69e 100644
--- a/trunk/arch/m32r/Kconfig.debug
+++ b/trunk/arch/m32r/Kconfig.debug
@@ -19,7 +19,7 @@ config DEBUG_STACK_USAGE
This option will slow down process creation somewhat.
config DEBUG_PAGEALLOC
- bool "Debug page memory allocations"
+ bool "Page alloc debugging"
depends on DEBUG_KERNEL && BROKEN
help
Unmap pages from the kernel linear mapping after free_pages().
diff --git a/trunk/arch/m32r/Makefile b/trunk/arch/m32r/Makefile
index f219c47d334f..4b3c90ba926c 100644
--- a/trunk/arch/m32r/Makefile
+++ b/trunk/arch/m32r/Makefile
@@ -1,9 +1,6 @@
#
# m32r/Makefile
#
-# This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies.
-#
LDFLAGS :=
OBJCOPYFLAGS := -O binary -R .note -R .comment -S
@@ -42,7 +39,7 @@ drivers-$(CONFIG_OPROFILE) += arch/m32r/oprofile/
boot := arch/m32r/boot
-PHONY += zImage
+.PHONY: zImage
all: zImage
diff --git a/trunk/arch/m32r/kernel/irq.c b/trunk/arch/m32r/kernel/irq.c
index a4634b06f675..1ce63926a3c0 100644
--- a/trunk/arch/m32r/kernel/irq.c
+++ b/trunk/arch/m32r/kernel/irq.c
@@ -37,8 +37,9 @@ int show_interrupts(struct seq_file *p, void *v)
if (i == 0) {
seq_printf(p, " ");
- for_each_online_cpu(j)
- seq_printf(p, "CPU%d ",j);
+ for (j=0; jtypename);
seq_printf(p, " %s", action->name);
diff --git a/trunk/arch/m68k/bvme6000/rtc.c b/trunk/arch/m68k/bvme6000/rtc.c
index 15c16b62dff5..703cbc6dc9cc 100644
--- a/trunk/arch/m68k/bvme6000/rtc.c
+++ b/trunk/arch/m68k/bvme6000/rtc.c
@@ -18,7 +18,6 @@
#include
#include /* For struct rtc_time and ioctls, etc */
#include
-#include
#include
#include
@@ -33,6 +32,9 @@
* ioctls.
*/
+#define BCD2BIN(val) (((val)&15) + ((val)>>4)*10)
+#define BIN2BCD(val) ((((val)/10)<<4) + (val)%10)
+
static unsigned char days_in_mo[] =
{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
diff --git a/trunk/arch/m68k/kernel/process.c b/trunk/arch/m68k/kernel/process.c
index 33648efb772e..2d8ad0727b6b 100644
--- a/trunk/arch/m68k/kernel/process.c
+++ b/trunk/arch/m68k/kernel/process.c
@@ -77,7 +77,7 @@ unsigned long thread_saved_pc(struct task_struct *tsk)
/*
* The idle loop on an m68k..
*/
-static void default_idle(void)
+void default_idle(void)
{
if (!need_resched())
#if defined(MACH_ATARI_ONLY) && !defined(CONFIG_HADES)
diff --git a/trunk/arch/m68knommu/kernel/process.c b/trunk/arch/m68knommu/kernel/process.c
index f861755ec88b..63c117dae0c3 100644
--- a/trunk/arch/m68knommu/kernel/process.c
+++ b/trunk/arch/m68knommu/kernel/process.c
@@ -51,7 +51,7 @@ EXPORT_SYMBOL(pm_power_off);
/*
* The idle loop on an m68knommu..
*/
-static void default_idle(void)
+void default_idle(void)
{
local_irq_disable();
while (!need_resched()) {
diff --git a/trunk/arch/mips/kernel/irq.c b/trunk/arch/mips/kernel/irq.c
index 3dd76b3d2967..7d93992e462c 100644
--- a/trunk/arch/mips/kernel/irq.c
+++ b/trunk/arch/mips/kernel/irq.c
@@ -68,8 +68,9 @@ int show_interrupts(struct seq_file *p, void *v)
if (i == 0) {
seq_printf(p, " ");
- for_each_online_cpu(j)
- seq_printf(p, "CPU%d ",j);
+ for (j=0; jtypename);
seq_printf(p, " %s", action->name);
diff --git a/trunk/arch/mips/kernel/smp.c b/trunk/arch/mips/kernel/smp.c
index 78d171bfa331..06ed90752424 100644
--- a/trunk/arch/mips/kernel/smp.c
+++ b/trunk/arch/mips/kernel/smp.c
@@ -167,8 +167,8 @@ int smp_call_function (void (*func) (void *info), void *info, int retry,
mb();
/* Send a message to all other CPUs and wait for them to respond */
- for_each_online_cpu(i)
- if (i != cpu)
+ for (i = 0; i < NR_CPUS; i++)
+ if (cpu_online(i) && i != cpu)
core_send_ipi(i, SMP_CALL_FUNCTION);
/* Wait for response */
diff --git a/trunk/arch/mips/kernel/sysirix.c b/trunk/arch/mips/kernel/sysirix.c
index 5407b784cd01..0fc3730a294f 100644
--- a/trunk/arch/mips/kernel/sysirix.c
+++ b/trunk/arch/mips/kernel/sysirix.c
@@ -645,7 +645,27 @@ static inline void getitimer_real(struct itimerval *value)
asmlinkage unsigned int irix_alarm(unsigned int seconds)
{
- return alarm_setitimer(seconds);
+ struct itimerval it_new, it_old;
+ unsigned int oldalarm;
+
+ if (!seconds) {
+ getitimer_real(&it_old);
+ del_timer(¤t->real_timer);
+ } else {
+ it_new.it_interval.tv_sec = it_new.it_interval.tv_usec = 0;
+ it_new.it_value.tv_sec = seconds;
+ it_new.it_value.tv_usec = 0;
+ do_setitimer(ITIMER_REAL, &it_new, &it_old);
+ }
+ oldalarm = it_old.it_value.tv_sec;
+ /*
+ * ehhh.. We can't return 0 if we have an alarm pending ...
+ * And we'd better return too much than too little anyway
+ */
+ if (it_old.it_value.tv_usec)
+ oldalarm++;
+
+ return oldalarm;
}
asmlinkage int irix_pause(void)
diff --git a/trunk/arch/mips/mm/dma-ip32.c b/trunk/arch/mips/mm/dma-ip32.c
index ec54ed0d26ff..a7e3072ff78d 100644
--- a/trunk/arch/mips/mm/dma-ip32.c
+++ b/trunk/arch/mips/mm/dma-ip32.c
@@ -138,7 +138,7 @@ dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
BUG();
}
- addr = virt_to_phys(ptr)&RAM_OFFSET_MASK;
+ addr = virt_to_phys(ptr)&RAM_OFFSET_MASK;;
if(dev == NULL)
addr+=CRIME_HI_MEM_BASE;
return (dma_addr_t)addr;
@@ -179,7 +179,7 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
addr = (unsigned long) page_address(sg->page)+sg->offset;
if (addr)
__dma_sync(addr, sg->length, direction);
- addr = __pa(addr)&RAM_OFFSET_MASK;
+ addr = __pa(addr)&RAM_OFFSET_MASK;;
if(dev == NULL)
addr += CRIME_HI_MEM_BASE;
sg->dma_address = (dma_addr_t)addr;
@@ -199,7 +199,7 @@ dma_addr_t dma_map_page(struct device *dev, struct page *page,
addr = (unsigned long) page_address(page) + offset;
dma_cache_wback_inv(addr, size);
- addr = __pa(addr)&RAM_OFFSET_MASK;
+ addr = __pa(addr)&RAM_OFFSET_MASK;;
if(dev == NULL)
addr += CRIME_HI_MEM_BASE;
diff --git a/trunk/arch/mips/sgi-ip27/ip27-irq.c b/trunk/arch/mips/sgi-ip27/ip27-irq.c
index 2854ac4c9be1..73e5e52781d8 100644
--- a/trunk/arch/mips/sgi-ip27/ip27-irq.c
+++ b/trunk/arch/mips/sgi-ip27/ip27-irq.c
@@ -88,9 +88,12 @@ static inline int find_level(cpuid_t *cpunum, int irq)
{
int cpu, i;
- for_each_online_cpu(cpu) {
+ for (cpu = 0; cpu <= NR_CPUS; cpu++) {
struct slice_data *si = cpu_data[cpu].data;
+ if (!cpu_online(cpu))
+ continue;
+
for (i = BASE_PCI_IRQ; i < LEVELS_PER_SLICE; i++)
if (si->level_to_irq[i] == irq) {
*cpunum = cpu;
diff --git a/trunk/arch/parisc/kernel/process.c b/trunk/arch/parisc/kernel/process.c
index 0b485ef4be89..e8dea4177113 100644
--- a/trunk/arch/parisc/kernel/process.c
+++ b/trunk/arch/parisc/kernel/process.c
@@ -54,6 +54,11 @@
#include
#include
+void default_idle(void)
+{
+ barrier();
+}
+
/*
* The idle thread. There's no useful work to be
* done, so just try to conserve power and have a
diff --git a/trunk/arch/parisc/kernel/smp.c b/trunk/arch/parisc/kernel/smp.c
index d6ac1c60a471..25564b7ca6bb 100644
--- a/trunk/arch/parisc/kernel/smp.c
+++ b/trunk/arch/parisc/kernel/smp.c
@@ -298,8 +298,8 @@ send_IPI_allbutself(enum ipi_message_type op)
{
int i;
- for_each_online_cpu(i) {
- if (i != smp_processor_id())
+ for (i = 0; i < NR_CPUS; i++) {
+ if (cpu_online(i) && i != smp_processor_id())
send_IPI_single(i, op);
}
}
@@ -643,13 +643,14 @@ int sys_cpus(int argc, char **argv)
if ( argc == 1 ){
#ifdef DUMP_MORE_STATE
- for_each_online_cpu(i) {
+ for(i=0; iainsn.insn);
- mutex_unlock(&kprobe_mutex);
+ up(&kprobe_mutex);
}
static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
diff --git a/trunk/arch/powerpc/kernel/setup-common.c b/trunk/arch/powerpc/kernel/setup-common.c
index c1d62bf11f29..be12041c0fc5 100644
--- a/trunk/arch/powerpc/kernel/setup-common.c
+++ b/trunk/arch/powerpc/kernel/setup-common.c
@@ -162,8 +162,9 @@ static int show_cpuinfo(struct seq_file *m, void *v)
#if defined(CONFIG_SMP) && defined(CONFIG_PPC32)
unsigned long bogosum = 0;
int i;
- for_each_online_cpu(i)
- bogosum += loops_per_jiffy;
+ for (i = 0; i < NR_CPUS; ++i)
+ if (cpu_online(i))
+ bogosum += loops_per_jiffy;
seq_printf(m, "total bogomips\t: %lu.%02lu\n",
bogosum/(500000/HZ), bogosum/(5000/HZ) % 100);
#endif /* CONFIG_SMP && CONFIG_PPC32 */
diff --git a/trunk/arch/powerpc/kernel/setup_32.c b/trunk/arch/powerpc/kernel/setup_32.c
index dc2770df25b3..db72a92943bf 100644
--- a/trunk/arch/powerpc/kernel/setup_32.c
+++ b/trunk/arch/powerpc/kernel/setup_32.c
@@ -272,8 +272,9 @@ int __init ppc_init(void)
if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff);
/* register CPU devices */
- for_each_cpu(i)
- register_cpu(&cpu_devices[i], i, NULL);
+ for (i = 0; i < NR_CPUS; i++)
+ if (cpu_possible(i))
+ register_cpu(&cpu_devices[i], i, NULL);
/* call platform init */
if (ppc_md.init != NULL) {
diff --git a/trunk/arch/powerpc/lib/strcase.c b/trunk/arch/powerpc/lib/strcase.c
index f8ec1eba3fdd..36b521091bbc 100644
--- a/trunk/arch/powerpc/lib/strcase.c
+++ b/trunk/arch/powerpc/lib/strcase.c
@@ -1,6 +1,4 @@
-#include
#include
-#include
int strcasecmp(const char *s1, const char *s2)
{
@@ -13,7 +11,7 @@ int strcasecmp(const char *s1, const char *s2)
return c1 - c2;
}
-int strncasecmp(const char *s1, const char *s2, size_t n)
+int strncasecmp(const char *s1, const char *s2, int n)
{
int c1, c2;
diff --git a/trunk/arch/powerpc/platforms/powermac/smp.c b/trunk/arch/powerpc/platforms/powermac/smp.c
index 1065d87fc279..6d64a9bf3474 100644
--- a/trunk/arch/powerpc/platforms/powermac/smp.c
+++ b/trunk/arch/powerpc/platforms/powermac/smp.c
@@ -191,7 +191,9 @@ static void smp_psurge_message_pass(int target, int msg)
if (num_online_cpus() < 2)
return;
- for_each_online_cpu(i) {
+ for (i = 0; i < NR_CPUS; i++) {
+ if (!cpu_online(i))
+ continue;
if (target == MSG_ALL
|| (target == MSG_ALL_BUT_SELF && i != smp_processor_id())
|| target == i) {
diff --git a/trunk/arch/ppc/8xx_io/cs4218_tdm.c b/trunk/arch/ppc/8xx_io/cs4218_tdm.c
index a892356d5c3b..49eb2a7e65c0 100644
--- a/trunk/arch/ppc/8xx_io/cs4218_tdm.c
+++ b/trunk/arch/ppc/8xx_io/cs4218_tdm.c
@@ -126,11 +126,11 @@ static int numReadBufs = 4, readbufSize = 32;
*/
static volatile cbd_t *rx_base, *rx_cur, *tx_base, *tx_cur;
-module_param(catchRadius, int, 0);
-module_param(numBufs, int, 0);
-module_param(bufSize, int, 0);
-module_param(numreadBufs, int, 0);
-module_param(readbufSize, int, 0);
+MODULE_PARM(catchRadius, "i");
+MODULE_PARM(numBufs, "i");
+MODULE_PARM(bufSize, "i");
+MODULE_PARM(numreadBufs, "i");
+MODULE_PARM(readbufSize, "i");
#define arraysize(x) (sizeof(x)/sizeof(*(x)))
#define le2be16(x) (((x)<<8 & 0xff00) | ((x)>>8 & 0x00ff))
diff --git a/trunk/arch/ppc/Makefile b/trunk/arch/ppc/Makefile
index 9fbdf54ba2be..98e940beeb3b 100644
--- a/trunk/arch/ppc/Makefile
+++ b/trunk/arch/ppc/Makefile
@@ -82,7 +82,7 @@ drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm
-PHONY += $(BOOT_TARGETS)
+.PHONY: $(BOOT_TARGETS)
all: uImage zImage
diff --git a/trunk/arch/ppc/boot/Makefile b/trunk/arch/ppc/boot/Makefile
index 84eec0bef93c..f565699a9fe0 100644
--- a/trunk/arch/ppc/boot/Makefile
+++ b/trunk/arch/ppc/boot/Makefile
@@ -1,9 +1,3 @@
-#
-# arch/ppc/boot/Makefile
-#
-# This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies.
-#
# This file is subject to the terms and conditions of the GNU General Public
# License. See the file "COPYING" in the main directory of this archive
# for more details.
@@ -28,7 +22,7 @@ subdir- += simple openfirmware
hostprogs-y := $(addprefix utils/, addnote mknote hack-coff mkprep mkbugboot mktree)
-PHONY += $(BOOT_TARGETS) $(bootdir-y)
+.PHONY: $(BOOT_TARGETS) $(bootdir-y)
$(BOOT_TARGETS): $(bootdir-y)
diff --git a/trunk/arch/ppc/boot/openfirmware/Makefile b/trunk/arch/ppc/boot/openfirmware/Makefile
index 66b739743759..2a411ec2e650 100644
--- a/trunk/arch/ppc/boot/openfirmware/Makefile
+++ b/trunk/arch/ppc/boot/openfirmware/Makefile
@@ -1,8 +1,5 @@
# Makefile for making bootable images on various OpenFirmware machines.
#
-# This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies.
-#
# Paul Mackerras January 1997
# XCOFF bootable images for PowerMacs
# Geert Uytterhoeven September 1997
@@ -89,7 +86,7 @@ $(images)/zImage.chrp-rs6k $(images)/zImage.initrd.chrp-rs6k: \
# The targets used on the make command-line
-PHONY += zImage zImage.initrd
+.PHONY: zImage zImage.initrd
zImage: $(images)/zImage.chrp \
$(images)/zImage.chrp-rs6k
@echo ' kernel: $@ is ready ($<)'
@@ -99,7 +96,7 @@ zImage.initrd: $(images)/zImage.initrd.chrp \
TFTPIMAGE := /tftpboot/zImage
-PHONY += znetboot znetboot.initrd
+.PHONY: znetboot znetboot.initrd
znetboot: $(images)/zImage.chrp
cp $(images)/zImage.chrp $(TFTPIMAGE).chrp$(END)
@echo ' kernel: $@ is ready ($<)'
diff --git a/trunk/arch/ppc/kernel/setup.c b/trunk/arch/ppc/kernel/setup.c
index 53e9deacee82..c08ab432e958 100644
--- a/trunk/arch/ppc/kernel/setup.c
+++ b/trunk/arch/ppc/kernel/setup.c
@@ -168,8 +168,9 @@ int show_cpuinfo(struct seq_file *m, void *v)
/* Show summary information */
#ifdef CONFIG_SMP
unsigned long bogosum = 0;
- for_each_online_cpu(i)
- bogosum += cpu_data[i].loops_per_jiffy;
+ for (i = 0; i < NR_CPUS; ++i)
+ if (cpu_online(i))
+ bogosum += cpu_data[i].loops_per_jiffy;
seq_printf(m, "total bogomips\t: %lu.%02lu\n",
bogosum/(500000/HZ), bogosum/(5000/HZ) % 100);
#endif /* CONFIG_SMP */
@@ -711,8 +712,9 @@ int __init ppc_init(void)
if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff);
/* register CPU devices */
- for_each_cpu(i)
- register_cpu(&cpu_devices[i], i, NULL);
+ for (i = 0; i < NR_CPUS; i++)
+ if (cpu_possible(i))
+ register_cpu(&cpu_devices[i], i, NULL);
/* call platform init */
if (ppc_md.init != NULL) {
diff --git a/trunk/arch/ppc/syslib/ppc85xx_setup.c b/trunk/arch/ppc/syslib/ppc85xx_setup.c
index 79b7089d7500..e70b34ee6275 100644
--- a/trunk/arch/ppc/syslib/ppc85xx_setup.c
+++ b/trunk/arch/ppc/syslib/ppc85xx_setup.c
@@ -235,7 +235,7 @@ mpc85xx_setup_pci2(struct pci_controller *hose)
(__ilog2(MPC85XX_PCI2_UPPER_MEM - MPC85XX_PCI2_LOWER_MEM + 1) - 1);
/* Setup outbound IO windows @ MPC85XX_PCI2_IO_BASE */
- pci->potar2 = (MPC85XX_PCI2_LOWER_IO >> 12) & 0x000fffff;
+ pci->potar2 = (MPC85XX_PCI2_LOWER_IO >> 12) & 0x000fffff;;
pci->potear2 = 0x00000000;
pci->powbar2 = (MPC85XX_PCI2_IO_BASE >> 12) & 0x000fffff;
/* Enable, IO R/W */
diff --git a/trunk/arch/s390/Kconfig b/trunk/arch/s390/Kconfig
index 2b7364ed23bc..b7ca5bf9acfc 100644
--- a/trunk/arch/s390/Kconfig
+++ b/trunk/arch/s390/Kconfig
@@ -460,8 +460,6 @@ config PCMCIA
source "drivers/base/Kconfig"
-source "drivers/connector/Kconfig"
-
source "drivers/scsi/Kconfig"
source "drivers/s390/Kconfig"
diff --git a/trunk/arch/s390/appldata/appldata_base.c b/trunk/arch/s390/appldata/appldata_base.c
index 54d35c130907..d06a8d71c71d 100644
--- a/trunk/arch/s390/appldata/appldata_base.c
+++ b/trunk/arch/s390/appldata/appldata_base.c
@@ -531,11 +531,12 @@ int appldata_register_ops(struct appldata_ops *ops)
P_ERROR("ctl_nr %i already in use!\n", ops->ctl_nr);
return -EBUSY;
}
- ops->ctl_table = kzalloc(4*sizeof(struct ctl_table), GFP_KERNEL);
+ ops->ctl_table = kmalloc(4*sizeof(struct ctl_table), GFP_KERNEL);
if (ops->ctl_table == NULL) {
P_ERROR("Not enough memory for %s ctl_table!\n", ops->name);
return -ENOMEM;
}
+ memset(ops->ctl_table, 0, 4*sizeof(struct ctl_table));
spin_lock(&appldata_ops_lock);
list_for_each(lh, &appldata_ops_list) {
diff --git a/trunk/arch/s390/kernel/debug.c b/trunk/arch/s390/kernel/debug.c
index 06a3fbc12536..896d39d0e4ce 100644
--- a/trunk/arch/s390/kernel/debug.c
+++ b/trunk/arch/s390/kernel/debug.c
@@ -204,13 +204,16 @@ debug_areas_alloc(int pages_per_area, int nr_areas)
goto fail_malloc_areas2;
}
for(j = 0; j < pages_per_area; j++) {
- areas[i][j] = kzalloc(PAGE_SIZE, GFP_KERNEL);
+ areas[i][j] = (debug_entry_t*)kmalloc(PAGE_SIZE,
+ GFP_KERNEL);
if(!areas[i][j]) {
for(j--; j >=0 ; j--) {
kfree(areas[i][j]);
}
kfree(areas[i]);
goto fail_malloc_areas2;
+ } else {
+ memset(areas[i][j],0,PAGE_SIZE);
}
}
}
@@ -246,12 +249,14 @@ debug_info_alloc(char *name, int pages_per_area, int nr_areas, int buf_size,
rc = (debug_info_t*) kmalloc(sizeof(debug_info_t), GFP_KERNEL);
if(!rc)
goto fail_malloc_rc;
- rc->active_entries = kcalloc(nr_areas, sizeof(int), GFP_KERNEL);
+ rc->active_entries = (int*)kmalloc(nr_areas * sizeof(int), GFP_KERNEL);
if(!rc->active_entries)
goto fail_malloc_active_entries;
- rc->active_pages = kcalloc(nr_areas, sizeof(int), GFP_KERNEL);
+ memset(rc->active_entries, 0, nr_areas * sizeof(int));
+ rc->active_pages = (int*)kmalloc(nr_areas * sizeof(int), GFP_KERNEL);
if(!rc->active_pages)
goto fail_malloc_active_pages;
+ memset(rc->active_pages, 0, nr_areas * sizeof(int));
if((mode == ALL_AREAS) && (pages_per_area != 0)){
rc->areas = debug_areas_alloc(pages_per_area, nr_areas);
if(!rc->areas)
diff --git a/trunk/arch/s390/kernel/process.c b/trunk/arch/s390/kernel/process.c
index 99182a415fe7..da6fbae8df91 100644
--- a/trunk/arch/s390/kernel/process.c
+++ b/trunk/arch/s390/kernel/process.c
@@ -103,7 +103,7 @@ extern void s390_handle_mcck(void);
/*
* The idle loop on a S390...
*/
-static void default_idle(void)
+void default_idle(void)
{
int cpu, rc;
diff --git a/trunk/arch/s390/kernel/setup.c b/trunk/arch/s390/kernel/setup.c
index 0a04e4a564b2..24f62f16c0e5 100644
--- a/trunk/arch/s390/kernel/setup.c
+++ b/trunk/arch/s390/kernel/setup.c
@@ -78,6 +78,8 @@ extern int _text,_etext, _edata, _end;
#include
+static char command_line[COMMAND_LINE_SIZE] = { 0, };
+
static struct resource code_resource = {
.name = "Kernel code",
.start = (unsigned long) &_text,
@@ -333,38 +335,63 @@ add_memory_hole(unsigned long start, unsigned long end)
}
}
-static int __init early_parse_mem(char *p)
-{
- memory_end = memparse(p, &p);
- return 0;
-}
-early_param("mem", early_parse_mem);
-
-/*
- * "ipldelay=XXX[sm]" sets ipl delay in seconds or minutes
- */
-static int __init early_parse_ipldelay(char *p)
+static void __init
+parse_cmdline_early(char **cmdline_p)
{
+ char c = ' ', cn, *to = command_line, *from = COMMAND_LINE;
unsigned long delay = 0;
- delay = simple_strtoul(p, &p, 0);
+ /* Save unparsed command line copy for /proc/cmdline */
+ memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
+ saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
- switch (*p) {
- case 's':
- case 'S':
- delay *= 1000000;
- break;
- case 'm':
- case 'M':
- delay *= 60 * 1000000;
+ for (;;) {
+ /*
+ * "mem=XXX[kKmM]" sets memsize
+ */
+ if (c == ' ' && strncmp(from, "mem=", 4) == 0) {
+ memory_end = simple_strtoul(from+4, &from, 0);
+ if ( *from == 'K' || *from == 'k' ) {
+ memory_end = memory_end << 10;
+ from++;
+ } else if ( *from == 'M' || *from == 'm' ) {
+ memory_end = memory_end << 20;
+ from++;
+ }
+ }
+ /*
+ * "ipldelay=XXX[sm]" sets ipl delay in seconds or minutes
+ */
+ if (c == ' ' && strncmp(from, "ipldelay=", 9) == 0) {
+ delay = simple_strtoul(from+9, &from, 0);
+ if (*from == 's' || *from == 'S') {
+ delay = delay*1000000;
+ from++;
+ } else if (*from == 'm' || *from == 'M') {
+ delay = delay*60*1000000;
+ from++;
+ }
+ /* now wait for the requested amount of time */
+ udelay(delay);
+ }
+ cn = *(from++);
+ if (!cn)
+ break;
+ if (cn == '\n')
+ cn = ' '; /* replace newlines with space */
+ if (cn == 0x0d)
+ cn = ' '; /* replace 0x0d with space */
+ if (cn == ' ' && c == ' ')
+ continue; /* remove additional spaces */
+ c = cn;
+ if (to - command_line >= COMMAND_LINE_SIZE)
+ break;
+ *(to++) = c;
}
-
- /* now wait for the requested amount of time */
- udelay(delay);
-
- return 0;
+ if (c == ' ' && to > command_line) to--;
+ *to = '\0';
+ *cmdline_p = command_line;
}
-early_param("ipldelay", early_parse_ipldelay);
static void __init
setup_lowcore(void)
@@ -553,26 +580,9 @@ setup_arch(char **cmdline_p)
"We are running native (64 bit mode)\n");
#endif /* CONFIG_64BIT */
- /* Save unparsed command line copy for /proc/cmdline */
- strlcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
-
- *cmdline_p = COMMAND_LINE;
- *(*cmdline_p + COMMAND_LINE_SIZE - 1) = '\0';
-
ROOT_DEV = Root_RAM0;
-
- init_mm.start_code = PAGE_OFFSET;
- init_mm.end_code = (unsigned long) &_etext;
- init_mm.end_data = (unsigned long) &_edata;
- init_mm.brk = (unsigned long) &_end;
-
- memory_end = memory_size;
-
- parse_early_param();
-
#ifndef CONFIG_64BIT
- memory_end &= ~0x400000UL;
-
+ memory_end = memory_size & ~0x400000UL; /* align memory end to 4MB */
/*
* We need some free virtual space to be able to do vmalloc.
* On a machine with 2GB memory we make sure that we have at
@@ -581,9 +591,17 @@ setup_arch(char **cmdline_p)
if (memory_end > 1920*1024*1024)
memory_end = 1920*1024*1024;
#else /* CONFIG_64BIT */
- memory_end &= ~0x200000UL;
+ memory_end = memory_size & ~0x200000UL; /* detected in head.s */
#endif /* CONFIG_64BIT */
+ init_mm.start_code = PAGE_OFFSET;
+ init_mm.end_code = (unsigned long) &_etext;
+ init_mm.end_data = (unsigned long) &_edata;
+ init_mm.brk = (unsigned long) &_end;
+
+ parse_cmdline_early(cmdline_p);
+ parse_early_param();
+
setup_memory();
setup_resources();
setup_lowcore();
diff --git a/trunk/arch/s390/kernel/smp.c b/trunk/arch/s390/kernel/smp.c
index 2b8841f85534..7dbe00c76c6b 100644
--- a/trunk/arch/s390/kernel/smp.c
+++ b/trunk/arch/s390/kernel/smp.c
@@ -665,9 +665,7 @@ __cpu_up(unsigned int cpu)
cpu_lowcore->current_task = (unsigned long) idle;
cpu_lowcore->cpu_data.cpu_nr = cpu;
eieio();
-
- while (signal_processor(cpu,sigp_restart) == sigp_busy)
- udelay(10);
+ signal_processor(cpu,sigp_restart);
while (!cpu_online(cpu))
cpu_relax();
@@ -801,7 +799,9 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
*/
print_cpu_info(&S390_lowcore.cpu_data);
- for_each_cpu(i) {
+ for(i = 0; i < NR_CPUS; i++) {
+ if (!cpu_possible(i))
+ continue;
lowcore_ptr[i] = (struct _lowcore *)
__get_free_pages(GFP_KERNEL|GFP_DMA,
sizeof(void*) == 8 ? 1 : 0);
diff --git a/trunk/arch/s390/mm/cmm.c b/trunk/arch/s390/mm/cmm.c
index 51596f429235..b075ab499d05 100644
--- a/trunk/arch/s390/mm/cmm.c
+++ b/trunk/arch/s390/mm/cmm.c
@@ -339,19 +339,19 @@ static struct ctl_table cmm_table[] = {
{
.ctl_name = VM_CMM_PAGES,
.procname = "cmm_pages",
- .mode = 0644,
+ .mode = 0600,
.proc_handler = &cmm_pages_handler,
},
{
.ctl_name = VM_CMM_TIMED_PAGES,
.procname = "cmm_timed_pages",
- .mode = 0644,
+ .mode = 0600,
.proc_handler = &cmm_pages_handler,
},
{
.ctl_name = VM_CMM_TIMEOUT,
.procname = "cmm_timeout",
- .mode = 0644,
+ .mode = 0600,
.proc_handler = &cmm_timeout_handler,
},
{ .ctl_name = 0 }
diff --git a/trunk/arch/sh/Makefile b/trunk/arch/sh/Makefile
index c72e17a96eed..08c9515c4806 100644
--- a/trunk/arch/sh/Makefile
+++ b/trunk/arch/sh/Makefile
@@ -172,7 +172,7 @@ include/asm-sh/.mach: $(wildcard include/config/sh/*.h) include/config/MARKER
archprepare: maketools include/asm-sh/.cpu include/asm-sh/.mach
-PHONY += maketools FORCE
+.PHONY: maketools FORCE
maketools: include/linux/version.h FORCE
$(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h
diff --git a/trunk/arch/sh/kernel/irq.c b/trunk/arch/sh/kernel/irq.c
index b56e79632f24..6883c00728cb 100644
--- a/trunk/arch/sh/kernel/irq.c
+++ b/trunk/arch/sh/kernel/irq.c
@@ -35,8 +35,9 @@ int show_interrupts(struct seq_file *p, void *v)
if (i == 0) {
seq_puts(p, " ");
- for_each_online_cpu(j)
- seq_printf(p, "CPU%d ",j);
+ for (j=0; j
#include
#include
+#include
#include
#include
diff --git a/trunk/arch/sh/kernel/setup.c b/trunk/arch/sh/kernel/setup.c
index c0e79843f580..a067a34e0b64 100644
--- a/trunk/arch/sh/kernel/setup.c
+++ b/trunk/arch/sh/kernel/setup.c
@@ -404,8 +404,9 @@ static int __init topology_init(void)
{
int cpu_id;
- for_each_cpu(cpu_id)
- register_cpu(&cpu[cpu_id], cpu_id, NULL);
+ for (cpu_id = 0; cpu_id < NR_CPUS; cpu_id++)
+ if (cpu_possible(cpu_id))
+ register_cpu(&cpu[cpu_id], cpu_id, NULL);
return 0;
}
diff --git a/trunk/arch/sh64/kernel/irq.c b/trunk/arch/sh64/kernel/irq.c
index d69879c0e063..9fc2b71dbd84 100644
--- a/trunk/arch/sh64/kernel/irq.c
+++ b/trunk/arch/sh64/kernel/irq.c
@@ -53,8 +53,9 @@ int show_interrupts(struct seq_file *p, void *v)
if (i == 0) {
seq_puts(p, " ");
- for_each_online_cpu(j)
- seq_printf(p, "CPU%d ",j);
+ for (j=0; jhandler) {
printk("Trying to free free IRQ%d\n",irq);
@@ -238,7 +236,7 @@ void free_irq(unsigned int irq, void *dev_id)
for (; action; action = action->next) {
if (action->dev_id == dev_id)
break;
- actionp = &action->next;
+ tmp = action;
}
if (!action) {
printk("Trying to free free shared IRQ%d\n",irq);
@@ -257,8 +255,11 @@ void free_irq(unsigned int irq, void *dev_id)
irq, action->name);
goto out_unlock;
}
-
- *actionp = action->next;
+
+ if (action && tmp)
+ tmp->next = action->next;
+ else
+ *(cpu_irq + irq_action) = action->next;
spin_unlock_irqrestore(&irq_action_lock, flags);
@@ -268,7 +269,7 @@ void free_irq(unsigned int irq, void *dev_id)
kfree(action);
- if (!sparc_irq[cpu_irq].action)
+ if (!(*(cpu_irq + irq_action)))
disable_irq(irq);
out_unlock:
@@ -287,11 +288,8 @@ EXPORT_SYMBOL(free_irq);
#ifdef CONFIG_SMP
void synchronize_irq(unsigned int irq)
{
- unsigned int cpu_irq;
-
- cpu_irq = irq & (NR_IRQS - 1);
- while (sparc_irq[cpu_irq].flags & SPARC_IRQ_INPROGRESS)
- cpu_relax();
+ printk("synchronize_irq says: implement me!\n");
+ BUG();
}
#endif /* SMP */
@@ -302,7 +300,7 @@ void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs)
unsigned int cpu_irq;
cpu_irq = irq & (NR_IRQS - 1);
- action = sparc_irq[cpu_irq].action;
+ action = *(cpu_irq + irq_action);
printk("IO device interrupt, irq = %d\n", irq);
printk("PC = %08lx NPC = %08lx FP=%08lx\n", regs->pc,
@@ -333,8 +331,7 @@ void handler_irq(int irq, struct pt_regs * regs)
if(irq < 10)
smp4m_irq_rotate(cpu);
#endif
- action = sparc_irq[irq].action;
- sparc_irq[irq].flags |= SPARC_IRQ_INPROGRESS;
+ action = *(irq + irq_action);
kstat_cpu(cpu).irqs[irq]++;
do {
if (!action || !action->handler)
@@ -342,7 +339,6 @@ void handler_irq(int irq, struct pt_regs * regs)
action->handler(irq, action->dev_id, regs);
action = action->next;
} while (action);
- sparc_irq[irq].flags &= ~SPARC_IRQ_INPROGRESS;
enable_pil_irq(irq);
irq_exit();
}
@@ -394,7 +390,7 @@ int request_fast_irq(unsigned int irq,
spin_lock_irqsave(&irq_action_lock, flags);
- action = sparc_irq[cpu_irq].action;
+ action = *(cpu_irq + irq_action);
if(action) {
if(action->flags & SA_SHIRQ)
panic("Trying to register fast irq when already shared.\n");
@@ -457,7 +453,7 @@ int request_fast_irq(unsigned int irq,
action->dev_id = NULL;
action->next = NULL;
- sparc_irq[cpu_irq].action = action;
+ *(cpu_irq + irq_action) = action;
enable_irq(irq);
@@ -472,7 +468,7 @@ int request_irq(unsigned int irq,
irqreturn_t (*handler)(int, void *, struct pt_regs *),
unsigned long irqflags, const char * devname, void *dev_id)
{
- struct irqaction * action, **actionp;
+ struct irqaction * action, *tmp = NULL;
unsigned long flags;
unsigned int cpu_irq;
int ret;
@@ -495,20 +491,20 @@ int request_irq(unsigned int irq,
spin_lock_irqsave(&irq_action_lock, flags);
- actionp = &sparc_irq[cpu_irq].action;
- action = *actionp;
+ action = *(cpu_irq + irq_action);
if (action) {
- if (!(action->flags & SA_SHIRQ) || !(irqflags & SA_SHIRQ)) {
+ if ((action->flags & SA_SHIRQ) && (irqflags & SA_SHIRQ)) {
+ for (tmp = action; tmp->next; tmp = tmp->next);
+ } else {
ret = -EBUSY;
goto out_unlock;
}
- if ((action->flags & SA_INTERRUPT) != (irqflags & SA_INTERRUPT)) {
+ if ((action->flags & SA_INTERRUPT) ^ (irqflags & SA_INTERRUPT)) {
printk("Attempt to mix fast and slow interrupts on IRQ%d denied\n", irq);
ret = -EBUSY;
goto out_unlock;
- }
- for ( ; action; action = *actionp)
- actionp = &action->next;
+ }
+ action = NULL; /* Or else! */
}
/* If this is flagged as statically allocated then we use our
@@ -537,7 +533,10 @@ int request_irq(unsigned int irq,
action->next = NULL;
action->dev_id = dev_id;
- *actionp = action;
+ if (tmp)
+ tmp->next = action;
+ else
+ *(cpu_irq + irq_action) = action;
enable_irq(irq);
diff --git a/trunk/arch/sparc/kernel/smp.c b/trunk/arch/sparc/kernel/smp.c
index 2be812115197..c6e721d8f477 100644
--- a/trunk/arch/sparc/kernel/smp.c
+++ b/trunk/arch/sparc/kernel/smp.c
@@ -45,7 +45,6 @@ volatile int __cpu_logical_map[NR_CPUS];
cpumask_t cpu_online_map = CPU_MASK_NONE;
cpumask_t phys_cpu_present_map = CPU_MASK_NONE;
-cpumask_t smp_commenced_mask = CPU_MASK_NONE;
/* The only guaranteed locking primitive available on all Sparc
* processors is 'ldstub [%reg + immediate], %dest_reg' which atomically
@@ -58,6 +57,11 @@ cpumask_t smp_commenced_mask = CPU_MASK_NONE;
/* Used to make bitops atomic */
unsigned char bitops_spinlock = 0;
+volatile unsigned long ipi_count;
+
+volatile int smp_process_available=0;
+volatile int smp_commenced = 0;
+
void __init smp_store_cpu_info(int id)
{
int cpu_node;
@@ -75,22 +79,6 @@ void __init smp_store_cpu_info(int id)
void __init smp_cpus_done(unsigned int max_cpus)
{
- extern void smp4m_smp_done(void);
- unsigned long bogosum = 0;
- int cpu, num;
-
- for (cpu = 0, num = 0; cpu < NR_CPUS; cpu++)
- if (cpu_online(cpu)) {
- num++;
- bogosum += cpu_data(cpu).udelay_val;
- }
-
- printk("Total of %d processors activated (%lu.%02lu BogoMIPS).\n",
- num, bogosum/(500000/HZ),
- (bogosum/(5000/HZ))%100);
-
- BUG_ON(sparc_cpu_model != sun4m);
- smp4m_smp_done();
}
void cpu_panic(void)
@@ -101,6 +89,17 @@ void cpu_panic(void)
struct linux_prom_registers smp_penguin_ctable __initdata = { 0 };
+void __init smp_boot_cpus(void)
+{
+ extern void smp4m_boot_cpus(void);
+ extern void smp4d_boot_cpus(void);
+
+ if (sparc_cpu_model == sun4m)
+ smp4m_boot_cpus();
+ else
+ smp4d_boot_cpus();
+}
+
void smp_send_reschedule(int cpu)
{
/* See sparc64 */
@@ -244,8 +243,9 @@ int setup_profiling_timer(unsigned int multiplier)
return -EINVAL;
spin_lock_irqsave(&prof_setup_lock, flags);
- for_each_cpu(i) {
- load_profile_irq(i, lvl14_resolution / multiplier);
+ for(i = 0; i < NR_CPUS; i++) {
+ if (cpu_possible(i))
+ load_profile_irq(i, lvl14_resolution / multiplier);
prof_multiplier(i) = multiplier;
}
spin_unlock_irqrestore(&prof_setup_lock, flags);
@@ -253,73 +253,33 @@ int setup_profiling_timer(unsigned int multiplier)
return 0;
}
-void __init smp_prepare_cpus(unsigned int max_cpus)
+void __init smp_prepare_cpus(unsigned int maxcpus)
{
- extern void smp4m_boot_cpus(void);
- int i, cpuid, ncpus, extra;
-
- BUG_ON(sparc_cpu_model != sun4m);
- printk("Entering SMP Mode...\n");
-
- ncpus = 1;
- extra = 0;
- for (i = 0; !cpu_find_by_instance(i, NULL, &cpuid); i++) {
- if (cpuid == boot_cpu_id)
- continue;
- if (cpuid < NR_CPUS && ncpus++ < max_cpus)
- cpu_set(cpuid, phys_cpu_present_map);
- else
- extra++;
- }
- if (max_cpus >= NR_CPUS && extra)
- printk("Warning: NR_CPUS is too low to start all cpus\n");
-
- smp_store_cpu_info(boot_cpu_id);
-
- smp4m_boot_cpus();
}
void __devinit smp_prepare_boot_cpu(void)
{
- int cpuid = hard_smp_processor_id();
-
- if (cpuid >= NR_CPUS) {
- prom_printf("Serious problem, boot cpu id >= NR_CPUS\n");
- prom_halt();
- }
- if (cpuid != 0)
- printk("boot cpu id != 0, this could work but is untested\n");
-
- current_thread_info()->cpu = cpuid;
- cpu_set(cpuid, cpu_online_map);
- cpu_set(cpuid, phys_cpu_present_map);
+ current_thread_info()->cpu = hard_smp_processor_id();
+ cpu_set(smp_processor_id(), cpu_online_map);
+ cpu_set(smp_processor_id(), phys_cpu_present_map);
}
int __devinit __cpu_up(unsigned int cpu)
{
- extern int smp4m_boot_one_cpu(int);
- int ret;
-
- ret = smp4m_boot_one_cpu(cpu);
-
- if (!ret) {
- cpu_set(cpu, smp_commenced_mask);
- while (!cpu_online(cpu))
- mb();
- }
- return ret;
+ panic("smp doesn't work\n");
}
void smp_bogo(struct seq_file *m)
{
int i;
- for_each_online_cpu(i) {
- seq_printf(m,
- "Cpu%dBogo\t: %lu.%02lu\n",
- i,
- cpu_data(i).udelay_val/(500000/HZ),
- (cpu_data(i).udelay_val/(5000/HZ))%100);
+ for (i = 0; i < NR_CPUS; i++) {
+ if (cpu_online(i))
+ seq_printf(m,
+ "Cpu%dBogo\t: %lu.%02lu\n",
+ i,
+ cpu_data(i).udelay_val/(500000/HZ),
+ (cpu_data(i).udelay_val/(5000/HZ))%100);
}
}
@@ -328,6 +288,8 @@ void smp_info(struct seq_file *m)
int i;
seq_printf(m, "State:\n");
- for_each_online_cpu(i)
- seq_printf(m, "CPU%d\t\t: online\n", i);
+ for (i = 0; i < NR_CPUS; i++) {
+ if (cpu_online(i))
+ seq_printf(m, "CPU%d\t\t: online\n", i);
+ }
}
diff --git a/trunk/arch/sparc/kernel/sparc_ksyms.c b/trunk/arch/sparc/kernel/sparc_ksyms.c
index 2c21d7907635..19b25399d7e4 100644
--- a/trunk/arch/sparc/kernel/sparc_ksyms.c
+++ b/trunk/arch/sparc/kernel/sparc_ksyms.c
@@ -136,6 +136,10 @@ EXPORT_PER_CPU_SYMBOL(__cpu_data);
/* IRQ implementation. */
EXPORT_SYMBOL(synchronize_irq);
+/* Misc SMP information */
+EXPORT_SYMBOL(__cpu_number_map);
+EXPORT_SYMBOL(__cpu_logical_map);
+
/* CPU online map and active count. */
EXPORT_SYMBOL(cpu_online_map);
EXPORT_SYMBOL(phys_cpu_present_map);
diff --git a/trunk/arch/sparc/kernel/sun4d_irq.c b/trunk/arch/sparc/kernel/sun4d_irq.c
index ca656d9bd6fd..52621348a56c 100644
--- a/trunk/arch/sparc/kernel/sun4d_irq.c
+++ b/trunk/arch/sparc/kernel/sun4d_irq.c
@@ -54,7 +54,7 @@ unsigned char cpu_leds[32];
unsigned char sbus_tid[32];
#endif
-static struct irqaction *irq_action[NR_IRQS];
+extern struct irqaction *irq_action[];
extern spinlock_t irq_action_lock;
struct sbus_action {
@@ -103,9 +103,11 @@ found_it: seq_printf(p, "%3d: ", i);
#ifndef CONFIG_SMP
seq_printf(p, "%10u ", kstat_irqs(i));
#else
- for_each_online_cpu(x)
- seq_printf(p, "%10u ",
- kstat_cpu(cpu_logical_map(x)).irqs[i]);
+ for (x = 0; x < NR_CPUS; x++) {
+ if (cpu_online(x))
+ seq_printf(p, "%10u ",
+ kstat_cpu(cpu_logical_map(x)).irqs[i]);
+ }
#endif
seq_printf(p, "%c %s",
(action->flags & SA_INTERRUPT) ? '+' : ' ',
diff --git a/trunk/arch/sparc/kernel/sun4d_smp.c b/trunk/arch/sparc/kernel/sun4d_smp.c
index b141b7ee6717..4219dd2ce3a2 100644
--- a/trunk/arch/sparc/kernel/sun4d_smp.c
+++ b/trunk/arch/sparc/kernel/sun4d_smp.c
@@ -46,16 +46,14 @@ extern volatile int smp_processors_ready;
extern int smp_num_cpus;
static int smp_highest_cpu;
extern volatile unsigned long cpu_callin_map[NR_CPUS];
-extern cpuinfo_sparc cpu_data[NR_CPUS];
+extern struct cpuinfo_sparc cpu_data[NR_CPUS];
extern unsigned char boot_cpu_id;
extern int smp_activated;
extern volatile int __cpu_number_map[NR_CPUS];
extern volatile int __cpu_logical_map[NR_CPUS];
extern volatile unsigned long ipi_count;
extern volatile int smp_process_available;
-
-extern cpumask_t smp_commenced_mask;
-
+extern volatile int smp_commenced;
extern int __smp4d_processor_id(void);
/* #define SMP_DEBUG */
@@ -138,7 +136,7 @@ void __init smp4d_callin(void)
local_irq_enable(); /* We don't allow PIL 14 yet */
- while (!cpu_isset(cpuid, smp_commenced_mask))
+ while(!smp_commenced)
barrier();
spin_lock_irqsave(&sun4d_imsk_lock, flags);
@@ -251,9 +249,11 @@ void __init smp4d_boot_cpus(void)
} else {
unsigned long bogosum = 0;
- for_each_present_cpu(i) {
- bogosum += cpu_data(i).udelay_val;
- smp_highest_cpu = i;
+ for(i = 0; i < NR_CPUS; i++) {
+ if (cpu_isset(i, cpu_present_map)) {
+ bogosum += cpu_data(i).udelay_val;
+ smp_highest_cpu = i;
+ }
}
SMP_PRINTK(("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n", cpucount + 1, bogosum/(500000/HZ), (bogosum/(5000/HZ))%100));
printk("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n",
diff --git a/trunk/arch/sparc/kernel/sun4m_smp.c b/trunk/arch/sparc/kernel/sun4m_smp.c
index 70b375a4c2c2..fbbd8a474c4c 100644
--- a/trunk/arch/sparc/kernel/sun4m_smp.c
+++ b/trunk/arch/sparc/kernel/sun4m_smp.c
@@ -40,11 +40,15 @@ extern ctxd_t *srmmu_ctx_table_phys;
extern void calibrate_delay(void);
extern volatile int smp_processors_ready;
+extern int smp_num_cpus;
extern volatile unsigned long cpu_callin_map[NR_CPUS];
extern unsigned char boot_cpu_id;
-
-extern cpumask_t smp_commenced_mask;
-
+extern int smp_activated;
+extern volatile int __cpu_number_map[NR_CPUS];
+extern volatile int __cpu_logical_map[NR_CPUS];
+extern volatile unsigned long ipi_count;
+extern volatile int smp_process_available;
+extern volatile int smp_commenced;
extern int __smp4m_processor_id(void);
/*#define SMP_DEBUG*/
@@ -73,6 +77,8 @@ void __init smp4m_callin(void)
local_flush_cache_all();
local_flush_tlb_all();
+ set_irq_udt(boot_cpu_id);
+
/* Get our local ticker going. */
smp_setup_percpu_timer();
@@ -89,9 +95,8 @@ void __init smp4m_callin(void)
* to call the scheduler code.
*/
/* Allow master to continue. */
- swap(&cpu_callin_map[cpuid], 1);
+ swap((unsigned long *)&cpu_callin_map[cpuid], 1);
- /* XXX: What's up with all the flushes? */
local_flush_cache_all();
local_flush_tlb_all();
@@ -106,14 +111,13 @@ void __init smp4m_callin(void)
atomic_inc(&init_mm.mm_count);
current->active_mm = &init_mm;
- while (!cpu_isset(cpuid, smp_commenced_mask))
- mb();
+ while(!smp_commenced)
+ barrier();
- local_irq_enable();
+ local_flush_cache_all();
+ local_flush_tlb_all();
- cpu_set(cpuid, cpu_online_map);
- /* last one in gets all the interrupts (for testing) */
- set_irq_udt(boot_cpu_id);
+ local_irq_enable();
}
extern void init_IRQ(void);
@@ -130,76 +134,104 @@ extern unsigned long trapbase_cpu3[];
void __init smp4m_boot_cpus(void)
{
- smp_setup_percpu_timer();
- local_flush_cache_all();
-}
+ int cpucount = 0;
+ int i, mid;
-int smp4m_boot_one_cpu(int i)
-{
- extern unsigned long sun4m_cpu_startup;
- unsigned long *entry = &sun4m_cpu_startup;
- struct task_struct *p;
- int timeout;
- int cpu_node;
+ printk("Entering SMP Mode...\n");
- cpu_find_by_mid(i, &cpu_node);
+ local_irq_enable();
+ cpus_clear(cpu_present_map);
- /* Cook up an idler for this guy. */
- p = fork_idle(i);
- current_set[i] = task_thread_info(p);
- /* See trampoline.S for details... */
- entry += ((i-1) * 3);
+ for (i = 0; !cpu_find_by_instance(i, NULL, &mid); i++)
+ cpu_set(mid, cpu_present_map);
- /*
- * Initialize the contexts table
- * Since the call to prom_startcpu() trashes the structure,
- * we need to re-initialize it for each cpu
- */
- smp_penguin_ctable.which_io = 0;
- smp_penguin_ctable.phys_addr = (unsigned int) srmmu_ctx_table_phys;
- smp_penguin_ctable.reg_size = 0;
-
- /* whirrr, whirrr, whirrrrrrrrr... */
- printk("Starting CPU %d at %p\n", i, entry);
- local_flush_cache_all();
- prom_startcpu(cpu_node,
- &smp_penguin_ctable, 0, (char *)entry);
-
- /* wheee... it's going... */
- for(timeout = 0; timeout < 10000; timeout++) {
- if(cpu_callin_map[i])
- break;
- udelay(200);
+ for(i=0; i < NR_CPUS; i++) {
+ __cpu_number_map[i] = -1;
+ __cpu_logical_map[i] = -1;
}
- if (!(cpu_callin_map[i])) {
- printk("Processor %d is stuck.\n", i);
- return -ENODEV;
- }
+ __cpu_number_map[boot_cpu_id] = 0;
+ __cpu_logical_map[0] = boot_cpu_id;
+ current_thread_info()->cpu = boot_cpu_id;
+ smp_store_cpu_info(boot_cpu_id);
+ set_irq_udt(boot_cpu_id);
+ smp_setup_percpu_timer();
local_flush_cache_all();
- return 0;
-}
-
-void __init smp4m_smp_done(void)
-{
- int i, first;
- int *prev;
-
- /* setup cpu list for irq rotation */
- first = 0;
- prev = &first;
- for (i = 0; i < NR_CPUS; i++) {
- if (cpu_online(i)) {
- *prev = i;
- prev = &cpu_data(i).next;
+ if(cpu_find_by_instance(1, NULL, NULL))
+ return; /* Not an MP box. */
+ for(i = 0; i < NR_CPUS; i++) {
+ if(i == boot_cpu_id)
+ continue;
+
+ if (cpu_isset(i, cpu_present_map)) {
+ extern unsigned long sun4m_cpu_startup;
+ unsigned long *entry = &sun4m_cpu_startup;
+ struct task_struct *p;
+ int timeout;
+
+ /* Cook up an idler for this guy. */
+ p = fork_idle(i);
+ cpucount++;
+ current_set[i] = task_thread_info(p);
+ /* See trampoline.S for details... */
+ entry += ((i-1) * 3);
+
+ /*
+ * Initialize the contexts table
+ * Since the call to prom_startcpu() trashes the structure,
+ * we need to re-initialize it for each cpu
+ */
+ smp_penguin_ctable.which_io = 0;
+ smp_penguin_ctable.phys_addr = (unsigned int) srmmu_ctx_table_phys;
+ smp_penguin_ctable.reg_size = 0;
+
+ /* whirrr, whirrr, whirrrrrrrrr... */
+ printk("Starting CPU %d at %p\n", i, entry);
+ local_flush_cache_all();
+ prom_startcpu(cpu_data(i).prom_node,
+ &smp_penguin_ctable, 0, (char *)entry);
+
+ /* wheee... it's going... */
+ for(timeout = 0; timeout < 10000; timeout++) {
+ if(cpu_callin_map[i])
+ break;
+ udelay(200);
+ }
+ if(cpu_callin_map[i]) {
+ /* Another "Red Snapper". */
+ __cpu_number_map[i] = i;
+ __cpu_logical_map[i] = i;
+ } else {
+ cpucount--;
+ printk("Processor %d is stuck.\n", i);
+ }
+ }
+ if(!(cpu_callin_map[i])) {
+ cpu_clear(i, cpu_present_map);
+ __cpu_number_map[i] = -1;
}
}
- *prev = first;
local_flush_cache_all();
+ if(cpucount == 0) {
+ printk("Error: only one Processor found.\n");
+ cpu_present_map = cpumask_of_cpu(smp_processor_id());
+ } else {
+ unsigned long bogosum = 0;
+ for(i = 0; i < NR_CPUS; i++) {
+ if (cpu_isset(i, cpu_present_map))
+ bogosum += cpu_data(i).udelay_val;
+ }
+ printk("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n",
+ cpucount + 1,
+ bogosum/(500000/HZ),
+ (bogosum/(5000/HZ))%100);
+ smp_activated = 1;
+ smp_num_cpus = cpucount + 1;
+ }
/* Free unneeded trap tables */
- if (!cpu_isset(1, cpu_present_map)) {
+ if (!cpu_isset(i, cpu_present_map)) {
ClearPageReserved(virt_to_page(trapbase_cpu1));
init_page_count(virt_to_page(trapbase_cpu1));
free_page((unsigned long)trapbase_cpu1);
@@ -233,9 +265,6 @@ void __init smp4m_smp_done(void)
*/
void smp4m_irq_rotate(int cpu)
{
- int next = cpu_data(cpu).next;
- if (next != cpu)
- set_irq_udt(next);
}
/* Cross calls, in order to work efficiently and atomically do all
@@ -262,7 +291,7 @@ void smp4m_message_pass(int target, int msg, unsigned long data, int wait)
smp_cpu_in_msg[me]++;
if(target == MSG_ALL_BUT_SELF || target == MSG_ALL) {
- mask = cpu_online_map;
+ mask = cpu_present_map;
if(target == MSG_ALL_BUT_SELF)
cpu_clear(me, mask);
for(i = 0; i < 4; i++) {
@@ -287,8 +316,8 @@ static struct smp_funcall {
unsigned long arg3;
unsigned long arg4;
unsigned long arg5;
- unsigned long processors_in[SUN4M_NCPUS]; /* Set when ipi entered. */
- unsigned long processors_out[SUN4M_NCPUS]; /* Set when ipi exited. */
+ unsigned long processors_in[NR_CPUS]; /* Set when ipi entered. */
+ unsigned long processors_out[NR_CPUS]; /* Set when ipi exited. */
} ccall_info;
static DEFINE_SPINLOCK(cross_call_lock);
@@ -297,7 +326,8 @@ static DEFINE_SPINLOCK(cross_call_lock);
void smp4m_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2,
unsigned long arg3, unsigned long arg4, unsigned long arg5)
{
- register int ncpus = SUN4M_NCPUS;
+ if(smp_processors_ready) {
+ register int ncpus = smp_num_cpus;
unsigned long flags;
spin_lock_irqsave(&cross_call_lock, flags);
@@ -312,7 +342,7 @@ void smp4m_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2,
/* Init receive/complete mapping, plus fire the IPI's off. */
{
- cpumask_t mask = cpu_online_map;
+ cpumask_t mask = cpu_present_map;
register int i;
cpu_clear(smp_processor_id(), mask);
@@ -345,6 +375,7 @@ void smp4m_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2,
}
spin_unlock_irqrestore(&cross_call_lock, flags);
+ }
}
/* Running cross calls. */
diff --git a/trunk/arch/sparc/mm/srmmu.c b/trunk/arch/sparc/mm/srmmu.c
index 58c65cc8d0d3..27b0e0ba8581 100644
--- a/trunk/arch/sparc/mm/srmmu.c
+++ b/trunk/arch/sparc/mm/srmmu.c
@@ -1302,12 +1302,7 @@ void __init srmmu_paging_init(void)
flush_cache_all();
srmmu_set_ctable_ptr((unsigned long)srmmu_ctx_table_phys);
-#ifdef CONFIG_SMP
- /* Stop from hanging here... */
- local_flush_tlb_all();
-#else
flush_tlb_all();
-#endif
poke_srmmu();
#ifdef CONFIG_SUN_IO
@@ -1424,7 +1419,6 @@ static void __init init_vac_layout(void)
max_size = vac_cache_size;
if(vac_line_size < min_line_size)
min_line_size = vac_line_size;
- //FIXME: cpus not contiguous!!
cpu++;
if (cpu >= NR_CPUS || !cpu_online(cpu))
break;
diff --git a/trunk/arch/sparc64/Kconfig.debug b/trunk/arch/sparc64/Kconfig.debug
index afe0a7720a26..3e31be494e54 100644
--- a/trunk/arch/sparc64/Kconfig.debug
+++ b/trunk/arch/sparc64/Kconfig.debug
@@ -24,7 +24,7 @@ config DEBUG_BOOTMEM
bool "Debug BOOTMEM initialization"
config DEBUG_PAGEALLOC
- bool "Debug page memory allocations"
+ bool "Page alloc debugging"
depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND
help
Unmap pages from the kernel linear mapping after free_pages().
diff --git a/trunk/arch/sparc64/kernel/irq.c b/trunk/arch/sparc64/kernel/irq.c
index 11e645c9ec50..8c93ba655b33 100644
--- a/trunk/arch/sparc64/kernel/irq.c
+++ b/trunk/arch/sparc64/kernel/irq.c
@@ -117,7 +117,9 @@ int show_interrupts(struct seq_file *p, void *v)
#ifndef CONFIG_SMP
seq_printf(p, "%10u ", kstat_irqs(i));
#else
- for_each_online_cpu(j) {
+ for (j = 0; j < NR_CPUS; j++) {
+ if (!cpu_online(j))
+ continue;
seq_printf(p, "%10u ",
kstat_cpu(j).irqs[i]);
}
@@ -727,7 +729,7 @@ void handler_irq(int irq, struct pt_regs *regs)
}
#ifdef CONFIG_BLK_DEV_FD
-extern irqreturn_t floppy_interrupt(int, void *, struct pt_regs *);
+extern irqreturn_t floppy_interrupt(int, void *, struct pt_regs *);;
/* XXX No easy way to include asm/floppy.h XXX */
extern unsigned char *pdma_vaddr;
diff --git a/trunk/arch/sparc64/kernel/smp.c b/trunk/arch/sparc64/kernel/smp.c
index 7dc28a484268..373a701c90a5 100644
--- a/trunk/arch/sparc64/kernel/smp.c
+++ b/trunk/arch/sparc64/kernel/smp.c
@@ -57,21 +57,25 @@ void smp_info(struct seq_file *m)
int i;
seq_printf(m, "State:\n");
- for_each_online_cpu(i)
- seq_printf(m, "CPU%d:\t\tonline\n", i);
+ for (i = 0; i < NR_CPUS; i++) {
+ if (cpu_online(i))
+ seq_printf(m,
+ "CPU%d:\t\tonline\n", i);
+ }
}
void smp_bogo(struct seq_file *m)
{
int i;
- for_each_online_cpu(i)
- seq_printf(m,
- "Cpu%dBogo\t: %lu.%02lu\n"
- "Cpu%dClkTck\t: %016lx\n",
- i, cpu_data(i).udelay_val / (500000/HZ),
- (cpu_data(i).udelay_val / (5000/HZ)) % 100,
- i, cpu_data(i).clock_tick);
+ for (i = 0; i < NR_CPUS; i++)
+ if (cpu_online(i))
+ seq_printf(m,
+ "Cpu%dBogo\t: %lu.%02lu\n"
+ "Cpu%dClkTck\t: %016lx\n",
+ i, cpu_data(i).udelay_val / (500000/HZ),
+ (cpu_data(i).udelay_val / (5000/HZ)) % 100,
+ i, cpu_data(i).clock_tick);
}
void __init smp_store_cpu_info(int id)
@@ -1278,7 +1282,7 @@ int setup_profiling_timer(unsigned int multiplier)
return -EINVAL;
spin_lock_irqsave(&prof_setup_lock, flags);
- for_each_cpu(i)
+ for (i = 0; i < NR_CPUS; i++)
prof_multiplier(i) = multiplier;
current_tick_offset = (timer_tick_offset / multiplier);
spin_unlock_irqrestore(&prof_setup_lock, flags);
@@ -1298,7 +1302,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
while (!cpu_find_by_instance(instance, NULL, &mid)) {
if (mid != boot_cpu_id) {
cpu_clear(mid, phys_cpu_present_map);
- cpu_clear(mid, cpu_present_map);
if (num_possible_cpus() <= max_cpus)
break;
}
@@ -1333,10 +1336,8 @@ void __init smp_setup_cpu_possible_map(void)
instance = 0;
while (!cpu_find_by_instance(instance, NULL, &mid)) {
- if (mid < NR_CPUS) {
+ if (mid < NR_CPUS)
cpu_set(mid, phys_cpu_present_map);
- cpu_set(mid, cpu_present_map);
- }
instance++;
}
}
@@ -1383,8 +1384,10 @@ void __init smp_cpus_done(unsigned int max_cpus)
unsigned long bogosum = 0;
int i;
- for_each_online_cpu(i)
- bogosum += cpu_data(i).udelay_val;
+ for (i = 0; i < NR_CPUS; i++) {
+ if (cpu_online(i))
+ bogosum += cpu_data(i).udelay_val;
+ }
printk("Total of %ld processors activated "
"(%lu.%02lu BogoMIPS).\n",
(long) num_online_cpus(),
diff --git a/trunk/arch/sparc64/mm/init.c b/trunk/arch/sparc64/mm/init.c
index 1539a8362b6f..ded63ee9c4fd 100644
--- a/trunk/arch/sparc64/mm/init.c
+++ b/trunk/arch/sparc64/mm/init.c
@@ -1828,8 +1828,8 @@ void __flush_tlb_all(void)
void online_page(struct page *page)
{
ClearPageReserved(page);
- init_page_count(page);
- __free_page(page);
+ set_page_count(page, 0);
+ free_cold_page(page);
totalram_pages++;
num_physpages++;
}
diff --git a/trunk/arch/um/Makefile b/trunk/arch/um/Makefile
index 8d14c7a831be..c58b657f0097 100644
--- a/trunk/arch/um/Makefile
+++ b/trunk/arch/um/Makefile
@@ -1,7 +1,4 @@
-#
-# This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies.
-#
+#
# Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
# Licensed under the GPL
#
@@ -91,7 +88,7 @@ CONFIG_KERNEL_HALF_GIGS ?= 0
SIZE = (($(CONFIG_NEST_LEVEL) + $(CONFIG_KERNEL_HALF_GIGS)) * 0x20000000)
-PHONY += linux
+.PHONY: linux
all: linux
diff --git a/trunk/arch/um/kernel/um_arch.c b/trunk/arch/um/kernel/um_arch.c
index 80c9c18aae94..27cdf9164422 100644
--- a/trunk/arch/um/kernel/um_arch.c
+++ b/trunk/arch/um/kernel/um_arch.c
@@ -491,16 +491,6 @@ void __init check_bugs(void)
check_devanon();
}
-void apply_alternatives(struct alt_instr *start, struct alt_instr *end)
-{
-}
-
-void alternatives_smp_module_add(struct module *mod, char *name,
- void *locks, void *locks_end,
- void *text, void *text_end)
-{
-}
-
-void alternatives_smp_module_del(struct module *mod)
+void apply_alternatives(void *start, void *end)
{
}
diff --git a/trunk/arch/v850/kernel/process.c b/trunk/arch/v850/kernel/process.c
index 57218c76925c..621111ddf907 100644
--- a/trunk/arch/v850/kernel/process.c
+++ b/trunk/arch/v850/kernel/process.c
@@ -37,7 +37,7 @@ extern void ret_from_fork (void);
/* The idle loop. */
-static void default_idle (void)
+void default_idle (void)
{
while (! need_resched ())
asm ("halt; nop; nop; nop; nop; nop" ::: "cc");
diff --git a/trunk/arch/x86_64/Kconfig b/trunk/arch/x86_64/Kconfig
index 6420baeb8c1f..e18eb79bf855 100644
--- a/trunk/arch/x86_64/Kconfig
+++ b/trunk/arch/x86_64/Kconfig
@@ -323,7 +323,7 @@ config HAVE_ARCH_EARLY_PFN_TO_NID
config NR_CPUS
int "Maximum number of CPUs (2-256)"
- range 2 255
+ range 2 256
depends on SMP
default "8"
help
@@ -364,15 +364,13 @@ config GART_IOMMU
select SWIOTLB
depends on PCI
help
- Support for hardware IOMMU in AMD's Opteron/Athlon64 Processors
- and for the bounce buffering software IOMMU.
- Needed to run systems with more than 3GB of memory properly with
- 32-bit PCI devices that do not support DAC (Double Address Cycle).
- The IOMMU can be turned off at runtime with the iommu=off parameter.
- Normally the kernel will take the right choice by itself.
- This option includes a driver for the AMD Opteron/Athlon64 IOMMU
- northbridge and a software emulation used on other systems without
- hardware IOMMU. If unsure, say Y.
+ Support the IOMMU. Needed to run systems with more than 3GB of memory
+ properly with 32-bit PCI devices that do not support DAC (Double Address
+ Cycle). The IOMMU can be turned off at runtime with the iommu=off parameter.
+ Normally the kernel will take the right choice by itself.
+ This option includes a driver for the AMD Opteron/Athlon64 northbridge IOMMU
+ and a software emulation used on other systems.
+ If unsure, say Y.
# need this always enabled with GART_IOMMU for the VIA workaround
config SWIOTLB
@@ -431,10 +429,10 @@ config CRASH_DUMP
config PHYSICAL_START
hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
default "0x1000000" if CRASH_DUMP
- default "0x200000"
+ default "0x100000"
help
This gives the physical address where the kernel is loaded. Normally
- for regular kernels this value is 0x200000 (2MB). But in the case
+ for regular kernels this value is 0x100000 (1MB). But in the case
of kexec on panic the fail safe kernel needs to run at a different
address than the panic-ed kernel. This option is used to set the load
address for kernels used to capture crash dump on being kexec'ed
@@ -466,14 +464,6 @@ config SECCOMP
source kernel/Kconfig.hz
-config REORDER
- bool "Function reordering"
- default n
- help
- This option enables the toolchain to reorder functions for a more
- optimal TLB usage. If you have pretty much any version of binutils,
- this can increase your kernel build time by roughly one minute.
-
endmenu
#
@@ -522,6 +512,16 @@ config PCI_MMCONFIG
bool "Support mmconfig PCI config space access"
depends on PCI && ACPI
+config UNORDERED_IO
+ bool "Unordered IO mapping access"
+ depends on EXPERIMENTAL
+ help
+ Use unordered stores to access IO memory mappings in device drivers.
+ Still very experimental. When a driver works on IA64/ppc64/pa-risc it should
+ work with this option, but it makes the drivers behave differently
+ from i386. Requires that the driver writer used memory barriers
+ properly.
+
source "drivers/pci/pcie/Kconfig"
source "drivers/pci/Kconfig"
diff --git a/trunk/arch/x86_64/Makefile b/trunk/arch/x86_64/Makefile
index 0fbc0283609c..d7fd46479c55 100644
--- a/trunk/arch/x86_64/Makefile
+++ b/trunk/arch/x86_64/Makefile
@@ -29,14 +29,12 @@ CHECKFLAGS += -D__x86_64__ -m64
cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)
-cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic)
CFLAGS += $(cflags-y)
CFLAGS += -m64
CFLAGS += -mno-red-zone
CFLAGS += -mcmodel=kernel
CFLAGS += -pipe
-cflags-$(CONFIG_REORDER) += -ffunction-sections
# this makes reading assembly source easier, but produces worse code
# actually it makes the kernel smaller too.
CFLAGS += -fno-reorder-blocks
@@ -69,8 +67,8 @@ drivers-$(CONFIG_OPROFILE) += arch/x86_64/oprofile/
boot := arch/x86_64/boot
-PHONY += bzImage bzlilo install archmrproper \
- fdimage fdimage144 fdimage288 archclean
+.PHONY: bzImage bzlilo install archmrproper \
+ fdimage fdimage144 fdimage288 archclean
#Default target when executing "make"
all: bzImage
diff --git a/trunk/arch/x86_64/defconfig b/trunk/arch/x86_64/defconfig
index 566ecc97ee5a..ce4de61ed85d 100644
--- a/trunk/arch/x86_64/defconfig
+++ b/trunk/arch/x86_64/defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.16-git9
-# Sat Mar 25 15:18:40 2006
+# Linux kernel version: 2.6.16-rc3-git9
+# Sat Feb 18 00:27:03 2006
#
CONFIG_X86_64=y
CONFIG_64BIT=y
@@ -38,7 +38,6 @@ CONFIG_SYSCTL=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
# CONFIG_CPUSETS is not set
-# CONFIG_RELAY is not set
CONFIG_INITRAMFS_SOURCE=""
CONFIG_UID16=y
CONFIG_VM86=y
@@ -80,7 +79,6 @@ CONFIG_STOP_MACHINE=y
# Block layer
#
CONFIG_LBD=y
-# CONFIG_BLK_DEV_IO_TRACE is not set
#
# IO Schedulers
@@ -141,6 +139,7 @@ CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
CONFIG_NR_CPUS=32
CONFIG_HOTPLUG_CPU=y
CONFIG_HPET_TIMER=y
+CONFIG_X86_PM_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
CONFIG_GART_IOMMU=y
CONFIG_SWIOTLB=y
@@ -149,13 +148,12 @@ CONFIG_X86_MCE_INTEL=y
CONFIG_X86_MCE_AMD=y
# CONFIG_KEXEC is not set
# CONFIG_CRASH_DUMP is not set
-CONFIG_PHYSICAL_START=0x200000
+CONFIG_PHYSICAL_START=0x100000
CONFIG_SECCOMP=y
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
-# CONFIG_REORDER is not set
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_ISA_DMA_API=y
@@ -191,14 +189,12 @@ CONFIG_ACPI_NUMA=y
# CONFIG_ACPI_ASUS is not set
# CONFIG_ACPI_IBM is not set
CONFIG_ACPI_TOSHIBA=y
-CONFIG_ACPI_BLACKLIST_YEAR=0
+CONFIG_ACPI_BLACKLIST_YEAR=2001
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_HOTPLUG_MEMORY=y
#
# CPU Frequency scaling
@@ -236,8 +232,10 @@ CONFIG_X86_ACPI_CPUFREQ_PROC_INTF=y
CONFIG_PCI=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_MMCONFIG=y
+CONFIG_UNORDERED_IO=y
CONFIG_PCIEPORTBUS=y
CONFIG_PCI_MSI=y
+# CONFIG_PCI_LEGACY_PROC is not set
# CONFIG_PCI_DEBUG is not set
#
@@ -296,7 +294,6 @@ CONFIG_INET_TCP_DIAG=y
CONFIG_TCP_CONG_BIC=y
CONFIG_IPV6=y
# CONFIG_IPV6_PRIVACY is not set
-# CONFIG_IPV6_ROUTER_PREF is not set
# CONFIG_INET6_AH is not set
# CONFIG_INET6_ESP is not set
# CONFIG_INET6_IPCOMP is not set
@@ -704,7 +701,6 @@ CONFIG_S2IO=m
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set
-# CONFIG_NET_WIRELESS_RTNETLINK is not set
#
# Wan interfaces
@@ -865,8 +861,6 @@ CONFIG_RTC=y
CONFIG_AGP=y
CONFIG_AGP_AMD64=y
CONFIG_AGP_INTEL=y
-# CONFIG_AGP_SIS is not set
-# CONFIG_AGP_VIA is not set
# CONFIG_DRM is not set
# CONFIG_MWAVE is not set
CONFIG_RAW_DRIVER=y
@@ -912,6 +906,10 @@ CONFIG_HWMON=y
#
# CONFIG_IBM_ASM is not set
+#
+# Multimedia Capabilities Port drivers
+#
+
#
# Multimedia devices
#
@@ -976,7 +974,6 @@ CONFIG_SOUND_ICH=y
#
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set
@@ -1005,6 +1002,7 @@ CONFIG_USB_UHCI_HCD=y
#
# USB Device Class drivers
#
+# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
# CONFIG_USB_ACM is not set
CONFIG_USB_PRINTER=y
@@ -1123,7 +1121,11 @@ CONFIG_USB_MON=y
# CONFIG_INFINIBAND is not set
#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+# SN Devices
+#
+
+#
+# EDAC - error detection and reporting (RAS)
#
# CONFIG_EDAC is not set
@@ -1196,6 +1198,7 @@ CONFIG_TMPFS=y
CONFIG_HUGETLBFS=y
CONFIG_HUGETLB_PAGE=y
CONFIG_RAMFS=y
+CONFIG_RELAYFS_FS=y
# CONFIG_CONFIGFS_FS is not set
#
@@ -1318,7 +1321,6 @@ CONFIG_DETECT_SOFTLOCKUP=y
CONFIG_DEBUG_FS=y
# CONFIG_DEBUG_VM is not set
# CONFIG_FRAME_POINTER is not set
-# CONFIG_UNWIND_INFO is not set
# CONFIG_FORCED_INLINING is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_DEBUG_RODATA is not set
diff --git a/trunk/arch/x86_64/ia32/ia32_binfmt.c b/trunk/arch/x86_64/ia32/ia32_binfmt.c
index e776139afb20..572b3b28772d 100644
--- a/trunk/arch/x86_64/ia32/ia32_binfmt.c
+++ b/trunk/arch/x86_64/ia32/ia32_binfmt.c
@@ -58,7 +58,7 @@ struct elf_phdr;
#define USE_ELF_CORE_DUMP 1
-/* Override elfcore.h */
+/* Overwrite elfcore.h */
#define _LINUX_ELFCORE_H 1
typedef unsigned int elf_greg_t;
diff --git a/trunk/arch/x86_64/ia32/sys_ia32.c b/trunk/arch/x86_64/ia32/sys_ia32.c
index 2b2d029f477c..2bc55af95419 100644
--- a/trunk/arch/x86_64/ia32/sys_ia32.c
+++ b/trunk/arch/x86_64/ia32/sys_ia32.c
@@ -430,12 +430,24 @@ put_tv32(struct compat_timeval __user *o, struct timeval *i)
return err;
}
-extern unsigned int alarm_setitimer(unsigned int seconds);
+extern int do_setitimer(int which, struct itimerval *, struct itimerval *);
asmlinkage long
sys32_alarm(unsigned int seconds)
{
- return alarm_setitimer(seconds);
+ struct itimerval it_new, it_old;
+ unsigned int oldalarm;
+
+ it_new.it_interval.tv_sec = it_new.it_interval.tv_usec = 0;
+ it_new.it_value.tv_sec = seconds;
+ it_new.it_value.tv_usec = 0;
+ do_setitimer(ITIMER_REAL, &it_new, &it_old);
+ oldalarm = it_old.it_value.tv_sec;
+ /* ehhh.. We can't return 0 if we have an alarm pending.. */
+ /* And we'd better return too much than too little anyway */
+ if (it_old.it_value.tv_usec)
+ oldalarm++;
+ return oldalarm;
}
/* Translations due to time_t size differences. Which affects all
diff --git a/trunk/arch/x86_64/kernel/aperture.c b/trunk/arch/x86_64/kernel/aperture.c
index fffd6b0a2fab..a0f955b9995f 100644
--- a/trunk/arch/x86_64/kernel/aperture.c
+++ b/trunk/arch/x86_64/kernel/aperture.c
@@ -60,7 +60,7 @@ static u32 __init allocate_aperture(void)
printk("Cannot allocate aperture memory hole (%p,%uK)\n",
p, aper_size>>10);
if (p)
- free_bootmem_node(nd0, __pa(p), aper_size);
+ free_bootmem_node(nd0, (unsigned long)p, aper_size);
return 0;
}
printk("Mapping aperture over %d KB of RAM @ %lx\n",
@@ -161,7 +161,7 @@ static __u32 __init search_agp_bridge(u32 *order, int *valid_agp)
int num, slot, func;
/* Poor man's PCI discovery */
- for (num = 0; num < 256; num++) {
+ for (num = 0; num < 32; num++) {
for (slot = 0; slot < 32; slot++) {
for (func = 0; func < 8; func++) {
u32 class, cap;
diff --git a/trunk/arch/x86_64/kernel/apic.c b/trunk/arch/x86_64/kernel/apic.c
index d54620147e8e..e5b14c57eaa0 100644
--- a/trunk/arch/x86_64/kernel/apic.c
+++ b/trunk/arch/x86_64/kernel/apic.c
@@ -342,7 +342,6 @@ void __init init_bsp_APIC(void)
void __cpuinit setup_local_APIC (void)
{
unsigned int value, maxlvt;
- int i, j;
value = apic_read(APIC_LVR);
@@ -371,25 +370,6 @@ void __cpuinit setup_local_APIC (void)
value &= ~APIC_TPRI_MASK;
apic_write(APIC_TASKPRI, value);
- /*
- * After a crash, we no longer service the interrupts and a pending
- * interrupt from previous kernel might still have ISR bit set.
- *
- * Most probably by now CPU has serviced that pending interrupt and
- * it might not have done the ack_APIC_irq() because it thought,
- * interrupt came from i8259 as ExtInt. LAPIC did not get EOI so it
- * does not clear the ISR bit and cpu thinks it has already serivced
- * the interrupt. Hence a vector might get locked. It was noticed
- * for timer irq (vector 0x31). Issue an extra EOI to clear ISR.
- */
- for (i = APIC_ISR_NR - 1; i >= 0; i--) {
- value = apic_read(APIC_ISR + i*0x10);
- for (j = 31; j >= 0; j--) {
- if (value & (1< 0) {
- if (current_ypos >= max_ypos) {
+ if (current_ypos >= MAX_YPOS) {
/* scroll 1 line up */
- for (k = 1, j = 0; k < max_ypos; k++, j++) {
- for (i = 0; i < max_xpos; i++) {
- writew(readw(VGABASE+2*(max_xpos*k+i)),
- VGABASE + 2*(max_xpos*j + i));
+ for (k = 1, j = 0; k < MAX_YPOS; k++, j++) {
+ for (i = 0; i < MAX_XPOS; i++) {
+ writew(readw(VGABASE + 2*(MAX_XPOS*k + i)),
+ VGABASE + 2*(MAX_XPOS*j + i));
}
}
- for (i = 0; i < max_xpos; i++)
- writew(0x720, VGABASE + 2*(max_xpos*j + i));
- current_ypos = max_ypos-1;
+ for (i = 0; i < MAX_XPOS; i++)
+ writew(0x720, VGABASE + 2*(MAX_XPOS*j + i));
+ current_ypos = MAX_YPOS-1;
}
if (c == '\n') {
current_xpos = 0;
current_ypos++;
} else if (c != '\r') {
writew(((0x7 << 8) | (unsigned short) c),
- VGABASE + 2*(max_xpos*current_ypos +
+ VGABASE + 2*(MAX_XPOS*current_ypos +
current_xpos++));
- if (current_xpos >= max_xpos) {
+ if (current_xpos >= MAX_XPOS) {
current_xpos = 0;
current_ypos++;
}
@@ -60,7 +63,7 @@ static struct console early_vga_console = {
.index = -1,
};
-/* Serial functions loosely based on a similar package from Klaus P. Gerlicher */
+/* Serial functions loosely based on a similar package from Klaus P. Gerlicher */
static int early_serial_base = 0x3f8; /* ttyS0 */
@@ -80,30 +83,30 @@ static int early_serial_base = 0x3f8; /* ttyS0 */
#define DLL 0 /* Divisor Latch Low */
#define DLH 1 /* Divisor latch High */
-static int early_serial_putc(unsigned char ch)
-{
- unsigned timeout = 0xffff;
- while ((inb(early_serial_base + LSR) & XMTRDY) == 0 && --timeout)
+static int early_serial_putc(unsigned char ch)
+{
+ unsigned timeout = 0xffff;
+ while ((inb(early_serial_base + LSR) & XMTRDY) == 0 && --timeout)
cpu_relax();
outb(ch, early_serial_base + TXR);
return timeout ? 0 : -1;
-}
+}
static void early_serial_write(struct console *con, const char *s, unsigned n)
{
- while (*s && n-- > 0) {
- early_serial_putc(*s);
- if (*s == '\n')
- early_serial_putc('\r');
- s++;
- }
-}
+ while (*s && n-- > 0) {
+ early_serial_putc(*s);
+ if (*s == '\n')
+ early_serial_putc('\r');
+ s++;
+ }
+}
#define DEFAULT_BAUD 9600
static __init void early_serial_init(char *s)
{
- unsigned char c;
+ unsigned char c;
unsigned divisor;
unsigned baud = DEFAULT_BAUD;
char *e;
@@ -112,7 +115,7 @@ static __init void early_serial_init(char *s)
++s;
if (*s) {
- unsigned port;
+ unsigned port;
if (!strncmp(s,"0x",2)) {
early_serial_base = simple_strtoul(s, &e, 16);
} else {
@@ -136,16 +139,16 @@ static __init void early_serial_init(char *s)
outb(0x3, early_serial_base + MCR); /* DTR + RTS */
if (*s) {
- baud = simple_strtoul(s, &e, 0);
- if (baud == 0 || s == e)
+ baud = simple_strtoul(s, &e, 0);
+ if (baud == 0 || s == e)
baud = DEFAULT_BAUD;
- }
-
- divisor = 115200 / baud;
- c = inb(early_serial_base + LCR);
- outb(c | DLAB, early_serial_base + LCR);
- outb(divisor & 0xff, early_serial_base + DLL);
- outb((divisor >> 8) & 0xff, early_serial_base + DLH);
+ }
+
+ divisor = 115200 / baud;
+ c = inb(early_serial_base + LCR);
+ outb(c | DLAB, early_serial_base + LCR);
+ outb(divisor & 0xff, early_serial_base + DLL);
+ outb((divisor >> 8) & 0xff, early_serial_base + DLH);
outb(c & ~DLAB, early_serial_base + LCR);
}
@@ -202,68 +205,67 @@ struct console *early_console = &early_vga_console;
static int early_console_initialized = 0;
void early_printk(const char *fmt, ...)
-{
- char buf[512];
- int n;
+{
+ char buf[512];
+ int n;
va_list ap;
- va_start(ap,fmt);
+ va_start(ap,fmt);
n = vscnprintf(buf,512,fmt,ap);
early_console->write(early_console,buf,n);
- va_end(ap);
-}
+ va_end(ap);
+}
static int __initdata keep_early;
-int __init setup_early_printk(char *opt)
-{
+int __init setup_early_printk(char *opt)
+{
char *space;
- char buf[256];
+ char buf[256];
if (early_console_initialized)
return -1;
- strlcpy(buf,opt,sizeof(buf));
- space = strchr(buf, ' ');
+ strlcpy(buf,opt,sizeof(buf));
+ space = strchr(buf, ' ');
if (space)
- *space = 0;
+ *space = 0;
if (strstr(buf,"keep"))
- keep_early = 1;
+ keep_early = 1;
- if (!strncmp(buf, "serial", 6)) {
+ if (!strncmp(buf, "serial", 6)) {
early_serial_init(buf + 6);
early_console = &early_serial_console;
- } else if (!strncmp(buf, "ttyS", 4)) {
+ } else if (!strncmp(buf, "ttyS", 4)) {
early_serial_init(buf);
- early_console = &early_serial_console;
+ early_console = &early_serial_console;
} else if (!strncmp(buf, "vga", 3)
&& SCREEN_INFO.orig_video_isVGA == 1) {
max_xpos = SCREEN_INFO.orig_video_cols;
max_ypos = SCREEN_INFO.orig_video_lines;
- current_ypos = SCREEN_INFO.orig_y;
- early_console = &early_vga_console;
+ early_console = &early_vga_console;
} else if (!strncmp(buf, "simnow", 6)) {
simnow_init(buf + 6);
early_console = &simnow_console;
keep_early = 1;
}
early_console_initialized = 1;
- register_console(early_console);
+ register_console(early_console);
return 0;
}
void __init disable_early_printk(void)
-{
+{
if (!early_console_initialized || !early_console)
return;
if (!keep_early) {
printk("disabling early console\n");
unregister_console(early_console);
early_console_initialized = 0;
- } else {
+ } else {
printk("keeping early console\n");
}
-}
+}
__setup("earlyprintk=", setup_early_printk);
diff --git a/trunk/arch/x86_64/kernel/entry.S b/trunk/arch/x86_64/kernel/entry.S
index 8538bfea30e6..7c10e9009d61 100644
--- a/trunk/arch/x86_64/kernel/entry.S
+++ b/trunk/arch/x86_64/kernel/entry.S
@@ -553,7 +553,7 @@ iret_label:
/* force a signal here? this matches i386 behaviour */
/* running with kernel gs */
bad_iret:
- movq $11,%rdi /* SIGSEGV */
+ movq $-9999,%rdi /* better code? */
sti
jmp do_exit
.previous
diff --git a/trunk/arch/x86_64/kernel/functionlist b/trunk/arch/x86_64/kernel/functionlist
deleted file mode 100644
index 2bcebdc3eedb..000000000000
--- a/trunk/arch/x86_64/kernel/functionlist
+++ /dev/null
@@ -1,1286 +0,0 @@
-*(.text.flush_thread)
-*(.text.check_poison_obj)
-*(.text.copy_page)
-*(.text.__set_personality)
-*(.text.gart_map_sg)
-*(.text.kmem_cache_free)
-*(.text.find_get_page)
-*(.text._raw_spin_lock)
-*(.text.ide_outb)
-*(.text.unmap_vmas)
-*(.text.copy_page_range)
-*(.text.kprobe_handler)
-*(.text.__handle_mm_fault)
-*(.text.__d_lookup)
-*(.text.copy_user_generic)
-*(.text.__link_path_walk)
-*(.text.get_page_from_freelist)
-*(.text.kmem_cache_alloc)
-*(.text.drive_cmd_intr)
-*(.text.ia32_setup_sigcontext)
-*(.text.huge_pte_offset)
-*(.text.do_page_fault)
-*(.text.page_remove_rmap)
-*(.text.release_pages)
-*(.text.ide_end_request)
-*(.text.__mutex_lock_slowpath)
-*(.text.__find_get_block)
-*(.text.kfree)
-*(.text.vfs_read)
-*(.text._raw_spin_unlock)
-*(.text.free_hot_cold_page)
-*(.text.fget_light)
-*(.text.schedule)
-*(.text.memcmp)
-*(.text.touch_atime)
-*(.text.__might_sleep)
-*(.text.__down_read_trylock)
-*(.text.arch_pick_mmap_layout)
-*(.text.find_vma)
-*(.text.__make_request)
-*(.text.do_generic_mapping_read)
-*(.text.mutex_lock_interruptible)
-*(.text.__generic_file_aio_read)
-*(.text._atomic_dec_and_lock)
-*(.text.__wake_up_bit)
-*(.text.add_to_page_cache)
-*(.text.cache_alloc_debugcheck_after)
-*(.text.vm_normal_page)
-*(.text.mutex_debug_check_no_locks_freed)
-*(.text.net_rx_action)
-*(.text.__find_first_zero_bit)
-*(.text.put_page)
-*(.text._raw_read_lock)
-*(.text.__delay)
-*(.text.dnotify_parent)
-*(.text.do_path_lookup)
-*(.text.do_sync_read)
-*(.text.do_lookup)
-*(.text.bit_waitqueue)
-*(.text.file_read_actor)
-*(.text.strncpy_from_user)
-*(.text.__pagevec_lru_add_active)
-*(.text.fget)
-*(.text.dput)
-*(.text.__strnlen_user)
-*(.text.inotify_inode_queue_event)
-*(.text.rw_verify_area)
-*(.text.ide_intr)
-*(.text.inotify_dentry_parent_queue_event)
-*(.text.permission)
-*(.text.memscan)
-*(.text.hpet_rtc_interrupt)
-*(.text.do_mmap_pgoff)
-*(.text.current_fs_time)
-*(.text.vfs_getattr)
-*(.text.kmem_flagcheck)
-*(.text.mark_page_accessed)
-*(.text.free_pages_and_swap_cache)
-*(.text.generic_fillattr)
-*(.text.__block_prepare_write)
-*(.text.__set_page_dirty_nobuffers)
-*(.text.link_path_walk)
-*(.text.find_get_pages_tag)
-*(.text.ide_do_request)
-*(.text.__alloc_pages)
-*(.text.generic_permission)
-*(.text.mod_page_state_offset)
-*(.text.free_pgd_range)
-*(.text.generic_file_buffered_write)
-*(.text.number)
-*(.text.ide_do_rw_disk)
-*(.text.__brelse)
-*(.text.__mod_page_state_offset)
-*(.text.rotate_reclaimable_page)
-*(.text.find_vma_prepare)
-*(.text.find_vma_prev)
-*(.text.lru_cache_add_active)
-*(.text.__kmalloc_track_caller)
-*(.text.smp_invalidate_interrupt)
-*(.text.handle_IRQ_event)
-*(.text.__find_get_block_slow)
-*(.text.do_wp_page)
-*(.text.do_select)
-*(.text.set_user_nice)
-*(.text.sys_read)
-*(.text.do_munmap)
-*(.text.csum_partial)
-*(.text.__do_softirq)
-*(.text.may_open)
-*(.text.getname)
-*(.text.get_empty_filp)
-*(.text.__fput)
-*(.text.remove_mapping)
-*(.text.filp_ctor)
-*(.text.poison_obj)
-*(.text.unmap_region)
-*(.text.test_set_page_writeback)
-*(.text.__do_page_cache_readahead)
-*(.text.sock_def_readable)
-*(.text.ide_outl)
-*(.text.shrink_zone)
-*(.text.rb_insert_color)
-*(.text.get_request)
-*(.text.sys_pread64)
-*(.text.spin_bug)
-*(.text.ide_outsl)
-*(.text.mask_and_ack_8259A)
-*(.text.filemap_nopage)
-*(.text.page_add_file_rmap)
-*(.text.find_lock_page)
-*(.text.tcp_poll)
-*(.text.__mark_inode_dirty)
-*(.text.file_ra_state_init)
-*(.text.generic_file_llseek)
-*(.text.__pagevec_lru_add)
-*(.text.page_cache_readahead)
-*(.text.n_tty_receive_buf)
-*(.text.zonelist_policy)
-*(.text.vma_adjust)
-*(.text.test_clear_page_dirty)
-*(.text.sync_buffer)
-*(.text.do_exit)
-*(.text.__bitmap_weight)
-*(.text.alloc_pages_current)
-*(.text.get_unused_fd)
-*(.text.zone_watermark_ok)
-*(.text.cpuset_update_task_memory_state)
-*(.text.__bitmap_empty)
-*(.text.sys_munmap)
-*(.text.__inode_dir_notify)
-*(.text.__generic_file_aio_write_nolock)
-*(.text.__pte_alloc)
-*(.text.sys_select)
-*(.text.vm_acct_memory)
-*(.text.vfs_write)
-*(.text.__lru_add_drain)
-*(.text.prio_tree_insert)
-*(.text.generic_file_aio_read)
-*(.text.vma_merge)
-*(.text.block_write_full_page)
-*(.text.__page_set_anon_rmap)
-*(.text.apic_timer_interrupt)
-*(.text.release_console_sem)
-*(.text.sys_write)
-*(.text.sys_brk)
-*(.text.dup_mm)
-*(.text.read_current_timer)
-*(.text.ll_rw_block)
-*(.text.blk_rq_map_sg)
-*(.text.dbg_userword)
-*(.text.__block_commit_write)
-*(.text.cache_grow)
-*(.text.copy_strings)
-*(.text.release_task)
-*(.text.do_sync_write)
-*(.text.unlock_page)
-*(.text.load_elf_binary)
-*(.text.__follow_mount)
-*(.text.__getblk)
-*(.text.do_sys_open)
-*(.text.current_kernel_time)
-*(.text.call_rcu)
-*(.text.write_chan)
-*(.text.vsnprintf)
-*(.text.dummy_inode_setsecurity)
-*(.text.submit_bh)
-*(.text.poll_freewait)
-*(.text.bio_alloc_bioset)
-*(.text.skb_clone)
-*(.text.page_waitqueue)
-*(.text.__mutex_lock_interruptible_slowpath)
-*(.text.get_index)
-*(.text.csum_partial_copy_generic)
-*(.text.bad_range)
-*(.text.remove_vma)
-*(.text.cp_new_stat)
-*(.text.alloc_arraycache)
-*(.text.test_clear_page_writeback)
-*(.text.strsep)
-*(.text.open_namei)
-*(.text._raw_read_unlock)
-*(.text.get_vma_policy)
-*(.text.__down_write_trylock)
-*(.text.find_get_pages)
-*(.text.tcp_rcv_established)
-*(.text.generic_make_request)
-*(.text.__block_write_full_page)
-*(.text.cfq_set_request)
-*(.text.sys_inotify_init)
-*(.text.split_vma)
-*(.text.__mod_timer)
-*(.text.get_options)
-*(.text.vma_link)
-*(.text.mpage_writepages)
-*(.text.truncate_complete_page)
-*(.text.tcp_recvmsg)
-*(.text.sigprocmask)
-*(.text.filemap_populate)
-*(.text.sys_close)
-*(.text.inotify_dev_queue_event)
-*(.text.do_task_stat)
-*(.text.__dentry_open)
-*(.text.unlink_file_vma)
-*(.text.__pollwait)
-*(.text.packet_rcv_spkt)
-*(.text.drop_buffers)
-*(.text.free_pgtables)
-*(.text.generic_file_direct_write)
-*(.text.copy_process)
-*(.text.netif_receive_skb)
-*(.text.dnotify_flush)
-*(.text.print_bad_pte)
-*(.text.anon_vma_unlink)
-*(.text.sys_mprotect)
-*(.text.sync_sb_inodes)
-*(.text.find_inode_fast)
-*(.text.dummy_inode_readlink)
-*(.text.putname)
-*(.text.init_smp_flush)
-*(.text.dbg_redzone2)
-*(.text.sk_run_filter)
-*(.text.may_expand_vm)
-*(.text.generic_file_aio_write)
-*(.text.find_next_zero_bit)
-*(.text.file_kill)
-*(.text.audit_getname)
-*(.text.arch_unmap_area_topdown)
-*(.text.alloc_page_vma)
-*(.text.tcp_transmit_skb)
-*(.text.rb_next)
-*(.text.dbg_redzone1)
-*(.text.generic_file_mmap)
-*(.text.vfs_fstat)
-*(.text.sys_time)
-*(.text.page_lock_anon_vma)
-*(.text.get_unmapped_area)
-*(.text.remote_llseek)
-*(.text.__up_read)
-*(.text.fd_install)
-*(.text.eventpoll_init_file)
-*(.text.dma_alloc_coherent)
-*(.text.create_empty_buffers)
-*(.text.__mutex_unlock_slowpath)
-*(.text.dup_fd)
-*(.text.d_alloc)
-*(.text.tty_ldisc_try)
-*(.text.sys_stime)
-*(.text.__rb_rotate_right)
-*(.text.d_validate)
-*(.text.rb_erase)
-*(.text.path_release)
-*(.text.memmove)
-*(.text.invalidate_complete_page)
-*(.text.clear_inode)
-*(.text.cache_estimate)
-*(.text.alloc_buffer_head)
-*(.text.smp_call_function_interrupt)
-*(.text.flush_tlb_others)
-*(.text.file_move)
-*(.text.balance_dirty_pages_ratelimited)
-*(.text.vma_prio_tree_add)
-*(.text.timespec_trunc)
-*(.text.mempool_alloc)
-*(.text.iget_locked)
-*(.text.d_alloc_root)
-*(.text.cpuset_populate_dir)
-*(.text.anon_vma_prepare)
-*(.text.sys_newstat)
-*(.text.alloc_page_interleave)
-*(.text.__path_lookup_intent_open)
-*(.text.__pagevec_free)
-*(.text.inode_init_once)
-*(.text.free_vfsmnt)
-*(.text.__user_walk_fd)
-*(.text.cfq_idle_slice_timer)
-*(.text.sys_mmap)
-*(.text.sys_llseek)
-*(.text.prio_tree_remove)
-*(.text.filp_close)
-*(.text.file_permission)
-*(.text.vma_prio_tree_remove)
-*(.text.tcp_ack)
-*(.text.nameidata_to_filp)
-*(.text.sys_lseek)
-*(.text.percpu_counter_mod)
-*(.text.igrab)
-*(.text.__bread)
-*(.text.alloc_inode)
-*(.text.filldir)
-*(.text.__rb_rotate_left)
-*(.text.irq_affinity_write_proc)
-*(.text.init_request_from_bio)
-*(.text.find_or_create_page)
-*(.text.tty_poll)
-*(.text.tcp_sendmsg)
-*(.text.ide_wait_stat)
-*(.text.free_buffer_head)
-*(.text.flush_signal_handlers)
-*(.text.tcp_v4_rcv)
-*(.text.nr_blockdev_pages)
-*(.text.locks_remove_flock)
-*(.text.__iowrite32_copy)
-*(.text.do_filp_open)
-*(.text.try_to_release_page)
-*(.text.page_add_new_anon_rmap)
-*(.text.kmem_cache_size)
-*(.text.eth_type_trans)
-*(.text.try_to_free_buffers)
-*(.text.schedule_tail)
-*(.text.proc_lookup)
-*(.text.no_llseek)
-*(.text.kfree_skbmem)
-*(.text.do_wait)
-*(.text.do_mpage_readpage)
-*(.text.vfs_stat_fd)
-*(.text.tty_write)
-*(.text.705)
-*(.text.sync_page)
-*(.text.__remove_shared_vm_struct)
-*(.text.__kfree_skb)
-*(.text.sock_poll)
-*(.text.get_request_wait)
-*(.text.do_sigaction)
-*(.text.do_brk)
-*(.text.tcp_event_data_recv)
-*(.text.read_chan)
-*(.text.pipe_writev)
-*(.text.__emul_lookup_dentry)
-*(.text.rtc_get_rtc_time)
-*(.text.print_objinfo)
-*(.text.file_update_time)
-*(.text.do_signal)
-*(.text.disable_8259A_irq)
-*(.text.blk_queue_bounce)
-*(.text.__anon_vma_link)
-*(.text.__vma_link)
-*(.text.vfs_rename)
-*(.text.sys_newlstat)
-*(.text.sys_newfstat)
-*(.text.sys_mknod)
-*(.text.__show_regs)
-*(.text.iput)
-*(.text.get_signal_to_deliver)
-*(.text.flush_tlb_page)
-*(.text.debug_mutex_wake_waiter)
-*(.text.copy_thread)
-*(.text.clear_page_dirty_for_io)
-*(.text.buffer_io_error)
-*(.text.vfs_permission)
-*(.text.truncate_inode_pages_range)
-*(.text.sys_recvfrom)
-*(.text.remove_suid)
-*(.text.mark_buffer_dirty)
-*(.text.local_bh_enable)
-*(.text.get_zeroed_page)
-*(.text.get_vmalloc_info)
-*(.text.flush_old_exec)
-*(.text.dummy_inode_permission)
-*(.text.__bio_add_page)
-*(.text.prio_tree_replace)
-*(.text.notify_change)
-*(.text.mntput_no_expire)
-*(.text.fput)
-*(.text.__end_that_request_first)
-*(.text.wake_up_bit)
-*(.text.unuse_mm)
-*(.text.skb_release_data)
-*(.text.shrink_icache_memory)
-*(.text.sched_balance_self)
-*(.text.__pmd_alloc)
-*(.text.pipe_poll)
-*(.text.normal_poll)
-*(.text.__free_pages)
-*(.text.follow_mount)
-*(.text.cdrom_start_packet_command)
-*(.text.blk_recount_segments)
-*(.text.bio_put)
-*(.text.__alloc_skb)
-*(.text.__wake_up)
-*(.text.vm_stat_account)
-*(.text.sys_fcntl)
-*(.text.sys_fadvise64)
-*(.text._raw_write_unlock)
-*(.text.__pud_alloc)
-*(.text.alloc_page_buffers)
-*(.text.vfs_llseek)
-*(.text.sockfd_lookup)
-*(.text._raw_write_lock)
-*(.text.put_compound_page)
-*(.text.prune_dcache)
-*(.text.pipe_readv)
-*(.text.mempool_free)
-*(.text.make_ahead_window)
-*(.text.lru_add_drain)
-*(.text.constant_test_bit)
-*(.text.__clear_user)
-*(.text.arch_unmap_area)
-*(.text.anon_vma_link)
-*(.text.sys_chroot)
-*(.text.setup_arg_pages)
-*(.text.radix_tree_preload)
-*(.text.init_rwsem)
-*(.text.generic_osync_inode)
-*(.text.generic_delete_inode)
-*(.text.do_sys_poll)
-*(.text.dev_queue_xmit)
-*(.text.default_llseek)
-*(.text.__writeback_single_inode)
-*(.text.vfs_ioctl)
-*(.text.__up_write)
-*(.text.unix_poll)
-*(.text.sys_rt_sigprocmask)
-*(.text.sock_recvmsg)
-*(.text.recalc_bh_state)
-*(.text.__put_unused_fd)
-*(.text.process_backlog)
-*(.text.locks_remove_posix)
-*(.text.lease_modify)
-*(.text.expand_files)
-*(.text.end_buffer_read_nobh)
-*(.text.d_splice_alias)
-*(.text.debug_mutex_init_waiter)
-*(.text.copy_from_user)
-*(.text.cap_vm_enough_memory)
-*(.text.show_vfsmnt)
-*(.text.release_sock)
-*(.text.pfifo_fast_enqueue)
-*(.text.half_md4_transform)
-*(.text.fs_may_remount_ro)
-*(.text.do_fork)
-*(.text.copy_hugetlb_page_range)
-*(.text.cache_free_debugcheck)
-*(.text.__tcp_select_window)
-*(.text.task_handoff_register)
-*(.text.sys_open)
-*(.text.strlcpy)
-*(.text.skb_copy_datagram_iovec)
-*(.text.set_up_list3s)
-*(.text.release_open_intent)
-*(.text.qdisc_restart)
-*(.text.n_tty_chars_in_buffer)
-*(.text.inode_change_ok)
-*(.text.__downgrade_write)
-*(.text.debug_mutex_unlock)
-*(.text.add_timer_randomness)
-*(.text.sock_common_recvmsg)
-*(.text.set_bh_page)
-*(.text.printk_lock)
-*(.text.path_release_on_umount)
-*(.text.ip_output)
-*(.text.ide_build_dmatable)
-*(.text.__get_user_8)
-*(.text.end_buffer_read_sync)
-*(.text.__d_path)
-*(.text.d_move)
-*(.text.del_timer)
-*(.text.constant_test_bit)
-*(.text.blockable_page_cache_readahead)
-*(.text.tty_read)
-*(.text.sys_readlink)
-*(.text.sys_faccessat)
-*(.text.read_swap_cache_async)
-*(.text.pty_write_room)
-*(.text.page_address_in_vma)
-*(.text.kthread)
-*(.text.cfq_exit_io_context)
-*(.text.__tcp_push_pending_frames)
-*(.text.sys_pipe)
-*(.text.submit_bio)
-*(.text.pid_revalidate)
-*(.text.page_referenced_file)
-*(.text.lock_sock)
-*(.text.get_page_state_node)
-*(.text.generic_block_bmap)
-*(.text.do_setitimer)
-*(.text.dev_queue_xmit_nit)
-*(.text.copy_from_read_buf)
-*(.text.__const_udelay)
-*(.text.console_conditional_schedule)
-*(.text.wake_up_new_task)
-*(.text.wait_for_completion_interruptible)
-*(.text.tcp_rcv_rtt_update)
-*(.text.sys_mlockall)
-*(.text.set_fs_altroot)
-*(.text.schedule_timeout)
-*(.text.nr_free_pagecache_pages)
-*(.text.nf_iterate)
-*(.text.mapping_tagged)
-*(.text.ip_queue_xmit)
-*(.text.ip_local_deliver)
-*(.text.follow_page)
-*(.text.elf_map)
-*(.text.dummy_file_permission)
-*(.text.dispose_list)
-*(.text.dentry_open)
-*(.text.dentry_iput)
-*(.text.bio_alloc)
-*(.text.alloc_skb_from_cache)
-*(.text.wait_on_page_bit)
-*(.text.vfs_readdir)
-*(.text.vfs_lstat)
-*(.text.seq_escape)
-*(.text.__posix_lock_file)
-*(.text.mm_release)
-*(.text.kref_put)
-*(.text.ip_rcv)
-*(.text.__iget)
-*(.text.free_pages)
-*(.text.find_mergeable_anon_vma)
-*(.text.find_extend_vma)
-*(.text.dummy_inode_listsecurity)
-*(.text.bio_add_page)
-*(.text.__vm_enough_memory)
-*(.text.vfs_stat)
-*(.text.tty_paranoia_check)
-*(.text.tcp_read_sock)
-*(.text.tcp_data_queue)
-*(.text.sys_uname)
-*(.text.sys_renameat)
-*(.text.__strncpy_from_user)
-*(.text.__mutex_init)
-*(.text.__lookup_hash)
-*(.text.kref_get)
-*(.text.ip_route_input)
-*(.text.__insert_inode_hash)
-*(.text.do_sock_write)
-*(.text.blk_done_softirq)
-*(.text.__wake_up_sync)
-*(.text.__vma_link_rb)
-*(.text.tty_ioctl)
-*(.text.tracesys)
-*(.text.sys_getdents)
-*(.text.sys_dup)
-*(.text.stub_execve)
-*(.text.sha_transform)
-*(.text.radix_tree_tag_clear)
-*(.text.put_unused_fd)
-*(.text.put_files_struct)
-*(.text.mpage_readpages)
-*(.text.may_delete)
-*(.text.kmem_cache_create)
-*(.text.ip_mc_output)
-*(.text.interleave_nodes)
-*(.text.groups_search)
-*(.text.generic_drop_inode)
-*(.text.generic_commit_write)
-*(.text.fcntl_setlk)
-*(.text.exit_mmap)
-*(.text.end_page_writeback)
-*(.text.__d_rehash)
-*(.text.debug_mutex_free_waiter)
-*(.text.csum_ipv6_magic)
-*(.text.count)
-*(.text.cleanup_rbuf)
-*(.text.check_spinlock_acquired_node)
-*(.text.can_vma_merge_after)
-*(.text.bio_endio)
-*(.text.alloc_pidmap)
-*(.text.write_ldt)
-*(.text.vmtruncate_range)
-*(.text.vfs_create)
-*(.text.__user_walk)
-*(.text.update_send_head)
-*(.text.unmap_underlying_metadata)
-*(.text.tty_ldisc_deref)
-*(.text.tcp_setsockopt)
-*(.text.tcp_send_ack)
-*(.text.sys_pause)
-*(.text.sys_gettimeofday)
-*(.text.sync_dirty_buffer)
-*(.text.strncmp)
-*(.text.release_posix_timer)
-*(.text.proc_file_read)
-*(.text.prepare_to_wait)
-*(.text.locks_mandatory_locked)
-*(.text.interruptible_sleep_on_timeout)
-*(.text.inode_sub_bytes)
-*(.text.in_group_p)
-*(.text.hrtimer_try_to_cancel)
-*(.text.filldir64)
-*(.text.fasync_helper)
-*(.text.dummy_sb_pivotroot)
-*(.text.d_lookup)
-*(.text.d_instantiate)
-*(.text.__d_find_alias)
-*(.text.cpu_idle_wait)
-*(.text.cond_resched_lock)
-*(.text.chown_common)
-*(.text.blk_congestion_wait)
-*(.text.activate_page)
-*(.text.unlock_buffer)
-*(.text.tty_wakeup)
-*(.text.tcp_v4_do_rcv)
-*(.text.tcp_current_mss)
-*(.text.sys_openat)
-*(.text.sys_fchdir)
-*(.text.strnlen_user)
-*(.text.strnlen)
-*(.text.strchr)
-*(.text.sock_common_getsockopt)
-*(.text.skb_checksum)
-*(.text.remove_wait_queue)
-*(.text.rb_replace_node)
-*(.text.radix_tree_node_ctor)
-*(.text.pty_chars_in_buffer)
-*(.text.profile_hit)
-*(.text.prio_tree_left)
-*(.text.pgd_clear_bad)
-*(.text.pfifo_fast_dequeue)
-*(.text.page_referenced)
-*(.text.open_exec)
-*(.text.mmput)
-*(.text.mm_init)
-*(.text.__ide_dma_off_quietly)
-*(.text.ide_dma_intr)
-*(.text.hrtimer_start)
-*(.text.get_io_context)
-*(.text.__get_free_pages)
-*(.text.find_first_zero_bit)
-*(.text.file_free_rcu)
-*(.text.dummy_socket_sendmsg)
-*(.text.do_unlinkat)
-*(.text.do_arch_prctl)
-*(.text.destroy_inode)
-*(.text.can_vma_merge_before)
-*(.text.block_sync_page)
-*(.text.block_prepare_write)
-*(.text.bio_init)
-*(.text.arch_ptrace)
-*(.text.wake_up_inode)
-*(.text.wait_on_retry_sync_kiocb)
-*(.text.vma_prio_tree_next)
-*(.text.tcp_rcv_space_adjust)
-*(.text.__tcp_ack_snd_check)
-*(.text.sys_utime)
-*(.text.sys_recvmsg)
-*(.text.sys_mremap)
-*(.text.sys_bdflush)
-*(.text.sleep_on)
-*(.text.set_page_dirty_lock)
-*(.text.seq_path)
-*(.text.schedule_timeout_interruptible)
-*(.text.sched_fork)
-*(.text.rt_run_flush)
-*(.text.profile_munmap)
-*(.text.prepare_binprm)
-*(.text.__pagevec_release_nonlru)
-*(.text.m_show)
-*(.text.lookup_mnt)
-*(.text.__lookup_mnt)
-*(.text.lock_timer_base)
-*(.text.is_subdir)
-*(.text.invalidate_bh_lru)
-*(.text.init_buffer_head)
-*(.text.ifind_fast)
-*(.text.ide_dma_start)
-*(.text.__get_page_state)
-*(.text.flock_to_posix_lock)
-*(.text.__find_symbol)
-*(.text.do_futex)
-*(.text.do_execve)
-*(.text.dirty_writeback_centisecs_handler)
-*(.text.dev_watchdog)
-*(.text.can_share_swap_page)
-*(.text.blkdev_put)
-*(.text.bio_get_nr_vecs)
-*(.text.xfrm_compile_policy)
-*(.text.vma_prio_tree_insert)
-*(.text.vfs_lstat_fd)
-*(.text.__user_path_lookup_open)
-*(.text.thread_return)
-*(.text.tcp_send_delayed_ack)
-*(.text.sock_def_error_report)
-*(.text.shrink_slab)
-*(.text.serial_out)
-*(.text.seq_read)
-*(.text.secure_ip_id)
-*(.text.search_binary_handler)
-*(.text.proc_pid_unhash)
-*(.text.pagevec_lookup)
-*(.text.new_inode)
-*(.text.memcpy_toiovec)
-*(.text.locks_free_lock)
-*(.text.__lock_page)
-*(.text.__lock_buffer)
-*(.text.load_module)
-*(.text.is_bad_inode)
-*(.text.invalidate_inode_buffers)
-*(.text.insert_vm_struct)
-*(.text.inode_setattr)
-*(.text.inode_add_bytes)
-*(.text.ide_read_24)
-*(.text.ide_get_error_location)
-*(.text.ide_do_drive_cmd)
-*(.text.get_locked_pte)
-*(.text.get_filesystem_list)
-*(.text.generic_file_open)
-*(.text.follow_down)
-*(.text.find_next_bit)
-*(.text.__find_first_bit)
-*(.text.exit_mm)
-*(.text.exec_keys)
-*(.text.end_buffer_write_sync)
-*(.text.end_bio_bh_io_sync)
-*(.text.dummy_socket_shutdown)
-*(.text.d_rehash)
-*(.text.d_path)
-*(.text.do_ioctl)
-*(.text.dget_locked)
-*(.text.copy_thread_group_keys)
-*(.text.cdrom_end_request)
-*(.text.cap_bprm_apply_creds)
-*(.text.blk_rq_bio_prep)
-*(.text.__bitmap_intersects)
-*(.text.bio_phys_segments)
-*(.text.bio_free)
-*(.text.arch_get_unmapped_area_topdown)
-*(.text.writeback_in_progress)
-*(.text.vfs_follow_link)
-*(.text.tcp_rcv_state_process)
-*(.text.tcp_check_space)
-*(.text.sys_stat)
-*(.text.sys_rt_sigreturn)
-*(.text.sys_rt_sigaction)
-*(.text.sys_remap_file_pages)
-*(.text.sys_pwrite64)
-*(.text.sys_fchownat)
-*(.text.sys_fchmodat)
-*(.text.strncat)
-*(.text.strlcat)
-*(.text.strcmp)
-*(.text.steal_locks)
-*(.text.sock_create)
-*(.text.sk_stream_rfree)
-*(.text.sk_stream_mem_schedule)
-*(.text.skip_atoi)
-*(.text.sk_alloc)
-*(.text.show_stat)
-*(.text.set_fs_pwd)
-*(.text.set_binfmt)
-*(.text.pty_unthrottle)
-*(.text.proc_symlink)
-*(.text.pipe_release)
-*(.text.pageout)
-*(.text.n_tty_write_wakeup)
-*(.text.n_tty_ioctl)
-*(.text.nr_free_zone_pages)
-*(.text.migration_thread)
-*(.text.mempool_free_slab)
-*(.text.meminfo_read_proc)
-*(.text.max_sane_readahead)
-*(.text.lru_cache_add)
-*(.text.kill_fasync)
-*(.text.kernel_read)
-*(.text.invalidate_mapping_pages)
-*(.text.inode_has_buffers)
-*(.text.init_once)
-*(.text.inet_sendmsg)
-*(.text.idedisk_issue_flush)
-*(.text.generic_file_write)
-*(.text.free_more_memory)
-*(.text.__free_fdtable)
-*(.text.filp_dtor)
-*(.text.exit_sem)
-*(.text.exit_itimers)
-*(.text.error_interrupt)
-*(.text.end_buffer_async_write)
-*(.text.eligible_child)
-*(.text.elf_map)
-*(.text.dump_task_regs)
-*(.text.dummy_task_setscheduler)
-*(.text.dummy_socket_accept)
-*(.text.dummy_file_free_security)
-*(.text.__down_read)
-*(.text.do_sock_read)
-*(.text.do_sigaltstack)
-*(.text.do_mremap)
-*(.text.current_io_context)
-*(.text.cpu_swap_callback)
-*(.text.copy_vma)
-*(.text.cap_bprm_set_security)
-*(.text.blk_insert_request)
-*(.text.bio_map_kern_endio)
-*(.text.bio_hw_segments)
-*(.text.bictcp_cong_avoid)
-*(.text.add_interrupt_randomness)
-*(.text.wait_for_completion)
-*(.text.version_read_proc)
-*(.text.unix_write_space)
-*(.text.tty_ldisc_ref_wait)
-*(.text.tty_ldisc_put)
-*(.text.try_to_wake_up)
-*(.text.tcp_v4_tw_remember_stamp)
-*(.text.tcp_try_undo_dsack)
-*(.text.tcp_may_send_now)
-*(.text.sys_waitid)
-*(.text.sys_sched_getparam)
-*(.text.sys_getppid)
-*(.text.sys_getcwd)
-*(.text.sys_dup2)
-*(.text.sys_chmod)
-*(.text.sys_chdir)
-*(.text.sprintf)
-*(.text.sock_wfree)
-*(.text.sock_aio_write)
-*(.text.skb_drop_fraglist)
-*(.text.skb_dequeue)
-*(.text.set_close_on_exec)
-*(.text.set_brk)
-*(.text.seq_puts)
-*(.text.SELECT_DRIVE)
-*(.text.sched_exec)
-*(.text.return_EIO)
-*(.text.remove_from_page_cache)
-*(.text.rcu_start_batch)
-*(.text.__put_task_struct)
-*(.text.proc_pid_readdir)
-*(.text.proc_get_inode)
-*(.text.prepare_to_wait_exclusive)
-*(.text.pipe_wait)
-*(.text.pipe_new)
-*(.text.pdflush_operation)
-*(.text.__pagevec_release)
-*(.text.pagevec_lookup_tag)
-*(.text.packet_rcv)
-*(.text.n_tty_set_room)
-*(.text.nr_free_pages)
-*(.text.__net_timestamp)
-*(.text.mpage_end_io_read)
-*(.text.mod_timer)
-*(.text.__memcpy)
-*(.text.mb_cache_shrink_fn)
-*(.text.lock_rename)
-*(.text.kstrdup)
-*(.text.is_ignored)
-*(.text.int_very_careful)
-*(.text.inotify_inode_is_dead)
-*(.text.inotify_get_cookie)
-*(.text.inode_get_bytes)
-*(.text.init_timer)
-*(.text.init_dev)
-*(.text.inet_getname)
-*(.text.ide_map_sg)
-*(.text.__ide_dma_end)
-*(.text.hrtimer_get_remaining)
-*(.text.get_task_mm)
-*(.text.get_random_int)
-*(.text.free_pipe_info)
-*(.text.filemap_write_and_wait_range)
-*(.text.exit_thread)
-*(.text.enter_idle)
-*(.text.end_that_request_first)
-*(.text.end_8259A_irq)
-*(.text.dummy_file_alloc_security)
-*(.text.do_group_exit)
-*(.text.debug_mutex_init)
-*(.text.cpuset_exit)
-*(.text.cpu_idle)
-*(.text.copy_semundo)
-*(.text.copy_files)
-*(.text.chrdev_open)
-*(.text.cdrom_transfer_packet_command)
-*(.text.cdrom_mode_sense)
-*(.text.blk_phys_contig_segment)
-*(.text.blk_get_queue)
-*(.text.bio_split)
-*(.text.audit_alloc)
-*(.text.anon_pipe_buf_release)
-*(.text.add_wait_queue_exclusive)
-*(.text.add_wait_queue)
-*(.text.acct_process)
-*(.text.account)
-*(.text.zeromap_page_range)
-*(.text.yield)
-*(.text.writeback_acquire)
-*(.text.worker_thread)
-*(.text.wait_on_page_writeback_range)
-*(.text.__wait_on_buffer)
-*(.text.vscnprintf)
-*(.text.vmalloc_to_pfn)
-*(.text.vgacon_save_screen)
-*(.text.vfs_unlink)
-*(.text.vfs_rmdir)
-*(.text.unregister_md_personality)
-*(.text.unlock_new_inode)
-*(.text.unix_stream_sendmsg)
-*(.text.unix_stream_recvmsg)
-*(.text.unhash_process)
-*(.text.udp_v4_lookup_longway)
-*(.text.tty_ldisc_flush)
-*(.text.tty_ldisc_enable)
-*(.text.tty_hung_up_p)
-*(.text.tty_buffer_free_all)
-*(.text.tso_fragment)
-*(.text.try_to_del_timer_sync)
-*(.text.tcp_v4_err)
-*(.text.tcp_unhash)
-*(.text.tcp_seq_next)
-*(.text.tcp_select_initial_window)
-*(.text.tcp_sacktag_write_queue)
-*(.text.tcp_cwnd_validate)
-*(.text.sys_vhangup)
-*(.text.sys_uselib)
-*(.text.sys_symlink)
-*(.text.sys_signal)
-*(.text.sys_poll)
-*(.text.sys_mount)
-*(.text.sys_kill)
-*(.text.sys_ioctl)
-*(.text.sys_inotify_add_watch)
-*(.text.sys_getuid)
-*(.text.sys_getrlimit)
-*(.text.sys_getitimer)
-*(.text.sys_getgroups)
-*(.text.sys_ftruncate)
-*(.text.sysfs_lookup)
-*(.text.sys_exit_group)
-*(.text.stub_fork)
-*(.text.sscanf)
-*(.text.sock_map_fd)
-*(.text.sock_get_timestamp)
-*(.text.__sock_create)
-*(.text.smp_call_function_single)
-*(.text.sk_stop_timer)
-*(.text.skb_copy_and_csum_datagram)
-*(.text.__skb_checksum_complete)
-*(.text.single_next)
-*(.text.sigqueue_alloc)
-*(.text.shrink_dcache_parent)
-*(.text.select_idle_routine)
-*(.text.run_workqueue)
-*(.text.run_local_timers)
-*(.text.remove_inode_hash)
-*(.text.remove_dquot_ref)
-*(.text.register_binfmt)
-*(.text.read_cache_pages)
-*(.text.rb_last)
-*(.text.pty_open)
-*(.text.proc_root_readdir)
-*(.text.proc_pid_flush)
-*(.text.proc_pident_lookup)
-*(.text.proc_fill_super)
-*(.text.proc_exe_link)
-*(.text.posix_locks_deadlock)
-*(.text.pipe_iov_copy_from_user)
-*(.text.opost)
-*(.text.nf_register_hook)
-*(.text.netif_rx_ni)
-*(.text.m_start)
-*(.text.mpage_writepage)
-*(.text.mm_alloc)
-*(.text.memory_open)
-*(.text.mark_buffer_async_write)
-*(.text.lru_add_drain_all)
-*(.text.locks_init_lock)
-*(.text.locks_delete_lock)
-*(.text.lock_hrtimer_base)
-*(.text.load_script)
-*(.text.__kill_fasync)
-*(.text.ip_mc_sf_allow)
-*(.text.__ioremap)
-*(.text.int_with_check)
-*(.text.int_sqrt)
-*(.text.install_thread_keyring)
-*(.text.init_page_buffers)
-*(.text.inet_sock_destruct)
-*(.text.idle_notifier_register)
-*(.text.ide_execute_command)
-*(.text.ide_end_drive_cmd)
-*(.text.__ide_dma_host_on)
-*(.text.hrtimer_run_queues)
-*(.text.hpet_mask_rtc_irq_bit)
-*(.text.__get_zone_counts)
-*(.text.get_zone_counts)
-*(.text.get_write_access)
-*(.text.get_fs_struct)
-*(.text.get_dirty_limits)
-*(.text.generic_readlink)
-*(.text.free_hot_page)
-*(.text.finish_wait)
-*(.text.find_inode)
-*(.text.find_first_bit)
-*(.text.__filemap_fdatawrite_range)
-*(.text.__filemap_copy_from_user_iovec)
-*(.text.exit_aio)
-*(.text.elv_set_request)
-*(.text.elv_former_request)
-*(.text.dup_namespace)
-*(.text.dupfd)
-*(.text.dummy_socket_getsockopt)
-*(.text.dummy_sb_post_mountroot)
-*(.text.dummy_quotactl)
-*(.text.dummy_inode_rename)
-*(.text.__do_SAK)
-*(.text.do_pipe)
-*(.text.do_fsync)
-*(.text.d_instantiate_unique)
-*(.text.d_find_alias)
-*(.text.deny_write_access)
-*(.text.dentry_unhash)
-*(.text.d_delete)
-*(.text.datagram_poll)
-*(.text.cpuset_fork)
-*(.text.cpuid_read)
-*(.text.copy_namespace)
-*(.text.cond_resched)
-*(.text.check_version)
-*(.text.__change_page_attr)
-*(.text.cfq_slab_kill)
-*(.text.cfq_completed_request)
-*(.text.cdrom_pc_intr)
-*(.text.cdrom_decode_status)
-*(.text.cap_capset_check)
-*(.text.blk_put_request)
-*(.text.bio_fs_destructor)
-*(.text.bictcp_min_cwnd)
-*(.text.alloc_chrdev_region)
-*(.text.add_element)
-*(.text.acct_update_integrals)
-*(.text.write_boundary_block)
-*(.text.writeback_release)
-*(.text.writeback_inodes)
-*(.text.wake_up_state)
-*(.text.__wake_up_locked)
-*(.text.wake_futex)
-*(.text.wait_task_inactive)
-*(.text.__wait_on_freeing_inode)
-*(.text.wait_noreap_copyout)
-*(.text.vmstat_start)
-*(.text.vgacon_do_font_op)
-*(.text.vfs_readv)
-*(.text.vfs_quota_sync)
-*(.text.update_queue)
-*(.text.unshare_files)
-*(.text.unmap_vm_area)
-*(.text.unix_socketpair)
-*(.text.unix_release_sock)
-*(.text.unix_detach_fds)
-*(.text.unix_create1)
-*(.text.unix_bind)
-*(.text.udp_sendmsg)
-*(.text.udp_rcv)
-*(.text.udp_queue_rcv_skb)
-*(.text.uart_write)
-*(.text.uart_startup)
-*(.text.uart_open)
-*(.text.tty_vhangup)
-*(.text.tty_termios_baud_rate)
-*(.text.tty_release)
-*(.text.tty_ldisc_ref)
-*(.text.throttle_vm_writeout)
-*(.text.058)
-*(.text.tcp_xmit_probe_skb)
-*(.text.tcp_v4_send_check)
-*(.text.tcp_v4_destroy_sock)
-*(.text.tcp_sync_mss)
-*(.text.tcp_snd_test)
-*(.text.tcp_slow_start)
-*(.text.tcp_send_fin)
-*(.text.tcp_rtt_estimator)
-*(.text.tcp_parse_options)
-*(.text.tcp_ioctl)
-*(.text.tcp_init_tso_segs)
-*(.text.tcp_init_cwnd)
-*(.text.tcp_getsockopt)
-*(.text.tcp_fin)
-*(.text.tcp_connect)
-*(.text.tcp_cong_avoid)
-*(.text.__tcp_checksum_complete_user)
-*(.text.task_dumpable)
-*(.text.sys_wait4)
-*(.text.sys_utimes)
-*(.text.sys_symlinkat)
-*(.text.sys_socketpair)
-*(.text.sys_rmdir)
-*(.text.sys_readahead)
-*(.text.sys_nanosleep)
-*(.text.sys_linkat)
-*(.text.sys_fstat)
-*(.text.sysfs_readdir)
-*(.text.sys_execve)
-*(.text.sysenter_tracesys)
-*(.text.sys_chown)
-*(.text.stub_clone)
-*(.text.strrchr)
-*(.text.strncpy)
-*(.text.stopmachine_set_state)
-*(.text.sock_sendmsg)
-*(.text.sock_release)
-*(.text.sock_fasync)
-*(.text.sock_close)
-*(.text.sk_stream_write_space)
-*(.text.sk_reset_timer)
-*(.text.skb_split)
-*(.text.skb_recv_datagram)
-*(.text.skb_queue_tail)
-*(.text.sk_attach_filter)
-*(.text.si_swapinfo)
-*(.text.simple_strtoll)
-*(.text.set_termios)
-*(.text.set_task_comm)
-*(.text.set_shrinker)
-*(.text.set_normalized_timespec)
-*(.text.set_brk)
-*(.text.serial_in)
-*(.text.seq_printf)
-*(.text.secure_dccp_sequence_number)
-*(.text.rwlock_bug)
-*(.text.rt_hash_code)
-*(.text.__rta_fill)
-*(.text.__request_resource)
-*(.text.relocate_new_kernel)
-*(.text.release_thread)
-*(.text.release_mem)
-*(.text.rb_prev)
-*(.text.rb_first)
-*(.text.random_poll)
-*(.text.__put_super_and_need_restart)
-*(.text.pty_write)
-*(.text.ptrace_stop)
-*(.text.proc_self_readlink)
-*(.text.proc_root_lookup)
-*(.text.proc_root_link)
-*(.text.proc_pid_make_inode)
-*(.text.proc_pid_attr_write)
-*(.text.proc_lookupfd)
-*(.text.proc_delete_inode)
-*(.text.posix_same_owner)
-*(.text.posix_block_lock)
-*(.text.poll_initwait)
-*(.text.pipe_write)
-*(.text.pipe_read_fasync)
-*(.text.pipe_ioctl)
-*(.text.pdflush)
-*(.text.pci_user_read_config_dword)
-*(.text.page_readlink)
-*(.text.null_lseek)
-*(.text.nf_hook_slow)
-*(.text.netlink_sock_destruct)
-*(.text.netlink_broadcast)
-*(.text.neigh_resolve_output)
-*(.text.name_to_int)
-*(.text.mwait_idle)
-*(.text.mutex_trylock)
-*(.text.mutex_debug_check_no_locks_held)
-*(.text.m_stop)
-*(.text.mpage_end_io_write)
-*(.text.mpage_alloc)
-*(.text.move_page_tables)
-*(.text.mounts_open)
-*(.text.__memset)
-*(.text.memcpy_fromiovec)
-*(.text.make_8259A_irq)
-*(.text.lookup_user_key_possessed)
-*(.text.lookup_create)
-*(.text.locks_insert_lock)
-*(.text.locks_alloc_lock)
-*(.text.kthread_should_stop)
-*(.text.kswapd)
-*(.text.kobject_uevent)
-*(.text.kobject_get_path)
-*(.text.kobject_get)
-*(.text.klist_children_put)
-*(.text.__ip_route_output_key)
-*(.text.ip_flush_pending_frames)
-*(.text.ip_compute_csum)
-*(.text.ip_append_data)
-*(.text.ioc_set_batching)
-*(.text.invalidate_inode_pages)
-*(.text.__invalidate_device)
-*(.text.install_arg_page)
-*(.text.in_sched_functions)
-*(.text.inotify_unmount_inodes)
-*(.text.init_once)
-*(.text.init_cdrom_command)
-*(.text.inet_stream_connect)
-*(.text.inet_sk_rebuild_header)
-*(.text.inet_csk_addr2sockaddr)
-*(.text.inet_create)
-*(.text.ifind)
-*(.text.ide_setup_dma)
-*(.text.ide_outsw)
-*(.text.ide_fixstring)
-*(.text.ide_dma_setup)
-*(.text.ide_cdrom_packet)
-*(.text.ide_cd_put)
-*(.text.ide_build_sglist)
-*(.text.i8259A_shutdown)
-*(.text.hung_up_tty_ioctl)
-*(.text.hrtimer_nanosleep)
-*(.text.hrtimer_init)
-*(.text.hrtimer_cancel)
-*(.text.hash_futex)
-*(.text.group_send_sig_info)
-*(.text.grab_cache_page_nowait)
-*(.text.get_wchan)
-*(.text.get_stack)
-*(.text.get_page_state)
-*(.text.getnstimeofday)
-*(.text.get_node)
-*(.text.get_kprobe)
-*(.text.generic_unplug_device)
-*(.text.free_task)
-*(.text.frag_show)
-*(.text.find_next_zero_string)
-*(.text.filp_open)
-*(.text.fillonedir)
-*(.text.exit_io_context)
-*(.text.exit_idle)
-*(.text.exact_lock)
-*(.text.eth_header)
-*(.text.dummy_unregister_security)
-*(.text.dummy_socket_post_create)
-*(.text.dummy_socket_listen)
-*(.text.dummy_quota_on)
-*(.text.dummy_inode_follow_link)
-*(.text.dummy_file_receive)
-*(.text.dummy_file_mprotect)
-*(.text.dummy_file_lock)
-*(.text.dummy_file_ioctl)
-*(.text.dummy_bprm_post_apply_creds)
-*(.text.do_writepages)
-*(.text.__down_interruptible)
-*(.text.do_notify_resume)
-*(.text.do_acct_process)
-*(.text.del_timer_sync)
-*(.text.default_rebuild_header)
-*(.text.d_callback)
-*(.text.dcache_readdir)
-*(.text.ctrl_dumpfamily)
-*(.text.cpuset_rmdir)
-*(.text.copy_strings_kernel)
-*(.text.con_write_room)
-*(.text.complete_all)
-*(.text.collect_sigign_sigcatch)
-*(.text.clear_user)
-*(.text.check_unthrottle)
-*(.text.cdrom_release)
-*(.text.cdrom_newpc_intr)
-*(.text.cdrom_ioctl)
-*(.text.cdrom_check_status)
-*(.text.cdev_put)
-*(.text.cdev_add)
-*(.text.cap_ptrace)
-*(.text.cap_bprm_secureexec)
-*(.text.cache_alloc_refill)
-*(.text.bmap)
-*(.text.blk_run_queue)
-*(.text.blk_queue_dma_alignment)
-*(.text.blk_ordered_req_seq)
-*(.text.blk_backing_dev_unplug)
-*(.text.__bitmap_subset)
-*(.text.__bitmap_and)
-*(.text.bio_unmap_user)
-*(.text.__bforget)
-*(.text.bd_forget)
-*(.text.bad_pipe_w)
-*(.text.bad_get_user)
-*(.text.audit_free)
-*(.text.anon_vma_ctor)
-*(.text.anon_pipe_buf_map)
-*(.text.alloc_sock_iocb)
-*(.text.alloc_fdset)
-*(.text.aio_kick_handler)
-*(.text.__add_entropy_words)
-*(.text.add_disk_randomness)
diff --git a/trunk/arch/x86_64/kernel/head.S b/trunk/arch/x86_64/kernel/head.S
index 6df05e6034fa..02fc7fa0ea28 100644
--- a/trunk/arch/x86_64/kernel/head.S
+++ b/trunk/arch/x86_64/kernel/head.S
@@ -26,7 +26,6 @@
*/
.text
- .section .bootstrap.text
.code32
.globl startup_32
/* %bx: 1 if coming from smp trampoline on secondary cpu */
@@ -193,8 +192,7 @@ startup_64:
movq initial_code(%rip),%rax
jmp *%rax
- /* SMP bootup changes these two */
- .align 8
+ /* SMP bootup changes these two */
.globl initial_code
initial_code:
.quad x86_64_start_kernel
@@ -239,7 +237,7 @@ ENTRY(no_long_mode)
.org 0xf00
.globl pGDT32
pGDT32:
- .word gdt_end-cpu_gdt_table-1
+ .word gdt_end-cpu_gdt_table
.long cpu_gdt_table-__START_KERNEL_map
.org 0xf10
@@ -295,6 +293,8 @@ NEXT_PAGE(level2_kernel_pgt)
/* Module mapping starts here */
.fill 492,8,0
+NEXT_PAGE(empty_zero_page)
+
NEXT_PAGE(level3_physmem_pgt)
.quad phys_level2_kernel_pgt | 0x007 /* so that __va works even before pagetable_init */
.fill 511,8,0
@@ -337,7 +337,7 @@ ENTRY(boot_level4_pgt)
.align 16
.globl cpu_gdt_descr
cpu_gdt_descr:
- .word gdt_end-cpu_gdt_table-1
+ .word gdt_end-cpu_gdt_table
gdt:
.quad cpu_gdt_table
#ifdef CONFIG_SMP
@@ -352,8 +352,7 @@ gdt:
* Also sysret mandates a special GDT layout
*/
- .section .data.page_aligned, "aw"
- .align PAGE_SIZE
+.align PAGE_SIZE
/* The TLS descriptors are currently at a different place compared to i386.
Hopefully nobody expects them at a fixed place (Wine?) */
@@ -379,12 +378,9 @@ gdt_end:
/* zero the remaining page */
.fill PAGE_SIZE / 8 - GDT_ENTRIES,8,0
- .section .bss, "aw", @nobits
- .align L1_CACHE_BYTES
-ENTRY(idt_table)
- .skip 256 * 16
+ENTRY(idt_table)
+ .rept 256
+ .quad 0
+ .quad 0
+ .endr
- .section .bss.page_aligned, "aw", @nobits
- .align PAGE_SIZE
-ENTRY(empty_zero_page)
- .skip PAGE_SIZE
diff --git a/trunk/arch/x86_64/kernel/io_apic.c b/trunk/arch/x86_64/kernel/io_apic.c
index 77b4c608cca0..ffed464e6b12 100644
--- a/trunk/arch/x86_64/kernel/io_apic.c
+++ b/trunk/arch/x86_64/kernel/io_apic.c
@@ -50,7 +50,7 @@ static int no_timer_check;
int disable_timer_pin_1 __initdata;
-int timer_over_8254 __initdata = 0;
+int timer_over_8254 __initdata = 1;
/* Where if anywhere is the i8259 connect in external int mode */
static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
@@ -310,7 +310,7 @@ void __init check_ioapic(void)
force_iommu) &&
!iommu_aperture_allowed) {
printk(KERN_INFO
- "Looks like a VIA chipset. Disabling IOMMU. Override with \"iommu=allowed\"\n");
+ "Looks like a VIA chipset. Disabling IOMMU. Overwrite with \"iommu=allowed\"\n");
iommu_aperture_disabled = 1;
}
#endif
@@ -1848,7 +1848,7 @@ static inline void check_timer(void)
*/
setup_ExtINT_IRQ0_pin(apic2, pin2, vector);
if (timer_irq_works()) {
- apic_printk(APIC_VERBOSE," works.\n");
+ printk("works.\n");
nmi_watchdog_default();
if (nmi_watchdog == NMI_IO_APIC) {
setup_nmi();
@@ -1860,7 +1860,7 @@ static inline void check_timer(void)
*/
clear_IO_APIC_pin(apic2, pin2);
}
- apic_printk(APIC_VERBOSE," failed.\n");
+ printk(" failed.\n");
if (nmi_watchdog == NMI_IO_APIC) {
printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n");
@@ -1875,7 +1875,7 @@ static inline void check_timer(void)
enable_8259A_irq(0);
if (timer_irq_works()) {
- apic_printk(APIC_VERBOSE," works.\n");
+ apic_printk(APIC_QUIET, " works.\n");
return;
}
apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector);
diff --git a/trunk/arch/x86_64/kernel/irq.c b/trunk/arch/x86_64/kernel/irq.c
index d8bd0b345b1e..30d2a1e545fe 100644
--- a/trunk/arch/x86_64/kernel/irq.c
+++ b/trunk/arch/x86_64/kernel/irq.c
@@ -38,8 +38,9 @@ int show_interrupts(struct seq_file *p, void *v)
if (i == 0) {
seq_printf(p, " ");
- for_each_online_cpu(j)
- seq_printf(p, "CPU%d ",j);
+ for (j=0; jtypename);
@@ -65,13 +68,15 @@ int show_interrupts(struct seq_file *p, void *v)
spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} else if (i == NR_IRQS) {
seq_printf(p, "NMI: ");
- for_each_online_cpu(j)
- seq_printf(p, "%10u ", cpu_pda(j)->__nmi_count);
+ for (j = 0; j < NR_CPUS; j++)
+ if (cpu_online(j))
+ seq_printf(p, "%10u ", cpu_pda(j)->__nmi_count);
seq_putc(p, '\n');
#ifdef CONFIG_X86_LOCAL_APIC
seq_printf(p, "LOC: ");
- for_each_online_cpu(j)
- seq_printf(p, "%10u ", cpu_pda(j)->apic_timer_irqs);
+ for (j = 0; j < NR_CPUS; j++)
+ if (cpu_online(j))
+ seq_printf(p, "%10u ", cpu_pda(j)->apic_timer_irqs);
seq_putc(p, '\n');
#endif
seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
diff --git a/trunk/arch/x86_64/kernel/kprobes.c b/trunk/arch/x86_64/kernel/kprobes.c
index 14f0ced613b6..8b866a8572cf 100644
--- a/trunk/arch/x86_64/kernel/kprobes.c
+++ b/trunk/arch/x86_64/kernel/kprobes.c
@@ -222,9 +222,9 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p)
void __kprobes arch_remove_kprobe(struct kprobe *p)
{
- mutex_lock(&kprobe_mutex);
+ down(&kprobe_mutex);
free_insn_slot(p->ainsn.insn);
- mutex_unlock(&kprobe_mutex);
+ up(&kprobe_mutex);
}
static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb)
diff --git a/trunk/arch/x86_64/kernel/mce.c b/trunk/arch/x86_64/kernel/mce.c
index 04282ef9fbd4..b8b9529fa89e 100644
--- a/trunk/arch/x86_64/kernel/mce.c
+++ b/trunk/arch/x86_64/kernel/mce.c
@@ -139,7 +139,8 @@ static void mce_panic(char *msg, struct mce *backup, unsigned long start)
static int mce_available(struct cpuinfo_x86 *c)
{
- return cpu_has(c, X86_FEATURE_MCE) && cpu_has(c, X86_FEATURE_MCA);
+ return test_bit(X86_FEATURE_MCE, &c->x86_capability) &&
+ test_bit(X86_FEATURE_MCA, &c->x86_capability);
}
static inline void mce_get_rip(struct mce *m, struct pt_regs *regs)
diff --git a/trunk/arch/x86_64/kernel/mpparse.c b/trunk/arch/x86_64/kernel/mpparse.c
index b17cf3eba359..9013a90b5c2e 100644
--- a/trunk/arch/x86_64/kernel/mpparse.c
+++ b/trunk/arch/x86_64/kernel/mpparse.c
@@ -106,11 +106,11 @@ static int __init mpf_checksum(unsigned char *mp, int len)
return sum & 0xFF;
}
-static void __cpuinit MP_processor_info (struct mpc_config_processor *m)
+static void __init MP_processor_info (struct mpc_config_processor *m)
{
int cpu;
unsigned char ver;
- cpumask_t tmp_map;
+ static int found_bsp=0;
if (!(m->mpc_cpuflag & CPU_ENABLED)) {
disabled_cpus++;
@@ -133,10 +133,8 @@ static void __cpuinit MP_processor_info (struct mpc_config_processor *m)
return;
}
- num_processors++;
- cpus_complement(tmp_map, cpu_present_map);
- cpu = first_cpu(tmp_map);
-
+ cpu = num_processors++;
+
#if MAX_APICS < 255
if ((int)m->mpc_apicid > MAX_APICS) {
printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n",
@@ -162,7 +160,12 @@ static void __cpuinit MP_processor_info (struct mpc_config_processor *m)
* entry is BSP, and so on.
*/
cpu = 0;
- }
+
+ bios_cpu_apicid[0] = m->mpc_apicid;
+ x86_cpu_to_apicid[0] = m->mpc_apicid;
+ found_bsp = 1;
+ } else
+ cpu = num_processors - found_bsp;
bios_cpu_apicid[cpu] = m->mpc_apicid;
x86_cpu_to_apicid[cpu] = m->mpc_apicid;
@@ -688,7 +691,7 @@ void __init mp_register_lapic_address (
}
-void __cpuinit mp_register_lapic (
+void __init mp_register_lapic (
u8 id,
u8 enabled)
{
diff --git a/trunk/arch/x86_64/kernel/nmi.c b/trunk/arch/x86_64/kernel/nmi.c
index d9e4067faf05..5bf17e41cd2d 100644
--- a/trunk/arch/x86_64/kernel/nmi.c
+++ b/trunk/arch/x86_64/kernel/nmi.c
@@ -162,7 +162,9 @@ int __init check_nmi_watchdog (void)
local_irq_enable();
mdelay((10*1000)/nmi_hz); // wait 10 ticks
- for_each_online_cpu(cpu) {
+ for (cpu = 0; cpu < NR_CPUS; cpu++) {
+ if (!cpu_online(cpu))
+ continue;
if (cpu_pda(cpu)->__nmi_count - counts[cpu] <= 5) {
endflag = 1;
printk("CPU#%d: NMI appears to be stuck (%d->%d)!\n",
@@ -534,7 +536,6 @@ asmlinkage __kprobes void do_nmi(struct pt_regs * regs, long error_code)
void set_nmi_callback(nmi_callback_t callback)
{
- vmalloc_sync_all();
rcu_assign_pointer(nmi_callback, callback);
}
diff --git a/trunk/arch/x86_64/kernel/pci-dma.c b/trunk/arch/x86_64/kernel/pci-dma.c
index 03c9eeedb0f3..4ed391edd47a 100644
--- a/trunk/arch/x86_64/kernel/pci-dma.c
+++ b/trunk/arch/x86_64/kernel/pci-dma.c
@@ -73,9 +73,6 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
if (dma_mask == 0)
dma_mask = 0xffffffff;
- /* Don't invoke OOM killer */
- gfp |= __GFP_NORETRY;
-
/* Kludge to make it bug-to-bug compatible with i386. i386
uses the normal dma_mask for alloc_coherent. */
dma_mask &= *dev->dma_mask;
diff --git a/trunk/arch/x86_64/kernel/pci-gart.c b/trunk/arch/x86_64/kernel/pci-gart.c
index a6c01e121266..0c3f052ba6ce 100644
--- a/trunk/arch/x86_64/kernel/pci-gart.c
+++ b/trunk/arch/x86_64/kernel/pci-gart.c
@@ -65,7 +65,9 @@ static u32 gart_unmapped_entry;
#define for_all_nb(dev) \
dev = NULL; \
- while ((dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1103, dev))!=NULL)
+ while ((dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1103, dev))!=NULL)\
+ if (dev->bus->number == 0 && \
+ (PCI_SLOT(dev->devfn) >= 24) && (PCI_SLOT(dev->devfn) <= 31))
static struct pci_dev *northbridges[MAX_NB];
static u32 northbridge_flush_word[MAX_NB];
@@ -146,12 +148,9 @@ static void flush_gart(struct device *dev)
if (!northbridges[i])
continue;
/* Make sure the hardware actually executed the flush. */
- for (;;) {
+ do {
pci_read_config_dword(northbridges[i], 0x9c, &w);
- if (!(w & 1))
- break;
- cpu_relax();
- }
+ } while (w & 1);
}
if (!flushed)
printk("nothing to flush?\n");
diff --git a/trunk/arch/x86_64/kernel/pmtimer.c b/trunk/arch/x86_64/kernel/pmtimer.c
index ee5ee4891f3d..5c51d10408a6 100644
--- a/trunk/arch/x86_64/kernel/pmtimer.c
+++ b/trunk/arch/x86_64/kernel/pmtimer.c
@@ -86,7 +86,7 @@ static unsigned pmtimer_wait_tick(void)
for (a = b = inl(pmtmr_ioport) & ACPI_PM_MASK;
a == b;
b = inl(pmtmr_ioport) & ACPI_PM_MASK)
- cpu_relax();
+ ;
return b;
}
@@ -97,7 +97,6 @@ void pmtimer_wait(unsigned us)
a = pmtimer_wait_tick();
do {
b = inl(pmtmr_ioport);
- cpu_relax();
} while (cyc2us(b - a) < us);
}
diff --git a/trunk/arch/x86_64/kernel/process.c b/trunk/arch/x86_64/kernel/process.c
index 81111835722d..22a05dec81a2 100644
--- a/trunk/arch/x86_64/kernel/process.c
+++ b/trunk/arch/x86_64/kernel/process.c
@@ -114,7 +114,7 @@ void exit_idle(void)
* We use this if we don't have any better
* idle routine..
*/
-static void default_idle(void)
+void default_idle(void)
{
local_irq_enable();
@@ -508,7 +508,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long rsp,
/*
* This special macro can be used to load a debugging register
*/
-#define loaddebug(thread,r) set_debugreg(thread->debugreg ## r, r)
+#define loaddebug(thread,r) set_debug(thread->debugreg ## r, r)
/*
* switch_to(x,y) should switch tasks from x to y.
@@ -527,6 +527,8 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
int cpu = smp_processor_id();
struct tss_struct *tss = &per_cpu(init_tss, cpu);
+ unlazy_fpu(prev_p);
+
/*
* Reload esp0, LDT and the page table pointer:
*/
@@ -584,14 +586,11 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
}
/*
- * Switch the PDA and FPU contexts.
+ * Switch the PDA context.
*/
prev->userrsp = read_pda(oldrsp);
write_pda(oldrsp, next->userrsp);
write_pda(pcurrent, next_p);
- /* This must be here to ensure both math_state_restore() and
- kernel_fpu_begin() work consistently. */
- unlazy_fpu(prev_p);
write_pda(kernelstack,
task_stack_page(next_p) + THREAD_SIZE - PDA_STACKOFFSET);
diff --git a/trunk/arch/x86_64/kernel/ptrace.c b/trunk/arch/x86_64/kernel/ptrace.c
index d44b2c1e63a6..53205622351c 100644
--- a/trunk/arch/x86_64/kernel/ptrace.c
+++ b/trunk/arch/x86_64/kernel/ptrace.c
@@ -420,9 +420,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
case offsetof(struct user, u_debugreg[7]):
/* See arch/i386/kernel/ptrace.c for an explanation of
* this awkward check.*/
- data &= ~DR_CONTROL_RESERVED;
- for(i=0; i<4; i++)
- if ((0x5554 >> ((data >> (16 + 4*i)) & 0xf)) & 1)
+ data &= ~DR_CONTROL_RESERVED;
+ for(i=0; i<4; i++)
+ if ((0x5454 >> ((data >> (16 + 4*i)) & 0xf)) & 1)
break;
if (i == 4) {
child->thread.debugreg7 = data;
diff --git a/trunk/arch/x86_64/kernel/setup.c b/trunk/arch/x86_64/kernel/setup.c
index a57eec8311a7..aa55e3cec665 100644
--- a/trunk/arch/x86_64/kernel/setup.c
+++ b/trunk/arch/x86_64/kernel/setup.c
@@ -46,7 +46,6 @@
#include
#include
#include
-#include
#include
#include
@@ -68,7 +67,6 @@
#include
#include
#include
-#include
/*
* Machine setup..
@@ -93,12 +91,6 @@ int bootloader_type;
unsigned long saved_video_mode;
-/*
- * Early DMI memory
- */
-int dmi_alloc_index;
-char dmi_alloc_data[DMI_MAX_DATA];
-
/*
* Setup options
*/
@@ -278,13 +270,6 @@ static void __init probe_roms(void)
}
}
-/* Check for full argument with no trailing characters */
-static int fullarg(char *p, char *arg)
-{
- int l = strlen(arg);
- return !memcmp(p, arg, l) && (p[l] == 0 || isspace(p[l]));
-}
-
static __init void parse_cmdline_early (char ** cmdline_p)
{
char c = ' ', *to = command_line, *from = COMMAND_LINE;
@@ -308,10 +293,10 @@ static __init void parse_cmdline_early (char ** cmdline_p)
#endif
#ifdef CONFIG_ACPI
/* "acpi=off" disables both ACPI table parsing and interpreter init */
- if (fullarg(from,"acpi=off"))
+ if (!memcmp(from, "acpi=off", 8))
disable_acpi();
- if (fullarg(from, "acpi=force")) {
+ if (!memcmp(from, "acpi=force", 10)) {
/* add later when we do DMI horrors: */
acpi_force = 1;
acpi_disabled = 0;
@@ -319,47 +304,52 @@ static __init void parse_cmdline_early (char ** cmdline_p)
/* acpi=ht just means: do ACPI MADT parsing
at bootup, but don't enable the full ACPI interpreter */
- if (fullarg(from, "acpi=ht")) {
+ if (!memcmp(from, "acpi=ht", 7)) {
if (!acpi_force)
disable_acpi();
acpi_ht = 1;
}
- else if (fullarg(from, "pci=noacpi"))
+ else if (!memcmp(from, "pci=noacpi", 10))
acpi_disable_pci();
- else if (fullarg(from, "acpi=noirq"))
+ else if (!memcmp(from, "acpi=noirq", 10))
acpi_noirq_set();
- else if (fullarg(from, "acpi_sci=edge"))
+ else if (!memcmp(from, "acpi_sci=edge", 13))
acpi_sci_flags.trigger = 1;
- else if (fullarg(from, "acpi_sci=level"))
+ else if (!memcmp(from, "acpi_sci=level", 14))
acpi_sci_flags.trigger = 3;
- else if (fullarg(from, "acpi_sci=high"))
+ else if (!memcmp(from, "acpi_sci=high", 13))
acpi_sci_flags.polarity = 1;
- else if (fullarg(from, "acpi_sci=low"))
+ else if (!memcmp(from, "acpi_sci=low", 12))
acpi_sci_flags.polarity = 3;
/* acpi=strict disables out-of-spec workarounds */
- else if (fullarg(from, "acpi=strict")) {
+ else if (!memcmp(from, "acpi=strict", 11)) {
acpi_strict = 1;
}
#ifdef CONFIG_X86_IO_APIC
- else if (fullarg(from, "acpi_skip_timer_override"))
+ else if (!memcmp(from, "acpi_skip_timer_override", 24))
acpi_skip_timer_override = 1;
#endif
#endif
- if (fullarg(from, "disable_timer_pin_1"))
+ if (!memcmp(from, "disable_timer_pin_1", 19))
disable_timer_pin_1 = 1;
- if (fullarg(from, "enable_timer_pin_1"))
+ if (!memcmp(from, "enable_timer_pin_1", 18))
disable_timer_pin_1 = -1;
- if (fullarg(from, "nolapic") || fullarg(from, "disableapic"))
+ if (!memcmp(from, "nolapic", 7) ||
+ !memcmp(from, "disableapic", 11))
disable_apic = 1;
- if (fullarg(from, "noapic"))
+ /* Don't confuse with noapictimer */
+ if (!memcmp(from, "noapic", 6) &&
+ (from[6] == ' ' || from[6] == 0))
skip_ioapic_setup = 1;
- if (fullarg(from,"apic")) {
+ /* Make sure to not confuse with apic= */
+ if (!memcmp(from, "apic", 4) &&
+ (from[4] == ' ' || from[4] == 0)) {
skip_ioapic_setup = 0;
ioapic_force = 1;
}
@@ -398,7 +388,7 @@ static __init void parse_cmdline_early (char ** cmdline_p)
iommu_setup(from+6);
}
- if (fullarg(from,"oops=panic"))
+ if (!memcmp(from,"oops=panic", 10))
panic_on_oops = 1;
if (!memcmp(from, "noexec=", 7))
@@ -621,14 +611,11 @@ void __init setup_arch(char **cmdline_p)
* we are rounding upwards:
*/
end_pfn = e820_end_of_ram();
- num_physpages = end_pfn; /* for pfn_valid */
check_efer();
init_memory_mapping(0, (end_pfn_map << PAGE_SHIFT));
- dmi_scan_machine();
-
zap_low_mappings(0);
#ifdef CONFIG_ACPI
@@ -721,12 +708,6 @@ void __init setup_arch(char **cmdline_p)
check_ioapic();
- /*
- * set this early, so we dont allocate cpu0
- * if MADT list doesnt list BSP first
- * mpparse.c/MP_processor_info() allocates logical cpu numbers.
- */
- cpu_set(0, cpu_present_map);
#ifdef CONFIG_ACPI
/*
* Read APIC and some other early information from ACPI tables.
@@ -855,7 +836,7 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c)
unsigned bits;
#ifdef CONFIG_NUMA
int node = 0;
- unsigned apicid = hard_smp_processor_id();
+ unsigned apicid = phys_proc_id[cpu];
#endif
bits = 0;
@@ -865,7 +846,7 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c)
/* Low order bits define the core id (index of core in socket) */
cpu_core_id[cpu] = phys_proc_id[cpu] & ((1 << bits)-1);
/* Convert the APIC ID into the socket ID */
- phys_proc_id[cpu] = phys_pkg_id(bits);
+ phys_proc_id[cpu] >>= bits;
#ifdef CONFIG_NUMA
node = phys_proc_id[cpu];
@@ -891,8 +872,8 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c)
}
numa_set_node(cpu, node);
- printk(KERN_INFO "CPU %d/%x(%d) -> Node %d -> Core %d\n",
- cpu, apicid, c->x86_max_cores, node, cpu_core_id[cpu]);
+ printk(KERN_INFO "CPU %d(%d) -> Node %d -> Core %d\n",
+ cpu, c->x86_max_cores, node, cpu_core_id[cpu]);
#endif
#endif
}
@@ -946,6 +927,8 @@ static int __init init_amd(struct cpuinfo_x86 *c)
if (c->extended_cpuid_level >= 0x80000008) {
c->x86_max_cores = (cpuid_ecx(0x80000008) & 0xff) + 1;
+ if (c->x86_max_cores & (c->x86_max_cores - 1))
+ c->x86_max_cores = 1;
amd_detect_cmp(c);
}
@@ -1278,7 +1261,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
/* Intel-defined (#2) */
- "pni", NULL, NULL, "monitor", "ds_cpl", "vmx", "smx", "est",
+ "pni", NULL, NULL, "monitor", "ds_cpl", "vmx", NULL, "est",
"tm2", NULL, "cid", NULL, NULL, "cx16", "xtpr", NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -1361,7 +1344,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
{
int i;
for ( i = 0 ; i < 32*NCAPINTS ; i++ )
- if (cpu_has(c, i) && x86_cap_flags[i] != NULL)
+ if ( test_bit(i, &c->x86_capability) &&
+ x86_cap_flags[i] != NULL )
seq_printf(m, " %s", x86_cap_flags[i]);
}
@@ -1419,3 +1403,10 @@ struct seq_operations cpuinfo_op = {
.show = show_cpuinfo,
};
+static int __init run_dmi_scan(void)
+{
+ dmi_scan_machine();
+ return 0;
+}
+core_initcall(run_dmi_scan);
+
diff --git a/trunk/arch/x86_64/kernel/setup64.c b/trunk/arch/x86_64/kernel/setup64.c
index eabdb63fec31..70f1bb808a20 100644
--- a/trunk/arch/x86_64/kernel/setup64.c
+++ b/trunk/arch/x86_64/kernel/setup64.c
@@ -33,7 +33,7 @@ cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE;
struct x8664_pda *_cpu_pda[NR_CPUS] __read_mostly;
struct x8664_pda boot_cpu_pda[NR_CPUS] __cacheline_aligned;
-struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table };
+struct desc_ptr idt_descr = { 256 * 16, (unsigned long) idt_table };
char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned")));
@@ -59,7 +59,7 @@ int __init nonx_setup(char *str)
}
__setup("noexec=", nonx_setup); /* parsed early actually */
-int force_personality32 = 0;
+int force_personality32 = READ_IMPLIES_EXEC;
/* noexec32=on|off
Control non executable heap for 32bit processes.
@@ -248,7 +248,7 @@ void __cpuinit cpu_init (void)
switch (v + 1) {
#if DEBUG_STKSZ > EXCEPTION_STKSZ
case DEBUG_STACK:
- cpu_pda(cpu)->debugstack = (unsigned long)estacks;
+ cpu_pda[cpu].debugstack = (unsigned long)estacks;
estacks += DEBUG_STKSZ;
break;
#endif
@@ -281,12 +281,12 @@ void __cpuinit cpu_init (void)
* Clear all 6 debug registers:
*/
- set_debugreg(0UL, 0);
- set_debugreg(0UL, 1);
- set_debugreg(0UL, 2);
- set_debugreg(0UL, 3);
- set_debugreg(0UL, 6);
- set_debugreg(0UL, 7);
+ set_debug(0UL, 0);
+ set_debug(0UL, 1);
+ set_debug(0UL, 2);
+ set_debug(0UL, 3);
+ set_debug(0UL, 6);
+ set_debug(0UL, 7);
fpu_init();
}
diff --git a/trunk/arch/x86_64/kernel/signal.c b/trunk/arch/x86_64/kernel/signal.c
index e5f5ce7909a3..5876df116c92 100644
--- a/trunk/arch/x86_64/kernel/signal.c
+++ b/trunk/arch/x86_64/kernel/signal.c
@@ -443,6 +443,9 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
if (!user_mode(regs))
return 1;
+ if (try_to_freeze())
+ goto no_signal;
+
if (!oldset)
oldset = ¤t->blocked;
@@ -460,6 +463,7 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
return handle_signal(signr, &info, &ka, oldset, regs);
}
+ no_signal:
/* Did we come from a system call? */
if ((long)regs->orig_rax >= 0) {
/* Restart the system call - no handlers present */
diff --git a/trunk/arch/x86_64/kernel/smp.c b/trunk/arch/x86_64/kernel/smp.c
index 4a6628b14d99..19ef012b1f17 100644
--- a/trunk/arch/x86_64/kernel/smp.c
+++ b/trunk/arch/x86_64/kernel/smp.c
@@ -75,7 +75,7 @@ static inline void leave_mm(int cpu)
{
if (read_pda(mmu_state) == TLBSTATE_OK)
BUG();
- cpu_clear(cpu, read_pda(active_mm)->cpu_vm_mask);
+ clear_bit(cpu, &read_pda(active_mm)->cpu_vm_mask);
load_cr3(swapper_pg_dir);
}
@@ -85,7 +85,7 @@ static inline void leave_mm(int cpu)
* [cpu0: the cpu that switches]
* 1) switch_mm() either 1a) or 1b)
* 1a) thread switch to a different mm
- * 1a1) cpu_clear(cpu, old_mm->cpu_vm_mask);
+ * 1a1) clear_bit(cpu, &old_mm->cpu_vm_mask);
* Stop ipi delivery for the old mm. This is not synchronized with
* the other cpus, but smp_invalidate_interrupt ignore flush ipis
* for the wrong mm, and in the worst case we perform a superfluous
@@ -95,7 +95,7 @@ static inline void leave_mm(int cpu)
* was in lazy tlb mode.
* 1a3) update cpu active_mm
* Now cpu0 accepts tlb flushes for the new mm.
- * 1a4) cpu_set(cpu, new_mm->cpu_vm_mask);
+ * 1a4) set_bit(cpu, &new_mm->cpu_vm_mask);
* Now the other cpus will send tlb flush ipis.
* 1a4) change cr3.
* 1b) thread switch without mm change
diff --git a/trunk/arch/x86_64/kernel/time.c b/trunk/arch/x86_64/kernel/time.c
index 7f58fa682491..ee5ce3d3cbc3 100644
--- a/trunk/arch/x86_64/kernel/time.c
+++ b/trunk/arch/x86_64/kernel/time.c
@@ -88,8 +88,7 @@ static inline unsigned int do_gettimeoffset_tsc(void)
unsigned long t;
unsigned long x;
t = get_cycles_sync();
- if (t < vxtime.last_tsc)
- t = vxtime.last_tsc; /* hack */
+ if (t < vxtime.last_tsc) t = vxtime.last_tsc; /* hack */
x = ((t - vxtime.last_tsc) * vxtime.tsc_quot) >> 32;
return x;
}
@@ -179,9 +178,8 @@ unsigned long profile_pc(struct pt_regs *regs)
{
unsigned long pc = instruction_pointer(regs);
- /* Assume the lock function has either no stack frame or only a single
- word. This checks if the address on the stack looks like a kernel
- text address.
+ /* Assume the lock function has either no stack frame or only a single word.
+ This checks if the address on the stack looks like a kernel text address.
There is a small window for false hits, but in that case the tick
is just accounted to the spinlock function.
Better would be to write these functions in assembler again
@@ -244,10 +242,17 @@ static void set_rtc_mmss(unsigned long nowtime)
real_minutes += 30; /* correct for half hour time zone */
real_minutes %= 60;
+#if 0
+ /* AMD 8111 is a really bad time keeper and hits this regularly.
+ It probably was an attempt to avoid screwing up DST, but ignore
+ that for now. */
if (abs(real_minutes - cmos_minutes) >= 30) {
printk(KERN_WARNING "time.c: can't update CMOS clock "
"from %d to %d\n", cmos_minutes, real_minutes);
- } else {
+ } else
+#endif
+
+ {
BIN_TO_BCD(real_seconds);
BIN_TO_BCD(real_minutes);
CMOS_WRITE(real_seconds, RTC_SECONDS);
@@ -288,7 +293,8 @@ unsigned long long monotonic_clock(void)
this_offset = hpet_readl(HPET_COUNTER);
} while (read_seqretry(&xtime_lock, seq));
offset = (this_offset - last_offset);
- offset *= (NSEC_PER_SEC/HZ) / hpet_tick;
+ offset *=(NSEC_PER_SEC/HZ)/hpet_tick;
+ return base + offset;
} else {
do {
seq = read_seqbegin(&xtime_lock);
@@ -297,46 +303,50 @@ unsigned long long monotonic_clock(void)
base = monotonic_base;
} while (read_seqretry(&xtime_lock, seq));
this_offset = get_cycles_sync();
- offset = (this_offset - last_offset)*1000 / cpu_khz;
+ offset = (this_offset - last_offset)*1000/cpu_khz;
+ return base + offset;
}
- return base + offset;
}
EXPORT_SYMBOL(monotonic_clock);
static noinline void handle_lost_ticks(int lost, struct pt_regs *regs)
{
- static long lost_count;
- static int warned;
- if (report_lost_ticks) {
- printk(KERN_WARNING "time.c: Lost %d timer tick(s)! ", lost);
- print_symbol("rip %s)\n", regs->rip);
- }
-
- if (lost_count == 1000 && !warned) {
- printk(KERN_WARNING "warning: many lost ticks.\n"
- KERN_WARNING "Your time source seems to be instable or "
+ static long lost_count;
+ static int warned;
+
+ if (report_lost_ticks) {
+ printk(KERN_WARNING "time.c: Lost %d timer "
+ "tick(s)! ", lost);
+ print_symbol("rip %s)\n", regs->rip);
+ }
+
+ if (lost_count == 1000 && !warned) {
+ printk(KERN_WARNING
+ "warning: many lost ticks.\n"
+ KERN_WARNING "Your time source seems to be instable or "
"some driver is hogging interupts\n");
- print_symbol("rip %s\n", regs->rip);
- if (vxtime.mode == VXTIME_TSC && vxtime.hpet_address) {
- printk(KERN_WARNING "Falling back to HPET\n");
- if (hpet_use_timer)
- vxtime.last = hpet_readl(HPET_T0_CMP) -
- hpet_tick;
- else
- vxtime.last = hpet_readl(HPET_COUNTER);
- vxtime.mode = VXTIME_HPET;
- do_gettimeoffset = do_gettimeoffset_hpet;
- }
- /* else should fall back to PIT, but code missing. */
- warned = 1;
- } else
- lost_count++;
+ print_symbol("rip %s\n", regs->rip);
+ if (vxtime.mode == VXTIME_TSC && vxtime.hpet_address) {
+ printk(KERN_WARNING "Falling back to HPET\n");
+ if (hpet_use_timer)
+ vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick;
+ else
+ vxtime.last = hpet_readl(HPET_COUNTER);
+ vxtime.mode = VXTIME_HPET;
+ do_gettimeoffset = do_gettimeoffset_hpet;
+ }
+ /* else should fall back to PIT, but code missing. */
+ warned = 1;
+ } else
+ lost_count++;
#ifdef CONFIG_CPU_FREQ
- /* In some cases the CPU can change frequency without us noticing
- Give cpufreq a change to catch up. */
- if ((lost_count+1) % 25 == 0)
- cpufreq_delayed_get();
+ /* In some cases the CPU can change frequency without us noticing
+ (like going into thermal throttle)
+ Give cpufreq a change to catch up. */
+ if ((lost_count+1) % 25 == 0) {
+ cpufreq_delayed_get();
+ }
#endif
}
@@ -344,7 +354,7 @@ void main_timer_handler(struct pt_regs *regs)
{
static unsigned long rtc_update = 0;
unsigned long tsc;
- int delay = 0, offset = 0, lost = 0;
+ int delay, offset = 0, lost = 0;
/*
* Here we are in the timer irq handler. We have irqs locally disabled (so we
@@ -365,7 +375,7 @@ void main_timer_handler(struct pt_regs *regs)
*/
offset = hpet_readl(HPET_T0_CMP) - hpet_tick;
delay = hpet_readl(HPET_COUNTER) - offset;
- } else if (!pmtmr_ioport) {
+ } else {
spin_lock(&i8253_lock);
outb_p(0x00, 0x43);
delay = inb_p(0x40);
@@ -507,7 +517,6 @@ static unsigned long get_cmos_time(void)
unsigned int timeout = 1000000, year, mon, day, hour, min, sec;
unsigned char uip = 0, this = 0;
unsigned long flags;
- unsigned extyear = 0;
/*
* The Linux interpretation of the CMOS clock register contents: When the
@@ -536,17 +545,12 @@ static unsigned long get_cmos_time(void)
mon = CMOS_READ(RTC_MONTH);
year = CMOS_READ(RTC_YEAR);
-#ifdef CONFIG_ACPI
- if (acpi_fadt.revision >= FADT2_REVISION_ID && acpi_fadt.century)
- extyear = CMOS_READ(acpi_fadt.century);
-#endif
-
spin_unlock_irqrestore(&rtc_lock, flags);
/*
* We know that x86-64 always uses BCD format, no need to check the
* config register.
- */
+ */
BCD_TO_BIN(sec);
BCD_TO_BIN(min);
@@ -555,17 +559,11 @@ static unsigned long get_cmos_time(void)
BCD_TO_BIN(mon);
BCD_TO_BIN(year);
- if (extyear) {
- BCD_TO_BIN(extyear);
- year += extyear;
- printk(KERN_INFO "Extended CMOS year: %d\n", extyear);
- } else {
- /*
- * x86-64 systems only exists since 2002.
- * This will work up to Dec 31, 2100
- */
- year += 2000;
- }
+ /*
+ * x86-64 systems only exists since 2002.
+ * This will work up to Dec 31, 2100
+ */
+ year += 2000;
return mktime(year, mon, day, hour, min, sec);
}
@@ -608,8 +606,7 @@ static void cpufreq_delayed_get(void)
cpufreq_delayed_issched = 1;
if (!warned) {
warned = 1;
- printk(KERN_DEBUG
- "Losing some ticks... checking if CPU frequency changed.\n");
+ printk(KERN_DEBUG "Losing some ticks... checking if CPU frequency changed.\n");
}
schedule_work(&cpufreq_delayed_get_work);
}
@@ -632,9 +629,9 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
lpj = &dummy;
if (!(freq->flags & CPUFREQ_CONST_LOOPS))
#ifdef CONFIG_SMP
- lpj = &cpu_data[freq->cpu].loops_per_jiffy;
+ lpj = &cpu_data[freq->cpu].loops_per_jiffy;
#else
- lpj = &boot_cpu_data.loops_per_jiffy;
+ lpj = &boot_cpu_data.loops_per_jiffy;
#endif
if (!ref_freq) {
@@ -771,8 +768,9 @@ static __init int late_hpet_init(void)
int i;
hpet = (struct hpet *) fix_to_virt(FIX_HPET_BASE);
- timer = &hpet->hpet_timers[2];
- for (i = 2; i < ntimer; timer++, i++)
+
+ for (i = 2, timer = &hpet->hpet_timers[2]; i < ntimer;
+ timer++, i++)
hd.hd_irq[i] = (timer->hpet_config &
Tn_INT_ROUTE_CNF_MASK) >>
Tn_INT_ROUTE_CNF_SHIFT;
@@ -929,7 +927,8 @@ void __init time_init(void)
-xtime.tv_sec, -xtime.tv_nsec);
if (!hpet_init())
- vxtime_hz = (1000000000000000L + hpet_period / 2) / hpet_period;
+ vxtime_hz = (1000000000000000L + hpet_period / 2) /
+ hpet_period;
else
vxtime.hpet_address = 0;
diff --git a/trunk/arch/x86_64/kernel/traps.c b/trunk/arch/x86_64/kernel/traps.c
index 7b148309c529..28d50dc540e8 100644
--- a/trunk/arch/x86_64/kernel/traps.c
+++ b/trunk/arch/x86_64/kernel/traps.c
@@ -47,6 +47,8 @@
#include
#include
+extern struct gate_struct idt_table[256];
+
asmlinkage void divide_error(void);
asmlinkage void debug(void);
asmlinkage void nmi(void);
@@ -76,8 +78,6 @@ int register_die_notifier(struct notifier_block *nb)
{
int err = 0;
unsigned long flags;
-
- vmalloc_sync_all();
spin_lock_irqsave(&die_notifier_lock, flags);
err = notifier_chain_register(&die_chain, nb);
spin_unlock_irqrestore(&die_notifier_lock, flags);
@@ -122,7 +122,7 @@ int printk_address(unsigned long address)
if (!modname)
modname = delim = "";
return printk("<%016lx>{%s%s%s%s%+ld}",
- address, delim, modname, delim, symname, offset);
+ address,delim,modname,delim,symname,offset);
}
#else
int printk_address(unsigned long address)
@@ -334,12 +334,13 @@ void show_registers(struct pt_regs *regs)
show_stack(NULL, (unsigned long*)rsp);
printk("\nCode: ");
- if (regs->rip < PAGE_OFFSET)
+ if(regs->rip < PAGE_OFFSET)
goto bad;
- for (i=0; i<20; i++) {
+ for(i=0;i<20;i++)
+ {
unsigned char c;
- if (__get_user(c, &((unsigned char*)regs->rip)[i])) {
+ if(__get_user(c, &((unsigned char*)regs->rip)[i])) {
bad:
printk(" Bad RIP value.");
break;
@@ -478,7 +479,7 @@ static void __kprobes do_trap(int trapnr, int signr, char *str,
printk(KERN_INFO
"%s[%d] trap %s rip:%lx rsp:%lx error:%lx\n",
tsk->comm, tsk->pid, str,
- regs->rip, regs->rsp, error_code);
+ regs->rip,regs->rsp,error_code);
if (info)
force_sig_info(signr, info, tsk);
@@ -492,9 +493,9 @@ static void __kprobes do_trap(int trapnr, int signr, char *str,
{
const struct exception_table_entry *fixup;
fixup = search_exception_tables(regs->rip);
- if (fixup)
+ if (fixup) {
regs->rip = fixup->fixup;
- else
+ } else
die(str, regs, error_code);
return;
}
@@ -567,7 +568,7 @@ asmlinkage void __kprobes do_general_protection(struct pt_regs * regs,
printk(KERN_INFO
"%s[%d] general protection rip:%lx rsp:%lx error:%lx\n",
tsk->comm, tsk->pid,
- regs->rip, regs->rsp, error_code);
+ regs->rip,regs->rsp,error_code);
force_sig(SIGSEGV, tsk);
return;
diff --git a/trunk/arch/x86_64/kernel/vmlinux.lds.S b/trunk/arch/x86_64/kernel/vmlinux.lds.S
index 39ff0708f803..74db0062d4a2 100644
--- a/trunk/arch/x86_64/kernel/vmlinux.lds.S
+++ b/trunk/arch/x86_64/kernel/vmlinux.lds.S
@@ -20,12 +20,6 @@ SECTIONS
phys_startup_64 = startup_64 - LOAD_OFFSET;
_text = .; /* Text and read-only data */
.text : AT(ADDR(.text) - LOAD_OFFSET) {
- /* First the code that has to be first for bootstrapping */
- *(.bootstrap.text)
- /* Then all the functions that are "hot" in profiles, to group them
- onto the same hugetlb entry */
- #include "functionlist"
- /* Then the rest */
*(.text)
SCHED_TEXT
LOCK_TEXT
diff --git a/trunk/arch/x86_64/kernel/x8664_ksyms.c b/trunk/arch/x86_64/kernel/x8664_ksyms.c
index d96a9348e5a2..c9dc7e46731e 100644
--- a/trunk/arch/x86_64/kernel/x8664_ksyms.c
+++ b/trunk/arch/x86_64/kernel/x8664_ksyms.c
@@ -144,12 +144,16 @@ EXPORT_SYMBOL(rwsem_down_write_failed_thunk);
EXPORT_SYMBOL(empty_zero_page);
EXPORT_SYMBOL(die_chain);
+EXPORT_SYMBOL(register_die_notifier);
#ifdef CONFIG_SMP
EXPORT_SYMBOL(cpu_sibling_map);
EXPORT_SYMBOL(smp_num_siblings);
#endif
+extern void do_softirq_thunk(void);
+EXPORT_SYMBOL(do_softirq_thunk);
+
#ifdef CONFIG_BUG
EXPORT_SYMBOL(out_of_line_bug);
#endif
diff --git a/trunk/arch/x86_64/lib/thunk.S b/trunk/arch/x86_64/lib/thunk.S
index e49af0032e94..acc1e2ca7ed7 100644
--- a/trunk/arch/x86_64/lib/thunk.S
+++ b/trunk/arch/x86_64/lib/thunk.S
@@ -42,6 +42,7 @@
thunk rwsem_wake_thunk,rwsem_wake
thunk rwsem_downgrade_thunk,rwsem_downgrade_wake
#endif
+ thunk do_softirq_thunk,do_softirq
thunk __down_failed,__down
thunk_retrax __down_failed_interruptible,__down_interruptible
diff --git a/trunk/arch/x86_64/mm/fault.c b/trunk/arch/x86_64/mm/fault.c
index 316c53de47bd..2e7c3c8ffe03 100644
--- a/trunk/arch/x86_64/mm/fault.c
+++ b/trunk/arch/x86_64/mm/fault.c
@@ -264,8 +264,6 @@ static int vmalloc_fault(unsigned long address)
return -1;
if (pgd_none(*pgd))
set_pgd(pgd, *pgd_ref);
- else
- BUG_ON(pgd_page(*pgd) != pgd_page(*pgd_ref));
/* Below here mismatches are bugs because these lower tables
are shared */
@@ -314,13 +312,21 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
unsigned long flags;
siginfo_t info;
- tsk = current;
- mm = tsk->mm;
- prefetchw(&mm->mmap_sem);
-
/* get the address */
__asm__("movq %%cr2,%0":"=r" (address));
+ if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14,
+ SIGSEGV) == NOTIFY_STOP)
+ return;
+
+ if (likely(regs->eflags & X86_EFLAGS_IF))
+ local_irq_enable();
+ if (unlikely(page_fault_trace))
+ printk("pagefault rip:%lx rsp:%lx cs:%lu ss:%lu address %lx error %lx\n",
+ regs->rip,regs->rsp,regs->cs,regs->ss,address,error_code);
+
+ tsk = current;
+ mm = tsk->mm;
info.si_code = SEGV_MAPERR;
@@ -345,12 +351,10 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
*/
if (!(error_code & (PF_RSVD|PF_USER|PF_PROT)) &&
((address >= VMALLOC_START && address < VMALLOC_END))) {
- if (vmalloc_fault(address) >= 0)
- return;
- }
- if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14,
- SIGSEGV) == NOTIFY_STOP)
+ if (vmalloc_fault(address) < 0)
+ goto bad_area_nosemaphore;
return;
+ }
/*
* Don't take the mm semaphore here. If we fixup a prefetch
* fault we could otherwise deadlock.
@@ -358,17 +362,6 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
goto bad_area_nosemaphore;
}
- if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14,
- SIGSEGV) == NOTIFY_STOP)
- return;
-
- if (likely(regs->eflags & X86_EFLAGS_IF))
- local_irq_enable();
-
- if (unlikely(page_fault_trace))
- printk("pagefault rip:%lx rsp:%lx cs:%lu ss:%lu address %lx error %lx\n",
- regs->rip,regs->rsp,regs->cs,regs->ss,address,error_code);
-
if (unlikely(error_code & PF_RSVD))
pgtable_bad(address, regs, error_code);
@@ -578,48 +571,6 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
return;
}
-DEFINE_SPINLOCK(pgd_lock);
-struct page *pgd_list;
-
-void vmalloc_sync_all(void)
-{
- /* Note that races in the updates of insync and start aren't
- problematic:
- insync can only get set bits added, and updates to start are only
- improving performance (without affecting correctness if undone). */
- static DECLARE_BITMAP(insync, PTRS_PER_PGD);
- static unsigned long start = VMALLOC_START & PGDIR_MASK;
- unsigned long address;
-
- for (address = start; address <= VMALLOC_END; address += PGDIR_SIZE) {
- if (!test_bit(pgd_index(address), insync)) {
- const pgd_t *pgd_ref = pgd_offset_k(address);
- struct page *page;
-
- if (pgd_none(*pgd_ref))
- continue;
- spin_lock(&pgd_lock);
- for (page = pgd_list; page;
- page = (struct page *)page->index) {
- pgd_t *pgd;
- pgd = (pgd_t *)page_address(page) + pgd_index(address);
- if (pgd_none(*pgd))
- set_pgd(pgd, *pgd_ref);
- else
- BUG_ON(pgd_page(*pgd) != pgd_page(*pgd_ref));
- }
- spin_unlock(&pgd_lock);
- set_bit(pgd_index(address), insync);
- }
- if (address == start)
- start = address + PGDIR_SIZE;
- }
- /* Check that there is no need to do the same for the modules area. */
- BUILD_BUG_ON(!(MODULES_VADDR > __START_KERNEL));
- BUILD_BUG_ON(!(((MODULES_END - 1) & PGDIR_MASK) ==
- (__START_KERNEL & PGDIR_MASK)));
-}
-
static int __init enable_pagefaulttrace(char *str)
{
page_fault_trace = 1;
diff --git a/trunk/arch/x86_64/mm/init.c b/trunk/arch/x86_64/mm/init.c
index b04415625442..40ed13d263cd 100644
--- a/trunk/arch/x86_64/mm/init.c
+++ b/trunk/arch/x86_64/mm/init.c
@@ -94,7 +94,7 @@ void show_mem(void)
int after_bootmem;
-static __init void *spp_getpage(void)
+static void *spp_getpage(void)
{
void *ptr;
if (after_bootmem)
@@ -108,7 +108,7 @@ static __init void *spp_getpage(void)
return ptr;
}
-static __init void set_pte_phys(unsigned long vaddr,
+static void set_pte_phys(unsigned long vaddr,
unsigned long phys, pgprot_t prot)
{
pgd_t *pgd;
@@ -157,8 +157,7 @@ static __init void set_pte_phys(unsigned long vaddr,
}
/* NOTE: this is meant to be run only at boot */
-void __init
-__set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
+void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
{
unsigned long address = __fix_to_virt(idx);
@@ -226,33 +225,6 @@ static __meminit void unmap_low_page(int i)
ti->allocated = 0;
}
-/* Must run before zap_low_mappings */
-__init void *early_ioremap(unsigned long addr, unsigned long size)
-{
- unsigned long map = round_down(addr, LARGE_PAGE_SIZE);
-
- /* actually usually some more */
- if (size >= LARGE_PAGE_SIZE) {
- printk("SMBIOS area too long %lu\n", size);
- return NULL;
- }
- set_pmd(temp_mappings[0].pmd, __pmd(map | _KERNPG_TABLE | _PAGE_PSE));
- map += LARGE_PAGE_SIZE;
- set_pmd(temp_mappings[1].pmd, __pmd(map | _KERNPG_TABLE | _PAGE_PSE));
- __flush_tlb();
- return temp_mappings[0].address + (addr & (LARGE_PAGE_SIZE-1));
-}
-
-/* To avoid virtual aliases later */
-__init void early_iounmap(void *addr, unsigned long size)
-{
- if ((void *)round_down((unsigned long)addr, LARGE_PAGE_SIZE) != temp_mappings[0].address)
- printk("early_iounmap: bad address %p\n", addr);
- set_pmd(temp_mappings[0].pmd, __pmd(0));
- set_pmd(temp_mappings[1].pmd, __pmd(0));
- __flush_tlb();
-}
-
static void __meminit
phys_pmd_init(pmd_t *pmd, unsigned long address, unsigned long end)
{
@@ -372,7 +344,7 @@ void __meminit init_memory_mapping(unsigned long start, unsigned long end)
pud_t *pud;
if (after_bootmem)
- pud = pud_offset_k(pgd, start & PGDIR_MASK);
+ pud = pud_offset_k(pgd, __PAGE_OFFSET);
else
pud = alloc_low_page(&map, &pud_phys);
diff --git a/trunk/arch/x86_64/mm/k8topology.c b/trunk/arch/x86_64/mm/k8topology.c
index 7c45c2d2b8b2..dd60e71fdba6 100644
--- a/trunk/arch/x86_64/mm/k8topology.c
+++ b/trunk/arch/x86_64/mm/k8topology.c
@@ -43,7 +43,7 @@ static __init int find_northbridge(void)
int __init k8_scan_nodes(unsigned long start, unsigned long end)
{
unsigned long prevbase;
- struct bootnode nodes[8];
+ struct node nodes[8];
int nodeid, i, nb;
unsigned char nodeids[8];
int found = 0;
diff --git a/trunk/arch/x86_64/mm/numa.c b/trunk/arch/x86_64/mm/numa.c
index 63c72641b737..22e51beee8d3 100644
--- a/trunk/arch/x86_64/mm/numa.c
+++ b/trunk/arch/x86_64/mm/numa.c
@@ -25,7 +25,8 @@
struct pglist_data *node_data[MAX_NUMNODES] __read_mostly;
bootmem_data_t plat_node_bdata[MAX_NUMNODES];
-struct memnode memnode;
+int memnode_shift;
+u8 memnodemap[NODEMAPSIZE];
unsigned char cpu_to_node[NR_CPUS] __read_mostly = {
[0 ... NR_CPUS-1] = NUMA_NO_NODE
@@ -46,7 +47,7 @@ int numa_off __initdata;
* -1 if node overlap or lost ram (shift too big)
*/
static int __init
-populate_memnodemap(const struct bootnode *nodes, int numnodes, int shift)
+populate_memnodemap(const struct node *nodes, int numnodes, int shift)
{
int i;
int res = -1;
@@ -73,7 +74,7 @@ populate_memnodemap(const struct bootnode *nodes, int numnodes, int shift)
return res;
}
-int __init compute_hash_shift(struct bootnode *nodes, int numnodes)
+int __init compute_hash_shift(struct node *nodes, int numnodes)
{
int shift = 20;
@@ -148,7 +149,7 @@ void __init setup_node_bootmem(int nodeid, unsigned long start, unsigned long en
/* Initialize final allocator for a zone */
void __init setup_node_zones(int nodeid)
{
- unsigned long start_pfn, end_pfn, memmapsize, limit;
+ unsigned long start_pfn, end_pfn;
unsigned long zones[MAX_NR_ZONES];
unsigned long holes[MAX_NR_ZONES];
@@ -158,16 +159,6 @@ void __init setup_node_zones(int nodeid)
Dprintk(KERN_INFO "Setting up node %d %lx-%lx\n",
nodeid, start_pfn, end_pfn);
- /* Try to allocate mem_map at end to not fill up precious <4GB
- memory. */
- memmapsize = sizeof(struct page) * (end_pfn-start_pfn);
- limit = end_pfn << PAGE_SHIFT;
- NODE_DATA(nodeid)->node_mem_map =
- __alloc_bootmem_core(NODE_DATA(nodeid)->bdata,
- memmapsize, SMP_CACHE_BYTES,
- round_down(limit - memmapsize, PAGE_SIZE),
- limit);
-
size_zones(zones, holes, start_pfn, end_pfn);
free_area_init_node(nodeid, NODE_DATA(nodeid), zones,
start_pfn, holes);
@@ -200,7 +191,7 @@ int numa_fake __initdata = 0;
static int numa_emulation(unsigned long start_pfn, unsigned long end_pfn)
{
int i;
- struct bootnode nodes[MAX_NUMNODES];
+ struct node nodes[MAX_NUMNODES];
unsigned long sz = ((end_pfn - start_pfn)<start == nd->end)
continue;
if (nd->end > start && nd->start < end)
@@ -70,7 +70,7 @@ static __init int conflicting_nodes(unsigned long start, unsigned long end)
static __init void cutoff_node(int i, unsigned long start, unsigned long end)
{
- struct bootnode *nd = &nodes[i];
+ struct node *nd = &nodes[i];
if (nd->start < start) {
nd->start = start;
if (nd->end < nd->start)
@@ -159,7 +159,7 @@ acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa)
void __init
acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma)
{
- struct bootnode *nd;
+ struct node *nd;
unsigned long start, end;
int node, pxm;
int i;
diff --git a/trunk/arch/x86_64/pci/Makefile b/trunk/arch/x86_64/pci/Makefile
index a3f6ad570179..a8f75a2a0f6f 100644
--- a/trunk/arch/x86_64/pci/Makefile
+++ b/trunk/arch/x86_64/pci/Makefile
@@ -7,7 +7,7 @@ CFLAGS += -Iarch/i386/pci
obj-y := i386.o
obj-$(CONFIG_PCI_DIRECT)+= direct.o
-obj-y += fixup.o init.o
+obj-y += fixup.o
obj-$(CONFIG_ACPI) += acpi.o
obj-y += legacy.o irq.o common.o
# mmconfig has a 64bit special
@@ -22,4 +22,3 @@ irq-y += ../../i386/pci/irq.o
common-y += ../../i386/pci/common.o
fixup-y += ../../i386/pci/fixup.o
i386-y += ../../i386/pci/i386.o
-init-y += ../../i386/pci/init.o
diff --git a/trunk/arch/x86_64/pci/mmconfig.c b/trunk/arch/x86_64/pci/mmconfig.c
index e616500207e4..18f371fe37f8 100644
--- a/trunk/arch/x86_64/pci/mmconfig.c
+++ b/trunk/arch/x86_64/pci/mmconfig.c
@@ -55,7 +55,7 @@ static char __iomem *get_virt(unsigned int seg, unsigned bus)
static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn)
{
char __iomem *addr;
- if (seg == 0 && bus == 0 && test_bit(PCI_SLOT(devfn), fallback_slots))
+ if (seg == 0 && bus == 0 && test_bit(PCI_SLOT(devfn), &fallback_slots))
return NULL;
addr = get_virt(seg, bus);
if (!addr)
@@ -143,29 +143,29 @@ static __init void unreachable_devices(void)
continue;
addr = pci_dev_base(0, 0, PCI_DEVFN(i, 0));
if (addr == NULL|| readl(addr) != val1) {
- set_bit(i, fallback_slots);
+ set_bit(i, &fallback_slots);
}
}
}
-void __init pci_mmcfg_init(void)
+static int __init pci_mmcfg_init(void)
{
int i;
if ((pci_probe & PCI_PROBE_MMCONF) == 0)
- return;
+ return 0;
acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg);
if ((pci_mmcfg_config_num == 0) ||
(pci_mmcfg_config == NULL) ||
(pci_mmcfg_config[0].base_address == 0))
- return;
+ return 0;
/* RED-PEN i386 doesn't do _nocache right now */
pci_mmcfg_virt = kmalloc(sizeof(*pci_mmcfg_virt) * pci_mmcfg_config_num, GFP_KERNEL);
if (pci_mmcfg_virt == NULL) {
printk("PCI: Can not allocate memory for mmconfig structures\n");
- return;
+ return 0;
}
for (i = 0; i < pci_mmcfg_config_num; ++i) {
pci_mmcfg_virt[i].cfg = &pci_mmcfg_config[i];
@@ -173,7 +173,7 @@ void __init pci_mmcfg_init(void)
if (!pci_mmcfg_virt[i].virt) {
printk("PCI: Cannot map mmconfig aperture for segment %d\n",
pci_mmcfg_config[i].pci_segment_group_number);
- return;
+ return 0;
}
printk(KERN_INFO "PCI: Using MMCONFIG at %x\n", pci_mmcfg_config[i].base_address);
}
@@ -182,4 +182,8 @@ void __init pci_mmcfg_init(void)
raw_pci_ops = &pci_mmcfg;
pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
+
+ return 0;
}
+
+arch_initcall(pci_mmcfg_init);
diff --git a/trunk/arch/xtensa/kernel/irq.c b/trunk/arch/xtensa/kernel/irq.c
index 51f9bed455fa..4cbf6d91571f 100644
--- a/trunk/arch/xtensa/kernel/irq.c
+++ b/trunk/arch/xtensa/kernel/irq.c
@@ -83,8 +83,9 @@ int show_interrupts(struct seq_file *p, void *v)
if (i == 0) {
seq_printf(p, " ");
- for_each_online_cpu(j)
- seq_printf(p, "CPU%d ",j);
+ for (j=0; jtypename);
seq_printf(p, " %s", action->name);
@@ -111,8 +113,9 @@ int show_interrupts(struct seq_file *p, void *v)
spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} else if (i == NR_IRQS) {
seq_printf(p, "NMI: ");
- for_each_online_cpu(j)
- seq_printf(p, "%10u ", nmi_count(j));
+ for (j = 0; j < NR_CPUS; j++)
+ if (cpu_online(j))
+ seq_printf(p, "%10u ", nmi_count(j));
seq_putc(p, '\n');
seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
}
diff --git a/trunk/arch/xtensa/platform-iss/console.c b/trunk/arch/xtensa/platform-iss/console.c
index 2a580efb58ec..94fdfe474ac1 100644
--- a/trunk/arch/xtensa/platform-iss/console.c
+++ b/trunk/arch/xtensa/platform-iss/console.c
@@ -31,6 +31,10 @@
#include
#include
+#ifdef SERIAL_INLINE
+#define _INLINE_ inline
+#endif
+
#define SERIAL_MAX_NUM_LINES 1
#define SERIAL_TIMER_VALUE (20 * HZ)
diff --git a/trunk/block/Kconfig b/trunk/block/Kconfig
index 96783645092d..377f6dd20e17 100644
--- a/trunk/block/Kconfig
+++ b/trunk/block/Kconfig
@@ -11,16 +11,4 @@ config LBD
your machine, or if you want to have a raid or loopback device
bigger than 2TB. Otherwise say N.
-config BLK_DEV_IO_TRACE
- bool "Support for tracing block io actions"
- select RELAY
- select DEBUG_FS
- help
- Say Y here, if you want to be able to trace the block layer actions
- on a given queue. Tracing allows you to see any traffic happening
- on a block device queue. For more information (and the user space
- support tools needed), fetch the blktrace app from:
-
- git://brick.kernel.dk/data/git/blktrace.git
-
source block/Kconfig.iosched
diff --git a/trunk/block/Makefile b/trunk/block/Makefile
index c05de0e0037f..7e4f93e2b44e 100644
--- a/trunk/block/Makefile
+++ b/trunk/block/Makefile
@@ -8,5 +8,3 @@ obj-$(CONFIG_IOSCHED_NOOP) += noop-iosched.o
obj-$(CONFIG_IOSCHED_AS) += as-iosched.o
obj-$(CONFIG_IOSCHED_DEADLINE) += deadline-iosched.o
obj-$(CONFIG_IOSCHED_CFQ) += cfq-iosched.o
-
-obj-$(CONFIG_BLK_DEV_IO_TRACE) += blktrace.o
diff --git a/trunk/block/blktrace.c b/trunk/block/blktrace.c
deleted file mode 100644
index 36f3a172275f..000000000000
--- a/trunk/block/blktrace.c
+++ /dev/null
@@ -1,538 +0,0 @@
-/*
- * Copyright (C) 2006 Jens Axboe
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-static DEFINE_PER_CPU(unsigned long long, blk_trace_cpu_offset) = { 0, };
-static unsigned int blktrace_seq __read_mostly = 1;
-
-/*
- * Send out a notify for this process, if we haven't done so since a trace
- * started
- */
-static void trace_note_tsk(struct blk_trace *bt, struct task_struct *tsk)
-{
- struct blk_io_trace *t;
-
- t = relay_reserve(bt->rchan, sizeof(*t) + sizeof(tsk->comm));
- if (t) {
- t->magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION;
- t->device = bt->dev;
- t->action = BLK_TC_ACT(BLK_TC_NOTIFY);
- t->pid = tsk->pid;
- t->cpu = smp_processor_id();
- t->pdu_len = sizeof(tsk->comm);
- memcpy((void *) t + sizeof(*t), tsk->comm, t->pdu_len);
- tsk->btrace_seq = blktrace_seq;
- }
-}
-
-static int act_log_check(struct blk_trace *bt, u32 what, sector_t sector,
- pid_t pid)
-{
- if (((bt->act_mask << BLK_TC_SHIFT) & what) == 0)
- return 1;
- if (sector < bt->start_lba || sector > bt->end_lba)
- return 1;
- if (bt->pid && pid != bt->pid)
- return 1;
-
- return 0;
-}
-
-/*
- * Data direction bit lookup
- */
-static u32 ddir_act[2] __read_mostly = { BLK_TC_ACT(BLK_TC_READ), BLK_TC_ACT(BLK_TC_WRITE) };
-
-/*
- * Bio action bits of interest
- */
-static u32 bio_act[3] __read_mostly = { 0, BLK_TC_ACT(BLK_TC_BARRIER), BLK_TC_ACT(BLK_TC_SYNC) };
-
-/*
- * More could be added as needed, taking care to increment the decrementer
- * to get correct indexing
- */
-#define trace_barrier_bit(rw) \
- (((rw) & (1 << BIO_RW_BARRIER)) >> (BIO_RW_BARRIER - 0))
-#define trace_sync_bit(rw) \
- (((rw) & (1 << BIO_RW_SYNC)) >> (BIO_RW_SYNC - 1))
-
-/*
- * The worker for the various blk_add_trace*() types. Fills out a
- * blk_io_trace structure and places it in a per-cpu subbuffer.
- */
-void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
- int rw, u32 what, int error, int pdu_len, void *pdu_data)
-{
- struct task_struct *tsk = current;
- struct blk_io_trace *t;
- unsigned long flags;
- unsigned long *sequence;
- pid_t pid;
- int cpu;
-
- if (unlikely(bt->trace_state != Blktrace_running))
- return;
-
- what |= ddir_act[rw & WRITE];
- what |= bio_act[trace_barrier_bit(rw)];
- what |= bio_act[trace_sync_bit(rw)];
-
- pid = tsk->pid;
- if (unlikely(act_log_check(bt, what, sector, pid)))
- return;
-
- /*
- * A word about the locking here - we disable interrupts to reserve
- * some space in the relay per-cpu buffer, to prevent an irq
- * from coming in and stepping on our toes. Once reserved, it's
- * enough to get preemption disabled to prevent read of this data
- * before we are through filling it. get_cpu()/put_cpu() does this
- * for us
- */
- local_irq_save(flags);
-
- if (unlikely(tsk->btrace_seq != blktrace_seq))
- trace_note_tsk(bt, tsk);
-
- t = relay_reserve(bt->rchan, sizeof(*t) + pdu_len);
- if (t) {
- cpu = smp_processor_id();
- sequence = per_cpu_ptr(bt->sequence, cpu);
-
- t->magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION;
- t->sequence = ++(*sequence);
- t->time = sched_clock() - per_cpu(blk_trace_cpu_offset, cpu);
- t->sector = sector;
- t->bytes = bytes;
- t->action = what;
- t->pid = pid;
- t->device = bt->dev;
- t->cpu = cpu;
- t->error = error;
- t->pdu_len = pdu_len;
-
- if (pdu_len)
- memcpy((void *) t + sizeof(*t), pdu_data, pdu_len);
- }
-
- local_irq_restore(flags);
-}
-
-EXPORT_SYMBOL_GPL(__blk_add_trace);
-
-static struct dentry *blk_tree_root;
-static struct mutex blk_tree_mutex;
-static unsigned int root_users;
-
-static inline void blk_remove_root(void)
-{
- if (blk_tree_root) {
- debugfs_remove(blk_tree_root);
- blk_tree_root = NULL;
- }
-}
-
-static void blk_remove_tree(struct dentry *dir)
-{
- mutex_lock(&blk_tree_mutex);
- debugfs_remove(dir);
- if (--root_users == 0)
- blk_remove_root();
- mutex_unlock(&blk_tree_mutex);
-}
-
-static struct dentry *blk_create_tree(const char *blk_name)
-{
- struct dentry *dir = NULL;
-
- mutex_lock(&blk_tree_mutex);
-
- if (!blk_tree_root) {
- blk_tree_root = debugfs_create_dir("block", NULL);
- if (!blk_tree_root)
- goto err;
- }
-
- dir = debugfs_create_dir(blk_name, blk_tree_root);
- if (dir)
- root_users++;
- else
- blk_remove_root();
-
-err:
- mutex_unlock(&blk_tree_mutex);
- return dir;
-}
-
-static void blk_trace_cleanup(struct blk_trace *bt)
-{
- relay_close(bt->rchan);
- debugfs_remove(bt->dropped_file);
- blk_remove_tree(bt->dir);
- free_percpu(bt->sequence);
- kfree(bt);
-}
-
-static int blk_trace_remove(request_queue_t *q)
-{
- struct blk_trace *bt;
-
- bt = xchg(&q->blk_trace, NULL);
- if (!bt)
- return -EINVAL;
-
- if (bt->trace_state == Blktrace_setup ||
- bt->trace_state == Blktrace_stopped)
- blk_trace_cleanup(bt);
-
- return 0;
-}
-
-static int blk_dropped_open(struct inode *inode, struct file *filp)
-{
- filp->private_data = inode->u.generic_ip;
-
- return 0;
-}
-
-static ssize_t blk_dropped_read(struct file *filp, char __user *buffer,
- size_t count, loff_t *ppos)
-{
- struct blk_trace *bt = filp->private_data;
- char buf[16];
-
- snprintf(buf, sizeof(buf), "%u\n", atomic_read(&bt->dropped));
-
- return simple_read_from_buffer(buffer, count, ppos, buf, strlen(buf));
-}
-
-static struct file_operations blk_dropped_fops = {
- .owner = THIS_MODULE,
- .open = blk_dropped_open,
- .read = blk_dropped_read,
-};
-
-/*
- * Keep track of how many times we encountered a full subbuffer, to aid
- * the user space app in telling how many lost events there were.
- */
-static int blk_subbuf_start_callback(struct rchan_buf *buf, void *subbuf,
- void *prev_subbuf, size_t prev_padding)
-{
- struct blk_trace *bt;
-
- if (!relay_buf_full(buf))
- return 1;
-
- bt = buf->chan->private_data;
- atomic_inc(&bt->dropped);
- return 0;
-}
-
-static int blk_remove_buf_file_callback(struct dentry *dentry)
-{
- debugfs_remove(dentry);
- return 0;
-}
-
-static struct dentry *blk_create_buf_file_callback(const char *filename,
- struct dentry *parent,
- int mode,
- struct rchan_buf *buf,
- int *is_global)
-{
- return debugfs_create_file(filename, mode, parent, buf,
- &relay_file_operations);
-}
-
-static struct rchan_callbacks blk_relay_callbacks = {
- .subbuf_start = blk_subbuf_start_callback,
- .create_buf_file = blk_create_buf_file_callback,
- .remove_buf_file = blk_remove_buf_file_callback,
-};
-
-/*
- * Setup everything required to start tracing
- */
-static int blk_trace_setup(request_queue_t *q, struct block_device *bdev,
- char __user *arg)
-{
- struct blk_user_trace_setup buts;
- struct blk_trace *old_bt, *bt = NULL;
- struct dentry *dir = NULL;
- char b[BDEVNAME_SIZE];
- int ret, i;
-
- if (copy_from_user(&buts, arg, sizeof(buts)))
- return -EFAULT;
-
- if (!buts.buf_size || !buts.buf_nr)
- return -EINVAL;
-
- strcpy(buts.name, bdevname(bdev, b));
-
- /*
- * some device names have larger paths - convert the slashes
- * to underscores for this to work as expected
- */
- for (i = 0; i < strlen(buts.name); i++)
- if (buts.name[i] == '/')
- buts.name[i] = '_';
-
- if (copy_to_user(arg, &buts, sizeof(buts)))
- return -EFAULT;
-
- ret = -ENOMEM;
- bt = kzalloc(sizeof(*bt), GFP_KERNEL);
- if (!bt)
- goto err;
-
- bt->sequence = alloc_percpu(unsigned long);
- if (!bt->sequence)
- goto err;
-
- ret = -ENOENT;
- dir = blk_create_tree(buts.name);
- if (!dir)
- goto err;
-
- bt->dir = dir;
- bt->dev = bdev->bd_dev;
- atomic_set(&bt->dropped, 0);
-
- ret = -EIO;
- bt->dropped_file = debugfs_create_file("dropped", 0444, dir, bt, &blk_dropped_fops);
- if (!bt->dropped_file)
- goto err;
-
- bt->rchan = relay_open("trace", dir, buts.buf_size, buts.buf_nr, &blk_relay_callbacks);
- if (!bt->rchan)
- goto err;
- bt->rchan->private_data = bt;
-
- bt->act_mask = buts.act_mask;
- if (!bt->act_mask)
- bt->act_mask = (u16) -1;
-
- bt->start_lba = buts.start_lba;
- bt->end_lba = buts.end_lba;
- if (!bt->end_lba)
- bt->end_lba = -1ULL;
-
- bt->pid = buts.pid;
- bt->trace_state = Blktrace_setup;
-
- ret = -EBUSY;
- old_bt = xchg(&q->blk_trace, bt);
- if (old_bt) {
- (void) xchg(&q->blk_trace, old_bt);
- goto err;
- }
-
- return 0;
-err:
- if (dir)
- blk_remove_tree(dir);
- if (bt) {
- if (bt->dropped_file)
- debugfs_remove(bt->dropped_file);
- if (bt->sequence)
- free_percpu(bt->sequence);
- if (bt->rchan)
- relay_close(bt->rchan);
- kfree(bt);
- }
- return ret;
-}
-
-static int blk_trace_startstop(request_queue_t *q, int start)
-{
- struct blk_trace *bt;
- int ret;
-
- if ((bt = q->blk_trace) == NULL)
- return -EINVAL;
-
- /*
- * For starting a trace, we can transition from a setup or stopped
- * trace. For stopping a trace, the state must be running
- */
- ret = -EINVAL;
- if (start) {
- if (bt->trace_state == Blktrace_setup ||
- bt->trace_state == Blktrace_stopped) {
- blktrace_seq++;
- smp_mb();
- bt->trace_state = Blktrace_running;
- ret = 0;
- }
- } else {
- if (bt->trace_state == Blktrace_running) {
- bt->trace_state = Blktrace_stopped;
- relay_flush(bt->rchan);
- ret = 0;
- }
- }
-
- return ret;
-}
-
-/**
- * blk_trace_ioctl: - handle the ioctls associated with tracing
- * @bdev: the block device
- * @cmd: the ioctl cmd
- * @arg: the argument data, if any
- *
- **/
-int blk_trace_ioctl(struct block_device *bdev, unsigned cmd, char __user *arg)
-{
- request_queue_t *q;
- int ret, start = 0;
-
- q = bdev_get_queue(bdev);
- if (!q)
- return -ENXIO;
-
- mutex_lock(&bdev->bd_mutex);
-
- switch (cmd) {
- case BLKTRACESETUP:
- ret = blk_trace_setup(q, bdev, arg);
- break;
- case BLKTRACESTART:
- start = 1;
- case BLKTRACESTOP:
- ret = blk_trace_startstop(q, start);
- break;
- case BLKTRACETEARDOWN:
- ret = blk_trace_remove(q);
- break;
- default:
- ret = -ENOTTY;
- break;
- }
-
- mutex_unlock(&bdev->bd_mutex);
- return ret;
-}
-
-/**
- * blk_trace_shutdown: - stop and cleanup trace structures
- * @q: the request queue associated with the device
- *
- **/
-void blk_trace_shutdown(request_queue_t *q)
-{
- blk_trace_startstop(q, 0);
- blk_trace_remove(q);
-}
-
-/*
- * Average offset over two calls to sched_clock() with a gettimeofday()
- * in the middle
- */
-static void blk_check_time(unsigned long long *t)
-{
- unsigned long long a, b;
- struct timeval tv;
-
- a = sched_clock();
- do_gettimeofday(&tv);
- b = sched_clock();
-
- *t = tv.tv_sec * 1000000000 + tv.tv_usec * 1000;
- *t -= (a + b) / 2;
-}
-
-static void blk_trace_check_cpu_time(void *data)
-{
- unsigned long long *t;
- int cpu = get_cpu();
-
- t = &per_cpu(blk_trace_cpu_offset, cpu);
-
- /*
- * Just call it twice, hopefully the second call will be cache hot
- * and a little more precise
- */
- blk_check_time(t);
- blk_check_time(t);
-
- put_cpu();
-}
-
-/*
- * Call blk_trace_check_cpu_time() on each CPU to calibrate our inter-CPU
- * timings
- */
-static void blk_trace_calibrate_offsets(void)
-{
- unsigned long flags;
-
- smp_call_function(blk_trace_check_cpu_time, NULL, 1, 1);
- local_irq_save(flags);
- blk_trace_check_cpu_time(NULL);
- local_irq_restore(flags);
-}
-
-static void blk_trace_set_ht_offsets(void)
-{
-#if defined(CONFIG_SCHED_SMT)
- int cpu, i;
-
- /*
- * now make sure HT siblings have the same time offset
- */
- preempt_disable();
- for_each_online_cpu(cpu) {
- unsigned long long *cpu_off, *sibling_off;
-
- for_each_cpu_mask(i, cpu_sibling_map[cpu]) {
- if (i == cpu)
- continue;
-
- cpu_off = &per_cpu(blk_trace_cpu_offset, cpu);
- sibling_off = &per_cpu(blk_trace_cpu_offset, i);
- *sibling_off = *cpu_off;
- }
- }
- preempt_enable();
-#endif
-}
-
-static __init int blk_trace_init(void)
-{
- mutex_init(&blk_tree_mutex);
- blk_trace_calibrate_offsets();
- blk_trace_set_ht_offsets();
-
- return 0;
-}
-
-module_init(blk_trace_init);
-
diff --git a/trunk/block/elevator.c b/trunk/block/elevator.c
index 56c2ed06a9e2..db3d0d8296a0 100644
--- a/trunk/block/elevator.c
+++ b/trunk/block/elevator.c
@@ -33,7 +33,6 @@
#include
#include
#include
-#include
#include
@@ -334,8 +333,6 @@ void elv_insert(request_queue_t *q, struct request *rq, int where)
struct list_head *pos;
unsigned ordseq;
- blk_add_trace_rq(q, rq, BLK_TA_INSERT);
-
rq->q = q;
switch (where) {
@@ -502,7 +499,6 @@ struct request *elv_next_request(request_queue_t *q)
* not be passed by new incoming requests
*/
rq->flags |= REQ_STARTED;
- blk_add_trace_rq(q, rq, BLK_TA_ISSUE);
}
if (!q->boundary_rq || q->boundary_rq == rq) {
@@ -728,7 +724,8 @@ void elv_unregister_queue(struct request_queue *q)
int elv_register(struct elevator_type *e)
{
spin_lock_irq(&elv_list_lock);
- BUG_ON(elevator_find(e->elevator_name));
+ if (elevator_find(e->elevator_name))
+ BUG();
list_add_tail(&e->list, &elv_list);
spin_unlock_irq(&elv_list_lock);
diff --git a/trunk/block/ioctl.c b/trunk/block/ioctl.c
index 9cfa2e1ecb24..e1109491c234 100644
--- a/trunk/block/ioctl.c
+++ b/trunk/block/ioctl.c
@@ -5,7 +5,6 @@
#include
#include
#include
-#include
#include
static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user *arg)
@@ -43,9 +42,9 @@ static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user
return -EINVAL;
}
/* partition number in use? */
- mutex_lock(&bdev->bd_mutex);
+ down(&bdev->bd_sem);
if (disk->part[part - 1]) {
- mutex_unlock(&bdev->bd_mutex);
+ up(&bdev->bd_sem);
return -EBUSY;
}
/* overlap? */
@@ -56,13 +55,13 @@ static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user
continue;
if (!(start+length <= s->start_sect ||
start >= s->start_sect + s->nr_sects)) {
- mutex_unlock(&bdev->bd_mutex);
+ up(&bdev->bd_sem);
return -EBUSY;
}
}
/* all seems OK */
add_partition(disk, part, start, length);
- mutex_unlock(&bdev->bd_mutex);
+ up(&bdev->bd_sem);
return 0;
case BLKPG_DEL_PARTITION:
if (!disk->part[part-1])
@@ -72,9 +71,9 @@ static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user
bdevp = bdget_disk(disk, part);
if (!bdevp)
return -ENOMEM;
- mutex_lock(&bdevp->bd_mutex);
+ down(&bdevp->bd_sem);
if (bdevp->bd_openers) {
- mutex_unlock(&bdevp->bd_mutex);
+ up(&bdevp->bd_sem);
bdput(bdevp);
return -EBUSY;
}
@@ -82,10 +81,10 @@ static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user
fsync_bdev(bdevp);
invalidate_bdev(bdevp, 0);
- mutex_lock(&bdev->bd_mutex);
+ down(&bdev->bd_sem);
delete_partition(disk, part);
- mutex_unlock(&bdev->bd_mutex);
- mutex_unlock(&bdevp->bd_mutex);
+ up(&bdev->bd_sem);
+ up(&bdevp->bd_sem);
bdput(bdevp);
return 0;
@@ -103,10 +102,10 @@ static int blkdev_reread_part(struct block_device *bdev)
return -EINVAL;
if (!capable(CAP_SYS_ADMIN))
return -EACCES;
- if (!mutex_trylock(&bdev->bd_mutex))
+ if (down_trylock(&bdev->bd_sem))
return -EBUSY;
res = rescan_partitions(disk, bdev);
- mutex_unlock(&bdev->bd_mutex);
+ up(&bdev->bd_sem);
return res;
}
@@ -190,11 +189,6 @@ static int blkdev_locked_ioctl(struct file *file, struct block_device *bdev,
return put_ulong(arg, bdev->bd_inode->i_size >> 9);
case BLKGETSIZE64:
return put_u64(arg, bdev->bd_inode->i_size);
- case BLKTRACESTART:
- case BLKTRACESTOP:
- case BLKTRACESETUP:
- case BLKTRACETEARDOWN:
- return blk_trace_ioctl(bdev, cmd, (char __user *) arg);
}
return -ENOIOCTLCMD;
}
diff --git a/trunk/block/ll_rw_blk.c b/trunk/block/ll_rw_blk.c
index 062067fa7ead..6c793b196aa9 100644
--- a/trunk/block/ll_rw_blk.c
+++ b/trunk/block/ll_rw_blk.c
@@ -28,7 +28,6 @@
#include
#include
#include
-#include
/*
* for max sense size
@@ -1557,10 +1556,8 @@ void blk_plug_device(request_queue_t *q)
if (test_bit(QUEUE_FLAG_STOPPED, &q->queue_flags))
return;
- if (!test_and_set_bit(QUEUE_FLAG_PLUGGED, &q->queue_flags)) {
+ if (!test_and_set_bit(QUEUE_FLAG_PLUGGED, &q->queue_flags))
mod_timer(&q->unplug_timer, jiffies + q->unplug_delay);
- blk_add_trace_generic(q, NULL, 0, BLK_TA_PLUG);
- }
}
EXPORT_SYMBOL(blk_plug_device);
@@ -1624,21 +1621,14 @@ static void blk_backing_dev_unplug(struct backing_dev_info *bdi,
/*
* devices don't necessarily have an ->unplug_fn defined
*/
- if (q->unplug_fn) {
- blk_add_trace_pdu_int(q, BLK_TA_UNPLUG_IO, NULL,
- q->rq.count[READ] + q->rq.count[WRITE]);
-
+ if (q->unplug_fn)
q->unplug_fn(q);
- }
}
static void blk_unplug_work(void *data)
{
request_queue_t *q = data;
- blk_add_trace_pdu_int(q, BLK_TA_UNPLUG_IO, NULL,
- q->rq.count[READ] + q->rq.count[WRITE]);
-
q->unplug_fn(q);
}
@@ -1646,9 +1636,6 @@ static void blk_unplug_timeout(unsigned long data)
{
request_queue_t *q = (request_queue_t *)data;
- blk_add_trace_pdu_int(q, BLK_TA_UNPLUG_TIMER, NULL,
- q->rq.count[READ] + q->rq.count[WRITE]);
-
kblockd_schedule_work(&q->unplug_work);
}
@@ -1766,9 +1753,6 @@ static void blk_release_queue(struct kobject *kobj)
if (q->queue_tags)
__blk_queue_free_tags(q);
- if (q->blk_trace)
- blk_trace_shutdown(q);
-
kmem_cache_free(requestq_cachep, q);
}
@@ -2145,8 +2129,6 @@ static struct request *get_request(request_queue_t *q, int rw, struct bio *bio,
rq_init(q, rq);
rq->rl = rl;
-
- blk_add_trace_generic(q, bio, rw, BLK_TA_GETRQ);
out:
return rq;
}
@@ -2175,8 +2157,6 @@ static struct request *get_request_wait(request_queue_t *q, int rw,
if (!rq) {
struct io_context *ioc;
- blk_add_trace_generic(q, bio, rw, BLK_TA_SLEEPRQ);
-
__generic_unplug_device(q);
spin_unlock_irq(q->queue_lock);
io_schedule();
@@ -2230,8 +2210,6 @@ EXPORT_SYMBOL(blk_get_request);
*/
void blk_requeue_request(request_queue_t *q, struct request *rq)
{
- blk_add_trace_rq(q, rq, BLK_TA_REQUEUE);
-
if (blk_rq_tagged(rq))
blk_queue_end_tag(q, rq);
@@ -2866,8 +2844,6 @@ static int __make_request(request_queue_t *q, struct bio *bio)
if (!q->back_merge_fn(q, req, bio))
break;
- blk_add_trace_bio(q, bio, BLK_TA_BACKMERGE);
-
req->biotail->bi_next = bio;
req->biotail = bio;
req->nr_sectors = req->hard_nr_sectors += nr_sectors;
@@ -2883,8 +2859,6 @@ static int __make_request(request_queue_t *q, struct bio *bio)
if (!q->front_merge_fn(q, req, bio))
break;
- blk_add_trace_bio(q, bio, BLK_TA_FRONTMERGE);
-
bio->bi_next = req->bio;
req->bio = bio;
@@ -3002,7 +2976,6 @@ void generic_make_request(struct bio *bio)
request_queue_t *q;
sector_t maxsector;
int ret, nr_sectors = bio_sectors(bio);
- dev_t old_dev;
might_sleep();
/* Test device or partition size, when known. */
@@ -3029,8 +3002,6 @@ void generic_make_request(struct bio *bio)
* NOTE: we don't repeat the blk_size check for each new device.
* Stacking drivers are expected to know what they are doing.
*/
- maxsector = -1;
- old_dev = 0;
do {
char b[BDEVNAME_SIZE];
@@ -3063,15 +3034,6 @@ void generic_make_request(struct bio *bio)
*/
blk_partition_remap(bio);
- if (maxsector != -1)
- blk_add_trace_remap(q, bio, old_dev, bio->bi_sector,
- maxsector);
-
- blk_add_trace_bio(q, bio, BLK_TA_QUEUE);
-
- maxsector = bio->bi_sector;
- old_dev = bio->bi_bdev->bd_dev;
-
ret = q->make_request_fn(q, bio);
} while (ret);
}
@@ -3191,8 +3153,6 @@ static int __end_that_request_first(struct request *req, int uptodate,
int total_bytes, bio_nbytes, error, next_idx = 0;
struct bio *bio;
- blk_add_trace_rq(req->q, req, BLK_TA_COMPLETE);
-
/*
* extend uptodate bool to allow < 0 value to be direct io error
*/
diff --git a/trunk/drivers/acpi/Kconfig b/trunk/drivers/acpi/Kconfig
index 5cb96300eb0f..33e2ca847a26 100644
--- a/trunk/drivers/acpi/Kconfig
+++ b/trunk/drivers/acpi/Kconfig
@@ -205,18 +205,6 @@ config ACPI_IBM
If you have an IBM ThinkPad laptop, say Y or M here.
-config ACPI_IBM_DOCK
- bool "Legacy Docking Station Support"
- depends on ACPI_IBM
- default n
- ---help---
- Allows the ibm_acpi driver to handle docking station events.
- This support is obsoleted by CONFIG_HOTPLUG_PCI_ACPI. It will
- allow locking and removing the laptop from the docking station,
- but will not properly connect PCI devices.
-
- If you are not sure, say N here.
-
config ACPI_TOSHIBA
tristate "Toshiba Laptop Extras"
depends on X86
@@ -256,8 +244,7 @@ config ACPI_CUSTOM_DSDT_FILE
depends on ACPI_CUSTOM_DSDT
default ""
help
- Enter the full path name to the file which includes the AmlCode
- declaration.
+ Enter the full path name to the file wich includes the AmlCode declaration.
config ACPI_BLACKLIST_YEAR
int "Disable ACPI for systems before Jan 1st this year" if X86_32
diff --git a/trunk/drivers/acpi/blacklist.c b/trunk/drivers/acpi/blacklist.c
index f9c972b26f4f..9824f679a910 100644
--- a/trunk/drivers/acpi/blacklist.c
+++ b/trunk/drivers/acpi/blacklist.c
@@ -77,13 +77,28 @@ static struct acpi_blacklist_item acpi_blacklist[] __initdata = {
static int __init blacklist_by_year(void)
{
- int year = dmi_get_year(DMI_BIOS_DATE);
- /* Doesn't exist? Likely an old system */
- if (year == -1)
- return 1;
- /* 0? Likely a buggy new BIOS */
- if (year == 0)
+ int year;
+ char *s = dmi_get_system_info(DMI_BIOS_DATE);
+
+ if (!s)
+ return 0;
+ if (!*s)
+ return 0;
+
+ s = strrchr(s, '/');
+ if (!s)
return 0;
+
+ s += 1;
+
+ year = simple_strtoul(s, NULL, 0);
+
+ if (year < 100) { /* 2-digit year */
+ year += 1900;
+ if (year < 1996) /* no dates < spec 1.0 */
+ year += 100;
+ }
+
if (year < CONFIG_ACPI_BLACKLIST_YEAR) {
printk(KERN_ERR PREFIX "BIOS age (%d) fails cutoff (%d), "
"acpi=force is required to enable ACPI\n",
diff --git a/trunk/drivers/acpi/ibm_acpi.c b/trunk/drivers/acpi/ibm_acpi.c
index 262b1f41335a..5cc090326ddc 100644
--- a/trunk/drivers/acpi/ibm_acpi.c
+++ b/trunk/drivers/acpi/ibm_acpi.c
@@ -160,13 +160,13 @@ IBM_HANDLE(cmos, root, "\\UCMS", /* R50, R50e, R50p, R51, T4x, X31, X40 */
"\\CMOS", /* A3x, G4x, R32, T23, T30, X22-24, X30 */
"\\CMS", /* R40, R40e */
); /* all others */
-#ifdef CONFIG_ACPI_IBM_DOCK
+
IBM_HANDLE(dock, root, "\\_SB.GDCK", /* X30, X31, X40 */
"\\_SB.PCI0.DOCK", /* 600e/x,770e,770x,A2xm/p,T20-22,X20-21 */
"\\_SB.PCI0.PCI1.DOCK", /* all others */
"\\_SB.PCI.ISA.SLCE", /* 570 */
); /* A21e,G4x,R30,R31,R32,R40,R40e,R50e */
-#endif
+
IBM_HANDLE(bay, root, "\\_SB.PCI.IDE.SECN.MAST", /* 570 */
"\\_SB.PCI0.IDE0.IDES.IDSM", /* 600e/x, 770e, 770x */
"\\_SB.PCI0.IDE0.SCND.MSTR", /* all others */
@@ -844,7 +844,7 @@ static int _sta(acpi_handle handle)
return status;
}
-#ifdef CONFIG_ACPI_IBM_DOCK
+
#define dock_docked() (_sta(dock_handle) & 1)
static int dock_read(char *p)
@@ -907,7 +907,6 @@ static void dock_notify(struct ibm_struct *ibm, u32 event)
acpi_bus_generate_event(ibm->device, event, 0); /* unknown */
}
}
-#endif
static int bay_status_supported;
static int bay_status2_supported;
@@ -1575,7 +1574,6 @@ static struct ibm_struct ibms[] = {
.read = light_read,
.write = light_write,
},
-#ifdef CONFIG_ACPI_IBM_DOCK
{
.name = "dock",
.read = dock_read,
@@ -1591,7 +1589,6 @@ static struct ibm_struct ibms[] = {
.handle = &pci_handle,
.type = ACPI_SYSTEM_NOTIFY,
},
-#endif
{
.name = "bay",
.init = bay_init,
@@ -1883,9 +1880,7 @@ IBM_PARAM(hotkey);
IBM_PARAM(bluetooth);
IBM_PARAM(video);
IBM_PARAM(light);
-#ifdef CONFIG_ACPI_IBM_DOCK
IBM_PARAM(dock);
-#endif
IBM_PARAM(bay);
IBM_PARAM(cmos);
IBM_PARAM(led);
@@ -1932,9 +1927,7 @@ static int __init acpi_ibm_init(void)
IBM_HANDLE_INIT(hkey);
IBM_HANDLE_INIT(lght);
IBM_HANDLE_INIT(cmos);
-#ifdef CONFIG_ACPI_IBM_DOCK
IBM_HANDLE_INIT(dock);
-#endif
IBM_HANDLE_INIT(pci);
IBM_HANDLE_INIT(bay);
if (bay_handle)
diff --git a/trunk/drivers/acpi/processor_idle.c b/trunk/drivers/acpi/processor_idle.c
index 80fa43471f48..eb730a80952c 100644
--- a/trunk/drivers/acpi/processor_idle.c
+++ b/trunk/drivers/acpi/processor_idle.c
@@ -878,9 +878,12 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
unsigned int working = 0;
#ifdef ARCH_APICTIMER_STOPS_ON_C3
- int timer_broadcast = 0;
+ struct cpuinfo_x86 *c = cpu_data + pr->id;
cpumask_t mask = cpumask_of_cpu(pr->id);
- on_each_cpu(switch_ipi_to_APIC_timer, &mask, 1, 1);
+
+ if (c->x86_vendor == X86_VENDOR_INTEL) {
+ on_each_cpu(switch_ipi_to_APIC_timer, &mask, 1, 1);
+ }
#endif
for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) {
@@ -893,20 +896,15 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
case ACPI_STATE_C2:
acpi_processor_power_verify_c2(cx);
-#ifdef ARCH_APICTIMER_STOPS_ON_C3
- /* Some AMD systems fake C3 as C2, but still
- have timer troubles */
- if (cx->valid &&
- boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
- timer_broadcast++;
-#endif
break;
case ACPI_STATE_C3:
acpi_processor_power_verify_c3(pr, cx);
#ifdef ARCH_APICTIMER_STOPS_ON_C3
- if (cx->valid)
- timer_broadcast++;
+ if (cx->valid && c->x86_vendor == X86_VENDOR_INTEL) {
+ on_each_cpu(switch_APIC_timer_to_ipi,
+ &mask, 1, 1);
+ }
#endif
break;
}
@@ -915,11 +913,6 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
working++;
}
-#ifdef ARCH_APICTIMER_STOPS_ON_C3
- if (timer_broadcast)
- on_each_cpu(switch_APIC_timer_to_ipi, &mask, 1, 1);
-#endif
-
return (working);
}
diff --git a/trunk/drivers/acpi/scan.c b/trunk/drivers/acpi/scan.c
index a0ab828b2cc5..9271e5209ac1 100644
--- a/trunk/drivers/acpi/scan.c
+++ b/trunk/drivers/acpi/scan.c
@@ -23,6 +23,7 @@ static LIST_HEAD(acpi_device_list);
DEFINE_SPINLOCK(acpi_device_lock);
LIST_HEAD(acpi_wakeup_device_list);
+static int acpi_bus_trim(struct acpi_device *start, int rmdevice);
static void acpi_device_release(struct kobject *kobj)
{
@@ -1283,7 +1284,7 @@ int acpi_bus_start(struct acpi_device *device)
EXPORT_SYMBOL(acpi_bus_start);
-int acpi_bus_trim(struct acpi_device *start, int rmdevice)
+static int acpi_bus_trim(struct acpi_device *start, int rmdevice)
{
acpi_status status;
struct acpi_device *parent, *child;
@@ -1336,8 +1337,6 @@ int acpi_bus_trim(struct acpi_device *start, int rmdevice)
}
return err;
}
-EXPORT_SYMBOL_GPL(acpi_bus_trim);
-
static int acpi_bus_scan_fixed(struct acpi_device *root)
{
diff --git a/trunk/drivers/atm/.gitignore b/trunk/drivers/atm/.gitignore
deleted file mode 100644
index a165b7167714..000000000000
--- a/trunk/drivers/atm/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-# Ignore generated files
-fore200e_mkfirm
-fore200e_pca_fw.c
-pca200e.bin
-
diff --git a/trunk/drivers/base/cpu.c b/trunk/drivers/base/cpu.c
index dd712b24ec91..29f3d7504da1 100644
--- a/trunk/drivers/base/cpu.c
+++ b/trunk/drivers/base/cpu.c
@@ -19,6 +19,11 @@ EXPORT_SYMBOL(cpu_sysdev_class);
static struct sys_device *cpu_sys_devices[NR_CPUS];
#ifdef CONFIG_HOTPLUG_CPU
+int __attribute__((weak)) smp_prepare_cpu (int cpu)
+{
+ return 0;
+}
+
static ssize_t show_online(struct sys_device *dev, char *buf)
{
struct cpu *cpu = container_of(dev, struct cpu, sysdev);
@@ -39,7 +44,9 @@ static ssize_t store_online(struct sys_device *dev, const char *buf,
kobject_uevent(&dev->kobj, KOBJ_OFFLINE);
break;
case '1':
- ret = cpu_up(cpu->sysdev.id);
+ ret = smp_prepare_cpu(cpu->sysdev.id);
+ if (!ret)
+ ret = cpu_up(cpu->sysdev.id);
if (!ret)
kobject_uevent(&dev->kobj, KOBJ_ONLINE);
break;
diff --git a/trunk/drivers/base/power/suspend.c b/trunk/drivers/base/power/suspend.c
index bdb60663f2ef..8660779fb288 100644
--- a/trunk/drivers/base/power/suspend.c
+++ b/trunk/drivers/base/power/suspend.c
@@ -8,7 +8,6 @@
*
*/
-#include
#include