git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
arch
/
s390
/
appldata
/
appldata_base.c
diff --git
a/arch/s390/appldata/appldata_base.c
b/arch/s390/appldata/appldata_base.c
index
c067435
..
9a22434
100644
(file)
--- a/
arch/s390/appldata/appldata_base.c
+++ b/
arch/s390/appldata/appldata_base.c
@@
-40,7
+40,7
@@
#define TOD_MICRO 0x01000 /* nr. of TOD clock units
for 1 microsecond */
#define TOD_MICRO 0x01000 /* nr. of TOD clock units
for 1 microsecond */
-#ifndef CONFIG_
ARCH_S390X
+#ifndef CONFIG_
64BIT
#define APPLDATA_START_INTERVAL_REC 0x00 /* Function codes for */
#define APPLDATA_STOP_REC 0x01 /* DIAG 0xDC */
#define APPLDATA_START_INTERVAL_REC 0x00 /* Function codes for */
#define APPLDATA_STOP_REC 0x01 /* DIAG 0xDC */
@@
-54,13
+54,13
@@
#define APPLDATA_GEN_EVENT_RECORD 0x82
#define APPLDATA_START_CONFIG_REC 0x83
#define APPLDATA_GEN_EVENT_RECORD 0x82
#define APPLDATA_START_CONFIG_REC 0x83
-#endif /* CONFIG_
ARCH_S390X
*/
+#endif /* CONFIG_
64BIT
*/
/*
* Parameter list for DIAGNOSE X'DC'
*/
/*
* Parameter list for DIAGNOSE X'DC'
*/
-#ifndef CONFIG_
ARCH_S390X
+#ifndef CONFIG_
64BIT
struct appldata_parameter_list {
u16 diag; /* The DIAGNOSE code X'00DC' */
u8 function; /* The function code for the DIAGNOSE */
struct appldata_parameter_list {
u16 diag; /* The DIAGNOSE code X'00DC' */
u8 function; /* The function code for the DIAGNOSE */
@@
-82,7
+82,7
@@
struct appldata_parameter_list {
u64 product_id_addr;
u64 buffer_addr;
};
u64 product_id_addr;
u64 buffer_addr;
};
-#endif /* CONFIG_
ARCH_S390X
*/
+#endif /* CONFIG_
64BIT
*/
/*
* /proc entries (sysctl)
/*
* /proc entries (sysctl)
@@
-232,7
+232,11
@@
static int appldata_diag(char record_nr, u16 function, unsigned long buffer,
ry = -1;
asm volatile(
"diag %1,%0,0xDC\n\t"
ry = -1;
asm volatile(
"diag %1,%0,0xDC\n\t"
- : "=d" (ry) : "d" (&(appldata_parameter_list)) : "cc");
+ : "=d" (ry)
+ : "d" (&appldata_parameter_list),
+ "m" (appldata_parameter_list),
+ "m" (appldata_product_id)
+ : "cc");
return (int) ry;
}
/************************ timer, work, DIAG <END> ****************************/
return (int) ry;
}
/************************ timer, work, DIAG <END> ****************************/
@@
-527,12
+531,11
@@
int appldata_register_ops(struct appldata_ops *ops)
P_ERROR("ctl_nr %i already in use!\n", ops->ctl_nr);
return -EBUSY;
}
P_ERROR("ctl_nr %i already in use!\n", ops->ctl_nr);
return -EBUSY;
}
- ops->ctl_table = k
m
alloc(4*sizeof(struct ctl_table), GFP_KERNEL);
+ ops->ctl_table = k
z
alloc(4*sizeof(struct ctl_table), GFP_KERNEL);
if (ops->ctl_table == NULL) {
P_ERROR("Not enough memory for %s ctl_table!\n", ops->name);
return -ENOMEM;
}
if (ops->ctl_table == NULL) {
P_ERROR("Not enough memory for %s ctl_table!\n", ops->name);
return -ENOMEM;
}
- memset(ops->ctl_table, 0, 4*sizeof(struct ctl_table));
spin_lock(&appldata_ops_lock);
list_for_each(lh, &appldata_ops_list) {
spin_lock(&appldata_ops_lock);
list_for_each(lh, &appldata_ops_list) {
@@
-588,12
+591,15
@@
int appldata_register_ops(struct appldata_ops *ops)
*/
void appldata_unregister_ops(struct appldata_ops *ops)
{
*/
void appldata_unregister_ops(struct appldata_ops *ops)
{
+ void *table;
spin_lock(&appldata_ops_lock);
spin_lock(&appldata_ops_lock);
- unregister_sysctl_table(ops->sysctl_header);
list_del(&ops->list);
list_del(&ops->list);
- kfree(ops->ctl_table);
+ /* at that point any incoming access will fail */
+ table = ops->ctl_table;
ops->ctl_table = NULL;
spin_unlock(&appldata_ops_lock);
ops->ctl_table = NULL;
spin_unlock(&appldata_ops_lock);
+ unregister_sysctl_table(ops->sysctl_header);
+ kfree(table);
P_INFO("%s-ops unregistered!\n", ops->name);
}
/********************** module-ops management <END> **************************/
P_INFO("%s-ops unregistered!\n", ops->name);
}
/********************** module-ops management <END> **************************/
@@
-646,7
+652,7
@@
appldata_cpu_notify(struct notifier_block *self,
return NOTIFY_OK;
}
return NOTIFY_OK;
}
-static struct notifier_block
__devinitdata
appldata_nb = {
+static struct notifier_block appldata_nb = {
.notifier_call = appldata_cpu_notify,
};
.notifier_call = appldata_cpu_notify,
};