Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 55822
b: refs/heads/master
c: 71b43ca
h: refs/heads/master
v: v3
  • Loading branch information
Len Brown committed May 10, 2007
1 parent 8f5eb1e commit 764c241
Show file tree
Hide file tree
Showing 64 changed files with 11,954 additions and 321 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd3509436fde38d4c854bf5a6b83d2c779904f8e
refs/heads/master: 71b43ca46fc5f0588ef64a14c6133c19a9b3f1ea
104 changes: 2 additions & 102 deletions trunk/drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@
#define ACPI_THERMAL_NOTIFY_CRITICAL 0xF0
#define ACPI_THERMAL_NOTIFY_HOT 0xF1
#define ACPI_THERMAL_MODE_ACTIVE 0x00
#define ACPI_THERMAL_MODE_PASSIVE 0x01
#define ACPI_THERMAL_MODE_CRITICAL 0xff
#define ACPI_THERMAL_PATH_POWEROFF "/sbin/poweroff"

#define ACPI_THERMAL_MAX_ACTIVE 10
Expand All @@ -86,9 +84,6 @@ static int acpi_thermal_resume(struct acpi_device *device);
static int acpi_thermal_state_open_fs(struct inode *inode, struct file *file);
static int acpi_thermal_temp_open_fs(struct inode *inode, struct file *file);
static int acpi_thermal_trip_open_fs(struct inode *inode, struct file *file);
static ssize_t acpi_thermal_write_trip_points(struct file *,
const char __user *, size_t,
loff_t *);
static int acpi_thermal_cooling_open_fs(struct inode *inode, struct file *file);
static ssize_t acpi_thermal_write_cooling_mode(struct file *,
const char __user *, size_t,
Expand Down Expand Up @@ -167,7 +162,6 @@ struct acpi_thermal {
unsigned long temperature;
unsigned long last_temperature;
unsigned long polling_frequency;
u8 cooling_mode;
volatile u8 zombie;
struct acpi_thermal_flags flags;
struct acpi_thermal_state state;
Expand All @@ -193,7 +187,6 @@ static const struct file_operations acpi_thermal_temp_fops = {
static const struct file_operations acpi_thermal_trip_fops = {
.open = acpi_thermal_trip_open_fs,
.read = seq_read,
.write = acpi_thermal_write_trip_points,
.llseek = seq_lseek,
.release = single_release,
};
Expand Down Expand Up @@ -297,11 +290,6 @@ static int acpi_thermal_set_cooling_mode(struct acpi_thermal *tz, int mode)
if (ACPI_FAILURE(status))
return -ENODEV;

tz->cooling_mode = mode;

ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Cooling mode [%s]\n",
mode ? "passive" : "active"));

return 0;
}

Expand Down Expand Up @@ -889,67 +877,6 @@ static int acpi_thermal_trip_open_fs(struct inode *inode, struct file *file)
return single_open(file, acpi_thermal_trip_seq_show, PDE(inode)->data);
}

static ssize_t
acpi_thermal_write_trip_points(struct file *file,
const char __user * buffer,
size_t count, loff_t * ppos)
{
struct seq_file *m = file->private_data;
struct acpi_thermal *tz = m->private;

char *limit_string;
int num, critical, hot, passive;
int *active;
int i = 0;


limit_string = kzalloc(ACPI_THERMAL_MAX_LIMIT_STR_LEN, GFP_KERNEL);
if (!limit_string)
return -ENOMEM;

active = kmalloc(ACPI_THERMAL_MAX_ACTIVE * sizeof(int), GFP_KERNEL);
if (!active) {
kfree(limit_string);
return -ENOMEM;
}

if (!tz || (count > ACPI_THERMAL_MAX_LIMIT_STR_LEN - 1)) {
count = -EINVAL;
goto end;
}

if (copy_from_user(limit_string, buffer, count)) {
count = -EFAULT;
goto end;
}

limit_string[count] = '\0';

num = sscanf(limit_string, "%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d",
&critical, &hot, &passive,
&active[0], &active[1], &active[2], &active[3], &active[4],
&active[5], &active[6], &active[7], &active[8],
&active[9]);
if (!(num >= 5 && num < (ACPI_THERMAL_MAX_ACTIVE + 3))) {
count = -EINVAL;
goto end;
}

tz->trips.critical.temperature = CELSIUS_TO_KELVIN(critical);
tz->trips.hot.temperature = CELSIUS_TO_KELVIN(hot);
tz->trips.passive.temperature = CELSIUS_TO_KELVIN(passive);
for (i = 0; i < num - 3; i++) {
if (!(tz->trips.active[i].flags.valid))
break;
tz->trips.active[i].temperature = CELSIUS_TO_KELVIN(active[i]);
}

end:
kfree(active);
kfree(limit_string);
return count;
}

