From 0890d74f295be849032fd4390ee00422dfda83b1 Mon Sep 17 00:00:00 2001 From: Date: Sun, 3 Apr 2005 14:52:44 -0500 Subject: [PATCH] consolidate timeout defintions in scsi.h Adapted from a patch in SuSE's kernel SRPM. Signed-off-by: James Bottomley --- include/scsi/scsi.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 1d54c063ae52..3507b3d7c0eb 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -360,6 +360,15 @@ struct scsi_lun { #define sense_error(sense) ((sense) & 0xf) #define sense_valid(sense) ((sense) & 0x80); +/* + * default timeouts +*/ +#define FORMAT_UNIT_TIMEOUT (2 * 60 * 60 * HZ) +#define START_STOP_TIMEOUT (60 * HZ) +#define MOVE_MEDIUM_TIMEOUT (5 * 60 * HZ) +#define READ_ELEMENT_STATUS_TIMEOUT (5 * 60 * HZ) +#define READ_DEFECT_DATA_TIMEOUT (60 * HZ ) + #define IDENTIFY_BASE 0x80 #define IDENTIFY(can_disconnect, lun) (IDENTIFY_BASE |\ -- cgit v1.2.3-59-g8ed1b From 97665e9c22991401dc56968619c6b8b9c09f3268 Mon Sep 17 00:00:00 2001 From: Date: Sun, 3 Apr 2005 14:55:06 -0500 Subject: [PATCH] scsi: remove unused scsi_cmnd->internal_timeout field scsi_cmnd->internal_timeout field doesn't have any meaning anymore. Kill the field. Signed-off-by: Tejun Heo Signed-off-by: James Bottomley --- drivers/scsi/advansys.c | 2 -- drivers/scsi/pci2000.c | 4 ++-- drivers/scsi/scsi.c | 1 - drivers/scsi/scsi_error.c | 1 - drivers/scsi/scsi_lib.c | 1 - drivers/scsi/scsi_priv.h | 5 ----- include/scsi/scsi_cmnd.h | 6 ------ 7 files changed, 2 insertions(+), 18 deletions(-) (limited to 'include') diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 9962c51dc2a7..edeb333d8161 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c @@ -9206,8 +9206,6 @@ asc_prt_scsi_cmnd(struct scsi_cmnd *s) " timeout_per_command %d, timeout_total %d, timeout %d\n", s->timeout_per_command, s->timeout_total, s->timeout); - printk(" internal_timeout %u\n", s->internal_timeout); - printk( " scsi_done 0x%lx, done 0x%lx, host_scribble 0x%lx, result 0x%x\n", (ulong) s->scsi_done, (ulong) s->done, diff --git a/drivers/scsi/pci2000.c b/drivers/scsi/pci2000.c index 60ce1cce9497..d58f303127f5 100644 --- a/drivers/scsi/pci2000.c +++ b/drivers/scsi/pci2000.c @@ -438,8 +438,8 @@ int Pci2000_QueueCommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) if ( bus ) { DEB (if(*cdb) printk ("\nCDB: %X- %X %X %X %X %X %X %X %X %X %X ", SCpnt->cmd_len, cdb[0], cdb[1], cdb[2], cdb[3], cdb[4], cdb[5], cdb[6], cdb[7], cdb[8], cdb[9])); - DEB (if(*cdb) printk ("\ntimeout_per_command: %d, timeout_total: %d, timeout: %d, internal_timout: %d", SCpnt->timeout_per_command, - SCpnt->timeout_total, SCpnt->timeout, SCpnt->internal_timeout)); + DEB (if(*cdb) printk ("\ntimeout_per_command: %d, timeout_total: %d, timeout: %d", SCpnt->timeout_per_command, + SCpnt->timeout_total, SCpnt->timeout)); outl (SCpnt->timeout_per_command, padapter->mb1); outb_p (CMD_SCSI_TIMEOUT, padapter->cmd); if ( WaitReady (padapter) ) diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 5dc84669616d..95de4d0f4fd1 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -716,7 +716,6 @@ void scsi_init_cmd_from_req(struct scsi_cmnd *cmd, struct scsi_request *sreq) /* * Start the timer ticking. */ - cmd->internal_timeout = NORMAL_TIMEOUT; cmd->abort_reason = 0; cmd->result = 0; diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 9bc597bd13ba..173abb88e3e8 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1839,7 +1839,6 @@ scsi_reset_provider(struct scsi_device *dev, int flag) scmd->bufflen = 0; scmd->request_buffer = NULL; scmd->request_bufflen = 0; - scmd->internal_timeout = NORMAL_TIMEOUT; scmd->abort_reason = DID_ABORT; scmd->cmd_len = 0; diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 7cbc4127fb5a..19dd911d9f7a 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -320,7 +320,6 @@ static int scsi_init_cmd_errh(struct scsi_cmnd *cmd) memcpy(cmd->data_cmnd, cmd->cmnd, sizeof(cmd->cmnd)); cmd->buffer = cmd->request_buffer; cmd->bufflen = cmd->request_bufflen; - cmd->internal_timeout = NORMAL_TIMEOUT; cmd->abort_reason = 0; return 1; diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h index aca3b39fe710..c01580df4476 100644 --- a/drivers/scsi/scsi_priv.h +++ b/drivers/scsi/scsi_priv.h @@ -29,11 +29,6 @@ struct Scsi_Host; #define SCSI_CMND_MAGIC 0xE25C23A5 #define SCSI_REQ_MAGIC 0x75F6D354 -/* - * Flag bit for the internal_timeout array - */ -#define NORMAL_TIMEOUT 0 - /* * Scsi Error Handler Flags */ diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 9d9871c28abd..ae45d6f8f98c 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -65,12 +65,6 @@ struct scsi_cmnd { int timeout_total; int timeout; - /* - * We handle the timeout differently if it happens when a reset, - * abort, etc are in process. - */ - unsigned volatile char internal_timeout; - unsigned char cmd_len; unsigned char old_cmd_len; enum dma_data_direction sc_data_direction; -- cgit v1.2.3-59-g8ed1b From 84011ae88da62a20b3ae7b48e2ae3b1ef0fc810a Mon Sep 17 00:00:00 2001 From: Date: Sun, 3 Apr 2005 14:59:11 -0500 Subject: [PATCH] scsi: remove meaningless scsi_cmnd->serial_number_at_timeout field scsi_cmnd->serial_number_at_timeout doesn't serve any purpose anymore. All serial_number == serial_number_at_timeout tests are always true in abort callbacks. Kill the field. Also, as ->pid always equals ->serial_number and ->serial_number doesn't have any special meaning anymore, update comments above ->serial_number accordingly. Once we remove all uses of this field from all lldd's, this field should go. Signed-off-by: Tejun Heo Signed-off-by: James Bottomley --- drivers/scsi/BusLogic.c | 7 ------- drivers/scsi/advansys.c | 5 ++--- drivers/scsi/ips.c | 7 ------- drivers/scsi/ncr53c8xx.c | 14 ++------------ drivers/scsi/qla2xxx/qla_dbg.c | 6 ++---- drivers/scsi/scsi.c | 2 -- drivers/scsi/scsi_error.c | 7 ------- drivers/scsi/scsi_lib.c | 1 - drivers/scsi/sym53c8xx_2/sym_glue.c | 6 ------ include/scsi/scsi_cmnd.h | 22 +++++++++------------- 10 files changed, 15 insertions(+), 62 deletions(-) (limited to 'include') diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index 41b5197ce4e6..15e4b122d56e 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c @@ -2957,13 +2957,6 @@ static int BusLogic_AbortCommand(struct scsi_cmnd *Command) int TargetID = Command->device->id; struct BusLogic_CCB *CCB; BusLogic_IncrementErrorCounter(&HostAdapter->TargetStatistics[TargetID].CommandAbortsRequested); - /* - If this Command has already completed, then no Abort is necessary. - */ - if (Command->serial_number != Command->serial_number_at_timeout) { - BusLogic_Warning("Unable to Abort Command to Target %d - " "Already Completed\n", HostAdapter, TargetID); - return SUCCESS; - } /* Attempt to find an Active CCB for this Command. If no Active CCB for this Command is found, then no Abort is necessary. diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index edeb333d8161..04cb5c405a2d 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c @@ -9198,9 +9198,8 @@ asc_prt_scsi_cmnd(struct scsi_cmnd *s) s->use_sg, s->sglist_len, s->abort_reason); printk( -" serial_number 0x%x, serial_number_at_timeout 0x%x, retries %d, allowed %d\n", - (unsigned) s->serial_number, (unsigned) s->serial_number_at_timeout, - s->retries, s->allowed); +" serial_number 0x%x, retries %d, allowed %d\n", + (unsigned) s->serial_number, s->retries, s->allowed); printk( " timeout_per_command %d, timeout_total %d, timeout %d\n", diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index e46096da8db2..47c263e5cd39 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -833,13 +833,6 @@ ips_eh_abort(Scsi_Cmnd * SC) if (!ha->active) return (FAILED); - if (SC->serial_number != SC->serial_number_at_timeout) { - /* HMM, looks like a bogus command */ - DEBUG(1, "Abort called with bogus scsi command"); - - return (FAILED); - } - /* See if the command is on the copp queue */ item = ha->copp_waitlist.head; while ((item) && (item->scsi_cmd != SC)) diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c index 7ae13236788e..2a0e42ec27d3 100644 --- a/drivers/scsi/ncr53c8xx.c +++ b/drivers/scsi/ncr53c8xx.c @@ -7486,24 +7486,14 @@ static int ncr53c8xx_abort(struct scsi_cmnd *cmd) struct scsi_cmnd *done_list; #if defined SCSI_RESET_SYNCHRONOUS && defined SCSI_RESET_ASYNCHRONOUS - printk("ncr53c8xx_abort: pid=%lu serial_number=%ld serial_number_at_timeout=%ld\n", - cmd->pid, cmd->serial_number, cmd->serial_number_at_timeout); + printk("ncr53c8xx_abort: pid=%lu serial_number=%ld\n", + cmd->pid, cmd->serial_number); #else printk("ncr53c8xx_abort: command pid %lu\n", cmd->pid); #endif NCR_LOCK_NCB(np, flags); -#if defined SCSI_RESET_SYNCHRONOUS && defined SCSI_RESET_ASYNCHRONOUS - /* - * We have to just ignore abort requests in some situations. - */ - if (cmd->serial_number != cmd->serial_number_at_timeout) { - sts = SCSI_ABORT_NOT_RUNNING; - goto out; - } -#endif - sts = ncr_abort_command(np, cmd); out: done_list = np->done_list; diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index dcc33daa5913..0e8ebbc56e81 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c @@ -1050,10 +1050,8 @@ qla2x00_print_scsi_cmd(struct scsi_cmnd * cmd) for (i = 0; i < cmd->cmd_len; i++) { printk("0x%02x ", cmd->cmnd[i]); } - printk("\n seg_cnt=%d, allowed=%d, retries=%d, " - "serial_number_at_timeout=0x%lx\n", - cmd->use_sg, cmd->allowed, cmd->retries, - cmd->serial_number_at_timeout); + printk("\n seg_cnt=%d, allowed=%d, retries=%d\n", + cmd->use_sg, cmd->allowed, cmd->retries); printk(" request buffer=0x%p, request buffer len=0x%x\n", cmd->request_buffer, cmd->request_bufflen); printk(" tag=%d, transfersize=0x%x\n", diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 95de4d0f4fd1..05d2bd075fd4 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -686,7 +686,6 @@ void scsi_init_cmd_from_req(struct scsi_cmnd *cmd, struct scsi_request *sreq) cmd->request = sreq->sr_request; memcpy(cmd->data_cmnd, sreq->sr_cmnd, sizeof(cmd->data_cmnd)); cmd->serial_number = 0; - cmd->serial_number_at_timeout = 0; cmd->bufflen = sreq->sr_bufflen; cmd->buffer = sreq->sr_buffer; cmd->retries = 0; @@ -765,7 +764,6 @@ void __scsi_done(struct scsi_cmnd *cmd) * Set the serial numbers back to zero */ cmd->serial_number = 0; - cmd->serial_number_at_timeout = 0; cmd->state = SCSI_STATE_BHQUEUE; cmd->owner = SCSI_OWNER_BH_HANDLER; diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 173abb88e3e8..13bac93fc397 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -79,11 +79,6 @@ int scsi_eh_scmd_add(struct scsi_cmnd *scmd, int eh_flag) */ scmd->owner = SCSI_OWNER_ERROR_HANDLER; scmd->state = SCSI_STATE_FAILED; - /* - * Set the serial_number_at_timeout to the current - * serial_number - */ - scmd->serial_number_at_timeout = scmd->serial_number; list_add_tail(&scmd->eh_entry, &shost->eh_cmd_q); set_bit(SHOST_RECOVERY, &shost->shost_state); shost->host_failed++; @@ -1061,7 +1056,6 @@ static int scsi_try_bus_reset(struct scsi_cmnd *scmd) SCSI_LOG_ERROR_RECOVERY(3, printk("%s: Snd Bus RST\n", __FUNCTION__)); scmd->owner = SCSI_OWNER_LOWLEVEL; - scmd->serial_number_at_timeout = scmd->serial_number; if (!scmd->device->host->hostt->eh_bus_reset_handler) return FAILED; @@ -1093,7 +1087,6 @@ static int scsi_try_host_reset(struct scsi_cmnd *scmd) SCSI_LOG_ERROR_RECOVERY(3, printk("%s: Snd Host RST\n", __FUNCTION__)); scmd->owner = SCSI_OWNER_LOWLEVEL; - scmd->serial_number_at_timeout = scmd->serial_number; if (!scmd->device->host->hostt->eh_host_reset_handler) return FAILED; diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 19dd911d9f7a..619d3fb7a2f0 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -298,7 +298,6 @@ static int scsi_init_cmd_errh(struct scsi_cmnd *cmd) { cmd->owner = SCSI_OWNER_MIDLEVEL; cmd->serial_number = 0; - cmd->serial_number_at_timeout = 0; cmd->abort_reason = 0; memset(cmd->sense_buffer, 0, sizeof cmd->sense_buffer); diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index a1dff6d437bc..5ff83d214f12 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -799,12 +799,6 @@ static int sym_eh_handler(int op, char *opname, struct scsi_cmnd *cmd) dev_warn(&cmd->device->sdev_gendev, "%s operation started.\n", opname); -#if 0 - /* This one should be the result of some race, thus to ignore */ - if (cmd->serial_number != cmd->serial_number_at_timeout) - goto prepare; -#endif - /* This one is queued in some place -> to wait for completion */ FOR_EACH_QUEUED_ELEMENT(&np->busy_ccbq, qp) { struct sym_ccb *cp = sym_que_entry(qp, struct sym_ccb, link_ccbq); diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index ae45d6f8f98c..07f5c699eaa7 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -43,21 +43,17 @@ struct scsi_cmnd { void (*done) (struct scsi_cmnd *); /* Mid-level done function */ /* - * A SCSI Command is assigned a nonzero serial_number when internal_cmnd - * passes it to the driver's queue command function. The serial_number - * is cleared when scsi_done is entered indicating that the command has - * been completed. If a timeout occurs, the serial number at the moment - * of timeout is copied into serial_number_at_timeout. By subsequently - * comparing the serial_number and serial_number_at_timeout fields - * during abort or reset processing, we can detect whether the command - * has already completed. This also detects cases where the command has - * completed and the SCSI Command structure has already being reused - * for another command, so that we can avoid incorrectly aborting or - * resetting the new command. - * The serial number is only unique per host. + * A SCSI Command is assigned a nonzero serial_number before passed + * to the driver's queue command function. The serial_number is + * cleared when scsi_done is entered indicating that the command + * has been completed. It currently doesn't have much use other + * than printk's. Some lldd's use this number for other purposes. + * It's almost certain that such usages are either incorrect or + * meaningless. Please kill all usages other than printk's. Also, + * as this number is always identical to ->pid, please convert + * printk's to use ->pid, so that we can kill this field. */ unsigned long serial_number; - unsigned long serial_number_at_timeout; int retries; int allowed; -- cgit v1.2.3-59-g8ed1b From 686579d95d48c713bdb7008cc76af8398219e687 Mon Sep 17 00:00:00 2001 From: Date: Tue, 12 Apr 2005 17:49:09 -0500 Subject: scsi: add DID_REQUEUE to the error handling We have a DID_IMM_RETRY to require a retry at once, but we could do with a DID_REQUEUE to instruct the mid-layer to treat this command in the same manner as QUEUE_FULL or BUSY (i.e. halt the submission until another command returns ... or the queue pressure builds if there are no outstanding commands). Signed-off-by: James Bottomley --- drivers/scsi/scsi_error.c | 3 +++ include/scsi/scsi.h | 2 ++ 2 files changed, 5 insertions(+) (limited to 'include') diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 13bac93fc397..203a0812508a 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1306,6 +1306,9 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd) case DID_IMM_RETRY: return NEEDS_RETRY; + case DID_REQUEUE: + return ADD_TO_MLQUEUE; + case DID_ERROR: if (msg_byte(scmd->result) == COMMAND_COMPLETE && status_byte(scmd->result) == RESERVATION_CONFLICT) diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 3507b3d7c0eb..659ecf48fb4a 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -295,6 +295,8 @@ struct scsi_lun { #define DID_PASSTHROUGH 0x0a /* Force command past mid-layer */ #define DID_SOFT_ERROR 0x0b /* The low level driver just wish a retry */ #define DID_IMM_RETRY 0x0c /* Retry without decrementing retry count */ +#define DID_REQUEUE 0x0d /* Requeue command (no immediate retry) also + * without decrementing the retry count */ #define DRIVER_OK 0x00 /* Driver status */ /* -- cgit v1.2.3-59-g8ed1b From 652a12ef98d16ccd1ee5cdf2c832ce5411ed3262 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 17 Apr 2005 15:50:36 +0100 Subject: [PATCH] ARM: showregs Fix show_regs() to provide a backtrace. Provide a new __show_regs() function which implements the common subset of show_regs() and die(). Add prototypes to asm-arm/system.h Signed-off-by: Russell King --- arch/arm/kernel/process.c | 15 +++++++++++---- arch/arm/kernel/traps.c | 8 ++------ include/asm-arm/ptrace.h | 5 +---- include/asm-arm/system.h | 3 +++ 4 files changed, 17 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index dbd8ca89b385..26eacd3e5def 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -168,12 +168,11 @@ void machine_restart(char * __unused) EXPORT_SYMBOL(machine_restart); -void show_regs(struct pt_regs * regs) +void __show_regs(struct pt_regs *regs) { - unsigned long flags; - - flags = condition_codes(regs); + unsigned long flags = condition_codes(regs); + printk("CPU: %d\n", smp_processor_id()); print_symbol("PC is at %s\n", instruction_pointer(regs)); print_symbol("LR is at %s\n", regs->ARM_lr); printk("pc : [<%08lx>] lr : [<%08lx>] %s\n" @@ -213,6 +212,14 @@ void show_regs(struct pt_regs * regs) } } +void show_regs(struct pt_regs * regs) +{ + printk("\n"); + printk("Pid: %d, comm: %20s\n", current->pid, current->comm); + __show_regs(regs); + __backtrace(); +} + void show_fpregs(struct user_fp *regs) { int i; diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 93dc4646cd7f..6e31718f6008 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -31,9 +31,6 @@ #include "ptrace.h" -extern void c_backtrace (unsigned long fp, int pmode); -extern void show_pte(struct mm_struct *mm, unsigned long addr); - const char *processor_modes[]= { "USER_26", "FIQ_26" , "IRQ_26" , "SVC_26" , "UK4_26" , "UK5_26" , "UK6_26" , "UK7_26" , "UK8_26" , "UK9_26" , "UK10_26", "UK11_26", "UK12_26", "UK13_26", "UK14_26", "UK15_26", @@ -216,8 +213,7 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) printk("Internal error: %s: %x [#%d]\n", str, err, ++die_counter); print_modules(); - printk("CPU: %d\n", smp_processor_id()); - show_regs(regs); + __show_regs(regs); printk("Process %s (pid: %d, stack limit = 0x%p)\n", tsk->comm, tsk->pid, tsk->thread_info + 1); @@ -482,7 +478,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) current->pid, current->comm, no); dump_instr(regs); if (user_mode(regs)) { - show_regs(regs); + __show_regs(regs); c_backtrace(regs->ARM_fp, processor_mode(regs)); } } diff --git a/include/asm-arm/ptrace.h b/include/asm-arm/ptrace.h index 604e3a186cf9..4377e22b7e1a 100644 --- a/include/asm-arm/ptrace.h +++ b/include/asm-arm/ptrace.h @@ -142,11 +142,8 @@ extern unsigned long profile_pc(struct pt_regs *regs); #endif #ifdef __KERNEL__ -extern void show_regs(struct pt_regs *); - -#define predicate(x) (x & 0xf0000000) +#define predicate(x) ((x) & 0xf0000000) #define PREDICATE_ALWAYS 0xe0000000 - #endif #endif /* __ASSEMBLY__ */ diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index b5731290b4e5..b13a8da4847b 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h @@ -99,6 +99,9 @@ void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, #define tas(ptr) (xchg((ptr),1)) extern asmlinkage void __backtrace(void); +extern asmlinkage void c_backtrace(unsigned long fp, int pmode); +extern void show_pte(struct mm_struct *mm, unsigned long addr); +extern void __show_regs(struct pt_regs *); extern int cpu_architecture(void); -- cgit v1.2.3-59-g8ed1b From cc56449f53ba45646c6f0a2edf77c4acb342caed Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 17 Apr 2005 16:28:31 +0100 Subject: [PATCH] ARM: fix debug macros Fix debug EBSA285 and RiscPC debugging macros to detect whether the MMU is enabled. Signed-off-by: Russell King --- include/asm-arm/arch-ebsa285/debug-macro.S | 7 +++++-- include/asm-arm/arch-rpc/debug-macro.S | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/asm-arm/arch-ebsa285/debug-macro.S b/include/asm-arm/arch-ebsa285/debug-macro.S index 237853db6e2f..97d15fc629af 100644 --- a/include/asm-arm/arch-ebsa285/debug-macro.S +++ b/include/asm-arm/arch-ebsa285/debug-macro.S @@ -45,9 +45,12 @@ .equ dc21285_low, ARMCSR_BASE & 0x00ffffff .macro addruart,rx - mov \rx, #dc21285_high + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + moveq \rx, #0x42000000 + movne \rx, #dc21285_high .if dc21285_low - orr \rx, \rx, #dc21285_low + orrne \rx, \rx, #dc21285_low .endif .endm diff --git a/include/asm-arm/arch-rpc/debug-macro.S b/include/asm-arm/arch-rpc/debug-macro.S index 0711828164cd..456d3d754c3d 100644 --- a/include/asm-arm/arch-rpc/debug-macro.S +++ b/include/asm-arm/arch-rpc/debug-macro.S @@ -12,7 +12,10 @@ */ .macro addruart,rx - mov \rx, #0xe0000000 + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + moveq \rx, #0x03000000 + movne \rx, #0xe0000000 orr \rx, \rx, #0x00010000 orr \rx, \rx, #0x00000fe0 .endm -- cgit v1.2.3-59-g8ed1b From dadeafdfc8da8c27e5a68e0706b9856eaac89391 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Sun, 17 Apr 2005 18:03:11 -0700 Subject: [PATCH] sparc64: Reduce ptrace cache flushing We were flushing the D-cache excessively for ptrace() processing and this makes debugging threads so slow as to be totally unusable. All process page accesses via ptrace() go via access_process_vm(). This routine, for each process page, uses get_user_pages(). That in turn does a flush_dcache_page() on the child pages before we copy in/out the ptrace request data. Therefore, all we need to do after the data movement is: 1) Flush the D-cache pages if the kernel maps the page to a different color than userspace does. 2) If we wrote to the page, we need to flush the I-cache on older cpus. Previously we just flushed the entire cache at the end of a ptrace() request, and that was beyond stupid. Signed-off-by: David S. Miller Signed-off-by: Linus Torvalds --- arch/sparc64/kernel/ptrace.c | 82 +++++++++++++++++++++++++++------------- include/asm-sparc64/cacheflush.h | 22 +++++++---- 2 files changed, 69 insertions(+), 35 deletions(-) (limited to 'include') diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c index 08bac537262a..5f080cf04b33 100644 --- a/arch/sparc64/kernel/ptrace.c +++ b/arch/sparc64/kernel/ptrace.c @@ -103,6 +103,55 @@ void ptrace_disable(struct task_struct *child) /* nothing to do */ } +/* To get the necessary page struct, access_process_vm() first calls + * get_user_pages(). This has done a flush_dcache_page() on the + * accessed page. Then our caller (copy_{to,from}_user_page()) did + * to memcpy to read/write the data from that page. + * + * Now, the only thing we have to do is: + * 1) flush the D-cache if it's possible than an illegal alias + * has been created + * 2) flush the I-cache if this is pre-cheetah and we did a write + */ +void flush_ptrace_access(struct vm_area_struct *vma, struct page *page, + unsigned long uaddr, void *kaddr, + unsigned long len, int write) +{ + BUG_ON(len > PAGE_SIZE); + +#ifdef DCACHE_ALIASING_POSSIBLE + /* If bit 13 of the kernel address we used to access the + * user page is the same as the virtual address that page + * is mapped to in the user's address space, we can skip the + * D-cache flush. + */ + if ((uaddr ^ kaddr) & (1UL << 13)) { + unsigned long start = __pa(kaddr); + unsigned long end = start + len; + + if (tlb_type == spitfire) { + for (; start < end; start += 32) + spitfire_put_dcache_tag(va & 0x3fe0, 0x0); + } else { + for (; start < end; start += 32) + __asm__ __volatile__( + "stxa %%g0, [%0] %1\n\t" + "membar #Sync" + : /* no outputs */ + : "r" (va), + "i" (ASI_DCACHE_INVALIDATE)); + } + } +#endif + if (write && tlb_type == spitfire) { + unsigned long start = (unsigned long) kaddr; + unsigned long end = start + len; + + for (; start < end; start += 32) + flushi(start); + } +} + asmlinkage void do_ptrace(struct pt_regs *regs) { int request = regs->u_regs[UREG_I0]; @@ -227,7 +276,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs) pt_error_return(regs, -res); else pt_os_succ_return(regs, tmp64, (void __user *) data); - goto flush_and_out; + goto out_tsk; } case PTRACE_POKETEXT: /* write the word at location addr. */ @@ -253,7 +302,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs) pt_error_return(regs, -res); else pt_succ_return(regs, res); - goto flush_and_out; + goto out_tsk; } case PTRACE_GETREGS: { @@ -485,12 +534,12 @@ asmlinkage void do_ptrace(struct pt_regs *regs) (char __user *)addr2, data); if (res == data) { pt_succ_return(regs, 0); - goto flush_and_out; + goto out_tsk; } if (res >= 0) res = -EIO; pt_error_return(regs, -res); - goto flush_and_out; + goto out_tsk; } case PTRACE_WRITETEXT: @@ -499,12 +548,12 @@ asmlinkage void do_ptrace(struct pt_regs *regs) addr, data); if (res == data) { pt_succ_return(regs, 0); - goto flush_and_out; + goto out_tsk; } if (res >= 0) res = -EIO; pt_error_return(regs, -res); - goto flush_and_out; + goto out_tsk; } case PTRACE_SYSCALL: /* continue and stop at (return from) syscall */ addr = 1; @@ -571,27 +620,6 @@ asmlinkage void do_ptrace(struct pt_regs *regs) goto out_tsk; } } -flush_and_out: - { - unsigned long va; - - if (tlb_type == cheetah || tlb_type == cheetah_plus) { - for (va = 0; va < (1 << 16); va += (1 << 5)) - spitfire_put_dcache_tag(va, 0x0); - /* No need to mess with I-cache on Cheetah. */ - } else { - for (va = 0; va < L1DCACHE_SIZE; va += 32) - spitfire_put_dcache_tag(va, 0x0); - if (request == PTRACE_PEEKTEXT || - request == PTRACE_POKETEXT || - request == PTRACE_READTEXT || - request == PTRACE_WRITETEXT) { - for (va = 0; va < (PAGE_SIZE << 1); va += 32) - spitfire_put_icache_tag(va, 0x0); - __asm__ __volatile__("flush %g6"); - } - } - } out_tsk: if (child) put_task_struct(child); diff --git a/include/asm-sparc64/cacheflush.h b/include/asm-sparc64/cacheflush.h index 86f02937ff1b..51b26e81d828 100644 --- a/include/asm-sparc64/cacheflush.h +++ b/include/asm-sparc64/cacheflush.h @@ -49,16 +49,22 @@ extern void flush_dcache_page(struct page *page); #define flush_icache_page(vma, pg) do { } while(0) #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) -#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ - do { \ - flush_cache_page(vma, vaddr, page_to_pfn(page));\ - memcpy(dst, src, len); \ +extern void flush_ptrace_access(struct vm_area_struct *, struct page *, + unsigned long uaddr, void *kaddr, + unsigned long len, int write); + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + do { \ + flush_cache_page(vma, vaddr, page_to_pfn(page)); \ + memcpy(dst, src, len); \ + flush_ptrace_access(vma, page, vaddr, src, len, 0); \ } while (0) -#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ - do { \ - flush_cache_page(vma, vaddr, page_to_pfn(page));\ - memcpy(dst, src, len); \ +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + do { \ + flush_cache_page(vma, vaddr, page_to_pfn(page)); \ + memcpy(dst, src, len); \ + flush_ptrace_access(vma, page, vaddr, dst, len, 1); \ } while (0) #define flush_dcache_mmap_lock(mapping) do { } while (0) -- cgit v1.2.3-59-g8ed1b From 0ba4da03cc84f54b2574e1abcdaa18ef8456a9fb Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 18 Apr 2005 15:13:15 -0700 Subject: [PATCH] sparc64: Fix stat Like Alpha, sparc64's struct stat was defined before we had the nanosecond et al. fields added. So like Alpha I have to cons up a struct stat64 to get this stuff. I'll work on the glibc bits soon. Also, we were forgetting to fill in the nanosecond fields in the sparc compat stat64 syscalls. Signed-off-by: David S. Miller Signed-off-by: Linus Torvalds --- arch/sparc64/kernel/sys_sparc32.c | 68 +++++++++++++++++++++++++++++++++++++-- arch/sparc64/kernel/systbls.S | 12 +++---- include/asm-sparc/unistd.h | 6 ++-- include/asm-sparc64/compat.h | 40 +++++++++++++++++++++-- include/asm-sparc64/stat.h | 49 ++++++++++------------------ include/asm-sparc64/unistd.h | 6 ++-- 6 files changed, 131 insertions(+), 50 deletions(-) (limited to 'include') diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c index 567c91c77b20..1d3aa588df8a 100644 --- a/arch/sparc64/kernel/sys_sparc32.c +++ b/arch/sparc64/kernel/sys_sparc32.c @@ -352,11 +352,11 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf) err |= put_user(old_encode_dev(stat->rdev), &statbuf->st_rdev); err |= put_user(stat->size, &statbuf->st_size); err |= put_user(stat->atime.tv_sec, &statbuf->st_atime); - err |= put_user(0, &statbuf->__unused1); + err |= put_user(stat->atime.tv_nsec, &statbuf->st_atime_nsec); err |= put_user(stat->mtime.tv_sec, &statbuf->st_mtime); - err |= put_user(0, &statbuf->__unused2); + err |= put_user(stat->mtime.tv_nsec, &statbuf->st_mtime_nsec); err |= put_user(stat->ctime.tv_sec, &statbuf->st_ctime); - err |= put_user(0, &statbuf->__unused3); + err |= put_user(stat->ctime.tv_nsec, &statbuf->st_ctime_nsec); err |= put_user(stat->blksize, &statbuf->st_blksize); err |= put_user(stat->blocks, &statbuf->st_blocks); err |= put_user(0, &statbuf->__unused4[0]); @@ -365,6 +365,68 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf) return err; } +int cp_compat_stat64(struct kstat *stat, struct compat_stat64 __user *statbuf) +{ + int err; + + err = put_user(huge_encode_dev(stat->dev), &statbuf->st_dev); + err |= put_user(stat->ino, &statbuf->st_ino); + err |= put_user(stat->mode, &statbuf->st_mode); + err |= put_user(stat->nlink, &statbuf->st_nlink); + err |= put_user(stat->uid, &statbuf->st_uid); + err |= put_user(stat->gid, &statbuf->st_gid); + err |= put_user(huge_encode_dev(stat->rdev), &statbuf->st_rdev); + err |= put_user(0, (unsigned long __user *) &statbuf->__pad3[0]); + err |= put_user(stat->size, &statbuf->st_size); + err |= put_user(stat->blksize, &statbuf->st_blksize); + err |= put_user(0, (unsigned int __user *) &statbuf->__pad4[0]); + err |= put_user(0, (unsigned int __user *) &statbuf->__pad4[4]); + err |= put_user(stat->blocks, &statbuf->st_blocks); + err |= put_user(stat->atime.tv_sec, &statbuf->st_atime); + err |= put_user(stat->atime.tv_nsec, &statbuf->st_atime_nsec); + err |= put_user(stat->mtime.tv_sec, &statbuf->st_mtime); + err |= put_user(stat->mtime.tv_nsec, &statbuf->st_mtime_nsec); + err |= put_user(stat->ctime.tv_sec, &statbuf->st_ctime); + err |= put_user(stat->ctime.tv_nsec, &statbuf->st_ctime_nsec); + err |= put_user(0, &statbuf->__unused4); + err |= put_user(0, &statbuf->__unused5); + + return err; +} + +asmlinkage long compat_sys_stat64(char __user * filename, + struct compat_stat64 __user *statbuf) +{ + struct kstat stat; + int error = vfs_stat(filename, &stat); + + if (!error) + error = cp_compat_stat64(&stat, statbuf); + return error; +} + +asmlinkage long compat_sys_lstat64(char __user * filename, + struct compat_stat64 __user *statbuf) +{ + struct kstat stat; + int error = vfs_lstat(filename, &stat); + + if (!error) + error = cp_compat_stat64(&stat, statbuf); + return error; +} + +asmlinkage long compat_sys_fstat64(unsigned int fd, + struct compat_stat64 __user * statbuf) +{ + struct kstat stat; + int error = vfs_fstat(fd, &stat); + + if (!error) + error = cp_compat_stat64(&stat, statbuf); + return error; +} + asmlinkage long compat_sys_sysfs(int option, u32 arg1, u32 arg2) { return sys_sysfs(option, arg1, arg2); diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S index a4ccb65aece8..a5e36a4c8924 100644 --- a/arch/sparc64/kernel/systbls.S +++ b/arch/sparc64/kernel/systbls.S @@ -32,7 +32,7 @@ sys_call_table32: .word sys32_umount, sys32_setgid16, sys32_getgid16, sys32_signal, sys32_geteuid16 /*50*/ .word sys32_getegid16, sys_acct, sys_nis_syscall, sys_getgid, compat_sys_ioctl .word sys32_reboot, sys32_mmap2, sys_symlink, sys32_readlink, sys32_execve -/*60*/ .word sys32_umask, sys_chroot, compat_sys_newfstat, sys_fstat64, sys_getpagesize +/*60*/ .word sys32_umask, sys_chroot, compat_sys_newfstat, compat_sys_fstat64, sys_getpagesize .word sys32_msync, sys_vfork, sys32_pread64, sys32_pwrite64, sys_geteuid /*70*/ .word sys_getegid, sys_mmap, sys_setreuid, sys_munmap, sys_mprotect .word sys_madvise, sys_vhangup, sys32_truncate64, sys_mincore, sys32_getgroups16 @@ -46,8 +46,8 @@ sys_call_table32: .word sys32_getgroups, sys32_gettimeofday, sys32_getrusage, sys_nis_syscall, sys_getcwd /*120*/ .word compat_sys_readv, compat_sys_writev, sys32_settimeofday, sys32_fchown16, sys_fchmod .word sys_nis_syscall, sys32_setreuid16, sys32_setregid16, sys_rename, sys_truncate -/*130*/ .word sys_ftruncate, sys_flock, sys_lstat64, sys_nis_syscall, sys_nis_syscall - .word sys_nis_syscall, sys32_mkdir, sys_rmdir, sys32_utimes, sys_stat64 +/*130*/ .word sys_ftruncate, sys_flock, compat_sys_lstat64, sys_nis_syscall, sys_nis_syscall + .word sys_nis_syscall, sys32_mkdir, sys_rmdir, sys32_utimes, compat_sys_stat64 /*140*/ .word sys32_sendfile64, sys_nis_syscall, sys32_futex, sys_gettid, compat_sys_getrlimit .word compat_sys_setrlimit, sys_pivot_root, sys32_prctl, sys_pciconfig_read, sys_pciconfig_write /*150*/ .word sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_poll, sys_getdents64 @@ -98,7 +98,7 @@ sys_call_table: .word sys_umount, sys_setgid, sys_getgid, sys_signal, sys_geteuid /*50*/ .word sys_getegid, sys_acct, sys_memory_ordering, sys_nis_syscall, sys_ioctl .word sys_reboot, sys_nis_syscall, sys_symlink, sys_readlink, sys_execve -/*60*/ .word sys_umask, sys_chroot, sys_newfstat, sys_nis_syscall, sys_getpagesize +/*60*/ .word sys_umask, sys_chroot, sys_newfstat, sys_stat64, sys_getpagesize .word sys_msync, sys_vfork, sys_pread64, sys_pwrite64, sys_nis_syscall /*70*/ .word sys_nis_syscall, sys_mmap, sys_nis_syscall, sys64_munmap, sys_mprotect .word sys_madvise, sys_vhangup, sys_nis_syscall, sys_mincore, sys_getgroups @@ -112,8 +112,8 @@ sys_call_table: .word sys_nis_syscall, sys_gettimeofday, sys_getrusage, sys_getsockopt, sys_getcwd /*120*/ .word sys_readv, sys_writev, sys_settimeofday, sys_fchown, sys_fchmod .word sys_recvfrom, sys_setreuid, sys_setregid, sys_rename, sys_truncate -/*130*/ .word sys_ftruncate, sys_flock, sys_nis_syscall, sys_sendto, sys_shutdown - .word sys_socketpair, sys_mkdir, sys_rmdir, sys_utimes, sys_nis_syscall +/*130*/ .word sys_ftruncate, sys_flock, sys_lstat64, sys_sendto, sys_shutdown + .word sys_socketpair, sys_mkdir, sys_rmdir, sys_utimes, sys_stat64 /*140*/ .word sys_sendfile64, sys_getpeername, sys_futex, sys_gettid, sys_getrlimit .word sys_setrlimit, sys_pivot_root, sys_prctl, sys_pciconfig_read, sys_pciconfig_write /*150*/ .word sys_getsockname, sys_nis_syscall, sys_nis_syscall, sys_poll, sys_getdents64 diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index d1f63caaa326..846708403900 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h @@ -79,7 +79,7 @@ #define __NR_umask 60 /* Common */ #define __NR_chroot 61 /* Common */ #define __NR_fstat 62 /* Common */ -#define __NR_fstat64 63 /* Linux sparc32 Specific */ +#define __NR_fstat64 63 /* Linux Specific */ #define __NR_getpagesize 64 /* Common */ #define __NR_msync 65 /* Common in newer 1.3.x revs... */ #define __NR_vfork 66 /* Common */ @@ -148,14 +148,14 @@ #define __NR_truncate 129 /* Common */ #define __NR_ftruncate 130 /* Common */ #define __NR_flock 131 /* Common */ -#define __NR_lstat64 132 /* Linux sparc32 Specific */ +#define __NR_lstat64 132 /* Linux Specific */ #define __NR_sendto 133 /* Common */ #define __NR_shutdown 134 /* Common */ #define __NR_socketpair 135 /* Common */ #define __NR_mkdir 136 /* Common */ #define __NR_rmdir 137 /* Common */ #define __NR_utimes 138 /* SunOS Specific */ -#define __NR_stat64 139 /* Linux sparc32 Specific */ +#define __NR_stat64 139 /* Linux Specific */ #define __NR_sendfile64 140 /* adjtime under SunOS */ #define __NR_getpeername 141 /* Common */ #define __NR_futex 142 /* gethostid under SunOS */ diff --git a/include/asm-sparc64/compat.h b/include/asm-sparc64/compat.h index 2950279dd776..22f58055b8ab 100644 --- a/include/asm-sparc64/compat.h +++ b/include/asm-sparc64/compat.h @@ -51,16 +51,50 @@ struct compat_stat { compat_dev_t st_rdev; compat_off_t st_size; compat_time_t st_atime; - u32 __unused1; + compat_ulong_t st_atime_nsec; compat_time_t st_mtime; - u32 __unused2; + compat_ulong_t st_mtime_nsec; compat_time_t st_ctime; - u32 __unused3; + compat_ulong_t st_ctime_nsec; compat_off_t st_blksize; compat_off_t st_blocks; u32 __unused4[2]; }; +struct compat_stat64 { + unsigned long long st_dev; + + unsigned long long st_ino; + + unsigned int st_mode; + unsigned int st_nlink; + + unsigned int st_uid; + unsigned int st_gid; + + unsigned long long st_rdev; + + unsigned char __pad3[8]; + + long long st_size; + unsigned int st_blksize; + + unsigned char __pad4[8]; + unsigned int st_blocks; + + unsigned int st_atime; + unsigned int st_atime_nsec; + + unsigned int st_mtime; + unsigned int st_mtime_nsec; + + unsigned int st_ctime; + unsigned int st_ctime_nsec; + + unsigned int __unused4; + unsigned int __unused5; +}; + struct compat_flock { short l_type; short l_whence; diff --git a/include/asm-sparc64/stat.h b/include/asm-sparc64/stat.h index 48e06618a5a4..128c27e57f0b 100644 --- a/include/asm-sparc64/stat.h +++ b/include/asm-sparc64/stat.h @@ -21,43 +21,28 @@ struct stat { unsigned long __unused4[2]; }; -#ifdef __KERNEL__ -/* This is sparc32 stat64 structure. */ - struct stat64 { - unsigned long long st_dev; - - unsigned long long st_ino; + unsigned long st_dev; + unsigned long st_ino; + unsigned long st_nlink; unsigned int st_mode; - unsigned int st_nlink; - unsigned int st_uid; unsigned int st_gid; - - unsigned long long st_rdev; - - unsigned char __pad3[8]; - - long long st_size; - unsigned int st_blksize; - - unsigned char __pad4[8]; - unsigned int st_blocks; - - unsigned int st_atime; - unsigned int st_atime_nsec; - - unsigned int st_mtime; - unsigned int st_mtime_nsec; - - unsigned int st_ctime; - unsigned int st_ctime_nsec; - - unsigned int __unused4; - unsigned int __unused5; + unsigned int __pad0; + + unsigned long st_rdev; + long st_size; + long st_blksize; + long st_blocks; + + unsigned long st_atime; + unsigned long st_atime_nsec; + unsigned long st_mtime; + unsigned long st_mtime_nsec; + unsigned long st_ctime; + unsigned long st_ctime_nsec; + long __unused[3]; }; #endif - -#endif diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index 3c00065eea80..5b8dcf5786a5 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h @@ -79,7 +79,7 @@ #define __NR_umask 60 /* Common */ #define __NR_chroot 61 /* Common */ #define __NR_fstat 62 /* Common */ -/* #define __NR_fstat64 63 Linux sparc32 Specific */ +#define __NR_fstat64 63 /* Linux Specific */ #define __NR_getpagesize 64 /* Common */ #define __NR_msync 65 /* Common in newer 1.3.x revs... */ #define __NR_vfork 66 /* Common */ @@ -148,14 +148,14 @@ #define __NR_truncate 129 /* Common */ #define __NR_ftruncate 130 /* Common */ #define __NR_flock 131 /* Common */ -/* #define __NR_lstat64 132 Linux sparc32 Specific */ +#define __NR_lstat64 132 /* Linux Specific */ #define __NR_sendto 133 /* Common */ #define __NR_shutdown 134 /* Common */ #define __NR_socketpair 135 /* Common */ #define __NR_mkdir 136 /* Common */ #define __NR_rmdir 137 /* Common */ #define __NR_utimes 138 /* SunOS Specific */ -/* #define __NR_stat64 139 Linux sparc32 Specific */ +#define __NR_stat64 139 /* Linux Specific */ #define __NR_sendfile64 140 /* adjtime under SunOS */ #define __NR_getpeername 141 /* Common */ #define __NR_futex 142 /* gethostid under SunOS */ -- cgit v1.2.3-59-g8ed1b