* [Qemu-devel] [PATCH 09/19] block: Rename the BlockIOStatus enum values
From: Luiz Capitulino @ 2011-10-24 13:27 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, armbru, aliguori, mdroth, quintela
In-Reply-To: <1319462832-12199-1-git-send-email-lcapitulino@redhat.com>
The biggest change is to rename its prefix from BDRV_IOS to
BLOCK_DEVICE_IO_STATUS.
Next commit will convert the query-block command to the QAPI
and that's how the enumeration is going to be generated.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
block.c | 18 ++++++++++--------
block.h | 3 ++-
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/block.c b/block.c
index 04f4143..443014e 100644
--- a/block.c
+++ b/block.c
@@ -1921,10 +1921,10 @@ void bdrv_info_print(Monitor *mon, const QObject *data)
qlist_iter(qobject_to_qlist(data), bdrv_print_dict, mon);
}
-static const char *const io_status_name[BDRV_IOS_MAX] = {
- [BDRV_IOS_OK] = "ok",
- [BDRV_IOS_FAILED] = "failed",
- [BDRV_IOS_ENOSPC] = "nospace",
+static const char *const io_status_name[BLOCK_DEVICE_IO_STATUS_MAX] = {
+ [BLOCK_DEVICE_IO_STATUS_OK] = "ok",
+ [BLOCK_DEVICE_IO_STATUS_FAILED] = "failed",
+ [BLOCK_DEVICE_IO_STATUS_NOSPACE] = "nospace",
};
void bdrv_info(Monitor *mon, QObject **ret_data)
@@ -3080,7 +3080,7 @@ int bdrv_in_use(BlockDriverState *bs)
void bdrv_iostatus_enable(BlockDriverState *bs)
{
bs->iostatus_enabled = true;
- bs->iostatus = BDRV_IOS_OK;
+ bs->iostatus = BLOCK_DEVICE_IO_STATUS_OK;
}
/* The I/O status is only enabled if the drive explicitly
@@ -3101,7 +3101,7 @@ void bdrv_iostatus_disable(BlockDriverState *bs)
void bdrv_iostatus_reset(BlockDriverState *bs)
{
if (bdrv_iostatus_is_enabled(bs)) {
- bs->iostatus = BDRV_IOS_OK;
+ bs->iostatus = BLOCK_DEVICE_IO_STATUS_OK;
}
}
@@ -3110,9 +3110,11 @@ void bdrv_iostatus_reset(BlockDriverState *bs)
possible to implement this without device models being involved */
void bdrv_iostatus_set_err(BlockDriverState *bs, int error)
{
- if (bdrv_iostatus_is_enabled(bs) && bs->iostatus == BDRV_IOS_OK) {
+ if (bdrv_iostatus_is_enabled(bs) &&
+ bs->iostatus == BLOCK_DEVICE_IO_STATUS_OK) {
assert(error >= 0);
- bs->iostatus = error == ENOSPC ? BDRV_IOS_ENOSPC : BDRV_IOS_FAILED;
+ bs->iostatus = error == ENOSPC ? BLOCK_DEVICE_IO_STATUS_NOSPACE :
+ BLOCK_DEVICE_IO_STATUS_FAILED;
}
}
diff --git a/block.h b/block.h
index 9c77604..f655686 100644
--- a/block.h
+++ b/block.h
@@ -78,7 +78,8 @@ typedef enum {
} BlockMonEventAction;
typedef enum {
- BDRV_IOS_OK, BDRV_IOS_FAILED, BDRV_IOS_ENOSPC, BDRV_IOS_MAX
+ BLOCK_DEVICE_IO_STATUS_OK, BLOCK_DEVICE_IO_STATUS_FAILED,
+ BLOCK_DEVICE_IO_STATUS_NOSPACE, BLOCK_DEVICE_IO_STATUS_MAX
} BlockIOStatus;
void bdrv_iostatus_enable(BlockDriverState *bs);
--
1.7.7.1.431.g10b2a
^ permalink raw reply related
* [Qemu-devel] [PATCH 07/19] qapi: Convert query-cpus
From: Luiz Capitulino @ 2011-10-24 13:27 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, armbru, aliguori, mdroth, quintela
In-Reply-To: <1319462832-12199-1-git-send-email-lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
cpus.c | 45 ++++++++++++++++++++++++
hmp.c | 39 +++++++++++++++++++++
hmp.h | 1 +
monitor.c | 101 +-----------------------------------------------------
qapi-schema.json | 46 ++++++++++++++++++++++++
qmp-commands.hx | 6 +++
6 files changed, 138 insertions(+), 100 deletions(-)
diff --git a/cpus.c b/cpus.c
index 5f5b763..b03de67 100644
--- a/cpus.c
+++ b/cpus.c
@@ -30,6 +30,7 @@
#include "gdbstub.h"
#include "dma.h"
#include "kvm.h"
+#include "qmp-commands.h"
#include "qemu-thread.h"
#include "cpus.h"
@@ -1031,3 +1032,47 @@ void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg)
cpu_list(f, cpu_fprintf); /* deprecated */
#endif
}
+
+CpuInfoList *qmp_query_cpus(Error **errp)
+{
+ CpuInfoList *head = NULL, *cur_item = NULL;
+ CPUState *env;
+
+ for(env = first_cpu; env != NULL; env = env->next_cpu) {
+ CpuInfoList *info;
+
+ cpu_synchronize_state(env);
+
+ info = g_malloc0(sizeof(*info));
+ info->value = g_malloc0(sizeof(*info->value));
+ info->value->CPU = env->cpu_index;
+ info->value->current = (env == first_cpu);
+ info->value->halted = env->halted;
+ info->value->thread_id = env->thread_id;
+#if defined(TARGET_I386)
+ info->value->has_pc = true;
+ info->value->pc = env->eip + env->segs[R_CS].base;
+#elif defined(TARGET_PPC)
+ info->value->has_nip = true;
+ info->value->nip = env->nip;
+#elif defined(TARGET_SPARC)
+ info->value->has_pc = true;
+ info->value->pc = env->pc;
+ info->value->has_npc = true;
+ info->value->npc = env->npc;
+#elif defined(TARGET_MIPS)
+ info->value->has_PC = true;
+ info->value->PC = env->active_tc.PC;
+#endif
+
+ /* XXX: waiting for the qapi to support GSList */
+ if (!cur_item) {
+ head = cur_item = info;
+ } else {
+ cur_item->next = info;
+ cur_item = info;
+ }
+ }
+
+ return head;
+}
diff --git a/hmp.c b/hmp.c
index 35b0ca0..172fe9c 100644
--- a/hmp.c
+++ b/hmp.c
@@ -145,6 +145,45 @@ void hmp_info_migrate(Monitor *mon)
qapi_free_MigrationInfo(info);
}
+void hmp_info_cpus(Monitor *mon)
+{
+ CpuInfoList *cpu_list, *cpu;
+
+ cpu_list = qmp_query_cpus(NULL);
+
+ for (cpu = cpu_list; cpu; cpu = cpu->next) {
+ int active = ' ';
+
+ if (cpu->value->CPU == monitor_get_cpu_index()) {
+ active = '*';
+ }
+
+ monitor_printf(mon, "%c CPU #%" PRId64 ": ", active, cpu->value->CPU);
+
+ if (cpu->value->has_pc) {
+ monitor_printf(mon, "pc=0x%016" PRIx64, cpu->value->pc);
+ }
+ if (cpu->value->has_nip) {
+ monitor_printf(mon, "nip=0x%016" PRIx64, cpu->value->nip);
+ }
+ if (cpu->value->has_npc) {
+ monitor_printf(mon, "pc=0x%016" PRIx64, cpu->value->pc);
+ monitor_printf(mon, "npc=0x%016" PRIx64, cpu->value->npc);
+ }
+ if (cpu->value->has_PC) {
+ monitor_printf(mon, "PC=0x%016" PRIx64, cpu->value->PC);
+ }
+
+ if (cpu->value->halted) {
+ monitor_printf(mon, " (halted)");
+ }
+
+ monitor_printf(mon, " thread_id=%" PRId64 "\n", cpu->value->thread_id);
+ }
+
+ qapi_free_CpuInfoList(cpu_list);
+}
+
void hmp_quit(Monitor *mon, const QDict *qdict)
{
monitor_suspend(mon);
diff --git a/hmp.h b/hmp.h
index 9322b7f..d9a83eb 100644
--- a/hmp.h
+++ b/hmp.h
@@ -25,6 +25,7 @@ void hmp_info_uuid(Monitor *mon);
void hmp_info_chardev(Monitor *mon);
void hmp_info_mice(Monitor *mon);
void hmp_info_migrate(Monitor *mon);
+void hmp_info_cpus(Monitor *mon);
void hmp_quit(Monitor *mon, const QDict *qdict);
void hmp_stop(Monitor *mon, const QDict *qdict);
void hmp_system_reset(Monitor *mon, const QDict *qdict);
diff --git a/monitor.c b/monitor.c
index 1edb646..2f49c74 100644
--- a/monitor.c
+++ b/monitor.c
@@ -812,96 +812,6 @@ static void do_info_registers(Monitor *mon)
#endif
}
-static void print_cpu_iter(QObject *obj, void *opaque)
-{
- QDict *cpu;
- int active = ' ';
- Monitor *mon = opaque;
-
- assert(qobject_type(obj) == QTYPE_QDICT);
- cpu = qobject_to_qdict(obj);
-
- if (qdict_get_bool(cpu, "current")) {
- active = '*';
- }
-
- monitor_printf(mon, "%c CPU #%d: ", active, (int)qdict_get_int(cpu, "CPU"));
-
-#if defined(TARGET_I386)
- monitor_printf(mon, "pc=0x" TARGET_FMT_lx,
- (target_ulong) qdict_get_int(cpu, "pc"));
-#elif defined(TARGET_PPC)
- monitor_printf(mon, "nip=0x" TARGET_FMT_lx,
- (target_long) qdict_get_int(cpu, "nip"));
-#elif defined(TARGET_SPARC)
- monitor_printf(mon, "pc=0x" TARGET_FMT_lx,
- (target_long) qdict_get_int(cpu, "pc"));
- monitor_printf(mon, "npc=0x" TARGET_FMT_lx,
- (target_long) qdict_get_int(cpu, "npc"));
-#elif defined(TARGET_MIPS)
- monitor_printf(mon, "PC=0x" TARGET_FMT_lx,
- (target_long) qdict_get_int(cpu, "PC"));
-#endif
-
- if (qdict_get_bool(cpu, "halted")) {
- monitor_printf(mon, " (halted)");
- }
-
- monitor_printf(mon, " thread_id=%" PRId64 " ",
- qdict_get_int(cpu, "thread_id"));
-
- monitor_printf(mon, "\n");
-}
-
-static void monitor_print_cpus(Monitor *mon, const QObject *data)
-{
- QList *cpu_list;
-
- assert(qobject_type(data) == QTYPE_QLIST);
- cpu_list = qobject_to_qlist(data);
- qlist_iter(cpu_list, print_cpu_iter, mon);
-}
-
-static void do_info_cpus(Monitor *mon, QObject **ret_data)
-{
- CPUState *env;
- QList *cpu_list;
-
- cpu_list = qlist_new();
-
- /* just to set the default cpu if not already done */
- mon_get_cpu();
-
- for(env = first_cpu; env != NULL; env = env->next_cpu) {
- QDict *cpu;
- QObject *obj;
-
- cpu_synchronize_state(env);
-
- obj = qobject_from_jsonf("{ 'CPU': %d, 'current': %i, 'halted': %i }",
- env->cpu_index, env == mon->mon_cpu,
- env->halted);
-
- cpu = qobject_to_qdict(obj);
-
-#if defined(TARGET_I386)
- qdict_put(cpu, "pc", qint_from_int(env->eip + env->segs[R_CS].base));
-#elif defined(TARGET_PPC)
- qdict_put(cpu, "nip", qint_from_int(env->nip));
-#elif defined(TARGET_SPARC)
- qdict_put(cpu, "pc", qint_from_int(env->pc));
- qdict_put(cpu, "npc", qint_from_int(env->npc));
-#elif defined(TARGET_MIPS)
- qdict_put(cpu, "PC", qint_from_int(env->active_tc.PC));
-#endif
- qdict_put(cpu, "thread_id", qint_from_int(env->thread_id));
-
- qlist_append(cpu_list, cpu);
- }
-
- *ret_data = QOBJECT(cpu_list);
-}
-
static void do_info_jit(Monitor *mon)
{
dump_exec_info((FILE *)mon, monitor_fprintf);
@@ -2787,8 +2697,7 @@ static const mon_cmd_t info_cmds[] = {
.args_type = "",
.params = "",
.help = "show infos for each CPU",
- .user_print = monitor_print_cpus,
- .mhandler.info_new = do_info_cpus,
+ .mhandler.info = hmp_info_cpus,
},
{
.name = "history",
@@ -3068,14 +2977,6 @@ static const mon_cmd_t qmp_query_cmds[] = {
.mhandler.info_new = bdrv_info_stats,
},
{
- .name = "cpus",
- .args_type = "",
- .params = "",
- .help = "show infos for each CPU",
- .user_print = monitor_print_cpus,
- .mhandler.info_new = do_info_cpus,
- },
- {
.name = "pci",
.args_type = "",
.params = "",
diff --git a/qapi-schema.json b/qapi-schema.json
index e4cf6da..a1bf90d 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -306,6 +306,52 @@
{ 'command': 'query-mice', 'returns': ['MouseInfo'] }
##
+# @CpuInfo:
+#
+# Information about a virtual CPU
+#
+# @CPU: the index of the virtual CPU
+#
+# @current: this only exists for backwards compatible and should be ignored
+#
+# @halted: true if the virtual CPU is in the halt state. Halt usually refers
+# to a processor specific low power mode.
+#
+# @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
+# pointer.
+# If the target is Sparc, this is the PC component of the
+# instruction pointer.
+#
+# @nip: #optional If the target is PPC, the instruction pointer
+#
+# @npc: #optional If the target is Sparc, the NPC component of the instruction
+# pointer
+#
+# @PC: #optional If the target is MIPS, the instruction pointer
+#
+# @thread_id: ID of the underlying host thread
+#
+# Since: 0.14.0
+#
+# Notes: @halted is a transient state that changes frequently. By the time the
+# data is sent to the client, the guest may no longer be halted.
+##
+{ 'type': 'CpuInfo',
+ 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
+ '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
+
+##
+# @query-cpus:
+#
+# Returns a list of information about each virtual CPU.
+#
+# Returns: a list of @CpuInfo for each virtual CPU
+#
+# Since: 0.14.0
+##
+{ 'command': 'query-cpus', 'returns': ['CpuInfo'] }
+
+##
# @quit:
#
# This command will cause the QEMU process to exit gracefully. While every
diff --git a/qmp-commands.hx b/qmp-commands.hx
index dcca53c..434ce6c 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -1347,6 +1347,12 @@ Example:
EQMP
+ {
+ .name = "query-cpus",
+ .args_type = "",
+ .mhandler.cmd_new = qmp_marshal_input_query_cpus,
+ },
+
SQMP
query-pci
---------
--
1.7.7.1.431.g10b2a
^ permalink raw reply related
* [Qemu-devel] [PATCH 05/19] Monitor: Introduce monitor_get_cpu_index()
From: Luiz Capitulino @ 2011-10-24 13:26 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, armbru, aliguori, mdroth, quintela
In-Reply-To: <1319462832-12199-1-git-send-email-lcapitulino@redhat.com>
Returns 'cur_mons's CPU index. A future commit will use it.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
monitor.c | 5 +++++
monitor.h | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/monitor.c b/monitor.c
index 3f99ea0..3e1cd33 100644
--- a/monitor.c
+++ b/monitor.c
@@ -794,6 +794,11 @@ static CPUState *mon_get_cpu(void)
return cur_mon->mon_cpu;
}
+int monitor_get_cpu_index(void)
+{
+ return mon_get_cpu()->cpu_index;
+}
+
static void do_info_registers(Monitor *mon)
{
CPUState *env;
diff --git a/monitor.h b/monitor.h
index 9b723b2..e76795f 100644
--- a/monitor.h
+++ b/monitor.h
@@ -58,6 +58,7 @@ void monitor_printf(Monitor *mon, const char *fmt, ...) GCC_FMT_ATTR(2, 3);
void monitor_print_filename(Monitor *mon, const char *filename);
void monitor_flush(Monitor *mon);
int monitor_set_cpu(int cpu_index);
+int monitor_get_cpu_index(void);
typedef void (MonitorCompletion)(void *opaque, QObject *ret_data);
--
1.7.7.1.431.g10b2a
^ permalink raw reply related
* [Qemu-devel] [PATCH 03/19] qapi: Convert query-migrate
From: Luiz Capitulino @ 2011-10-24 13:26 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, armbru, aliguori, mdroth, quintela
In-Reply-To: <1319462832-12199-1-git-send-email-lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
hmp.c | 31 ++++++++++++++++++++
hmp.h | 1 +
migration.c | 82 +++++++++++++++--------------------------------------
monitor.c | 11 +------
qapi-schema.json | 50 +++++++++++++++++++++++++++++++++
qmp-commands.hx | 6 ++++
6 files changed, 112 insertions(+), 69 deletions(-)
diff --git a/hmp.c b/hmp.c
index 9c6d896..619b8ba 100644
--- a/hmp.c
+++ b/hmp.c
@@ -114,6 +114,37 @@ void hmp_info_mice(Monitor *mon)
qapi_free_MouseInfoList(mice_list);
}
+void hmp_info_migrate(Monitor *mon)
+{
+ MigrationInfo *info;
+
+ info = qmp_query_migrate(NULL);
+
+ if (info->has_status) {
+ monitor_printf(mon, "Migration status: %s\n", info->status);
+ }
+
+ if (info->has_ram) {
+ monitor_printf(mon, "transferred ram: %" PRIu64 " kbytes\n",
+ info->ram->transferred >> 10);
+ monitor_printf(mon, "remaining ram: %" PRIu64 " kbytes\n",
+ info->ram->remaining >> 10);
+ monitor_printf(mon, "total ram: %" PRIu64 " kbytes\n",
+ info->ram->total >> 10);
+ }
+
+ if (info->has_disk) {
+ monitor_printf(mon, "transferred disk: %" PRIu64 " kbytes\n",
+ info->disk->transferred >> 10);
+ monitor_printf(mon, "remaining disk: %" PRIu64 " kbytes\n",
+ info->disk->remaining >> 10);
+ monitor_printf(mon, "total disk: %" PRIu64 " kbytes\n",
+ info->disk->total >> 10);
+ }
+
+ qapi_free_MigrationInfo(info);
+}
+
void hmp_quit(Monitor *mon, const QDict *qdict)
{
monitor_suspend(mon);
diff --git a/hmp.h b/hmp.h
index 4e6697d..49d9662 100644
--- a/hmp.h
+++ b/hmp.h
@@ -24,6 +24,7 @@ void hmp_info_status(Monitor *mon);
void hmp_info_uuid(Monitor *mon);
void hmp_info_chardev(Monitor *mon);
void hmp_info_mice(Monitor *mon);
+void hmp_info_migrate(Monitor *mon);
void hmp_quit(Monitor *mon, const QDict *qdict);
void hmp_stop(Monitor *mon, const QDict *qdict);
void hmp_system_reset(Monitor *mon, const QDict *qdict);
diff --git a/migration.c b/migration.c
index bdca72e..6c70f72 100644
--- a/migration.c
+++ b/migration.c
@@ -19,7 +19,7 @@
#include "block.h"
#include "qemu_socket.h"
#include "block-migration.h"
-#include "qemu-objects.h"
+#include "qmp-commands.h"
//#define DEBUG_MIGRATION
@@ -107,53 +107,9 @@ uint64_t migrate_max_downtime(void)
return max_downtime;
}
-static void migrate_print_status(Monitor *mon, const char *name,
- const QDict *status_dict)
+MigrationInfo *qmp_query_migrate(Error **errp)
{
- QDict *qdict;
-
- qdict = qobject_to_qdict(qdict_get(status_dict, name));
-
- monitor_printf(mon, "transferred %s: %" PRIu64 " kbytes\n", name,
- qdict_get_int(qdict, "transferred") >> 10);
- monitor_printf(mon, "remaining %s: %" PRIu64 " kbytes\n", name,
- qdict_get_int(qdict, "remaining") >> 10);
- monitor_printf(mon, "total %s: %" PRIu64 " kbytes\n", name,
- qdict_get_int(qdict, "total") >> 10);
-}
-
-void do_info_migrate_print(Monitor *mon, const QObject *data)
-{
- QDict *qdict;
-
- qdict = qobject_to_qdict(data);
-
- monitor_printf(mon, "Migration status: %s\n",
- qdict_get_str(qdict, "status"));
-
- if (qdict_haskey(qdict, "ram")) {
- migrate_print_status(mon, "ram", qdict);
- }
-
- if (qdict_haskey(qdict, "disk")) {
- migrate_print_status(mon, "disk", qdict);
- }
-}
-
-static void migrate_put_status(QDict *qdict, const char *name,
- uint64_t trans, uint64_t rem, uint64_t total)
-{
- QObject *obj;
-
- obj = qobject_from_jsonf("{ 'transferred': %" PRId64 ", "
- "'remaining': %" PRId64 ", "
- "'total': %" PRId64 " }", trans, rem, total);
- qdict_put_obj(qdict, name, obj);
-}
-
-void do_info_migrate(Monitor *mon, QObject **ret_data)
-{
- QDict *qdict;
+ MigrationInfo *info = g_malloc0(sizeof(*info));
MigrationState *s = migrate_get_current();
switch (s->state) {
@@ -161,30 +117,38 @@ void do_info_migrate(Monitor *mon, QObject **ret_data)
/* no migration has happened ever */
break;
case MIG_STATE_ACTIVE:
- qdict = qdict_new();
- qdict_put(qdict, "status", qstring_from_str("active"));
+ info->has_status = true;
+ info->status = g_strdup("active");
- migrate_put_status(qdict, "ram", ram_bytes_transferred(),
- ram_bytes_remaining(), ram_bytes_total());
+ info->has_ram = true;
+ info->ram = g_malloc0(sizeof(*info->ram));
+ info->ram->transferred = ram_bytes_transferred();
+ info->ram->remaining = ram_bytes_remaining();
+ info->ram->total = ram_bytes_total();
if (blk_mig_active()) {
- migrate_put_status(qdict, "disk", blk_mig_bytes_transferred(),
- blk_mig_bytes_remaining(),
- blk_mig_bytes_total());
+ info->has_disk = true;
+ info->disk = g_malloc0(sizeof(*info->disk));
+ info->disk->transferred = blk_mig_bytes_transferred();
+ info->disk->remaining = blk_mig_bytes_remaining();
+ info->disk->total = blk_mig_bytes_total();
}
-
- *ret_data = QOBJECT(qdict);
break;
case MIG_STATE_COMPLETED:
- *ret_data = qobject_from_jsonf("{ 'status': 'completed' }");
+ info->has_status = true;
+ info->status = g_strdup("completed");
break;
case MIG_STATE_ERROR:
- *ret_data = qobject_from_jsonf("{ 'status': 'failed' }");
+ info->has_status = true;
+ info->status = g_strdup("failed");
break;
case MIG_STATE_CANCELLED:
- *ret_data = qobject_from_jsonf("{ 'status': 'cancelled' }");
+ info->has_status = true;
+ info->status = g_strdup("cancelled");
break;
}
+
+ return info;
}
/* shared migration helpers */
diff --git a/monitor.c b/monitor.c
index d95abce..ea5ccd8 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2999,8 +2999,7 @@ static const mon_cmd_t info_cmds[] = {
.args_type = "",
.params = "",
.help = "show migration status",
- .user_print = do_info_migrate_print,
- .mhandler.info_new = do_info_migrate,
+ .mhandler.info = hmp_info_migrate,
},
{
.name = "balloon",
@@ -3110,14 +3109,6 @@ static const mon_cmd_t qmp_query_cmds[] = {
},
#endif
{
- .name = "migrate",
- .args_type = "",
- .params = "",
- .help = "show migration status",
- .user_print = do_info_migrate_print,
- .mhandler.info_new = do_info_migrate,
- },
- {
.name = "balloon",
.args_type = "",
.params = "",
diff --git a/qapi-schema.json b/qapi-schema.json
index 3175c82..eb155b4 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -226,6 +226,56 @@
{ 'command': 'query-commands', 'returns': ['CommandInfo'] }
##
+# @MigrationStats
+#
+# Detailed migration status.
+#
+# @transferred: amount of bytes already transferred to the target VM
+#
+# @remaining: amount of bytes remaining to be transferred to the target VM
+#
+# @total: total amount of bytes involved in the migration process
+#
+# Since: 0.14.0.
+##
+{ 'type': 'MigrationStats',
+ 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' } }
+
+##
+# @MigrationInfo
+#
+# Information about current migration process.
+#
+# @status: #optional string describing the current migration status.
+# As of 0.14.0 this can be 'active', 'completed', 'failed' or
+# 'cancelled'. If this field is not returned, no migration process
+# has been initiated
+#
+# @ram: #optional @MigrationStats containing detailed migration status,
+# only returned if status is 'active'
+#
+# @disk: #optional @MigrationStats containing detailed disk migration
+# status, only returned if status is 'active' and it is a block
+# migration
+#
+# Since: 0.14.0
+##
+{ 'type': 'MigrationInfo',
+ 'data': {'*status': 'str', '*ram': 'MigrationStats',
+ '*disk': 'MigrationStats'} }
+
+##
+# @query-migrate
+#
+# Returns information about current migration process.
+#
+# Returns: @MigrationInfo
+#
+# Since: 0.14.0
+##
+{ 'command': 'query-migrate', 'returns': 'MigrationInfo' }
+
+##
# @MouseInfo:
#
# Information about a mouse device.
diff --git a/qmp-commands.hx b/qmp-commands.hx
index c535560..8efdb25 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -1919,6 +1919,12 @@ Examples:
EQMP
+ {
+ .name = "query-migrate",
+ .args_type = "",
+ .mhandler.cmd_new = qmp_marshal_input_query_migrate,
+ },
+
SQMP
query-balloon
-------------
--
1.7.7.1.431.g10b2a
^ permalink raw reply related
* [Qemu-devel] [PATCH 01/19] qapi-commands.py: Don't call the output marshal on error
From: Luiz Capitulino @ 2011-10-24 13:26 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, armbru, aliguori, mdroth, quintela
In-Reply-To: <1319462832-12199-1-git-send-email-lcapitulino@redhat.com>
Today we generate something like this:
int qmp_marshal_input_query_foo(...)
...
retval = qmp_query_foo(errp);
qmp_marshal_output_query_foo(retval, ret, errp);
...
However, if qmp_query_foo() fails 'retval' will probably be NULL,
which can cause a segfault as not all visitors check if 'retval'
is valid.
This commit fixes that by changing the code generator to only
call the output marshal if qmp_query_foo() succeeds, like this:
retval = qmp_query_foo(errp);
if (!error_is_set(errp)) {
qmp_marshal_output_query_foo(retval, ret, errp);
}
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
scripts/qapi-commands.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index c947ba4..f7def16 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qapi-commands.py
@@ -62,7 +62,9 @@ def gen_sync_call(name, args, ret_type, indent=0):
name=c_var(name), args=arglist, retval=retval).rstrip()
if ret_type:
ret += "\n" + mcgen(''''
-%(marshal_output_call)s
+if (!error_is_set(errp)) {
+ %(marshal_output_call)s
+}
''',
marshal_output_call=gen_marshal_output_call(name, ret_type)).rstrip()
pop_indent(indent)
--
1.7.7.1.431.g10b2a
^ permalink raw reply related
* [Qemu-devel] [PATCH 02/19] qapi: Convert query-mice
From: Luiz Capitulino @ 2011-10-24 13:26 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, armbru, aliguori, mdroth, quintela
In-Reply-To: <1319462832-12199-1-git-send-email-lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
hmp.c | 20 ++++++++++++++++
hmp.h | 1 +
input.c | 64 +++++++++++++----------------------------------------
monitor.c | 11 +--------
qapi-schema.json | 30 +++++++++++++++++++++++++
qmp-commands.hx | 6 +++++
6 files changed, 74 insertions(+), 58 deletions(-)
diff --git a/hmp.c b/hmp.c
index 34416fc..9c6d896 100644
--- a/hmp.c
+++ b/hmp.c
@@ -94,6 +94,26 @@ void hmp_info_chardev(Monitor *mon)
qapi_free_ChardevInfoList(char_info);
}
+void hmp_info_mice(Monitor *mon)
+{
+ MouseInfoList *mice_list, *mouse;
+
+ mice_list = qmp_query_mice(NULL);
+ if (!mice_list) {
+ monitor_printf(mon, "No mouse devices connected\n");
+ return;
+ }
+
+ for (mouse = mice_list; mouse; mouse = mouse->next) {
+ monitor_printf(mon, "%c Mouse #%" PRId64 ": %s%s\n",
+ mouse->value->current ? '*' : ' ',
+ mouse->value->index, mouse->value->name,
+ mouse->value->absolute ? " (absolute)" : "");
+ }
+
+ qapi_free_MouseInfoList(mice_list);
+}
+
void hmp_quit(Monitor *mon, const QDict *qdict)
{
monitor_suspend(mon);
diff --git a/hmp.h b/hmp.h
index 92433cf..4e6697d 100644
--- a/hmp.h
+++ b/hmp.h
@@ -23,6 +23,7 @@ void hmp_info_kvm(Monitor *mon);
void hmp_info_status(Monitor *mon);
void hmp_info_uuid(Monitor *mon);
void hmp_info_chardev(Monitor *mon);
+void hmp_info_mice(Monitor *mon);
void hmp_quit(Monitor *mon, const QDict *qdict);
void hmp_stop(Monitor *mon, const QDict *qdict);
void hmp_system_reset(Monitor *mon, const QDict *qdict);
diff --git a/input.c b/input.c
index e2f7c92..9ade63f 100644
--- a/input.c
+++ b/input.c
@@ -26,7 +26,8 @@
#include "net.h"
#include "monitor.h"
#include "console.h"
-#include "qjson.h"
+#include "error.h"
+#include "qmp-commands.h"
static QEMUPutKBDEvent *qemu_put_kbd_event;
static void *qemu_put_kbd_event_opaque;
@@ -211,60 +212,27 @@ int kbd_mouse_has_absolute(void)
return 0;
}
-static void info_mice_iter(QObject *data, void *opaque)
-{
- QDict *mouse;
- Monitor *mon = opaque;
-
- mouse = qobject_to_qdict(data);
- monitor_printf(mon, "%c Mouse #%" PRId64 ": %s%s\n",
- (qdict_get_bool(mouse, "current") ? '*' : ' '),
- qdict_get_int(mouse, "index"), qdict_get_str(mouse, "name"),
- qdict_get_bool(mouse, "absolute") ? " (absolute)" : "");
-}
-
-void do_info_mice_print(Monitor *mon, const QObject *data)
-{
- QList *mice_list;
-
- mice_list = qobject_to_qlist(data);
- if (qlist_empty(mice_list)) {
- monitor_printf(mon, "No mouse devices connected\n");
- return;
- }
-
- qlist_iter(mice_list, info_mice_iter, mon);
-}
-
-void do_info_mice(Monitor *mon, QObject **ret_data)
+MouseInfoList *qmp_query_mice(Error **errp)
{
+ MouseInfoList *mice_list = NULL;
QEMUPutMouseEntry *cursor;
- QList *mice_list;
- int current;
-
- mice_list = qlist_new();
+ bool current = true;
- if (QTAILQ_EMPTY(&mouse_handlers)) {
- goto out;
- }
+ QTAILQ_FOREACH(cursor, &mouse_handlers, node) {
+ MouseInfoList *info = g_malloc0(sizeof(*info));
+ info->value = g_malloc0(sizeof(*info->value));
+ info->value->name = g_strdup(cursor->qemu_put_mouse_event_name);
+ info->value->index = cursor->index;
+ info->value->absolute = !!cursor->qemu_put_mouse_event_absolute;
+ info->value->current = current;
- current = QTAILQ_FIRST(&mouse_handlers)->index;
+ current = false;
- QTAILQ_FOREACH(cursor, &mouse_handlers, node) {
- QObject *obj;
- obj = qobject_from_jsonf("{ 'name': %s,"
- " 'index': %d,"
- " 'current': %i,"
- " 'absolute': %i }",
- cursor->qemu_put_mouse_event_name,
- cursor->index,
- cursor->index == current,
- !!cursor->qemu_put_mouse_event_absolute);
- qlist_append_obj(mice_list, obj);
+ info->next = mice_list;
+ mice_list = info;
}
-out:
- *ret_data = QOBJECT(mice_list);
+ return mice_list;
}
void do_mouse_set(Monitor *mon, const QDict *qdict)
diff --git a/monitor.c b/monitor.c
index ffda0fe..d95abce 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2942,8 +2942,7 @@ static const mon_cmd_t info_cmds[] = {
.args_type = "",
.params = "",
.help = "show which guest mouse is receiving events",
- .user_print = do_info_mice_print,
- .mhandler.info_new = do_info_mice,
+ .mhandler.info = hmp_info_mice,
},
{
.name = "vnc",
@@ -3093,14 +3092,6 @@ static const mon_cmd_t qmp_query_cmds[] = {
.mhandler.info_new = do_pci_info,
},
{
- .name = "mice",
- .args_type = "",
- .params = "",
- .help = "show which guest mouse is receiving events",
- .user_print = do_info_mice_print,
- .mhandler.info_new = do_info_mice,
- },
- {
.name = "vnc",
.args_type = "",
.params = "",
diff --git a/qapi-schema.json b/qapi-schema.json
index 5922c4a..3175c82 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -226,6 +226,36 @@
{ 'command': 'query-commands', 'returns': ['CommandInfo'] }
##
+# @MouseInfo:
+#
+# Information about a mouse device.
+#
+# @name: the name of the mouse device
+#
+# @index: the index of the mouse device
+#
+# @current: true if this device is currently receiving mouse events
+#
+# @absolute: true if this device supports absolute coordinates as input
+#
+# Since: 0.14.0
+##
+{ 'type': 'MouseInfo',
+ 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
+ 'absolute': 'bool'} }
+
+##
+# @query-mice:
+#
+# Returns information about each active mouse device
+#
+# Returns: a list of @MouseInfo for each device
+#
+# Since: 0.14.0
+##
+{ 'command': 'query-mice', 'returns': ['MouseInfo'] }
+
+##
# @quit:
#
# This command will cause the QEMU process to exit gracefully. While every
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 4328e8b..c535560 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -1663,6 +1663,12 @@ Example:
EQMP
+ {
+ .name = "query-mice",
+ .args_type = "",
+ .mhandler.cmd_new = qmp_marshal_input_query_mice,
+ },
+
SQMP
query-vnc
---------
--
1.7.7.1.431.g10b2a
^ permalink raw reply related
* [Qemu-devel] [PATCH 04/19] Monitor: Make mon_set_cpu() public
From: Luiz Capitulino @ 2011-10-24 13:26 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, armbru, aliguori, mdroth, quintela
In-Reply-To: <1319462832-12199-1-git-send-email-lcapitulino@redhat.com>
Also rename it to monitor_set_cpu().
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
monitor.c | 11 +++++------
monitor.h | 1 +
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/monitor.c b/monitor.c
index ea5ccd8..3f99ea0 100644
--- a/monitor.c
+++ b/monitor.c
@@ -514,7 +514,6 @@ static int do_qmp_capabilities(Monitor *mon, const QDict *params,
return 0;
}
-static int mon_set_cpu(int cpu_index);
static void handle_user_command(Monitor *mon, const char *cmdline);
static int do_hmp_passthrough(Monitor *mon, const QDict *params,
@@ -532,7 +531,7 @@ static int do_hmp_passthrough(Monitor *mon, const QDict *params,
cur_mon = &hmp;
if (qdict_haskey(params, "cpu-index")) {
- ret = mon_set_cpu(qdict_get_int(params, "cpu-index"));
+ ret = monitor_set_cpu(qdict_get_int(params, "cpu-index"));
if (ret < 0) {
cur_mon = old_mon;
qerror_report(QERR_INVALID_PARAMETER_VALUE, "cpu-index", "a CPU number");
@@ -772,8 +771,8 @@ CommandInfoList *qmp_query_commands(Error **errp)
return cmd_list;
}
-/* get the current CPU defined by the user */
-static int mon_set_cpu(int cpu_index)
+/* set the current CPU defined by the user */
+int monitor_set_cpu(int cpu_index)
{
CPUState *env;
@@ -789,7 +788,7 @@ static int mon_set_cpu(int cpu_index)
static CPUState *mon_get_cpu(void)
{
if (!cur_mon->mon_cpu) {
- mon_set_cpu(0);
+ monitor_set_cpu(0);
}
cpu_synchronize_state(cur_mon->mon_cpu);
return cur_mon->mon_cpu;
@@ -901,7 +900,7 @@ static void do_info_cpus(Monitor *mon, QObject **ret_data)
static int do_cpu_set(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
int index = qdict_get_int(qdict, "index");
- if (mon_set_cpu(index) < 0) {
+ if (monitor_set_cpu(index) < 0) {
qerror_report(QERR_INVALID_PARAMETER_VALUE, "index",
"a CPU number");
return -1;
diff --git a/monitor.h b/monitor.h
index 4f2d328..9b723b2 100644
--- a/monitor.h
+++ b/monitor.h
@@ -57,6 +57,7 @@ void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap)
void monitor_printf(Monitor *mon, const char *fmt, ...) GCC_FMT_ATTR(2, 3);
void monitor_print_filename(Monitor *mon, const char *filename);
void monitor_flush(Monitor *mon);
+int monitor_set_cpu(int cpu_index);
typedef void (MonitorCompletion)(void *opaque, QObject *ret_data);
--
1.7.7.1.431.g10b2a
^ permalink raw reply related
* [Qemu-devel] [PATCH v1 00/19]: QAPI conversions round 2
From: Luiz Capitulino @ 2011-10-24 13:26 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, armbru, aliguori, mdroth, quintela
This series completes the conversion of current QMP query commands to the
QAPI framework. IOW, with this series applied no single query command will
be building QObjects by hand.
This series also contains two fixes and some cleanups. One of the fixes
solves a problem with the generated code which ignores errors. The other
fixes a missing error declaration in QError.
There are two important details about this series that should be observed:
1. This is a bit late in the development process. Although there's a lot
of code churn involved, query commands are relatively simple: most of
them don't return errors and they don't take parameters. I've also
tested them as much as I could.
I'm not saying it's bug-free, but I believe we have enough time for
fixing any outstanding issues.
2. Most query commands makes use of QAPI's list type. Unfortunately, the
simplest way to build a list reverses the order of listings in HMP
(ie. the "info cpus" command starts at the last CPU). To avoid this,
I'm building lists by hand the old way for now. In the short term the
QAPI will be changed to use glib's list support.
balloon.c | 72 +-----
balloon.h | 6 +-
block.c | 234 ++++++------------
block.h | 5 -
block_int.h | 4 +-
console.h | 9 -
cpus.c | 45 ++++
error.c | 3 +-
hmp-commands.hx | 3 +-
hmp.c | 407 ++++++++++++++++++++++++++++++
hmp.h | 10 +
hw/pci-stub.c | 15 +-
hw/pci.c | 322 +++++++++---------------
hw/pci.h | 4 -
hw/virtio-balloon.c | 78 +-----
input.c | 64 ++----
migration.c | 82 ++-----
monitor.c | 313 ++----------------------
monitor.h | 2 +
qapi-schema.json | 616 ++++++++++++++++++++++++++++++++++++++++++++++
qerror.c | 4 +
qmp-commands.hx | 60 +++++-
qmp.c | 27 ++
scripts/qapi-commands.py | 4 +-
ui/spice-core.c | 139 +++++------
ui/vnc.c | 135 +++++++----
vl.c | 2 +-
27 files changed, 1611 insertions(+), 1054 deletions(-)
^ permalink raw reply
* Re: 3.0.4 kernel oops in i2c ?
From: Josip Rodin @ 2011-10-24 13:26 UTC (permalink / raw)
To: sparclinux
In-Reply-To: <20111014144345.GB5070@lemon.iwr.uni-heidelberg.de>
On Fri, Oct 14, 2011 at 04:43:45PM +0200, Hermann Lauer wrote:
> when starting 3.0.4 on a V880 a non fatal oops happens when loading
> i2c stuff. Proably there is a problem with i2c on the machine,
> as the rsc "env" cmd shows "E880_FSP: ERROR getting FP stats ---> 9"
> errors. An old 2.6.26-2-sparc64-smp (Debian 2.6.26-26lenny2) kernel
> produces no oops.
Can you try the stable Debian 2.6.32 kernel at least?
Anything that helps you reduce the amount of git bisect...
--
2. That which causes joy or happiness.
^ permalink raw reply
* [PATCH v2] regulator: max8649 Convert max8649 to use regmap api
From: jhbird.choi @ 2011-10-24 13:26 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel
Cc: Mark Brown, Liam Girdwood, Haojian Zhuang, Jonghwan Choi
From: Jonghwan Choi <jhbird.choi@gmail.com>
Signed-off-by: Jonghwan Choi <jhbird.choi@gmail.com>
---
drivers/regulator/Kconfig | 1 +
drivers/regulator/max8649.c | 155 +++++++++++++++----------------------------
2 files changed, 56 insertions(+), 100 deletions(-)
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index c7fd2c0..c4f9e1c 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -83,6 +83,7 @@ config REGULATOR_MAX1586
config REGULATOR_MAX8649
tristate "Maxim 8649 voltage regulator"
depends on I2C
+ select REGMAP_I2C
help
This driver controls a Maxim 8649 voltage output regulator via
I2C bus.
diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c
index 30eb9e5..1143bb4 100644
--- a/drivers/regulator/max8649.c
+++ b/drivers/regulator/max8649.c
@@ -16,6 +16,7 @@
#include <linux/regulator/driver.h>
#include <linux/slab.h>
#include <linux/regulator/max8649.h>
+#include <linux/regmap.h>
#define MAX8649_DCDC_VMIN 750000 /* uV */
#define MAX8649_DCDC_VMAX 1380000 /* uV */
@@ -49,9 +50,8 @@
struct max8649_regulator_info {
struct regulator_dev *regulator;
- struct i2c_client *i2c;
struct device *dev;
- struct mutex io_lock;
+ struct regmap *regmap;
int vol_reg;
unsigned mode:2; /* bit[1:0] = VID1, VID0 */
@@ -63,71 +63,6 @@ struct max8649_regulator_info {
/* I2C operations */
-static inline int max8649_read_device(struct i2c_client *i2c,
- int reg, int bytes, void *dest)
-{
- unsigned char data;
- int ret;
-
- data = (unsigned char)reg;
- ret = i2c_master_send(i2c, &data, 1);
- if (ret < 0)
- return ret;
- ret = i2c_master_recv(i2c, dest, bytes);
- if (ret < 0)
- return ret;
- return 0;
-}
-
-static inline int max8649_write_device(struct i2c_client *i2c,
- int reg, int bytes, void *src)
-{
- unsigned char buf[bytes + 1];
- int ret;
-
- buf[0] = (unsigned char)reg;
- memcpy(&buf[1], src, bytes);
-
- ret = i2c_master_send(i2c, buf, bytes + 1);
- if (ret < 0)
- return ret;
- return 0;
-}
-
-static int max8649_reg_read(struct i2c_client *i2c, int reg)
-{
- struct max8649_regulator_info *info = i2c_get_clientdata(i2c);
- unsigned char data;
- int ret;
-
- mutex_lock(&info->io_lock);
- ret = max8649_read_device(i2c, reg, 1, &data);
- mutex_unlock(&info->io_lock);
-
- if (ret < 0)
- return ret;
- return (int)data;
-}
-
-static int max8649_set_bits(struct i2c_client *i2c, int reg,
- unsigned char mask, unsigned char data)
-{
- struct max8649_regulator_info *info = i2c_get_clientdata(i2c);
- unsigned char value;
- int ret;
-
- mutex_lock(&info->io_lock);
- ret = max8649_read_device(i2c, reg, 1, &value);
- if (ret < 0)
- goto out;
- value &= ~mask;
- value |= data;
- ret = max8649_write_device(i2c, reg, 1, &value);
-out:
- mutex_unlock(&info->io_lock);
- return ret;
-}
-
static inline int check_range(int min_uV, int max_uV)
{
if ((min_uV < MAX8649_DCDC_VMIN) || (max_uV > MAX8649_DCDC_VMAX)
@@ -144,13 +79,14 @@ static int max8649_list_voltage(struct regulator_dev *rdev, unsigned index)
static int max8649_get_voltage(struct regulator_dev *rdev)
{
struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
+ unsigned int val;
unsigned char data;
int ret;
- ret = max8649_reg_read(info->i2c, info->vol_reg);
- if (ret < 0)
+ ret = regmap_read(info->regmap, info->vol_reg, &val);
+ if (ret != 0)
return ret;
- data = (unsigned char)ret & MAX8649_VOL_MASK;
+ data = (unsigned char)val & MAX8649_VOL_MASK;
return max8649_list_voltage(rdev, data);
}
@@ -170,14 +106,14 @@ static int max8649_set_voltage(struct regulator_dev *rdev,
mask = MAX8649_VOL_MASK;
*selector = data & mask;
- return max8649_set_bits(info->i2c, info->vol_reg, mask, data);
+ return regmap_update_bits(info->regmap, info->vol_reg, mask, data);
}
/* EN_PD means pulldown on EN input */
static int max8649_enable(struct regulator_dev *rdev)
{
struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
- return max8649_set_bits(info->i2c, MAX8649_CONTROL, MAX8649_EN_PD, 0);
+ return regmap_update_bits(info->regmap, MAX8649_CONTROL, MAX8649_EN_PD, 0);
}
/*
@@ -187,38 +123,40 @@ static int max8649_enable(struct regulator_dev *rdev)
static int max8649_disable(struct regulator_dev *rdev)
{
struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
- return max8649_set_bits(info->i2c, MAX8649_CONTROL, MAX8649_EN_PD,
+ return regmap_update_bits(info->regmap, MAX8649_CONTROL, MAX8649_EN_PD,
MAX8649_EN_PD);
}
static int max8649_is_enabled(struct regulator_dev *rdev)
{
struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
+ unsigned int val;
int ret;
- ret = max8649_reg_read(info->i2c, MAX8649_CONTROL);
- if (ret < 0)
+ ret = regmap_read(info->regmap, MAX8649_CONTROL, &val);
+ if (ret != 0)
return ret;
- return !((unsigned char)ret & MAX8649_EN_PD);
+ return !((unsigned char)val & MAX8649_EN_PD);
}
static int max8649_enable_time(struct regulator_dev *rdev)
{
struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
int voltage, rate, ret;
+ unsigned int val;
/* get voltage */
- ret = max8649_reg_read(info->i2c, info->vol_reg);
- if (ret < 0)
+ ret = regmap_read(info->regmap, info->vol_reg, &val);
+ if (ret != 0)
return ret;
- ret &= MAX8649_VOL_MASK;
+ val &= MAX8649_VOL_MASK;
voltage = max8649_list_voltage(rdev, (unsigned char)ret); /* uV */
/* get rate */
- ret = max8649_reg_read(info->i2c, MAX8649_RAMP);
- if (ret < 0)
+ ret = regmap_read(info->regmap, MAX8649_RAMP, &val);
+ if (ret != 0)
return ret;
- ret = (ret & MAX8649_RAMP_MASK) >> 5;
+ ret = (val & MAX8649_RAMP_MASK) >> 5;
rate = (32 * 1000) >> ret; /* uV/uS */
return (voltage / rate);
@@ -230,12 +168,12 @@ static int max8649_set_mode(struct regulator_dev *rdev, unsigned int mode)
switch (mode) {
case REGULATOR_MODE_FAST:
- max8649_set_bits(info->i2c, info->vol_reg, MAX8649_FORCE_PWM,
- MAX8649_FORCE_PWM);
+ regmap_update_bits(info->regmap, info->vol_reg, MAX8649_FORCE_PWM,
+ MAX8649_FORCE_PWM);
break;
case REGULATOR_MODE_NORMAL:
- max8649_set_bits(info->i2c, info->vol_reg,
- MAX8649_FORCE_PWM, 0);
+ regmap_update_bits(info->regmap, info->vol_reg,
+ MAX8649_FORCE_PWM, 0);
break;
default:
return -EINVAL;
@@ -246,10 +184,13 @@ static int max8649_set_mode(struct regulator_dev *rdev, unsigned int mode)
static unsigned int max8649_get_mode(struct regulator_dev *rdev)
{
struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
+ unsigned int val;
int ret;
- ret = max8649_reg_read(info->i2c, info->vol_reg);
- if (ret & MAX8649_FORCE_PWM)
+ ret = regmap_read(info->regmap, info->vol_reg, &val);
+ if (ret != 0)
+ return ret;
+ if (val & MAX8649_FORCE_PWM)
return REGULATOR_MODE_FAST;
return REGULATOR_MODE_NORMAL;
}
@@ -275,11 +216,17 @@ static struct regulator_desc dcdc_desc = {
.owner = THIS_MODULE,
};
+static struct regmap_config max8649_regmap_config = {
+ .reg_bits = 8,
+ .val_bits = 8,
+};
+
static int __devinit max8649_regulator_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct max8649_platform_data *pdata = client->dev.platform_data;
struct max8649_regulator_info *info = NULL;
+ unsigned int val;
unsigned char data;
int ret;
@@ -289,9 +236,14 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
return -ENOMEM;
}
- info->i2c = client;
+ info->regmap = regmap_init_i2c(client, &max8649_regmap_config);
+ if (IS_ERR(info->regmap)) {
+ ret = PTR_ERR(info->regmap);
+ dev_err(&client->dev, "Failed to allocate register map: %d\n", ret);
+ goto fail;
+ }
+
info->dev = &client->dev;
- mutex_init(&info->io_lock);
i2c_set_clientdata(client, info);
info->mode = pdata->mode;
@@ -312,8 +264,8 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
break;
}
- ret = max8649_reg_read(info->i2c, MAX8649_CHIP_ID1);
- if (ret < 0) {
+ ret = regmap_read(info->regmap, MAX8649_CHIP_ID1, &val);
+ if (ret != 0) {
dev_err(info->dev, "Failed to detect ID of MAX8649:%d\n",
ret);
goto out;
@@ -321,29 +273,29 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
dev_info(info->dev, "Detected MAX8649 (ID:%x)\n", ret);
/* enable VID0 & VID1 */
- max8649_set_bits(info->i2c, MAX8649_CONTROL, MAX8649_VID_MASK, 0);
+ regmap_update_bits(info->regmap, MAX8649_CONTROL, MAX8649_VID_MASK, 0);
/* enable/disable external clock synchronization */
info->extclk = pdata->extclk;
data = (info->extclk) ? MAX8649_SYNC_EXTCLK : 0;
- max8649_set_bits(info->i2c, info->vol_reg, MAX8649_SYNC_EXTCLK, data);
+ regmap_update_bits(info->regmap, info->vol_reg, MAX8649_SYNC_EXTCLK, data);
if (info->extclk) {
/* set external clock frequency */
info->extclk_freq = pdata->extclk_freq;
- max8649_set_bits(info->i2c, MAX8649_SYNC, MAX8649_EXT_MASK,
- info->extclk_freq << 6);
+ regmap_update_bits(info->regmap, MAX8649_SYNC, MAX8649_EXT_MASK,
+ info->extclk_freq << 6);
}
if (pdata->ramp_timing) {
info->ramp_timing = pdata->ramp_timing;
- max8649_set_bits(info->i2c, MAX8649_RAMP, MAX8649_RAMP_MASK,
- info->ramp_timing << 5);
+ regmap_update_bits(info->regmap, MAX8649_RAMP, MAX8649_RAMP_MASK,
+ info->ramp_timing << 5);
}
info->ramp_down = pdata->ramp_down;
if (info->ramp_down) {
- max8649_set_bits(info->i2c, MAX8649_RAMP, MAX8649_RAMP_DOWN,
- MAX8649_RAMP_DOWN);
+ regmap_update_bits(info->regmap, MAX8649_RAMP, MAX8649_RAMP_DOWN,
+ MAX8649_RAMP_DOWN);
}
info->regulator = regulator_register(&dcdc_desc, &client->dev,
@@ -358,6 +310,8 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
dev_info(info->dev, "Max8649 regulator device is detected.\n");
return 0;
out:
+ regmap_exit(info->regmap);
+fail:
kfree(info);
return ret;
}
@@ -369,6 +323,7 @@ static int __devexit max8649_regulator_remove(struct i2c_client *client)
if (info) {
if (info->regulator)
regulator_unregister(info->regulator);
+ regmap_exit(info->regmap);
kfree(info);
}
--
1.7.1
^ permalink raw reply related
* [PATCH v2] regulator: max8649 Convert max8649 to use regmap api
From: jhbird.choi at gmail.com @ 2011-10-24 13:26 UTC (permalink / raw)
To: linux-arm-kernel
From: Jonghwan Choi <jhbird.choi@gmail.com>
Signed-off-by: Jonghwan Choi <jhbird.choi@gmail.com>
---
drivers/regulator/Kconfig | 1 +
drivers/regulator/max8649.c | 155 +++++++++++++++----------------------------
2 files changed, 56 insertions(+), 100 deletions(-)
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index c7fd2c0..c4f9e1c 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -83,6 +83,7 @@ config REGULATOR_MAX1586
config REGULATOR_MAX8649
tristate "Maxim 8649 voltage regulator"
depends on I2C
+ select REGMAP_I2C
help
This driver controls a Maxim 8649 voltage output regulator via
I2C bus.
diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c
index 30eb9e5..1143bb4 100644
--- a/drivers/regulator/max8649.c
+++ b/drivers/regulator/max8649.c
@@ -16,6 +16,7 @@
#include <linux/regulator/driver.h>
#include <linux/slab.h>
#include <linux/regulator/max8649.h>
+#include <linux/regmap.h>
#define MAX8649_DCDC_VMIN 750000 /* uV */
#define MAX8649_DCDC_VMAX 1380000 /* uV */
@@ -49,9 +50,8 @@
struct max8649_regulator_info {
struct regulator_dev *regulator;
- struct i2c_client *i2c;
struct device *dev;
- struct mutex io_lock;
+ struct regmap *regmap;
int vol_reg;
unsigned mode:2; /* bit[1:0] = VID1, VID0 */
@@ -63,71 +63,6 @@ struct max8649_regulator_info {
/* I2C operations */
-static inline int max8649_read_device(struct i2c_client *i2c,
- int reg, int bytes, void *dest)
-{
- unsigned char data;
- int ret;
-
- data = (unsigned char)reg;
- ret = i2c_master_send(i2c, &data, 1);
- if (ret < 0)
- return ret;
- ret = i2c_master_recv(i2c, dest, bytes);
- if (ret < 0)
- return ret;
- return 0;
-}
-
-static inline int max8649_write_device(struct i2c_client *i2c,
- int reg, int bytes, void *src)
-{
- unsigned char buf[bytes + 1];
- int ret;
-
- buf[0] = (unsigned char)reg;
- memcpy(&buf[1], src, bytes);
-
- ret = i2c_master_send(i2c, buf, bytes + 1);
- if (ret < 0)
- return ret;
- return 0;
-}
-
-static int max8649_reg_read(struct i2c_client *i2c, int reg)
-{
- struct max8649_regulator_info *info = i2c_get_clientdata(i2c);
- unsigned char data;
- int ret;
-
- mutex_lock(&info->io_lock);
- ret = max8649_read_device(i2c, reg, 1, &data);
- mutex_unlock(&info->io_lock);
-
- if (ret < 0)
- return ret;
- return (int)data;
-}
-
-static int max8649_set_bits(struct i2c_client *i2c, int reg,
- unsigned char mask, unsigned char data)
-{
- struct max8649_regulator_info *info = i2c_get_clientdata(i2c);
- unsigned char value;
- int ret;
-
- mutex_lock(&info->io_lock);
- ret = max8649_read_device(i2c, reg, 1, &value);
- if (ret < 0)
- goto out;
- value &= ~mask;
- value |= data;
- ret = max8649_write_device(i2c, reg, 1, &value);
-out:
- mutex_unlock(&info->io_lock);
- return ret;
-}
-
static inline int check_range(int min_uV, int max_uV)
{
if ((min_uV < MAX8649_DCDC_VMIN) || (max_uV > MAX8649_DCDC_VMAX)
@@ -144,13 +79,14 @@ static int max8649_list_voltage(struct regulator_dev *rdev, unsigned index)
static int max8649_get_voltage(struct regulator_dev *rdev)
{
struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
+ unsigned int val;
unsigned char data;
int ret;
- ret = max8649_reg_read(info->i2c, info->vol_reg);
- if (ret < 0)
+ ret = regmap_read(info->regmap, info->vol_reg, &val);
+ if (ret != 0)
return ret;
- data = (unsigned char)ret & MAX8649_VOL_MASK;
+ data = (unsigned char)val & MAX8649_VOL_MASK;
return max8649_list_voltage(rdev, data);
}
@@ -170,14 +106,14 @@ static int max8649_set_voltage(struct regulator_dev *rdev,
mask = MAX8649_VOL_MASK;
*selector = data & mask;
- return max8649_set_bits(info->i2c, info->vol_reg, mask, data);
+ return regmap_update_bits(info->regmap, info->vol_reg, mask, data);
}
/* EN_PD means pulldown on EN input */
static int max8649_enable(struct regulator_dev *rdev)
{
struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
- return max8649_set_bits(info->i2c, MAX8649_CONTROL, MAX8649_EN_PD, 0);
+ return regmap_update_bits(info->regmap, MAX8649_CONTROL, MAX8649_EN_PD, 0);
}
/*
@@ -187,38 +123,40 @@ static int max8649_enable(struct regulator_dev *rdev)
static int max8649_disable(struct regulator_dev *rdev)
{
struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
- return max8649_set_bits(info->i2c, MAX8649_CONTROL, MAX8649_EN_PD,
+ return regmap_update_bits(info->regmap, MAX8649_CONTROL, MAX8649_EN_PD,
MAX8649_EN_PD);
}
static int max8649_is_enabled(struct regulator_dev *rdev)
{
struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
+ unsigned int val;
int ret;
- ret = max8649_reg_read(info->i2c, MAX8649_CONTROL);
- if (ret < 0)
+ ret = regmap_read(info->regmap, MAX8649_CONTROL, &val);
+ if (ret != 0)
return ret;
- return !((unsigned char)ret & MAX8649_EN_PD);
+ return !((unsigned char)val & MAX8649_EN_PD);
}
static int max8649_enable_time(struct regulator_dev *rdev)
{
struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
int voltage, rate, ret;
+ unsigned int val;
/* get voltage */
- ret = max8649_reg_read(info->i2c, info->vol_reg);
- if (ret < 0)
+ ret = regmap_read(info->regmap, info->vol_reg, &val);
+ if (ret != 0)
return ret;
- ret &= MAX8649_VOL_MASK;
+ val &= MAX8649_VOL_MASK;
voltage = max8649_list_voltage(rdev, (unsigned char)ret); /* uV */
/* get rate */
- ret = max8649_reg_read(info->i2c, MAX8649_RAMP);
- if (ret < 0)
+ ret = regmap_read(info->regmap, MAX8649_RAMP, &val);
+ if (ret != 0)
return ret;
- ret = (ret & MAX8649_RAMP_MASK) >> 5;
+ ret = (val & MAX8649_RAMP_MASK) >> 5;
rate = (32 * 1000) >> ret; /* uV/uS */
return (voltage / rate);
@@ -230,12 +168,12 @@ static int max8649_set_mode(struct regulator_dev *rdev, unsigned int mode)
switch (mode) {
case REGULATOR_MODE_FAST:
- max8649_set_bits(info->i2c, info->vol_reg, MAX8649_FORCE_PWM,
- MAX8649_FORCE_PWM);
+ regmap_update_bits(info->regmap, info->vol_reg, MAX8649_FORCE_PWM,
+ MAX8649_FORCE_PWM);
break;
case REGULATOR_MODE_NORMAL:
- max8649_set_bits(info->i2c, info->vol_reg,
- MAX8649_FORCE_PWM, 0);
+ regmap_update_bits(info->regmap, info->vol_reg,
+ MAX8649_FORCE_PWM, 0);
break;
default:
return -EINVAL;
@@ -246,10 +184,13 @@ static int max8649_set_mode(struct regulator_dev *rdev, unsigned int mode)
static unsigned int max8649_get_mode(struct regulator_dev *rdev)
{
struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
+ unsigned int val;
int ret;
- ret = max8649_reg_read(info->i2c, info->vol_reg);
- if (ret & MAX8649_FORCE_PWM)
+ ret = regmap_read(info->regmap, info->vol_reg, &val);
+ if (ret != 0)
+ return ret;
+ if (val & MAX8649_FORCE_PWM)
return REGULATOR_MODE_FAST;
return REGULATOR_MODE_NORMAL;
}
@@ -275,11 +216,17 @@ static struct regulator_desc dcdc_desc = {
.owner = THIS_MODULE,
};
+static struct regmap_config max8649_regmap_config = {
+ .reg_bits = 8,
+ .val_bits = 8,
+};
+
static int __devinit max8649_regulator_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct max8649_platform_data *pdata = client->dev.platform_data;
struct max8649_regulator_info *info = NULL;
+ unsigned int val;
unsigned char data;
int ret;
@@ -289,9 +236,14 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
return -ENOMEM;
}
- info->i2c = client;
+ info->regmap = regmap_init_i2c(client, &max8649_regmap_config);
+ if (IS_ERR(info->regmap)) {
+ ret = PTR_ERR(info->regmap);
+ dev_err(&client->dev, "Failed to allocate register map: %d\n", ret);
+ goto fail;
+ }
+
info->dev = &client->dev;
- mutex_init(&info->io_lock);
i2c_set_clientdata(client, info);
info->mode = pdata->mode;
@@ -312,8 +264,8 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
break;
}
- ret = max8649_reg_read(info->i2c, MAX8649_CHIP_ID1);
- if (ret < 0) {
+ ret = regmap_read(info->regmap, MAX8649_CHIP_ID1, &val);
+ if (ret != 0) {
dev_err(info->dev, "Failed to detect ID of MAX8649:%d\n",
ret);
goto out;
@@ -321,29 +273,29 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
dev_info(info->dev, "Detected MAX8649 (ID:%x)\n", ret);
/* enable VID0 & VID1 */
- max8649_set_bits(info->i2c, MAX8649_CONTROL, MAX8649_VID_MASK, 0);
+ regmap_update_bits(info->regmap, MAX8649_CONTROL, MAX8649_VID_MASK, 0);
/* enable/disable external clock synchronization */
info->extclk = pdata->extclk;
data = (info->extclk) ? MAX8649_SYNC_EXTCLK : 0;
- max8649_set_bits(info->i2c, info->vol_reg, MAX8649_SYNC_EXTCLK, data);
+ regmap_update_bits(info->regmap, info->vol_reg, MAX8649_SYNC_EXTCLK, data);
if (info->extclk) {
/* set external clock frequency */
info->extclk_freq = pdata->extclk_freq;
- max8649_set_bits(info->i2c, MAX8649_SYNC, MAX8649_EXT_MASK,
- info->extclk_freq << 6);
+ regmap_update_bits(info->regmap, MAX8649_SYNC, MAX8649_EXT_MASK,
+ info->extclk_freq << 6);
}
if (pdata->ramp_timing) {
info->ramp_timing = pdata->ramp_timing;
- max8649_set_bits(info->i2c, MAX8649_RAMP, MAX8649_RAMP_MASK,
- info->ramp_timing << 5);
+ regmap_update_bits(info->regmap, MAX8649_RAMP, MAX8649_RAMP_MASK,
+ info->ramp_timing << 5);
}
info->ramp_down = pdata->ramp_down;
if (info->ramp_down) {
- max8649_set_bits(info->i2c, MAX8649_RAMP, MAX8649_RAMP_DOWN,
- MAX8649_RAMP_DOWN);
+ regmap_update_bits(info->regmap, MAX8649_RAMP, MAX8649_RAMP_DOWN,
+ MAX8649_RAMP_DOWN);
}
info->regulator = regulator_register(&dcdc_desc, &client->dev,
@@ -358,6 +310,8 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
dev_info(info->dev, "Max8649 regulator device is detected.\n");
return 0;
out:
+ regmap_exit(info->regmap);
+fail:
kfree(info);
return ret;
}
@@ -369,6 +323,7 @@ static int __devexit max8649_regulator_remove(struct i2c_client *client)
if (info) {
if (info->regulator)
regulator_unregister(info->regulator);
+ regmap_exit(info->regmap);
kfree(info);
}
--
1.7.1
^ permalink raw reply related
* Re: [CONSOLIDATED PULL 11/27] pulseaudio-0.9.23: inherit perlnative to work around build on host without XML/Parser.pm
From: Koen Kooi @ 2011-10-24 13:19 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
In-Reply-To: <1319462157.25011.1.camel@ted>
Op 24 okt. 2011, om 15:15 heeft Richard Purdie het volgende geschreven:
> On Sun, 2011-10-23 at 11:26 -0700, Saul Wold wrote:
>> From: Martin Jansa <Martin.Jansa@gmail.com>
>>
>> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
>> ---
>> .../pulseaudio/pulseaudio_0.9.23.bb | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.23.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.23.bb
>> index 33f5e15..4ac2418 100644
>> --- a/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.23.bb
>> +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.23.bb
>> @@ -4,7 +4,7 @@ PR = "r5"
>>
>> DEPENDS += "gdbm speex"
>>
>> -inherit gettext
>> +inherit gettext perlnative
>
> This doesn't look right. If we need xmlparser, we should state that in
> DEPENDS. If that is added to DEPENDS, I'm not sure we still need the
> inherit of perlnative?
If you need xmlparser during the build you almost always need the perlnative wrapper as well :(
regards,
Koen
^ permalink raw reply
* [U-Boot] Accessing MC13783 RTC registers
From: Marek Vasut @ 2011-10-24 13:24 UTC (permalink / raw)
To: u-boot
In-Reply-To: <CAOMZO5B0uMjJNXOvjt4UOFi1Afvrp1tviJ_-yrunp+9VXcqYaQ@mail.gmail.com>
> Hi,
>
> Running U-boot from top of tree imx git I get the following when
> trying to access the MC13783 RTC registers via 'date' command:
>
> MX31PDK U-Boot > date
> <reg num> = 22 is invalid. Should be less than 0
> ## Get date failed
>
Fabio,
is it possibly connected via i2c?
Cheers
^ permalink raw reply
* Re: [CONSOLIDATED PULL 26/27] abiword: convert to svn
From: Koen Kooi @ 2011-10-24 13:18 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
In-Reply-To: <1319462069.25011.0.camel@ted>
Op 24 okt. 2011, om 15:14 heeft Richard Purdie het volgende geschreven:
> On Sun, 2011-10-23 at 11:27 -0700, Saul Wold wrote:
>> Signed-off-by: Saul Wold <sgw@linux.intel.com>
>> ---
>> meta-demoapps/recipes-gnome/abiword/abiword.inc | 4 ++--
>> meta-demoapps/recipes-gnome/abiword/abiword_cvs.bb | 10 ----------
>> meta-demoapps/recipes-gnome/abiword/abiword_svn.bb | 10 ++++++++++
>> 3 files changed, 12 insertions(+), 12 deletions(-)
>> delete mode 100644 meta-demoapps/recipes-gnome/abiword/abiword_cvs.bb
>> create mode 100644 meta-demoapps/recipes-gnome/abiword/abiword_svn.bb
>>
>> diff --git a/meta-demoapps/recipes-gnome/abiword/abiword.inc b/meta-demoapps/recipes-gnome/abiword/abiword.inc
>> index b1b0f67..2b34a7a 100644
>> --- a/meta-demoapps/recipes-gnome/abiword/abiword.inc
>> +++ b/meta-demoapps/recipes-gnome/abiword/abiword.inc
>> @@ -13,8 +13,8 @@ RRECOMMENDS_${PN} = "glibc-gconv-ibm850 glibc-gconv-cp1252 \
>> RELURI = "http://www.abiword.org/downloads/abiword/${PV}/source/abiword-${PV}.tar.gz"
>> RELSRC = "${WORKDIR}/abiword-${PV}/abi"
>>
>> -CVSURI = "cvs://anoncvs:anoncvs@anoncvs.abisource.com/cvsroot;module=abi"
>> -CVSSRC = "${WORKDIR}/abi"
>> +SVNURI = "cvs://svn.abisource.com/abiword/trunk;module=abiword;proto=http"
>> +SVNSRC = "${WORKDIR}/abi"
>>
> Er, its still using cvs:// ?!
The whole abiword section is outdated, it has 2.5.2 which was released on 21-Aug-2007, latest is 2.8.6 released on 13-Jun-2010. I have an uncommited update in meta-oe to update abiword to 2.8.6, need to clean that up.
regards,
Koen
^ permalink raw reply
* [PATCH] gpiolib: Ensure struct gpio is always defined
From: Mark Brown @ 2011-10-24 13:24 UTC (permalink / raw)
To: Grant Likely; +Cc: linux-kernel, patches, Mark Brown
Currently struct gpio is only defined when using gpiolib which makes the
stub gpio_request_array() much less useful in drivers than is ideal as
they can't work with struct gpio. Since there are no other definitions
in kernel instead make the define always available no matter if gpiolib
is selectable or selected, ensuring that drivers can always use the
type.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
flob
---
include/asm-generic/gpio.h | 12 ------------
include/linux/gpio.h | 22 ++++++++++++----------
2 files changed, 12 insertions(+), 22 deletions(-)
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index d494001..d0b6423 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -170,18 +170,6 @@ extern int __gpio_cansleep(unsigned gpio);
extern int __gpio_to_irq(unsigned gpio);
-/**
- * struct gpio - a structure describing a GPIO with configuration
- * @gpio: the GPIO number
- * @flags: GPIO configuration as specified by GPIOF_*
- * @label: a literal description string of this GPIO
- */
-struct gpio {
- unsigned gpio;
- unsigned long flags;
- const char *label;
-};
-
extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *label);
extern int gpio_request_array(const struct gpio *array, size_t num);
extern void gpio_free_array(const struct gpio *array, size_t num);
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index 17b5a0d..38ac48b 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -14,6 +14,18 @@
#define GPIOF_OUT_INIT_LOW (GPIOF_DIR_OUT | GPIOF_INIT_LOW)
#define GPIOF_OUT_INIT_HIGH (GPIOF_DIR_OUT | GPIOF_INIT_HIGH)
+/**
+ * struct gpio - a structure describing a GPIO with configuration
+ * @gpio: the GPIO number
+ * @flags: GPIO configuration as specified by GPIOF_*
+ * @label: a literal description string of this GPIO
+ */
+struct gpio {
+ unsigned gpio;
+ unsigned long flags;
+ const char *label;
+};
+
#ifdef CONFIG_GENERIC_GPIO
#include <asm/gpio.h>
@@ -24,18 +36,8 @@
#include <linux/errno.h>
struct device;
-struct gpio;
struct gpio_chip;
-/*
- * Some platforms don't support the GPIO programming interface.
- *
- * In case some driver uses it anyway (it should normally have
- * depended on GENERIC_GPIO), these routines help the compiler
- * optimize out much GPIO-related code ... or trigger a runtime
- * warning when something is wrongly called.
- */
-
static inline bool gpio_is_valid(int number)
{
return false;
--
1.7.6.3
^ permalink raw reply related
* [ath9k-devel] Maybe a bug somewhere in the WIFI driver
From: Mohammed Shafi @ 2011-10-24 13:23 UTC (permalink / raw)
To: ath9k-devel
In-Reply-To: <4ea5511c.cf3cd80a.686e.ffff951cSMTPIN_ADDED@mx.google.com>
On Mon, Oct 24, 2011 at 5:20 PM, BARRAL Adrien
<adrien.barral@robopec.com> wrote:
> Hi Shafi,
>
> I think the bug was corrected.
> I installed compat-wireless 2011-10-10 and since, no freeze happens.
thank you very much for trying it out. (added ath9k list)
>
> Thank you very much.
>
> Regards,
> Adrien BARRAL
>
> -----Message d'origine-----
> De?: Mohammed Shafi [mailto:shafi.wireless at gmail.com]
> Envoy??: mercredi 12 octobre 2011 06:20
> ??: BARRAL Adrien
> Cc?: ath9k-devel at lists.ath9k.org
> Objet?: Re: [ath9k-devel] Maybe a bug somewhere in the WIFI driver
>
> On Tue, Oct 11, 2011 at 9:29 PM, BARRAL Adrien
> <adrien.barral@robopec.com> wrote:
>> Hello,
>>
>>
>>
>> Here is a description of my system :
>>
>> Linux : 2.6.35-22-generic (on a ubuntu 10.04 LTS)
>>
>> My wifi card is : 02:00.0 Network controller: Atheros Communications Inc.
>> AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
>>
>> "dmesg" outputs about the wifi controller are :
>>
>> Oct 10 17:28:49 kernel: [?? 12.546288] ath9k 0000:02:00.0: PCI INT A ->
> GSI
>> 17 (level, low) -> IRQ 17
>>
>> Oct 10 17:28:49 kernel: [?? 12.606040] HDA Intel 0000:00:1b.0: PCI INT A
> ->
>> GSI 16 (level, low) -> IRQ 16
>>
>> Oct 10 17:28:49 kernel: [?? 12.653486] phy0: Atheros AR9285 Rev:2
>> mem=0xf8e60000, irq=17
>>
>>
>>
>> I am using an atheros Wifi Card in ad-hoc mode, I create my ad-hoc network
>> with two differents ways :
>>
>> 1. Thanks to the following commands :
>>
>> ??????????????? ifconfig wlan2 down
>>
>> ??????????????? iwconfig wlan2 mode Ad-Hoc
>>
>> ??????????????? iwconfig wlan2 essid "Toto"
>>
>> ??????????????? ifconfig wlan2 up
>>
>> 2. Thanks to the ubuntu network manager "Create a New Network" function's.
>>
>>
>>
>> The way I use to create the network doesn't matter.
>>
>>
>>
>> A few minutes after the AdHoc network is created, my system freeze. I have
>> got the following message in /var/log/kernel :
>>
>>
>>
>> ----------------- START OF MESSAGE ------------------
>>
>> Oct 11 09:44:52 kernel: [? 840.290670] BUG: unable to handle kernel NULL
>> pointer dereference at 00000080
>>
>> Oct 11 09:44:52 kernel: [? 840.290682] IP: [<c020cb7c>]
>> __kmalloc_track_caller+0x6c/0x170
>>
>> Oct 11 09:44:52 kernel: [? 840.290697] *pde = 7e630067
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290703] Oops: 0000 [#1] SMP
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290709] last sysfs file:
>> /sys/devices/pci0000:00/0000:00:1e.0/0000:04:0b.0/local_cpus
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290716] Modules linked in: ipt_MASQUERADE
>> xt_state ipt_REJECT xt_tcpudp iptable_filter nf_nat_h323 nf_conntrack_h323
>> nf_nat_pptp nf_conntrack_pptp nf_conntrack_proto_gre nf_nat_proto_gre
>> nf_nat_tftp nf_conntrack_tftp nf_nat_sip nf_conntrack_sip nf_nat_irc
>> nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp iptable_nat nf_nat
>> nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables
>> nls_iso8859_1 nls_cp437 vfat fat parport_pc ppdev snd_hda_codec_nvhdmi
>> binfmt_misc snd_hda_codec_realtek snd_hda_intel snd_hda_codec nvidia(P)
> arc4
>> snd_usb_audio ath9k snd_hwdep snd_usbmidi_lib snd_pcm ath9k_common
>> snd_seq_midi ath9k_hw joydev snd_rawmidi ath mac80211 snd_seq_midi_event
>> snd_seq snd_timer usbhid snd_seq_device cfg80211 uvcvideo intel_agp
>> usb_storage hid snd cdc_acm psmouse videodev v4l1_compat led_class
> serio_raw
>> coretemp xhci_hcd agpgart soundcore snd_page_alloc lp parport r8169 mii
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290822]
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290829] Pid: 757, comm: phy0 Tainted:
>> P??????????? 2.6.35-22-generic #33-Ubuntu To be filled by O.E.M./To Be
>> Filled By O.E.M.
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290837] EIP: 0060:[<c020cb7c>] EFLAGS:
>> 00010002 CPU: 3
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290844] EIP is at
>> __kmalloc_track_caller+0x6c/0x170
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290849] EAX: c2705aec EBX: c07c6888 ECX:
>> c07c6888 EDX: 00000000
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290854] ESI: 000000d0 EDI: 00000080 EBP:
>> f3f6bebc ESP: f3f6be94
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290860]? DS: 007b ES: 007b FS: 00d8 GS:
>> 00e0 SS: 0068
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290866] Process phy0 (pid: 757,
> ti=f3f6a000
>> task=f3ec3f70 task.ti=f3f6a000)
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290870] Stack:
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290874]? c2705a98 00000000 c04ece6e
>> c04eddf8 00000246 000000d0 000001c4 f35b5300
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290886] <0> 000000d0 000000ff f3f6bedc
>> c04ece98 c07c64d0 00000000 000000c0 f35b9000
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290900] <0> 00000000 f080d000 f3f6bef8
>> c04eddf8 ffffffff f080d000 f3dc8480 00000000
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290914] Call Trace:
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290924]? [<c04ece6e>] ?
>> __alloc_skb+0x2e/0x100
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290931]? [<c04eddf8>] ?
> skb_copy+0x38/0x90
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290938]? [<c04ece98>] ?
>> __alloc_skb+0x58/0x100
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290944]? [<c04eddf8>] ?
> skb_copy+0x38/0x90
>>
>> Oct 11 09:44:52 ??kernel: [? 840.290976]? [<f8e3714d>] ?
>> ieee80211_rx_mgmt_probe_req+0xed/0x130 [mac80211]
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291004]? [<f8e3810d>] ?
>> ieee80211_ibss_rx_queued_mgmt+0x3d/0xf0 [mac80211]
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291012]? [<c04ec5c0>] ?
>> skb_dequeue+0x50/0x70
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291039]? [<f8e38211>] ?
>> ieee80211_ibss_work+0x51/0xd0 [mac80211]
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291049]? [<c0161a4e>] ?
>> run_workqueue+0x8e/0x150
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291075]? [<f8e381c0>] ?
>> ieee80211_ibss_work+0x0/0xd0 [mac80211]
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291084]? [<c0161b94>] ?
>> worker_thread+0x84/0xe0
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291092]? [<c0165e10>] ?
>> autoremove_wake_function+0x0/0x50
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291099]? [<c0161b10>] ?
>> worker_thread+0x0/0xe0
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291106]? [<c01659e4>] ? kthread+0x74/0x80
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291112]? [<c0165970>] ? kthread+0x0/0x80
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291120]? [<c010363e>] ?
>> kernel_thread_helper+0x6/0x10
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291123] Code: ec 75 5c 9c 58 8d 74 26 00
> 89
>> 45 e8 fa 90 8d 74 26 00 64 8b 15 54 e0 8b c0 8b 03 8d 04 02 8b 38 85 ff 0f
>> 84 99 00 00 00 8b 53 10 <8b> 14 17 89 10 8b 45 e8 50 9d 8d 74 26 00 85 ff
> 75
>> 2a 8b 0d e4
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291196] EIP: [<c020cb7c>]
>> __kmalloc_track_caller+0x6c/0x170 SS:ESP 0068:f3f6be94
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291206] CR2: 0000000000000080
>>
>> Oct 11 09:44:52 ??kernel: [? 840.291212] ---[ end trace 34d01f410e93db66
>> ]---
>>
>> ----------------- END OF MESSAGE ------------------
>>
>>
>>
>> Of course this message is only the call trace of the wifi driver, all
>> process running on the system generate a call trace. I am almost certain
>> that the problem come from the WiFi in AdHoc mode, because if I disable
> this
>> feature my system never freeze !
>>
>>
>>
>> I will try with a newer kernel, but I read all the changelog from the
> 2.6.35
>> to 3.0, and I haven't seen any fix about my problem, so I don't think this
>> bug was fixed...
>
> please let us know if this issue occurs in the latest compat build
> http://linuxwireless.org/en/users/Download#Where_to_download_bleeding_edge
> i just tried the same in my 3.1.0rc8- wireless-testing, no freeze
> happened... may be i would have missed something
> please disable network-manager(sudo service network-manager stop)
> before configuring with command
> may be the freeze can occur with the network manager enabled and we
> are trying to create an ad-hoc mode
>
>>
>>
>>
>> Any help will be very appreciated,
>>
>>
>>
>> Best regads,
>>
>> Adrien BARRAL.
>> Robopec.
>>
>>
>>
>> _______________________________________________
>> ath9k-devel mailing list
>> ath9k-devel at lists.ath9k.org
>> https://lists.ath9k.org/mailman/listinfo/ath9k-devel
>>
>>
>
>
>
> --
> shafi
>
>
>
--
shafi
^ permalink raw reply
* Re: [PATCH v2 1/2] irq: Add EXPORT_SYMBOL_GPL to function of irq generic-chip
From: Grant Likely @ 2011-10-24 13:23 UTC (permalink / raw)
To: Nobuhiro Iwamatsu; +Cc: tglx, linux-kernel, mingo
In-Reply-To: <1318817327-4589-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com>
On Mon, Oct 17, 2011 at 11:08:46AM +0900, Nobuhiro Iwamatsu wrote:
> Some functions of irq generic-chip is undefined, because
> EXPORT_SYMBOL_GPL is not set to these.
>
> -----
> ERROR: "irq_setup_generic_chip" [drivers/gpio/gpio-pch.ko] undefined!
> ERROR: "irq_alloc_generic_chip" [drivers/gpio/gpio-pch.ko] undefined!
> ERROR: "irq_setup_generic_chip" [drivers/gpio/gpio-ml-ioh.ko] undefined!
> ERROR: "irq_alloc_generic_chip" [drivers/gpio/gpio-ml-ioh.ko] undefined!
> -----
>
> This is revised that EXPORT_SYMBOL_GPL can be added and referred
> to in functions.
>
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
After getting verbal ack from Thomas, I've merged this via the gpio tree.
g.
> ---
>
> V2: Add EXPORT_SYMBOL_GPL to irq_setup_generic_chip, irq_alloc_generic_chip,
> irq_setup_alt_chip and irq_remove_generic_chip only.
>
> kernel/irq/generic-chip.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c
> index e38544d..6cb7613 100644
> --- a/kernel/irq/generic-chip.c
> +++ b/kernel/irq/generic-chip.c
> @@ -211,6 +211,7 @@ irq_alloc_generic_chip(const char *name, int num_ct, unsigned int irq_base,
> }
> return gc;
> }
> +EXPORT_SYMBOL_GPL(irq_alloc_generic_chip);
>
> /*
> * Separate lockdep class for interrupt chip which can nest irq_desc
> @@ -258,6 +259,7 @@ void irq_setup_generic_chip(struct irq_chip_generic *gc, u32 msk,
> }
> gc->irq_cnt = i - gc->irq_base;
> }
> +EXPORT_SYMBOL_GPL(irq_setup_generic_chip);
>
> /**
> * irq_setup_alt_chip - Switch to alternative chip
> @@ -281,6 +283,7 @@ int irq_setup_alt_chip(struct irq_data *d, unsigned int type)
> }
> return -EINVAL;
> }
> +EXPORT_SYMBOL_GPL(irq_setup_alt_chip);
>
> /**
> * irq_remove_generic_chip - Remove a chip
> @@ -311,6 +314,7 @@ void irq_remove_generic_chip(struct irq_chip_generic *gc, u32 msk,
> irq_modify_status(i, clr, set);
> }
> }
> +EXPORT_SYMBOL_GPL(irq_remove_generic_chip);
>
> #ifdef CONFIG_PM
> static int irq_gc_suspend(void)
> --
> 1.7.7
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" 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.tux.org/lkml/
^ permalink raw reply
* Re: [BUG] Invalid file descriptor.
From: Daniel Wagner @ 2011-10-24 13:23 UTC (permalink / raw)
To: Lucas De Marchi; +Cc: linux-bluetooth
In-Reply-To: <CAMOw1v6Ec=GXvp3nZWa0=vALwWguXO3uo_DHqRJMXyV=_htO_w@mail.gmail.com>
Hi Lucas,
On 10/24/2011 03:19 PM, Lucas De Marchi wrote:
> On Mon, Oct 24, 2011 at 11:14 AM, Daniel Wagner<wagi@monom.org> wrote:
>> To whom it might concern,
>>
>> if bluez is running without an agent and the remote device tries to connect
>> to bluez you are able to trigger the "Invalid file descriptor".
>>
>>
>> bluetoothd[30869]: src/event.c:btd_event_bonding_complete() status 0x00
>> bluetoothd[30869]: src/adapter.c:adapter_get_device() A0:4E:04:F6:F5:05
>> bluetoothd[30869]: src/device.c:device_bonding_complete() bonding (nil)
>> status 0x00
>> bluetoothd[30869]: audio/manager.c:hf_io_cb() Authorization denied!
>>
>> (bluetoothd:30869): GLib-WARNING **: Invalid file descriptor.
>>
>> bluetoothd[30869]: plugins/hciops.c:disconn_complete() handle 44 status 0x00
>> bluetoothd[30869]: src/event.c:btd_event_disconn_complete()
>> bluetoothd[30869]: src/adapter.c:adapter_remove_connection()
>>
>>
>> cheers,
>> daniel
>>
>> ps: I was told to report all crashes and bugs I find. Be prepared. I am a
>> very capable finding bugs :)
>
> What about the patch?
Sure, I will do as soon I have fixed all outstanding ConnMan bugs I
found just recently. In other words don't expect very soon this patch :)
cheers,
daniel
^ permalink raw reply
* [Bug 42117] R200 driver performance, UMS, all mesa versions from 7.6
From: bugzilla-daemon @ 2011-10-24 13:22 UTC (permalink / raw)
To: dri-devel
In-Reply-To: <bug-42117-502@http.bugs.freedesktop.org/>
https://bugs.freedesktop.org/show_bug.cgi?id=42117
--- Comment #2 from Alex Deucher <agd5f@yahoo.com> 2011-10-24 06:22:51 PDT ---
Is there some reason why you want to use UMS? It's not really supported any
more.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply
* Re: [CONSOLIDATED PULL 11/27] pulseaudio-0.9.23: inherit perlnative to work around build on host without XML/Parser.pm
From: Richard Purdie @ 2011-10-24 13:15 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
In-Reply-To: <6038b7e0961ca4aec70cc6de8adbc79567500e2b.1319394187.git.sgw@linux.intel.com>
On Sun, 2011-10-23 at 11:26 -0700, Saul Wold wrote:
> From: Martin Jansa <Martin.Jansa@gmail.com>
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
> .../pulseaudio/pulseaudio_0.9.23.bb | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.23.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.23.bb
> index 33f5e15..4ac2418 100644
> --- a/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.23.bb
> +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.23.bb
> @@ -4,7 +4,7 @@ PR = "r5"
>
> DEPENDS += "gdbm speex"
>
> -inherit gettext
> +inherit gettext perlnative
This doesn't look right. If we need xmlparser, we should state that in
DEPENDS. If that is added to DEPENDS, I'm not sure we still need the
inherit of perlnative?
Cheers,
Richard
^ permalink raw reply
* [PATCH] Shrink thread_info a bit
From: Russell King - ARM Linux @ 2011-10-24 13:20 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20111024131853.GA4250@mudshark.cambridge.arm.com>
On Mon, Oct 24, 2011 at 02:18:53PM +0100, Will Deacon wrote:
> Hi Russell,
>
> On Mon, Oct 24, 2011 at 01:48:18PM +0100, Russell King - ARM Linux wrote:
> > diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
> > index 7b5cc8d..a030be7 100644
> > --- a/arch/arm/include/asm/thread_info.h
> > +++ b/arch/arm/include/asm/thread_info.h
> > @@ -59,7 +59,9 @@ struct thread_info {
> > __u32 syscall; /* syscall number */
> > __u8 used_cp[16]; /* thread used copro */
> > unsigned long tp_value;
> > +#ifdef CONFIG_CRUNCH
> > struct crunch_state crunchstate;
> > +#endif
> > union fp_state fpstate __attribute__((aligned(8)));
>
> Can we also shrink the contents of fp_state when AEABI && !OABI_COMPAT?
> It's slightly more involved as ptrace and core-dumping would need some
> similar treatment. We probably need to keep the union kicking around
> though, since the iwmmxt state is held in there.
This patch is the nice easy bit - doing the same with the fpstate would
be much more involved because thre's also bits of assembly which would
be impacted as well.
^ permalink raw reply
* Re: [CONSOLIDATED PULL 26/27] abiword: convert to svn
From: Richard Purdie @ 2011-10-24 13:14 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
In-Reply-To: <dfc5efb4c54797a39c2471dfba7b7cbf14fb6476.1319394187.git.sgw@linux.intel.com>
On Sun, 2011-10-23 at 11:27 -0700, Saul Wold wrote:
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
> meta-demoapps/recipes-gnome/abiword/abiword.inc | 4 ++--
> meta-demoapps/recipes-gnome/abiword/abiword_cvs.bb | 10 ----------
> meta-demoapps/recipes-gnome/abiword/abiword_svn.bb | 10 ++++++++++
> 3 files changed, 12 insertions(+), 12 deletions(-)
> delete mode 100644 meta-demoapps/recipes-gnome/abiword/abiword_cvs.bb
> create mode 100644 meta-demoapps/recipes-gnome/abiword/abiword_svn.bb
>
> diff --git a/meta-demoapps/recipes-gnome/abiword/abiword.inc b/meta-demoapps/recipes-gnome/abiword/abiword.inc
> index b1b0f67..2b34a7a 100644
> --- a/meta-demoapps/recipes-gnome/abiword/abiword.inc
> +++ b/meta-demoapps/recipes-gnome/abiword/abiword.inc
> @@ -13,8 +13,8 @@ RRECOMMENDS_${PN} = "glibc-gconv-ibm850 glibc-gconv-cp1252 \
> RELURI = "http://www.abiword.org/downloads/abiword/${PV}/source/abiword-${PV}.tar.gz"
> RELSRC = "${WORKDIR}/abiword-${PV}/abi"
>
> -CVSURI = "cvs://anoncvs:anoncvs@anoncvs.abisource.com/cvsroot;module=abi"
> -CVSSRC = "${WORKDIR}/abi"
> +SVNURI = "cvs://svn.abisource.com/abiword/trunk;module=abiword;proto=http"
> +SVNSRC = "${WORKDIR}/abi"
>
Er, its still using cvs:// ?!
Cheers,
Richard
^ permalink raw reply
* Re: [BUG] Invalid file descriptor.
From: Lucas De Marchi @ 2011-10-24 13:19 UTC (permalink / raw)
To: Daniel Wagner; +Cc: linux-bluetooth
In-Reply-To: <4EA564C1.8070402@monom.org>
Hi Daniel,
On Mon, Oct 24, 2011 at 11:14 AM, Daniel Wagner <wagi@monom.org> wrote:
> To whom it might concern,
>
> if bluez is running without an agent and the remote device tries to connect
> to bluez you are able to trigger the "Invalid file descriptor".
>
>
> bluetoothd[30869]: src/event.c:btd_event_bonding_complete() status 0x00
> bluetoothd[30869]: src/adapter.c:adapter_get_device() A0:4E:04:F6:F5:05
> bluetoothd[30869]: src/device.c:device_bonding_complete() bonding (nil)
> status 0x00
> bluetoothd[30869]: audio/manager.c:hf_io_cb() Authorization denied!
>
> (bluetoothd:30869): GLib-WARNING **: Invalid file descriptor.
>
> bluetoothd[30869]: plugins/hciops.c:disconn_complete() handle 44 status 0x00
> bluetoothd[30869]: src/event.c:btd_event_disconn_complete()
> bluetoothd[30869]: src/adapter.c:adapter_remove_connection()
>
>
> cheers,
> daniel
>
> ps: I was told to report all crashes and bugs I find. Be prepared. I am a
> very capable finding bugs :)
What about the patch?
Lucas De Marchi
^ permalink raw reply
* [PATCH] Shrink thread_info a bit
From: Will Deacon @ 2011-10-24 13:18 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20111024124818.GA17693@n2100.arm.linux.org.uk>
Hi Russell,
On Mon, Oct 24, 2011 at 01:48:18PM +0100, Russell King - ARM Linux wrote:
> diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
> index 7b5cc8d..a030be7 100644
> --- a/arch/arm/include/asm/thread_info.h
> +++ b/arch/arm/include/asm/thread_info.h
> @@ -59,7 +59,9 @@ struct thread_info {
> __u32 syscall; /* syscall number */
> __u8 used_cp[16]; /* thread used copro */
> unsigned long tp_value;
> +#ifdef CONFIG_CRUNCH
> struct crunch_state crunchstate;
> +#endif
> union fp_state fpstate __attribute__((aligned(8)));
Can we also shrink the contents of fp_state when AEABI && !OABI_COMPAT?
It's slightly more involved as ptrace and core-dumping would need some
similar treatment. We probably need to keep the union kicking around
though, since the iwmmxt state is held in there.
Will
^ permalink raw reply
* [U-Boot] Accessing MC13783 RTC registers
From: Fabio Estevam @ 2011-10-24 13:18 UTC (permalink / raw)
To: u-boot
Hi,
Running U-boot from top of tree imx git I get the following when
trying to access the MC13783 RTC registers via 'date' command:
MX31PDK U-Boot > date
<reg num> = 22 is invalid. Should be less than 0
## Get date failed
Does anyone else see this same problem on other boards?
Regards,
Fabio Estevam
^ 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.