static int acpi_thermal_cooling_seq_show(struct seq_file *seq, void *offset)
{
struct acpi_thermal *tz = seq->private;
Expand All @@ -958,15 +885,10 @@ static int acpi_thermal_cooling_seq_show(struct seq_file *seq, void *offset)
if (!tz)
goto end;

if (!tz->flags.cooling_mode) {
if (!tz->flags.cooling_mode)
seq_puts(seq, "<setting not supported>\n");
}

if (tz->cooling_mode == ACPI_THERMAL_MODE_CRITICAL)
seq_printf(seq, "cooling mode: critical\n");
else
seq_printf(seq, "cooling mode: %s\n",
tz->cooling_mode ? "passive" : "active");
seq_puts(seq, "0 - Active; 1 - Passive\n");

end:
return 0;
Expand Down Expand Up @@ -1223,28 +1145,6 @@ static int acpi_thermal_get_info(struct acpi_thermal *tz)
result = acpi_thermal_set_cooling_mode(tz, ACPI_THERMAL_MODE_ACTIVE);
if (!result)
tz->flags.cooling_mode = 1;
else {
/* Oh,we have not _SCP method.
Generally show cooling_mode by _ACx, _PSV,spec 12.2 */
tz->flags.cooling_mode = 0;
if (tz->trips.active[0].flags.valid
&& tz->trips.passive.flags.valid) {
if (tz->trips.passive.temperature >
tz->trips.active[0].temperature)
tz->cooling_mode = ACPI_THERMAL_MODE_ACTIVE;
else
tz->cooling_mode = ACPI_THERMAL_MODE_PASSIVE;
} else if (!tz->trips.active[0].flags.valid
&& tz->trips.passive.flags.valid) {
tz->cooling_mode = ACPI_THERMAL_MODE_PASSIVE;
} else if (tz->trips.active[0].flags.valid
&& !tz->trips.passive.flags.valid) {
tz->cooling_mode = ACPI_THERMAL_MODE_ACTIVE;
} else {
/* _ACx and _PSV are optional, but _CRT is required */
tz->cooling_mode = ACPI_THERMAL_MODE_CRITICAL;
}
}

/* Get default polling frequency [_TZP] (optional) */
if (tzp)
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/infiniband/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ config INFINIBAND_USER_ACCESS
libibverbs, libibcm and a hardware driver library from
<http://www.openib.org>.

config INFINIBAND_USER_MEM
bool
depends on INFINIBAND_USER_ACCESS != n
default y

config INFINIBAND_ADDR_TRANS
bool
depends on INFINIBAND && INET
Expand All @@ -40,6 +45,8 @@ source "drivers/infiniband/hw/ehca/Kconfig"
source "drivers/infiniband/hw/amso1100/Kconfig"
source "drivers/infiniband/hw/cxgb3/Kconfig"

source "drivers/infiniband/hw/mlx4/Kconfig"

source "drivers/infiniband/ulp/ipoib/Kconfig"

source "drivers/infiniband/ulp/srp/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/infiniband/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ obj-$(CONFIG_INFINIBAND_IPATH) += hw/ipath/
obj-$(CONFIG_INFINIBAND_EHCA) += hw/ehca/
obj-$(CONFIG_INFINIBAND_AMSO1100) += hw/amso1100/
obj-$(CONFIG_INFINIBAND_CXGB3) += hw/cxgb3/
obj-$(CONFIG_MLX4_INFINIBAND) += hw/mlx4/
obj-$(CONFIG_INFINIBAND_IPOIB) += ulp/ipoib/
obj-$(CONFIG_INFINIBAND_SRP) += ulp/srp/
obj-$(CONFIG_INFINIBAND_ISER) += ulp/iser/
4 changes: 2 additions & 2 deletions trunk/drivers/infiniband/core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ obj-$(CONFIG_INFINIBAND_USER_ACCESS) += ib_uverbs.o ib_ucm.o \

ib_core-y := packer.o ud_header.o verbs.o sysfs.o \
device.o fmr_pool.o cache.o
ib_core-$(CONFIG_INFINIBAND_USER_MEM) += umem.o

ib_mad-y := mad.o smi.o agent.o mad_rmpp.o

Expand All @@ -28,5 +29,4 @@ ib_umad-y := user_mad.o

ib_ucm-y := ucm.o

ib_uverbs-y := uverbs_main.o uverbs_cmd.o uverbs_mem.o \
uverbs_marshall.o
ib_uverbs-y := uverbs_main.o uverbs_cmd.o uverbs_marshall.o
2 changes: 2 additions & 0 deletions trunk/drivers/infiniband/core/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,8 @@ static void __exit ib_core_cleanup(void)
{
ib_cache_cleanup();
ib_sysfs_cleanup();
/* Make sure that any pending umem accounting work is done. */
flush_scheduled_work();
}

module_init(ib_core_init);
Expand Down
Loading

0 comments on commit 764c241

Please sign in to comment.