Cleanup non-arch xtime uses, use get_seconds() or current_kernel_time().

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2c6b47de17c75d553de3e2fb426d8298d2074585
Commit: 2c6b47de17c75d553de3e2fb426d8298d2074585
Parent: 0de085bb474f64e4fdb2f1ff3268590792648c7b
Author: john stultz <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 24 17:47:43 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 10:09:20 2007 -0700

Cleanup non-arch xtime uses, use get_seconds() or current_kernel_time().

This avoids use of the kernel-internal "xtime" variable directly outside
of the actual time-related functions.  Instead, use the helper functions
that we already have available to us.

This doesn't actually change any behaviour, but this will allow us to
fix the fact that "xtime" isn't updated very often with CONFIG_NO_HZ
(because much of the realtime information is maintained as separate
offsets to 'xtime'), which has caused interfaces that use xtime directly
to get a time that is out of sync with the real-time clock by up to a
third of a second or so.

Signed-off-by: John Stultz <[EMAIL PROTECTED]>
Cc: Ingo Molnar <[EMAIL PROTECTED]>
Cc: Thomas Gleixner <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/rtc/class.c|5 +++--
 drivers/s390/net/ctcmain.c |6 +++---
 drivers/s390/net/netiucv.c |4 ++--
 include/linux/time.h   |2 +-
 kernel/acct.c  |2 +-
 kernel/hrtimer.c   |2 +-
 kernel/time.c  |   16 
 kernel/time/timekeeping.c  |   16 
 kernel/tsacct.c|2 +-
 net/rxrpc/af_rxrpc.c   |2 +-
 net/rxrpc/ar-connection.c  |4 ++--
 net/rxrpc/ar-transport.c   |4 ++--
 net/rxrpc/rxkad.c  |2 +-
 13 files changed, 34 insertions(+), 33 deletions(-)

diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index 8b3cd31..10ab3b7 100644
--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@ -46,6 +46,7 @@ static int rtc_suspend(struct device *dev, pm_message_t mesg)
 {
struct rtc_device   *rtc = to_rtc_device(dev);
struct rtc_time tm;
+   struct timespec ts = current_kernel_time();
 
if (strncmp(rtc->dev.bus_id,
CONFIG_RTC_HCTOSYS_DEVICE,
@@ -57,8 +58,8 @@ static int rtc_suspend(struct device *dev, pm_message_t mesg)
 
/* RTC precision is 1 second; adjust delta for avg 1/2 sec err */
set_normalized_timespec(&delta,
-   xtime.tv_sec - oldtime,
-   xtime.tv_nsec - (NSEC_PER_SEC >> 1));
+   ts.tv_sec - oldtime,
+   ts.tv_nsec - (NSEC_PER_SEC >> 1));
 
return 0;
 }
diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c
index b20fd06..92e8a37 100644
--- a/drivers/s390/net/ctcmain.c
+++ b/drivers/s390/net/ctcmain.c
@@ -674,7 +674,7 @@ ch_action_txdone(fsm_instance * fi, int event, void *arg)
int first = 1;
int i;
unsigned long duration;
-   struct timespec done_stamp = xtime;
+   struct timespec done_stamp = current_kernel_time();
 
DBF_TEXT(trace, 4, __FUNCTION__);
 
@@ -730,7 +730,7 @@ ch_action_txdone(fsm_instance * fi, int event, void *arg)
spin_unlock(&ch->collect_lock);
ch->ccw[1].count = ch->trans_skb->len;
fsm_addtimer(&ch->timer, CTC_TIMEOUT_5SEC, CH_EVENT_TIMER, ch);
-   ch->prof.send_stamp = xtime;
+   ch->prof.send_stamp = current_kernel_time();
rc = ccw_device_start(ch->cdev, &ch->ccw[0],
  (unsigned long) ch, 0xff, 0);
ch->prof.doios_multi++;
@@ -2281,7 +2281,7 @@ transmit_skb(struct channel *ch, struct sk_buff *skb)
fsm_newstate(ch->fsm, CH_STATE_TX);
fsm_addtimer(&ch->timer, CTC_TIMEOUT_5SEC, CH_EVENT_TIMER, ch);
spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags);
-   ch->prof.send_stamp = xtime;
+   ch->prof.send_stamp = current_kernel_time();
rc = ccw_device_start(ch->cdev, &ch->ccw[ccw_idx],
  (unsigned long) ch, 0xff, 0);
spin_unlock_irqrestore(get_ccwdev_lock(ch->cdev), saveflags);
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c
index 3d28e1a..2688894 100644
--- a/drivers/s390/net/netiucv.c
+++ b/drivers/s390/net/netiucv.c
@@ -753,7 +753,7 @@ static void conn_action_txdone(fsm_instance *fi, int event, 
void *arg)
 
header.next = 0;
memcpy(skb_put(conn->tx_buff, NETIUCV_HDRLEN), &header, NETIUCV_HDRLEN);
-   conn->prof.send_stamp = xtime;
+   conn->prof.send_stamp = current_kernel_time();
txmsg.class = 0;
txmsg.tag = 0;
rc = iucv_message_send(conn->path, &txmsg, 0, 0,
@@ -1185,7 

[x86 setup] Make struct ist_info cross-architecture, and use in setup code

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=238b706da1c6ebacc55986ac8668f3ede4621f2c
Commit: 238b706da1c6ebacc55986ac8668f3ede4621f2c
Parent: f77b1ab383c8745447a3385e25729b92f2ec58a4
Author: H. Peter Anvin <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 18 17:19:30 2007 -0700
Committer:  H. Peter Anvin <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 12:02:21 2007 -0700

[x86 setup] Make struct ist_info cross-architecture, and use in setup code

Make "struct ist_info" valid on both i386 and x86-64, and use the
structure by name in the setup code.  Additionally, "Intel SpeedStep
IST" is redundant, refer to it as IST consistently.

Signed-off-by: H. Peter Anvin <[EMAIL PROTECTED]>
---
 arch/i386/boot/main.c|   16 
 include/asm-i386/bootparam.h |5 +++--
 include/asm-i386/ist.h   |   10 ++
 include/asm-x86_64/ist.h |1 +
 4 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/arch/i386/boot/main.c b/arch/i386/boot/main.c
index 7f01f96..0eeef39 100644
--- a/arch/i386/boot/main.c
+++ b/arch/i386/boot/main.c
@@ -73,15 +73,15 @@ static void keyboard_set_repeat(void)
 }
 
 /*
- * Get Intel SpeedStep IST information.
+ * Get Intel SpeedStep (IST) information.
  */
-static void query_speedstep_ist(void)
+static void query_ist(void)
 {
asm("int $0x15"
-   : "=a" (boot_params.speedstep_info[0]),
- "=b" (boot_params.speedstep_info[1]),
- "=c" (boot_params.speedstep_info[2]),
- "=d" (boot_params.speedstep_info[3])
+   : "=a" (boot_params.ist_info.signature),
+ "=b" (boot_params.ist_info.command),
+ "=c" (boot_params.ist_info.event),
+ "=d" (boot_params.ist_info.perf_level)
: "a" (0xe980),  /* IST Support */
  "d" (0x47534943)); /* Request value */
 }
@@ -144,8 +144,8 @@ void main(void)
query_voyager();
 #endif
 
-   /* Query SpeedStep IST information */
-   query_speedstep_ist();
+   /* Query Intel SpeedStep (IST) information */
+   query_ist();
 
/* Query APM information */
 #if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
diff --git a/include/asm-i386/bootparam.h b/include/asm-i386/bootparam.h
index 211f3f9..b91b017 100644
--- a/include/asm-i386/bootparam.h
+++ b/include/asm-i386/bootparam.h
@@ -4,8 +4,9 @@
 #include 
 #include 
 #include 
-#include 
 #include 
+#include 
+#include 
 #include 
 
 struct setup_header {
@@ -59,7 +60,7 @@ struct boot_params {
struct screen_info screen_info; /* 0x000 */
struct apm_bios_info apm_bios_info; /* 0x040 */
u8  _pad2[12];  /* 0x054 */
-   u32 speedstep_info[4];  /* 0x060 */
+   struct ist_info ist_info;   /* 0x060 */
u8  _pad3[16];  /* 0x070 */
u8  hd0_info[16];   /* obsolete! */ /* 0x080 */
u8  hd1_info[16];   /* obsolete! */ /* 0x090 */
diff --git a/include/asm-i386/ist.h b/include/asm-i386/ist.h
index d13d1e6..ef2003e 100644
--- a/include/asm-i386/ist.h
+++ b/include/asm-i386/ist.h
@@ -19,11 +19,13 @@
 
 #ifdef __KERNEL__
 
+#include 
+
 struct ist_info {
-   unsigned long   signature;
-   unsigned long   command;
-   unsigned long   event;
-   unsigned long   perf_level;
+   u32 signature;
+   u32 command;
+   u32 event;
+   u32 perf_level;
 };
 
 extern struct ist_info ist_info;
diff --git a/include/asm-x86_64/ist.h b/include/asm-x86_64/ist.h
new file mode 100644
index 000..338857e
--- /dev/null
+++ b/include/asm-x86_64/ist.h
@@ -0,0 +1 @@
+#include 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


kbuild: do not do section mismatch checks on vmlinux in 2nd pass

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8d8d8289df65cb116d2721becafb37272074f25a
Commit: 8d8d8289df65cb116d2721becafb37272074f25a
Parent: 80492cc797ea15572de8eac766cbf606626ee338
Author: Sam Ravnborg <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 20 22:36:56 2007 +0200
Committer:  Sam Ravnborg <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 21:14:15 2007 +0200

kbuild: do not do section mismatch checks on vmlinux in 2nd pass

We already check and warn about section mismatches from vmlinux
(build as vmlinux.o) during first pass so skip the checks
during the 2nd pass where we process modules.

Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
---
 scripts/Makefile.modpost |   19 ++-
 scripts/mod/modpost.c|   13 ++---
 2 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index c6fcc59..1818c50 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -56,23 +56,24 @@ _modpost: $(if $(KBUILD_MODPOST_NOFINAL), 
$(modules:.ko:.o),$(modules))
 
 # Step 2), invoke modpost
 #  Includes step 3,4
+modpost = scripts/mod/modpost\
+ $(if $(CONFIG_MODVERSIONS),-m)  \
+ $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,)   \
+ $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile)   \
+ $(if $(KBUILD_EXTMOD),-I $(modulesymfile))  \
+ $(if $(KBUILD_EXTMOD),-o $(modulesymfile))  \
+ $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w)
+
 quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules
-  cmd_modpost = scripts/mod/modpost\
-$(if $(CONFIG_MODVERSIONS),-m) \
-   $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,)  \
-   $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
-   $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
-   $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
-   $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w)
+  cmd_modpost = $(modpost) -s
 
 PHONY += __modpost
 __modpost: $(modules:.ko=.o) FORCE
$(call cmd,modpost) $(wildcard vmlinux) $(filter-out FORCE,$^)
 
 quiet_cmd_kernel-mod = MODPOST $@
-  cmd_kernel-mod = $(cmd_modpost) $@
+  cmd_kernel-mod = $(modpost) $@
 
-PHONY += vmlinux
 vmlinux.o: FORCE
$(call cmd,kernel-mod)
 
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 5ab7914..87e3ee5 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -23,6 +23,8 @@ int have_vmlinux = 0;
 static int all_versions = 0;
 /* If we are modposting external module set to 1 */
 static int external_module = 0;
+/* Warn about section mismatch in vmlinux if set to 1 */
+static int vmlinux_section_warnings = 1;
 /* Only warn about unresolved symbols */
 static int warn_unresolved = 0;
 /* How a symbol is exported */
@@ -1257,8 +1259,10 @@ static void read_symbols(char *modname)
handle_modversions(mod, &info, sym, symname);
handle_moddevtable(mod, &info, sym, symname);
}
-   check_sec_ref(mod, modname, &info, init_section, init_section_ref_ok);
-   check_sec_ref(mod, modname, &info, exit_section, exit_section_ref_ok);
+   if (is_vmlinux(modname) && vmlinux_section_warnings) {
+   check_sec_ref(mod, modname, &info, init_section, 
init_section_ref_ok);
+   check_sec_ref(mod, modname, &info, exit_section, 
exit_section_ref_ok);
+   }
 
version = get_modinfo(info.modinfo, info.modinfo_len, "version");
if (version)
@@ -1626,7 +1630,7 @@ int main(int argc, char **argv)
int opt;
int err;
 
-   while ((opt = getopt(argc, argv, "i:I:mo:aw")) != -1) {
+   while ((opt = getopt(argc, argv, "i:I:mso:aw")) != -1) {
switch(opt) {
case 'i':
kernel_read = optarg;
@@ -1644,6 +1648,9 @@ int main(int argc, char **argv)
case 'a':
all_versions = 1;
break;
+   case 's':
+   vmlinux_section_warnings = 0;
+   break;
case 'w':
warn_unresolved = 1;
break;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[IA64] vector-domain - fix vector_table

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6ffbc82351c62aeb9e817ddf93049353493d
Commit: 6ffbc82351c62aeb9e817ddf93049353493d
Parent: 8f5ad1a8227aa110d633b5ed04dde535381c16c7
Author: Kenji Kaneshige <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 17:59:22 2007 +0900
Committer:  Tony Luck <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 11:09:01 2007 -0700

[IA64] vector-domain - fix vector_table

Fix wrong access to vector_table[].

Signed-off-by: Kenji Kaneshige <[EMAIL PROTECTED]>
Signed-off-by: Tony Luck <[EMAIL PROTECTED]>
---
 arch/ia64/kernel/irq_ia64.c |   21 ++---
 1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index 158eafb..fcb7733 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -85,8 +85,8 @@ DEFINE_PER_CPU(int[IA64_NUM_VECTORS], vector_irq) = {
[0 ... IA64_NUM_VECTORS - 1] = IA64_SPURIOUS_INT_VECTOR
 };
 
-static cpumask_t vector_table[IA64_MAX_DEVICE_VECTORS] = {
-   [0 ... IA64_MAX_DEVICE_VECTORS - 1] = CPU_MASK_NONE
+static cpumask_t vector_table[IA64_NUM_VECTORS] = {
+   [0 ... IA64_NUM_VECTORS - 1] = CPU_MASK_NONE
 };
 
 static int irq_status[NR_IRQS] = {
@@ -123,17 +123,18 @@ static inline int find_unassigned_irq(void)
 static inline int find_unassigned_vector(cpumask_t domain)
 {
cpumask_t mask;
-   int pos;
+   int pos, vector;
 
cpus_and(mask, domain, cpu_online_map);
if (cpus_empty(mask))
return -EINVAL;
 
for (pos = 0; pos < IA64_NUM_DEVICE_VECTORS; pos++) {
-   cpus_and(mask, domain, vector_table[pos]);
+   vector = IA64_FIRST_DEVICE_VECTOR + pos;
+   cpus_and(mask, domain, vector_table[vector]);
if (!cpus_empty(mask))
continue;
-   return IA64_FIRST_DEVICE_VECTOR + pos;
+   return vector;
}
return -ENOSPC;
 }
@@ -141,7 +142,7 @@ static inline int find_unassigned_vector(cpumask_t domain)
 static int __bind_irq_vector(int irq, int vector, cpumask_t domain)
 {
cpumask_t mask;
-   int cpu, pos;
+   int cpu;
struct irq_cfg *cfg = &irq_cfg[irq];
 
cpus_and(mask, domain, cpu_online_map);
@@ -156,8 +157,7 @@ static int __bind_irq_vector(int irq, int vector, cpumask_t 
domain)
cfg->vector = vector;
cfg->domain = domain;
irq_status[irq] = IRQ_USED;
-   pos = vector - IA64_FIRST_DEVICE_VECTOR;
-   cpus_or(vector_table[pos], vector_table[pos], domain);
+   cpus_or(vector_table[vector], vector_table[vector], domain);
return 0;
 }
 
@@ -174,7 +174,7 @@ int bind_irq_vector(int irq, int vector, cpumask_t domain)
 
 static void __clear_irq_vector(int irq)
 {
-   int vector, cpu, pos;
+   int vector, cpu;
cpumask_t mask;
cpumask_t domain;
struct irq_cfg *cfg = &irq_cfg[irq];
@@ -189,8 +189,7 @@ static void __clear_irq_vector(int irq)
cfg->vector = IRQ_VECTOR_UNASSIGNED;
cfg->domain = CPU_MASK_NONE;
irq_status[irq] = IRQ_UNUSED;
-   pos = vector - IA64_FIRST_DEVICE_VECTOR;
-   cpus_andnot(vector_table[pos], vector_table[pos], domain);
+   cpus_andnot(vector_table[vector], vector_table[vector], domain);
 }
 
 static void clear_irq_vector(int irq)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


kbuild: be more foregiving on init section naming

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=83cda2bb37cb8476cd84659d9698ab48553be974
Commit: 83cda2bb37cb8476cd84659d9698ab48553be974
Parent: 2f5ee619045d923de9137b6a263a99cc2428391a
Author: Sam Ravnborg <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 21:52:31 2007 +0200
Committer:  Sam Ravnborg <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 21:52:31 2007 +0200

kbuild: be more foregiving on init section naming

In the whitelist function of modpost now use the same
check to identify init_section as in other places of modpost.
This has the effect that we now recognize sections named
.init.text.19 as init sections and we no longer warn
when we see these.

At the same time make surrounding code readable by dropping
use of temporary flags.

Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
---
 scripts/mod/modpost.c |   36 ++--
 1 files changed, 10 insertions(+), 26 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index c903a16..3db4edc 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -658,8 +658,8 @@ static int data_section(const char *name)
  *   These functions may often be marked __init and we do not want to
  *   warn here.
  *   the pattern is identified by:
- *   tosec   = .init.text | .exit.text | .init.data
- *   fromsec = .data | .data.rel | .data.rel.*
+ *   tosec   = init or exit section
+ *   fromsec = data section
  *   atsym = *driver, *_template, *_sht, *_ops, *_probe, *probe_one, 
*_console, *_timer
  *
  * Pattern 3:
@@ -680,7 +680,6 @@ static int secref_whitelist(const char *modname, const char 
*tosec,
const char *fromsec, const char *atsym,
const char *refsymname)
 {
-   int f1 = 1, f2 = 1;
const char **s;
const char *pat2sym[] = {
"driver",
@@ -707,31 +706,16 @@ static int secref_whitelist(const char *modname, const 
char *tosec,
return 1;
 
/* Check for pattern 1 */
-   if (strcmp(tosec, ".init.data") != 0)
-   f1 = 0;
-   if (strncmp(fromsec, ".data", strlen(".data")) != 0)
-   f1 = 0;
-   if (strncmp(atsym, "__param", strlen("__param")) != 0)
-   f1 = 0;
-
-   if (f1)
-   return f1;
+   if ((strcmp(tosec, ".init.data") == 0) &&
+   (strncmp(fromsec, ".data", strlen(".data")) == 0) &&
+   (strncmp(atsym, "__param", strlen("__param")) == 0))
+   return 1;
 
/* Check for pattern 2 */
-   if ((strcmp(tosec, ".init.text") != 0) &&
-   (strcmp(tosec, ".exit.text") != 0) &&
-   (strcmp(tosec, ".init.data") != 0))
-   f2 = 0;
-   if ((strcmp(fromsec, ".data") != 0) &&
-   (strcmp(fromsec, ".data.rel") != 0) &&
-   (strncmp(fromsec, ".data.rel.", strlen(".data.rel.")) != 0))
-   f2 = 0;
-
-   for (s = pat2sym; *s; s++)
-   if (strrcmp(atsym, *s) == 0)
-   f1 = 1;
-   if (f1 && f2)
-   return 1;
+   if ((init_section(tosec) || exit_section(tosec)) && 
data_section(fromsec))
+   for (s = pat2sym; *s; s++)
+   if (strrcmp(atsym, *s) == 0)
+   return 1;
 
/* Check for pattern 3 */
if ((strcmp(fromsec, ".text.head") == 0) &&
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


kconfig: remove unused members from struct symbol

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1edf1c00acf8d9b60d436d6a0a55e395353a446c
Commit: 1edf1c00acf8d9b60d436d6a0a55e395353a446c
Parent: 03d29122738f0bd81afd44b1f566e64ebf8d06fe
Author: Sam Ravnborg <[EMAIL PROTECTED]>
AuthorDate: Sat Jul 21 00:05:26 2007 +0200
Committer:  Sam Ravnborg <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 21:14:30 2007 +0200

kconfig: remove unused members from struct symbol

dep and dep2 in struct symbol was unused - remove them.

Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
Cc: Roman Zippel <[EMAIL PROTECTED]>
---
 scripts/kconfig/expr.h |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index d6c33ce..a195986 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -77,7 +77,6 @@ struct symbol {
tristate visible;
int flags;
struct property *prop;
-   struct expr *dep, *dep2;
struct expr_value rev_dep;
 };
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


kbuild: fix up printing of Linux C Library version in scripts/ver_linux

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4a645d5ea65baaa5736bcb566673bf4a351b2ad8
Commit: 4a645d5ea65baaa5736bcb566673bf4a351b2ad8
Parent: 8d8d8289df65cb116d2721becafb37272074f25a
Author: Jesper Juhl <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 20 02:49:23 2007 +0200
Committer:  Sam Ravnborg <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 21:14:20 2007 +0200

kbuild: fix up printing of Linux C Library version in scripts/ver_linux

I noticed, when running scripts/ver_linux on both a Gentoo system
and a Slackware system, that the line printing the C library
version looked a little odd. So I fixed it up to be in line with
all the rest.

  Old output:
Linux C Library> libc.2.5
  New output:
Linux C Library2.5

Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>
Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
---
 scripts/ver_linux |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/ver_linux b/scripts/ver_linux
index 72876df..8f8df93 100755
--- a/scripts/ver_linux
+++ b/scripts/ver_linux
@@ -66,8 +66,8 @@ showmount --version 2>&1 | grep nfs-utils | awk \
 'NR==1{print "nfs-utils ", $NF}'
 
 ls -l `ldd /bin/sh | awk '/libc/{print $3}'` | sed \
--e 's/\.so$//' | awk -F'[.-]'   '{print "Linux C Library" \
-$(NF-2)"."$(NF-1)"."$NF}'
+-e 's/\.so$//' | sed -e 's/>//' | \
+awk -F'[.-]' '{print "Linux C Library"$(NF-1)"."$NF}'
 
 ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \
 'NR==1{print "Dynamic linker (ldd)  ", $NF}'
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


kbuild: fix modpost warnings for xtensa

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cb7e51d8b1f8e2390970f4bb7d095c414b1bf3cf
Commit: cb7e51d8b1f8e2390970f4bb7d095c414b1bf3cf
Parent: 83cda2bb37cb8476cd84659d9698ab48553be974
Author: Sam Ravnborg <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 22:24:52 2007 +0200
Committer:  Sam Ravnborg <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 22:24:52 2007 +0200

kbuild: fix modpost warnings for xtensa

The Xtensa architecture places literal pools in sections separate
from the instructions. The corresponsing text sections, therefore,
reference the .literal section, and we have to suppress those
warnings.

The naming convention defines the name for a literal
section as .SECTION.literal, unless .SECTION is .text. In that case
the name is only .literal. Using strncmp() instead of strcmp()
to compare the from-section with .SECTION.init.refok in pattern 0
should not cause any regressions for other architectures.

We also need to suppress warnings for two informational
sections (.xt.lit and .xt.prop) used by the Xtensa architecture.

Signed-off-by: Chris Zankel <[EMAIL PROTECTED]>
Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
---
 scripts/mod/modpost.c |   30 --
 1 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 3db4edc..ee58ded 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -640,7 +640,7 @@ static int data_section(const char *name)
  * Pattern 0:
  *   Do not warn if funtion/data are marked with __init_refok/__initdata_refok.
  *   The pattern is identified by:
- *   fromsec = .text.init.refok | .data.init.refok
+ *   fromsec = .text.init.refok* | .data.init.refok*
  *
  * Pattern 1:
  *   If a module parameter is declared __initdata and permissions=0
@@ -675,11 +675,18 @@ static int data_section(const char *name)
  *   This pattern is identified by
  *   refsymname = __init_begin, _sinittext, _einittext
  *
+ * Pattern 5:
+ *   Xtensa uses literal sections for constants that are accessed PC-relative.
+ *   Literal sections may safely reference their text sections.
+ *   (Note that the name for the literal section omits any trailing '.text')
+ *   tosec = [.text]
+ *   fromsec = .literal
  **/
 static int secref_whitelist(const char *modname, const char *tosec,
const char *fromsec, const char *atsym,
const char *refsymname)
 {
+   int len;
const char **s;
const char *pat2sym[] = {
"driver",
@@ -701,8 +708,8 @@ static int secref_whitelist(const char *modname, const char 
*tosec,
};
 
/* Check for pattern 0 */
-   if ((strcmp(fromsec, ".text.init.refok") == 0) ||
-   (strcmp(fromsec, ".data.init.refok") == 0))
+   if ((strncmp(fromsec, ".text.init.refok", strlen(".text.init.refok")) 
== 0) ||
+   (strncmp(fromsec, ".data.init.refok", strlen(".data.init.refok")) 
== 0))
return 1;
 
/* Check for pattern 1 */
@@ -728,6 +735,15 @@ static int secref_whitelist(const char *modname, const 
char *tosec,
if (strcmp(refsymname, *s) == 0)
return 1;
 
+   /* Check for pattern 5 */
+   if (strrcmp(tosec, ".text") == 0)
+   len = strlen(tosec) - strlen(".text");
+   else
+   len = strlen(tosec);
+   if ((strncmp(tosec, fromsec, len) == 0) && (strlen(fromsec) > len) &&
+   (strcmp(fromsec + len, ".literal") == 0))
+   return 1;
+
return 0;
 }
 
@@ -856,9 +872,9 @@ static void warn_sec_mismatch(const char *modname, const 
char *fromsec,
refsymname = elf->strtab + refsym->st_name;
 
/* check whitelist - we may ignore it */
-   if (before &&
-   secref_whitelist(modname, secname, fromsec,
-elf->strtab + before->st_name, refsymname))
+   if (secref_whitelist(modname, secname, fromsec,
+before ? elf->strtab + before->st_name : "",
+refsymname))
return;
 
if (before && after) {
@@ -,6 +1127,8 @@ static int initexit_section_ref_ok(const char *name)
".smp_locks",
".stab",
".m68k_fixup",
+   ".xt.prop", /* xtensa informational section */
+   ".xt.lit",  /* xtensa informational section */
NULL
};
/* Start of section names */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[IA64] vector-domain - handle assign_irq_vector(AUTO_ASSIGN)

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8f5ad1a8227aa110d633b5ed04dde535381c16c7
Commit: 8f5ad1a8227aa110d633b5ed04dde535381c16c7
Parent: 0de085bb474f64e4fdb2f1ff3268590792648c7b
Author: Yasuaki Ishimatsu <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 24 22:09:09 2007 +0900
Committer:  Tony Luck <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 11:05:48 2007 -0700

[IA64] vector-domain - handle assign_irq_vector(AUTO_ASSIGN)

This change fixes a panic when assign_irq_vector(irq) is called with
irq = AUTO_ASSIGN.

Signed-off-by: Yasuaki Ishimatsu <[EMAIL PROTECTED]>
Signed-off-by: Tony Luck <[EMAIL PROTECTED]>
---
 arch/ia64/kernel/irq_ia64.c |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index 91797c1..158eafb 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -212,9 +212,6 @@ assign_irq_vector (int irq)
vector = -ENOSPC;
 
spin_lock_irqsave(&vector_lock, flags);
-   if (irq < 0) {
-   goto out;
-   }
for_each_online_cpu(cpu) {
domain = vector_allocation_domain(cpu);
vector = find_unassigned_vector(domain);
@@ -223,6 +220,8 @@ assign_irq_vector (int irq)
}
if (vector < 0)
goto out;
+   if (irq == AUTO_ASSIGN)
+   irq = vector;
BUG_ON(__bind_irq_vector(irq, vector, domain));
  out:
spin_unlock_irqrestore(&vector_lock, flags);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[IA64] fix section mismatch warnings

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9d6f40b86b47928ffde8a41cb2ef332da34b3de2
Commit: 9d6f40b86b47928ffde8a41cb2ef332da34b3de2
Parent: 3b74d18e54e20fc1d398eb391bea5b9aed22aca5
Author: Tony Luck <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 20 14:39:24 2007 -0700
Committer:  Tony Luck <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 13:08:26 2007 -0700

[IA64] fix section mismatch warnings

In 741f98fe298a73c9d47ed53703c1279a29718581 Sam added full
checking across the entire vmlinux image.  This flushed out
a dozen new section mismatch warnings.  Start the whack-a-mole
game again to stomp them out.

Signed-off-by: Tony Luck <[EMAIL PROTECTED]>
---
 arch/ia64/kernel/head.S|4 +++-
 arch/ia64/kernel/smpboot.c |6 +++---
 arch/ia64/kernel/vmlinux.lds.S |2 ++
 include/asm-ia64/smp.h |1 -
 4 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S
index 44d540e..4e5e275 100644
--- a/arch/ia64/kernel/head.S
+++ b/arch/ia64/kernel/head.S
@@ -178,7 +178,7 @@ swapper_pg_dir:
 halt_msg:
stringz "Halting kernel\n"
 
-   .text
+   .section .text.head,"ax"
 
.global start_ap
 
@@ -392,6 +392,8 @@ self:   hint @pause
br.sptk.many self   // endless loop
 END(_start)
 
+   .text
+
 GLOBAL_ENTRY(ia64_save_debug_regs)
alloc r16=ar.pfs,1,0,0,0
mov r20=ar.lc   // preserve ar.lc
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 9f5c90b..62209dc 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -487,7 +487,7 @@ struct create_idle {
int cpu;
 };
 
-void
+void __cpuinit
 do_fork_idle(struct work_struct *work)
 {
struct create_idle *c_idle =
@@ -497,7 +497,7 @@ do_fork_idle(struct work_struct *work)
complete(&c_idle->done);
 }
 
-static int __devinit
+static int __cpuinit
 do_boot_cpu (int sapicid, int cpu)
 {
int timeout;
@@ -808,7 +808,7 @@ set_cpu_sibling_map(int cpu)
}
 }
 
-int __devinit
+int __cpuinit
 __cpu_up (unsigned int cpu)
 {
int ret;
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
index 860f251..83e8067 100644
--- a/arch/ia64/kernel/vmlinux.lds.S
+++ b/arch/ia64/kernel/vmlinux.lds.S
@@ -50,6 +50,8 @@ SECTIONS
KPROBES_TEXT
*(.gnu.linkonce.t*)
 }
+  .text.head : AT(ADDR(.text.head) - LOAD_OFFSET)
+   { *(.text.head) }
   .text2 : AT(ADDR(.text2) - LOAD_OFFSET)
{ *(.text2) }
 #ifdef CONFIG_SMP
diff --git a/include/asm-ia64/smp.h b/include/asm-ia64/smp.h
index c600249..6314b29 100644
--- a/include/asm-ia64/smp.h
+++ b/include/asm-ia64/smp.h
@@ -116,7 +116,6 @@ max_xtp (void)
 extern int __cpu_disable (void);
 extern void __cpu_die (unsigned int cpu);
 extern void cpu_die (void) __attribute__ ((noreturn));
-extern int __cpu_up (unsigned int cpu);
 extern void __init smp_build_cpu_map(void);
 
 extern void __init init_smp_config (void);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[IA64] rename partial_page

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b74d18e54e20fc1d398eb391bea5b9aed22aca5
Commit: 3b74d18e54e20fc1d398eb391bea5b9aed22aca5
Parent: a07ee86205808d36973440e68c7277f9ed63b87f
Author: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 24 19:44:55 2007 -0700
Committer:  Tony Luck <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 12:56:39 2007 -0700

[IA64] rename partial_page

Jens has added a partial_page thing in splice whcih conflicts with the ia64
one.  Rename ia64 out of the way.  (ia64 chose poorly).

Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Tony Luck <[EMAIL PROTECTED]>
---
 arch/ia64/ia32/ia32_support.c |8 ++--
 arch/ia64/ia32/ia32priv.h |   12 +++---
 arch/ia64/ia32/sys_ia32.c |   81 +
 arch/ia64/kernel/process.c|7 ++--
 include/asm-ia64/ia32.h   |9 +++--
 include/asm-ia64/processor.h  |4 +-
 6 files changed, 62 insertions(+), 59 deletions(-)

diff --git a/arch/ia64/ia32/ia32_support.c b/arch/ia64/ia32/ia32_support.c
index e13a1a1..d1d50cd 100644
--- a/arch/ia64/ia32/ia32_support.c
+++ b/arch/ia64/ia32/ia32_support.c
@@ -249,11 +249,11 @@ ia32_init (void)
 
 #if PAGE_SHIFT > IA32_PAGE_SHIFT
{
-   extern struct kmem_cache *partial_page_cachep;
+   extern struct kmem_cache *ia64_partial_page_cachep;
 
-   partial_page_cachep = kmem_cache_create("partial_page_cache",
-   sizeof(struct partial_page),
-   0, SLAB_PANIC, NULL);
+   ia64_partial_page_cachep = 
kmem_cache_create("ia64_partial_page_cache",
+   sizeof(struct ia64_partial_page),
+   0, SLAB_PANIC, NULL);
}
 #endif
return 0;
diff --git a/arch/ia64/ia32/ia32priv.h b/arch/ia64/ia32/ia32priv.h
index cfa0bc0..466bbcb 100644
--- a/arch/ia64/ia32/ia32priv.h
+++ b/arch/ia64/ia32/ia32priv.h
@@ -25,8 +25,8 @@
  * partially mapped pages provide precise accounting of which 4k sub pages
  * are mapped and which ones are not, thereby improving IA-32 compatibility.
  */
-struct partial_page {
-   struct partial_page *next; /* linked list, sorted by address */
+struct ia64_partial_page {
+   struct ia64_partial_page *next; /* linked list, sorted by address */
struct rb_node  pp_rb;
/* 64K is the largest "normal" page supported by ia64 ABI. So 4K*64
 * should suffice.*/
@@ -34,17 +34,17 @@ struct partial_page {
unsigned intbase;
 };
 
-struct partial_page_list {
-   struct partial_page *pp_head; /* list head, points to the lowest
+struct ia64_partial_page_list {
+   struct ia64_partial_page *pp_head; /* list head, points to the lowest
   * addressed partial page */
struct rb_root  ppl_rb;
-   struct partial_page *pp_hint; /* pp_hint->next is the last
+   struct ia64_partial_page *pp_hint; /* pp_hint->next is the last
   * accessed partial page */
atomic_tpp_count; /* reference count */
 };
 
 #if PAGE_SHIFT > IA32_PAGE_SHIFT
-struct partial_page_list* ia32_init_pp_list (void);
+struct ia64_partial_page_list* ia32_init_pp_list (void);
 #else
 # define ia32_init_pp_list()   0
 #endif
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
index 0afb4fe..af10462 100644
--- a/arch/ia64/ia32/sys_ia32.c
+++ b/arch/ia64/ia32/sys_ia32.c
@@ -253,17 +253,17 @@ mmap_subpage (struct file *file, unsigned long start, 
unsigned long end, int pro
return ret;
 }
 
-/* SLAB cache for partial_page structures */
-struct kmem_cache *partial_page_cachep;
+/* SLAB cache for ia64_partial_page structures */
+struct kmem_cache *ia64_partial_page_cachep;
 
 /*
- * init partial_page_list.
+ * init ia64_partial_page_list.
  * return 0 means kmalloc fail.
  */
-struct partial_page_list*
+struct ia64_partial_page_list*
 ia32_init_pp_list(void)
 {
-   struct partial_page_list *p;
+   struct ia64_partial_page_list *p;
 
if ((p = kmalloc(sizeof(*p), GFP_KERNEL)) == NULL)
return p;
@@ -280,12 +280,12 @@ ia32_init_pp_list(void)
  * Else, return 0 and provide @pprev, @rb_link, @rb_parent to
  * be used by later __ia32_insert_pp().
  */
-static struct partial_page *
-__ia32_find_pp(struct partial_page_list *ppl, unsigned int start,
-   struct partial_page **pprev, struct rb_node ***rb_link,
+static struct ia64_partial_page *
+__ia32_find_pp(struct ia64_partial_page_list *ppl, unsigned int start,
+   struct ia64_partial_page **pprev, struct rb_node ***rb_link,
struct rb_node **rb_parent)
 {
-   struct partial_page *pp;
+   struct ia64_partial_page *pp;
struct rb_node **__rb_link, *__rb_parent, *rb

kbuild: rearrange a few function in modpost

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2f5ee619045d923de9137b6a263a99cc2428391a
Commit: 2f5ee619045d923de9137b6a263a99cc2428391a
Parent: 114f51577724b782a30f4f5ceaee9880de93d776
Author: Sam Ravnborg <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 21:46:40 2007 +0200
Committer:  Sam Ravnborg <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 21:46:40 2007 +0200

kbuild: rearrange a few function in modpost

This is a preparational patch that just move
two functions and add one (for now unused) function.

Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
---
 scripts/mod/modpost.c |   80 +---
 1 files changed, 48 insertions(+), 32 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 87e3ee5..c903a16 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -586,6 +586,54 @@ static int strrcmp(const char *s, const char *sub)
 return memcmp(s + slen - sublen, sub, sublen);
 }
 
+/*
+ * Functions used only during module init is marked __init and is stored in
+ * a .init.text section. Likewise data is marked __initdata and stored in
+ * a .init.data section.
+ * If this section is one of these sections return 1
+ * See include/linux/init.h for the details
+ */
+static int init_section(const char *name)
+{
+   if (strcmp(name, ".init") == 0)
+   return 1;
+   if (strncmp(name, ".init.", strlen(".init.")) == 0)
+   return 1;
+   return 0;
+}
+
+/*
+ * Functions used only during module exit is marked __exit and is stored in
+ * a .exit.text section. Likewise data is marked __exitdata and stored in
+ * a .exit.data section.
+ * If this section is one of these sections return 1
+ * See include/linux/init.h for the details
+ **/
+static int exit_section(const char *name)
+{
+   if (strcmp(name, ".exit.text") == 0)
+   return 1;
+   if (strcmp(name, ".exit.data") == 0)
+   return 1;
+   return 0;
+
+}
+
+/*
+ * Data sections are named like this:
+ * .data | .data.rel | .data.rel.*
+ * Return 1 if the specified section is a data section
+ */
+static int data_section(const char *name)
+{
+   if ((strcmp(name, ".data") == 0) ||
+   (strcmp(name, ".data.rel") == 0) ||
+   (strncmp(name, ".data.rel.", strlen(".data.rel.")) == 0))
+   return 1;
+   else
+   return 0;
+}
+
 /**
  * Whitelist to allow certain references to pass with no warning.
  *
@@ -1108,21 +1156,6 @@ static int initexit_section_ref_ok(const char *name)
return 0;
 }
 
-/**
- * Functions used only during module init is marked __init and is stored in
- * a .init.text section. Likewise data is marked __initdata and stored in
- * a .init.data section.
- * If this section is one of these sections return 1
- * See include/linux/init.h for the details
- **/
-static int init_section(const char *name)
-{
-   if (strcmp(name, ".init") == 0)
-   return 1;
-   if (strncmp(name, ".init.", strlen(".init.")) == 0)
-   return 1;
-   return 0;
-}
 
 /*
  * Identify sections from which references to a .init section is OK.
@@ -1180,23 +1213,6 @@ static int init_section_ref_ok(const char *name)
 }
 
 /*
- * Functions used only during module exit is marked __exit and is stored in
- * a .exit.text section. Likewise data is marked __exitdata and stored in
- * a .exit.data section.
- * If this section is one of these sections return 1
- * See include/linux/init.h for the details
- **/
-static int exit_section(const char *name)
-{
-   if (strcmp(name, ".exit.text") == 0)
-   return 1;
-   if (strcmp(name, ".exit.data") == 0)
-   return 1;
-   return 0;
-
-}
-
-/*
  * Identify sections from which references to a .exit section is OK.
  */
 static int exit_section_ref_ok(const char *name)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


kconfig: attach help text to menus

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=03d29122738f0bd81afd44b1f566e64ebf8d06fe
Commit: 03d29122738f0bd81afd44b1f566e64ebf8d06fe
Parent: 4a645d5ea65baaa5736bcb566673bf4a351b2ad8
Author: Sam Ravnborg <[EMAIL PROTECTED]>
AuthorDate: Sat Jul 21 00:00:36 2007 +0200
Committer:  Sam Ravnborg <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 21:14:26 2007 +0200

kconfig: attach help text to menus

Roman Zippel wrote:
> A simple example would be
> help texts, right now they are per symbol, but they should really be per
> menu, so archs can provide different help texts for something.

This patch does this and at the same time introduce a few API
funtions used to access the help text.

The relevant api functions are introduced in the various frontends.

Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
Cc: Roman Zippel <[EMAIL PROTECTED]>
---
 scripts/kconfig/conf.c  |   31 +++
 scripts/kconfig/expr.h  |3 +--
 scripts/kconfig/gconf.c |   10 ++
 scripts/kconfig/kxgettext.c |4 ++--
 scripts/kconfig/lkc_proto.h |2 ++
 scripts/kconfig/mconf.c |4 ++--
 scripts/kconfig/menu.c  |   12 
 scripts/kconfig/qconf.cc|2 +-
 scripts/kconfig/zconf.tab.c_shipped |   12 ++--
 scripts/kconfig/zconf.y |   12 ++--
 10 files changed, 49 insertions(+), 43 deletions(-)

diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 1199baf..8be6a42 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -37,6 +37,14 @@ static struct menu *rootEntry;
 
 static char nohelp_text[] = N_("Sorry, no help available for this option 
yet.\n");
 
+static const char *get_help(struct menu *menu)
+{
+   if (menu_has_help(menu))
+   return menu_get_help(menu);
+   else
+   return nohelp_text;
+}
+
 static void strip(char *str)
 {
char *p = str;
@@ -171,7 +179,7 @@ static void conf_askvalue(struct symbol *sym, const char 
*def)
 int conf_string(struct menu *menu)
 {
struct symbol *sym = menu->sym;
-   const char *def, *help;
+   const char *def;
 
while (1) {
printf("%*s%s ", indent - 1, "", menu->prompt->text);
@@ -186,10 +194,7 @@ int conf_string(struct menu *menu)
case '?':
/* print help */
if (line[1] == '\n') {
-   help = nohelp_text;
-   if (menu->sym->help)
-   help = menu->sym->help;
-   printf("\n%s\n", menu->sym->help);
+   printf("\n%s\n", get_help(menu));
def = NULL;
break;
}
@@ -207,7 +212,6 @@ static int conf_sym(struct menu *menu)
struct symbol *sym = menu->sym;
int type;
tristate oldval, newval;
-   const char *help;
 
while (1) {
printf("%*s%s ", indent - 1, "", menu->prompt->text);
@@ -233,7 +237,7 @@ static int conf_sym(struct menu *menu)
printf("/m");
if (oldval != yes && sym_tristate_within_range(sym, yes))
printf("/y");
-   if (sym->help)
+   if (menu_has_help(menu))
printf("/?");
printf("] ");
conf_askvalue(sym, sym_get_string_value(sym));
@@ -269,10 +273,7 @@ static int conf_sym(struct menu *menu)
if (sym_set_tristate_value(sym, newval))
return 0;
 help:
-   help = nohelp_text;
-   if (sym->help)
-   help = sym->help;
-   printf("\n%s\n", help);
+   printf("\n%s\n", get_help(menu));
}
 }
 
@@ -342,7 +343,7 @@ static int conf_choice(struct menu *menu)
goto conf_childs;
}
printf("[1-%d", cnt);
-   if (sym->help)
+   if (menu_has_help(menu))
printf("?");
printf("]: ");
switch (input_mode) {
@@ -359,8 +360,7 @@ static int conf_choice(struct menu *menu)
fgets(line, 128, stdin);
strip(line);
if (line[0] == '?') {
-   printf("\n%s\n", menu->sym->help ?
-   menu->sym->help : nohelp_text);
+   printf("\n%s\n", get_help(menu));
continue;
}
if (!line[0])
@@ -391,8 +391,7 @@ static int conf_choice(struct menu *menu)
if (!child)
continue;
   

[IA64] Ensure that machvec is set up takes place before serial console

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a07ee86205808d36973440e68c7277f9ed63b87f
Commit: a07ee86205808d36973440e68c7277f9ed63b87f
Parent: 6ffbc82351c62aeb9e817ddf93049353493d
Author: Horms <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 16:06:25 2007 +0900
Committer:  Tony Luck <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 11:12:47 2007 -0700

[IA64] Ensure that machvec is set up takes place before serial console

Parse the machvec command line option outside of the early_param()
so that ia64_mv is set before any console intialisation that
may result from early_param parsing.

Signed-off-by: Simon Horman <[EMAIL PROTECTED]>
Signed-off-by: Tony Luck <[EMAIL PROTECTED]>
---
 arch/ia64/kernel/machvec.c |   27 ++-
 arch/ia64/kernel/setup.c   |   11 ---
 include/asm-ia64/machvec.h |1 +
 3 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/arch/ia64/kernel/machvec.c b/arch/ia64/kernel/machvec.c
index 13df337..7ccb228 100644
--- a/arch/ia64/kernel/machvec.c
+++ b/arch/ia64/kernel/machvec.c
@@ -13,14 +13,6 @@
 struct ia64_machine_vector ia64_mv;
 EXPORT_SYMBOL(ia64_mv);
 
-static __initdata const char *mvec_name;
-static __init int setup_mvec(char *s)
-{
-   mvec_name = s;
-   return 0;
-}
-early_param("machvec", setup_mvec);
-
 static struct ia64_machine_vector * __init
 lookup_machvec (const char *name)
 {
@@ -41,7 +33,7 @@ machvec_init (const char *name)
struct ia64_machine_vector *mv;
 
if (!name)
-   name = mvec_name ? mvec_name : acpi_get_sysname();
+   name = acpi_get_sysname();
mv = lookup_machvec(name);
if (!mv)
panic("generic kernel failed to find machine vector for"
@@ -51,6 +43,23 @@ machvec_init (const char *name)
printk(KERN_INFO "booting generic kernel on platform %s\n", name);
 }
 
+void __init
+machvec_init_from_cmdline(const char *cmdline)
+{
+   char str[64];
+   const char *start;
+   char *end;
+
+   if (! (start = strstr(cmdline, "machvec=")) )
+   return machvec_init(NULL);
+
+   strlcpy(str, start + strlen("machvec="), sizeof(str));
+   if ( (end = strchr(str, ' ')) )
+   *end = '\0';
+
+   return machvec_init(str);
+}
+
 #endif /* CONFIG_IA64_GENERIC */
 
 void
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index cf06fe7..7cecd29 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -491,12 +491,17 @@ setup_arch (char **cmdline_p)
efi_init();
io_port_init();
 
-   parse_early_param();
-
 #ifdef CONFIG_IA64_GENERIC
-   machvec_init(NULL);
+   /* machvec needs to be parsed from the command line
+* before parse_early_param() is called to ensure
+* that ia64_mv is initialised before any command line
+* settings may cause console setup to occur
+*/
+   machvec_init_from_cmdline(*cmdline_p);
 #endif
 
+   parse_early_param();
+
if (early_console_setup(*cmdline_p) == 0)
mark_bsp_online();
 
diff --git a/include/asm-ia64/machvec.h b/include/asm-ia64/machvec.h
index ca33eb1..5cf8bf1 100644
--- a/include/asm-ia64/machvec.h
+++ b/include/asm-ia64/machvec.h
@@ -275,6 +275,7 @@ struct ia64_machine_vector {
 
 extern struct ia64_machine_vector ia64_mv;
 extern void machvec_init (const char *name);
+extern void machvec_init_from_cmdline(const char *cmdline);
 
 # else
 #  error Unknown configuration.  Update asm-ia64/machvec.h.
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[x86 setup] APM detection logic bug fix

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1514ab09edb071345fe17cd230c97f9e72c9478e
Commit: 1514ab09edb071345fe17cd230c97f9e72c9478e
Parent: 80492cc797ea15572de8eac766cbf606626ee338
Author: Mikael Pettersson <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 24 00:25:59 2007 +0200
Committer:  H. Peter Anvin <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 12:02:21 2007 -0700

[x86 setup] APM detection logic bug fix

Starting with kernel 2.6.23-rc1, the i386 APM driver fails
on several of my machines with the message:

apm: BIOS not found

This happens because of a bug in the i386 boot code rewrite
from assembler to C. The original assembly code had the
following code in its APM BIOS presence test (boot/setup.S):

andw$0x02, %cx  # Is 32 bit supported?
je  done_apm_bios   # No 32-bit, no (good) APM BIOS

That is, the code bails out if bit 2 is zero.

In the new C version, this is coded as (boot/apm.c):

if (cx & 0x02)  /* 32 bits supported? */
return -1;

Here we see that the test has been accidentally inverted.

The fix is to negate the test. I've verified that this
allows the APM driver to work again on my affected machines.

Signed-off-by: Mikael Pettersson <[EMAIL PROTECTED]>
Signed-off-by: H. Peter Anvin <[EMAIL PROTECTED]>
---
 arch/i386/boot/apm.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/i386/boot/apm.c b/arch/i386/boot/apm.c
index a34087c..8be3f56 100644
--- a/arch/i386/boot/apm.c
+++ b/arch/i386/boot/apm.c
@@ -40,7 +40,7 @@ int query_apm_bios(void)
if (bx != 0x504d)   /* "PM" signature */
return -1;
 
-   if (cx & 0x02)  /* 32 bits supported? */
+   if (!(cx & 0x02))   /* 32 bits supported? */
return -1;
 
/* Disconnect first, just in case */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


kbuild: use LDFLAGS_MODULE only for .ko links

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=114f51577724b782a30f4f5ceaee9880de93d776
Commit: 114f51577724b782a30f4f5ceaee9880de93d776
Parent: 1edf1c00acf8d9b60d436d6a0a55e395353a446c
Author: Roland McGrath <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 23 01:12:08 2007 -0700
Committer:  Sam Ravnborg <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 21:18:19 2007 +0200

kbuild: use LDFLAGS_MODULE only for .ko links

Sam Ravnborg pointed out that Documentation/kbuild/makefiles.txt already
says this is what it's for.  This patch makes the reality live up to the
documentation.  This fixes the problem of LDFLAGS_BUILD_ID getting into too
many places.

Signed-off-by: Roland McGrath <[EMAIL PROTECTED]>
Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
---
 Makefile |2 +-
 scripts/Makefile.build   |2 +-
 scripts/Makefile.modpost |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 23f81c9..dfe3d16 100644
--- a/Makefile
+++ b/Makefile
@@ -299,7 +299,7 @@ CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix 
-D__unix__ -Wbitwise $(C
 MODFLAGS   = -DMODULE
 CFLAGS_MODULE   = $(MODFLAGS)
 AFLAGS_MODULE   = $(MODFLAGS)
-LDFLAGS_MODULE  = -r
+LDFLAGS_MODULE  =
 CFLAGS_KERNEL  =
 AFLAGS_KERNEL  =
 
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 3f7b451..7fd6055 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -315,7 +315,7 @@ quiet_cmd_link_multi-y = LD  $@
 cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps)
 
 quiet_cmd_link_multi-m = LD [M]  $@
-cmd_link_multi-m = $(LD) $(ld_flags) $(LDFLAGS_MODULE) -o $@ $(link_multi_deps)
+cmd_link_multi-m = $(cmd_link_multi-y)
 
 # We would rather have a list of rules like
 #  foo.o: $(foo-objs)
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 1818c50..d988f5d 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -98,7 +98,7 @@ targets += $(modules:.ko=.mod.o)
 
 # Step 6), final link of the modules
 quiet_cmd_ld_ko_o = LD [M]  $@
-  cmd_ld_ko_o = $(LD) $(LDFLAGS) $(LDFLAGS_MODULE) -o $@   \
+  cmd_ld_ko_o = $(LD) -r $(LDFLAGS) $(LDFLAGS_MODULE) -o $@
\
  $(filter-out FORCE,$^)
 
 $(modules): %.ko :%.o %.mod.o FORCE
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[x86 setup] Make struct apm_bios_info cross-architecture

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4bf3b0bc3e98f77de88b336fd8d673649601b557
Commit: 4bf3b0bc3e98f77de88b336fd8d673649601b557
Parent: 238b706da1c6ebacc55986ac8668f3ede4621f2c
Author: H. Peter Anvin <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 11:06:02 2007 -0700
Committer:  H. Peter Anvin <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 12:02:21 2007 -0700

[x86 setup] Make struct apm_bios_info cross-architecture

struct apm_bios_info uses "unsigned short" and "unsigned long"
to mean u16 and u32 respectively.  Correct.

Signed-off-by: H. Peter Anvin <[EMAIL PROTECTED]>
---
 include/linux/apm_bios.h |   20 +++-
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/include/linux/apm_bios.h b/include/linux/apm_bios.h
index 290aef3..5f921c8 100644
--- a/include/linux/apm_bios.h
+++ b/include/linux/apm_bios.h
@@ -21,20 +21,22 @@ typedef unsigned short  apm_eventinfo_t;
 
 #ifdef __KERNEL__
 
+#include 
+
 #define APM_CS (GDT_ENTRY_APMBIOS_BASE * 8)
 #define APM_CS_16  (APM_CS + 8)
 #define APM_DS (APM_CS_16 + 8)
 
 struct apm_bios_info {
-   unsigned short  version;
-   unsigned short  cseg;
-   unsigned long   offset;
-   unsigned short  cseg_16;
-   unsigned short  dseg;
-   unsigned short  flags;
-   unsigned short  cseg_len;
-   unsigned short  cseg_16_len;
-   unsigned short  dseg_len;
+   u16 version;
+   u16 cseg;
+   u32 offset;
+   u16 cseg_16;
+   u16 dseg;
+   u16 flags;
+   u16 cseg_len;
+   u16 cseg_16_len;
+   u16 dseg_len;
 };
 
 /* Results of APM Installation Check */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[IA64] Nail two more simple section mismatch errors

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cb2e0912f714b116812ef5834b5ba80d894ac967
Commit: cb2e0912f714b116812ef5834b5ba80d894ac967
Parent: 9d6f40b86b47928ffde8a41cb2ef332da34b3de2
Author: Tony Luck <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 20 16:14:28 2007 -0700
Committer:  Tony Luck <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 13:08:41 2007 -0700

[IA64] Nail two more simple section mismatch errors

pcibios_setup (between 'pci_setup' and 'quirk_mellanox_tavor')
setup_profiling_timer (between 'write_profile' and 
'delayed_put_task_struct')

Signed-off-by: Tony Luck <[EMAIL PROTECTED]>
---
 arch/ia64/kernel/smp.c |2 +-
 arch/ia64/pci/pci.c|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index 9f72838..0982882 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -468,7 +468,7 @@ smp_send_stop (void)
send_IPI_allbutself(IPI_CPU_STOP);
 }
 
-int __init
+int
 setup_profiling_timer (unsigned int multiplier)
 {
return -EINVAL;
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 07d0e92..488e48a 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -581,7 +581,7 @@ pcibios_align_resource (void *data, struct resource *res,
 /*
  * PCI BIOS setup, always defaults to SAL interface
  */
-char * __init
+char * __devinit
 pcibios_setup (char *str)
 {
return str;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


m68knommu: fix tick timer definition for coldfire

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5c4f5264d503f0650c954a181b0ba255913bb382
Commit: 5c4f5264d503f0650c954a181b0ba255913bb382
Parent: 36995223872df6642e604aab2be84377a5d12a19
Author: Greg Ungerer <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 22:07:20 2007 +1000
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 11:05:01 2007 -0700

m68knommu: fix tick timer definition for coldfire

CLOCK_TICK_RATE should give the underlying frequency of the tick timer,
to make ntp happy.  For Coldfires, that's the main clock.

Signed-off-by: Philippe De Muyter <[EMAIL PROTECTED]>
Signed-off-by: Greg Ungerer <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/asm-m68knommu/timex.h |   24 +++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/include/asm-m68knommu/timex.h b/include/asm-m68knommu/timex.h
index 8506999..109050f 100644
--- a/include/asm-m68knommu/timex.h
+++ b/include/asm-m68knommu/timex.h
@@ -1 +1,23 @@
-#include 
+/*
+ * linux/include/asm-m68knommu/timex.h
+ *
+ * m68knommu architecture timex specifications
+ */
+#ifndef _ASM_M68KNOMMU_TIMEX_H
+#define _ASM_M68KNOMMU_TIMEX_H
+
+#ifdef CONFIG_COLDFIRE
+#include 
+#define CLOCK_TICK_RATEMCF_CLK
+#else
+#define CLOCK_TICK_RATE1193180 /* Underlying HZ */
+#endif
+
+typedef unsigned long cycles_t;
+
+static inline cycles_t get_cycles(void)
+{
+   return 0;
+}
+
+#endif
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


m68knommu: fix definition of MCFDMA_DIR_INV

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a6fcafd09959cf9204f0cdb7a2545ffd7d95d5dd
Commit: a6fcafd09959cf9204f0cdb7a2545ffd7d95d5dd
Parent: 33e7a72a9c7ebb822d419a07840c3546513feff0
Author: Philippe De Muyter <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 22:07:20 2007 +1000
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 11:05:01 2007 -0700

m68knommu: fix definition of MCFDMA_DIR_INV

Fix a small typo in the definition of MCFDMA_DIR_INV (MCF5272 specific).

Signed-off-by: Greg Ungerer <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/asm-m68knommu/mcfdma.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-m68knommu/mcfdma.h b/include/asm-m68knommu/mcfdma.h
index ea729e8..705c52c 100644
--- a/include/asm-m68knommu/mcfdma.h
+++ b/include/asm-m68knommu/mcfdma.h
@@ -133,7 +133,7 @@
 #define MCFDMA_DIR_ASCEN 0x0800 /* Address Sequence Complete (Completion) 
interrupt enable */
 #define MCFDMA_DIR_TEEN  0x0200 /* Transfer Error interrupt enable */
 #define MCFDMA_DIR_TCEN  0x0100 /* Transfer Complete (a bus transfer, that 
is) interrupt enable */
-#define MCFDMA_DIR_INV   0x1000 /* Invalid Combination */
+#define MCFDMA_DIR_INV   0x0010 /* Invalid Combination */
 #define MCFDMA_DIR_ASC   0x0008 /* Address Sequence Complete (DMA 
Completion) */
 #define MCFDMA_DIR_TE0x0002 /* Transfer Error */
 #define MCFDMA_DIR_TC0x0001 /* Transfer Complete */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ACPI: Kconfig: remove CONFIG_ACPI_SLEEP from source

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e8b2fd01228f690c3e0cb3f14facfa8d93d4adae
Commit: e8b2fd01228f690c3e0cb3f14facfa8d93d4adae
Parent: 7c5aa6642fa26641ebf286966a165aec71c91991
Author: Len Brown <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 24 22:26:33 2007 -0400
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 01:29:39 2007 -0400

ACPI: Kconfig: remove CONFIG_ACPI_SLEEP from source

As it was a synonym for (CONFIG_ACPI && CONFIG_X86),
the ifdefs for it were more clutter than they were worth.

For ia64, just add a few stubs in anticipation of future
S3 or S4 support.

Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 arch/i386/kernel/acpi/Makefile   |2 +-
 arch/i386/kernel/setup.c |2 +-
 arch/i386/mm/init.c  |2 +-
 arch/ia64/kernel/acpi.c  |   19 +++
 arch/x86_64/kernel/acpi/Makefile |2 +-
 arch/x86_64/kernel/acpi/sleep.c  |4 
 arch/x86_64/kernel/head.S|2 +-
 arch/x86_64/kernel/setup.c   |2 +-
 drivers/acpi/Kconfig |   10 +++---
 drivers/acpi/sleep/Makefile  |4 ++--
 drivers/acpi/sleep/main.c|2 ++
 drivers/acpi/sleep/poweroff.c|2 --
 drivers/acpi/sleep/wakeup.c  |2 --
 include/acpi/acpi_drivers.h  |4 
 include/asm-i386/acpi.h  |   23 +--
 include/asm-i386/suspend.h   |2 +-
 include/asm-ia64/acpi.h  |5 +
 include/asm-x86_64/acpi.h|   22 +-
 include/asm-x86_64/suspend.h |2 --
 kernel/sysctl.c  |2 +-
 20 files changed, 57 insertions(+), 58 deletions(-)

diff --git a/arch/i386/kernel/acpi/Makefile b/arch/i386/kernel/acpi/Makefile
index 7f7be01..223f58f 100644
--- a/arch/i386/kernel/acpi/Makefile
+++ b/arch/i386/kernel/acpi/Makefile
@@ -2,7 +2,7 @@ obj-$(CONFIG_ACPI)  += boot.o
 ifneq ($(CONFIG_PCI),)
 obj-$(CONFIG_X86_IO_APIC)  += earlyquirk.o
 endif
-obj-$(CONFIG_ACPI_SLEEP)   += sleep.o wakeup.o
+obj-$(CONFIG_ACPI) += sleep.o wakeup.o
 
 ifneq ($(CONFIG_ACPI_PROCESSOR),)
 obj-y  += cstate.o processor.o
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index d474cd6..7fe5da3 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -422,7 +422,7 @@ void __init setup_bootmem_allocator(void)
 */
reserve_bootmem(PAGE_SIZE, PAGE_SIZE);
 #endif
-#ifdef CONFIG_ACPI_SLEEP
+#ifdef CONFIG_ACPI
/*
 * Reserve low memory region for sleep support.
 */
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c
index c3b9905..1b1a1e6 100644
--- a/arch/i386/mm/init.c
+++ b/arch/i386/mm/init.c
@@ -432,7 +432,7 @@ static void __init pagetable_init (void)
paravirt_pagetable_setup_done(pgd_base);
 }
 
-#if defined(CONFIG_SOFTWARE_SUSPEND) || defined(CONFIG_ACPI_SLEEP)
+#if defined(CONFIG_SOFTWARE_SUSPEND) || defined(CONFIG_ACPI)
 /*
  * Swap suspend & friends need this for resume because things like the 
intel-agp
  * driver might have split up a kernel 4MB mapping.
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 103dd8e..c6ede87 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -67,6 +67,8 @@ EXPORT_SYMBOL(pm_power_off);
 unsigned int acpi_cpei_override;
 unsigned int acpi_cpei_phys_cpuid;
 
+unsigned long acpi_wakeup_address = 0;
+
 const char __init *
 acpi_get_sysname(void)
 {
@@ -986,4 +988,21 @@ int acpi_unregister_ioapic(acpi_handle handle, u32 
gsi_base)
 
 EXPORT_SYMBOL(acpi_unregister_ioapic);
 
+/*
+ * acpi_save_state_mem() - save kernel state
+ *
+ * TBD when when IA64 starts to support suspend...
+ */
+int acpi_save_state_mem(void) { return 0; } 
+
+/*
+ * acpi_restore_state()
+ */
+void acpi_restore_state_mem(void) {}
+
+/*
+ * do_suspend_lowlevel()
+ */
+void do_suspend_lowlevel(void) {}
+
 #endif /* CONFIG_ACPI */
diff --git a/arch/x86_64/kernel/acpi/Makefile b/arch/x86_64/kernel/acpi/Makefile
index 080b996..17595d2 100644
--- a/arch/x86_64/kernel/acpi/Makefile
+++ b/arch/x86_64/kernel/acpi/Makefile
@@ -1,6 +1,6 @@
 obj-y  := boot.o
 boot-y := ../../../i386/kernel/acpi/boot.o
-obj-$(CONFIG_ACPI_SLEEP)   += sleep.o wakeup.o
+obj-y  += sleep.o wakeup.o
 
 ifneq ($(CONFIG_ACPI_PROCESSOR),)
 obj-y  += processor.o
diff --git a/arch/x86_64/kernel/acpi/sleep.c b/arch/x86_64/kernel/acpi/sleep.c
index 4277f2b..79475d2 100644
--- a/arch/x86_64/kernel/acpi/sleep.c
+++ b/arch/x86_64/kernel/acpi/sleep.c
@@ -51,8 +51,6 @@
   Low-Level Sleep Support
-- 
*/
 
-#ifdef CONFIG_ACPI_SLEEP
-
 /* address in low memory of the wakeup routine. */
 unsigned long acpi_wakeup_address = 0;
 unsigned long acpi_realmod

ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI drivers

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1ba90e3a87c46500623afdc3898573e4a5ebb21b
Commit: 1ba90e3a87c46500623afdc3898573e4a5ebb21b
Parent: 29b71a1ca74491fab9fed09e9d835d840d042690
Author: Thomas Renninger <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 23 14:44:41 2007 +0200
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Mon Jul 23 13:56:42 2007 -0400

ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI 
drivers

modpost is going to use these to create e.g. acpi:ACPI0001
in modules.alias.

Signed-off-by: Thomas Renninger <[EMAIL PROTECTED]>
Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/ac.c   |9 +++--
 drivers/acpi/acpi_memhotplug.c  |8 +++-
 drivers/acpi/asus_acpi.c|   11 ---
 drivers/acpi/battery.c  |9 +++--
 drivers/acpi/button.c   |   12 +++-
 drivers/acpi/container.c|   10 +-
 drivers/acpi/ec.c   |8 ++--
 drivers/acpi/fan.c  |8 +++-
 drivers/acpi/pci_link.c |9 +++--
 drivers/acpi/pci_root.c |9 +++--
 drivers/acpi/power.c|8 +++-
 drivers/acpi/processor_core.c   |8 +++-
 drivers/acpi/sbs.c  |   10 --
 drivers/acpi/thermal.c  |8 +++-
 drivers/acpi/video.c|8 +++-
 drivers/char/hpet.c |8 +++-
 drivers/input/misc/atlas_btns.c |9 +++--
 drivers/misc/asus-laptop.c  |9 +++--
 drivers/misc/sony-laptop.c  |   21 +++--
 drivers/misc/thinkpad_acpi.c|   20 
 drivers/misc/thinkpad_acpi.h|2 +-
 21 files changed, 169 insertions(+), 35 deletions(-)

diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index 37c7dc4..d8b3509 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -34,7 +34,6 @@
 
 #define ACPI_AC_COMPONENT  0x0002
 #define ACPI_AC_CLASS  "ac_adapter"
-#define ACPI_AC_HID"ACPI0003"
 #define ACPI_AC_DEVICE_NAME"AC Adapter"
 #define ACPI_AC_FILE_STATE "state"
 #define ACPI_AC_NOTIFY_STATUS  0x80
@@ -56,10 +55,16 @@ static int acpi_ac_add(struct acpi_device *device);
 static int acpi_ac_remove(struct acpi_device *device, int type);
 static int acpi_ac_open_fs(struct inode *inode, struct file *file);
 
+const static struct acpi_device_id ac_device_ids[] = {
+   {"ACPI0003", 0},
+   {"", 0},
+};
+MODULE_DEVICE_TABLE(acpi, ac_device_ids);
+
 static struct acpi_driver acpi_ac_driver = {
.name = "ac",
.class = ACPI_AC_CLASS,
-   .ids = ACPI_AC_HID,
+   .ids = ac_device_ids,
.ops = {
.add = acpi_ac_add,
.remove = acpi_ac_remove,
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index e65628a..5f1127a 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -53,10 +53,16 @@ static int acpi_memory_device_add(struct acpi_device 
*device);
 static int acpi_memory_device_remove(struct acpi_device *device, int type);
 static int acpi_memory_device_start(struct acpi_device *device);
 
+static const struct acpi_device_id memory_device_ids[] = {
+   {ACPI_MEMORY_DEVICE_HID, 0},
+   {"", 0},
+};
+MODULE_DEVICE_TABLE(acpi, memory_device_ids);
+
 static struct acpi_driver acpi_memory_device_driver = {
.name = "acpi_memhotplug",
.class = ACPI_MEMORY_DEVICE_CLASS,
-   .ids = ACPI_MEMORY_DEVICE_HID,
+   .ids = memory_device_ids,
.ops = {
.add = acpi_memory_device_add,
.remove = acpi_memory_device_remove,
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
index 3cd79ca..9c4bd22 100644
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -56,7 +56,6 @@
 #define ACPI_HOTK_NAME  "Asus Laptop ACPI Extras Driver"
 #define ACPI_HOTK_CLASS "hotkey"
 #define ACPI_HOTK_DEVICE_NAME   "Hotkey"
-#define ACPI_HOTK_HID   "ATK0100"
 
 /*
  * Some events we use, same for all Asus
@@ -426,14 +425,20 @@ static struct acpi_table_header *asus_info;
 static struct asus_hotk *hotk;
 
 /*
- * The hotkey driver declaration
+ * The hotkey driver and autoloading declaration
  */
 static int asus_hotk_add(struct acpi_device *device);
 static int asus_hotk_remove(struct acpi_device *device, int type);
+static const struct acpi_device_id asus_device_ids[] = {
+   {"ATK0100", 0},
+   {"", 0},
+};
+MODULE_DEVICE_TABLE(acpi, asus_device_ids);
+
 static struct acpi_driver asus_hotk_driver = {
.name = "asus_acpi",
.class = ACPI_HOTK_CLASS,
-   .ids = ACPI_HOTK_HID,
+   .ids = asus_device_ids,
.ops = {
.add = asus_hotk_add,
.remove = asus_hotk_remove,
diff --git a/drivers/acpi/battery.c b/drivers/acpi/ba

[x86 setup] Fix typos in struct efi_info

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f77b1ab383c8745447a3385e25729b92f2ec58a4
Commit: f77b1ab383c8745447a3385e25729b92f2ec58a4
Parent: 1a13286b104faeeb4f4bc3bfbf4d4fcdcd2569ed
Author: H. Peter Anvin <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 18 17:16:19 2007 -0700
Committer:  H. Peter Anvin <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 12:02:21 2007 -0700

[x86 setup] Fix typos in struct efi_info

Fix missing letters in the structure members of struct efi_info.

Signed-off-by: H. Peter Anvin <[EMAIL PROTECTED]>
---
 include/asm-i386/bootparam.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asm-i386/bootparam.h b/include/asm-i386/bootparam.h
index 427d865..211f3f9 100644
--- a/include/asm-i386/bootparam.h
+++ b/include/asm-i386/bootparam.h
@@ -48,9 +48,9 @@ struct efi_info {
u32 _pad1;
u32 efi_systab;
u32 efi_memdesc_size;
-   u32 efi_memdec_version;
+   u32 efi_memdesc_version;
u32 efi_memmap;
-   u32 fi_memmap_size;
+   u32 efi_memmap_size;
u32 _pad2[2];
 };
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[x86 setup] APM: BX should be zero when disconnecting

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1a13286b104faeeb4f4bc3bfbf4d4fcdcd2569ed
Commit: 1a13286b104faeeb4f4bc3bfbf4d4fcdcd2569ed
Parent: 1514ab09edb071345fe17cd230c97f9e72c9478e
Author: H. Peter Anvin <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 23 15:37:14 2007 -0700
Committer:  H. Peter Anvin <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 12:02:21 2007 -0700

[x86 setup] APM: BX should be zero when disconnecting

For APM calls, BX contains the device index, which is zero for
the system BIOS.  Disconnect requres BX = 0.

Signed-off-by: H. Peter Anvin <[EMAIL PROTECTED]>
---
 arch/i386/boot/apm.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/i386/boot/apm.c b/arch/i386/boot/apm.c
index 8be3f56..eab50c5 100644
--- a/arch/i386/boot/apm.c
+++ b/arch/i386/boot/apm.c
@@ -45,9 +45,10 @@ int query_apm_bios(void)
 
/* Disconnect first, just in case */
ax = 0x5304;
+   bx = 0;
asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp"
-: "+a" (ax)
-: : "ebx", "ecx", "edx", "esi", "edi");
+: "+a" (ax), "+b" (bx)
+: : "ecx", "edx", "esi", "edi");
 
/* Paranoia */
ebx = esi = 0;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SELinux: null-terminate context string in selinux_xfrm_sec_ctx_alloc

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=910949a66839ff5f59fede5b7cb68ecf1453e22c
Commit: 910949a66839ff5f59fede5b7cb68ecf1453e22c
Parent: 0de085bb474f64e4fdb2f1ff3268590792648c7b
Author: Venkat Yekkirala <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 24 09:53:23 2007 -0500
Committer:  James Morris <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 12:49:41 2007 -0400

SELinux: null-terminate context string in selinux_xfrm_sec_ctx_alloc

xfrm_audit_log() expects the context string to be null-terminated
which currently doesn't happen with user-supplied contexts.

Signed-off-by: Venkat Yekkirala <[EMAIL PROTECTED]>
Acked-by:  Stephen Smalley <[EMAIL PROTECTED]>
Signed-off-by: James Morris <[EMAIL PROTECTED]>
---
 security/selinux/xfrm.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c
index bd8d1ef..ba715f4 100644
--- a/security/selinux/xfrm.c
+++ b/security/selinux/xfrm.c
@@ -216,7 +216,7 @@ static int selinux_xfrm_sec_ctx_alloc(struct xfrm_sec_ctx 
**ctxp,
return -ENOMEM;
 
*ctxp = ctx = kmalloc(sizeof(*ctx) +
- uctx->ctx_len,
+ uctx->ctx_len + 1,
  GFP_KERNEL);
 
if (!ctx)
@@ -229,6 +229,7 @@ static int selinux_xfrm_sec_ctx_alloc(struct xfrm_sec_ctx 
**ctxp,
memcpy(ctx->ctx_str,
   uctx+1,
   ctx->ctx_len);
+   ctx->ctx_str[ctx->ctx_len] = 0;
rc = security_context_to_sid(ctx->ctx_str,
 ctx->ctx_len,
 &ctx->ctx_sid);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ACPI: asus-laptop: Fix failure exits

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b0d71170d37878bbb1203ebc3f92e36d6151a80
Commit: 3b0d71170d37878bbb1203ebc3f92e36d6151a80
Parent: 3cc2649b879f0e83fd51b14c82bad5f8f208591e
Author: Al Viro <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 23 11:21:34 2007 +0100
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Mon Jul 23 13:35:23 2007 -0400

ACPI: asus-laptop: Fix failure exits

> Subject : drivers/misc/asus-laptop.c:*: error: 'struct 
led_classdev' has no member named 'class_dev'
> References  : http://lkml.org/lkml/2007/7/22/299
> Submitter   : Gabriel C <[EMAIL PROTECTED]>

Fallout from f8a7c6fe14f556ca8eeddce258cb21392d0c3a2f.  However, looking
at it shows that checks done in ASUS_LED_UNREGISTER() can't trigger
at all (we never get to asus_led_exit() if registration fails) and
if that registration fails, we actually leak stuff.  IOW, it's worse
than just replacing class_dev with dev in there - the tests themselves
had been papering over the lousy cleanup logics.

Signed-off-by: Al Viro <[EMAIL PROTECTED]>
Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/misc/asus-laptop.c |   32 +---
 1 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/drivers/misc/asus-laptop.c b/drivers/misc/asus-laptop.c
index f753060..6b89854 100644
--- a/drivers/misc/asus-laptop.c
+++ b/drivers/misc/asus-laptop.c
@@ -1067,19 +1067,16 @@ static void asus_backlight_exit(void)
 }
 
 #define  ASUS_LED_UNREGISTER(object)   \
-   if(object##_led.class_dev   \
-  && !IS_ERR(object##_led.class_dev))  \
-   led_classdev_unregister(&object##_led)
+   led_classdev_unregister(&object##_led)
 
 static void asus_led_exit(void)
 {
+   destroy_workqueue(led_workqueue);
ASUS_LED_UNREGISTER(mled);
ASUS_LED_UNREGISTER(tled);
ASUS_LED_UNREGISTER(pled);
ASUS_LED_UNREGISTER(rled);
ASUS_LED_UNREGISTER(gled);
-
-   destroy_workqueue(led_workqueue);
 }
 
 static void __exit asus_laptop_exit(void)
@@ -1135,29 +1132,42 @@ static int asus_led_init(struct device *dev)
 
rv = ASUS_LED_REGISTER(mled, dev);
if (rv)
-   return rv;
+   goto out;
 
rv = ASUS_LED_REGISTER(tled, dev);
if (rv)
-   return rv;
+   goto out1;
 
rv = ASUS_LED_REGISTER(rled, dev);
if (rv)
-   return rv;
+   goto out2;
 
rv = ASUS_LED_REGISTER(pled, dev);
if (rv)
-   return rv;
+   goto out3;
 
rv = ASUS_LED_REGISTER(gled, dev);
if (rv)
-   return rv;
+   goto out4;
 
led_workqueue = create_singlethread_workqueue("led_workqueue");
if (!led_workqueue)
-   return -ENOMEM;
+   goto out5;
 
return 0;
+out5:
+   rv = -ENOMEM;
+   ASUS_LED_UNREGISTER(gled);
+out4:
+   ASUS_LED_UNREGISTER(pled);
+out3:
+   ASUS_LED_UNREGISTER(rled);
+out2:
+   ASUS_LED_UNREGISTER(tled);
+out1:
+   ASUS_LED_UNREGISTER(mled);
+out:
+   return rv;
 }
 
 static int __init asus_laptop_init(void)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ACPI: fix oops due to typo in new throttling code

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3cc2649b879f0e83fd51b14c82bad5f8f208591e
Commit: 3cc2649b879f0e83fd51b14c82bad5f8f208591e
Parent: f695baf2df9e0413d3521661070103711545207a
Author: Luming Yu <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 23 12:39:28 2007 -0400
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Mon Jul 23 12:39:28 2007 -0400

ACPI: fix oops due to typo in new throttling code

Signed-off-by: Luming Yu <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/processor_throttling.c |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/processor_throttling.c 
b/drivers/acpi/processor_throttling.c
index 3f55d1f..dc5b859 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -658,18 +658,20 @@ static int acpi_processor_throttling_seq_show(struct 
seq_file *seq,
   pr->throttling.state_count - 1);
 
seq_puts(seq, "states:\n");
-   if (acpi_processor_get_throttling == acpi_processor_get_throttling_fadt)
+   if (pr->throttling.acpi_processor_get_throttling ==
+   acpi_processor_get_throttling_fadt) {
for (i = 0; i < pr->throttling.state_count; i++)
seq_printf(seq, "   %cT%d:  %02d%%\n",
   (i == pr->throttling.state ? '*' : ' '), i,
   (pr->throttling.states[i].performance ? pr->
throttling.states[i].performance / 10 : 0));
-   else
+   } else {
for (i = 0; i < pr->throttling.state_count; i++)
seq_printf(seq, "   %cT%d:  %02d%%\n",
   (i == pr->throttling.state ? '*' : ' '), i,
   (int)pr->throttling.states_tss[i].
   freqpercentage);
+   }
 
   end:
return 0;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


m68knommu: fix workqueues in 68328 serial driver

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=931f9cde5c3f9dc7827759db258eaf979bfa92b6
Commit: 931f9cde5c3f9dc7827759db258eaf979bfa92b6
Parent: a427138712f388987aa13475bf591685b6b8cd46
Author: Greg Ungerer <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 22:07:20 2007 +1000
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 11:05:01 2007 -0700

m68knommu: fix workqueues in 68328 serial driver

Fix workqueues in 68328 serial driver.

Signed-off-by: Greg Ungerer <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/serial/68328serial.c |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c
index 151bd9a..aad4012 100644
--- a/drivers/serial/68328serial.c
+++ b/drivers/serial/68328serial.c
@@ -400,9 +400,9 @@ irqreturn_t rs_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
 }
 
-static void do_softint(void *private)
+static void do_softint(struct work_struct *work)
 {
-   struct m68k_serial  *info = (struct m68k_serial *) private;
+   struct m68k_serial  *info = container_of(work, struct m68k_serial, 
tqueue);
struct tty_struct   *tty;

tty = info->tty;
@@ -424,9 +424,9 @@ static void do_softint(void *private)
  * do_serial_hangup() -> tty->hangup() -> rs_hangup()
  * 
  */
-static void do_serial_hangup(void *private)
+static void do_serial_hangup(struct work_struct *work)
 {
-   struct m68k_serial  *info = (struct m68k_serial *) private;
+   struct m68k_serial  *info = container_of(work, struct m68k_serial, 
tqueue_hangup);
struct tty_struct   *tty;

tty = info->tty;
@@ -1390,8 +1390,8 @@ rs68328_init(void)
info->event = 0;
info->count = 0;
info->blocked_open = 0;
-   INIT_WORK(&info->tqueue, do_softint, info);
-   INIT_WORK(&info->tqueue_hangup, do_serial_hangup, info);
+   INIT_WORK(&info->tqueue, do_softint);
+   INIT_WORK(&info->tqueue_hangup, do_serial_hangup);
init_waitqueue_head(&info->open_wait);
init_waitqueue_head(&info->close_wait);
info->line = i;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Cache xtime every call to update_wall_time

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=17c38b7490b3f0300c7812aefdae2ddda7ab4112
Commit: 17c38b7490b3f0300c7812aefdae2ddda7ab4112
Parent: 2c6b47de17c75d553de3e2fb426d8298d2074585
Author: john stultz <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 24 18:38:34 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 10:17:44 2007 -0700

Cache xtime every call to update_wall_time

This avoids xtime lag seen with dynticks, because while 'xtime' itself
is still not updated often, we keep a 'xtime_cache' variable around that
contains the approximate real-time that _is_ updated each time we do a
'update_wall_time()', and is thus never off by more than one tick.

IOW, this restores the original semantics for 'xtime' users, as long as
you use the proper abstraction functions (ie 'current_kernel_time()' or
'get_seconds()' depending on whether you want a timespec or just the
seconds field).

[ Updated Patch.  As penance for my sins I've also yanked another #ifdef
  that was added to avoid the xtime lag w/ hrtimers.  ]

Signed-off-by: John Stultz <[EMAIL PROTECTED]>
Cc: Ingo Molnar <[EMAIL PROTECTED]>
Cc: Thomas Gleixner <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/linux/time.h  |6 +-
 kernel/hrtimer.c  |4 
 kernel/time/timekeeping.c |   26 +++---
 3 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/include/linux/time.h b/include/linux/time.h
index 71181df..6a5f503 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -99,11 +99,7 @@ extern int update_persistent_clock(struct timespec now);
 extern int no_sync_cmos_clock __read_mostly;
 void timekeeping_init(void);
 
-static inline unsigned long get_seconds(void)
-{
-   return xtime.tv_sec;
-}
-
+unsigned long get_seconds(void);
 struct timespec current_kernel_time(void);
 
 #define CURRENT_TIME   (current_kernel_time())
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index a7bb05e..c21ca6b 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -141,11 +141,7 @@ static void hrtimer_get_softirq_time(struct 
hrtimer_cpu_base *base)
 
do {
seq = read_seqbegin(&xtime_lock);
-#ifdef CONFIG_NO_HZ
-   getnstimeofday(&xts);
-#else
xts = current_kernel_time();
-#endif
tom = wall_to_monotonic;
} while (read_seqretry(&xtime_lock, seq));
 
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 07a3f14..acc417b 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -47,10 +47,22 @@ EXPORT_SYMBOL(xtime_lock);
 struct timespec xtime __attribute__ ((aligned (16)));
 struct timespec wall_to_monotonic __attribute__ ((aligned (16)));
 static unsigned long total_sleep_time; /* seconds */
-
 EXPORT_SYMBOL(xtime);
 
 
+#ifdef CONFIG_NO_HZ
+static struct timespec xtime_cache __attribute__ ((aligned (16)));
+static inline void update_xtime_cache(u64 nsec)
+{
+   xtime_cache = xtime;
+   timespec_add_ns(&xtime_cache, nsec);
+}
+#else
+#define xtime_cache xtime
+/* We do *not* want to evaluate the argument for this case */
+#define update_xtime_cache(n) do { } while (0)
+#endif
+
 static struct clocksource *clock; /* pointer to current clocksource */
 
 
@@ -478,6 +490,8 @@ void update_wall_time(void)
xtime.tv_nsec = (s64)clock->xtime_nsec >> clock->shift;
clock->xtime_nsec -= (s64)xtime.tv_nsec << clock->shift;
 
+   update_xtime_cache(cyc2ns(clock, offset));
+
/* check to see if there is a new clocksource to use */
change_clocksource();
update_vsyscall(&xtime, clock);
@@ -510,6 +524,13 @@ void monotonic_to_bootbased(struct timespec *ts)
ts->tv_sec += total_sleep_time;
 }
 
+unsigned long get_seconds(void)
+{
+   return xtime_cache.tv_sec;
+}
+EXPORT_SYMBOL(get_seconds);
+
+
 struct timespec current_kernel_time(void)
 {
struct timespec now;
@@ -518,10 +539,9 @@ struct timespec current_kernel_time(void)
do {
seq = read_seqbegin(&xtime_lock);
 
-   now = xtime;
+   now = xtime_cache;
} while (read_seqretry(&xtime_lock, seq));
 
return now;
 }
-
 EXPORT_SYMBOL(current_kernel_time);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


KVM: Fix unlikely kvm_create vs decache_vcpus_on_cpu race

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5e58cfe41c7e5902c32bb7f62993d43fb4c48ccf
Commit: 5e58cfe41c7e5902c32bb7f62993d43fb4c48ccf
Parent: b0fcd903e6f3f47189baddf3fe085bdf78c9644c
Author: Rusty Russell <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 23 17:08:21 2007 +1000
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 14:29:34 2007 +0300

KVM: Fix unlikely kvm_create vs decache_vcpus_on_cpu race

We add the kvm to the vm_list before initializing the vcpu mutexes,
which can be mutex_trylock()'ed by decache_vcpus_on_cpu().

Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 drivers/kvm/kvm_main.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index a0a3fdd..46efbe7 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -297,9 +297,6 @@ static struct kvm *kvm_create_vm(void)
kvm_io_bus_init(&kvm->pio_bus);
spin_lock_init(&kvm->lock);
INIT_LIST_HEAD(&kvm->active_mmu_pages);
-   spin_lock(&kvm_lock);
-   list_add(&kvm->vm_list, &vm_list);
-   spin_unlock(&kvm_lock);
kvm_io_bus_init(&kvm->mmio_bus);
for (i = 0; i < KVM_MAX_VCPUS; ++i) {
struct kvm_vcpu *vcpu = &kvm->vcpus[i];
@@ -309,6 +306,9 @@ static struct kvm *kvm_create_vm(void)
vcpu->kvm = kvm;
vcpu->mmu.root_hpa = INVALID_PAGE;
}
+   spin_lock(&kvm_lock);
+   list_add(&kvm->vm_list, &vm_list);
+   spin_unlock(&kvm_lock);
return kvm;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


m68knommu: remove legacy power managament from 68328 serial driver

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a427138712f388987aa13475bf591685b6b8cd46
Commit: a427138712f388987aa13475bf591685b6b8cd46
Parent: a9417357cff6027f9d6b1740f821baa59f2381f4
Author: Greg Ungerer <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 22:07:20 2007 +1000
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 11:05:01 2007 -0700

m68knommu: remove legacy power managament from 68328 serial driver

Remove the legacy power management code from the 68328 serial driver.
It is not used, and there is no current kernel support for power
management on the 68328.

Signed-off-by: Greg Ungerer <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/serial/68328serial.c |   59 --
 1 files changed, 0 insertions(+), 59 deletions(-)

diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c
index cad426c..151bd9a 100644
--- a/drivers/serial/68328serial.c
+++ b/drivers/serial/68328serial.c
@@ -33,7 +33,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -1324,59 +1323,6 @@ static void show_serial_version(void)
printk("MC68328 serial driver version 1.00\n");
 }
 
-#ifdef CONFIG_PM_LEGACY
-/* Serial Power management
- *  The console (currently fixed at line 0) is a special case for power
- *  management because the kernel is so chatty. The console will be 
- *  explicitly disabled my our power manager as the last minute, so we won't
- *  mess with it here.
- */
-static struct pm_dev *serial_pm[NR_PORTS];
-
-static int serial_pm_callback(struct pm_dev *dev, pm_request_t request, void 
*data)
-{
-   struct m68k_serial *info = (struct m68k_serial *)dev->data;
-
-   if(info == NULL)
-   return -1;
-
-   /* special case for line 0 - pm restores it */
-   if(info->line == 0)
-   return 0; 
-
-   switch (request) {
-   case PM_SUSPEND:
-   shutdown(info);
-   break;
-
-   case PM_RESUME:
-   startup(info);
-   break;
-   }
-   return 0;
-}
-
-void shutdown_console(void)
-{
-   struct m68k_serial *info = &m68k_soft[0];
-
-   /* HACK: wait a bit for any pending printk's to be dumped */
-   {
-   int i = 1;
-   while(i--);
-   }
-
-   shutdown(info);
-}
-
-void startup_console(void)
-{
-   struct m68k_serial *info = &m68k_soft[0];
-   startup(info);
-}
-#endif /* CONFIG_PM_LEGACY */
-
-
 static const struct tty_operations rs_ops = {
.open = rs_open,
.close = rs_close,
@@ -1467,11 +1413,6 @@ rs68328_init(void)
IRQ_FLG_STD,
"M68328_UART", NULL))
 panic("Unable to attach 68328 serial interrupt\n");
-#ifdef CONFIG_PM_LEGACY
-   serial_pm[i] = pm_register(PM_SYS_DEV, PM_SYS_COM, 
serial_pm_callback);
-   if (serial_pm[i])
-   serial_pm[i]->data = info;
-#endif
}
local_irq_restore(flags);
return 0;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


m68knommu: need to include linux/device.h in dma.c

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=85e026bc0d9c9962de5ad65e3be40733f0f8d99c
Commit: 85e026bc0d9c9962de5ad65e3be40733f0f8d99c
Parent: 5c4f5264d503f0650c954a181b0ba255913bb382
Author: Greg Ungerer <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 22:07:20 2007 +1000
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 11:05:01 2007 -0700

m68knommu: need to include linux/device.h in dma.c

Need to explicitly include linux/device.h.

Signed-off-by: Greg Ungerer <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/m68knommu/kernel/dma.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/m68knommu/kernel/dma.c b/arch/m68knommu/kernel/dma.c
index 0a25874..e10eafc 100644
--- a/arch/m68knommu/kernel/dma.c
+++ b/arch/m68knommu/kernel/dma.c
@@ -8,6 +8,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 void *dma_alloc_coherent(struct device *dev, size_t size,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


m68knommu: simplify ColdFire resume code

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7160a67305f08d52284b333f1403abbf8b0a1970
Commit: 7160a67305f08d52284b333f1403abbf8b0a1970
Parent: 063586a6b1e877eb10621d191aeb67e361383d77
Author: Greg Ungerer <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 22:07:20 2007 +1000
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 11:05:01 2007 -0700

m68knommu: simplify ColdFire resume code

It is useless to preserve THREAD_SR in `resume'.  The real user's sr
is actually in the stack.  We also don't need to disable interrupts :
we'll never be in an invalid state, the sp switch is atomic.

Signed-off-by: Philippe De Muyter <[EMAIL PROTECTED]>
Signed-off-by: Greg Ungerer <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/m68knommu/platform/5307/entry.S |   11 ++-
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/arch/m68knommu/platform/5307/entry.S 
b/arch/m68knommu/platform/5307/entry.S
index c358aeb..a8cd867 100644
--- a/arch/m68knommu/platform/5307/entry.S
+++ b/arch/m68knommu/platform/5307/entry.S
@@ -213,16 +213,12 @@ ENTRY(ret_from_interrupt)
  * Beware - when entering resume, prev (the current task) is
  * in a0, next (the new task) is in a1,so don't change these
  * registers until their contents are no longer needed.
+ * This is always called in supervisor mode, so don't bother to save
+ * and restore sr; user's process sr is actually in the stack.
  */
 ENTRY(resume)
movel   %a0, %d1/* get prev thread in d1 */
 
-   movew   %sr,%d0 /* save thread status reg */
-   movew   %d0,%a0@(TASK_THREAD+THREAD_SR)
-
-   oril#0x700,%d0  /* disable interrupts */
-   move%d0,%sr
-
movel   sw_usp,%d0  /* save usp */
movel   %d0,%a0@(TASK_THREAD+THREAD_USP)
 
@@ -233,7 +229,4 @@ ENTRY(resume)
 
movel   %a1@(TASK_THREAD+THREAD_USP),%a0 /* restore thread user stack */
movel   %a0, sw_usp
-
-   movew   %a1@(TASK_THREAD+THREAD_SR),%d0 /* restore thread status reg */
-   movew   %d0, %sr
rts
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


m68knommu: create hw_irq.h

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=063586a6b1e877eb10621d191aeb67e361383d77
Commit: 063586a6b1e877eb10621d191aeb67e361383d77
Parent: a6fcafd09959cf9204f0cdb7a2545ffd7d95d5dd
Author: Greg Ungerer <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 22:07:20 2007 +1000
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 11:05:01 2007 -0700

m68knommu: create hw_irq.h

Need an include/asm-m68knommu/hw_irq.h for kernel/hrtimer.c

Signed-off-by: Greg Ungerer <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/asm-m68knommu/hw_irq.h |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/asm-m68knommu/hw_irq.h b/include/asm-m68knommu/hw_irq.h
new file mode 100644
index 000..f3ec9e5
--- /dev/null
+++ b/include/asm-m68knommu/hw_irq.h
@@ -0,0 +1,4 @@
+#ifndef __M68KNOMMU_HW_IRQ_H__
+#define __M68KNOMMU_HW_IRQ_H__
+
+#endif /* __M68KNOMMU_HW_IRQ_H__ */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


m68knommu: make BOOTPARAM setup common

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bc72450aebe73587f80bbae8fc0b62c3d81b85fe
Commit: bc72450aebe73587f80bbae8fc0b62c3d81b85fe
Parent: 020f9e16c306f929382ad81e5a0ecf4f41887616
Author: Greg Ungerer <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 22:07:20 2007 +1000
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 11:05:01 2007 -0700

m68knommu: make BOOTPARAM setup common

Currently most of the m68knommu cpu/board setup files are handling
the setup of fixed boot parameters (via CONFIG_BOOTPARAM) themselves.
Move all this into the common setup code.

Signed-off-by: Greg Ungerer <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/m68knommu/kernel/setup.c|5 +
 arch/m68knommu/platform/5206/config.c|8 
 arch/m68knommu/platform/5206e/config.c   |7 +--
 arch/m68knommu/platform/520x/config.c|7 ---
 arch/m68knommu/platform/523x/config.c|8 
 arch/m68knommu/platform/5249/config.c|8 
 arch/m68knommu/platform/5272/config.c|7 +--
 arch/m68knommu/platform/527x/config.c|8 
 arch/m68knommu/platform/528x/config.c|8 
 arch/m68knommu/platform/5307/config.c|7 +--
 arch/m68knommu/platform/532x/config.c|5 +
 arch/m68knommu/platform/5407/config.c|7 ---
 arch/m68knommu/platform/68VZ328/config.c |7 ---
 13 files changed, 9 insertions(+), 83 deletions(-)

diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index 2203f69..a5ac0d4 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -132,6 +132,11 @@ void setup_arch(char **cmdline_p)
 
config_BSP(&command_line[0], sizeof(command_line));
 
+#if defined(CONFIG_BOOTPARAM)
+   strncpy(&command_line[0], CONFIG_BOOTPARAM_STRING, 
sizeof(command_line));
+   command_line[sizeof(command_line) - 1] = 0;
+#endif
+
printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU "\n");
 
 #ifdef CONFIG_UCDIMM
diff --git a/arch/m68knommu/platform/5206/config.c 
b/arch/m68knommu/platform/5206/config.c
index 3343830..d265ed4 100644
--- a/arch/m68knommu/platform/5206/config.c
+++ b/arch/m68knommu/platform/5206/config.c
@@ -98,14 +98,6 @@ int mcf_timerirqpending(int timer)
 void config_BSP(char *commandp, int size)
 {
mcf_setimr(MCFSIM_IMR_MASKALL);
-
-#if defined(CONFIG_BOOTPARAM)
-   strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
-   commandp[size-1] = 0;
-#else
-   memset(commandp, 0, size);
-#endif
-
mach_sched_init = coldfire_timer_init;
mach_tick = coldfire_tick;
mach_gettimeoffset = coldfire_timer_offset;
diff --git a/arch/m68knommu/platform/5206e/config.c 
b/arch/m68knommu/platform/5206e/config.c
index 0f67320..7fa5e82 100644
--- a/arch/m68knommu/platform/5206e/config.c
+++ b/arch/m68knommu/platform/5206e/config.c
@@ -98,15 +98,10 @@ void config_BSP(char *commandp, int size)
 {
mcf_setimr(MCFSIM_IMR_MASKALL);
 
-#if defined(CONFIG_BOOTPARAM)
-   strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
-   commandp[size-1] = 0;
-#elif defined(CONFIG_NETtel)
+#if defined(CONFIG_NETtel)
/* Copy command line from FLASH to local buffer... */
memcpy(commandp, (char *) 0xf0004000, size);
commandp[size-1] = 0;
-#else
-   memset(commandp, 0, size);
 #endif /* CONFIG_NETtel */
 
mach_sched_init = coldfire_timer_init;
diff --git a/arch/m68knommu/platform/520x/config.c 
b/arch/m68knommu/platform/520x/config.c
index 58b2878..85830f9 100644
--- a/arch/m68knommu/platform/520x/config.c
+++ b/arch/m68knommu/platform/520x/config.c
@@ -48,13 +48,6 @@ void mcf_autovector(unsigned int vec)
 
 void config_BSP(char *commandp, int size)
 {
-#ifdef CONFIG_BOOTPARAM
-strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
-commandp[size-1] = 0;
-#else
-memset(commandp, 0, size);
-#endif
-
 mach_sched_init = coldfire_pit_init;
 mach_tick = coldfire_pit_tick;
 mach_gettimeoffset = coldfire_pit_offset;
diff --git a/arch/m68knommu/platform/523x/config.c 
b/arch/m68knommu/platform/523x/config.c
index 9b054e6..c0157e1 100644
--- a/arch/m68knommu/platform/523x/config.c
+++ b/arch/m68knommu/platform/523x/config.c
@@ -63,14 +63,6 @@ void mcf_autovector(unsigned int vec)
 void config_BSP(char *commandp, int size)
 {
mcf_disableall();
-
-#ifdef CONFIG_BOOTPARAM
-   strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
-   commandp[size-1] = 0;
-#else
-   memset(commandp, 0, size);
-#endif
-
mach_sched_init = coldfire_pit_init;
mach_tick = coldfire_pit_tick;
mach_gettimeoffset = coldfire_pit_offset;
diff --git a/arch/m68knommu/platform/5249/config.c 
b/arch/m68knommu/platform/5249/config.c
index d670607..4cdeb71 100644
--- a/arch/m68knommu/platform/5249/config.c
+++ b/arch/m68knommu/platform/5249/config.c
@@ -96,14 +96

ACPI: Implement the set_target() callback from pm_ops

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e9b3aba887f47f9cd64de20fec9c333a932b70dc
Commit: e9b3aba887f47f9cd64de20fec9c333a932b70dc
Parent: d7fff6f4d1ed1bc31577df887fefcb1541923367
Author: Rafael J. Wysocki <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 22:40:06 2007 +0200
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Sun Jul 22 04:17:38 2007 -0400

ACPI: Implement the set_target() callback from pm_ops

In the future some drivers may need to use ACPI to determine the low power
states in which to place their devices, but to provide the drivers with this
information the ACPI core needs to know what sleep state the system is 
going to
enter.  Namely, the device's state should not be too high power for given 
system
sleep state and, if the device is supposed to be able to wake up the 
system, its
state should not be too low power for the wake up to be possible).  For this
purpose, the ACPI core needs to implement the set_target() method in 'struct
pm_ops' and store the target system sleep state passed by the PM core in a
variable.

Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
Acked-by: Pavel Machek <[EMAIL PROTECTED]>
Acked-by: David Brownell <[EMAIL PROTECTED]>
Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/sleep/main.c |   84 -
 1 files changed, 52 insertions(+), 32 deletions(-)

diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index 42127c0..19f8557 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -34,34 +34,54 @@ static u32 acpi_suspend_states[] = {
 
 static int init_8259A_after_S1;
 
+extern int acpi_sleep_prepare(u32 acpi_state);
+extern void acpi_power_off(void);
+
+static u32 acpi_target_sleep_state = ACPI_STATE_S0;
+
+/**
+ * acpi_pm_set_target - Set the target system sleep state to the state
+ * associated with given @pm_state, if supported.
+ */
+
+static int acpi_pm_set_target(suspend_state_t pm_state)
+{
+   u32 acpi_state = acpi_suspend_states[pm_state];
+   int error = 0;
+
+   if (sleep_states[acpi_state]) {
+   acpi_target_sleep_state = acpi_state;
+   } else {
+   printk(KERN_ERR "ACPI does not support this state: %d\n",
+   pm_state);
+   error = -ENOSYS;
+   }
+   return error;
+}
+
 /**
  * acpi_pm_prepare - Do preliminary suspend work.
- * @pm_state:  suspend state we're entering.
+ * @pm_state: ignored
  *
- * Make sure we support the state. If we do, and we need it, set the
- * firmware waking vector and do arch-specific nastiness to get the 
- * wakeup code to the waking vector. 
+ * If necessary, set the firmware waking vector and do arch-specific
+ * nastiness to get the wakeup code to the waking vector.
  */
 
-extern int acpi_sleep_prepare(u32 acpi_state);
-extern void acpi_power_off(void);
-
 static int acpi_pm_prepare(suspend_state_t pm_state)
 {
-   u32 acpi_state = acpi_suspend_states[pm_state];
+   int error = acpi_sleep_prepare(acpi_target_sleep_state);
 
-   if (!sleep_states[acpi_state]) {
-   printk("acpi_pm_prepare does not support %d \n", pm_state);
-   return -EPERM;
-   }
-   return acpi_sleep_prepare(acpi_state);
+   if (error)
+   acpi_target_sleep_state = ACPI_STATE_S0;
+
+   return error;
 }
 
 /**
  * acpi_pm_enter - Actually enter a sleep state.
- * @pm_state:  State we're entering.
+ * @pm_state: ignored
  *
- * Flush caches and go to sleep. For STR or STD, we have to call 
+ * Flush caches and go to sleep. For STR or S2, we have to call
  * arch-specific assembly, which in turn call acpi_enter_sleep_state().
  * It's unfortunate, but it works. Please fix if you're feeling frisky.
  */
@@ -70,31 +90,32 @@ static int acpi_pm_enter(suspend_state_t pm_state)
 {
acpi_status status = AE_OK;
unsigned long flags = 0;
-   u32 acpi_state = acpi_suspend_states[pm_state];
+   u32 acpi_state = acpi_target_sleep_state;
 
ACPI_FLUSH_CPU_CACHE();
 
/* Do arch specific saving of state. */
-   if (pm_state > PM_SUSPEND_STANDBY) {
+   if (acpi_state == ACPI_STATE_S2 || acpi_state == ACPI_STATE_S3) {
int error = acpi_save_state_mem();
-   if (error)
+
+   if (error) {
+   acpi_target_sleep_state = ACPI_STATE_S0;
return error;
+   }
}
 
local_irq_save(flags);
acpi_enable_wakeup_device(acpi_state);
-   switch (pm_state) {
-   case PM_SUSPEND_STANDBY:
+   switch (acpi_state) {
+   case ACPI_STATE_S1:
barrier();
status = acpi_enter_sleep_state(acpi_state);
break;
 
-   case P

ACPI: Kconfig: fold /proc/acpi/sleep under CONFIG_ACPI_PROCFS

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=43532c8a46ae313c2da3baa7598a1de4d403ba83
Commit: 43532c8a46ae313c2da3baa7598a1de4d403ba83
Parent: fb804714560463534ebcb538a3b0a3c687a830ec
Author: Len Brown <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 24 02:16:50 2007 -0400
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Tue Jul 24 02:16:50 2007 -0400

ACPI: Kconfig: fold /proc/acpi/sleep under CONFIG_ACPI_PROCFS

/proc/acpi/sleep has had its own "default n" option,
ACPI_SLEEP_PROC_SLEEP, for many months.
Time to delete ACPI_SLEEP_PROC_SLEEP.

Users that still need /proc/acpi/sleep can still get it
along with the other deprecated /proc/acpi files
by enabling CONFIG_ACPI_PROCFS.

Also delete ACPI_SLEEP_PROC_FS, which was an umbrella
for /proc/acpi/sleep, wakeup, alarm, because it was
effectively just a synonym for ACPI_SLEEP.

Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/Kconfig|   14 +-
 drivers/acpi/sleep/Makefile |2 +-
 drivers/acpi/sleep/proc.c   |   20 ++--
 3 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 8e42977..efd47ee 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -62,19 +62,6 @@ config ACPI_SLEEP
  This option is not recommended for anyone except those doing driver
  power management development.
 
-config ACPI_SLEEP_PROC_FS
-   bool
-   depends on ACPI_SLEEP && PROC_FS
-   default y
-
-config ACPI_SLEEP_PROC_SLEEP
-   bool "/proc/acpi/sleep (deprecated)"
-   depends on ACPI_SLEEP_PROC_FS
-   default n
-   ---help---
- Create /proc/acpi/sleep
- Deprecated by /sys/power/state
-
 config ACPI_PROCFS
bool "Deprecated /proc/acpi files"
depends on PROC_FS
@@ -84,6 +71,7 @@ config ACPI_PROCFS
  they have been replaced by functions in /sys.
  The deprecated files (and their replacements) include:
 
+ /proc/acpi/sleep (/sys/power/state)
  /proc/acpi/info (/sys/modules/acpi/parameters/acpica_version)
  /proc/acpi/dsdt (/sys/firmware/acpi/tables/DSDT)
  /proc/acpi/fadt (/sys/firmware/acpi/tables/FACP)
diff --git a/drivers/acpi/sleep/Makefile b/drivers/acpi/sleep/Makefile
index d6c0177..195a4f6 100644
--- a/drivers/acpi/sleep/Makefile
+++ b/drivers/acpi/sleep/Makefile
@@ -1,5 +1,5 @@
 obj-y  := poweroff.o wakeup.o
 obj-$(CONFIG_ACPI_SLEEP)   += main.o
-obj-$(CONFIG_ACPI_SLEEP_PROC_FS)   += proc.o
+obj-$(CONFIG_ACPI_SLEEP)   += proc.o
 
 EXTRA_CFLAGS += $(ACPI_CFLAGS)
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c
index 61f1822..ed58e11 100644
--- a/drivers/acpi/sleep/proc.c
+++ b/drivers/acpi/sleep/proc.c
@@ -14,8 +14,16 @@
 #include "sleep.h"
 
 #define _COMPONENT ACPI_SYSTEM_COMPONENT
+
+/*
+ * this file provides support for:
+ * /proc/acpi/sleep
+ * /proc/acpi/alarm
+ * /proc/acpi/wakeup
+ */
+
 ACPI_MODULE_NAME("sleep")
-#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP
+#ifdef CONFIG_ACPI_PROCFS
 static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset)
 {
int i;
@@ -68,7 +76,7 @@ acpi_system_write_sleep(struct file *file,
   Done:
return error ? error : count;
 }
-#endif /* CONFIG_ACPI_SLEEP_PROC_SLEEP */
+#endif /* CONFIG_ACPI_PROCFS */
 
 #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE)
 /* use /sys/class/rtc/rtcX/wakealarm instead; it's not ACPI-specific */
@@ -463,7 +471,7 @@ static const struct file_operations 
acpi_system_wakeup_device_fops = {
.release = single_release,
 };
 
-#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP
+#ifdef CONFIG_ACPI_PROCFS
 static const struct file_operations acpi_system_sleep_fops = {
.open = acpi_system_sleep_open_fs,
.read = seq_read,
@@ -471,7 +479,7 @@ static const struct file_operations acpi_system_sleep_fops 
= {
.llseek = seq_lseek,
.release = single_release,
 };
-#endif /* CONFIG_ACPI_SLEEP_PROC_SLEEP */
+#endif /* CONFIG_ACPI_PROCFS */
 
 #ifdef HAVE_ACPI_LEGACY_ALARM
 static const struct file_operations acpi_system_alarm_fops = {
@@ -498,14 +506,14 @@ static int __init acpi_sleep_proc_init(void)
if (acpi_disabled)
return 0;
 
-#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP
+#ifdef CONFIG_ACPI_PROCFS
/* 'sleep' [R/W] */
entry =
create_proc_entry("sleep", S_IFREG | S_IRUGO | S_IWUSR,
  acpi_root_dir);
if (entry)
entry->proc_fops = &acpi_system_sleep_fops;
-#endif
+#endif /* CONFIG_ACPI_PROCFS */
 
 #ifdef HAVE_ACPI_LEGACY_ALARM
/* 'alarm' [R/W] */
-
To unsubscribe from this list: send the line "unsubscribe 

ACPI: Use ACPI methods to select PCI device suspend state

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ab826ca4cf2fe8ebcfd21189ca8bfeb47ca88359
Commit: ab826ca4cf2fe8ebcfd21189ca8bfeb47ca88359
Parent: fc30e68e88baf463683bde43347756889ba2ffae
Author: Shaohua Li <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 20 10:03:22 2007 +0800
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Sun Jul 22 04:18:32 2007 -0400

ACPI: Use ACPI methods to select PCI device suspend state

applied after Rafel's 'PM: Update global suspend and hibernation
operations framework' patch set

Signed-off-by: Shaohua Li<[EMAIL PROTECTED]>
Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/pci/pci-acpi.c |   24 
 drivers/pci/pci.c  |8 
 drivers/pci/pci.h  |2 +-
 3 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index c806249..5e866b9 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -245,11 +245,27 @@ EXPORT_SYMBOL(pci_osc_control_set);
  * currently we simply return _SxD, if present.
  */
 
-static int acpi_pci_choose_state(struct pci_dev *pdev, pm_message_t state)
+static pci_power_t acpi_pci_choose_state(struct pci_dev *pdev,
+   pm_message_t state)
 {
-   /* TBD */
-
-   return -ENODEV;
+   int acpi_state;
+
+   acpi_state = acpi_pm_device_sleep_state(&pdev->dev,
+   device_may_wakeup(&pdev->dev), NULL);
+   if (acpi_state < 0)
+   return PCI_POWER_ERROR;
+
+   switch (acpi_state) {
+   case ACPI_STATE_D0:
+   return PCI_D0;
+   case ACPI_STATE_D1:
+   return PCI_D1;
+   case ACPI_STATE_D2:
+   return PCI_D2;
+   case ACPI_STATE_D3:
+   return PCI_D3hot;
+   }
+   return PCI_POWER_ERROR;
 }
 
 static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 03fd59e..1458fd6 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -499,7 +499,7 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state)
return 0;
 }
 
-int (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state);
+pci_power_t (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t 
state);
  
 /**
  * pci_choose_state - Choose the power state of a PCI device
@@ -513,15 +513,15 @@ int (*platform_pci_choose_state)(struct pci_dev *dev, 
pm_message_t state);
 
 pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state)
 {
-   int ret;
+   pci_power_t ret;
 
if (!pci_find_capability(dev, PCI_CAP_ID_PM))
return PCI_D0;
 
if (platform_pci_choose_state) {
ret = platform_pci_choose_state(dev, state);
-   if (ret >= 0)
-   state.event = ret;
+   if (ret != PCI_POWER_ERROR)
+   return ret;
}
 
switch (state.event) {
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 3fec13d..c293ba1 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -13,7 +13,7 @@ extern int pci_bus_alloc_resource(struct pci_bus *bus, struct 
resource *res,
  resource_size_t, resource_size_t),
  void *alignf_data);
 /* Firmware callbacks */
-extern int (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t 
state);
+extern pci_power_t (*platform_pci_choose_state)(struct pci_dev *dev, 
pm_message_t state);
 extern int (*platform_pci_set_power_state)(struct pci_dev *dev, pci_power_t 
state);
 
 extern int pci_user_read_config_byte(struct pci_dev *dev, int where, u8 *val);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ACPI: autoload modules - ACPICA modifications

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8c8eb78f673c07b60f31751e1e47ac367c60c6b7
Commit: 8c8eb78f673c07b60f31751e1e47ac367c60c6b7
Parent: f695baf2df9e0413d3521661070103711545207a
Author: Thomas Renninger <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 23 14:43:32 2007 +0200
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Mon Jul 23 13:56:00 2007 -0400

ACPI: autoload modules - ACPICA modifications

Define standardized HIDs - Rename current acpi_device_id to acpica_device_id

Signed-off-by: Thomas Renninger <[EMAIL PROTECTED]>
Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/events/evrgnini.c|2 +-
 drivers/acpi/namespace/nsxfeval.c |2 +-
 drivers/acpi/utilities/uteval.c   |4 ++--
 include/acpi/acpi_bus.h   |5 +++--
 include/acpi/acpi_drivers.h   |   21 +
 include/acpi/actypes.h|6 +++---
 include/acpi/acutils.h|4 ++--
 7 files changed, 25 insertions(+), 19 deletions(-)

diff --git a/drivers/acpi/events/evrgnini.c b/drivers/acpi/events/evrgnini.c
index 23ee7bc..b1aaa0e 100644
--- a/drivers/acpi/events/evrgnini.c
+++ b/drivers/acpi/events/evrgnini.c
@@ -378,7 +378,7 @@ static u8 acpi_ev_match_pci_root_bridge(char *id)
 static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node)
 {
acpi_status status;
-   struct acpi_device_id hid;
+   struct acpica_device_id hid;
struct acpi_compatible_id_list *cid;
acpi_native_uint i;
 
diff --git a/drivers/acpi/namespace/nsxfeval.c 
b/drivers/acpi/namespace/nsxfeval.c
index be4f289..ab65b2c 100644
--- a/drivers/acpi/namespace/nsxfeval.c
+++ b/drivers/acpi/namespace/nsxfeval.c
@@ -440,7 +440,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
acpi_status status;
struct acpi_namespace_node *node;
u32 flags;
-   struct acpi_device_id hid;
+   struct acpica_device_id hid;
struct acpi_compatible_id_list *cid;
acpi_native_uint i;
 
diff --git a/drivers/acpi/utilities/uteval.c b/drivers/acpi/utilities/uteval.c
index f112af4..0042b7e 100644
--- a/drivers/acpi/utilities/uteval.c
+++ b/drivers/acpi/utilities/uteval.c
@@ -407,7 +407,7 @@ acpi_ut_copy_id_string(char *destination, char *source, 
acpi_size max_length)
 
 acpi_status
 acpi_ut_execute_HID(struct acpi_namespace_node *device_node,
-   struct acpi_device_id *hid)
+   struct acpica_device_id *hid)
 {
union acpi_operand_object *obj_desc;
acpi_status status;
@@ -609,7 +609,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node * 
device_node,
 
 acpi_status
 acpi_ut_execute_UID(struct acpi_namespace_node *device_node,
-   struct acpi_device_id *uid)
+   struct acpica_device_id *uid)
 {
union acpi_operand_object *obj_desc;
acpi_status status;
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 5e3dcf3..3f2a22b 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -131,7 +131,7 @@ struct acpi_device_ops {
 struct acpi_driver {
char name[80];
char class[80];
-   char *ids;  /* Supported Hardware IDs */
+   const struct acpi_device_id *ids; /* Supported Hardware IDs */
struct acpi_device_ops ops;
struct device_driver drv;
struct module *owner;
@@ -341,7 +341,8 @@ int acpi_bus_add(struct acpi_device **child, struct 
acpi_device *parent,
 int acpi_bus_trim(struct acpi_device *start, int rmdevice);
 int acpi_bus_start(struct acpi_device *device);
 acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle * ejd);
-int acpi_match_ids(struct acpi_device *device, char *ids);
+int acpi_match_device_ids(struct acpi_device *device,
+ const struct acpi_device_id *ids);
 int acpi_create_dir(struct acpi_device *);
 void acpi_remove_dir(struct acpi_device *);
 
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index 5535159..c348ff4 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -34,16 +34,21 @@
 #define ACPI_BUS_COMPONENT 0x0001
 #define ACPI_SYSTEM_COMPONENT  0x0200
 
-/* _HID definitions */
+/*
+ * _HID definitions
+ * HIDs must conform to ACPI spec(6.1.4)
+ * Linux specific HIDs do not apply to this and begin with LNX:
+ */
 
-#define ACPI_POWER_HID "power_resource"
+#define ACPI_POWER_HID "LNXPOWER"
 #define ACPI_PROCESSOR_HID "ACPI0007"
-#define ACPI_SYSTEM_HID"acpi_system"
-#define ACPI_THERMAL_HID   "thermal"
-#define ACPI_BUTTON_HID_POWERF "button_power"
-#define ACPI_BUTTON_HID_SLEEPF "button_sleep"
-#define ACPI_VIDEO_HID "video"
-#define ACPI_BAY_HID   "bay"
+#define ACPI_SYSTEM_HID"LNXSYSTM"
+#define ACPI_THERMAL_HID  

ACPI: ignore _PSx method for hotplugable PCI devices

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=10b3dcae0f275e2546e55303d64ddbb58cec7599
Commit: 10b3dcae0f275e2546e55303d64ddbb58cec7599
Parent: ab826ca4cf2fe8ebcfd21189ca8bfeb47ca88359
Author: Shaohua Li <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 20 10:03:25 2007 +0800
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Sun Jul 22 04:18:45 2007 -0400

ACPI: ignore _PSx method for hotplugable PCI devices

If the ACPI device has _EJ0, ignore the device.
_PSx will set power for the slot,
and the hotplug driver will take care of _PSx.

Signed-off-by: Shaohua Li <[EMAIL PROTECTED]>
Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/pci/pci-acpi.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index 5e866b9..67c63d1 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -271,6 +271,7 @@ static pci_power_t acpi_pci_choose_state(struct pci_dev 
*pdev,
 static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
 {
acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev);
+   acpi_handle tmp;
static int state_conv[] = {
[0] = 0,
[1] = 1,
@@ -282,6 +283,9 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, 
pci_power_t state)
 
if (!handle)
return -ENODEV;
+   /* If the ACPI device has _EJ0, ignore the device */
+   if (ACPI_SUCCESS(acpi_get_handle(handle, "_EJ0", &tmp)))
+   return 0;
return acpi_bus_set_power(handle, acpi_state);
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ACPI: Add acpi_pm_device_sleep_state helper routine

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fd4aff1a28eecbd729b409bf7d3eff5948f20414
Commit: fd4aff1a28eecbd729b409bf7d3eff5948f20414
Parent: e9b3aba887f47f9cd64de20fec9c333a932b70dc
Author: Shaohua Li <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 22:40:25 2007 +0200
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Sun Jul 22 04:17:47 2007 -0400

ACPI: Add acpi_pm_device_sleep_state helper routine

Based on the David Brownell's patch at
http://marc.info/?l=linux-acpi&m=117873972806360&w=2
updated by: Rafael J. Wysocki <[EMAIL PROTECTED]>

Add a helper routine returning the lowest power (highest number) ACPI device
power state that given device can be in while the system is in the sleep 
state
indicated by acpi_target_sleep_state .

Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
Acked-by: Pavel Machek <[EMAIL PROTECTED]>
Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/sleep/main.c |   75 +
 include/acpi/acpi_bus.h   |2 +
 2 files changed, 77 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index 19f8557..55eca6e 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -260,6 +260,81 @@ static struct hibernation_ops acpi_hibernation_ops = {
 };
 #endif /* CONFIG_SOFTWARE_SUSPEND */
 
+/**
+ * acpi_pm_device_sleep_state - return preferred power state of ACPI device
+ * in the system sleep state given by %acpi_target_sleep_state
+ * @dev: device to examine
+ * @wake: if set, the device should be able to wake up the system
+ * @d_min_p: used to store the upper limit of allowed states range
+ * Return value: preferred power state of the device on success, -ENODEV on
+ * failure (ie. if there's no 'struct acpi_device' for @dev)
+ *
+ * Find the lowest power (highest number) ACPI device power state that
+ * device @dev can be in while the system is in the sleep state represented
+ * by %acpi_target_sleep_state.  If @wake is nonzero, the device should be
+ * able to wake up the system from this sleep state.  If @d_min_p is set,
+ * the highest power (lowest number) device power state of @dev allowed
+ * in this system sleep state is stored at the location pointed to by it.
+ *
+ * The caller must ensure that @dev is valid before using this function.
+ * The caller is also responsible for figuring out if the device is
+ * supposed to be able to wake up the system and passing this information
+ * via @wake.
+ */
+
+int acpi_pm_device_sleep_state(struct device *dev, int wake, int *d_min_p)
+{
+   acpi_handle handle = DEVICE_ACPI_HANDLE(dev);
+   struct acpi_device *adev;
+   char acpi_method[] = "_SxD";
+   unsigned long d_min, d_max;
+
+   if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &adev))) {
+   printk(KERN_ERR "ACPI handle has no context!\n");
+   return -ENODEV;
+   }
+
+   acpi_method[2] = '0' + acpi_target_sleep_state;
+   /*
+* If the sleep state is S0, we will return D3, but if the device has
+* _S0W, we will use the value from _S0W
+*/
+   d_min = ACPI_STATE_D0;
+   d_max = ACPI_STATE_D3;
+
+   /*
+* If present, _SxD methods return the minimum D-state (highest power
+* state) we can use for the corresponding S-states.  Otherwise, the
+* minimum D-state is D0 (ACPI 3.x).
+*
+* NOTE: We rely on acpi_evaluate_integer() not clobbering the integer
+* provided -- that's our fault recovery, we ignore retval.
+*/
+   if (acpi_target_sleep_state > ACPI_STATE_S0)
+   acpi_evaluate_integer(handle, acpi_method, NULL, &d_min);
+
+   /*
+* If _PRW says we can wake up the system from the target sleep state,
+* the D-state returned by _SxD is sufficient for that (we assume a
+* wakeup-aware driver if wake is set).  Still, if _SxW exists
+* (ACPI 3.x), it should return the maximum (lowest power) D-state that
+* can wake the system.  _S0W may be valid, too.
+*/
+   if (acpi_target_sleep_state == ACPI_STATE_S0 ||
+   (wake && adev->wakeup.state.enabled &&
+adev->wakeup.sleep_state <= acpi_target_sleep_state)) {
+   acpi_method[3] = 'W';
+   acpi_evaluate_integer(handle, acpi_method, NULL, &d_max);
+   /* Sanity check */
+   if (d_max < d_min)
+   d_min = d_max;
+   }
+
+   if (d_min_p)
+   *d_min_p = d_min;
+   return d_max;
+}
+
 /*
  * Toshiba fails to preserve interrupts over S1, reinitialization
  * of 8259 is needed after S1 resume.
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index c6fa5e0..529d035 100644
--- a/inc

Revert "KVM: Avoid useless memory write when possible"

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7cfa4b0a43286b1da3afa4f5f99d52e65a8f30fc
Commit: 7cfa4b0a43286b1da3afa4f5f99d52e65a8f30fc
Parent: 5e58cfe41c7e5902c32bb7f62993d43fb4c48ccf
Author: Avi Kivity <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 23 18:33:14 2007 +0300
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 14:30:56 2007 +0300

Revert "KVM: Avoid useless memory write when possible"

This reverts commit a3c870bdce4d34332ebdba7eb9969592c4c6b243.  While it
does save useless updates, it (probably) defeats the fork detector, causing
a massive performance loss.

Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 drivers/kvm/kvm_main.c |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 46efbe7..a8d8db8 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -1070,10 +1070,8 @@ static int emulator_write_phys(struct kvm_vcpu *vcpu, 
gpa_t gpa,
return 0;
mark_page_dirty(vcpu->kvm, gpa >> PAGE_SHIFT);
virt = kmap_atomic(page, KM_USER0);
-   if (memcmp(virt + offset_in_page(gpa), val, bytes)) {
-   kvm_mmu_pte_write(vcpu, gpa, virt + offset, val, bytes);
-   memcpy(virt + offset_in_page(gpa), val, bytes);
-   }
+   kvm_mmu_pte_write(vcpu, gpa, virt + offset, val, bytes);
+   memcpy(virt + offset_in_page(gpa), val, bytes);
kunmap_atomic(virt, KM_USER0);
return 1;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ACPI: Kconfig: always enable CONFIG_ACPI_SLEEP on X86

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7c5aa6642fa26641ebf286966a165aec71c91991
Commit: 7c5aa6642fa26641ebf286966a165aec71c91991
Parent: 43532c8a46ae313c2da3baa7598a1de4d403ba83
Author: Len Brown <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 24 02:25:03 2007 -0400
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Tue Jul 24 02:25:03 2007 -0400

ACPI: Kconfig: always enable CONFIG_ACPI_SLEEP on X86

The SMP dependency on HOTPLUG_CPU and SUSPEND_SMP
caused more harm than good -- making ACPI sleep
support vanish for configs missing those options.
So simply select them on the (ACPI && SMP && X86) systems
that need them.

Also, remove the prompt for ACPI_SLEEP,
virtually nobody (intentionally) enables ACPI without it.

Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/Kconfig |   21 -
 1 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index efd47ee..524cbf1 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -43,24 +43,11 @@ menuconfig ACPI
 if ACPI
 
 config ACPI_SLEEP
-   bool "Sleep States"
-   depends on X86 && (!SMP || SUSPEND_SMP)
+   bool
+   depends on X86
+   select HOTPLUG_CPU if SMP
+   select SUSPEND_SMP if SMP
default y
-   ---help---
- This option adds support for ACPI suspend states. 
-
- With this option, you will be able to put the system "to sleep". 
- Sleep states are low power states for the system and devices. All
- of the system operating state is saved to either memory or disk
- (depending on the state), to allow the system to resume operation
- quickly at your request.
-
- Although this option sounds really nifty, barely any of the device
- drivers have been converted to the new driver model and hence few
- have proper power management support. 
-
- This option is not recommended for anyone except those doing driver
- power management development.
 
 config ACPI_PROCFS
bool "Deprecated /proc/acpi files"
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ACPI: Kconfig: CONFIG_ACPI_PROCFS now defaults to N

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fb804714560463534ebcb538a3b0a3c687a830ec
Commit: fb804714560463534ebcb538a3b0a3c687a830ec
Parent: f695baf2df9e0413d3521661070103711545207a
Author: Len Brown <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 24 01:50:46 2007 -0400
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Tue Jul 24 01:50:46 2007 -0400

ACPI: Kconfig: CONFIG_ACPI_PROCFS now defaults to N

delete "default y" from CONFIG_ACPI_PROCFS
(effectively making the default 'N')

List exactly what /proc files this option controls,
and clarify that it doesn't change non-deprecated files.

Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/Kconfig |   27 +--
 1 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 408b451..8e42977 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -76,17 +76,24 @@ config ACPI_SLEEP_PROC_SLEEP
  Deprecated by /sys/power/state
 
 config ACPI_PROCFS
-   bool "Procfs interface (deprecated)"
-   default y
+   bool "Deprecated /proc/acpi files"
+   depends on PROC_FS
---help---
- The Procfs interface for ACPI is made optional for backward 
compatibility.
- As the same functions are duplicated in the sysfs interface
- and this proc interface will be removed some time later,
- it's marked as deprecated.
- ( /proc/acpi/debug_layer && debug_level are deprecated by
-   /sys/module/acpi/parameters/debug_layer && debug_level.
-   /proc/acpi/info is deprecated by
-   /sys/module/acpi/parameters/acpica_version )
+ For backwards compatibility, this option allows
+ depricated /proc/acpi/ files to exist, even when
+ they have been replaced by functions in /sys.
+ The deprecated files (and their replacements) include:
+
+ /proc/acpi/info (/sys/modules/acpi/parameters/acpica_version)
+ /proc/acpi/dsdt (/sys/firmware/acpi/tables/DSDT)
+ /proc/acpi/fadt (/sys/firmware/acpi/tables/FACP)
+ /proc/acpi/debug_layer (/sys/module/acpi/parameters/debug_layer)
+ /proc/acpi/debug_level (/sys/module/acpi/parameters/debug_level)
+
+ This option has no effect on /proc/acpi/ files
+ and functions which do not yet exist in /sys.
+
+ Say N to delete /proc/acpi/ files that have moved to /sys/
 
 config ACPI_AC
tristate "AC Adapter"
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ACPI: Remove references to ACPI_STATE_S2 from acpi_pm_enter

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=50ad147aa09c829cd452fae6ca99396c0b5b0695
Commit: 50ad147aa09c829cd452fae6ca99396c0b5b0695
Parent: 10b3dcae0f275e2546e55303d64ddbb58cec7599
Author: Rafael J. Wysocki <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 24 11:58:39 2007 +0200
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Tue Jul 24 11:23:50 2007 -0400

ACPI: Remove references to ACPI_STATE_S2 from acpi_pm_enter

Remove references to ACPI_STATE_S2, introduced by
acpi-implement-the-set_target-callback-from-pm_ops.patch, from 
acpi_pm_enter().

Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/sleep/main.c |9 -
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index 55eca6e..29bdb01 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -81,8 +81,8 @@ static int acpi_pm_prepare(suspend_state_t pm_state)
  * acpi_pm_enter - Actually enter a sleep state.
  * @pm_state: ignored
  *
- * Flush caches and go to sleep. For STR or S2, we have to call
- * arch-specific assembly, which in turn call acpi_enter_sleep_state().
+ * Flush caches and go to sleep. For STR we have to call arch-specific
+ * assembly, which in turn call acpi_enter_sleep_state().
  * It's unfortunate, but it works. Please fix if you're feeling frisky.
  */
 
@@ -95,7 +95,7 @@ static int acpi_pm_enter(suspend_state_t pm_state)
ACPI_FLUSH_CPU_CACHE();
 
/* Do arch specific saving of state. */
-   if (acpi_state == ACPI_STATE_S2 || acpi_state == ACPI_STATE_S3) {
+   if (acpi_state == ACPI_STATE_S3) {
int error = acpi_save_state_mem();
 
if (error) {
@@ -112,7 +112,6 @@ static int acpi_pm_enter(suspend_state_t pm_state)
status = acpi_enter_sleep_state(acpi_state);
break;
 
-   case ACPI_STATE_S2:
case ACPI_STATE_S3:
do_suspend_lowlevel();
break;
@@ -129,7 +128,7 @@ static int acpi_pm_enter(suspend_state_t pm_state)
printk(KERN_DEBUG "Back to C!\n");
 
/* restore processor state */
-   if (acpi_state == ACPI_STATE_S2 || acpi_state == ACPI_STATE_S3)
+   if (acpi_state == ACPI_STATE_S3)
acpi_restore_state_mem();
 
return ACPI_SUCCESS(status) ? 0 : -EFAULT;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ACPI: autoload modules - Create ACPI alias interface

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=29b71a1ca74491fab9fed09e9d835d840d042690
Commit: 29b71a1ca74491fab9fed09e9d835d840d042690
Parent: 8c8eb78f673c07b60f31751e1e47ac367c60c6b7
Author: Thomas Renninger <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 23 14:43:51 2007 +0200
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Mon Jul 23 13:56:16 2007 -0400

ACPI: autoload modules - Create ACPI alias interface

Modify modpost (file2alias.c) to add acpi*:XYZ0001: alias in modules.alias
like:
grep acpi /lib/modules/2.6.22-rc4-default/modules.alias
alias acpi*:SNY5001:* sony_laptop
alias acpi*:SNY6001:* sony_laptop
for e.g. the sony_laptop module.
This module matches against all ACPI devices with a HID or CID of SNY5001
or SNY6001

Export an uevent and modalias sysfs file containing the string:
[MODALIAS=]acpi:PNP0C0C:
additional CIDs are concatenated at the end.

Signed-off-by: Thomas Renninger <[EMAIL PROTECTED]>
Signed-off-by: Kay Sievers <[EMAIL PROTECTED]>
Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/scan.c |  156 +++---
 drivers/pnp/pnpacpi/core.c  |   19 +++--
 include/linux/acpi.h|1 +
 include/linux/mod_devicetable.h |6 ++
 scripts/mod/file2alias.c|   12 +++
 5 files changed, 142 insertions(+), 52 deletions(-)

diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 6b3b8a5..be74347 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -16,7 +16,7 @@ ACPI_MODULE_NAME("scan");
 extern struct acpi_device *acpi_root;
 
 #define ACPI_BUS_CLASS "system_bus"
-#define ACPI_BUS_HID   "ACPI_BUS"
+#define ACPI_BUS_HID   "LNXSYBUS"
 #define ACPI_BUS_DEVICE_NAME   "System Bus"
 
 static LIST_HEAD(acpi_device_list);
@@ -29,6 +29,62 @@ struct acpi_device_bus_id{
unsigned int instance_no;
struct list_head node;
 };
+
+/*
+ * Creates hid/cid(s) string needed for modalias and uevent
+ * e.g. on a device with hid:IBM0001 and cid:ACPI0001 you get:
+ * char *modalias: "acpi:IBM0001:ACPI0001"
+*/
+int create_modalias(struct acpi_device *acpi_dev, char *modalias, int size){
+
+   int len;
+
+   if (!acpi_dev->flags.hardware_id)
+   return -ENODEV;
+
+   len = snprintf(modalias, size, "acpi:%s:",
+  acpi_dev->pnp.hardware_id);
+   if (len < 0 || len >= size)
+   return -EINVAL;
+   size -= len;
+
+   if (acpi_dev->flags.compatible_ids) {
+   struct acpi_compatible_id_list *cid_list;
+   int i;
+   int count;
+
+   cid_list = acpi_dev->pnp.cid_list;
+   for (i = 0; i < cid_list->count; i++) {
+   count = snprintf(&modalias[len], size, "%s:",
+cid_list->id[i].value);
+   if (count < 0 || count >= size) {
+   printk(KERN_ERR "acpi: %s cid[%i] exceeds event 
buffer size",
+  acpi_dev->pnp.device_name, i);
+   break;
+   }
+   len += count;
+   size -= count;
+   }
+   }
+
+   modalias[len] = '\0';
+   return len;
+}
+
+static ssize_t
+acpi_device_modalias_show(struct device *dev, struct device_attribute *attr, 
char *buf) {
+   struct acpi_device *acpi_dev = to_acpi_device(dev);
+   int len;
+
+   /* Device has no HID and no CID or string is >1024 */
+   len = create_modalias(acpi_dev, buf, 1024);
+   if (len <= 0)
+   return 0;
+   buf[len++] = '\n';
+   return len;
+}
+static DEVICE_ATTR(modalias, 0444, acpi_device_modalias_show, NULL);
+
 static int acpi_eject_operation(acpi_handle handle, int lockable)
 {
struct acpi_object_list arg_list;
@@ -154,6 +210,12 @@ static int acpi_device_setup_files(struct acpi_device *dev)
goto end;
}
 
+   if (dev->flags.hardware_id || dev->flags.compatible_ids){
+   result = device_create_file(&dev->dev, &dev_attr_modalias);
+   if(result)
+   goto end;
+   }
+
 /*
  * If device has _EJ0, 'eject' file is created that is used to trigger
  * hot-removal function from userland.
@@ -178,6 +240,9 @@ static void acpi_device_remove_files(struct acpi_device 
*dev)
if (ACPI_SUCCESS(status))
device_remove_file(&dev->dev, &dev_attr_eject);
 
+   if (dev->flags.hardware_id || dev->flags.compatible_ids)
+   device_remove_file(&dev->dev, &dev_attr_modalias);
+
if(dev->flags.hardware_id)
device_remove_file(&dev->dev, &dev_attr_hid);
if(dev->handle)
@@ -186,6 +251,37 @@ static void acpi_device_remove_files(

ACPI, PNP: hook ACPI D-state to PNP suspend/resume

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fc30e68e88baf463683bde43347756889ba2ffae
Commit: fc30e68e88baf463683bde43347756889ba2ffae
Parent: fd4aff1a28eecbd729b409bf7d3eff5948f20414
Author: Shaohua Li <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 20 10:03:20 2007 +0800
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Sun Jul 22 04:18:20 2007 -0400

ACPI, PNP: hook ACPI D-state to PNP suspend/resume

applied after Rafel's 'PM: Update global suspend and hibernation operations 
framework' patch set

Signed-off-by: Shaohua Li <[EMAIL PROTECTED]>
Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/pnp/driver.c   |5 +
 drivers/pnp/pnpacpi/core.c |   14 ++
 include/linux/pnp.h|4 
 3 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c
index e161423..1432806 100644
--- a/drivers/pnp/driver.c
+++ b/drivers/pnp/driver.c
@@ -167,6 +167,8 @@ static int pnp_bus_suspend(struct device *dev, pm_message_t 
state)
return error;
}
 
+   if (pnp_dev->protocol && pnp_dev->protocol->suspend)
+   pnp_dev->protocol->suspend(pnp_dev, state);
return 0;
 }
 
@@ -179,6 +181,9 @@ static int pnp_bus_resume(struct device *dev)
if (!pnp_drv)
return 0;
 
+   if (pnp_dev->protocol && pnp_dev->protocol->resume)
+   pnp_dev->protocol->resume(pnp_dev);
+
if (!(pnp_drv->flags & PNP_DRIVER_RES_DO_NOT_CHANGE)) {
error = pnp_start_dev(pnp_dev);
if (error)
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index a005487..c37a558 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -119,11 +119,25 @@ static int pnpacpi_disable_resources(struct pnp_dev *dev)
return ACPI_FAILURE(status) ? -ENODEV : 0;
 }
 
+static int pnpacpi_suspend(struct pnp_dev *dev, pm_message_t state)
+{
+   return acpi_bus_set_power((acpi_handle)dev->data,
+   acpi_pm_device_sleep_state(&dev->dev,
+   device_may_wakeup(&dev->dev), NULL));
+}
+
+static int pnpacpi_resume(struct pnp_dev *dev)
+{
+   return acpi_bus_set_power((acpi_handle)dev->data, ACPI_STATE_D0);
+}
+
 static struct pnp_protocol pnpacpi_protocol = {
.name   = "Plug and Play ACPI",
.get= pnpacpi_get_resources,
.set= pnpacpi_set_resources,
.disable = pnpacpi_disable_resources,
+   .suspend = pnpacpi_suspend,
+   .resume = pnpacpi_resume,
 };
 
 static int __init pnpacpi_add_device(struct acpi_device *device)
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index 2a1897e..66edb22 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -335,6 +335,10 @@ struct pnp_protocol {
int (*set)(struct pnp_dev *dev, struct pnp_resource_table *res);
int (*disable)(struct pnp_dev *dev);
 
+   /* protocol specific suspend/resume */
+   int (*suspend)(struct pnp_dev *dev, pm_message_t state);
+   int (*resume)(struct pnp_dev *dev);
+
/* used by pnp layer only (look but don't touch) */
unsigned char   number; /* protocol number*/
struct device   dev;/* link to driver model */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ACPI: quiet ACPI Exceptions due to no _PTC or _TSS

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c30c620ee1cc351bcc149c4280e1166998df0064
Commit: c30c620ee1cc351bcc149c4280e1166998df0064
Parent: 3b0d71170d37878bbb1203ebc3f92e36d6151a80
Author: Len Brown <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 00:57:46 2007 -0400
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 00:57:46 2007 -0400

ACPI: quiet ACPI Exceptions due to no _PTC or _TSS

ACPI Exception (processor_throttling-0084): AE_NOT_FOUND, Evaluating _PTC 
[20070126]
ACPI Exception (processor_throttling-0147): AE_NOT_FOUND, Evaluating _TSS 
[20070126]

These methods are optional, so Linux should not
alarm users when they are not found.

http://bugzilla.kernel.org/show_bug.cgi?id=8802

Signed-off-by: Len Brown <[EMAIL PROTECTED]>
Acked-by: Luming Yu <[EMAIL PROTECTED]>
---
 drivers/acpi/processor_throttling.c |   53 --
 1 files changed, 37 insertions(+), 16 deletions(-)

diff --git a/drivers/acpi/processor_throttling.c 
b/drivers/acpi/processor_throttling.c
index dc5b859..0b8204e 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -47,6 +47,9 @@ ACPI_MODULE_NAME("processor_throttling");
 static int acpi_processor_get_throttling(struct acpi_processor *pr);
 int acpi_processor_set_throttling(struct acpi_processor *pr, int state);
 
+/*
+ * _TPC - Throttling Present Capabilities
+ */
 static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
 {
acpi_status status = 0;
@@ -55,8 +58,10 @@ static int acpi_processor_get_platform_limit(struct 
acpi_processor *pr)
if (!pr)
return -EINVAL;
status = acpi_evaluate_integer(pr->handle, "_TPC", NULL, &tpc);
-   if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
-   ACPI_EXCEPTION((AE_INFO, status, "Evaluating _TPC"));
+   if (ACPI_FAILURE(status)) {
+   if (status != AE_NOT_FOUND) {
+   ACPI_EXCEPTION((AE_INFO, status, "Evaluating _TPC"));
+   }
return -ENODEV;
}
pr->throttling_platform_limit = (int)tpc;
@@ -68,9 +73,9 @@ int acpi_processor_tstate_has_changed(struct acpi_processor 
*pr)
return acpi_processor_get_platform_limit(pr);
 }
 
-/* --
- _PTC, _TSS, _TSD support 
-   -- 
*/
+/*
+ * _PTC - Processor Throttling Control (and status) register location
+ */
 static int acpi_processor_get_throttling_control(struct acpi_processor *pr)
 {
int result = 0;
@@ -81,7 +86,9 @@ static int acpi_processor_get_throttling_control(struct 
acpi_processor *pr)
 
status = acpi_evaluate_object(pr->handle, "_PTC", NULL, &buffer);
if (ACPI_FAILURE(status)) {
-   ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PTC"));
+   if (status != AE_NOT_FOUND) {
+   ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PTC"));
+   }
return -ENODEV;
}
 
@@ -132,6 +139,10 @@ static int acpi_processor_get_throttling_control(struct 
acpi_processor *pr)
 
return result;
 }
+
+/*
+ * _TSS - Throttling Supported States
+ */
 static int acpi_processor_get_throttling_states(struct acpi_processor *pr)
 {
int result = 0;
@@ -144,7 +155,9 @@ static int acpi_processor_get_throttling_states(struct 
acpi_processor *pr)
 
status = acpi_evaluate_object(pr->handle, "_TSS", NULL, &buffer);
if (ACPI_FAILURE(status)) {
-   ACPI_EXCEPTION((AE_INFO, status, "Evaluating _TSS"));
+   if (status != AE_NOT_FOUND) {
+   ACPI_EXCEPTION((AE_INFO, status, "Evaluating _TSS"));
+   }
return -ENODEV;
}
 
@@ -201,6 +214,10 @@ static int acpi_processor_get_throttling_states(struct 
acpi_processor *pr)
 
return result;
 }
+
+/*
+ * _TSD - T-State Dependencies
+ */
 static int acpi_processor_get_tsd(struct acpi_processor *pr)
 {
int result = 0;
@@ -213,6 +230,9 @@ static int acpi_processor_get_tsd(struct acpi_processor *pr)
 
status = acpi_evaluate_object(pr->handle, "_TSD", NULL, &buffer);
if (ACPI_FAILURE(status)) {
+   if (status != AE_NOT_FOUND) {
+   ACPI_EXCEPTION((AE_INFO, status, "Evaluating _TSD"));
+   }
return -ENODEV;
}
 
@@ -525,9 +545,6 @@ int acpi_processor_get_throttling_info(struct 
acpi_processor *pr)
int result = 0;
int step = 0;
int i = 0;
-   int no_ptc = 0;
-   int no_tss = 0;
-   int no_tsd = 0;
 
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
  "pblk_address[0x%08x] duty_offset[%d] 
duty_width[%d]\n",
@@ -538,12 +555,14 @@ int acpi_processo

m68knommu: fix reset register address casting

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=020f9e16c306f929382ad81e5a0ecf4f41887616
Commit: 020f9e16c306f929382ad81e5a0ecf4f41887616
Parent: 906a2621fc14005ac6e29a2b85aa8685b68bb016
Author: Greg Ungerer <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 22:07:20 2007 +1000
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 11:05:01 2007 -0700

m68knommu: fix reset register address casting

Fix types used for reset register address setup.

Signed-off-by: Greg Ungerer <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/asm-m68knommu/system.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asm-m68knommu/system.h b/include/asm-m68knommu/system.h
index 5e5ed18..5da43a5 100644
--- a/include/asm-m68knommu/system.h
+++ b/include/asm-m68knommu/system.h
@@ -296,7 +296,7 @@ cmpxchg(volatile int *p, int old, int new)
 ({ \
unsigned char volatile *reset;  \
asm("move.w #0x2700, %sr"); \
-   reset = ((volatile unsigned short *)(MCF_IPSBAR + 0x11));   \
+   reset = ((volatile unsigned char *)(MCF_IPSBAR + 0x11));\
while(1)\
*reset |= (0x01 << 7);\
 })
@@ -318,7 +318,7 @@ cmpxchg(volatile int *p, int old, int new)
 ({ \
unsigned char volatile *reset;  \
asm("move.w #0x2700, %sr"); \
-   reset = ((volatile unsigned short *)(MCF_IPSBAR + 0xA));\
+   reset = ((volatile unsigned char *)(MCF_IPSBAR + 0xA)); \
while(1)\
*reset |= 0x80; \
 })
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


m68knommu: add configure support for Intec boards

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=906a2621fc14005ac6e29a2b85aa8685b68bb016
Commit: 906a2621fc14005ac6e29a2b85aa8685b68bb016
Parent: 7160a67305f08d52284b333f1403abbf8b0a1970
Author: Greg Ungerer <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 22:07:20 2007 +1000
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 11:05:01 2007 -0700

m68knommu: add configure support for Intec boards

Add configure support for the Intec Wildfire and WildFireMod boards.

Signed-Off-By: Steve Bennett <[EMAIL PROTECTED]>
Signed-off-by: Greg Ungerer <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/m68knommu/Kconfig |   12 
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index e151988..185906b 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -354,6 +354,18 @@ config SOM5282EM
depends on M528x
help
  Support for the EMAC.Inc SOM5282EM module.  
+ 
+config WILDFIRE
+   bool "Intec Automation Inc. WildFire board support"
+   depends on M528x
+   help
+ Support for the Intec Automation Inc. WildFire.
+ 
+config WILDFIREMOD
+   bool "Intec Automation Inc. WildFire module support"
+   depends on M528x
+   help
+ Support for the Intec Automation Inc. WildFire module.
 
 config ARN5307
bool "Arnewsh 5307 board support"
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


m68knommu: add configure support for more Arcturus boards

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=36995223872df6642e604aab2be84377a5d12a19
Commit: 36995223872df6642e604aab2be84377a5d12a19
Parent: 931f9cde5c3f9dc7827759db258eaf979bfa92b6
Author: David Wu <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 22:07:20 2007 +1000
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 11:05:01 2007 -0700

m68knommu: add configure support for more Arcturus boards

Add configure support for the Arcturus UC5272 and UC5282 boards.

Signed-off-by: Greg Ungerer <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/m68knommu/Kconfig |   12 
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 1175cef..e151988 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -216,6 +216,18 @@ config XCOPILOT_BUGS
help
  Support the bugs of Xcopilot.
 
+config UC5272
+bool 'Arcturus Networks uC5272 dimm board support'
+depends on M5272
+help
+  Support for the Arcturus Networks uC5272 dimm board.
+
+config UC5282
+   bool "Arcturus Networks uC5282 board support"
+  depends on M528x
+   help
+  Support for the Arcturus Networks uC5282 dimm board.
+
 config UCSIMM
bool "uCsimm module support"
depends on M68EZ328
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


KVM: Fix removal of nx capability from guest cpuid

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4c981b43d7ec18818754bf85b829865abd0ce340
Commit: 4c981b43d7ec18818754bf85b829865abd0ce340
Parent: 7cfa4b0a43286b1da3afa4f5f99d52e65a8f30fc
Author: Avi Kivity <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 09:22:12 2007 +0300
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 14:31:13 2007 +0300

KVM: Fix removal of nx capability from guest cpuid

Testing the wrong bit caused kvm not to disable nx on the guest when it is
disabled on the host (an mmu optimization relies on the nx bits being the
same in the guest and host).

This allows Windows to boot when nx is disabled on te host (e.g. when
host pae is disabled).

Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 drivers/kvm/kvm_main.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index a8d8db8..9685609 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -2432,9 +2432,9 @@ static void cpuid_fix_nx_cap(struct kvm_vcpu *vcpu)
break;
}
}
-   if (entry && (entry->edx & EFER_NX) && !(efer & EFER_NX)) {
+   if (entry && (entry->edx & (1 << 20)) && !(efer & EFER_NX)) {
entry->edx &= ~(1 << 20);
-   printk(KERN_INFO ": guest NX capability removed\n");
+   printk(KERN_INFO "kvm: guest NX capability removed\n");
}
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


KVM: Correctly handle writes crossing a page boundary

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b0fcd903e6f3f47189baddf3fe085bdf78c9644c
Commit: b0fcd903e6f3f47189baddf3fe085bdf78c9644c
Parent: 0de085bb474f64e4fdb2f1ff3268590792648c7b
Author: Avi Kivity <[EMAIL PROTECTED]>
AuthorDate: Sun Jul 22 18:48:54 2007 +0300
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 14:29:17 2007 +0300

KVM: Correctly handle writes crossing a page boundary

Writes that are contiguous in virtual memory may not be contiguous in
physical memory; so split writes that straddle a page boundary.

Thanks to Aurelien for reporting the bug, patient testing, and a fix
to this very patch.

Signed-off-by: Aurelien Jarno <[EMAIL PROTECTED]>
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 drivers/kvm/kvm_main.c |   28 
 1 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index bcbe683..a0a3fdd 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -1078,10 +1078,10 @@ static int emulator_write_phys(struct kvm_vcpu *vcpu, 
gpa_t gpa,
return 1;
 }
 
-static int emulator_write_emulated(unsigned long addr,
-  const void *val,
-  unsigned int bytes,
-  struct x86_emulate_ctxt *ctxt)
+static int emulator_write_emulated_onepage(unsigned long addr,
+  const void *val,
+  unsigned int bytes,
+  struct x86_emulate_ctxt *ctxt)
 {
struct kvm_vcpu  *vcpu = ctxt->vcpu;
struct kvm_io_device *mmio_dev;
@@ -1113,6 +1113,26 @@ static int emulator_write_emulated(unsigned long addr,
return X86EMUL_CONTINUE;
 }
 
+static int emulator_write_emulated(unsigned long addr,
+  const void *val,
+  unsigned int bytes,
+  struct x86_emulate_ctxt *ctxt)
+{
+   /* Crossing a page boundary? */
+   if (((addr + bytes - 1) ^ addr) & PAGE_MASK) {
+   int rc, now;
+
+   now = -addr & ~PAGE_MASK;
+   rc = emulator_write_emulated_onepage(addr, val, now, ctxt);
+   if (rc != X86EMUL_CONTINUE)
+   return rc;
+   addr += now;
+   val += now;
+   bytes -= now;
+   }
+   return emulator_write_emulated_onepage(addr, val, bytes, ctxt);
+}
+
 static int emulator_cmpxchg_emulated(unsigned long addr,
 const void *old,
 const void *new,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


KVM: disable writeback for 0x0f 0x01 instructions.

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d37c85571904a622cbabc7a2e04b8c919de75ac0
Commit: d37c85571904a622cbabc7a2e04b8c919de75ac0
Parent: 4c981b43d7ec18818754bf85b829865abd0ce340
Author: Aurelien Jarno <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 10:19:54 2007 +0200
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 14:31:27 2007 +0300

KVM: disable writeback for 0x0f 0x01 instructions.

0x0f 0x01 instructions (ie lgdt, lidt, smsw, lmsw and invlpg) does
not use writeback. This patch set no_wb=1 when emulating those
instructions.

This fixes a regression booting the FreeBSD kernel on AMD.

Signed-off-by: Aurelien Jarno <[EMAIL PROTECTED]>
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 drivers/kvm/x86_emulate.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 1b800fc..1f979cb 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -1178,6 +1178,8 @@ pop_instruction:
 twobyte_insn:
switch (b) {
case 0x01: /* lgdt, lidt, lmsw */
+   /* Disable writeback. */
+   no_wb = 1;
switch (modrm_reg) {
u16 size;
unsigned long address;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


m68knommu: add build support for more Arcturus boards

2007-07-25 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=33e7a72a9c7ebb822d419a07840c3546513feff0
Commit: 33e7a72a9c7ebb822d419a07840c3546513feff0
Parent: 85e026bc0d9c9962de5ad65e3be40733f0f8d99c
Author: Greg Ungerer <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 22:07:20 2007 +1000
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 11:05:01 2007 -0700

m68knommu: add build support for more Arcturus boards

Add build support for the new Arcturus boards.

Signed-off-by: Greg Ungerer <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/m68knommu/Makefile |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile
index 8951793..1305cc9 100644
--- a/arch/m68knommu/Makefile
+++ b/arch/m68knommu/Makefile
@@ -26,6 +26,8 @@ platform-$(CONFIG_M5407)  := 5407
 PLATFORM := $(platform-y)
 
 board-$(CONFIG_PILOT)  := pilot
+board-$(CONFIG_UC5272)  := UC5272
+board-$(CONFIG_UC5282)  := UC5282
 board-$(CONFIG_UCSIMM) := ucsimm
 board-$(CONFIG_UCDIMM) := ucdimm
 board-$(CONFIG_UCQUICC):= uCquicc
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html