Merge branch 'fixes-2.6.39' into for-2.6.40
This commit is contained in:
commit
6988f20fe0
|
@ -59,3 +59,15 @@ Kernel Version: 2.6.31
|
||||||
Contact: iss_storagedev@hp.com
|
Contact: iss_storagedev@hp.com
|
||||||
Description: Displays the usage count (number of opens) of logical drive Y
|
Description: Displays the usage count (number of opens) of logical drive Y
|
||||||
of controller X.
|
of controller X.
|
||||||
|
|
||||||
|
Where: /sys/bus/pci/devices/<dev>/ccissX/resettable
|
||||||
|
Date: February 2011
|
||||||
|
Kernel Version: 2.6.38
|
||||||
|
Contact: iss_storagedev@hp.com
|
||||||
|
Description: Value of 1 indicates the controller can honor the reset_devices
|
||||||
|
kernel parameter. Value of 0 indicates reset_devices cannot be
|
||||||
|
honored. This is to allow, for example, kexec tools to be able
|
||||||
|
to warn the user if they designate an unresettable device as
|
||||||
|
a dump device, as kdump requires resetting the device in order
|
||||||
|
to work reliably.
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ Description:
|
||||||
will have its blocks allocated out of its own unique
|
will have its blocks allocated out of its own unique
|
||||||
preallocation pool.
|
preallocation pool.
|
||||||
|
|
||||||
What: /sys/fs/ext4/<disk>/inode_readahead
|
What: /sys/fs/ext4/<disk>/inode_readahead_blks
|
||||||
Date: March 2008
|
Date: March 2008
|
||||||
Contact: "Theodore Ts'o" <tytso@mit.edu>
|
Contact: "Theodore Ts'o" <tytso@mit.edu>
|
||||||
Description:
|
Description:
|
||||||
|
@ -85,7 +85,14 @@ Date: June 2008
|
||||||
Contact: "Theodore Ts'o" <tytso@mit.edu>
|
Contact: "Theodore Ts'o" <tytso@mit.edu>
|
||||||
Description:
|
Description:
|
||||||
Tuning parameter which (if non-zero) controls the goal
|
Tuning parameter which (if non-zero) controls the goal
|
||||||
inode used by the inode allocator in p0reference to
|
inode used by the inode allocator in preference to
|
||||||
all other allocation hueristics. This is intended for
|
all other allocation heuristics. This is intended for
|
||||||
debugging use only, and should be 0 on production
|
debugging use only, and should be 0 on production
|
||||||
systems.
|
systems.
|
||||||
|
|
||||||
|
What: /sys/fs/ext4/<disk>/max_writeback_mb_bump
|
||||||
|
Date: September 2009
|
||||||
|
Contact: "Theodore Ts'o" <tytso@mit.edu>
|
||||||
|
Description:
|
||||||
|
The maximum number of megabytes the writeback code will
|
||||||
|
try to write out before move on to another inode.
|
||||||
|
|
|
@ -55,7 +55,6 @@ mandocs: $(MAN)
|
||||||
build_images = mkdir -p $(objtree)/Documentation/DocBook/media/ && \
|
build_images = mkdir -p $(objtree)/Documentation/DocBook/media/ && \
|
||||||
cp $(srctree)/Documentation/DocBook/dvb/*.png \
|
cp $(srctree)/Documentation/DocBook/dvb/*.png \
|
||||||
$(srctree)/Documentation/DocBook/v4l/*.gif \
|
$(srctree)/Documentation/DocBook/v4l/*.gif \
|
||||||
$(srctree)/Documentation/DocBook/v4l/*.png \
|
|
||||||
$(objtree)/Documentation/DocBook/media/
|
$(objtree)/Documentation/DocBook/media/
|
||||||
|
|
||||||
xmldoclinks:
|
xmldoclinks:
|
||||||
|
|
|
@ -133,7 +133,6 @@
|
||||||
!Idrivers/rapidio/rio-sysfs.c
|
!Idrivers/rapidio/rio-sysfs.c
|
||||||
</sect1>
|
</sect1>
|
||||||
<sect1 id="PPC32_support"><title>PPC32 support</title>
|
<sect1 id="PPC32_support"><title>PPC32 support</title>
|
||||||
!Earch/powerpc/sysdev/fsl_rio.c
|
|
||||||
!Iarch/powerpc/sysdev/fsl_rio.c
|
!Iarch/powerpc/sysdev/fsl_rio.c
|
||||||
</sect1>
|
</sect1>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
|
@ -56,13 +56,13 @@ information on kernel development.
|
||||||
|
|
||||||
1.2: WHAT THIS DOCUMENT IS ABOUT
|
1.2: WHAT THIS DOCUMENT IS ABOUT
|
||||||
|
|
||||||
The Linux kernel, at over 6 million lines of code and well over 1000 active
|
The Linux kernel, at over 8 million lines of code and well over 1000
|
||||||
contributors, is one of the largest and most active free software projects
|
contributors to each release, is one of the largest and most active free
|
||||||
in existence. Since its humble beginning in 1991, this kernel has evolved
|
software projects in existence. Since its humble beginning in 1991, this
|
||||||
into a best-of-breed operating system component which runs on pocket-sized
|
kernel has evolved into a best-of-breed operating system component which
|
||||||
digital music players, desktop PCs, the largest supercomputers in
|
runs on pocket-sized digital music players, desktop PCs, the largest
|
||||||
existence, and all types of systems in between. It is a robust, efficient,
|
supercomputers in existence, and all types of systems in between. It is a
|
||||||
and scalable solution for almost any situation.
|
robust, efficient, and scalable solution for almost any situation.
|
||||||
|
|
||||||
With the growth of Linux has come an increase in the number of developers
|
With the growth of Linux has come an increase in the number of developers
|
||||||
(and companies) wishing to participate in its development. Hardware
|
(and companies) wishing to participate in its development. Hardware
|
||||||
|
@ -115,7 +115,7 @@ This document was written by Jonathan Corbet, corbet@lwn.net. It has been
|
||||||
improved by comments from Johannes Berg, James Berry, Alex Chiang, Roland
|
improved by comments from Johannes Berg, James Berry, Alex Chiang, Roland
|
||||||
Dreier, Randy Dunlap, Jake Edge, Jiri Kosina, Matt Mackall, Arthur Marsh,
|
Dreier, Randy Dunlap, Jake Edge, Jiri Kosina, Matt Mackall, Arthur Marsh,
|
||||||
Amanda McPherson, Andrew Morton, Andrew Price, Tsugikazu Shibata, and
|
Amanda McPherson, Andrew Morton, Andrew Price, Tsugikazu Shibata, and
|
||||||
Jochen Voß.
|
Jochen Voß.
|
||||||
|
|
||||||
This work was supported by the Linux Foundation; thanks especially to
|
This work was supported by the Linux Foundation; thanks especially to
|
||||||
Amanda McPherson, who saw the value of this effort and made it all happen.
|
Amanda McPherson, who saw the value of this effort and made it all happen.
|
||||||
|
@ -221,7 +221,7 @@ include:
|
||||||
- Everything that was said above about code review applies doubly to
|
- Everything that was said above about code review applies doubly to
|
||||||
closed-source code. Since this code is not available at all, it cannot
|
closed-source code. Since this code is not available at all, it cannot
|
||||||
have been reviewed by the community and will, beyond doubt, have serious
|
have been reviewed by the community and will, beyond doubt, have serious
|
||||||
problems.
|
problems.
|
||||||
|
|
||||||
Makers of embedded systems, in particular, may be tempted to disregard much
|
Makers of embedded systems, in particular, may be tempted to disregard much
|
||||||
of what has been said in this section in the belief that they are shipping
|
of what has been said in this section in the belief that they are shipping
|
||||||
|
|
|
@ -14,16 +14,15 @@ The kernel developers use a loosely time-based release process, with a new
|
||||||
major kernel release happening every two or three months. The recent
|
major kernel release happening every two or three months. The recent
|
||||||
release history looks like this:
|
release history looks like this:
|
||||||
|
|
||||||
2.6.26 July 13, 2008
|
2.6.38 March 14, 2011
|
||||||
2.6.25 April 16, 2008
|
2.6.37 January 4, 2011
|
||||||
2.6.24 January 24, 2008
|
2.6.36 October 20, 2010
|
||||||
2.6.23 October 9, 2007
|
2.6.35 August 1, 2010
|
||||||
2.6.22 July 8, 2007
|
2.6.34 May 15, 2010
|
||||||
2.6.21 April 25, 2007
|
2.6.33 February 24, 2010
|
||||||
2.6.20 February 4, 2007
|
|
||||||
|
|
||||||
Every 2.6.x release is a major kernel release with new features, internal
|
Every 2.6.x release is a major kernel release with new features, internal
|
||||||
API changes, and more. A typical 2.6 release can contain over 10,000
|
API changes, and more. A typical 2.6 release can contain nearly 10,000
|
||||||
changesets with changes to several hundred thousand lines of code. 2.6 is
|
changesets with changes to several hundred thousand lines of code. 2.6 is
|
||||||
thus the leading edge of Linux kernel development; the kernel uses a
|
thus the leading edge of Linux kernel development; the kernel uses a
|
||||||
rolling development model which is continually integrating major changes.
|
rolling development model which is continually integrating major changes.
|
||||||
|
@ -42,13 +41,13 @@ merge window do not come out of thin air; they have been collected, tested,
|
||||||
and staged ahead of time. How that process works will be described in
|
and staged ahead of time. How that process works will be described in
|
||||||
detail later on).
|
detail later on).
|
||||||
|
|
||||||
The merge window lasts for two weeks. At the end of this time, Linus
|
The merge window lasts for approximately two weeks. At the end of this
|
||||||
Torvalds will declare that the window is closed and release the first of
|
time, Linus Torvalds will declare that the window is closed and release the
|
||||||
the "rc" kernels. For the kernel which is destined to be 2.6.26, for
|
first of the "rc" kernels. For the kernel which is destined to be 2.6.40,
|
||||||
example, the release which happens at the end of the merge window will be
|
for example, the release which happens at the end of the merge window will
|
||||||
called 2.6.26-rc1. The -rc1 release is the signal that the time to merge
|
be called 2.6.40-rc1. The -rc1 release is the signal that the time to
|
||||||
new features has passed, and that the time to stabilize the next kernel has
|
merge new features has passed, and that the time to stabilize the next
|
||||||
begun.
|
kernel has begun.
|
||||||
|
|
||||||
Over the next six to ten weeks, only patches which fix problems should be
|
Over the next six to ten weeks, only patches which fix problems should be
|
||||||
submitted to the mainline. On occasion a more significant change will be
|
submitted to the mainline. On occasion a more significant change will be
|
||||||
|
@ -66,20 +65,19 @@ will get up to somewhere between -rc6 and -rc9 before the kernel is
|
||||||
considered to be sufficiently stable and the final 2.6.x release is made.
|
considered to be sufficiently stable and the final 2.6.x release is made.
|
||||||
At that point the whole process starts over again.
|
At that point the whole process starts over again.
|
||||||
|
|
||||||
As an example, here is how the 2.6.25 development cycle went (all dates in
|
As an example, here is how the 2.6.38 development cycle went (all dates in
|
||||||
2008):
|
2011):
|
||||||
|
|
||||||
January 24 2.6.24 stable release
|
January 4 2.6.37 stable release
|
||||||
February 10 2.6.25-rc1, merge window closes
|
January 18 2.6.38-rc1, merge window closes
|
||||||
February 15 2.6.25-rc2
|
January 21 2.6.38-rc2
|
||||||
February 24 2.6.25-rc3
|
February 1 2.6.38-rc3
|
||||||
March 4 2.6.25-rc4
|
February 7 2.6.38-rc4
|
||||||
March 9 2.6.25-rc5
|
February 15 2.6.38-rc5
|
||||||
March 16 2.6.25-rc6
|
February 21 2.6.38-rc6
|
||||||
March 25 2.6.25-rc7
|
March 1 2.6.38-rc7
|
||||||
April 1 2.6.25-rc8
|
March 7 2.6.38-rc8
|
||||||
April 11 2.6.25-rc9
|
March 14 2.6.38 stable release
|
||||||
April 16 2.6.25 stable release
|
|
||||||
|
|
||||||
How do the developers decide when to close the development cycle and create
|
How do the developers decide when to close the development cycle and create
|
||||||
the stable release? The most significant metric used is the list of
|
the stable release? The most significant metric used is the list of
|
||||||
|
@ -87,7 +85,7 @@ regressions from previous releases. No bugs are welcome, but those which
|
||||||
break systems which worked in the past are considered to be especially
|
break systems which worked in the past are considered to be especially
|
||||||
serious. For this reason, patches which cause regressions are looked upon
|
serious. For this reason, patches which cause regressions are looked upon
|
||||||
unfavorably and are quite likely to be reverted during the stabilization
|
unfavorably and are quite likely to be reverted during the stabilization
|
||||||
period.
|
period.
|
||||||
|
|
||||||
The developers' goal is to fix all known regressions before the stable
|
The developers' goal is to fix all known regressions before the stable
|
||||||
release is made. In the real world, this kind of perfection is hard to
|
release is made. In the real world, this kind of perfection is hard to
|
||||||
|
@ -99,26 +97,34 @@ kernels go out with a handful of known regressions though, hopefully, none
|
||||||
of them are serious.
|
of them are serious.
|
||||||
|
|
||||||
Once a stable release is made, its ongoing maintenance is passed off to the
|
Once a stable release is made, its ongoing maintenance is passed off to the
|
||||||
"stable team," currently comprised of Greg Kroah-Hartman and Chris Wright.
|
"stable team," currently consisting of Greg Kroah-Hartman. The stable team
|
||||||
The stable team will release occasional updates to the stable release using
|
will release occasional updates to the stable release using the 2.6.x.y
|
||||||
the 2.6.x.y numbering scheme. To be considered for an update release, a
|
numbering scheme. To be considered for an update release, a patch must (1)
|
||||||
patch must (1) fix a significant bug, and (2) already be merged into the
|
fix a significant bug, and (2) already be merged into the mainline for the
|
||||||
mainline for the next development kernel. Continuing our 2.6.25 example,
|
next development kernel. Kernels will typically receive stable updates for
|
||||||
the history (as of this writing) is:
|
a little more than one development cycle past their initial release. So,
|
||||||
|
for example, the 2.6.36 kernel's history looked like:
|
||||||
|
|
||||||
May 1 2.6.25.1
|
October 10 2.6.36 stable release
|
||||||
May 6 2.6.25.2
|
November 22 2.6.36.1
|
||||||
May 9 2.6.25.3
|
December 9 2.6.36.2
|
||||||
May 15 2.6.25.4
|
January 7 2.6.36.3
|
||||||
June 7 2.6.25.5
|
February 17 2.6.36.4
|
||||||
June 9 2.6.25.6
|
|
||||||
June 16 2.6.25.7
|
|
||||||
June 21 2.6.25.8
|
|
||||||
June 24 2.6.25.9
|
|
||||||
|
|
||||||
Stable updates for a given kernel are made for approximately six months;
|
2.6.36.4 was the final stable update for the 2.6.36 release.
|
||||||
after that, the maintenance of stable releases is solely the responsibility
|
|
||||||
of the distributors which have shipped that particular kernel.
|
Some kernels are designated "long term" kernels; they will receive support
|
||||||
|
for a longer period. As of this writing, the current long term kernels
|
||||||
|
and their maintainers are:
|
||||||
|
|
||||||
|
2.6.27 Willy Tarreau (Deep-frozen stable kernel)
|
||||||
|
2.6.32 Greg Kroah-Hartman
|
||||||
|
2.6.35 Andi Kleen (Embedded flag kernel)
|
||||||
|
|
||||||
|
The selection of a kernel for long-term support is purely a matter of a
|
||||||
|
maintainer having the need and the time to maintain that release. There
|
||||||
|
are no known plans for long-term support for any specific upcoming
|
||||||
|
release.
|
||||||
|
|
||||||
|
|
||||||
2.2: THE LIFECYCLE OF A PATCH
|
2.2: THE LIFECYCLE OF A PATCH
|
||||||
|
@ -130,7 +136,7 @@ each patch implements a change which is desirable to have in the mainline.
|
||||||
This process can happen quickly for minor fixes, or, in the case of large
|
This process can happen quickly for minor fixes, or, in the case of large
|
||||||
and controversial changes, go on for years. Much developer frustration
|
and controversial changes, go on for years. Much developer frustration
|
||||||
comes from a lack of understanding of this process or from attempts to
|
comes from a lack of understanding of this process or from attempts to
|
||||||
circumvent it.
|
circumvent it.
|
||||||
|
|
||||||
In the hopes of reducing that frustration, this document will describe how
|
In the hopes of reducing that frustration, this document will describe how
|
||||||
a patch gets into the kernel. What follows below is an introduction which
|
a patch gets into the kernel. What follows below is an introduction which
|
||||||
|
@ -193,8 +199,8 @@ involved.
|
||||||
2.3: HOW PATCHES GET INTO THE KERNEL
|
2.3: HOW PATCHES GET INTO THE KERNEL
|
||||||
|
|
||||||
There is exactly one person who can merge patches into the mainline kernel
|
There is exactly one person who can merge patches into the mainline kernel
|
||||||
repository: Linus Torvalds. But, of the over 12,000 patches which went
|
repository: Linus Torvalds. But, of the over 9,500 patches which went
|
||||||
into the 2.6.25 kernel, only 250 (around 2%) were directly chosen by Linus
|
into the 2.6.38 kernel, only 112 (around 1.3%) were directly chosen by Linus
|
||||||
himself. The kernel project has long since grown to a size where no single
|
himself. The kernel project has long since grown to a size where no single
|
||||||
developer could possibly inspect and select every patch unassisted. The
|
developer could possibly inspect and select every patch unassisted. The
|
||||||
way the kernel developers have addressed this growth is through the use of
|
way the kernel developers have addressed this growth is through the use of
|
||||||
|
@ -229,7 +235,7 @@ first in trees dedicated to network device drivers, wireless networking,
|
||||||
etc. This chain of repositories can be arbitrarily long, though it rarely
|
etc. This chain of repositories can be arbitrarily long, though it rarely
|
||||||
exceeds two or three links. Since each maintainer in the chain trusts
|
exceeds two or three links. Since each maintainer in the chain trusts
|
||||||
those managing lower-level trees, this process is known as the "chain of
|
those managing lower-level trees, this process is known as the "chain of
|
||||||
trust."
|
trust."
|
||||||
|
|
||||||
Clearly, in a system like this, getting patches into the kernel depends on
|
Clearly, in a system like this, getting patches into the kernel depends on
|
||||||
finding the right maintainer. Sending patches directly to Linus is not
|
finding the right maintainer. Sending patches directly to Linus is not
|
||||||
|
@ -254,7 +260,7 @@ The answer comes in the form of -next trees, where subsystem trees are
|
||||||
collected for testing and review. The older of these trees, maintained by
|
collected for testing and review. The older of these trees, maintained by
|
||||||
Andrew Morton, is called "-mm" (for memory management, which is how it got
|
Andrew Morton, is called "-mm" (for memory management, which is how it got
|
||||||
started). The -mm tree integrates patches from a long list of subsystem
|
started). The -mm tree integrates patches from a long list of subsystem
|
||||||
trees; it also has some patches aimed at helping with debugging.
|
trees; it also has some patches aimed at helping with debugging.
|
||||||
|
|
||||||
Beyond that, -mm contains a significant collection of patches which have
|
Beyond that, -mm contains a significant collection of patches which have
|
||||||
been selected by Andrew directly. These patches may have been posted on a
|
been selected by Andrew directly. These patches may have been posted on a
|
||||||
|
@ -264,8 +270,8 @@ subsystem tree of last resort; if there is no other obvious path for a
|
||||||
patch into the mainline, it is likely to end up in -mm. Miscellaneous
|
patch into the mainline, it is likely to end up in -mm. Miscellaneous
|
||||||
patches which accumulate in -mm will eventually either be forwarded on to
|
patches which accumulate in -mm will eventually either be forwarded on to
|
||||||
an appropriate subsystem tree or be sent directly to Linus. In a typical
|
an appropriate subsystem tree or be sent directly to Linus. In a typical
|
||||||
development cycle, approximately 10% of the patches going into the mainline
|
development cycle, approximately 5-10% of the patches going into the
|
||||||
get there via -mm.
|
mainline get there via -mm.
|
||||||
|
|
||||||
The current -mm patch is available in the "mmotm" (-mm of the moment)
|
The current -mm patch is available in the "mmotm" (-mm of the moment)
|
||||||
directory at:
|
directory at:
|
||||||
|
@ -275,7 +281,7 @@ directory at:
|
||||||
Use of the MMOTM tree is likely to be a frustrating experience, though;
|
Use of the MMOTM tree is likely to be a frustrating experience, though;
|
||||||
there is a definite chance that it will not even compile.
|
there is a definite chance that it will not even compile.
|
||||||
|
|
||||||
The other -next tree, started more recently, is linux-next, maintained by
|
The primary tree for next-cycle patch merging is linux-next, maintained by
|
||||||
Stephen Rothwell. The linux-next tree is, by design, a snapshot of what
|
Stephen Rothwell. The linux-next tree is, by design, a snapshot of what
|
||||||
the mainline is expected to look like after the next merge window closes.
|
the mainline is expected to look like after the next merge window closes.
|
||||||
Linux-next trees are announced on the linux-kernel and linux-next mailing
|
Linux-next trees are announced on the linux-kernel and linux-next mailing
|
||||||
|
@ -287,25 +293,14 @@ Some information about linux-next has been gathered at:
|
||||||
|
|
||||||
http://linux.f-seidel.de/linux-next/pmwiki/
|
http://linux.f-seidel.de/linux-next/pmwiki/
|
||||||
|
|
||||||
How the linux-next tree will fit into the development process is still
|
Linux-next has become an integral part of the kernel development process;
|
||||||
changing. As of this writing, the first full development cycle involving
|
all patches merged during a given merge window should really have found
|
||||||
linux-next (2.6.26) is coming to an end; thus far, it has proved to be a
|
their way into linux-next some time before the merge window opens.
|
||||||
valuable resource for finding and fixing integration problems before the
|
|
||||||
beginning of the merge window. See http://lwn.net/Articles/287155/ for
|
|
||||||
more information on how linux-next has worked to set up the 2.6.27 merge
|
|
||||||
window.
|
|
||||||
|
|
||||||
Some developers have begun to suggest that linux-next should be used as the
|
|
||||||
target for future development as well. The linux-next tree does tend to be
|
|
||||||
far ahead of the mainline and is more representative of the tree into which
|
|
||||||
any new work will be merged. The downside to this idea is that the
|
|
||||||
volatility of linux-next tends to make it a difficult development target.
|
|
||||||
See http://lwn.net/Articles/289013/ for more information on this topic, and
|
|
||||||
stay tuned; much is still in flux where linux-next is involved.
|
|
||||||
|
|
||||||
2.4.1: STAGING TREES
|
2.4.1: STAGING TREES
|
||||||
|
|
||||||
The kernel source tree now contains the drivers/staging/ directory, where
|
The kernel source tree contains the drivers/staging/ directory, where
|
||||||
many sub-directories for drivers or filesystems that are on their way to
|
many sub-directories for drivers or filesystems that are on their way to
|
||||||
being added to the kernel tree live. They remain in drivers/staging while
|
being added to the kernel tree live. They remain in drivers/staging while
|
||||||
they still need more work; once complete, they can be moved into the
|
they still need more work; once complete, they can be moved into the
|
||||||
|
@ -313,15 +308,23 @@ kernel proper. This is a way to keep track of drivers that aren't
|
||||||
up to Linux kernel coding or quality standards, but people may want to use
|
up to Linux kernel coding or quality standards, but people may want to use
|
||||||
them and track development.
|
them and track development.
|
||||||
|
|
||||||
Greg Kroah-Hartman currently (as of 2.6.36) maintains the staging tree.
|
Greg Kroah-Hartman currently maintains the staging tree. Drivers that
|
||||||
Drivers that still need work are sent to him, with each driver having
|
still need work are sent to him, with each driver having its own
|
||||||
its own subdirectory in drivers/staging/. Along with the driver source
|
subdirectory in drivers/staging/. Along with the driver source files, a
|
||||||
files, a TODO file should be present in the directory as well. The TODO
|
TODO file should be present in the directory as well. The TODO file lists
|
||||||
file lists the pending work that the driver needs for acceptance into
|
the pending work that the driver needs for acceptance into the kernel
|
||||||
the kernel proper, as well as a list of people that should be Cc'd for any
|
proper, as well as a list of people that should be Cc'd for any patches to
|
||||||
patches to the driver. Staging drivers that don't currently build should
|
the driver. Current rules require that drivers contributed to staging
|
||||||
have their config entries depend upon CONFIG_BROKEN. Once they can
|
must, at a minimum, compile properly.
|
||||||
be successfully built without outside patches, CONFIG_BROKEN can be removed.
|
|
||||||
|
Staging can be a relatively easy way to get new drivers into the mainline
|
||||||
|
where, with luck, they will come to the attention of other developers and
|
||||||
|
improve quickly. Entry into staging is not the end of the story, though;
|
||||||
|
code in staging which is not seeing regular progress will eventually be
|
||||||
|
removed. Distributors also tend to be relatively reluctant to enable
|
||||||
|
staging drivers. So staging is, at best, a stop on the way toward becoming
|
||||||
|
a proper mainline driver.
|
||||||
|
|
||||||
|
|
||||||
2.5: TOOLS
|
2.5: TOOLS
|
||||||
|
|
||||||
|
@ -347,11 +350,7 @@ page at:
|
||||||
|
|
||||||
http://git-scm.com/
|
http://git-scm.com/
|
||||||
|
|
||||||
That page has pointers to documentation and tutorials. One should be
|
That page has pointers to documentation and tutorials.
|
||||||
aware, in particular, of the Kernel Hacker's Guide to git, which has
|
|
||||||
information specific to kernel development:
|
|
||||||
|
|
||||||
http://linux.yyz.us/git-howto.html
|
|
||||||
|
|
||||||
Among the kernel developers who do not use git, the most popular choice is
|
Among the kernel developers who do not use git, the most popular choice is
|
||||||
almost certainly Mercurial:
|
almost certainly Mercurial:
|
||||||
|
@ -408,7 +407,7 @@ There are a few hints which can help with linux-kernel survival:
|
||||||
important to filter on both the topic of interest (though note that
|
important to filter on both the topic of interest (though note that
|
||||||
long-running conversations can drift away from the original subject
|
long-running conversations can drift away from the original subject
|
||||||
without changing the email subject line) and the people who are
|
without changing the email subject line) and the people who are
|
||||||
participating.
|
participating.
|
||||||
|
|
||||||
- Do not feed the trolls. If somebody is trying to stir up an angry
|
- Do not feed the trolls. If somebody is trying to stir up an angry
|
||||||
response, ignore them.
|
response, ignore them.
|
||||||
|
|
|
@ -110,8 +110,8 @@ the kernel community's standards. Some examples include:
|
||||||
|
|
||||||
- The AppArmor security module made use of internal virtual filesystem
|
- The AppArmor security module made use of internal virtual filesystem
|
||||||
data structures in ways which were considered to be unsafe and
|
data structures in ways which were considered to be unsafe and
|
||||||
unreliable. This code has since been significantly reworked, but
|
unreliable. This concern (among others) kept AppArmor out of the
|
||||||
remains outside of the mainline.
|
mainline for years.
|
||||||
|
|
||||||
In each of these cases, a great deal of pain and extra work could have been
|
In each of these cases, a great deal of pain and extra work could have been
|
||||||
avoided with some early discussion with the kernel developers.
|
avoided with some early discussion with the kernel developers.
|
||||||
|
@ -138,6 +138,19 @@ patches, and who, if anybody, is attaching Signed-off-by lines to those
|
||||||
patches. Those are the people who will be best placed to help with a new
|
patches. Those are the people who will be best placed to help with a new
|
||||||
development project.
|
development project.
|
||||||
|
|
||||||
|
The task of finding the right maintainer is sometimes challenging enough
|
||||||
|
that the kernel developers have added a script to ease the process:
|
||||||
|
|
||||||
|
.../scripts/get_maintainer.pl
|
||||||
|
|
||||||
|
This script will return the current maintainer(s) for a given file or
|
||||||
|
directory when given the "-f" option. If passed a patch on the
|
||||||
|
command line, it will list the maintainers who should probably receive
|
||||||
|
copies of the patch. There are a number of options regulating how hard
|
||||||
|
get_maintainer.pl will search for maintainers; please be careful about
|
||||||
|
using the more aggressive options as you may end up including developers
|
||||||
|
who have no real interest in the code you are modifying.
|
||||||
|
|
||||||
If all else fails, talking to Andrew Morton can be an effective way to
|
If all else fails, talking to Andrew Morton can be an effective way to
|
||||||
track down a maintainer for a specific piece of code.
|
track down a maintainer for a specific piece of code.
|
||||||
|
|
||||||
|
@ -155,11 +168,15 @@ reaction, but, instead, little or no reaction at all. The sad truth of the
|
||||||
matter is (1) kernel developers tend to be busy, (2) there is no shortage
|
matter is (1) kernel developers tend to be busy, (2) there is no shortage
|
||||||
of people with grand plans and little code (or even prospect of code) to
|
of people with grand plans and little code (or even prospect of code) to
|
||||||
back them up, and (3) nobody is obligated to review or comment on ideas
|
back them up, and (3) nobody is obligated to review or comment on ideas
|
||||||
posted by others. If a request-for-comments posting yields little in the
|
posted by others. Beyond that, high-level designs often hide problems
|
||||||
way of comments, do not assume that it means there is no interest in the
|
which are only reviewed when somebody actually tries to implement those
|
||||||
project. Unfortunately, you also cannot assume that there are no problems
|
designs; for that reason, kernel developers would rather see the code.
|
||||||
with your idea. The best thing to do in this situation is to proceed,
|
|
||||||
keeping the community informed as you go.
|
If a request-for-comments posting yields little in the way of comments, do
|
||||||
|
not assume that it means there is no interest in the project.
|
||||||
|
Unfortunately, you also cannot assume that there are no problems with your
|
||||||
|
idea. The best thing to do in this situation is to proceed, keeping the
|
||||||
|
community informed as you go.
|
||||||
|
|
||||||
|
|
||||||
3.5: GETTING OFFICIAL BUY-IN
|
3.5: GETTING OFFICIAL BUY-IN
|
||||||
|
|
|
@ -131,6 +131,11 @@ classic time/space tradeoff taught in beginning data structures classes
|
||||||
often does not apply to contemporary hardware. Space *is* time, in that a
|
often does not apply to contemporary hardware. Space *is* time, in that a
|
||||||
larger program will run slower than one which is more compact.
|
larger program will run slower than one which is more compact.
|
||||||
|
|
||||||
|
More recent compilers take an increasingly active role in deciding whether
|
||||||
|
a given function should actually be inlined or not. So the liberal
|
||||||
|
placement of "inline" keywords may not just be excessive; it could also be
|
||||||
|
irrelevant.
|
||||||
|
|
||||||
|
|
||||||
* Locking
|
* Locking
|
||||||
|
|
||||||
|
@ -285,6 +290,13 @@ be found at https://sparse.wiki.kernel.org/index.php/Main_Page if your
|
||||||
distributor does not package it); it can then be run on the code by adding
|
distributor does not package it); it can then be run on the code by adding
|
||||||
"C=1" to your make command.
|
"C=1" to your make command.
|
||||||
|
|
||||||
|
The "Coccinelle" tool (http://coccinelle.lip6.fr/) is able to find a wide
|
||||||
|
variety of potential coding problems; it can also propose fixes for those
|
||||||
|
problems. Quite a few "semantic patches" for the kernel have been packaged
|
||||||
|
under the scripts/coccinelle directory; running "make coccicheck" will run
|
||||||
|
through those semantic patches and report on any problems found. See
|
||||||
|
Documentation/coccinelle.txt for more information.
|
||||||
|
|
||||||
Other kinds of portability errors are best found by compiling your code for
|
Other kinds of portability errors are best found by compiling your code for
|
||||||
other architectures. If you do not happen to have an S/390 system or a
|
other architectures. If you do not happen to have an S/390 system or a
|
||||||
Blackfin development board handy, you can still perform the compilation
|
Blackfin development board handy, you can still perform the compilation
|
||||||
|
@ -308,7 +320,9 @@ The first piece of documentation for any patch is its associated
|
||||||
changelog. Log entries should describe the problem being solved, the form
|
changelog. Log entries should describe the problem being solved, the form
|
||||||
of the solution, the people who worked on the patch, any relevant
|
of the solution, the people who worked on the patch, any relevant
|
||||||
effects on performance, and anything else that might be needed to
|
effects on performance, and anything else that might be needed to
|
||||||
understand the patch.
|
understand the patch. Be sure that the changelog says *why* the patch is
|
||||||
|
worth applying; a surprising number of developers fail to provide that
|
||||||
|
information.
|
||||||
|
|
||||||
Any code which adds a new user-space interface - including new sysfs or
|
Any code which adds a new user-space interface - including new sysfs or
|
||||||
/proc files - should include documentation of that interface which enables
|
/proc files - should include documentation of that interface which enables
|
||||||
|
@ -321,7 +335,7 @@ boot-time parameters. Any patch which adds new parameters should add the
|
||||||
appropriate entries to this file.
|
appropriate entries to this file.
|
||||||
|
|
||||||
Any new configuration options must be accompanied by help text which
|
Any new configuration options must be accompanied by help text which
|
||||||
clearly explains the options and when the user might want to select them.
|
clearly explains the options and when the user might want to select them.
|
||||||
|
|
||||||
Internal API information for many subsystems is documented by way of
|
Internal API information for many subsystems is documented by way of
|
||||||
specially-formatted comments; these comments can be extracted and formatted
|
specially-formatted comments; these comments can be extracted and formatted
|
||||||
|
@ -372,7 +386,8 @@ which is broken by the change. For a widely-used function, this duty can
|
||||||
lead to literally hundreds or thousands of changes - many of which are
|
lead to literally hundreds or thousands of changes - many of which are
|
||||||
likely to conflict with work being done by other developers. Needless to
|
likely to conflict with work being done by other developers. Needless to
|
||||||
say, this can be a large job, so it is best to be sure that the
|
say, this can be a large job, so it is best to be sure that the
|
||||||
justification is solid.
|
justification is solid. Note that the Coccinelle tool can help with
|
||||||
|
wide-ranging API changes.
|
||||||
|
|
||||||
When making an incompatible API change, one should, whenever possible,
|
When making an incompatible API change, one should, whenever possible,
|
||||||
ensure that code which has not been updated is caught by the compiler.
|
ensure that code which has not been updated is caught by the compiler.
|
||||||
|
|
|
@ -60,12 +60,15 @@ even in the short term.
|
||||||
|
|
||||||
Patches must be prepared against a specific version of the kernel. As a
|
Patches must be prepared against a specific version of the kernel. As a
|
||||||
general rule, a patch should be based on the current mainline as found in
|
general rule, a patch should be based on the current mainline as found in
|
||||||
Linus's git tree. It may become necessary to make versions against -mm,
|
Linus's git tree. When basing on mainline, start with a well-known release
|
||||||
linux-next, or a subsystem tree, though, to facilitate wider testing and
|
point - a stable or -rc release - rather than branching off the mainline at
|
||||||
review. Depending on the area of your patch and what is going on
|
an arbitrary spot.
|
||||||
elsewhere, basing a patch against these other trees can require a
|
|
||||||
significant amount of work resolving conflicts and dealing with API
|
It may become necessary to make versions against -mm, linux-next, or a
|
||||||
changes.
|
subsystem tree, though, to facilitate wider testing and review. Depending
|
||||||
|
on the area of your patch and what is going on elsewhere, basing a patch
|
||||||
|
against these other trees can require a significant amount of work
|
||||||
|
resolving conflicts and dealing with API changes.
|
||||||
|
|
||||||
Only the most simple changes should be formatted as a single patch;
|
Only the most simple changes should be formatted as a single patch;
|
||||||
everything else should be made as a logical series of changes. Splitting
|
everything else should be made as a logical series of changes. Splitting
|
||||||
|
@ -100,11 +103,11 @@ rules of thumb, however, which can help considerably:
|
||||||
result is a broken kernel, you will make life harder for developers and
|
result is a broken kernel, you will make life harder for developers and
|
||||||
users who are engaging in the noble work of tracking down problems.
|
users who are engaging in the noble work of tracking down problems.
|
||||||
|
|
||||||
- Do not overdo it, though. One developer recently posted a set of edits
|
- Do not overdo it, though. One developer once posted a set of edits
|
||||||
to a single file as 500 separate patches - an act which did not make him
|
to a single file as 500 separate patches - an act which did not make him
|
||||||
the most popular person on the kernel mailing list. A single patch can
|
the most popular person on the kernel mailing list. A single patch can
|
||||||
be reasonably large as long as it still contains a single *logical*
|
be reasonably large as long as it still contains a single *logical*
|
||||||
change.
|
change.
|
||||||
|
|
||||||
- It can be tempting to add a whole new infrastructure with a series of
|
- It can be tempting to add a whole new infrastructure with a series of
|
||||||
patches, but to leave that infrastructure unused until the final patch
|
patches, but to leave that infrastructure unused until the final patch
|
||||||
|
@ -162,7 +165,8 @@ To that end, the summary line should describe the effects of and motivation
|
||||||
for the change as well as possible given the one-line constraint. The
|
for the change as well as possible given the one-line constraint. The
|
||||||
detailed description can then amplify on those topics and provide any
|
detailed description can then amplify on those topics and provide any
|
||||||
needed additional information. If the patch fixes a bug, cite the commit
|
needed additional information. If the patch fixes a bug, cite the commit
|
||||||
which introduced the bug if possible. If a problem is associated with
|
which introduced the bug if possible (and please provide both the commit ID
|
||||||
|
and the title when citing commits). If a problem is associated with
|
||||||
specific log or compiler output, include that output to help others
|
specific log or compiler output, include that output to help others
|
||||||
searching for a solution to the same problem. If the change is meant to
|
searching for a solution to the same problem. If the change is meant to
|
||||||
support other changes coming in later patch, say so. If internal APIs are
|
support other changes coming in later patch, say so. If internal APIs are
|
||||||
|
@ -230,7 +234,7 @@ take care of:
|
||||||
which have had gratuitous white-space changes or line wrapping performed
|
which have had gratuitous white-space changes or line wrapping performed
|
||||||
by the mail client will not apply at the other end, and often will not
|
by the mail client will not apply at the other end, and often will not
|
||||||
be examined in any detail. If there is any doubt at all, mail the patch
|
be examined in any detail. If there is any doubt at all, mail the patch
|
||||||
to yourself and convince yourself that it shows up intact.
|
to yourself and convince yourself that it shows up intact.
|
||||||
|
|
||||||
Documentation/email-clients.txt has some helpful hints on making
|
Documentation/email-clients.txt has some helpful hints on making
|
||||||
specific mail clients work for sending patches.
|
specific mail clients work for sending patches.
|
||||||
|
@ -287,7 +291,7 @@ something like:
|
||||||
|
|
||||||
where "nn" is the ordinal number of the patch, "mm" is the total number of
|
where "nn" is the ordinal number of the patch, "mm" is the total number of
|
||||||
patches in the series, and "subsys" is the name of the affected subsystem.
|
patches in the series, and "subsys" is the name of the affected subsystem.
|
||||||
Clearly, nn/mm can be omitted for a single, standalone patch.
|
Clearly, nn/mm can be omitted for a single, standalone patch.
|
||||||
|
|
||||||
If you have a significant series of patches, it is customary to send an
|
If you have a significant series of patches, it is customary to send an
|
||||||
introductory description as part zero. This convention is not universally
|
introductory description as part zero. This convention is not universally
|
||||||
|
@ -299,5 +303,5 @@ In general, the second and following parts of a multi-part patch should be
|
||||||
sent as a reply to the first part so that they all thread together at the
|
sent as a reply to the first part so that they all thread together at the
|
||||||
receiving end. Tools like git and quilt have commands to mail out a set of
|
receiving end. Tools like git and quilt have commands to mail out a set of
|
||||||
patches with the proper threading. If you have a long series, though, and
|
patches with the proper threading. If you have a long series, though, and
|
||||||
are using git, please provide the --no-chain-reply-to option to avoid
|
are using git, please stay away from the --chain-reply-to option to avoid
|
||||||
creating exceptionally deep nesting.
|
creating exceptionally deep nesting.
|
||||||
|
|
|
@ -66,6 +66,11 @@ be easy to become blinded by your own solution to a problem to the point
|
||||||
that you don't realize that something is fundamentally wrong or, perhaps,
|
that you don't realize that something is fundamentally wrong or, perhaps,
|
||||||
you're not even solving the right problem.
|
you're not even solving the right problem.
|
||||||
|
|
||||||
|
Andrew Morton has suggested that every review comment which does not result
|
||||||
|
in a code change should result in an additional code comment instead; that
|
||||||
|
can help future reviewers avoid the questions which came up the first time
|
||||||
|
around.
|
||||||
|
|
||||||
One fatal mistake is to ignore review comments in the hope that they will
|
One fatal mistake is to ignore review comments in the hope that they will
|
||||||
go away. They will not go away. If you repost code without having
|
go away. They will not go away. If you repost code without having
|
||||||
responded to the comments you got the time before, you're likely to find
|
responded to the comments you got the time before, you're likely to find
|
||||||
|
@ -100,7 +105,7 @@ entry into a subsystem maintainer's tree. How that works varies from one
|
||||||
subsystem to the next; each maintainer has his or her own way of doing
|
subsystem to the next; each maintainer has his or her own way of doing
|
||||||
things. In particular, there may be more than one tree - one, perhaps,
|
things. In particular, there may be more than one tree - one, perhaps,
|
||||||
dedicated to patches planned for the next merge window, and another for
|
dedicated to patches planned for the next merge window, and another for
|
||||||
longer-term work.
|
longer-term work.
|
||||||
|
|
||||||
For patches applying to areas for which there is no obvious subsystem tree
|
For patches applying to areas for which there is no obvious subsystem tree
|
||||||
(memory management patches, for example), the default tree often ends up
|
(memory management patches, for example), the default tree often ends up
|
||||||
|
@ -109,11 +114,10 @@ through the -mm tree.
|
||||||
|
|
||||||
Inclusion into a subsystem tree can bring a higher level of visibility to a
|
Inclusion into a subsystem tree can bring a higher level of visibility to a
|
||||||
patch. Now other developers working with that tree will get the patch by
|
patch. Now other developers working with that tree will get the patch by
|
||||||
default. Subsystem trees typically feed into -mm and linux-next as well,
|
default. Subsystem trees typically feed linux-next as well, making their
|
||||||
making their contents visible to the development community as a whole. At
|
contents visible to the development community as a whole. At this point,
|
||||||
this point, there's a good chance that you will get more comments from a
|
there's a good chance that you will get more comments from a new set of
|
||||||
new set of reviewers; these comments need to be answered as in the previous
|
reviewers; these comments need to be answered as in the previous round.
|
||||||
round.
|
|
||||||
|
|
||||||
What may also happen at this point, depending on the nature of your patch,
|
What may also happen at this point, depending on the nature of your patch,
|
||||||
is that conflicts with work being done by others turn up. In the worst
|
is that conflicts with work being done by others turn up. In the worst
|
||||||
|
|
|
@ -119,7 +119,7 @@ can affect your ability to get trees pulled in the future. Quoting Linus:
|
||||||
to trust things *without* then having to go and check every
|
to trust things *without* then having to go and check every
|
||||||
individual change by hand.
|
individual change by hand.
|
||||||
|
|
||||||
(http://lwn.net/Articles/224135/).
|
(http://lwn.net/Articles/224135/).
|
||||||
|
|
||||||
To avoid this kind of situation, ensure that all patches within a given
|
To avoid this kind of situation, ensure that all patches within a given
|
||||||
branch stick closely to the associated topic; a "driver fixes" branch
|
branch stick closely to the associated topic; a "driver fixes" branch
|
||||||
|
@ -138,7 +138,7 @@ When requesting a pull, be sure to give all the relevant information: where
|
||||||
your tree is, what branch to pull, and what changes will result from the
|
your tree is, what branch to pull, and what changes will result from the
|
||||||
pull. The git request-pull command can be helpful in this regard; it will
|
pull. The git request-pull command can be helpful in this regard; it will
|
||||||
format the request as other developers expect, and will also check to be
|
format the request as other developers expect, and will also check to be
|
||||||
sure that you have remembered to push those changes to the public server.
|
sure that you have remembered to push those changes to the public server.
|
||||||
|
|
||||||
|
|
||||||
7.2: REVIEWING PATCHES
|
7.2: REVIEWING PATCHES
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
dm-flakey
|
||||||
|
=========
|
||||||
|
|
||||||
|
This target is the same as the linear target except that it returns I/O
|
||||||
|
errors periodically. It's been found useful in simulating failing
|
||||||
|
devices for testing purposes.
|
||||||
|
|
||||||
|
Starting from the time the table is loaded, the device is available for
|
||||||
|
<up interval> seconds, then returns errors for <down interval> seconds,
|
||||||
|
and then this cycle repeats.
|
||||||
|
|
||||||
|
Parameters: <dev path> <offset> <up interval> <down interval>
|
||||||
|
<dev path>: Full pathname to the underlying block-device, or a
|
||||||
|
"major:minor" device-number.
|
||||||
|
<offset>: Starting sector within the device.
|
||||||
|
<up interval>: Number of seconds device is available.
|
||||||
|
<down interval>: Number of seconds device returns errors.
|
|
@ -6,7 +6,7 @@ This document describes how to use the dynamic debug (ddebug) feature.
|
||||||
|
|
||||||
Dynamic debug is designed to allow you to dynamically enable/disable kernel
|
Dynamic debug is designed to allow you to dynamically enable/disable kernel
|
||||||
code to obtain additional kernel information. Currently, if
|
code to obtain additional kernel information. Currently, if
|
||||||
CONFIG_DYNAMIC_DEBUG is set, then all pr_debug()/dev_debug() calls can be
|
CONFIG_DYNAMIC_DEBUG is set, then all pr_debug()/dev_dbg() calls can be
|
||||||
dynamically enabled per-callsite.
|
dynamically enabled per-callsite.
|
||||||
|
|
||||||
Dynamic debug has even more useful features:
|
Dynamic debug has even more useful features:
|
||||||
|
@ -26,7 +26,7 @@ Dynamic debug has even more useful features:
|
||||||
Controlling dynamic debug Behaviour
|
Controlling dynamic debug Behaviour
|
||||||
===================================
|
===================================
|
||||||
|
|
||||||
The behaviour of pr_debug()/dev_debug()s are controlled via writing to a
|
The behaviour of pr_debug()/dev_dbg()s are controlled via writing to a
|
||||||
control file in the 'debugfs' filesystem. Thus, you must first mount the debugfs
|
control file in the 'debugfs' filesystem. Thus, you must first mount the debugfs
|
||||||
filesystem, in order to make use of this feature. Subsequently, we refer to the
|
filesystem, in order to make use of this feature. Subsequently, we refer to the
|
||||||
control file as: <debugfs>/dynamic_debug/control. For example, if you want to
|
control file as: <debugfs>/dynamic_debug/control. For example, if you want to
|
||||||
|
|
|
@ -128,7 +128,7 @@ alloc_inode:
|
||||||
destroy_inode:
|
destroy_inode:
|
||||||
dirty_inode: (must not sleep)
|
dirty_inode: (must not sleep)
|
||||||
write_inode:
|
write_inode:
|
||||||
drop_inode: !!!inode_lock!!!
|
drop_inode: !!!inode->i_lock!!!
|
||||||
evict_inode:
|
evict_inode:
|
||||||
put_super: write
|
put_super: write
|
||||||
write_super: read
|
write_super: read
|
||||||
|
|
|
@ -367,12 +367,47 @@ init_itable=n The lazy itable init code will wait n times the
|
||||||
minimizes the impact on the systme performance
|
minimizes the impact on the systme performance
|
||||||
while file system's inode table is being initialized.
|
while file system's inode table is being initialized.
|
||||||
|
|
||||||
discard Controls whether ext4 should issue discard/TRIM
|
discard Controls whether ext4 should issue discard/TRIM
|
||||||
nodiscard(*) commands to the underlying block device when
|
nodiscard(*) commands to the underlying block device when
|
||||||
blocks are freed. This is useful for SSD devices
|
blocks are freed. This is useful for SSD devices
|
||||||
and sparse/thinly-provisioned LUNs, but it is off
|
and sparse/thinly-provisioned LUNs, but it is off
|
||||||
by default until sufficient testing has been done.
|
by default until sufficient testing has been done.
|
||||||
|
|
||||||
|
nouid32 Disables 32-bit UIDs and GIDs. This is for
|
||||||
|
interoperability with older kernels which only
|
||||||
|
store and expect 16-bit values.
|
||||||
|
|
||||||
|
resize Allows to resize filesystem to the end of the last
|
||||||
|
existing block group, further resize has to be done
|
||||||
|
with resize2fs either online, or offline. It can be
|
||||||
|
used only with conjunction with remount.
|
||||||
|
|
||||||
|
block_validity This options allows to enables/disables the in-kernel
|
||||||
|
noblock_validity facility for tracking filesystem metadata blocks
|
||||||
|
within internal data structures. This allows multi-
|
||||||
|
block allocator and other routines to quickly locate
|
||||||
|
extents which might overlap with filesystem metadata
|
||||||
|
blocks. This option is intended for debugging
|
||||||
|
purposes and since it negatively affects the
|
||||||
|
performance, it is off by default.
|
||||||
|
|
||||||
|
dioread_lock Controls whether or not ext4 should use the DIO read
|
||||||
|
dioread_nolock locking. If the dioread_nolock option is specified
|
||||||
|
ext4 will allocate uninitialized extent before buffer
|
||||||
|
write and convert the extent to initialized after IO
|
||||||
|
completes. This approach allows ext4 code to avoid
|
||||||
|
using inode mutex, which improves scalability on high
|
||||||
|
speed storages. However this does not work with nobh
|
||||||
|
option and the mount will fail. Nor does it work with
|
||||||
|
data journaling and dioread_nolock option will be
|
||||||
|
ignored with kernel warning. Note that dioread_nolock
|
||||||
|
code path is only used for extent-based files.
|
||||||
|
Because of the restrictions this options comprises
|
||||||
|
it is off by default (e.g. dioread_lock).
|
||||||
|
|
||||||
|
i_version Enable 64-bit inode version support. This option is
|
||||||
|
off by default.
|
||||||
|
|
||||||
Data Mode
|
Data Mode
|
||||||
=========
|
=========
|
||||||
There are 3 different data modes:
|
There are 3 different data modes:
|
||||||
|
@ -400,6 +435,176 @@ needs to be read from and written to disk at the same time where it
|
||||||
outperforms all others modes. Currently ext4 does not have delayed
|
outperforms all others modes. Currently ext4 does not have delayed
|
||||||
allocation support if this data journalling mode is selected.
|
allocation support if this data journalling mode is selected.
|
||||||
|
|
||||||
|
/proc entries
|
||||||
|
=============
|
||||||
|
|
||||||
|
Information about mounted ext4 file systems can be found in
|
||||||
|
/proc/fs/ext4. Each mounted filesystem will have a directory in
|
||||||
|
/proc/fs/ext4 based on its device name (i.e., /proc/fs/ext4/hdc or
|
||||||
|
/proc/fs/ext4/dm-0). The files in each per-device directory are shown
|
||||||
|
in table below.
|
||||||
|
|
||||||
|
Files in /proc/fs/ext4/<devname>
|
||||||
|
..............................................................................
|
||||||
|
File Content
|
||||||
|
mb_groups details of multiblock allocator buddy cache of free blocks
|
||||||
|
..............................................................................
|
||||||
|
|
||||||
|
/sys entries
|
||||||
|
============
|
||||||
|
|
||||||
|
Information about mounted ext4 file systems can be found in
|
||||||
|
/sys/fs/ext4. Each mounted filesystem will have a directory in
|
||||||
|
/sys/fs/ext4 based on its device name (i.e., /sys/fs/ext4/hdc or
|
||||||
|
/sys/fs/ext4/dm-0). The files in each per-device directory are shown
|
||||||
|
in table below.
|
||||||
|
|
||||||
|
Files in /sys/fs/ext4/<devname>
|
||||||
|
(see also Documentation/ABI/testing/sysfs-fs-ext4)
|
||||||
|
..............................................................................
|
||||||
|
File Content
|
||||||
|
|
||||||
|
delayed_allocation_blocks This file is read-only and shows the number of
|
||||||
|
blocks that are dirty in the page cache, but
|
||||||
|
which do not have their location in the
|
||||||
|
filesystem allocated yet.
|
||||||
|
|
||||||
|
inode_goal Tuning parameter which (if non-zero) controls
|
||||||
|
the goal inode used by the inode allocator in
|
||||||
|
preference to all other allocation heuristics.
|
||||||
|
This is intended for debugging use only, and
|
||||||
|
should be 0 on production systems.
|
||||||
|
|
||||||
|
inode_readahead_blks Tuning parameter which controls the maximum
|
||||||
|
number of inode table blocks that ext4's inode
|
||||||
|
table readahead algorithm will pre-read into
|
||||||
|
the buffer cache
|
||||||
|
|
||||||
|
lifetime_write_kbytes This file is read-only and shows the number of
|
||||||
|
kilobytes of data that have been written to this
|
||||||
|
filesystem since it was created.
|
||||||
|
|
||||||
|
max_writeback_mb_bump The maximum number of megabytes the writeback
|
||||||
|
code will try to write out before move on to
|
||||||
|
another inode.
|
||||||
|
|
||||||
|
mb_group_prealloc The multiblock allocator will round up allocation
|
||||||
|
requests to a multiple of this tuning parameter if
|
||||||
|
the stripe size is not set in the ext4 superblock
|
||||||
|
|
||||||
|
mb_max_to_scan The maximum number of extents the multiblock
|
||||||
|
allocator will search to find the best extent
|
||||||
|
|
||||||
|
mb_min_to_scan The minimum number of extents the multiblock
|
||||||
|
allocator will search to find the best extent
|
||||||
|
|
||||||
|
mb_order2_req Tuning parameter which controls the minimum size
|
||||||
|
for requests (as a power of 2) where the buddy
|
||||||
|
cache is used
|
||||||
|
|
||||||
|
mb_stats Controls whether the multiblock allocator should
|
||||||
|
collect statistics, which are shown during the
|
||||||
|
unmount. 1 means to collect statistics, 0 means
|
||||||
|
not to collect statistics
|
||||||
|
|
||||||
|
mb_stream_req Files which have fewer blocks than this tunable
|
||||||
|
parameter will have their blocks allocated out
|
||||||
|
of a block group specific preallocation pool, so
|
||||||
|
that small files are packed closely together.
|
||||||
|
Each large file will have its blocks allocated
|
||||||
|
out of its own unique preallocation pool.
|
||||||
|
|
||||||
|
session_write_kbytes This file is read-only and shows the number of
|
||||||
|
kilobytes of data that have been written to this
|
||||||
|
filesystem since it was mounted.
|
||||||
|
..............................................................................
|
||||||
|
|
||||||
|
Ioctls
|
||||||
|
======
|
||||||
|
|
||||||
|
There is some Ext4 specific functionality which can be accessed by applications
|
||||||
|
through the system call interfaces. The list of all Ext4 specific ioctls are
|
||||||
|
shown in the table below.
|
||||||
|
|
||||||
|
Table of Ext4 specific ioctls
|
||||||
|
..............................................................................
|
||||||
|
Ioctl Description
|
||||||
|
EXT4_IOC_GETFLAGS Get additional attributes associated with inode.
|
||||||
|
The ioctl argument is an integer bitfield, with
|
||||||
|
bit values described in ext4.h. This ioctl is an
|
||||||
|
alias for FS_IOC_GETFLAGS.
|
||||||
|
|
||||||
|
EXT4_IOC_SETFLAGS Set additional attributes associated with inode.
|
||||||
|
The ioctl argument is an integer bitfield, with
|
||||||
|
bit values described in ext4.h. This ioctl is an
|
||||||
|
alias for FS_IOC_SETFLAGS.
|
||||||
|
|
||||||
|
EXT4_IOC_GETVERSION
|
||||||
|
EXT4_IOC_GETVERSION_OLD
|
||||||
|
Get the inode i_generation number stored for
|
||||||
|
each inode. The i_generation number is normally
|
||||||
|
changed only when new inode is created and it is
|
||||||
|
particularly useful for network filesystems. The
|
||||||
|
'_OLD' version of this ioctl is an alias for
|
||||||
|
FS_IOC_GETVERSION.
|
||||||
|
|
||||||
|
EXT4_IOC_SETVERSION
|
||||||
|
EXT4_IOC_SETVERSION_OLD
|
||||||
|
Set the inode i_generation number stored for
|
||||||
|
each inode. The '_OLD' version of this ioctl
|
||||||
|
is an alias for FS_IOC_SETVERSION.
|
||||||
|
|
||||||
|
EXT4_IOC_GROUP_EXTEND This ioctl has the same purpose as the resize
|
||||||
|
mount option. It allows to resize filesystem
|
||||||
|
to the end of the last existing block group,
|
||||||
|
further resize has to be done with resize2fs,
|
||||||
|
either online, or offline. The argument points
|
||||||
|
to the unsigned logn number representing the
|
||||||
|
filesystem new block count.
|
||||||
|
|
||||||
|
EXT4_IOC_MOVE_EXT Move the block extents from orig_fd (the one
|
||||||
|
this ioctl is pointing to) to the donor_fd (the
|
||||||
|
one specified in move_extent structure passed
|
||||||
|
as an argument to this ioctl). Then, exchange
|
||||||
|
inode metadata between orig_fd and donor_fd.
|
||||||
|
This is especially useful for online
|
||||||
|
defragmentation, because the allocator has the
|
||||||
|
opportunity to allocate moved blocks better,
|
||||||
|
ideally into one contiguous extent.
|
||||||
|
|
||||||
|
EXT4_IOC_GROUP_ADD Add a new group descriptor to an existing or
|
||||||
|
new group descriptor block. The new group
|
||||||
|
descriptor is described by ext4_new_group_input
|
||||||
|
structure, which is passed as an argument to
|
||||||
|
this ioctl. This is especially useful in
|
||||||
|
conjunction with EXT4_IOC_GROUP_EXTEND,
|
||||||
|
which allows online resize of the filesystem
|
||||||
|
to the end of the last existing block group.
|
||||||
|
Those two ioctls combined is used in userspace
|
||||||
|
online resize tool (e.g. resize2fs).
|
||||||
|
|
||||||
|
EXT4_IOC_MIGRATE This ioctl operates on the filesystem itself.
|
||||||
|
It converts (migrates) ext3 indirect block mapped
|
||||||
|
inode to ext4 extent mapped inode by walking
|
||||||
|
through indirect block mapping of the original
|
||||||
|
inode and converting contiguous block ranges
|
||||||
|
into ext4 extents of the temporary inode. Then,
|
||||||
|
inodes are swapped. This ioctl might help, when
|
||||||
|
migrating from ext3 to ext4 filesystem, however
|
||||||
|
suggestion is to create fresh ext4 filesystem
|
||||||
|
and copy data from the backup. Note, that
|
||||||
|
filesystem has to support extents for this ioctl
|
||||||
|
to work.
|
||||||
|
|
||||||
|
EXT4_IOC_ALLOC_DA_BLKS Force all of the delay allocated blocks to be
|
||||||
|
allocated to preserve application-expected ext3
|
||||||
|
behaviour. Note that this will also start
|
||||||
|
triggering a write of the data blocks, but this
|
||||||
|
behaviour may change in the future as it is
|
||||||
|
not necessary and has been done this way only
|
||||||
|
for sake of simplicity.
|
||||||
|
..............................................................................
|
||||||
|
|
||||||
References
|
References
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
|
|
@ -298,11 +298,14 @@ be used instead. It gets called whenever the inode is evicted, whether it has
|
||||||
remaining links or not. Caller does *not* evict the pagecache or inode-associated
|
remaining links or not. Caller does *not* evict the pagecache or inode-associated
|
||||||
metadata buffers; getting rid of those is responsibility of method, as it had
|
metadata buffers; getting rid of those is responsibility of method, as it had
|
||||||
been for ->delete_inode().
|
been for ->delete_inode().
|
||||||
->drop_inode() returns int now; it's called on final iput() with inode_lock
|
|
||||||
held and it returns true if filesystems wants the inode to be dropped. As before,
|
->drop_inode() returns int now; it's called on final iput() with
|
||||||
generic_drop_inode() is still the default and it's been updated appropriately.
|
inode->i_lock held and it returns true if filesystems wants the inode to be
|
||||||
generic_delete_inode() is also alive and it consists simply of return 1. Note that
|
dropped. As before, generic_drop_inode() is still the default and it's been
|
||||||
all actual eviction work is done by caller after ->drop_inode() returns.
|
updated appropriately. generic_delete_inode() is also alive and it consists
|
||||||
|
simply of return 1. Note that all actual eviction work is done by caller after
|
||||||
|
->drop_inode() returns.
|
||||||
|
|
||||||
clear_inode() is gone; use end_writeback() instead. As before, it must
|
clear_inode() is gone; use end_writeback() instead. As before, it must
|
||||||
be called exactly once on each call of ->evict_inode() (as it used to be for
|
be called exactly once on each call of ->evict_inode() (as it used to be for
|
||||||
each call of ->delete_inode()). Unlike before, if you are using inode-associated
|
each call of ->delete_inode()). Unlike before, if you are using inode-associated
|
||||||
|
@ -395,6 +398,9 @@ Currently you can only have FALLOC_FL_PUNCH_HOLE with FALLOC_FL_KEEP_SIZE set,
|
||||||
so the i_size should not change when hole punching, even when puching the end of
|
so the i_size should not change when hole punching, even when puching the end of
|
||||||
a file off.
|
a file off.
|
||||||
|
|
||||||
|
--
|
||||||
|
[mandatory]
|
||||||
|
|
||||||
--
|
--
|
||||||
[mandatory]
|
[mandatory]
|
||||||
->get_sb() is gone. Switch to use of ->mount(). Typically it's just
|
->get_sb() is gone. Switch to use of ->mount(). Typically it's just
|
||||||
|
|
|
@ -254,7 +254,7 @@ or bottom half).
|
||||||
should be synchronous or not, not all filesystems check this flag.
|
should be synchronous or not, not all filesystems check this flag.
|
||||||
|
|
||||||
drop_inode: called when the last access to the inode is dropped,
|
drop_inode: called when the last access to the inode is dropped,
|
||||||
with the inode_lock spinlock held.
|
with the inode->i_lock spinlock held.
|
||||||
|
|
||||||
This method should be either NULL (normal UNIX filesystem
|
This method should be either NULL (normal UNIX filesystem
|
||||||
semantics) or "generic_delete_inode" (for filesystems that do not
|
semantics) or "generic_delete_inode" (for filesystems that do not
|
||||||
|
|
|
@ -2,6 +2,10 @@ Kernel driver f71882fg
|
||||||
======================
|
======================
|
||||||
|
|
||||||
Supported chips:
|
Supported chips:
|
||||||
|
* Fintek F71808E
|
||||||
|
Prefix: 'f71808e'
|
||||||
|
Addresses scanned: none, address read from Super I/O config space
|
||||||
|
Datasheet: Not public
|
||||||
* Fintek F71858FG
|
* Fintek F71858FG
|
||||||
Prefix: 'f71858fg'
|
Prefix: 'f71858fg'
|
||||||
Addresses scanned: none, address read from Super I/O config space
|
Addresses scanned: none, address read from Super I/O config space
|
||||||
|
@ -26,10 +30,25 @@ Supported chips:
|
||||||
Prefix: 'f71889ed'
|
Prefix: 'f71889ed'
|
||||||
Addresses scanned: none, address read from Super I/O config space
|
Addresses scanned: none, address read from Super I/O config space
|
||||||
Datasheet: Should become available on the Fintek website soon
|
Datasheet: Should become available on the Fintek website soon
|
||||||
|
* Fintek F71889A
|
||||||
|
Prefix: 'f71889a'
|
||||||
|
Addresses scanned: none, address read from Super I/O config space
|
||||||
|
Datasheet: Should become available on the Fintek website soon
|
||||||
* Fintek F8000
|
* Fintek F8000
|
||||||
Prefix: 'f8000'
|
Prefix: 'f8000'
|
||||||
Addresses scanned: none, address read from Super I/O config space
|
Addresses scanned: none, address read from Super I/O config space
|
||||||
Datasheet: Not public
|
Datasheet: Not public
|
||||||
|
* Fintek F81801U
|
||||||
|
Prefix: 'f71889fg'
|
||||||
|
Addresses scanned: none, address read from Super I/O config space
|
||||||
|
Datasheet: Not public
|
||||||
|
Note: This is the 64-pin variant of the F71889FG, they have the
|
||||||
|
same device ID and are fully compatible as far as hardware
|
||||||
|
monitoring is concerned.
|
||||||
|
* Fintek F81865F
|
||||||
|
Prefix: 'f81865f'
|
||||||
|
Addresses scanned: none, address read from Super I/O config space
|
||||||
|
Datasheet: Available from the Fintek website
|
||||||
|
|
||||||
Author: Hans de Goede <hdegoede@redhat.com>
|
Author: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ This is the (partial) list of the hooks:
|
||||||
It puts the scheduling entity (task) into the red-black tree and
|
It puts the scheduling entity (task) into the red-black tree and
|
||||||
increments the nr_running variable.
|
increments the nr_running variable.
|
||||||
|
|
||||||
- dequeue_tree(...)
|
- dequeue_task(...)
|
||||||
|
|
||||||
When a task is no longer runnable, this function is called to keep the
|
When a task is no longer runnable, this function is called to keep the
|
||||||
corresponding scheduling entity out of the red-black tree. It decrements
|
corresponding scheduling entity out of the red-black tree. It decrements
|
||||||
|
@ -195,11 +195,6 @@ This is the (partial) list of the hooks:
|
||||||
This function is mostly called from time tick functions; it might lead to
|
This function is mostly called from time tick functions; it might lead to
|
||||||
process switch. This drives the running preemption.
|
process switch. This drives the running preemption.
|
||||||
|
|
||||||
- task_new(...)
|
|
||||||
|
|
||||||
The core scheduler gives the scheduling module an opportunity to manage new
|
|
||||||
task startup. The CFS scheduling module uses it for group scheduling, while
|
|
||||||
the scheduling module for a real-time task does not use it.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -239,8 +239,8 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
|
||||||
buf += "#include <target/target_core_configfs.h>\n"
|
buf += "#include <target/target_core_configfs.h>\n"
|
||||||
buf += "#include <target/target_core_base.h>\n"
|
buf += "#include <target/target_core_base.h>\n"
|
||||||
buf += "#include <target/configfs_macros.h>\n\n"
|
buf += "#include <target/configfs_macros.h>\n\n"
|
||||||
buf += "#include <" + fabric_mod_name + "_base.h>\n"
|
buf += "#include \"" + fabric_mod_name + "_base.h\"\n"
|
||||||
buf += "#include <" + fabric_mod_name + "_fabric.h>\n\n"
|
buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n"
|
||||||
|
|
||||||
buf += "/* Local pointer to allocated TCM configfs fabric module */\n"
|
buf += "/* Local pointer to allocated TCM configfs fabric module */\n"
|
||||||
buf += "struct target_fabric_configfs *" + fabric_mod_name + "_fabric_configfs;\n\n"
|
buf += "struct target_fabric_configfs *" + fabric_mod_name + "_fabric_configfs;\n\n"
|
||||||
|
@ -289,6 +289,7 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
|
||||||
buf += "{\n"
|
buf += "{\n"
|
||||||
buf += " struct " + fabric_mod_name + "_nacl *nacl = container_of(se_acl,\n"
|
buf += " struct " + fabric_mod_name + "_nacl *nacl = container_of(se_acl,\n"
|
||||||
buf += " struct " + fabric_mod_name + "_nacl, se_node_acl);\n"
|
buf += " struct " + fabric_mod_name + "_nacl, se_node_acl);\n"
|
||||||
|
buf += " core_tpg_del_initiator_node_acl(se_acl->se_tpg, se_acl, 1);\n"
|
||||||
buf += " kfree(nacl);\n"
|
buf += " kfree(nacl);\n"
|
||||||
buf += "}\n\n"
|
buf += "}\n\n"
|
||||||
|
|
||||||
|
@ -583,9 +584,9 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
|
||||||
buf += "#include <target/target_core_fabric_lib.h>\n"
|
buf += "#include <target/target_core_fabric_lib.h>\n"
|
||||||
buf += "#include <target/target_core_device.h>\n"
|
buf += "#include <target/target_core_device.h>\n"
|
||||||
buf += "#include <target/target_core_tpg.h>\n"
|
buf += "#include <target/target_core_tpg.h>\n"
|
||||||
buf += "#include <target/target_core_configfs.h>\n"
|
buf += "#include <target/target_core_configfs.h>\n\n"
|
||||||
buf += "#include <" + fabric_mod_name + "_base.h>\n"
|
buf += "#include \"" + fabric_mod_name + "_base.h\"\n"
|
||||||
buf += "#include <" + fabric_mod_name + "_fabric.h>\n\n"
|
buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n"
|
||||||
|
|
||||||
buf += "int " + fabric_mod_name + "_check_true(struct se_portal_group *se_tpg)\n"
|
buf += "int " + fabric_mod_name + "_check_true(struct se_portal_group *se_tpg)\n"
|
||||||
buf += "{\n"
|
buf += "{\n"
|
||||||
|
@ -973,14 +974,13 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
|
||||||
def tcm_mod_build_kbuild(fabric_mod_dir_var, fabric_mod_name):
|
def tcm_mod_build_kbuild(fabric_mod_dir_var, fabric_mod_name):
|
||||||
|
|
||||||
buf = ""
|
buf = ""
|
||||||
f = fabric_mod_dir_var + "/Kbuild"
|
f = fabric_mod_dir_var + "/Makefile"
|
||||||
print "Writing file: " + f
|
print "Writing file: " + f
|
||||||
|
|
||||||
p = open(f, 'w')
|
p = open(f, 'w')
|
||||||
if not p:
|
if not p:
|
||||||
tcm_mod_err("Unable to open file: " + f)
|
tcm_mod_err("Unable to open file: " + f)
|
||||||
|
|
||||||
buf = "EXTRA_CFLAGS += -I$(srctree)/drivers/target/ -I$(srctree)/include/ -I$(srctree)/drivers/scsi/ -I$(srctree)/include/scsi/ -I$(srctree)/drivers/target/" + fabric_mod_name + "\n\n"
|
|
||||||
buf += fabric_mod_name + "-objs := " + fabric_mod_name + "_fabric.o \\\n"
|
buf += fabric_mod_name + "-objs := " + fabric_mod_name + "_fabric.o \\\n"
|
||||||
buf += " " + fabric_mod_name + "_configfs.o\n"
|
buf += " " + fabric_mod_name + "_configfs.o\n"
|
||||||
buf += "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name + ".o\n"
|
buf += "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name + ".o\n"
|
||||||
|
@ -1018,7 +1018,7 @@ def tcm_mod_build_kconfig(fabric_mod_dir_var, fabric_mod_name):
|
||||||
|
|
||||||
def tcm_mod_add_kbuild(tcm_dir, fabric_mod_name):
|
def tcm_mod_add_kbuild(tcm_dir, fabric_mod_name):
|
||||||
buf = "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name.lower() + "/\n"
|
buf = "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name.lower() + "/\n"
|
||||||
kbuild = tcm_dir + "/drivers/target/Kbuild"
|
kbuild = tcm_dir + "/drivers/target/Makefile"
|
||||||
|
|
||||||
f = open(kbuild, 'a')
|
f = open(kbuild, 'a')
|
||||||
f.write(buf)
|
f.write(buf)
|
||||||
|
@ -1064,7 +1064,7 @@ def main(modname, proto_ident):
|
||||||
tcm_mod_build_kbuild(fabric_mod_dir, fabric_mod_name)
|
tcm_mod_build_kbuild(fabric_mod_dir, fabric_mod_name)
|
||||||
tcm_mod_build_kconfig(fabric_mod_dir, fabric_mod_name)
|
tcm_mod_build_kconfig(fabric_mod_dir, fabric_mod_name)
|
||||||
|
|
||||||
input = raw_input("Would you like to add " + fabric_mod_name + "to drivers/target/Kbuild..? [yes,no]: ")
|
input = raw_input("Would you like to add " + fabric_mod_name + "to drivers/target/Makefile..? [yes,no]: ")
|
||||||
if input == "yes" or input == "y":
|
if input == "yes" or input == "y":
|
||||||
tcm_mod_add_kbuild(tcm_dir, fabric_mod_name)
|
tcm_mod_add_kbuild(tcm_dir, fabric_mod_name)
|
||||||
|
|
||||||
|
|
10
MAINTAINERS
10
MAINTAINERS
|
@ -548,10 +548,8 @@ S: Maintained
|
||||||
F: sound/aoa/
|
F: sound/aoa/
|
||||||
|
|
||||||
APM DRIVER
|
APM DRIVER
|
||||||
M: Stephen Rothwell <sfr@canb.auug.org.au>
|
|
||||||
L: linux-laptop@vger.kernel.org
|
L: linux-laptop@vger.kernel.org
|
||||||
W: http://www.canb.auug.org.au/~sfr/
|
S: Orphan
|
||||||
S: Supported
|
|
||||||
F: arch/x86/kernel/apm_32.c
|
F: arch/x86/kernel/apm_32.c
|
||||||
F: include/linux/apm_bios.h
|
F: include/linux/apm_bios.h
|
||||||
|
|
||||||
|
@ -5291,6 +5289,11 @@ S: Maintained
|
||||||
F: drivers/mtd/nand/r852.c
|
F: drivers/mtd/nand/r852.c
|
||||||
F: drivers/mtd/nand/r852.h
|
F: drivers/mtd/nand/r852.h
|
||||||
|
|
||||||
|
RICOH R5C592 MEMORYSTICK DRIVER
|
||||||
|
M: Maxim Levitsky <maximlevitsky@gmail.com>
|
||||||
|
S: Maintained
|
||||||
|
F: drivers/memstick/host/r592.*
|
||||||
|
|
||||||
RISCOM8 DRIVER
|
RISCOM8 DRIVER
|
||||||
S: Orphan
|
S: Orphan
|
||||||
F: Documentation/serial/riscom8.txt
|
F: Documentation/serial/riscom8.txt
|
||||||
|
@ -6628,6 +6631,7 @@ F: drivers/media/video/zr364xx.c
|
||||||
|
|
||||||
USER-MODE LINUX (UML)
|
USER-MODE LINUX (UML)
|
||||||
M: Jeff Dike <jdike@addtoit.com>
|
M: Jeff Dike <jdike@addtoit.com>
|
||||||
|
M: Richard Weinberger <richard@nod.at>
|
||||||
L: user-mode-linux-devel@lists.sourceforge.net
|
L: user-mode-linux-devel@lists.sourceforge.net
|
||||||
L: user-mode-linux-user@lists.sourceforge.net
|
L: user-mode-linux-user@lists.sourceforge.net
|
||||||
W: http://user-mode-linux.sourceforge.net
|
W: http://user-mode-linux.sourceforge.net
|
||||||
|
|
|
@ -360,52 +360,14 @@ static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
|
||||||
gpio = ep93xx_chip->chip.base;
|
gpio = ep93xx_chip->chip.base;
|
||||||
for (i = 0; i < chip->ngpio; i++, gpio++) {
|
for (i = 0; i < chip->ngpio; i++, gpio++) {
|
||||||
int is_out = data_dir_reg & (1 << i);
|
int is_out = data_dir_reg & (1 << i);
|
||||||
|
int irq = gpio_to_irq(gpio);
|
||||||
|
|
||||||
seq_printf(s, " %s%d gpio-%-3d (%-12s) %s %s",
|
seq_printf(s, " %s%d gpio-%-3d (%-12s) %s %s %s\n",
|
||||||
chip->label, i, gpio,
|
chip->label, i, gpio,
|
||||||
gpiochip_is_requested(chip, i) ? : "",
|
gpiochip_is_requested(chip, i) ? : "",
|
||||||
is_out ? "out" : "in ",
|
is_out ? "out" : "in ",
|
||||||
(data_reg & (1 << i)) ? "hi" : "lo");
|
(data_reg & (1<< i)) ? "hi" : "lo",
|
||||||
|
(!is_out && irq>= 0) ? "(interrupt)" : "");
|
||||||
if (!is_out) {
|
|
||||||
int irq = gpio_to_irq(gpio);
|
|
||||||
struct irq_desc *desc = irq_desc + irq;
|
|
||||||
|
|
||||||
if (irq >= 0 && desc->action) {
|
|
||||||
char *trigger;
|
|
||||||
|
|
||||||
switch (desc->status & IRQ_TYPE_SENSE_MASK) {
|
|
||||||
case IRQ_TYPE_NONE:
|
|
||||||
trigger = "(default)";
|
|
||||||
break;
|
|
||||||
case IRQ_TYPE_EDGE_FALLING:
|
|
||||||
trigger = "edge-falling";
|
|
||||||
break;
|
|
||||||
case IRQ_TYPE_EDGE_RISING:
|
|
||||||
trigger = "edge-rising";
|
|
||||||
break;
|
|
||||||
case IRQ_TYPE_EDGE_BOTH:
|
|
||||||
trigger = "edge-both";
|
|
||||||
break;
|
|
||||||
case IRQ_TYPE_LEVEL_HIGH:
|
|
||||||
trigger = "level-high";
|
|
||||||
break;
|
|
||||||
case IRQ_TYPE_LEVEL_LOW:
|
|
||||||
trigger = "level-low";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
trigger = "?trigger?";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
seq_printf(s, " irq-%d %s%s",
|
|
||||||
irq, trigger,
|
|
||||||
(desc->status & IRQ_WAKEUP)
|
|
||||||
? " wakeup" : "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
seq_printf(s, "\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -285,19 +285,6 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct regulator_init_data omap4_panda_vaux1 = {
|
|
||||||
.constraints = {
|
|
||||||
.min_uV = 1000000,
|
|
||||||
.max_uV = 3000000,
|
|
||||||
.apply_uV = true,
|
|
||||||
.valid_modes_mask = REGULATOR_MODE_NORMAL
|
|
||||||
| REGULATOR_MODE_STANDBY,
|
|
||||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
|
||||||
| REGULATOR_CHANGE_MODE
|
|
||||||
| REGULATOR_CHANGE_STATUS,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct regulator_init_data omap4_panda_vaux2 = {
|
static struct regulator_init_data omap4_panda_vaux2 = {
|
||||||
.constraints = {
|
.constraints = {
|
||||||
.min_uV = 1200000,
|
.min_uV = 1200000,
|
||||||
|
@ -353,19 +340,6 @@ static struct regulator_init_data omap4_panda_vpp = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct regulator_init_data omap4_panda_vusim = {
|
|
||||||
.constraints = {
|
|
||||||
.min_uV = 1200000,
|
|
||||||
.max_uV = 2900000,
|
|
||||||
.apply_uV = true,
|
|
||||||
.valid_modes_mask = REGULATOR_MODE_NORMAL
|
|
||||||
| REGULATOR_MODE_STANDBY,
|
|
||||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
|
||||||
| REGULATOR_CHANGE_MODE
|
|
||||||
| REGULATOR_CHANGE_STATUS,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct regulator_init_data omap4_panda_vana = {
|
static struct regulator_init_data omap4_panda_vana = {
|
||||||
.constraints = {
|
.constraints = {
|
||||||
.min_uV = 2100000,
|
.min_uV = 2100000,
|
||||||
|
@ -424,12 +398,10 @@ static struct twl4030_platform_data omap4_panda_twldata = {
|
||||||
/* Regulators */
|
/* Regulators */
|
||||||
.vmmc = &omap4_panda_vmmc,
|
.vmmc = &omap4_panda_vmmc,
|
||||||
.vpp = &omap4_panda_vpp,
|
.vpp = &omap4_panda_vpp,
|
||||||
.vusim = &omap4_panda_vusim,
|
|
||||||
.vana = &omap4_panda_vana,
|
.vana = &omap4_panda_vana,
|
||||||
.vcxio = &omap4_panda_vcxio,
|
.vcxio = &omap4_panda_vcxio,
|
||||||
.vdac = &omap4_panda_vdac,
|
.vdac = &omap4_panda_vdac,
|
||||||
.vusb = &omap4_panda_vusb,
|
.vusb = &omap4_panda_vusb,
|
||||||
.vaux1 = &omap4_panda_vaux1,
|
|
||||||
.vaux2 = &omap4_panda_vaux2,
|
.vaux2 = &omap4_panda_vaux2,
|
||||||
.vaux3 = &omap4_panda_vaux3,
|
.vaux3 = &omap4_panda_vaux3,
|
||||||
.clk32kg = &omap4_panda_clk32kg,
|
.clk32kg = &omap4_panda_clk32kg,
|
||||||
|
|
|
@ -66,7 +66,7 @@ static int __init omap3_l3_init(void)
|
||||||
|
|
||||||
WARN(IS_ERR(od), "could not build omap_device for %s\n", oh_name);
|
WARN(IS_ERR(od), "could not build omap_device for %s\n", oh_name);
|
||||||
|
|
||||||
return PTR_ERR(od);
|
return IS_ERR(od) ? PTR_ERR(od) : 0;
|
||||||
}
|
}
|
||||||
postcore_initcall(omap3_l3_init);
|
postcore_initcall(omap3_l3_init);
|
||||||
|
|
||||||
|
|
|
@ -693,6 +693,7 @@ static int __init gpmc_init(void)
|
||||||
{
|
{
|
||||||
u32 l, irq;
|
u32 l, irq;
|
||||||
int cs, ret = -EINVAL;
|
int cs, ret = -EINVAL;
|
||||||
|
int gpmc_irq;
|
||||||
char *ck = NULL;
|
char *ck = NULL;
|
||||||
|
|
||||||
if (cpu_is_omap24xx()) {
|
if (cpu_is_omap24xx()) {
|
||||||
|
@ -701,12 +702,15 @@ static int __init gpmc_init(void)
|
||||||
l = OMAP2420_GPMC_BASE;
|
l = OMAP2420_GPMC_BASE;
|
||||||
else
|
else
|
||||||
l = OMAP34XX_GPMC_BASE;
|
l = OMAP34XX_GPMC_BASE;
|
||||||
|
gpmc_irq = INT_34XX_GPMC_IRQ;
|
||||||
} else if (cpu_is_omap34xx()) {
|
} else if (cpu_is_omap34xx()) {
|
||||||
ck = "gpmc_fck";
|
ck = "gpmc_fck";
|
||||||
l = OMAP34XX_GPMC_BASE;
|
l = OMAP34XX_GPMC_BASE;
|
||||||
|
gpmc_irq = INT_34XX_GPMC_IRQ;
|
||||||
} else if (cpu_is_omap44xx()) {
|
} else if (cpu_is_omap44xx()) {
|
||||||
ck = "gpmc_ck";
|
ck = "gpmc_ck";
|
||||||
l = OMAP44XX_GPMC_BASE;
|
l = OMAP44XX_GPMC_BASE;
|
||||||
|
gpmc_irq = OMAP44XX_IRQ_GPMC;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WARN_ON(!ck))
|
if (WARN_ON(!ck))
|
||||||
|
@ -739,16 +743,17 @@ static int __init gpmc_init(void)
|
||||||
/* initalize the irq_chained */
|
/* initalize the irq_chained */
|
||||||
irq = OMAP_GPMC_IRQ_BASE;
|
irq = OMAP_GPMC_IRQ_BASE;
|
||||||
for (cs = 0; cs < GPMC_CS_NUM; cs++) {
|
for (cs = 0; cs < GPMC_CS_NUM; cs++) {
|
||||||
set_irq_handler(irq, handle_simple_irq);
|
set_irq_chip_and_handler(irq, &dummy_irq_chip,
|
||||||
|
handle_simple_irq);
|
||||||
set_irq_flags(irq, IRQF_VALID);
|
set_irq_flags(irq, IRQF_VALID);
|
||||||
irq++;
|
irq++;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = request_irq(INT_34XX_GPMC_IRQ,
|
ret = request_irq(gpmc_irq,
|
||||||
gpmc_handle_irq, IRQF_SHARED, "gpmc", gpmc_base);
|
gpmc_handle_irq, IRQF_SHARED, "gpmc", gpmc_base);
|
||||||
if (ret)
|
if (ret)
|
||||||
pr_err("gpmc: irq-%d could not claim: err %d\n",
|
pr_err("gpmc: irq-%d could not claim: err %d\n",
|
||||||
INT_34XX_GPMC_IRQ, ret);
|
gpmc_irq, ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
postcore_initcall(gpmc_init);
|
postcore_initcall(gpmc_init);
|
||||||
|
@ -757,8 +762,6 @@ static irqreturn_t gpmc_handle_irq(int irq, void *dev)
|
||||||
{
|
{
|
||||||
u8 cs;
|
u8 cs;
|
||||||
|
|
||||||
if (irq != INT_34XX_GPMC_IRQ)
|
|
||||||
return IRQ_HANDLED;
|
|
||||||
/* check cs to invoke the irq */
|
/* check cs to invoke the irq */
|
||||||
cs = ((gpmc_read_reg(GPMC_PREFETCH_CONFIG1)) >> CS_NUM_SHIFT) & 0x7;
|
cs = ((gpmc_read_reg(GPMC_PREFETCH_CONFIG1)) >> CS_NUM_SHIFT) & 0x7;
|
||||||
if (OMAP_GPMC_IRQ_BASE+cs <= OMAP_GPMC_IRQ_END)
|
if (OMAP_GPMC_IRQ_BASE+cs <= OMAP_GPMC_IRQ_END)
|
||||||
|
|
|
@ -226,7 +226,6 @@ static int __init omap3_l3_probe(struct platform_device *pdev)
|
||||||
struct omap3_l3 *l3;
|
struct omap3_l3 *l3;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
int ret;
|
int ret;
|
||||||
int irq;
|
|
||||||
|
|
||||||
l3 = kzalloc(sizeof(*l3), GFP_KERNEL);
|
l3 = kzalloc(sizeof(*l3), GFP_KERNEL);
|
||||||
if (!l3) {
|
if (!l3) {
|
||||||
|
@ -249,18 +248,17 @@ static int __init omap3_l3_probe(struct platform_device *pdev)
|
||||||
goto err2;
|
goto err2;
|
||||||
}
|
}
|
||||||
|
|
||||||
irq = platform_get_irq(pdev, 0);
|
l3->debug_irq = platform_get_irq(pdev, 0);
|
||||||
ret = request_irq(irq, omap3_l3_app_irq,
|
ret = request_irq(l3->debug_irq, omap3_l3_app_irq,
|
||||||
IRQF_DISABLED | IRQF_TRIGGER_RISING,
|
IRQF_DISABLED | IRQF_TRIGGER_RISING,
|
||||||
"l3-debug-irq", l3);
|
"l3-debug-irq", l3);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "couldn't request debug irq\n");
|
dev_err(&pdev->dev, "couldn't request debug irq\n");
|
||||||
goto err3;
|
goto err3;
|
||||||
}
|
}
|
||||||
l3->debug_irq = irq;
|
|
||||||
|
|
||||||
irq = platform_get_irq(pdev, 1);
|
l3->app_irq = platform_get_irq(pdev, 1);
|
||||||
ret = request_irq(irq, omap3_l3_app_irq,
|
ret = request_irq(l3->app_irq, omap3_l3_app_irq,
|
||||||
IRQF_DISABLED | IRQF_TRIGGER_RISING,
|
IRQF_DISABLED | IRQF_TRIGGER_RISING,
|
||||||
"l3-app-irq", l3);
|
"l3-app-irq", l3);
|
||||||
|
|
||||||
|
@ -269,7 +267,6 @@ static int __init omap3_l3_probe(struct platform_device *pdev)
|
||||||
goto err4;
|
goto err4;
|
||||||
}
|
}
|
||||||
|
|
||||||
l3->app_irq = irq;
|
|
||||||
goto err0;
|
goto err0;
|
||||||
|
|
||||||
err4:
|
err4:
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
#include <linux/regulator/machine.h>
|
#include <linux/regulator/machine.h>
|
||||||
#include <linux/regulator/ab8500.h>
|
#include <linux/regulator/ab8500.h>
|
||||||
|
|
||||||
|
extern struct ab8500_regulator_reg_init
|
||||||
|
ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS];
|
||||||
extern struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS];
|
extern struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS];
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include <linux/amba/serial.h>
|
#include <linux/amba/serial.h>
|
||||||
#include <linux/spi/spi.h>
|
#include <linux/spi/spi.h>
|
||||||
#include <linux/mfd/ab8500.h>
|
#include <linux/mfd/ab8500.h>
|
||||||
|
#include <linux/regulator/ab8500.h>
|
||||||
#include <linux/mfd/tc3589x.h>
|
#include <linux/mfd/tc3589x.h>
|
||||||
#include <linux/leds-lp5521.h>
|
#include <linux/leds-lp5521.h>
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
|
|
|
@ -78,7 +78,7 @@ __tagtable(ATAG_INITRD2, parse_tag_initrd2);
|
||||||
*/
|
*/
|
||||||
struct meminfo meminfo;
|
struct meminfo meminfo;
|
||||||
|
|
||||||
void show_mem(void)
|
void show_mem(unsigned int filter)
|
||||||
{
|
{
|
||||||
int free = 0, total = 0, reserved = 0;
|
int free = 0, total = 0, reserved = 0;
|
||||||
int shared = 0, cached = 0, slab = 0, i;
|
int shared = 0, cached = 0, slab = 0, i;
|
||||||
|
|
|
@ -832,51 +832,6 @@ static void nmk_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
|
||||||
: "? ",
|
: "? ",
|
||||||
(mode < 0) ? "unknown" : modes[mode],
|
(mode < 0) ? "unknown" : modes[mode],
|
||||||
pull ? "pull" : "none");
|
pull ? "pull" : "none");
|
||||||
|
|
||||||
if (!is_out) {
|
|
||||||
int irq = gpio_to_irq(gpio);
|
|
||||||
struct irq_desc *desc = irq_to_desc(irq);
|
|
||||||
|
|
||||||
/* This races with request_irq(), set_irq_type(),
|
|
||||||
* and set_irq_wake() ... but those are "rare".
|
|
||||||
*
|
|
||||||
* More significantly, trigger type flags aren't
|
|
||||||
* currently maintained by genirq.
|
|
||||||
*/
|
|
||||||
if (irq >= 0 && desc->action) {
|
|
||||||
char *trigger;
|
|
||||||
|
|
||||||
switch (desc->status & IRQ_TYPE_SENSE_MASK) {
|
|
||||||
case IRQ_TYPE_NONE:
|
|
||||||
trigger = "(default)";
|
|
||||||
break;
|
|
||||||
case IRQ_TYPE_EDGE_FALLING:
|
|
||||||
trigger = "edge-falling";
|
|
||||||
break;
|
|
||||||
case IRQ_TYPE_EDGE_RISING:
|
|
||||||
trigger = "edge-rising";
|
|
||||||
break;
|
|
||||||
case IRQ_TYPE_EDGE_BOTH:
|
|
||||||
trigger = "edge-both";
|
|
||||||
break;
|
|
||||||
case IRQ_TYPE_LEVEL_HIGH:
|
|
||||||
trigger = "level-high";
|
|
||||||
break;
|
|
||||||
case IRQ_TYPE_LEVEL_LOW:
|
|
||||||
trigger = "level-low";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
trigger = "?trigger?";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
seq_printf(s, " irq-%d %s%s",
|
|
||||||
irq, trigger,
|
|
||||||
(desc->status & IRQ_WAKEUP)
|
|
||||||
? " wakeup" : "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
seq_printf(s, "\n");
|
seq_printf(s, "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -416,7 +416,7 @@
|
||||||
|
|
||||||
/* GPMC related */
|
/* GPMC related */
|
||||||
#define OMAP_GPMC_IRQ_BASE (TWL_IRQ_END)
|
#define OMAP_GPMC_IRQ_BASE (TWL_IRQ_END)
|
||||||
#define OMAP_GPMC_NR_IRQS 7
|
#define OMAP_GPMC_NR_IRQS 8
|
||||||
#define OMAP_GPMC_IRQ_END (OMAP_GPMC_IRQ_BASE + OMAP_GPMC_NR_IRQS)
|
#define OMAP_GPMC_IRQ_END (OMAP_GPMC_IRQ_BASE + OMAP_GPMC_NR_IRQS)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ struct omap_onenand_platform_data {
|
||||||
int dma_channel;
|
int dma_channel;
|
||||||
u8 flags;
|
u8 flags;
|
||||||
u8 regulator_can_sleep;
|
u8 regulator_can_sleep;
|
||||||
|
u8 skip_initial_unlocking;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ONENAND_MAX_PARTITIONS 8
|
#define ONENAND_MAX_PARTITIONS 8
|
||||||
|
|
|
@ -30,6 +30,7 @@ struct pxa3xx_nand_cmdset {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct pxa3xx_nand_flash {
|
struct pxa3xx_nand_flash {
|
||||||
|
char *name;
|
||||||
uint32_t chip_id;
|
uint32_t chip_id;
|
||||||
unsigned int page_per_block; /* Pages per block (PG_PER_BLK) */
|
unsigned int page_per_block; /* Pages per block (PG_PER_BLK) */
|
||||||
unsigned int page_size; /* Page size in bytes (PAGE_SZ) */
|
unsigned int page_size; /* Page size in bytes (PAGE_SZ) */
|
||||||
|
@ -37,7 +38,6 @@ struct pxa3xx_nand_flash {
|
||||||
unsigned int dfc_width; /* Width of flash controller(DWIDTH_C) */
|
unsigned int dfc_width; /* Width of flash controller(DWIDTH_C) */
|
||||||
unsigned int num_blocks; /* Number of physical blocks in Flash */
|
unsigned int num_blocks; /* Number of physical blocks in Flash */
|
||||||
|
|
||||||
struct pxa3xx_nand_cmdset *cmdset; /* NAND command set */
|
|
||||||
struct pxa3xx_nand_timing *timing; /* NAND Flash timing */
|
struct pxa3xx_nand_timing *timing; /* NAND Flash timing */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,11 @@ config AVR32
|
||||||
select HAVE_CLK
|
select HAVE_CLK
|
||||||
select HAVE_OPROFILE
|
select HAVE_OPROFILE
|
||||||
select HAVE_KPROBES
|
select HAVE_KPROBES
|
||||||
|
select HAVE_GENERIC_HARDIRQS
|
||||||
|
select GENERIC_IRQ_PROBE
|
||||||
|
select HARDIRQS_SW_RESEND
|
||||||
|
select GENERIC_IRQ_SHOW
|
||||||
|
select GENERIC_HARDIRQS_NO_DEPRECATED
|
||||||
help
|
help
|
||||||
AVR32 is a high-performance 32-bit RISC microprocessor core,
|
AVR32 is a high-performance 32-bit RISC microprocessor core,
|
||||||
designed for cost-sensitive embedded applications, with particular
|
designed for cost-sensitive embedded applications, with particular
|
||||||
|
@ -17,9 +22,6 @@ config AVR32
|
||||||
config GENERIC_GPIO
|
config GENERIC_GPIO
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
config GENERIC_HARDIRQS
|
|
||||||
def_bool y
|
|
||||||
|
|
||||||
config STACKTRACE_SUPPORT
|
config STACKTRACE_SUPPORT
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
|
@ -29,12 +31,6 @@ config LOCKDEP_SUPPORT
|
||||||
config TRACE_IRQFLAGS_SUPPORT
|
config TRACE_IRQFLAGS_SUPPORT
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
config HARDIRQS_SW_RESEND
|
|
||||||
def_bool y
|
|
||||||
|
|
||||||
config GENERIC_IRQ_PROBE
|
|
||||||
def_bool y
|
|
||||||
|
|
||||||
config RWSEM_GENERIC_SPINLOCK
|
config RWSEM_GENERIC_SPINLOCK
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
|
|
|
@ -301,7 +301,7 @@ static int __init mrmt1_init(void)
|
||||||
/* Select the Touchscreen interrupt pin mode */
|
/* Select the Touchscreen interrupt pin mode */
|
||||||
at32_select_periph( GPIO_PIOB_BASE, 1 << (PB_EXTINT_BASE+TS_IRQ),
|
at32_select_periph( GPIO_PIOB_BASE, 1 << (PB_EXTINT_BASE+TS_IRQ),
|
||||||
GPIO_PERIPH_A, AT32_GPIOF_DEGLITCH);
|
GPIO_PERIPH_A, AT32_GPIOF_DEGLITCH);
|
||||||
set_irq_type( AT32_EXTINT(TS_IRQ), IRQ_TYPE_EDGE_FALLING );
|
irq_set_irq_type(AT32_EXTINT(TS_IRQ), IRQ_TYPE_EDGE_FALLING);
|
||||||
at32_spi_setup_slaves(0,spi01_board_info,ARRAY_SIZE(spi01_board_info));
|
at32_spi_setup_slaves(0,spi01_board_info,ARRAY_SIZE(spi01_board_info));
|
||||||
spi_register_board_info(spi01_board_info,ARRAY_SIZE(spi01_board_info));
|
spi_register_board_info(spi01_board_info,ARRAY_SIZE(spi01_board_info));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -322,6 +322,6 @@ static int __init atngw100_arch_init(void)
|
||||||
/* set_irq_type() after the arch_initcall for EIC has run, and
|
/* set_irq_type() after the arch_initcall for EIC has run, and
|
||||||
* before the I2C subsystem could try using this IRQ.
|
* before the I2C subsystem could try using this IRQ.
|
||||||
*/
|
*/
|
||||||
return set_irq_type(AT32_EXTINT(3), IRQ_TYPE_EDGE_FALLING);
|
return irq_set_irq_type(AT32_EXTINT(3), IRQ_TYPE_EDGE_FALLING);
|
||||||
}
|
}
|
||||||
arch_initcall(atngw100_arch_init);
|
arch_initcall(atngw100_arch_init);
|
||||||
|
|
|
@ -26,40 +26,3 @@ void __weak nmi_disable(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PROC_FS
|
|
||||||
int show_interrupts(struct seq_file *p, void *v)
|
|
||||||
{
|
|
||||||
int i = *(loff_t *)v, cpu;
|
|
||||||
struct irqaction *action;
|
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
if (i == 0) {
|
|
||||||
seq_puts(p, " ");
|
|
||||||
for_each_online_cpu(cpu)
|
|
||||||
seq_printf(p, "CPU%d ", cpu);
|
|
||||||
seq_putc(p, '\n');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i < NR_IRQS) {
|
|
||||||
raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
|
|
||||||
action = irq_desc[i].action;
|
|
||||||
if (!action)
|
|
||||||
goto unlock;
|
|
||||||
|
|
||||||
seq_printf(p, "%3d: ", i);
|
|
||||||
for_each_online_cpu(cpu)
|
|
||||||
seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu));
|
|
||||||
seq_printf(p, " %8s", irq_desc[i].chip->name ? : "-");
|
|
||||||
seq_printf(p, " %s", action->name);
|
|
||||||
for (action = action->next; action; action = action->next)
|
|
||||||
seq_printf(p, ", %s", action->name);
|
|
||||||
|
|
||||||
seq_putc(p, '\n');
|
|
||||||
unlock:
|
|
||||||
raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -61,45 +61,42 @@ struct eic {
|
||||||
static struct eic *nmi_eic;
|
static struct eic *nmi_eic;
|
||||||
static bool nmi_enabled;
|
static bool nmi_enabled;
|
||||||
|
|
||||||
static void eic_ack_irq(unsigned int irq)
|
static void eic_ack_irq(struct irq_chip *d)
|
||||||
{
|
{
|
||||||
struct eic *eic = get_irq_chip_data(irq);
|
struct eic *eic = irq_data_get_irq_chip_data(data);
|
||||||
eic_writel(eic, ICR, 1 << (irq - eic->first_irq));
|
eic_writel(eic, ICR, 1 << (d->irq - eic->first_irq));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void eic_mask_irq(unsigned int irq)
|
static void eic_mask_irq(struct irq_chip *d)
|
||||||
{
|
{
|
||||||
struct eic *eic = get_irq_chip_data(irq);
|
struct eic *eic = irq_data_get_irq_chip_data(data);
|
||||||
eic_writel(eic, IDR, 1 << (irq - eic->first_irq));
|
eic_writel(eic, IDR, 1 << (d->irq - eic->first_irq));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void eic_mask_ack_irq(unsigned int irq)
|
static void eic_mask_ack_irq(struct irq_chip *d)
|
||||||
{
|
{
|
||||||
struct eic *eic = get_irq_chip_data(irq);
|
struct eic *eic = irq_data_get_irq_chip_data(data);
|
||||||
eic_writel(eic, ICR, 1 << (irq - eic->first_irq));
|
eic_writel(eic, ICR, 1 << (d->irq - eic->first_irq));
|
||||||
eic_writel(eic, IDR, 1 << (irq - eic->first_irq));
|
eic_writel(eic, IDR, 1 << (d->irq - eic->first_irq));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void eic_unmask_irq(unsigned int irq)
|
static void eic_unmask_irq(struct irq_chip *d)
|
||||||
{
|
{
|
||||||
struct eic *eic = get_irq_chip_data(irq);
|
struct eic *eic = irq_data_get_irq_chip_data(data);
|
||||||
eic_writel(eic, IER, 1 << (irq - eic->first_irq));
|
eic_writel(eic, IER, 1 << (d->irq - eic->first_irq));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int eic_set_irq_type(unsigned int irq, unsigned int flow_type)
|
static int eic_set_irq_type(struct irq_chip *d, unsigned int flow_type)
|
||||||
{
|
{
|
||||||
struct eic *eic = get_irq_chip_data(irq);
|
struct eic *eic = irq_data_get_irq_chip_data(data);
|
||||||
struct irq_desc *desc;
|
unsigned int irq = d->irq;
|
||||||
unsigned int i = irq - eic->first_irq;
|
unsigned int i = irq - eic->first_irq;
|
||||||
u32 mode, edge, level;
|
u32 mode, edge, level;
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
flow_type &= IRQ_TYPE_SENSE_MASK;
|
flow_type &= IRQ_TYPE_SENSE_MASK;
|
||||||
if (flow_type == IRQ_TYPE_NONE)
|
if (flow_type == IRQ_TYPE_NONE)
|
||||||
flow_type = IRQ_TYPE_LEVEL_LOW;
|
flow_type = IRQ_TYPE_LEVEL_LOW;
|
||||||
|
|
||||||
desc = &irq_desc[irq];
|
|
||||||
|
|
||||||
mode = eic_readl(eic, MODE);
|
mode = eic_readl(eic, MODE);
|
||||||
edge = eic_readl(eic, EDGE);
|
edge = eic_readl(eic, EDGE);
|
||||||
level = eic_readl(eic, LEVEL);
|
level = eic_readl(eic, LEVEL);
|
||||||
|
@ -122,39 +119,34 @@ static int eic_set_irq_type(unsigned int irq, unsigned int flow_type)
|
||||||
edge &= ~(1 << i);
|
edge &= ~(1 << i);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ret = -EINVAL;
|
return -EINVAL;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret == 0) {
|
eic_writel(eic, MODE, mode);
|
||||||
eic_writel(eic, MODE, mode);
|
eic_writel(eic, EDGE, edge);
|
||||||
eic_writel(eic, EDGE, edge);
|
eic_writel(eic, LEVEL, level);
|
||||||
eic_writel(eic, LEVEL, level);
|
|
||||||
|
|
||||||
if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) {
|
irqd_set_trigger_type(d, flow_type);
|
||||||
flow_type |= IRQ_LEVEL;
|
if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
|
||||||
__set_irq_handler_unlocked(irq, handle_level_irq);
|
__irq_set_handler_locked(irq, handle_level_irq);
|
||||||
} else
|
else
|
||||||
__set_irq_handler_unlocked(irq, handle_edge_irq);
|
__irq_set_handler_locked(irq, handle_edge_irq);
|
||||||
desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
|
|
||||||
desc->status |= flow_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return IRQ_SET_MASK_OK_NOCOPY;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_chip eic_chip = {
|
static struct irq_chip eic_chip = {
|
||||||
.name = "eic",
|
.name = "eic",
|
||||||
.ack = eic_ack_irq,
|
.irq_ack = eic_ack_irq,
|
||||||
.mask = eic_mask_irq,
|
.irq_mask = eic_mask_irq,
|
||||||
.mask_ack = eic_mask_ack_irq,
|
.irq_mask_ack = eic_mask_ack_irq,
|
||||||
.unmask = eic_unmask_irq,
|
.irq_unmask = eic_unmask_irq,
|
||||||
.set_type = eic_set_irq_type,
|
.irq_set_type = eic_set_irq_type,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void demux_eic_irq(unsigned int irq, struct irq_desc *desc)
|
static void demux_eic_irq(unsigned int irq, struct irq_desc *desc)
|
||||||
{
|
{
|
||||||
struct eic *eic = desc->handler_data;
|
struct eic *eic = irq_desc_get_handler_data(desc);
|
||||||
unsigned long status, pending;
|
unsigned long status, pending;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
|
@ -234,13 +226,13 @@ static int __init eic_probe(struct platform_device *pdev)
|
||||||
eic->chip = &eic_chip;
|
eic->chip = &eic_chip;
|
||||||
|
|
||||||
for (i = 0; i < nr_of_irqs; i++) {
|
for (i = 0; i < nr_of_irqs; i++) {
|
||||||
set_irq_chip_and_handler(eic->first_irq + i, &eic_chip,
|
irq_set_chip_and_handler(eic->first_irq + i, &eic_chip,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
set_irq_chip_data(eic->first_irq + i, eic);
|
irq_set_chip_data(eic->first_irq + i, eic);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_irq_chained_handler(int_irq, demux_eic_irq);
|
irq_set_chained_handler(int_irq, demux_eic_irq);
|
||||||
set_irq_data(int_irq, eic);
|
irq_set_handler_data(int_irq, eic);
|
||||||
|
|
||||||
if (pdev->id == 0) {
|
if (pdev->id == 0) {
|
||||||
nmi_eic = eic;
|
nmi_eic = eic;
|
||||||
|
|
|
@ -34,12 +34,12 @@ extern struct platform_device at32_intc0_device;
|
||||||
* TODO: We may be able to implement mask/unmask by setting IxM flags
|
* TODO: We may be able to implement mask/unmask by setting IxM flags
|
||||||
* in the status register.
|
* in the status register.
|
||||||
*/
|
*/
|
||||||
static void intc_mask_irq(unsigned int irq)
|
static void intc_mask_irq(struct irq_data *d)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void intc_unmask_irq(unsigned int irq)
|
static void intc_unmask_irq(struct irq_data *d)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -47,8 +47,8 @@ static void intc_unmask_irq(unsigned int irq)
|
||||||
static struct intc intc0 = {
|
static struct intc intc0 = {
|
||||||
.chip = {
|
.chip = {
|
||||||
.name = "intc",
|
.name = "intc",
|
||||||
.mask = intc_mask_irq,
|
.irq_mask = intc_mask_irq,
|
||||||
.unmask = intc_unmask_irq,
|
.irq_unmask = intc_unmask_irq,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -57,7 +57,6 @@ static struct intc intc0 = {
|
||||||
*/
|
*/
|
||||||
asmlinkage void do_IRQ(int level, struct pt_regs *regs)
|
asmlinkage void do_IRQ(int level, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
struct irq_desc *desc;
|
|
||||||
struct pt_regs *old_regs;
|
struct pt_regs *old_regs;
|
||||||
unsigned int irq;
|
unsigned int irq;
|
||||||
unsigned long status_reg;
|
unsigned long status_reg;
|
||||||
|
@ -69,8 +68,7 @@ asmlinkage void do_IRQ(int level, struct pt_regs *regs)
|
||||||
irq_enter();
|
irq_enter();
|
||||||
|
|
||||||
irq = intc_readl(&intc0, INTCAUSE0 - 4 * level);
|
irq = intc_readl(&intc0, INTCAUSE0 - 4 * level);
|
||||||
desc = irq_desc + irq;
|
generic_handle_irq(irq);
|
||||||
desc->handle_irq(irq, desc);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Clear all interrupt level masks so that we may handle
|
* Clear all interrupt level masks so that we may handle
|
||||||
|
@ -128,7 +126,7 @@ void __init init_IRQ(void)
|
||||||
intc_writel(&intc0, INTPR0 + 4 * i, offset);
|
intc_writel(&intc0, INTPR0 + 4 * i, offset);
|
||||||
readback = intc_readl(&intc0, INTPR0 + 4 * i);
|
readback = intc_readl(&intc0, INTPR0 + 4 * i);
|
||||||
if (readback == offset)
|
if (readback == offset)
|
||||||
set_irq_chip_and_handler(i, &intc0.chip,
|
irq_set_chip_and_handler(i, &intc0.chip,
|
||||||
handle_simple_irq);
|
handle_simple_irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -249,23 +249,23 @@ static void gpio_set(struct gpio_chip *chip, unsigned offset, int value)
|
||||||
|
|
||||||
/* GPIO IRQ support */
|
/* GPIO IRQ support */
|
||||||
|
|
||||||
static void gpio_irq_mask(unsigned irq)
|
static void gpio_irq_mask(struct irq_data *d)
|
||||||
{
|
{
|
||||||
unsigned gpio = irq_to_gpio(irq);
|
unsigned gpio = irq_to_gpio(d->irq);
|
||||||
struct pio_device *pio = &pio_dev[gpio >> 5];
|
struct pio_device *pio = &pio_dev[gpio >> 5];
|
||||||
|
|
||||||
pio_writel(pio, IDR, 1 << (gpio & 0x1f));
|
pio_writel(pio, IDR, 1 << (gpio & 0x1f));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gpio_irq_unmask(unsigned irq)
|
static void gpio_irq_unmask(struct irq_data *d))
|
||||||
{
|
{
|
||||||
unsigned gpio = irq_to_gpio(irq);
|
unsigned gpio = irq_to_gpio(d->irq);
|
||||||
struct pio_device *pio = &pio_dev[gpio >> 5];
|
struct pio_device *pio = &pio_dev[gpio >> 5];
|
||||||
|
|
||||||
pio_writel(pio, IER, 1 << (gpio & 0x1f));
|
pio_writel(pio, IER, 1 << (gpio & 0x1f));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int gpio_irq_type(unsigned irq, unsigned type)
|
static int gpio_irq_type(struct irq_data *d, unsigned type)
|
||||||
{
|
{
|
||||||
if (type != IRQ_TYPE_EDGE_BOTH && type != IRQ_TYPE_NONE)
|
if (type != IRQ_TYPE_EDGE_BOTH && type != IRQ_TYPE_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -275,20 +275,19 @@ static int gpio_irq_type(unsigned irq, unsigned type)
|
||||||
|
|
||||||
static struct irq_chip gpio_irqchip = {
|
static struct irq_chip gpio_irqchip = {
|
||||||
.name = "gpio",
|
.name = "gpio",
|
||||||
.mask = gpio_irq_mask,
|
.irq_mask = gpio_irq_mask,
|
||||||
.unmask = gpio_irq_unmask,
|
.irq_unmask = gpio_irq_unmask,
|
||||||
.set_type = gpio_irq_type,
|
.irq_set_type = gpio_irq_type,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
|
static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
|
||||||
{
|
{
|
||||||
struct pio_device *pio = get_irq_chip_data(irq);
|
struct pio_device *pio = get_irq_desc_chip_data(desc);
|
||||||
unsigned gpio_irq;
|
unsigned gpio_irq;
|
||||||
|
|
||||||
gpio_irq = (unsigned) get_irq_data(irq);
|
gpio_irq = (unsigned) irq_get_handler_data(irq);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
u32 isr;
|
u32 isr;
|
||||||
struct irq_desc *d;
|
|
||||||
|
|
||||||
/* ack pending GPIO interrupts */
|
/* ack pending GPIO interrupts */
|
||||||
isr = pio_readl(pio, ISR) & pio_readl(pio, IMR);
|
isr = pio_readl(pio, ISR) & pio_readl(pio, IMR);
|
||||||
|
@ -301,9 +300,7 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
|
||||||
isr &= ~(1 << i);
|
isr &= ~(1 << i);
|
||||||
|
|
||||||
i += gpio_irq;
|
i += gpio_irq;
|
||||||
d = &irq_desc[i];
|
generic_handle_irq(i);
|
||||||
|
|
||||||
d->handle_irq(i, d);
|
|
||||||
} while (isr);
|
} while (isr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -313,16 +310,16 @@ gpio_irq_setup(struct pio_device *pio, int irq, int gpio_irq)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
set_irq_chip_data(irq, pio);
|
irq_set_chip_data(irq, pio);
|
||||||
set_irq_data(irq, (void *) gpio_irq);
|
irq_set_handler_data(irq, (void *)gpio_irq);
|
||||||
|
|
||||||
for (i = 0; i < 32; i++, gpio_irq++) {
|
for (i = 0; i < 32; i++, gpio_irq++) {
|
||||||
set_irq_chip_data(gpio_irq, pio);
|
irq_set_chip_data(gpio_irq, pio);
|
||||||
set_irq_chip_and_handler(gpio_irq, &gpio_irqchip,
|
irq_set_chip_and_handler(gpio_irq, &gpio_irqchip,
|
||||||
handle_simple_irq);
|
handle_simple_irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_irq_chained_handler(irq, gpio_irq_handler);
|
irq_set_chained_handler(irq, gpio_irq_handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -276,7 +276,6 @@ config ETRAX_AXISFLASHMAP
|
||||||
select MTD_CHAR
|
select MTD_CHAR
|
||||||
select MTD_BLOCK
|
select MTD_BLOCK
|
||||||
select MTD_PARTITIONS
|
select MTD_PARTITIONS
|
||||||
select MTD_CONCAT
|
|
||||||
select MTD_COMPLEX_MAPPINGS
|
select MTD_COMPLEX_MAPPINGS
|
||||||
help
|
help
|
||||||
This option enables MTD mapping of flash devices. Needed to use
|
This option enables MTD mapping of flash devices. Needed to use
|
||||||
|
|
|
@ -234,7 +234,6 @@ static struct mtd_info *flash_probe(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mtd_cse0 && mtd_cse1) {
|
if (mtd_cse0 && mtd_cse1) {
|
||||||
#ifdef CONFIG_MTD_CONCAT
|
|
||||||
struct mtd_info *mtds[] = { mtd_cse0, mtd_cse1 };
|
struct mtd_info *mtds[] = { mtd_cse0, mtd_cse1 };
|
||||||
|
|
||||||
/* Since the concatenation layer adds a small overhead we
|
/* Since the concatenation layer adds a small overhead we
|
||||||
|
@ -246,11 +245,6 @@ static struct mtd_info *flash_probe(void)
|
||||||
*/
|
*/
|
||||||
mtd_cse = mtd_concat_create(mtds, ARRAY_SIZE(mtds),
|
mtd_cse = mtd_concat_create(mtds, ARRAY_SIZE(mtds),
|
||||||
"cse0+cse1");
|
"cse0+cse1");
|
||||||
#else
|
|
||||||
printk(KERN_ERR "%s and %s: Cannot concatenate due to kernel "
|
|
||||||
"(mis)configuration!\n", map_cse0.name, map_cse1.name);
|
|
||||||
mtd_cse = NULL;
|
|
||||||
#endif
|
|
||||||
if (!mtd_cse) {
|
if (!mtd_cse) {
|
||||||
printk(KERN_ERR "%s and %s: Concatenation failed!\n",
|
printk(KERN_ERR "%s and %s: Concatenation failed!\n",
|
||||||
map_cse0.name, map_cse1.name);
|
map_cse0.name, map_cse1.name);
|
||||||
|
|
|
@ -406,7 +406,6 @@ config ETRAX_AXISFLASHMAP
|
||||||
select MTD_CHAR
|
select MTD_CHAR
|
||||||
select MTD_BLOCK
|
select MTD_BLOCK
|
||||||
select MTD_PARTITIONS
|
select MTD_PARTITIONS
|
||||||
select MTD_CONCAT
|
|
||||||
select MTD_COMPLEX_MAPPINGS
|
select MTD_COMPLEX_MAPPINGS
|
||||||
help
|
help
|
||||||
This option enables MTD mapping of flash devices. Needed to use
|
This option enables MTD mapping of flash devices. Needed to use
|
||||||
|
|
|
@ -275,7 +275,6 @@ static struct mtd_info *flash_probe(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count > 1) {
|
if (count > 1) {
|
||||||
#ifdef CONFIG_MTD_CONCAT
|
|
||||||
/* Since the concatenation layer adds a small overhead we
|
/* Since the concatenation layer adds a small overhead we
|
||||||
* could try to figure out if the chips in cse0 and cse1 are
|
* could try to figure out if the chips in cse0 and cse1 are
|
||||||
* identical and reprobe the whole cse0+cse1 window. But since
|
* identical and reprobe the whole cse0+cse1 window. But since
|
||||||
|
@ -284,11 +283,6 @@ static struct mtd_info *flash_probe(void)
|
||||||
* complicating the probing procedure.
|
* complicating the probing procedure.
|
||||||
*/
|
*/
|
||||||
mtd_total = mtd_concat_create(mtds, count, "cse0+cse1");
|
mtd_total = mtd_concat_create(mtds, count, "cse0+cse1");
|
||||||
#else
|
|
||||||
printk(KERN_ERR "%s and %s: Cannot concatenate due to kernel "
|
|
||||||
"(mis)configuration!\n", map_cse0.name, map_cse1.name);
|
|
||||||
mtd_toal = NULL;
|
|
||||||
#endif
|
|
||||||
if (!mtd_total) {
|
if (!mtd_total) {
|
||||||
printk(KERN_ERR "%s and %s: Concatenation failed!\n",
|
printk(KERN_ERR "%s and %s: Concatenation failed!\n",
|
||||||
map_cse0.name, map_cse1.name);
|
map_cse0.name, map_cse1.name);
|
||||||
|
|
|
@ -4,6 +4,7 @@ config H8300
|
||||||
select HAVE_IDE
|
select HAVE_IDE
|
||||||
select HAVE_GENERIC_HARDIRQS
|
select HAVE_GENERIC_HARDIRQS
|
||||||
select GENERIC_HARDIRQS_NO_DEPRECATED
|
select GENERIC_HARDIRQS_NO_DEPRECATED
|
||||||
|
select GENERIC_IRQ_SHOW
|
||||||
|
|
||||||
config SYMBOL_PREFIX
|
config SYMBOL_PREFIX
|
||||||
string
|
string
|
||||||
|
|
|
@ -155,7 +155,7 @@ void __init init_IRQ(void)
|
||||||
setup_vector();
|
setup_vector();
|
||||||
|
|
||||||
for (c = 0; c < NR_IRQS; c++)
|
for (c = 0; c < NR_IRQS; c++)
|
||||||
set_irq_chip_and_handler(c, &h8300irq_chip, handle_simple_irq);
|
irq_set_chip_and_handler(c, &h8300irq_chip, handle_simple_irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
asmlinkage void do_IRQ(int irq)
|
asmlinkage void do_IRQ(int irq)
|
||||||
|
@ -164,34 +164,3 @@ asmlinkage void do_IRQ(int irq)
|
||||||
generic_handle_irq(irq);
|
generic_handle_irq(irq);
|
||||||
irq_exit();
|
irq_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_PROC_FS)
|
|
||||||
int show_interrupts(struct seq_file *p, void *v)
|
|
||||||
{
|
|
||||||
int i = *(loff_t *) v;
|
|
||||||
struct irqaction * action;
|
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
if (i == 0)
|
|
||||||
seq_puts(p, " CPU0");
|
|
||||||
|
|
||||||
if (i < NR_IRQS) {
|
|
||||||
raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
|
|
||||||
action = irq_desc[i].action;
|
|
||||||
if (!action)
|
|
||||||
goto unlock;
|
|
||||||
seq_printf(p, "%3d: ",i);
|
|
||||||
seq_printf(p, "%10u ", kstat_irqs(i));
|
|
||||||
seq_printf(p, " %14s", irq_desc[i].irq_data.chip->name);
|
|
||||||
seq_printf(p, "-%-8s", irq_desc[i].name);
|
|
||||||
seq_printf(p, " %s", action->name);
|
|
||||||
|
|
||||||
for (action=action->next; action; action = action->next)
|
|
||||||
seq_printf(p, ", %s", action->name);
|
|
||||||
seq_putc(p, '\n');
|
|
||||||
unlock:
|
|
||||||
raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ static unsigned long max_gap;
|
||||||
* Shows a simple page count of reserved and used pages in the system.
|
* Shows a simple page count of reserved and used pages in the system.
|
||||||
* For discontig machines, it does this on a per-pgdat basis.
|
* For discontig machines, it does this on a per-pgdat basis.
|
||||||
*/
|
*/
|
||||||
void show_mem(void)
|
void show_mem(unsigned int filter)
|
||||||
{
|
{
|
||||||
int i, total_reserved = 0;
|
int i, total_reserved = 0;
|
||||||
int total_shared = 0, total_cached = 0;
|
int total_shared = 0, total_cached = 0;
|
||||||
|
|
|
@ -614,7 +614,7 @@ void __cpuinit *per_cpu_init(void)
|
||||||
* Shows a simple page count of reserved and used pages in the system.
|
* Shows a simple page count of reserved and used pages in the system.
|
||||||
* For discontig machines, it does this on a per-pgdat basis.
|
* For discontig machines, it does this on a per-pgdat basis.
|
||||||
*/
|
*/
|
||||||
void show_mem(void)
|
void show_mem(unsigned int filter)
|
||||||
{
|
{
|
||||||
int i, total_reserved = 0;
|
int i, total_reserved = 0;
|
||||||
int total_shared = 0, total_cached = 0;
|
int total_shared = 0, total_cached = 0;
|
||||||
|
|
|
@ -10,6 +10,7 @@ config M32R
|
||||||
select HAVE_GENERIC_HARDIRQS
|
select HAVE_GENERIC_HARDIRQS
|
||||||
select GENERIC_HARDIRQS_NO_DEPRECATED
|
select GENERIC_HARDIRQS_NO_DEPRECATED
|
||||||
select GENERIC_IRQ_PROBE
|
select GENERIC_IRQ_PROBE
|
||||||
|
select GENERIC_IRQ_SHOW
|
||||||
|
|
||||||
config SBUS
|
config SBUS
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -18,54 +18,9 @@
|
||||||
|
|
||||||
#include <linux/kernel_stat.h>
|
#include <linux/kernel_stat.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/seq_file.h>
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
|
|
||||||
/*
|
|
||||||
* Generic, controller-independent functions:
|
|
||||||
*/
|
|
||||||
|
|
||||||
int show_interrupts(struct seq_file *p, void *v)
|
|
||||||
{
|
|
||||||
int i = *(loff_t *) v, j;
|
|
||||||
struct irqaction * action;
|
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
if (i == 0) {
|
|
||||||
seq_printf(p, " ");
|
|
||||||
for_each_online_cpu(j)
|
|
||||||
seq_printf(p, "CPU%d ",j);
|
|
||||||
seq_putc(p, '\n');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i < NR_IRQS) {
|
|
||||||
struct irq_desc *desc = irq_to_desc(i);
|
|
||||||
|
|
||||||
raw_spin_lock_irqsave(&desc->lock, flags);
|
|
||||||
action = desc->action;
|
|
||||||
if (!action)
|
|
||||||
goto skip;
|
|
||||||
seq_printf(p, "%3d: ",i);
|
|
||||||
#ifndef CONFIG_SMP
|
|
||||||
seq_printf(p, "%10u ", kstat_irqs(i));
|
|
||||||
#else
|
|
||||||
for_each_online_cpu(j)
|
|
||||||
seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
|
|
||||||
#endif
|
|
||||||
seq_printf(p, " %14s", desc->irq_data.chip->name);
|
|
||||||
seq_printf(p, " %s", action->name);
|
|
||||||
|
|
||||||
for (action=action->next; action; action = action->next)
|
|
||||||
seq_printf(p, ", %s", action->name);
|
|
||||||
|
|
||||||
seq_putc(p, '\n');
|
|
||||||
skip:
|
|
||||||
raw_spin_unlock_irqrestore(&desc->lock, flags);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* do_IRQ handles all normal device IRQs (the special
|
* do_IRQ handles all normal device IRQs (the special
|
||||||
* SMP cross-CPU interrupts have their own specific
|
* SMP cross-CPU interrupts have their own specific
|
||||||
|
|
|
@ -76,7 +76,7 @@ void __init init_IRQ(void)
|
||||||
|
|
||||||
#if defined(CONFIG_SMC91X)
|
#if defined(CONFIG_SMC91X)
|
||||||
/* INT#0: LAN controller on M32104UT-LAN (SMC91C111)*/
|
/* INT#0: LAN controller on M32104UT-LAN (SMC91C111)*/
|
||||||
set_irq_chip_and_handler(M32R_IRQ_INT0, &m32104ut_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_INT0, &m32104ut_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
/* "H" level sense */
|
/* "H" level sense */
|
||||||
cu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD11;
|
cu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD11;
|
||||||
|
@ -84,20 +84,20 @@ void __init init_IRQ(void)
|
||||||
#endif /* CONFIG_SMC91X */
|
#endif /* CONFIG_SMC91X */
|
||||||
|
|
||||||
/* MFT2 : system timer */
|
/* MFT2 : system timer */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_MFT2, &m32104ut_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_MFT2, &m32104ut_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
|
icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
|
||||||
disable_m32104ut_irq(M32R_IRQ_MFT2);
|
disable_m32104ut_irq(M32R_IRQ_MFT2);
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_M32R_SIO
|
#ifdef CONFIG_SERIAL_M32R_SIO
|
||||||
/* SIO0_R : uart receive data */
|
/* SIO0_R : uart receive data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &m32104ut_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO0_R, &m32104ut_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO0_R].icucr = M32R_ICUCR_IEN;
|
icu_data[M32R_IRQ_SIO0_R].icucr = M32R_ICUCR_IEN;
|
||||||
disable_m32104ut_irq(M32R_IRQ_SIO0_R);
|
disable_m32104ut_irq(M32R_IRQ_SIO0_R);
|
||||||
|
|
||||||
/* SIO0_S : uart send data */
|
/* SIO0_S : uart send data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &m32104ut_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO0_S, &m32104ut_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO0_S].icucr = M32R_ICUCR_IEN;
|
icu_data[M32R_IRQ_SIO0_S].icucr = M32R_ICUCR_IEN;
|
||||||
disable_m32104ut_irq(M32R_IRQ_SIO0_S);
|
disable_m32104ut_irq(M32R_IRQ_SIO0_S);
|
||||||
|
|
|
@ -259,76 +259,76 @@ void __init init_IRQ(void)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_SMC91X)
|
#if defined(CONFIG_SMC91X)
|
||||||
/* INT#0: LAN controller on M32700UT-LAN (SMC91C111)*/
|
/* INT#0: LAN controller on M32700UT-LAN (SMC91C111)*/
|
||||||
set_irq_chip_and_handler(M32700UT_LAN_IRQ_LAN,
|
irq_set_chip_and_handler(M32700UT_LAN_IRQ_LAN,
|
||||||
&m32700ut_lanpld_irq_type, handle_level_irq);
|
&m32700ut_lanpld_irq_type, handle_level_irq);
|
||||||
lanpld_icu_data[irq2lanpldirq(M32700UT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */
|
lanpld_icu_data[irq2lanpldirq(M32700UT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */
|
||||||
disable_m32700ut_lanpld_irq(M32700UT_LAN_IRQ_LAN);
|
disable_m32700ut_lanpld_irq(M32700UT_LAN_IRQ_LAN);
|
||||||
#endif /* CONFIG_SMC91X */
|
#endif /* CONFIG_SMC91X */
|
||||||
|
|
||||||
/* MFT2 : system timer */
|
/* MFT2 : system timer */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_MFT2, &m32700ut_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_MFT2, &m32700ut_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
|
icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
|
||||||
disable_m32700ut_irq(M32R_IRQ_MFT2);
|
disable_m32700ut_irq(M32R_IRQ_MFT2);
|
||||||
|
|
||||||
/* SIO0 : receive */
|
/* SIO0 : receive */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &m32700ut_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO0_R, &m32700ut_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO0_R].icucr = 0;
|
icu_data[M32R_IRQ_SIO0_R].icucr = 0;
|
||||||
disable_m32700ut_irq(M32R_IRQ_SIO0_R);
|
disable_m32700ut_irq(M32R_IRQ_SIO0_R);
|
||||||
|
|
||||||
/* SIO0 : send */
|
/* SIO0 : send */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &m32700ut_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO0_S, &m32700ut_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO0_S].icucr = 0;
|
icu_data[M32R_IRQ_SIO0_S].icucr = 0;
|
||||||
disable_m32700ut_irq(M32R_IRQ_SIO0_S);
|
disable_m32700ut_irq(M32R_IRQ_SIO0_S);
|
||||||
|
|
||||||
/* SIO1 : receive */
|
/* SIO1 : receive */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &m32700ut_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO1_R, &m32700ut_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO1_R].icucr = 0;
|
icu_data[M32R_IRQ_SIO1_R].icucr = 0;
|
||||||
disable_m32700ut_irq(M32R_IRQ_SIO1_R);
|
disable_m32700ut_irq(M32R_IRQ_SIO1_R);
|
||||||
|
|
||||||
/* SIO1 : send */
|
/* SIO1 : send */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &m32700ut_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO1_S, &m32700ut_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO1_S].icucr = 0;
|
icu_data[M32R_IRQ_SIO1_S].icucr = 0;
|
||||||
disable_m32700ut_irq(M32R_IRQ_SIO1_S);
|
disable_m32700ut_irq(M32R_IRQ_SIO1_S);
|
||||||
|
|
||||||
/* DMA1 : */
|
/* DMA1 : */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_DMA1, &m32700ut_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_DMA1, &m32700ut_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_DMA1].icucr = 0;
|
icu_data[M32R_IRQ_DMA1].icucr = 0;
|
||||||
disable_m32700ut_irq(M32R_IRQ_DMA1);
|
disable_m32700ut_irq(M32R_IRQ_DMA1);
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_M32R_PLDSIO
|
#ifdef CONFIG_SERIAL_M32R_PLDSIO
|
||||||
/* INT#1: SIO0 Receive on PLD */
|
/* INT#1: SIO0 Receive on PLD */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_SIO0_RCV, &m32700ut_pld_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_SIO0_RCV, &m32700ut_pld_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03;
|
pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03;
|
||||||
disable_m32700ut_pld_irq(PLD_IRQ_SIO0_RCV);
|
disable_m32700ut_pld_irq(PLD_IRQ_SIO0_RCV);
|
||||||
|
|
||||||
/* INT#1: SIO0 Send on PLD */
|
/* INT#1: SIO0 Send on PLD */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_SIO0_SND, &m32700ut_pld_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_SIO0_SND, &m32700ut_pld_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03;
|
pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03;
|
||||||
disable_m32700ut_pld_irq(PLD_IRQ_SIO0_SND);
|
disable_m32700ut_pld_irq(PLD_IRQ_SIO0_SND);
|
||||||
#endif /* CONFIG_SERIAL_M32R_PLDSIO */
|
#endif /* CONFIG_SERIAL_M32R_PLDSIO */
|
||||||
|
|
||||||
/* INT#1: CFC IREQ on PLD */
|
/* INT#1: CFC IREQ on PLD */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &m32700ut_pld_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_CFIREQ, &m32700ut_pld_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */
|
pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */
|
||||||
disable_m32700ut_pld_irq(PLD_IRQ_CFIREQ);
|
disable_m32700ut_pld_irq(PLD_IRQ_CFIREQ);
|
||||||
|
|
||||||
/* INT#1: CFC Insert on PLD */
|
/* INT#1: CFC Insert on PLD */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &m32700ut_pld_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_CFC_INSERT, &m32700ut_pld_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */
|
pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */
|
||||||
disable_m32700ut_pld_irq(PLD_IRQ_CFC_INSERT);
|
disable_m32700ut_pld_irq(PLD_IRQ_CFC_INSERT);
|
||||||
|
|
||||||
/* INT#1: CFC Eject on PLD */
|
/* INT#1: CFC Eject on PLD */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &m32700ut_pld_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_CFC_EJECT, &m32700ut_pld_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */
|
pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */
|
||||||
disable_m32700ut_pld_irq(PLD_IRQ_CFC_EJECT);
|
disable_m32700ut_pld_irq(PLD_IRQ_CFC_EJECT);
|
||||||
|
@ -349,7 +349,7 @@ void __init init_IRQ(void)
|
||||||
|
|
||||||
#if defined(CONFIG_USB)
|
#if defined(CONFIG_USB)
|
||||||
outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */
|
outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */
|
||||||
set_irq_chip_and_handler(M32700UT_LCD_IRQ_USB_INT1,
|
irq_set_chip_and_handler(M32700UT_LCD_IRQ_USB_INT1,
|
||||||
&m32700ut_lcdpld_irq_type, handle_level_irq);
|
&m32700ut_lcdpld_irq_type, handle_level_irq);
|
||||||
|
|
||||||
lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */
|
lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */
|
||||||
|
@ -366,7 +366,7 @@ void __init init_IRQ(void)
|
||||||
/*
|
/*
|
||||||
* INT3# is used for AR
|
* INT3# is used for AR
|
||||||
*/
|
*/
|
||||||
set_irq_chip_and_handler(M32R_IRQ_INT3, &m32700ut_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_INT3, &m32700ut_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
|
icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
|
||||||
disable_m32700ut_irq(M32R_IRQ_INT3);
|
disable_m32700ut_irq(M32R_IRQ_INT3);
|
||||||
|
|
|
@ -75,39 +75,39 @@ void __init init_IRQ(void)
|
||||||
|
|
||||||
#ifdef CONFIG_NE2000
|
#ifdef CONFIG_NE2000
|
||||||
/* INT0 : LAN controller (RTL8019AS) */
|
/* INT0 : LAN controller (RTL8019AS) */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_INT0, &mappi_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_INT0, &mappi_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11;
|
icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11;
|
||||||
disable_mappi_irq(M32R_IRQ_INT0);
|
disable_mappi_irq(M32R_IRQ_INT0);
|
||||||
#endif /* CONFIG_M32R_NE2000 */
|
#endif /* CONFIG_M32R_NE2000 */
|
||||||
|
|
||||||
/* MFT2 : system timer */
|
/* MFT2 : system timer */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_MFT2, &mappi_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
|
icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
|
||||||
disable_mappi_irq(M32R_IRQ_MFT2);
|
disable_mappi_irq(M32R_IRQ_MFT2);
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_M32R_SIO
|
#ifdef CONFIG_SERIAL_M32R_SIO
|
||||||
/* SIO0_R : uart receive data */
|
/* SIO0_R : uart receive data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO0_R, &mappi_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO0_R].icucr = 0;
|
icu_data[M32R_IRQ_SIO0_R].icucr = 0;
|
||||||
disable_mappi_irq(M32R_IRQ_SIO0_R);
|
disable_mappi_irq(M32R_IRQ_SIO0_R);
|
||||||
|
|
||||||
/* SIO0_S : uart send data */
|
/* SIO0_S : uart send data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO0_S, &mappi_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO0_S].icucr = 0;
|
icu_data[M32R_IRQ_SIO0_S].icucr = 0;
|
||||||
disable_mappi_irq(M32R_IRQ_SIO0_S);
|
disable_mappi_irq(M32R_IRQ_SIO0_S);
|
||||||
|
|
||||||
/* SIO1_R : uart receive data */
|
/* SIO1_R : uart receive data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO1_R, &mappi_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO1_R].icucr = 0;
|
icu_data[M32R_IRQ_SIO1_R].icucr = 0;
|
||||||
disable_mappi_irq(M32R_IRQ_SIO1_R);
|
disable_mappi_irq(M32R_IRQ_SIO1_R);
|
||||||
|
|
||||||
/* SIO1_S : uart send data */
|
/* SIO1_S : uart send data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO1_S, &mappi_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO1_S].icucr = 0;
|
icu_data[M32R_IRQ_SIO1_S].icucr = 0;
|
||||||
disable_mappi_irq(M32R_IRQ_SIO1_S);
|
disable_mappi_irq(M32R_IRQ_SIO1_S);
|
||||||
|
@ -115,13 +115,13 @@ void __init init_IRQ(void)
|
||||||
|
|
||||||
#if defined(CONFIG_M32R_PCC)
|
#if defined(CONFIG_M32R_PCC)
|
||||||
/* INT1 : pccard0 interrupt */
|
/* INT1 : pccard0 interrupt */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_INT1, &mappi_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_INT1, &mappi_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00;
|
icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00;
|
||||||
disable_mappi_irq(M32R_IRQ_INT1);
|
disable_mappi_irq(M32R_IRQ_INT1);
|
||||||
|
|
||||||
/* INT2 : pccard1 interrupt */
|
/* INT2 : pccard1 interrupt */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_INT2, &mappi_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_INT2, &mappi_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00;
|
icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00;
|
||||||
disable_mappi_irq(M32R_IRQ_INT2);
|
disable_mappi_irq(M32R_IRQ_INT2);
|
||||||
|
|
|
@ -76,38 +76,38 @@ void __init init_IRQ(void)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_SMC91X)
|
#if defined(CONFIG_SMC91X)
|
||||||
/* INT0 : LAN controller (SMC91111) */
|
/* INT0 : LAN controller (SMC91111) */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_INT0, &mappi2_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_INT0, &mappi2_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
|
icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
|
||||||
disable_mappi2_irq(M32R_IRQ_INT0);
|
disable_mappi2_irq(M32R_IRQ_INT0);
|
||||||
#endif /* CONFIG_SMC91X */
|
#endif /* CONFIG_SMC91X */
|
||||||
|
|
||||||
/* MFT2 : system timer */
|
/* MFT2 : system timer */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi2_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_MFT2, &mappi2_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
|
icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
|
||||||
disable_mappi2_irq(M32R_IRQ_MFT2);
|
disable_mappi2_irq(M32R_IRQ_MFT2);
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_M32R_SIO
|
#ifdef CONFIG_SERIAL_M32R_SIO
|
||||||
/* SIO0_R : uart receive data */
|
/* SIO0_R : uart receive data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi2_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO0_R, &mappi2_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO0_R].icucr = 0;
|
icu_data[M32R_IRQ_SIO0_R].icucr = 0;
|
||||||
disable_mappi2_irq(M32R_IRQ_SIO0_R);
|
disable_mappi2_irq(M32R_IRQ_SIO0_R);
|
||||||
|
|
||||||
/* SIO0_S : uart send data */
|
/* SIO0_S : uart send data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi2_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO0_S, &mappi2_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO0_S].icucr = 0;
|
icu_data[M32R_IRQ_SIO0_S].icucr = 0;
|
||||||
disable_mappi2_irq(M32R_IRQ_SIO0_S);
|
disable_mappi2_irq(M32R_IRQ_SIO0_S);
|
||||||
/* SIO1_R : uart receive data */
|
/* SIO1_R : uart receive data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi2_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO1_R, &mappi2_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO1_R].icucr = 0;
|
icu_data[M32R_IRQ_SIO1_R].icucr = 0;
|
||||||
disable_mappi2_irq(M32R_IRQ_SIO1_R);
|
disable_mappi2_irq(M32R_IRQ_SIO1_R);
|
||||||
|
|
||||||
/* SIO1_S : uart send data */
|
/* SIO1_S : uart send data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi2_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO1_S, &mappi2_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO1_S].icucr = 0;
|
icu_data[M32R_IRQ_SIO1_S].icucr = 0;
|
||||||
disable_mappi2_irq(M32R_IRQ_SIO1_S);
|
disable_mappi2_irq(M32R_IRQ_SIO1_S);
|
||||||
|
@ -115,27 +115,27 @@ void __init init_IRQ(void)
|
||||||
|
|
||||||
#if defined(CONFIG_USB)
|
#if defined(CONFIG_USB)
|
||||||
/* INT1 : USB Host controller interrupt */
|
/* INT1 : USB Host controller interrupt */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_INT1, &mappi2_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_INT1, &mappi2_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01;
|
icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01;
|
||||||
disable_mappi2_irq(M32R_IRQ_INT1);
|
disable_mappi2_irq(M32R_IRQ_INT1);
|
||||||
#endif /* CONFIG_USB */
|
#endif /* CONFIG_USB */
|
||||||
|
|
||||||
/* ICUCR40: CFC IREQ */
|
/* ICUCR40: CFC IREQ */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &mappi2_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_CFIREQ, &mappi2_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01;
|
icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01;
|
||||||
disable_mappi2_irq(PLD_IRQ_CFIREQ);
|
disable_mappi2_irq(PLD_IRQ_CFIREQ);
|
||||||
|
|
||||||
#if defined(CONFIG_M32R_CFC)
|
#if defined(CONFIG_M32R_CFC)
|
||||||
/* ICUCR41: CFC Insert */
|
/* ICUCR41: CFC Insert */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &mappi2_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_CFC_INSERT, &mappi2_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00;
|
icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00;
|
||||||
disable_mappi2_irq(PLD_IRQ_CFC_INSERT);
|
disable_mappi2_irq(PLD_IRQ_CFC_INSERT);
|
||||||
|
|
||||||
/* ICUCR42: CFC Eject */
|
/* ICUCR42: CFC Eject */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &mappi2_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_CFC_EJECT, &mappi2_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
|
icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
|
||||||
disable_mappi2_irq(PLD_IRQ_CFC_EJECT);
|
disable_mappi2_irq(PLD_IRQ_CFC_EJECT);
|
||||||
|
|
|
@ -75,38 +75,38 @@ void __init init_IRQ(void)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_SMC91X)
|
#if defined(CONFIG_SMC91X)
|
||||||
/* INT0 : LAN controller (SMC91111) */
|
/* INT0 : LAN controller (SMC91111) */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_INT0, &mappi3_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_INT0, &mappi3_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
|
icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
|
||||||
disable_mappi3_irq(M32R_IRQ_INT0);
|
disable_mappi3_irq(M32R_IRQ_INT0);
|
||||||
#endif /* CONFIG_SMC91X */
|
#endif /* CONFIG_SMC91X */
|
||||||
|
|
||||||
/* MFT2 : system timer */
|
/* MFT2 : system timer */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi3_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_MFT2, &mappi3_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
|
icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
|
||||||
disable_mappi3_irq(M32R_IRQ_MFT2);
|
disable_mappi3_irq(M32R_IRQ_MFT2);
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_M32R_SIO
|
#ifdef CONFIG_SERIAL_M32R_SIO
|
||||||
/* SIO0_R : uart receive data */
|
/* SIO0_R : uart receive data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi3_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO0_R, &mappi3_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO0_R].icucr = 0;
|
icu_data[M32R_IRQ_SIO0_R].icucr = 0;
|
||||||
disable_mappi3_irq(M32R_IRQ_SIO0_R);
|
disable_mappi3_irq(M32R_IRQ_SIO0_R);
|
||||||
|
|
||||||
/* SIO0_S : uart send data */
|
/* SIO0_S : uart send data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi3_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO0_S, &mappi3_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO0_S].icucr = 0;
|
icu_data[M32R_IRQ_SIO0_S].icucr = 0;
|
||||||
disable_mappi3_irq(M32R_IRQ_SIO0_S);
|
disable_mappi3_irq(M32R_IRQ_SIO0_S);
|
||||||
/* SIO1_R : uart receive data */
|
/* SIO1_R : uart receive data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi3_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO1_R, &mappi3_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO1_R].icucr = 0;
|
icu_data[M32R_IRQ_SIO1_R].icucr = 0;
|
||||||
disable_mappi3_irq(M32R_IRQ_SIO1_R);
|
disable_mappi3_irq(M32R_IRQ_SIO1_R);
|
||||||
|
|
||||||
/* SIO1_S : uart send data */
|
/* SIO1_S : uart send data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi3_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO1_S, &mappi3_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO1_S].icucr = 0;
|
icu_data[M32R_IRQ_SIO1_S].icucr = 0;
|
||||||
disable_mappi3_irq(M32R_IRQ_SIO1_S);
|
disable_mappi3_irq(M32R_IRQ_SIO1_S);
|
||||||
|
@ -114,21 +114,21 @@ void __init init_IRQ(void)
|
||||||
|
|
||||||
#if defined(CONFIG_USB)
|
#if defined(CONFIG_USB)
|
||||||
/* INT1 : USB Host controller interrupt */
|
/* INT1 : USB Host controller interrupt */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_INT1, &mappi3_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_INT1, &mappi3_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01;
|
icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01;
|
||||||
disable_mappi3_irq(M32R_IRQ_INT1);
|
disable_mappi3_irq(M32R_IRQ_INT1);
|
||||||
#endif /* CONFIG_USB */
|
#endif /* CONFIG_USB */
|
||||||
|
|
||||||
/* CFC IREQ */
|
/* CFC IREQ */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &mappi3_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_CFIREQ, &mappi3_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01;
|
icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01;
|
||||||
disable_mappi3_irq(PLD_IRQ_CFIREQ);
|
disable_mappi3_irq(PLD_IRQ_CFIREQ);
|
||||||
|
|
||||||
#if defined(CONFIG_M32R_CFC)
|
#if defined(CONFIG_M32R_CFC)
|
||||||
/* ICUCR41: CFC Insert & eject */
|
/* ICUCR41: CFC Insert & eject */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &mappi3_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_CFC_INSERT, &mappi3_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00;
|
icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00;
|
||||||
disable_mappi3_irq(PLD_IRQ_CFC_INSERT);
|
disable_mappi3_irq(PLD_IRQ_CFC_INSERT);
|
||||||
|
@ -136,7 +136,7 @@ void __init init_IRQ(void)
|
||||||
#endif /* CONFIG_M32R_CFC */
|
#endif /* CONFIG_M32R_CFC */
|
||||||
|
|
||||||
/* IDE IREQ */
|
/* IDE IREQ */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_IDEIREQ, &mappi3_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_IDEIREQ, &mappi3_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[PLD_IRQ_IDEIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
|
icu_data[PLD_IRQ_IDEIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
|
||||||
disable_mappi3_irq(PLD_IRQ_IDEIREQ);
|
disable_mappi3_irq(PLD_IRQ_IDEIREQ);
|
||||||
|
|
|
@ -74,39 +74,39 @@ void __init init_IRQ(void)
|
||||||
|
|
||||||
#ifdef CONFIG_NE2000
|
#ifdef CONFIG_NE2000
|
||||||
/* INT3 : LAN controller (RTL8019AS) */
|
/* INT3 : LAN controller (RTL8019AS) */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_INT3, &oaks32r_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_INT3, &oaks32r_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
|
icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
|
||||||
disable_oaks32r_irq(M32R_IRQ_INT3);
|
disable_oaks32r_irq(M32R_IRQ_INT3);
|
||||||
#endif /* CONFIG_M32R_NE2000 */
|
#endif /* CONFIG_M32R_NE2000 */
|
||||||
|
|
||||||
/* MFT2 : system timer */
|
/* MFT2 : system timer */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_MFT2, &oaks32r_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_MFT2, &oaks32r_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
|
icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
|
||||||
disable_oaks32r_irq(M32R_IRQ_MFT2);
|
disable_oaks32r_irq(M32R_IRQ_MFT2);
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_M32R_SIO
|
#ifdef CONFIG_SERIAL_M32R_SIO
|
||||||
/* SIO0_R : uart receive data */
|
/* SIO0_R : uart receive data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &oaks32r_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO0_R, &oaks32r_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO0_R].icucr = 0;
|
icu_data[M32R_IRQ_SIO0_R].icucr = 0;
|
||||||
disable_oaks32r_irq(M32R_IRQ_SIO0_R);
|
disable_oaks32r_irq(M32R_IRQ_SIO0_R);
|
||||||
|
|
||||||
/* SIO0_S : uart send data */
|
/* SIO0_S : uart send data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &oaks32r_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO0_S, &oaks32r_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO0_S].icucr = 0;
|
icu_data[M32R_IRQ_SIO0_S].icucr = 0;
|
||||||
disable_oaks32r_irq(M32R_IRQ_SIO0_S);
|
disable_oaks32r_irq(M32R_IRQ_SIO0_S);
|
||||||
|
|
||||||
/* SIO1_R : uart receive data */
|
/* SIO1_R : uart receive data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &oaks32r_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO1_R, &oaks32r_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO1_R].icucr = 0;
|
icu_data[M32R_IRQ_SIO1_R].icucr = 0;
|
||||||
disable_oaks32r_irq(M32R_IRQ_SIO1_R);
|
disable_oaks32r_irq(M32R_IRQ_SIO1_R);
|
||||||
|
|
||||||
/* SIO1_S : uart send data */
|
/* SIO1_S : uart send data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &oaks32r_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO1_S, &oaks32r_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO1_S].icucr = 0;
|
icu_data[M32R_IRQ_SIO1_S].icucr = 0;
|
||||||
disable_oaks32r_irq(M32R_IRQ_SIO1_S);
|
disable_oaks32r_irq(M32R_IRQ_SIO1_S);
|
||||||
|
|
|
@ -259,76 +259,76 @@ void __init init_IRQ(void)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_SMC91X)
|
#if defined(CONFIG_SMC91X)
|
||||||
/* INT#0: LAN controller on OPSPUT-LAN (SMC91C111)*/
|
/* INT#0: LAN controller on OPSPUT-LAN (SMC91C111)*/
|
||||||
set_irq_chip_and_handler(OPSPUT_LAN_IRQ_LAN, &opsput_lanpld_irq_type,
|
irq_set_chip_and_handler(OPSPUT_LAN_IRQ_LAN, &opsput_lanpld_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
lanpld_icu_data[irq2lanpldirq(OPSPUT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */
|
lanpld_icu_data[irq2lanpldirq(OPSPUT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */
|
||||||
disable_opsput_lanpld_irq(OPSPUT_LAN_IRQ_LAN);
|
disable_opsput_lanpld_irq(OPSPUT_LAN_IRQ_LAN);
|
||||||
#endif /* CONFIG_SMC91X */
|
#endif /* CONFIG_SMC91X */
|
||||||
|
|
||||||
/* MFT2 : system timer */
|
/* MFT2 : system timer */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_MFT2, &opsput_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_MFT2, &opsput_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
|
icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
|
||||||
disable_opsput_irq(M32R_IRQ_MFT2);
|
disable_opsput_irq(M32R_IRQ_MFT2);
|
||||||
|
|
||||||
/* SIO0 : receive */
|
/* SIO0 : receive */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &opsput_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO0_R, &opsput_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO0_R].icucr = 0;
|
icu_data[M32R_IRQ_SIO0_R].icucr = 0;
|
||||||
disable_opsput_irq(M32R_IRQ_SIO0_R);
|
disable_opsput_irq(M32R_IRQ_SIO0_R);
|
||||||
|
|
||||||
/* SIO0 : send */
|
/* SIO0 : send */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &opsput_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO0_S, &opsput_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO0_S].icucr = 0;
|
icu_data[M32R_IRQ_SIO0_S].icucr = 0;
|
||||||
disable_opsput_irq(M32R_IRQ_SIO0_S);
|
disable_opsput_irq(M32R_IRQ_SIO0_S);
|
||||||
|
|
||||||
/* SIO1 : receive */
|
/* SIO1 : receive */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &opsput_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO1_R, &opsput_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO1_R].icucr = 0;
|
icu_data[M32R_IRQ_SIO1_R].icucr = 0;
|
||||||
disable_opsput_irq(M32R_IRQ_SIO1_R);
|
disable_opsput_irq(M32R_IRQ_SIO1_R);
|
||||||
|
|
||||||
/* SIO1 : send */
|
/* SIO1 : send */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &opsput_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO1_S, &opsput_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO1_S].icucr = 0;
|
icu_data[M32R_IRQ_SIO1_S].icucr = 0;
|
||||||
disable_opsput_irq(M32R_IRQ_SIO1_S);
|
disable_opsput_irq(M32R_IRQ_SIO1_S);
|
||||||
|
|
||||||
/* DMA1 : */
|
/* DMA1 : */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_DMA1, &opsput_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_DMA1, &opsput_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_DMA1].icucr = 0;
|
icu_data[M32R_IRQ_DMA1].icucr = 0;
|
||||||
disable_opsput_irq(M32R_IRQ_DMA1);
|
disable_opsput_irq(M32R_IRQ_DMA1);
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_M32R_PLDSIO
|
#ifdef CONFIG_SERIAL_M32R_PLDSIO
|
||||||
/* INT#1: SIO0 Receive on PLD */
|
/* INT#1: SIO0 Receive on PLD */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_SIO0_RCV, &opsput_pld_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_SIO0_RCV, &opsput_pld_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03;
|
pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03;
|
||||||
disable_opsput_pld_irq(PLD_IRQ_SIO0_RCV);
|
disable_opsput_pld_irq(PLD_IRQ_SIO0_RCV);
|
||||||
|
|
||||||
/* INT#1: SIO0 Send on PLD */
|
/* INT#1: SIO0 Send on PLD */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_SIO0_SND, &opsput_pld_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_SIO0_SND, &opsput_pld_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03;
|
pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03;
|
||||||
disable_opsput_pld_irq(PLD_IRQ_SIO0_SND);
|
disable_opsput_pld_irq(PLD_IRQ_SIO0_SND);
|
||||||
#endif /* CONFIG_SERIAL_M32R_PLDSIO */
|
#endif /* CONFIG_SERIAL_M32R_PLDSIO */
|
||||||
|
|
||||||
/* INT#1: CFC IREQ on PLD */
|
/* INT#1: CFC IREQ on PLD */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &opsput_pld_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_CFIREQ, &opsput_pld_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */
|
pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */
|
||||||
disable_opsput_pld_irq(PLD_IRQ_CFIREQ);
|
disable_opsput_pld_irq(PLD_IRQ_CFIREQ);
|
||||||
|
|
||||||
/* INT#1: CFC Insert on PLD */
|
/* INT#1: CFC Insert on PLD */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &opsput_pld_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_CFC_INSERT, &opsput_pld_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */
|
pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */
|
||||||
disable_opsput_pld_irq(PLD_IRQ_CFC_INSERT);
|
disable_opsput_pld_irq(PLD_IRQ_CFC_INSERT);
|
||||||
|
|
||||||
/* INT#1: CFC Eject on PLD */
|
/* INT#1: CFC Eject on PLD */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &opsput_pld_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_CFC_EJECT, &opsput_pld_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */
|
pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */
|
||||||
disable_opsput_pld_irq(PLD_IRQ_CFC_EJECT);
|
disable_opsput_pld_irq(PLD_IRQ_CFC_EJECT);
|
||||||
|
@ -349,7 +349,7 @@ void __init init_IRQ(void)
|
||||||
|
|
||||||
#if defined(CONFIG_USB)
|
#if defined(CONFIG_USB)
|
||||||
outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */
|
outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */
|
||||||
set_irq_chip_and_handler(OPSPUT_LCD_IRQ_USB_INT1,
|
irq_set_chip_and_handler(OPSPUT_LCD_IRQ_USB_INT1,
|
||||||
&opsput_lcdpld_irq_type, handle_level_irq);
|
&opsput_lcdpld_irq_type, handle_level_irq);
|
||||||
lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */
|
lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */
|
||||||
disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1);
|
disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1);
|
||||||
|
@ -365,7 +365,7 @@ void __init init_IRQ(void)
|
||||||
/*
|
/*
|
||||||
* INT3# is used for AR
|
* INT3# is used for AR
|
||||||
*/
|
*/
|
||||||
set_irq_chip_and_handler(M32R_IRQ_INT3, &opsput_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_INT3, &opsput_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
|
icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
|
||||||
disable_opsput_irq(M32R_IRQ_INT3);
|
disable_opsput_irq(M32R_IRQ_INT3);
|
||||||
|
|
|
@ -138,32 +138,32 @@ void __init init_IRQ(void)
|
||||||
once++;
|
once++;
|
||||||
|
|
||||||
/* MFT2 : system timer */
|
/* MFT2 : system timer */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_MFT2, &mappi_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
|
icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
|
||||||
disable_mappi_irq(M32R_IRQ_MFT2);
|
disable_mappi_irq(M32R_IRQ_MFT2);
|
||||||
|
|
||||||
#if defined(CONFIG_SERIAL_M32R_SIO)
|
#if defined(CONFIG_SERIAL_M32R_SIO)
|
||||||
/* SIO0_R : uart receive data */
|
/* SIO0_R : uart receive data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO0_R, &mappi_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO0_R].icucr = 0;
|
icu_data[M32R_IRQ_SIO0_R].icucr = 0;
|
||||||
disable_mappi_irq(M32R_IRQ_SIO0_R);
|
disable_mappi_irq(M32R_IRQ_SIO0_R);
|
||||||
|
|
||||||
/* SIO0_S : uart send data */
|
/* SIO0_S : uart send data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO0_S, &mappi_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO0_S].icucr = 0;
|
icu_data[M32R_IRQ_SIO0_S].icucr = 0;
|
||||||
disable_mappi_irq(M32R_IRQ_SIO0_S);
|
disable_mappi_irq(M32R_IRQ_SIO0_S);
|
||||||
|
|
||||||
/* SIO1_R : uart receive data */
|
/* SIO1_R : uart receive data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO1_R, &mappi_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO1_R].icucr = 0;
|
icu_data[M32R_IRQ_SIO1_R].icucr = 0;
|
||||||
disable_mappi_irq(M32R_IRQ_SIO1_R);
|
disable_mappi_irq(M32R_IRQ_SIO1_R);
|
||||||
|
|
||||||
/* SIO1_S : uart send data */
|
/* SIO1_S : uart send data */
|
||||||
set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi_irq_type,
|
irq_set_chip_and_handler(M32R_IRQ_SIO1_S, &mappi_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
icu_data[M32R_IRQ_SIO1_S].icucr = 0;
|
icu_data[M32R_IRQ_SIO1_S].icucr = 0;
|
||||||
disable_mappi_irq(M32R_IRQ_SIO1_S);
|
disable_mappi_irq(M32R_IRQ_SIO1_S);
|
||||||
|
@ -171,7 +171,7 @@ void __init init_IRQ(void)
|
||||||
|
|
||||||
/* INT#67-#71: CFC#0 IREQ on PLD */
|
/* INT#67-#71: CFC#0 IREQ on PLD */
|
||||||
for (i = 0 ; i < CONFIG_M32R_CFC_NUM ; i++ ) {
|
for (i = 0 ; i < CONFIG_M32R_CFC_NUM ; i++ ) {
|
||||||
set_irq_chip_and_handler(PLD_IRQ_CF0 + i,
|
irq_set_chip_and_handler(PLD_IRQ_CF0 + i,
|
||||||
&m32700ut_pld_irq_type,
|
&m32700ut_pld_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
pld_icu_data[irq2pldirq(PLD_IRQ_CF0 + i)].icucr
|
pld_icu_data[irq2pldirq(PLD_IRQ_CF0 + i)].icucr
|
||||||
|
@ -181,14 +181,14 @@ void __init init_IRQ(void)
|
||||||
|
|
||||||
#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
|
#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
|
||||||
/* INT#76: 16552D#0 IREQ on PLD */
|
/* INT#76: 16552D#0 IREQ on PLD */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_UART0, &m32700ut_pld_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_UART0, &m32700ut_pld_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
pld_icu_data[irq2pldirq(PLD_IRQ_UART0)].icucr
|
pld_icu_data[irq2pldirq(PLD_IRQ_UART0)].icucr
|
||||||
= PLD_ICUCR_ISMOD03; /* 'H' level sense */
|
= PLD_ICUCR_ISMOD03; /* 'H' level sense */
|
||||||
disable_m32700ut_pld_irq(PLD_IRQ_UART0);
|
disable_m32700ut_pld_irq(PLD_IRQ_UART0);
|
||||||
|
|
||||||
/* INT#77: 16552D#1 IREQ on PLD */
|
/* INT#77: 16552D#1 IREQ on PLD */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_UART1, &m32700ut_pld_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_UART1, &m32700ut_pld_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
pld_icu_data[irq2pldirq(PLD_IRQ_UART1)].icucr
|
pld_icu_data[irq2pldirq(PLD_IRQ_UART1)].icucr
|
||||||
= PLD_ICUCR_ISMOD03; /* 'H' level sense */
|
= PLD_ICUCR_ISMOD03; /* 'H' level sense */
|
||||||
|
@ -197,7 +197,7 @@ void __init init_IRQ(void)
|
||||||
|
|
||||||
#if defined(CONFIG_IDC_AK4524) || defined(CONFIG_IDC_AK4524_MODULE)
|
#if defined(CONFIG_IDC_AK4524) || defined(CONFIG_IDC_AK4524_MODULE)
|
||||||
/* INT#80: AK4524 IREQ on PLD */
|
/* INT#80: AK4524 IREQ on PLD */
|
||||||
set_irq_chip_and_handler(PLD_IRQ_SNDINT, &m32700ut_pld_irq_type,
|
irq_set_chip_and_handler(PLD_IRQ_SNDINT, &m32700ut_pld_irq_type,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
pld_icu_data[irq2pldirq(PLD_IRQ_SNDINT)].icucr
|
pld_icu_data[irq2pldirq(PLD_IRQ_SNDINT)].icucr
|
||||||
= PLD_ICUCR_ISMOD01; /* 'L' level sense */
|
= PLD_ICUCR_ISMOD01; /* 'L' level sense */
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
config M68K
|
config M68K
|
||||||
bool
|
bool
|
||||||
default y
|
default y
|
||||||
select HAVE_AOUT
|
|
||||||
select HAVE_IDE
|
select HAVE_IDE
|
||||||
select GENERIC_ATOMIC64
|
select HAVE_AOUT if MMU
|
||||||
|
select GENERIC_ATOMIC64 if MMU
|
||||||
config MMU
|
select HAVE_GENERIC_HARDIRQS if !MMU
|
||||||
bool
|
select GENERIC_HARDIRQS_NO_DEPRECATED if !MMU
|
||||||
default y
|
|
||||||
|
|
||||||
config RWSEM_GENERIC_SPINLOCK
|
config RWSEM_GENERIC_SPINLOCK
|
||||||
bool
|
bool
|
||||||
|
@ -34,457 +32,67 @@ config TIME_LOW_RES
|
||||||
bool
|
bool
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config GENERIC_IOMAP
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
|
|
||||||
config ARCH_MAY_HAVE_PC_FDC
|
|
||||||
bool
|
|
||||||
depends on BROKEN && (Q40 || SUN3X)
|
|
||||||
default y
|
|
||||||
|
|
||||||
config NO_IOPORT
|
config NO_IOPORT
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
config NO_DMA
|
config NO_DMA
|
||||||
def_bool SUN3
|
def_bool (MMU && SUN3) || (!MMU && !COLDFIRE)
|
||||||
|
|
||||||
|
config ZONE_DMA
|
||||||
|
bool
|
||||||
|
default y
|
||||||
config HZ
|
config HZ
|
||||||
int
|
int
|
||||||
|
default 1000 if CLEOPATRA
|
||||||
default 100
|
default 100
|
||||||
|
|
||||||
config ARCH_USES_GETTIMEOFFSET
|
|
||||||
def_bool y
|
|
||||||
|
|
||||||
source "init/Kconfig"
|
source "init/Kconfig"
|
||||||
|
|
||||||
source "kernel/Kconfig.freezer"
|
source "kernel/Kconfig.freezer"
|
||||||
|
|
||||||
|
config MMU
|
||||||
|
bool "MMU-based Paged Memory Management Support"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Select if you want MMU-based virtualised addressing space
|
||||||
|
support by paged memory management. If unsure, say 'Y'.
|
||||||
|
|
||||||
menu "Platform dependent setup"
|
menu "Platform dependent setup"
|
||||||
|
|
||||||
config EISA
|
if MMU
|
||||||
bool
|
source arch/m68k/Kconfig.mmu
|
||||||
---help---
|
endif
|
||||||
The Extended Industry Standard Architecture (EISA) bus was
|
if !MMU
|
||||||
developed as an open alternative to the IBM MicroChannel bus.
|
source arch/m68k/Kconfig.nommu
|
||||||
|
endif
|
||||||
The EISA bus provided some of the features of the IBM MicroChannel
|
|
||||||
bus while maintaining backward compatibility with cards made for
|
|
||||||
the older ISA bus. The EISA bus saw limited use between 1988 and
|
|
||||||
1995 when it was made obsolete by the PCI bus.
|
|
||||||
|
|
||||||
Say Y here if you are building a kernel for an EISA-based machine.
|
|
||||||
|
|
||||||
Otherwise, say N.
|
|
||||||
|
|
||||||
config MCA
|
|
||||||
bool
|
|
||||||
help
|
|
||||||
MicroChannel Architecture is found in some IBM PS/2 machines and
|
|
||||||
laptops. It is a bus system similar to PCI or ISA. See
|
|
||||||
<file:Documentation/mca.txt> (and especially the web page given
|
|
||||||
there) before attempting to build an MCA bus kernel.
|
|
||||||
|
|
||||||
config PCMCIA
|
|
||||||
tristate
|
|
||||||
---help---
|
|
||||||
Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
|
|
||||||
computer. These are credit-card size devices such as network cards,
|
|
||||||
modems or hard drives often used with laptops computers. There are
|
|
||||||
actually two varieties of these cards: the older 16 bit PCMCIA cards
|
|
||||||
and the newer 32 bit CardBus cards. If you want to use CardBus
|
|
||||||
cards, you need to say Y here and also to "CardBus support" below.
|
|
||||||
|
|
||||||
To use your PC-cards, you will need supporting software from David
|
|
||||||
Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
|
|
||||||
for location). Please also read the PCMCIA-HOWTO, available from
|
|
||||||
<http://www.tldp.org/docs.html#howto>.
|
|
||||||
|
|
||||||
To compile this driver as modules, choose M here: the
|
|
||||||
modules will be called pcmcia_core and ds.
|
|
||||||
|
|
||||||
config AMIGA
|
|
||||||
bool "Amiga support"
|
|
||||||
select MMU_MOTOROLA if MMU
|
|
||||||
help
|
|
||||||
This option enables support for the Amiga series of computers. If
|
|
||||||
you plan to use this kernel on an Amiga, say Y here and browse the
|
|
||||||
material available in <file:Documentation/m68k>; otherwise say N.
|
|
||||||
|
|
||||||
config ATARI
|
|
||||||
bool "Atari support"
|
|
||||||
select MMU_MOTOROLA if MMU
|
|
||||||
help
|
|
||||||
This option enables support for the 68000-based Atari series of
|
|
||||||
computers (including the TT, Falcon and Medusa). If you plan to use
|
|
||||||
this kernel on an Atari, say Y here and browse the material
|
|
||||||
available in <file:Documentation/m68k>; otherwise say N.
|
|
||||||
|
|
||||||
config MAC
|
|
||||||
bool "Macintosh support"
|
|
||||||
select MMU_MOTOROLA if MMU
|
|
||||||
help
|
|
||||||
This option enables support for the Apple Macintosh series of
|
|
||||||
computers (yes, there is experimental support now, at least for part
|
|
||||||
of the series).
|
|
||||||
|
|
||||||
Say N unless you're willing to code the remaining necessary support.
|
|
||||||
;)
|
|
||||||
|
|
||||||
config NUBUS
|
|
||||||
bool
|
|
||||||
depends on MAC
|
|
||||||
default y
|
|
||||||
|
|
||||||
config M68K_L2_CACHE
|
|
||||||
bool
|
|
||||||
depends on MAC
|
|
||||||
default y
|
|
||||||
|
|
||||||
config APOLLO
|
|
||||||
bool "Apollo support"
|
|
||||||
select MMU_MOTOROLA if MMU
|
|
||||||
help
|
|
||||||
Say Y here if you want to run Linux on an MC680x0-based Apollo
|
|
||||||
Domain workstation such as the DN3500.
|
|
||||||
|
|
||||||
config VME
|
|
||||||
bool "VME (Motorola and BVM) support"
|
|
||||||
select MMU_MOTOROLA if MMU
|
|
||||||
help
|
|
||||||
Say Y here if you want to build a kernel for a 680x0 based VME
|
|
||||||
board. Boards currently supported include Motorola boards MVME147,
|
|
||||||
MVME162, MVME166, MVME167, MVME172, and MVME177. BVME4000 and
|
|
||||||
BVME6000 boards from BVM Ltd are also supported.
|
|
||||||
|
|
||||||
config MVME147
|
|
||||||
bool "MVME147 support"
|
|
||||||
depends on VME
|
|
||||||
help
|
|
||||||
Say Y to include support for early Motorola VME boards. This will
|
|
||||||
build a kernel which can run on MVME147 single-board computers. If
|
|
||||||
you select this option you will have to select the appropriate
|
|
||||||
drivers for SCSI, Ethernet and serial ports later on.
|
|
||||||
|
|
||||||
config MVME16x
|
|
||||||
bool "MVME162, 166 and 167 support"
|
|
||||||
depends on VME
|
|
||||||
help
|
|
||||||
Say Y to include support for Motorola VME boards. This will build a
|
|
||||||
kernel which can run on MVME162, MVME166, MVME167, MVME172, and
|
|
||||||
MVME177 boards. If you select this option you will have to select
|
|
||||||
the appropriate drivers for SCSI, Ethernet and serial ports later
|
|
||||||
on.
|
|
||||||
|
|
||||||
config BVME6000
|
|
||||||
bool "BVME4000 and BVME6000 support"
|
|
||||||
depends on VME
|
|
||||||
help
|
|
||||||
Say Y to include support for VME boards from BVM Ltd. This will
|
|
||||||
build a kernel which can run on BVME4000 and BVME6000 boards. If
|
|
||||||
you select this option you will have to select the appropriate
|
|
||||||
drivers for SCSI, Ethernet and serial ports later on.
|
|
||||||
|
|
||||||
config HP300
|
|
||||||
bool "HP9000/300 and HP9000/400 support"
|
|
||||||
select MMU_MOTOROLA if MMU
|
|
||||||
help
|
|
||||||
This option enables support for the HP9000/300 and HP9000/400 series
|
|
||||||
of workstations. Support for these machines is still somewhat
|
|
||||||
experimental. If you plan to try to use the kernel on such a machine
|
|
||||||
say Y here.
|
|
||||||
Everybody else says N.
|
|
||||||
|
|
||||||
config DIO
|
|
||||||
bool "DIO bus support"
|
|
||||||
depends on HP300
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Say Y here to enable support for the "DIO" expansion bus used in
|
|
||||||
HP300 machines. If you are using such a system you almost certainly
|
|
||||||
want this.
|
|
||||||
|
|
||||||
config SUN3X
|
|
||||||
bool "Sun3x support"
|
|
||||||
select MMU_MOTOROLA if MMU
|
|
||||||
select M68030
|
|
||||||
help
|
|
||||||
This option enables support for the Sun 3x series of workstations.
|
|
||||||
Be warned that this support is very experimental.
|
|
||||||
Note that Sun 3x kernels are not compatible with Sun 3 hardware.
|
|
||||||
General Linux information on the Sun 3x series (now discontinued)
|
|
||||||
is at <http://www.angelfire.com/ca2/tech68k/sun3.html>.
|
|
||||||
|
|
||||||
If you don't want to compile a kernel for a Sun 3x, say N.
|
|
||||||
|
|
||||||
config Q40
|
|
||||||
bool "Q40/Q60 support"
|
|
||||||
select MMU_MOTOROLA if MMU
|
|
||||||
help
|
|
||||||
The Q40 is a Motorola 68040-based successor to the Sinclair QL
|
|
||||||
manufactured in Germany. There is an official Q40 home page at
|
|
||||||
<http://www.q40.de/>. This option enables support for the Q40 and
|
|
||||||
Q60. Select your CPU below. For 68LC060 don't forget to enable FPU
|
|
||||||
emulation.
|
|
||||||
|
|
||||||
config SUN3
|
|
||||||
bool "Sun3 support"
|
|
||||||
depends on !MMU_MOTOROLA
|
|
||||||
select MMU_SUN3 if MMU
|
|
||||||
select M68020
|
|
||||||
help
|
|
||||||
This option enables support for the Sun 3 series of workstations
|
|
||||||
(3/50, 3/60, 3/1xx, 3/2xx systems). Enabling this option requires
|
|
||||||
that all other hardware types must be disabled, as Sun 3 kernels
|
|
||||||
are incompatible with all other m68k targets (including Sun 3x!).
|
|
||||||
|
|
||||||
If you don't want to compile a kernel exclusively for a Sun 3, say N.
|
|
||||||
|
|
||||||
config NATFEAT
|
|
||||||
bool "ARAnyM emulator support"
|
|
||||||
depends on ATARI
|
|
||||||
help
|
|
||||||
This option enables support for ARAnyM native features, such as
|
|
||||||
access to a disk image as /dev/hda.
|
|
||||||
|
|
||||||
config NFBLOCK
|
|
||||||
tristate "NatFeat block device support"
|
|
||||||
depends on BLOCK && NATFEAT
|
|
||||||
help
|
|
||||||
Say Y to include support for the ARAnyM NatFeat block device
|
|
||||||
which allows direct access to the hard drives without using
|
|
||||||
the hardware emulation.
|
|
||||||
|
|
||||||
config NFCON
|
|
||||||
tristate "NatFeat console driver"
|
|
||||||
depends on NATFEAT
|
|
||||||
help
|
|
||||||
Say Y to include support for the ARAnyM NatFeat console driver
|
|
||||||
which allows the console output to be redirected to the stderr
|
|
||||||
output of ARAnyM.
|
|
||||||
|
|
||||||
config NFETH
|
|
||||||
tristate "NatFeat Ethernet support"
|
|
||||||
depends on NET_ETHERNET && NATFEAT
|
|
||||||
help
|
|
||||||
Say Y to include support for the ARAnyM NatFeat network device
|
|
||||||
which will emulate a regular ethernet device while presenting an
|
|
||||||
ethertap device to the host system.
|
|
||||||
|
|
||||||
comment "Processor type"
|
|
||||||
|
|
||||||
config M68020
|
|
||||||
bool "68020 support"
|
|
||||||
help
|
|
||||||
If you anticipate running this kernel on a computer with a MC68020
|
|
||||||
processor, say Y. Otherwise, say N. Note that the 68020 requires a
|
|
||||||
68851 MMU (Memory Management Unit) to run Linux/m68k, except on the
|
|
||||||
Sun 3, which provides its own version.
|
|
||||||
|
|
||||||
config M68030
|
|
||||||
bool "68030 support"
|
|
||||||
depends on !MMU_SUN3
|
|
||||||
help
|
|
||||||
If you anticipate running this kernel on a computer with a MC68030
|
|
||||||
processor, say Y. Otherwise, say N. Note that a MC68EC030 will not
|
|
||||||
work, as it does not include an MMU (Memory Management Unit).
|
|
||||||
|
|
||||||
config M68040
|
|
||||||
bool "68040 support"
|
|
||||||
depends on !MMU_SUN3
|
|
||||||
help
|
|
||||||
If you anticipate running this kernel on a computer with a MC68LC040
|
|
||||||
or MC68040 processor, say Y. Otherwise, say N. Note that an
|
|
||||||
MC68EC040 will not work, as it does not include an MMU (Memory
|
|
||||||
Management Unit).
|
|
||||||
|
|
||||||
config M68060
|
|
||||||
bool "68060 support"
|
|
||||||
depends on !MMU_SUN3
|
|
||||||
help
|
|
||||||
If you anticipate running this kernel on a computer with a MC68060
|
|
||||||
processor, say Y. Otherwise, say N.
|
|
||||||
|
|
||||||
config MMU_MOTOROLA
|
|
||||||
bool
|
|
||||||
|
|
||||||
config MMU_SUN3
|
|
||||||
bool
|
|
||||||
depends on MMU && !MMU_MOTOROLA
|
|
||||||
|
|
||||||
config M68KFPU_EMU
|
|
||||||
bool "Math emulation support (EXPERIMENTAL)"
|
|
||||||
depends on EXPERIMENTAL
|
|
||||||
help
|
|
||||||
At some point in the future, this will cause floating-point math
|
|
||||||
instructions to be emulated by the kernel on machines that lack a
|
|
||||||
floating-point math coprocessor. Thrill-seekers and chronically
|
|
||||||
sleep-deprived psychotic hacker types can say Y now, everyone else
|
|
||||||
should probably wait a while.
|
|
||||||
|
|
||||||
config M68KFPU_EMU_EXTRAPREC
|
|
||||||
bool "Math emulation extra precision"
|
|
||||||
depends on M68KFPU_EMU
|
|
||||||
help
|
|
||||||
The fpu uses normally a few bit more during calculations for
|
|
||||||
correct rounding, the emulator can (often) do the same but this
|
|
||||||
extra calculation can cost quite some time, so you can disable
|
|
||||||
it here. The emulator will then "only" calculate with a 64 bit
|
|
||||||
mantissa and round slightly incorrect, what is more than enough
|
|
||||||
for normal usage.
|
|
||||||
|
|
||||||
config M68KFPU_EMU_ONLY
|
|
||||||
bool "Math emulation only kernel"
|
|
||||||
depends on M68KFPU_EMU
|
|
||||||
help
|
|
||||||
This option prevents any floating-point instructions from being
|
|
||||||
compiled into the kernel, thereby the kernel doesn't save any
|
|
||||||
floating point context anymore during task switches, so this
|
|
||||||
kernel will only be usable on machines without a floating-point
|
|
||||||
math coprocessor. This makes the kernel a bit faster as no tests
|
|
||||||
needs to be executed whether a floating-point instruction in the
|
|
||||||
kernel should be executed or not.
|
|
||||||
|
|
||||||
config ADVANCED
|
|
||||||
bool "Advanced configuration options"
|
|
||||||
---help---
|
|
||||||
This gives you access to some advanced options for the CPU. The
|
|
||||||
defaults should be fine for most users, but these options may make
|
|
||||||
it possible for you to improve performance somewhat if you know what
|
|
||||||
you are doing.
|
|
||||||
|
|
||||||
Note that the answer to this question won't directly affect the
|
|
||||||
kernel: saying N will just cause the configurator to skip all
|
|
||||||
the questions about these options.
|
|
||||||
|
|
||||||
Most users should say N to this question.
|
|
||||||
|
|
||||||
config RMW_INSNS
|
|
||||||
bool "Use read-modify-write instructions"
|
|
||||||
depends on ADVANCED
|
|
||||||
---help---
|
|
||||||
This allows to use certain instructions that work with indivisible
|
|
||||||
read-modify-write bus cycles. While this is faster than the
|
|
||||||
workaround of disabling interrupts, it can conflict with DMA
|
|
||||||
( = direct memory access) on many Amiga systems, and it is also said
|
|
||||||
to destabilize other machines. It is very likely that this will
|
|
||||||
cause serious problems on any Amiga or Atari Medusa if set. The only
|
|
||||||
configuration where it should work are 68030-based Ataris, where it
|
|
||||||
apparently improves performance. But you've been warned! Unless you
|
|
||||||
really know what you are doing, say N. Try Y only if you're quite
|
|
||||||
adventurous.
|
|
||||||
|
|
||||||
config SINGLE_MEMORY_CHUNK
|
|
||||||
bool "Use one physical chunk of memory only" if ADVANCED && !SUN3
|
|
||||||
default y if SUN3
|
|
||||||
select NEED_MULTIPLE_NODES
|
|
||||||
help
|
|
||||||
Ignore all but the first contiguous chunk of physical memory for VM
|
|
||||||
purposes. This will save a few bytes kernel size and may speed up
|
|
||||||
some operations. Say N if not sure.
|
|
||||||
|
|
||||||
config 060_WRITETHROUGH
|
|
||||||
bool "Use write-through caching for 68060 supervisor accesses"
|
|
||||||
depends on ADVANCED && M68060
|
|
||||||
---help---
|
|
||||||
The 68060 generally uses copyback caching of recently accessed data.
|
|
||||||
Copyback caching means that memory writes will be held in an on-chip
|
|
||||||
cache and only written back to memory some time later. Saying Y
|
|
||||||
here will force supervisor (kernel) accesses to use writethrough
|
|
||||||
caching. Writethrough caching means that data is written to memory
|
|
||||||
straight away, so that cache and memory data always agree.
|
|
||||||
Writethrough caching is less efficient, but is needed for some
|
|
||||||
drivers on 68060 based systems where the 68060 bus snooping signal
|
|
||||||
is hardwired on. The 53c710 SCSI driver is known to suffer from
|
|
||||||
this problem.
|
|
||||||
|
|
||||||
config ARCH_DISCONTIGMEM_ENABLE
|
|
||||||
def_bool !SINGLE_MEMORY_CHUNK
|
|
||||||
|
|
||||||
config NODES_SHIFT
|
|
||||||
int
|
|
||||||
default "3"
|
|
||||||
depends on !SINGLE_MEMORY_CHUNK
|
|
||||||
|
|
||||||
source "mm/Kconfig"
|
source "mm/Kconfig"
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "General setup"
|
menu "Executable file formats"
|
||||||
|
|
||||||
source "fs/Kconfig.binfmt"
|
source "fs/Kconfig.binfmt"
|
||||||
|
|
||||||
config ZORRO
|
endmenu
|
||||||
bool "Amiga Zorro (AutoConfig) bus support"
|
|
||||||
depends on AMIGA
|
|
||||||
help
|
|
||||||
This enables support for the Zorro bus in the Amiga. If you have
|
|
||||||
expansion cards in your Amiga that conform to the Amiga
|
|
||||||
AutoConfig(tm) specification, say Y, otherwise N. Note that even
|
|
||||||
expansion cards that do not fit in the Zorro slots but fit in e.g.
|
|
||||||
the CPU slot may fall in this category, so you have to say Y to let
|
|
||||||
Linux use these.
|
|
||||||
|
|
||||||
config AMIGA_PCMCIA
|
if !MMU
|
||||||
bool "Amiga 1200/600 PCMCIA support (EXPERIMENTAL)"
|
menu "Power management options"
|
||||||
depends on AMIGA && EXPERIMENTAL
|
|
||||||
help
|
|
||||||
Include support in the kernel for pcmcia on Amiga 1200 and Amiga
|
|
||||||
600. If you intend to use pcmcia cards say Y; otherwise say N.
|
|
||||||
|
|
||||||
config STRAM_PROC
|
config PM
|
||||||
bool "ST-RAM statistics in /proc"
|
bool "Power Management support"
|
||||||
depends on ATARI
|
help
|
||||||
help
|
Support processor power management modes
|
||||||
Say Y here to report ST-RAM usage statistics in /proc/stram.
|
|
||||||
|
|
||||||
config HEARTBEAT
|
|
||||||
bool "Use power LED as a heartbeat" if AMIGA || APOLLO || ATARI || MAC ||Q40
|
|
||||||
default y if !AMIGA && !APOLLO && !ATARI && !MAC && !Q40 && HP300
|
|
||||||
help
|
|
||||||
Use the power-on LED on your machine as a load meter. The exact
|
|
||||||
behavior is platform-dependent, but normally the flash frequency is
|
|
||||||
a hyperbolic function of the 5-minute load average.
|
|
||||||
|
|
||||||
# We have a dedicated heartbeat LED. :-)
|
|
||||||
config PROC_HARDWARE
|
|
||||||
bool "/proc/hardware support"
|
|
||||||
help
|
|
||||||
Say Y here to support the /proc/hardware file, which gives you
|
|
||||||
access to information about the machine you're running on,
|
|
||||||
including the model, CPU, MMU, clock speed, BogoMIPS rating,
|
|
||||||
and memory size.
|
|
||||||
|
|
||||||
config ISA
|
|
||||||
bool
|
|
||||||
depends on Q40 || AMIGA_PCMCIA
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Find out whether you have ISA slots on your motherboard. ISA is the
|
|
||||||
name of a bus system, i.e. the way the CPU talks to the other stuff
|
|
||||||
inside your box. Other bus systems are PCI, EISA, MicroChannel
|
|
||||||
(MCA) or VESA. ISA is an older system, now being displaced by PCI;
|
|
||||||
newer boards don't support it. If you have ISA, say Y, otherwise N.
|
|
||||||
|
|
||||||
config GENERIC_ISA_DMA
|
|
||||||
bool
|
|
||||||
depends on Q40 || AMIGA_PCMCIA
|
|
||||||
default y
|
|
||||||
|
|
||||||
config ZONE_DMA
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
|
|
||||||
source "drivers/pci/Kconfig"
|
|
||||||
|
|
||||||
source "drivers/zorro/Kconfig"
|
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
endif
|
||||||
|
|
||||||
source "net/Kconfig"
|
source "net/Kconfig"
|
||||||
|
|
||||||
source "drivers/Kconfig"
|
source "drivers/Kconfig"
|
||||||
|
|
||||||
|
if MMU
|
||||||
|
|
||||||
menu "Character devices"
|
menu "Character devices"
|
||||||
|
|
||||||
config ATARI_MFPSER
|
config ATARI_MFPSER
|
||||||
|
@ -627,6 +235,8 @@ config SERIAL_CONSOLE
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
source "fs/Kconfig"
|
source "fs/Kconfig"
|
||||||
|
|
||||||
source "arch/m68k/Kconfig.debug"
|
source "arch/m68k/Kconfig.debug"
|
||||||
|
|
|
@ -2,4 +2,38 @@ menu "Kernel hacking"
|
||||||
|
|
||||||
source "lib/Kconfig.debug"
|
source "lib/Kconfig.debug"
|
||||||
|
|
||||||
|
if !MMU
|
||||||
|
|
||||||
|
config FULLDEBUG
|
||||||
|
bool "Full Symbolic/Source Debugging support"
|
||||||
|
help
|
||||||
|
Enable debugging symbols on kernel build.
|
||||||
|
|
||||||
|
config HIGHPROFILE
|
||||||
|
bool "Use fast second timer for profiling"
|
||||||
|
depends on COLDFIRE
|
||||||
|
help
|
||||||
|
Use a fast secondary clock to produce profiling information.
|
||||||
|
|
||||||
|
config BOOTPARAM
|
||||||
|
bool 'Compiled-in Kernel Boot Parameter'
|
||||||
|
|
||||||
|
config BOOTPARAM_STRING
|
||||||
|
string 'Kernel Boot Parameter'
|
||||||
|
default 'console=ttyS0,19200'
|
||||||
|
depends on BOOTPARAM
|
||||||
|
|
||||||
|
config NO_KERNEL_MSG
|
||||||
|
bool "Suppress Kernel BUG Messages"
|
||||||
|
help
|
||||||
|
Do not output any debug BUG messages within the kernel.
|
||||||
|
|
||||||
|
config BDM_DISABLE
|
||||||
|
bool "Disable BDM signals"
|
||||||
|
depends on (EXPERIMENTAL && COLDFIRE)
|
||||||
|
help
|
||||||
|
Disable the ColdFire CPU's BDM signals.
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
|
@ -0,0 +1,417 @@
|
||||||
|
config GENERIC_IOMAP
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
|
||||||
|
config ARCH_MAY_HAVE_PC_FDC
|
||||||
|
bool
|
||||||
|
depends on BROKEN && (Q40 || SUN3X)
|
||||||
|
default y
|
||||||
|
|
||||||
|
config ARCH_USES_GETTIMEOFFSET
|
||||||
|
def_bool y
|
||||||
|
|
||||||
|
config EISA
|
||||||
|
bool
|
||||||
|
---help---
|
||||||
|
The Extended Industry Standard Architecture (EISA) bus was
|
||||||
|
developed as an open alternative to the IBM MicroChannel bus.
|
||||||
|
|
||||||
|
The EISA bus provided some of the features of the IBM MicroChannel
|
||||||
|
bus while maintaining backward compatibility with cards made for
|
||||||
|
the older ISA bus. The EISA bus saw limited use between 1988 and
|
||||||
|
1995 when it was made obsolete by the PCI bus.
|
||||||
|
|
||||||
|
Say Y here if you are building a kernel for an EISA-based machine.
|
||||||
|
|
||||||
|
Otherwise, say N.
|
||||||
|
|
||||||
|
config MCA
|
||||||
|
bool
|
||||||
|
help
|
||||||
|
MicroChannel Architecture is found in some IBM PS/2 machines and
|
||||||
|
laptops. It is a bus system similar to PCI or ISA. See
|
||||||
|
<file:Documentation/mca.txt> (and especially the web page given
|
||||||
|
there) before attempting to build an MCA bus kernel.
|
||||||
|
|
||||||
|
config PCMCIA
|
||||||
|
tristate
|
||||||
|
---help---
|
||||||
|
Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
|
||||||
|
computer. These are credit-card size devices such as network cards,
|
||||||
|
modems or hard drives often used with laptops computers. There are
|
||||||
|
actually two varieties of these cards: the older 16 bit PCMCIA cards
|
||||||
|
and the newer 32 bit CardBus cards. If you want to use CardBus
|
||||||
|
cards, you need to say Y here and also to "CardBus support" below.
|
||||||
|
|
||||||
|
To use your PC-cards, you will need supporting software from David
|
||||||
|
Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
|
||||||
|
for location). Please also read the PCMCIA-HOWTO, available from
|
||||||
|
<http://www.tldp.org/docs.html#howto>.
|
||||||
|
|
||||||
|
To compile this driver as modules, choose M here: the
|
||||||
|
modules will be called pcmcia_core and ds.
|
||||||
|
|
||||||
|
config AMIGA
|
||||||
|
bool "Amiga support"
|
||||||
|
select MMU_MOTOROLA if MMU
|
||||||
|
help
|
||||||
|
This option enables support for the Amiga series of computers. If
|
||||||
|
you plan to use this kernel on an Amiga, say Y here and browse the
|
||||||
|
material available in <file:Documentation/m68k>; otherwise say N.
|
||||||
|
|
||||||
|
config ATARI
|
||||||
|
bool "Atari support"
|
||||||
|
select MMU_MOTOROLA if MMU
|
||||||
|
help
|
||||||
|
This option enables support for the 68000-based Atari series of
|
||||||
|
computers (including the TT, Falcon and Medusa). If you plan to use
|
||||||
|
this kernel on an Atari, say Y here and browse the material
|
||||||
|
available in <file:Documentation/m68k>; otherwise say N.
|
||||||
|
|
||||||
|
config MAC
|
||||||
|
bool "Macintosh support"
|
||||||
|
select MMU_MOTOROLA if MMU
|
||||||
|
help
|
||||||
|
This option enables support for the Apple Macintosh series of
|
||||||
|
computers (yes, there is experimental support now, at least for part
|
||||||
|
of the series).
|
||||||
|
|
||||||
|
Say N unless you're willing to code the remaining necessary support.
|
||||||
|
;)
|
||||||
|
|
||||||
|
config NUBUS
|
||||||
|
bool
|
||||||
|
depends on MAC
|
||||||
|
default y
|
||||||
|
|
||||||
|
config M68K_L2_CACHE
|
||||||
|
bool
|
||||||
|
depends on MAC
|
||||||
|
default y
|
||||||
|
|
||||||
|
config APOLLO
|
||||||
|
bool "Apollo support"
|
||||||
|
select MMU_MOTOROLA if MMU
|
||||||
|
help
|
||||||
|
Say Y here if you want to run Linux on an MC680x0-based Apollo
|
||||||
|
Domain workstation such as the DN3500.
|
||||||
|
|
||||||
|
config VME
|
||||||
|
bool "VME (Motorola and BVM) support"
|
||||||
|
select MMU_MOTOROLA if MMU
|
||||||
|
help
|
||||||
|
Say Y here if you want to build a kernel for a 680x0 based VME
|
||||||
|
board. Boards currently supported include Motorola boards MVME147,
|
||||||
|
MVME162, MVME166, MVME167, MVME172, and MVME177. BVME4000 and
|
||||||
|
BVME6000 boards from BVM Ltd are also supported.
|
||||||
|
|
||||||
|
config MVME147
|
||||||
|
bool "MVME147 support"
|
||||||
|
depends on VME
|
||||||
|
help
|
||||||
|
Say Y to include support for early Motorola VME boards. This will
|
||||||
|
build a kernel which can run on MVME147 single-board computers. If
|
||||||
|
you select this option you will have to select the appropriate
|
||||||
|
drivers for SCSI, Ethernet and serial ports later on.
|
||||||
|
|
||||||
|
config MVME16x
|
||||||
|
bool "MVME162, 166 and 167 support"
|
||||||
|
depends on VME
|
||||||
|
help
|
||||||
|
Say Y to include support for Motorola VME boards. This will build a
|
||||||
|
kernel which can run on MVME162, MVME166, MVME167, MVME172, and
|
||||||
|
MVME177 boards. If you select this option you will have to select
|
||||||
|
the appropriate drivers for SCSI, Ethernet and serial ports later
|
||||||
|
on.
|
||||||
|
|
||||||
|
config BVME6000
|
||||||
|
bool "BVME4000 and BVME6000 support"
|
||||||
|
depends on VME
|
||||||
|
help
|
||||||
|
Say Y to include support for VME boards from BVM Ltd. This will
|
||||||
|
build a kernel which can run on BVME4000 and BVME6000 boards. If
|
||||||
|
you select this option you will have to select the appropriate
|
||||||
|
drivers for SCSI, Ethernet and serial ports later on.
|
||||||
|
|
||||||
|
config HP300
|
||||||
|
bool "HP9000/300 and HP9000/400 support"
|
||||||
|
select MMU_MOTOROLA if MMU
|
||||||
|
help
|
||||||
|
This option enables support for the HP9000/300 and HP9000/400 series
|
||||||
|
of workstations. Support for these machines is still somewhat
|
||||||
|
experimental. If you plan to try to use the kernel on such a machine
|
||||||
|
say Y here.
|
||||||
|
Everybody else says N.
|
||||||
|
|
||||||
|
config DIO
|
||||||
|
bool "DIO bus support"
|
||||||
|
depends on HP300
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Say Y here to enable support for the "DIO" expansion bus used in
|
||||||
|
HP300 machines. If you are using such a system you almost certainly
|
||||||
|
want this.
|
||||||
|
|
||||||
|
config SUN3X
|
||||||
|
bool "Sun3x support"
|
||||||
|
select MMU_MOTOROLA if MMU
|
||||||
|
select M68030
|
||||||
|
help
|
||||||
|
This option enables support for the Sun 3x series of workstations.
|
||||||
|
Be warned that this support is very experimental.
|
||||||
|
Note that Sun 3x kernels are not compatible with Sun 3 hardware.
|
||||||
|
General Linux information on the Sun 3x series (now discontinued)
|
||||||
|
is at <http://www.angelfire.com/ca2/tech68k/sun3.html>.
|
||||||
|
|
||||||
|
If you don't want to compile a kernel for a Sun 3x, say N.
|
||||||
|
|
||||||
|
config Q40
|
||||||
|
bool "Q40/Q60 support"
|
||||||
|
select MMU_MOTOROLA if MMU
|
||||||
|
help
|
||||||
|
The Q40 is a Motorola 68040-based successor to the Sinclair QL
|
||||||
|
manufactured in Germany. There is an official Q40 home page at
|
||||||
|
<http://www.q40.de/>. This option enables support for the Q40 and
|
||||||
|
Q60. Select your CPU below. For 68LC060 don't forget to enable FPU
|
||||||
|
emulation.
|
||||||
|
|
||||||
|
config SUN3
|
||||||
|
bool "Sun3 support"
|
||||||
|
depends on !MMU_MOTOROLA
|
||||||
|
select MMU_SUN3 if MMU
|
||||||
|
select M68020
|
||||||
|
help
|
||||||
|
This option enables support for the Sun 3 series of workstations
|
||||||
|
(3/50, 3/60, 3/1xx, 3/2xx systems). Enabling this option requires
|
||||||
|
that all other hardware types must be disabled, as Sun 3 kernels
|
||||||
|
are incompatible with all other m68k targets (including Sun 3x!).
|
||||||
|
|
||||||
|
If you don't want to compile a kernel exclusively for a Sun 3, say N.
|
||||||
|
|
||||||
|
config NATFEAT
|
||||||
|
bool "ARAnyM emulator support"
|
||||||
|
depends on ATARI
|
||||||
|
help
|
||||||
|
This option enables support for ARAnyM native features, such as
|
||||||
|
access to a disk image as /dev/hda.
|
||||||
|
|
||||||
|
config NFBLOCK
|
||||||
|
tristate "NatFeat block device support"
|
||||||
|
depends on BLOCK && NATFEAT
|
||||||
|
help
|
||||||
|
Say Y to include support for the ARAnyM NatFeat block device
|
||||||
|
which allows direct access to the hard drives without using
|
||||||
|
the hardware emulation.
|
||||||
|
|
||||||
|
config NFCON
|
||||||
|
tristate "NatFeat console driver"
|
||||||
|
depends on NATFEAT
|
||||||
|
help
|
||||||
|
Say Y to include support for the ARAnyM NatFeat console driver
|
||||||
|
which allows the console output to be redirected to the stderr
|
||||||
|
output of ARAnyM.
|
||||||
|
|
||||||
|
config NFETH
|
||||||
|
tristate "NatFeat Ethernet support"
|
||||||
|
depends on NET_ETHERNET && NATFEAT
|
||||||
|
help
|
||||||
|
Say Y to include support for the ARAnyM NatFeat network device
|
||||||
|
which will emulate a regular ethernet device while presenting an
|
||||||
|
ethertap device to the host system.
|
||||||
|
|
||||||
|
comment "Processor type"
|
||||||
|
|
||||||
|
config M68020
|
||||||
|
bool "68020 support"
|
||||||
|
help
|
||||||
|
If you anticipate running this kernel on a computer with a MC68020
|
||||||
|
processor, say Y. Otherwise, say N. Note that the 68020 requires a
|
||||||
|
68851 MMU (Memory Management Unit) to run Linux/m68k, except on the
|
||||||
|
Sun 3, which provides its own version.
|
||||||
|
|
||||||
|
config M68030
|
||||||
|
bool "68030 support"
|
||||||
|
depends on !MMU_SUN3
|
||||||
|
help
|
||||||
|
If you anticipate running this kernel on a computer with a MC68030
|
||||||
|
processor, say Y. Otherwise, say N. Note that a MC68EC030 will not
|
||||||
|
work, as it does not include an MMU (Memory Management Unit).
|
||||||
|
|
||||||
|
config M68040
|
||||||
|
bool "68040 support"
|
||||||
|
depends on !MMU_SUN3
|
||||||
|
help
|
||||||
|
If you anticipate running this kernel on a computer with a MC68LC040
|
||||||
|
or MC68040 processor, say Y. Otherwise, say N. Note that an
|
||||||
|
MC68EC040 will not work, as it does not include an MMU (Memory
|
||||||
|
Management Unit).
|
||||||
|
|
||||||
|
config M68060
|
||||||
|
bool "68060 support"
|
||||||
|
depends on !MMU_SUN3
|
||||||
|
help
|
||||||
|
If you anticipate running this kernel on a computer with a MC68060
|
||||||
|
processor, say Y. Otherwise, say N.
|
||||||
|
|
||||||
|
config MMU_MOTOROLA
|
||||||
|
bool
|
||||||
|
|
||||||
|
config MMU_SUN3
|
||||||
|
bool
|
||||||
|
depends on MMU && !MMU_MOTOROLA
|
||||||
|
|
||||||
|
config M68KFPU_EMU
|
||||||
|
bool "Math emulation support (EXPERIMENTAL)"
|
||||||
|
depends on EXPERIMENTAL
|
||||||
|
help
|
||||||
|
At some point in the future, this will cause floating-point math
|
||||||
|
instructions to be emulated by the kernel on machines that lack a
|
||||||
|
floating-point math coprocessor. Thrill-seekers and chronically
|
||||||
|
sleep-deprived psychotic hacker types can say Y now, everyone else
|
||||||
|
should probably wait a while.
|
||||||
|
|
||||||
|
config M68KFPU_EMU_EXTRAPREC
|
||||||
|
bool "Math emulation extra precision"
|
||||||
|
depends on M68KFPU_EMU
|
||||||
|
help
|
||||||
|
The fpu uses normally a few bit more during calculations for
|
||||||
|
correct rounding, the emulator can (often) do the same but this
|
||||||
|
extra calculation can cost quite some time, so you can disable
|
||||||
|
it here. The emulator will then "only" calculate with a 64 bit
|
||||||
|
mantissa and round slightly incorrect, what is more than enough
|
||||||
|
for normal usage.
|
||||||
|
|
||||||
|
config M68KFPU_EMU_ONLY
|
||||||
|
bool "Math emulation only kernel"
|
||||||
|
depends on M68KFPU_EMU
|
||||||
|
help
|
||||||
|
This option prevents any floating-point instructions from being
|
||||||
|
compiled into the kernel, thereby the kernel doesn't save any
|
||||||
|
floating point context anymore during task switches, so this
|
||||||
|
kernel will only be usable on machines without a floating-point
|
||||||
|
math coprocessor. This makes the kernel a bit faster as no tests
|
||||||
|
needs to be executed whether a floating-point instruction in the
|
||||||
|
kernel should be executed or not.
|
||||||
|
|
||||||
|
config ADVANCED
|
||||||
|
bool "Advanced configuration options"
|
||||||
|
---help---
|
||||||
|
This gives you access to some advanced options for the CPU. The
|
||||||
|
defaults should be fine for most users, but these options may make
|
||||||
|
it possible for you to improve performance somewhat if you know what
|
||||||
|
you are doing.
|
||||||
|
|
||||||
|
Note that the answer to this question won't directly affect the
|
||||||
|
kernel: saying N will just cause the configurator to skip all
|
||||||
|
the questions about these options.
|
||||||
|
|
||||||
|
Most users should say N to this question.
|
||||||
|
|
||||||
|
config RMW_INSNS
|
||||||
|
bool "Use read-modify-write instructions"
|
||||||
|
depends on ADVANCED
|
||||||
|
---help---
|
||||||
|
This allows to use certain instructions that work with indivisible
|
||||||
|
read-modify-write bus cycles. While this is faster than the
|
||||||
|
workaround of disabling interrupts, it can conflict with DMA
|
||||||
|
( = direct memory access) on many Amiga systems, and it is also said
|
||||||
|
to destabilize other machines. It is very likely that this will
|
||||||
|
cause serious problems on any Amiga or Atari Medusa if set. The only
|
||||||
|
configuration where it should work are 68030-based Ataris, where it
|
||||||
|
apparently improves performance. But you've been warned! Unless you
|
||||||
|
really know what you are doing, say N. Try Y only if you're quite
|
||||||
|
adventurous.
|
||||||
|
|
||||||
|
config SINGLE_MEMORY_CHUNK
|
||||||
|
bool "Use one physical chunk of memory only" if ADVANCED && !SUN3
|
||||||
|
default y if SUN3
|
||||||
|
select NEED_MULTIPLE_NODES
|
||||||
|
help
|
||||||
|
Ignore all but the first contiguous chunk of physical memory for VM
|
||||||
|
purposes. This will save a few bytes kernel size and may speed up
|
||||||
|
some operations. Say N if not sure.
|
||||||
|
|
||||||
|
config 060_WRITETHROUGH
|
||||||
|
bool "Use write-through caching for 68060 supervisor accesses"
|
||||||
|
depends on ADVANCED && M68060
|
||||||
|
---help---
|
||||||
|
The 68060 generally uses copyback caching of recently accessed data.
|
||||||
|
Copyback caching means that memory writes will be held in an on-chip
|
||||||
|
cache and only written back to memory some time later. Saying Y
|
||||||
|
here will force supervisor (kernel) accesses to use writethrough
|
||||||
|
caching. Writethrough caching means that data is written to memory
|
||||||
|
straight away, so that cache and memory data always agree.
|
||||||
|
Writethrough caching is less efficient, but is needed for some
|
||||||
|
drivers on 68060 based systems where the 68060 bus snooping signal
|
||||||
|
is hardwired on. The 53c710 SCSI driver is known to suffer from
|
||||||
|
this problem.
|
||||||
|
|
||||||
|
config ARCH_DISCONTIGMEM_ENABLE
|
||||||
|
def_bool !SINGLE_MEMORY_CHUNK
|
||||||
|
|
||||||
|
config NODES_SHIFT
|
||||||
|
int
|
||||||
|
default "3"
|
||||||
|
depends on !SINGLE_MEMORY_CHUNK
|
||||||
|
|
||||||
|
config ZORRO
|
||||||
|
bool "Amiga Zorro (AutoConfig) bus support"
|
||||||
|
depends on AMIGA
|
||||||
|
help
|
||||||
|
This enables support for the Zorro bus in the Amiga. If you have
|
||||||
|
expansion cards in your Amiga that conform to the Amiga
|
||||||
|
AutoConfig(tm) specification, say Y, otherwise N. Note that even
|
||||||
|
expansion cards that do not fit in the Zorro slots but fit in e.g.
|
||||||
|
the CPU slot may fall in this category, so you have to say Y to let
|
||||||
|
Linux use these.
|
||||||
|
|
||||||
|
config AMIGA_PCMCIA
|
||||||
|
bool "Amiga 1200/600 PCMCIA support (EXPERIMENTAL)"
|
||||||
|
depends on AMIGA && EXPERIMENTAL
|
||||||
|
help
|
||||||
|
Include support in the kernel for pcmcia on Amiga 1200 and Amiga
|
||||||
|
600. If you intend to use pcmcia cards say Y; otherwise say N.
|
||||||
|
|
||||||
|
config STRAM_PROC
|
||||||
|
bool "ST-RAM statistics in /proc"
|
||||||
|
depends on ATARI
|
||||||
|
help
|
||||||
|
Say Y here to report ST-RAM usage statistics in /proc/stram.
|
||||||
|
|
||||||
|
config HEARTBEAT
|
||||||
|
bool "Use power LED as a heartbeat" if AMIGA || APOLLO || ATARI || MAC ||Q40
|
||||||
|
default y if !AMIGA && !APOLLO && !ATARI && !MAC && !Q40 && HP300
|
||||||
|
help
|
||||||
|
Use the power-on LED on your machine as a load meter. The exact
|
||||||
|
behavior is platform-dependent, but normally the flash frequency is
|
||||||
|
a hyperbolic function of the 5-minute load average.
|
||||||
|
|
||||||
|
# We have a dedicated heartbeat LED. :-)
|
||||||
|
config PROC_HARDWARE
|
||||||
|
bool "/proc/hardware support"
|
||||||
|
help
|
||||||
|
Say Y here to support the /proc/hardware file, which gives you
|
||||||
|
access to information about the machine you're running on,
|
||||||
|
including the model, CPU, MMU, clock speed, BogoMIPS rating,
|
||||||
|
and memory size.
|
||||||
|
|
||||||
|
config ISA
|
||||||
|
bool
|
||||||
|
depends on Q40 || AMIGA_PCMCIA
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Find out whether you have ISA slots on your motherboard. ISA is the
|
||||||
|
name of a bus system, i.e. the way the CPU talks to the other stuff
|
||||||
|
inside your box. Other bus systems are PCI, EISA, MicroChannel
|
||||||
|
(MCA) or VESA. ISA is an older system, now being displaced by PCI;
|
||||||
|
newer boards don't support it. If you have ISA, say Y, otherwise N.
|
||||||
|
|
||||||
|
config GENERIC_ISA_DMA
|
||||||
|
bool
|
||||||
|
depends on Q40 || AMIGA_PCMCIA
|
||||||
|
default y
|
||||||
|
|
||||||
|
source "drivers/pci/Kconfig"
|
||||||
|
|
||||||
|
source "drivers/zorro/Kconfig"
|
||||||
|
|
|
@ -1,43 +1,7 @@
|
||||||
config M68K
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
select HAVE_IDE
|
|
||||||
select HAVE_GENERIC_HARDIRQS
|
|
||||||
select GENERIC_HARDIRQS_NO_DEPRECATED
|
|
||||||
|
|
||||||
config MMU
|
|
||||||
bool
|
|
||||||
default n
|
|
||||||
|
|
||||||
config NO_DMA
|
|
||||||
bool
|
|
||||||
depends on !COLDFIRE
|
|
||||||
default y
|
|
||||||
|
|
||||||
config FPU
|
config FPU
|
||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config ZONE_DMA
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
|
|
||||||
config RWSEM_GENERIC_SPINLOCK
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
|
|
||||||
config RWSEM_XCHGADD_ALGORITHM
|
|
||||||
bool
|
|
||||||
default n
|
|
||||||
|
|
||||||
config ARCH_HAS_ILOG2_U32
|
|
||||||
bool
|
|
||||||
default n
|
|
||||||
|
|
||||||
config ARCH_HAS_ILOG2_U64
|
|
||||||
bool
|
|
||||||
default n
|
|
||||||
|
|
||||||
config GENERIC_FIND_NEXT_BIT
|
config GENERIC_FIND_NEXT_BIT
|
||||||
bool
|
bool
|
||||||
default y
|
default y
|
||||||
|
@ -46,29 +10,14 @@ config GENERIC_GPIO
|
||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config GENERIC_HWEIGHT
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
|
|
||||||
config GENERIC_CALIBRATE_DELAY
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
|
|
||||||
config GENERIC_CMOS_UPDATE
|
config GENERIC_CMOS_UPDATE
|
||||||
bool
|
bool
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config TIME_LOW_RES
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
|
|
||||||
config GENERIC_CLOCKEVENTS
|
config GENERIC_CLOCKEVENTS
|
||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config NO_IOPORT
|
|
||||||
def_bool y
|
|
||||||
|
|
||||||
config COLDFIRE_SW_A7
|
config COLDFIRE_SW_A7
|
||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
|
@ -85,12 +34,6 @@ config HAVE_MBAR
|
||||||
config HAVE_IPSBAR
|
config HAVE_IPSBAR
|
||||||
bool
|
bool
|
||||||
|
|
||||||
source "init/Kconfig"
|
|
||||||
|
|
||||||
source "kernel/Kconfig.freezer"
|
|
||||||
|
|
||||||
menu "Processor type and features"
|
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "CPU"
|
prompt "CPU"
|
||||||
default M68EZ328
|
default M68EZ328
|
||||||
|
@ -630,11 +573,6 @@ config 4KSTACKS
|
||||||
running more threads on a system and also reduces the pressure
|
running more threads on a system and also reduces the pressure
|
||||||
on the VM subsystem for higher order allocations.
|
on the VM subsystem for higher order allocations.
|
||||||
|
|
||||||
config HZ
|
|
||||||
int
|
|
||||||
default 1000 if CLEOPATRA
|
|
||||||
default 100
|
|
||||||
|
|
||||||
comment "RAM configuration"
|
comment "RAM configuration"
|
||||||
|
|
||||||
config RAMBASE
|
config RAMBASE
|
||||||
|
@ -803,10 +741,6 @@ endif
|
||||||
|
|
||||||
source "kernel/time/Kconfig"
|
source "kernel/time/Kconfig"
|
||||||
|
|
||||||
source "mm/Kconfig"
|
|
||||||
|
|
||||||
endmenu
|
|
||||||
|
|
||||||
config ISA_DMA_API
|
config ISA_DMA_API
|
||||||
bool
|
bool
|
||||||
depends on !M5272
|
depends on !M5272
|
||||||
|
@ -814,31 +748,3 @@ config ISA_DMA_API
|
||||||
|
|
||||||
source "drivers/pcmcia/Kconfig"
|
source "drivers/pcmcia/Kconfig"
|
||||||
|
|
||||||
menu "Executable file formats"
|
|
||||||
|
|
||||||
source "fs/Kconfig.binfmt"
|
|
||||||
|
|
||||||
endmenu
|
|
||||||
|
|
||||||
menu "Power management options"
|
|
||||||
|
|
||||||
config PM
|
|
||||||
bool "Power Management support"
|
|
||||||
help
|
|
||||||
Support processor power management modes
|
|
||||||
|
|
||||||
endmenu
|
|
||||||
|
|
||||||
source "net/Kconfig"
|
|
||||||
|
|
||||||
source "drivers/Kconfig"
|
|
||||||
|
|
||||||
source "fs/Kconfig"
|
|
||||||
|
|
||||||
source "arch/m68knommu/Kconfig.debug"
|
|
||||||
|
|
||||||
source "security/Kconfig"
|
|
||||||
|
|
||||||
source "crypto/Kconfig"
|
|
||||||
|
|
||||||
source "lib/Kconfig"
|
|
|
@ -1,123 +1,7 @@
|
||||||
#
|
|
||||||
# m68k/Makefile
|
|
||||||
#
|
|
||||||
# This file is included by the global makefile so that you can add your own
|
|
||||||
# architecture-specific flags and dependencies. Remember to do have actions
|
|
||||||
# for "archclean" and "archdep" for cleaning up and making dependencies for
|
|
||||||
# this architecture
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
# Copyright (C) 1994 by Hamish Macdonald
|
|
||||||
#
|
|
||||||
|
|
||||||
KBUILD_DEFCONFIG := multi_defconfig
|
KBUILD_DEFCONFIG := multi_defconfig
|
||||||
|
|
||||||
# override top level makefile
|
ifdef CONFIG_MMU
|
||||||
AS += -m68020
|
include $(srctree)/arch/m68k/Makefile_mm
|
||||||
LDFLAGS := -m m68kelf
|
|
||||||
KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds
|
|
||||||
ifneq ($(SUBARCH),$(ARCH))
|
|
||||||
ifeq ($(CROSS_COMPILE),)
|
|
||||||
CROSS_COMPILE := $(call cc-cross-prefix, \
|
|
||||||
m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef CONFIG_SUN3
|
|
||||||
LDFLAGS_vmlinux = -N
|
|
||||||
endif
|
|
||||||
|
|
||||||
CHECKFLAGS += -D__mc68000__
|
|
||||||
|
|
||||||
# without -fno-strength-reduce the 53c7xx.c driver fails ;-(
|
|
||||||
KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2
|
|
||||||
|
|
||||||
# enable processor switch if compiled only for a single cpu
|
|
||||||
ifndef CONFIG_M68020
|
|
||||||
ifndef CONFIG_M68030
|
|
||||||
|
|
||||||
ifndef CONFIG_M68060
|
|
||||||
KBUILD_CFLAGS += -m68040
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef CONFIG_M68040
|
|
||||||
KBUILD_CFLAGS += -m68060
|
|
||||||
endif
|
|
||||||
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef CONFIG_KGDB
|
|
||||||
# If configured for kgdb support, include debugging infos and keep the
|
|
||||||
# frame pointer
|
|
||||||
KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef CONFIG_SUN3
|
|
||||||
head-y := arch/m68k/kernel/head.o
|
|
||||||
else
|
else
|
||||||
head-y := arch/m68k/kernel/sun3-head.o
|
include $(srctree)/arch/m68k/Makefile_no
|
||||||
endif
|
endif
|
||||||
|
|
||||||
core-y += arch/m68k/kernel/ arch/m68k/mm/
|
|
||||||
libs-y += arch/m68k/lib/
|
|
||||||
|
|
||||||
core-$(CONFIG_Q40) += arch/m68k/q40/
|
|
||||||
core-$(CONFIG_AMIGA) += arch/m68k/amiga/
|
|
||||||
core-$(CONFIG_ATARI) += arch/m68k/atari/
|
|
||||||
core-$(CONFIG_MAC) += arch/m68k/mac/
|
|
||||||
core-$(CONFIG_HP300) += arch/m68k/hp300/
|
|
||||||
core-$(CONFIG_APOLLO) += arch/m68k/apollo/
|
|
||||||
core-$(CONFIG_MVME147) += arch/m68k/mvme147/
|
|
||||||
core-$(CONFIG_MVME16x) += arch/m68k/mvme16x/
|
|
||||||
core-$(CONFIG_BVME6000) += arch/m68k/bvme6000/
|
|
||||||
core-$(CONFIG_SUN3X) += arch/m68k/sun3x/ arch/m68k/sun3/
|
|
||||||
core-$(CONFIG_SUN3) += arch/m68k/sun3/ arch/m68k/sun3/prom/
|
|
||||||
core-$(CONFIG_NATFEAT) += arch/m68k/emu/
|
|
||||||
core-$(CONFIG_M68040) += arch/m68k/fpsp040/
|
|
||||||
core-$(CONFIG_M68060) += arch/m68k/ifpsp060/
|
|
||||||
core-$(CONFIG_M68KFPU_EMU) += arch/m68k/math-emu/
|
|
||||||
|
|
||||||
all: zImage
|
|
||||||
|
|
||||||
lilo: vmlinux
|
|
||||||
if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi
|
|
||||||
if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
|
|
||||||
cat vmlinux > $(INSTALL_PATH)/vmlinux
|
|
||||||
cp System.map $(INSTALL_PATH)/System.map
|
|
||||||
if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
|
|
||||||
|
|
||||||
zImage compressed: vmlinux.gz
|
|
||||||
|
|
||||||
vmlinux.gz: vmlinux
|
|
||||||
|
|
||||||
ifndef CONFIG_KGDB
|
|
||||||
cp vmlinux vmlinux.tmp
|
|
||||||
$(STRIP) vmlinux.tmp
|
|
||||||
gzip -9c vmlinux.tmp >vmlinux.gz
|
|
||||||
rm vmlinux.tmp
|
|
||||||
else
|
|
||||||
gzip -9c vmlinux >vmlinux.gz
|
|
||||||
endif
|
|
||||||
|
|
||||||
bzImage: vmlinux.bz2
|
|
||||||
|
|
||||||
vmlinux.bz2: vmlinux
|
|
||||||
|
|
||||||
ifndef CONFIG_KGDB
|
|
||||||
cp vmlinux vmlinux.tmp
|
|
||||||
$(STRIP) vmlinux.tmp
|
|
||||||
bzip2 -1c vmlinux.tmp >vmlinux.bz2
|
|
||||||
rm vmlinux.tmp
|
|
||||||
else
|
|
||||||
bzip2 -1c vmlinux >vmlinux.bz2
|
|
||||||
endif
|
|
||||||
|
|
||||||
archclean:
|
|
||||||
rm -f vmlinux.gz vmlinux.bz2
|
|
||||||
|
|
||||||
install:
|
|
||||||
sh $(srctree)/arch/m68k/install.sh $(KERNELRELEASE) vmlinux.gz System.map "$(INSTALL_PATH)"
|
|
||||||
|
|
|
@ -0,0 +1,121 @@
|
||||||
|
#
|
||||||
|
# m68k/Makefile
|
||||||
|
#
|
||||||
|
# This file is included by the global makefile so that you can add your own
|
||||||
|
# architecture-specific flags and dependencies. Remember to do have actions
|
||||||
|
# for "archclean" and "archdep" for cleaning up and making dependencies for
|
||||||
|
# this architecture
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
# Copyright (C) 1994 by Hamish Macdonald
|
||||||
|
#
|
||||||
|
|
||||||
|
# override top level makefile
|
||||||
|
AS += -m68020
|
||||||
|
LDFLAGS := -m m68kelf
|
||||||
|
KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds
|
||||||
|
ifneq ($(SUBARCH),$(ARCH))
|
||||||
|
ifeq ($(CROSS_COMPILE),)
|
||||||
|
CROSS_COMPILE := $(call cc-cross-prefix, \
|
||||||
|
m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef CONFIG_SUN3
|
||||||
|
LDFLAGS_vmlinux = -N
|
||||||
|
endif
|
||||||
|
|
||||||
|
CHECKFLAGS += -D__mc68000__
|
||||||
|
|
||||||
|
# without -fno-strength-reduce the 53c7xx.c driver fails ;-(
|
||||||
|
KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2
|
||||||
|
|
||||||
|
# enable processor switch if compiled only for a single cpu
|
||||||
|
ifndef CONFIG_M68020
|
||||||
|
ifndef CONFIG_M68030
|
||||||
|
|
||||||
|
ifndef CONFIG_M68060
|
||||||
|
KBUILD_CFLAGS += -m68040
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef CONFIG_M68040
|
||||||
|
KBUILD_CFLAGS += -m68060
|
||||||
|
endif
|
||||||
|
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef CONFIG_KGDB
|
||||||
|
# If configured for kgdb support, include debugging infos and keep the
|
||||||
|
# frame pointer
|
||||||
|
KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef CONFIG_SUN3
|
||||||
|
head-y := arch/m68k/kernel/head.o
|
||||||
|
else
|
||||||
|
head-y := arch/m68k/kernel/sun3-head.o
|
||||||
|
endif
|
||||||
|
|
||||||
|
core-y += arch/m68k/kernel/ arch/m68k/mm/
|
||||||
|
libs-y += arch/m68k/lib/
|
||||||
|
|
||||||
|
core-$(CONFIG_Q40) += arch/m68k/q40/
|
||||||
|
core-$(CONFIG_AMIGA) += arch/m68k/amiga/
|
||||||
|
core-$(CONFIG_ATARI) += arch/m68k/atari/
|
||||||
|
core-$(CONFIG_MAC) += arch/m68k/mac/
|
||||||
|
core-$(CONFIG_HP300) += arch/m68k/hp300/
|
||||||
|
core-$(CONFIG_APOLLO) += arch/m68k/apollo/
|
||||||
|
core-$(CONFIG_MVME147) += arch/m68k/mvme147/
|
||||||
|
core-$(CONFIG_MVME16x) += arch/m68k/mvme16x/
|
||||||
|
core-$(CONFIG_BVME6000) += arch/m68k/bvme6000/
|
||||||
|
core-$(CONFIG_SUN3X) += arch/m68k/sun3x/ arch/m68k/sun3/
|
||||||
|
core-$(CONFIG_SUN3) += arch/m68k/sun3/ arch/m68k/sun3/prom/
|
||||||
|
core-$(CONFIG_NATFEAT) += arch/m68k/emu/
|
||||||
|
core-$(CONFIG_M68040) += arch/m68k/fpsp040/
|
||||||
|
core-$(CONFIG_M68060) += arch/m68k/ifpsp060/
|
||||||
|
core-$(CONFIG_M68KFPU_EMU) += arch/m68k/math-emu/
|
||||||
|
|
||||||
|
all: zImage
|
||||||
|
|
||||||
|
lilo: vmlinux
|
||||||
|
if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi
|
||||||
|
if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
|
||||||
|
cat vmlinux > $(INSTALL_PATH)/vmlinux
|
||||||
|
cp System.map $(INSTALL_PATH)/System.map
|
||||||
|
if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
|
||||||
|
|
||||||
|
zImage compressed: vmlinux.gz
|
||||||
|
|
||||||
|
vmlinux.gz: vmlinux
|
||||||
|
|
||||||
|
ifndef CONFIG_KGDB
|
||||||
|
cp vmlinux vmlinux.tmp
|
||||||
|
$(STRIP) vmlinux.tmp
|
||||||
|
gzip -9c vmlinux.tmp >vmlinux.gz
|
||||||
|
rm vmlinux.tmp
|
||||||
|
else
|
||||||
|
gzip -9c vmlinux >vmlinux.gz
|
||||||
|
endif
|
||||||
|
|
||||||
|
bzImage: vmlinux.bz2
|
||||||
|
|
||||||
|
vmlinux.bz2: vmlinux
|
||||||
|
|
||||||
|
ifndef CONFIG_KGDB
|
||||||
|
cp vmlinux vmlinux.tmp
|
||||||
|
$(STRIP) vmlinux.tmp
|
||||||
|
bzip2 -1c vmlinux.tmp >vmlinux.bz2
|
||||||
|
rm vmlinux.tmp
|
||||||
|
else
|
||||||
|
bzip2 -1c vmlinux >vmlinux.bz2
|
||||||
|
endif
|
||||||
|
|
||||||
|
archclean:
|
||||||
|
rm -f vmlinux.gz vmlinux.bz2
|
||||||
|
|
||||||
|
install:
|
||||||
|
sh $(srctree)/arch/m68k/install.sh $(KERNELRELEASE) vmlinux.gz System.map "$(INSTALL_PATH)"
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# arch/m68knommu/Makefile
|
# arch/m68k/Makefile
|
||||||
#
|
#
|
||||||
# This file is subject to the terms and conditions of the GNU General Public
|
# 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
|
# License. See the file "COPYING" in the main directory of this archive
|
||||||
|
@ -8,8 +8,6 @@
|
||||||
# (C) Copyright 2002, Greg Ungerer <gerg@snapgear.com>
|
# (C) Copyright 2002, Greg Ungerer <gerg@snapgear.com>
|
||||||
#
|
#
|
||||||
|
|
||||||
KBUILD_DEFCONFIG := m5208evb_defconfig
|
|
||||||
|
|
||||||
platform-$(CONFIG_M68328) := 68328
|
platform-$(CONFIG_M68328) := 68328
|
||||||
platform-$(CONFIG_M68EZ328) := 68EZ328
|
platform-$(CONFIG_M68EZ328) := 68EZ328
|
||||||
platform-$(CONFIG_M68VZ328) := 68VZ328
|
platform-$(CONFIG_M68VZ328) := 68VZ328
|
||||||
|
@ -82,7 +80,7 @@ cpuclass-$(CONFIG_M68360) := 68360
|
||||||
CPUCLASS := $(cpuclass-y)
|
CPUCLASS := $(cpuclass-y)
|
||||||
|
|
||||||
ifneq ($(CPUCLASS),$(PLATFORM))
|
ifneq ($(CPUCLASS),$(PLATFORM))
|
||||||
CLASSDIR := arch/m68knommu/platform/$(cpuclass-y)/
|
CLASSDIR := arch/m68k/platform/$(cpuclass-y)/
|
||||||
endif
|
endif
|
||||||
|
|
||||||
export PLATFORM BOARD MODEL CPUCLASS
|
export PLATFORM BOARD MODEL CPUCLASS
|
||||||
|
@ -114,13 +112,13 @@ KBUILD_CFLAGS += $(cflags-y)
|
||||||
KBUILD_CFLAGS += -D__linux__
|
KBUILD_CFLAGS += -D__linux__
|
||||||
KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
|
KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
|
||||||
|
|
||||||
head-y := arch/m68knommu/platform/$(cpuclass-y)/head.o
|
head-y := arch/m68k/platform/$(cpuclass-y)/head.o
|
||||||
|
|
||||||
core-y += arch/m68knommu/kernel/ \
|
core-y += arch/m68k/kernel/ \
|
||||||
arch/m68knommu/mm/ \
|
arch/m68k/mm/ \
|
||||||
$(CLASSDIR) \
|
$(CLASSDIR) \
|
||||||
arch/m68knommu/platform/$(PLATFORM)/
|
arch/m68k/platform/$(PLATFORM)/
|
||||||
libs-y += arch/m68knommu/lib/
|
libs-y += arch/m68k/lib/
|
||||||
|
|
||||||
archclean:
|
archclean:
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# CONFIG_MMU is not set
|
||||||
CONFIG_EXPERIMENTAL=y
|
CONFIG_EXPERIMENTAL=y
|
||||||
CONFIG_LOG_BUF_SHIFT=14
|
CONFIG_LOG_BUF_SHIFT=14
|
||||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||||
|
@ -37,6 +38,7 @@ CONFIG_INET=y
|
||||||
# CONFIG_INET_LRO is not set
|
# CONFIG_INET_LRO is not set
|
||||||
# CONFIG_INET_DIAG is not set
|
# CONFIG_INET_DIAG is not set
|
||||||
# CONFIG_IPV6 is not set
|
# CONFIG_IPV6 is not set
|
||||||
|
# CONFIG_FW_LOADER is not set
|
||||||
CONFIG_MTD=y
|
CONFIG_MTD=y
|
||||||
CONFIG_MTD_PARTITIONS=y
|
CONFIG_MTD_PARTITIONS=y
|
||||||
CONFIG_MTD_CHAR=y
|
CONFIG_MTD_CHAR=y
|
|
@ -1,3 +1,4 @@
|
||||||
|
# CONFIG_MMU is not set
|
||||||
CONFIG_EXPERIMENTAL=y
|
CONFIG_EXPERIMENTAL=y
|
||||||
CONFIG_LOG_BUF_SHIFT=14
|
CONFIG_LOG_BUF_SHIFT=14
|
||||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||||
|
@ -35,6 +36,7 @@ CONFIG_INET=y
|
||||||
# CONFIG_INET_LRO is not set
|
# CONFIG_INET_LRO is not set
|
||||||
# CONFIG_INET_DIAG is not set
|
# CONFIG_INET_DIAG is not set
|
||||||
# CONFIG_IPV6 is not set
|
# CONFIG_IPV6 is not set
|
||||||
|
# CONFIG_FW_LOADER is not set
|
||||||
CONFIG_MTD=y
|
CONFIG_MTD=y
|
||||||
CONFIG_MTD_PARTITIONS=y
|
CONFIG_MTD_PARTITIONS=y
|
||||||
CONFIG_MTD_CHAR=y
|
CONFIG_MTD_CHAR=y
|
|
@ -1,3 +1,4 @@
|
||||||
|
# CONFIG_MMU is not set
|
||||||
CONFIG_EXPERIMENTAL=y
|
CONFIG_EXPERIMENTAL=y
|
||||||
CONFIG_LOG_BUF_SHIFT=14
|
CONFIG_LOG_BUF_SHIFT=14
|
||||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||||
|
@ -33,6 +34,7 @@ CONFIG_INET=y
|
||||||
# CONFIG_INET_LRO is not set
|
# CONFIG_INET_LRO is not set
|
||||||
# CONFIG_INET_DIAG is not set
|
# CONFIG_INET_DIAG is not set
|
||||||
# CONFIG_IPV6 is not set
|
# CONFIG_IPV6 is not set
|
||||||
|
# CONFIG_FW_LOADER is not set
|
||||||
CONFIG_MTD=y
|
CONFIG_MTD=y
|
||||||
CONFIG_MTD_PARTITIONS=y
|
CONFIG_MTD_PARTITIONS=y
|
||||||
CONFIG_MTD_CHAR=y
|
CONFIG_MTD_CHAR=y
|
|
@ -1,3 +1,4 @@
|
||||||
|
# CONFIG_MMU is not set
|
||||||
CONFIG_EXPERIMENTAL=y
|
CONFIG_EXPERIMENTAL=y
|
||||||
CONFIG_LOG_BUF_SHIFT=14
|
CONFIG_LOG_BUF_SHIFT=14
|
||||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||||
|
@ -36,6 +37,7 @@ CONFIG_INET=y
|
||||||
# CONFIG_INET_LRO is not set
|
# CONFIG_INET_LRO is not set
|
||||||
# CONFIG_INET_DIAG is not set
|
# CONFIG_INET_DIAG is not set
|
||||||
# CONFIG_IPV6 is not set
|
# CONFIG_IPV6 is not set
|
||||||
|
# CONFIG_FW_LOADER is not set
|
||||||
CONFIG_MTD=y
|
CONFIG_MTD=y
|
||||||
CONFIG_MTD_PARTITIONS=y
|
CONFIG_MTD_PARTITIONS=y
|
||||||
CONFIG_MTD_CHAR=y
|
CONFIG_MTD_CHAR=y
|
|
@ -1,3 +1,4 @@
|
||||||
|
# CONFIG_MMU is not set
|
||||||
CONFIG_EXPERIMENTAL=y
|
CONFIG_EXPERIMENTAL=y
|
||||||
CONFIG_LOG_BUF_SHIFT=14
|
CONFIG_LOG_BUF_SHIFT=14
|
||||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||||
|
@ -35,6 +36,7 @@ CONFIG_INET=y
|
||||||
# CONFIG_INET_LRO is not set
|
# CONFIG_INET_LRO is not set
|
||||||
# CONFIG_INET_DIAG is not set
|
# CONFIG_INET_DIAG is not set
|
||||||
# CONFIG_IPV6 is not set
|
# CONFIG_IPV6 is not set
|
||||||
|
# CONFIG_FW_LOADER is not set
|
||||||
CONFIG_MTD=y
|
CONFIG_MTD=y
|
||||||
CONFIG_MTD_PARTITIONS=y
|
CONFIG_MTD_PARTITIONS=y
|
||||||
CONFIG_MTD_CHAR=y
|
CONFIG_MTD_CHAR=y
|
|
@ -1,3 +1,4 @@
|
||||||
|
# CONFIG_MMU is not set
|
||||||
CONFIG_EXPERIMENTAL=y
|
CONFIG_EXPERIMENTAL=y
|
||||||
CONFIG_LOG_BUF_SHIFT=14
|
CONFIG_LOG_BUF_SHIFT=14
|
||||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||||
|
@ -35,6 +36,7 @@ CONFIG_INET=y
|
||||||
# CONFIG_INET_LRO is not set
|
# CONFIG_INET_LRO is not set
|
||||||
# CONFIG_INET_DIAG is not set
|
# CONFIG_INET_DIAG is not set
|
||||||
# CONFIG_IPV6 is not set
|
# CONFIG_IPV6 is not set
|
||||||
|
# CONFIG_FW_LOADER is not set
|
||||||
CONFIG_MTD=y
|
CONFIG_MTD=y
|
||||||
CONFIG_MTD_PARTITIONS=y
|
CONFIG_MTD_PARTITIONS=y
|
||||||
CONFIG_MTD_CHAR=y
|
CONFIG_MTD_CHAR=y
|
|
@ -1,17 +1,5 @@
|
||||||
#
|
ifdef CONFIG_MMU
|
||||||
# Makefile for the linux kernel.
|
include arch/m68k/kernel/Makefile_mm
|
||||||
#
|
|
||||||
|
|
||||||
ifndef CONFIG_SUN3
|
|
||||||
extra-y := head.o
|
|
||||||
else
|
else
|
||||||
extra-y := sun3-head.o
|
include arch/m68k/kernel/Makefile_no
|
||||||
endif
|
endif
|
||||||
extra-y += vmlinux.lds
|
|
||||||
|
|
||||||
obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o module.o \
|
|
||||||
sys_m68k.o time.o setup.o m68k_ksyms.o devres.o
|
|
||||||
|
|
||||||
devres-y = ../../../kernel/irq/devres.o
|
|
||||||
|
|
||||||
obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
#
|
||||||
|
# Makefile for the linux kernel.
|
||||||
|
#
|
||||||
|
|
||||||
|
ifndef CONFIG_SUN3
|
||||||
|
extra-y := head.o
|
||||||
|
else
|
||||||
|
extra-y := sun3-head.o
|
||||||
|
endif
|
||||||
|
extra-y += vmlinux.lds
|
||||||
|
|
||||||
|
obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o module.o \
|
||||||
|
sys_m68k.o time.o setup.o m68k_ksyms.o devres.o
|
||||||
|
|
||||||
|
devres-y = ../../../kernel/irq/devres.o
|
||||||
|
|
||||||
|
obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo
|
|
@ -1,100 +1,5 @@
|
||||||
/*
|
|
||||||
* This program is used to generate definitions needed by
|
|
||||||
* assembly language modules.
|
|
||||||
*
|
|
||||||
* We use the technique used in the OSF Mach kernel code:
|
|
||||||
* generate asm statements containing #defines,
|
|
||||||
* compile this file to assembler, and then extract the
|
|
||||||
* #defines from the assembly-language output.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define ASM_OFFSETS_C
|
|
||||||
|
|
||||||
#include <linux/stddef.h>
|
|
||||||
#include <linux/sched.h>
|
|
||||||
#include <linux/kernel_stat.h>
|
|
||||||
#include <linux/kbuild.h>
|
|
||||||
#include <asm/bootinfo.h>
|
|
||||||
#include <asm/irq.h>
|
|
||||||
#include <asm/amigahw.h>
|
|
||||||
#include <linux/font.h>
|
|
||||||
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
/* offsets into the task struct */
|
|
||||||
DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
|
|
||||||
DEFINE(TASK_INFO, offsetof(struct task_struct, thread.info));
|
|
||||||
DEFINE(TASK_MM, offsetof(struct task_struct, mm));
|
|
||||||
#ifdef CONFIG_MMU
|
#ifdef CONFIG_MMU
|
||||||
DEFINE(TASK_TINFO, offsetof(struct task_struct, thread.info));
|
#include "asm-offsets_mm.c"
|
||||||
|
#else
|
||||||
|
#include "asm-offsets_no.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* offsets into the thread struct */
|
|
||||||
DEFINE(THREAD_KSP, offsetof(struct thread_struct, ksp));
|
|
||||||
DEFINE(THREAD_USP, offsetof(struct thread_struct, usp));
|
|
||||||
DEFINE(THREAD_SR, offsetof(struct thread_struct, sr));
|
|
||||||
DEFINE(THREAD_FS, offsetof(struct thread_struct, fs));
|
|
||||||
DEFINE(THREAD_CRP, offsetof(struct thread_struct, crp));
|
|
||||||
DEFINE(THREAD_ESP0, offsetof(struct thread_struct, esp0));
|
|
||||||
DEFINE(THREAD_FPREG, offsetof(struct thread_struct, fp));
|
|
||||||
DEFINE(THREAD_FPCNTL, offsetof(struct thread_struct, fpcntl));
|
|
||||||
DEFINE(THREAD_FPSTATE, offsetof(struct thread_struct, fpstate));
|
|
||||||
|
|
||||||
/* offsets into the thread_info struct */
|
|
||||||
DEFINE(TINFO_PREEMPT, offsetof(struct thread_info, preempt_count));
|
|
||||||
DEFINE(TINFO_FLAGS, offsetof(struct thread_info, flags));
|
|
||||||
|
|
||||||
/* offsets into the pt_regs */
|
|
||||||
DEFINE(PT_OFF_D0, offsetof(struct pt_regs, d0));
|
|
||||||
DEFINE(PT_OFF_ORIG_D0, offsetof(struct pt_regs, orig_d0));
|
|
||||||
DEFINE(PT_OFF_D1, offsetof(struct pt_regs, d1));
|
|
||||||
DEFINE(PT_OFF_D2, offsetof(struct pt_regs, d2));
|
|
||||||
DEFINE(PT_OFF_D3, offsetof(struct pt_regs, d3));
|
|
||||||
DEFINE(PT_OFF_D4, offsetof(struct pt_regs, d4));
|
|
||||||
DEFINE(PT_OFF_D5, offsetof(struct pt_regs, d5));
|
|
||||||
DEFINE(PT_OFF_A0, offsetof(struct pt_regs, a0));
|
|
||||||
DEFINE(PT_OFF_A1, offsetof(struct pt_regs, a1));
|
|
||||||
DEFINE(PT_OFF_A2, offsetof(struct pt_regs, a2));
|
|
||||||
DEFINE(PT_OFF_PC, offsetof(struct pt_regs, pc));
|
|
||||||
DEFINE(PT_OFF_SR, offsetof(struct pt_regs, sr));
|
|
||||||
/* bitfields are a bit difficult */
|
|
||||||
DEFINE(PT_OFF_FORMATVEC, offsetof(struct pt_regs, pc) + 4);
|
|
||||||
|
|
||||||
/* offsets into the irq_cpustat_t struct */
|
|
||||||
DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t, __softirq_pending));
|
|
||||||
|
|
||||||
/* offsets into the bi_record struct */
|
|
||||||
DEFINE(BIR_TAG, offsetof(struct bi_record, tag));
|
|
||||||
DEFINE(BIR_SIZE, offsetof(struct bi_record, size));
|
|
||||||
DEFINE(BIR_DATA, offsetof(struct bi_record, data));
|
|
||||||
|
|
||||||
/* offsets into font_desc (drivers/video/console/font.h) */
|
|
||||||
DEFINE(FONT_DESC_IDX, offsetof(struct font_desc, idx));
|
|
||||||
DEFINE(FONT_DESC_NAME, offsetof(struct font_desc, name));
|
|
||||||
DEFINE(FONT_DESC_WIDTH, offsetof(struct font_desc, width));
|
|
||||||
DEFINE(FONT_DESC_HEIGHT, offsetof(struct font_desc, height));
|
|
||||||
DEFINE(FONT_DESC_DATA, offsetof(struct font_desc, data));
|
|
||||||
DEFINE(FONT_DESC_PREF, offsetof(struct font_desc, pref));
|
|
||||||
|
|
||||||
/* signal defines */
|
|
||||||
DEFINE(LSIGSEGV, SIGSEGV);
|
|
||||||
DEFINE(LSEGV_MAPERR, SEGV_MAPERR);
|
|
||||||
DEFINE(LSIGTRAP, SIGTRAP);
|
|
||||||
DEFINE(LTRAP_TRACE, TRAP_TRACE);
|
|
||||||
|
|
||||||
/* offsets into the custom struct */
|
|
||||||
DEFINE(CUSTOMBASE, &amiga_custom);
|
|
||||||
DEFINE(C_INTENAR, offsetof(struct CUSTOM, intenar));
|
|
||||||
DEFINE(C_INTREQR, offsetof(struct CUSTOM, intreqr));
|
|
||||||
DEFINE(C_INTENA, offsetof(struct CUSTOM, intena));
|
|
||||||
DEFINE(C_INTREQ, offsetof(struct CUSTOM, intreq));
|
|
||||||
DEFINE(C_SERDATR, offsetof(struct CUSTOM, serdatr));
|
|
||||||
DEFINE(C_SERDAT, offsetof(struct CUSTOM, serdat));
|
|
||||||
DEFINE(C_SERPER, offsetof(struct CUSTOM, serper));
|
|
||||||
DEFINE(CIAABASE, &ciaa);
|
|
||||||
DEFINE(CIABBASE, &ciab);
|
|
||||||
DEFINE(C_PRA, offsetof(struct CIA, pra));
|
|
||||||
DEFINE(ZTWOBASE, zTwoBase);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,100 @@
|
||||||
|
/*
|
||||||
|
* This program is used to generate definitions needed by
|
||||||
|
* assembly language modules.
|
||||||
|
*
|
||||||
|
* We use the technique used in the OSF Mach kernel code:
|
||||||
|
* generate asm statements containing #defines,
|
||||||
|
* compile this file to assembler, and then extract the
|
||||||
|
* #defines from the assembly-language output.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define ASM_OFFSETS_C
|
||||||
|
|
||||||
|
#include <linux/stddef.h>
|
||||||
|
#include <linux/sched.h>
|
||||||
|
#include <linux/kernel_stat.h>
|
||||||
|
#include <linux/kbuild.h>
|
||||||
|
#include <asm/bootinfo.h>
|
||||||
|
#include <asm/irq.h>
|
||||||
|
#include <asm/amigahw.h>
|
||||||
|
#include <linux/font.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
/* offsets into the task struct */
|
||||||
|
DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
|
||||||
|
DEFINE(TASK_INFO, offsetof(struct task_struct, thread.info));
|
||||||
|
DEFINE(TASK_MM, offsetof(struct task_struct, mm));
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
|
DEFINE(TASK_TINFO, offsetof(struct task_struct, thread.info));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* offsets into the thread struct */
|
||||||
|
DEFINE(THREAD_KSP, offsetof(struct thread_struct, ksp));
|
||||||
|
DEFINE(THREAD_USP, offsetof(struct thread_struct, usp));
|
||||||
|
DEFINE(THREAD_SR, offsetof(struct thread_struct, sr));
|
||||||
|
DEFINE(THREAD_FS, offsetof(struct thread_struct, fs));
|
||||||
|
DEFINE(THREAD_CRP, offsetof(struct thread_struct, crp));
|
||||||
|
DEFINE(THREAD_ESP0, offsetof(struct thread_struct, esp0));
|
||||||
|
DEFINE(THREAD_FPREG, offsetof(struct thread_struct, fp));
|
||||||
|
DEFINE(THREAD_FPCNTL, offsetof(struct thread_struct, fpcntl));
|
||||||
|
DEFINE(THREAD_FPSTATE, offsetof(struct thread_struct, fpstate));
|
||||||
|
|
||||||
|
/* offsets into the thread_info struct */
|
||||||
|
DEFINE(TINFO_PREEMPT, offsetof(struct thread_info, preempt_count));
|
||||||
|
DEFINE(TINFO_FLAGS, offsetof(struct thread_info, flags));
|
||||||
|
|
||||||
|
/* offsets into the pt_regs */
|
||||||
|
DEFINE(PT_OFF_D0, offsetof(struct pt_regs, d0));
|
||||||
|
DEFINE(PT_OFF_ORIG_D0, offsetof(struct pt_regs, orig_d0));
|
||||||
|
DEFINE(PT_OFF_D1, offsetof(struct pt_regs, d1));
|
||||||
|
DEFINE(PT_OFF_D2, offsetof(struct pt_regs, d2));
|
||||||
|
DEFINE(PT_OFF_D3, offsetof(struct pt_regs, d3));
|
||||||
|
DEFINE(PT_OFF_D4, offsetof(struct pt_regs, d4));
|
||||||
|
DEFINE(PT_OFF_D5, offsetof(struct pt_regs, d5));
|
||||||
|
DEFINE(PT_OFF_A0, offsetof(struct pt_regs, a0));
|
||||||
|
DEFINE(PT_OFF_A1, offsetof(struct pt_regs, a1));
|
||||||
|
DEFINE(PT_OFF_A2, offsetof(struct pt_regs, a2));
|
||||||
|
DEFINE(PT_OFF_PC, offsetof(struct pt_regs, pc));
|
||||||
|
DEFINE(PT_OFF_SR, offsetof(struct pt_regs, sr));
|
||||||
|
/* bitfields are a bit difficult */
|
||||||
|
DEFINE(PT_OFF_FORMATVEC, offsetof(struct pt_regs, pc) + 4);
|
||||||
|
|
||||||
|
/* offsets into the irq_cpustat_t struct */
|
||||||
|
DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t, __softirq_pending));
|
||||||
|
|
||||||
|
/* offsets into the bi_record struct */
|
||||||
|
DEFINE(BIR_TAG, offsetof(struct bi_record, tag));
|
||||||
|
DEFINE(BIR_SIZE, offsetof(struct bi_record, size));
|
||||||
|
DEFINE(BIR_DATA, offsetof(struct bi_record, data));
|
||||||
|
|
||||||
|
/* offsets into font_desc (drivers/video/console/font.h) */
|
||||||
|
DEFINE(FONT_DESC_IDX, offsetof(struct font_desc, idx));
|
||||||
|
DEFINE(FONT_DESC_NAME, offsetof(struct font_desc, name));
|
||||||
|
DEFINE(FONT_DESC_WIDTH, offsetof(struct font_desc, width));
|
||||||
|
DEFINE(FONT_DESC_HEIGHT, offsetof(struct font_desc, height));
|
||||||
|
DEFINE(FONT_DESC_DATA, offsetof(struct font_desc, data));
|
||||||
|
DEFINE(FONT_DESC_PREF, offsetof(struct font_desc, pref));
|
||||||
|
|
||||||
|
/* signal defines */
|
||||||
|
DEFINE(LSIGSEGV, SIGSEGV);
|
||||||
|
DEFINE(LSEGV_MAPERR, SEGV_MAPERR);
|
||||||
|
DEFINE(LSIGTRAP, SIGTRAP);
|
||||||
|
DEFINE(LTRAP_TRACE, TRAP_TRACE);
|
||||||
|
|
||||||
|
/* offsets into the custom struct */
|
||||||
|
DEFINE(CUSTOMBASE, &amiga_custom);
|
||||||
|
DEFINE(C_INTENAR, offsetof(struct CUSTOM, intenar));
|
||||||
|
DEFINE(C_INTREQR, offsetof(struct CUSTOM, intreqr));
|
||||||
|
DEFINE(C_INTENA, offsetof(struct CUSTOM, intena));
|
||||||
|
DEFINE(C_INTREQ, offsetof(struct CUSTOM, intreq));
|
||||||
|
DEFINE(C_SERDATR, offsetof(struct CUSTOM, serdatr));
|
||||||
|
DEFINE(C_SERDAT, offsetof(struct CUSTOM, serdat));
|
||||||
|
DEFINE(C_SERPER, offsetof(struct CUSTOM, serper));
|
||||||
|
DEFINE(CIAABASE, &ciaa);
|
||||||
|
DEFINE(CIABBASE, &ciab);
|
||||||
|
DEFINE(C_PRA, offsetof(struct CIA, pra));
|
||||||
|
DEFINE(ZTWOBASE, zTwoBase);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -1,130 +1,5 @@
|
||||||
/*
|
#ifdef CONFIG_MMU
|
||||||
* This file is subject to the terms and conditions of the GNU General Public
|
#include "dma_mm.c"
|
||||||
* License. See the file COPYING in the main directory of this archive
|
#else
|
||||||
* for more details.
|
#include "dma_no.c"
|
||||||
*/
|
#endif
|
||||||
|
|
||||||
#undef DEBUG
|
|
||||||
|
|
||||||
#include <linux/dma-mapping.h>
|
|
||||||
#include <linux/device.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/scatterlist.h>
|
|
||||||
#include <linux/slab.h>
|
|
||||||
#include <linux/vmalloc.h>
|
|
||||||
|
|
||||||
#include <asm/pgalloc.h>
|
|
||||||
|
|
||||||
void *dma_alloc_coherent(struct device *dev, size_t size,
|
|
||||||
dma_addr_t *handle, gfp_t flag)
|
|
||||||
{
|
|
||||||
struct page *page, **map;
|
|
||||||
pgprot_t pgprot;
|
|
||||||
void *addr;
|
|
||||||
int i, order;
|
|
||||||
|
|
||||||
pr_debug("dma_alloc_coherent: %d,%x\n", size, flag);
|
|
||||||
|
|
||||||
size = PAGE_ALIGN(size);
|
|
||||||
order = get_order(size);
|
|
||||||
|
|
||||||
page = alloc_pages(flag, order);
|
|
||||||
if (!page)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
*handle = page_to_phys(page);
|
|
||||||
map = kmalloc(sizeof(struct page *) << order, flag & ~__GFP_DMA);
|
|
||||||
if (!map) {
|
|
||||||
__free_pages(page, order);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
split_page(page, order);
|
|
||||||
|
|
||||||
order = 1 << order;
|
|
||||||
size >>= PAGE_SHIFT;
|
|
||||||
map[0] = page;
|
|
||||||
for (i = 1; i < size; i++)
|
|
||||||
map[i] = page + i;
|
|
||||||
for (; i < order; i++)
|
|
||||||
__free_page(page + i);
|
|
||||||
pgprot = __pgprot(_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_DIRTY);
|
|
||||||
if (CPU_IS_040_OR_060)
|
|
||||||
pgprot_val(pgprot) |= _PAGE_GLOBAL040 | _PAGE_NOCACHE_S;
|
|
||||||
else
|
|
||||||
pgprot_val(pgprot) |= _PAGE_NOCACHE030;
|
|
||||||
addr = vmap(map, size, VM_MAP, pgprot);
|
|
||||||
kfree(map);
|
|
||||||
|
|
||||||
return addr;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(dma_alloc_coherent);
|
|
||||||
|
|
||||||
void dma_free_coherent(struct device *dev, size_t size,
|
|
||||||
void *addr, dma_addr_t handle)
|
|
||||||
{
|
|
||||||
pr_debug("dma_free_coherent: %p, %x\n", addr, handle);
|
|
||||||
vfree(addr);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(dma_free_coherent);
|
|
||||||
|
|
||||||
void dma_sync_single_for_device(struct device *dev, dma_addr_t handle,
|
|
||||||
size_t size, enum dma_data_direction dir)
|
|
||||||
{
|
|
||||||
switch (dir) {
|
|
||||||
case DMA_TO_DEVICE:
|
|
||||||
cache_push(handle, size);
|
|
||||||
break;
|
|
||||||
case DMA_FROM_DEVICE:
|
|
||||||
cache_clear(handle, size);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
if (printk_ratelimit())
|
|
||||||
printk("dma_sync_single_for_device: unsupported dir %u\n", dir);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(dma_sync_single_for_device);
|
|
||||||
|
|
||||||
void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents,
|
|
||||||
enum dma_data_direction dir)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < nents; sg++, i++)
|
|
||||||
dma_sync_single_for_device(dev, sg->dma_address, sg->length, dir);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(dma_sync_sg_for_device);
|
|
||||||
|
|
||||||
dma_addr_t dma_map_single(struct device *dev, void *addr, size_t size,
|
|
||||||
enum dma_data_direction dir)
|
|
||||||
{
|
|
||||||
dma_addr_t handle = virt_to_bus(addr);
|
|
||||||
|
|
||||||
dma_sync_single_for_device(dev, handle, size, dir);
|
|
||||||
return handle;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(dma_map_single);
|
|
||||||
|
|
||||||
dma_addr_t dma_map_page(struct device *dev, struct page *page,
|
|
||||||
unsigned long offset, size_t size,
|
|
||||||
enum dma_data_direction dir)
|
|
||||||
{
|
|
||||||
dma_addr_t handle = page_to_phys(page) + offset;
|
|
||||||
|
|
||||||
dma_sync_single_for_device(dev, handle, size, dir);
|
|
||||||
return handle;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(dma_map_page);
|
|
||||||
|
|
||||||
int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
|
|
||||||
enum dma_data_direction dir)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < nents; sg++, i++) {
|
|
||||||
sg->dma_address = sg_phys(sg);
|
|
||||||
dma_sync_single_for_device(dev, sg->dma_address, sg->length, dir);
|
|
||||||
}
|
|
||||||
return nents;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(dma_map_sg);
|
|
||||||
|
|
|
@ -0,0 +1,130 @@
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#undef DEBUG
|
||||||
|
|
||||||
|
#include <linux/dma-mapping.h>
|
||||||
|
#include <linux/device.h>
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/scatterlist.h>
|
||||||
|
#include <linux/slab.h>
|
||||||
|
#include <linux/vmalloc.h>
|
||||||
|
|
||||||
|
#include <asm/pgalloc.h>
|
||||||
|
|
||||||
|
void *dma_alloc_coherent(struct device *dev, size_t size,
|
||||||
|
dma_addr_t *handle, gfp_t flag)
|
||||||
|
{
|
||||||
|
struct page *page, **map;
|
||||||
|
pgprot_t pgprot;
|
||||||
|
void *addr;
|
||||||
|
int i, order;
|
||||||
|
|
||||||
|
pr_debug("dma_alloc_coherent: %d,%x\n", size, flag);
|
||||||
|
|
||||||
|
size = PAGE_ALIGN(size);
|
||||||
|
order = get_order(size);
|
||||||
|
|
||||||
|
page = alloc_pages(flag, order);
|
||||||
|
if (!page)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
*handle = page_to_phys(page);
|
||||||
|
map = kmalloc(sizeof(struct page *) << order, flag & ~__GFP_DMA);
|
||||||
|
if (!map) {
|
||||||
|
__free_pages(page, order);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
split_page(page, order);
|
||||||
|
|
||||||
|
order = 1 << order;
|
||||||
|
size >>= PAGE_SHIFT;
|
||||||
|
map[0] = page;
|
||||||
|
for (i = 1; i < size; i++)
|
||||||
|
map[i] = page + i;
|
||||||
|
for (; i < order; i++)
|
||||||
|
__free_page(page + i);
|
||||||
|
pgprot = __pgprot(_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_DIRTY);
|
||||||
|
if (CPU_IS_040_OR_060)
|
||||||
|
pgprot_val(pgprot) |= _PAGE_GLOBAL040 | _PAGE_NOCACHE_S;
|
||||||
|
else
|
||||||
|
pgprot_val(pgprot) |= _PAGE_NOCACHE030;
|
||||||
|
addr = vmap(map, size, VM_MAP, pgprot);
|
||||||
|
kfree(map);
|
||||||
|
|
||||||
|
return addr;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(dma_alloc_coherent);
|
||||||
|
|
||||||
|
void dma_free_coherent(struct device *dev, size_t size,
|
||||||
|
void *addr, dma_addr_t handle)
|
||||||
|
{
|
||||||
|
pr_debug("dma_free_coherent: %p, %x\n", addr, handle);
|
||||||
|
vfree(addr);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(dma_free_coherent);
|
||||||
|
|
||||||
|
void dma_sync_single_for_device(struct device *dev, dma_addr_t handle,
|
||||||
|
size_t size, enum dma_data_direction dir)
|
||||||
|
{
|
||||||
|
switch (dir) {
|
||||||
|
case DMA_TO_DEVICE:
|
||||||
|
cache_push(handle, size);
|
||||||
|
break;
|
||||||
|
case DMA_FROM_DEVICE:
|
||||||
|
cache_clear(handle, size);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (printk_ratelimit())
|
||||||
|
printk("dma_sync_single_for_device: unsupported dir %u\n", dir);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(dma_sync_single_for_device);
|
||||||
|
|
||||||
|
void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents,
|
||||||
|
enum dma_data_direction dir)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < nents; sg++, i++)
|
||||||
|
dma_sync_single_for_device(dev, sg->dma_address, sg->length, dir);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(dma_sync_sg_for_device);
|
||||||
|
|
||||||
|
dma_addr_t dma_map_single(struct device *dev, void *addr, size_t size,
|
||||||
|
enum dma_data_direction dir)
|
||||||
|
{
|
||||||
|
dma_addr_t handle = virt_to_bus(addr);
|
||||||
|
|
||||||
|
dma_sync_single_for_device(dev, handle, size, dir);
|
||||||
|
return handle;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(dma_map_single);
|
||||||
|
|
||||||
|
dma_addr_t dma_map_page(struct device *dev, struct page *page,
|
||||||
|
unsigned long offset, size_t size,
|
||||||
|
enum dma_data_direction dir)
|
||||||
|
{
|
||||||
|
dma_addr_t handle = page_to_phys(page) + offset;
|
||||||
|
|
||||||
|
dma_sync_single_for_device(dev, handle, size, dir);
|
||||||
|
return handle;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(dma_map_page);
|
||||||
|
|
||||||
|
int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
|
||||||
|
enum dma_data_direction dir)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < nents; sg++, i++) {
|
||||||
|
sg->dma_address = sg_phys(sg);
|
||||||
|
dma_sync_single_for_device(dev, sg->dma_address, sg->length, dir);
|
||||||
|
}
|
||||||
|
return nents;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(dma_map_sg);
|
|
@ -1,753 +1,5 @@
|
||||||
/* -*- mode: asm -*-
|
#ifdef CONFIG_MMU
|
||||||
*
|
#include "entry_mm.S"
|
||||||
* linux/arch/m68k/kernel/entry.S
|
#else
|
||||||
*
|
#include "entry_no.S"
|
||||||
* Copyright (C) 1991, 1992 Linus Torvalds
|
|
||||||
*
|
|
||||||
* This file is subject to the terms and conditions of the GNU General Public
|
|
||||||
* License. See the file README.legal in the main directory of this archive
|
|
||||||
* for more details.
|
|
||||||
*
|
|
||||||
* Linux/m68k support by Hamish Macdonald
|
|
||||||
*
|
|
||||||
* 68060 fixes by Jesper Skov
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* entry.S contains the system-call and fault low-level handling routines.
|
|
||||||
* This also contains the timer-interrupt handler, as well as all interrupts
|
|
||||||
* and faults that can result in a task-switch.
|
|
||||||
*
|
|
||||||
* NOTE: This code handles signal-recognition, which happens every time
|
|
||||||
* after a timer-interrupt and after each system call.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 12/03/96 Jes: Currently we only support m68k single-cpu systems, so
|
|
||||||
* all pointers that used to be 'current' are now entry
|
|
||||||
* number 0 in the 'current_set' list.
|
|
||||||
*
|
|
||||||
* 6/05/00 RZ: addedd writeback completion after return from sighandler
|
|
||||||
* for 68040
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/linkage.h>
|
|
||||||
#include <asm/entry.h>
|
|
||||||
#include <asm/errno.h>
|
|
||||||
#include <asm/setup.h>
|
|
||||||
#include <asm/segment.h>
|
|
||||||
#include <asm/traps.h>
|
|
||||||
#include <asm/unistd.h>
|
|
||||||
|
|
||||||
#include <asm/asm-offsets.h>
|
|
||||||
|
|
||||||
.globl system_call, buserr, trap, resume
|
|
||||||
.globl sys_call_table
|
|
||||||
.globl sys_fork, sys_clone, sys_vfork
|
|
||||||
.globl ret_from_interrupt, bad_interrupt
|
|
||||||
.globl auto_irqhandler_fixup
|
|
||||||
.globl user_irqvec_fixup, user_irqhandler_fixup
|
|
||||||
|
|
||||||
.text
|
|
||||||
ENTRY(buserr)
|
|
||||||
SAVE_ALL_INT
|
|
||||||
GET_CURRENT(%d0)
|
|
||||||
movel %sp,%sp@- | stack frame pointer argument
|
|
||||||
bsrl buserr_c
|
|
||||||
addql #4,%sp
|
|
||||||
jra .Lret_from_exception
|
|
||||||
|
|
||||||
ENTRY(trap)
|
|
||||||
SAVE_ALL_INT
|
|
||||||
GET_CURRENT(%d0)
|
|
||||||
movel %sp,%sp@- | stack frame pointer argument
|
|
||||||
bsrl trap_c
|
|
||||||
addql #4,%sp
|
|
||||||
jra .Lret_from_exception
|
|
||||||
|
|
||||||
| After a fork we jump here directly from resume,
|
|
||||||
| so that %d1 contains the previous task
|
|
||||||
| schedule_tail now used regardless of CONFIG_SMP
|
|
||||||
ENTRY(ret_from_fork)
|
|
||||||
movel %d1,%sp@-
|
|
||||||
jsr schedule_tail
|
|
||||||
addql #4,%sp
|
|
||||||
jra .Lret_from_exception
|
|
||||||
|
|
||||||
do_trace_entry:
|
|
||||||
movel #-ENOSYS,%sp@(PT_OFF_D0)| needed for strace
|
|
||||||
subql #4,%sp
|
|
||||||
SAVE_SWITCH_STACK
|
|
||||||
jbsr syscall_trace
|
|
||||||
RESTORE_SWITCH_STACK
|
|
||||||
addql #4,%sp
|
|
||||||
movel %sp@(PT_OFF_ORIG_D0),%d0
|
|
||||||
cmpl #NR_syscalls,%d0
|
|
||||||
jcs syscall
|
|
||||||
badsys:
|
|
||||||
movel #-ENOSYS,%sp@(PT_OFF_D0)
|
|
||||||
jra ret_from_syscall
|
|
||||||
|
|
||||||
do_trace_exit:
|
|
||||||
subql #4,%sp
|
|
||||||
SAVE_SWITCH_STACK
|
|
||||||
jbsr syscall_trace
|
|
||||||
RESTORE_SWITCH_STACK
|
|
||||||
addql #4,%sp
|
|
||||||
jra .Lret_from_exception
|
|
||||||
|
|
||||||
ENTRY(ret_from_signal)
|
|
||||||
tstb %curptr@(TASK_INFO+TINFO_FLAGS+2)
|
|
||||||
jge 1f
|
|
||||||
jbsr syscall_trace
|
|
||||||
1: RESTORE_SWITCH_STACK
|
|
||||||
addql #4,%sp
|
|
||||||
/* on 68040 complete pending writebacks if any */
|
|
||||||
#ifdef CONFIG_M68040
|
|
||||||
bfextu %sp@(PT_OFF_FORMATVEC){#0,#4},%d0
|
|
||||||
subql #7,%d0 | bus error frame ?
|
|
||||||
jbne 1f
|
|
||||||
movel %sp,%sp@-
|
|
||||||
jbsr berr_040cleanup
|
|
||||||
addql #4,%sp
|
|
||||||
1:
|
|
||||||
#endif
|
#endif
|
||||||
jra .Lret_from_exception
|
|
||||||
|
|
||||||
ENTRY(system_call)
|
|
||||||
SAVE_ALL_SYS
|
|
||||||
|
|
||||||
GET_CURRENT(%d1)
|
|
||||||
| save top of frame
|
|
||||||
movel %sp,%curptr@(TASK_THREAD+THREAD_ESP0)
|
|
||||||
|
|
||||||
| syscall trace?
|
|
||||||
tstb %curptr@(TASK_INFO+TINFO_FLAGS+2)
|
|
||||||
jmi do_trace_entry
|
|
||||||
cmpl #NR_syscalls,%d0
|
|
||||||
jcc badsys
|
|
||||||
syscall:
|
|
||||||
jbsr @(sys_call_table,%d0:l:4)@(0)
|
|
||||||
movel %d0,%sp@(PT_OFF_D0) | save the return value
|
|
||||||
ret_from_syscall:
|
|
||||||
|oriw #0x0700,%sr
|
|
||||||
movew %curptr@(TASK_INFO+TINFO_FLAGS+2),%d0
|
|
||||||
jne syscall_exit_work
|
|
||||||
1: RESTORE_ALL
|
|
||||||
|
|
||||||
syscall_exit_work:
|
|
||||||
btst #5,%sp@(PT_OFF_SR) | check if returning to kernel
|
|
||||||
bnes 1b | if so, skip resched, signals
|
|
||||||
lslw #1,%d0
|
|
||||||
jcs do_trace_exit
|
|
||||||
jmi do_delayed_trace
|
|
||||||
lslw #8,%d0
|
|
||||||
jmi do_signal_return
|
|
||||||
pea resume_userspace
|
|
||||||
jra schedule
|
|
||||||
|
|
||||||
|
|
||||||
ENTRY(ret_from_exception)
|
|
||||||
.Lret_from_exception:
|
|
||||||
btst #5,%sp@(PT_OFF_SR) | check if returning to kernel
|
|
||||||
bnes 1f | if so, skip resched, signals
|
|
||||||
| only allow interrupts when we are really the last one on the
|
|
||||||
| kernel stack, otherwise stack overflow can occur during
|
|
||||||
| heavy interrupt load
|
|
||||||
andw #ALLOWINT,%sr
|
|
||||||
|
|
||||||
resume_userspace:
|
|
||||||
moveb %curptr@(TASK_INFO+TINFO_FLAGS+3),%d0
|
|
||||||
jne exit_work
|
|
||||||
1: RESTORE_ALL
|
|
||||||
|
|
||||||
exit_work:
|
|
||||||
| save top of frame
|
|
||||||
movel %sp,%curptr@(TASK_THREAD+THREAD_ESP0)
|
|
||||||
lslb #1,%d0
|
|
||||||
jmi do_signal_return
|
|
||||||
pea resume_userspace
|
|
||||||
jra schedule
|
|
||||||
|
|
||||||
|
|
||||||
do_signal_return:
|
|
||||||
|andw #ALLOWINT,%sr
|
|
||||||
subql #4,%sp | dummy return address
|
|
||||||
SAVE_SWITCH_STACK
|
|
||||||
pea %sp@(SWITCH_STACK_SIZE)
|
|
||||||
bsrl do_signal
|
|
||||||
addql #4,%sp
|
|
||||||
RESTORE_SWITCH_STACK
|
|
||||||
addql #4,%sp
|
|
||||||
jbra resume_userspace
|
|
||||||
|
|
||||||
do_delayed_trace:
|
|
||||||
bclr #7,%sp@(PT_OFF_SR) | clear trace bit in SR
|
|
||||||
pea 1 | send SIGTRAP
|
|
||||||
movel %curptr,%sp@-
|
|
||||||
pea LSIGTRAP
|
|
||||||
jbsr send_sig
|
|
||||||
addql #8,%sp
|
|
||||||
addql #4,%sp
|
|
||||||
jbra resume_userspace
|
|
||||||
|
|
||||||
|
|
||||||
/* This is the main interrupt handler for autovector interrupts */
|
|
||||||
|
|
||||||
ENTRY(auto_inthandler)
|
|
||||||
SAVE_ALL_INT
|
|
||||||
GET_CURRENT(%d0)
|
|
||||||
addqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
|
|
||||||
| put exception # in d0
|
|
||||||
bfextu %sp@(PT_OFF_FORMATVEC){#4,#10},%d0
|
|
||||||
subw #VEC_SPUR,%d0
|
|
||||||
|
|
||||||
movel %sp,%sp@-
|
|
||||||
movel %d0,%sp@- | put vector # on stack
|
|
||||||
auto_irqhandler_fixup = . + 2
|
|
||||||
jsr __m68k_handle_int | process the IRQ
|
|
||||||
addql #8,%sp | pop parameters off stack
|
|
||||||
|
|
||||||
ret_from_interrupt:
|
|
||||||
subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
|
|
||||||
jeq ret_from_last_interrupt
|
|
||||||
2: RESTORE_ALL
|
|
||||||
|
|
||||||
ALIGN
|
|
||||||
ret_from_last_interrupt:
|
|
||||||
moveq #(~ALLOWINT>>8)&0xff,%d0
|
|
||||||
andb %sp@(PT_OFF_SR),%d0
|
|
||||||
jne 2b
|
|
||||||
|
|
||||||
/* check if we need to do software interrupts */
|
|
||||||
tstl irq_stat+CPUSTAT_SOFTIRQ_PENDING
|
|
||||||
jeq .Lret_from_exception
|
|
||||||
pea ret_from_exception
|
|
||||||
jra do_softirq
|
|
||||||
|
|
||||||
/* Handler for user defined interrupt vectors */
|
|
||||||
|
|
||||||
ENTRY(user_inthandler)
|
|
||||||
SAVE_ALL_INT
|
|
||||||
GET_CURRENT(%d0)
|
|
||||||
addqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
|
|
||||||
| put exception # in d0
|
|
||||||
bfextu %sp@(PT_OFF_FORMATVEC){#4,#10},%d0
|
|
||||||
user_irqvec_fixup = . + 2
|
|
||||||
subw #VEC_USER,%d0
|
|
||||||
|
|
||||||
movel %sp,%sp@-
|
|
||||||
movel %d0,%sp@- | put vector # on stack
|
|
||||||
user_irqhandler_fixup = . + 2
|
|
||||||
jsr __m68k_handle_int | process the IRQ
|
|
||||||
addql #8,%sp | pop parameters off stack
|
|
||||||
|
|
||||||
subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
|
|
||||||
jeq ret_from_last_interrupt
|
|
||||||
RESTORE_ALL
|
|
||||||
|
|
||||||
/* Handler for uninitialized and spurious interrupts */
|
|
||||||
|
|
||||||
ENTRY(bad_inthandler)
|
|
||||||
SAVE_ALL_INT
|
|
||||||
GET_CURRENT(%d0)
|
|
||||||
addqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
|
|
||||||
|
|
||||||
movel %sp,%sp@-
|
|
||||||
jsr handle_badint
|
|
||||||
addql #4,%sp
|
|
||||||
|
|
||||||
subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
|
|
||||||
jeq ret_from_last_interrupt
|
|
||||||
RESTORE_ALL
|
|
||||||
|
|
||||||
|
|
||||||
ENTRY(sys_fork)
|
|
||||||
SAVE_SWITCH_STACK
|
|
||||||
pea %sp@(SWITCH_STACK_SIZE)
|
|
||||||
jbsr m68k_fork
|
|
||||||
addql #4,%sp
|
|
||||||
RESTORE_SWITCH_STACK
|
|
||||||
rts
|
|
||||||
|
|
||||||
ENTRY(sys_clone)
|
|
||||||
SAVE_SWITCH_STACK
|
|
||||||
pea %sp@(SWITCH_STACK_SIZE)
|
|
||||||
jbsr m68k_clone
|
|
||||||
addql #4,%sp
|
|
||||||
RESTORE_SWITCH_STACK
|
|
||||||
rts
|
|
||||||
|
|
||||||
ENTRY(sys_vfork)
|
|
||||||
SAVE_SWITCH_STACK
|
|
||||||
pea %sp@(SWITCH_STACK_SIZE)
|
|
||||||
jbsr m68k_vfork
|
|
||||||
addql #4,%sp
|
|
||||||
RESTORE_SWITCH_STACK
|
|
||||||
rts
|
|
||||||
|
|
||||||
ENTRY(sys_sigreturn)
|
|
||||||
SAVE_SWITCH_STACK
|
|
||||||
jbsr do_sigreturn
|
|
||||||
RESTORE_SWITCH_STACK
|
|
||||||
rts
|
|
||||||
|
|
||||||
ENTRY(sys_rt_sigreturn)
|
|
||||||
SAVE_SWITCH_STACK
|
|
||||||
jbsr do_rt_sigreturn
|
|
||||||
RESTORE_SWITCH_STACK
|
|
||||||
rts
|
|
||||||
|
|
||||||
resume:
|
|
||||||
/*
|
|
||||||
* Beware - when entering resume, prev (the current task) is
|
|
||||||
* in a0, next (the new task) is in a1,so don't change these
|
|
||||||
* registers until their contents are no longer needed.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* save sr */
|
|
||||||
movew %sr,%a0@(TASK_THREAD+THREAD_SR)
|
|
||||||
|
|
||||||
/* save fs (sfc,%dfc) (may be pointing to kernel memory) */
|
|
||||||
movec %sfc,%d0
|
|
||||||
movew %d0,%a0@(TASK_THREAD+THREAD_FS)
|
|
||||||
|
|
||||||
/* save usp */
|
|
||||||
/* it is better to use a movel here instead of a movew 8*) */
|
|
||||||
movec %usp,%d0
|
|
||||||
movel %d0,%a0@(TASK_THREAD+THREAD_USP)
|
|
||||||
|
|
||||||
/* save non-scratch registers on stack */
|
|
||||||
SAVE_SWITCH_STACK
|
|
||||||
|
|
||||||
/* save current kernel stack pointer */
|
|
||||||
movel %sp,%a0@(TASK_THREAD+THREAD_KSP)
|
|
||||||
|
|
||||||
/* save floating point context */
|
|
||||||
#ifndef CONFIG_M68KFPU_EMU_ONLY
|
|
||||||
#ifdef CONFIG_M68KFPU_EMU
|
|
||||||
tstl m68k_fputype
|
|
||||||
jeq 3f
|
|
||||||
#endif
|
|
||||||
fsave %a0@(TASK_THREAD+THREAD_FPSTATE)
|
|
||||||
|
|
||||||
#if defined(CONFIG_M68060)
|
|
||||||
#if !defined(CPU_M68060_ONLY)
|
|
||||||
btst #3,m68k_cputype+3
|
|
||||||
beqs 1f
|
|
||||||
#endif
|
|
||||||
/* The 060 FPU keeps status in bits 15-8 of the first longword */
|
|
||||||
tstb %a0@(TASK_THREAD+THREAD_FPSTATE+2)
|
|
||||||
jeq 3f
|
|
||||||
#if !defined(CPU_M68060_ONLY)
|
|
||||||
jra 2f
|
|
||||||
#endif
|
|
||||||
#endif /* CONFIG_M68060 */
|
|
||||||
#if !defined(CPU_M68060_ONLY)
|
|
||||||
1: tstb %a0@(TASK_THREAD+THREAD_FPSTATE)
|
|
||||||
jeq 3f
|
|
||||||
#endif
|
|
||||||
2: fmovemx %fp0-%fp7,%a0@(TASK_THREAD+THREAD_FPREG)
|
|
||||||
fmoveml %fpcr/%fpsr/%fpiar,%a0@(TASK_THREAD+THREAD_FPCNTL)
|
|
||||||
3:
|
|
||||||
#endif /* CONFIG_M68KFPU_EMU_ONLY */
|
|
||||||
/* Return previous task in %d1 */
|
|
||||||
movel %curptr,%d1
|
|
||||||
|
|
||||||
/* switch to new task (a1 contains new task) */
|
|
||||||
movel %a1,%curptr
|
|
||||||
|
|
||||||
/* restore floating point context */
|
|
||||||
#ifndef CONFIG_M68KFPU_EMU_ONLY
|
|
||||||
#ifdef CONFIG_M68KFPU_EMU
|
|
||||||
tstl m68k_fputype
|
|
||||||
jeq 4f
|
|
||||||
#endif
|
|
||||||
#if defined(CONFIG_M68060)
|
|
||||||
#if !defined(CPU_M68060_ONLY)
|
|
||||||
btst #3,m68k_cputype+3
|
|
||||||
beqs 1f
|
|
||||||
#endif
|
|
||||||
/* The 060 FPU keeps status in bits 15-8 of the first longword */
|
|
||||||
tstb %a1@(TASK_THREAD+THREAD_FPSTATE+2)
|
|
||||||
jeq 3f
|
|
||||||
#if !defined(CPU_M68060_ONLY)
|
|
||||||
jra 2f
|
|
||||||
#endif
|
|
||||||
#endif /* CONFIG_M68060 */
|
|
||||||
#if !defined(CPU_M68060_ONLY)
|
|
||||||
1: tstb %a1@(TASK_THREAD+THREAD_FPSTATE)
|
|
||||||
jeq 3f
|
|
||||||
#endif
|
|
||||||
2: fmovemx %a1@(TASK_THREAD+THREAD_FPREG),%fp0-%fp7
|
|
||||||
fmoveml %a1@(TASK_THREAD+THREAD_FPCNTL),%fpcr/%fpsr/%fpiar
|
|
||||||
3: frestore %a1@(TASK_THREAD+THREAD_FPSTATE)
|
|
||||||
4:
|
|
||||||
#endif /* CONFIG_M68KFPU_EMU_ONLY */
|
|
||||||
|
|
||||||
/* restore the kernel stack pointer */
|
|
||||||
movel %a1@(TASK_THREAD+THREAD_KSP),%sp
|
|
||||||
|
|
||||||
/* restore non-scratch registers */
|
|
||||||
RESTORE_SWITCH_STACK
|
|
||||||
|
|
||||||
/* restore user stack pointer */
|
|
||||||
movel %a1@(TASK_THREAD+THREAD_USP),%a0
|
|
||||||
movel %a0,%usp
|
|
||||||
|
|
||||||
/* restore fs (sfc,%dfc) */
|
|
||||||
movew %a1@(TASK_THREAD+THREAD_FS),%a0
|
|
||||||
movec %a0,%sfc
|
|
||||||
movec %a0,%dfc
|
|
||||||
|
|
||||||
/* restore status register */
|
|
||||||
movew %a1@(TASK_THREAD+THREAD_SR),%sr
|
|
||||||
|
|
||||||
rts
|
|
||||||
|
|
||||||
.data
|
|
||||||
ALIGN
|
|
||||||
sys_call_table:
|
|
||||||
.long sys_restart_syscall /* 0 - old "setup()" system call, used for restarting */
|
|
||||||
.long sys_exit
|
|
||||||
.long sys_fork
|
|
||||||
.long sys_read
|
|
||||||
.long sys_write
|
|
||||||
.long sys_open /* 5 */
|
|
||||||
.long sys_close
|
|
||||||
.long sys_waitpid
|
|
||||||
.long sys_creat
|
|
||||||
.long sys_link
|
|
||||||
.long sys_unlink /* 10 */
|
|
||||||
.long sys_execve
|
|
||||||
.long sys_chdir
|
|
||||||
.long sys_time
|
|
||||||
.long sys_mknod
|
|
||||||
.long sys_chmod /* 15 */
|
|
||||||
.long sys_chown16
|
|
||||||
.long sys_ni_syscall /* old break syscall holder */
|
|
||||||
.long sys_stat
|
|
||||||
.long sys_lseek
|
|
||||||
.long sys_getpid /* 20 */
|
|
||||||
.long sys_mount
|
|
||||||
.long sys_oldumount
|
|
||||||
.long sys_setuid16
|
|
||||||
.long sys_getuid16
|
|
||||||
.long sys_stime /* 25 */
|
|
||||||
.long sys_ptrace
|
|
||||||
.long sys_alarm
|
|
||||||
.long sys_fstat
|
|
||||||
.long sys_pause
|
|
||||||
.long sys_utime /* 30 */
|
|
||||||
.long sys_ni_syscall /* old stty syscall holder */
|
|
||||||
.long sys_ni_syscall /* old gtty syscall holder */
|
|
||||||
.long sys_access
|
|
||||||
.long sys_nice
|
|
||||||
.long sys_ni_syscall /* 35 */ /* old ftime syscall holder */
|
|
||||||
.long sys_sync
|
|
||||||
.long sys_kill
|
|
||||||
.long sys_rename
|
|
||||||
.long sys_mkdir
|
|
||||||
.long sys_rmdir /* 40 */
|
|
||||||
.long sys_dup
|
|
||||||
.long sys_pipe
|
|
||||||
.long sys_times
|
|
||||||
.long sys_ni_syscall /* old prof syscall holder */
|
|
||||||
.long sys_brk /* 45 */
|
|
||||||
.long sys_setgid16
|
|
||||||
.long sys_getgid16
|
|
||||||
.long sys_signal
|
|
||||||
.long sys_geteuid16
|
|
||||||
.long sys_getegid16 /* 50 */
|
|
||||||
.long sys_acct
|
|
||||||
.long sys_umount /* recycled never used phys() */
|
|
||||||
.long sys_ni_syscall /* old lock syscall holder */
|
|
||||||
.long sys_ioctl
|
|
||||||
.long sys_fcntl /* 55 */
|
|
||||||
.long sys_ni_syscall /* old mpx syscall holder */
|
|
||||||
.long sys_setpgid
|
|
||||||
.long sys_ni_syscall /* old ulimit syscall holder */
|
|
||||||
.long sys_ni_syscall
|
|
||||||
.long sys_umask /* 60 */
|
|
||||||
.long sys_chroot
|
|
||||||
.long sys_ustat
|
|
||||||
.long sys_dup2
|
|
||||||
.long sys_getppid
|
|
||||||
.long sys_getpgrp /* 65 */
|
|
||||||
.long sys_setsid
|
|
||||||
.long sys_sigaction
|
|
||||||
.long sys_sgetmask
|
|
||||||
.long sys_ssetmask
|
|
||||||
.long sys_setreuid16 /* 70 */
|
|
||||||
.long sys_setregid16
|
|
||||||
.long sys_sigsuspend
|
|
||||||
.long sys_sigpending
|
|
||||||
.long sys_sethostname
|
|
||||||
.long sys_setrlimit /* 75 */
|
|
||||||
.long sys_old_getrlimit
|
|
||||||
.long sys_getrusage
|
|
||||||
.long sys_gettimeofday
|
|
||||||
.long sys_settimeofday
|
|
||||||
.long sys_getgroups16 /* 80 */
|
|
||||||
.long sys_setgroups16
|
|
||||||
.long sys_old_select
|
|
||||||
.long sys_symlink
|
|
||||||
.long sys_lstat
|
|
||||||
.long sys_readlink /* 85 */
|
|
||||||
.long sys_uselib
|
|
||||||
.long sys_swapon
|
|
||||||
.long sys_reboot
|
|
||||||
.long sys_old_readdir
|
|
||||||
.long sys_old_mmap /* 90 */
|
|
||||||
.long sys_munmap
|
|
||||||
.long sys_truncate
|
|
||||||
.long sys_ftruncate
|
|
||||||
.long sys_fchmod
|
|
||||||
.long sys_fchown16 /* 95 */
|
|
||||||
.long sys_getpriority
|
|
||||||
.long sys_setpriority
|
|
||||||
.long sys_ni_syscall /* old profil syscall holder */
|
|
||||||
.long sys_statfs
|
|
||||||
.long sys_fstatfs /* 100 */
|
|
||||||
.long sys_ni_syscall /* ioperm for i386 */
|
|
||||||
.long sys_socketcall
|
|
||||||
.long sys_syslog
|
|
||||||
.long sys_setitimer
|
|
||||||
.long sys_getitimer /* 105 */
|
|
||||||
.long sys_newstat
|
|
||||||
.long sys_newlstat
|
|
||||||
.long sys_newfstat
|
|
||||||
.long sys_ni_syscall
|
|
||||||
.long sys_ni_syscall /* 110 */ /* iopl for i386 */
|
|
||||||
.long sys_vhangup
|
|
||||||
.long sys_ni_syscall /* obsolete idle() syscall */
|
|
||||||
.long sys_ni_syscall /* vm86old for i386 */
|
|
||||||
.long sys_wait4
|
|
||||||
.long sys_swapoff /* 115 */
|
|
||||||
.long sys_sysinfo
|
|
||||||
.long sys_ipc
|
|
||||||
.long sys_fsync
|
|
||||||
.long sys_sigreturn
|
|
||||||
.long sys_clone /* 120 */
|
|
||||||
.long sys_setdomainname
|
|
||||||
.long sys_newuname
|
|
||||||
.long sys_cacheflush /* modify_ldt for i386 */
|
|
||||||
.long sys_adjtimex
|
|
||||||
.long sys_mprotect /* 125 */
|
|
||||||
.long sys_sigprocmask
|
|
||||||
.long sys_ni_syscall /* old "create_module" */
|
|
||||||
.long sys_init_module
|
|
||||||
.long sys_delete_module
|
|
||||||
.long sys_ni_syscall /* 130 - old "get_kernel_syms" */
|
|
||||||
.long sys_quotactl
|
|
||||||
.long sys_getpgid
|
|
||||||
.long sys_fchdir
|
|
||||||
.long sys_bdflush
|
|
||||||
.long sys_sysfs /* 135 */
|
|
||||||
.long sys_personality
|
|
||||||
.long sys_ni_syscall /* for afs_syscall */
|
|
||||||
.long sys_setfsuid16
|
|
||||||
.long sys_setfsgid16
|
|
||||||
.long sys_llseek /* 140 */
|
|
||||||
.long sys_getdents
|
|
||||||
.long sys_select
|
|
||||||
.long sys_flock
|
|
||||||
.long sys_msync
|
|
||||||
.long sys_readv /* 145 */
|
|
||||||
.long sys_writev
|
|
||||||
.long sys_getsid
|
|
||||||
.long sys_fdatasync
|
|
||||||
.long sys_sysctl
|
|
||||||
.long sys_mlock /* 150 */
|
|
||||||
.long sys_munlock
|
|
||||||
.long sys_mlockall
|
|
||||||
.long sys_munlockall
|
|
||||||
.long sys_sched_setparam
|
|
||||||
.long sys_sched_getparam /* 155 */
|
|
||||||
.long sys_sched_setscheduler
|
|
||||||
.long sys_sched_getscheduler
|
|
||||||
.long sys_sched_yield
|
|
||||||
.long sys_sched_get_priority_max
|
|
||||||
.long sys_sched_get_priority_min /* 160 */
|
|
||||||
.long sys_sched_rr_get_interval
|
|
||||||
.long sys_nanosleep
|
|
||||||
.long sys_mremap
|
|
||||||
.long sys_setresuid16
|
|
||||||
.long sys_getresuid16 /* 165 */
|
|
||||||
.long sys_getpagesize
|
|
||||||
.long sys_ni_syscall /* old sys_query_module */
|
|
||||||
.long sys_poll
|
|
||||||
.long sys_nfsservctl
|
|
||||||
.long sys_setresgid16 /* 170 */
|
|
||||||
.long sys_getresgid16
|
|
||||||
.long sys_prctl
|
|
||||||
.long sys_rt_sigreturn
|
|
||||||
.long sys_rt_sigaction
|
|
||||||
.long sys_rt_sigprocmask /* 175 */
|
|
||||||
.long sys_rt_sigpending
|
|
||||||
.long sys_rt_sigtimedwait
|
|
||||||
.long sys_rt_sigqueueinfo
|
|
||||||
.long sys_rt_sigsuspend
|
|
||||||
.long sys_pread64 /* 180 */
|
|
||||||
.long sys_pwrite64
|
|
||||||
.long sys_lchown16;
|
|
||||||
.long sys_getcwd
|
|
||||||
.long sys_capget
|
|
||||||
.long sys_capset /* 185 */
|
|
||||||
.long sys_sigaltstack
|
|
||||||
.long sys_sendfile
|
|
||||||
.long sys_ni_syscall /* streams1 */
|
|
||||||
.long sys_ni_syscall /* streams2 */
|
|
||||||
.long sys_vfork /* 190 */
|
|
||||||
.long sys_getrlimit
|
|
||||||
.long sys_mmap2
|
|
||||||
.long sys_truncate64
|
|
||||||
.long sys_ftruncate64
|
|
||||||
.long sys_stat64 /* 195 */
|
|
||||||
.long sys_lstat64
|
|
||||||
.long sys_fstat64
|
|
||||||
.long sys_chown
|
|
||||||
.long sys_getuid
|
|
||||||
.long sys_getgid /* 200 */
|
|
||||||
.long sys_geteuid
|
|
||||||
.long sys_getegid
|
|
||||||
.long sys_setreuid
|
|
||||||
.long sys_setregid
|
|
||||||
.long sys_getgroups /* 205 */
|
|
||||||
.long sys_setgroups
|
|
||||||
.long sys_fchown
|
|
||||||
.long sys_setresuid
|
|
||||||
.long sys_getresuid
|
|
||||||
.long sys_setresgid /* 210 */
|
|
||||||
.long sys_getresgid
|
|
||||||
.long sys_lchown
|
|
||||||
.long sys_setuid
|
|
||||||
.long sys_setgid
|
|
||||||
.long sys_setfsuid /* 215 */
|
|
||||||
.long sys_setfsgid
|
|
||||||
.long sys_pivot_root
|
|
||||||
.long sys_ni_syscall
|
|
||||||
.long sys_ni_syscall
|
|
||||||
.long sys_getdents64 /* 220 */
|
|
||||||
.long sys_gettid
|
|
||||||
.long sys_tkill
|
|
||||||
.long sys_setxattr
|
|
||||||
.long sys_lsetxattr
|
|
||||||
.long sys_fsetxattr /* 225 */
|
|
||||||
.long sys_getxattr
|
|
||||||
.long sys_lgetxattr
|
|
||||||
.long sys_fgetxattr
|
|
||||||
.long sys_listxattr
|
|
||||||
.long sys_llistxattr /* 230 */
|
|
||||||
.long sys_flistxattr
|
|
||||||
.long sys_removexattr
|
|
||||||
.long sys_lremovexattr
|
|
||||||
.long sys_fremovexattr
|
|
||||||
.long sys_futex /* 235 */
|
|
||||||
.long sys_sendfile64
|
|
||||||
.long sys_mincore
|
|
||||||
.long sys_madvise
|
|
||||||
.long sys_fcntl64
|
|
||||||
.long sys_readahead /* 240 */
|
|
||||||
.long sys_io_setup
|
|
||||||
.long sys_io_destroy
|
|
||||||
.long sys_io_getevents
|
|
||||||
.long sys_io_submit
|
|
||||||
.long sys_io_cancel /* 245 */
|
|
||||||
.long sys_fadvise64
|
|
||||||
.long sys_exit_group
|
|
||||||
.long sys_lookup_dcookie
|
|
||||||
.long sys_epoll_create
|
|
||||||
.long sys_epoll_ctl /* 250 */
|
|
||||||
.long sys_epoll_wait
|
|
||||||
.long sys_remap_file_pages
|
|
||||||
.long sys_set_tid_address
|
|
||||||
.long sys_timer_create
|
|
||||||
.long sys_timer_settime /* 255 */
|
|
||||||
.long sys_timer_gettime
|
|
||||||
.long sys_timer_getoverrun
|
|
||||||
.long sys_timer_delete
|
|
||||||
.long sys_clock_settime
|
|
||||||
.long sys_clock_gettime /* 260 */
|
|
||||||
.long sys_clock_getres
|
|
||||||
.long sys_clock_nanosleep
|
|
||||||
.long sys_statfs64
|
|
||||||
.long sys_fstatfs64
|
|
||||||
.long sys_tgkill /* 265 */
|
|
||||||
.long sys_utimes
|
|
||||||
.long sys_fadvise64_64
|
|
||||||
.long sys_mbind
|
|
||||||
.long sys_get_mempolicy
|
|
||||||
.long sys_set_mempolicy /* 270 */
|
|
||||||
.long sys_mq_open
|
|
||||||
.long sys_mq_unlink
|
|
||||||
.long sys_mq_timedsend
|
|
||||||
.long sys_mq_timedreceive
|
|
||||||
.long sys_mq_notify /* 275 */
|
|
||||||
.long sys_mq_getsetattr
|
|
||||||
.long sys_waitid
|
|
||||||
.long sys_ni_syscall /* for sys_vserver */
|
|
||||||
.long sys_add_key
|
|
||||||
.long sys_request_key /* 280 */
|
|
||||||
.long sys_keyctl
|
|
||||||
.long sys_ioprio_set
|
|
||||||
.long sys_ioprio_get
|
|
||||||
.long sys_inotify_init
|
|
||||||
.long sys_inotify_add_watch /* 285 */
|
|
||||||
.long sys_inotify_rm_watch
|
|
||||||
.long sys_migrate_pages
|
|
||||||
.long sys_openat
|
|
||||||
.long sys_mkdirat
|
|
||||||
.long sys_mknodat /* 290 */
|
|
||||||
.long sys_fchownat
|
|
||||||
.long sys_futimesat
|
|
||||||
.long sys_fstatat64
|
|
||||||
.long sys_unlinkat
|
|
||||||
.long sys_renameat /* 295 */
|
|
||||||
.long sys_linkat
|
|
||||||
.long sys_symlinkat
|
|
||||||
.long sys_readlinkat
|
|
||||||
.long sys_fchmodat
|
|
||||||
.long sys_faccessat /* 300 */
|
|
||||||
.long sys_ni_syscall /* Reserved for pselect6 */
|
|
||||||
.long sys_ni_syscall /* Reserved for ppoll */
|
|
||||||
.long sys_unshare
|
|
||||||
.long sys_set_robust_list
|
|
||||||
.long sys_get_robust_list /* 305 */
|
|
||||||
.long sys_splice
|
|
||||||
.long sys_sync_file_range
|
|
||||||
.long sys_tee
|
|
||||||
.long sys_vmsplice
|
|
||||||
.long sys_move_pages /* 310 */
|
|
||||||
.long sys_sched_setaffinity
|
|
||||||
.long sys_sched_getaffinity
|
|
||||||
.long sys_kexec_load
|
|
||||||
.long sys_getcpu
|
|
||||||
.long sys_epoll_pwait /* 315 */
|
|
||||||
.long sys_utimensat
|
|
||||||
.long sys_signalfd
|
|
||||||
.long sys_timerfd_create
|
|
||||||
.long sys_eventfd
|
|
||||||
.long sys_fallocate /* 320 */
|
|
||||||
.long sys_timerfd_settime
|
|
||||||
.long sys_timerfd_gettime
|
|
||||||
.long sys_signalfd4
|
|
||||||
.long sys_eventfd2
|
|
||||||
.long sys_epoll_create1 /* 325 */
|
|
||||||
.long sys_dup3
|
|
||||||
.long sys_pipe2
|
|
||||||
.long sys_inotify_init1
|
|
||||||
.long sys_preadv
|
|
||||||
.long sys_pwritev /* 330 */
|
|
||||||
.long sys_rt_tgsigqueueinfo
|
|
||||||
.long sys_perf_event_open
|
|
||||||
.long sys_get_thread_area
|
|
||||||
.long sys_set_thread_area
|
|
||||||
.long sys_atomic_cmpxchg_32 /* 335 */
|
|
||||||
.long sys_atomic_barrier
|
|
||||||
.long sys_fanotify_init
|
|
||||||
.long sys_fanotify_mark
|
|
||||||
.long sys_prlimit64
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,753 @@
|
||||||
|
/* -*- mode: asm -*-
|
||||||
|
*
|
||||||
|
* linux/arch/m68k/kernel/entry.S
|
||||||
|
*
|
||||||
|
* Copyright (C) 1991, 1992 Linus Torvalds
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU General Public
|
||||||
|
* License. See the file README.legal in the main directory of this archive
|
||||||
|
* for more details.
|
||||||
|
*
|
||||||
|
* Linux/m68k support by Hamish Macdonald
|
||||||
|
*
|
||||||
|
* 68060 fixes by Jesper Skov
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* entry.S contains the system-call and fault low-level handling routines.
|
||||||
|
* This also contains the timer-interrupt handler, as well as all interrupts
|
||||||
|
* and faults that can result in a task-switch.
|
||||||
|
*
|
||||||
|
* NOTE: This code handles signal-recognition, which happens every time
|
||||||
|
* after a timer-interrupt and after each system call.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 12/03/96 Jes: Currently we only support m68k single-cpu systems, so
|
||||||
|
* all pointers that used to be 'current' are now entry
|
||||||
|
* number 0 in the 'current_set' list.
|
||||||
|
*
|
||||||
|
* 6/05/00 RZ: addedd writeback completion after return from sighandler
|
||||||
|
* for 68040
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/linkage.h>
|
||||||
|
#include <asm/entry.h>
|
||||||
|
#include <asm/errno.h>
|
||||||
|
#include <asm/setup.h>
|
||||||
|
#include <asm/segment.h>
|
||||||
|
#include <asm/traps.h>
|
||||||
|
#include <asm/unistd.h>
|
||||||
|
|
||||||
|
#include <asm/asm-offsets.h>
|
||||||
|
|
||||||
|
.globl system_call, buserr, trap, resume
|
||||||
|
.globl sys_call_table
|
||||||
|
.globl sys_fork, sys_clone, sys_vfork
|
||||||
|
.globl ret_from_interrupt, bad_interrupt
|
||||||
|
.globl auto_irqhandler_fixup
|
||||||
|
.globl user_irqvec_fixup, user_irqhandler_fixup
|
||||||
|
|
||||||
|
.text
|
||||||
|
ENTRY(buserr)
|
||||||
|
SAVE_ALL_INT
|
||||||
|
GET_CURRENT(%d0)
|
||||||
|
movel %sp,%sp@- | stack frame pointer argument
|
||||||
|
bsrl buserr_c
|
||||||
|
addql #4,%sp
|
||||||
|
jra .Lret_from_exception
|
||||||
|
|
||||||
|
ENTRY(trap)
|
||||||
|
SAVE_ALL_INT
|
||||||
|
GET_CURRENT(%d0)
|
||||||
|
movel %sp,%sp@- | stack frame pointer argument
|
||||||
|
bsrl trap_c
|
||||||
|
addql #4,%sp
|
||||||
|
jra .Lret_from_exception
|
||||||
|
|
||||||
|
| After a fork we jump here directly from resume,
|
||||||
|
| so that %d1 contains the previous task
|
||||||
|
| schedule_tail now used regardless of CONFIG_SMP
|
||||||
|
ENTRY(ret_from_fork)
|
||||||
|
movel %d1,%sp@-
|
||||||
|
jsr schedule_tail
|
||||||
|
addql #4,%sp
|
||||||
|
jra .Lret_from_exception
|
||||||
|
|
||||||
|
do_trace_entry:
|
||||||
|
movel #-ENOSYS,%sp@(PT_OFF_D0)| needed for strace
|
||||||
|
subql #4,%sp
|
||||||
|
SAVE_SWITCH_STACK
|
||||||
|
jbsr syscall_trace
|
||||||
|
RESTORE_SWITCH_STACK
|
||||||
|
addql #4,%sp
|
||||||
|
movel %sp@(PT_OFF_ORIG_D0),%d0
|
||||||
|
cmpl #NR_syscalls,%d0
|
||||||
|
jcs syscall
|
||||||
|
badsys:
|
||||||
|
movel #-ENOSYS,%sp@(PT_OFF_D0)
|
||||||
|
jra ret_from_syscall
|
||||||
|
|
||||||
|
do_trace_exit:
|
||||||
|
subql #4,%sp
|
||||||
|
SAVE_SWITCH_STACK
|
||||||
|
jbsr syscall_trace
|
||||||
|
RESTORE_SWITCH_STACK
|
||||||
|
addql #4,%sp
|
||||||
|
jra .Lret_from_exception
|
||||||
|
|
||||||
|
ENTRY(ret_from_signal)
|
||||||
|
tstb %curptr@(TASK_INFO+TINFO_FLAGS+2)
|
||||||
|
jge 1f
|
||||||
|
jbsr syscall_trace
|
||||||
|
1: RESTORE_SWITCH_STACK
|
||||||
|
addql #4,%sp
|
||||||
|
/* on 68040 complete pending writebacks if any */
|
||||||
|
#ifdef CONFIG_M68040
|
||||||
|
bfextu %sp@(PT_OFF_FORMATVEC){#0,#4},%d0
|
||||||
|
subql #7,%d0 | bus error frame ?
|
||||||
|
jbne 1f
|
||||||
|
movel %sp,%sp@-
|
||||||
|
jbsr berr_040cleanup
|
||||||
|
addql #4,%sp
|
||||||
|
1:
|
||||||
|
#endif
|
||||||
|
jra .Lret_from_exception
|
||||||
|
|
||||||
|
ENTRY(system_call)
|
||||||
|
SAVE_ALL_SYS
|
||||||
|
|
||||||
|
GET_CURRENT(%d1)
|
||||||
|
| save top of frame
|
||||||
|
movel %sp,%curptr@(TASK_THREAD+THREAD_ESP0)
|
||||||
|
|
||||||
|
| syscall trace?
|
||||||
|
tstb %curptr@(TASK_INFO+TINFO_FLAGS+2)
|
||||||
|
jmi do_trace_entry
|
||||||
|
cmpl #NR_syscalls,%d0
|
||||||
|
jcc badsys
|
||||||
|
syscall:
|
||||||
|
jbsr @(sys_call_table,%d0:l:4)@(0)
|
||||||
|
movel %d0,%sp@(PT_OFF_D0) | save the return value
|
||||||
|
ret_from_syscall:
|
||||||
|
|oriw #0x0700,%sr
|
||||||
|
movew %curptr@(TASK_INFO+TINFO_FLAGS+2),%d0
|
||||||
|
jne syscall_exit_work
|
||||||
|
1: RESTORE_ALL
|
||||||
|
|
||||||
|
syscall_exit_work:
|
||||||
|
btst #5,%sp@(PT_OFF_SR) | check if returning to kernel
|
||||||
|
bnes 1b | if so, skip resched, signals
|
||||||
|
lslw #1,%d0
|
||||||
|
jcs do_trace_exit
|
||||||
|
jmi do_delayed_trace
|
||||||
|
lslw #8,%d0
|
||||||
|
jmi do_signal_return
|
||||||
|
pea resume_userspace
|
||||||
|
jra schedule
|
||||||
|
|
||||||
|
|
||||||
|
ENTRY(ret_from_exception)
|
||||||
|
.Lret_from_exception:
|
||||||
|
btst #5,%sp@(PT_OFF_SR) | check if returning to kernel
|
||||||
|
bnes 1f | if so, skip resched, signals
|
||||||
|
| only allow interrupts when we are really the last one on the
|
||||||
|
| kernel stack, otherwise stack overflow can occur during
|
||||||
|
| heavy interrupt load
|
||||||
|
andw #ALLOWINT,%sr
|
||||||
|
|
||||||
|
resume_userspace:
|
||||||
|
moveb %curptr@(TASK_INFO+TINFO_FLAGS+3),%d0
|
||||||
|
jne exit_work
|
||||||
|
1: RESTORE_ALL
|
||||||
|
|
||||||
|
exit_work:
|
||||||
|
| save top of frame
|
||||||
|
movel %sp,%curptr@(TASK_THREAD+THREAD_ESP0)
|
||||||
|
lslb #1,%d0
|
||||||
|
jmi do_signal_return
|
||||||
|
pea resume_userspace
|
||||||
|
jra schedule
|
||||||
|
|
||||||
|
|
||||||
|
do_signal_return:
|
||||||
|
|andw #ALLOWINT,%sr
|
||||||
|
subql #4,%sp | dummy return address
|
||||||
|
SAVE_SWITCH_STACK
|
||||||
|
pea %sp@(SWITCH_STACK_SIZE)
|
||||||
|
bsrl do_signal
|
||||||
|
addql #4,%sp
|
||||||
|
RESTORE_SWITCH_STACK
|
||||||
|
addql #4,%sp
|
||||||
|
jbra resume_userspace
|
||||||
|
|
||||||
|
do_delayed_trace:
|
||||||
|
bclr #7,%sp@(PT_OFF_SR) | clear trace bit in SR
|
||||||
|
pea 1 | send SIGTRAP
|
||||||
|
movel %curptr,%sp@-
|
||||||
|
pea LSIGTRAP
|
||||||
|
jbsr send_sig
|
||||||
|
addql #8,%sp
|
||||||
|
addql #4,%sp
|
||||||
|
jbra resume_userspace
|
||||||
|
|
||||||
|
|
||||||
|
/* This is the main interrupt handler for autovector interrupts */
|
||||||
|
|
||||||
|
ENTRY(auto_inthandler)
|
||||||
|
SAVE_ALL_INT
|
||||||
|
GET_CURRENT(%d0)
|
||||||
|
addqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
|
||||||
|
| put exception # in d0
|
||||||
|
bfextu %sp@(PT_OFF_FORMATVEC){#4,#10},%d0
|
||||||
|
subw #VEC_SPUR,%d0
|
||||||
|
|
||||||
|
movel %sp,%sp@-
|
||||||
|
movel %d0,%sp@- | put vector # on stack
|
||||||
|
auto_irqhandler_fixup = . + 2
|
||||||
|
jsr __m68k_handle_int | process the IRQ
|
||||||
|
addql #8,%sp | pop parameters off stack
|
||||||
|
|
||||||
|
ret_from_interrupt:
|
||||||
|
subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
|
||||||
|
jeq ret_from_last_interrupt
|
||||||
|
2: RESTORE_ALL
|
||||||
|
|
||||||
|
ALIGN
|
||||||
|
ret_from_last_interrupt:
|
||||||
|
moveq #(~ALLOWINT>>8)&0xff,%d0
|
||||||
|
andb %sp@(PT_OFF_SR),%d0
|
||||||
|
jne 2b
|
||||||
|
|
||||||
|
/* check if we need to do software interrupts */
|
||||||
|
tstl irq_stat+CPUSTAT_SOFTIRQ_PENDING
|
||||||
|
jeq .Lret_from_exception
|
||||||
|
pea ret_from_exception
|
||||||
|
jra do_softirq
|
||||||
|
|
||||||
|
/* Handler for user defined interrupt vectors */
|
||||||
|
|
||||||
|
ENTRY(user_inthandler)
|
||||||
|
SAVE_ALL_INT
|
||||||
|
GET_CURRENT(%d0)
|
||||||
|
addqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
|
||||||
|
| put exception # in d0
|
||||||
|
bfextu %sp@(PT_OFF_FORMATVEC){#4,#10},%d0
|
||||||
|
user_irqvec_fixup = . + 2
|
||||||
|
subw #VEC_USER,%d0
|
||||||
|
|
||||||
|
movel %sp,%sp@-
|
||||||
|
movel %d0,%sp@- | put vector # on stack
|
||||||
|
user_irqhandler_fixup = . + 2
|
||||||
|
jsr __m68k_handle_int | process the IRQ
|
||||||
|
addql #8,%sp | pop parameters off stack
|
||||||
|
|
||||||
|
subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
|
||||||
|
jeq ret_from_last_interrupt
|
||||||
|
RESTORE_ALL
|
||||||
|
|
||||||
|
/* Handler for uninitialized and spurious interrupts */
|
||||||
|
|
||||||
|
ENTRY(bad_inthandler)
|
||||||
|
SAVE_ALL_INT
|
||||||
|
GET_CURRENT(%d0)
|
||||||
|
addqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
|
||||||
|
|
||||||
|
movel %sp,%sp@-
|
||||||
|
jsr handle_badint
|
||||||
|
addql #4,%sp
|
||||||
|
|
||||||
|
subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
|
||||||
|
jeq ret_from_last_interrupt
|
||||||
|
RESTORE_ALL
|
||||||
|
|
||||||
|
|
||||||
|
ENTRY(sys_fork)
|
||||||
|
SAVE_SWITCH_STACK
|
||||||
|
pea %sp@(SWITCH_STACK_SIZE)
|
||||||
|
jbsr m68k_fork
|
||||||
|
addql #4,%sp
|
||||||
|
RESTORE_SWITCH_STACK
|
||||||
|
rts
|
||||||
|
|
||||||
|
ENTRY(sys_clone)
|
||||||
|
SAVE_SWITCH_STACK
|
||||||
|
pea %sp@(SWITCH_STACK_SIZE)
|
||||||
|
jbsr m68k_clone
|
||||||
|
addql #4,%sp
|
||||||
|
RESTORE_SWITCH_STACK
|
||||||
|
rts
|
||||||
|
|
||||||
|
ENTRY(sys_vfork)
|
||||||
|
SAVE_SWITCH_STACK
|
||||||
|
pea %sp@(SWITCH_STACK_SIZE)
|
||||||
|
jbsr m68k_vfork
|
||||||
|
addql #4,%sp
|
||||||
|
RESTORE_SWITCH_STACK
|
||||||
|
rts
|
||||||
|
|
||||||
|
ENTRY(sys_sigreturn)
|
||||||
|
SAVE_SWITCH_STACK
|
||||||
|
jbsr do_sigreturn
|
||||||
|
RESTORE_SWITCH_STACK
|
||||||
|
rts
|
||||||
|
|
||||||
|
ENTRY(sys_rt_sigreturn)
|
||||||
|
SAVE_SWITCH_STACK
|
||||||
|
jbsr do_rt_sigreturn
|
||||||
|
RESTORE_SWITCH_STACK
|
||||||
|
rts
|
||||||
|
|
||||||
|
resume:
|
||||||
|
/*
|
||||||
|
* Beware - when entering resume, prev (the current task) is
|
||||||
|
* in a0, next (the new task) is in a1,so don't change these
|
||||||
|
* registers until their contents are no longer needed.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* save sr */
|
||||||
|
movew %sr,%a0@(TASK_THREAD+THREAD_SR)
|
||||||
|
|
||||||
|
/* save fs (sfc,%dfc) (may be pointing to kernel memory) */
|
||||||
|
movec %sfc,%d0
|
||||||
|
movew %d0,%a0@(TASK_THREAD+THREAD_FS)
|
||||||
|
|
||||||
|
/* save usp */
|
||||||
|
/* it is better to use a movel here instead of a movew 8*) */
|
||||||
|
movec %usp,%d0
|
||||||
|
movel %d0,%a0@(TASK_THREAD+THREAD_USP)
|
||||||
|
|
||||||
|
/* save non-scratch registers on stack */
|
||||||
|
SAVE_SWITCH_STACK
|
||||||
|
|
||||||
|
/* save current kernel stack pointer */
|
||||||
|
movel %sp,%a0@(TASK_THREAD+THREAD_KSP)
|
||||||
|
|
||||||
|
/* save floating point context */
|
||||||
|
#ifndef CONFIG_M68KFPU_EMU_ONLY
|
||||||
|
#ifdef CONFIG_M68KFPU_EMU
|
||||||
|
tstl m68k_fputype
|
||||||
|
jeq 3f
|
||||||
|
#endif
|
||||||
|
fsave %a0@(TASK_THREAD+THREAD_FPSTATE)
|
||||||
|
|
||||||
|
#if defined(CONFIG_M68060)
|
||||||
|
#if !defined(CPU_M68060_ONLY)
|
||||||
|
btst #3,m68k_cputype+3
|
||||||
|
beqs 1f
|
||||||
|
#endif
|
||||||
|
/* The 060 FPU keeps status in bits 15-8 of the first longword */
|
||||||
|
tstb %a0@(TASK_THREAD+THREAD_FPSTATE+2)
|
||||||
|
jeq 3f
|
||||||
|
#if !defined(CPU_M68060_ONLY)
|
||||||
|
jra 2f
|
||||||
|
#endif
|
||||||
|
#endif /* CONFIG_M68060 */
|
||||||
|
#if !defined(CPU_M68060_ONLY)
|
||||||
|
1: tstb %a0@(TASK_THREAD+THREAD_FPSTATE)
|
||||||
|
jeq 3f
|
||||||
|
#endif
|
||||||
|
2: fmovemx %fp0-%fp7,%a0@(TASK_THREAD+THREAD_FPREG)
|
||||||
|
fmoveml %fpcr/%fpsr/%fpiar,%a0@(TASK_THREAD+THREAD_FPCNTL)
|
||||||
|
3:
|
||||||
|
#endif /* CONFIG_M68KFPU_EMU_ONLY */
|
||||||
|
/* Return previous task in %d1 */
|
||||||
|
movel %curptr,%d1
|
||||||
|
|
||||||
|
/* switch to new task (a1 contains new task) */
|
||||||
|
movel %a1,%curptr
|
||||||
|
|
||||||
|
/* restore floating point context */
|
||||||
|
#ifndef CONFIG_M68KFPU_EMU_ONLY
|
||||||
|
#ifdef CONFIG_M68KFPU_EMU
|
||||||
|
tstl m68k_fputype
|
||||||
|
jeq 4f
|
||||||
|
#endif
|
||||||
|
#if defined(CONFIG_M68060)
|
||||||
|
#if !defined(CPU_M68060_ONLY)
|
||||||
|
btst #3,m68k_cputype+3
|
||||||
|
beqs 1f
|
||||||
|
#endif
|
||||||
|
/* The 060 FPU keeps status in bits 15-8 of the first longword */
|
||||||
|
tstb %a1@(TASK_THREAD+THREAD_FPSTATE+2)
|
||||||
|
jeq 3f
|
||||||
|
#if !defined(CPU_M68060_ONLY)
|
||||||
|
jra 2f
|
||||||
|
#endif
|
||||||
|
#endif /* CONFIG_M68060 */
|
||||||
|
#if !defined(CPU_M68060_ONLY)
|
||||||
|
1: tstb %a1@(TASK_THREAD+THREAD_FPSTATE)
|
||||||
|
jeq 3f
|
||||||
|
#endif
|
||||||
|
2: fmovemx %a1@(TASK_THREAD+THREAD_FPREG),%fp0-%fp7
|
||||||
|
fmoveml %a1@(TASK_THREAD+THREAD_FPCNTL),%fpcr/%fpsr/%fpiar
|
||||||
|
3: frestore %a1@(TASK_THREAD+THREAD_FPSTATE)
|
||||||
|
4:
|
||||||
|
#endif /* CONFIG_M68KFPU_EMU_ONLY */
|
||||||
|
|
||||||
|
/* restore the kernel stack pointer */
|
||||||
|
movel %a1@(TASK_THREAD+THREAD_KSP),%sp
|
||||||
|
|
||||||
|
/* restore non-scratch registers */
|
||||||
|
RESTORE_SWITCH_STACK
|
||||||
|
|
||||||
|
/* restore user stack pointer */
|
||||||
|
movel %a1@(TASK_THREAD+THREAD_USP),%a0
|
||||||
|
movel %a0,%usp
|
||||||
|
|
||||||
|
/* restore fs (sfc,%dfc) */
|
||||||
|
movew %a1@(TASK_THREAD+THREAD_FS),%a0
|
||||||
|
movec %a0,%sfc
|
||||||
|
movec %a0,%dfc
|
||||||
|
|
||||||
|
/* restore status register */
|
||||||
|
movew %a1@(TASK_THREAD+THREAD_SR),%sr
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
.data
|
||||||
|
ALIGN
|
||||||
|
sys_call_table:
|
||||||
|
.long sys_restart_syscall /* 0 - old "setup()" system call, used for restarting */
|
||||||
|
.long sys_exit
|
||||||
|
.long sys_fork
|
||||||
|
.long sys_read
|
||||||
|
.long sys_write
|
||||||
|
.long sys_open /* 5 */
|
||||||
|
.long sys_close
|
||||||
|
.long sys_waitpid
|
||||||
|
.long sys_creat
|
||||||
|
.long sys_link
|
||||||
|
.long sys_unlink /* 10 */
|
||||||
|
.long sys_execve
|
||||||
|
.long sys_chdir
|
||||||
|
.long sys_time
|
||||||
|
.long sys_mknod
|
||||||
|
.long sys_chmod /* 15 */
|
||||||
|
.long sys_chown16
|
||||||
|
.long sys_ni_syscall /* old break syscall holder */
|
||||||
|
.long sys_stat
|
||||||
|
.long sys_lseek
|
||||||
|
.long sys_getpid /* 20 */
|
||||||
|
.long sys_mount
|
||||||
|
.long sys_oldumount
|
||||||
|
.long sys_setuid16
|
||||||
|
.long sys_getuid16
|
||||||
|
.long sys_stime /* 25 */
|
||||||
|
.long sys_ptrace
|
||||||
|
.long sys_alarm
|
||||||
|
.long sys_fstat
|
||||||
|
.long sys_pause
|
||||||
|
.long sys_utime /* 30 */
|
||||||
|
.long sys_ni_syscall /* old stty syscall holder */
|
||||||
|
.long sys_ni_syscall /* old gtty syscall holder */
|
||||||
|
.long sys_access
|
||||||
|
.long sys_nice
|
||||||
|
.long sys_ni_syscall /* 35 */ /* old ftime syscall holder */
|
||||||
|
.long sys_sync
|
||||||
|
.long sys_kill
|
||||||
|
.long sys_rename
|
||||||
|
.long sys_mkdir
|
||||||
|
.long sys_rmdir /* 40 */
|
||||||
|
.long sys_dup
|
||||||
|
.long sys_pipe
|
||||||
|
.long sys_times
|
||||||
|
.long sys_ni_syscall /* old prof syscall holder */
|
||||||
|
.long sys_brk /* 45 */
|
||||||
|
.long sys_setgid16
|
||||||
|
.long sys_getgid16
|
||||||
|
.long sys_signal
|
||||||
|
.long sys_geteuid16
|
||||||
|
.long sys_getegid16 /* 50 */
|
||||||
|
.long sys_acct
|
||||||
|
.long sys_umount /* recycled never used phys() */
|
||||||
|
.long sys_ni_syscall /* old lock syscall holder */
|
||||||
|
.long sys_ioctl
|
||||||
|
.long sys_fcntl /* 55 */
|
||||||
|
.long sys_ni_syscall /* old mpx syscall holder */
|
||||||
|
.long sys_setpgid
|
||||||
|
.long sys_ni_syscall /* old ulimit syscall holder */
|
||||||
|
.long sys_ni_syscall
|
||||||
|
.long sys_umask /* 60 */
|
||||||
|
.long sys_chroot
|
||||||
|
.long sys_ustat
|
||||||
|
.long sys_dup2
|
||||||
|
.long sys_getppid
|
||||||
|
.long sys_getpgrp /* 65 */
|
||||||
|
.long sys_setsid
|
||||||
|
.long sys_sigaction
|
||||||
|
.long sys_sgetmask
|
||||||
|
.long sys_ssetmask
|
||||||
|
.long sys_setreuid16 /* 70 */
|
||||||
|
.long sys_setregid16
|
||||||
|
.long sys_sigsuspend
|
||||||
|
.long sys_sigpending
|
||||||
|
.long sys_sethostname
|
||||||
|
.long sys_setrlimit /* 75 */
|
||||||
|
.long sys_old_getrlimit
|
||||||
|
.long sys_getrusage
|
||||||
|
.long sys_gettimeofday
|
||||||
|
.long sys_settimeofday
|
||||||
|
.long sys_getgroups16 /* 80 */
|
||||||
|
.long sys_setgroups16
|
||||||
|
.long sys_old_select
|
||||||
|
.long sys_symlink
|
||||||
|
.long sys_lstat
|
||||||
|
.long sys_readlink /* 85 */
|
||||||
|
.long sys_uselib
|
||||||
|
.long sys_swapon
|
||||||
|
.long sys_reboot
|
||||||
|
.long sys_old_readdir
|
||||||
|
.long sys_old_mmap /* 90 */
|
||||||
|
.long sys_munmap
|
||||||
|
.long sys_truncate
|
||||||
|
.long sys_ftruncate
|
||||||
|
.long sys_fchmod
|
||||||
|
.long sys_fchown16 /* 95 */
|
||||||
|
.long sys_getpriority
|
||||||
|
.long sys_setpriority
|
||||||
|
.long sys_ni_syscall /* old profil syscall holder */
|
||||||
|
.long sys_statfs
|
||||||
|
.long sys_fstatfs /* 100 */
|
||||||
|
.long sys_ni_syscall /* ioperm for i386 */
|
||||||
|
.long sys_socketcall
|
||||||
|
.long sys_syslog
|
||||||
|
.long sys_setitimer
|
||||||
|
.long sys_getitimer /* 105 */
|
||||||
|
.long sys_newstat
|
||||||
|
.long sys_newlstat
|
||||||
|
.long sys_newfstat
|
||||||
|
.long sys_ni_syscall
|
||||||
|
.long sys_ni_syscall /* 110 */ /* iopl for i386 */
|
||||||
|
.long sys_vhangup
|
||||||
|
.long sys_ni_syscall /* obsolete idle() syscall */
|
||||||
|
.long sys_ni_syscall /* vm86old for i386 */
|
||||||
|
.long sys_wait4
|
||||||
|
.long sys_swapoff /* 115 */
|
||||||
|
.long sys_sysinfo
|
||||||
|
.long sys_ipc
|
||||||
|
.long sys_fsync
|
||||||
|
.long sys_sigreturn
|
||||||
|
.long sys_clone /* 120 */
|
||||||
|
.long sys_setdomainname
|
||||||
|
.long sys_newuname
|
||||||
|
.long sys_cacheflush /* modify_ldt for i386 */
|
||||||
|
.long sys_adjtimex
|
||||||
|
.long sys_mprotect /* 125 */
|
||||||
|
.long sys_sigprocmask
|
||||||
|
.long sys_ni_syscall /* old "create_module" */
|
||||||
|
.long sys_init_module
|
||||||
|
.long sys_delete_module
|
||||||
|
.long sys_ni_syscall /* 130 - old "get_kernel_syms" */
|
||||||
|
.long sys_quotactl
|
||||||
|
.long sys_getpgid
|
||||||
|
.long sys_fchdir
|
||||||
|
.long sys_bdflush
|
||||||
|
.long sys_sysfs /* 135 */
|
||||||
|
.long sys_personality
|
||||||
|
.long sys_ni_syscall /* for afs_syscall */
|
||||||
|
.long sys_setfsuid16
|
||||||
|
.long sys_setfsgid16
|
||||||
|
.long sys_llseek /* 140 */
|
||||||
|
.long sys_getdents
|
||||||
|
.long sys_select
|
||||||
|
.long sys_flock
|
||||||
|
.long sys_msync
|
||||||
|
.long sys_readv /* 145 */
|
||||||
|
.long sys_writev
|
||||||
|
.long sys_getsid
|
||||||
|
.long sys_fdatasync
|
||||||
|
.long sys_sysctl
|
||||||
|
.long sys_mlock /* 150 */
|
||||||
|
.long sys_munlock
|
||||||
|
.long sys_mlockall
|
||||||
|
.long sys_munlockall
|
||||||
|
.long sys_sched_setparam
|
||||||
|
.long sys_sched_getparam /* 155 */
|
||||||
|
.long sys_sched_setscheduler
|
||||||
|
.long sys_sched_getscheduler
|
||||||
|
.long sys_sched_yield
|
||||||
|
.long sys_sched_get_priority_max
|
||||||
|
.long sys_sched_get_priority_min /* 160 */
|
||||||
|
.long sys_sched_rr_get_interval
|
||||||
|
.long sys_nanosleep
|
||||||
|
.long sys_mremap
|
||||||
|
.long sys_setresuid16
|
||||||
|
.long sys_getresuid16 /* 165 */
|
||||||
|
.long sys_getpagesize
|
||||||
|
.long sys_ni_syscall /* old sys_query_module */
|
||||||
|
.long sys_poll
|
||||||
|
.long sys_nfsservctl
|
||||||
|
.long sys_setresgid16 /* 170 */
|
||||||
|
.long sys_getresgid16
|
||||||
|
.long sys_prctl
|
||||||
|
.long sys_rt_sigreturn
|
||||||
|
.long sys_rt_sigaction
|
||||||
|
.long sys_rt_sigprocmask /* 175 */
|
||||||
|
.long sys_rt_sigpending
|
||||||
|
.long sys_rt_sigtimedwait
|
||||||
|
.long sys_rt_sigqueueinfo
|
||||||
|
.long sys_rt_sigsuspend
|
||||||
|
.long sys_pread64 /* 180 */
|
||||||
|
.long sys_pwrite64
|
||||||
|
.long sys_lchown16;
|
||||||
|
.long sys_getcwd
|
||||||
|
.long sys_capget
|
||||||
|
.long sys_capset /* 185 */
|
||||||
|
.long sys_sigaltstack
|
||||||
|
.long sys_sendfile
|
||||||
|
.long sys_ni_syscall /* streams1 */
|
||||||
|
.long sys_ni_syscall /* streams2 */
|
||||||
|
.long sys_vfork /* 190 */
|
||||||
|
.long sys_getrlimit
|
||||||
|
.long sys_mmap2
|
||||||
|
.long sys_truncate64
|
||||||
|
.long sys_ftruncate64
|
||||||
|
.long sys_stat64 /* 195 */
|
||||||
|
.long sys_lstat64
|
||||||
|
.long sys_fstat64
|
||||||
|
.long sys_chown
|
||||||
|
.long sys_getuid
|
||||||
|
.long sys_getgid /* 200 */
|
||||||
|
.long sys_geteuid
|
||||||
|
.long sys_getegid
|
||||||
|
.long sys_setreuid
|
||||||
|
.long sys_setregid
|
||||||
|
.long sys_getgroups /* 205 */
|
||||||
|
.long sys_setgroups
|
||||||
|
.long sys_fchown
|
||||||
|
.long sys_setresuid
|
||||||
|
.long sys_getresuid
|
||||||
|
.long sys_setresgid /* 210 */
|
||||||
|
.long sys_getresgid
|
||||||
|
.long sys_lchown
|
||||||
|
.long sys_setuid
|
||||||
|
.long sys_setgid
|
||||||
|
.long sys_setfsuid /* 215 */
|
||||||
|
.long sys_setfsgid
|
||||||
|
.long sys_pivot_root
|
||||||
|
.long sys_ni_syscall
|
||||||
|
.long sys_ni_syscall
|
||||||
|
.long sys_getdents64 /* 220 */
|
||||||
|
.long sys_gettid
|
||||||
|
.long sys_tkill
|
||||||
|
.long sys_setxattr
|
||||||
|
.long sys_lsetxattr
|
||||||
|
.long sys_fsetxattr /* 225 */
|
||||||
|
.long sys_getxattr
|
||||||
|
.long sys_lgetxattr
|
||||||
|
.long sys_fgetxattr
|
||||||
|
.long sys_listxattr
|
||||||
|
.long sys_llistxattr /* 230 */
|
||||||
|
.long sys_flistxattr
|
||||||
|
.long sys_removexattr
|
||||||
|
.long sys_lremovexattr
|
||||||
|
.long sys_fremovexattr
|
||||||
|
.long sys_futex /* 235 */
|
||||||
|
.long sys_sendfile64
|
||||||
|
.long sys_mincore
|
||||||
|
.long sys_madvise
|
||||||
|
.long sys_fcntl64
|
||||||
|
.long sys_readahead /* 240 */
|
||||||
|
.long sys_io_setup
|
||||||
|
.long sys_io_destroy
|
||||||
|
.long sys_io_getevents
|
||||||
|
.long sys_io_submit
|
||||||
|
.long sys_io_cancel /* 245 */
|
||||||
|
.long sys_fadvise64
|
||||||
|
.long sys_exit_group
|
||||||
|
.long sys_lookup_dcookie
|
||||||
|
.long sys_epoll_create
|
||||||
|
.long sys_epoll_ctl /* 250 */
|
||||||
|
.long sys_epoll_wait
|
||||||
|
.long sys_remap_file_pages
|
||||||
|
.long sys_set_tid_address
|
||||||
|
.long sys_timer_create
|
||||||
|
.long sys_timer_settime /* 255 */
|
||||||
|
.long sys_timer_gettime
|
||||||
|
.long sys_timer_getoverrun
|
||||||
|
.long sys_timer_delete
|
||||||
|
.long sys_clock_settime
|
||||||
|
.long sys_clock_gettime /* 260 */
|
||||||
|
.long sys_clock_getres
|
||||||
|
.long sys_clock_nanosleep
|
||||||
|
.long sys_statfs64
|
||||||
|
.long sys_fstatfs64
|
||||||
|
.long sys_tgkill /* 265 */
|
||||||
|
.long sys_utimes
|
||||||
|
.long sys_fadvise64_64
|
||||||
|
.long sys_mbind
|
||||||
|
.long sys_get_mempolicy
|
||||||
|
.long sys_set_mempolicy /* 270 */
|
||||||
|
.long sys_mq_open
|
||||||
|
.long sys_mq_unlink
|
||||||
|
.long sys_mq_timedsend
|
||||||
|
.long sys_mq_timedreceive
|
||||||
|
.long sys_mq_notify /* 275 */
|
||||||
|
.long sys_mq_getsetattr
|
||||||
|
.long sys_waitid
|
||||||
|
.long sys_ni_syscall /* for sys_vserver */
|
||||||
|
.long sys_add_key
|
||||||
|
.long sys_request_key /* 280 */
|
||||||
|
.long sys_keyctl
|
||||||
|
.long sys_ioprio_set
|
||||||
|
.long sys_ioprio_get
|
||||||
|
.long sys_inotify_init
|
||||||
|
.long sys_inotify_add_watch /* 285 */
|
||||||
|
.long sys_inotify_rm_watch
|
||||||
|
.long sys_migrate_pages
|
||||||
|
.long sys_openat
|
||||||
|
.long sys_mkdirat
|
||||||
|
.long sys_mknodat /* 290 */
|
||||||
|
.long sys_fchownat
|
||||||
|
.long sys_futimesat
|
||||||
|
.long sys_fstatat64
|
||||||
|
.long sys_unlinkat
|
||||||
|
.long sys_renameat /* 295 */
|
||||||
|
.long sys_linkat
|
||||||
|
.long sys_symlinkat
|
||||||
|
.long sys_readlinkat
|
||||||
|
.long sys_fchmodat
|
||||||
|
.long sys_faccessat /* 300 */
|
||||||
|
.long sys_ni_syscall /* Reserved for pselect6 */
|
||||||
|
.long sys_ni_syscall /* Reserved for ppoll */
|
||||||
|
.long sys_unshare
|
||||||
|
.long sys_set_robust_list
|
||||||
|
.long sys_get_robust_list /* 305 */
|
||||||
|
.long sys_splice
|
||||||
|
.long sys_sync_file_range
|
||||||
|
.long sys_tee
|
||||||
|
.long sys_vmsplice
|
||||||
|
.long sys_move_pages /* 310 */
|
||||||
|
.long sys_sched_setaffinity
|
||||||
|
.long sys_sched_getaffinity
|
||||||
|
.long sys_kexec_load
|
||||||
|
.long sys_getcpu
|
||||||
|
.long sys_epoll_pwait /* 315 */
|
||||||
|
.long sys_utimensat
|
||||||
|
.long sys_signalfd
|
||||||
|
.long sys_timerfd_create
|
||||||
|
.long sys_eventfd
|
||||||
|
.long sys_fallocate /* 320 */
|
||||||
|
.long sys_timerfd_settime
|
||||||
|
.long sys_timerfd_gettime
|
||||||
|
.long sys_signalfd4
|
||||||
|
.long sys_eventfd2
|
||||||
|
.long sys_epoll_create1 /* 325 */
|
||||||
|
.long sys_dup3
|
||||||
|
.long sys_pipe2
|
||||||
|
.long sys_inotify_init1
|
||||||
|
.long sys_preadv
|
||||||
|
.long sys_pwritev /* 330 */
|
||||||
|
.long sys_rt_tgsigqueueinfo
|
||||||
|
.long sys_perf_event_open
|
||||||
|
.long sys_get_thread_area
|
||||||
|
.long sys_set_thread_area
|
||||||
|
.long sys_atomic_cmpxchg_32 /* 335 */
|
||||||
|
.long sys_atomic_barrier
|
||||||
|
.long sys_fanotify_init
|
||||||
|
.long sys_fanotify_mark
|
||||||
|
.long sys_prlimit64
|
||||||
|
|
|
@ -1,16 +1,5 @@
|
||||||
#include <linux/module.h>
|
#ifdef CONFIG_MMU
|
||||||
|
#include "m68k_ksyms_mm.c"
|
||||||
asmlinkage long long __ashldi3 (long long, int);
|
#else
|
||||||
asmlinkage long long __ashrdi3 (long long, int);
|
#include "m68k_ksyms_no.c"
|
||||||
asmlinkage long long __lshrdi3 (long long, int);
|
#endif
|
||||||
asmlinkage long long __muldi3 (long long, long long);
|
|
||||||
|
|
||||||
/* The following are special because they're not called
|
|
||||||
explicitly (the C compiler generates them). Fortunately,
|
|
||||||
their interface isn't gonna change any time soon now, so
|
|
||||||
it's OK to leave it out of version control. */
|
|
||||||
EXPORT_SYMBOL(__ashldi3);
|
|
||||||
EXPORT_SYMBOL(__ashrdi3);
|
|
||||||
EXPORT_SYMBOL(__lshrdi3);
|
|
||||||
EXPORT_SYMBOL(__muldi3);
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
#include <linux/module.h>
|
||||||
|
|
||||||
|
asmlinkage long long __ashldi3 (long long, int);
|
||||||
|
asmlinkage long long __ashrdi3 (long long, int);
|
||||||
|
asmlinkage long long __lshrdi3 (long long, int);
|
||||||
|
asmlinkage long long __muldi3 (long long, long long);
|
||||||
|
|
||||||
|
/* The following are special because they're not called
|
||||||
|
explicitly (the C compiler generates them). Fortunately,
|
||||||
|
their interface isn't gonna change any time soon now, so
|
||||||
|
it's OK to leave it out of version control. */
|
||||||
|
EXPORT_SYMBOL(__ashldi3);
|
||||||
|
EXPORT_SYMBOL(__ashrdi3);
|
||||||
|
EXPORT_SYMBOL(__lshrdi3);
|
||||||
|
EXPORT_SYMBOL(__muldi3);
|
||||||
|
|
|
@ -1,155 +1,5 @@
|
||||||
/*
|
#ifdef CONFIG_MMU
|
||||||
* This file is subject to the terms and conditions of the GNU General Public
|
#include "module_mm.c"
|
||||||
* License. See the file COPYING in the main directory of this archive
|
|
||||||
* for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/moduleloader.h>
|
|
||||||
#include <linux/elf.h>
|
|
||||||
#include <linux/vmalloc.h>
|
|
||||||
#include <linux/fs.h>
|
|
||||||
#include <linux/string.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
#define DEBUGP printk
|
|
||||||
#else
|
#else
|
||||||
#define DEBUGP(fmt...)
|
#include "module_no.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_MODULES
|
|
||||||
|
|
||||||
void *module_alloc(unsigned long size)
|
|
||||||
{
|
|
||||||
if (size == 0)
|
|
||||||
return NULL;
|
|
||||||
return vmalloc(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Free memory returned from module_alloc */
|
|
||||||
void module_free(struct module *mod, void *module_region)
|
|
||||||
{
|
|
||||||
vfree(module_region);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We don't need anything special. */
|
|
||||||
int module_frob_arch_sections(Elf_Ehdr *hdr,
|
|
||||||
Elf_Shdr *sechdrs,
|
|
||||||
char *secstrings,
|
|
||||||
struct module *mod)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int apply_relocate(Elf32_Shdr *sechdrs,
|
|
||||||
const char *strtab,
|
|
||||||
unsigned int symindex,
|
|
||||||
unsigned int relsec,
|
|
||||||
struct module *me)
|
|
||||||
{
|
|
||||||
unsigned int i;
|
|
||||||
Elf32_Rel *rel = (void *)sechdrs[relsec].sh_addr;
|
|
||||||
Elf32_Sym *sym;
|
|
||||||
uint32_t *location;
|
|
||||||
|
|
||||||
DEBUGP("Applying relocate section %u to %u\n", relsec,
|
|
||||||
sechdrs[relsec].sh_info);
|
|
||||||
for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
|
|
||||||
/* This is where to make the change */
|
|
||||||
location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
|
|
||||||
+ rel[i].r_offset;
|
|
||||||
/* This is the symbol it is referring to. Note that all
|
|
||||||
undefined symbols have been resolved. */
|
|
||||||
sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
|
|
||||||
+ ELF32_R_SYM(rel[i].r_info);
|
|
||||||
|
|
||||||
switch (ELF32_R_TYPE(rel[i].r_info)) {
|
|
||||||
case R_68K_32:
|
|
||||||
/* We add the value into the location given */
|
|
||||||
*location += sym->st_value;
|
|
||||||
break;
|
|
||||||
case R_68K_PC32:
|
|
||||||
/* Add the value, subtract its postition */
|
|
||||||
*location += sym->st_value - (uint32_t)location;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
printk(KERN_ERR "module %s: Unknown relocation: %u\n",
|
|
||||||
me->name, ELF32_R_TYPE(rel[i].r_info));
|
|
||||||
return -ENOEXEC;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int apply_relocate_add(Elf32_Shdr *sechdrs,
|
|
||||||
const char *strtab,
|
|
||||||
unsigned int symindex,
|
|
||||||
unsigned int relsec,
|
|
||||||
struct module *me)
|
|
||||||
{
|
|
||||||
unsigned int i;
|
|
||||||
Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr;
|
|
||||||
Elf32_Sym *sym;
|
|
||||||
uint32_t *location;
|
|
||||||
|
|
||||||
DEBUGP("Applying relocate_add section %u to %u\n", relsec,
|
|
||||||
sechdrs[relsec].sh_info);
|
|
||||||
for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
|
|
||||||
/* This is where to make the change */
|
|
||||||
location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
|
|
||||||
+ rel[i].r_offset;
|
|
||||||
/* This is the symbol it is referring to. Note that all
|
|
||||||
undefined symbols have been resolved. */
|
|
||||||
sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
|
|
||||||
+ ELF32_R_SYM(rel[i].r_info);
|
|
||||||
|
|
||||||
switch (ELF32_R_TYPE(rel[i].r_info)) {
|
|
||||||
case R_68K_32:
|
|
||||||
/* We add the value into the location given */
|
|
||||||
*location = rel[i].r_addend + sym->st_value;
|
|
||||||
break;
|
|
||||||
case R_68K_PC32:
|
|
||||||
/* Add the value, subtract its postition */
|
|
||||||
*location = rel[i].r_addend + sym->st_value - (uint32_t)location;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
printk(KERN_ERR "module %s: Unknown relocation: %u\n",
|
|
||||||
me->name, ELF32_R_TYPE(rel[i].r_info));
|
|
||||||
return -ENOEXEC;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int module_finalize(const Elf_Ehdr *hdr,
|
|
||||||
const Elf_Shdr *sechdrs,
|
|
||||||
struct module *mod)
|
|
||||||
{
|
|
||||||
module_fixup(mod, mod->arch.fixup_start, mod->arch.fixup_end);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void module_arch_cleanup(struct module *mod)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* CONFIG_MODULES */
|
|
||||||
|
|
||||||
void module_fixup(struct module *mod, struct m68k_fixup_info *start,
|
|
||||||
struct m68k_fixup_info *end)
|
|
||||||
{
|
|
||||||
struct m68k_fixup_info *fixup;
|
|
||||||
|
|
||||||
for (fixup = start; fixup < end; fixup++) {
|
|
||||||
switch (fixup->type) {
|
|
||||||
case m68k_fixup_memoffset:
|
|
||||||
*(u32 *)fixup->addr = m68k_memoffset;
|
|
||||||
break;
|
|
||||||
case m68k_fixup_vnode_shift:
|
|
||||||
*(u16 *)fixup->addr += m68k_virt_to_node_shift;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,155 @@
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/moduleloader.h>
|
||||||
|
#include <linux/elf.h>
|
||||||
|
#include <linux/vmalloc.h>
|
||||||
|
#include <linux/fs.h>
|
||||||
|
#include <linux/string.h>
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
#define DEBUGP printk
|
||||||
|
#else
|
||||||
|
#define DEBUGP(fmt...)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_MODULES
|
||||||
|
|
||||||
|
void *module_alloc(unsigned long size)
|
||||||
|
{
|
||||||
|
if (size == 0)
|
||||||
|
return NULL;
|
||||||
|
return vmalloc(size);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Free memory returned from module_alloc */
|
||||||
|
void module_free(struct module *mod, void *module_region)
|
||||||
|
{
|
||||||
|
vfree(module_region);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* We don't need anything special. */
|
||||||
|
int module_frob_arch_sections(Elf_Ehdr *hdr,
|
||||||
|
Elf_Shdr *sechdrs,
|
||||||
|
char *secstrings,
|
||||||
|
struct module *mod)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int apply_relocate(Elf32_Shdr *sechdrs,
|
||||||
|
const char *strtab,
|
||||||
|
unsigned int symindex,
|
||||||
|
unsigned int relsec,
|
||||||
|
struct module *me)
|
||||||
|
{
|
||||||
|
unsigned int i;
|
||||||
|
Elf32_Rel *rel = (void *)sechdrs[relsec].sh_addr;
|
||||||
|
Elf32_Sym *sym;
|
||||||
|
uint32_t *location;
|
||||||
|
|
||||||
|
DEBUGP("Applying relocate section %u to %u\n", relsec,
|
||||||
|
sechdrs[relsec].sh_info);
|
||||||
|
for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
|
||||||
|
/* This is where to make the change */
|
||||||
|
location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
|
||||||
|
+ rel[i].r_offset;
|
||||||
|
/* This is the symbol it is referring to. Note that all
|
||||||
|
undefined symbols have been resolved. */
|
||||||
|
sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
|
||||||
|
+ ELF32_R_SYM(rel[i].r_info);
|
||||||
|
|
||||||
|
switch (ELF32_R_TYPE(rel[i].r_info)) {
|
||||||
|
case R_68K_32:
|
||||||
|
/* We add the value into the location given */
|
||||||
|
*location += sym->st_value;
|
||||||
|
break;
|
||||||
|
case R_68K_PC32:
|
||||||
|
/* Add the value, subtract its postition */
|
||||||
|
*location += sym->st_value - (uint32_t)location;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
printk(KERN_ERR "module %s: Unknown relocation: %u\n",
|
||||||
|
me->name, ELF32_R_TYPE(rel[i].r_info));
|
||||||
|
return -ENOEXEC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int apply_relocate_add(Elf32_Shdr *sechdrs,
|
||||||
|
const char *strtab,
|
||||||
|
unsigned int symindex,
|
||||||
|
unsigned int relsec,
|
||||||
|
struct module *me)
|
||||||
|
{
|
||||||
|
unsigned int i;
|
||||||
|
Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr;
|
||||||
|
Elf32_Sym *sym;
|
||||||
|
uint32_t *location;
|
||||||
|
|
||||||
|
DEBUGP("Applying relocate_add section %u to %u\n", relsec,
|
||||||
|
sechdrs[relsec].sh_info);
|
||||||
|
for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
|
||||||
|
/* This is where to make the change */
|
||||||
|
location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
|
||||||
|
+ rel[i].r_offset;
|
||||||
|
/* This is the symbol it is referring to. Note that all
|
||||||
|
undefined symbols have been resolved. */
|
||||||
|
sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
|
||||||
|
+ ELF32_R_SYM(rel[i].r_info);
|
||||||
|
|
||||||
|
switch (ELF32_R_TYPE(rel[i].r_info)) {
|
||||||
|
case R_68K_32:
|
||||||
|
/* We add the value into the location given */
|
||||||
|
*location = rel[i].r_addend + sym->st_value;
|
||||||
|
break;
|
||||||
|
case R_68K_PC32:
|
||||||
|
/* Add the value, subtract its postition */
|
||||||
|
*location = rel[i].r_addend + sym->st_value - (uint32_t)location;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
printk(KERN_ERR "module %s: Unknown relocation: %u\n",
|
||||||
|
me->name, ELF32_R_TYPE(rel[i].r_info));
|
||||||
|
return -ENOEXEC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int module_finalize(const Elf_Ehdr *hdr,
|
||||||
|
const Elf_Shdr *sechdrs,
|
||||||
|
struct module *mod)
|
||||||
|
{
|
||||||
|
module_fixup(mod, mod->arch.fixup_start, mod->arch.fixup_end);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void module_arch_cleanup(struct module *mod)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_MODULES */
|
||||||
|
|
||||||
|
void module_fixup(struct module *mod, struct m68k_fixup_info *start,
|
||||||
|
struct m68k_fixup_info *end)
|
||||||
|
{
|
||||||
|
struct m68k_fixup_info *fixup;
|
||||||
|
|
||||||
|
for (fixup = start; fixup < end; fixup++) {
|
||||||
|
switch (fixup->type) {
|
||||||
|
case m68k_fixup_memoffset:
|
||||||
|
*(u32 *)fixup->addr = m68k_memoffset;
|
||||||
|
break;
|
||||||
|
case m68k_fixup_vnode_shift:
|
||||||
|
*(u16 *)fixup->addr += m68k_virt_to_node_shift;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,354 +1,5 @@
|
||||||
/*
|
#ifdef CONFIG_MMU
|
||||||
* linux/arch/m68k/kernel/process.c
|
#include "process_mm.c"
|
||||||
*
|
|
||||||
* Copyright (C) 1995 Hamish Macdonald
|
|
||||||
*
|
|
||||||
* 68060 fixes by Jesper Skov
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This file handles the architecture-dependent parts of process handling..
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/errno.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/sched.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/mm.h>
|
|
||||||
#include <linux/slab.h>
|
|
||||||
#include <linux/fs.h>
|
|
||||||
#include <linux/smp.h>
|
|
||||||
#include <linux/stddef.h>
|
|
||||||
#include <linux/unistd.h>
|
|
||||||
#include <linux/ptrace.h>
|
|
||||||
#include <linux/user.h>
|
|
||||||
#include <linux/reboot.h>
|
|
||||||
#include <linux/init_task.h>
|
|
||||||
#include <linux/mqueue.h>
|
|
||||||
|
|
||||||
#include <asm/uaccess.h>
|
|
||||||
#include <asm/system.h>
|
|
||||||
#include <asm/traps.h>
|
|
||||||
#include <asm/machdep.h>
|
|
||||||
#include <asm/setup.h>
|
|
||||||
#include <asm/pgtable.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Initial task/thread structure. Make this a per-architecture thing,
|
|
||||||
* because different architectures tend to have different
|
|
||||||
* alignment requirements and potentially different initial
|
|
||||||
* setup.
|
|
||||||
*/
|
|
||||||
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
|
|
||||||
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
|
|
||||||
union thread_union init_thread_union __init_task_data
|
|
||||||
__attribute__((aligned(THREAD_SIZE))) =
|
|
||||||
{ INIT_THREAD_INFO(init_task) };
|
|
||||||
|
|
||||||
/* initial task structure */
|
|
||||||
struct task_struct init_task = INIT_TASK(init_task);
|
|
||||||
|
|
||||||
EXPORT_SYMBOL(init_task);
|
|
||||||
|
|
||||||
asmlinkage void ret_from_fork(void);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Return saved PC from a blocked thread
|
|
||||||
*/
|
|
||||||
unsigned long thread_saved_pc(struct task_struct *tsk)
|
|
||||||
{
|
|
||||||
struct switch_stack *sw = (struct switch_stack *)tsk->thread.ksp;
|
|
||||||
/* Check whether the thread is blocked in resume() */
|
|
||||||
if (in_sched_functions(sw->retpc))
|
|
||||||
return ((unsigned long *)sw->a6)[1];
|
|
||||||
else
|
|
||||||
return sw->retpc;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The idle loop on an m68k..
|
|
||||||
*/
|
|
||||||
static void default_idle(void)
|
|
||||||
{
|
|
||||||
if (!need_resched())
|
|
||||||
#if defined(MACH_ATARI_ONLY)
|
|
||||||
/* block out HSYNC on the atari (falcon) */
|
|
||||||
__asm__("stop #0x2200" : : : "cc");
|
|
||||||
#else
|
#else
|
||||||
__asm__("stop #0x2000" : : : "cc");
|
#include "process_no.c"
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
void (*idle)(void) = default_idle;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The idle thread. There's no useful work to be
|
|
||||||
* done, so just try to conserve power and have a
|
|
||||||
* low exit latency (ie sit in a loop waiting for
|
|
||||||
* somebody to say that they'd like to reschedule)
|
|
||||||
*/
|
|
||||||
void cpu_idle(void)
|
|
||||||
{
|
|
||||||
/* endless idle loop with no priority at all */
|
|
||||||
while (1) {
|
|
||||||
while (!need_resched())
|
|
||||||
idle();
|
|
||||||
preempt_enable_no_resched();
|
|
||||||
schedule();
|
|
||||||
preempt_disable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void machine_restart(char * __unused)
|
|
||||||
{
|
|
||||||
if (mach_reset)
|
|
||||||
mach_reset();
|
|
||||||
for (;;);
|
|
||||||
}
|
|
||||||
|
|
||||||
void machine_halt(void)
|
|
||||||
{
|
|
||||||
if (mach_halt)
|
|
||||||
mach_halt();
|
|
||||||
for (;;);
|
|
||||||
}
|
|
||||||
|
|
||||||
void machine_power_off(void)
|
|
||||||
{
|
|
||||||
if (mach_power_off)
|
|
||||||
mach_power_off();
|
|
||||||
for (;;);
|
|
||||||
}
|
|
||||||
|
|
||||||
void (*pm_power_off)(void) = machine_power_off;
|
|
||||||
EXPORT_SYMBOL(pm_power_off);
|
|
||||||
|
|
||||||
void show_regs(struct pt_regs * regs)
|
|
||||||
{
|
|
||||||
printk("\n");
|
|
||||||
printk("Format %02x Vector: %04x PC: %08lx Status: %04x %s\n",
|
|
||||||
regs->format, regs->vector, regs->pc, regs->sr, print_tainted());
|
|
||||||
printk("ORIG_D0: %08lx D0: %08lx A2: %08lx A1: %08lx\n",
|
|
||||||
regs->orig_d0, regs->d0, regs->a2, regs->a1);
|
|
||||||
printk("A0: %08lx D5: %08lx D4: %08lx\n",
|
|
||||||
regs->a0, regs->d5, regs->d4);
|
|
||||||
printk("D3: %08lx D2: %08lx D1: %08lx\n",
|
|
||||||
regs->d3, regs->d2, regs->d1);
|
|
||||||
if (!(regs->sr & PS_S))
|
|
||||||
printk("USP: %08lx\n", rdusp());
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Create a kernel thread
|
|
||||||
*/
|
|
||||||
int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
|
|
||||||
{
|
|
||||||
int pid;
|
|
||||||
mm_segment_t fs;
|
|
||||||
|
|
||||||
fs = get_fs();
|
|
||||||
set_fs (KERNEL_DS);
|
|
||||||
|
|
||||||
{
|
|
||||||
register long retval __asm__ ("d0");
|
|
||||||
register long clone_arg __asm__ ("d1") = flags | CLONE_VM | CLONE_UNTRACED;
|
|
||||||
|
|
||||||
retval = __NR_clone;
|
|
||||||
__asm__ __volatile__
|
|
||||||
("clrl %%d2\n\t"
|
|
||||||
"trap #0\n\t" /* Linux/m68k system call */
|
|
||||||
"tstl %0\n\t" /* child or parent */
|
|
||||||
"jne 1f\n\t" /* parent - jump */
|
|
||||||
"lea %%sp@(%c7),%6\n\t" /* reload current */
|
|
||||||
"movel %6@,%6\n\t"
|
|
||||||
"movel %3,%%sp@-\n\t" /* push argument */
|
|
||||||
"jsr %4@\n\t" /* call fn */
|
|
||||||
"movel %0,%%d1\n\t" /* pass exit value */
|
|
||||||
"movel %2,%%d0\n\t" /* exit */
|
|
||||||
"trap #0\n"
|
|
||||||
"1:"
|
|
||||||
: "+d" (retval)
|
|
||||||
: "i" (__NR_clone), "i" (__NR_exit),
|
|
||||||
"r" (arg), "a" (fn), "d" (clone_arg), "r" (current),
|
|
||||||
"i" (-THREAD_SIZE)
|
|
||||||
: "d2");
|
|
||||||
|
|
||||||
pid = retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
set_fs (fs);
|
|
||||||
return pid;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(kernel_thread);
|
|
||||||
|
|
||||||
void flush_thread(void)
|
|
||||||
{
|
|
||||||
unsigned long zero = 0;
|
|
||||||
set_fs(USER_DS);
|
|
||||||
current->thread.fs = __USER_DS;
|
|
||||||
if (!FPU_IS_EMU)
|
|
||||||
asm volatile (".chip 68k/68881\n\t"
|
|
||||||
"frestore %0@\n\t"
|
|
||||||
".chip 68k" : : "a" (&zero));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* "m68k_fork()".. By the time we get here, the
|
|
||||||
* non-volatile registers have also been saved on the
|
|
||||||
* stack. We do some ugly pointer stuff here.. (see
|
|
||||||
* also copy_thread)
|
|
||||||
*/
|
|
||||||
|
|
||||||
asmlinkage int m68k_fork(struct pt_regs *regs)
|
|
||||||
{
|
|
||||||
return do_fork(SIGCHLD, rdusp(), regs, 0, NULL, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
asmlinkage int m68k_vfork(struct pt_regs *regs)
|
|
||||||
{
|
|
||||||
return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), regs, 0,
|
|
||||||
NULL, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
asmlinkage int m68k_clone(struct pt_regs *regs)
|
|
||||||
{
|
|
||||||
unsigned long clone_flags;
|
|
||||||
unsigned long newsp;
|
|
||||||
int __user *parent_tidptr, *child_tidptr;
|
|
||||||
|
|
||||||
/* syscall2 puts clone_flags in d1 and usp in d2 */
|
|
||||||
clone_flags = regs->d1;
|
|
||||||
newsp = regs->d2;
|
|
||||||
parent_tidptr = (int __user *)regs->d3;
|
|
||||||
child_tidptr = (int __user *)regs->d4;
|
|
||||||
if (!newsp)
|
|
||||||
newsp = rdusp();
|
|
||||||
return do_fork(clone_flags, newsp, regs, 0,
|
|
||||||
parent_tidptr, child_tidptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
int copy_thread(unsigned long clone_flags, unsigned long usp,
|
|
||||||
unsigned long unused,
|
|
||||||
struct task_struct * p, struct pt_regs * regs)
|
|
||||||
{
|
|
||||||
struct pt_regs * childregs;
|
|
||||||
struct switch_stack * childstack, *stack;
|
|
||||||
unsigned long *retp;
|
|
||||||
|
|
||||||
childregs = (struct pt_regs *) (task_stack_page(p) + THREAD_SIZE) - 1;
|
|
||||||
|
|
||||||
*childregs = *regs;
|
|
||||||
childregs->d0 = 0;
|
|
||||||
|
|
||||||
retp = ((unsigned long *) regs);
|
|
||||||
stack = ((struct switch_stack *) retp) - 1;
|
|
||||||
|
|
||||||
childstack = ((struct switch_stack *) childregs) - 1;
|
|
||||||
*childstack = *stack;
|
|
||||||
childstack->retpc = (unsigned long)ret_from_fork;
|
|
||||||
|
|
||||||
p->thread.usp = usp;
|
|
||||||
p->thread.ksp = (unsigned long)childstack;
|
|
||||||
|
|
||||||
if (clone_flags & CLONE_SETTLS)
|
|
||||||
task_thread_info(p)->tp_value = regs->d5;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Must save the current SFC/DFC value, NOT the value when
|
|
||||||
* the parent was last descheduled - RGH 10-08-96
|
|
||||||
*/
|
|
||||||
p->thread.fs = get_fs().seg;
|
|
||||||
|
|
||||||
if (!FPU_IS_EMU) {
|
|
||||||
/* Copy the current fpu state */
|
|
||||||
asm volatile ("fsave %0" : : "m" (p->thread.fpstate[0]) : "memory");
|
|
||||||
|
|
||||||
if (!CPU_IS_060 ? p->thread.fpstate[0] : p->thread.fpstate[2])
|
|
||||||
asm volatile ("fmovemx %/fp0-%/fp7,%0\n\t"
|
|
||||||
"fmoveml %/fpiar/%/fpcr/%/fpsr,%1"
|
|
||||||
: : "m" (p->thread.fp[0]), "m" (p->thread.fpcntl[0])
|
|
||||||
: "memory");
|
|
||||||
/* Restore the state in case the fpu was busy */
|
|
||||||
asm volatile ("frestore %0" : : "m" (p->thread.fpstate[0]));
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Fill in the fpu structure for a core dump. */
|
|
||||||
|
|
||||||
int dump_fpu (struct pt_regs *regs, struct user_m68kfp_struct *fpu)
|
|
||||||
{
|
|
||||||
char fpustate[216];
|
|
||||||
|
|
||||||
if (FPU_IS_EMU) {
|
|
||||||
int i;
|
|
||||||
|
|
||||||
memcpy(fpu->fpcntl, current->thread.fpcntl, 12);
|
|
||||||
memcpy(fpu->fpregs, current->thread.fp, 96);
|
|
||||||
/* Convert internal fpu reg representation
|
|
||||||
* into long double format
|
|
||||||
*/
|
|
||||||
for (i = 0; i < 24; i += 3)
|
|
||||||
fpu->fpregs[i] = ((fpu->fpregs[i] & 0xffff0000) << 15) |
|
|
||||||
((fpu->fpregs[i] & 0x0000ffff) << 16);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* First dump the fpu context to avoid protocol violation. */
|
|
||||||
asm volatile ("fsave %0" :: "m" (fpustate[0]) : "memory");
|
|
||||||
if (!CPU_IS_060 ? !fpustate[0] : !fpustate[2])
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
asm volatile ("fmovem %/fpiar/%/fpcr/%/fpsr,%0"
|
|
||||||
:: "m" (fpu->fpcntl[0])
|
|
||||||
: "memory");
|
|
||||||
asm volatile ("fmovemx %/fp0-%/fp7,%0"
|
|
||||||
:: "m" (fpu->fpregs[0])
|
|
||||||
: "memory");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(dump_fpu);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* sys_execve() executes a new program.
|
|
||||||
*/
|
|
||||||
asmlinkage int sys_execve(const char __user *name,
|
|
||||||
const char __user *const __user *argv,
|
|
||||||
const char __user *const __user *envp)
|
|
||||||
{
|
|
||||||
int error;
|
|
||||||
char * filename;
|
|
||||||
struct pt_regs *regs = (struct pt_regs *) &name;
|
|
||||||
|
|
||||||
filename = getname(name);
|
|
||||||
error = PTR_ERR(filename);
|
|
||||||
if (IS_ERR(filename))
|
|
||||||
return error;
|
|
||||||
error = do_execve(filename, argv, envp, regs);
|
|
||||||
putname(filename);
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned long get_wchan(struct task_struct *p)
|
|
||||||
{
|
|
||||||
unsigned long fp, pc;
|
|
||||||
unsigned long stack_page;
|
|
||||||
int count = 0;
|
|
||||||
if (!p || p == current || p->state == TASK_RUNNING)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
stack_page = (unsigned long)task_stack_page(p);
|
|
||||||
fp = ((struct switch_stack *)p->thread.ksp)->a6;
|
|
||||||
do {
|
|
||||||
if (fp < stack_page+sizeof(struct thread_info) ||
|
|
||||||
fp >= 8184+stack_page)
|
|
||||||
return 0;
|
|
||||||
pc = ((unsigned long *)fp)[1];
|
|
||||||
if (!in_sched_functions(pc))
|
|
||||||
return pc;
|
|
||||||
fp = *(unsigned long *) fp;
|
|
||||||
} while (count++ < 16);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,354 @@
|
||||||
|
/*
|
||||||
|
* linux/arch/m68k/kernel/process.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 1995 Hamish Macdonald
|
||||||
|
*
|
||||||
|
* 68060 fixes by Jesper Skov
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file handles the architecture-dependent parts of process handling..
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/errno.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/sched.h>
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/mm.h>
|
||||||
|
#include <linux/slab.h>
|
||||||
|
#include <linux/fs.h>
|
||||||
|
#include <linux/smp.h>
|
||||||
|
#include <linux/stddef.h>
|
||||||
|
#include <linux/unistd.h>
|
||||||
|
#include <linux/ptrace.h>
|
||||||
|
#include <linux/user.h>
|
||||||
|
#include <linux/reboot.h>
|
||||||
|
#include <linux/init_task.h>
|
||||||
|
#include <linux/mqueue.h>
|
||||||
|
|
||||||
|
#include <asm/uaccess.h>
|
||||||
|
#include <asm/system.h>
|
||||||
|
#include <asm/traps.h>
|
||||||
|
#include <asm/machdep.h>
|
||||||
|
#include <asm/setup.h>
|
||||||
|
#include <asm/pgtable.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initial task/thread structure. Make this a per-architecture thing,
|
||||||
|
* because different architectures tend to have different
|
||||||
|
* alignment requirements and potentially different initial
|
||||||
|
* setup.
|
||||||
|
*/
|
||||||
|
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
|
||||||
|
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
|
||||||
|
union thread_union init_thread_union __init_task_data
|
||||||
|
__attribute__((aligned(THREAD_SIZE))) =
|
||||||
|
{ INIT_THREAD_INFO(init_task) };
|
||||||
|
|
||||||
|
/* initial task structure */
|
||||||
|
struct task_struct init_task = INIT_TASK(init_task);
|
||||||
|
|
||||||
|
EXPORT_SYMBOL(init_task);
|
||||||
|
|
||||||
|
asmlinkage void ret_from_fork(void);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return saved PC from a blocked thread
|
||||||
|
*/
|
||||||
|
unsigned long thread_saved_pc(struct task_struct *tsk)
|
||||||
|
{
|
||||||
|
struct switch_stack *sw = (struct switch_stack *)tsk->thread.ksp;
|
||||||
|
/* Check whether the thread is blocked in resume() */
|
||||||
|
if (in_sched_functions(sw->retpc))
|
||||||
|
return ((unsigned long *)sw->a6)[1];
|
||||||
|
else
|
||||||
|
return sw->retpc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The idle loop on an m68k..
|
||||||
|
*/
|
||||||
|
static void default_idle(void)
|
||||||
|
{
|
||||||
|
if (!need_resched())
|
||||||
|
#if defined(MACH_ATARI_ONLY)
|
||||||
|
/* block out HSYNC on the atari (falcon) */
|
||||||
|
__asm__("stop #0x2200" : : : "cc");
|
||||||
|
#else
|
||||||
|
__asm__("stop #0x2000" : : : "cc");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void (*idle)(void) = default_idle;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The idle thread. There's no useful work to be
|
||||||
|
* done, so just try to conserve power and have a
|
||||||
|
* low exit latency (ie sit in a loop waiting for
|
||||||
|
* somebody to say that they'd like to reschedule)
|
||||||
|
*/
|
||||||
|
void cpu_idle(void)
|
||||||
|
{
|
||||||
|
/* endless idle loop with no priority at all */
|
||||||
|
while (1) {
|
||||||
|
while (!need_resched())
|
||||||
|
idle();
|
||||||
|
preempt_enable_no_resched();
|
||||||
|
schedule();
|
||||||
|
preempt_disable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void machine_restart(char * __unused)
|
||||||
|
{
|
||||||
|
if (mach_reset)
|
||||||
|
mach_reset();
|
||||||
|
for (;;);
|
||||||
|
}
|
||||||
|
|
||||||
|
void machine_halt(void)
|
||||||
|
{
|
||||||
|
if (mach_halt)
|
||||||
|
mach_halt();
|
||||||
|
for (;;);
|
||||||
|
}
|
||||||
|
|
||||||
|
void machine_power_off(void)
|
||||||
|
{
|
||||||
|
if (mach_power_off)
|
||||||
|
mach_power_off();
|
||||||
|
for (;;);
|
||||||
|
}
|
||||||
|
|
||||||
|
void (*pm_power_off)(void) = machine_power_off;
|
||||||
|
EXPORT_SYMBOL(pm_power_off);
|
||||||
|
|
||||||
|
void show_regs(struct pt_regs * regs)
|
||||||
|
{
|
||||||
|
printk("\n");
|
||||||
|
printk("Format %02x Vector: %04x PC: %08lx Status: %04x %s\n",
|
||||||
|
regs->format, regs->vector, regs->pc, regs->sr, print_tainted());
|
||||||
|
printk("ORIG_D0: %08lx D0: %08lx A2: %08lx A1: %08lx\n",
|
||||||
|
regs->orig_d0, regs->d0, regs->a2, regs->a1);
|
||||||
|
printk("A0: %08lx D5: %08lx D4: %08lx\n",
|
||||||
|
regs->a0, regs->d5, regs->d4);
|
||||||
|
printk("D3: %08lx D2: %08lx D1: %08lx\n",
|
||||||
|
regs->d3, regs->d2, regs->d1);
|
||||||
|
if (!(regs->sr & PS_S))
|
||||||
|
printk("USP: %08lx\n", rdusp());
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create a kernel thread
|
||||||
|
*/
|
||||||
|
int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
|
||||||
|
{
|
||||||
|
int pid;
|
||||||
|
mm_segment_t fs;
|
||||||
|
|
||||||
|
fs = get_fs();
|
||||||
|
set_fs (KERNEL_DS);
|
||||||
|
|
||||||
|
{
|
||||||
|
register long retval __asm__ ("d0");
|
||||||
|
register long clone_arg __asm__ ("d1") = flags | CLONE_VM | CLONE_UNTRACED;
|
||||||
|
|
||||||
|
retval = __NR_clone;
|
||||||
|
__asm__ __volatile__
|
||||||
|
("clrl %%d2\n\t"
|
||||||
|
"trap #0\n\t" /* Linux/m68k system call */
|
||||||
|
"tstl %0\n\t" /* child or parent */
|
||||||
|
"jne 1f\n\t" /* parent - jump */
|
||||||
|
"lea %%sp@(%c7),%6\n\t" /* reload current */
|
||||||
|
"movel %6@,%6\n\t"
|
||||||
|
"movel %3,%%sp@-\n\t" /* push argument */
|
||||||
|
"jsr %4@\n\t" /* call fn */
|
||||||
|
"movel %0,%%d1\n\t" /* pass exit value */
|
||||||
|
"movel %2,%%d0\n\t" /* exit */
|
||||||
|
"trap #0\n"
|
||||||
|
"1:"
|
||||||
|
: "+d" (retval)
|
||||||
|
: "i" (__NR_clone), "i" (__NR_exit),
|
||||||
|
"r" (arg), "a" (fn), "d" (clone_arg), "r" (current),
|
||||||
|
"i" (-THREAD_SIZE)
|
||||||
|
: "d2");
|
||||||
|
|
||||||
|
pid = retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
set_fs (fs);
|
||||||
|
return pid;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(kernel_thread);
|
||||||
|
|
||||||
|
void flush_thread(void)
|
||||||
|
{
|
||||||
|
unsigned long zero = 0;
|
||||||
|
set_fs(USER_DS);
|
||||||
|
current->thread.fs = __USER_DS;
|
||||||
|
if (!FPU_IS_EMU)
|
||||||
|
asm volatile (".chip 68k/68881\n\t"
|
||||||
|
"frestore %0@\n\t"
|
||||||
|
".chip 68k" : : "a" (&zero));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* "m68k_fork()".. By the time we get here, the
|
||||||
|
* non-volatile registers have also been saved on the
|
||||||
|
* stack. We do some ugly pointer stuff here.. (see
|
||||||
|
* also copy_thread)
|
||||||
|
*/
|
||||||
|
|
||||||
|
asmlinkage int m68k_fork(struct pt_regs *regs)
|
||||||
|
{
|
||||||
|
return do_fork(SIGCHLD, rdusp(), regs, 0, NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
asmlinkage int m68k_vfork(struct pt_regs *regs)
|
||||||
|
{
|
||||||
|
return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), regs, 0,
|
||||||
|
NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
asmlinkage int m68k_clone(struct pt_regs *regs)
|
||||||
|
{
|
||||||
|
unsigned long clone_flags;
|
||||||
|
unsigned long newsp;
|
||||||
|
int __user *parent_tidptr, *child_tidptr;
|
||||||
|
|
||||||
|
/* syscall2 puts clone_flags in d1 and usp in d2 */
|
||||||
|
clone_flags = regs->d1;
|
||||||
|
newsp = regs->d2;
|
||||||
|
parent_tidptr = (int __user *)regs->d3;
|
||||||
|
child_tidptr = (int __user *)regs->d4;
|
||||||
|
if (!newsp)
|
||||||
|
newsp = rdusp();
|
||||||
|
return do_fork(clone_flags, newsp, regs, 0,
|
||||||
|
parent_tidptr, child_tidptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
int copy_thread(unsigned long clone_flags, unsigned long usp,
|
||||||
|
unsigned long unused,
|
||||||
|
struct task_struct * p, struct pt_regs * regs)
|
||||||
|
{
|
||||||
|
struct pt_regs * childregs;
|
||||||
|
struct switch_stack * childstack, *stack;
|
||||||
|
unsigned long *retp;
|
||||||
|
|
||||||
|
childregs = (struct pt_regs *) (task_stack_page(p) + THREAD_SIZE) - 1;
|
||||||
|
|
||||||
|
*childregs = *regs;
|
||||||
|
childregs->d0 = 0;
|
||||||
|
|
||||||
|
retp = ((unsigned long *) regs);
|
||||||
|
stack = ((struct switch_stack *) retp) - 1;
|
||||||
|
|
||||||
|
childstack = ((struct switch_stack *) childregs) - 1;
|
||||||
|
*childstack = *stack;
|
||||||
|
childstack->retpc = (unsigned long)ret_from_fork;
|
||||||
|
|
||||||
|
p->thread.usp = usp;
|
||||||
|
p->thread.ksp = (unsigned long)childstack;
|
||||||
|
|
||||||
|
if (clone_flags & CLONE_SETTLS)
|
||||||
|
task_thread_info(p)->tp_value = regs->d5;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Must save the current SFC/DFC value, NOT the value when
|
||||||
|
* the parent was last descheduled - RGH 10-08-96
|
||||||
|
*/
|
||||||
|
p->thread.fs = get_fs().seg;
|
||||||
|
|
||||||
|
if (!FPU_IS_EMU) {
|
||||||
|
/* Copy the current fpu state */
|
||||||
|
asm volatile ("fsave %0" : : "m" (p->thread.fpstate[0]) : "memory");
|
||||||
|
|
||||||
|
if (!CPU_IS_060 ? p->thread.fpstate[0] : p->thread.fpstate[2])
|
||||||
|
asm volatile ("fmovemx %/fp0-%/fp7,%0\n\t"
|
||||||
|
"fmoveml %/fpiar/%/fpcr/%/fpsr,%1"
|
||||||
|
: : "m" (p->thread.fp[0]), "m" (p->thread.fpcntl[0])
|
||||||
|
: "memory");
|
||||||
|
/* Restore the state in case the fpu was busy */
|
||||||
|
asm volatile ("frestore %0" : : "m" (p->thread.fpstate[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fill in the fpu structure for a core dump. */
|
||||||
|
|
||||||
|
int dump_fpu (struct pt_regs *regs, struct user_m68kfp_struct *fpu)
|
||||||
|
{
|
||||||
|
char fpustate[216];
|
||||||
|
|
||||||
|
if (FPU_IS_EMU) {
|
||||||
|
int i;
|
||||||
|
|
||||||
|
memcpy(fpu->fpcntl, current->thread.fpcntl, 12);
|
||||||
|
memcpy(fpu->fpregs, current->thread.fp, 96);
|
||||||
|
/* Convert internal fpu reg representation
|
||||||
|
* into long double format
|
||||||
|
*/
|
||||||
|
for (i = 0; i < 24; i += 3)
|
||||||
|
fpu->fpregs[i] = ((fpu->fpregs[i] & 0xffff0000) << 15) |
|
||||||
|
((fpu->fpregs[i] & 0x0000ffff) << 16);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* First dump the fpu context to avoid protocol violation. */
|
||||||
|
asm volatile ("fsave %0" :: "m" (fpustate[0]) : "memory");
|
||||||
|
if (!CPU_IS_060 ? !fpustate[0] : !fpustate[2])
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
asm volatile ("fmovem %/fpiar/%/fpcr/%/fpsr,%0"
|
||||||
|
:: "m" (fpu->fpcntl[0])
|
||||||
|
: "memory");
|
||||||
|
asm volatile ("fmovemx %/fp0-%/fp7,%0"
|
||||||
|
:: "m" (fpu->fpregs[0])
|
||||||
|
: "memory");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(dump_fpu);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* sys_execve() executes a new program.
|
||||||
|
*/
|
||||||
|
asmlinkage int sys_execve(const char __user *name,
|
||||||
|
const char __user *const __user *argv,
|
||||||
|
const char __user *const __user *envp)
|
||||||
|
{
|
||||||
|
int error;
|
||||||
|
char * filename;
|
||||||
|
struct pt_regs *regs = (struct pt_regs *) &name;
|
||||||
|
|
||||||
|
filename = getname(name);
|
||||||
|
error = PTR_ERR(filename);
|
||||||
|
if (IS_ERR(filename))
|
||||||
|
return error;
|
||||||
|
error = do_execve(filename, argv, envp, regs);
|
||||||
|
putname(filename);
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned long get_wchan(struct task_struct *p)
|
||||||
|
{
|
||||||
|
unsigned long fp, pc;
|
||||||
|
unsigned long stack_page;
|
||||||
|
int count = 0;
|
||||||
|
if (!p || p == current || p->state == TASK_RUNNING)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
stack_page = (unsigned long)task_stack_page(p);
|
||||||
|
fp = ((struct switch_stack *)p->thread.ksp)->a6;
|
||||||
|
do {
|
||||||
|
if (fp < stack_page+sizeof(struct thread_info) ||
|
||||||
|
fp >= 8184+stack_page)
|
||||||
|
return 0;
|
||||||
|
pc = ((unsigned long *)fp)[1];
|
||||||
|
if (!in_sched_functions(pc))
|
||||||
|
return pc;
|
||||||
|
fp = *(unsigned long *) fp;
|
||||||
|
} while (count++ < 16);
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -1,277 +1,5 @@
|
||||||
/*
|
#ifdef CONFIG_MMU
|
||||||
* linux/arch/m68k/kernel/ptrace.c
|
#include "ptrace_mm.c"
|
||||||
*
|
#else
|
||||||
* Copyright (C) 1994 by Hamish Macdonald
|
#include "ptrace_no.c"
|
||||||
* Taken from linux/kernel/ptrace.c and modified for M680x0.
|
#endif
|
||||||
* linux/kernel/ptrace.c is by Ross Biro 1/23/92, edited by Linus Torvalds
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/sched.h>
|
|
||||||
#include <linux/mm.h>
|
|
||||||
#include <linux/smp.h>
|
|
||||||
#include <linux/errno.h>
|
|
||||||
#include <linux/ptrace.h>
|
|
||||||
#include <linux/user.h>
|
|
||||||
#include <linux/signal.h>
|
|
||||||
|
|
||||||
#include <asm/uaccess.h>
|
|
||||||
#include <asm/page.h>
|
|
||||||
#include <asm/pgtable.h>
|
|
||||||
#include <asm/system.h>
|
|
||||||
#include <asm/processor.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* does not yet catch signals sent when the child dies.
|
|
||||||
* in exit.c or in signal.c.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* determines which bits in the SR the user has access to. */
|
|
||||||
/* 1 = access 0 = no access */
|
|
||||||
#define SR_MASK 0x001f
|
|
||||||
|
|
||||||
/* sets the trace bits. */
|
|
||||||
#define TRACE_BITS 0xC000
|
|
||||||
#define T1_BIT 0x8000
|
|
||||||
#define T0_BIT 0x4000
|
|
||||||
|
|
||||||
/* Find the stack offset for a register, relative to thread.esp0. */
|
|
||||||
#define PT_REG(reg) ((long)&((struct pt_regs *)0)->reg)
|
|
||||||
#define SW_REG(reg) ((long)&((struct switch_stack *)0)->reg \
|
|
||||||
- sizeof(struct switch_stack))
|
|
||||||
/* Mapping from PT_xxx to the stack offset at which the register is
|
|
||||||
saved. Notice that usp has no stack-slot and needs to be treated
|
|
||||||
specially (see get_reg/put_reg below). */
|
|
||||||
static const int regoff[] = {
|
|
||||||
[0] = PT_REG(d1),
|
|
||||||
[1] = PT_REG(d2),
|
|
||||||
[2] = PT_REG(d3),
|
|
||||||
[3] = PT_REG(d4),
|
|
||||||
[4] = PT_REG(d5),
|
|
||||||
[5] = SW_REG(d6),
|
|
||||||
[6] = SW_REG(d7),
|
|
||||||
[7] = PT_REG(a0),
|
|
||||||
[8] = PT_REG(a1),
|
|
||||||
[9] = PT_REG(a2),
|
|
||||||
[10] = SW_REG(a3),
|
|
||||||
[11] = SW_REG(a4),
|
|
||||||
[12] = SW_REG(a5),
|
|
||||||
[13] = SW_REG(a6),
|
|
||||||
[14] = PT_REG(d0),
|
|
||||||
[15] = -1,
|
|
||||||
[16] = PT_REG(orig_d0),
|
|
||||||
[17] = PT_REG(sr),
|
|
||||||
[18] = PT_REG(pc),
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get contents of register REGNO in task TASK.
|
|
||||||
*/
|
|
||||||
static inline long get_reg(struct task_struct *task, int regno)
|
|
||||||
{
|
|
||||||
unsigned long *addr;
|
|
||||||
|
|
||||||
if (regno == PT_USP)
|
|
||||||
addr = &task->thread.usp;
|
|
||||||
else if (regno < ARRAY_SIZE(regoff))
|
|
||||||
addr = (unsigned long *)(task->thread.esp0 + regoff[regno]);
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
/* Need to take stkadj into account. */
|
|
||||||
if (regno == PT_SR || regno == PT_PC) {
|
|
||||||
long stkadj = *(long *)(task->thread.esp0 + PT_REG(stkadj));
|
|
||||||
addr = (unsigned long *) ((unsigned long)addr + stkadj);
|
|
||||||
/* The sr is actually a 16 bit register. */
|
|
||||||
if (regno == PT_SR)
|
|
||||||
return *(unsigned short *)addr;
|
|
||||||
}
|
|
||||||
return *addr;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Write contents of register REGNO in task TASK.
|
|
||||||
*/
|
|
||||||
static inline int put_reg(struct task_struct *task, int regno,
|
|
||||||
unsigned long data)
|
|
||||||
{
|
|
||||||
unsigned long *addr;
|
|
||||||
|
|
||||||
if (regno == PT_USP)
|
|
||||||
addr = &task->thread.usp;
|
|
||||||
else if (regno < ARRAY_SIZE(regoff))
|
|
||||||
addr = (unsigned long *)(task->thread.esp0 + regoff[regno]);
|
|
||||||
else
|
|
||||||
return -1;
|
|
||||||
/* Need to take stkadj into account. */
|
|
||||||
if (regno == PT_SR || regno == PT_PC) {
|
|
||||||
long stkadj = *(long *)(task->thread.esp0 + PT_REG(stkadj));
|
|
||||||
addr = (unsigned long *) ((unsigned long)addr + stkadj);
|
|
||||||
/* The sr is actually a 16 bit register. */
|
|
||||||
if (regno == PT_SR) {
|
|
||||||
*(unsigned short *)addr = data;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*addr = data;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Make sure the single step bit is not set.
|
|
||||||
*/
|
|
||||||
static inline void singlestep_disable(struct task_struct *child)
|
|
||||||
{
|
|
||||||
unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS;
|
|
||||||
put_reg(child, PT_SR, tmp);
|
|
||||||
clear_tsk_thread_flag(child, TIF_DELAYED_TRACE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Called by kernel/ptrace.c when detaching..
|
|
||||||
*/
|
|
||||||
void ptrace_disable(struct task_struct *child)
|
|
||||||
{
|
|
||||||
singlestep_disable(child);
|
|
||||||
}
|
|
||||||
|
|
||||||
void user_enable_single_step(struct task_struct *child)
|
|
||||||
{
|
|
||||||
unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS;
|
|
||||||
put_reg(child, PT_SR, tmp | T1_BIT);
|
|
||||||
set_tsk_thread_flag(child, TIF_DELAYED_TRACE);
|
|
||||||
}
|
|
||||||
|
|
||||||
void user_enable_block_step(struct task_struct *child)
|
|
||||||
{
|
|
||||||
unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS;
|
|
||||||
put_reg(child, PT_SR, tmp | T0_BIT);
|
|
||||||
}
|
|
||||||
|
|
||||||
void user_disable_single_step(struct task_struct *child)
|
|
||||||
{
|
|
||||||
singlestep_disable(child);
|
|
||||||
}
|
|
||||||
|
|
||||||
long arch_ptrace(struct task_struct *child, long request,
|
|
||||||
unsigned long addr, unsigned long data)
|
|
||||||
{
|
|
||||||
unsigned long tmp;
|
|
||||||
int i, ret = 0;
|
|
||||||
int regno = addr >> 2; /* temporary hack. */
|
|
||||||
unsigned long __user *datap = (unsigned long __user *) data;
|
|
||||||
|
|
||||||
switch (request) {
|
|
||||||
/* read the word at location addr in the USER area. */
|
|
||||||
case PTRACE_PEEKUSR:
|
|
||||||
if (addr & 3)
|
|
||||||
goto out_eio;
|
|
||||||
|
|
||||||
if (regno >= 0 && regno < 19) {
|
|
||||||
tmp = get_reg(child, regno);
|
|
||||||
} else if (regno >= 21 && regno < 49) {
|
|
||||||
tmp = child->thread.fp[regno - 21];
|
|
||||||
/* Convert internal fpu reg representation
|
|
||||||
* into long double format
|
|
||||||
*/
|
|
||||||
if (FPU_IS_EMU && (regno < 45) && !(regno % 3))
|
|
||||||
tmp = ((tmp & 0xffff0000) << 15) |
|
|
||||||
((tmp & 0x0000ffff) << 16);
|
|
||||||
} else
|
|
||||||
goto out_eio;
|
|
||||||
ret = put_user(tmp, datap);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PTRACE_POKEUSR:
|
|
||||||
/* write the word at location addr in the USER area */
|
|
||||||
if (addr & 3)
|
|
||||||
goto out_eio;
|
|
||||||
|
|
||||||
if (regno == PT_SR) {
|
|
||||||
data &= SR_MASK;
|
|
||||||
data |= get_reg(child, PT_SR) & ~SR_MASK;
|
|
||||||
}
|
|
||||||
if (regno >= 0 && regno < 19) {
|
|
||||||
if (put_reg(child, regno, data))
|
|
||||||
goto out_eio;
|
|
||||||
} else if (regno >= 21 && regno < 48) {
|
|
||||||
/* Convert long double format
|
|
||||||
* into internal fpu reg representation
|
|
||||||
*/
|
|
||||||
if (FPU_IS_EMU && (regno < 45) && !(regno % 3)) {
|
|
||||||
data <<= 15;
|
|
||||||
data = (data & 0xffff0000) |
|
|
||||||
((data & 0x0000ffff) >> 1);
|
|
||||||
}
|
|
||||||
child->thread.fp[regno - 21] = data;
|
|
||||||
} else
|
|
||||||
goto out_eio;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PTRACE_GETREGS: /* Get all gp regs from the child. */
|
|
||||||
for (i = 0; i < 19; i++) {
|
|
||||||
tmp = get_reg(child, i);
|
|
||||||
ret = put_user(tmp, datap);
|
|
||||||
if (ret)
|
|
||||||
break;
|
|
||||||
datap++;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PTRACE_SETREGS: /* Set all gp regs in the child. */
|
|
||||||
for (i = 0; i < 19; i++) {
|
|
||||||
ret = get_user(tmp, datap);
|
|
||||||
if (ret)
|
|
||||||
break;
|
|
||||||
if (i == PT_SR) {
|
|
||||||
tmp &= SR_MASK;
|
|
||||||
tmp |= get_reg(child, PT_SR) & ~SR_MASK;
|
|
||||||
}
|
|
||||||
put_reg(child, i, tmp);
|
|
||||||
datap++;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PTRACE_GETFPREGS: /* Get the child FPU state. */
|
|
||||||
if (copy_to_user(datap, &child->thread.fp,
|
|
||||||
sizeof(struct user_m68kfp_struct)))
|
|
||||||
ret = -EFAULT;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PTRACE_SETFPREGS: /* Set the child FPU state. */
|
|
||||||
if (copy_from_user(&child->thread.fp, datap,
|
|
||||||
sizeof(struct user_m68kfp_struct)))
|
|
||||||
ret = -EFAULT;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PTRACE_GET_THREAD_AREA:
|
|
||||||
ret = put_user(task_thread_info(child)->tp_value, datap);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
ret = ptrace_request(child, request, addr, data);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
out_eio:
|
|
||||||
return -EIO;
|
|
||||||
}
|
|
||||||
|
|
||||||
asmlinkage void syscall_trace(void)
|
|
||||||
{
|
|
||||||
ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
|
|
||||||
? 0x80 : 0));
|
|
||||||
/*
|
|
||||||
* this isn't the same as continuing with a signal, but it will do
|
|
||||||
* for normal use. strace only continues with a signal if the
|
|
||||||
* stopping signal is not SIGTRAP. -brl
|
|
||||||
*/
|
|
||||||
if (current->exit_code) {
|
|
||||||
send_sig(current->exit_code, current, 1);
|
|
||||||
current->exit_code = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,277 @@
|
||||||
|
/*
|
||||||
|
* linux/arch/m68k/kernel/ptrace.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 1994 by Hamish Macdonald
|
||||||
|
* Taken from linux/kernel/ptrace.c and modified for M680x0.
|
||||||
|
* linux/kernel/ptrace.c is by Ross Biro 1/23/92, edited by Linus Torvalds
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/sched.h>
|
||||||
|
#include <linux/mm.h>
|
||||||
|
#include <linux/smp.h>
|
||||||
|
#include <linux/errno.h>
|
||||||
|
#include <linux/ptrace.h>
|
||||||
|
#include <linux/user.h>
|
||||||
|
#include <linux/signal.h>
|
||||||
|
|
||||||
|
#include <asm/uaccess.h>
|
||||||
|
#include <asm/page.h>
|
||||||
|
#include <asm/pgtable.h>
|
||||||
|
#include <asm/system.h>
|
||||||
|
#include <asm/processor.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* does not yet catch signals sent when the child dies.
|
||||||
|
* in exit.c or in signal.c.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* determines which bits in the SR the user has access to. */
|
||||||
|
/* 1 = access 0 = no access */
|
||||||
|
#define SR_MASK 0x001f
|
||||||
|
|
||||||
|
/* sets the trace bits. */
|
||||||
|
#define TRACE_BITS 0xC000
|
||||||
|
#define T1_BIT 0x8000
|
||||||
|
#define T0_BIT 0x4000
|
||||||
|
|
||||||
|
/* Find the stack offset for a register, relative to thread.esp0. */
|
||||||
|
#define PT_REG(reg) ((long)&((struct pt_regs *)0)->reg)
|
||||||
|
#define SW_REG(reg) ((long)&((struct switch_stack *)0)->reg \
|
||||||
|
- sizeof(struct switch_stack))
|
||||||
|
/* Mapping from PT_xxx to the stack offset at which the register is
|
||||||
|
saved. Notice that usp has no stack-slot and needs to be treated
|
||||||
|
specially (see get_reg/put_reg below). */
|
||||||
|
static const int regoff[] = {
|
||||||
|
[0] = PT_REG(d1),
|
||||||
|
[1] = PT_REG(d2),
|
||||||
|
[2] = PT_REG(d3),
|
||||||
|
[3] = PT_REG(d4),
|
||||||
|
[4] = PT_REG(d5),
|
||||||
|
[5] = SW_REG(d6),
|
||||||
|
[6] = SW_REG(d7),
|
||||||
|
[7] = PT_REG(a0),
|
||||||
|
[8] = PT_REG(a1),
|
||||||
|
[9] = PT_REG(a2),
|
||||||
|
[10] = SW_REG(a3),
|
||||||
|
[11] = SW_REG(a4),
|
||||||
|
[12] = SW_REG(a5),
|
||||||
|
[13] = SW_REG(a6),
|
||||||
|
[14] = PT_REG(d0),
|
||||||
|
[15] = -1,
|
||||||
|
[16] = PT_REG(orig_d0),
|
||||||
|
[17] = PT_REG(sr),
|
||||||
|
[18] = PT_REG(pc),
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get contents of register REGNO in task TASK.
|
||||||
|
*/
|
||||||
|
static inline long get_reg(struct task_struct *task, int regno)
|
||||||
|
{
|
||||||
|
unsigned long *addr;
|
||||||
|
|
||||||
|
if (regno == PT_USP)
|
||||||
|
addr = &task->thread.usp;
|
||||||
|
else if (regno < ARRAY_SIZE(regoff))
|
||||||
|
addr = (unsigned long *)(task->thread.esp0 + regoff[regno]);
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
/* Need to take stkadj into account. */
|
||||||
|
if (regno == PT_SR || regno == PT_PC) {
|
||||||
|
long stkadj = *(long *)(task->thread.esp0 + PT_REG(stkadj));
|
||||||
|
addr = (unsigned long *) ((unsigned long)addr + stkadj);
|
||||||
|
/* The sr is actually a 16 bit register. */
|
||||||
|
if (regno == PT_SR)
|
||||||
|
return *(unsigned short *)addr;
|
||||||
|
}
|
||||||
|
return *addr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Write contents of register REGNO in task TASK.
|
||||||
|
*/
|
||||||
|
static inline int put_reg(struct task_struct *task, int regno,
|
||||||
|
unsigned long data)
|
||||||
|
{
|
||||||
|
unsigned long *addr;
|
||||||
|
|
||||||
|
if (regno == PT_USP)
|
||||||
|
addr = &task->thread.usp;
|
||||||
|
else if (regno < ARRAY_SIZE(regoff))
|
||||||
|
addr = (unsigned long *)(task->thread.esp0 + regoff[regno]);
|
||||||
|
else
|
||||||
|
return -1;
|
||||||
|
/* Need to take stkadj into account. */
|
||||||
|
if (regno == PT_SR || regno == PT_PC) {
|
||||||
|
long stkadj = *(long *)(task->thread.esp0 + PT_REG(stkadj));
|
||||||
|
addr = (unsigned long *) ((unsigned long)addr + stkadj);
|
||||||
|
/* The sr is actually a 16 bit register. */
|
||||||
|
if (regno == PT_SR) {
|
||||||
|
*(unsigned short *)addr = data;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*addr = data;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Make sure the single step bit is not set.
|
||||||
|
*/
|
||||||
|
static inline void singlestep_disable(struct task_struct *child)
|
||||||
|
{
|
||||||
|
unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS;
|
||||||
|
put_reg(child, PT_SR, tmp);
|
||||||
|
clear_tsk_thread_flag(child, TIF_DELAYED_TRACE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Called by kernel/ptrace.c when detaching..
|
||||||
|
*/
|
||||||
|
void ptrace_disable(struct task_struct *child)
|
||||||
|
{
|
||||||
|
singlestep_disable(child);
|
||||||
|
}
|
||||||
|
|
||||||
|
void user_enable_single_step(struct task_struct *child)
|
||||||
|
{
|
||||||
|
unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS;
|
||||||
|
put_reg(child, PT_SR, tmp | T1_BIT);
|
||||||
|
set_tsk_thread_flag(child, TIF_DELAYED_TRACE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void user_enable_block_step(struct task_struct *child)
|
||||||
|
{
|
||||||
|
unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS;
|
||||||
|
put_reg(child, PT_SR, tmp | T0_BIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
void user_disable_single_step(struct task_struct *child)
|
||||||
|
{
|
||||||
|
singlestep_disable(child);
|
||||||
|
}
|
||||||
|
|
||||||
|
long arch_ptrace(struct task_struct *child, long request,
|
||||||
|
unsigned long addr, unsigned long data)
|
||||||
|
{
|
||||||
|
unsigned long tmp;
|
||||||
|
int i, ret = 0;
|
||||||
|
int regno = addr >> 2; /* temporary hack. */
|
||||||
|
unsigned long __user *datap = (unsigned long __user *) data;
|
||||||
|
|
||||||
|
switch (request) {
|
||||||
|
/* read the word at location addr in the USER area. */
|
||||||
|
case PTRACE_PEEKUSR:
|
||||||
|
if (addr & 3)
|
||||||
|
goto out_eio;
|
||||||
|
|
||||||
|
if (regno >= 0 && regno < 19) {
|
||||||
|
tmp = get_reg(child, regno);
|
||||||
|
} else if (regno >= 21 && regno < 49) {
|
||||||
|
tmp = child->thread.fp[regno - 21];
|
||||||
|
/* Convert internal fpu reg representation
|
||||||
|
* into long double format
|
||||||
|
*/
|
||||||
|
if (FPU_IS_EMU && (regno < 45) && !(regno % 3))
|
||||||
|
tmp = ((tmp & 0xffff0000) << 15) |
|
||||||
|
((tmp & 0x0000ffff) << 16);
|
||||||
|
} else
|
||||||
|
goto out_eio;
|
||||||
|
ret = put_user(tmp, datap);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PTRACE_POKEUSR:
|
||||||
|
/* write the word at location addr in the USER area */
|
||||||
|
if (addr & 3)
|
||||||
|
goto out_eio;
|
||||||
|
|
||||||
|
if (regno == PT_SR) {
|
||||||
|
data &= SR_MASK;
|
||||||
|
data |= get_reg(child, PT_SR) & ~SR_MASK;
|
||||||
|
}
|
||||||
|
if (regno >= 0 && regno < 19) {
|
||||||
|
if (put_reg(child, regno, data))
|
||||||
|
goto out_eio;
|
||||||
|
} else if (regno >= 21 && regno < 48) {
|
||||||
|
/* Convert long double format
|
||||||
|
* into internal fpu reg representation
|
||||||
|
*/
|
||||||
|
if (FPU_IS_EMU && (regno < 45) && !(regno % 3)) {
|
||||||
|
data <<= 15;
|
||||||
|
data = (data & 0xffff0000) |
|
||||||
|
((data & 0x0000ffff) >> 1);
|
||||||
|
}
|
||||||
|
child->thread.fp[regno - 21] = data;
|
||||||
|
} else
|
||||||
|
goto out_eio;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PTRACE_GETREGS: /* Get all gp regs from the child. */
|
||||||
|
for (i = 0; i < 19; i++) {
|
||||||
|
tmp = get_reg(child, i);
|
||||||
|
ret = put_user(tmp, datap);
|
||||||
|
if (ret)
|
||||||
|
break;
|
||||||
|
datap++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PTRACE_SETREGS: /* Set all gp regs in the child. */
|
||||||
|
for (i = 0; i < 19; i++) {
|
||||||
|
ret = get_user(tmp, datap);
|
||||||
|
if (ret)
|
||||||
|
break;
|
||||||
|
if (i == PT_SR) {
|
||||||
|
tmp &= SR_MASK;
|
||||||
|
tmp |= get_reg(child, PT_SR) & ~SR_MASK;
|
||||||
|
}
|
||||||
|
put_reg(child, i, tmp);
|
||||||
|
datap++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PTRACE_GETFPREGS: /* Get the child FPU state. */
|
||||||
|
if (copy_to_user(datap, &child->thread.fp,
|
||||||
|
sizeof(struct user_m68kfp_struct)))
|
||||||
|
ret = -EFAULT;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PTRACE_SETFPREGS: /* Set the child FPU state. */
|
||||||
|
if (copy_from_user(&child->thread.fp, datap,
|
||||||
|
sizeof(struct user_m68kfp_struct)))
|
||||||
|
ret = -EFAULT;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PTRACE_GET_THREAD_AREA:
|
||||||
|
ret = put_user(task_thread_info(child)->tp_value, datap);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
ret = ptrace_request(child, request, addr, data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
out_eio:
|
||||||
|
return -EIO;
|
||||||
|
}
|
||||||
|
|
||||||
|
asmlinkage void syscall_trace(void)
|
||||||
|
{
|
||||||
|
ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
|
||||||
|
? 0x80 : 0));
|
||||||
|
/*
|
||||||
|
* this isn't the same as continuing with a signal, but it will do
|
||||||
|
* for normal use. strace only continues with a signal if the
|
||||||
|
* stopping signal is not SIGTRAP. -brl
|
||||||
|
*/
|
||||||
|
if (current->exit_code) {
|
||||||
|
send_sig(current->exit_code, current, 1);
|
||||||
|
current->exit_code = 0;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,533 +1,5 @@
|
||||||
/*
|
#ifdef CONFIG_MMU
|
||||||
* linux/arch/m68k/kernel/setup.c
|
#include "setup_mm.c"
|
||||||
*
|
|
||||||
* Copyright (C) 1995 Hamish Macdonald
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This file handles the architecture-dependent parts of system setup
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/mm.h>
|
|
||||||
#include <linux/sched.h>
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/interrupt.h>
|
|
||||||
#include <linux/fs.h>
|
|
||||||
#include <linux/console.h>
|
|
||||||
#include <linux/genhd.h>
|
|
||||||
#include <linux/errno.h>
|
|
||||||
#include <linux/string.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/bootmem.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/seq_file.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/initrd.h>
|
|
||||||
|
|
||||||
#include <asm/bootinfo.h>
|
|
||||||
#include <asm/sections.h>
|
|
||||||
#include <asm/setup.h>
|
|
||||||
#include <asm/fpu.h>
|
|
||||||
#include <asm/irq.h>
|
|
||||||
#include <asm/io.h>
|
|
||||||
#include <asm/machdep.h>
|
|
||||||
#ifdef CONFIG_AMIGA
|
|
||||||
#include <asm/amigahw.h>
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_ATARI
|
|
||||||
#include <asm/atarihw.h>
|
|
||||||
#include <asm/atari_stram.h>
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_SUN3X
|
|
||||||
#include <asm/dvma.h>
|
|
||||||
#endif
|
|
||||||
#include <asm/natfeat.h>
|
|
||||||
|
|
||||||
#if !FPSTATESIZE || !NR_IRQS
|
|
||||||
#warning No CPU/platform type selected, your kernel will not work!
|
|
||||||
#warning Are you building an allnoconfig kernel?
|
|
||||||
#endif
|
|
||||||
|
|
||||||
unsigned long m68k_machtype;
|
|
||||||
EXPORT_SYMBOL(m68k_machtype);
|
|
||||||
unsigned long m68k_cputype;
|
|
||||||
EXPORT_SYMBOL(m68k_cputype);
|
|
||||||
unsigned long m68k_fputype;
|
|
||||||
unsigned long m68k_mmutype;
|
|
||||||
EXPORT_SYMBOL(m68k_mmutype);
|
|
||||||
#ifdef CONFIG_VME
|
|
||||||
unsigned long vme_brdtype;
|
|
||||||
EXPORT_SYMBOL(vme_brdtype);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int m68k_is040or060;
|
|
||||||
EXPORT_SYMBOL(m68k_is040or060);
|
|
||||||
|
|
||||||
extern unsigned long availmem;
|
|
||||||
|
|
||||||
int m68k_num_memory;
|
|
||||||
EXPORT_SYMBOL(m68k_num_memory);
|
|
||||||
int m68k_realnum_memory;
|
|
||||||
EXPORT_SYMBOL(m68k_realnum_memory);
|
|
||||||
unsigned long m68k_memoffset;
|
|
||||||
struct mem_info m68k_memory[NUM_MEMINFO];
|
|
||||||
EXPORT_SYMBOL(m68k_memory);
|
|
||||||
|
|
||||||
struct mem_info m68k_ramdisk;
|
|
||||||
|
|
||||||
static char m68k_command_line[CL_SIZE];
|
|
||||||
|
|
||||||
void (*mach_sched_init) (irq_handler_t handler) __initdata = NULL;
|
|
||||||
/* machine dependent irq functions */
|
|
||||||
void (*mach_init_IRQ) (void) __initdata = NULL;
|
|
||||||
void (*mach_get_model) (char *model);
|
|
||||||
void (*mach_get_hardware_list) (struct seq_file *m);
|
|
||||||
/* machine dependent timer functions */
|
|
||||||
unsigned long (*mach_gettimeoffset) (void);
|
|
||||||
int (*mach_hwclk) (int, struct rtc_time*);
|
|
||||||
EXPORT_SYMBOL(mach_hwclk);
|
|
||||||
int (*mach_set_clock_mmss) (unsigned long);
|
|
||||||
unsigned int (*mach_get_ss)(void);
|
|
||||||
int (*mach_get_rtc_pll)(struct rtc_pll_info *);
|
|
||||||
int (*mach_set_rtc_pll)(struct rtc_pll_info *);
|
|
||||||
EXPORT_SYMBOL(mach_get_ss);
|
|
||||||
EXPORT_SYMBOL(mach_get_rtc_pll);
|
|
||||||
EXPORT_SYMBOL(mach_set_rtc_pll);
|
|
||||||
void (*mach_reset)( void );
|
|
||||||
void (*mach_halt)( void );
|
|
||||||
void (*mach_power_off)( void );
|
|
||||||
long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */
|
|
||||||
#ifdef CONFIG_HEARTBEAT
|
|
||||||
void (*mach_heartbeat) (int);
|
|
||||||
EXPORT_SYMBOL(mach_heartbeat);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_M68K_L2_CACHE
|
|
||||||
void (*mach_l2_flush) (int);
|
|
||||||
#endif
|
|
||||||
#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
|
|
||||||
void (*mach_beep)(unsigned int, unsigned int);
|
|
||||||
EXPORT_SYMBOL(mach_beep);
|
|
||||||
#endif
|
|
||||||
#if defined(CONFIG_ISA) && defined(MULTI_ISA)
|
|
||||||
int isa_type;
|
|
||||||
int isa_sex;
|
|
||||||
EXPORT_SYMBOL(isa_type);
|
|
||||||
EXPORT_SYMBOL(isa_sex);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int amiga_parse_bootinfo(const struct bi_record *);
|
|
||||||
extern int atari_parse_bootinfo(const struct bi_record *);
|
|
||||||
extern int mac_parse_bootinfo(const struct bi_record *);
|
|
||||||
extern int q40_parse_bootinfo(const struct bi_record *);
|
|
||||||
extern int bvme6000_parse_bootinfo(const struct bi_record *);
|
|
||||||
extern int mvme16x_parse_bootinfo(const struct bi_record *);
|
|
||||||
extern int mvme147_parse_bootinfo(const struct bi_record *);
|
|
||||||
extern int hp300_parse_bootinfo(const struct bi_record *);
|
|
||||||
extern int apollo_parse_bootinfo(const struct bi_record *);
|
|
||||||
|
|
||||||
extern void config_amiga(void);
|
|
||||||
extern void config_atari(void);
|
|
||||||
extern void config_mac(void);
|
|
||||||
extern void config_sun3(void);
|
|
||||||
extern void config_apollo(void);
|
|
||||||
extern void config_mvme147(void);
|
|
||||||
extern void config_mvme16x(void);
|
|
||||||
extern void config_bvme6000(void);
|
|
||||||
extern void config_hp300(void);
|
|
||||||
extern void config_q40(void);
|
|
||||||
extern void config_sun3x(void);
|
|
||||||
|
|
||||||
#define MASK_256K 0xfffc0000
|
|
||||||
|
|
||||||
extern void paging_init(void);
|
|
||||||
|
|
||||||
static void __init m68k_parse_bootinfo(const struct bi_record *record)
|
|
||||||
{
|
|
||||||
while (record->tag != BI_LAST) {
|
|
||||||
int unknown = 0;
|
|
||||||
const unsigned long *data = record->data;
|
|
||||||
|
|
||||||
switch (record->tag) {
|
|
||||||
case BI_MACHTYPE:
|
|
||||||
case BI_CPUTYPE:
|
|
||||||
case BI_FPUTYPE:
|
|
||||||
case BI_MMUTYPE:
|
|
||||||
/* Already set up by head.S */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case BI_MEMCHUNK:
|
|
||||||
if (m68k_num_memory < NUM_MEMINFO) {
|
|
||||||
m68k_memory[m68k_num_memory].addr = data[0];
|
|
||||||
m68k_memory[m68k_num_memory].size = data[1];
|
|
||||||
m68k_num_memory++;
|
|
||||||
} else
|
|
||||||
printk("m68k_parse_bootinfo: too many memory chunks\n");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case BI_RAMDISK:
|
|
||||||
m68k_ramdisk.addr = data[0];
|
|
||||||
m68k_ramdisk.size = data[1];
|
|
||||||
break;
|
|
||||||
|
|
||||||
case BI_COMMAND_LINE:
|
|
||||||
strlcpy(m68k_command_line, (const char *)data,
|
|
||||||
sizeof(m68k_command_line));
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
if (MACH_IS_AMIGA)
|
|
||||||
unknown = amiga_parse_bootinfo(record);
|
|
||||||
else if (MACH_IS_ATARI)
|
|
||||||
unknown = atari_parse_bootinfo(record);
|
|
||||||
else if (MACH_IS_MAC)
|
|
||||||
unknown = mac_parse_bootinfo(record);
|
|
||||||
else if (MACH_IS_Q40)
|
|
||||||
unknown = q40_parse_bootinfo(record);
|
|
||||||
else if (MACH_IS_BVME6000)
|
|
||||||
unknown = bvme6000_parse_bootinfo(record);
|
|
||||||
else if (MACH_IS_MVME16x)
|
|
||||||
unknown = mvme16x_parse_bootinfo(record);
|
|
||||||
else if (MACH_IS_MVME147)
|
|
||||||
unknown = mvme147_parse_bootinfo(record);
|
|
||||||
else if (MACH_IS_HP300)
|
|
||||||
unknown = hp300_parse_bootinfo(record);
|
|
||||||
else if (MACH_IS_APOLLO)
|
|
||||||
unknown = apollo_parse_bootinfo(record);
|
|
||||||
else
|
|
||||||
unknown = 1;
|
|
||||||
}
|
|
||||||
if (unknown)
|
|
||||||
printk("m68k_parse_bootinfo: unknown tag 0x%04x ignored\n",
|
|
||||||
record->tag);
|
|
||||||
record = (struct bi_record *)((unsigned long)record +
|
|
||||||
record->size);
|
|
||||||
}
|
|
||||||
|
|
||||||
m68k_realnum_memory = m68k_num_memory;
|
|
||||||
#ifdef CONFIG_SINGLE_MEMORY_CHUNK
|
|
||||||
if (m68k_num_memory > 1) {
|
|
||||||
printk("Ignoring last %i chunks of physical memory\n",
|
|
||||||
(m68k_num_memory - 1));
|
|
||||||
m68k_num_memory = 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void __init setup_arch(char **cmdline_p)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
/* The bootinfo is located right after the kernel bss */
|
|
||||||
m68k_parse_bootinfo((const struct bi_record *)_end);
|
|
||||||
|
|
||||||
if (CPU_IS_040)
|
|
||||||
m68k_is040or060 = 4;
|
|
||||||
else if (CPU_IS_060)
|
|
||||||
m68k_is040or060 = 6;
|
|
||||||
|
|
||||||
/* FIXME: m68k_fputype is passed in by Penguin booter, which can
|
|
||||||
* be confused by software FPU emulation. BEWARE.
|
|
||||||
* We should really do our own FPU check at startup.
|
|
||||||
* [what do we do with buggy 68LC040s? if we have problems
|
|
||||||
* with them, we should add a test to check_bugs() below] */
|
|
||||||
#ifndef CONFIG_M68KFPU_EMU_ONLY
|
|
||||||
/* clear the fpu if we have one */
|
|
||||||
if (m68k_fputype & (FPU_68881|FPU_68882|FPU_68040|FPU_68060)) {
|
|
||||||
volatile int zero = 0;
|
|
||||||
asm volatile ("frestore %0" : : "m" (zero));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (CPU_IS_060) {
|
|
||||||
u32 pcr;
|
|
||||||
|
|
||||||
asm (".chip 68060; movec %%pcr,%0; .chip 68k"
|
|
||||||
: "=d" (pcr));
|
|
||||||
if (((pcr >> 8) & 0xff) <= 5) {
|
|
||||||
printk("Enabling workaround for errata I14\n");
|
|
||||||
asm (".chip 68060; movec %0,%%pcr; .chip 68k"
|
|
||||||
: : "d" (pcr | 0x20));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
*cmdline_p = m68k_command_line;
|
|
||||||
memcpy(boot_command_line, *cmdline_p, CL_SIZE);
|
|
||||||
|
|
||||||
parse_early_param();
|
|
||||||
|
|
||||||
#ifdef CONFIG_DUMMY_CONSOLE
|
|
||||||
conswitchp = &dummy_con;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (m68k_machtype) {
|
|
||||||
#ifdef CONFIG_AMIGA
|
|
||||||
case MACH_AMIGA:
|
|
||||||
config_amiga();
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_ATARI
|
|
||||||
case MACH_ATARI:
|
|
||||||
config_atari();
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_MAC
|
|
||||||
case MACH_MAC:
|
|
||||||
config_mac();
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_SUN3
|
|
||||||
case MACH_SUN3:
|
|
||||||
config_sun3();
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_APOLLO
|
|
||||||
case MACH_APOLLO:
|
|
||||||
config_apollo();
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_MVME147
|
|
||||||
case MACH_MVME147:
|
|
||||||
config_mvme147();
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_MVME16x
|
|
||||||
case MACH_MVME16x:
|
|
||||||
config_mvme16x();
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_BVME6000
|
|
||||||
case MACH_BVME6000:
|
|
||||||
config_bvme6000();
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HP300
|
|
||||||
case MACH_HP300:
|
|
||||||
config_hp300();
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_Q40
|
|
||||||
case MACH_Q40:
|
|
||||||
config_q40();
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_SUN3X
|
|
||||||
case MACH_SUN3X:
|
|
||||||
config_sun3x();
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
default:
|
|
||||||
panic("No configuration setup");
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_NATFEAT
|
|
||||||
nf_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
paging_init();
|
|
||||||
|
|
||||||
#ifndef CONFIG_SUN3
|
|
||||||
for (i = 1; i < m68k_num_memory; i++)
|
|
||||||
free_bootmem_node(NODE_DATA(i), m68k_memory[i].addr,
|
|
||||||
m68k_memory[i].size);
|
|
||||||
#ifdef CONFIG_BLK_DEV_INITRD
|
|
||||||
if (m68k_ramdisk.size) {
|
|
||||||
reserve_bootmem_node(__virt_to_node(phys_to_virt(m68k_ramdisk.addr)),
|
|
||||||
m68k_ramdisk.addr, m68k_ramdisk.size,
|
|
||||||
BOOTMEM_DEFAULT);
|
|
||||||
initrd_start = (unsigned long)phys_to_virt(m68k_ramdisk.addr);
|
|
||||||
initrd_end = initrd_start + m68k_ramdisk.size;
|
|
||||||
printk("initrd: %08lx - %08lx\n", initrd_start, initrd_end);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_ATARI
|
|
||||||
if (MACH_IS_ATARI)
|
|
||||||
atari_stram_reserve_pages((void *)availmem);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_SUN3X
|
|
||||||
if (MACH_IS_SUN3X) {
|
|
||||||
dvma_init();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* !CONFIG_SUN3 */
|
|
||||||
|
|
||||||
/* set ISA defs early as possible */
|
|
||||||
#if defined(CONFIG_ISA) && defined(MULTI_ISA)
|
|
||||||
if (MACH_IS_Q40) {
|
|
||||||
isa_type = ISA_TYPE_Q40;
|
|
||||||
isa_sex = 0;
|
|
||||||
}
|
|
||||||
#ifdef CONFIG_AMIGA_PCMCIA
|
|
||||||
if (MACH_IS_AMIGA && AMIGAHW_PRESENT(PCMCIA)) {
|
|
||||||
isa_type = ISA_TYPE_AG;
|
|
||||||
isa_sex = 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static int show_cpuinfo(struct seq_file *m, void *v)
|
|
||||||
{
|
|
||||||
const char *cpu, *mmu, *fpu;
|
|
||||||
unsigned long clockfreq, clockfactor;
|
|
||||||
|
|
||||||
#define LOOP_CYCLES_68020 (8)
|
|
||||||
#define LOOP_CYCLES_68030 (8)
|
|
||||||
#define LOOP_CYCLES_68040 (3)
|
|
||||||
#define LOOP_CYCLES_68060 (1)
|
|
||||||
|
|
||||||
if (CPU_IS_020) {
|
|
||||||
cpu = "68020";
|
|
||||||
clockfactor = LOOP_CYCLES_68020;
|
|
||||||
} else if (CPU_IS_030) {
|
|
||||||
cpu = "68030";
|
|
||||||
clockfactor = LOOP_CYCLES_68030;
|
|
||||||
} else if (CPU_IS_040) {
|
|
||||||
cpu = "68040";
|
|
||||||
clockfactor = LOOP_CYCLES_68040;
|
|
||||||
} else if (CPU_IS_060) {
|
|
||||||
cpu = "68060";
|
|
||||||
clockfactor = LOOP_CYCLES_68060;
|
|
||||||
} else {
|
|
||||||
cpu = "680x0";
|
|
||||||
clockfactor = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_M68KFPU_EMU_ONLY
|
|
||||||
fpu = "none(soft float)";
|
|
||||||
#else
|
#else
|
||||||
if (m68k_fputype & FPU_68881)
|
#include "setup_no.c"
|
||||||
fpu = "68881";
|
|
||||||
else if (m68k_fputype & FPU_68882)
|
|
||||||
fpu = "68882";
|
|
||||||
else if (m68k_fputype & FPU_68040)
|
|
||||||
fpu = "68040";
|
|
||||||
else if (m68k_fputype & FPU_68060)
|
|
||||||
fpu = "68060";
|
|
||||||
else if (m68k_fputype & FPU_SUNFPA)
|
|
||||||
fpu = "Sun FPA";
|
|
||||||
else
|
|
||||||
fpu = "none";
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (m68k_mmutype & MMU_68851)
|
|
||||||
mmu = "68851";
|
|
||||||
else if (m68k_mmutype & MMU_68030)
|
|
||||||
mmu = "68030";
|
|
||||||
else if (m68k_mmutype & MMU_68040)
|
|
||||||
mmu = "68040";
|
|
||||||
else if (m68k_mmutype & MMU_68060)
|
|
||||||
mmu = "68060";
|
|
||||||
else if (m68k_mmutype & MMU_SUN3)
|
|
||||||
mmu = "Sun-3";
|
|
||||||
else if (m68k_mmutype & MMU_APOLLO)
|
|
||||||
mmu = "Apollo";
|
|
||||||
else
|
|
||||||
mmu = "unknown";
|
|
||||||
|
|
||||||
clockfreq = loops_per_jiffy * HZ * clockfactor;
|
|
||||||
|
|
||||||
seq_printf(m, "CPU:\t\t%s\n"
|
|
||||||
"MMU:\t\t%s\n"
|
|
||||||
"FPU:\t\t%s\n"
|
|
||||||
"Clocking:\t%lu.%1luMHz\n"
|
|
||||||
"BogoMips:\t%lu.%02lu\n"
|
|
||||||
"Calibration:\t%lu loops\n",
|
|
||||||
cpu, mmu, fpu,
|
|
||||||
clockfreq/1000000,(clockfreq/100000)%10,
|
|
||||||
loops_per_jiffy/(500000/HZ),(loops_per_jiffy/(5000/HZ))%100,
|
|
||||||
loops_per_jiffy);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void *c_start(struct seq_file *m, loff_t *pos)
|
|
||||||
{
|
|
||||||
return *pos < 1 ? (void *)1 : NULL;
|
|
||||||
}
|
|
||||||
static void *c_next(struct seq_file *m, void *v, loff_t *pos)
|
|
||||||
{
|
|
||||||
++*pos;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
static void c_stop(struct seq_file *m, void *v)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
const struct seq_operations cpuinfo_op = {
|
|
||||||
.start = c_start,
|
|
||||||
.next = c_next,
|
|
||||||
.stop = c_stop,
|
|
||||||
.show = show_cpuinfo,
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef CONFIG_PROC_HARDWARE
|
|
||||||
static int hardware_proc_show(struct seq_file *m, void *v)
|
|
||||||
{
|
|
||||||
char model[80];
|
|
||||||
unsigned long mem;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if (mach_get_model)
|
|
||||||
mach_get_model(model);
|
|
||||||
else
|
|
||||||
strcpy(model, "Unknown m68k");
|
|
||||||
|
|
||||||
seq_printf(m, "Model:\t\t%s\n", model);
|
|
||||||
for (mem = 0, i = 0; i < m68k_num_memory; i++)
|
|
||||||
mem += m68k_memory[i].size;
|
|
||||||
seq_printf(m, "System Memory:\t%ldK\n", mem >> 10);
|
|
||||||
|
|
||||||
if (mach_get_hardware_list)
|
|
||||||
mach_get_hardware_list(m);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int hardware_proc_open(struct inode *inode, struct file *file)
|
|
||||||
{
|
|
||||||
return single_open(file, hardware_proc_show, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct file_operations hardware_proc_fops = {
|
|
||||||
.open = hardware_proc_open,
|
|
||||||
.read = seq_read,
|
|
||||||
.llseek = seq_lseek,
|
|
||||||
.release = single_release,
|
|
||||||
};
|
|
||||||
|
|
||||||
static int __init proc_hardware_init(void)
|
|
||||||
{
|
|
||||||
proc_create("hardware", 0, NULL, &hardware_proc_fops);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
module_init(proc_hardware_init);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void check_bugs(void)
|
|
||||||
{
|
|
||||||
#ifndef CONFIG_M68KFPU_EMU
|
|
||||||
if (m68k_fputype == 0) {
|
|
||||||
printk(KERN_EMERG "*** YOU DO NOT HAVE A FLOATING POINT UNIT, "
|
|
||||||
"WHICH IS REQUIRED BY LINUX/M68K ***\n");
|
|
||||||
printk(KERN_EMERG "Upgrade your hardware or join the FPU "
|
|
||||||
"emulation project\n");
|
|
||||||
panic("no FPU");
|
|
||||||
}
|
|
||||||
#endif /* !CONFIG_M68KFPU_EMU */
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_ADB
|
|
||||||
static int __init adb_probe_sync_enable (char *str) {
|
|
||||||
extern int __adb_probe_sync;
|
|
||||||
__adb_probe_sync = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
__setup("adb_sync", adb_probe_sync_enable);
|
|
||||||
#endif /* CONFIG_ADB */
|
|
||||||
|
|
|
@ -0,0 +1,533 @@
|
||||||
|
/*
|
||||||
|
* linux/arch/m68k/kernel/setup.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 1995 Hamish Macdonald
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file handles the architecture-dependent parts of system setup
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/mm.h>
|
||||||
|
#include <linux/sched.h>
|
||||||
|
#include <linux/delay.h>
|
||||||
|
#include <linux/interrupt.h>
|
||||||
|
#include <linux/fs.h>
|
||||||
|
#include <linux/console.h>
|
||||||
|
#include <linux/genhd.h>
|
||||||
|
#include <linux/errno.h>
|
||||||
|
#include <linux/string.h>
|
||||||
|
#include <linux/init.h>
|
||||||
|
#include <linux/bootmem.h>
|
||||||
|
#include <linux/proc_fs.h>
|
||||||
|
#include <linux/seq_file.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/initrd.h>
|
||||||
|
|
||||||
|
#include <asm/bootinfo.h>
|
||||||
|
#include <asm/sections.h>
|
||||||
|
#include <asm/setup.h>
|
||||||
|
#include <asm/fpu.h>
|
||||||
|
#include <asm/irq.h>
|
||||||
|
#include <asm/io.h>
|
||||||
|
#include <asm/machdep.h>
|
||||||
|
#ifdef CONFIG_AMIGA
|
||||||
|
#include <asm/amigahw.h>
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_ATARI
|
||||||
|
#include <asm/atarihw.h>
|
||||||
|
#include <asm/atari_stram.h>
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_SUN3X
|
||||||
|
#include <asm/dvma.h>
|
||||||
|
#endif
|
||||||
|
#include <asm/natfeat.h>
|
||||||
|
|
||||||
|
#if !FPSTATESIZE || !NR_IRQS
|
||||||
|
#warning No CPU/platform type selected, your kernel will not work!
|
||||||
|
#warning Are you building an allnoconfig kernel?
|
||||||
|
#endif
|
||||||
|
|
||||||
|
unsigned long m68k_machtype;
|
||||||
|
EXPORT_SYMBOL(m68k_machtype);
|
||||||
|
unsigned long m68k_cputype;
|
||||||
|
EXPORT_SYMBOL(m68k_cputype);
|
||||||
|
unsigned long m68k_fputype;
|
||||||
|
unsigned long m68k_mmutype;
|
||||||
|
EXPORT_SYMBOL(m68k_mmutype);
|
||||||
|
#ifdef CONFIG_VME
|
||||||
|
unsigned long vme_brdtype;
|
||||||
|
EXPORT_SYMBOL(vme_brdtype);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int m68k_is040or060;
|
||||||
|
EXPORT_SYMBOL(m68k_is040or060);
|
||||||
|
|
||||||
|
extern unsigned long availmem;
|
||||||
|
|
||||||
|
int m68k_num_memory;
|
||||||
|
EXPORT_SYMBOL(m68k_num_memory);
|
||||||
|
int m68k_realnum_memory;
|
||||||
|
EXPORT_SYMBOL(m68k_realnum_memory);
|
||||||
|
unsigned long m68k_memoffset;
|
||||||
|
struct mem_info m68k_memory[NUM_MEMINFO];
|
||||||
|
EXPORT_SYMBOL(m68k_memory);
|
||||||
|
|
||||||
|
struct mem_info m68k_ramdisk;
|
||||||
|
|
||||||
|
static char m68k_command_line[CL_SIZE];
|
||||||
|
|
||||||
|
void (*mach_sched_init) (irq_handler_t handler) __initdata = NULL;
|
||||||
|
/* machine dependent irq functions */
|
||||||
|
void (*mach_init_IRQ) (void) __initdata = NULL;
|
||||||
|
void (*mach_get_model) (char *model);
|
||||||
|
void (*mach_get_hardware_list) (struct seq_file *m);
|
||||||
|
/* machine dependent timer functions */
|
||||||
|
unsigned long (*mach_gettimeoffset) (void);
|
||||||
|
int (*mach_hwclk) (int, struct rtc_time*);
|
||||||
|
EXPORT_SYMBOL(mach_hwclk);
|
||||||
|
int (*mach_set_clock_mmss) (unsigned long);
|
||||||
|
unsigned int (*mach_get_ss)(void);
|
||||||
|
int (*mach_get_rtc_pll)(struct rtc_pll_info *);
|
||||||
|
int (*mach_set_rtc_pll)(struct rtc_pll_info *);
|
||||||
|
EXPORT_SYMBOL(mach_get_ss);
|
||||||
|
EXPORT_SYMBOL(mach_get_rtc_pll);
|
||||||
|
EXPORT_SYMBOL(mach_set_rtc_pll);
|
||||||
|
void (*mach_reset)( void );
|
||||||
|
void (*mach_halt)( void );
|
||||||
|
void (*mach_power_off)( void );
|
||||||
|
long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */
|
||||||
|
#ifdef CONFIG_HEARTBEAT
|
||||||
|
void (*mach_heartbeat) (int);
|
||||||
|
EXPORT_SYMBOL(mach_heartbeat);
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_M68K_L2_CACHE
|
||||||
|
void (*mach_l2_flush) (int);
|
||||||
|
#endif
|
||||||
|
#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
|
||||||
|
void (*mach_beep)(unsigned int, unsigned int);
|
||||||
|
EXPORT_SYMBOL(mach_beep);
|
||||||
|
#endif
|
||||||
|
#if defined(CONFIG_ISA) && defined(MULTI_ISA)
|
||||||
|
int isa_type;
|
||||||
|
int isa_sex;
|
||||||
|
EXPORT_SYMBOL(isa_type);
|
||||||
|
EXPORT_SYMBOL(isa_sex);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern int amiga_parse_bootinfo(const struct bi_record *);
|
||||||
|
extern int atari_parse_bootinfo(const struct bi_record *);
|
||||||
|
extern int mac_parse_bootinfo(const struct bi_record *);
|
||||||
|
extern int q40_parse_bootinfo(const struct bi_record *);
|
||||||
|
extern int bvme6000_parse_bootinfo(const struct bi_record *);
|
||||||
|
extern int mvme16x_parse_bootinfo(const struct bi_record *);
|
||||||
|
extern int mvme147_parse_bootinfo(const struct bi_record *);
|
||||||
|
extern int hp300_parse_bootinfo(const struct bi_record *);
|
||||||
|
extern int apollo_parse_bootinfo(const struct bi_record *);
|
||||||
|
|
||||||
|
extern void config_amiga(void);
|
||||||
|
extern void config_atari(void);
|
||||||
|
extern void config_mac(void);
|
||||||
|
extern void config_sun3(void);
|
||||||
|
extern void config_apollo(void);
|
||||||
|
extern void config_mvme147(void);
|
||||||
|
extern void config_mvme16x(void);
|
||||||
|
extern void config_bvme6000(void);
|
||||||
|
extern void config_hp300(void);
|
||||||
|
extern void config_q40(void);
|
||||||
|
extern void config_sun3x(void);
|
||||||
|
|
||||||
|
#define MASK_256K 0xfffc0000
|
||||||
|
|
||||||
|
extern void paging_init(void);
|
||||||
|
|
||||||
|
static void __init m68k_parse_bootinfo(const struct bi_record *record)
|
||||||
|
{
|
||||||
|
while (record->tag != BI_LAST) {
|
||||||
|
int unknown = 0;
|
||||||
|
const unsigned long *data = record->data;
|
||||||
|
|
||||||
|
switch (record->tag) {
|
||||||
|
case BI_MACHTYPE:
|
||||||
|
case BI_CPUTYPE:
|
||||||
|
case BI_FPUTYPE:
|
||||||
|
case BI_MMUTYPE:
|
||||||
|
/* Already set up by head.S */
|
||||||
|
break;
|
||||||
|
|
||||||
|
case BI_MEMCHUNK:
|
||||||
|
if (m68k_num_memory < NUM_MEMINFO) {
|
||||||
|
m68k_memory[m68k_num_memory].addr = data[0];
|
||||||
|
m68k_memory[m68k_num_memory].size = data[1];
|
||||||
|
m68k_num_memory++;
|
||||||
|
} else
|
||||||
|
printk("m68k_parse_bootinfo: too many memory chunks\n");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case BI_RAMDISK:
|
||||||
|
m68k_ramdisk.addr = data[0];
|
||||||
|
m68k_ramdisk.size = data[1];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case BI_COMMAND_LINE:
|
||||||
|
strlcpy(m68k_command_line, (const char *)data,
|
||||||
|
sizeof(m68k_command_line));
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (MACH_IS_AMIGA)
|
||||||
|
unknown = amiga_parse_bootinfo(record);
|
||||||
|
else if (MACH_IS_ATARI)
|
||||||
|
unknown = atari_parse_bootinfo(record);
|
||||||
|
else if (MACH_IS_MAC)
|
||||||
|
unknown = mac_parse_bootinfo(record);
|
||||||
|
else if (MACH_IS_Q40)
|
||||||
|
unknown = q40_parse_bootinfo(record);
|
||||||
|
else if (MACH_IS_BVME6000)
|
||||||
|
unknown = bvme6000_parse_bootinfo(record);
|
||||||
|
else if (MACH_IS_MVME16x)
|
||||||
|
unknown = mvme16x_parse_bootinfo(record);
|
||||||
|
else if (MACH_IS_MVME147)
|
||||||
|
unknown = mvme147_parse_bootinfo(record);
|
||||||
|
else if (MACH_IS_HP300)
|
||||||
|
unknown = hp300_parse_bootinfo(record);
|
||||||
|
else if (MACH_IS_APOLLO)
|
||||||
|
unknown = apollo_parse_bootinfo(record);
|
||||||
|
else
|
||||||
|
unknown = 1;
|
||||||
|
}
|
||||||
|
if (unknown)
|
||||||
|
printk("m68k_parse_bootinfo: unknown tag 0x%04x ignored\n",
|
||||||
|
record->tag);
|
||||||
|
record = (struct bi_record *)((unsigned long)record +
|
||||||
|
record->size);
|
||||||
|
}
|
||||||
|
|
||||||
|
m68k_realnum_memory = m68k_num_memory;
|
||||||
|
#ifdef CONFIG_SINGLE_MEMORY_CHUNK
|
||||||
|
if (m68k_num_memory > 1) {
|
||||||
|
printk("Ignoring last %i chunks of physical memory\n",
|
||||||
|
(m68k_num_memory - 1));
|
||||||
|
m68k_num_memory = 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void __init setup_arch(char **cmdline_p)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
/* The bootinfo is located right after the kernel bss */
|
||||||
|
m68k_parse_bootinfo((const struct bi_record *)_end);
|
||||||
|
|
||||||
|
if (CPU_IS_040)
|
||||||
|
m68k_is040or060 = 4;
|
||||||
|
else if (CPU_IS_060)
|
||||||
|
m68k_is040or060 = 6;
|
||||||
|
|
||||||
|
/* FIXME: m68k_fputype is passed in by Penguin booter, which can
|
||||||
|
* be confused by software FPU emulation. BEWARE.
|
||||||
|
* We should really do our own FPU check at startup.
|
||||||
|
* [what do we do with buggy 68LC040s? if we have problems
|
||||||
|
* with them, we should add a test to check_bugs() below] */
|
||||||
|
#ifndef CONFIG_M68KFPU_EMU_ONLY
|
||||||
|
/* clear the fpu if we have one */
|
||||||
|
if (m68k_fputype & (FPU_68881|FPU_68882|FPU_68040|FPU_68060)) {
|
||||||
|
volatile int zero = 0;
|
||||||
|
asm volatile ("frestore %0" : : "m" (zero));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (CPU_IS_060) {
|
||||||
|
u32 pcr;
|
||||||
|
|
||||||
|
asm (".chip 68060; movec %%pcr,%0; .chip 68k"
|
||||||
|
: "=d" (pcr));
|
||||||
|
if (((pcr >> 8) & 0xff) <= 5) {
|
||||||
|
printk("Enabling workaround for errata I14\n");
|
||||||
|
asm (".chip 68060; movec %0,%%pcr; .chip 68k"
|
||||||
|
: : "d" (pcr | 0x20));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
*cmdline_p = m68k_command_line;
|
||||||
|
memcpy(boot_command_line, *cmdline_p, CL_SIZE);
|
||||||
|
|
||||||
|
parse_early_param();
|
||||||
|
|
||||||
|
#ifdef CONFIG_DUMMY_CONSOLE
|
||||||
|
conswitchp = &dummy_con;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
switch (m68k_machtype) {
|
||||||
|
#ifdef CONFIG_AMIGA
|
||||||
|
case MACH_AMIGA:
|
||||||
|
config_amiga();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_ATARI
|
||||||
|
case MACH_ATARI:
|
||||||
|
config_atari();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_MAC
|
||||||
|
case MACH_MAC:
|
||||||
|
config_mac();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_SUN3
|
||||||
|
case MACH_SUN3:
|
||||||
|
config_sun3();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_APOLLO
|
||||||
|
case MACH_APOLLO:
|
||||||
|
config_apollo();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_MVME147
|
||||||
|
case MACH_MVME147:
|
||||||
|
config_mvme147();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_MVME16x
|
||||||
|
case MACH_MVME16x:
|
||||||
|
config_mvme16x();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_BVME6000
|
||||||
|
case MACH_BVME6000:
|
||||||
|
config_bvme6000();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_HP300
|
||||||
|
case MACH_HP300:
|
||||||
|
config_hp300();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_Q40
|
||||||
|
case MACH_Q40:
|
||||||
|
config_q40();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_SUN3X
|
||||||
|
case MACH_SUN3X:
|
||||||
|
config_sun3x();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
default:
|
||||||
|
panic("No configuration setup");
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_NATFEAT
|
||||||
|
nf_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
paging_init();
|
||||||
|
|
||||||
|
#ifndef CONFIG_SUN3
|
||||||
|
for (i = 1; i < m68k_num_memory; i++)
|
||||||
|
free_bootmem_node(NODE_DATA(i), m68k_memory[i].addr,
|
||||||
|
m68k_memory[i].size);
|
||||||
|
#ifdef CONFIG_BLK_DEV_INITRD
|
||||||
|
if (m68k_ramdisk.size) {
|
||||||
|
reserve_bootmem_node(__virt_to_node(phys_to_virt(m68k_ramdisk.addr)),
|
||||||
|
m68k_ramdisk.addr, m68k_ramdisk.size,
|
||||||
|
BOOTMEM_DEFAULT);
|
||||||
|
initrd_start = (unsigned long)phys_to_virt(m68k_ramdisk.addr);
|
||||||
|
initrd_end = initrd_start + m68k_ramdisk.size;
|
||||||
|
printk("initrd: %08lx - %08lx\n", initrd_start, initrd_end);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_ATARI
|
||||||
|
if (MACH_IS_ATARI)
|
||||||
|
atari_stram_reserve_pages((void *)availmem);
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_SUN3X
|
||||||
|
if (MACH_IS_SUN3X) {
|
||||||
|
dvma_init();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* !CONFIG_SUN3 */
|
||||||
|
|
||||||
|
/* set ISA defs early as possible */
|
||||||
|
#if defined(CONFIG_ISA) && defined(MULTI_ISA)
|
||||||
|
if (MACH_IS_Q40) {
|
||||||
|
isa_type = ISA_TYPE_Q40;
|
||||||
|
isa_sex = 0;
|
||||||
|
}
|
||||||
|
#ifdef CONFIG_AMIGA_PCMCIA
|
||||||
|
if (MACH_IS_AMIGA && AMIGAHW_PRESENT(PCMCIA)) {
|
||||||
|
isa_type = ISA_TYPE_AG;
|
||||||
|
isa_sex = 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static int show_cpuinfo(struct seq_file *m, void *v)
|
||||||
|
{
|
||||||
|
const char *cpu, *mmu, *fpu;
|
||||||
|
unsigned long clockfreq, clockfactor;
|
||||||
|
|
||||||
|
#define LOOP_CYCLES_68020 (8)
|
||||||
|
#define LOOP_CYCLES_68030 (8)
|
||||||
|
#define LOOP_CYCLES_68040 (3)
|
||||||
|
#define LOOP_CYCLES_68060 (1)
|
||||||
|
|
||||||
|
if (CPU_IS_020) {
|
||||||
|
cpu = "68020";
|
||||||
|
clockfactor = LOOP_CYCLES_68020;
|
||||||
|
} else if (CPU_IS_030) {
|
||||||
|
cpu = "68030";
|
||||||
|
clockfactor = LOOP_CYCLES_68030;
|
||||||
|
} else if (CPU_IS_040) {
|
||||||
|
cpu = "68040";
|
||||||
|
clockfactor = LOOP_CYCLES_68040;
|
||||||
|
} else if (CPU_IS_060) {
|
||||||
|
cpu = "68060";
|
||||||
|
clockfactor = LOOP_CYCLES_68060;
|
||||||
|
} else {
|
||||||
|
cpu = "680x0";
|
||||||
|
clockfactor = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_M68KFPU_EMU_ONLY
|
||||||
|
fpu = "none(soft float)";
|
||||||
|
#else
|
||||||
|
if (m68k_fputype & FPU_68881)
|
||||||
|
fpu = "68881";
|
||||||
|
else if (m68k_fputype & FPU_68882)
|
||||||
|
fpu = "68882";
|
||||||
|
else if (m68k_fputype & FPU_68040)
|
||||||
|
fpu = "68040";
|
||||||
|
else if (m68k_fputype & FPU_68060)
|
||||||
|
fpu = "68060";
|
||||||
|
else if (m68k_fputype & FPU_SUNFPA)
|
||||||
|
fpu = "Sun FPA";
|
||||||
|
else
|
||||||
|
fpu = "none";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (m68k_mmutype & MMU_68851)
|
||||||
|
mmu = "68851";
|
||||||
|
else if (m68k_mmutype & MMU_68030)
|
||||||
|
mmu = "68030";
|
||||||
|
else if (m68k_mmutype & MMU_68040)
|
||||||
|
mmu = "68040";
|
||||||
|
else if (m68k_mmutype & MMU_68060)
|
||||||
|
mmu = "68060";
|
||||||
|
else if (m68k_mmutype & MMU_SUN3)
|
||||||
|
mmu = "Sun-3";
|
||||||
|
else if (m68k_mmutype & MMU_APOLLO)
|
||||||
|
mmu = "Apollo";
|
||||||
|
else
|
||||||
|
mmu = "unknown";
|
||||||
|
|
||||||
|
clockfreq = loops_per_jiffy * HZ * clockfactor;
|
||||||
|
|
||||||
|
seq_printf(m, "CPU:\t\t%s\n"
|
||||||
|
"MMU:\t\t%s\n"
|
||||||
|
"FPU:\t\t%s\n"
|
||||||
|
"Clocking:\t%lu.%1luMHz\n"
|
||||||
|
"BogoMips:\t%lu.%02lu\n"
|
||||||
|
"Calibration:\t%lu loops\n",
|
||||||
|
cpu, mmu, fpu,
|
||||||
|
clockfreq/1000000,(clockfreq/100000)%10,
|
||||||
|
loops_per_jiffy/(500000/HZ),(loops_per_jiffy/(5000/HZ))%100,
|
||||||
|
loops_per_jiffy);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void *c_start(struct seq_file *m, loff_t *pos)
|
||||||
|
{
|
||||||
|
return *pos < 1 ? (void *)1 : NULL;
|
||||||
|
}
|
||||||
|
static void *c_next(struct seq_file *m, void *v, loff_t *pos)
|
||||||
|
{
|
||||||
|
++*pos;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
static void c_stop(struct seq_file *m, void *v)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
const struct seq_operations cpuinfo_op = {
|
||||||
|
.start = c_start,
|
||||||
|
.next = c_next,
|
||||||
|
.stop = c_stop,
|
||||||
|
.show = show_cpuinfo,
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_PROC_HARDWARE
|
||||||
|
static int hardware_proc_show(struct seq_file *m, void *v)
|
||||||
|
{
|
||||||
|
char model[80];
|
||||||
|
unsigned long mem;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (mach_get_model)
|
||||||
|
mach_get_model(model);
|
||||||
|
else
|
||||||
|
strcpy(model, "Unknown m68k");
|
||||||
|
|
||||||
|
seq_printf(m, "Model:\t\t%s\n", model);
|
||||||
|
for (mem = 0, i = 0; i < m68k_num_memory; i++)
|
||||||
|
mem += m68k_memory[i].size;
|
||||||
|
seq_printf(m, "System Memory:\t%ldK\n", mem >> 10);
|
||||||
|
|
||||||
|
if (mach_get_hardware_list)
|
||||||
|
mach_get_hardware_list(m);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int hardware_proc_open(struct inode *inode, struct file *file)
|
||||||
|
{
|
||||||
|
return single_open(file, hardware_proc_show, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct file_operations hardware_proc_fops = {
|
||||||
|
.open = hardware_proc_open,
|
||||||
|
.read = seq_read,
|
||||||
|
.llseek = seq_lseek,
|
||||||
|
.release = single_release,
|
||||||
|
};
|
||||||
|
|
||||||
|
static int __init proc_hardware_init(void)
|
||||||
|
{
|
||||||
|
proc_create("hardware", 0, NULL, &hardware_proc_fops);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
module_init(proc_hardware_init);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void check_bugs(void)
|
||||||
|
{
|
||||||
|
#ifndef CONFIG_M68KFPU_EMU
|
||||||
|
if (m68k_fputype == 0) {
|
||||||
|
printk(KERN_EMERG "*** YOU DO NOT HAVE A FLOATING POINT UNIT, "
|
||||||
|
"WHICH IS REQUIRED BY LINUX/M68K ***\n");
|
||||||
|
printk(KERN_EMERG "Upgrade your hardware or join the FPU "
|
||||||
|
"emulation project\n");
|
||||||
|
panic("no FPU");
|
||||||
|
}
|
||||||
|
#endif /* !CONFIG_M68KFPU_EMU */
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_ADB
|
||||||
|
static int __init adb_probe_sync_enable (char *str) {
|
||||||
|
extern int __adb_probe_sync;
|
||||||
|
__adb_probe_sync = 1;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
__setup("adb_sync", adb_probe_sync_enable);
|
||||||
|
#endif /* CONFIG_ADB */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue