* Re: [Linux-ia64] fpswa logging redux
From: Jesse Barnes @ 2002-12-12 18:25 UTC (permalink / raw)
To: linux-ia64
In-Reply-To: <marc-linux-ia64-105590709805545@msgid-missing>
[-- Attachment #1: Type: text/plain, Size: 1183 bytes --]
On Wed, Dec 11, 2002 at 03:42:52PM -0800, David Mosberger wrote:
> >>>>> On Wed, 11 Dec 2002 14:25:14 -0800, Jesse Barnes <jbarnes@sgi.com> said:
>
> Jesse> I'd like to fully decode the information in the isr about
> Jesse> what type of fault occured (whether it be a software assist
> Jesse> fault, some sort of IEEE filter fault, etc.) and print it
> Jesse> along with the ip when faults occur. While I'm at it, I may
> Jesse> as well the proper SIGFPE subcode into si_info in case of
> Jesse> signal delivery is selected.
>
> Like Keith, I'd like to keep the amount of decoding in the kernel as
> minimal as possible. We already have si_isr in the siginfo structure,
> so apps/libraries can decode things themselves. Having said that, we
> ought to decode things sufficiently so that si_code can be set to the
> correct value (where this makes sense). Hopefully, that won't add
> tons of code and it would help application portability.
How about something like this then? It just prints out the isr in
addition to the ip for the case of printk, and decodes the right si_code
for signals. If this approach looks ok, I can add trap decoding too.
Thanks,
Jesse
[-- Attachment #2: fpswa-si_code-decode-2.4.19-ia64.patch --]
[-- Type: text/plain, Size: 3059 bytes --]
diff -Naur -X /home/jbarnes/dontdiff linux-2.4.19-ia64/arch/ia64/kernel/traps.c linux-2.4.19-ia64-fpswa/arch/ia64/kernel/traps.c
--- linux-2.4.19-ia64/arch/ia64/kernel/traps.c Thu Dec 12 10:15:57 2002
+++ linux-2.4.19-ia64-fpswa/arch/ia64/kernel/traps.c Thu Dec 12 10:23:25 2002
@@ -45,6 +45,34 @@
static fpswa_interface_t *fpswa_interface;
+/*
+ * fp fault isr.code <-> siginfo.si_code mapping
+ */
+struct fp_fault_info fp_fault_info[] = {
+ { 1<<0, FPE_FLTINV },
+ { 1<<1, FPE_DENORM },
+ { 1<<2, FPE_FLTDIV },
+ { 1<<3, FPE_SWASST },
+ { 1<<4, FPE_FLTINV },
+ { 1<<5, FPE_DENORM },
+ { 1<<6, FPE_FLTDIV },
+ { 1<<7, FPE_SWASST },
+};
+
+static inline int
+fp_fault_si_code(__u64 isr)
+{
+ int i, ret = 0;
+ int nr_entries;
+ nr_entries = sizeof(fp_fault_info)/sizeof(struct fp_fault_info);
+
+ for (i = 0; i < nr_entries; i++) {
+ if (isr & fp_fault_info[i].isr_code_bit)
+ ret |= fp_fault_info[i].si_code;
+ }
+ return ret;
+}
+
void __init
trap_init (void)
{
@@ -336,8 +364,9 @@
fpu_swa_count = 0;
if ((++fpu_swa_count < 5) && !(current->thread.flags & IA64_THREAD_FPEMU_NOPRINT)) {
last_time = jiffies;
- printk(KERN_WARNING "%s(%d): floating-point assist fault at ip %016lx\n",
- current->comm, current->pid, regs->cr_iip + ia64_psr(regs)->ri);
+ printk(KERN_WARNING "%s(%d): floating-point assist %s ",
+ current->comm, current->pid, fp_fault ? "fault:" : "trap");
+ printk("ip=%016lx, isr=%16lx\n", regs->cr_iip + ia64_psr(regs)->ri, isr);
}
exception = fp_emulate(fp_fault, bundle, ®s->cr_ipsr, ®s->ar_fpsr, &isr, ®s->pr,
@@ -556,6 +585,8 @@
siginfo.si_signo = SIGFPE;
siginfo.si_errno = 0;
siginfo.si_code = FPE_FLTINV;
+ if (vector == 32) /* decode fault into si_code */
+ siginfo.si_code = fp_fault_si_code(isr);
siginfo.si_addr = (void *) (regs->cr_iip + ia64_psr(regs)->ri);
siginfo.si_flags = __ISR_VALID;
siginfo.si_isr = isr;
diff -Naur -X /home/jbarnes/dontdiff linux-2.4.19-ia64/include/asm-ia64/fpu.h linux-2.4.19-ia64-fpswa/include/asm-ia64/fpu.h
--- linux-2.4.19-ia64/include/asm-ia64/fpu.h Sun Feb 6 18:42:40 2000
+++ linux-2.4.19-ia64-fpswa/include/asm-ia64/fpu.h Thu Dec 12 10:11:45 2002
@@ -54,6 +54,11 @@
# ifndef __ASSEMBLY__
+struct fp_fault_info {
+ unsigned long isr_code_bit;
+ int si_code; /* SIGFPE si_code */
+};
+
struct ia64_fpreg {
union {
unsigned long bits[2];
diff -Naur -X /home/jbarnes/dontdiff linux-2.4.19-ia64/include/asm-ia64/siginfo.h linux-2.4.19-ia64-fpswa/include/asm-ia64/siginfo.h
--- linux-2.4.19-ia64/include/asm-ia64/siginfo.h Thu Dec 12 10:15:59 2002
+++ linux-2.4.19-ia64-fpswa/include/asm-ia64/siginfo.h Thu Dec 12 10:19:47 2002
@@ -172,6 +172,8 @@
#define __FPE_DECERR (__SI_FAULT|11) /* packed decimal error */
#define __FPE_INVASC (__SI_FAULT|12) /* invalid ASCII digit */
#define __FPE_INVDEC (__SI_FAULT|13) /* invalid decimal digit */
+#define FPE_SWASST (__SI_FAULT|14) /* software assist fault */
+#define FPE_DENORM (__SI_FAULT|15) /* denormal/unnormal operand */
#define NSIGFPE 13
/*
^ permalink raw reply
* Re: 2.5.51: sleep broken
From: P. Christeas @ 2002-12-12 18:22 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <200212101534.12838.p_christ-U04EIuiosng@public.gmane.org>
I've had a better look at it...
I have written:
> I 've just tested the 2.5.51 (w. official 20021205 ACPI)
> I noted that S1 is broken now (had worked long since)
>
> In dmesg I note:
> ACPI: Wakeup code way too big, will crash on attempt to suspend
Seems irrelevant.
> However, /proc/acpi/sleep has all S0 S1 S2 S3 S4 S5
> When I 'echo 1 >/proc/acpi/sleep', nothing happens.
> I'll let you know if I have more details..
I noticed I had some extra dbg code to indicate what's happening in the procfs
level.
Now, it seems that "1" doesn't get written to the acpi/sleep entry. It's a
procfs bug.
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
^ permalink raw reply
* And another question
From: Michael Willems @ 2002-12-12 18:21 UTC (permalink / raw)
To: Linux Hams mailing list
In-Reply-To: <1039714569.13779.4.camel@edith>
Good discussion about encryption, please keep it going :)
Meanwhile another question, and I do apologise for all the traffic.
Every time I ping another node it fails the first time, then works the
2nd time.
E.g. from va3mvw.ampr.org I ping va3oak.ampr.org. Both are on my local
radio frequency and I have direct routes from one to the other and
vice-versa.
The first time, instead of a ping (ICMP echo request), my node send a
packet "from VA3MVW to QST". That results in no replies, so in the shell I
see "no route to host".
If I ping again immediately, it DOES send the echo request, and gets back
an echo ack from the other side, and all is OK< the ping works.
What beginner's mistake am I making? DNS sounds likely but no, I am
pinging IP's, not names. So what else am I overlooking?
Thanks for your indulgence again, and thanks for any help!
Michael VA3MVW
^ permalink raw reply
* Re: [PATCH] nforce2 dma enabled
From: Alan Cox @ 2002-12-12 19:06 UTC (permalink / raw)
To: Tim Krieglstein; +Cc: Linux Kernel Mailing List
In-Reply-To: <20021212140612.GA543@Timekeeper>
On Thu, 2002-12-12 at 14:06, Tim Krieglstein wrote:
> The patch just adds the pci id of the nforce ide controller and added a
> new information block to the ide_pci_device_t structure. Also i added an
> entry to pci_device_id.
Thanks.
> welcome. I would also like to know why the lspci command still tells me
> this is an unknown device after applying my patch seen below. Also if
lspci uses its own tables in user space
> someone has a hint why the usb-devices have no interrupt assigned and
> thus are not available is very welcome (probably disable acpi?).
The BIOS didnt assign one. Since we don't have any useful docs we also
can't reassign one unless the BIOS does it - which it might do.
^ permalink raw reply
* NVRAM/RTC
From: Aman @ 2002-12-12 18:20 UTC (permalink / raw)
To: linuxppc embedded
Hi All
I have customized board , which has PPC 440GP as its processor. In this
board there is no NVRAM/RTC as in the 440GP evalkit. In the Rom monitor,
configuration related to it NVRAM/RTC has been removed. Because of this
changes in the rom monitor code, the linux image is hanging after " Now
Booting the Kernel". If NVRAM/RTC EBC bank1 is enabled in rom monitor, the
linux image is executing without any problem. Can anyone say , how to
disable the NVRAM/RTC option in the linux kernel.
Thanking you in advance
Regards
Aman
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply
* Re: Question on set_page_dirty()
From: Andrew Morton @ 2002-12-12 18:20 UTC (permalink / raw)
To: Stephen C. Tweedie
Cc: Ingo Oeser, Jan Hudec, Martin Maletinsky, linux-mm, kernelnewbies
In-Reply-To: <1039696963.2420.1.camel@sisko.scot.redhat.com>
"Stephen C. Tweedie" wrote:
>
> Hi,
>
> On Thu, 2002-12-12 at 09:29, Ingo Oeser wrote:
> > set_page_dirty() can be used in all cases, IMHO, since it:
> > - will not sleep
> ...
>
> Unfortunately, it can take both the inode_lock and pagecache_lock
> spinlocks, so if you use it in the wrong place, with other locks already
> held, you can cause a deadlock. So you _do_ need to be a bit careful,
> and you can't just use it with abandon.
>
And in 2.5 the pagecache_lock is per-inode. This ends up meaning that
it is not legal to run set_page_dirty(page) unless the caller has
done something to prevent the thing at page->mapping from being freed.
If that has not been done, it is conceivable (but hugely unlikely) that
the page could be truncated from its mapping and that mapping could be
thrown away while set_page_dirty() is trying to claim its ->page_lock.
So in 2.5, set_page_dirty() is only legal if the caller has a ref against
page->mapping->host, or if the page is locked.
It's currently wrong in a couple of places. I have local fixes for
the VM, and direct-IO still needs to be done. It will just be:
lock_page(page); /* pins page->mapping */
set_page_dirty(page);
unlock_page(page);
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply
* Re: PROCESS IMIGRATION
From: Breno @ 2002-12-12 18:28 UTC (permalink / raw)
To: ciriso; +Cc: linux-kernel
In-Reply-To: <20021212192118.47f55d2b.ciriso@retena.com>
César
OpenMosix do this operation ?
thanks
----- Original Message -----
From: <ciriso@retena.com>
To: "Breno" <breno_silva@bandnet.com.br>
Cc: <linux-kernel@vger.kernel.org>
Sent: Thursday, December 12, 2002 4:21 PM
Subject: Re: PROCESS IMIGRATION
> d> Hi
> >
> > I saw something about one project of FreeBSD and this is about
> > imigration of
> > processes between two machines.
> > The kernel Linux has something about this , or some project like that ?
>
> Hi .
> Perhaps are you finding OpenMosix ?
>
> César
>
>
^ permalink raw reply
* [PATCH] s390 (6/8): staticification.
From: Martin Schwidefsky @ 2002-12-12 18:09 UTC (permalink / raw)
To: linux-kernel, torvalds
Make some functions and variables static.
diffstat:
char/sclp.c | 6 +++---
char/sclp_con.c | 8 ++++----
char/sclp_rw.c | 2 +-
char/sclp_tty.c | 4 ++--
net/ctcmain.c | 16 ++++++++--------
net/lcs.c | 20 ++++++++++----------
6 files changed, 28 insertions(+), 28 deletions(-)
diff -urN linux-2.5.51/drivers/s390/char/sclp.c linux-2.5.51-s390/drivers/s390/char/sclp.c
--- linux-2.5.51/drivers/s390/char/sclp.c Tue Dec 10 03:46:11 2002
+++ linux-2.5.51-s390/drivers/s390/char/sclp.c Thu Dec 12 18:03:31 2002
@@ -47,7 +47,7 @@
static struct list_head sclp_reg_list;
/* sccb queue */
-struct list_head sclp_req_queue;
+static struct list_head sclp_req_queue;
/* sccb for unconditional read */
static struct sclp_req sclp_read_req;
@@ -448,7 +448,7 @@
spin_unlock_irqrestore(&sclp_lock, flags);
}
-struct sclp_register sclp_state_change_event = {
+static struct sclp_register sclp_state_change_event = {
.receive_mask = EvTyp_StateChange_Mask,
.receiver_fn = sclp_state_change
};
@@ -514,7 +514,7 @@
ctrl_alt_del();
}
-struct sclp_register sclp_quiesce_event = {
+static struct sclp_register sclp_quiesce_event = {
.receive_mask = EvTyp_SigQuiesce_Mask,
.receiver_fn = sclp_quiesce
};
diff -urN linux-2.5.51/drivers/s390/char/sclp_con.c linux-2.5.51-s390/drivers/s390/char/sclp_con.c
--- linux-2.5.51/drivers/s390/char/sclp_con.c Tue Dec 10 03:45:59 2002
+++ linux-2.5.51-s390/drivers/s390/char/sclp_con.c Thu Dec 12 18:03:31 2002
@@ -97,7 +97,7 @@
/*
* Writes the given message to S390 system console
*/
-void
+static void
sclp_console_write(struct console *console, const char *message,
unsigned int count)
{
@@ -152,7 +152,7 @@
}
/* returns the device number of the SCLP console */
-kdev_t
+static kdev_t
sclp_console_device(struct console *c)
{
return mk_kdev(sclp_console_major, sclp_console_minor);
@@ -163,7 +163,7 @@
* is going to give up. We have to make sure that all buffers
* will be flushed to the SCLP.
*/
-void
+static void
sclp_console_unblank(void)
{
unsigned long flags;
@@ -187,7 +187,7 @@
* used to register the SCLP console to the kernel and to
* give printk necessary information
*/
-struct console sclp_console =
+static struct console sclp_console =
{
.name = sclp_console_name,
.write = sclp_console_write,
diff -urN linux-2.5.51/drivers/s390/char/sclp_rw.c linux-2.5.51-s390/drivers/s390/char/sclp_rw.c
--- linux-2.5.51/drivers/s390/char/sclp_rw.c Tue Dec 10 03:45:55 2002
+++ linux-2.5.51-s390/drivers/s390/char/sclp_rw.c Thu Dec 12 18:03:31 2002
@@ -31,7 +31,7 @@
#define MAX_SCCB_ROOM (PAGE_SIZE - sizeof(struct sclp_buffer))
/* Event type structure for write message and write priority message */
-struct sclp_register sclp_rw_event = {
+static struct sclp_register sclp_rw_event = {
.send_mask = EvTyp_Msg_Mask | EvTyp_PMsgCmd_Mask
};
diff -urN linux-2.5.51/drivers/s390/char/sclp_tty.c linux-2.5.51-s390/drivers/s390/char/sclp_tty.c
--- linux-2.5.51/drivers/s390/char/sclp_tty.c Tue Dec 10 03:45:44 2002
+++ linux-2.5.51-s390/drivers/s390/char/sclp_tty.c Thu Dec 12 18:03:31 2002
@@ -466,7 +466,7 @@
/*
* push input to tty
*/
-void sclp_tty_input(unsigned char* buf, unsigned int count)
+static void sclp_tty_input(unsigned char* buf, unsigned int count)
{
unsigned int cchar;
@@ -694,7 +694,7 @@
{
}
-struct sclp_register sclp_input_event =
+static struct sclp_register sclp_input_event =
{
.receive_mask = EvTyp_OpCmd_Mask | EvTyp_PMsgCmd_Mask,
.state_change_fn = sclp_tty_state_change,
diff -urN linux-2.5.51/drivers/s390/net/ctcmain.c linux-2.5.51-s390/drivers/s390/net/ctcmain.c
--- linux-2.5.51/drivers/s390/net/ctcmain.c Tue Dec 10 03:45:54 2002
+++ linux-2.5.51-s390/drivers/s390/net/ctcmain.c Thu Dec 12 18:03:31 2002
@@ -1,5 +1,5 @@
/*
- * $Id: ctcmain.c,v 1.29 2002/12/06 12:31:38 cohuck Exp $
+ * $Id: ctcmain.c,v 1.30 2002/12/09 13:56:20 aberg Exp $
*
* CTC / ESCON network driver
*
@@ -36,7 +36,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.29 $
+ * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.30 $
*
*/
\f
@@ -279,7 +279,7 @@
print_banner(void)
{
static int printed = 0;
- char vbuf[] = "$Revision: 1.29 $";
+ char vbuf[] = "$Revision: 1.30 $";
char *version = vbuf;
if (printed)
@@ -2821,7 +2821,7 @@
* @returns 0 on success, !0 on failure.
*/
-int
+static int
ctc_probe_device(struct ccwgroup_device *cgdev)
{
struct ctc_priv *priv;
@@ -2864,7 +2864,7 @@
*
* @returns 0 on success, !0 on failure.
*/
-int
+static int
ctc_new_device(struct ccwgroup_device *cgdev)
{
char read_id[CTC_ID_SIZE];
@@ -2941,7 +2941,7 @@
*
* @returns 0 on success, !0 on failure.
*/
-int
+static int
ctc_shutdown_device(struct ccwgroup_device *cgdev)
{
struct ctc_priv *priv;
@@ -2975,7 +2975,7 @@
}
-int
+static int
ctc_remove_device(struct ccwgroup_device *cgdev)
{
struct ctc_priv *priv;
@@ -2991,7 +2991,7 @@
return 0;
}
-struct ccwgroup_driver ctc_group_driver = {
+static struct ccwgroup_driver ctc_group_driver = {
.name = "ctc",
.max_slaves = 2,
.driver_id = 0xC3E3C3,
diff -urN linux-2.5.51/drivers/s390/net/lcs.c linux-2.5.51-s390/drivers/s390/net/lcs.c
--- linux-2.5.51/drivers/s390/net/lcs.c Tue Dec 10 03:45:44 2002
+++ linux-2.5.51-s390/drivers/s390/net/lcs.c Thu Dec 12 18:03:31 2002
@@ -11,7 +11,7 @@
* Frank Pavlic (pavlic@de.ibm.com) and
* Martin Schwidefsky <schwidefsky@de.ibm.com>
*
- * $Revision: 1.41 $ $Date: 2002/12/06 12:42:01 $
+ * $Revision: 1.42 $ $Date: 2002/12/09 13:55:28 $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -59,7 +59,7 @@
/**
* initialization string for output
*/
-#define VERSION_LCS_C "$Revision: 1.41 $"
+#define VERSION_LCS_C "$Revision: 1.42 $"
static const char *version="LCS driver ("VERSION_LCS_C "/" VERSION_LCS_H ")";
@@ -1576,7 +1576,7 @@
/**
* get network statistics for ifconfig and other user programs
*/
-struct net_device_stats *
+static struct net_device_stats *
lcs_getstats(struct net_device *dev)
{
struct lcs_card *card;
@@ -1590,7 +1590,7 @@
* stop lcs device
* This function will be called by user doing ifconfig xxx down
*/
-int
+static int
lcs_stop_device(struct net_device *dev)
{
struct lcs_card *card;
@@ -1612,7 +1612,7 @@
* start lcs device and make it runnable
* This function will be called by user doing ifconfig xxx up
*/
-int
+static int
lcs_open_device(struct net_device *dev)
{
struct lcs_card *card;
@@ -1678,7 +1678,7 @@
/**
* lcs_probe_device is called on establishing a new ccwgroup_device.
*/
-int
+static int
lcs_probe_device(struct ccwgroup_device *ccwgdev)
{
struct lcs_card *card;
@@ -1714,7 +1714,7 @@
/**
* lcs_new_device will be called by setting the group device online.
*/
-int
+static int
lcs_new_device(struct ccwgroup_device *ccwgdev)
{
struct lcs_card *card;
@@ -1794,7 +1794,7 @@
/**
* lcs_shutdown_device, called when setting the group device offline.
*/
-int
+static int
lcs_shutdown_device(struct ccwgroup_device *ccwgdev)
{
struct lcs_card *card;
@@ -1810,7 +1810,7 @@
/**
* lcs_remove_device, free buffers and card
*/
-int
+static int
lcs_remove_device(struct ccwgroup_device *ccwgdev)
{
struct lcs_card *card;
@@ -1828,7 +1828,7 @@
/**
* LCS ccwgroup driver registration
*/
-struct ccwgroup_driver lcs_group_driver = {
+static struct ccwgroup_driver lcs_group_driver = {
.name = "lcs",
.max_slaves = 2,
.driver_id = 0xD3C3E2,
^ permalink raw reply
* [PATCH] s390: latest and greates for 2.5.51.
From: Martin Schwidefsky @ 2002-12-12 18:12 UTC (permalink / raw)
To: linux-kernel, torvalds
Hi Linus,
some small s390 patches for 2.5.51.
The patch overview:
01: Makefile changes as proposed by Sam Ravnborg.
02: sys_restart_syscall for s390/s390x. Following your suggestion I used
a thread flag (TIF_RESTART_SVC) to indicate the restart condition
to entry.S.
03: Fixes for the common i/o layer. Among other things I found the race
condition in do_IRQ that has been plagueing me the last few days.
04: Another uaccess bug. __put_user_asm_8 doesn't return 0 for success.
05: Remove last remaining file of the old tape driver.
06: Arnd scanned through the device drivers and found some variables/functions
that should better be declared static.
07: Some warnings fixes.
08: Make sys_wait4 available to modules.
blue skies,
Martin.
^ permalink raw reply
* Re: PROCESS IMIGRATION
From: ciriso @ 2002-12-12 18:21 UTC (permalink / raw)
To: Breno; +Cc: linux-kernel
In-Reply-To: <000701c2a208$f50e7a40$8be1a7c8@bsb.virtua.com.br>
d> Hi
>
> I saw something about one project of FreeBSD and this is about
> imigration of
> processes between two machines.
> The kernel Linux has something about this , or some project like that ?
Hi .
Perhaps are you finding OpenMosix ?
César
^ permalink raw reply
* [TRIVIAL] available spell fixes
From: Alfredo Sanjuán @ 2002-12-12 18:19 UTC (permalink / raw)
To: linux-kernel; +Cc: trivial
Against vanilla 2.4.20, spell fixes for 'available'.
Regrads - alfredo
--
Alfredo Sanjuan
<alfre@ibd.es>
diff -ruN linux-2.4.20/drivers/atm/iphase.c linux-2.4.20spellfix/drivers/atm/iphase.c
--- linux-2.4.20/drivers/atm/iphase.c Fri Nov 29 00:53:12 2002
+++ linux-2.4.20spellfix/drivers/atm/iphase.c Thu Dec 12 17:40:33 2002
@@ -1884,7 +1884,7 @@
return -EINVAL;
}
if (vcc->qos.txtp.max_pcr > iadev->LineRate) {
- IF_CBR(printk("PCR is not availble\n");)
+ IF_CBR(printk("PCR is not available\n");)
return -1;
}
vc->type = CBR;
@@ -1894,7 +1894,7 @@
}
}
else
- printk("iadev: Non UBR, ABR and CBR traffic not supportedn");
+ printk("iadev: Non UBR, ABR and CBR traffic not supported\n");
iadev->testTable[vcc->vci]->vc_status |= VC_ACTIVE;
IF_EVENT(printk("ia open_tx returning \n");)
diff -ruN linux-2.4.20/drivers/ieee1394/dv1394.h linux-2.4.20spellfix/drivers/ieee1394/dv1394.h
--- linux-2.4.20/drivers/ieee1394/dv1394.h Sat Aug 3 02:39:44 2002
+++ linux-2.4.20spellfix/drivers/ieee1394/dv1394.h Thu Dec 12 17:41:03 2002
@@ -175,7 +175,7 @@
where copy_DV_frame() reads or writes on the dv1394 file descriptor
(read/write mode) or copies data to/from the mmap ringbuffer and
then calls ioctl(DV1394_SUBMIT_FRAMES) to notify dv1394 that new
- frames are availble (mmap mode).
+ frames are available (mmap mode).
reset_dv1394() is called in the event of a buffer
underflow/overflow or a halt in the DV stream (e.g. due to a 1394
diff -ruN linux-2.4.20/drivers/md/lvm.c linux-2.4.20spellfix/drivers/md/lvm.c
--- linux-2.4.20/drivers/md/lvm.c Fri Nov 29 00:53:13 2002
+++ linux-2.4.20spellfix/drivers/md/lvm.c Thu Dec 12 17:41:28 2002
@@ -2405,7 +2405,7 @@
}
}
- /* save availiable i/o statistic data */
+ /* save available i/o statistic data */
if (old_lv->lv_stripes < 2) { /* linear logical volume */
end = min(old_lv->lv_current_le, new_lv->lv_current_le);
for (l = 0; l < end; l++) {
diff -ruN linux-2.4.20/drivers/net/saa9730.c linux-2.4.20spellfix/drivers/net/saa9730.c
--- linux-2.4.20/drivers/net/saa9730.c Wed Oct 17 06:56:29 2001
+++ linux-2.4.20spellfix/drivers/net/saa9730.c Thu Dec 12 17:31:08 2002
@@ -265,7 +265,7 @@
lp->NextRcvPacketIndex = 0;
lp->NextRcvToUseIsA = 1;
- /* Set current buffer index & next availble packet index */
+ /* Set current buffer index & next available packet index */
lp->NextTxmPacketIndex = 0;
lp->NextTxmBufferIndex = 0;
lp->PendingTxmPacketIndex = 0;
@@ -520,7 +520,7 @@
lp->NextRcvPacketIndex = 0;
lp->NextRcvToUseIsA = 1;
- /* Set current buffer index & next availble packet index */
+ /* Set current buffer index & next available packet index */
lp->NextTxmPacketIndex = 0;
lp->NextTxmBufferIndex = 0;
lp->PendingTxmPacketIndex = 0;
diff -ruN linux-2.4.20/drivers/net/wan/comx-hw-munich.c linux-2.4.20spellfix/drivers/net/wan/comx-hw-munich.c
--- linux-2.4.20/drivers/net/wan/comx-hw-munich.c Fri Nov 29 00:53:14 2002
+++ linux-2.4.20spellfix/drivers/net/wan/comx-hw-munich.c Thu Dec 12 17:30:12 2002
@@ -269,7 +269,7 @@
- Path Code Violations >1, but <320
- not a Severely Errored Second
- no AIS
- - not incremented during an Unavailabla Second */
+ - not incremented during an Unavailable Second */
severely_err_secs, /* Severely Errored Second:
- CRC4: >=832 Path COde Violations || >0 Out Of Frame defects
- noCRC4: >=2048 Line Code Violations
diff -ruN linux-2.4.20/drivers/scsi/aic7xxx/aic7xxx.h linux-2.4.20spellfix/drivers/scsi/aic7xxx/aic7xxx.h
--- linux-2.4.20/drivers/scsi/aic7xxx/aic7xxx.h Sat Aug 3 02:39:44 2002
+++ linux-2.4.20spellfix/drivers/scsi/aic7xxx/aic7xxx.h Thu Dec 12 17:38:17 2002
@@ -362,7 +362,7 @@
/*
* The driver keeps up to MAX_SCB scb structures per card in memory. The SCB
- * consists of a "hardware SCB" mirroring the fields availible on the card
+ * consists of a "hardware SCB" mirroring the fields available on the card
* and additional information the kernel stores for each transaction.
*
* To minimize space utilization, a portion of the hardware scb stores
diff -ruN linux-2.4.20/drivers/scsi/aic7xxx/aic7xxx_core.c linux-2.4.20spellfix/drivers/scsi/aic7xxx/aic7xxx_core.c
--- linux-2.4.20/drivers/scsi/aic7xxx/aic7xxx_core.c Fri Nov 29 00:53:14 2002
+++ linux-2.4.20spellfix/drivers/scsi/aic7xxx/aic7xxx_core.c Thu Dec 12 17:38:00 2002
@@ -388,7 +388,7 @@
ahc_dump_card_state(ahc);
- /* Tell everyone that this HBA is no longer availible */
+ /* Tell everyone that this HBA is no longer available */
ahc_abort_scbs(ahc, CAM_TARGET_WILDCARD, ALL_CHANNELS,
CAM_LUN_WILDCARD, SCB_LIST_NULL, ROLE_UNKNOWN,
CAM_NO_HBA);
@@ -2748,9 +2748,9 @@
targ_scsirate = tinfo->scsirate;
/*
- * Parse as much of the message as is availible,
+ * Parse as much of the message as is available,
* rejecting it if we don't support it. When
- * the entire message is availible and has been
+ * the entire message is available and has been
* handled, return MSGLOOP_MSGCOMPLETE, indicating
* that we have parsed an entire message.
*
diff -ruN linux-2.4.20/drivers/scsi/aic7xxx_old.c linux-2.4.20spellfix/drivers/scsi/aic7xxx_old.c
--- linux-2.4.20/drivers/scsi/aic7xxx_old.c Wed Nov 21 23:05:29 2001
+++ linux-2.4.20spellfix/drivers/scsi/aic7xxx_old.c Thu Dec 12 17:35:55 2002
@@ -5435,9 +5435,9 @@
target_mask = (0x01 << tindex);
/*
- * Parse as much of the message as is availible,
+ * Parse as much of the message as is available,
* rejecting it if we don't support it. When
- * the entire message is availible and has been
+ * the entire message is available and has been
* handled, return TRUE indicating that we have
* parsed an entire message.
*/
diff -ruN linux-2.4.20/drivers/scsi/ips.c linux-2.4.20spellfix/drivers/scsi/ips.c
--- linux-2.4.20/drivers/scsi/ips.c Fri Nov 29 00:53:14 2002
+++ linux-2.4.20spellfix/drivers/scsi/ips.c Thu Dec 12 17:35:00 2002
@@ -7211,7 +7211,7 @@
/* Assumes that ips_read_adapter_status() is called first filling in */
/* the data for SubSystem Parameters. */
/* Called from ips_write_driver_status() so it also assumes NVRAM Page 5 */
-/* Data is availaible. */
+/* Data is available. */
/* */
/*---------------------------------------------------------------------------*/
static void ips_version_check(ips_ha_t *ha, int intr) {
diff -ruN linux-2.4.20/drivers/scsi/pcmcia/nsp_cs.c linux-2.4.20spellfix/drivers/scsi/pcmcia/nsp_cs.c
--- linux-2.4.20/drivers/scsi/pcmcia/nsp_cs.c Thu Oct 11 18:04:57 2001
+++ linux-2.4.20spellfix/drivers/scsi/pcmcia/nsp_cs.c Thu Dec 12 17:38:50 2002
@@ -707,7 +707,7 @@
ocount += res;
//DEBUG(0, " ptr=0x%p this_residual=0x%x ocount=0x%x\n", SCpnt->SCp.ptr, SCpnt->SCp.this_residual, ocount);
- /* go to next scatter list if availavle */
+ /* go to next scatter list if available */
if (SCpnt->SCp.this_residual == 0 &&
SCpnt->SCp.buffers_residual != 0 ) {
//DEBUG(0, " scatterlist next timeout=%d\n", time_out);
@@ -780,7 +780,7 @@
SCpnt->SCp.this_residual -= res;
ocount += res;
- /* go to next scatter list if availavle */
+ /* go to next scatter list if available */
if (SCpnt->SCp.this_residual == 0 &&
SCpnt->SCp.buffers_residual != 0 ) {
//DEBUG(0, " scatterlist next\n");
diff -ruN linux-2.4.20/net/ipv6/af_inet6.c linux-2.4.20spellfix/net/ipv6/af_inet6.c
--- linux-2.4.20/net/ipv6/af_inet6.c Wed Oct 17 23:16:39 2001
+++ linux-2.4.20spellfix/net/ipv6/af_inet6.c Thu Dec 12 17:28:34 2002
@@ -619,7 +619,7 @@
/*
* ipngwg API draft makes clear that the correct semantics
* for TCP and UDP is to consider one TCP and UDP instance
- * in a host availiable by both INET and INET6 APIs and
+ * in a host available by both INET and INET6 APIs and
* able to communicate via both network protocols.
*/
diff -ruN linux-2.4.20/net/ipv6/ip6_output.c linux-2.4.20spellfix/net/ipv6/ip6_output.c
--- linux-2.4.20/net/ipv6/ip6_output.c Fri Nov 29 00:53:15 2002
+++ linux-2.4.20spellfix/net/ipv6/ip6_output.c Thu Dec 12 17:28:59 2002
@@ -563,7 +563,7 @@
if (err) {
#if IP6_DEBUG >= 2
printk(KERN_DEBUG "ip6_build_xmit: "
- "no availiable source address\n");
+ "no available source address\n");
#endif
goto out;
}
^ permalink raw reply
* Re: [LARTC] htb version 3.7 in kernel 2.4.20?
From: Stef Coene @ 2002-12-12 18:13 UTC (permalink / raw)
To: lartc
In-Reply-To: <marc-lartc-103970026925933@msgid-missing>
On Thursday 12 December 2002 14:32, Julio E. Gonzalez P. wrote:
> When you use HTB with a stock linux kernel 2.4.20, in /var/log/messages
> say it is version 3.7.
> Anyone know something about this?
> The HTB home page only mentions HTB version 3.6.
> What changes it have?
3.7 is 3.6 in kernel 2.4.20. So you know the difference between a patched
kernel and a stock kernel. Maybe there are some minor changes, but I don't
think so.
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.oftc.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply
* [PATCH] s390 (5/8): old tape file.
From: Martin Schwidefsky @ 2002-12-12 18:08 UTC (permalink / raw)
To: linux-kernel, torvalds
Remove last remaining file of the old tape driver.
diffstat:
tape.c | 1907 -----------------------------------------------------------------
1 files changed, 1907 deletions(-)
diff -urN linux-2.5.51/drivers/s390/char/tape.c linux-2.5.51-s390/drivers/s390/char/tape.c
--- linux-2.5.51/drivers/s390/char/tape.c Tue Dec 10 03:46:11 2002
+++ linux-2.5.51-s390/drivers/s390/char/tape.c Thu Jan 1 01:00:00 1970
@@ -1,1907 +0,0 @@
-/***********************************************************************
- * drivers/s390/char/tape.c
- * tape device driver for S/390 and zSeries tapes.
- *
- * S390 and zSeries version
- * Copyright (C) 2001 IBM Corporation
- * Author(s): Carsten Otte <cotte@de.ibm.com>
- * Michael Holzheu <holzheu@de.ibm.com>
- * Tuan Ngo-Anh <ngoanh@de.ibm.com>
- *
- ***********************************************************************
- */
-
-#include "tapedefs.h" // kernel 2.2 compatibility defines
-
-#include <linux/stddef.h> // defines NULL
-#include <linux/proc_fs.h> // for /proc/tapedevices
-#include <linux/init.h> // for kernel parameters
-#include <linux/kmod.h> // for requesting modules
-#include <linux/spinlock.h> // for locks
-#include <asm/types.h> // for variable types
-#ifdef CONFIG_S390_TAPE_DYNAMIC
-#include <asm/s390dyn.h>
-#endif
-#include "tape.h"
-#ifdef CONFIG_S390_TAPE_3590
-#include "tape3590.h"
-#endif
-#ifdef CONFIG_S390_TAPE_3490
-#include "tape3490.h"
-#endif
-#ifdef CONFIG_S390_TAPE_3480
-#include "tape3480.h"
-#endif
-#ifdef CONFIG_S390_TAPE_BLOCK
-#include "tapeblock.h"
-#endif
-#ifdef CONFIG_S390_TAPE_CHAR
-#include "tapechar.h"
-#endif
-#ifdef CONFIG_PROC_FS
-#include <linux/vmalloc.h>
-#endif
-#define PRINTK_HEADER "T390:"
-#define TAPE_MAX_DEVREGS (256 / TAPE_MINORS_PER_DEV)
-
-#define TAPE_NO_IO 0
-#define TAPE_DO_IO 1
-
-#define TAPE_CIO_PRIVATE_DATA
-
-#ifdef CONFIG_KMOD
-#define tape_request_module(a) request_module(a)
-#else
-#define tape_request_module(a)
-#endif
-
-/*******************************************************************
- * Internal Prototypes
- *******************************************************************/
-
-static void tape_do_irq (int irq, void *int_parm, struct pt_regs *regs);
-static inline int tape_halt_io(tape_dev_t* td);
-static void tape_wait(tape_ccw_req_t* treq);
-#ifdef CONFIG_S390_TAPE_DYNAMIC
-/* functions for dyn. dev. attach/detach */
-static int tape_oper_handler ( int irq, struct _devreg *dreg);
-static void tape_noper_handler ( int irq, int status );
-#endif
-static inline void tape_disable_device(tape_dev_t* td);
-static inline int tape_enable_device(tape_dev_t* td);
-
-
-/*******************************************************************
- * GLOBALS
- *******************************************************************/
-
-static devreg_t *tape_devreg[TAPE_MAX_DEVREGS];
-static int tape_devregct=0;
-static int tape_autoprobe = 1;
-static tape_discipline_t *tape_first_disc = NULL;
-tape_dev_t *tape_first_dev = NULL;
-tape_frontend_t *tape_first_front = NULL;
-char *tape[256] = { NULL, };
-
-/*
- * Lock hirarchy:
- * tape_discipline_lock > tape_dev_lock > td->lock
- */
-
-rwlock_t tape_dev_lock=RW_LOCK_UNLOCKED;
-static rwlock_t tape_discipline_lock=RW_LOCK_UNLOCKED;
-
-#ifdef TAPE_DEBUG
-debug_info_t *tape_dbf_area = NULL;
-#endif
-
-const char* tape_med_st_verbose[MS_SIZE]={
- "UNKNOWN ",
- "LOADED ",
- "UNLOADED"
-};
-
-const char* tape_state_verbose[TS_SIZE]={
- "UNUSED",
- "IN_USE",
- "INIT ",
- "NOT_OP"
-};
-
-const char* tape_op_verbose[TO_SIZE] = {
- "BLK",
- "BSB",
- "BSF",
- "DSE",
- "EGA",
- "FSB",
- "FSF",
- "LDI",
- "LBL",
- "MSE",
- "NOP",
- "RBA",
- "RBI",
- "RBU",
- "RBL",
- "RDC",
- "RFO",
- "RSD",
- "REW",
- "RUN",
- "SEN",
- "SID",
- "SNP",
- "SPG",
- "SWI",
- "SMR",
- "SYN",
- "TIO",
- "UNA",
- "WRI",
- "WTM",
- "MSN",
- "LOA",
- "RCF", /* 3590 */
- "RAT", /* 3590 */
- "NOT"
-};
-
-/*******************************************************************
- * DEVFS Functions
- *******************************************************************/
-
-#ifdef CONFIG_DEVFS_FS
-
-/*
- * Create devfs root entry (devno in hex) for device td
- */
-
-static inline devfs_handle_t
-tape_mkdevfsroot (tape_dev_t* td)
-{
- char devno [10];
- sprintf (devno,"tape/%04x",td->devinfo.devno);
- return devfs_mk_dir(NULL, devno, NULL);
-}
-
-/*
- * Remove devfs root entry for device td
- */
-
-static inline void
-tape_rmdevfsroot (tape_dev_t* td)
-{
- devfs_remove("tape/%04x", td->devinfo.devno);
-}
-
-#endif
-
-/*******************************************************************
- * PROCFS Functions
- *******************************************************************/
-
-#ifdef CONFIG_PROC_FS
-/* functions used in tape_proc_file_ops */
-static ssize_t tape_proc_devices_read (struct file *file, char *user_buf, size_t user_len, loff_t * offset);
-static int tape_proc_devices_open (struct inode *inode, struct file *file);
-static int tape_proc_devices_release (struct inode *inode, struct file *file);
-
-/* our proc tapedevices entry */
-static struct proc_dir_entry *tape_proc_devices;
-
-typedef struct {
- char *data;
- int len;
-} tape_procinfo_t;
-
-static struct file_operations tape_proc_devices_file_ops =
-{
- .owner = THIS_MODULE,
- .read = tape_proc_devices_read, /* read */
- .open = tape_proc_devices_open, /* open */
- .release = tape_proc_devices_release, /* close */
-};
-
-/*
- * Initialize procfs stuff on startup
- */
-
-static inline void
-tape_proc_init (void) {
- tape_proc_devices = create_proc_entry ("tapedevices",
- S_IFREG | S_IRUGO | S_IWUSR,
- &proc_root);
- if (tape_proc_devices == NULL)
- goto error;
- tape_proc_devices->proc_fops = &tape_proc_devices_file_ops;
- tape_proc_devices->proc_iops = &tape_proc_devices_inode_ops;
- return;
- error:
- PRINT_WARN ("tape: Cannot register procfs entry tapedevices\n");
- return;
-}
-
-/*
- * Open function for /proc/tapedevices
- */
-
-static int
-tape_proc_devices_open (struct inode *inode, struct file *file)
-{
- tape_dev_t* td;
- tape_procinfo_t* procinfo;
- char* data = NULL;
- int size=0,check_size = -1;
- int pos=0;
- int rc=0;
- long lockflags,lockflags2;
- tape_ccw_req_t *treq;
-
- procinfo = kmalloc (sizeof(tape_procinfo_t),GFP_KERNEL);
- if (!procinfo){
- rc = -ENOMEM;
- goto out_no_lock;
- }
-
- /* Find out mem size for output, ensure that after releasing lock */
- /* (vmalloc must not be called with interrupts disabled) no devices */
- /* have been added/removed */
-
- do{
- size = 100; // Headline
- read_lock_irqsave(&tape_dev_lock,lockflags);
-
- for (td=tape_first_dev;td!=NULL;td=td->next)
- size+=100; // FIXME: Guess better!
-
- if(size == check_size)
- break;
-
- read_unlock_irqrestore(&tape_dev_lock,lockflags);
-
- if(data)
- vfree(data);
- data=vmalloc(size);
- if (!data) {
- kfree (procinfo);
- rc = -ENOMEM;
- goto out_no_lock;
- }
- check_size = size;
- }while (1);
-
- // We have the tape_dev lock now
-
-#ifdef CONFIG_S390_TAPE_CHAR
- pos+=sprintf(data+pos,"TapeNo\tDevNo\tCuType\tCuModel\tDevType\tDevMod\tBlkSize\tState\tOp\tMedState\n");
-#else
- pos+=sprintf(data+pos,"TapeNo\tDevNo\tCuType\tCuModel\tDevType\tDevMod\tState\tOp\tMedState\n");
-#endif
-
- for (td=tape_first_dev;td!=NULL;td=td->next) {
- s390irq_spin_lock_irqsave (td->devinfo.irq,lockflags2);
- treq = tape_get_active_ccw_req(td);
- pos+=sprintf(data+pos,"%d\t",td->first_minor/TAPE_MINORS_PER_DEV);
- pos+=sprintf(data+pos,"%04X\t",td->devinfo.devno);
- pos+=sprintf(data+pos,"%04X\t",td->devinfo.sid_data.cu_type);
- pos+=sprintf(data+pos,"%02X\t",td->devinfo.sid_data.cu_model);
- pos+=sprintf(data+pos,"%04X\t",td->devinfo.sid_data.dev_type);
- pos+=sprintf(data+pos,"%02X\t",td->devinfo.sid_data.dev_model);
-#ifdef CONFIG_S390_TAPE_CHAR
- if(td->char_data.block_size == 0)
- pos+=sprintf(data+pos,"auto\t");
- else
- pos+=sprintf(data+pos,"%i\t",td->char_data.block_size);
-#endif
- pos+=sprintf(data+pos,"%s\t",((tape_state_get(td) >= 0) &&
- (tape_state_get(td) < TS_SIZE)) ?
- tape_state_verbose[tape_state_get (td)] : "UNKNOWN");
- pos+=sprintf(data+pos,"%s\t",(treq != NULL) ?
- tape_op_verbose[treq->op] : "---");
- pos+=sprintf(data+pos,"%s\n",tape_med_st_verbose[td->medium_state]);
- s390irq_spin_unlock_irqrestore (td->devinfo.irq,lockflags2);
- }
-
- procinfo->data=data;
- procinfo->len=pos;
- if (pos>size) BUG(); // we've overwritten some memory
- file->private_data= (void*) procinfo;
- read_unlock_irqrestore(&tape_dev_lock,lockflags);
-out_no_lock:
- return rc;
-}
-
-/*
- * Read function for /proc/tapedevices
- */
-
-static ssize_t
-tape_proc_devices_read (struct file *file, char *user_buf, size_t user_len, loff_t * offset)
-{
- loff_t len = 0;
- tape_procinfo_t *p_info = (tape_procinfo_t *) file->private_data;
-
- if (*offset >= p_info->len) {
- goto out; /* EOF */
- } else {
- len = user_len<(p_info->len - *offset)?user_len:(p_info->len - *offset);
- if (copy_to_user (user_buf, &(p_info->data[*offset]), len))
- return -EFAULT;
- (*offset) += len;
- }
-out:
- return len;
-}
-
-/*
- * Close function for /proc/tapedevices
- */
-
-static int
-tape_proc_devices_release (struct inode *inode, struct file *file)
-{
- int rc = 0;
- tape_procinfo_t *p_info = (tape_procinfo_t *) file->private_data;
- vfree(p_info->data);
- kfree (p_info);
- return rc;
-}
-
-/*
- * Cleanup all stuff registered to the procfs
- */
-static inline void
-tape_proc_cleanup (void)
-{
- if (tape_proc_devices != NULL)
- remove_proc_entry ("tapedevices", &proc_root);
-}
-
-#endif /* CONFIG_PROC_FS */
-
-/*******************************************************************
- * Wait/Wakeup Functions
- *******************************************************************/
-
-static void tape_wake_up_remove(tape_ccw_req_t* treq){
- tape_remove_ccw_req(treq->tape_dev,treq);
- tape_free_ccw_req(treq);
-}
-
-static void tape_wake_up(tape_ccw_req_t* treq){
- treq->wakeup = NULL;
- wake_up(&treq->wq);
-}
-
-static void tape_wake_up_interruptible(tape_ccw_req_t* treq){
- treq->wakeup = NULL;
- wake_up_interruptible(&treq->wq);
-}
-
-#ifdef CONFIG_S390_TAPE_BLOCK
-static void tape_schedule_tapeblock(tape_ccw_req_t* treq){
- treq->wakeup = NULL;
- tapeblock_schedule_exec_io((tape_dev_t*)(treq->tape_dev));;
-}
-#endif
-
-static void tape_wait_event(tape_ccw_req_t* treq){
- wait_event (treq->wq,(treq->wakeup == NULL));
-}
-
-static void tape_wait_event_interruptible(tape_ccw_req_t* treq){
- wait_event_interruptible(treq->wq,(treq->wakeup == NULL));
- if (signal_pending (current)) {
- treq->rc = tape_halt_io(treq->tape_dev);
- if(treq->rc == -ERESTARTSYS)
- PRINT_INFO("IO stopped on irq %d\n",treq->tape_dev->devinfo.irq); /* FIXME: only put into dbf */
- else if(treq->rc == 0)
- PRINT_INFO("could not stop IO,irq was faster on irq %d\n",treq->tape_dev->devinfo.irq); /* FIXME: only put into dbf */
- else
- PRINT_WARN("IO error while stopping IO on irq %d\n",treq->tape_dev->devinfo.irq);
- }
-}
-
-static void tape_wait_event_interruptible_nohaltio(tape_ccw_req_t* treq){
- wait_event_interruptible(treq->wq,(treq->wakeup == NULL));
-}
-
-/*******************************************************************
- * DYNAMIC ATTACH/DETACH Functions
- *******************************************************************/
-
-static inline void
-tape_init_devregs(void)
-{
- long lockflags;
- write_lock_irqsave(&tape_dev_lock,lockflags);
- memset(tape_devreg,0,sizeof(devreg_t*) * TAPE_MAX_DEVREGS);
- write_unlock_irqrestore(&tape_dev_lock,lockflags);
-}
-
-/*
- * Alloc a devreg for a devno
- */
-
-static inline devreg_t *
-tape_create_devno_devreg (int devno)
-{
- devreg_t *devreg = kmalloc (sizeof (devreg_t), GFP_KERNEL);
- if (devreg != NULL) {
- memset (devreg, 0, sizeof (devreg_t));
- devreg->ci.devno = devno;
- devreg->flag = DEVREG_TYPE_DEVNO;
- devreg->oper_func = tape_oper_handler;
- }
- return devreg;
-}
-
-/*
- * Alloc a devreg for a cu-type
- */
-
-static inline devreg_t *
-tape_create_cu_devreg (int cu_type)
-{
- devreg_t *devreg = kmalloc (sizeof (devreg_t), GFP_KERNEL);
- if (devreg != NULL) {
- memset (devreg, 0, sizeof (devreg_t));
- devreg->ci.hc.ctype = cu_type;
- devreg->flag = DEVREG_MATCH_CU_TYPE | DEVREG_TYPE_DEVCHARS;
- devreg->oper_func = tape_oper_handler;
- }
- return devreg;
-}
-
-/*
- * Create devregs for device numbers from "from" to "to"
- */
-
-static inline void
-tape_create_devregs_range(int from, int to)
-{
- int i;
- long lockflags;
-
- write_lock_irqsave(&tape_dev_lock,lockflags);
- for (i=from;i<=to;i++) {
- // register for attch/detach of a devno
- if(tape_devregct >= TAPE_MAX_DEVREGS){
- PRINT_WARN ("Could not create devregs for devno range %04x - %04x.\n",i,to);
- PRINT_WARN ("These devices cannot be used. Use autoprobe\n");
- PRINT_WARN ("or specify device ranges more precisely!\n");
- break;
- }
- tape_devreg[tape_devregct]=tape_create_devno_devreg(i);
- if (tape_devreg[tape_devregct]!=NULL) {
- s390_device_register (tape_devreg[tape_devregct++]);
- } else {
- PRINT_WARN ("Could not create devreg for devno %04x, dyn. attach for this devno deactivated.\n",i);
- }
- }
- write_unlock_irqrestore(&tape_dev_lock,lockflags);
- return;
-}
-
-/*
- * Create a devreg for a discipline
- */
-
-static inline void
-tape_create_devreg_for_disc(tape_discipline_t *disc)
-{
- int devreg_nr;
- long lockflags;
-
- write_lock_irqsave(&tape_dev_lock,lockflags);
- for(devreg_nr = 0; devreg_nr < TAPE_MAX_DEVREGS; devreg_nr++){
- if(tape_devreg[devreg_nr] == NULL)
- break;
- }
- if(devreg_nr == TAPE_MAX_DEVREGS){
- PRINT_WARN ("Could not create devreg for discipline (%x), dyn. attach for this discipline deactivated.\n",disc->cu_type);
- goto out_unlock;
- }
- tape_devreg[devreg_nr] = tape_create_cu_devreg(disc->cu_type);
- if (tape_devreg[devreg_nr] != NULL) {
- s390_device_register(tape_devreg[devreg_nr]);
- } else {
- PRINT_WARN("Could not alloc devreg: Out of memory\n");
- PRINT_WARN("Dynamic attach/detach will not work!\n");
- }
-out_unlock:
- write_unlock_irqrestore(&tape_dev_lock,lockflags);
- return;
-}
-
-/*
- * Free all devregs
- */
-
-static inline void
-tape_delete_all_devregs(void)
-{
- int i;
- long lockflags;
-
- write_lock_irqsave(&tape_dev_lock,lockflags);
-
- for(i = 0; i < TAPE_MAX_DEVREGS; i++){
- if(tape_devreg[i]){
- s390_device_unregister(tape_devreg[i]);
- kfree(tape_devreg[i]);
- }
- }
- memset(tape_devreg,0,sizeof(devreg_t*) * TAPE_MAX_DEVREGS);
- write_unlock_irqrestore(&tape_dev_lock,lockflags);
-}
-
-/*
- * Free Devregs for a discipline
- */
-
-static inline void
-tape_delete_devreg_for_disc(tape_discipline_t* disc)
-{
- int i;
- long lockflags;
-
- write_lock_irqsave(&tape_dev_lock,lockflags);
-
- for(i = 0; i < TAPE_MAX_DEVREGS; i++){
- if(tape_devreg[i]){
- if(tape_devreg[i]->ci.hc.ctype == disc->cu_type){
- s390_device_unregister(tape_devreg[i]);
- kfree(tape_devreg[i]);
- tape_devreg[i] = NULL;
- }
- }
- }
-
- write_unlock_irqrestore(&tape_dev_lock,lockflags);
-}
-
-/*******************************************************************
- * Module/Kernel Parameter Handling
- *******************************************************************/
-
-#ifndef MODULE
-static char tape_parm_string[1024] __initdata = { 0, };
-
-/*
- * Get Kernel parameters (str) seperated by ","
- * and store them into the tape[] array
- */
-
-static void
-tape_split_parm_string (char *str)
-{
- char *tmp = str;
- int count = 0;
- while (tmp != NULL && *tmp != '\0') {
- char *end;
- int len;
- end = strchr (tmp, ',');
- if (end == NULL) {
- len = strlen (tmp) + 1;
- } else {
- len = (long) end - (long) tmp + 1;
- *end = '\0';
- end++;
- }
- tape[count] = kmalloc (len * sizeof (char), GFP_ATOMIC);
- if (tape[count] == NULL) {
- printk (KERN_WARNING PRINTK_HEADER
- "can't store tape= parameter no %d\n",
- count + 1);
- break;
- }
- memcpy (tape[count], tmp, len * sizeof (char));
- count++;
- tmp = end;
- };
-}
-
-/*
- * This function is called for each "tape=" Kernel parameter
- * at Kernel initialization. We need tape_parm_setup because of
- * 2.2 compatibility (At least I assume this :-))
- */
-
-void __init
-tape_parm_setup (char *str, int *ints)
-{
- int len = strlen (tape_parm_string);
- if (len != 0) {
- strcat (tape_parm_string, ",");
- }
- strcat (tape_parm_string, str);
-}
-
-int __init
-tape_parm_call_setup (char *str)
-{
- int dummy;
- tape_parm_setup (str, &dummy);
- return 1;
-}
-
-__setup("tape=", tape_parm_call_setup);
-#endif /* not defined MODULE */
-
-
-/*
- * Convert string to int
- */
-
-static inline int
-tape_parm_strtoul (char *str, char **stra)
-{
- char *temp = str;
- int val;
- if (*temp == '0') {
- temp++; /* strip leading zero */
- if (*temp == 'x')
- temp++; /* strip leading x */
- }
- val = simple_strtoul (temp, &temp, 16); /* interpret anything as hex */
- *stra = temp;
- return val;
-}
-
-/*
- * Parse Kernel/Module Parameters and create devregs for dynamic attach/detach
- */
-
-static inline void
-tape_parm_parse (char **str)
-{
- char *temp;
- int from, to;
-
- if (*str==NULL) {
- /* no params present -> leave */
- return;
- }
- while (*str) {
- temp = *str;
- from = 0;
- to = 0;
- from = tape_parm_strtoul (temp, &temp);
- to = from;
- if (*temp == '-') {
- temp++;
- to = tape_parm_strtoul (temp, &temp);
- }
- tape_create_devregs_range(from,to);
- str++;
- }
-}
-
-/*******************************************************************
- * Tape device (td) functions for create, free, enq, deq, enable,
- * disable, get and put
- *******************************************************************/
-
-/*
- * Enable Device
- */
-
-static inline int
-tape_enable_device(tape_dev_t* td)
-{
-#ifdef CONFIG_DEVFS_FS
- tape_frontend_t* frontend;
-#endif
- int rc = 0;
-
- if(td->discipline->setup_device(td) != 0){
- rc = -ENOMEM;
- goto out;
- }
-
- /* Register IRQ */
-
-#ifdef TAPE_CIO_PRIVATE_DATA
- #ifdef CONFIG_S390_TAPE_DYNAMIC
- rc = s390_request_irq_special (td->devinfo.irq, tape_do_irq,
- tape_noper_handler,0, TAPE_MAGIC, &(td->devstat));
- #else
- rc = s390_request_irq (td->devinfo.irq, tape_do_irq, 0, TAPE_MAGIC, &(td->devstat));
- #endif
-#else
- #ifdef CONFIG_S390_TAPE_DYNAMIC
- rc = s390_request_irq_special (td->devinfo.irq, tape_do_irq,
- tape_noper_handler,0, (char*)td, &(td->devstat));
- #else
- rc = s390_request_irq (td->devinfo.irq, tape_do_irq, 0, (char*)td, &(td->devstat));
- #endif
-#endif /* TAPE_CIO_PRIVATE_DATA */
- if (rc){
- PRINT_WARN ("Cannot register irq %d, rc=%d\n", td->devinfo.irq, rc);
- td->discipline->cleanup_device(td);
- goto out;
- }
- /* Create devfs entries */
-#ifdef CONFIG_DEVFS_FS
- if (tape_mkdevfsroot(td)==NULL){
- PRINT_WARN ("Cannot create a devfs directory for device %04x\n",td->devinfo.devno);
- goto out_undo;
- }
-
- for (frontend=tape_first_front;frontend!=NULL;frontend=frontend->next){
- if(frontend->mkdevfstree(td) == NULL){
- goto out_undo;
- }
- }
-#endif
-#ifdef TAPE_CIO_PRIVATE_DATA
- s390_set_private_data(td->devinfo.irq,td);
-#endif
-out:
- return rc;
-out_undo:
- tape_disable_device(td);
- return -ENOMEM;
-}
-
-/*
- * Disable Device
- */
-
-static inline void
-tape_disable_device(tape_dev_t* td)
-{
-#ifdef CONFIG_DEVFS_FS
- tape_frontend_t* frontend;
-#endif
- td->discipline->cleanup_device(td);
-#ifdef TAPE_CIO_PRIVATE_DATA
- s390_set_private_data(td->devinfo.irq,NULL);
-#else
- ioinfo[td->devinfo.irq]->irq_desc.name = NULL;
-#endif
-
- free_irq (td->devinfo.irq, &(td->devstat));
-#ifdef CONFIG_DEVFS_FS
- for (frontend=tape_first_front;frontend!=NULL;frontend=frontend->next)
- frontend->rmdevfstree(td);
- tape_rmdevfsroot(td);
-#endif
- tape_state_set(td,TS_NOT_OPER);
-}
-
-/*
- * Append Tape device (td) to our tape info list
- * Must be called with hold tape_dev_lock
- */
-
-static inline void
-tape_enq_device(tape_dev_t* td)
-{
- tape_dev_t *temptd = NULL;
-
- if (tape_first_dev == NULL) {
- tape_first_dev = td;
- } else {
- temptd = tape_first_dev;
- while (temptd->next != NULL)
- temptd = temptd->next;
- temptd->next = td;
- }
-}
-
-/*
- * Remove Tape device (td) from our tape info list
- * Must be called with hold tape_dev_lock
- */
-
-static inline void
-tape_deq_device(tape_dev_t* td)
-{
- tape_dev_t* lasttd;
-
- if (td==tape_first_dev) {
- tape_first_dev=td->next;
- } else {
- lasttd=tape_first_dev;
- while (lasttd->next!=td) lasttd=lasttd->next;
- lasttd->next=td->next;
- }
-}
-
-
-/*
- * Get Free minor number
- * Must be called with held tape_dev_lock
- */
-
-static inline int
-tape_get_new_minor(int devno)
-{
- int i,tape_num = -1;
- tape_dev_t* newtape;
-
- if(!tape_autoprobe){
- /* we have static device ranges, so fingure out the */
- /* tape_num of the attached tape */
- for (i=0;i<tape_devregct;i++){
- if (tape_devreg[i]->ci.devno==devno) {
- tape_num=TAPE_MINORS_PER_DEV*i;
- goto out;
- }
- }
- } else {
- /* we are running in autoprobe mode, find a free */
- /* tape_num */
- i = 0;
- newtape=tape_first_dev;
- while (newtape!=NULL) {
- if (newtape->first_minor==i) {
- /* tape num in use. try next one */
- i+=TAPE_MINORS_PER_DEV;
- newtape=tape_first_dev;
- } else {
- /* tape num not used by newtape. look at next */
- /* tape info */
- newtape=newtape->next;
- }
- }
- if(i>255) /* No more minor available */
- tape_num = -1;
- else
- tape_num = i;
- }
-out:
- return tape_num;
-}
-
-
-/*
- * Create device: Alloc, enable and enq device
- */
-
-static inline tape_dev_t*
-tape_create_device(int irq, int devno, tape_discipline_t* disc)
-{
- int rc = 0;
- int tape_num;
- tape_dev_t *td;
- long lockflags;
-
- write_lock_irqsave(&tape_dev_lock,lockflags);
-
- td = kmalloc (sizeof (tape_dev_t), GFP_ATOMIC);
- if (td == NULL) {
- tape_sprintf_exception (tape_dbf_area,2,"ti:no mem \n");
- PRINT_INFO ("tape: can't allocate memory for "
- "tape info structure\n");
- goto error;
- }
- memset(td,0,sizeof(tape_dev_t));
- tape_num = tape_get_new_minor(devno);
- if(tape_num == -1){
- PRINT_WARN("tape: could not get minor for tape %x\n",devno);
- goto error;
- }
- rc = get_dev_info_by_irq (irq, &(td->devinfo));
- if (rc == -ENODEV) { /* end of device list */
- goto error;
- }
- td->discipline = disc;
- atomic_set(&(td->use_count),1);
- td->first_minor = tape_num;
- td->medium_state = MS_UNKNOWN;
- td->next = NULL;
- td->discdata = td->treq = NULL;
- tape_state_set (td, TS_INIT);
- td->discdata=NULL;
- td->last_op = TO_NOTHING;
-
- if(td->discipline->setup_device(td) != 0)
- goto error;
- if(tape_enable_device(td) !=0)
- goto error;
- tape_enq_device(td);
- PRINT_INFO ("using devno %04x with discipline %04x on irq %d as tape device %d\n",devno,disc->cu_type,irq,tape_num/2);
- write_unlock_irqrestore(&tape_dev_lock,lockflags);
- return td;
-error:
- tape_sprintf_event (tape_dbf_area,3,"tsetup err: %x\n",rc);
- if(td)
- kfree (td);
- write_unlock_irqrestore(&tape_dev_lock,lockflags);
- return NULL;
-}
-
-/*
- * Free Device storage
- */
-
-static void
-tape_free_device(tape_dev_t* td)
-{
- if (TAPE_BUSY(td))
- BUG(); /* one should _not_ free the device when a request is pending */
- tape_sprintf_event (tape_dbf_area,6,"free irq: %x\n",td->devinfo.irq);
- kfree(td);
-}
-
-/*
- * Decrement use count of tape structure
- * if use count == 0 tape structure is freed
- */
-
-inline void
-tape_put_device(tape_dev_t* td)
-{
- if (td==NULL)
- BUG();
- if(atomic_dec_and_test(&(td->use_count)))
- tape_free_device(td);
-}
-
-/*
- * Find the tape_dev_t structure associated with member
- * and increase use count:
- *
- * member: TAPE_MEMB_IRQ, TAPE_MEMB_MINOR
- */
-
-tape_dev_t *
-__tape_get_device_by_member(unsigned long value, int member)
-{
- tape_dev_t *td = NULL;
- long lockflags;
-
- read_lock_irqsave(&tape_dev_lock,lockflags);
- td = tape_first_dev;
- while(td != NULL) {
- switch(member){
- case TAPE_MEMB_IRQ:
- if(td->devinfo.irq == value)
- goto out;
- break;
- case TAPE_MEMB_MINOR:
- if((value >= td->first_minor) &&
- (value < (td->first_minor + TAPE_MINORS_PER_DEV)) )
- goto out;
- break;
- case TAPE_MEMB_QUEUE:
- if(((unsigned long)(&td->blk_data.request_queue)) == value)
- goto out;
- break;
- default:
- BUG();
- }
- td = td->next;
- }
-out:
- if(td) // found!
- atomic_inc(&(td->use_count));
- read_unlock_irqrestore(&tape_dev_lock,lockflags);
- return td;
-}
-
-/*
- * Scan all irqs an create tape devices for all matching cu types
- */
-
-static inline void
-tape_create_devs_for_disc(tape_discipline_t* disc)
-{
- int irq,i;
- tape_dev_t* td = NULL;
- s390_dev_info_t dinfo;
-
- for (irq = get_irq_first(); irq!=-ENODEV; irq=get_irq_next(irq)) {
- if(get_dev_info_by_irq (irq, &dinfo) == -ENODEV)
- continue;
- if(disc->cu_type != dinfo.sid_data.cu_type)
- /* Wrong type - try next one */
- continue;
-
- tape_sprintf_event (tape_dbf_area,3,"det irq: %x\n",irq);
- tape_sprintf_event (tape_dbf_area,3,"cu : %x\n",disc->cu_type);
-
-
- if(!tape_autoprobe) {
- for( i=0; i<tape_devregct; i++ ) {
- if(tape_devreg[i]->ci.devno == dinfo.devno) {
- td = tape_create_device(irq, dinfo.devno, disc);
- if(!td) {
- PRINT_WARN( "Could not initialize tape 0x%x\n",dinfo.devno);
- continue;
- }
- if(disc->init_device)
- disc->init_device(td); /* XXX */
- tape_state_set (td, TS_UNUSED);
- break;
- }
- }
- }
- else {
- td = tape_create_device(irq,dinfo.devno,disc);
-
- if(!td){
- PRINT_WARN( "Could not initialize tape 0x%x\n",dinfo.devno);
- continue;
- }
- if(disc->init_device)
- disc->init_device(td); /* XXX */
- tape_state_set (td, TS_UNUSED);
- }
- }
-}
-
-/*
- * Go through our tape info list and disable, deq and free all devices with
- * matching cu type
- */
-
-static inline void
-tape_delete_devs_for_disc(tape_discipline_t* disc)
-{
- tape_dev_t *td;
- long lockflags;
-
- write_lock_irqsave(&tape_dev_lock,lockflags);
- td = tape_first_dev;
- while (td !=NULL){
- if(td->discipline == disc){
- tape_deq_device(td);
- write_unlock_irqrestore(&tape_dev_lock,lockflags);
- tape_disable_device(td);
- tape_put_device(td);
- write_lock_irqsave(&tape_dev_lock,lockflags);
- td = tape_first_dev;
- } else {
- td=td->next;
- }
- }
- write_unlock_irqrestore(&tape_dev_lock,lockflags);
-}
-
-/*******************************************************************
- * TAPE Request and IO Functions
- *******************************************************************/
-
-/*
- * Allocate a new tape ccw request
- */
-
-inline tape_ccw_req_t *
-tape_alloc_ccw_req (int cplength, int datasize,int idal_buf_size, tape_op_t operation)
-{
- tape_ccw_req_t* treq;
- int kmalloc_flags;
- if(in_interrupt())
- kmalloc_flags = GFP_ATOMIC;
- else
- kmalloc_flags = GFP_KERNEL;
-
- treq = (tape_ccw_req_t*) kmalloc(sizeof(tape_ccw_req_t),kmalloc_flags);
- if(!treq)
- goto error;
- memset(treq,0,sizeof(tape_ccw_req_t));
- treq->kernbuf_size = datasize;
- treq->userbuf_size = datasize;
- treq->op = operation;
- treq->cplength = cplength;
- init_waitqueue_head (&treq->wq);
-
- // alloc small kernel buffer
-
- if(datasize > PAGE_SIZE)
- BUG();
- if(datasize > 0){
- // the kernbuf must be below 2GB --> GFP_DMA
- treq->kernbuf = kmalloc(datasize,kmalloc_flags | GFP_DMA);
- if(!treq->kernbuf)
- goto error;
- memset(treq->kernbuf, 0, datasize);
- }
-
- // alloc idal kernel buffer
-
- if(idal_buf_size > 0){
- treq->idal_buf = idalbuf_alloc(idal_buf_size);
- if(!treq->idal_buf)
- goto error;
- }
-
- if(cplength < 0)
- BUG();
-
- // the channel program must be below 2GB --> GFP_DMA
- treq->cpaddr = kmalloc(cplength * sizeof(ccw1_t), kmalloc_flags | GFP_DMA);
- if(!treq->cpaddr)
- goto error;
- memset(treq->cpaddr, 0, cplength*sizeof(ccw1_t));
- return treq;
-error:
- tape_sprintf_exception (tape_dbf_area,1,"cqra nomem\n");
- if(treq)
- tape_free_ccw_req(treq);
- return NULL;
-}
-
-/*
- * Free tape ccw request
- */
-
-void
-tape_free_ccw_req (tape_ccw_req_t * treq)
-{
- if(!treq)
- BUG();
- if(treq->cpaddr)
- kfree(treq->cpaddr);
- if(treq->kernbuf)
- kfree(treq->kernbuf);
- if(treq->idal_buf)
- idalbuf_free(treq->idal_buf);
- kfree(treq);
-}
-
-/*
- * Add request to request queue (At the moment queue length = 1)
- */
-
-static inline int
-tape_add_ccw_req(tape_dev_t* td,tape_ccw_req_t* treq)
-{
- if(td->treq)
- return -1;
- td->treq = treq;
- treq->tape_dev = td;
- return 0;
-}
-
-/*
- * Remove request from request queue (At the moment queue length = 1)
- */
-
-int
-tape_remove_ccw_req(tape_dev_t* td,tape_ccw_req_t* treq)
-{
- if(treq != td->treq)
- BUG();
- td->last_op = treq->op;
- td->treq=NULL;
- treq->tape_dev=NULL;
- return 0;
-}
-
-/*
- * Get the active ccw request
- */
-
-tape_ccw_req_t*
-tape_get_active_ccw_req(tape_dev_t* td)
-{
- return td->treq;
-}
-
-/*
- * Stop the active ccw request
- */
-
-static inline int
-tape_halt_io(tape_dev_t* td)
-{
- int retries = 0;
- int irq = td->devinfo.irq;
- int rc = 0;
- long lockflags;
- tape_ccw_req_t* treq;
-
- s390irq_spin_lock_irqsave (td->devinfo.irq, lockflags);
- treq = tape_get_active_ccw_req(td);
- /* check if interrupt has already been processed */
- if(!treq)
- goto out;
- if(treq->wakeup == NULL)
- goto out;
- while (retries < 5){
- if ( retries < 2 )
- rc = halt_IO(irq, (long)treq, treq->options);
- else
- rc = clear_IO(irq, (long)treq, treq->options);
- switch (rc) {
- case 0: /* termination successful */
- rc = -ERESTARTSYS;
- goto out;
- case -ENODEV:
- PRINT_INFO ("device gone, retry\n"); /* FIXME: s390dbf only */
- break;
- case -EIO:
- PRINT_INFO ("I/O error, retry\n"); /* FIXME: s390dbf only */
- break;
- case -EBUSY:
- PRINT_INFO ( "device busy, retry later\n"); /* FIXME: s390dbf only */
- break;
- default:
- PRINT_ERR ( "line %d unknown RC=%d, please report"
- " to linux390@de.ibm.com\n", __LINE__, rc);
- BUG ();
- }
- retries ++;
- }
-out:
- s390irq_spin_unlock_irqrestore(td->devinfo.irq, lockflags);
- return rc;
-}
-
-
-/*
- * The tape IO function:
- * tape_do_io MUST be called with locked td lock!
- */
-
-static inline int
-__tape_do_io(tape_dev_t * td,tape_ccw_req_t *treq,tape_wait_t type,int io)
-{
- int rc = 0;
-
- if ((td==NULL) || (treq==NULL))
- BUG();
-
- if(tape_state_get(td) == TS_NOT_OPER){
- rc = -ENODEV;
- goto out;
- }
- if(TAPE_BUSY(td)){
- tape_sprintf_event (tape_dbf_area,1,"tape: IRQ - Tape busy\n");
- rc = -EBUSY;
- goto out;
- }
- tape_add_ccw_req(td,treq);
- switch(type){
- case TAPE_REMOVE_REQ_ON_WAKEUP:
- treq->wakeup = tape_wake_up_remove;
- break;
- case TAPE_NO_WAIT:
- // needed for retry
- break;
- case TAPE_WAIT:
- treq->wakeup = tape_wake_up;
- treq->wait = tape_wait_event;
- break;
- case TAPE_WAIT_INTERRUPTIBLE:
- treq->wakeup = tape_wake_up_interruptible;
- treq->wait = tape_wait_event_interruptible;
- break;
- case TAPE_WAIT_INTERRUPTIBLE_NOHALTIO:
- // neded for dummy load
- treq->wakeup = tape_wake_up_interruptible;
- treq->wait = tape_wait_event_interruptible_nohaltio;
- break;
-#ifdef CONFIG_S390_TAPE_BLOCK
- case TAPE_SCHED_BLOCK:
- treq->wakeup = tape_schedule_tapeblock;
- treq->wait = NULL;
- break;
-#endif
- default:
- BUG();
- }
-
- if(io)
- rc = do_IO(td->devinfo.irq,treq->cpaddr,
- (unsigned long)treq, 0x00, treq->options);
-
- if(rc) {
- tape_sprintf_event (tape_dbf_area,1,"tape: DOIO failed with er = %i\n",rc);
- treq->wakeup = NULL;
- treq->wait = NULL; /*XXX ??*/
- tape_remove_ccw_req(td,treq);
- }
-out:
- return rc;
-}
-
-/*
- * Do the io request and wait for it
- */
-
-int
-tape_do_io_and_wait(tape_dev_t * td,tape_ccw_req_t *treq,tape_wait_t type)
-{
- int rc = 0;
- long lockflags;
- if (td==NULL)
- BUG();
- s390irq_spin_lock_irqsave (td->devinfo.irq, lockflags);
- rc = __tape_do_io(td,treq,type,TAPE_DO_IO);
- s390irq_spin_unlock_irqrestore (td->devinfo.irq, lockflags);
- if(rc == 0)
- tape_wait(treq);
- return rc;
-}
-
-/*
- * Needed for MTLOAD: Just create a wait request without doing io
- */
-
-int
-tape_do_wait_req(tape_dev_t * td,tape_ccw_req_t *treq,tape_wait_t type)
-{
- int rc = 0;
- long lockflags;
- if (td==NULL)
- BUG();
- s390irq_spin_lock_irqsave (td->devinfo.irq, lockflags);
- rc = __tape_do_io(td,treq,type,TAPE_NO_IO);
- s390irq_spin_unlock_irqrestore (td->devinfo.irq, lockflags);
- tape_wait(treq);
- return rc;
-}
-
-/*
- * Just do the io
- */
-
-int
-tape_do_io(tape_dev_t * td,tape_ccw_req_t *treq,tape_wait_t type)
-{
- int rc = 0;
- long lockflags;
- s390irq_spin_lock_irqsave (td->devinfo.irq, lockflags);
- rc = __tape_do_io(td,treq,type,TAPE_DO_IO);
- s390irq_spin_unlock_irqrestore (td->devinfo.irq, lockflags);
- return rc;
-}
-
-/*
- * Just do the io, but we are already locked here (in irq)
- */
-
-int
-tape_do_io_irq(tape_dev_t * td,tape_ccw_req_t *treq,tape_wait_t type)
-{
- return __tape_do_io(td,treq,type,TAPE_DO_IO);
-}
-
-/*
- * Wait for an io request
- */
-
-static void
-tape_wait(tape_ccw_req_t* treq)
-{
- tape_dev_t* td;
- if(treq==NULL)
- BUG();
- td = treq->tape_dev;
- if (td==NULL)
- BUG();
- if(treq->wait==NULL)
- BUG();
- treq->wait(treq);
- tape_remove_ccw_req(td,treq);
-}
-
-/*
- * Tape interrupt routine, called from Ingo's I/O layer
- */
-
-static void
-tape_do_irq (int irq, void *int_parm, struct pt_regs *regs)
-{
- tape_dev_t *td;
-#ifdef TAPE_CIO_PRIVATE_DATA
- td = (tape_dev_t*)s390_get_private_data(irq);
-#else
- td = (tape_dev_t*)ioinfo[irq]->irq_desc.name;
-#endif
- if(!td) {
- PRINT_ERR ("tape: could not get device structure for irq %d in interrupt\n",irq);
- goto out;
- }
- if(td->devstat.dstat != 0x0c){
- tape_sprintf_event (tape_dbf_area,3,"-- Tape Interrupthandler --\n");
- tape_dump_sense_dbf(td);
- }
- if (tape_state_get(td) == TS_NOT_OPER) {
- tape_sprintf_event (tape_dbf_area,6,"tape:device is not operational\n");
- goto out;
- }
- td->discipline->irq(td);
-out:
- return;
-}
-
-/*
- * Oper Handler is called from Ingo's I/O layer when a new tape device is
- * attached. We create a new devinfo for the new device, enable and enq it.
- */
-
-static int
-tape_oper_handler ( int irq, struct _devreg *dreg) {
- tape_dev_t* td=tape_first_dev;
- int rc=0;
- s390_dev_info_t dinfo;
- tape_discipline_t* disc;
- long lockflags;
-
- td = tape_get_device_by_irq(irq);
- if (td!=NULL) {
- // irq is (still) used by tape. tell ingo to try again later
- PRINT_ERR ("tape:Oper handler for irq %d called, but irq is still (internally) used.\n",irq);
- rc = -EAGAIN;
- goto out;
- }
-
- rc = get_dev_info_by_irq (irq, &dinfo);
- if (rc == -ENODEV) {
- PRINT_ERR ("tape: Cannot get dev info for irq %d in the oper handler.\n",irq);
- rc = -EAGAIN;
- goto out;
- }
-
- read_lock_irqsave(&tape_discipline_lock,lockflags);
-
- disc = tape_first_disc;
- while ((disc != NULL) && (disc->cu_type != dinfo.sid_data.cu_type))
- disc = (tape_discipline_t *) (disc->next);
-
- if (disc == NULL){
- PRINT_WARN ("tape: No matching discipline for cu_type %x found in the oper handler, ignoring device %04x.\n",dinfo.sid_data.cu_type,dinfo.devno);
- rc = -ENODEV;
- goto out_unlock;
- }
-
- /* Allocate tape structure */
- td = tape_create_device(irq,dinfo.devno,disc);
-
- if (td == NULL) {
- PRINT_WARN( "Could not initialize tape 0x%x\n",dinfo.devno);
- rc = -ENOBUFS;
- goto out_unlock;
- } else {
- if(disc->init_device)
- disc->init_device(td);
- }
- tape_state_set (td, TS_UNUSED);
-out_unlock:
- read_unlock_irqrestore(&tape_discipline_lock,lockflags);
-out:
- return rc;
-}
-
-/*
- * Not Oper Handler is called from Ingo's IO layer, when a tape device
- * is detached. We deq, disable and free the tape info for this device
- */
-
-static void
-tape_noper_handler ( int irq, int status ) {
- tape_dev_t *td;
- long lockflags;
- tape_ccw_req_t *treq;
-
- td = tape_get_device_by_irq(irq);
- if (td==NULL) {
- PRINT_ERR("tape: not operational handler called for irq %x, but tape does not hold this irq.\n",irq);
- goto error;
- }
-
- write_lock_irqsave(&tape_dev_lock,lockflags);
- tape_deq_device(td);
- write_unlock_irqrestore(&tape_dev_lock,lockflags);
-
- tape_disable_device(td);
-
- s390irq_spin_lock_irqsave (td->devinfo.irq, lockflags);
- treq = tape_get_active_ccw_req(td);
- if (treq) {
- // device is in use!
- treq->rc= -ENODEV;
- if(treq->wakeup)
- treq->wakeup (treq);
- PRINT_WARN ("Tape #%d is detached while it was busy.\n",td->first_minor/TAPE_MINORS_PER_DEV);
- } else {
- // device is unused!
- PRINT_WARN ("Tape #%d is detached now.\n",td->first_minor/TAPE_MINORS_PER_DEV);
- }
-
- s390irq_spin_unlock_irqrestore (td->devinfo.irq, lockflags);
-
- /* decrement use count twice ! */
- tape_put_device(td);
- tape_put_device(td);
-error:
- return;
-}
-
-/*
- * Write sense data to dbf
- */
-
-void tape_dump_sense_dbf(tape_dev_t* td)
-{
- devstat_t *stat = &td->devstat;
- const char* op;
- if(TAPE_BUSY(td))
- op = tape_op_verbose[tape_get_active_ccw_req(td)->op];
- else
- op = "---";
- tape_sprintf_event (tape_dbf_area,3,"DSTAT : %02x CSTAT: %02x\n",stat->dstat,stat->cstat);
- tape_sprintf_event (tape_dbf_area,3,"DEVICE: %04x OP : %s\n",td->devinfo.devno,op);
- tape_sprintf_event (tape_dbf_area,3,"%08x %08x\n",*((unsigned int*)&stat->ii.sense.data[0]),*((unsigned int*)&stat->ii.sense.data[4]));
- tape_sprintf_event (tape_dbf_area,3,"%08x %08x\n",*((unsigned int*)&stat->ii.sense.data[8]),*((unsigned int*)&stat->ii.sense.data[12]));
- tape_sprintf_event (tape_dbf_area,3,"%08x %08x\n",*((unsigned int*)&stat->ii.sense.data[16]),*((unsigned int*)&stat->ii.sense.data[20]));
- tape_sprintf_event (tape_dbf_area,3,"%08x %08x\n",*((unsigned int*)&stat->ii.sense.data[24]),*((unsigned int*)&stat->ii.sense.data[28]));
-}
-
-/*
- * Write sense data to console/dbf
- */
-
-void
-tape_dump_sense (tape_dev_t* td)
-{
- devstat_t *stat = &td->devstat;
-#if 1 /* XXX */
- PRINT_INFO ("-------------------------------------------------\n");
- PRINT_INFO ("DSTAT : %02x CSTAT: %02x CPA: %04x\n",stat->dstat,stat->cstat,stat->cpa);
- PRINT_INFO ("DEVICE: %04x\n",td->devinfo.devno);
- if(TAPE_BUSY(td))
- PRINT_INFO("OP : %s\n",tape_op_verbose[tape_get_active_ccw_req(td)->op]);
-
- PRINT_INFO ("Sense data: %02X%02X%02X%02X %02X%02X%02X%02X "
- " %02X%02X%02X%02X %02X%02X%02X%02X \n",
- stat->ii.sense.data[0], stat->ii.sense.data[1],
- stat->ii.sense.data[2], stat->ii.sense.data[3],
- stat->ii.sense.data[4], stat->ii.sense.data[5],
- stat->ii.sense.data[6], stat->ii.sense.data[7],
- stat->ii.sense.data[8], stat->ii.sense.data[9],
- stat->ii.sense.data[10], stat->ii.sense.data[11],
- stat->ii.sense.data[12], stat->ii.sense.data[13],
- stat->ii.sense.data[14], stat->ii.sense.data[15]);
- PRINT_INFO ("Sense data: %02X%02X%02X%02X %02X%02X%02X%02X "
- " %02X%02X%02X%02X %02X%02X%02X%02X \n",
- stat->ii.sense.data[16], stat->ii.sense.data[17],
- stat->ii.sense.data[18], stat->ii.sense.data[19],
- stat->ii.sense.data[20], stat->ii.sense.data[21],
- stat->ii.sense.data[22], stat->ii.sense.data[23],
- stat->ii.sense.data[24], stat->ii.sense.data[25],
- stat->ii.sense.data[26], stat->ii.sense.data[27],
- stat->ii.sense.data[28], stat->ii.sense.data[29],
- stat->ii.sense.data[30], stat->ii.sense.data[31]);
- PRINT_INFO ("--------------------------------------------------\n");
-#endif
-}
-
-/*******************************************************************
- * TAPE Discipline functions
- *******************************************************************/
-
-/*
- * Register backend discipline
- */
-
-int
-tape_register_discipline(tape_discipline_t *disc)
-{
- tape_discipline_t *disc_ptr;
- long lockflags;
-
- disc->next = NULL;
-
- write_lock_irqsave(&tape_discipline_lock,lockflags);
-
- if (tape_first_disc == NULL) {
- tape_first_disc = disc;
- } else {
- for(disc_ptr = tape_first_disc; disc_ptr->next!=NULL; disc_ptr=(tape_discipline_t*)disc_ptr->next);
- disc_ptr->next = disc;
- }
-
- tape_create_devs_for_disc(disc);
- if(tape_autoprobe)
- tape_create_devreg_for_disc(disc);
-
- write_unlock_irqrestore(&tape_discipline_lock,lockflags);
- return 0;
-}
-
-/*
- * Unregister backend discipline
- */
-
-void
-tape_unregister_discipline(tape_discipline_t* disc)
-{
- tape_discipline_t* lastdisc;
- long lockflags;
-
- write_lock_irqsave(&tape_discipline_lock,lockflags);
-
- tape_delete_devs_for_disc(disc);
- if(tape_autoprobe)
- tape_delete_devreg_for_disc(disc);
-
- if (disc==tape_first_disc) {
- tape_first_disc=disc->next;
- } else {
- lastdisc=tape_first_disc;
- while (lastdisc->next!=disc) lastdisc=lastdisc->next;
- lastdisc->next=disc->next;
- }
-
- disc->shutdown();
-
- write_unlock_irqrestore(&tape_discipline_lock,lockflags);
-}
-
-/*
- * Cleanup all registered disciplines
- */
-
-static inline void
-tape_cleanup_disciplines (void)
-{
- long lockflags;
- tape_discipline_t* disc;
- /* Unregister all backend disciplines - this also deletes the devices */
-
- write_lock_irqsave(&tape_discipline_lock,lockflags);
- disc=tape_first_disc;
- while (disc != NULL) {
- write_unlock_irqrestore(&tape_discipline_lock,lockflags);
- tape_unregister_discipline(disc);
- kfree(disc);
- write_lock_irqsave(&tape_discipline_lock,lockflags);
- disc=tape_first_disc;
- }
- write_unlock_irqrestore(&tape_discipline_lock,lockflags);
-}
-
-
-/*******************************************************************
- * TAPE Init Functions
- *******************************************************************/
-
-/*
- * tape_print_banner will be called on initialisation and print a nice banner
- */
-
-static inline void
-tape_print_banner (void)
-{
- char *opt_char,*opt_block;
-
- /* print banner */
- PRINT_WARN ("IBM zSeries Tape Device Driver (v%d.%02d).\n",TAPE_VERSION_MAJOR,TAPE_VERSION_MINOR);
- PRINT_WARN ("(C) IBM Deutschland Entwicklung GmbH, 2000 - 2001\n");
- opt_char=opt_block="not present";
-#ifdef CONFIG_S390_TAPE_CHAR
- opt_char="built in";
-#endif
-#ifdef CONFIG_S390_TAPE_BLOCK
- opt_block="built in";
-#endif
- /* print feature info */
- PRINT_WARN ("character device frontend : %s\n",opt_char);
- PRINT_WARN ("block device frontend : %s\n",opt_block);
-}
-
-/*
- * tape_init will register the driver for each tape.
- */
-
-int
-tape_init (void)
-{
- static int initialized=0;
-
- if (initialized) // Only init the devices once
- return 0;
- initialized=1;
-
- tape_init_devregs();
-#ifdef TAPE_DEBUG
- tape_dbf_area = debug_register ( "tape", 2, 2, 3*sizeof(long));
- debug_register_view(tape_dbf_area,&debug_sprintf_view);
- tape_sprintf_event (tape_dbf_area,3,"begin init\n");
-#endif /* TAPE_DEBUG */
- tape_print_banner();
-#ifndef MODULE
- tape_split_parm_string(tape_parm_string);
-#endif
-#ifdef CONFIG_DEVFS_FS
- devfs_mk_dir (NULL, "tape", NULL);
-#endif /* CONFIG_DEVFS_FS */
-
- tape_sprintf_event (tape_dbf_area,3,"dev detect\n");
- /* Allocate the tape structures */
- if (*tape!=NULL) { /* if parameters are present */
- PRINT_INFO ("Using ranges supplied in parameters, disabling autoprobe mode.\n");
- tape_parm_parse (tape);
- tape_autoprobe = 0;
- } else {
- PRINT_INFO ("No parameters supplied, enabling autoprobe mode for all supported devices.\n");
- tape_autoprobe = 1;
- }
-#ifdef CONFIG_PROC_FS
- tape_proc_init();
-#endif /* CONFIG_PROC_FS */
-#ifdef CONFIG_S390_TAPE_3480
- tape_register_discipline(tape3480_init());
-#else
-#ifndef CONFIG_S390_TAPE
- tape_request_module("tape_3480_mod");
-#endif
-#endif /* CONFIG_S390_TAPE_3480 */
-
-#ifdef CONFIG_S390_TAPE_3490
- tape_register_discipline(tape3490_init());
-#else
-#ifndef CONFIG_S390_TAPE
- tape_request_module("tape_3490_mod");
-#endif
-#endif /* CONFIG_S390_TAPE_3490 */
-
-#ifdef CONFIG_S390_TAPE_3590
- tape_register_discipline(tape3590_init());
-#else
-#ifndef CONFIG_S390_TAPE
- tape_request_module("tape_3590_mod");
-#endif
-#endif /* CONFIG_S390_TAPE_3590 */
- return 0;
-}
-
-/*******************************************************************
- * TAPE Module functions
- *******************************************************************/
-
-#ifdef MODULE
-MODULE_AUTHOR("(C) 2001 IBM Deutschland Entwicklung GmbH by Carsten Otte and Michael Holzheu (cotte@de.ibm.com,holzheu@de.ibm.com)");
-MODULE_DESCRIPTION("Linux on zSeries channel attached tape device driver");
-MODULE_PARM (tape, "1-" __MODULE_STRING (256) "s");
-
-/*
- * The famous init_module
- */
-
-int
-init_module (void)
-{
-#ifdef CONFIG_S390_TAPE_CHAR
- tapechar_init ();
-#endif
-#ifdef CONFIG_S390_TAPE_BLOCK
- tapeblock_init ();
-#endif
- return 0;
-}
-
-/*
- * Cleanup the frontends
- */
-static inline void
-tape_cleanup_frontends(void)
-{
- tape_frontend_t* frontend, *tempfe;
-
- /* Now get rid of the frontends */
-#ifdef CONFIG_S390_TAPE_CHAR
- tapechar_uninit();
-#endif
-#ifdef CONFIG_S390_TAPE_BLOCK
- tapeblock_uninit();
-#endif
- frontend=tape_first_front;
- while (frontend != NULL) {
- tempfe = frontend;
- frontend = frontend->next;
- kfree (tempfe);
- }
-}
-
-
-/*
- * Cleanup module
- */
-
-void
-cleanup_module (void)
-{
- tape_sprintf_event (tape_dbf_area,6,"cleaup mod");
- tape_cleanup_disciplines();
-#ifdef CONFIG_DEVFS_FS
- devfs_remove("tape"); /* devfs checks for NULL */
-#endif CONFIG_DEVFS_FS
-#ifdef CONFIG_PROC_FS
- tape_proc_cleanup();
-#endif
- tape_cleanup_frontends();
- /* Deallocate devregs in case of not autoprobe */
- if(!tape_autoprobe)
- tape_delete_all_devregs();
-#ifdef TAPE_DEBUG
- debug_unregister (tape_dbf_area);
-#endif /* TAPE_DEBUG */
-}
-#endif /* MODULE */
-
-
-/*******************************************************************
- * TAPE Tapestate functions
- *******************************************************************/
-
-inline void
-tape_state_set (tape_dev_t * td, tape_state_t newstate)
-{
- if (td->tape_state == TS_NOT_OPER) {
- tape_sprintf_event(tape_dbf_area,3,"ts_set err: not oper\n");
- } else {
- tape_sprintf_event(tape_dbf_area,4,"ts. dev: %x\n",td->first_minor);
- tape_sprintf_event(tape_dbf_area,4,"old ts: %s\n",(((tape_state_get (td) < TO_SIZE) && (tape_state_get (td) >=0 )) ? tape_state_verbose[tape_state_get (td)] : "UNKNOWN TS"));
- tape_sprintf_event(tape_dbf_area,4,"%s\n",
- (((tape_state_get (td) < TO_SIZE) &&
- (tape_state_get (td) >=0 )) ?
- tape_state_verbose[tape_state_get (td)] :
- "UNKNOWN TS"));
- tape_sprintf_event (tape_dbf_area,4,"new ts: \n");
- tape_sprintf_event (tape_dbf_area,4,"%s\n",(((newstate < TO_SIZE) &&
- (newstate >= 0)) ?
- tape_state_verbose[newstate] :
- "UNKNOWN TS"));
- td->tape_state = newstate;
- }
-}
-
-inline tape_state_t
-tape_state_get (tape_dev_t * td)
-{
- return (td->tape_state);
-}
-
-inline void
-tape_med_state_set(tape_dev_t * td, tape_medium_state_t newstate)
-{
- if(td->medium_state == newstate)
- goto out;
- switch(newstate){
- case MS_UNLOADED:
- PRINT_INFO("(%x): Tape is unloaded\n",td->devstat.devno);
- break;
- case MS_LOADED:
- PRINT_INFO("(%x): Tape has been mounted\n",td->devstat.devno);
- break;
- default:
- // print nothing
- break;
- }
- td->medium_state = newstate;
-out:
- return;
-}
-
-
-/*******************************************************************
- * TAPE Exported Functions
- *******************************************************************/
-
-EXPORT_SYMBOL(tape_register_discipline);
-EXPORT_SYMBOL(tape_unregister_discipline);
-EXPORT_SYMBOL(tape_dbf_area);
-EXPORT_SYMBOL(tape_alloc_ccw_req);
-EXPORT_SYMBOL(tape_free_ccw_req);
-EXPORT_SYMBOL(tape_state_set);
-EXPORT_SYMBOL(tape_state_get);
-EXPORT_SYMBOL(tape_med_state_set);
-EXPORT_SYMBOL(tape_state_verbose);
-EXPORT_SYMBOL(tape_op_verbose);
-EXPORT_SYMBOL(tape_dump_sense);
-EXPORT_SYMBOL(tape_dump_sense_dbf);
-EXPORT_SYMBOL(tape_do_io);
-EXPORT_SYMBOL(tape_do_io_irq);
-EXPORT_SYMBOL(tape_do_io_and_wait);
-EXPORT_SYMBOL(tape_remove_ccw_req);
-EXPORT_SYMBOL(tape_get_active_ccw_req);
^ permalink raw reply
* [PATCH] s390 (1/8): Makefiles.
From: Martin Schwidefsky @ 2002-12-12 18:11 UTC (permalink / raw)
To: linux-kernel, torvalds
Makefile changes by Sam Ravnborg. Summary of changes:
o Added FORCE prerequisite in boot/Makefile
o Do not use shorthand targets when calling the boot/Makefile
o No longer use BOOT_IMAGE, not needed now
o Use kbuild clean infrastructure when cleaning up in boot
o Offset generation shrinked with one rule
o removed inclusion of Rules.make in all Makefiles
o no longer use the descend macro, use $(Q)$(MAKE) as replacement
diffstat:
arch/s390/Makefile | 31 ++++++++++++++++---------------
arch/s390/boot/Makefile | 25 ++++++++++---------------
arch/s390/defconfig | 2 ++
arch/s390/kernel/Makefile | 2 --
arch/s390/lib/Makefile | 3 ---
arch/s390/math-emu/Makefile | 8 ++------
arch/s390/mm/Makefile | 2 --
arch/s390x/Makefile | 27 ++++++++++++++-------------
arch/s390x/boot/Makefile | 25 ++++++++++---------------
arch/s390x/defconfig | 2 ++
arch/s390x/kernel/Makefile | 2 --
arch/s390x/lib/Makefile | 3 ---
arch/s390x/mm/Makefile | 4 +---
drivers/s390/Makefile | 2 +-
drivers/s390/misc/Makefile | 7 -------
15 files changed, 58 insertions(+), 87 deletions(-)
diff -urN linux-2.5.51/arch/s390/Makefile linux-2.5.51-s390/arch/s390/Makefile
--- linux-2.5.51/arch/s390/Makefile Tue Dec 10 03:45:46 2002
+++ linux-2.5.51-s390/arch/s390/Makefile Thu Dec 12 18:59:01 2002
@@ -20,36 +20,37 @@
CFLAGS += -pipe -fno-strength-reduce
-HEAD := arch/s390/kernel/head.o arch/s390/kernel/init_task.o
+HEAD := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o
-core-y += arch/s390/mm/ arch/s390/kernel/
-drivers-y += drivers/s390/
-drivers-$(CONFIG_MATHEMU) += arch/s390/math-emu/
-libs-y += arch/s390/lib/
+core-y += arch/$(ARCH)/mm/ arch/$(ARCH)/kernel/
+libs-y += arch/$(ARCH)/lib/
+drivers-y += drivers/s390/
+drivers-$(CONFIG_MATHEMU) += arch/$(ARCH)/math-emu/
+
+
+makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/$(ARCH)/boot $(1)
all: image listing
-makeboot = $(call descend,arch/$(ARCH)/boot,$(1))
-BOOTIMAGE= arch/$(ARCH)/boot/image
+listing image: vmlinux
+ $(call makeboot,arch/$(ARCH)/boot/$@)
-listing install image: vmlinux
- +@$(call makeboot,BOOTIMAGE=$(BOOTIMAGE) $@)
+install: vmlinux
+ $(call makeboot, $@)
+archmrproper:
archclean:
- +@$(call makeboot,clean)
+ $(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/$(ARCH)/boot
-archmrproper:
prepare: include/asm-$(ARCH)/offsets.h
arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/config/MARKER
-include/asm-$(ARCH)/offsets.h.tmp: arch/$(ARCH)/kernel/asm-offsets.s
- @$(generate-asm-offsets.h) < $< > $@
-
-include/asm-$(ARCH)/offsets.h: include/asm-$(ARCH)/offsets.h.tmp
+include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
@echo -n ' Generating $@'
+ @$(generate-asm-offsets.h) < $< > $@.tmp
@$(update-if-changed)
CLEAN_FILES += include/asm-$(ARCH)/offsets.h.tmp \
diff -urN linux-2.5.51/arch/s390/boot/Makefile linux-2.5.51-s390/arch/s390/boot/Makefile
--- linux-2.5.51/arch/s390/boot/Makefile Tue Dec 10 03:46:27 2002
+++ linux-2.5.51-s390/arch/s390/boot/Makefile Thu Dec 12 18:59:01 2002
@@ -2,26 +2,21 @@
# Makefile for the linux s390-specific parts of the memory manager.
#
-EXTRA_AFLAGS := -traditional
+EXTRA_TARGETS := image listing
+EXTRA_AFLAGS := -traditional
-include $(TOPDIR)/Rules.make
-quiet_cmd_listing = OBJDUMP $(echo_target)
-cmd_listing = $(OBJDUMP) --disassemble --disassemble-all \
- --disassemble-zeroes --reloc vmlinux > $@
+quiet_cmd_listing = OBJDUMP $@
+ cmd_listing = $(OBJDUMP) --disassemble --disassemble-all \
+ --disassemble-zeroes --reloc vmlinux > $@
-$(obj)/image: vmlinux
+$(obj)/image: vmlinux FORCE
$(call if_changed,objcopy)
-$(obj)/listing: vmlinux
+$(obj)/listing: vmlinux FORCE
$(call if_changed,listing)
-image: $(obj)/image
-listing: $(obj)/listing
-
-clean:
- rm -f $(obj)/image $(obj)/listing
-
-install: $(CONFIGURE) $(BOOTIMAGE)
- sh -x $(obj)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map Kerntypes "$(INSTALL_PATH)"
+install: $(CONFIGURE) $(obj)/image
+ sh -x $(obj)/install.sh $(KERNELRELEASE) $(obj)/image \
+ System.map Kerntypes "$(INSTALL_PATH)"
diff -urN linux-2.5.51/arch/s390/defconfig linux-2.5.51-s390/arch/s390/defconfig
--- linux-2.5.51/arch/s390/defconfig Tue Dec 10 03:46:16 2002
+++ linux-2.5.51-s390/arch/s390/defconfig Thu Dec 12 18:59:01 2002
@@ -321,6 +321,8 @@
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_TEST is not set
#
diff -urN linux-2.5.51/arch/s390/kernel/Makefile linux-2.5.51-s390/arch/s390/kernel/Makefile
--- linux-2.5.51/arch/s390/kernel/Makefile Tue Dec 10 03:46:24 2002
+++ linux-2.5.51-s390/arch/s390/kernel/Makefile Thu Dec 12 18:59:01 2002
@@ -17,5 +17,3 @@
# Kernel debugging
#
obj-$(CONFIG_REMOTE_DEBUG) += gdb-stub.o #gdb-low.o
-
-include $(TOPDIR)/Rules.make
diff -urN linux-2.5.51/arch/s390/lib/Makefile linux-2.5.51-s390/arch/s390/lib/Makefile
--- linux-2.5.51/arch/s390/lib/Makefile Tue Dec 10 03:45:43 2002
+++ linux-2.5.51-s390/arch/s390/lib/Makefile Thu Dec 12 18:59:01 2002
@@ -7,6 +7,3 @@
EXTRA_AFLAGS := -traditional
obj-y = delay.o memset.o strcmp.o strncpy.o uaccess.o
-
-include $(TOPDIR)/Rules.make
-
diff -urN linux-2.5.51/arch/s390/math-emu/Makefile linux-2.5.51-s390/arch/s390/math-emu/Makefile
--- linux-2.5.51/arch/s390/math-emu/Makefile Tue Dec 10 03:45:52 2002
+++ linux-2.5.51-s390/arch/s390/math-emu/Makefile Thu Dec 12 18:59:01 2002
@@ -4,9 +4,5 @@
obj-$(CONFIG_MATHEMU) := math.o qrnnd.o
-EXTRA_CFLAGS = -I. -I$(TOPDIR)/include/math-emu -w
-EXTRA_AFLAGS := -traditional
-
-include $(TOPDIR)/Rules.make
-
-
+EXTRA_CFLAGS := -I$(src) -Iinclude/math-emu -w
+EXTRA_AFLAGS := -traditional
diff -urN linux-2.5.51/arch/s390/mm/Makefile linux-2.5.51-s390/arch/s390/mm/Makefile
--- linux-2.5.51/arch/s390/mm/Makefile Tue Dec 10 03:46:24 2002
+++ linux-2.5.51-s390/arch/s390/mm/Makefile Thu Dec 12 18:59:01 2002
@@ -3,5 +3,3 @@
#
obj-y := init.o fault.o ioremap.o extable.o
-
-include $(TOPDIR)/Rules.make
diff -urN linux-2.5.51/arch/s390x/Makefile linux-2.5.51-s390/arch/s390x/Makefile
--- linux-2.5.51/arch/s390x/Makefile Tue Dec 10 03:46:00 2002
+++ linux-2.5.51-s390/arch/s390x/Makefile Thu Dec 12 18:59:01 2002
@@ -21,35 +21,36 @@
CFLAGS += -pipe -fno-strength-reduce
-HEAD := arch/s390x/kernel/head.o arch/s390x/kernel/init_task.o
+HEAD := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o
-core-y += arch/s390x/mm/ arch/s390x/kernel/
+core-y += arch/$(ARCH)/mm/ arch/$(ARCH)/kernel/
+libs-y += arch/$(ARCH)/lib/
drivers-y += drivers/s390/
-libs-y += arch/s390x/lib/
+
+
+makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/$(ARCH)/boot $(1)
all: image listing
-makeboot = $(call descend,arch/$(ARCH)/boot,$(1))
-BOOTIMAGE= arch/$(ARCH)/boot/image
+listing image: vmlinux
+ $(call makeboot,arch/$(ARCH)/boot/$@)
-listing install image: vmlinux
- +@$(call makeboot,BOOTIMAGE=$(BOOTIMAGE) $@)
+install: vmlinux
+ $(call makeboot, $@)
+archmrproper:
archclean:
- +@$(call makeboot,clean)
+ $(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/$(ARCH)/boot
-archmrproper:
prepare: include/asm-$(ARCH)/offsets.h
arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/config/MARKER
-include/asm-$(ARCH)/offsets.h.tmp: arch/$(ARCH)/kernel/asm-offsets.s
- @$(generate-asm-offsets.h) < $< > $@
-
-include/asm-$(ARCH)/offsets.h: include/asm-$(ARCH)/offsets.h.tmp
+include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
@echo -n ' Generating $@'
+ @$(generate-asm-offsets.h) < $< > $@.tmp
@$(update-if-changed)
CLEAN_FILES += include/asm-$(ARCH)/offsets.h.tmp \
diff -urN linux-2.5.51/arch/s390x/boot/Makefile linux-2.5.51-s390/arch/s390x/boot/Makefile
--- linux-2.5.51/arch/s390x/boot/Makefile Tue Dec 10 03:45:59 2002
+++ linux-2.5.51-s390/arch/s390x/boot/Makefile Thu Dec 12 18:59:01 2002
@@ -2,26 +2,21 @@
# Makefile for the linux s390-specific parts of the memory manager.
#
-EXTRA_AFLAGS := -traditional
+EXTRA_TARGETS := image listing
+EXTRA_AFLAGS := -traditional
-include $(TOPDIR)/Rules.make
-quiet_cmd_listing = OBJDUMP $(echo_target)
-cmd_listing = $(OBJDUMP) --disassemble --disassemble-all \
- --disassemble-zeroes --reloc vmlinux > $@
+quiet_cmd_listing = OBJDUMP $@
+ cmd_listing = $(OBJDUMP) --disassemble --disassemble-all \
+ --disassemble-zeroes --reloc vmlinux > $@
-$(obj)/image: vmlinux
+$(obj)/image: vmlinux FORCE
$(call if_changed,objcopy)
-$(obj)/listing: vmlinux
+$(obj)/listing: vmlinux FORCE
$(call if_changed,listing)
-image: $(obj)/image
-listing: $(obj)/listing
-
-clean:
- rm -f $(obj)/image $(obj)/listing
-
-install: $(CONFIGURE) $(BOOTIMAGE)
- sh -x $(obj)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map Kerntypes "$(INSTALL_PATH)"
+install: $(CONFIGURE) $(obj)/image
+ sh -x $(obj)/install.sh $(KERNELRELEASE) $(obj)/image \
+ System.map Kerntypes "$(INSTALL_PATH)"
diff -urN linux-2.5.51/arch/s390x/defconfig linux-2.5.51-s390/arch/s390x/defconfig
--- linux-2.5.51/arch/s390x/defconfig Tue Dec 10 03:45:39 2002
+++ linux-2.5.51-s390/arch/s390x/defconfig Thu Dec 12 18:59:01 2002
@@ -382,6 +382,8 @@
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_TEST is not set
#
diff -urN linux-2.5.51/arch/s390x/kernel/Makefile linux-2.5.51-s390/arch/s390x/kernel/Makefile
--- linux-2.5.51/arch/s390x/kernel/Makefile Tue Dec 10 03:45:54 2002
+++ linux-2.5.51-s390/arch/s390x/kernel/Makefile Thu Dec 12 18:59:01 2002
@@ -24,8 +24,6 @@
exec32.o exec_domain32.o
obj-$(CONFIG_BINFMT_ELF32) += binfmt_elf32.o
-include $(TOPDIR)/Rules.make
-
#
# This is just to get the dependencies...
#
diff -urN linux-2.5.51/arch/s390x/lib/Makefile linux-2.5.51-s390/arch/s390x/lib/Makefile
--- linux-2.5.51/arch/s390x/lib/Makefile Tue Dec 10 03:45:44 2002
+++ linux-2.5.51-s390/arch/s390x/lib/Makefile Thu Dec 12 18:59:01 2002
@@ -7,6 +7,3 @@
EXTRA_AFLAGS := -traditional
obj-y = delay.o memset.o strcmp.o strncpy.o uaccess.o
-
-include $(TOPDIR)/Rules.make
-
diff -urN linux-2.5.51/arch/s390x/mm/Makefile linux-2.5.51-s390/arch/s390x/mm/Makefile
--- linux-2.5.51/arch/s390x/mm/Makefile Tue Dec 10 03:46:10 2002
+++ linux-2.5.51-s390/arch/s390x/mm/Makefile Thu Dec 12 18:59:01 2002
@@ -1,7 +1,5 @@
#
-# Makefile for the linux i386-specific parts of the memory manager.
+# Makefile for the linux s390-specific parts of the memory manager.
#
obj-y := init.o fault.o ioremap.o extable.o
-
-include $(TOPDIR)/Rules.make
diff -urN linux-2.5.51/drivers/s390/Makefile linux-2.5.51-s390/drivers/s390/Makefile
--- linux-2.5.51/drivers/s390/Makefile Tue Dec 10 03:45:58 2002
+++ linux-2.5.51-s390/drivers/s390/Makefile Thu Dec 12 18:59:12 2002
@@ -3,7 +3,7 @@
#
obj-y += s390mach.o sysinfo.o
-obj-y += cio/ block/ char/ misc/ net/
+obj-y += cio/ block/ char/ net/
drivers-y += drivers/s390/built-in.o
diff -urN linux-2.5.51/drivers/s390/misc/Makefile linux-2.5.51-s390/drivers/s390/misc/Makefile
--- linux-2.5.51/drivers/s390/misc/Makefile Tue Dec 10 03:46:24 2002
+++ linux-2.5.51-s390/drivers/s390/misc/Makefile Thu Jan 1 01:00:00 1970
@@ -1,7 +0,0 @@
-#
-# S/390 miscellaneous devices
-#
-
-# placeholder for stuff to come...
-
-include $(TOPDIR)/Rules.make
^ permalink raw reply
* Re: Success! TWO questions remain
From: Michael Willems @ 2002-12-12 18:09 UTC (permalink / raw)
To: Ken Koster; +Cc: linux-hams
In-Reply-To: <200212120940.15591.n7ipb@koster.seatcp.net>
Well, I am in Canada as well - but we are broadly the same as US.
Encryption forbidden, compression allowed.
Mike VA3MVW
On Thu, 12 Dec 2002, Ken Koster wrote:
> On Thursday 12 December 2002 07:25, Margaret Leber wrote:
> > Hamish Moffatt wrote:
>
> And I wrote and sent with a typical US centric view without thinking that
> Hamish is not in the US. Take what I said with the appropriate slant.
> :-)
> Ken, N7IPB
> -
> To unsubscribe from this list: send the line "unsubscribe linux-hams" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* [PATCH] s390 (7/8): warnings.
From: Martin Schwidefsky @ 2002-12-12 18:09 UTC (permalink / raw)
To: linux-kernel, torvalds
Warning fixes: remove an unused variable and make bitops complain if the
pointer isn't of type long. Make 31 bit BUG() emit 4 0-bytes instead of 2.
This improves the readability of the listing.
diffstat:
arch/s390x/mm/extable.c | 1
include/asm-s390/bitops.h | 70 ++++++++++++++++++++++++----------------
include/asm-s390/page.h | 2 -
include/asm-s390/posix_types.h | 6 +--
include/asm-s390/rwsem.h | 2 -
include/asm-s390/setup.h | 12 +++---
include/asm-s390x/bitops.h | 64 +++++++++++++++++++-----------------
include/asm-s390x/posix_types.h | 6 +--
include/asm-s390x/rwsem.h | 2 -
9 files changed, 92 insertions(+), 73 deletions(-)
diff -urN linux-2.5.51/arch/s390x/mm/extable.c linux-2.5.51-s390/arch/s390x/mm/extable.c
--- linux-2.5.51/arch/s390x/mm/extable.c Tue Dec 10 03:45:53 2002
+++ linux-2.5.51-s390/arch/s390x/mm/extable.c Thu Dec 12 18:03:36 2002
@@ -40,7 +40,6 @@
unsigned long
search_exception_table(unsigned long addr)
{
- struct list_head *i;
unsigned long ret = 0;
#ifndef CONFIG_MODULES
diff -urN linux-2.5.51/include/asm-s390/bitops.h linux-2.5.51-s390/include/asm-s390/bitops.h
--- linux-2.5.51/include/asm-s390/bitops.h Tue Dec 10 03:45:42 2002
+++ linux-2.5.51-s390/include/asm-s390/bitops.h Thu Dec 12 18:03:36 2002
@@ -53,7 +53,7 @@
/*
* SMP save set_bit routine based on compare and swap (CS)
*/
-static inline void set_bit_cs(int nr, volatile void *ptr)
+static inline void set_bit_cs(int nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -78,7 +78,7 @@
/*
* SMP save clear_bit routine based on compare and swap (CS)
*/
-static inline void clear_bit_cs(int nr, volatile void *ptr)
+static inline void clear_bit_cs(int nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -103,7 +103,7 @@
/*
* SMP save change_bit routine based on compare and swap (CS)
*/
-static inline void change_bit_cs(int nr, volatile void *ptr)
+static inline void change_bit_cs(int nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -128,7 +128,8 @@
/*
* SMP save test_and_set_bit routine based on compare and swap (CS)
*/
-static inline int test_and_set_bit_cs(int nr, volatile void *ptr)
+static inline int
+test_and_set_bit_cs(int nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -154,7 +155,8 @@
/*
* SMP save test_and_clear_bit routine based on compare and swap (CS)
*/
-static inline int test_and_clear_bit_cs(int nr, volatile void *ptr)
+static inline int
+test_and_clear_bit_cs(int nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -180,7 +182,8 @@
/*
* SMP save test_and_change_bit routine based on compare and swap (CS)
*/
-static inline int test_and_change_bit_cs(int nr, volatile void *ptr)
+static inline int
+test_and_change_bit_cs(int nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -207,7 +210,7 @@
/*
* fast, non-SMP set_bit routine
*/
-static inline void __set_bit(int nr, volatile void *ptr)
+static inline void __set_bit(int nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -219,7 +222,7 @@
}
static inline void
-__constant_set_bit(const int nr, volatile void *ptr)
+__constant_set_bit(const int nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -269,7 +272,7 @@
* fast, non-SMP clear_bit routine
*/
static inline void
-__clear_bit(int nr, volatile void *ptr)
+__clear_bit(int nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -281,7 +284,7 @@
}
static inline void
-__constant_clear_bit(const int nr, volatile void *ptr)
+__constant_clear_bit(const int nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -330,7 +333,7 @@
/*
* fast, non-SMP change_bit routine
*/
-static inline void __change_bit(int nr, volatile void *ptr)
+static inline void __change_bit(int nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -342,7 +345,7 @@
}
static inline void
-__constant_change_bit(const int nr, volatile void *ptr)
+__constant_change_bit(const int nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -391,7 +394,8 @@
/*
* fast, non-SMP test_and_set_bit routine
*/
-static inline int test_and_set_bit_simple(int nr, volatile void *ptr)
+static inline int
+test_and_set_bit_simple(int nr, volatile unsigned long *ptr)
{
unsigned long addr;
unsigned char ch;
@@ -409,7 +413,8 @@
/*
* fast, non-SMP test_and_clear_bit routine
*/
-static inline int test_and_clear_bit_simple(int nr, volatile void *ptr)
+static inline int
+test_and_clear_bit_simple(int nr, volatile unsigned long *ptr)
{
unsigned long addr;
unsigned char ch;
@@ -427,7 +432,8 @@
/*
* fast, non-SMP test_and_change_bit routine
*/
-static inline int test_and_change_bit_simple(int nr, volatile void *ptr)
+static inline int
+test_and_change_bit_simple(int nr, volatile unsigned long *ptr)
{
unsigned long addr;
unsigned char ch;
@@ -463,7 +469,7 @@
* This routine doesn't need to be atomic.
*/
-static inline int __test_bit(int nr, volatile void *ptr)
+static inline int __test_bit(int nr, volatile unsigned long *ptr)
{
unsigned long addr;
unsigned char ch;
@@ -473,7 +479,8 @@
return (ch >> (nr & 7)) & 1;
}
-static inline int __constant_test_bit(int nr, volatile void * addr) {
+static inline int
+__constant_test_bit(int nr, volatile unsigned long * addr) {
return (((volatile char *) addr)[(nr>>3)^3] & (1<<(nr&7))) != 0;
}
@@ -485,7 +492,8 @@
/*
* Find-bit routines..
*/
-static inline int find_first_zero_bit(void * addr, unsigned size)
+static inline int
+find_first_zero_bit(unsigned long * addr, unsigned size)
{
unsigned long cmp, count;
int res;
@@ -523,7 +531,8 @@
return (res < size) ? res : size;
}
-static inline int find_first_bit(void * addr, unsigned size)
+static inline int
+find_first_bit(unsigned long * addr, unsigned size)
{
unsigned long cmp, count;
int res;
@@ -561,7 +570,8 @@
return (res < size) ? res : size;
}
-static inline int find_next_zero_bit (void * addr, int size, int offset)
+static inline int
+find_next_zero_bit (unsigned long * addr, int size, int offset)
{
unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
unsigned long bitvec, reg;
@@ -599,7 +609,8 @@
return (offset + res);
}
-static inline int find_next_bit (void * addr, int size, int offset)
+static inline int
+find_next_bit (unsigned long * addr, int size, int offset)
{
unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
unsigned long bitvec, reg;
@@ -668,7 +679,7 @@
* __ffs = find first bit in word. Undefined if no bit exists,
* so code should check against 0UL first..
*/
-static inline unsigned long __ffs(unsigned long word)
+static inline unsigned long __ffs (unsigned long word)
{
unsigned long reg, result;
@@ -707,7 +718,7 @@
* differs in spirit from the above ffz (man ffs).
*/
-extern int inline ffs (int x)
+extern inline int ffs (int x)
{
int r = 1;
@@ -792,10 +803,15 @@
* 23 22 21 20 19 18 17 16 31 30 29 28 27 26 25 24
*/
-#define ext2_set_bit(nr, addr) test_and_set_bit((nr)^24, addr)
-#define ext2_clear_bit(nr, addr) test_and_clear_bit((nr)^24, addr)
-#define ext2_test_bit(nr, addr) test_bit((nr)^24, addr)
-static inline int ext2_find_first_zero_bit(void *vaddr, unsigned size)
+#define ext2_set_bit(nr, addr) \
+ test_and_set_bit((nr)^24, (unsigned long *)addr)
+#define ext2_clear_bit(nr, addr) \
+ test_and_clear_bit((nr)^24, (unsigned long *)addr)
+#define ext2_test_bit(nr, addr) \
+ test_bit((nr)^24, (unsigned long *)addr)
+
+static inline int
+ext2_find_first_zero_bit(void *vaddr, unsigned size)
{
unsigned long cmp, count;
int res;
diff -urN linux-2.5.51/include/asm-s390/page.h linux-2.5.51-s390/include/asm-s390/page.h
--- linux-2.5.51/include/asm-s390/page.h Tue Dec 10 03:45:44 2002
+++ linux-2.5.51-s390/include/asm-s390/page.h Thu Dec 12 18:03:36 2002
@@ -64,7 +64,7 @@
#define BUG() do { \
printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
- __asm__ __volatile__(".word 0x0000"); \
+ __asm__ __volatile__(".long 0"); \
} while (0)
#define PAGE_BUG(page) do { \
diff -urN linux-2.5.51/include/asm-s390/posix_types.h linux-2.5.51-s390/include/asm-s390/posix_types.h
--- linux-2.5.51/include/asm-s390/posix_types.h Tue Dec 10 03:45:39 2002
+++ linux-2.5.51-s390/include/asm-s390/posix_types.h Thu Dec 12 18:03:36 2002
@@ -60,13 +60,13 @@
#endif
#undef __FD_SET
-#define __FD_SET(fd,fdsetp) set_bit(fd,fdsetp)
+#define __FD_SET(fd,fdsetp) set_bit(fd,fdsetp->fds_bits)
#undef __FD_CLR
-#define __FD_CLR(fd,fdsetp) clear_bit(fd,fdsetp)
+#define __FD_CLR(fd,fdsetp) clear_bit(fd,fdsetp->fds_bits)
#undef __FD_ISSET
-#define __FD_ISSET(fd,fdsetp) test_bit(fd,fdsetp)
+#define __FD_ISSET(fd,fdsetp) test_bit(fd,fdsetp->fds_bits)
#undef __FD_ZERO
#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
diff -urN linux-2.5.51/include/asm-s390/rwsem.h linux-2.5.51-s390/include/asm-s390/rwsem.h
--- linux-2.5.51/include/asm-s390/rwsem.h Tue Dec 10 03:45:57 2002
+++ linux-2.5.51-s390/include/asm-s390/rwsem.h Thu Dec 12 18:03:36 2002
@@ -228,7 +228,7 @@
: "=&d" (old), "=&d" (new)
: "a" (&sem->count), "m" (tmp)
: "cc", "memory" );
- if (new > 1) // FIXME: is this correct ?!?
+ if (new > 1)
rwsem_downgrade_wake(sem);
}
diff -urN linux-2.5.51/include/asm-s390/setup.h linux-2.5.51-s390/include/asm-s390/setup.h
--- linux-2.5.51/include/asm-s390/setup.h Tue Dec 10 03:46:20 2002
+++ linux-2.5.51-s390/include/asm-s390/setup.h Thu Dec 12 18:03:36 2002
@@ -25,13 +25,13 @@
*/
extern unsigned long machine_flags;
-#define MACHINE_IS_VM (machine_flags & 1)
-#define MACHINE_HAS_IEEE (machine_flags & 2)
-#define MACHINE_IS_P390 (machine_flags & 4)
-#define MACHINE_HAS_CSP (machine_flags & 8)
-#define MACHINE_HAS_MVPG (machine_flags & 16)
+#define MACHINE_IS_VM (machine_flags & 1)
+#define MACHINE_HAS_IEEE (machine_flags & 2)
+#define MACHINE_IS_P390 (machine_flags & 4)
+#define MACHINE_HAS_CSP (machine_flags & 8)
+#define MACHINE_HAS_MVPG (machine_flags & 16)
-#define MACHINE_HAS_SCLP (!MACHINE_IS_P390)
+#define MACHINE_HAS_SCLP (!MACHINE_IS_P390)
/*
* Console mode. Override with conmode=
diff -urN linux-2.5.51/include/asm-s390x/bitops.h linux-2.5.51-s390/include/asm-s390x/bitops.h
--- linux-2.5.51/include/asm-s390x/bitops.h Tue Dec 10 03:46:24 2002
+++ linux-2.5.51-s390/include/asm-s390x/bitops.h Thu Dec 12 18:03:36 2002
@@ -1,3 +1,6 @@
+#ifndef _S390_BITOPS_H
+#define _S390_BITOPS_H
+
/*
* include/asm-s390/bitops.h
*
@@ -9,9 +12,7 @@
* Copyright (C) 1992, Linus Torvalds
*
*/
-
-#ifndef _S390_BITOPS_H
-#define _S390_BITOPS_H
+#include <linux/config.h>
/*
* bit 0 is the LSB of *addr; bit 63 is the MSB of *addr;
@@ -32,7 +33,6 @@
* of the form "flags |= (1 << bitnr)" are used INTERMIXED
* with operation of the form "set_bit(bitnr, flags)".
*/
-#include <linux/config.h>
/* set ALIGN_CS to 1 if the SMP safe bit operations should
* align the address to 4 byte boundary. It seems to work
@@ -57,7 +57,7 @@
/*
* SMP save set_bit routine based on compare and swap (CS)
*/
-static inline void set_bit_cs(unsigned long nr, volatile void *ptr)
+static inline void set_bit_cs(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -82,7 +82,7 @@
/*
* SMP save clear_bit routine based on compare and swap (CS)
*/
-static inline void clear_bit_cs(unsigned long nr, volatile void *ptr)
+static inline void clear_bit_cs(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -107,7 +107,7 @@
/*
* SMP save change_bit routine based on compare and swap (CS)
*/
-static inline void change_bit_cs(unsigned long nr, volatile void *ptr)
+static inline void change_bit_cs(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -132,8 +132,8 @@
/*
* SMP save test_and_set_bit routine based on compare and swap (CS)
*/
-static inline int
-test_and_set_bit_cs(unsigned long nr, volatile void *ptr)
+static inline int
+test_and_set_bit_cs(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -160,7 +160,7 @@
* SMP save test_and_clear_bit routine based on compare and swap (CS)
*/
static inline int
-test_and_clear_bit_cs(unsigned long nr, volatile void *ptr)
+test_and_clear_bit_cs(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -187,7 +187,7 @@
* SMP save test_and_change_bit routine based on compare and swap (CS)
*/
static inline int
-test_and_change_bit_cs(unsigned long nr, volatile void *ptr)
+test_and_change_bit_cs(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -214,7 +214,7 @@
/*
* fast, non-SMP set_bit routine
*/
-static inline void __set_bit(unsigned long nr, volatile void *ptr)
+static inline void __set_bit(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -226,7 +226,7 @@
}
static inline void
-__constant_set_bit(const unsigned long nr, volatile void *ptr)
+__constant_set_bit(const unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -276,7 +276,7 @@
* fast, non-SMP clear_bit routine
*/
static inline void
-__clear_bit(unsigned long nr, volatile void *ptr)
+__clear_bit(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -288,7 +288,7 @@
}
static inline void
-__constant_clear_bit(const unsigned long nr, volatile void *ptr)
+__constant_clear_bit(const unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -337,7 +337,7 @@
/*
* fast, non-SMP change_bit routine
*/
-static inline void __change_bit(unsigned long nr, volatile void *ptr)
+static inline void __change_bit(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -349,7 +349,7 @@
}
static inline void
-__constant_change_bit(const unsigned long nr, volatile void *ptr)
+__constant_change_bit(const unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -399,7 +399,7 @@
* fast, non-SMP test_and_set_bit routine
*/
static inline int
-test_and_set_bit_simple(unsigned long nr, volatile void *ptr)
+test_and_set_bit_simple(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
unsigned char ch;
@@ -418,7 +418,7 @@
* fast, non-SMP test_and_clear_bit routine
*/
static inline int
-test_and_clear_bit_simple(unsigned long nr, volatile void *ptr)
+test_and_clear_bit_simple(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
unsigned char ch;
@@ -437,7 +437,7 @@
* fast, non-SMP test_and_change_bit routine
*/
static inline int
-test_and_change_bit_simple(unsigned long nr, volatile void *ptr)
+test_and_change_bit_simple(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
unsigned char ch;
@@ -473,7 +473,7 @@
* This routine doesn't need to be atomic.
*/
-static inline int __test_bit(unsigned long nr, volatile void *ptr)
+static inline int __test_bit(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
unsigned char ch;
@@ -484,7 +484,7 @@
}
static inline int
-__constant_test_bit(unsigned long nr, volatile void *addr) {
+__constant_test_bit(unsigned long nr, volatile unsigned long *addr) {
return (((volatile char *) addr)[(nr>>3)^7] & (1<<(nr&7))) != 0;
}
@@ -497,7 +497,7 @@
* Find-bit routines..
*/
static inline unsigned long
-find_first_zero_bit(void * addr, unsigned long size)
+find_first_zero_bit(unsigned long * addr, unsigned long size)
{
unsigned long res, cmp, count;
@@ -539,7 +539,7 @@
}
static inline unsigned long
-find_first_bit(void * addr, unsigned long size)
+find_first_bit(unsigned long * addr, unsigned long size)
{
unsigned long res, cmp, count;
@@ -581,7 +581,7 @@
}
static inline unsigned long
-find_next_zero_bit (void * addr, unsigned long size, unsigned long offset)
+find_next_zero_bit (unsigned long * addr, unsigned long size, unsigned long offset)
{
unsigned long * p = ((unsigned long *) addr) + (offset >> 6);
unsigned long bitvec, reg;
@@ -625,7 +625,7 @@
}
static inline unsigned long
-find_next_bit (void * addr, unsigned long size, unsigned long offset)
+find_next_bit (unsigned long * addr, unsigned long size, unsigned long offset)
{
unsigned long * p = ((unsigned long *) addr) + (offset >> 6);
unsigned long bitvec, reg;
@@ -744,7 +744,7 @@
* the libc and compiler builtin ffs routines, therefore
* differs in spirit from the above ffz (man ffs).
*/
-extern int inline ffs (int x)
+extern inline int ffs (int x)
{
int r = 1;
@@ -836,9 +836,13 @@
* 23 22 21 20 19 18 17 16 31 30 29 28 27 26 25 24
*/
-#define ext2_set_bit(nr, addr) test_and_set_bit((nr)^56, addr)
-#define ext2_clear_bit(nr, addr) test_and_clear_bit((nr)^56, addr)
-#define ext2_test_bit(nr, addr) test_bit((nr)^56, addr)
+#define ext2_set_bit(nr, addr) \
+ test_and_set_bit((nr)^56, (unsigned long *)addr)
+#define ext2_clear_bit(nr, addr) \
+ test_and_clear_bit((nr)^56, (unsigned long *)addr)
+#define ext2_test_bit(nr, addr) \
+ test_bit((nr)^56, (unsigned long *)addr)
+
static inline unsigned long
ext2_find_first_zero_bit(void *vaddr, unsigned long size)
{
diff -urN linux-2.5.51/include/asm-s390x/posix_types.h linux-2.5.51-s390/include/asm-s390x/posix_types.h
--- linux-2.5.51/include/asm-s390x/posix_types.h Tue Dec 10 03:46:25 2002
+++ linux-2.5.51-s390/include/asm-s390x/posix_types.h Thu Dec 12 18:03:36 2002
@@ -58,13 +58,13 @@
#endif
#undef __FD_SET
-#define __FD_SET(fd,fdsetp) set_bit(fd,fdsetp)
+#define __FD_SET(fd,fdsetp) set_bit(fd,fdsetp->fds_bits)
#undef __FD_CLR
-#define __FD_CLR(fd,fdsetp) clear_bit(fd,fdsetp)
+#define __FD_CLR(fd,fdsetp) clear_bit(fd,fdsetp->fds_bits)
#undef __FD_ISSET
-#define __FD_ISSET(fd,fdsetp) test_bit(fd,fdsetp)
+#define __FD_ISSET(fd,fdsetp) test_bit(fd,fdsetp->fds_bits)
#undef __FD_ZERO
#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
diff -urN linux-2.5.51/include/asm-s390x/rwsem.h linux-2.5.51-s390/include/asm-s390x/rwsem.h
--- linux-2.5.51/include/asm-s390x/rwsem.h Tue Dec 10 03:45:52 2002
+++ linux-2.5.51-s390/include/asm-s390x/rwsem.h Thu Dec 12 18:03:36 2002
@@ -228,7 +228,7 @@
: "=&d" (old), "=&d" (new)
: "a" (&sem->count), "m" (tmp)
: "cc", "memory" );
- if (new > 1) // FIXME: is this correct ?!?
+ if (new > 1)
rwsem_downgrade_wake(sem);
}
^ permalink raw reply
* [PATCH] s390 (8/8): export sys_wait4.
From: Martin Schwidefsky @ 2002-12-12 18:10 UTC (permalink / raw)
To: linux-kernel, torvalds
Add sys_wait4 to the list of exported functions.
diffstat:
s390/kernel/s390_ksyms.c | 1 +
s390x/kernel/s390_ksyms.c | 1 +
2 files changed, 2 insertions(+)
diff -urN linux-2.5.51/arch/s390/kernel/s390_ksyms.c linux-2.5.51-s390/arch/s390/kernel/s390_ksyms.c
--- linux-2.5.51/arch/s390/kernel/s390_ksyms.c Tue Dec 10 03:46:11 2002
+++ linux-2.5.51-s390/arch/s390/kernel/s390_ksyms.c Thu Dec 12 18:03:43 2002
@@ -59,3 +59,4 @@
EXPORT_SYMBOL(console_mode);
EXPORT_SYMBOL(console_device);
EXPORT_SYMBOL_NOVERS(do_call_softirq);
+EXPORT_SYMBOL(sys_wait4);
diff -urN linux-2.5.51/arch/s390x/kernel/s390_ksyms.c linux-2.5.51-s390/arch/s390x/kernel/s390_ksyms.c
--- linux-2.5.51/arch/s390x/kernel/s390_ksyms.c Tue Dec 10 03:46:16 2002
+++ linux-2.5.51-s390/arch/s390x/kernel/s390_ksyms.c Thu Dec 12 18:03:43 2002
@@ -83,3 +83,4 @@
EXPORT_SYMBOL(console_mode);
EXPORT_SYMBOL(console_device);
EXPORT_SYMBOL_NOVERS(do_call_softirq);
+EXPORT_SYMBOL(sys_wait4);
^ permalink raw reply
* [PATCH] s390 (3/8): io fixes.
From: Martin Schwidefsky @ 2002-12-12 18:07 UTC (permalink / raw)
To: linux-kernel, torvalds
Start of chsc interface cleanup. Fix for a race condition in do_IRQ.
Fix device reference counting.
diffstat:
drivers/s390/cio/Makefile | 2
drivers/s390/cio/blacklist.c | 10 -
drivers/s390/cio/chsc.c | 245 +++++++++++++-----------------------------
drivers/s390/cio/chsc.h | 80 +++++++++++++
drivers/s390/cio/cio.c | 35 ++----
drivers/s390/cio/cio.h | 2
drivers/s390/cio/css.c | 10 +
drivers/s390/cio/device.c | 23 +++
drivers/s390/cio/device_fsm.c | 20 ++-
drivers/s390/cio/ioasm.h | 2
drivers/s390/cio/qdio.c | 34 +++--
drivers/s390/net/cu3088.c | 6 -
include/asm-s390/cio.h | 2
include/asm-s390x/ccwgroup.h | 8 -
include/asm-s390x/cio.h | 2
15 files changed, 248 insertions(+), 233 deletions(-)
diff -urN linux-2.5.51/drivers/s390/cio/Makefile linux-2.5.51-s390/drivers/s390/cio/Makefile
--- linux-2.5.51/drivers/s390/cio/Makefile Tue Dec 10 03:45:39 2002
+++ linux-2.5.51-s390/drivers/s390/cio/Makefile Thu Dec 12 18:03:11 2002
@@ -3,7 +3,7 @@
#
obj-y += airq.o blacklist.o chsc.o cio.o css.o requestirq.o
-export-objs += airq.o css.o chsc.o cio.o requestirq.o
+export-objs += airq.o css.o cio.o requestirq.o
ccw_device-objs += device.o device_fsm.o device_ops.o
ccw_device-objs += device_id.o device_pgid.o device_status.o
diff -urN linux-2.5.51/drivers/s390/cio/blacklist.c linux-2.5.51-s390/drivers/s390/cio/blacklist.c
--- linux-2.5.51/drivers/s390/cio/blacklist.c Tue Dec 10 03:45:53 2002
+++ linux-2.5.51-s390/drivers/s390/cio/blacklist.c Thu Dec 12 18:03:11 2002
@@ -1,7 +1,7 @@
/*
* drivers/s390/cio/blacklist.c
* S/390 common I/O routines -- blacklisting of specific devices
- * $Revision: 1.22 $
+ * $Revision: 1.23 $
*
* Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
@@ -162,10 +162,10 @@
else
blacklist_parse_parameters (buf + 5, free);
} else if (strncmp (buf, "add ", 4) == 0) {
- /* FIXME: the old code was checking if the new bl'ed
- * devices are already known to the system so
- * validate_subchannel would still give a working
- * status. is that necessary? */
+ /*
+ * We don't need to check for known devices since
+ * css_probe_device will handle this correctly.
+ */
blacklist_parse_parameters (buf + 4, add);
} else {
printk (KERN_WARNING "cio_ignore: Parse error; \n"
diff -urN linux-2.5.51/drivers/s390/cio/chsc.c linux-2.5.51-s390/drivers/s390/cio/chsc.c
--- linux-2.5.51/drivers/s390/cio/chsc.c Tue Dec 10 03:46:10 2002
+++ linux-2.5.51-s390/drivers/s390/cio/chsc.c Thu Dec 12 18:03:11 2002
@@ -1,7 +1,7 @@
/*
* drivers/s390/cio/chsc.c
* S/390 common I/O routines -- channel subsystem call
- * $Revision: 1.43 $
+ * $Revision: 1.46 $
*
* Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
@@ -37,26 +37,6 @@
static int new_channel_path(int chpid, int status);
-int
-chsc(void *data)
-{
- void *area;
- int cc;
-
- if (!data)
- return -EINVAL;
-
- area = (void *)get_zeroed_page(GFP_KERNEL);
- if (!area)
- return -ENOMEM;
- memcpy(area, data, PAGE_SIZE);
- cc = do_chsc(area);
- if (cc == 0)
- memcpy(data, area, PAGE_SIZE);
- free_page((unsigned long)area);
- return cc;
-}
-
static int
set_chp_status(int chp, int status)
{
@@ -114,21 +94,18 @@
* be page-aligned. Implement proper locking or dynamic
* allocation or prove that this function does not have to be
* reentrant! */
- static struct chsc_area __attribute__ ((aligned(PAGE_SIZE))) chsc_area_ssd;
+ static struct ssd_area chsc_area_ssd
+ __attribute__ ((aligned(PAGE_SIZE)));
- typeof (chsc_area_ssd.response_block.response_block_data.ssd_res)
- *ssd_res = &chsc_area_ssd.response_block.response_block_data.ssd_res;
+ typeof (chsc_area_ssd.response_block)
+ *ssd_res = &chsc_area_ssd.response_block;
- chsc_area_ssd = (struct chsc_area) {
+ chsc_area_ssd = (struct ssd_area) {
.request_block = {
.command_code1 = 0x0010,
.command_code2 = 0x0004,
- .request_block_data = {
- .ssd_req = {
- .f_sch = irq,
- .l_sch = irq,
- }
- }
+ .f_sch = irq,
+ .l_sch = irq,
}
};
@@ -306,14 +283,59 @@
#endif
}
-/* this used to be in s390_process_res_acc_*, FIXME: find a better name
- * for this function */
static int
-s390_check_valid_chpid(u8 chpid)
+s390_process_res_acc_sch(u8 chpid, __u16 fla, u32 fla_mask,
+ struct subchannel *sch)
+{
+ int found;
+ int chp;
+ int ccode;
+
+ /* Update our ssd_info */
+ if (chsc_get_sch_desc_irq(sch->irq))
+ return 0;
+
+ found = 0;
+ for (chp = 0; chp <= 7; chp++)
+ /*
+ * check if chpid is in information updated by ssd
+ */
+ if (sch->ssd_info.valid &&
+ sch->ssd_info.chpid[chp] == chpid &&
+ (sch->ssd_info.fla[chp] & fla_mask) == fla) {
+ found = 1;
+ break;
+ }
+
+ if (found == 0)
+ return 0;
+
+ /*
+ * Do a stsch to update our subchannel structure with the
+ * new path information and eventually check for logically
+ * offline chpids.
+ */
+ ccode = stsch(sch->irq, &sch->schib);
+ if (ccode > 0)
+ return 0;
+
+ return 0x80 >> chp;
+}
+
+static void
+s390_process_res_acc (u8 chpid, __u16 fla, u32 fla_mask)
{
+ struct subchannel *sch;
+ int irq;
+ int ret;
char dbf_txt[15];
+
sprintf(dbf_txt, "accpr%x", chpid);
CIO_TRACE_EVENT( 2, dbf_txt);
+ if (fla != 0) {
+ sprintf(dbf_txt, "fla%x", fla);
+ CIO_TRACE_EVENT( 2, dbf_txt);
+ }
/*
* I/O resources may have become accessible.
@@ -333,31 +355,14 @@
CIO_CRW_EVENT(0, "Error: Could not retrieve "
"subchannel descriptions, will not process css"
"machine check...\n");
- return 0;
+ return;
}
if (!test_bit(chpid, chpids_logical))
- return 0; /* no need to do the rest */
-
- return 1;
-}
-
-static void
-s390_process_res_acc_chpid (u8 chpid)
-{
- struct subchannel *sch;
- int irq;
- int ccode;
- int chp;
- int ret;
-
- if (!s390_check_valid_chpid(chpid))
- return;
-
- pr_debug( KERN_DEBUG "Looking at chpid %x...\n", chpid);
+ return; /* no need to do the rest */
for (irq = 0; irq <= __MAX_SUBCHANNELS; irq++) {
- int found;
+ int chp_mask;
sch = ioinfo[irq];
if (!sch) {
@@ -375,122 +380,33 @@
return;
continue;
}
-
+
spin_lock_irq(&sch->lock);
- /* Update our ssd_info */
- if (chsc_get_sch_desc_irq(sch->irq))
- break;
-
- found = 0;
- for (chp = 0; chp <= 7; chp++)
- /*
- * check if chpid is in information updated by ssd
- */
- if (sch->ssd_info.valid &&
- (sch->ssd_info.chpid[chp] == chpid)) {
- found = 1;
- break;
- }
+ chp_mask = s390_process_res_acc_sch(chpid, fla, fla_mask, sch);
+ if (chp_mask == 0) {
- if (found == 0) {
spin_unlock_irq(&sch->lock);
- continue;
- }
- /*
- * Do a stsch to update our subchannel structure with the
- * new path information and eventually check for logically
- * offline chpids.
- */
- ccode = stsch(sch->irq, &sch->schib);
- if (ccode > 0) {
-// FIXME: ccw_device_recognition(cdev);
- spin_unlock_irq(&sch->lock);
- continue;
+
+ if (fla_mask != 0)
+ break;
+ else
+ continue;
}
- sch->lpm = sch->schib.pmcw.pim &
- sch->schib.pmcw.pam &
- sch->schib.pmcw.pom;
+ sch->lpm = (sch->schib.pmcw.pim &
+ sch->schib.pmcw.pam &
+ sch->schib.pmcw.pom)
+ | chp_mask;
chsc_validate_chpids(sch);
- sch->lpm |= (0x80 >> chp);
dev_fsm_event(sch->dev.driver_data, DEV_EVENT_VERIFY);
spin_unlock_irq(&sch->lock);
- }
-}
-
-static void
-s390_process_res_acc_linkaddr ( __u8 chpid, __u16 fla, u32 fla_mask)
-{
- char dbf_txt[15];
- struct subchannel *sch;
- int irq;
- int ccode;
- int ret;
- int j;
-
- if (!s390_check_valid_chpid(chpid))
- return;
- sprintf(dbf_txt, "fla%x", fla);
- CIO_TRACE_EVENT( 2, dbf_txt);
-
- pr_debug(KERN_DEBUG "Looking at chpid %x, link addr %x...\n", chpid, fla);
- for (irq = 0; irq <= __MAX_SUBCHANNELS; irq++) {
- int found;
-
- sch = ioinfo[irq];
- if (!sch) {
- /* The full program again (see above), grr... */
- ret = css_probe_device(irq);
- if (ret == -ENXIO)
- /* We're through */
- return;
- return;
- }
-
- /*
- * Walk through all subchannels and
- * look if our chpid and our (masked) link
- * address are in somewhere
- * Do a stsch for the found subchannels and
- * perform path grouping
- */
-
- /* Update our ssd_info */
- if (chsc_get_sch_desc_irq(sch->irq))
- break;
-
- found = 0;
- for (j = 0; j < 8; j++)
- if (sch->ssd_info.valid &&
- sch->ssd_info.chpid[j] == chpid &&
- (sch->ssd_info.fla[j] & fla_mask) == fla) {
- found = 1;
- break;
- }
-
- if (found == 0)
- continue;
-
- ccode = stsch(sch->irq, &sch->schib);
- if (ccode > 0)
+ if (fla_mask != 0)
break;
-
- sch->lpm = sch->schib.pmcw.pim &
- sch->schib.pmcw.pam &
- sch->schib.pmcw.pom;
-
- chsc_validate_chpids(sch);
-
- sch->lpm |= (0x80 >> j);
- dev_fsm_event(sch->dev.driver_data, DEV_EVENT_VERIFY);
-
- /* We've found it, get out of here. */
- break;
}
}
@@ -508,7 +424,7 @@
* be page-aligned. Implement proper locking or dynamic
* allocation or prove that this function does not have to be
* reentrant! */
- static struct chsc_area chsc_area_sei
+ static struct sei_area chsc_area_sei
__attribute__ ((aligned(PAGE_SIZE))) = {
.request_block = {
.command_code1 = 0x0010,
@@ -516,8 +432,8 @@
}
};
- typeof (chsc_area_sei.response_block.response_block_data.sei_res)
- *sei_res = &chsc_area_sei.response_block.response_block_data.sei_res;
+ typeof (chsc_area_sei.response_block)
+ *sei_res = &chsc_area_sei.response_block;
CIO_TRACE_EVENT( 2, "prcss");
@@ -582,17 +498,17 @@
if ((sei_res->vf & 0x80) == 0) {
pr_debug( KERN_DEBUG "chpid: %x\n", sei_res->rsid);
- s390_process_res_acc_chpid (sei_res->rsid);
+ s390_process_res_acc(sei_res->rsid, 0, 0);
} else if ((sei_res->vf & 0xc0) == 0x80) {
pr_debug( KERN_DEBUG "chpid: %x link addr: %x\n",
sei_res->rsid, sei_res->fla);
- s390_process_res_acc_linkaddr (sei_res->rsid,
- sei_res->fla, 0xff00);
+ s390_process_res_acc(sei_res->rsid, sei_res->fla,
+ 0xff00);
} else if ((sei_res->vf & 0xc0) == 0xc0) {
pr_debug( KERN_DEBUG "chpid: %x full link addr: %x\n",
sei_res->rsid, sei_res->fla);
- s390_process_res_acc_linkaddr (sei_res->rsid,
- sei_res->fla, 0xffff);
+ s390_process_res_acc(sei_res->rsid, sei_res->fla,
+ 0xffff);
}
pr_debug( KERN_DEBUG "\n");
@@ -810,4 +726,3 @@
}
module_init(register_channel_paths);
-EXPORT_SYMBOL(chsc);
diff -urN linux-2.5.51/drivers/s390/cio/chsc.h linux-2.5.51-s390/drivers/s390/cio/chsc.h
--- linux-2.5.51/drivers/s390/cio/chsc.h Tue Dec 10 03:46:15 2002
+++ linux-2.5.51-s390/drivers/s390/cio/chsc.h Thu Dec 12 18:03:11 2002
@@ -12,6 +12,86 @@
#define CHSC_SEI_ACC_LINKADDR 2
#define CHSC_SEI_ACC_FULLLINKADDR 3
+struct sei_area {
+ struct {
+ /* word 0 */
+ __u16 command_code1;
+ __u16 command_code2;
+ /* word 1 */
+ __u32 reserved1;
+ /* word 2 */
+ __u32 reserved2;
+ /* word 3 */
+ __u32 reserved3;
+ } __attribute__ ((packed,aligned(8))) request_block;
+ struct {
+ /* word 0 */
+ __u16 length;
+ __u16 response_code;
+ /* word 1 */
+ __u32 reserved1;
+ /* word 2 */
+ __u8 flags;
+ __u8 vf; /* validity flags */
+ __u8 rs; /* reporting source */
+ __u8 cc; /* content code */
+ /* word 3 */
+ __u16 fla; /* full link address */
+ __u16 rsid; /* reporting source id */
+ /* word 4 */
+ __u32 reserved2;
+ /* word 5 */
+ __u32 reserved3;
+ /* word 6 */
+ __u32 ccdf; /* content-code dependent field */
+ /* word 7 */
+ __u32 reserved4;
+ /* word 8 */
+ __u32 reserved5;
+ /* word 9 */
+ __u32 reserved6;
+ } __attribute__ ((packed,aligned(8))) response_block;
+} __attribute__ ((packed,aligned(PAGE_SIZE)));
+
+struct ssd_area {
+ struct {
+ /* word 0 */
+ __u16 command_code1;
+ __u16 command_code2;
+ /* word 1 */
+ __u16 reserved1;
+ __u16 f_sch; /* first subchannel */
+ /* word 2 */
+ __u16 reserved2;
+ __u16 l_sch; /* last subchannel */
+ /* word 3 */
+ __u32 reserved3;
+ } __attribute__ ((packed,aligned(8))) request_block;
+ struct {
+ /* word 0 */
+ __u16 length;
+ __u16 response_code;
+ /* word 1 */
+ __u32 reserved1;
+ /* word 2 */
+ __u8 sch_valid : 1;
+ __u8 dev_valid : 1;
+ __u8 st : 3; /* subchannel type */
+ __u8 zeroes : 3;
+ __u8 unit_addr; /* unit address */
+ __u16 devno; /* device number */
+ /* word 3 */
+ __u8 path_mask;
+ __u8 fla_valid_mask;
+ __u16 sch; /* subchannel */
+ /* words 4-5 */
+ __u8 chpid[8]; /* chpids 0-7 */
+ /* words 6-9 */
+ __u16 fla[8]; /* full link addresses 0-7 */
+ } __attribute__ ((packed,aligned(8))) response_block;
+} __attribute__ ((packed,aligned(PAGE_SIZE)));
+
+
struct channel_path {
int id;
int state;
diff -urN linux-2.5.51/drivers/s390/cio/cio.c linux-2.5.51-s390/drivers/s390/cio/cio.c
--- linux-2.5.51/drivers/s390/cio/cio.c Tue Dec 10 03:46:25 2002
+++ linux-2.5.51-s390/drivers/s390/cio/cio.c Thu Dec 12 18:03:11 2002
@@ -1,7 +1,7 @@
/*
* drivers/s390/cio/cio.c
* S/390 common I/O routines -- low level i/o calls
- * $Revision: 1.89 $
+ * $Revision: 1.90 $
*
* Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
@@ -609,6 +609,7 @@
struct subchannel *sch;
struct irb *irb;
+ irq_enter ();
/*
* Get interrupt information from lowcore
*/
@@ -620,28 +621,23 @@
*/
if (tpi_info->adapter_IO == 1 &&
tpi_info->int_type == IO_INTERRUPT_TYPE) {
- irq_enter ();
do_adapter_IO (tpi_info->intparm);
- irq_exit ();
continue;
}
- /* Store interrupt response block to lowcore. */
- if (tsch (tpi_info->irq, irb) != 0)
- /* Not status pending or not operational. */
- continue;
-
sch = ioinfo[tpi_info->irq];
- if (!sch)
- continue;
-
- irq_enter ();
- spin_lock(&sch->lock);
- memcpy (&sch->schib.scsw, &irb->scsw, sizeof (irb->scsw));
- if (sch->driver && sch->driver->irq)
- sch->driver->irq(&sch->dev);
- spin_unlock(&sch->lock);
- irq_exit ();
-
+ if (sch)
+ spin_lock(&sch->lock);
+ /* Store interrupt response block to lowcore. */
+ if (tsch (tpi_info->irq, irb) == 0 && sch) {
+ /* Keep subchannel information word up to date. */
+ memcpy (&sch->schib.scsw, &irb->scsw,
+ sizeof (irb->scsw));
+ /* Call interrupt handler if there is one. */
+ if (sch->driver && sch->driver->irq)
+ sch->driver->irq(&sch->dev);
+ }
+ if (sch)
+ spin_unlock(&sch->lock);
/*
* Are more interrupts pending?
* If so, the tpi instruction will update the lowcore
@@ -650,6 +646,7 @@
* out of the sie which costs more cycles than it saves.
*/
} while (!MACHINE_IS_VM && tpi (NULL) != 0);
+ irq_exit ();
}
#ifdef CONFIG_CCW_CONSOLE
diff -urN linux-2.5.51/drivers/s390/cio/cio.h linux-2.5.51-s390/drivers/s390/cio/cio.h
--- linux-2.5.51/drivers/s390/cio/cio.h Tue Dec 10 03:45:42 2002
+++ linux-2.5.51-s390/drivers/s390/cio/cio.h Thu Dec 12 18:03:11 2002
@@ -113,7 +113,6 @@
#define to_subchannel(n) container_of(n, struct subchannel, dev)
extern int cio_validate_subchannel (struct subchannel *, unsigned int);
-extern int cio_modify (struct subchannel *);
extern int cio_enable_subchannel (struct subchannel *, unsigned int);
extern int cio_disable_subchannel (struct subchannel *);
extern int cio_cancel (struct subchannel *);
@@ -127,7 +126,6 @@
extern int cio_get_options (struct subchannel *);
/* Use with care. */
-extern int cio_tpi (void);
extern struct subchannel *cio_probe_console(void);
extern void cio_release_console(void);
diff -urN linux-2.5.51/drivers/s390/cio/css.c linux-2.5.51-s390/drivers/s390/cio/css.c
--- linux-2.5.51/drivers/s390/cio/css.c Tue Dec 10 03:45:44 2002
+++ linux-2.5.51-s390/drivers/s390/cio/css.c Thu Dec 12 18:03:11 2002
@@ -1,7 +1,7 @@
/*
* drivers/s390/cio/css.c
* driver for channel subsystem
- * $Revision: 1.39 $
+ * $Revision: 1.40 $
*
* Copyright (C) 2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
@@ -20,6 +20,7 @@
#include "cio.h"
#include "cio_debug.h"
#include "device.h" // FIXME: dito
+#include "ioasm.h"
struct subchannel *ioinfo[__MAX_SUBCHANNELS];
unsigned int highest_subchannel;
@@ -154,6 +155,7 @@
{
static DECLARE_WORK(work, do_process_crw, 0);
struct subchannel *sch;
+ int ccode, devno;
CIO_CRW_EVENT(2, "source is subchannel %04X\n", irq);
@@ -164,9 +166,13 @@
}
if (!sch->dev.driver_data)
return;
+ devno = sch->schib.pmcw.dev;
/* FIXME: css_process_crw must not know about ccw_device */
dev_fsm_event(sch->dev.driver_data, DEV_EVENT_NOTOPER);
- // FIXME: revalidate machine checks?
+ ccode = stsch(irq, &sch->schib);
+ if (!ccode)
+ if (devno != sch->schib.pmcw.dev)
+ schedule_work(&work);
}
/*
diff -urN linux-2.5.51/drivers/s390/cio/device.c linux-2.5.51-s390/drivers/s390/cio/device.c
--- linux-2.5.51/drivers/s390/cio/device.c Tue Dec 10 03:46:14 2002
+++ linux-2.5.51-s390/drivers/s390/cio/device.c Thu Dec 12 18:03:11 2002
@@ -1,7 +1,7 @@
/*
* drivers/s390/cio/device.c
* bus driver for ccw devices
- * $Revision: 1.44 $
+ * $Revision: 1.45 $
*
* Copyright (C) 2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
@@ -362,18 +362,28 @@
sch->dev.driver_data = 0;
kfree (cdev->private);
kfree (cdev);
- return;
+ goto out;
}
ret = subchannel_add_files(cdev->dev.parent);
if (ret)
printk(KERN_WARNING "%s: could not add attributes to %04x\n",
__func__, sch->irq);
+out:
+ put_device(&sch->dev);
}
static void
io_subchannel_recog(struct ccw_device *cdev, struct subchannel *sch)
{
+ int rc;
+
+ if (!get_device(&sch->dev)) {
+ if (cdev->dev.release)
+ cdev->dev.release(&cdev->dev);
+ return;
+ }
+
sch->dev.driver_data = cdev;
sch->driver = &io_subchannel_driver;
cdev->ccwlock = &sch->lock;
@@ -392,12 +402,17 @@
/* Do first half of device_register. */
device_initialize(&cdev->dev);
- get_device(&sch->dev); /* keep parent refcount in sync. */
/* Start async. device sensing. */
spin_lock_irq(cdev->ccwlock);
- ccw_device_recognition(cdev);
+ rc = ccw_device_recognition(cdev);
spin_unlock_irq(cdev->ccwlock);
+ if (rc) {
+ sch->dev.driver_data = 0;
+ put_device(&sch->dev);
+ if (cdev->dev.release)
+ cdev->dev.release(&cdev->dev);
+ }
}
static int
diff -urN linux-2.5.51/drivers/s390/cio/device_fsm.c linux-2.5.51-s390/drivers/s390/cio/device_fsm.c
--- linux-2.5.51/drivers/s390/cio/device_fsm.c Tue Dec 10 03:46:00 2002
+++ linux-2.5.51-s390/drivers/s390/cio/device_fsm.c Thu Dec 12 18:03:11 2002
@@ -112,7 +112,10 @@
CIO_DEBUG(KERN_WARNING, 2,
"SenseID : unknown device %04X on subchannel %04X\n",
sch->schib.pmcw.dev, sch->irq);
- device_unregister(&cdev->dev);
+ sch->dev.driver_data = 0;
+ put_device(&sch->dev);
+ if (cdev->dev.release)
+ cdev->dev.release(&cdev->dev);
break;
case DEV_STATE_OFFLINE:
/* fill out sense information */
@@ -235,10 +238,8 @@
sch = to_subchannel(cdev->dev.parent);
- if (state != DEV_STATE_ONLINE) {
+ if (state != DEV_STATE_ONLINE)
cio_disable_subchannel(sch);
- device_unregister(&cdev->dev);
- }
/* Reset device status. */
memset(&cdev->private->irb, 0, sizeof(struct irb));
@@ -246,6 +247,9 @@
cdev->private->state = state;
wake_up(&cdev->private->wait_q);
+
+ if (state != DEV_STATE_ONLINE)
+ put_device (&cdev->dev);
}
void
@@ -275,6 +279,8 @@
if (cdev->private->state != DEV_STATE_OFFLINE)
return -EINVAL;
sch = to_subchannel(cdev->dev.parent);
+ if (!get_device(&cdev->dev))
+ return -ENODEV;
if (cio_enable_subchannel(sch, sch->schib.pmcw.isc) != 0) {
/* Couldn't enable the subchannel for i/o. Sick device. */
dev_fsm_event(cdev, DEV_EVENT_NOTOPER);
@@ -683,19 +689,19 @@
[DEV_EVENT_NOTOPER] ccw_device_online_notoper,
[DEV_EVENT_INTERRUPT] ccw_device_qdio_init_irq,
[DEV_EVENT_TIMEOUT] ccw_device_qdio_init_timeout,
- [DEV_EVENT_VERIFY] ccw_device_nop, //FIXME
+ [DEV_EVENT_VERIFY] ccw_device_nop,
},
[DEV_STATE_QDIO_ACTIVE] {
[DEV_EVENT_NOTOPER] ccw_device_online_notoper,
[DEV_EVENT_INTERRUPT] ccw_device_irq,
[DEV_EVENT_TIMEOUT] ccw_device_nop,
- [DEV_EVENT_VERIFY] ccw_device_nop, //FIXME
+ [DEV_EVENT_VERIFY] ccw_device_nop,
},
[DEV_STATE_QDIO_CLEANUP] {
[DEV_EVENT_NOTOPER] ccw_device_online_notoper,
[DEV_EVENT_INTERRUPT] ccw_device_qdio_cleanup_irq,
[DEV_EVENT_TIMEOUT] ccw_device_qdio_cleanup_timeout,
- [DEV_EVENT_VERIFY] ccw_device_nop, //FIXME
+ [DEV_EVENT_VERIFY] ccw_device_nop,
},
/* states to wait for i/o completion before doing something */
[DEV_STATE_ONLINE_VERIFY] {
diff -urN linux-2.5.51/drivers/s390/cio/ioasm.h linux-2.5.51-s390/drivers/s390/cio/ioasm.h
--- linux-2.5.51/drivers/s390/cio/ioasm.h Tue Dec 10 03:46:28 2002
+++ linux-2.5.51-s390/drivers/s390/cio/ioasm.h Thu Dec 12 18:03:11 2002
@@ -260,7 +260,7 @@
return ccode;
}
-extern __inline__ int do_chsc(void *chsc_area)
+extern __inline__ int chsc(void *chsc_area)
{
int cc;
diff -urN linux-2.5.51/drivers/s390/cio/qdio.c linux-2.5.51-s390/drivers/s390/cio/qdio.c
--- linux-2.5.51/drivers/s390/cio/qdio.c Tue Dec 10 03:46:11 2002
+++ linux-2.5.51-s390/drivers/s390/cio/qdio.c Thu Dec 12 18:03:11 2002
@@ -53,8 +53,9 @@
#include "device.h"
#include "airq.h"
#include "qdio.h"
+#include "ioasm.h"
-#define VERSION_QDIO_C "$Revision: 1.16 $"
+#define VERSION_QDIO_C "$Revision: 1.18 $"
/****************** MODULE PARAMETER VARIABLES ********************/
MODULE_AUTHOR("Utz Bacher <utz.bacher@de.ibm.com>");
@@ -1573,33 +1574,33 @@
{
struct qdio_irq *irq_ptr;
struct qdio_q *q;
- int irq;
int cstat,dstat;
- char dbf_text[15]="qintXXXX";
+ char dbf_text[15];
- irq = cdev->private->irq; /* FIXME: use different dbg */
cstat = irb->scsw.cstat;
dstat = irb->scsw.dstat;
- *((int*)(&dbf_text[4]))=irq;
- QDIO_DBF_HEX4(0,trace,dbf_text,QDIO_DBF_TRACE_LEN);
+ QDIO_DBF_TEXT4(0, trace, "qint");
+ sprintf(dbf_text, "%s", cdev->dev.bus_id);
+ QDIO_DBF_TEXT4(0, trace, dbf_text);
if (!intparm || !cdev) {
QDIO_PRINT_STUPID("got unsolicited interrupt in qdio " \
- "handler, irq 0x%x\n",irq);
+ "handler, device %s\n", cdev->dev.bus_id);
return;
}
irq_ptr = cdev->private->qdio_data;
if (!irq_ptr) {
- sprintf(dbf_text,"uint%4x",irq);
+ QDIO_DBF_TEXT2(1, trace, "uint");
+ sprintf(dbf_text,"%s", cdev->dev.bus_id);
QDIO_DBF_TEXT2(1,trace,dbf_text);
- QDIO_PRINT_ERR("received interrupt on unused irq 0x%04x!\n",
- irq);
+ QDIO_PRINT_ERR("received interrupt on unused device %s!\n",
+ cdev->dev.bus_id);
return;
}
- qdio_irq_check_sense(irq, irb);
+ qdio_irq_check_sense(irq_ptr->irq, irb);
if (cstat & SCHN_STAT_PCI) {
qdio_handle_pci(irq_ptr);
@@ -1607,21 +1608,22 @@
}
if ((cstat&~SCHN_STAT_PCI)||dstat) {
- sprintf(dbf_text,"ick2%4x",irq);
+ QDIO_DBF_TEXT2(1, trace, "ick2");
+ sprintf(dbf_text,"%s", cdev->dev.bus_id);
QDIO_DBF_TEXT2(1,trace,dbf_text);
QDIO_DBF_HEX2(0,trace,&intparm,sizeof(int));
QDIO_DBF_HEX2(0,trace,&dstat,sizeof(int));
QDIO_DBF_HEX2(0,trace,&cstat,sizeof(int));
QDIO_PRINT_ERR("received check condition on activate " \
- "queues on irq 0x%x (cs=x%x, ds=x%x).\n",
- irq,cstat,dstat);
+ "queues on device %s (cs=x%x, ds=x%x).\n",
+ cdev->dev.bus_id, cstat, dstat);
if (irq_ptr->no_input_qs) {
q=irq_ptr->input_qs[0];
} else if (irq_ptr->no_output_qs) {
q=irq_ptr->output_qs[0];
} else {
- QDIO_PRINT_ERR("oops... no queue registered on irq " \
- "0x%x!?\n",irq);
+ QDIO_PRINT_ERR("oops... no queue registered for " \
+ "device %s!?\n", cdev->dev.bus_id);
goto omit_handler_call;
}
q->handler(q->irq,QDIO_STATUS_ACTIVATE_CHECK_CONDITION|
diff -urN linux-2.5.51/drivers/s390/net/cu3088.c linux-2.5.51-s390/drivers/s390/net/cu3088.c
--- linux-2.5.51/drivers/s390/net/cu3088.c Tue Dec 10 03:45:53 2002
+++ linux-2.5.51-s390/drivers/s390/net/cu3088.c Thu Dec 12 18:03:11 2002
@@ -1,5 +1,5 @@
/*
- * $Id: cu3088.c,v 1.21 2002/12/03 16:26:45 cohuck Exp $
+ * $Id: cu3088.c,v 1.22 2002/12/10 09:53:55 cohuck Exp $
*
* CTC / LCS ccw_device driver
*
@@ -172,5 +172,5 @@
module_init(cu3088_init);
module_exit(cu3088_exit);
-EXPORT_SYMBOL(register_cu3088_discipline);
-EXPORT_SYMBOL(unregister_cu3088_discipline);
+EXPORT_SYMBOL_GPL(register_cu3088_discipline);
+EXPORT_SYMBOL_GPL(unregister_cu3088_discipline);
diff -urN linux-2.5.51/include/asm-s390/cio.h linux-2.5.51-s390/include/asm-s390/cio.h
--- linux-2.5.51/include/asm-s390/cio.h Tue Dec 10 03:46:19 2002
+++ linux-2.5.51-s390/include/asm-s390/cio.h Thu Dec 12 18:03:11 2002
@@ -262,8 +262,6 @@
extern int diag210(struct diag210 *addr);
-extern int chsc(void *data);
-
extern void wait_cons_dev(void);
#endif
diff -urN linux-2.5.51/include/asm-s390x/ccwgroup.h linux-2.5.51-s390/include/asm-s390x/ccwgroup.h
--- linux-2.5.51/include/asm-s390x/ccwgroup.h Tue Dec 10 03:45:42 2002
+++ linux-2.5.51-s390/include/asm-s390x/ccwgroup.h Thu Dec 12 18:03:11 2002
@@ -31,10 +31,10 @@
extern int ccwgroup_driver_register (struct ccwgroup_driver *cdriver);
extern void ccwgroup_driver_unregister (struct ccwgroup_driver *cdriver);
-extern int ccwgroup_create_dev (struct device *root,
- unsigned int creator_id,
- struct ccw_driver *gdrv,
- int argc, char *argv[]);
+extern int ccwgroup_create (struct device *root,
+ unsigned int creator_id,
+ struct ccw_driver *gdrv,
+ int argc, char *argv[]);
extern int ccwgroup_probe_ccwdev(struct ccw_device *cdev);
extern int ccwgroup_remove_ccwdev(struct ccw_device *cdev);
diff -urN linux-2.5.51/include/asm-s390x/cio.h linux-2.5.51-s390/include/asm-s390x/cio.h
--- linux-2.5.51/include/asm-s390x/cio.h Tue Dec 10 03:45:59 2002
+++ linux-2.5.51-s390/include/asm-s390x/cio.h Thu Dec 12 18:03:11 2002
@@ -262,8 +262,6 @@
extern int diag210(struct diag210 *addr);
-extern int chsc(void *data);
-
extern void wait_cons_dev(void);
#endif
^ permalink raw reply
* [PATCH] s390 (2/8): nanosleep restarting.
From: Martin Schwidefsky @ 2002-12-12 18:06 UTC (permalink / raw)
To: linux-kernel, torvalds
sys_restart_syscall for nanosleep restarting.
diffstat:
arch/s390/kernel/entry.S | 32 ++++++++++++++++++++++++--------
arch/s390/kernel/signal.c | 9 +++++++++
arch/s390x/kernel/entry.S | 27 +++++++++++++++++++++------
arch/s390x/kernel/signal.c | 9 +++++++++
include/asm-s390/current.h | 2 +-
include/asm-s390/thread_info.h | 14 ++++++++++----
include/asm-s390/unistd.h | 1 +
include/asm-s390x/current.h | 2 +-
include/asm-s390x/thread_info.h | 14 ++++++++++----
include/asm-s390x/unistd.h | 1 +
10 files changed, 87 insertions(+), 24 deletions(-)
diff -urN linux-2.5.51/arch/s390/kernel/entry.S linux-2.5.51-s390/arch/s390/kernel/entry.S
--- linux-2.5.51/arch/s390/kernel/entry.S Tue Dec 10 03:45:45 2002
+++ linux-2.5.51-s390/arch/s390/kernel/entry.S Thu Dec 12 18:27:00 2002
@@ -47,7 +47,8 @@
SP_TRAP = (SP_ORIG_R2+GPR_SIZE)
SP_SIZE = (SP_TRAP+4)
-_TIF_WORK_MASK = (_TIF_SIGPENDING | _TIF_NEED_RESCHED)
+_TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_RESTART_SVC)
+_TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NEED_RESCHED)
/*
* Base Address of this Module --- saved in __LC_ENTRY_BASE
@@ -181,6 +182,7 @@
GET_THREAD_INFO # load pointer to task_struct to R9
sll %r7,2
stosm 24(%r15),0x03 # reenable interrupts
+sysc_do_restart:
l %r8,sys_call_table-entry_base(%r7,%r13) # get system call addr.
tm __TI_flags+3(%r9),_TIF_SYSCALL_TRACE
bo BASED(sysc_tracesys)
@@ -191,7 +193,7 @@
sysc_return:
stnsm 24(%r15),0xfc # disable I/O and ext. interrupts
- tm __TI_flags+3(%r9),_TIF_WORK_MASK
+ tm __TI_flags+3(%r9),_TIF_WORK_SVC
bnz BASED(sysc_work) # there is work to do (signals etc.)
sysc_leave:
RESTORE_ALL 1
@@ -202,7 +204,7 @@
sysc_work_loop:
stnsm 24(%r15),0xfc # disable I/O and ext. interrupts
GET_THREAD_INFO # load pointer to task_struct to R9
- tm __TI_flags+3(%r9),_TIF_WORK_MASK
+ tm __TI_flags+3(%r9),_TIF_WORK_SVC
bz BASED(sysc_leave) # there is no work to do
#
# One of the work bits is on. Find out which one.
@@ -213,6 +215,8 @@
bo BASED(sysc_reschedule)
tm __TI_flags+3(%r9),_TIF_SIGPENDING
bo BASED(sysc_sigpending)
+ tm __TI_flags+3(%r9),_TIF_RESTART_SVC
+ bo BASED(sysc_restart)
b BASED(sysc_leave)
#
@@ -237,14 +241,26 @@
b BASED(sysc_leave) # out of here, do NOT recheck
#
+# _TIF_RESTART_SVC is set, set up registers and restart svc
+#
+sysc_restart:
+ ni __TI_flags+3(%r9),255-_TIF_RESTART_SVC # clear TIF_RESTART_SVC
+ stosm 24(%r15),0x03 # reenable interrupts
+ l %r7,SP_R2(%r15) # load new svc number
+ sll %r7,2
+ mvc SP_R2(4,%r15),SP_ORIG_R2(%r15) # restore first argument
+ lm %r2,%r6,SP_R2(%r15) # load svc arguments
+ b BASED(sysc_do_restart) # restart svc
+
+#
# call trace before and after sys_call
#
sysc_tracesys:
l %r1,BASED(.Ltrace)
srl %r7,2
- st %r7,SP_R2(4,%r15)
+ st %r7,SP_R2(%r15)
basr %r14,%r1
- l %r7,SP_R2(4,%r15) # strace might have changed the
+ l %r7,SP_R2(%r15) # strace might have changed the
n %r7,BASED(.Lc256) # system call
sll %r7,2
l %r8,sys_call_table-entry_base(%r7,%r13)
@@ -354,7 +370,7 @@
.long sys_write
.long sys_open /* 5 */
.long sys_close
- .long sys_ni_syscall /* old waitpid syscall holder */
+ .long sys_restart_syscall
.long sys_creat
.long sys_link
.long sys_unlink /* 10 */
@@ -752,7 +768,7 @@
#else
bno BASED(io_leave) # no-> skip resched & signal
#endif
- tm __TI_flags+3(%r9),_TIF_WORK_MASK
+ tm __TI_flags+3(%r9),_TIF_WORK_INT
bnz BASED(io_work) # there is work to do (signals etc.)
io_leave:
RESTORE_ALL 0
@@ -788,7 +804,7 @@
io_work_loop:
stnsm 24(%r15),0xfc # disable I/O and ext. interrupts
GET_THREAD_INFO # load pointer to task_struct to R9
- tm __TI_flags+3(%r9),_TIF_WORK_MASK
+ tm __TI_flags+3(%r9),_TIF_WORK_INT
bz BASED(io_leave) # there is no work to do
#
# One of the work bits is on. Find out which one.
diff -urN linux-2.5.51/arch/s390/kernel/signal.c linux-2.5.51-s390/arch/s390/kernel/signal.c
--- linux-2.5.51/arch/s390/kernel/signal.c Tue Dec 10 03:46:15 2002
+++ linux-2.5.51-s390/arch/s390/kernel/signal.c Thu Dec 12 18:27:00 2002
@@ -397,6 +397,10 @@
if (regs->trap == __LC_SVC_OLD_PSW) {
/* If so, check system call restarting.. */
switch (regs->gprs[2]) {
+ case -ERESTART_RESTARTBLOCK:
+ current_thread_info()->restart_block.fn =
+ do_no_restart_syscall;
+ clear_thread_flag(TIF_RESTART_SVC);
case -ERESTARTNOHAND:
regs->gprs[2] = -EINTR;
break;
@@ -473,6 +477,11 @@
regs->gprs[2] = regs->orig_gpr2;
regs->psw.addr -= 2;
}
+ /* Restart the system call with a new system call number */
+ if (regs->gprs[2] == -ERESTART_RESTARTBLOCK) {
+ regs->gprs[2] = __NR_restart_syscall;
+ set_thread_flag(TIF_RESTART_SVC);
+ }
}
return 0;
}
diff -urN linux-2.5.51/arch/s390x/kernel/entry.S linux-2.5.51-s390/arch/s390x/kernel/entry.S
--- linux-2.5.51/arch/s390x/kernel/entry.S Tue Dec 10 03:45:51 2002
+++ linux-2.5.51-s390/arch/s390x/kernel/entry.S Thu Dec 12 18:27:00 2002
@@ -47,7 +47,8 @@
SP_TRAP = (SP_ORIG_R2+GPR_SIZE)
SP_SIZE = (SP_TRAP+4)
-_TIF_WORK_MASK = (_TIF_SIGPENDING | _TIF_NEED_RESCHED)
+_TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_RESTART_SVC)
+_TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NEED_RESCHED)
/*
* Register usage in interrupt handlers:
@@ -161,6 +162,7 @@
llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore
GET_THREAD_INFO # load pointer to task_struct to R9
stosm 48(%r15),0x03 # reenable interrupts
+sysc_do_restart:
larl %r10,sys_call_table
sll %r7,3
tm SP_PSW+3(%r15),0x01 # are we running in 31 bit mode ?
@@ -177,7 +179,7 @@
sysc_return:
stnsm 48(%r15),0xfc # disable I/O and ext. interrupts
- tm __TI_flags+7(%r9),_TIF_WORK_MASK
+ tm __TI_flags+7(%r9),_TIF_WORK_SVC
jnz sysc_work # there is work to do (signals etc.)
sysc_leave:
RESTORE_ALL 1
@@ -188,7 +190,7 @@
sysc_work_loop:
stnsm 48(%r15),0xfc # disable I/O and ext. interrupts
GET_THREAD_INFO # load pointer to task_struct to R9
- tm __TI_flags+7(%r9),_TIF_WORK_MASK
+ tm __TI_flags+7(%r9),_TIF_WORK_SVC
jz sysc_leave # there is no work to do
#
# One of the work bits is on. Find out which one.
@@ -199,6 +201,8 @@
jo sysc_reschedule
tm __TI_flags+7(%r9),_TIF_SIGPENDING
jo sysc_sigpending
+ tm __TI_flags+7(%r9),_TIF_RESTART_SVC
+ jo sysc_restart
j sysc_leave
#
@@ -221,6 +225,17 @@
j sysc_leave # out of here, do NOT recheck
#
+# _TIF_RESTART_SVC is set, set up registers and restart svc
+#
+sysc_restart:
+ ni __TI_flags+3(%r9),255-_TIF_RESTART_SVC # clear TIF_RESTART_SVC
+ stosm 48(%r15),0x03 # reenable interrupts
+ lg %r7,SP_R2(%r15) # load new svc number
+ mvc SP_R2(8,%r15),SP_ORIG_R2(%r15) # restore first argument
+ lmg %r2,%r6,SP_R2(%r15) # load svc arguments
+ j sysc_do_restart # restart svc
+
+#
# call syscall_trace before and after system call
# special linkage: %r12 contains the return address for trace_svc
#
@@ -383,7 +398,7 @@
.long SYSCALL(sys_write,sys32_write_wrapper)
.long SYSCALL(sys_open,sys32_open_wrapper) /* 5 */
.long SYSCALL(sys_close,sys32_close_wrapper)
- .long SYSCALL(sys_ni_syscall,sys_ni_syscall) /* old waitpid syscall */
+ .long SYSCALL(sys_restart_syscall,sys_ni_syscall)
.long SYSCALL(sys_creat,sys32_creat_wrapper)
.long SYSCALL(sys_link,sys32_link_wrapper)
.long SYSCALL(sys_unlink,sys32_unlink_wrapper) /* 10 */
@@ -777,7 +792,7 @@
#else
jno io_leave # no-> skip resched & signal
#endif
- tm __TI_flags+7(%r9),_TIF_WORK_MASK
+ tm __TI_flags+7(%r9),_TIF_WORK_INT
jnz io_work # there is work to do (signals etc.)
io_leave:
RESTORE_ALL 0
@@ -813,7 +828,7 @@
io_work_loop:
stnsm 48(%r15),0xfc # disable I/O and ext. interrupts
GET_THREAD_INFO # load pointer to task_struct to R9
- tm __TI_flags+7(%r9),_TIF_WORK_MASK
+ tm __TI_flags+7(%r9),_TIF_WORK_INT
jz io_leave # there is no work to do
#
# One of the work bits is on. Find out which one.
diff -urN linux-2.5.51/arch/s390x/kernel/signal.c linux-2.5.51-s390/arch/s390x/kernel/signal.c
--- linux-2.5.51/arch/s390x/kernel/signal.c Tue Dec 10 03:46:11 2002
+++ linux-2.5.51-s390/arch/s390x/kernel/signal.c Thu Dec 12 18:27:08 2002
@@ -391,6 +391,10 @@
if (regs->trap == __LC_SVC_OLD_PSW) {
/* If so, check system call restarting.. */
switch (regs->gprs[2]) {
+ case -ERESTART_RESTARTBLOCK:
+ current_thread_info()->restart_block.fn =
+ do_no_restart_syscall;
+ clear_thread_flag(TIF_RESTART_SVC);
case -ERESTARTNOHAND:
regs->gprs[2] = -EINTR;
break;
@@ -473,6 +477,11 @@
regs->gprs[2] = regs->orig_gpr2;
regs->psw.addr -= 2;
}
+ /* Restart the system call with a new system call number */
+ if (regs->gprs[2] == -ERESTART_RESTARTBLOCK) {
+ regs->gprs[2] = __NR_restart_syscall;
+ set_thread_flag(TIF_RESTART_SVC);
+ }
}
return 0;
}
diff -urN linux-2.5.51/include/asm-s390/current.h linux-2.5.51-s390/include/asm-s390/current.h
--- linux-2.5.51/include/asm-s390/current.h Tue Dec 10 03:46:24 2002
+++ linux-2.5.51-s390/include/asm-s390/current.h Thu Dec 12 18:27:00 2002
@@ -13,7 +13,7 @@
#ifdef __KERNEL__
-#include <asm/thread_info.h>
+#include <linux/thread_info.h>
struct task_struct;
diff -urN linux-2.5.51/include/asm-s390/thread_info.h linux-2.5.51-s390/include/asm-s390/thread_info.h
--- linux-2.5.51/include/asm-s390/thread_info.h Tue Dec 10 03:46:13 2002
+++ linux-2.5.51-s390/include/asm-s390/thread_info.h Thu Dec 12 18:27:00 2002
@@ -26,6 +26,7 @@
unsigned long flags; /* low level flags */
unsigned int cpu; /* current CPU */
unsigned int preempt_count; /* 0 => preemptable */
+ struct restart_block restart_block;
};
/*
@@ -33,10 +34,13 @@
*/
#define INIT_THREAD_INFO(tsk) \
{ \
- task: &tsk, \
- exec_domain: &default_exec_domain, \
- flags: 0, \
- cpu: 0, \
+ .task = &tsk, \
+ .exec_domain = &default_exec_domain, \
+ .flags = 0, \
+ .cpu = 0, \
+ .restart_block = { \
+ .fn = do_no_restart_syscall, \
+ }, \
}
#define init_thread_info (init_thread_union.thread_info)
@@ -69,6 +73,7 @@
#define TIF_NOTIFY_RESUME 1 /* resumption notification requested */
#define TIF_SIGPENDING 2 /* signal pending */
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
+#define TIF_RESTART_SVC 4 /* restart svc with new svc number */
#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */
#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling
TIF_NEED_RESCHED */
@@ -77,6 +82,7 @@
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
+#define _TIF_RESTART_SVC (1<<TIF_RESTART_SVC)
#define _TIF_USEDFPU (1<<TIF_USEDFPU)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
diff -urN linux-2.5.51/include/asm-s390/unistd.h linux-2.5.51-s390/include/asm-s390/unistd.h
--- linux-2.5.51/include/asm-s390/unistd.h Tue Dec 10 03:46:28 2002
+++ linux-2.5.51-s390/include/asm-s390/unistd.h Thu Dec 12 18:27:00 2002
@@ -19,6 +19,7 @@
#define __NR_write 4
#define __NR_open 5
#define __NR_close 6
+#define __NR_restart_syscall 7
#define __NR_creat 8
#define __NR_link 9
#define __NR_unlink 10
diff -urN linux-2.5.51/include/asm-s390x/current.h linux-2.5.51-s390/include/asm-s390x/current.h
--- linux-2.5.51/include/asm-s390x/current.h Tue Dec 10 03:46:26 2002
+++ linux-2.5.51-s390/include/asm-s390x/current.h Thu Dec 12 18:27:00 2002
@@ -13,7 +13,7 @@
#ifdef __KERNEL__
-#include <asm/thread_info.h>
+#include <linux/thread_info.h>
struct task_struct;
diff -urN linux-2.5.51/include/asm-s390x/thread_info.h linux-2.5.51-s390/include/asm-s390x/thread_info.h
--- linux-2.5.51/include/asm-s390x/thread_info.h Tue Dec 10 03:46:13 2002
+++ linux-2.5.51-s390/include/asm-s390x/thread_info.h Thu Dec 12 18:27:00 2002
@@ -26,6 +26,7 @@
unsigned long flags; /* low level flags */
unsigned int cpu; /* current CPU */
unsigned int preempt_count; /* 0 => preemptable */
+ struct restart_block restart_block;
};
/*
@@ -33,10 +34,13 @@
*/
#define INIT_THREAD_INFO(tsk) \
{ \
- task: &tsk, \
- exec_domain: &default_exec_domain, \
- flags: 0, \
- cpu: 0, \
+ .task = &tsk, \
+ .exec_domain = &default_exec_domain, \
+ .flags = 0, \
+ .cpu = 0, \
+ .restart_block = { \
+ .fn = do_no_restart_syscall, \
+ }, \
}
#define init_thread_info (init_thread_union.thread_info)
@@ -69,6 +73,7 @@
#define TIF_NOTIFY_RESUME 1 /* resumption notification requested */
#define TIF_SIGPENDING 2 /* signal pending */
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
+#define TIF_RESTART_SVC 4 /* restart svc with new svc number */
#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */
#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling
TIF_NEED_RESCHED */
@@ -77,6 +82,7 @@
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
+#define _TIF_RESTART_SVC (1<<TIF_RESTART_SVC)
#define _TIF_USEDFPU (1<<TIF_USEDFPU)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
diff -urN linux-2.5.51/include/asm-s390x/unistd.h linux-2.5.51-s390/include/asm-s390x/unistd.h
--- linux-2.5.51/include/asm-s390x/unistd.h Tue Dec 10 03:46:13 2002
+++ linux-2.5.51-s390/include/asm-s390x/unistd.h Thu Dec 12 18:27:00 2002
@@ -19,6 +19,7 @@
#define __NR_write 4
#define __NR_open 5
#define __NR_close 6
+#define __NR_restart_syscall 7
#define __NR_creat 8
#define __NR_link 9
#define __NR_unlink 10
^ permalink raw reply
* [PATCH] s390 (4/8): uaccess bug.
From: Martin Schwidefsky @ 2002-12-12 18:08 UTC (permalink / raw)
To: linux-kernel, torvalds
Fix return value of __put_user_asm_8.
diffstat:
uaccess.h | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -urN linux-2.5.51/include/asm-s390/uaccess.h linux-2.5.51-s390/include/asm-s390/uaccess.h
--- linux-2.5.51/include/asm-s390/uaccess.h Tue Dec 10 03:45:47 2002
+++ linux-2.5.51-s390/include/asm-s390/uaccess.h Thu Dec 12 18:03:17 2002
@@ -84,7 +84,7 @@
{
int err;
- __asm__ __volatile__ ( " sr %0,01\n"
+ __asm__ __volatile__ ( " sr %0,%0\n"
" lr 2,%1\n"
" lr 4,%2\n"
" sacf 512\n"
^ permalink raw reply
* Re: fetchmail and smtp problem
From: Haines Brown @ 2002-12-12 18:06 UTC (permalink / raw)
To: carl; +Cc: linux-newbie
In-Reply-To: <5.1.1.6.0.20021212150453.01f53a18@pop3.demon.co.uk>
> If you are collecting ALL the mail in the mail box on the ISP server
> to go to a SINGLE mailbox on your local server then you can force
> fetchmail to rewrite the new To: header sent to sendmail with the
> --smtpname switch on the command line (or the relevant keyword in
> the fetchmailconf file). This doesn't explain how 127.0.0.1 got in
> the To: header but will stop it from happening again.
Yes, that seems a harmless step. If my outgoing lets lost because it
has a messed up To: field, that would would seem to be a workaround.
> The first question you need to answer is -- how did 127.0.0.1 get
> into the "To:" header? Was it an addressing error on your part, or
> did something rewrite it to that value? I'd suggest you check the
> outbox of whatever program you used to send the message. If the "To:
> 127.0.0.1" line appears in your original, then it was just a typo
> and of no significance to your troubleshooting (that is, the reject
> is correct). If the original has a different To: line, then post a
> followup with the details -- what MUA, which system (hard disk) you
> were using, and what the original To: line said.
It may have been a typo, but obviously something more's going on, for
I'm not getting back test messages sent to myself now at all. In fact,
I probably have emacs set up for mail-self-blind. If so, the lack of
BCC messages is really significant.
Being a city-boy, I'm not too sure what an "outbox" is ;-). I run
rmail, and if I'm not connected, it's got to save its outgoing
messages in a queue somewhere, just as ~/RMAIL holds incoming. Perhaps
it is smail that handles outgoing messages, and if so, it logs in
/var/log/smail/logfile and has as its outgoing queue
/var/spool/smail/input/*
I'll compare /etc/sendmail.cf with what I've running right now
(current machine is a working copy of RH7.3) to see the diff. Also
will run rmail with debug option (-T).
Another concern is my hostname. My ISP knows me (UID) as
"brownh@hartford-hwp.com", but # hostname returns hartford-hwp.com. In
my /etc/hosts I believe I have:
127.0.0.1 hartford-hwp.com localhost.localdomain localhost
I'll recheck, but I'd like some assurance even this is correct. Do I
need a brownh@hartford-hwp.com alias in /etc/hostds?. I'm also going
to compare /etc/alias with what works on my current machine (RH7.3).
Haines
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply
* Re: [resend] mixer controls for bass/treble in emu10k driver
From: Takashi Iwai @ 2002-12-12 18:04 UTC (permalink / raw)
To: jordan.breeding; +Cc: alsa-devel
In-Reply-To: <20021212175539.ADB2014AE6@Cantor.suse.de>
At Thu, 12 Dec 2002 17:55:37 +0000,
jordan.breeding@attbi.com wrote:
>
>
> > At Thu, 12 Dec 2002 17:45:00 +0000,
> > jordan.breeding@attbi.com wrote:
> > >
> > > Is it possible for the emu10k (SBLive!/Audigy) driver to get bass/treble
> > > mixer controls in ALSA like it has in Windows and the OSS Linux (when you load
> > > the right file with the emu10k tools) driver? Thanks.
> >
> > yes. you need to turn on "Tone Control" switch, then bass and treble
> > volumes will respond.
> >
> >
> > ciao,
> >
> > Takashi
>
> Thanks for the response. I normally compile ALSA and the driver
> itself directly into my 2.5.x kernel, do you happen to know which
> source file I need to edit to enable tone control? Thanks.
well, i meant to turn on via alsamixer program...
you don't have to recompile the driver.
Takashi
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
^ permalink raw reply
* DNAT
From: Justin Kay @ 2002-12-12 18:00 UTC (permalink / raw)
To: Netfilter (E-mail)
When using a linux box to DNAT to some other boxes in a private address
space, do you need to alias all of the public ip addresses that you will be
doing DNAT for on the linux box?
internet--->208.224.51.10 (LINUX PUB IP FAKE) Linux/DNAT---> 10.10.20.15
other box
208.224.51.11 (alias used for other box) IS THIS NEEDED in
order for it to work?
Justin
^ permalink raw reply
* bandwidth
From: Andrew J. Meader @ 2002-12-12 18:00 UTC (permalink / raw)
To: netfilter
[-- Attachment #1: Type: text/plain, Size: 378 bytes --]
Hi,
There are a couple of situations where I need to limit bandwidth on some
of my machines. Can anyone share some solutions they have used? Here are
a couple of examples of what I am trying to accomplish:
* Limit bandwidth to certain ftp sites from localhost.
* Establish a maximum bandwidth for any connection transiting the
firewall/router.
Thanks.
Andy
[-- Attachment #2: Type: text/html, Size: 589 bytes --]
^ permalink raw reply
* Re: Sound-related hard-locking
From: Stas Sergeev @ 2002-12-12 17:56 UTC (permalink / raw)
To: linux-msdos
Hello.
J. Solomon Kostelnik wrote:
> But last night the same thing happened when I was playing an
> MP3 with XMMS and then booted XDOS (without midid running).
> As soon as the XDOS window opened, my machine hard-locked.
Hmm, doesn't look dosemu-related at a
first glance.
> vanilla 2.4.18 kernel
This may be a problem. Try 2.4.20 as
all the older kernels were easy to
lock up by dosemu, which is now fixed.
> Maestro 2E.
And what about video? It was reported
that xdos crashes X sometimes on some
video boards. Try running console
dosemu and see if the problem is still
there (apply the post-less video patch
at first).
> Is there a way I can log this before it crashes and get any meaningful
> data before it happens?
Try ALSA drivers with OSS emulation.
Maybe it is just an ESS OSS driver buggy
and the current dosemu sound code is
extremely evil to the underlaying drivers
and exposes all of their hidden bugs.
It locks up the Aureal drivers on my
machine after some minutes of playing,
but as that drivers are proprietary, this
can't be fixed.
Another usefull test would be to try
dosemu with a pc-speaker OSS driver. If
the problem goes away by this, then it
is definitely a problem of your OSS driver.
Because even if the dosemu sound code
is buggy, this doesn't excuse a kernel
lock-ups.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.