Commit 48c98998 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://gkernel.bkbits.net/net-drivers-2.5

into ppc970.osdl.org:/home/torvalds/v2.5/linux
parents 9abdbe60 e3b0e73f
This diff is collapsed.
......@@ -8,7 +8,7 @@ Hardware supported by the linuxtv.org DVB drivers
DVB-S/DVB-C/DVB-T. Thus the frontend drivers are listed seperately.
Note 1: There is no guarantee that every frontend driver works
out-of-the box with every card, because of different wiring.
out of the box with every card, because of different wiring.
Note 2: The demodulator chips can be used with a variety of
tuner/PLL chips, and not all combinations are supported. Often
......@@ -19,13 +19,13 @@ Hardware supported by the linuxtv.org DVB drivers
o Frontends drivers:
- dvb_dummy_fe: for testing...
DVB-S:
- alps_bsrv2 : Alps BSRV2 (ves1893 demodulator)
- ves1x93 : Alps BSRV2 (ves1893 demodulator) and dbox2 (ves1993)
- cx24110 : Conexant HM1221/HM1811 (cx24110 or cx24106 demod, cx24108 PLL)
- grundig_29504-491 : Grundig 29504-491 (Philips TDA8083 demodulator), tsa5522 PLL
- mt312 : Zarlink mt312 or Mitel vp310 demodulator, sl1935 or tsa5059 PLL
- stv0299 : Alps BSRU6 (tsa5059 PLL), LG TDQB-S00x (tsa5059 PLL),
LG TDQF-S001F (sl1935 PLL), Philips SU1278 (tua6100 PLL),
Philips SU1278SH (tsa5059 PLL)
Philips SU1278SH (tsa5059 PLL), Samsung TBMU24112IMB
DVB-C:
- ves1820 : various (ves1820 demodulator, sp5659c or spXXXX PLL)
- at76c651 : Atmel AT76c651(B) with DAT7021 PLL
......@@ -37,6 +37,9 @@ o Frontends drivers:
- nxt6000 : Alps TDME7 (MITEL SP5659 PLL), Alps TDED4 (TI ALP510 PLL),
Comtech DVBT-6k07 (SP5730 PLL)
(NxtWave Communications NXT6000 demodulator)
- sp887x : Microtune 7202D
DVB-S/C/T:
- dst : TwinHan DST Frontend
o Cards based on the Phillips saa7146 multimedia PCI bridge chip:
......@@ -48,16 +51,17 @@ o Cards based on the Phillips saa7146 multimedia PCI bridge chip:
- SATELCO Multimedia PCI
- KNC1 DVB-S
o Cards based on the B2C2 Inc. FlexCopII:
- Technisat SkyStar2 PCI DVB
o Cards based on the B2C2 Inc. FlexCopII/IIb/III:
- Technisat SkyStar2 PCI DVB card revision 2.3, 2.6B, 2.6C
o Cards based on the Conexant Bt8xx PCI bridge:
- Pinnacle PCTV Sat DVB
- Nebula Electronics DigiTV
- TwinHan DST
- Avermedia DVB-T
o Technotrend / Hauppauge DVB USB devices:
- Nova USB
- DEC 2000-T
o Preliminary support for the analog module of the Siemens DVB-C PCI card
- DEC 2000-T, 3000-S, 2540-T
o Experimental support for the analog module of the Siemens DVB-C PCI card
......@@ -99,11 +99,57 @@ Some very frequently asked questions about linuxtv-dvb
If you are using a Technotrend/Hauppauge DVB-C card *without* analog
module, you might have to use module parameter adac=-1 (dvb-ttpci.o).
5. The dvb_net device doesn't give me any multicast packets
5. The dvb_net device doesn't give me any packets at all
Run tcpdump on the dvb0_0 interface. This sets the interface
into promiscous mode so it accepts any packets from the PID
you have configured with the dvbnet utility. Check if there
are any packets with the IP addr and MAC addr you have
configured with ifconfig.
If tcpdump doesn't give you any output, check the statistics
which ifconfig outputs. (Note: If the MAC address is wrong,
dvb_net won't get any input; thus you have to run tcpdump
before checking the statistics.) If there are no packets at
all then maybe the PID is wrong. If there are error packets,
then either the PID is wrong or the stream does not conform to
the MPE standard (EN 301 192, http://www.etsi.org/). You can
use e.g. dvbsnoop for debugging.
6. The dvb_net device doesn't give me any multicast packets
Check your routes if they include the multicast address range.
Additionally make sure that "source validation by reversed path
lookup" is disabled:
$ "echo 0 > /proc/sys/net/ipv4/conf/dvb0/rp_filter"
7. What the hell are all those modules that need to be loaded?
For a dvb-ttpci av7110 based full-featured card the following
modules are loaded:
- videodev: Video4Linux core module. This is the base module that
gives you access to the "analog" tv picture of the av7110 mpeg2
decoder.
- v4l2-common: common functions for Video4Linux-2 drivers
- v4l1-compat: backward compatiblity layer for Video4Linux-1 legacy
applications
- dvb-core: DVB core module. This provides you with the
/dev/dvb/adapter entries
- saa7146: SAA7146 core driver. This is need to access any SAA7146
based card in your system.
- saa7146_vv: SAA7146 video and vbi functions. These are only needed
for full-featured cards.
- video-buf: capture helper module for the saa7146_vv driver. This
one is responsible to handle capture buffers.
- dvb-ttpci: The main driver for AV7110 based, full-featued
DVB-S/C/T cards
eof
......@@ -20,7 +20,7 @@ current state:
extracted from the Windows driver (Sc_main.mc).
- tda1004x: firmware is loaded from path specified in
DVB_TDA1004X_FIRMWARE_FILE kernel config
variable (default /etc/dvb/tda1004x.bin); the
variable (default /usr/lib/hotplug/firmware/tda1004x.bin); the
firmware binary must be extracted from the windows
driver
- ttusb-dec: see "ttusb-dec.txt" for details
......@@ -76,11 +76,15 @@ you want to upload the firmware by hand, however, this might be too fast.
Step c) Getting a usable firmware file for the dvb-ttpci driver/av7110 card.
You can download the firmware files from
http://www.linuxtv.org/download/dvb/
http://linuxtv.org/download/dvb/
Please note that in case of the dvb-ttpci driver this is *not* the "Root"
file you probably know from the 2.4 DVB releases driver.
The ttpci-firmware utility from linuxtv.org CVS can be used to
convert Dpram and Root files into a usable firmware image.
See dvb-kerrnel/scripts/ in http://linuxtv.org/cvs/.
> wget http://www.linuxtv.org/download/dvb/dvb-ttpci-01.fw
gets you the version 01 of the firmware fot the ttpci driver.
......
Macintosh HFS Filesystem for Linux
==================================
HFS stands for ``Hierarchical File System'' and is the filesystem used
by the Mac Plus and all later Macintosh models. Earlier Macintosh
models used MFS (``Macintosh File System''), which is not supported,
MacOS 8.1 and newer support a filesystem called HFS+ that's similar to
HFS but is extended in various areas. Use the hfsplus filesystem driver
to access such filesystems from Linux.
Mount options
=============
When mounting an HFS filesystem, the following options are accepted:
creator=cccc, type=cccc
Specifies the creator/type values as shown by the MacOS finder
used for creating new files. Default values: '????'.
uid=n, gid=n
Specifies the user/group that owns all files on the filesystems.
Default: user/group id of the mounting process.
dir_umask=n, file_umask=n, umask=n
Specifies the umask used for all files , all directories or all
files and directories. Defaults to the umask of the mounting process.
session=n
Select the CDROM session to mount as HFS filesystem. Defaults to
leaving that decision to the CDROM driver. This option will fail
with anything but a CDROM as underlying devices.
part=n
Select partition number n from the devices. Does only makes
sense for CDROMS because they can't be partitioned under Linux.
For disk devices the generic partition parsing code does this
for us. Defaults to not parsing the partition table at all.
quiet
Ignore invalid mount options instead of complaining.
Writing to HFS Filesystems
==========================
HFS is not a UNIX filesystem, thus it does not have the usual features you'd
expect:
o You can't modify the set-uid, set-gid, sticky or executable bits or the uid
and gid of files.
o You can't create hard- or symlinks, device files, sockets or FIFOs.
HFS does on the other have the concepts of multiple forks per file. These
non-standard forks are represented as hidden additional files in the normal
filesystems namespace which is kind of a cludge and makes the semantics for
the a little strange:
o You can't create, delete or rename resource forks of files or the
Finder's metadata.
o They are however created (with default values), deleted and renamed
along with the corresponding data fork or directory.
o Copying files to a different filesystem will loose those attributes
that are essential for MacOS to work.
Creating HFS filesystems
===================================
The hfsutils package from Robert Leslie contains a program called
hformat that can be used to create HFS filesystem. See
<http://www.mars.org/home/rob/proj/hfs/> for details.
Credits
=======
The HFS drivers was written by Paul H. Hargrovea (hargrove@sccm.Stanford.EDU)
and is now maintained by Roman Zippel (roman@ardistech.com) at Ardis
Technologies.
Roman rewrote large parts of the code and brought in btree routines derived
from Brad Boyer's hfsplus driver (also maintained by Roman now).
......@@ -187,3 +187,5 @@ Code Seq# Include File Comments
0xB1 00-1F PPPoX <mailto:mostrows@styx.uwaterloo.ca>
0xCB 00-1F CBM serial IEC bus in development:
<mailto:michael.klein@puffin.lb.shuttle.de>
0xDD 00-3F ZFCP device driver see drivers/s390/scsi/
<mailto:aherrman@de.ibm.com>
......@@ -314,8 +314,8 @@ running once the system is up.
dtc3181e= [HW,SCSI]
earlyprintk= [x86, x86_64]
early_printk=vga
early_printk=serial[,ttySn[,baudrate]]
earlyprintk=vga
earlyprintk=serial[,ttySn[,baudrate]]
Append ,keep to not disable it when the real console
takes over.
......
......@@ -8,23 +8,26 @@ Command line parameters
Determines whether information on found devices and sensed device
characteristics should be shown during startup, i. e. messages of the types
"Detected device 4711 on subchannel 42" and "SenseID: Device 4711 reports: ...".
"Detected device 0.0.4711 on subchannel 0.0.0042" and "SenseID: Device
0.0.4711 reports: ...".
Default is off.
* cio_notoper_msg = yes | no
Determines whether messages of the type "Device 4711 became 'not operational'"
should be shown during startup; after startup, they will always be shown.
Determines whether messages of the type "Device 0.0.4711 became 'not
operational'" should be shown during startup; after startup, they will always
be shown.
Default is on.
* cio_ignore = <device number> | <range of device numbers>,
<device number> | <range of device numbers>, ...
* cio_ignore = {all} |
{<device> | <range of devices>} |
{!<device> | !<range of devices>}
The given device numbers will be ignored by the common I/O-layer; no detection
The given devices will be ignored by the common I/O-layer; no detection
and device sensing will be done on any of those devices. The subchannel to
which the device in question is attached will be treated as if no device was
attached.
......@@ -32,12 +35,19 @@ Command line parameters
An ignored device can be un-ignored later; see the "/proc entries"-section for
details.
The device numbers must be given hexadecimal.
The devices must be given either as bus ids (0.0.abcd) or as hexadecimal
device numbers (0xabcd or abcd, for 2.4 backward compatibility).
You can use the 'all' keyword to ignore all devices.
The '!' operator will cause the I/O-layer to _not_ ignore a device.
The order on the command line is not important.
For example,
cio_ignore=0x23-0x42,0x4711
will ignore all devices with device numbers ranging from 23 to 42 and the
device with device number 4711, if detected.
cio_ignore=0.0.0023-0.0.0042,0.0.4711
will ignore all devices ranging from 0.0.0023 to 0.0.0042 and the device
0.0.4711, if detected.
As another example,
cio_ignore=all,!0.0.4711,!0.0.fd00-0.0.fd02
will ignore all devices but 0.0.4711, 0.0.fd00, 0.0.fd01, 0.0.fd02.
By default, no devices are ignored.
......@@ -47,17 +57,19 @@ Command line parameters
* /proc/cio_ignore
Lists the ranges of device numbers which are ignored by common I/O.
Lists the ranges of devices (by bus id) which are ignored by common I/O.
You can un-ignore certain or all devices by piping to /proc/cio_ignore.
"free all" will un-ignore all ignored devices,
"free <devnorange>, <devnorange>, ..." will un-ignore the specified devices.
For example, if devices 23 to 42 and 4711 are ignored,
- echo free 0x30-0x32 > /proc/cio_ignore
will un-ignore devices 30 to 32 and will leave devices 23 to 2F, 33 to 42
and 4711 ignored;
- echo free 0x41 > /proc/cio_ignore will furthermore un-ignore device 41;
"free <device range>, <device range>, ..." will un-ignore the specified
devices.
For example, if devices 0.0.0023 to 0.0.0042 and 0.0.4711 are ignored,
- echo free 0.0.0030-0.0.0032 > /proc/cio_ignore
will un-ignore devices 0.0.0030 to 0.0.0032 and will leave devices 0.0.0023
to 0.0.002f, 0.0.0033 to 0.0.0042 and 0.0.4711 ignored;
- echo free 0.0.0041 > /proc/cio_ignore will furthermore un-ignore device
0.0.0041;
- echo free all > /proc/cio_ignore will un-ignore all remaining ignored
devices.
......@@ -66,15 +78,19 @@ Command line parameters
available to the system.
You can also add ranges of devices to be ignored by piping to
/proc/cio_ignore; "add <devnorange>, <devnorange>, ..." will ignore the
/proc/cio_ignore; "add <device range>, <device range>, ..." will ignore the
specified devices.
Note: Already known devices cannot be ignored; this also applies to devices
which are gone after a machine check.
Note: Already known devices cannot be ignored.
For example, if device 0.0.abcd is already known and all other devices
0.0.a000-0.0.afff are not known,
"echo add 0.0.a000-0.0.accc, 0.0.af00-0.0.afff > /proc/cio_ignore"
will add 0.0.a000-0.0.abcc, 0.0.abce-0.0.accc and 0.0.af00-0.0.afff to the
list of ignored devices and skip 0.0.abcd.
For example, if device abcd is already known and all other devices a000-afff
are not known, "echo add 0xa000-0xaccc, 0xaf00-0xafff > /proc/cio_ignore"
will add af00-afff to the list of ignored devices and skip a000-accc.
The devices can be specified either by bus id (0.0.abcd) or, for 2.4 backward
compatibilty, by the device number in hexadecimal (0xabcd or abcd).
* /proc/s390dbf/cio_*/ (S/390 debug feature)
......
......@@ -216,9 +216,17 @@ mind that most drivers will need to implement both a ccwgroup and a ccw driver
Channel paths show up, like subchannels, under the channel subsystem root (css0)
and are called 'chp0.<chpid>'. They have no driver and do not belong to any bus.
Please note, that unlike /proc/chpids in 2.4, the channel path objects reflect
only the logical state and not the physical state, since we cannot track the
latter consistently due to lacking machine support (we don't need to be aware
of anyway).
status - Can be 'online', 'logically offline' or 'n/a'.
status - Can be 'online' or 'offline'.
Piping 'on' or 'off' sets the chpid logically online/offline.
Piping 'on' to an online chpid triggers path reprobing for all devices
the chpid connects to. This can be used to force the kernel to re-use
a channel path the user knows to be online, but the machine hasn't
created a machine check for.
3. System devices
......
......@@ -862,8 +862,8 @@ W: http://www.nyx.net/~arobinso
S: Maintained
HFS FILESYSTEM
P: Oliver Neukum
M: oliver@neukum.org
P: Roman Zippel
M: zippel@linux-m68k.org
L: linux-kernel@vger.kernel.org
S: Maintained
......
......@@ -889,6 +889,9 @@ rpm: clean spec
# Brief documentation of the typical targets used
# ---------------------------------------------------------------------------
boards := $(wildcard $(srctree)/arch/$(ARCH)/configs/*_defconfig)
boards := $(notdir $(boards))
help:
@echo 'Cleaning targets:'
@echo ' clean - remove most generated files but keep the config'
......@@ -914,6 +917,11 @@ help:
@$(if $(archhelp),$(archhelp),\
echo ' No architecture specific help defined for $(ARCH)')
@echo ''
@$(if $(boards), \
$(foreach b, $(boards), \
printf " %-24s - Build for %s\\n" $(b) $(subst _defconfig,,$(b));) \
echo '')
@echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
@echo ' make O=dir [targets] Locate all output files in "dir", including .config'
@echo ' make C=1 [targets] Check all c source with checker tool'
......
......@@ -336,14 +336,12 @@ config CPU_FREQ_SA1100
bool
depends on CPU_FREQ && SA1100_LART
default y
select CPU_FREQ_DEFAULT_GOV_USERSPACE
select CPU_FREQ_24_API if SYSCTL
config CPU_FREQ_SA1110
bool
depends on CPU_FREQ && (SA1100_ASSABET || SA1100_CERF || SA1100_PT_SYSTEM3)
default y
select CPU_FREQ_DEFAULT_GOV_USERSPACE
select CPU_FREQ_24_API if SYSCTL
config CPU_FREQ_INTEGRATOR
......
......@@ -199,6 +199,7 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy)
{
struct cpuinfo_x86 *c = cpu_data;
unsigned int i;
int result;
/* capability check */
if ((c->x86_vendor != X86_VENDOR_AMD) ||
......@@ -220,7 +221,20 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy)
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
policy->cur = elanfreq_get_cpu_frequency();
return cpufreq_frequency_table_cpuinfo(policy, &elanfreq_table[0]);;
result = cpufreq_frequency_table_cpuinfo(policy, elanfreq_table);
if (result)
return (result);
cpufreq_frequency_table_get_attr(elanfreq_table, policy->cpu);
return 0;
}
static int elanfreq_cpu_exit(struct cpufreq_policy *policy)
{
cpufreq_frequency_table_put_attr(policy->cpu);
return 0;
}
......@@ -245,12 +259,20 @@ __setup("elanfreq=", elanfreq_setup);
#endif
static struct freq_attr* elanfreq_attr[] = {
&cpufreq_freq_attr_scaling_available_freqs,
NULL,
};
static struct cpufreq_driver elanfreq_driver = {
.verify = elanfreq_verify,
.target = elanfreq_target,
.init = elanfreq_cpu_init,
.exit = elanfreq_cpu_exit,
.name = "elanfreq",
.owner = THIS_MODULE,
.attr = elanfreq_attr,
};
......
......@@ -234,6 +234,8 @@ static int __init longhaul_get_ranges (void)
case 2:
rdmsrl (MSR_VIA_LONGHAUL, longhaul.val);
//TODO: Nehemiah may have borken MaxMHzBR.
// need to extrapolate from FSB.
invalue = longhaul.bits.MaxMHzBR;
if (longhaul.bits.MaxMHzBR4)
invalue += 16;
......@@ -245,7 +247,16 @@ static int __init longhaul_get_ranges (void)
else
minmult = multipliers[invalue];
fsb = guess_fsb(maxmult);
switch (longhaul.bits.MaxMHzFSB) {
case 0x0: fsb=133;
break;
case 0x1: fsb=100;
break;
case 0x2: printk (KERN_INFO PFX "Invalid (reserved) FSB!\n");
return -EINVAL;
case 0x3: fsb=66;
break;
}
break;
}
......@@ -438,15 +449,34 @@ static int __init longhaul_cpu_init (struct cpufreq_policy *policy)
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
policy->cur = calc_speed (longhaul_get_cpu_mult(), fsb);
return cpufreq_frequency_table_cpuinfo(policy, longhaul_table);
ret = cpufreq_frequency_table_cpuinfo(policy, longhaul_table);
if (ret)
return ret;
cpufreq_frequency_table_get_attr(longhaul_table, policy->cpu);
return 0;
}
static int longhaul_cpu_exit(struct cpufreq_policy *policy)
{
cpufreq_frequency_table_put_attr(policy->cpu);
return 0;
}
static struct freq_attr* longhaul_attr[] = {
&cpufreq_freq_attr_scaling_available_freqs,
NULL,
};
static struct cpufreq_driver longhaul_driver = {
.verify = longhaul_verify,
.target = longhaul_target,
.init = longhaul_cpu_init,
.exit = longhaul_cpu_exit,
.name = "longhaul",
.owner = THIS_MODULE,
.attr = longhaul_attr,
};
static int __init longhaul_init (void)
......
......@@ -140,6 +140,7 @@ static int powernow_k6_target (struct cpufreq_policy *policy,
static int powernow_k6_cpu_init(struct cpufreq_policy *policy)
{
unsigned int i;
int result;
if (policy->cpu != 0)
return -ENODEV;
......@@ -161,7 +162,13 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy)
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
policy->cur = busfreq * max_multiplier;
return cpufreq_frequency_table_cpuinfo(policy, &clock_ratio[0]);
result = cpufreq_frequency_table_cpuinfo(policy, clock_ratio);
if (result)
return (result);
cpufreq_frequency_table_get_attr(clock_ratio, policy->cpu);
return 0;
}
......@@ -172,9 +179,14 @@ static int powernow_k6_cpu_exit(struct cpufreq_policy *policy)
if (i==max_multiplier)
powernow_k6_set_state(i);
}
return 0;
cpufreq_frequency_table_put_attr(policy->cpu);
return 0;
}
static struct freq_attr* powernow_k6_attr[] = {
&cpufreq_freq_attr_scaling_available_freqs,
NULL,
};
static struct cpufreq_driver powernow_k6_driver = {
.verify = powernow_k6_verify,
......@@ -183,6 +195,7 @@ static struct cpufreq_driver powernow_k6_driver = {
.exit = powernow_k6_cpu_exit,
.name = "powernow-k6",
.owner = THIS_MODULE,
.attr = powernow_k6_attr,
};
......
......@@ -389,15 +389,29 @@ static int __init powernow_cpu_init (struct cpufreq_policy *policy)
policy->cur = maximum_speed;
cpufreq_frequency_table_get_attr(powernow_table, policy->cpu);
return cpufreq_frequency_table_cpuinfo(policy, powernow_table);
}
static int powernow_cpu_exit (struct cpufreq_policy *policy) {
cpufreq_frequency_table_put_attr(policy->cpu);
return 0;
}
static struct freq_attr* powernow_table_attr[] = {
&cpufreq_freq_attr_scaling_available_freqs,
NULL,
};
static struct cpufreq_driver powernow_driver = {
.verify = powernow_verify,
.target = powernow_target,
.init = powernow_cpu_init,
.exit = powernow_cpu_exit,
.name = "powernow-k7",
.owner = THIS_MODULE,
.attr = powernow_table_attr,
};
static int __init powernow_init (void)
......
......@@ -802,6 +802,8 @@ powernowk8_cpu_init(struct cpufreq_policy *pol)
return -EINVAL;
}
cpufreq_frequency_table_get_attr(powernow_table, pol->cpu);
printk(KERN_INFO PFX "cpu_init done, current fid 0x%x, vid 0x%x\n",
currfid, currvid);
......@@ -813,12 +815,19 @@ static int __exit powernowk8_cpu_exit (struct cpufreq_policy *pol)
if (pol->cpu != 0)
return -EINVAL;
cpufreq_frequency_table_put_attr(pol->cpu);
if (powernow_table)
kfree(powernow_table);
return 0;
}
static struct freq_attr* powernow_k8_attr[] = {
&cpufreq_freq_attr_scaling_available_freqs,
NULL,
};
static struct cpufreq_driver cpufreq_amd64_driver = {
.verify = powernowk8_verify,
.target = powernowk8_target,
......@@ -826,6 +835,7 @@ static struct cpufreq_driver cpufreq_amd64_driver = {
.exit = powernowk8_cpu_exit,
.name = "powernow-k8",
.owner = THIS_MODULE,
.attr = powernow_k8_attr,
};
......
......@@ -303,16 +303,37 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
policy->cur = speed;
return cpufreq_frequency_table_cpuinfo(policy, &speedstep_freqs[0]);
result = cpufreq_frequency_table_cpuinfo(policy, speedstep_freqs);
if (result)
return (result);
cpufreq_frequency_table_get_attr(speedstep_freqs, policy->cpu);
return 0;
}
static int speedstep_cpu_exit(struct cpufreq_policy *policy)
{
cpufreq_frequency_table_put_attr(policy->cpu);
return 0;
}
static struct freq_attr* speedstep_attr[] = {
&cpufreq_freq_attr_scaling_available_freqs,
NULL,
};
static struct cpufreq_driver speedstep_driver = {
.name = "speedstep-ich",
.verify = speedstep_verify,
.target = speedstep_target,
.init = speedstep_cpu_init,
.exit = speedstep_cpu_exit,
.owner = THIS_MODULE,
.attr = speedstep_attr,
};
......
......@@ -286,7 +286,20 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
policy->cur = speed;
return cpufreq_frequency_table_cpuinfo(policy, &speedstep_freqs[0]);
result = cpufreq_frequency_table_cpuinfo(policy, speedstep_freqs);
if (result)
return (result);
cpufreq_frequency_table_get_attr(speedstep_freqs, policy->cpu);
return 0;
}
static int speedstep_cpu_exit(struct cpufreq_policy *policy)
{
cpufreq_frequency_table_put_attr(policy->cpu);
return 0;
}
......@@ -300,14 +313,20 @@ static int speedstep_resume(struct cpufreq_policy *policy)
return result;
}
static struct freq_attr* speedstep_attr[] = {
&cpufreq_freq_attr_scaling_available_freqs,
NULL,
};
static struct cpufreq_driver speedstep_driver = {
.name = "speedstep-smi",
.verify = speedstep_verify,
.target = speedstep_target,
.init = speedstep_cpu_init,
.exit = speedstep_cpu_exit,
.resume = speedstep_resume,
.owner = THIS_MODULE,
.attr = speedstep_attr,
};
/**
......
......@@ -11,7 +11,6 @@
* This file handles the architecture-dependent parts of process handling..
*/
#define __KERNEL_SYSCALLS__
#include <stdarg.h>
#include <linux/errno.h>
......@@ -23,7 +22,6 @@
#include <linux/smp.h>
#include <linux/smp_lock.h>
#include <linux/stddef.h>
#include <linux/unistd.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/user.h>
......
......@@ -553,80 +553,6 @@ config MAC_SCC
tristate "Macintosh serial support"
depends on MAC
config ADB
bool "Apple Desktop Bus (ADB) support"
depends on MAC
help
Apple Desktop Bus (ADB) support is for support of devices which
are connected to an ADB port. ADB devices tend to have 4 pins.
If you have an Apple Macintosh prior to the iMac, or a
"Blue and White G3", you probably want to say Y here. Otherwise
say N.
config ADB_MACII
bool "Include Mac II ADB driver"
depends on ADB
help
Say Y here if want your kernel to support Macintosh systems that use
the Mac II style ADB. This includes the II, IIx, IIcx, SE/30, IIci,
Quadra 610, Quadra 650, Quadra 700, Quadra 800, Centris 610 and
Centris 650.
config ADB_MACIISI
bool "Include Mac IIsi ADB driver"
depends on ADB
help
Say Y here if want your kernel to support Macintosh systems that use
the Mac IIsi style ADB. This includes the IIsi, IIvi, IIvx, Classic
II, LC, LC II, LC III, Performa 460, and the Performa 600.
config ADB_CUDA
bool "Include CUDA ADB driver"
depends on ADB
help
This provides support for CUDA based Power Macintosh systems. This
includes most OldWorld PowerMacs, the first generation iMacs, the
Blue&White G3 and the Yikes G4 (PCI Graphics). All later models
should use CONFIG_ADB_PMU instead.
If unsure say Y.
config ADB_IOP
bool "Include IOP (IIfx/Quadra 9x0) ADB driver"
depends on ADB
help
The I/O Processor (IOP) is an Apple custom IC designed to provide
intelligent support for I/O controllers. It is described at
<http://www.angelfire.com/ca2/dev68k/iopdesc.html> to enable direct
support for it, say 'Y' here.
config ADB_PMU68K
bool "Include PMU (Powerbook) ADB driver"
depends on ADB
help
Say Y here if want your kernel to support the m68k based Powerbooks.
This includes the PowerBook 140, PowerBook 145, PowerBook 150,
PowerBook 160, PowerBook 165, PowerBook 165c, PowerBook 170,
PowerBook 180, PowerBook, 180c, PowerBook 190cs, PowerBook 520,
PowerBook Duo 210, PowerBook Duo 230, PowerBook Duo 250,
PowerBook Duo 270c, PowerBook Duo 280 and PowerBook Duo 280c.
config INPUT_ADBHID
bool "Use input layer for ADB devices"
depends on MAC && INPUT=y
---help---
Say Y here if you want to have ADB (Apple Desktop Bus) HID devices
such as keyboards, mice, joysticks, or graphic tablets handled by
the input layer. If you say Y here, make sure to say Y to the
corresponding drivers "Keyboard support" (CONFIG_INPUT_KEYBDEV),
"Mouse Support" (CONFIG_INPUT_MOUSEDEV) and "Event interface
support" (CONFIG_INPUT_EVDEV) as well.
If you say N here, you still have the option of using the old ADB
keyboard and mouse drivers.
If unsure, say Y.
config MAC_HID
bool
depends on INPUT_ADBHID
......@@ -646,18 +572,6 @@ config MAC_ADBKEYCODES
If unsure, say Y here.
config MAC_EMUMOUSEBTN
bool "Support for mouse button 2+3 emulation"
depends on INPUT_ADBHID
help
This provides generic support for emulating the 2nd and 3rd mouse
button with keypresses. If you say Y here, the emulation is still
disabled by default. The emulation is controlled by these sysctl
entries:
/proc/sys/dev/mac_hid/mouse_button_emulation
/proc/sys/dev/mac_hid/mouse_button2_keycode
/proc/sys/dev/mac_hid/mouse_button3_keycode
config ADB_KEYBOARD
bool "Support for ADB keyboard (old driver)"
depends on MAC && !INPUT_ADBHID
......
......@@ -355,7 +355,6 @@ CONFIG_MOUSE_PS2=y
#
# CONFIG_VT is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_LEDMAN is not set
# CONFIG_RESETSWITCH is not set
#
......
......@@ -604,7 +604,7 @@ static void setup_frame (int sig, struct k_sigaction *ka,
struct pt_regs *tregs =
(struct pt_regs *)((ulong)regs + regs->stkadj);
#if DEBUG
printk("Performing stackadjust=%04x\n", regs->stkadj);
printk(KERN_DEBUG "Performing stackadjust=%04x\n", regs->stkadj);
#endif
/* This must be copied with decreasing addresses to
handle overlaps. */
......@@ -673,7 +673,7 @@ static void setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info,
struct pt_regs *tregs =
(struct pt_regs *)((ulong)regs + regs->stkadj);
#if DEBUG
printk("Performing stackadjust=%04x\n", regs->stkadj);
printk(KERN_DEBUG "Performing stackadjust=%04x\n", regs->stkadj);
#endif
/* This must be copied with decreasing addresses to
handle overlaps. */
......
......@@ -250,6 +250,98 @@ config SHARED_KERNEL
You should only select this option if you know what you are
doing and want to exploit this feature.
config CMM
tristate "Cooperative memory management"
help
Select this option, if you want to enable the kernel interface
to reduce the memory size of the system. This is accomplished
by allocating pages of memory and put them "on hold". This only
makes sense for a system running under VM where the unused pages
will be reused by VM for other guest systems. The interface
allows an external monitor to balance memory of many systems.
Everybody who wants to run Linux under VM should select this
option.
config CMM_PROC
bool "/proc interface to cooperative memory management"
depends on CMM
help
Select this option to enable the /proc interface to the
cooperative memory management.
config CMM_IUCV
bool "IUCV special message interface to cooperative memory management"
depends on CMM && (SMSGIUCV=y || CMM=SMSGIUCV)
help
Select this option to enable the special message interface to
the cooperative memory management.
config VIRT_TIMER
bool "Virtual CPU timer support"
help
This provides a kernel interface for virtual CPU timers.
Default is disabled.
config APPLDATA_BASE
bool "Linux - VM Monitor Stream, base infrastructure"
depends on PROC_FS && VIRT_TIMER=y
help
This provides a kernel interface for creating and updating z/VM APPLDATA
monitor records. The monitor records are updated at certain time
intervals, once the timer is started.
Writing 1 or 0 to /proc/appldata/timer starts(1) or stops(0) the timer,
i.e. enables or disables monitoring on the Linux side.
A custom interval value (in seconds) can be written to
/proc/appldata/interval.
Defaults are 60 seconds interval and timer off.
The /proc entries can also be read from, showing the current settings.
config APPLDATA_MEM
tristate "Monitor memory management statistics"
depends on APPLDATA_BASE
help
This provides memory management related data to the Linux - VM Monitor
Stream, like paging/swapping rate, memory utilisation, etc.
Writing 1 or 0 to /proc/appldata/memory creates(1) or removes(0) a z/VM
APPLDATA monitor record, i.e. enables or disables monitoring this record
on the z/VM side.
Default is disabled.
The /proc entry can also be read from, showing the current settings.
This can also be compiled as a module, which will be called
appldata_mem.o.
config APPLDATA_OS
tristate "Monitor OS statistics"
depends on APPLDATA_BASE
help
This provides OS related data to the Linux - VM Monitor Stream, like
CPU utilisation, etc.
Writing 1 or 0 to /proc/appldata/os creates(1) or removes(0) a z/VM
APPLDATA monitor record, i.e. enables or disables monitoring this record
on the z/VM side.
Default is disabled.
This can also be compiled as a module, which will be called
appldata_os.o.
config APPLDATA_NET_SUM
tristate "Monitor overall network statistics"
depends on APPLDATA_BASE
help
This provides network related data to the Linux - VM Monitor Stream,
currently there is only a total sum of network I/O statistics, no
per-interface data.
Writing 1 or 0 to /proc/appldata/net_sum creates(1) or removes(0) a z/VM
APPLDATA monitor record, i.e. enables or disables monitoring this record
on the z/VM side.
Default is disabled.
This can also be compiled as a module, which will be called
appldata_net_sum.o.
endmenu
config PCMCIA
......
......@@ -35,6 +35,7 @@ cflags-$(CONFIG_MARCH_Z990) += $(call check_gcc,-march=z990,)
CFLAGS += $(cflags-y)
CFLAGS += $(call check_gcc,-finline-limit=10000,)
CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare
CFLAGS += -mbackchain
OBJCOPYFLAGS := -O binary
LDFLAGS_vmlinux := -e start
......@@ -43,7 +44,8 @@ head-$(CONFIG_ARCH_S390_31) += arch/$(ARCH)/kernel/head.o
head-$(CONFIG_ARCH_S390X) += arch/$(ARCH)/kernel/head64.o
head-y += arch/$(ARCH)/kernel/init_task.o
core-y += arch/$(ARCH)/mm/ arch/$(ARCH)/kernel/
core-y += arch/$(ARCH)/mm/ arch/$(ARCH)/kernel/ \
arch/$(ARCH)/appldata/
libs-y += arch/$(ARCH)/lib/
drivers-y += drivers/s390/
drivers-$(CONFIG_MATHEMU) += arch/$(ARCH)/math-emu/
......
#
# Makefile for the Linux - z/VM Monitor Stream.
#
obj-$(CONFIG_APPLDATA_BASE) += appldata_base.o
obj-$(CONFIG_APPLDATA_MEM) += appldata_mem.o
obj-$(CONFIG_APPLDATA_OS) += appldata_os.o
obj-$(CONFIG_APPLDATA_NET_SUM) += appldata_net_sum.o
/*
* arch/s390/appldata/appldata.h
*
* Definitions and interface for Linux - z/VM Monitor Stream.
*
* Copyright (C) 2003 IBM Corporation, IBM Deutschland Entwicklung GmbH.
*
* Author: Gerald Schaefer <geraldsc@de.ibm.com>
*/
//#define APPLDATA_DEBUG /* Debug messages on/off */
#define APPLDATA_MAX_REC_SIZE 4024 /* Maximum size of the */
/* data buffer */
#define APPLDATA_MAX_PROCS 100
#define APPLDATA_PROC_NAME_LENGTH 16 /* Max. length of /proc name */
#define APPLDATA_RECORD_MEM_ID 0x01 /* IDs to identify the */
#define APPLDATA_RECORD_OS_ID 0x02 /* individual records, */
#define APPLDATA_RECORD_NET_SUM_ID 0x03 /* must be < 256 ! */
#define APPLDATA_RECORD_PROC_ID 0x04
#define CTL_APPLDATA 2120 /* sysctl IDs, must be unique */
#define CTL_APPLDATA_TIMER 2121
#define CTL_APPLDATA_INTERVAL 2122
#define CTL_APPLDATA_MEM 2123
#define CTL_APPLDATA_OS 2124
#define CTL_APPLDATA_NET_SUM 2125
#define CTL_APPLDATA_PROC 2126
#define P_INFO(x...) printk(KERN_INFO MY_PRINT_NAME " info: " x)
#define P_ERROR(x...) printk(KERN_ERR MY_PRINT_NAME " error: " x)
#define P_WARNING(x...) printk(KERN_WARNING MY_PRINT_NAME " status: " x)
#ifdef APPLDATA_DEBUG
#define P_DEBUG(x...) printk(KERN_DEBUG MY_PRINT_NAME " debug: " x)
#else
#define P_DEBUG(x...) do {} while (0)
#endif
struct appldata_ops {
struct list_head list;
struct ctl_table_header *sysctl_header;
struct ctl_table *ctl_table;
int active; /* monitoring status */
/* fill in from here */
unsigned int ctl_nr; /* sysctl ID */
char name[APPLDATA_PROC_NAME_LENGTH]; /* name of /proc fs node */
unsigned char record_nr; /* Record Nr. for Product ID */
void (*callback)(void *data); /* callback function */
void *data; /* record data */
unsigned int size; /* size of record */
struct module *owner; /* THIS_MODULE */
};
extern int appldata_register_ops(struct appldata_ops *ops);
extern void appldata_unregister_ops(struct appldata_ops *ops);
This diff is collapsed.
/*
* arch/s390/appldata/appldata_mem.c
*
* Data gathering module for Linux-VM Monitor Stream, Stage 1.
* Collects data related to memory management.
*
* Copyright (C) 2003 IBM Corporation, IBM Deutschland Entwicklung GmbH.
*
* Author: Gerald Schaefer <geraldsc@de.ibm.com>
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/kernel_stat.h>
#include <asm/io.h>
#include <linux/pagemap.h>
#include <linux/swap.h>
#include "appldata.h"
#define MY_PRINT_NAME "appldata_mem" /* for debug messages, etc. */
#define P2K(x) ((x) << (PAGE_SHIFT - 10)) /* Converts #Pages to KB */
/*
* Memory data
*/
struct appldata_mem_data {
u64 timestamp;
u32 sync_count_1; /* after VM collected the record data, */
u32 sync_count_2; /* sync_count_1 and sync_count_2 should be the
same. If not, the record has been updated on
the Linux side while VM was collecting the
(possibly corrupt) data */
u64 pgpgin; /* data read from disk */
u64 pgpgout; /* data written to disk */
u64 pswpin; /* pages swapped in */
u64 pswpout; /* pages swapped out */
u64 sharedram; /* sharedram is currently set to 0 */
u64 totalram; /* total main memory size */
u64 freeram; /* free main memory size */
u64 totalhigh; /* total high memory size */
u64 freehigh; /* free high memory size */
u64 bufferram; /* memory reserved for buffers, free cache */
u64 cached; /* size of (used) cache, w/o buffers */
u64 totalswap; /* total swap space size */
u64 freeswap; /* free swap space */
// New in 2.6 -->
u64 pgalloc; /* page allocations */
u64 pgfault; /* page faults (major+minor) */
u64 pgmajfault; /* page faults (major only) */
// <-- New in 2.6
} appldata_mem_data;
static inline void appldata_debug_print(struct appldata_mem_data *mem_data)
{
P_DEBUG("--- MEM - RECORD ---\n");
P_DEBUG("pgpgin = %8lu KB\n", mem_data->pgpgin);
P_DEBUG("pgpgout = %8lu KB\n", mem_data->pgpgout);
P_DEBUG("pswpin = %8lu Pages\n", mem_data->pswpin);
P_DEBUG("pswpout = %8lu Pages\n", mem_data->pswpout);
P_DEBUG("pgalloc = %8lu \n", mem_data->pgalloc);
P_DEBUG("pgfault = %8lu \n", mem_data->pgfault);
P_DEBUG("pgmajfault = %8lu \n", mem_data->pgmajfault);
P_DEBUG("sharedram = %8lu KB\n", mem_data->sharedram);
P_DEBUG("totalram = %8lu KB\n", mem_data->totalram);
P_DEBUG("freeram = %8lu KB\n", mem_data->freeram);
P_DEBUG("totalhigh = %8lu KB\n", mem_data->totalhigh);
P_DEBUG("freehigh = %8lu KB\n", mem_data->freehigh);
P_DEBUG("bufferram = %8lu KB\n", mem_data->bufferram);
P_DEBUG("cached = %8lu KB\n", mem_data->cached);
P_DEBUG("totalswap = %8lu KB\n", mem_data->totalswap);
P_DEBUG("freeswap = %8lu KB\n", mem_data->freeswap);
P_DEBUG("sync_count_1 = %u\n", mem_data->sync_count_1);
P_DEBUG("sync_count_2 = %u\n", mem_data->sync_count_2);
P_DEBUG("timestamp = %lX\n", mem_data->timestamp);
}
/*
* appldata_get_mem_data()
*
* gather memory data
*/
static void appldata_get_mem_data(void *data)
{
struct sysinfo val;
struct page_state ps;
struct appldata_mem_data *mem_data;
mem_data = data;
mem_data->sync_count_1++;
get_full_page_state(&ps);
mem_data->pgpgin = ps.pgpgin >> 1;
mem_data->pgpgout = ps.pgpgout >> 1;
mem_data->pswpin = ps.pswpin;
mem_data->pswpout = ps.pswpout;
mem_data->pgalloc = ps.pgalloc;
mem_data->pgfault = ps.pgfault;
mem_data->pgmajfault = ps.pgmajfault;
P_DEBUG("pgalloc = %lu, pgfree = %lu\n", ps.pgalloc, ps.pgfree);
si_meminfo(&val);
mem_data->sharedram = val.sharedram;
mem_data->totalram = P2K(val.totalram);
mem_data->freeram = P2K(val.freeram);
mem_data->totalhigh = P2K(val.totalhigh);
mem_data->freehigh = P2K(val.freehigh);
mem_data->bufferram = P2K(val.bufferram);
mem_data->cached = P2K(atomic_read(&nr_pagecache) - val.bufferram);
si_swapinfo(&val);
mem_data->totalswap = P2K(val.totalswap);
mem_data->freeswap = P2K(val.freeswap);
mem_data->timestamp = get_clock();
mem_data->sync_count_2++;
#ifdef APPLDATA_DEBUG
appldata_debug_print(mem_data);
#endif
}
static struct appldata_ops ops = {
.ctl_nr = CTL_APPLDATA_MEM,
.name = "mem",
.record_nr = APPLDATA_RECORD_MEM_ID,
.size = sizeof(struct appldata_mem_data),
.callback = &appldata_get_mem_data,
.data = &appldata_mem_data,
.owner = THIS_MODULE,
};
/*
* appldata_mem_init()
*
* init_data, register ops
*/
static int __init appldata_mem_init(void)
{
int rc;
P_DEBUG("sizeof(mem) = %lu\n", sizeof(struct appldata_mem_data));
rc = appldata_register_ops(&ops);
if (rc != 0) {
P_ERROR("Error registering ops, rc = %i\n", rc);
} else {
P_DEBUG("%s-ops registered!\n", ops.name);
}
return rc;
}
/*
* appldata_mem_exit()
*
* unregister ops
*/
static void __exit appldata_mem_exit(void)
{
appldata_unregister_ops(&ops);
P_DEBUG("%s-ops unregistered!\n", ops.name);
}
module_init(appldata_mem_init);
module_exit(appldata_mem_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Gerald Schaefer");
MODULE_DESCRIPTION("Linux-VM Monitor Stream, MEMORY statistics");
/*
* arch/s390/appldata/appldata_net_sum.c
*
* Data gathering module for Linux-VM Monitor Stream, Stage 1.
* Collects accumulated network statistics (Packets received/transmitted,
* dropped, errors, ...).
*
* Copyright (C) 2003 IBM Corporation, IBM Deutschland Entwicklung GmbH.
*
* Author: Gerald Schaefer <geraldsc@de.ibm.com>
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/kernel_stat.h>
#include <linux/netdevice.h>
#include "appldata.h"
#define MY_PRINT_NAME "appldata_net_sum" /* for debug messages, etc. */
/*
* Network data
*/
struct appldata_net_sum_data {
u64 timestamp;
u32 sync_count_1; /* after VM collected the record data, */
u32 sync_count_2; /* sync_count_1 and sync_count_2 should be the
same. If not, the record has been updated on
the Linux side while VM was collecting the
(possibly corrupt) data */
u32 nr_interfaces; /* nr. of network interfaces being monitored */
u32 padding; /* next value is 64-bit aligned, so these */
/* 4 byte would be padded out by compiler */
u64 rx_packets; /* total packets received */
u64 tx_packets; /* total packets transmitted */
u64 rx_bytes; /* total bytes received */
u64 tx_bytes; /* total bytes transmitted */
u64 rx_errors; /* bad packets received */
u64 tx_errors; /* packet transmit problems */
u64 rx_dropped; /* no space in linux buffers */
u64 tx_dropped; /* no space available in linux */
u64 collisions; /* collisions while transmitting */
} appldata_net_sum_data;
static inline void appldata_print_debug(struct appldata_net_sum_data *net_data)
{
P_DEBUG("--- NET - RECORD ---\n");
P_DEBUG("nr_interfaces = %u\n", net_data->nr_interfaces);
P_DEBUG("rx_packets = %8lu\n", net_data->rx_packets);
P_DEBUG("tx_packets = %8lu\n", net_data->tx_packets);
P_DEBUG("rx_bytes = %8lu\n", net_data->rx_bytes);
P_DEBUG("tx_bytes = %8lu\n", net_data->tx_bytes);
P_DEBUG("rx_errors = %8lu\n", net_data->rx_errors);
P_DEBUG("tx_errors = %8lu\n", net_data->tx_errors);
P_DEBUG("rx_dropped = %8lu\n", net_data->rx_dropped);
P_DEBUG("tx_dropped = %8lu\n", net_data->tx_dropped);
P_DEBUG("collisions = %8lu\n", net_data->collisions);
P_DEBUG("sync_count_1 = %u\n", net_data->sync_count_1);
P_DEBUG("sync_count_2 = %u\n", net_data->sync_count_2);
P_DEBUG("timestamp = %lX\n", net_data->timestamp);
}
/*
* appldata_get_net_sum_data()
*
* gather accumulated network statistics
*/
static void appldata_get_net_sum_data(void *data)
{
int i;
struct appldata_net_sum_data *net_data;
struct net_device *dev;
struct net_device_stats *stats;
unsigned long rx_packets, tx_packets, rx_bytes, tx_bytes, rx_errors,
tx_errors, rx_dropped, tx_dropped, collisions;
net_data = data;
net_data->sync_count_1++;
i = 0;
rx_packets = 0;
tx_packets = 0;
rx_bytes = 0;
tx_bytes = 0;
rx_errors = 0;
tx_errors = 0;
rx_dropped = 0;
tx_dropped = 0;
collisions = 0;
read_lock(&dev_base_lock);
for (dev = dev_base; dev != NULL; dev = dev->next) {
if (dev->get_stats == NULL) {
continue;
}
stats = dev->get_stats(dev);
rx_packets += stats->rx_packets;
tx_packets += stats->tx_packets;
rx_bytes += stats->rx_bytes;
tx_bytes += stats->tx_bytes;
rx_errors += stats->rx_errors;
tx_errors += stats->tx_errors;
rx_dropped += stats->rx_dropped;
tx_dropped += stats->tx_dropped;
collisions += stats->collisions;
i++;
}
read_unlock(&dev_base_lock);
net_data->nr_interfaces = i;
net_data->rx_packets = rx_packets;
net_data->tx_packets = tx_packets;
net_data->rx_bytes = rx_bytes;
net_data->tx_bytes = tx_bytes;
net_data->rx_errors = rx_errors;
net_data->tx_errors = tx_errors;
net_data->rx_dropped = rx_dropped;
net_data->tx_dropped = tx_dropped;
net_data->collisions = collisions;
net_data->timestamp = get_clock();
net_data->sync_count_2++;
#ifdef APPLDATA_DEBUG
appldata_print_debug(net_data);
#endif
}
static struct appldata_ops ops = {
.ctl_nr = CTL_APPLDATA_NET_SUM,
.name = "net_sum",
.record_nr = APPLDATA_RECORD_NET_SUM_ID,
.size = sizeof(struct appldata_net_sum_data),
.callback = &appldata_get_net_sum_data,
.data = &appldata_net_sum_data,
.owner = THIS_MODULE,
};
/*
* appldata_net_init()
*
* init data, register ops
*/
static int __init appldata_net_init(void)
{
int rc;
P_DEBUG("sizeof(net) = %lu\n", sizeof(struct appldata_net_sum_data));
rc = appldata_register_ops(&ops);
if (rc != 0) {
P_ERROR("Error registering ops, rc = %i\n", rc);
} else {
P_DEBUG("%s-ops registered!\n", ops.name);
}
return rc;
}
/*
* appldata_net_exit()
*
* unregister ops
*/
static void __exit appldata_net_exit(void)
{
appldata_unregister_ops(&ops);
P_DEBUG("%s-ops unregistered!\n", ops.name);
}
module_init(appldata_net_init);
module_exit(appldata_net_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Gerald Schaefer");
MODULE_DESCRIPTION("Linux-VM Monitor Stream, accumulated network statistics");
/*
* arch/s390/appldata/appldata_os.c
*
* Data gathering module for Linux-VM Monitor Stream, Stage 1.
* Collects misc. OS related data (CPU utilization, running processes).
*
* Copyright (C) 2003 IBM Corporation, IBM Deutschland Entwicklung GmbH.
*
* Author: Gerald Schaefer <geraldsc@de.ibm.com>
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/kernel_stat.h>
#include <linux/netdevice.h>
#include <linux/sched.h>
#include <asm/smp.h>
#include "appldata.h"
#define MY_PRINT_NAME "appldata_os" /* for debug messages, etc. */
#define LOAD_INT(x) ((x) >> FSHIFT)
#define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
/*
* OS data
*/
struct appldata_os_per_cpu {
u32 per_cpu_user; /* timer ticks spent in user mode */
u32 per_cpu_nice; /* ... spent with modified priority */
u32 per_cpu_system; /* ... spent in kernel mode */
u32 per_cpu_idle; /* ... spent in idle mode */
// New in 2.6 -->
u32 per_cpu_irq; /* ... spent in interrupts */
u32 per_cpu_softirq; /* ... spent in softirqs */
u32 per_cpu_iowait; /* ... spent while waiting for I/O */
// <-- New in 2.6
};
struct appldata_os_data {
u64 timestamp;
u32 sync_count_1; /* after VM collected the record data, */
u32 sync_count_2; /* sync_count_1 and sync_count_2 should be the
same. If not, the record has been updated on
the Linux side while VM was collecting the
(possibly corrupt) data */
u32 nr_cpus; /* number of (virtual) CPUs */
u32 per_cpu_size; /* size of the per-cpu data struct */
u32 cpu_offset; /* offset of the first per-cpu data struct */
u32 nr_running; /* number of runnable threads */
u32 nr_threads; /* number of threads */
u32 avenrun[3]; /* average nr. of running processes during */
/* the last 1, 5 and 15 minutes */
// New in 2.6 -->
u32 nr_iowait; /* number of blocked threads
(waiting for I/O) */
// <-- New in 2.6
/* per cpu data */
struct appldata_os_per_cpu os_cpu[0];
};
static struct appldata_os_data *appldata_os_data;
static inline void appldata_print_debug(struct appldata_os_data *os_data)
{
int a0, a1, a2, i;
P_DEBUG("--- OS - RECORD ---\n");
P_DEBUG("nr_threads = %u\n", os_data->nr_threads);
P_DEBUG("nr_running = %u\n", os_data->nr_running);
P_DEBUG("nr_iowait = %u\n", os_data->nr_iowait);
P_DEBUG("avenrun(int) = %8x / %8x / %8x\n", os_data->avenrun[0],
os_data->avenrun[1], os_data->avenrun[2]);
a0 = os_data->avenrun[0];
a1 = os_data->avenrun[1];
a2 = os_data->avenrun[2];
P_DEBUG("avenrun(float) = %d.%02d / %d.%02d / %d.%02d\n",
LOAD_INT(a0), LOAD_FRAC(a0), LOAD_INT(a1), LOAD_FRAC(a1),
LOAD_INT(a2), LOAD_FRAC(a2));
P_DEBUG("nr_cpus = %u\n", os_data->nr_cpus);
for (i = 0; i < NR_CPUS; i++) {
if (!cpu_online(i)) continue;
P_DEBUG("cpu%u : user = %u, nice = %u, system = %u, "
"idle = %u, irq = %u, softirq = %u, iowait = %u\n",
i,
os_data->os_cpu[i].per_cpu_user,
os_data->os_cpu[i].per_cpu_nice,
os_data->os_cpu[i].per_cpu_system,
os_data->os_cpu[i].per_cpu_idle,
os_data->os_cpu[i].per_cpu_irq,
os_data->os_cpu[i].per_cpu_softirq,
os_data->os_cpu[i].per_cpu_iowait);
}
P_DEBUG("sync_count_1 = %u\n", os_data->sync_count_1);
P_DEBUG("sync_count_2 = %u\n", os_data->sync_count_2);
P_DEBUG("timestamp = %lX\n", os_data->timestamp);
}
/*
* appldata_get_os_data()
*
* gather OS data
*/
static void appldata_get_os_data(void *data)
{
int i;
struct appldata_os_data *os_data;
os_data = data;
os_data->sync_count_1++;
os_data->nr_cpus = num_online_cpus();
os_data->nr_threads = nr_threads;
os_data->nr_running = nr_running();
os_data->nr_iowait = nr_iowait();
os_data->avenrun[0] = avenrun[0] + (FIXED_1/200);
os_data->avenrun[1] = avenrun[1] + (FIXED_1/200);
os_data->avenrun[2] = avenrun[2] + (FIXED_1/200);
for (i = 0; i < num_online_cpus(); i++) {
os_data->os_cpu[i].per_cpu_user =
kstat_cpu(i).cpustat.user;
os_data->os_cpu[i].per_cpu_nice =
kstat_cpu(i).cpustat.nice;
os_data->os_cpu[i].per_cpu_system =
kstat_cpu(i).cpustat.system;
os_data->os_cpu[i].per_cpu_idle =
kstat_cpu(i).cpustat.idle;
os_data->os_cpu[i].per_cpu_irq =
kstat_cpu(i).cpustat.irq;
os_data->os_cpu[i].per_cpu_softirq =
kstat_cpu(i).cpustat.softirq;
os_data->os_cpu[i].per_cpu_iowait =
kstat_cpu(i).cpustat.iowait;
}
os_data->timestamp = get_clock();
os_data->sync_count_2++;
#ifdef APPLDATA_DEBUG
appldata_print_debug(os_data);
#endif
}
static struct appldata_ops ops = {
.ctl_nr = CTL_APPLDATA_OS,
.name = "os",
.record_nr = APPLDATA_RECORD_OS_ID,
.callback = &appldata_get_os_data,
.owner = THIS_MODULE,
};
/*
* appldata_os_init()
*
* init data, register ops
*/
static int __init appldata_os_init(void)
{
int rc, size;
size = sizeof(struct appldata_os_data) +
(NR_CPUS * sizeof(struct appldata_os_per_cpu));
if (size > APPLDATA_MAX_REC_SIZE) {
P_ERROR("Size of record = %i, bigger than maximum (%i)!\n",
size, APPLDATA_MAX_REC_SIZE);
rc = -ENOMEM;
goto out;
}
P_DEBUG("sizeof(os) = %i, sizeof(os_cpu) = %lu\n", size,
sizeof(struct appldata_os_per_cpu));
appldata_os_data = kmalloc(size, GFP_DMA);
if (appldata_os_data == NULL) {
P_ERROR("No memory for %s!\n", ops.name);
rc = -ENOMEM;
goto out;
}
memset(appldata_os_data, 0, size);
appldata_os_data->per_cpu_size = sizeof(struct appldata_os_per_cpu);
appldata_os_data->cpu_offset = offsetof(struct appldata_os_data,
os_cpu);
P_DEBUG("cpu offset = %u\n", appldata_os_data->cpu_offset);
ops.data = appldata_os_data;
ops.size = size;
rc = appldata_register_ops(&ops);
if (rc != 0) {
P_ERROR("Error registering ops, rc = %i\n", rc);
kfree(appldata_os_data);
} else {
P_DEBUG("%s-ops registered!\n", ops.name);
}
out:
return rc;
}
/*
* appldata_os_exit()
*
* unregister ops
*/
static void __exit appldata_os_exit(void)
{
appldata_unregister_ops(&ops);
kfree(appldata_os_data);
P_DEBUG("%s-ops unregistered!\n", ops.name);
}
module_init(appldata_os_init);
module_exit(appldata_os_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Gerald Schaefer");
MODULE_DESCRIPTION("Linux-VM Monitor Stream, OS statistics");
......@@ -76,6 +76,8 @@ CONFIG_BINFMT_MISC=m
# CONFIG_PROCESS_DEBUG is not set
CONFIG_PFAULT=y
# CONFIG_SHARED_KERNEL is not set
# CONFIG_CMM is not set
# CONFIG_VIRT_TIMER is not set
# CONFIG_PCMCIA is not set
#
......@@ -132,11 +134,13 @@ CONFIG_BLK_DEV_INITRD=y
# S/390 block device drivers
#
CONFIG_BLK_DEV_XPRAM=m
# CONFIG_DCSSBLK is not set
CONFIG_DASD=y
# CONFIG_DASD_PROFILE is not set
CONFIG_DASD_ECKD=y
CONFIG_DASD_FBA=y
CONFIG_DASD_DIAG=y
# CONFIG_DASD_CMB is not set
#
# Multi-device support (RAID and LVM)
......@@ -311,6 +315,8 @@ CONFIG_NET_ETHERNET=y
CONFIG_LCS=m
CONFIG_CTC=m
CONFIG_IUCV=m
# CONFIG_NETIUCV is not set
# CONFIG_SMSGIUCV is not set
CONFIG_QETH=y
#
......
......@@ -40,6 +40,9 @@
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/irq.h>
#ifdef CONFIG_VIRT_TIMER
#include <asm/timer.h>
#endif
asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
......@@ -77,6 +80,14 @@ void default_idle(void)
return;
}
#ifdef CONFIG_VIRT_TIMER
/*
* hook to stop timers that should not tick while CPU is idle
*/
if (stop_timers())
return;
#endif
/*
* Wait for external, I/O or machine check interrupt and
* switch off machine check bit after the wait has ended.
......
......@@ -111,6 +111,7 @@ void do_extint(struct pt_regs *regs, unsigned short code)
int index;
irq_enter();
asm volatile ("mc 0,0");
if (S390_lowcore.int_clock >= S390_lowcore.jiffy_timer)
account_ticks(regs);
kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++;
......
......@@ -19,6 +19,9 @@
#ifdef CONFIG_IP_MULTICAST
#include <net/arp.h>
#endif
#ifdef CONFIG_VIRT_TIMER
#include <asm/timer.h>
#endif
/*
* memory management
......@@ -29,6 +32,7 @@ EXPORT_SYMBOL_NOVERS(_zb_findmap);
EXPORT_SYMBOL_NOVERS(__copy_from_user_asm);
EXPORT_SYMBOL_NOVERS(__copy_to_user_asm);
EXPORT_SYMBOL_NOVERS(__clear_user_asm);
EXPORT_SYMBOL(diag10);
/*
* semaphore ops
......@@ -54,6 +58,7 @@ EXPORT_SYMBOL_NOVERS(strnlen);
EXPORT_SYMBOL_NOVERS(strrchr);
EXPORT_SYMBOL_NOVERS(strstr);
EXPORT_SYMBOL_NOVERS(strpbrk);
EXPORT_SYMBOL_NOVERS(strcpy);
/*
* binfmt_elf loader
......@@ -64,6 +69,17 @@ EXPORT_SYMBOL(overflowuid);
EXPORT_SYMBOL(overflowgid);
EXPORT_SYMBOL(empty_zero_page);
/*
* virtual CPU timer
*/
#ifdef CONFIG_VIRT_TIMER
EXPORT_SYMBOL(init_virt_timer);
EXPORT_SYMBOL(add_virt_timer);
EXPORT_SYMBOL(add_virt_timer_periodic);
EXPORT_SYMBOL(mod_virt_timer);
EXPORT_SYMBOL(del_virt_timer);
#endif
/*
* misc.
*/
......@@ -76,5 +92,5 @@ EXPORT_SYMBOL(console_device);
EXPORT_SYMBOL_NOVERS(do_call_softirq);
EXPORT_SYMBOL(sys_wait4);
EXPORT_SYMBOL(cpcmd);
EXPORT_SYMBOL(smp_call_function_on);
EXPORT_SYMBOL(sys_ioctl);
......@@ -33,8 +33,9 @@ static inline int __sem_update_count(struct semaphore *sem, int incr)
" cs %0,%1,0(%3)\n"
" jl 0b\n"
: "=&d" (old_val), "=&d" (new_val),
"+m" (sem->count)
: "a" (&sem->count), "d" (incr) : "cc" );
"=m" (sem->count)
: "a" (&sem->count), "d" (incr), "m" (sem->count)
: "cc" );
return old_val;
}
......
......@@ -30,6 +30,7 @@
#include <linux/delay.h>
#include <linux/cache.h>
#include <linux/interrupt.h>
#include <asm/sigp.h>
#include <asm/pgalloc.h>
......@@ -65,7 +66,7 @@ extern char vmpoff_cmd[];
extern void do_reipl(unsigned long devno);
static sigp_ccode smp_ext_bitcall(int, ec_bit_sig);
static void smp_ext_bitcall(int, ec_bit_sig);
static void smp_ext_bitcall_others(ec_bit_sig);
/*
......@@ -150,6 +151,59 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
return 0;
}
/*
* Call a function on one CPU
* cpu : the CPU the function should be executed on
*
* You must not call this function with disabled interrupts or from a
* hardware interrupt handler. You may call it from a bottom half.
*
* It is guaranteed that the called function runs on the specified CPU,
* preemption is disabled.
*/
int smp_call_function_on(void (*func) (void *info), void *info,
int nonatomic, int wait, int cpu)
{
struct call_data_struct data;
int curr_cpu;
if (!cpu_online(cpu))
return -EINVAL;
/* disable preemption for local function call */
curr_cpu = get_cpu();
if (curr_cpu == cpu) {
/* direct call to function */
func(info);
put_cpu();
return 0;
}
data.func = func;
data.info = info;
atomic_set(&data.started, 0);
data.wait = wait;
if (wait)
atomic_set(&data.finished, 0);
spin_lock_bh(&call_lock);
call_data = &data;
smp_ext_bitcall(cpu, ec_call_function);
/* Wait for response */
while (atomic_read(&data.started) != 1)
cpu_relax();
if (wait)
while (atomic_read(&data.finished) != 1)
cpu_relax();
spin_unlock_bh(&call_lock);
put_cpu();
return 0;
}
static inline void do_send_stop(void)
{
u32 dummy;
......@@ -305,16 +359,14 @@ void do_ext_call_interrupt(struct pt_regs *regs, __u16 code)
* Send an external call sigp to another cpu and return without waiting
* for its completion.
*/
static sigp_ccode smp_ext_bitcall(int cpu, ec_bit_sig sig)
static void smp_ext_bitcall(int cpu, ec_bit_sig sig)
{
sigp_ccode ccode;
/*
* Set signaling bit in lowcore of target cpu and kick it
*/
set_bit(sig, (unsigned long *) &lowcore_ptr[cpu]->ext_call_fast);
ccode = signal_processor(cpu, sigp_external_call);
return ccode;
while(signal_processor(cpu, sigp_external_call) == sigp_busy)
udelay(10);
}
/*
......@@ -350,6 +402,7 @@ void smp_ptlb_all(void)
{
on_each_cpu(smp_ptlb_callback, NULL, 0, 1);
}
EXPORT_SYMBOL(smp_ptlb_all);
#endif /* ! CONFIG_ARCH_S390X */
/*
......
This diff is collapsed.
......@@ -64,6 +64,9 @@ extern void pfault_fini(void);
extern void pfault_interrupt(struct pt_regs *regs, __u16 error_code);
static ext_int_info_t ext_int_pfault;
#endif
#ifdef CONFIG_VIRT_TIMER
extern pgm_check_handler_t do_monitor_call;
#endif
#define stack_pointer ({ void **sp; asm("la %0,0(15)" : "=&d" (sp)); sp; })
......@@ -625,6 +628,9 @@ void __init trap_init(void)
#endif /* CONFIG_ARCH_S390X */
pgm_check_table[0x15] = &operand_exception;
pgm_check_table[0x1C] = &privileged_op;
#ifdef CONFIG_VIRT_TIMER
pgm_check_table[0x40] = &do_monitor_call;
#endif
if (MACHINE_IS_VM) {
/*
* First try to get pfault pseudo page faults going.
......
......@@ -5,5 +5,5 @@
EXTRA_AFLAGS := -traditional
lib-y += delay.o
lib-$(CONFIG_ARCH_S390_31) += memset.o strcmp.o strncpy.o uaccess.o
lib-$(CONFIG_ARCH_S390X) += memset64.o strcmp64.o strncpy64.o uaccess64.o
lib-$(CONFIG_ARCH_S390_31) += memset.o strcmp.o strcpy.o strncpy.o uaccess.o
lib-$(CONFIG_ARCH_S390X) += memset64.o strcmp64.o strcpy64.o strncpy64.o uaccess64.o
/*
* arch/s390/kernel/strcpy.S
* S390 strcpy routine
*
* S390 version
* Copyright (C) 2004 IBM Deutschland Entwicklung GmbH, IBM Corporation
* Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
*/
/*
* R2 = address of destination
* R3 = address of source string
*/
.globl strcpy
strcpy:
sr %r0,%r0
0: mvst %r2,%r3
jo 0b
br %r14
/*
* arch/s390/kernel/strcpy.S
* S390 strcpy routine
*
* S390 version
* Copyright (C) 2004 IBM Deutschland Entwicklung GmbH, IBM Corporation
* Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
*/
/*
* R2 = address of destination
* R3 = address of source string
*/
.globl strcpy
strcpy:
sgr %r0,%r0
0: mvst %r2,%r3
jo 0b
br %r14
......@@ -23,8 +23,13 @@ strncpy_loop:
LA 3,1(3)
STC 0,0(1)
LA 1,1(1)
JZ strncpy_exit # ICM inserted a 0x00
JZ strncpy_pad # ICM inserted a 0x00
BRCT 4,strncpy_loop # R4 -= 1, jump to strncpy_loop if > 0
strncpy_exit:
BR 14
strncpy_clear:
STC 0,0(1)
LA 1,1(1)
strncpy_pad:
BRCT 4,strncpy_clear
BR 14
......@@ -23,8 +23,13 @@ strncpy_loop:
LA 3,1(3)
STC 0,0(1)
LA 1,1(1)
JZ strncpy_exit # ICM inserted a 0x00
JZ strncpy_pad # ICM inserted a 0x00
BRCTG 4,strncpy_loop # R4 -= 1, jump to strncpy_loop if > 0
strncpy_exit:
BR 14
strncpy_clear:
STC 0,0(1)
LA 1,1(1)
strncpy_pad:
BRCTG 4,strncpy_clear
BR 14
......@@ -99,7 +99,6 @@ int sysctl_ieee_emulation_warnings=1;
static void display_emulation_not_implemented(struct pt_regs *regs, char *instr)
{
struct pt_regs *regs;
__u16 *location;
#ifdef CONFIG_SYSCTL
......
......@@ -2,4 +2,6 @@
# Makefile for the linux s390-specific parts of the memory manager.
#
obj-y := init.o fault.o ioremap.o
obj-y := init.o fault.o ioremap.o extmem.o
obj-$(CONFIG_CMM) += cmm.o
/*
* arch/s390/mm/cmm.c
*
* S390 version
* Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation
* Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
*
* Collaborative memory management interface.
*/
#include <linux/config.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/sysctl.h>
#include <linux/ctype.h>
#include <asm/pgalloc.h>
#include <asm/uaccess.h>
#include "../../../drivers/s390/net/smsgiucv.h"
#define CMM_NR_PAGES ((PAGE_SIZE / sizeof(unsigned long)) - 2)
struct cmm_page_array {
struct cmm_page_array *next;
unsigned long index;
unsigned long pages[CMM_NR_PAGES];
};
static long cmm_pages = 0;
static long cmm_timed_pages = 0;
static volatile long cmm_pages_target = 0;
static volatile long cmm_timed_pages_target = 0;
static long cmm_timeout_pages = 0;
static long cmm_timeout_seconds = 0;
static struct cmm_page_array *cmm_page_list = 0;
static struct cmm_page_array *cmm_timed_page_list = 0;
static unsigned long cmm_thread_active = 0;
static struct work_struct cmm_thread_starter;
static wait_queue_head_t cmm_thread_wait;
static struct timer_list cmm_timer;
static void cmm_timer_fn(unsigned long);
static void cmm_set_timer(void);
static long
cmm_strtoul(const char *cp, char **endp)
{
unsigned int base = 10;
if (*cp == '0') {
base = 8;
cp++;
if ((*cp == 'x' || *cp == 'X') && isxdigit(cp[1])) {
base = 16;
cp++;
}
}
return simple_strtoul(cp, endp, base);
}
static long
cmm_alloc_pages(long pages, long *counter, struct cmm_page_array **list)
{
struct cmm_page_array *pa;
unsigned long page;
pa = *list;
while (pages) {
page = __get_free_page(GFP_NOIO);
if (!page)
break;
if (!pa || pa->index >= CMM_NR_PAGES) {
/* Need a new page for the page list. */
pa = (struct cmm_page_array *)
__get_free_page(GFP_NOIO);
if (!pa) {
free_page(page);
break;
}
pa->next = *list;
pa->index = 0;
*list = pa;
}
if (page < 0x80000000UL)
diag10(page);
pa->pages[pa->index++] = page;
(*counter)++;
pages--;
}
return pages;
}
static void
cmm_free_pages(long pages, long *counter, struct cmm_page_array **list)
{
struct cmm_page_array *pa;
unsigned long page;
pa = *list;
while (pages) {
if (!pa || pa->index <= 0)
break;
page = pa->pages[--pa->index];
if (pa->index == 0) {
pa = pa->next;
free_page((unsigned long) *list);
*list = pa;
}
free_page(page);
(*counter)--;
pages--;
}
}
static int
cmm_thread(void *dummy)
{
int rc;
daemonize("cmmthread");
set_cpus_allowed(current, cpumask_of_cpu(0));
while (1) {
rc = wait_event_interruptible(cmm_thread_wait,
(cmm_pages != cmm_pages_target ||
cmm_timed_pages != cmm_timed_pages_target));
if (rc == -ERESTARTSYS) {
/* Got kill signal. End thread. */
clear_bit(0, &cmm_thread_active);
cmm_pages_target = cmm_pages;
cmm_timed_pages_target = cmm_timed_pages;
break;
}
if (cmm_pages_target > cmm_pages) {
if (cmm_alloc_pages(1, &cmm_pages, &cmm_page_list))
cmm_pages_target = cmm_pages;
} else if (cmm_pages_target < cmm_pages) {
cmm_free_pages(1, &cmm_pages, &cmm_page_list);
}
if (cmm_timed_pages_target > cmm_timed_pages) {
if (cmm_alloc_pages(1, &cmm_timed_pages,
&cmm_timed_page_list))
cmm_timed_pages_target = cmm_timed_pages;
} else if (cmm_timed_pages_target < cmm_timed_pages) {
cmm_free_pages(1, &cmm_timed_pages,
&cmm_timed_page_list);
}
if (cmm_timed_pages > 0 && !timer_pending(&cmm_timer))
cmm_set_timer();
}
return 0;
}
static void
cmm_start_thread(void)
{
kernel_thread(cmm_thread, 0, 0);
}
static void
cmm_kick_thread(void)
{
if (!test_and_set_bit(0, &cmm_thread_active))
schedule_work(&cmm_thread_starter);
wake_up(&cmm_thread_wait);
}
static void
cmm_set_timer(void)
{
if (cmm_timed_pages_target <= 0 || cmm_timeout_seconds <= 0) {
if (timer_pending(&cmm_timer))
del_timer(&cmm_timer);
return;
}
if (timer_pending(&cmm_timer)) {
if (mod_timer(&cmm_timer, jiffies + cmm_timeout_seconds*HZ))
return;
}
cmm_timer.function = cmm_timer_fn;
cmm_timer.data = 0;
cmm_timer.expires = jiffies + cmm_timeout_seconds*HZ;
add_timer(&cmm_timer);
}
static void
cmm_timer_fn(unsigned long ignored)
{
long pages;
pages = cmm_timed_pages_target - cmm_timeout_pages;
if (pages < 0)
cmm_timed_pages_target = 0;
else
cmm_timed_pages_target = pages;
cmm_kick_thread();
cmm_set_timer();
}
void
cmm_set_pages(long pages)
{
cmm_pages_target = pages;
cmm_kick_thread();
}
long
cmm_get_pages(void)
{
return cmm_pages;
}
void
cmm_add_timed_pages(long pages)
{
cmm_timed_pages_target += pages;
cmm_kick_thread();
}
long
cmm_get_timed_pages(void)
{
return cmm_timed_pages;
}
void
cmm_set_timeout(long pages, long seconds)
{
cmm_timeout_pages = pages;
cmm_timeout_seconds = seconds;
cmm_set_timer();
}
static inline int
cmm_skip_blanks(char *cp, char **endp)
{
char *str;
for (str = cp; *str == ' ' || *str == '\t'; str++);
*endp = str;
return str != cp;
}
#ifdef CONFIG_CMM_PROC
/* These will someday get removed. */
#define VM_CMM_PAGES 1111
#define VM_CMM_TIMED_PAGES 1112
#define VM_CMM_TIMEOUT 1113
static struct ctl_table cmm_table[];
static int
cmm_pages_handler(ctl_table *ctl, int write, struct file *filp,
void *buffer, size_t *lenp)
{
char buf[16], *p;
long pages;
int len;
if (!*lenp || (filp->f_pos && !write)) {
*lenp = 0;
return 0;
}
if (write) {
len = *lenp;
if (copy_from_user(buf, buffer,
len > sizeof(buf) ? sizeof(buf) : len))
return -EFAULT;
buf[sizeof(buf) - 1] = '\0';
cmm_skip_blanks(buf, &p);
pages = cmm_strtoul(p, &p);
if (ctl == &cmm_table[0])
cmm_set_pages(pages);
else
cmm_add_timed_pages(pages);
} else {
if (ctl == &cmm_table[0])
pages = cmm_get_pages();
else
pages = cmm_get_timed_pages();
len = sprintf(buf, "%ld\n", pages);
if (len > *lenp)
len = *lenp;
if (copy_to_user(buffer, buf, len))
return -EFAULT;
}
*lenp = len;
filp->f_pos += len;
return 0;
}
static int
cmm_timeout_handler(ctl_table *ctl, int write, struct file *filp,
void *buffer, size_t *lenp)
{
char buf[64], *p;
long pages, seconds;
int len;
if (!*lenp || (filp->f_pos && !write)) {
*lenp = 0;
return 0;
}
if (write) {
len = *lenp;
if (copy_from_user(buf, buffer,
len > sizeof(buf) ? sizeof(buf) : len))
return -EFAULT;
buf[sizeof(buf) - 1] = '\0';
cmm_skip_blanks(buf, &p);
pages = cmm_strtoul(p, &p);
cmm_skip_blanks(p, &p);
seconds = cmm_strtoul(p, &p);
cmm_set_timeout(pages, seconds);
} else {
len = sprintf(buf, "%ld %ld\n",
cmm_timeout_pages, cmm_timeout_seconds);
if (len > *lenp)
len = *lenp;
if (copy_to_user(buffer, buf, len))
return -EFAULT;
}
*lenp = len;
filp->f_pos += len;
return 0;
}
static struct ctl_table cmm_table[] = {
{
.ctl_name = VM_CMM_PAGES,
.procname = "cmm_pages",
.mode = 0600,
.proc_handler = &cmm_pages_handler,
},
{
.ctl_name = VM_CMM_TIMED_PAGES,
.procname = "cmm_timed_pages",
.mode = 0600,
.proc_handler = &cmm_pages_handler,
},
{
.ctl_name = VM_CMM_TIMEOUT,
.procname = "cmm_timeout",
.mode = 0600,
.proc_handler = &cmm_timeout_handler,
},
{ .ctl_name = 0 }
};
static struct ctl_table cmm_dir_table[] = {
{
.ctl_name = CTL_VM,
.procname = "vm",
.maxlen = 0,
.mode = 0555,
.child = cmm_table,
},
{ .ctl_name = 0 }
};
#endif
#ifdef CONFIG_CMM_IUCV
#define SMSG_PREFIX "CMM"
static void
cmm_smsg_target(char *msg)
{
long pages, seconds;
if (!cmm_skip_blanks(msg + strlen(SMSG_PREFIX), &msg))
return;
if (strncmp(msg, "SHRINK", 6) == 0) {
if (!cmm_skip_blanks(msg + 6, &msg))
return;
pages = cmm_strtoul(msg, &msg);
cmm_skip_blanks(msg, &msg);
if (*msg == '\0')
cmm_set_pages(pages);
} else if (strncmp(msg, "RELEASE", 7) == 0) {
if (!cmm_skip_blanks(msg + 7, &msg))
return;
pages = cmm_strtoul(msg, &msg);
cmm_skip_blanks(msg, &msg);
if (*msg == '\0')
cmm_add_timed_pages(pages);
} else if (strncmp(msg, "REUSE", 5) == 0) {
if (!cmm_skip_blanks(msg + 5, &msg))
return;
pages = cmm_strtoul(msg, &msg);
if (!cmm_skip_blanks(msg, &msg))
return;
seconds = cmm_strtoul(msg, &msg);
cmm_skip_blanks(msg, &msg);
if (*msg == '\0')
cmm_set_timeout(pages, seconds);
}
}
#endif
struct ctl_table_header *cmm_sysctl_header;
static int
cmm_init (void)
{
#ifdef CONFIG_CMM_PROC
cmm_sysctl_header = register_sysctl_table(cmm_dir_table, 1);
#endif
#ifdef CONFIG_CMM_IUCV
smsg_register_callback(SMSG_PREFIX, cmm_smsg_target);
#endif
INIT_WORK(&cmm_thread_starter, (void *) cmm_start_thread, 0);
init_waitqueue_head(&cmm_thread_wait);
init_timer(&cmm_timer);
return 0;
}
static void
cmm_exit(void)
{
cmm_free_pages(cmm_pages, &cmm_pages, &cmm_page_list);
cmm_free_pages(cmm_timed_pages, &cmm_timed_pages, &cmm_timed_page_list);
#ifdef CONFIG_CMM_PROC
unregister_sysctl_table(cmm_sysctl_header);
#endif
#ifdef CONFIG_CMM_IUCV
smsg_unregister_callback(SMSG_PREFIX, cmm_smsg_target);
#endif
}
module_init(cmm_init);
module_exit(cmm_exit);
EXPORT_SYMBOL(cmm_set_pages);
EXPORT_SYMBOL(cmm_get_pages);
EXPORT_SYMBOL(cmm_add_timed_pages);
EXPORT_SYMBOL(cmm_get_timed_pages);
EXPORT_SYMBOL(cmm_set_timeout);
MODULE_LICENSE("GPL");
This diff is collapsed.
......@@ -40,6 +40,19 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE)));
char empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE)));
void diag10(unsigned long addr)
{
#ifdef __s390x__
if (addr >= 0x80000000)
return;
asm volatile ("sam31\n\t"
"diag %0,%0,0x10\n\t"
"sam64" : : "a" (addr) );
#else
asm volatile ("diag %0,%0,0x10" : : "a" (addr) );
#endif
}
void show_mem(void)
{
int i, total = 0, reserved = 0;
......
This diff is collapsed.
......@@ -30,9 +30,6 @@
#include <linux/init.h>
#include <linux/slab.h>
#define __KERNEL_SYSCALLS__
#include <asm/unistd.h>
#include "h8.h"
#define DEBUG_H8
......
......@@ -40,7 +40,6 @@
#include <linux/tty.h>
#include <linux/timer.h>
#include <linux/ctype.h>
#include <linux/kd.h>
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/slab.h>
......@@ -1091,7 +1090,7 @@ static ssize_t read_chan(struct tty_struct *tty, struct file *file,
set_bit(TTY_DONT_FLIP, &tty->flags);
continue;
}
current->state = TASK_RUNNING;
__set_current_state(TASK_RUNNING);
/* Deal with packet mode. */
if (tty->packet && b == buf) {
......@@ -1170,7 +1169,7 @@ static ssize_t read_chan(struct tty_struct *tty, struct file *file,
if (!waitqueue_active(&tty->read_wait))
tty->minimum_to_wake = minimum;
current->state = TASK_RUNNING;
__set_current_state(TASK_RUNNING);
size = b - buf;
if (size) {
retval = size;
......@@ -1246,7 +1245,7 @@ static ssize_t write_chan(struct tty_struct * tty, struct file * file,
schedule();
}
break_out:
current->state = TASK_RUNNING;
__set_current_state(TASK_RUNNING);
remove_wait_queue(&tty->write_wait, &wait);
return (b - buf) ? b - buf : retval;
}
......
......@@ -1231,11 +1231,9 @@ struct r_port {
#define ROCKET_INITIALIZED 0x80000000 /* Port is active */
#define ROCKET_CLOSING 0x40000000 /* Serial port is closing */
#define ROCKET_NORMAL_ACTIVE 0x20000000 /* Normal port is active */
#define ROCKET_CALLOUT_ACTIVE 0x10000000 /* Callout port is active */
/* tty subtypes */
#define SERIAL_TYPE_NORMAL 1
#define SERIAL_TYPE_CALLOUT 2
/*
* Assigned major numbers for the Comtrol Rocketport
......
......@@ -13,7 +13,8 @@ config CPU_FREQ_PROC_INTF
choice
prompt "Default CPUFreq governor"
depends on CPU_FREQ
default CPU_FREQ_DEFAULT_GOV_PERFORMANCE
default CPU_FREQ_DEFAULT_GOV_PERFORMANCE if !CPU_FREQ_SA1100 && !CPU_FREQ_SA1110
default CPU_FREQ_DEFAULT_GOV_USERSPACE if CPU_FREQ_SA1100 || CPU_FREQ_SA1110
help
This option sets which CPUFreq governor shall be loaded at
startup. If in doubt, select 'performance'.
......
......@@ -1707,14 +1707,14 @@ isdn_close(struct inode *ino, struct file *filep)
static struct file_operations isdn_fops =
{
owner: THIS_MODULE,
llseek: no_llseek,
read: isdn_read,
write: isdn_write,
poll: isdn_poll,
ioctl: isdn_ioctl,
open: isdn_open,
release: isdn_close,
.owner = THIS_MODULE,
.llseek = no_llseek,
.read = isdn_read,
.write = isdn_write,
.poll = isdn_poll,
.ioctl = isdn_ioctl,
.open = isdn_open,
.release = isdn_close,
};
char *
......
This diff is collapsed.
......@@ -44,9 +44,6 @@
#include <linux/kmod.h>
#endif
#define __KERNEL_SYSCALLS__
#include <linux/unistd.h>
#include <asm/unaligned.h>
#define MAJOR_NR MD_MAJOR
......
......@@ -69,14 +69,14 @@ void saa7146_set_gpio(struct saa7146_dev *dev, u8 pin, u8 data)
/* This DEBI code is based on the saa7146 Stradis driver by Nathan Laredo */
int saa7146_wait_for_debi_done(struct saa7146_dev *dev)
{
int start;
unsigned long start;
/* wait for registers to be programmed */
start = jiffies;
while (1) {
if (saa7146_read(dev, MC2) & 2)
break;
if (jiffies-start > HZ/20) {
if (time_after(jiffies, start + HZ/20)) {
DEB_S(("timed out while waiting for registers getting programmed\n"));
return -ETIMEDOUT;
}
......@@ -88,7 +88,7 @@ int saa7146_wait_for_debi_done(struct saa7146_dev *dev)
if (!(saa7146_read(dev, PSR) & SPCI_DEBI_S))
break;
saa7146_read(dev, MC2);
if (jiffies-start > HZ/4) {
if (time_after(jiffies, start + HZ/4)) {
DEB_S(("timed out while waiting for transfer completion\n"));
return -ETIMEDOUT;
}
......
This diff is collapsed.
......@@ -500,7 +500,7 @@ static void flex_sram_read(struct adapter *adapter, u32 bank, u32 addr, u8 *buf,
}
}
static void sram_writeChunk(struct adapter *adapter, u32 addr, u8 *buf, u16 len)
static void sram_write_chunk(struct adapter *adapter, u32 addr, u8 *buf, u16 len)
{
u32 bank;
......@@ -520,7 +520,7 @@ static void sram_writeChunk(struct adapter *adapter, u32 addr, u8 *buf, u16 len)
flex_sram_write(adapter, bank, addr & 0x7fff, buf, len);
}
static void sram_readChunk(struct adapter *adapter, u32 addr, u8 *buf, u16 len)
static void sram_read_chunk(struct adapter *adapter, u32 addr, u8 *buf, u16 len)
{
u32 bank;
......@@ -554,7 +554,7 @@ static void sram_read(struct adapter *adapter, u32 addr, u8 *buf, u32 len)
length = (((addr >> 0x0f) + 1) << 0x0f) - addr;
}
sram_readChunk(adapter, addr, buf, length);
sram_read_chunk(adapter, addr, buf, length);
addr = addr + length;
buf = buf + length;
......@@ -576,7 +576,7 @@ static void sram_write(struct adapter *adapter, u32 addr, u8 *buf, u32 len)
length = (((addr >> 0x0f) + 1) << 0x0f) - addr;
}
sram_writeChunk(adapter, addr, buf, length);
sram_write_chunk(adapter, addr, buf, length);
addr = addr + length;
buf = buf + length;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -17,3 +17,4 @@ obj-$(CONFIG_DVB_VES1820) += ves1820.o
obj-$(CONFIG_DVB_VES1X93) += ves1x93.o
obj-$(CONFIG_DVB_TDA1004X) += tda1004x.o
obj-$(CONFIG_DVB_SP887X) += sp887x.o
obj-$(CONFIG_DVB_NXT6000) += nxt6000.o
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -362,7 +362,7 @@ enum av7110_command_type {
extern void av7110_reset_arm(struct av7110 *av7110);
extern int av7110_bootarm(struct av7110 *av7110);
extern void av7110_firmversion(struct av7110 *av7110);
extern int av7110_firmversion(struct av7110 *av7110);
#define FW_CI_LL_SUPPORT(arm_app) ((arm_app) & 0x80000000)
#define FW_VERSION(arm_app) ((arm_app) & 0x0000FFFF)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment