Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
663c5675
Commit
663c5675
authored
Oct 01, 2004
by
Richard Russon
Browse files
Options
Browse Files
Download
Plain Diff
Merge flatcap.org:/home/flatcap/backup/bk/ntfs-2.6
into flatcap.org:/home/flatcap/backup/bk/ntfs-2.6-devel
parents
50980507
b34cab77
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
1756 additions
and
308 deletions
+1756
-308
Documentation/ManagementStyle
Documentation/ManagementStyle
+276
-0
Documentation/vm/overcommit-accounting
Documentation/vm/overcommit-accounting
+4
-4
arch/arm/mm/init.c
arch/arm/mm/init.c
+1
-1
arch/arm26/mm/init.c
arch/arm26/mm/init.c
+1
-1
arch/ia64/configs/bigsur_defconfig
arch/ia64/configs/bigsur_defconfig
+1132
-0
arch/ia64/kernel/acpi.c
arch/ia64/kernel/acpi.c
+2
-1
arch/ia64/kernel/perfmon.c
arch/ia64/kernel/perfmon.c
+3
-3
arch/ia64/sn/kernel/sn2/prominfo_proc.c
arch/ia64/sn/kernel/sn2/prominfo_proc.c
+141
-164
drivers/isdn/capi/capi.c
drivers/isdn/capi/capi.c
+1
-1
drivers/isdn/i4l/isdn_tty.c
drivers/isdn/i4l/isdn_tty.c
+1
-1
drivers/net/natsemi.c
drivers/net/natsemi.c
+147
-120
include/asm-ia64/sn/sn_sal.h
include/asm-ia64/sn/sn_sal.h
+33
-3
include/linux/mman.h
include/linux/mman.h
+3
-0
include/linux/time.h
include/linux/time.h
+2
-0
mm/mmap.c
mm/mmap.c
+2
-2
mm/nommu.c
mm/nommu.c
+1
-1
security/commoncap.c
security/commoncap.c
+2
-2
security/dummy.c
security/dummy.c
+2
-2
security/selinux/hooks.c
security/selinux/hooks.c
+2
-2
No files found.
Documentation/ManagementStyle
0 → 100644
View file @
663c5675
Linux kernel management style
This is a short document describing the preferred (or made up, depending
on who you ask) management style for the linux kernel. It's meant to
mirror the CodingStyle document to some degree, and mainly written to
avoid answering (*) the same (or similar) questions over and over again.
Management style is very personal and much harder to quantify than
simple coding style rules, so this document may or may not have anything
to do with reality. It started as a lark, but that doesn't mean that it
might not actually be true. You'll have to decide for yourself.
Btw, when talking about "kernel manager", it's all about the technical
lead persons, not the people who do traditional management inside
companies. If you sign purchase orders or you have any clue about the
budget of your group, you're almost certainly not a kernel manager.
These suggestions may or may not apply to you.
First off, I'd suggest buying "Seven Habits of Highly Successful
People", and NOT read it. Burn it, it's a great symbolic gesture.
(*) This document does so not so much by answering the question, but by
making it painfully obvious to the questioner that we don't have a clue
to what the answer is.
Anyway, here goes:
Chapter 1: Decisions
Everybody thinks managers make decisions, and that decision-making is
important. The bigger and more painful the decision, the bigger the
manager must be to make it. That's very deep and obvious, but it's not
actually true.
The name of the game is to _avoid_ having to make a decision. In
particular, if somebody tells you "choose (a) or (b), we really need you
to decide on this", you're in trouble as a manager. The people you
manage had better know the details better than you, so if they come to
you for a technical decision, you're screwed. You're clearly not
competent to make that decision for them.
(Corollary:if the people you manage don't know the details better than
you, you're also screwed, although for a totally different reason.
Namely that you are in the wrong job, and that _they_ should be managing
your brilliance instead).
So the name of the game is to _avoid_ decisions, at least the big and
painful ones. Making small and non-consequential decisions is fine, and
makes you look like you know what you're doing, so what a kernel manager
needs to do is to turn the big and painful ones into small things where
nobody really cares.
It helps to realize that the key difference between a big decision and a
small one is whether you can fix your decision afterwards. Any decision
can be made small by just always making sure that if you were wrong (and
you _will_ be wrong), you can always undo the damage later by
backtracking. Suddenly, you get to be doubly managerial for making
_two_ inconsequential decisions - the wrong one _and_ the right one.
And people will even see that as true leadership (*cough* bullshit
*cough*).
Thus the key to avoiding big decisions becomes to just avoiding to do
things that can't be undone. Don't get ushered into a corner from which
you cannot escape. A cornered rat may be dangerous - a cornered manager
is just pitiful.
It turns out that since nobody would be stupid enough to ever really let
a kernel manager have huge fiscal responsibility _anyway_, it's usually
fairly easy to backtrack. Since you're not going to be able to waste
huge amounts of money that you might not be able to repay, the only
thing you can backtrack on is a technical decision, and there
back-tracking is very easy: just tell everybody that you were an
incompetent nincompoop, say you're sorry, and undo all the worthless
work you had people work on for the last year. Suddenly the decision
you made a year ago wasn't a big decision after all, since it could be
easily undone.
It turns out that some people have trouble with this approach, for two
reasons:
- admitting you were an idiot is harder than it looks. We all like to
maintain appearances, and coming out in public to say that you were
wrong is sometimes very hard indeed.
- having somebody tell you that what you worked on for the last year
wasn't worthwhile after all can be hard on the poor lowly engineers
too, and while the actual _work_ was easy enough to undo by just
deleting it, you may have irrevocably lost the trust of that
engineer. And remember: "irrevocable" was what we tried to avoid in
the first place, and your decision ended up being a big one after
all.
Happily, both of these reasons can be mitigated effectively by just
admitting up-front that you don't have a friggin' clue, and telling
people ahead of the fact that your decision is purely preliminary, and
might be the wrong thing. You should always reserve the right to change
your mind, and make people very _aware_ of that. And it's much easier
to admit that you are stupid when you haven't _yet_ done the really
stupid thing.
Then, when it really does turn out to be stupid, people just roll their
eyes and say "Oops, he did it again".
This preemptive admission of incompetence might also make the people who
actually do the work also think twice about whether it's worth doing or
not. After all, if _they_ aren't certain whether it's a good idea, you
sure as hell shouldn't encourage them by promising them that what they
work on will be included. Make them at least think twice before they
embark on a big endeavor.
Remember: they'd better know more about the details than you do, and
they usually already think they have the answer to everything. The best
thing you can do as a manager is not to instill confidence, but rather a
healthy dose of critical thinking on what they do.
Btw, another way to avoid a decision is to plaintively just whine "can't
we just do both?" and look pitiful. Trust me, it works. If it's not
clear which approach is better, they'll eventually figure it out. The
answer may end up being that both teams get so frustrated by the
situation that they just give up.
That may sound like a failure, but it's usually a sign that there was
something wrong with both projects, and the reason the people involved
couldn't decide was that they were both wrong. You end up coming up
smelling like roses, and you avoided yet another decision that you could
have screwed up on.
Chapter 2: People
Most people are idiots, and being a manager means you'll have to deal
with it, and perhaps more importantly, that _they_ have to deal with
_you_.
It turns out that while it's easy to undo technical mistakes, it's not
as easy to undo personality disorders. You just have to live with
theirs - and yours.
However, in order to prepare yourself as a kernel manager, it's best to
remember not to burn any bridges, bomb any innocent villagers, or
alienate too many kernel developers. It turns out that alienating people
is fairly easy, and un-alienating them is hard. Thus "alienating"
immediately falls under the heading of "not reversible", and becomes a
no-no according to Chapter 1.
There's just a few simple rules here:
(1) don't call people d*ckheads (at least not in public)
(2) learn how to apologize when you forgot rule (1)
The problem with #1 is that it's very easy to do, since you can say
"you're a d*ckhead" in millions of different ways (*), sometimes without
even realizing it, and almost always with a white-hot conviction that
you are right.
And the more convinced you are that you are right (and let's face it,
you can call just about _anybody_ a d*ckhead, and you often _will_ be
right), the harder it ends up being to apologize afterwards.
To solve this problem, you really only have two options:
- get really good at apologies
- spread the "love" out so evenly that nobody really ends up feeling
like they get unfairly targeted. Make it inventive enough, and they
might even be amused.
The option of being unfailingly polite really doesn't exist. Nobody will
trust somebody who is so clearly hiding his true character.
(*) Paul Simon sang "Fifty Ways to Lose Your Lover", because quite
frankly, "A Million Ways to Tell a Developer He Is a D*ckhead" doesn't
scan nearly as well. But I'm sure he thought about it.
Chapter 3: People II - the Good Kind
While it turns out that most people are idiots, the corollary to that is
sadly that you are one too, and that while we can all bask in the secure
knowledge that we're better than the average person (let's face it,
nobody ever believes that they're average or below-average), we should
also admit that we're not the sharpest knife around, and there will be
other people that are less of an idiot that you are.
Some people react badly to smart people. Others take advantage of them.
Make sure that you, as a kernel maintainer, are in the second group.
Suck up to them, because they are the people who will make your job
easier. In particular, they'll be able to make your decisions for you,
which is what the game is all about.
So when you find somebody smarter than you are, just coast along. Your
management responsibilities largely become ones of saying "Sounds like a
good idea - go wild", or "That sounds good, but what about xxx?". The
second version in particular is a great way to either learn something
new about "xxx" or seem _extra_ managerial by pointing out something the
smarter person hadn't thought about. In either case, you win.
One thing to look out for is to realize that greatness in one area does
not necessarily translate to other areas. So you might prod people in
specific directions, but let's face it, they might be good at what they
do, and suck at everything else. The good news is that people tend to
naturally gravitate back to what they are good at, so it's not like you
are doing something irreversible when you _do_ prod them in some
direction, just don't push too hard.
Chapter 4: Placing blame
Things will go wrong, and people want somebody to blame. Tag, you're it.
It's not actually that hard to accept the blame, especially if people
kind of realize that it wasn't _all_ your fault. Which brings us to the
best way of taking the blame: do it for another guy. You'll feel good
for taking the fall, he'll feel good about not getting blamed, and the
guy who lost his whole 36GB porn-collection because of your incompetence
will grudgingly admit that you at least didn't try to weasel out of it.
Then make the developer who really screwed up (if you can find him) know
_in_private_ that he screwed up. Not just so he can avoid it in the
future, but so that he knows he owes you one. And, perhaps even more
importantly, he's also likely the person who can fix it. Because, let's
face it, it sure ain't you.
Taking the blame is also why you get to be manager in the first place.
It's part of what makes people trust you, and allow you the potential
glory, because you're the one who gets to say "I screwed up". And if
you've followed the previous rules, you'll be pretty good at saying that
by now.
Chapter 5: Things to avoid
There's one thing people hate even more than being called "d*ckhead",
and that is being called a "d*ckhead" in a sanctimonious voice. The
first you can apologize for, the second one you won't really get the
chance. They likely will no longer be listening even if you otherwise
do a good job.
We all think we're better than anybody else, which means that when
somebody else puts on airs, it _really_ rubs us the wrong way. You may
be morally and intellectually superior to everybody around you, but
don't try to make it too obvious unless you really _intend_ to irritate
somebody (*).
Similarly, don't be too polite or subtle about things. Politeness easily
ends up going overboard and hiding the problem, and as they say, "On the
internet, nobody can hear you being subtle". Use a big blunt object to
hammer the point in, because you can't really depend on people getting
your point otherwise.
Some humor can help pad both the bluntness and the moralizing. Going
overboard to the point of being ridiculous can drive a point home
without making it painful to the recipient, who just thinks you're being
silly. It can thus help get through the personal mental block we all
have about criticism.
(*) Hint: internet newsgroups that are not directly related to your work
are great ways to take out your frustrations at other people. Write
insulting posts with a sneer just to get into a good flame every once in
a while, and you'll feel cleansed. Just don't crap too close to home.
Chapter 6: Why me?
Since your main responsibility seems to be to take the blame for other
peoples mistakes, and make it painfully obvious to everybody else that
you're incompetent, the obvious question becomes one of why do it in the
first place?
First off, while you may or may not get screaming teenage girls (or
boys, let's not be judgmental or sexist here) knocking on your dressing
room door, you _will_ get an immense feeling of personal accomplishment
for being "in charge". Never mind the fact that you're really leading
by trying to keep up with everybody else and running after them as fast
as you can. Everybody will still think you're the person in charge.
It's a great job if you can hack it.
Documentation/vm/overcommit-accounting
View file @
663c5675
The Linux kernel supports th
ree
overcommit handling modes
The Linux kernel supports th
e following
overcommit handling modes
0 - Heuristic overcommit handling. Obvious overcommits of
0 - Heuristic overcommit handling. Obvious overcommits of
address space are refused. Used for a typical system. It
address space are refused. Used for a typical system. It
...
@@ -7,10 +7,10 @@ The Linux kernel supports three overcommit handling modes
...
@@ -7,10 +7,10 @@ The Linux kernel supports three overcommit handling modes
allocate slighly more memory in this mode. This is the
allocate slighly more memory in this mode. This is the
default.
default.
1 -
No overcommit handling
. Appropriate for some scientific
1 -
Always overcommit
. Appropriate for some scientific
applications.
applications.
2 -
(NEW) stric
t overcommit. The total address space commit
2 -
Don'
t overcommit. The total address space commit
for the system is not permitted to exceed swap + a
for the system is not permitted to exceed swap + a
configurable percentage (default is 50) of physical RAM.
configurable percentage (default is 50) of physical RAM.
Depending on the percentage you use, in most situations
Depending on the percentage you use, in most situations
...
@@ -27,7 +27,7 @@ Gotchas
...
@@ -27,7 +27,7 @@ Gotchas
The C language stack growth does an implicit mremap. If you want absolute
The C language stack growth does an implicit mremap. If you want absolute
guarantees and run close to the edge you MUST mmap your stack for the
guarantees and run close to the edge you MUST mmap your stack for the
largest size you think you will need. For typical stack usage is does
largest size you think you will need. For typical stack usage
th
is does
not matter much but it's a corner case if you really really care
not matter much but it's a corner case if you really really care
In mode 2 the MAP_NORESERVE flag is ignored.
In mode 2 the MAP_NORESERVE flag is ignored.
...
...
arch/arm/mm/init.c
View file @
663c5675
...
@@ -590,7 +590,7 @@ void __init mem_init(void)
...
@@ -590,7 +590,7 @@ void __init mem_init(void)
* anywhere without overcommit, so turn
* anywhere without overcommit, so turn
* it on by default.
* it on by default.
*/
*/
sysctl_overcommit_memory
=
1
;
sysctl_overcommit_memory
=
OVERCOMMIT_ALWAYS
;
}
}
}
}
...
...
arch/arm26/mm/init.c
View file @
663c5675
...
@@ -376,7 +376,7 @@ void __init mem_init(void)
...
@@ -376,7 +376,7 @@ void __init mem_init(void)
* Turn on overcommit on tiny machines
* Turn on overcommit on tiny machines
*/
*/
if
(
PAGE_SIZE
>=
16384
&&
num_physpages
<=
128
)
{
if
(
PAGE_SIZE
>=
16384
&&
num_physpages
<=
128
)
{
sysctl_overcommit_memory
=
1
;
sysctl_overcommit_memory
=
OVERCOMMIT_ALWAYS
;
printk
(
"Turning on overcommit
\n
"
);
printk
(
"Turning on overcommit
\n
"
);
}
}
}
}
...
...
arch/ia64/configs/bigsur_defconfig
0 → 100644
View file @
663c5675
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.9-rc2
# Tue Sep 28 13:26:53 2004
#
#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
CONFIG_CLEAN_COMPILE=y
#
# General setup
#
CONFIG_LOCALVERSION=""
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
# CONFIG_AUDIT is not set
CONFIG_LOG_BUF_SHIFT=16
CONFIG_HOTPLUG=y
# CONFIG_IKCONFIG is not set
# CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SHMEM=y
# CONFIG_TINY_SHMEM is not set
#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
CONFIG_KMOD=y
CONFIG_STOP_MACHINE=y
#
# Processor type and features
#
CONFIG_IA64=y
CONFIG_64BIT=y
CONFIG_MMU=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_TIME_INTERPOLATION=y
CONFIG_EFI=y
CONFIG_GENERIC_IOMAP=y
# CONFIG_IA64_GENERIC is not set
CONFIG_IA64_DIG=y
# CONFIG_IA64_HP_ZX1 is not set
# CONFIG_IA64_SGI_SN2 is not set
# CONFIG_IA64_HP_SIM is not set
CONFIG_ITANIUM=y
# CONFIG_MCKINLEY is not set
# CONFIG_IA64_PAGE_SIZE_4KB is not set
# CONFIG_IA64_PAGE_SIZE_8KB is not set
CONFIG_IA64_PAGE_SIZE_16KB=y
# CONFIG_IA64_PAGE_SIZE_64KB is not set
CONFIG_IA64_BRL_EMU=y
# CONFIG_ITANIUM_BSTEP_SPECIFIC is not set
CONFIG_IA64_L1_CACHE_SHIFT=6
# CONFIG_NUMA is not set
# CONFIG_VIRTUAL_MEM_MAP is not set
# CONFIG_IA64_CYCLONE is not set
CONFIG_IOSAPIC=y
CONFIG_FORCE_MAX_ZONEORDER=18
CONFIG_SMP=y
CONFIG_NR_CPUS=2
# CONFIG_HOTPLUG_CPU is not set
CONFIG_PREEMPT=y
CONFIG_HAVE_DEC_LOCK=y
CONFIG_IA32_SUPPORT=y
CONFIG_COMPAT=y
CONFIG_PERFMON=y
CONFIG_IA64_PALINFO=y
#
# Firmware Drivers
#
CONFIG_EFI_VARS=y
CONFIG_EFI_PCDP=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=m
#
# Power management and ACPI
#
CONFIG_PM=y
CONFIG_ACPI=y
#
# ACPI (Advanced Configuration and Power Interface) Support
#
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_INTERPRETER=y
CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_FAN=m
CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_THERMAL=m
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_BUS=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y
#
# Bus options (PCI, PCMCIA)
#
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
# CONFIG_PCI_MSI is not set
CONFIG_PCI_LEGACY_PROC=y
CONFIG_PCI_NAMES=y
#
# PCI Hotplug Support
#
# CONFIG_HOTPLUG_PCI is not set
#
# PCMCIA/CardBus support
#
# CONFIG_PCMCIA is not set
#
# Device Drivers
#
#
# Generic Driver Options
#
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FW_LOADER is not set
# CONFIG_DEBUG_DRIVER is not set
#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set
#
# Parallel port support
#
# CONFIG_PARPORT is not set
#
# Plug and Play support
#
#
# Block devices
#
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
# CONFIG_BLK_DEV_SX8 is not set
# CONFIG_BLK_DEV_UB is not set
CONFIG_BLK_DEV_RAM=m
CONFIG_BLK_DEV_RAM_SIZE=4096
#
# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=m
CONFIG_BLK_DEV_IDE=m
#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_IDE_SATA is not set
CONFIG_BLK_DEV_IDEDISK=m
# CONFIG_IDEDISK_MULTI_MODE is not set
CONFIG_BLK_DEV_IDECD=m
# CONFIG_BLK_DEV_IDETAPE is not set
CONFIG_BLK_DEV_IDEFLOPPY=m
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_IDE_TASK_IOCTL is not set
# CONFIG_IDE_TASKFILE_IO is not set
#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=m
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_BLK_DEV_GENERIC=m
# CONFIG_BLK_DEV_OPTI621 is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_SC1200 is not set
CONFIG_BLK_DEV_PIIX=m
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_IDE_ARM is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_BLK_DEV_HD is not set
#
# SCSI device support
#
CONFIG_SCSI=y
CONFIG_SCSI_PROC_FS=y
#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
# CONFIG_BLK_DEV_SR is not set
# CONFIG_CHR_DEV_SG is not set
#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
# CONFIG_SCSI_MULTI_LUN is not set
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
#
# SCSI Transport Attributes
#
CONFIG_SCSI_SPI_ATTRS=m
# CONFIG_SCSI_FC_ATTRS is not set
#
# SCSI low-level drivers
#
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_SCSI_SATA is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_EATA_PIO is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_IPR is not set
# CONFIG_SCSI_QLOGIC_ISP is not set
# CONFIG_SCSI_QLOGIC_FC is not set
CONFIG_SCSI_QLOGIC_1280=y
CONFIG_SCSI_QLA2XXX=y
# CONFIG_SCSI_QLA21XX is not set
# CONFIG_SCSI_QLA22XX is not set
# CONFIG_SCSI_QLA2300 is not set
# CONFIG_SCSI_QLA2322 is not set
# CONFIG_SCSI_QLA6312 is not set
# CONFIG_SCSI_QLA6322 is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_DEBUG is not set
#
# Multi-device support (RAID and LVM)
#
CONFIG_MD=y
CONFIG_BLK_DEV_MD=m
CONFIG_MD_LINEAR=m
CONFIG_MD_RAID0=m
CONFIG_MD_RAID1=m
CONFIG_MD_RAID10=m
CONFIG_MD_RAID5=m
CONFIG_MD_RAID6=m
CONFIG_MD_MULTIPATH=m
CONFIG_BLK_DEV_DM=m
CONFIG_DM_CRYPT=m
CONFIG_DM_SNAPSHOT=m
CONFIG_DM_MIRROR=m
CONFIG_DM_ZERO=m
#
# Fusion MPT device support
#
# CONFIG_FUSION is not set
#
# IEEE 1394 (FireWire) support
#
# CONFIG_IEEE1394 is not set
#
# I2O device support
#
# CONFIG_I2O is not set
#
# Networking support
#
CONFIG_NET=y
#
# Networking options
#
CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y
# CONFIG_NETLINK_DEV is not set
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_TUNNEL is not set
# CONFIG_IPV6 is not set
# CONFIG_NETFILTER is not set
#
# SCTP Configuration (EXPERIMENTAL)
#
# CONFIG_IP_SCTP is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_HW_FLOWCONTROL is not set
#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set
# CONFIG_NET_CLS_ROUTE is not set
#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
CONFIG_NETDEVICES=y
CONFIG_DUMMY=y
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
#
# ARCnet devices
#
# CONFIG_ARCNET is not set
#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_NET_VENDOR_3COM is not set
#
# Tulip family network device support
#
# CONFIG_NET_TULIP is not set
# CONFIG_HP100 is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_B44 is not set
# CONFIG_FORCEDETH is not set
# CONFIG_DGRS is not set
CONFIG_EEPRO100=y
# CONFIG_EEPRO100_PIO is not set
# CONFIG_E100 is not set
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_8139CP is not set
# CONFIG_8139TOO is not set
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_VIA_VELOCITY is not set
#
# Ethernet (1000 Mbit)
#
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
# CONFIG_E1000 is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SK98LIN is not set
# CONFIG_TIGON3 is not set
#
# Ethernet (10000 Mbit)
#
# CONFIG_IXGB is not set
# CONFIG_S2IO is not set
#
# Token Ring devices
#
# CONFIG_TR is not set
#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set
#
# Wan interfaces
#
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_NET_FC is not set
# CONFIG_SHAPER is not set
# CONFIG_NETCONSOLE is not set
#
# ISDN subsystem
#
# CONFIG_ISDN is not set
#
# Telephony Support
#
# CONFIG_PHONE is not set
#
# Input device support
#
CONFIG_INPUT=y
#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_TSDEV is not set
CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_EVBUG is not set
#
# Input I/O drivers
#
# CONFIG_GAMEPORT is not set
CONFIG_SOUND_GAMEPORT=y
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PCIPS2 is not set
# CONFIG_SERIO_RAW is not set
#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not set
#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_SERIAL_NONSTANDARD is not set
#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_ACPI is not set
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
# CONFIG_SERIAL_8250_MULTIPORT is not set
# CONFIG_SERIAL_8250_RSA is not set
#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
#
# IPMI
#
# CONFIG_IPMI_HANDLER is not set
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_HW_RANDOM is not set
CONFIG_EFI_RTC=y
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
#
# Ftape, the floppy tape device driver
#
CONFIG_AGP=m
CONFIG_AGP_I460=m
CONFIG_DRM=y
# CONFIG_DRM_TDFX is not set
CONFIG_DRM_R128=m
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_HPET is not set
#
# I2C support
#
CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y
#
# I2C Algorithms
#
CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_ALGOPCF is not set
# CONFIG_I2C_ALGOPCA is not set
#
# I2C Hardware Bus support
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_I810 is not set
# CONFIG_I2C_ISA is not set
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_PROSAVAGE is not set
# CONFIG_I2C_SAVAGE4 is not set
# CONFIG_SCx200_ACB is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set
# CONFIG_I2C_VOODOO3 is not set
# CONFIG_I2C_PCA_ISA is not set
#
# Hardware Sensors Chip support
#
# CONFIG_I2C_SENSOR is not set
# CONFIG_SENSORS_ADM1021 is not set
# CONFIG_SENSORS_ADM1025 is not set
# CONFIG_SENSORS_ADM1031 is not set
# CONFIG_SENSORS_ASB100 is not set
# CONFIG_SENSORS_DS1621 is not set
# CONFIG_SENSORS_FSCHER is not set
# CONFIG_SENSORS_GL518SM is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_LM75 is not set
# CONFIG_SENSORS_LM77 is not set
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM80 is not set
# CONFIG_SENSORS_LM83 is not set
# CONFIG_SENSORS_LM85 is not set
# CONFIG_SENSORS_LM90 is not set
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_SMSC47M1 is not set
# CONFIG_SENSORS_VIA686A is not set
# CONFIG_SENSORS_W83781D is not set
# CONFIG_SENSORS_W83L785TS is not set
# CONFIG_SENSORS_W83627HF is not set
#
# Other I2C Chip support
#
# CONFIG_SENSORS_EEPROM is not set
# CONFIG_SENSORS_PCF8574 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_SENSORS_RTC8564 is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set
#
# Dallas's 1-wire bus
#
# CONFIG_W1 is not set
#
# Misc devices
#
#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set
#
# Digital Video Broadcasting Devices
#
# CONFIG_DVB is not set
#
# Graphics support
#
# CONFIG_FB is not set
#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
CONFIG_DUMMY_CONSOLE=y
#
# Sound
#
CONFIG_SOUND=m
#
# Advanced Linux Sound Architecture
#
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_HWDEP=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_SEQUENCER=m
# CONFIG_SND_SEQ_DUMMY is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
# CONFIG_SND_SEQUENCER_OSS is not set
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set
#
# Generic devices
#
CONFIG_SND_OPL3_LIB=m
# CONFIG_SND_DUMMY is not set
# CONFIG_SND_VIRMIDI is not set
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 is not set
#
# PCI devices
#
CONFIG_SND_AC97_CODEC=m
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
# CONFIG_SND_CS46XX is not set
CONFIG_SND_CS4281=m
# CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_YMFPCI is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
# CONFIG_SND_INTEL8X0 is not set
# CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VX222 is not set
#
# ALSA USB devices
#
# CONFIG_SND_USB_AUDIO is not set
# CONFIG_SND_USB_USX2Y is not set
#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set
#
# USB support
#
CONFIG_USB=m
# CONFIG_USB_DEBUG is not set
#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
# CONFIG_USB_BANDWIDTH is not set
# CONFIG_USB_DYNAMIC_MINORS is not set
# CONFIG_USB_SUSPEND is not set
# CONFIG_USB_OTG is not set
#
# USB Host Controller Drivers
#
# CONFIG_USB_EHCI_HCD is not set
# CONFIG_USB_OHCI_HCD is not set
CONFIG_USB_UHCI_HCD=m
#
# USB Device Class drivers
#
CONFIG_USB_AUDIO=m
CONFIG_USB_BLUETOOTH_TTY=m
CONFIG_USB_MIDI=m
CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=m
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_RW_DETECT is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_DPCM is not set
# CONFIG_USB_STORAGE_HP8200e is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
#
# USB Human Interface Devices (HID)
#
CONFIG_USB_HID=m
CONFIG_USB_HIDINPUT=y
# CONFIG_HID_FF is not set
CONFIG_USB_HIDDEV=y
#
# USB HID Boot Protocol drivers
#
# CONFIG_USB_KBD is not set
# CONFIG_USB_MOUSE is not set
# CONFIG_USB_AIPTEK is not set
# CONFIG_USB_WACOM is not set
# CONFIG_USB_KBTAB is not set
# CONFIG_USB_POWERMATE is not set
# CONFIG_USB_MTOUCH is not set
# CONFIG_USB_EGALAX is not set
# CONFIG_USB_XPAD is not set
# CONFIG_USB_ATI_REMOTE is not set
#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set
# CONFIG_USB_HPUSBSCSI is not set
#
# USB Multimedia devices
#
# CONFIG_USB_DABUSB is not set
#
# Video4Linux support is needed for USB Multimedia device support
#
#
# USB Network adaptors
#
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_USBNET is not set
#
# USB port drivers
#
#
# USB Serial Converter support
#
# CONFIG_USB_SERIAL is not set
#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_TIGL is not set
# CONFIG_USB_AUERSWALD is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_LED is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_PHIDGETSERVO is not set
# CONFIG_USB_TEST is not set
#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
#
# File systems
#
CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
# CONFIG_EXT3_FS_POSIX_ACL is not set
# CONFIG_EXT3_FS_SECURITY is not set
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
CONFIG_FS_POSIX_ACL=y
CONFIG_XFS_FS=y
# CONFIG_XFS_RT is not set
CONFIG_XFS_QUOTA=y
CONFIG_XFS_SECURITY=y
CONFIG_XFS_POSIX_ACL=y
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_QUOTA is not set
CONFIG_QUOTACTL=y
CONFIG_AUTOFS_FS=m
CONFIG_AUTOFS4_FS=m
#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
# CONFIG_ZISOFS is not set
CONFIG_UDF_FS=m
CONFIG_UDF_NLS=y
#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=y
# CONFIG_MSDOS_FS is not set
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
# CONFIG_NTFS_FS is not set
#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_SYSFS=y
# CONFIG_DEVFS_FS is not set
CONFIG_DEVPTS_FS_XATTR=y
CONFIG_DEVPTS_FS_SECURITY=y
CONFIG_TMPFS=y
CONFIG_HUGETLBFS=y
CONFIG_HUGETLB_PAGE=y
CONFIG_RAMFS=y
#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
#
# Network File Systems
#
CONFIG_NFS_FS=m
CONFIG_NFS_V3=y
CONFIG_NFS_V4=y
# CONFIG_NFS_DIRECTIO is not set
CONFIG_NFSD=m
CONFIG_NFSD_V3=y
CONFIG_NFSD_V4=y
CONFIG_NFSD_TCP=y
CONFIG_LOCKD=m
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=m
CONFIG_SUNRPC=m
CONFIG_SUNRPC_GSS=m
CONFIG_RPCSEC_GSS_KRB5=m
# CONFIG_RPCSEC_GSS_SPKM3 is not set
# CONFIG_SMB_FS is not set
CONFIG_CIFS=m
CONFIG_CIFS_STATS=y
CONFIG_CIFS_XATTR=y
CONFIG_CIFS_POSIX=y
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not set
# CONFIG_OSF_PARTITION is not set
# CONFIG_AMIGA_PARTITION is not set
# CONFIG_ATARI_PARTITION is not set
# CONFIG_MAC_PARTITION is not set
CONFIG_MSDOS_PARTITION=y
# CONFIG_BSD_DISKLABEL is not set
# CONFIG_MINIX_SUBPARTITION is not set
# CONFIG_SOLARIS_X86_PARTITION is not set
# CONFIG_UNIXWARE_DISKLABEL is not set
# CONFIG_LDM_PARTITION is not set
CONFIG_SGI_PARTITION=y
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
CONFIG_EFI_PARTITION=y
#
# Native Language Support
#
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ASCII is not set
CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
CONFIG_NLS_UTF8=m
#
# Library routines
#
# CONFIG_CRC_CCITT is not set
CONFIG_CRC32=y
# CONFIG_LIBCRC32C is not set
#
# Profiling support
#
CONFIG_PROFILING=y
CONFIG_OPROFILE=y
#
# Kernel hacking
#
CONFIG_DEBUG_KERNEL=y
CONFIG_MAGIC_SYSRQ=y
# CONFIG_DEBUG_SLAB is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_INFO is not set
# CONFIG_IA64_GRANULE_16MB is not set
CONFIG_IA64_GRANULE_64MB=y
# CONFIG_IA64_PRINT_HAZARDS is not set
# CONFIG_DISABLE_VHPT is not set
# CONFIG_IA64_DEBUG_CMPXCHG is not set
# CONFIG_IA64_DEBUG_IRQ is not set
CONFIG_SYSVIPC_COMPAT=y
#
# Security options
#
# CONFIG_SECURITY is not set
#
# Cryptographic options
#
CONFIG_CRYPTO=y
# CONFIG_CRYPTO_HMAC is not set
# CONFIG_CRYPTO_NULL is not set
# CONFIG_CRYPTO_MD4 is not set
CONFIG_CRYPTO_MD5=y
# CONFIG_CRYPTO_SHA1 is not set
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA512 is not set
# CONFIG_CRYPTO_WHIRLPOOL is not set
CONFIG_CRYPTO_DES=y
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_AES is not set
# CONFIG_CRYPTO_CAST5 is not set
# CONFIG_CRYPTO_CAST6 is not set
# CONFIG_CRYPTO_TEA is not set
# CONFIG_CRYPTO_ARC4 is not set
# CONFIG_CRYPTO_KHAZAD is not set
# CONFIG_CRYPTO_DEFLATE is not set
# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_CRC32C is not set
# CONFIG_CRYPTO_TEST is not set
arch/ia64/kernel/acpi.c
View file @
663c5675
...
@@ -437,8 +437,9 @@ acpi_numa_arch_fixup (void)
...
@@ -437,8 +437,9 @@ acpi_numa_arch_fixup (void)
{
{
int
i
,
j
,
node_from
,
node_to
;
int
i
,
j
,
node_from
,
node_to
;
/* If there's no SRAT, fix the phys_id */
/* If there's no SRAT, fix the phys_id
and mark node 0 online
*/
if
(
srat_num_cpus
==
0
)
{
if
(
srat_num_cpus
==
0
)
{
node_set_online
(
0
);
node_cpuid
[
0
].
phys_id
=
hard_smp_processor_id
();
node_cpuid
[
0
].
phys_id
=
hard_smp_processor_id
();
return
;
return
;
}
}
...
...
arch/ia64/kernel/perfmon.c
View file @
663c5675
...
@@ -2286,7 +2286,7 @@ pfm_smpl_buffer_alloc(struct task_struct *task, pfm_context_t *ctx, unsigned lon
...
@@ -2286,7 +2286,7 @@ pfm_smpl_buffer_alloc(struct task_struct *task, pfm_context_t *ctx, unsigned lon
* if ((mm->total_vm << PAGE_SHIFT) + len> task->rlim[RLIMIT_AS].rlim_cur)
* if ((mm->total_vm << PAGE_SHIFT) + len> task->rlim[RLIMIT_AS].rlim_cur)
* return -ENOMEM;
* return -ENOMEM;
*/
*/
if
(
size
>
task
->
rlim
[
RLIMIT_MEMLOCK
].
rlim_cur
)
return
-
E
AGAIN
;
if
(
size
>
task
->
rlim
[
RLIMIT_MEMLOCK
].
rlim_cur
)
return
-
E
NOMEM
;
/*
/*
* We do the easy to undo allocations first.
* We do the easy to undo allocations first.
...
@@ -2601,7 +2601,7 @@ pfm_task_incompatible(pfm_context_t *ctx, struct task_struct *task)
...
@@ -2601,7 +2601,7 @@ pfm_task_incompatible(pfm_context_t *ctx, struct task_struct *task)
*/
*/
if
(
task
==
current
)
return
0
;
if
(
task
==
current
)
return
0
;
if
(
task
->
state
!=
TASK_STOPPED
)
{
if
(
(
task
->
state
!=
TASK_STOPPED
)
&&
(
task
->
state
!=
TASK_TRACED
)
)
{
DPRINT
((
"cannot attach to non-stopped task [%d] state=%ld
\n
"
,
task
->
pid
,
task
->
state
));
DPRINT
((
"cannot attach to non-stopped task [%d] state=%ld
\n
"
,
task
->
pid
,
task
->
state
));
return
-
EBUSY
;
return
-
EBUSY
;
}
}
...
@@ -4755,7 +4755,7 @@ pfm_check_task_state(pfm_context_t *ctx, int cmd, unsigned long flags)
...
@@ -4755,7 +4755,7 @@ pfm_check_task_state(pfm_context_t *ctx, int cmd, unsigned long flags)
* the task must be stopped.
* the task must be stopped.
*/
*/
if
(
PFM_CMD_STOPPED
(
cmd
))
{
if
(
PFM_CMD_STOPPED
(
cmd
))
{
if
(
task
->
state
!=
TASK_STOPPED
)
{
if
(
(
task
->
state
!=
TASK_STOPPED
)
&&
(
task
->
state
!=
TASK_TRACED
)
)
{
DPRINT
((
"[%d] task not in stopped state
\n
"
,
task
->
pid
));
DPRINT
((
"[%d] task not in stopped state
\n
"
,
task
->
pid
));
return
-
EBUSY
;
return
-
EBUSY
;
}
}
...
...
arch/ia64/sn/kernel/sn2/prominfo_proc.c
View file @
663c5675
...
@@ -14,50 +14,14 @@
...
@@ -14,50 +14,14 @@
#include <linux/proc_fs.h>
#include <linux/proc_fs.h>
#include <asm/system.h>
#include <asm/system.h>
#include <asm/io.h>
#include <asm/io.h>
#include <asm/sn/sn2/addrs.h>
#include <asm/sn/sn_sal.h>
#include <asm/sn/simulator.h>
/* to lookup nasids */
#include <asm/sn/sn_cpuid.h>
#include <asm/sn/sn_cpuid.h>
#include <asm/sn/sn2/addrs.h>
MODULE_DESCRIPTION
(
"PROM version reporting for /proc"
);
MODULE_DESCRIPTION
(
"PROM version reporting for /proc"
);
MODULE_AUTHOR
(
"Chad Talbott"
);
MODULE_AUTHOR
(
"Chad Talbott"
);
MODULE_LICENSE
(
"GPL"
);
MODULE_LICENSE
(
"GPL"
);
#undef DEBUG_PROMINFO
#define TRACE_PROMINFO
#if defined(DEBUG_PROMINFO)
# define DPRINTK(x...) printk(KERN_DEBUG x)
#else
# define DPRINTK(x...)
#endif
#if defined(TRACE_PROMINFO) && defined(DEBUG_PROMINFO)
# if defined(__GNUC__)
# define TRACE() printk(KERN_DEBUG "%s:%d:%s\n", \
__FILE__, __LINE__, __FUNCTION__)
# else
# define TRACE() printk(KERN_DEBUG "%s:%d\n", __LINE__, __FILE__)
# endif
#else
# define TRACE()
#endif
/* Architected IA64 firmware space */
#define FW_BASE 0x00000000FF000000
#define FW_TOP 0x0000000100000000
/* Sub-regions determined by bits in Node Offset */
#define LB_PROM_SPACE 0x0000000700000000ul
/* Local LB PROM */
/* Offset of PROM banner pointers in SAL A and SAL B */
#define SAL_A_BANNER_OFFSET (1 * 16)
#define SAL_B_BANNER_OFFSET (3 * 16)
#define FIT_SIGNATURE 0x2020205f5449465ful
/* Standard Intel FIT entry types */
/* Standard Intel FIT entry types */
#define FIT_ENTRY_FIT_HEADER 0x00
/* FIT header entry */
#define FIT_ENTRY_FIT_HEADER 0x00
/* FIT header entry */
#define FIT_ENTRY_PAL_B 0x01
/* PAL_B entry */
#define FIT_ENTRY_PAL_B 0x01
/* PAL_B entry */
...
@@ -90,12 +54,6 @@ MODULE_LICENSE("GPL");
...
@@ -90,12 +54,6 @@ MODULE_LICENSE("GPL");
#define FIT_TYPE(q) \
#define FIT_TYPE(q) \
((unsigned) ((q) >> FIT_TYPE_SHIFT) & FIT_TYPE_MASK)
((unsigned) ((q) >> FIT_TYPE_SHIFT) & FIT_TYPE_MASK)
#define FIT_ENTRY(type, maj, min, size) \
((((unsigned long)(maj) & FIT_MAJOR_MASK) << FIT_MAJOR_SHIFT) | \
(((unsigned long)(min) & FIT_MINOR_MASK) << FIT_MINOR_SHIFT) | \
(((unsigned long)(type) & FIT_TYPE_MASK) << FIT_TYPE_SHIFT) | \
(size))
struct
fit_type_map_t
{
struct
fit_type_map_t
{
unsigned
char
type
;
unsigned
char
type
;
const
char
*
name
;
const
char
*
name
;
...
@@ -134,6 +92,39 @@ fit_type_name(unsigned char type)
...
@@ -134,6 +92,39 @@ fit_type_name(unsigned char type)
return
"Unknown type"
;
return
"Unknown type"
;
}
}
/* ============ BEGIN temp til old PROMs are no longer supported =============
*
* The OS should not make direct access to the PROM flash memory. Access to
* this region must be serialized with a PROM lock. If SAL on one cpu is
* updating the FLASH error log at the same time another cpu is accessing the
* PROM, data corruption will occur.
*
* To solve the problem, all flash PROM access has been moved to SAL. Because
* not all systems will have instant PROM updates, we need to support a new OS
* running on a system with old PROMs.
*
* This code should be deleted after 1 OS/PROM release has occurred & the OS
* no longer supports downrev PROMs. (PROM support should be in the 3.50
* PROMs).
*/
#define SUPPORT_OLD_PROMS
#ifdef SUPPORT_OLD_PROMS
#define FIT_SIGNATURE 0x2020205f5449465ful
/* Sub-regions determined by bits in Node Offset */
#define LB_PROM_SPACE 0x0000000700000000ul
/* Local LB PROM */
/* Offset of PROM banner pointers in SAL A and SAL B */
#define SAL_A_BANNER_OFFSET (1 * 16)
#define SAL_B_BANNER_OFFSET (3 * 16)
/* Architected IA64 firmware space */
#define FW_BASE 0x00000000FF000000
#define FW_TOP 0x0000000100000000
static
unsigned
long
static
unsigned
long
convert_fw_addr
(
nasid_t
nasid
,
unsigned
long
addr
)
convert_fw_addr
(
nasid_t
nasid
,
unsigned
long
addr
)
{
{
...
@@ -154,32 +145,95 @@ valid_fw_addr(unsigned long addr)
...
@@ -154,32 +145,95 @@ valid_fw_addr(unsigned long addr)
return
(
addr
>=
FW_BASE
&&
addr
<
FW_TOP
);
return
(
addr
>=
FW_BASE
&&
addr
<
FW_TOP
);
}
}
/* These two routines read the FIT table directly from the FLASH PROM
static
unsigned
long
*
* on a specific node. The PROM can only be accessed using aligned 64
lookup_fit
(
int
nasid
)
* bit reads, so we do that and then shift and mask the result to get
{
* at each field.
unsigned
long
*
fitp
;
unsigned
long
fit_paddr
;
unsigned
long
*
fit_vaddr
;
fitp
=
(
void
*
)
GLOBAL_MMR_ADDR
(
nasid
,
LB_PROM_SPACE
-
32
);
fit_paddr
=
readq
(
fitp
);
fit_vaddr
=
(
unsigned
long
*
)
convert_fw_addr
(
nasid
,
fit_paddr
);
return
fit_vaddr
;
}
#endif
/* SUPPORT_OLD_PROMS */
/* ============ END temp til old PROMs are no longer supported ============= */
static
int
get_fit_entry
(
unsigned
long
nasid
,
int
index
,
unsigned
long
*
fentry
,
char
*
banner
,
int
banlen
)
{
int
ret
;
ret
=
ia64_sn_get_fit_compt
(
nasid
,
index
,
fentry
,
banner
,
banlen
);
#ifdef SUPPORT_OLD_PROMS
/* The following is hack is temporary until PROMs are updated */
if
(
ret
==
SALRET_NOT_IMPLEMENTED
)
{
unsigned
long
*
fitadr
=
lookup_fit
(
nasid
);
int
nentries
;
if
(
readq
(
fitadr
)
!=
FIT_SIGNATURE
)
{
printk
(
KERN_WARNING
"Unrecognized FIT signature"
);
return
-
2
;
}
nentries
=
(
unsigned
int
)
(
readq
(
fitadr
+
1
)
&
0xffffff
);
if
(
index
>=
nentries
)
return
-
2
;
fentry
[
0
]
=
readq
(
fitadr
+
2
*
index
);
fentry
[
1
]
=
readq
(
fitadr
+
2
*
index
+
1
);
ret
=
0
;
if
(
banner
&&
FIT_TYPE
(
fentry
[
1
])
==
FIT_ENTRY_SAL_A
)
{
unsigned
long
i
,
qw
,
*
bwp
,
*
qwp
;
banner
[
0
]
=
'\0'
;
qw
=
fentry
[
0
];
/* Address of SAL A */
if
(
!
valid_fw_addr
(
qw
))
return
0
;
qw
+=
SAL_A_BANNER_OFFSET
;
qw
=
convert_fw_addr
(
nasid
,
qw
);
qw
=
readq
(
qw
);
/* Address of banner */
if
(
!
valid_fw_addr
(
qw
))
return
0
;
qw
=
convert_fw_addr
(
nasid
,
qw
);
qwp
=
(
unsigned
long
*
)
qw
;
bwp
=
(
unsigned
long
*
)
banner
;
for
(
i
=
0
;
i
<
banlen
/
8
;
i
++
)
bwp
[
i
]
=
qwp
[
i
];
}
}
#endif
/* SUPPORT_OLD_PROMS */
return
ret
;
}
/*
* These two routines display the FIT table for each node.
*/
*/
static
int
static
int
dump_fit_entry
(
char
*
page
,
unsigned
long
*
fentry
)
dump_fit_entry
(
char
*
page
,
unsigned
long
*
fentry
)
{
{
unsigned
long
q1
,
q2
;
unsigned
type
;
unsigned
type
;
TRACE
();
type
=
FIT_TYPE
(
fentry
[
1
]);
q1
=
readq
(
fentry
);
q2
=
readq
(
fentry
+
1
);
type
=
FIT_TYPE
(
q2
);
return
sprintf
(
page
,
"%02x %-25s %x.%02x %016lx %u
\n
"
,
return
sprintf
(
page
,
"%02x %-25s %x.%02x %016lx %u
\n
"
,
type
,
type
,
fit_type_name
(
type
),
fit_type_name
(
type
),
FIT_MAJOR
(
q2
),
FIT_MINOR
(
q2
),
FIT_MAJOR
(
fentry
[
1
]),
FIT_MINOR
(
fentry
[
1
]
),
q1
,
fentry
[
0
]
,
/* mult by sixteen to get size in bytes */
/* mult by sixteen to get size in bytes */
(
unsigned
)
q2
*
16
);
(
unsigned
)
(
fentry
[
1
]
&
0xffffff
)
*
16
);
}
}
/* We assume that the fit table will be small enough that we can print
/*
* We assume that the fit table will be small enough that we can print
* the whole thing into one page. (This is true for our default 16kB
* the whole thing into one page. (This is true for our default 16kB
* pages -- each entry is about 60 chars wide when printed.) I read
* pages -- each entry is about 60 chars wide when printed.) I read
* somewhere that the maximum size of the FIT is 128 entries, so we're
* somewhere that the maximum size of the FIT is 128 entries, so we're
...
@@ -187,77 +241,46 @@ dump_fit_entry(char *page, unsigned long *fentry)
...
@@ -187,77 +241,46 @@ dump_fit_entry(char *page, unsigned long *fentry)
* anyway).
* anyway).
*/
*/
static
int
static
int
dump_fit
(
char
*
page
,
unsigned
long
*
fit
)
dump_fit
(
char
*
page
,
unsigned
long
nasid
)
{
{
unsigned
long
qw
;
unsigned
long
fentry
[
2
];
int
nentries
;
int
index
;
int
fentry
;
char
*
p
;
char
*
p
;
TRACE
();
DPRINTK
(
"dumping fit from %p
\n
"
,
(
void
*
)
fit
);
qw
=
readq
(
fit
);
DPRINTK
(
"FIT signature: %016lx (%.8s)
\n
"
,
qw
,
(
char
*
)
&
qw
);
if
(
qw
!=
FIT_SIGNATURE
)
printk
(
KERN_WARNING
"Unrecognized FIT signature"
);
qw
=
readq
(
fit
+
1
);
nentries
=
(
unsigned
)
qw
;
DPRINTK
(
"number of fit entries: %u
\n
"
,
nentries
);
/* check that we won't overflow the page -- see comment above */
BUG_ON
(
nentries
*
60
>
PAGE_SIZE
);
p
=
page
;
p
=
page
;
for
(
fentry
=
0
;
fentry
<
nentries
;
fentry
++
)
for
(
index
=
0
;;
index
++
)
{
/* each FIT entry is two 64 bit words */
BUG_ON
(
index
*
60
>
PAGE_SIZE
);
p
+=
dump_fit_entry
(
p
,
fit
+
2
*
fentry
);
if
(
get_fit_entry
(
nasid
,
index
,
fentry
,
NULL
,
0
))
break
;
p
+=
dump_fit_entry
(
p
,
fentry
);
}
return
p
-
page
;
return
p
-
page
;
}
}
static
int
static
int
dump_version
(
char
*
page
,
unsigned
long
*
fit
)
dump_version
(
char
*
page
,
unsigned
long
nasid
)
{
{
int
nentries
;
unsigned
long
fentry
[
2
]
;
int
fentry
;
char
banner
[
128
]
;
unsigned
long
qw
=
0
;
int
index
;
int
len
;
int
len
;
nasid_t
nasid
=
NASID_GET
(
fit
);
TRACE
();
nentries
=
(
unsigned
)
readq
(
fit
+
1
);
for
(
index
=
0
;
;
index
++
)
{
BUG_ON
(
nentries
*
60
>
PAGE_SIZE
);
if
(
get_fit_entry
(
nasid
,
index
,
fentry
,
banner
,
sizeof
(
banner
)))
for
(
fentry
=
0
;
fentry
<
nentries
;
fentry
++
)
{
return
0
;
qw
=
readq
(
fit
+
2
*
fentry
+
1
);
if
(
FIT_TYPE
(
fentry
[
1
])
==
FIT_ENTRY_SAL_A
)
if
(
FIT_TYPE
(
qw
)
==
FIT_ENTRY_SAL_A
)
break
;
break
;
}
}
if
(
fentry
>=
nentries
)
return
0
;
len
=
sprintf
(
page
,
"%x.%02x
\n
"
,
FIT_MAJOR
(
qw
),
FIT_MINOR
(
qw
));
len
=
sprintf
(
page
,
"%x.%02x
\n
"
,
FIT_MAJOR
(
fentry
[
1
]),
FIT_MINOR
(
fentry
[
1
]));
page
+=
len
;
page
+=
len
;
qw
=
readq
(
fit
+
2
*
fentry
);
/* Address of SAL A */
if
(
banner
[
0
])
DPRINTK
(
"SAL A at %p
\n
"
,
(
void
*
)
qw
);
len
+=
snprintf
(
page
,
PAGE_SIZE
-
len
,
"%s
\n
"
,
banner
);
if
(
!
valid_fw_addr
(
qw
))
return
len
;
qw
+=
SAL_A_BANNER_OFFSET
;
qw
=
convert_fw_addr
(
nasid
,
qw
);
DPRINTK
(
"Banner ptr at %p
\n
"
,
(
void
*
)
qw
);
qw
=
readq
(
qw
);
/* Address of banner */
if
(
!
valid_fw_addr
(
qw
))
return
len
;
qw
=
convert_fw_addr
(
nasid
,
qw
);
DPRINTK
(
"Banner at %p
\n
"
,
(
void
*
)
qw
);
len
+=
snprintf
(
page
,
PAGE_SIZE
-
len
,
"%s
\n
"
,
(
char
*
)
qw
);
return
len
;
return
len
;
}
}
...
@@ -280,8 +303,8 @@ read_version_entry(char *page, char **start, off_t off, int count, int *eof,
...
@@ -280,8 +303,8 @@ read_version_entry(char *page, char **start, off_t off, int count, int *eof,
{
{
int
len
=
0
;
int
len
=
0
;
/* data holds the
pointer to this node's FIT
*/
/* data holds the
NASID of the node
*/
len
=
dump_version
(
page
,
(
unsigned
long
*
)
data
);
len
=
dump_version
(
page
,
(
unsigned
long
)
data
);
len
=
proc_calc_metrics
(
page
,
start
,
off
,
count
,
eof
,
len
);
len
=
proc_calc_metrics
(
page
,
start
,
off
,
count
,
eof
,
len
);
return
len
;
return
len
;
}
}
...
@@ -292,52 +315,13 @@ read_fit_entry(char *page, char **start, off_t off, int count, int *eof,
...
@@ -292,52 +315,13 @@ read_fit_entry(char *page, char **start, off_t off, int count, int *eof,
{
{
int
len
=
0
;
int
len
=
0
;
/* data holds the
pointer to this node's FIT
*/
/* data holds the
NASID of the node
*/
len
=
dump_fit
(
page
,
(
unsigned
long
*
)
data
);
len
=
dump_fit
(
page
,
(
unsigned
long
)
data
);
len
=
proc_calc_metrics
(
page
,
start
,
off
,
count
,
eof
,
len
);
len
=
proc_calc_metrics
(
page
,
start
,
off
,
count
,
eof
,
len
);
return
len
;
return
len
;
}
}
/* this is a fake FIT that's used on the medusa simulator which
* doesn't usually run a complete PROM.
*/
#ifdef CONFIG_IA64_SGI_SN_SIM
static
unsigned
long
fakefit
[]
=
{
/* this is all we need to satisfy the code below */
FIT_SIGNATURE
,
FIT_ENTRY
(
FIT_ENTRY_FIT_HEADER
,
0x02
,
0x60
,
2
),
/* dump something arbitrary for
* /proc/sgi_prominfo/nodeX/version */
0xbadbeef00fa3ef17ul
,
FIT_ENTRY
(
FIT_ENTRY_SAL_A
,
0
,
0x99
,
0x100
)
};
#endif
static
unsigned
long
*
lookup_fit
(
int
nasid
)
{
unsigned
long
*
fitp
;
unsigned
long
fit_paddr
;
unsigned
long
*
fit_vaddr
;
#ifdef CONFIG_IA64_SGI_SN_SIM
if
(
IS_RUNNING_ON_SIMULATOR
())
return
fakefit
;
#endif
fitp
=
(
void
*
)
GLOBAL_MMR_ADDR
(
nasid
,
LB_PROM_SPACE
-
32
);
DPRINTK
(
"pointer to fit at %p
\n
"
,
(
void
*
)
fitp
);
fit_paddr
=
readq
(
fitp
);
DPRINTK
(
"fit pointer contains %lx
\n
"
,
fit_paddr
);
BUG_ON
(
!
valid_fw_addr
(
fit_paddr
));
fit_vaddr
=
(
void
*
)
convert_fw_addr
(
nasid
,
fit_paddr
);
DPRINTK
(
"fit at %p
\n
"
,
(
void
*
)
fit_vaddr
);
return
fit_vaddr
;
}
/* module entry points */
/* module entry points */
int
__init
prominfo_init
(
void
);
int
__init
prominfo_init
(
void
);
void
__exit
prominfo_exit
(
void
);
void
__exit
prominfo_exit
(
void
);
...
@@ -356,17 +340,12 @@ prominfo_init(void)
...
@@ -356,17 +340,12 @@ prominfo_init(void)
struct
proc_dir_entry
**
entp
;
struct
proc_dir_entry
**
entp
;
struct
proc_dir_entry
*
p
;
struct
proc_dir_entry
*
p
;
cnodeid_t
cnodeid
;
cnodeid_t
cnodeid
;
nasid_t
nasid
;
unsigned
long
nasid
;
char
name
[
NODE_NAME_LEN
];
char
name
[
NODE_NAME_LEN
];
if
(
!
ia64_platform_is
(
"sn2"
))
if
(
!
ia64_platform_is
(
"sn2"
))
return
0
;
return
0
;
TRACE
();
DPRINTK
(
"running on cpu %d
\n
"
,
smp_processor_id
());
DPRINTK
(
"numnodes %d
\n
"
,
numnodes
);
proc_entries
=
kmalloc
(
numnodes
*
sizeof
(
struct
proc_dir_entry
*
),
proc_entries
=
kmalloc
(
numnodes
*
sizeof
(
struct
proc_dir_entry
*
),
GFP_KERNEL
);
GFP_KERNEL
);
...
@@ -380,12 +359,12 @@ prominfo_init(void)
...
@@ -380,12 +359,12 @@ prominfo_init(void)
nasid
=
cnodeid_to_nasid
(
cnodeid
);
nasid
=
cnodeid_to_nasid
(
cnodeid
);
p
=
create_proc_read_entry
(
p
=
create_proc_read_entry
(
"fit"
,
0
,
*
entp
,
read_fit_entry
,
"fit"
,
0
,
*
entp
,
read_fit_entry
,
lookup_fit
(
nasid
)
);
(
void
*
)
nasid
);
if
(
p
)
if
(
p
)
p
->
owner
=
THIS_MODULE
;
p
->
owner
=
THIS_MODULE
;
p
=
create_proc_read_entry
(
p
=
create_proc_read_entry
(
"version"
,
0
,
*
entp
,
read_version_entry
,
"version"
,
0
,
*
entp
,
read_version_entry
,
lookup_fit
(
nasid
)
);
(
void
*
)
nasid
);
if
(
p
)
if
(
p
)
p
->
owner
=
THIS_MODULE
;
p
->
owner
=
THIS_MODULE
;
}
}
...
@@ -400,8 +379,6 @@ prominfo_exit(void)
...
@@ -400,8 +379,6 @@ prominfo_exit(void)
unsigned
cnodeid
;
unsigned
cnodeid
;
char
name
[
NODE_NAME_LEN
];
char
name
[
NODE_NAME_LEN
];
TRACE
();
for
(
cnodeid
=
0
,
entp
=
proc_entries
;
for
(
cnodeid
=
0
,
entp
=
proc_entries
;
cnodeid
<
numnodes
;
cnodeid
<
numnodes
;
cnodeid
++
,
entp
++
)
{
cnodeid
++
,
entp
++
)
{
...
...
drivers/isdn/capi/capi.c
View file @
663c5675
...
@@ -646,7 +646,7 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
...
@@ -646,7 +646,7 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
kfree_skb
(
skb
);
kfree_skb
(
skb
);
(
void
)
capiminor_del_ack
(
mp
,
datahandle
);
(
void
)
capiminor_del_ack
(
mp
,
datahandle
);
if
(
mp
->
tty
)
if
(
mp
->
tty
)
tty_wakeup
(
tty
);
tty_wakeup
(
mp
->
tty
);
(
void
)
handle_minor_send
(
mp
);
(
void
)
handle_minor_send
(
mp
);
}
else
{
}
else
{
...
...
drivers/isdn/i4l/isdn_tty.c
View file @
663c5675
...
@@ -2673,7 +2673,7 @@ isdn_tty_modem_result(int code, modem_info * info)
...
@@ -2673,7 +2673,7 @@ isdn_tty_modem_result(int code, modem_info * info)
if
((
info
->
flags
&
ISDN_ASYNC_CLOSING
)
||
(
!
info
->
tty
))
{
if
((
info
->
flags
&
ISDN_ASYNC_CLOSING
)
||
(
!
info
->
tty
))
{
return
;
return
;
}
}
tty_ldisc_flush
(
tty
);
tty_ldisc_flush
(
info
->
tty
);
if
((
info
->
flags
&
ISDN_ASYNC_CHECK_CD
)
&&
if
((
info
->
flags
&
ISDN_ASYNC_CHECK_CD
)
&&
(
!
((
info
->
flags
&
ISDN_ASYNC_CALLOUT_ACTIVE
)
&&
(
!
((
info
->
flags
&
ISDN_ASYNC_CALLOUT_ACTIVE
)
&&
(
info
->
flags
&
ISDN_ASYNC_CALLOUT_NOHUP
))))
{
(
info
->
flags
&
ISDN_ASYNC_CALLOUT_NOHUP
))))
{
...
...
drivers/net/natsemi.c
View file @
663c5675
...
@@ -719,7 +719,7 @@ struct netdev_private {
...
@@ -719,7 +719,7 @@ struct netdev_private {
};
};
static
void
move_int_phy
(
struct
net_device
*
dev
,
int
addr
);
static
void
move_int_phy
(
struct
net_device
*
dev
,
int
addr
);
static
int
eeprom_read
(
long
ioaddr
,
int
location
);
static
int
eeprom_read
(
void
__iomem
*
ioaddr
,
int
location
);
static
int
mdio_read
(
struct
net_device
*
dev
,
int
reg
);
static
int
mdio_read
(
struct
net_device
*
dev
,
int
reg
);
static
void
mdio_write
(
struct
net_device
*
dev
,
int
reg
,
u16
data
);
static
void
mdio_write
(
struct
net_device
*
dev
,
int
reg
,
u16
data
);
static
void
init_phy_fixup
(
struct
net_device
*
dev
);
static
void
init_phy_fixup
(
struct
net_device
*
dev
);
...
@@ -769,9 +769,15 @@ static int netdev_close(struct net_device *dev);
...
@@ -769,9 +769,15 @@ static int netdev_close(struct net_device *dev);
static
int
netdev_get_regs
(
struct
net_device
*
dev
,
u8
*
buf
);
static
int
netdev_get_regs
(
struct
net_device
*
dev
,
u8
*
buf
);
static
int
netdev_get_eeprom
(
struct
net_device
*
dev
,
u8
*
buf
);
static
int
netdev_get_eeprom
(
struct
net_device
*
dev
,
u8
*
buf
);
static
inline
void
__iomem
*
ns_ioaddr
(
struct
net_device
*
dev
)
{
return
(
void
__iomem
*
)
dev
->
base_addr
;
}
static
void
move_int_phy
(
struct
net_device
*
dev
,
int
addr
)
static
void
move_int_phy
(
struct
net_device
*
dev
,
int
addr
)
{
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
int
target
=
31
;
int
target
=
31
;
/*
/*
...
@@ -788,8 +794,8 @@ static void move_int_phy(struct net_device *dev, int addr)
...
@@ -788,8 +794,8 @@ static void move_int_phy(struct net_device *dev, int addr)
target
--
;
target
--
;
if
(
target
==
np
->
phy_addr_external
)
if
(
target
==
np
->
phy_addr_external
)
target
--
;
target
--
;
writew
(
target
,
dev
->
base_
addr
+
PhyCtrl
);
writew
(
target
,
io
addr
+
PhyCtrl
);
readw
(
dev
->
base_
addr
+
PhyCtrl
);
readw
(
io
addr
+
PhyCtrl
);
udelay
(
1
);
udelay
(
1
);
}
}
...
@@ -800,7 +806,8 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
...
@@ -800,7 +806,8 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
struct
netdev_private
*
np
;
struct
netdev_private
*
np
;
int
i
,
option
,
irq
,
chip_idx
=
ent
->
driver_data
;
int
i
,
option
,
irq
,
chip_idx
=
ent
->
driver_data
;
static
int
find_cnt
=
-
1
;
static
int
find_cnt
=
-
1
;
unsigned
long
ioaddr
,
iosize
;
unsigned
long
iostart
,
iosize
;
void
__iomem
*
ioaddr
;
const
int
pcibar
=
1
;
/* PCI base address register */
const
int
pcibar
=
1
;
/* PCI base address register */
int
prev_eedata
;
int
prev_eedata
;
u32
tmp
;
u32
tmp
;
...
@@ -827,7 +834,7 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
...
@@ -827,7 +834,7 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
}
}
find_cnt
++
;
find_cnt
++
;
io
addr
=
pci_resource_start
(
pdev
,
pcibar
);
io
start
=
pci_resource_start
(
pdev
,
pcibar
);
iosize
=
pci_resource_len
(
pdev
,
pcibar
);
iosize
=
pci_resource_len
(
pdev
,
pcibar
);
irq
=
pdev
->
irq
;
irq
=
pdev
->
irq
;
...
@@ -844,7 +851,7 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
...
@@ -844,7 +851,7 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
if
(
i
)
if
(
i
)
goto
err_pci_request_regions
;
goto
err_pci_request_regions
;
ioaddr
=
(
unsigned
long
)
ioremap
(
ioaddr
,
iosize
);
ioaddr
=
ioremap
(
iostart
,
iosize
);
if
(
!
ioaddr
)
{
if
(
!
ioaddr
)
{
i
=
-
ENOMEM
;
i
=
-
ENOMEM
;
goto
err_ioremap
;
goto
err_ioremap
;
...
@@ -859,7 +866,7 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
...
@@ -859,7 +866,7 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
prev_eedata
=
eedata
;
prev_eedata
=
eedata
;
}
}
dev
->
base_addr
=
ioaddr
;
dev
->
base_addr
=
(
unsigned
long
__force
)
ioaddr
;
dev
->
irq
=
irq
;
dev
->
irq
=
irq
;
np
=
netdev_priv
(
dev
);
np
=
netdev_priv
(
dev
);
...
@@ -879,7 +886,7 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
...
@@ -879,7 +886,7 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
* The address would be used to access a phy over the mii bus, but
* The address would be used to access a phy over the mii bus, but
* the internal phy is accessed through mapped registers.
* the internal phy is accessed through mapped registers.
*/
*/
if
(
readl
(
dev
->
base_
addr
+
ChipConfig
)
&
CfgExtPhy
)
if
(
readl
(
io
addr
+
ChipConfig
)
&
CfgExtPhy
)
dev
->
if_port
=
PORT_MII
;
dev
->
if_port
=
PORT_MII
;
else
else
dev
->
if_port
=
PORT_TP
;
dev
->
if_port
=
PORT_TP
;
...
@@ -971,7 +978,7 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
...
@@ -971,7 +978,7 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
if
(
netif_msg_drv
(
np
))
{
if
(
netif_msg_drv
(
np
))
{
printk
(
KERN_INFO
"natsemi %s: %s at %#08lx (%s), "
,
printk
(
KERN_INFO
"natsemi %s: %s at %#08lx (%s), "
,
dev
->
name
,
natsemi_pci_info
[
chip_idx
].
name
,
io
addr
,
dev
->
name
,
natsemi_pci_info
[
chip_idx
].
name
,
io
start
,
pci_name
(
np
->
pci_dev
));
pci_name
(
np
->
pci_dev
));
for
(
i
=
0
;
i
<
ETH_ALEN
-
1
;
i
++
)
for
(
i
=
0
;
i
<
ETH_ALEN
-
1
;
i
++
)
printk
(
"%02x:"
,
dev
->
dev_addr
[
i
]);
printk
(
"%02x:"
,
dev
->
dev_addr
[
i
]);
...
@@ -984,7 +991,7 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
...
@@ -984,7 +991,7 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
return
0
;
return
0
;
err_register_netdev:
err_register_netdev:
iounmap
((
void
*
)
dev
->
base_
addr
);
iounmap
(
io
addr
);
err_ioremap:
err_ioremap:
pci_release_regions
(
pdev
);
pci_release_regions
(
pdev
);
...
@@ -1016,12 +1023,13 @@ enum EEPROM_Cmds {
...
@@ -1016,12 +1023,13 @@ enum EEPROM_Cmds {
EE_WriteCmd
=
(
5
<<
6
),
EE_ReadCmd
=
(
6
<<
6
),
EE_EraseCmd
=
(
7
<<
6
),
EE_WriteCmd
=
(
5
<<
6
),
EE_ReadCmd
=
(
6
<<
6
),
EE_EraseCmd
=
(
7
<<
6
),
};
};
static
int
eeprom_read
(
long
addr
,
int
location
)
static
int
eeprom_read
(
void
__iomem
*
addr
,
int
location
)
{
{
int
i
;
int
i
;
int
retval
=
0
;
int
retval
=
0
;
long
ee_addr
=
addr
+
EECtrl
;
void
__iomem
*
ee_addr
=
addr
+
EECtrl
;
int
read_cmd
=
location
|
EE_ReadCmd
;
int
read_cmd
=
location
|
EE_ReadCmd
;
writel
(
EE_Write0
,
ee_addr
);
writel
(
EE_Write0
,
ee_addr
);
/* Shift the read command bits out. */
/* Shift the read command bits out. */
...
@@ -1058,33 +1066,35 @@ static int eeprom_read(long addr, int location)
...
@@ -1058,33 +1066,35 @@ static int eeprom_read(long addr, int location)
/* clock transitions >= 20ns (25MHz)
/* clock transitions >= 20ns (25MHz)
* One readl should be good to PCI @ 100MHz
* One readl should be good to PCI @ 100MHz
*/
*/
#define mii_delay(
dev) readl(dev->base_
addr + EECtrl)
#define mii_delay(
ioaddr) readl(io
addr + EECtrl)
static
int
mii_getbit
(
struct
net_device
*
dev
)
static
int
mii_getbit
(
struct
net_device
*
dev
)
{
{
int
data
;
int
data
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
writel
(
MII_ShiftClk
,
dev
->
base_
addr
+
EECtrl
);
writel
(
MII_ShiftClk
,
io
addr
+
EECtrl
);
data
=
readl
(
dev
->
base_
addr
+
EECtrl
);
data
=
readl
(
io
addr
+
EECtrl
);
writel
(
0
,
dev
->
base_
addr
+
EECtrl
);
writel
(
0
,
io
addr
+
EECtrl
);
mii_delay
(
dev
);
mii_delay
(
ioaddr
);
return
(
data
&
MII_Data
)
?
1
:
0
;
return
(
data
&
MII_Data
)
?
1
:
0
;
}
}
static
void
mii_send_bits
(
struct
net_device
*
dev
,
u32
data
,
int
len
)
static
void
mii_send_bits
(
struct
net_device
*
dev
,
u32
data
,
int
len
)
{
{
u32
i
;
u32
i
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
for
(
i
=
(
1
<<
(
len
-
1
));
i
;
i
>>=
1
)
for
(
i
=
(
1
<<
(
len
-
1
));
i
;
i
>>=
1
)
{
{
u32
mdio_val
=
MII_Write
|
((
data
&
i
)
?
MII_Data
:
0
);
u32
mdio_val
=
MII_Write
|
((
data
&
i
)
?
MII_Data
:
0
);
writel
(
mdio_val
,
dev
->
base_
addr
+
EECtrl
);
writel
(
mdio_val
,
io
addr
+
EECtrl
);
mii_delay
(
dev
);
mii_delay
(
ioaddr
);
writel
(
mdio_val
|
MII_ShiftClk
,
dev
->
base_
addr
+
EECtrl
);
writel
(
mdio_val
|
MII_ShiftClk
,
io
addr
+
EECtrl
);
mii_delay
(
dev
);
mii_delay
(
ioaddr
);
}
}
writel
(
0
,
dev
->
base_
addr
+
EECtrl
);
writel
(
0
,
io
addr
+
EECtrl
);
mii_delay
(
dev
);
mii_delay
(
ioaddr
);
}
}
static
int
miiport_read
(
struct
net_device
*
dev
,
int
phy_id
,
int
reg
)
static
int
miiport_read
(
struct
net_device
*
dev
,
int
phy_id
,
int
reg
)
...
@@ -1129,13 +1139,14 @@ static void miiport_write(struct net_device *dev, int phy_id, int reg, u16 data)
...
@@ -1129,13 +1139,14 @@ static void miiport_write(struct net_device *dev, int phy_id, int reg, u16 data)
static
int
mdio_read
(
struct
net_device
*
dev
,
int
reg
)
static
int
mdio_read
(
struct
net_device
*
dev
,
int
reg
)
{
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
/* The 83815 series has two ports:
/* The 83815 series has two ports:
* - an internal transceiver
* - an internal transceiver
* - an external mii bus
* - an external mii bus
*/
*/
if
(
dev
->
if_port
==
PORT_TP
)
if
(
dev
->
if_port
==
PORT_TP
)
return
readw
(
dev
->
base_
addr
+
BasicControl
+
(
reg
<<
2
));
return
readw
(
io
addr
+
BasicControl
+
(
reg
<<
2
));
else
else
return
miiport_read
(
dev
,
np
->
phy_addr_external
,
reg
);
return
miiport_read
(
dev
,
np
->
phy_addr_external
,
reg
);
}
}
...
@@ -1143,10 +1154,11 @@ static int mdio_read(struct net_device *dev, int reg)
...
@@ -1143,10 +1154,11 @@ static int mdio_read(struct net_device *dev, int reg)
static
void
mdio_write
(
struct
net_device
*
dev
,
int
reg
,
u16
data
)
static
void
mdio_write
(
struct
net_device
*
dev
,
int
reg
,
u16
data
)
{
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
/* The 83815 series has an internal transceiver; handle separately */
/* The 83815 series has an internal transceiver; handle separately */
if
(
dev
->
if_port
==
PORT_TP
)
if
(
dev
->
if_port
==
PORT_TP
)
writew
(
data
,
dev
->
base_
addr
+
BasicControl
+
(
reg
<<
2
));
writew
(
data
,
io
addr
+
BasicControl
+
(
reg
<<
2
));
else
else
miiport_write
(
dev
,
np
->
phy_addr_external
,
reg
,
data
);
miiport_write
(
dev
,
np
->
phy_addr_external
,
reg
,
data
);
}
}
...
@@ -1154,7 +1166,7 @@ static void mdio_write(struct net_device *dev, int reg, u16 data)
...
@@ -1154,7 +1166,7 @@ static void mdio_write(struct net_device *dev, int reg, u16 data)
static
void
init_phy_fixup
(
struct
net_device
*
dev
)
static
void
init_phy_fixup
(
struct
net_device
*
dev
)
{
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
long
ioaddr
=
dev
->
base_addr
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
)
;
int
i
;
int
i
;
u32
cfg
;
u32
cfg
;
u16
tmp
;
u16
tmp
;
...
@@ -1186,7 +1198,7 @@ static void init_phy_fixup(struct net_device *dev)
...
@@ -1186,7 +1198,7 @@ static void init_phy_fixup(struct net_device *dev)
*/
*/
}
}
mdio_write
(
dev
,
MII_BMCR
,
tmp
);
mdio_write
(
dev
,
MII_BMCR
,
tmp
);
readl
(
dev
->
base_
addr
+
ChipConfig
);
readl
(
io
addr
+
ChipConfig
);
udelay
(
1
);
udelay
(
1
);
/* find out what phy this is */
/* find out what phy this is */
...
@@ -1208,7 +1220,7 @@ static void init_phy_fixup(struct net_device *dev)
...
@@ -1208,7 +1220,7 @@ static void init_phy_fixup(struct net_device *dev)
default:
default:
break
;
break
;
}
}
cfg
=
readl
(
dev
->
base_
addr
+
ChipConfig
);
cfg
=
readl
(
io
addr
+
ChipConfig
);
if
(
cfg
&
CfgExtPhy
)
if
(
cfg
&
CfgExtPhy
)
return
;
return
;
...
@@ -1266,9 +1278,10 @@ static void init_phy_fixup(struct net_device *dev)
...
@@ -1266,9 +1278,10 @@ static void init_phy_fixup(struct net_device *dev)
static
int
switch_port_external
(
struct
net_device
*
dev
)
static
int
switch_port_external
(
struct
net_device
*
dev
)
{
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
u32
cfg
;
u32
cfg
;
cfg
=
readl
(
dev
->
base_
addr
+
ChipConfig
);
cfg
=
readl
(
io
addr
+
ChipConfig
);
if
(
cfg
&
CfgExtPhy
)
if
(
cfg
&
CfgExtPhy
)
return
0
;
return
0
;
...
@@ -1278,8 +1291,8 @@ static int switch_port_external(struct net_device *dev)
...
@@ -1278,8 +1291,8 @@ static int switch_port_external(struct net_device *dev)
}
}
/* 1) switch back to external phy */
/* 1) switch back to external phy */
writel
(
cfg
|
(
CfgExtPhy
|
CfgPhyDis
),
dev
->
base_
addr
+
ChipConfig
);
writel
(
cfg
|
(
CfgExtPhy
|
CfgPhyDis
),
io
addr
+
ChipConfig
);
readl
(
dev
->
base_
addr
+
ChipConfig
);
readl
(
io
addr
+
ChipConfig
);
udelay
(
1
);
udelay
(
1
);
/* 2) reset the external phy: */
/* 2) reset the external phy: */
...
@@ -1298,11 +1311,12 @@ static int switch_port_external(struct net_device *dev)
...
@@ -1298,11 +1311,12 @@ static int switch_port_external(struct net_device *dev)
static
int
switch_port_internal
(
struct
net_device
*
dev
)
static
int
switch_port_internal
(
struct
net_device
*
dev
)
{
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
int
i
;
int
i
;
u32
cfg
;
u32
cfg
;
u16
bmcr
;
u16
bmcr
;
cfg
=
readl
(
dev
->
base_
addr
+
ChipConfig
);
cfg
=
readl
(
io
addr
+
ChipConfig
);
if
(
!
(
cfg
&
CfgExtPhy
))
if
(
!
(
cfg
&
CfgExtPhy
))
return
0
;
return
0
;
...
@@ -1312,17 +1326,17 @@ static int switch_port_internal(struct net_device *dev)
...
@@ -1312,17 +1326,17 @@ static int switch_port_internal(struct net_device *dev)
}
}
/* 1) switch back to internal phy: */
/* 1) switch back to internal phy: */
cfg
=
cfg
&
~
(
CfgExtPhy
|
CfgPhyDis
);
cfg
=
cfg
&
~
(
CfgExtPhy
|
CfgPhyDis
);
writel
(
cfg
,
dev
->
base_
addr
+
ChipConfig
);
writel
(
cfg
,
io
addr
+
ChipConfig
);
readl
(
dev
->
base_
addr
+
ChipConfig
);
readl
(
io
addr
+
ChipConfig
);
udelay
(
1
);
udelay
(
1
);
/* 2) reset the internal phy: */
/* 2) reset the internal phy: */
bmcr
=
readw
(
dev
->
base_
addr
+
BasicControl
+
(
MII_BMCR
<<
2
));
bmcr
=
readw
(
io
addr
+
BasicControl
+
(
MII_BMCR
<<
2
));
writel
(
bmcr
|
BMCR_RESET
,
dev
->
base_
addr
+
BasicControl
+
(
MII_BMCR
<<
2
));
writel
(
bmcr
|
BMCR_RESET
,
io
addr
+
BasicControl
+
(
MII_BMCR
<<
2
));
readl
(
dev
->
base_
addr
+
ChipConfig
);
readl
(
io
addr
+
ChipConfig
);
udelay
(
10
);
udelay
(
10
);
for
(
i
=
0
;
i
<
NATSEMI_HW_TIMEOUT
;
i
++
)
{
for
(
i
=
0
;
i
<
NATSEMI_HW_TIMEOUT
;
i
++
)
{
bmcr
=
readw
(
dev
->
base_
addr
+
BasicControl
+
(
MII_BMCR
<<
2
));
bmcr
=
readw
(
io
addr
+
BasicControl
+
(
MII_BMCR
<<
2
));
if
(
!
(
bmcr
&
BMCR_RESET
))
if
(
!
(
bmcr
&
BMCR_RESET
))
break
;
break
;
udelay
(
10
);
udelay
(
10
);
...
@@ -1398,6 +1412,7 @@ static void natsemi_reset(struct net_device *dev)
...
@@ -1398,6 +1412,7 @@ static void natsemi_reset(struct net_device *dev)
u16
pmatch
[
3
];
u16
pmatch
[
3
];
u16
sopass
[
3
];
u16
sopass
[
3
];
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
/*
/*
* Resetting the chip causes some registers to be lost.
* Resetting the chip causes some registers to be lost.
...
@@ -1408,26 +1423,26 @@ static void natsemi_reset(struct net_device *dev)
...
@@ -1408,26 +1423,26 @@ static void natsemi_reset(struct net_device *dev)
*/
*/
/* CFG */
/* CFG */
cfg
=
readl
(
dev
->
base_
addr
+
ChipConfig
)
&
CFG_RESET_SAVE
;
cfg
=
readl
(
io
addr
+
ChipConfig
)
&
CFG_RESET_SAVE
;
/* WCSR */
/* WCSR */
wcsr
=
readl
(
dev
->
base_
addr
+
WOLCmd
)
&
WCSR_RESET_SAVE
;
wcsr
=
readl
(
io
addr
+
WOLCmd
)
&
WCSR_RESET_SAVE
;
/* RFCR */
/* RFCR */
rfcr
=
readl
(
dev
->
base_
addr
+
RxFilterAddr
)
&
RFCR_RESET_SAVE
;
rfcr
=
readl
(
io
addr
+
RxFilterAddr
)
&
RFCR_RESET_SAVE
;
/* PMATCH */
/* PMATCH */
for
(
i
=
0
;
i
<
3
;
i
++
)
{
for
(
i
=
0
;
i
<
3
;
i
++
)
{
writel
(
i
*
2
,
dev
->
base_
addr
+
RxFilterAddr
);
writel
(
i
*
2
,
io
addr
+
RxFilterAddr
);
pmatch
[
i
]
=
readw
(
dev
->
base_
addr
+
RxFilterData
);
pmatch
[
i
]
=
readw
(
io
addr
+
RxFilterData
);
}
}
/* SOPAS */
/* SOPAS */
for
(
i
=
0
;
i
<
3
;
i
++
)
{
for
(
i
=
0
;
i
<
3
;
i
++
)
{
writel
(
0xa
+
(
i
*
2
),
dev
->
base_
addr
+
RxFilterAddr
);
writel
(
0xa
+
(
i
*
2
),
io
addr
+
RxFilterAddr
);
sopass
[
i
]
=
readw
(
dev
->
base_
addr
+
RxFilterData
);
sopass
[
i
]
=
readw
(
io
addr
+
RxFilterData
);
}
}
/* now whack the chip */
/* now whack the chip */
writel
(
ChipReset
,
dev
->
base_
addr
+
ChipCmd
);
writel
(
ChipReset
,
io
addr
+
ChipCmd
);
for
(
i
=
0
;
i
<
NATSEMI_HW_TIMEOUT
;
i
++
)
{
for
(
i
=
0
;
i
<
NATSEMI_HW_TIMEOUT
;
i
++
)
{
if
(
!
(
readl
(
dev
->
base_
addr
+
ChipCmd
)
&
ChipReset
))
if
(
!
(
readl
(
io
addr
+
ChipCmd
)
&
ChipReset
))
break
;
break
;
udelay
(
5
);
udelay
(
5
);
}
}
...
@@ -1440,40 +1455,41 @@ static void natsemi_reset(struct net_device *dev)
...
@@ -1440,40 +1455,41 @@ static void natsemi_reset(struct net_device *dev)
}
}
/* restore CFG */
/* restore CFG */
cfg
|=
readl
(
dev
->
base_
addr
+
ChipConfig
)
&
~
CFG_RESET_SAVE
;
cfg
|=
readl
(
io
addr
+
ChipConfig
)
&
~
CFG_RESET_SAVE
;
/* turn on external phy if it was selected */
/* turn on external phy if it was selected */
if
(
dev
->
if_port
==
PORT_TP
)
if
(
dev
->
if_port
==
PORT_TP
)
cfg
&=
~
(
CfgExtPhy
|
CfgPhyDis
);
cfg
&=
~
(
CfgExtPhy
|
CfgPhyDis
);
else
else
cfg
|=
(
CfgExtPhy
|
CfgPhyDis
);
cfg
|=
(
CfgExtPhy
|
CfgPhyDis
);
writel
(
cfg
,
dev
->
base_
addr
+
ChipConfig
);
writel
(
cfg
,
io
addr
+
ChipConfig
);
/* restore WCSR */
/* restore WCSR */
wcsr
|=
readl
(
dev
->
base_
addr
+
WOLCmd
)
&
~
WCSR_RESET_SAVE
;
wcsr
|=
readl
(
io
addr
+
WOLCmd
)
&
~
WCSR_RESET_SAVE
;
writel
(
wcsr
,
dev
->
base_
addr
+
WOLCmd
);
writel
(
wcsr
,
io
addr
+
WOLCmd
);
/* read RFCR */
/* read RFCR */
rfcr
|=
readl
(
dev
->
base_
addr
+
RxFilterAddr
)
&
~
RFCR_RESET_SAVE
;
rfcr
|=
readl
(
io
addr
+
RxFilterAddr
)
&
~
RFCR_RESET_SAVE
;
/* restore PMATCH */
/* restore PMATCH */
for
(
i
=
0
;
i
<
3
;
i
++
)
{
for
(
i
=
0
;
i
<
3
;
i
++
)
{
writel
(
i
*
2
,
dev
->
base_
addr
+
RxFilterAddr
);
writel
(
i
*
2
,
io
addr
+
RxFilterAddr
);
writew
(
pmatch
[
i
],
dev
->
base_
addr
+
RxFilterData
);
writew
(
pmatch
[
i
],
io
addr
+
RxFilterData
);
}
}
for
(
i
=
0
;
i
<
3
;
i
++
)
{
for
(
i
=
0
;
i
<
3
;
i
++
)
{
writel
(
0xa
+
(
i
*
2
),
dev
->
base_
addr
+
RxFilterAddr
);
writel
(
0xa
+
(
i
*
2
),
io
addr
+
RxFilterAddr
);
writew
(
sopass
[
i
],
dev
->
base_
addr
+
RxFilterData
);
writew
(
sopass
[
i
],
io
addr
+
RxFilterData
);
}
}
/* restore RFCR */
/* restore RFCR */
writel
(
rfcr
,
dev
->
base_
addr
+
RxFilterAddr
);
writel
(
rfcr
,
io
addr
+
RxFilterAddr
);
}
}
static
void
natsemi_reload_eeprom
(
struct
net_device
*
dev
)
static
void
natsemi_reload_eeprom
(
struct
net_device
*
dev
)
{
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
int
i
;
int
i
;
writel
(
EepromReload
,
dev
->
base_
addr
+
PCIBusCfg
);
writel
(
EepromReload
,
io
addr
+
PCIBusCfg
);
for
(
i
=
0
;
i
<
NATSEMI_HW_TIMEOUT
;
i
++
)
{
for
(
i
=
0
;
i
<
NATSEMI_HW_TIMEOUT
;
i
++
)
{
udelay
(
50
);
udelay
(
50
);
if
(
!
(
readl
(
dev
->
base_
addr
+
PCIBusCfg
)
&
EepromReload
))
if
(
!
(
readl
(
io
addr
+
PCIBusCfg
)
&
EepromReload
))
break
;
break
;
}
}
if
(
i
==
NATSEMI_HW_TIMEOUT
)
{
if
(
i
==
NATSEMI_HW_TIMEOUT
)
{
...
@@ -1487,7 +1503,7 @@ static void natsemi_reload_eeprom(struct net_device *dev)
...
@@ -1487,7 +1503,7 @@ static void natsemi_reload_eeprom(struct net_device *dev)
static
void
natsemi_stop_rxtx
(
struct
net_device
*
dev
)
static
void
natsemi_stop_rxtx
(
struct
net_device
*
dev
)
{
{
long
ioaddr
=
dev
->
base_addr
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
)
;
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
int
i
;
int
i
;
...
@@ -1509,7 +1525,7 @@ static void natsemi_stop_rxtx(struct net_device *dev)
...
@@ -1509,7 +1525,7 @@ static void natsemi_stop_rxtx(struct net_device *dev)
static
int
netdev_open
(
struct
net_device
*
dev
)
static
int
netdev_open
(
struct
net_device
*
dev
)
{
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
long
ioaddr
=
dev
->
base_addr
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
)
;
int
i
;
int
i
;
/* Reset the chip, just in case. */
/* Reset the chip, just in case. */
...
@@ -1558,6 +1574,7 @@ static int netdev_open(struct net_device *dev)
...
@@ -1558,6 +1574,7 @@ static int netdev_open(struct net_device *dev)
static
void
do_cable_magic
(
struct
net_device
*
dev
)
static
void
do_cable_magic
(
struct
net_device
*
dev
)
{
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
if
(
dev
->
if_port
!=
PORT_TP
)
if
(
dev
->
if_port
!=
PORT_TP
)
return
;
return
;
...
@@ -1571,15 +1588,15 @@ static void do_cable_magic(struct net_device *dev)
...
@@ -1571,15 +1588,15 @@ static void do_cable_magic(struct net_device *dev)
* activity LED while idle. This process is based on instructions
* activity LED while idle. This process is based on instructions
* from engineers at National.
* from engineers at National.
*/
*/
if
(
readl
(
dev
->
base_
addr
+
ChipConfig
)
&
CfgSpeed100
)
{
if
(
readl
(
io
addr
+
ChipConfig
)
&
CfgSpeed100
)
{
u16
data
;
u16
data
;
writew
(
1
,
dev
->
base_
addr
+
PGSEL
);
writew
(
1
,
io
addr
+
PGSEL
);
/*
/*
* coefficient visibility should already be enabled via
* coefficient visibility should already be enabled via
* DSPCFG | 0x1000
* DSPCFG | 0x1000
*/
*/
data
=
readw
(
dev
->
base_
addr
+
TSTDAT
)
&
0xff
;
data
=
readw
(
io
addr
+
TSTDAT
)
&
0xff
;
/*
/*
* the value must be negative, and within certain values
* the value must be negative, and within certain values
* (these values all come from National)
* (these values all come from National)
...
@@ -1588,13 +1605,13 @@ static void do_cable_magic(struct net_device *dev)
...
@@ -1588,13 +1605,13 @@ static void do_cable_magic(struct net_device *dev)
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
/* the bug has been triggered - fix the coefficient */
/* the bug has been triggered - fix the coefficient */
writew
(
TSTDAT_FIXED
,
dev
->
base_
addr
+
TSTDAT
);
writew
(
TSTDAT_FIXED
,
io
addr
+
TSTDAT
);
/* lock the value */
/* lock the value */
data
=
readw
(
dev
->
base_
addr
+
DSPCFG
);
data
=
readw
(
io
addr
+
DSPCFG
);
np
->
dspcfg
=
data
|
DSPCFG_LOCK
;
np
->
dspcfg
=
data
|
DSPCFG_LOCK
;
writew
(
np
->
dspcfg
,
dev
->
base_
addr
+
DSPCFG
);
writew
(
np
->
dspcfg
,
io
addr
+
DSPCFG
);
}
}
writew
(
0
,
dev
->
base_
addr
+
PGSEL
);
writew
(
0
,
io
addr
+
PGSEL
);
}
}
}
}
...
@@ -1602,6 +1619,7 @@ static void undo_cable_magic(struct net_device *dev)
...
@@ -1602,6 +1619,7 @@ static void undo_cable_magic(struct net_device *dev)
{
{
u16
data
;
u16
data
;
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
if
(
dev
->
if_port
!=
PORT_TP
)
if
(
dev
->
if_port
!=
PORT_TP
)
return
;
return
;
...
@@ -1609,18 +1627,18 @@ static void undo_cable_magic(struct net_device *dev)
...
@@ -1609,18 +1627,18 @@ static void undo_cable_magic(struct net_device *dev)
if
(
np
->
srr
>=
SRR_DP83816_A5
)
if
(
np
->
srr
>=
SRR_DP83816_A5
)
return
;
return
;
writew
(
1
,
dev
->
base_
addr
+
PGSEL
);
writew
(
1
,
io
addr
+
PGSEL
);
/* make sure the lock bit is clear */
/* make sure the lock bit is clear */
data
=
readw
(
dev
->
base_
addr
+
DSPCFG
);
data
=
readw
(
io
addr
+
DSPCFG
);
np
->
dspcfg
=
data
&
~
DSPCFG_LOCK
;
np
->
dspcfg
=
data
&
~
DSPCFG_LOCK
;
writew
(
np
->
dspcfg
,
dev
->
base_
addr
+
DSPCFG
);
writew
(
np
->
dspcfg
,
io
addr
+
DSPCFG
);
writew
(
0
,
dev
->
base_
addr
+
PGSEL
);
writew
(
0
,
io
addr
+
PGSEL
);
}
}
static
void
check_link
(
struct
net_device
*
dev
)
static
void
check_link
(
struct
net_device
*
dev
)
{
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
long
ioaddr
=
dev
->
base_addr
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
)
;
int
duplex
;
int
duplex
;
u16
bmsr
;
u16
bmsr
;
...
@@ -1681,7 +1699,7 @@ static void check_link(struct net_device *dev)
...
@@ -1681,7 +1699,7 @@ static void check_link(struct net_device *dev)
static
void
init_registers
(
struct
net_device
*
dev
)
static
void
init_registers
(
struct
net_device
*
dev
)
{
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
long
ioaddr
=
dev
->
base_addr
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
)
;
init_phy_fixup
(
dev
);
init_phy_fixup
(
dev
);
...
@@ -1760,6 +1778,7 @@ static void netdev_timer(unsigned long data)
...
@@ -1760,6 +1778,7 @@ static void netdev_timer(unsigned long data)
{
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
int
next_tick
=
5
*
HZ
;
int
next_tick
=
5
*
HZ
;
if
(
netif_msg_timer
(
np
))
{
if
(
netif_msg_timer
(
np
))
{
...
@@ -1771,7 +1790,6 @@ static void netdev_timer(unsigned long data)
...
@@ -1771,7 +1790,6 @@ static void netdev_timer(unsigned long data)
}
}
if
(
dev
->
if_port
==
PORT_TP
)
{
if
(
dev
->
if_port
==
PORT_TP
)
{
long
ioaddr
=
dev
->
base_addr
;
u16
dspcfg
;
u16
dspcfg
;
spin_lock_irq
(
&
np
->
lock
);
spin_lock_irq
(
&
np
->
lock
);
...
@@ -1814,7 +1832,7 @@ static void netdev_timer(unsigned long data)
...
@@ -1814,7 +1832,7 @@ static void netdev_timer(unsigned long data)
refill_rx
(
dev
);
refill_rx
(
dev
);
enable_irq
(
dev
->
irq
);
enable_irq
(
dev
->
irq
);
if
(
!
np
->
oom
)
{
if
(
!
np
->
oom
)
{
writel
(
RxOn
,
dev
->
base_
addr
+
ChipCmd
);
writel
(
RxOn
,
io
addr
+
ChipCmd
);
}
else
{
}
else
{
next_tick
=
1
;
next_tick
=
1
;
}
}
...
@@ -1848,7 +1866,7 @@ static void dump_ring(struct net_device *dev)
...
@@ -1848,7 +1866,7 @@ static void dump_ring(struct net_device *dev)
static
void
tx_timeout
(
struct
net_device
*
dev
)
static
void
tx_timeout
(
struct
net_device
*
dev
)
{
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
long
ioaddr
=
dev
->
base_addr
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
)
;
disable_irq
(
dev
->
irq
);
disable_irq
(
dev
->
irq
);
spin_lock_irq
(
&
np
->
lock
);
spin_lock_irq
(
&
np
->
lock
);
...
@@ -2048,6 +2066,7 @@ static void reinit_ring(struct net_device *dev)
...
@@ -2048,6 +2066,7 @@ static void reinit_ring(struct net_device *dev)
static
int
start_tx
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
static
int
start_tx
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
unsigned
entry
;
unsigned
entry
;
/* Note: Ordering is important here, set the field with the
/* Note: Ordering is important here, set the field with the
...
@@ -2076,7 +2095,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev)
...
@@ -2076,7 +2095,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev)
netif_stop_queue
(
dev
);
netif_stop_queue
(
dev
);
}
}
/* Wake the potentially-idle transmit channel. */
/* Wake the potentially-idle transmit channel. */
writel
(
TxOn
,
dev
->
base_
addr
+
ChipCmd
);
writel
(
TxOn
,
io
addr
+
ChipCmd
);
}
else
{
}
else
{
dev_kfree_skb_irq
(
skb
);
dev_kfree_skb_irq
(
skb
);
np
->
stats
.
tx_dropped
++
;
np
->
stats
.
tx_dropped
++
;
...
@@ -2141,7 +2160,7 @@ static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs
...
@@ -2141,7 +2160,7 @@ static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs
{
{
struct
net_device
*
dev
=
dev_instance
;
struct
net_device
*
dev
=
dev_instance
;
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
long
ioaddr
=
dev
->
base_addr
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
)
;
int
boguscnt
=
max_interrupt_work
;
int
boguscnt
=
max_interrupt_work
;
unsigned
int
handled
=
0
;
unsigned
int
handled
=
0
;
...
@@ -2203,6 +2222,7 @@ static void netdev_rx(struct net_device *dev)
...
@@ -2203,6 +2222,7 @@ static void netdev_rx(struct net_device *dev)
int
boguscnt
=
np
->
dirty_rx
+
RX_RING_SIZE
-
np
->
cur_rx
;
int
boguscnt
=
np
->
dirty_rx
+
RX_RING_SIZE
-
np
->
cur_rx
;
s32
desc_status
=
le32_to_cpu
(
np
->
rx_head_desc
->
cmd_status
);
s32
desc_status
=
le32_to_cpu
(
np
->
rx_head_desc
->
cmd_status
);
unsigned
int
buflen
=
np
->
rx_buf_sz
;
unsigned
int
buflen
=
np
->
rx_buf_sz
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
/* If the driver owns the next entry it's a new packet. Send it up. */
/* If the driver owns the next entry it's a new packet. Send it up. */
while
(
desc_status
<
0
)
{
/* e.g. & DescOwn */
while
(
desc_status
<
0
)
{
/* e.g. & DescOwn */
...
@@ -2284,13 +2304,13 @@ static void netdev_rx(struct net_device *dev)
...
@@ -2284,13 +2304,13 @@ static void netdev_rx(struct net_device *dev)
if
(
np
->
oom
)
if
(
np
->
oom
)
mod_timer
(
&
np
->
timer
,
jiffies
+
1
);
mod_timer
(
&
np
->
timer
,
jiffies
+
1
);
else
else
writel
(
RxOn
,
dev
->
base_
addr
+
ChipCmd
);
writel
(
RxOn
,
io
addr
+
ChipCmd
);
}
}
static
void
netdev_error
(
struct
net_device
*
dev
,
int
intr_status
)
static
void
netdev_error
(
struct
net_device
*
dev
,
int
intr_status
)
{
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
long
ioaddr
=
dev
->
base_addr
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
)
;
spin_lock
(
&
np
->
lock
);
spin_lock
(
&
np
->
lock
);
if
(
intr_status
&
LinkChange
)
{
if
(
intr_status
&
LinkChange
)
{
...
@@ -2349,7 +2369,7 @@ static void netdev_error(struct net_device *dev, int intr_status)
...
@@ -2349,7 +2369,7 @@ static void netdev_error(struct net_device *dev, int intr_status)
static
void
__get_stats
(
struct
net_device
*
dev
)
static
void
__get_stats
(
struct
net_device
*
dev
)
{
{
long
ioaddr
=
dev
->
base_addr
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
)
;
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
/* The chip only need report frame silently dropped. */
/* The chip only need report frame silently dropped. */
...
@@ -2382,7 +2402,7 @@ static void natsemi_poll_controller(struct net_device *dev)
...
@@ -2382,7 +2402,7 @@ static void natsemi_poll_controller(struct net_device *dev)
#define HASH_TABLE 0x200
#define HASH_TABLE 0x200
static
void
__set_rx_mode
(
struct
net_device
*
dev
)
static
void
__set_rx_mode
(
struct
net_device
*
dev
)
{
{
long
ioaddr
=
dev
->
base_addr
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
)
;
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
u8
mc_filter
[
64
];
/* Multicast hash filter */
u8
mc_filter
[
64
];
/* Multicast hash filter */
u32
rx_mode
;
u32
rx_mode
;
...
@@ -2428,7 +2448,7 @@ static int natsemi_change_mtu(struct net_device *dev, int new_mtu)
...
@@ -2428,7 +2448,7 @@ static int natsemi_change_mtu(struct net_device *dev, int new_mtu)
/* synchronized against open : rtnl_lock() held by caller */
/* synchronized against open : rtnl_lock() held by caller */
if
(
netif_running
(
dev
))
{
if
(
netif_running
(
dev
))
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
long
ioaddr
=
dev
->
base_addr
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
)
;
disable_irq
(
dev
->
irq
);
disable_irq
(
dev
->
irq
);
spin_lock
(
&
np
->
lock
);
spin_lock
(
&
np
->
lock
);
...
@@ -2631,7 +2651,8 @@ static int netdev_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
...
@@ -2631,7 +2651,8 @@ static int netdev_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
static
int
netdev_set_wol
(
struct
net_device
*
dev
,
u32
newval
)
static
int
netdev_set_wol
(
struct
net_device
*
dev
,
u32
newval
)
{
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
u32
data
=
readl
(
dev
->
base_addr
+
WOLCmd
)
&
~
WakeOptsSummary
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
u32
data
=
readl
(
ioaddr
+
WOLCmd
)
&
~
WakeOptsSummary
;
/* translate to bitmasks this chip understands */
/* translate to bitmasks this chip understands */
if
(
newval
&
WAKE_PHY
)
if
(
newval
&
WAKE_PHY
)
...
@@ -2652,7 +2673,7 @@ static int netdev_set_wol(struct net_device *dev, u32 newval)
...
@@ -2652,7 +2673,7 @@ static int netdev_set_wol(struct net_device *dev, u32 newval)
}
}
}
}
writel
(
data
,
dev
->
base_
addr
+
WOLCmd
);
writel
(
data
,
io
addr
+
WOLCmd
);
return
0
;
return
0
;
}
}
...
@@ -2660,7 +2681,8 @@ static int netdev_set_wol(struct net_device *dev, u32 newval)
...
@@ -2660,7 +2681,8 @@ static int netdev_set_wol(struct net_device *dev, u32 newval)
static
int
netdev_get_wol
(
struct
net_device
*
dev
,
u32
*
supported
,
u32
*
cur
)
static
int
netdev_get_wol
(
struct
net_device
*
dev
,
u32
*
supported
,
u32
*
cur
)
{
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
u32
regval
=
readl
(
dev
->
base_addr
+
WOLCmd
);
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
u32
regval
=
readl
(
ioaddr
+
WOLCmd
);
*
supported
=
(
WAKE_PHY
|
WAKE_UCAST
|
WAKE_MCAST
|
WAKE_BCAST
*
supported
=
(
WAKE_PHY
|
WAKE_UCAST
|
WAKE_MCAST
|
WAKE_BCAST
|
WAKE_ARP
|
WAKE_MAGIC
);
|
WAKE_ARP
|
WAKE_MAGIC
);
...
@@ -2695,6 +2717,7 @@ static int netdev_get_wol(struct net_device *dev, u32 *supported, u32 *cur)
...
@@ -2695,6 +2717,7 @@ static int netdev_get_wol(struct net_device *dev, u32 *supported, u32 *cur)
static
int
netdev_set_sopass
(
struct
net_device
*
dev
,
u8
*
newval
)
static
int
netdev_set_sopass
(
struct
net_device
*
dev
,
u8
*
newval
)
{
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
u16
*
sval
=
(
u16
*
)
newval
;
u16
*
sval
=
(
u16
*
)
newval
;
u32
addr
;
u32
addr
;
...
@@ -2703,22 +2726,22 @@ static int netdev_set_sopass(struct net_device *dev, u8 *newval)
...
@@ -2703,22 +2726,22 @@ static int netdev_set_sopass(struct net_device *dev, u8 *newval)
}
}
/* enable writing to these registers by disabling the RX filter */
/* enable writing to these registers by disabling the RX filter */
addr
=
readl
(
dev
->
base_
addr
+
RxFilterAddr
)
&
~
RFCRAddressMask
;
addr
=
readl
(
io
addr
+
RxFilterAddr
)
&
~
RFCRAddressMask
;
addr
&=
~
RxFilterEnable
;
addr
&=
~
RxFilterEnable
;
writel
(
addr
,
dev
->
base_
addr
+
RxFilterAddr
);
writel
(
addr
,
io
addr
+
RxFilterAddr
);
/* write the three words to (undocumented) RFCR vals 0xa, 0xc, 0xe */
/* write the three words to (undocumented) RFCR vals 0xa, 0xc, 0xe */
writel
(
addr
|
0xa
,
dev
->
base_
addr
+
RxFilterAddr
);
writel
(
addr
|
0xa
,
io
addr
+
RxFilterAddr
);
writew
(
sval
[
0
],
dev
->
base_
addr
+
RxFilterData
);
writew
(
sval
[
0
],
io
addr
+
RxFilterData
);
writel
(
addr
|
0xc
,
dev
->
base_
addr
+
RxFilterAddr
);
writel
(
addr
|
0xc
,
io
addr
+
RxFilterAddr
);
writew
(
sval
[
1
],
dev
->
base_
addr
+
RxFilterData
);
writew
(
sval
[
1
],
io
addr
+
RxFilterData
);
writel
(
addr
|
0xe
,
dev
->
base_
addr
+
RxFilterAddr
);
writel
(
addr
|
0xe
,
io
addr
+
RxFilterAddr
);
writew
(
sval
[
2
],
dev
->
base_
addr
+
RxFilterData
);
writew
(
sval
[
2
],
io
addr
+
RxFilterData
);
/* re-enable the RX filter */
/* re-enable the RX filter */
writel
(
addr
|
RxFilterEnable
,
dev
->
base_
addr
+
RxFilterAddr
);
writel
(
addr
|
RxFilterEnable
,
io
addr
+
RxFilterAddr
);
return
0
;
return
0
;
}
}
...
@@ -2726,6 +2749,7 @@ static int netdev_set_sopass(struct net_device *dev, u8 *newval)
...
@@ -2726,6 +2749,7 @@ static int netdev_set_sopass(struct net_device *dev, u8 *newval)
static
int
netdev_get_sopass
(
struct
net_device
*
dev
,
u8
*
data
)
static
int
netdev_get_sopass
(
struct
net_device
*
dev
,
u8
*
data
)
{
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
u16
*
sval
=
(
u16
*
)
data
;
u16
*
sval
=
(
u16
*
)
data
;
u32
addr
;
u32
addr
;
...
@@ -2735,18 +2759,18 @@ static int netdev_get_sopass(struct net_device *dev, u8 *data)
...
@@ -2735,18 +2759,18 @@ static int netdev_get_sopass(struct net_device *dev, u8 *data)
}
}
/* read the three words from (undocumented) RFCR vals 0xa, 0xc, 0xe */
/* read the three words from (undocumented) RFCR vals 0xa, 0xc, 0xe */
addr
=
readl
(
dev
->
base_
addr
+
RxFilterAddr
)
&
~
RFCRAddressMask
;
addr
=
readl
(
io
addr
+
RxFilterAddr
)
&
~
RFCRAddressMask
;
writel
(
addr
|
0xa
,
dev
->
base_
addr
+
RxFilterAddr
);
writel
(
addr
|
0xa
,
io
addr
+
RxFilterAddr
);
sval
[
0
]
=
readw
(
dev
->
base_
addr
+
RxFilterData
);
sval
[
0
]
=
readw
(
io
addr
+
RxFilterData
);
writel
(
addr
|
0xc
,
dev
->
base_
addr
+
RxFilterAddr
);
writel
(
addr
|
0xc
,
io
addr
+
RxFilterAddr
);
sval
[
1
]
=
readw
(
dev
->
base_
addr
+
RxFilterData
);
sval
[
1
]
=
readw
(
io
addr
+
RxFilterData
);
writel
(
addr
|
0xe
,
dev
->
base_
addr
+
RxFilterAddr
);
writel
(
addr
|
0xe
,
io
addr
+
RxFilterAddr
);
sval
[
2
]
=
readw
(
dev
->
base_
addr
+
RxFilterData
);
sval
[
2
]
=
readw
(
io
addr
+
RxFilterData
);
writel
(
addr
,
dev
->
base_
addr
+
RxFilterAddr
);
writel
(
addr
,
io
addr
+
RxFilterAddr
);
return
0
;
return
0
;
}
}
...
@@ -2909,10 +2933,11 @@ static int netdev_get_regs(struct net_device *dev, u8 *buf)
...
@@ -2909,10 +2933,11 @@ static int netdev_get_regs(struct net_device *dev, u8 *buf)
int
j
;
int
j
;
u32
rfcr
;
u32
rfcr
;
u32
*
rbuf
=
(
u32
*
)
buf
;
u32
*
rbuf
=
(
u32
*
)
buf
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
/* read non-mii page 0 of registers */
/* read non-mii page 0 of registers */
for
(
i
=
0
;
i
<
NATSEMI_PG0_NREGS
/
2
;
i
++
)
{
for
(
i
=
0
;
i
<
NATSEMI_PG0_NREGS
/
2
;
i
++
)
{
rbuf
[
i
]
=
readl
(
dev
->
base_
addr
+
i
*
4
);
rbuf
[
i
]
=
readl
(
io
addr
+
i
*
4
);
}
}
/* read current mii registers */
/* read current mii registers */
...
@@ -2920,20 +2945,20 @@ static int netdev_get_regs(struct net_device *dev, u8 *buf)
...
@@ -2920,20 +2945,20 @@ static int netdev_get_regs(struct net_device *dev, u8 *buf)
rbuf
[
i
]
=
mdio_read
(
dev
,
i
&
0x1f
);
rbuf
[
i
]
=
mdio_read
(
dev
,
i
&
0x1f
);
/* read only the 'magic' registers from page 1 */
/* read only the 'magic' registers from page 1 */
writew
(
1
,
dev
->
base_
addr
+
PGSEL
);
writew
(
1
,
io
addr
+
PGSEL
);
rbuf
[
i
++
]
=
readw
(
dev
->
base_
addr
+
PMDCSR
);
rbuf
[
i
++
]
=
readw
(
io
addr
+
PMDCSR
);
rbuf
[
i
++
]
=
readw
(
dev
->
base_
addr
+
TSTDAT
);
rbuf
[
i
++
]
=
readw
(
io
addr
+
TSTDAT
);
rbuf
[
i
++
]
=
readw
(
dev
->
base_
addr
+
DSPCFG
);
rbuf
[
i
++
]
=
readw
(
io
addr
+
DSPCFG
);
rbuf
[
i
++
]
=
readw
(
dev
->
base_
addr
+
SDCFG
);
rbuf
[
i
++
]
=
readw
(
io
addr
+
SDCFG
);
writew
(
0
,
dev
->
base_
addr
+
PGSEL
);
writew
(
0
,
io
addr
+
PGSEL
);
/* read RFCR indexed registers */
/* read RFCR indexed registers */
rfcr
=
readl
(
dev
->
base_
addr
+
RxFilterAddr
);
rfcr
=
readl
(
io
addr
+
RxFilterAddr
);
for
(
j
=
0
;
j
<
NATSEMI_RFDR_NREGS
;
j
++
)
{
for
(
j
=
0
;
j
<
NATSEMI_RFDR_NREGS
;
j
++
)
{
writel
(
j
*
2
,
dev
->
base_
addr
+
RxFilterAddr
);
writel
(
j
*
2
,
io
addr
+
RxFilterAddr
);
rbuf
[
i
++
]
=
readw
(
dev
->
base_
addr
+
RxFilterData
);
rbuf
[
i
++
]
=
readw
(
io
addr
+
RxFilterData
);
}
}
writel
(
rfcr
,
dev
->
base_
addr
+
RxFilterAddr
);
writel
(
rfcr
,
io
addr
+
RxFilterAddr
);
/* the interrupt status is clear-on-read - see if we missed any */
/* the interrupt status is clear-on-read - see if we missed any */
if
(
rbuf
[
4
]
&
rbuf
[
5
])
{
if
(
rbuf
[
4
]
&
rbuf
[
5
])
{
...
@@ -2958,10 +2983,11 @@ static int netdev_get_eeprom(struct net_device *dev, u8 *buf)
...
@@ -2958,10 +2983,11 @@ static int netdev_get_eeprom(struct net_device *dev, u8 *buf)
{
{
int
i
;
int
i
;
u16
*
ebuf
=
(
u16
*
)
buf
;
u16
*
ebuf
=
(
u16
*
)
buf
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
/* eeprom_read reads 16 bits, and indexes by 16 bits */
/* eeprom_read reads 16 bits, and indexes by 16 bits */
for
(
i
=
0
;
i
<
NATSEMI_EEPROM_SIZE
/
2
;
i
++
)
{
for
(
i
=
0
;
i
<
NATSEMI_EEPROM_SIZE
/
2
;
i
++
)
{
ebuf
[
i
]
=
eeprom_read
(
dev
->
base_
addr
,
i
);
ebuf
[
i
]
=
eeprom_read
(
io
addr
,
i
);
/* The EEPROM itself stores data bit-swapped, but eeprom_read
/* The EEPROM itself stores data bit-swapped, but eeprom_read
* reads it back "sanely". So we swap it back here in order to
* reads it back "sanely". So we swap it back here in order to
* present it to userland as it is stored. */
* present it to userland as it is stored. */
...
@@ -3031,7 +3057,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
...
@@ -3031,7 +3057,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
static
void
enable_wol_mode
(
struct
net_device
*
dev
,
int
enable_intr
)
static
void
enable_wol_mode
(
struct
net_device
*
dev
,
int
enable_intr
)
{
{
long
ioaddr
=
dev
->
base_addr
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
)
;
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
if
(
netif_msg_wol
(
np
))
if
(
netif_msg_wol
(
np
))
...
@@ -3064,7 +3090,7 @@ static void enable_wol_mode(struct net_device *dev, int enable_intr)
...
@@ -3064,7 +3090,7 @@ static void enable_wol_mode(struct net_device *dev, int enable_intr)
static
int
netdev_close
(
struct
net_device
*
dev
)
static
int
netdev_close
(
struct
net_device
*
dev
)
{
{
long
ioaddr
=
dev
->
base_addr
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
)
;
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
if
(
netif_msg_ifdown
(
np
))
if
(
netif_msg_ifdown
(
np
))
...
@@ -3141,10 +3167,11 @@ static int netdev_close(struct net_device *dev)
...
@@ -3141,10 +3167,11 @@ static int netdev_close(struct net_device *dev)
static
void
__devexit
natsemi_remove1
(
struct
pci_dev
*
pdev
)
static
void
__devexit
natsemi_remove1
(
struct
pci_dev
*
pdev
)
{
{
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
);
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
);
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
);
unregister_netdev
(
dev
);
unregister_netdev
(
dev
);
pci_release_regions
(
pdev
);
pci_release_regions
(
pdev
);
iounmap
((
char
*
)
dev
->
base_
addr
);
iounmap
(
io
addr
);
free_netdev
(
dev
);
free_netdev
(
dev
);
pci_set_drvdata
(
pdev
,
NULL
);
pci_set_drvdata
(
pdev
,
NULL
);
}
}
...
@@ -3178,7 +3205,7 @@ static int natsemi_suspend (struct pci_dev *pdev, u32 state)
...
@@ -3178,7 +3205,7 @@ static int natsemi_suspend (struct pci_dev *pdev, u32 state)
{
{
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
);
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
long
ioaddr
=
dev
->
base_addr
;
void
__iomem
*
ioaddr
=
ns_ioaddr
(
dev
)
;
rtnl_lock
();
rtnl_lock
();
if
(
netif_running
(
dev
))
{
if
(
netif_running
(
dev
))
{
...
...
include/asm-ia64/sn/sn_sal.h
View file @
663c5675
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
#define SN_SAL_NO_FAULT_ZONE_PHYSICAL 0x02000011
#define SN_SAL_NO_FAULT_ZONE_PHYSICAL 0x02000011
#define SN_SAL_PRINT_ERROR 0x02000012
#define SN_SAL_PRINT_ERROR 0x02000012
#define SN_SAL_SET_ERROR_HANDLING_FEATURES 0x0200001a // reentrant
#define SN_SAL_SET_ERROR_HANDLING_FEATURES 0x0200001a // reentrant
#define SN_SAL_GET_FIT_COMPT 0x0200001b // reentrant
#define SN_SAL_CONSOLE_PUTC 0x02000021
#define SN_SAL_CONSOLE_PUTC 0x02000021
#define SN_SAL_CONSOLE_GETC 0x02000022
#define SN_SAL_CONSOLE_GETC 0x02000022
#define SN_SAL_CONSOLE_PUTS 0x02000023
#define SN_SAL_CONSOLE_PUTS 0x02000023
...
@@ -107,12 +108,13 @@
...
@@ -107,12 +108,13 @@
/*
/*
* S
N_SAL_GET_PARTITION_ADDR return constant
s
* S
AL Error Code
s
*/
*/
#define SALRET_MORE_PASSES 1
#define SALRET_MORE_PASSES 1
#define SALRET_OK 0
#define SALRET_OK 0
#define SALRET_INVALID_ARG -2
#define SALRET_NOT_IMPLEMENTED (-1)
#define SALRET_ERROR -3
#define SALRET_INVALID_ARG (-2)
#define SALRET_ERROR (-3)
/*
/*
* SN_SAL_SET_ERROR_HANDLING_FEATURES bit settings
* SN_SAL_SET_ERROR_HANDLING_FEATURES bit settings
...
@@ -829,6 +831,34 @@ ia64_sn_irtr_intr_disable(nasid_t nasid, int subch, u64 intr)
...
@@ -829,6 +831,34 @@ ia64_sn_irtr_intr_disable(nasid_t nasid, int subch, u64 intr)
return
(
int
)
rv
.
v0
;
return
(
int
)
rv
.
v0
;
}
}
/**
* ia64_sn_get_fit_compt - read a FIT entry from the PROM header
* @nasid: NASID of node to read
* @index: FIT entry index to be retrieved (0..n)
* @fitentry: 16 byte buffer where FIT entry will be stored.
* @banbuf: optional buffer for retrieving banner
* @banlen: length of banner buffer
*
* Access to the physical PROM chips needs to be serialized since reads and
* writes can't occur at the same time, so we need to call into the SAL when
* we want to look at the FIT entries on the chips.
*
* Returns:
* %SALRET_OK if ok
* %SALRET_INVALID_ARG if index too big
* %SALRET_NOT_IMPLEMENTED if running on older PROM
* ??? if nasid invalid OR banner buffer not large enough
*/
static
inline
int
ia64_sn_get_fit_compt
(
u64
nasid
,
u64
index
,
void
*
fitentry
,
void
*
banbuf
,
u64
banlen
)
{
struct
ia64_sal_retval
rv
;
SAL_CALL_NOLOCK
(
rv
,
SN_SAL_GET_FIT_COMPT
,
nasid
,
index
,
fitentry
,
banbuf
,
banlen
,
0
,
0
);
return
(
int
)
rv
.
status
;
}
/*
/*
* Initialize the SAL components of the system controller
* Initialize the SAL components of the system controller
* communication driver; specifically pass in a sizable buffer that
* communication driver; specifically pass in a sizable buffer that
...
...
include/linux/mman.h
View file @
663c5675
...
@@ -10,6 +10,9 @@
...
@@ -10,6 +10,9 @@
#define MREMAP_MAYMOVE 1
#define MREMAP_MAYMOVE 1
#define MREMAP_FIXED 2
#define MREMAP_FIXED 2
#define OVERCOMMIT_GUESS 0
#define OVERCOMMIT_ALWAYS 1
#define OVERCOMMIT_NEVER 2
extern
int
sysctl_overcommit_memory
;
extern
int
sysctl_overcommit_memory
;
extern
int
sysctl_overcommit_ratio
;
extern
int
sysctl_overcommit_ratio
;
extern
atomic_t
vm_committed_space
;
extern
atomic_t
vm_committed_space
;
...
...
include/linux/time.h
View file @
663c5675
...
@@ -208,6 +208,8 @@ static inline unsigned int jiffies_to_usecs(const unsigned long j)
...
@@ -208,6 +208,8 @@ static inline unsigned int jiffies_to_usecs(const unsigned long j)
static
inline
unsigned
long
msecs_to_jiffies
(
const
unsigned
int
m
)
static
inline
unsigned
long
msecs_to_jiffies
(
const
unsigned
int
m
)
{
{
if
(
m
>
jiffies_to_msecs
(
MAX_JIFFY_OFFSET
))
return
MAX_JIFFY_OFFSET
;
#if HZ <= 1000 && !(1000 % HZ)
#if HZ <= 1000 && !(1000 % HZ)
return
(
m
+
(
1000
/
HZ
)
-
1
)
/
(
1000
/
HZ
);
return
(
m
+
(
1000
/
HZ
)
-
1
)
/
(
1000
/
HZ
);
#elif HZ > 1000 && !(HZ % 1000)
#elif HZ > 1000 && !(HZ % 1000)
...
...
mm/mmap.c
View file @
663c5675
...
@@ -54,7 +54,7 @@ pgprot_t protection_map[16] = {
...
@@ -54,7 +54,7 @@ pgprot_t protection_map[16] = {
__S000
,
__S001
,
__S010
,
__S011
,
__S100
,
__S101
,
__S110
,
__S111
__S000
,
__S001
,
__S010
,
__S011
,
__S100
,
__S101
,
__S110
,
__S111
};
};
int
sysctl_overcommit_memory
=
0
;
/* default is
heuristic overcommit */
int
sysctl_overcommit_memory
=
OVERCOMMIT_GUESS
;
/*
heuristic overcommit */
int
sysctl_overcommit_ratio
=
50
;
/* default is 50% */
int
sysctl_overcommit_ratio
=
50
;
/* default is 50% */
int
sysctl_max_map_count
=
DEFAULT_MAX_MAP_COUNT
;
int
sysctl_max_map_count
=
DEFAULT_MAX_MAP_COUNT
;
atomic_t
vm_committed_space
=
ATOMIC_INIT
(
0
);
atomic_t
vm_committed_space
=
ATOMIC_INIT
(
0
);
...
@@ -907,7 +907,7 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
...
@@ -907,7 +907,7 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
return
-
ENOMEM
;
return
-
ENOMEM
;
if
(
accountable
&&
(
!
(
flags
&
MAP_NORESERVE
)
||
if
(
accountable
&&
(
!
(
flags
&
MAP_NORESERVE
)
||
sysctl_overcommit_memory
>
1
))
{
sysctl_overcommit_memory
==
OVERCOMMIT_NEVER
))
{
if
(
vm_flags
&
VM_SHARED
)
{
if
(
vm_flags
&
VM_SHARED
)
{
/* Check memory availability in shmem_file_setup? */
/* Check memory availability in shmem_file_setup? */
vm_flags
|=
VM_ACCOUNT
;
vm_flags
|=
VM_ACCOUNT
;
...
...
mm/nommu.c
View file @
663c5675
...
@@ -30,7 +30,7 @@ unsigned long max_mapnr;
...
@@ -30,7 +30,7 @@ unsigned long max_mapnr;
unsigned
long
num_physpages
;
unsigned
long
num_physpages
;
unsigned
long
askedalloc
,
realalloc
;
unsigned
long
askedalloc
,
realalloc
;
atomic_t
vm_committed_space
=
ATOMIC_INIT
(
0
);
atomic_t
vm_committed_space
=
ATOMIC_INIT
(
0
);
int
sysctl_overcommit_memory
;
/* default is
heuristic overcommit */
int
sysctl_overcommit_memory
=
OVERCOMMIT_GUESS
;
/*
heuristic overcommit */
int
sysctl_overcommit_ratio
=
50
;
/* default is 50% */
int
sysctl_overcommit_ratio
=
50
;
/* default is 50% */
int
sysctl_max_map_count
=
DEFAULT_MAX_MAP_COUNT
;
int
sysctl_max_map_count
=
DEFAULT_MAX_MAP_COUNT
;
...
...
security/commoncap.c
View file @
663c5675
...
@@ -314,10 +314,10 @@ int cap_vm_enough_memory(long pages)
...
@@ -314,10 +314,10 @@ int cap_vm_enough_memory(long pages)
/*
/*
* Sometimes we want to use more memory than we have
* Sometimes we want to use more memory than we have
*/
*/
if
(
sysctl_overcommit_memory
==
1
)
if
(
sysctl_overcommit_memory
==
OVERCOMMIT_ALWAYS
)
return
0
;
return
0
;
if
(
sysctl_overcommit_memory
==
0
)
{
if
(
sysctl_overcommit_memory
==
OVERCOMMIT_GUESS
)
{
unsigned
long
n
;
unsigned
long
n
;
free
=
get_page_cache_size
();
free
=
get_page_cache_size
();
...
...
security/dummy.c
View file @
663c5675
...
@@ -121,10 +121,10 @@ static int dummy_vm_enough_memory(long pages)
...
@@ -121,10 +121,10 @@ static int dummy_vm_enough_memory(long pages)
/*
/*
* Sometimes we want to use more memory than we have
* Sometimes we want to use more memory than we have
*/
*/
if
(
sysctl_overcommit_memory
==
1
)
if
(
sysctl_overcommit_memory
==
OVERCOMMIT_ALWAYS
)
return
0
;
return
0
;
if
(
sysctl_overcommit_memory
==
0
)
{
if
(
sysctl_overcommit_memory
==
OVERCOMMIT_GUESS
)
{
free
=
get_page_cache_size
();
free
=
get_page_cache_size
();
free
+=
nr_free_pages
();
free
+=
nr_free_pages
();
free
+=
nr_swap_pages
;
free
+=
nr_swap_pages
;
...
...
security/selinux/hooks.c
View file @
663c5675
...
@@ -1554,10 +1554,10 @@ static int selinux_vm_enough_memory(long pages)
...
@@ -1554,10 +1554,10 @@ static int selinux_vm_enough_memory(long pages)
/*
/*
* Sometimes we want to use more memory than we have
* Sometimes we want to use more memory than we have
*/
*/
if
(
sysctl_overcommit_memory
==
1
)
if
(
sysctl_overcommit_memory
==
OVERCOMMIT_ALWAYS
)
return
0
;
return
0
;
if
(
sysctl_overcommit_memory
==
0
)
{
if
(
sysctl_overcommit_memory
==
OVERCOMMIT_GUESS
)
{
free
=
get_page_cache_size
();
free
=
get_page_cache_size
();
free
+=
nr_free_pages
();
free
+=
nr_free_pages
();
free
+=
nr_swap_pages
;
free
+=
nr_swap_pages
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment